camox 0.40.0 → 0.41.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/components/PlatformLabel.js +62 -0
- package/dist/core/components/lexical/GradientNode.js +126 -0
- package/dist/core/components/lexical/InlineLexicalEditor.js +37 -56
- package/dist/core/components/lexical/InlineStylesPlugin.js +183 -0
- package/dist/core/components/lexical/SelectionBroadcaster.js +49 -46
- package/dist/core/components/lexical/SidebarLexicalEditor.js +197 -151
- package/dist/core/components/lexical/editorConfig.js +25 -7
- package/dist/core/components/lexical/selectTextLink.js +21 -0
- package/dist/core/createApp.d.ts +30 -17
- package/dist/core/createApp.js +14 -3
- package/dist/core/createBlock.d.ts +2 -2
- package/dist/core/createBlock.js +18 -15
- package/dist/core/createLayout.d.ts +48 -4
- package/dist/core/createLayout.js +51 -23
- package/dist/core/derivedRoutes.js +36 -0
- package/dist/core/editing/createEditableBlock.d.ts +9 -8
- package/dist/core/editing/createEditableBlock.js +167 -168
- package/dist/core/lib/lexicalReact.d.ts +1 -26
- package/dist/core/lib/lexicalReact.js +46 -60
- package/dist/core/lib/lexicalState.js +164 -81
- package/dist/core/lib/modifierFormats.js +4 -15
- package/dist/core/lib/textStyles.d.ts +27 -0
- package/dist/core/lib/textStyles.js +47 -0
- package/dist/features/navigation/navigation.d.ts +2 -0
- package/dist/features/navigation/navigation.js +51 -46
- package/dist/features/page/DerivedPageContent.js +61 -0
- package/dist/features/page/PublishedPageContent.js +52 -83
- package/dist/features/page/SharedLayoutContent.js +66 -0
- package/dist/features/preview/CamoxPreview.d.ts +16 -1
- package/dist/features/preview/CamoxPreview.js +242 -265
- package/dist/features/preview/DerivedPreview.js +137 -0
- package/dist/features/preview/EditablePageExperience.js +25 -8
- package/dist/features/preview/components/AddBlockSidebar.js +43 -33
- package/dist/features/preview/components/AssetLightbox.js +1 -1
- package/dist/features/preview/components/BlockThumbnail.js +192 -0
- package/dist/features/preview/components/CreatePageModal.js +123 -115
- package/dist/features/preview/components/DerivedLayoutDialog.js +100 -0
- package/dist/features/preview/components/DerivedLayoutSidebar.d.ts +5 -0
- package/dist/features/preview/components/DerivedLayoutSidebar.js +163 -0
- package/dist/features/preview/components/DerivedPageInfoSidebar.js +57 -0
- package/dist/features/preview/components/FieldToolbar.js +42 -20
- package/dist/features/preview/components/Frame.js +133 -140
- package/dist/features/preview/components/LeftSidebar.js +42 -38
- package/dist/features/preview/components/MobilePreviewDrawer.js +4 -4
- package/dist/features/preview/components/Overlays.js +57 -42
- package/dist/features/preview/components/PageInfoSidebar.js +63 -55
- package/dist/features/preview/components/PageNavigatorSidebar.js +34 -483
- package/dist/features/preview/components/PagePicker.js +205 -153
- package/dist/features/preview/components/PageTree.js +298 -206
- package/dist/features/preview/components/PreviewActivation.js +78 -0
- package/dist/features/preview/components/PreviewPanel.js +67 -35
- package/dist/features/preview/components/PreviewToolbar.js +218 -232
- package/dist/features/preview/components/PublicationRow.js +431 -0
- package/dist/features/preview/components/PublishDialog.js +180 -97
- package/dist/features/preview/components/RightSidebar.js +19 -34
- package/dist/features/preview/components/previewStyles.js +8 -0
- package/dist/features/preview/components/useUpdateBlockPosition.js +7 -13
- package/dist/features/preview/previewConstants.js +8 -0
- package/dist/features/preview/previewStore.js +0 -10
- package/dist/features/preview/publication.js +71 -0
- package/dist/features/provider/AuthenticatedCamoxProvider.js +2 -1
- package/dist/features/provider/CoreCamoxProvider.js +11 -2
- package/dist/features/provider/LocalhostPreviewProvider.js +6 -7
- package/dist/features/routes/pageRuntime.d.ts +10 -0
- package/dist/features/routes/pageRuntime.js +7 -9
- package/dist/features/runtime/PreviewDocumentContext.js +7 -0
- package/dist/features/runtime/RuntimeChrome.js +137 -0
- package/dist/features/runtime/SharedChromeContext.js +7 -0
- package/dist/features/runtime/navigationRequest.js +21 -0
- package/dist/features/runtime/navigationTarget.js +23 -0
- package/dist/features/runtime/pageApp.js +196 -121
- package/dist/features/runtime/pageNavigation.js +79 -130
- package/dist/features/runtime/runtime.d.ts +11 -0
- package/dist/features/runtime/runtime.js +183 -47
- package/dist/features/runtime/studioApp.d.ts +2 -11
- package/dist/features/runtime/studioApp.js +14 -177
- package/dist/features/studio/CamoxStudio.js +27 -13
- package/dist/features/studio/components/Navbar.js +80 -74
- package/dist/features/studio/studioTheme.js +25 -0
- package/dist/features/studio/useTheme.js +94 -109
- package/dist/features/vite/appGeneration.js +12 -3
- package/dist/features/vite/definitionsSync.js +4 -2
- package/dist/features/vite/layoutGeneration.js +38 -0
- package/dist/features/vite/runtimeDev.js +3 -1
- package/dist/lib/auth.js +15 -13
- package/dist/lib/normalized-data.js +4 -4
- package/dist/lib/platform.js +13 -0
- package/dist/lib/utils.js +90 -38
- package/dist/studio-overlays.css +5 -40
- package/dist/studio.css +1 -1
- package/package.json +8 -4
- package/skills/camox/SKILL.md +2 -0
- package/skills/camox/references/block-definitions.md +31 -12
- package/skills/camox/references/layout-definitions.md +2 -0
- package/dist/core/lib/modifiers.js +0 -24
- package/dist/features/preview/previewQueryFns.js +0 -23
- package/dist/features/runtime/studioNavigation.js +0 -120
package/dist/core/createApp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmbedURL, FileValue, ImageValue, LinkValue } from "./lib/contentType.js";
|
|
2
|
-
import {
|
|
2
|
+
import { InlineTextStyles } from "./lib/textStyles.js";
|
|
3
3
|
import { BlockComponentProps, PeekItem, RepeatableItemSeed } from "./editing/createEditableBlock.js";
|
|
4
4
|
import { Block } from "./createBlock.js";
|
|
5
5
|
import { Layout, LayoutBlockData, OgImageParams } from "./createLayout.js";
|
|
@@ -30,11 +30,11 @@ declare function createApp({
|
|
|
30
30
|
}) => React.JSX.Element;
|
|
31
31
|
Field: <K extends never>({
|
|
32
32
|
name,
|
|
33
|
-
|
|
33
|
+
textStyle,
|
|
34
|
+
linkStyle,
|
|
34
35
|
children
|
|
35
|
-
}: {
|
|
36
|
+
}: InlineTextStyles & {
|
|
36
37
|
name: K;
|
|
37
|
-
components?: MarkdownInlineComponents;
|
|
38
38
|
children: (props: {
|
|
39
39
|
children: React.ReactNode;
|
|
40
40
|
} & {
|
|
@@ -136,9 +136,8 @@ declare function createApp({
|
|
|
136
136
|
}: {
|
|
137
137
|
name: K;
|
|
138
138
|
children: (item: {
|
|
139
|
-
Field: <F extends keyof { [F_1 in keyof ({}[K] extends (infer U)[] ? U : never) as ({}[K] extends (infer U)[] ? U : never)[F_1] extends string ? F_1 : never]: ({}[K] extends (infer U)[] ? U : never)[F_1] }>(props: {
|
|
139
|
+
Field: <F extends keyof { [F_1 in keyof ({}[K] extends (infer U)[] ? U : never) as ({}[K] extends (infer U)[] ? U : never)[F_1] extends string ? F_1 : never]: ({}[K] extends (infer U)[] ? U : never)[F_1] }>(props: InlineTextStyles & {
|
|
140
140
|
name: F;
|
|
141
|
-
components?: MarkdownInlineComponents;
|
|
142
141
|
children: (props: {
|
|
143
142
|
children: React.ReactNode;
|
|
144
143
|
} & {
|
|
@@ -261,9 +260,8 @@ declare function createApp({
|
|
|
261
260
|
Repeater: <F extends keyof { [F_1 in keyof ({}[K] extends (infer U)[] ? U : never) as ({}[K] extends (infer U)[] ? U : never)[F_1] extends (infer U_1)[] ? ImageValue extends U_1 ? never : FileValue extends U_1 ? never : F_1 : never]: ({}[K] extends (infer U)[] ? U : never)[F_1] }>(props: {
|
|
262
261
|
name: F;
|
|
263
262
|
children: (item: {
|
|
264
|
-
Field: (props: {
|
|
263
|
+
Field: (props: InlineTextStyles & {
|
|
265
264
|
name: string;
|
|
266
|
-
components?: MarkdownInlineComponents;
|
|
267
265
|
children: (props: {
|
|
268
266
|
children: React.ReactNode;
|
|
269
267
|
} & {
|
|
@@ -386,6 +384,7 @@ declare function createApp({
|
|
|
386
384
|
required: string[];
|
|
387
385
|
} | undefined;
|
|
388
386
|
layoutOnly: boolean;
|
|
387
|
+
synced: boolean;
|
|
389
388
|
getInitialBundle: () => {
|
|
390
389
|
content: Record<string, unknown>;
|
|
391
390
|
settings: {
|
|
@@ -432,11 +431,11 @@ declare function createApp({
|
|
|
432
431
|
}) => React.JSX.Element;
|
|
433
432
|
Field: <K extends never>({
|
|
434
433
|
name,
|
|
435
|
-
|
|
434
|
+
textStyle,
|
|
435
|
+
linkStyle,
|
|
436
436
|
children
|
|
437
|
-
}: {
|
|
437
|
+
}: InlineTextStyles & {
|
|
438
438
|
name: K;
|
|
439
|
-
components?: MarkdownInlineComponents;
|
|
440
439
|
children: (props: {
|
|
441
440
|
children: React.ReactNode;
|
|
442
441
|
} & {
|
|
@@ -538,9 +537,8 @@ declare function createApp({
|
|
|
538
537
|
}: {
|
|
539
538
|
name: K;
|
|
540
539
|
children: (item: {
|
|
541
|
-
Field: <F extends keyof { [F_1 in keyof ({}[K] extends (infer U)[] ? U : never) as ({}[K] extends (infer U)[] ? U : never)[F_1] extends string ? F_1 : never]: ({}[K] extends (infer U)[] ? U : never)[F_1] }>(props: {
|
|
540
|
+
Field: <F extends keyof { [F_1 in keyof ({}[K] extends (infer U)[] ? U : never) as ({}[K] extends (infer U)[] ? U : never)[F_1] extends string ? F_1 : never]: ({}[K] extends (infer U)[] ? U : never)[F_1] }>(props: InlineTextStyles & {
|
|
542
541
|
name: F;
|
|
543
|
-
components?: MarkdownInlineComponents;
|
|
544
542
|
children: (props: {
|
|
545
543
|
children: React.ReactNode;
|
|
546
544
|
} & {
|
|
@@ -663,9 +661,8 @@ declare function createApp({
|
|
|
663
661
|
Repeater: <F extends keyof { [F_1 in keyof ({}[K] extends (infer U)[] ? U : never) as ({}[K] extends (infer U)[] ? U : never)[F_1] extends (infer U_1)[] ? ImageValue extends U_1 ? never : FileValue extends U_1 ? never : F_1 : never]: ({}[K] extends (infer U)[] ? U : never)[F_1] }>(props: {
|
|
664
662
|
name: F;
|
|
665
663
|
children: (item: {
|
|
666
|
-
Field: (props: {
|
|
664
|
+
Field: (props: InlineTextStyles & {
|
|
667
665
|
name: string;
|
|
668
|
-
components?: MarkdownInlineComponents;
|
|
669
666
|
children: (props: {
|
|
670
667
|
children: React.ReactNode;
|
|
671
668
|
} & {
|
|
@@ -788,6 +785,7 @@ declare function createApp({
|
|
|
788
785
|
required: string[];
|
|
789
786
|
} | undefined;
|
|
790
787
|
layoutOnly: boolean;
|
|
788
|
+
synced: boolean;
|
|
791
789
|
getInitialBundle: () => {
|
|
792
790
|
content: Record<string, unknown>;
|
|
793
791
|
settings: {
|
|
@@ -829,8 +827,13 @@ declare function createApp({
|
|
|
829
827
|
(): _$react_jsx_runtime0.JSX.Element;
|
|
830
828
|
displayName: string;
|
|
831
829
|
};
|
|
830
|
+
useData(): unknown;
|
|
832
831
|
_internal: {
|
|
833
832
|
id: string;
|
|
833
|
+
kind: "derived" | "curated";
|
|
834
|
+
loader: ((context: {
|
|
835
|
+
params: Record<string, string>;
|
|
836
|
+
}) => unknown) | undefined;
|
|
834
837
|
title: string;
|
|
835
838
|
description: string;
|
|
836
839
|
buildMetaTitle: (params: {
|
|
@@ -881,10 +884,12 @@ declare function createApp({
|
|
|
881
884
|
}>;
|
|
882
885
|
Provider: ({
|
|
883
886
|
layoutBlocks,
|
|
884
|
-
children
|
|
887
|
+
children,
|
|
888
|
+
data
|
|
885
889
|
}: {
|
|
886
890
|
layoutBlocks: Record<string, LayoutBlockData>;
|
|
887
891
|
children: React.ReactNode;
|
|
892
|
+
data?: unknown;
|
|
888
893
|
}) => _$react_jsx_runtime0.JSX.Element;
|
|
889
894
|
};
|
|
890
895
|
}[];
|
|
@@ -897,8 +902,13 @@ declare function createApp({
|
|
|
897
902
|
(): _$react_jsx_runtime0.JSX.Element;
|
|
898
903
|
displayName: string;
|
|
899
904
|
};
|
|
905
|
+
useData(): unknown;
|
|
900
906
|
_internal: {
|
|
901
907
|
id: string;
|
|
908
|
+
kind: "derived" | "curated";
|
|
909
|
+
loader: ((context: {
|
|
910
|
+
params: Record<string, string>;
|
|
911
|
+
}) => unknown) | undefined;
|
|
902
912
|
title: string;
|
|
903
913
|
description: string;
|
|
904
914
|
buildMetaTitle: (params: {
|
|
@@ -949,10 +959,12 @@ declare function createApp({
|
|
|
949
959
|
}>;
|
|
950
960
|
Provider: ({
|
|
951
961
|
layoutBlocks,
|
|
952
|
-
children
|
|
962
|
+
children,
|
|
963
|
+
data
|
|
953
964
|
}: {
|
|
954
965
|
layoutBlocks: Record<string, LayoutBlockData>;
|
|
955
966
|
children: React.ReactNode;
|
|
967
|
+
data?: unknown;
|
|
956
968
|
}) => _$react_jsx_runtime0.JSX.Element;
|
|
957
969
|
};
|
|
958
970
|
} | undefined;
|
|
@@ -974,6 +986,7 @@ declare function createApp({
|
|
|
974
986
|
required: string[];
|
|
975
987
|
} | undefined;
|
|
976
988
|
layoutOnly: true | undefined;
|
|
989
|
+
synced: boolean;
|
|
977
990
|
}[];
|
|
978
991
|
getSerializableLayoutDefinitions(): {
|
|
979
992
|
layoutId: string;
|
package/dist/core/createApp.js
CHANGED
|
@@ -3,7 +3,17 @@ function createApp({ blocks, layouts = [] }) {
|
|
|
3
3
|
const blocksMap = /* @__PURE__ */ new Map();
|
|
4
4
|
const layoutsMap = /* @__PURE__ */ new Map();
|
|
5
5
|
for (const block of blocks) blocksMap.set(block._internal.id, block);
|
|
6
|
-
|
|
6
|
+
const derivedPatterns = /* @__PURE__ */ new Set();
|
|
7
|
+
for (const layout of layouts) {
|
|
8
|
+
const { id, kind } = layout._internal;
|
|
9
|
+
if (layoutsMap.has(id)) throw new Error(`Duplicate layout: ${id}`);
|
|
10
|
+
if (kind === "derived") {
|
|
11
|
+
const pattern = id.split(".").map((segment) => segment.startsWith("$") ? "$" : segment).join(".");
|
|
12
|
+
if (derivedPatterns.has(pattern)) throw new Error(`Equivalent derived route: ${id}`);
|
|
13
|
+
derivedPatterns.add(pattern);
|
|
14
|
+
}
|
|
15
|
+
layoutsMap.set(id, layout);
|
|
16
|
+
}
|
|
7
17
|
const layoutsWithInitialBlocks = layouts.filter((l) => l._internal.initialBlockBundles);
|
|
8
18
|
if (layoutsWithInitialBlocks.length > 1) {
|
|
9
19
|
const ids = layoutsWithInitialBlocks.map((l) => `"${l._internal.id}"`).join(", ");
|
|
@@ -29,7 +39,8 @@ function createApp({ blocks, layouts = [] }) {
|
|
|
29
39
|
description: block._internal.description,
|
|
30
40
|
contentSchema: block._internal.contentSchema,
|
|
31
41
|
settingsSchema: block._internal.settingsSchema,
|
|
32
|
-
layoutOnly: block._internal.layoutOnly || void 0
|
|
42
|
+
layoutOnly: block._internal.layoutOnly || void 0,
|
|
43
|
+
synced: block._internal.synced
|
|
33
44
|
}));
|
|
34
45
|
},
|
|
35
46
|
getSerializableLayoutDefinitions() {
|
|
@@ -46,7 +57,7 @@ function createApp({ blocks, layouts = [] }) {
|
|
|
46
57
|
blocks: layout._internal.initialBlockBundles,
|
|
47
58
|
hasInitialBlocks: true
|
|
48
59
|
};
|
|
49
|
-
const fallback = layouts
|
|
60
|
+
const fallback = layouts.find((layout) => layout._internal.kind === "curated");
|
|
50
61
|
if (!fallback) return null;
|
|
51
62
|
return {
|
|
52
63
|
layoutId: fallback._internal.id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "./lib/contentType.js";
|
|
2
|
-
import {
|
|
2
|
+
import { InlineStyle, InlineTextStyles, TextLinkStyleData, TextStyleData } from "./lib/textStyles.js";
|
|
3
3
|
import { BlockComponentProps, PeekItem, RepeatableItemSeed, createEditableBlock } from "./editing/createEditableBlock.js";
|
|
4
4
|
|
|
5
5
|
//#region src/core/createBlock.d.ts
|
|
@@ -7,4 +7,4 @@ type EditableCreateBlock = typeof createEditableBlock;
|
|
|
7
7
|
declare const createBlock: EditableCreateBlock;
|
|
8
8
|
type Block = ReturnType<typeof createBlock>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { Block, type BlockComponentProps, type
|
|
10
|
+
export { Block, type BlockComponentProps, type InlineStyle, type InlineTextStyles, type PeekItem, type RepeatableItemSeed, type TextLinkStyleData, type TextStyleData, Type, createBlock };
|
package/dist/core/createBlock.js
CHANGED
|
@@ -122,11 +122,12 @@ function createViewBlock(options) {
|
|
|
122
122
|
if (!block) throw new Error("Field must be used within a Block Component");
|
|
123
123
|
return item ? item.itemContent[name] : block.content[name];
|
|
124
124
|
}
|
|
125
|
-
const Field = ({ name,
|
|
125
|
+
const Field = ({ name, textStyle, linkStyle, children }) => {
|
|
126
126
|
const editingRuntime = useBlockEditingRuntime();
|
|
127
127
|
if (editingRuntime) return editingRuntime.renderPrimitive(options, "Field", {
|
|
128
128
|
name,
|
|
129
|
-
|
|
129
|
+
textStyle,
|
|
130
|
+
linkStyle,
|
|
130
131
|
children
|
|
131
132
|
});
|
|
132
133
|
const value = useValue(name);
|
|
@@ -139,7 +140,8 @@ function createViewBlock(options) {
|
|
|
139
140
|
return children({ children: markdownToReactNodes(value, {
|
|
140
141
|
pages,
|
|
141
142
|
fallbackHref: useLocation({ select: (location) => location.pathname }),
|
|
142
|
-
|
|
143
|
+
textStyle,
|
|
144
|
+
linkStyle
|
|
143
145
|
}) }, { text: value });
|
|
144
146
|
};
|
|
145
147
|
const Embed = ({ name, children }) => {
|
|
@@ -179,9 +181,9 @@ function createViewBlock(options) {
|
|
|
179
181
|
};
|
|
180
182
|
function useAsset(name) {
|
|
181
183
|
const $ = c(4);
|
|
182
|
-
if ($[0] !== "
|
|
184
|
+
if ($[0] !== "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3") {
|
|
183
185
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
184
|
-
$[0] = "
|
|
186
|
+
$[0] = "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3";
|
|
185
187
|
}
|
|
186
188
|
const block = React.use(Context);
|
|
187
189
|
const item = React.use(RepeaterContext);
|
|
@@ -262,9 +264,9 @@ function createViewBlock(options) {
|
|
|
262
264
|
};
|
|
263
265
|
const ImageList = (props) => {
|
|
264
266
|
const $ = c(3);
|
|
265
|
-
if ($[0] !== "
|
|
267
|
+
if ($[0] !== "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3") {
|
|
266
268
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
267
|
-
$[0] = "
|
|
269
|
+
$[0] = "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3";
|
|
268
270
|
}
|
|
269
271
|
let t0;
|
|
270
272
|
if ($[1] !== props) {
|
|
@@ -279,9 +281,9 @@ function createViewBlock(options) {
|
|
|
279
281
|
};
|
|
280
282
|
const FileList = (props) => {
|
|
281
283
|
const $ = c(3);
|
|
282
|
-
if ($[0] !== "
|
|
284
|
+
if ($[0] !== "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3") {
|
|
283
285
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
284
|
-
$[0] = "
|
|
286
|
+
$[0] = "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3";
|
|
285
287
|
}
|
|
286
288
|
let t0;
|
|
287
289
|
if ($[1] !== props) {
|
|
@@ -343,9 +345,9 @@ function createViewBlock(options) {
|
|
|
343
345
|
};
|
|
344
346
|
const useSetting = (name) => {
|
|
345
347
|
const $ = c(4);
|
|
346
|
-
if ($[0] !== "
|
|
348
|
+
if ($[0] !== "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3") {
|
|
347
349
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
348
|
-
$[0] = "
|
|
350
|
+
$[0] = "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3";
|
|
349
351
|
}
|
|
350
352
|
const editingRuntime = useBlockEditingRuntime();
|
|
351
353
|
if (editingRuntime) {
|
|
@@ -364,9 +366,9 @@ function createViewBlock(options) {
|
|
|
364
366
|
};
|
|
365
367
|
const Detached = (t0) => {
|
|
366
368
|
const $ = c(6);
|
|
367
|
-
if ($[0] !== "
|
|
369
|
+
if ($[0] !== "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3") {
|
|
368
370
|
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
369
|
-
$[0] = "
|
|
371
|
+
$[0] = "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3";
|
|
370
372
|
}
|
|
371
373
|
const { children } = t0;
|
|
372
374
|
const editingRuntime = useBlockEditingRuntime();
|
|
@@ -396,9 +398,9 @@ function createViewBlock(options) {
|
|
|
396
398
|
};
|
|
397
399
|
const Component = (props) => {
|
|
398
400
|
const $ = c(23);
|
|
399
|
-
if ($[0] !== "
|
|
401
|
+
if ($[0] !== "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3") {
|
|
400
402
|
for (let $i = 0; $i < 23; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
401
|
-
$[0] = "
|
|
403
|
+
$[0] = "75b083abefddb3e9610b3a45ef442367d595801379ab6452fc843eed4f8c22a3";
|
|
402
404
|
}
|
|
403
405
|
const editingRuntime = useBlockEditingRuntime();
|
|
404
406
|
if (editingRuntime) {
|
|
@@ -547,6 +549,7 @@ function createViewBlock(options) {
|
|
|
547
549
|
contentSchema,
|
|
548
550
|
settingsSchema,
|
|
549
551
|
layoutOnly: options.layoutOnly ?? false,
|
|
552
|
+
synced: options.synced ?? false,
|
|
550
553
|
getInitialBundle,
|
|
551
554
|
getInitialContent: () => {
|
|
552
555
|
const content = { ...contentDefaults };
|
|
@@ -51,6 +51,10 @@ type ValidateLayoutOnlyBlocks<T extends readonly LayoutBlock[]> = { [K in keyof
|
|
|
51
51
|
type ValidatePageContentBlocks<T extends readonly LayoutBlock[]> = { [K in keyof T]: T[K] extends LayoutBlock<true> ? "❌ Camox: blocks in `blocks.initial` must NOT be `layoutOnly: true` — `initial` is for page-content blocks. Remove `layoutOnly: true` from this block's `createBlock` options." : T[K] };
|
|
52
52
|
interface CreateLayoutOptions<TBefore extends readonly LayoutBlock[], TAfter extends readonly LayoutBlock[], TInitial extends readonly LayoutBlock[]> {
|
|
53
53
|
id: string;
|
|
54
|
+
kind?: "curated" | "derived";
|
|
55
|
+
loader?: (context: {
|
|
56
|
+
params: Record<string, string>;
|
|
57
|
+
}) => unknown;
|
|
54
58
|
title: string;
|
|
55
59
|
description: string;
|
|
56
60
|
blocks: {
|
|
@@ -68,7 +72,7 @@ interface CreateLayoutOptions<TBefore extends readonly LayoutBlock[], TAfter ext
|
|
|
68
72
|
}) => string;
|
|
69
73
|
buildOgImage?: (params: OgImageParams) => React.ReactElement;
|
|
70
74
|
}
|
|
71
|
-
declare function
|
|
75
|
+
declare function createLayoutDefinition<const TBefore extends readonly LayoutBlock[], const TAfter extends readonly LayoutBlock[], const TInitial extends readonly LayoutBlock[] = []>(options: CreateLayoutOptions<TBefore, TAfter, TInitial>): {
|
|
72
76
|
BeforeBlocks: {
|
|
73
77
|
(): _$react_jsx_runtime0.JSX.Element;
|
|
74
78
|
displayName: string;
|
|
@@ -77,8 +81,13 @@ declare function createLayout<const TBefore extends readonly LayoutBlock[], cons
|
|
|
77
81
|
(): _$react_jsx_runtime0.JSX.Element;
|
|
78
82
|
displayName: string;
|
|
79
83
|
};
|
|
84
|
+
useData(): unknown;
|
|
80
85
|
_internal: {
|
|
81
86
|
id: string;
|
|
87
|
+
kind: "derived" | "curated";
|
|
88
|
+
loader: ((context: {
|
|
89
|
+
params: Record<string, string>;
|
|
90
|
+
}) => unknown) | undefined;
|
|
82
91
|
title: string;
|
|
83
92
|
description: string;
|
|
84
93
|
buildMetaTitle: (params: {
|
|
@@ -129,13 +138,48 @@ declare function createLayout<const TBefore extends readonly LayoutBlock[], cons
|
|
|
129
138
|
}>;
|
|
130
139
|
Provider: ({
|
|
131
140
|
layoutBlocks,
|
|
132
|
-
children
|
|
141
|
+
children,
|
|
142
|
+
data
|
|
133
143
|
}: {
|
|
134
144
|
layoutBlocks: Record<string, LayoutBlockData>;
|
|
135
145
|
children: React.ReactNode;
|
|
146
|
+
data?: unknown;
|
|
136
147
|
}) => _$react_jsx_runtime0.JSX.Element;
|
|
137
148
|
};
|
|
138
149
|
};
|
|
139
|
-
type Layout = ReturnType<typeof
|
|
150
|
+
type Layout = ReturnType<typeof createLayoutDefinition>;
|
|
151
|
+
interface LayoutFileRoutes {}
|
|
152
|
+
type Params<Id extends string> = Id extends `${infer Head}.${infer Tail}` ? Params<Head> & Params<Tail> : Id extends `$${infer Name}` ? { [K in Name]: string } : {};
|
|
153
|
+
type FileOptions<Id extends string, Data, B extends readonly LayoutBlock[], A extends readonly LayoutBlock[], I extends readonly LayoutBlock[]> = Omit<CreateLayoutOptions<B, A, I>, "id" | "kind" | "loader" | "component"> & ({
|
|
154
|
+
kind: "curated";
|
|
155
|
+
component: React.ComponentType<{
|
|
156
|
+
children: React.ReactNode;
|
|
157
|
+
}>;
|
|
158
|
+
loader?: never;
|
|
159
|
+
} | {
|
|
160
|
+
kind: "derived";
|
|
161
|
+
blocks: {
|
|
162
|
+
before: ValidateLayoutOnlyBlocks<B>;
|
|
163
|
+
after: ValidateLayoutOnlyBlocks<A>;
|
|
164
|
+
initial?: never;
|
|
165
|
+
};
|
|
166
|
+
loader: (context: {
|
|
167
|
+
params: Id extends keyof LayoutFileRoutes ? LayoutFileRoutes[Id] extends {
|
|
168
|
+
params: infer P;
|
|
169
|
+
} ? P : Params<Id> : Params<Id>;
|
|
170
|
+
}) => Data;
|
|
171
|
+
component: React.ComponentType<{
|
|
172
|
+
children?: never;
|
|
173
|
+
}>;
|
|
174
|
+
});
|
|
175
|
+
declare function createLayout<const Id extends string>(id: Id): <Data, const B extends readonly LayoutBlock[], const A extends readonly LayoutBlock[], const I extends readonly LayoutBlock[] = []>(options: FileOptions<Id, Data, B, A, I>) => Omit<Layout, "useData"> & {
|
|
176
|
+
useData: () => Awaited<Data>;
|
|
177
|
+
};
|
|
178
|
+
declare function createLayout<const B extends readonly LayoutBlock[], const A extends readonly LayoutBlock[], const I extends readonly LayoutBlock[] = []>(options: CreateLayoutOptions<B, A, I>): Layout;
|
|
179
|
+
/** Signal a missing derived page; other loader failures remain server errors. */
|
|
180
|
+
declare function notFound(): Error & {
|
|
181
|
+
status: number;
|
|
182
|
+
code: string;
|
|
183
|
+
};
|
|
140
184
|
//#endregion
|
|
141
|
-
export { Layout, LayoutBlockData, OgImageParams, createLayout };
|
|
185
|
+
export { Layout, LayoutBlockData, LayoutFileRoutes, OgImageParams, createLayout, notFound };
|
|
@@ -4,16 +4,16 @@ import * as React from "react";
|
|
|
4
4
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/core/createLayout.tsx
|
|
7
|
-
function
|
|
7
|
+
function createLayoutDefinition(options) {
|
|
8
8
|
const LayoutContext = React.createContext(null);
|
|
9
9
|
const beforeBlocks = options.blocks.before;
|
|
10
10
|
const afterBlocks = options.blocks.after;
|
|
11
11
|
const initialBlocks = options.blocks.initial;
|
|
12
12
|
const BeforeBlocks = () => {
|
|
13
13
|
const $ = c(5);
|
|
14
|
-
if ($[0] !== "
|
|
14
|
+
if ($[0] !== "2ae925f72331cad3d35d77334ec5712b5849211fd0dcab4e27af95282e583b7a") {
|
|
15
15
|
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
16
|
-
$[0] = "
|
|
16
|
+
$[0] = "2ae925f72331cad3d35d77334ec5712b5849211fd0dcab4e27af95282e583b7a";
|
|
17
17
|
}
|
|
18
18
|
const ctx = React.use(LayoutContext);
|
|
19
19
|
if (!ctx) throw new Error(`Layout "${options.id}" BeforeBlocks must be rendered inside its Provider`);
|
|
@@ -29,7 +29,7 @@ function createLayout(options) {
|
|
|
29
29
|
children: /* @__PURE__ */ jsx(block._internal.Component, {
|
|
30
30
|
blockData,
|
|
31
31
|
mode: "layout",
|
|
32
|
-
showAddBlockBottom: isLastBefore || void 0,
|
|
32
|
+
showAddBlockBottom: options.kind !== "derived" && isLastBefore || void 0,
|
|
33
33
|
addBlockAfterPosition: isLastBefore ? "" : void 0
|
|
34
34
|
})
|
|
35
35
|
}, block._internal.id);
|
|
@@ -48,9 +48,9 @@ function createLayout(options) {
|
|
|
48
48
|
BeforeBlocks.displayName = `LayoutBeforeBlocks(${options.id})`;
|
|
49
49
|
const AfterBlocks = () => {
|
|
50
50
|
const $ = c(5);
|
|
51
|
-
if ($[0] !== "
|
|
51
|
+
if ($[0] !== "2ae925f72331cad3d35d77334ec5712b5849211fd0dcab4e27af95282e583b7a") {
|
|
52
52
|
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
53
|
-
$[0] = "
|
|
53
|
+
$[0] = "2ae925f72331cad3d35d77334ec5712b5849211fd0dcab4e27af95282e583b7a";
|
|
54
54
|
}
|
|
55
55
|
const ctx = React.use(LayoutContext);
|
|
56
56
|
if (!ctx) throw new Error(`Layout "${options.id}" AfterBlocks must be rendered inside its Provider`);
|
|
@@ -66,7 +66,7 @@ function createLayout(options) {
|
|
|
66
66
|
children: /* @__PURE__ */ jsx(block._internal.Component, {
|
|
67
67
|
blockData,
|
|
68
68
|
mode: "layout",
|
|
69
|
-
showAddBlockTop: isFirstAfter || void 0,
|
|
69
|
+
showAddBlockTop: options.kind !== "derived" && isFirstAfter || void 0,
|
|
70
70
|
addBlockAfterPosition: isFirstAfter ? null : void 0
|
|
71
71
|
})
|
|
72
72
|
}, block._internal.id);
|
|
@@ -84,29 +84,33 @@ function createLayout(options) {
|
|
|
84
84
|
};
|
|
85
85
|
AfterBlocks.displayName = `LayoutAfterBlocks(${options.id})`;
|
|
86
86
|
const Provider = (t0) => {
|
|
87
|
-
const $ = c(
|
|
88
|
-
if ($[0] !== "
|
|
89
|
-
for (let $i = 0; $i <
|
|
90
|
-
$[0] = "
|
|
87
|
+
const $ = c(7);
|
|
88
|
+
if ($[0] !== "2ae925f72331cad3d35d77334ec5712b5849211fd0dcab4e27af95282e583b7a") {
|
|
89
|
+
for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
90
|
+
$[0] = "2ae925f72331cad3d35d77334ec5712b5849211fd0dcab4e27af95282e583b7a";
|
|
91
91
|
}
|
|
92
|
-
const { layoutBlocks, children } = t0;
|
|
92
|
+
const { layoutBlocks, children, data } = t0;
|
|
93
93
|
let t1;
|
|
94
|
-
if ($[1] !== layoutBlocks) {
|
|
95
|
-
t1 = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
if ($[1] !== data || $[2] !== layoutBlocks) {
|
|
95
|
+
t1 = {
|
|
96
|
+
layoutBlocks,
|
|
97
|
+
data
|
|
98
|
+
};
|
|
99
|
+
$[1] = data;
|
|
100
|
+
$[2] = layoutBlocks;
|
|
101
|
+
$[3] = t1;
|
|
102
|
+
} else t1 = $[3];
|
|
99
103
|
const value = t1;
|
|
100
104
|
let t2;
|
|
101
|
-
if ($[
|
|
105
|
+
if ($[4] !== children || $[5] !== value) {
|
|
102
106
|
t2 = /* @__PURE__ */ jsx(LayoutContext.Provider, {
|
|
103
107
|
value,
|
|
104
108
|
children
|
|
105
109
|
});
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
109
|
-
} else t2 = $[
|
|
110
|
+
$[4] = children;
|
|
111
|
+
$[5] = value;
|
|
112
|
+
$[6] = t2;
|
|
113
|
+
} else t2 = $[6];
|
|
110
114
|
return t2;
|
|
111
115
|
};
|
|
112
116
|
const blockDefinitions = [...beforeBlocks.map((block) => {
|
|
@@ -147,8 +151,15 @@ function createLayout(options) {
|
|
|
147
151
|
return {
|
|
148
152
|
BeforeBlocks,
|
|
149
153
|
AfterBlocks,
|
|
154
|
+
useData() {
|
|
155
|
+
const context = React.use(LayoutContext);
|
|
156
|
+
if (!context) throw new Error(`Layout "${options.id}" useData must be rendered inside its Provider`);
|
|
157
|
+
return context.data;
|
|
158
|
+
},
|
|
150
159
|
_internal: {
|
|
151
160
|
id: options.id,
|
|
161
|
+
kind: options.kind ?? "curated",
|
|
162
|
+
loader: options.loader,
|
|
152
163
|
title: options.title,
|
|
153
164
|
description: options.description,
|
|
154
165
|
buildMetaTitle: options.buildMetaTitle,
|
|
@@ -160,6 +171,23 @@ function createLayout(options) {
|
|
|
160
171
|
}
|
|
161
172
|
};
|
|
162
173
|
}
|
|
174
|
+
function createLayout(idOrOptions) {
|
|
175
|
+
if (typeof idOrOptions !== "string") return createLayoutDefinition(idOrOptions);
|
|
176
|
+
return (options) => {
|
|
177
|
+
if (options.kind === "derived" && options.blocks.initial) throw new Error("Derived layouts cannot define initial page blocks");
|
|
178
|
+
return createLayoutDefinition({
|
|
179
|
+
...options,
|
|
180
|
+
id: idOrOptions
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
/** Signal a missing derived page; other loader failures remain server errors. */
|
|
185
|
+
function notFound() {
|
|
186
|
+
return Object.assign(/* @__PURE__ */ new Error("Page not found"), {
|
|
187
|
+
status: 404,
|
|
188
|
+
code: "NOT_FOUND"
|
|
189
|
+
});
|
|
190
|
+
}
|
|
163
191
|
|
|
164
192
|
//#endregion
|
|
165
|
-
export { createLayout };
|
|
193
|
+
export { createLayout, notFound };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/core/derivedRoutes.ts
|
|
2
|
+
function routeSegments(id) {
|
|
3
|
+
return id.split(".");
|
|
4
|
+
}
|
|
5
|
+
function matchDerivedLayout(layouts, pathname) {
|
|
6
|
+
const path = pathname.replace(/^\/|\/$/g, "").split("/");
|
|
7
|
+
const candidates = layouts.filter((layout) => layout._internal.kind === "derived").sort((a, b) => routeSegments(a._internal.id).filter((s) => s.startsWith("$")).length - routeSegments(b._internal.id).filter((s) => s.startsWith("$")).length);
|
|
8
|
+
for (const layout of candidates) {
|
|
9
|
+
const segments = routeSegments(layout._internal.id);
|
|
10
|
+
if (segments.length !== path.length) continue;
|
|
11
|
+
const params = {};
|
|
12
|
+
let matches = true;
|
|
13
|
+
for (const [index, segment] of segments.entries()) {
|
|
14
|
+
let value;
|
|
15
|
+
try {
|
|
16
|
+
value = decodeURIComponent(path[index]);
|
|
17
|
+
} catch {
|
|
18
|
+
matches = false;
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
if (segment.startsWith("$") && value && !value.includes("/")) params[segment.slice(1)] = value;
|
|
22
|
+
else if (segment !== value) {
|
|
23
|
+
matches = false;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (matches) return {
|
|
28
|
+
layout,
|
|
29
|
+
params
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { matchDerivedLayout, routeSegments };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmbedURL, FileValue, ImageValue, ItemSettingsBrand, LinkValue, ToMarkdownBuilder, Type as Type$1 } from "../lib/contentType.js";
|
|
2
|
-
import {
|
|
2
|
+
import { InlineStyle, InlineTextStyles, TextLinkStyleData, TextStyleData } from "../lib/textStyles.js";
|
|
3
3
|
import * as _$_sinclair_typebox0 from "@sinclair/typebox";
|
|
4
4
|
import { Static, TSchema, Type } from "@sinclair/typebox";
|
|
5
5
|
import * as React from "react";
|
|
@@ -51,6 +51,8 @@ interface CreateBlockOptions<TSchemaShape extends Record<string, TSchema> = Reco
|
|
|
51
51
|
* or be available for AI page generation.
|
|
52
52
|
*/
|
|
53
53
|
layoutOnly?: TLayoutOnly;
|
|
54
|
+
/** Share content and settings across all instances of this type. Defaults to false. */
|
|
55
|
+
synced?: boolean;
|
|
54
56
|
/**
|
|
55
57
|
* React component that renders the block.
|
|
56
58
|
* Must be defined as a separate function (not inline, not an arrow function).
|
|
@@ -154,11 +156,11 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
154
156
|
params: unknown[] & [];
|
|
155
157
|
})["static"] }, Exclude<keyof TSchemaShape, { [K_2 in keyof TSchemaShape]: TSchemaShape[K_2] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_2] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_2]> ? K_2 : never : never }[keyof TSchemaShape] | { [K_3 in keyof TSchemaShape]: TSchemaShape[K_3] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_3] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_3]> ? never : K_3 : never }[keyof TSchemaShape] | { [K_4 in keyof TSchemaShape]: TSchemaShape[K_4] extends _$_sinclair_typebox0.TOptional<TSchema> ? TSchemaShape[K_4] extends _$_sinclair_typebox0.TReadonly<TSchemaShape[K_4]> ? never : K_4 : never }[keyof TSchemaShape]>>>>[K_5] }>({
|
|
156
158
|
name,
|
|
157
|
-
|
|
159
|
+
textStyle,
|
|
160
|
+
linkStyle,
|
|
158
161
|
children
|
|
159
|
-
}: {
|
|
162
|
+
}: InlineTextStyles & {
|
|
160
163
|
name: K;
|
|
161
|
-
components?: MarkdownInlineComponents;
|
|
162
164
|
children: (props: {
|
|
163
165
|
children: React.ReactNode;
|
|
164
166
|
} & {
|
|
@@ -516,9 +518,8 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
516
518
|
params: unknown[] & [];
|
|
517
519
|
})["static"] }, { [K_4 in keyof TSchemaShape]: TSchemaShape[K_4] extends _$_sinclair_typebox0.TOptional<TSchema> ? TSchemaShape[K_4] extends _$_sinclair_typebox0.TReadonly<TSchemaShape[K_4]> ? never : K_4 : never }[keyof TSchemaShape]>> & Required<Pick<{ [K_1 in keyof TSchemaShape]: (TSchemaShape[K_1] & {
|
|
518
520
|
params: unknown[] & [];
|
|
519
|
-
})["static"] }, Exclude<keyof TSchemaShape, { [K_2 in keyof TSchemaShape]: TSchemaShape[K_2] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_2] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_2]> ? K_2 : never : never }[keyof TSchemaShape] | { [K_3 in keyof TSchemaShape]: TSchemaShape[K_3] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_3] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_3]> ? never : K_3 : never }[keyof TSchemaShape] | { [K_4 in keyof TSchemaShape]: TSchemaShape[K_4] extends _$_sinclair_typebox0.TOptional<TSchema> ? TSchemaShape[K_4] extends _$_sinclair_typebox0.TReadonly<TSchemaShape[K_4]> ? never : K_4 : never }[keyof TSchemaShape]>>>>[K_5] }[K] extends (infer U)[] ? U : never)[F_1] }>(props: {
|
|
521
|
+
})["static"] }, Exclude<keyof TSchemaShape, { [K_2 in keyof TSchemaShape]: TSchemaShape[K_2] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_2] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_2]> ? K_2 : never : never }[keyof TSchemaShape] | { [K_3 in keyof TSchemaShape]: TSchemaShape[K_3] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_3] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_3]> ? never : K_3 : never }[keyof TSchemaShape] | { [K_4 in keyof TSchemaShape]: TSchemaShape[K_4] extends _$_sinclair_typebox0.TOptional<TSchema> ? TSchemaShape[K_4] extends _$_sinclair_typebox0.TReadonly<TSchemaShape[K_4]> ? never : K_4 : never }[keyof TSchemaShape]>>>>[K_5] }[K] extends (infer U)[] ? U : never)[F_1] }>(props: InlineTextStyles & {
|
|
520
522
|
name: F;
|
|
521
|
-
components?: MarkdownInlineComponents;
|
|
522
523
|
children: (props: {
|
|
523
524
|
children: React.ReactNode;
|
|
524
525
|
} & {
|
|
@@ -1241,9 +1242,8 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
1241
1242
|
})["static"] }, Exclude<keyof TSchemaShape, { [K_2 in keyof TSchemaShape]: TSchemaShape[K_2] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_2] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_2]> ? K_2 : never : never }[keyof TSchemaShape] | { [K_3 in keyof TSchemaShape]: TSchemaShape[K_3] extends _$_sinclair_typebox0.TReadonly<TSchema> ? TSchemaShape[K_3] extends _$_sinclair_typebox0.TOptional<TSchemaShape[K_3]> ? never : K_3 : never }[keyof TSchemaShape] | { [K_4 in keyof TSchemaShape]: TSchemaShape[K_4] extends _$_sinclair_typebox0.TOptional<TSchema> ? TSchemaShape[K_4] extends _$_sinclair_typebox0.TReadonly<TSchemaShape[K_4]> ? never : K_4 : never }[keyof TSchemaShape]>>>>[K_5] }[K] extends (infer U)[] ? U : never)[F_1] }>(props: {
|
|
1242
1243
|
name: F;
|
|
1243
1244
|
children: (item: {
|
|
1244
|
-
Field: (props: {
|
|
1245
|
+
Field: (props: InlineTextStyles & {
|
|
1245
1246
|
name: string;
|
|
1246
|
-
components?: MarkdownInlineComponents;
|
|
1247
1247
|
children: (props: {
|
|
1248
1248
|
children: React.ReactNode;
|
|
1249
1249
|
} & {
|
|
@@ -1413,6 +1413,7 @@ declare function createEditableBlock<TSchemaShape extends Record<string, TSchema
|
|
|
1413
1413
|
required: string[];
|
|
1414
1414
|
} | undefined;
|
|
1415
1415
|
layoutOnly: TLayoutOnly;
|
|
1416
|
+
synced: boolean;
|
|
1416
1417
|
getInitialBundle: () => {
|
|
1417
1418
|
content: Record<string, unknown>;
|
|
1418
1419
|
settings: {
|