@luci-dev/capture 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @luci-dev/capture
2
+
3
+ The capture engine and toolbar behind Luci's Capture mode: reads components, text, colors and spacing from a live page and writes them as design files.
4
+
5
+ This package is a part of [Luci](https://github.com/waidesign/luci-by-pawprint.design#readme), design control for AI coding agents. You do not need to install it yourself: start with the CLI, which brings it in.
6
+
7
+ ```bash
8
+ npx @luci-dev/cli@latest init
9
+ ```
10
+
11
+ See [@luci-dev/cli](https://www.npmjs.com/package/@luci-dev/cli) for setup and updating.
12
+
13
+ MIT licensed. Runs on your machine: no telemetry, no account.
@@ -230,6 +230,7 @@ var LuciCapture = (() => {
230
230
  tokenOf: () => tokenOf,
231
231
  tokensOf: () => tokensOf,
232
232
  topLevelParts: () => topLevelParts,
233
+ touchScreen: () => touchScreen,
233
234
  triggerOf: () => triggerOf,
234
235
  typographySystem: () => typographySystem2,
235
236
  uniqueParts: () => uniqueParts,
@@ -30071,6 +30072,13 @@ module.exports = {
30071
30072
  const r4 = el.getBoundingClientRect();
30072
30073
  return `${el.tagName.toLowerCase()} ${Math.round(r4.width)} \xD7 ${Math.round(r4.height)}`;
30073
30074
  }
30075
+ function touchScreen(win) {
30076
+ try {
30077
+ return win.matchMedia("(hover: none)").matches;
30078
+ } catch {
30079
+ return false;
30080
+ }
30081
+ }
30074
30082
 
30075
30083
  // packages/capture/src/ui/basket.ts
30076
30084
  function memoryBasketStore(initial = []) {
@@ -30563,7 +30571,7 @@ module.exports = {
30563
30571
  "muzzle-800": "#3B3A39",
30564
30572
  "muzzle-900": "#2B2B2B"
30565
30573
  };
30566
- var TOKENS_CSS = '/* Generated by scripts/brand-sync.mjs from brand/. Do not edit: run `pnpm brand:sync`. */\n:host, :root {\n --luci-color-ginger-50: #FEF5E8;\n --luci-color-ginger-100: #FEEBD1;\n --luci-color-ginger-200: #FCD7AA;\n --luci-color-ginger-300: #FBBE7A;\n --luci-color-ginger-400: #F6A24F;\n --luci-color-ginger-500: #EC862B;\n --luci-color-ginger-600: #D86D1D;\n --luci-color-ginger-700: #AD4F1A;\n --luci-color-ginger-800: #893D1B;\n --luci-color-ginger-900: #652D18;\n --luci-color-ginger-950: #451F12;\n --luci-color-collar-lime-100: #EAF5C7;\n --luci-color-collar-lime-300: #CBE66D;\n --luci-color-collar-lime-500: #B4D43C;\n --luci-color-collar-lime-700: #547617;\n --luci-color-nose-pink-100: #FFE4E1;\n --luci-color-nose-pink-300: #F5B9B4;\n --luci-color-nose-pink-500: #E79993;\n --luci-color-nose-pink-700: #AB5050;\n --luci-color-iris-gold-100: #F7F0CA;\n --luci-color-iris-gold-300: #E6D17A;\n --luci-color-iris-gold-500: #CBB042;\n --luci-color-iris-gold-700: #7B6813;\n --luci-color-success-100: #DFF3D5;\n --luci-color-success-700: #3F7932;\n --luci-color-warning-100: #FEEDC9;\n --luci-color-warning-700: #975F03;\n --luci-color-danger-100: #FFE3DF;\n --luci-color-danger-700: #C5372F;\n --luci-color-info-100: #D9F0F3;\n --luci-color-info-700: #1E767F;\n --luci-color-muzzle-0: #FDF9F6;\n --luci-color-muzzle-50: #F5EFEA;\n --luci-color-muzzle-100: #EBE5E0;\n --luci-color-muzzle-200: #DBD4CF;\n --luci-color-muzzle-300: #C2BCB8;\n --luci-color-muzzle-400: #A29D99;\n --luci-color-muzzle-500: #837F7C;\n --luci-color-muzzle-600: #656360;\n --luci-color-muzzle-700: #4F4D4B;\n --luci-color-muzzle-800: #3B3A39;\n --luci-color-muzzle-900: #2B2B2B;\n --luci-radius-sm: 8px;\n --luci-radius-md: 12px;\n --luci-radius-lg: 16px;\n --luci-radius-xl: 24px;\n --luci-radius-full: 9999px;\n --luci-space-4: 4px;\n --luci-space-8: 8px;\n --luci-space-12: 12px;\n --luci-space-16: 16px;\n --luci-space-20: 20px;\n --luci-space-24: 24px;\n --luci-space-32: 32px;\n --luci-space-40: 40px;\n --luci-space-48: 48px;\n --luci-space-64: 64px;\n --luci-space-80: 80px;\n --luci-font-display: "Luci Fredoka", Fredoka, "Luci Inter", Inter, sans-serif;\n --luci-font-body: "Luci Inter", Inter, system-ui, sans-serif;\n --luci-font-code: "Luci JetBrains Mono", \'JetBrains Mono\', ui-monospace, monospace;\n --luci-type-display-size: 40px;\n --luci-type-display-line: 44px;\n --luci-type-display-weight: 600;\n --luci-type-title-size: 24px;\n --luci-type-title-line: 30px;\n --luci-type-title-weight: 600;\n --luci-type-heading-size: 17px;\n --luci-type-heading-line: 24px;\n --luci-type-heading-weight: 600;\n --luci-type-body-size: 15px;\n --luci-type-body-line: 22px;\n --luci-type-body-weight: 400;\n --luci-type-small-size: 13px;\n --luci-type-small-line: 18px;\n --luci-type-small-weight: 500;\n --luci-type-micro-size: 12px;\n --luci-type-micro-line: 16px;\n --luci-type-micro-weight: 600;\n --luci-type-code-size: 13px;\n --luci-type-code-line: 20px;\n --luci-type-code-weight: 500;\n --luci-shadow-float: 0 8px 24px rgba(43, 43, 43, 0.14);\n --luci-motion-fast: 150ms ease-out;\n --luci-motion-base: 200ms ease-out;\n --luci-motion-exit: 150ms ease-in;\n --luci-size-touch-target: 44px;\n --luci-size-toolbar-button: 48px;\n --luci-size-toolbar-icon: 22px;\n --luci-size-mascot-min: 96px;\n --luci-size-toast-face: 48px;\n --luci-color-surface: var(--luci-color-muzzle-50);\n --luci-color-surface-raised: var(--luci-color-muzzle-0);\n --luci-color-surface-sunken: var(--luci-color-muzzle-100);\n --luci-color-ink: var(--luci-color-muzzle-900);\n --luci-color-ink-secondary: var(--luci-color-muzzle-600);\n --luci-color-ink-disabled: var(--luci-color-muzzle-400);\n --luci-color-primary: var(--luci-color-ginger-500);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-600);\n --luci-color-primary-soft: var(--luci-color-ginger-100);\n --luci-color-link: var(--luci-color-ginger-700);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-100);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-900) 6%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-900) 12%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-200);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-900) 24%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-900);\n --luci-color-bar: var(--luci-color-muzzle-900);\n --luci-color-bar-ink: var(--luci-color-muzzle-50);\n --luci-color-bar-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-bar-hover: var(--luci-color-muzzle-700);\n --luci-color-bar-stroke: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-tool-active: var(--luci-color-ginger-400);\n --luci-color-on-tool-active: var(--luci-color-muzzle-900);\n --luci-color-pick: var(--luci-color-ginger-500);\n --luci-color-pick-fill: color-mix(in srgb, var(--luci-color-ginger-500) 14%, transparent);\n --luci-color-pick-blocked: var(--luci-color-danger-700);\n --luci-color-pick-blocked-fill: color-mix(in srgb, var(--luci-color-muzzle-500) 35%, transparent);\n --luci-color-pad-fill: color-mix(in srgb, var(--luci-color-collar-lime-500) 35%, transparent);\n --luci-color-margin-fill: color-mix(in srgb, var(--luci-color-ginger-300) 35%, transparent);\n --luci-color-insert: var(--luci-color-nose-pink-500);\n --luci-color-insert-fill: color-mix(in srgb, var(--luci-color-nose-pink-500) 16%, transparent);\n --luci-color-insert-ink: var(--luci-color-nose-pink-100);\n}\n@media (prefers-color-scheme: dark) {\n .luci-theme:not([data-theme="light"]) {\n --luci-color-surface: var(--luci-color-muzzle-900);\n --luci-color-surface-raised: var(--luci-color-muzzle-800);\n --luci-color-surface-sunken: var(--luci-color-muzzle-800);\n --luci-color-ink: var(--luci-color-muzzle-50);\n --luci-color-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-ink-disabled: var(--luci-color-muzzle-500);\n --luci-color-primary: var(--luci-color-ginger-400);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-300);\n --luci-color-primary-soft: color-mix(in srgb, var(--luci-color-ginger-400) 18%, transparent);\n --luci-color-link: var(--luci-color-ginger-300);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-700);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-50) 8%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-700);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-50) 28%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-50);\n }\n}\n.luci-theme[data-theme="dark"] {\n --luci-color-surface: var(--luci-color-muzzle-900);\n --luci-color-surface-raised: var(--luci-color-muzzle-800);\n --luci-color-surface-sunken: var(--luci-color-muzzle-800);\n --luci-color-ink: var(--luci-color-muzzle-50);\n --luci-color-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-ink-disabled: var(--luci-color-muzzle-500);\n --luci-color-primary: var(--luci-color-ginger-400);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-300);\n --luci-color-primary-soft: color-mix(in srgb, var(--luci-color-ginger-400) 18%, transparent);\n --luci-color-link: var(--luci-color-ginger-300);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-700);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-50) 8%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-700);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-50) 28%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-50);\n}\n';
30574
+ var TOKENS_CSS = '/* Generated by scripts/brand-sync.mjs from brand/. Do not edit: run `pnpm brand:sync`. */\n:host, :root {\n --luci-color-ginger-50: #FEF5E8;\n --luci-color-ginger-100: #FEEBD1;\n --luci-color-ginger-200: #FCD7AA;\n --luci-color-ginger-300: #FBBE7A;\n --luci-color-ginger-400: #F6A24F;\n --luci-color-ginger-500: #EC862B;\n --luci-color-ginger-600: #D86D1D;\n --luci-color-ginger-700: #AD4F1A;\n --luci-color-ginger-800: #893D1B;\n --luci-color-ginger-900: #652D18;\n --luci-color-ginger-950: #451F12;\n --luci-color-collar-lime-100: #EAF5C7;\n --luci-color-collar-lime-300: #CBE66D;\n --luci-color-collar-lime-500: #B4D43C;\n --luci-color-collar-lime-700: #547617;\n --luci-color-nose-pink-100: #FFE4E1;\n --luci-color-nose-pink-300: #F5B9B4;\n --luci-color-nose-pink-500: #E79993;\n --luci-color-nose-pink-700: #AB5050;\n --luci-color-iris-gold-100: #F7F0CA;\n --luci-color-iris-gold-300: #E6D17A;\n --luci-color-iris-gold-500: #CBB042;\n --luci-color-iris-gold-700: #7B6813;\n --luci-color-success-100: #DFF3D5;\n --luci-color-success-700: #3F7932;\n --luci-color-warning-100: #FEEDC9;\n --luci-color-warning-700: #975F03;\n --luci-color-danger-100: #FFE3DF;\n --luci-color-danger-700: #C5372F;\n --luci-color-info-100: #D9F0F3;\n --luci-color-info-700: #1E767F;\n --luci-color-muzzle-0: #FDF9F6;\n --luci-color-muzzle-50: #F5EFEA;\n --luci-color-muzzle-100: #EBE5E0;\n --luci-color-muzzle-200: #DBD4CF;\n --luci-color-muzzle-300: #C2BCB8;\n --luci-color-muzzle-400: #A29D99;\n --luci-color-muzzle-500: #837F7C;\n --luci-color-muzzle-600: #656360;\n --luci-color-muzzle-700: #4F4D4B;\n --luci-color-muzzle-800: #3B3A39;\n --luci-color-muzzle-900: #2B2B2B;\n --luci-radius-sm: 8px;\n --luci-radius-md: 12px;\n --luci-radius-lg: 16px;\n --luci-radius-xl: 24px;\n --luci-radius-full: 9999px;\n --luci-space-4: 4px;\n --luci-space-8: 8px;\n --luci-space-12: 12px;\n --luci-space-16: 16px;\n --luci-space-20: 20px;\n --luci-space-24: 24px;\n --luci-space-32: 32px;\n --luci-space-40: 40px;\n --luci-space-48: 48px;\n --luci-space-64: 64px;\n --luci-space-80: 80px;\n --luci-font-display: "Luci Fredoka", Fredoka, "Luci Inter", Inter, sans-serif;\n --luci-font-body: "Luci Inter", Inter, system-ui, sans-serif;\n --luci-font-code: "Luci JetBrains Mono", \'JetBrains Mono\', ui-monospace, monospace;\n --luci-type-display-size: 40px;\n --luci-type-display-line: 44px;\n --luci-type-display-weight: 600;\n --luci-type-title-size: 24px;\n --luci-type-title-line: 30px;\n --luci-type-title-weight: 600;\n --luci-type-heading-size: 17px;\n --luci-type-heading-line: 24px;\n --luci-type-heading-weight: 600;\n --luci-type-body-size: 15px;\n --luci-type-body-line: 22px;\n --luci-type-body-weight: 400;\n --luci-type-small-size: 13px;\n --luci-type-small-line: 18px;\n --luci-type-small-weight: 500;\n --luci-type-micro-size: 12px;\n --luci-type-micro-line: 16px;\n --luci-type-micro-weight: 600;\n --luci-type-code-size: 13px;\n --luci-type-code-line: 20px;\n --luci-type-code-weight: 500;\n --luci-shadow-float: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.28);\n --luci-shadow-edge: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.05);\n --luci-motion-fast: 150ms ease-out;\n --luci-motion-base: 200ms ease-out;\n --luci-motion-exit: 150ms ease-in;\n --luci-size-touch-target: 44px;\n --luci-size-toolbar-button: 48px;\n --luci-size-toolbar-icon: 22px;\n --luci-size-mascot-min: 96px;\n --luci-size-toast-face: 48px;\n --luci-color-surface: var(--luci-color-muzzle-50);\n --luci-color-surface-raised: var(--luci-color-muzzle-0);\n --luci-color-surface-sunken: var(--luci-color-muzzle-100);\n --luci-color-ink: var(--luci-color-muzzle-900);\n --luci-color-ink-secondary: var(--luci-color-muzzle-600);\n --luci-color-ink-disabled: var(--luci-color-muzzle-400);\n --luci-color-primary: var(--luci-color-ginger-500);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-600);\n --luci-color-primary-soft: var(--luci-color-ginger-100);\n --luci-color-link: var(--luci-color-ginger-700);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-100);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-900) 6%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-900) 12%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-200);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-900) 24%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-900);\n --luci-color-bar: var(--luci-color-muzzle-900);\n --luci-color-bar-ink: var(--luci-color-muzzle-50);\n --luci-color-bar-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-bar-hover: var(--luci-color-muzzle-700);\n --luci-color-bar-stroke: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-tool-active: var(--luci-color-ginger-400);\n --luci-color-on-tool-active: var(--luci-color-muzzle-900);\n --luci-color-pick: var(--luci-color-ginger-500);\n --luci-color-pick-fill: color-mix(in srgb, var(--luci-color-ginger-500) 14%, transparent);\n --luci-color-pick-blocked: var(--luci-color-danger-700);\n --luci-color-pick-blocked-fill: color-mix(in srgb, var(--luci-color-muzzle-500) 35%, transparent);\n --luci-color-pad-fill: color-mix(in srgb, var(--luci-color-collar-lime-500) 35%, transparent);\n --luci-color-margin-fill: color-mix(in srgb, var(--luci-color-ginger-300) 35%, transparent);\n --luci-color-insert: var(--luci-color-nose-pink-500);\n --luci-color-insert-fill: color-mix(in srgb, var(--luci-color-nose-pink-500) 16%, transparent);\n --luci-color-insert-ink: var(--luci-color-nose-pink-100);\n}\n@media (prefers-color-scheme: dark) {\n .luci-theme:not([data-theme="light"]) {\n --luci-color-surface: var(--luci-color-muzzle-900);\n --luci-color-surface-raised: var(--luci-color-muzzle-800);\n --luci-color-surface-sunken: var(--luci-color-muzzle-800);\n --luci-color-ink: var(--luci-color-muzzle-50);\n --luci-color-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-ink-disabled: var(--luci-color-muzzle-500);\n --luci-color-primary: var(--luci-color-ginger-400);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-300);\n --luci-color-primary-soft: color-mix(in srgb, var(--luci-color-ginger-400) 18%, transparent);\n --luci-color-link: var(--luci-color-ginger-300);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-700);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-50) 8%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-700);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-50) 28%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-50);\n }\n}\n.luci-theme[data-theme="dark"] {\n --luci-color-surface: var(--luci-color-muzzle-900);\n --luci-color-surface-raised: var(--luci-color-muzzle-800);\n --luci-color-surface-sunken: var(--luci-color-muzzle-800);\n --luci-color-ink: var(--luci-color-muzzle-50);\n --luci-color-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-ink-disabled: var(--luci-color-muzzle-500);\n --luci-color-primary: var(--luci-color-ginger-400);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-300);\n --luci-color-primary-soft: color-mix(in srgb, var(--luci-color-ginger-400) 18%, transparent);\n --luci-color-link: var(--luci-color-ginger-300);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-700);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-50) 8%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-700);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-50) 28%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-50);\n}\n';
30567
30575
 
30568
30576
  // packages/ui/dist/mascot/art.js
30569
30577
  var POSE_SVG = {
@@ -31216,7 +31224,7 @@ module.exports = {
31216
31224
  }
31217
31225
 
31218
31226
  // packages/ui/dist/about.js
31219
- var LUCI_VERSION = "0.5.5";
31227
+ var LUCI_VERSION = "0.5.6";
31220
31228
  var LUCI_REPO_URL = "https://github.com/waidesign/luci-by-pawprint.design";
31221
31229
 
31222
31230
  // packages/ui/dist/copy.js
@@ -31319,6 +31327,13 @@ module.exports = {
31319
31327
  color: var(--luci-color-ink);
31320
31328
  -webkit-font-smoothing: antialiased;
31321
31329
  }
31330
+ /*
31331
+ * Elevation for cards floating over the page: the float shadow, plus the faint inner edge on Charcoal
31332
+ * (the dark theme's cards), so they stay apart from a dark host page of the same colour.
31333
+ */
31334
+ .luci-theme { --luci-elevation: var(--luci-shadow-float); --luci-elevation-bar: var(--luci-shadow-edge), var(--luci-shadow-float); }
31335
+ @media (prefers-color-scheme: dark) { .luci-theme:not([data-theme="light"]) { --luci-elevation: var(--luci-shadow-edge), var(--luci-shadow-float); } }
31336
+ .luci-theme[data-theme="dark"] { --luci-elevation: var(--luci-shadow-edge), var(--luci-shadow-float); }
31322
31337
  .luci-theme *, .luci-theme *::before, .luci-theme *::after { box-sizing: border-box; }
31323
31338
  .luci-theme :where(button, input, select, textarea) { font: inherit; color: inherit; }
31324
31339
  .luci-theme :where(code, kbd, pre, samp) { font-family: var(--luci-font-code); }
@@ -31440,7 +31455,7 @@ module.exports = {
31440
31455
  .status-msg .status-title { margin: 0; color: var(--status); font-size: var(--luci-type-heading-size); line-height: var(--luci-type-heading-line); font-weight: var(--luci-type-heading-weight); }
31441
31456
  .status-msg .status-detail { margin: 0; }
31442
31457
  .status-msg .mascot { width: 48px; }
31443
- .toast { position: fixed; z-index: 2147483647; box-shadow: var(--luci-shadow-float); }
31458
+ .toast { position: fixed; z-index: 2147483647; box-shadow: var(--luci-elevation); }
31444
31459
 
31445
31460
  /* Card and panel */
31446
31461
  .card { padding: var(--luci-space-24); border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-xl); background: var(--luci-color-surface-raised); }
@@ -31491,6 +31506,12 @@ module.exports = {
31491
31506
  .luci-theme [data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transform: translate(-50%, 0);
31492
31507
  transition: opacity var(--luci-motion-base) 300ms, transform var(--luci-motion-base) 300ms; }
31493
31508
 
31509
+ /*
31510
+ * Touch screens have no hover: a tapped button would keep its tooltip until the next tap elsewhere, over
31511
+ * the bar and its cards. There they show for keyboard focus only.
31512
+ */
31513
+ @media (hover: none) { .luci-theme [data-tip]:hover:not(:focus-visible)::after { opacity: 0; transition: none; } }
31514
+
31494
31515
  /* Left-aligned tooltips (first button in rows, cards, or explicit data-tip-align="left") open rightwards to prevent clipping inside cards/panels */
31495
31516
  .luci-theme [data-tip][data-tip-align="left"]::after,
31496
31517
  .luci-theme .panel .actions > [data-tip]:first-child::after,
@@ -31664,7 +31685,8 @@ ${UI_CSS}
31664
31685
  border-radius: 32px;
31665
31686
  background: var(--luci-color-bar);
31666
31687
  color: var(--luci-color-bar-ink);
31667
- box-shadow: var(--luci-shadow-float);
31688
+ /* Charcoal in both themes, so always with the inner edge: it stays apart from a dark page */
31689
+ box-shadow: var(--luci-elevation-bar);
31668
31690
  }
31669
31691
  /* Above the cards, so the tools' tooltips are never under a card */
31670
31692
  .shell > .bar { position: relative; z-index: 2; }
@@ -31709,6 +31731,7 @@ ${UI_CSS}
31709
31731
  .luci-theme .bar .basket-pill[aria-pressed="true"],
31710
31732
  .luci-theme .bar .basket-pill[aria-pressed="true"]:hover:not(:disabled),
31711
31733
  .luci-theme .bar button.basket-pill[aria-pressed="true"]:hover:not(:disabled) { background: var(--luci-color-collar-lime-300); color: var(--luci-color-on-accent); }
31734
+ .bar .basket-n { display: none; }
31712
31735
  .brand { display: inline-flex; align-items: center; gap: var(--luci-space-8); padding: 0 var(--luci-space-8) 0 0;
31713
31736
  font: var(--luci-type-display-weight) var(--luci-type-heading-size)/1 var(--luci-font-display); color: var(--luci-color-bar-ink); }
31714
31737
  /* The dev toolbar's mode switch, on Charcoal */
@@ -31723,7 +31746,8 @@ ${UI_CSS}
31723
31746
  * --luci-y its distances from that corner's edges (default bottom right, 12 px, by its button; the
31724
31747
  * person can drag it anywhere). Everything opens from the bar, on the side with room: cards just above
31725
31748
  * a bar in the bottom half, just below one in the top half, aligned to its side. A panel takes the
31726
- * hint's place while it is open. The extension sets none of this (its bar keeps its own place).
31749
+ * hint's place while it is open. --luci-bar-h is the bar's measured height (it can wrap), so a card
31750
+ * never opens under it. The extension sets none of this (its bar keeps its own place).
31727
31751
  */
31728
31752
  :host([data-h="right"]) :is(.shell, .bar:not(.shell > .bar), .sub:not(.shell > .sub), .panel:not(.shell > .panel), .menu) { left: auto; right: var(--luci-x, 12px); }
31729
31753
  :host([data-h="left"]) :is(.shell, .bar:not(.shell > .bar), .sub:not(.shell > .sub), .panel:not(.shell > .panel), .menu) { right: auto; left: var(--luci-x, 12px); }
@@ -31731,14 +31755,14 @@ ${UI_CSS}
31731
31755
  :host([data-h="left"]) .shell { align-items: flex-start; }
31732
31756
  :host([data-v="bottom"]) :is(.shell, .bar:not(.shell > .bar)) { top: auto; bottom: var(--luci-y, 12px); }
31733
31757
  :host([data-v="bottom"]) .shell { flex-direction: column-reverse; }
31734
- :host([data-v="bottom"]) :is(.sub:not(.shell > .sub), .panel:not(.shell > .panel)) { top: auto; bottom: calc(var(--luci-y, 12px) + 72px); }
31735
- :host([data-v="bottom"]) .menu { top: auto; bottom: calc(var(--luci-y, 12px) + 64px); }
31758
+ :host([data-v="bottom"]) :is(.sub:not(.shell > .sub), .panel:not(.shell > .panel)) { top: auto; bottom: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px) + 8px); }
31759
+ :host([data-v="bottom"]) .menu { top: auto; bottom: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px)); }
31736
31760
  :host([data-v="top"]) :is(.shell, .bar:not(.shell > .bar)) { bottom: auto; top: var(--luci-y, 12px); }
31737
- :host([data-v="top"]) :is(.sub:not(.shell > .sub), .panel:not(.shell > .panel)) { bottom: auto; top: calc(var(--luci-y, 12px) + 72px); }
31738
- :host([data-v="top"]) .menu { bottom: auto; top: calc(var(--luci-y, 12px) + 64px); }
31761
+ :host([data-v="top"]) :is(.sub:not(.shell > .sub), .panel:not(.shell > .panel)) { bottom: auto; top: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px) + 8px); }
31762
+ :host([data-v="top"]) .menu { bottom: auto; top: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px)); }
31739
31763
  :host([data-v]) .shell { max-height: calc(100vh - var(--luci-y, 12px) - 12px); }
31740
- :host([data-v]) .panel:not(.shell > .panel) { max-height: min(72vh, calc(100vh - var(--luci-y, 12px) - 96px)); }
31741
- :host([data-v]) .layout-panel:not(.shell > .panel) { max-height: min(80vh, calc(100vh - var(--luci-y, 12px) - 96px)); }
31764
+ :host([data-v]) .panel:not(.shell > .panel) { max-height: min(72vh, calc(100vh - var(--luci-y, 12px) - var(--luci-bar-h, 64px) - 32px)); }
31765
+ :host([data-v]) .layout-panel:not(.shell > .panel) { max-height: min(80vh, calc(100vh - var(--luci-y, 12px) - var(--luci-bar-h, 64px) - 32px)); }
31742
31766
  :host([data-v]) .luci-theme:has(> .panel) > .sub:not([role="alert"]) { display: none; }
31743
31767
  :host([data-v="bottom"]) :is(.sub, .panel, .menu) { animation: luci-rise var(--luci-motion-base, 200ms) both; }
31744
31768
  :host([data-v="top"]) :is(.sub, .panel, .menu) { animation: luci-drop var(--luci-motion-base, 200ms) both; }
@@ -31756,13 +31780,44 @@ ${UI_CSS}
31756
31780
  :host([data-v]) .bar button, :host([data-v]) .bar .menu-btn { cursor: pointer; }
31757
31781
  :host([data-moving]) .bar, :host([data-moving]) .bar * { cursor: grabbing; user-select: none; }
31758
31782
  /* New page's canvas covers the window: its tools and its panel keep clear of the bar */
31759
- :host([data-v="bottom"]) .wf { padding-bottom: calc(var(--luci-y, 12px) + 76px); }
31783
+ :host([data-v="bottom"]) .wf { padding-bottom: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px) + 12px); }
31760
31784
  :host([data-v="bottom"]) .wf-tools { padding-top: var(--luci-space-12); }
31761
- :host([data-v="top"]) .wf-tools { padding-top: calc(var(--luci-y, 12px) + 76px); }
31785
+ :host([data-v="top"]) .wf-tools { padding-top: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px) + 12px); }
31762
31786
  :host([data-v="top"]) .panel[data-part="sketch-panel"]:not(.shell > .panel) { top: auto; bottom: var(--luci-space-12); }
31763
31787
 
31788
+ /*
31789
+ * Phones and narrow windows (dev toolbar): the bar spans the window's width in two planned rows instead
31790
+ * of wrapping wherever it runs out of room. Row 1: Luci, the mode switch, Close. Row 2: the mode's tools,
31791
+ * spread evenly at the 44 px touch target. The first separator is the line break. Cards open full width
31792
+ * from the bar, above it (or below a bar dragged to the top).
31793
+ */
31794
+ @media (max-width: 639px) {
31795
+ :host([data-v]) :is(.shell, .bar:not(.shell > .bar), .sub:not(.shell > .sub), .panel:not(.shell > .panel), .menu) { left: 8px; right: 8px; }
31796
+ :host([data-v]) :is(.sub:not(.shell > .sub), .panel:not(.shell > .panel)) { width: auto; }
31797
+ :host([data-v]) .shell { align-items: stretch; max-width: none; }
31798
+ :host([data-v]) .shell > :is(.sub, .panel) { width: auto; }
31799
+ :host([data-v]) .bar { justify-content: space-between; row-gap: var(--luci-space-4); column-gap: 0; padding: 6px; border-radius: var(--luci-radius-xl); max-width: none; }
31800
+ :host([data-v]) .bar > * { order: 3; }
31801
+ :host([data-v]) .bar > :is(.menu-btn, .modes) { order: 0; }
31802
+ :host([data-v]) .bar > [data-action="close"] { order: 1; }
31803
+ :host([data-v]) .bar > .modes + .bar-sep { order: 2; flex-basis: 100%; width: 0; height: 0; margin: 0; background: none; }
31804
+ :host([data-v]) .bar > .bar-sep:not(.modes + .bar-sep) { display: none; }
31805
+ :host([data-v]) .bar .modes { flex: 1 1 auto; margin: 0 var(--luci-space-4); }
31806
+ :host([data-v]) .bar .modes button { flex: 1 1 0; padding-inline: var(--luci-space-8); }
31807
+ :host([data-v]) .luci-theme .bar :is(.tool, .split .caret) { --luci-btn-h: 44px; }
31808
+ /* Where notes go, as its dot only (the words stay as its label) */
31809
+ :host([data-v]) .bar .conn { width: 28px; height: 44px; justify-content: center; padding: 0; font-size: 0; }
31810
+ :host([data-v]) .bar .conn::before { width: 10px; height: 10px; }
31811
+ /* Layout's inspector leaves the top of the page in view, where the selected element can be */
31812
+ :host([data-v]) .layout-panel:not(.shell > .panel) { max-height: min(45vh, calc(100vh - var(--luci-y, 12px) - var(--luci-bar-h, 64px) - 32px)); }
31813
+ /* The basket as its icon and count (its label still says "Basket, n items") */
31814
+ :host([data-v]) .luci-theme .bar .basket-pill { gap: var(--luci-space-4); padding: 0 var(--luci-space-12) 0 var(--luci-space-8); }
31815
+ :host([data-v]) .bar .basket-full { display: none; }
31816
+ :host([data-v]) .bar .basket-n { display: inline; }
31817
+ }
31818
+
31764
31819
  /* Cards under the pill: the hint while picking, and every panel (radius-xl, float shadow, no stroke) */
31765
- .sub, .panel { background: var(--luci-color-surface); border-radius: var(--luci-radius-xl); box-shadow: var(--luci-shadow-float); }
31820
+ .sub, .panel { background: var(--luci-color-surface); border-radius: var(--luci-radius-xl); box-shadow: var(--luci-elevation); }
31766
31821
  .sub {
31767
31822
  position: fixed;
31768
31823
  top: 84px;
@@ -31824,6 +31879,8 @@ ${UI_CSS}
31824
31879
  /* The first-run greeting */
31825
31880
  .greet { flex-direction: row; align-items: center; gap: var(--luci-space-16); }
31826
31881
  .greet .t-title { margin: 0; }
31882
+ /* The words wrap beside Luci on a narrow window (panels keep their children's size otherwise) */
31883
+ .greet > .stack { flex-shrink: 1; min-width: 0; }
31827
31884
 
31828
31885
  /* Segmented control */
31829
31886
  .seg { display: inline-flex; align-self: flex-start; gap: var(--luci-space-4); padding: var(--luci-space-4); background: var(--luci-color-surface-sunken); border-radius: var(--luci-radius-full); }
@@ -31880,6 +31937,8 @@ label { display: inline-flex; gap: var(--luci-space-4); align-items: center; col
31880
31937
 
31881
31938
  /* Page overlays while picking: drawn over the host page, never part of it */
31882
31939
  .pick-layer, .pixel-layer { position: fixed; inset: 0; z-index: 2147483640; cursor: crosshair; background: transparent; touch-action: none; }
31940
+ /* Picking an element by touch takes taps, not drags: the page still scrolls and zooms under the finger */
31941
+ .pick-layer { touch-action: pan-x pan-y pinch-zoom; }
31883
31942
  .highlight { position: fixed; z-index: 2147483646; pointer-events: none; border: 2px solid var(--luci-color-pick); background: var(--luci-color-pick-fill); border-radius: 2px; }
31884
31943
  .highlight.locked { border-width: 2px; border-style: solid; }
31885
31944
  .highlight.blocked { border-color: var(--luci-color-pick-blocked); background: var(--luci-color-pick-blocked-fill); }
@@ -31888,7 +31947,7 @@ label { display: inline-flex; gap: var(--luci-space-4); align-items: center; col
31888
31947
  @media (prefers-reduced-motion: no-preference) { .highlight { transition: top 60ms, left 60ms, width 60ms, height 60ms; } }
31889
31948
  /* The label and the pixel swatch read like tooltips: Charcoal fill, Muzzle White text */
31890
31949
  .label, .swatch { position: fixed; z-index: 2147483647; pointer-events: none; padding: var(--luci-space-4) var(--luci-space-8); border-radius: var(--luci-radius-md);
31891
- background: var(--luci-color-muzzle-900); color: var(--luci-color-muzzle-50); box-shadow: var(--luci-shadow-float);
31950
+ background: var(--luci-color-muzzle-900); color: var(--luci-color-muzzle-50); box-shadow: var(--luci-elevation-bar);
31892
31951
  font: var(--luci-type-code-weight) 12px/1.4 var(--luci-font-code); }
31893
31952
  .label { max-width: 360px; white-space: pre-wrap; }
31894
31953
  .label .reason { display: block; color: var(--luci-color-nose-pink-300); font-family: var(--luci-font-body); }
@@ -33872,13 +33931,18 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
33872
33931
  area2.scrollBy(e6.deltaX, e6.deltaY);
33873
33932
  }
33874
33933
  };
33875
- const pickUp = (x3, y3) => {
33934
+ const pickUp = (x3, y3, touch = false) => {
33876
33935
  {
33877
33936
  const target = elementAt(doc, x3, y3);
33878
33937
  const start = drag.current;
33879
33938
  drag.current = null;
33880
33939
  if (!target || !start || !tool) return;
33881
33940
  const moved = Math.hypot(x3 - start.x, y3 - start.y) > DRAG_PX;
33941
+ if (touch && !moved && target !== candidateRef.current) {
33942
+ trail.current = [];
33943
+ aim(target);
33944
+ return;
33945
+ }
33882
33946
  if (tool === "spacing" && moved && target !== start.el) {
33883
33947
  const blocked = [start.el, target].map(eligibilityOf).find((x4) => x4.status !== "allowed");
33884
33948
  if (blocked) {
@@ -34541,7 +34605,8 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34541
34605
  onClick: toggleBasket,
34542
34606
  children: [
34543
34607
  /* @__PURE__ */ u2(Icon2, { icon: ShoppingBasket }),
34544
- COPY.capture.basket(basket.length)
34608
+ /* @__PURE__ */ u2("span", { class: "basket-full", children: COPY.capture.basket(basket.length) }),
34609
+ /* @__PURE__ */ u2("span", { class: "basket-n", children: basket.length })
34545
34610
  ]
34546
34611
  }
34547
34612
  ),
@@ -35014,7 +35079,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
35014
35079
  ),
35015
35080
  /* @__PURE__ */ u2("button", { type: "button", class: "btn-secondary", "data-action": "choose-image", disabled: imageBusy, onClick: () => imageInput.current?.click(), children: "Choose an image" })
35016
35081
  ] }),
35017
- /* @__PURE__ */ u2("p", { class: "keys", children: pixelMode || imageMode ? "Esc: back to Element" : "\u2191 \u2193 after clicking: wider or narrower \xB7 Esc: stop" })
35082
+ /* @__PURE__ */ u2("p", { class: "keys", children: pixelMode || imageMode ? "Esc: back to Element" : touchScreen(win) ? "Tap once to see an element, again to take it" : "\u2191 \u2193 after clicking: wider or narrower \xB7 Esc: stop" })
35018
35083
  ] })
35019
35084
  ]
35020
35085
  }
@@ -35387,7 +35452,9 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
35387
35452
  {
35388
35453
  class: "pick-layer",
35389
35454
  "data-part": "pick-layer",
35390
- onPointerMove: (e6) => pickMove(e6.clientX, e6.clientY),
35455
+ onPointerMove: (e6) => {
35456
+ if (e6.pointerType !== "touch") pickMove(e6.clientX, e6.clientY);
35457
+ },
35391
35458
  onPointerDown: (e6) => {
35392
35459
  e6.preventDefault();
35393
35460
  e6.currentTarget.setPointerCapture?.(e6.pointerId);
@@ -35395,7 +35462,10 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
35395
35462
  },
35396
35463
  onPointerUp: (e6) => {
35397
35464
  e6.preventDefault();
35398
- pickUp(e6.clientX, e6.clientY);
35465
+ pickUp(e6.clientX, e6.clientY, e6.pointerType === "touch");
35466
+ },
35467
+ onPointerCancel: () => {
35468
+ drag.current = null;
35399
35469
  },
35400
35470
  onWheel: (e6) => pickWheel(e6),
35401
35471
  onContextMenu: (e6) => e6.preventDefault()
@@ -19,4 +19,9 @@ export declare function firstChildOf(el: Element): Element | null;
19
19
  export declare function eligibilityOf(el: Element): Eligibility;
20
20
  /** "h1 640 × 56" for the hover label. */
21
21
  export declare function hoverLabel(el: Element): string;
22
+ /**
23
+ * A touch screen: no hover, so nothing shows what a tap would pick. There picking takes two taps, one to
24
+ * show the element (outline and name) and one on the same element to pick it; the page still scrolls.
25
+ */
26
+ export declare function touchScreen(win: Window): boolean;
22
27
  //# sourceMappingURL=picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"picker.d.ts","sourceRoot":"","sources":["../../src/ui/picker.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGlE,4FAA4F;AAC5F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAKnD;AAED,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI,CAKxD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAa7E;AAED,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAS7F;AAED,uFAAuF;AACvF,wBAAgB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIpD;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,E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/dist/ui/picker.js CHANGED
@@ -70,4 +70,16 @@ export function hoverLabel(el) {
70
70
  const r = el.getBoundingClientRect();
71
71
  return `${el.tagName.toLowerCase()} ${Math.round(r.width)} × ${Math.round(r.height)}`;
72
72
  }
73
+ /**
74
+ * A touch screen: no hover, so nothing shows what a tap would pick. There picking takes two taps, one to
75
+ * show the element (outline and name) and one on the same element to pick it; the page still scrolls.
76
+ */
77
+ export function touchScreen(win) {
78
+ try {
79
+ return win.matchMedia('(hover: none)').matches;
80
+ }
81
+ catch {
82
+ return false;
83
+ }
84
+ }
73
85
  //# sourceMappingURL=picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"picker.js","sourceRoot":"","sources":["../../src/ui/picker.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAAE,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,4FAA4F;AAC5F,MAAM,UAAU,QAAQ,CAAC,IAAiB;IACxC,KAAK,IAAI,CAAC,GAAgB,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QACvF,IAAI,CAAC,YAAY,OAAO,IAAI,CAAC,CAAC,YAAY,CAAC,iBAAiB,CAAC;YAAE,OAAO,IAAI,CAAC;IAC7E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,WAAW,CAAC,KAAY;IACtC,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAClC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,YAAY,OAAO,IAAI,CAAC,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3F,MAAM,KAAK,GAAG,I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