@wow-two-beta/fe 0.0.33 → 0.0.34

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.
Files changed (41) hide show
  1. package/dist/chunks/{BackToTopButton.vue_vue_type_script_setup_true_lang-dmN5MH2T.js → BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js} +74 -31
  2. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js.map +1 -0
  3. package/dist/chunks/{KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js → KanbanCard.vue_vue_type_script_setup_true_lang-akNFA0JK.js} +545 -312
  4. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-akNFA0JK.js.map +1 -0
  5. package/dist/chunks/{UseTypedConfirmation-CvY2T4Up.js → RowsField.vue_vue_type_script_setup_true_lang-C0L-DjCW.js} +967 -840
  6. package/dist/chunks/RowsField.vue_vue_type_script_setup_true_lang-C0L-DjCW.js.map +1 -0
  7. package/dist/chunks/{TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js → TypedConfirmModal.vue_vue_type_script_setup_true_lang-3Sdgh0cV.js} +26 -13
  8. package/dist/chunks/{TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js.map → TypedConfirmModal.vue_vue_type_script_setup_true_lang-3Sdgh0cV.js.map} +1 -1
  9. package/dist/foundation/device/hooks/UseBreakpointRange.d.ts +21 -0
  10. package/dist/foundation/device/index.d.ts +1 -0
  11. package/dist/foundation/device/index.js +13 -0
  12. package/dist/foundation/device/index.js.map +1 -1
  13. package/dist/index.js +232 -228
  14. package/dist/presentation/actions/index.d.ts +1 -0
  15. package/dist/presentation/actions/index.js +12 -11
  16. package/dist/presentation/actions/refreshButton/RefreshButton.vue.d.ts +26 -0
  17. package/dist/presentation/actions/refreshButton/index.d.ts +1 -0
  18. package/dist/presentation/display/badge/Badge.variants.d.ts +77 -10
  19. package/dist/presentation/display/badge/Badge.vue.d.ts +18 -1
  20. package/dist/presentation/display/badge/index.d.ts +1 -1
  21. package/dist/presentation/display/card/CardLink.vue.d.ts +19 -0
  22. package/dist/presentation/display/card/index.d.ts +1 -0
  23. package/dist/presentation/display/index.js +152 -150
  24. package/dist/presentation/display/listGroup/ListGroupItem.vue.d.ts +17 -0
  25. package/dist/presentation/display/sparkline/Sparkline.vue.d.ts +32 -2
  26. package/dist/presentation/display/sparkline/index.d.ts +1 -1
  27. package/dist/presentation/feedback/dataRegion/DataRegion.vue.d.ts +1 -1
  28. package/dist/presentation/forms/index.d.ts +1 -0
  29. package/dist/presentation/forms/index.js +59 -58
  30. package/dist/presentation/forms/rowsField/RowsField.vue.d.ts +56 -0
  31. package/dist/presentation/forms/rowsField/index.d.ts +1 -0
  32. package/dist/presentation/overlays/index.js +1 -1
  33. package/dist/presentation/overlays/typedConfirmModal/TypedConfirmModal.vue.d.ts +20 -4
  34. package/dist/router/adapters/vueRouter/hooks/UseListDetailRoute.d.ts +28 -0
  35. package/dist/router/adapters/vueRouter/index.d.ts +1 -0
  36. package/dist/router/index.js +34 -0
  37. package/dist/router/index.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-dmN5MH2T.js.map +0 -1
  40. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js.map +0 -1
  41. package/dist/chunks/UseTypedConfirmation-CvY2T4Up.js.map +0 -1
@@ -0,0 +1,21 @@
1
+ import { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue';
2
+ import { BreakpointScale } from '../Breakpoints';
3
+ /**
4
+ * Reports whether the viewport is at least the `key` breakpoint of the caller's scale — `md` and wider for `'md'`.
5
+ * One media query, so a layout that only asks "desktop or not" never tracks the whole scale.
6
+ *
7
+ * SSR-safe: `false` on the server and until mounted, the mobile-first base.
8
+ * ```ts
9
+ * const isDesktop = useBreakpointUp(TailwindBreakpoints, 'lg');
10
+ * ```
11
+ */
12
+ export declare function useBreakpointUp<TScale extends BreakpointScale>(scale: MaybeRefOrGetter<TScale>, key: MaybeRefOrGetter<Extract<keyof TScale, string>>): Readonly<ShallowRef<boolean>>;
13
+ /**
14
+ * Reports whether the viewport is narrower than the `key` breakpoint of the caller's scale — a phone below `'md'`.
15
+ *
16
+ * SSR-safe: `true` on the server and until mounted, the mobile-first base.
17
+ * ```ts
18
+ * const isPhone = useBreakpointBelow(TailwindBreakpoints, 'md');
19
+ * ```
20
+ */
21
+ export declare function useBreakpointBelow<TScale extends BreakpointScale>(scale: MaybeRefOrGetter<TScale>, key: MaybeRefOrGetter<Extract<keyof TScale, string>>): ComputedRef<boolean>;
@@ -6,5 +6,6 @@ export { useDisplayMode, useIsInstalled } from './hooks/UseDisplayMode';
6
6
  export { Platform, getPlatform } from './Platform';
7
7
  export { type BreakpointScale, type BreakpointQuery, TailwindBreakpoints, toBreakpointQueries, resolveBreakpoint, } from './Breakpoints';
8
8
  export { useBreakpoint } from './hooks/UseBreakpoint';
9
+ export { useBreakpointUp, useBreakpointBelow } from './hooks/UseBreakpointRange';
9
10
  export { useMediaQuery } from './hooks/UseMediaQuery';
10
11
  export * from './hooks/UseReducedMotion';
@@ -149,6 +149,17 @@ function useBreakpoint(scale) {
149
149
  });
150
150
  return computed(() => active.value);
151
151
  }
152
+ function atLeastQuery(scale, key) {
153
+ const width = scale[key];
154
+ return typeof width === "number" && Number.isFinite(width) && width >= 0 ? `(min-width: ${width}px)` : "not all";
155
+ }
156
+ function useBreakpointUp(scale, key) {
157
+ return useMediaQuery(() => atLeastQuery(toValue(scale), toValue(key)));
158
+ }
159
+ function useBreakpointBelow(scale, key) {
160
+ const atLeast = useBreakpointUp(scale, key);
161
+ return computed(() => !atLeast.value);
162
+ }
152
163
  export {
153
164
  DisplayMode,
154
165
  Platform,
@@ -158,6 +169,8 @@ export {
158
169
  resolveBreakpoint,
159
170
  toBreakpointQueries,
160
171
  useBreakpoint,
172
+ useBreakpointBelow,
173
+ useBreakpointUp,
161
174
  useDisplayMode,
162
175
  useHoverCapability,
163
176
  useIsInstalled,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/foundation/device/enums/PointerType.ts","../../../src/foundation/device/hooks/UsePointer.ts","../../../src/foundation/device/hooks/UseOnlineStatus.ts","../../../src/foundation/device/enums/DisplayMode.ts","../../../src/foundation/device/hooks/UseDisplayMode.ts","../../../src/foundation/device/Platform.ts","../../../src/foundation/device/hooks/UseBreakpoint.ts"],"sourcesContent":["// The pointer vocabulary, kept in its own file rather than inlined into the composable so a consumer can switch\n// on `PointerType.Coarse` without pulling Vue into a pure module — the same value/composable split\n// `foundation/shortcuts` uses for `Modifier` vs `UseHotkeys`.\n\n/** How precise the primary pointing device is, per the CSS `pointer` media feature. */\nexport const PointerType = {\n /** Low-precision primary pointer — a finger on a touchscreen, a TV remote. Size hit targets generously. */\n Coarse: 'coarse',\n /** High-precision primary pointer — a mouse, trackpad, or stylus. Hover affordances are meaningful here. */\n Fine: 'fine',\n /** No pointing device at all — keyboard- or voice-driven. Also the SSR answer, where nothing is knowable yet. */\n None: 'none',\n} as const;\n\n/** One of the {@link PointerType} values. */\nexport type PointerType = (typeof PointerType)[keyof typeof PointerType];\n","// Pointer precision and hover capability, read from the CSS `pointer` / `hover` media features through the shared\n// `useMediaQuery`.\n//\n// WHY NOT A USER-AGENT SNIFF: \"is this a touch device\" is not a device question, it is an INPUT question, and the\n// two diverge constantly. A Windows laptop with a touchscreen has both a fine mouse and a coarse finger; an iPad\n// with a Magic Keyboard reports a FINE pointer; a phone in desktop-site mode still has only a finger. A UA string\n// describes none of that, is trivially spoofed, and is frozen or deprecated on every Chromium browser. The media\n// features track the pointer the user is ACTUALLY holding and re-evaluate when it changes.\n//\n// WHY NOT `'ontouchstart' in window` AS THE PRIMARY SIGNAL: it proves the touch EVENT API is implemented, not that\n// a touchscreen is attached — every desktop Chromium build ships the API, so the check reads true on a mouse-only\n// machine and the UI grows finger-sized hit targets nobody needs. It is also a one-shot boolean with no change\n// event, so it can never react to a tablet being docked to a keyboard mid-session. `(pointer: coarse)` answers the\n// question that was actually being asked, and answers it reactively.\n\nimport { computed, type ComputedRef } from 'vue';\n\nimport { useMediaQuery } from './UseMediaQuery';\n\nimport { PointerType } from '../enums/PointerType';\n\n// `pointer` / `hover` describe the PRIMARY pointing device. The `any-pointer` / `any-hover` variants report every\n// attached device instead, which is the wrong question for layout: a touchscreen laptop matches `any-pointer:\n// coarse` while the user drives it entirely by mouse, and sizing every target for the finger they are not using\n// wastes the screen. Primary is what layout should follow.\nconst FinePointerQuery = '(pointer: fine)';\nconst CoarsePointerQuery = '(pointer: coarse)';\nconst HoverQuery = '(hover: hover)';\n\n/**\n * Reports the precision of the primary pointing device — `'fine'` (mouse, trackpad, stylus), `'coarse'` (finger),\n * or `'none'`.\n *\n * Reactive: a tablet gaining a mouse flips `'coarse'` → `'fine'` without a reload.\n *\n * Under SSR this reads `'none'` (there are no media features to read) and corrects on hydration. Treat `'none'`\n * as \"no pointer known\", not as a fact — never hide an essential affordance behind it.\n *\n * @returns The active {@link PointerType}.\n */\nexport function usePointerType(): ComputedRef<PointerType> {\n const fine = useMediaQuery(FinePointerQuery);\n const coarse = useMediaQuery(CoarsePointerQuery);\n\n // `pointer` names one primary device, so at most one of these matches in practice. `fine` is tested first so\n // that a browser reporting both resolves to the more capable pointer rather than to a coincidence of ordering.\n return computed(() => {\n if (fine.value) return PointerType.Fine;\n if (coarse.value) return PointerType.Coarse;\n return PointerType.None;\n });\n}\n\n/**\n * Whether the primary pointing device can hover — the `(hover: hover)` media feature.\n *\n * Gate hover-only affordances on this: a tooltip that opens on mouseover, a table row's hover-revealed actions. On\n * a touchscreen a hover-only control is simply unreachable and needs a tap target or an always-visible equivalent.\n *\n * Reads `false` under SSR, so hover-revealed content must never be the only path to an action.\n *\n * @returns `true` when the primary pointer can hover.\n */\nexport function useHoverCapability(): ComputedRef<boolean> {\n const hover = useMediaQuery(HoverQuery);\n return computed(() => hover.value);\n}\n","// Network reachability — or as much of it as the browser is willing to admit to.\n//\n// WHAT `navigator.onLine` ACTUALLY MEANS: it is `false` only when the browser is certain there is NO network link\n// — airplane mode, Wi-Fi off, cable unplugged. It is `true` the moment a link exists and says NOTHING beyond that.\n// A captive portal nobody has logged into, hotel Wi-Fi that has not been paid for, a dropped VPN, a DNS failure,\n// or an API that is simply down all report `true`. So `false` is trustworthy and `true` is a hint.\n//\n// USE ACCORDINGLY: explain a failure that already happened (\"you appear to be offline\"), defer a retry, pause a\n// poll. Never treat `true` as a precondition — \"we are online, so this request will succeed\" is exactly the\n// inference this value cannot support. Proving the server that matters is reachable takes a request to it, which\n// is `foundation/http`'s job and not this slice's.\n//\n// The `online` / `offline` events bind through `foundation/dom`' `useEventListener` rather than a hand-rolled\n// `addEventListener`, so handler identity, attach options, and teardown follow the same rules as every other\n// listener in the library. The target is a GETTER, not a module constant: resolving `window` at module scope\n// would evaluate during a server render, and the lazy getter is the same shape `useEventListener` uses for its\n// own default.\n\nimport { onMounted, shallowRef, type ShallowRef } from 'vue';\n\nimport { useEventListener } from '../../dom';\n\n/** Resolved lazily so importing this module in an SSR pass never touches `window`. */\nconst globalTarget = (): Window | null => (typeof window === 'undefined' ? null : window);\n\n/**\n * Reads `navigator.onLine`, defaulting to online when there is no `navigator` (SSR), when the property is missing\n * (a partial polyfill), or when the read throws. Optimistic by design — see the note on the composable.\n */\nfunction readOnlineStatus(): boolean {\n try {\n if (typeof navigator === 'undefined') return true;\n return navigator.onLine !== false;\n } catch {\n return true;\n }\n}\n\n/**\n * Tracks whether the browser believes it has a network link — seeded optimistically, synced from\n * `navigator.onLine` on mount, then kept current by the window `online` / `offline` events.\n *\n * Reads `true` under SSR and whenever the status cannot be read: an offline banner rendered by a server that has\n * never met the client is worse than a missing one, and the value corrects on mount either way. Read this file's\n * header before acting on it — `false` is reliable, `true` only means a link exists.\n *\n * @returns `true` while the browser reports a network link.\n */\nexport function useOnlineStatus(): Readonly<ShallowRef<boolean>> {\n // Seeded `true` rather than read at setup: `readOnlineStatus` answers `true` under SSR anyway, and seeding a\n // constant keeps `navigator` out of the setup pass entirely.\n const online = shallowRef(true);\n\n // Re-read once on mount. Two gaps the events alone can never close: the seed was unconditional, and the link\n // can flip between setup and the listeners attaching.\n onMounted(() => {\n online.value = readOnlineStatus();\n });\n\n useEventListener(\n 'online',\n () => {\n online.value = true;\n },\n globalTarget,\n );\n useEventListener(\n 'offline',\n () => {\n online.value = false;\n },\n globalTarget,\n );\n\n return online;\n}\n","// The display-mode vocabulary. Split from its composable for the same reason as `PointerType` — a consumer\n// comparing against `DisplayMode.Standalone` should not have to import Vue to do it.\n\n/** How the document is being presented — the values of the CSS `display-mode` media feature. */\nexport const DisplayMode = {\n /** Installed and running in its own window with no browser chrome. The usual \"is this a PWA\" answer. */\n Standalone: 'standalone',\n /** Filling the screen with no OS chrome either — kiosk displays, the Fullscreen API. */\n Fullscreen: 'fullscreen',\n /** Own window with a minimal navigation strip (back / reload). Installed, but not chrome-free. */\n MinimalUi: 'minimal-ui',\n /** An ordinary browser tab. Also the SSR answer. */\n Browser: 'browser',\n} as const;\n\n/** One of the {@link DisplayMode} values. */\nexport type DisplayMode = (typeof DisplayMode)[keyof typeof DisplayMode];\n","// Display mode — how the document is presented, and by extension whether the app was installed.\n//\n// Read entirely through `display-mode` media queries on the shared `useMediaQuery`, which makes the answer\n// reactive: a window entering or leaving fullscreen updates live, where the one-shot check at startup that most\n// codebases write would be stale for the rest of the session.\n//\n// QUERY ORDER IS LOAD-BEARING, and is not alphabetical. Browsers do not reliably report exactly one match — a\n// standalone window driven into fullscreen can satisfy both `(display-mode: fullscreen)` and\n// `(display-mode: standalone)` — so the most specific presentation is tested first and wins.\n//\n// KNOWN GAP — iOS Safari only supports `display-mode` from 16.4. On older iOS an installed home-screen app reports\n// `'browser'` here. Its legacy signal is the non-standard `navigator.standalone`, deliberately NOT read: this\n// slice keeps a single detection mechanism, and adding a second, non-reactive sniffer for one stale OS version\n// buys a narrow tail at the cost of two code paths that can disagree. A consumer that needs that tail can read\n// `navigator.standalone` itself and OR it in.\n\nimport { computed, type ComputedRef } from 'vue';\n\nimport { useMediaQuery } from './UseMediaQuery';\n\nimport { DisplayMode } from '../enums/DisplayMode';\n\nconst FullscreenQuery = '(display-mode: fullscreen)';\nconst StandaloneQuery = '(display-mode: standalone)';\nconst MinimalUiQuery = '(display-mode: minimal-ui)';\n\n/**\n * Reports how the document is being presented — its {@link DisplayMode}.\n *\n * Falls back to `'browser'` when no mode query matches, which is also what SSR and any browser without\n * `display-mode` support produce. `'browser'` therefore means \"an ordinary tab, as far as can be told\", not a\n * proof that the app is uninstalled.\n *\n * @returns The active {@link DisplayMode}.\n */\nexport function useDisplayMode(): ComputedRef<DisplayMode> {\n const fullscreen = useMediaQuery(FullscreenQuery);\n const standalone = useMediaQuery(StandaloneQuery);\n const minimalUi = useMediaQuery(MinimalUiQuery);\n\n return computed(() => {\n if (fullscreen.value) return DisplayMode.Fullscreen;\n if (standalone.value) return DisplayMode.Standalone;\n if (minimalUi.value) return DisplayMode.MinimalUi;\n return DisplayMode.Browser;\n });\n}\n\n/**\n * Whether the app is running as an installed app rather than in a browser tab — any display mode other than\n * `'browser'`.\n *\n * Reads `false` under SSR and on iOS < 16.4 (see this file's header). Use it to ADD an installed-only affordance\n * — suppressing an \"Install app\" prompt, showing a custom title bar — never to withhold functionality, because a\n * `false` here can mean \"installed, but undetectable\".\n *\n * @returns `true` when the app is presented outside an ordinary browser tab.\n */\nexport function useIsInstalled(): ComputedRef<boolean> {\n const mode = useDisplayMode();\n return computed(() => mode.value !== DisplayMode.Browser);\n}\n","// Platform identification — the LAST-RESORT signal in this slice, and the only one here that asks what the\n// environment IS rather than what it can DO.\n//\n// USE IT ONLY FOR COSMETICS: rendering `⌘K` vs `Ctrl+K` in a shortcut hint, naming a modifier in help text,\n// labelling a button \"Show in Finder\" vs \"Show in Explorer\". NEVER gate a feature on it. A user agent is freely\n// spoofed, `navigator.platform` is deprecated, Chromium freezes its UA, and every question worth gating on\n// (pointer precision, hover, display mode, viewport) has a real capability query in this slice that answers it\n// truthfully. Platform sniffing gates on a guess; a media feature gates on the fact.\n//\n// The Apple branch delegates to `foundation/shortcuts`' `isApplePlatform` rather than re-sniffing: that predicate\n// already backs `mod` → ⌘ resolution, and two sniffers that drift apart would render a ⌘ hint on a Ctrl machine.\n// This file adds the other three families around it and reuses its exact source-precedence rules.\n//\n// Ordering is load-bearing. Android is tested before Linux because Android's UA names the Linux kernel; the\n// Windows pattern is anchored on real tokens (`Windows` / `Win32` / `Win64` / `WOW64`) rather than a bare `win`,\n// which would misread `Darwin` — a substring collision that silently turns a Mac into a PC.\n\nimport { isApplePlatform } from '../shortcuts';\n\n/** The coarse OS families this slice distinguishes. */\nexport const Platform = {\n /** macOS, iOS, or iPadOS. */\n Apple: 'apple',\n /** Any Windows desktop. */\n Windows: 'windows',\n /** Android phones and tablets. */\n Android: 'android',\n /** Desktop Linux, X11, and ChromeOS — all Ctrl-keyed, all Linux-idiomatic in their affordances. */\n Linux: 'linux',\n /** Nothing recognisable — SSR, a stripped user agent, or a platform outside the four above. */\n Unknown: 'unknown',\n} as const;\n\n/** One of the {@link Platform} families. */\nexport type Platform = (typeof Platform)[keyof typeof Platform];\n\n/**\n * Reads the best available platform string, preferring the modern `userAgentData.platform` over the deprecated\n * `navigator.platform` and falling back to the full user agent. Mirrors `isApplePlatform`'s precedence exactly so\n * both predicates always judge the same text. Returns `''` under SSR or if any read throws.\n */\nfunction readPlatformSource(): string {\n try {\n if (typeof navigator === 'undefined') return '';\n const nav = navigator as Navigator & { userAgentData?: { platform?: string } };\n return nav.userAgentData?.platform || nav.platform || nav.userAgent || '';\n } catch {\n // A throwing `navigator` getter (polyfill, hardened environment) reads as \"no information\", never as a crash.\n return '';\n }\n}\n\n/**\n * Identifies the OS family. Read this file's header before using it: the answer is for cosmetic, platform-idiomatic\n * decisions only, never for feature gating.\n *\n * Never throws. Returns `'unknown'` under SSR, for an unrecognised platform, and for an empty hint.\n *\n * @param hint Forces the string that is matched, instead of reading the environment — makes tests deterministic and\n * lets a server render for a client whose platform it already knows. Accepts a full user agent, a\n * `userAgentData.platform` value, or a bare token such as `'Windows'`.\n * @returns The detected {@link Platform}.\n */\nexport function getPlatform(hint?: string): Platform {\n const source = hint ?? readPlatformSource();\n\n if (isApplePlatform(source)) return Platform.Apple;\n if (/android/i.test(source)) return Platform.Android;\n if (/windows|win32|win64|wow64/i.test(source)) return Platform.Windows;\n if (/linux|x11|cros|chrome ?os/i.test(source)) return Platform.Linux;\n return Platform.Unknown;\n}\n","import {\n computed,\n onMounted,\n onScopeDispose,\n shallowRef,\n toValue,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n} from 'vue';\nimport { subscribeMediaQuery } from './UseMediaQuery';\nimport { resolveBreakpoint, toBreakpointQueries, type BreakpointScale } from '../Breakpoints';\n\n/** Tracks every valid breakpoint in the caller's scale and releases replaced subscriptions. */\nexport function useBreakpoint<TScale extends BreakpointScale>(\n scale: MaybeRefOrGetter<TScale>,\n): ComputedRef<Extract<keyof TScale, string> | null> {\n const queries = computed(() => toBreakpointQueries(toValue(scale)));\n const active = shallowRef<Extract<keyof TScale, string> | null>(null);\n let mounted = false;\n let dispose: (() => void) | undefined;\n function subscribe(): void {\n dispose?.();\n dispose = undefined;\n if (!mounted) return;\n const current = queries.value;\n const matches: boolean[] = current.map(() => false);\n active.value = null;\n const disposers = current.map((entry, index) =>\n subscribeMediaQuery(entry.query, (value) => {\n matches[index] = value;\n active.value = resolveBreakpoint(current, matches);\n }),\n );\n dispose = () => {\n for (const unsubscribe of disposers) unsubscribe();\n };\n }\n onMounted(() => {\n mounted = true;\n subscribe();\n });\n watch(queries, subscribe);\n onScopeDispose(() => {\n mounted = false;\n dispose?.();\n });\n return computed(() => active.value);\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,cAAc;AAAA;AAAA,EAEzB,QAAQ;AAAA;AAAA,EAER,MAAM;AAAA;AAAA,EAE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IAAI;AACjB,eAAO,QAAQ,kBAAkB,SAAS,OAAO;AAAA,MACnD,CAAC;AAAA,IAAA;AAEH,cAAU,MAAM;AACd,iBAAW,eAAe,UAAW,aAAA;AAAA,IACvC;AAAA,EACF;AACA,YAAU,MAAM;AACd,cAAU;AACV,cAAA;AAAA,EACF,CAAC;AACD,QAAM,SAAS,SAAS;AACxB,iBAAe,MAAM;AACnB,cAAU;AACV,cAAA;AAAA,EACF,CAAC;AACD,SAAO,SAAS,MAAM,OAAO,KAAK;AACpC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/foundation/device/enums/PointerType.ts","../../../src/foundation/device/hooks/UsePointer.ts","../../../src/foundation/device/hooks/UseOnlineStatus.ts","../../../src/foundation/device/enums/DisplayMode.ts","../../../src/foundation/device/hooks/UseDisplayMode.ts","../../../src/foundation/device/Platform.ts","../../../src/foundation/device/hooks/UseBreakpoint.ts","../../../src/foundation/device/hooks/UseBreakpointRange.ts"],"sourcesContent":["// The pointer vocabulary, kept in its own file rather than inlined into the composable so a consumer can switch\n// on `PointerType.Coarse` without pulling Vue into a pure module — the same value/composable split\n// `foundation/shortcuts` uses for `Modifier` vs `UseHotkeys`.\n\n/** How precise the primary pointing device is, per the CSS `pointer` media feature. */\nexport const PointerType = {\n /** Low-precision primary pointer — a finger on a touchscreen, a TV remote. Size hit targets generously. */\n Coarse: 'coarse',\n /** High-precision primary pointer — a mouse, trackpad, or stylus. Hover affordances are meaningful here. */\n Fine: 'fine',\n /** No pointing device at all — keyboard- or voice-driven. Also the SSR answer, where nothing is knowable yet. */\n None: 'none',\n} as const;\n\n/** One of the {@link PointerType} values. */\nexport type PointerType = (typeof PointerType)[keyof typeof PointerType];\n","// Pointer precision and hover capability, read from the CSS `pointer` / `hover` media features through the shared\n// `useMediaQuery`.\n//\n// WHY NOT A USER-AGENT SNIFF: \"is this a touch device\" is not a device question, it is an INPUT question, and the\n// two diverge constantly. A Windows laptop with a touchscreen has both a fine mouse and a coarse finger; an iPad\n// with a Magic Keyboard reports a FINE pointer; a phone in desktop-site mode still has only a finger. A UA string\n// describes none of that, is trivially spoofed, and is frozen or deprecated on every Chromium browser. The media\n// features track the pointer the user is ACTUALLY holding and re-evaluate when it changes.\n//\n// WHY NOT `'ontouchstart' in window` AS THE PRIMARY SIGNAL: it proves the touch EVENT API is implemented, not that\n// a touchscreen is attached — every desktop Chromium build ships the API, so the check reads true on a mouse-only\n// machine and the UI grows finger-sized hit targets nobody needs. It is also a one-shot boolean with no change\n// event, so it can never react to a tablet being docked to a keyboard mid-session. `(pointer: coarse)` answers the\n// question that was actually being asked, and answers it reactively.\n\nimport { computed, type ComputedRef } from 'vue';\n\nimport { useMediaQuery } from './UseMediaQuery';\n\nimport { PointerType } from '../enums/PointerType';\n\n// `pointer` / `hover` describe the PRIMARY pointing device. The `any-pointer` / `any-hover` variants report every\n// attached device instead, which is the wrong question for layout: a touchscreen laptop matches `any-pointer:\n// coarse` while the user drives it entirely by mouse, and sizing every target for the finger they are not using\n// wastes the screen. Primary is what layout should follow.\nconst FinePointerQuery = '(pointer: fine)';\nconst CoarsePointerQuery = '(pointer: coarse)';\nconst HoverQuery = '(hover: hover)';\n\n/**\n * Reports the precision of the primary pointing device — `'fine'` (mouse, trackpad, stylus), `'coarse'` (finger),\n * or `'none'`.\n *\n * Reactive: a tablet gaining a mouse flips `'coarse'` → `'fine'` without a reload.\n *\n * Under SSR this reads `'none'` (there are no media features to read) and corrects on hydration. Treat `'none'`\n * as \"no pointer known\", not as a fact — never hide an essential affordance behind it.\n *\n * @returns The active {@link PointerType}.\n */\nexport function usePointerType(): ComputedRef<PointerType> {\n const fine = useMediaQuery(FinePointerQuery);\n const coarse = useMediaQuery(CoarsePointerQuery);\n\n // `pointer` names one primary device, so at most one of these matches in practice. `fine` is tested first so\n // that a browser reporting both resolves to the more capable pointer rather than to a coincidence of ordering.\n return computed(() => {\n if (fine.value) return PointerType.Fine;\n if (coarse.value) return PointerType.Coarse;\n return PointerType.None;\n });\n}\n\n/**\n * Whether the primary pointing device can hover — the `(hover: hover)` media feature.\n *\n * Gate hover-only affordances on this: a tooltip that opens on mouseover, a table row's hover-revealed actions. On\n * a touchscreen a hover-only control is simply unreachable and needs a tap target or an always-visible equivalent.\n *\n * Reads `false` under SSR, so hover-revealed content must never be the only path to an action.\n *\n * @returns `true` when the primary pointer can hover.\n */\nexport function useHoverCapability(): ComputedRef<boolean> {\n const hover = useMediaQuery(HoverQuery);\n return computed(() => hover.value);\n}\n","// Network reachability — or as much of it as the browser is willing to admit to.\n//\n// WHAT `navigator.onLine` ACTUALLY MEANS: it is `false` only when the browser is certain there is NO network link\n// — airplane mode, Wi-Fi off, cable unplugged. It is `true` the moment a link exists and says NOTHING beyond that.\n// A captive portal nobody has logged into, hotel Wi-Fi that has not been paid for, a dropped VPN, a DNS failure,\n// or an API that is simply down all report `true`. So `false` is trustworthy and `true` is a hint.\n//\n// USE ACCORDINGLY: explain a failure that already happened (\"you appear to be offline\"), defer a retry, pause a\n// poll. Never treat `true` as a precondition — \"we are online, so this request will succeed\" is exactly the\n// inference this value cannot support. Proving the server that matters is reachable takes a request to it, which\n// is `foundation/http`'s job and not this slice's.\n//\n// The `online` / `offline` events bind through `foundation/dom`' `useEventListener` rather than a hand-rolled\n// `addEventListener`, so handler identity, attach options, and teardown follow the same rules as every other\n// listener in the library. The target is a GETTER, not a module constant: resolving `window` at module scope\n// would evaluate during a server render, and the lazy getter is the same shape `useEventListener` uses for its\n// own default.\n\nimport { onMounted, shallowRef, type ShallowRef } from 'vue';\n\nimport { useEventListener } from '../../dom';\n\n/** Resolved lazily so importing this module in an SSR pass never touches `window`. */\nconst globalTarget = (): Window | null => (typeof window === 'undefined' ? null : window);\n\n/**\n * Reads `navigator.onLine`, defaulting to online when there is no `navigator` (SSR), when the property is missing\n * (a partial polyfill), or when the read throws. Optimistic by design — see the note on the composable.\n */\nfunction readOnlineStatus(): boolean {\n try {\n if (typeof navigator === 'undefined') return true;\n return navigator.onLine !== false;\n } catch {\n return true;\n }\n}\n\n/**\n * Tracks whether the browser believes it has a network link — seeded optimistically, synced from\n * `navigator.onLine` on mount, then kept current by the window `online` / `offline` events.\n *\n * Reads `true` under SSR and whenever the status cannot be read: an offline banner rendered by a server that has\n * never met the client is worse than a missing one, and the value corrects on mount either way. Read this file's\n * header before acting on it — `false` is reliable, `true` only means a link exists.\n *\n * @returns `true` while the browser reports a network link.\n */\nexport function useOnlineStatus(): Readonly<ShallowRef<boolean>> {\n // Seeded `true` rather than read at setup: `readOnlineStatus` answers `true` under SSR anyway, and seeding a\n // constant keeps `navigator` out of the setup pass entirely.\n const online = shallowRef(true);\n\n // Re-read once on mount. Two gaps the events alone can never close: the seed was unconditional, and the link\n // can flip between setup and the listeners attaching.\n onMounted(() => {\n online.value = readOnlineStatus();\n });\n\n useEventListener(\n 'online',\n () => {\n online.value = true;\n },\n globalTarget,\n );\n useEventListener(\n 'offline',\n () => {\n online.value = false;\n },\n globalTarget,\n );\n\n return online;\n}\n","// The display-mode vocabulary. Split from its composable for the same reason as `PointerType` — a consumer\n// comparing against `DisplayMode.Standalone` should not have to import Vue to do it.\n\n/** How the document is being presented — the values of the CSS `display-mode` media feature. */\nexport const DisplayMode = {\n /** Installed and running in its own window with no browser chrome. The usual \"is this a PWA\" answer. */\n Standalone: 'standalone',\n /** Filling the screen with no OS chrome either — kiosk displays, the Fullscreen API. */\n Fullscreen: 'fullscreen',\n /** Own window with a minimal navigation strip (back / reload). Installed, but not chrome-free. */\n MinimalUi: 'minimal-ui',\n /** An ordinary browser tab. Also the SSR answer. */\n Browser: 'browser',\n} as const;\n\n/** One of the {@link DisplayMode} values. */\nexport type DisplayMode = (typeof DisplayMode)[keyof typeof DisplayMode];\n","// Display mode — how the document is presented, and by extension whether the app was installed.\n//\n// Read entirely through `display-mode` media queries on the shared `useMediaQuery`, which makes the answer\n// reactive: a window entering or leaving fullscreen updates live, where the one-shot check at startup that most\n// codebases write would be stale for the rest of the session.\n//\n// QUERY ORDER IS LOAD-BEARING, and is not alphabetical. Browsers do not reliably report exactly one match — a\n// standalone window driven into fullscreen can satisfy both `(display-mode: fullscreen)` and\n// `(display-mode: standalone)` — so the most specific presentation is tested first and wins.\n//\n// KNOWN GAP — iOS Safari only supports `display-mode` from 16.4. On older iOS an installed home-screen app reports\n// `'browser'` here. Its legacy signal is the non-standard `navigator.standalone`, deliberately NOT read: this\n// slice keeps a single detection mechanism, and adding a second, non-reactive sniffer for one stale OS version\n// buys a narrow tail at the cost of two code paths that can disagree. A consumer that needs that tail can read\n// `navigator.standalone` itself and OR it in.\n\nimport { computed, type ComputedRef } from 'vue';\n\nimport { useMediaQuery } from './UseMediaQuery';\n\nimport { DisplayMode } from '../enums/DisplayMode';\n\nconst FullscreenQuery = '(display-mode: fullscreen)';\nconst StandaloneQuery = '(display-mode: standalone)';\nconst MinimalUiQuery = '(display-mode: minimal-ui)';\n\n/**\n * Reports how the document is being presented — its {@link DisplayMode}.\n *\n * Falls back to `'browser'` when no mode query matches, which is also what SSR and any browser without\n * `display-mode` support produce. `'browser'` therefore means \"an ordinary tab, as far as can be told\", not a\n * proof that the app is uninstalled.\n *\n * @returns The active {@link DisplayMode}.\n */\nexport function useDisplayMode(): ComputedRef<DisplayMode> {\n const fullscreen = useMediaQuery(FullscreenQuery);\n const standalone = useMediaQuery(StandaloneQuery);\n const minimalUi = useMediaQuery(MinimalUiQuery);\n\n return computed(() => {\n if (fullscreen.value) return DisplayMode.Fullscreen;\n if (standalone.value) return DisplayMode.Standalone;\n if (minimalUi.value) return DisplayMode.MinimalUi;\n return DisplayMode.Browser;\n });\n}\n\n/**\n * Whether the app is running as an installed app rather than in a browser tab — any display mode other than\n * `'browser'`.\n *\n * Reads `false` under SSR and on iOS < 16.4 (see this file's header). Use it to ADD an installed-only affordance\n * — suppressing an \"Install app\" prompt, showing a custom title bar — never to withhold functionality, because a\n * `false` here can mean \"installed, but undetectable\".\n *\n * @returns `true` when the app is presented outside an ordinary browser tab.\n */\nexport function useIsInstalled(): ComputedRef<boolean> {\n const mode = useDisplayMode();\n return computed(() => mode.value !== DisplayMode.Browser);\n}\n","// Platform identification — the LAST-RESORT signal in this slice, and the only one here that asks what the\n// environment IS rather than what it can DO.\n//\n// USE IT ONLY FOR COSMETICS: rendering `⌘K` vs `Ctrl+K` in a shortcut hint, naming a modifier in help text,\n// labelling a button \"Show in Finder\" vs \"Show in Explorer\". NEVER gate a feature on it. A user agent is freely\n// spoofed, `navigator.platform` is deprecated, Chromium freezes its UA, and every question worth gating on\n// (pointer precision, hover, display mode, viewport) has a real capability query in this slice that answers it\n// truthfully. Platform sniffing gates on a guess; a media feature gates on the fact.\n//\n// The Apple branch delegates to `foundation/shortcuts`' `isApplePlatform` rather than re-sniffing: that predicate\n// already backs `mod` → ⌘ resolution, and two sniffers that drift apart would render a ⌘ hint on a Ctrl machine.\n// This file adds the other three families around it and reuses its exact source-precedence rules.\n//\n// Ordering is load-bearing. Android is tested before Linux because Android's UA names the Linux kernel; the\n// Windows pattern is anchored on real tokens (`Windows` / `Win32` / `Win64` / `WOW64`) rather than a bare `win`,\n// which would misread `Darwin` — a substring collision that silently turns a Mac into a PC.\n\nimport { isApplePlatform } from '../shortcuts';\n\n/** The coarse OS families this slice distinguishes. */\nexport const Platform = {\n /** macOS, iOS, or iPadOS. */\n Apple: 'apple',\n /** Any Windows desktop. */\n Windows: 'windows',\n /** Android phones and tablets. */\n Android: 'android',\n /** Desktop Linux, X11, and ChromeOS — all Ctrl-keyed, all Linux-idiomatic in their affordances. */\n Linux: 'linux',\n /** Nothing recognisable — SSR, a stripped user agent, or a platform outside the four above. */\n Unknown: 'unknown',\n} as const;\n\n/** One of the {@link Platform} families. */\nexport type Platform = (typeof Platform)[keyof typeof Platform];\n\n/**\n * Reads the best available platform string, preferring the modern `userAgentData.platform` over the deprecated\n * `navigator.platform` and falling back to the full user agent. Mirrors `isApplePlatform`'s precedence exactly so\n * both predicates always judge the same text. Returns `''` under SSR or if any read throws.\n */\nfunction readPlatformSource(): string {\n try {\n if (typeof navigator === 'undefined') return '';\n const nav = navigator as Navigator & { userAgentData?: { platform?: string } };\n return nav.userAgentData?.platform || nav.platform || nav.userAgent || '';\n } catch {\n // A throwing `navigator` getter (polyfill, hardened environment) reads as \"no information\", never as a crash.\n return '';\n }\n}\n\n/**\n * Identifies the OS family. Read this file's header before using it: the answer is for cosmetic, platform-idiomatic\n * decisions only, never for feature gating.\n *\n * Never throws. Returns `'unknown'` under SSR, for an unrecognised platform, and for an empty hint.\n *\n * @param hint Forces the string that is matched, instead of reading the environment — makes tests deterministic and\n * lets a server render for a client whose platform it already knows. Accepts a full user agent, a\n * `userAgentData.platform` value, or a bare token such as `'Windows'`.\n * @returns The detected {@link Platform}.\n */\nexport function getPlatform(hint?: string): Platform {\n const source = hint ?? readPlatformSource();\n\n if (isApplePlatform(source)) return Platform.Apple;\n if (/android/i.test(source)) return Platform.Android;\n if (/windows|win32|win64|wow64/i.test(source)) return Platform.Windows;\n if (/linux|x11|cros|chrome ?os/i.test(source)) return Platform.Linux;\n return Platform.Unknown;\n}\n","import {\n computed,\n onMounted,\n onScopeDispose,\n shallowRef,\n toValue,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n} from 'vue';\nimport { subscribeMediaQuery } from './UseMediaQuery';\nimport { resolveBreakpoint, toBreakpointQueries, type BreakpointScale } from '../Breakpoints';\n\n/** Tracks every valid breakpoint in the caller's scale and releases replaced subscriptions. */\nexport function useBreakpoint<TScale extends BreakpointScale>(\n scale: MaybeRefOrGetter<TScale>,\n): ComputedRef<Extract<keyof TScale, string> | null> {\n const queries = computed(() => toBreakpointQueries(toValue(scale)));\n const active = shallowRef<Extract<keyof TScale, string> | null>(null);\n let mounted = false;\n let dispose: (() => void) | undefined;\n function subscribe(): void {\n dispose?.();\n dispose = undefined;\n if (!mounted) return;\n const current = queries.value;\n const matches: boolean[] = current.map(() => false);\n active.value = null;\n const disposers = current.map((entry, index) =>\n subscribeMediaQuery(entry.query, (value) => {\n matches[index] = value;\n active.value = resolveBreakpoint(current, matches);\n }),\n );\n dispose = () => {\n for (const unsubscribe of disposers) unsubscribe();\n };\n }\n onMounted(() => {\n mounted = true;\n subscribe();\n });\n watch(queries, subscribe);\n onScopeDispose(() => {\n mounted = false;\n dispose?.();\n });\n return computed(() => active.value);\n}\n","import { computed, toValue, type ComputedRef, type MaybeRefOrGetter, type ShallowRef } from 'vue';\nimport { useMediaQuery } from './UseMediaQuery';\nimport type { BreakpointScale } from '../Breakpoints';\n\n/** The media query for \"at least `key`\", or one that never matches when the scale holds no valid width for it. */\nfunction atLeastQuery(scale: BreakpointScale, key: string): string {\n const width = scale[key];\n return typeof width === 'number' && Number.isFinite(width) && width >= 0 ? `(min-width: ${width}px)` : 'not all';\n}\n\n/**\n * Reports whether the viewport is at least the `key` breakpoint of the caller's scale — `md` and wider for `'md'`.\n * One media query, so a layout that only asks \"desktop or not\" never tracks the whole scale.\n *\n * SSR-safe: `false` on the server and until mounted, the mobile-first base.\n * ```ts\n * const isDesktop = useBreakpointUp(TailwindBreakpoints, 'lg');\n * ```\n */\nexport function useBreakpointUp<TScale extends BreakpointScale>(\n scale: MaybeRefOrGetter<TScale>,\n key: MaybeRefOrGetter<Extract<keyof TScale, string>>,\n): Readonly<ShallowRef<boolean>> {\n return useMediaQuery(() => atLeastQuery(toValue(scale), toValue(key)));\n}\n\n/**\n * Reports whether the viewport is narrower than the `key` breakpoint of the caller's scale — a phone below `'md'`.\n *\n * SSR-safe: `true` on the server and until mounted, the mobile-first base.\n * ```ts\n * const isPhone = useBreakpointBelow(TailwindBreakpoints, 'md');\n * ```\n */\nexport function useBreakpointBelow<TScale extends BreakpointScale>(\n scale: MaybeRefOrGetter<TScale>,\n key: MaybeRefOrGetter<Extract<keyof TScale, string>>,\n): ComputedRef<boolean> {\n const atLeast = useBreakpointUp(scale, key);\n return computed(() => !atLeast.value);\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,cAAc;AAAA;AAAA,EAEzB,QAAQ;AAAA;AAAA,EAER,MAA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