camox 0.41.0 → 0.42.0
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/core/components/lexical/SidebarLexicalEditor.js +42 -39
- package/dist/core/createApp.d.ts +16 -2
- package/dist/core/createBlock.js +11 -25
- package/dist/core/editing/BlockEditingRuntime.js +4 -4
- package/dist/core/editing/CompleteBlockEditingRuntime.js +5 -5
- package/dist/core/editing/createEditableBlock.d.ts +8 -1
- package/dist/core/editing/createEditableBlock.js +684 -644
- package/dist/core/hooks/useIsEditable.js +4 -7
- package/dist/core/hooks/useOverlayState.js +11 -0
- package/dist/core/hooks/useRequireDraftSource.js +7 -11
- package/dist/core/lib/fieldTypes.js +5 -5
- package/dist/core/lib/lexicalState.js +17 -1
- package/dist/features/preview/CamoxPreview.js +123 -137
- package/dist/features/preview/DerivedPreview.js +6 -9
- package/dist/features/preview/commentsEnabled.js +8 -0
- package/dist/features/preview/components/AddBlockSidebar.js +79 -89
- package/dist/features/preview/components/AssetLightbox.js +4 -11
- package/dist/features/preview/components/AttachedComments.js +194 -0
- package/dist/features/preview/components/BlockActionsPopover.js +19 -70
- package/dist/features/preview/components/CommentHeader.js +122 -0
- package/dist/features/preview/components/CommentSidebar.js +29 -0
- package/dist/features/preview/components/CommentTargetQuote.js +166 -0
- package/dist/features/preview/components/CreatePageModal.js +2 -8
- package/dist/features/preview/components/DerivedLayoutSidebar.js +4 -7
- package/dist/features/preview/components/ItemFieldsEditor.js +275 -204
- package/dist/features/preview/components/LeftSidebar.js +18 -18
- package/dist/features/preview/components/LinkFieldEditor.js +3 -4
- package/dist/features/preview/components/MobilePreviewDrawer.js +3 -3
- package/dist/features/preview/components/OverlayTracker.js +14 -20
- package/dist/features/preview/components/Overlays.js +28 -40
- package/dist/features/preview/components/PageEditorSidebar.js +231 -241
- package/dist/features/preview/components/PageInfoSidebar.js +126 -157
- package/dist/features/preview/components/PagePicker.js +13 -8
- package/dist/features/preview/components/PageTree.js +255 -319
- package/dist/features/preview/components/PreviewComments.js +56 -0
- package/dist/features/preview/components/PreviewPanel.js +149 -107
- package/dist/features/preview/components/PreviewToolbar.js +292 -246
- package/dist/features/preview/components/PreviewToolbarSpacer.js +43 -0
- package/dist/features/preview/components/PublicationRow.js +11 -24
- package/dist/features/preview/components/RightSidebar.js +14 -11
- package/dist/features/preview/components/SidebarSection.js +121 -0
- package/dist/features/preview/previewCommentsStore.js +115 -0
- package/dist/features/preview/previewSelection.js +75 -0
- package/dist/features/preview/previewStore.js +32 -63
- package/dist/features/provider/AuthenticatedCamoxProvider.js +46 -34
- package/dist/features/provider/components/CommandPalette.js +142 -58
- package/dist/features/provider/useAdminShortcuts.js +20 -8
- package/dist/features/routes/pageRuntime.js +0 -6
- package/dist/features/runtime/RuntimeChrome.js +102 -87
- package/dist/features/studio/CamoxStudio.js +30 -50
- package/dist/features/studio/components/UserButton.js +4 -4
- package/dist/features/vite/runtimeDev.js +4 -1
- package/dist/features/vite/vite.d.ts +3 -2
- package/dist/features/vite/vite.js +9 -5
- package/dist/hooks/use-file-upload.js +0 -2
- package/dist/studio.css +1 -1
- package/package.json +5 -7
- package/dist/features/preview/components/DraftSwitchDialog.js +0 -66
- package/dist/lib/telemetry-client.js +0 -66
- package/dist/lib/telemetry.js +0 -26
|
@@ -27,9 +27,9 @@ import { $createTextNode, $getSelection, $isRangeSelection, $setSelection, COMMA
|
|
|
27
27
|
//#region src/core/components/lexical/SidebarLexicalEditor.tsx
|
|
28
28
|
function EnterAsLineBreakHandler() {
|
|
29
29
|
const $ = c(4);
|
|
30
|
-
if ($[0] !== "
|
|
30
|
+
if ($[0] !== "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c") {
|
|
31
31
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
32
|
-
$[0] = "
|
|
32
|
+
$[0] = "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c";
|
|
33
33
|
}
|
|
34
34
|
const [editor] = useLexicalComposerContext();
|
|
35
35
|
let t0;
|
|
@@ -53,9 +53,9 @@ function EnterAsLineBreakHandler() {
|
|
|
53
53
|
}
|
|
54
54
|
function ExternalStateSync(t0) {
|
|
55
55
|
const $ = c(6);
|
|
56
|
-
if ($[0] !== "
|
|
56
|
+
if ($[0] !== "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c") {
|
|
57
57
|
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
58
|
-
$[0] = "
|
|
58
|
+
$[0] = "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c";
|
|
59
59
|
}
|
|
60
60
|
const { value, isSyncingRef } = t0;
|
|
61
61
|
const [editor] = useLexicalComposerContext();
|
|
@@ -91,9 +91,9 @@ function ExternalStateSync(t0) {
|
|
|
91
91
|
}
|
|
92
92
|
function SidebarFloatingTextToolbar() {
|
|
93
93
|
const $ = c(72);
|
|
94
|
-
if ($[0] !== "
|
|
94
|
+
if ($[0] !== "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c") {
|
|
95
95
|
for (let $i = 0; $i < 72; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
96
|
-
$[0] = "
|
|
96
|
+
$[0] = "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c";
|
|
97
97
|
}
|
|
98
98
|
const [editor] = useLexicalComposerContext();
|
|
99
99
|
const [open, setOpen] = React.useState(false);
|
|
@@ -518,9 +518,9 @@ function _temp(event_0) {
|
|
|
518
518
|
}
|
|
519
519
|
function PasteUrlAsLinkHandler() {
|
|
520
520
|
const $ = c(4);
|
|
521
|
-
if ($[0] !== "
|
|
521
|
+
if ($[0] !== "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c") {
|
|
522
522
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
523
|
-
$[0] = "
|
|
523
|
+
$[0] = "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c";
|
|
524
524
|
}
|
|
525
525
|
const [editor] = useLexicalComposerContext();
|
|
526
526
|
let t0;
|
|
@@ -571,43 +571,46 @@ function SidebarLexicalEditor({ id, value, onChange, onFocus, onBlur }) {
|
|
|
571
571
|
timerRef.current = window.setTimeout(flushChange, 300);
|
|
572
572
|
}, [flushChange]);
|
|
573
573
|
React.useEffect(() => flushChange, [flushChange]);
|
|
574
|
-
return /* @__PURE__ */
|
|
575
|
-
|
|
576
|
-
children:
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
onBlur
|
|
585
|
-
|
|
574
|
+
return /* @__PURE__ */ jsx("div", {
|
|
575
|
+
className: "w-full min-w-0",
|
|
576
|
+
children: /* @__PURE__ */ jsxs(LexicalComposer, {
|
|
577
|
+
initialConfig: config,
|
|
578
|
+
children: [
|
|
579
|
+
/* @__PURE__ */ jsx(RichTextPlugin, {
|
|
580
|
+
contentEditable: /* @__PURE__ */ jsx(ContentEditable, {
|
|
581
|
+
id,
|
|
582
|
+
className: cn(INPUT_BASE_STYLES, INPUT_FOCUS_STYLES, "flex min-h-[80px] w-full px-3 py-2"),
|
|
583
|
+
onFocus,
|
|
584
|
+
onBlur: () => {
|
|
585
|
+
flushChange();
|
|
586
|
+
onBlur?.();
|
|
587
|
+
}
|
|
588
|
+
}),
|
|
589
|
+
ErrorBoundary: LexicalErrorBoundary
|
|
590
|
+
}),
|
|
591
|
+
/* @__PURE__ */ jsx(OnChangePlugin, {
|
|
592
|
+
onChange: handleChange,
|
|
593
|
+
ignoreSelectionChange: true
|
|
586
594
|
}),
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
/* @__PURE__ */ jsx(EnterAsLineBreakHandler, {}),
|
|
600
|
-
/* @__PURE__ */ jsx(PasteUrlAsLinkHandler, {}),
|
|
601
|
-
/* @__PURE__ */ jsx(SidebarFloatingTextToolbar, {}),
|
|
602
|
-
/* @__PURE__ */ jsx(InlineStylesPlugin, {})
|
|
603
|
-
]
|
|
595
|
+
/* @__PURE__ */ jsx(HistoryPlugin, {}),
|
|
596
|
+
/* @__PURE__ */ jsx(LinkPlugin, {}),
|
|
597
|
+
/* @__PURE__ */ jsx(ExternalStateSync, {
|
|
598
|
+
value,
|
|
599
|
+
isSyncingRef
|
|
600
|
+
}),
|
|
601
|
+
/* @__PURE__ */ jsx(EnterAsLineBreakHandler, {}),
|
|
602
|
+
/* @__PURE__ */ jsx(PasteUrlAsLinkHandler, {}),
|
|
603
|
+
/* @__PURE__ */ jsx(SidebarFloatingTextToolbar, {}),
|
|
604
|
+
/* @__PURE__ */ jsx(InlineStylesPlugin, {})
|
|
605
|
+
]
|
|
606
|
+
})
|
|
604
607
|
});
|
|
605
608
|
}
|
|
606
609
|
function LexicalErrorBoundary(t0) {
|
|
607
610
|
const $ = c(3);
|
|
608
|
-
if ($[0] !== "
|
|
611
|
+
if ($[0] !== "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c") {
|
|
609
612
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
610
|
-
$[0] = "
|
|
613
|
+
$[0] = "9099d61d0971934e0ec89e67af10f91e79fcdfcb9a97e7101baf2650b116b54c";
|
|
611
614
|
}
|
|
612
615
|
const { children } = t0;
|
|
613
616
|
let t1;
|
package/dist/core/createApp.d.ts
CHANGED
|
@@ -21,9 +21,10 @@ declare function createApp({
|
|
|
21
21
|
children
|
|
22
22
|
}: {
|
|
23
23
|
children: (props: {
|
|
24
|
+
"data-camox-comment-block-id"?: number;
|
|
24
25
|
ref: (element: HTMLElement | null) => void;
|
|
25
26
|
style: React.CSSProperties;
|
|
26
|
-
|
|
27
|
+
onClickCapture: (e: React.MouseEvent) => void;
|
|
27
28
|
onMouseEnter: () => void;
|
|
28
29
|
onMouseLeave: () => void;
|
|
29
30
|
}) => React.ReactNode;
|
|
@@ -45,6 +46,7 @@ declare function createApp({
|
|
|
45
46
|
"data-camox-overlay-mode"?: string;
|
|
46
47
|
onMouseEnter?: (() => void) | undefined;
|
|
47
48
|
onMouseLeave?: (() => void) | undefined;
|
|
49
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
48
50
|
}, data: {
|
|
49
51
|
text: string;
|
|
50
52
|
}) => React.ReactNode;
|
|
@@ -86,6 +88,7 @@ declare function createApp({
|
|
|
86
88
|
"data-camox-overlay-mode"?: string;
|
|
87
89
|
onMouseEnter?: (() => void) | undefined;
|
|
88
90
|
onMouseLeave?: (() => void) | undefined;
|
|
91
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
89
92
|
}, data: {
|
|
90
93
|
text: string;
|
|
91
94
|
href: string;
|
|
@@ -148,6 +151,7 @@ declare function createApp({
|
|
|
148
151
|
"data-camox-overlay-mode"?: string;
|
|
149
152
|
onMouseEnter?: (() => void) | undefined;
|
|
150
153
|
onMouseLeave?: (() => void) | undefined;
|
|
154
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
151
155
|
}, data: {
|
|
152
156
|
text: string;
|
|
153
157
|
}) => React.ReactNode;
|
|
@@ -175,6 +179,7 @@ declare function createApp({
|
|
|
175
179
|
"data-camox-overlay-mode"?: string;
|
|
176
180
|
onMouseEnter?: (() => void) | undefined;
|
|
177
181
|
onMouseLeave?: (() => void) | undefined;
|
|
182
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
178
183
|
}, data: {
|
|
179
184
|
text: string;
|
|
180
185
|
href: string;
|
|
@@ -272,6 +277,7 @@ declare function createApp({
|
|
|
272
277
|
"data-camox-overlay-mode"?: string;
|
|
273
278
|
onMouseEnter?: (() => void) | undefined;
|
|
274
279
|
onMouseLeave?: (() => void) | undefined;
|
|
280
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
275
281
|
}, data: {
|
|
276
282
|
text: string;
|
|
277
283
|
}) => React.ReactNode;
|
|
@@ -299,6 +305,7 @@ declare function createApp({
|
|
|
299
305
|
"data-camox-overlay-mode"?: string;
|
|
300
306
|
onMouseEnter?: (() => void) | undefined;
|
|
301
307
|
onMouseLeave?: (() => void) | undefined;
|
|
308
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
302
309
|
}, data: {
|
|
303
310
|
text: string;
|
|
304
311
|
href: string;
|
|
@@ -422,9 +429,10 @@ declare function createApp({
|
|
|
422
429
|
children
|
|
423
430
|
}: {
|
|
424
431
|
children: (props: {
|
|
432
|
+
"data-camox-comment-block-id"?: number;
|
|
425
433
|
ref: (element: HTMLElement | null) => void;
|
|
426
434
|
style: React.CSSProperties;
|
|
427
|
-
|
|
435
|
+
onClickCapture: (e: React.MouseEvent) => void;
|
|
428
436
|
onMouseEnter: () => void;
|
|
429
437
|
onMouseLeave: () => void;
|
|
430
438
|
}) => React.ReactNode;
|
|
@@ -446,6 +454,7 @@ declare function createApp({
|
|
|
446
454
|
"data-camox-overlay-mode"?: string;
|
|
447
455
|
onMouseEnter?: (() => void) | undefined;
|
|
448
456
|
onMouseLeave?: (() => void) | undefined;
|
|
457
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
449
458
|
}, data: {
|
|
450
459
|
text: string;
|
|
451
460
|
}) => React.ReactNode;
|
|
@@ -487,6 +496,7 @@ declare function createApp({
|
|
|
487
496
|
"data-camox-overlay-mode"?: string;
|
|
488
497
|
onMouseEnter?: (() => void) | undefined;
|
|
489
498
|
onMouseLeave?: (() => void) | undefined;
|
|
499
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
490
500
|
}, data: {
|
|
491
501
|
text: string;
|
|
492
502
|
href: string;
|
|
@@ -549,6 +559,7 @@ declare function createApp({
|
|
|
549
559
|
"data-camox-overlay-mode"?: string;
|
|
550
560
|
onMouseEnter?: (() => void) | undefined;
|
|
551
561
|
onMouseLeave?: (() => void) | undefined;
|
|
562
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
552
563
|
}, data: {
|
|
553
564
|
text: string;
|
|
554
565
|
}) => React.ReactNode;
|
|
@@ -576,6 +587,7 @@ declare function createApp({
|
|
|
576
587
|
"data-camox-overlay-mode"?: string;
|
|
577
588
|
onMouseEnter?: (() => void) | undefined;
|
|
578
589
|
onMouseLeave?: (() => void) | undefined;
|
|
590
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
579
591
|
}, data: {
|
|
580
592
|
text: string;
|
|
581
593
|
href: string;
|
|
@@ -673,6 +685,7 @@ declare function createApp({
|
|
|
673
685
|
"data-camox-overlay-mode"?: string;
|
|
674
686
|
onMouseEnter?: (() => void) | undefined;
|
|
675
687
|
onMouseLeave?: (() => void) | undefined;
|
|
688
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
676
689
|
}, data: {
|
|
677
690
|
text: string;
|
|
678
691
|
}) => React.ReactNode;
|
|
@@ -700,6 +713,7 @@ declare function createApp({
|
|
|
700
713
|
"data-camox-overlay-mode"?: string;
|
|
701
714
|
onMouseEnter?: (() => void) | undefined;
|
|
702
715
|
onMouseLeave?: (() => void) | undefined;
|
|
716
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
703
717
|
}, data: {
|
|
704
718
|
text: string;
|
|
705
719
|
href: string;
|
package/dist/core/createBlock.js
CHANGED
|
@@ -181,9 +181,9 @@ function createViewBlock(options) {
|
|
|
181
181
|
};
|
|
182
182
|
function useAsset(name) {
|
|
183
183
|
const $ = c(4);
|
|
184
|
-
if ($[0] !== "
|
|
184
|
+
if ($[0] !== "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267") {
|
|
185
185
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
186
|
-
$[0] = "
|
|
186
|
+
$[0] = "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267";
|
|
187
187
|
}
|
|
188
188
|
const block = React.use(Context);
|
|
189
189
|
const item = React.use(RepeaterContext);
|
|
@@ -264,9 +264,9 @@ function createViewBlock(options) {
|
|
|
264
264
|
};
|
|
265
265
|
const ImageList = (props) => {
|
|
266
266
|
const $ = c(3);
|
|
267
|
-
if ($[0] !== "
|
|
267
|
+
if ($[0] !== "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267") {
|
|
268
268
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
269
|
-
$[0] = "
|
|
269
|
+
$[0] = "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267";
|
|
270
270
|
}
|
|
271
271
|
let t0;
|
|
272
272
|
if ($[1] !== props) {
|
|
@@ -281,9 +281,9 @@ function createViewBlock(options) {
|
|
|
281
281
|
};
|
|
282
282
|
const FileList = (props) => {
|
|
283
283
|
const $ = c(3);
|
|
284
|
-
if ($[0] !== "
|
|
284
|
+
if ($[0] !== "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267") {
|
|
285
285
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
286
|
-
$[0] = "
|
|
286
|
+
$[0] = "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267";
|
|
287
287
|
}
|
|
288
288
|
let t0;
|
|
289
289
|
if ($[1] !== props) {
|
|
@@ -344,31 +344,17 @@ function createViewBlock(options) {
|
|
|
344
344
|
});
|
|
345
345
|
};
|
|
346
346
|
const useSetting = (name) => {
|
|
347
|
-
const $ = c(4);
|
|
348
|
-
if ($[0] !== "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3") {
|
|
349
|
-
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
350
|
-
$[0] = "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3";
|
|
351
|
-
}
|
|
352
347
|
const editingRuntime = useBlockEditingRuntime();
|
|
353
|
-
if (editingRuntime)
|
|
354
|
-
let t0;
|
|
355
|
-
if ($[1] !== editingRuntime || $[2] !== name) {
|
|
356
|
-
t0 = editingRuntime.getSetting(options, name);
|
|
357
|
-
$[1] = editingRuntime;
|
|
358
|
-
$[2] = name;
|
|
359
|
-
$[3] = t0;
|
|
360
|
-
} else t0 = $[3];
|
|
361
|
-
return t0;
|
|
362
|
-
}
|
|
348
|
+
if (editingRuntime) return editingRuntime.useSetting(options, name);
|
|
363
349
|
const context = React.use(Context);
|
|
364
350
|
if (!context) throw new Error("useSetting must be used within a Block Component");
|
|
365
351
|
return context.settings[name];
|
|
366
352
|
};
|
|
367
353
|
const Detached = (t0) => {
|
|
368
354
|
const $ = c(6);
|
|
369
|
-
if ($[0] !== "
|
|
355
|
+
if ($[0] !== "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267") {
|
|
370
356
|
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
371
|
-
$[0] = "
|
|
357
|
+
$[0] = "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267";
|
|
372
358
|
}
|
|
373
359
|
const { children } = t0;
|
|
374
360
|
const editingRuntime = useBlockEditingRuntime();
|
|
@@ -398,9 +384,9 @@ function createViewBlock(options) {
|
|
|
398
384
|
};
|
|
399
385
|
const Component = (props) => {
|
|
400
386
|
const $ = c(23);
|
|
401
|
-
if ($[0] !== "
|
|
387
|
+
if ($[0] !== "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267") {
|
|
402
388
|
for (let $i = 0; $i < 23; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
403
|
-
$[0] = "
|
|
389
|
+
$[0] = "2482501ae16e686c6c2d84727ab607bf02513a6bcdd7de7e2f7f973cc1690267";
|
|
404
390
|
}
|
|
405
391
|
const editingRuntime = useBlockEditingRuntime();
|
|
406
392
|
if (editingRuntime) {
|
|
@@ -6,9 +6,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
const BlockEditingRuntimeContext = React.createContext(null);
|
|
7
7
|
function BlockEditingRuntimeProvider(t0) {
|
|
8
8
|
const $ = c(4);
|
|
9
|
-
if ($[0] !== "
|
|
9
|
+
if ($[0] !== "ad4fc9cc5b1b02b16c68794c8ba79d99d7e878328fdbc5bd08fcf7fbaebb83df") {
|
|
10
10
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
11
|
-
$[0] = "
|
|
11
|
+
$[0] = "ad4fc9cc5b1b02b16c68794c8ba79d99d7e878328fdbc5bd08fcf7fbaebb83df";
|
|
12
12
|
}
|
|
13
13
|
const { children, runtime } = t0;
|
|
14
14
|
let t1;
|
|
@@ -25,9 +25,9 @@ function BlockEditingRuntimeProvider(t0) {
|
|
|
25
25
|
}
|
|
26
26
|
function useBlockEditingRuntime() {
|
|
27
27
|
const $ = c(1);
|
|
28
|
-
if ($[0] !== "
|
|
28
|
+
if ($[0] !== "ad4fc9cc5b1b02b16c68794c8ba79d99d7e878328fdbc5bd08fcf7fbaebb83df") {
|
|
29
29
|
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
30
|
-
$[0] = "
|
|
30
|
+
$[0] = "ad4fc9cc5b1b02b16c68794c8ba79d99d7e878328fdbc5bd08fcf7fbaebb83df";
|
|
31
31
|
}
|
|
32
32
|
return React.useContext(BlockEditingRuntimeContext);
|
|
33
33
|
}
|
|
@@ -15,9 +15,9 @@ function getEditableDefinition(options) {
|
|
|
15
15
|
}
|
|
16
16
|
function EditableBlock(t0) {
|
|
17
17
|
const $ = c(6);
|
|
18
|
-
if ($[0] !== "
|
|
18
|
+
if ($[0] !== "e1b3ebcb34bc95f5c457074764df3357687300ade86d161e3e1014255268f87d") {
|
|
19
19
|
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
20
|
-
$[0] = "
|
|
20
|
+
$[0] = "e1b3ebcb34bc95f5c457074764df3357687300ade86d161e3e1014255268f87d";
|
|
21
21
|
}
|
|
22
22
|
const { options, props } = t0;
|
|
23
23
|
let t1;
|
|
@@ -38,7 +38,7 @@ function EditableBlock(t0) {
|
|
|
38
38
|
return t3;
|
|
39
39
|
}
|
|
40
40
|
const completeEditingRuntime = {
|
|
41
|
-
|
|
41
|
+
useSetting(options, name) {
|
|
42
42
|
return getEditableDefinition(options).useSetting(name);
|
|
43
43
|
},
|
|
44
44
|
renderBlock(options, props) {
|
|
@@ -55,9 +55,9 @@ const completeEditingRuntime = {
|
|
|
55
55
|
};
|
|
56
56
|
function CompleteBlockEditingRuntimeProvider(t0) {
|
|
57
57
|
const $ = c(3);
|
|
58
|
-
if ($[0] !== "
|
|
58
|
+
if ($[0] !== "e1b3ebcb34bc95f5c457074764df3357687300ade86d161e3e1014255268f87d") {
|
|
59
59
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
60
|
-
$[0] = "
|
|
60
|
+
$[0] = "e1b3ebcb34bc95f5c457074764df3357687300ade86d161e3e1014255268f87d";
|
|
61
61
|
}
|
|
62
62
|
const { children } = t0;
|
|
63
63
|
let t1;
|
|
@@ -115,9 +115,10 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
115
115
|
children
|
|
116
116
|
}: {
|
|
117
117
|
children: (props: {
|
|
118
|
+
"data-camox-comment-block-id"?: number;
|
|
118
119
|
ref: (element: HTMLElement | null) => void;
|
|
119
120
|
style: React.CSSProperties;
|
|
120
|
-
|
|
121
|
+
onClickCapture: (e: React.MouseEvent) => void;
|
|
121
122
|
onMouseEnter: () => void;
|
|
122
123
|
onMouseLeave: () => void;
|
|
123
124
|
}) => React.ReactNode;
|
|
@@ -171,6 +172,7 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
171
172
|
"data-camox-overlay-mode"?: string;
|
|
172
173
|
onMouseEnter?: () => void;
|
|
173
174
|
onMouseLeave?: () => void;
|
|
175
|
+
onClickCapture?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
174
176
|
}, data: {
|
|
175
177
|
/** Raw markdown source. Use `props.children` for rendered content. */text: string;
|
|
176
178
|
}) => React.ReactNode;
|
|
@@ -260,6 +262,7 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
260
262
|
"data-camox-overlay-mode"?: string;
|
|
261
263
|
onMouseEnter?: () => void;
|
|
262
264
|
onMouseLeave?: () => void;
|
|
265
|
+
onClickCapture?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
263
266
|
}, data: {
|
|
264
267
|
text: string;
|
|
265
268
|
href: string;
|
|
@@ -530,6 +533,7 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
530
533
|
"data-camox-overlay-mode"?: string;
|
|
531
534
|
onMouseEnter?: () => void;
|
|
532
535
|
onMouseLeave?: () => void;
|
|
536
|
+
onClickCapture?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
533
537
|
}, data: {
|
|
534
538
|
/** Raw markdown source. Use `props.children` for rendered content. */text: string;
|
|
535
539
|
}) => React.ReactNode;
|
|
@@ -629,6 +633,7 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
629
633
|
"data-camox-overlay-mode"?: string;
|
|
630
634
|
onMouseEnter?: () => void;
|
|
631
635
|
onMouseLeave?: () => void;
|
|
636
|
+
onClickCapture?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
632
637
|
}, data: {
|
|
633
638
|
text: string;
|
|
634
639
|
href: string;
|
|
@@ -1254,6 +1259,7 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
1254
1259
|
"data-camox-overlay-mode"?: string;
|
|
1255
1260
|
onMouseEnter?: () => void;
|
|
1256
1261
|
onMouseLeave?: () => void;
|
|
1262
|
+
onClickCapture?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
1257
1263
|
}, data: {
|
|
1258
1264
|
/** Raw markdown source. Use `props.children` for rendered content. */text: string;
|
|
1259
1265
|
}) => React.ReactNode;
|
|
@@ -1281,6 +1287,7 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
1281
1287
|
"data-camox-overlay-mode"?: string;
|
|
1282
1288
|
onMouseEnter?: () => void;
|
|
1283
1289
|
onMouseLeave?: () => void;
|
|
1290
|
+
onClickCapture?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
1284
1291
|
}, data: {
|
|
1285
1292
|
text: string;
|
|
1286
1293
|
href: string;
|