agentic-canvas 0.15.2 → 0.15.3
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/{chunk-PX6ZSCRO.js → chunk-E43YC3NG.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/embed.js +12 -12
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/embed.js
CHANGED
|
@@ -11,7 +11,7 @@ import { Component } from "react";
|
|
|
11
11
|
import { createRoot } from "react-dom/client";
|
|
12
12
|
|
|
13
13
|
// ui/BoardView.tsx
|
|
14
|
-
import { Button as Button2, EmptyState, Input, PresenceChip, PresenceStack, Select, Textarea,
|
|
14
|
+
import { Button as Button2, EmptyState, IconButton, Input, PresenceChip, PresenceStack, Select, Textarea, useToast } from "agentic-design/react";
|
|
15
15
|
import { useCallback, useEffect as useEffect2, useMemo, useRef as useRef2, useState as useState2 } from "react";
|
|
16
16
|
|
|
17
17
|
// ui/errors.ts
|
|
@@ -172,7 +172,7 @@ function Canvas({ data, selected, editable, view, onView, onSelect, onMove, onRe
|
|
|
172
172
|
/* @__PURE__ */ jsx("rect", { x, y: y - 20, width: el.machineMade ? 50 : 82, height: 18, rx: 4 }),
|
|
173
173
|
/* @__PURE__ */ jsx("text", { x: x + 6, y: y - 7, children: el.machineMade ? "Agent" : "Agent edit" })
|
|
174
174
|
] }) : null;
|
|
175
|
-
return /* @__PURE__ */ jsx("div", { ref: box, className: "canvas", role: "group", "aria-label": "Board canvas. Tab moves between items. Arrow keys move the selected item, Shift with arrows resizes it, Delete removes it, Escape clears the selection.", tabIndex:
|
|
175
|
+
return /* @__PURE__ */ jsx("div", { ref: box, className: "canvas", role: "group", "aria-label": "Board canvas. Tab moves between items. Arrow keys move the selected item, Shift with arrows resizes it, Delete removes it, Escape clears the selection.", tabIndex: -1, onKeyDown: key, onPointerMove: track, onPointerUp: end, onPointerCancel: end, children: /* @__PURE__ */ jsxs("svg", { width: "100%", height: "100%", onPointerDown: (e) => begin(e, "pan"), children: [
|
|
176
176
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "arrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "8", markerHeight: "8", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M0 0L10 5L0 10z", className: "arrowhead" }) }) }),
|
|
177
177
|
/* @__PURE__ */ jsxs("g", { transform: `translate(${view.x} ${view.y}) scale(${view.k})`, children: [
|
|
178
178
|
data.edges.map((e) => {
|
|
@@ -486,16 +486,16 @@ function BoardView({ id, client: remote, host, room: roomOptions, me, backHref }
|
|
|
486
486
|
!editable && /* @__PURE__ */ jsx3("p", { className: "note", children: host ? "This board is read only." : "This token can read the board but not change it." }),
|
|
487
487
|
/* @__PURE__ */ jsxs3("div", { className: "stage", children: [
|
|
488
488
|
/* @__PURE__ */ jsxs3("div", { className: "surface", ref: canvasBox, children: [
|
|
489
|
-
/* @__PURE__ */ jsx3("div", { className: "palette", children: /* @__PURE__ */ jsx3(
|
|
490
|
-
/* @__PURE__ */ jsx3("div", { className: "zoom", children: /* @__PURE__ */ jsxs3(
|
|
491
|
-
/* @__PURE__ */ jsx3(
|
|
492
|
-
/* @__PURE__ */ jsx3(
|
|
493
|
-
/* @__PURE__ */ jsx3(
|
|
494
|
-
/* @__PURE__ */ jsx3(
|
|
495
|
-
/* @__PURE__ */ jsx3(
|
|
496
|
-
/* @__PURE__ */ jsx3(
|
|
497
|
-
/* @__PURE__ */ jsx3(
|
|
498
|
-
/* @__PURE__ */ jsx3(
|
|
489
|
+
/* @__PURE__ */ jsx3("div", { className: "palette", children: /* @__PURE__ */ jsx3("div", { className: "agd-toolbar", role: "group", "aria-label": "Shape palette", children: TOOLS.map((t) => /* @__PURE__ */ jsx3(IconButton, { size: "sm", label: t.text, icon: t.icon, disabled: !editable, onClick: () => add(t.type) }, t.type)) }) }),
|
|
490
|
+
/* @__PURE__ */ jsx3("div", { className: "zoom", children: /* @__PURE__ */ jsxs3("div", { className: "agd-toolbar", role: "group", "aria-label": "Zoom and pan", children: [
|
|
491
|
+
/* @__PURE__ */ jsx3(IconButton, { size: "sm", label: "Zoom out", icon: icon(/* @__PURE__ */ jsx3("path", { d: "M4 10h12" })), onClick: () => zoom(1 / 1.25) }),
|
|
492
|
+
/* @__PURE__ */ jsx3(IconButton, { size: "sm", label: "Zoom in", icon: icon(/* @__PURE__ */ jsx3("path", { d: "M4 10h12M10 4v12" })), onClick: () => zoom(1.25) }),
|
|
493
|
+
/* @__PURE__ */ jsx3("span", { className: "agd-toolbar__separator", "aria-hidden": "true" }),
|
|
494
|
+
/* @__PURE__ */ jsx3(IconButton, { size: "sm", label: "Pan left", icon: icon(/* @__PURE__ */ jsx3("path", { d: "M12 4l-6 6 6 6" })), onClick: () => setView((v) => ({ ...v, x: v.x + PAN_STEP })) }),
|
|
495
|
+
/* @__PURE__ */ jsx3(IconButton, { size: "sm", label: "Pan right", icon: icon(/* @__PURE__ */ jsx3("path", { d: "M8 4l6 6-6 6" })), onClick: () => setView((v) => ({ ...v, x: v.x - PAN_STEP })) }),
|
|
496
|
+
/* @__PURE__ */ jsx3(IconButton, { size: "sm", label: "Pan up", icon: icon(/* @__PURE__ */ jsx3("path", { d: "M4 12l6-6 6 6" })), onClick: () => setView((v) => ({ ...v, y: v.y + PAN_STEP })) }),
|
|
497
|
+
/* @__PURE__ */ jsx3(IconButton, { size: "sm", label: "Pan down", icon: icon(/* @__PURE__ */ jsx3("path", { d: "M4 8l6 6 6-6" })), onClick: () => setView((v) => ({ ...v, y: v.y - PAN_STEP })) }),
|
|
498
|
+
/* @__PURE__ */ jsx3(IconButton, { size: "sm", label: "Reset view", icon: icon(/* @__PURE__ */ jsx3("path", { d: "M4 4h5M4 4v5M16 16h-5M16 16v-5" })), onClick: () => setView(HOME) })
|
|
499
499
|
] }) }),
|
|
500
500
|
/* @__PURE__ */ jsx3(Canvas, { data: d, selected, editable, view, onView: setView, onSelect: setSelected, onMove: move, onResize: resize, onDelete: remove }),
|
|
501
501
|
empty && /* @__PURE__ */ jsx3("div", { className: "empty-overlay", children: /* @__PURE__ */ jsx3(EmptyState, { title: "This board is empty", description: editable ? "Pick a shape from the palette to start." : "Nothing has been drawn yet." }) })
|
package/dist/index.js
CHANGED