camox 0.41.0 → 0.41.1
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/createApp.d.ts +2 -2
- package/dist/core/createBlock.js +11 -25
- package/dist/core/createLayout.d.ts +1 -1
- package/dist/core/editing/BlockEditingRuntime.js +4 -4
- package/dist/core/editing/CompleteBlockEditingRuntime.js +5 -5
- package/dist/core/editing/createEditableBlock.js +169 -306
- package/dist/core/hooks/useIsEditable.js +4 -7
- package/dist/core/hooks/useRequireDraftSource.js +7 -11
- package/dist/features/preview/CamoxPreview.js +59 -80
- package/dist/features/preview/DerivedPreview.js +6 -9
- package/dist/features/preview/components/BlockActionsPopover.js +8 -8
- package/dist/features/preview/components/DerivedLayoutSidebar.js +4 -7
- package/dist/features/preview/components/LinkFieldEditor.js +3 -4
- package/dist/features/preview/components/MobilePreviewDrawer.js +3 -3
- package/dist/features/preview/components/Overlays.js +6 -9
- package/dist/features/preview/components/PageEditorSidebar.js +194 -203
- package/dist/features/preview/components/PageTree.js +162 -228
- package/dist/features/preview/components/PreviewPanel.js +39 -41
- package/dist/features/preview/components/PreviewToolbar.js +15 -18
- package/dist/features/preview/components/PreviewToolbarSpacer.js +43 -0
- package/dist/features/preview/components/PublicationRow.js +11 -17
- package/dist/features/preview/previewStore.js +18 -29
- package/dist/features/provider/useAdminShortcuts.js +5 -4
- package/dist/features/runtime/RuntimeChrome.js +98 -86
- package/dist/features/studio/components/UserButton.js +4 -4
- package/package.json +4 -4
- package/dist/features/preview/components/DraftSwitchDialog.js +0 -66
package/dist/core/createApp.d.ts
CHANGED
|
@@ -830,7 +830,7 @@ declare function createApp({
|
|
|
830
830
|
useData(): unknown;
|
|
831
831
|
_internal: {
|
|
832
832
|
id: string;
|
|
833
|
-
kind: "
|
|
833
|
+
kind: "curated" | "derived";
|
|
834
834
|
loader: ((context: {
|
|
835
835
|
params: Record<string, string>;
|
|
836
836
|
}) => unknown) | undefined;
|
|
@@ -905,7 +905,7 @@ declare function createApp({
|
|
|
905
905
|
useData(): unknown;
|
|
906
906
|
_internal: {
|
|
907
907
|
id: string;
|
|
908
|
-
kind: "
|
|
908
|
+
kind: "curated" | "derived";
|
|
909
909
|
loader: ((context: {
|
|
910
910
|
params: Record<string, string>;
|
|
911
911
|
}) => unknown) | undefined;
|
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) {
|
|
@@ -84,7 +84,7 @@ declare function createLayoutDefinition<const TBefore extends readonly LayoutBlo
|
|
|
84
84
|
useData(): unknown;
|
|
85
85
|
_internal: {
|
|
86
86
|
id: string;
|
|
87
|
-
kind: "
|
|
87
|
+
kind: "curated" | "derived";
|
|
88
88
|
loader: ((context: {
|
|
89
89
|
params: Record<string, string>;
|
|
90
90
|
}) => unknown) | undefined;
|
|
@@ -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;
|