@tangle-network/agent-app 0.45.28 → 0.45.29
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/{DesignCanvas-3RRPVPCP.js → DesignCanvas-RSWQCXM3.js} +2 -2
- package/dist/{DesignCanvasEditor-KAMMEX7E.js → DesignCanvasEditor-XZMGIST7.js} +4 -4
- package/dist/assistant/index.d.ts +62 -39
- package/dist/assistant/index.js +23 -5
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.d.ts +25 -2
- package/dist/chat-react/index.js.map +1 -1
- package/dist/chat-routes/index.js +1 -1
- package/dist/{chunk-WC43OQMR.js → chunk-3I27SDU3.js} +103 -30
- package/dist/chunk-3I27SDU3.js.map +1 -0
- package/dist/{chunk-NC2V63EL.js → chunk-FNM7JYME.js} +88 -21
- package/dist/chunk-FNM7JYME.js.map +1 -0
- package/dist/{chunk-4QVG4WJQ.js → chunk-OYTMILRK.js} +10 -3
- package/dist/chunk-OYTMILRK.js.map +1 -0
- package/dist/{chunk-OYGM5WLD.js → chunk-PURHUAOR.js} +52 -15
- package/dist/chunk-PURHUAOR.js.map +1 -0
- package/dist/{chunk-AWPK7ZDS.js → chunk-QGOU3VXH.js} +3 -3
- package/dist/{chunk-OTLEYHOG.js → chunk-RRH23CGS.js} +24 -4
- package/dist/chunk-RRH23CGS.js.map +1 -0
- package/dist/design-canvas-react/engine.d.ts +15 -1
- package/dist/design-canvas-react/engine.js +6 -2
- package/dist/design-canvas-react/index.d.ts +13 -1
- package/dist/design-canvas-react/index.js +13 -8
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/sandbox/index.d.ts +11 -1
- package/dist/sandbox/index.js +1 -1
- package/dist/web-react/index.d.ts +23 -4
- package/dist/web-react/index.js +1 -1
- package/package.json +14 -3
- package/dist/chunk-4QVG4WJQ.js.map +0 -1
- package/dist/chunk-NC2V63EL.js.map +0 -1
- package/dist/chunk-OTLEYHOG.js.map +0 -1
- package/dist/chunk-OYGM5WLD.js.map +0 -1
- package/dist/chunk-WC43OQMR.js.map +0 -1
- /package/dist/{DesignCanvas-3RRPVPCP.js.map → DesignCanvas-RSWQCXM3.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-KAMMEX7E.js.map → DesignCanvasEditor-XZMGIST7.js.map} +0 -0
- /package/dist/{chunk-AWPK7ZDS.js.map → chunk-QGOU3VXH.js.map} +0 -0
|
@@ -448,8 +448,8 @@ function PagesStrip({
|
|
|
448
448
|
},
|
|
449
449
|
className: [
|
|
450
450
|
"group relative flex shrink-0 flex-col items-center gap-1 rounded p-1 transition",
|
|
451
|
-
isActive ? "ring-2 ring-[var(--brand-primary)]" : "hover:bg-[var(--border-default)]
|
|
452
|
-
dragOverIndex === index ? "ring-1 ring-[var(--brand-primary)]
|
|
451
|
+
isActive ? "ring-2 ring-[var(--brand-primary)]" : "hover:bg-[color-mix(in_srgb,var(--border-default)_40%,transparent)]",
|
|
452
|
+
dragOverIndex === index ? "ring-1 ring-[color-mix(in_srgb,var(--brand-primary)_60%,transparent)]" : ""
|
|
453
453
|
].join(" "),
|
|
454
454
|
children: [
|
|
455
455
|
/* @__PURE__ */ jsxs3(
|
|
@@ -568,7 +568,8 @@ function Rulers({ pageWidth, pageHeight, zoom, scrollLeft, scrollTop, showRulers
|
|
|
568
568
|
guides,
|
|
569
569
|
onGuidesChange
|
|
570
570
|
}
|
|
571
|
-
)
|
|
571
|
+
),
|
|
572
|
+
/* @__PURE__ */ jsx6(GuidesCanvasOverlay, { guides, zoom, scrollLeft, scrollTop })
|
|
572
573
|
] });
|
|
573
574
|
}
|
|
574
575
|
function HorizontalRuler({ pageWidth, zoom, scrollLeft, guides, onGuidesChange }) {
|
|
@@ -657,7 +658,23 @@ function HorizontalRuler({ pageWidth, zoom, scrollLeft, guides, onGuidesChange }
|
|
|
657
658
|
tick.position
|
|
658
659
|
);
|
|
659
660
|
}),
|
|
660
|
-
|
|
661
|
+
guides.vertical.map((position, index) => /* @__PURE__ */ jsx6(
|
|
662
|
+
"div",
|
|
663
|
+
{
|
|
664
|
+
"data-guide-marker": "vertical",
|
|
665
|
+
"aria-hidden": true,
|
|
666
|
+
className: "pointer-events-none absolute top-0 bottom-0 w-px bg-[var(--brand-primary)]",
|
|
667
|
+
style: { left: position * zoom - scrollLeft * zoom }
|
|
668
|
+
},
|
|
669
|
+
`guide-${index}`
|
|
670
|
+
)),
|
|
671
|
+
pointerX !== null ? /* @__PURE__ */ jsx6(
|
|
672
|
+
"div",
|
|
673
|
+
{
|
|
674
|
+
className: "pointer-events-none absolute top-0 bottom-0 w-px bg-[color-mix(in_srgb,var(--brand-primary)_60%,transparent)]",
|
|
675
|
+
style: { left: pointerX }
|
|
676
|
+
}
|
|
677
|
+
) : null,
|
|
661
678
|
dragGuideX !== null ? /* @__PURE__ */ jsx6(
|
|
662
679
|
"div",
|
|
663
680
|
{
|
|
@@ -758,7 +775,23 @@ function VerticalRuler({ pageHeight, zoom, scrollTop, guides, onGuidesChange })
|
|
|
758
775
|
tick.position
|
|
759
776
|
);
|
|
760
777
|
}),
|
|
761
|
-
|
|
778
|
+
guides.horizontal.map((position, index) => /* @__PURE__ */ jsx6(
|
|
779
|
+
"div",
|
|
780
|
+
{
|
|
781
|
+
"data-guide-marker": "horizontal",
|
|
782
|
+
"aria-hidden": true,
|
|
783
|
+
className: "pointer-events-none absolute left-0 right-0 h-px bg-[var(--brand-primary)]",
|
|
784
|
+
style: { top: position * zoom - scrollTop * zoom }
|
|
785
|
+
},
|
|
786
|
+
`guide-${index}`
|
|
787
|
+
)),
|
|
788
|
+
pointerY !== null ? /* @__PURE__ */ jsx6(
|
|
789
|
+
"div",
|
|
790
|
+
{
|
|
791
|
+
className: "pointer-events-none absolute left-0 right-0 h-px bg-[color-mix(in_srgb,var(--brand-primary)_60%,transparent)]",
|
|
792
|
+
style: { top: pointerY }
|
|
793
|
+
}
|
|
794
|
+
) : null,
|
|
762
795
|
dragGuideY !== null ? /* @__PURE__ */ jsx6(
|
|
763
796
|
"div",
|
|
764
797
|
{
|
|
@@ -770,6 +803,37 @@ function VerticalRuler({ pageHeight, zoom, scrollTop, guides, onGuidesChange })
|
|
|
770
803
|
}
|
|
771
804
|
);
|
|
772
805
|
}
|
|
806
|
+
function GuidesCanvasOverlay({ guides, zoom, scrollLeft, scrollTop }) {
|
|
807
|
+
if (guides.vertical.length === 0 && guides.horizontal.length === 0) return null;
|
|
808
|
+
return /* @__PURE__ */ jsxs4(
|
|
809
|
+
"div",
|
|
810
|
+
{
|
|
811
|
+
"aria-hidden": true,
|
|
812
|
+
className: "pointer-events-none absolute right-0 bottom-0 z-10 overflow-hidden",
|
|
813
|
+
style: { left: RULER_SIZE_PX, top: RULER_SIZE_PX },
|
|
814
|
+
children: [
|
|
815
|
+
guides.vertical.map((position, index) => /* @__PURE__ */ jsx6(
|
|
816
|
+
"div",
|
|
817
|
+
{
|
|
818
|
+
"data-guide-line": "vertical",
|
|
819
|
+
className: "absolute top-0 bottom-0 w-px bg-[var(--brand-primary)]",
|
|
820
|
+
style: { left: position * zoom - scrollLeft * zoom }
|
|
821
|
+
},
|
|
822
|
+
`v-${index}`
|
|
823
|
+
)),
|
|
824
|
+
guides.horizontal.map((position, index) => /* @__PURE__ */ jsx6(
|
|
825
|
+
"div",
|
|
826
|
+
{
|
|
827
|
+
"data-guide-line": "horizontal",
|
|
828
|
+
className: "absolute left-0 right-0 h-px bg-[var(--brand-primary)]",
|
|
829
|
+
style: { top: position * zoom - scrollTop * zoom }
|
|
830
|
+
},
|
|
831
|
+
`h-${index}`
|
|
832
|
+
))
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
);
|
|
836
|
+
}
|
|
773
837
|
|
|
774
838
|
// src/design-canvas-react/components/Toolbar.tsx
|
|
775
839
|
import { useEffect as useEffect2, useRef as useRef3, useState as useState3 } from "react";
|
|
@@ -894,7 +958,7 @@ function SelectControl({
|
|
|
894
958
|
onChange(opt.value);
|
|
895
959
|
setOpen(false);
|
|
896
960
|
},
|
|
897
|
-
className: `px-3 py-1 text-left text-[12px] hover:bg-[var(--brand-primary)]
|
|
961
|
+
className: `px-3 py-1 text-left text-[12px] hover:bg-[color-mix(in_srgb,var(--brand-primary)_10%,transparent)] ${opt.value === value ? "text-[var(--brand-primary)]" : "text-[var(--text-primary)]"}`,
|
|
898
962
|
children: opt.label
|
|
899
963
|
},
|
|
900
964
|
opt.value
|
|
@@ -963,7 +1027,7 @@ function FontPicker({
|
|
|
963
1027
|
setQuery("");
|
|
964
1028
|
},
|
|
965
1029
|
style: { fontFamily: family },
|
|
966
|
-
className: `block w-full px-3 py-1 text-left text-[13px] hover:bg-[var(--brand-primary)]
|
|
1030
|
+
className: `block w-full px-3 py-1 text-left text-[13px] hover:bg-[color-mix(in_srgb,var(--brand-primary)_10%,transparent)] ${family === value ? "text-[var(--brand-primary)]" : "text-[var(--text-primary)]"}`,
|
|
967
1031
|
children: family
|
|
968
1032
|
},
|
|
969
1033
|
family
|
|
@@ -973,7 +1037,7 @@ function FontPicker({
|
|
|
973
1037
|
)
|
|
974
1038
|
] });
|
|
975
1039
|
}
|
|
976
|
-
function ColorSwatch({ label, value, onCommit, disabled }) {
|
|
1040
|
+
function ColorSwatch({ label, value, onCommit, disabled, none = false }) {
|
|
977
1041
|
const [open, setOpen] = useState3(false);
|
|
978
1042
|
const normalized = value.startsWith("#") ? value : "#ffffff";
|
|
979
1043
|
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center gap-0.5", children: [
|
|
@@ -988,10 +1052,12 @@ function ColorSwatch({ label, value, onCommit, disabled }) {
|
|
|
988
1052
|
{
|
|
989
1053
|
type: "button",
|
|
990
1054
|
disabled,
|
|
991
|
-
"aria-label": `${label} color`,
|
|
1055
|
+
"aria-label": none ? `${label} color (none)` : `${label} color`,
|
|
1056
|
+
title: none ? "None" : void 0,
|
|
992
1057
|
onClick: () => setOpen((v) => !v),
|
|
993
|
-
className: "h-6 w-10 rounded border border-[var(--border-default)] disabled:cursor-default disabled:opacity-40",
|
|
994
|
-
style: { backgroundColor: normalized }
|
|
1058
|
+
className: "relative h-6 w-10 overflow-hidden rounded border border-[var(--border-default)] disabled:cursor-default disabled:opacity-40",
|
|
1059
|
+
style: { backgroundColor: none ? "#ffffff" : normalized },
|
|
1060
|
+
children: none ? /* @__PURE__ */ jsx7("svg", { className: "absolute inset-0 h-full w-full", viewBox: "0 0 40 24", preserveAspectRatio: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx7("line", { x1: "1", y1: "23", x2: "39", y2: "1", stroke: "var(--text-danger)", strokeWidth: "1.5" }) }) : null
|
|
995
1061
|
}
|
|
996
1062
|
),
|
|
997
1063
|
children: /* @__PURE__ */ jsxs5("div", { className: `${POPOVER_PANEL} w-40 gap-2 p-2`, children: [
|
|
@@ -1228,7 +1294,7 @@ function SelectionControls({
|
|
|
1228
1294
|
onBindSlot(slotInput.trim() || null);
|
|
1229
1295
|
setSlotPopoverOpen(false);
|
|
1230
1296
|
},
|
|
1231
|
-
className: "flex-1 rounded border border-[var(--brand-primary)] px-2 py-0.5 text-[11px] text-[var(--brand-primary)] hover:bg-[var(--brand-primary)]
|
|
1297
|
+
className: "flex-1 rounded border border-[var(--brand-primary)] px-2 py-0.5 text-[11px] text-[var(--brand-primary)] hover:bg-[color-mix(in_srgb,var(--brand-primary)_10%,transparent)]",
|
|
1232
1298
|
children: slotInput.trim() ? "Bind" : "Unbind"
|
|
1233
1299
|
}
|
|
1234
1300
|
),
|
|
@@ -1310,7 +1376,7 @@ function TextControls({ element, canWrite, onPatch }) {
|
|
|
1310
1376
|
function ShapeControls({ element, canWrite, onPatch, showCornerRadius }) {
|
|
1311
1377
|
return /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
1312
1378
|
/* @__PURE__ */ jsx7(ColorSwatch, { label: "Fill", value: element.fill, onCommit: (v) => onPatch({ fill: v }), disabled: !canWrite }),
|
|
1313
|
-
/* @__PURE__ */ jsx7(ColorSwatch, { label: "Stroke", value: element.stroke ?? "#000000", onCommit: (v) => onPatch({ stroke: v }), disabled: !canWrite }),
|
|
1379
|
+
/* @__PURE__ */ jsx7(ColorSwatch, { label: "Stroke", value: element.stroke ?? "#000000", onCommit: (v) => onPatch({ stroke: v }), disabled: !canWrite, none: (element.strokeWidth ?? 0) === 0 }),
|
|
1314
1380
|
/* @__PURE__ */ jsx7(NumberInput, { label: "Stroke W", value: element.strokeWidth ?? 0, min: 0, onCommit: (v) => onPatch({ strokeWidth: v }), className: "w-14" }),
|
|
1315
1381
|
showCornerRadius && "cornerRadius" in element ? /* @__PURE__ */ jsx7(NumberInput, { label: "Corner R", value: element.cornerRadius ?? 0, min: 0, onCommit: (v) => onPatch({ cornerRadius: v }), className: "w-14" }) : null
|
|
1316
1382
|
] });
|
|
@@ -1376,7 +1442,7 @@ function ImageControls({ element, canWrite, onPatch }) {
|
|
|
1376
1442
|
onPatch({ src: swapUrl.trim() });
|
|
1377
1443
|
setSwapOpen(false);
|
|
1378
1444
|
},
|
|
1379
|
-
className: "flex-1 rounded border border-[var(--brand-primary)] px-2 py-0.5 text-[11px] text-[var(--brand-primary)] hover:bg-[var(--brand-primary)]
|
|
1445
|
+
className: "flex-1 rounded border border-[var(--brand-primary)] px-2 py-0.5 text-[11px] text-[var(--brand-primary)] hover:bg-[color-mix(in_srgb,var(--brand-primary)_10%,transparent)] disabled:cursor-default disabled:opacity-40",
|
|
1380
1446
|
children: "Replace"
|
|
1381
1447
|
}
|
|
1382
1448
|
),
|
|
@@ -1432,7 +1498,8 @@ function PagePropsControls({ page, canWrite, onSetPageProps, onSetPageGuides, pa
|
|
|
1432
1498
|
const preset = SIZE_PRESETS.find((p) => p.id === id);
|
|
1433
1499
|
if (preset) onSetPageProps({ width: preset.width, height: preset.height });
|
|
1434
1500
|
},
|
|
1435
|
-
options: presetOptions
|
|
1501
|
+
options: presetOptions,
|
|
1502
|
+
buttonClassName: "w-44"
|
|
1436
1503
|
}
|
|
1437
1504
|
),
|
|
1438
1505
|
/* @__PURE__ */ jsxs5("label", { className: "flex flex-col items-center gap-0.5", children: [
|
|
@@ -1627,7 +1694,7 @@ function ExportControl({ defaults, onExport, className }) {
|
|
|
1627
1694
|
setOpen(false);
|
|
1628
1695
|
}
|
|
1629
1696
|
},
|
|
1630
|
-
className: "flex h-8 items-center gap-1.5 rounded-md border border-[var(--border-default)] px-2.5 text-xs font-medium text-[var(--text-primary)] transition-colors hover:border-[var(--brand-primary)]
|
|
1697
|
+
className: "flex h-8 items-center gap-1.5 rounded-md border border-[var(--border-default)] px-2.5 text-xs font-medium text-[var(--text-primary)] transition-colors hover:border-[color-mix(in_srgb,var(--brand-primary)_40%,transparent)]",
|
|
1631
1698
|
children: [
|
|
1632
1699
|
/* @__PURE__ */ jsx9(ExportGlyph, { className: "h-3.5 w-3.5" }),
|
|
1633
1700
|
"Export",
|
|
@@ -1681,7 +1748,7 @@ function ExportControl({ defaults, onExport, className }) {
|
|
|
1681
1748
|
type: "button",
|
|
1682
1749
|
"aria-label": "Export image",
|
|
1683
1750
|
onClick: confirm,
|
|
1684
|
-
className: "rounded border border-[var(--brand-primary)] px-2 py-1 text-[11px] font-medium text-[var(--brand-primary)] transition-colors hover:bg-[var(--brand-primary)]
|
|
1751
|
+
className: "rounded border border-[var(--brand-primary)] px-2 py-1 text-[11px] font-medium text-[var(--brand-primary)] transition-colors hover:bg-[color-mix(in_srgb,var(--brand-primary)_10%,transparent)]",
|
|
1685
1752
|
children: "Export"
|
|
1686
1753
|
}
|
|
1687
1754
|
)
|
|
@@ -2062,7 +2129,7 @@ function DesignCanvas({
|
|
|
2062
2129
|
/* @__PURE__ */ jsx10("p", { className: "text-xs leading-5 text-[var(--text-secondary)]", children: "The design canvas needs room to work. Open this on a tablet or desktop to edit pages, elements, and export." })
|
|
2063
2130
|
] })
|
|
2064
2131
|
] }),
|
|
2065
|
-
/* @__PURE__ */ jsxs8("div", { className:
|
|
2132
|
+
/* @__PURE__ */ jsxs8("div", { className: `relative hidden min-h-0 flex-1 sm:block ${editorState.showRulers ? "pl-[20px] pt-[20px]" : ""}`, children: [
|
|
2066
2133
|
/* @__PURE__ */ jsx10(
|
|
2067
2134
|
Rulers,
|
|
2068
2135
|
{
|
|
@@ -2086,8 +2153,8 @@ function DesignCanvas({
|
|
|
2086
2153
|
{
|
|
2087
2154
|
style: {
|
|
2088
2155
|
position: "absolute",
|
|
2089
|
-
left: editorState.panX,
|
|
2090
|
-
top: editorState.panY
|
|
2156
|
+
left: editorState.panX + (editorState.showRulers ? 20 : 0),
|
|
2157
|
+
top: editorState.panY + (editorState.showRulers ? 20 : 0)
|
|
2091
2158
|
},
|
|
2092
2159
|
children: /* @__PURE__ */ jsx10(
|
|
2093
2160
|
BleedTrimOverlay,
|
|
@@ -2192,4 +2259,4 @@ export {
|
|
|
2192
2259
|
ExportControl,
|
|
2193
2260
|
DesignCanvas
|
|
2194
2261
|
};
|
|
2195
|
-
//# sourceMappingURL=chunk-
|
|
2262
|
+
//# sourceMappingURL=chunk-FNM7JYME.js.map
|