@g9tm/lynxcontrols-web 2.4.1 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/catalog/catalog.json +49 -1
- package/catalog/index.md +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/install.d.ts +17 -0
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +76 -3
- package/dist/install.js.map +1 -1
- package/dist/module.d.ts +7 -0
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -0
- package/dist/module.js.map +1 -1
- package/dist/scale.d.ts +34 -0
- package/dist/scale.d.ts.map +1 -0
- package/dist/scale.js +56 -0
- package/dist/scale.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -53,6 +53,43 @@ control changed):
|
|
|
53
53
|
- **Text direction from the first strong letter**, as on Android and iOS (`@g9tm/lynxcontrols` in a Persian page keeps its
|
|
54
54
|
`@` in front), and **the system font** instead of the browser's serif: `G9_WEB_STYLE_RULES`, injected into the
|
|
55
55
|
view's shadow root (`styleRules: []` to add none).
|
|
56
|
+
- **A view shown smaller than it is laid out** (a design tool fits a phone frame with `transform: scale(…)` or `zoom` on
|
|
57
|
+
an ancestor). A browser's `getBoundingClientRect` returns drawn pixels, and the page took them as layout pixels: a
|
|
58
|
+
374 px view shown at 0.668 drew `G9TabBar`'s chrome for 222 px in a 346 px bar.
|
|
59
|
+
- The host divides the rect of every element in the view's shadow root by the view's scale (its drawn width over
|
|
60
|
+
its `offsetWidth`), around the view's corner: `bridgeScaledRects`.
|
|
61
|
+
- `layoutchange`, `boundingClientRect` and the design probe then measure as on a device (LC-26; `smoke:web` step
|
|
62
|
+
10).
|
|
63
|
+
- Touch coordinates are not corrected: a drag in a scaled preview moves by the drawn distance.
|
|
64
|
+
|
|
65
|
+
### Firefox and WebKit
|
|
66
|
+
|
|
67
|
+
`npm run smoke:web:browsers` (`apps/atelier/test/web-smoke-browsers.mjs`, Playwright's Firefox and WebKit:
|
|
68
|
+
`npx playwright install firefox webkit`) opens every page in English and Persian and runs the static-contract
|
|
69
|
+
comparison in both engines. Two of their differences are fixed here:
|
|
70
|
+
|
|
71
|
+
- **Firefox:** web-elements sets a flex view's direction through "space toggles" (cyclic custom properties), which
|
|
72
|
+
Firefox resolves to the linear value, so every row stood stacked. A Firefox-only rule in `G9_WEB_STYLE_RULES`
|
|
73
|
+
reads `--flex-direction` directly.
|
|
74
|
+
- **Firefox, the page's first view** (LC-27): without style container queries web-elements copies each element's
|
|
75
|
+
`--lynx-display` into the attribute `lynx-computed-display` when the element is connected, and the first view gets
|
|
76
|
+
its card's style sheet after its elements, so they kept the default `linear` (rows stacked, in that view only). The
|
|
77
|
+
host reads them again whenever a style sheet arrives in the view: `bridgeLinearDisplay`. Upstream: lynx-stack issue
|
|
78
|
+
#3349 (open) and its fix PR #4236 (open, 2026-11-20); drop the bridge once a web-elements release carries it.
|
|
79
|
+
- **Any browser, a view made before `<lynx-view>` is defined** (LC-27): the element's upgrade starts web-core's class
|
|
80
|
+
fields again, so `nativeModulesMap` and `injectStyleRules` set by `installG9WebHost` were lost (no G9HostModule, no
|
|
81
|
+
rules) and the handler hid web-core's setter. The host sets all three again once the element is upgraded.
|
|
82
|
+
- **WebKit:** it has no `requestAnimationFrame` in workers, where web-core's `lynx.requestAnimationFrame` calls it.
|
|
83
|
+
The worker module adds a 16 ms timer there (`ensureWorkerAnimationFrame`). WebKit also has no
|
|
84
|
+
`Cross-Origin-Embedder-Policy: credentialless`: serve the page with `require-corp` (remote images then need a CORP
|
|
85
|
+
header).
|
|
86
|
+
|
|
87
|
+
Still open, cause not traced (no matching lynx-stack issue found, 2026-11-20); the message comes from web-core, which
|
|
88
|
+
does not prove the fault is there:
|
|
89
|
+
- Firefox's very first page in a fresh profile sometimes logs «Failed to load web elements» and does not paint. It may
|
|
90
|
+
be the first-view race above (LC-27, fixed since 2.5.1); not re-run since.
|
|
91
|
+
- WebKit (Playwright's Windows build, not Safari) now and then throws inside web-core's WebAssembly
|
|
92
|
+
(`decode_style_info`, `mainthreadwasmcontext_new`), and that page does not paint.
|
|
56
93
|
|
|
57
94
|
## G9AppPilot's watch, read from the page (LC-08)
|
|
58
95
|
|
package/catalog/catalog.json
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"catalogVersion": 1,
|
|
3
3
|
"package": "@g9tm/lynxcontrols-web",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.1",
|
|
5
5
|
"generatedBy": "node scripts/check-docs.mjs --write",
|
|
6
6
|
"components": [],
|
|
7
7
|
"exports": [
|
|
8
|
+
{
|
|
9
|
+
"id": "web.web.bridgeLinearDisplay",
|
|
10
|
+
"export": "bridgeLinearDisplay",
|
|
11
|
+
"from": "@g9tm/lynxcontrols-web",
|
|
12
|
+
"kind": "function",
|
|
13
|
+
"signature": "(root: Node & ParentNode, computed?: G9ComputedStyleReader | undefined): () => void",
|
|
14
|
+
"summary": "LC-27: where a browser has no style container queries (Firefox), web-elements copies each element's `--lynx-display` and `--lynx-linear-orientation` into the attributes `lynx-computed-display` and `lynx-linear-orientation` and lays it out by them (`linear` + `vertical` is `flex-direction: column !important`). It reads them when the element is connected and when its class or style changes, not when a style sheet arrives. A page's first view gets its card's style sheet after its elements (later views find it ready), so every element kept the default `linear`: rows stood stacked in the first view only. When a style sheet is added to `root` or its text changes, every such element reads both again (in the next frame, once per burst). Nothing happens in a browser without those attributes. Upstream: lynx-stack issue #3349 (fix PR #4236); drop this once web-elements carries it. Returns the stop function."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "web.web.bridgeScaledRects",
|
|
18
|
+
"export": "bridgeScaledRects",
|
|
19
|
+
"from": "@g9tm/lynxcontrols-web",
|
|
20
|
+
"kind": "function",
|
|
21
|
+
"signature": "(view: ScaledView, root: Node): () => void",
|
|
22
|
+
"summary": "A view under a scaled ancestor (a design tool fits a phone frame with `transform: scale(…)` or `zoom`): what the page measures — `layoutchange`, `boundingClientRect`, the design probe — must be in the view's layout pixels, as on a device, not in the shrunk pixels the browser draws (LC-26: G9TabBar drew its chrome for 250 px in a 374 px view shown at 0.668). The browser's `getBoundingClientRect` is wrapped once: for an element inside a bridged view's shadow root (also through a nested one, as `x-text`'s) the rect comes back divided by the view's scale around the view's corner; every other element is untouched, and the original returns when the last view is unbridged. Touch coordinates are not corrected (a drag in a scaled preview moves by the drawn distance)."
|
|
23
|
+
},
|
|
8
24
|
{
|
|
9
25
|
"id": "web.web.bridgeStartText",
|
|
10
26
|
"export": "bridgeStartText",
|
|
@@ -53,6 +69,14 @@
|
|
|
53
69
|
"signature": "(_nativeModules: unknown, call: Call): G9WebHostModule",
|
|
54
70
|
"summary": "The factory Lynx for Web calls with `(nativeModules, nativeModulesCall)`; returns the module."
|
|
55
71
|
},
|
|
72
|
+
{
|
|
73
|
+
"id": "web.module.ensureWorkerAnimationFrame",
|
|
74
|
+
"export": "ensureWorkerAnimationFrame",
|
|
75
|
+
"from": "@g9tm/lynxcontrols-web/module",
|
|
76
|
+
"kind": "function",
|
|
77
|
+
"signature": "(scope: Record<string, unknown>): void",
|
|
78
|
+
"summary": "A worker with no `requestAnimationFrame` (WebKit has none in workers; Chromium and Firefox do): web-core's `lynx.requestAnimationFrame` calls the global one in the page's worker, so a page that asks for a frame threw `Can't find variable: requestAnimationFrame` there. Installed once, when this module loads, only where it is missing: a 16 ms timer that hands the callback the time, as a frame would."
|
|
79
|
+
},
|
|
56
80
|
{
|
|
57
81
|
"id": "web.static.G9_STATIC_COMPONENTS",
|
|
58
82
|
"export": "G9_STATIC_COMPONENTS",
|
|
@@ -77,6 +101,14 @@
|
|
|
77
101
|
"signature": "readonly string[]",
|
|
78
102
|
"summary": "The rules the host adds to the view's shadow root so a browser draws text as the native engines do: - the system font: a browser's default is a serif, the native default the system's sans; - each text's direction from its first strong letter (`@g9tm/lynxcontrols` in a Persian page reads as written, as on Android and iOS), where the browser would take it from the CSS `direction` and move the `@` to the end; - the view as a size container, the box the viewport units measure against (`bridgeViewportUnits`)."
|
|
79
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"id": "web.web.G9ComputedStyleReader",
|
|
106
|
+
"export": "G9ComputedStyleReader",
|
|
107
|
+
"from": "@g9tm/lynxcontrols-web",
|
|
108
|
+
"kind": "type",
|
|
109
|
+
"signature": "G9ComputedStyleReader",
|
|
110
|
+
"summary": "What the bridge reads of an element's computed style (the page's `getComputedStyle`; tests pass a fake)."
|
|
111
|
+
},
|
|
80
112
|
{
|
|
81
113
|
"id": "web.web.G9LynxViewElement",
|
|
82
114
|
"export": "G9LynxViewElement",
|
|
@@ -300,6 +332,22 @@
|
|
|
300
332
|
"kind": "function",
|
|
301
333
|
"signature": "(value: string): string",
|
|
302
334
|
"summary": "`100vw` → `100cqw`, `calc(50vh - 8px)` → `calc(50cqh - 8px)`."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"id": "web.web.unscaleRect",
|
|
338
|
+
"export": "unscaleRect",
|
|
339
|
+
"from": "@g9tm/lynxcontrols-web",
|
|
340
|
+
"kind": "function",
|
|
341
|
+
"signature": "(rect: { readonly left: number; readonly top: number; readonly width: number; readonly height: number; }, viewLeft: number, viewTop: number, s: number): { left: number; top: number; width: number; height: number; }",
|
|
342
|
+
"summary": "A rect measured under a scale `s`, back in the view's layout pixels, the view's own corner kept where it is."
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"id": "web.web.viewScale",
|
|
346
|
+
"export": "viewScale",
|
|
347
|
+
"from": "@g9tm/lynxcontrols-web",
|
|
348
|
+
"kind": "function",
|
|
349
|
+
"signature": "(drawnWidth: number, layoutWidth: number): number",
|
|
350
|
+
"summary": "The scale an ancestor's `transform` or `zoom` puts on a view: its drawn width over its layout width (1 when there is none, or nothing is laid out yet)."
|
|
303
351
|
}
|
|
304
352
|
]
|
|
305
353
|
}
|
package/catalog/index.md
CHANGED
package/dist/.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/animation.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@lynx-js/types/types/common/csstype.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/animation.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/element.d.ts","../../../node_modules/@lynx-js/types/types/common/events.d.ts","../../../node_modules/@lynx-js/types/types/common/system-info.d.ts","../../../node_modules/@lynx-js/types/types/common/performance.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/events.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/common/lynx.d.ts","../../../node_modules/@lynx-js/types/types/common/global.d.ts","../../../node_modules/@lynx-js/types/types/common/props.d.ts","../../../node_modules/@lynx-js/types/types/common/element/component.d.ts","../../../node_modules/@lynx-js/types/types/common/element/filter-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/common.d.ts","../../../node_modules/@lynx-js/types/types/common/element/inline-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list-item.d.ts","../../../node_modules/@lynx-js/types/types/common/element/page.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/text.d.ts","../../../node_modules/@lynx-js/types/types/common/element/view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/input.d.ts","../../../node_modules/@lynx-js/types/types/common/element/textarea.d.ts","../../../node_modules/@lynx-js/types/types/common/element/title-bar-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/svg.d.ts","../../../node_modules/@lynx-js/types/types/common/element/refresh.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-coordinator.d.ts","../../../node_modules/@lynx-js/types/types/common/element/viewpager.d.ts","../../../node_modules/@lynx-js/types/types/common/element/blur-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/webview.d.ts","../../../node_modules/@lynx-js/types/types/common/element/markdown.d.ts","../../../node_modules/@lynx-js/types/types/common/element/video.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx-performance-entry.d.ts","../../../node_modules/@lynx-js/types/types/common/element/frame.d.ts","../../../node_modules/@lynx-js/types/types/common/element/overlay.d.ts","../../../node_modules/@lynx-js/types/types/common/element/element.d.ts","../../../node_modules/@lynx-js/types/types/common/element/methods.d.ts","../../../node_modules/@lynx-js/types/types/common/element/attributes.d.ts","../../../node_modules/@lynx-js/types/types/common/element/index.d.ts","../../../node_modules/@lynx-js/types/types/common/console.d.ts","../../../node_modules/@lynx-js/types/types/common/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/event.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/nodes-ref.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/app.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/performance.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/fetch.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/native-modules.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/text-encoder-decoder.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/@lynx-js/react/runtime/jsx-runtime/index.d.ts","../src/font.ts","../src/handler.ts","../src/install.ts","../src/module.ts","../src/index.ts","../../foundation/dist/collections.d.ts","../../foundation/dist/culture/bidi.d.ts","../../foundation/dist/culture/digits.d.ts","../../foundation/dist/culture/culture.d.ts","../../foundation/dist/culture/calendar.d.ts","../../foundation/dist/culture/coordinates.d.ts","../../foundation/dist/culture/date-format.d.ts","../../foundation/dist/culture/duration.d.ts","../../foundation/dist/culture/natural-date.d.ts","../../foundation/dist/culture/numbers.d.ts","../../foundation/dist/culture/strings.d.ts","../../foundation/dist/culture/relative-time.d.ts","../../foundation/dist/culture/text.d.ts","../../foundation/dist/culture/index.d.ts","../../foundation/dist/enums/index.d.ts","../../foundation/dist/errors.d.ts","../../foundation/dist/exec/diagnostics.d.ts","../../foundation/dist/services/abort.d.ts","../../foundation/dist/exec/options.d.ts","../../foundation/dist/services/clock.d.ts","../../foundation/dist/exec/trace.d.ts","../../foundation/dist/exec/safe-executor.d.ts","../../foundation/dist/exec/index.d.ts","../../foundation/dist/icons/generated/glyph-svg.d.ts","../../foundation/dist/icons/glyph.d.ts","../../foundation/dist/icons/icon.d.ts","../../foundation/dist/icons/glyph-slots.d.ts","../../foundation/dist/icons/icon-fonts.d.ts","../../foundation/dist/icons/packs.d.ts","../../foundation/dist/icons/svg.d.ts","../../foundation/dist/icons/index.d.ts","../../foundation/dist/layout/index.d.ts","../../foundation/dist/route/address.d.ts","../../foundation/dist/route/catalogue.d.ts","../../foundation/dist/route/journey.d.ts","../../foundation/dist/route/sink.d.ts","../../foundation/dist/route/resolve.d.ts","../../foundation/dist/route/view.d.ts","../../foundation/dist/route/index.d.ts","../../foundation/dist/services/feedback.d.ts","../../foundation/dist/services/preferences.d.ts","../../foundation/dist/services/contracts.d.ts","../../foundation/dist/services/keys.d.ts","../../foundation/dist/services/motion.d.ts","../../foundation/dist/services/index.d.ts","../../foundation/dist/tokens/generated/palettes.d.ts","../../foundation/dist/theme/aliases.d.ts","../../foundation/dist/tokens/shape.d.ts","../../foundation/dist/theme/color.d.ts","../../foundation/dist/theme/theme.d.ts","../../foundation/dist/theme/brand.d.ts","../../foundation/dist/theme/appearance.d.ts","../../foundation/dist/theme/contrast.d.ts","../../foundation/dist/theme/control-colors.d.ts","../../foundation/dist/theme/css-color.d.ts","../../foundation/dist/theme/design.d.ts","../../foundation/dist/theme/oklch.d.ts","../../foundation/dist/theme/recipe.d.ts","../../foundation/dist/tokens/generated/metrics.d.ts","../../foundation/dist/tokens/layout-metrics.d.ts","../../foundation/dist/tokens/css-vars.d.ts","../../foundation/dist/tokens/derived.d.ts","../../foundation/dist/theme/variants.d.ts","../../foundation/dist/theme/index.d.ts","../../foundation/dist/tokens/root.d.ts","../../foundation/dist/tokens/index.d.ts","../../foundation/dist/index.d.ts","../src/static.ts"],"fileIdsList":[[41,96,97],[42,86,87,88],[53],[42,78,87,88,89,90,92,93,94],[42,86,87,88,90,91],[86,88],[42,86],[49,78],[43],[44],[51,55],[47],[41,51,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80],[47,51,55,78],[47,51,55],[56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80,81,82,83],[58,59],[47,51,55,59],[47,61,64],[46],[48,52,53,95],[44,47,48,49,51,53,54,55,84,85],[44,47],[52,86,95],[45,86],[46,47,55],[45,46,50,51],[49,86],[38,39,40],[41],[107],[106],[106,107,108],[105,106,107,108,109,110,111,112,113,114,115,116],[108],[114],[120,122,124,125],[121],[114,120,121,122,123,124],[120,123],[129],[128],[127,128,129,130,131,132,133],[104,117,118,119,126,134,135,142,148,167,169],[119],[119,136],[136,137,138,139,140,141],[137],[136,137,139],[136],[119,121,123,139,143,144],[121,123,143,144,145,146,147],[149],[149,151,153,154],[149,152,153],[152,153],[152],[151,153],[150,152,153,154,155,156,157,158,159,160,161,166],[149,152],[118,149,152,165],[149,162,163],[149,164],[149,151,162,163,164,165,168],[149,151,164],[98],[98,100,101,102],[98,99,100],[98,99,170]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6fdd3074ba01fc8aff89a11055a33516aff7a42a3599fc0e7dce64047a5e3fd","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"035312d4945d13efa134ae482f6dc56a1a9346f7ac3be7ccbad5741058ce87f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"07b03f752ae52a7130e06c5a8399d3a0dde07a1a634f8430b80cd6236c56b5c8","impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"acbac4ca6cd4b2b459debc4a274535775cb6278a8315be383fafa623ab78f18e","impliedFormat":1},{"version":"e421d0b097c78304a2597c1f33da586630e1dc665ae381c0c36e5ebc4aaf4566","impliedFormat":1},{"version":"adf624c89a0d509a789f3c0bf522969d2c47033dbeb50920b37cd89be475a65e","impliedFormat":1},{"version":"f4664d05efc95a0fb8ee228d391e5271a1c8fc9bc3452c7bd760f9ca18b5a837","impliedFormat":1},{"version":"b32b532dcbe0a91d71fd94cb780e94bdfdce10be21608d914c29fb4b8939b24a","impliedFormat":1},{"version":"eb2b64881998b562a4fe9330e55aa2466cd3a41a1a57e93feac6555218cec06f","impliedFormat":1},{"version":"6db1694d205177322d792d924335b046b80607445a45c0d2de1fcffd190b48c0","impliedFormat":1},{"version":"d5465281e0aaffe267f46382c5f014740dc16e7fd8e1c57a0b0ddf8a2eab9be4","impliedFormat":1},{"version":"f7e5c3960dd9df65d83408b9be446f7119fa1db1dd8266dd343349d90c3bf2ce","impliedFormat":1},{"version":"09c6491ed74af89a4155feafedecaf77780f5751c66d4b65b18d30fc0e053a75","impliedFormat":1},{"version":"188b01044640e5ef65f6edf0dd6e6454f02dd19f4ead66b9e03ebe26cc7298ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d34d6de13412a24e8d9252040d972edce68b4db8d8a64a3f7fd63ca1fda3a67f","impliedFormat":1},{"version":"5bf51107315834a209b08395b141e262b7d143d14f6b4e4d403d8e020cef7e32","impliedFormat":1},{"version":"db0dcbe48d5cb38315083b412c8ab6995b0d42dc73b286833e296827feb0e5b4","impliedFormat":1},{"version":"b3e4a49a3ba19463662e7b821544948b953d2f6708370d42406bda558084000c","impliedFormat":1},{"version":"7c5e49b3d96da389b07d4ae3705c9f33a03dadcd04e6c0e76edece6d636f4ce7","impliedFormat":1},{"version":"24e9add3c802e7c9431b2c99edbbda02c1899901fd955dfb2e9ee3e9cdc93c4c","impliedFormat":1},{"version":"cd6611fd8cd9d40de1bdec02a3c5027c968c4aaf7639ee88ee48b2c41edeaddc","impliedFormat":1},{"version":"32d1e153cac16ca3a3f5f6b68fae76cddcda509950fa00d038c465776359db0c","impliedFormat":1},{"version":"0d85d0fa55dd433acf924675d7e976c025c8521c91a76079844cd15e52855ccf","impliedFormat":1},{"version":"89da6ea3ee9735e712691227b0e5ee74381779f9ad8b0f4fb7ced0247b16735a","impliedFormat":1},{"version":"77fbe475cb649a3598aa8f932ab5f6fe011444d94b52d329078c1f6d63c5d3bd","impliedFormat":1},{"version":"7618f7fdf0abf7f712cefe766ac1ab7fcd1f8e753c513e57d3ada9ada3a57257","impliedFormat":1},{"version":"db0441149b37984c225e945a112713d07616b34552d64f814c5cbf8e8c95f165","impliedFormat":1},{"version":"51f5a8fa3de5f13b21ba2604b4de8f0aae3d97acadab981d536a282ea26257af","impliedFormat":1},{"version":"0e323630cbfda771430e2720f6a2f02f257becd8fb9722aa975ae773fb572210","impliedFormat":1},{"version":"56dbc770513baae28f7cfbadeba5078bb13a37a13132a5292e98a8b103312b98","impliedFormat":1},{"version":"84ff906032fe12e816bfb7441cee6726243e5a7316c4f2d6b0a6c149f1a91a16","impliedFormat":1},{"version":"446e9432c63958893f65b4f7eea86fb5b506c2e0e7dd971a1f75e361b333a3db","impliedFormat":1},{"version":"dcbbe1fb0f2c0efc12e29db8bbccb5b82513384d01d7a55342065cb0611da272","impliedFormat":1},{"version":"af209189a194cf5ad1f7b22dd680b52843fec2e30f1283be20b2977872fd4424","impliedFormat":1},{"version":"18e37ffc10db360e66b0af639e55bcc66496830994734f64a97c6751458f7f3a","impliedFormat":1},{"version":"14137199a98201c616a7ee925bfaa9809b659dfbec733f86fa5dc5348a897de6","impliedFormat":1},{"version":"f64cd565aca17df45f4666473da75e4ce51a2610e2ed1c31198e9f9325747a24","impliedFormat":1},{"version":"e415a17ab6a413d6be640457231e045541405eab1f0f370c7dd1e5567aa25999","impliedFormat":1},{"version":"8c03a41d6dc701b6648db83d71a92dc27147d7677ab5d70f32675e7e37b3795a","impliedFormat":1},{"version":"e27b62f2410bb10697800d1c09ae2c48db46cd1eca18ffdd35022b1802bfd6d5","impliedFormat":1},{"version":"2ec0bfa713f313f8b2dc2bf64c5962433722ea7b413f69428106a65584656dc9","impliedFormat":1},{"version":"b2d74af681f440a07e714ae9a33e3ea49c79870b9674058114c0404d2aa2f190","impliedFormat":1},{"version":"24f31e43eb3505e5d2946315e7b8ee8b426dfbe92c3031e435a4eb2d9dd8d69f","affectsGlobalScope":true,"impliedFormat":1},{"version":"5b6a59d1e98f908badf07f243deb42ebd926b4e3d33ec00a5f50cbb8d0464488","impliedFormat":1},{"version":"c669ee7ba01fa6a60b17c3535f96b65fa82dfd2a475a8760364f2f3952f9bcbd","impliedFormat":1},{"version":"a8b121f6a75d603075e62793ff0c109112e882dd6ca2b70bdccbd8d8f753429b","impliedFormat":1},{"version":"f378d7ed5e3ecbe382ade55127a9c98e826c76f786e06effad6fde91a7023d55","impliedFormat":1},{"version":"4e3e9539df72b3bfcc56fa13140070020dac72f1eff39237b11253482cb99847","impliedFormat":1},{"version":"5a47b3a2bbe2c9b015fe356462afe0abe391c592fffbe277126e2415e0811967","impliedFormat":1},{"version":"b1248e5931d2a49c697203e69449c58dacd3d19f12d76bf11d816600a0cf423b","impliedFormat":1},{"version":"0b02aebd8c41453aefd3b1f33b9b9862a57770f8b21e916ecc5b35c0bedcc52b","impliedFormat":1},{"version":"e52840670587e82e129c9bfc6a2f42d9c2f2e1fd6ce176fea998383a8c941ea5","impliedFormat":1},{"version":"31ca1ee726f5d7c7709913b98be76fc40fdfaaca6ad7fafc222108981e11227c","impliedFormat":1},{"version":"556db73da59f5162cdf5c7ea1bc3b063b6ccb758078ef6517ad6f6e4ae7b199a","impliedFormat":1},{"version":"0a2c8ef08611f5a5f711c7b10ba70d10dc1c6af0c9dba8168cbbf34911b74188","impliedFormat":1},{"version":"1d6ef45145a9939a43062fe18188d4f7bdfdf4547978e1f6b7c9089fe53e81e5","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"509a86836776d5c821901abc16a2d21de674d2c8943ceb8d018049bf324bc56c","impliedFormat":99},{"version":"b1ea7506d20974fb82c053b1d8100e87b9d519b7d84fe4be5ed60e3646a844f7","signature":"38655a9fed08ff0c8bdd6edb268c7dbff4bf4ca10aa583b3f8fa721761291424"},{"version":"823c769e9fcd2cc337bd20d0af86aa132f942f4a32c44d98a8e0cf52961eafc2","signature":"a8bac9ebea903abafa71f7ad6755e74d6328be5780aa29e14b0c77eacdb60cd8"},{"version":"c48fefafe7c862f4be64c211961d97e7222a77ea1969ef80e6ecc4885ba7fb5f","signature":"950ba958a4b43d05272c4be15348bc9a7c079c3289f57f546d4cd83d94353cdd"},{"version":"40b8d769827eb1619f8d4876c54fa6117d3795e15c42df5b25cb9726a35c4e00","signature":"ec22b76e6e74d9e38237af0b260db0b4eb2927c84451f1ffbd9ba9bbef89d5aa"},{"version":"76e32b233f759673b3d4e375370853612bfb7134064bc9575c4598651dc7092f","signature":"f91e1eeeea2a699bcca04edaeb3e4c74136cf881ecca62e1b73a27937aa107bd"},"d533d1fe3018752aa47ee74ae5dbdca34377441b891176ad99bd33366a64372f","577287aa28cdd2976297531706a5baea4ba5171512f500731d3feba37057d851","44b82e4f46178400732ea809a906f7ffb9dd38efab331ca23e7ca4586bf903ef","d3dcff003bac57338c3e60be409d0ff167ec1ff513539a5534c7679332dbc992","16d64c89cec74fa23e8cee7c72acc7549f117dcf7845051870c40366c7522d09","706c787ed201e67534e550d765eecfb18a8c39f46e04fcec600d0bb9d1bb6231","11f9f682c02d51de68eed569f8de1e91c56df296a78f3a6c520b93d52aac2308","28b43630d8d29a300e1e5b0f5efb04c8f994d372fff1b653ce8bb70d4e011e1a","08521f5befe6ec3f1c3a881651321f875ca6fc79db15a6130283d409f5d47d1b","b06c48902c3d127098839c1a6500f41d3e21b2f07f277ba7de23ec730df7275d","946d8fa2088c22a4cbc85875ec7c700c93cf53d7b52057fe4e6730fd613c7925","a7a0e658ca429cfb5268d4bf2e2e6e9fe871ffd06b6588d65424ba4eba35338f","2dbadaab8fa70d9d874b29e23e808b0978fd2dbaf34e3caf8303508e2b88c603","54b8f865e3bea736798e54bc95b49435f472599aea762bd17bb02a18b198c7d1","5e621ae454f5ff6bfea91a558b93eb3dee64eac6f66ad8d6739a4a7c396a42f7","ccd708c3fff99b4ec315e14315dce6b9e85f4c96d10131e9fd219edb6efbdb26","abc924fce33b86b9f8588de3a5be04c609fafa6cb1dc42629b3e9e3e18f7d018","f919e3a8b2d274b631ee4fee0c50eba1d3f39ceaccba04dff915e9f61e9f153c","3ae17ae844491c7326d070c3e70a94a9239394e7a1e84eb203eb1d57470e752e","d1b2970d348eb9f89ef0f0c6730d27e9331067a28f21c8bd667ba1138d5d3e93","b2c4833e6308888c3947953770b3343deaf4276c803bb36148991a3fb90b4f6a","41b7c8204ea79a93e380a228f5c744e9c9a80183133ac62633a4c76e3fdbd7db","d0a441df587b0632c16a813117f110574d903ddd0bc4d28599cc82ff8af7c094","b24ac81f4fcff56ed9827736abcf2f92ea5f86e16d66eb2ee3ccfa0bb8143bc9","068309ff581d08c276c4a772ddf3ab9c8090e591fc9917fdc6cdffc12c95a5bf","5c1d368a451520260ebb6c06121201f18abf86d80540290df6e424d372c5d0ed","bb3ccaacf5c19a7170939b7f735c6a94537fd95ad16b4247a6ad572b23183e74","2c8b86d9d29c4ea62762c3815ffe4fdb0c5dbc0dd096b9703236010f4a17c255","7ec540fd5fb0761576c417b27ea61ec08123412487b020942c893510dce970db","f858a10d167e011155bfe5a3532f599e677bced6727c07366f380c02010650d4","465f5d53f09ac1978002bc264b8a4c0aea749c79dd2bd1917dffe57fddcb9543","cf4ef9c41637cb6995fee096890a0e6113141bcce82cc7d5754c281f03ad889e","40f34f36aba872decb7540030db33dc84f1a53d4778fd8c8ad840d68f2023f3a","10347593c1b262343845f577673e5956217a8a571c859d83e2de50a54729541f","e0a192de84052b553230c5f649307dfb49df6dce54fdc538de15078d895f5f66","228e7d711e429183ddf7fc8c331d00540557ade296fb8132d5bfc48d5c933f89","e8906c76ded4f87db27adfe3e8f9e1a729be51a6a0c2c458f31662c6278b1925","49bca6d49d9c5a525146bba60a48e448e1eabe79be789a7b5238ac10a2f620b3","08fe86bcae8e02f769d215958438d6858dc19aeed2a61c7d7327f052b0db25fc","cd3a9799c8e0996b4d31d5235a8ae105b79a7fa31ba8f660ca35b043048ef757","ee4e73f46ce2f6517e82434bd9fc63c8b6b2179d37d74525899f124a76d06669","773c827d0235c76288ab0092202c357730c5b21314241831b7dd88ef6017818e","ced97526e899f0222df6d805e008cd5bc63fee326838a9002919453f9a2a8c9b","216aa3f63d62f13b158445ff6a3bea8ccfd110f2bf219d607175518c9cc5b29d","be77edbe4d276441584b1c7b297bd8596c78913c22c590dc136d987b82a3976c","faa64d270fa523f80fd31bc7340ee7f6a21632c2ea0cea6535bf5a34bcc6adf7","931d70c96033881193232b90c39210c6cd14865f28b339843c56b5688e7fd10d","3201251d2feaa0eab2de4bd121c563cccf7ff224685c96763262c9c9d3a72064","29e6e980f179ac2981d68954462dfd4a4545f73c021f6a4c8a5f442c0e16e56c","67fe56b931e013e9980dec2a605908d44484c7bbd81d2ee9912872c11bc76515","d4924e2b191fee9b43aaeef651c87a7084281d425a30a9a8cf50de8f92b64f6d","8fc678b640b298b07d4f52a5a4f0b3a57e07e45da7a0ad25f1ffde53a152d3be","a59554ba3751ea9ad27f6948f1c71ef57f1e28bb526a53eacb0dfa76bc1df452","ea5a5d5873c239b97d846fb8c78437e08ffd731924764f746c0ebcb7731d7648","da401323d4c96e3f5b8fa8b7ecd200d47a9e340b09cefbea553d2b2b5a345e60","ead4a7fd25e5e2b756a5e71546bd8eae855c7b0ecbffd891f7fb0b6f7d80c0c1","eaea9f8e5b90d87160a885c2afc4afcd2434e149ae5a5368d4b61eed66a6a597","cc44cf86b3ddb7d61f7de3fd32116089decb662a8b6421013bd4a8ee9a079881","ab7ed47f18899e74299db14911a028a0aaf1acae17f870a64ead7d91953d40b3","298f8d2584216932ea238927177ef343d0b8da735eb40a5ba96b1f92e3675e33","c8082c78975419ed5a9f7daa655643425cdd98fee91bb82fd92d25f908c78465","24a588d942a36d853d18dfe63711e9b180ea0448b956dadce7833f4d6455f0c8","c263cc53a55cc822c360481e94d0fe999acebf92f01f2ca84225a168a182657f","11aba4fbd2d4539d8440169f219974378731ad1e65d4656bd9d8a579b79241e6","25cc1afa8e0c2b54ca3f9f1909a44f5d2dd01d9c2db855e3989aa6cc2150d8b9","5fa66a6dbdf118df539d6cc0750c3cb4271a6e5820d29f5b8b36aceed3e0e966","56cac1d8d4be53381e236d675f43c1b2342161ca45d31dfaaf340b0612d14bc5",{"version":"aa1140a9cd70541000f6756af1f2ffdabdabfa4b4264a9e68ad4b1e2d2d60ff7","signature":"9a9d0049bcc60e89618b9f0b1d2e129b9e29098fdf8aa554d51d37374e279a1e"}],"root":[[99,103],171],"options":{"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"exactOptionalPropertyTypes":true,"jsx":4,"jsxImportSource":"@lynx-js/react","module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":6,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[98,1],[89,2],[91,3],[95,4],[92,5],[93,6],[88,7],[90,8],[44,9],[83,10],[74,11],[59,12],[56,11],[81,13],[57,11],[79,14],[58,15],[84,16],[60,17],[67,15],[62,11],[61,18],[76,15],[82,19],[80,15],[63,11],[71,15],[72,15],[64,18],[70,15],[65,18],[68,15],[69,11],[77,15],[66,11],[73,15],[75,15],[47,20],[54,21],[86,22],[55,23],[96,24],[45,20],[46,25],[51,26],[52,27],[50,28],[41,29],[97,30],[108,31],[109,32],[107,32],[110,33],[117,34],[112,35],[113,32],[115,36],[114,31],[116,32],[126,37],[122,38],[125,39],[124,40],[130,41],[131,41],[129,42],[134,43],[133,42],[170,44],[136,45],[137,46],[142,47],[138,48],[140,49],[139,50],[145,51],[148,52],[150,53],[155,54],[154,55],[152,45],[156,53],[157,56],[158,57],[159,58],[167,59],[160,57],[161,54],[153,60],[166,61],[164,62],[165,63],[169,64],[168,65],[99,66],[100,66],[103,67],[101,68],[102,66],[171,69]],"latestChangedDtsFile":"./static.d.ts","version":"5.9.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/animation.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@lynx-js/types/types/common/csstype.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/animation.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/element.d.ts","../../../node_modules/@lynx-js/types/types/common/events.d.ts","../../../node_modules/@lynx-js/types/types/common/system-info.d.ts","../../../node_modules/@lynx-js/types/types/common/performance.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/events.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/common/lynx.d.ts","../../../node_modules/@lynx-js/types/types/common/global.d.ts","../../../node_modules/@lynx-js/types/types/common/props.d.ts","../../../node_modules/@lynx-js/types/types/common/element/component.d.ts","../../../node_modules/@lynx-js/types/types/common/element/filter-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/common.d.ts","../../../node_modules/@lynx-js/types/types/common/element/inline-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list-item.d.ts","../../../node_modules/@lynx-js/types/types/common/element/page.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/text.d.ts","../../../node_modules/@lynx-js/types/types/common/element/view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/input.d.ts","../../../node_modules/@lynx-js/types/types/common/element/textarea.d.ts","../../../node_modules/@lynx-js/types/types/common/element/title-bar-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/svg.d.ts","../../../node_modules/@lynx-js/types/types/common/element/refresh.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-coordinator.d.ts","../../../node_modules/@lynx-js/types/types/common/element/viewpager.d.ts","../../../node_modules/@lynx-js/types/types/common/element/blur-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/webview.d.ts","../../../node_modules/@lynx-js/types/types/common/element/markdown.d.ts","../../../node_modules/@lynx-js/types/types/common/element/video.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx-performance-entry.d.ts","../../../node_modules/@lynx-js/types/types/common/element/frame.d.ts","../../../node_modules/@lynx-js/types/types/common/element/overlay.d.ts","../../../node_modules/@lynx-js/types/types/common/element/element.d.ts","../../../node_modules/@lynx-js/types/types/common/element/methods.d.ts","../../../node_modules/@lynx-js/types/types/common/element/attributes.d.ts","../../../node_modules/@lynx-js/types/types/common/element/index.d.ts","../../../node_modules/@lynx-js/types/types/common/console.d.ts","../../../node_modules/@lynx-js/types/types/common/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/event.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/nodes-ref.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/app.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/performance.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/fetch.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/native-modules.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/text-encoder-decoder.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/@lynx-js/react/runtime/jsx-runtime/index.d.ts","../src/font.ts","../src/handler.ts","../src/scale.ts","../src/install.ts","../src/module.ts","../src/index.ts","../../foundation/dist/collections.d.ts","../../foundation/dist/culture/bidi.d.ts","../../foundation/dist/culture/digits.d.ts","../../foundation/dist/culture/culture.d.ts","../../foundation/dist/culture/calendar.d.ts","../../foundation/dist/culture/coordinates.d.ts","../../foundation/dist/culture/date-format.d.ts","../../foundation/dist/culture/duration.d.ts","../../foundation/dist/culture/natural-date.d.ts","../../foundation/dist/culture/numbers.d.ts","../../foundation/dist/culture/strings.d.ts","../../foundation/dist/culture/relative-time.d.ts","../../foundation/dist/culture/text.d.ts","../../foundation/dist/culture/index.d.ts","../../foundation/dist/enums/index.d.ts","../../foundation/dist/errors.d.ts","../../foundation/dist/exec/diagnostics.d.ts","../../foundation/dist/services/abort.d.ts","../../foundation/dist/exec/options.d.ts","../../foundation/dist/services/clock.d.ts","../../foundation/dist/exec/trace.d.ts","../../foundation/dist/exec/safe-executor.d.ts","../../foundation/dist/exec/index.d.ts","../../foundation/dist/icons/generated/glyph-svg.d.ts","../../foundation/dist/icons/glyph.d.ts","../../foundation/dist/icons/icon.d.ts","../../foundation/dist/icons/glyph-slots.d.ts","../../foundation/dist/icons/icon-fonts.d.ts","../../foundation/dist/icons/packs.d.ts","../../foundation/dist/icons/svg.d.ts","../../foundation/dist/icons/index.d.ts","../../foundation/dist/layout/index.d.ts","../../foundation/dist/route/address.d.ts","../../foundation/dist/route/catalogue.d.ts","../../foundation/dist/route/journey.d.ts","../../foundation/dist/route/sink.d.ts","../../foundation/dist/route/resolve.d.ts","../../foundation/dist/route/view.d.ts","../../foundation/dist/route/index.d.ts","../../foundation/dist/services/feedback.d.ts","../../foundation/dist/services/preferences.d.ts","../../foundation/dist/services/contracts.d.ts","../../foundation/dist/services/keys.d.ts","../../foundation/dist/services/motion.d.ts","../../foundation/dist/services/index.d.ts","../../foundation/dist/tokens/generated/palettes.d.ts","../../foundation/dist/theme/aliases.d.ts","../../foundation/dist/tokens/shape.d.ts","../../foundation/dist/theme/color.d.ts","../../foundation/dist/theme/theme.d.ts","../../foundation/dist/theme/brand.d.ts","../../foundation/dist/theme/appearance.d.ts","../../foundation/dist/theme/contrast.d.ts","../../foundation/dist/theme/control-colors.d.ts","../../foundation/dist/theme/css-color.d.ts","../../foundation/dist/theme/design.d.ts","../../foundation/dist/theme/oklch.d.ts","../../foundation/dist/theme/recipe.d.ts","../../foundation/dist/tokens/generated/metrics.d.ts","../../foundation/dist/tokens/layout-metrics.d.ts","../../foundation/dist/tokens/css-vars.d.ts","../../foundation/dist/tokens/derived.d.ts","../../foundation/dist/theme/variants.d.ts","../../foundation/dist/theme/index.d.ts","../../foundation/dist/tokens/root.d.ts","../../foundation/dist/tokens/index.d.ts","../../foundation/dist/index.d.ts","../src/static.ts"],"fileIdsList":[[41,96,97],[42,86,87,88],[53],[42,78,87,88,89,90,92,93,94],[42,86,87,88,90,91],[86,88],[42,86],[49,78],[43],[44],[51,55],[47],[41,51,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80],[47,51,55,78],[47,51,55],[56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80,81,82,83],[58,59],[47,51,55,59],[47,61,64],[46],[48,52,53,95],[44,47,48,49,51,53,54,55,84,85],[44,47],[52,86,95],[45,86],[46,47,55],[45,46,50,51],[49,86],[38,39,40],[41],[108],[107],[107,108,109],[106,107,108,109,110,111,112,113,114,115,116,117],[109],[115],[121,123,125,126],[122],[115,121,122,123,124,125],[121,124],[130],[129],[128,129,130,131,132,133,134],[105,118,119,120,127,135,136,143,149,168,170],[120],[120,137],[137,138,139,140,141,142],[138],[137,138,140],[137],[120,122,124,140,144,145],[122,124,144,145,146,147,148],[150],[150,152,154,155],[150,153,154],[153,154],[153],[152,154],[151,153,154,155,156,157,158,159,160,161,162,167],[150,153],[119,150,153,166],[150,163,164],[150,165],[150,152,163,164,165,166,169],[150,152,165],[98],[98,100,101,102,103],[98,99,100,101],[98,99,171]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6fdd3074ba01fc8aff89a11055a33516aff7a42a3599fc0e7dce64047a5e3fd","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"035312d4945d13efa134ae482f6dc56a1a9346f7ac3be7ccbad5741058ce87f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"07b03f752ae52a7130e06c5a8399d3a0dde07a1a634f8430b80cd6236c56b5c8","impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"acbac4ca6cd4b2b459debc4a274535775cb6278a8315be383fafa623ab78f18e","impliedFormat":1},{"version":"e421d0b097c78304a2597c1f33da586630e1dc665ae381c0c36e5ebc4aaf4566","impliedFormat":1},{"version":"adf624c89a0d509a789f3c0bf522969d2c47033dbeb50920b37cd89be475a65e","impliedFormat":1},{"version":"f4664d05efc95a0fb8ee228d391e5271a1c8fc9bc3452c7bd760f9ca18b5a837","impliedFormat":1},{"version":"b32b532dcbe0a91d71fd94cb780e94bdfdce10be21608d914c29fb4b8939b24a","impliedFormat":1},{"version":"eb2b64881998b562a4fe9330e55aa2466cd3a41a1a57e93feac6555218cec06f","impliedFormat":1},{"version":"6db1694d205177322d792d924335b046b80607445a45c0d2de1fcffd190b48c0","impliedFormat":1},{"version":"d5465281e0aaffe267f46382c5f014740dc16e7fd8e1c57a0b0ddf8a2eab9be4","impliedFormat":1},{"version":"f7e5c3960dd9df65d83408b9be446f7119fa1db1dd8266dd343349d90c3bf2ce","impliedFormat":1},{"version":"09c6491ed74af89a4155feafedecaf77780f5751c66d4b65b18d30fc0e053a75","impliedFormat":1},{"version":"188b01044640e5ef65f6edf0dd6e6454f02dd19f4ead66b9e03ebe26cc7298ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d34d6de13412a24e8d9252040d972edce68b4db8d8a64a3f7fd63ca1fda3a67f","impliedFormat":1},{"version":"5bf51107315834a209b08395b141e262b7d143d14f6b4e4d403d8e020cef7e32","impliedFormat":1},{"version":"db0dcbe48d5cb38315083b412c8ab6995b0d42dc73b286833e296827feb0e5b4","impliedFormat":1},{"version":"b3e4a49a3ba19463662e7b821544948b953d2f6708370d42406bda558084000c","impliedFormat":1},{"version":"7c5e49b3d96da389b07d4ae3705c9f33a03dadcd04e6c0e76edece6d636f4ce7","impliedFormat":1},{"version":"24e9add3c802e7c9431b2c99edbbda02c1899901fd955dfb2e9ee3e9cdc93c4c","impliedFormat":1},{"version":"cd6611fd8cd9d40de1bdec02a3c5027c968c4aaf7639ee88ee48b2c41edeaddc","impliedFormat":1},{"version":"32d1e153cac16ca3a3f5f6b68fae76cddcda509950fa00d038c465776359db0c","impliedFormat":1},{"version":"0d85d0fa55dd433acf924675d7e976c025c8521c91a76079844cd15e52855ccf","impliedFormat":1},{"version":"89da6ea3ee9735e712691227b0e5ee74381779f9ad8b0f4fb7ced0247b16735a","impliedFormat":1},{"version":"77fbe475cb649a3598aa8f932ab5f6fe011444d94b52d329078c1f6d63c5d3bd","impliedFormat":1},{"version":"7618f7fdf0abf7f712cefe766ac1ab7fcd1f8e753c513e57d3ada9ada3a57257","impliedFormat":1},{"version":"db0441149b37984c225e945a112713d07616b34552d64f814c5cbf8e8c95f165","impliedFormat":1},{"version":"51f5a8fa3de5f13b21ba2604b4de8f0aae3d97acadab981d536a282ea26257af","impliedFormat":1},{"version":"0e323630cbfda771430e2720f6a2f02f257becd8fb9722aa975ae773fb572210","impliedFormat":1},{"version":"56dbc770513baae28f7cfbadeba5078bb13a37a13132a5292e98a8b103312b98","impliedFormat":1},{"version":"84ff906032fe12e816bfb7441cee6726243e5a7316c4f2d6b0a6c149f1a91a16","impliedFormat":1},{"version":"446e9432c63958893f65b4f7eea86fb5b506c2e0e7dd971a1f75e361b333a3db","impliedFormat":1},{"version":"dcbbe1fb0f2c0efc12e29db8bbccb5b82513384d01d7a55342065cb0611da272","impliedFormat":1},{"version":"af209189a194cf5ad1f7b22dd680b52843fec2e30f1283be20b2977872fd4424","impliedFormat":1},{"version":"18e37ffc10db360e66b0af639e55bcc66496830994734f64a97c6751458f7f3a","impliedFormat":1},{"version":"14137199a98201c616a7ee925bfaa9809b659dfbec733f86fa5dc5348a897de6","impliedFormat":1},{"version":"f64cd565aca17df45f4666473da75e4ce51a2610e2ed1c31198e9f9325747a24","impliedFormat":1},{"version":"e415a17ab6a413d6be640457231e045541405eab1f0f370c7dd1e5567aa25999","impliedFormat":1},{"version":"8c03a41d6dc701b6648db83d71a92dc27147d7677ab5d70f32675e7e37b3795a","impliedFormat":1},{"version":"e27b62f2410bb10697800d1c09ae2c48db46cd1eca18ffdd35022b1802bfd6d5","impliedFormat":1},{"version":"2ec0bfa713f313f8b2dc2bf64c5962433722ea7b413f69428106a65584656dc9","impliedFormat":1},{"version":"b2d74af681f440a07e714ae9a33e3ea49c79870b9674058114c0404d2aa2f190","impliedFormat":1},{"version":"24f31e43eb3505e5d2946315e7b8ee8b426dfbe92c3031e435a4eb2d9dd8d69f","affectsGlobalScope":true,"impliedFormat":1},{"version":"5b6a59d1e98f908badf07f243deb42ebd926b4e3d33ec00a5f50cbb8d0464488","impliedFormat":1},{"version":"c669ee7ba01fa6a60b17c3535f96b65fa82dfd2a475a8760364f2f3952f9bcbd","impliedFormat":1},{"version":"a8b121f6a75d603075e62793ff0c109112e882dd6ca2b70bdccbd8d8f753429b","impliedFormat":1},{"version":"f378d7ed5e3ecbe382ade55127a9c98e826c76f786e06effad6fde91a7023d55","impliedFormat":1},{"version":"4e3e9539df72b3bfcc56fa13140070020dac72f1eff39237b11253482cb99847","impliedFormat":1},{"version":"5a47b3a2bbe2c9b015fe356462afe0abe391c592fffbe277126e2415e0811967","impliedFormat":1},{"version":"b1248e5931d2a49c697203e69449c58dacd3d19f12d76bf11d816600a0cf423b","impliedFormat":1},{"version":"0b02aebd8c41453aefd3b1f33b9b9862a57770f8b21e916ecc5b35c0bedcc52b","impliedFormat":1},{"version":"e52840670587e82e129c9bfc6a2f42d9c2f2e1fd6ce176fea998383a8c941ea5","impliedFormat":1},{"version":"31ca1ee726f5d7c7709913b98be76fc40fdfaaca6ad7fafc222108981e11227c","impliedFormat":1},{"version":"556db73da59f5162cdf5c7ea1bc3b063b6ccb758078ef6517ad6f6e4ae7b199a","impliedFormat":1},{"version":"0a2c8ef08611f5a5f711c7b10ba70d10dc1c6af0c9dba8168cbbf34911b74188","impliedFormat":1},{"version":"1d6ef45145a9939a43062fe18188d4f7bdfdf4547978e1f6b7c9089fe53e81e5","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"509a86836776d5c821901abc16a2d21de674d2c8943ceb8d018049bf324bc56c","impliedFormat":99},{"version":"b1ea7506d20974fb82c053b1d8100e87b9d519b7d84fe4be5ed60e3646a844f7","signature":"38655a9fed08ff0c8bdd6edb268c7dbff4bf4ca10aa583b3f8fa721761291424"},{"version":"823c769e9fcd2cc337bd20d0af86aa132f942f4a32c44d98a8e0cf52961eafc2","signature":"a8bac9ebea903abafa71f7ad6755e74d6328be5780aa29e14b0c77eacdb60cd8"},{"version":"32080722e392dcbac211b4619670d336ba25b26879bf218e8a2a50f51da4a643","signature":"95355d33a0fd83121ff31825e2996727c02c7f9376859df54c9ddd816654defd"},{"version":"28908bc3a371692fd19c1e90a31df5e98e35571a2fab86817146b00ac137430e","signature":"8528be294c33c228a3977f695fc90eb4e35385611d5236caaf959b9783026bdb"},{"version":"f2e76c8a43abc6f93648b68c44862c47ee1e782b78a2099fe7ef141e4c32db9c","signature":"7ea7b86acd5c6ecde4ac0e514c1430f702d089ef019aedf74ad6182511ab6049"},{"version":"2e5ea5a3b2f1f4c279471770b4194a82119aceff2303cfb45bb8276e403f8aa2","signature":"bf6d07eb44ac4330191f90481aa9eb330c42156c53bf55159a520af72794e77c"},"d533d1fe3018752aa47ee74ae5dbdca34377441b891176ad99bd33366a64372f","577287aa28cdd2976297531706a5baea4ba5171512f500731d3feba37057d851","44b82e4f46178400732ea809a906f7ffb9dd38efab331ca23e7ca4586bf903ef","d3dcff003bac57338c3e60be409d0ff167ec1ff513539a5534c7679332dbc992","16d64c89cec74fa23e8cee7c72acc7549f117dcf7845051870c40366c7522d09","706c787ed201e67534e550d765eecfb18a8c39f46e04fcec600d0bb9d1bb6231","11f9f682c02d51de68eed569f8de1e91c56df296a78f3a6c520b93d52aac2308","28b43630d8d29a300e1e5b0f5efb04c8f994d372fff1b653ce8bb70d4e011e1a","08521f5befe6ec3f1c3a881651321f875ca6fc79db15a6130283d409f5d47d1b","b06c48902c3d127098839c1a6500f41d3e21b2f07f277ba7de23ec730df7275d","946d8fa2088c22a4cbc85875ec7c700c93cf53d7b52057fe4e6730fd613c7925","a7a0e658ca429cfb5268d4bf2e2e6e9fe871ffd06b6588d65424ba4eba35338f","2dbadaab8fa70d9d874b29e23e808b0978fd2dbaf34e3caf8303508e2b88c603","54b8f865e3bea736798e54bc95b49435f472599aea762bd17bb02a18b198c7d1","5e621ae454f5ff6bfea91a558b93eb3dee64eac6f66ad8d6739a4a7c396a42f7","ccd708c3fff99b4ec315e14315dce6b9e85f4c96d10131e9fd219edb6efbdb26","abc924fce33b86b9f8588de3a5be04c609fafa6cb1dc42629b3e9e3e18f7d018","f919e3a8b2d274b631ee4fee0c50eba1d3f39ceaccba04dff915e9f61e9f153c","3ae17ae844491c7326d070c3e70a94a9239394e7a1e84eb203eb1d57470e752e","d1b2970d348eb9f89ef0f0c6730d27e9331067a28f21c8bd667ba1138d5d3e93","b2c4833e6308888c3947953770b3343deaf4276c803bb36148991a3fb90b4f6a","41b7c8204ea79a93e380a228f5c744e9c9a80183133ac62633a4c76e3fdbd7db","d0a441df587b0632c16a813117f110574d903ddd0bc4d28599cc82ff8af7c094","b24ac81f4fcff56ed9827736abcf2f92ea5f86e16d66eb2ee3ccfa0bb8143bc9","068309ff581d08c276c4a772ddf3ab9c8090e591fc9917fdc6cdffc12c95a5bf","5c1d368a451520260ebb6c06121201f18abf86d80540290df6e424d372c5d0ed","bb3ccaacf5c19a7170939b7f735c6a94537fd95ad16b4247a6ad572b23183e74","2c8b86d9d29c4ea62762c3815ffe4fdb0c5dbc0dd096b9703236010f4a17c255","7ec540fd5fb0761576c417b27ea61ec08123412487b020942c893510dce970db","f858a10d167e011155bfe5a3532f599e677bced6727c07366f380c02010650d4","465f5d53f09ac1978002bc264b8a4c0aea749c79dd2bd1917dffe57fddcb9543","cf4ef9c41637cb6995fee096890a0e6113141bcce82cc7d5754c281f03ad889e","40f34f36aba872decb7540030db33dc84f1a53d4778fd8c8ad840d68f2023f3a","10347593c1b262343845f577673e5956217a8a571c859d83e2de50a54729541f","e0a192de84052b553230c5f649307dfb49df6dce54fdc538de15078d895f5f66","228e7d711e429183ddf7fc8c331d00540557ade296fb8132d5bfc48d5c933f89","e8906c76ded4f87db27adfe3e8f9e1a729be51a6a0c2c458f31662c6278b1925","49bca6d49d9c5a525146bba60a48e448e1eabe79be789a7b5238ac10a2f620b3","08fe86bcae8e02f769d215958438d6858dc19aeed2a61c7d7327f052b0db25fc","cd3a9799c8e0996b4d31d5235a8ae105b79a7fa31ba8f660ca35b043048ef757","ee4e73f46ce2f6517e82434bd9fc63c8b6b2179d37d74525899f124a76d06669","773c827d0235c76288ab0092202c357730c5b21314241831b7dd88ef6017818e","ced97526e899f0222df6d805e008cd5bc63fee326838a9002919453f9a2a8c9b","216aa3f63d62f13b158445ff6a3bea8ccfd110f2bf219d607175518c9cc5b29d","be77edbe4d276441584b1c7b297bd8596c78913c22c590dc136d987b82a3976c","faa64d270fa523f80fd31bc7340ee7f6a21632c2ea0cea6535bf5a34bcc6adf7","931d70c96033881193232b90c39210c6cd14865f28b339843c56b5688e7fd10d","3201251d2feaa0eab2de4bd121c563cccf7ff224685c96763262c9c9d3a72064","29e6e980f179ac2981d68954462dfd4a4545f73c021f6a4c8a5f442c0e16e56c","67fe56b931e013e9980dec2a605908d44484c7bbd81d2ee9912872c11bc76515","d4924e2b191fee9b43aaeef651c87a7084281d425a30a9a8cf50de8f92b64f6d","8fc678b640b298b07d4f52a5a4f0b3a57e07e45da7a0ad25f1ffde53a152d3be","a59554ba3751ea9ad27f6948f1c71ef57f1e28bb526a53eacb0dfa76bc1df452","ea5a5d5873c239b97d846fb8c78437e08ffd731924764f746c0ebcb7731d7648","da401323d4c96e3f5b8fa8b7ecd200d47a9e340b09cefbea553d2b2b5a345e60","ead4a7fd25e5e2b756a5e71546bd8eae855c7b0ecbffd891f7fb0b6f7d80c0c1","eaea9f8e5b90d87160a885c2afc4afcd2434e149ae5a5368d4b61eed66a6a597","cc44cf86b3ddb7d61f7de3fd32116089decb662a8b6421013bd4a8ee9a079881","ab7ed47f18899e74299db14911a028a0aaf1acae17f870a64ead7d91953d40b3","298f8d2584216932ea238927177ef343d0b8da735eb40a5ba96b1f92e3675e33","c8082c78975419ed5a9f7daa655643425cdd98fee91bb82fd92d25f908c78465","24a588d942a36d853d18dfe63711e9b180ea0448b956dadce7833f4d6455f0c8","c263cc53a55cc822c360481e94d0fe999acebf92f01f2ca84225a168a182657f","11aba4fbd2d4539d8440169f219974378731ad1e65d4656bd9d8a579b79241e6","25cc1afa8e0c2b54ca3f9f1909a44f5d2dd01d9c2db855e3989aa6cc2150d8b9","5fa66a6dbdf118df539d6cc0750c3cb4271a6e5820d29f5b8b36aceed3e0e966","56cac1d8d4be53381e236d675f43c1b2342161ca45d31dfaaf340b0612d14bc5",{"version":"aa1140a9cd70541000f6756af1f2ffdabdabfa4b4264a9e68ad4b1e2d2d60ff7","signature":"9a9d0049bcc60e89618b9f0b1d2e129b9e29098fdf8aa554d51d37374e279a1e"}],"root":[[99,104],172],"options":{"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"exactOptionalPropertyTypes":true,"jsx":4,"jsxImportSource":"@lynx-js/react","module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":6,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[98,1],[89,2],[91,3],[95,4],[92,5],[93,6],[88,7],[90,8],[44,9],[83,10],[74,11],[59,12],[56,11],[81,13],[57,11],[79,14],[58,15],[84,16],[60,17],[67,15],[62,11],[61,18],[76,15],[82,19],[80,15],[63,11],[71,15],[72,15],[64,18],[70,15],[65,18],[68,15],[69,11],[77,15],[66,11],[73,15],[75,15],[47,20],[54,21],[86,22],[55,23],[96,24],[45,20],[46,25],[51,26],[52,27],[50,28],[41,29],[97,30],[109,31],[110,32],[108,32],[111,33],[118,34],[113,35],[114,32],[116,36],[115,31],[117,32],[127,37],[123,38],[126,39],[125,40],[131,41],[132,41],[130,42],[135,43],[134,42],[171,44],[137,45],[138,46],[143,47],[139,48],[141,49],[140,50],[146,51],[149,52],[151,53],[156,54],[155,55],[153,45],[157,53],[158,56],[159,57],[160,58],[168,59],[161,57],[162,54],[154,60],[167,61],[165,62],[166,63],[170,64],[169,65],[99,66],[100,66],[104,67],[102,68],[103,66],[101,66],[172,69]],"latestChangedDtsFile":"./static.d.ts","version":"5.9.3"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createG9WebHostHandler, createMemoryWebStorage, type G9WebEnvelope, type G9WebFinding, type G9WebFindings, type G9WebHostOptions, type G9WebInsets, type G9WebStorage, pageStorage, } from './handler.js';
|
|
2
|
-
export { bridgeStartText, bridgeViewportUnits, checkG9WebScreen, G9_WEB_STYLE_RULES, type G9LynxViewElement, type G9SizeWatcher, type G9WebInstallOptions, g9WebFindings, g9WebHostModuleUrl, installG9WebHost, pageSafeInsets, subscribeG9WebFindings, toContainerUnits, } from './install.js';
|
|
2
|
+
export { bridgeLinearDisplay, bridgeStartText, bridgeViewportUnits, checkG9WebScreen, G9_WEB_STYLE_RULES, type G9ComputedStyleReader, type G9LynxViewElement, type G9SizeWatcher, type G9WebInstallOptions, g9WebFindings, g9WebHostModuleUrl, installG9WebHost, pageSafeInsets, subscribeG9WebFindings, toContainerUnits, } from './install.js';
|
|
3
3
|
export type { G9WebHostModule } from './module.js';
|
|
4
|
+
export { bridgeScaledRects, unscaleRect, viewScale } from './scale.js';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { createG9WebHostHandler, createMemoryWebStorage, pageStorage } from "./handler.js";
|
|
2
|
-
export { G9_WEB_STYLE_RULES, bridgeStartText, bridgeViewportUnits, checkG9WebScreen, g9WebFindings, g9WebHostModuleUrl, installG9WebHost, pageSafeInsets, subscribeG9WebFindings, toContainerUnits } from "./install.js";
|
|
2
|
+
export { G9_WEB_STYLE_RULES, bridgeLinearDisplay, bridgeStartText, bridgeViewportUnits, checkG9WebScreen, g9WebFindings, g9WebHostModuleUrl, installG9WebHost, pageSafeInsets, subscribeG9WebFindings, toContainerUnits } from "./install.js";
|
|
3
|
+
export { bridgeScaledRects, unscaleRect, viewScale } from "./scale.js";
|
package/dist/install.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ export interface G9LynxViewElement {
|
|
|
17
17
|
browserConfig?: Record<string, unknown> | string | undefined;
|
|
18
18
|
readonly clientWidth?: number;
|
|
19
19
|
readonly clientHeight?: number;
|
|
20
|
+
/** Its layout width (an ancestor's scale aside) and its drawn rect: the scale bridge compares them (LC-26). */
|
|
21
|
+
readonly offsetWidth?: number;
|
|
22
|
+
getBoundingClientRect?(): DOMRect;
|
|
20
23
|
/** Where the card's elements live (an open shadow root, attached when the view first renders). */
|
|
21
24
|
readonly shadowRoot?: Node | null;
|
|
22
25
|
attachShadow?(init: {
|
|
@@ -54,6 +57,20 @@ export declare function bridgeViewportUnits(root: Node & {
|
|
|
54
57
|
* `MutationObserver`).
|
|
55
58
|
*/
|
|
56
59
|
export declare function bridgeStartText(root: Node): () => void;
|
|
60
|
+
/** What the bridge reads of an element's computed style (the page's `getComputedStyle`; tests pass a fake). */
|
|
61
|
+
export type G9ComputedStyleReader = (element: Element) => Pick<CSSStyleDeclaration, 'getPropertyValue'>;
|
|
62
|
+
/**
|
|
63
|
+
* LC-27: where a browser has no style container queries (Firefox), web-elements copies each element's
|
|
64
|
+
* `--lynx-display` and `--lynx-linear-orientation` into the attributes `lynx-computed-display` and
|
|
65
|
+
* `lynx-linear-orientation` and lays it out by them (`linear` + `vertical` is `flex-direction: column !important`).
|
|
66
|
+
* It reads them when the element is connected and when its class or style changes, not when a style sheet arrives.
|
|
67
|
+
* A page's first view gets its card's style sheet after its elements (later views find it ready), so every element
|
|
68
|
+
* kept the default `linear`: rows stood stacked in the first view only. When a style sheet is added to `root` or its
|
|
69
|
+
* text changes, every such element reads both again (in the next frame, once per burst). Nothing happens in a browser
|
|
70
|
+
* without those attributes. Upstream: lynx-stack issue #3349 (fix PR #4236); drop this once web-elements carries it.
|
|
71
|
+
* Returns the stop function.
|
|
72
|
+
*/
|
|
73
|
+
export declare function bridgeLinearDisplay(root: Node & ParentNode, computed?: G9ComputedStyleReader | undefined): () => void;
|
|
57
74
|
/** Options of {@link installG9WebHost}. */
|
|
58
75
|
export interface G9WebInstallOptions extends G9WebHostOptions {
|
|
59
76
|
/** The URL of this package's worker module (`@g9tm/lynxcontrols-web/module`), when a bundler moved it. */
|
package/dist/install.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAWA,OAAO,EAA0B,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAWA,OAAO,EAA0B,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAGhH,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACtD,mBAAmB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IACjG,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC7D,uFAAuF;IACvF,gBAAgB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,GAAG,IAAI,CAAC;IAChG,mBAAmB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,C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AG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAiBzG;AAiBD,qGAAqG;AACrG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,GAAE,mBAAwB,GAAG,MAAM,IAAI,CA0GvG"}
|
package/dist/install.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { G9_WEB_FONT_STACK } from "./font.js";
|
|
2
2
|
import { createG9WebHostHandler } from "./handler.js";
|
|
3
|
+
import { bridgeScaledRects } from "./scale.js";
|
|
3
4
|
function resizeObserverWatcher() {
|
|
4
5
|
if ("u" < typeof ResizeObserver) return null;
|
|
5
6
|
return (element, onResize)=>{
|
|
@@ -11,7 +12,8 @@ function resizeObserverWatcher() {
|
|
|
11
12
|
const G9_WEB_STYLE_RULES = [
|
|
12
13
|
`:host { font-family: ${G9_WEB_FONT_STACK}; }`,
|
|
13
14
|
'x-text::part(inner-box) { unicode-bidi: plaintext; }',
|
|
14
|
-
':host { container-type: size; }'
|
|
15
|
+
':host { container-type: size; }',
|
|
16
|
+
'@supports (-moz-appearance: none) { x-view:not([g9-no]) { flex-direction: var(--flex-direction, var(--linear-flex-direction, column)); flex-wrap: var(--flex-wrap, nowrap); } }'
|
|
15
17
|
];
|
|
16
18
|
const VIEWPORT_UNIT = /(\d)v(w|h|min|max)\b/g;
|
|
17
19
|
const HAS_VIEWPORT_UNIT = /\dv(w|h|min|max)\b/;
|
|
@@ -72,6 +74,24 @@ function bridgeViewportUnits(root) {
|
|
|
72
74
|
return ()=>observer.disconnect();
|
|
73
75
|
}
|
|
74
76
|
const INPUTS = 'x-input[default-value], x-textarea[default-value]';
|
|
77
|
+
function afterUpgrade(view, then) {
|
|
78
|
+
const registry = "u" < typeof customElements ? void 0 : customElements;
|
|
79
|
+
const tag = view.localName;
|
|
80
|
+
if (!registry || !(null == tag ? void 0 : tag.includes('-'))) return;
|
|
81
|
+
const defined = registry.get(tag);
|
|
82
|
+
if (defined && view instanceof defined) return;
|
|
83
|
+
registry.whenDefined(tag).then(()=>{
|
|
84
|
+
registry.upgrade(view);
|
|
85
|
+
then();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function restoreOwn(view, ours) {
|
|
89
|
+
const target = view;
|
|
90
|
+
for (const key of Object.keys(ours)){
|
|
91
|
+
delete target[key];
|
|
92
|
+
target[key] = ours[key];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
75
95
|
function startTextOf(element) {
|
|
76
96
|
const text = element.getAttribute('default-value');
|
|
77
97
|
if (null !== text && !element.hasAttribute('value')) element.setAttribute('value', text);
|
|
@@ -99,6 +119,47 @@ function bridgeStartText(root) {
|
|
|
99
119
|
});
|
|
100
120
|
return ()=>observer.disconnect();
|
|
101
121
|
}
|
|
122
|
+
const LINEAR_ATTRIBUTES = [
|
|
123
|
+
[
|
|
124
|
+
'lynx-computed-display',
|
|
125
|
+
'--lynx-display'
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
'lynx-linear-orientation',
|
|
129
|
+
'--lynx-linear-orientation'
|
|
130
|
+
]
|
|
131
|
+
];
|
|
132
|
+
function relinear(root, computed) {
|
|
133
|
+
for (const element of Array.from(root.querySelectorAll('[lynx-computed-display]'))){
|
|
134
|
+
const style = computed(element);
|
|
135
|
+
for (const [attribute, property] of LINEAR_ATTRIBUTES){
|
|
136
|
+
const value = style.getPropertyValue(property).trim();
|
|
137
|
+
if (value && element.getAttribute(attribute) !== value) element.setAttribute(attribute, value);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const isStyle = (node)=>'STYLE' === node.nodeName || 'LINK' === node.nodeName;
|
|
142
|
+
function bridgeLinearDisplay(root, computed = 'function' == typeof getComputedStyle ? getComputedStyle : void 0) {
|
|
143
|
+
if ("u" < typeof MutationObserver || !computed) return ()=>void 0;
|
|
144
|
+
let queued = false;
|
|
145
|
+
const later = 'function' == typeof requestAnimationFrame ? requestAnimationFrame : (run)=>setTimeout(run, 16);
|
|
146
|
+
const observer = new MutationObserver((records)=>{
|
|
147
|
+
if (queued) return;
|
|
148
|
+
const styled = records.some((r)=>isStyle(r.target) || null !== r.target.parentNode && isStyle(r.target.parentNode) || Array.from(r.addedNodes).some((n)=>isStyle(n) || n instanceof Element && n.querySelector('style, link')));
|
|
149
|
+
if (!styled) return;
|
|
150
|
+
queued = true;
|
|
151
|
+
later(()=>{
|
|
152
|
+
queued = false;
|
|
153
|
+
relinear(root, computed);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
observer.observe(root, {
|
|
157
|
+
childList: true,
|
|
158
|
+
subtree: true,
|
|
159
|
+
characterData: true
|
|
160
|
+
});
|
|
161
|
+
return ()=>observer.disconnect();
|
|
162
|
+
}
|
|
102
163
|
function pageSafeInsets() {
|
|
103
164
|
if ("u" < typeof document || !document.body) return {
|
|
104
165
|
top: 0,
|
|
@@ -225,12 +286,23 @@ function installG9WebHost(view, options = {}) {
|
|
|
225
286
|
...null != previousRules ? previousRules : [],
|
|
226
287
|
...rules
|
|
227
288
|
];
|
|
289
|
+
const ours = {
|
|
290
|
+
nativeModulesMap: view.nativeModulesMap,
|
|
291
|
+
onNativeModulesCall: view.onNativeModulesCall,
|
|
292
|
+
injectStyleRules: view.injectStyleRules
|
|
293
|
+
};
|
|
294
|
+
let removed = false;
|
|
295
|
+
afterUpgrade(view, ()=>{
|
|
296
|
+
if (!removed) restoreOwn(view, ours);
|
|
297
|
+
});
|
|
228
298
|
let stopBridges;
|
|
229
299
|
const ownAttach = Object.prototype.hasOwnProperty.call(view, 'attachShadow') ? view.attachShadow : void 0;
|
|
230
300
|
const bridge = (root)=>{
|
|
231
301
|
const stops = [
|
|
232
302
|
bridgeStartText(root),
|
|
233
|
-
bridgeViewportUnits(root)
|
|
303
|
+
bridgeViewportUnits(root),
|
|
304
|
+
bridgeScaledRects(view, root),
|
|
305
|
+
bridgeLinearDisplay(root)
|
|
234
306
|
];
|
|
235
307
|
stopBridges = ()=>{
|
|
236
308
|
for (const stop of stops)stop();
|
|
@@ -293,6 +365,7 @@ function installG9WebHost(view, options = {}) {
|
|
|
293
365
|
});
|
|
294
366
|
return ()=>{
|
|
295
367
|
var _view_removeEventListener;
|
|
368
|
+
removed = true;
|
|
296
369
|
null == (_view_removeEventListener = view.removeEventListener) || _view_removeEventListener.call(view, 'error', onError);
|
|
297
370
|
null == stopBridges || stopBridges();
|
|
298
371
|
if (ownAttach) view.attachShadow = ownAttach;
|
|
@@ -305,6 +378,6 @@ function installG9WebHost(view, options = {}) {
|
|
|
305
378
|
view.injectStyleRules = previousRules;
|
|
306
379
|
};
|
|
307
380
|
}
|
|
308
|
-
export { G9_WEB_STYLE_RULES, bridgeStartText, bridgeViewportUnits, checkG9WebScreen, g9WebFindings, g9WebHostModuleUrl, installG9WebHost, pageSafeInsets, subscribeG9WebFindings, toContainerUnits };
|
|
381
|
+
export { G9_WEB_STYLE_RULES, bridgeLinearDisplay, bridgeStartText, bridgeViewportUnits, checkG9WebScreen, g9WebFindings, g9WebHostModuleUrl, installG9WebHost, pageSafeInsets, subscribeG9WebFindings, toContainerUnits };
|
|
309
382
|
|
|
310
383
|
//# sourceMappingURL=install.js.map
|
package/dist/install.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sources":["../src/install.ts"],"sourcesContent":["// Installs G9HostModule on a `<lynx-view>` (Lynx for Web): names the worker module (./module.ts) in the view's\n// `nativeModulesMap` and answers its calls from the page (`onNativeModulesCall`, ./handler.ts). Call it before the\n// view gets its `url`. The page's safe-area insets (`env(safe-area-inset-*)`) are measured once and again on every\n// resize, and sent to the page as the `g9:insets` event the native hosts send on rotation.\n//\n// The window a G9 provider sizes its layout class by is the VIEW: Lynx for Web fills SystemInfo from the screen\n// (`screen.availWidth`) and sends no resize, so a 390 px `<lynx-view>` in a 1,600 px window reported `desktop` and\n// never changed. The host starts the view's `browserConfig` at its own size and reports every change of it as the\n// `onWindowResize` event the provider listens to (the event a native host sends on a window resize).\n\nimport { G9_WEB_FONT_STACK } from './font';\nimport { createG9WebHostHandler, type G9WebFindings, type G9WebHostOptions, type G9WebInsets } from './handler';\n\n/** The part of a `<lynx-view>` element (@lynx-js/web-core) the host uses. */\nexport interface G9LynxViewElement {\n nativeModulesMap?: Record<string, string> | undefined;\n onNativeModulesCall?: ((name: string, data: unknown, moduleName: string) => unknown) | undefined;\n sendGlobalEvent?(eventName: string, params: unknown[]): void;\n /** The view's own events (`error`: the runtime caught an error in the page's code). */\n addEventListener?(type: string, listener: (event: { readonly detail?: unknown }) => void): void;\n removeEventListener?(type: string, listener: (event: { readonly detail?: unknown }) => void): void;\n /** CSS rules inserted into the view's shadow root, read when the card starts. */\n injectStyleRules?: string[] | undefined;\n /** The view's SystemInfo overrides (pixelWidth / pixelHeight / pixelRatio), read when the card starts. */\n browserConfig?: Record<string, unknown> | string | undefined;\n readonly clientWidth?: number;\n readonly clientHeight?: number;\n /** Where the card's elements live (an open shadow root, attached when the view first renders). */\n readonly shadowRoot?: Node | null;\n attachShadow?(init: { mode: 'open' | 'closed' }): Node;\n}\n\n/** Watches an element's size (`ResizeObserver`); tests pass a fake. Returns the stop function. */\nexport type G9SizeWatcher = (element: object, onResize: () => void) => () => void;\n\n/** The page's `ResizeObserver` as a size watcher, or null where there is none (read when a host is installed). */\nfunction resizeObserverWatcher(): G9SizeWatcher | null {\n if (typeof ResizeObserver === 'undefined') return null;\n return (element, onResize) => {\n const observer = new ResizeObserver(() => onResize());\n observer.observe(element as Element);\n return () => observer.disconnect();\n };\n}\n\n/**\n * The rules the host adds to the view's shadow root so a browser draws text as the native engines do:\n * - the system font: a browser's default is a serif, the native default the system's sans;\n * - each text's direction from its first strong letter (`@g9tm/lynxcontrols` in a Persian page reads as written, as on\n * Android and iOS), where the browser would take it from the CSS `direction` and move the `@` to the end;\n * - the view as a size container, the box the viewport units measure against ({@link bridgeViewportUnits}).\n */\nexport const G9_WEB_STYLE_RULES: readonly string[] = [\n `:host { font-family: ${G9_WEB_FONT_STACK}; }`,\n 'x-text::part(inner-box) { unicode-bidi: plaintext; }',\n ':host { container-type: size; }',\n];\n\nconst VIEWPORT_UNIT = /(\\d)v(w|h|min|max)\\b/g;\nconst HAS_VIEWPORT_UNIT = /\\dv(w|h|min|max)\\b/;\n\n/** `100vw` → `100cqw`, `calc(50vh - 8px)` → `calc(50cqh - 8px)`. */\nexport const toContainerUnits = (value: string): string => value.replace(VIEWPORT_UNIT, '$1cq$2');\n\nfunction rewriteDeclaration(style: CSSStyleDeclaration): void {\n for (let i = 0; i < style.length; i++) {\n const name = style.item(i);\n const value = style.getPropertyValue(name);\n if (HAS_VIEWPORT_UNIT.test(value))\n style.setProperty(name, toContainerUnits(value), style.getPropertyPriority(name));\n }\n}\n\nfunction rewriteRules(rules: CSSRuleList): void {\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i] as CSSRule & { style?: CSSStyleDeclaration; cssRules?: CSSRuleList };\n if (rule.style) rewriteDeclaration(rule.style);\n if (rule.cssRules) rewriteRules(rule.cssRules);\n }\n}\n\n/**\n * Viewport units on the web: a native engine measures `vw` / `vh` against the LynxView, a browser against its window,\n * so lynx-ui's sheet (`width: 100vw`) in a 390 px view inside a 1,600 px window was 1,600 px wide and its text ran out\n * of the view. The view is a size container (`:host { container-type: size }`, {@link G9_WEB_STYLE_RULES}; it already\n * has `contain: strict`), and every viewport unit under `root` becomes the container's own (`cqw`, `cqh`, `cqmin`,\n * `cqmax`): in each style sheet once, and in each element's inline style as it is written. Returns the stop function.\n */\nexport function bridgeViewportUnits(\n root: Node & { styleSheets?: StyleSheetList; adoptedStyleSheets?: CSSStyleSheet[] },\n): () => void {\n if (typeof MutationObserver === 'undefined') return () => undefined;\n const seen = new WeakSet<object>();\n const sheets = () => {\n for (const sheet of [...Array.from(root.styleSheets ?? []), ...(root.adoptedStyleSheets ?? [])]) {\n if (seen.has(sheet)) continue;\n seen.add(sheet);\n try {\n rewriteRules((sheet as CSSStyleSheet).cssRules);\n } catch {\n // a cross-origin sheet hides its rules\n }\n }\n };\n const inline = (element: Element) => {\n const text = element.getAttribute('style');\n if (text && HAS_VIEWPORT_UNIT.test(text)) rewriteDeclaration((element as HTMLElement).style);\n };\n const scan = (node: Node) => {\n if (!(node instanceof Element)) return;\n inline(node);\n for (const e of Array.from(node.querySelectorAll('[style]'))) inline(e);\n };\n sheets();\n for (const child of Array.from(root.childNodes)) scan(child);\n const observer = new MutationObserver((records) => {\n sheets();\n for (const r of records) {\n if (r.type === 'childList') for (const n of Array.from(r.addedNodes)) scan(n);\n else if (r.target instanceof Element) inline(r.target);\n }\n });\n observer.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: ['style'] });\n return () => observer.disconnect();\n}\n\nconst INPUTS = 'x-input[default-value], x-textarea[default-value]';\n\n/** Gives one input its start text, unless it already has a `value`. */\nfunction startTextOf(element: Element): void {\n const text = element.getAttribute('default-value');\n if (text !== null && !element.hasAttribute('value')) element.setAttribute('value', text);\n}\n\n/**\n * Lynx's `<input default-value>` / `<textarea default-value>` (the start text, which G9's number, time and tag entries\n * write) on the web: Lynx for Web's `x-input` and `x-textarea` know only `value`, so a time entry started at 08:30 drew\n * an empty box. Every input that appears under `root` with a start text gets it as its `value`, once; later text comes\n * from the control's own `setValue`, as on the native engines. Returns the stop function (nothing to stop without a\n * `MutationObserver`).\n */\nexport function bridgeStartText(root: Node): () => void {\n if (typeof MutationObserver === 'undefined') return () => undefined;\n const scan = (node: Node) => {\n if (!(node instanceof Element)) return;\n if (node.matches(INPUTS)) startTextOf(node);\n for (const input of Array.from(node.querySelectorAll(INPUTS))) startTextOf(input);\n };\n for (const child of Array.from(root.childNodes)) scan(child);\n const observer = new MutationObserver((records) => {\n for (const r of records) {\n if (r.type === 'childList') for (const n of Array.from(r.addedNodes)) scan(n);\n else if (r.oldValue === null && r.target instanceof Element && r.target.matches(INPUTS)) startTextOf(r.target);\n }\n });\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['default-value'],\n attributeOldValue: true,\n });\n return () => observer.disconnect();\n}\n\n/** Options of {@link installG9WebHost}. */\nexport interface G9WebInstallOptions extends G9WebHostOptions {\n /** The URL of this package's worker module (`@g9tm/lynxcontrols-web/module`), when a bundler moved it. */\n readonly moduleUrl?: string;\n /** Where resizes come from (default: the page's `window`); tests pass a fake. */\n readonly resizeTarget?: {\n addEventListener(type: 'resize', l: () => void): void;\n removeEventListener(type: 'resize', l: () => void): void;\n } | null;\n /** How the view's own size is watched (default: a `ResizeObserver`; null: the layout keeps the start size). */\n readonly sizeWatcher?: G9SizeWatcher | null;\n /** The device pixel ratio (default: the page's `devicePixelRatio`). */\n readonly pixelRatio?: number;\n /** The rules added to the view's shadow root (default {@link G9_WEB_STYLE_RULES}; `[]` adds none). */\n readonly styleRules?: readonly string[];\n}\n\n/** The page's safe-area insets in px (= dp on the web), start/end in the document's direction; 0 without `env()`. */\nexport function pageSafeInsets(): G9WebInsets {\n if (typeof document === 'undefined' || !document.body) return { top: 0, end: 0, bottom: 0, start: 0 };\n const probe = document.createElement('div');\n probe.style.cssText =\n 'position:fixed;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)';\n document.body.appendChild(probe);\n const style = getComputedStyle(probe);\n const px = (v: string) => Number.parseFloat(v) || 0;\n const left = px(style.paddingLeft);\n const right = px(style.paddingRight);\n const insets = { top: px(style.paddingTop), bottom: px(style.paddingBottom) };\n probe.remove();\n const rtl = document.documentElement.dir === 'rtl';\n return { ...insets, start: rtl ? right : left, end: rtl ? left : right };\n}\n\n/**\n * The default URL of the worker module: `module.js` next to this file in the published package. Plain string work on\n * `import.meta.url`, never `new URL('./module.js', import.meta.url)`: a bundler rewrites that pattern (rslib copied\n * module.ts as an asset, and with a variable it emitted a `require` context that fails in a browser).\n */\nexport const g9WebHostModuleUrl = (): string => {\n const here = import.meta.url;\n return `${here.slice(0, here.lastIndexOf('/') + 1)}module.js`;\n};\n\ninterface FindingsState {\n latest: G9WebFindings | null;\n readonly listeners: Set<(findings: G9WebFindings) => void>;\n}\nconst findingsOf = new WeakMap<object, FindingsState>();\nfunction stateOf(view: object): FindingsState {\n let state = findingsOf.get(view);\n if (!state) {\n state = { latest: null, listeners: new Set() };\n findingsOf.set(view, state);\n }\n return state;\n}\n\n/**\n * The latest findings of G9AppPilot's watch in `view`'s page (LC-08: the bundle built with the `observe` profile or up,\n * `@g9tm/lynxcontrols-pilot`): js errors, controls without a name, translation keys and controls off screen, and what\n * a browser cannot measure (`unsupported`). Null before the watch has sent anything (or in a build without it).\n */\nexport function g9WebFindings(view: object): G9WebFindings | null {\n return findingsOf.get(view)?.latest ?? null;\n}\n\n/** Calls `listener` with every set of findings `view`'s watch sends; returns the unsubscribe. */\nexport function subscribeG9WebFindings(view: object, listener: (findings: G9WebFindings) => void): () => void {\n const state = stateOf(view);\n state.listeners.add(listener);\n return () => void state.listeners.delete(listener);\n}\n\n/**\n * Asks the watch to run its screen rules now (`oracle.check`) and resolves with the findings it sends after that\n * check; null when nothing answers within `timeoutMs` (a build without the watch).\n */\nexport function checkG9WebScreen(view: G9LynxViewElement, timeoutMs = 5000): Promise<G9WebFindings | null> {\n const before = g9WebFindings(view)?.checks ?? 0;\n return new Promise((resolve) => {\n let done = false;\n const finish = (value: G9WebFindings | null) => {\n if (done) return;\n done = true;\n stop();\n clearTimeout(timer);\n resolve(value);\n };\n const stop = subscribeG9WebFindings(view, (findings) => {\n if (findings.checks > before) finish(findings);\n });\n const timer = setTimeout(() => finish(null), timeoutMs);\n view.sendGlobalEvent?.('g9:pilot-check', []);\n });\n}\n\n/** The message of a `<lynx-view>` `error` event's detail (web-core sends an Error, a string or an object with one). */\nfunction errorText(detail: unknown): string {\n if (typeof detail === 'string') return detail;\n const d = detail as { error?: unknown; message?: unknown } | null | undefined;\n const inner = d?.error as { message?: unknown } | string | undefined;\n if (typeof inner === 'string') return inner;\n if (typeof inner?.message === 'string') return inner.message;\n if (typeof d?.message === 'string') return d.message;\n try {\n return JSON.stringify(detail) ?? '';\n } catch {\n return String(detail);\n }\n}\n\n/** Installs the host on `view`; returns the uninstaller (the previous handler and map come back). */\nexport function installG9WebHost(view: G9LynxViewElement, options: G9WebInstallOptions = {}): () => void {\n const insets = options.insets ?? pageSafeInsets;\n const findings = stateOf(view);\n const handle = createG9WebHostHandler({\n ...options,\n insets,\n onPilotFindings: (next) => {\n findings.latest = next;\n for (const listener of [...findings.listeners]) listener(next);\n options.onPilotFindings?.(next);\n },\n ...(options.vibrate === undefined && typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function'\n ? { vibrate: (ms: number) => navigator.vibrate(ms) }\n : {}),\n ...(options.blur === undefined && typeof document !== 'undefined'\n ? { blur: () => (document.activeElement as { blur?: () => void } | null)?.blur?.() }\n : {}),\n });\n const previousMap = view.nativeModulesMap;\n const previousCall = view.onNativeModulesCall;\n view.nativeModulesMap = { ...(previousMap ?? {}), G9HostModule: options.moduleUrl ?? g9WebHostModuleUrl() };\n view.onNativeModulesCall = (name, data, moduleName) =>\n moduleName === 'G9HostModule'\n ? handle(name, (data ?? {}) as Readonly<Record<string, unknown>>)\n : previousCall?.(name, data, moduleName);\n const previousRules = view.injectStyleRules;\n const rules = options.styleRules ?? G9_WEB_STYLE_RULES;\n if (rules.length) view.injectStyleRules = [...(previousRules ?? []), ...rules];\n // the view attaches its shadow root when it first renders, after this install: watch it from that moment\n let stopBridges: (() => void) | undefined;\n // biome-ignore lint/suspicious/noPrototypeBuiltins: the package's lib is ES2019, which has no Object.hasOwn\n const ownAttach = Object.prototype.hasOwnProperty.call(view, 'attachShadow') ? view.attachShadow : undefined;\n const bridge = (root: Node) => {\n const stops = [bridgeStartText(root), bridgeViewportUnits(root)];\n stopBridges = () => {\n for (const stop of stops) stop();\n };\n };\n if (view.shadowRoot) bridge(view.shadowRoot);\n else if (typeof view.attachShadow === 'function') {\n const attach = view.attachShadow;\n view.attachShadow = function attachShadow(this: G9LynxViewElement, init) {\n const root = attach.call(this, init);\n bridge(root);\n return root;\n };\n }\n // the runtime's own errors (an uncaught throw in the page's code) go to the watch, which makes them js.error findings\n const onError = (event: { readonly detail?: unknown }) =>\n view.sendGlobalEvent?.('g9:lynx-error', [errorText(event.detail)]);\n view.addEventListener?.('error', onError);\n const resizes =\n options.resizeTarget === undefined ? (typeof window === 'undefined' ? null : window) : options.resizeTarget;\n const onResize = () => view.sendGlobalEvent?.('g9:insets', [insets()]);\n resizes?.addEventListener('resize', onResize);\n // the layout class follows the view's own size (see the file comment)\n const ratio =\n options.pixelRatio ?? (typeof devicePixelRatio === 'number' && devicePixelRatio > 0 ? devicePixelRatio : 1);\n const size = () => ({ width: view.clientWidth ?? 0, height: view.clientHeight ?? 0 });\n const previousConfig = view.browserConfig;\n const start = size();\n if (start.width > 0 && start.height > 0) {\n const base = typeof previousConfig === 'object' && previousConfig !== null ? previousConfig : {};\n view.browserConfig = {\n ...base,\n pixelRatio: ratio,\n pixelWidth: start.width * ratio,\n pixelHeight: start.height * ratio,\n };\n }\n let last = start;\n const watcher = options.sizeWatcher === undefined ? resizeObserverWatcher() : options.sizeWatcher;\n const stopWatching = watcher?.(view, () => {\n const next = size();\n if (next.width === last.width && next.height === last.height) return;\n last = next;\n view.sendGlobalEvent?.('onWindowResize', [next.width, next.height]);\n });\n return () => {\n view.removeEventListener?.('error', onError);\n stopBridges?.();\n if (ownAttach) view.attachShadow = ownAttach;\n else delete view.attachShadow;\n stopWatching?.();\n resizes?.removeEventListener('resize', onResize);\n view.nativeModulesMap = previousMap;\n view.onNativeModulesCall = previousCall;\n view.browserConfig = previousConfig;\n view.injectStyleRules = previousRules;\n };\n}\n"],"names":["resizeObserverWatcher","ResizeObserver","element","onResize","observer","G9_WEB_STYLE_RULES","G9_WEB_FONT_STACK","VIEWPORT_UNIT","HAS_VIEWPORT_UNIT","toContainerUnits","value","rewriteDeclaration","style","i","name","rewriteRules","rules","rule","bridgeViewportUnits","root","MutationObserver","undefined","seen","WeakSet","sheets","_root_styleSheets","_root_adoptedStyleSheets","sheet","Array","inline","text","scan","node","Element","e","child","records","r","n","INPUTS","startTextOf","bridgeStartText","input","pageSafeInsets","document","probe","getComputedStyle","px","v","Number","left","right","insets","rtl","g9WebHostModuleUrl","here","findingsOf","WeakMap","stateOf","view","state","Set","g9WebFindings","_findingsOf_get","subscribeG9WebFindings","listener","checkG9WebScreen","timeoutMs","_g9WebFindings","before","Promise","resolve","done","finish","stop","clearTimeout","timer","findings","setTimeout","errorText","detail","d","inner","_JSON_stringify","String","installG9WebHost","options","_options_insets","_options_moduleUrl","_options_styleRules","_options_pixelRatio","handle","createG9WebHostHandler","next","navigator","ms","_document_activeElement_blur","_document_activeElement","previousMap","previousCall","data","moduleName","previousRules","stopBridges","ownAttach","Object","bridge","stops","attach","init","onError","event","resizes","window","ratio","devicePixelRatio","size","_view_clientWidth","_view_clientHeight","previousConfig","start","base","last","watcher","stopWatching"],"mappings":";;AAoCA,SAASA;IACP,IAAI,AAA0B,MAA1B,OAAOC,gBAAgC,OAAO;IAClD,OAAO,CAACC,SAASC;QACf,MAAMC,WAAW,IAAIH,eAAe,IAAME;QAC1CC,SAAS,OAAO,CAACF;QACjB,OAAO,IAAME,SAAS,UAAU;IAClC;AACF;AASO,MAAMC,qBAAwC;IACnD,CAAC,qBAAqB,EAAEC,kBAAkB,GAAG,CAAC;IAC9C;IACA;CACD;AAED,MAAMC,gBAAgB;AACtB,MAAMC,oBAAoB;AAGnB,MAAMC,mBAAmB,CAACC,QAA0BA,MAAM,OAAO,CAACH,eAAe;AAExF,SAASI,mBAAmBC,KAA0B;IACpD,IAAK,IAAIC,IAAI,GAAGA,IAAID,MAAM,MAAM,EAAEC,IAAK;QACrC,MAAMC,OAAOF,MAAM,IAAI,CAACC;QACxB,MAAMH,QAAQE,MAAM,gBAAgB,CAACE;QACrC,IAAIN,kBAAkB,IAAI,CAACE,QACzBE,MAAM,WAAW,CAACE,MAAML,iBAAiBC,QAAQE,MAAM,mBAAmB,CA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AAMsC,eAAeD,QAAAA,UAAAA,KAAAA,IAAAA,QAAUhE,MAAM;YAInCA;QAHA,MAAMkC,OAAOuB;QACb,IAAIvB,KAAK,KAAK,KAAK6B,KAAK,KAAK,IAAI7B,KAAK,MAAM,KAAK6B,KAAK,MAAM,EAAE;QAC9DA,OAAO7B;gBACPlC,CAAAA,wBAAAA,KAAK,eAAe,AAAD,KAAnBA,sBAAAA,IAAAA,CAAAA,MAAuB,kBAAkB;YAACkC,KAAK,KAAK;YAAEA,KAAK,MAAM;SAAC;IACpE;IACA,OAAO;YACLlC;gBAAAA,CAAAA,4BAAAA,KAAK,mBAAmB,AAAD,KAAvBA,0BAAAA,IAAAA,CAAAA,MAA2B,SAASmD;QACpCP,QAAAA,eAAAA;QACA,IAAIC,WAAW7C,KAAK,YAAY,GAAG6C;aAC9B,OAAO7C,KAAK,YAAY;QAC7BiE,QAAAA,gBAAAA;QACAZ,QAAAA,WAAAA,QAAS,mBAAmB,CAAC,UAAU7G;QACvCwD,KAAK,gBAAgB,GAAGuC;QACxBvC,KAAK,mBAAmB,GAAGwC;QAC3BxC,KAAK,aAAa,GAAG4D;QACrB5D,KAAK,gBAAgB,GAAG2C;IAC1B;AACF"}
|
|
1
|
+
{"version":3,"file":"install.js","sources":["../src/install.ts"],"sourcesContent":["// Installs G9HostModule on a `<lynx-view>` (Lynx for Web): names the worker module (./module.ts) in the view's\n// `nativeModulesMap` and answers its calls from the page (`onNativeModulesCall`, ./handler.ts). Call it before the\n// view gets its `url`. The page's safe-area insets (`env(safe-area-inset-*)`) are measured once and again on every\n// resize, and sent to the page as the `g9:insets` event the native hosts send on rotation.\n//\n// The window a G9 provider sizes its layout class by is the VIEW: Lynx for Web fills SystemInfo from the screen\n// (`screen.availWidth`) and sends no resize, so a 390 px `<lynx-view>` in a 1,600 px window reported `desktop` and\n// never changed. The host starts the view's `browserConfig` at its own size and reports every change of it as the\n// `onWindowResize` event the provider listens to (the event a native host sends on a window resize).\n\nimport { G9_WEB_FONT_STACK } from './font';\nimport { createG9WebHostHandler, type G9WebFindings, type G9WebHostOptions, type G9WebInsets } from './handler';\nimport { bridgeScaledRects } from './scale';\n\n/** The part of a `<lynx-view>` element (@lynx-js/web-core) the host uses. */\nexport interface G9LynxViewElement {\n nativeModulesMap?: Record<string, string> | undefined;\n onNativeModulesCall?: ((name: string, data: unknown, moduleName: string) => unknown) | undefined;\n sendGlobalEvent?(eventName: string, params: unknown[]): void;\n /** The view's own events (`error`: the runtime caught an error in the page's code). */\n addEventListener?(type: string, listener: (event: { readonly detail?: unknown }) => void): void;\n removeEventListener?(type: string, listener: (event: { readonly detail?: unknown }) => void): void;\n /** CSS rules inserted into the view's shadow root, read when the card starts. */\n injectStyleRules?: string[] | undefined;\n /** The view's SystemInfo overrides (pixelWidth / pixelHeight / pixelRatio), read when the card starts. */\n browserConfig?: Record<string, unknown> | string | undefined;\n readonly clientWidth?: number;\n readonly clientHeight?: number;\n /** Its layout width (an ancestor's scale aside) and its drawn rect: the scale bridge compares them (LC-26). */\n readonly offsetWidth?: number;\n getBoundingClientRect?(): DOMRect;\n /** Where the card's elements live (an open shadow root, attached when the view first renders). */\n readonly shadowRoot?: Node | null;\n attachShadow?(init: { mode: 'open' | 'closed' }): Node;\n}\n\n/** Watches an element's size (`ResizeObserver`); tests pass a fake. Returns the stop function. */\nexport type G9SizeWatcher = (element: object, onResize: () => void) => () => void;\n\n/** The page's `ResizeObserver` as a size watcher, or null where there is none (read when a host is installed). */\nfunction resizeObserverWatcher(): G9SizeWatcher | null {\n if (typeof ResizeObserver === 'undefined') return null;\n return (element, onResize) => {\n const observer = new ResizeObserver(() => onResize());\n observer.observe(element as Element);\n return () => observer.disconnect();\n };\n}\n\n/**\n * The rules the host adds to the view's shadow root so a browser draws text as the native engines do:\n * - the system font: a browser's default is a serif, the native default the system's sans;\n * - each text's direction from its first strong letter (`@g9tm/lynxcontrols` in a Persian page reads as written, as on\n * Android and iOS), where the browser would take it from the CSS `direction` and move the `@` to the end;\n * - the view as a size container, the box the viewport units measure against ({@link bridgeViewportUnits}).\n */\nexport const G9_WEB_STYLE_RULES: readonly string[] = [\n `:host { font-family: ${G9_WEB_FONT_STACK}; }`,\n 'x-text::part(inner-box) { unicode-bidi: plaintext; }',\n ':host { container-type: size; }',\n // Firefox resolves web-elements' space toggles (cyclic custom properties) to the linear value: a flex view kept\n // flex-direction column whatever its --flex-direction said (rows stood stacked). Firefox only: read it directly.\n // (more specific than web-elements' own `x-view` rule, which can load after this one)\n '@supports (-moz-appearance: none) { x-view:not([g9-no]) { flex-direction: var(--flex-direction, var(--linear-flex-direction, column)); flex-wrap: var(--flex-wrap, nowrap); } }',\n];\n\nconst VIEWPORT_UNIT = /(\\d)v(w|h|min|max)\\b/g;\nconst HAS_VIEWPORT_UNIT = /\\dv(w|h|min|max)\\b/;\n\n/** `100vw` → `100cqw`, `calc(50vh - 8px)` → `calc(50cqh - 8px)`. */\nexport const toContainerUnits = (value: string): string => value.replace(VIEWPORT_UNIT, '$1cq$2');\n\nfunction rewriteDeclaration(style: CSSStyleDeclaration): void {\n for (let i = 0; i < style.length; i++) {\n const name = style.item(i);\n const value = style.getPropertyValue(name);\n if (HAS_VIEWPORT_UNIT.test(value))\n style.setProperty(name, toContainerUnits(value), style.getPropertyPriority(name));\n }\n}\n\nfunction rewriteRules(rules: CSSRuleList): void {\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i] as CSSRule & { style?: CSSStyleDeclaration; cssRules?: CSSRuleList };\n if (rule.style) rewriteDeclaration(rule.style);\n if (rule.cssRules) rewriteRules(rule.cssRules);\n }\n}\n\n/**\n * Viewport units on the web: a native engine measures `vw` / `vh` against the LynxView, a browser against its window,\n * so lynx-ui's sheet (`width: 100vw`) in a 390 px view inside a 1,600 px window was 1,600 px wide and its text ran out\n * of the view. The view is a size container (`:host { container-type: size }`, {@link G9_WEB_STYLE_RULES}; it already\n * has `contain: strict`), and every viewport unit under `root` becomes the container's own (`cqw`, `cqh`, `cqmin`,\n * `cqmax`): in each style sheet once, and in each element's inline style as it is written. Returns the stop function.\n */\nexport function bridgeViewportUnits(\n root: Node & { styleSheets?: StyleSheetList; adoptedStyleSheets?: CSSStyleSheet[] },\n): () => void {\n if (typeof MutationObserver === 'undefined') return () => undefined;\n const seen = new WeakSet<object>();\n const sheets = () => {\n for (const sheet of [...Array.from(root.styleSheets ?? []), ...(root.adoptedStyleSheets ?? [])]) {\n if (seen.has(sheet)) continue;\n seen.add(sheet);\n try {\n rewriteRules((sheet as CSSStyleSheet).cssRules);\n } catch {\n // a cross-origin sheet hides its rules\n }\n }\n };\n const inline = (element: Element) => {\n const text = element.getAttribute('style');\n if (text && HAS_VIEWPORT_UNIT.test(text)) rewriteDeclaration((element as HTMLElement).style);\n };\n const scan = (node: Node) => {\n if (!(node instanceof Element)) return;\n inline(node);\n for (const e of Array.from(node.querySelectorAll('[style]'))) inline(e);\n };\n sheets();\n for (const child of Array.from(root.childNodes)) scan(child);\n const observer = new MutationObserver((records) => {\n sheets();\n for (const r of records) {\n if (r.type === 'childList') for (const n of Array.from(r.addedNodes)) scan(n);\n else if (r.target instanceof Element) inline(r.target);\n }\n });\n observer.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: ['style'] });\n return () => observer.disconnect();\n}\n\nconst INPUTS = 'x-input[default-value], x-textarea[default-value]';\n\n/** What the host sets on the view that the element's upgrade can take away (LC-27). */\ntype Upgradable = Pick<G9LynxViewElement, 'nativeModulesMap' | 'onNativeModulesCall' | 'injectStyleRules'>;\n\n/**\n * LC-27: a `<lynx-view>` made before web-core defines the element (the page's first view, while web-core's module\n * still loads) is a plain element when the host is installed. Its upgrade then runs web-core's constructor on it:\n * the class fields `nativeModulesMap` and `injectStyleRules` start again as undefined, and the handler set before it\n * stays an own value that hides web-core's `onNativeModulesCall` setter. That view started without the host's rules\n * (Firefox kept its rows stacked) and without G9HostModule. `then` runs once the element is upgraded (not at all when\n * it already is, or is no custom element), in the one microtask that comes before the view's first render reads\n * them: a definition resolves `whenDefined` ahead of the upgrade's own reactions, and an upgrade on insertion\n * queues its read after this one.\n */\nfunction afterUpgrade(view: G9LynxViewElement, then: () => void): void {\n const registry = typeof customElements === 'undefined' ? undefined : customElements;\n const tag = (view as { readonly localName?: string }).localName;\n if (!registry || !tag?.includes('-')) return;\n const defined = registry.get(tag);\n if (defined && view instanceof defined) return;\n void registry.whenDefined(tag).then(() => {\n registry.upgrade(view as unknown as Node);\n then();\n });\n}\n\n/** After the upgrade: the values the host set, put back through the element's own properties. */\nfunction restoreOwn(view: G9LynxViewElement, ours: Upgradable): void {\n const target = view as unknown as Record<string, unknown>;\n for (const key of Object.keys(ours) as Array<keyof Upgradable>) {\n // an own value left from before the upgrade hides the element's setter\n delete target[key];\n target[key] = ours[key];\n }\n}\n\n/** Gives one input its start text, unless it already has a `value`. */\nfunction startTextOf(element: Element): void {\n const text = element.getAttribute('default-value');\n if (text !== null && !element.hasAttribute('value')) element.setAttribute('value', text);\n}\n\n/**\n * Lynx's `<input default-value>` / `<textarea default-value>` (the start text, which G9's number, time and tag entries\n * write) on the web: Lynx for Web's `x-input` and `x-textarea` know only `value`, so a time entry started at 08:30 drew\n * an empty box. Every input that appears under `root` with a start text gets it as its `value`, once; later text comes\n * from the control's own `setValue`, as on the native engines. Returns the stop function (nothing to stop without a\n * `MutationObserver`).\n */\nexport function bridgeStartText(root: Node): () => void {\n if (typeof MutationObserver === 'undefined') return () => undefined;\n const scan = (node: Node) => {\n if (!(node instanceof Element)) return;\n if (node.matches(INPUTS)) startTextOf(node);\n for (const input of Array.from(node.querySelectorAll(INPUTS))) startTextOf(input);\n };\n for (const child of Array.from(root.childNodes)) scan(child);\n const observer = new MutationObserver((records) => {\n for (const r of records) {\n if (r.type === 'childList') for (const n of Array.from(r.addedNodes)) scan(n);\n else if (r.oldValue === null && r.target instanceof Element && r.target.matches(INPUTS)) startTextOf(r.target);\n }\n });\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['default-value'],\n attributeOldValue: true,\n });\n return () => observer.disconnect();\n}\n\n/** web-elements' attributes (Firefox) and the custom property each one copies. */\nconst LINEAR_ATTRIBUTES: ReadonlyArray<readonly [string, string]> = [\n ['lynx-computed-display', '--lynx-display'],\n ['lynx-linear-orientation', '--lynx-linear-orientation'],\n];\n\n/** What the bridge reads of an element's computed style (the page's `getComputedStyle`; tests pass a fake). */\nexport type G9ComputedStyleReader = (element: Element) => Pick<CSSStyleDeclaration, 'getPropertyValue'>;\n\nfunction relinear(root: Node & ParentNode, computed: G9ComputedStyleReader): void {\n for (const element of Array.from(root.querySelectorAll('[lynx-computed-display]'))) {\n const style = computed(element);\n for (const [attribute, property] of LINEAR_ATTRIBUTES) {\n const value = style.getPropertyValue(property).trim();\n if (value && element.getAttribute(attribute) !== value) element.setAttribute(attribute, value);\n }\n }\n}\n\nconst isStyle = (node: Node) => node.nodeName === 'STYLE' || node.nodeName === 'LINK';\n\n/**\n * LC-27: where a browser has no style container queries (Firefox), web-elements copies each element's\n * `--lynx-display` and `--lynx-linear-orientation` into the attributes `lynx-computed-display` and\n * `lynx-linear-orientation` and lays it out by them (`linear` + `vertical` is `flex-direction: column !important`).\n * It reads them when the element is connected and when its class or style changes, not when a style sheet arrives.\n * A page's first view gets its card's style sheet after its elements (later views find it ready), so every element\n * kept the default `linear`: rows stood stacked in the first view only. When a style sheet is added to `root` or its\n * text changes, every such element reads both again (in the next frame, once per burst). Nothing happens in a browser\n * without those attributes. Upstream: lynx-stack issue #3349 (fix PR #4236); drop this once web-elements carries it.\n * Returns the stop function.\n */\nexport function bridgeLinearDisplay(\n root: Node & ParentNode,\n computed: G9ComputedStyleReader | undefined = typeof getComputedStyle === 'function' ? getComputedStyle : undefined,\n): () => void {\n if (typeof MutationObserver === 'undefined' || !computed) return () => undefined;\n let queued = false;\n const later =\n typeof requestAnimationFrame === 'function' ? requestAnimationFrame : (run: () => void) => setTimeout(run, 16);\n const observer = new MutationObserver((records) => {\n if (queued) return;\n const styled = records.some(\n (r) =>\n isStyle(r.target) ||\n (r.target.parentNode !== null && isStyle(r.target.parentNode)) ||\n Array.from(r.addedNodes).some((n) => isStyle(n) || (n instanceof Element && n.querySelector('style, link'))),\n );\n if (!styled) return;\n queued = true;\n later(() => {\n queued = false;\n relinear(root, computed);\n });\n });\n observer.observe(root, { childList: true, subtree: true, characterData: true });\n return () => observer.disconnect();\n}\n\n/** Options of {@link installG9WebHost}. */\nexport interface G9WebInstallOptions extends G9WebHostOptions {\n /** The URL of this package's worker module (`@g9tm/lynxcontrols-web/module`), when a bundler moved it. */\n readonly moduleUrl?: string;\n /** Where resizes come from (default: the page's `window`); tests pass a fake. */\n readonly resizeTarget?: {\n addEventListener(type: 'resize', l: () => void): void;\n removeEventListener(type: 'resize', l: () => void): void;\n } | null;\n /** How the view's own size is watched (default: a `ResizeObserver`; null: the layout keeps the start size). */\n readonly sizeWatcher?: G9SizeWatcher | null;\n /** The device pixel ratio (default: the page's `devicePixelRatio`). */\n readonly pixelRatio?: number;\n /** The rules added to the view's shadow root (default {@link G9_WEB_STYLE_RULES}; `[]` adds none). */\n readonly styleRules?: readonly string[];\n}\n\n/** The page's safe-area insets in px (= dp on the web), start/end in the document's direction; 0 without `env()`. */\nexport function pageSafeInsets(): G9WebInsets {\n if (typeof document === 'undefined' || !document.body) return { top: 0, end: 0, bottom: 0, start: 0 };\n const probe = document.createElement('div');\n probe.style.cssText =\n 'position:fixed;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)';\n document.body.appendChild(probe);\n const style = getComputedStyle(probe);\n const px = (v: string) => Number.parseFloat(v) || 0;\n const left = px(style.paddingLeft);\n const right = px(style.paddingRight);\n const insets = { top: px(style.paddingTop), bottom: px(style.paddingBottom) };\n probe.remove();\n const rtl = document.documentElement.dir === 'rtl';\n return { ...insets, start: rtl ? right : left, end: rtl ? left : right };\n}\n\n/**\n * The default URL of the worker module: `module.js` next to this file in the published package. Plain string work on\n * `import.meta.url`, never `new URL('./module.js', import.meta.url)`: a bundler rewrites that pattern (rslib copied\n * module.ts as an asset, and with a variable it emitted a `require` context that fails in a browser).\n */\nexport const g9WebHostModuleUrl = (): string => {\n const here = import.meta.url;\n return `${here.slice(0, here.lastIndexOf('/') + 1)}module.js`;\n};\n\ninterface FindingsState {\n latest: G9WebFindings | null;\n readonly listeners: Set<(findings: G9WebFindings) => void>;\n}\nconst findingsOf = new WeakMap<object, FindingsState>();\nfunction stateOf(view: object): FindingsState {\n let state = findingsOf.get(view);\n if (!state) {\n state = { latest: null, listeners: new Set() };\n findingsOf.set(view, state);\n }\n return state;\n}\n\n/**\n * The latest findings of G9AppPilot's watch in `view`'s page (LC-08: the bundle built with the `observe` profile or up,\n * `@g9tm/lynxcontrols-pilot`): js errors, controls without a name, translation keys and controls off screen, and what\n * a browser cannot measure (`unsupported`). Null before the watch has sent anything (or in a build without it).\n */\nexport function g9WebFindings(view: object): G9WebFindings | null {\n return findingsOf.get(view)?.latest ?? null;\n}\n\n/** Calls `listener` with every set of findings `view`'s watch sends; returns the unsubscribe. */\nexport function subscribeG9WebFindings(view: object, listener: (findings: G9WebFindings) => void): () => void {\n const state = stateOf(view);\n state.listeners.add(listener);\n return () => void state.listeners.delete(listener);\n}\n\n/**\n * Asks the watch to run its screen rules now (`oracle.check`) and resolves with the findings it sends after that\n * check; null when nothing answers within `timeoutMs` (a build without the watch).\n */\nexport function checkG9WebScreen(view: G9LynxViewElement, timeoutMs = 5000): Promise<G9WebFindings | null> {\n const before = g9WebFindings(view)?.checks ?? 0;\n return new Promise((resolve) => {\n let done = false;\n const finish = (value: G9WebFindings | null) => {\n if (done) return;\n done = true;\n stop();\n clearTimeout(timer);\n resolve(value);\n };\n const stop = subscribeG9WebFindings(view, (findings) => {\n if (findings.checks > before) finish(findings);\n });\n const timer = setTimeout(() => finish(null), timeoutMs);\n view.sendGlobalEvent?.('g9:pilot-check', []);\n });\n}\n\n/** The message of a `<lynx-view>` `error` event's detail (web-core sends an Error, a string or an object with one). */\nfunction errorText(detail: unknown): string {\n if (typeof detail === 'string') return detail;\n const d = detail as { error?: unknown; message?: unknown } | null | undefined;\n const inner = d?.error as { message?: unknown } | string | undefined;\n if (typeof inner === 'string') return inner;\n if (typeof inner?.message === 'string') return inner.message;\n if (typeof d?.message === 'string') return d.message;\n try {\n return JSON.stringify(detail) ?? '';\n } catch {\n return String(detail);\n }\n}\n\n/** Installs the host on `view`; returns the uninstaller (the previous handler and map come back). */\nexport function installG9WebHost(view: G9LynxViewElement, options: G9WebInstallOptions = {}): () => void {\n const insets = options.insets ?? pageSafeInsets;\n const findings = stateOf(view);\n const handle = createG9WebHostHandler({\n ...options,\n insets,\n onPilotFindings: (next) => {\n findings.latest = next;\n for (const listener of [...findings.listeners]) listener(next);\n options.onPilotFindings?.(next);\n },\n ...(options.vibrate === undefined && typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function'\n ? { vibrate: (ms: number) => navigator.vibrate(ms) }\n : {}),\n ...(options.blur === undefined && typeof document !== 'undefined'\n ? { blur: () => (document.activeElement as { blur?: () => void } | null)?.blur?.() }\n : {}),\n });\n const previousMap = view.nativeModulesMap;\n const previousCall = view.onNativeModulesCall;\n view.nativeModulesMap = { ...(previousMap ?? {}), G9HostModule: options.moduleUrl ?? g9WebHostModuleUrl() };\n view.onNativeModulesCall = (name, data, moduleName) =>\n moduleName === 'G9HostModule'\n ? handle(name, (data ?? {}) as Readonly<Record<string, unknown>>)\n : previousCall?.(name, data, moduleName);\n const previousRules = view.injectStyleRules;\n const rules = options.styleRules ?? G9_WEB_STYLE_RULES;\n if (rules.length) view.injectStyleRules = [...(previousRules ?? []), ...rules];\n const ours: Upgradable = {\n nativeModulesMap: view.nativeModulesMap,\n onNativeModulesCall: view.onNativeModulesCall,\n injectStyleRules: view.injectStyleRules,\n };\n let removed = false;\n afterUpgrade(view, () => {\n if (!removed) restoreOwn(view, ours);\n });\n // the view attaches its shadow root when it first renders, after this install: watch it from that moment\n let stopBridges: (() => void) | undefined;\n // biome-ignore lint/suspicious/noPrototypeBuiltins: the package's lib is ES2019, which has no Object.hasOwn\n const ownAttach = Object.prototype.hasOwnProperty.call(view, 'attachShadow') ? view.attachShadow : undefined;\n const bridge = (root: Node) => {\n // the view's own measurements in layout pixels under a scaled ancestor (LC-26)\n const stops = [\n bridgeStartText(root),\n bridgeViewportUnits(root),\n bridgeScaledRects(view, root),\n bridgeLinearDisplay(root as Node & ParentNode),\n ];\n stopBridges = () => {\n for (const stop of stops) stop();\n };\n };\n if (view.shadowRoot) bridge(view.shadowRoot);\n else if (typeof view.attachShadow === 'function') {\n const attach = view.attachShadow;\n view.attachShadow = function attachShadow(this: G9LynxViewElement, init) {\n const root = attach.call(this, init);\n bridge(root);\n return root;\n };\n }\n // the runtime's own errors (an uncaught throw in the page's code) go to the watch, which makes them js.error findings\n const onError = (event: { readonly detail?: unknown }) =>\n view.sendGlobalEvent?.('g9:lynx-error', [errorText(event.detail)]);\n view.addEventListener?.('error', onError);\n const resizes =\n options.resizeTarget === undefined ? (typeof window === 'undefined' ? null : window) : options.resizeTarget;\n const onResize = () => view.sendGlobalEvent?.('g9:insets', [insets()]);\n resizes?.addEventListener('resize', onResize);\n // the layout class follows the view's own size (see the file comment)\n const ratio =\n options.pixelRatio ?? (typeof devicePixelRatio === 'number' && devicePixelRatio > 0 ? devicePixelRatio : 1);\n const size = () => ({ width: view.clientWidth ?? 0, height: view.clientHeight ?? 0 });\n const previousConfig = view.browserConfig;\n const start = size();\n if (start.width > 0 && start.height > 0) {\n const base = typeof previousConfig === 'object' && previousConfig !== null ? previousConfig : {};\n view.browserConfig = {\n ...base,\n pixelRatio: ratio,\n pixelWidth: start.width * ratio,\n pixelHeight: start.height * ratio,\n };\n }\n let last = start;\n const watcher = options.sizeWatcher === undefined ? resizeObserverWatcher() : options.sizeWatcher;\n const stopWatching = watcher?.(view, () => {\n const next = size();\n if (next.width === last.width && next.height === last.height) return;\n last = next;\n view.sendGlobalEvent?.('onWindowResize', [next.width, next.height]);\n });\n return () => {\n removed = true;\n view.removeEventListener?.('error', onError);\n stopBridges?.();\n if (ownAttach) view.attachShadow = ownAttach;\n else delete view.attachShadow;\n stopWatching?.();\n resizes?.removeEventListener('resize', onResize);\n view.nativeModulesMap = previousMap;\n view.onNativeModulesCall = previousCall;\n view.browserConfig = previousConfig;\n view.injectStyleRules = previousRules;\n };\n}\n"],"names":["resizeObserverWatcher","ResizeObserver","element","onResize","observer","G9_WEB_STYLE_RULES","G9_WEB_FONT_STACK","VIEWPORT_UNIT","HAS_VIEWPORT_UNIT","toContainerUnits","value","rewriteDeclaration","style","i","name","rewriteRules","rules","rule","bridgeViewportUnits","root","MutationObserver","undefined","seen","WeakSet","sheets","_root_styleSheets","_root_adoptedStyleSheets","sheet","Array","inline","text","scan","node","Element","e","child","records","r","n","INPUTS","afterUpgrade","view","then","registry","customElements","tag","defined","restoreOwn","ours","target","key","Object","startTextOf","bridgeStartText","input","LINEAR_ATTRIBUTES","relinear","computed","attribute","property","isStyle","bridgeLinearDisplay","getComputedStyle","queued","later","requestAnimationFrame","run","setTimeout","styled","pageSafeInsets","document","probe","px","v","Number","left","right","insets","rtl","g9WebHostModuleUrl","here","findingsOf","WeakMap","stateOf","state","Set","g9WebFindings","_findingsOf_get","subscribeG9WebFindings","listener","checkG9WebScreen","timeoutMs","_g9WebFindings","before","Promise","resolve","done","finish","stop","clearTimeout","timer","findings","errorText","detail","d","inner","_JSON_stringify","String","installG9WebHost","options","_options_insets","_options_moduleUrl","_options_styleRules","_options_pixelRatio","handle","createG9WebHostHandler","next","navigator","ms","_document_activeElement_blur","_document_activeElement","previousMap","previousCall","data","moduleName","previousRules","removed","stopBridges","ownAttach","bridge","stops","bridgeScaledRects","attach","init","onError","event","resizes","window","ratio","devicePixelRatio","size","_view_clientWidth","_view_clientHeight","previousConfig","start","base","last","watcher","stopWatching"],"mappings":";;;AAwCA,SAASA;IACP,IAAI,AAA0B,MAA1B,OAAOC,gBAAgC,OAA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
+
/**
|
|
2
|
+
* A worker with no `requestAnimationFrame` (WebKit has none in workers; Chromium and Firefox do): web-core's
|
|
3
|
+
* `lynx.requestAnimationFrame` calls the global one in the page's worker, so a page that asks for a frame threw
|
|
4
|
+
* `Can't find variable: requestAnimationFrame` there. Installed once, when this module loads, only where it is missing:
|
|
5
|
+
* a 16 ms timer that hands the callback the time, as a frame would.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureWorkerAnimationFrame(scope: Record<string, unknown>): void;
|
|
1
8
|
type Reply = (envelope: unknown) => void;
|
|
2
9
|
type Call = (name: string, data: Record<string, unknown>) => Promise<unknown>;
|
|
3
10
|
/** The G9HostModule a web page provides (the same methods as the Android and iOS hosts). */
|
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;AACzC,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAE9E,4FAA4F;AAC5F,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACpC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IAClD,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACtF,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACzD,UAAU,CAAC,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IAClC,UAAU,I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E,KAAK,GAAG,IAAI,CAAC;IACzD,UAAU,CAAC,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IAClC,UAAU,IAAI,IAAI,CAAC;IACnB,YAAY,IAAI,IAAI,CAAC;IACrB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,UAAU,IAAI,IAAI,CAAC;IACnB,gBAAgB,CAAC,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IAC9C,qHAAqH;IACrH,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAWD,oGAAoG;AACpG,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,eAAe,CAqBlG"}
|
package/dist/module.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function ensureWorkerAnimationFrame(scope) {
|
|
2
|
+
if ('function' == typeof scope.requestAnimationFrame) return;
|
|
3
|
+
scope.requestAnimationFrame = (callback)=>setTimeout(()=>callback(Date.now()), 16);
|
|
4
|
+
scope.cancelAnimationFrame = (id)=>clearTimeout(id);
|
|
5
|
+
}
|
|
6
|
+
ensureWorkerAnimationFrame(self);
|
|
1
7
|
const lost = (error)=>({
|
|
2
8
|
ok: false,
|
|
3
9
|
error: {
|
|
@@ -42,5 +48,6 @@ function createG9WebHostModule(_nativeModules, call) {
|
|
|
42
48
|
};
|
|
43
49
|
}
|
|
44
50
|
export default createG9WebHostModule;
|
|
51
|
+
export { ensureWorkerAnimationFrame };
|
|
45
52
|
|
|
46
53
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":["// The worker side of `G9HostModule` on the web: Lynx for Web runs the page's code in a Web Worker and builds\n// `NativeModules` there, loading each custom module from the URL its `<lynx-view>` names in `nativeModulesMap`. This\n// module's default export is that factory: every method sends its call to the page (`nativeModulesCall`), where\n// installG9WebHost answers it (./handler.ts), and hands the envelope back to the callback — so\n// @g9tm/lynxcontrols-native's createNativeHostServices finds `NativeModules.G9HostModule` and works unchanged.\n\ntype Reply = (envelope: unknown) => void;\ntype Call = (name: string, data: Record<string, unknown>) => Promise<unknown>;\n\n/** The G9HostModule a web page provides (the same methods as the Android and iOS hosts). */\nexport interface G9WebHostModule {\n capabilities(callback: Reply): void;\n getPreference(key: string, callback: Reply): void;\n setPreference(key: string, kind: string, value: string | null, callback: Reply): void;\n preferenceEntries(prefix: string, callback: Reply): void;\n safeInsets(callback: Reply): void;\n moveToBack(): void;\n hideKeyboard(): void;\n setSoftInputMode(mode: string): void;\n hapticTick(): void;\n appDataDirectory(callback: Reply): void;\n assetUri(path: string, callback: Reply): void;\n /** G9AppPilot's watch hands its findings to the page (LC-08; @g9tm/lynxcontrols-pilot, profile `observe` and up). */\n pilotFindings(payload: string): void;\n}\n\n/** A call that failed to cross (the page is gone): the typed error a host sends for a missing answer. */\nconst lost = (error: unknown) => ({\n ok: false,\n error: {\n code: 'host-unreachable',\n message: `The page did not answer: ${error instanceof Error ? error.message : String(error)}`,\n },\n});\n\n/** The factory Lynx for Web calls with `(nativeModules, nativeModulesCall)`; returns the module. */\nexport default function createG9WebHostModule(_nativeModules: unknown, call: Call): G9WebHostModule {\n const ask = (name: string, data: Record<string, unknown>, callback: Reply) => {\n call(name, data).then(callback, (error: unknown) => callback(lost(error)));\n };\n const tell = (name: string, data: Record<string, unknown> = {}) => {\n call(name, data).catch(() => undefined);\n };\n return {\n capabilities: (callback) => ask('capabilities', {}, callback),\n getPreference: (key, callback) => ask('getPreference', { key }, callback),\n setPreference: (key, kind, value, callback) => ask('setPreference', { key, kind, value }, callback),\n preferenceEntries: (prefix, callback) => ask('preferenceEntries', { prefix }, callback),\n safeInsets: (callback) => ask('safeInsets', {}, callback),\n moveToBack: () => tell('moveToBack'),\n hideKeyboard: () => tell('hideKeyboard'),\n setSoftInputMode: (mode) => tell('setSoftInputMode', { mode }),\n hapticTick: () => tell('hapticTick'),\n appDataDirectory: (callback) => ask('appDataDirectory', {}, callback),\n assetUri: (path, callback) => ask('assetUri', { path }, callback),\n pilotFindings: (payload) => tell('pilotFindings', { payload }),\n };\n}\n"],"names":["lost","error","Error","String","createG9WebHostModule","_nativeModules","call","ask","name","data","
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":["// The worker side of `G9HostModule` on the web: Lynx for Web runs the page's code in a Web Worker and builds\n// `NativeModules` there, loading each custom module from the URL its `<lynx-view>` names in `nativeModulesMap`. This\n// module's default export is that factory: every method sends its call to the page (`nativeModulesCall`), where\n// installG9WebHost answers it (./handler.ts), and hands the envelope back to the callback — so\n// @g9tm/lynxcontrols-native's createNativeHostServices finds `NativeModules.G9HostModule` and works unchanged.\n\n/**\n * A worker with no `requestAnimationFrame` (WebKit has none in workers; Chromium and Firefox do): web-core's\n * `lynx.requestAnimationFrame` calls the global one in the page's worker, so a page that asks for a frame threw\n * `Can't find variable: requestAnimationFrame` there. Installed once, when this module loads, only where it is missing:\n * a 16 ms timer that hands the callback the time, as a frame would.\n */\nexport function ensureWorkerAnimationFrame(scope: Record<string, unknown>): void {\n if (typeof scope.requestAnimationFrame === 'function') return;\n scope.requestAnimationFrame = (callback: (time: number) => void) => setTimeout(() => callback(Date.now()), 16);\n scope.cancelAnimationFrame = (id: ReturnType<typeof setTimeout>) => clearTimeout(id);\n}\n// the worker's own global: this module runs in Lynx for Web's worker (index.ts takes only its types), never in a bundle\nensureWorkerAnimationFrame(self as unknown as Record<string, unknown>);\n\ntype Reply = (envelope: unknown) => void;\ntype Call = (name: string, data: Record<string, unknown>) => Promise<unknown>;\n\n/** The G9HostModule a web page provides (the same methods as the Android and iOS hosts). */\nexport interface G9WebHostModule {\n capabilities(callback: Reply): void;\n getPreference(key: string, callback: Reply): void;\n setPreference(key: string, kind: string, value: string | null, callback: Reply): void;\n preferenceEntries(prefix: string, callback: Reply): void;\n safeInsets(callback: Reply): void;\n moveToBack(): void;\n hideKeyboard(): void;\n setSoftInputMode(mode: string): void;\n hapticTick(): void;\n appDataDirectory(callback: Reply): void;\n assetUri(path: string, callback: Reply): void;\n /** G9AppPilot's watch hands its findings to the page (LC-08; @g9tm/lynxcontrols-pilot, profile `observe` and up). */\n pilotFindings(payload: string): void;\n}\n\n/** A call that failed to cross (the page is gone): the typed error a host sends for a missing answer. */\nconst lost = (error: unknown) => ({\n ok: false,\n error: {\n code: 'host-unreachable',\n message: `The page did not answer: ${error instanceof Error ? error.message : String(error)}`,\n },\n});\n\n/** The factory Lynx for Web calls with `(nativeModules, nativeModulesCall)`; returns the module. */\nexport default function createG9WebHostModule(_nativeModules: unknown, call: Call): G9WebHostModule {\n const ask = (name: string, data: Record<string, unknown>, callback: Reply) => {\n call(name, data).then(callback, (error: unknown) => callback(lost(error)));\n };\n const tell = (name: string, data: Record<string, unknown> = {}) => {\n call(name, data).catch(() => undefined);\n };\n return {\n capabilities: (callback) => ask('capabilities', {}, callback),\n getPreference: (key, callback) => ask('getPreference', { key }, callback),\n setPreference: (key, kind, value, callback) => ask('setPreference', { key, kind, value }, callback),\n preferenceEntries: (prefix, callback) => ask('preferenceEntries', { prefix }, callback),\n safeInsets: (callback) => ask('safeInsets', {}, callback),\n moveToBack: () => tell('moveToBack'),\n hideKeyboard: () => tell('hideKeyboard'),\n setSoftInputMode: (mode) => tell('setSoftInputMode', { mode }),\n hapticTick: () => tell('hapticTick'),\n appDataDirectory: (callback) => ask('appDataDirectory', {}, callback),\n assetUri: (path, callback) => ask('assetUri', { path }, callback),\n pilotFindings: (payload) => tell('pilotFindings', { payload }),\n };\n}\n"],"names":["ensureWorkerAnimationFrame","scope","callback","setTimeout","Date","id","clearTimeout","self","lost","error","Error","String","createG9WebHostModule","_nativeModules","call","ask","name","data","tell","undefined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a,IAAI,oBAAoB,CAAC,GAAGb;QAC5D,UAAU,CAACuB,MAAMvB,WAAaa,IAAI,YAAY;gBAAEU;YAAK,GAAGvB;QACxD,eAAe,CAACwB,UAAYR,KAAK,iBAAiB;gBAAEQ;YAAQ;IAC9D;AACF"}
|
package/dist/scale.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** A view and the root its page draws in (what {@link bridgeScaledRects} corrects). */
|
|
2
|
+
interface ScaledView {
|
|
3
|
+
getBoundingClientRect?(): DOMRect;
|
|
4
|
+
readonly offsetWidth?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The scale an ancestor's `transform` or `zoom` puts on a view: its drawn width over its layout width (1 when there is
|
|
8
|
+
* none, or nothing is laid out yet).
|
|
9
|
+
*/
|
|
10
|
+
export declare function viewScale(drawnWidth: number, layoutWidth: number): number;
|
|
11
|
+
/** A rect measured under a scale `s`, back in the view's layout pixels, the view's own corner kept where it is. */
|
|
12
|
+
export declare function unscaleRect(rect: {
|
|
13
|
+
readonly left: number;
|
|
14
|
+
readonly top: number;
|
|
15
|
+
readonly width: number;
|
|
16
|
+
readonly height: number;
|
|
17
|
+
}, viewLeft: number, viewTop: number, s: number): {
|
|
18
|
+
left: number;
|
|
19
|
+
top: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A view under a scaled ancestor (a design tool fits a phone frame with `transform: scale(…)` or `zoom`): what the page
|
|
25
|
+
* measures — `layoutchange`, `boundingClientRect`, the design probe — must be in the view's layout pixels, as on a
|
|
26
|
+
* device, not in the shrunk pixels the browser draws (LC-26: G9TabBar drew its chrome for 250 px in a 374 px view
|
|
27
|
+
* shown at 0.668). The browser's `getBoundingClientRect` is wrapped once: for an element inside a bridged view's shadow
|
|
28
|
+
* root (also through a nested one, as `x-text`'s) the rect comes back divided by the view's scale around the view's
|
|
29
|
+
* corner; every other element is untouched, and the original returns when the last view is unbridged. Touch
|
|
30
|
+
* coordinates are not corrected (a drag in a scaled preview moves by the drawn distance).
|
|
31
|
+
*/
|
|
32
|
+
export declare function bridgeScaledRects(view: ScaledView, root: Node): () => void;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=scale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../src/scale.ts"],"names":[],"mappings":"AAEA,uFAAuF;AACvF,UAAU,UAAU;IAClB,qBAAqB,CAAC,IAAI,OAAO,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAMD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAIzE;AAED,mHAAmH;AACnH,wBAAgB,WAAW,CACzB,IAAI,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACtG,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,CAAC,EAAE,MAAM,GACR;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAQ9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,IAAI,CA8B1E"}
|
package/dist/scale.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const scaledRoots = new Map();
|
|
2
|
+
let nativeRect = null;
|
|
3
|
+
function viewScale(drawnWidth, layoutWidth) {
|
|
4
|
+
if (!(drawnWidth > 0) || !(layoutWidth > 0)) return 1;
|
|
5
|
+
const s = drawnWidth / layoutWidth;
|
|
6
|
+
return Math.abs(s - 1) < 0.001 ? 1 : s;
|
|
7
|
+
}
|
|
8
|
+
function unscaleRect(rect, viewLeft, viewTop, s) {
|
|
9
|
+
if (1 === s) return {
|
|
10
|
+
left: rect.left,
|
|
11
|
+
top: rect.top,
|
|
12
|
+
width: rect.width,
|
|
13
|
+
height: rect.height
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
left: viewLeft + (rect.left - viewLeft) / s,
|
|
17
|
+
top: viewTop + (rect.top - viewTop) / s,
|
|
18
|
+
width: rect.width / s,
|
|
19
|
+
height: rect.height / s
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function bridgeScaledRects(view, root) {
|
|
23
|
+
if ("u" < typeof Element || 'function' != typeof view.getBoundingClientRect) return ()=>void 0;
|
|
24
|
+
scaledRoots.set(root, view);
|
|
25
|
+
if (!nativeRect) {
|
|
26
|
+
const original = Element.prototype.getBoundingClientRect;
|
|
27
|
+
nativeRect = original;
|
|
28
|
+
Element.prototype.getBoundingClientRect = function() {
|
|
29
|
+
var _owner_offsetWidth;
|
|
30
|
+
const rect = original.call(this);
|
|
31
|
+
let node = 'function' == typeof this.getRootNode ? this.getRootNode() : null;
|
|
32
|
+
let owner;
|
|
33
|
+
while(node && !owner){
|
|
34
|
+
owner = scaledRoots.get(node);
|
|
35
|
+
const host = node.host;
|
|
36
|
+
node = !owner && host && 'function' == typeof host.getRootNode ? host.getRootNode() : null;
|
|
37
|
+
}
|
|
38
|
+
if (!owner) return rect;
|
|
39
|
+
const viewRect = original.call(owner);
|
|
40
|
+
const s = viewScale(viewRect.width, null != (_owner_offsetWidth = owner.offsetWidth) ? _owner_offsetWidth : 0);
|
|
41
|
+
if (1 === s) return rect;
|
|
42
|
+
const r = unscaleRect(rect, viewRect.left, viewRect.top, s);
|
|
43
|
+
return new DOMRect(r.left, r.top, r.width, r.height);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return ()=>{
|
|
47
|
+
scaledRoots.delete(root);
|
|
48
|
+
if (!scaledRoots.size && nativeRect) {
|
|
49
|
+
Element.prototype.getBoundingClientRect = nativeRect;
|
|
50
|
+
nativeRect = null;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export { bridgeScaledRects, unscaleRect, viewScale };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=scale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scale.js","sources":["../src/scale.ts"],"sourcesContent":["// LC-26: a <lynx-view> shown smaller than it is laid out (a scaled ancestor) still measures in its layout pixels.\n\n/** A view and the root its page draws in (what {@link bridgeScaledRects} corrects). */\ninterface ScaledView {\n getBoundingClientRect?(): DOMRect;\n readonly offsetWidth?: number;\n}\n\n// the views whose shadow roots are bridged, and the browser's own getBoundingClientRect while any is\nconst scaledRoots = new Map<Node, ScaledView>();\nlet nativeRect: ((this: Element) => DOMRect) | null = null;\n\n/**\n * The scale an ancestor's `transform` or `zoom` puts on a view: its drawn width over its layout width (1 when there is\n * none, or nothing is laid out yet).\n */\nexport function viewScale(drawnWidth: number, layoutWidth: number): number {\n if (!(drawnWidth > 0) || !(layoutWidth > 0)) return 1;\n const s = drawnWidth / layoutWidth;\n return Math.abs(s - 1) < 0.001 ? 1 : s;\n}\n\n/** A rect measured under a scale `s`, back in the view's layout pixels, the view's own corner kept where it is. */\nexport function unscaleRect(\n rect: { readonly left: number; readonly top: number; readonly width: number; readonly height: number },\n viewLeft: number,\n viewTop: number,\n s: number,\n): { left: number; top: number; width: number; height: number } {\n if (s === 1) return { left: rect.left, top: rect.top, width: rect.width, height: rect.height };\n return {\n left: viewLeft + (rect.left - viewLeft) / s,\n top: viewTop + (rect.top - viewTop) / s,\n width: rect.width / s,\n height: rect.height / s,\n };\n}\n\n/**\n * A view under a scaled ancestor (a design tool fits a phone frame with `transform: scale(…)` or `zoom`): what the page\n * measures — `layoutchange`, `boundingClientRect`, the design probe — must be in the view's layout pixels, as on a\n * device, not in the shrunk pixels the browser draws (LC-26: G9TabBar drew its chrome for 250 px in a 374 px view\n * shown at 0.668). The browser's `getBoundingClientRect` is wrapped once: for an element inside a bridged view's shadow\n * root (also through a nested one, as `x-text`'s) the rect comes back divided by the view's scale around the view's\n * corner; every other element is untouched, and the original returns when the last view is unbridged. Touch\n * coordinates are not corrected (a drag in a scaled preview moves by the drawn distance).\n */\nexport function bridgeScaledRects(view: ScaledView, root: Node): () => void {\n if (typeof Element === 'undefined' || typeof view.getBoundingClientRect !== 'function') return () => undefined;\n scaledRoots.set(root, view);\n if (!nativeRect) {\n const original = Element.prototype.getBoundingClientRect;\n nativeRect = original;\n Element.prototype.getBoundingClientRect = function getBoundingClientRect(this: Element): DOMRect {\n const rect = original.call(this);\n let node: Node | null = typeof this.getRootNode === 'function' ? this.getRootNode() : null;\n let owner: ScaledView | undefined;\n while (node && !owner) {\n owner = scaledRoots.get(node);\n const host = (node as ShadowRoot).host;\n node = !owner && host && typeof host.getRootNode === 'function' ? host.getRootNode() : null;\n }\n if (!owner) return rect;\n const viewRect = original.call(owner as unknown as Element);\n const s = viewScale(viewRect.width, owner.offsetWidth ?? 0);\n if (s === 1) return rect;\n const r = unscaleRect(rect, viewRect.left, viewRect.top, s);\n return new DOMRect(r.left, r.top, r.width, r.height);\n };\n }\n return () => {\n scaledRoots.delete(root);\n if (!scaledRoots.size && nativeRect) {\n Element.prototype.getBoundingClientRect = nativeRect;\n nativeRect = null;\n }\n };\n}\n"],"names":["scaledRoots","Map","nativeRect","viewScale","drawnWidth","layoutWidth","s","Math","unscaleRect","rect","viewLeft","viewTop","bridgeScaledRects","view","root","Element","undefined","original","_owner_offsetWidth","node","owner","host","viewRect","r","DOMRect"],"mappings":"AASA,MAAMA,cAAc,IAAIC;AACxB,IAAIC,aAAkD;AAM/C,SAASC,UAAUC,UAAkB,EAAEC,WAAmB;IAC/D,IAAI,CAAED,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ACzF;YACA,IAAI,CAACD,OAAO,OAAOX;YACnB,MAAMa,WAAWL,SAAS,IAAI,CAACG;YAC/B,MAAMd,IAAIH,UAAUmB,SAAS,KAAK,EAAE,QAAAJ,CAAAA,qBAAAA,MAAM,WAAW,AAAD,IAAhBA,qBAAqB;YACzD,IAAIZ,AAAM,MAANA,GAAS,OAAOG;YACpB,MAAMc,IAAIf,YAAYC,MAAMa,SAAS,IAAI,EAAEA,SAAS,GAAG,EAAEhB;YACzD,OAAO,IAAIkB,QAAQD,EAAE,IAAI,EAAEA,EAAE,GAAG,EAAEA,EAAE,KAAK,EAAEA,EAAE,MAAM;QACrD;IACF;IACA,OAAO;QACLvB,YAAY,MAAM,CAACc;QACnB,IAAI,CAACd,YAAY,IAAI,IAAIE,YAAY;YACnCa,QAAQ,SAAS,CAAC,qBAAqB,GAAGb;YAC1CA,aAAa;QACf;IACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/lynxcontrols-web",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Web platform layer for Lynx for Web: G9HostModule on a <lynx-view> (browser-storage preferences, safe-area insets, a typed unsupported for what a browser cannot do), the counterpart of -native and -lynxtron.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"build": "rslib build"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@g9tm/lynxcontrols-foundation": "2.
|
|
36
|
+
"@g9tm/lynxcontrols-foundation": "2.5.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@lynx-js/web-core": ">=0.26.0"
|