@adia-ai/web-modules 0.8.41 → 0.8.42
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.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/chat/chat-shell/css/chat-shell.bespoke.css +5 -5
- package/chat/chat-sidebar/chat-sidebar.a2ui.json +1 -1
- package/chat/chat-sidebar/chat-sidebar.d.ts +1 -1
- package/chat/chat-sidebar/chat-sidebar.js +25 -3
- package/chat/chat-sidebar/chat-sidebar.yaml +1 -1
- package/dist/chat/chat-shell.min.css +1 -1
- package/dist/everything.min.js +117 -117
- package/dist/shell/admin-shell.min.css +1 -1
- package/dist/web-modules.min.css +1 -1
- package/dist/web-modules.sheet.js +1 -1
- package/editor/editor-sidebar/editor-sidebar.js +5 -3
- package/package.json +6 -6
- package/shell/admin-shell/admin-shell.a2ui.json +1 -1
- package/shell/admin-shell/admin-shell.d.ts +1 -1
- package/shell/admin-shell/admin-shell.yaml +2 -2
- package/shell/admin-shell/css/admin-shell.bespoke.css +5 -5
- package/shell/admin-shell/css/admin-shell.helpers.css +8 -3
- package/shell/admin-shell/css/admin-shell.sidebar.css +5 -5
- package/shell/admin-sidebar/admin-sidebar.a2ui.json +1 -1
- package/shell/admin-sidebar/admin-sidebar.d.ts +1 -1
- package/shell/admin-sidebar/admin-sidebar.js +31 -9
- package/shell/admin-sidebar/admin-sidebar.yaml +1 -1
|
@@ -29,8 +29,10 @@
|
|
|
29
29
|
* sidebar-toggle — bubbles. detail: { name, expanded }
|
|
30
30
|
* sidebar-resize — bubbles. detail: { name, width }
|
|
31
31
|
*
|
|
32
|
-
* The drag handle is conventional: a child `[data-resize]` element
|
|
33
|
-
*
|
|
32
|
+
* The drag handle is conventional: a child `[data-sidebar-resize]` element
|
|
33
|
+
* (`[data-resize]` still works — deprecated, dual-read compat shim, removed
|
|
34
|
+
* in 0.9.0: docs/ops/plan/plan-090-rename-wave.md). Authors may provide a
|
|
35
|
+
* custom one, or omit (no resize affordance).
|
|
34
36
|
*
|
|
35
37
|
* Backwards compat: <admin-shell> still recognizes the legacy
|
|
36
38
|
* `<aside data-sidebar="leading">` shape via :is() selector. New
|
|
@@ -59,6 +61,11 @@ class AdminSidebar extends UIElement {
|
|
|
59
61
|
// handle — one-shot per element so re-renders stay quiet. GC-friendly.
|
|
60
62
|
static #warnedNoHandle = new WeakSet();
|
|
61
63
|
|
|
64
|
+
// Rename-wave compat (docs/ops/plan/plan-090-rename-wave.md W1): one-shot
|
|
65
|
+
// deprecation warn per element when the legacy `[data-resize]` name is the
|
|
66
|
+
// one that resolved the handle. Same GC-friendly WeakSet pattern as above.
|
|
67
|
+
static #warnedOldResizeName = new WeakSet();
|
|
68
|
+
|
|
62
69
|
// The width the sidebar had before being collapsed — used for restore.
|
|
63
70
|
// Map keyed by sidebar name allows multiple sidebars on one host.
|
|
64
71
|
#previousExpandedWidth = '';
|
|
@@ -166,19 +173,34 @@ class AdminSidebar extends UIElement {
|
|
|
166
173
|
// ── Resize drag handle ──
|
|
167
174
|
|
|
168
175
|
#setupResizeHandle() {
|
|
169
|
-
|
|
176
|
+
// Rename-wave compat (plan-090 W1): `[data-sidebar-resize]` is the
|
|
177
|
+
// current name; `[data-resize]` still dual-reads until the 0.9.0 cut
|
|
178
|
+
// (W3), warning once per element when it's the name that resolved.
|
|
179
|
+
let handle = this.querySelector(':scope > [data-sidebar-resize]');
|
|
180
|
+
if (!handle) {
|
|
181
|
+
handle = this.querySelector(':scope > [data-resize]');
|
|
182
|
+
if (handle && !AdminSidebar.#warnedOldResizeName.has(this)) {
|
|
183
|
+
AdminSidebar.#warnedOldResizeName.add(this);
|
|
184
|
+
// eslint-disable-next-line no-console
|
|
185
|
+
console.warn(
|
|
186
|
+
'[admin-sidebar] `[data-resize]` is deprecated and removed in ' +
|
|
187
|
+
'0.9.0 — rename the drag-handle child to `[data-sidebar-resize]`.',
|
|
188
|
+
this,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
170
192
|
if (!handle) {
|
|
171
193
|
// FEEDBACK-17: `resizable` opts in to drag-resize but relies on an
|
|
172
|
-
// author-supplied `[data-resize]` child. A silent return left
|
|
173
|
-
// with a no-op `resizable` attribute and zero diagnostic signal.
|
|
194
|
+
// author-supplied `[data-sidebar-resize]` child. A silent return left
|
|
195
|
+
// authors with a no-op `resizable` attribute and zero diagnostic signal.
|
|
174
196
|
if (!AdminSidebar.#warnedNoHandle.has(this)) {
|
|
175
197
|
AdminSidebar.#warnedNoHandle.add(this);
|
|
176
198
|
// eslint-disable-next-line no-console
|
|
177
199
|
console.warn(
|
|
178
|
-
'[admin-sidebar] `resizable` is set but no `[data-resize]`
|
|
179
|
-
'was found. Add `<div data-resize></div>` as a direct
|
|
180
|
-
'enable drag-to-resize. (Unlike `collapsible`, `resizable`
|
|
181
|
-
'this author-supplied handle.)',
|
|
200
|
+
'[admin-sidebar] `resizable` is set but no `[data-sidebar-resize]` ' +
|
|
201
|
+
'child was found. Add `<div data-sidebar-resize></div>` as a direct ' +
|
|
202
|
+
'child to enable drag-to-resize. (Unlike `collapsible`, `resizable` ' +
|
|
203
|
+
'requires this author-supplied handle.)',
|
|
182
204
|
this,
|
|
183
205
|
);
|
|
184
206
|
}
|