lecodes-cli 0.6.4 → 0.7.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 +1 -0
- package/dist/index.js +920 -636
- package/package.json +9 -4
- package/runtime/scene-harness.json +1 -0
- package/runtime/sdk/compile/assetMacro.ts +4 -3
- package/runtime/sdk/compile/bundler.ts +35 -3
- package/runtime/sdk/compile/compileProject.ts +14 -2
- package/runtime/sdk/compile/libraryImports.ts +47 -0
- package/runtime/sdk/compile/sceneEditor.ts +16 -4
- package/runtime/sdk/core/Aspect.ts +37 -0
- package/runtime/sdk/core/InspectorUI.ts +212 -0
- package/runtime/sdk/core/fields.ts +15 -3
- package/runtime/sdk/g2/Scene2D.ts +51 -5
- package/runtime/sdk/gl/Model.ts +9 -0
- package/runtime/sdk/gl/Node.ts +4 -1
- package/runtime/sdk/gl/Scene.ts +76 -11
- package/runtime/sdk/gl/scenarios.ts +349 -0
- package/runtime/sdk/inject.ts +28 -8
- package/runtime/sdk/kit/UITabs.ts +105 -0
- package/runtime/sdk/plugins/camera.ts +81 -0
- package/runtime/sdk/plugins/geolocation.ts +123 -0
- package/runtime/sdk/plugins/permission.ts +7 -0
- package/runtime/sdk/plugins/qr.ts +61 -24
- package/runtime/sdk/runtime/app.ts +37 -0
- package/runtime/sdk/runtime/appEvents.ts +29 -0
- package/runtime/sdk/runtime/channel.ts +50 -0
- package/runtime/sdk/runtime/clipboard.ts +20 -0
- package/runtime/sdk/runtime/datetime.ts +2 -4
- package/runtime/sdk/runtime/device.ts +137 -4
- package/runtime/sdk/runtime/misc.ts +4 -0
- package/runtime/sdk/runtime/service.ts +82 -0
- package/runtime/sdk/runtime/touch.ts +26 -0
- package/runtime/sdk/scene/defineScene.ts +651 -17
- package/runtime/sdk/scene/editorPlugins.ts +86 -0
- package/runtime/sdk/ui/NativeView.ts +144 -0
- package/runtime/sdk/ui/UI.ts +6 -1
- package/runtime/sdk/ui/UIButton.ts +26 -3
- package/runtime/sdk/ui/UIInput.ts +2 -2
- package/runtime/sdk/ui/UINode.ts +24 -4
- package/runtime/sdk/ui/UIScreen.ts +86 -29
- package/runtime/sdk/ui/UIScreenHost.ts +213 -0
- package/runtime/sdk/ui/UIText.ts +1 -1
- package/runtime/sdk/ui/UIVideo.ts +48 -2
- package/runtime/sdk/ui/UIWidget.ts +34 -1
- package/runtime/sdk/ui/presentable.ts +116 -0
- package/runtime/sdk/ui/router.ts +73 -29
- package/runtime/sdk-types.json +1 -1
- package/runtime/sdk/runtime/camera.ts +0 -31
|
@@ -48,3 +48,29 @@ export class TouchStartEvent<T = any> {
|
|
|
48
48
|
this._trackHandler = handler
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
/** Delivered to a `UIButton` `onLongPress` handler when a finger is held on the button past the
|
|
53
|
+
* host's long-press threshold. Like `TouchStartEvent` it can `track(...)` the rest of the gesture —
|
|
54
|
+
* so the common "press-and-hold, then drag to move" flow is one handler: start the drag from here. */
|
|
55
|
+
export class LongPressEvent<T = any> {
|
|
56
|
+
readonly type = "longpress"
|
|
57
|
+
readonly pointerId: number
|
|
58
|
+
readonly clientX: number
|
|
59
|
+
readonly clientY: number
|
|
60
|
+
/** World-space hit position (2D scenes only; undefined in 3D). */
|
|
61
|
+
worldX?: number
|
|
62
|
+
worldY?: number
|
|
63
|
+
target!: T
|
|
64
|
+
/** @internal — read by the dispatch system after the handler runs. */
|
|
65
|
+
_trackHandler?: TrackHandler
|
|
66
|
+
constructor(clientX: number, clientY: number, pointerId: number) {
|
|
67
|
+
this.clientX = clientX
|
|
68
|
+
this.clientY = clientY
|
|
69
|
+
this.pointerId = pointerId
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Capture subsequent moves/end for this pointer — drag the element after the hold. */
|
|
73
|
+
track(handler: TrackHandler): void {
|
|
74
|
+
this._trackHandler = handler
|
|
75
|
+
}
|
|
76
|
+
}
|