@arbidocs/blocks 0.5.153 → 0.5.154
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-244UIHSM.cjs → ConnectedNativeDocxComparison-2DAQX5GX.cjs} +9 -9
- package/dist/{ConnectedStreamedWordArtifact-V6BRZMEQ.cjs.map → ConnectedNativeDocxComparison-2DAQX5GX.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-JUXIXKYN.cjs → ConnectedPresentation-J42JPUVR.cjs} +13 -13
- package/dist/{ConnectedPresentation-JUXIXKYN.cjs.map → ConnectedPresentation-J42JPUVR.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-JA3VB66W.cjs → ConnectedSlidesTab-BYS7HFNK.cjs} +12 -12
- package/dist/{ConnectedSlidesTab-JA3VB66W.cjs.map → ConnectedSlidesTab-BYS7HFNK.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-V6BRZMEQ.cjs → ConnectedStreamedWordArtifact-LTYB62VM.cjs} +9 -9
- package/dist/{ConnectedNativeDocxComparison-244UIHSM.cjs.map → ConnectedStreamedWordArtifact-LTYB62VM.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-5W2QQWKA.cjs → DocumentReviewCard-ILDLYZ5A.cjs} +15 -13
- package/dist/DocumentReviewCard-ILDLYZ5A.cjs.map +1 -0
- package/dist/{FilesViewerDialog-63QUTG4L.cjs → FilesViewerDialog-YLD5YFP2.cjs} +25 -22
- package/dist/FilesViewerDialog-YLD5YFP2.cjs.map +1 -0
- package/dist/{RechartsRenderer-NU6WUZJS.cjs → RechartsRenderer-EPVL5QZA.cjs} +2 -2
- package/dist/{RechartsRenderer-NU6WUZJS.cjs.map → RechartsRenderer-EPVL5QZA.cjs.map} +1 -1
- package/dist/{SpotlightStrip-HXQFPAAL.cjs → SpotlightStrip-JE6MXUBT.cjs} +6 -6
- package/dist/{SpotlightStrip-HXQFPAAL.cjs.map → SpotlightStrip-JE6MXUBT.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-2QP2HJLK.cjs → WorkspaceTableView-V3N64LJG.cjs} +13 -11
- package/dist/WorkspaceTableView-V3N64LJG.cjs.map +1 -0
- package/dist/agents/index.cjs +245 -244
- package/dist/agents/workflows/WorkflowLauncher.d.ts +3 -1
- package/dist/agents/workflows/WorkflowLauncher.js +2 -0
- package/dist/agents/workflows/WorkflowLauncher.js.map +2 -2
- package/dist/{ai-ODGRIL6Y.cjs → ai-QFY4LYQZ.cjs} +16 -16
- package/dist/ai-QFY4LYQZ.cjs.map +1 -0
- package/dist/calls/index.cjs +25 -24
- package/dist/calls/index.cjs.map +1 -1
- package/dist/{chunk-MAKCWF45.cjs → chunk-6GKCGCMT.cjs} +4 -4
- package/dist/{chunk-MAKCWF45.cjs.map → chunk-6GKCGCMT.cjs.map} +1 -1
- package/dist/{chunk-LYKT336H.cjs → chunk-6I5HHWCD.cjs} +5 -5
- package/dist/{chunk-LYKT336H.cjs.map → chunk-6I5HHWCD.cjs.map} +1 -1
- package/dist/{chunk-KWJW5TMH.cjs → chunk-6OPDKROP.cjs} +4 -41
- package/dist/chunk-6OPDKROP.cjs.map +1 -0
- package/dist/{chunk-QWOPEBH2.cjs → chunk-6P4U63HO.cjs} +4 -4
- package/dist/{chunk-QWOPEBH2.cjs.map → chunk-6P4U63HO.cjs.map} +1 -1
- package/dist/{chunk-QKCFV36K.cjs → chunk-7UPEFZCV.cjs} +9 -9
- package/dist/{chunk-QKCFV36K.cjs.map → chunk-7UPEFZCV.cjs.map} +1 -1
- package/dist/{chunk-DUNXLT63.cjs → chunk-AHUEBRLX.cjs} +2 -238
- package/dist/chunk-AHUEBRLX.cjs.map +1 -0
- package/dist/{chunk-B5BGVPQ5.cjs → chunk-AURL2KT5.cjs} +4 -4
- package/dist/{chunk-B5BGVPQ5.cjs.map → chunk-AURL2KT5.cjs.map} +1 -1
- package/dist/chunk-BH322H5B.cjs +594 -0
- package/dist/chunk-BH322H5B.cjs.map +1 -0
- package/dist/{chunk-ZCQXQIBA.cjs → chunk-BNDIMTWJ.cjs} +28 -28
- package/dist/{chunk-ZCQXQIBA.cjs.map → chunk-BNDIMTWJ.cjs.map} +1 -1
- package/dist/{chunk-AG6KAGAX.cjs → chunk-BTQ7IAOH.cjs} +4 -4
- package/dist/{chunk-AG6KAGAX.cjs.map → chunk-BTQ7IAOH.cjs.map} +1 -1
- package/dist/{chunk-FCT62ZPE.cjs → chunk-BZVK7JW5.cjs} +5 -5
- package/dist/{chunk-FCT62ZPE.cjs.map → chunk-BZVK7JW5.cjs.map} +1 -1
- package/dist/{chunk-WUM76MJU.cjs → chunk-CNBYM5Q7.cjs} +7 -7
- package/dist/{chunk-WUM76MJU.cjs.map → chunk-CNBYM5Q7.cjs.map} +1 -1
- package/dist/{chunk-HNLNRAEU.cjs → chunk-DSLMJ24E.cjs} +2 -261
- package/dist/chunk-DSLMJ24E.cjs.map +1 -0
- package/dist/chunk-DWRUGOTQ.cjs +35 -0
- package/dist/chunk-DWRUGOTQ.cjs.map +1 -0
- package/dist/{chunk-GAA222SK.cjs → chunk-EG3DPKXM.cjs} +5 -5
- package/dist/{chunk-GAA222SK.cjs.map → chunk-EG3DPKXM.cjs.map} +1 -1
- package/dist/chunk-FEAHTNTY.cjs +1447 -0
- package/dist/chunk-FEAHTNTY.cjs.map +1 -0
- package/dist/{chunk-VSDD5TH5.cjs → chunk-G3MRW4WB.cjs} +10 -8
- package/dist/chunk-G3MRW4WB.cjs.map +1 -0
- package/dist/{chunk-TFRCNIUY.cjs → chunk-GF6AYAMI.cjs} +9 -9
- package/dist/{chunk-TFRCNIUY.cjs.map → chunk-GF6AYAMI.cjs.map} +1 -1
- package/dist/{chunk-4ZR4O5SP.cjs → chunk-GK3U3FWY.cjs} +60 -28
- package/dist/chunk-GK3U3FWY.cjs.map +1 -0
- package/dist/{chunk-3CJTO6RV.cjs → chunk-GXRD5OSU.cjs} +8 -8
- package/dist/{chunk-3CJTO6RV.cjs.map → chunk-GXRD5OSU.cjs.map} +1 -1
- package/dist/{chunk-JLNKD56X.cjs → chunk-GYI4UXX6.cjs} +4 -4
- package/dist/{chunk-JLNKD56X.cjs.map → chunk-GYI4UXX6.cjs.map} +1 -1
- package/dist/{chunk-4I2PCP7O.cjs → chunk-I3XTTTPZ.cjs} +41 -40
- package/dist/chunk-I3XTTTPZ.cjs.map +1 -0
- package/dist/chunk-JWCVA4LC.cjs +248 -0
- package/dist/chunk-JWCVA4LC.cjs.map +1 -0
- package/dist/{chunk-UM3EWCDE.cjs → chunk-K5F2VNCX.cjs} +35 -10
- package/dist/chunk-K5F2VNCX.cjs.map +1 -0
- package/dist/chunk-KD66CBYO.cjs +44 -0
- package/dist/chunk-KD66CBYO.cjs.map +1 -0
- package/dist/chunk-LLVE5TST.cjs +318 -0
- package/dist/chunk-LLVE5TST.cjs.map +1 -0
- package/dist/{chunk-JCFXS336.cjs → chunk-NRGLF4J4.cjs} +2 -466
- package/dist/chunk-NRGLF4J4.cjs.map +1 -0
- package/dist/{chunk-CVVQHFLR.cjs → chunk-O7U6KL2W.cjs} +72 -650
- package/dist/chunk-O7U6KL2W.cjs.map +1 -0
- package/dist/{chunk-Z3N32LL4.cjs → chunk-OOANNOH4.cjs} +35 -33
- package/dist/chunk-OOANNOH4.cjs.map +1 -0
- package/dist/chunk-SGYURQ23.cjs +271 -0
- package/dist/chunk-SGYURQ23.cjs.map +1 -0
- package/dist/{chunk-A5SKK3CU.cjs → chunk-SLCH5JRI.cjs} +64 -35
- package/dist/chunk-SLCH5JRI.cjs.map +1 -0
- package/dist/chunk-T26UYA6Q.cjs +64 -0
- package/dist/chunk-T26UYA6Q.cjs.map +1 -0
- package/dist/chunk-T3Y3LZ4Y.cjs +477 -0
- package/dist/chunk-T3Y3LZ4Y.cjs.map +1 -0
- package/dist/{chunk-4XNP27N4.cjs → chunk-T7BUGVSG.cjs} +36 -36
- package/dist/{chunk-4XNP27N4.cjs.map → chunk-T7BUGVSG.cjs.map} +1 -1
- package/dist/{chunk-SMO4SPPB.cjs → chunk-TD5V5BZ3.cjs} +5 -5
- package/dist/{chunk-SMO4SPPB.cjs.map → chunk-TD5V5BZ3.cjs.map} +1 -1
- package/dist/{chunk-IXTDOPSB.cjs → chunk-TSAZWUPZ.cjs} +4 -4
- package/dist/{chunk-IXTDOPSB.cjs.map → chunk-TSAZWUPZ.cjs.map} +1 -1
- package/dist/{chunk-5DGNJ6VJ.cjs → chunk-UD3LPATQ.cjs} +6 -6
- package/dist/{chunk-5DGNJ6VJ.cjs.map → chunk-UD3LPATQ.cjs.map} +1 -1
- package/dist/{chunk-OF7KMG6R.cjs → chunk-UJHQ4DA4.cjs} +5 -5
- package/dist/{chunk-OF7KMG6R.cjs.map → chunk-UJHQ4DA4.cjs.map} +1 -1
- package/dist/{chunk-NUFZFWHZ.cjs → chunk-W5QSKW7T.cjs} +3 -29
- package/dist/chunk-W5QSKW7T.cjs.map +1 -0
- package/dist/{chunk-NNZFZYTI.cjs → chunk-WOVNXJK5.cjs} +4 -54
- package/dist/chunk-WOVNXJK5.cjs.map +1 -0
- package/dist/{chunk-E6BM5ENI.cjs → chunk-WRTEKOQP.cjs} +2 -309
- package/dist/chunk-WRTEKOQP.cjs.map +1 -0
- package/dist/{chunk-KRQCUVH7.cjs → chunk-YSAUOJA7.cjs} +9 -3
- package/dist/chunk-YSAUOJA7.cjs.map +1 -0
- package/dist/{chunk-6ZZWQ3OL.cjs → chunk-YXY52OGU.cjs} +4 -4
- package/dist/{chunk-6ZZWQ3OL.cjs.map → chunk-YXY52OGU.cjs.map} +1 -1
- package/dist/{chunk-D5DOK2AE.cjs → chunk-ZW2ZFC3Q.cjs} +58 -58
- package/dist/{chunk-D5DOK2AE.cjs.map → chunk-ZW2ZFC3Q.cjs.map} +1 -1
- package/dist/components/gestures/usePointerGesture.d.ts +13 -1
- package/dist/components/gestures/usePointerGesture.js +33 -8
- package/dist/components/gestures/usePointerGesture.js.map +2 -2
- package/dist/connect/docx.cjs +12 -12
- package/dist/connect/index.cjs +1281 -2346
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +1 -0
- package/dist/connect/index.js +1 -0
- package/dist/connect/index.js.map +2 -2
- package/dist/connect/viewer.cjs +15 -12
- package/dist/connection/dashboards/DashboardPanel.d.ts +2 -0
- package/dist/connection/dashboards/DashboardPanel.js +4 -0
- package/dist/connection/dashboards/DashboardPanel.js.map +2 -2
- package/dist/connection/dashboards/index.d.ts +1 -1
- package/dist/connection/dashboards/index.js +2 -0
- package/dist/connection/dashboards/index.js.map +2 -2
- package/dist/connection/dashboards/templates.d.ts +10 -5
- package/dist/connection/dashboards/templates.js +7 -1
- package/dist/connection/dashboards/templates.js.map +2 -2
- package/dist/connection/live-blocks/ConnectedAgendaBlock.d.ts +13 -0
- package/dist/connection/live-blocks/ConnectedAgendaBlock.js +19 -0
- package/dist/connection/live-blocks/ConnectedAgendaBlock.js.map +7 -0
- package/dist/connection/live-blocks/ConnectedCarouselBlock.d.ts +7 -0
- package/dist/connection/live-blocks/ConnectedCarouselBlock.js +84 -0
- package/dist/connection/live-blocks/ConnectedCarouselBlock.js.map +7 -0
- package/dist/connection/live-blocks/ConnectedListBlock.d.ts +29 -0
- package/dist/connection/live-blocks/ConnectedListBlock.js +193 -0
- package/dist/connection/live-blocks/ConnectedListBlock.js.map +7 -0
- package/dist/connection/live-blocks/ConnectedStartBlock.d.ts +7 -0
- package/dist/connection/live-blocks/ConnectedStartBlock.js +16 -0
- package/dist/connection/live-blocks/ConnectedStartBlock.js.map +7 -0
- package/dist/connection/live-blocks/DashboardAgenda.d.ts +10 -0
- package/dist/connection/{workspace-dashboard → live-blocks}/DashboardAgenda.js +10 -2
- package/dist/connection/live-blocks/DashboardAgenda.js.map +7 -0
- package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.js.map +1 -1
- package/dist/connection/live-blocks/LiveBlockRoot.d.ts +11 -0
- package/dist/connection/live-blocks/LiveBlockRoot.js +22 -0
- package/dist/connection/live-blocks/LiveBlockRoot.js.map +7 -0
- package/dist/connection/live-blocks/index.d.ts +5 -0
- package/dist/connection/live-blocks/index.js +20 -0
- package/dist/connection/live-blocks/index.js.map +7 -0
- package/dist/connection/{workspace-dashboard/dashboard-rows.d.ts → live-blocks/list-rows.d.ts} +22 -4
- package/dist/connection/{workspace-dashboard/dashboard-rows.js → live-blocks/list-rows.js} +13 -8
- package/dist/connection/live-blocks/list-rows.js.map +7 -0
- package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.js.map +1 -1
- package/dist/connection/live-blocks/workspace-dashboard-blocks.d.ts +23 -0
- package/dist/connection/live-blocks/workspace-dashboard-blocks.js +58 -0
- package/dist/connection/live-blocks/workspace-dashboard-blocks.js.map +7 -0
- package/dist/connection/pages/BlockEditor.d.ts +3 -1
- package/dist/connection/pages/BlockEditor.js +18 -1
- package/dist/connection/pages/BlockEditor.js.map +2 -2
- package/dist/connection/pages/ConnectedPagesPage.d.ts +5 -4
- package/dist/connection/pages/ConnectedPagesPage.js +122 -46
- package/dist/connection/pages/ConnectedPagesPage.js.map +2 -2
- package/dist/connection/pages/EditablePageGrid.d.ts +25 -15
- package/dist/connection/pages/EditablePageGrid.js +145 -50
- package/dist/connection/pages/EditablePageGrid.js.map +2 -2
- package/dist/connection/pages/LiveBlockEditor.d.ts +30 -0
- package/dist/connection/pages/LiveBlockEditor.js +175 -0
- package/dist/connection/pages/LiveBlockEditor.js.map +7 -0
- package/dist/connection/pages/PageBlockView.d.ts +5 -3
- package/dist/connection/pages/PageBlockView.js +69 -4
- package/dist/connection/pages/PageBlockView.js.map +2 -2
- package/dist/connection/pages/PageGrid.d.ts +4 -3
- package/dist/connection/pages/PageGrid.js +4 -2
- package/dist/connection/pages/PageGrid.js.map +2 -2
- package/dist/connection/pages/PagesList.d.ts +4 -3
- package/dist/connection/pages/PagesList.js.map +2 -2
- package/dist/connection/pages/grid-layout.d.ts +44 -12
- package/dist/connection/pages/grid-layout.js +71 -27
- package/dist/connection/pages/grid-layout.js.map +2 -2
- package/dist/connection/pages/index.d.ts +4 -2
- package/dist/connection/pages/index.js +34 -5
- package/dist/connection/pages/index.js.map +2 -2
- package/dist/connection/pages/labels.js +5 -1
- package/dist/connection/pages/labels.js.map +2 -2
- package/dist/connection/pages/page-templates.d.ts +10 -0
- package/dist/connection/pages/page-templates.js +16 -0
- package/dist/connection/pages/page-templates.js.map +7 -0
- package/dist/connection/workflows/ConnectedWorkflowStart.d.ts +2 -0
- package/dist/connection/workflows/ConnectedWorkflowStart.js.map +2 -2
- package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.d.ts +10 -7
- package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.js +31 -171
- package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.js.map +3 -3
- package/dist/dashboards/ChartRenderer.d.ts +5 -3
- package/dist/dashboards/ChartRenderer.js +29 -18
- package/dist/dashboards/ChartRenderer.js.map +2 -2
- package/dist/dashboards/PanelView.d.ts +6 -1
- package/dist/dashboards/PanelView.js +24 -7
- package/dist/dashboards/PanelView.js.map +2 -2
- package/dist/dashboards/RechartsRenderer.d.ts +2 -1
- package/dist/dashboards/RechartsRenderer.js.map +2 -2
- package/dist/dashboards/index.cjs +25 -21
- package/dist/embed/index.cjs +23 -20
- package/dist/files/index.cjs +250 -249
- package/dist/home/FactsStrip.d.ts +3 -1
- package/dist/home/FactsStrip.js +3 -2
- package/dist/home/FactsStrip.js.map +2 -2
- package/dist/home/RecentList.d.ts +4 -2
- package/dist/home/RecentList.js +3 -2
- package/dist/home/RecentList.js.map +2 -2
- package/dist/home/StartTiles.d.ts +6 -1
- package/dist/home/StartTiles.js +55 -33
- package/dist/home/StartTiles.js.map +2 -2
- package/dist/home/index.cjs +62 -57
- package/dist/home/index.d.ts +1 -1
- package/dist/home/index.js +2 -1
- package/dist/home/index.js.map +2 -2
- package/dist/home/sections.d.ts +5 -0
- package/dist/home/sections.js +7 -0
- package/dist/home/sections.js.map +2 -2
- package/dist/index.cjs +339 -337
- package/dist/index.cjs.map +1 -1
- package/dist/pages/index.cjs +620 -139
- package/dist/pages/index.cjs.map +1 -1
- package/dist/settings/index.cjs +170 -169
- package/dist/shell/index.cjs +35 -34
- package/dist/studio/index.cjs +12 -12
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +33 -29
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workspaces/index.cjs +49 -47
- package/dist/workspaces/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/DocumentReviewCard-5W2QQWKA.cjs.map +0 -1
- package/dist/FilesViewerDialog-63QUTG4L.cjs.map +0 -1
- package/dist/WorkspaceTableView-2QP2HJLK.cjs.map +0 -1
- package/dist/ai-ODGRIL6Y.cjs.map +0 -1
- package/dist/chunk-4I2PCP7O.cjs.map +0 -1
- package/dist/chunk-4ZR4O5SP.cjs.map +0 -1
- package/dist/chunk-A5SKK3CU.cjs.map +0 -1
- package/dist/chunk-CVVQHFLR.cjs.map +0 -1
- package/dist/chunk-DUNXLT63.cjs.map +0 -1
- package/dist/chunk-E6BM5ENI.cjs.map +0 -1
- package/dist/chunk-HNLNRAEU.cjs.map +0 -1
- package/dist/chunk-JCFXS336.cjs.map +0 -1
- package/dist/chunk-KRQCUVH7.cjs.map +0 -1
- package/dist/chunk-KWJW5TMH.cjs.map +0 -1
- package/dist/chunk-NNZFZYTI.cjs.map +0 -1
- package/dist/chunk-NUFZFWHZ.cjs.map +0 -1
- package/dist/chunk-UM3EWCDE.cjs.map +0 -1
- package/dist/chunk-VSDD5TH5.cjs.map +0 -1
- package/dist/chunk-Z3N32LL4.cjs.map +0 -1
- package/dist/connection/workspace-dashboard/DashboardAgenda.d.ts +0 -1
- package/dist/connection/workspace-dashboard/DashboardAgenda.js.map +0 -7
- package/dist/connection/workspace-dashboard/dashboard-rows.js.map +0 -7
- /package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.d.ts +0 -0
- /package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.js +0 -0
- /package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.d.ts +0 -0
- /package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.js +0 -0
|
@@ -3,16 +3,27 @@ import {
|
|
|
3
3
|
DEFAULT_BLOCK_HEIGHT,
|
|
4
4
|
PAGE_GRID_COLUMNS
|
|
5
5
|
} from "@arbidocs/react";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
const SLOT_COLUMNS = 3;
|
|
7
|
+
const SLOT_ROWS = 3;
|
|
8
|
+
const SLOTS_ACROSS = PAGE_GRID_COLUMNS / SLOT_COLUMNS;
|
|
9
|
+
const MAX_BLOCK_SLOTS = 4;
|
|
10
|
+
const DEFAULT_BLOCK_SLOTS = {
|
|
11
|
+
metric: { w: 1, h: DEFAULT_BLOCK_HEIGHT.metric / SLOT_ROWS },
|
|
12
|
+
text: { w: 2, h: DEFAULT_BLOCK_HEIGHT.text / SLOT_ROWS },
|
|
13
|
+
chart: { w: 2, h: DEFAULT_BLOCK_HEIGHT.chart / SLOT_ROWS },
|
|
14
|
+
table: { w: 4, h: DEFAULT_BLOCK_HEIGHT.table / SLOT_ROWS },
|
|
15
|
+
document: { w: 2, h: DEFAULT_BLOCK_HEIGHT.document / SLOT_ROWS },
|
|
16
|
+
gallery: { w: 2, h: DEFAULT_BLOCK_HEIGHT.gallery / SLOT_ROWS },
|
|
17
|
+
list: { w: 2, h: DEFAULT_BLOCK_HEIGHT.list / SLOT_ROWS },
|
|
18
|
+
carousel: { w: 4, h: DEFAULT_BLOCK_HEIGHT.carousel / SLOT_ROWS },
|
|
19
|
+
agenda: { w: 2, h: DEFAULT_BLOCK_HEIGHT.agenda / SLOT_ROWS },
|
|
20
|
+
start: { w: 4, h: DEFAULT_BLOCK_HEIGHT.start / SLOT_ROWS }
|
|
13
21
|
};
|
|
22
|
+
function defaultLayout(kind) {
|
|
23
|
+
const { w, h } = DEFAULT_BLOCK_SLOTS[kind];
|
|
24
|
+
return { x: 0, y: 0, w: w * SLOT_COLUMNS, h: h * SLOT_ROWS };
|
|
25
|
+
}
|
|
14
26
|
const overlaps = (a, b) => a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h && b.y < a.y + a.h;
|
|
15
|
-
const clampInt = (n, lo, hi) => Math.min(hi, Math.max(lo, Math.round(n)));
|
|
16
27
|
function compactLayout(items, pinned) {
|
|
17
28
|
const placed = [];
|
|
18
29
|
const out = /* @__PURE__ */ new Map();
|
|
@@ -56,43 +67,76 @@ function place(items, id, layout) {
|
|
|
56
67
|
moved
|
|
57
68
|
);
|
|
58
69
|
}
|
|
70
|
+
const clampSlots = (n, lo, hi) => Math.min(hi, Math.max(lo, Math.round(n)));
|
|
71
|
+
function snapLayout(layout) {
|
|
72
|
+
const w = clampSlots(layout.w / SLOT_COLUMNS, 1, MAX_BLOCK_SLOTS);
|
|
73
|
+
const h = clampSlots(layout.h / SLOT_ROWS, 1, MAX_BLOCK_SLOTS);
|
|
74
|
+
const x = clampSlots(layout.x / SLOT_COLUMNS, 0, SLOTS_ACROSS - w);
|
|
75
|
+
const y = Math.max(0, Math.round(layout.y / SLOT_ROWS));
|
|
76
|
+
return { x: x * SLOT_COLUMNS, y: y * SLOT_ROWS, w: w * SLOT_COLUMNS, h: h * SLOT_ROWS };
|
|
77
|
+
}
|
|
78
|
+
function normalizeLayout(items) {
|
|
79
|
+
return compactLayout(items.map((i) => ({ ...i, layout: snapLayout(i.layout) })));
|
|
80
|
+
}
|
|
59
81
|
function moveBlock(items, id, to, settle = true) {
|
|
60
82
|
const item = items.find((i) => i.id === id);
|
|
61
83
|
if (!item) return [...items];
|
|
62
|
-
const layout = {
|
|
63
|
-
...item.layout,
|
|
64
|
-
x: clampInt(to.x, 0, PAGE_GRID_COLUMNS - item.layout.w),
|
|
65
|
-
y: Math.max(0, Math.round(to.y))
|
|
66
|
-
};
|
|
84
|
+
const layout = snapLayout({ ...item.layout, x: to.x, y: to.y });
|
|
67
85
|
const next = compactLayout(place(items, id, layout), id);
|
|
68
86
|
return settle ? compactLayout(next) : next;
|
|
69
87
|
}
|
|
70
88
|
function resizeBlock(items, id, to, settle = true) {
|
|
71
89
|
const item = items.find((i) => i.id === id);
|
|
72
90
|
if (!item) return [...items];
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
to.w,
|
|
78
|
-
Math.min(min.w, PAGE_GRID_COLUMNS - item.layout.x),
|
|
79
|
-
PAGE_GRID_COLUMNS - item.layout.x
|
|
80
|
-
),
|
|
81
|
-
h: Math.max(min.h, Math.round(to.h))
|
|
82
|
-
};
|
|
91
|
+
const room = SLOTS_ACROSS - item.layout.x / SLOT_COLUMNS;
|
|
92
|
+
const w = clampSlots(to.w / SLOT_COLUMNS, 1, Math.min(MAX_BLOCK_SLOTS, room));
|
|
93
|
+
const h = clampSlots(to.h / SLOT_ROWS, 1, MAX_BLOCK_SLOTS);
|
|
94
|
+
const layout = { ...item.layout, w: w * SLOT_COLUMNS, h: h * SLOT_ROWS };
|
|
83
95
|
const next = compactLayout(place(items, id, layout), id);
|
|
84
96
|
return settle ? compactLayout(next) : next;
|
|
85
97
|
}
|
|
98
|
+
function stepSize(items, id, dw, dh) {
|
|
99
|
+
const item = items.find((i) => i.id === id);
|
|
100
|
+
if (!item) return [...items];
|
|
101
|
+
return resizeBlock(items, id, {
|
|
102
|
+
w: item.layout.w + dw * SLOT_COLUMNS,
|
|
103
|
+
h: item.layout.h + dh * SLOT_ROWS
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function stepMove(items, id, dx, dy) {
|
|
107
|
+
const item = items.find((i) => i.id === id);
|
|
108
|
+
if (!item) return [...items];
|
|
109
|
+
const at = item.layout;
|
|
110
|
+
if (dx) return moveBlock(items, id, { x: at.x + dx * SLOT_COLUMNS, y: at.y });
|
|
111
|
+
if (!dy) return [...items];
|
|
112
|
+
const sameColumns = (b) => b.x < at.x + at.w && at.x < b.x + b.w;
|
|
113
|
+
const others = items.filter((i) => i.id !== id && sameColumns(i.layout)).map((i) => i.layout);
|
|
114
|
+
if (dy > 0) {
|
|
115
|
+
const below = others.filter((b) => b.y >= at.y + at.h).sort((a, b) => a.y - b.y)[0];
|
|
116
|
+
return below ? moveBlock(items, id, { x: at.x, y: below.y + below.h - at.h }) : [...items];
|
|
117
|
+
}
|
|
118
|
+
const above = others.filter((b) => b.y + b.h <= at.y).sort((a, b) => b.y - a.y)[0];
|
|
119
|
+
return above ? moveBlock(items, id, { x: at.x, y: above.y }) : [...items];
|
|
120
|
+
}
|
|
86
121
|
function appendBlock(items, item) {
|
|
87
122
|
const bottom = Math.max(0, ...items.map((i) => i.layout.y + i.layout.h));
|
|
88
|
-
const
|
|
89
|
-
return compactLayout([...items, { ...item, layout
|
|
123
|
+
const layout = snapLayout({ ...item.layout, x: 0, y: bottom });
|
|
124
|
+
return compactLayout([...items, { ...item, layout }]);
|
|
90
125
|
}
|
|
91
126
|
export {
|
|
92
|
-
|
|
127
|
+
DEFAULT_BLOCK_SLOTS,
|
|
128
|
+
MAX_BLOCK_SLOTS,
|
|
129
|
+
SLOTS_ACROSS,
|
|
130
|
+
SLOT_COLUMNS,
|
|
131
|
+
SLOT_ROWS,
|
|
93
132
|
appendBlock,
|
|
94
133
|
compactLayout,
|
|
134
|
+
defaultLayout,
|
|
95
135
|
moveBlock,
|
|
96
|
-
|
|
136
|
+
normalizeLayout,
|
|
137
|
+
resizeBlock,
|
|
138
|
+
snapLayout,
|
|
139
|
+
stepMove,
|
|
140
|
+
stepSize
|
|
97
141
|
};
|
|
98
142
|
//# sourceMappingURL=grid-layout.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/connection/pages/grid-layout.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * A page's grid as it is
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * A page's grid as it is arranged: blocks in SLOTS. The page is 4 slots wide and as many slots\n * tall as its blocks need; every block is 1 to 4 slots wide and 1 to 4 slots tall, in any\n * combination. A slot is 3 of the page's 12 stored columns wide and 3 rows tall\n * (`SLOT_COLUMNS`, `SLOT_ROWS`), so a block is saved as before (`x`/`y`/`w`/`h`), each a multiple\n * of 3. Blocks never overlap and leave no gaps above them (vertical compaction, as dashboard grids\n * do). Moving or resizing one pushes the blocks it lands on out of its way (up into the room it\n * left, when they fit there, else down), and the rest float up again. Pure functions of the\n * layouts: the grid calls them on every snapped step of a drag, and saves the result on drop.\n */\nimport {\n DEFAULT_BLOCK_HEIGHT,\n PAGE_GRID_COLUMNS,\n type BlockLayout,\n type PageBlockKind,\n} from '@arbidocs/react'\n\n/** A slot's width, in the page's 12 columns: a quarter of the page. */\nexport const SLOT_COLUMNS = 3\n/** A slot's height, in the page's rows (`PAGE_ROW_HEIGHT` each): about as tall as it is wide. */\nexport const SLOT_ROWS = 3\n/** The page is this many slots wide; a block is at most this many slots wide or tall. */\nexport const SLOTS_ACROSS = PAGE_GRID_COLUMNS / SLOT_COLUMNS\nexport const MAX_BLOCK_SLOTS = 4\n\n/** A new block's size, in slots, by kind (any size may be chosen after). */\nexport const DEFAULT_BLOCK_SLOTS: Record<PageBlockKind, { w: number; h: number }> = {\n metric: { w: 1, h: DEFAULT_BLOCK_HEIGHT.metric / SLOT_ROWS },\n text: { w: 2, h: DEFAULT_BLOCK_HEIGHT.text / SLOT_ROWS },\n chart: { w: 2, h: DEFAULT_BLOCK_HEIGHT.chart / SLOT_ROWS },\n table: { w: 4, h: DEFAULT_BLOCK_HEIGHT.table / SLOT_ROWS },\n document: { w: 2, h: DEFAULT_BLOCK_HEIGHT.document / SLOT_ROWS },\n gallery: { w: 2, h: DEFAULT_BLOCK_HEIGHT.gallery / SLOT_ROWS },\n list: { w: 2, h: DEFAULT_BLOCK_HEIGHT.list / SLOT_ROWS },\n carousel: { w: 4, h: DEFAULT_BLOCK_HEIGHT.carousel / SLOT_ROWS },\n agenda: { w: 2, h: DEFAULT_BLOCK_HEIGHT.agenda / SLOT_ROWS },\n start: { w: 4, h: DEFAULT_BLOCK_HEIGHT.start / SLOT_ROWS },\n}\n\n/** A new block's layout (columns and rows), by kind. */\nexport function defaultLayout(kind: PageBlockKind): BlockLayout {\n const { w, h } = DEFAULT_BLOCK_SLOTS[kind]\n return { x: 0, y: 0, w: w * SLOT_COLUMNS, h: h * SLOT_ROWS }\n}\n\nexport interface GridItem {\n id: string\n layout: BlockLayout\n}\n\nconst overlaps = (a: BlockLayout, b: BlockLayout) =>\n a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h && b.y < a.y + a.h\n\n/**\n * Float every block up as far as it goes, top to bottom (left to right in a row), never onto\n * another. `pinned` stays where it is (the block being dragged): the others settle around it.\n */\nexport function compactLayout<T extends GridItem>(items: readonly T[], pinned?: string): T[] {\n const placed: BlockLayout[] = []\n const out = new Map<string, T>()\n const fixed = items.find((i) => i.id === pinned)\n if (fixed) {\n placed.push(fixed.layout)\n out.set(fixed.id, fixed)\n }\n const order = items\n .filter((i) => i.id !== pinned)\n .sort((a, b) => a.layout.y - b.layout.y || a.layout.x - b.layout.x)\n for (const item of order) {\n const layout = { ...item.layout }\n while (placed.some((p) => overlaps(p, layout))) layout.y += 1\n while (layout.y > 0 && !placed.some((p) => overlaps(p, { ...layout, y: layout.y - 1 })))\n layout.y -= 1\n placed.push(layout)\n out.set(item.id, { ...item, layout })\n }\n return items.map((i) => out.get(i.id) ?? i)\n}\n\n/** Push every block that overlaps `mover` out of its way: up into room it fits, else below it. */\nfunction pushAway<T extends GridItem>(items: T[], mover: T): T[] {\n let next = items\n const others = () => next.filter((i) => i.id !== mover.id)\n for (const hit of others().sort((a, b) => a.layout.y - b.layout.y)) {\n const current = next.find((i) => i.id === hit.id)\n if (!current || !overlaps(current.layout, mover.layout)) continue\n const above = { ...current.layout, y: mover.layout.y - current.layout.h }\n const fitsAbove =\n above.y >= 0 && !next.some((i) => i.id !== current.id && overlaps(i.layout, above))\n const layout = fitsAbove ? above : { ...current.layout, y: mover.layout.y + mover.layout.h }\n const moved = { ...current, layout }\n next = next.map((i) => (i.id === moved.id ? moved : i))\n // A block pushed down pushes what it now lands on (the mover keeps its place).\n if (!fitsAbove) next = pushAway(next, moved).map((i) => (i.id === mover.id ? mover : i))\n }\n return next\n}\n\nfunction place<T extends GridItem>(items: readonly T[], id: string, layout: BlockLayout): T[] {\n const mover = items.find((i) => i.id === id)\n if (!mover) return [...items]\n const moved = { ...mover, layout }\n return pushAway(\n items.map((i) => (i.id === id ? moved : i)),\n moved\n )\n}\n\nconst clampSlots = (n: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, Math.round(n)))\n\n/**\n * A layout in slot cells: each side to the nearest whole slot (1 to 4 slots wide and tall), on\n * the page. Columns and rows in, fractions allowed (a pointer's).\n */\nexport function snapLayout(layout: BlockLayout): BlockLayout {\n const w = clampSlots(layout.w / SLOT_COLUMNS, 1, MAX_BLOCK_SLOTS)\n const h = clampSlots(layout.h / SLOT_ROWS, 1, MAX_BLOCK_SLOTS)\n const x = clampSlots(layout.x / SLOT_COLUMNS, 0, SLOTS_ACROSS - w)\n const y = Math.max(0, Math.round(layout.y / SLOT_ROWS))\n return { x: x * SLOT_COLUMNS, y: y * SLOT_ROWS, w: w * SLOT_COLUMNS, h: h * SLOT_ROWS }\n}\n\n/**\n * Blocks in slot cells: a layout saved before slots at the nearest slot size and place, then\n * compacted. One already in slots comes back as it was.\n */\nexport function normalizeLayout<T extends GridItem>(items: readonly T[]): T[] {\n return compactLayout(items.map((i) => ({ ...i, layout: snapLayout(i.layout) })))\n}\n\n/**\n * A block moved (its new place in columns and rows, fractions allowed) into the nearest slot cell:\n * what it lands on makes way. `settle`: compact the block itself too (on drop); while dragging it\n * stays where the pointer has it.\n */\nexport function moveBlock<T extends GridItem>(\n items: readonly T[],\n id: string,\n to: { x: number; y: number },\n settle = true\n): T[] {\n const item = items.find((i) => i.id === id)\n if (!item) return [...items]\n const layout = snapLayout({ ...item.layout, x: to.x, y: to.y })\n const next = compactLayout(place(items, id, layout), id)\n return settle ? compactLayout(next) : next\n}\n\n/**\n * A block resized to the nearest whole slots (in columns and rows, fractions allowed): 1 to 4\n * slots each way, no wider than the page from where it starts.\n */\nexport function resizeBlock<T extends GridItem>(\n items: readonly T[],\n id: string,\n to: { w: number; h: number },\n settle = true\n): T[] {\n const item = items.find((i) => i.id === id)\n if (!item) return [...items]\n const room = SLOTS_ACROSS - item.layout.x / SLOT_COLUMNS\n const w = clampSlots(to.w / SLOT_COLUMNS, 1, Math.min(MAX_BLOCK_SLOTS, room))\n const h = clampSlots(to.h / SLOT_ROWS, 1, MAX_BLOCK_SLOTS)\n const layout = { ...item.layout, w: w * SLOT_COLUMNS, h: h * SLOT_ROWS }\n const next = compactLayout(place(items, id, layout), id)\n return settle ? compactLayout(next) : next\n}\n\n/** A block one slot wider or narrower (`dw`), taller or shorter (`dh`), as far as it may go. */\nexport function stepSize<T extends GridItem>(\n items: readonly T[],\n id: string,\n dw: -1 | 0 | 1,\n dh: -1 | 0 | 1\n): T[] {\n const item = items.find((i) => i.id === id)\n if (!item) return [...items]\n return resizeBlock(items, id, {\n w: item.layout.w + dw * SLOT_COLUMNS,\n h: item.layout.h + dh * SLOT_ROWS,\n })\n}\n\n/**\n * A block one slot over: left or right a slot, or up or down past the nearest block above or\n * below it (they swap places). Nothing that way: it stays.\n */\nexport function stepMove<T extends GridItem>(\n items: readonly T[],\n id: string,\n dx: -1 | 0 | 1,\n dy: -1 | 0 | 1\n): T[] {\n const item = items.find((i) => i.id === id)\n if (!item) return [...items]\n const at = item.layout\n if (dx) return moveBlock(items, id, { x: at.x + dx * SLOT_COLUMNS, y: at.y })\n if (!dy) return [...items]\n const sameColumns = (b: BlockLayout) => b.x < at.x + at.w && at.x < b.x + b.w\n const others = items.filter((i) => i.id !== id && sameColumns(i.layout)).map((i) => i.layout)\n if (dy > 0) {\n const below = others.filter((b) => b.y >= at.y + at.h).sort((a, b) => a.y - b.y)[0]\n return below ? moveBlock(items, id, { x: at.x, y: below.y + below.h - at.h }) : [...items]\n }\n const above = others.filter((b) => b.y + b.h <= at.y).sort((a, b) => b.y - a.y)[0]\n return above ? moveBlock(items, id, { x: at.x, y: above.y }) : [...items]\n}\n\n/** A new block: below everything, at the left, in slot cells. */\nexport function appendBlock<T extends GridItem>(items: readonly T[], item: T): T[] {\n const bottom = Math.max(0, ...items.map((i) => i.layout.y + i.layout.h))\n const layout = snapLayout({ ...item.layout, x: 0, y: bottom })\n return compactLayout([...items, { ...item, layout }])\n}\n"],
|
|
5
|
+
"mappings": ";AAUA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAGA,MAAM,eAAe;AAErB,MAAM,YAAY;AAElB,MAAM,eAAe,oBAAoB;AACzC,MAAM,kBAAkB;AAGxB,MAAM,sBAAuE;AAAA,EAClF,QAAQ,EAAE,GAAG,GAAG,GAAG,qBAAqB,SAAS,UAAU;AAAA,EAC3D,MAAM,EAAE,GAAG,GAAG,GAAG,qBAAqB,OAAO,UAAU;AAAA,EACvD,OAAO,EAAE,GAAG,GAAG,GAAG,qBAAqB,QAAQ,UAAU;AAAA,EACzD,OAAO,EAAE,GAAG,GAAG,GAAG,qBAAqB,QAAQ,UAAU;AAAA,EACzD,UAAU,EAAE,GAAG,GAAG,GAAG,qBAAqB,WAAW,UAAU;AAAA,EAC/D,SAAS,EAAE,GAAG,GAAG,GAAG,qBAAqB,UAAU,UAAU;AAAA,EAC7D,MAAM,EAAE,GAAG,GAAG,GAAG,qBAAqB,OAAO,UAAU;AAAA,EACvD,UAAU,EAAE,GAAG,GAAG,GAAG,qBAAqB,WAAW,UAAU;AAAA,EAC/D,QAAQ,EAAE,GAAG,GAAG,GAAG,qBAAqB,SAAS,UAAU;AAAA,EAC3D,OAAO,EAAE,GAAG,GAA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E,CAAC,EAAE,CAAC;AAClF,WAAO,QAAQ,UAAU,OAAO,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK;AAAA,EAC3F;AACA,QAAM,QAAQ,OAAO,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AACjF,SAAO,QAAQ,UAAU,OAAO,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK;AAC1E;AAGO,SAAS,YAAgC,OAAqB,MAAc;AACjF,QAAM,SAAS,KAAK,IAAI,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,OAAO,CAAC,CAAC;AACvE,QAAM,SAAS,WAAW,EAAE,GAAG,KAAK,QAAQ,GAAG,GAAG,GAAG,OAAO,CAAC;AAC7D,SAAO,cAAc,CAAC,GAAG,OAAO,EAAE,GAAG,MAAM,OAAO,CAAC,CAAC;AACtD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,8 +2,10 @@ export { ConnectedPagesPage, type ConnectedPagesPageProps } from './ConnectedPag
|
|
|
2
2
|
export { DEFAULT_PAGES_PAGE_LABELS, type PagesPageLabels } from './labels';
|
|
3
3
|
export { BlockEditor, DEFAULT_BLOCK_EDITOR_LABELS, type BlockEditorLabels, type BlockEditorProps, } from './BlockEditor';
|
|
4
4
|
export { PageBlockView, type PageBlockViewProps } from './PageBlockView';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
5
|
+
export { DEFAULT_LIVE_BLOCK_EDITOR_LABELS, LiveBlockEditor, type LiveBlockEditorLabels, type LiveBlockEditorProps, } from './LiveBlockEditor';
|
|
6
|
+
export { PAGE_TEMPLATES, pageOfTemplate } from './page-templates';
|
|
7
|
+
export { DEFAULT_EDITABLE_PAGE_GRID_LABELS, EditablePageGrid, NO_DRAG, type EditablePageGridLabels, type EditablePageGridProps, } from './EditablePageGrid';
|
|
8
|
+
export { DEFAULT_BLOCK_SLOTS, MAX_BLOCK_SLOTS, SLOT_COLUMNS, SLOT_ROWS, SLOTS_ACROSS, appendBlock, compactLayout, defaultLayout, moveBlock, normalizeLayout, resizeBlock, snapLayout, stepMove, stepSize, type GridItem, } from './grid-layout';
|
|
7
9
|
export { PAGE_ROW_HEIGHT, PageCell, PageGrid, inReadingOrder, type PageGridProps } from './PageGrid';
|
|
8
10
|
export { DEFAULT_TABLE_VIEW_BLOCK_LABELS, TableViewBlock, type TableViewBlockLabels, type TableViewBlockProps, } from './TableViewBlock';
|
|
9
11
|
export { DEFAULT_VIEW_PICKER_LABELS, ViewPicker, type ViewPickerLabels, type ViewPickerProps, } from './ViewPicker';
|
|
@@ -6,16 +6,31 @@ import {
|
|
|
6
6
|
DEFAULT_BLOCK_EDITOR_LABELS
|
|
7
7
|
} from "./BlockEditor.js";
|
|
8
8
|
import { PageBlockView } from "./PageBlockView.js";
|
|
9
|
+
import {
|
|
10
|
+
DEFAULT_LIVE_BLOCK_EDITOR_LABELS,
|
|
11
|
+
LiveBlockEditor
|
|
12
|
+
} from "./LiveBlockEditor.js";
|
|
13
|
+
import { PAGE_TEMPLATES, pageOfTemplate } from "./page-templates.js";
|
|
9
14
|
import {
|
|
10
15
|
DEFAULT_EDITABLE_PAGE_GRID_LABELS,
|
|
11
|
-
EditablePageGrid
|
|
16
|
+
EditablePageGrid,
|
|
17
|
+
NO_DRAG
|
|
12
18
|
} from "./EditablePageGrid.js";
|
|
13
19
|
import {
|
|
14
|
-
|
|
20
|
+
DEFAULT_BLOCK_SLOTS,
|
|
21
|
+
MAX_BLOCK_SLOTS,
|
|
22
|
+
SLOT_COLUMNS,
|
|
23
|
+
SLOT_ROWS,
|
|
24
|
+
SLOTS_ACROSS,
|
|
15
25
|
appendBlock,
|
|
16
26
|
compactLayout,
|
|
27
|
+
defaultLayout,
|
|
17
28
|
moveBlock,
|
|
18
|
-
|
|
29
|
+
normalizeLayout,
|
|
30
|
+
resizeBlock,
|
|
31
|
+
snapLayout,
|
|
32
|
+
stepMove,
|
|
33
|
+
stepSize
|
|
19
34
|
} from "./grid-layout.js";
|
|
20
35
|
import { PAGE_ROW_HEIGHT, PageCell, PageGrid, inReadingOrder } from "./PageGrid.js";
|
|
21
36
|
import {
|
|
@@ -40,9 +55,11 @@ export {
|
|
|
40
55
|
BlockEditor,
|
|
41
56
|
ConnectedPagesPage,
|
|
42
57
|
DEFAULT_BLOCK_EDITOR_LABELS,
|
|
58
|
+
DEFAULT_BLOCK_SLOTS,
|
|
43
59
|
DEFAULT_DOCUMENTS_PICKER_LABELS,
|
|
44
60
|
DEFAULT_DOCUMENT_BLOCK_LABELS,
|
|
45
61
|
DEFAULT_EDITABLE_PAGE_GRID_LABELS,
|
|
62
|
+
DEFAULT_LIVE_BLOCK_EDITOR_LABELS,
|
|
46
63
|
DEFAULT_PAGES_PAGE_LABELS,
|
|
47
64
|
DEFAULT_TABLE_VIEW_BLOCK_LABELS,
|
|
48
65
|
DEFAULT_VIEW_PICKER_LABELS,
|
|
@@ -51,17 +68,29 @@ export {
|
|
|
51
68
|
DocumentsPicker,
|
|
52
69
|
EditablePageGrid,
|
|
53
70
|
GalleryBlockView,
|
|
54
|
-
|
|
71
|
+
LiveBlockEditor,
|
|
72
|
+
MAX_BLOCK_SLOTS,
|
|
73
|
+
NO_DRAG,
|
|
55
74
|
PAGE_ROW_HEIGHT,
|
|
75
|
+
PAGE_TEMPLATES,
|
|
56
76
|
PageBlockView,
|
|
57
77
|
PageCell,
|
|
58
78
|
PageGrid,
|
|
79
|
+
SLOTS_ACROSS,
|
|
80
|
+
SLOT_COLUMNS,
|
|
81
|
+
SLOT_ROWS,
|
|
59
82
|
TableViewBlock,
|
|
60
83
|
ViewPicker,
|
|
61
84
|
appendBlock,
|
|
62
85
|
compactLayout,
|
|
86
|
+
defaultLayout,
|
|
63
87
|
inReadingOrder,
|
|
64
88
|
moveBlock,
|
|
65
|
-
|
|
89
|
+
normalizeLayout,
|
|
90
|
+
pageOfTemplate,
|
|
91
|
+
resizeBlock,
|
|
92
|
+
snapLayout,
|
|
93
|
+
stepMove,
|
|
94
|
+
stepSize
|
|
66
95
|
};
|
|
67
96
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/connection/pages/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { ConnectedPagesPage, type ConnectedPagesPageProps } from './ConnectedPagesPage'\nexport { DEFAULT_PAGES_PAGE_LABELS, type PagesPageLabels } from './labels'\nexport {\n BlockEditor,\n DEFAULT_BLOCK_EDITOR_LABELS,\n type BlockEditorLabels,\n type BlockEditorProps,\n} from './BlockEditor'\nexport { PageBlockView, type PageBlockViewProps } from './PageBlockView'\nexport {\n DEFAULT_EDITABLE_PAGE_GRID_LABELS,\n EditablePageGrid,\n type EditablePageGridLabels,\n type EditablePageGridProps,\n} from './EditablePageGrid'\nexport {\n
|
|
5
|
-
"mappings": ";AAAA,SAAS,0BAAwD;AACjE,SAAS,iCAAuD;AAChE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,qBAA8C;AACvD;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,iBAAiB,UAAU,UAAU,sBAA0C;AACxF;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;",
|
|
4
|
+
"sourcesContent": ["export { ConnectedPagesPage, type ConnectedPagesPageProps } from './ConnectedPagesPage'\nexport { DEFAULT_PAGES_PAGE_LABELS, type PagesPageLabels } from './labels'\nexport {\n BlockEditor,\n DEFAULT_BLOCK_EDITOR_LABELS,\n type BlockEditorLabels,\n type BlockEditorProps,\n} from './BlockEditor'\nexport { PageBlockView, type PageBlockViewProps } from './PageBlockView'\nexport {\n DEFAULT_LIVE_BLOCK_EDITOR_LABELS,\n LiveBlockEditor,\n type LiveBlockEditorLabels,\n type LiveBlockEditorProps,\n} from './LiveBlockEditor'\nexport { PAGE_TEMPLATES, pageOfTemplate } from './page-templates'\nexport {\n DEFAULT_EDITABLE_PAGE_GRID_LABELS,\n EditablePageGrid,\n NO_DRAG,\n type EditablePageGridLabels,\n type EditablePageGridProps,\n} from './EditablePageGrid'\nexport {\n DEFAULT_BLOCK_SLOTS,\n MAX_BLOCK_SLOTS,\n SLOT_COLUMNS,\n SLOT_ROWS,\n SLOTS_ACROSS,\n appendBlock,\n compactLayout,\n defaultLayout,\n moveBlock,\n normalizeLayout,\n resizeBlock,\n snapLayout,\n stepMove,\n stepSize,\n type GridItem,\n} from './grid-layout'\nexport { PAGE_ROW_HEIGHT, PageCell, PageGrid, inReadingOrder, type PageGridProps } from './PageGrid'\nexport {\n DEFAULT_TABLE_VIEW_BLOCK_LABELS,\n TableViewBlock,\n type TableViewBlockLabels,\n type TableViewBlockProps,\n} from './TableViewBlock'\nexport {\n DEFAULT_VIEW_PICKER_LABELS,\n ViewPicker,\n type ViewPickerLabels,\n type ViewPickerProps,\n} from './ViewPicker'\nexport {\n DEFAULT_DOCUMENT_BLOCK_LABELS,\n DocumentBlockView,\n DocumentReadView,\n GalleryBlockView,\n type DocumentBlockLabels,\n type DocumentBlockViewProps,\n type DocumentReadViewProps,\n type GalleryBlockViewProps,\n} from './DocumentBlocks'\nexport {\n DEFAULT_DOCUMENTS_PICKER_LABELS,\n DocumentsPicker,\n type DocumentsPickerLabels,\n type DocumentsPickerProps,\n} from './DocumentsPicker'\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,0BAAwD;AACjE,SAAS,iCAAuD;AAChE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,qBAA8C;AACvD;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,gBAAgB,sBAAsB;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,iBAAiB,UAAU,UAAU,sBAA0C;AACxF;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,7 +34,11 @@ const DEFAULT_PAGES_PAGE_LABELS = {
|
|
|
34
34
|
text: "Text",
|
|
35
35
|
table: "Table",
|
|
36
36
|
document: "Document",
|
|
37
|
-
gallery: "Gallery"
|
|
37
|
+
gallery: "Gallery",
|
|
38
|
+
list: "Recent list",
|
|
39
|
+
carousel: "Carousel",
|
|
40
|
+
agenda: "Agenda",
|
|
41
|
+
start: "Start"
|
|
38
42
|
},
|
|
39
43
|
editBlock: "Edit the block",
|
|
40
44
|
removeBlock: "Remove the block",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/connection/pages/labels.ts"],
|
|
4
|
-
"sourcesContent": ["import type { PageBlockKind } from '@arbidocs/react'\n\n/** The words of `ConnectedPagesPage` (a host passes its own through `labels`). */\nexport interface PagesPageLabels {\n title: string\n description: string\n /** The list's two parts: the viewer's own pages, and the workspace's shared ones. */\n mine: string\n shared: string\n newPage: string\n blank: string\n untitled: string\n empty: string\n emptyDescription: string\n /** Nothing in one part of the list. */\n noneMine: string\n noneShared: string\n loadError: string\n /** Offline with no pages cached. */\n offline: string\n retry: string\n blocks: (count: number) => string\n back: string\n edit: string\n /** The \"\u2026\" menu of an open page (its rarer actions: delete). */\n more: string\n delete: string\n confirmDelete: (title: string) => string\n deleteFailed: string\n /** Leaving the editor with changes not saved. */\n confirmDiscard: string\n save: string\n saving: string\n cancel: string\n pageTitle: string\n pageDescription: string\n addBlock: string\n kinds: Record<PageBlockKind, string>\n editBlock: string\n removeBlock: string\n noBlocks: string\n saved: string\n saveFailed: string\n /** The one-way share button of an open page, and what it asks first. */\n share: string\n confirmShare: (title: string) => string\n sharedBadge: string\n privateBadge: string\n sharedDone: string\n shareFailed: string\n /** A dashboard from before pages, not yet saved into a workspace. */\n legacy: string\n /** The figure of a new page made from a database (\"Chart this\"): its rows. */\n rows: string\n /** Saved pages that could not be opened (sealed under another key, or damaged). */\n unreadable: (count: number) => string\n deleteUnreadable: string\n confirmDeleteUnreadable: (count: number) => string\n}\n\nexport const DEFAULT_PAGES_PAGE_LABELS: PagesPageLabels = {\n title: 'Pages',\n description:\n 'Charts, figures, notes and tables from your documents, threads, tags, facts, workflows, AI usage and databases.',\n mine: 'Mine',\n shared: 'Shared',\n newPage: 'New page',\n blank: 'Blank page',\n untitled: 'Untitled page',\n empty: 'No pages yet',\n emptyDescription:\n 'Start from a template or a blank page, then add charts, figures, text and tables.',\n noneMine: 'You have no pages of your own here.',\n noneShared: 'No page is shared with this workspace yet.',\n loadError: 'The pages could not be loaded.',\n offline: 'You are offline. Your pages show when the connection is back.',\n retry: 'Try again',\n blocks: (count) => `${count} ${count === 1 ? 'block' : 'blocks'}`,\n back: 'All pages',\n edit: 'Edit',\n more: 'More page actions',\n delete: 'Delete',\n confirmDelete: (title) => `Delete the page \u201C${title}\u201D? Its blocks go with it.`,\n deleteFailed: 'The page could not be deleted',\n confirmDiscard: 'Discard the changes to this page?',\n save: 'Save',\n saving: 'Saving\u2026',\n cancel: 'Cancel',\n pageTitle: 'Name',\n pageDescription: 'Description',\n addBlock: 'Add a block',\n kinds: {\n chart: 'Chart',\n metric: 'Figure',\n text: 'Text',\n table: 'Table',\n document: 'Document',\n gallery: 'Gallery',\n },\n editBlock: 'Edit the block',\n removeBlock: 'Remove the block',\n noBlocks: 'No blocks yet. Add one to start.',\n saved: 'Page saved',\n saveFailed: 'The page could not be saved',\n share: 'Share with the workspace',\n confirmShare: (title) =>\n `Share \u201C${title}\u201D with the workspace? Every member will see it. Sharing cannot be undone: once shared, only a workspace owner can delete it.`,\n sharedBadge: 'Shared with the workspace',\n privateBadge: 'Private',\n sharedDone: 'The page is shared with the workspace',\n shareFailed: 'The page could not be shared',\n legacy: 'A dashboard from before pages: saving it puts it in this workspace.',\n rows: 'Rows',\n unreadable: (count) => `${count} saved ${count === 1 ? 'page' : 'pages'} could not be opened.`,\n deleteUnreadable: 'Delete',\n confirmDeleteUnreadable: (count) =>\n `Delete the ${count === 1 ? 'page' : `${count} pages`} that could not be opened?`,\n}\n"],
|
|
5
|
-
"mappings": ";AA4DO,MAAM,4BAA6C;AAAA,EACxD,OAAO;AAAA,EACP,aACE;AAAA,EACF,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AAAA,EACP,kBACE;AAAA,EACF,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ,CAAC,UAAU,GAAG,KAAK,IAAI,UAAU,IAAI,UAAU,QAAQ;AAAA,EAC/D,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,eAAe,CAAC,UAAU,yBAAoB,KAAK;AAAA,EACnD,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,OAAO;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,
|
|
4
|
+
"sourcesContent": ["import type { PageBlockKind } from '@arbidocs/react'\n\n/** The words of `ConnectedPagesPage` (a host passes its own through `labels`). */\nexport interface PagesPageLabels {\n title: string\n description: string\n /** The list's two parts: the viewer's own pages, and the workspace's shared ones. */\n mine: string\n shared: string\n newPage: string\n blank: string\n untitled: string\n empty: string\n emptyDescription: string\n /** Nothing in one part of the list. */\n noneMine: string\n noneShared: string\n loadError: string\n /** Offline with no pages cached. */\n offline: string\n retry: string\n blocks: (count: number) => string\n back: string\n edit: string\n /** The \"\u2026\" menu of an open page (its rarer actions: delete). */\n more: string\n delete: string\n confirmDelete: (title: string) => string\n deleteFailed: string\n /** Leaving the editor with changes not saved. */\n confirmDiscard: string\n save: string\n saving: string\n cancel: string\n pageTitle: string\n pageDescription: string\n addBlock: string\n kinds: Record<PageBlockKind, string>\n editBlock: string\n removeBlock: string\n noBlocks: string\n saved: string\n saveFailed: string\n /** The one-way share button of an open page, and what it asks first. */\n share: string\n confirmShare: (title: string) => string\n sharedBadge: string\n privateBadge: string\n sharedDone: string\n shareFailed: string\n /** A dashboard from before pages, not yet saved into a workspace. */\n legacy: string\n /** The figure of a new page made from a database (\"Chart this\"): its rows. */\n rows: string\n /** Saved pages that could not be opened (sealed under another key, or damaged). */\n unreadable: (count: number) => string\n deleteUnreadable: string\n confirmDeleteUnreadable: (count: number) => string\n}\n\nexport const DEFAULT_PAGES_PAGE_LABELS: PagesPageLabels = {\n title: 'Pages',\n description:\n 'Charts, figures, notes and tables from your documents, threads, tags, facts, workflows, AI usage and databases.',\n mine: 'Mine',\n shared: 'Shared',\n newPage: 'New page',\n blank: 'Blank page',\n untitled: 'Untitled page',\n empty: 'No pages yet',\n emptyDescription:\n 'Start from a template or a blank page, then add charts, figures, text and tables.',\n noneMine: 'You have no pages of your own here.',\n noneShared: 'No page is shared with this workspace yet.',\n loadError: 'The pages could not be loaded.',\n offline: 'You are offline. Your pages show when the connection is back.',\n retry: 'Try again',\n blocks: (count) => `${count} ${count === 1 ? 'block' : 'blocks'}`,\n back: 'All pages',\n edit: 'Edit',\n more: 'More page actions',\n delete: 'Delete',\n confirmDelete: (title) => `Delete the page \u201C${title}\u201D? Its blocks go with it.`,\n deleteFailed: 'The page could not be deleted',\n confirmDiscard: 'Discard the changes to this page?',\n save: 'Save',\n saving: 'Saving\u2026',\n cancel: 'Cancel',\n pageTitle: 'Name',\n pageDescription: 'Description',\n addBlock: 'Add a block',\n kinds: {\n chart: 'Chart',\n metric: 'Figure',\n text: 'Text',\n table: 'Table',\n document: 'Document',\n gallery: 'Gallery',\n list: 'Recent list',\n carousel: 'Carousel',\n agenda: 'Agenda',\n start: 'Start',\n },\n editBlock: 'Edit the block',\n removeBlock: 'Remove the block',\n noBlocks: 'No blocks yet. Add one to start.',\n saved: 'Page saved',\n saveFailed: 'The page could not be saved',\n share: 'Share with the workspace',\n confirmShare: (title) =>\n `Share \u201C${title}\u201D with the workspace? Every member will see it. Sharing cannot be undone: once shared, only a workspace owner can delete it.`,\n sharedBadge: 'Shared with the workspace',\n privateBadge: 'Private',\n sharedDone: 'The page is shared with the workspace',\n shareFailed: 'The page could not be shared',\n legacy: 'A dashboard from before pages: saving it puts it in this workspace.',\n rows: 'Rows',\n unreadable: (count) => `${count} saved ${count === 1 ? 'page' : 'pages'} could not be opened.`,\n deleteUnreadable: 'Delete',\n confirmDeleteUnreadable: (count) =>\n `Delete the ${count === 1 ? 'page' : `${count} pages`} that could not be opened?`,\n}\n"],
|
|
5
|
+
"mappings": ";AA4DO,MAAM,4BAA6C;AAAA,EACxD,OAAO;AAAA,EACP,aACE;AAAA,EACF,MAAM;AAAA,EACN,QAAQ;AAAA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MPLATES`): the workspace dashboard
|
|
3
|
+
* first (its live blocks, so a page can be the dashboard and then be changed), then the Analytics
|
|
4
|
+
* dashboards (`DASHBOARD_TEMPLATES`).
|
|
5
|
+
*/
|
|
6
|
+
import { type PageSpec } from '@arbidocs/react';
|
|
7
|
+
import { type PageTemplate } from '../dashboards/templates';
|
|
8
|
+
export declare const PAGE_TEMPLATES: readonly PageTemplate[];
|
|
9
|
+
/** The page a template makes: a dashboard's panels laid out in order, or the page itself. */
|
|
10
|
+
export declare function pageOfTemplate(template: PageTemplate): PageSpec;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { pageFromDashboard } from "@arbidocs/react";
|
|
3
|
+
import { DASHBOARD_TEMPLATES } from "../dashboards/templates.js";
|
|
4
|
+
import { WORKSPACE_DASHBOARD_PAGE } from "../live-blocks/workspace-dashboard-blocks.js";
|
|
5
|
+
const PAGE_TEMPLATES = [
|
|
6
|
+
WORKSPACE_DASHBOARD_PAGE,
|
|
7
|
+
...DASHBOARD_TEMPLATES
|
|
8
|
+
];
|
|
9
|
+
function pageOfTemplate(template) {
|
|
10
|
+
return "panels" in template ? pageFromDashboard(template) : structuredClone(template);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
PAGE_TEMPLATES,
|
|
14
|
+
pageOfTemplate
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=page-templates.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/pages/page-templates.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The starting points \"New page\" offers by default (`PAGE_TEMPLATES`): the workspace dashboard\n * first (its live blocks, so a page can be the dashboard and then be changed), then the Analytics\n * dashboards (`DASHBOARD_TEMPLATES`).\n */\nimport { pageFromDashboard, type PageSpec } from '@arbidocs/react'\nimport { DASHBOARD_TEMPLATES, type PageTemplate } from '../dashboards/templates'\nimport { WORKSPACE_DASHBOARD_PAGE } from '../live-blocks/workspace-dashboard-blocks'\n\nexport const PAGE_TEMPLATES: readonly PageTemplate[] = [\n WORKSPACE_DASHBOARD_PAGE,\n ...DASHBOARD_TEMPLATES,\n]\n\n/** The page a template makes: a dashboard's panels laid out in order, or the page itself. */\nexport function pageOfTemplate(template: PageTemplate): PageSpec {\n return 'panels' in template ? pageFromDashboard(template) : structuredClone(template)\n}\n"],
|
|
5
|
+
"mappings": ";AAKA,SAAS,yBAAwC;AACjD,SAAS,2BAA8C;AACvD,SAAS,gCAAgC;AAElC,MAAM,iBAA0C;AAAA,EACrD;AAAA,EACA,GAAG;AACL;AAGO,SAAS,eAAe,UAAkC;AAC/D,SAAO,YAAY,WAAW,kBAAkB,QAAQ,IAAI,gBAAgB,QAAQ;AACtF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -16,6 +16,8 @@ export interface ConnectedWorkflowStartProps {
|
|
|
16
16
|
tileWorkflows?: WorkflowDefinition[];
|
|
17
17
|
/** Render the Start band (off when another surface opens the dialog). */
|
|
18
18
|
showTiles?: boolean;
|
|
19
|
+
/** The band's layout: reflowing columns (default) or one sideways-scrolling row (a carousel). */
|
|
20
|
+
tilesLayout?: 'grid' | 'carousel';
|
|
19
21
|
caption?: string;
|
|
20
22
|
captionTestId?: string;
|
|
21
23
|
testId?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/connection/workflows/ConnectedWorkflowStart.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * The workflow launcher, wired to run what it launches: `ConnectedWorkflowLauncher` (the\n * workspace's files behind scope and file fields, the user's agents behind \"Run as\") with the one\n * launch handler (`useLaunchWorkflow`), the host's upload dialog for adding files\n * (`environment.openUpload`), and the touches of the annotation operation (its derived name and\n * overwrite warning, \"Annotate N documents\").\n *\n * The dashboard's Start band, Files (\"Create new\") and, headless, the slash menu use it.\n */\n\nimport { useTags } from '@arbidocs/react'\nimport { useCallback, useMemo, type ReactNode } from 'react'\nimport { TriangleAlert } from 'lucide-react'\nimport { documentScopeLabels } from '../../agents/workflows/workspaceScope'\nimport {\n type OnWorkflowLaunch,\n type WorkflowDefinition,\n type WorkflowField,\n type WorkflowInputs,\n type WorkflowLanding,\n} from '../../agents/workflows/types'\nimport { ConnectedWorkflowLauncher } from '../ConnectedWorkflowLauncher'\nimport { type StartTile } from '../../home/StartTiles'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useHost } from '../../provider/host'\nimport { deriveAnnotationName } from '../../agents/workflows/catalogue/annotation-name'\nimport { ANNOTATE_ID, renderWorkflowIcon } from '../../agents/workflows/catalogue/seed'\nimport { useLaunchWorkflow } from './useLaunchWorkflow'\n\n// The agent picker names the person it hands the work to: the default \"Run as\" / \"My assistant\"\n// copy did not say who an assistant is.\nconst AGENT_LABELS = { label: 'Who this runs for', myAssistant: 'Me (your own assistant)' }\n\nexport interface ConnectedWorkflowStartProps {\n workflows: WorkflowDefinition[]\n /** Which of `workflows` get a tile (a filtered or capped view). */\n tileWorkflows?: WorkflowDefinition[]\n /** Render the Start band (off when another surface opens the dialog). */\n showTiles?: boolean\n caption?: string\n captionTestId?: string\n testId?: string\n /** Plain tiles appended to the band (e.g. the \"Create a file\" menu). */\n extraTiles?: StartTile[]\n /** Controlled open workflow id. */\n activeId?: string | null\n onActiveIdChange?: (id: string | null) => void\n initialInputsFor?: (workflow: WorkflowDefinition) => Partial<WorkflowInputs> | undefined\n /** Where launches land, over each workflow's default (`current-chat` = the chat on screen). */\n landing?: WorkflowLanding\n /** A prompt run's own send (a chat that is not the session's conversation). See `useLaunchWorkflow`. */\n send?: (prompt: string) => void\n /**\n * Run a launch here instead of the usual way (`useLaunchWorkflow`): a surface that wants the\n * result itself, e.g. the presentation, which adds a generated image to its clips. The dialog\n * shows it running until it resolves, closes then, and stays open if it throws.\n */\n onLaunch?: OnWorkflowLaunch\n /**\n * Files added from a `documents` field are uploaded right in the field instead of through the\n * host's upload dialog: for a dialog in a popped-out window, where the host's dialog would open\n * in the app's window, out of sight, and block this one.\n */\n uploadInPlace?: boolean\n /** The host's own \"Add\" control, offered when a workflow needs files and there are none. */\n addFilesAction?: ReactNode\n tileTestId?: (workflow: WorkflowDefinition) => string | undefined\n disabledReason?: (workflow: WorkflowDefinition) => string | undefined\n}\n\nexport function ConnectedWorkflowStart({\n workflows,\n landing,\n send,\n addFilesAction,\n onLaunch: launchHere,\n uploadInPlace = false,\n ...rest\n}: ConnectedWorkflowStartProps) {\n const launchUsually = useLaunchWorkflow({ landing, send })\n const onLaunch = launchHere ?? launchUsually\n // The host's icons first (a skill pack names its own), then the kit's, then the skill icon.\n const hostIcon = useHost().workflows?.renderIcon\n const renderIcon = useCallback(\n (key: string) => hostIcon?.(key) ?? renderWorkflowIcon(key) ?? renderWorkflowIcon('skill'),\n [hostIcon]\n )\n const { openUpload } = useBlocksEnvironment()\n const { data: workspaceTags = [] } = useTags()\n const tags = useMemo(() => documentScopeLabels(workspaceTags), [workspaceTags])\n\n // The annotation's name is optional: left blank it is taken from the question, which the\n // field's placeholder shows before anything runs.\n const fieldPlaceholder = useCallback(\n (field: WorkflowField, inputs: WorkflowInputs, workflow: WorkflowDefinition) => {\n if (workflow.id !== ANNOTATE_ID || field.name !== 'name') return undefined\n const derived = deriveAnnotationName(String(inputs.description ?? ''))\n return derived ? `Otherwise \u201C${derived}\u201D` : 'Taken from the description'\n },\n []\n )\n\n return (\n <ConnectedWorkflowLauncher\n {...rest}\n workflows={workflows}\n onLaunch={onLaunch}\n renderIcon={renderIcon}\n onAddFiles={uploadInPlace ? undefined : openUpload}\n agentLabels={AGENT_LABELS}\n addFilesAction={addFilesAction}\n fieldPlaceholder={fieldPlaceholder}\n submitLabel={({ workflow, matchedCount }) =>\n workflow.id === ANNOTATE_ID && matchedCount !== null\n ? `Annotate ${matchedCount} document${matchedCount !== 1 ? 's' : ''}`\n : undefined\n }\n renderNotice={({ workflow, inputs }) => {\n if (workflow.id !== ANNOTATE_ID) return null\n // A same-named label is reused: warn that this overwrites its stored description and the\n // cell values for the selected documents.\n const name =\n String(inputs.name ?? '').trim() || deriveAnnotationName(String(inputs.description ?? ''))\n const existing = name\n ? tags.find((t) => t.name.toLowerCase() === name.toLowerCase())\n : undefined\n if (!existing) return null\n return (\n <div\n className=\"flex items-start gap-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm text-amber-800 dark:text-amber-200\"\n role=\"status\"\n data-testid=\"workflow-existing-label-warning\"\n >\n <TriangleAlert className=\"mt-0.5 size-4 shrink-0 text-amber-500\" />\n <span>\n An annotation called <span className=\"font-medium\">{existing.name}</span> already\n exists. Annotating will overwrite its description and the current cell values for the\n selected files.\n </span>\n </div>\n )\n }}\n />\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * The workflow launcher, wired to run what it launches: `ConnectedWorkflowLauncher` (the\n * workspace's files behind scope and file fields, the user's agents behind \"Run as\") with the one\n * launch handler (`useLaunchWorkflow`), the host's upload dialog for adding files\n * (`environment.openUpload`), and the touches of the annotation operation (its derived name and\n * overwrite warning, \"Annotate N documents\").\n *\n * The dashboard's Start band, Files (\"Create new\") and, headless, the slash menu use it.\n */\n\nimport { useTags } from '@arbidocs/react'\nimport { useCallback, useMemo, type ReactNode } from 'react'\nimport { TriangleAlert } from 'lucide-react'\nimport { documentScopeLabels } from '../../agents/workflows/workspaceScope'\nimport {\n type OnWorkflowLaunch,\n type WorkflowDefinition,\n type WorkflowField,\n type WorkflowInputs,\n type WorkflowLanding,\n} from '../../agents/workflows/types'\nimport { ConnectedWorkflowLauncher } from '../ConnectedWorkflowLauncher'\nimport { type StartTile } from '../../home/StartTiles'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useHost } from '../../provider/host'\nimport { deriveAnnotationName } from '../../agents/workflows/catalogue/annotation-name'\nimport { ANNOTATE_ID, renderWorkflowIcon } from '../../agents/workflows/catalogue/seed'\nimport { useLaunchWorkflow } from './useLaunchWorkflow'\n\n// The agent picker names the person it hands the work to: the default \"Run as\" / \"My assistant\"\n// copy did not say who an assistant is.\nconst AGENT_LABELS = { label: 'Who this runs for', myAssistant: 'Me (your own assistant)' }\n\nexport interface ConnectedWorkflowStartProps {\n workflows: WorkflowDefinition[]\n /** Which of `workflows` get a tile (a filtered or capped view). */\n tileWorkflows?: WorkflowDefinition[]\n /** Render the Start band (off when another surface opens the dialog). */\n showTiles?: boolean\n /** The band's layout: reflowing columns (default) or one sideways-scrolling row (a carousel). */\n tilesLayout?: 'grid' | 'carousel'\n caption?: string\n captionTestId?: string\n testId?: string\n /** Plain tiles appended to the band (e.g. the \"Create a file\" menu). */\n extraTiles?: StartTile[]\n /** Controlled open workflow id. */\n activeId?: string | null\n onActiveIdChange?: (id: string | null) => void\n initialInputsFor?: (workflow: WorkflowDefinition) => Partial<WorkflowInputs> | undefined\n /** Where launches land, over each workflow's default (`current-chat` = the chat on screen). */\n landing?: WorkflowLanding\n /** A prompt run's own send (a chat that is not the session's conversation). See `useLaunchWorkflow`. */\n send?: (prompt: string) => void\n /**\n * Run a launch here instead of the usual way (`useLaunchWorkflow`): a surface that wants the\n * result itself, e.g. the presentation, which adds a generated image to its clips. The dialog\n * shows it running until it resolves, closes then, and stays open if it throws.\n */\n onLaunch?: OnWorkflowLaunch\n /**\n * Files added from a `documents` field are uploaded right in the field instead of through the\n * host's upload dialog: for a dialog in a popped-out window, where the host's dialog would open\n * in the app's window, out of sight, and block this one.\n */\n uploadInPlace?: boolean\n /** The host's own \"Add\" control, offered when a workflow needs files and there are none. */\n addFilesAction?: ReactNode\n tileTestId?: (workflow: WorkflowDefinition) => string | undefined\n disabledReason?: (workflow: WorkflowDefinition) => string | undefined\n}\n\nexport function ConnectedWorkflowStart({\n workflows,\n landing,\n send,\n addFilesAction,\n onLaunch: launchHere,\n uploadInPlace = false,\n ...rest\n}: ConnectedWorkflowStartProps) {\n const launchUsually = useLaunchWorkflow({ landing, send })\n const onLaunch = launchHere ?? launchUsually\n // The host's icons first (a skill pack names its own), then the kit's, then the skill icon.\n const hostIcon = useHost().workflows?.renderIcon\n const renderIcon = useCallback(\n (key: string) => hostIcon?.(key) ?? renderWorkflowIcon(key) ?? renderWorkflowIcon('skill'),\n [hostIcon]\n )\n const { openUpload } = useBlocksEnvironment()\n const { data: workspaceTags = [] } = useTags()\n const tags = useMemo(() => documentScopeLabels(workspaceTags), [workspaceTags])\n\n // The annotation's name is optional: left blank it is taken from the question, which the\n // field's placeholder shows before anything runs.\n const fieldPlaceholder = useCallback(\n (field: WorkflowField, inputs: WorkflowInputs, workflow: WorkflowDefinition) => {\n if (workflow.id !== ANNOTATE_ID || field.name !== 'name') return undefined\n const derived = deriveAnnotationName(String(inputs.description ?? ''))\n return derived ? `Otherwise \u201C${derived}\u201D` : 'Taken from the description'\n },\n []\n )\n\n return (\n <ConnectedWorkflowLauncher\n {...rest}\n workflows={workflows}\n onLaunch={onLaunch}\n renderIcon={renderIcon}\n onAddFiles={uploadInPlace ? undefined : openUpload}\n agentLabels={AGENT_LABELS}\n addFilesAction={addFilesAction}\n fieldPlaceholder={fieldPlaceholder}\n submitLabel={({ workflow, matchedCount }) =>\n workflow.id === ANNOTATE_ID && matchedCount !== null\n ? `Annotate ${matchedCount} document${matchedCount !== 1 ? 's' : ''}`\n : undefined\n }\n renderNotice={({ workflow, inputs }) => {\n if (workflow.id !== ANNOTATE_ID) return null\n // A same-named label is reused: warn that this overwrites its stored description and the\n // cell values for the selected documents.\n const name =\n String(inputs.name ?? '').trim() || deriveAnnotationName(String(inputs.description ?? ''))\n const existing = name\n ? tags.find((t) => t.name.toLowerCase() === name.toLowerCase())\n : undefined\n if (!existing) return null\n return (\n <div\n className=\"flex items-start gap-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm text-amber-800 dark:text-amber-200\"\n role=\"status\"\n data-testid=\"workflow-existing-label-warning\"\n >\n <TriangleAlert className=\"mt-0.5 size-4 shrink-0 text-amber-500\" />\n <span>\n An annotation called <span className=\"font-medium\">{existing.name}</span> already\n exists. Annotating will overwrite its description and the current cell values for the\n selected files.\n </span>\n </div>\n )\n }}\n />\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuIY,cACA,YADA;AA7HZ,SAAS,eAAe;AACxB,SAAS,aAAa,eAA+B;AACrD,SAAS,qBAAqB;AAC9B,SAAS,2BAA2B;AAQpC,SAAS,iCAAiC;AAE1C,SAAS,4BAA4B;AACrC,SAAS,eAAe;AACxB,SAAS,4BAA4B;AACrC,SAAS,aAAa,0BAA0B;AAChD,SAAS,yBAAyB;AAIlC,MAAM,eAAe,EAAE,OAAO,qBAAqB,aAAa,0BAA0B;AAyCnF,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,GAAG;AACL,GAAgC;AAC9B,QAAM,gBAAgB,kBAAkB,EAAE,SAAS,KAAK,CAAC;AACzD,QAAM,WAAW,cAAc;AAE/B,QAAM,WAAW,QAAQ,EAAE,WAAW;AACtC,QAAM,aAAa;AAAA,IACjB,CAAC,QAAgB,WAAW,GAAG,KAAK,mBAAmB,GAAG,KAAK,mBAAmB,OAAO;AAAA,IACzF,CAAC,QAAQ;AAAA,EACX;AACA,QAAM,EAAE,WAAW,IAAI,qBAAqB;AAC5C,QAAM,EAAE,MAAM,gBAAgB,CAAC,EAAE,IAAI,QAAQ;AAC7C,QAAM,OAAO,QAAQ,MAAM,oBAAoB,aAAa,GAAG,CAAC,aAAa,CAAC;AAI9E,QAAM,mBAAmB;AAAA,IACvB,CAAC,OAAsB,QAAwB,aAAiC;AAC9E,UAAI,SAAS,OAAO,eAAe,MAAM,SAAS,OAAQ,QAAO;AACjE,YAAM,UAAU,qBAAqB,OAAO,OAAO,eAAe,EAAE,CAAC;AACrE,aAAO,UAAU,mBAAc,OAAO,WAAM;AAAA,IAC9C;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,gBAAgB,SAAY;AAAA,MACxC,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,aAAa,CAAC,EAAE,UAAU,aAAa,MACrC,SAAS,OAAO,eAAe,iBAAiB,OAC5C,YAAY,YAAY,YAAY,iBAAiB,IAAI,MAAM,EAAE,KACjE;AAAA,MAEN,cAAc,CAAC,EAAE,UAAU,OAAO,MAAM;AACtC,YAAI,SAAS,OAAO,YAAa,QAAO;AAGxC,cAAM,OACJ,OAAO,OAAO,QAAQ,EAAE,EAAE,KAAK,KAAK,qBAAqB,OAAO,OAAO,eAAe,EAAE,CAAC;AAC3F,cAAM,WAAW,OACb,KAAK,KAAK,CAAC,MAAM,EAAE,KAAK,YAAY,MAAM,KAAK,YAAY,CAAC,IAC5D;AACJ,YAAI,CAAC,SAAU,QAAO;AACtB,eACE;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,eAAY;AAAA,YAEZ;AAAA,kCAAC,iBAAc,WAAU,yCAAwC;AAAA,cACjE,qBAAC,UAAK;AAAA;AAAA,gBACiB,oBAAC,UAAK,WAAU,eAAe,mBAAS,MAAK;AAAA,gBAAO;AAAA,iBAG3E;AAAA;AAAA;AAAA,QACF;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
* Start band), then what is recent (the last files and threads, each a way back in), then its
|
|
4
4
|
* facts (upcoming dated ones, the newest others) beside the agenda.
|
|
5
5
|
*
|
|
6
|
-
* Every section
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* Every section is a live page block (`ConnectedStartBlock`, `ConnectedListBlock`,
|
|
7
|
+
* `ConnectedAgendaBlock`) of the one dashboard definition (`WORKSPACE_DASHBOARD_LAYOUT`), the
|
|
8
|
+
* same the "Dashboard" page template copies; here they sit in fixed bands, not editable. Every
|
|
9
|
+
* section always shows, each with its own empty state, so a new workspace has the same layout as a
|
|
10
|
+
* busy one. A row opens its thing (`BlocksEnvironment.openDocument` / `openConversation`); a
|
|
11
|
+
* section's header, a fact and "New fact" go to the host's pages (`openFiles`, `openThreads`,
|
|
12
|
+
* `openFacts`); asking starts a new conversation (`openNewConversation`); adding goes to the host's
|
|
13
|
+
* upload (`openUpload`). "New" opens the new-thread dialog, and the Add menu's URL and email-in
|
|
14
|
+
* dialogs open in place.
|
|
12
15
|
*/
|
|
13
|
-
import {
|
|
16
|
+
import type { ReactNode } from 'react';
|
|
14
17
|
export interface ConnectedWorkspaceDashboardProps {
|
|
15
18
|
/** The Start band. Default: the dashboard workflows, "Create a file" and Add; `null` hides it. */
|
|
16
19
|
start?: ReactNode;
|