@arbidocs/blocks 0.5.152 → 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 +1319 -2361
- 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/TableViewBlock.d.ts +5 -4
- package/dist/connection/pages/TableViewBlock.js +19 -19
- package/dist/connection/pages/TableViewBlock.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/storage/ConnectedStorageProjectCard.js +1 -1
- package/dist/connection/storage/ConnectedStorageProjectCard.js.map +2 -2
- package/dist/connection/storage/ConnectedWorkspaceTrash.d.ts +3 -0
- package/dist/connection/storage/ConnectedWorkspaceTrash.js +41 -17
- package/dist/connection/storage/ConnectedWorkspaceTrash.js.map +2 -2
- 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 +635 -157
- 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
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
* Handles call `start` with their own kind; their moves bubble to the element's handlers while the
|
|
13
13
|
* pointer is captured. A press that travels less than `threshold` pixels is a click: `end` gets
|
|
14
14
|
* `null` for the result.
|
|
15
|
+
*
|
|
16
|
+
* `start(event, kind, { lazy: true })` lets a whole surface be dragged without taking its clicks:
|
|
17
|
+
* the press is left alone (no capture, no default prevented, so buttons, links and text inside
|
|
18
|
+
* still get it) until it travels past the threshold; only then is the pointer captured and the
|
|
19
|
+
* drag on. `cancel()` ends a gesture without a result (Escape).
|
|
15
20
|
*/
|
|
16
21
|
import { type PointerEvent as ReactPointerEvent, type RefObject } from 'react';
|
|
17
22
|
export interface PointerTravel {
|
|
@@ -39,13 +44,20 @@ export interface PointerGestureOptions<K extends string, S, N> {
|
|
|
39
44
|
}
|
|
40
45
|
export declare function usePointerGesture<K extends string, S, N>(options: PointerGestureOptions<K, S, N>): {
|
|
41
46
|
/** Begin a gesture of this kind (from the element's or a handle's `onPointerDown`). */
|
|
42
|
-
start: (event: ReactPointerEvent, kind: K
|
|
47
|
+
start: (event: ReactPointerEvent, kind: K, how?: {
|
|
48
|
+
lazy?: boolean;
|
|
49
|
+
}) => void;
|
|
43
50
|
/** A gesture is under way. */
|
|
44
51
|
active: () => boolean;
|
|
52
|
+
/** A drag is on (past the threshold). */
|
|
53
|
+
dragging: () => boolean;
|
|
54
|
+
/** End the gesture with no result (`end` gets `null`), as if it never moved. */
|
|
55
|
+
cancel: () => void;
|
|
45
56
|
/** Spread on the element: the moves and the end of every gesture it or its handles start. */
|
|
46
57
|
handlers: {
|
|
47
58
|
onPointerMove: (event: ReactPointerEvent) => void;
|
|
48
59
|
onPointerUp: () => void;
|
|
49
60
|
onPointerCancel: () => void;
|
|
61
|
+
onPointerLeave: () => void;
|
|
50
62
|
};
|
|
51
63
|
};
|
|
@@ -11,17 +11,23 @@ function usePointerGesture(options) {
|
|
|
11
11
|
g.request = null;
|
|
12
12
|
if (g.next !== null) latest.current.apply(g.state, g.next, g.kind);
|
|
13
13
|
};
|
|
14
|
-
const start = (event, kind) => {
|
|
15
|
-
if (event.button !== 0) return;
|
|
14
|
+
const start = (event, kind, how) => {
|
|
15
|
+
if (event.button !== 0 || live.current) return;
|
|
16
16
|
const state = latest.current.begin(kind, event);
|
|
17
17
|
if (state === null) return;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const lazy = how?.lazy ?? false;
|
|
19
|
+
if (!lazy) {
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
event.stopPropagation();
|
|
22
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
23
|
+
}
|
|
21
24
|
live.current = {
|
|
22
25
|
kind,
|
|
23
26
|
state,
|
|
24
27
|
pointer: { x: event.clientX, y: event.clientY },
|
|
28
|
+
pointerId: event.pointerId,
|
|
29
|
+
lazy,
|
|
30
|
+
waiting: lazy,
|
|
25
31
|
next: null,
|
|
26
32
|
request: null
|
|
27
33
|
};
|
|
@@ -34,25 +40,44 @@ function usePointerGesture(options) {
|
|
|
34
40
|
const threshold = latest.current.threshold ?? 0;
|
|
35
41
|
if (g.next === null) {
|
|
36
42
|
if (threshold > 0 && Math.hypot(dx, dy) < threshold) return;
|
|
43
|
+
if (g.waiting) {
|
|
44
|
+
g.waiting = false;
|
|
45
|
+
latest.current.element.current?.setPointerCapture(g.pointerId);
|
|
46
|
+
view().getSelection()?.removeAllRanges();
|
|
47
|
+
}
|
|
37
48
|
latest.current.dragStart?.(g.state, g.kind);
|
|
38
49
|
}
|
|
39
50
|
g.next = latest.current.update(g.state, g.kind, { dx, dy, event });
|
|
40
51
|
g.request ??= view().requestAnimationFrame(frame);
|
|
41
52
|
};
|
|
42
|
-
const
|
|
53
|
+
const finish = (cancelled) => {
|
|
43
54
|
const g = live.current;
|
|
44
55
|
live.current = null;
|
|
45
56
|
if (!g) return;
|
|
46
57
|
if (g.request !== null) view().cancelAnimationFrame(g.request);
|
|
47
|
-
latest.current.end(g.state, g.next, g.kind);
|
|
58
|
+
latest.current.end(g.state, cancelled ? null : g.next, g.kind);
|
|
59
|
+
};
|
|
60
|
+
const onPointerEnd = () => finish(false);
|
|
61
|
+
const onPointerCancel = () => finish(live.current?.lazy ?? false);
|
|
62
|
+
const onPointerLeave = () => {
|
|
63
|
+
if (live.current?.waiting) finish(true);
|
|
48
64
|
};
|
|
49
65
|
return {
|
|
50
66
|
/** Begin a gesture of this kind (from the element's or a handle's `onPointerDown`). */
|
|
51
67
|
start,
|
|
52
68
|
/** A gesture is under way. */
|
|
53
69
|
active: () => live.current !== null,
|
|
70
|
+
/** A drag is on (past the threshold). */
|
|
71
|
+
dragging: () => live.current !== null && live.current.next !== null,
|
|
72
|
+
/** End the gesture with no result (`end` gets `null`), as if it never moved. */
|
|
73
|
+
cancel: () => finish(true),
|
|
54
74
|
/** Spread on the element: the moves and the end of every gesture it or its handles start. */
|
|
55
|
-
handlers: {
|
|
75
|
+
handlers: {
|
|
76
|
+
onPointerMove,
|
|
77
|
+
onPointerUp: onPointerEnd,
|
|
78
|
+
onPointerCancel,
|
|
79
|
+
onPointerLeave
|
|
80
|
+
}
|
|
56
81
|
};
|
|
57
82
|
}
|
|
58
83
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/gestures/usePointerGesture.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * `usePointerGesture`: one element's drag gestures (move, resize from a handle\u2026) by pointer events,\n * so mouse, pen and touch all work. Built for smooth dragging, as the presentation stage's clips\n * and boxes are: the pointer's travel becomes a result on every move, but the element is only\n * touched once per animation frame (`apply`, typically a GPU transform set directly, with no React\n * render), and the result reaches the caller once, when the gesture ends (`end`).\n *\n * const drag = usePointerGesture({ element, begin, update, apply, end })\n * <div ref={element} {...drag.handlers} onPointerDown={(e) => drag.start(e, 'move')}>\n * <GestureHandle onPointerDown={(e) => drag.start(e, 'se')} \u2026 />\n *\n * Handles call `start` with their own kind; their moves bubble to the element's handlers while the\n * pointer is captured. A press that travels less than `threshold` pixels is a click: `end` gets\n * `null` for the result.\n */\nimport { useRef, type PointerEvent as ReactPointerEvent, type RefObject } from 'react'\n\nexport interface PointerTravel {\n /** Pixels from where the gesture began. */\n dx: number\n dy: number\n /** The latest pointer event (its modifier keys: Alt to place freely\u2026). */\n event: ReactPointerEvent\n}\n\nexport interface PointerGestureOptions<K extends string, S, N> {\n /** The element moved (its window runs the animation frames). */\n element: RefObject<HTMLElement | null>\n /** As a press begins: the gesture's own state, or `null` not to start one. */\n begin: (kind: K, event: ReactPointerEvent) => S | null\n /** Each move past the threshold: the result so far. */\n update: (state: S, kind: K, travel: PointerTravel) => N\n /** Once per animation frame, with the latest result. */\n apply: (state: S, next: N, kind: K) => void\n /** The first move past the threshold: the drag is on. */\n dragStart?: (state: S, kind: K) => void\n /** The gesture is over: its last result, or `null` for a click (it never moved). */\n end: (state: S, next: N | null, kind: K) => void\n /** Pixels a press travels before it is a drag. Default 0: any move. */\n threshold?: number\n}\n\ninterface Live<K, S, N> {\n kind: K\n state: S\n pointer: { x: number; y: number }\n next: N | null\n request: number | null\n}\n\nexport function usePointerGesture<K extends string, S, N>(options: PointerGestureOptions<K, S, N>) {\n // The latest callbacks: a memoised element's handlers stay valid as its props change.\n const latest = useRef(options)\n latest.current = options\n const live = useRef<Live<K, S, N> | null>(null)\n const view = () => latest.current.element.current?.ownerDocument.defaultView ?? window\n\n const frame = () => {\n const g = live.current\n if (!g) return\n g.request = null\n if (g.next !== null) latest.current.apply(g.state, g.next, g.kind)\n }\n\n const start = (event: ReactPointerEvent, kind: K) => {\n if (event.button !== 0) return\n const state = latest.current.begin(kind, event)\n if (state === null) return\n event.preventDefault()\n
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * `usePointerGesture`: one element's drag gestures (move, resize from a handle\u2026) by pointer events,\n * so mouse, pen and touch all work. Built for smooth dragging, as the presentation stage's clips\n * and boxes are: the pointer's travel becomes a result on every move, but the element is only\n * touched once per animation frame (`apply`, typically a GPU transform set directly, with no React\n * render), and the result reaches the caller once, when the gesture ends (`end`).\n *\n * const drag = usePointerGesture({ element, begin, update, apply, end })\n * <div ref={element} {...drag.handlers} onPointerDown={(e) => drag.start(e, 'move')}>\n * <GestureHandle onPointerDown={(e) => drag.start(e, 'se')} \u2026 />\n *\n * Handles call `start` with their own kind; their moves bubble to the element's handlers while the\n * pointer is captured. A press that travels less than `threshold` pixels is a click: `end` gets\n * `null` for the result.\n *\n * `start(event, kind, { lazy: true })` lets a whole surface be dragged without taking its clicks:\n * the press is left alone (no capture, no default prevented, so buttons, links and text inside\n * still get it) until it travels past the threshold; only then is the pointer captured and the\n * drag on. `cancel()` ends a gesture without a result (Escape).\n */\nimport { useRef, type PointerEvent as ReactPointerEvent, type RefObject } from 'react'\n\nexport interface PointerTravel {\n /** Pixels from where the gesture began. */\n dx: number\n dy: number\n /** The latest pointer event (its modifier keys: Alt to place freely\u2026). */\n event: ReactPointerEvent\n}\n\nexport interface PointerGestureOptions<K extends string, S, N> {\n /** The element moved (its window runs the animation frames). */\n element: RefObject<HTMLElement | null>\n /** As a press begins: the gesture's own state, or `null` not to start one. */\n begin: (kind: K, event: ReactPointerEvent) => S | null\n /** Each move past the threshold: the result so far. */\n update: (state: S, kind: K, travel: PointerTravel) => N\n /** Once per animation frame, with the latest result. */\n apply: (state: S, next: N, kind: K) => void\n /** The first move past the threshold: the drag is on. */\n dragStart?: (state: S, kind: K) => void\n /** The gesture is over: its last result, or `null` for a click (it never moved). */\n end: (state: S, next: N | null, kind: K) => void\n /** Pixels a press travels before it is a drag. Default 0: any move. */\n threshold?: number\n}\n\ninterface Live<K, S, N> {\n kind: K\n state: S\n pointer: { x: number; y: number }\n pointerId: number\n /** Started lazily: a cancelled pointer (the browser took it to scroll) drops the drag. */\n lazy: boolean\n /** The pointer is not captured yet (a lazy start, still under the threshold). */\n waiting: boolean\n next: N | null\n request: number | null\n}\n\nexport function usePointerGesture<K extends string, S, N>(options: PointerGestureOptions<K, S, N>) {\n // The latest callbacks: a memoised element's handlers stay valid as its props change.\n const latest = useRef(options)\n latest.current = options\n const live = useRef<Live<K, S, N> | null>(null)\n const view = () => latest.current.element.current?.ownerDocument.defaultView ?? window\n\n const frame = () => {\n const g = live.current\n if (!g) return\n g.request = null\n if (g.next !== null) latest.current.apply(g.state, g.next, g.kind)\n }\n\n const start = (event: ReactPointerEvent, kind: K, how?: { lazy?: boolean }) => {\n if (event.button !== 0 || live.current) return\n const state = latest.current.begin(kind, event)\n if (state === null) return\n const lazy = how?.lazy ?? false\n if (!lazy) {\n event.preventDefault()\n event.stopPropagation()\n event.currentTarget.setPointerCapture(event.pointerId)\n }\n live.current = {\n kind,\n state,\n pointer: { x: event.clientX, y: event.clientY },\n pointerId: event.pointerId,\n lazy,\n waiting: lazy,\n next: null,\n request: null,\n }\n }\n\n const onPointerMove = (event: ReactPointerEvent) => {\n const g = live.current\n if (!g) return\n const dx = event.clientX - g.pointer.x\n const dy = event.clientY - g.pointer.y\n const threshold = latest.current.threshold ?? 0\n if (g.next === null) {\n if (threshold > 0 && Math.hypot(dx, dy) < threshold) return\n if (g.waiting) {\n // Past the threshold: now it is a drag, and the pointer is the element's.\n g.waiting = false\n latest.current.element.current?.setPointerCapture(g.pointerId)\n view().getSelection()?.removeAllRanges()\n }\n latest.current.dragStart?.(g.state, g.kind)\n }\n g.next = latest.current.update(g.state, g.kind, { dx, dy, event })\n g.request ??= view().requestAnimationFrame(frame)\n }\n\n const finish = (cancelled: boolean) => {\n const g = live.current\n live.current = null\n if (!g) return\n if (g.request !== null) view().cancelAnimationFrame(g.request)\n latest.current.end(g.state, cancelled ? null : g.next, g.kind)\n }\n const onPointerEnd = () => finish(false)\n const onPointerCancel = () => finish(live.current?.lazy ?? false)\n // A lazy press that leaves the element before it is a drag was not one.\n const onPointerLeave = () => {\n if (live.current?.waiting) finish(true)\n }\n\n return {\n /** Begin a gesture of this kind (from the element's or a handle's `onPointerDown`). */\n start,\n /** A gesture is under way. */\n active: () => live.current !== null,\n /** A drag is on (past the threshold). */\n dragging: () => live.current !== null && live.current.next !== null,\n /** End the gesture with no result (`end` gets `null`), as if it never moved. */\n cancel: () => finish(true),\n /** Spread on the element: the moves and the end of every gesture it or its handles start. */\n handlers: {\n onPointerMove,\n onPointerUp: onPointerEnd,\n onPointerCancel,\n onPointerLeave,\n },\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAoBA,SAAS,cAAsE;AAwCxE,SAAS,kBAA0C,SAAyC;AAEjG,QAAM,SAAS,OAAO,OAAO;AAC7B,SAAO,UAAU;AACjB,QAAM,OAAO,OAA6B,IAAI;AAC9C,QAAM,OAAO,MAAM,OAAO,QAAQ,QAAQ,SAAS,cAAc,eAAe;AAEhF,QAAM,QAAQ,MAAM;AAClB,UAAM,IAAI,KAAK;AACf,QAAI,CAAC,EAAG;AACR,MAAE,UAAU;AACZ,QAAI,EAAE,SAAS,KAAM,QAAO,QAAQ,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI;AAAA,EACnE;AAEA,QAAM,QAAQ,CAAC,OAA0B,MAAS,QAA6B;AAC7E,QAAI,MAAM,WAAW,KAAK,KAAK,QAAS;AACxC,UAAM,QAAQ,OAAO,QAAQ,MAAM,MAAM,KAAK;AAC9C,QAAI,UAAU,KAAM;AACpB,UAAM,OAAO,KAAK,QAAQ;AAC1B,QAAI,CAAC,MAAM;AACT,YAAM,eAAe;AACrB,YAAM,gBAAgB;AACtB,YAAM,cAAc,kBAAkB,MAAM,SAAS;AAAA,IACvD;AACA,SAAK,UAAU;AAAA,MACb;AAAA,MACA;AAAA,MACA,SAAS,EAAE,GAAG,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC9C,WAAW,MAAM;AAAA,MACjB;AAAA,MACA,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AAEA,QAAM,gBAAgB,CAAC,UAA6B;AAClD,UAAM,IAAI,KAAK;AACf,QAAI,CAAC,EAAG;AACR,UAAM,KAAK,MAAM,UAAU,EAAE,QAAQ;AACrC,UAAM,KAAK,MAAM,UAAU,EAAE,QAAQ;AACrC,UAAM,YAAY,OAAO,QAAQ,aAAa;AAC9C,QAAI,EAAE,SAAS,MAAM;AACnB,UAAI,YAAY,KAAK,KAAK,MAAM,IAAI,EAAE,IAAI,UAAW;AACrD,UAAI,EAAE,SAAS;AAEb,UAAE,UAAU;AACZ,eAAO,QAAQ,QAAQ,SAAS,kBAAkB,EAAE,SAAS;AAC7D,aAAK,EAAE,aAAa,GAAG,gBAAgB;AAAA,MACzC;AACA,aAAO,QAAQ,YAAY,EAAE,OAAO,EAAE,IAAI;AAAA,IAC5C;AACA,MAAE,OAAO,OAAO,QAAQ,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,IAAI,MAAM,CAAC;AACjE,MAAE,YAAY,KAAK,EAAE,sBAAsB,KAAK;AAAA,EAClD;AAEA,QAAM,SAAS,CAAC,cAAuB;AACrC,UAAM,IAAI,KAAK;AACf,SAAK,UAAU;AACf,QAAI,CAAC,EAAG;AACR,QAAI,EAAE,YAAY,KAAM,MAAK,EAAE,qBAAqB,EAAE,OAAO;AAC7D,WAAO,QAAQ,IAAI,EAAE,OAAO,YAAY,OAAO,EAAE,MAAM,EAAE,IAAI;AAAA,EAC/D;AACA,QAAM,eAAe,MAAM,OAAO,KAAK;AACvC,QAAM,kBAAkB,MAAM,OAAO,KAAK,SAAS,QAAQ,KAAK;AAEhE,QAAM,iBAAiB,MAAM;AAC3B,QAAI,KAAK,SAAS,QAAS,QAAO,IAAI;AAAA,EACxC;AAEA,SAAO;AAAA;AAAA,IAEL;AAAA;AAAA,IAEA,QAAQ,MAAM,KAAK,YAAY;AAAA;AAAA,IAE/B,UAAU,MAAM,KAAK,YAAY,QAAQ,KAAK,QAAQ,SAAS;AAAA;AAAA,IAE/D,QAAQ,MAAM,OAAO,IAAI;AAAA;AAAA,IAEzB,UAAU;AAAA,MACR;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/connect/docx.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkTSAZWUPZ_cjs = require('../chunk-TSAZWUPZ.cjs');
|
|
5
|
+
var chunkBTQ7IAOH_cjs = require('../chunk-BTQ7IAOH.cjs');
|
|
6
6
|
require('../chunk-WN6BLSAZ.cjs');
|
|
7
7
|
require('../chunk-BLJET4KG.cjs');
|
|
8
8
|
require('../chunk-BD7P4KYQ.cjs');
|
|
9
9
|
require('../chunk-GA5ZO4YA.cjs');
|
|
10
10
|
require('../chunk-VG5XNE4H.cjs');
|
|
11
11
|
require('../chunk-DDWLMYRO.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkBZVK7JW5_cjs = require('../chunk-BZVK7JW5.cjs');
|
|
13
13
|
require('../chunk-4ONPEVTP.cjs');
|
|
14
14
|
require('../chunk-V3KLUWQQ.cjs');
|
|
15
15
|
require('../chunk-5GBM7BQB.cjs');
|
|
16
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-UD3LPATQ.cjs');
|
|
17
17
|
require('../chunk-7NJKDJVO.cjs');
|
|
18
18
|
require('../chunk-UKOYN2WD.cjs');
|
|
19
19
|
require('../chunk-RC25WMVB.cjs');
|
|
@@ -21,11 +21,11 @@ require('../chunk-LH3PDPJP.cjs');
|
|
|
21
21
|
require('../chunk-KWWGUQJV.cjs');
|
|
22
22
|
require('../chunk-3YEXZX4H.cjs');
|
|
23
23
|
require('../chunk-4PA6VCCR.cjs');
|
|
24
|
-
require('../chunk-VSDD5TH5.cjs');
|
|
25
|
-
require('../chunk-AHDJXIUB.cjs');
|
|
26
24
|
require('../chunk-RL2HI6NP.cjs');
|
|
27
25
|
require('../chunk-6UZC4XVV.cjs');
|
|
28
|
-
require('../chunk-
|
|
26
|
+
require('../chunk-G3MRW4WB.cjs');
|
|
27
|
+
require('../chunk-AHDJXIUB.cjs');
|
|
28
|
+
require('../chunk-SLCH5JRI.cjs');
|
|
29
29
|
require('../chunk-DKY67DA6.cjs');
|
|
30
30
|
require('../chunk-YA6GXWC2.cjs');
|
|
31
31
|
require('../chunk-ZVEW3JBT.cjs');
|
|
@@ -49,25 +49,25 @@ require('../chunk-PLIF5CUV.cjs');
|
|
|
49
49
|
var react = require('react');
|
|
50
50
|
|
|
51
51
|
function useConnectedMailWordEditor() {
|
|
52
|
-
const adapter =
|
|
52
|
+
const adapter = chunkBZVK7JW5_cjs.useConnectedNativeDocxAdapter();
|
|
53
53
|
return react.useMemo(() => ({ adapter }), [adapter]);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
Object.defineProperty(exports, "ConnectedStreamedWordArtifact", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkTSAZWUPZ_cjs.ConnectedStreamedWordArtifact; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "ConnectedNativeDocxComparison", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkBTQ7IAOH_cjs.ConnectedNativeDocxComparison; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "ConnectedNativeDocxEditor", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkBZVK7JW5_cjs.ConnectedNativeDocxEditor; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "useConnectedNativeDocxAdapter", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkBZVK7JW5_cjs.useConnectedNativeDocxAdapter; }
|
|
71
71
|
});
|
|
72
72
|
exports.useConnectedMailWordEditor = useConnectedMailWordEditor;
|
|
73
73
|
//# sourceMappingURL=docx.cjs.map
|