@luci-dev/capture 0.5.5 → 0.5.8

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Lucas
3
+ Copyright (c) 2026 Lucas (Pawprint Design)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md ADDED
@@ -0,0 +1,15 @@
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
+ npm install -g @luci-dev/cli
9
+ luci init
10
+ luci serve
11
+ ```
12
+
13
+ See [@luci-dev/cli](https://www.npmjs.com/package/@luci-dev/cli) for setup and updating.
14
+
15
+ 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,
@@ -26659,6 +26660,10 @@ ${external_exports.prettifyError(meta3.error)}`);
26659
26660
  var TAILWIND_V3_FILE_NAME = "tailwind.config.js";
26660
26661
  var hex5 = (v3) => formatColor(v3, { colors: "hex" });
26661
26662
  var slug3 = (text) => text.toLowerCase().replace(/^--/, "").replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "token";
26663
+ var keyIn = (group, hint) => {
26664
+ const key2 = slug3(hint);
26665
+ return key2.startsWith(`${group}-`) && key2.length > group.length + 1 ? key2.slice(group.length + 1) : key2;
26666
+ };
26662
26667
  var px2 = (v3) => {
26663
26668
  const n2 = pxValue(v3);
26664
26669
  return n2 === null ? v3 : `${Math.round(n2 * 100) / 100}px`;
@@ -26696,7 +26701,7 @@ ${external_exports.prettifyError(meta3.error)}`);
26696
26701
  if (v3.toLowerCase() === val.toLowerCase())
26697
26702
  return;
26698
26703
  }
26699
- const k6 = freeKey2(tokens2.colors, slug3(keyHint));
26704
+ const k6 = freeKey2(tokens2.colors, keyIn("color", keyHint));
26700
26705
  tokens2.colors.set(k6, val);
26701
26706
  };
26702
26707
  const addSpace2 = (rawVal, keyHint) => {
@@ -26708,7 +26713,7 @@ ${external_exports.prettifyError(meta3.error)}`);
26708
26713
  return;
26709
26714
  }
26710
26715
  const num4 = pxValue(val);
26711
- const k6 = keyHint ? slug3(keyHint) : num4 !== null ? String(num4) : freeKey2(tokens2.spacing, "space");
26716
+ const k6 = keyHint ? keyIn("spacing", keyHint) : num4 !== null ? String(num4) : freeKey2(tokens2.spacing, "space");
26712
26717
  tokens2.spacing.set(freeKey2(tokens2.spacing, k6), val);
26713
26718
  };
26714
26719
  const addRadius = (rawVal, keyHint) => {
@@ -26720,7 +26725,7 @@ ${external_exports.prettifyError(meta3.error)}`);
26720
26725
  return;
26721
26726
  }
26722
26727
  const num4 = pxValue(val);
26723
- let hint = keyHint ? slug3(keyHint) : num4 !== null ? `${num4}px` : "radius";
26728
+ let hint = keyHint ? keyIn("radius", keyHint) : num4 !== null ? `${num4}px` : "radius";
26724
26729
  if (num4 && num4 >= 999)
26725
26730
  hint = "full";
26726
26731
  tokens2.radii.set(freeKey2(tokens2.radii, hint), val);
@@ -26836,7 +26841,7 @@ ${external_exports.prettifyError(meta3.error)}`);
26836
26841
  function formatCssVariables(captures, options = {}) {
26837
26842
  const t3 = extractTokens(captures);
26838
26843
  const lines = [];
26839
- lines.push("/* Generated by Luci (https://github.com/luci-ai/luci) */");
26844
+ lines.push("/* Generated by Luci (https://github.com/waidesign/luci-by-pawprint.design) */");
26840
26845
  if (options.name)
26841
26846
  lines.push(`/* Design System: ${options.name} */`);
26842
26847
  if (t3.sources.size)
@@ -26899,7 +26904,7 @@ ${external_exports.prettifyError(meta3.error)}`);
26899
26904
  function formatTailwind(captures, options = {}) {
26900
26905
  const t3 = extractTokens(captures);
26901
26906
  const lines = [];
26902
- lines.push("/* Generated by Luci (https://github.com/luci-ai/luci) */");
26907
+ lines.push("/* Generated by Luci (https://github.com/waidesign/luci-by-pawprint.design) */");
26903
26908
  if (options.name)
26904
26909
  lines.push(`/* Tailwind v4 Theme: ${options.name} */`);
26905
26910
  if (t3.sources.size)
@@ -26980,7 +26985,7 @@ module.exports = {
26980
26985
  };
26981
26986
  `;
26982
26987
  const header = [
26983
- "/* Generated by Luci (https://github.com/luci-ai/luci) */",
26988
+ "/* Generated by Luci (https://github.com/waidesign/luci-by-pawprint.design) */",
26984
26989
  options.name ? `/* Tailwind v3 Config: ${options.name} */` : null,
26985
26990
  t3.sources.size ? `/* Sources: ${Array.from(t3.sources).join(", ")} */` : null,
26986
26991
  ""
@@ -30071,6 +30076,13 @@ module.exports = {
30071
30076
  const r4 = el.getBoundingClientRect();
30072
30077
  return `${el.tagName.toLowerCase()} ${Math.round(r4.width)} \xD7 ${Math.round(r4.height)}`;
30073
30078
  }
30079
+ function touchScreen(win) {
30080
+ try {
30081
+ return win.matchMedia("(hover: none)").matches;
30082
+ } catch {
30083
+ return false;
30084
+ }
30085
+ }
30074
30086
 
30075
30087
  // packages/capture/src/ui/basket.ts
30076
30088
  function memoryBasketStore(initial = []) {
@@ -30563,7 +30575,7 @@ module.exports = {
30563
30575
  "muzzle-800": "#3B3A39",
30564
30576
  "muzzle-900": "#2B2B2B"
30565
30577
  };
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';
30578
+ 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
30579
 
30568
30580
  // packages/ui/dist/mascot/art.js
30569
30581
  var POSE_SVG = {
@@ -31216,7 +31228,7 @@ module.exports = {
31216
31228
  }
31217
31229
 
31218
31230
  // packages/ui/dist/about.js
31219
- var LUCI_VERSION = "0.5.5";
31231
+ var LUCI_VERSION = "0.5.8";
31220
31232
  var LUCI_REPO_URL = "https://github.com/waidesign/luci-by-pawprint.design";
31221
31233
 
31222
31234
  // packages/ui/dist/copy.js
@@ -31232,7 +31244,7 @@ module.exports = {
31232
31244
  help: "How it works"
31233
31245
  },
31234
31246
  capture: {
31235
- title: "DESIGN.md Extractor",
31247
+ title: "Capture",
31236
31248
  byline: "by Luci",
31237
31249
  description: "Pick anything on a page. Get a design file your agent can build from.",
31238
31250
  devTitle: "Luci",
@@ -31307,7 +31319,7 @@ module.exports = {
31307
31319
  // packages/ui/dist/styles.js
31308
31320
  var BASE_CSS = `
31309
31321
  .luci-theme {
31310
- /* Buttons: md is 40 px with 15 px labels (DESIGN.md section 6); a compact surface sets sm as its default */
31322
+ /* Buttons: md is 40 px with 15 px labels (the brand kit, section 6); a compact surface sets sm as its default */
31311
31323
  --luci-btn-h: 40px;
31312
31324
  --luci-btn-font: 15px;
31313
31325
  --luci-btn-line: 20px;
@@ -31319,6 +31331,13 @@ module.exports = {
31319
31331
  color: var(--luci-color-ink);
31320
31332
  -webkit-font-smoothing: antialiased;
31321
31333
  }
31334
+ /*
31335
+ * Elevation for cards floating over the page: the float shadow, plus the faint inner edge on Charcoal
31336
+ * (the dark theme's cards), so they stay apart from a dark host page of the same colour.
31337
+ */
31338
+ .luci-theme { --luci-elevation: var(--luci-shadow-float); --luci-elevation-bar: var(--luci-shadow-edge), var(--luci-shadow-float); }
31339
+ @media (prefers-color-scheme: dark) { .luci-theme:not([data-theme="light"]) { --luci-elevation: var(--luci-shadow-edge), var(--luci-shadow-float); } }
31340
+ .luci-theme[data-theme="dark"] { --luci-elevation: var(--luci-shadow-edge), var(--luci-shadow-float); }
31322
31341
  .luci-theme *, .luci-theme *::before, .luci-theme *::after { box-sizing: border-box; }
31323
31342
  .luci-theme :where(button, input, select, textarea) { font: inherit; color: inherit; }
31324
31343
  .luci-theme :where(code, kbd, pre, samp) { font-family: var(--luci-font-code); }
@@ -31350,7 +31369,7 @@ module.exports = {
31350
31369
  `;
31351
31370
  var COMPONENTS_CSS = `
31352
31371
  /*
31353
- * Button (DESIGN.md section 6). Variants: btn-primary, btn-secondary, btn-outline, btn-ghost (also a
31372
+ * Button (the brand kit, section 6). Variants: btn-primary, btn-secondary, btn-outline, btn-ghost (also a
31354
31373
  * bare button), btn-danger, btn-link; btn-icon for icon-only (square, round). Sizes: btn-sm 32,
31355
31374
  * btn-md 40, btn-lg 48 (default: the surface's). States: hover, :active (pressed), :focus-visible,
31356
31375
  * :disabled, aria-pressed="true" (toggled on), aria-busy="true" (working).
@@ -31440,7 +31459,7 @@ module.exports = {
31440
31459
  .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
31460
  .status-msg .status-detail { margin: 0; }
31442
31461
  .status-msg .mascot { width: 48px; }
31443
- .toast { position: fixed; z-index: 2147483647; box-shadow: var(--luci-shadow-float); }
31462
+ .toast { position: fixed; z-index: 2147483647; box-shadow: var(--luci-elevation); }
31444
31463
 
31445
31464
  /* Card and panel */
31446
31465
  .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 +31510,12 @@ module.exports = {
31491
31510
  .luci-theme [data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transform: translate(-50%, 0);
31492
31511
  transition: opacity var(--luci-motion-base) 300ms, transform var(--luci-motion-base) 300ms; }
31493
31512
 
31513
+ /*
31514
+ * Touch screens have no hover: a tapped button would keep its tooltip until the next tap elsewhere, over
31515
+ * the bar and its cards. There they show for keyboard focus only.
31516
+ */
31517
+ @media (hover: none) { .luci-theme [data-tip]:hover:not(:focus-visible)::after { opacity: 0; transition: none; } }
31518
+
31494
31519
  /* Left-aligned tooltips (first button in rows, cards, or explicit data-tip-align="left") open rightwards to prevent clipping inside cards/panels */
31495
31520
  .luci-theme [data-tip][data-tip-align="left"]::after,
31496
31521
  .luci-theme .panel .actions > [data-tip]:first-child::after,
@@ -31648,7 +31673,7 @@ ${UI_CSS}
31648
31673
  .luci-theme[data-dock="left"] .sub,
31649
31674
  .luci-theme[data-dock="left"] .panel { right: auto; left: var(--luci-space-12); }
31650
31675
 
31651
- /* The toolbar pill (DESIGN.md, On-page toolbar): Charcoal in both themes, float shadow, no stroke */
31676
+ /* The toolbar pill (the brand kit, On-page toolbar): Charcoal in both themes, float shadow, no stroke */
31652
31677
  .bar {
31653
31678
  --luci-color-focus: var(--luci-color-muzzle-50);
31654
31679
  position: fixed;
@@ -31664,7 +31689,8 @@ ${UI_CSS}
31664
31689
  border-radius: 32px;
31665
31690
  background: var(--luci-color-bar);
31666
31691
  color: var(--luci-color-bar-ink);
31667
- box-shadow: var(--luci-shadow-float);
31692
+ /* Charcoal in both themes, so always with the inner edge: it stays apart from a dark page */
31693
+ box-shadow: var(--luci-elevation-bar);
31668
31694
  }
31669
31695
  /* Above the cards, so the tools' tooltips are never under a card */
31670
31696
  .shell > .bar { position: relative; z-index: 2; }
@@ -31709,6 +31735,7 @@ ${UI_CSS}
31709
31735
  .luci-theme .bar .basket-pill[aria-pressed="true"],
31710
31736
  .luci-theme .bar .basket-pill[aria-pressed="true"]:hover:not(:disabled),
31711
31737
  .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); }
31738
+ .bar .basket-n { display: none; }
31712
31739
  .brand { display: inline-flex; align-items: center; gap: var(--luci-space-8); padding: 0 var(--luci-space-8) 0 0;
31713
31740
  font: var(--luci-type-display-weight) var(--luci-type-heading-size)/1 var(--luci-font-display); color: var(--luci-color-bar-ink); }
31714
31741
  /* The dev toolbar's mode switch, on Charcoal */
@@ -31723,7 +31750,8 @@ ${UI_CSS}
31723
31750
  * --luci-y its distances from that corner's edges (default bottom right, 12 px, by its button; the
31724
31751
  * person can drag it anywhere). Everything opens from the bar, on the side with room: cards just above
31725
31752
  * 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).
31753
+ * hint's place while it is open. --luci-bar-h is the bar's measured height (it can wrap), so a card
31754
+ * never opens under it. The extension sets none of this (its bar keeps its own place).
31727
31755
  */
31728
31756
  :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
31757
  :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 +31759,14 @@ ${UI_CSS}
31731
31759
  :host([data-h="left"]) .shell { align-items: flex-start; }
31732
31760
  :host([data-v="bottom"]) :is(.shell, .bar:not(.shell > .bar)) { top: auto; bottom: var(--luci-y, 12px); }
31733
31761
  :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); }
31762
+ :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); }
31763
+ :host([data-v="bottom"]) .menu { top: auto; bottom: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px)); }
31736
31764
  :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); }
31765
+ :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); }
31766
+ :host([data-v="top"]) .menu { bottom: auto; top: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px)); }
31739
31767
  :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)); }
31768
+ :host([data-v]) .panel:not(.shell > .panel) { max-height: min(72vh, calc(100vh - var(--luci-y, 12px) - var(--luci-bar-h, 64px) - 32px)); }
31769
+ :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
31770
  :host([data-v]) .luci-theme:has(> .panel) > .sub:not([role="alert"]) { display: none; }
31743
31771
  :host([data-v="bottom"]) :is(.sub, .panel, .menu) { animation: luci-rise var(--luci-motion-base, 200ms) both; }
31744
31772
  :host([data-v="top"]) :is(.sub, .panel, .menu) { animation: luci-drop var(--luci-motion-base, 200ms) both; }
@@ -31756,13 +31784,44 @@ ${UI_CSS}
31756
31784
  :host([data-v]) .bar button, :host([data-v]) .bar .menu-btn { cursor: pointer; }
31757
31785
  :host([data-moving]) .bar, :host([data-moving]) .bar * { cursor: grabbing; user-select: none; }
31758
31786
  /* 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); }
31787
+ :host([data-v="bottom"]) .wf { padding-bottom: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px) + 12px); }
31760
31788
  :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); }
31789
+ :host([data-v="top"]) .wf-tools { padding-top: calc(var(--luci-y, 12px) + var(--luci-bar-h, 64px) + 12px); }
31762
31790
  :host([data-v="top"]) .panel[data-part="sketch-panel"]:not(.shell > .panel) { top: auto; bottom: var(--luci-space-12); }
31763
31791
 
31792
+ /*
31793
+ * Phones and narrow windows (dev toolbar): the bar spans the window's width in two planned rows instead
31794
+ * of wrapping wherever it runs out of room. Row 1: Luci, the mode switch, Close. Row 2: the mode's tools,
31795
+ * spread evenly at the 44 px touch target. The first separator is the line break. Cards open full width
31796
+ * from the bar, above it (or below a bar dragged to the top).
31797
+ */
31798
+ @media (max-width: 639px) {
31799
+ :host([data-v]) :is(.shell, .bar:not(.shell > .bar), .sub:not(.shell > .sub), .panel:not(.shell > .panel), .menu) { left: 8px; right: 8px; }
31800
+ :host([data-v]) :is(.sub:not(.shell > .sub), .panel:not(.shell > .panel)) { width: auto; }
31801
+ :host([data-v]) .shell { align-items: stretch; max-width: none; }
31802
+ :host([data-v]) .shell > :is(.sub, .panel) { width: auto; }
31803
+ :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; }
31804
+ :host([data-v]) .bar > * { order: 3; }
31805
+ :host([data-v]) .bar > :is(.menu-btn, .modes) { order: 0; }
31806
+ :host([data-v]) .bar > [data-action="close"] { order: 1; }
31807
+ :host([data-v]) .bar > .modes + .bar-sep { order: 2; flex-basis: 100%; width: 0; height: 0; margin: 0; background: none; }
31808
+ :host([data-v]) .bar > .bar-sep:not(.modes + .bar-sep) { display: none; }
31809
+ :host([data-v]) .bar .modes { flex: 1 1 auto; margin: 0 var(--luci-space-4); }
31810
+ :host([data-v]) .bar .modes button { flex: 1 1 0; padding-inline: var(--luci-space-8); }
31811
+ :host([data-v]) .luci-theme .bar :is(.tool, .split .caret) { --luci-btn-h: 44px; }
31812
+ /* Where notes go, as its dot only (the words stay as its label) */
31813
+ :host([data-v]) .bar .conn { width: 28px; height: 44px; justify-content: center; padding: 0; font-size: 0; }
31814
+ :host([data-v]) .bar .conn::before { width: 10px; height: 10px; }
31815
+ /* Layout's inspector leaves the top of the page in view, where the selected element can be */
31816
+ :host([data-v]) .layout-panel:not(.shell > .panel) { max-height: min(45vh, calc(100vh - var(--luci-y, 12px) - var(--luci-bar-h, 64px) - 32px)); }
31817
+ /* The basket as its icon and count (its label still says "Basket, n items") */
31818
+ :host([data-v]) .luci-theme .bar .basket-pill { gap: var(--luci-space-4); padding: 0 var(--luci-space-12) 0 var(--luci-space-8); }
31819
+ :host([data-v]) .bar .basket-full { display: none; }
31820
+ :host([data-v]) .bar .basket-n { display: inline; }
31821
+ }
31822
+
31764
31823
  /* 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); }
31824
+ .sub, .panel { background: var(--luci-color-surface); border-radius: var(--luci-radius-xl); box-shadow: var(--luci-elevation); }
31766
31825
  .sub {
31767
31826
  position: fixed;
31768
31827
  top: 84px;
@@ -31824,6 +31883,8 @@ ${UI_CSS}
31824
31883
  /* The first-run greeting */
31825
31884
  .greet { flex-direction: row; align-items: center; gap: var(--luci-space-16); }
31826
31885
  .greet .t-title { margin: 0; }
31886
+ /* The words wrap beside Luci on a narrow window (panels keep their children's size otherwise) */
31887
+ .greet > .stack { flex-shrink: 1; min-width: 0; }
31827
31888
 
31828
31889
  /* Segmented control */
31829
31890
  .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 +31941,8 @@ label { display: inline-flex; gap: var(--luci-space-4); align-items: center; col
31880
31941
 
31881
31942
  /* Page overlays while picking: drawn over the host page, never part of it */
31882
31943
  .pick-layer, .pixel-layer { position: fixed; inset: 0; z-index: 2147483640; cursor: crosshair; background: transparent; touch-action: none; }
31944
+ /* Picking an element by touch takes taps, not drags: the page still scrolls and zooms under the finger */
31945
+ .pick-layer { touch-action: pan-x pan-y pinch-zoom; }
31883
31946
  .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
31947
  .highlight.locked { border-width: 2px; border-style: solid; }
31885
31948
  .highlight.blocked { border-color: var(--luci-color-pick-blocked); background: var(--luci-color-pick-blocked-fill); }
@@ -31888,7 +31951,7 @@ label { display: inline-flex; gap: var(--luci-space-4); align-items: center; col
31888
31951
  @media (prefers-reduced-motion: no-preference) { .highlight { transition: top 60ms, left 60ms, width 60ms, height 60ms; } }
31889
31952
  /* The label and the pixel swatch read like tooltips: Charcoal fill, Muzzle White text */
31890
31953
  .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);
31954
+ background: var(--luci-color-muzzle-900); color: var(--luci-color-muzzle-50); box-shadow: var(--luci-elevation-bar);
31892
31955
  font: var(--luci-type-code-weight) 12px/1.4 var(--luci-font-code); }
31893
31956
  .label { max-width: 360px; white-space: pre-wrap; }
31894
31957
  .label .reason { display: block; color: var(--luci-color-nose-pink-300); font-family: var(--luci-font-body); }
@@ -32465,10 +32528,14 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
32465
32528
  const [debuggerGranted, setDebuggerGranted] = d2(false);
32466
32529
  h2(() => {
32467
32530
  if (props.debuggerPermission?.get) {
32468
- void props.debuggerPermission.get().then(setDebuggerGranted);
32531
+ void props.debuggerPermission.get().then(setDebuggerGranted, () => setDebuggerGranted(false));
32469
32532
  }
32470
32533
  }, []);
32471
32534
  const useDebugger = capSettings.useDebugger ?? true;
32535
+ const openDebuggerHelp = () => {
32536
+ if (props.onHelp) props.onHelp("debugger-permission");
32537
+ else props.debuggerPermission?.request?.();
32538
+ };
32472
32539
  return /* @__PURE__ */ u2("div", { class: "panel", role: "dialog", "aria-label": "Settings", "data-part": "settings", children: [
32473
32540
  /* @__PURE__ */ u2("div", { class: "settings-head", children: [
32474
32541
  /* @__PURE__ */ u2("div", { class: "row", style: { alignItems: "center", gap: "8px" }, children: /* @__PURE__ */ u2("h2", { children: "Settings" }) }),
@@ -32723,33 +32790,23 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
32723
32790
  /* @__PURE__ */ u2("div", { class: "project-header", children: [
32724
32791
  /* @__PURE__ */ u2("span", { class: `status-dot ${debuggerGranted && useDebugger ? "online" : "offline"}`, "aria-hidden": "true" }),
32725
32792
  /* @__PURE__ */ u2("div", { class: "project-info", children: [
32726
- /* @__PURE__ */ u2("span", { class: "project-name", children: debuggerGranted ? useDebugger ? "Debugger: active" : "Debugger: disabled" : "Debugger: optional (not enabled)" }),
32727
- /* @__PURE__ */ u2("span", { class: "project-hint dim", children: debuggerGranted ? useDebugger ? "Briefly attaches only during captures for exact CDP states" : "CSS rules & hidden frames active. Debugger will never be attached." : "CSS rules & frame fallback active" })
32793
+ /* @__PURE__ */ u2("span", { class: "project-name", children: debuggerGranted ? useDebugger ? "Debugger: on" : "Debugger: off" : "Debugger: not available" }),
32794
+ /* @__PURE__ */ u2("span", { class: "project-hint dim", children: debuggerGranted ? useDebugger ? "Luci uses it during a capture for exact states and widths, then detaches it" : "Luci never attaches it: states come from stylesheet rules, widths from a hidden frame" : "Chrome is not letting Luci use it: states come from stylesheet rules, widths from a hidden frame" })
32728
32795
  ] })
32729
32796
  ] }),
32730
- /* @__PURE__ */ u2("div", { class: "project-port-row", children: debuggerGranted ? /* @__PURE__ */ u2(
32731
- "button",
32732
- {
32733
- type: "button",
32734
- class: "btn-secondary",
32735
- "data-action": "toggle-debugger",
32736
- onClick: () => updateCapSettings({ ...capSettings, useDebugger: !useDebugger }),
32737
- children: useDebugger ? "Disable debugger" : "Enable debugger"
32738
- }
32739
- ) : /* @__PURE__ */ u2(
32740
- "button",
32741
- {
32742
- type: "button",
32743
- class: "btn-secondary",
32744
- "data-action": "enable-debugger",
32745
- onClick: () => {
32746
- if (props.debuggerPermission?.request) {
32747
- props.debuggerPermission.request();
32748
- }
32749
- },
32750
- children: "Enable in Help"
32751
- }
32752
- ) })
32797
+ /* @__PURE__ */ u2("div", { class: "project-port-row", children: [
32798
+ debuggerGranted && /* @__PURE__ */ u2(
32799
+ "button",
32800
+ {
32801
+ type: "button",
32802
+ class: "btn-secondary",
32803
+ "data-action": "toggle-debugger",
32804
+ onClick: () => updateCapSettings({ ...capSettings, useDebugger: !useDebugger }),
32805
+ children: useDebugger ? "Don't use the debugger" : "Use the debugger"
32806
+ }
32807
+ ),
32808
+ /* @__PURE__ */ u2("button", { type: "button", class: "btn-secondary", "data-action": "debugger-help", onClick: openDebuggerHelp, children: "About the debugger" })
32809
+ ] })
32753
32810
  ] }),
32754
32811
  /* @__PURE__ */ u2("hr", { class: "settings-divider" }),
32755
32812
  /* @__PURE__ */ u2("div", { class: "stack", children: [
@@ -33243,7 +33300,10 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
33243
33300
  "Saving\u2026"
33244
33301
  ] }) : label }),
33245
33302
  state.done && /* @__PURE__ */ u2("span", { class: "dim", "data-part": "saved", children: state.done }),
33246
- state.error && /* @__PURE__ */ u2("span", { class: "error", "data-part": "save-error", children: state.error })
33303
+ state.error && /* @__PURE__ */ u2(S, { children: [
33304
+ /* @__PURE__ */ u2("span", { class: "error", "data-part": "save-error", children: state.error }),
33305
+ props.onDownload && /* @__PURE__ */ u2("button", { type: "button", class: "btn-secondary", "data-action": "download-fallback", onClick: props.onDownload, children: "Download file instead" })
33306
+ ] })
33247
33307
  ] });
33248
33308
  }
33249
33309
  function RuleButton(props) {
@@ -33872,13 +33932,18 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
33872
33932
  area2.scrollBy(e6.deltaX, e6.deltaY);
33873
33933
  }
33874
33934
  };
33875
- const pickUp = (x3, y3) => {
33935
+ const pickUp = (x3, y3, touch = false) => {
33876
33936
  {
33877
33937
  const target = elementAt(doc, x3, y3);
33878
33938
  const start = drag.current;
33879
33939
  drag.current = null;
33880
33940
  if (!target || !start || !tool) return;
33881
33941
  const moved = Math.hypot(x3 - start.x, y3 - start.y) > DRAG_PX;
33942
+ if (touch && !moved && target !== candidateRef.current) {
33943
+ trail.current = [];
33944
+ aim(target);
33945
+ return;
33946
+ }
33882
33947
  if (tool === "spacing" && moved && target !== start.el) {
33883
33948
  const blocked = [start.el, target].map(eligibilityOf).find((x4) => x4.status !== "allowed");
33884
33949
  if (blocked) {
@@ -34138,6 +34203,10 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34138
34203
  if (!props.debuggerPermission) return;
34139
34204
  props.debuggerPermission.get().then(setDebuggerGranted).catch(() => setDebuggerGranted(false));
34140
34205
  }, [props.debuggerPermission, settingsOpen]);
34206
+ const openDebuggerHelp = () => {
34207
+ if (props.onHelp) props.onHelp("debugger-permission");
34208
+ else props.debuggerPermission?.request?.();
34209
+ };
34141
34210
  const [itemSent, setItemSent] = d2({});
34142
34211
  const [basketSending, setBasketSending] = d2(false);
34143
34212
  const [basketStatus, setBasketStatus] = d2(null);
@@ -34152,7 +34221,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34152
34221
  } catch (err) {
34153
34222
  const msg = err instanceof Error ? err.message : String(err);
34154
34223
  setItemSent((prev) => ({ ...prev, [item.id]: { error: msg } }));
34155
- setBasketStatus({ text: msg, error: true });
34224
+ setBasketStatus({ text: msg, error: true, download: () => downloadText(fileName, markdown2) });
34156
34225
  }
34157
34226
  };
34158
34227
  const sendAllToProject = async () => {
@@ -34169,7 +34238,8 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34169
34238
  const target = activeProject?.name ? `${activeProject.name}/.luci/design/` : ".luci/design/";
34170
34239
  setBasketStatus({ text: `Saved ${saved} capture${saved === 1 ? "" : "s"} into ${target}.` });
34171
34240
  } catch (err) {
34172
- setBasketStatus({ text: err instanceof Error ? err.message : String(err), error: true });
34241
+ const all = exportBasket(basket, settings);
34242
+ setBasketStatus({ text: err instanceof Error ? err.message : String(err), error: true, download: () => downloadText(all.fileName, all.markdown) });
34173
34243
  } finally {
34174
34244
  setBasketSending(false);
34175
34245
  }
@@ -34541,7 +34611,8 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34541
34611
  onClick: toggleBasket,
34542
34612
  children: [
34543
34613
  /* @__PURE__ */ u2(Icon2, { icon: ShoppingBasket }),
34544
- COPY.capture.basket(basket.length)
34614
+ /* @__PURE__ */ u2("span", { class: "basket-full", children: COPY.capture.basket(basket.length) }),
34615
+ /* @__PURE__ */ u2("span", { class: "basket-n", children: basket.length })
34545
34616
  ]
34546
34617
  }
34547
34618
  ),
@@ -34573,7 +34644,8 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34573
34644
  store: props.store,
34574
34645
  captureSettings: settings,
34575
34646
  onCaptureSettingsChange: changeSettings,
34576
- debuggerPermission: props.debuggerPermission
34647
+ debuggerPermission: props.debuggerPermission,
34648
+ ...props.onHelp ? { onHelp: props.onHelp } : {}
34577
34649
  }
34578
34650
  ) : /* @__PURE__ */ u2("div", { class: "panel", role: "dialog", "aria-label": COPY.common.menu, "data-part": "settings", children: [
34579
34651
  /* @__PURE__ */ u2("div", { class: "menu-head", children: [
@@ -34630,35 +34702,23 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34630
34702
  /* @__PURE__ */ u2("div", { class: "project-header", children: [
34631
34703
  /* @__PURE__ */ u2("span", { class: `status-dot ${debuggerGranted && useDebugger ? "online" : "offline"}`, "aria-hidden": "true" }),
34632
34704
  /* @__PURE__ */ u2("div", { class: "project-info", children: [
34633
- /* @__PURE__ */ u2("span", { class: "project-name", children: debuggerGranted ? useDebugger ? "Debugger: active" : "Debugger: disabled" : "Debugger: optional (not enabled)" }),
34634
- /* @__PURE__ */ u2("span", { class: "project-hint dim", children: debuggerGranted ? useDebugger ? "Briefly attaches only during captures for exact CDP states" : "CSS rules & hidden frames active. Debugger will never be attached." : "CSS rules & frame fallback active" })
34705
+ /* @__PURE__ */ u2("span", { class: "project-name", children: debuggerGranted ? useDebugger ? "Debugger: on" : "Debugger: off" : "Debugger: not available" }),
34706
+ /* @__PURE__ */ u2("span", { class: "project-hint dim", children: debuggerGranted ? useDebugger ? "Luci uses it during a capture for exact states and widths, then detaches it" : "Luci never attaches it: states come from stylesheet rules, widths from a hidden frame" : "Chrome is not letting Luci use it: states come from stylesheet rules, widths from a hidden frame" })
34635
34707
  ] })
34636
34708
  ] }),
34637
- /* @__PURE__ */ u2("div", { class: "project-port-row", children: debuggerGranted ? /* @__PURE__ */ u2(
34638
- "button",
34639
- {
34640
- type: "button",
34641
- class: "btn-secondary",
34642
- "data-action": "toggle-debugger",
34643
- onClick: () => changeSettings({ ...settings, useDebugger: !useDebugger }),
34644
- children: useDebugger ? "Disable debugger" : "Enable debugger"
34645
- }
34646
- ) : /* @__PURE__ */ u2(
34647
- "button",
34648
- {
34649
- type: "button",
34650
- class: "btn-secondary",
34651
- "data-action": "enable-debugger",
34652
- onClick: () => {
34653
- if (props.debuggerPermission?.request) {
34654
- props.debuggerPermission.request();
34655
- } else if (props.onHelp) {
34656
- props.onHelp("debugger-permission");
34657
- }
34658
- },
34659
- children: "Enable in Help"
34660
- }
34661
- ) })
34709
+ /* @__PURE__ */ u2("div", { class: "project-port-row", children: [
34710
+ debuggerGranted && /* @__PURE__ */ u2(
34711
+ "button",
34712
+ {
34713
+ type: "button",
34714
+ class: "btn-secondary",
34715
+ "data-action": "toggle-debugger",
34716
+ onClick: () => changeSettings({ ...settings, useDebugger: !useDebugger }),
34717
+ children: useDebugger ? "Don't use the debugger" : "Use the debugger"
34718
+ }
34719
+ ),
34720
+ /* @__PURE__ */ u2("button", { type: "button", class: "btn-secondary", "data-action": "debugger-help", onClick: openDebuggerHelp, children: "About the debugger" })
34721
+ ] })
34662
34722
  ] }),
34663
34723
  /* @__PURE__ */ u2("hr", { class: "settings-divider" }),
34664
34724
  /* @__PURE__ */ u2(
@@ -34832,7 +34892,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34832
34892
  onClick: () => downloadText(exported.fileName, exported.markdown)
34833
34893
  }
34834
34894
  ),
34835
- props.saveToProject && /* @__PURE__ */ u2(SaveButton, { save: () => props.saveToProject(exported.fileName, exported.markdown), projectName: activeProject?.name }, exported.fileName),
34895
+ props.saveToProject && /* @__PURE__ */ u2(SaveButton, { save: () => props.saveToProject(exported.fileName, exported.markdown), onDownload: () => downloadText(exported.fileName, exported.markdown), projectName: activeProject?.name }, exported.fileName),
34836
34896
  /* @__PURE__ */ u2("button", { type: "button", class: "btn-secondary", "data-action": "basket-back", onClick: () => {
34837
34897
  setBasketExport(null);
34838
34898
  setCopied(false);
@@ -34951,7 +35011,10 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34951
35011
  setConfirmClear(false);
34952
35012
  }, children: "Yes, empty the basket" }) : /* @__PURE__ */ u2("button", { type: "button", class: "btn-danger", "data-action": "clear-basket", onClick: () => setConfirmClear(true), children: "Empty basket" }))
34953
35013
  ] }),
34954
- basketStatus && /* @__PURE__ */ u2("p", { class: basketStatus.error ? "error" : "hint", "data-part": "basket-status", children: basketStatus.text })
35014
+ basketStatus && /* @__PURE__ */ u2("div", { class: "row", "data-part": "basket-status", children: [
35015
+ /* @__PURE__ */ u2("p", { class: basketStatus.error ? "error" : "hint", style: { margin: 0 }, children: basketStatus.text }),
35016
+ basketStatus.error && basketStatus.download && /* @__PURE__ */ u2("button", { type: "button", class: "btn-secondary", "data-action": "download-fallback", onClick: basketStatus.download, children: "Download file instead" })
35017
+ ] })
34955
35018
  ] }) }),
34956
35019
  !settingsOpen && (picking || dropperOpen || pixelMode || imageMode) && tool && /* @__PURE__ */ u2(
34957
35020
  "div",
@@ -35014,7 +35077,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
35014
35077
  ),
35015
35078
  /* @__PURE__ */ u2("button", { type: "button", class: "btn-secondary", "data-action": "choose-image", disabled: imageBusy, onClick: () => imageInput.current?.click(), children: "Choose an image" })
35016
35079
  ] }),
35017
- /* @__PURE__ */ u2("p", { class: "keys", children: pixelMode || imageMode ? "Esc: back to Element" : "\u2191 \u2193 after clicking: wider or narrower \xB7 Esc: stop" })
35080
+ /* @__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
35081
  ] })
35019
35082
  ]
35020
35083
  }
@@ -35367,7 +35430,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
35367
35430
  }
35368
35431
  ),
35369
35432
  tool && /* @__PURE__ */ u2(Button, { variant: "secondary", size: "md", iconOnly: true, tipAbove: true, icon: TOOL_ICONS[tool], "data-action": "pick-again", label: COPY.capture.actions.pickAgain, onClick: () => startPicking(tool) }),
35370
- props.saveToProject && output2 && /* @__PURE__ */ u2(SaveButton, { save: saveAll, projectName: activeProject?.name }, output2.fileName),
35433
+ props.saveToProject && output2 && /* @__PURE__ */ u2(SaveButton, { save: saveAll, onDownload: sectionFiles.length ? downloadZip : download, projectName: activeProject?.name }, output2.fileName),
35371
35434
  props.makeRule && output2 && output2.capture.meta.scope === "component" && /* @__PURE__ */ u2(RuleButton, { make: () => props.makeRule(output2.fileName, markdown) }, `rule ${output2.fileName}`)
35372
35435
  ] })
35373
35436
  ] })
@@ -35387,7 +35450,9 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
35387
35450
  {
35388
35451
  class: "pick-layer",
35389
35452
  "data-part": "pick-layer",
35390
- onPointerMove: (e6) => pickMove(e6.clientX, e6.clientY),
35453
+ onPointerMove: (e6) => {
35454
+ if (e6.pointerType !== "touch") pickMove(e6.clientX, e6.clientY);
35455
+ },
35391
35456
  onPointerDown: (e6) => {
35392
35457
  e6.preventDefault();
35393
35458
  e6.currentTarget.setPointerCapture?.(e6.pointerId);
@@ -35395,7 +35460,10 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
35395
35460
  },
35396
35461
  onPointerUp: (e6) => {
35397
35462
  e6.preventDefault();
35398
- pickUp(e6.clientX, e6.clientY);
35463
+ pickUp(e6.clientX, e6.clientY, e6.pointerType === "touch");
35464
+ },
35465
+ onPointerCancel: () => {
35466
+ drag.current = null;
35399
35467
  },
35400
35468
  onWheel: (e6) => pickWheel(e6),
35401
35469
  onContextMenu: (e6) => e6.preventDefault()