@aceshooting/lyra-ui 16.0.0 → 18.0.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 +758 -0
- package/README.md +2 -2
- package/custom-elements.json +1 -1
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/agent-tools/browser-frame/browser-frame.class.d.ts +3 -3
- package/dist/components/agent-tools/browser-frame/browser-frame.class.js +2 -2
- package/dist/components/agent-tools/compare-panel/compare-panel.class.d.ts +2 -2
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js +3 -3
- package/dist/components/agent-tools/confirm-bar/confirm-bar.class.d.ts +37 -13
- package/dist/components/agent-tools/confirm-bar/confirm-bar.class.js +2 -2
- package/dist/components/agent-tools/task-list/task-list.class.js +2 -2
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +4 -0
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +2 -2
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.d.ts +3 -3
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +117 -17
- package/dist/components/charts/chart/chart.class.js +3 -3
- package/dist/components/charts/chart/histogram-bin.d.ts +5 -1
- package/dist/components/charts/chart/histogram-bin.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.d.ts +9 -0
- package/dist/components/conversation/code-block/code-block.styles.js +1 -1
- package/dist/components/conversation/message-actions/message-actions.styles.js +1 -1
- package/dist/components/conversation/model-select/model-select.class.d.ts +13 -4
- package/dist/components/conversation/model-select/model-select.class.js +2 -1
- package/dist/components/conversation/model-select/model-select.styles.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +40 -2
- package/dist/components/conversation/streaming-text/streaming-text-base.class.js +2 -2
- package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +27 -3
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +11 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +31 -3
- package/dist/components/conversation/streaming-text/streaming-text.class.js +11 -0
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +30 -2
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +4 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.js +1 -1
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
- package/dist/components/conversation/usage-badge/usage-badge-overlay-runtime.js +1 -1
- package/dist/components/conversation/usage-badge/usage-badge.class.d.ts +4 -0
- package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +16 -4
- package/dist/components/conversation/voice-picker/voice-picker.class.js +2 -1
- package/dist/components/conversation/voice-picker/voice-picker.styles.js +1 -1
- package/dist/components/data/context-meter/context-meter.class.d.ts +23 -4
- package/dist/components/data/context-meter/context-meter.class.js +10 -7
- package/dist/components/data/context-meter/context-meter.styles.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +5 -2
- package/dist/components/data/data-grid/data-grid.class.js +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +32 -5
- package/dist/components/data/flow-canvas/flow-canvas.class.js +3 -1
- package/dist/components/data/flow-canvas/flow-canvas.styles.js +1 -1
- package/dist/components/data/flow-canvas/flow-model.js +1 -1
- package/dist/components/data/flow-canvas/flow-types.d.ts +10 -1
- package/dist/components/data/gauge/gauge.class.d.ts +15 -2
- package/dist/components/data/gauge/gauge.class.js +20 -20
- package/dist/components/data/gauge/gauge.styles.js +1 -1
- package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +14 -5
- package/dist/components/data/graph-query-builder/graph-query-builder.class.js +2 -2
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +28 -2
- package/dist/components/data/sequence-strip/sequence-strip.class.js +3 -2
- package/dist/components/data/sequence-strip/sequence-strip.styles.js +1 -1
- package/dist/components/data/table/table.class.d.ts +155 -30
- package/dist/components/data/table/table.class.js +6 -4
- package/dist/components/data/table/table.styles.js +1 -1
- package/dist/components/data/timeline/timeline-item.class.d.ts +9 -1
- package/dist/components/data/timeline/timeline-item.class.js +2 -2
- package/dist/components/data/word-cloud/word-cloud.class.js +1 -1
- package/dist/components/data/word-cloud/word-cloud.styles.js +1 -1
- package/dist/components/forms/button/button.class.d.ts +30 -1
- package/dist/components/forms/button/button.class.js +2 -2
- package/dist/components/forms/checkbox/checkbox.class.d.ts +8 -6
- package/dist/components/forms/checkbox/checkbox.class.js +2 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +7 -5
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/color-picker/color-picker.class.d.ts +16 -2
- package/dist/components/forms/color-picker/color-picker.class.js +2 -2
- package/dist/components/forms/color-picker/color-picker.styles.js +1 -1
- package/dist/components/forms/combobox/combobox.class.d.ts +52 -7
- package/dist/components/forms/combobox/combobox.class.js +2 -2
- package/dist/components/forms/combobox/combobox.styles.js +1 -1
- package/dist/components/forms/date-picker/date-input.class.d.ts +4 -0
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +20 -3
- package/dist/components/forms/icon-button/icon-button.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.styles.js +1 -1
- package/dist/components/forms/input/input.class.d.ts +5 -2
- package/dist/components/forms/input/input.class.js +1 -1
- package/dist/components/forms/input/time-input.class.d.ts +4 -0
- package/dist/components/forms/input/time-input.class.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +11 -5
- package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
- package/dist/components/forms/otp-input/otp-input.class.d.ts +7 -2
- package/dist/components/forms/otp-input/otp-input.class.js +2 -2
- package/dist/components/forms/radio/radio-button.class.d.ts +2 -1
- package/dist/components/forms/radio/radio-group.class.d.ts +9 -4
- package/dist/components/forms/radio/radio-group.class.js +1 -1
- package/dist/components/forms/radio/radio.class.d.ts +13 -7
- package/dist/components/forms/radio/radio.class.js +1 -1
- package/dist/components/forms/rubric-form/rubric-form.class.d.ts +16 -6
- package/dist/components/forms/rubric-form/rubric-form.class.js +2 -2
- package/dist/components/forms/select/select.class.d.ts +50 -13
- package/dist/components/forms/select/select.class.js +2 -2
- package/dist/components/forms/slider/slider.class.d.ts +4 -2
- package/dist/components/forms/slider/slider.class.js +1 -1
- package/dist/components/forms/switch/switch.class.d.ts +8 -6
- package/dist/components/forms/switch/switch.class.js +1 -1
- package/dist/components/forms/textarea/textarea.class.d.ts +5 -3
- package/dist/components/forms/textarea/textarea.class.js +1 -1
- package/dist/components/forms/time-range/time-range.class.d.ts +12 -7
- package/dist/components/forms/time-range/time-range.class.js +1 -1
- package/dist/components/forms/time-range/time-range.styles.js +1 -1
- package/dist/components/forms/token-input/token-input.class.d.ts +6 -4
- package/dist/components/forms/token-input/token-input.class.js +1 -1
- package/dist/components/layout/app-rail/app-rail-item.class.d.ts +109 -4
- package/dist/components/layout/app-rail/app-rail-item.class.js +34 -29
- package/dist/components/layout/app-rail/app-rail-item.styles.js +1 -1
- package/dist/components/layout/app-rail/app-rail.class.d.ts +25 -3
- package/dist/components/layout/app-rail/app-rail.styles.js +1 -1
- package/dist/components/layout/app-rail-group/app-rail-group.class.d.ts +2 -2
- package/dist/components/layout/app-rail-group/app-rail-group.class.js +2 -2
- package/dist/components/layout/carousel/carousel.class.d.ts +1 -1
- package/dist/components/layout/carousel/carousel.class.js +1 -1
- package/dist/components/layout/details/accordion.class.d.ts +2 -2
- package/dist/components/layout/details/accordion.class.js +2 -2
- package/dist/components/layout/filter-bar/filter-bar-register.d.ts +1 -0
- package/dist/components/layout/filter-bar/filter-bar-register.js +1 -0
- package/dist/components/layout/filter-bar/filter-bar.class.d.ts +153 -16
- package/dist/components/layout/filter-bar/filter-bar.class.js +8 -5
- package/dist/components/layout/menu/menu-item.class.d.ts +3 -3
- package/dist/components/layout/menu/menu-item.class.js +3 -3
- package/dist/components/layout/menu/menu.class.d.ts +5 -1
- package/dist/components/layout/menu/menu.class.js +2 -2
- package/dist/components/layout/reorder-list/reorder-item.styles.js +1 -1
- package/dist/components/layout/reorder-list/reorder-list.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +107 -2
- package/dist/components/layout/virtual-list/virtual-list.class.js +12 -7
- package/dist/components/media/attachment-trigger/attachment-trigger.styles.js +1 -1
- package/dist/components/media/avatar-group/avatar-group.class.d.ts +12 -1
- package/dist/components/media/avatar-group/avatar-group.class.js +2 -2
- package/dist/components/media/drop-zone/drop-zone.class.d.ts +32 -11
- package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
- package/dist/components/media/file-input/file-input.class.d.ts +40 -19
- package/dist/components/media/file-input/file-input.class.js +2 -2
- package/dist/components/media/map/map.class.d.ts +138 -12
- package/dist/components/media/map/map.class.js +25 -20
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/components/overlays/callout/callout.styles.js +1 -1
- package/dist/components/overlays/dialog/dialog.styles.js +1 -1
- package/dist/components/overlays/overlay/dropdown.class.d.ts +13 -3
- package/dist/components/overlays/overlay/dropdown.class.js +2 -2
- package/dist/components/overlays/overlay/popover.class.d.ts +12 -3
- package/dist/components/overlays/overlay/popover.class.js +2 -2
- package/dist/components/overlays/rating/rating.class.d.ts +9 -7
- package/dist/components/overlays/rating/rating.class.js +1 -1
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +5 -1
- package/dist/components/retrieval/citation-badge/citation-badge.class.js +1 -1
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.styles.js +1 -1
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +5 -1
- package/dist/components/retrieval/entity-chip/entity-chip.class.js +1 -1
- package/dist/components/retrieval/graph-legend/graph-legend.styles.js +1 -1
- package/dist/components/retrieval/retrieval-value-format.js +1 -1
- package/dist/components/retrieval/source-list/source-list.styles.js +1 -1
- package/dist/components/utility/copy-button/copy-button.class.d.ts +23 -11
- package/dist/components/utility/copy-button/copy-button.class.js +2 -2
- package/dist/components/utility/copy-button/copy-button.styles.js +1 -1
- package/dist/components/utility/diff-view/diff-view.styles.js +1 -1
- package/dist/components/utility/export-button/export-button.class.d.ts +4 -0
- package/dist/components/utility/export-button/export-button.class.js +1 -1
- package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
- package/dist/components/utility/known-date/known-date.class.js +1 -1
- package/dist/components/utility/mention-popover/mention-popover.class.d.ts +38 -3
- package/dist/components/utility/mention-popover/mention-popover.class.js +2 -1
- package/dist/components/utility/mention-popover/mention-popover.styles.js +1 -1
- package/dist/components/utility/poll-status/poll-status.styles.js +1 -1
- package/dist/components/utility/tour/tour.class.d.ts +4 -0
- package/dist/components/utility/tour/tour.class.js +1 -1
- package/dist/components/utility/tour/tour.styles.js +1 -1
- package/dist/components/viewers/document-preview/document-preview.class.js +2 -2
- package/dist/components/viewers/docx-viewer/docx-viewer.class.js +2 -2
- package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +2 -2
- package/dist/components/viewers/highlight-layer/highlight-layer.class.js +2 -2
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
- package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +2 -2
- package/dist/components/viewers/xml-viewer/xml-viewer.class.js +2 -2
- package/dist/custom-elements-jsx.d.ts +2 -2
- package/dist/events.d.ts +20 -13
- package/dist/internal/aggregate-file-limits.d.ts +33 -0
- package/dist/internal/aggregate-file-limits.js +1 -0
- package/dist/internal/catalog-picker.d.ts +15 -2
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/debounce-controller.d.ts +14 -0
- package/dist/internal/debounce-controller.js +1 -1
- package/dist/internal/default-strings.generated.d.ts +1 -1
- package/dist/internal/default-strings.generated.js +2 -2
- package/dist/internal/focus-navigation.d.ts +45 -0
- package/dist/internal/focus-navigation.js +1 -1
- package/dist/internal/form-associated.js +1 -1
- package/dist/internal/initial-slot-collection.d.ts +30 -0
- package/dist/internal/initial-slot-collection.js +1 -0
- package/dist/internal/intl-cache.js +1 -1
- package/dist/internal/invalid-event-alias.d.ts +46 -0
- package/dist/internal/invalid-event-alias.js +1 -1
- package/dist/internal/localization-runtime.d.ts +24 -0
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/positioning-strategy.d.ts +3 -1
- package/dist/internal/state-part.d.ts +49 -0
- package/dist/internal/state-part.js +1 -0
- package/dist/internal/variants.styles.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/lyra.js +1 -1
- package/dist/svelte.d.ts +2 -2
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/lyra-tag-event-map.d.ts +2 -2
- package/dist/testing/lyra-tag-event-map.js +1 -1
- package/dist/testing/wait-for-mount.d.ts +46 -0
- package/dist/testing/wait-for-mount.js +1 -0
- package/dist/theme/theme-bootstrap.js +1 -1
- package/dist/theme/theme.d.ts +11 -2
- package/dist/theme/theme.js +1 -1
- package/dist/translations/ar/layout.js +1 -1
- package/dist/translations/ar/retrieval.js +1 -1
- package/dist/translations/ar/shared.js +1 -1
- package/dist/translations/de/layout.js +1 -1
- package/dist/translations/de/retrieval.js +1 -1
- package/dist/translations/de/shared.js +1 -1
- package/dist/translations/es/layout.js +1 -1
- package/dist/translations/es/retrieval.js +1 -1
- package/dist/translations/es/shared.js +1 -1
- package/dist/translations/fa/layout.js +1 -1
- package/dist/translations/fa/retrieval.js +1 -1
- package/dist/translations/fa/shared.js +1 -1
- package/dist/translations/fr/layout.js +1 -1
- package/dist/translations/fr/retrieval.js +1 -1
- package/dist/translations/fr/shared.js +1 -1
- package/dist/translations/he/layout.js +1 -1
- package/dist/translations/he/retrieval.js +1 -1
- package/dist/translations/he/shared.js +1 -1
- package/dist/translations/it/layout.js +1 -1
- package/dist/translations/it/retrieval.js +1 -1
- package/dist/translations/it/shared.js +1 -1
- package/dist/translations/ja/layout.js +1 -1
- package/dist/translations/ja/retrieval.js +1 -1
- package/dist/translations/ja/shared.js +1 -1
- package/dist/translations/pt-BR/layout.js +1 -1
- package/dist/translations/pt-BR/retrieval.js +1 -1
- package/dist/translations/pt-BR/shared.js +1 -1
- package/dist/translations/ro/agent-tools.d.ts +1 -0
- package/dist/translations/ro/agent-tools.js +1 -0
- package/dist/translations/ro/charts.d.ts +1 -0
- package/dist/translations/ro/charts.js +1 -0
- package/dist/translations/ro/conversation.d.ts +1 -0
- package/dist/translations/ro/conversation.js +1 -0
- package/dist/translations/ro/data.d.ts +1 -0
- package/dist/translations/ro/data.js +1 -0
- package/dist/translations/ro/forms.d.ts +1 -0
- package/dist/translations/ro/forms.js +1 -0
- package/dist/translations/ro/layout.d.ts +1 -0
- package/dist/translations/ro/layout.js +1 -0
- package/dist/translations/ro/media.d.ts +1 -0
- package/dist/translations/ro/media.js +1 -0
- package/dist/translations/ro/overlays.d.ts +1 -0
- package/dist/translations/ro/overlays.js +1 -0
- package/dist/translations/ro/retrieval.d.ts +1 -0
- package/dist/translations/ro/retrieval.js +1 -0
- package/dist/translations/ro/shared.d.ts +1 -0
- package/dist/translations/ro/shared.js +1 -0
- package/dist/translations/ro/utility.d.ts +1 -0
- package/dist/translations/ro/utility.js +1 -0
- package/dist/translations/ro/viewers.d.ts +1 -0
- package/dist/translations/ro/viewers.js +5 -0
- package/dist/translations/ro.d.ts +1 -0
- package/dist/translations/ro.js +1 -0
- package/dist/translations/ru/layout.js +1 -1
- package/dist/translations/ru/retrieval.js +1 -1
- package/dist/translations/ru/shared.js +1 -1
- package/dist/translations/zh-CN/layout.js +1 -1
- package/dist/translations/zh-CN/retrieval.js +1 -1
- package/dist/translations/zh-CN/shared.js +1 -1
- package/dist/utilities/format.d.ts +17 -0
- package/dist/utilities/format.js +1 -1
- package/dist/vue.d.ts +2 -2
- package/llms/components/lr-app-rail-group.md +87 -10
- package/llms/components/lr-app-rail-item.md +88 -11
- package/llms/components/lr-app-rail.md +88 -11
- package/llms/components/lr-attachment-trigger.md +21 -0
- package/llms/components/lr-bar-chart.md +3 -2
- package/llms/components/lr-bubble-chart.md +3 -2
- package/llms/components/lr-button.md +5 -4
- package/llms/components/lr-callout.md +10 -0
- package/llms/components/lr-card.md +2 -1
- package/llms/components/lr-chart.md +43 -12
- package/llms/components/lr-citation-badge.md +7 -1
- package/llms/components/lr-code-block.md +21 -0
- package/llms/components/lr-color-picker.md +12 -7
- package/llms/components/lr-combobox.md +20 -1
- package/llms/components/lr-confirm-bar.md +36 -7
- package/llms/components/lr-context-meter.md +17 -4
- package/llms/components/lr-date-input.md +7 -1
- package/llms/components/lr-date-picker.md +6 -0
- package/llms/components/lr-dialog.md +21 -0
- package/llms/components/lr-doughnut-chart.md +3 -2
- package/llms/components/lr-drawer.md +10 -0
- package/llms/components/lr-drop-zone.md +16 -7
- package/llms/components/lr-dropdown-item.md +7 -0
- package/llms/components/lr-entity-chip.md +7 -1
- package/llms/components/lr-export-button.md +7 -1
- package/llms/components/lr-file-input.md +21 -10
- package/llms/components/lr-filter-bar.md +177 -18
- package/llms/components/lr-flow-canvas.md +16 -9
- package/llms/components/lr-gauge.md +22 -2
- package/llms/components/lr-histogram.md +7 -2
- package/llms/components/lr-icon-button.md +17 -8
- package/llms/components/lr-input.md +3 -1
- package/llms/components/lr-line-chart.md +3 -2
- package/llms/components/lr-lite-chart.md +13 -0
- package/llms/components/lr-locale-picker.md +7 -1
- package/llms/components/lr-map.md +63 -6
- package/llms/components/lr-mention-popover.md +16 -3
- package/llms/components/lr-menu-item.md +7 -0
- package/llms/components/lr-menu.md +8 -1
- package/llms/components/lr-message-actions.md +10 -0
- package/llms/components/lr-model-select.md +8 -3
- package/llms/components/lr-native-time-input.md +8 -1
- package/llms/components/lr-number-input.md +8 -1
- package/llms/components/lr-option.md +19 -0
- package/llms/components/lr-otp-input.md +6 -0
- package/llms/components/lr-pie-chart.md +3 -2
- package/llms/components/lr-polar-area-chart.md +3 -2
- package/llms/components/lr-prompt-input.md +2 -2
- package/llms/components/lr-radar-chart.md +3 -2
- package/llms/components/lr-reorder-item.md +12 -0
- package/llms/components/lr-reorder-list.md +12 -0
- package/llms/components/lr-scatter-chart.md +3 -2
- package/llms/components/lr-select.md +19 -2
- package/llms/components/lr-sequence-strip.md +10 -4
- package/llms/components/lr-streaming-text-core.md +28 -11
- package/llms/components/lr-streaming-text.md +41 -6
- package/llms/components/lr-suggestion-chips.md +8 -4
- package/llms/components/lr-table.md +47 -10
- package/llms/components/lr-textarea.md +1 -1
- package/llms/components/lr-time-input.md +7 -1
- package/llms/components/lr-tool-call-chip.md +7 -1
- package/llms/components/lr-tour.md +7 -1
- package/llms/components/lr-usage-badge.md +7 -1
- package/llms/components/lr-virtual-list.md +53 -0
- package/llms/components/lr-voice-picker.md +7 -3
- package/llms/shared.md +175 -19
- package/llms/tokens.md +17 -1
- package/llms-full.txt +1214 -169
- package/package.json +43 -3
- package/registrations.json +1 -1
- package/vscode-css-data.json +1 -1
- package/vscode-html-data.json +1 -1
- package/web-types.json +1 -1
package/llms/shared.md
CHANGED
|
@@ -177,8 +177,9 @@ The entry points, then:
|
|
|
177
177
|
`@aceshooting/lyra-ui/translations/<locale>.js` (the eleven shipped message catalogs),
|
|
178
178
|
`@aceshooting/lyra-ui/events` (the global typed-event map — types only, no runtime),
|
|
179
179
|
`@aceshooting/lyra-ui/ai` (provider-neutral data types), `@aceshooting/lyra-ui/testing`
|
|
180
|
-
(happy-dom shims, `createLyraEvent()` for building a validated test event,
|
|
181
|
-
interaction drivers that go through a component's own real activation path
|
|
180
|
+
(happy-dom shims, `createLyraEvent()` for building a validated test event, a small set of
|
|
181
|
+
interaction drivers that go through a component's own real activation path, and
|
|
182
|
+
`waitForLyraElement()`/`waitForToast()` for awaiting a lazily registered mount),
|
|
182
183
|
`@aceshooting/lyra-ui/utilities/*` (the curated shared helpers, all documented below).
|
|
183
184
|
|
|
184
185
|
### Registration-free component helpers
|
|
@@ -1366,9 +1367,50 @@ per-response nonce — a static HTML entry, for example — where the documented
|
|
|
1366
1367
|
nonce/hash guidance above does not apply. Serving it same-origin (copy it into your build output,
|
|
1367
1368
|
or configure your bundler/static host to do so) needs no hash at all; hashing it for an even
|
|
1368
1369
|
stricter policy uses the same CSP `script-src` hash mechanism browsers already apply to any
|
|
1369
|
-
external script resource.
|
|
1370
|
-
|
|
1371
|
-
|
|
1370
|
+
external script resource.
|
|
1371
|
+
|
|
1372
|
+
**Configuring the static asset from its own `<script>` tag.** `theme-bootstrap.js` must be loaded
|
|
1373
|
+
as a plain classic script — never `type="module"` and never `async` — because it reads its own
|
|
1374
|
+
configuration synchronously through `document.currentScript` while it runs, and that property is
|
|
1375
|
+
`null` for both of those loading modes (as well as for anything scheduled after the script has
|
|
1376
|
+
already finished executing). Two optional attributes on that same `<script>` tag override the
|
|
1377
|
+
defaults without regenerating the file:
|
|
1378
|
+
|
|
1379
|
+
```html
|
|
1380
|
+
<head>
|
|
1381
|
+
<script
|
|
1382
|
+
src="/vendor/theme-bootstrap.js"
|
|
1383
|
+
data-lr-theme-storage-key="my-app-theme"
|
|
1384
|
+
data-lr-theme-attributes="data-lr-theme data-theme"
|
|
1385
|
+
></script>
|
|
1386
|
+
<link rel="stylesheet" href="/theme.css" />
|
|
1387
|
+
</head>
|
|
1388
|
+
```
|
|
1389
|
+
|
|
1390
|
+
- `data-lr-theme-storage-key` — the `localStorage` key to read, in place of the default
|
|
1391
|
+
`'lyra-theme'`. Equivalent to `createLyraThemeBootstrap({ storageKey })`'s argument, but
|
|
1392
|
+
resolved by the static file itself at parse time rather than baked in ahead of time. This is
|
|
1393
|
+
what lets an application with its own pre-existing storage key use the static asset instead of
|
|
1394
|
+
inlining a per-app copy.
|
|
1395
|
+
- `data-lr-theme-attributes` — a space-separated list of attribute names to set on
|
|
1396
|
+
`<html>` in place of the default `data-lr-theme data-theme` pair, replacing that list entirely
|
|
1397
|
+
rather than adding to it.
|
|
1398
|
+
|
|
1399
|
+
Both attributes are optional and independently validated; an absent, empty, oversized, or
|
|
1400
|
+
malformed value falls back to the built-in default rather than throwing, so a `<script>` tag with
|
|
1401
|
+
neither attribute — every existing deployment — behaves exactly as before. `data-lr-theme-storage-key`
|
|
1402
|
+
must be a non-empty string of at most 200 characters (its content is otherwise unrestricted — it is
|
|
1403
|
+
only ever used as an opaque `localStorage` key, never written to the DOM). `data-lr-theme-attributes`
|
|
1404
|
+
must parse to one to eight tokens, each unique and each matching `data-[a-z0-9]+(-[a-z0-9]+)*` —
|
|
1405
|
+
which rejects an event-handler name (`onload`), a native attribute (`style`, `class`, `id`), any
|
|
1406
|
+
token containing whitespace, a quote, `=`, or a control character, an empty list, and a duplicated
|
|
1407
|
+
token — because these attribute names reach `setAttribute()`/`removeAttribute()` on the document
|
|
1408
|
+
root. A `document.currentScript` of `null` (module/async misuse, or a script tag re-read after it
|
|
1409
|
+
finished running) is treated the same as no configuration at all.
|
|
1410
|
+
|
|
1411
|
+
An application-owned key from `createLyraThemeBootstrap({ storageKey })` can still be inlined as
|
|
1412
|
+
documented above; the static file's own script-tag attributes are the alternative for a strict-CSP
|
|
1413
|
+
deployment that cannot inline that call.
|
|
1372
1414
|
|
|
1373
1415
|
**Migrating from 15.x.** `accent` used to be exactly an absolute CSS color or `null`; that shape
|
|
1374
1416
|
still works unchanged (`setLyraTheme({ accent: '#7c3aed' })` keeps deriving only the brand ramp).
|
|
@@ -1727,8 +1769,8 @@ silently defeats a registered catalog — omit it, or pass `undefined`.
|
|
|
1727
1769
|
|
|
1728
1770
|
### Ready-made catalogs: `@aceshooting/lyra-ui/translations/<locale>.js`
|
|
1729
1771
|
|
|
1730
|
-
|
|
1731
|
-
`pt-BR`, `ru`, `zh-CN`** — each covering every key in `LYRA_DEFAULT_STRINGS`. They are
|
|
1772
|
+
Twelve full catalogs ship with the package — **`ar`, `de`, `es`, `fa`, `fr`, `he`, `it`, `ja`,
|
|
1773
|
+
`pt-BR`, `ro`, `ru`, `zh-CN`** — each covering every key in `LYRA_DEFAULT_STRINGS`. They are
|
|
1732
1774
|
**side-effect-only modules**: import one bare, read nothing from it, and it calls
|
|
1733
1775
|
`registerLyraLocale()` for you.
|
|
1734
1776
|
|
|
@@ -1739,11 +1781,14 @@ import "@aceshooting/lyra-ui/translations/fa.js"; // fa-IR falls back to this ba
|
|
|
1739
1781
|
import "@aceshooting/lyra-ui/translations/he.js"; // he-IL falls back to this base catalog
|
|
1740
1782
|
import "@aceshooting/lyra-ui/translations/it.js"; // Italian
|
|
1741
1783
|
import "@aceshooting/lyra-ui/translations/pt-BR.js"; // also serves pt and pt-PT
|
|
1784
|
+
import "@aceshooting/lyra-ui/translations/ro.js"; // Romanian
|
|
1742
1785
|
import "@aceshooting/lyra-ui/translations/zh-CN.js"; // also serves zh, zh-Hans and zh-Hans-CN
|
|
1743
1786
|
```
|
|
1744
1787
|
|
|
1745
1788
|
Persian and Hebrew use CLDR plural categories (`fa`: `one`/`other`; `he`:
|
|
1746
|
-
`one`/`two`/`other`); Italian uses a non-default set too (`it`: `one`/`many`/`other`)
|
|
1789
|
+
`one`/`two`/`other`); Italian uses a non-default set too (`it`: `one`/`many`/`other`), and so does
|
|
1790
|
+
Romanian (`ro`: `one`/`few`/`other`, where `few` covers `0` and `2`-`19` and `other` is the
|
|
1791
|
+
`de`-requiring form from `20` upward). `ar`, `fa`
|
|
1747
1792
|
and `he` declare `dir: 'rtl'`, so `getLyraLocaleDirection()`
|
|
1748
1793
|
answers for them (and for `ar-EG`, `fa-IR`, `he-IL`) — but locale selection still does not _force_
|
|
1749
1794
|
writing direction: set `dir="rtl"` on the page or an ancestor yourself.
|
|
@@ -2110,6 +2155,83 @@ happy-dom/jsdom environment, not only a real browser.
|
|
|
2110
2155
|
Scope: one driver per interaction named above. Not a general "drive any component" toolkit —
|
|
2111
2156
|
render the real component and interact with it directly for anything else.
|
|
2112
2157
|
|
|
2158
|
+
## Awaiting a lazily registered mount: `waitForLyraElement()` and `waitForToast()`
|
|
2159
|
+
|
|
2160
|
+
An imperative API can register its elements lazily -- `toast()` dynamically `import()`s
|
|
2161
|
+
`<lr-toast>`/`<lr-toast-item>` on first call (a deliberate bundle-size trade: importing the package
|
|
2162
|
+
root, or even `toast()` itself, never pulls the element classes into an eagerly loaded bundle). A
|
|
2163
|
+
fire-and-forget `toast(...)` call -- the normal application pattern, since a component should not
|
|
2164
|
+
block its own flow on a toast -- therefore leaves the document empty for at least one microtask
|
|
2165
|
+
after the call returns. `@aceshooting/lyra-ui/testing` exports `waitForLyraElement()` for this shape
|
|
2166
|
+
in general, plus `waitForToast()` as the named convenience for `toast()` specifically:
|
|
2167
|
+
|
|
2168
|
+
```ts
|
|
2169
|
+
import { waitForToast } from '@aceshooting/lyra-ui/testing';
|
|
2170
|
+
|
|
2171
|
+
toast('Saved'); // fire-and-forget; toast.class.js/toast-item.class.js may still be importing
|
|
2172
|
+
const item = await waitForToast('Saved'); // resolves once a matching <lr-toast-item> mounts
|
|
2173
|
+
expect(item.textContent?.trim()).to.equal('Saved');
|
|
2174
|
+
```
|
|
2175
|
+
|
|
2176
|
+
`waitForToast(match?, options?)` resolves once a `<lr-toast-item>` is connected and upgraded. A
|
|
2177
|
+
string `match` compares against the item's trimmed `textContent` (what `toast('Saved')` sets
|
|
2178
|
+
verbatim); pass a predicate — `(item: LyraToastItem) => boolean` — for anything else (a substring,
|
|
2179
|
+
an icon/action check, a specific variant); omitting `match` resolves the first toast item to mount.
|
|
2180
|
+
|
|
2181
|
+
The underlying `waitForLyraElement<T>(selector, options?)` is generic over any element reachable
|
|
2182
|
+
from `options.root` (`document` by default): it resolves once an element matching `selector` is
|
|
2183
|
+
both connected and upgraded — registered with a constructor the element is actually an instance of
|
|
2184
|
+
— filtered further by an optional `options.match: (element: T) => boolean`. An element already
|
|
2185
|
+
present in markup before its class registers (the SSR/hydration case) is not a match until it
|
|
2186
|
+
upgrades. Both resolve via `MutationObserver` (new elements arriving) and
|
|
2187
|
+
`customElements.whenDefined()` (an already-connected-but-undefined element finishing registration)
|
|
2188
|
+
rather than polling on a timer, and both reject with an Error describing the selector, the timeout,
|
|
2189
|
+
and how many non-matching candidates were found — after a bounded `options.timeoutMs` (2000ms
|
|
2190
|
+
default). Every underlying API is standard DOM/HTML with no `@web/test-runner`/CDP dependency, so
|
|
2191
|
+
both also run under a downstream suite's own happy-dom environment, not only a real browser.
|
|
2192
|
+
|
|
2193
|
+
Scope: awaiting a lazy mount reachable from a root you already have a handle to. Not a replacement
|
|
2194
|
+
for `updateComplete` (a mounted element may still have a pending render) or for the interaction
|
|
2195
|
+
drivers above (already-mounted components' own activation paths). `toast()` is currently the only
|
|
2196
|
+
imperative `lyra-ui` API that registers its elements through a dynamic `import()`; `confirm()`
|
|
2197
|
+
registers `<lr-dialog>` synchronously (a static import plus an idempotent `defineElement()` call) and
|
|
2198
|
+
mounts its transient dialog before returning, so it has no equivalent gap.
|
|
2199
|
+
|
|
2200
|
+
## happy-dom's custom-property resolver and host-to-part token forwarding
|
|
2201
|
+
|
|
2202
|
+
In 16.0.0, seven built-in controls that each compose a real
|
|
2203
|
+
`<lr-icon-button>` for their icon-only action — `<lr-copy-button>`, `<lr-dialog>` (whose close
|
|
2204
|
+
button is inherited by `<lr-drawer>`), `<lr-reorder-item>`, `<lr-message-actions>`,
|
|
2205
|
+
`<lr-attachment-trigger>`, `<lr-code-block>` (shared by `<lr-code-block-core>`), and `<lr-callout>`
|
|
2206
|
+
— captured the composed control's public `--lr-icon-button-*` tokens on their own `:host` and
|
|
2207
|
+
forwarded that private token back onto the SAME public token name on the `[part]` rendering the
|
|
2208
|
+
composed control, so that an ancestor theme override still reached the composed child instead of
|
|
2209
|
+
being shadowed by the component's own default. That was legal under the CSS Custom Properties spec
|
|
2210
|
+
— `:host` and `[part]` resolve on different elements, so a real browser resolves the host
|
|
2211
|
+
declaration to a concrete value first and the part substitutes that, and per-element cycle detection
|
|
2212
|
+
never fired — but **happy-dom does not model that element boundary**. Its `CSSComputedStyle` merges
|
|
2213
|
+
ancestor and own-element custom properties into a single flat map with no notion of which element
|
|
2214
|
+
declared what, and (at least through 20.14.5, the newest release at time of writing)
|
|
2215
|
+
`CSSVariableFormatter.resolveVariables` substitutes into that map recursively with no visited set
|
|
2216
|
+
and no depth cap — so the capture-and-forward pair resolved into each other forever, throwing an
|
|
2217
|
+
unhandled `RangeError: Maximum call stack size exceeded` from `CSSVariableFormatter.resolveVariables`
|
|
2218
|
+
on every render of any of the seven components. Every test still reported as passing — there was no
|
|
2219
|
+
failing assertion to point at — but the runner counted the unhandled errors and exited non-zero
|
|
2220
|
+
anyway, which read as unrelated flakiness rather than a CSS issue.
|
|
2221
|
+
|
|
2222
|
+
**Current versions are unaffected.** `<lr-icon-button>` now carries a private
|
|
2223
|
+
`--_lr-icon-button-<token>-default` fallback tier for every paint token (background, color, border,
|
|
2224
|
+
and their hover/active variants — the same shape its corner radius already used via
|
|
2225
|
+
`--_lr-icon-button-radius-default`), and each composing component sets its own default directly on
|
|
2226
|
+
that private tier rather than re-declaring the public token name. `<lr-icon-button>`'s own
|
|
2227
|
+
stylesheet still checks the public token first, so an ancestor override reaches a composed control
|
|
2228
|
+
exactly as before, but no descendant declares a public `--lr-icon-button-*` token from a private
|
|
2229
|
+
token that was itself derived from that same public token — so no resolver, scoped or flattened,
|
|
2230
|
+
ever sees a cycle. A project still hitting the `RangeError` above should upgrade
|
|
2231
|
+
`@aceshooting/lyra-ui`; the workarounds that version range needed (patching or upgrading the DOM
|
|
2232
|
+
implementation to cycle-aware/depth-limited custom-property resolution, or running the affected
|
|
2233
|
+
suites against a real browser engine) are no longer necessary once it does.
|
|
2234
|
+
|
|
2113
2235
|
## Accessibility contract
|
|
2114
2236
|
|
|
2115
2237
|
Semantic roles live on the shadow-DOM element that owns them, with explicit false states for
|
|
@@ -2161,18 +2283,36 @@ those four kinds must walk the declaration's own `superclass.name`/`superclass.m
|
|
|
2161
2283
|
`modules[].declarations[]` itself, or read `web-types.json`/`vscode-html-data.json` instead, which
|
|
2162
2284
|
are already fully resolved.
|
|
2163
2285
|
|
|
2164
|
-
**Which tags
|
|
2165
|
-
(`@aceshooting/lyra-ui/components/lr-<name>.js`) can, at import time, define
|
|
2166
|
-
element: importing `lr-table.js` also registers `<lr-empty>`,
|
|
2167
|
-
`<lr-spinner>`, because `lr-table`'s registration entry
|
|
2168
|
-
registration entries before defining `<lr-table>` itself.
|
|
2169
|
-
custom element per family source module, with no field for a
|
|
2170
|
-
none for the extra tags importing it registers as a side effect.
|
|
2171
|
-
`@aceshooting/lyra-ui/registrations.json` instead
|
|
2172
|
-
|
|
2173
|
-
|
|
2286
|
+
**Which tags an entry registers, and which message keys it can reach (`registrations.json`).** A
|
|
2287
|
+
stable per-tag entry (`@aceshooting/lyra-ui/components/lr-<name>.js`) can, at import time, define
|
|
2288
|
+
more than one custom element: importing `lr-table.js` also registers `<lr-empty>`,
|
|
2289
|
+
`<lr-pagination>`, `<lr-skeleton>` and `<lr-spinner>`, because `lr-table`'s registration entry
|
|
2290
|
+
imports those composed children's own registration entries before defining `<lr-table>` itself.
|
|
2291
|
+
`custom-elements.json` declares one custom element per family source module, with no field for a
|
|
2292
|
+
stable per-tag entry specifier and none for the extra tags importing it registers as a side effect.
|
|
2293
|
+
For that, read the generated `@aceshooting/lyra-ui/registrations.json` instead (`schemaVersion: 1`):
|
|
2294
|
+
`{ entries: [{ tag, entry, registrationModule, distModule, registers, localeKeys }],
|
|
2295
|
+
integrations: [{ entry, registrationModule, distModule, registers, localeKeys }] }`. Every
|
|
2296
|
+
`entries` row describes the stable per-tag alias above and always carries `tag`. `integrations`
|
|
2297
|
+
lists the published integration-bridge specifiers, which install an integration — an optional-peer
|
|
2298
|
+
resolver, a lazy document-format registrar — without being any single component's own alias, so
|
|
2299
|
+
they carry no `tag`: `components/media/flag/flag-peer.js`,
|
|
2300
|
+
`components/viewers/archive-viewer/archive-viewer-register.js` and
|
|
2301
|
+
`components/viewers/ebook-viewer/ebook-viewer-register.js`, the three imports a per-tag alias cannot
|
|
2302
|
+
stand in for. They are a separate array rather than tag-less rows mixed into `entries`, so a reader
|
|
2303
|
+
that keys `entries` by `tag` keeps working; `integrations`, `distModule` and `localeKeys` are all
|
|
2304
|
+
additive, which is why the schema version is unchanged. `registrationModule` is the `src/` path used
|
|
2305
|
+
internally; `distModule` is that same module's own published deep specifier (e.g.
|
|
2306
|
+
`./components/data/table/table.js`) so a caller holding either a per-tag alias or a deep import can
|
|
2307
|
+
resolve the other without reading `src/` or walking `dist/` — for an integration bridge,
|
|
2308
|
+
`distModule` equals `entry`, since there is no separate alias. `registers` is every `lr-*` tag
|
|
2309
|
+
importing `entry` defines, direct or transitive, derived from the same transitive-import analysis
|
|
2174
2310
|
`scripts/check-component-dependencies.mjs` already performs against the real registration graph
|
|
2175
|
-
(not a second hand-maintained list)
|
|
2311
|
+
(not a second hand-maintained list). `localeKeys` is every `LyraMessageKey` the registered tags can
|
|
2312
|
+
reach — including a key reached only through an indirect lookup table (e.g. `lr-attachment-trigger`'s
|
|
2313
|
+
`{ triggerKey: 'attachmentTriggerFiles' }`-shaped map), because it reuses
|
|
2314
|
+
`generate-default-string-slices.mjs`'s own reachability walk rather than a literal-`localize()`-only
|
|
2315
|
+
scan. All of it is regenerated by `pnpm run registration-graph`.
|
|
2176
2316
|
|
|
2177
2317
|
## Independence and migration
|
|
2178
2318
|
|
|
@@ -2427,6 +2567,11 @@ inlineSize: number; blockSize: number }> }`.
|
|
|
2427
2567
|
element: interpolating into a message template, populating a text-only property on another
|
|
2428
2568
|
component (a stat tile's value, a chart tick label, a badge's cost text), building a search
|
|
2429
2569
|
predicate, or composing an accessibility announcement.
|
|
2570
|
+
An omitted `locale` (or the explicit `'auto'` sentinel) on any of the four resolves to the page's
|
|
2571
|
+
active `setLyraLocale()` locale, exactly like a rendered `<lr-*>` component with no closer
|
|
2572
|
+
`locale`/`lang` override — not a hardcoded `'en'`. It falls back to `'en'` only once no active
|
|
2573
|
+
locale has ever been set, so an app that never calls `setLyraLocale()` sees no change. An
|
|
2574
|
+
explicit BCP-47 tag always stays authoritative over the active locale.
|
|
2430
2575
|
`formatNumber()` and `formatBytes()` accept a `bigint` or a decimal/integer string, not just a
|
|
2431
2576
|
`number`, for exact-precision input (large ids, monetary amounts, exact byte counts) — a plain
|
|
2432
2577
|
`number` is a float64 and cannot exactly represent an integer beyond `Number.MAX_SAFE_INTEGER` or
|
|
@@ -4115,6 +4260,17 @@ These named interfaces and helper signatures are available to typed integrations
|
|
|
4115
4260
|
`activateStep(/* public names: stepper, target */): unknown`
|
|
4116
4261
|
See "Driving a component's real activation path: interaction drivers" above for the full contract.
|
|
4117
4262
|
|
|
4263
|
+
- **`testing-wait-for-mount-contracts`** — Shared utility contracts.
|
|
4264
|
+
`waitForLyraElement(/* public names: selector, options */): unknown`
|
|
4265
|
+
`WaitForLyraElementOptions {
|
|
4266
|
+
root: unknown;
|
|
4267
|
+
match: (element: unknown) => unknown;
|
|
4268
|
+
timeoutMs: unknown;
|
|
4269
|
+
}`
|
|
4270
|
+
`waitForToast(/* public names: match, options */): unknown`
|
|
4271
|
+
See "Awaiting a lazily registered mount: `waitForLyraElement()` and `waitForToast()`" above for the
|
|
4272
|
+
full contract.
|
|
4273
|
+
|
|
4118
4274
|
- **`theme-gemstones-data-contracts`** — Shared utility contracts.
|
|
4119
4275
|
`GemstoneAccent {
|
|
4120
4276
|
key: unknown;
|
package/llms/tokens.md
CHANGED
|
@@ -40,7 +40,23 @@ unchanged.
|
|
|
40
40
|
> warning. Always set the `--lr-theme-*` input instead: that layer is read through `var()` at
|
|
41
41
|
> every level, so it inherits across every boundary. Per-component `--lr-<component>-*`
|
|
42
42
|
> properties are the other safe lever, because no component re-declares another component's
|
|
43
|
-
> namespace.
|
|
43
|
+
> namespace — with six named exceptions declared by the shared base layer itself; see below.
|
|
44
|
+
|
|
45
|
+
**The `--lr-*` names that look per-component but are not.** `--lr-focus-ring-width`,
|
|
46
|
+
`--lr-focus-ring-color`, `--lr-focus-ring-offset` (the consumer-scope exception above),
|
|
47
|
+
`--lr-icon-button-size`, `--lr-otp-input-segment-size`, and `--lr-popover-viewport-clamp` are
|
|
48
|
+
the only tokens the shared base `:host` block in `internal/tokens.styles.ts` declares under a
|
|
49
|
+
component-looking name — each reads its own `--lr-theme-*` input there. Because that block is
|
|
50
|
+
mixed into every `lr-*` component, all six behave like the internal layer above, not like an
|
|
51
|
+
ordinary per-component property: a rule that sets one of them directly on an ancestor is reset
|
|
52
|
+
at the first intervening `lr-*` component and never reaches a nested target — even though
|
|
53
|
+
setting it directly on the target element itself still works, which is what makes the failure
|
|
54
|
+
look arbitrary rather than systematic. Reach through a subtree with `--lr-theme-focus-ring-*`,
|
|
55
|
+
`--lr-theme-icon-button-size`, `--lr-theme-otp-input-segment-size`, or
|
|
56
|
+
`--lr-theme-popover-viewport-clamp` instead. Every other `--lr-<component>-*` token — including
|
|
57
|
+
the rest of `lr-icon-button`'s own (`-radius`, `-background`, `-color`, `-border`, and their
|
|
58
|
+
`-hover`/`-active` variants) — is not re-declared anywhere in the shared layer and inherits
|
|
59
|
+
normally from an ancestor.
|
|
44
60
|
|
|
45
61
|
## Direct theme-backed tokens (270)
|
|
46
62
|
|