| David Crawshaw | 7735844 | 2025-06-25 00:26:08 +0000 | [diff] [blame] | 1 | import { html } from "lit"; |
| 2 | import { customElement } from "lit/decorators.js"; |
| 3 | import { ref } from "lit/directives/ref.js"; |
| 4 | import { SketchAppShellBase } from "./sketch-app-shell-base"; |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 5 | |
| 6 | @customElement("sketch-app-shell") |
| David Crawshaw | 7735844 | 2025-06-25 00:26:08 +0000 | [diff] [blame] | 7 | export class SketchAppShell extends SketchAppShellBase { |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 8 | render() { |
| 9 | return html` |
| Sean McCullough | bf66a2f | 2025-06-23 21:53:55 -0700 | [diff] [blame] | 10 | <!-- Main container: flex column, full height, system font, hidden overflow-x --> |
| 11 | <div |
| 12 | class="block font-sans text-gray-800 leading-relaxed h-screen w-full relative overflow-x-hidden flex flex-col" |
| 13 | > |
| David Crawshaw | 7735844 | 2025-06-25 00:26:08 +0000 | [diff] [blame] | 14 | ${this.renderTopBanner()} |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 15 | |
| Sean McCullough | bf66a2f | 2025-06-23 21:53:55 -0700 | [diff] [blame] | 16 | <!-- Main content area: scrollable, flex-1 --> |
| Josh Bleecher Snyder | 112b923 | 2025-05-23 11:26:33 -0700 | [diff] [blame] | 17 | <div |
| Sean McCullough | bf66a2f | 2025-06-23 21:53:55 -0700 | [diff] [blame] | 18 | id="view-container" |
| 19 | ${ref(this.scrollContainerRef)} |
| 20 | class="self-stretch overflow-y-auto flex-1 flex flex-col min-h-0" |
| Josh Bleecher Snyder | 112b923 | 2025-05-23 11:26:33 -0700 | [diff] [blame] | 21 | > |
| Pokey Rule | 4097e53 | 2025-04-24 18:55:28 +0100 | [diff] [blame] | 22 | <div |
| Sean McCullough | bf66a2f | 2025-06-23 21:53:55 -0700 | [diff] [blame] | 23 | id="view-container-inner" |
| 24 | class="${this.viewMode === "diff2" |
| 25 | ? "max-w-full w-full h-full p-0 flex flex-col flex-1 min-h-0" |
| 26 | : this._todoPanelVisible && this.viewMode === "chat" |
| 27 | ? "max-w-none w-full m-0 px-5" |
| 28 | : "max-w-6xl w-[calc(100%-40px)] mx-auto"} relative pb-2.5 pt-2.5 flex flex-col h-full" |
| Pokey Rule | 4097e53 | 2025-04-24 18:55:28 +0100 | [diff] [blame] | 29 | > |
| David Crawshaw | 7735844 | 2025-06-25 00:26:08 +0000 | [diff] [blame] | 30 | ${this.renderMainViews()} |
| Josh Bleecher Snyder | 112b923 | 2025-05-23 11:26:33 -0700 | [diff] [blame] | 31 | </div> |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 32 | </div> |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 33 | |
| David Crawshaw | 7735844 | 2025-06-25 00:26:08 +0000 | [diff] [blame] | 34 | ${this.renderChatInput()} |
| Pokey Rule | 4097e53 | 2025-04-24 18:55:28 +0100 | [diff] [blame] | 35 | </div> |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 36 | `; |
| 37 | } |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | declare global { |
| 41 | interface HTMLElementTagNameMap { |
| 42 | "sketch-app-shell": SketchAppShell; |
| 43 | } |
| 44 | } |