@arbidocs/blocks 0.5.124 → 0.5.126
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/{ClippingMediaViewer-ZFEX5A3U.cjs → ClippingMediaViewer-47BAXNLO.cjs} +10 -11
- package/dist/ClippingMediaViewer-47BAXNLO.cjs.map +1 -0
- package/dist/{ClippingPdfViewer-3LRTEPHV.cjs → ClippingPdfViewer-D5BYHEAH.cjs} +16 -14
- package/dist/ClippingPdfViewer-D5BYHEAH.cjs.map +1 -0
- package/dist/{ConnectedCallDock-XJOYVVAH.cjs → ConnectedCallDock-733O5M36.cjs} +5 -5
- package/dist/{ConnectedCallDock-XJOYVVAH.cjs.map → ConnectedCallDock-733O5M36.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-CUDYAPQK.cjs → ConnectedCallRoom-TAUGSRGV.cjs} +5 -5
- package/dist/{ConnectedCallRoom-CUDYAPQK.cjs.map → ConnectedCallRoom-TAUGSRGV.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-QKHCYD6W.cjs → ConnectedNativeDocxComparison-HDE522YC.cjs} +9 -9
- package/dist/{ConnectedNativeDocxComparison-QKHCYD6W.cjs.map → ConnectedNativeDocxComparison-HDE522YC.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-OV2KBOLK.cjs → ConnectedPresentation-SI3L77J4.cjs} +33 -34
- package/dist/ConnectedPresentation-SI3L77J4.cjs.map +1 -0
- package/dist/{ConnectedSlidesTab-LUAGZ6FD.cjs → ConnectedSlidesTab-JSPU6EY5.cjs} +37 -43
- package/dist/ConnectedSlidesTab-JSPU6EY5.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-AG62232A.cjs → ConnectedStreamedWordArtifact-4FHPOAFZ.cjs} +9 -9
- package/dist/{ConnectedStreamedWordArtifact-AG62232A.cjs.map → ConnectedStreamedWordArtifact-4FHPOAFZ.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-M53XFLI2.cjs → DocumentReviewCard-BDNXP3D4.cjs} +4 -4
- package/dist/{DocumentReviewCard-M53XFLI2.cjs.map → DocumentReviewCard-BDNXP3D4.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-JWKNJLWG.cjs → FilesViewerDialog-WQRNSKWM.cjs} +10 -11
- package/dist/FilesViewerDialog-WQRNSKWM.cjs.map +1 -0
- package/dist/{NativeDocxEditor-2LQY2CTV.cjs → NativeDocxEditor-SUDULUN3.cjs} +6 -6
- package/dist/{NativeDocxEditor-2LQY2CTV.cjs.map → NativeDocxEditor-SUDULUN3.cjs.map} +1 -1
- package/dist/{SpotlightStrip-ED22UYTM.cjs → SpotlightStrip-QQ2WUI32.cjs} +28 -29
- package/dist/SpotlightStrip-QQ2WUI32.cjs.map +1 -0
- package/dist/WorkspaceTableView-3XYAV4BV.cjs +1 -1
- package/dist/agents/index.cjs +1 -1
- package/dist/ai-IEIR7SC2.cjs +1 -1
- package/dist/calls/index.cjs +2 -2
- package/dist/{chunk-ZZZITHGK.cjs → chunk-26SFI2BH.cjs} +16 -3
- package/dist/chunk-26SFI2BH.cjs.map +1 -0
- package/dist/{chunk-NG2EE7HR.cjs → chunk-463QM764.cjs} +3 -3
- package/dist/{chunk-NG2EE7HR.cjs.map → chunk-463QM764.cjs.map} +1 -1
- package/dist/{chunk-XGM4VVNV.cjs → chunk-4KEQ62SL.cjs} +6 -6
- package/dist/{chunk-XGM4VVNV.cjs.map → chunk-4KEQ62SL.cjs.map} +1 -1
- package/dist/{chunk-YGBHY67W.cjs → chunk-6B4CCDDB.cjs} +5 -5
- package/dist/{chunk-YGBHY67W.cjs.map → chunk-6B4CCDDB.cjs.map} +1 -1
- package/dist/{chunk-JY7UUZQG.cjs → chunk-7Q46YAX4.cjs} +74 -71
- package/dist/chunk-7Q46YAX4.cjs.map +1 -0
- package/dist/{chunk-3ZZZO4F7.cjs → chunk-BY3QA3S5.cjs} +9 -9
- package/dist/{chunk-3ZZZO4F7.cjs.map → chunk-BY3QA3S5.cjs.map} +1 -1
- package/dist/{chunk-VKH3BEZE.cjs → chunk-CMPHJRVV.cjs} +3 -3
- package/dist/{chunk-VKH3BEZE.cjs.map → chunk-CMPHJRVV.cjs.map} +1 -1
- package/dist/{chunk-BX6G2ZCI.cjs → chunk-FB3JXSQT.cjs} +71 -43
- package/dist/chunk-FB3JXSQT.cjs.map +1 -0
- package/dist/{chunk-EMRY62HS.cjs → chunk-FGOJBOZX.cjs} +4 -4
- package/dist/{chunk-EMRY62HS.cjs.map → chunk-FGOJBOZX.cjs.map} +1 -1
- package/dist/{chunk-V6MW7B4B.cjs → chunk-I4X72WUT.cjs} +6 -6
- package/dist/{chunk-V6MW7B4B.cjs.map → chunk-I4X72WUT.cjs.map} +1 -1
- package/dist/{chunk-ORNLCBNE.cjs → chunk-JVEDKKNO.cjs} +43 -4
- package/dist/chunk-JVEDKKNO.cjs.map +1 -0
- package/dist/{chunk-7557LDAN.cjs → chunk-LOB2ATS5.cjs} +23 -10
- package/dist/chunk-LOB2ATS5.cjs.map +1 -0
- package/dist/{chunk-MXBXZXXQ.cjs → chunk-LXM5QXII.cjs} +3 -3
- package/dist/{chunk-MXBXZXXQ.cjs.map → chunk-LXM5QXII.cjs.map} +1 -1
- package/dist/chunk-OALQGO5C.cjs +18 -0
- package/dist/{chunk-SDRYSLOX.cjs.map → chunk-OALQGO5C.cjs.map} +1 -1
- package/dist/{chunk-2CSLFAGF.cjs → chunk-Q6N5D3R5.cjs} +34 -8
- package/dist/chunk-Q6N5D3R5.cjs.map +1 -0
- package/dist/{chunk-MVXHTAJ4.cjs → chunk-QWVUBTW3.cjs} +9 -9
- package/dist/{chunk-MVXHTAJ4.cjs.map → chunk-QWVUBTW3.cjs.map} +1 -1
- package/dist/{chunk-ADPRIBSH.cjs → chunk-X7ALF4MP.cjs} +7 -7
- package/dist/{chunk-ADPRIBSH.cjs.map → chunk-X7ALF4MP.cjs.map} +1 -1
- package/dist/{chunk-COD5ENHK.cjs → chunk-XNB27POJ.cjs} +4 -4
- package/dist/{chunk-COD5ENHK.cjs.map → chunk-XNB27POJ.cjs.map} +1 -1
- package/dist/{chunk-H236SNEV.cjs → chunk-ZCU72Q76.cjs} +191 -165
- package/dist/chunk-ZCU72Q76.cjs.map +1 -0
- package/dist/connect/docx.cjs +13 -13
- package/dist/connect/index.cjs +198 -163
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +8 -9
- package/dist/connection/ai.d.ts +1 -0
- package/dist/connection/docx/ConnectedNativeDocxEditor.js +4 -5
- package/dist/connection/docx/ConnectedNativeDocxEditor.js.map +2 -2
- package/dist/connection/docx/save-native-version.d.ts +3 -0
- package/dist/connection/docx/save-native-version.js +19 -0
- package/dist/connection/docx/save-native-version.js.map +7 -0
- package/dist/connection/presentation/ClippingPdfViewer.js +8 -5
- package/dist/connection/presentation/ClippingPdfViewer.js.map +2 -2
- package/dist/connection/presentation/ConnectedSlidesTab.js +8 -13
- package/dist/connection/presentation/ConnectedSlidesTab.js.map +2 -2
- package/dist/connection/presentation/usePresentationController.js +24 -15
- package/dist/connection/presentation/usePresentationController.js.map +2 -2
- package/dist/connection/presentation/usePresentationFiles.d.ts +2 -1
- package/dist/connection/presentation/usePresentationFiles.js +15 -6
- package/dist/connection/presentation/usePresentationFiles.js.map +2 -2
- package/dist/connection/search/ConnectedSearchPage.d.ts +0 -11
- package/dist/connection/search/ConnectedSearchPage.js +3 -0
- package/dist/connection/search/ConnectedSearchPage.js.map +2 -2
- package/dist/connection/search/SearchResultRows.js +75 -43
- package/dist/connection/search/SearchResultRows.js.map +2 -2
- package/dist/connection/viewer/CleanViewControl.d.ts +3 -1
- package/dist/connection/viewer/CleanViewControl.js +5 -1
- package/dist/connection/viewer/CleanViewControl.js.map +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js +1 -1
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/VersionDropdown.js +1 -1
- package/dist/connection/viewer/VersionDropdown.js.map +1 -1
- package/dist/connection/viewer/ViewerPdfPane.js +2 -0
- package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
- package/dist/connection/viewer/pdf/usePassageTextFallback.d.ts +12 -0
- package/dist/connection/viewer/pdf/usePassageTextFallback.js +30 -0
- package/dist/connection/viewer/pdf/usePassageTextFallback.js.map +7 -0
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.js +2 -11
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.js.map +2 -2
- package/dist/connection/viewer/useCleanView.d.ts +1 -1
- package/dist/connection/viewer/useCleanView.js +2 -2
- package/dist/connection/viewer/useCleanView.js.map +2 -2
- package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
- package/dist/connection/viewer/useViewerTabs.js +13 -1
- package/dist/connection/viewer/useViewerTabs.js.map +2 -2
- package/dist/docx/DocxCommandMenu.js +2 -1
- package/dist/docx/DocxCommandMenu.js.map +2 -2
- package/dist/docx/NativeDocxEditor.d.ts +2 -1
- package/dist/docx/NativeDocxEditor.js +30 -5
- package/dist/docx/NativeDocxEditor.js.map +2 -2
- package/dist/docx/index.cjs +38 -38
- package/dist/embed/index.cjs +2 -2
- package/dist/facts/index.cjs +43 -43
- package/dist/index.cjs +73 -73
- package/dist/presentation/ClipCaptureOverlay.js +14 -1
- package/dist/presentation/ClipCaptureOverlay.js.map +2 -2
- package/dist/presentation/ClipImage.js +7 -4
- package/dist/presentation/ClipImage.js.map +2 -2
- package/dist/presentation/ClipTray.js +11 -7
- package/dist/presentation/ClipTray.js.map +2 -2
- package/dist/presentation/SlidesEditor.js +6 -2
- package/dist/presentation/SlidesEditor.js.map +2 -2
- package/dist/presentation/store.d.ts +2 -0
- package/dist/presentation/store.js +15 -0
- package/dist/presentation/store.js.map +3 -3
- package/dist/settings/index.cjs +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +12 -12
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ClippingMediaViewer-ZFEX5A3U.cjs.map +0 -1
- package/dist/ClippingPdfViewer-3LRTEPHV.cjs.map +0 -1
- package/dist/ConnectedPresentation-OV2KBOLK.cjs.map +0 -1
- package/dist/ConnectedSlidesTab-LUAGZ6FD.cjs.map +0 -1
- package/dist/FilesViewerDialog-JWKNJLWG.cjs.map +0 -1
- package/dist/SpotlightStrip-ED22UYTM.cjs.map +0 -1
- package/dist/chunk-2CSLFAGF.cjs.map +0 -1
- package/dist/chunk-7557LDAN.cjs.map +0 -1
- package/dist/chunk-BX6G2ZCI.cjs.map +0 -1
- package/dist/chunk-GFUOCGY6.cjs +0 -32
- package/dist/chunk-GFUOCGY6.cjs.map +0 -1
- package/dist/chunk-H236SNEV.cjs.map +0 -1
- package/dist/chunk-JY7UUZQG.cjs.map +0 -1
- package/dist/chunk-ORNLCBNE.cjs.map +0 -1
- package/dist/chunk-SDRYSLOX.cjs +0 -18
- package/dist/chunk-ZZZITHGK.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkQ6N5D3R5_cjs = require('./chunk-Q6N5D3R5.cjs');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
7
7
|
function StreamedWordArtifact({
|
|
@@ -15,7 +15,7 @@ function StreamedWordArtifact({
|
|
|
15
15
|
}) {
|
|
16
16
|
if (!busy && documentId) {
|
|
17
17
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18
|
-
|
|
18
|
+
chunkQ6N5D3R5_cjs.NativeDocxEditor,
|
|
19
19
|
{
|
|
20
20
|
adapter,
|
|
21
21
|
documentId,
|
|
@@ -26,7 +26,7 @@ function StreamedWordArtifact({
|
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
-
|
|
29
|
+
chunkQ6N5D3R5_cjs.NativeDocxEditor,
|
|
30
30
|
{
|
|
31
31
|
adapter,
|
|
32
32
|
documentId: "stream-preview",
|
|
@@ -39,5 +39,5 @@ function StreamedWordArtifact({
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
exports.StreamedWordArtifact = StreamedWordArtifact;
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-6B4CCDDB.cjs.map
|
|
43
|
+
//# sourceMappingURL=chunk-6B4CCDDB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docx/StreamedWordArtifact.tsx"],"names":["jsx","NativeDocxEditor"],"mappings":";;;;;AAmBO,SAAS,oBAAA,CAAqB;AAAA,EACnC,OAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,EAA8B;AAC5B,EAAA,IAAI,CAAC,QAAQ,UAAA,EAAY;AACvB,IAAA,uBACEA,cAAA;AAAA,MAACC,kCAAA;AAAA,MAAA;AAAA,QAEC,OAAA;AAAA,QACA,UAAA;AAAA,QACA,KAAA;AAAA,QACA;AAAA,OAAA;AAAA,MAJK;AAAA,KAKP;AAAA,EAEJ;AACA,EAAA,uBACED,cAAA;AAAA,IAACC,kCAAA;AAAA,IAAA;AAAA,MAEC,OAAA;AAAA,MACA,UAAA,EAAW,gBAAA;AAAA,MACX,KAAA;AAAA,MACA,YAAA,EAAa,EAAA;AAAA,MACb,MAAA,EAAQ,EAAE,OAAA,EAAS,IAAA,EAAM,KAAA;AAAM,KAAA;AAAA,IAL3B;AAAA,GAMN;AAEJ","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/docx/StreamedWordArtifact.tsx"],"names":["jsx","NativeDocxEditor"],"mappings":";;;;;AAmBO,SAAS,oBAAA,CAAqB;AAAA,EACnC,OAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,EAA8B;AAC5B,EAAA,IAAI,CAAC,QAAQ,UAAA,EAAY;AACvB,IAAA,uBACEA,cAAA;AAAA,MAACC,kCAAA;AAAA,MAAA;AAAA,QAEC,OAAA;AAAA,QACA,UAAA;AAAA,QACA,KAAA;AAAA,QACA;AAAA,OAAA;AAAA,MAJK;AAAA,KAKP;AAAA,EAEJ;AACA,EAAA,uBACED,cAAA;AAAA,IAACC,kCAAA;AAAA,IAAA;AAAA,MAEC,OAAA;AAAA,MACA,UAAA,EAAW,gBAAA;AAAA,MACX,KAAA;AAAA,MACA,YAAA,EAAa,EAAA;AAAA,MACb,MAAA,EAAQ,EAAE,OAAA,EAAS,IAAA,EAAM,KAAA;AAAM,KAAA;AAAA,IAL3B;AAAA,GAMN;AAEJ","file":"chunk-6B4CCDDB.cjs","sourcesContent":["import { NativeDocxEditor, type NativeDocxAdapter } from './NativeDocxEditor'\n\nexport interface StreamedWordArtifactProps {\n adapter: NativeDocxAdapter\n /** Streamed Markdown, shown as a read-only preview while the draft is generated. */\n content: string\n title: string\n busy: boolean\n error?: string | null\n /** The DOCX draft the server stored for this generation (`doc-…`), once known. */\n documentId?: string\n onSaved?: (documentId: string) => void\n}\n\n/**\n * One drafting surface for an AI document draft. The server stores every draft as DOCX, so\n * this component never creates a document: it previews the streamed Markdown until generation\n * ends and the stored DOCX is known, then opens that DOCX in the live collaborative editor.\n */\nexport function StreamedWordArtifact({\n adapter,\n content,\n title,\n busy,\n error,\n documentId,\n onSaved,\n}: StreamedWordArtifactProps) {\n if (!busy && documentId) {\n return (\n <NativeDocxEditor\n key={documentId}\n adapter={adapter}\n documentId={documentId}\n title={title}\n onSaved={onSaved}\n />\n )\n }\n return (\n <NativeDocxEditor\n key=\"stream-preview\"\n adapter={adapter}\n documentId=\"stream-preview\"\n title={title}\n draftContent=\"\"\n stream={{ content, busy, error }}\n />\n )\n}\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkWOOOMTTA_cjs = require('./chunk-WOOOMTTA.cjs');
|
|
5
5
|
var chunk5GCCUXMT_cjs = require('./chunk-5GCCUXMT.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunkX7ALF4MP_cjs = require('./chunk-X7ALF4MP.cjs');
|
|
7
|
+
var chunkJVEDKKNO_cjs = require('./chunk-JVEDKKNO.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var viewers = require('@arbidocs/react/viewers');
|
|
10
10
|
var ui = require('@arbidocs/react/ui');
|
|
@@ -53,7 +53,7 @@ function MediaClip({
|
|
|
53
53
|
preload: "auto",
|
|
54
54
|
className: "pointer-events-none block select-none",
|
|
55
55
|
style: cropStyle(clip.rect),
|
|
56
|
-
...live ? { [
|
|
56
|
+
...live ? { [chunkX7ALF4MP_cjs.STAGE_VIDEO_ATTRIBUTE]: "" } : {}
|
|
57
57
|
}
|
|
58
58
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
59
|
"img",
|
|
@@ -88,17 +88,20 @@ function PdfClip({ clip, className }) {
|
|
|
88
88
|
const view = canvas?.ownerDocument.defaultView;
|
|
89
89
|
if (!canvas || !view) return;
|
|
90
90
|
const measure = () => {
|
|
91
|
-
const box = canvas.getBoundingClientRect();
|
|
92
91
|
const dpr = view.devicePixelRatio || 1;
|
|
93
|
-
const width = Math.max(1, Math.round(
|
|
94
|
-
const height = Math.max(1, Math.round(
|
|
92
|
+
const width = Math.max(1, Math.round(canvas.clientWidth * dpr));
|
|
93
|
+
const height = Math.max(1, Math.round(canvas.clientHeight * dpr));
|
|
95
94
|
setSize((s) => s.width === width && s.height === height ? s : { width, height });
|
|
96
95
|
};
|
|
97
96
|
measure();
|
|
98
97
|
const Observer = view.ResizeObserver ?? ResizeObserver;
|
|
99
98
|
const observer = new Observer(measure);
|
|
100
99
|
observer.observe(canvas);
|
|
101
|
-
|
|
100
|
+
view.addEventListener("resize", measure);
|
|
101
|
+
return () => {
|
|
102
|
+
observer.disconnect();
|
|
103
|
+
view.removeEventListener("resize", measure);
|
|
104
|
+
};
|
|
102
105
|
}, []);
|
|
103
106
|
react.useLayoutEffect(() => {
|
|
104
107
|
const canvas = canvasRef.current;
|
|
@@ -226,7 +229,7 @@ function HoldButton({
|
|
|
226
229
|
);
|
|
227
230
|
}
|
|
228
231
|
function ClipViewControls({ clip }) {
|
|
229
|
-
const { panClip, setClipZoom } =
|
|
232
|
+
const { panClip, setClipZoom } = chunkJVEDKKNO_cjs.usePresentation.getState();
|
|
230
233
|
const { rect } = clip;
|
|
231
234
|
const zoomBase = clip.zoomBase ?? rect.w;
|
|
232
235
|
const minZoom = Math.min(100, Math.floor(zoomBase / Math.min(1, rect.w / rect.h) * 100));
|
|
@@ -331,8 +334,8 @@ function ClipActionBar({
|
|
|
331
334
|
onEditImage,
|
|
332
335
|
onCropImage
|
|
333
336
|
}) {
|
|
334
|
-
const actions =
|
|
335
|
-
const clip =
|
|
337
|
+
const actions = chunkJVEDKKNO_cjs.usePresentation.getState();
|
|
338
|
+
const clip = chunkJVEDKKNO_cjs.usePresentation((state) => state.clips.find((entry) => entry.id === clipId));
|
|
336
339
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
337
340
|
"div",
|
|
338
341
|
{
|
|
@@ -456,7 +459,7 @@ function Text({
|
|
|
456
459
|
box.anchor === "middle" && "justify-center",
|
|
457
460
|
box.anchor === "bottom" && "justify-end"
|
|
458
461
|
),
|
|
459
|
-
style: textStyle(box, empty ? PLACEHOLDER_COLOR :
|
|
462
|
+
style: textStyle(box, empty ? PLACEHOLDER_COLOR : chunkJVEDKKNO_cjs.TEXT_COLORS[box.tone]),
|
|
460
463
|
onPointerDown: onEdit ? (event) => event.stopPropagation() : void 0,
|
|
461
464
|
onClick: onEdit,
|
|
462
465
|
"data-testid": testId,
|
|
@@ -505,7 +508,7 @@ function TextField({
|
|
|
505
508
|
box.align === "center" && "text-center"
|
|
506
509
|
),
|
|
507
510
|
style: {
|
|
508
|
-
...textStyle(box,
|
|
511
|
+
...textStyle(box, chunkJVEDKKNO_cjs.TEXT_COLORS[box.tone]),
|
|
509
512
|
fontFamily: "inherit",
|
|
510
513
|
// Bulleted lines keep their indent while typed.
|
|
511
514
|
paddingLeft: box.bullets ? "1.22em" : void 0
|
|
@@ -539,10 +542,10 @@ var SlideDecor = react.memo(function SlideDecor2({
|
|
|
539
542
|
dim
|
|
540
543
|
}) {
|
|
541
544
|
const [typing, setTyping] = react.useState(null);
|
|
542
|
-
const geometry =
|
|
545
|
+
const geometry = chunkJVEDKKNO_cjs.slideGeometry(slide, { labels, logo: theme.logo?.corner ?? null });
|
|
543
546
|
const title = slide.caption.trim();
|
|
544
547
|
const titled = slide.layout === "title" || slide.layout === "section";
|
|
545
|
-
const info =
|
|
548
|
+
const info = chunkJVEDKKNO_cjs.LAYOUT_INFO[slide.layout];
|
|
546
549
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("pointer-events-none absolute inset-0", dim && "opacity-30"), children: [
|
|
547
550
|
!geometry.title ? null : editing && typing === "title" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
548
551
|
TextField,
|
|
@@ -560,7 +563,7 @@ var SlideDecor = react.memo(function SlideDecor2({
|
|
|
560
563
|
{
|
|
561
564
|
box: geometry.title,
|
|
562
565
|
lines: title ? [title] : [],
|
|
563
|
-
accent:
|
|
566
|
+
accent: chunkJVEDKKNO_cjs.accentColor(theme.accent),
|
|
564
567
|
placeholder: editable && (titled || editing) ? "Click to add a title" : void 0,
|
|
565
568
|
onEdit: editing ? () => setTyping("title") : void 0,
|
|
566
569
|
testId: "stage-slide-caption"
|
|
@@ -570,7 +573,7 @@ var SlideDecor = react.memo(function SlideDecor2({
|
|
|
570
573
|
"div",
|
|
571
574
|
{
|
|
572
575
|
className: "absolute",
|
|
573
|
-
style: { ...boxStyle(geometry.rule), background:
|
|
576
|
+
style: { ...boxStyle(geometry.rule), background: chunkJVEDKKNO_cjs.accentColor(theme.accent) }
|
|
574
577
|
}
|
|
575
578
|
),
|
|
576
579
|
geometry.text && (editing && typing === "text" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -588,8 +591,8 @@ var SlideDecor = react.memo(function SlideDecor2({
|
|
|
588
591
|
Text,
|
|
589
592
|
{
|
|
590
593
|
box: geometry.text,
|
|
591
|
-
lines:
|
|
592
|
-
accent:
|
|
594
|
+
lines: chunkJVEDKKNO_cjs.textLines(slide.points),
|
|
595
|
+
accent: chunkJVEDKKNO_cjs.accentColor(theme.accent),
|
|
593
596
|
placeholder: editable ? info.text : void 0,
|
|
594
597
|
onEdit: editing ? () => setTyping("text") : void 0,
|
|
595
598
|
testId: "stage-slide-points"
|
|
@@ -611,7 +614,7 @@ var CORNERS = [
|
|
|
611
614
|
{ corner: "sw", left: "0%", top: "100%", cursor: "nesw-resize" },
|
|
612
615
|
{ corner: "se", left: "100%", top: "100%", cursor: "nwse-resize" }
|
|
613
616
|
];
|
|
614
|
-
var EDGE_CSS =
|
|
617
|
+
var EDGE_CSS = chunkJVEDKKNO_cjs.clipEdgeCss();
|
|
615
618
|
var StageItem = react.memo(function StageItem2({
|
|
616
619
|
clip,
|
|
617
620
|
frame,
|
|
@@ -679,14 +682,14 @@ var StageItem = react.memo(function StageItem2({
|
|
|
679
682
|
const dy = (event.clientY - g.pointer.y) / g.stage.height;
|
|
680
683
|
const free = event.altKey;
|
|
681
684
|
if (isEdge(g.kind)) {
|
|
682
|
-
const result =
|
|
685
|
+
const result = chunkJVEDKKNO_cjs.reshapeFrame(g.frame, g.shape, g.kind, dx, dy, g.others, free);
|
|
683
686
|
g.next = {
|
|
684
687
|
frame: result.frame,
|
|
685
688
|
shape: { rect: result.rect, aspect: result.aspect },
|
|
686
689
|
guides: result.guides
|
|
687
690
|
};
|
|
688
691
|
} else {
|
|
689
|
-
g.next = g.kind === "move" ?
|
|
692
|
+
g.next = g.kind === "move" ? chunkJVEDKKNO_cjs.moveFrame(g.frame, g.shape.aspect, dx, dy, g.others, free) : chunkJVEDKKNO_cjs.resizeFrame(g.frame, g.shape.aspect, g.kind, dx, dy, g.others, free);
|
|
690
693
|
}
|
|
691
694
|
g.request ??= view().requestAnimationFrame(apply);
|
|
692
695
|
};
|
|
@@ -722,7 +725,7 @@ var StageItem = react.memo(function StageItem2({
|
|
|
722
725
|
left: `${box.x * 100}%`,
|
|
723
726
|
top: `${box.y * 100}%`,
|
|
724
727
|
width: `${box.w * 100}%`,
|
|
725
|
-
height: `${
|
|
728
|
+
height: `${chunkJVEDKKNO_cjs.frameHeight(box, shown.aspect) * 100}%`
|
|
726
729
|
},
|
|
727
730
|
onPointerDown: (event) => start(event, "move"),
|
|
728
731
|
onPointerMove: move,
|
|
@@ -747,7 +750,7 @@ var StageItem = react.memo(function StageItem2({
|
|
|
747
750
|
"div",
|
|
748
751
|
{
|
|
749
752
|
className: "pointer-events-none absolute left-0 top-full mt-[0.5cqw] max-w-full truncate text-[1.7cqw] leading-tight",
|
|
750
|
-
style: { color:
|
|
753
|
+
style: { color: chunkJVEDKKNO_cjs.TEXT_COLORS.muted },
|
|
751
754
|
children: label
|
|
752
755
|
}
|
|
753
756
|
),
|
|
@@ -790,14 +793,14 @@ var StageItem = react.memo(function StageItem2({
|
|
|
790
793
|
});
|
|
791
794
|
|
|
792
795
|
// src/presentation/box-style.ts
|
|
793
|
-
var cqw = (points) => `${
|
|
796
|
+
var cqw = (points) => `${chunkJVEDKKNO_cjs.pointsToStage(points) * 100}cqw`;
|
|
794
797
|
function runStyle(run, font) {
|
|
795
798
|
return {
|
|
796
|
-
fontSize: cqw(run.size ??
|
|
799
|
+
fontSize: cqw(run.size ?? chunkJVEDKKNO_cjs.DEFAULT_TEXT_SIZE),
|
|
797
800
|
fontWeight: run.bold ? 700 : 400,
|
|
798
801
|
fontStyle: run.italic ? "italic" : void 0,
|
|
799
802
|
textDecoration: run.underline ? "underline" : void 0,
|
|
800
|
-
color: run.color ??
|
|
803
|
+
color: run.color ?? chunkJVEDKKNO_cjs.TEXT_COLORS.body,
|
|
801
804
|
fontFamily: run.font ? `"${run.font}", ${font}` : font
|
|
802
805
|
};
|
|
803
806
|
}
|
|
@@ -819,7 +822,7 @@ var withAlpha = (hex, alpha = 1) => {
|
|
|
819
822
|
function shapeStyle(box) {
|
|
820
823
|
const { frame } = box;
|
|
821
824
|
const line = box.line;
|
|
822
|
-
const shorter = Math.min(frame.w, frame.h * 1 /
|
|
825
|
+
const shorter = Math.min(frame.w, frame.h * 1 / chunkJVEDKKNO_cjs.STAGE_ASPECT);
|
|
823
826
|
return {
|
|
824
827
|
background: box.fill && box.shape !== "line" ? withAlpha(box.fill, box.fillAlpha) : void 0,
|
|
825
828
|
border: line && box.shape !== "line" ? `${cqw(line.width)} ${line.dash ? "dashed" : "solid"} ${line.color}` : void 0,
|
|
@@ -832,7 +835,7 @@ function Paragraphs({
|
|
|
832
835
|
}) {
|
|
833
836
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: paragraphs.map((paragraph, index) => {
|
|
834
837
|
const first = paragraph.runs[0];
|
|
835
|
-
const size = first?.size ??
|
|
838
|
+
const size = first?.size ?? chunkJVEDKKNO_cjs.DEFAULT_TEXT_SIZE;
|
|
836
839
|
const indent = (paragraph.level ?? 0) * 0.5 * size;
|
|
837
840
|
const empty = !paragraph.runs.some((run) => run.text);
|
|
838
841
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -919,7 +922,7 @@ var StageBox = react.memo(function StageBox2({
|
|
|
919
922
|
const dx = (event.clientX - g.pointer.x) / g.stage.width;
|
|
920
923
|
const dy = (event.clientY - g.pointer.y) / g.stage.height;
|
|
921
924
|
if (!g.next) setDragging(true);
|
|
922
|
-
g.next = g.handle === "move" ?
|
|
925
|
+
g.next = g.handle === "move" ? chunkJVEDKKNO_cjs.moveBox(g.frame, dx, dy) : chunkJVEDKKNO_cjs.stretchBox(g.frame, g.handle, dx, dy);
|
|
923
926
|
g.request ??= view().requestAnimationFrame(apply);
|
|
924
927
|
};
|
|
925
928
|
const end = () => {
|
|
@@ -943,8 +946,8 @@ var StageBox = react.memo(function StageBox2({
|
|
|
943
946
|
host.commit(box.id, g.next);
|
|
944
947
|
};
|
|
945
948
|
const hasText = box.shape !== "line";
|
|
946
|
-
const inset = cqw(box.inset ??
|
|
947
|
-
const run =
|
|
949
|
+
const inset = cqw(box.inset ?? chunkJVEDKKNO_cjs.DEFAULT_INSET);
|
|
950
|
+
const run = chunkJVEDKKNO_cjs.firstRun(box);
|
|
948
951
|
const transform = box.rotation ? `rotate(${box.rotation}deg)` : void 0;
|
|
949
952
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
950
953
|
"div",
|
|
@@ -992,7 +995,7 @@ var StageBox = react.memo(function StageBox2({
|
|
|
992
995
|
y1: box.flipV ? "100%" : "0%",
|
|
993
996
|
x2: "100%",
|
|
994
997
|
y2: box.flipV ? "0%" : "100%",
|
|
995
|
-
stroke: box.line?.color ??
|
|
998
|
+
stroke: box.line?.color ?? chunkJVEDKKNO_cjs.TEXT_COLORS.body,
|
|
996
999
|
style: { strokeWidth: cqw(box.line?.width ?? 1) },
|
|
997
1000
|
strokeDasharray: box.line?.dash ? "6 4" : void 0
|
|
998
1001
|
}
|
|
@@ -1011,7 +1014,7 @@ var StageBox = react.memo(function StageBox2({
|
|
|
1011
1014
|
"textarea",
|
|
1012
1015
|
{
|
|
1013
1016
|
autoFocus: true,
|
|
1014
|
-
defaultValue:
|
|
1017
|
+
defaultValue: chunkJVEDKKNO_cjs.boxText(box),
|
|
1015
1018
|
className: "pointer-events-auto w-full flex-1 resize-none bg-transparent p-0 outline-none",
|
|
1016
1019
|
style: {
|
|
1017
1020
|
...runStyle(run ?? { }, font),
|
|
@@ -1030,11 +1033,11 @@ var StageBox = react.memo(function StageBox2({
|
|
|
1030
1033
|
"aria-label": "Text",
|
|
1031
1034
|
"data-testid": "stage-box-text-input"
|
|
1032
1035
|
}
|
|
1033
|
-
) :
|
|
1036
|
+
) : chunkJVEDKKNO_cjs.boxText(box) || !editable ? /* @__PURE__ */ jsxRuntime.jsx(Paragraphs, { paragraphs: box.paragraphs, font }) : box.shape === "text" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1034
1037
|
"span",
|
|
1035
1038
|
{
|
|
1036
1039
|
className: "text-white/40",
|
|
1037
|
-
style: { fontSize: cqw(run?.size ??
|
|
1040
|
+
style: { fontSize: cqw(run?.size ?? chunkJVEDKKNO_cjs.DEFAULT_TEXT_SIZE) },
|
|
1038
1041
|
children: "Double-click to type"
|
|
1039
1042
|
}
|
|
1040
1043
|
)
|
|
@@ -1094,9 +1097,9 @@ function ColorAction({
|
|
|
1094
1097
|
] });
|
|
1095
1098
|
}
|
|
1096
1099
|
function BoxActionBar({ box, onRemoved }) {
|
|
1097
|
-
const actions =
|
|
1098
|
-
const run =
|
|
1099
|
-
const size = run?.size ??
|
|
1100
|
+
const actions = chunkJVEDKKNO_cjs.usePresentation.getState();
|
|
1101
|
+
const run = chunkJVEDKKNO_cjs.firstRun(box);
|
|
1102
|
+
const size = run?.size ?? chunkJVEDKKNO_cjs.DEFAULT_TEXT_SIZE;
|
|
1100
1103
|
const align = box.paragraphs[0]?.align ?? "left";
|
|
1101
1104
|
const update = (change) => actions.updateBox(box.id, change);
|
|
1102
1105
|
const text = box.shape !== "line";
|
|
@@ -1119,7 +1122,7 @@ function BoxActionBar({ box, onRemoved }) {
|
|
|
1119
1122
|
Action,
|
|
1120
1123
|
{
|
|
1121
1124
|
label: "Smaller",
|
|
1122
|
-
onClick: () => update((b) =>
|
|
1125
|
+
onClick: () => update((b) => chunkJVEDKKNO_cjs.styleRuns(b, (r) => ({ ...r, size: nextSize(r.size ?? size, false) }))),
|
|
1123
1126
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AArrowDown, { className: "size-4" })
|
|
1124
1127
|
}
|
|
1125
1128
|
),
|
|
@@ -1135,7 +1138,7 @@ function BoxActionBar({ box, onRemoved }) {
|
|
|
1135
1138
|
Action,
|
|
1136
1139
|
{
|
|
1137
1140
|
label: "Larger",
|
|
1138
|
-
onClick: () => update((b) =>
|
|
1141
|
+
onClick: () => update((b) => chunkJVEDKKNO_cjs.styleRuns(b, (r) => ({ ...r, size: nextSize(r.size ?? size, true) }))),
|
|
1139
1142
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AArrowUp, { className: "size-4" })
|
|
1140
1143
|
}
|
|
1141
1144
|
),
|
|
@@ -1143,7 +1146,7 @@ function BoxActionBar({ box, onRemoved }) {
|
|
|
1143
1146
|
Action,
|
|
1144
1147
|
{
|
|
1145
1148
|
label: "Bold",
|
|
1146
|
-
onClick: () => update((b) =>
|
|
1149
|
+
onClick: () => update((b) => chunkJVEDKKNO_cjs.styleRuns(b, (r) => ({ ...r, bold: !run?.bold }))),
|
|
1147
1150
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bold, { className: ui.cn("size-4", run?.bold && "text-primary") })
|
|
1148
1151
|
}
|
|
1149
1152
|
),
|
|
@@ -1151,8 +1154,8 @@ function BoxActionBar({ box, onRemoved }) {
|
|
|
1151
1154
|
ColorAction,
|
|
1152
1155
|
{
|
|
1153
1156
|
label: "Text colour",
|
|
1154
|
-
value: run?.color ??
|
|
1155
|
-
onChange: (color) => update((b) =>
|
|
1157
|
+
value: run?.color ?? chunkJVEDKKNO_cjs.TEXT_COLORS.body,
|
|
1158
|
+
onChange: (color) => update((b) => chunkJVEDKKNO_cjs.styleRuns(b, (r) => ({ ...r, color }))),
|
|
1156
1159
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Baseline, { className: "size-4" })
|
|
1157
1160
|
}
|
|
1158
1161
|
)
|
|
@@ -1186,7 +1189,7 @@ function BoxActionBar({ box, onRemoved }) {
|
|
|
1186
1189
|
ui.DropdownMenuCheckboxItem,
|
|
1187
1190
|
{
|
|
1188
1191
|
checked: !!run?.italic,
|
|
1189
|
-
onCheckedChange: () => update((b) =>
|
|
1192
|
+
onCheckedChange: () => update((b) => chunkJVEDKKNO_cjs.styleRuns(b, (r) => ({ ...r, italic: !run?.italic }))),
|
|
1190
1193
|
children: [
|
|
1191
1194
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Italic, { className: "size-4" }),
|
|
1192
1195
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Italic" })
|
|
@@ -1243,7 +1246,7 @@ var DROP_ATTRIBUTE = "data-presentation-drop";
|
|
|
1243
1246
|
function dropAt(doc, clipId, x, y) {
|
|
1244
1247
|
const target = doc.elementFromPoint(x, y)?.closest(`[${DROP_ATTRIBUTE}]`);
|
|
1245
1248
|
if (!target) return false;
|
|
1246
|
-
const state =
|
|
1249
|
+
const state = chunkJVEDKKNO_cjs.usePresentation.getState();
|
|
1247
1250
|
if (target.getAttribute(DROP_ATTRIBUTE) === "slide") {
|
|
1248
1251
|
const index2 = Number(target.getAttribute("data-slide-index"));
|
|
1249
1252
|
if (!Number.isInteger(index2)) return false;
|
|
@@ -1263,7 +1266,7 @@ function useClipDrag(clipId, onTap) {
|
|
|
1263
1266
|
const end = () => {
|
|
1264
1267
|
press.current = null;
|
|
1265
1268
|
setGhost(null);
|
|
1266
|
-
|
|
1269
|
+
chunkJVEDKKNO_cjs.usePresentation.getState().setDragging(null);
|
|
1267
1270
|
};
|
|
1268
1271
|
return {
|
|
1269
1272
|
ghost,
|
|
@@ -1279,7 +1282,7 @@ function useClipDrag(clipId, onTap) {
|
|
|
1279
1282
|
if (Math.hypot(event.clientX - p.x, event.clientY - p.y) < DRAG_THRESHOLD) return;
|
|
1280
1283
|
p.dragging = true;
|
|
1281
1284
|
event.currentTarget.setPointerCapture(event.pointerId);
|
|
1282
|
-
|
|
1285
|
+
chunkJVEDKKNO_cjs.usePresentation.getState().setDragging(clipId);
|
|
1283
1286
|
}
|
|
1284
1287
|
event.preventDefault();
|
|
1285
1288
|
setGhost({ x: event.clientX, y: event.clientY });
|
|
@@ -1322,20 +1325,20 @@ function PresentationStage({
|
|
|
1322
1325
|
overlay,
|
|
1323
1326
|
className
|
|
1324
1327
|
}) {
|
|
1325
|
-
const index =
|
|
1326
|
-
const deckSlide =
|
|
1327
|
-
const deckClips =
|
|
1328
|
+
const index = chunkJVEDKKNO_cjs.usePresentation((s) => slideIndex ?? s.current);
|
|
1329
|
+
const deckSlide = chunkJVEDKKNO_cjs.usePresentation((s) => s.slides[index]);
|
|
1330
|
+
const deckClips = chunkJVEDKKNO_cjs.usePresentation((s) => s.clips);
|
|
1328
1331
|
const slide = show?.slide ?? deckSlide;
|
|
1329
1332
|
const clips = show?.clips ?? deckClips;
|
|
1330
|
-
const blank =
|
|
1331
|
-
const captions =
|
|
1332
|
-
const columnValues =
|
|
1333
|
-
const theme =
|
|
1334
|
-
const logoImage =
|
|
1335
|
-
const media =
|
|
1333
|
+
const blank = chunkJVEDKKNO_cjs.usePresentation((s) => s.blank && !editable && !show);
|
|
1334
|
+
const captions = chunkJVEDKKNO_cjs.usePresentation((s) => s.captions);
|
|
1335
|
+
const columnValues = chunkJVEDKKNO_cjs.usePresentation((s) => s.columnValues);
|
|
1336
|
+
const theme = chunkJVEDKKNO_cjs.usePresentation((s) => s.theme);
|
|
1337
|
+
const logoImage = chunkJVEDKKNO_cjs.usePresentation((s) => s.logoImage);
|
|
1338
|
+
const media = chunkJVEDKKNO_cjs.usePresentation((s) => s.media);
|
|
1336
1339
|
const stageRef = react.useRef(null);
|
|
1337
1340
|
const guideLayer = react.useRef(null);
|
|
1338
|
-
const dropping =
|
|
1341
|
+
const dropping = chunkJVEDKKNO_cjs.usePresentation((s) => editable && s.dragging !== null);
|
|
1339
1342
|
const [dragging, setDragging] = react.useState(false);
|
|
1340
1343
|
const latest = react.useRef({ slide, clips, index, onSelect });
|
|
1341
1344
|
latest.current = { slide, clips, index, onSelect };
|
|
@@ -1350,13 +1353,13 @@ function PresentationStage({
|
|
|
1350
1353
|
}));
|
|
1351
1354
|
},
|
|
1352
1355
|
select: (clipId) => {
|
|
1353
|
-
|
|
1356
|
+
chunkJVEDKKNO_cjs.usePresentation.getState().goTo(latest.current.index);
|
|
1354
1357
|
latest.current.onSelect?.(clipId);
|
|
1355
1358
|
},
|
|
1356
1359
|
guides: (guides) => guideLayer.current?.set(guides),
|
|
1357
1360
|
dragging: setDragging,
|
|
1358
1361
|
commit: (clipId, frame, shape) => {
|
|
1359
|
-
const state =
|
|
1362
|
+
const state = chunkJVEDKKNO_cjs.usePresentation.getState();
|
|
1360
1363
|
state.goTo(latest.current.index);
|
|
1361
1364
|
if (shape) state.reshapeClip(clipId, frame, shape.rect, shape.aspect);
|
|
1362
1365
|
else state.setFrame(clipId, frame);
|
|
@@ -1368,15 +1371,15 @@ function PresentationStage({
|
|
|
1368
1371
|
() => ({
|
|
1369
1372
|
stageBox: () => stageRef.current?.getBoundingClientRect() ?? null,
|
|
1370
1373
|
select: (boxId) => {
|
|
1371
|
-
|
|
1374
|
+
chunkJVEDKKNO_cjs.usePresentation.getState().goTo(latest.current.index);
|
|
1372
1375
|
latest.current.onSelect?.(boxId);
|
|
1373
1376
|
},
|
|
1374
|
-
commit: (boxId, frame) =>
|
|
1375
|
-
setText: (boxId, text) =>
|
|
1377
|
+
commit: (boxId, frame) => chunkJVEDKKNO_cjs.usePresentation.getState().updateBox(boxId, (box) => ({ ...box, frame })),
|
|
1378
|
+
setText: (boxId, text) => chunkJVEDKKNO_cjs.usePresentation.getState().setBoxText(boxId, text)
|
|
1376
1379
|
}),
|
|
1377
1380
|
[]
|
|
1378
1381
|
);
|
|
1379
|
-
const font =
|
|
1382
|
+
const font = chunkJVEDKKNO_cjs.FONTS[theme.font].css;
|
|
1380
1383
|
const boxes = slide?.boxes ?? [];
|
|
1381
1384
|
const selectedBox = selected ? boxes.find((box) => box.id === selected) : void 0;
|
|
1382
1385
|
const renderBoxes = (front) => boxes.filter((box) => !!box.front === front).map((box) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1402,7 +1405,7 @@ function PresentationStage({
|
|
|
1402
1405
|
const item = event.target?.closest?.(
|
|
1403
1406
|
`[data-testid="stage-item-${selected}"]`
|
|
1404
1407
|
);
|
|
1405
|
-
const clip =
|
|
1408
|
+
const clip = chunkJVEDKKNO_cjs.usePresentation.getState().clips.find((entry) => entry.id === selected);
|
|
1406
1409
|
if (!item || !clip) return;
|
|
1407
1410
|
event.preventDefault();
|
|
1408
1411
|
const box = item.getBoundingClientRect();
|
|
@@ -1415,7 +1418,7 @@ function PresentationStage({
|
|
|
1415
1418
|
};
|
|
1416
1419
|
request ??= view.requestAnimationFrame(() => {
|
|
1417
1420
|
request = null;
|
|
1418
|
-
|
|
1421
|
+
chunkJVEDKKNO_cjs.usePresentation.getState().panClip(selected, sum.x, sum.y);
|
|
1419
1422
|
sum = { x: 0, y: 0 };
|
|
1420
1423
|
});
|
|
1421
1424
|
};
|
|
@@ -1444,12 +1447,12 @@ function PresentationStage({
|
|
|
1444
1447
|
width: "min(100cqw, calc(100cqh * 16 / 9))",
|
|
1445
1448
|
height: "min(100cqh, calc(100cqw * 9 / 16))",
|
|
1446
1449
|
containerType: "inline-size",
|
|
1447
|
-
background: slide?.background ?
|
|
1448
|
-
fontFamily:
|
|
1450
|
+
background: slide?.background ? chunkJVEDKKNO_cjs.slideBackgroundCss(slide.background, media) : chunkJVEDKKNO_cjs.backgroundCss(theme.background),
|
|
1451
|
+
fontFamily: chunkJVEDKKNO_cjs.FONTS[theme.font].css
|
|
1449
1452
|
},
|
|
1450
1453
|
onPointerDown: () => {
|
|
1451
1454
|
if (!editable) return;
|
|
1452
|
-
|
|
1455
|
+
chunkJVEDKKNO_cjs.usePresentation.getState().goTo(index);
|
|
1453
1456
|
onSelect?.(null);
|
|
1454
1457
|
},
|
|
1455
1458
|
...editable ? { [DROP_ATTRIBUTE]: "stage", "data-slide-index": index } : {},
|
|
@@ -1479,7 +1482,7 @@ function PresentationStage({
|
|
|
1479
1482
|
editable,
|
|
1480
1483
|
selected: editable && selected === clip.id,
|
|
1481
1484
|
dim: false,
|
|
1482
|
-
label: captions ?
|
|
1485
|
+
label: captions ? chunkJVEDKKNO_cjs.clipLabel(clip, columnValues) : "",
|
|
1483
1486
|
host
|
|
1484
1487
|
},
|
|
1485
1488
|
clip.id
|
|
@@ -1509,5 +1512,5 @@ function PresentationStage({
|
|
|
1509
1512
|
exports.ClipImage = ClipImage;
|
|
1510
1513
|
exports.PresentationStage = PresentationStage;
|
|
1511
1514
|
exports.useClipDrag = useClipDrag;
|
|
1512
|
-
//# sourceMappingURL=chunk-
|
|
1513
|
-
//# sourceMappingURL=chunk-
|
|
1515
|
+
//# sourceMappingURL=chunk-7Q46YAX4.cjs.map
|
|
1516
|
+
//# sourceMappingURL=chunk-7Q46YAX4.cjs.map
|