@jsenv/navi 0.29.403 → 0.29.406
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/jsenv_navi.js +5 -2780
- package/dist/dev/jsenv_navi.js.map +2 -23
- package/dist/dev/jsenv_navi_side_effects.js +2850 -15
- package/dist/dev/jsenv_navi_side_effects.js.map +23 -3
- package/dist/jsenv_navi.js +5 -2692
- package/dist/jsenv_navi.js.map +2 -23
- package/dist/jsenv_navi_side_effects.js +2762 -15
- package/dist/jsenv_navi_side_effects.js.map +23 -3
- package/docs/safe_area.md +15 -1
- package/package.json +2 -2
|
@@ -5,16 +5,36 @@
|
|
|
5
5
|
"../../../../../dist/client/import_meta_css/import_meta_css_build.js",
|
|
6
6
|
"../../src/layout/responsive.js",
|
|
7
7
|
"../../src/layout/safe_area.js",
|
|
8
|
+
"../../src/control/control_dom.js",
|
|
9
|
+
"../../src/utils/is_signal.js",
|
|
10
|
+
"../../src/control/picker/time_helpers.js",
|
|
11
|
+
"../../src/control/input/resolve_input_props.js",
|
|
12
|
+
"../../src/control/ui_state_dom.js",
|
|
13
|
+
"../../src/control/control_value.js",
|
|
14
|
+
"../../src/control/controller_registry.js",
|
|
15
|
+
"../../src/control/control_proxy.js",
|
|
16
|
+
"../../src/control/input_effect.js",
|
|
17
|
+
"../../src/box/pseudo_styles.js",
|
|
8
18
|
"../../src/layout/virtual_keyboard.js",
|
|
9
19
|
"../../src/navi_css_vars.js"
|
|
10
20
|
],
|
|
11
21
|
"sourcesContent": [
|
|
12
22
|
"const installImportMetaCssBuild = (importMeta) => {\n const IMPORT_META_CSS_BUILD = \"jsenv_import_meta_css_build\";\n\n if (importMeta.css === IMPORT_META_CSS_BUILD) {\n return;\n }\n\n const stylesheetMap = new Map();\n const adopt = (url, value) => {\n const stylesheet = new CSSStyleSheet({ baseUrl: importMeta.url });\n stylesheet.replaceSync(value);\n stylesheetMap.set(url, stylesheet);\n document.adoptedStyleSheets.push(stylesheet);\n };\n const update = (url, value) => {\n stylesheetMap.get(url).replaceSync(value);\n };\n const remove = (url) => {\n const stylesheet = stylesheetMap.get(url);\n document.adoptedStyleSheets = document.adoptedStyleSheets.filter(\n (s) => s !== stylesheet,\n );\n stylesheetMap.delete(url);\n };\n\n const currentCssSourceMap = new Map();\n Object.defineProperty(importMeta, \"css\", {\n configurable: true,\n get() {\n return IMPORT_META_CSS_BUILD;\n },\n set([value, url]) {\n if (value === undefined) {\n if (stylesheetMap.has(url)) {\n remove(url);\n currentCssSourceMap.delete(url);\n }\n return;\n }\n if (!stylesheetMap.has(url)) {\n adopt(url, value);\n currentCssSourceMap.set(url, value);\n } else if (currentCssSourceMap.get(url) !== value) {\n update(url, value);\n currentCssSourceMap.set(url, value);\n }\n },\n });\n};\n\nexport { installImportMetaCssBuild };\n",
|
|
13
23
|
"import {\n getVirtualKeyboardOverlayHeight,\n subscribeVisualViewportResizeSettled,\n subscribeWindowResizeSettled,\n} from \"@jsenv/dom\";\nimport { computed, signal } from \"@preact/signals\";\n\nexport const windowWidthSignal = signal(window.innerWidth);\nexport const windowHeightSignal = signal(window.innerHeight);\n\n// Debounced (not a raw \"resize\" listener) — see window_size.js's own\n// module comment: mobile fires a transient \"resize\" when the browser's own\n// UI chrome (address bar, etc.) briefly shows/hides, and this needs to settle\n// on the same tick as Popover/Dialog's own repositioning, or one flickers a\n// moment out of sync with the others.\nsubscribeWindowResizeSettled(() => {\n windowWidthSignal.value = window.innerWidth;\n windowHeightSignal.value = window.innerHeight;\n});\n\n// Visual viewport dimensions — update when the virtual keyboard opens/closes or\n// when the browser UI (address bar) shows/hides.\n// When visualViewport is not available, derived from window signals so they\n// stay live without any extra listeners.\nconst vv = window.visualViewport;\nexport const visualViewportWidthSignal = vv\n ? signal(vv.width)\n : computed(() => windowWidthSignal.value);\nexport const visualViewportHeightSignal = vv\n ? signal(vv.height)\n : computed(() => windowHeightSignal.value);\n\nif (vv) {\n const update = () => {\n visualViewportWidthSignal.value = vv.width;\n visualViewportHeightSignal.value = vv.height;\n };\n // The two directions are not equally trustworthy, and treating them alike is\n // what makes one of the two bugs unavoidable.\n //\n // SMALLER is believed at once. Something now covers the screen, and what is\n // sized against these numbers — the dialog/popover ceilings, through\n // --navi-vvh (navi_css_vars.js) — has to answer the smaller screen in the\n // same frame the placement does. The placement reads the viewport live (see\n // getVisibleViewportRect in @jsenv/dom), so a ceiling arriving a debounce\n // later means a box sized for a screen that is gone, placed in the one that\n // replaced it.\n //\n // BIGGER waits for the resize to settle, because growing back is the reading\n // a mobile browser lies about: going straight from one field to the next\n // fires a blur/focus pair that briefly reports the full height again, with\n // the keyboard never having left. Believed, it flicks every popup back to\n // full height and down again between two taps — the \"two inputs\" case in\n // Dialog's own demo. Nothing is lost by waiting: a keyboard that really left\n // stays gone, and the settled event lands 100ms later.\n vv.addEventListener(\"resize\", () => {\n if (\n vv.width < visualViewportWidthSignal.peek() ||\n vv.height < visualViewportHeightSignal.peek()\n ) {\n update();\n }\n });\n subscribeVisualViewportResizeSettled(update);\n vv.addEventListener(\"scroll\", update);\n}\n\n// The app's own screen: the visual viewport minus the bands --navi-app-inset-*\n// describes (see safe_area.js, and navi_css_vars.js, which derives\n// --navi-app-width/--navi-app-height from the same bands in CSS). Anything\n// escaping normal flow is sized and placed against this rather than the\n// viewport: an app that simulates a handheld screen keeps that width even for\n// what paints on top of it.\n//\n// The bands are read back from CSS rather than worked out again here: a JS\n// copy of the formula is the one that goes stale, and it only knows the\n// centered bands --navi-app-max-width/height produce, not the uneven ones an\n// app writes directly. They are registered as lengths (safe_area.js), so they\n// compute to pixels whatever unit they were declared in. Read on the spot\n// rather than cached in a signal: the callers are a popup resolving its margin\n// and placing itself, which already read far more of the DOM than this, and\n// nothing then has to be invalidated when the value changes.\nconst readAppInsets = () => {\n const computedStyle = getComputedStyle(document.documentElement);\n return {\n top: readAppInset(computedStyle, \"top\"),\n right: readAppInset(computedStyle, \"right\"),\n bottom: readAppInset(computedStyle, \"bottom\"),\n left: readAppInset(computedStyle, \"left\"),\n };\n};\nconst readAppInset = (computedStyle, side) => {\n const value = parseFloat(\n computedStyle.getPropertyValue(`--navi-app-inset-${side}`),\n );\n // A browser that cannot register a custom property hands back the calc()\n // it was written as: JS then answers for the whole viewport.\n return Number.isFinite(value) ? value : 0;\n};\nexport const getAppWidth = () => {\n const { left, right } = readAppInsets();\n return visualViewportWidthSignal.value - left - right;\n};\n// Handed to @jsenv/dom (setPlacementViewportInsets, wired in navi_css_vars.js)\n// so placement keeps to the same rectangle the CSS size caps describe. The\n// keyboard is taken back off the bottom band: --navi-app-inset-bottom counts\n// it, and the placement viewport already subtracts it (see\n// getVisibleViewportRect in @jsenv/dom's visible_rect.js), so it would count\n// twice.\nexport const getAppInsets = () => {\n const insets = readAppInsets();\n insets.bottom -= getVirtualKeyboardOverlayHeight();\n return insets;\n};\n// The keyboard stays in: this is --navi-app-height, which the ceilings are\n// sized against, read in JS.\nexport const getAppHeight = () => {\n const { top, bottom } = readAppInsets();\n const height = visualViewportHeightSignal.value - top - bottom;\n if (height < 0) {\n return 0;\n }\n return height;\n};\n\n// Whether the primary input is a finger rather than a mouse. A pointer type is\n// not a size: a narrow desktop window is still a mouse, and a large tablet is\n// still a finger — so anything sized for the on-screen keyboard must key off\n// this, never off windowWidthSignal. Thumb reach needs both, which is what\n// smallTouchScreenSignal below answers.\nconst coarsePointerQuery = window.matchMedia\n ? window.matchMedia(\"(pointer: coarse)\")\n : null;\nexport const coarsePointerSignal = signal(\n coarsePointerQuery ? coarsePointerQuery.matches : false,\n);\nif (coarsePointerQuery) {\n coarsePointerQuery.addEventListener(\"change\", () => {\n coarsePointerSignal.value = coarsePointerQuery.matches;\n });\n}\n\n// Whether the screen is one a bottom sheet actually suits: a finger *and* a\n// screen whose bottom edge stays where the thumb already is. Touch alone is not\n// enough — a tall touch screen (a tablet, a kiosk panel) docks a sheet a whole\n// screen away from where the finger just tapped, which is worse than the\n// centered box it replaced.\n//\n// A phone is recognized by its SHAPE, not by a box of maximum dimensions: what\n// makes the bottom edge reachable is holding a narrow slab, and phones keep\n// growing along their long side (20:9, 21:9) while staying just as narrow. So\n// each orientation is answered on the short side plus the elongation:\n// - upright: narrow enough to be held in one hand, and taller than it is wide.\n// Its height is deliberately unbounded — a very tall narrow screen is the\n// case a bottom sheet is most for, not the case to exclude.\n// - on its side: short enough that the bottom edge is a thumb away whatever the\n// width, and wider than it is tall.\n// A tablet fails both: it is too wide upright, and too tall on its side — the\n// smallest one already starts around 740 CSS px on its short side, and the\n// bound below leaves that gap deliberately wide rather than cutting close to\n// the largest phone.\n//\n// Read off window, not visualViewport: the virtual keyboard shrinks the visual\n// viewport while the user types, and a dialog must not undock mid-interaction\n// because a keyboard opened under it.\nconst HANDHELD_MAX_SHORT_SIDE = 600;\n// Enough elongation to tell a slab from a square-ish panel; a phone is well\n// past it (1.7 and up) in either orientation.\nconst HANDHELD_MIN_RATIO = 1.2;\nexport const smallTouchScreenSignal = computed(() => {\n if (!coarsePointerSignal.value) {\n return false;\n }\n const width = windowWidthSignal.value;\n const height = windowHeightSignal.value;\n if (width <= HANDHELD_MAX_SHORT_SIDE) {\n return height >= width * HANDHELD_MIN_RATIO;\n }\n if (height <= HANDHELD_MAX_SHORT_SIDE) {\n return width >= height * HANDHELD_MIN_RATIO;\n }\n return false;\n});\n",
|
|
14
|
-
"/**\n * The part of the window an app actually has, in two levels.\n *\n * Two, and not one, for a reason worth stating up front: a fixed bar is one of\n * the things that reduce the free region, so it cannot ALSO be placed against\n * that region — it would push itself off the edge it is pinned to. What is\n * anchored and what is anchored-inside are two different rectangles.\n *\n * 1. `--navi-app-inset-{top,right,bottom,left}` — from the window's edges to\n * the app's own rectangle. Whatever is pinned to an edge (a fixed bar, a\n * side panel, a popup aimed at a corner) is pinned to THAT, so an app\n * pretending to be a 600px handheld inside a 1500px window stays one\n * rectangle instead of a column with its furniture spread across the glass.\n *\n * 2. `--navi-safe-area-inset-{top,right,bottom,left}` — from the window's edges\n * to the band left free INSIDE that rectangle. Whatever flows, scrolls, or\n * gets painted keeps to it.\n *\n * Level 2 gathers what takes an edge: the device's own notch\n * (`env(safe-area-inset-*)`, which is the browser's version of this very idea)\n * and the fixed bars (fixed_bar_space.js, the one slot per edge — something\n * else covering an edge is published by being drawn as a FixedBar). That is\n * the point of naming it at all — a component that must stay clear of what\n * covers the screen reads ONE set of numbers, and never has to learn what is\n * covering it.\n *\n * `max()` between the notch and the bars rather than a sum: a bar pinned to an\n * edge already reaches under the notch and counts it in its own size (see\n * fixed_bar.jsx), so adding both would reserve it twice.\n *\n * JS placement answers to the level-1 rectangle too: getAppInsets\n * (layout/responsive.js) reads these same bands back off the computed style,\n * and hands them to pickPositionRelativeTo via setPlacementViewportInsets (see\n * navi_css_vars.js).\n */\n\nconst SAFE_AREA_CSS = /* css */ `\n /* Declared as lengths so that they COMPUTE to one: an unregistered custom\n property keeps the calc() it was written as, and the sums below are then\n strings no one can read back. Reading them off the computed style only\n works for a registered property, and both levels are read there: level 1\n by popup placement, which must keep to the same rectangle as the CSS\n whether the bands are centered or written by the app (getAppInsets in\n layout/responsive.js); level 2 by a route transition, to keep the band the\n page being left had (nav/transition_window.js). */\n @property --navi-app-inset-top {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-app-inset-right {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-app-inset-bottom {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-app-inset-left {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-top {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-right {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-bottom {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-left {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n\n @layer navi {\n /* Layered whole, rules included: the two rules below are offers, not\n structure. [data-navi-safe-area] is an attribute the app puts on its own\n scroller, so the app's own padding on that element has to win over what\n navi suggests for it. */\n :root {\n /* The room each kind of furniture takes, declared here at zero and\n written by whoever takes it. A slot rather than a value: the sum below\n has to be readable whether or not the app ever mounts a fixed bar. */\n --navi-fixed-bar-space-top: 0px;\n --navi-fixed-bar-space-right: 0px;\n --navi-fixed-bar-space-bottom: 0px;\n --navi-fixed-bar-space-left: 0px;\n\n /* What the on-screen keyboard covers — and ONLY where it overlays the\n content rather than shrinking the viewport, which is navi's default\n wherever the browser has the VirtualKeyboard API (see\n layout/virtual_keyboard.js). Zero on Firefox/Safari, which have no\n such API, and zero for an app that called\n disableVirtualKeyboardOverlay(): both get a keyboard that shrinks the\n visual viewport instead, which --navi-vvh already tracks. Reading\n env() rather than a JS-written value keeps it live: the keyboard\n slides in over several frames and this follows it without a\n listener. */\n --navi-keyboard-inset-bottom: env(keyboard-inset-height, 0px);\n\n /* Level 1. Centered bands, so that declaring one ceiling\n (--navi-app-max-width) is all an app has to do to be a narrow screen in\n a wide window; an app that wants them uneven writes these directly. */\n --navi-app-inset-top: max(\n 0px,\n (var(--navi-vvh) - var(--navi-app-max-height, var(--navi-vvh))) / 2\n );\n /* The keyboard on top of the band, and on this edge only: it eats into\n the app's own rectangle exactly like a viewport that shrank, which is\n what makes both paths end up at the same --navi-app-height (and so at\n the same dialog/popover ceiling). Not part of the centering, hence\n added here rather than folded into --navi-app-inset-top: a keyboard\n takes the bottom, it doesn't re-center anything. */\n --navi-app-inset-bottom: calc(\n var(--navi-app-inset-top) + var(--navi-keyboard-inset-bottom)\n );\n --navi-app-inset-left: max(\n 0px,\n (var(--navi-vvw) - var(--navi-app-max-width, var(--navi-vvw))) / 2\n );\n --navi-app-inset-right: var(--navi-app-inset-left);\n\n /* Level 2. */\n --navi-safe-area-inset-top: calc(\n var(--navi-app-inset-top) +\n max(env(safe-area-inset-top), var(--navi-fixed-bar-space-top))\n );\n --navi-safe-area-inset-right: calc(\n var(--navi-app-inset-right) +\n max(env(safe-area-inset-right), var(--navi-fixed-bar-space-right))\n );\n --navi-safe-area-inset-bottom: calc(\n var(--navi-app-inset-bottom) +\n max(env(safe-area-inset-bottom), var(--navi-fixed-bar-space-bottom))\n );\n --navi-safe-area-inset-left: calc(\n var(--navi-app-inset-left) +\n max(env(safe-area-inset-left), var(--navi-fixed-bar-space-left))\n );\n\n /* The document is the scrollport in the common case, and something the\n browser scrolls to — an anchor, a focused field, a restored position —\n landing under a bar is never what anyone wants. */\n scroll-padding-top: var(--navi-safe-area-inset-top);\n scroll-padding-right: var(--navi-safe-area-inset-right);\n scroll-padding-bottom: var(--navi-safe-area-inset-bottom);\n scroll-padding-left: var(--navi-safe-area-inset-left);\n }\n\n /* Put this on whatever scrolls under the furniture.\n\n There are TWO rooms to give back, and forgetting the second one is the\n classic bug:\n\n - padding, so the end of the content can be scrolled out from under it.\n Without it the last screenful stays covered, unreachable.\n - scroll-padding, so anything the browser scrolls TO lands in front of it\n rather than under. The padding above does not help here: it moves the\n content, not the place the browser scrolls the target to.\n\n Marked by the app rather than picked by navi: which element scrolls is\n the app's business, and an app with more than one would have to fight a\n component that chose for it. An app is free to read the variables itself\n instead. */\n [data-navi-safe-area] {\n padding-top: var(--navi-safe-area-inset-top);\n padding-right: var(--navi-safe-area-inset-right);\n padding-bottom: var(--navi-safe-area-inset-bottom);\n padding-left: var(--navi-safe-area-inset-left);\n\n scroll-padding-top: var(--navi-safe-area-inset-top);\n scroll-padding-right: var(--navi-safe-area-inset-right);\n scroll-padding-bottom: var(--navi-safe-area-inset-bottom);\n scroll-padding-left: var(--navi-safe-area-inset-left);\n }\n }\n`;\nimport.meta.css = SAFE_AREA_CSS;\n",
|
|
15
|
-
"/**\n *
|
|
24
|
+
"/**\n * The part of the window an app actually has, in two levels.\n *\n * Two, and not one, for a reason worth stating up front: a fixed bar is one of\n * the things that reduce the free region, so it cannot ALSO be placed against\n * that region — it would push itself off the edge it is pinned to. What is\n * anchored and what is anchored-inside are two different rectangles.\n *\n * 1. `--navi-app-inset-{top,right,bottom,left}` — from the window's edges to\n * the app's own rectangle. Whatever is pinned to an edge (a fixed bar, a\n * side panel, a popup aimed at a corner) is pinned to THAT, so an app\n * pretending to be a 600px handheld inside a 1500px window stays one\n * rectangle instead of a column with its furniture spread across the glass.\n *\n * 2. `--navi-safe-area-inset-{top,right,bottom,left}` — from the window's edges\n * to the band left free INSIDE that rectangle. Whatever flows, scrolls, or\n * gets painted keeps to it.\n *\n * Level 2 gathers what takes an edge: the device's own notch\n * (`env(safe-area-inset-*)`, which is the browser's version of this very idea)\n * and the fixed bars (fixed_bar_space.js, the one slot per edge — something\n * else covering an edge is published by being drawn as a FixedBar). That is\n * the point of naming it at all — a component that must stay clear of what\n * covers the screen reads ONE set of numbers, and never has to learn what is\n * covering it.\n *\n * `max()` between the notch and the bars rather than a sum: a bar pinned to an\n * edge already reaches under the notch and counts it in its own size (see\n * fixed_bar.jsx), so adding both would reserve it twice.\n *\n * JS placement answers to the level-1 rectangle too: getAppInsets\n * (layout/responsive.js) reads these same bands back off the computed style,\n * and hands them to pickPositionRelativeTo via setPlacementViewportInsets (see\n * navi_css_vars.js).\n */\n\nconst SAFE_AREA_CSS = /* css */ `\n /* Declared as lengths so that they COMPUTE to one: an unregistered custom\n property keeps the calc() it was written as, and the sums below are then\n strings no one can read back. Reading them off the computed style only\n works for a registered property, and both levels are read there: level 1\n by popup placement, which must keep to the same rectangle as the CSS\n whether the bands are centered or written by the app (getAppInsets in\n layout/responsive.js); level 2 by a route transition, to keep the band the\n page being left had (nav/transition_window.js). */\n @property --navi-app-inset-top {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-app-inset-right {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-app-inset-bottom {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-app-inset-left {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-top {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-right {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-bottom {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n @property --navi-safe-area-inset-left {\n syntax: \"<length>\";\n inherits: true;\n initial-value: 0px;\n }\n\n @layer navi {\n /* Layered whole, rules included: the two rules below are offers, not\n structure. [data-navi-safe-area] is an attribute the app puts on its own\n scroller, so the app's own padding on that element has to win over what\n navi suggests for it. */\n :root {\n /* The room each kind of furniture takes, declared here at zero and\n written by whoever takes it. A slot rather than a value: the sum below\n has to be readable whether or not the app ever mounts a fixed bar. */\n --navi-fixed-bar-space-top: 0px;\n --navi-fixed-bar-space-right: 0px;\n --navi-fixed-bar-space-bottom: 0px;\n --navi-fixed-bar-space-left: 0px;\n\n /* What the on-screen keyboard covers — and ONLY where it overlays the\n content rather than shrinking the viewport, which is navi's default\n wherever the browser has the VirtualKeyboard API (see\n layout/virtual_keyboard.js). Zero on Firefox/Safari, which have no\n such API, and zero for an app that called\n disableVirtualKeyboardOverlay(): both get a keyboard that shrinks the\n visual viewport instead, which --navi-vvh already tracks. Reading\n env() rather than a JS-written value keeps it live: the keyboard\n slides in over several frames and this follows it without a\n listener. */\n --navi-keyboard-inset-bottom: env(keyboard-inset-height, 0px);\n /* What Chrome paints right above the keyboard without counting it in\n the keyboard's geometry: the autofill/suggestion strip, which neither\n env(keyboard-inset-height) nor geometrychange reports (see\n window_size.js in @jsenv/dom). 49–64px measured on Android 10 /\n Chrome 153; 0 while no keyboard is up.\n\n Kept out of --navi-keyboard-inset-bottom: the strip is not always\n there, and whatever sits against the keyboard (a fixed bar, a popup)\n would float above it with a gap when it is missing. Only scrolling\n takes it, where an excess costs nothing: the room to scroll into, and\n the scroll-padding-bottom a scroll lands against — navi's reveal of\n the focused field (layout/virtual_keyboard.js), and Chrome's own,\n which keeps the caret flush on scroll-padding-bottom as a textarea\n grows under typing. */\n --navi-keyboard-strip-allowance: min(\n var(--navi-keyboard-inset-bottom),\n 64px\n );\n\n /* Level 1. Centered bands, so that declaring one ceiling\n (--navi-app-max-width) is all an app has to do to be a narrow screen in\n a wide window; an app that wants them uneven writes these directly. */\n --navi-app-inset-top: max(\n 0px,\n (var(--navi-vvh) - var(--navi-app-max-height, var(--navi-vvh))) / 2\n );\n /* The keyboard on top of the band, and on this edge only: it eats into\n the app's own rectangle exactly like a viewport that shrank, which is\n what makes both paths end up at the same --navi-app-height (and so at\n the same dialog/popover ceiling). Not part of the centering, hence\n added here rather than folded into --navi-app-inset-top: a keyboard\n takes the bottom, it doesn't re-center anything. */\n --navi-app-inset-bottom: calc(\n var(--navi-app-inset-top) + var(--navi-keyboard-inset-bottom)\n );\n --navi-app-inset-left: max(\n 0px,\n (var(--navi-vvw) - var(--navi-app-max-width, var(--navi-vvw))) / 2\n );\n --navi-app-inset-right: var(--navi-app-inset-left);\n\n /* Level 2. */\n --navi-safe-area-inset-top: calc(\n var(--navi-app-inset-top) +\n max(env(safe-area-inset-top), var(--navi-fixed-bar-space-top))\n );\n --navi-safe-area-inset-right: calc(\n var(--navi-app-inset-right) +\n max(env(safe-area-inset-right), var(--navi-fixed-bar-space-right))\n );\n --navi-safe-area-inset-bottom: calc(\n var(--navi-app-inset-bottom) +\n max(env(safe-area-inset-bottom), var(--navi-fixed-bar-space-bottom))\n );\n --navi-safe-area-inset-left: calc(\n var(--navi-app-inset-left) +\n max(env(safe-area-inset-left), var(--navi-fixed-bar-space-left))\n );\n\n /* The document is the scrollport in the common case, and something the\n browser scrolls to — an anchor, a focused field, a restored position —\n landing under a bar is never what anyone wants. */\n scroll-padding-top: var(--navi-safe-area-inset-top);\n scroll-padding-right: var(--navi-safe-area-inset-right);\n scroll-padding-bottom: calc(\n var(--navi-safe-area-inset-bottom) +\n var(--navi-keyboard-strip-allowance)\n );\n scroll-padding-left: var(--navi-safe-area-inset-left);\n }\n\n /* Put this on whatever scrolls under the furniture.\n\n There are TWO rooms to give back, and forgetting the second one is the\n classic bug:\n\n - padding, so the end of the content can be scrolled out from under it.\n Without it the last screenful stays covered, unreachable.\n - scroll-padding, so anything the browser scrolls TO lands in front of it\n rather than under. The padding above does not help here: it moves the\n content, not the place the browser scrolls the target to.\n\n Marked by the app rather than picked by navi: which element scrolls is\n the app's business, and an app with more than one would have to fight a\n component that chose for it. An app is free to read the variables itself\n instead. */\n [data-navi-safe-area] {\n padding-top: var(--navi-safe-area-inset-top);\n padding-right: var(--navi-safe-area-inset-right);\n padding-bottom: calc(\n var(--navi-safe-area-inset-bottom) +\n var(--navi-keyboard-strip-allowance)\n );\n padding-left: var(--navi-safe-area-inset-left);\n\n scroll-padding-top: var(--navi-safe-area-inset-top);\n scroll-padding-right: var(--navi-safe-area-inset-right);\n scroll-padding-bottom: calc(\n var(--navi-safe-area-inset-bottom) +\n var(--navi-keyboard-strip-allowance)\n );\n scroll-padding-left: var(--navi-safe-area-inset-left);\n }\n\n /* The keyboard's room, for a page that marked nothing: the document is\n then what scrolls under the keyboard, and a field near its end needs as\n much room below it as the keyboard and its strip are tall to be brought\n out from under them (layout/virtual_keyboard.js). Unlike the bars, this\n is owed without the app asking: the keyboard only covers the page\n because navi made it overlay. A marked element already gives that room\n in its padding-bottom, hence the :has().\n\n A pseudo-element rather than a padding on :root, which the common reset\n zeroing html's padding would take away. */\n :root:not(:has([data-navi-safe-area]))::after {\n display: block;\n height: calc(\n var(--navi-keyboard-inset-bottom) + var(--navi-keyboard-strip-allowance)\n );\n content: \"\";\n }\n }\n`;\nimport.meta.css = SAFE_AREA_CSS;\n",
|
|
25
|
+
"/**\n * DOM utilities for navigating the control element hierarchy.\n *\n * A control is a self-contained interactive widget. Its DOM structure can be\n * either flat (host only) or layered (wrapper + host):\n *\n * Flat — the element is both the root and the host:\n * ```html\n * <button navi-control navi-control-host>Click me</button>\n * ```\n *\n * Layered — a visual wrapper surrounds a native input that is the real host:\n * ```html\n * <span navi-control> ← wrapper: root of the control's DOM subtree\n * <input navi-control-host /> ← host: holds controlProps, value, UI state, constraints\n * </span>\n * ```\n *\n * Attribute roles:\n * - `navi-control` boolean, on the wrapper/root; marks the control boundary\n * - `navi-control-host` boolean, on the host; set automatically by `useInteractiveProps`\n *\n * See control_proxy.js for the `navi-control-proxy-for` pattern.\n */\n\n/**\n * Returns the host element inside `el` — the element that holds the control's\n * value, UI state, and constraints (i.e. the element onto which\n * `useInteractiveProps` spreads `controlProps` and its event handlers).\n *\n * Returns `null` when `el` is itself the host (no separate wrapper).\n */\nexport const findControlHost = (el) => {\n if (el.hasAttribute(\"navi-control-host\")) {\n return el;\n }\n return el.querySelector(\"[navi-control-host]\");\n};\n/**\n * The control this element belongs to, wherever it sits relative to it.\n *\n * `findControlHost` above answers for a control's own DOM (itself, or the native\n * element it wraps). This one is for something that is not part of a control but\n * has to reach one — an interaction declared on a box (see\n * interaction/interactions.js), which may be the control, may sit inside it, or\n * may be a wrapper around exactly one. Nearest wins in that order, and the answer\n * is null when there is no control the box belongs to: not every box lives in\n * one, and a box laying out several controls (a row of badges, a toolbar) is\n * held by none of them — its interactions are its own, and a press on its empty\n * part is not a press on the first control it happens to contain.\n */\nexport const findNearestControlHost = (el) => {\n // Itself, then upwards — the box is inside a button, or is one.\n const selfOrAncestor = el.closest(\"[navi-control-host]\");\n if (selfOrAncestor) {\n return selfOrAncestor;\n }\n // …then downwards, only when the box wraps a single control. Counted by\n // control, not by host: a picker holds the hosts of its popup content, and a\n // box around that one picker is still around one control.\n let single = null;\n for (const host of el.querySelectorAll(\"[navi-control-host]\")) {\n const controlRoot = host.closest(\"[navi-control]\") || host;\n const controlAbove = controlRoot.parentElement.closest(\"[navi-control]\");\n if (controlAbove && el.contains(controlAbove)) {\n continue;\n }\n if (single && single !== controlRoot) {\n return null;\n }\n single = controlRoot;\n }\n return single ? findControlHost(single) : null;\n};\nexport const isControlRoot = (el) => {\n return el.hasAttribute(\"navi-control\");\n};\nexport const isControlHost = (el) => {\n return el.hasAttribute(\"navi-control-host\");\n};\nexport const isControl = (el) => {\n return isControlRoot(el) || isControlHost(el);\n};\n\n/**\n * Returns the nearest ancestor of `el` (exclusive of `el`'s own control) that\n * has a `[data-action]` attribute.\n *\n * The search walks up `parentElement` manually (rather than using `.closest()`)\n * so it can stop at hard boundaries.\n *\n * **`[navi-control=\"picker\"]` boundary**: a picker is a hard stop for what is\n * inside its popup. Elements in there can reach the picker itself, but nothing\n * above it — an input inside a picker must not submit the form around it. The\n * picker's own trigger is not inside it: a picker pressed as a whole (a confirm\n * picker sending the form around it, see picker_confirm.jsx) stands in that\n * form like any control there, and reaches it.\n *\n * ```html\n * <form data-action=\"outer\"> ← found from the picker's own input,\n * <button navi-control=\"picker\" data-action=\"p\"> NOT from inside its popup\n * <input navi-control-host /> ← el (the picker's own input)\n * <div popover data-picker-content>\n * <input navi-control-host /> ← el (in picker popover): stops at the picker\n * </div>\n * </button>\n * </form>\n * ```\n */\nexport const findClosestControlWithAction = (el) => {\n let current = el;\n while (current) {\n if (current.hasAttribute(\"data-action\")) {\n return current;\n }\n if (isPickerBoundaryFor(current, el)) {\n return undefined;\n }\n current = current.parentElement;\n }\n return undefined;\n};\nconst isPickerBoundaryFor = (candidate, el) => {\n if (candidate.getAttribute(\"navi-control\") !== \"picker\") {\n return false;\n }\n const content = el.closest(\"[data-picker-content]\");\n return Boolean(content) && candidate.contains(content);\n};\n\n/**\n * Returns the closest ancestor control element of `el` — i.e. the nearest\n * `[navi-control]` element that is not the control `el` belongs to.\n *\n * `navi-control` is only on wrapper elements, never on hosts. So\n * `el.closest(\"[navi-control]\")` from a host returns that host's own wrapper,\n * and one more `.parentNode.closest(\"[navi-control]\")` reaches a true ancestor:\n *\n * ```html\n * <button navi-control> ← outer control (returned)\n * <span navi-control> ← inner wrapper (skipped via parentNode)\n * <input navi-control-host /> ← el\n * </span>\n * </button>\n * ```\n */\nexport const getParentControl = (el) => {\n const ownControlRoot = el.closest(\"[navi-control]\");\n const parentControlRoot = ownControlRoot.parentNode.closest(\"[navi-control]\");\n return parentControlRoot;\n};\n\n/**\n * Returns the root element of the control that `el` belongs to, or `null` if\n * `el` is not part of a control.\n *\n * Use this when you have an element that may be a host (inner input) and need\n * the visual boundary of its control — e.g. to anchor a callout, track\n * mousedown interactions, or measure the control's bounding box.\n */\nexport const findControlRoot = (el) => {\n if (el.hasAttribute(\"navi-control\")) {\n return el;\n }\n if (el.hasAttribute(\"navi-control-host\")) {\n return el.closest(\"[navi-control]\");\n }\n return null;\n};\n",
|
|
26
|
+
"export const isSignal = (value) => {\n return getSignalType(value) !== null;\n};\n\nconst BRAND_SYMBOL = Symbol.for(\"preact-signals\");\nexport const getSignalType = (value) => {\n if (!value || typeof value !== \"object\") {\n return null;\n }\n\n if (value.brand !== BRAND_SYMBOL) {\n return null;\n }\n\n if (typeof value._fn === \"function\") {\n return \"computed\";\n }\n\n return \"signal\";\n};\n",
|
|
27
|
+
"/**\n * Parses a time string into seconds.\n * Accepts:\n * - number: returned as-is (already in seconds)\n * - \"HH:MM\" string: converted to seconds (e.g. \"00:30\" → 1800, \"01:00\" → 3600)\n * - undefined/null: returned as-is\n */\nexport const timeStringToSeconds = (timeString) => {\n if (typeof timeString !== \"string\") {\n return timeString;\n }\n const colonIndex = timeString.indexOf(\":\");\n if (colonIndex === -1) {\n return Number(timeString);\n }\n const hours = parseInt(timeString.slice(0, colonIndex), 10);\n const minutes = parseInt(timeString.slice(colonIndex + 1), 10);\n return (hours * 60 + minutes) * 60;\n};\n\nexport const isToday = (value) => {\n if (!value) {\n return false;\n }\n const now = new Date();\n const todayStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, \"0\")}-${String(now.getDate()).padStart(2, \"0\")}`;\n if (typeof value === \"string\") {\n return value === todayStr;\n }\n if (typeof value === \"number\") {\n const d = new Date(value);\n const s = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, \"0\")}-${String(d.getDate()).padStart(2, \"0\")}`;\n return s === todayStr;\n }\n if (value instanceof Date) {\n const s = `${value.getFullYear()}-${String(value.getMonth() + 1).padStart(2, \"0\")}-${String(value.getDate()).padStart(2, \"0\")}`;\n return s === todayStr;\n }\n return false;\n};\n\n/**\n * Returns the current time as \"HH:MM\", with an optional minute offset.\n *\n * @param {number} [offsetMinutes=0] - Minutes to add (negative = subtract).\n * E.g. getNowHours(-5) returns \"now minus 5 minutes\".\n *\n * @example\n * getNowHours() // \"14:30\"\n * getNowHours(-5) // \"14:25\"\n */\nexport const getNowHours = (offsetMinutes = 0) => {\n const now = new Date();\n const totalMinutes = now.getHours() * 60 + now.getMinutes() + offsetMinutes;\n const clamped =\n totalMinutes < 0\n ? 0\n : totalMinutes > 23 * 60 + 59\n ? 23 * 60 + 59\n : totalMinutes;\n const h = Math.floor(clamped / 60);\n const m = clamped % 60;\n return `${String(h).padStart(2, \"0\")}:${String(m).padStart(2, \"0\")}`;\n};\n\n/**\n * Returns the current time rounded up to the nearest step boundary,\n * with an optional minute offset applied first.\n *\n * This is useful to compute a step-aligned `min` for a time picker:\n * passing it ensures the first available slot is always on a step boundary.\n *\n * @param {number} stepMinutes - Step size in minutes (e.g. 30).\n * @param {number} [offsetMinutes=0] - Minutes to add before rounding (negative = subtract).\n *\n * @example\n * // At 9:32, step 30, offset -5 → raw = 9:27 → ceil to 30 → \"09:30\"\n * // At 9:38, step 30, offset -5 → raw = 9:33 → ceil to 30 → \"10:00\"\n * getNowHoursRoundedToStep(30, -5)\n */\nexport const getNowHoursRoundedToStep = (stepMinutes, offsetMinutes = 0) => {\n const now = new Date();\n const totalMinutes = now.getHours() * 60 + now.getMinutes() + offsetMinutes;\n const aligned = Math.ceil(totalMinutes / stepMinutes) * stepMinutes;\n const clamped =\n aligned < 0 ? 0 : aligned > 23 * 60 + 59 ? 23 * 60 + 59 : aligned;\n const h = Math.floor(clamped / 60);\n const m = clamped % 60;\n return `${String(h).padStart(2, \"0\")}:${String(m).padStart(2, \"0\")}`;\n};\n\n/**\n * \"HH:MM\" and its two numbers, in both directions — what any control made of an\n * hour beside a minute (fields, wheels) aggregates to and is placed from. Held\n * as numbers, written on two digits: how they are shown is each control's own\n * business.\n */\nexport const parseTimeParts = (time) => {\n if (typeof time !== \"string\") {\n return null;\n }\n const match = /^(\\d{1,2}):(\\d{1,2})/.exec(time);\n if (!match) {\n return null;\n }\n return { hour: Number(match[1]), minute: Number(match[2]) };\n};\n\n// Half a time is not a time: a control holding one of the two and nothing in\n// the other has no value at all, and a form has nothing to send about it.\nexport const formatTimeParts = (hour, minute) => {\n if (\n hour === \"\" ||\n hour === undefined ||\n minute === \"\" ||\n minute === undefined\n ) {\n return undefined;\n }\n return `${padTwo(hour)}:${padTwo(minute)}`;\n};\n\nexport const minutesFromTime = (time) => {\n const parts = parseTimeParts(time);\n if (!parts) {\n return null;\n }\n return parts.hour * 60 + parts.minute;\n};\n\n// Not folded back into the day: 1440 is \"24:00\", the end of the day a span can\n// run into.\nexport const timeFromMinutes = (minutes) => {\n return `${padTwo(Math.floor(minutes / 60))}:${padTwo(minutes % 60)}`;\n};\n\nconst padTwo = (value) => String(value).padStart(2, \"0\");\n",
|
|
28
|
+
"import { CHAR_CLASS_PRESETS } from \"@jsenv/validity\";\nimport { timeStringToSeconds } from \"../picker/time_helpers.js\";\n\n// What a bound signal's type says is what its VALUE is (a validity type);\n// what a control's `type` says is what the control IS. This table is the whole\n// bridge between the two vocabularies: a value type with a row here asks for\n// that control, one without a row asks for nothing and the control keeps its\n// own default. \"string\" has no row on purpose — it is the value every typeless\n// control already holds — and a name only one side knows must never cross as\n// is: a control type nobody implements is a plain text field that writes an\n// object as \"[object Object]\" (see warnOnUnknownPickerType in picker.jsx).\n// Numeric value types map to navi_number rather than the native type=\"number\"\n// (spinner buttons, poor UX).\nconst CONTROL_TYPE_BY_SIGNAL_TYPE = {\n boolean: \"checkbox\",\n number: \"navi_number\",\n integer: \"navi_number\",\n float: \"navi_number\",\n ratio: \"navi_number\",\n longitude: \"navi_number\",\n latitude: \"navi_number\",\n second: \"navi_number\",\n minute: \"navi_number\",\n hour: \"navi_number\",\n year: \"navi_number\",\n percentage: \"navi_percentage\",\n date: \"date\",\n month: \"month\",\n week: \"week\",\n time: \"time\",\n datetime: \"datetime\",\n duration: \"duration\",\n color: \"color\",\n email: \"email\",\n url: \"url\",\n array: \"array\",\n object: \"object\",\n};\n\n// Conceptual navi types: defaults, plus the host type they resolve to.\n// `navi-input-type` keeps the type the caller asked for once the host has\n// become something plainer — it is what says the value is a number (see\n// isNumberInput), and what lets constraint messages use domain-specific\n// wording instead of the generic \"Ce nombre doit être...\".\n// A type a picker preset draws (navi_time, navi_minute: see picker_preset.jsx)\n// has no row: resolveInputProps runs before the preset resolver, and a row\n// would turn the type into its host before the preset resolver reads it. The\n// preset hands the host type on itself.\nconst NAVI_TYPE_DEFAULTS = {\n navi_percentage: {\n \"type\": \"navi_number\",\n \"navi-input-type\": \"percentage\",\n \"min\": 0,\n \"max\": 100,\n \"step\": 1,\n },\n navi_number: {\n \"type\": \"text\",\n \"navi-input-type\": \"number\",\n \"autoCorrect\": \"off\",\n \"spellcheck\": false,\n \"autoComplete\": \"off\",\n },\n};\n\n// The navi input types whose value IS a number.\nconst NUMBER_NAVI_INPUT_TYPE_SET = new Set([\n \"number\",\n \"percentage\",\n \"hour\",\n \"minute\",\n \"second\",\n]);\n\n/**\n * Whether the control holds a number — asked of what the control IS, never of\n * `inputMode`. In HTML `inputmode` picks the on-screen keyboard and says\n * nothing about the value: a licence number, a postal code or a card number\n * with a check letter all want the digit keypad while staying strings. What a\n * number field is spelled `type=\"number\"`, or a navi type that resolves to a\n * text host and leaves `navi-input-type` behind to say what it was.\n */\nexport const isNumberInput = (type, naviInputType) => {\n if (type === \"number\") {\n return true;\n }\n return NUMBER_NAVI_INPUT_TYPE_SET.has(naviInputType);\n};\n\n/**\n * resolveInputProps — normalizes input-related props that are shared across\n * `<Picker>`, `<Input>` (textual) and `<Range>`. Mutates the props object in place.\n *\n * Normalization is applied recursively: a navi type may resolve to another navi\n * type (e.g. `navi_percentage` → `navi_number` → `text`), and each step applies its\n * own formatters and defaults before moving to the next.\n *\n * Steps applied for each type:\n * 1. Record the original navi type in `props[\"navi-input-type\"]` (first call only).\n * 2. Apply defaults for the current type (min, max, step, and any other props),\n * only when the prop is not already set.\n * 3. Apply min/max formatters (e.g. HH:MM string → number for duration types,\n * Date → formatted string for date/time types).\n * 4. Apply step formatter (same conversion rules).\n * 5. Remap `props.type` to the target type defined by the current type's defaults,\n * then recurse.\n *\n * Supported navi types and their targets:\n * - `navi_percentage` → `navi_number` (0–100, step 1)\n * - `navi_number` → `text` (inputMode=\"numeric\", no spin buttons implied)\n *\n * Standard HTML input types with formatters:\n * - `date`, `month`, `week`, `time`, `datetime-local`, `datetime`:\n * min/max accept `Date` instances or timestamps and are converted to the\n * string format expected by the native input.\n * - `time`, `datetime-local`, `datetime`:\n * step accepts `\"HH:MM\"` and is converted to seconds.\n */\n/**\n * A bound signal that carries a default of its own says the same thing on every\n * control: the control starts there, uncontrolled, and a reset goes back to it.\n * Uncontrolled here is about where the control starts, not about whether it\n * follows the signal — the binding stays two-way either way (see\n * stateFromSignal in control_hooks.jsx) — nor about what a form counts as\n * held: that is the signal's content (isUIStateHeld in held_ui_state.js), and a\n * stateSignal holds its default. Written once and used by everything\n * that takes a `signal`, so one signal cannot mean two different things\n * depending on which control it was handed to.\n */\nexport const seedDefaultValueFromSignal = (props) => {\n const signalOptions = props.signal?.options;\n if (!signalOptions) {\n return;\n }\n if (Object.hasOwn(props, \"defaultValue\")) {\n // explicit defaultValue prop prevails\n return;\n }\n // Snapshot the signal's current default so that resetUIState restores to the\n // original default — not the value the signal had at the time of the last\n // re-render.\n const defaultValue = signalOptions.getDefaultValue(false);\n if (defaultValue !== undefined) {\n props.defaultValue = defaultValue;\n }\n};\n\nexport const resolveInputProps = (props, { controlType = \"input\" } = {}) => {\n // `signal` carries a bound state signal. It is left on `props` on purpose:\n // `createControlInfo` (control_hooks.jsx) reads it to seed the state and to\n // follow it, and `onUIAction` (ui_state_controller.js) writes user\n // interactions back into it. Here we only derive input defaults (type/min/max,\n // defaultValue/defaultChecked) from the signal's `options`, so the control\n // ends up uncontrolled-with-default while still bound to the signal.\n const signal = props.signal;\n if (signal) {\n const signalOptions = signal.options;\n if (signalOptions) {\n for (const key of [\"min\", \"max\", \"step\"]) {\n if (props[key] === undefined && signalOptions[key] !== undefined) {\n props[key] = signalOptions[key];\n }\n }\n if (props.type === undefined && signalOptions.type !== undefined) {\n const typeFromSignal = CONTROL_TYPE_BY_SIGNAL_TYPE[signalOptions.type];\n // A value type and the control for it usually agree — a date-typed\n // signal wants a date field — but a boolean one maps to a checkbox, and\n // a picker made into a checkbox is not a picker with a different look:\n // it is another control, with no popup to open. A picker asked to hold\n // a yes/no keeps its two rows and stays itself.\n const wouldChangeWhatTheControlIs =\n controlType === \"picker\" &&\n (typeFromSignal === \"checkbox\" || typeFromSignal === \"radio\");\n if (typeFromSignal !== undefined && !wouldChangeWhatTheControlIs) {\n props.type = typeFromSignal;\n }\n }\n }\n\n const isCheckable = props.type === \"checkbox\" || props.type === \"radio\";\n if (isCheckable) {\n if (Object.hasOwn(props, \"defaultChecked\")) {\n // explicit defaultChecked prop prevails\n } else {\n // If no explicit defaultChecked, derive it from the signal's default\n // value so that resetUIState restores to the original default.\n // Only a stateSignal carries a default of its own; a plain signal has\n // no `options` at all, hence the optional read.\n const defaultVal = signalOptions?.getDefaultValue(false);\n if (defaultVal === undefined) {\n // no defaultChecked, and no default value from the signal: leave\n } else if (props.type === \"radio\") {\n if (defaultVal === true) {\n props.defaultChecked = true;\n } else if (\n Object.hasOwn(props, \"value\") &&\n defaultVal === props.value\n ) {\n props.defaultChecked = true;\n }\n } else if (typeof defaultVal === \"boolean\") {\n // Standalone checkbox bound to a boolean signal.\n props.defaultChecked = defaultVal;\n } else {\n // Checkbox is a group member: defaultVal is the array of\n // selected item values.\n const checkboxValue = props.value;\n props.defaultChecked =\n Array.isArray(defaultVal) && defaultVal.includes(checkboxValue);\n }\n }\n return;\n }\n\n seedDefaultValueFromSignal(props);\n }\n\n const currentType = props.type;\n // Apply min/max/step formatters before anything else — this must run even for\n // standard HTML types (date, time, etc.) that have no NAVI_TYPE_DEFAULTS entry.\n const currentTypeMinMaxFormatter = MIN_MAX_FORMATTER_BY_TYPE[currentType];\n const currentTypeStepFormatter = STEP_FORMATTER_BY_TYPE[currentType];\n if (currentTypeMinMaxFormatter) {\n props.min = currentTypeMinMaxFormatter(props.min);\n props.max = currentTypeMinMaxFormatter(props.max);\n }\n if (currentTypeStepFormatter) {\n props.step = currentTypeStepFormatter(props.step);\n }\n\n // For navi_number: choose inputMode based on whether step/min/max suggest decimals.\n // inputMode=\"numeric\" (integer keyboard) vs \"decimal\" (keyboard with decimal separator).\n if (currentType === \"navi_number\") {\n if (props.inputMode === undefined) {\n props.inputMode =\n hasDecimalPlaces(props.step) ||\n hasDecimalPlaces(props.min) ||\n hasDecimalPlaces(props.max)\n ? \"decimal\"\n : \"numeric\";\n }\n }\n\n const { charGuard } = props;\n if (charGuard) {\n if (charGuard === true || charGuard === \"auto\") {\n // Auto-resolve charGuard from context.\n let charGuardResolved;\n const inputMode = props.inputMode;\n if (inputMode === \"numeric\") {\n charGuardResolved = \"numeric\";\n } else if (inputMode === \"decimal\") {\n charGuardResolved = \"decimal\";\n } else if (currentType === \"tel\") {\n charGuardResolved = \"tel\";\n } else if (currentType === \"email\") {\n charGuardResolved = \"email\";\n }\n if (charGuardResolved !== undefined) {\n props.charGuard = charGuardResolved;\n }\n }\n // charGuard is now resolved: derive inputMode from it if not already set.\n if (props.inputMode === undefined && props.charGuard) {\n const autoMode = INPUT_MODE_FROM_CHAR_GUARD[props.charGuard];\n if (autoMode) {\n props.inputMode = autoMode;\n }\n }\n // Build pattern from the resolved charGuard (preset name → class, or raw class passthrough).\n if (props.pattern === undefined && props.charGuard) {\n const charClass = CHAR_CLASS_PRESETS[props.charGuard] ?? props.charGuard;\n props.pattern = `${charClass}*`;\n }\n }\n\n // Compute maxLength from max when inputMode is numeric/decimal.\n // Done here (after inputMode is set) so controller.props has the resolved value.\n if (props.maxLength === undefined) {\n if (props.inputMode === \"numeric\") {\n const { min, max } = props;\n if (max === undefined) {\n // cannot infer maxLength without max\n } else {\n const canBeNegative = min === undefined ? max < 0 : min < 0;\n const signCharCount = canBeNegative ? 1 : 0;\n const integerDigitCount = String(Math.floor(Math.abs(max))).length;\n props.maxLength = signCharCount + integerDigitCount;\n }\n } else if (props.inputMode === \"decimal\") {\n const { min, max, step } = props;\n if (max === undefined) {\n // cannot infer maxLength without max\n } else if (step === undefined) {\n // cannot infer maxLength without step: decimal precision is unknown\n } else {\n const canBeNegative = min === undefined ? max < 0 : min < 0;\n const signCharCount = canBeNegative ? 1 : 0;\n const integerDigitCount = String(Math.floor(Math.abs(max))).length;\n const stepStr = String(step);\n const dotIndex = stepStr.indexOf(\".\");\n // integer step + decimal inputMode is an unusual combo, but we stay consistent:\n // no decimal part in maxLength since valid values are whole numbers anyway\n const isIntegerStep = dotIndex === -1;\n const decimalSignCharCount = isIntegerStep ? 0 : 1;\n const decimalDigitCount = isIntegerStep\n ? 0\n : stepStr.length - dotIndex - 1;\n props.maxLength =\n signCharCount +\n integerDigitCount +\n decimalSignCharCount +\n decimalDigitCount;\n }\n }\n }\n\n // Resolve maxLengthGuard boolean/auto → the computed maxLength number.\n if (props.maxLengthGuard === true || props.maxLengthGuard === \"auto\") {\n props.maxLengthGuard =\n typeof props.maxLength === \"number\" ? props.maxLength : undefined;\n }\n\n const currentTypeDefaults = NAVI_TYPE_DEFAULTS[currentType];\n if (!currentTypeDefaults) {\n return;\n }\n\n for (const key of Object.keys(currentTypeDefaults)) {\n if (props[key] === undefined) {\n props[key] = currentTypeDefaults[key];\n }\n }\n const targetType = currentTypeDefaults.type;\n props.type = targetType;\n resolveInputProps(props);\n};\n\n// Presets that imply a specific mobile keyboard inputMode.\nconst INPUT_MODE_FROM_CHAR_GUARD = {\n numeric: \"numeric\",\n pin: \"numeric\",\n card: \"numeric\",\n tel: \"tel\",\n decimal: \"decimal\",\n};\n\nconst normalizeToDate = (value) => {\n if (value === undefined || value === null) {\n return null;\n }\n if (typeof value === \"number\") {\n return new Date(value);\n }\n if (value instanceof Date) {\n return value;\n }\n return null;\n};\n\nconst toInputDate = (value) => {\n const date = normalizeToDate(value);\n if (!date) {\n return value;\n }\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, \"0\");\n const dd = String(date.getDate()).padStart(2, \"0\");\n return `${yyyy}-${mm}-${dd}`;\n};\nconst toInputMonth = (value) => {\n const date = normalizeToDate(value);\n if (!date) {\n return value;\n }\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, \"0\");\n return `${yyyy}-${mm}`;\n};\nconst toInputWeek = (value) => {\n const date = normalizeToDate(value);\n if (!date) {\n return value;\n }\n // ISO week number\n const d = new Date(date);\n d.setHours(0, 0, 0, 0);\n d.setDate(d.getDate() + 3 - ((d.getDay() + 6) % 7));\n const yearStart = new Date(d.getFullYear(), 0, 4);\n const week =\n Math.round(\n ((d - yearStart) / 86400000 - 3 + ((yearStart.getDay() + 6) % 7)) / 7,\n ) + 1;\n return `${d.getFullYear()}-W${String(week).padStart(2, \"0\")}`;\n};\nconst toInputTime = (value) => {\n const date = normalizeToDate(value);\n if (!date) {\n return value;\n }\n const hh = String(date.getHours()).padStart(2, \"0\");\n const mm = String(date.getMinutes()).padStart(2, \"0\");\n return `${hh}:${mm}`;\n};\nconst toInputDatetime = (value) => {\n const date = normalizeToDate(value);\n if (!date) {\n return value;\n }\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, \"0\");\n const dd = String(date.getDate()).padStart(2, \"0\");\n const hh = String(date.getHours()).padStart(2, \"0\");\n const min = String(date.getMinutes()).padStart(2, \"0\");\n return `${yyyy}-${mm}-${dd}T${hh}:${min}`;\n};\n\nconst MIN_MAX_FORMATTER_BY_TYPE = {\n \"date\": toInputDate,\n \"month\": toInputMonth,\n \"week\": toInputWeek,\n \"time\": toInputTime,\n \"datetime-local\": toInputDatetime,\n \"datetime\": toInputDatetime,\n};\nconst STEP_FORMATTER_BY_TYPE = {\n \"time\": timeStringToSeconds,\n \"datetime-local\": timeStringToSeconds,\n \"datetime\": timeStringToSeconds,\n};\n\nconst hasDecimalPlaces = (value) => {\n if (value === undefined || value === null) {\n return false;\n }\n const num = Number(value);\n return !isNaN(num) && !Number.isInteger(num);\n};\n",
|
|
29
|
+
"import { dispatchInternalCustomEvent } from \"@jsenv/dom\";\n\nimport { findControlHost } from \"./control_dom.js\";\n\nexport const dispatchRequestSetUIState = (element, value, detail) => {\n const controlHost = findControlHost(element) || element;\n return dispatchInternalCustomEvent(controlHost, \"navi_set_ui_state\", {\n ...detail,\n value,\n });\n};\nexport const dispatchRequestClearUIState = (element, e) => {\n const controlHost = findControlHost(element) || element;\n return dispatchInternalCustomEvent(controlHost, \"navi_clear_ui_state\", {\n event: e,\n });\n};\nexport const dispatchRequestResetUIState = (element, e) => {\n const controlHost = findControlHost(element) || element;\n return dispatchInternalCustomEvent(controlHost, \"navi_reset_ui_state\", {\n event: e,\n });\n};\n/**\n * @param {Element} el\n * @param {{ own?: boolean }} [options] `own`: what the element holds BY ITSELF.\n * Only a button ever answers differently — one with no value of its own\n * inherits the value of the control around it, which is what makes\n * `--navi-send` on a form's button be about that form. Something asking what\n * THIS element says (a travel command reading what the travel is about) wants\n * the own value and would otherwise be handed the surrounding control's.\n */\nexport const getUIStateFromElement = (el, { own } = {}) => {\n let uiState;\n dispatchInternalCustomEvent(el, \"navi_get_ui_state\", {\n own,\n respondWith: (v) => {\n uiState = v;\n },\n });\n return uiState;\n};\n",
|
|
30
|
+
"import { dispatchCustomEvent } from \"@jsenv/dom\";\n\nimport { isSignal } from \"../utils/is_signal.js\";\nimport { isNumberInput } from \"./input/resolve_input_props.js\";\nimport { getUIStateFromElement } from \"./ui_state_dom.js\";\n\n/**\n * Converts a JS value into the form expected by the browser DOM property for a\n * given control type/input type combination.\n *\n * For example:\n * - `datetime-local` inputs expect a local datetime string without timezone\n * - `number`/`range` inputs expect a numeric string or number\n * - `color` inputs require a non-empty hex string (falls back to `#000000`)\n * - All other inputs receive the value as-is (undefined → \"\")\n *\n * Returns either the converted value directly, or a converter function when the\n * conversion depends on the runtime value (e.g. plain inputs return `asInputValue`).\n *\n * @param {any} value - The JS value to convert.\n * @param {{ controlType: string, type: string }} options\n * @returns {any} The DOM-compatible value or a converter function.\n */\nexport const asControlHostValue = (\n jsValue,\n { controlType, type, naviInputType, pad },\n) => {\n if (controlType === \"select\") {\n // A select holds one of its options, always a string; holding nothing is\n // the empty option, which the element spells \"\".\n return asInputValue(jsValue);\n }\n if (controlType === \"input\" || controlType === \"picker\") {\n if (type === \"datetime-local\") {\n return asDatetimeLocalString(jsValue);\n }\n if (type === \"range\" || isNumberInput(type, naviInputType)) {\n return asNumberString(jsValue, pad);\n }\n if (type === \"color\") {\n return asColorString(jsValue);\n }\n return asInputValue(jsValue);\n }\n return jsValue;\n};\n// As explained in https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/datetime-local#setting_timezones\n// datetime-local does not support timezones\nconst asDatetimeLocalString = (dateTimeString) => {\n const date = new Date(dateTimeString);\n if (isNaN(date.getTime())) {\n return dateTimeString;\n }\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const seconds = String(date.getSeconds()).padStart(2, \"0\");\n return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;\n};\n// `pad` is how many digits the number is WRITTEN on — an hour is held as 7 and\n// shown as \"07\". Held and shown are two things here, the way they are for a\n// datetime-local above: what the field says is derived from what the control\n// holds, and reading it back (readNumberFromInput) gives the number again.\nconst asNumberString = (jsValue, pad) => {\n if (jsValue === undefined) {\n return \"\";\n }\n if (!pad || jsValue === \"\" || jsValue === null) {\n return jsValue;\n }\n const number = Number(jsValue);\n if (Number.isNaN(number)) {\n return jsValue;\n }\n const negative = number < 0;\n const digits = String(negative ? -number : number).padStart(Number(pad), \"0\");\n return negative ? `-${digits}` : digits;\n};\n// Browser requires a non-empty value for <input type=\"color\">.\n// When our logical value is empty we give it #000000 so it doesn't choke.\n// The UI uses the original (possibly empty) value to show the checkerboard.\nconst asColorString = (jsValue) => {\n return jsValue || \"#000000\";\n};\nconst asInputValue = (jsValue) => {\n if (jsValue === undefined) {\n return \"\";\n }\n return jsValue;\n};\n\n/**\n * Reads the current logical JS value from a control host DOM element.\n *\n * Handles all navi control host element types:\n * - `<button>` — reads via `navi_get_value` custom event, falls back to `button.value`\n * - `<input type=\"number|range\">` — parses as a number, returns `undefined` when empty\n * - `<input type=\"checkbox|radio\">` — returns `undefined` when unchecked, otherwise reads\n * via `navi_get_value` custom event (to preserve the original JS type of the value prop)\n * - `<input type=\"datetime-local\">` — converts the local datetime string to an ISO 8601 string\n * - `<input type=\"navi_picker\">` — delegates to the controller via `navi_get_ui_state`\n * - All other inputs — returns `input.value` as a string\n *\n * @param {HTMLElement} controlHost - The control host DOM element to read from.\n * @returns {any} The current logical value of the control.\n */\nexport const readControlValue = (controlHost) => {\n if (\n controlHost.tagName === \"BUTTON\" ||\n controlHost.getAttribute(\"role\") === \"button\"\n ) {\n return readValueFromButton(controlHost);\n }\n if (controlHost.tagName === \"INPUT\") {\n // important: input.type = \"navi_js\"; followed by input.type; returns \"text\"\n // so use getAttribute\n const type = controlHost.getAttribute(\"type\");\n\n if (\n type === \"range\" ||\n isNumberInput(type, controlHost.getAttribute(\"navi-input-type\"))\n ) {\n return readNumberFromInput(controlHost);\n }\n if (type === \"color\") {\n return readValueFromControlHost(controlHost);\n }\n if (type === \"checkbox\" || type === \"radio\") {\n return readValueFromCheckableInput(controlHost);\n }\n if (type === \"datetime-local\") {\n return readDatetimeLocalFromInput(controlHost);\n }\n if (type === \"navi_js\") {\n return getUIStateFromElement(controlHost);\n }\n return readValueFromInput(controlHost);\n }\n if (controlHost.hasAttribute(\"navi-control-host\")) {\n // Non-button, non-input navi controls (e.g. Badge.Button rendered as span)\n return readValueFromControlHost(controlHost);\n }\n return readValueFromElement(controlHost);\n};\nconst readValueFromControlHost = (controlHost) => {\n return readValueFromNaviCustomEvent(controlHost, controlHost.value);\n};\nconst readValueFromButton = (button) => {\n return readValueFromControlHost(button);\n};\nconst readDatetimeLocalFromInput = (input) => {\n const localDateTimeString = input.value;\n if (localDateTimeString === \"\") {\n return \"\";\n }\n const localDate = new Date(localDateTimeString);\n if (isNaN(localDate.getTime())) {\n return localDateTimeString;\n }\n return localDate.toISOString();\n};\nconst readNumberFromInput = (input) => {\n const numberString = input.value;\n if (numberString === \"\") {\n return \"\";\n }\n const asNumber = Number(numberString);\n if (isNaN(asNumber)) {\n return numberString;\n }\n return asNumber;\n};\nconst readValueFromCheckableInput = (input) => {\n const checked = input.checked;\n if (!checked) {\n return undefined;\n }\n return readValueFromControlHost(input);\n};\nconst readValueFromInput = (input) => {\n const value = input.value;\n return value;\n};\nconst readValueFromElement = (element) => {\n const value = element.value;\n return value;\n};\nconst readValueFromNaviCustomEvent = (field, fallback) => {\n // prefer the value given as prop (respect original type, browser would convert to string)\n let responded;\n let value;\n dispatchCustomEvent(field, \"navi_get_value\", {\n respondWith: (jsValue) => {\n responded = true;\n value = jsValue;\n },\n });\n if (responded) {\n return value;\n }\n return fallback;\n};\n\n/**\n * A control is bound to EITHER a signal (two-way) or a value/checked prop,\n * never both — the two would fight over the state. The signal is the one that\n * wins; this says so in dev, wherever the question is decided (a leaf control\n * in control_hooks, a group in ui_state_controller).\n *\n * Only the controlled prop (value/checked) collides with signal — the default\n * prop (defaultValue/defaultChecked) is legitimately seeded from the signal by\n * resolveInputProps, so it must not warn here.\n */\nexport const warnSignalCollision = (props, controlType, stateProp) => {\n if (!import.meta.dev) {\n return;\n }\n if (Object.hasOwn(props, stateProp)) {\n console.warn(\n `[navi] \"${controlType}\" got both \"signal\" and \"${stateProp}\". ` +\n `\"signal\" is the source of truth; \"${stateProp}\" is ignored. ` +\n `Pass only \"signal\".`,\n );\n }\n};\n\n/**\n * A signal handed to a prop that holds a plain value is the `signal` binding\n * written in the wrong place. Nothing throws: the signal object becomes the\n * value, and a value that cannot be written to the DOM is replaced by a\n * `window.__navi_js('…')` reference string — which is then what the field\n * shows on screen (see toDomValue in controller_registry.js).\n */\nexport const warnSignalAsState = (props, controlType, stateProps) => {\n if (!import.meta.dev) {\n return;\n }\n for (const stateProp of stateProps) {\n if (isSignal(props[stateProp])) {\n console.warn(\n `[navi] \"${controlType}\" got a signal as \"${stateProp}\". ` +\n `A signal binds a control through \"signal\" — did you mean signal={...}? ` +\n `As \"${stateProp}\" it is taken for the value itself.`,\n );\n }\n }\n};\n",
|
|
31
|
+
"import { asControlHostValue } from \"./control_value.js\";\n\n// In-memory registry of all mounted ui state controllers keyed by their id.\n// Allows direct controller access without dispatching DOM events — used by external\n// callers (e.g. selectable_list) to call setUIState by id instead of via the DOM.\nconst controllersById = new Map();\n\n// In-memory registry for radio controllers, keyed by input name.\n// Allows radio sibling unchecking without querying the DOM — necessary when\n// items are virtualized and their DOM element may not exist at the time.\n// Form scoping is reproduced by comparing parentUIStateController references.\nconst radioControllersByName = new Map();\n\n// Registry for non-serializable JS values that cannot be written to DOM attributes as-is.\n// When a value is an object/array, we store it here and write a reference string to the DOM\n// instead of \"[object Object]\". Console-inspectable via window.__navi_js('id').\n// The controller id is used as key — if the controller has no id, the value is not registered.\nconst naviJsRegistry = new Map();\n\n// Controllers already reported for sharing their id with another one. An id is\n// stated on every render of its control, so without this the warning below\n// would repeat for as long as both controls are on screen.\nconst controllersWarned = new WeakSet();\n\nexport const getUIStateControllerById = (id) => controllersById.get(id);\nexport const getRadioSiblings = (radioUIStateController) => {\n const siblings = radioControllersByName.get(radioUIStateController.name);\n return siblings;\n};\n\nexport const toDomValue = (\n jsValue,\n { controlType, id, type, naviInputType, pad },\n) => {\n const domValue = asControlHostValue(jsValue, {\n controlType,\n type,\n naviInputType,\n pad,\n });\n if (isSerializableAsDomValue(domValue)) {\n return domValue;\n }\n naviJsRegistry.set(id, domValue);\n return `window.__navi_js('${id}')`;\n};\n\nwindow.__navi_js = (id) => naviJsRegistry.get(id);\nconst isSerializableAsDomValue = (value) => {\n if (value === null || value === undefined) {\n return true;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n};\n\nexport const onUIStateControllerCreated = (uiStateController) => {\n const { id, name, controlType } = uiStateController;\n if (id) {\n if (import.meta.dev) {\n const existing = controllersById.get(id);\n if (\n existing &&\n existing !== uiStateController &&\n !controllersWarned.has(uiStateController)\n ) {\n controllersWarned.add(uiStateController);\n console.warn(\n `[navi] Two controls share the same id \"${id}\" (\"${existing.controlType}\" and \"${controlType}\"). ` +\n `The id resolves to whichever of them rendered last, so the other one is unreachable through it (undefined uiState, dead picker buttons). ` +\n `Common causes: several controls inside a single <Field> (the Field provides one id via context and every control consumes it — put each control in its own <Field>, or give one an explicit id), ` +\n `or the same content mounted twice (e.g. two popups sharing an id prefix while both hold their content).`,\n );\n }\n }\n controllersById.set(id, uiStateController);\n }\n const proxyFor = uiStateController.props[\"navi-control-proxy-for\"];\n if (proxyFor) {\n let proxySet = proxyControllersByRealInputId.get(proxyFor);\n if (!proxySet) {\n proxySet = new Set();\n proxyControllersByRealInputId.set(proxyFor, proxySet);\n }\n proxySet.add(uiStateController);\n }\n if (\n controlType === \"input\" &&\n uiStateController.props.type === \"radio\" &&\n name\n ) {\n let set = radioControllersByName.get(name);\n if (!set) {\n set = new Set();\n radioControllersByName.set(name, set);\n }\n set.add(uiStateController);\n }\n};\nexport const onUIStateControllerDestroyed = (uiStateController) => {\n const { id, name, controlType } = uiStateController;\n if (id) {\n // Only the controller the id currently points at may take the entry away:\n // when two controls share an id, the one leaving would otherwise unregister\n // the one staying (see the warning in onUIStateControllerCreated), and the\n // same holds while a control is being replaced by its successor, which\n // registers during its render, before this cleanup runs.\n if (controllersById.get(id) === uiStateController) {\n controllersById.delete(id);\n naviJsRegistry.delete(id);\n }\n }\n const proxyFor = uiStateController.props[\"navi-control-proxy-for\"];\n if (proxyFor) {\n const proxySet = proxyControllersByRealInputId.get(proxyFor);\n if (proxySet) {\n proxySet.delete(uiStateController);\n if (proxySet.size === 0) {\n proxyControllersByRealInputId.delete(proxyFor);\n }\n }\n }\n if (\n controlType === \"input\" &&\n uiStateController.controlHostProps.type === \"radio\" &&\n name\n ) {\n const set = radioControllersByName.get(name);\n if (set) {\n set.delete(uiStateController);\n if (set.size === 0) {\n radioControllersByName.delete(name);\n }\n }\n }\n};\n\n/**\n * Controller-based equivalent of findControlProxyTarget.\n * Given a proxy controller, returns the real control's controller.\n * Finds the target by walking the parent controller's children — no DOM queries.\n * Returns `null` when the controller is not a proxy or the target is not found.\n */\nexport const findControlProxyTargetController = (controller) => {\n const proxyFor = controller.controlHostProps[\"navi-control-proxy-for\"];\n if (!proxyFor) {\n return null;\n }\n return getUIStateControllerById(proxyFor) ?? null;\n};\n\n// Reverse-lookup map: real-input id → the proxy controllers that reference it\n// via `navi-control-proxy-for`. A single control can be represented by several\n// proxies (an \"enable\"/\"disable\" button pair for one radio, for instance), so\n// each id holds a set. Maintained on create/destroy so lookup is O(1).\nconst proxyControllersByRealInputId = new Map();\nexport const findProxyControllers = (realInputId) => {\n if (!realInputId) {\n return null;\n }\n return proxyControllersByRealInputId.get(realInputId) ?? null;\n};\n",
|
|
32
|
+
"/**\n * DOM utilities for the proxy control pattern.\n *\n * Some components need a native `<input>` internally — for form submission,\n * constraint validation, or browser autofill — but the user may not want to\n * display that input at all. In those cases the input is hidden and a separate\n * visible element (the proxy) takes over the visual and interactive role.\n *\n * The typical use case is `SelectableList`: each list item acts as a styled\n * radio button, but an actual `<input type=\"radio\">` lives hidden in the DOM\n * so form submission and validation work natively. When users DO want to\n * display the input they want full control over its appearance, so they render\n * their own element and link it to the real input via `navi-control-proxy-for`:\n *\n * ```html\n * <div>\n * <input id=\"color_red\" type=\"radio\" name=\"color\" value=\"red\" /> ← real control (hidden, drives form/validation)\n * <input type=\"radio\" name=\"proxy\" value=\"red\" /> ← proxy (visible, delegates interactions to real input)\n * </div>\n * ```\n *\n * A press on a checkable proxy is dealt to the real control, and so is the\n * focus: state management, validation and form submission then all happen\n * where the value lives. A proxy that says what its press does — a button\n * carrying `command=\"--navi-check\"` — answers the press itself instead.\n *\n * Note: an alternative design would be to require users to always instantiate\n * the input explicitly — e.g. `<Selectable.Input headless />` when they don't\n * want to display it. That would remove the need for the proxy mechanism\n * entirely. For now we keep the proxy pattern.\n */\n\nimport { findProxyControllers } from \"./controller_registry.js\";\n\n/**\n * Given a proxy element, returns the real control it represents.\n * Returns `null` when `el` is not a proxy.\n */\nexport const findControlProxyTarget = (el) => {\n const proxyFor = el.getAttribute(\"navi-control-proxy-for\");\n if (!proxyFor) {\n return null;\n }\n return document.getElementById(proxyFor);\n};\n\n// Shared: asked on every pseudo state change of every box, and almost always\n// empty.\nconst NO_PROXIES = Object.freeze([]);\n/**\n * Given a real control element, returns every proxy that visually represents\n * it — a control can have more than one (an \"enable\"/\"disable\" button pair for\n * one radio, for instance).\n *\n * Answered from the controller registry rather than the document: every proxy\n * declares itself through the `navi-control-proxy-for` prop, so the registry\n * knows them all, while asking the document means walking it in full for each\n * of the (overwhelmingly many) controls that have no proxy at all.\n *\n * Returns an empty array when no proxy exists for `el`.\n */\nexport const findControlProxies = (el) => {\n if (!el.id) {\n return NO_PROXIES;\n }\n const proxyControllerSet = findProxyControllers(el.id);\n if (!proxyControllerSet) {\n return NO_PROXIES;\n }\n const proxyElements = [];\n for (const proxyController of proxyControllerSet) {\n const proxyElement = proxyController.ref.current;\n if (proxyElement) {\n proxyElements.push(proxyElement);\n }\n }\n return proxyElements;\n};\n\n/**\n * Given a real control element, returns the proxy a gesture on the control\n * lands on — the one thing said about the control is drawn on.\n *\n * Use when you need a single visible stand-in for the real control — anchoring\n * a callout, for instance. Anything notifying proxies of a state change wants\n * `findControlProxies` instead, so a control represented by several of them\n * updates all of them.\n *\n * A proxy the pointer cannot reach is drawn for the control without standing\n * for it: the surface around it takes the presses for everything it holds, so\n * that surface is where a refusal about the control belongs — not a box inside\n * it the finger never has to find. A selectable list row whose whole area is\n * the click target is exactly that arrangement (see `selectableArea`), and it\n * is read from the arrangement itself rather than from a flag repeating it:\n * where a gesture can land IS pointer-events.\n *\n * Returns `null` when no proxy stands for `el`.\n */\nexport const findControlProxy = (el) => {\n for (const proxyElement of findControlProxies(el)) {\n if (getComputedStyle(proxyElement).pointerEvents === \"none\") {\n continue;\n }\n return proxyElement;\n }\n return null;\n};\n",
|
|
33
|
+
"import { createPubSub, findEvent } from \"@jsenv/dom\";\n\nexport const addInputEffect = (\n input,\n callback,\n { waitForChange = false, debounce = 0, debugInteraction = () => {} } = {},\n) => {\n const getState =\n input.type === \"checkbox\" || input.type === \"radio\"\n ? () => input.checked\n : () => input.value;\n\n if (waitForChange) {\n return listenInputStateChange(input, callback, { getState });\n }\n\n const [teardown, addTeardown] = createPubSub();\n let currentState = getState();\n let timeout;\n let debounceTimeout;\n let onEvent;\n if (debounce) {\n onEvent = (e, { skipDebounce } = {}) => {\n clearTimeout(timeout);\n clearTimeout(debounceTimeout);\n const state = getState();\n if (state === currentState) {\n debugInteraction(\n e,\n `interaction ignored (state unchanged: \"${state}\")`,\n );\n return;\n }\n\n if (skipDebounce) {\n debugInteraction(e, `skip debounce, callback called with \"${state}\"`);\n if (callback(e) !== false) {\n currentState = state;\n }\n } else {\n debugInteraction(\n e,\n `debounced ${debounce}ms, pending callback with \"${state}\"`,\n );\n debounceTimeout = setTimeout(() => {\n debugInteraction(\n e,\n `debounce elapsed, callback called with \"${state}\"`,\n );\n if (callback(e) !== false) {\n currentState = state;\n }\n }, debounce);\n }\n };\n // no need to wait for change events (blur, enter key)\n // we consider this as strong interactions requesting an immediate response\n const stop = listenInputStateChange(\n input,\n (e) => {\n onEvent(e, { skipDebounce: true });\n },\n { getState, changeOnEnter: true },\n );\n addTeardown(() => {\n stop();\n });\n } else {\n onEvent = (e) => {\n clearTimeout(timeout);\n const state = getState();\n if (state === currentState) {\n debugInteraction(\n e,\n `interaction ignored (state unchanged: \"${state}\")`,\n );\n return;\n }\n debugInteraction(e, `callback called with \"${state}\"`);\n if (callback(e) !== false) {\n currentState = state;\n }\n };\n // Autocomplete, programmatic changes, form restoration\n input.addEventListener(\"change\", onEvent);\n addTeardown(() => {\n input.removeEventListener(\"change\", onEvent);\n });\n }\n\n const onAsyncEvent = (e, options) => {\n debugInteraction(e, `async event, scheduling callback`);\n timeout = setTimeout(() => {\n onEvent(e, options);\n }, 0);\n };\n\n // Standard user input (typing)\n const onInput = (e) => {\n onEvent(e);\n };\n input.addEventListener(\"input\", onInput);\n addTeardown(() => {\n input.removeEventListener(\"input\", onInput);\n });\n\n // Form reset - need to check the form\n const form = input.form;\n if (form) {\n // Form reset happens asynchronously, check value after reset completes\n form.addEventListener(\"reset\", onAsyncEvent);\n addTeardown(() => {\n form.removeEventListener(\"reset\", onAsyncEvent);\n });\n }\n\n // Paste events (some browsers need special handling)\n input.addEventListener(\"paste\", onEvent);\n addTeardown(() => {\n input.removeEventListener(\"paste\", onEvent);\n });\n\n input.addEventListener(\"navi_ui_state_change\", (e) => {\n // radios are unchecked by an internal setUIState call when another radio is checked.\n // navi_ui_state_change is dispatched whenever setUIState changes state, so we\n // listen here to keep currentState in sync — otherwise input_effect thinks the\n // radio is still checked and ignores the next user click as \"state unchanged\".\n if (input.type === \"radio\") {\n currentState = e.detail.value;\n }\n const clearEvent = findEvent(\n e,\n (eInChain) =>\n eInChain.type === \"navi_set_ui_state\" && eInChain.detail.isClear,\n );\n const isClear = Boolean(clearEvent);\n if (isClear) {\n // \"navi_clear\" behaves like an async event\n // a bit like form reset because\n // our action will be updated async after the component re-renders\n // and we need to wait that to happen to properly call action with the right value\n debugInteraction(e, `navi_clear received, scheduling callback`);\n onAsyncEvent(e, { skipDebounce: true });\n }\n });\n\n return teardown;\n};\n\nconst listenInputStateChange = (\n input,\n callback,\n { getState, changeOnEnter },\n) => {\n const [teardown, addTeardown] = createPubSub();\n\n let stateAtInteraction;\n const oninput = () => {\n stateAtInteraction = undefined;\n };\n const onkeydown = (e) => {\n if (e.key === \"Enter\") {\n /**\n * Browser trigger a \"change\" event right after the enter is pressed\n * if the input value has changed.\n * We need to prevent the next change event otherwise we would request action twice\n */\n stateAtInteraction = getState();\n if (changeOnEnter) {\n onchange(e);\n }\n }\n if (e.key === \"Escape\") {\n /**\n * Browser trigger a \"change\" event right after the escape is pressed\n * if the input value has changed.\n * We need to prevent the next change event otherwise we would request action when\n * we actually want to cancel\n */\n stateAtInteraction = getState();\n }\n };\n const onchange = (e) => {\n if (stateAtInteraction !== undefined && getState() === stateAtInteraction) {\n stateAtInteraction = undefined;\n return;\n }\n callback(e);\n };\n input.addEventListener(\"input\", oninput);\n input.addEventListener(\"keydown\", onkeydown);\n input.addEventListener(\"change\", onchange);\n addTeardown(() => {\n input.removeEventListener(\"input\", oninput);\n input.removeEventListener(\"keydown\", onkeydown);\n input.removeEventListener(\"change\", onchange);\n });\n\n programmatic_change: {\n // Handle programmatic value changes that don't trigger browser change events\n //\n // Problem: When input values are set programmatically (not by user typing),\n // browsers don't fire the 'change' event. However, our application logic\n // still needs to detect these changes.\n //\n // Example scenario:\n // 1. User starts editing (letter key pressed, value set programmatically)\n // 2. User doesn't type anything additional (this is the key part)\n // 3. User clicks outside to finish editing\n // 4. Without this code, no change event would fire despite the fact that the input value did change from its original state\n //\n // This distinction is crucial because:\n //\n // - If the user typed additional text after the initial programmatic value,\n // the browser would fire change events normally\n // - But when they don't type anything else, the browser considers it as \"no user interaction\"\n // even though the programmatic initial value represents a meaningful change\n //\n // We achieve this by checking if the input value has changed between focus and blur without any user interaction\n // if yes we fire the callback because input value did change\n let stateAtStart = getState();\n let interacted = false;\n\n const onfocus = () => {\n interacted = false;\n stateAtStart = getState();\n };\n const oninput = (e) => {\n if (!e.isTrusted) {\n // non trusted \"input\" events will be ignored by the browser when deciding to fire \"change\" event\n // we ignore them too\n return;\n }\n interacted = true;\n };\n const onblur = (e) => {\n if (interacted) {\n return;\n }\n if (stateAtStart === getState()) {\n return;\n }\n callback(e);\n };\n\n input.addEventListener(\"focus\", onfocus);\n input.addEventListener(\"input\", oninput);\n input.addEventListener(\"blur\", onblur);\n addTeardown(() => {\n input.removeEventListener(\"focus\", onfocus);\n input.removeEventListener(\"input\", oninput);\n input.removeEventListener(\"blur\", onblur);\n });\n }\n\n return teardown;\n};\n",
|
|
34
|
+
"import {\n createPubSub,\n dispatchInternalCustomEvent,\n mergeOneStyle,\n} from \"@jsenv/dom\";\n\nimport { findControlHost, isControlHost } from \"../control/control_dom.js\";\nimport {\n findControlProxies,\n findControlProxyTarget,\n} from \"../control/control_proxy.js\";\nimport { addInputEffect } from \"../control/input_effect.js\";\nimport { getUIStateFromElement } from \"../control/ui_state_dom.js\";\n\nconst requestPseudoStateCheck = (element, detail) => {\n dispatchInternalCustomEvent(\n element,\n \"navi_pseudo_state_request_check\",\n detail,\n );\n // When a control has visible proxies mirroring its state (e.g. selectable\n // radio with `navi-control-proxy-for`), re-check them too so they stay in\n // sync with the real control.\n for (const proxy of findControlProxies(element)) {\n dispatchInternalCustomEvent(\n proxy,\n \"navi_pseudo_state_request_check\",\n detail,\n );\n }\n};\n/**\n * Called back whenever `element`'s pseudo state changes.\n *\n * Kept beside the element rather than announced to the DOM: an element that\n * changes state has at most one or two interested parties, each known by name\n * (the box drawing it, the accent color reading its computed style), and a\n * CustomEvent costs its allocation and its capture/bubble walk whether anyone\n * listens or not — paid on every element, on every state change. A lookup that\n * finds nothing costs nothing.\n *\n * @param {Element} element\n * @param {(pseudoState: object, oldPseudoState: object) => void} callback\n * @returns {() => void} teardown\n */\nexport const subscribeToPseudoState = (element, callback) => {\n let subscriberSet = pseudoStateSubscriberSetWeakMap.get(element);\n if (!subscriberSet) {\n subscriberSet = new Set();\n pseudoStateSubscriberSetWeakMap.set(element, subscriberSet);\n }\n subscriberSet.add(callback);\n return () => {\n subscriberSet.delete(callback);\n };\n};\nconst pseudoStateSubscriberSetWeakMap = new WeakMap();\nconst notifyPseudoStateSubscribers = (element, value, oldValue) => {\n const subscriberSet = pseudoStateSubscriberSetWeakMap.get(element);\n if (!subscriberSet) {\n return;\n }\n for (const subscriber of subscriberSet) {\n subscriber(value, oldValue);\n }\n};\n\nexport const PSEUDO_CLASSES = {};\nObject.assign(PSEUDO_CLASSES, {\n \":valid\": {\n attribute: \"data-valid\",\n test: (el) => el.matches(\":valid\"),\n },\n \":invalid\": {\n attribute: \"data-invalid\",\n test: (el) => el.matches(\":invalid\"),\n },\n \":visited\": {\n attribute: \"data-visited\",\n },\n // Written by whoever knows the current url — a Link from its href, a Button\n // from its route — so it lives here rather than with one of them.\n \":-navi-href-current\": {\n attribute: \"data-href-current\",\n },\n});\nconst definePseudoClass = (pseudoClass, definition) => {\n PSEUDO_CLASSES[pseudoClass] = definition;\n};\n\n// On touch devices (hover: none), browsers synthesize mouseenter/mouseleave\n// from touch events but never fire mouseleave when the finger lifts, leaving\n// el.matches(\":hover\") stuck at true. This causes hover styles (e.g. input\n// background highlight) to remain visible long after the user has stopped\n// touching the element. Checking (hover: hover) lets us skip hover tracking\n// entirely on touch-only devices where persistent hover makes no sense.\nconst hoverSupported = window.matchMedia(\"(hover: hover)\").matches;\ndefinePseudoClass(\":hover\", {\n attribute: \"data-hover\",\n setup: (el, callback) => {\n if (!hoverSupported) {\n return () => {};\n }\n const recheckProxy = (e) => {\n for (const proxy of findControlProxies(el)) {\n requestPseudoStateCheck(proxy, { event: e });\n }\n };\n const recheckProxyTarget = (e) => {\n const proxyTarget = findControlProxyTarget(el);\n if (proxyTarget) {\n requestPseudoStateCheck(proxyTarget, { event: e });\n }\n };\n let onmouseenter = (e) => {\n callback();\n recheckProxy(e);\n recheckProxyTarget(e);\n };\n let onmouseleave = (e) => {\n callback();\n recheckProxy(e);\n recheckProxyTarget(e);\n };\n\n if (el.tagName === \"LABEL\") {\n // input.matches(\":hover\") is true when hovering the label\n // so when label is hovered/not hovered we need to recheck the input too\n const recheckInput = (e) => {\n if (el.htmlFor) {\n const input = document.getElementById(el.htmlFor);\n if (!input) {\n // cannot find the input for this label in the DOM\n return;\n }\n requestPseudoStateCheck(input, { event: e });\n return;\n }\n const input = el.querySelector(\"input, textarea, select\");\n if (!input) {\n // label does not contain an input\n return;\n }\n requestPseudoStateCheck(input, { event: e });\n };\n const _onmouseenter = onmouseenter;\n onmouseenter = (e) => {\n recheckInput(e);\n _onmouseenter(e);\n };\n const _onmouseleave = onmouseleave;\n onmouseleave = (e) => {\n recheckInput(e);\n _onmouseleave(e);\n };\n }\n\n el.addEventListener(\"mouseenter\", onmouseenter);\n el.addEventListener(\"mouseleave\", onmouseleave);\n return () => {\n el.removeEventListener(\"mouseenter\", onmouseenter);\n el.removeEventListener(\"mouseleave\", onmouseleave);\n };\n },\n test: (el) => {\n if (!hoverSupported) {\n return false;\n }\n if (el.matches(\":hover\")) {\n return true;\n }\n for (const proxy of findControlProxies(el)) {\n if (proxy.matches(\":hover\")) {\n return true;\n }\n }\n return false;\n },\n});\ndefinePseudoClass(\":disabled\", {\n attribute: \"data-disabled\",\n add: (el) => {\n if (\n el.tagName === \"BUTTON\" ||\n el.tagName === \"INPUT\" ||\n el.tagName === \"SELECT\" ||\n el.tagName === \"TEXTAREA\"\n ) {\n el.disabled = true;\n }\n },\n remove: (el) => {\n if (\n el.tagName === \"BUTTON\" ||\n el.tagName === \"INPUT\" ||\n el.tagName === \"SELECT\" ||\n el.tagName === \"TEXTAREA\"\n ) {\n el.disabled = false;\n }\n },\n});\ndefinePseudoClass(\":read-only\", {\n attribute: \"data-readonly\",\n add: (el) => {\n if (\n el.tagName === \"INPUT\" ||\n el.tagName === \"SELECT\" ||\n el.tagName === \"TEXTAREA\"\n ) {\n if (el.type === \"checkbox\" || el.type === \"radio\") {\n // there is no readOnly for checkboxes/radios\n return;\n }\n // el.readOnly = true;\n }\n },\n remove: (el) => {\n if (\n el.tagName === \"INPUT\" ||\n el.tagName === \"SELECT\" ||\n el.tagName === \"TEXTAREA\"\n ) {\n if (el.type === \"checkbox\" || el.type === \"radio\") {\n // there is no readOnly for checkboxes/radios\n return;\n }\n // el.readOnly = false;\n }\n },\n});\ndefinePseudoClass(\":checked\", {\n attribute: \"data-checked\",\n setup: (el, callback) => {\n if (el.type === \"checkbox\") {\n // Listen to user interactions\n el.addEventListener(\"input\", callback);\n // Intercept programmatic changes to .checked property\n const originalDescriptor = Object.getOwnPropertyDescriptor(\n HTMLInputElement.prototype,\n \"checked\",\n );\n Object.defineProperty(el, \"checked\", {\n get: originalDescriptor.get,\n set(value) {\n originalDescriptor.set.call(this, value);\n callback();\n },\n configurable: true,\n });\n return () => {\n // Restore original property descriptor\n Object.defineProperty(el, \"checked\", originalDescriptor);\n el.removeEventListener(\"input\", callback);\n };\n }\n if (el.type === \"radio\") {\n // Listen to changes on the radio\n el.addEventListener(\"input\", callback);\n // Intercept programmatic changes to .checked property\n const originalDescriptor = Object.getOwnPropertyDescriptor(\n HTMLInputElement.prototype,\n \"checked\",\n );\n Object.defineProperty(el, \"checked\", {\n get: originalDescriptor.get,\n set(value) {\n originalDescriptor.set.call(this, value);\n callback();\n },\n configurable: true,\n });\n return () => {\n el.removeEventListener(\"input\", callback);\n // Restore original property descriptor\n Object.defineProperty(el, \"checked\", originalDescriptor);\n };\n }\n if (el.tagName === \"INPUT\") {\n el.addEventListener(\"input\", callback);\n return () => {\n el.removeEventListener(\"input\", callback);\n };\n }\n return () => {};\n },\n test: (el) => el.matches(\":checked\"),\n});\ndefinePseudoClass(\":active\", {\n attribute: \"data-active\",\n setup: (el, callback) => {\n // I'ts recommended to use :-navi-pressed over :active for interactive elements.\n const onPointerDown = () => {\n const onRelease = () => {\n document.removeEventListener(\"pointercancel\", onRelease, true);\n document.removeEventListener(\"pointerup\", onRelease, true);\n callback();\n };\n document.addEventListener(\"pointercancel\", onRelease, true);\n document.addEventListener(\"pointerup\", onRelease, true);\n callback();\n };\n el.addEventListener(\"pointerdown\", onPointerDown);\n return () => {\n el.removeEventListener(\"pointerdown\", onPointerDown);\n };\n },\n test: (el) => el.matches(\":active\"),\n});\n\n// The current input modality: true after a keyboard navigation key (arrow keys,\n// Escape, Enter, Ctrl, Alt, Shift, Space — Space ignored on editable fields),\n// false after a pointer interaction. Updated by the listeners in the\n// focus_classes block below. At module scope so isMatchingFocusVisible (used\n// here and in control_hooks.jsx) can read it.\nlet keyboardNavigationUsed = false;\n\n// HOW FOCUS-VISIBLE IS DECIDED (the details behind isMatchingFocusVisible)\n//\n// Two rules, depending on what `el` is:\n//\n// 1. An EDITABLE target (text-ish input, textarea, contenteditable — anything\n// whose whole point is keyboard input, see isEditableTarget) shows its ring\n// whenever it holds the focus, however the focus arrived — mouse,\n// programmatic, even a focus({ focusVisible: false }). Being focused, for\n// such a field, means being about to type, and that is what the ring\n// announces. Its check is on :focus rather than :focus-visible on purpose:\n// the native :focus-visible obeys the focusVisible option, which callers\n// set from the modality without knowing what they are focusing.\n//\n// 2. Anything else needs BOTH the native :focus-visible match AND the current\n// modality being keyboard (`keyboardNavigationUsed`).\n//\n// The native match alone cannot be trusted, because we routinely take the\n// pointer out of the browser's hands: a picker opens on mousedown and calls\n// preventDefault() so the browser does not move focus itself (see\n// picker_custom.jsx). The browser therefore never registers that a pointer\n// was what moved focus, and whatever focus-visible state the previous\n// keyboard interaction left behind stays true — even across the\n// programmatic focus({ focusVisible: false }) that follows. Close a picker\n// with Escape (ring on the trigger, rightly) and click it open again: the\n// popup's own focusable would come up ringed, from a mouse press.\n//\n// `keyboardNavigationUsed` has no such blind spot — it is set by navigation\n// keydowns and cleared by pointerdown, whatever anyone prevents afterwards\n// — so it is the authority for everything rule 1 does not cover.\n//\n// Ring INHERITANCE (a controlled element ringing because its aria-controls\n// controller is focused) stays gated on the keyboard modality even for an\n// editable controller — see hasIndirectFocus: propagating a ring promises\n// keyboard shortcuts will drive the controlled element, a promise that only\n// holds once a physical keyboard has actually been used.\n/**\n * Whether `el` should currently show a focus ring — the enriched\n * :focus-visible behind every [data-focus-visible] navi renders.\n * Use this instead of a bare el.matches(\":focus-visible\") wherever\n * focus-visible is evaluated; the comment above details the rules.\n * @param {Element} el\n * @returns {boolean}\n */\nexport const isMatchingFocusVisible = (el) => {\n if (isEditableTarget(el)) {\n return el.matches(\":focus\");\n }\n if (!el.matches(\":focus-visible\")) {\n return false;\n }\n if (!keyboardNavigationUsed) {\n return false;\n }\n return true;\n};\n\n// Elements that invite keyboard input: focusing one — even with the mouse —\n// means the user is about to type, so they always warrant a visible focus.\n// Also used to ignore the Space key as a navigation key while typing, and by\n// programmatic focus (focus_transfer.js) to pass focusVisible: true so the\n// native :focus-visible agrees with the ring rule 1 above draws.\nconst EDITABLE_INPUT_TYPE_SET = new Set([\n \"text\",\n \"search\",\n \"url\",\n \"email\",\n \"password\",\n \"tel\",\n \"number\",\n \"date\",\n \"time\",\n \"datetime-local\",\n \"month\",\n \"week\",\n]);\nexport const isEditableTarget = (target) => {\n if (!target) {\n return false;\n }\n const tag = target.tagName;\n if (tag === \"TEXTAREA\") {\n return !target.readOnly;\n }\n if (tag === \"INPUT\") {\n if (!target.type || EDITABLE_INPUT_TYPE_SET.has(target.type)) {\n return !target.readOnly;\n }\n }\n if (target.isContentEditable) {\n return true;\n }\n return false;\n};\n\n// The current modality, for code deciding whether something it is about to\n// focus should show a ring — a slide arriving, a popup opening. The question is\n// \"was the user on the keyboard when this was asked for\", which is what this\n// flag says; the element that happens to hold the focus right now says nothing\n// about it (it may have been focused programmatically, ring or no ring, by the\n// travel before this one).\nexport const isKeyboardModality = () => keyboardNavigationUsed;\n\nfocus_classes: {\n // We implement :focus and :focus-visible with enriched semantics:\n // an element is considered focused not only when it natively has focus, but also\n // when a \"focus proxy\" element has focus (e.g. a read-only range input delegates\n // focus to a sibling span) or when a controlling element has focus (e.g. a combobox\n // input with aria-controls pointing to a listbox — the listbox should appear focused\n // while the input is focused).\n //\n // We intentionally reuse the native :focus / :focus-visible names rather than\n // introducing new navi-specific pseudo-classes (e.g. :-navi-focus). This is a\n // deliberate exception: all existing CSS and code written as [data-focus] or\n // [data-focus-visible] automatically benefits from the enriched behavior without\n // any changes. A separate navi-specific class would require updating every\n // component.\n //\n // When a controller element (e.g. combobox input) gains or loses focus,\n // notify the elements it controls via aria-controls so they re-check their\n // focus state. `requestPseudoStateCheck` also re-checks the controlled\n // element's proxy (if any), so the visible proxy mirrors the hidden real\n // input's inherited focus.\n const notifyAriaControlled = (el, e) => {\n const controlledIds = el.getAttribute(\"aria-controls\");\n if (!controlledIds) {\n return;\n }\n for (const id of controlledIds.split(\" \")) {\n const controlled = document.getElementById(id);\n if (controlled) {\n requestPseudoStateCheck(controlled, { event: e });\n }\n }\n };\n // Tracks whether the user has pressed a keyboard navigation key (arrow keys,\n // Escape, Enter, Ctrl, Alt, Shift, Space) since the last pointer interaction.\n // Space is ignored when the target is an editable field.\n // This flag is used to gate focus-visible inheritance via aria-controls:\n // on mobile (or when the user hasn't used keyboard nav yet) an input that\n // controls a radio should not cause the radio to show a focus ring.\n // (Declared at module scope — see keyboardNavigationUsed above.)\n const NAVIGATION_KEY_SET = new Set([\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Escape\",\n \"Enter\",\n \"Control\",\n \"Alt\",\n \"Shift\",\n \" \",\n \"Tab\",\n ]);\n document.addEventListener(\n \"keydown\",\n (e) => {\n if (!NAVIGATION_KEY_SET.has(e.key)) {\n return;\n }\n if (e.key === \" \" && isEditableTarget(e.target)) {\n return;\n }\n keyboardNavigationUsed = true;\n },\n { capture: true },\n );\n document.addEventListener(\n \"pointerdown\",\n () => {\n keyboardNavigationUsed = false;\n },\n { capture: true },\n );\n\n // A keystroke flips keyboardNavigationUsed, which can turn :focus-visible on —\n // but only for the element that holds focus, directly or through aria-controls\n // / a proxy. Pressing a key cannot reveal a focus ring on an unfocused element.\n // So a single shared handler re-checks just that focus chain (the active\n // element, what it controls, and its proxy — the last two via\n // requestPseudoStateCheck / notifyAriaControlled). This runs in the bubble\n // phase, after the capture-phase listener above has updated the flag.\n //\n // The alternative — each registered :focus-visible element adding its own\n // document keydown listener that re-tests itself — makes one keypress cost\n // O(number-of-boxes) full-document [aria-controls] / proxy queries, since every\n // unfocused element falls through matches(\":focus-visible\") into hasIndirectFocus.\n const recheckFocusChainOnKey = (e) => {\n const active = document.activeElement;\n if (!active || active === document.body) {\n return;\n }\n requestPseudoStateCheck(active, { event: e });\n notifyAriaControlled(active, e);\n };\n document.addEventListener(\"keydown\", recheckFocusChainOnKey);\n document.addEventListener(\"keyup\", recheckFocusChainOnKey);\n\n // Returns true when el holds focus indirectly — either because a controlling\n // element (aria-controls) has focus, or because el is a proxy whose target\n // is itself controlled by a focused element.\n const hasIndirectFocus = (el, { requireFocusVisible = false } = {}) => {\n // No ring inheritance without a keyboard: an editable target draws its own\n // ring on any focus (see isMatchingFocusVisible), but propagating that ring\n // to a controlled element (aria-controls) is a promise that keyboard\n // shortcuts will drive it — a promise that holds only once a physical\n // keyboard has actually been used. On touch devices the flag stays false\n // and a focused search input keeps its ring to itself.\n if (requireFocusVisible && !keyboardNavigationUsed) {\n return false;\n }\n // A controller/proxy counts as focused for inheritance via the same rule\n // used everywhere: :focus for plain inheritance, isMatchingFocusVisible for\n // the focus-visible variant (so a mouse-focused controller doesn't propagate\n // a ring).\n const isFocusedTarget = (target) =>\n requireFocusVisible\n ? isMatchingFocusVisible(target)\n : target.matches(\":focus\");\n // Both branches of isFocusedTarget rest on :focus / :focus-visible, and only\n // one element in the document can match those: document.activeElement. So\n // the single controller worth testing is known upfront — asking the document\n // for every [aria-controls] would collect candidates that cannot qualify,\n // once per element and again on every re-check, on a document each new\n // element makes bigger.\n const isControlledBy = (target) => {\n const id = target.id;\n if (!id) {\n return false;\n }\n const activeElement = document.activeElement;\n if (!activeElement || activeElement === document.body) {\n return false;\n }\n if (!activeElement.matches(`[aria-controls~=\"${id}\"]`)) {\n return false;\n }\n // A controller inside the element it controls means focus is already\n // native (:focus-within) — nothing to inherit.\n if (target.contains(activeElement)) {\n return false;\n }\n return isFocusedTarget(activeElement);\n };\n if (isControlledBy(el)) {\n return true;\n }\n const proxyTarget = findControlProxyTarget(el);\n if (proxyTarget) {\n if (isFocusedTarget(proxyTarget)) {\n return true;\n }\n if (isControlledBy(proxyTarget)) {\n return true;\n }\n }\n return false;\n };\n\n // One registration per element for everything focus-related, shared by\n // :focus, :focus-visible and :focus-within: they all react to the same\n // focusin/focusout, and they all re-check through the same callback (see\n // initPseudoStyles), which the Set turns into one call.\n const focusTrackingWeakMap = new WeakMap();\n const trackFocus = (el, callback) => {\n let tracking = focusTrackingWeakMap.get(el);\n if (!tracking) {\n const callbackSet = new Set();\n const onFocusChange = (e) => {\n for (const trackedCallback of callbackSet) {\n trackedCallback();\n }\n notifyAriaControlled(el, e);\n };\n el.addEventListener(\"focusin\", onFocusChange);\n el.addEventListener(\"focusout\", onFocusChange);\n tracking = {\n callbackSet,\n teardown: () => {\n el.removeEventListener(\"focusin\", onFocusChange);\n el.removeEventListener(\"focusout\", onFocusChange);\n focusTrackingWeakMap.delete(el);\n },\n };\n focusTrackingWeakMap.set(el, tracking);\n observeAriaControls();\n }\n tracking.callbackSet.add(callback);\n return () => {\n tracking.callbackSet.delete(callback);\n if (tracking.callbackSet.size === 0) {\n tracking.teardown();\n }\n };\n };\n // When aria-controls changes on a focused element, what it used to control\n // and what it controls now both re-check their inherited focus. One observer\n // on the document rather than one per tracked element: the attribute changes\n // rarely, on few elements, while thousands are tracked — and it can be set\n // after the element was, so \"has it at setup\" would miss it.\n let ariaControlsObserver = null;\n const observeAriaControls = () => {\n if (ariaControlsObserver) {\n return;\n }\n ariaControlsObserver = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n const el = mutation.target;\n if (!focusTrackingWeakMap.has(el)) {\n continue;\n }\n if (!el.matches(\":focus-within\")) {\n continue;\n }\n const oldIds = (mutation.oldValue || \"\").split(\" \").filter(Boolean);\n for (const id of oldIds) {\n const controlled = document.getElementById(id);\n if (controlled) {\n requestPseudoStateCheck(controlled, {});\n }\n }\n notifyAriaControlled(el, {});\n }\n });\n ariaControlsObserver.observe(document.documentElement, {\n subtree: true,\n attributes: true,\n attributeFilter: [\"aria-controls\"],\n attributeOldValue: true,\n });\n };\n\n definePseudoClass(\":focus\", {\n attribute: \"data-focus\",\n setup: trackFocus,\n test: (el) => {\n if (el.matches(\":focus\")) {\n return true;\n }\n if (hasIndirectFocus(el)) {\n return true;\n }\n return false;\n },\n });\n definePseudoClass(\":focus-visible\", {\n attribute: \"data-focus-visible\",\n // No per-element keydown/keyup listener: the shared recheckFocusChainOnKey\n // handler re-checks the focused element (the only one a keystroke can turn\n // focus-visible) so a keypress stays O(1), not O(number-of-boxes).\n setup: trackFocus,\n test: (el) => {\n if (isMatchingFocusVisible(el)) {\n return true;\n }\n if (hasIndirectFocus(el, { requireFocusVisible: true })) {\n return true;\n }\n return false;\n },\n });\n definePseudoClass(\":focus-within\", {\n attribute: \"data-focus-within\",\n setup: trackFocus,\n test: (el) => {\n if (el.matches(\":focus-within\")) {\n return true;\n }\n if (hasIndirectFocus(el)) {\n return true;\n }\n if (el.contains(document.activeElement)) {\n // for some reason :focus-within sometimes is false while focus is within...\n // (popover with chrome for some reason)\n return true;\n }\n return false;\n },\n });\n}\n\nObject.assign(PSEUDO_CLASSES, {\n \":-navi-pointed\": {\n attribute: \"data-pointed\",\n },\n \":-navi-pointed-by-mouse\": {\n attribute: \"data-pointed-by-mouse\",\n },\n \":-navi-pointed-by-keyboard\": {\n attribute: \"data-pointed-by-keyboard\",\n },\n \":-navi-pointed-by-proxy\": {\n attribute: \"data-pointed-by-proxy\",\n },\n \":-navi-selected\": {\n attribute: \"data-selected\",\n },\n \":-navi-loading\": {\n attribute: \"data-loading\",\n },\n \":-navi-status-info\": {\n attribute: \"data-status-info\",\n },\n \":-navi-status-success\": {\n attribute: \"data-status-success\",\n },\n \":-navi-status-warning\": {\n attribute: \"data-status-warning\",\n },\n \":-navi-status-error\": {\n attribute: \"data-status-error\",\n },\n \":-navi-expanded\": {\n attribute: \"data-expanded\",\n },\n \":-navi-void\": {\n attribute: \"data-void\",\n },\n \"::highlight\": {},\n});\ndefinePseudoClass(\":-navi-has-value\", {\n attribute: \"data-has-value\",\n setup: (el, callback) => {\n const controlHost = findControlHost(el) || el;\n return addInputEffect(controlHost, callback);\n },\n test: (el) => {\n if (isControlHost(el)) {\n const uiState = getUIStateFromElement(el);\n if (uiState === undefined || uiState === \"\") {\n return false;\n }\n return true;\n }\n if (el.value === \"\") {\n return false;\n }\n return true;\n },\n});\nnavi_pressed: {\n const pressedElements = new WeakSet();\n definePseudoClass(\":-navi-pressed\", {\n attribute: \"data-pressed\",\n setup: (el, callback) => {\n // Prefer :-navi-pressed over :active for interactive elements because:\n // - :active only tracks the primary (left) button; right-click and touch\n // long-press do not trigger :active reliably across browsers.\n // - :-navi-pressed explicitly ignores non-primary buttons (e.g. right-click)\n // and correctly clears pressed state when a context menu opens on long-press,\n // which would otherwise leave the element stuck in a pressed appearance.\n\n // Note: it might be tempting to use el.setPointerCapture() here so that pointerup\n // always fires on el regardless of where the pointer is released. However,\n // pointer capture routes all subsequent pointer events to the capturing element,\n // which means any other element in the tree that expects to receive pointerup,\n // mouseup, click, etc. after a pointerdown will silently not get them.\n // For example a <label> that reacts to mousedown + click, or a third-party\n // library that attaches its own listeners, would break because an ancestor\n // grabbed the pointer out from under them.\n // To avoid forcing every such element to declare an opt-out attribute\n // (e.g. navi-own-pointer-capture) we simply listen on document instead,\n // which is safe and does not interfere with anyone else's event flow.\n const onPointerDown = (e) => {\n if (e.button !== 0) {\n // only left pointer (mouse left click, touch, pen)\n return;\n }\n pressedElements.add(el);\n const onRelease = () => {\n pressedElements.delete(el);\n document.removeEventListener(\"pointercancel\", onRelease, true);\n document.removeEventListener(\"pointerup\", onRelease, true);\n document.removeEventListener(\"contextmenu\", onContextMenu, true);\n callback();\n };\n const onContextMenu = (e) => {\n // On touch devices, a long-press triggers the context menu.\n // If the context menu is not prevented, it means it will open and the\n // pointer events (pointerup, lostpointercapture) won't fire normally,\n // leaving the element stuck in pressed state. We clear it manually.\n // e.button === -1 means the event was synthesized from a long-press (not a real mouse click).\n if (e.button === -1 && !e.defaultPrevented) {\n pressedElements.delete(el);\n document.removeEventListener(\"pointercancel\", onRelease, true);\n document.removeEventListener(\"pointerup\", onRelease, true);\n document.removeEventListener(\"contextmenu\", onContextMenu, true);\n callback();\n }\n };\n document.addEventListener(\"pointercancel\", onRelease, true);\n document.addEventListener(\"pointerup\", onRelease, true);\n document.addEventListener(\"contextmenu\", onContextMenu, true);\n callback();\n };\n el.addEventListener(\"pointerdown\", onPointerDown);\n return () => {\n el.removeEventListener(\"pointerdown\", onPointerDown);\n pressedElements.delete(el);\n };\n },\n test: (el) => pressedElements.has(el),\n });\n}\n\nnavi_drag: {\n definePseudoClass(\":-navi-drag-grabbed\", {\n attribute: \"navi-drag-grabbed\",\n setup: (el, callback) => {\n const onGrab = () => {\n callback();\n const onRelease = () => {\n el.removeEventListener(\"navi_drag_release\", onRelease);\n callback();\n };\n el.addEventListener(\"navi_drag_release\", onRelease);\n };\n el.addEventListener(\"navi_drag_grab\", onGrab);\n return () => {\n el.removeEventListener(\"navi_drag_grab\", onGrab);\n };\n },\n test: (el) => el.hasAttribute(\"data-drag-grabbed\"),\n });\n definePseudoClass(\":-navi-dragging\", {\n attribute: \"navi-dragging\",\n setup: (el, callback) => {\n const onStart = () => {\n callback();\n const onRelease = () => {\n el.removeEventListener(\"navi_drag_release\", onRelease);\n callback();\n };\n el.addEventListener(\"navi_drag_release\", onRelease);\n };\n el.addEventListener(\"navi_drag_start\", onStart);\n return () => {\n el.removeEventListener(\"navi_drag_start\", onStart);\n };\n },\n test: (el) => el.hasAttribute(\"data-dragging\"),\n });\n}\n\nconst EMPTY_STATE = {};\nconst elementToImpactWeakMap = new WeakMap();\nexport const initPseudoStyles = (\n element,\n {\n pseudoClasses,\n pseudoState, // \":disabled\", \":read-only\", \":-navi-loading\", etc...\n effect,\n elementToImpact = element,\n elementListeningPseudoState,\n },\n) => {\n elementToImpactWeakMap.set(element, elementToImpact);\n if (elementListeningPseudoState === element) {\n console.warn(\n `elementListeningPseudoState should not be the same as element to avoid infinite loop`,\n );\n elementListeningPseudoState = null;\n }\n\n const proxyTarget = findControlProxyTarget(element);\n\n const onStateChange = (value, oldValue) => {\n effect?.(value, oldValue);\n if (elementListeningPseudoState) {\n notifyPseudoStateSubscribers(\n elementListeningPseudoState,\n value,\n oldValue,\n );\n }\n // When this element's state changes, notify any proxy element that mirrors it\n // so it can re-check and visually reflect the new state.\n for (const proxy of findControlProxies(element)) {\n requestPseudoStateCheck(proxy, {});\n }\n };\n\n if (!pseudoClasses || pseudoClasses.length === 0) {\n onStateChange(EMPTY_STATE);\n return () => {};\n }\n\n const [teardown, addTeardown] = createPubSub();\n\n let state;\n const checkPseudoClasses = () => {\n let someChange = false;\n const currentState = {};\n for (const pseudoClass of pseudoClasses) {\n const pseudoClassDefinition = PSEUDO_CLASSES[pseudoClass];\n if (!pseudoClassDefinition) {\n console.warn(`Unknown pseudo class: ${pseudoClass}`);\n continue;\n }\n let currentValue;\n if (\n pseudoState &&\n Object.hasOwn(pseudoState, pseudoClass) &&\n pseudoState[pseudoClass] !== undefined\n ) {\n currentValue = pseudoState[pseudoClass];\n } else {\n const { test } = pseudoClassDefinition;\n if (test) {\n currentValue = test(element, pseudoState);\n }\n }\n // If this element is a proxy for another (navi-control-proxy-for=\"targetId\"),\n // inherit the target's active pseudo-state when the element itself isn't in that state.\n // We check the target's elementToImpact (not the target itself) because the\n // data-* attribute may be set on a different element (e.g. pseudoStateSelector).\n if (!currentValue && proxyTarget) {\n const { attribute } = pseudoClassDefinition;\n if (attribute) {\n const targetElementToImpact =\n elementToImpactWeakMap.get(proxyTarget) || proxyTarget;\n if (targetElementToImpact.hasAttribute(attribute)) {\n currentValue = true;\n }\n }\n }\n currentState[pseudoClass] = currentValue;\n const oldValue = state ? state[pseudoClass] : undefined;\n if (oldValue !== currentValue || !state) {\n someChange = true;\n const { attribute, add, remove } = pseudoClassDefinition;\n if (currentValue) {\n if (attribute) {\n elementToImpact.setAttribute(attribute, \"\");\n }\n add?.(element);\n } else {\n if (attribute) {\n elementToImpact.removeAttribute(attribute);\n }\n remove?.(element);\n }\n }\n }\n if (!someChange) {\n return;\n }\n const oldState = state;\n state = currentState;\n onStateChange(state, oldState);\n };\n\n addTeardown(\n subscribeToPseudoState(element, (pseudoState, oldPseudoState) => {\n state = pseudoState;\n onStateChange(state, oldPseudoState);\n }),\n );\n // One function for every way a re-check can be asked, so that setups\n // registering it side by side (the focus tracking, for one) hold the same\n // callback and call it once.\n const requestCheck = () => {\n checkPseudoClasses();\n };\n element.addEventListener(\"navi_pseudo_state_request_check\", requestCheck);\n addTeardown(() => {\n element.removeEventListener(\n \"navi_pseudo_state_request_check\",\n requestCheck,\n );\n });\n\n for (const pseudoClass of pseudoClasses) {\n const pseudoClassDefinition = PSEUDO_CLASSES[pseudoClass];\n if (!pseudoClassDefinition) {\n console.warn(`Unknown pseudo class: ${pseudoClass}`);\n continue;\n }\n const { setup } = pseudoClassDefinition;\n if (setup) {\n const cleanup = setup(element, requestCheck);\n addTeardown(cleanup);\n }\n }\n checkPseudoClasses();\n if (import.meta.dev) {\n // just in case + catch use forcing them in chrome devtools\n addTeardown(pollInDev(requestCheck));\n }\n\n return teardown;\n};\n\nexport const applyStyle = (\n element,\n style,\n pseudoState,\n pseudoNamedStyles,\n preventInitialTransition,\n) => {\n if (!element) {\n return;\n }\n const styleToApply = getStyleToApply(style, pseudoState, pseudoNamedStyles);\n // The same object comes back for every state change of a box whose inline\n // style has no pseudo entry: nothing to write.\n if (appliedStyleWeakMap.get(element) === styleToApply) {\n return;\n }\n updateStyle(element, styleToApply, preventInitialTransition);\n};\n\nexport const PSEUDO_STATE_DEFAULT = {};\nexport const PSEUDO_NAMED_STYLES_DEFAULT = {};\nconst getStyleToApply = (styles, pseudoState, pseudoNamedStyles) => {\n if (\n !pseudoState ||\n pseudoState === PSEUDO_STATE_DEFAULT ||\n !pseudoNamedStyles ||\n pseudoNamedStyles === PSEUDO_NAMED_STYLES_DEFAULT\n ) {\n return styles;\n }\n let style = styles;\n for (const pseudoKey of Object.keys(pseudoNamedStyles)) {\n if (!hasEveryState(pseudoState, getPseudoKeyRequiredStates(pseudoKey))) {\n continue;\n }\n if (style === styles) {\n style = { ...styles };\n }\n // Both sides are already normalized for CSS by the box; only the\n // properties that compose (a press scale on top of a translate) go through\n // a merge, the rest is a plain override.\n const styleToAdd = pseudoNamedStyles[pseudoKey];\n for (const key of Object.keys(styleToAdd)) {\n const value = styleToAdd[key];\n if (value === undefined) {\n continue;\n }\n if (key === \"transform\" || key === \"willChange\") {\n style[key] = mergeOneStyle(style[key], value, key, \"css\");\n } else {\n style[key] = value;\n }\n }\n }\n return style;\n};\n\n// The state names a pseudo key asks for, parsed once: the same few keys come\n// back on every state change of every box that has them. \"::x\" alone always\n// matches; \"::x:a:b\" and \":a:b\" ask for \":a\" and \":b\" — the state keys as\n// checkPseudoClasses writes them, colon included.\nconst pseudoKeyRequiredStatesMap = new Map();\nconst getPseudoKeyRequiredStates = (pseudoKey) => {\n const cached = pseudoKeyRequiredStatesMap.get(pseudoKey);\n if (cached) {\n return cached;\n }\n let requiredStates;\n if (pseudoKey.startsWith(\"::\")) {\n const nextColonIndex = pseudoKey.indexOf(\":\", 2);\n requiredStates =\n nextColonIndex === -1\n ? []\n : getPseudoKeyRequiredStates(pseudoKey.slice(nextColonIndex));\n } else {\n const nextColonIndex = pseudoKey.indexOf(\":\", 1);\n requiredStates =\n nextColonIndex === -1\n ? [pseudoKey]\n : pseudoKey\n .slice(1)\n .split(\":\")\n .map((state) => `:${state}`);\n }\n pseudoKeyRequiredStatesMap.set(pseudoKey, requiredStates);\n return requiredStates;\n};\nconst hasEveryState = (pseudoState, states) => {\n for (const state of states) {\n if (!pseudoState[state]) {\n return false;\n }\n }\n return true;\n};\n\n// element → the style object last written to it, so the next one is written\n// as a difference: the values that changed, the keys it no longer has.\nconst appliedStyleWeakMap = new WeakMap();\nconst elementTransitionWeakMap = new WeakMap();\nconst elementRenderedWeakSet = new WeakSet();\nconst NO_STYLE = {};\nconst updateStyle = (element, style, preventInitialTransition) => {\n const styleToApply = style || NO_STYLE;\n const styleApplied = appliedStyleWeakMap.get(element) || NO_STYLE;\n // TRANSITION ANTI-FLICKER STRATEGY:\n // Problem: When setting both transition and styled properties simultaneously\n // (e.g., el.style.transition = \"border-radius 0.3s ease\"; el.style.borderRadius = \"20px\"),\n // the browser will immediately perform a transition even if no transition existed before.\n //\n // Solution: Temporarily disable transitions during initial style application by setting\n // transition to \"none\", then restore the intended transition after the frame completes.\n // We handle multiple updateStyle calls in the same frame gracefully - only one\n // requestAnimationFrame is scheduled per element, and the final transition value wins.\n let skipTransition = false;\n if (!elementRenderedWeakSet.has(element)) {\n const hasTransition = Object.hasOwn(styleToApply, \"transition\");\n if (hasTransition || preventInitialTransition) {\n if (!elementTransitionWeakMap.has(element)) {\n element.style.transition = \"none\";\n }\n elementTransitionWeakMap.set(element, styleToApply.transition);\n // Stays \"none\" until the first frame puts the intended value back\n skipTransition = true;\n }\n afterFirstFrame(element);\n }\n\n for (const key of Object.keys(styleToApply)) {\n const value = styleToApply[key];\n if (value === undefined || value === null) {\n // a removal: handled below with the keys this style no longer has\n continue;\n }\n if (skipTransition && key === \"transition\") {\n continue;\n }\n if (styleApplied[key] === value) {\n continue;\n }\n if (key.startsWith(\"--\")) {\n element.style.setProperty(key, value);\n } else {\n element.style[key] = value;\n }\n }\n\n for (const key of Object.keys(styleApplied)) {\n const previousValue = styleApplied[key];\n if (previousValue === undefined || previousValue === null) {\n continue;\n }\n const value = styleToApply[key];\n if (value !== undefined && value !== null) {\n continue;\n }\n if (key.startsWith(\"--\")) {\n element.style.removeProperty(key);\n } else {\n element.style[key] = \"\";\n }\n }\n\n appliedStyleWeakMap.set(element, styleToApply);\n};\n\n// One frame for every element waiting for its first one, not one frame each.\n// What this owes each element — put back the transition suppressed above, and\n// remember it has now been painted once — is a few microseconds, while asking\n// the browser for a frame costs more than that, and a page mounting thousands of\n// boxes asks thousands of times in the same tick. A Set, so an element styled\n// twice before the frame arrives is still one entry.\nlet elementSetWaitingFirstFrame = new Set();\nlet firstFrameScheduled = false;\nconst afterFirstFrame = (element) => {\n elementSetWaitingFirstFrame.add(element);\n if (firstFrameScheduled) {\n return;\n }\n firstFrameScheduled = true;\n requestAnimationFrame(() => {\n firstFrameScheduled = false;\n const elements = elementSetWaitingFirstFrame;\n elementSetWaitingFirstFrame = new Set();\n for (const element of elements) {\n if (elementTransitionWeakMap.has(element)) {\n const transitionToRestore = elementTransitionWeakMap.get(element);\n if (transitionToRestore === undefined) {\n element.style.transition = \"\";\n } else {\n element.style.transition = transitionToRestore;\n }\n elementTransitionWeakMap.delete(element);\n }\n elementRenderedWeakSet.add(element);\n }\n });\n};\n\n// Dev only: a periodic re-check for what nothing announces — a state forced\n// from the devtools. One interval walking every registered check rather than\n// one per element: a page of a thousand boxes would otherwise run a thousand\n// timers a second.\nconst devPollCheckSet = new Set();\nlet devPollInterval = null;\nconst pollInDev = (check) => {\n devPollCheckSet.add(check);\n if (devPollInterval === null) {\n devPollInterval = setInterval(() => {\n for (const registeredCheck of devPollCheckSet) {\n registeredCheck();\n }\n }, 1_000);\n }\n return () => {\n devPollCheckSet.delete(check);\n if (devPollCheckSet.size === 0) {\n clearInterval(devPollInterval);\n devPollInterval = null;\n }\n };\n};\n",
|
|
35
|
+
"/**\n * navi's stance on the on-screen keyboard: it overlays the app rather than\n * resizing the viewport, wherever the browser can be told so (the\n * VirtualKeyboard API — Chromium only). See virtual_keyboard.js in @jsenv/dom\n * for what that trades away and what it gives back.\n *\n * Turned on rather than offered, because navi already sizes everything that\n * escapes normal flow against the app's own rectangle rather than against the\n * window (--navi-app-width/height, see navi_css_vars.js), and\n * --navi-keyboard-inset-bottom (safe_area.js) puts the keyboard into exactly\n * that rectangle. So the two mechanisms reach the same numbers here, and the\n * overlay reaches them without reflowing the page underneath — a resizing\n * viewport is a resize of everything, fired transiently every time focus goes\n * from one input to the next.\n *\n * An app that built its own layout around the viewport shrinking can say so\n * with disableVirtualKeyboardOverlay(), and gets the behavior Firefox and\n * Safari give it anyway.\n *\n * Taking the deal means taking over what the browser stops doing under it:\n * bringing the focused field out from under the keyboard. A viewport that\n * shrinks makes the browser scroll to the field; a keyboard that merely paints\n * over the page leaves whatever is under it under it. So navi does that\n * scroll here, with two things safe_area.js provides: a scroll-padding-bottom\n * that counts the keyboard in, plus an allowance for the strip Chrome paints\n * above it without reporting it (--navi-keyboard-strip-allowance), which\n * bounds the band the field is brought into; and room at the end of the\n * scroller, so a field near the end of the page has somewhere to go.\n *\n * Only the arrival is navi's: once the field is in view, Chrome keeps the caret\n * there itself as typing grows a textarea, against that same\n * scroll-padding-bottom.\n */\n\nimport {\n getVirtualKeyboardOverlayHeight,\n scrollIntoViewThroughScrollables,\n setVirtualKeyboardOverlaysContent,\n subscribeVirtualKeyboardGeometryChange,\n} from \"@jsenv/dom\";\n\nimport { isEditableTarget } from \"../box/pseudo_styles.js\";\n\nsetVirtualKeyboardOverlaysContent(true);\n\nexport const disableVirtualKeyboardOverlay = () => {\n setVirtualKeyboardOverlaysContent(false);\n};\n\nconst revealFocusedField = () => {\n // 0 as well once the overlay is disabled: the viewport shrinks and the\n // browser reveals the field itself.\n if (getVirtualKeyboardOverlayHeight() === 0) {\n return;\n }\n const field = document.activeElement;\n if (!isEditableTarget(field)) {\n return;\n }\n if (isInDocumentBand(field)) {\n return;\n }\n // \"center\" rather than \"nearest\": nearest stops the field on the band's\n // edge, clear of the strip only by the allowance. The middle of the band\n // clears a strip taller than guessed too — and centering what is not fully\n // visible is what Chrome does itself when the viewport shrinks.\n scrollIntoViewThroughScrollables(field, {\n block: \"center\",\n behavior: \"instant\",\n });\n};\n// The keyboard rising, or changing height (suggestion strip, emoji panel).\nsubscribeVirtualKeyboardGeometryChange(revealFocusedField);\n// From one field to the next with the keyboard up: when both want the same\n// keyboard it does not move, and no geometrychange fires.\ndocument.addEventListener(\"focusin\", revealFocusedField, { capture: true });\n\n// The band the document leaves visible: inside its scroll-padding (the bars,\n// the keyboard and its strip, see safe_area.js). Against the window rather\n// than each scroller's own band: the keyboard covers the window, and a field\n// hidden inside its own scroller is what the browser's focus already scrolls\n// to.\nconst isInDocumentBand = (field) => {\n const documentElement = document.documentElement;\n const style = getComputedStyle(documentElement);\n const bandTop = parseFloat(style.scrollPaddingTop) || 0;\n const bandBottom =\n documentElement.clientHeight - (parseFloat(style.scrollPaddingBottom) || 0);\n const { top, bottom } = field.getBoundingClientRect();\n return top >= bandTop && bottom <= bandBottom;\n};\n",
|
|
16
36
|
"/**\n * Regroup CSS vars that makes sense to share across all navi components.\n */\nimport { setPlacementViewportInsets } from \"@jsenv/dom\";\nimport { effect } from \"@preact/signals\";\n\nimport {\n getAppInsets,\n visualViewportHeightSignal,\n visualViewportWidthSignal,\n} from \"./layout/responsive.js\";\nimport \"./layout/safe_area.js\";\n// Side-effect import: turns the on-screen keyboard into something that\n// overlays the app instead of resizing the viewport, which is navi's default\n// (see that module for why, and safe_area.js's own\n// --navi-keyboard-inset-bottom for what then reads the geometry). Here rather\n// than in each component: it is one decision about the whole window, and this\n// is the module that already makes those.\nimport \"./layout/virtual_keyboard.js\";\n\nconst button = document.createElement(\"button\");\nbutton.style.display = \"none\";\ndocument.body.appendChild(button);\nconst computedStyle = getComputedStyle(button);\nconst controlDefaultFontFamily = computedStyle.fontFamily;\nconst controlDefaultFontSize = computedStyle.fontSize;\ndocument.body.removeChild(button);\n\nconst css = /* css */ `\n @layer navi {\n :root {\n /* Overridden at runtime with precise VisualViewport pixel values so that dvw/dvh \n (which don't track the virtual keyboard dimensions) are never used in practice on supported browsers. */\n --navi-vvw: 100dvw;\n --navi-vvh: 100dvh;\n\n /* What navi treats as \"the screen\" when it sizes something that escapes\n normal flow (a dialog in the top layer, a popover, anything built on\n them): the app's own rectangle, which is the visual viewport minus the\n bands an app asks for. An app that never spans the whole window says so\n ONCE, without ever naming a component:\n\n :root {\n --navi-app-max-width: 600px;\n }\n\n Typically an app simulating a handheld screen: a column centered in a\n wide window with bands on the sides. A dialog is in the top layer, so\n it answers to the viewport, not to that column — left alone it would\n paint 1500px of modal over a 600px app. Declaring the ceiling here is\n what makes the app's own width apply everywhere, including on top.\n\n It stays a ceiling and nothing else: on a screen narrower than the app\n it never binds, so popups keep shrinking with the phone, and the gap\n each popup keeps with the edges (marginWithContainer) is subtracted\n from it too. A single popup that genuinely needs more can still\n raise its own maxWidth/maxHeight prop.\n\n Read from the insets rather than as a min() of its own so that the\n width and the placement come from ONE description of where the app is\n (see layout/safe_area.js). Placement follows the same rectangle: see\n setPlacementViewportInsets at the bottom of this file. */\n --navi-app-width: calc(\n var(--navi-vvw) - var(--navi-app-inset-left) - var(\n --navi-app-inset-right\n )\n );\n --navi-app-height: calc(\n var(--navi-vvh) - var(--navi-app-inset-top) - var(\n --navi-app-inset-bottom\n )\n );\n\n --navi-focus-outline-width: 2px;\n --navi-focus-outline-color: light-dark(#4476ff, #3b82f6);\n --navi-loader-color: light-dark(#355fcc, #3b82f6);\n /* The grey rectangle a mobile browser flashes under a finger: we draw\n what a press does ourselves (background, ring, chevron), and the\n browser's rectangle is a square painted over rounded corners.\n Declared here alone because the property is inherited: :root covers\n every element, in and out of navi, so nothing has to remember it.\n Set the token to a color to get the flash back, on the whole app or\n on one subtree. */\n -webkit-tap-highlight-color: var(--navi-tap-highlight-color);\n --navi-tap-highlight-color: transparent;\n\n /* A face of their own for the controls, and nothing else on the page.\n Undeclared here on purpose: controls write in inherit, so what a\n container says reaches the button, the field and the picker inside it,\n and a value on :root would resolve here and wall that off again. Set\n it to give the controls their own face, on the whole app or on one\n subtree:\n\n :root {\n --navi-control-font-family: system-ui;\n }\n */\n --navi-control-font-size: ${controlDefaultFontSize};\n --navi-control-border-radius: 2px;\n /* A checkbox is only ~1em wide: applying a control radius meant for\n buttons/inputs (say 8px) would turn it into a circle and make it read\n as a radio. So it follows the control radius but capped at a quarter\n of its own size. Override this token alone to opt out of the cap. */\n --navi-checkbox-border-radius: min(\n var(--navi-control-border-radius),\n 0.25em\n );\n /* The color a control uses to say \"this one is on\": a checked checkbox,\n a checked radio, an enabled switch. Kept apart from --navi-accent-color\n (the brand color for CTA and selection) because a control that is on\n must stay readable as a control, which usually means a brighter, more\n saturated color than a brand accent.\n The light value matches the browser's own accent so a navi control and\n a native one can sit side by side without reading as two blues. */\n --navi-control-accent-color: light-dark(rgb(24, 117, 255), #3b82f6);\n --navi-control-border-width: 1px;\n --navi-control-border-color: light-dark(#767676, #8e8e93);\n --navi-control-padding-x-default: 2px;\n --navi-control-padding-y-default: 1px;\n /* Global padding defaults — override these to change all button paddings. */\n /* Use --button-padding, --button-padding-x, --button-padding-y for per-button overrides. */\n --navi-button-padding-x-default: 6px;\n --navi-button-padding-y-default: 1px;\n /* Read by Button, and by whatever is drawn as one (a picker under\n variant=\"button\"), so the two keep the same surface. */\n --navi-button-background-color: light-dark(#f3f4f6, #2d3748);\n\n /* What a callout says about its message, as a color — and what draws\n as one outside the callout too (the icon a picker in callout mode\n presses, see CalloutStatusIcon). */\n --navi-callout-success-color: #4caf50;\n --navi-callout-info-color: #2196f3;\n --navi-callout-warning-color: #ff9800;\n --navi-callout-error-color: #f44336;\n /* No status: the message is an aside, said without an icon and framed\n like a control rather than like a warning. */\n --navi-callout-neutral-color: var(--navi-control-border-color);\n /* For list item we need slightly more padding to be able to see radio/checkbox outline */\n --navi-list-item-padding-x-default: 4px;\n --navi-list-item-padding-y-default: 1px;\n /* default */\n --navi-picker-padding-x-default: var(--navi-control-padding-x-default);\n --navi-picker-padding-y-default: var(--navi-control-padding-y-default);\n\n --navi-popup-border-radius: 8px;\n --navi-popup-border-color: light-dark(#d0d0d0, #3b3b3b);\n --navi-popup-box-shadow:\n 0 4px 8px rgba(0, 0, 0, 0.08), 0 12px 40px rgba(0, 0, 0, 0.22);\n /* A popup's paper is the same paper as everything else's: derived from\n the surface token so one override themes fields, layouts and popups\n together. Still its own token, so popups alone can be re-papered. */\n --navi-popup-background-color: var(--navi-surface-color);\n /* The ink written on that paper. A popup declares both on itself (see\n dialog.jsx / popover.jsx): it is a new surface, so it does not write\n in whatever the container it was declared in writes in. */\n --navi-popup-color: var(--navi-surface-text-color);\n /* A backdrop's paint is a colour AND a filter, one pair per kind of\n backdrop: how much the page behind must stop competing for the eye is\n a different question from what an outside click does, so a backdrop\n that closes on that click can blur too. Only \"capture\" blurs by\n default. */\n --navi-backdrop-close-background: rgba(0, 0, 0, 0.08);\n --navi-backdrop-close-backdrop-filter: none;\n /* backdropVariant=\"discrete\": the popup still catches every outside\n click, it just stops announcing that it did. For an affordance one\n reaches past rather than through — the dim is there to mark the layer,\n not to push the page behind it away. */\n --navi-backdrop-discrete-background: rgba(0, 0, 0, 0.02);\n --navi-backdrop-discrete-backdrop-filter: none;\n /* \"capture\" means the rest of the page is fully non-interactive —\n blurred, not just dimmed, so it reads as clearly secondary and\n pulls visual focus onto the popover's own content. */\n --navi-backdrop-capture-background: rgb(255 255 255 / 0.08);\n --navi-backdrop-capture-backdrop-filter: blur(30px) saturate(180%);\n /* animation=\"lifting\", and backdropVariant=\"lift\" asking for the same\n wall without the movement: the popup is what the anchor became, so the page\n it came out of is not a context to keep readable — it is the thing the\n movement leaves. A card, a plan, a picture lifted to be looked at wants\n nothing legible competing with it, and a document still crisp behind a\n box that is still travelling reads as two movements at once. Dark in\n both schemes on purpose: what withdraws here is the page itself, the\n way it does around a photo, not a surface tinted to match a theme. */\n --navi-backdrop-lift-background: rgb(6 10 20 / 88%);\n --navi-backdrop-lift-backdrop-filter: blur(4px);\n\n /* Link colors. They live here rather than only on .navi_link because a\n var declared on the element itself always beats the same var inherited\n from an ancestor: a page setting --link-color-pressed on :root would\n never reach a link. These :root tokens are the theme-level surface;\n --link-color-* stays the per-link (or per-subtree) override. */\n --navi-link-color: rgb(0, 0, 238);\n /* --navi-link-color-visited is intentionally left undefined: by default a\n visited link is derived from whatever --link-color ended up being on\n the link itself (see link.jsx), which a :root token cannot see. Set it\n here from an app to pin one visited color for every link. */\n --navi-link-color-pressed: red;\n --navi-link-current-indicator-color: rgb(205, 52, 37);\n\n --navi-selection-border-color: #0078d4;\n --navi-selection-background-color: #eaf1fd;\n /* Accent color — used for call-to-action buttons and selected list items.\n Override this single variable to apply a consistent brand color across\n all components that need to stand out. */\n --navi-accent-color: rgb(3, 30, 60);\n /* The surface a control's content sits on — the \"paper\" behind the text.\n Fields use it whenever they need a solid background (their default\n background, a transparent field being edited, …). */\n --navi-surface-color: light-dark(#ffffff, #1c1c1e);\n /* What is written on that paper. The browser's own text color rather\n than a literal, so it follows color-scheme the way the paper does. */\n --navi-surface-text-color: CanvasText;\n /* The plane the app's own frame is painted on — a top bar, a side menu, a\n toolbar: everything that surrounds a screen rather than being in it.\n A step away from the paper, because a bar painted in the paper's own\n color on a page of that color is not a bar, it is a line. Derived from\n the paper rather than written as a literal so it follows the theme by\n construction: a step toward the dark on a light page, toward the light\n on a dark one. Reached as background=\"chrome\" on a Box. */\n --navi-chrome-color: color-mix(\n in srgb,\n var(--navi-surface-color) 94%,\n var(--navi-color-dark)\n );\n /* The line that separates two regions of one surface — a scrolling area's\n header from what scrolls under it, for instance. Not a border: the\n separation belongs to the layout, not to the box that draws it. */\n --navi-separator-color-default: #d1d9e0;\n --navi-color-white: white;\n --navi-color-dark: rgb(55, 60, 69);\n\n --navi-info-color-light: #eaf6fc;\n --navi-info-color: #376cc2;\n --navi-success-color-light: #ecf9ef;\n --navi-success-color: #50c464;\n --navi-warning-color-light: #fdf6e3;\n --navi-warning-color: #f19c05;\n --navi-error-color-light: #fcebed;\n --navi-error-color: #eb364b;\n\n --navi-xxs: 0.125em; /* = 2px at 16px base */\n --navi-xs: 0.25em; /* = 4px at 16px base */\n --navi-s: 0.5em; /* = 8px at 16px base */\n --navi-m: 1em; /* = 16px at 16px base (base font size) */\n --navi-l: 1.5em; /* = 24px at 16px base */\n --navi-xl: 2em; /* = 32px at 16px base */\n --navi-xxl: 3em; /* 48px at 16px base */\n\n --navi-typo-xxs: 0.625rem; /* 10px at 16px base */\n --navi-typo-xs: 0.75rem; /* 12px at 16px base */\n --navi-typo-s: 0.875rem; /* 14px at 16px base */\n --navi-typo-m: 1rem; /* 16px at 16px base (base font size) */\n --navi-typo-l: 1.125rem; /* 18px at 16px base */\n --navi-typo-xl: 1.25rem; /* 20px at 16px base */\n --navi-typo-xxl: 1.5rem; /* 24px at 16px base */\n\n /* The line every text is written on, controls included. A number\n rather than \"normal\", because of the emoji: its box is taller than a\n letter's, so under \"normal\" the one line carrying one stands taller\n than the lines around it, and under a tighter line its top is cut.\n 1.25 is where neither happens — 1 clips the glyph, 1.5 spaces the rows\n out more than reading them asks for — which also makes it the floor\n for an app that displays what people typed.\n The document is written on it; the components that come with a line of\n their own from the browser (Button, Input, Textarea, Select) are handed\n it by name. One number everywhere is what keeps a value on the same\n line whether it is typed in a field or drawn in the page.\n See docs/typography.md. */\n --navi-line-height: 1.25;\n /* The face everything is written in, controls included — they inherit\n it rather than carrying one of their own, so an app names its typeface\n once, wherever it wants it to start: on the document, on a section, on\n a popup opened with font=\"…\". The browser's own control face rather\n than the document's default, so that a page saying nothing gets its\n text and its buttons in one face instead of two.\n Layered like the line above, so the app's own rule wins. */\n font-family: ${controlDefaultFontFamily};\n /* Layered: the document's line is what navi writes on when the app says\n nothing, so the app's own body rule wins. */\n line-height: var(--navi-line-height);\n /* The same line for a control, snapped to the pixel. The browser lays a\n line out at its exact height but paints the glyph on a pixel row: at\n the default control size (13.333px) the line is 16.666px, and the\n two-thirds that do not fit go entirely under the glyph, which then\n sits a pixel above the middle of its field. A whole number of pixels\n has no remainder to put anywhere. Written with em so it resolves on\n the control that uses it, at that control's own size. */\n --navi-control-line-height: round(\n calc(var(--navi-line-height) * 1em),\n 1px\n );\n\n /* Color keywords.\n primary: the ink of the paper, at full strength. An absolute\n rather than currentColor: it is what brings a run back\n to plain text inside a muted one (a value in a secondary\n label). Themed through --navi-surface-text-color.\n secondary: supporting text, captions, less important labels\n emphasis: reinforce meaning, make content stand out more\n discrete: unobtrusive elements that shouldn't compete for attention\n hint: barely-there color, watermarks, ghost placeholders\n The last four mix currentColor toward transparent or black, so they\n follow whatever ink a container writes in: a dark card sets color and\n nothing else. The share of ink in each is the theme's knob, a -mix\n token read wherever the formulas are declared — here and on each\n surface that re-declares them (rules below) — so a ratio set on :root\n reaches the page and its popups alike. Set on a container it reaches\n none of that container's own text, a var() resolving where its custom\n property is declared; a container that wants one keyword otherwise\n for ITS paper (a white at 88% where 80% of white reads too faint on a\n colored resin) pins the keyword itself, and that value stops at the\n next surface. */\n --navi-color-secondary-mix: 80%;\n --navi-color-emphasis-mix: 50%;\n --navi-color-discrete-mix: 60%;\n --navi-color-hint-mix: 25%;\n --navi-color-primary: var(--navi-surface-text-color);\n\n /* What a control shows while it holds nothing: the ::placeholder of an\n input, the empty value slot of a picker. One place for the whole app:\n\n :root {\n --navi-placeholder-color: #8a94a6;\n --navi-placeholder-font-style: italic;\n }\n */\n --navi-placeholder-color: var(--navi-color-discrete);\n --navi-placeholder-font-style: normal;\n }\n\n /* A surface is a new paper: it writes in an ink of its own, and the\n keywords below are computed against that ink rather than the\n container's. A popup writes in --navi-popup-color. */\n .navi_popover,\n .navi_dialog {\n --navi-color-primary: var(--navi-popup-color);\n }\n /* A callout writes in the UA's own ink: callout.js sets color: revert on\n a [popover] element, which the UA styles CanvasText. */\n .navi_callout {\n --navi-color-primary: CanvasText;\n }\n\n /* The keywords derived from the ink, declared on every paper — :root, and\n each surface that is a new one — so what a container pinned for its own\n paper stops at the surface. The -mix ratios (see :root) are read where\n this is declared, and each paper resolves currentColor as its own. On\n the element itself, so a surface beats the container's value whatever\n the layer; an app that wants a surface to keep its container's ink says\n so on the surface, unlayered, and wins in turn. */\n :root,\n .navi_popover,\n .navi_dialog,\n .navi_callout {\n --navi-color-secondary: color-mix(\n in srgb,\n currentColor var(--navi-color-secondary-mix),\n transparent\n );\n --navi-color-emphasis: color-mix(\n in srgb,\n currentColor var(--navi-color-emphasis-mix),\n black\n );\n --navi-color-discrete: color-mix(\n in srgb,\n currentColor var(--navi-color-discrete-mix),\n transparent\n );\n --navi-color-hint: color-mix(\n in srgb,\n currentColor var(--navi-color-hint-mix),\n transparent\n );\n }\n }\n\n /* Hidden appearance */\n input[navi-visually-hidden],\n button[navi-visually-hidden],\n div[navi-visually-hidden] {\n position: absolute;\n top: 0;\n left: 0;\n z-index: -1;\n /* Important to take full size so that scrollIntoView work as expected */\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n white-space: nowrap;\n border: 0;\n clip-path: inset(50%);\n appearance: none;\n overflow: hidden;\n\n &[navi-debug] {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n clip-path: none;\n appearance: auto;\n }\n }\n`;\nimport.meta.css = css;\n\neffect(() => {\n document.documentElement.style.setProperty(\n \"--navi-vvw\",\n `${visualViewportWidthSignal.value}px`,\n );\n document.documentElement.style.setProperty(\n \"--navi-vvh\",\n `${visualViewportHeightSignal.value}px`,\n );\n});\n\n// Placement follows the same rectangle the size caps above describe: the JS\n// that positions popups (pickPositionRelativeTo in @jsenv/dom) computes\n// against the visual viewport narrowed by the app's own bands, so a dialog\n// centers on the app column and a side panel docks flush against the app's\n// edge rather than the window's. Here rather than in each component, for the\n// same reason as virtual_keyboard.js above: one decision about the whole\n// window.\nsetPlacementViewportInsets(getAppInsets);\n"
|
|
17
37
|
],
|
|
18
38
|
"names": [],
|
|
19
|
-
"mappings": ";;;AAAK,MAAC,yBAAyB,GAAG,CAAC,UAAU,KAAK;AAClD,EAAE,MAAM,qBAAqB,GAAG,6BAA6B;;AAE7D,EAAE,IAAI,UAAU,CAAC,GAAG,KAAK,qBAAqB,EAAE;AAChD,IAAI;AACJ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