lecodes-sdk 1.2.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/editor.d.ts +12 -0
- package/dist/global.d.ts +4 -8
- package/dist/host.d.ts +2 -3
- package/dist/types/animate/tween/Animation.d.ts +0 -3
- package/dist/types/animate/tween/animateValue.d.ts +4 -2
- package/dist/types/animate/tween/easing.d.ts +8 -0
- package/dist/types/animate/tween/spec.d.ts +15 -7
- package/dist/types/audio/audio.d.ts +2 -1
- package/dist/types/canvas/Canvas.d.ts +40 -108
- package/dist/types/canvas/gen/cssColor.d.ts +17 -0
- package/dist/types/canvas/gen/recorder.d.ts +118 -0
- package/dist/types/canvas/gen/spec.d.ts +144 -0
- package/dist/types/core/color.d.ts +3 -1
- package/dist/types/core/pins.d.ts +18 -0
- package/dist/types/g2/Node2D.d.ts +5 -8
- package/dist/types/g2/Scene2D.d.ts +6 -2
- package/dist/types/gl/Foliage.d.ts +30 -7
- package/dist/types/gl/Light.d.ts +8 -0
- package/dist/types/gl/Lightmap.d.ts +13 -2
- package/dist/types/gl/Material.d.ts +17 -3
- package/dist/types/gl/Model.d.ts +6 -2
- package/dist/types/gl/Node.d.ts +3 -6
- package/dist/types/gl/Scene.d.ts +41 -13
- package/dist/types/gl/Texture.d.ts +1 -1
- package/dist/types/gl/animation/Locomotion.d.ts +8 -1
- package/dist/types/inject.d.ts +11 -11
- package/dist/types/inject.editor.d.ts +1 -0
- package/dist/types/net/core.d.ts +7 -0
- package/dist/types/plugin.d.ts +76 -0
- package/dist/types/plugins/gen/camera/sdk/camera.d.ts +24 -0
- package/dist/types/plugins/gen/camera/sdk/camera.gen.d.ts +25 -0
- package/dist/types/plugins/{geolocation.d.ts → gen/geolocation/sdk/geolocation.d.ts} +2 -20
- package/dist/types/plugins/gen/geolocation/sdk/geolocation.gen.d.ts +31 -0
- package/dist/types/plugins/{map.d.ts → gen/map/sdk/map.d.ts} +9 -50
- package/dist/types/plugins/gen/map/sdk/map.gen.d.ts +53 -0
- package/dist/types/plugins/gen/push/sdk/push.d.ts +23 -0
- package/dist/types/plugins/gen/push/sdk/push.gen.d.ts +35 -0
- package/dist/types/plugins/{qr.d.ts → gen/qr-scanner/sdk/qr-scanner.d.ts} +2 -3
- package/dist/types/plugins/gen/qr-scanner/sdk/qr-scanner.gen.d.ts +15 -0
- package/dist/types/runtime/app.d.ts +9 -2
- package/dist/types/runtime/fetch.d.ts +2 -0
- package/dist/types/runtime/input.d.ts +1 -1
- package/dist/types/runtime/media.d.ts +6 -10
- package/dist/types/runtime/misc.d.ts +4 -1
- package/dist/types/runtime/net.d.ts +3 -2
- package/dist/types/runtime/touch.d.ts +32 -0
- package/dist/types/scene/defineScene.d.ts +43 -2
- package/dist/types/scene/editor.d.ts +52 -0
- package/dist/types/scene/gizmos.d.ts +7 -4
- package/dist/types/ui/NativeView.d.ts +6 -4
- package/dist/types/ui/UI.d.ts +1 -1
- package/dist/types/ui/UIBottomSheet.d.ts +6 -12
- package/dist/types/ui/UIButton.d.ts +12 -14
- package/dist/types/ui/UIContainer.d.ts +0 -6
- package/dist/types/ui/UIImage.d.ts +1 -4
- package/dist/types/ui/UIInput.d.ts +8 -24
- package/dist/types/ui/UIModal.d.ts +0 -2
- package/dist/types/ui/UINode.d.ts +70 -56
- package/dist/types/ui/UIPager.d.ts +28 -27
- package/dist/types/ui/UIPopover.d.ts +0 -2
- package/dist/types/ui/UIScreen.d.ts +12 -17
- package/dist/types/ui/UIScrollable.d.ts +1 -4
- package/dist/types/ui/UIText.d.ts +0 -2
- package/dist/types/ui/UIVideo.d.ts +3 -5
- package/dist/types/ui/UIVirtualizedList.d.ts +14 -16
- package/dist/types/ui/UIWidget.d.ts +10 -9
- package/dist/types/ui/colorKeys.gen.d.ts +9 -0
- package/dist/types/ui/presentable.d.ts +46 -32
- package/dist/types/ui/router.d.ts +18 -7
- package/dist/types/ui/styleColor.d.ts +1 -0
- package/dist/types/ui/transitions.d.ts +18 -0
- package/dist/types/ui/tree.d.ts +75 -0
- package/dist/types/version.d.ts +10 -0
- package/dist/types.json +1 -1
- package/package.json +12 -3
- package/prompts/2d.md +2 -6
- package/prompts/3d.md +1 -5
- package/prompts/README.md +1 -1
- package/prompts/canvas.md +9 -8
- package/prompts/compose.ts +1 -1
- package/prompts/core.md +3 -3
- package/prompts/design.md +1 -1
- package/prompts/dist/2d-game.md +473 -239
- package/prompts/dist/3d-app.md +553 -205
- package/prompts/dist/ar-app.md +435 -202
- package/prompts/dist/design.md +113 -95
- package/prompts/dist/ui-app.md +386 -170
- package/prompts/ui-design.md +2 -3
- package/prompts/ui.md +45 -37
- package/src/animate/tween/Animation.ts +34 -150
- package/src/animate/tween/Timeline.ts +175 -175
- package/src/animate/tween/animateValue.ts +6 -3
- package/src/animate/tween/easing.ts +10 -3
- package/src/animate/tween/spec.ts +41 -15
- package/src/audio/Sound.ts +3 -3
- package/src/audio/audio.ts +2 -1
- package/src/bridges/2d.d.ts +317 -0
- package/src/bridges/app.d.ts +91 -0
- package/src/bridges/audio.d.ts +97 -0
- package/src/bridges/canvas.d.ts +79 -0
- package/src/bridges/device.d.ts +72 -0
- package/src/bridges/fetch.d.ts +80 -0
- package/src/bridges/files.d.ts +70 -0
- package/src/bridges/gl.d.ts +1133 -0
- package/src/bridges/input.d.ts +72 -0
- package/src/bridges/media.d.ts +55 -0
- package/src/bridges/nav.d.ts +71 -0
- package/src/bridges/net.d.ts +52 -0
- package/src/bridges/service.d.ts +52 -0
- package/src/bridges/socket.d.ts +31 -0
- package/src/bridges/storage.d.ts +33 -0
- package/src/bridges/tree.d.ts +301 -0
- package/src/bridges/types.d.ts +49 -0
- package/src/canvas/Canvas.ts +114 -159
- package/src/canvas/gen/cssColor.ts +224 -0
- package/src/canvas/gen/recorder.ts +212 -0
- package/src/canvas/gen/spec.ts +201 -0
- package/src/chisel.ts +193 -0
- package/src/compile/assetMacro.ts +1 -1
- package/src/compile/bundler.ts +11 -2
- package/src/compile/compileProject.ts +43 -4
- package/src/compile/fontMacro.ts +3 -4
- package/src/compile/header.ts +26 -5
- package/src/compile/index.ts +3 -1
- package/src/compile/liteMaterial.ts +1 -1
- package/src/compile/sceneEditor.ts +11 -26
- package/src/core/color.ts +73 -30
- package/src/core/pins.ts +51 -0
- package/src/core/signals.ts +8 -1
- package/src/g2/CharacterController2D.ts +3 -3
- package/src/g2/Node2D.ts +57 -39
- package/src/g2/Physics2D.ts +2 -2
- package/src/g2/Scene2D.ts +35 -23
- package/src/g2/Texture2D.ts +1 -1
- package/src/g2/loop.ts +4 -4
- package/src/gl/CameraPlace.ts +52 -52
- package/src/gl/Foliage.ts +72 -17
- package/src/gl/Geometry.ts +1 -2
- package/src/gl/Light.ts +10 -0
- package/src/gl/Lightmap.ts +45 -29
- package/src/gl/Material.ts +95 -51
- package/src/gl/Mesh.ts +120 -120
- package/src/gl/Model.ts +21 -16
- package/src/gl/Node.ts +91 -24
- package/src/gl/Particles.ts +1 -1
- package/src/gl/Scene.ts +100 -44
- package/src/gl/Texture.ts +8 -7
- package/src/gl/animation/AnimationClip.ts +1 -1
- package/src/gl/animation/DynamicBone.ts +482 -482
- package/src/gl/animation/Locomotion.ts +8 -3
- package/src/gl/nav/NavMesh.ts +3 -4
- package/src/gl/physics/Physics.ts +2 -2
- package/src/gl/physics/physicsEvents.ts +3 -3
- package/src/gl/scenarios.ts +291 -291
- package/src/gl/terrain/Terrain.ts +4 -5
- package/src/gl/touch.ts +14 -15
- package/src/host.d.ts +2 -3
- package/src/inject.editor.ts +7 -0
- package/src/inject.ts +13 -16
- package/src/net/core.ts +6 -5
- package/src/net/index.ts +1 -1
- package/src/net/replication.ts +1 -1
- package/src/plugin.ts +191 -0
- package/src/plugins/gen/camera/contract.d.ts +27 -0
- package/src/plugins/gen/camera/sdk/camera.gen.ts +46 -0
- package/src/plugins/gen/camera/sdk/camera.ts +57 -0
- package/src/plugins/gen/geolocation/contract.d.ts +50 -0
- package/src/plugins/gen/geolocation/sdk/geolocation.gen.ts +54 -0
- package/src/plugins/{geolocation.ts → gen/geolocation/sdk/geolocation.ts} +22 -43
- package/src/plugins/gen/map/contract.d.ts +144 -0
- package/src/plugins/gen/map/sdk/map.gen.ts +88 -0
- package/src/plugins/{map.ts → gen/map/sdk/map.ts} +68 -102
- package/src/plugins/gen/push/contract.d.ts +61 -0
- package/src/plugins/gen/push/sdk/push.gen.ts +60 -0
- package/src/plugins/gen/push/sdk/push.ts +105 -0
- package/src/plugins/gen/qr-scanner/contract.d.ts +16 -0
- package/src/plugins/gen/qr-scanner/sdk/qr-scanner.gen.ts +29 -0
- package/src/plugins/gen/qr-scanner/sdk/qr-scanner.ts +52 -0
- package/src/plugins/permission.ts +5 -4
- package/src/runtime/app.ts +20 -9
- package/src/runtime/appEvents.ts +5 -4
- package/src/runtime/channel.ts +18 -15
- package/src/runtime/clipboard.ts +4 -3
- package/src/runtime/datetime.ts +2 -1
- package/src/runtime/device.ts +17 -15
- package/src/runtime/fetch.ts +30 -20
- package/src/runtime/files.ts +16 -15
- package/src/runtime/input.ts +12 -10
- package/src/runtime/media.ts +50 -46
- package/src/runtime/misc.ts +7 -3
- package/src/runtime/net.ts +8 -7
- package/src/runtime/rpc.ts +1 -3
- package/src/runtime/service.ts +19 -14
- package/src/runtime/share.ts +4 -3
- package/src/runtime/storage.ts +6 -4
- package/src/runtime/touch.ts +32 -0
- package/src/scene/defineScene.ts +61 -365
- package/src/scene/editor.ts +408 -0
- package/src/scene/editorPlugins.ts +3 -3
- package/src/scene/gizmos.ts +15 -9
- package/src/server/db/marci/query.ts +1 -1
- package/src/server/host.ts +1 -1
- package/src/server/runtime.ts +1 -1
- package/src/ui/NativeView.ts +72 -25
- package/src/ui/UI.ts +3 -3
- package/src/ui/UIBottomSheet.ts +16 -17
- package/src/ui/UIButton.ts +54 -16
- package/src/ui/UIContainer.ts +0 -6
- package/src/ui/UIImage.ts +34 -30
- package/src/ui/UIInput.ts +29 -37
- package/src/ui/UIModal.ts +1 -3
- package/src/ui/UINode.ts +347 -297
- package/src/ui/UIPager.ts +93 -78
- package/src/ui/UIPopover.ts +0 -2
- package/src/ui/UIScreen.ts +41 -36
- package/src/ui/UIScrollable.ts +19 -13
- package/src/ui/UISpacer.ts +1 -1
- package/src/ui/UITabs.ts +8 -6
- package/src/ui/UIText.ts +7 -17
- package/src/ui/UIVideo.ts +30 -27
- package/src/ui/UIVirtualizedList.ts +58 -59
- package/src/ui/UIWidget.ts +38 -18
- package/src/ui/colorKeys.gen.ts +37 -0
- package/src/ui/fonts.ts +2 -2
- package/src/ui/presentable.ts +59 -42
- package/src/ui/router.ts +52 -35
- package/src/ui/styleColor.ts +56 -0
- package/src/ui/theme.ts +7 -6
- package/src/ui/transitions.ts +249 -0
- package/src/ui/tree.ts +346 -0
- package/src/version.ts +24 -0
- package/tests/helpers/engineWorld.ts +11 -0
- package/tests/helpers/fakeTree.ts +353 -0
- package/tests/helpers/hostStubs.ts +31 -0
- package/tests/helpers/index.ts +14 -0
- package/tests/helpers/memoryMarci.ts +124 -0
- package/tests/helpers/phases.ts +23 -0
- package/tests/helpers/preload.ts +18 -0
- package/tests/helpers/stubApp.ts +2 -0
- package/tests/helpers/stubDevice.ts +2 -0
- package/tests/helpers/stubFetch.ts +2 -0
- package/tests/helpers/stubInput.ts +2 -0
- package/dist/inject.js +0 -4629
- package/dist/types/core/registry.d.ts +0 -7
- package/dist/types/plugins/camera.d.ts +0 -25
- package/dist/types/plugins/push.d.ts +0 -46
- package/src/bridges.d.ts +0 -1769
- package/src/compile/__tests__/assetIconMacro.test.ts +0 -219
- package/src/compile/__tests__/assetMacro.test.ts +0 -100
- package/src/compile/__tests__/assetName.test.ts +0 -55
- package/src/compile/__tests__/compile.test.ts +0 -310
- package/src/compile/__tests__/detectEntry.test.ts +0 -151
- package/src/compile/__tests__/fontMacro.test.ts +0 -199
- package/src/compile/__tests__/serverSplit.test.ts +0 -27
- package/src/core/__tests__/stateMachine.test.ts +0 -132
- package/src/core/registry.ts +0 -23
- package/src/plugins/camera.ts +0 -81
- package/src/plugins/push.ts +0 -132
- package/src/plugins/qr.ts +0 -73
|
@@ -1,38 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { EasingInput } from "../animate/tween/easing";
|
|
2
|
+
/** The built-in transitions (ui/transitions.ts holds what each one is). `push` / `pop` are the
|
|
3
|
+
* stacked-navigation pair — the incoming screen slides over the other one, which drifts and dims;
|
|
4
|
+
* the rest are two-screen moves. */
|
|
3
5
|
export type TransitionName = "push" | "pop" | "slide-from-left" | "slide-from-right" | "slide-from-top" | "slide-from-bottom" | "zoom" | "zoom-in" | "zoom-out" | "fade" | "none";
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
/**
|
|
7
|
+
* One screen's pose in a transition — the keys of an `animateTo` bag a transition can move, with
|
|
8
|
+
* the side's own timing. An array is a list of keyframes, as there.
|
|
9
|
+
*/
|
|
10
|
+
export type TransitionPose = {
|
|
11
|
+
/** A transform list, as in a style — and here a `%` in `translate` is a percent of the screen's
|
|
12
|
+
* own box: `"translateX(100%)"` is one width to the right. */
|
|
13
|
+
transform?: string | string[];
|
|
14
|
+
opacity?: number | number[];
|
|
15
|
+
/** Black over this screen, 0..1: how dark the screen UNDER the other one gets. */
|
|
16
|
+
dim?: number | number[];
|
|
17
|
+
/** ms (default 300). */
|
|
18
|
+
duration?: number;
|
|
19
|
+
/** ms to wait; the screen holds its first pose through it. */
|
|
20
|
+
delay?: number;
|
|
21
|
+
/** Any curve `animateTo` takes (default `ease-in-out`). */
|
|
22
|
+
easing?: EasingInput;
|
|
11
23
|
};
|
|
12
24
|
/**
|
|
13
|
-
* A
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
25
|
+
* A transition between two destinations, described by where each side is when it is NOT at rest:
|
|
26
|
+
* the incoming one comes FROM `enter`, the outgoing one goes TO `exit`. A side left out stays put.
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* Router.push(page, { transition: { enter: { transform: "translateY(100%)", duration: 400 }, exit: { dim: 0.3 } } })
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* A screen's own `transform` / `opacity` are not seen while a transition moves it (put a lasting
|
|
33
|
+
* effect on a child). A scene, a native view, a video never move: next to one of them only the
|
|
34
|
+
* screen's side plays, above it.
|
|
17
35
|
*/
|
|
18
36
|
export interface TransitionSpec {
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
from?: TransitionTransform;
|
|
26
|
-
};
|
|
27
|
-
/** The leaving destination animates from identity TO this pose. */
|
|
28
|
-
outgoing?: {
|
|
29
|
-
to?: TransitionTransform;
|
|
30
|
-
};
|
|
31
|
-
/** Scrim alpha (0..1) painted over whichever destination is underneath. */
|
|
32
|
-
dim?: number;
|
|
33
|
-
/** Which side stacks on top during the animation (default "incoming"). On Android, transitions
|
|
34
|
-
* involving a scene always animate the screen side on top — the scene view itself never moves. */
|
|
35
|
-
onTop?: "incoming" | "outgoing";
|
|
37
|
+
/** The incoming destination's start: it moves from this pose to rest. */
|
|
38
|
+
enter?: TransitionPose;
|
|
39
|
+
/** The outgoing destination's end: it moves from rest to this pose. */
|
|
40
|
+
exit?: TransitionPose;
|
|
41
|
+
/** Which side is above the other while they move (default `"enter"`). */
|
|
42
|
+
onTop?: "enter" | "exit";
|
|
36
43
|
}
|
|
37
44
|
export type Transition = TransitionName | TransitionSpec;
|
|
38
45
|
export type PresentOptions = {
|
|
@@ -41,6 +48,10 @@ export type PresentOptions = {
|
|
|
41
48
|
* `replaceTransition` for replace). */
|
|
42
49
|
transition?: Transition;
|
|
43
50
|
};
|
|
51
|
+
/** `close()` / `Router.hide()`: the transition the destination leaves with (default "none"). */
|
|
52
|
+
export type DismissOptions = {
|
|
53
|
+
transition?: Transition;
|
|
54
|
+
};
|
|
44
55
|
/**
|
|
45
56
|
* Anything that can be shown as the app's current destination: a `UIScreen`, a `Scene` /
|
|
46
57
|
* `ARScene`, a `Scene2D`, a `NativeView`, or a `UIVideo`. One Presentable is visible at a time;
|
|
@@ -52,10 +63,13 @@ export type PresentOptions = {
|
|
|
52
63
|
*/
|
|
53
64
|
export interface Presentable {
|
|
54
65
|
open(options?: PresentOptions): void | this | Promise<void>;
|
|
55
|
-
|
|
66
|
+
/** Close this destination if it is the one on screen (nothing takes its place). One that is not
|
|
67
|
+
* on screen — already replaced by a `Router.init/push/replace` or another `open()` — is left as
|
|
68
|
+
* it is, so `Router.init(home); scene.close()` keeps `home` visible. */
|
|
69
|
+
close(options?: DismissOptions): void;
|
|
56
70
|
onOpen(callback: () => void): this;
|
|
57
71
|
onClose(callback: () => void): this;
|
|
58
|
-
|
|
72
|
+
onBack(callback: () => void): this;
|
|
59
73
|
}
|
|
60
74
|
/** Runtime companion of the `Presentable` interface (declaration merging): the navigation
|
|
61
75
|
* state that isn't tied to the Router. */
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import { Presentable, type Transition } from "./presentable";
|
|
1
|
+
import { Presentable, type DismissOptions, type PresentOptions, type Transition } from "./presentable";
|
|
2
2
|
type RouterOptions = {
|
|
3
3
|
showDefaultBackButton?: boolean;
|
|
4
4
|
};
|
|
5
|
-
type NavigateOptions = {
|
|
6
|
-
/** Transition to play. Defaults: `"push"` for push
|
|
7
|
-
*
|
|
5
|
+
export type NavigateOptions = {
|
|
6
|
+
/** Transition to play. Defaults: `"push"` for push; replace follows the theme's
|
|
7
|
+
* `replaceTransition` (`"none"` out of the box); a pop plays the way back the destination it
|
|
8
|
+
* pops remembers. */
|
|
9
|
+
transition?: Transition;
|
|
10
|
+
/** The way BACK from the destination — what `Router.pop()` without a transition, the edge swipe
|
|
11
|
+
* and the system's back play when they take it off the stack. Default: the transition it came
|
|
12
|
+
* with, the other way round (a push goes back with a pop, a slide from the bottom leaves
|
|
13
|
+
* downwards; a zoom goes back with a fade). A `replace` that names none keeps the way back of
|
|
14
|
+
* the destination it replaces: it belongs to the place in the stack. */
|
|
15
|
+
popTransition?: Transition;
|
|
16
|
+
};
|
|
17
|
+
export type PopOptions = {
|
|
18
|
+
/** Transition to play instead of the way back the popped destination remembers. */
|
|
8
19
|
transition?: Transition;
|
|
9
20
|
};
|
|
10
21
|
/** Stack navigation over `Presentable` destinations. `init` once with the home page, then
|
|
@@ -25,12 +36,12 @@ type Router = {
|
|
|
25
36
|
replace(page: Presentable, opts?: NavigateOptions): void | Promise<void>;
|
|
26
37
|
/** Pop the top destination (the programmatic twin of the back gesture); `to` unwinds to a
|
|
27
38
|
* stack index in one step. */
|
|
28
|
-
pop(to?: number, opts?:
|
|
39
|
+
pop(to?: number, opts?: PopOptions): void;
|
|
29
40
|
/** Blank the router's page, keeping the stack — `restore()` brings it back. A destination
|
|
30
41
|
* opened directly stays visible. */
|
|
31
|
-
hide(): void;
|
|
42
|
+
hide(opts?: DismissOptions): void;
|
|
32
43
|
/** Re-present the stack top after `hide()` or a direct `open()` suspended the router. */
|
|
33
|
-
restore(): void;
|
|
44
|
+
restore(opts?: PresentOptions): void;
|
|
34
45
|
/** `"change"` fires on every stack change — pushes, pops, and native back gestures — with the
|
|
35
46
|
* new top destination. */
|
|
36
47
|
addEventListener(channel: "change", callback: (page: Presentable) => void): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TransitionSpec } from "./presentable";
|
|
2
|
+
/** Wire ids: a registered transition is > 0. */
|
|
3
|
+
export declare const TRANSITION_NONE = 0;
|
|
4
|
+
/** "The caller names none": the runtime plays what the stack entry remembers (a pop), or keeps
|
|
5
|
+
* what the replaced entry remembered (a replace's way back). */
|
|
6
|
+
export declare const TRANSITION_UNSET = -1;
|
|
7
|
+
/** Who a track moves. The ALONE roles play next to a destination that cannot move (a scene, a
|
|
8
|
+
* native view, a video) or next to nothing (close(), the first open): only the screen plays, above. */
|
|
9
|
+
export declare const ROLE_ENTER = 0;
|
|
10
|
+
export declare const ROLE_EXIT = 1;
|
|
11
|
+
export declare const ROLE_ENTER_ALONE = 2;
|
|
12
|
+
export declare const ROLE_EXIT_ALONE = 3;
|
|
13
|
+
/** `defineTransition` flags. */
|
|
14
|
+
export declare const TRANSITION_ENTER_ON_TOP = 1;
|
|
15
|
+
/** The way back of a spec: the ROLES swap — the screen that came leaves into its `enter` pose, the
|
|
16
|
+
* one that left comes back from its `exit` pose, the same screen stays on top — and the timing and
|
|
17
|
+
* the curves stay as written. Not a rewind: that would turn an ease-out into a slow start. */
|
|
18
|
+
export declare const mirrored: (s: TransitionSpec) => TransitionSpec;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const TREE_EVENT_LAYOUT = 1;
|
|
2
|
+
export declare const TREE_EVENT_TOUCH_START = 2;
|
|
3
|
+
export declare const TREE_EVENT_CLICK = 3;
|
|
4
|
+
export declare const TREE_EVENT_LONG_PRESS = 4;
|
|
5
|
+
export declare const TREE_EVENT_TOUCH_MOVE = 5;
|
|
6
|
+
export declare const TREE_EVENT_TOUCH_END = 6;
|
|
7
|
+
export declare const TREE_EVENT_TOUCH_CANCEL = 7;
|
|
8
|
+
export declare const TREE_EVENT_SCROLL = 8;
|
|
9
|
+
export declare const TREE_EVENT_OVERSCROLL = 9;
|
|
10
|
+
export declare const TREE_EVENT_SCROLL_RELEASE = 10;
|
|
11
|
+
export declare const TREE_EVENT_REFRESH = 11;
|
|
12
|
+
export declare const TREE_EVENT_CHANGE = 12;
|
|
13
|
+
export declare const TREE_EVENT_FOCUS = 13;
|
|
14
|
+
export declare const TREE_EVENT_BLUR = 14;
|
|
15
|
+
export declare const TREE_EVENT_SUBMIT = 15;
|
|
16
|
+
export declare const TREE_EVENT_OVERLAY_TAP = 16;
|
|
17
|
+
export declare const TREE_EVENT_DETENT = 17;
|
|
18
|
+
export declare const TREE_EVENT_OPEN = 18;
|
|
19
|
+
export declare const TREE_EVENT_CLOSE = 19;
|
|
20
|
+
export declare const TREE_EVENT_BACK = 20;
|
|
21
|
+
export declare const TREE_EVENT_PAGER_SELECT = 21;
|
|
22
|
+
export declare const TREE_EVENT_PAGER_POP = 22;
|
|
23
|
+
export declare const TREE_EVENT_VLIST_SYNC = 23;
|
|
24
|
+
export declare const TREE_EVENT_VLIST_EDGE = 24;
|
|
25
|
+
export declare const TREE_EVENT_VIEW_EVENT = 25;
|
|
26
|
+
export declare const TREE_EVENT_RESIZE = 26;
|
|
27
|
+
export declare const TREE_EVENT_ROUTER_CHANGE = 27;
|
|
28
|
+
export declare const TREE_EVENT_SCENE_TOUCH_START = 28;
|
|
29
|
+
export declare const TREE_EVENT_SCENE_CLICK = 29;
|
|
30
|
+
export declare const TREE_EVENT_DETACHED = 30;
|
|
31
|
+
export declare const TREE_EVENT_FREED = 31;
|
|
32
|
+
export declare const TREE_EVENT_HOVER_ENTER = 32;
|
|
33
|
+
export declare const TREE_EVENT_HOVER_MOVE = 33;
|
|
34
|
+
export declare const TREE_EVENT_HOVER_END = 34;
|
|
35
|
+
export declare const TREE_EVENT_HOVER_CANCEL = 35;
|
|
36
|
+
export declare const TREE_FLAG_INTERACTIVE: number;
|
|
37
|
+
export declare const TREE_FLAG_CLICK: number;
|
|
38
|
+
export declare const TREE_FLAG_LONG_PRESS: number;
|
|
39
|
+
export declare const TREE_FLAG_LAYOUT: number;
|
|
40
|
+
export declare const TREE_FLAG_SCROLL: number;
|
|
41
|
+
export declare const TREE_FLAG_OVERSCROLL: number;
|
|
42
|
+
export declare const TREE_FLAG_SCROLL_RELEASE: number;
|
|
43
|
+
export declare const TREE_FLAG_REFRESH: number;
|
|
44
|
+
export declare const TREE_FLAG_CHANGE: number;
|
|
45
|
+
export declare const TREE_FLAG_FOCUS: number;
|
|
46
|
+
export declare const TREE_FLAG_BLUR: number;
|
|
47
|
+
export declare const TREE_FLAG_SUBMIT: number;
|
|
48
|
+
export declare const TREE_FLAG_OVERLAY_TAP: number;
|
|
49
|
+
export declare const TREE_FLAG_DETENT: number;
|
|
50
|
+
export declare const TREE_FLAG_KEEP_ALIVE: number;
|
|
51
|
+
export declare const TREE_FLAG_BACK: number;
|
|
52
|
+
export declare const TREE_FLAG_VLIST_END: number;
|
|
53
|
+
export declare const TREE_FLAG_VLIST_START: number;
|
|
54
|
+
export declare const TREE_FLAG_HOVER: number;
|
|
55
|
+
export declare const TREE_TRACK_CLAIM_MASK = 255;
|
|
56
|
+
export declare const TREE_TRACK_TRACKED: number;
|
|
57
|
+
export declare const TREE_TRACK_MOVE: number;
|
|
58
|
+
export declare const TREE_TRACK_HANDLED: number;
|
|
59
|
+
export declare const TREE_DEST_SCREEN = 0;
|
|
60
|
+
export declare const TREE_DEST_SCENE3D = 1;
|
|
61
|
+
export declare const TREE_DEST_SCENE2D = 2;
|
|
62
|
+
export declare const TREE_DEST_NATIVE = 3;
|
|
63
|
+
export declare const TREE_DEST_VIDEO = 4;
|
|
64
|
+
export declare const TREE_DEST_NONE = 255;
|
|
65
|
+
export declare const OWNED_KIND_TREE = 0;
|
|
66
|
+
export declare const OWNED_KIND_FETCH = 1;
|
|
67
|
+
export declare const OWNED_KIND_GL_MATERIAL = 2;
|
|
68
|
+
export declare const OWNED_KIND_GL_TEXTURE = 3;
|
|
69
|
+
export declare const OWNED_KIND_GL_ENTITY = 4;
|
|
70
|
+
export declare const OWNED_KIND_ENTITY_2D = 5;
|
|
71
|
+
export declare const OWNED_KIND_MEDIA = 6;
|
|
72
|
+
export declare const OWNED_KIND_TWEEN = 7;
|
|
73
|
+
export declare const OWNED_KIND_CANVAS = 8;
|
|
74
|
+
import { DEAD_HANDLE } from "../core/pins";
|
|
75
|
+
export { DEAD_HANDLE };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "2.0.1";
|
|
2
|
+
/** The major of a semver string, or null when it is not one. */
|
|
3
|
+
export declare const sdkMajor: (version: string | null | undefined) => number | null;
|
|
4
|
+
/** The `// sdk: <version>` line of a compiled bundle's header (sdk/src/compile/header.ts), read from
|
|
5
|
+
* its first bytes; null for a bundle compiled before the line existed (SDK 0.x / 1.x — the
|
|
6
|
+
* pre-tree contract, which no 2.x host runs). */
|
|
7
|
+
export declare const bundleSdkVersion: (head: string) => string | null;
|
|
8
|
+
/** Whether a host embedding `hostVersion` can run a bundle whose header carries `bundleVersion`
|
|
9
|
+
* (null = no line = pre-2.0 contract): the majors must match. */
|
|
10
|
+
export declare const bundleRunsOn: (bundleVersion: string | null, hostVersion: string) => boolean;
|