@aceshooting/lyra-ui 31.0.0 → 31.1.1
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 +129 -0
- package/dist/autoloader-cdn.js +1 -1
- package/dist/components/agent-tools/budget-meter/budget-meter.class.d.ts +12 -1
- package/dist/components/agent-tools/budget-meter/budget-meter.class.js +4 -4
- package/dist/components/charts/chart/lite-chart.class.js +1 -1
- package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +18 -8
- package/dist/components/conversation/chat-composer/chat-composer.class.js +11 -9
- package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
- package/dist/components/conversation/message-feedback/message-feedback.class.d.ts +11 -3
- package/dist/components/conversation/message-feedback/message-feedback.class.js +12 -6
- package/dist/components/conversation/message-feedback/message-feedback.styles.js +1 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +6 -3
- package/dist/components/conversation/prompt-input/prompt-input.class.js +3 -2
- package/dist/components/conversation/push-to-talk/push-to-talk.class.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.d.ts +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.js +2 -2
- package/dist/components/data/document-library/document-library-cursor.js +1 -0
- package/dist/components/data/document-library/document-library-types.d.ts +20 -0
- package/dist/components/data/document-library/document-library.class.d.ts +37 -26
- package/dist/components/data/document-library/document-library.class.js +20 -11
- package/dist/components/data/document-library/document-library.styles.js +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -1
- package/dist/components/data/timeline/timeline.class.js +1 -1
- package/dist/components/forms/combobox/combobox.class.d.ts +20 -12
- package/dist/components/forms/combobox/combobox.class.js +2 -2
- package/dist/components/layout/dock-panel/dock-panel.class.d.ts +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.js +1 -1
- package/dist/components/layout/page/page.class.d.ts +3 -3
- package/dist/components/layout/page/page.class.js +1 -1
- package/dist/components/layout/segmented/segmented.class.d.ts +20 -7
- package/dist/components/layout/segmented/segmented.class.js +34 -24
- package/dist/components/layout/segmented/segmented.styles.js +1 -1
- package/dist/components/layout/stepper/stepper.styles.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/media/map/map-anchor-controller.js +1 -1
- package/dist/components/media/map/map-canvas-target.js +1 -0
- package/dist/components/media/map/map.class.d.ts +10 -1
- package/dist/components/media/map/map.class.js +4 -4
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +21 -9
- package/dist/components/media/sequence-playback/sequence-playback.class.js +7 -6
- package/dist/components/media/sequence-playback/sequence-playback.styles.js +1 -1
- package/dist/components/overlays/overlay/overlay.styles.js +1 -1
- package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.d.ts +11 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.js +1 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +18 -7
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +13 -26
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +1 -1
- package/dist/components/utility/diff-view/diff-view.class.d.ts +5 -5
- package/dist/components/utility/diff-view/diff-view.class.js +1 -1
- package/dist/components/utility/icon/icon.class.js +1 -1
- package/dist/components/viewers/archive-viewer/archive-viewer.class.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/document-preview/document-preview.class.js +2 -2
- package/dist/components/viewers/docx-viewer/docx-viewer.class.d.ts +1 -1
- package/dist/components/viewers/docx-viewer/docx-viewer.class.js +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -2
- package/dist/components/viewers/html-viewer/html-viewer.class.js +1 -1
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +1 -1
- package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
- package/dist/components/viewers/svg-viewer/svg-viewer.class.js +1 -1
- package/dist/components/viewers/xml-viewer/xml-viewer.class.js +2 -2
- package/dist/data-sources.d.ts +10 -0
- package/dist/events.d.ts +9 -4
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/default-strings/conversation.generated.js +1 -1
- package/dist/internal/default-strings/data.generated.js +1 -1
- package/dist/internal/default-strings/retrieval.generated.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/native-modal-context.js +1 -1
- package/dist/internal/overlay-manager.js +1 -1
- package/dist/internal/overlay-order.js +1 -1
- package/dist/internal/overlay-stack.js +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/runtime-diagnostics.js +1 -0
- package/dist/internal/source-cursor-controller.js +1 -0
- package/dist/internal/source-cursor-projection.js +1 -0
- package/dist/internal/source-page-scope.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/theme/theme-bootstrap.js +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/utilities/overlay-manager.d.ts +2 -0
- package/llms/components/lr-budget-meter.md +31 -0
- package/llms/components/lr-chat-composer.md +13 -2
- package/llms/components/lr-combobox.md +27 -1
- package/llms/components/lr-diff-view.md +6 -0
- package/llms/components/lr-document-library.md +90 -6
- package/llms/components/lr-graph.md +5 -0
- package/llms/components/lr-ingestion-queue.md +76 -8
- package/llms/components/lr-json-viewer.md +34 -0
- package/llms/components/lr-lite-chart.md +2 -1
- package/llms/components/lr-map.md +33 -0
- package/llms/components/lr-message-feedback.md +38 -3
- package/llms/components/lr-page.md +4 -2
- package/llms/components/lr-prompt-input.md +5 -2
- package/llms/components/lr-segmented.md +30 -10
- package/llms/components/lr-sequence-playback.md +47 -12
- package/llms/components/lr-virtual-list.md +3 -1
- package/llms/peers.md +2 -2
- package/llms/shared/events-and-types.md +61 -2
- package/llms/shared/forms-and-accessibility.md +25 -0
- package/llms/shared/imports-and-registration.md +154 -110
- package/llms/shared/testing-and-utilities.md +5 -1
- package/llms/shared.md +245 -113
- package/locales.json +1 -1
- package/package.json +8 -8
- package/registrations.json +1 -1
package/llms/shared.md
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
<!-- GENERATED by scripts/build-llms.mjs from llms/shared/*.md — do not edit this file. -->
|
|
2
2
|
## Component status, versioning, and deprecation
|
|
3
3
|
|
|
4
|
-
Every public `lr-*` component
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- **
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
version. If an API is deprecated in major version M, it remains available for the complete M+1
|
|
17
|
-
release line and cannot be removed before M+2. This policy applies equally to stable and
|
|
18
|
-
experimental public APIs.
|
|
4
|
+
Every public `lr-*` component records a status and `since` version in package metadata. `since`
|
|
5
|
+
is the earliest published release manifest containing the tag, or the current version for a new tag.
|
|
6
|
+
|
|
7
|
+
- **Stable** components support production use.
|
|
8
|
+
- **Experimental** components remain open to design review.
|
|
9
|
+
|
|
10
|
+
Once published, both statuses have full-semver protection until formal deprecation and removal; an incompatible
|
|
11
|
+
public API or behavior change requires a semver-major release.
|
|
12
|
+
|
|
13
|
+
Deprecation is explicit metadata, independent of status: it records a replacement, deprecation version,
|
|
14
|
+
rationale and earliest removal version. An API deprecated in major M remains available throughout
|
|
15
|
+
M+1 and cannot be removed before M+2, for stable and experimental APIs alike.
|
|
19
16
|
|
|
20
17
|
**9.0.0 took a one-time exception to that policy, and says so rather than quietly breaking it.**
|
|
21
18
|
Three members whose recorded removal window had genuinely opened were removed normally
|
|
@@ -31,36 +28,30 @@ customary M+1 warning period — `lr-usage-badge`'s `compact`, `lr-chart`'s `hor
|
|
|
31
28
|
a mechanical migration listed in the 9.0.0 changelog entry and in `migration.md`. From 9.0.0 onward
|
|
32
29
|
the M+2 rule applies as written; treat the above as a documented exception, not a precedent.
|
|
33
30
|
|
|
34
|
-
Deprecation
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Deprecated
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
are
|
|
42
|
-
|
|
43
|
-
The
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
way, and moving to the replacement removes the warning. A test suite that fails on console output
|
|
59
|
-
while deliberately exercising a deprecated form can pre-seed Lit's development-mode
|
|
60
|
-
`globalThis.litIssuedWarnings` set, before the element renders, with the key
|
|
61
|
-
`lyra-deprecated:<owner>:<kind>:<name>` — `<kind>` and `<name>` as in the deprecation record.
|
|
62
|
-
`<owner>` is the element name or package-relative module specifier. Theme migration guidance is in
|
|
63
|
-
[styles and tokens](./shared/styles-and-tokens.md).
|
|
31
|
+
Deprecation also covers **slot content** inside a supported slot, such as non-item menu content;
|
|
32
|
+
the slot description identifies it. Deprecated **package entry points**, **stylesheets**,
|
|
33
|
+
**exported types/functions/constants**, and **global events/root attributes** appear under
|
|
34
|
+
"Deprecated package exports" in `llms/index.md`. Named exports also carry `@deprecated` for editors.
|
|
35
|
+
Component records appear in the `llms/components/<tag>.md` header and `custom-elements.json`
|
|
36
|
+
(from `@aceshooting/lyra-ide`): declaration `deprecations` contain records, and a member's
|
|
37
|
+
`deprecationRef` identifies one as `kind:name`. Generic CEM readers can use `deprecated`.
|
|
38
|
+
These records are exhaustive; audit upgrades against them, not console output.
|
|
39
|
+
|
|
40
|
+
**Development warnings.** The `development` package condition includes deprecation diagnostics;
|
|
41
|
+
the default production condition omits them. With Lit's development build, some deprecated usages
|
|
42
|
+
emit `console.warn` naming the element or module, API and replacement, once per page for each
|
|
43
|
+
owner/API. Observable usages include setting a deprecated property/attribute, connecting a tag,
|
|
44
|
+
vetoing through an alias event or calling a function. Deprecated forms keep working; adopting the
|
|
45
|
+
replacement removes the warning. Production never emits these deprecation warnings.
|
|
46
|
+
|
|
47
|
+
Warnings require cheap, exact observation. Many deprecations never warn, including slot content
|
|
48
|
+
(`lr-stat`'s default-slot icon and `lr-menu`'s non-item default-slot content) and unobservable CSS
|
|
49
|
+
parts, custom properties and custom states. A silent console does not prove absence of deprecated
|
|
50
|
+
usage. Tests deliberately exercising it can pre-seed Lit's development-mode
|
|
51
|
+
`globalThis.litIssuedWarnings` set before rendering with
|
|
52
|
+
`lyra-deprecated:<owner>:<kind>:<name>`: `<kind>`/`<name>` come from the record; `<owner>` is the
|
|
53
|
+
element name or package-relative module specifier. See [styles and tokens](./shared/styles-and-tokens.md)
|
|
54
|
+
for theme migration.
|
|
64
55
|
|
|
65
56
|
### Release history and upgrade notes
|
|
66
57
|
|
|
@@ -76,16 +67,12 @@ registration-free `.class.js` subpath, the split SSR/hydration entries, and the
|
|
|
76
67
|
|
|
77
68
|
### The support window
|
|
78
69
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
floors are derived from those platform features rather than individually verified version-by-version.
|
|
86
|
-
Raising any floor is a semver-major change. Full policy, including the known WebKit
|
|
87
|
-
cross-shadow-selection gap and the
|
|
88
|
-
rule for when a `@supports` fallback may be dropped:
|
|
70
|
+
The published support window is Chromium 120+, Gecko 121+, WebKit 16.4+ and Node 22+ (ESM only,
|
|
71
|
+
no CommonJS entry). These floors derive from `:dir()`, `:has()`, `@container`, `color-mix()` and
|
|
72
|
+
`ElementInternals` form association, not individual version-by-version verification. Lyra ships
|
|
73
|
+
untranspiled ES2022 modules without polyfills or build-time downleveling. There is no `browserslist`
|
|
74
|
+
field: it would describe a build step Lyra does not have. Raising a floor is semver-major. Full policy, including WebKit's
|
|
75
|
+
cross-shadow-selection gap and conditions for dropping a `@supports` fallback:
|
|
89
76
|
<https://github.com/aceshooting/lyra-ui/blob/main/docs/support-policy.md>.
|
|
90
77
|
|
|
91
78
|
## Importing and registering components
|
|
@@ -98,9 +85,8 @@ import "@aceshooting/lyra-ui/components/lr-combobox.js"; // registers <lr-combob
|
|
|
98
85
|
import "@aceshooting/lyra-ui/components/lr-table.js"; // registers <lr-table>
|
|
99
86
|
```
|
|
100
87
|
|
|
101
|
-
Family
|
|
102
|
-
|
|
103
|
-
do not register a tag.
|
|
88
|
+
Family barrels register their family. Registration-free `.class.js` entries retain the owning
|
|
89
|
+
family/component path, exposing source organization.
|
|
104
90
|
|
|
105
91
|
New application code can import any component through its stable tag-shaped path:
|
|
106
92
|
|
|
@@ -110,8 +96,8 @@ import "@aceshooting/lyra-ui/components/lr-menubar.js";
|
|
|
110
96
|
import "@aceshooting/lyra-ui/components/lr-tool-call-block.js";
|
|
111
97
|
```
|
|
112
98
|
|
|
113
|
-
`llms/index.md` lists
|
|
114
|
-
|
|
99
|
+
`llms/index.md` lists tags and implementation modules; stable aliases and family barrels resolve
|
|
100
|
+
through component exports.
|
|
115
101
|
|
|
116
102
|
The package root is a pure, side-effect-free export surface. Import a component entry to register
|
|
117
103
|
only that tag, or use the explicit `all.js` entry when whole-library registration is needed:
|
|
@@ -120,11 +106,9 @@ only that tag, or use the explicit `all.js` entry when whole-library registratio
|
|
|
120
106
|
import "@aceshooting/lyra-ui/all.js"; // explicitly registers the root-included tags
|
|
121
107
|
```
|
|
122
108
|
|
|
123
|
-
The
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
remain side-effectful convenience entries; prefer tag-shaped imports for smaller application
|
|
127
|
-
bundles.
|
|
109
|
+
The root exports shared utilities/types, not component constructors. Use a component's owning
|
|
110
|
+
`.class.js` for its class and tag-shaped entry to register it. Family barrels and `all.js` remain
|
|
111
|
+
side-effectful conveniences; prefer tag imports for smaller bundles.
|
|
128
112
|
|
|
129
113
|
The entry points, then:
|
|
130
114
|
|
|
@@ -137,11 +121,11 @@ The entry points, then:
|
|
|
137
121
|
one warning for that exact conflict with the existing/incoming package versions, constructor
|
|
138
122
|
names, and both constructor references. An existing non-Lyra definition is reported with an
|
|
139
123
|
`unknown` existing version rather than guessed provenance.
|
|
140
|
-
- **Root barrel.** `import '@aceshooting/lyra-ui';` registers **nothing**.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
124
|
+
- **Root barrel.** `import '@aceshooting/lyra-ui';` registers **nothing**. Its broad compatibility
|
|
125
|
+
surface of commonly used classes, helpers and types is not exhaustive for component-owned types
|
|
126
|
+
or future exports. Prefer the owning entry for that component's complete contract and smaller
|
|
127
|
+
bundles.
|
|
128
|
+
|
|
145
129
|
- **`all.js` compatibility entry.** `import '@aceshooting/lyra-ui/all.js';` registers the 296
|
|
146
130
|
root-included tags — everything **except** the 15 inventory-designated optional-peer-family tags:
|
|
147
131
|
`lr-chart` and its 8 typed subclasses (`lr-line-chart`, `lr-bar-chart`, `lr-pie-chart`,
|
|
@@ -192,11 +176,76 @@ The entry points, then:
|
|
|
192
176
|
`waitForLyraElement()`/`waitForToast()` for awaiting a lazily registered mount),
|
|
193
177
|
`@aceshooting/lyra-ui/utilities/*` (the curated shared helpers, all documented below).
|
|
194
178
|
|
|
179
|
+
### One runtime per document
|
|
180
|
+
|
|
181
|
+
Active Lyra components and overlay utilities in a `Document`, including lazy chunks, must share
|
|
182
|
+
one evaluated `@aceshooting/lyra-ui` graph. Identical versions/archive bytes can still produce
|
|
183
|
+
separate runtimes through different optional-peer contexts. Matching versions or avoiding tag
|
|
184
|
+
conflicts does not share Escape, focus, modal inertness, scroll-lock or native-modal coordination.
|
|
185
|
+
Shadow roots/scoped registries do not isolate these resources; separate documents are independent.
|
|
186
|
+
|
|
187
|
+
Choose the application that owns UI and its required optional peers. For a Vite application whose
|
|
188
|
+
project root directly depends on UI, configure
|
|
189
|
+
[`resolve.dedupe`](https://vite.dev/config/shared-options#resolve-dedupe):
|
|
190
|
+
|
|
191
|
+
```js
|
|
192
|
+
import { defineConfig } from 'vite';
|
|
193
|
+
|
|
194
|
+
export default defineConfig({
|
|
195
|
+
resolve: { dedupe: ['@aceshooting/lyra-ui'] },
|
|
196
|
+
});
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
A shared build root without that dependency must explicitly select the owning application's
|
|
200
|
+
public UI exports. For Vite 8, this example uses a
|
|
201
|
+
[pre-enforced resolver](https://vite.dev/guide/api-plugin#plugin-ordering) and the same resolver
|
|
202
|
+
in [dependency optimization](https://vite.dev/config/dep-optimization-options#optimizedeps-rolldownoptions):
|
|
203
|
+
|
|
204
|
+
```js
|
|
205
|
+
import { createRequire } from 'node:module';
|
|
206
|
+
import { defineConfig } from 'vite';
|
|
207
|
+
|
|
208
|
+
const application = createRequire(new URL('./app/package.json', import.meta.url));
|
|
209
|
+
const resolveUi = () => ({
|
|
210
|
+
name: 'application-ui-runtime',
|
|
211
|
+
resolveId(source) {
|
|
212
|
+
return /^@aceshooting\/lyra-ui(?:\/.*)?$/u.test(source)
|
|
213
|
+
? application.resolve(source)
|
|
214
|
+
: null;
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
export default defineConfig({
|
|
219
|
+
resolve: { dedupe: ['@aceshooting/lyra-ui'] },
|
|
220
|
+
plugins: [{ ...resolveUi(), enforce: 'pre' }],
|
|
221
|
+
optimizeDeps: { rolldownOptions: { plugins: [resolveUi()] } },
|
|
222
|
+
});
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Replace `./app/package.json` with the owning application's manifest. UI's current default public
|
|
226
|
+
exports support `createRequire().resolve()` without assuming install layout or importing CommonJS.
|
|
227
|
+
Import-only companion exports instead require an ESM entry resolved in their owning application.
|
|
228
|
+
Retain that UI context's required optional peers and companion worker/renderer identity checks;
|
|
229
|
+
deduplicating incompatible peers does not repair them.
|
|
230
|
+
|
|
231
|
+
Reusable libraries should peer-depend on UI and externalize its root and every public subpath,
|
|
232
|
+
without bundling a separate copy. Verify actually served development dependencies and production
|
|
233
|
+
module graphs, including lazy imports: development optimization can collapse copies that remain
|
|
234
|
+
split in production. Alias the whole package, never an internal owner or diagnostic module.
|
|
235
|
+
|
|
236
|
+
Active use of a second instrumented runtime emits one `[lr-runtime-duplicate]` warning per
|
|
237
|
+
document, including when versions match. It detects an unsupported split runtime; it does not
|
|
238
|
+
merge or repair overlay state. Passive imports and SSR do not claim a document. If the document's
|
|
239
|
+
diagnostic marker cannot be used, `[lr-runtime-diagnostic-unavailable]` is bounded to once per
|
|
240
|
+
runtime per document; components continue to operate. A throwing console logger does not abort
|
|
241
|
+
connection or overlay acquisition. Silence is not proof of correct bundling: older uninstrumented
|
|
242
|
+
copies and partial internal deduplication can escape detection. Keep the whole-package singleton
|
|
243
|
+
configuration even when no warning appears.
|
|
244
|
+
|
|
195
245
|
### Registration-free component helpers
|
|
196
246
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
normalization as a component without registering it:
|
|
247
|
+
These public, side-effect-free helpers share component data normalization without defining custom
|
|
248
|
+
elements, for server, worker or application code:
|
|
200
249
|
|
|
201
250
|
```ts
|
|
202
251
|
import {
|
|
@@ -231,17 +280,17 @@ also renders that component.
|
|
|
231
280
|
|
|
232
281
|
### Optional autoloader
|
|
233
282
|
|
|
234
|
-
`@aceshooting/lyra-ui/autoloader.js` exports `discover(root?, options?)`, `start(root?, options?)
|
|
235
|
-
and `stop()`. It
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
283
|
+
`@aceshooting/lyra-ui/autoloader.js` exports `discover(root?, options?)`, `start(root?, options?)`
|
|
284
|
+
and `stop()`. It independently loads known tags for component splitting; granular imports stay
|
|
285
|
+
independent. Importing it has no side effects or registrations.
|
|
286
|
+
|
|
287
|
+
- `discover()` scans once. `start()` scans, then watches dynamic/Turbo-style replacement subtrees,
|
|
288
|
+
stopping any previous watcher. Idempotent `stop()` disconnects it, invalidates pending definitions
|
|
289
|
+
and removes loader-owned markers.
|
|
290
|
+
- Root defaults to `document`: accept a `Document`, `DocumentFragment`/open `ShadowRoot` or
|
|
291
|
+
`Element`. Traverse caller-owned open shadows iteratively and use each element's owning/scoped
|
|
292
|
+
custom-element registry, never an unrelated global registry.
|
|
293
|
+
|
|
245
294
|
- `maxElements` (default `10_000`), `maxRoots` (`2_000`), `maxDepth` (`256`), and `maxWork`
|
|
246
295
|
(`100_000`) bound one complete discovery operation. `maxConcurrency` (`16`) bounds concurrent
|
|
247
296
|
definition and first-update tasks. Invalid limits throw `RangeError`; an initial `discover()` or
|
|
@@ -286,9 +335,9 @@ and both are safe to import in plain Node.
|
|
|
286
335
|
## Optional native scoped registries
|
|
287
336
|
|
|
288
337
|
`utilities/scoped-registry.js` exports `supportsScopedRegistries()` and
|
|
289
|
-
`createScopedRegistry(definitions, { document? })`.
|
|
290
|
-
|
|
291
|
-
|
|
338
|
+
`createScopedRegistry(definitions, { document? })`. Creation checks optional native support and
|
|
339
|
+
rejects unsupported browsers/SSR; no polyfill or global fallback is installed. Ordinary registration
|
|
340
|
+
imports retain global behavior.
|
|
292
341
|
|
|
293
342
|
Use class-only imports and provide full tag names, including composed children:
|
|
294
343
|
|
|
@@ -337,29 +386,24 @@ creation in third-party factories is not intercepted; those factories must use t
|
|
|
337
386
|
|
|
338
387
|
## Collection identity
|
|
339
388
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
Lyra does not rewrite a valid retained identity merely to validate it. When normalization is part
|
|
359
|
-
of that contract, the normalized value is the identity used consistently for duplicate detection,
|
|
360
|
-
selection, persistence, keyed DOM ownership, and event details. Assign a new collection when the
|
|
361
|
-
data changes, and keep the business identity stable across object replacement so those consumers
|
|
362
|
-
continue to follow the same logical record.
|
|
389
|
+
Each host collection declares an identity policy. Actionable/keyed collections require stable,
|
|
390
|
+
nonempty business identities: ignore malformed identities and later duplicates before rendering,
|
|
391
|
+
counting, focus reconciliation, selection lookup, persistence or events. First valid occurrence
|
|
392
|
+
wins; reordering never makes array position its identity. Intentionally repeated values remain,
|
|
393
|
+
with an occurrence index in every state/event addressing one; the component documents this.
|
|
394
|
+
|
|
395
|
+
Controlled properties, persisted/active fields and action details use the same domain names rather than
|
|
396
|
+
`HTMLElement.id`: e.g. `panelId`, `commandId`, `cellId`, `stepId`, `viewId`, `attachmentId`, `cueId`,
|
|
397
|
+
`highlightId` and `spanId`. Compound identities retain all scope fields, e.g.
|
|
398
|
+
`{ invocationId, sourceKey }`. Published input records may retain established `id`/`key`/`path`
|
|
399
|
+
spellings while applying their documented uniqueness/occurrence policy and exposing domain-named
|
|
400
|
+
controlled state/action details.
|
|
401
|
+
|
|
402
|
+
Empty/whitespace-only required identities are missing. Valid retained identities are not rewritten
|
|
403
|
+
for validation unless the component explicitly documents and tests normalization, such as trimming.
|
|
404
|
+
Then use the normalized identity consistently for duplicates, selection, persistence, keyed DOM
|
|
405
|
+
ownership and event details. Assign a new collection when data changes; retain business identities
|
|
406
|
+
across object replacement so consumers follow the same logical records.
|
|
363
407
|
|
|
364
408
|
## Events
|
|
365
409
|
|
|
@@ -485,8 +529,9 @@ a capped prefix does not provide access to a million-record source.
|
|
|
485
529
|
|
|
486
530
|
The host owns each source and its indexes, storage and query work. Keep its revision, counts,
|
|
487
531
|
records and returned projections immutable for a request snapshot. Revisions are nonempty strings
|
|
488
|
-
or finite numbers; counts, offsets and record orders are nonnegative safe integers.
|
|
489
|
-
identify logical records, and `order` is canonical source order
|
|
532
|
+
or finite numbers; where present, counts, offsets and record orders are nonnegative safe integers.
|
|
533
|
+
Nonempty keys identify logical records, and a counted record's `order` is canonical source order
|
|
534
|
+
independent of query sorting. Cursor records instead carry only key/value identity.
|
|
490
535
|
A provider can generate or fetch a requested window without allocating an array for the entire collection.
|
|
491
536
|
Arbitrary work inside a host callback remains the host's responsibility.
|
|
492
537
|
|
|
@@ -509,6 +554,14 @@ Choose the access shape that matches the host's data:
|
|
|
509
554
|
`total` describes every query match, not loaded rows; group ranges describe the globally
|
|
510
555
|
ordered query and facets describe the full source catalogue. A declared `Summary` is required
|
|
511
556
|
in each result, while the default `undefined` summary can be omitted.
|
|
557
|
+
- `LyraCursorSource<T, Q>` supplies unknown-total continuation batches without `total`, `order`,
|
|
558
|
+
lookup or locate. Its nonempty `scope` is an identity namespace; a compatible scope keeps keys
|
|
559
|
+
meaningful across query/revision changes. `query(request: LyraCursorRequest<Q>)` receives
|
|
560
|
+
`{ scope, revision, locale, signal, query, cursor, limit }` and resolves `LyraCursorResult<T>`:
|
|
561
|
+
`{ rows: readonly LyraCursorRecord<T>[]; nextCursor: string | null }`, where each record is
|
|
562
|
+
readonly `{ key: string; value: T }`. `cursor: null` starts a query and `nextCursor: null` ends
|
|
563
|
+
continuation; nonempty string tokens remain opaque and may continue an empty/short batch. They do
|
|
564
|
+
not promise another record or a total. The provider applies the full query before paging.
|
|
512
565
|
- `LyraTabularSource` has separate column metadata and zero-based body rows, using either
|
|
513
566
|
`cellAt` or bounded rectangular `readCells`. `LyraWorkbookSource` names sheets separately.
|
|
514
567
|
Search results use a bounded hit list, `total: null` when the global total is unknown, and
|
|
@@ -522,6 +575,26 @@ Choose the access shape that matches the host's data:
|
|
|
522
575
|
bins. Global node/edge totals, scene coverage and displayed counts have distinct meanings;
|
|
523
576
|
a neighborhood or aggregate scene is not a complete graph layout.
|
|
524
577
|
|
|
578
|
+
Cursor binding is supported by **`lr-document-library.cursorSource` only**; the type declaration
|
|
579
|
+
does not enable it on other provider components. Choose exactly one of that input and its
|
|
580
|
+
counted `dataSource`. The table shows the current batch, `sourcePage` is inactive, and
|
|
581
|
+
`sourceTotal` remains `null`, including at the end. No facet catalogue, match total, absolute
|
|
582
|
+
membership or global selection is inferred from batches. Selected IDs are explicit unverified
|
|
583
|
+
intent; page selection preserves off-page IDs and the host validates them before mutations. A
|
|
584
|
+
different scope clears prior intent; assign the new `cursorSource` before restoring selected IDs.
|
|
585
|
+
|
|
586
|
+
The document cursor adapter bounds requests to 1–500 rows (default 100), scope/string-revision/
|
|
587
|
+
token text to 8,192 UTF-16 units, and visited request-cursor history to 32 entries including current.
|
|
588
|
+
Previous refetches; Start over discards history. It retains no old page rows, persisted tokens or
|
|
589
|
+
prefetch work. `LyraCursorSourceStatus` and the frozen `LyraCursorNavigationState` expose only
|
|
590
|
+
`status`, `canGoBack`, `canGoForward`, `atEnd` and `historyTruncated`; tokens never enter public
|
|
591
|
+
navigation state or events. User search edits emit `lr-query-change` without a match count;
|
|
592
|
+
existing counted `lr-filter-change` keeps its numeric contract. Source reassignment, refresh,
|
|
593
|
+
query/locale/limit change or reconnect starts at `null`; named visual paints do not refetch.
|
|
594
|
+
Callbacks must settle promptly on abort because the physical query permit is held until actual
|
|
595
|
+
settlement. See [document-library](./components/lr-document-library.md) for row/input admission bounds,
|
|
596
|
+
retry semantics, method results, selection binding order and navigation parts.
|
|
597
|
+
|
|
525
598
|
Numeric helpers inspect all source positions in bounded chunks. Preparation has total O(n)
|
|
526
599
|
source-read work per pass, plus reducer work, even though each chunk and the retained result are
|
|
527
600
|
bounded. The default `batchSize` is 2,048 and its maximum is 8,192; it must be a positive safe
|
|
@@ -734,6 +807,31 @@ activation.
|
|
|
734
807
|
`lr-time-range` is form-associated only for fieldset-cascaded disablement: no submission value,
|
|
735
808
|
no state restoration.
|
|
736
809
|
|
|
810
|
+
### Hiding the label visually: `label-display`
|
|
811
|
+
|
|
812
|
+
On controls that expose `labelDisplay: LyraLabelDisplay` (`'visible' | 'hidden'`, reflected as
|
|
813
|
+
`label-display`), use `label-display="hidden"` to visually hide the existing field caption without
|
|
814
|
+
removing its accessible-name relationship. The caption leaves normal layout but remains available
|
|
815
|
+
to assistive technology. Keep a meaningful `label` or documented label slot; the display setting
|
|
816
|
+
does not supply a label. A host `aria-label` retains its documented naming precedence.
|
|
817
|
+
|
|
818
|
+
The display choice affects the `form-control-label` part only: hint/error text, their description
|
|
819
|
+
relationships, required semantics and validation are unchanged. It does not hide the whole control.
|
|
820
|
+
The default is `'visible'` on `lr-input`, `lr-number-input`, `lr-time-input`, `lr-textarea`,
|
|
821
|
+
`lr-select`, `lr-combobox`, `lr-date-input`, `lr-phone-input`, `lr-token-input`, `lr-locale-picker`,
|
|
822
|
+
`lr-country-picker`, `lr-currency-picker`, `lr-time-zone-picker`, `lr-unit-picker`, `lr-model-select`
|
|
823
|
+
and `lr-voice-picker`. `lr-segmented` uses the same vocabulary but defaults to `'hidden'`; set
|
|
824
|
+
`label-display="visible"` to add its field caption. Supporting text follows each component's own
|
|
825
|
+
hint/error API; `lr-segmented` provides a hint, not form validation or an error field.
|
|
826
|
+
|
|
827
|
+
```js
|
|
828
|
+
import '@aceshooting/lyra-ui/components/lr-select.js';
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
```html
|
|
832
|
+
<lr-select label="Sort order" label-display="hidden"></lr-select>
|
|
833
|
+
```
|
|
834
|
+
|
|
737
835
|
### Enter submits the form
|
|
738
836
|
|
|
739
837
|
A native `<input>` submits its form owner when the user presses Enter. The `<input>` these controls
|
|
@@ -4043,7 +4141,11 @@ animationName: string, options?: LyraGetAnimationOptions): LyraResolvedElementAn
|
|
|
4043
4141
|
- **`overlay-manager` → `activateOverlay(options): OverlayHandle` and
|
|
4044
4142
|
`suspendLyraModalsFor(externalModal): () => void`** — per-`Document` coordination used by Lyra's
|
|
4045
4143
|
modal and focus-returning overlay surfaces, including dialogs/drawers, Page/app navigation,
|
|
4046
|
-
command/tool surfaces, lightbox/tour, and responsive/floating/fullscreen panels.
|
|
4144
|
+
command/tool surfaces, lightbox/tour, and responsive/floating/fullscreen panels. Components and
|
|
4145
|
+
utility imports must use [one application-owned runtime per document](./shared/imports-and-registration.md#one-runtime-per-document),
|
|
4146
|
+
including lazy chunks; equal versions do not make separate package copies coordinate.
|
|
4147
|
+
`[lr-runtime-duplicate]` detects unsupported split-runtime use without merging its state.
|
|
4148
|
+
All entries in the supported runtime share
|
|
4047
4149
|
one topmost stack: only the top entry handles Escape, Tab
|
|
4048
4150
|
trapping, and backdrop dismissal. Content outside the active modal's composed path is inert,
|
|
4049
4151
|
including lower overlays and page content added while it is open. Focus traversal crosses slots
|
|
@@ -4725,6 +4827,36 @@ These named interfaces and helper signatures are available to typed integrations
|
|
|
4725
4827
|
scene(request: LyraGraphSceneRequest): Promise<LyraGraphScene<N, E>>;
|
|
4726
4828
|
overview?(request: LyraSourceContext & { readonly limit: number }): Promise<LyraGraphOverview>;
|
|
4727
4829
|
}`
|
|
4830
|
+
`LyraCursorRecord<T> {
|
|
4831
|
+
readonly key: string;
|
|
4832
|
+
readonly value: T;
|
|
4833
|
+
}`
|
|
4834
|
+
`LyraCursorRequest<Q> extends LyraSourceContext {
|
|
4835
|
+
readonly revision: LyraSourceRevision;
|
|
4836
|
+
readonly locale: string;
|
|
4837
|
+
readonly signal: AbortSignal;
|
|
4838
|
+
readonly scope: string;
|
|
4839
|
+
readonly query: Q;
|
|
4840
|
+
readonly cursor: string | null;
|
|
4841
|
+
readonly limit: number;
|
|
4842
|
+
}`
|
|
4843
|
+
`LyraCursorResult<T> {
|
|
4844
|
+
readonly rows: readonly LyraCursorRecord<T>[];
|
|
4845
|
+
readonly nextCursor: string | null;
|
|
4846
|
+
}`
|
|
4847
|
+
`LyraCursorSource<T, Q> {
|
|
4848
|
+
readonly revision: LyraSourceRevision;
|
|
4849
|
+
readonly scope: string;
|
|
4850
|
+
query(request: LyraCursorRequest<Q>): Promise<LyraCursorResult<T>>;
|
|
4851
|
+
}`
|
|
4852
|
+
`LyraCursorSourceStatus = 'idle' | 'loading' | 'ready' | 'error'`
|
|
4853
|
+
`LyraCursorNavigationState {
|
|
4854
|
+
readonly status: LyraCursorSourceStatus;
|
|
4855
|
+
readonly canGoBack: boolean;
|
|
4856
|
+
readonly canGoForward: boolean;
|
|
4857
|
+
readonly atEnd: boolean;
|
|
4858
|
+
readonly historyTruncated: boolean;
|
|
4859
|
+
}`
|
|
4728
4860
|
|
|
4729
4861
|
- **`utilities-data-preparation-contracts`** — Public staged numeric helpers and result contracts from `utilities/data-preparation.js`. Preparation reads the full immutable source in bounded chunks; retained summaries are distinct from source counts. Inherited fields are repeated for reference. Defaulted options may be omitted.
|
|
4730
4862
|
|