@skenora/sdk 0.1.2

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 (58) hide show
  1. package/README.md +167 -0
  2. package/dist/editor.d.ts +14 -0
  3. package/dist/editor.d.ts.map +1 -0
  4. package/dist/editor.js +14 -0
  5. package/dist/editor.js.map +1 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +3 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/lightbox.d.ts +3 -0
  11. package/dist/lightbox.d.ts.map +1 -0
  12. package/dist/lightbox.js +2 -0
  13. package/dist/lightbox.js.map +1 -0
  14. package/dist/playback-config.d.ts +27 -0
  15. package/dist/playback-config.d.ts.map +1 -0
  16. package/dist/playback-config.js +87 -0
  17. package/dist/playback-config.js.map +1 -0
  18. package/dist/renderer-diagnostics.d.ts +4 -0
  19. package/dist/renderer-diagnostics.d.ts.map +1 -0
  20. package/dist/renderer-diagnostics.js +85 -0
  21. package/dist/renderer-diagnostics.js.map +1 -0
  22. package/dist/renderer.d.ts +10 -0
  23. package/dist/renderer.d.ts.map +1 -0
  24. package/dist/renderer.js +8 -0
  25. package/dist/renderer.js.map +1 -0
  26. package/dist/scene-config.d.ts +58 -0
  27. package/dist/scene-config.d.ts.map +1 -0
  28. package/dist/scene-config.js +223 -0
  29. package/dist/scene-config.js.map +1 -0
  30. package/dist/scene-plan/apply-patch.d.ts +5 -0
  31. package/dist/scene-plan/apply-patch.d.ts.map +1 -0
  32. package/dist/scene-plan/apply-patch.js +174 -0
  33. package/dist/scene-plan/apply-patch.js.map +1 -0
  34. package/dist/scene-plan/executor.d.ts +26 -0
  35. package/dist/scene-plan/executor.d.ts.map +1 -0
  36. package/dist/scene-plan/executor.js +928 -0
  37. package/dist/scene-plan/executor.js.map +1 -0
  38. package/dist/scene-plan/gateway.d.ts +15 -0
  39. package/dist/scene-plan/gateway.d.ts.map +1 -0
  40. package/dist/scene-plan/gateway.js +104 -0
  41. package/dist/scene-plan/gateway.js.map +1 -0
  42. package/dist/scene-plan/index.d.ts +4 -0
  43. package/dist/scene-plan/index.d.ts.map +1 -0
  44. package/dist/scene-plan/index.js +4 -0
  45. package/dist/scene-plan/index.js.map +1 -0
  46. package/dist/scene-plan/types.d.ts +181 -0
  47. package/dist/scene-plan/types.d.ts.map +1 -0
  48. package/dist/scene-plan/types.js +2 -0
  49. package/dist/scene-plan/types.js.map +1 -0
  50. package/dist/skenora-renderer.d.ts +117 -0
  51. package/dist/skenora-renderer.d.ts.map +1 -0
  52. package/dist/skenora-renderer.js +464 -0
  53. package/dist/skenora-renderer.js.map +1 -0
  54. package/dist/skenora-scene.d.ts +263 -0
  55. package/dist/skenora-scene.d.ts.map +1 -0
  56. package/dist/skenora-scene.js +832 -0
  57. package/dist/skenora-scene.js.map +1 -0
  58. package/package.json +55 -0
package/README.md ADDED
@@ -0,0 +1,167 @@
1
+ # @skenora/sdk
2
+
3
+ High-level, local-first, framework-neutral scene SDK over Skenora's headless
4
+ packages.
5
+
6
+ > Skenora is currently pre-1.0. Product boundaries are implemented, but public
7
+ > APIs may still evolve.
8
+ > The SDK is not currently published to npm; the install command below is
9
+ > intended release syntax. The procedural V1 sections describe current
10
+ > repository source and are not covered by the 2026-08-28 package/browser
11
+ > evidence.
12
+
13
+ ```bash
14
+ pnpm add @skenora/sdk
15
+ ```
16
+
17
+ Choose one product-level entry point:
18
+
19
+ | Product | Models | Editing | Behavior startup |
20
+ | ----------------- | ----------: | ------- | ------------------ |
21
+ | Lightbox | Exactly one | No | Never |
22
+ | `SkenoraEditor` | One or many | Yes | Manual preview |
23
+ | `SkenoraRenderer` | One or many | No | Automatic playback |
24
+
25
+ ```ts
26
+ import { SkenoraEditor } from "@skenora/sdk/editor";
27
+
28
+ const scene = await SkenoraEditor.create({
29
+ canvas: document.querySelector("canvas"),
30
+ id: "demo",
31
+ name: "Demo scene",
32
+ });
33
+ await scene.setEnvironment({ intensity: 1.2 });
34
+ await scene.addProcedural({
35
+ id: "generated-stage",
36
+ program: geometryProgram,
37
+ });
38
+
39
+ // Declarative SceneBlueprint/ScenePatch execution for host or AI workflows.
40
+ const summary = scene.scenePlan.inspectScene();
41
+ sendToAi({
42
+ capabilities: summary.capabilities,
43
+ availability: summary.capabilityAvailability,
44
+ outline: summary.outline,
45
+ });
46
+ const result = await scene.scenePlan.applyPlan(blueprint, {
47
+ expectedRevisionToken: summary.revisionToken,
48
+ modelLoadPolicy: "strict",
49
+ idempotencyKey: "request-001",
50
+ });
51
+
52
+ // Optional: manually preview authored behavior without leaving the editor.
53
+ await scene.startPreview();
54
+ scene.stopPreview();
55
+ ```
56
+
57
+ The package exposes explicit product subpaths so applications do not place
58
+ unrelated product implementations in the same static module graph. The root
59
+ entry remains an editor-focused compatibility alias.
60
+
61
+ `SkenoraScene` remains available as a compatibility name for
62
+ `SkenoraEditor`.
63
+
64
+ For a read-only model viewer, `File` objects can be opened directly without
65
+ constructing a workspace document or resource provider:
66
+
67
+ ```ts
68
+ import { createLightbox } from "@skenora/sdk/lightbox";
69
+
70
+ const viewer = await createLightbox({ canvas, model: modelFile });
71
+ ```
72
+
73
+ Lightbox is a strict single-model viewer. Multi-model read-only playback uses
74
+ `SkenoraRenderer`, which automatically runs enabled Flow graphs and configured
75
+ camera-path or third-person behavior without exposing editor mutations.
76
+
77
+ Read-only applications can use the dedicated lightweight export:
78
+
79
+ ```ts
80
+ import { SkenoraRenderer } from "@skenora/sdk/renderer";
81
+ ```
82
+
83
+ The renderer accepts a native scene document produced by
84
+ `compileSceneBlueprint` from `@skenora/scene-plan`; it never contacts an AI.
85
+ Use that package's `getScenePlanInformation()` for descriptions, schemas and
86
+ complete input examples. The host supplies resource bindings/providers.
87
+
88
+ Both Editor and Renderer subpaths re-export the pure
89
+ `compileProceduralGeometry()` and `compileMaterialProgram()` helpers. Editor's
90
+ `addProcedural()` stores the versioned geometry program through history;
91
+ Renderer projects the validated program read-only. Lightbox remains a strict
92
+ single-model product and does not accept procedural scene authoring.
93
+
94
+ `renderer.getCapabilityAvailability()` reports the instance's built-in visual
95
+ capabilities and host material limits. `renderer.describeMaterialSlots(entityId)`
96
+ returns logical source-node/slot data after loading. Material preparation is
97
+ observable through `material.preparation` (`unbound`, `preparing`, `ready`,
98
+ `failed`). Pass `runtime.materialPolicy` to set material enablement, instance and
99
+ texture limits, and preparation waiting time. These settings cannot be changed
100
+ by scene JSON. Ready is not a visual-quality assertion.
101
+
102
+ `renderer.getBackendSnapshot()` returns observed backend/device facts,
103
+ `renderer.getGpuProgramCacheSnapshot()` returns bounded generated-program cache
104
+ statistics, and `await renderer.probe()` requires a real render and pixel
105
+ readback before reporting healthy. GPU-program preparation details are emitted
106
+ through `gpu-program.preparation`.
107
+
108
+ The Lightbox session exposes the same three observation methods after its
109
+ single-model document is ready; it still excludes editing and behavior
110
+ execution.
111
+
112
+ For safe model-facing failures, `toPublicRendererDiagnostic(error)` from the
113
+ renderer subpath omits arbitrary error messages, stacks, causes and resource
114
+ locators. Keep original errors private to the host. Always dispose the renderer
115
+ when its host view is removed; shared resource resolvers remain caller-owned.
116
+
117
+ The bounded material/discovery paths passed tests, development-package consumption
118
+ and WebGL2 rendering verification on 2026-08-28. The checks do not establish
119
+ cross-device compatibility or arbitrary-asset visual quality, and they predate
120
+ the procedural geometry/material-program V1 additions.
121
+
122
+ Optional `runtime.qualityPolicy` caps render pixel ratio, explicit-light shadow
123
+ resolution, pipeline samples and selected post-processing effects. Read
124
+ `renderer.getQualityState()` or `quality.changed` for requested/effective settings
125
+ and reductions. Authored JSON is not rewritten to fit the device.
126
+
127
+ Owned materials may declare typed `effects` (`gradient`, `rim`, `dissolve`) and
128
+ local `animations`. Renderer exposes `playMaterialAnimation`,
129
+ `pauseMaterialAnimation`, `resumeMaterialAnimation`, `stopMaterialAnimation`,
130
+ `resetMaterialAnimation`, `getMaterialAnimationState`, and `material.animation`
131
+ events. Play takes material ID, local track ID and an optional AbortSignal;
132
+ it returns completed/cancelled. These are transient operations. Material and
133
+ texture motion follow paused render time, not a separate RAF per target.
134
+
135
+ Dissolve version 1 supports opaque main-pass cutout only. It rejects shadows,
136
+ SSAO, depth of field, glow, opacity/refraction and runtime transparency/highlight
137
+ overrides. Remove the effect or explicitly disable the incompatible feature;
138
+ there is no implicit fallback. Host material policy separately bounds active
139
+ parameter animation writers and can disable individual effects.
140
+
141
+ `renderer.projectAnnotations()` returns detached annotation positions, visibility
142
+ and payload in render-pixel coordinates. The host owns text/UI layout and CSS/DPR
143
+ conversion; the library does not create a framework component or page.
144
+
145
+ Resource loading is local-only by default. Applications may add explicit
146
+ workspace, HTTP, memory, catalog, or custom providers and use the SDK's
147
+ resource search, description, attachment, and preflight methods.
148
+
149
+ scene.scenePlan is the host-facing declarative gateway. It exposes
150
+ inspectScene, searchResources, validatePlan, applyPlan, and waitOperation; it
151
+ keeps resource locators and Babylon/Editor instances out of the plan DTO
152
+ surface. The built-in gateway feeds its Runtime availability snapshot into
153
+ validation and returns both static capability IDs/versions and observed
154
+ installed/enabled/backend facts plus a paginated model-safe scene outline from
155
+ `inspectScene()`.
156
+
157
+ Repository guides cover the complete composition, model import, configuration,
158
+ resource, JSON bundle, lifecycle, and ownership APIs:
159
+
160
+ - [SDK overview](https://github.com/zhangjiadi225/skenora/blob/main/docs/SDK.md)
161
+ - [Lightbox](https://github.com/zhangjiadi225/skenora/blob/main/docs/LIGHTBOX.md)
162
+ - [Editor](https://github.com/zhangjiadi225/skenora/blob/main/docs/EDITOR.md)
163
+ - [Renderer](https://github.com/zhangjiadi225/skenora/blob/main/docs/RENDERER.md)
164
+ - [Runtime](https://github.com/zhangjiadi225/skenora/blob/main/docs/RUNTIME.md)
165
+ - [Flow](https://github.com/zhangjiadi225/skenora/blob/main/docs/FLOW.md)
166
+ - [SceneDocument](https://github.com/zhangjiadi225/skenora/blob/main/docs/SCENE_DOCUMENT.md)
167
+ - Current working-tree procedural guide: `docs/PROCEDURAL_AI.md`
@@ -0,0 +1,14 @@
1
+ export * from "./scene-config.js";
2
+ export * from "./playback-config.js";
3
+ export * from "./skenora-scene.js";
4
+ export { DEFAULT_SCENE_FILE, DirectoryWorkspaceSource, FileListWorkspaceSource, MemoryWorkspaceSource, WorkspaceConflictError, type DirectoryHandleLike, type WorkspaceEntry, type WorkspaceImportItem, type WorkspaceSource, } from "@skenora/workspace";
5
+ export { createEmptySceneDocument, createIdentityTransform, getMaterialBindingsForEntity, type AssetReference, type EntityRecord, type MaterialBindingRecord, type MaterialOverride, type ModelAlignmentConfig, type ModelEntityProperties, type ResourceIntegrity, type ResourceLocator, type ResourceProvenance, type SceneDocumentData, type TransformValue, } from "@skenora/contracts";
6
+ export { EditFacade, isMixedValue, type EditablePropertyDescriptor, type EditorSession, type MixedValue, type PropertyEditRequest, } from "@skenora/editor";
7
+ export { EditorKeyboardController } from "@skenora/babylon-editor";
8
+ export { assetReferenceFromDescriptor, ResourceManager, supportsResourceDiscovery, type ResolvedResource, type ResourceDescriptor, type ResourceDiscovery, type ResourcePolicy, type ResourcePreflightResult, type ResourceProvider, type ResourceResolver, type ResourceScope, type ResourceSearchQuery, type ResourceSearchPage, } from "@skenora/resources";
9
+ export { WorkspaceResourceProvider } from "@skenora/resources/workspace";
10
+ export { HttpResourceProvider, type HttpResourceProviderOptions, } from "@skenora/resources/http";
11
+ export { MemoryResourceProvider, type MemoryResourceEntry, } from "@skenora/resources/memory";
12
+ export * from "./scene-plan/index.js";
13
+ export * from "@skenora/procedural";
14
+ //# sourceMappingURL=editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
package/dist/editor.js ADDED
@@ -0,0 +1,14 @@
1
+ export * from "./scene-config.js";
2
+ export * from "./playback-config.js";
3
+ export * from "./skenora-scene.js";
4
+ export { DEFAULT_SCENE_FILE, DirectoryWorkspaceSource, FileListWorkspaceSource, MemoryWorkspaceSource, WorkspaceConflictError, } from "@skenora/workspace";
5
+ export { createEmptySceneDocument, createIdentityTransform, getMaterialBindingsForEntity, } from "@skenora/contracts";
6
+ export { EditFacade, isMixedValue, } from "@skenora/editor";
7
+ export { EditorKeyboardController } from "@skenora/babylon-editor";
8
+ export { assetReferenceFromDescriptor, ResourceManager, supportsResourceDiscovery, } from "@skenora/resources";
9
+ export { WorkspaceResourceProvider } from "@skenora/resources/workspace";
10
+ export { HttpResourceProvider, } from "@skenora/resources/http";
11
+ export { MemoryResourceProvider, } from "@skenora/resources/memory";
12
+ export * from "./scene-plan/index.js";
13
+ export * from "@skenora/procedural";
14
+ //# sourceMappingURL=editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.js","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,GAKvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,GAY7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,YAAY,GAKb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,yBAAyB,GAW1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EACL,oBAAoB,GAErB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,GAEvB,MAAM,2BAA2B,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Editor-focused compatibility entry. Prefer the explicit product subpaths. */
2
+ export * from "./editor.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,cAAc,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ /** Editor-focused compatibility entry. Prefer the explicit product subpaths. */
2
+ export * from "./editor.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,cAAc,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { createLightbox, createLightboxDocument, LightboxSession, type CreateLightboxOptions, type LightboxCameraView, type LightboxCaptureOptions, type LightboxControlsConfig, type LightboxDocumentInput, type LightboxFileDependency, type LightboxFileModelInput, type LightboxInitialView, type LightboxLoadOptions, type LightboxModelInput, type LightboxModelOrientation, type LightboxModelSource, type LightboxPreset, type LightboxSessionOptions, type LightboxStatus, type LightboxStatusListener, } from "@skenora/lightbox";
2
+ export type { GpuProgramCacheSnapshot, RuntimeBackendSnapshot, RuntimeProbeReport, } from "@skenora/contracts";
3
+ //# sourceMappingURL=lightbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lightbox.d.ts","sourceRoot":"","sources":["../src/lightbox.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC5B,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createLightbox, createLightboxDocument, LightboxSession, } from "@skenora/lightbox";
2
+ //# sourceMappingURL=lightbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lightbox.js","sourceRoot":"","sources":["../src/lightbox.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,eAAe,GAiBhB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { CameraPathPlaybackOptions } from "@skenora/runtime/projection";
2
+ import type { ThirdPersonControllerOptions } from "@skenora/runtime/interaction";
3
+ import type { SceneDocumentData } from "@skenora/contracts";
4
+ export declare const SKENORA_PLAYBACK_EXTENSION_ID = "skenora.playback";
5
+ export type SkenoraCameraPathOptions = Omit<CameraPathPlaybackOptions, "signal">;
6
+ export type SkenoraThirdPersonOptions = Omit<ThirdPersonControllerOptions, "onMove" | "onAnimationChange">;
7
+ export interface SkenoraCameraPathPlaybackConfig extends SkenoraCameraPathOptions {
8
+ id: string;
9
+ /** Defaults to true when a path is configured. */
10
+ autoStart?: boolean;
11
+ }
12
+ export interface SkenoraThirdPersonPlaybackConfig {
13
+ entityId: string;
14
+ /** Defaults to true when third-person navigation is configured. */
15
+ enabled?: boolean;
16
+ options?: SkenoraThirdPersonOptions;
17
+ }
18
+ /** Serializable startup behavior designed in the editor and consumed by Renderer. */
19
+ export interface SkenoraPlaybackConfig {
20
+ /** Renderer defaults to starting all enabled Flow graphs. */
21
+ autoStartFlows?: boolean;
22
+ cameraPath?: false | SkenoraCameraPathPlaybackConfig;
23
+ thirdPerson?: false | SkenoraThirdPersonPlaybackConfig;
24
+ }
25
+ export declare function getSkenoraPlaybackConfig(document: Readonly<SceneDocumentData>): SkenoraPlaybackConfig;
26
+ export declare function normalizeSkenoraPlaybackConfig(value: unknown): SkenoraPlaybackConfig;
27
+ //# sourceMappingURL=playback-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playback-config.d.ts","sourceRoot":"","sources":["../src/playback-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,yBAAyB,EACzB,QAAQ,CACT,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,4BAA4B,EAC5B,QAAQ,GAAG,mBAAmB,CAC/B,CAAC;AAEF,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,yBAAyB,CAAC;CACrC;AAED,qFAAqF;AACrF,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,GAAG,+BAA+B,CAAC;IACrD,WAAW,CAAC,EAAE,KAAK,GAAG,gCAAgC,CAAC;CACxD;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GACpC,qBAAqB,CAIvB;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,qBAAqB,CAevB"}
@@ -0,0 +1,87 @@
1
+ export const SKENORA_PLAYBACK_EXTENSION_ID = "skenora.playback";
2
+ export function getSkenoraPlaybackConfig(document) {
3
+ const value = document.extensions[SKENORA_PLAYBACK_EXTENSION_ID];
4
+ if (value === undefined)
5
+ return {};
6
+ return normalizeSkenoraPlaybackConfig(value);
7
+ }
8
+ export function normalizeSkenoraPlaybackConfig(value) {
9
+ if (!isRecord(value)) {
10
+ throw new Error("Skenora playback configuration must be an object");
11
+ }
12
+ const autoStartFlows = optionalBoolean(value.autoStartFlows, "autoStartFlows");
13
+ const cameraPath = normalizeCameraPath(value.cameraPath);
14
+ const thirdPerson = normalizeThirdPerson(value.thirdPerson);
15
+ return {
16
+ ...(autoStartFlows === undefined ? {} : { autoStartFlows }),
17
+ ...(cameraPath === undefined ? {} : { cameraPath }),
18
+ ...(thirdPerson === undefined ? {} : { thirdPerson }),
19
+ };
20
+ }
21
+ function normalizeCameraPath(value) {
22
+ if (value === undefined || value === false)
23
+ return value;
24
+ if (!isRecord(value) || typeof value.id !== "string" || !value.id.trim()) {
25
+ throw new Error("Playback cameraPath requires a non-empty id");
26
+ }
27
+ const autoStart = optionalBoolean(value.autoStart, "cameraPath.autoStart");
28
+ const loop = optionalBoolean(value.loop, "cameraPath.loop");
29
+ const restoreCameraOnStop = optionalBoolean(value.restoreCameraOnStop, "cameraPath.restoreCameraOnStop");
30
+ const playbackRate = optionalFinite(value.playbackRate, "cameraPath.playbackRate");
31
+ if (playbackRate !== undefined && playbackRate <= 0) {
32
+ throw new Error("cameraPath.playbackRate must be positive");
33
+ }
34
+ const startProgress = optionalFinite(value.startProgress, "cameraPath.startProgress");
35
+ if (startProgress !== undefined && (startProgress < 0 || startProgress > 1)) {
36
+ throw new Error("cameraPath.startProgress must be in the 0..1 range");
37
+ }
38
+ return {
39
+ id: value.id,
40
+ ...(autoStart === undefined ? {} : { autoStart }),
41
+ ...(loop === undefined ? {} : { loop }),
42
+ ...(restoreCameraOnStop === undefined ? {} : { restoreCameraOnStop }),
43
+ ...(playbackRate === undefined ? {} : { playbackRate }),
44
+ ...(startProgress === undefined ? {} : { startProgress }),
45
+ };
46
+ }
47
+ function normalizeThirdPerson(value) {
48
+ if (value === undefined || value === false)
49
+ return value;
50
+ if (!isRecord(value) ||
51
+ typeof value.entityId !== "string" ||
52
+ !value.entityId.trim()) {
53
+ throw new Error("Playback thirdPerson requires a non-empty entityId");
54
+ }
55
+ const enabled = optionalBoolean(value.enabled, "thirdPerson.enabled");
56
+ if (value.options !== undefined && !isRecord(value.options)) {
57
+ throw new Error("Playback thirdPerson.options must be an object");
58
+ }
59
+ return {
60
+ entityId: value.entityId,
61
+ ...(enabled === undefined ? {} : { enabled }),
62
+ ...(value.options === undefined
63
+ ? {}
64
+ : {
65
+ options: structuredClone(value.options),
66
+ }),
67
+ };
68
+ }
69
+ function optionalBoolean(value, path) {
70
+ if (value === undefined)
71
+ return undefined;
72
+ if (typeof value !== "boolean")
73
+ throw new Error(`${path} must be a boolean`);
74
+ return value;
75
+ }
76
+ function optionalFinite(value, path) {
77
+ if (value === undefined)
78
+ return undefined;
79
+ if (typeof value !== "number" || !Number.isFinite(value)) {
80
+ throw new Error(`${path} must be finite`);
81
+ }
82
+ return value;
83
+ }
84
+ function isRecord(value) {
85
+ return typeof value === "object" && value !== null && !Array.isArray(value);
86
+ }
87
+ //# sourceMappingURL=playback-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playback-config.js","sourceRoot":"","sources":["../src/playback-config.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,6BAA6B,GAAG,kBAAkB,CAAC;AAiChE,MAAM,UAAU,wBAAwB,CACtC,QAAqC;IAErC,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;IACjE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnC,OAAO,8BAA8B,CAAC,KAAK,CAAC,CAAC;AAC/C,C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I,iBAAiB,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type SkenoraDiagnostic } from "@skenora/contracts";
2
+ /** Public repair data. Host errors/cause/stack/URLs are deliberately never copied. */
3
+ export declare function toPublicRendererDiagnostic(error: unknown): SkenoraDiagnostic;
4
+ //# sourceMappingURL=renderer-diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-diagnostics.d.ts","sourceRoot":"","sources":["../src/renderer-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAG5B,sFAAsF;AACtF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CA4F5E"}
@@ -0,0 +1,85 @@
1
+ import { SceneCapabilityUnavailableError, SceneDocumentValidationError, MaterialAnimationError, createSkenoraDiagnostic, } from "@skenora/contracts";
2
+ import { MaterialProjectionError } from "@skenora/runtime/projection";
3
+ /** Public repair data. Host errors/cause/stack/URLs are deliberately never copied. */
4
+ export function toPublicRendererDiagnostic(error) {
5
+ if (error instanceof MaterialAnimationError)
6
+ return createSkenoraDiagnostic({
7
+ code: error.code,
8
+ severity: "error",
9
+ stage: "playback",
10
+ message: error.message,
11
+ materialId: error.materialId,
12
+ animationId: error.animationId,
13
+ repair: "Check the animation capability description, the local animation ID, its bound material/effects, and cancellation state.",
14
+ recoverable: true,
15
+ });
16
+ if (error instanceof MaterialProjectionError) {
17
+ const { code, stage, message, materialId, bindingId, assetId } = error.diagnostic;
18
+ return createSkenoraDiagnostic({
19
+ code,
20
+ severity: "error",
21
+ stage,
22
+ message,
23
+ materialId,
24
+ ...(bindingId === undefined ? {} : { bindingId }),
25
+ ...(assetId === undefined ? {} : { assetId }),
26
+ repair: "Use the capability description for this diagnostic code; verify logical slots/resources and host material limits.",
27
+ recoverable: true,
28
+ });
29
+ }
30
+ if (error instanceof SceneCapabilityUnavailableError) {
31
+ return createSkenoraDiagnostic({
32
+ code: error.code,
33
+ severity: "error",
34
+ stage: "preflight",
35
+ message: error.message,
36
+ capabilityId: error.usage.id,
37
+ path: [...error.usage.path],
38
+ repair: "Replace the feature or ask the host for an enabled compatible capability. JSON cannot enable it.",
39
+ recoverable: true,
40
+ details: { capabilityVersion: error.usage.version },
41
+ });
42
+ }
43
+ if (error instanceof SceneDocumentValidationError &&
44
+ error.issues.some((issue) => issue.code === "material-effect-pass-unsupported"))
45
+ return createSkenoraDiagnostic({
46
+ code: "material-effect-pass-unsupported",
47
+ severity: "error",
48
+ stage: "preflight",
49
+ message: error.message,
50
+ repair: "Use opaque dissolve with shadows, SSAO, depth-of-field and glow disabled, or remove dissolve; no implicit fallback changes the authored scene.",
51
+ recoverable: true,
52
+ details: {
53
+ paths: error.issues
54
+ .filter((issue) => issue.code === "material-effect-pass-unsupported")
55
+ .map((issue) => [...issue.path]),
56
+ },
57
+ });
58
+ if (error instanceof SceneDocumentValidationError)
59
+ return createSkenoraDiagnostic({
60
+ code: "invalid-document",
61
+ severity: "error",
62
+ stage: "preflight",
63
+ message: error.message,
64
+ repair: "Compile the input against the current scene contract and repair its structured diagnostics.",
65
+ recoverable: true,
66
+ });
67
+ if (error instanceof Error && error.name === "AbortError")
68
+ return createSkenoraDiagnostic({
69
+ code: "load-cancelled",
70
+ severity: "info",
71
+ stage: "load",
72
+ message: error.message || "Scene load was cancelled",
73
+ repair: "The request was cancelled; only the current host request may continue.",
74
+ recoverable: true,
75
+ });
76
+ return createSkenoraDiagnostic({
77
+ code: "scene-load-failed",
78
+ severity: "error",
79
+ stage: "load",
80
+ message: error instanceof Error ? error.message : "Scene load failed",
81
+ repair: "Ask the host to inspect its private error and provide sanitized resource/device diagnostics. Do not invent replacement URLs or credentials.",
82
+ recoverable: true,
83
+ });
84
+ }
85
+ //# sourceMappingURL=renderer-diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-diagnostics.js","sourceRoot":"","sources":["../src/renderer-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,sFAAsF;AACtF,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,IAAI,KAAK,YAAY,sBAAsB;QACzC,OAAO,uBAAuB,CAAC;YAC7B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EACJ,yHAAyH;YAC3H,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,IAAI,KAAK,YAAY,uBAAuB,EAAE,CAAC;QAC7C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,GAC5D,KAAK,CAAC,UAAU,CAAC;QACnB,OAAO,uBAAuB,CAAC;YAC7B,IAAI;YACJ,QAAQ,EAAE,OAAO;YACjB,KAAK;YACL,OAAO;YACP,UAAU;YACV,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;YACjD,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;YAC7C,MAAM,EACJ,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KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EACJ,6FAA6F;YAC/F,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;QACvD,OAAO,uBAAuB,CAAC;YAC7B,IAAI,EAAE,gBAAgB;YACtB,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,0BAA0B;YACpD,MAAM,EACJ,wEAAwE;YAC1E,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,OAAO,uBAAuB,CAAC;QAC7B,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB;QACrE,MAAM,EACJ,6IAA6I;QAC/I,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** Lightweight read-only entry point without the editor facade exports. */
2
+ export * from "./playback-config.js";
3
+ export * from "./skenora-renderer.js";
4
+ export * from "./renderer-diagnostics.js";
5
+ export * from "@skenora/procedural";
6
+ export { MaterialProjectionError } from "@skenora/runtime/projection";
7
+ export type { AnnotationProjection } from "@skenora/runtime/projection";
8
+ export { SceneCapabilityUnavailableError, MaterialAnimationError, } from "@skenora/contracts";
9
+ export type { MaterialDiagnostic, MaterialSlotDescriptor, MaterialExecutionPolicy, MaterialPreparationEvent, MaterialParameterAnimation, MaterialAnimationState, MaterialAnimationResult, MaterialAnimationPlayOptions, CapabilityAvailability, RuntimeQualityPolicy, RuntimeQualityState, RuntimeBackendSnapshot, RuntimeProbeReport, RuntimeProbeVerdict, GpuProgramIdentity, GpuProgramPreparationReport, GpuProgramCacheSnapshot, SkenoraDiagnostic, } from "@skenora/contracts";
10
+ //# sourceMappingURL=renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Lightweight read-only entry point without the editor facade exports. */
2
+ export * from "./playback-config.js";
3
+ export * from "./skenora-renderer.js";
4
+ export * from "./renderer-diagnostics.js";
5
+ export * from "@skenora/procedural";
6
+ export { MaterialProjectionError } from "@skenora/runtime/projection";
7
+ export { SceneCapabilityUnavailableError, MaterialAnimationError, } from "@skenora/contracts";
8
+ //# sourceMappingURL=renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { type SceneDocumentData } from "@skenora/contracts";
2
+ export declare const SCENE_CONFIG_SECTION_FILES: Readonly<{
3
+ readonly assets: "assets.json";
4
+ readonly entities: "entities.json";
5
+ readonly materials: "materials.json";
6
+ readonly environment: "environment.json";
7
+ readonly lighting: "lighting.json";
8
+ readonly camera: "camera.json";
9
+ readonly effects: "effects.json";
10
+ readonly flows: "flows.json";
11
+ readonly extensions: "extensions.json";
12
+ }>;
13
+ export type SceneConfigSection = keyof typeof SCENE_CONFIG_SECTION_FILES;
14
+ export interface SceneConfigMap {
15
+ assets: Pick<SceneDocumentData, "assets">;
16
+ entities: Pick<SceneDocumentData, "entities" | "rootEntityIds">;
17
+ materials: Pick<SceneDocumentData, "materials" | "materialBindings" | "textureAnimations">;
18
+ environment: Pick<SceneDocumentData, "environment" | "ground" | "fog" | "weather">;
19
+ lighting: Pick<SceneDocumentData, "lights">;
20
+ camera: Pick<SceneDocumentData, "camera" | "cameraPaths">;
21
+ effects: Pick<SceneDocumentData, "postProcess">;
22
+ flows: Pick<SceneDocumentData, "flows" | "variables">;
23
+ extensions: Pick<SceneDocumentData, "extensions">;
24
+ }
25
+ export interface SceneJsonManifest {
26
+ schema: "skenora.scene.bundle";
27
+ version: 1;
28
+ scene: {
29
+ schema: SceneDocumentData["schema"];
30
+ version: SceneDocumentData["version"];
31
+ id: string;
32
+ name: string;
33
+ };
34
+ files: Record<SceneConfigSection, string>;
35
+ }
36
+ export interface SceneJsonSectionDocument<TSection extends SceneConfigSection = SceneConfigSection> {
37
+ schema: "skenora.scene.section";
38
+ version: 1;
39
+ section: TSection;
40
+ data: SceneConfigMap[TSection];
41
+ }
42
+ /** JSON file contents keyed by their path relative to the manifest. */
43
+ export interface SceneJsonBundle {
44
+ manifest: string;
45
+ files: Readonly<Record<string, string>>;
46
+ }
47
+ export interface SceneJsonOptions {
48
+ space?: number;
49
+ }
50
+ export declare function getSceneConfig<TSection extends SceneConfigSection>(document: Readonly<SceneDocumentData>, section: TSection): SceneConfigMap[TSection];
51
+ export declare function applySceneConfig<TSection extends SceneConfigSection>(document: Readonly<SceneDocumentData>, section: TSection, config: SceneConfigMap[TSection]): SceneDocumentData;
52
+ export declare function serializeSceneConfig<TSection extends SceneConfigSection>(document: Readonly<SceneDocumentData>, section: TSection, options?: SceneJsonOptions): string;
53
+ export declare function parseSceneConfig<TSection extends SceneConfigSection>(json: string, expectedSection: TSection): SceneConfigMap[TSection];
54
+ export declare function exportSceneJsonBundle(document: Readonly<SceneDocumentData>, options?: SceneJsonOptions): SceneJsonBundle;
55
+ export declare function parseSceneJsonBundle(bundle: SceneJsonBundle): SceneDocumentData;
56
+ export declare function parseSceneJson(input: string | SceneJsonBundle): SceneDocumentData;
57
+ export declare function serializeSceneJson(document: Readonly<SceneDocumentData>, options?: SceneJsonOptions): string;
58
+ //# sourceMappingURL=scene-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-config.d.ts","sourceRoot":"","sources":["../src/scene-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,eAAO,MAAM,0BAA0B;;;;;;;;;;EAU5B,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,0BAA0B,CAAC;AAEzE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAC1C,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC;IAChE,SAAS,EAAE,IAAI,CACb,iBAAiB,EACjB,WAAW,GAAG,kBAAkB,GAAG,mBAAmB,CACvD,CAAC;IACF,WAAW,EAAE,IAAI,CACf,iBAAiB,EACjB,aAAa,GAAG,QAAQ,GA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