@aceshooting/lyra-ui 23.0.0 → 24.1.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.
- package/CHANGELOG.md +16 -39
- package/README.md +72 -35
- package/custom-elements.json +1 -1
- package/design-tokens.json +1 -1
- package/dist/cli/lyra-rename-ledger.mjs +1 -1
- package/dist/cli/migration-contract.json +1 -1
- package/dist/cli/migration-contract.mjs +1 -1
- package/dist/cli/migration-renames.mjs +2 -2
- package/dist/cli/migration-transforms.mjs +2 -2
- package/dist/components/agent-tools/approval-queue/approval-queue.class.d.ts +1 -4
- package/dist/components/agent-tools/approval-queue/approval-queue.class.js +1 -3
- package/dist/components/agent-tools/compare-panel/compare-panel.class.d.ts +1 -4
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js +1 -1
- package/dist/components/agent-tools/confirm-bar/confirm-bar.class.d.ts +1 -7
- package/dist/components/agent-tools/confirm-bar/confirm-bar.class.js +2 -2
- package/dist/components/agent-tools/context-inspector/context-inspector.class.d.ts +1 -1
- package/dist/components/agent-tools/evaluation-run/evaluation-run.class.d.ts +2 -5
- package/dist/components/agent-tools/evaluation-run/evaluation-run.class.js +1 -3
- package/dist/components/agent-tools/terminal/terminal.class.d.ts +1 -4
- package/dist/components/agent-tools/terminal/terminal.class.js +2 -2
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.d.ts +1 -7
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.js +1 -1
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.d.ts +1 -4
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js +1 -3
- package/dist/components/charts/chart/lite-chart-axis-layout.d.ts +13 -0
- package/dist/components/charts/chart/lite-chart-axis-layout.js +1 -0
- package/dist/components/charts/chart/lite-chart.class.d.ts +1 -11
- package/dist/components/charts/chart/lite-chart.class.js +4 -4
- package/dist/components/conversation/agent-workspace/agent-workspace.class.d.ts +13 -3
- package/dist/components/conversation/agent-workspace/agent-workspace.class.js +1 -2
- package/dist/components/conversation/chat-message/chat-message.class.d.ts +3 -9
- package/dist/components/conversation/chat-message/chat-message.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-base.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-core.class.d.ts +6 -8
- package/dist/components/conversation/code-block/code-block-shared.d.ts +1 -4
- package/dist/components/conversation/code-block/code-block.class.d.ts +4 -6
- package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -3
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +1 -4
- package/dist/components/conversation/markdown/markdown.class.d.ts +1 -4
- package/dist/components/conversation/message-actions/message-actions.class.d.ts +1 -4
- package/dist/components/conversation/message-actions/message-actions.class.js +1 -1
- package/dist/components/conversation/message-feedback/message-feedback.class.d.ts +1 -4
- package/dist/components/conversation/message-feedback/message-feedback.class.js +2 -2
- package/dist/components/conversation/message-parts/message-parts.class.d.ts +2 -5
- package/dist/components/conversation/message-parts/message-parts.class.js +3 -3
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +2 -0
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +0 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +2 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.js +0 -1
- package/dist/components/conversation/thread-list/thread-list.class.d.ts +6 -17
- package/dist/components/conversation/thread-list/thread-list.class.js +6 -6
- package/dist/components/data/context-meter/context-meter.class.d.ts +1 -6
- package/dist/components/data/context-meter/context-meter.class.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +0 -1
- package/dist/components/data/data-grid/data-grid.class.js +2 -2
- package/dist/components/data/document-library/document-library.class.d.ts +6 -13
- package/dist/components/data/document-library/document-library.class.js +1 -2
- package/dist/components/data/heatmap/heatmap-grid-navigation.d.ts +7 -0
- package/dist/components/data/heatmap/heatmap-grid-navigation.js +1 -0
- package/dist/components/data/heatmap/heatmap.class.d.ts +3 -23
- package/dist/components/data/heatmap/heatmap.class.js +2 -2
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +3 -9
- package/dist/components/data/sequence-strip/sequence-strip.class.js +3 -3
- package/dist/components/data/table/table.class.d.ts +5 -14
- package/dist/components/data/table/table.class.js +6 -6
- package/dist/components/forms/button/button.class.d.ts +2 -2
- package/dist/components/forms/button/button.class.js +9 -9
- package/dist/components/forms/combobox/combobox.class.d.ts +1 -4
- package/dist/components/forms/combobox/combobox.class.js +2 -2
- package/dist/components/forms/input/time-input.class.d.ts +1 -1
- package/dist/components/forms/input/time-input.class.js +1 -1
- package/dist/components/forms/select/select.class.d.ts +1 -2
- package/dist/components/forms/swatch-picker/swatch-picker.class.d.ts +3 -1
- package/dist/components/forms/swatch-picker/swatch-picker.class.js +1 -1
- package/dist/components/layout/app-rail/app-rail-item.class.d.ts +3 -6
- package/dist/components/layout/app-rail/app-rail-item.class.js +1 -1
- package/dist/components/layout/app-rail/app-rail.class.d.ts +2 -4
- package/dist/components/layout/app-rail/app-rail.class.js +1 -1
- package/dist/components/layout/app-rail-group/app-rail-group.class.d.ts +2 -6
- package/dist/components/layout/app-rail-group/app-rail-group.class.js +1 -1
- package/dist/components/layout/carousel/carousel.class.d.ts +1 -4
- package/dist/components/layout/carousel/carousel.class.js +2 -2
- package/dist/components/layout/command-palette/command-palette.class.js +1 -1
- package/dist/components/layout/details/details.class.d.ts +2 -4
- package/dist/components/layout/details/details.class.js +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.d.ts +3 -7
- package/dist/components/layout/dock-panel/dock-panel.class.js +1 -1
- package/dist/components/layout/menu/menu.class.js +1 -1
- package/dist/components/layout/multi-split/multi-split.class.d.ts +2 -4
- package/dist/components/layout/multi-split/multi-split.class.js +1 -1
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.d.ts +2 -4
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
- package/dist/components/layout/reorder-list/reorder-item.class.d.ts +1 -4
- package/dist/components/layout/reorder-list/reorder-item.class.js +2 -2
- package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +5 -9
- package/dist/components/media/attachment-trigger/attachment-trigger.class.js +5 -5
- package/dist/components/media/av-player/av-player.class.js +3 -3
- package/dist/components/media/file-input/file-input.class.d.ts +3 -6
- package/dist/components/media/file-input/file-input.class.js +3 -3
- package/dist/components/media/lightbox/lightbox.class.d.ts +11 -20
- package/dist/components/media/lightbox/lightbox.class.js +1 -1
- package/dist/components/media/map/map-data-layers.d.ts +20 -0
- package/dist/components/media/map/map-data-layers.js +1 -0
- package/dist/components/media/map/map.class.js +3 -3
- package/dist/components/media/media-time.d.ts +2 -0
- package/dist/components/media/media-time.js +1 -0
- package/dist/components/media/video/video.class.js +5 -5
- package/dist/components/media/video-playlist/video-playlist.class.js +2 -2
- package/dist/components/overlays/callout/callout.class.d.ts +2 -5
- package/dist/components/overlays/callout/callout.class.js +2 -2
- package/dist/components/overlays/dialog/dialog.class.d.ts +4 -7
- package/dist/components/overlays/dialog/dialog.class.js +2 -2
- package/dist/components/overlays/overlay/dropdown.class.d.ts +5 -10
- package/dist/components/overlays/overlay/dropdown.class.js +2 -2
- package/dist/components/overlays/overlay/popover.class.d.ts +2 -3
- package/dist/components/overlays/popup/popup.class.js +1 -1
- package/dist/components/overlays/progress/progress-bar.class.d.ts +1 -4
- package/dist/components/overlays/progress/progress-bar.class.js +2 -2
- package/dist/components/overlays/progress/progress-ring.class.d.ts +1 -4
- package/dist/components/overlays/progress/progress-ring.class.js +2 -2
- package/dist/components/overlays/progress/progress-shared.d.ts +3 -3
- package/dist/components/overlays/progress/progress-shared.js +1 -1
- package/dist/components/overlays/toast/toast-item.class.js +1 -1
- package/dist/components/retrieval/graph/graph.class.d.ts +5 -10
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/knowledge-base/knowledge-base.class.d.ts +7 -14
- package/dist/components/retrieval/knowledge-base/knowledge-base.class.js +2 -3
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +2 -8
- package/dist/components/retrieval/memory-panel/memory-panel.class.js +0 -4
- package/dist/components/retrieval/rag-answer/rag-answer.class.js +1 -1
- package/dist/components/utility/export-button/export-button.class.d.ts +6 -10
- package/dist/components/utility/export-button/export-button.class.js +1 -1
- package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
- package/dist/components/viewers/geojson-view/geojson-view.class.d.ts +1 -1
- package/dist/components/viewers/highlight-layer/highlight-layer-timing.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +4 -4
- package/dist/events.d.ts +17 -78
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/css-motion-time.d.ts +7 -0
- package/dist/internal/css-motion-time.js +1 -0
- package/dist/internal/data-state-renderer.d.ts +1 -3
- package/dist/internal/data-state-renderer.js +1 -1
- package/dist/internal/localization-runtime.d.ts +2 -0
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/looks/data.css +1 -1
- package/dist/looks/terminal.css +1 -1
- package/dist/lyra.d.ts +1 -592
- package/dist/lyra.js +1 -1
- package/dist/testing/event-factory.d.ts +2 -2
- package/dist/testing/interaction-drivers.d.ts +5 -3
- package/dist/testing/lyra-tag-event-map.js +1 -1
- package/dist/theme/looks/data.d.ts +1 -1
- package/dist/theme/looks/data.js +1 -1
- package/dist/theme/looks/terminal.d.ts +1 -1
- package/dist/theme/looks/terminal.js +1 -1
- package/dist/theme/theme.d.ts +2 -80
- package/dist/theme/theme.js +1 -1
- package/llms/components/lr-agent-workspace.md +24 -2
- package/llms/components/lr-alert.md +1 -1
- package/llms/components/lr-animation.md +1 -1
- package/llms/components/lr-app-rail.md +8 -10
- package/llms/components/lr-approval-queue.md +2 -4
- package/llms/components/lr-attachment-trigger.md +3 -4
- package/llms/components/lr-badge.md +2 -2
- package/llms/components/lr-button.md +45 -99
- package/llms/components/lr-callout.md +3 -4
- package/llms/components/lr-carousel.md +3 -5
- package/llms/components/lr-chat-message.md +1 -2
- package/llms/components/lr-claim-evidence.md +1 -1
- package/llms/components/lr-code-block-core.md +2 -2
- package/llms/components/lr-code-block.md +5 -6
- package/llms/components/lr-color-picker.md +1 -1
- package/llms/components/lr-combobox.md +5 -6
- package/llms/components/lr-compare-panel.md +2 -4
- package/llms/components/lr-confirm-bar.md +3 -7
- package/llms/components/lr-context-inspector.md +3 -2
- package/llms/components/lr-context-menu.md +2 -2
- package/llms/components/lr-context-meter.md +2 -4
- package/llms/components/lr-copy-button.md +1 -1
- package/llms/components/lr-data-grid.md +4 -7
- package/llms/components/lr-details.md +3 -3
- package/llms/components/lr-dialog.md +4 -6
- package/llms/components/lr-dock-panel.md +5 -6
- package/llms/components/lr-document-library.md +5 -7
- package/llms/components/lr-drawer.md +3 -3
- package/llms/components/lr-dropdown.md +4 -5
- package/llms/components/lr-eval-run.md +3 -5
- package/llms/components/lr-export-button.md +4 -7
- package/llms/components/lr-file-input.md +0 -5
- package/llms/components/lr-funnel.md +1 -1
- package/llms/components/lr-graph.md +3 -7
- package/llms/components/lr-icon.md +1 -1
- package/llms/components/lr-include.md +1 -1
- package/llms/components/lr-input.md +31 -79
- package/llms/components/lr-json-viewer.md +1 -1
- package/llms/components/lr-knowledge-base.md +4 -6
- package/llms/components/lr-knowledge-graph-explorer.md +2 -5
- package/llms/components/lr-known-date.md +1 -1
- package/llms/components/lr-lightbox.md +9 -7
- package/llms/components/lr-lite-chart.md +1 -5
- package/llms/components/lr-markdown-core.md +3 -4
- package/llms/components/lr-markdown.md +3 -5
- package/llms/components/lr-mcp-app.md +1 -1
- package/llms/components/lr-message-actions.md +2 -3
- package/llms/components/lr-message-feedback.md +1 -3
- package/llms/components/lr-message-parts.md +4 -5
- package/llms/components/lr-multi-split.md +8 -7
- package/llms/components/lr-native-time-input.md +1 -1
- package/llms/components/lr-navigation-menu.md +5 -5
- package/llms/components/lr-number-input.md +3 -1
- package/llms/components/lr-otp-input.md +2 -0
- package/llms/components/lr-page.md +1 -1
- package/llms/components/lr-pan-zoom.md +1 -1
- package/llms/components/lr-phone-input.md +3 -1
- package/llms/components/lr-popover.md +2 -2
- package/llms/components/lr-progress-bar.md +3 -5
- package/llms/components/lr-progress-ring.md +5 -7
- package/llms/components/lr-prompt-input.md +1 -1
- package/llms/components/lr-prompt-queue.md +1 -1
- package/llms/components/lr-prompt-studio.md +1 -1
- package/llms/components/lr-rag-eval-dashboard.md +1 -1
- package/llms/components/lr-rating.md +2 -2
- package/llms/components/lr-realtime-session.md +1 -1
- package/llms/components/lr-reorder-item.md +1 -1
- package/llms/components/lr-reorder-list.md +2 -3
- package/llms/components/lr-retrieval-compare.md +1 -1
- package/llms/components/lr-select.md +3 -1
- package/llms/components/lr-selection-toolbar.md +1 -1
- package/llms/components/lr-sequence-strip.md +3 -8
- package/llms/components/lr-span-waterfall.md +1 -1
- package/llms/components/lr-split-panel.md +1 -1
- package/llms/components/lr-streaming-text-core.md +2 -1
- package/llms/components/lr-streaming-text.md +3 -2
- package/llms/components/lr-subagent-panel.md +1 -1
- package/llms/components/lr-swatch-picker.md +7 -6
- package/llms/components/lr-switch.md +3 -1
- package/llms/components/lr-table.md +33 -85
- package/llms/components/lr-terminal.md +2 -5
- package/llms/components/lr-textarea.md +1 -1
- package/llms/components/lr-thread-list.md +8 -14
- package/llms/components/lr-time-input.md +1 -1
- package/llms/components/lr-toggle-group.md +2 -2
- package/llms/components/lr-toggle.md +1 -1
- package/llms/components/lr-tool-approval-dialog.md +4 -7
- package/llms/components/lr-tool-call-block.md +1 -1
- package/llms/components/lr-tool-timeline.md +2 -5
- package/llms/components/lr-video-playlist.md +1 -1
- package/llms/components/lr-video.md +1 -1
- package/llms/components/lr-widget-renderer.md +7 -6
- package/llms/components/lr-zoomable-frame.md +1 -1
- package/llms/index.md +3 -618
- package/llms/migration.md +614 -614
- package/llms/shared/events-and-types.md +32 -31
- package/llms/shared/frameworks-and-ssr.md +7 -3
- package/llms/shared/imports-and-registration.md +22 -22
- package/llms/shared/localization-and-rtl.md +2 -2
- package/llms/shared/native-styles-and-utilities.md +263 -0
- package/llms/shared/styles-and-tokens.md +85 -676
- package/llms/shared/testing-and-utilities.md +12 -11
- package/llms/shared/v23-to-v24-migration.md +167 -0
- package/llms/shared.md +149 -494
- package/llms/tokens.md +3 -3
- package/llms.txt +9 -4
- package/package.json +7 -311
- package/registrations.json +1 -1
- package/vscode-html-data.json +1 -1
- package/web-types.json +1 -1
- package/dist/ssr-loader.d.ts +0 -2
- package/dist/ssr-loader.js +0 -1
- package/dist/theme/presets/shadcn.d.ts +0 -22
- package/dist/theme/presets/shadcn.js +0 -1
- package/dist/theme/presets.d.ts +0 -49
- package/dist/theme/presets.js +0 -1
- package/dist/themes/shadcn.css +0 -1
|
@@ -20,8 +20,8 @@ real component — instead of hand-rolling a `CustomEvent` and guessing its shap
|
|
|
20
20
|
```ts
|
|
21
21
|
import { createLyraEvent } from '@aceshooting/lyra-ui/testing';
|
|
22
22
|
|
|
23
|
-
const event = createLyraEvent('lr-confirm-bar', 'lr-approve', { args: null, waitUntil: () => {} });
|
|
24
|
-
event.cancelable; // true — lr-confirm-bar's own lr-approve call site is cancelable
|
|
23
|
+
const event = createLyraEvent('lr-confirm-bar', 'lr-approve-request', { args: null, waitUntil: () => {} });
|
|
24
|
+
event.cancelable; // true — lr-confirm-bar's own lr-approve-request call site is cancelable
|
|
25
25
|
target.dispatchEvent(event);
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -67,11 +67,14 @@ await activateStep(stepper, 'review'); // clicks the [part="step"] button for th
|
|
|
67
67
|
same `[part="option"]` row plus `data-value` delegated-click pattern for its own listbox/popup.
|
|
68
68
|
`submitConfirmDecision()`
|
|
69
69
|
accepts either `<lr-confirm-bar>` or `<lr-tool-approval-dialog>`, which render the identical
|
|
70
|
-
`[part="approve-button"]`/`[part="deny-button"]` pair
|
|
71
|
-
|
|
70
|
+
`[part="approve-button"]`/`[part="deny-button"]` pair and emit cancelable
|
|
71
|
+
`lr-approve-request`/`lr-deny-request` events. The driver awaits the component's render;
|
|
72
|
+
if a listener calls `preventDefault()` on either component, or `waitUntil()` on the confirm bar,
|
|
73
|
+
the action may still be pending when the driver returns.
|
|
72
74
|
|
|
73
75
|
Each driver is `async` and awaits `updateComplete` before returning, so assertions written
|
|
74
|
-
immediately after it see
|
|
76
|
+
immediately after it see the render reached by that interaction. Host-driven async decisions
|
|
77
|
+
still need their own completion check. Each driver also throws a plain `Error` — never a
|
|
75
78
|
silent no-op — when the requested interaction cannot actually happen: the target is disabled, the
|
|
76
79
|
option owner/stepper is read-only or has no matching row/step currently rendered, or the confirm
|
|
77
80
|
bar is already decided. That is the exact failure mode a hand-rolled event misses (for example
|
|
@@ -208,10 +211,8 @@ they carry no `tag`: `components/media/flag/flag-peer.js`,
|
|
|
208
211
|
stand in for. They are a separate array rather than tag-less rows mixed into `entries`, so a reader
|
|
209
212
|
that keys `entries` by `tag` keeps working; `integrations`, `distModule` and `localeKeys` are all
|
|
210
213
|
additive, which is why the schema version is unchanged. `registrationModule` is the `src/` path used
|
|
211
|
-
internally; `distModule` is
|
|
212
|
-
|
|
213
|
-
resolve the other without reading `src/` or walking `dist/` — for an integration bridge,
|
|
214
|
-
`distModule` equals `entry`, since there is no separate alias. `registers` is every `lr-*` tag
|
|
214
|
+
internally; `distModule` is a retained published specifier and equals the stable `entry` for v24
|
|
215
|
+
per-tag registrations and integration bridges. `registers` is every `lr-*` tag
|
|
215
216
|
importing `entry` defines, direct or transitive, derived from the same transitive-import analysis
|
|
216
217
|
`scripts/check-component-dependencies.mjs` already performs against the real registration graph
|
|
217
218
|
(not a second hand-maintained list). `localeKeys` is every `LyraMessageKey` the registered tags can
|
|
@@ -254,8 +255,8 @@ same way `all.js` registers its root-included tags (the package root itself regi
|
|
|
254
255
|
and want a single import; reach for the granular
|
|
255
256
|
`@aceshooting/lyra-ui/components/<tag>.js` path when you do not, because a barrel cannot be
|
|
256
257
|
tree-shaken down to the two elements you actually render. The tag-shaped path remains stable if a
|
|
257
|
-
component moves between Lyra's internal family folders
|
|
258
|
-
remain supported.
|
|
258
|
+
component moves between Lyra's internal family folders. Duplicate nested registration paths were
|
|
259
|
+
removed in v24; family barrels remain supported.
|
|
259
260
|
|
|
260
261
|
```js
|
|
261
262
|
import "@aceshooting/lyra-ui/components/forms"; // every form control
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Upgrading from v23 to v24
|
|
2
|
+
|
|
3
|
+
## Migration scope
|
|
4
|
+
|
|
5
|
+
This guide is for applications moving from Lyra UI 23 to v24. Keep the exact package version you
|
|
6
|
+
test pinned while you migrate, and verify its availability in the package registry before updating
|
|
7
|
+
production dependencies.
|
|
8
|
+
|
|
9
|
+
V24 keeps the public component tags and eight spellings needed to match current Web Awesome or
|
|
10
|
+
Shoelace contracts. It removes eligible deprecated Lyra compatibility surfaces and narrows module
|
|
11
|
+
entry points. The nested event-detail compatibility fields below are outside the 44-member
|
|
12
|
+
metadata-driven CLI cohort, so migrating their consumers requires event-specific review rather
|
|
13
|
+
than a broad property or event rewrite.
|
|
14
|
+
|
|
15
|
+
Use the generated [migration reference](../migration.md) for the exact v22 deprecation record,
|
|
16
|
+
replacement and warning by component. Use the focused guides below for the supported import,
|
|
17
|
+
styling, event and SSR contracts; this document is the project cleanup sequence, not a duplicate
|
|
18
|
+
member inventory.
|
|
19
|
+
|
|
20
|
+
## Migrate a project in reviewable steps
|
|
21
|
+
|
|
22
|
+
1. **Establish a clean comparison point.** Record the installed Lyra version, package manager lock,
|
|
23
|
+
entry modules, custom CSS, saved style-preference shape, locale registrations and framework type
|
|
24
|
+
declarations. Check `git status` and preserve unrelated edits. Use a branch or disposable
|
|
25
|
+
worktree so a generated codemod diff cannot overwrite in-progress application work.
|
|
26
|
+
2. **Upgrade only Lyra and its lockfile.** Install the exact v24 package build being evaluated and
|
|
27
|
+
confirm the resolved package version. Do not change unrelated dependencies as part of this step.
|
|
28
|
+
3. **Run the matching Lyra report before applying it.** From the project root, use the installed
|
|
29
|
+
CLI. A project moving from v23 uses `lyra-v22`; a project skipping from v21 should run the
|
|
30
|
+
historical `lyra-v21` and `lyra-v22` profiles in order. Those are separate origin profiles,
|
|
31
|
+
retained for their respective major-to-major contracts:
|
|
32
|
+
|
|
33
|
+
Set `LYRA_VERSION` to the exact v24 package version you installed. Supplying both the matching
|
|
34
|
+
package to `npx` and `--lyra-version` makes the profile's removal window explicit even when the
|
|
35
|
+
CLI itself is not in the project's local `node_modules`:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
LYRA_VERSION=24.0.0
|
|
39
|
+
npx --package "@aceshooting/lyra-ui@${LYRA_VERSION}" lyra-ui-migrate \
|
|
40
|
+
--lyra-version="${LYRA_VERSION}" --origin=lyra-v22 --dry-run \
|
|
41
|
+
--report=lyra-v22-preview.json src
|
|
42
|
+
npx --package "@aceshooting/lyra-ui@${LYRA_VERSION}" lyra-ui-migrate \
|
|
43
|
+
--lyra-version="${LYRA_VERSION}" --origin=lyra-v22 --check \
|
|
44
|
+
--report=lyra-v22-before.json src
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Review the report before writing. The CLI does not rewrite Lyra tags or imports, and it does not
|
|
48
|
+
translate style calls or arbitrary saved data. It applies only exact, declared member mappings
|
|
49
|
+
that preserve the target reach. For reports that require review, inspect the current component
|
|
50
|
+
contract and make the behavior-preserving application change yourself. A reviewed rename-profile
|
|
51
|
+
warning can be acknowledged with the documented `lyra-migrate-reviewed: CODE:name` comment on
|
|
52
|
+
the reported line (or immediately before the reported element); an acknowledgement records your
|
|
53
|
+
review, it does not perform a rewrite. Then apply the profile and check it again:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
npx --package "@aceshooting/lyra-ui@${LYRA_VERSION}" lyra-ui-migrate \
|
|
57
|
+
--lyra-version="${LYRA_VERSION}" --origin=lyra-v22 \
|
|
58
|
+
--report=lyra-v22-applied.json src
|
|
59
|
+
npx --package "@aceshooting/lyra-ui@${LYRA_VERSION}" lyra-ui-migrate \
|
|
60
|
+
--lyra-version="${LYRA_VERSION}" --origin=lyra-v22 --check \
|
|
61
|
+
--report=lyra-v22-after.json src
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`--check` never writes source files and exits nonzero while rewrites or unacknowledged warnings
|
|
65
|
+
remain. A clean second pass should report no changes. Keep the before/after reports with the
|
|
66
|
+
migration review if useful; do not treat a zero exit as proof that an unscanned dynamic use is
|
|
67
|
+
correct.
|
|
68
|
+
4. **Replace imports deliberately.** V24 no longer exports component constructors from the package
|
|
69
|
+
root, and removes duplicate nested registration entries. A stable tag registration remains
|
|
70
|
+
available; constructor values and constructor-owned types come from the registration-free
|
|
71
|
+
`.class.js` module. For example:
|
|
72
|
+
|
|
73
|
+
The old form was `import { LyraButton } from '@aceshooting/lyra-ui';`; the constructor is no
|
|
74
|
+
longer exported there. In v24, import the constructor or its types from this registration-free
|
|
75
|
+
family module instead:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import { LyraButton } from '@aceshooting/lyra-ui/components/forms/button/button.class.js';
|
|
79
|
+
|
|
80
|
+
// Browser registration: use the stable tag-shaped route.
|
|
81
|
+
import '@aceshooting/lyra-ui/components/lr-button.js';
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Keep utility and shared type imports from the curated package root where documented. Replace an
|
|
85
|
+
obsolete nested registration path with `components/lr-<tag>.js`; use `all.js` only when the page
|
|
86
|
+
intentionally needs the complete browser registration set. Do not replace class imports with
|
|
87
|
+
registration side effects when code needs a constructor, or vice versa. The [imports guide](./imports-and-registration.md)
|
|
88
|
+
lists the route shapes and [events and types guide](./events-and-types.md) explains component and
|
|
89
|
+
framework type paths.
|
|
90
|
+
5. **Split old combined SSR loading by environment.** `ssr-loader.js` is removed because it
|
|
91
|
+
combined browser hydration support and all registrations. In a hydrating browser, import
|
|
92
|
+
`@aceshooting/lyra-ui/hydration.js` before any module that can import Lit, then import the chosen
|
|
93
|
+
`components/lr-<tag>.js` registrations (or `all.js`). On the server, use
|
|
94
|
+
`@aceshooting/lyra-ui/ssr.js` for renderer helpers and diagnostics; import
|
|
95
|
+
`@aceshooting/lyra-ui/ssr/all.js` only when the server should register every tag. There is no
|
|
96
|
+
`server.js` replacement. Follow the [SSR guide](./frameworks-and-ssr.md#ssr-and-declarative-shadow-dom)
|
|
97
|
+
for renderer order, hydration diagnostics and per-tag SSR behavior.
|
|
98
|
+
6. **Move theme code to the independent style axes.** The old `setLyraTheme()` / `getLyraTheme()`
|
|
99
|
+
facade, preset exports and fixed Shadcn stylesheet are removed. Use `setLyraStyle()`,
|
|
100
|
+
`getLyraStyle()` and `resetLyraStyle()` from `@aceshooting/lyra-ui/theme.js`. Select a look,
|
|
101
|
+
surface treatment, density, color mode and accent as independent choices. Import
|
|
102
|
+
`@aceshooting/lyra-ui/theme.css`; for Shadcn also import
|
|
103
|
+
`@aceshooting/lyra-ui/looks/shadcn.css` and select `look: 'shadcn'`.
|
|
104
|
+
|
|
105
|
+
Review the values, not just the property names. The old `surface` color maps to the new
|
|
106
|
+
`accentBackground`; the new `surface` is the `solid` or `glass` treatment. Old `auto` mode maps
|
|
107
|
+
to `system`. Convert a token map into a registered custom `LyraLook` when it defines a reusable
|
|
108
|
+
complete visual identity, or into explicit `overrides` when it adjusts selected tokens. Replace
|
|
109
|
+
`data-lr-theme-preset` selectors with the specific `data-lr-look`, `data-lr-surface`,
|
|
110
|
+
`data-lr-density`, `data-lr-mode` or `data-lr-accent` axis they style. A color string that happens
|
|
111
|
+
to match a gemstone name remains a color; choose the explicit named accent only when that is what
|
|
112
|
+
the application means. Listen for `lr-style-change` and read `event.detail.style` and
|
|
113
|
+
`event.detail.changed`. Existing version-1 saved preference records remain readable, but callers
|
|
114
|
+
must move writes to the v24 style API. See [styles and tokens](./styles-and-tokens.md#composing-looks-surfaces-and-density)
|
|
115
|
+
for scope, persistence and look registration examples.
|
|
116
|
+
7. **Migrate the event-detail compatibility fields by behavior.** The 44 metadata-backed v24
|
|
117
|
+
member records (27 events, 15 properties and 2 attributes) are a separate cohort from these ten
|
|
118
|
+
deprecated detail-field declarations. These field changes are not automatic CLI rewrites. In
|
|
119
|
+
the v24 target, read canonical `expanded` instead: for old `open`, use `expanded` unchanged; for
|
|
120
|
+
old `collapsed`, use `!expanded`. Keep veto/request and committed-notification timing intact.
|
|
121
|
+
The host properties `open` and `collapsed` are separate APIs and are not affected by listener
|
|
122
|
+
detail migration. `ThreadGroupToggleDetail.expanded` remains optional in its declaration even
|
|
123
|
+
though the current runtime supplies it, so consumer typing should continue to account for
|
|
124
|
+
`undefined`. Review each event listener explicitly rather than applying a broad property rename
|
|
125
|
+
or event payload rewrite:
|
|
126
|
+
|
|
127
|
+
| Detail field declaration | Component tag and event name(s) | Relationship to `expanded` |
|
|
128
|
+
| --- | --- | --- |
|
|
129
|
+
| `LyraDetailsToggleDetail.open` | `lr-details` / `lr-toggle` | Same |
|
|
130
|
+
| `LyraMultiSplitToggleDetail.open` | `lr-multi-split` / `lr-toggle-request`, `lr-toggle` | Same |
|
|
131
|
+
| `LyraNavigationMenuToggleDetail.open` | `lr-navigation-menu-item` / `lr-toggle` | Same |
|
|
132
|
+
| `LyraDockPanelCollapseChangeDetail.collapsed` | `lr-dock-panel` / `lr-collapse-request`, `lr-collapse-change` | Inverse |
|
|
133
|
+
| `LyraAppRailItemToggleDetail.open` | `lr-app-rail-item` / `lr-toggle-request`, `lr-toggle` | Same |
|
|
134
|
+
| `LyraAppRailToggleDetail.open` | `lr-app-rail` / `lr-toggle-request`, `lr-toggle` | Same |
|
|
135
|
+
| `LyraAppRailGroupToggleDetail.open` | `lr-app-rail-group` / `lr-toggle-request`, `lr-toggle` | Same |
|
|
136
|
+
| `ThreadGroupToggleDetail.collapsed` | `lr-thread-list` / `lr-group-toggle-request`, `lr-group-toggle` | Inverse; `expanded?: boolean` stays optional |
|
|
137
|
+
| `ChatMessageToggleDetail.collapsed` | `lr-chat-message` / `lr-toggle-request`, `lr-toggle` | Inverse |
|
|
138
|
+
| `LyraCodeBlockToggleDetail.collapsed` | `lr-code-block` and `lr-code-block-core` / `lr-toggle-request`, `lr-toggle` | Inverse |
|
|
139
|
+
|
|
140
|
+
The table describes old detail reads and their canonical replacement. The event names themselves
|
|
141
|
+
remain; the compatibility detail fields are not host properties or deprecated event names. Test
|
|
142
|
+
the listener against the v24 `expanded` detail and preserve its old behavior, including inverse
|
|
143
|
+
handling for `collapsed` and veto/request semantics.
|
|
144
|
+
8. **Retire only application-owned dead compatibility work.** After the replacement behavior is
|
|
145
|
+
exercised, remove project-local shims that existed solely for the retired import, theme or event
|
|
146
|
+
surface; duplicated CSS declarations now provided by the selected look; obsolete preset
|
|
147
|
+
attributes/stylesheets; and dependencies used only by those wrappers. Search for old imports,
|
|
148
|
+
selectors, storage writers, event-detail fields and wrapper exports, then review each result in
|
|
149
|
+
context. Preserve unrelated application logic and domain behavior. Keep a wrapper if it still has
|
|
150
|
+
independent responsibilities.
|
|
151
|
+
9. **Verify the migrated application.** Run the project's typecheck and tests after importing the
|
|
152
|
+
generated `LyraComponentTypeMap` from `@aceshooting/lyra-ui/framework-types` where applicable.
|
|
153
|
+
Keep the React/Vue/Svelte declaration entry opt-in, and ensure registration imports are still
|
|
154
|
+
present because framework type declarations do not register elements. Recheck locale
|
|
155
|
+
registration and translated content, `dir="rtl"` behavior, light/dark/system mode, look and
|
|
156
|
+
surface scopes, forms and keyboard operation, SSR markup and hydration, and any persisted
|
|
157
|
+
preferences used by the app. Review CSS selectors and screenshots for obsolete aliases, then
|
|
158
|
+
inspect the complete source and lockfile diff. Update behavior-specific tests, not just import
|
|
159
|
+
snapshots.
|
|
160
|
+
|
|
161
|
+
The 44 v24 member removals and all held upstream spellings are described by the generated
|
|
162
|
+
per-component migration reference and metadata. Eight names remain protected for upstream parity;
|
|
163
|
+
keep them when migrating and do not remove them by global search-and-replace. V24 builds on the 399
|
|
164
|
+
v23 compatibility removals; it does not restore those older spellings. The `lyra-v21` and
|
|
165
|
+
`lyra-v22` profiles remain distinct historical upgrade paths, not a single new cross-major rewrite.
|
|
166
|
+
For current import, style, SSR, locale and framework contracts, follow the focused guides linked
|
|
167
|
+
above.
|