lecodes-sdk 2.8.2 → 2.8.3
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/dist/types/version.d.ts +1 -1
- package/dist/types.json +1 -1
- package/package.json +1 -1
- package/src/bridges/tree.d.ts +10 -8
- package/src/g2/Scene2D.ts +5 -2
- package/src/gl/Scene.ts +8 -2
- package/src/version.ts +1 -1
package/package.json
CHANGED
package/src/bridges/tree.d.ts
CHANGED
|
@@ -267,14 +267,16 @@ export interface HostUI {
|
|
|
267
267
|
* dispatch bridge — `onComplete` with the result as ONE value, or with none.
|
|
268
268
|
* @immediate its callbacks and the borrowed `args` cannot wait for a commit */
|
|
269
269
|
viewCall?(viewId: i32, method: string, args: value, onComplete: (result?: value) => void, onReject: (message: string) => void): void
|
|
270
|
-
/** A LAYER root is shown: a pass-through root the runtime lays out at the frame
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
|
|
270
|
+
/** A LAYER root is shown: a pass-through root the runtime lays out at the frame. `surface` false =
|
|
271
|
+
* the app layer, above everything, screens included; true = the content layer of the presented
|
|
272
|
+
* surface (a scene's / a native view's / a video's widgets): right over the surface and UNDER
|
|
273
|
+
* every screen — a screen that covers the surface covers its widgets, the screen that leaves
|
|
274
|
+
* when the surface is pushed stays over them until its drop. Its own box is never hit — only its
|
|
275
|
+
* children are — so a touch outside them reaches what is under the layer; layers of a kind paint
|
|
276
|
+
* in open order. Its children are widgets (the runtime inserts them with insertNode, as under a
|
|
277
|
+
* screen root): a widget child with an overlay layer (`overlayColor`, any color — "transparent"
|
|
278
|
+
* too) intercepts every touch outside its own box within its root and reports it as the overlay tap. */
|
|
279
|
+
layerOpen(node: nodeid, surface: boolean): void
|
|
278
280
|
/** The layer root is hidden (its view stays; releaseNode says when it is gone). */
|
|
279
281
|
layerClose(node: nodeid): void
|
|
280
282
|
/** Load a font face for `fontFamily` (weight 100–900, style 0 normal / 2 italic) from `url`; settle
|
package/src/g2/Scene2D.ts
CHANGED
|
@@ -203,9 +203,12 @@ export class Scene2D implements Presentable {
|
|
|
203
203
|
return _surfaceWidgets(this)
|
|
204
204
|
}
|
|
205
205
|
/** @internal presentation lifecycle from the runtime */
|
|
206
|
-
|
|
206
|
+
// The ACTIVE scene — what the pointer dispatch (g2/touch.ts) routes to — follows the runtime's
|
|
207
|
+
// presentation, not only open(): a Router.push / pop presents a scene without it, and the first
|
|
208
|
+
// push of a world had no active scene at all (every touch was dropped until an open() set one).
|
|
209
|
+
_emitOpen(): void { Scene2D._active = this; for (const cb of this.ol.slice()) cb() }
|
|
207
210
|
/** @internal */
|
|
208
|
-
_emitClose(): void { for (const cb of this.cl.slice()) cb() }
|
|
211
|
+
_emitClose(): void { if (Scene2D._active === this) Scene2D._active = null; for (const cb of this.cl.slice()) cb() }
|
|
209
212
|
/** @internal */
|
|
210
213
|
_emitBack(): boolean {
|
|
211
214
|
if (!this._backButtonCallback) return false
|
package/src/gl/Scene.ts
CHANGED
|
@@ -526,9 +526,15 @@ export class Scene implements Presentable {
|
|
|
526
526
|
return _surfaceWidgets(this)
|
|
527
527
|
}
|
|
528
528
|
/** @internal presentation lifecycle from the runtime */
|
|
529
|
-
|
|
529
|
+
// The ACTIVE scene follows the runtime's presentation, not only open(): a Router.push / pop
|
|
530
|
+
// presents a scene without it (the 2D twin: Scene2D._emitOpen).
|
|
531
|
+
_emitOpen(): void { Scene._active = this; glState.activeScene = this; for (const cb of this.ol.slice()) cb() }
|
|
530
532
|
/** @internal */
|
|
531
|
-
_emitClose(): void {
|
|
533
|
+
_emitClose(): void {
|
|
534
|
+
if (Scene._active === this) Scene._active = null
|
|
535
|
+
if (glState.activeScene === this) glState.activeScene = null
|
|
536
|
+
for (const cb of this.cl.slice()) cb()
|
|
537
|
+
}
|
|
532
538
|
/** @internal */
|
|
533
539
|
_emitBack(): boolean {
|
|
534
540
|
if (!this._backButtonCallback) return false
|
package/src/version.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// same manifest). Its MAJOR is the bundle ↔ runtime contract: a bundle's `// sdk:` header line
|
|
5
5
|
// and a host's embedded version must agree on the major for the host to run the bundle; minor
|
|
6
6
|
// and patch never gate anything (features are detected, never versioned).
|
|
7
|
-
export const SDK_VERSION = "2.8.
|
|
7
|
+
export const SDK_VERSION = "2.8.3"
|
|
8
8
|
|
|
9
9
|
/** The major of a semver string, or null when it is not one. */
|
|
10
10
|
export const sdkMajor = (version: string | null | undefined): number | null => {
|