@aceshooting/lyra-ui 30.8.0 → 31.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 +239 -329
- package/dist/ai/adapters/ag-ui.js +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js +1 -1
- package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +1 -1
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +1 -1
- package/dist/components/charts/chart/box-plot-loader.js +1 -1
- package/dist/components/charts/chart/box-plot.class.js +2 -2
- package/dist/components/charts/chart/chart-core-loader.js +1 -1
- package/dist/components/charts/chart/chart-feature-loader.js +1 -1
- package/dist/components/charts/chart/chart-sync.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +1 -1
- package/dist/components/charts/chart/chart.class.js +4 -4
- package/dist/components/charts/chart/lite-chart-axis-layout.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.js +1 -1
- package/dist/components/charts/chart-3d/chart-3d-engine.js +1 -1
- package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +9 -4
- package/dist/components/conversation/chat-composer/chat-composer.class.js +1 -1
- package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
- package/dist/components/conversation/chat-message/chat-message.class.d.ts +27 -3
- package/dist/components/conversation/chat-message/chat-message.class.js +14 -12
- package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +29 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +2 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +1 -1
- package/dist/components/conversation/code-block/code-block-shared.js +1 -1
- package/dist/components/conversation/code-block/code-loader.js +1 -1
- package/dist/components/conversation/code-block/shiki-oniguruma.js +1 -1
- package/dist/components/conversation/code-block/shiki-types.js +1 -1
- package/dist/components/conversation/markdown/katex-loader.js +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-loader.js +1 -1
- package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
- package/dist/components/conversation/markdown/markdown-shared.js +3 -3
- package/dist/components/conversation/markdown/markdown.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown.class.js +1 -1
- package/dist/components/conversation/message-feedback/message-feedback.class.js +2 -2
- package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +2 -1
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +4 -0
- package/dist/components/conversation/streaming-text/streaming-text-base.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +17 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +3 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.d.ts +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.js +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.js +2 -2
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +10 -10
- package/dist/components/data/data-grid/data-grid.class.js +1 -1
- package/dist/components/data/file-tree/file-tree.class.js +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +1 -1
- package/dist/components/data/heatmap/heatmap.class.js +1 -1
- package/dist/components/data/pagination/pagination.class.js +1 -1
- package/dist/components/data/table/table.class.d.ts +31 -2
- package/dist/components/data/table/table.class.js +3 -3
- package/dist/components/data/table/table.styles.js +1 -1
- package/dist/components/data/timeline/timeline-cluster.js +1 -1
- package/dist/components/data/timeline/timeline-item.class.d.ts +10 -3
- package/dist/components/data/timeline/timeline-item.class.js +16 -12
- package/dist/components/data/timeline/timeline-item.styles.js +1 -1
- package/dist/components/data/timeline/timeline.class.d.ts +14 -2
- package/dist/components/data/timeline/timeline.class.js +9 -5
- package/dist/components/data/tree/tree-item.class.js +1 -1
- package/dist/components/data/tree/tree.class.d.ts +2 -0
- package/dist/components/data/tree/tree.class.js +1 -1
- package/dist/components/forms/button/button.class.d.ts +8 -6
- package/dist/components/forms/button/button.class.js +2 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/color-picker/color-core.js +1 -1
- package/dist/components/forms/date-picker/date-input.class.d.ts +1 -1
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -2
- package/dist/components/forms/icon-button/icon-button.class.js +2 -2
- package/dist/components/forms/input/input-shared.js +2 -2
- package/dist/components/forms/input/number-input-locale.js +1 -0
- package/dist/components/forms/input/number-input.class.d.ts +19 -2
- package/dist/components/forms/input/number-input.class.js +2 -2
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +3 -3
- package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
- package/dist/components/layout/app-rail-group/app-rail-group.class.js +1 -1
- package/dist/components/layout/details/accordion-item.class.js +1 -1
- package/dist/components/layout/menu/menu.class.js +1 -1
- package/dist/components/layout/multi-split/multi-split.class.js +1 -1
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
- package/dist/components/layout/tab-group/tab-group.class.d.ts +8 -1
- package/dist/components/layout/tab-group/tab-group.class.js +1 -1
- package/dist/components/layout/tab-group/tab.class.d.ts +7 -1
- package/dist/components/layout/tab-group/tab.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +2 -2
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/media/animated-image/animated-image.class.js +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +21 -14
- package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
- package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +36 -12
- package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
- package/dist/components/media/drop-zone/drop-zone.class.d.ts +23 -5
- package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
- package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
- package/dist/components/media/file-icon/file-icon.class.js +1 -1
- package/dist/components/media/flag/flag-peer-bulk-standard.js +1 -1
- package/dist/components/media/flag/flag-peer-bulk.js +1 -1
- package/dist/components/media/flag/flag-peer.js +1 -1
- package/dist/components/media/flag/flag-url-resolver.js +1 -1
- package/dist/components/media/image-viewer/image-viewer.class.d.ts +2 -2
- package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
- package/dist/components/media/map/map-feature-loader.js +1 -1
- package/dist/components/media/map/map-loader.js +1 -1
- package/dist/components/media/map/map-owned-features.js +1 -1
- package/dist/components/media/map/map-scene-elevated-lines.js +2 -2
- package/dist/components/media/map/map-scene-render-controller.js +1 -1
- package/dist/components/media/map/map.class.d.ts +5 -5
- package/dist/components/media/map/map.class.js +3 -3
- package/dist/components/media/pan-zoom/pan-zoom.class.js +1 -1
- package/dist/components/media/qr-code/qr-code-loader.js +1 -1
- package/dist/components/media/video/video.class.d.ts +3 -3
- package/dist/components/media/video/video.class.js +3 -1
- package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
- package/dist/components/overlays/chip/chip.class.js +1 -1
- package/dist/components/overlays/overlay/dropdown.class.js +1 -1
- package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -1
- package/dist/components/overlays/overlay/tooltip.class.js +3 -3
- package/dist/components/retrieval/embedding-explorer/embedding-explorer-engine.js +1 -1
- package/dist/components/retrieval/graph/graph-engine-adapter.js +1 -1
- package/dist/components/retrieval/graph/graph-loader.js +1 -1
- package/dist/components/retrieval/graph/graph-node-renderer.js +1 -1
- package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
- package/dist/components/retrieval/graph/graph.class.d.ts +1 -1
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +3 -3
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +1 -1
- package/dist/components/utility/icon/dompurify-loader.js +1 -1
- package/dist/components/utility/json-viewer/json-viewer.class.d.ts +16 -1
- package/dist/components/utility/json-viewer/json-viewer.class.js +4 -4
- 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.js +1 -1
- package/dist/components/viewers/calendar-viewer/calendar-loader.js +1 -1
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
- package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
- package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
- package/dist/components/viewers/docx-viewer/docx-loader.js +1 -1
- package/dist/components/viewers/docx-viewer/docx-viewer.class.js +1 -1
- package/dist/components/viewers/ebook-viewer/ebook-loader.js +1 -1
- package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
- package/dist/components/viewers/ebook-viewer/epub-unload-guard.js +1 -0
- package/dist/components/viewers/email-viewer/email-loader.js +1 -1
- package/dist/components/viewers/html-viewer/dompurify-loader.js +1 -1
- package/dist/components/viewers/include/include.class.js +1 -1
- package/dist/components/viewers/model-viewer/model-viewer-loader.js +1 -1
- package/dist/components/viewers/model-viewer/model-viewer.class.js +1 -1
- package/dist/components/viewers/notebook-viewer/dompurify-loader.js +1 -1
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-loader.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
- package/dist/components/viewers/pptx-viewer/pptx-loader.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-loader.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
- package/dist/components/viewers/svg-viewer/dompurify-loader.js +1 -1
- package/dist/components/viewers/table-viewer-shared.js +4 -4
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/anchored-overlay-runtime.js +1 -1
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/document-tokens.js +2 -2
- package/dist/internal/dompurify-loader.js +1 -1
- package/dist/internal/drop-session-controller.js +1 -1
- package/dist/internal/engine-3d.js +1 -1
- package/dist/internal/icon-only-content.js +1 -1
- package/dist/internal/layered-layout.js +1 -1
- package/dist/internal/locale-loaders.generated.js +1 -1
- package/dist/internal/map-custom-layer-controller.js +1 -1
- package/dist/internal/map-scene-layer-runtime.js +1 -1
- package/dist/internal/media-panorama.js +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/papaparse-loader.js +1 -1
- package/dist/internal/safe-url.js +1 -1
- package/dist/internal/scoped-definitions.generated.js +1 -1
- package/dist/internal/scroll-overflow.js +1 -1
- package/dist/internal/source-window-controller.js +1 -1
- package/dist/internal/text-quote.js +1 -1
- package/dist/internal/viewer-search.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/sequence-time-binding.js +1 -1
- package/dist/simulation-clock.js +1 -1
- package/dist/styles/reservations.css +1 -1
- package/dist/styles/reservations.styles.js +1 -1
- package/dist/testing/happy-dom-shims.js +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/theme-core.css +1 -0
- package/dist/utilities/scoped-registry.js +1 -1
- package/llms/components/lr-attachment-chip.md +27 -12
- package/llms/components/lr-attachment-trigger.md +27 -7
- package/llms/components/lr-button.md +6 -4
- package/llms/components/lr-chat-composer.md +13 -7
- package/llms/components/lr-chat-message.md +44 -3
- package/llms/components/lr-chat-viewport.md +39 -2
- package/llms/components/lr-data-grid.md +2 -0
- package/llms/components/lr-dialog.md +10 -0
- package/llms/components/lr-drop-zone.md +26 -2
- package/llms/components/lr-icon-button.md +2 -1
- package/llms/components/lr-json-viewer.md +17 -0
- package/llms/components/lr-locale-picker.md +5 -0
- package/llms/components/lr-markdown-core.md +2 -1
- package/llms/components/lr-markdown.md +20 -4
- package/llms/components/lr-menu.md +3 -1
- package/llms/components/lr-number-input.md +28 -1
- package/llms/components/lr-prompt-input.md +1 -1
- package/llms/components/lr-streaming-text-core.md +3 -2
- package/llms/components/lr-streaming-text.md +4 -1
- package/llms/components/lr-suggestion-chips.md +28 -5
- package/llms/components/lr-tab-group.md +13 -1
- package/llms/components/lr-tab.md +5 -0
- package/llms/components/lr-table.md +25 -4
- package/llms/components/lr-timeline-item.md +1 -1
- package/llms/components/lr-timeline.md +38 -4
- package/llms/components/lr-tooltip.md +3 -1
- package/llms/components/lr-tree.md +4 -0
- package/llms/components/lr-virtual-list.md +1 -0
- package/llms/peers.md +2 -2
- package/llms/shared/ai-and-peers.md +34 -0
- package/llms/shared/forms-and-accessibility.md +21 -4
- package/llms/shared/imports-and-registration.md +2 -0
- package/llms/shared/styles-and-tokens.md +47 -1
- package/llms/shared.md +104 -5
- package/package.json +25 -21
- package/registrations.json +1 -1
|
@@ -25,12 +25,17 @@ identifier disappears, focus repairs to the nearest surviving occurrence without
|
|
|
25
25
|
external focus move.
|
|
26
26
|
|
|
27
27
|
**Properties:** `suggestions: readonly LyraChatSuggestion[] = []` (attribute: false) —
|
|
28
|
-
`LyraChatSuggestion { suggestionId: string; label: string; icon?: string; detail?: string; disabled?: boolean }`
|
|
28
|
+
`LyraChatSuggestion { suggestionId: string; label: string; icon?: string; iconName?: string; iconLibrary?: string; detail?: string; disabled?: boolean }`
|
|
29
29
|
(exported here). Identifiers must be nonempty and unique; invalid/later duplicates are omitted with
|
|
30
30
|
the first valid occurrence winning. The input is clone-owned, bounded, and frozen; reassign a new
|
|
31
|
-
array after changing the sequence or a row.
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
array after changing the sequence or a row. Each chip can show one decorative icon before its
|
|
32
|
+
text, in increasing precedence: `icon`, an optional literal hint (for example, an emoji) rendered as
|
|
33
|
+
text, so SVG or other markup in it is shown verbatim and never parsed; `iconName` (with optional
|
|
34
|
+
`iconLibrary`, a registered `lr-icon` library; omitted uses the default set), rendered as an
|
|
35
|
+
`<lr-icon>`; or a light-DOM element assigned to the per-suggestion `icon-<suggestionId>` slot, such
|
|
36
|
+
as an inline `<svg>` or `<lr-icon>`. A slotted `<svg>` without its own `width` is sized to `1em`.
|
|
37
|
+
Icons are always `aria-hidden`; the chip's accessible name stays its `label`. `detail` is an
|
|
38
|
+
optional secondary line. `disabled` marks a suggestion non-actionable: its chip
|
|
34
39
|
renders a genuinely disabled `<button>` (no roving tab stop, no hover/press affordance), activating
|
|
35
40
|
it emits nothing, and arrow-key/Home/End roving navigation steps past it. Empty renders nothing at
|
|
36
41
|
all. `wrap: boolean = false`
|
|
@@ -40,9 +45,13 @@ explicit empty string intentionally leaves the group unnamed.
|
|
|
40
45
|
|
|
41
46
|
**Events:** `lr-suggestion-select` — `detail: { suggestionId, label }`.
|
|
42
47
|
|
|
48
|
+
**Slots:** `icon-<suggestionId>` — decorative icon for the suggestion with that `suggestionId`
|
|
49
|
+
(`slot="icon-a"` for `suggestionId: 'a'`); it replaces that suggestion's `iconName`/`icon`, and the
|
|
50
|
+
fallback returns when the slotted element is removed.
|
|
51
|
+
|
|
43
52
|
**CSS parts:** `base` (the labeled group), `row` (the flex container holding the chips, present in
|
|
44
53
|
both the wrapping and the scrolling layout), `chip` (each suggestion button), `chip-icon` (the
|
|
45
|
-
optional decorative literal icon), `chip-label` (the primary text), `chip-detail` (the secondary
|
|
54
|
+
optional decorative icon wrapper: literal `icon`, `iconName` icon or slotted icon), `chip-label` (the primary text), `chip-detail` (the secondary
|
|
46
55
|
line, only rendered when `detail` is set).
|
|
47
56
|
|
|
48
57
|
**Themeable custom properties:** `--lr-suggestion-chips-justify` (default `flex-start`) — main-axis
|
|
@@ -77,3 +86,17 @@ Enter/Space activate. Renders inside an internal `lr-scroller` (`orientation="ho
|
|
|
77
86
|
chips.addEventListener("lr-suggestion-select", (e) => (composer.value = e.detail.label));
|
|
78
87
|
</script>
|
|
79
88
|
```
|
|
89
|
+
|
|
90
|
+
Vector icons per chip, by name or by slot:
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<lr-suggestion-chips id="starters">
|
|
94
|
+
<svg slot="icon-chart" viewBox="0 0 8 8"><circle cx="4" cy="4" r="4"></circle></svg>
|
|
95
|
+
</lr-suggestion-chips>
|
|
96
|
+
<script type="module">
|
|
97
|
+
document.querySelector("#starters").suggestions = [
|
|
98
|
+
{ suggestionId: "search", label: "Search the docs", iconName: "search" },
|
|
99
|
+
{ suggestionId: "chart", label: "Chart last week" },
|
|
100
|
+
];
|
|
101
|
+
</script>
|
|
102
|
+
```
|
|
@@ -97,7 +97,19 @@ selection.
|
|
|
97
97
|
|
|
98
98
|
**Methods:** `show(name: string): void` activates the matching enabled tab through the same
|
|
99
99
|
`lr-tab-hide` then `lr-tab-show` sequence as pointer/keyboard selection. Unknown, disabled, and
|
|
100
|
-
already-active names are no-ops.
|
|
100
|
+
already-active names are no-ops. `focusTab(name: string, options?: FocusOptions): boolean` moves
|
|
101
|
+
keyboard focus to the real `role="tab"` button of the matching enabled, non-inert tab and moves the
|
|
102
|
+
roving `tabindex` with it — for example after `show(name)`, or when closing an overlay opened from a
|
|
103
|
+
tab. Under `activation="auto"` focus and selection move together, so focusing an unselected tab
|
|
104
|
+
also selects it exactly as `show()` does (`lr-tab-hide`/`lr-tab-show`, never `lr-activate`); under
|
|
105
|
+
`activation="manual"` only focus moves. It returns `false` and changes nothing for an unknown,
|
|
106
|
+
disabled or inert name, or for a tab added since the group last read its children (await
|
|
107
|
+
`updateComplete` first). Calling `focus()` on an `<lr-tab>` descriptor does the same for that tab.
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
group.show("activity");
|
|
111
|
+
group.focusTab("activity");
|
|
112
|
+
```
|
|
101
113
|
|
|
102
114
|
**Overflow and scrolling.** The tablist is a native scroll container (`overflow-x: auto`). A
|
|
103
115
|
horizontal row that does not fit additionally gets two pointer scroll controls flanking it inside
|
|
@@ -31,6 +31,11 @@ prevents activation; `active: boolean = false` (reflected) — SSR selection hin
|
|
|
31
31
|
the owning group after hydration; `closable: boolean = false` (reflected) — shows the mapped close
|
|
32
32
|
affordance.
|
|
33
33
|
|
|
34
|
+
**Methods:** `focus(options?: FocusOptions): void` forwards to the owning group's real tab button,
|
|
35
|
+
exactly as the group's `focusTab(panel)` (under `activation="auto"` that also selects the tab); a
|
|
36
|
+
disabled or inert tab, or a descriptor outside an upgraded group, is not focusable and is left
|
|
37
|
+
alone. `blur(): void` removes focus from that button when it has it.
|
|
38
|
+
|
|
34
39
|
**Events:** `lr-close` (no detail) — the Lyra-convention mapping of Shoelace's `sl-close`, emitted
|
|
35
40
|
when the close affordance is clicked or Delete is pressed on the focused owning tab. It bubbles, is
|
|
36
41
|
composed and noncancelable. A disabled tab never emits it. The tab never removes itself or its
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 57 parts, 27 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -51,9 +51,28 @@ resizable?, sortable?, sortValue?, defaultSortDir?: 'asc'|'desc', align?: 'start
|
|
|
51
51
|
priority?: 'medium'|'low',
|
|
52
52
|
sticky?: 'start'|'end', editTrigger?: 'double-click'|'always', editValue?, editLabel?: (row) => string,
|
|
53
53
|
editType?: 'text'|'number'|'select',
|
|
54
|
-
editOptions?: { value: string; label: string }[], footer?, cellStyle?, heatValue?,
|
|
54
|
+
editOptions?: { value: string; label: string }[], footer?, cellStyle?, cellPart?, heatValue?,
|
|
55
55
|
cell: (row) => unknown }` — `cell` is required for every `editTrigger` except `'always'`, whose
|
|
56
|
-
persistent editor renders unconditionally so the table's render path never falls back to it
|
|
56
|
+
persistent editor renders unconditionally so the table's render path never falls back to it.
|
|
57
|
+
**`cell()` output renders inside the table's shadow root**, so class rules from the page or from
|
|
58
|
+
the component that owns the table never reach it (only inherited properties and custom
|
|
59
|
+
properties cross): ``cell: () => html`<span class="muted">…</span>` `` stays unstyled by the
|
|
60
|
+
owner's `.muted` rule. Style cell content from outside with `::part()` instead —
|
|
61
|
+
`cellPart(row) => string | undefined` wraps that column's resting content in a `display: block`
|
|
62
|
+
`[part~='cell-content']` element that also carries every whitespace-separated name returned
|
|
63
|
+
(non-string results are ignored; no wrapper renders when `cellPart` is omitted, and none inside
|
|
64
|
+
an open inline editor), and a `part` attribute written inside a `cell()` template is equally a
|
|
65
|
+
part of the table. Prefix those names (`cell-…`) so they never collide with the table's own parts:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
columns = [{ key: 'name', label: 'Name',
|
|
69
|
+
cellPart: (row) => (row.archived ? 'cell-archived' : undefined),
|
|
70
|
+
cell: (row) => html`${row.name}<span part="cell-secondary">${row.owner}</span>` }];
|
|
71
|
+
// in the owner's stylesheet
|
|
72
|
+
// lr-table::part(cell-archived) { opacity: 0.7; }
|
|
73
|
+
// lr-table::part(cell-secondary) { display: block; color: var(--lr-color-text-quiet); }
|
|
74
|
+
```
|
|
75
|
+
—
|
|
57
76
|
`ariaLabel` overrides that column header's accessible name (applied as the `<th>`'s `aria-label`
|
|
58
77
|
whenever set) — e.g. an icon-only `headerCell` with no plain-text `label` to fall back on; when
|
|
59
78
|
`label` is blank (or whitespace-only) and `ariaLabel` is also omitted, the header's accessible
|
|
@@ -519,7 +538,9 @@ geometrically identical to real rows, so `skeleton` is the part to target for th
|
|
|
519
538
|
look: `::part(skeleton) { --lr-skeleton-h: 2em; }`), and
|
|
520
539
|
`pagination` (the pager host; re-exported as `pagination-summary`,
|
|
521
540
|
`pagination-controls`, `pagination-pages`, `pagination-page`, `pagination-page-current`,
|
|
522
|
-
`pagination-page-field`, `pagination-page-input`, `pagination-page-count`, `pagination-button`), `cell-editor`,
|
|
541
|
+
`pagination-page-field`, `pagination-page-input`, `pagination-page-count`, `pagination-button`), `cell-editor`,
|
|
542
|
+
`cell-content` (the block wrapper around a body cell's resting content, rendered only for a column
|
|
543
|
+
defining `cellPart(row)`, which also carries every name that callback returns), `group-row`, `group-cell`, and `resize-handle` (the focusable column
|
|
523
544
|
separator, with a finite explicit ARIA maximum even when no CSS `maxWidth` was supplied). The built-in empty state is addressable rather than fixed: `empty` is the `<lr-empty>`
|
|
524
545
|
host in all three empty states, and it re-exports that element's own inner parts as `empty-base`,
|
|
525
546
|
`empty-icon`, `empty-heading`, `empty-description` and `empty-actions`. Note that the no-columns and
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 12 parts, 9 custom properties — see `lr-timeline.md`
|
|
13
13
|
- **Documented with** `lr-timeline`: see [lr-timeline.md](./lr-timeline.md).
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
@@ -69,6 +69,35 @@ Cluster windows are bounded from their first sorted position rather than transit
|
|
|
69
69
|
dense neighbour, so a large history becomes a useful sequence of markers rather than one axis-wide
|
|
70
70
|
cluster. An isolated item remains an ordinary timeline item. Activating a count marker is a
|
|
71
71
|
notification only; it never expands or selects items internally.
|
|
72
|
+
`ordered: boolean = false` (reflected) presents the items as an ordered sequence of steps:
|
|
73
|
+
`[part='base']` becomes a native `<ol>` (with an explicit `role="list"`, which WebKit otherwise
|
|
74
|
+
drops from an unstyled list), and each item's marker shows its step number as real, readable text
|
|
75
|
+
in `[part='marker-number']` — formatted for the item's effective locale and exposed to assistive
|
|
76
|
+
technology — instead of the decorative dot, so titles need not repeat "Step 1". The marker becomes
|
|
77
|
+
a ring (`--lr-timeline-marker-color` border, transparent fill, `--lr-timeline-marker-number-color`
|
|
78
|
+
text, default size `var(--lr-size-1-5rem)` that widens for a long number) and replaces the
|
|
79
|
+
`marker-icon` slot. Numbering follows document order, renumbers when items are added, removed or
|
|
80
|
+
reordered, clears a removed item's number, and works with every orientation and scale.
|
|
81
|
+
`start: number = 1` sets the first step number, like a native `<ol start>`; a non-finite value
|
|
82
|
+
numbers from 1 and fractions truncate. Ignored unless `ordered`.
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<lr-timeline ordered aria-label="Permit application">
|
|
86
|
+
<lr-timeline-item>Submit the form<span slot="timestamp">by 3 March</span></lr-timeline-item>
|
|
87
|
+
<lr-timeline-item>Pay the fee<span slot="description">Within ten working days.</span></lr-timeline-item>
|
|
88
|
+
<lr-timeline-item>Collect the permit</lr-timeline-item>
|
|
89
|
+
</lr-timeline>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Before upgrade:** with `@aceshooting/lyra-ui/reservations.css` (or the adoptable
|
|
93
|
+
`reservationStyles`) loaded, a server-rendered vertical flow timeline already has its upgraded
|
|
94
|
+
layout before any script runs: each item reserves the marker column, paints its marker and trailing
|
|
95
|
+
rail from the timeline's own tokens (the one place that stylesheet paints color), floats a slotted
|
|
96
|
+
`timestamp` to the inline end of the title line and places a slotted `description` beneath it. An
|
|
97
|
+
`ordered` timeline numbers its markers with a CSS counter from 1; for another `start`, also set
|
|
98
|
+
`style="counter-reset: lr-timeline-step N"` where N is `start - 1`. Write the title text first, then
|
|
99
|
+
the slotted elements. The step numbers become real text, and the list semantics apply, once the
|
|
100
|
+
definitions load. Horizontal and `scale="time"` timelines are not reserved.
|
|
72
101
|
`rangeStart` / `rangeEnd` (`Date | string | number`, attribute: false) pin the axis instead of
|
|
73
102
|
deriving it from the earliest/latest item; a reversed or non-finite pair falls back to the derived
|
|
74
103
|
range. An item with no parseable `timestamp` (including one supplied only through the `timestamp`
|
|
@@ -107,11 +136,14 @@ slot falls back to a color-coded dot), `timestamp` (wins outright over the
|
|
|
107
136
|
`timestamp` property whenever it has assigned content), and `description` (its part is hidden
|
|
108
137
|
entirely when empty).
|
|
109
138
|
|
|
110
|
-
**CSS parts:** timeline `base` — the `role="list"` flex container (no separate `list` part
|
|
139
|
+
**CSS parts:** timeline `base` — the `role="list"` flex container (no separate `list` part; an
|
|
140
|
+
`<ol>` while `ordered`). Item:
|
|
111
141
|
`cluster` — the native count button rendered while that item represents a cluster, with a 40px
|
|
112
142
|
minimum action surface; `cluster-count` — its painted count pill; `base`, `track`
|
|
113
143
|
(marker + rail spine, always the opposite axis from `base`), `marker`
|
|
114
|
-
(`aria-hidden="true"`, decorative
|
|
144
|
+
(`aria-hidden="true"`, decorative — except inside an `ordered` timeline, where it is the exposed
|
|
145
|
+
ring around the number), `marker-number` (the step number text, only inside an `ordered`
|
|
146
|
+
timeline), `rail` (the connecting segment; `visibility: hidden` rather than
|
|
115
147
|
removed on the last item, so marker alignment stays consistent), `content`, `header` (flex row
|
|
116
148
|
wrapping `title` and `timestamp`; wraps at narrow widths rather than truncating), `title`,
|
|
117
149
|
`timestamp` (hidden when there's nothing to show), `description`.
|
|
@@ -127,9 +159,11 @@ scrolling. On the item: `--lr-timeline-marker-size`
|
|
|
127
159
|
(default `var(--lr-size-1-25rem)`, both dimensions so the dot stays circular),
|
|
128
160
|
`--lr-timeline-rail-width` (default `var(--lr-border-width-medium)`), `--lr-timeline-rail-color`
|
|
129
161
|
(default `var(--lr-color-border-subtle)`), `--lr-timeline-marker-color` (default
|
|
130
|
-
`var(--lr-color-text-quiet)`, with a private default that changes per `variant`),
|
|
162
|
+
`var(--lr-color-text-quiet)`, with a private default that changes per `variant`),
|
|
163
|
+
`--lr-timeline-marker-number-color` (default `var(--lr-color-text)`, the step number inside an
|
|
164
|
+
`ordered` timeline's marker ring; the marker size defaults to `var(--lr-size-1-5rem)` there), and
|
|
131
165
|
`--lr-timeline-active-ring-color`
|
|
132
|
-
(defaults to the effective marker color). All
|
|
166
|
+
(defaults to the effective marker color). All six item hooks inherit from theme
|
|
133
167
|
ancestors; setting one directly on an item wins over both the inherited value and variant default.
|
|
134
168
|
|
|
135
169
|
Version 9 removes the legacy item `icon` slot; migrate marker glyphs to `slot="marker-icon"`.
|
|
@@ -82,7 +82,9 @@ later text renders normally.
|
|
|
82
82
|
`arrowPlacement: 'anchor'|'start'|'end'|'center' = 'anchor'` (attribute `arrow-placement`) and
|
|
83
83
|
`arrowPadding: number = 0` (attribute `arrow-padding`) — the same arrow trio `<lr-popover>`
|
|
84
84
|
documents (`llms/components/lr-popover.md`).
|
|
85
|
-
- `content: string = ''` — plain-text tooltip content, used when nothing is slotted
|
|
85
|
+
- `content: string = ''` — plain-text tooltip content, used when nothing is slotted. Whitespace-only
|
|
86
|
+
text in the content slot (template indentation around a `slot="trigger"` element) counts as
|
|
87
|
+
nothing, so `content` still paints and describes the trigger.
|
|
86
88
|
- `accessibleLabel: string = ''` (attribute **`aria-label`**) — a host `aria-label` wins by
|
|
87
89
|
attribute presence, including an explicitly empty value. When the attribute is absent, an
|
|
88
90
|
actionable popup with no property label uses the localized `popover` string.
|
|
@@ -70,6 +70,10 @@ data properties, at most 100 badges and 65,536 aggregate display-text units per
|
|
|
70
70
|
oversized rows fail visibly without compacting logical indices. The provider owns global key
|
|
71
71
|
uniqueness and immutable snapshot consistency; validation covers the bounded admitted window.
|
|
72
72
|
|
|
73
|
+
Source row names combine the visible label, description and badge names (a badge's `label` when
|
|
74
|
+
usable, otherwise its `text`). An explicit `accessibleLabel` overrides that default. Rows with
|
|
75
|
+
only blank display content use their stable `id`, while badge-only rows retain their badge name.
|
|
76
|
+
|
|
73
77
|
The source view mounts at most 301 rows, retaining four 100-row pages plus at most one focused
|
|
74
78
|
ready row (401 total). Range requests contain at most 100 rows, with at most two physically pending
|
|
75
79
|
reads. One projection call runs at a time with only the latest replacement queued. Loading/error
|
|
@@ -189,6 +189,7 @@ row is "active." `options.align` is `'start'`, `'end'`, or `'auto'` (default —
|
|
|
189
189
|
already fully visible); `options.behavior` (default `'smooth'`) is forced to `'auto'` under
|
|
190
190
|
`prefers-reduced-motion: reduce`. `index` is clamped to the effective source's `0…count-1` range.
|
|
191
191
|
In auto-height mode, estimate-based jumps are corrected as row and group-marker measurements arrive.
|
|
192
|
+
Measurements and scroll-anchor corrections apply together on the next frame.
|
|
192
193
|
That correction is bound to the source, key function, and target identity and is canceled on a new
|
|
193
194
|
target, data replacement, manual scroll intent, or disconnect, so late observations cannot pull a
|
|
194
195
|
newer view back to stale content.
|
package/llms/peers.md
CHANGED
|
@@ -39,8 +39,8 @@ for the page.
|
|
|
39
39
|
|---|---|---|
|
|
40
40
|
| `@aceshooting/lyra-3d` | `^1.2.0` | `lr-chart-3d`, `lr-embedding-explorer`, `lr-graph`, `lr-image-viewer`, `lr-knowledge-graph-explorer`, `lr-model-viewer`, `lr-video` |
|
|
41
41
|
| `@aceshooting/lyra-flags` | `^2.3.1` | _(loaded by a shared internal module)_ |
|
|
42
|
-
| `@aceshooting/lyra-map` | `^1.5.
|
|
43
|
-
| `@aceshooting/lyra-translations` | `^
|
|
42
|
+
| `@aceshooting/lyra-map` | `^1.5.1` | `lr-geojson-viewer`, `lr-map` |
|
|
43
|
+
| `@aceshooting/lyra-translations` | `^31.0.0` | _(not referenced by any component)_ |
|
|
44
44
|
| `@aiden0z/pptx-renderer` | `^1.4.0` | `lr-pptx-viewer` |
|
|
45
45
|
| `@sgratzl/chartjs-chart-boxplot` | `^4.0.0` | `lr-box-plot` |
|
|
46
46
|
| `chart.js` | `^4.0.1` | `lr-bar-chart`, `lr-box-plot`, `lr-bubble-chart`, `lr-chart`, `lr-doughnut-chart`, `lr-histogram`, `lr-line-chart`, `lr-pie-chart`, `lr-polar-area-chart`, `lr-radar-chart`, `lr-scatter-chart` |
|
|
@@ -216,6 +216,40 @@ component section instead of assuming every peer user renders an `<lr-skeleton>`
|
|
|
216
216
|
degraded state. `lr-phone-input` is the exception to dynamic peer import: it takes a consumer-built
|
|
217
217
|
adapter (`loadLibphonenumberAdapter()`) rather than importing `libphonenumber-js` itself.
|
|
218
218
|
|
|
219
|
+
### Bundling without an optional peer
|
|
220
|
+
|
|
221
|
+
A peer you do not install needs no bundler configuration: published peer imports build without it.
|
|
222
|
+
Using a component that needs a missing peer then shows that component's documented failure state at
|
|
223
|
+
run time, so sanitized content stays unrendered rather than falling back to raw markup.
|
|
224
|
+
|
|
225
|
+
| Toolchain | Missing peer at build time |
|
|
226
|
+
|---|---|
|
|
227
|
+
| esbuild, Angular `application` builder, Vite, Bun, Next.js | Builds. |
|
|
228
|
+
| webpack, Rspack, Rollup | Builds, with an unresolved-module warning for each peer. |
|
|
229
|
+
| Parcel | Fails. Alias the peer to nothing, as below. |
|
|
230
|
+
|
|
231
|
+
For Parcel, list each peer it reports, and its subpaths, in the application's `package.json`:
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"alias": {
|
|
236
|
+
"dompurify": false,
|
|
237
|
+
"maplibre-gl": false,
|
|
238
|
+
"@aceshooting/lyra-map": false,
|
|
239
|
+
"@aceshooting/lyra-map/*": false
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
To silence the webpack or Rspack warnings, ignore the peers:
|
|
245
|
+
|
|
246
|
+
```js
|
|
247
|
+
new webpack.IgnorePlugin({ resourceRegExp: /^(dompurify|maplibre-gl|@aceshooting\/lyra-map)(\/|$)/ });
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
A bundler that resolves a peer you did install still places it in its own lazy chunk, so installing
|
|
251
|
+
one does not grow the initial bundle.
|
|
252
|
+
|
|
219
253
|
### Experimental DOCX editing companion
|
|
220
254
|
|
|
221
255
|
Use `@aceshooting/lyra-docs` for editing; `lr-docx-viewer` remains a viewer in Lyra UI.
|
|
@@ -352,14 +352,31 @@ upgrade:
|
|
|
352
352
|
```
|
|
353
353
|
|
|
354
354
|
It styles **only** `:not(:defined)` elements, inside an `@layer lr-reservations`, so it becomes inert
|
|
355
|
-
the moment a definition upgrades and can never fight a component's own layout. It sets no
|
|
356
|
-
no
|
|
355
|
+
the moment a definition upgrades and can never fight a component's own layout. It sets no `:root`
|
|
356
|
+
rules and no colors except a timeline's marker and rail (below).
|
|
357
357
|
|
|
358
358
|
**Every reservation is expressed with the same custom property and fallback token the component's
|
|
359
359
|
own stylesheet uses** — `--lr-chart-height` / `--lr-size-280px` for the chart family,
|
|
360
360
|
`--lr-map-height` for `lr-map`, `--lr-canvas-reserved-height` for graph/canvas surfaces,
|
|
361
|
-
`--lr-flag-aspect-ratio` for `lr-flag`, `--lr-form-control-height` for the field controls,
|
|
362
|
-
|
|
361
|
+
`--lr-flag-aspect-ratio` for `lr-flag`, `--lr-form-control-height` for the field controls,
|
|
362
|
+
`--lr-checkbox-label-indent` and `--lr-icon-button-size` for `lr-checkbox`, `--lr-badge-min-height`,
|
|
363
|
+
`--lr-badge-padding-inline` and `--lr-badge-font-size` for `lr-badge`, `--lr-chat-composer-padding`
|
|
364
|
+
for `lr-chat-composer` (plus its `--lr-line-height-normal` textarea line under
|
|
365
|
+
`actions-layout="below"`), and so on.
|
|
366
|
+
|
|
367
|
+
Covered tags: the chart family, `lr-map`, `lr-flag`, `lr-flow-canvas`, `lr-graph`,
|
|
368
|
+
`lr-knowledge-graph-explorer`, the inline form-control row (`lr-input`, `lr-number-input`,
|
|
369
|
+
`lr-select`, `lr-combobox`, `lr-date-input`, `lr-phone-input`, `lr-color-picker`, `lr-button`,
|
|
370
|
+
`lr-icon-button`), `lr-checkbox`, `lr-badge`, `lr-chat-composer`, the vertical flow
|
|
371
|
+
`lr-timeline`/`lr-timeline-item` pair, and the tab trio `lr-tab-group`/`lr-tab`/`lr-tab-panel`.
|
|
372
|
+
A timeline is the one reservation that paints color: its markers and rail, from the
|
|
373
|
+
`--lr-timeline-marker-*`/`--lr-timeline-rail-*` tokens, plus CSS-counter step numbers for an
|
|
374
|
+
`ordered` timeline, so a static page reads as a complete list before upgrade. Before upgrade a tab group lays its descriptors out as one
|
|
375
|
+
row of tab-sized boxes and shows only the panel that will be shown (the one marked `active`, else
|
|
376
|
+
the first), for the default top `placement`. The text-bearing reservations (`lr-checkbox`,
|
|
377
|
+
`lr-badge`, the tab trio) also set `font-family: var(--lr-font)`, as every defined Lyra host does,
|
|
378
|
+
because the reserved box is measured from the same text. The badge and checkbox reservations cover
|
|
379
|
+
their default `m` size; a non-default `size` reserves the default footprint. That is the point of shipping it rather than documenting measured pixel values: a hand-written
|
|
363
380
|
reservation rots silently the moment a component's default changes, whereas these track it, and
|
|
364
381
|
theming a component through its documented custom property re-themes its reservation with it.
|
|
365
382
|
|
|
@@ -173,6 +173,8 @@ The entry points, then:
|
|
|
173
173
|
`import '@aceshooting/lyra-ui/components/media/flag/flag-peer.js';` once.
|
|
174
174
|
- **Other subpaths.** `@aceshooting/lyra-ui/theme.css` (ready-made light/dark theme, including the
|
|
175
175
|
document token layer),
|
|
176
|
+
`@aceshooting/lyra-ui/theme-core.css` (the same without the built-in Shadcn, Glass and Emerald
|
|
177
|
+
profile, for a single-look application),
|
|
176
178
|
`@aceshooting/lyra-ui/looks/shadcn.css` (opt-in shadcn/ui look, imported after `theme.css` — see
|
|
177
179
|
[The shadcn look](./styles-and-tokens.md#the-shadcn-look--looksshadcncss)),
|
|
178
180
|
`@aceshooting/lyra-ui/tokens-root.css` (the document token layer alone, for pages that do not
|
|
@@ -102,7 +102,8 @@ custom accents, runtime looks, overrides and historical records. Do not reconstr
|
|
|
102
102
|
from the normalized `parseLyraStyleRecord()` snapshot: it is not a lossless persistence format.
|
|
103
103
|
`getLyraStyle()` reads the same choices at runtime; user changes use `setLyraStyle()`. An application
|
|
104
104
|
Reset can call `resetLyraStyle()` and restore any separate application preferences. Selectable
|
|
105
|
-
alternate looks and an explicitly cleared accent require `theme.css
|
|
105
|
+
alternate looks and an explicitly cleared accent require `theme.css` or
|
|
106
|
+
[`theme-core.css`](#a-lean-entry-for-a-single-look--theme-corecss); the intrinsic component
|
|
106
107
|
profile does not replace that scope resolver.
|
|
107
108
|
|
|
108
109
|
Keep spotlights in application CSS, independent of the chosen control look. The public root-token
|
|
@@ -637,6 +638,51 @@ alpha), which lets a theme tint every shadow in the library from one place:
|
|
|
637
638
|
Reach for the tier that matches what the surface _is_, not the one that happens to look right on the
|
|
638
639
|
page you are on — that is what keeps two overlapping surfaces reading in the correct order.
|
|
639
640
|
|
|
641
|
+
### A lean entry for a single look — theme-core.css
|
|
642
|
+
|
|
643
|
+
An application with one fixed style can import `theme-core.css` in place of `theme.css`. It has the
|
|
644
|
+
same inputs, mode rules and document token layer, without the built-in Shadcn look, Glass surface and
|
|
645
|
+
Emerald accent: about 83 KB against 104 KB raw, and 10.8 KB against 13.6 KB gzipped. Import one of the
|
|
646
|
+
two, not both.
|
|
647
|
+
|
|
648
|
+
With no attributes, `theme-core.css` resolves to the Lyra look, Solid surface, no accent and System
|
|
649
|
+
mode, exactly as `theme.css` does for those explicit choices:
|
|
650
|
+
|
|
651
|
+
```css
|
|
652
|
+
@layer lr-base, lr-theme, lr-theme-preset, lr-utilities, lr-overrides;
|
|
653
|
+
@layer lr-theme-preset.look, lr-theme-preset.density, lr-theme-preset.surface, lr-theme-preset.accent, lr-theme-preset.mode;
|
|
654
|
+
@import "@aceshooting/lyra-ui/theme-core.css";
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
Add only the sheets for the choices you select, then select them with attributes or the style API.
|
|
658
|
+
Each sheet is the one that style needs under `theme-core.css`:
|
|
659
|
+
|
|
660
|
+
| Choice | Add |
|
|
661
|
+
|---|---|
|
|
662
|
+
| `look: 'shadcn'`, `'material'`, `'data'`, `'terminal'`, `'high-contrast'` | `looks/<look>.css` |
|
|
663
|
+
| `surface: 'glass'`, or the `.lr-surface-chrome` class | `surfaces/glass.css` |
|
|
664
|
+
| a named `accent` such as `'emerald'` | `accents.css` |
|
|
665
|
+
| `density: 'compact'` or `'touch'` | `density.css` |
|
|
666
|
+
|
|
667
|
+
An application that keeps the whole built-in profile should stay on `theme.css`, which is smaller
|
|
668
|
+
than `theme-core.css` plus those three sheets.
|
|
669
|
+
|
|
670
|
+
The style runtime's defaults remain Shadcn, Glass and Emerald, so name all three axes before relying
|
|
671
|
+
on the runtime. `setLyraStyle({ look: 'lyra', surface: 'solid', accent: null })` does this once;
|
|
672
|
+
development builds warn when a selected choice has no stylesheet. For first paint, declare the fixed
|
|
673
|
+
axes on `<html>` and restore only the mode, as in
|
|
674
|
+
[Fixed host axes with saved mode](#style-runtime--aceshootinglyra-uithemejs):
|
|
675
|
+
|
|
676
|
+
```html
|
|
677
|
+
<html data-lr-look="lyra" data-lr-surface="solid" data-lr-accent="none">
|
|
678
|
+
<head>
|
|
679
|
+
<meta charset="utf-8" />
|
|
680
|
+
<script src="/theme-bootstrap.js" data-lr-theme-restore="mode"></script>
|
|
681
|
+
<link rel="stylesheet" href="/theme-core.css" />
|
|
682
|
+
</head>
|
|
683
|
+
</html>
|
|
684
|
+
```
|
|
685
|
+
|
|
640
686
|
### Cascade layers
|
|
641
687
|
|
|
642
688
|
`theme.css` declares its layer order up front, with base inputs in `lr-theme` and built-in profile
|
package/llms/shared.md
CHANGED
|
@@ -172,6 +172,8 @@ The entry points, then:
|
|
|
172
172
|
`import '@aceshooting/lyra-ui/components/media/flag/flag-peer.js';` once.
|
|
173
173
|
- **Other subpaths.** `@aceshooting/lyra-ui/theme.css` (ready-made light/dark theme, including the
|
|
174
174
|
document token layer),
|
|
175
|
+
`@aceshooting/lyra-ui/theme-core.css` (the same without the built-in Shadcn, Glass and Emerald
|
|
176
|
+
profile, for a single-look application),
|
|
175
177
|
`@aceshooting/lyra-ui/looks/shadcn.css` (opt-in shadcn/ui look, imported after `theme.css` — see
|
|
176
178
|
[The shadcn look](#the-shadcn-look--looksshadcncss)),
|
|
177
179
|
`@aceshooting/lyra-ui/tokens-root.css` (the document token layer alone, for pages that do not
|
|
@@ -1046,7 +1048,8 @@ custom accents, runtime looks, overrides and historical records. Do not reconstr
|
|
|
1046
1048
|
from the normalized `parseLyraStyleRecord()` snapshot: it is not a lossless persistence format.
|
|
1047
1049
|
`getLyraStyle()` reads the same choices at runtime; user changes use `setLyraStyle()`. An application
|
|
1048
1050
|
Reset can call `resetLyraStyle()` and restore any separate application preferences. Selectable
|
|
1049
|
-
alternate looks and an explicitly cleared accent require `theme.css
|
|
1051
|
+
alternate looks and an explicitly cleared accent require `theme.css` or
|
|
1052
|
+
[`theme-core.css`](#a-lean-entry-for-a-single-look--theme-corecss); the intrinsic component
|
|
1050
1053
|
profile does not replace that scope resolver.
|
|
1051
1054
|
|
|
1052
1055
|
Keep spotlights in application CSS, independent of the chosen control look. The public root-token
|
|
@@ -1581,6 +1584,51 @@ alpha), which lets a theme tint every shadow in the library from one place:
|
|
|
1581
1584
|
Reach for the tier that matches what the surface _is_, not the one that happens to look right on the
|
|
1582
1585
|
page you are on — that is what keeps two overlapping surfaces reading in the correct order.
|
|
1583
1586
|
|
|
1587
|
+
### A lean entry for a single look — theme-core.css
|
|
1588
|
+
|
|
1589
|
+
An application with one fixed style can import `theme-core.css` in place of `theme.css`. It has the
|
|
1590
|
+
same inputs, mode rules and document token layer, without the built-in Shadcn look, Glass surface and
|
|
1591
|
+
Emerald accent: about 83 KB against 104 KB raw, and 10.8 KB against 13.6 KB gzipped. Import one of the
|
|
1592
|
+
two, not both.
|
|
1593
|
+
|
|
1594
|
+
With no attributes, `theme-core.css` resolves to the Lyra look, Solid surface, no accent and System
|
|
1595
|
+
mode, exactly as `theme.css` does for those explicit choices:
|
|
1596
|
+
|
|
1597
|
+
```css
|
|
1598
|
+
@layer lr-base, lr-theme, lr-theme-preset, lr-utilities, lr-overrides;
|
|
1599
|
+
@layer lr-theme-preset.look, lr-theme-preset.density, lr-theme-preset.surface, lr-theme-preset.accent, lr-theme-preset.mode;
|
|
1600
|
+
@import "@aceshooting/lyra-ui/theme-core.css";
|
|
1601
|
+
```
|
|
1602
|
+
|
|
1603
|
+
Add only the sheets for the choices you select, then select them with attributes or the style API.
|
|
1604
|
+
Each sheet is the one that style needs under `theme-core.css`:
|
|
1605
|
+
|
|
1606
|
+
| Choice | Add |
|
|
1607
|
+
|---|---|
|
|
1608
|
+
| `look: 'shadcn'`, `'material'`, `'data'`, `'terminal'`, `'high-contrast'` | `looks/<look>.css` |
|
|
1609
|
+
| `surface: 'glass'`, or the `.lr-surface-chrome` class | `surfaces/glass.css` |
|
|
1610
|
+
| a named `accent` such as `'emerald'` | `accents.css` |
|
|
1611
|
+
| `density: 'compact'` or `'touch'` | `density.css` |
|
|
1612
|
+
|
|
1613
|
+
An application that keeps the whole built-in profile should stay on `theme.css`, which is smaller
|
|
1614
|
+
than `theme-core.css` plus those three sheets.
|
|
1615
|
+
|
|
1616
|
+
The style runtime's defaults remain Shadcn, Glass and Emerald, so name all three axes before relying
|
|
1617
|
+
on the runtime. `setLyraStyle({ look: 'lyra', surface: 'solid', accent: null })` does this once;
|
|
1618
|
+
development builds warn when a selected choice has no stylesheet. For first paint, declare the fixed
|
|
1619
|
+
axes on `<html>` and restore only the mode, as in
|
|
1620
|
+
[Fixed host axes with saved mode](#style-runtime--aceshootinglyra-uithemejs):
|
|
1621
|
+
|
|
1622
|
+
```html
|
|
1623
|
+
<html data-lr-look="lyra" data-lr-surface="solid" data-lr-accent="none">
|
|
1624
|
+
<head>
|
|
1625
|
+
<meta charset="utf-8" />
|
|
1626
|
+
<script src="/theme-bootstrap.js" data-lr-theme-restore="mode"></script>
|
|
1627
|
+
<link rel="stylesheet" href="/theme-core.css" />
|
|
1628
|
+
</head>
|
|
1629
|
+
</html>
|
|
1630
|
+
```
|
|
1631
|
+
|
|
1584
1632
|
### Cascade layers
|
|
1585
1633
|
|
|
1586
1634
|
`theme.css` declares its layer order up front, with base inputs in `lr-theme` and built-in profile
|
|
@@ -2030,14 +2078,31 @@ upgrade:
|
|
|
2030
2078
|
```
|
|
2031
2079
|
|
|
2032
2080
|
It styles **only** `:not(:defined)` elements, inside an `@layer lr-reservations`, so it becomes inert
|
|
2033
|
-
the moment a definition upgrades and can never fight a component's own layout. It sets no
|
|
2034
|
-
no
|
|
2081
|
+
the moment a definition upgrades and can never fight a component's own layout. It sets no `:root`
|
|
2082
|
+
rules and no colors except a timeline's marker and rail (below).
|
|
2035
2083
|
|
|
2036
2084
|
**Every reservation is expressed with the same custom property and fallback token the component's
|
|
2037
2085
|
own stylesheet uses** — `--lr-chart-height` / `--lr-size-280px` for the chart family,
|
|
2038
2086
|
`--lr-map-height` for `lr-map`, `--lr-canvas-reserved-height` for graph/canvas surfaces,
|
|
2039
|
-
`--lr-flag-aspect-ratio` for `lr-flag`, `--lr-form-control-height` for the field controls,
|
|
2040
|
-
|
|
2087
|
+
`--lr-flag-aspect-ratio` for `lr-flag`, `--lr-form-control-height` for the field controls,
|
|
2088
|
+
`--lr-checkbox-label-indent` and `--lr-icon-button-size` for `lr-checkbox`, `--lr-badge-min-height`,
|
|
2089
|
+
`--lr-badge-padding-inline` and `--lr-badge-font-size` for `lr-badge`, `--lr-chat-composer-padding`
|
|
2090
|
+
for `lr-chat-composer` (plus its `--lr-line-height-normal` textarea line under
|
|
2091
|
+
`actions-layout="below"`), and so on.
|
|
2092
|
+
|
|
2093
|
+
Covered tags: the chart family, `lr-map`, `lr-flag`, `lr-flow-canvas`, `lr-graph`,
|
|
2094
|
+
`lr-knowledge-graph-explorer`, the inline form-control row (`lr-input`, `lr-number-input`,
|
|
2095
|
+
`lr-select`, `lr-combobox`, `lr-date-input`, `lr-phone-input`, `lr-color-picker`, `lr-button`,
|
|
2096
|
+
`lr-icon-button`), `lr-checkbox`, `lr-badge`, `lr-chat-composer`, the vertical flow
|
|
2097
|
+
`lr-timeline`/`lr-timeline-item` pair, and the tab trio `lr-tab-group`/`lr-tab`/`lr-tab-panel`.
|
|
2098
|
+
A timeline is the one reservation that paints color: its markers and rail, from the
|
|
2099
|
+
`--lr-timeline-marker-*`/`--lr-timeline-rail-*` tokens, plus CSS-counter step numbers for an
|
|
2100
|
+
`ordered` timeline, so a static page reads as a complete list before upgrade. Before upgrade a tab group lays its descriptors out as one
|
|
2101
|
+
row of tab-sized boxes and shows only the panel that will be shown (the one marked `active`, else
|
|
2102
|
+
the first), for the default top `placement`. The text-bearing reservations (`lr-checkbox`,
|
|
2103
|
+
`lr-badge`, the tab trio) also set `font-family: var(--lr-font)`, as every defined Lyra host does,
|
|
2104
|
+
because the reserved box is measured from the same text. The badge and checkbox reservations cover
|
|
2105
|
+
their default `m` size; a non-default `size` reserves the default footprint. That is the point of shipping it rather than documenting measured pixel values: a hand-written
|
|
2041
2106
|
reservation rots silently the moment a component's default changes, whereas these track it, and
|
|
2042
2107
|
theming a component through its documented custom property re-themes its reservation with it.
|
|
2043
2108
|
|
|
@@ -3033,6 +3098,40 @@ component section instead of assuming every peer user renders an `<lr-skeleton>`
|
|
|
3033
3098
|
degraded state. `lr-phone-input` is the exception to dynamic peer import: it takes a consumer-built
|
|
3034
3099
|
adapter (`loadLibphonenumberAdapter()`) rather than importing `libphonenumber-js` itself.
|
|
3035
3100
|
|
|
3101
|
+
### Bundling without an optional peer
|
|
3102
|
+
|
|
3103
|
+
A peer you do not install needs no bundler configuration: published peer imports build without it.
|
|
3104
|
+
Using a component that needs a missing peer then shows that component's documented failure state at
|
|
3105
|
+
run time, so sanitized content stays unrendered rather than falling back to raw markup.
|
|
3106
|
+
|
|
3107
|
+
| Toolchain | Missing peer at build time |
|
|
3108
|
+
|---|---|
|
|
3109
|
+
| esbuild, Angular `application` builder, Vite, Bun, Next.js | Builds. |
|
|
3110
|
+
| webpack, Rspack, Rollup | Builds, with an unresolved-module warning for each peer. |
|
|
3111
|
+
| Parcel | Fails. Alias the peer to nothing, as below. |
|
|
3112
|
+
|
|
3113
|
+
For Parcel, list each peer it reports, and its subpaths, in the application's `package.json`:
|
|
3114
|
+
|
|
3115
|
+
```json
|
|
3116
|
+
{
|
|
3117
|
+
"alias": {
|
|
3118
|
+
"dompurify": false,
|
|
3119
|
+
"maplibre-gl": false,
|
|
3120
|
+
"@aceshooting/lyra-map": false,
|
|
3121
|
+
"@aceshooting/lyra-map/*": false
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
```
|
|
3125
|
+
|
|
3126
|
+
To silence the webpack or Rspack warnings, ignore the peers:
|
|
3127
|
+
|
|
3128
|
+
```js
|
|
3129
|
+
new webpack.IgnorePlugin({ resourceRegExp: /^(dompurify|maplibre-gl|@aceshooting\/lyra-map)(\/|$)/ });
|
|
3130
|
+
```
|
|
3131
|
+
|
|
3132
|
+
A bundler that resolves a peer you did install still places it in its own lazy chunk, so installing
|
|
3133
|
+
one does not grow the initial bundle.
|
|
3134
|
+
|
|
3036
3135
|
### Experimental DOCX editing companion
|
|
3037
3136
|
|
|
3038
3137
|
Use `@aceshooting/lyra-docs` for editing; `lr-docx-viewer` remains a viewer in Lyra UI.
|