@aceshooting/lyra-ui 30.5.0 → 30.7.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.
Files changed (203) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +1 -1
  3. package/dist/components/agent-tools/artifact-panel/artifact-panel.class.d.ts +7 -4
  4. package/dist/components/agent-tools/artifact-panel/artifact-panel.class.js +5 -5
  5. package/dist/components/conversation/code-block/onig.provenance.json +1 -1
  6. package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
  7. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  8. package/dist/components/conversation/markdown/markdown-core.class.d.ts +11 -1
  9. package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
  10. package/dist/components/conversation/markdown/markdown-progressive.js +2 -2
  11. package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
  12. package/dist/components/conversation/markdown/markdown-shared.js +3 -3
  13. package/dist/components/conversation/markdown/markdown.class.d.ts +11 -1
  14. package/dist/components/conversation/markdown/markdown.class.js +1 -1
  15. package/dist/components/conversation/message-parts/message-parts.class.d.ts +1 -1
  16. package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
  17. package/dist/components/conversation/message-parts/message-parts.d.ts +1 -1
  18. package/dist/components/conversation/model-select/model-select.class.d.ts +8 -1
  19. package/dist/components/conversation/model-select/model-select.class.js +2 -2
  20. package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +5 -0
  21. package/dist/components/conversation/streaming-text/streaming-text-base.class.js +2 -2
  22. package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
  23. package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
  24. package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
  25. package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
  26. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +6 -0
  27. package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
  28. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +9 -2
  29. package/dist/components/conversation/voice-picker/voice-picker.class.js +2 -2
  30. package/dist/components/conversation/widget-renderer/default-registry.js +1 -1
  31. package/dist/components/conversation/widget-renderer/registry.d.ts +1 -27
  32. package/dist/components/conversation/widget-renderer/registry.js +1 -1
  33. package/dist/components/conversation/widget-renderer/resolve.d.ts +1 -29
  34. package/dist/components/conversation/widget-renderer/resolve.js +1 -1
  35. package/dist/components/conversation/widget-renderer/widget-renderer.class.d.ts +1 -1
  36. package/dist/components/conversation/widget-renderer/widget-renderer.class.js +1 -1
  37. package/dist/components/forms/catalog-picker-base.d.ts +3 -1
  38. package/dist/components/forms/catalog-picker-base.js +3 -3
  39. package/dist/components/forms/combobox/combobox.class.d.ts +9 -2
  40. package/dist/components/forms/combobox/combobox.class.js +2 -2
  41. package/dist/components/forms/date-picker/date-input.class.d.ts +9 -2
  42. package/dist/components/forms/date-picker/date-input.class.js +2 -2
  43. package/dist/components/forms/input/input-shared.d.ts +9 -2
  44. package/dist/components/forms/input/input-shared.js +2 -2
  45. package/dist/components/forms/input/time-input.class.d.ts +9 -2
  46. package/dist/components/forms/input/time-input.class.js +2 -2
  47. package/dist/components/forms/input/time-input.styles.js +1 -1
  48. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +18 -3
  49. package/dist/components/forms/locale-picker/locale-picker.class.js +2 -2
  50. package/dist/components/forms/phone-input/phone-input.class.d.ts +9 -2
  51. package/dist/components/forms/phone-input/phone-input.class.js +2 -2
  52. package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
  53. package/dist/components/forms/select/select.class.d.ts +9 -2
  54. package/dist/components/forms/select/select.class.js +2 -2
  55. package/dist/components/forms/textarea/textarea.class.d.ts +9 -2
  56. package/dist/components/forms/textarea/textarea.class.js +2 -2
  57. package/dist/components/forms/token-input/token-input.class.d.ts +9 -2
  58. package/dist/components/forms/token-input/token-input.class.js +2 -2
  59. package/dist/components/forms/token-input/token-input.styles.js +1 -1
  60. package/dist/components/layout/dock-panel/dock-panel.class.d.ts +5 -2
  61. package/dist/components/layout/dock-panel/dock-panel.styles.js +1 -1
  62. package/dist/components/layout/menu/menu-item.class.d.ts +7 -4
  63. package/dist/components/layout/menu/menu-item.class.js +3 -2
  64. package/dist/components/layout/multi-split/multi-split.class.d.ts +73 -6
  65. package/dist/components/layout/multi-split/multi-split.class.js +4 -4
  66. package/dist/components/layout/multi-split/multi-split.styles.js +1 -1
  67. package/dist/components/layout/page/page.class.d.ts +7 -0
  68. package/dist/components/layout/page/page.styles.js +1 -1
  69. package/dist/components/media/flag/language-map.js +1 -1
  70. package/dist/components/media/image-viewer/image-viewer-panorama.d.ts +1 -5
  71. package/dist/components/media/image-viewer/image-viewer-panorama.js +1 -8
  72. package/dist/components/media/image-viewer/image-viewer.class.d.ts +1 -1
  73. package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
  74. package/dist/components/media/map/map-control-options.d.ts +7 -3
  75. package/dist/components/media/map/map-control-options.js +1 -1
  76. package/dist/components/media/map/map-controls-lifecycle.js +1 -1
  77. package/dist/components/media/map/map-feature-loader.js +1 -1
  78. package/dist/components/media/map/map-loader.d.ts +10 -4
  79. package/dist/components/media/map/map-loader.js +1 -1
  80. package/dist/components/media/map/map-scene-admission.js +1 -0
  81. package/dist/components/media/map/map-scene-completion-adapter.js +1 -0
  82. package/dist/components/media/map/map-scene-completion-camera.js +1 -0
  83. package/dist/components/media/map/map-scene-configuration-controller.js +1 -0
  84. package/dist/components/media/map/map-scene-configuration.d.ts +15 -0
  85. package/dist/components/media/map/map-scene-configuration.js +1 -0
  86. package/dist/components/media/map/map-scene-controls.js +1 -0
  87. package/dist/components/media/map/map-scene-errors.js +1 -0
  88. package/dist/components/media/map/map-scene-line-layer.js +1 -0
  89. package/dist/components/media/map/map-scene-lines.js +1 -0
  90. package/dist/components/media/map/map-scene-owner.js +1 -0
  91. package/dist/components/media/map/map-scene-position-registry.js +1 -0
  92. package/dist/components/media/map/map-scene-render-controller.js +1 -0
  93. package/dist/components/media/map/map-scene-render-input.js +1 -0
  94. package/dist/components/media/map/map-scene-source-snapshot.js +1 -0
  95. package/dist/components/media/map/map-scene-status.js +1 -0
  96. package/dist/components/media/map/map-scene-types.d.ts +55 -0
  97. package/dist/components/media/map/map.class.d.ts +60 -12
  98. package/dist/components/media/map/map.class.js +23 -6
  99. package/dist/components/media/map/map.styles.js +1 -1
  100. package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +1 -1
  101. package/dist/components/media/sequence-playback/sequence-playback.class.js +1 -1
  102. package/dist/components/media/video/video.class.d.ts +1 -1
  103. package/dist/components/media/video/video.class.js +1 -1
  104. package/dist/components/retrieval/graph/graph-builtin-3d-engine.js +1 -1
  105. package/dist/components/retrieval/graph/graph-curvature.js +1 -0
  106. package/dist/components/retrieval/graph/graph-engine-columns.js +1 -1
  107. package/dist/components/retrieval/graph/graph-model.d.ts +4 -0
  108. package/dist/components/retrieval/graph/graph-node-renderer.d.ts +13 -0
  109. package/dist/components/retrieval/graph/graph-node-renderer.js +1 -0
  110. package/dist/components/retrieval/graph/graph-source-controller.js +1 -1
  111. package/dist/components/retrieval/graph/graph-spatial-controller.js +3 -1
  112. package/dist/components/retrieval/graph/graph-spatial.js +1 -1
  113. package/dist/components/retrieval/graph/graph-webgl-engine.js +1 -1
  114. package/dist/components/retrieval/graph/graph.class.d.ts +11 -3
  115. package/dist/components/retrieval/graph/graph.class.js +4 -4
  116. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +8 -2
  117. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +4 -2
  118. package/dist/events.d.ts +36 -1
  119. package/dist/framework-types.d.ts +1 -1
  120. package/dist/internal/collection-policy.js +1 -0
  121. package/dist/internal/collection-snapshot.js +1 -1
  122. package/dist/internal/default-strings/media.generated.js +1 -1
  123. package/dist/internal/default-strings/retrieval.generated.js +1 -1
  124. package/dist/internal/engine-3d-loader.d.ts +8 -2
  125. package/dist/internal/engine-3d-loader.js +1 -1
  126. package/dist/internal/form-control.styles.js +1 -1
  127. package/dist/internal/locale-loaders.generated.js +1 -1
  128. package/dist/internal/localization-runtime.js +1 -1
  129. package/dist/internal/localization-types.d.ts +1 -1
  130. package/dist/internal/localization.js +1 -1
  131. package/dist/internal/map-camera-follow-controller.d.ts +9 -0
  132. package/dist/internal/map-camera-follow-controller.js +1 -0
  133. package/dist/internal/map-camera-follow-data.js +1 -0
  134. package/dist/internal/map-camera-follow-scene.js +1 -0
  135. package/dist/internal/map-camera-session-controller.d.ts +59 -0
  136. package/dist/internal/map-camera-session-controller.js +1 -0
  137. package/dist/internal/map-camera-session-data.d.ts +16 -0
  138. package/dist/internal/map-camera-session-data.js +1 -0
  139. package/dist/internal/map-camera-session.js +1 -0
  140. package/dist/internal/map-scene-session.js +1 -0
  141. package/dist/internal/media-panorama.d.ts +5 -0
  142. package/dist/internal/media-panorama.js +8 -0
  143. package/dist/internal/package-metadata.js +1 -1
  144. package/dist/internal/sequence-playback-binding.js +1 -0
  145. package/dist/internal/typed-columns.d.ts +3 -1
  146. package/dist/internal/typed-columns.js +1 -1
  147. package/dist/internal/variants.d.ts +7 -0
  148. package/dist/internal/widget-default-registry.js +1 -0
  149. package/dist/internal/widget-document.d.ts +29 -0
  150. package/dist/internal/widget-document.js +1 -0
  151. package/dist/internal/widget-type-registry.d.ts +27 -0
  152. package/dist/internal/widget-type-registry.js +1 -0
  153. package/dist/lyra.d.ts +1 -1
  154. package/dist/lyra.js +1 -1
  155. package/dist/map-camera-session.d.ts +10 -0
  156. package/dist/map-camera-session.js +1 -0
  157. package/dist/sequence-time-binding.d.ts +3 -0
  158. package/dist/sequence-time-binding.js +1 -0
  159. package/dist/simulation-clock.d.ts +3 -0
  160. package/dist/simulation-clock.js +1 -0
  161. package/dist/time-index.d.ts +3 -0
  162. package/dist/time-index.js +1 -0
  163. package/llms/components/lr-artifact-panel.md +8 -3
  164. package/llms/components/lr-combobox.md +2 -0
  165. package/llms/components/lr-country-picker.md +2 -0
  166. package/llms/components/lr-currency-picker.md +2 -0
  167. package/llms/components/lr-date-picker.md +2 -0
  168. package/llms/components/lr-dock-panel.md +5 -2
  169. package/llms/components/lr-graph.md +121 -3
  170. package/llms/components/lr-input.md +2 -0
  171. package/llms/components/lr-knowledge-graph-explorer.md +6 -1
  172. package/llms/components/lr-locale-picker.md +8 -1
  173. package/llms/components/lr-map.md +315 -7
  174. package/llms/components/lr-markdown-core.md +2 -1
  175. package/llms/components/lr-markdown.md +12 -1
  176. package/llms/components/lr-menu.md +5 -2
  177. package/llms/components/lr-model-select.md +2 -0
  178. package/llms/components/lr-multi-split.md +53 -4
  179. package/llms/components/lr-native-time-input.md +2 -0
  180. package/llms/components/lr-number-input.md +2 -0
  181. package/llms/components/lr-page.md +9 -1
  182. package/llms/components/lr-phone-input.md +2 -0
  183. package/llms/components/lr-select.md +2 -0
  184. package/llms/components/lr-sequence-playback.md +44 -0
  185. package/llms/components/lr-streaming-text-core.md +3 -2
  186. package/llms/components/lr-streaming-text.md +4 -1
  187. package/llms/components/lr-suggestion-chips.md +6 -2
  188. package/llms/components/lr-textarea.md +2 -0
  189. package/llms/components/lr-time-input.md +2 -0
  190. package/llms/components/lr-time-zone-picker.md +2 -0
  191. package/llms/components/lr-token-input.md +2 -0
  192. package/llms/components/lr-unit-picker.md +2 -0
  193. package/llms/components/lr-voice-picker.md +2 -0
  194. package/llms/peers.md +7 -7
  195. package/llms/shared/imports-and-registration.md +1 -1
  196. package/llms/shared/localization-and-rtl.md +15 -1
  197. package/llms/shared/testing-and-utilities.md +184 -0
  198. package/llms/shared.md +200 -2
  199. package/locales.json +1 -1
  200. package/package.json +37 -21
  201. package/registrations.json +1 -1
  202. package/skills/lyra-ui/lyra-gen.md +2 -0
  203. /package/dist/{components/media/image-viewer/image-viewer-panorama.styles.js → internal/media-panorama.styles.js} +0 -0
@@ -841,6 +841,190 @@ so a bundler drops the unused catalog; an unbundled graph that imports it still
841
841
  - `formResetCallback()` restores the _content attribute_ default, so `el.value = 'x'` never redefines
842
842
  what `form.reset()` restores to (native `defaultValue`/`defaultSelected` semantics).
843
843
 
844
+ ### Shared simulation clock and irregular time indices
845
+
846
+ These granular modules are registration-free and require no map or 3D engine:
847
+
848
+ - `@aceshooting/lyra-ui/simulation-clock.js`: `createSimulationClock(options, capabilities?)`,
849
+ `SimulationClockError`; types `SimulationClock`, `SimulationClockOptions`,
850
+ `SimulationClockCapabilities`, `ClockScheduler`, `ClockSnapshot`, `SimulationClockMode`,
851
+ `SimulationClockReason`, `SimulationClockErrorCode`.
852
+ - `@aceshooting/lyra-ui/time-index.js`: `createTimeIndex(timestamps)`, `TimeIndexError`;
853
+ types `TimeIndex`, `TimeLocation`, `TimeIndexErrorCode`.
854
+ - `@aceshooting/lyra-ui/sequence-time-binding.js`: `bindSequencePlayback(control, clock, index,
855
+ options?)`, `SequenceTimeBindingError`; types `SequenceTimeBindingOptions`,
856
+ `SequenceTimeBindingErrorCode`. Register the sequence control separately.
857
+ - `@aceshooting/lyra-ui/map-camera-session.js`: `createMapCameraSession(map, options?)`,
858
+ `MapCameraSessionError`; saved viewpoints, tours sampled from a shared clock and scene-object
859
+ following for a ready `lr-map`. Register the map separately.
860
+
861
+ #### Clock contract
862
+
863
+ `SimulationClockOptions` has readonly `range: readonly [number, number]`, `instant: number` and
864
+ optional `rate: number` (default 1). Numbers are epoch milliseconds within ±8.64e15; fractional
865
+ milliseconds are allowed. Range start must not exceed end. Instants clamp to range; rates must be
866
+ finite and positive, without a fixed maximum. Plain records and tuples reject accessors/invalid
867
+ structure. Optional second-argument `SimulationClockCapabilities` carries the deliberately trusted
868
+ `scheduler?: ClockScheduler` and `onSubscriberError?: (error: unknown) => void` callbacks separately
869
+ from plain data. Scheduler methods are `monotonicNow(): number`, `epochNow(): number`,
870
+ `requestFrame(callback: () => void): unknown`, `cancelFrame(handle: unknown): void`.
871
+
872
+ `clock.snapshot` is immutable `ClockSnapshot { instant, range, mode, playing, rate, revision, reason }`.
873
+ `mode` is `'replay' | 'live'`. `reason` is
874
+ `'initial' | 'tick' | 'seek' | 'play' | 'pause' | 'rate' | 'range' | 'mode' | 'live'`.
875
+ `currentInstant()` samples current time without notification. `play()`, `pause()`, `seek(instant)`,
876
+ `stepTo(instant)`, `setRate(rate)`, `setRange(range)`, `setMode(mode)` update shared state.
877
+ Seek pauses and enters replay; stepTo preserves replay playing unless clamped at end, and leaves
878
+ live for paused replay. Play from live starts replay at current live instant; play at end does not
879
+ rewind. Pause from live freezes replay. Selecting an already-current mode does nothing. No looping
880
+ or reverse playback is implied. Live follows clamped wall time, including wall-clock corrections;
881
+ rate affects replay only. Applications own rolling ranges and incoming data.
882
+
883
+ `subscribe(listener, { signal? })` immediately supplies caught-up state and returns an idempotent
884
+ release function. Each registration is independent, including repeated use of one callback.
885
+ Reentrant writes coalesce into one later desired-state delivery. Listener errors are isolated.
886
+ Every subscriber in a fan-out sees the same instant/revision, not a promise of simultaneous paint.
887
+ Use revision checks before committing asynchronous map/chart work. Time zones/locales belong to
888
+ `Intl.DateTimeFormat` presentation and never change the shared instant.
889
+
890
+ Replay derives from a monotonic anchor rather than counting frames. Hidden/background documents
891
+ skip intermediate frames and catch up; they do not pause analytical replay or burst old updates.
892
+ No subscribers means no delivery scheduling, while replay still advances analytically. Import,
893
+ construction and paused use are SSR-safe and side-effect free; replay/live needs a usable injected
894
+ time source in SSR even without subscribers. Browser delivery uses one owner-realm animation-frame
895
+ chain. `dispose()` cancels jobs, clears subscribers and silently releases bindings. It is idempotent;
896
+ final getters remain readable, while later mutation/subscribe throws `disposed`.
897
+
898
+ `SimulationClockError(code, message?)` exposes readonly `code`:
899
+ `'invalid-options' | 'invalid-instant' | 'invalid-range' | 'invalid-rate' |
900
+ 'invalid-capabilities' | 'invalid-listener' | 'disposed'`. Failures leave rejected commands
901
+ unpublished. Developer diagnostics are not localized product copy; applications localize by code.
902
+
903
+ #### Time index contract
904
+
905
+ `createTimeIndex` snapshots and freezes at most 10,000 strictly increasing timestamps. Empty and
906
+ singleton inputs are legal. Duplicate, descending, sparse, accessor, nonfinite and out-of-Date-range
907
+ values fail rather than sorting, truncating or reindexing. `TimeIndex` exposes readonly
908
+ `timestamps`, `length`, `instantAt(index): number`, and `locate(instant): TimeLocation | undefined`.
909
+ `TimeLocation` has readonly `lowerIndex`, `upperIndex`, `nearestIndex`, `fraction`; exact samples
910
+ have equal indices/fraction zero, endpoint queries clamp, nearest ties choose lower. Empty indices
911
+ return undefined. Consumers explicitly select hold/nearest/linear interpretation; the utility never
912
+ interpolates application records, geographic wrapping, categories or physical trajectories.
913
+ `TimeIndexError(code, message?)` codes are
914
+ `'invalid-timestamps' | 'invalid-instant' | 'invalid-index'`.
915
+
916
+ Binding signature: `bindSequencePlayback(control: HTMLElement, clock: SimulationClock,
917
+ index: TimeIndex, options?: SequenceTimeBindingOptions): () => void`; options has readonly
918
+ `signal?: AbortSignal`. Clock/index must come from these factories in the same package module graph.
919
+ `SequenceTimeBindingError(code, message?)` codes are `'unsupported-control' | 'inactive-control' |
920
+ 'already-bound' | 'invalid-clock' | 'invalid-index' | 'invalid-options'`. A disposed clock raises
921
+ `SimulationClockError('disposed')`. Abort signals are trusted lifecycle capabilities; a preaborted
922
+ signal performs no attachment. Releasing never pauses other consumers.
923
+
924
+ - **`simulation-clock-contracts`** — Shared replay and live time.
925
+ Import: `@aceshooting/lyra-ui/simulation-clock.js`.
926
+ `createSimulationClock(options: SimulationClockOptions, capabilities?: SimulationClockCapabilities): SimulationClock`
927
+ `SimulationClockOptions {
928
+ readonly range: readonly [number, number];
929
+ readonly instant: number;
930
+ readonly rate?: number;
931
+ }`
932
+ `ClockScheduler {
933
+ monotonicNow(): number;
934
+ epochNow(): number;
935
+ requestFrame(callback: () => void): unknown;
936
+ cancelFrame(handle: unknown): void;
937
+ }`
938
+ `SimulationClockCapabilities {
939
+ readonly scheduler?: ClockScheduler;
940
+ readonly onSubscriberError?: (error: unknown) => void;
941
+ }`
942
+ `ClockSnapshot {
943
+ readonly instant: number;
944
+ readonly range: readonly [number, number];
945
+ readonly mode: SimulationClockMode;
946
+ readonly playing: boolean;
947
+ readonly rate: number;
948
+ readonly revision: number;
949
+ readonly reason: SimulationClockReason;
950
+ }`
951
+ `SimulationClock {
952
+ readonly snapshot: ClockSnapshot;
953
+ currentInstant(): number;
954
+ seek(instant: number): void;
955
+ stepTo(instant: number): void;
956
+ play(): void;
957
+ pause(): void;
958
+ setRate(rate: number): void;
959
+ setRange(range: readonly [number, number]): void;
960
+ setMode(mode: SimulationClockMode): void;
961
+ subscribe(listener: (snapshot: ClockSnapshot) => void, options?: { readonly signal?: AbortSignal }): () => void;
962
+ dispose(): void;
963
+ }`
964
+
965
+ - **`time-index-contracts`** — Immutable irregular timestamp indices.
966
+ Import: `@aceshooting/lyra-ui/time-index.js`.
967
+ `createTimeIndex(timestamps: readonly number[]): TimeIndex`
968
+ `TimeLocation {
969
+ readonly lowerIndex: number;
970
+ readonly upperIndex: number;
971
+ readonly nearestIndex: number;
972
+ readonly fraction: number;
973
+ }`
974
+ `TimeIndex {
975
+ readonly timestamps: readonly number[];
976
+ readonly length: number;
977
+ locate(instant: number): TimeLocation | undefined;
978
+ instantAt(index: number): number;
979
+ }`
980
+
981
+ - **`sequence-time-binding-contracts`** — Shared time binding for a registered sequence control.
982
+ Import: `@aceshooting/lyra-ui/sequence-time-binding.js`.
983
+ `bindSequencePlayback(control: HTMLElement, clock: SimulationClock, index: TimeIndex, options?: SequenceTimeBindingOptions): () => void`
984
+ `SequenceTimeBindingOptions { readonly signal?: AbortSignal; }`
985
+
986
+ - **`map-camera-session-contracts`** — Saved viewpoints, clock-driven tours and object following
987
+ for a ready `lr-map`; see the `lr-map` camera sessions section of the media reference.
988
+ Import: `@aceshooting/lyra-ui/map-camera-session.js`.
989
+ `createMapCameraSession(map: HTMLElement, options?: MapCameraSessionOptions): MapCameraSession`
990
+ `MapCameraSessionOptions { readonly signal?: AbortSignal; }`
991
+ `MapViewpoint {
992
+ readonly center: readonly [number, number];
993
+ readonly zoom: number;
994
+ readonly bearing: number;
995
+ readonly pitch: number;
996
+ }`
997
+ `MapCameraTransition {
998
+ readonly kind?: 'jump' | 'ease' | 'fly';
999
+ readonly duration?: number;
1000
+ }`
1001
+ `MapCameraKeyframe {
1002
+ readonly instant: number;
1003
+ readonly view: MapViewpoint;
1004
+ readonly interpolation?: 'linear' | 'hold';
1005
+ }`
1006
+ `MapCameraTour { readonly keyframes: readonly MapCameraKeyframe[]; }`
1007
+ `MapCameraFollowOptions {
1008
+ readonly objectId: string;
1009
+ readonly mode: 'ground';
1010
+ readonly zoom?: number;
1011
+ readonly bearing?: number;
1012
+ readonly pitch?: number;
1013
+ }`
1014
+ `MapCameraSession {
1015
+ readonly snapshot: MapCameraSessionSnapshot;
1016
+ capture(): MapViewpoint;
1017
+ restore(viewpoint: MapViewpoint, transition?: MapCameraTransition): void;
1018
+ tour(clock: SimulationClock, tour: MapCameraTour): void;
1019
+ follow(options: MapCameraFollowOptions): void;
1020
+ stop(): void;
1021
+ subscribe(listener: (snapshot: MapCameraSessionSnapshot) => void, options?: MapCameraSessionOptions): () => void;
1022
+ dispose(): void;
1023
+ }`
1024
+ `MapCameraSessionError(code)` exposes `code: MapCameraSessionErrorCode`. Snapshot, reason, mode
1025
+ and tracking types are `MapCameraSessionSnapshot`, `MapCameraSessionReason`, `MapCameraSessionMode`,
1026
+ `MapCameraTrackingStatus` and `MapCameraTrackingIssue`.
1027
+
844
1028
  ## Reference artifacts
845
1029
 
846
1030
  The package includes authored family and shared references plus derived index, component, token,
package/llms/shared.md CHANGED
@@ -182,7 +182,7 @@ The entry points, then:
182
182
  `@aceshooting/lyra-ui/localization.js` (side-effect-free locale runtime),
183
183
  `@aceshooting/lyra-ui/autoloader.js` (side-effect-free on-demand tag loading),
184
184
  `@aceshooting/lyra-ui/autoloader-cdn.js` (browser-guarded auto-start side effect),
185
- `@aceshooting/lyra-translations/<locale>.js` (the seventy message catalogs, in the companion package),
185
+ `@aceshooting/lyra-translations/<locale>.js` (the eighty message catalogs, in the companion package),
186
186
  `@aceshooting/lyra-ui/events` (the global typed-event map — types only, no runtime),
187
187
  `@aceshooting/lyra-ui/ai` (provider-neutral data types), `@aceshooting/lyra-ui/testing`
188
188
  (happy-dom shims, `createLyraEvent()` for building a validated test event, a small set of
@@ -2536,6 +2536,9 @@ transport. The helper neither reloads the page nor changes module URLs to bypass
2536
2536
  category selection walks the same chain, so the two can never disagree:
2537
2537
 
2538
2538
  1. **The BCP-47 truncation walk, most specific first**, with any explicitly registered delta parent chain inserted immediately after its child — `zh-Hans-CN` → `zh-Hans` → `zh`.
2539
+ A tag without a script subtag whose CLDR likely script differs from its bare language's walks
2540
+ that implied script just before the bare language: `sr-ME` (likely `sr-Latn-ME`) →
2541
+ `sr-Latn` → `sr`, while `sr-RS` (likely Cyrillic, like bare `sr`) goes straight to `sr`.
2539
2542
  Casing and `_` separators are normalized, so `pt_BR` and `pt-br` are the same key. Lookup chains
2540
2543
  are memoized and capped at 64 candidates. A structurally valid tag beyond the normal complexity
2541
2544
  ceiling retains its exact tag, base language and English fallback without constructing an
@@ -2627,7 +2630,7 @@ silently defeats a registered catalog — omit it, or pass `undefined`.
2627
2630
 
2628
2631
  ### Ready-made catalogs: `@aceshooting/lyra-translations/<locale>.js`
2629
2632
 
2630
- Seventy catalogs ship in the companion package `@aceshooting/lyra-translations` (`pnpm add @aceshooting/lyra-translations`, same version as `@aceshooting/lyra-ui`), each covering every key in `LYRA_DEFAULT_STRINGS`.
2633
+ Eighty catalogs ship in the companion package `@aceshooting/lyra-translations` (`pnpm add @aceshooting/lyra-translations`, same version as `@aceshooting/lyra-ui`), each covering every key in `LYRA_DEFAULT_STRINGS`.
2631
2634
  The public `@aceshooting/lyra-ui/locales.json` manifest lists their canonical identities, authored
2632
2635
  source spellings, import paths, and structural coverage. It also distinguishes translation
2633
2636
  coverage from linguistic review tier. The catalogs are **side-effect-only modules**: import one
@@ -2649,6 +2652,8 @@ import "@aceshooting/lyra-translations/ro.js"; // Romanian
2649
2652
  import "@aceshooting/lyra-translations/zh-CN.js"; // Simplified: serves zh, zh-Hans, zh-SG and zh-Hans-CN
2650
2653
  import "@aceshooting/lyra-translations/zh-TW.js"; // Traditional: serves zh-Hant and zh-MO
2651
2654
  import "@aceshooting/lyra-translations/zh-HK.js"; // Hong Kong: differences over zh-TW
2655
+ import "@aceshooting/lyra-translations/sr.js"; // Serbian Cyrillic: serves sr, sr-Cyrl, sr-RS, sr-BA
2656
+ import "@aceshooting/lyra-translations/sr-Latn.js"; // Serbian Latin: serves sr-Latn, sr-Latn-RS, sr-ME
2652
2657
  ```
2653
2658
 
2654
2659
  Persian and Hebrew use CLDR plural categories (`fa`: `one`/`other`; `he`:
@@ -2669,6 +2674,15 @@ they register only the messages that differ and resolve every other message thro
2669
2674
  (`de`, the built-in English, `es`, `fr`, `zh-TW`), and importing one also imports its parent catalog (`en-GB` has none: English is built in).
2670
2675
  The four regional additions are AI-assisted translations; no human or native-speaker review is claimed.
2671
2676
 
2677
+ Serbian ships in both scripts as two complete catalogs: `sr` (Cyrillic, the CLDR default for bare
2678
+ `sr`) and `sr-Latn` (Latin). Script decides, not region: `sr-Latn-*` tags and script-less tags whose
2679
+ likely script is Latin (`sr-ME`) reach `sr-Latn`; `sr-Cyrl-*`, `sr-RS`, `sr-BA` and `sr-XK` reach
2680
+ `sr`. The `sk`, `bg`, `lt`, `lv`, `et`, `ca`, `ga`, `mt`, `sr` and `sr-Latn` catalogs are
2681
+ AI-assisted translations with structural verification only (keys, placeholders, ICU syntax and CLDR
2682
+ plural categories); they await native-speaker review, and no human or native-speaker review is
2683
+ claimed. Regional tags such as `ca-ES-valencia`, `ga-IE` and `mt-MT` reach their base catalog by
2684
+ truncation.
2685
+
2672
2686
  Import only the locales the application can actually offer — each is a separate module, so unimported
2673
2687
  ones cost nothing. A catalog registered this way is merged like any other, so a later
2674
2688
  `registerLyraLocale('de', { close: '…' })` still overrides individual keys, and a per-instance
@@ -4063,6 +4077,190 @@ so a bundler drops the unused catalog; an unbundled graph that imports it still
4063
4077
  - `formResetCallback()` restores the _content attribute_ default, so `el.value = 'x'` never redefines
4064
4078
  what `form.reset()` restores to (native `defaultValue`/`defaultSelected` semantics).
4065
4079
 
4080
+ ### Shared simulation clock and irregular time indices
4081
+
4082
+ These granular modules are registration-free and require no map or 3D engine:
4083
+
4084
+ - `@aceshooting/lyra-ui/simulation-clock.js`: `createSimulationClock(options, capabilities?)`,
4085
+ `SimulationClockError`; types `SimulationClock`, `SimulationClockOptions`,
4086
+ `SimulationClockCapabilities`, `ClockScheduler`, `ClockSnapshot`, `SimulationClockMode`,
4087
+ `SimulationClockReason`, `SimulationClockErrorCode`.
4088
+ - `@aceshooting/lyra-ui/time-index.js`: `createTimeIndex(timestamps)`, `TimeIndexError`;
4089
+ types `TimeIndex`, `TimeLocation`, `TimeIndexErrorCode`.
4090
+ - `@aceshooting/lyra-ui/sequence-time-binding.js`: `bindSequencePlayback(control, clock, index,
4091
+ options?)`, `SequenceTimeBindingError`; types `SequenceTimeBindingOptions`,
4092
+ `SequenceTimeBindingErrorCode`. Register the sequence control separately.
4093
+ - `@aceshooting/lyra-ui/map-camera-session.js`: `createMapCameraSession(map, options?)`,
4094
+ `MapCameraSessionError`; saved viewpoints, tours sampled from a shared clock and scene-object
4095
+ following for a ready `lr-map`. Register the map separately.
4096
+
4097
+ #### Clock contract
4098
+
4099
+ `SimulationClockOptions` has readonly `range: readonly [number, number]`, `instant: number` and
4100
+ optional `rate: number` (default 1). Numbers are epoch milliseconds within ±8.64e15; fractional
4101
+ milliseconds are allowed. Range start must not exceed end. Instants clamp to range; rates must be
4102
+ finite and positive, without a fixed maximum. Plain records and tuples reject accessors/invalid
4103
+ structure. Optional second-argument `SimulationClockCapabilities` carries the deliberately trusted
4104
+ `scheduler?: ClockScheduler` and `onSubscriberError?: (error: unknown) => void` callbacks separately
4105
+ from plain data. Scheduler methods are `monotonicNow(): number`, `epochNow(): number`,
4106
+ `requestFrame(callback: () => void): unknown`, `cancelFrame(handle: unknown): void`.
4107
+
4108
+ `clock.snapshot` is immutable `ClockSnapshot { instant, range, mode, playing, rate, revision, reason }`.
4109
+ `mode` is `'replay' | 'live'`. `reason` is
4110
+ `'initial' | 'tick' | 'seek' | 'play' | 'pause' | 'rate' | 'range' | 'mode' | 'live'`.
4111
+ `currentInstant()` samples current time without notification. `play()`, `pause()`, `seek(instant)`,
4112
+ `stepTo(instant)`, `setRate(rate)`, `setRange(range)`, `setMode(mode)` update shared state.
4113
+ Seek pauses and enters replay; stepTo preserves replay playing unless clamped at end, and leaves
4114
+ live for paused replay. Play from live starts replay at current live instant; play at end does not
4115
+ rewind. Pause from live freezes replay. Selecting an already-current mode does nothing. No looping
4116
+ or reverse playback is implied. Live follows clamped wall time, including wall-clock corrections;
4117
+ rate affects replay only. Applications own rolling ranges and incoming data.
4118
+
4119
+ `subscribe(listener, { signal? })` immediately supplies caught-up state and returns an idempotent
4120
+ release function. Each registration is independent, including repeated use of one callback.
4121
+ Reentrant writes coalesce into one later desired-state delivery. Listener errors are isolated.
4122
+ Every subscriber in a fan-out sees the same instant/revision, not a promise of simultaneous paint.
4123
+ Use revision checks before committing asynchronous map/chart work. Time zones/locales belong to
4124
+ `Intl.DateTimeFormat` presentation and never change the shared instant.
4125
+
4126
+ Replay derives from a monotonic anchor rather than counting frames. Hidden/background documents
4127
+ skip intermediate frames and catch up; they do not pause analytical replay or burst old updates.
4128
+ No subscribers means no delivery scheduling, while replay still advances analytically. Import,
4129
+ construction and paused use are SSR-safe and side-effect free; replay/live needs a usable injected
4130
+ time source in SSR even without subscribers. Browser delivery uses one owner-realm animation-frame
4131
+ chain. `dispose()` cancels jobs, clears subscribers and silently releases bindings. It is idempotent;
4132
+ final getters remain readable, while later mutation/subscribe throws `disposed`.
4133
+
4134
+ `SimulationClockError(code, message?)` exposes readonly `code`:
4135
+ `'invalid-options' | 'invalid-instant' | 'invalid-range' | 'invalid-rate' |
4136
+ 'invalid-capabilities' | 'invalid-listener' | 'disposed'`. Failures leave rejected commands
4137
+ unpublished. Developer diagnostics are not localized product copy; applications localize by code.
4138
+
4139
+ #### Time index contract
4140
+
4141
+ `createTimeIndex` snapshots and freezes at most 10,000 strictly increasing timestamps. Empty and
4142
+ singleton inputs are legal. Duplicate, descending, sparse, accessor, nonfinite and out-of-Date-range
4143
+ values fail rather than sorting, truncating or reindexing. `TimeIndex` exposes readonly
4144
+ `timestamps`, `length`, `instantAt(index): number`, and `locate(instant): TimeLocation | undefined`.
4145
+ `TimeLocation` has readonly `lowerIndex`, `upperIndex`, `nearestIndex`, `fraction`; exact samples
4146
+ have equal indices/fraction zero, endpoint queries clamp, nearest ties choose lower. Empty indices
4147
+ return undefined. Consumers explicitly select hold/nearest/linear interpretation; the utility never
4148
+ interpolates application records, geographic wrapping, categories or physical trajectories.
4149
+ `TimeIndexError(code, message?)` codes are
4150
+ `'invalid-timestamps' | 'invalid-instant' | 'invalid-index'`.
4151
+
4152
+ Binding signature: `bindSequencePlayback(control: HTMLElement, clock: SimulationClock,
4153
+ index: TimeIndex, options?: SequenceTimeBindingOptions): () => void`; options has readonly
4154
+ `signal?: AbortSignal`. Clock/index must come from these factories in the same package module graph.
4155
+ `SequenceTimeBindingError(code, message?)` codes are `'unsupported-control' | 'inactive-control' |
4156
+ 'already-bound' | 'invalid-clock' | 'invalid-index' | 'invalid-options'`. A disposed clock raises
4157
+ `SimulationClockError('disposed')`. Abort signals are trusted lifecycle capabilities; a preaborted
4158
+ signal performs no attachment. Releasing never pauses other consumers.
4159
+
4160
+ - **`simulation-clock-contracts`** — Shared replay and live time.
4161
+ Import: `@aceshooting/lyra-ui/simulation-clock.js`.
4162
+ `createSimulationClock(options: SimulationClockOptions, capabilities?: SimulationClockCapabilities): SimulationClock`
4163
+ `SimulationClockOptions {
4164
+ readonly range: readonly [number, number];
4165
+ readonly instant: number;
4166
+ readonly rate?: number;
4167
+ }`
4168
+ `ClockScheduler {
4169
+ monotonicNow(): number;
4170
+ epochNow(): number;
4171
+ requestFrame(callback: () => void): unknown;
4172
+ cancelFrame(handle: unknown): void;
4173
+ }`
4174
+ `SimulationClockCapabilities {
4175
+ readonly scheduler?: ClockScheduler;
4176
+ readonly onSubscriberError?: (error: unknown) => void;
4177
+ }`
4178
+ `ClockSnapshot {
4179
+ readonly instant: number;
4180
+ readonly range: readonly [number, number];
4181
+ readonly mode: SimulationClockMode;
4182
+ readonly playing: boolean;
4183
+ readonly rate: number;
4184
+ readonly revision: number;
4185
+ readonly reason: SimulationClockReason;
4186
+ }`
4187
+ `SimulationClock {
4188
+ readonly snapshot: ClockSnapshot;
4189
+ currentInstant(): number;
4190
+ seek(instant: number): void;
4191
+ stepTo(instant: number): void;
4192
+ play(): void;
4193
+ pause(): void;
4194
+ setRate(rate: number): void;
4195
+ setRange(range: readonly [number, number]): void;
4196
+ setMode(mode: SimulationClockMode): void;
4197
+ subscribe(listener: (snapshot: ClockSnapshot) => void, options?: { readonly signal?: AbortSignal }): () => void;
4198
+ dispose(): void;
4199
+ }`
4200
+
4201
+ - **`time-index-contracts`** — Immutable irregular timestamp indices.
4202
+ Import: `@aceshooting/lyra-ui/time-index.js`.
4203
+ `createTimeIndex(timestamps: readonly number[]): TimeIndex`
4204
+ `TimeLocation {
4205
+ readonly lowerIndex: number;
4206
+ readonly upperIndex: number;
4207
+ readonly nearestIndex: number;
4208
+ readonly fraction: number;
4209
+ }`
4210
+ `TimeIndex {
4211
+ readonly timestamps: readonly number[];
4212
+ readonly length: number;
4213
+ locate(instant: number): TimeLocation | undefined;
4214
+ instantAt(index: number): number;
4215
+ }`
4216
+
4217
+ - **`sequence-time-binding-contracts`** — Shared time binding for a registered sequence control.
4218
+ Import: `@aceshooting/lyra-ui/sequence-time-binding.js`.
4219
+ `bindSequencePlayback(control: HTMLElement, clock: SimulationClock, index: TimeIndex, options?: SequenceTimeBindingOptions): () => void`
4220
+ `SequenceTimeBindingOptions { readonly signal?: AbortSignal; }`
4221
+
4222
+ - **`map-camera-session-contracts`** — Saved viewpoints, clock-driven tours and object following
4223
+ for a ready `lr-map`; see the `lr-map` camera sessions section of the media reference.
4224
+ Import: `@aceshooting/lyra-ui/map-camera-session.js`.
4225
+ `createMapCameraSession(map: HTMLElement, options?: MapCameraSessionOptions): MapCameraSession`
4226
+ `MapCameraSessionOptions { readonly signal?: AbortSignal; }`
4227
+ `MapViewpoint {
4228
+ readonly center: readonly [number, number];
4229
+ readonly zoom: number;
4230
+ readonly bearing: number;
4231
+ readonly pitch: number;
4232
+ }`
4233
+ `MapCameraTransition {
4234
+ readonly kind?: 'jump' | 'ease' | 'fly';
4235
+ readonly duration?: number;
4236
+ }`
4237
+ `MapCameraKeyframe {
4238
+ readonly instant: number;
4239
+ readonly view: MapViewpoint;
4240
+ readonly interpolation?: 'linear' | 'hold';
4241
+ }`
4242
+ `MapCameraTour { readonly keyframes: readonly MapCameraKeyframe[]; }`
4243
+ `MapCameraFollowOptions {
4244
+ readonly objectId: string;
4245
+ readonly mode: 'ground';
4246
+ readonly zoom?: number;
4247
+ readonly bearing?: number;
4248
+ readonly pitch?: number;
4249
+ }`
4250
+ `MapCameraSession {
4251
+ readonly snapshot: MapCameraSessionSnapshot;
4252
+ capture(): MapViewpoint;
4253
+ restore(viewpoint: MapViewpoint, transition?: MapCameraTransition): void;
4254
+ tour(clock: SimulationClock, tour: MapCameraTour): void;
4255
+ follow(options: MapCameraFollowOptions): void;
4256
+ stop(): void;
4257
+ subscribe(listener: (snapshot: MapCameraSessionSnapshot) => void, options?: MapCameraSessionOptions): () => void;
4258
+ dispose(): void;
4259
+ }`
4260
+ `MapCameraSessionError(code)` exposes `code: MapCameraSessionErrorCode`. Snapshot, reason, mode
4261
+ and tracking types are `MapCameraSessionSnapshot`, `MapCameraSessionReason`, `MapCameraSessionMode`,
4262
+ `MapCameraTrackingStatus` and `MapCameraTrackingIssue`.
4263
+
4066
4264
  ## Reference artifacts
4067
4265
 
4068
4266
  The package includes authored family and shared references plus derived index, component, token,