lecodes-cli 0.17.0 → 0.17.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.
@@ -28,6 +28,11 @@ export class Shape extends Aspect<"shape", Node> {
28
28
  cylinder?: { halfHeight: number, radius: number }
29
29
  /** Capsule aligned on Y: half-height of the cylinder section + radius. */
30
30
  capsule?: { halfHeight: number, radius: number }
31
+ /** The node's own triangles (a Mesh's geometry or a Model's GLB, world scale applied).
32
+ * `true` = exact triangle mesh — static/kinematic bodies, triggers, characters' ground and picking
33
+ * only (a dynamic body can't be a triangle mesh; Physics throws). `'convex'` = convex hull of the
34
+ * vertices, works for dynamic bodies too. A Model uses its bind pose (skinned parts skipped). */
35
+ mesh?: boolean | "convex"
31
36
  /** Whether pointer rays can hit this shape (click / touchstart). Default true. */
32
37
  raycast = true
33
38
 
@@ -70,13 +75,44 @@ export class Shape extends Aspect<"shape", Node> {
70
75
  if (!this.raycast && this._bodyId) _creator.physicsSetPickable(this._bodyId, false)
71
76
  }
72
77
 
78
+ /** @internal true for an exact triangle mesh — Physics refuses a dynamic body on it. */
79
+ get _isTriangleMesh(): boolean { return this.mesh === true }
80
+
73
81
  private _build(): number {
82
+ if (this.mesh) return this._buildMesh(this.mesh === "convex")
74
83
  if (this.sphere !== undefined) return _creator.physicsBuildSphere(this.sphere)
75
84
  if (this.cylinder) return _creator.physicsBuildCylinder(this.cylinder.halfHeight, this.cylinder.radius)
76
85
  if (this.capsule) return _creator.physicsBuildCapsule(this.capsule.halfHeight, this.capsule.radius)
77
86
  if (this.box) return _creator.physicsBuildBox(cx(this.box), cy(this.box), cz(this.box))
87
+ return this._buildAutoBox()
88
+ }
89
+
90
+ // mesh: a Mesh node hands its CPU geometry over; anything else is tried as a GLB root (the host
91
+ // reads the asset's triangles itself — 0 if the node is neither). Always × world scale: the
92
+ // triangles are node-local, so the collider must follow the rendered size.
93
+ private _buildMesh(convex: boolean): number {
94
+ if (!_creator.physicsBuildMesh) {
95
+ console.warn("Shape { mesh } needs a newer host — falling back to a box")
96
+ return this._buildAutoBox()
97
+ }
98
+ const s = this.node.worldScale
99
+ const geom = this.node.geometry
100
+ let id = 0
101
+ if (geom) {
102
+ if (geom._meshKind !== 0) throw new Error("Shape { mesh } needs a triangle geometry (not edges/vertices)")
103
+ id = _creator.physicsBuildMesh(geom.vertices, Uint32Array.from(geom.indices), convex, s.x, s.y, s.z)
104
+ } else {
105
+ id = _creator.physicsBuildMeshFromEntity(this.node.id, convex, s.x, s.y, s.z)
106
+ }
107
+ if (!id) {
108
+ console.warn(`Shape { mesh } could not build a ${convex ? "convex hull" : "triangle mesh"} for "${this.node.name}" (no triangles / not a Mesh or Model) — falling back to a box`)
109
+ return this._buildAutoBox()
110
+ }
111
+ return id
112
+ }
78
113
 
79
- // auto: a box from the mesh AABB × world scale (so the physical box matches the rendered size).
114
+ // auto: a box from the mesh AABB × world scale (so the physical box matches the rendered size).
115
+ private _buildAutoBox(): number {
80
116
  const s = this.node.worldScale
81
117
  let hx = 0.5, hy = 0.5, hz = 0.5
82
118
  const geom = this.node.geometry
@@ -1,46 +1,50 @@
1
- // A trigger zone, as an aspect on a 3D Node. Requires a Shape (its geometry); creates a static SENSOR
2
- // body from it, so a physics body overlapping the zone fires the node's 'enter' / 'exit' events
3
- // instead of colliding. A trigger does not block movement, and is still pointer-pickable.
4
- //
5
- // const goal = new Mesh(box(), material)
6
- // .aspect(Shape, { box: [1, 2, 1] })
7
- // .aspect(Trigger)
8
- // goal.addEventListener('enter', other => win(other))
9
- // goal.addEventListener('exit', other => …)
10
-
11
- import { Aspect } from "../core/Aspect"
12
- import { cx, cy, cz, type Vec3Like } from "../math/vec"
13
- import { Shape } from "./Shape"
14
- import { ensurePhysicsEvents } from "./physicsEvents"
15
- import type { Node } from "./Node"
16
-
17
- export class Trigger extends Aspect<"trigger", Node> {
18
- static readonly aspect = "trigger"
19
-
20
- private _bodyId = 0
21
- /** Native body id (0 if no physics support). */
22
- get id(): number { return this._bodyId }
23
-
24
- onAttach(): void {
25
- if (!_creator.physicsHasSupport || !_creator.physicsHasSupport()) return
26
- const shape = this.node.get(Shape)
27
- if (!shape) {
28
- throw new Error("Trigger requires a Shape aspect — add it first: node.aspect(Shape, {…}).aspect(Trigger)")
29
- }
30
- const shapeId = shape._claim()
31
- this._bodyId = _creator.physicsCreateBody(this.node.id, shapeId, 0 /* static */, 0, true /* sensor */, false)
32
- shape._ownBody(this._bodyId)
33
- ensurePhysicsEvents() // routes overlap events → the node's 'enter' / 'exit'
34
- }
35
-
36
- onDetach(): void {
37
- if (this._bodyId) { _creator.physicsRemoveBody(this._bodyId); this._bodyId = 0 }
38
- this.node.get(Shape)?._recreatePickBody()
39
- }
40
-
41
- /** Reposition the trigger zone to a world point. */
42
- moveTo(p: Vec3Like): this {
43
- if (this._bodyId) _creator.physicsSetBodyPosition(this._bodyId, cx(p), cy(p), cz(p))
44
- return this
45
- }
46
- }
1
+ // A trigger zone, as an aspect on a 3D Node. Requires a Shape (its geometry); creates a static SENSOR
2
+ // body from it, so a physics body overlapping the zone fires the node's 'enter' / 'exit' events
3
+ // instead of colliding. A trigger does not block movement, and is still pointer-pickable.
4
+ //
5
+ // const goal = new Mesh(box(), material)
6
+ // .aspect(Shape, { box: [1, 2, 1] })
7
+ // .aspect(Trigger)
8
+ // goal.addEventListener('enter', other => win(other))
9
+ // goal.addEventListener('exit', other => …)
10
+
11
+ import { Aspect } from "../core/Aspect"
12
+ import { cx, cy, cz, type Vec3Like } from "../math/vec"
13
+ import { Shape } from "./Shape"
14
+ import { ensurePhysicsEvents } from "./physicsEvents"
15
+ import type { Node } from "./Node"
16
+
17
+ export class Trigger extends Aspect<"trigger", Node> {
18
+ static readonly aspect = "trigger"
19
+
20
+ private _bodyId = 0
21
+ /** Native body id (0 if no physics support). */
22
+ get id(): number { return this._bodyId }
23
+
24
+ onAttach(): void {
25
+ if (!_creator.physicsHasSupport || !_creator.physicsHasSupport()) return
26
+ const shape = this.node.get(Shape)
27
+ if (!shape) {
28
+ throw new Error("Trigger requires a Shape aspect — add it first: node.aspect(Shape, {…}).aspect(Trigger)")
29
+ }
30
+ const shapeId = shape._claim()
31
+ this._bodyId = _creator.physicsCreateBody(this.node.id, shapeId, 0 /* static */, 0, true /* sensor */, false)
32
+ shape._ownBody(this._bodyId)
33
+ ensurePhysicsEvents() // routes overlap events → the node's 'enter' / 'exit'
34
+ }
35
+
36
+ onDetach(): void {
37
+ if (this._bodyId) { _creator.physicsRemoveBody(this._bodyId); this._bodyId = 0 }
38
+ const shape = this.node.get(Shape)
39
+ if (shape) {
40
+ shape._ownBody(0) // the Shape held OUR body id — forget it, or its own detach removes it twice (native crash)
41
+ shape._recreatePickBody()
42
+ }
43
+ }
44
+
45
+ /** Reposition the trigger zone to a world point. */
46
+ moveTo(p: Vec3Like): this {
47
+ if (this._bodyId) _creator.physicsSetBodyPosition(this._bodyId, cx(p), cy(p), cz(p))
48
+ return this
49
+ }
50
+ }
@@ -1,160 +1,162 @@
1
- // THE aggregation point. Every public global the SDK provides is re-exported here under the exact
2
- // name user code uses it as. The bundler passes this file to esbuild's `inject:` option, so user
3
- // code references `Scene`, `Sprite`, `toast`, … with no imports; esbuild tree-shakes away whatever
4
- // a given project does not use (so a pure-2D project drops all 3D classes, and vice versa).
5
- //
6
- // Rule: this is the ONLY file that `export`s public names. Everything else is internal and imported
7
- // by it. Host-provided globals (setLoop, console, setTimeout, DEG2RAD, asset, …) are NOT here —
8
- // they live in src/host.d.ts as declarations and stay as free references at runtime.
9
-
10
- // ---- math ----
11
- export { Mathf } from "./math/Mathf"
12
- export { Vec2, Vec3 } from "./math/vec"
13
- export { Quat } from "./math/quat"
14
- export { Mat4 } from "./math/mat4"
15
- export { Color } from "./core/color"
16
-
17
- // ---- aspects (attachable node capabilities) ----
18
- export { Aspect, type With } from "./core/Aspect"
19
- export { InspectorUI } from "./core/InspectorUI"
20
-
21
- // ---- reactivity (signals; UI text/style props also accept `() => value` bindings) ----
22
- export { signal, computed, effect, type Signal, type Computed } from "./core/signals"
23
-
24
- // ---- canvas (core 2D drawing that bakes to a texture; shared by 2D/3D/UI) ----
25
- export { Canvas, Bitmap } from "./canvas/Canvas"
26
-
27
- // ---- platform runtime (injected globals; the host provides the lower-level _creator* bridges) ----
28
- export { toast, openURL, SvgSource } from "./runtime/misc"
29
- export { app, type AppState } from "./runtime/app"
30
- export { clipboard } from "./runtime/clipboard"
31
- export { date, type DateValue, type DateInput, type Unit, type Locale } from "./runtime/datetime"
32
- export { fetch, fetchLocal, FormData, File, type FetchResponse } from "./runtime/fetch"
33
- export { localStorage } from "./runtime/storage"
34
- export { device, type HapticStyle, type MotionOptions } from "./runtime/device"
35
- export { Input } from "./runtime/input"
36
- export { WebSocket } from "./runtime/net"
37
- // App-backend transport: the compiler-generated stubs of `*.server.ts` modules call these; user code
38
- // only ever imports its server functions (docs/backend-plan.md §4).
39
- export { __rpc, __channel, __serverOnly, RpcError, type ClientChannel } from "./runtime/rpc"
40
- export { AudioPlayer, VideoPlayer } from "./runtime/media"
41
- export { openFilePicker } from "./runtime/files"
42
- export { share } from "./runtime/share"
43
- export { ClickEvent, TouchStartEvent, LongPressEvent } from "./runtime/touch"
44
-
45
- // ---- 2D engine (creator-2d) ----
46
- export { Scene2D } from "./g2/Scene2D"
47
- export { Node2D } from "./g2/Node2D"
48
- export { Camera2D } from "./g2/Camera2D"
49
- export { Sprite } from "./g2/Sprite"
50
- export { SpriteAnimation } from "./g2/SpriteAnimation"
51
- export { Shape2D } from "./g2/Shape2D"
52
- export { Physics2D } from "./g2/Physics2D"
53
- export { Trigger2D } from "./g2/Trigger2D"
54
- export { CharacterController2D } from "./g2/CharacterController2D"
55
- export { Tilemap } from "./g2/Tilemap"
56
- export { Texture2D } from "./g2/Texture2D"
57
- // sprite sheets as data (.sprite.ts files — see src/g2/SpriteSheet.ts)
58
- export { SpriteSheet, defineSpriteSheet } from "./g2/SpriteSheet"
59
- export type { SpriteSheetDef, SheetSprite, SpriteMakeOptions } from "./g2/SpriteSheet"
60
- // tilesets as data (.tiles.ts files — autotile materials, see src/g2/Tileset.ts + autotile.ts)
61
- export { Tileset, defineTileset, Autotile2D } from "./g2/Tileset"
62
- export { rawCell, isRawCell, rawIndex } from "./g2/autotile"
63
- export { rot90, rot180, rot270, flipX, packTile, tileIndex, tileTurns, tileFlip, tileOriented } from "./g2/autotile"
64
- export type {
65
- TilesetDef, TileMaterial, PatchMaterial, PathMaterial, PatchSlots, EdgeSlot, FillBlock, BlockEntry,
66
- TileBlock, TilePart,
67
- } from "./g2/autotile"
68
- // 2D scenes as data (.scene2d.ts files — see src/g2/defineScene2d.ts) + the cells('…') payload
69
- export { defineScene2d, Scene2dHandle } from "./g2/defineScene2d"
70
- export type { Scene2dDef, Scene2dNodeDef, Scene2dEnv, SpriteSourceDef, TilemapSourceDef, Camera2dNodeDef, LoadedScene2d } from "./g2/defineScene2d"
71
- export { cells, encodeCells, type CellsData } from "./g2/cells"
72
- // no-code 2D scenario aspects (attachable in scene files — see src/g2/scenarios2d.ts)
73
- export { CameraFollow } from "./g2/scenarios2d"
74
-
75
- // ---- UI (creator-ui) ----
76
- export {
77
- UIScreen, type UIScreenStyle,
78
- UIRow, UIColumn, UIBox, type UIContainerStyle,
79
- UIText, type UITextStyle,
80
- UIButton, type UIButtonStyle,
81
- UIImage, type UIImageStyle,
82
- UIVideo, type UIVideoStyle,
83
- UIInput, UITextArea, type UIInputStyle,
84
- UIScrollable, type UIScrollableStyle,
85
- UIPager, type UIPagerStyle,
86
- UITabs, type UITabDef,
87
- defineTabs, type TabDef, type TabsHandle,
88
- UIWidget, type UIWidgetStyle,
89
- UIModal, type UIModalStyle,
90
- UIBottomSheet, type UIBottomSheetStyle,
91
- UIPopover, type UIPopoverStyle,
92
- UISpacer, type UISpacerStyle,
93
- UIVirtualizedList,
94
- Router,
95
- NativeView, type UINativeViewStyle,
96
- registerFont,
97
- __uiMap,
98
- __UIColumn, __UIRow, __UIBox, __UIButton, __UIScreen, __UIScrollable, __UIWidget,
99
- } from "./ui/UI"
100
- // The Presentable navigation contract (docs/navigation-presentable-plan.md). `Presentable` is
101
- // interface + runtime companion (declaration merging): `Presentable.current` = what's on screen.
102
- export { Presentable } from "./ui/UI"
103
- export type { PresentOptions, Transition, TransitionName, TransitionSpec, TransitionTransform } from "./ui/UI"
104
- // The base node type + the union a container accepts as children — documented as the signature of
105
- // UIColumn/UIRow/append/etc., so they must be global (type-only; erased at runtime).
106
- export type { UINode, UINodeChild } from "./ui/UINode"
107
- // App theme variables (docs/ui-theme-plan.md): theme({...}) merges + returns typed var()
108
- // accessors; system vars are static props (theme.primaryColor, theme["comfort-top"], …).
109
- export { theme, type ThemeValues, type ThemeAccessors } from "./ui/theme"
110
-
111
- // ---- animate ----
112
- export { animate, animateMat4, stopAnimation, pauseAnimation, resumeAnimation } from "./animate/animate"
113
- export { cubicBezier } from "./animate/bezier"
114
- export { easeIn, easeOut, easeInOut } from "./animate/easings"
115
-
116
- // ---- plugins (optional, host-provided capabilities — typed NativeView/service wrappers, see src/plugins/) ----
117
- export { QRScanner } from "./plugins/qr"
118
- export { CameraView, type CameraFacing } from "./plugins/camera"
119
- export { Geolocation, type GeoPosition, type GeoOptions, type GeoWatch } from "./plugins/geolocation"
120
- export { Push, type PushPayload, type PushStatus, type PushRegisterOptions, type PushEvent } from "./plugins/push"
121
- export { OAuth, type OAuthCredential, type OAuthProviderName } from "./plugins/oauth"
122
- export { Service } from "./plugins/service"
123
-
124
- // ---- scenes as data (.scene.ts files — see src/scene/defineScene.ts) ----
125
- export { defineScene, use, ref, make, SceneHandle } from "./scene/defineScene"
126
- export type { SceneDef, SceneNodeDef, MeshDef, LightDef, MaterialDef, CameraNodeDef, AspectEntry, MakeEntry, LoadedScene } from "./scene/defineScene"
127
- export type { FieldMeta } from "./core/fields"
128
-
129
- // ---- no-code scenario aspects (attachable in the scene editor — see src/gl/scenarios.ts) ----
130
- export { MoveTo, FollowPath, Spin, LookAt, PlayAnimation } from "./gl/scenarios"
131
-
132
- // ---- editor plugins (called from `*.editor.ts` files — editor bundles only; DCE'd from apps) ----
133
- export { registerEditorWindow, registerEditorTool, __editorPlugins } from "./scene/editorPlugins"
134
- export type { EditorApi, EditorRayHit, EditorToolHooks, EditorWindowFn } from "./scene/editorPlugins"
135
-
136
- // ---- 3D engine (creator-gl) ----
137
- export { Scene, ARScene, VRScene } from "./gl/Scene"
138
- export { Node } from "./gl/Node"
139
- export { Mesh } from "./gl/Mesh"
140
- export { Model } from "./gl/Model"
141
- export { Shape } from "./gl/Shape"
142
- export { Physics } from "./gl/Physics"
143
- export { Trigger } from "./gl/Trigger"
144
- export { CharacterController } from "./gl/CharacterController"
145
- export { ModelAnimation } from "./gl/ModelAnimation"
146
- export { AnimationClip } from "./gl/AnimationClip"
147
- export type { ClipDef, ClipTrackDef, ClipKey } from "./gl/AnimationClip"
148
- export { Animator } from "./gl/Animator"
149
- export type { AnimatorPlayOptions } from "./gl/Animator"
150
- export { IK } from "./gl/IK"
151
- export type { IKTwoBone, IKLookAt } from "./gl/IK"
152
- export { Light } from "./gl/Light"
153
- export { Material } from "./gl/Material"
154
- export { Geometry } from "./gl/Geometry"
155
- export { Texture } from "./gl/Texture"
156
- export { Camera } from "./gl/Camera"
157
- export { Ray } from "./gl/Ray"
158
- export { Plane } from "./gl/Plane"
159
- export { Noise } from "./gl/Noise"
160
- export { Particles, Trail, curve, colorCurve } from "./gl/Particles"
1
+ // THE aggregation point. Every public global the SDK provides is re-exported here under the exact
2
+ // name user code uses it as. The bundler passes this file to esbuild's `inject:` option, so user
3
+ // code references `Scene`, `Sprite`, `toast`, … with no imports; esbuild tree-shakes away whatever
4
+ // a given project does not use (so a pure-2D project drops all 3D classes, and vice versa).
5
+ //
6
+ // Rule: this is the ONLY file that `export`s public names. Everything else is internal and imported
7
+ // by it. Host-provided globals (setLoop, console, setTimeout, DEG2RAD, asset, …) are NOT here —
8
+ // they live in src/host.d.ts as declarations and stay as free references at runtime.
9
+
10
+ // ---- math ----
11
+ export { Mathf } from "./math/Mathf"
12
+ export { Vec2, Vec3 } from "./math/vec"
13
+ export { Quat } from "./math/quat"
14
+ export { Mat4 } from "./math/mat4"
15
+ export { Color } from "./core/color"
16
+
17
+ // ---- aspects (attachable node capabilities) ----
18
+ export { Aspect, type With } from "./core/Aspect"
19
+ export { InspectorUI } from "./core/InspectorUI"
20
+
21
+ // ---- reactivity (signals; UI text/style props also accept `() => value` bindings) ----
22
+ export { signal, computed, effect, type Signal, type Computed } from "./core/signals"
23
+
24
+ // ---- canvas (core 2D drawing that bakes to a texture; shared by 2D/3D/UI) ----
25
+ export { Canvas, Bitmap } from "./canvas/Canvas"
26
+
27
+ // ---- platform runtime (injected globals; the host provides the lower-level _creator* bridges) ----
28
+ export { toast, openURL, SvgSource } from "./runtime/misc"
29
+ export { app, type AppState } from "./runtime/app"
30
+ export { clipboard } from "./runtime/clipboard"
31
+ export { date, type DateValue, type DateInput, type Unit, type Locale } from "./runtime/datetime"
32
+ export { fetch, fetchLocal, FormData, File, type FetchResponse } from "./runtime/fetch"
33
+ export { localStorage } from "./runtime/storage"
34
+ export { device, type HapticStyle, type MotionOptions } from "./runtime/device"
35
+ export { Input } from "./runtime/input"
36
+ export { WebSocket } from "./runtime/net"
37
+ // App-backend transport: the compiler-generated stubs of `*.server.ts` modules call these; user code
38
+ // only ever imports its server functions (docs/backend-plan.md §4).
39
+ export { __rpc, __channel, __serverOnly, RpcError, type ClientChannel } from "./runtime/rpc"
40
+ export { AudioPlayer, VideoPlayer } from "./runtime/media"
41
+ export { openFilePicker } from "./runtime/files"
42
+ export { share } from "./runtime/share"
43
+ export { ClickEvent, TouchStartEvent, LongPressEvent } from "./runtime/touch"
44
+
45
+ // ---- 2D engine (creator-2d) ----
46
+ export { Scene2D } from "./g2/Scene2D"
47
+ export { Node2D } from "./g2/Node2D"
48
+ export { Camera2D } from "./g2/Camera2D"
49
+ export { Sprite } from "./g2/Sprite"
50
+ export { SpriteAnimation } from "./g2/SpriteAnimation"
51
+ export { Shape2D } from "./g2/Shape2D"
52
+ export { Physics2D } from "./g2/Physics2D"
53
+ export { Trigger2D } from "./g2/Trigger2D"
54
+ export { CharacterController2D } from "./g2/CharacterController2D"
55
+ export { Tilemap } from "./g2/Tilemap"
56
+ export { Texture2D } from "./g2/Texture2D"
57
+ // sprite sheets as data (.sprite.ts files — see src/g2/SpriteSheet.ts)
58
+ export { SpriteSheet, defineSpriteSheet } from "./g2/SpriteSheet"
59
+ export type { SpriteSheetDef, SheetSprite, SpriteMakeOptions } from "./g2/SpriteSheet"
60
+ // tilesets as data (.tiles.ts files — autotile materials, see src/g2/Tileset.ts + autotile.ts)
61
+ export { Tileset, defineTileset, Autotile2D } from "./g2/Tileset"
62
+ export { rawCell, isRawCell, rawIndex } from "./g2/autotile"
63
+ export { rot90, rot180, rot270, flipX, packTile, tileIndex, tileTurns, tileFlip, tileOriented } from "./g2/autotile"
64
+ export type {
65
+ TilesetDef, TileMaterial, PatchMaterial, PathMaterial, PatchSlots, EdgeSlot, FillBlock, BlockEntry,
66
+ TileBlock, TilePart,
67
+ } from "./g2/autotile"
68
+ // 2D scenes as data (.scene2d.ts files — see src/g2/defineScene2d.ts) + the cells('…') payload
69
+ export { defineScene2d, Scene2dHandle } from "./g2/defineScene2d"
70
+ export type { Scene2dDef, Scene2dNodeDef, Scene2dEnv, SpriteSourceDef, TilemapSourceDef, Camera2dNodeDef, LoadedScene2d } from "./g2/defineScene2d"
71
+ export { cells, encodeCells, type CellsData } from "./g2/cells"
72
+ // no-code 2D scenario aspects (attachable in scene files — see src/g2/scenarios2d.ts)
73
+ export { CameraFollow } from "./g2/scenarios2d"
74
+
75
+ // ---- UI (creator-ui) ----
76
+ export {
77
+ UIScreen, type UIScreenStyle,
78
+ UIRow, UIColumn, UIBox, type UIContainerStyle,
79
+ UIText, type UITextStyle,
80
+ UIButton, type UIButtonStyle,
81
+ UIImage, type UIImageStyle,
82
+ UIVideo, type UIVideoStyle,
83
+ UIInput, UITextArea, type UIInputStyle,
84
+ UIScrollable, type UIScrollableStyle,
85
+ UIPager, type UIPagerStyle,
86
+ UITabs, type UITabDef,
87
+ defineTabs, type TabDef, type TabsHandle,
88
+ UIWidget, type UIWidgetStyle,
89
+ UIModal, type UIModalStyle,
90
+ UIBottomSheet, type UIBottomSheetStyle,
91
+ UIPopover, type UIPopoverStyle,
92
+ UISpacer, type UISpacerStyle,
93
+ UIVirtualizedList,
94
+ Router,
95
+ NativeView, type UINativeViewStyle,
96
+ registerFont,
97
+ __uiMap,
98
+ __UIColumn, __UIRow, __UIBox, __UIButton, __UIScreen, __UIScrollable, __UIWidget,
99
+ } from "./ui/UI"
100
+ // The Presentable navigation contract (docs/navigation-presentable-plan.md). `Presentable` is
101
+ // interface + runtime companion (declaration merging): `Presentable.current` = what's on screen.
102
+ export { Presentable } from "./ui/UI"
103
+ export type { PresentOptions, Transition, TransitionName, TransitionSpec, TransitionTransform } from "./ui/UI"
104
+ // The base node type + the union a container accepts as children — documented as the signature of
105
+ // UIColumn/UIRow/append/etc., so they must be global (type-only; erased at runtime).
106
+ export type { UINode, UINodeChild } from "./ui/UINode"
107
+ // App theme variables (docs/ui-theme-plan.md): theme({...}) merges + returns typed var()
108
+ // accessors; system vars are static props (theme.primaryColor, theme["comfort-top"], …).
109
+ export { theme, type ThemeValues, type ThemeAccessors } from "./ui/theme"
110
+
111
+ // ---- animate ----
112
+ export { animate, animateMat4, stopAnimation, pauseAnimation, resumeAnimation } from "./animate/animate"
113
+ export { cubicBezier } from "./animate/bezier"
114
+ export { easeIn, easeOut, easeInOut } from "./animate/easings"
115
+
116
+ // ---- plugins (optional, host-provided capabilities — typed NativeView/service wrappers, see src/plugins/) ----
117
+ export { QRScanner } from "./plugins/qr"
118
+ export { CameraView, type CameraFacing } from "./plugins/camera"
119
+ export { Geolocation, type GeoPosition, type GeoOptions, type GeoWatch } from "./plugins/geolocation"
120
+ export { Push, type PushPayload, type PushStatus, type PushRegisterOptions, type PushEvent } from "./plugins/push"
121
+ export { OAuth, type OAuthCredential, type OAuthProviderName } from "./plugins/oauth"
122
+ export { Service } from "./plugins/service"
123
+
124
+ // ---- scenes as data (.scene.ts files — see src/scene/defineScene.ts) ----
125
+ export { defineScene, use, ref, make, SceneHandle } from "./scene/defineScene"
126
+ export type { SceneDef, SceneNodeDef, MeshDef, LightDef, MaterialDef, CameraNodeDef, AspectEntry, MakeEntry, LoadedScene } from "./scene/defineScene"
127
+ export type { FieldMeta } from "./core/fields"
128
+
129
+ // ---- no-code scenario aspects (attachable in the scene editor — see src/gl/scenarios.ts) ----
130
+ export { MoveTo, FollowPath, Spin, LookAt, PlayAnimation } from "./gl/scenarios"
131
+
132
+ // ---- editor plugins (called from `*.editor.ts` files — editor bundles only; DCE'd from apps) ----
133
+ export { registerEditorWindow, registerEditorTool, __editorPlugins } from "./scene/editorPlugins"
134
+ export type { EditorApi, EditorRayHit, EditorToolHooks, EditorWindowFn } from "./scene/editorPlugins"
135
+
136
+ // ---- 3D engine (creator-gl) ----
137
+ export { Scene, ARScene, VRScene } from "./gl/Scene"
138
+ export { Node } from "./gl/Node"
139
+ export { Mesh } from "./gl/Mesh"
140
+ export { Model } from "./gl/Model"
141
+ export { Shape } from "./gl/Shape"
142
+ export { Physics } from "./gl/Physics"
143
+ export { Trigger } from "./gl/Trigger"
144
+ export { CharacterController } from "./gl/CharacterController"
145
+ export { ModelAnimation } from "./gl/ModelAnimation"
146
+ export { AnimationClip } from "./gl/AnimationClip"
147
+ export type { ClipDef, ClipTrackDef, ClipKey } from "./gl/AnimationClip"
148
+ export { Animator } from "./gl/Animator"
149
+ export type { AnimatorPlayOptions } from "./gl/Animator"
150
+ export { IK } from "./gl/IK"
151
+ export type { IKTwoBone, IKLookAt } from "./gl/IK"
152
+ export { Light } from "./gl/Light"
153
+ export { Material } from "./gl/Material"
154
+ export { Geometry } from "./gl/Geometry"
155
+ export { InstancedMesh } from "./gl/InstancedMesh"
156
+ export type { InstanceTransform } from "./gl/InstancedMesh"
157
+ export { Texture } from "./gl/Texture"
158
+ export { Camera } from "./gl/Camera"
159
+ export { Ray } from "./gl/Ray"
160
+ export { Plane } from "./gl/Plane"
161
+ export { Noise } from "./gl/Noise"
162
+ export { Particles, Trail, curve, colorCurve } from "./gl/Particles"