@ai-matrx/canvas 0.10.33 → 0.10.35
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/CHANGELOG.md +12 -0
- package/dist/react.cjs +46 -33
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +5 -1
- package/dist/react.d.ts +5 -1
- package/dist/react.js +46 -33
- package/dist/react.js.map +1 -1
- package/dist/styles.css +89 -23
- package/dist/tokens.css +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.35
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/canvas/v0.10.34..npm/canvas/v0.10.35 -- apps/shared/canvas`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.10.34
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/canvas/v0.10.33..npm/canvas/v0.10.34 -- apps/shared/canvas`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.10.33
|
|
4
16
|
|
|
5
17
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/react.cjs
CHANGED
|
@@ -2320,14 +2320,6 @@ var AlertIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Glyph, { ..
|
|
|
2320
2320
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 8v4" }),
|
|
2321
2321
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 16h.01" })
|
|
2322
2322
|
] });
|
|
2323
|
-
var ArrowLeftIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Glyph, { ...p, children: [
|
|
2324
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 19-7-7 7-7" }),
|
|
2325
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19 12H5" })
|
|
2326
|
-
] });
|
|
2327
|
-
var ArrowRightIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Glyph, { ...p, children: [
|
|
2328
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5 12h14" }),
|
|
2329
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 5 7 7-7 7" })
|
|
2330
|
-
] });
|
|
2331
2323
|
var RotateCwIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Glyph, { ...p, children: [
|
|
2332
2324
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }),
|
|
2333
2325
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 3v5h-5" })
|
|
@@ -2352,6 +2344,8 @@ var LayoutGridIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Glyph,
|
|
|
2352
2344
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { width: "7", height: "7", x: "14", y: "14", rx: "1" }),
|
|
2353
2345
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { width: "7", height: "7", x: "3", y: "14", rx: "1" })
|
|
2354
2346
|
] });
|
|
2347
|
+
var ChevronLeftIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Glyph, { ...p, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m15 18-6-6 6-6" }) });
|
|
2348
|
+
var ChevronRightIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Glyph, { ...p, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m9 18 6-6-6-6" }) });
|
|
2355
2349
|
var ChevronDownIcon = (p) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Glyph, { ...p, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 9 6 6 6-6" }) });
|
|
2356
2350
|
|
|
2357
2351
|
// src/react/chrome.tsx
|
|
@@ -2576,47 +2570,66 @@ function BrowserTabs({ tabs, activeId, onSelect, onClose, onNew, newLabel = "New
|
|
|
2576
2570
|
onNew ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CanvasHeaderButton, { label: newLabel, "data-slot": "browser-tab-new", onClick: onNew, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PlusIcon, {}) }) : null
|
|
2577
2571
|
] });
|
|
2578
2572
|
}
|
|
2573
|
+
function addressDisplay(url) {
|
|
2574
|
+
if (!url) return "";
|
|
2575
|
+
try {
|
|
2576
|
+
const parsed = new URL(url);
|
|
2577
|
+
if (parsed.protocol === "http:" || parsed.protocol === "https:") return parsed.host.replace(/^www\./, "") || url;
|
|
2578
|
+
return url;
|
|
2579
|
+
} catch {
|
|
2580
|
+
return url;
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2579
2583
|
function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload, onNavigate, trailing, className }) {
|
|
2580
2584
|
const [draft, setDraft] = (0, import_react5.useState)(url);
|
|
2581
2585
|
const [editing, setEditing] = (0, import_react5.useState)(false);
|
|
2582
2586
|
(0, import_react5.useEffect)(() => {
|
|
2583
2587
|
if (!editing) setDraft(url);
|
|
2584
2588
|
}, [url, editing]);
|
|
2589
|
+
const shown = addressDisplay(url);
|
|
2585
2590
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "browser-bar", className: cx("mxc-browser-bar", className), children: [
|
|
2586
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2591
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { role: "group", "aria-label": "History", className: "mxc-capsule", children: [
|
|
2592
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CanvasHeaderButton, { size: "md", label: "Back", available: canGoBack, onClick: onBack, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronLeftIcon, {}) }),
|
|
2593
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, className: "mxc-capsule-divider" }),
|
|
2594
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CanvasHeaderButton, { size: "md", label: "Forward", available: canGoForward, onClick: onForward, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronRightIcon, {}) })
|
|
2595
|
+
] }),
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
2590
2597
|
"form",
|
|
2591
2598
|
{
|
|
2592
2599
|
className: "mxc-address-form",
|
|
2600
|
+
"data-editing": editing ? "" : void 0,
|
|
2593
2601
|
onSubmit: (event) => {
|
|
2594
2602
|
event.preventDefault();
|
|
2595
2603
|
setEditing(false);
|
|
2596
2604
|
onNavigate(draft.trim());
|
|
2597
2605
|
event.currentTarget.elements.namedItem("address")?.blur();
|
|
2598
2606
|
},
|
|
2599
|
-
children:
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
event
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2607
|
+
children: [
|
|
2608
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2609
|
+
"input",
|
|
2610
|
+
{
|
|
2611
|
+
name: "address",
|
|
2612
|
+
"aria-label": "Address",
|
|
2613
|
+
"data-slot": "browser-address",
|
|
2614
|
+
"data-shown": !editing && shown ? "host" : void 0,
|
|
2615
|
+
className: "mxc-address",
|
|
2616
|
+
value: draft,
|
|
2617
|
+
placeholder: "Search or enter website",
|
|
2618
|
+
spellCheck: false,
|
|
2619
|
+
onFocus: (event) => {
|
|
2620
|
+
setEditing(true);
|
|
2621
|
+
event.currentTarget.select();
|
|
2622
|
+
},
|
|
2623
|
+
onBlur: () => setEditing(false),
|
|
2624
|
+
onChange: (event) => setDraft(event.target.value)
|
|
2625
|
+
}
|
|
2626
|
+
),
|
|
2627
|
+
!editing && shown ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, "data-slot": "browser-address-host", className: "mxc-address-host", children: shown }) : null,
|
|
2628
|
+
url ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CanvasHeaderButton, { label: "Reload", className: "mxc-address-reload", onClick: onReload, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RotateCwIcon, {}) }) : null
|
|
2629
|
+
]
|
|
2617
2630
|
}
|
|
2618
2631
|
),
|
|
2619
|
-
trailing ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-slot": "browser-bar-trailing", className: "mxc-browser-bar-trailing", children: trailing }) : null
|
|
2632
|
+
trailing ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-slot": "browser-bar-trailing", className: "mxc-browser-bar-trailing mxc-capsule", children: trailing }) : null
|
|
2620
2633
|
] });
|
|
2621
2634
|
}
|
|
2622
2635
|
|
|
@@ -3382,7 +3395,7 @@ function CanvasPaneView({ paneId }) {
|
|
|
3382
3395
|
focused,
|
|
3383
3396
|
"data-mxc-pane": paneId,
|
|
3384
3397
|
header: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3385
|
-
canGoBack && active ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CanvasHeaderButton, { className: "mxc-back", label: "Back", shortcut: canvasShortcutHint("canvas.back", isMac()), onClick: () => void canvas.back(active.id), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3398
|
+
canGoBack && active ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CanvasHeaderButton, { className: "mxc-back", label: "Back", shortcut: canvasShortcutHint("canvas.back", isMac()), onClick: () => void canvas.back(active.id), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronLeftIcon, {}) }) : null,
|
|
3386
3399
|
canGoForward && active ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3387
3400
|
CanvasHeaderButton,
|
|
3388
3401
|
{
|
|
@@ -3390,7 +3403,7 @@ function CanvasPaneView({ paneId }) {
|
|
|
3390
3403
|
label: "Forward",
|
|
3391
3404
|
shortcut: canvasShortcutHint("canvas.forward", isMac()),
|
|
3392
3405
|
onClick: () => void canvas.forward(active.id),
|
|
3393
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronRightIcon, {})
|
|
3394
3407
|
}
|
|
3395
3408
|
) : null,
|
|
3396
3409
|
inWindowStrip ? active ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PaneTitle, { item: active, kind }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "mxc-panel-title", children: "New tab" }) : single && active ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SingleTitle, { item: active, kind }) : tabs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TabStrip, { tabs, activeItemId: pane.activeItemId }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "mxc-panel-title", children: "New tab" }),
|