@adia-ai/web-modules 0.3.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/chat/chat-shell/chat-shell.js +28 -40
  3. package/chat/chat-shell/css/chat-shell.empty.css +3 -3
  4. package/chat/chat-shell/css/chat-shell.layout.css +2 -2
  5. package/editor/editor-canvas/editor-canvas.a2ui.json +87 -0
  6. package/editor/editor-canvas/editor-canvas.examples.html +65 -0
  7. package/editor/editor-canvas/editor-canvas.html +43 -0
  8. package/editor/editor-canvas/editor-canvas.js +103 -0
  9. package/editor/editor-canvas/editor-canvas.test.js +100 -0
  10. package/editor/editor-canvas/editor-canvas.yaml +88 -0
  11. package/editor/editor-canvas-empty/editor-canvas-empty.a2ui.json +69 -0
  12. package/editor/editor-canvas-empty/editor-canvas-empty.examples.html +65 -0
  13. package/editor/editor-canvas-empty/editor-canvas-empty.html +42 -0
  14. package/editor/editor-canvas-empty/editor-canvas-empty.yaml +56 -0
  15. package/editor/editor-shell/css/editor-shell.bespoke.css +237 -0
  16. package/editor/editor-shell/css/editor-shell.layout.css +6 -6
  17. package/editor/editor-shell/editor-shell.css +1 -0
  18. package/editor/editor-shell/editor-shell.js +87 -30
  19. package/editor/editor-sidebar/editor-sidebar.a2ui.json +93 -0
  20. package/editor/editor-sidebar/editor-sidebar.examples.html +65 -0
  21. package/editor/editor-sidebar/editor-sidebar.html +43 -0
  22. package/editor/editor-sidebar/editor-sidebar.js +197 -0
  23. package/editor/editor-sidebar/editor-sidebar.test.js +145 -0
  24. package/editor/editor-sidebar/editor-sidebar.yaml +91 -0
  25. package/editor/editor-statusbar/editor-statusbar.a2ui.json +76 -0
  26. package/editor/editor-statusbar/editor-statusbar.examples.html +65 -0
  27. package/editor/editor-statusbar/editor-statusbar.html +42 -0
  28. package/editor/editor-statusbar/editor-statusbar.yaml +57 -0
  29. package/editor/editor-toolbar/editor-toolbar.a2ui.json +96 -0
  30. package/editor/editor-toolbar/editor-toolbar.examples.html +65 -0
  31. package/editor/editor-toolbar/editor-toolbar.html +43 -0
  32. package/editor/editor-toolbar/editor-toolbar.js +58 -0
  33. package/editor/editor-toolbar/editor-toolbar.test.js +99 -0
  34. package/editor/editor-toolbar/editor-toolbar.yaml +81 -0
  35. package/editor/index.js +3 -0
  36. package/package.json +4 -4
  37. package/shell/admin-shell/admin-shell.js +27 -243
  38. package/shell/admin-shell/css/admin-shell.bespoke.css +22 -26
  39. package/shell/admin-shell/css/admin-shell.main.css +2 -2
  40. package/shell/admin-shell/css/admin-shell.shell.css +2 -2
  41. package/shell/admin-shell/css/admin-shell.sidebar.css +35 -33
@@ -0,0 +1,88 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
3
+ name: EditorCanvas
4
+ tag: editor-canvas
5
+ component: EditorCanvas
6
+ category: container
7
+ version: 1
8
+ description: |
9
+ Module-tier editor canvas surface — replaces legacy <div data-canvas>
10
+ inside <editor-shell> per ADR-0023. Owns scroll/zoom container
11
+ semantics, [empty] and [focused] reflected attributes, and a stable
12
+ target for the host's content rendering pipeline.
13
+
14
+ Sits as the central content region inside <editor-shell>, between
15
+ the optional <editor-sidebar slot="leading"> and <editor-sidebar
16
+ slot="trailing">. Authors compose <editor-canvas-empty> as an
17
+ optional first child for the empty state; canvas content children
18
+ (artboards, document body, etc.) are appended either statically or
19
+ dynamically by the host.
20
+
21
+ Backwards compat — <editor-shell> still recognizes the legacy
22
+ <div data-canvas> shape via :is() selector. New code should prefer
23
+ <editor-canvas>.
24
+
25
+ props:
26
+ empty:
27
+ description: |
28
+ Reflected — set when zero non-<editor-canvas-empty> children.
29
+ Drives the <editor-canvas-empty> visibility via parent CSS —
30
+ no JS toggling needed.
31
+ type: boolean
32
+ default: true
33
+ reflect: true
34
+ focused:
35
+ description: |
36
+ Reflected — set when canvas claims focus ownership (programmatic
37
+ .focus() call or toolbar full-screen toggle).
38
+ type: boolean
39
+ default: false
40
+ reflect: true
41
+
42
+ events: {}
43
+
44
+ slots:
45
+ default:
46
+ description: >-
47
+ Default — canvas content (artboards, document body, blocks, etc.)
48
+ plus an optional first <editor-canvas-empty> sibling for the
49
+ empty state.
50
+
51
+ states:
52
+ - name: idle
53
+ description: Default canvas mode.
54
+ - name: empty
55
+ attribute: empty
56
+ description: Zero content children — empty state visible.
57
+ - name: focused
58
+ attribute: focused
59
+ description: Canvas is the focus surface.
60
+
61
+ traits: []
62
+
63
+ a2ui:
64
+ rules:
65
+ - >-
66
+ editor-canvas is the bespoke replacement for legacy
67
+ <div data-canvas> inside <editor-shell>. Use it as the central
68
+ content region for editor work surfaces.
69
+ - >-
70
+ Place <editor-canvas-empty> as an optional first child for the
71
+ empty state; the [empty] reflected attribute drives its visibility
72
+ via CSS (no JS toggling).
73
+
74
+ keywords:
75
+ - editor-canvas
76
+ - canvas
77
+ - workspace
78
+ - artboard
79
+ - editor-surface
80
+
81
+ synonyms:
82
+ editor-canvas: [canvas, workspace, artboard, design-surface]
83
+
84
+ related:
85
+ - EditorShell
86
+ - EditorCanvasEmpty
87
+ - EditorToolbar
88
+ - EditorSidebar
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/EditorCanvasEmpty.json",
4
+ "title": "EditorCanvasEmpty",
5
+ "description": "Module-tier editor canvas empty state. CSS-only — no behavior, no\nJS. Sits as the first child of <editor-canvas> as the empty state\nplaceholder. Visibility is driven by <editor-canvas>'s [empty]\nreflected attribute via CSS (no JS toggling) — when content arrives,\nthe parent canvas loses [empty] and CSS hides this stub.\n\nReplaces ad-hoc empty-state placement inside the legacy\n<div data-canvas> per ADR-0023.\n",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "common_types.json#/$defs/ComponentCommon"
10
+ },
11
+ {
12
+ "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
+ }
14
+ ],
15
+ "properties": {
16
+ "component": {
17
+ "const": "EditorCanvasEmpty"
18
+ }
19
+ },
20
+ "required": [
21
+ "component"
22
+ ],
23
+ "unevaluatedProperties": false,
24
+ "x-adiaui": {
25
+ "anti_patterns": [],
26
+ "category": "feedback",
27
+ "events": {},
28
+ "examples": [],
29
+ "keywords": [
30
+ "editor-canvas-empty",
31
+ "empty-state",
32
+ "placeholder",
33
+ "no-content",
34
+ "canvas-empty"
35
+ ],
36
+ "name": "EditorCanvasEmpty",
37
+ "related": [
38
+ "EditorShell",
39
+ "EditorCanvas",
40
+ "EmptyState"
41
+ ],
42
+ "slots": {
43
+ "default": {
44
+ "description": "Empty state content — typically <empty-state-ui> with a \"Create new...\" prompt or onboarding affordance."
45
+ }
46
+ },
47
+ "states": [
48
+ {
49
+ "description": "Default, visible.",
50
+ "name": "idle"
51
+ },
52
+ {
53
+ "description": "Hidden via parent <editor-canvas>:not([empty]) selector.",
54
+ "name": "hidden"
55
+ }
56
+ ],
57
+ "synonyms": {
58
+ "editor-canvas-empty": [
59
+ "empty-state",
60
+ "placeholder",
61
+ "no-document"
62
+ ]
63
+ },
64
+ "tag": "editor-canvas-empty",
65
+ "tokens": {},
66
+ "traits": [],
67
+ "version": 1
68
+ }
69
+ }
@@ -0,0 +1,65 @@
1
+ <header>
2
+ <div>
3
+ <h1>Editor Canvas Empty</h1>
4
+ <div data-actions>
5
+ <tag-ui size="sm">editor-canvas-empty</tag-ui>
6
+ <tag-ui size="sm" variant="ghost">CSS-only</tag-ui>
7
+ </div>
8
+ </div>
9
+ <p>Module-tier editor canvas empty state. CSS-only. Visibility driven by parent <editor-canvas>[empty].</p>
10
+ </header>
11
+
12
+ <section data-section>
13
+ <h2 variant="section">Role</h2>
14
+ <p>Per <a href="../../../../.brain/adrs/0023-bespoke-shell-tier-children.md">ADR-0023</a>, the editor cluster's bespoke family — <code>&lt;editor-shell&gt;</code> (host), <code>&lt;editor-toolbar&gt;</code>, <code>&lt;editor-canvas&gt;</code>, <code>&lt;editor-sidebar&gt;</code> (JS-bearing) + <code>&lt;editor-statusbar&gt;</code>, <code>&lt;editor-canvas-empty&gt;</code> (CSS-only). Confirms the family pattern is canonical across 3 archetypes (admin/chat/editor).</p>
15
+ </section>
16
+
17
+ <section data-section>
18
+ <h2 variant="section">Composition</h2>
19
+ <p>Typical placement inside <code>&lt;editor-shell&gt;</code>:</p>
20
+ <code-ui language="html">&lt;editor-shell&gt;
21
+ &lt;editor-toolbar&gt;
22
+ &lt;span slot="title"&gt;Untitled.fig&lt;/span&gt;
23
+ &lt;button-ui slot="action" icon="gear"&gt;&lt;/button-ui&gt;
24
+ &lt;/editor-toolbar&gt;
25
+
26
+ &lt;editor-sidebar slot="leading" collapsible&gt;
27
+ &lt;pane-ui resizable&gt;
28
+ &lt;header&gt;Navigator&lt;/header&gt;
29
+ &lt;section&gt;…layers…&lt;/section&gt;
30
+ &lt;/pane-ui&gt;
31
+ &lt;/editor-sidebar&gt;
32
+
33
+ &lt;editor-canvas&gt;
34
+ &lt;editor-canvas-empty&gt;
35
+ &lt;empty-state-ui icon="square" heading="New document" description="Drop content to begin."&gt;&lt;/empty-state-ui&gt;
36
+ &lt;/editor-canvas-empty&gt;
37
+ &lt;/editor-canvas&gt;
38
+
39
+ &lt;editor-sidebar slot="trailing" collapsible&gt;
40
+ &lt;pane-ui resizable&gt;
41
+ &lt;header&gt;Inspector&lt;/header&gt;
42
+ &lt;section&gt;…properties…&lt;/section&gt;
43
+ &lt;/pane-ui&gt;
44
+ &lt;/editor-sidebar&gt;
45
+
46
+ &lt;editor-statusbar&gt;
47
+ &lt;span slot="status"&gt;Saved&lt;/span&gt;
48
+ &lt;span slot="zoom"&gt;100%&lt;/span&gt;
49
+ &lt;/editor-statusbar&gt;
50
+ &lt;/editor-shell&gt;</code-ui>
51
+ </section>
52
+
53
+ <section data-section>
54
+ <h2 variant="section">State as attribute</h2>
55
+ <code-ui language="css">/* Hide all chrome in focus mode */
56
+ editor-shell[focus-mode] :is(editor-toolbar, editor-statusbar, editor-sidebar) {
57
+ display: none;
58
+ }
59
+
60
+ /* Visual treatment for empty canvas */
61
+ editor-canvas[empty] { /* placeholder UI */ }
62
+
63
+ /* Highlight focused canvas */
64
+ editor-canvas[focused] { outline: 2px solid var(--a-accent); }</code-ui>
65
+ </section>
@@ -0,0 +1,42 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="auto">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Editor Canvas Empty — AdiaUI</title>
7
+
8
+ <link rel="stylesheet" href="../../../web-components/styles/resets.css">
9
+ <link rel="stylesheet" href="../../../web-components/styles/tokens.css">
10
+ <link rel="stylesheet" href="../editor-shell/editor-shell.css">
11
+ <link rel="stylesheet" href="../../../web-components/components/code/code.css">
12
+ <link rel="stylesheet" href="../../../web-components/components/tag/tag.css">
13
+
14
+ <script type="module" src="../editor-shell/editor-shell.js"></script>
15
+ <script type="module" src="../../../web-components/components/code/code.js"></script>
16
+ <script type="module" src="../../../web-components/components/tag/tag.js"></script>
17
+
18
+ <style>
19
+ :where(html, body) { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-fg); font-family: var(--a-font); }
20
+ main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
21
+ </style>
22
+ </head>
23
+ <body>
24
+
25
+ <main id="demo-root">
26
+ <p>Loading examples…</p>
27
+ </main>
28
+
29
+ <script type="module">
30
+ const root = document.getElementById('demo-root');
31
+ try {
32
+ const res = await fetch('./editor-canvas-empty.examples.html');
33
+ if (!res.ok) throw new Error(`fetch failed (${res.status})`);
34
+ root.innerHTML = await res.text();
35
+ } catch (err) {
36
+ root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load editor-canvas-empty.examples.html — ${err.message}</p>`;
37
+ console.error('[editor-canvas-empty.html]', err);
38
+ }
39
+ </script>
40
+
41
+ </body>
42
+ </html>
@@ -0,0 +1,56 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
3
+ name: EditorCanvasEmpty
4
+ tag: editor-canvas-empty
5
+ component: EditorCanvasEmpty
6
+ category: feedback
7
+ version: 1
8
+ description: |
9
+ Module-tier editor canvas empty state. CSS-only — no behavior, no
10
+ JS. Sits as the first child of <editor-canvas> as the empty state
11
+ placeholder. Visibility is driven by <editor-canvas>'s [empty]
12
+ reflected attribute via CSS (no JS toggling) — when content arrives,
13
+ the parent canvas loses [empty] and CSS hides this stub.
14
+
15
+ Replaces ad-hoc empty-state placement inside the legacy
16
+ <div data-canvas> per ADR-0023.
17
+
18
+ props: {}
19
+
20
+ events: {}
21
+
22
+ slots:
23
+ default:
24
+ description: >-
25
+ Empty state content — typically <empty-state-ui> with a
26
+ "Create new..." prompt or onboarding affordance.
27
+
28
+ states:
29
+ - name: idle
30
+ description: Default, visible.
31
+ - name: hidden
32
+ description: Hidden via parent <editor-canvas>:not([empty]) selector.
33
+
34
+ traits: []
35
+
36
+ a2ui:
37
+ rules:
38
+ - >-
39
+ editor-canvas-empty is the bespoke empty-state slot for
40
+ <editor-canvas>. Place as the first child of <editor-canvas>;
41
+ visibility is automatic via the [empty] reflected attribute.
42
+
43
+ keywords:
44
+ - editor-canvas-empty
45
+ - empty-state
46
+ - placeholder
47
+ - no-content
48
+ - canvas-empty
49
+
50
+ synonyms:
51
+ editor-canvas-empty: [empty-state, placeholder, no-document]
52
+
53
+ related:
54
+ - EditorShell
55
+ - EditorCanvas
56
+ - EmptyState
@@ -0,0 +1,237 @@
1
+ /* ═══════════════════════════════════════════════════════════════
2
+ editor-shell — Bespoke shell-tier children (Phase 2 of ADR-0023)
3
+
4
+ The editor-* CSS-only structural children are styled by SHARING
5
+ the same CSS rules as their legacy raw-HTML counterparts. This
6
+ file maps the new bespoke tags to the existing layout.css patterns
7
+ without modifying the layered files themselves.
8
+
9
+ Mirrors admin-shell.bespoke.css and chat-shell.bespoke.css. Keeps
10
+ the editor cluster's CSS modifications isolated in one bridge so
11
+ Phase 3 (legacy shape removal) is a single-file delete.
12
+
13
+ Editor cluster decomposition note:
14
+ - <editor-toolbar> — replaces <header> chrome bar (CSS-only? no,
15
+ it's JS-bearing for [data-toolbar-action] click bubble + slot
16
+ routing, but visually it's just a chrome bar like admin-topbar)
17
+ - <editor-canvas> — replaces <div data-canvas> central content
18
+ (JS-bearing — owns [empty] + [focused] reflected, zoom API)
19
+ - <editor-sidebar> — wraps <pane-ui resizable> (JS-bearing — owns
20
+ [collapsed] + persistence, delegates drag to <pane-ui>)
21
+ - <editor-statusbar> — replaces <footer> chrome bar (CSS-only)
22
+ - <editor-canvas-empty> — empty-state slot for <editor-canvas>
23
+ (CSS-only, visibility via parent [empty])
24
+ ═══════════════════════════════════════════════════════════════ */
25
+
26
+ /* ── editor-toolbar — top chrome bar ── */
27
+ editor-shell > editor-toolbar {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: var(--editor-toolbar-gap, var(--a-space-2));
31
+ padding: 0 var(--editor-toolbar-px, var(--a-space-3));
32
+ height: var(--editor-toolbar-height, var(--a-size-lg));
33
+ font-size: var(--editor-toolbar-font, var(--a-ui-size));
34
+ border-bottom: var(--editor-border, 1px solid var(--a-border-subtle));
35
+ background: var(--editor-bg, var(--a-bg));
36
+ flex-shrink: 0;
37
+ grid-area: toolbar;
38
+ }
39
+
40
+ /* Slot vocabulary inside editor-toolbar */
41
+ editor-toolbar > [slot="title"] {
42
+ font-weight: var(--a-weight-medium, 500);
43
+ color: var(--a-fg);
44
+ }
45
+
46
+ editor-toolbar > [slot="action-leading"] {
47
+ margin-inline-end: var(--a-space-2);
48
+ }
49
+
50
+ editor-toolbar > [slot="status"] {
51
+ margin-inline-start: var(--a-space-2);
52
+ color: var(--a-fg-muted);
53
+ }
54
+
55
+ editor-toolbar > [slot="action"]:first-of-type {
56
+ margin-inline-start: auto;
57
+ }
58
+
59
+ /* Full-screen mode — toolbar can be hidden by host CSS */
60
+ editor-toolbar[full-screen] {
61
+ /* Optional: visual treatment in full-screen mode. Default: no change.
62
+ Authors can override via:
63
+ editor-shell:has(editor-toolbar[full-screen]) editor-toolbar { display: none; }
64
+ */
65
+ }
66
+
67
+ /* ── editor-canvas — central content surface ── */
68
+ editor-shell > editor-canvas {
69
+ flex: 1;
70
+ min-height: 0;
71
+ min-width: 0;
72
+ display: flex;
73
+ flex-direction: column;
74
+ position: relative;
75
+ overflow: auto;
76
+ background: var(--editor-canvas-bg, var(--a-bg-subtle));
77
+ grid-area: canvas;
78
+
79
+ /* Apply zoom transform if the JS sets --editor-canvas-zoom */
80
+ /* Children inherit; the canvas itself is the scroll surface */
81
+ }
82
+
83
+ editor-canvas[focused] {
84
+ /* Optional: visual focus treatment. Default: no visual change. */
85
+ }
86
+
87
+ editor-canvas > * {
88
+ transform: scale(var(--editor-canvas-zoom, 1));
89
+ transform-origin: top left;
90
+ }
91
+
92
+ /* ── editor-canvas-empty — visibility via parent's [empty] ── */
93
+ editor-canvas:not([empty]) > editor-canvas-empty {
94
+ display: none;
95
+ }
96
+
97
+ editor-canvas[empty] > editor-canvas-empty {
98
+ display: flex;
99
+ flex: 1;
100
+ align-items: center;
101
+ justify-content: center;
102
+ padding: var(--a-space-6);
103
+ }
104
+
105
+ /* ── editor-sidebar — wraps <pane-ui resizable> ── */
106
+ :is(editor-sidebar[slot="leading"], editor-sidebar[slot="trailing"]) {
107
+ display: flex;
108
+ flex-direction: column;
109
+ flex-shrink: 0;
110
+ min-height: 0;
111
+ position: relative;
112
+ }
113
+
114
+ editor-sidebar[slot="leading"] {
115
+ grid-area: leading;
116
+ border-right: var(--editor-border, 1px solid var(--a-border-subtle));
117
+ }
118
+
119
+ editor-sidebar[slot="trailing"] {
120
+ grid-area: trailing;
121
+ border-left: var(--editor-border, 1px solid var(--a-border-subtle));
122
+ }
123
+
124
+ /* The inner <pane-ui> takes all available space */
125
+ editor-sidebar > pane-ui {
126
+ flex: 1;
127
+ min-height: 0;
128
+ display: flex;
129
+ flex-direction: column;
130
+ }
131
+
132
+ /* ── editor-sidebar collapsed-mode polish ──
133
+ When collapsed: pane shrinks to icon-rail width (48px); section
134
+ content hides; header narrows to icon-only with horizontal-center;
135
+ smooth width transition on uncollapse. Mirrors the rail-pattern
136
+ established by admin-sidebar's collapsed state.
137
+ ═══════════════════════════════════════════════════════════════ */
138
+
139
+ editor-sidebar {
140
+ transition: width var(--editor-sidebar-duration, var(--a-duration, 180ms))
141
+ var(--editor-sidebar-easing, var(--a-easing, ease));
142
+ container-type: inline-size;
143
+ container-name: editor-sidebar;
144
+ }
145
+
146
+ /* Inner pane animates the visible width */
147
+ editor-sidebar > pane-ui {
148
+ transition: width var(--editor-sidebar-duration, var(--a-duration, 180ms))
149
+ var(--editor-sidebar-easing, var(--a-easing, ease));
150
+ }
151
+
152
+ /* Collapsed state — hide section/footer content; preserve header icons */
153
+ editor-sidebar[collapsed] > pane-ui {
154
+ width: var(--editor-sidebar-collapsed-width, 48px) !important;
155
+ min-width: var(--editor-sidebar-collapsed-width, 48px);
156
+ overflow: hidden;
157
+ }
158
+
159
+ editor-sidebar[collapsed] > pane-ui > section,
160
+ editor-sidebar[collapsed] > pane-ui > footer {
161
+ display: none;
162
+ }
163
+
164
+ /* Collapsed header — center icons horizontally; hide text labels */
165
+ editor-sidebar[collapsed] > pane-ui > header {
166
+ display: flex;
167
+ flex-direction: column;
168
+ align-items: center;
169
+ justify-content: flex-start;
170
+ gap: var(--a-space-1);
171
+ padding: var(--a-space-2) 0;
172
+ /* Hide direct text nodes via opacity-0 + descendant text containers */
173
+ }
174
+
175
+ /* Collapsed header — hide text labels next to icons */
176
+ editor-sidebar[collapsed] > pane-ui > header :is(
177
+ span:not([data-icon]):not([slot]),
178
+ label,
179
+ h1, h2, h3
180
+ ) {
181
+ display: none;
182
+ }
183
+
184
+ /* Provide a visual rail affordance */
185
+ editor-sidebar[collapsed] {
186
+ background: var(--editor-sidebar-rail-bg, var(--a-bg-subtle, var(--a-bg)));
187
+ }
188
+
189
+ /* Container query — child elements can adapt to narrow mode */
190
+ @container editor-sidebar (max-width: 96px) {
191
+ /* Children can hide labels / shrink icons via [data-narrow] */
192
+ }
193
+
194
+ /* When resizing — disable transitions to feel responsive */
195
+ editor-sidebar[resizing] {
196
+ transition: none;
197
+ }
198
+ editor-sidebar[resizing] > pane-ui {
199
+ transition: none;
200
+ }
201
+
202
+ /* ── editor-statusbar — bottom chrome bar ── */
203
+ editor-shell > editor-statusbar {
204
+ display: flex;
205
+ align-items: center;
206
+ gap: var(--editor-statusbar-gap, var(--a-space-2));
207
+ padding: 0 var(--editor-statusbar-px, var(--a-space-3));
208
+ height: var(--editor-statusbar-height, var(--a-size-md));
209
+ font-size: var(--editor-statusbar-font, var(--a-ui-sm));
210
+ border-top: var(--editor-border, 1px solid var(--a-border-subtle));
211
+ background: var(--editor-bg, var(--a-bg));
212
+ color: var(--a-fg-muted);
213
+ flex-shrink: 0;
214
+ grid-area: statusbar;
215
+ }
216
+
217
+ editor-statusbar > [slot="cursor"],
218
+ editor-statusbar > [slot="zoom"] {
219
+ font-family: var(--a-font-mono, monospace);
220
+ margin-inline-start: var(--a-space-2);
221
+ }
222
+
223
+ editor-statusbar > [slot="action"]:first-of-type {
224
+ margin-inline-start: auto;
225
+ }
226
+
227
+ /* ── editor-shell layout — when bespoke children are used ── */
228
+ editor-shell:has(> editor-canvas) {
229
+ display: grid;
230
+ grid-template-areas:
231
+ "toolbar toolbar toolbar"
232
+ "leading canvas trailing"
233
+ "statusbar statusbar statusbar";
234
+ grid-template-rows: auto 1fr auto;
235
+ grid-template-columns: auto 1fr auto;
236
+ height: 100%;
237
+ }
@@ -4,9 +4,9 @@
4
4
  Structure:
5
5
  editor-shell
6
6
  header — topbar
7
- [data-editor-body] — flex row: pane | canvas | pane
7
+ — flex row: pane | canvas | pane
8
8
  pane-ui — left navigator
9
- [data-canvas] — center canvas
9
+ editor-canvas — center canvas
10
10
  pane-ui — right inspector
11
11
  footer — bottombar
12
12
  ═══════════════════════════════════════════════════════════════ */
@@ -82,7 +82,7 @@ editor-shell > header > [slot="action-leading"] {
82
82
  }
83
83
 
84
84
  /* ── Body: pane | canvas | pane ── */
85
- editor-shell > [data-editor-body] {
85
+ editor-shell > {
86
86
  display: flex;
87
87
  flex: 1;
88
88
  min-width: 0;
@@ -90,7 +90,7 @@ editor-shell > [data-editor-body] {
90
90
  }
91
91
 
92
92
  /* ── Canvas ── */
93
- editor-shell [data-canvas] {
93
+ editor-shell editor-canvas {
94
94
  flex: 1;
95
95
  min-width: 0;
96
96
  display: flex;
@@ -107,11 +107,11 @@ editor-shell pane-ui {
107
107
  flex-shrink: 0;
108
108
  }
109
109
 
110
- editor-shell pane-ui[data-left] {
110
+ editor-shell editor-sidebar[slot="leading"] > pane-ui {
111
111
  width: var(--editor-pane-width-left);
112
112
  }
113
113
 
114
- editor-shell pane-ui[data-right] {
114
+ editor-shell editor-sidebar[slot="trailing"] > pane-ui {
115
115
  width: var(--editor-pane-width-right);
116
116
  }
117
117
 
@@ -4,3 +4,4 @@
4
4
 
5
5
  @import "./css/editor-shell.tokens.css";
6
6
  @import "./css/editor-shell.layout.css";
7
+ @import "./css/editor-shell.bespoke.css";