@luci-dev/toolbar 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/luci-toolbar.js +13 -8
- package/package.json +16 -6
package/dist/luci-toolbar.js
CHANGED
|
@@ -31325,8 +31325,8 @@ module.exports = {
|
|
|
31325
31325
|
}
|
|
31326
31326
|
|
|
31327
31327
|
// packages/ui/dist/about.js
|
|
31328
|
-
var LUCI_VERSION = "0.
|
|
31329
|
-
var LUCI_REPO_URL =
|
|
31328
|
+
var LUCI_VERSION = "0.5.2";
|
|
31329
|
+
var LUCI_REPO_URL = "https://github.com/waidesign/luci-by-pawprint.design";
|
|
31330
31330
|
|
|
31331
31331
|
// packages/ui/dist/copy.js
|
|
31332
31332
|
var items = (n2) => `${n2} ${n2 === 1 ? "item" : "items"}`;
|
|
@@ -31402,8 +31402,8 @@ module.exports = {
|
|
|
31402
31402
|
return u2("button", { type, class: cls, ...iconOnly && name ? { "aria-label": name } : {}, ...shortcut ? { "aria-keyshortcuts": shortcut } : {}, ...tipText ? { "data-tip": tipText } : {}, ...tipText && tipAbove ? { "data-tip-pos": "above" } : {}, ...tipText && tipAlign && tipAlign !== "center" ? { "data-tip-align": tipAlign } : {}, ...loading ? { "aria-busy": "true" } : {}, onClick: loading ? void 0 : onClick, ...rest, children: [icon && u2(Icon2, { icon, size: iconSize }), !iconOnly && (children ?? label), badge !== void 0 && badge !== "" && badge !== 0 && u2("span", { class: "btn-badge", "aria-hidden": "true", children: badge })] });
|
|
31403
31403
|
}
|
|
31404
31404
|
function RepoButton() {
|
|
31405
|
-
const inner = u2(S, { children: [u2("span", { class: "gh-mark", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: ICON_SVG.github } }), u2("span", { class: "repo-version", children: ["v", LUCI_VERSION] })] });
|
|
31406
|
-
return LUCI_REPO_URL ? u2("a", { class: "repo-btn", "data-part": "repo", href: LUCI_REPO_URL, target: "_blank", rel: "noopener noreferrer", "aria-label": `${COPY.repo.link}, version ${LUCI_VERSION}`, "data-tip": COPY.repo.link, children: inner }) : u2("span", { class: "repo-btn", "data-part": "repo", role: "img", "aria-label": `Luci version ${LUCI_VERSION}. ${COPY.repo.soon}`, "data-tip": COPY.repo.soon, children: inner });
|
|
31405
|
+
const inner = u2(S, { children: [u2("span", { class: "gh-mark", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: ICON_SVG.github } }), u2("span", { class: "repo-version", children: ["v", LUCI_VERSION] }), u2("span", { class: "repo-beta", children: "Beta" })] });
|
|
31406
|
+
return LUCI_REPO_URL ? u2("a", { class: "repo-btn", "data-part": "repo", href: LUCI_REPO_URL, target: "_blank", rel: "noopener noreferrer", "aria-label": `${COPY.repo.link}, version ${LUCI_VERSION} (Beta)`, "data-tip": COPY.repo.link, children: inner }) : u2("span", { class: "repo-btn", "data-part": "repo", role: "img", "aria-label": `Luci version ${LUCI_VERSION} (Beta). ${COPY.repo.soon}`, "data-tip": COPY.repo.soon, children: inner });
|
|
31407
31407
|
}
|
|
31408
31408
|
function Select(props) {
|
|
31409
31409
|
const { class: extra, children, ...rest } = props;
|
|
@@ -31412,6 +31412,9 @@ module.exports = {
|
|
|
31412
31412
|
function EmptyState(props) {
|
|
31413
31413
|
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
31414
|
}
|
|
31415
|
+
function Badge(props) {
|
|
31416
|
+
return u2("span", { class: props.brand ? "badge brand" : "badge", children: props.children });
|
|
31417
|
+
}
|
|
31415
31418
|
|
|
31416
31419
|
// packages/ui/dist/styles.js
|
|
31417
31420
|
var BASE_CSS = `
|
|
@@ -31580,6 +31583,8 @@ module.exports = {
|
|
|
31580
31583
|
.luci-theme .repo-btn { position: relative; display: inline-flex; flex: none; align-items: center; gap: 6px; height: 32px; padding: 0 var(--luci-space-12);
|
|
31581
31584
|
border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-full); background: var(--luci-color-surface-raised);
|
|
31582
31585
|
color: var(--luci-color-ink); font: 600 13px/1 var(--luci-font-code); text-decoration: none; white-space: nowrap; }
|
|
31586
|
+
.luci-theme .repo-btn .repo-beta { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--luci-radius-full);
|
|
31587
|
+
background: var(--luci-color-primary-soft); color: var(--luci-color-link); font: 700 10px/1.2 var(--luci-font-sans); text-transform: uppercase; letter-spacing: 0.04em; margin-left: 2px; }
|
|
31583
31588
|
.luci-theme a.repo-btn:hover { background: var(--luci-color-ghost-hover); }
|
|
31584
31589
|
.luci-theme a.repo-btn:focus-visible { outline: 2px solid var(--luci-color-focus); outline-offset: 2px; }
|
|
31585
31590
|
.luci-theme .repo-btn .gh-mark { display: block; width: 16px; height: 16px; line-height: 0; }
|
|
@@ -32735,7 +32740,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
|
|
|
32735
32740
|
}
|
|
32736
32741
|
}, []);
|
|
32737
32742
|
const useDebugger = capSettings.useDebugger ?? true;
|
|
32738
|
-
return u2("div", { class: "panel", role: "dialog", "aria-label": "Settings", "data-part": "settings", children: [u2("div", { class: "settings-head", 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) => {
|
|
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) => {
|
|
32739
32744
|
const val = e6.currentTarget.value;
|
|
32740
32745
|
setBridgePortInput(val);
|
|
32741
32746
|
void props.projectInfo?.setUrl?.(val).then(refreshProject);
|
|
@@ -34203,7 +34208,7 @@ button .spinner { display: inline-block; width: 12px; height: 12px; vertical-ali
|
|
|
34203
34208
|
const hoverElig = hovered ? eligibilityOf(hovered) : null;
|
|
34204
34209
|
const rect = hovered?.getBoundingClientRect();
|
|
34205
34210
|
const cs = hovered && tool === "spacing" ? win.getComputedStyle(hovered) : null;
|
|
34206
|
-
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) => {
|
|
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) => {
|
|
34207
34212
|
const val = e6.currentTarget.value;
|
|
34208
34213
|
setBridgePortInput(val);
|
|
34209
34214
|
void props.projectInfo?.setUrl?.(val).then(refreshProject);
|
|
@@ -35460,7 +35465,7 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
|
|
|
35460
35465
|
const [hook, setHook] = d2(s3.webhookUrl ?? "");
|
|
35461
35466
|
const [confirm, setConfirm] = d2(false);
|
|
35462
35467
|
const validHook = !hook || /^https?:\/\/\S+$/.test(hook);
|
|
35463
|
-
return u2("div", { class: "panel", role: "dialog", "aria-label": "Feedback settings", "data-part": "settings", children: [u2("div", { class: "settings-head", 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: () => {
|
|
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: () => {
|
|
35464
35469
|
const { webhookUrl: _w, ...rest } = s3;
|
|
35465
35470
|
props.onChange(hook ? { ...rest, webhookUrl: hook } : rest);
|
|
35466
35471
|
}, 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: () => {
|
|
@@ -37077,7 +37082,7 @@ padding ${cs.padding} margin ${cs.margin}${/flex|grid/.test(cs.display) ? ` ga
|
|
|
37077
37082
|
} }), 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: () => {
|
|
37078
37083
|
p6.reset();
|
|
37079
37084
|
bump();
|
|
37080
|
-
} }), 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("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) => {
|
|
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) => {
|
|
37081
37086
|
const el = elementAt(doc, e6.clientX, e6.clientY);
|
|
37082
37087
|
setPlaceHover(el && !isLuciUi(el) ? placeTarget(doc, el, e6.clientX, e6.clientY) : null);
|
|
37083
37088
|
}, onClick: (e6) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luci-dev/toolbar",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
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,12 +17,22 @@
|
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@luci-dev/capture": "0.5.
|
|
21
|
-
"@luci-dev/feedback": "0.5.
|
|
22
|
-
"@luci-dev/format": "0.5.
|
|
23
|
-
"@luci-dev/ui": "0.5.
|
|
20
|
+
"@luci-dev/capture": "0.5.2",
|
|
21
|
+
"@luci-dev/feedback": "0.5.2",
|
|
22
|
+
"@luci-dev/format": "0.5.2",
|
|
23
|
+
"@luci-dev/ui": "0.5.2"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/waidesign/luci-by-pawprint.design.git",
|
|
31
|
+
"directory": "packages/toolbar"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/waidesign/luci-by-pawprint.design#readme",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/waidesign/luci-by-pawprint.design/issues"
|
|
36
|
+
},
|
|
37
|
+
"author": "Pawprint Design <lucas@pawprint.design>"
|
|
28
38
|
}
|