@luci-dev/toolbar 0.5.4 → 0.5.5

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.
@@ -4222,7 +4222,7 @@ ${content.join("\n")}
4222
4222
  const unrecKeys = /* @__PURE__ */ new Map();
4223
4223
  let unrecIssue;
4224
4224
  const keyIssues = /* @__PURE__ */ new Map();
4225
- const collect = (iss, side) => {
4225
+ const collect = (iss, side2) => {
4226
4226
  let keys;
4227
4227
  if (iss.code === "unrecognized_keys" && !iss.path?.length) {
4228
4228
  unrecIssue ?? (unrecIssue = iss);
@@ -4238,7 +4238,7 @@ ${content.join("\n")}
4238
4238
  for (const k6 of keys) {
4239
4239
  if (!unrecKeys.has(k6))
4240
4240
  unrecKeys.set(k6, {});
4241
- unrecKeys.get(k6)[side] = true;
4241
+ unrecKeys.get(k6)[side2] = true;
4242
4242
  }
4243
4243
  return true;
4244
4244
  };
@@ -19865,11 +19865,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
19865
19865
  }
19866
19866
 
19867
19867
  // node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/in-out.js
19868
- function withChecks(side, checks) {
19868
+ function withChecks(side2, checks) {
19869
19869
  if (!checks?.length)
19870
- return side;
19871
- const def = side._zod.def;
19872
- return clone(side, mergeDefs(def, { checks: [...def.checks ?? [], ...checks] }), { parent: true });
19870
+ return side2;
19871
+ const def = side2._zod.def;
19872
+ return clone(side2, mergeDefs(def, { checks: [...def.checks ?? [], ...checks] }), { parent: true });
19873
19873
  }
19874
19874
  function outSide(def) {
19875
19875
  return withChecks(def.out, def.checks);
@@ -25659,6 +25659,10 @@ ${external_exports.prettifyError(meta3.error)}`);
25659
25659
  // packages/format/dist/capture/compare.js
25660
25660
  var NONE2 = "not set";
25661
25661
  var shown = (v3) => v3.token ? `${v3.value} (${v3.token})` : v3.value;
25662
+ function side(meta3, instructions) {
25663
+ const note2 = instructions?.replace(/\s+/g, " ").trim();
25664
+ return { name: meta3.name, type: meta3.type, source: meta3.source, ...note2 ? { note: note2 } : {} };
25665
+ }
25662
25666
  var put = (out, what, property, v3) => {
25663
25667
  if (v3)
25664
25668
  out.set(what, { value: v3.computed, ...v3.token ? { token: v3.token } : {}, property });
@@ -25762,8 +25766,8 @@ ${external_exports.prettifyError(meta3.error)}`);
25762
25766
  function compareCaptures(a3, b2) {
25763
25767
  const fa = flattenCapture(a3), fb = flattenCapture(b2);
25764
25768
  const out = {
25765
- a: { name: a3.meta.name, type: a3.meta.type, source: a3.meta.source },
25766
- b: { name: b2.meta.name, type: b2.meta.type, source: b2.meta.source },
25769
+ a: side(a3.meta, a3.instructions),
25770
+ b: side(b2.meta, b2.instructions),
25767
25771
  same: [],
25768
25772
  differences: []
25769
25773
  };
@@ -25782,8 +25786,8 @@ ${external_exports.prettifyError(meta3.error)}`);
25782
25786
  const d3 = result.differences;
25783
25787
  const out = [
25784
25788
  `# Compare: ${names.a} and ${names.b}`,
25785
- `- A: ${result.a.name} (${result.a.type}), from ${result.a.source}`,
25786
- `- B: ${result.b.name} (${result.b.type}), from ${result.b.source}`,
25789
+ `- A: ${result.a.name} (${result.a.type}), from ${result.a.source}${result.a.note ? `. Your note: ${result.a.note}` : ""}`,
25790
+ `- B: ${result.b.name} (${result.b.type}), from ${result.b.source}${result.b.note ? `. Your note: ${result.b.note}` : ""}`,
25787
25791
  `- ${result.same.length} value${result.same.length === 1 ? " is" : "s are"} the same; ${d3.length} differ${d3.length === 1 ? "s" : ""}.`
25788
25792
  ];
25789
25793
  if (d3.length) {
@@ -27182,11 +27186,11 @@ module.exports = {
27182
27186
  if (el.hasText)
27183
27187
  add("color", "text");
27184
27188
  add("background-color", "background");
27185
- for (const side of SIDES) {
27186
- const width = parseFloat(el.styles[`border-${side}-width`] ?? "0");
27187
- const style = el.styles[`border-${side}-style`] ?? "none";
27189
+ for (const side2 of SIDES) {
27190
+ const width = parseFloat(el.styles[`border-${side2}-width`] ?? "0");
27191
+ const style = el.styles[`border-${side2}-style`] ?? "none";
27188
27192
  if (width > 0 && style !== "none" && style !== "hidden")
27189
- add(`border-${side}-color`, "border");
27193
+ add(`border-${side2}-color`, "border");
27190
27194
  }
27191
27195
  if (SVG_SHAPES.has(el.tag)) {
27192
27196
  add("fill", "text");
@@ -27524,12 +27528,12 @@ module.exports = {
27524
27528
  return null;
27525
27529
  const value = style.getPropertyValue(short3[0]).trim();
27526
27530
  if (value) {
27527
- const side2 = sideOf(topLevelParts(value), short3[1], short3[0] === "gap");
27528
- return side2 ? { value: side2, important: style.getPropertyPriority(short3[0]) === "important" } : null;
27531
+ const side3 = sideOf(topLevelParts(value), short3[1], short3[0] === "gap");
27532
+ return side3 ? { value: side3, important: style.getPropertyPriority(short3[0]) === "important" } : null;
27529
27533
  }
27530
- const side = /^border-(top|right|bottom|left)-color$/.exec(prop)?.[1];
27531
- if (side) {
27532
- for (const shorthand of [`border-${side}`, "border"]) {
27534
+ const side2 = /^border-(top|right|bottom|left)-color$/.exec(prop)?.[1];
27535
+ if (side2) {
27536
+ for (const shorthand of [`border-${side2}`, "border"]) {
27533
27537
  const v3 = style.getPropertyValue(shorthand).trim();
27534
27538
  const color = v3 ? borderColorPart(v3) : void 0;
27535
27539
  if (color)
@@ -29096,8 +29100,8 @@ module.exports = {
29096
29100
  const invisible = (p6) => {
29097
29101
  if (/^outline-/.test(p6) && p6 !== "outline-offset")
29098
29102
  return rest["outline-style"] === "none" && now["outline-style"] === "none";
29099
- const side = /^border-(\w+)-color$/.exec(p6)?.[1];
29100
- return side ? parseFloat(rest[`border-${side}-width`] ?? "0") === 0 && parseFloat(now[`border-${side}-width`] ?? "0") === 0 : false;
29103
+ const side2 = /^border-(\w+)-color$/.exec(p6)?.[1];
29104
+ return side2 ? parseFloat(rest[`border-${side2}-width`] ?? "0") === 0 && parseFloat(now[`border-${side2}-width`] ?? "0") === 0 : false;
29101
29105
  };
29102
29106
  const changed = STATE_PROPERTIES.filter((p6) => now[p6] !== void 0 && !same2(p6, rest[p6] ?? "", now[p6] ?? "") && !invisible(p6));
29103
29107
  const out = [];
@@ -31325,7 +31329,7 @@ module.exports = {
31325
31329
  }
31326
31330
 
31327
31331
  // packages/ui/dist/about.js
31328
- var LUCI_VERSION = "0.5.3";
31332
+ var LUCI_VERSION = "0.5.5";
31329
31333
  var LUCI_REPO_URL = "https://github.com/waidesign/luci-by-pawprint.design";
31330
31334
 
31331
31335
  // packages/ui/dist/copy.js
@@ -31412,9 +31416,6 @@ module.exports = {
31412
31416
  function EmptyState(props) {
31413
31417
  return u2("div", { class: "empty", ...props.part ? { "data-part": props.part } : {}, children: [u2(Mascot, { pose: props.pose ?? "peek", size: props.size ?? 120 }), u2("p", { class: "t-title", children: props.title }), props.body && u2("p", { children: props.body }), props.children] });
31414
31418
  }
31415
- function Badge(props) {
31416
- return u2("span", { class: props.brand ? "badge brand" : "badge", children: props.children });
31417
- }
31418
31419
 
31419
31420
  // packages/ui/dist/styles.js
31420
31421
  var BASE_CSS = `
@@ -32532,9 +32533,9 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
32532
32533
  return `grid columns ${c4.from} \u2192 ${c4.to}`;
32533
32534
  const rendered = /^(min-|max-)?(width|height)$/.test(c4.property) && /px$/.test(c4.to);
32534
32535
  const kept = { left: "right", right: "left", up: "bottom", down: "top" };
32535
- const side = { left: "the left", right: "the right", up: "the top", down: "the bottom" };
32536
+ const side2 = { left: "the left", right: "the right", up: "the top", down: "the bottom" };
32536
32537
  const toward = { left: "to the left", right: "to the right", up: "upward", down: "downward" };
32537
- const grow = c4.grow ? `, ${parseFloat(c4.to) < parseFloat(c4.from) ? `shrinking from ${side[c4.grow]}` : `growing ${toward[c4.grow]}`} (its ${kept[c4.grow]} edge stays where it is)` : "";
32538
+ const grow = c4.grow ? `, ${parseFloat(c4.to) < parseFloat(c4.from) ? `shrinking from ${side2[c4.grow]}` : `growing ${toward[c4.grow]}`} (its ${kept[c4.grow]} edge stays where it is)` : "";
32538
32539
  return `${c4.property}${rendered ? " as rendered" : ""} ${c4.from} \u2192 ${c4.to}${c4.token ? ` (${c4.token})` : ""}${grow}`;
32539
32540
  }
32540
32541
  if (c4.op === "insert") {
@@ -32740,7 +32741,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
32740
32741
  }
32741
32742
  }, []);
32742
32743
  const useDebugger = capSettings.useDebugger ?? true;
32743
- return u2("div", { class: "panel", role: "dialog", "aria-label": "Settings", "data-part": "settings", children: [u2("div", { class: "settings-head", children: [u2("div", { class: "row", style: { alignItems: "center", gap: "8px" }, children: [u2("h2", { children: "Settings" }), u2(Badge, { brand: true, children: "Beta" })] }), u2(RepoButton, {})] }), u2("div", { class: "project-card", "data-part": "connected-project", children: [u2("div", { class: "project-header", children: [u2("span", { class: `status-dot ${activeProject?.project ? "online" : "offline"}`, "aria-hidden": "true" }), u2("div", { class: "project-info", children: [u2("span", { class: "project-name", children: activeProject?.name ? `Connected to ${activeProject.name}` : "Not connected to a project" }), activeProject?.project && u2("span", { class: "project-path dim", title: activeProject.project, children: activeProject.project }), !activeProject?.project && u2("span", { class: "project-hint dim", children: ["Run ", u2("code", { children: "luci serve" }), " in your project terminal"] })] })] }), props.projectInfo?.setUrl && u2("div", { class: "project-port-row", children: [u2("label", { class: "dim", for: "luci-bridge-url", children: "Bridge:" }), u2("input", { id: "luci-bridge-url", type: "text", class: "port-input", "data-part": "port-input", value: bridgePortInput, placeholder: "http://127.0.0.1:4545", onChange: (e6) => {
32744
+ return u2("div", { class: "panel", role: "dialog", "aria-label": "Settings", "data-part": "settings", children: [u2("div", { class: "settings-head", children: [u2("div", { class: "row", style: { alignItems: "center", gap: "8px" }, children: u2("h2", { children: "Settings" }) }), u2(RepoButton, {})] }), u2("div", { class: "project-card", "data-part": "connected-project", children: [u2("div", { class: "project-header", children: [u2("span", { class: `status-dot ${activeProject?.project ? "online" : "offline"}`, "aria-hidden": "true" }), u2("div", { class: "project-info", children: [u2("span", { class: "project-name", children: activeProject?.name ? `Connected to ${activeProject.name}` : "Not connected to a project" }), activeProject?.project && u2("span", { class: "project-path dim", title: activeProject.project, children: activeProject.project }), !activeProject?.project && u2("span", { class: "project-hint dim", children: ["Run ", u2("code", { children: "luci serve" }), " in your project terminal"] })] })] }), props.projectInfo?.setUrl && u2("div", { class: "project-port-row", children: [u2("label", { class: "dim", for: "luci-bridge-url", children: "Bridge:" }), u2("input", { id: "luci-bridge-url", type: "text", class: "port-input", "data-part": "port-input", value: bridgePortInput, placeholder: "http://127.0.0.1:4545", onChange: (e6) => {
32744
32745
  const val = e6.currentTarget.value;
32745
32746
  setBridgePortInput(val);
32746
32747
  void props.projectInfo?.setUrl?.(val).then(refreshProject);
@@ -34208,7 +34209,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34208
34209
  const hoverElig = hovered ? eligibilityOf(hovered) : null;
34209
34210
  const rect = hovered?.getBoundingClientRect();
34210
34211
  const cs = hovered && tool === "spacing" ? win.getComputedStyle(hovered) : null;
34211
- return u2("div", { class: "luci luci-theme", "data-theme": uiPrefs.theme, "data-dock": uiPrefs.dock, children: [u2("div", { class: "shell", "data-part": "shell", ref: shellRef, style: shellStyle, ...props.movable ? { "data-movable": "" } : {}, ...moving ? { "data-moving": "" } : {}, ...place ? { "data-h": place.h, "data-v": place.v } : {}, children: [u2("div", { class: "bar", role: "toolbar", "aria-label": props.modes ? COPY.capture.devTitle : COPY.capture.title, ref: barRef, onPointerDown: startMove, onClickCapture: swallowDragClick, children: [u2("button", { type: "button", class: "menu-btn", "data-action": "settings", "aria-label": COPY.common.menu, "aria-pressed": settingsOpen, "aria-keyshortcuts": KEYS.menu, "data-tip": `${COPY.common.menu} ${KEYS.menu}`, onClick: toggleMenu, children: u2(LuciLogo, { size: 48 }) }), props.modes && u2(ModeSwitch, { ...props.modes }), u2("span", { class: "bar-sep", "aria-hidden": "true" }), TOOLS.map((t3) => u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: TOOL_ICONS[t3], label: COPY.capture.tools[t3], shortcut: KEYS[t3], "data-tool": t3, "aria-pressed": currentTool === t3, onClick: () => pickTool(t3) })), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: AppWindow, label: COPY.capture.tools.page, shortcut: KEYS.page, "data-action": "whole-page", "aria-pressed": wholePage && (pageBusy || Boolean(result)), onClick: captureWholePage }), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: ScanEye, label: COPY.capture.tools.check, shortcut: KEYS.check, "data-action": "check", "aria-pressed": checking, onClick: openCheck }), u2("span", { class: "bar-sep", "aria-hidden": "true" }), u2("button", { type: "button", class: "basket-pill", "data-action": "basket", "aria-pressed": basketOpen && !settingsOpen, "aria-label": COPY.capture.basketLabel(basket.length), "aria-keyshortcuts": KEYS.basket, "data-tip": `Basket ${KEYS.basket}`, onClick: toggleBasket, children: [u2(Icon2, { icon: ShoppingBasket }), COPY.capture.basket(basket.length)] }), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: X2, label: COPY.common.close, "data-action": "close", onClick: props.onClose })] }), greeting && u2("div", { class: "panel greet", role: "status", "data-part": "greeting", children: [u2(Mascot, { pose: "hello", size: 96 }), u2("div", { class: "stack", children: [u2("p", { class: "t-title", children: COPY.capture.greeting.title }), u2("p", { class: "hint", children: COPY.capture.greeting.body })] })] }), props.modes && idle && !greeting && u2("div", { class: "sub with-luci", role: "note", "data-part": "intro", children: [u2(Mascot, { pose: "peek", size: 96 }), u2("div", { class: "sub-body", children: [u2("p", { class: "hint", children: COPY.devToolbar.intro.capture.body }), u2("p", { class: "keys", children: COPY.devToolbar.intro.capture.keys })] })] }), settingsOpen && (props.modes ? u2(DevSettingsPanel, { currentMode: "capture", uiPrefs, onUiPrefsChange: setUiPrefs, projectInfo: props.projectInfo, store: props.store, captureSettings: settings, onCaptureSettingsChange: changeSettings, debuggerPermission: props.debuggerPermission }) : u2("div", { class: "panel", role: "dialog", "aria-label": COPY.common.menu, "data-part": "settings", children: [u2("div", { class: "menu-head", children: [u2(Mascot, { pose: "sit", size: 96 }), u2("div", { class: "brand-stack", children: [u2("div", { class: "brand-title-line", children: [u2("span", { class: "brand-title", "data-part": "brand-title", children: props.modes ? COPY.capture.devTitle : COPY.capture.title }), u2(Badge, { brand: true, children: "Beta" }), u2("span", { class: "brand-sub", "data-part": "brand-sub", children: props.modes ? COPY.capture.devByline : COPY.capture.byline })] }), u2("p", { class: "brand-desc", children: props.modes ? COPY.capture.devDescription : COPY.capture.description }), props.onHelp && u2("div", { class: "row", children: u2(Button, { variant: "secondary", icon: Info, "data-action": "help", onClick: () => props.onHelp(), children: COPY.common.help }) })] }), u2(RepoButton, {})] }), !props.modes && u2("div", { class: "invite", "data-part": "invite", children: [u2("p", { class: "invite-title", children: COPY.capture.invite.title }), u2("p", { class: "invite-body", children: COPY.capture.invite.body }), LUCI_REPO_URL ? u2("a", { class: "btn-link invite-action", "data-action": "take-home", href: LUCI_REPO_URL, target: "_blank", rel: "noopener noreferrer", children: COPY.capture.invite.action }) : props.onHelp && u2(Button, { variant: "link", class: "invite-action", "data-action": "take-home", onClick: () => props.onHelp("take-luci-home"), children: COPY.capture.invite.action })] }), u2("div", { class: "project-card", "data-part": "connected-project", children: [u2("div", { class: "project-header", children: [u2("span", { class: `status-dot ${activeProject?.project ? "online" : "offline"}`, "aria-hidden": "true" }), u2("div", { class: "project-info", children: [u2("span", { class: "project-name", children: activeProject?.name ? `Connected to ${activeProject.name}` : "Not connected to a project" }), activeProject?.project && u2("span", { class: "project-path dim", title: activeProject.project, children: activeProject.project }), !activeProject?.project && u2("span", { class: "project-hint dim", children: ["Run ", u2("code", { children: "luci serve" }), " in your project terminal"] })] })] }), props.projectInfo?.setUrl && u2("div", { class: "project-port-row", children: [u2("label", { class: "dim", for: "luci-bridge-url", children: "Bridge:" }), u2("input", { id: "luci-bridge-url", type: "text", class: "port-input", "data-part": "port-input", value: bridgePortInput, placeholder: "http://127.0.0.1:4545", onChange: (e6) => {
34212
+ return u2("div", { class: "luci luci-theme", "data-theme": uiPrefs.theme, "data-dock": uiPrefs.dock, children: [u2("div", { class: "shell", "data-part": "shell", ref: shellRef, style: shellStyle, ...props.movable ? { "data-movable": "" } : {}, ...moving ? { "data-moving": "" } : {}, ...place ? { "data-h": place.h, "data-v": place.v } : {}, children: [u2("div", { class: "bar", role: "toolbar", "aria-label": props.modes ? COPY.capture.devTitle : COPY.capture.title, ref: barRef, onPointerDown: startMove, onClickCapture: swallowDragClick, children: [u2("button", { type: "button", class: "menu-btn", "data-action": "settings", "aria-label": COPY.common.menu, "aria-pressed": settingsOpen, "aria-keyshortcuts": KEYS.menu, "data-tip": `${COPY.common.menu} ${KEYS.menu}`, onClick: toggleMenu, children: u2(LuciLogo, { size: 48 }) }), props.modes && u2(ModeSwitch, { ...props.modes }), u2("span", { class: "bar-sep", "aria-hidden": "true" }), TOOLS.map((t3) => u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: TOOL_ICONS[t3], label: COPY.capture.tools[t3], shortcut: KEYS[t3], "data-tool": t3, "aria-pressed": currentTool === t3, onClick: () => pickTool(t3) })), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: AppWindow, label: COPY.capture.tools.page, shortcut: KEYS.page, "data-action": "whole-page", "aria-pressed": wholePage && (pageBusy || Boolean(result)), onClick: captureWholePage }), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: ScanEye, label: COPY.capture.tools.check, shortcut: KEYS.check, "data-action": "check", "aria-pressed": checking, onClick: openCheck }), u2("span", { class: "bar-sep", "aria-hidden": "true" }), u2("button", { type: "button", class: "basket-pill", "data-action": "basket", "aria-pressed": basketOpen && !settingsOpen, "aria-label": COPY.capture.basketLabel(basket.length), "aria-keyshortcuts": KEYS.basket, "data-tip": `Basket ${KEYS.basket}`, onClick: toggleBasket, children: [u2(Icon2, { icon: ShoppingBasket }), COPY.capture.basket(basket.length)] }), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: X2, label: COPY.common.close, "data-action": "close", onClick: props.onClose })] }), greeting && u2("div", { class: "panel greet", role: "status", "data-part": "greeting", children: [u2(Mascot, { pose: "hello", size: 96 }), u2("div", { class: "stack", children: [u2("p", { class: "t-title", children: COPY.capture.greeting.title }), u2("p", { class: "hint", children: COPY.capture.greeting.body })] })] }), props.modes && idle && !greeting && u2("div", { class: "sub with-luci", role: "note", "data-part": "intro", children: [u2(Mascot, { pose: "peek", size: 96 }), u2("div", { class: "sub-body", children: [u2("p", { class: "hint", children: COPY.devToolbar.intro.capture.body }), u2("p", { class: "keys", children: COPY.devToolbar.intro.capture.keys })] })] }), settingsOpen && (props.modes ? u2(DevSettingsPanel, { currentMode: "capture", uiPrefs, onUiPrefsChange: setUiPrefs, projectInfo: props.projectInfo, store: props.store, captureSettings: settings, onCaptureSettingsChange: changeSettings, debuggerPermission: props.debuggerPermission }) : u2("div", { class: "panel", role: "dialog", "aria-label": COPY.common.menu, "data-part": "settings", children: [u2("div", { class: "menu-head", children: [u2(Mascot, { pose: "sit", size: 96 }), u2("div", { class: "brand-stack", children: [u2("div", { class: "brand-title-line", children: [u2("span", { class: "brand-title", "data-part": "brand-title", children: props.modes ? COPY.capture.devTitle : COPY.capture.title }), u2("span", { class: "brand-sub", "data-part": "brand-sub", children: props.modes ? COPY.capture.devByline : COPY.capture.byline })] }), u2("p", { class: "brand-desc", children: props.modes ? COPY.capture.devDescription : COPY.capture.description }), props.onHelp && u2("div", { class: "row", children: u2(Button, { variant: "secondary", icon: Info, "data-action": "help", onClick: () => props.onHelp(), children: COPY.common.help }) })] }), u2(RepoButton, {})] }), !props.modes && u2("div", { class: "invite", "data-part": "invite", children: [u2("p", { class: "invite-title", children: COPY.capture.invite.title }), u2("p", { class: "invite-body", children: COPY.capture.invite.body }), LUCI_REPO_URL ? u2("a", { class: "btn-link invite-action", "data-action": "take-home", href: LUCI_REPO_URL, target: "_blank", rel: "noopener noreferrer", children: COPY.capture.invite.action }) : props.onHelp && u2(Button, { variant: "link", class: "invite-action", "data-action": "take-home", onClick: () => props.onHelp("take-luci-home"), children: COPY.capture.invite.action })] }), u2("div", { class: "project-card", "data-part": "connected-project", children: [u2("div", { class: "project-header", children: [u2("span", { class: `status-dot ${activeProject?.project ? "online" : "offline"}`, "aria-hidden": "true" }), u2("div", { class: "project-info", children: [u2("span", { class: "project-name", children: activeProject?.name ? `Connected to ${activeProject.name}` : "Not connected to a project" }), activeProject?.project && u2("span", { class: "project-path dim", title: activeProject.project, children: activeProject.project }), !activeProject?.project && u2("span", { class: "project-hint dim", children: ["Run ", u2("code", { children: "luci serve" }), " in your project terminal"] })] })] }), props.projectInfo?.setUrl && u2("div", { class: "project-port-row", children: [u2("label", { class: "dim", for: "luci-bridge-url", children: "Bridge:" }), u2("input", { id: "luci-bridge-url", type: "text", class: "port-input", "data-part": "port-input", value: bridgePortInput, placeholder: "http://127.0.0.1:4545", onChange: (e6) => {
34212
34213
  const val = e6.currentTarget.value;
34213
34214
  setBridgePortInput(val);
34214
34215
  void props.projectInfo?.setUrl?.(val).then(refreshProject);
@@ -34218,16 +34219,16 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
34218
34219
  } else if (props.onHelp) {
34219
34220
  props.onHelp("debugger-permission");
34220
34221
  }
34221
- }, children: "Enable in Help" }) })] }), u2("hr", { class: "settings-divider" }), u2(AppearanceControls, { prefs: uiPrefs, onChange: setUiPrefs, movable: Boolean(props.movable || props.modes), moved: props.movable ? Boolean(place) : Boolean(props.modes && uiPrefs.devPlace) }), u2("hr", { class: "settings-divider" }), u2("div", { class: "stack", children: [u2("span", { class: "field-label", children: "Default file format" }), u2("div", { class: "settings-grid", children: [u2("label", { class: "field-stack", children: [u2("span", { class: "dim", children: "Units" }), u2(Select, { "data-setting": "units", value: settings.units ?? "px", onChange: (e6) => changeSettings({ ...settings, units: e6.currentTarget.value }), children: [u2("option", { value: "px", children: "px" }), u2("option", { value: "rem", children: "rem" }), u2("option", { value: "both", children: "both" })] })] }), u2("label", { class: "field-stack", children: [u2("span", { class: "dim", children: "Colours" }), u2(Select, { "data-setting": "colors", value: settings.colors ?? "hex", onChange: (e6) => changeSettings({ ...settings, colors: e6.currentTarget.value }), children: [u2("option", { value: "hex", children: "hex" }), u2("option", { value: "rgb", children: "rgb" }), u2("option", { value: "hsl", children: "hsl" }), u2("option", { value: "oklch", children: "oklch" })] })] }), u2("label", { class: "field-stack", title: "The file's source line: the page address, or only the site name", children: [u2("span", { class: "dim", children: "Source" }), u2(Select, { "data-setting": "source", value: settings.source ?? "page", onChange: (e6) => changeSettings({ ...settings, source: e6.currentTarget.value }), children: [u2("option", { value: "page", children: "page address" }), u2("option", { value: "site", children: "site name only" })] })] }), u2("label", { class: "field-stack", title: "The file you copy, download and export: Luci's tables, DESIGN.md for Google Stitch, Tailwind CSS, or CSS Variables", children: [u2("span", { class: "dim", children: "File" }), u2(Select, { "data-setting": "style", value: settings.style ?? "luci", onChange: (e6) => changeSettings({ ...settings, style: e6.currentTarget.value }), children: [u2("option", { value: "luci", children: "Luci tables" }), u2("option", { value: "stitch", children: "DESIGN.md (Stitch)" }), u2("option", { value: "tailwind", children: "Tailwind v4 (@theme)" }), u2("option", { value: "tailwind-v3", children: "Tailwind v3 (config.js)" }), u2("option", { value: "css-vars", children: "CSS Variables (tokens.css)" })] })] })] })] }), u2("hr", { class: "settings-divider" }), u2("div", { class: "stack", children: [u2("span", { class: "field-label", children: "Keys" }), u2("div", { class: "shortcut-list", "data-part": "keys", children: [u2("span", { children: TOOLS.map((t3) => u2(S, { children: [u2("kbd", { class: "kbd", children: KEYS[t3] }), " "] })) }), u2("span", { class: "dim", children: "Component, Text, Colour, Spacing" }), u2("span", { children: [u2("kbd", { class: "kbd", children: KEYS.page }), " ", u2("kbd", { class: "kbd", children: KEYS.check })] }), u2("span", { class: "dim", children: "Whole page, Check a build" }), u2("span", { children: [u2("kbd", { class: "kbd", children: KEYS.basket }), " ", u2("kbd", { class: "kbd", children: KEYS.menu })] }), u2("span", { class: "dim", children: "Basket, this menu" }), u2("span", { children: [u2("kbd", { class: "kbd", children: "\u2191" }), " ", u2("kbd", { class: "kbd", children: "\u2193" })] }), u2("span", { class: "dim", children: "Wider or narrower selection" }), u2("span", { children: u2("kbd", { class: "kbd", children: "Enter" }) }), u2("span", { class: "dim", children: "Pick, then take This one" }), u2("span", { children: u2("kbd", { class: "kbd", children: "Esc" }) }), u2("span", { class: "dim", children: "Stop picking, or close the panel" })] })] })] })), !settingsOpen && pageBusy && !basketOpen && u2("div", { class: "panel", children: u2(Loading, { sleep: true, text: COPY.capture.readingPage, step: pageStep }) }), !settingsOpen && basketOpen && u2("div", { class: "panel", role: "dialog", "aria-label": "Basket", "data-part": "basket", children: comparison ? u2(S, { children: [u2("h2", { children: "Compare" }), u2("p", { class: "hint", "data-part": "compare-summary", children: ["A: ", comparison.result.a.name, " (", sourceLabel(comparison.items[0]), "). B: ", comparison.result.b.name, " (", sourceLabel(comparison.items[1]), "). ", comparison.result.same.length, " value", comparison.result.same.length === 1 ? " is" : "s are", " the same; ", comparison.result.differences.length, " differ", comparison.result.differences.length === 1 ? "s" : "", "."] }), comparison.result.differences.length ? u2("div", { class: "compare-scroll", children: u2("table", { class: "compare", "data-part": "compare-table", children: [u2("thead", { children: u2("tr", { children: [u2("th", { class: "col-what", children: "What" }), u2("th", { class: "col-a", children: "A" }), u2("th", { class: "col-b", children: "B" })] }) }), u2("tbody", { children: comparison.result.differences.map((d3) => u2("tr", { children: [u2("td", { class: "col-what", children: d3.what }), u2("td", { class: "col-a", children: d3.a }), u2("td", { class: "col-b", children: d3.b })] })) })] }) }) : u2("p", { class: "hint", children: "No differences: every value compared is the same." }), u2("div", { class: "row actions", children: [u2(Button, { variant: "primary", size: "md", iconOnly: true, tipAbove: true, tipAlign: "left", icon: copied ? CircleCheck : ClipboardCopy, label: copied ? COPY.common.copied : "Copy the comparison", "data-action": "copy-compare", onClick: () => void copyText(formatCompareReport(comparison.result, { a: comparison.items[0].name, b: comparison.items[1].name })) }), u2("button", { type: "button", class: "btn-secondary", "data-action": "compare-back", onClick: () => {
34222
+ }, children: "Enable in Help" }) })] }), u2("hr", { class: "settings-divider" }), u2(AppearanceControls, { prefs: uiPrefs, onChange: setUiPrefs, movable: Boolean(props.movable || props.modes), moved: props.movable ? Boolean(place) : Boolean(props.modes && uiPrefs.devPlace) }), u2("hr", { class: "settings-divider" }), u2("div", { class: "stack", children: [u2("span", { class: "field-label", children: "Default file format" }), u2("div", { class: "settings-grid", children: [u2("label", { class: "field-stack", children: [u2("span", { class: "dim", children: "Units" }), u2(Select, { "data-setting": "units", value: settings.units ?? "px", onChange: (e6) => changeSettings({ ...settings, units: e6.currentTarget.value }), children: [u2("option", { value: "px", children: "px" }), u2("option", { value: "rem", children: "rem" }), u2("option", { value: "both", children: "both" })] })] }), u2("label", { class: "field-stack", children: [u2("span", { class: "dim", children: "Colours" }), u2(Select, { "data-setting": "colors", value: settings.colors ?? "hex", onChange: (e6) => changeSettings({ ...settings, colors: e6.currentTarget.value }), children: [u2("option", { value: "hex", children: "hex" }), u2("option", { value: "rgb", children: "rgb" }), u2("option", { value: "hsl", children: "hsl" }), u2("option", { value: "oklch", children: "oklch" })] })] }), u2("label", { class: "field-stack", title: "The file's source line: the page address, or only the site name", children: [u2("span", { class: "dim", children: "Source" }), u2(Select, { "data-setting": "source", value: settings.source ?? "page", onChange: (e6) => changeSettings({ ...settings, source: e6.currentTarget.value }), children: [u2("option", { value: "page", children: "page address" }), u2("option", { value: "site", children: "site name only" })] })] }), u2("label", { class: "field-stack", title: "The file you copy, download and export: Luci's tables, DESIGN.md for Google Stitch, Tailwind CSS, or CSS Variables", children: [u2("span", { class: "dim", children: "File" }), u2(Select, { "data-setting": "style", value: settings.style ?? "luci", onChange: (e6) => changeSettings({ ...settings, style: e6.currentTarget.value }), children: [u2("option", { value: "luci", children: "Luci tables" }), u2("option", { value: "stitch", children: "DESIGN.md (Stitch)" }), u2("option", { value: "tailwind", children: "Tailwind v4 (@theme)" }), u2("option", { value: "tailwind-v3", children: "Tailwind v3 (config.js)" }), u2("option", { value: "css-vars", children: "CSS Variables (tokens.css)" })] })] })] })] }), u2("hr", { class: "settings-divider" }), u2("div", { class: "stack", children: [u2("span", { class: "field-label", children: "Keys" }), u2("div", { class: "shortcut-list", "data-part": "keys", children: [u2("span", { children: TOOLS.map((t3) => u2(S, { children: [u2("kbd", { class: "kbd", children: KEYS[t3] }), " "] })) }), u2("span", { class: "dim", children: "Component, Text, Colour, Spacing" }), u2("span", { children: [u2("kbd", { class: "kbd", children: KEYS.page }), " ", u2("kbd", { class: "kbd", children: KEYS.check })] }), u2("span", { class: "dim", children: "Whole page, Check a build" }), u2("span", { children: [u2("kbd", { class: "kbd", children: KEYS.basket }), " ", u2("kbd", { class: "kbd", children: KEYS.menu })] }), u2("span", { class: "dim", children: "Basket, this menu" }), u2("span", { children: [u2("kbd", { class: "kbd", children: "\u2191" }), " ", u2("kbd", { class: "kbd", children: "\u2193" })] }), u2("span", { class: "dim", children: "Wider or narrower selection" }), u2("span", { children: u2("kbd", { class: "kbd", children: "Enter" }) }), u2("span", { class: "dim", children: "Pick, then take This one" }), u2("span", { children: u2("kbd", { class: "kbd", children: "Esc" }) }), u2("span", { class: "dim", children: "Stop picking, or close the panel" })] })] })] })), !settingsOpen && pageBusy && !basketOpen && u2("div", { class: "panel", children: u2(Loading, { sleep: true, text: COPY.capture.readingPage, step: pageStep }) }), !settingsOpen && basketOpen && u2("div", { class: "panel", role: "dialog", "aria-label": "Basket", "data-part": "basket", children: comparison ? u2(S, { children: [u2("h2", { children: "Compare" }), u2("p", { class: "hint", "data-part": "compare-summary", children: ["A: ", comparison.result.a.name, " (", sourceLabel(comparison.items[0]), comparison.result.a.note ? `, your note: ${comparison.result.a.note}` : "", "). B: ", comparison.result.b.name, " (", sourceLabel(comparison.items[1]), comparison.result.b.note ? `, your note: ${comparison.result.b.note}` : "", "). ", comparison.result.same.length, " value", comparison.result.same.length === 1 ? " is" : "s are", " the same; ", comparison.result.differences.length, " differ", comparison.result.differences.length === 1 ? "s" : "", "."] }), comparison.result.differences.length ? u2("div", { class: "compare-scroll", children: u2("table", { class: "compare", "data-part": "compare-table", children: [u2("thead", { children: u2("tr", { children: [u2("th", { class: "col-what", children: "What" }), u2("th", { class: "col-a", children: "A" }), u2("th", { class: "col-b", children: "B" })] }) }), u2("tbody", { children: comparison.result.differences.map((d3) => u2("tr", { children: [u2("td", { class: "col-what", children: d3.what }), u2("td", { class: "col-a", children: d3.a }), u2("td", { class: "col-b", children: d3.b })] })) })] }) }) : u2("p", { class: "hint", children: "No differences: every value compared is the same." }), u2("div", { class: "row actions", children: [u2(Button, { variant: "primary", size: "md", iconOnly: true, tipAbove: true, tipAlign: "left", icon: copied ? CircleCheck : ClipboardCopy, label: copied ? COPY.common.copied : "Copy the comparison", "data-action": "copy-compare", onClick: () => void copyText(formatCompareReport(comparison.result, { a: comparison.items[0].name, b: comparison.items[1].name })) }), u2("button", { type: "button", class: "btn-secondary", "data-action": "compare-back", onClick: () => {
34222
34223
  setComparison(null);
34223
34224
  setCopied(false);
34224
34225
  }, children: "Back to the basket" })] })] }) : basketExport && exported ? u2(S, { children: [u2("h2", { children: basketExport.title }), u2("div", { class: "file", "data-part": "file-name", children: exported.fileName }), u2("pre", { "data-part": "preview", children: exported.markdown }), u2("div", { class: "row actions", children: [u2(Button, { variant: "primary", size: "md", iconOnly: true, tipAbove: true, tipAlign: "left", icon: copied ? CircleCheck : ClipboardCopy, label: copied ? COPY.common.copied : COPY.capture.actions.copy, "data-action": "copy", onClick: () => void copyText(exported.markdown) }), u2(Button, { variant: "secondary", size: "md", iconOnly: true, tipAbove: true, icon: Download, label: COPY.capture.actions.download, "data-action": "download", onClick: () => downloadText(exported.fileName, exported.markdown) }), props.saveToProject && u2(SaveButton, { save: () => props.saveToProject(exported.fileName, exported.markdown), projectName: activeProject?.name }, exported.fileName), u2("button", { type: "button", class: "btn-secondary", "data-action": "basket-back", onClick: () => {
34225
34226
  setBasketExport(null);
34226
34227
  setCopied(false);
34227
- }, children: "Back to the basket" })] })] }) : u2(S, { children: [u2("h2", { children: "Basket" }), !basket.length ? u2(EmptyState, { pose: "box", title: COPY.capture.basketEmpty.title, body: COPY.capture.basketEmpty.body, part: "basket-empty" }) : u2("ul", { class: "items", children: basket.map((item) => u2("li", { "data-item": item.id, children: [u2("span", { class: "meta", children: [groupOf(item.capture), " \xB7 ", sourceLabel(item)] }), basket.length > 1 && u2("label", { class: "compare-pick", title: "Pick two items to compare them", children: [u2("input", { type: "checkbox", "data-item-compare": true, checked: compareIds.includes(item.id), onChange: (e6) => setCompareIds((ids) => e6.currentTarget.checked ? [...ids.filter((i3) => i3 !== item.id), item.id].slice(-2) : ids.filter((i3) => i3 !== item.id)) }), "Compare"] }), u2("input", { type: "text", "aria-label": "Name", "data-item-name": true, value: item.name, onChange: (e6) => saveBasket(renameInBasket(basket, item.id, e6.currentTarget.value)) }), u2("span", { class: "row", children: [u2("button", { type: "button", class: "btn-secondary", "data-item-export": true, onClick: () => setBasketExport({ title: item.name, item }), children: "Export" }), props.saveToProject && u2("button", { type: "button", class: "btn-secondary", "data-item-send-project": true, title: activeProject?.name ? `Save this capture to ${activeProject.name}/.luci/design/` : "Save this capture to .luci/design/ in your project", onClick: () => void sendOneToProject(item), children: itemSent[item.id]?.error ? "Failed" : itemSent[item.id] ? "Saved" : activeProject?.name ? `Send to ${activeProject.name}` : "Send" }), u2("button", { class: "btn-danger", type: "button", "data-item-remove": true, "aria-label": `Remove ${item.name}`, onClick: () => saveBasket(removeFromBasket(basket, item.id)), children: "Remove" })] }), u2("textarea", { "data-item-note": true, "aria-label": `Note for your agent about ${item.name}`, placeholder: "Note for your agent (optional). What to use it for, what to change.", value: item.capture.instructions ?? "", onChange: (e6) => saveBasket(noteInBasket(basket, item.id, e6.currentTarget.value)) })] })) }), mergeable.length > 0 && u2("div", { class: "stack", "data-part": "merge", children: [u2("span", { class: "dim", children: ["One site, several pages: ", mergeable.map((g2) => `${g2.type} from ${g2.pages.length} pages of ${g2.site}`).join(", "), ". Merge them into one site file. Each row says which pages use it; values that differ are listed as conflicts."] }), u2("span", { class: "row", children: u2("button", { type: "button", class: "btn-secondary", "data-action": "merge-systems", onClick: mergeSystemsNow, children: ["Merge into site system", mergeable.length === 1 ? "" : "s", " (", mergeable.length, ")"] }) })] }), mergedNote && u2("p", { class: "hint", "data-part": "merged", children: mergedNote }), compareItems && u2("div", { class: "row", "data-part": "compare-pick", children: [u2("span", { class: "dim", children: [compareItems[0].name, " and ", compareItems[1].name] }), u2("button", { type: "button", class: "btn-secondary", "data-action": "compare", onClick: () => {
34228
+ }, children: "Back to the basket" })] })] }) : u2(S, { children: [u2("h2", { children: "Basket" }), !basket.length ? u2(EmptyState, { pose: "box", title: COPY.capture.basketEmpty.title, body: COPY.capture.basketEmpty.body, part: "basket-empty" }) : u2("ul", { class: "items", children: basket.map((item) => u2("li", { "data-item": item.id, children: [u2("span", { class: "meta", children: [groupOf(item.capture), " \xB7 ", sourceLabel(item)] }), basket.length > 1 && u2("label", { class: "compare-pick", title: "Pick two items to compare them", children: [u2("input", { type: "checkbox", "data-item-compare": true, checked: compareIds.includes(item.id), onChange: (e6) => setCompareIds((ids) => e6.currentTarget.checked ? [...ids.filter((i3) => i3 !== item.id), item.id].slice(-2) : ids.filter((i3) => i3 !== item.id)) }), "Compare"] }), u2("input", { type: "text", "aria-label": "Name", "data-item-name": true, value: item.name, onChange: (e6) => saveBasket(renameInBasket(basket, item.id, e6.currentTarget.value)) }), u2("span", { class: "row", children: [u2("button", { type: "button", class: "btn-secondary", "data-item-export": true, onClick: () => setBasketExport({ title: item.name, item }), children: "Export" }), props.saveToProject && u2("button", { type: "button", class: "btn-secondary", "data-item-send-project": true, title: activeProject?.name ? `Save this capture to ${activeProject.name}/.luci/design/` : "Save this capture to .luci/design/ in your project", onClick: () => void sendOneToProject(item), children: itemSent[item.id]?.error ? "Failed" : itemSent[item.id] ? "Saved" : "Send to project" }), u2("button", { class: "btn-danger", type: "button", "data-item-remove": true, "aria-label": `Remove ${item.name}`, onClick: () => saveBasket(removeFromBasket(basket, item.id)), children: "Remove" })] }), u2("textarea", { "data-item-note": true, "aria-label": `Note for your agent about ${item.name}`, placeholder: "Note for your agent (optional). What to use it for, what to change.", value: item.capture.instructions ?? "", onChange: (e6) => saveBasket(noteInBasket(basket, item.id, e6.currentTarget.value)) })] })) }), mergeable.length > 0 && u2("div", { class: "stack", "data-part": "merge", children: [u2("span", { class: "dim", children: ["One site, several pages: ", mergeable.map((g2) => `${g2.type} from ${g2.pages.length} pages of ${g2.site}`).join(", "), ". Merge them into one site file. Each row says which pages use it; values that differ are listed as conflicts."] }), u2("span", { class: "row", children: u2("button", { type: "button", class: "btn-secondary", "data-action": "merge-systems", onClick: mergeSystemsNow, children: ["Merge into site system", mergeable.length === 1 ? "" : "s", " (", mergeable.length, ")"] }) })] }), mergedNote && u2("p", { class: "hint", "data-part": "merged", children: mergedNote }), compareItems && u2("div", { class: "row", "data-part": "compare-pick", children: [u2("span", { class: "dim", children: [compareItems[0].name, " and ", compareItems[1].name] }), u2("button", { type: "button", class: "btn-secondary", "data-action": "compare", onClick: () => {
34228
34229
  setComparison({ items: compareItems, result: compareCaptures(compareItems[0].capture, compareItems[1].capture) });
34229
34230
  setCopied(false);
34230
- }, children: "Compare the two" })] }), u2("div", { class: "row", children: [u2("button", { type: "button", class: "btn-primary", "data-action": "export-all", disabled: !basket.length, onClick: () => setBasketExport({ title: `All ${basket.length} items, one file` }), children: "Export all as one file" }), props.saveToProject && u2("button", { type: "button", class: "btn-secondary", "data-action": "send-all-project", disabled: !basket.length || basketSending, title: activeProject?.name ? `Save each capture in the basket to ${activeProject.name}/.luci/design/` : "Save each capture in the basket to .luci/design/ in your project", onClick: () => void sendAllToProject(), children: basketSending ? u2(S, { children: [u2(ButtonSpinner, {}), "Sending\u2026"] }) : activeProject?.name ? `Send all to ${activeProject.name}` : "Send all to project" }), basket.length > 0 && (confirmClear ? u2("button", { type: "button", class: "btn-danger", "data-action": "clear-basket-confirm", onClick: () => {
34231
+ }, children: "Compare the two" })] }), u2("div", { class: "row", children: [u2("button", { type: "button", class: "btn-primary", "data-action": "export-all", disabled: !basket.length, onClick: () => setBasketExport({ title: `All ${basket.length} items, one file` }), children: "Export all as one file" }), props.saveToProject && u2("button", { type: "button", class: "btn-secondary", "data-action": "send-all-project", disabled: !basket.length || basketSending, title: activeProject?.name ? `Save each capture in the basket to ${activeProject.name}/.luci/design/` : "Save each capture in the basket to .luci/design/ in your project", onClick: () => void sendAllToProject(), children: basketSending ? u2(S, { children: [u2(ButtonSpinner, {}), "Sending\u2026"] }) : "Send all to project" }), basket.length > 0 && (confirmClear ? u2("button", { type: "button", class: "btn-danger", "data-action": "clear-basket-confirm", onClick: () => {
34231
34232
  saveBasket([]);
34232
34233
  setConfirmClear(false);
34233
34234
  }, children: "Yes, empty the basket" }) : u2("button", { type: "button", class: "btn-danger", "data-action": "clear-basket", onClick: () => setConfirmClear(true), children: "Empty basket" }))] }), basketStatus && u2("p", { class: basketStatus.error ? "error" : "hint", "data-part": "basket-status", children: basketStatus.text })] }) }), !settingsOpen && (picking || dropperOpen || pixelMode || imageMode) && tool && u2("div", { class: `sub with-luci${imageMode ? " image-drop" : ""}`, "data-part": "tool-hint", role: "note", ...imageMode ? {
@@ -35146,7 +35147,7 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
35146
35147
  var isCopied = (i3) => shownStatus(i3.status) === "copied";
35147
35148
  var plural4 = (n2, word) => `${n2} ${word}${n2 === 1 ? "" : "s"}`;
35148
35149
  var popAt = (win, x3, y3) => ({
35149
- left: `${Math.max(12, Math.min(x3, win.innerWidth - 352))}px`,
35150
+ left: `${Math.max(12, Math.min(x3, win.innerWidth - 376))}px`,
35150
35151
  top: `${Math.max(12, Math.min(y3 + 12, win.innerHeight - 320))}px`
35151
35152
  });
35152
35153
  var PAUSE_CSS = "*, *::before, *::after { animation-play-state: paused !important; transition: none !important; caret-color: transparent !important; }";
@@ -35465,7 +35466,7 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
35465
35466
  const [hook, setHook] = d2(s3.webhookUrl ?? "");
35466
35467
  const [confirm, setConfirm] = d2(false);
35467
35468
  const validHook = !hook || /^https?:\/\/\S+$/.test(hook);
35468
- return u2("div", { class: "panel", role: "dialog", "aria-label": "Feedback settings", "data-part": "settings", children: [u2("div", { class: "settings-head", children: [u2("div", { class: "row", style: { alignItems: "center", gap: "8px" }, children: [u2("h2", { children: "Settings" }), u2(Badge, { brand: true, children: "Beta" })] }), u2(RepoButton, {})] }), u2(AppearanceControls, { prefs: props.uiPrefs, onChange: props.onUiPrefsChange, movable: true, moved: Boolean(props.uiPrefs.devPlace) }), u2("hr", { class: "settings-divider" }), u2("div", { class: "stack", children: [u2("span", { children: "Marker color" }), u2("div", { class: "swatches", role: "group", "aria-label": "Marker color", children: MARKER_COLORS2.map((c4) => u2("button", { type: "button", "aria-label": c4, "aria-pressed": s3.markerColor === c4, "data-color": c4, style: { background: c4 }, onClick: () => props.onChange({ ...s3, markerColor: c4 }) })) })] }), u2("label", { children: ["Prompt detail ", u2(Select, { "data-part": "detail", value: s3.detail, onChange: (e6) => props.onChange({ ...s3, detail: e6.currentTarget.value }), children: DETAIL_LEVELS.map((d3) => u2("option", { value: d3, children: d3 })) })] }), u2("p", { class: "dim", children: "compact: selector and text. standard: + source file and components. detailed: + computed styles." }), u2("div", { class: "stack", children: [u2("span", { children: "Webhook (optional)" }), u2("input", { type: "url", class: "field", "data-part": "webhook", placeholder: "https://...", value: hook, onInput: (e6) => setHook(e6.currentTarget.value.trim()) }), u2("div", { class: "row", children: [u2("button", { type: "button", "data-action": "save-webhook", disabled: !validHook, onClick: () => {
35469
+ return u2("div", { class: "panel", role: "dialog", "aria-label": "Feedback settings", "data-part": "settings", children: [u2("div", { class: "settings-head", children: [u2("div", { class: "row", style: { alignItems: "center", gap: "8px" }, children: u2("h2", { children: "Settings" }) }), u2(RepoButton, {})] }), u2(AppearanceControls, { prefs: props.uiPrefs, onChange: props.onUiPrefsChange, movable: true, moved: Boolean(props.uiPrefs.devPlace) }), u2("hr", { class: "settings-divider" }), u2("div", { class: "stack", children: [u2("span", { children: "Marker color" }), u2("div", { class: "swatches", role: "group", "aria-label": "Marker color", children: MARKER_COLORS2.map((c4) => u2("button", { type: "button", "aria-label": c4, "aria-pressed": s3.markerColor === c4, "data-color": c4, style: { background: c4 }, onClick: () => props.onChange({ ...s3, markerColor: c4 }) })) })] }), u2("label", { children: ["Prompt detail ", u2(Select, { "data-part": "detail", value: s3.detail, onChange: (e6) => props.onChange({ ...s3, detail: e6.currentTarget.value }), children: DETAIL_LEVELS.map((d3) => u2("option", { value: d3, children: d3 })) })] }), u2("p", { class: "dim", children: "compact: selector and text. standard: + source file and components. detailed: + computed styles." }), u2("div", { class: "stack", children: [u2("span", { children: "Webhook (optional)" }), u2("input", { type: "url", class: "field", "data-part": "webhook", placeholder: "https://...", value: hook, onInput: (e6) => setHook(e6.currentTarget.value.trim()) }), u2("div", { class: "row", children: [u2("button", { type: "button", "data-action": "save-webhook", disabled: !validHook, onClick: () => {
35469
35470
  const { webhookUrl: _w, ...rest } = s3;
35470
35471
  props.onChange(hook ? { ...rest, webhookUrl: hook } : rest);
35471
35472
  }, children: "Save webhook" }), u2("span", { class: "dim", children: "Sent only when you press Send to webhook." })] })] }), u2("div", { class: "row danger", children: confirm ? u2("button", { class: "btn-danger", type: "button", "data-action": "clear-all-confirm", onClick: () => {
@@ -35503,11 +35504,11 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
35503
35504
  .marker.lost { opacity: 0.6; }
35504
35505
 
35505
35506
  /* The note popover */
35506
- .pop { position: fixed; z-index: 2147483647; width: min(360px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: var(--luci-space-12); padding: var(--luci-space-16);
35507
- background: var(--luci-color-surface); border-radius: var(--luci-radius-lg); box-shadow: var(--luci-shadow-float); }
35507
+ .pop { position: fixed; z-index: 2147483647; box-sizing: border-box; width: min(360px, calc(100vw - 24px)); max-width: calc(100vw - 24px); display: flex; flex-direction: column; gap: var(--luci-space-12); padding: var(--luci-space-16);
35508
+ background: var(--luci-color-surface); border-radius: var(--luci-radius-lg); box-shadow: var(--luci-shadow-float); overflow-wrap: break-word; word-break: break-word; }
35508
35509
  .pop h3 { margin: 0; font: var(--luci-type-heading-weight) var(--luci-type-heading-size)/var(--luci-type-heading-line) var(--luci-font-body); }
35509
35510
  .pop textarea { min-height: 72px; }
35510
- .pop .quote { margin: 0; padding: var(--luci-space-8) var(--luci-space-12); border-radius: var(--luci-radius-md); background: var(--luci-color-surface-sunken); color: var(--luci-color-ink-secondary); }
35511
+ .pop .quote, .details .quote { margin: 0; padding: var(--luci-space-8) var(--luci-space-12); border-radius: var(--luci-radius-md); background: var(--luci-color-surface-sunken); color: var(--luci-color-ink-secondary); overflow-wrap: break-word; word-break: break-word; }
35511
35512
  .thread { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--luci-space-4); }
35512
35513
  .thread li { padding: var(--luci-space-8) var(--luci-space-12); border-radius: var(--luci-radius-md); background: var(--luci-color-surface-sunken); }
35513
35514
  .thread li.agent { background: var(--luci-color-primary-soft); }
@@ -35546,14 +35547,16 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
35546
35547
  border-radius: var(--luci-radius-lg); text-align: left; white-space: normal; font-weight: 400; }
35547
35548
  .row-main .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
35548
35549
  .row-main .comment { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
35549
- .meta { margin: 0; color: var(--luci-color-ink-secondary); font-size: var(--luci-type-small-size); }
35550
+ .meta { margin: 0; color: var(--luci-color-ink-secondary); font-size: var(--luci-type-small-size); overflow-wrap: anywhere; word-break: break-word; }
35551
+ .meta code, .details code, [data-part="note-source"] code { font: var(--luci-type-code-weight) 12px/1.4 var(--luci-font-code); color: var(--luci-color-ink); background: var(--luci-color-surface-sunken); padding: 1px var(--luci-space-4); border-radius: var(--luci-radius-sm); word-break: break-all; overflow-wrap: anywhere; white-space: normal; }
35550
35552
  .dot { flex: none; min-width: 22px; height: 22px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--luci-radius-full);
35551
35553
  background: var(--marker); color: var(--marker-ink); font: 600 11px/1 var(--luci-font-body); }
35552
35554
  .dot.copied { background: var(--luci-color-surface-sunken); color: var(--luci-color-ink); }
35553
35555
  .dot.done { background: var(--luci-color-success-bg); color: var(--luci-color-success); }
35554
35556
  .row-details { display: flex; flex-direction: column; gap: var(--luci-space-8); padding: 0 var(--luci-space-12) var(--luci-space-12) 46px; }
35555
- .details h3 { display: flex; gap: var(--luci-space-8); align-items: center; }
35556
- .details .comment { margin: 0; }
35557
+ .details { display: flex; flex-direction: column; gap: var(--luci-space-8); min-width: 0; max-width: 100%; overflow-wrap: break-word; word-break: break-word; }
35558
+ .details h3 { display: flex; gap: var(--luci-space-8); align-items: center; flex-wrap: wrap; margin: 0; }
35559
+ .details .comment { margin: 0; overflow-wrap: break-word; word-break: break-word; white-space: pre-wrap; }
35557
35560
  .row-details .details { gap: var(--luci-space-8); }
35558
35561
  .link, .luci-theme .link-button { color: var(--luci-color-link); align-self: flex-start; }
35559
35562
  .luci-theme .link-button { min-height: 0; padding: 0; text-decoration: underline; font-weight: 500; }
@@ -36179,8 +36182,8 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
36179
36182
  continue;
36180
36183
  const token = scale.tokens.get(parseFloat(to));
36181
36184
  const k6 = this.kept.get(el);
36182
- const side = prop === "width" && k6?.x ? k6.x.keep === "end" ? "left" : "right" : prop === "height" && k6?.y ? k6.y.keep === "end" ? "up" : "down" : void 0;
36183
- out.push({ op: "set", property: prop, from, to, ...token ? { token } : {}, ...side ? { grow: side } : {} });
36185
+ const side2 = prop === "width" && k6?.x ? k6.x.keep === "end" ? "left" : "right" : prop === "height" && k6?.y ? k6.y.keep === "end" ? "up" : "down" : void 0;
36186
+ out.push({ op: "set", property: prop, from, to, ...token ? { token } : {}, ...side2 ? { grow: side2 } : {} });
36184
36187
  }
36185
36188
  for (const ins of this.added.values()) {
36186
36189
  if (ins.anchor !== el)
@@ -36651,9 +36654,9 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
36651
36654
  function handleStyle(edge, b2) {
36652
36655
  const x3 = edge.includes("w") ? b2.left : edge.includes("e") ? b2.right : b2.left + b2.width / 2;
36653
36656
  const y3 = edge.includes("n") ? b2.top : edge.includes("s") ? b2.bottom : b2.top + b2.height / 2;
36654
- const side = edge.length === 1;
36655
- const w3 = side && (edge === "e" || edge === "w") ? 10 : side ? 24 : 14;
36656
- const h3 = side && (edge === "n" || edge === "s") ? 10 : side ? 24 : 14;
36657
+ const side2 = edge.length === 1;
36658
+ const w3 = side2 && (edge === "e" || edge === "w") ? 10 : side2 ? 24 : 14;
36659
+ const h3 = side2 && (edge === "n" || edge === "s") ? 10 : side2 ? 24 : 14;
36657
36660
  return { left: `${x3 - w3 / 2}px`, top: `${y3 - h3 / 2}px`, width: `${w3}px`, height: `${h3}px`, cursor: CURSOR[edge] };
36658
36661
  }
36659
36662
  function Layout(props) {
@@ -37082,7 +37085,7 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
37082
37085
  } }), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: RotateCcw, label: "Reset", tip: "Back to what your code has", "data-action": "reset", disabled: !plannedCount && !p6.canUndo, onClick: () => {
37083
37086
  p6.reset();
37084
37087
  bump();
37085
- } }), u2(Button, { iconOnly: true, size: "lg", variant: "primary", class: "tool", icon: ClipboardCopy, "data-action": "copy-layout-prompt", disabled: !plannedCount || Boolean(busy), loading: busy === "copy", badge: plannedCount || void 0, label: busy === "copy" ? "Copying" : `Copy prompt${plannedCount ? ` (${plannedCount})` : ""}`, tip: "The page goes back as it was", onClick: () => void copyPrompt() })] }), u2("span", { class: `conn ${backend.kind}`, "data-part": "connection", title: backend.kind === "project" ? "Notes are saved in the project" : props.connectNote ?? "", children: backend.kind === "project" ? "Project" : "This browser" }), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: X2, label: "Close Luci", "data-action": "close", onClick: props.onClose })] }), settingsOpen && (props.modes ? u2(DevSettingsPanel, { currentMode: "layout", uiPrefs, onUiPrefsChange: setUiPrefs, projectInfo: props.projectInfo, store: props.store }) : u2("div", { class: "panel", role: "dialog", "aria-label": "Layout settings", "data-part": "settings", children: [u2("div", { class: "settings-head", children: [u2("div", { class: "row", style: { alignItems: "center", gap: "8px" }, children: [u2("h2", { children: "Settings" }), u2(Badge, { brand: true, children: "Beta" })] }), u2(RepoButton, {})] }), u2(AppearanceControls, { prefs: uiPrefs, onChange: setUiPrefs, movable: true, moved: Boolean(uiPrefs.devPlace) })] })), sketching && scale && u2(Sketch, { doc, backend, base: scale.base, onClose: () => setSketching(false) }), !sketching && u2(S, { children: [!scale && u2("div", { class: "sub", children: u2(Loading, { text: "Reading the page's spacing scale\u2026", part: "scale-loading", sleep: true }) }), result?.why && u2("div", { class: "sub", role: "status", "data-part": "reset-note", children: u2("p", { class: "hint", children: ["Preview cleared. Your plan is safe in the ", result.prompt ? "copied prompt" : "Feedback notes", "."] }) }), scale && selecting && !selected && !result && !catalog && !placing && u2("div", { class: "sub with-luci", role: "note", "data-part": "hint", children: [u2(Mascot, { pose: "arrange", size: 96 }), u2("div", { class: "sub-body", children: u2("p", { class: "hint", children: ["Click an element. Drag its handles to resize, \u283F to move it. Values snap to this page's ", scale.base, "px scale. Your code stays as it is."] }) })] }), scale && placing && !drag && u2("div", { class: "pick-layer", "data-part": "place-layer", onPointerMove: (e6) => {
37088
+ } }), u2(Button, { iconOnly: true, size: "lg", variant: "primary", class: "tool", icon: ClipboardCopy, "data-action": "copy-layout-prompt", disabled: !plannedCount || Boolean(busy), loading: busy === "copy", badge: plannedCount || void 0, label: busy === "copy" ? "Copying" : `Copy prompt${plannedCount ? ` (${plannedCount})` : ""}`, tip: "The page goes back as it was", onClick: () => void copyPrompt() })] }), u2("span", { class: `conn ${backend.kind}`, "data-part": "connection", title: backend.kind === "project" ? "Notes are saved in the project" : props.connectNote ?? "", children: backend.kind === "project" ? "Project" : "This browser" }), u2(Button, { iconOnly: true, size: "lg", class: "tool", icon: X2, label: "Close Luci", "data-action": "close", onClick: props.onClose })] }), settingsOpen && (props.modes ? u2(DevSettingsPanel, { currentMode: "layout", uiPrefs, onUiPrefsChange: setUiPrefs, projectInfo: props.projectInfo, store: props.store }) : u2("div", { class: "panel", role: "dialog", "aria-label": "Layout settings", "data-part": "settings", children: [u2("div", { class: "settings-head", children: [u2("div", { class: "row", style: { alignItems: "center", gap: "8px" }, children: u2("h2", { children: "Settings" }) }), u2(RepoButton, {})] }), u2(AppearanceControls, { prefs: uiPrefs, onChange: setUiPrefs, movable: true, moved: Boolean(uiPrefs.devPlace) })] })), sketching && scale && u2(Sketch, { doc, backend, base: scale.base, onClose: () => setSketching(false) }), !sketching && u2(S, { children: [!scale && u2("div", { class: "sub", children: u2(Loading, { text: "Reading the page's spacing scale\u2026", part: "scale-loading", sleep: true }) }), result?.why && u2("div", { class: "sub", role: "status", "data-part": "reset-note", children: u2("p", { class: "hint", children: ["Preview cleared. Your plan is safe in the ", result.prompt ? "copied prompt" : "Feedback notes", "."] }) }), scale && selecting && !selected && !result && !catalog && !placing && u2("div", { class: "sub with-luci", role: "note", "data-part": "hint", children: [u2(Mascot, { pose: "arrange", size: 96 }), u2("div", { class: "sub-body", children: u2("p", { class: "hint", children: ["Click an element. Drag its handles to resize, \u283F to move it. Values snap to this page's ", scale.base, "px scale. Your code stays as it is."] }) })] }), scale && placing && !drag && u2("div", { class: "pick-layer", "data-part": "place-layer", onPointerMove: (e6) => {
37086
37089
  const el = elementAt(doc, e6.clientX, e6.clientY);
37087
37090
  setPlaceHover(el && !isLuciUi(el) ? placeTarget(doc, el, e6.clientX, e6.clientY) : null);
37088
37091
  }, onClick: (e6) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luci-dev/toolbar",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "The dev toolbar: feedback and capture in your own app, saved into the project through luci serve.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -17,10 +17,10 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@luci-dev/capture": "0.5.4",
21
- "@luci-dev/feedback": "0.5.4",
22
- "@luci-dev/format": "0.5.4",
23
- "@luci-dev/ui": "0.5.4"
20
+ "@luci-dev/capture": "0.5.5",
21
+ "@luci-dev/feedback": "0.5.5",
22
+ "@luci-dev/format": "0.5.5",
23
+ "@luci-dev/ui": "0.5.5"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"