@g9tm/lynxcontrols 1.4.7 → 1.5.0
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/.tsbuildinfo +1 -1
- package/dist/anchor/context.d.ts +15 -0
- package/dist/anchor/context.d.ts.map +1 -0
- package/dist/anchor/context.jsx +10 -0
- package/dist/anchor/context.jsx.map +1 -0
- package/dist/anchor/hooks.d.ts +72 -0
- package/dist/anchor/hooks.d.ts.map +1 -0
- package/dist/anchor/hooks.jsx +147 -0
- package/dist/anchor/hooks.jsx.map +1 -0
- package/dist/anchor/index.d.ts +6 -0
- package/dist/anchor/index.d.ts.map +1 -0
- package/dist/anchor/index.jsx +5 -0
- package/dist/anchor/measure.d.ts +22 -0
- package/dist/anchor/measure.d.ts.map +1 -0
- package/dist/anchor/measure.jsx +110 -0
- package/dist/anchor/measure.jsx.map +1 -0
- package/dist/anchor/registry.d.ts +108 -0
- package/dist/anchor/registry.d.ts.map +1 -0
- package/dist/anchor/registry.jsx +142 -0
- package/dist/anchor/registry.jsx.map +1 -0
- package/dist/anchor/scroll.d.ts +34 -0
- package/dist/anchor/scroll.d.ts.map +1 -0
- package/dist/anchor/scroll.jsx +255 -0
- package/dist/anchor/scroll.jsx.map +1 -0
- package/dist/base/control.d.ts +10 -3
- package/dist/base/control.d.ts.map +1 -1
- package/dist/base/control.jsx +17 -2
- package/dist/base/control.jsx.map +1 -1
- package/dist/base/index.d.ts +1 -1
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.jsx +1 -1
- package/dist/base/pressable.d.ts.map +1 -1
- package/dist/base/pressable.jsx +7 -1
- package/dist/base/pressable.jsx.map +1 -1
- package/dist/base/selection-item.d.ts +9 -1
- package/dist/base/selection-item.d.ts.map +1 -1
- package/dist/base/selection-item.jsx +10 -1
- package/dist/base/selection-item.jsx.map +1 -1
- package/dist/button/button.css +20 -0
- package/dist/button/button.css.map +1 -1
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.jsx +11 -1
- package/dist/button/button.jsx.map +1 -1
- package/dist/button/header-action-button.d.ts +5 -0
- package/dist/button/header-action-button.d.ts.map +1 -1
- package/dist/button/header-action-button.jsx +16 -2
- package/dist/button/header-action-button.jsx.map +1 -1
- package/dist/button/icon-button.d.ts.map +1 -1
- package/dist/button/icon-button.jsx +11 -1
- package/dist/button/icon-button.jsx.map +1 -1
- package/dist/button/nav-card.d.ts.map +1 -1
- package/dist/button/nav-card.jsx +10 -1
- package/dist/button/nav-card.jsx.map +1 -1
- package/dist/button/vertical-icon-text-button.d.ts.map +1 -1
- package/dist/button/vertical-icon-text-button.jsx +10 -1
- package/dist/button/vertical-icon-text-button.jsx.map +1 -1
- package/dist/button/visuals.d.ts.map +1 -1
- package/dist/button/visuals.jsx +1 -1
- package/dist/button/visuals.jsx.map +1 -1
- package/dist/expander/expander.d.ts.map +1 -1
- package/dist/expander/expander.jsx +14 -1
- package/dist/expander/expander.jsx.map +1 -1
- package/dist/fields/editor.d.ts.map +1 -1
- package/dist/fields/editor.jsx +18 -2
- package/dist/fields/editor.jsx.map +1 -1
- package/dist/fields/fields.css +21 -0
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/index.d.ts +1 -1
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.jsx +1 -1
- package/dist/fields/outlined-field.d.ts +33 -1
- package/dist/fields/outlined-field.d.ts.map +1 -1
- package/dist/fields/outlined-field.jsx +43 -5
- package/dist/fields/outlined-field.jsx.map +1 -1
- package/dist/fields/text-entry.d.ts.map +1 -1
- package/dist/fields/text-entry.jsx +18 -2
- package/dist/fields/text-entry.jsx.map +1 -1
- package/dist/guide/guide.css +453 -0
- package/dist/guide/guide.css.map +1 -0
- package/dist/guide/index.d.ts +5 -0
- package/dist/guide/index.d.ts.map +1 -0
- package/dist/guide/index.jsx +4 -0
- package/dist/guide/journey.d.ts +46 -0
- package/dist/guide/journey.d.ts.map +1 -0
- package/dist/guide/journey.jsx +464 -0
- package/dist/guide/journey.jsx.map +1 -0
- package/dist/guide/placement.d.ts +44 -0
- package/dist/guide/placement.d.ts.map +1 -0
- package/dist/guide/placement.jsx +119 -0
- package/dist/guide/placement.jsx.map +1 -0
- package/dist/guide/service.d.ts +85 -0
- package/dist/guide/service.d.ts.map +1 -0
- package/dist/guide/service.jsx +620 -0
- package/dist/guide/service.jsx.map +1 -0
- package/dist/guide/settings.d.ts +50 -0
- package/dist/guide/settings.d.ts.map +1 -0
- package/dist/guide/settings.jsx +60 -0
- package/dist/guide/settings.jsx.map +1 -0
- package/dist/host/host.d.ts +5 -1
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +12 -0
- package/dist/host/host.jsx.map +1 -1
- package/dist/host/layers.d.ts +3 -1
- package/dist/host/layers.d.ts.map +1 -1
- package/dist/host/layers.jsx +4 -2
- package/dist/host/layers.jsx.map +1 -1
- package/dist/host/registry.d.ts +3 -0
- package/dist/host/registry.d.ts.map +1 -1
- package/dist/host/registry.jsx.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/pickers/combo-box.d.ts +8 -0
- package/dist/pickers/combo-box.d.ts.map +1 -1
- package/dist/pickers/combo-box.jsx +51 -9
- package/dist/pickers/combo-box.jsx.map +1 -1
- package/dist/pickers/date-time-picker.d.ts +2 -2
- package/dist/pickers/date-time-picker.d.ts.map +1 -1
- package/dist/pickers/date-time-picker.jsx +4 -3
- package/dist/pickers/date-time-picker.jsx.map +1 -1
- package/dist/pickers/date-time.d.ts +5 -2
- package/dist/pickers/date-time.d.ts.map +1 -1
- package/dist/pickers/date-time.jsx +1 -1
- package/dist/pickers/date-time.jsx.map +1 -1
- package/dist/pickers/picker-sheet.d.ts +6 -2
- package/dist/pickers/picker-sheet.d.ts.map +1 -1
- package/dist/pickers/picker-sheet.jsx +2 -3
- package/dist/pickers/picker-sheet.jsx.map +1 -1
- package/dist/pickers/picker.d.ts.map +1 -1
- package/dist/pickers/picker.jsx +3 -2
- package/dist/pickers/picker.jsx.map +1 -1
- package/dist/pickers/pickers.css +27 -0
- package/dist/pickers/pickers.css.map +1 -1
- package/dist/pickers/timespan-picker.d.ts.map +1 -1
- package/dist/pickers/timespan-picker.jsx +3 -2
- package/dist/pickers/timespan-picker.jsx.map +1 -1
- package/dist/pickers/trigger.d.ts +3 -1
- package/dist/pickers/trigger.d.ts.map +1 -1
- package/dist/pickers/trigger.jsx +6 -1
- package/dist/pickers/trigger.jsx.map +1 -1
- package/dist/provider/contexts.d.ts +3 -0
- package/dist/provider/contexts.d.ts.map +1 -1
- package/dist/provider/contexts.jsx.map +1 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +24 -17
- package/dist/provider/provider.jsx.map +1 -1
- package/dist/provider/settings.d.ts +16 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +7 -3
- package/dist/provider/settings.jsx.map +1 -1
- package/dist/provider/theme.css +4 -0
- package/dist/provider/theme.css.map +1 -1
- package/dist/range-slider/math.d.ts +14 -4
- package/dist/range-slider/math.d.ts.map +1 -1
- package/dist/range-slider/math.jsx +16 -4
- package/dist/range-slider/math.jsx.map +1 -1
- package/dist/range-slider/range-slider.css +17 -0
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/range-slider/range-slider.d.ts +11 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -1
- package/dist/range-slider/range-slider.jsx +35 -13
- package/dist/range-slider/range-slider.jsx.map +1 -1
- package/dist/route/hooks.d.ts +34 -0
- package/dist/route/hooks.d.ts.map +1 -0
- package/dist/route/hooks.jsx +147 -0
- package/dist/route/hooks.jsx.map +1 -0
- package/dist/route/index.d.ts +3 -0
- package/dist/route/index.d.ts.map +1 -0
- package/dist/route/index.jsx +2 -0
- package/dist/route/router.d.ts +201 -0
- package/dist/route/router.d.ts.map +1 -0
- package/dist/route/router.jsx +810 -0
- package/dist/route/router.jsx.map +1 -0
- package/dist/selection/index.d.ts +2 -1
- package/dist/selection/index.d.ts.map +1 -1
- package/dist/selection/index.jsx +2 -1
- package/dist/selection/selection-sheet.d.ts +3 -1
- package/dist/selection/selection-sheet.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +57 -8
- package/dist/selection/selection-sheet.jsx.map +1 -1
- package/dist/selection/selection.css +7 -0
- package/dist/selection/selection.css.map +1 -1
- package/dist/selection/window.d.ts +29 -0
- package/dist/selection/window.d.ts.map +1 -0
- package/dist/selection/window.jsx +24 -0
- package/dist/selection/window.jsx.map +1 -0
- package/dist/sheet/frame.d.ts +3 -1
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +72 -26
- package/dist/sheet/frame.jsx.map +1 -1
- package/dist/sheet/header.d.ts.map +1 -1
- package/dist/sheet/header.jsx +3 -1
- package/dist/sheet/header.jsx.map +1 -1
- package/dist/sheet/index.d.ts +1 -1
- package/dist/sheet/index.d.ts.map +1 -1
- package/dist/sheet/index.jsx +1 -1
- package/dist/sheet/options.d.ts +30 -0
- package/dist/sheet/options.d.ts.map +1 -1
- package/dist/sheet/options.jsx +2 -1
- package/dist/sheet/options.jsx.map +1 -1
- package/dist/sheet/service.d.ts +13 -0
- package/dist/sheet/service.d.ts.map +1 -1
- package/dist/sheet/service.jsx +27 -4
- package/dist/sheet/service.jsx.map +1 -1
- package/dist/sheet/sheet.css +9 -0
- package/dist/sheet/sheet.css.map +1 -1
- package/dist/sheet/sizing.d.ts +2 -0
- package/dist/sheet/sizing.d.ts.map +1 -1
- package/dist/sheet/sizing.jsx +2 -1
- package/dist/sheet/sizing.jsx.map +1 -1
- package/dist/tabs/tab-view.d.ts +14 -0
- package/dist/tabs/tab-view.d.ts.map +1 -1
- package/dist/tabs/tab-view.jsx +59 -3
- package/dist/tabs/tab-view.jsx.map +1 -1
- package/dist/toggle/checkbox.d.ts.map +1 -1
- package/dist/toggle/checkbox.jsx +15 -1
- package/dist/toggle/checkbox.jsx.map +1 -1
- package/dist/toggle/chip-group.d.ts +9 -1
- package/dist/toggle/chip-group.d.ts.map +1 -1
- package/dist/toggle/chip-group.jsx +63 -13
- package/dist/toggle/chip-group.jsx.map +1 -1
- package/dist/toggle/switch.d.ts +1 -1
- package/dist/toggle/switch.d.ts.map +1 -1
- package/dist/toggle/switch.jsx +18 -3
- package/dist/toggle/switch.jsx.map +1 -1
- package/dist/toggle/toggle.css +20 -0
- package/dist/toggle/toggle.css.map +1 -1
- package/package.json +17 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide/service.jsx","sources":["../../src/guide/service.tsx"],"sourcesContent":["import {\n type G9ChangeLine,\n type G9GuideEffectSpec,\n type G9JourneySource,\n g9RuntimeTimers,\n textIn,\n} from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useMemo, useRef, useState, useSyncExternalStore } from '@lynx-js/react';\nimport type { NodesRef } from '@lynx-js/types';\nimport { anchorRect, measureNode } from '../anchor/measure';\nimport type { G9AnchorRect, G9AnchorRegistry } from '../anchor/registry';\nimport { revealAnchor } from '../anchor/scroll';\nimport { useG9Host } from '../host/hooks';\nimport type { G9HostHandle } from '../host/registry';\nimport { g9Hosts } from '../host/registry';\nimport { useG9Direction, useG9Settings } from '../provider/hooks';\nimport type { G9WalkPresenter } from '../route/router';\nimport { inflate, placeBubble, placePointer, scrimBands } from './placement';\nimport { formatGuideText, type G9ResolvedGuideSettings, resolveGuideSettings } from './settings';\nimport './guide.css';\n\n// The guide: effects drawn over everything (its own host layer, above popups, toasts and the floating items) on any\n// anchor — a highlight in a colour with an opacity, a spotlight that dims all but the control, a finger that shows the\n// gesture, a bubble with text and buttons, a pulsing beacon, a step badge, a ripple where the guide taps — plus the\n// countdown confirmation a guided save waits behind. A mark follows its target (scrolls, sheets, the keyboard) only\n// while it is shown; nothing animates or measures once the last mark is gone (an idle app does no frame work).\n\n/** What a mark points at: an anchor id (followed as it moves), a fixed rect, or a point. */\nexport type G9GuideTarget = string | G9AnchorRect | { readonly x: number; readonly y: number };\n\n/** One mark: its target, its effects and how it ends. */\nexport interface G9GuideSpec {\n readonly key?: string;\n readonly target: G9GuideTarget;\n readonly effects: readonly G9GuideEffectSpec[];\n /** Bring an anchor into view first (scrolling, mounting a list row). Default true. */\n readonly reveal?: boolean;\n /** Ends by itself after this long. */\n readonly timeoutMs?: number;\n /** What a touch on the guide's own surfaces does. Default `never` (only buttons end it). */\n readonly dismissOn?: 'tap-anywhere' | 'never';\n /** Buttons of the bubble. */\n readonly buttons?: ReadonlyArray<'next' | 'skip' | 'done'>;\n readonly language?: 'fa' | 'en';\n}\n\n/** How a mark ended (exactly once). */\nexport type G9GuideOutcome =\n | 'hidden'\n | 'tapped'\n | 'next'\n | 'skip'\n | 'done'\n | 'timeout'\n | 'target-lost'\n | 'replaced'\n | 'unmount';\n\n/** One shown mark: hide it, or await how it ended. */\nexport interface G9GuideHandle {\n readonly key: string;\n hide(): void;\n readonly result: Promise<G9GuideOutcome>;\n}\n\n/** A shown mark, as the layer draws it. */\nexport interface G9GuideMarkState {\n readonly key: string;\n readonly spec: G9GuideSpec;\n /** The target in LynxView coordinates, null while measuring. */\n readonly rect: G9AnchorRect | null;\n}\n\n/** A guided-save confirmation. */\nexport interface G9ConfirmRequest {\n readonly title: string;\n readonly source: G9JourneySource;\n readonly changes: readonly G9ChangeLine[];\n readonly seconds: number;\n readonly destructive: boolean;\n}\n\ninterface ConfirmState extends G9ConfirmRequest {\n readonly resolve: (ok: boolean) => void;\n}\n\n/** The guide of one host: marks, ready-made combinations, the walk presenter and the countdown confirmation. */\nexport interface G9GuideService {\n show(spec: G9GuideSpec): G9GuideHandle;\n hideAll(): void;\n readonly marks: { get(): readonly G9GuideMarkState[]; subscribe(l: () => void): () => void };\n /** A finger and a bubble on a control (the default step of a walk). */\n pointAt(\n target: G9GuideTarget,\n text: string,\n options?: {\n readonly modal?: boolean;\n readonly gesture?: 'tap' | 'longPress';\n readonly buttons?: G9GuideSpec['buttons'];\n },\n ): G9GuideHandle;\n /** A modal spotlight with a bubble and «done». */\n coach(target: G9GuideTarget, text: string): G9GuideHandle;\n /** A small pulsing dot on the control's corner. */\n hint(target: G9GuideTarget): G9GuideHandle;\n /** The presenter a router walk draws its steps with. */\n presenter(): G9WalkPresenter;\n /** Asks the person to confirm a write: the changes, the source, a countdown on the confirm button. */\n confirm(request: G9ConfirmRequest): Promise<boolean>;\n readonly confirmation: { get(): G9ConfirmRequest | null; subscribe(l: () => void): () => void };\n readonly settings: G9ResolvedGuideSettings;\n readonly anchors: G9AnchorRegistry;\n}\n\ninterface Mark {\n state: G9GuideMarkState;\n settle: (o: G9GuideOutcome) => void;\n misses: number;\n timer: unknown;\n}\n\nconst FEATURE = 'g9-guide';\n\nfunction store<T>(initial: T) {\n let value = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => value,\n set(v: T) {\n value = v;\n for (const l of Array.from(listeners)) l();\n },\n subscribe(l: () => void) {\n listeners.add(l);\n return () => {\n listeners.delete(l);\n };\n },\n };\n}\n\nconst isRect = (t: G9GuideTarget): t is G9AnchorRect => typeof t === 'object' && 'width' in t;\nconst sameRect = (a: G9AnchorRect | null, b: G9AnchorRect | null) =>\n a === b ||\n (!!a &&\n !!b &&\n Math.abs(a.x - b.x) < 0.5 &&\n Math.abs(a.y - b.y) < 0.5 &&\n Math.abs(a.width - b.width) < 0.5 &&\n Math.abs(a.height - b.height) < 0.5);\n\nfunction createGuideService(host: G9HostHandle, initial: G9ResolvedGuideSettings): G9GuideService {\n const anchors = host.anchors;\n // The provider's settings win whoever created the service first (`g9Guide()` outside components has none): the\n // layer and the hook hand them in (`useProvidedSettings`).\n let settings = initial;\n const marks = new Map<string, Mark>();\n const view = store<readonly G9GuideMarkState[]>([]);\n const confirmation = store<ConfirmState | null>(null);\n let seq = 0;\n let tracking: unknown = null;\n\n const publish = () => view.set(Array.from(marks.values()).map((m) => m.state));\n\n const measure = async (target: G9GuideTarget): Promise<G9AnchorRect | null> => {\n if (typeof target === 'string') {\n const a = anchors.find(target);\n return a ? anchorRect(a) : null;\n }\n return isRect(target) ? target : { x: target.x - 1, y: target.y - 1, width: 2, height: 2 };\n };\n\n const end = (key: string, outcome: G9GuideOutcome) => {\n const m = marks.get(key);\n if (!m) return;\n marks.delete(key);\n if (m.timer !== null) g9RuntimeTimers.clearTimeout(m.timer);\n publish();\n m.settle(outcome);\n if (marks.size === 0 && tracking !== null) {\n g9RuntimeTimers.clearTimeout(tracking);\n tracking = null;\n }\n };\n\n const track = async () => {\n tracking = null;\n for (const m of Array.from(marks.values())) {\n const rect = await measure(m.state.spec.target);\n if (!marks.has(m.state.key)) continue;\n if (!rect || rect.width <= 0 || rect.height <= 0) {\n m.misses += 1;\n if (m.misses >= 2) end(m.state.key, 'target-lost');\n continue;\n }\n m.misses = 0;\n if (!sameRect(rect, m.state.rect)) {\n m.state = { ...m.state, rect };\n publish();\n }\n }\n if (marks.size > 0 && tracking === null)\n tracking = g9RuntimeTimers.setTimeout(() => void track(), settings.trackMs);\n };\n\n const offRegistry = anchors.subscribe(() => {\n if (marks.size > 0 && tracking === null) tracking = g9RuntimeTimers.setTimeout(() => void track(), 0);\n });\n\n const service: G9GuideService = {\n get settings() {\n return settings;\n },\n anchors,\n marks: view,\n confirmation,\n show(spec) {\n const key = spec.key ?? `g9-guide-${++seq}`;\n if (marks.has(key)) end(key, 'replaced');\n let settle!: (o: G9GuideOutcome) => void;\n const result = new Promise<G9GuideOutcome>((r) => {\n settle = r;\n });\n const mark: Mark = { state: { key, spec, rect: null }, settle, misses: 0, timer: null };\n marks.set(key, mark);\n if (spec.timeoutMs !== undefined)\n mark.timer = g9RuntimeTimers.setTimeout(() => end(key, 'timeout'), spec.timeoutMs);\n publish();\n void (async () => {\n if (typeof spec.target === 'string' && spec.reveal !== false)\n await revealAnchor(anchors, spec.target, { smooth: true });\n if (!marks.has(key)) return;\n const rect = await measure(spec.target);\n if (!marks.has(key)) return;\n if (!rect) {\n end(key, 'target-lost');\n return;\n }\n mark.state = { ...mark.state, rect };\n publish();\n if (tracking === null) tracking = g9RuntimeTimers.setTimeout(() => void track(), settings.trackMs);\n })();\n return { key, hide: () => end(key, 'hidden'), result };\n },\n hideAll() {\n for (const key of Array.from(marks.keys())) end(key, 'hidden');\n },\n pointAt(target, text, options = {}) {\n return service.show({\n target,\n effects: [\n { type: 'spotlight', modal: options.modal === true },\n { type: 'highlight', ring: 2, opacity: 0.08, pulse: true },\n { type: 'pointer', gesture: options.gesture ?? 'tap' },\n { type: 'caption', text },\n ],\n ...(options.buttons ? { buttons: options.buttons } : {}),\n });\n },\n coach(target, text) {\n return service.show({\n target,\n effects: [\n { type: 'spotlight', modal: true },\n { type: 'caption', text },\n ],\n buttons: ['done'],\n });\n },\n hint(target) {\n return service.show({ target, effects: [{ type: 'beacon' }], reveal: false });\n },\n presenter() {\n return {\n show: (step) => {\n const h = service.pointAt(step.anchor, step.text, { gesture: step.gesture });\n return { hide: () => h.hide() };\n },\n note: (text) => {\n service.show({\n target: { x: 0, y: 0, width: 0.01, height: 0.01 },\n effects: [{ type: 'caption', text }],\n timeoutMs: 1600,\n reveal: false,\n });\n },\n };\n },\n confirm(request) {\n confirmation.get()?.resolve(false);\n return new Promise<boolean>((resolve) => {\n const state: ConfirmState = {\n ...request,\n resolve: (ok) => {\n if (confirmation.get() === state) confirmation.set(null);\n resolve(ok);\n },\n };\n confirmation.set(state);\n });\n },\n };\n (service as unknown as { __end: typeof end }).__end = end;\n (service as unknown as Settable).__settings = (next) => {\n settings = next;\n };\n (service as { dispose?: () => void }).dispose = () => {\n offRegistry();\n for (const key of Array.from(marks.keys())) end(key, 'unmount');\n confirmation.get()?.resolve(false);\n };\n host.attachFeature(FEATURE, service);\n host.registerLayerItem('guide', { key: FEATURE, element: <GuideLayer service={service} /> });\n // Back ends the guide's confirmation first, then any mark (never a journey's place behind it).\n host.back.push(\n () => {\n const c = confirmation.get();\n if (c) {\n c.resolve(false);\n return 'handled';\n }\n if (marks.size > 0) {\n service.hideAll();\n return 'handled';\n }\n return 'pass';\n },\n { layer: 'guide' },\n );\n return service;\n}\n\ninterface Settable {\n __settings?: (settings: G9ResolvedGuideSettings) => void;\n}\n\n/** The guide of a host, created on first use. */\nexport function guideServiceOf(host: G9HostHandle, settings?: G9ResolvedGuideSettings): G9GuideService {\n const existing = host.getFeature(FEATURE) as G9GuideService | undefined;\n if (existing && settings) (existing as unknown as Settable).__settings?.(settings);\n return existing ?? createGuideService(host, settings ?? resolveGuideSettings(undefined));\n}\n\n/** The guide of the nearest host. */\nexport function useG9Guide(): G9GuideService {\n const settings = useG9Settings();\n return guideServiceOf(useG9Host(), resolveGuideSettings(settings.guide));\n}\n\n/** The guide of the active host, for code outside components. Throws without a host. */\nexport function g9Guide(): G9GuideService {\n return guideServiceOf(g9Hosts.require());\n}\n\n// ── drawing ─────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst POINTER_SVG = (fill: string, stroke: string) =>\n `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"${fill}\" stroke=\"${stroke}\" stroke-width=\"0.9\" stroke-linejoin=\"round\" d=\"M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63l-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74l-3.43-.72c-.08-.01-.15-.03-.24-.03-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38z\"/></svg>`;\n\nfunction rgba(hex: string | undefined, opacity: number, fallback: string): string {\n if (!hex) return fallback;\n const h = hex.replace('#', '');\n const n = Number.parseInt(h.slice(0, 6), 16);\n if (!Number.isFinite(n)) return fallback;\n const a = h.length === 8 ? Number.parseInt(h.slice(6, 8), 16) / 255 : opacity;\n return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${Math.round(a * 1000) / 1000})`;\n}\n\nconst px = (n: number) => `${Math.round(n * 10) / 10}px`;\nconst box = (r: G9AnchorRect) => ({ left: px(r.x), top: px(r.y), width: px(r.width), height: px(r.height) });\n\nfunction GuideLayer(props: { readonly service: G9GuideService }): ReactNode {\n const { service } = props;\n const provided = useG9Settings().guide;\n const resolved = useMemo(() => resolveGuideSettings(provided), [provided]);\n (service as unknown as Settable).__settings?.(resolved);\n const marks = useSyncExternalStore(\n (l) => service.marks.subscribe(l),\n () => service.marks.get(),\n );\n const confirmation = useSyncExternalStore(\n (l) => service.confirmation.subscribe(l),\n () => service.confirmation.get(),\n );\n const node = useRef<NodesRef | null>(null);\n const [frame, setFrame] = useState<G9AnchorRect>({ x: 0, y: 0, width: 0, height: 0 });\n const visible = marks.length > 0 || confirmation !== null;\n useEffect(() => {\n if (!visible) return;\n void measureNode(node.current).then((r) => {\n // A root measured before its first layout answers 0×0: the frame it replaces is still the right one.\n if (r && r.width > 0 && r.height > 0 && !sameRect(r, frame)) setFrame(r);\n });\n }, [visible, marks]);\n // The host clears its layers when it unmounts: the guide lets go of the anchors and settles every mark then.\n useEffect(() => () => (service as { dispose?: () => void }).dispose?.(), [service]);\n if (!visible) return null;\n const local = (r: G9AnchorRect): G9AnchorRect => ({\n x: r.x - frame.x,\n y: r.y - frame.y,\n width: r.width,\n height: r.height,\n });\n const viewRect: G9AnchorRect = { x: 0, y: 0, width: frame.width, height: frame.height };\n // Fixed, like a popup: a G9 sheet is lynx-ui's `position: fixed` SheetView, which Lynx paints above every in-flow\n // node — an absolute guide layer drew UNDER an open sheet (measured 2026-11-12 on a device). Fixed elements paint in\n // creation order, so the root is re-created for each new mark or confirmation: it is always newer than the sheet.\n const generation = `${marks.map((m) => m.key).join('|')}#${confirmation ? 'c' : ''}`;\n return (\n <view\n key={generation}\n className=\"g9-guide\"\n flatten={false}\n ref={(n: NodesRef | null) => {\n node.current = n;\n }}\n bindlayoutchange={(e: { detail?: { width?: number; height?: number } }) => {\n const w = e.detail?.width ?? 0;\n const h = e.detail?.height ?? 0;\n if (w > 0 && h > 0 && (Math.abs(w - frame.width) > 0.5 || Math.abs(h - frame.height) > 0.5))\n setFrame((f) => ({ ...f, width: w, height: h }));\n }}\n >\n {marks.map((m) =>\n m.rect ? <MarkView key={m.key} mark={m} rect={local(m.rect)} view={viewRect} service={service} /> : null,\n )}\n {confirmation ? <ConfirmCard request={confirmation as ConfirmState} service={service} /> : null}\n </view>\n );\n}\n\nfunction MarkView(props: {\n readonly mark: G9GuideMarkState;\n readonly rect: G9AnchorRect;\n readonly view: G9AnchorRect;\n readonly service: G9GuideService;\n}): ReactNode {\n const { mark, rect, view, service } = props;\n const rtl = useG9Direction() === 'rtl';\n const texts = service.settings.texts;\n const [bubble, setBubble] = useState<{ width: number; height: number } | null>(null);\n const finish = (outcome: G9GuideOutcome) => endMark(service, mark.key, outcome);\n const out: ReactNode[] = [];\n for (const [i, effect] of mark.spec.effects.entries()) {\n const k = `${effect.type}-${i}`;\n switch (effect.type) {\n case 'spotlight': {\n const pad = effect.padding ?? 6;\n const hole = inflate(rect, pad);\n const scrim = rgba(effect.scrim, 0.55, 'rgba(0, 0, 0, 0.55)');\n const modal = effect.modal === true;\n scrimBands(hole, view).forEach((band, b) => {\n if (band.width <= 0 || band.height <= 0) return;\n out.push(\n <view\n key={`${k}-band-${b}`}\n className={`g9-guide__scrim${modal ? ' g9-guide__scrim--modal' : ''}`}\n style={{ ...box(band), backgroundColor: scrim }}\n {...(modal\n ? { bindtap: () => (mark.spec.dismissOn === 'tap-anywhere' ? finish('tapped') : undefined) }\n : {})}\n />,\n );\n });\n // The bands leave a RECTANGULAR hole (no even-odd fill in Lynx): a ring rounder than that shows bright corners\n // outside it (seen on a device, 2026-11-12) — `auto` stays nearly square.\n const radius =\n effect.radius === undefined || effect.radius === 'auto' ? Math.min(4, hole.height / 2) : effect.radius;\n out.push(\n <view key={`${k}-ring`} className=\"g9-guide__hole\" style={{ ...box(hole), borderRadius: px(radius) }} />,\n );\n break;\n }\n case 'highlight': {\n const pad = effect.padding ?? 4;\n const r = inflate(rect, pad);\n const radius =\n effect.radius === undefined || effect.radius === 'auto' ? Math.min(14, r.height / 2) : effect.radius;\n out.push(\n <view\n key={k}\n className={`g9-guide__highlight${effect.pulse ? ' g9-guide__highlight--pulse' : ''}`}\n style={{\n ...box(r),\n borderRadius: px(radius),\n borderWidth: px(effect.ring ?? 2),\n borderColor: effect.color ?? 'var(--g9-primary)',\n backgroundColor: rgba(\n effect.color,\n effect.opacity ?? 0.18,\n effect.opacity === undefined ? 'rgba(46, 125, 50, 0.18)' : `rgba(46, 125, 50, ${effect.opacity})`,\n ),\n }}\n />,\n );\n break;\n }\n case 'pointer': {\n const size = 48;\n const p = placePointer(rect, size);\n const gesture = effect.gesture ?? 'tap';\n out.push(\n <view\n key={k}\n className={`g9-guide__pointer g9-guide__pointer--${gesture}`}\n style={{ left: px(p.x), top: px(p.y), width: px(size), height: px(size) }}\n >\n <svg content={POINTER_SVG('#FFFFFF', '#1B1B1B')} style={{ width: px(size), height: px(size) }} />\n </view>,\n );\n break;\n }\n case 'beacon': {\n const corner = effect.corner ?? 'top-end';\n const atEnd = corner.endsWith('end') !== rtl;\n const x = atEnd ? rect.x + rect.width - 6 : rect.x - 6;\n const y = corner.startsWith('top') ? rect.y - 6 : rect.y + rect.height - 6;\n out.push(\n <view\n key={k}\n className=\"g9-guide__beacon\"\n style={{ left: px(x), top: px(y), backgroundColor: effect.color ?? 'var(--g9-error)' }}\n />,\n );\n break;\n }\n case 'badge':\n out.push(\n <view\n key={k}\n className=\"g9-guide__badge\"\n style={{ left: px(rtl ? rect.x + rect.width - 11 : rect.x - 11), top: px(rect.y - 11) }}\n >\n <text className=\"g9-guide__badge-text\">{effect.text}</text>\n </view>,\n );\n break;\n case 'ripple':\n out.push(\n <view\n key={k}\n className=\"g9-guide__ripple\"\n style={{ left: px(rect.x + rect.width / 2 - 24), top: px(rect.y + rect.height / 2 - 24) }}\n />,\n );\n break;\n case 'caption': {\n const language = mark.spec.language ?? (rtl ? 'fa' : 'en');\n const text = textIn(effect.text, language);\n const title = effect.title ? textIn(effect.title, language) : null;\n const width = Math.min(300, Math.max(120, view.width - 48));\n const size = bubble ?? { width, height: 64 };\n const place = placeBubble({ target: rect, bubble: size, view, prefer: effect.placement ?? 'auto', rtl });\n const buttons = mark.spec.buttons ?? [];\n out.push(\n <view\n key={k}\n className=\"g9-guide__bubble\"\n accessibility-element\n accessibility-label={title ? `${title}. ${text}` : text}\n style={{\n left: px(place.x),\n top: px(place.y),\n width: px(width),\n opacity: bubble ? 1 : 0,\n direction: rtl ? 'rtl' : 'ltr',\n }}\n bindlayoutchange={(e: { detail?: { width?: number; height?: number } }) => {\n const w = e.detail?.width ?? 0;\n const h = e.detail?.height ?? 0;\n if (h > 0 && (!bubble || Math.abs(bubble.height - h) > 0.5)) setBubble({ width: w || width, height: h });\n }}\n >\n {title ? (\n <text className=\"g9-guide__bubble-title\" style={{ textAlign: rtl ? 'right' : 'left' }}>\n {title}\n </text>\n ) : null}\n <text className=\"g9-guide__bubble-text\" style={{ textAlign: rtl ? 'right' : 'left' }}>\n {text}\n </text>\n {buttons.length > 0 ? (\n <view\n className=\"g9-guide__bubble-actions\"\n style={{ flexDirection: rtl ? 'row-reverse' : 'row', direction: 'ltr' }}\n >\n {buttons.map((b) => (\n <view\n key={b}\n className={`g9-guide__bubble-button${b === 'skip' ? ' g9-guide__bubble-button--quiet' : ''}`}\n bindtap={() => finish(b)}\n >\n <text\n className={`g9-guide__bubble-button-text${b === 'skip' ? ' g9-guide__bubble-button-text--quiet' : ''}`}\n >\n {b === 'next' ? texts.next : b === 'skip' ? texts.skip : texts.done}\n </text>\n </view>\n ))}\n </view>\n ) : null}\n <view\n className={`g9-guide__arrow g9-guide__arrow--${place.side}`}\n style={\n place.side === 'below' || place.side === 'above' || place.side === 'over'\n ? { left: px(place.arrow - 7) }\n : { top: px(place.arrow - 7) }\n }\n />\n </view>,\n );\n break;\n }\n }\n }\n return <>{out}</>;\n}\n\n/** Ends a mark with an outcome (the bubble's buttons, a tap on a modal scrim). */\nfunction endMark(service: G9GuideService, key: string, outcome: G9GuideOutcome): void {\n (service as unknown as { __end?: (k: string, o: G9GuideOutcome) => void }).__end?.(key, outcome);\n}\n\nfunction ConfirmCard(props: { readonly request: ConfirmState; readonly service: G9GuideService }): ReactNode {\n const { request, service } = props;\n const texts = service.settings.texts;\n const rtl = useG9Direction() === 'rtl';\n const [left, setLeft] = useState(request.seconds);\n useEffect(() => {\n setLeft(request.seconds);\n let n = request.seconds;\n let timer: unknown = null;\n const tick = () => {\n n -= 1;\n setLeft(n);\n if (n > 0) timer = g9RuntimeTimers.setTimeout(tick, 1000);\n };\n timer = g9RuntimeTimers.setTimeout(tick, 1000);\n return () => g9RuntimeTimers.clearTimeout(timer);\n }, [request]);\n const align = { textAlign: rtl ? ('right' as const) : ('left' as const) };\n const ready = left <= 0;\n return (\n <view className=\"g9-guide__confirm-scrim\" catchtap={() => undefined}>\n <view\n className=\"g9-guide__confirm\"\n style={{ direction: rtl ? 'rtl' : 'ltr' }}\n accessibility-element\n accessibility-label={request.title}\n >\n <text className=\"g9-guide__confirm-title\" style={align}>\n {request.title}\n </text>\n <text className=\"g9-guide__confirm-source\" style={align}>\n {texts.sources[request.source]}\n </text>\n {request.source === 'link' ? (\n <text className=\"g9-guide__confirm-warning\" style={align}>\n {texts.linkWarning}\n </text>\n ) : null}\n <text className=\"g9-guide__confirm-heading\" style={align}>\n {texts.changesTitle}\n </text>\n <view className=\"g9-guide__confirm-lines\">\n {(request.changes.length > 0\n ? request.changes\n : [{ action: 'other' as const, subject: texts.undescribed }]\n ).map((c, i) => (\n <view\n key={`c${i}`}\n className=\"g9-guide__confirm-line\"\n style={{ flexDirection: rtl ? 'row-reverse' : 'row', direction: 'ltr' }}\n >\n <text className={`g9-guide__confirm-verb g9-guide__confirm-verb--${c.action}`}>\n {texts.actions[c.action]}\n </text>\n <view className=\"g9-guide__confirm-line-body\">\n <text className=\"g9-guide__confirm-subject\" style={align}>\n {c.field ? `${c.subject} · ${c.field}` : c.subject}\n </text>\n {c.from !== undefined || c.to !== undefined ? (\n <text className=\"g9-guide__confirm-value\" style={align}>\n {`${c.from ?? '—'} → ${c.to ?? '—'}`}\n </text>\n ) : null}\n {c.note ? (\n <text className=\"g9-guide__confirm-note\" style={align}>\n {c.note}\n </text>\n ) : null}\n </view>\n </view>\n ))}\n </view>\n <view\n className=\"g9-guide__confirm-actions\"\n style={{ flexDirection: rtl ? 'row-reverse' : 'row', direction: 'ltr' }}\n >\n <view\n className=\"g9-guide__confirm-button g9-guide__confirm-button--cancel\"\n bindtap={() => request.resolve(false)}\n >\n <text className=\"g9-guide__confirm-button-text g9-guide__confirm-button-text--cancel\">{texts.cancel}</text>\n </view>\n <view\n className={`g9-guide__confirm-button${request.destructive ? ' g9-guide__confirm-button--danger' : ''}${ready ? '' : ' g9-guide__confirm-button--waiting'}`}\n bindtap={() => (ready ? request.resolve(true) : undefined)}\n accessibility-element\n accessibility-label={ready ? texts.confirm : formatGuideText(texts.confirmIn, left)}\n >\n <text className=\"g9-guide__confirm-button-text\">\n {ready ? texts.confirm : formatGuideText(texts.confirmIn, left)}\n </text>\n </view>\n </view>\n </view>\n </view>\n );\n}\n"],"names":["FEATURE","store","initial","value","listeners","Set","v","l","Array","isRect","t","sameRect","a","b","Math","createGuideService","host","anchors","settings","marks","Map","view1","confirmation","seq","tracking","publish","m","measure","target","anchorRect","end","key","outcome","g9RuntimeTimers","track","rect","offRegistry","service","spec","_spec_key","settle","result","Promise","r","mark","undefined","revealAnchor","text1","options","_options_gesture","step","h","request","_confirmation_get","resolve","state","ok","next","GuideLayer","c","guideServiceOf","_existing___settings","existing","resolveGuideSettings","useG9Guide","useG9Settings","useG9Host","g9Guide","g9Hosts","POINTER_SVG","fill","stroke","rgba","hex","opacity","fallback","n","Number","px","box","props","_service___settings","provided","resolved","useMemo","useSyncExternalStore","node","useRef","frame","setFrame","useState","visible","useEffect","measureNode","_service_dispose","local","viewRect","generation","view","e","_e_detail","_e_detail1","w","f","MarkView","ConfirmCard","rtl","useG9Direction","texts","bubble","setBubble","finish","endMark","out","i","effect","k","_effect_padding","pad","hole","inflate","scrim","modal","scrimBands","band","radius","_effect_padding1","_effect_ring","_effect_color","_effect_opacity","_effect_gesture","size","p","placePointer","gesture","svg","_effect_corner","_effect_color1","corner","atEnd","x","y","text","_mark_spec_language","_effect_placement","_mark_spec_buttons","language","textIn","title","width","place","placeBubble","buttons","_service___end","left","setLeft","timer","tick","align","ready","_c_from","_c_to","formatGuideText"],"mappings":";;;;;;;;;;AAyHA,MAAMA,UAAU;AAEhB,SAASC,MAASC,OAAU;IAC1B,IAAIC,QAAQD;IACZ,MAAME,YAAY,IAAIC;IACtB,OAAO;QACL,KAAK,IAAMF;QACX,KAAIG,CAAI;YACNH,QAAQG;YACR,KAAK,MAAMC,KAAKC,MAAM,IAAI,CAACJ,WAAYG;QACzC;QACA,WAAUA,CAAa;YACrBH,UAAU,GAAG,CAACG;YACd,OAAO;gBACLH,UAAU,MAAM,CAACG;YACnB;QACF;IACF;AACF;AAEA,MAAME,SAAS,CAACC,IAAwC,AAAa,YAAb,OAAOA,KAAkB,WAAWA;AAC5F,MAAMC,WAAW,CAACC,GAAwBC,IACxCD,MAAMC,KACL,CAAC,CAACD,KACD,CAAC,CAACC,KACFC,KAAK,GAAG,CAACF,EAAE,CAAC,GAAGC,EAAE,CAAC,IAAI,OACtBC,KAAK,GAAG,CAACF,EAAE,CAAC,GAAGC,EAAE,CAAC,IAAI,OACtBC,KAAK,GAAG,CAACF,EAAE,KAAK,GAAGC,EAAE,KAAK,IAAI,OAC9BC,KAAK,GAAG,CAACF,EAAE,MAAM,GAAGC,EAAE,MAAM,IAAI;AAEpC,SAASE,mBAAmBC,IAAkB,EAAEd,OAAgC;IAC9E,MAAMe,U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AK;YACT,EAAEA;OACD;QACL,EAAEA,KAAK;QACP,CAACA,KACC,UAAU,4BACV,OAAO;QAAE,eAAeQ,MAAM,gBAAgB;QAAO,WAAW;IAAM,GACvE;UACC,CAACR,KACC,UAAU,4DACV,SAAS,IAAM9C,QAAQ,OAAO,CAAC,QAChC;YACC,CAAC0F,KAAK,UAAU,uEAAuElC,MAAM,MAAM,GAAGkC,KAAK;UAC7G,EAAE5C,KAAK;UACP,CAACA,KACC,WAAW,CAAC,wBAAwB,EAAE9C,QAAQ,WAAW,GAAG,sCAAsC,KAAK2G,QAAQ,KAAK,sCAAsC,EAC1J,SAAS,IAAOA,QAAQ3G,QAAQ,OAAO,CAAC,QAAQP,QAChD,sBACA,qBAAqBkH,QAAQnD,MAAM,OAAO,GAAGsD,gBAAgBtD,MAAM,SAAS,EAAE8C,OAC/E;YACC,CAACZ,KAAK,UAAU,gCAAgC;cAC9C,CAACiB,QAAQnD,MAAM,OAAO,GAAGsD,gBAAgBtD,MAAM,SAAS,EAAE8C,MAAM;YAClE,EAAEZ,KAAK;UACT,EAAE5C,KAAK;QACT,EAAEA,KAAK;MACT,EAAEA,KAAK;IACT,EAAEA;AAEN"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type G9ConfirmTiming, type G9JourneySource } from '@g9tm/lynxcontrols-foundation';
|
|
2
|
+
/** The guide's words (the app gives them in the person's language; defaults are English). */
|
|
3
|
+
export interface G9GuideTexts {
|
|
4
|
+
readonly next: string;
|
|
5
|
+
readonly done: string;
|
|
6
|
+
readonly skip: string;
|
|
7
|
+
readonly endGuide: string;
|
|
8
|
+
readonly cancel: string;
|
|
9
|
+
/** The confirm button while counting down: `{0}` = seconds left. */
|
|
10
|
+
readonly confirmIn: string;
|
|
11
|
+
readonly confirm: string;
|
|
12
|
+
readonly changesTitle: string;
|
|
13
|
+
/** Who asked for the change, by journey source. */
|
|
14
|
+
readonly sources: Readonly<Record<G9JourneySource, string>>;
|
|
15
|
+
/** A change line's verb, by action. */
|
|
16
|
+
readonly actions: Readonly<Record<'create' | 'update' | 'delete' | 'send' | 'other', string>>;
|
|
17
|
+
/** Shown when a place could not say what will change. */
|
|
18
|
+
readonly undescribed: string;
|
|
19
|
+
/** Added to a link's confirmation. */
|
|
20
|
+
readonly linkWarning: string;
|
|
21
|
+
}
|
|
22
|
+
/** App-wide guide settings (`G9Settings.guide`). */
|
|
23
|
+
/** The guide's words an app supplies (any subset). */
|
|
24
|
+
export type G9GuideTextOverrides = Partial<Omit<G9GuideTexts, 'sources' | 'actions'>> & {
|
|
25
|
+
readonly sources?: Partial<G9GuideTexts['sources']>;
|
|
26
|
+
readonly actions?: Partial<G9GuideTexts['actions']>;
|
|
27
|
+
};
|
|
28
|
+
/** App-wide guide settings (`G9Settings.guide`): words, countdowns, tracking and typing speed. */
|
|
29
|
+
export interface G9GuideSettings {
|
|
30
|
+
/** The words, or a function read at every render (so a language switch shows at once). */
|
|
31
|
+
readonly texts?: G9GuideTextOverrides | (() => G9GuideTextOverrides);
|
|
32
|
+
/** Countdown lengths of the guided-save confirmation. */
|
|
33
|
+
readonly confirm?: Partial<G9ConfirmTiming>;
|
|
34
|
+
/** How often a shown mark re-measures its target while nothing else told it to (ms). Default 250. */
|
|
35
|
+
readonly trackMs?: number;
|
|
36
|
+
/** Per character of a value the guide types in front of the person (ms). Default 30, capped at 1200 per field. */
|
|
37
|
+
readonly typeMsPerChar?: number;
|
|
38
|
+
}
|
|
39
|
+
/** The guide settings with every default filled in. */
|
|
40
|
+
export interface G9ResolvedGuideSettings {
|
|
41
|
+
readonly texts: G9GuideTexts;
|
|
42
|
+
readonly confirm: G9ConfirmTiming;
|
|
43
|
+
readonly trackMs: number;
|
|
44
|
+
readonly typeMsPerChar: number;
|
|
45
|
+
}
|
|
46
|
+
/** The guide settings with their defaults. */
|
|
47
|
+
export declare function resolveGuideSettings(s: G9GuideSettings | undefined): G9ResolvedGuideSettings;
|
|
48
|
+
/** `{0}` replaced. */
|
|
49
|
+
export declare function formatGuideText(template: string, value: string | number): string;
|
|
50
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/guide/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAA2B,MAAM,+BAA+B,CAAC;AAEpH,6FAA6F;AAC7F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5D,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9F,yDAAyD;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,sCAAsC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,oDAAoD;AACpD,sDAAsD;AACtD,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC,GAAG;IACtF,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;CACrD,CAAC;AAEF,kGAAkG;AAClG,MAAM,WAAW,eAAe;IAC9B,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,CAAC,MAAM,oBAAoB,CAAC,CAAC;IACrE,yDAAyD;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C,qGAAqG;IACrG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,kHAAkH;IAClH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,uDAAuD;AACvD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAuBD,8CAA8C;AAC9C,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,eAAe,GAAG,SAAS,GAAG,uBAAuB,CAiB5F;AAED,sBAAsB;AACtB,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAEhF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { g9ConfirmTimingDefaults } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
const ENGLISH = {
|
|
3
|
+
next: 'Next',
|
|
4
|
+
done: 'Done',
|
|
5
|
+
skip: 'Skip',
|
|
6
|
+
endGuide: 'End guide',
|
|
7
|
+
cancel: 'Cancel',
|
|
8
|
+
confirmIn: 'Confirm ({0})',
|
|
9
|
+
confirm: 'Confirm',
|
|
10
|
+
changesTitle: 'What will change',
|
|
11
|
+
sources: {
|
|
12
|
+
bundled: 'The app’s guide',
|
|
13
|
+
assistant: 'The assistant',
|
|
14
|
+
link: 'A link from outside the app',
|
|
15
|
+
tester: 'A test',
|
|
16
|
+
qa: 'Automation'
|
|
17
|
+
},
|
|
18
|
+
actions: {
|
|
19
|
+
create: 'New',
|
|
20
|
+
update: 'Change',
|
|
21
|
+
delete: 'Delete',
|
|
22
|
+
send: 'Send',
|
|
23
|
+
other: 'Other'
|
|
24
|
+
},
|
|
25
|
+
undescribed: 'The changes of this form will be saved.',
|
|
26
|
+
linkWarning: 'This request came from outside the app. Confirm only if you expected it.'
|
|
27
|
+
};
|
|
28
|
+
function resolveGuideSettings(s) {
|
|
29
|
+
const source = null == s ? void 0 : s.texts;
|
|
30
|
+
const merge = (t)=>({
|
|
31
|
+
...ENGLISH,
|
|
32
|
+
...t,
|
|
33
|
+
sources: {
|
|
34
|
+
...ENGLISH.sources,
|
|
35
|
+
...t.sources
|
|
36
|
+
},
|
|
37
|
+
actions: {
|
|
38
|
+
...ENGLISH.actions,
|
|
39
|
+
...t.actions
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const fixed = 'function' == typeof source ? null : merge(null != source ? source : {});
|
|
43
|
+
return {
|
|
44
|
+
get texts () {
|
|
45
|
+
return null != fixed ? fixed : merge(source());
|
|
46
|
+
},
|
|
47
|
+
confirm: {
|
|
48
|
+
...g9ConfirmTimingDefaults,
|
|
49
|
+
...null == s ? void 0 : s.confirm
|
|
50
|
+
},
|
|
51
|
+
trackMs: (null == s ? void 0 : s.trackMs) && s.trackMs > 0 ? s.trackMs : 250,
|
|
52
|
+
typeMsPerChar: (null == s ? void 0 : s.typeMsPerChar) !== void 0 && s.typeMsPerChar >= 0 ? s.typeMsPerChar : 30
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function formatGuideText(template, value) {
|
|
56
|
+
return template.split('{0}').join(String(value));
|
|
57
|
+
}
|
|
58
|
+
export { formatGuideText, resolveGuideSettings };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=settings.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide/settings.jsx","sources":["../../src/guide/settings.ts"],"sourcesContent":["import { type G9ConfirmTiming, type G9JourneySource, g9ConfirmTimingDefaults } from '@g9tm/lynxcontrols-foundation';\n\n/** The guide's words (the app gives them in the person's language; defaults are English). */\nexport interface G9GuideTexts {\n readonly next: string;\n readonly done: string;\n readonly skip: string;\n readonly endGuide: string;\n readonly cancel: string;\n /** The confirm button while counting down: `{0}` = seconds left. */\n readonly confirmIn: string;\n readonly confirm: string;\n readonly changesTitle: string;\n /** Who asked for the change, by journey source. */\n readonly sources: Readonly<Record<G9JourneySource, string>>;\n /** A change line's verb, by action. */\n readonly actions: Readonly<Record<'create' | 'update' | 'delete' | 'send' | 'other', string>>;\n /** Shown when a place could not say what will change. */\n readonly undescribed: string;\n /** Added to a link's confirmation. */\n readonly linkWarning: string;\n}\n\n/** App-wide guide settings (`G9Settings.guide`). */\n/** The guide's words an app supplies (any subset). */\nexport type G9GuideTextOverrides = Partial<Omit<G9GuideTexts, 'sources' | 'actions'>> & {\n readonly sources?: Partial<G9GuideTexts['sources']>;\n readonly actions?: Partial<G9GuideTexts['actions']>;\n};\n\n/** App-wide guide settings (`G9Settings.guide`): words, countdowns, tracking and typing speed. */\nexport interface G9GuideSettings {\n /** The words, or a function read at every render (so a language switch shows at once). */\n readonly texts?: G9GuideTextOverrides | (() => G9GuideTextOverrides);\n /** Countdown lengths of the guided-save confirmation. */\n readonly confirm?: Partial<G9ConfirmTiming>;\n /** How often a shown mark re-measures its target while nothing else told it to (ms). Default 250. */\n readonly trackMs?: number;\n /** Per character of a value the guide types in front of the person (ms). Default 30, capped at 1200 per field. */\n readonly typeMsPerChar?: number;\n}\n\n/** The guide settings with every default filled in. */\nexport interface G9ResolvedGuideSettings {\n readonly texts: G9GuideTexts;\n readonly confirm: G9ConfirmTiming;\n readonly trackMs: number;\n readonly typeMsPerChar: number;\n}\n\nconst ENGLISH: G9GuideTexts = {\n next: 'Next',\n done: 'Done',\n skip: 'Skip',\n endGuide: 'End guide',\n cancel: 'Cancel',\n confirmIn: 'Confirm ({0})',\n confirm: 'Confirm',\n changesTitle: 'What will change',\n sources: {\n bundled: 'The app’s guide',\n assistant: 'The assistant',\n link: 'A link from outside the app',\n tester: 'A test',\n qa: 'Automation',\n },\n actions: { create: 'New', update: 'Change', delete: 'Delete', send: 'Send', other: 'Other' },\n undescribed: 'The changes of this form will be saved.',\n linkWarning: 'This request came from outside the app. Confirm only if you expected it.',\n};\n\n/** The guide settings with their defaults. */\nexport function resolveGuideSettings(s: G9GuideSettings | undefined): G9ResolvedGuideSettings {\n const source = s?.texts;\n const merge = (t: G9GuideTextOverrides): G9GuideTexts => ({\n ...ENGLISH,\n ...t,\n sources: { ...ENGLISH.sources, ...t.sources },\n actions: { ...ENGLISH.actions, ...t.actions },\n });\n const fixed = typeof source === 'function' ? null : merge(source ?? {});\n return {\n get texts() {\n return fixed ?? merge((source as () => G9GuideTextOverrides)());\n },\n confirm: { ...g9ConfirmTimingDefaults, ...s?.confirm },\n trackMs: s?.trackMs && s.trackMs > 0 ? s.trackMs : 250,\n typeMsPerChar: s?.typeMsPerChar !== undefined && s.typeMsPerChar >= 0 ? s.typeMsPerChar : 30,\n };\n}\n\n/** `{0}` replaced. */\nexport function formatGuideText(template: string, value: string | number): string {\n return template.split('{0}').join(String(value));\n}\n"],"names":["ENGLISH","resolveGuideSettings","s","source","merge","t","fixed","g9ConfirmTimingDefaults","undefined","formatGuideText","template","value","String"],"mappings":";AAkDA,MAAMA,UAAwB;IAC5B,MAAM;IACN,MAAM;IACN,MAAM;IACN,UAAU;IACV,QAAQ;IACR,WAAW;IACX,SAAS;IACT,cAAc;IACd,SAAS;QACP,SAAS;QACT,WAAW;QACX,MAAM;QACN,QAAQ;QACR,IAAI;IACN;IACA,SAAS;QAAE,QAAQ;QAAO,QAAQ;QAAU,QAAQ;QAAU,MAAM;QAAQ,OAAO;IAAQ;IAC3F,aAAa;IACb,aAAa;AACf;AAGO,SAASC,qBAAqBC,CAA8B;IACjE,MAAMC,SAASD,QAAAA,IAAAA,KAAAA,IAAAA,EAAG,KAAK;IACvB,MAAME,QAAQ,CAACC,IAA2C;YACxD,GAAGL,OAAO;YACV,GAAGK,CAAC;YACJ,SAAS;gBAAE,GAAGL,QAAQ,OAAO;gBAAE,GAAGK,EAAE,OAAO;YAAC;YAC5C,SAAS;gBAAE,GAAGL,QAAQ,OAAO;gBAAE,GAAGK,EAAE,OAAO;YAAC;QAC9C;IACA,MAAMC,QAAQ,AAAkB,cAAlB,OAAOH,SAAwB,OAAOC,MAAMD,QAAAA,SAAAA,SAAU,CAAC;IACrE,OAAO;QACL,IAAI;YACF,OAAOG,QAAAA,QAAAA,QAASF,MAAOD;QACzB;QACA,SAAS;YAAE,GAAGI,uBAAuB;eAAKL,QAAAA,IAAAA,KAAAA,IAAAA,EAAG,OAAN;QAAc;QACrD,SAASA,AAAAA,CAAAA,QAAAA,IAAAA,KAAAA,IAAAA,EAAG,OAAO,AAAD,KAAKA,EAAE,OAAO,GAAG,IAAIA,EAAE,OAAO,GAAG;QACnD,eAAeA,AAAAA,CAAAA,QAAAA,IAAAA,KAAAA,IAAAA,EAAG,aAAa,AAAD,MAAMM,UAAaN,EAAE,aAAa,IAAI,IAAIA,EAAE,aAAa,GAAG;IAC5F;AACF;AAGO,SAASO,gBAAgBC,QAAgB,EAAEC,KAAsB;IACtE,OAAOD,SAAS,KAAK,CAAC,OAAO,IAAI,CAACE,OAAOD;AAC3C"}
|
package/dist/host/host.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type G9AbortSignal } from '@g9tm/lynxcontrols-foundation';
|
|
1
|
+
import { type G9AbortSignal, type G9SegmentInput } from '@g9tm/lynxcontrols-foundation';
|
|
2
2
|
import { type ReactNode } from '@lynx-js/react';
|
|
3
3
|
import { type G9BackResult } from './back.js';
|
|
4
4
|
import { type G9OverlayLayer } from './layers.js';
|
|
@@ -50,6 +50,10 @@ export interface G9HostProps {
|
|
|
50
50
|
/** The colour behind the content, shown when a sheet recedes the page (MAUI `BackdropHost`). Default black. */
|
|
51
51
|
readonly backdropColor?: string;
|
|
52
52
|
readonly className?: string;
|
|
53
|
+
/** The page's place in the navigation (`@g9tm/lynxcontrols/route`), declared while the host is active. */
|
|
54
|
+
readonly route?: G9SegmentInput;
|
|
55
|
+
/** How the router leaves the page (pop it). Without it the router cannot close the page. */
|
|
56
|
+
readonly routeClose?: () => void;
|
|
53
57
|
}
|
|
54
58
|
/** The nearest host, for hooks. */
|
|
55
59
|
export declare const G9HostContext: import("react").Context<G9HostHandle | null>;
|
package/dist/host/host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/host/host.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/host/host.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAW,KAAK,cAAc,EAAQ,MAAM,+BAA+B,CAAC;AAEvG,OAAO,EAIL,KAAK,SAAS,EAOf,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAuC,KAAK,cAAc,EAAgB,MAAM,UAAU,CAAC;AAElG,OAAO,EAAuB,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,EAA4B,KAAK,YAAY,EAAE,KAAK,YAAY,EAAgB,MAAM,YAAY,CAAC;AAC1G,OAAO,YAAY,CAAC;AAEpB,oHAAoH;AACpH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAAC;AAElD,+BAA+B;AAC/B,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,C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AC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,0GAA0G;IAC1G,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAChC,4FAA4F;IAC5F,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,mCAAmC;AACnC,eAAO,MAAM,aAAa,8CAA2C,CAAC;AACtE,iCAAiC;AACjC,eAAO,MAAM,mBAAmB,8CAA2C,CAAC;AAC5E,+CAA+C;AAC/C,eAAO,MAAM,sBAAsB,2DAAwD,CAAC;AA+B5F;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAyNpD"}
|
package/dist/host/host.jsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Fragment, createContext, memo, useContext, useEffect, useMemo, useRef,
|
|
|
4
4
|
import { useStableCallback } from "../base/use-stable-callback.jsx";
|
|
5
5
|
import { G9KeyboardContext } from "../provider/contexts.jsx";
|
|
6
6
|
import { useG9Core, useG9SafeInsets, useG9Settings } from "../provider/hooks.jsx";
|
|
7
|
+
import { useG9Place } from "../route/hooks.jsx";
|
|
7
8
|
import { createBackStack } from "./back.jsx";
|
|
8
9
|
import { isKeyboardTarget } from "./keyboard.jsx";
|
|
9
10
|
import { createLayerStore, g9LayerOrder } from "./layers.jsx";
|
|
@@ -35,6 +36,16 @@ function G9Host(props) {
|
|
|
35
36
|
const keyboard = useContext(G9KeyboardContext);
|
|
36
37
|
const providerInsets = useG9SafeInsets();
|
|
37
38
|
const active = null != (_props_active = props.active) ? _props_active : true;
|
|
39
|
+
const routeClose = props.routeClose;
|
|
40
|
+
useG9Place(props.route ? {
|
|
41
|
+
segment: props.route,
|
|
42
|
+
layer: 'page',
|
|
43
|
+
...routeClose ? {
|
|
44
|
+
close: ()=>routeClose()
|
|
45
|
+
} : {}
|
|
46
|
+
} : null, {
|
|
47
|
+
active
|
|
48
|
+
});
|
|
38
49
|
const name = null != (_props_name = props.name) ? _props_name : 'G9Host';
|
|
39
50
|
const latest = useRef(props);
|
|
40
51
|
latest.current = props;
|
|
@@ -93,6 +104,7 @@ function G9Host(props) {
|
|
|
93
104
|
id,
|
|
94
105
|
parent,
|
|
95
106
|
services: core.services,
|
|
107
|
+
anchors: core.anchors,
|
|
96
108
|
layers,
|
|
97
109
|
registerLayerItem (layer, item) {
|
|
98
110
|
if (released) return ()=>{};
|
package/dist/host/host.jsx.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host/host.jsx","sources":["../../src/host/host.tsx"],"sourcesContent":["import { type G9AbortSignal, G9Error, g9Ms } from '@g9tm/lynxcontrols-foundation';\nimport { OverlayView } from '@lynx-js/lynx-ui-overlay';\nimport {\n createContext,\n Fragment,\n memo,\n type ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n useSyncExternalStore,\n} from '@lynx-js/react';\nimport { useStableCallback } from '../base/use-stable-callback';\nimport { G9KeyboardContext } from '../provider/contexts';\nimport { useG9Core, useG9SafeInsets, useG9Settings } from '../provider/hooks';\nimport { createBackStack, type G9BackResult } from './back';\nimport { isKeyboardTarget } from './keyboard';\nimport { createLayerStore, type G9LayerStore, type G9OverlayLayer, g9LayerOrder } from './layers';\nimport { G9PageLoadingOverlay } from './page-loading-overlay';\nimport { createHostReadiness, type G9HostReadinessController } from './readiness';\nimport { type G9HostContentEffect, type G9HostHandle, type G9HostInsets, hostRegistry } from './registry';\nimport './host.css';\n\n/** How a layer is mounted: in the page tree (default) or in a Lynx `<overlay>` above native views (maps, video). */\nexport type G9LayerContainer = 'tree' | 'overlay';\n\n/** Props of {@link G9Host}. */\nexport interface G9HostProps {\n readonly children?: ReactNode;\n /**\n * Whether the page is on screen (MAUI `Loaded`/`Unloaded`, tab activation). Default `true`. An inactive host stays\n * registered and becomes active again when set back to `true`; see `g9Hosts` for the resolution rule.\n */\n readonly active?: boolean;\n /** Names the page in diagnostics (the cover's busy activity is `page:<name>`). Default `'G9Host'`. */\n readonly name?: string;\n /**\n * The page's appearing work (MAUI `OnAppearingAfterParentAsync`), run through the provider's safe executor each time\n * the host becomes active; `signal` aborts when it stops being active or unmounts. On the first appearance the\n * loading cover waits for it (unless `manualRelease`).\n */\n readonly onAppearing?: (context: { readonly signal: G9AbortSignal }) => void | Promise<void>;\n /** Runs each time the host stops being active (MAUI `OnDisappearingAfterParentAsync`), guarded. */\n readonly onDisappearing?: () => void | Promise<void>;\n /** The page's own back handling (MAUI `TryHandleInAppBack`), asked after every overlay. */\n readonly onBack?: () => G9BackResult | boolean;\n /** Swallow every system back press before anything else runs (MAUI `IsHardwareBackSuppressed`). Default `false`. */\n readonly backSuppressed?: boolean;\n /** Show the page-loading cover until the page is ready (MAUI `G9PageLoadingOverlay`, always on). Default `true`. */\n readonly loadingCover?: boolean;\n /** The page releases the cover itself through `useG9HostReady().release()` (MAUI `PageLoadingManualRelease`). */\n readonly manualRelease?: boolean;\n /** Extra delay after ready (MAUI `PageLoadingDismissDelayMs`). Default `settings.pageLoading.dismissDelayMs` (369). */\n readonly dismissDelayMs?: number;\n /** Hard cap on the cover (MAUI `PageLoadingSafetyTimeoutMs`). Default `settings.pageLoading.safetyTimeoutMs` (5000). */\n readonly safetyTimeoutMs?: number;\n /** Dismiss the soft keyboard on a tap outside any keyboard target (MAUI `TapOutsideKeyboardDismisser`). Default `true`. */\n readonly dismissKeyboardOnTapOutside?: boolean;\n /** Per-layer container; a layer over a native view (map, video) needs `'overlay'`. Default `'tree'` for each. */\n readonly layerContainers?: Partial<Record<G9OverlayLayer, G9LayerContainer>>;\n /** MAUI `ComputeBottomSafeAreaWithTabBar`: the bottom inset plus the page's own tab bar. Default: the inset. */\n readonly computeBottomSafeAreaWithTabBar?: (bottomInset: number) => number;\n /** The page background (MAUI `ApplyThemedBackground`). Default `var(--g9-background)`. */\n readonly background?: string;\n /** The colour behind the content, shown when a sheet recedes the page (MAUI `BackdropHost`). Default black. */\n readonly backdropColor?: string;\n readonly className?: string;\n}\n\n/** The nearest host, for hooks. */\nexport const G9HostContext = createContext<G9HostHandle | null>(null);\n/** The nearest host's insets. */\nexport const G9HostInsetsContext = createContext<G9HostInsets | null>(null);\n/** The nearest host's readiness controller. */\nexport const G9HostReadinessContext = createContext<G9HostReadinessController | null>(null);\n\nconst OVERLAY_LAYERS = g9LayerOrder.filter((layer): layer is G9OverlayLayer => layer !== 'content');\nlet hostSequence = 0;\n\n// The inner name must differ from the binding: rslib renames `const X = memo(function X…)` with a module prefix and the\n// in-module `<X>` then compiles as an unknown intrinsic element (E20; scripts/check-dist-jsx.mjs).\nconst HostLayer = memo(function HostLayerRender(props: {\n readonly hostId: string;\n readonly store: G9LayerStore;\n readonly layer: G9OverlayLayer;\n readonly container: G9LayerContainer;\n}): ReactNode {\n const { hostId, store, layer, container } = props;\n const entries = useSyncExternalStore(\n (listener) => store.subscribe(layer, listener),\n () => store.getSnapshot(layer),\n );\n if (entries.length === 0) return null;\n const className = `g9-host__layer g9-host__layer--${layer}`;\n const items = entries.map((entry) => <Fragment key={entry.key}>{entry.element}</Fragment>);\n if (container === 'overlay') {\n return (\n <OverlayView container=\"window\" className={className} id={`${hostId}-${layer}`}>\n {items}\n </OverlayView>\n );\n }\n return <view className={className}>{items}</view>;\n});\n\n/**\n * The page frame (MAUI `G9PageBase` + `G9PageTemplate`): the content and the overlay layers in a fixed z-order\n * (`content` → `edgePanel` → `sheets` → `popups` → `feedback` → `floating`, then the loading cover), the page's back\n * stack, readiness and loading cover, safe-area insets, tap-outside keyboard dismissal, and its registration in\n * `g9Hosts` for code outside the tree. One per page; hosts may nest. Must be inside `G9Provider`.\n *\n * Layers are input-transparent (`pointer-events: none`), so empty areas pass touches to the layers below; each item\n * receives its own touches only when its root sets `pointer-events: auto` — Lynx inherits pointer-events, so an item\n * without it is transparent as well. An empty layer renders nothing.\n */\nexport function G9Host(props: G9HostProps): ReactNode {\n const core = useG9Core();\n const settings = useG9Settings();\n const parent = useContext(G9HostContext);\n const keyboard = useContext(G9KeyboardContext);\n const providerInsets = useG9SafeInsets();\n const active = props.active ?? true;\n const name = props.name ?? 'G9Host';\n\n const latest = useRef(props);\n latest.current = props;\n\n const bottomWithTabBar = props.computeBottomSafeAreaWithTabBar\n ? props.computeBottomSafeAreaWithTabBar(providerInsets.bottom)\n : providerInsets.bottom;\n const insets = useMemo<G9HostInsets>(\n () => Object.freeze({ ...providerInsets, bottomWithTabBar }),\n [providerInsets, bottomWithTabBar],\n );\n const insetsRef = useRef(insets);\n insetsRef.current = insets;\n\n const [state] = useState(() => {\n hostSequence += 1;\n const id = `g9-host-${hostSequence}`;\n const layers = createLayerStore();\n const back = createBackStack({\n isSuppressed: () => latest.current.backSuppressed === true,\n onHandlerError: (error) =>\n core.diagnostics.log({ level: 'error', message: 'A back handler threw.', source: name, error }),\n });\n const features = new Map<string, unknown>();\n let released = false;\n let contentEffect: G9HostContentEffect | null = null;\n const effectListeners = new Set<() => void>();\n const readiness = createHostReadiness({\n cover: props.loadingCover ?? true,\n manualRelease: props.manualRelease ?? false,\n dismissDelayMs: props.dismissDelayMs ?? settings.pageLoading.dismissDelayMs,\n safetyTimeoutMs: props.safetyTimeoutMs ?? settings.pageLoading.safetyTimeoutMs,\n startActivity: () => {\n const scope = core.diagnostics.activity(`page:${name}`);\n return () => scope.dispose();\n },\n runAppearing: async (signal) => {\n const onAppearing = latest.current.onAppearing;\n if (!onAppearing) return;\n await core.executor.run((context) => onAppearing({ signal: context.signal }), {\n source: name,\n throttleKey: `${id}.onAppearing`,\n enableThrottle: false,\n preventConcurrentExecution: false,\n signal,\n });\n },\n });\n const handle: G9HostHandle = {\n id,\n parent,\n services: core.services,\n layers,\n registerLayerItem(layer, item) {\n if (released) return () => {};\n return layers.register(layer, item);\n },\n removeLayerItem: (layer, key) => layers.remove(layer, key),\n back,\n getInsets: () => insetsRef.current,\n readiness,\n attachFeature(key, value) {\n if (features.has(key)) throw new G9Error('host-feature', `Host feature '${String(key)}' is already attached.`);\n features.set(key, value);\n return () => {\n if (features.get(key) === value) features.delete(key);\n };\n },\n getFeature: (key) => features.get(key) as never,\n get released() {\n return released;\n },\n setContentEffect(effect) {\n if (released || contentEffect === effect) return;\n contentEffect = effect;\n for (const listener of [...effectListeners]) listener();\n },\n getContentEffect: () => contentEffect,\n };\n const effectStore = {\n subscribe(listener: () => void) {\n effectListeners.add(listener);\n return () => {\n effectListeners.delete(listener);\n };\n },\n getSnapshot: () => contentEffect,\n };\n return {\n handle,\n readiness,\n effectStore,\n release() {\n released = true;\n features.clear();\n },\n };\n });\n const { handle, readiness, effectStore } = state;\n\n // Unmount: synchronous unregistration and release of everything the host owns.\n useEffect(\n () => () => {\n hostRegistry.remove(handle);\n readiness.dispose();\n handle.layers.clear();\n handle.back.clear();\n state.release();\n },\n [handle, readiness, state],\n );\n\n // Visibility drives the registry and the appearing/disappearing lifecycle.\n const wasActive = useRef<boolean | null>(null);\n useEffect(() => {\n const previous = wasActive.current;\n wasActive.current = active;\n if (active) {\n hostRegistry.activate(handle);\n readiness.appear();\n return;\n }\n if (previous === null) {\n hostRegistry.register(handle);\n return;\n }\n hostRegistry.markOffScreen(handle);\n readiness.disappear();\n const onDisappearing = latest.current.onDisappearing;\n if (onDisappearing) {\n core.executor.runSafe(() => onDisappearing(), {\n source: name,\n throttleKey: `${handle.id}.onDisappearing`,\n enableThrottle: false,\n preventConcurrentExecution: false,\n });\n }\n }, [active, handle, readiness, core, name]);\n\n // The page's own back handling sits in the content layer, below every overlay.\n const hasOnBack = props.onBack !== undefined;\n useEffect(\n () => (hasOnBack ? handle.back.push(() => latest.current.onBack?.() ?? 'pass') : undefined),\n [hasOnBack, handle],\n );\n\n const keyboardVisible = useRef(false);\n keyboardVisible.current = keyboard?.visible === true;\n const onCaptureTap = useStableCallback((event: { target?: { dataset?: Record<string, unknown> } }) => {\n if (!keyboardVisible.current || isKeyboardTarget(event.target)) return;\n core.services.host.hideKeyboard();\n });\n\n const cover = useSyncExternalStore(readiness.subscribe, readiness.getSnapshot).cover;\n const effect = useSyncExternalStore(effectStore.subscribe, effectStore.getSnapshot);\n const containers = props.layerContainers ?? {};\n const tapOutside = props.dismissKeyboardOnTapOutside ?? true;\n\n return (\n <G9HostContext.Provider value={handle}>\n <G9HostInsetsContext.Provider value={insets}>\n <G9HostReadinessContext.Provider value={readiness}>\n <view\n className={`g9-host${props.className ? ` ${props.className}` : ''}`}\n {...(tapOutside ? { 'capture-bindtap': onCaptureTap } : {})}\n >\n <view\n className=\"g9-host__backdrop\"\n style={{ backgroundColor: effect?.backdropColor ?? props.backdropColor ?? '#000000' }}\n />\n <view\n className=\"g9-host__content\"\n style={{\n backgroundColor: props.background ?? 'var(--g9-background)',\n transform: effect\n ? `translateY(${effect.translateY}px) scale(${effect.scale})`\n : 'translateY(0px) scale(1)',\n transition: `transform ${g9Ms(effect?.durationMs ?? 300)}ms ease-out`,\n }}\n >\n {props.children}\n </view>\n {OVERLAY_LAYERS.map((layer) => (\n <HostLayer\n key={layer}\n hostId={handle.id}\n store={handle.layers}\n layer={layer}\n container={containers[layer] ?? 'tree'}\n />\n ))}\n {cover === 'hidden' ? null : (\n <G9PageLoadingOverlay\n exiting={cover === 'exiting'}\n backgroundColor={settings.pageLoading.backgroundColor}\n spinnerColor={settings.pageLoading.spinnerColor}\n />\n )}\n </view>\n </G9HostReadinessContext.Provider>\n </G9HostInsetsContext.Provider>\n </G9HostContext.Provider>\n );\n}\n"],"names":["G9HostContext","createContext","G9HostInsetsContext","G9HostReadinessContext","OVERLAY_LAYERS","g9LayerOrder","layer","hostSequence","HostLayer","memo","props","hostId","store","container","entries","useSyncExternalStore","listener","className","items","entry","Fragment","OverlayView","view","G9Host","_props_active","_props_name","_props_layerContainers","_props_dismissKeyboardOnTapOutside","_ref","_props_background","core","useG9Core","settings","useG9Settings","parent","useContext","keyboard","G9KeyboardContext","providerInsets","useG9SafeInsets","active","name","latest","useRef","bottomWithTabBar","insets","useMemo","Object","insetsRef","state","useState","_props_loadingCover","_props_manualRelease","_props_dismissDelayMs","_props_safetyTimeoutMs","id","layers","createLayerStore","back","createBackStack","error","features","Map","released","contentEffect","effectListeners","Set","readiness","createHostReadiness","scope","signal","onAppearing","context","handle","item","key","value","G9Error","String","effect","effectStore","useEffect","hostRegistry","wasActive","previous","onDisappearing","hasOnBack","undefined","_latest_current","keyboardVisible","onCaptureTap","useStableCallback","event","isKeyboardTarget","cover","containers","tapOutside","g9Ms","_containers_layer","G9PageLoadingOverlay"],"mappings":";;;;;;;;;;;;;AAwEO,MAAMA,gBAAgBC,cAAmC;AAEzD,MAAMC,sBAAsBD,cAAmC;AAE/D,MAAME,yBAAyBF,cAAgD;AAEtF,MAAMG,iBAAiBC,aAAa,MAAM,CAAC,CAACC,QAAmCA,AAAU,cAAVA;AAC/E,IAAIC,eAAe;AAInB,MAAMC,YAAYC,KAAK,SAAyBC,KAK/C;IACC,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAEN,KAAK,EAAEO,SAAS,EAAE,GAAGH;IAC5C,MAAMI,UAAUC,qBACd,CAACC,WAAaJ,MAAM,SAAS,CAACN,OAAOU,WACrC,IAAMJ,MAAM,WAAW,CAACN;IAE1B,IAAIQ,AAAmB,MAAnBA,QAAQ,MAAM,EAAQ,OAAO;IACjC,MAAMG,YAAY,CAAC,+BAA+B,EAAEX,OAAO;IAC3D,MAAMY,QAAQJ,QAAQ,GAAG,CAAC,CAACK,SAAWC,SAAS,KAAKD,MAAM,GAAG,GAAGA,MAAM,OAAO,GAAGC;IAChF,IAAIP,AAAc,cAAdA,WACF,QACGQ,YAAY,UAAU,SAAS,WAAWJ,WAAW,IAAI,GAAGN,OAAO,CAAC,EAAEL,OAAO,EAAE;QAC9E,CAACY,MAAM;MACT,EAAEG;IAGN,QAAQC,KAAK,WAAWL,YAAYC,QAAQI;AAC9C;AAYO,SAASC,OAAOb,KAAkB;QAMxBc,eACFC,aA4JMC,wBACAC,oCAYmBC,MAAAA,OAKPC,mBAAAA;IApL/B,MAAMC,OAAOC;IACb,M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I,CAAC,CAAC,EAC3D;YACC,CAACpE,KACC,UAAU,oBACV,OAAO;QAAE,iBAAiB,QAAAM,CAAAA,OAAAA,QAAAA,CAAAA,QAAAA,QAAAA,SAAAA,KAAAA,IAAAA,OAAQ,aAAa,AAAD,IAAC,QAAIlB,MAAM,aAAa,AAAD,IAA3CkB,OAAgD;IAAU,IACpF;YACF,CAACN,KACC,UAAU,mBACV,OAAO;QACL,iBAAiB,QAAAO,CAAAA,oBAAAA,MAAM,UAAU,AAAD,IAAfA,oBAAoB;QACrC,WAAWkD,SACP,CAAC,WAAW,EAAEA,OAAO,UAAU,CAAC,UAAU,EAAEA,OAAO,KAAK,CAAC,CAAC,CAAC,GAC3D;QACJ,YAAY,CAAC,UAAU,EAAEkB,KAAK,QAADA,CAAAA,QAAClB,QAAAA,SAAAA,KAAAA,IAAAA,OAAQ,UAAU,AAAD,IAAC,QAAI,KAAK,WAAW,CAAC;IACvE,GACD;cACC,CAACrE,MAAM,QAAQ,CAAC;YAClB,EAAEY,KAAK;YACP,CAAClB,eAAe,GAAG,CAAC,CAACE;YAMN4F;gBALZ1F,UACC,KAAKF,OACL,QAAQmE,OAAO,EAAE,EACjB,OAAOA,OAAO,MAAM,EACpB,OAAOnE,OACP,WAAW,QAAA4F,CAAAA,oBAAAA,UAAU,CAAC5F,MAAM,AAAD,IAAhB4F,oBAAqB;OAEjC;YACH,CAACJ,AAAU,aAAVA,QAAqB,QACnBK,qBACC,SAASL,AAAU,cAAVA,OACT,iBAAiB9D,SAAS,WAAW,CAAC,eAAe,EACrD,cAAcA,SAAS,WAAW,CAAC,YAAY,IAEjD;UACJ,EAAEV,KAAK;QACT,EAAEnB,uBAAuB,SAAS;MACpC,EAAED,oBAAoB,SAAS;IACjC,EAAEF,cAAc;AAEpB"}
|
|
1
|
+
{"version":3,"file":"host/host.jsx","sources":["../../src/host/host.tsx"],"sourcesContent":["import { type G9AbortSignal, G9Error, type G9SegmentInput, g9Ms } from '@g9tm/lynxcontrols-foundation';\nimport { OverlayView } from '@lynx-js/lynx-ui-overlay';\nimport {\n createContext,\n Fragment,\n memo,\n type ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n useSyncExternalStore,\n} from '@lynx-js/react';\nimport { useStableCallback } from '../base/use-stable-callback';\nimport { G9KeyboardContext } from '../provider/contexts';\nimport { useG9Core, useG9SafeInsets, useG9Settings } from '../provider/hooks';\nimport { useG9Place } from '../route/hooks';\nimport { createBackStack, type G9BackResult } from './back';\nimport { isKeyboardTarget } from './keyboard';\nimport { createLayerStore, type G9LayerStore, type G9OverlayLayer, g9LayerOrder } from './layers';\nimport { G9PageLoadingOverlay } from './page-loading-overlay';\nimport { createHostReadiness, type G9HostReadinessController } from './readiness';\nimport { type G9HostContentEffect, type G9HostHandle, type G9HostInsets, hostRegistry } from './registry';\nimport './host.css';\n\n/** How a layer is mounted: in the page tree (default) or in a Lynx `<overlay>` above native views (maps, video). */\nexport type G9LayerContainer = 'tree' | 'overlay';\n\n/** Props of {@link G9Host}. */\nexport interface G9HostProps {\n readonly children?: ReactNode;\n /**\n * Whether the page is on screen (MAUI `Loaded`/`Unloaded`, tab activation). Default `true`. An inactive host stays\n * registered and becomes active again when set back to `true`; see `g9Hosts` for the resolution rule.\n */\n readonly active?: boolean;\n /** Names the page in diagnostics (the cover's busy activity is `page:<name>`). Default `'G9Host'`. */\n readonly name?: string;\n /**\n * The page's appearing work (MAUI `OnAppearingAfterParentAsync`), run through the provider's safe executor each time\n * the host becomes active; `signal` aborts when it stops being active or unmounts. On the first appearance the\n * loading cover waits for it (unless `manualRelease`).\n */\n readonly onAppearing?: (context: { readonly signal: G9AbortSignal }) => void | Promise<void>;\n /** Runs each time the host stops being active (MAUI `OnDisappearingAfterParentAsync`), guarded. */\n readonly onDisappearing?: () => void | Promise<void>;\n /** The page's own back handling (MAUI `TryHandleInAppBack`), asked after every overlay. */\n readonly onBack?: () => G9BackResult | boolean;\n /** Swallow every system back press before anything else runs (MAUI `IsHardwareBackSuppressed`). Default `false`. */\n readonly backSuppressed?: boolean;\n /** Show the page-loading cover until the page is ready (MAUI `G9PageLoadingOverlay`, always on). Default `true`. */\n readonly loadingCover?: boolean;\n /** The page releases the cover itself through `useG9HostReady().release()` (MAUI `PageLoadingManualRelease`). */\n readonly manualRelease?: boolean;\n /** Extra delay after ready (MAUI `PageLoadingDismissDelayMs`). Default `settings.pageLoading.dismissDelayMs` (369). */\n readonly dismissDelayMs?: number;\n /** Hard cap on the cover (MAUI `PageLoadingSafetyTimeoutMs`). Default `settings.pageLoading.safetyTimeoutMs` (5000). */\n readonly safetyTimeoutMs?: number;\n /** Dismiss the soft keyboard on a tap outside any keyboard target (MAUI `TapOutsideKeyboardDismisser`). Default `true`. */\n readonly dismissKeyboardOnTapOutside?: boolean;\n /** Per-layer container; a layer over a native view (map, video) needs `'overlay'`. Default `'tree'` for each. */\n readonly layerContainers?: Partial<Record<G9OverlayLayer, G9LayerContainer>>;\n /** MAUI `ComputeBottomSafeAreaWithTabBar`: the bottom inset plus the page's own tab bar. Default: the inset. */\n readonly computeBottomSafeAreaWithTabBar?: (bottomInset: number) => number;\n /** The page background (MAUI `ApplyThemedBackground`). Default `var(--g9-background)`. */\n readonly background?: string;\n /** The colour behind the content, shown when a sheet recedes the page (MAUI `BackdropHost`). Default black. */\n readonly backdropColor?: string;\n readonly className?: string;\n /** The page's place in the navigation (`@g9tm/lynxcontrols/route`), declared while the host is active. */\n readonly route?: G9SegmentInput;\n /** How the router leaves the page (pop it). Without it the router cannot close the page. */\n readonly routeClose?: () => void;\n}\n\n/** The nearest host, for hooks. */\nexport const G9HostContext = createContext<G9HostHandle | null>(null);\n/** The nearest host's insets. */\nexport const G9HostInsetsContext = createContext<G9HostInsets | null>(null);\n/** The nearest host's readiness controller. */\nexport const G9HostReadinessContext = createContext<G9HostReadinessController | null>(null);\n\nconst OVERLAY_LAYERS = g9LayerOrder.filter((layer): layer is G9OverlayLayer => layer !== 'content');\nlet hostSequence = 0;\n\n// The inner name must differ from the binding: rslib renames `const X = memo(function X…)` with a module prefix and the\n// in-module `<X>` then compiles as an unknown intrinsic element (E20; scripts/check-dist-jsx.mjs).\nconst HostLayer = memo(function HostLayerRender(props: {\n readonly hostId: string;\n readonly store: G9LayerStore;\n readonly layer: G9OverlayLayer;\n readonly container: G9LayerContainer;\n}): ReactNode {\n const { hostId, store, layer, container } = props;\n const entries = useSyncExternalStore(\n (listener) => store.subscribe(layer, listener),\n () => store.getSnapshot(layer),\n );\n if (entries.length === 0) return null;\n const className = `g9-host__layer g9-host__layer--${layer}`;\n const items = entries.map((entry) => <Fragment key={entry.key}>{entry.element}</Fragment>);\n if (container === 'overlay') {\n return (\n <OverlayView container=\"window\" className={className} id={`${hostId}-${layer}`}>\n {items}\n </OverlayView>\n );\n }\n return <view className={className}>{items}</view>;\n});\n\n/**\n * The page frame (MAUI `G9PageBase` + `G9PageTemplate`): the content and the overlay layers in a fixed z-order\n * (`content` → `edgePanel` → `sheets` → `popups` → `feedback` → `floating`, then the loading cover), the page's back\n * stack, readiness and loading cover, safe-area insets, tap-outside keyboard dismissal, and its registration in\n * `g9Hosts` for code outside the tree. One per page; hosts may nest. Must be inside `G9Provider`.\n *\n * Layers are input-transparent (`pointer-events: none`), so empty areas pass touches to the layers below; each item\n * receives its own touches only when its root sets `pointer-events: auto` — Lynx inherits pointer-events, so an item\n * without it is transparent as well. An empty layer renders nothing.\n */\nexport function G9Host(props: G9HostProps): ReactNode {\n const core = useG9Core();\n const settings = useG9Settings();\n const parent = useContext(G9HostContext);\n const keyboard = useContext(G9KeyboardContext);\n const providerInsets = useG9SafeInsets();\n const active = props.active ?? true;\n const routeClose = props.routeClose;\n useG9Place(\n props.route ? { segment: props.route, layer: 'page', ...(routeClose ? { close: () => routeClose() } : {}) } : null,\n { active },\n );\n const name = props.name ?? 'G9Host';\n\n const latest = useRef(props);\n latest.current = props;\n\n const bottomWithTabBar = props.computeBottomSafeAreaWithTabBar\n ? props.computeBottomSafeAreaWithTabBar(providerInsets.bottom)\n : providerInsets.bottom;\n const insets = useMemo<G9HostInsets>(\n () => Object.freeze({ ...providerInsets, bottomWithTabBar }),\n [providerInsets, bottomWithTabBar],\n );\n const insetsRef = useRef(insets);\n insetsRef.current = insets;\n\n const [state] = useState(() => {\n hostSequence += 1;\n const id = `g9-host-${hostSequence}`;\n const layers = createLayerStore();\n const back = createBackStack({\n isSuppressed: () => latest.current.backSuppressed === true,\n onHandlerError: (error) =>\n core.diagnostics.log({ level: 'error', message: 'A back handler threw.', source: name, error }),\n });\n const features = new Map<string, unknown>();\n let released = false;\n let contentEffect: G9HostContentEffect | null = null;\n const effectListeners = new Set<() => void>();\n const readiness = createHostReadiness({\n cover: props.loadingCover ?? true,\n manualRelease: props.manualRelease ?? false,\n dismissDelayMs: props.dismissDelayMs ?? settings.pageLoading.dismissDelayMs,\n safetyTimeoutMs: props.safetyTimeoutMs ?? settings.pageLoading.safetyTimeoutMs,\n startActivity: () => {\n const scope = core.diagnostics.activity(`page:${name}`);\n return () => scope.dispose();\n },\n runAppearing: async (signal) => {\n const onAppearing = latest.current.onAppearing;\n if (!onAppearing) return;\n await core.executor.run((context) => onAppearing({ signal: context.signal }), {\n source: name,\n throttleKey: `${id}.onAppearing`,\n enableThrottle: false,\n preventConcurrentExecution: false,\n signal,\n });\n },\n });\n const handle: G9HostHandle = {\n id,\n parent,\n services: core.services,\n anchors: core.anchors,\n layers,\n registerLayerItem(layer, item) {\n if (released) return () => {};\n return layers.register(layer, item);\n },\n removeLayerItem: (layer, key) => layers.remove(layer, key),\n back,\n getInsets: () => insetsRef.current,\n readiness,\n attachFeature(key, value) {\n if (features.has(key)) throw new G9Error('host-feature', `Host feature '${String(key)}' is already attached.`);\n features.set(key, value);\n return () => {\n if (features.get(key) === value) features.delete(key);\n };\n },\n getFeature: (key) => features.get(key) as never,\n get released() {\n return released;\n },\n setContentEffect(effect) {\n if (released || contentEffect === effect) return;\n contentEffect = effect;\n for (const listener of [...effectListeners]) listener();\n },\n getContentEffect: () => contentEffect,\n };\n const effectStore = {\n subscribe(listener: () => void) {\n effectListeners.add(listener);\n return () => {\n effectListeners.delete(listener);\n };\n },\n getSnapshot: () => contentEffect,\n };\n return {\n handle,\n readiness,\n effectStore,\n release() {\n released = true;\n features.clear();\n },\n };\n });\n const { handle, readiness, effectStore } = state;\n\n // Unmount: synchronous unregistration and release of everything the host owns.\n useEffect(\n () => () => {\n hostRegistry.remove(handle);\n readiness.dispose();\n handle.layers.clear();\n handle.back.clear();\n state.release();\n },\n [handle, readiness, state],\n );\n\n // Visibility drives the registry and the appearing/disappearing lifecycle.\n const wasActive = useRef<boolean | null>(null);\n useEffect(() => {\n const previous = wasActive.current;\n wasActive.current = active;\n if (active) {\n hostRegistry.activate(handle);\n readiness.appear();\n return;\n }\n if (previous === null) {\n hostRegistry.register(handle);\n return;\n }\n hostRegistry.markOffScreen(handle);\n readiness.disappear();\n const onDisappearing = latest.current.onDisappearing;\n if (onDisappearing) {\n core.executor.runSafe(() => onDisappearing(), {\n source: name,\n throttleKey: `${handle.id}.onDisappearing`,\n enableThrottle: false,\n preventConcurrentExecution: false,\n });\n }\n }, [active, handle, readiness, core, name]);\n\n // The page's own back handling sits in the content layer, below every overlay.\n const hasOnBack = props.onBack !== undefined;\n useEffect(\n () => (hasOnBack ? handle.back.push(() => latest.current.onBack?.() ?? 'pass') : undefined),\n [hasOnBack, handle],\n );\n\n const keyboardVisible = useRef(false);\n keyboardVisible.current = keyboard?.visible === true;\n const onCaptureTap = useStableCallback((event: { target?: { dataset?: Record<string, unknown> } }) => {\n if (!keyboardVisible.current || isKeyboardTarget(event.target)) return;\n core.services.host.hideKeyboard();\n });\n\n const cover = useSyncExternalStore(readiness.subscribe, readiness.getSnapshot).cover;\n const effect = useSyncExternalStore(effectStore.subscribe, effectStore.getSnapshot);\n const containers = props.layerContainers ?? {};\n const tapOutside = props.dismissKeyboardOnTapOutside ?? true;\n\n return (\n <G9HostContext.Provider value={handle}>\n <G9HostInsetsContext.Provider value={insets}>\n <G9HostReadinessContext.Provider value={readiness}>\n <view\n className={`g9-host${props.className ? ` ${props.className}` : ''}`}\n {...(tapOutside ? { 'capture-bindtap': onCaptureTap } : {})}\n >\n <view\n className=\"g9-host__backdrop\"\n style={{ backgroundColor: effect?.backdropColor ?? props.backdropColor ?? '#000000' }}\n />\n <view\n className=\"g9-host__content\"\n style={{\n backgroundColor: props.background ?? 'var(--g9-background)',\n transform: effect\n ? `translateY(${effect.translateY}px) scale(${effect.scale})`\n : 'translateY(0px) scale(1)',\n transition: `transform ${g9Ms(effect?.durationMs ?? 300)}ms ease-out`,\n }}\n >\n {props.children}\n </view>\n {OVERLAY_LAYERS.map((layer) => (\n <HostLayer\n key={layer}\n hostId={handle.id}\n store={handle.layers}\n layer={layer}\n container={containers[layer] ?? 'tree'}\n />\n ))}\n {cover === 'hidden' ? null : (\n <G9PageLoadingOverlay\n exiting={cover === 'exiting'}\n backgroundColor={settings.pageLoading.backgroundColor}\n spinnerColor={settings.pageLoading.spinnerColor}\n />\n )}\n </view>\n </G9HostReadinessContext.Provider>\n </G9HostInsetsContext.Provider>\n </G9HostContext.Provider>\n );\n}\n"],"names":["G9HostContext","createContext","G9HostInsetsContext","G9HostReadinessContext","OVERLAY_LAYERS","g9LayerOrder","layer","hostSequence","HostLayer","memo","props","hostId","store","container","entries","useSyncExternalStore","listener","className","items","entry","Fragment","OverlayView","view","G9Host","_props_active","_props_name","_props_layerContainers","_props_dismissKeyboardOnTapOutside","_ref","_props_background","core","useG9Core","settings","useG9Settings","parent","useContext","keyboard","G9KeyboardContext","providerInsets","useG9SafeInsets","active","routeClose","useG9Place","name","latest","useRef","bottomWithTabBar","insets","useMemo","Object","insetsRef","state","useState","_props_loadingCover","_props_manualRelease","_props_dismissDelayMs","_props_safetyTimeoutMs","id","layers","createLayerStore","back","createBackStack","error","features","Map","released","contentEffect","effectListeners","Set","readiness","createHostReadiness","scope","signal","onAppearing","context","handle","item","key","value","G9Error","String","effect","effectStore","useEffect","hostRegistry","wasActive","previous","onDisappearing","hasOnBack","undefined","_latest_current","keyboardVisible","onCaptureTap","useStableCallback","event","isKeyboardTarget","cover","containers","tapOutside","g9Ms","_containers_layer","G9PageLoadingOverlay"],"mappings":";;;;;;;;;;;;;;AA6EO,MAAMA,gBAAgBC,cAAmC;AAEzD,MAAMC,sBAAsBD,cAAmC;AAE/D,MAAME,yBAAyBF,cAAgD;AAEtF,MAAMG,iBAAiBC,aAAa,MAAM,CAAC,CAACC,QAAmCA,AAAU,cAAVA;AAC/E,IAAIC,eAAe;AAInB,MAAMC,YAAYC,KAAK,SAAyBC,KAK/C;IACC,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAEN,KAAK,EAAEO,SAAS,EAAE,GAAGH;IAC5C,MAAMI,UAAUC,qBACd,CAACC,WAAaJ,MAAM,SAAS,CAACN,OAAOU,WACrC,IAAMJ,MAAM,WAAW,CAACN;IAE1B,IAAIQ,AAAmB,MAAnBA,QAAQ,MAAM,EAAQ,OAAO;IACjC,MAAMG,YAAY,CAAC,+BAA+B,EAAEX,OAAO;IAC3D,MAAMY,QAAQJ,QAAQ,GAAG,CAAC,CAACK,SAAWC,SAAS,KAAKD,MAAM,GAAG,GAAGA,MAAM,OAAO,GAAGC;IAChF,IAAIP,AAAc,cAAdA,WACF,QACGQ,YAAY,UAAU,SAAS,WAAWJ,WAAW,IAAI,GAAGN,OAAO,CAAC,EAAEL,OAAO,EAAE;QAC9E,CAACY,MAAM;MACT,EAAEG;IAGN,QAAQC,KAAK,WAAWL,YAAYC,QAAQI;AAC9C;AAYO,SAASC,OAAOb,KAAkB;QAMxBc,eAMFC,aA6JMC,wBACAC,oCAYmBC,MAAAA,OAKPC,mBAAAA;IA1L/B,MAAMC,OAAOC;IACb,MAAMC,WAAWC;IACjB,MAAMC,SAASC,WAAWnC;IAC1B,MAAMoC,WAAWD,WAAWE;IAC5B,MAAMC,iBAAiBC;IACvB,MAAMC,SAAS,QAAAhB,CAAAA,gBAAAA,MAAM,MAAM,AAAD,I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'@lynx-js/react';
|
|
|
11
11
|
* | `popups` | `G9PopupHost` | popups (WP07) |
|
|
12
12
|
* | `feedback` | `ToastHost` | toasts, loaders, progress overlays: above sheets and popups |
|
|
13
13
|
* | `floating` | `DevHost` | always-available floating affordances (developer FAB, QA pill) |
|
|
14
|
+
* | `guide` | (Lynx) | the guide's highlights, spotlight, finger, bubbles and its guided-save confirmation |
|
|
14
15
|
*
|
|
15
|
-
* Only the page-loading cover sits above `
|
|
16
|
+
* Only the page-loading cover sits above `guide`.
|
|
16
17
|
*/
|
|
17
18
|
export declare const G9Layer: {
|
|
18
19
|
readonly Content: "content";
|
|
@@ -21,6 +22,7 @@ export declare const G9Layer: {
|
|
|
21
22
|
readonly Popups: "popups";
|
|
22
23
|
readonly Feedback: "feedback";
|
|
23
24
|
readonly Floating: "floating";
|
|
25
|
+
readonly Guide: "guide";
|
|
24
26
|
};
|
|
25
27
|
export type G9Layer = (typeof G9Layer)[keyof typeof G9Layer];
|
|
26
28
|
/** Every layer, bottom to top. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../src/host/layers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../src/host/layers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO;;;;;;;;CAQV,CAAC;AACX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAE7D,kCAAkC;AAClC,eAAO,MAAM,YAAY,EAAE,SAAS,OAAO,EAQzC,CAAC;AAEH,sFAAsF;AACtF,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,EAAE,SAA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|
Sheets: 'sheets',
|
|
6
6
|
Popups: 'popups',
|
|
7
7
|
Feedback: 'feedback',
|
|
8
|
-
Floating: 'floating'
|
|
8
|
+
Floating: 'floating',
|
|
9
|
+
Guide: 'guide'
|
|
9
10
|
};
|
|
10
11
|
const g9LayerOrder = Object.freeze([
|
|
11
12
|
'content',
|
|
@@ -13,7 +14,8 @@ const g9LayerOrder = Object.freeze([
|
|
|
13
14
|
'sheets',
|
|
14
15
|
'popups',
|
|
15
16
|
'feedback',
|
|
16
|
-
'floating'
|
|
17
|
+
'floating',
|
|
18
|
+
'guide'
|
|
17
19
|
]);
|
|
18
20
|
function layerRank(layer) {
|
|
19
21
|
const rank = g9LayerOrder.indexOf(layer);
|
package/dist/host/layers.jsx.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host/layers.jsx","sources":["../../src/host/layers.ts"],"sourcesContent":["import { G9Error } from '@g9tm/lynxcontrols-foundation';\nimport type { ReactNode } from '@lynx-js/react';\n\n/**\n * The page layers a `G9Host` owns, bottom to top (plan/specs/01 §5, MAUI `G9PageTemplate.xaml` z-stack). Sibling order\n * is the z-order; nothing relies on `z-index`.\n *\n * | Layer | MAUI template host | Holds |\n * | --- | --- | --- |\n * | `content` | `ContentHost` | the page itself (painted over `BackdropHost`) |\n * | `edgePanel` | (page content) | side panels sliding over the content (WP06) |\n * | `sheets` | `OverlayHost` | bottom sheets and their scrims (WP05) |\n * | `popups` | `G9PopupHost` | popups (WP07) |\n * | `feedback` | `ToastHost` | toasts, loaders, progress overlays: above sheets and popups |\n * | `floating` | `DevHost` | always-available floating affordances (developer FAB, QA pill) |\n *\n * Only the page-loading cover sits above `
|
|
1
|
+
{"version":3,"file":"host/layers.jsx","sources":["../../src/host/layers.ts"],"sourcesContent":["import { G9Error } from '@g9tm/lynxcontrols-foundation';\nimport type { ReactNode } from '@lynx-js/react';\n\n/**\n * The page layers a `G9Host` owns, bottom to top (plan/specs/01 §5, MAUI `G9PageTemplate.xaml` z-stack). Sibling order\n * is the z-order; nothing relies on `z-index`.\n *\n * | Layer | MAUI template host | Holds |\n * | --- | --- | --- |\n * | `content` | `ContentHost` | the page itself (painted over `BackdropHost`) |\n * | `edgePanel` | (page content) | side panels sliding over the content (WP06) |\n * | `sheets` | `OverlayHost` | bottom sheets and their scrims (WP05) |\n * | `popups` | `G9PopupHost` | popups (WP07) |\n * | `feedback` | `ToastHost` | toasts, loaders, progress overlays: above sheets and popups |\n * | `floating` | `DevHost` | always-available floating affordances (developer FAB, QA pill) |\n * | `guide` | (Lynx) | the guide's highlights, spotlight, finger, bubbles and its guided-save confirmation |\n *\n * Only the page-loading cover sits above `guide`.\n */\nexport const G9Layer = {\n Content: 'content',\n EdgePanel: 'edgePanel',\n Sheets: 'sheets',\n Popups: 'popups',\n Feedback: 'feedback',\n Floating: 'floating',\n Guide: 'guide',\n} as const;\nexport type G9Layer = (typeof G9Layer)[keyof typeof G9Layer];\n\n/** Every layer, bottom to top. */\nexport const g9LayerOrder: readonly G9Layer[] = Object.freeze([\n 'content',\n 'edgePanel',\n 'sheets',\n 'popups',\n 'feedback',\n 'floating',\n 'guide',\n]);\n\n/** The layers items can be registered into (`content` is the page's own children). */\nexport type G9OverlayLayer = Exclude<G9Layer, 'content'>;\n\n/** Position of `layer` in the z-stack (0 = bottom). */\nexport function layerRank(layer: G9Layer): number {\n const rank = g9LayerOrder.indexOf(layer);\n if (rank < 0) throw new G9Error('host-layer', `\"${String(layer)}\" is not a G9 layer.`);\n return rank;\n}\n\n/** One thing mounted into a layer. */\nexport interface G9LayerItem {\n /** Identity within the layer. Registering an existing key replaces its element and order in place. */\n readonly key: string;\n /** What to render. */\n readonly element: ReactNode;\n /** Ordering inside the layer: lower paints first (below). Ties keep registration order (later on top). Default 0. */\n readonly order?: number;\n}\n\n/** A registered item as the layer renders it. */\nexport interface G9LayerEntry {\n readonly key: string;\n readonly element: ReactNode;\n readonly order: number;\n /** Registration sequence; stable while the key stays registered. */\n readonly sequence: number;\n}\n\n/** The items of every overlay layer of one host. */\nexport interface G9LayerStore {\n /** The layer's items, bottom first. The same array until the layer changes. */\n getSnapshot(layer: G9OverlayLayer): ReadonlyArray<G9LayerEntry>;\n /** Called after each change of `layer`. Returns an unsubscribe function. */\n subscribe(layer: G9OverlayLayer, listener: () => void): () => void;\n /**\n * Mounts `item` into `layer` (or replaces the item with the same key). Returns a function that removes exactly this\n * registration: it does nothing once the key was removed or registered again by someone else.\n */\n register(layer: G9OverlayLayer, item: G9LayerItem): () => void;\n /** Removes the item with `key`; `false` when there was none. */\n remove(layer: G9OverlayLayer, key: string): boolean;\n /** Number of items in `layer`. */\n count(layer: G9OverlayLayer): number;\n /** Removes every item of every layer (host unmount). */\n clear(): void;\n}\n\nconst EMPTY: ReadonlyArray<G9LayerEntry> = Object.freeze([]);\n\nfunction checkLayer(layer: G9OverlayLayer): void {\n if (layer === ('content' as G9Layer)) {\n throw new G9Error('host-layer', 'The content layer holds the page itself; register items into an overlay layer.');\n }\n layerRank(layer);\n}\n\nfunction checkItem(item: G9LayerItem): number {\n if (typeof item?.key !== 'string' || item.key === '') {\n throw new G9Error('host-layer-item', 'A layer item needs a non-empty string key.');\n }\n const order = item.order ?? 0;\n if (typeof order !== 'number' || !Number.isFinite(order)) {\n throw new G9Error('host-layer-item', `Layer item \"${item.key}\" has an invalid order (${String(order)}).`);\n }\n return order;\n}\n\n/** Creates an empty {@link G9LayerStore}. */\nexport function createLayerStore(): G9LayerStore {\n const layers = new Map<G9OverlayLayer, Map<string, G9LayerEntry>>();\n const snapshots = new Map<G9OverlayLayer, ReadonlyArray<G9LayerEntry>>();\n const listeners = new Map<G9OverlayLayer, Set<() => void>>();\n let sequence = 0;\n\n function changed(layer: G9OverlayLayer): void {\n const entries = Array.from(layers.get(layer)?.values() ?? []);\n entries.sort((a, b) => a.order - b.order || a.sequence - b.sequence);\n snapshots.set(layer, entries.length ? Object.freeze(entries) : EMPTY);\n for (const listener of Array.from(listeners.get(layer) ?? [])) listener();\n }\n\n const store: G9LayerStore = {\n getSnapshot(layer) {\n return snapshots.get(layer) ?? EMPTY;\n },\n subscribe(layer, listener) {\n checkLayer(layer);\n let set = listeners.get(layer);\n if (!set) {\n set = new Set();\n listeners.set(layer, set);\n }\n set.add(listener);\n return () => {\n set.delete(listener);\n };\n },\n register(layer, item) {\n checkLayer(layer);\n const order = checkItem(item);\n let entries = layers.get(layer);\n if (!entries) {\n entries = new Map();\n layers.set(layer, entries);\n }\n const existing = entries.get(item.key);\n sequence += 1;\n const entry: G9LayerEntry = Object.freeze({\n key: item.key,\n element: item.element,\n order,\n sequence: existing ? existing.sequence : sequence,\n });\n entries.set(item.key, entry);\n changed(layer);\n return () => {\n if (layers.get(layer)?.get(item.key) === entry) store.remove(layer, item.key);\n };\n },\n remove(layer, key) {\n checkLayer(layer);\n const entries = layers.get(layer);\n if (!entries?.delete(key)) return false;\n changed(layer);\n return true;\n },\n count(layer) {\n return layers.get(layer)?.size ?? 0;\n },\n clear() {\n for (const [layer, entries] of Array.from(layers)) {\n if (entries.size === 0) continue;\n entries.clear();\n changed(layer);\n }\n },\n };\n return store;\n}\n"],"names":["G9Layer","g9LayerOrder","Object","layerRank","layer","rank","G9Error","String","EMPTY","checkLayer","checkItem","item","_item_order","order","Number","createLayerStore","layers","Map","snapshots","listeners","sequence","changed","_listeners_get","_layers_get","entries","Array","a","b","listener","store","_snapshots_get","set","Set","existing","entry","key"],"mappings":";AAmBO,MAAMA,UAAU;IACrB,SAAS;IACT,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;IACV,OAAO;AACT;AAIO,MAAMC,eAAmCC,OAAO,MAAM,CAAC;IAC5D;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAMM,SAASC,UAAUC,KAAc;IACtC,MAAMC,OAAOJ,aAAa,OAAO,CAACG;IAClC,IAAIC,OAAO,GAAG,MAAM,IAAIC,QAAQ,cAAc,CAAC,CAAC,EAAEC,OAAOH,OAAO,oBAAoB,CAAC;I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,UAAAA,KAAAA,IAAAA,QAAS,MAAM,CAACW,IAAG,GAAG,OAAO;YAClCd,QAAQjB;YACR,OAAO;QACT;QACA,OAAMA,KAAK;;gBACFmB;YAAP,OAAO,QAAP,gBAAOA,CAAAA,cAAAA,OAAO,GAAG,CAACnB,MAAK,IAAhBmB,KAAAA,IAAAA,YAAmB,IAAI,AAAD,IAAC,OAAI;QACpC;QACA;YACE,KAAK,MAAM,CAACnB,OAAOoB,QAAQ,IAAIC,MAAM,IAAI,CAACT,QACxC,IAAIQ,AAAiB,MAAjBA,QAAQ,IAAI;gBAChBA,QAAQ,KAAK;gBACbH,QAAQjB;;QAEZ;IACF;IACA,OAAOyB;AACT"}
|
package/dist/host/registry.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { G9Capabilities } from '@g9tm/lynxcontrols-foundation';
|
|
2
|
+
import type { G9AnchorRegistry } from '../anchor/registry.js';
|
|
2
3
|
import type { G9BackStack } from './back.js';
|
|
3
4
|
import type { G9LayerItem, G9LayerStore, G9OverlayLayer } from './layers.js';
|
|
4
5
|
import type { G9HostReadiness } from './readiness.js';
|
|
@@ -31,6 +32,8 @@ export interface G9HostHandle {
|
|
|
31
32
|
readonly parent: G9HostHandle | null;
|
|
32
33
|
/** The services of the provider this host lives in. */
|
|
33
34
|
readonly services: G9Capabilities;
|
|
35
|
+
/** The provider's anchors (every control a guide or an automation can reach). */
|
|
36
|
+
readonly anchors: G9AnchorRegistry;
|
|
34
37
|
/** The overlay layers (MAUI `OverlayLayer` = `sheets`, `ToastLayer` = `feedback`, `DevLayer` = `floating`). */
|
|
35
38
|
readonly layers: G9LayerStore;
|
|
36
39
|
/** Shorthand for `layers.register`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/host/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAA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