camox 0.40.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/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 +17 -28
- 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/BlockEditingRuntime.js +4 -4
- package/dist/core/editing/CompleteBlockEditingRuntime.js +5 -5
- package/dist/core/editing/createEditableBlock.d.ts +9 -8
- package/dist/core/editing/createEditableBlock.js +265 -403
- package/dist/core/hooks/useIsEditable.js +4 -7
- package/dist/core/hooks/useRequireDraftSource.js +7 -11
- 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 +246 -290
- package/dist/features/preview/DerivedPreview.js +134 -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/BlockActionsPopover.js +8 -8
- 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 +160 -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/LinkFieldEditor.js +3 -4
- package/dist/features/preview/components/MobilePreviewDrawer.js +4 -4
- package/dist/features/preview/components/Overlays.js +59 -47
- package/dist/features/preview/components/PageEditorSidebar.js +194 -203
- 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 +366 -340
- package/dist/features/preview/components/PreviewActivation.js +78 -0
- package/dist/features/preview/components/PreviewPanel.js +98 -68
- package/dist/features/preview/components/PreviewToolbar.js +224 -241
- package/dist/features/preview/components/PreviewToolbarSpacer.js +43 -0
- package/dist/features/preview/components/PublicationRow.js +425 -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 +18 -39
- 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/provider/useAdminShortcuts.js +5 -4
- 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 +149 -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/components/UserButton.js +4 -4
- 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/components/DraftSwitchDialog.js +0 -66
- package/dist/features/preview/previewQueryFns.js +0 -23
- package/dist/features/runtime/studioNavigation.js +0 -120
|
@@ -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: {
|