@arbidocs/blocks 0.5.155 → 0.5.156
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/{ConnectedNativeDocxComparison-2DAQX5GX.cjs → ConnectedNativeDocxComparison-G3AIBKSN.cjs} +7 -7
- package/dist/{ConnectedNativeDocxComparison-2DAQX5GX.cjs.map → ConnectedNativeDocxComparison-G3AIBKSN.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-LTYB62VM.cjs → ConnectedStreamedWordArtifact-ISNLUTAT.cjs} +7 -7
- package/dist/{ConnectedStreamedWordArtifact-LTYB62VM.cjs.map → ConnectedStreamedWordArtifact-ISNLUTAT.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-5AP55NGZ.cjs → DocumentReviewCard-7ZH575KX.cjs} +13 -13
- package/dist/{DocumentReviewCard-5AP55NGZ.cjs.map → DocumentReviewCard-7ZH575KX.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-SHWCE3UN.cjs → FilesViewerDialog-6RWJSZZV.cjs} +10 -10
- package/dist/{FilesViewerDialog-SHWCE3UN.cjs.map → FilesViewerDialog-6RWJSZZV.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-S4IBYQVF.cjs → WorkspaceTableView-NMERZJZZ.cjs} +4 -4
- package/dist/{WorkspaceTableView-S4IBYQVF.cjs.map → WorkspaceTableView-NMERZJZZ.cjs.map} +1 -1
- package/dist/agents/index.cjs +172 -172
- package/dist/{chunk-JCFXS336.cjs → chunk-44M4FI2N.cjs} +8 -8
- package/dist/chunk-44M4FI2N.cjs.map +1 -0
- package/dist/{chunk-KWWGUQJV.cjs → chunk-4I4IYVC6.cjs} +7 -7
- package/dist/{chunk-KWWGUQJV.cjs.map → chunk-4I4IYVC6.cjs.map} +1 -1
- package/dist/{chunk-BTQ7IAOH.cjs → chunk-B2L3XNZH.cjs} +4 -4
- package/dist/{chunk-BTQ7IAOH.cjs.map → chunk-B2L3XNZH.cjs.map} +1 -1
- package/dist/{chunk-4XNP27N4.cjs → chunk-BNHFDXJI.cjs} +36 -36
- package/dist/{chunk-4XNP27N4.cjs.map → chunk-BNHFDXJI.cjs.map} +1 -1
- package/dist/{chunk-ZCQXQIBA.cjs → chunk-DCD4OHDF.cjs} +28 -28
- package/dist/{chunk-ZCQXQIBA.cjs.map → chunk-DCD4OHDF.cjs.map} +1 -1
- package/dist/{chunk-6ZZWQ3OL.cjs → chunk-FNBUFKHE.cjs} +4 -4
- package/dist/{chunk-6ZZWQ3OL.cjs.map → chunk-FNBUFKHE.cjs.map} +1 -1
- package/dist/{chunk-B5BGVPQ5.cjs → chunk-HGD4B7GO.cjs} +4 -4
- package/dist/{chunk-B5BGVPQ5.cjs.map → chunk-HGD4B7GO.cjs.map} +1 -1
- package/dist/{chunk-4UDGCXUR.cjs → chunk-HJHDKS4V.cjs} +5 -5
- package/dist/{chunk-4UDGCXUR.cjs.map → chunk-HJHDKS4V.cjs.map} +1 -1
- package/dist/{chunk-3SGFIDID.cjs → chunk-HLUZMXEZ.cjs} +56 -56
- package/dist/{chunk-3SGFIDID.cjs.map → chunk-HLUZMXEZ.cjs.map} +1 -1
- package/dist/{chunk-BZVK7JW5.cjs → chunk-K7GBHLLY.cjs} +4 -4
- package/dist/{chunk-BZVK7JW5.cjs.map → chunk-K7GBHLLY.cjs.map} +1 -1
- package/dist/{chunk-MAKCWF45.cjs → chunk-M24FBUAP.cjs} +4 -4
- package/dist/{chunk-MAKCWF45.cjs.map → chunk-M24FBUAP.cjs.map} +1 -1
- package/dist/{chunk-QEH375MU.cjs → chunk-PD47L6KS.cjs} +4 -4
- package/dist/{chunk-QEH375MU.cjs.map → chunk-PD47L6KS.cjs.map} +1 -1
- package/dist/{chunk-Y2Z5UHHV.cjs → chunk-PTT5MZ7O.cjs} +8 -8
- package/dist/{chunk-Y2Z5UHHV.cjs.map → chunk-PTT5MZ7O.cjs.map} +1 -1
- package/dist/{chunk-TSAZWUPZ.cjs → chunk-Q7G2W5VQ.cjs} +4 -4
- package/dist/{chunk-TSAZWUPZ.cjs.map → chunk-Q7G2W5VQ.cjs.map} +1 -1
- package/dist/{chunk-RL2HI6NP.cjs → chunk-S3GVFAFB.cjs} +3 -3
- package/dist/{chunk-RL2HI6NP.cjs.map → chunk-S3GVFAFB.cjs.map} +1 -1
- package/dist/{chunk-OZJENXU3.cjs → chunk-U6JUIJTP.cjs} +9 -9
- package/dist/{chunk-OZJENXU3.cjs.map → chunk-U6JUIJTP.cjs.map} +1 -1
- package/dist/{chunk-2XOIULVN.cjs → chunk-V4B2GSC6.cjs} +29 -29
- package/dist/{chunk-2XOIULVN.cjs.map → chunk-V4B2GSC6.cjs.map} +1 -1
- package/dist/{chunk-TN3UP3CI.cjs → chunk-YHXJWYOF.cjs} +6 -6
- package/dist/{chunk-TN3UP3CI.cjs.map → chunk-YHXJWYOF.cjs.map} +1 -1
- package/dist/{chunk-74RUAGVD.cjs → chunk-YO7GDNEW.cjs} +5 -5
- package/dist/{chunk-74RUAGVD.cjs.map → chunk-YO7GDNEW.cjs.map} +1 -1
- package/dist/connect/docx.cjs +10 -10
- package/dist/connect/index.cjs +658 -655
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +8 -8
- package/dist/connection/files/page/ConnectedFilesPage.js +16 -13
- package/dist/connection/files/page/ConnectedFilesPage.js.map +2 -2
- package/dist/connection/pages/DocumentBlocks.js +1 -1
- package/dist/connection/pages/DocumentBlocks.js.map +2 -2
- package/dist/connection/pages/EditablePageGrid.js +44 -13
- package/dist/connection/pages/EditablePageGrid.js.map +2 -2
- package/dist/connection/storage/ConnectedWorkspaceTrash.d.ts +5 -4
- package/dist/connection/storage/ConnectedWorkspaceTrash.js +1 -1
- package/dist/connection/storage/ConnectedWorkspaceTrash.js.map +2 -2
- package/dist/embed/index.cjs +12 -12
- package/dist/facts/index.cjs +43 -43
- package/dist/files/FilesPage.d.ts +4 -1
- package/dist/files/FilesPage.js +1 -1
- package/dist/files/FilesPage.js.map +2 -2
- package/dist/files/SelectionBar.js +1 -1
- package/dist/files/SelectionBar.js.map +2 -2
- package/dist/files/index.cjs +229 -229
- package/dist/index.cjs +220 -220
- package/dist/pages/index.cjs +53 -28
- package/dist/pages/index.cjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +23 -23
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/src/blocks.css +18 -0
- package/dist/chunk-JCFXS336.cjs.map +0 -1
package/dist/pages/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkK5F2VNCX_cjs = require('../chunk-K5F2VNCX.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkYO7GDNEW_cjs = require('../chunk-YO7GDNEW.cjs');
|
|
6
6
|
require('../chunk-DWRUGOTQ.cjs');
|
|
7
7
|
require('../chunk-KD66CBYO.cjs');
|
|
8
8
|
require('../chunk-7UPEFZCV.cjs');
|
|
@@ -10,7 +10,7 @@ require('../chunk-V27WLYTG.cjs');
|
|
|
10
10
|
require('../chunk-SGYURQ23.cjs');
|
|
11
11
|
var chunkDLGYR4JL_cjs = require('../chunk-DLGYR4JL.cjs');
|
|
12
12
|
require('../chunk-JWCVA4LC.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunk44M4FI2N_cjs = require('../chunk-44M4FI2N.cjs');
|
|
14
14
|
require('../chunk-223D4727.cjs');
|
|
15
15
|
require('../chunk-SNUBQMIS.cjs');
|
|
16
16
|
require('../chunk-5GBM7BQB.cjs');
|
|
@@ -36,7 +36,7 @@ require('../chunk-S237ORM3.cjs');
|
|
|
36
36
|
require('../chunk-II2OEXHW.cjs');
|
|
37
37
|
require('../chunk-G3MRW4WB.cjs');
|
|
38
38
|
require('../chunk-AHDJXIUB.cjs');
|
|
39
|
-
require('../chunk-
|
|
39
|
+
require('../chunk-S3GVFAFB.cjs');
|
|
40
40
|
require('../chunk-6UZC4XVV.cjs');
|
|
41
41
|
require('../chunk-SLCH5JRI.cjs');
|
|
42
42
|
require('../chunk-DKY67DA6.cjs');
|
|
@@ -74,7 +74,7 @@ var documentTools = require('@arbidocs/react/document-tools');
|
|
|
74
74
|
var viewers = require('@arbidocs/react/viewers');
|
|
75
75
|
|
|
76
76
|
var PAGE_TEMPLATES = [
|
|
77
|
-
|
|
77
|
+
chunkYO7GDNEW_cjs.WORKSPACE_DASHBOARD_PAGE,
|
|
78
78
|
...chunkYSAUOJA7_cjs.DASHBOARD_TEMPLATES
|
|
79
79
|
];
|
|
80
80
|
function pageOfTemplate(template) {
|
|
@@ -711,10 +711,31 @@ function pitchOf(grid) {
|
|
|
711
711
|
row: px(PAGE_ROW_HEIGHT) * rem + px(style.rowGap)
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
-
function pressesHeader(
|
|
714
|
+
function pressesHeader(event, header) {
|
|
715
|
+
const target = event.target;
|
|
715
716
|
if (!(target instanceof Element)) return false;
|
|
716
717
|
if (target.closest("[data-page-move]")) return true;
|
|
717
|
-
|
|
718
|
+
if (target.closest(NO_DRAG)) return false;
|
|
719
|
+
if (target.closest("[data-page-header]")) return true;
|
|
720
|
+
if (!header) return false;
|
|
721
|
+
const band = header.getBoundingClientRect();
|
|
722
|
+
return event.clientY >= band.top && event.clientY < band.bottom;
|
|
723
|
+
}
|
|
724
|
+
function useHeaderEnd(cell, controls) {
|
|
725
|
+
react$1.useLayoutEffect(() => {
|
|
726
|
+
const el = cell.current;
|
|
727
|
+
const box = controls.current;
|
|
728
|
+
if (!el || !box) return;
|
|
729
|
+
const measure = () => {
|
|
730
|
+
const width = box.offsetWidth;
|
|
731
|
+
el.style.setProperty("--page-header-end", width ? `${width}px` : "0px");
|
|
732
|
+
};
|
|
733
|
+
measure();
|
|
734
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
735
|
+
const observer = new ResizeObserver(measure);
|
|
736
|
+
observer.observe(box);
|
|
737
|
+
return () => observer.disconnect();
|
|
738
|
+
}, [cell, controls]);
|
|
718
739
|
}
|
|
719
740
|
var keyOf = (blocks) => blocks.map((b) => `${b.id}:${b.layout.x},${b.layout.y},${b.layout.w},${b.layout.h}`).join("|");
|
|
720
741
|
var ARROWS = {
|
|
@@ -738,13 +759,16 @@ function EditableCell({
|
|
|
738
759
|
testId
|
|
739
760
|
}) {
|
|
740
761
|
const element = react$1.useRef(null);
|
|
762
|
+
const header = react$1.useRef(null);
|
|
763
|
+
const controls = react$1.useRef(null);
|
|
764
|
+
useHeaderEnd(element, controls);
|
|
741
765
|
const dropped = react$1.useRef(false);
|
|
742
766
|
const escape = react$1.useRef(null);
|
|
743
767
|
const gesture = chunkK5F2VNCX_cjs.usePointerGesture({
|
|
744
768
|
element,
|
|
745
769
|
threshold: 4,
|
|
746
770
|
begin: (kind, event) => {
|
|
747
|
-
if (kind === "move" && !pressesHeader(event.
|
|
771
|
+
if (kind === "move" && !pressesHeader(event, header.current)) return null;
|
|
748
772
|
const { col, row } = pitchOf(grid());
|
|
749
773
|
if (!col || !row) return null;
|
|
750
774
|
return { base: blocks, start: block.layout, col, row, shown: keyOf(blocks) };
|
|
@@ -823,6 +847,10 @@ function EditableCell({
|
|
|
823
847
|
),
|
|
824
848
|
"data-dragging": dragged || void 0,
|
|
825
849
|
...gesture.handlers,
|
|
850
|
+
onPointerDown: (event) => {
|
|
851
|
+
dropped.current = false;
|
|
852
|
+
gesture.start(event, "move", { lazy: true });
|
|
853
|
+
},
|
|
826
854
|
onClickCapture: (event) => {
|
|
827
855
|
if (!dropped.current) return;
|
|
828
856
|
dropped.current = false;
|
|
@@ -832,20 +860,17 @@ function EditableCell({
|
|
|
832
860
|
testId: `${testId}-cell-${block.id}`,
|
|
833
861
|
children: [
|
|
834
862
|
renderBlock(block),
|
|
835
|
-
/* @__PURE__ */ jsxRuntime.
|
|
863
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
836
864
|
"div",
|
|
837
865
|
{
|
|
866
|
+
ref: header,
|
|
838
867
|
className: ui.cn(
|
|
839
|
-
"absolute inset-x-0 top-0 z-10 flex h-10 items-center justify-end
|
|
840
|
-
dragged
|
|
868
|
+
"pointer-events-none absolute inset-x-0 top-0 z-10 flex h-10 items-center justify-end rounded-t-xl px-2",
|
|
869
|
+
dragged && "cursor-grabbing"
|
|
841
870
|
),
|
|
842
871
|
"data-page-header": true,
|
|
843
|
-
onPointerDown: (event) => {
|
|
844
|
-
dropped.current = false;
|
|
845
|
-
gesture.start(event, "move", { lazy: true });
|
|
846
|
-
},
|
|
847
872
|
"data-testid": `${testId}-header-${block.id}`,
|
|
848
|
-
children: [
|
|
873
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: controls, className: "pointer-events-auto flex items-center gap-1 md:touch-none", children: [
|
|
849
874
|
actionsOf?.(block),
|
|
850
875
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
851
876
|
ui.Button,
|
|
@@ -865,7 +890,7 @@ function EditableCell({
|
|
|
865
890
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Move, { className: "size-3.5" })
|
|
866
891
|
}
|
|
867
892
|
)
|
|
868
|
-
]
|
|
893
|
+
] })
|
|
869
894
|
}
|
|
870
895
|
),
|
|
871
896
|
RESIZE_HANDLES.map(({ kind, left, top, cursor }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1007,7 +1032,7 @@ function BlockCard({
|
|
|
1007
1032
|
className: ui.cn("flex h-full min-h-[14rem] flex-col overflow-hidden rounded-xl p-0", className),
|
|
1008
1033
|
"data-testid": testId,
|
|
1009
1034
|
children: [
|
|
1010
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 border-b border-border
|
|
1035
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 border-b border-border py-2 pl-4 pr-[max(1rem,calc(var(--page-header-end,0px)+0.5rem))]", children: [
|
|
1011
1036
|
icon,
|
|
1012
1037
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm font-medium", "data-testid": testId && `${testId}-name`, children: title }),
|
|
1013
1038
|
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex gap-1", children: actions })
|
|
@@ -1230,7 +1255,7 @@ function WithNewFileMenu({ children }) {
|
|
|
1230
1255
|
const [open, setOpen] = react$1.useState(false);
|
|
1231
1256
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1232
1257
|
children(() => setOpen(true)),
|
|
1233
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1258
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkYO7GDNEW_cjs.ConnectedNewFileMenu, { open, onOpenChange: setOpen })
|
|
1234
1259
|
] });
|
|
1235
1260
|
}
|
|
1236
1261
|
function PageBlockView({
|
|
@@ -1311,18 +1336,18 @@ function PageBlockView({
|
|
|
1311
1336
|
) });
|
|
1312
1337
|
case "list":
|
|
1313
1338
|
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: block.config.source === "documents" ? /* @__PURE__ */ jsxRuntime.jsx(WithNewFileMenu, { children: (onCreateNew) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1314
|
-
|
|
1339
|
+
chunkYO7GDNEW_cjs.ConnectedListBlock,
|
|
1315
1340
|
{
|
|
1316
1341
|
config: block.config,
|
|
1317
1342
|
onCreateNew,
|
|
1318
1343
|
testId: testId && `${testId}-list`
|
|
1319
1344
|
}
|
|
1320
|
-
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1345
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx(chunkYO7GDNEW_cjs.ConnectedListBlock, { config: block.config, testId: testId && `${testId}-list` }) });
|
|
1321
1346
|
case "carousel":
|
|
1322
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1347
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkYO7GDNEW_cjs.ConnectedCarouselBlock, { config: block.config, testId: testId && `${testId}-carousel` }) });
|
|
1323
1348
|
case "agenda":
|
|
1324
1349
|
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1325
|
-
|
|
1350
|
+
chunkYO7GDNEW_cjs.ConnectedAgendaBlock,
|
|
1326
1351
|
{
|
|
1327
1352
|
config: block.config,
|
|
1328
1353
|
className: "border-0 p-0",
|
|
@@ -1330,7 +1355,7 @@ function PageBlockView({
|
|
|
1330
1355
|
}
|
|
1331
1356
|
) });
|
|
1332
1357
|
case "start":
|
|
1333
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(WithNewFileMenu, { children: (onCreateNew) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1358
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(WithNewFileMenu, { children: (onCreateNew) => /* @__PURE__ */ jsxRuntime.jsx(chunkYO7GDNEW_cjs.ConnectedStartBlock, { onCreateNew }) }) });
|
|
1334
1359
|
}
|
|
1335
1360
|
}
|
|
1336
1361
|
function NewPageButton({
|
|
@@ -1586,8 +1611,8 @@ function OpenPageTransferDialog({
|
|
|
1586
1611
|
}) {
|
|
1587
1612
|
const l = { ...DEFAULT_PAGE_TRANSFER_LABELS, ...labels };
|
|
1588
1613
|
const { notify } = chunk46LX6EQT_cjs.useBlocksEnvironment();
|
|
1589
|
-
const { options, nameOf } =
|
|
1590
|
-
const trackTransfer =
|
|
1614
|
+
const { options, nameOf } = chunkYO7GDNEW_cjs.useTransferTargets();
|
|
1615
|
+
const trackTransfer = chunkYO7GDNEW_cjs.useExportStore((state) => state.trackTransfer);
|
|
1591
1616
|
const [targetId, setTargetId] = react$1.useState(null);
|
|
1592
1617
|
const [references, setReferences] = react$1.useState("link");
|
|
1593
1618
|
const [jobId, setJobId] = react$1.useState(null);
|
|
@@ -1638,7 +1663,7 @@ function OpenPageTransferDialog({
|
|
|
1638
1663
|
if (!jobId) {
|
|
1639
1664
|
body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1640
1665
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1641
|
-
|
|
1666
|
+
chunk44M4FI2N_cjs.ExportWorkspacePicker,
|
|
1642
1667
|
{
|
|
1643
1668
|
workspaces: options,
|
|
1644
1669
|
selectedId: targetId,
|
|
@@ -1647,7 +1672,7 @@ function OpenPageTransferDialog({
|
|
|
1647
1672
|
}
|
|
1648
1673
|
),
|
|
1649
1674
|
documents > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1650
|
-
|
|
1675
|
+
chunk44M4FI2N_cjs.TransferReferencesChooser,
|
|
1651
1676
|
{
|
|
1652
1677
|
value: references,
|
|
1653
1678
|
onChange: setReferences,
|
|
@@ -1686,7 +1711,7 @@ function OpenPageTransferDialog({
|
|
|
1686
1711
|
] });
|
|
1687
1712
|
} else if (!finished || !items) {
|
|
1688
1713
|
body = job ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1689
|
-
|
|
1714
|
+
chunk44M4FI2N_cjs.TransferProgressView,
|
|
1690
1715
|
{
|
|
1691
1716
|
title: l.progress(mode, target),
|
|
1692
1717
|
processed: job.processed ?? 0,
|