@g9tm/lynxcontrols 2.6.3 → 2.6.7
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/catalog/cards/G9FloatingOrb.md +1 -1
- package/catalog/catalog.json +35 -7
- package/catalog/index.md +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/guide/service.d.ts.map +1 -1
- package/dist/guide/service.jsx +5 -6
- package/dist/host/layer-lifetime.d.ts +10 -0
- package/dist/host/layer-lifetime.d.ts.map +1 -0
- package/dist/host/layer-lifetime.jsx +11 -0
- package/dist/orb/index.d.ts +1 -1
- package/dist/orb/index.d.ts.map +1 -1
- package/dist/orb/index.jsx +1 -1
- package/dist/orb/model.d.ts +14 -1
- package/dist/orb/model.d.ts.map +1 -1
- package/dist/orb/model.jsx +4 -1
- package/dist/orb/orb.d.ts +8 -2
- package/dist/orb/orb.d.ts.map +1 -1
- package/dist/orb/orb.jsx +51 -4
- package/dist/pickers/wheel-column.d.ts.map +1 -1
- package/dist/pickers/wheel-column.jsx +12 -1
- package/dist/popup/service.d.ts.map +1 -1
- package/dist/popup/service.jsx +2 -3
- package/dist/sheet/service.d.ts.map +1 -1
- package/dist/sheet/service.jsx +2 -3
- package/dist/toast/service.d.ts.map +1 -1
- package/dist/toast/service.jsx +2 -3
- package/package.json +2 -2
- package/skills/g9-lynx-app/references/components/orb.md +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/guide/service.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAGrB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/guide/service.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAA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E,OAAO,CAAC;QACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC;QACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;KAC3C,GACA,aAAa,CAAC;IACjB,kDAAkD;IAClD,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;IAC1D,mDAAmD;IACnD,IAAI,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC;IAC3C,wDAAwD;IACxD,SAAS,IAAI,eAAe,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,4EAA4E;IAC5E,mBAAmB,IAAI,IAAI,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE;QAAE,GAAG,IAAI,gBAAgB,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,CAAC,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;KAAE,CAAC;IAChG,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACpC;AA0QD,iDAAiD;AACjD,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,uBAAuB,GAAG,cAAc,CAIrG;AAED,qCAAqC;AACrC,wBAAgB,UAAU,IAAI,cAAc,CAG3C;AAED,wFAAwF;AACxF,wBAAgB,OAAO,IAAI,cAAc,CAExC"}
|
package/dist/guide/service.jsx
CHANGED
|
@@ -3,6 +3,7 @@ import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from "@lyn
|
|
|
3
3
|
import { anchorRect, measureNode } from "../anchor/measure.jsx";
|
|
4
4
|
import { revealAnchor } from "../anchor/scroll.jsx";
|
|
5
5
|
import { useG9Host } from "../host/hooks.jsx";
|
|
6
|
+
import { useDisposeWithHost } from "../host/layer-lifetime.jsx";
|
|
6
7
|
import { g9Hosts } from "../host/registry.jsx";
|
|
7
8
|
import { useG9Direction, useG9Settings } from "../provider/hooks.jsx";
|
|
8
9
|
import { presentConfirmSheet } from "./confirm-sheet.jsx";
|
|
@@ -359,12 +360,10 @@ function GuideLayer(props) {
|
|
|
359
360
|
visible,
|
|
360
361
|
marks
|
|
361
362
|
]);
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
service
|
|
367
|
-
]);
|
|
363
|
+
useDisposeWithHost(useG9Host(), ()=>{
|
|
364
|
+
var _service_dispose;
|
|
365
|
+
return null == (_service_dispose = service.dispose) ? void 0 : _service_dispose.call(service);
|
|
366
|
+
});
|
|
368
367
|
if (!visible) return null;
|
|
369
368
|
const local = (r)=>({
|
|
370
369
|
x: r.x - frame.x,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { G9HostHandle } from './registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Runs `dispose` when the layer item that calls it unmounts AND its host is gone — not on every remount. A layer item
|
|
4
|
+
* remounts while its host lives: `G9CarryContexts` mounting after the item wraps the layer in providers, which changes
|
|
5
|
+
* the tree above it. A service store disposed on that remount stayed dead: G9Berjis's toasts, registered on the first
|
|
6
|
+
* frame before the app's carried contexts mounted, never drew again (2.6.7). The host's own unmount releases it in the
|
|
7
|
+
* same commit, so the check waits one task.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDisposeWithHost(host: G9HostHandle, dispose: () => void): void;
|
|
10
|
+
//# sourceMappingURL=layer-lifetime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-lifetime.d.ts","sourceRoot":"","sources":["../../src/host/layer-lifetime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAShF"}
|
package/dist/orb/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type G9HoldController, type G9HoldOptions, type G9HoldRelease, useG9Hold } from './hold.js';
|
|
2
2
|
export { G9HoldButton, type G9HoldButtonProps } from './hold-button.js';
|
|
3
|
-
export { type G9OrbBounds, type G9OrbPlace, type G9OrbSide, g9HoldProgress, g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShare, } from './model.js';
|
|
3
|
+
export { type G9OrbBounds, type G9OrbPlace, type G9OrbRect, type G9OrbSide, g9HoldProgress, g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShare, g9OrbTuckShowing, } from './model.js';
|
|
4
4
|
export { G9FloatingOrb, type G9FloatingOrbProps, type G9OrbContentState, type G9OrbHold } from './orb.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/orb/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EACb,eAAe,EACf,SAAS,EACT,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EACb,eAAe,EACf,SAAS,EACT,cAAc,EACd,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/orb/index.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { useG9Hold } from "./hold.jsx";
|
|
2
2
|
export { G9HoldButton } from "./hold-button.jsx";
|
|
3
|
-
export { g9HoldProgress, g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShare } from "./model.jsx";
|
|
3
|
+
export { g9HoldProgress, g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShare, g9OrbTuckShowing } from "./model.jsx";
|
|
4
4
|
export { G9FloatingOrb } from "./orb.jsx";
|
package/dist/orb/model.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** The physical side an orb sits on (never mirrored by the culture: the screen's left is the left in both directions). */
|
|
2
2
|
export type G9OrbSide = 'left' | 'right';
|
|
3
|
+
/** A screen rectangle in dp (G9FloatingOrb `onPlaced`). */
|
|
4
|
+
export interface G9OrbRect {
|
|
5
|
+
readonly x: number;
|
|
6
|
+
readonly y: number;
|
|
7
|
+
readonly w: number;
|
|
8
|
+
readonly h: number;
|
|
9
|
+
}
|
|
3
10
|
/** Where an orb rests: its side, the top of its box (dp from the window top) and whether it is tucked into the edge. */
|
|
4
11
|
export interface G9OrbPlace {
|
|
5
12
|
readonly side: G9OrbSide;
|
|
@@ -24,7 +31,13 @@ export declare const g9OrbTuckShare = 0.35;
|
|
|
24
31
|
export declare const g9OrbDragSlop = 6;
|
|
25
32
|
/** The top clamped into the free band. */
|
|
26
33
|
export declare function g9OrbClampTop(top: number, b: G9OrbBounds): number;
|
|
27
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* How much of the BOX a tucked orb keeps on screen so that `visible` dp of its DISC show: the disc sits centred in a
|
|
36
|
+
* larger box, and counting from the box left only its transparent margin — the orb vanished and nobody found it again
|
|
37
|
+
* (AgriPad TR-0100 / TR-0109: a sync orb and a tracking orb pushed past the edge of a Galaxy Tab A9).
|
|
38
|
+
*/
|
|
39
|
+
export declare function g9OrbTuckShowing(size: number, disc: number, visible: number): number;
|
|
40
|
+
/** The box's left (dp) for a place at rest; a tucked orb leaves `visible` dp of its BOX showing (g9OrbTuckShowing). */
|
|
28
41
|
export declare function g9OrbLeft(place: G9OrbPlace, b: G9OrbBounds, visible: number): number;
|
|
29
42
|
/**
|
|
30
43
|
* Where a drag released at box position (`left`, `top`) lands: the side whose half holds the box's centre, along the edge
|
package/dist/orb/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/orb/model.ts"],"names":[],"mappings":"AAGA,0HAA0H;AAC1H,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzC,wHAAwH;AACxH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,gCAAgC;AAChC,MA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AM,CAG7F"}
|
package/dist/orb/model.jsx
CHANGED
|
@@ -5,6 +5,9 @@ function g9OrbClampTop(top, b) {
|
|
|
5
5
|
const max = Math.max(min, b.height - b.insetBottom - b.margin - b.size);
|
|
6
6
|
return Math.min(max, Math.max(min, top));
|
|
7
7
|
}
|
|
8
|
+
function g9OrbTuckShowing(size, disc, visible) {
|
|
9
|
+
return visible + Math.max(0, (size - disc) / 2);
|
|
10
|
+
}
|
|
8
11
|
function g9OrbLeft(place, b, visible) {
|
|
9
12
|
if (place.tucked) return 'left' === place.side ? visible - b.size : b.width - visible;
|
|
10
13
|
return 'left' === place.side ? b.margin : b.width - b.margin - b.size;
|
|
@@ -39,4 +42,4 @@ function g9HoldProgress(elapsedMs, delayMs, durationMs) {
|
|
|
39
42
|
if (durationMs <= 0) return elapsedMs >= delayMs ? 1 : 0;
|
|
40
43
|
return Math.min(1, Math.max(0, (elapsedMs - delayMs) / durationMs));
|
|
41
44
|
}
|
|
42
|
-
export { g9HoldProgress, g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShare };
|
|
45
|
+
export { g9HoldProgress, g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShare, g9OrbTuckShowing };
|
package/dist/orb/orb.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import './orb.css';
|
|
|
2
2
|
import { type ReactNode } from '@lynx-js/react';
|
|
3
3
|
import { type G9StyleProp } from '../base/control.js';
|
|
4
4
|
import { type G9HoldOptions } from './hold.js';
|
|
5
|
-
import { type G9OrbSide } from './model.js';
|
|
5
|
+
import { type G9OrbRect, type G9OrbSide } from './model.js';
|
|
6
6
|
/** The orb's hold-to-act (a stop, a delete): its colour and the hold options. */
|
|
7
7
|
export interface G9OrbHold extends G9HoldOptions {
|
|
8
8
|
/** The liquid's colour. Default `var(--g9-error)`. */
|
|
@@ -27,7 +27,7 @@ export interface G9FloatingOrbProps {
|
|
|
27
27
|
readonly discSize?: number;
|
|
28
28
|
/** Gap to the screen edge at rest. Default 14. */
|
|
29
29
|
readonly margin?: number;
|
|
30
|
-
/** How much of the
|
|
30
|
+
/** How much of the DISC a tucked orb leaves showing, in dp (enough to see and tap). Default 20. */
|
|
31
31
|
readonly tuckedVisible?: number;
|
|
32
32
|
/** Kept free at the top (status bar, a toolbar) and the bottom (the tab bar). Default 0. */
|
|
33
33
|
readonly insetTop?: number;
|
|
@@ -41,6 +41,12 @@ export interface G9FloatingOrbProps {
|
|
|
41
41
|
readonly untuckKey?: string | number | null;
|
|
42
42
|
/** A tap (not on a tucked orb: that tap brings it back). */
|
|
43
43
|
readonly onTap?: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* Where the orb rests on screen — the part of its box inside the window, in dp — or null while hidden; called when
|
|
46
|
+
* that changes (a snap, a tuck, a resize). For a host whose native view under the orb takes touches itself (a map):
|
|
47
|
+
* without it a tap on the orb also tapped the map, and a slow drag long-pressed it (AgriPad, a Galaxy Tab A9).
|
|
48
|
+
*/
|
|
49
|
+
readonly onPlaced?: (rect: G9OrbRect | null) => void;
|
|
44
50
|
/** Hold-to-act on the orb itself; absent = a press is only ever a tap. */
|
|
45
51
|
readonly hold?: G9OrbHold | null;
|
|
46
52
|
/** Shown beside the orb toward the middle of the screen (a «Follow» chip); hidden while tucked. */
|
package/dist/orb/orb.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orb.d.ts","sourceRoot":"","sources":["../../src/orb/orb.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,EAEL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"orb.d.ts","sourceRoot":"","sources":["../../src/orb/orb.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,gBAAg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;IAC5D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IACrD,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,mGAAmG;IACnG,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC,CAAC;IAC1E,0BAA0B;IAC1B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;CAC9B;AAUD;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,0DAwMxB,CAAC"}
|
package/dist/orb/orb.jsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./orb.css";
|
|
2
|
-
import { memo, runOnBackground, useEffect, useMainThreadRef, useMemo, useRef, useState } from "@lynx-js/react";
|
|
2
|
+
import { memo, runOnBackground, runOnMainThread, useEffect, useMainThreadRef, useMemo, useRef, useState } from "@lynx-js/react";
|
|
3
3
|
import { g9IdProps, mergeStyle } from "../base/control.jsx";
|
|
4
4
|
import { useG9Window } from "../provider/hooks.jsx";
|
|
5
5
|
import { useG9Hold } from "./hold.jsx";
|
|
6
|
-
import { g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap } from "./model.jsx";
|
|
6
|
+
import { g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShowing } from "./model.jsx";
|
|
7
7
|
const SETTLE_MS = 220;
|
|
8
8
|
const ACCESSORY_EDGE = 12;
|
|
9
9
|
function noopMT() {
|
|
@@ -15,7 +15,7 @@ const G9FloatingOrb = memo(function(props) {
|
|
|
15
15
|
const window = useG9Window();
|
|
16
16
|
const size = null != (_props_size = props.size) ? _props_size : 84;
|
|
17
17
|
const disc = Math.min(size, null != (_props_discSize = props.discSize) ? _props_discSize : 60);
|
|
18
|
-
const visible = null != (_props_tuckedVisible = props.tuckedVisible) ? _props_tuckedVisible :
|
|
18
|
+
const visible = g9OrbTuckShowing(size, disc, null != (_props_tuckedVisible = props.tuckedVisible) ? _props_tuckedVisible : 20);
|
|
19
19
|
const bounds = useMemo(()=>{
|
|
20
20
|
var _props_margin, _props_insetTop, _props_insetBottom;
|
|
21
21
|
return {
|
|
@@ -62,6 +62,29 @@ const G9FloatingOrb = memo(function(props) {
|
|
|
62
62
|
tucked: place.tucked
|
|
63
63
|
};
|
|
64
64
|
const left = g9OrbLeft(atRest, bounds, visible);
|
|
65
|
+
const onPlaced = useRef(props.onPlaced);
|
|
66
|
+
onPlaced.current = props.onPlaced;
|
|
67
|
+
const shownX = Math.max(0, left);
|
|
68
|
+
const shownW = Math.max(0, Math.min(bounds.width, left + size) - shownX);
|
|
69
|
+
useEffect(()=>{
|
|
70
|
+
var _onPlaced_current;
|
|
71
|
+
null == (_onPlaced_current = onPlaced.current) || _onPlaced_current.call(onPlaced, props.hidden ? null : {
|
|
72
|
+
x: shownX,
|
|
73
|
+
y: atRest.top,
|
|
74
|
+
w: shownW,
|
|
75
|
+
h: size
|
|
76
|
+
});
|
|
77
|
+
}, [
|
|
78
|
+
shownX,
|
|
79
|
+
shownW,
|
|
80
|
+
atRest.top,
|
|
81
|
+
size,
|
|
82
|
+
props.hidden
|
|
83
|
+
]);
|
|
84
|
+
useEffect(()=>()=>{
|
|
85
|
+
var _onPlaced_current;
|
|
86
|
+
return null == (_onPlaced_current = onPlaced.current) ? void 0 : _onPlaced_current.call(onPlaced, null);
|
|
87
|
+
}, []);
|
|
65
88
|
const holdEnabled = !!props.hold && false !== props.hold.enabled && !atRest.tucked && !props.hidden;
|
|
66
89
|
const hold = useG9Hold({
|
|
67
90
|
durationMs: null != (_ref = null == (_props_hold = props.hold) ? void 0 : _props_hold.durationMs) ? _ref : 5000,
|
|
@@ -78,6 +101,8 @@ const G9FloatingOrb = memo(function(props) {
|
|
|
78
101
|
const gesture = useMainThreadRef({
|
|
79
102
|
x: 0,
|
|
80
103
|
y: 0,
|
|
104
|
+
dx: 0,
|
|
105
|
+
dy: 0,
|
|
81
106
|
moved: false,
|
|
82
107
|
active: false
|
|
83
108
|
});
|
|
@@ -90,6 +115,7 @@ const G9FloatingOrb = memo(function(props) {
|
|
|
90
115
|
const next = g9OrbSnap(x, y, bounds);
|
|
91
116
|
g9OrbRemember(props.placeKey, next);
|
|
92
117
|
setPlace(next);
|
|
118
|
+
runOnMainThread(settleMT)(g9OrbLeft(next, bounds, visible), g9OrbClampTop(next.top, bounds));
|
|
93
119
|
};
|
|
94
120
|
const onRelease = ()=>{
|
|
95
121
|
var _props_onTap;
|
|
@@ -113,6 +139,8 @@ const G9FloatingOrb = memo(function(props) {
|
|
|
113
139
|
gesture.current = {
|
|
114
140
|
x: e.detail.x,
|
|
115
141
|
y: e.detail.y,
|
|
142
|
+
dx: 0,
|
|
143
|
+
dy: 0,
|
|
116
144
|
moved: false,
|
|
117
145
|
active: true
|
|
118
146
|
};
|
|
@@ -130,6 +158,8 @@ const G9FloatingOrb = memo(function(props) {
|
|
|
130
158
|
g.moved = true;
|
|
131
159
|
runOnBackground(onDragStart)();
|
|
132
160
|
}
|
|
161
|
+
g.dx = dx;
|
|
162
|
+
g.dy = dy;
|
|
133
163
|
null == (_box_current = box.current) || _box_current.setStyleProperties({
|
|
134
164
|
transition: 'none',
|
|
135
165
|
transform: `translate(${restX + dx}px, ${restY + dy}px)`
|
|
@@ -143,10 +173,27 @@ const G9FloatingOrb = memo(function(props) {
|
|
|
143
173
|
if (g.moved) runOnBackground(onDragEnd)(restX + e.detail.x - g.x, restY + e.detail.y - g.y);
|
|
144
174
|
else runOnBackground(onRelease)();
|
|
145
175
|
}
|
|
176
|
+
function settleMT(x, y) {
|
|
177
|
+
'main thread';
|
|
178
|
+
var _box_current;
|
|
179
|
+
null == (_box_current = box.current) || _box_current.setStyleProperties({
|
|
180
|
+
transition: `transform ${SETTLE_MS}ms ease-out`,
|
|
181
|
+
transform: `translate(${x}px, ${y}px)`
|
|
182
|
+
});
|
|
183
|
+
}
|
|
146
184
|
function cancelMT() {
|
|
147
185
|
'main thread';
|
|
148
|
-
|
|
186
|
+
var _box_current;
|
|
187
|
+
const g = gesture.current;
|
|
188
|
+
const wasActive = g.active;
|
|
189
|
+
g.active = false;
|
|
149
190
|
runOnBackground(onCancel)();
|
|
191
|
+
if (!wasActive) return;
|
|
192
|
+
if (g.moved) runOnBackground(onDragEnd)(restX + g.dx, restY + g.dy);
|
|
193
|
+
else null == (_box_current = box.current) || _box_current.setStyleProperties({
|
|
194
|
+
transition: `transform ${SETTLE_MS}ms ease-out`,
|
|
195
|
+
transform: `translate(${restX}px, ${restY}px)`
|
|
196
|
+
});
|
|
150
197
|
}
|
|
151
198
|
const content = 'function' == typeof props.children ? props.children({
|
|
152
199
|
holding: hold.holding,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wheel-column.d.ts","sourceRoot":"","sources":["../../src/pickers/wheel-column.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,gBAAgB,CAAC;AAI7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,S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;AAEpC,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGxF;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC3D,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC3C,gDAAgD;IAChD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,iHAAiH;IACjH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,kFAAkF;IAClF,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,SAAS,CAuIhG"}
|
|
@@ -21,10 +21,13 @@ function G9WheelColumn(props) {
|
|
|
21
21
|
const scrollTop = useRef(valueIndex * rowHeight);
|
|
22
22
|
const reported = useRef(null);
|
|
23
23
|
const mounted = useRef(false);
|
|
24
|
+
const wanted = useRef(valueIndex * rowHeight);
|
|
25
|
+
const touched = useRef(false);
|
|
24
26
|
const latest = useRef(props);
|
|
25
27
|
latest.current = props;
|
|
26
28
|
const scrollToIndex = (index, smooth)=>{
|
|
27
29
|
scrollTop.current = index * rowHeight;
|
|
30
|
+
wanted.current = index * rowHeight;
|
|
28
31
|
invokeNodeWhenReady(node, 'scrollTo', {
|
|
29
32
|
offset: index * rowHeight,
|
|
30
33
|
smooth
|
|
@@ -63,6 +66,12 @@ function G9WheelColumn(props) {
|
|
|
63
66
|
setLive((prev)=>prev === index ? prev : index);
|
|
64
67
|
};
|
|
65
68
|
const onScrollEnd = ()=>settle(wheelIndexAt(scrollTop.current, rowHeight, latest.current.items.length));
|
|
69
|
+
const onContentLaidOut = ()=>{
|
|
70
|
+
if (!touched.current) invokeNodeWhenReady(node, 'scrollTo', {
|
|
71
|
+
offset: wanted.current,
|
|
72
|
+
smooth: false
|
|
73
|
+
});
|
|
74
|
+
};
|
|
66
75
|
const palette = useG9Theme().palette;
|
|
67
76
|
const surface = formatColor(palette.Surface);
|
|
68
77
|
const clear = formatColor(withAlpha(palette.Surface, 0));
|
|
@@ -87,6 +96,8 @@ function G9WheelColumn(props) {
|
|
|
87
96
|
node.current = n;
|
|
88
97
|
}} className="g9-wheel__scroll" scroll-orientation="vertical" style={{
|
|
89
98
|
height: `${rowHeight * visible}px`
|
|
99
|
+
}} bindtouchstart={()=>{
|
|
100
|
+
touched.current = true;
|
|
90
101
|
}} bindscroll={onScroll} bindscrollend={onScrollEnd}>
|
|
91
102
|
<view style={{
|
|
92
103
|
height: `${pad}px`
|
|
@@ -100,7 +111,7 @@ function G9WheelColumn(props) {
|
|
|
100
111
|
</view>)}
|
|
101
112
|
<view style={{
|
|
102
113
|
height: `${pad}px`
|
|
103
|
-
}}/>
|
|
114
|
+
}} bindlayoutchange={onContentLaidOut}/>
|
|
104
115
|
</scroll-view>
|
|
105
116
|
<view className="g9-wheel__fade" user-interaction-enabled={false} style={{
|
|
106
117
|
background: `linear-gradient(to bottom, ${surface} 0%, ${clear} 30%, ${clear} 70%, ${surface} 100%)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/popup/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/popup/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,gBAAgB,CAAC;AAOnG,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAsB,MAAM,SAAS,CAAC;AAEhG,OAAO,EAAqB,KAAK,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,EAKjB,MAAM,SAAS,CAAC;AAEjB,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;IACnF,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;IACvF,oFAAoF;IAC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press.jsx";
|
|
|
6
6
|
import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
7
7
|
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
8
8
|
import { useG9Host } from "../host/hooks.jsx";
|
|
9
|
+
import { useDisposeWithHost } from "../host/layer-lifetime.jsx";
|
|
9
10
|
import { g9Hosts } from "../host/registry.jsx";
|
|
10
11
|
import { G9IconSlot } from "../icon/slot.jsx";
|
|
11
12
|
import { useG9Diagnostics, useG9Direction, useG9Settings, useG9Strings, useG9Window } from "../provider/hooks.jsx";
|
|
@@ -145,9 +146,7 @@ function PopupLayer(props) {
|
|
|
145
146
|
showKey,
|
|
146
147
|
null == entry ? void 0 : entry.phase
|
|
147
148
|
]);
|
|
148
|
-
|
|
149
|
-
queue
|
|
150
|
-
]);
|
|
149
|
+
useDisposeWithHost(useG9Host(), ()=>queue.dispose());
|
|
151
150
|
if (!entry || !settings) return null;
|
|
152
151
|
const profile = createPopupVisualProfile(entry.descriptor, settings, glyphs, (k)=>strings.get('success' === k ? G9StringKey.Success : 'warning' === k ? G9StringKey.Warning : 'error' === k ? G9StringKey.Error : G9StringKey.Information));
|
|
153
152
|
const options = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/sheet/service.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/sheet/service.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;AAW9D,OAAO,EAAyB,KAAK,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EAErB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,wBAAwB,EAA4B,MAAM,cAAc,CAAC;AAE/G,OAAO,EAAE,KAAK,cAAc,E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MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAIxE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAChE,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,GACnB,MAAM,CAIR;AAkED,yDAAyD;AACzD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,YAAY,EAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,EACpC,WAAW,CAAC,EAAE,sBAAsB,GACnC,cAAc,CAIhB;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,cAAc,CAI5C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,cAAc,CAEzC"}
|
package/dist/sheet/service.jsx
CHANGED
|
@@ -2,6 +2,7 @@ import { resolvePresentation } from "@g9tm/lynxcontrols-foundation";
|
|
|
2
2
|
import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from "@lynx-js/react";
|
|
3
3
|
import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
4
4
|
import { useG9Host, useG9HostInsets } from "../host/hooks.jsx";
|
|
5
|
+
import { useDisposeWithHost } from "../host/layer-lifetime.jsx";
|
|
5
6
|
import { g9Hosts } from "../host/registry.jsx";
|
|
6
7
|
import { useG9Culture, useG9Keyboard, useG9Layout, useG9Preferences, useG9Settings, useG9Theme, useG9Window } from "../provider/hooks.jsx";
|
|
7
8
|
import { G9SheetFrame } from "./frame.jsx";
|
|
@@ -59,9 +60,7 @@ function StackView(props) {
|
|
|
59
60
|
}, [
|
|
60
61
|
effectKey
|
|
61
62
|
]);
|
|
62
|
-
|
|
63
|
-
stack
|
|
64
|
-
]);
|
|
63
|
+
useDisposeWithHost(host, ()=>stack.dispose());
|
|
65
64
|
const scheme = useG9Theme().scheme;
|
|
66
65
|
const lastScheme = useRef(scheme);
|
|
67
66
|
useEffect(()=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/toast/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/toast/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAUrB,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;AAW9D,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,WAAW,EAEjB,MAAM,SAAS,CAAC;AAEjB,+FAA+F;AAC/F,eAAO,MAAM,cAAc;;;;EAAsE,CAAC;AAElG,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;IACxF,2EAA2E;IAC3E,YAAY,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gFAAgF;IAChF,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,8DAA8D;IAC9D,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAC5C,gEAAgE;IAChE,cAAc,IAAI,IAAI,CAAC;IACvB,yEAAyE;IACzE,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;IACzE,mBAAmB,IAAI,IAAI,CAAC;IAC5B,sDAAsD;IACtD,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;IACrH,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACnG,oBAAoB,IAAI,IAAI,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7C,gHAAgH;IAChH,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,uGAAuG;IACvG,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7D,wEAAwE;IACxE,UAAU,IAAI,IAAI,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AA2TD,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAGjE;AAED,kHAAkH;AAClH,wBAAgB,WAAW,IAAI,cAAc,CAE5C;AAED,wGAAwG;AACxG,wBAAgB,QAAQ,IAAI,cAAc,CAEzC"}
|
package/dist/toast/service.jsx
CHANGED
|
@@ -7,6 +7,7 @@ import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
|
7
7
|
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
8
8
|
import { bottomOverlaysOf } from "../host/bottom-overlays.jsx";
|
|
9
9
|
import { useG9Host, useG9HostInsets } from "../host/hooks.jsx";
|
|
10
|
+
import { useDisposeWithHost } from "../host/layer-lifetime.jsx";
|
|
10
11
|
import { g9Hosts } from "../host/registry.jsx";
|
|
11
12
|
import { G9IconSlot } from "../icon/slot.jsx";
|
|
12
13
|
import { useG9Culture, useG9Direction, useG9Executor, useG9Layout, useG9Settings, useG9Theme, useG9Window } from "../provider/hooks.jsx";
|
|
@@ -159,9 +160,7 @@ function ToastLayer(props) {
|
|
|
159
160
|
snap.insetVersion,
|
|
160
161
|
snap.toasts.length
|
|
161
162
|
]);
|
|
162
|
-
|
|
163
|
-
store
|
|
164
|
-
]);
|
|
163
|
+
useDisposeWithHost(host, ()=>store.dispose());
|
|
165
164
|
const top = insets.top + g9ToastMetrics.edgeMargin;
|
|
166
165
|
const bottom = insets.bottom + (sheetOpen ? 0 : clearance) + snap.bottomOverlayHeight + g9ToastMetrics.edgeMargin;
|
|
167
166
|
const positions = new Set(snap.toasts.map((t)=>t.position));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/lynxcontrols",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.7",
|
|
4
4
|
"description": "ReactLynx controls and overlay infrastructure: provider/host, sheets, popups, toasts, fields, buttons, pickers, tab view, tab bar, edge panel, swipe rows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"build": "rslib build"
|
|
235
235
|
},
|
|
236
236
|
"dependencies": {
|
|
237
|
-
"@g9tm/lynxcontrols-foundation": "2.6.
|
|
237
|
+
"@g9tm/lynxcontrols-foundation": "2.6.7"
|
|
238
238
|
},
|
|
239
239
|
"peerDependencies": {
|
|
240
240
|
"@lynx-js/react": ">=0.129.3 <0.130.0",
|
|
@@ -10,11 +10,11 @@ Props:
|
|
|
10
10
|
- `children?`: ReactNode
|
|
11
11
|
- `size?`: number = 84
|
|
12
12
|
- `side?`: 'left' | 'right' = "right"
|
|
13
|
+
- `onPlaced?`: (rect: G9OrbRect | null) => void
|
|
13
14
|
- `onTap?`: () => void
|
|
14
15
|
- `discSize?`: number = 60
|
|
15
16
|
- `accessory?`: ReactNode
|
|
16
17
|
- `hidden?`: boolean
|
|
17
|
-
- `hold?`: object
|
|
18
18
|
|
|
19
19
|
Example: `<G9FloatingOrb />`
|
|
20
20
|
|