camox 0.7.0 → 0.7.2
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/AuthGate.js +3 -1
- package/dist/core/components/AddBlockControlBar.js +4 -2
- package/dist/core/components/lexical/InlineContentEditable.js +4 -2
- package/dist/core/components/lexical/InlineLexicalEditor.js +3 -1
- package/dist/core/components/lexical/InlineParagraphNode.js +3 -1
- package/dist/core/components/lexical/SelectionBroadcaster.js +3 -1
- package/dist/core/components/lexical/SidebarLexicalEditor.js +3 -1
- package/dist/core/components/lexical/editorConfig.js +3 -1
- package/dist/core/createApp.d.ts +760 -691
- package/dist/core/createApp.js +2 -1
- package/dist/core/createBlock.d.ts +1027 -1001
- package/dist/core/createBlock.js +6 -4
- package/dist/core/createLayout.d.ts +111 -105
- package/dist/core/createLayout.js +3 -1
- package/dist/core/hooks/useFieldSelection.js +3 -1
- package/dist/core/hooks/useIsEditable.js +3 -1
- package/dist/core/hooks/useOverlayMessage.js +3 -1
- package/dist/core/lib/contentType.d.ts +141 -138
- package/dist/core/lib/contentType.js +4 -2
- package/dist/core/lib/fieldTypes.js +4 -2
- package/dist/core/lib/lexicalReact.js +3 -1
- package/dist/core/lib/lexicalState.js +3 -1
- package/dist/core/lib/modifierFormats.js +4 -3
- package/dist/core/lib/modifiers.js +5 -3
- package/dist/features/content/CamoxContent.d.ts +6 -2
- package/dist/features/content/CamoxContent.js +4 -2
- package/dist/features/content/components/AssetCard.js +4 -2
- package/dist/features/content/components/AssetCardSkeleton.js +4 -2
- package/dist/features/content/components/ContentSidebar.js +4 -2
- package/dist/features/content/components/UploadDropZone.js +3 -1
- package/dist/features/content/components/UploadProgressDrawer.js +3 -1
- package/dist/features/metadata/sitemap.d.ts +7 -5
- package/dist/features/metadata/sitemap.js +3 -1
- package/dist/features/preview/CamoxPreview.d.ts +35 -29
- package/dist/features/preview/CamoxPreview.js +7 -5
- package/dist/features/preview/components/AddBlockSheet.js +5 -3
- package/dist/features/preview/components/AgentChatSheet.js +4 -2
- package/dist/features/preview/components/AssetFieldEditor.js +5 -3
- package/dist/features/preview/components/AssetLightbox.js +4 -2
- package/dist/features/preview/components/AssetPickerGrid.js +4 -2
- package/dist/features/preview/components/BlockActionsPopover.js +4 -2
- package/dist/features/preview/components/CreatePageSheet.js +4 -2
- package/dist/features/preview/components/DebouncedFieldEditor.js +4 -2
- package/dist/features/preview/components/EditPageSheet.js +8 -6
- package/dist/features/preview/components/FieldOverlayStyles.js +6 -4
- package/dist/features/preview/components/Frame.js +5 -3
- package/dist/features/preview/components/ItemFieldsEditor.js +6 -4
- package/dist/features/preview/components/LinkFieldEditor.js +5 -3
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +5 -3
- package/dist/features/preview/components/OverlayTracker.js +4 -2
- package/dist/features/preview/components/Overlays.js +4 -2
- package/dist/features/preview/components/PageContentSheet.js +7 -5
- package/dist/features/preview/components/PageLocationFieldset.js +5 -3
- package/dist/features/preview/components/PagePicker.js +5 -3
- package/dist/features/preview/components/PageTree.js +13 -11
- package/dist/features/preview/components/PeekedBlock.js +4 -2
- package/dist/features/preview/components/PreviewPanel.js +6 -4
- package/dist/features/preview/components/PreviewSideSheet.js +4 -2
- package/dist/features/preview/components/PreviewToolbar.js +4 -2
- package/dist/features/preview/components/RepeatableItemsList.js +5 -3
- package/dist/features/preview/components/ShikiMarkdown.js +5 -3
- package/dist/features/preview/components/TextFormatToolbar.js +5 -3
- package/dist/features/preview/components/UnlinkAssetButton.js +4 -2
- package/dist/features/preview/components/useUpdateBlockPosition.js +4 -2
- package/dist/features/preview/overlayMessages.js +2 -1
- package/dist/features/preview/previewStore.js +4 -2
- package/dist/features/provider/CamoxProvider.d.ts +20 -10
- package/dist/features/provider/CamoxProvider.js +5 -3
- package/dist/features/provider/actionsStore.js +4 -2
- package/dist/features/provider/components/CamoxAppContext.js +5 -3
- package/dist/features/provider/components/CommandPalette.js +3 -1
- package/dist/features/provider/useAdminShortcuts.js +3 -1
- package/dist/features/routes/ogRoute.d.ts +11 -6
- package/dist/features/routes/ogRoute.js +2 -1
- package/dist/features/routes/pageRoute.d.ts +56 -46
- package/dist/features/routes/pageRoute.js +6 -4
- package/dist/features/studio/CamoxStudio.d.ts +10 -5
- package/dist/features/studio/CamoxStudio.js +4 -2
- package/dist/features/studio/components/EnvironmentMenu.js +4 -2
- package/dist/features/studio/components/Navbar.js +5 -3
- package/dist/features/studio/components/ProjectMenu.js +5 -3
- package/dist/features/studio/components/UserButton.js +4 -2
- package/dist/features/studio/studioStore.js +4 -2
- package/dist/features/studio/useTheme.js +3 -1
- package/dist/features/vite/appGeneration.js +4 -2
- package/dist/features/vite/blockBoilerplate.js +4 -2
- package/dist/features/vite/definitionsSync.js +5 -3
- package/dist/features/vite/routeGeneration.js +4 -2
- package/dist/features/vite/skillGeneration.js +5 -3
- package/dist/features/vite/utils.js +3 -1
- package/dist/features/vite/vite.d.ts +20 -21
- package/dist/features/vite/vite.js +26 -16
- package/dist/hooks/use-file-upload.js +4 -1
- package/dist/hooks/use-marquee-selection.js +4 -2
- package/dist/lib/analytics-client.js +5 -3
- package/dist/lib/analytics.js +4 -3
- package/dist/lib/api-client-server.js +3 -1
- package/dist/lib/api-client.d.ts +7 -1198
- package/dist/lib/api-client.js +7 -5
- package/dist/lib/auth.js +4 -2
- package/dist/lib/normalized-data.js +7 -5
- package/dist/lib/queries.d.ts +9 -791
- package/dist/lib/queries.js +13 -11
- package/dist/lib/use-project-room.js +4 -2
- package/dist/lib/utils.js +3 -1
- package/package.json +10 -11
- package/dist/components/AuthGate.d.ts +0 -7
- package/dist/components/AuthGate.d.ts.map +0 -1
- package/dist/core/components/AddBlockControlBar.d.ts +0 -9
- package/dist/core/components/AddBlockControlBar.d.ts.map +0 -1
- package/dist/core/components/lexical/InlineContentEditable.d.ts +0 -7
- package/dist/core/components/lexical/InlineContentEditable.d.ts.map +0 -1
- package/dist/core/components/lexical/InlineLexicalEditor.d.ts +0 -10
- package/dist/core/components/lexical/InlineLexicalEditor.d.ts.map +0 -1
- package/dist/core/components/lexical/InlineParagraphNode.d.ts +0 -10
- package/dist/core/components/lexical/InlineParagraphNode.d.ts.map +0 -1
- package/dist/core/components/lexical/SelectionBroadcaster.d.ts +0 -6
- package/dist/core/components/lexical/SelectionBroadcaster.d.ts.map +0 -1
- package/dist/core/components/lexical/SidebarLexicalEditor.d.ts +0 -9
- package/dist/core/components/lexical/SidebarLexicalEditor.d.ts.map +0 -1
- package/dist/core/components/lexical/editorConfig.d.ts +0 -4
- package/dist/core/components/lexical/editorConfig.d.ts.map +0 -1
- package/dist/core/createApp.d.ts.map +0 -1
- package/dist/core/createBlock.d.ts.map +0 -1
- package/dist/core/createLayout.d.ts.map +0 -1
- package/dist/core/hooks/useFieldSelection.d.ts +0 -8
- package/dist/core/hooks/useFieldSelection.d.ts.map +0 -1
- package/dist/core/hooks/useIsEditable.d.ts +0 -2
- package/dist/core/hooks/useIsEditable.d.ts.map +0 -1
- package/dist/core/hooks/useOverlayMessage.d.ts +0 -10
- package/dist/core/hooks/useOverlayMessage.d.ts.map +0 -1
- package/dist/core/lib/contentType.d.ts.map +0 -1
- package/dist/core/lib/fieldTypes.d.ts +0 -92
- package/dist/core/lib/fieldTypes.d.ts.map +0 -1
- package/dist/core/lib/lexicalReact.d.ts +0 -7
- package/dist/core/lib/lexicalReact.d.ts.map +0 -1
- package/dist/core/lib/lexicalState.d.ts +0 -10
- package/dist/core/lib/lexicalState.d.ts.map +0 -1
- package/dist/core/lib/modifierFormats.d.ts +0 -9
- package/dist/core/lib/modifierFormats.d.ts.map +0 -1
- package/dist/core/lib/modifiers.d.ts +0 -12
- package/dist/core/lib/modifiers.d.ts.map +0 -1
- package/dist/features/content/CamoxContent.d.ts.map +0 -1
- package/dist/features/content/components/AssetCard.d.ts +0 -10
- package/dist/features/content/components/AssetCard.d.ts.map +0 -1
- package/dist/features/content/components/AssetCardSkeleton.d.ts +0 -2
- package/dist/features/content/components/AssetCardSkeleton.d.ts.map +0 -1
- package/dist/features/content/components/ContentSidebar.d.ts +0 -2
- package/dist/features/content/components/ContentSidebar.d.ts.map +0 -1
- package/dist/features/content/components/UploadDropZone.d.ts +0 -9
- package/dist/features/content/components/UploadDropZone.d.ts.map +0 -1
- package/dist/features/content/components/UploadProgressDrawer.d.ts +0 -11
- package/dist/features/content/components/UploadProgressDrawer.d.ts.map +0 -1
- package/dist/features/metadata/sitemap.d.ts.map +0 -1
- package/dist/features/preview/CamoxPreview.d.ts.map +0 -1
- package/dist/features/preview/components/AddBlockSheet.d.ts +0 -3
- package/dist/features/preview/components/AddBlockSheet.d.ts.map +0 -1
- package/dist/features/preview/components/AgentChatSheet.d.ts +0 -3
- package/dist/features/preview/components/AgentChatSheet.d.ts.map +0 -1
- package/dist/features/preview/components/AssetFieldEditor.d.ts +0 -18
- package/dist/features/preview/components/AssetFieldEditor.d.ts.map +0 -1
- package/dist/features/preview/components/AssetLightbox.d.ts +0 -8
- package/dist/features/preview/components/AssetLightbox.d.ts.map +0 -1
- package/dist/features/preview/components/AssetPickerGrid.d.ts +0 -11
- package/dist/features/preview/components/AssetPickerGrid.d.ts.map +0 -1
- package/dist/features/preview/components/BlockActionsPopover.d.ts +0 -15
- package/dist/features/preview/components/BlockActionsPopover.d.ts.map +0 -1
- package/dist/features/preview/components/CreatePageSheet.d.ts +0 -3
- package/dist/features/preview/components/CreatePageSheet.d.ts.map +0 -1
- package/dist/features/preview/components/DebouncedFieldEditor.d.ts +0 -10
- package/dist/features/preview/components/DebouncedFieldEditor.d.ts.map +0 -1
- package/dist/features/preview/components/EditPageSheet.d.ts +0 -3
- package/dist/features/preview/components/EditPageSheet.d.ts.map +0 -1
- package/dist/features/preview/components/FieldOverlayStyles.d.ts +0 -2
- package/dist/features/preview/components/FieldOverlayStyles.d.ts.map +0 -1
- package/dist/features/preview/components/Frame.d.ts +0 -20
- package/dist/features/preview/components/Frame.d.ts.map +0 -1
- package/dist/features/preview/components/ItemFieldsEditor.d.ts +0 -28
- package/dist/features/preview/components/ItemFieldsEditor.d.ts.map +0 -1
- package/dist/features/preview/components/LinkFieldEditor.d.ts +0 -8
- package/dist/features/preview/components/LinkFieldEditor.d.ts.map +0 -1
- package/dist/features/preview/components/MultipleAssetFieldEditor.d.ts +0 -9
- package/dist/features/preview/components/MultipleAssetFieldEditor.d.ts.map +0 -1
- package/dist/features/preview/components/OverlayTracker.d.ts +0 -6
- package/dist/features/preview/components/OverlayTracker.d.ts.map +0 -1
- package/dist/features/preview/components/Overlays.d.ts +0 -6
- package/dist/features/preview/components/Overlays.d.ts.map +0 -1
- package/dist/features/preview/components/PageContentSheet.d.ts +0 -3
- package/dist/features/preview/components/PageContentSheet.d.ts.map +0 -1
- package/dist/features/preview/components/PageLocationFieldset.d.ts +0 -14
- package/dist/features/preview/components/PageLocationFieldset.d.ts.map +0 -1
- package/dist/features/preview/components/PagePicker.d.ts +0 -3
- package/dist/features/preview/components/PagePicker.d.ts.map +0 -1
- package/dist/features/preview/components/PageTree.d.ts +0 -3
- package/dist/features/preview/components/PageTree.d.ts.map +0 -1
- package/dist/features/preview/components/PeekedBlock.d.ts +0 -6
- package/dist/features/preview/components/PeekedBlock.d.ts.map +0 -1
- package/dist/features/preview/components/PreviewPanel.d.ts +0 -12
- package/dist/features/preview/components/PreviewPanel.d.ts.map +0 -1
- package/dist/features/preview/components/PreviewSideSheet.d.ts +0 -13
- package/dist/features/preview/components/PreviewSideSheet.d.ts.map +0 -1
- package/dist/features/preview/components/PreviewToolbar.d.ts +0 -2
- package/dist/features/preview/components/PreviewToolbar.d.ts.map +0 -1
- package/dist/features/preview/components/RepeatableItemsList.d.ts +0 -17
- package/dist/features/preview/components/RepeatableItemsList.d.ts.map +0 -1
- package/dist/features/preview/components/ShikiMarkdown.d.ts +0 -4
- package/dist/features/preview/components/ShikiMarkdown.d.ts.map +0 -1
- package/dist/features/preview/components/TextFormatToolbar.d.ts +0 -2
- package/dist/features/preview/components/TextFormatToolbar.d.ts.map +0 -1
- package/dist/features/preview/components/UnlinkAssetButton.d.ts +0 -8
- package/dist/features/preview/components/UnlinkAssetButton.d.ts.map +0 -1
- package/dist/features/preview/components/useUpdateBlockPosition.d.ts +0 -67
- package/dist/features/preview/components/useUpdateBlockPosition.d.ts.map +0 -1
- package/dist/features/preview/overlayMessages.d.ts +0 -62
- package/dist/features/preview/overlayMessages.d.ts.map +0 -1
- package/dist/features/preview/previewConstants.d.ts +0 -2
- package/dist/features/preview/previewConstants.d.ts.map +0 -1
- package/dist/features/preview/previewStore.d.ts +0 -123
- package/dist/features/preview/previewStore.d.ts.map +0 -1
- package/dist/features/preview/studio-overlays.css?inline.js +0 -4
- package/dist/features/provider/CamoxProvider.d.ts.map +0 -1
- package/dist/features/provider/actionsStore.d.ts +0 -35
- package/dist/features/provider/actionsStore.d.ts.map +0 -1
- package/dist/features/provider/components/CamoxAppContext.d.ts +0 -771
- package/dist/features/provider/components/CamoxAppContext.d.ts.map +0 -1
- package/dist/features/provider/components/CommandPalette.d.ts +0 -3
- package/dist/features/provider/components/CommandPalette.d.ts.map +0 -1
- package/dist/features/provider/useAdminShortcuts.d.ts +0 -5
- package/dist/features/provider/useAdminShortcuts.d.ts.map +0 -1
- package/dist/features/routes/ogRoute.d.ts.map +0 -1
- package/dist/features/routes/pageRoute.d.ts.map +0 -1
- package/dist/features/studio/CamoxStudio.d.ts.map +0 -1
- package/dist/features/studio/components/EnvironmentMenu.d.ts +0 -2
- package/dist/features/studio/components/EnvironmentMenu.d.ts.map +0 -1
- package/dist/features/studio/components/Navbar.d.ts +0 -4
- package/dist/features/studio/components/Navbar.d.ts.map +0 -1
- package/dist/features/studio/components/ProjectMenu.d.ts +0 -2
- package/dist/features/studio/components/ProjectMenu.d.ts.map +0 -1
- package/dist/features/studio/components/UserButton.d.ts +0 -2
- package/dist/features/studio/components/UserButton.d.ts.map +0 -1
- package/dist/features/studio/studioStore.d.ts +0 -17
- package/dist/features/studio/studioStore.d.ts.map +0 -1
- package/dist/features/studio/useTheme.d.ts +0 -9
- package/dist/features/studio/useTheme.d.ts.map +0 -1
- package/dist/features/vite/appGeneration.d.ts +0 -4
- package/dist/features/vite/appGeneration.d.ts.map +0 -1
- package/dist/features/vite/blockBoilerplate.d.ts +0 -3
- package/dist/features/vite/blockBoilerplate.d.ts.map +0 -1
- package/dist/features/vite/definitionsSync.d.ts +0 -19
- package/dist/features/vite/definitionsSync.d.ts.map +0 -1
- package/dist/features/vite/routeGeneration.d.ts +0 -14
- package/dist/features/vite/routeGeneration.d.ts.map +0 -1
- package/dist/features/vite/skillGeneration.d.ts +0 -4
- package/dist/features/vite/skillGeneration.d.ts.map +0 -1
- package/dist/features/vite/utils.d.ts +0 -2
- package/dist/features/vite/utils.d.ts.map +0 -1
- package/dist/features/vite/vite.d.ts.map +0 -1
- package/dist/hooks/use-file-upload.d.ts +0 -23
- package/dist/hooks/use-file-upload.d.ts.map +0 -1
- package/dist/hooks/use-marquee-selection.d.ts +0 -17
- package/dist/hooks/use-marquee-selection.d.ts.map +0 -1
- package/dist/lib/analytics-client.d.ts +0 -3
- package/dist/lib/analytics-client.d.ts.map +0 -1
- package/dist/lib/analytics.d.ts +0 -3
- package/dist/lib/analytics.d.ts.map +0 -1
- package/dist/lib/api-client-server.d.ts +0 -5
- package/dist/lib/api-client-server.d.ts.map +0 -1
- package/dist/lib/api-client.d.ts.map +0 -1
- package/dist/lib/normalized-data.d.ts +0 -96
- package/dist/lib/normalized-data.d.ts.map +0 -1
- package/dist/lib/queries.d.ts.map +0 -1
- package/dist/lib/use-project-room.d.ts +0 -2
- package/dist/lib/use-project-room.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -40
- package/dist/lib/utils.d.ts.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { previewStore } from "../../features/preview/previewStore.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronDown, FileIcon, FrameIcon, ImageIcon, Images, Link2, List, ToggleLeft, Type } from "lucide-react";
|
|
4
|
+
|
|
4
5
|
//#region src/core/lib/fieldTypes.tsx
|
|
5
|
-
|
|
6
|
+
const fieldTypesDictionary = {
|
|
6
7
|
String: {
|
|
7
8
|
label: "String",
|
|
8
9
|
isScalar: true,
|
|
@@ -183,5 +184,6 @@ var fieldTypesDictionary = {
|
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
186
|
};
|
|
187
|
+
|
|
186
188
|
//#endregion
|
|
187
|
-
export { fieldTypesDictionary };
|
|
189
|
+
export { fieldTypesDictionary };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
3
4
|
//#region src/core/lib/lexicalReact.tsx
|
|
4
5
|
/**
|
|
5
6
|
* Parse a markdown string with **bold** and *italic* into React nodes.
|
|
@@ -26,5 +27,6 @@ function markdownToReactNodes(value) {
|
|
|
26
27
|
if (parts.length === 0) return value;
|
|
27
28
|
return /* @__PURE__ */ jsx(Fragment, { children: parts });
|
|
28
29
|
}
|
|
30
|
+
|
|
29
31
|
//#endregion
|
|
30
|
-
export { markdownToReactNodes };
|
|
32
|
+
export { markdownToReactNodes };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FORMAT_FLAGS, lexicalTextToMarkdown } from "./modifierFormats.js";
|
|
2
|
+
|
|
2
3
|
//#region src/core/lib/lexicalState.ts
|
|
3
4
|
function isLexicalState(value) {
|
|
4
5
|
if (typeof value === "object" && value !== null) return value?.root?.type === "root";
|
|
@@ -92,5 +93,6 @@ function parseInlineMarkdown(text) {
|
|
|
92
93
|
version: 1
|
|
93
94
|
}));
|
|
94
95
|
}
|
|
96
|
+
|
|
95
97
|
//#endregion
|
|
96
|
-
export { isLexicalState, lexicalStateToMarkdown, markdownToLexicalState };
|
|
98
|
+
export { isLexicalState, lexicalStateToMarkdown, markdownToLexicalState };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/core/lib/modifierFormats.ts
|
|
2
2
|
/** Format bitmask flags matching Lexical's internal constants */
|
|
3
|
-
|
|
3
|
+
const FORMAT_FLAGS = {
|
|
4
4
|
bold: 1,
|
|
5
5
|
italic: 2
|
|
6
6
|
};
|
|
7
7
|
/** Markdown wrappers keyed by format name */
|
|
8
|
-
|
|
8
|
+
const MARKDOWN_WRAPPERS = {
|
|
9
9
|
bold: (text) => `**${text}**`,
|
|
10
10
|
italic: (text) => `*${text}*`
|
|
11
11
|
};
|
|
@@ -17,5 +17,6 @@ function lexicalTextToMarkdown(text, format) {
|
|
|
17
17
|
}
|
|
18
18
|
return result;
|
|
19
19
|
}
|
|
20
|
+
|
|
20
21
|
//#endregion
|
|
21
|
-
export { FORMAT_FLAGS, lexicalTextToMarkdown };
|
|
22
|
+
export { FORMAT_FLAGS, lexicalTextToMarkdown };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FORMAT_FLAGS } from "./modifierFormats.js";
|
|
1
|
+
import { FORMAT_FLAGS, lexicalTextToMarkdown } from "./modifierFormats.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
4
5
|
//#region src/core/lib/modifiers.tsx
|
|
5
|
-
|
|
6
|
+
const TEXT_MODIFIERS = {
|
|
6
7
|
bold: {
|
|
7
8
|
formatFlag: FORMAT_FLAGS.bold,
|
|
8
9
|
label: "Bold",
|
|
@@ -18,5 +19,6 @@ var TEXT_MODIFIERS = {
|
|
|
18
19
|
toMarkdown: (text) => `*${text}*`
|
|
19
20
|
}
|
|
20
21
|
};
|
|
22
|
+
|
|
21
23
|
//#endregion
|
|
22
|
-
export { TEXT_MODIFIERS };
|
|
24
|
+
export { TEXT_MODIFIERS };
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/features/content/CamoxContent.d.ts
|
|
4
|
+
declare const CamoxContent: () => _$react_jsx_runtime0.JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { CamoxContent };
|
|
@@ -15,8 +15,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
import { Button } from "@camox/ui/button";
|
|
16
16
|
import { PanelContent } from "@camox/ui/panel";
|
|
17
17
|
import { FloatingToolbar } from "@camox/ui/floating-toolbar";
|
|
18
|
+
|
|
18
19
|
//#region src/features/content/CamoxContent.tsx
|
|
19
|
-
|
|
20
|
+
const CamoxContent = () => {
|
|
20
21
|
const $ = c(49);
|
|
21
22
|
const projectSlug = useProjectSlug();
|
|
22
23
|
let t0;
|
|
@@ -260,5 +261,6 @@ var CamoxContent = () => {
|
|
|
260
261
|
function _temp(_, i) {
|
|
261
262
|
return /* @__PURE__ */ jsx(AssetCardSkeleton, {}, i);
|
|
262
263
|
}
|
|
264
|
+
|
|
263
265
|
//#endregion
|
|
264
|
-
export { CamoxContent };
|
|
266
|
+
export { CamoxContent };
|
|
@@ -2,8 +2,9 @@ import { cn } from "../../../lib/utils.js";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { FileIcon } from "lucide-react";
|
|
5
|
+
|
|
5
6
|
//#region src/features/content/components/AssetCard.tsx
|
|
6
|
-
|
|
7
|
+
const AssetCard = (t0) => {
|
|
7
8
|
const $ = c(25);
|
|
8
9
|
const { file, selected, onSelect, onOpen } = t0;
|
|
9
10
|
let t1;
|
|
@@ -99,5 +100,6 @@ var AssetCard = (t0) => {
|
|
|
99
100
|
} else t10 = $[24];
|
|
100
101
|
return t10;
|
|
101
102
|
};
|
|
103
|
+
|
|
102
104
|
//#endregion
|
|
103
|
-
export { AssetCard };
|
|
105
|
+
export { AssetCard };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Skeleton } from "@camox/ui/skeleton";
|
|
4
|
+
|
|
4
5
|
//#region src/features/content/components/AssetCardSkeleton.tsx
|
|
5
|
-
|
|
6
|
+
const AssetCardSkeleton = () => {
|
|
6
7
|
const $ = c(1);
|
|
7
8
|
let t0;
|
|
8
9
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -14,5 +15,6 @@ var AssetCardSkeleton = () => {
|
|
|
14
15
|
} else t0 = $[0];
|
|
15
16
|
return t0;
|
|
16
17
|
};
|
|
18
|
+
|
|
17
19
|
//#endregion
|
|
18
|
-
export { AssetCardSkeleton };
|
|
20
|
+
export { AssetCardSkeleton };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ImageIcon } from "lucide-react";
|
|
4
|
+
|
|
4
5
|
//#region src/features/content/components/ContentSidebar.tsx
|
|
5
|
-
|
|
6
|
+
const ContentSidebar = () => {
|
|
6
7
|
const $ = c(1);
|
|
7
8
|
let t0;
|
|
8
9
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -18,5 +19,6 @@ var ContentSidebar = () => {
|
|
|
18
19
|
} else t0 = $[0];
|
|
19
20
|
return t0;
|
|
20
21
|
};
|
|
22
|
+
|
|
21
23
|
//#endregion
|
|
22
|
-
export { ContentSidebar };
|
|
24
|
+
export { ContentSidebar };
|
|
@@ -3,6 +3,7 @@ import { c } from "react/compiler-runtime";
|
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Upload } from "lucide-react";
|
|
6
|
+
|
|
6
7
|
//#region src/features/content/components/UploadDropZone.tsx
|
|
7
8
|
function UploadDropZone(t0) {
|
|
8
9
|
const $ = c(14);
|
|
@@ -90,5 +91,6 @@ function _temp(e_1) {
|
|
|
90
91
|
e_1.preventDefault();
|
|
91
92
|
e_1.stopPropagation();
|
|
92
93
|
}
|
|
94
|
+
|
|
93
95
|
//#endregion
|
|
94
|
-
export { UploadDropZone };
|
|
96
|
+
export { UploadDropZone };
|
|
@@ -2,6 +2,7 @@ import { c } from "react/compiler-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { AlertCircle, Check, ChevronDown, ChevronUp, File, Loader2, X } from "lucide-react";
|
|
5
|
+
|
|
5
6
|
//#region src/features/content/components/UploadProgressDrawer.tsx
|
|
6
7
|
function UploadProgressDrawer(t0) {
|
|
7
8
|
const $ = c(22);
|
|
@@ -210,5 +211,6 @@ function UploadItemRow(t0) {
|
|
|
210
211
|
} else t10 = $[25];
|
|
211
212
|
return t10;
|
|
212
213
|
}
|
|
214
|
+
|
|
213
215
|
//#endregion
|
|
214
|
-
export { UploadItemRow, UploadProgressDrawer };
|
|
216
|
+
export { UploadItemRow, UploadProgressDrawer };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/features/metadata/sitemap.d.ts
|
|
2
|
+
type SitemapEntry = {
|
|
3
|
+
loc: string;
|
|
4
|
+
lastmod: string;
|
|
4
5
|
};
|
|
5
|
-
|
|
6
|
-
//#
|
|
6
|
+
declare function generateSitemap(origin: string): Promise<SitemapEntry[]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { SitemapEntry, generateSitemap };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createORPCClient } from "@orpc/client";
|
|
2
2
|
import { RPCLink } from "@orpc/client/fetch";
|
|
3
|
+
|
|
3
4
|
//#region src/features/metadata/sitemap.ts
|
|
4
5
|
async function generateSitemap(origin) {
|
|
5
6
|
const headers = { "x-environment-name": __CAMOX_ENVIRONMENT_NAME__ };
|
|
@@ -11,5 +12,6 @@ async function generateSitemap(origin) {
|
|
|
11
12
|
lastmod: new Date(page.updatedAt).toISOString()
|
|
12
13
|
}));
|
|
13
14
|
}
|
|
15
|
+
|
|
14
16
|
//#endregion
|
|
15
|
-
export { generateSitemap };
|
|
17
|
+
export { generateSitemap };
|
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/features/preview/CamoxPreview.d.ts
|
|
5
|
+
declare function usePreviewedPage(): {
|
|
6
|
+
page: {
|
|
7
|
+
blockIds: number[];
|
|
8
|
+
id: number;
|
|
9
|
+
projectId: number;
|
|
10
|
+
environmentId: number;
|
|
11
|
+
pathSegment: string;
|
|
12
|
+
fullPath: string;
|
|
13
|
+
parentPageId: number | null;
|
|
14
|
+
layoutId: number;
|
|
15
|
+
metaTitle: string | null;
|
|
16
|
+
metaDescription: string | null;
|
|
17
|
+
aiSeoEnabled: boolean | null;
|
|
18
|
+
createdAt: number;
|
|
19
|
+
updatedAt: number;
|
|
20
|
+
};
|
|
21
|
+
projectName: string;
|
|
22
|
+
layout: {
|
|
23
|
+
id: number;
|
|
24
|
+
layoutId: string;
|
|
25
|
+
beforeBlockIds: number[];
|
|
26
|
+
afterBlockIds: number[];
|
|
27
|
+
} | null;
|
|
25
28
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
declare const PageContent: () => _$react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare const CamoxPreview: ({
|
|
31
|
+
children
|
|
32
|
+
}: {
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}) => _$react_jsx_runtime0.JSX.Element;
|
|
35
|
+
declare function usePreviewPagesActions(): void;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { CamoxPreview, PageContent, usePreviewPagesActions, usePreviewedPage };
|
|
@@ -21,12 +21,13 @@ import { keepPreviousData, useQuery, useQueryClient, useSuspenseQuery } from "@t
|
|
|
21
21
|
import { useSelector } from "@xstate/store/react";
|
|
22
22
|
import * as React from "react";
|
|
23
23
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { queryKeys } from "@camox/api/query-keys";
|
|
24
|
+
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
25
25
|
import { Button } from "@camox/ui/button";
|
|
26
26
|
import { PanelContent, PanelHeader } from "@camox/ui/panel";
|
|
27
27
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
28
28
|
import { useLocation, useNavigate } from "@tanstack/react-router";
|
|
29
29
|
import { Info } from "lucide-react";
|
|
30
|
+
|
|
30
31
|
//#region src/features/preview/CamoxPreview.tsx
|
|
31
32
|
/**
|
|
32
33
|
* Fetches the current page being previewed, with live updates for authenticated users.
|
|
@@ -151,7 +152,7 @@ function usePreviewedPage() {
|
|
|
151
152
|
function _temp(state) {
|
|
152
153
|
return state.context.peekedPagePathname;
|
|
153
154
|
}
|
|
154
|
-
|
|
155
|
+
const BlockRenderer = (t0) => {
|
|
155
156
|
const $ = c(21);
|
|
156
157
|
const { blockId, mode, showAddBlockTop, showAddBlockBottom } = t0;
|
|
157
158
|
let t1;
|
|
@@ -224,7 +225,7 @@ var BlockRenderer = (t0) => {
|
|
|
224
225
|
} else t12 = $[20];
|
|
225
226
|
return t12;
|
|
226
227
|
};
|
|
227
|
-
|
|
228
|
+
const PageContent = () => {
|
|
228
229
|
const pageData = usePreviewedPage();
|
|
229
230
|
const { pageBlocks, beforeBlocks, afterBlocks, layoutFiles, layoutItems } = usePageBlocks(pageData);
|
|
230
231
|
const peekedBlockPosition = useSelector(previewStore, (state) => state.context.peekedBlockPosition);
|
|
@@ -286,7 +287,7 @@ var PageContent = () => {
|
|
|
286
287
|
children: pageBlocksContent
|
|
287
288
|
});
|
|
288
289
|
};
|
|
289
|
-
|
|
290
|
+
const CamoxPreview = (t0) => {
|
|
290
291
|
const $ = c(28);
|
|
291
292
|
const { children } = t0;
|
|
292
293
|
const isAuthenticated = useIsAuthenticated();
|
|
@@ -589,5 +590,6 @@ function _temp5() {
|
|
|
589
590
|
function _temp6(a) {
|
|
590
591
|
return a.id;
|
|
591
592
|
}
|
|
593
|
+
|
|
592
594
|
//#endregion
|
|
593
|
-
export { CamoxPreview, PageContent, usePreviewPagesActions, usePreviewedPage };
|
|
595
|
+
export { CamoxPreview, PageContent, usePreviewPagesActions, usePreviewedPage };
|
|
@@ -12,13 +12,14 @@ import { useSelector } from "@xstate/store/react";
|
|
|
12
12
|
import { generateKeyBetween } from "fractional-indexing";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { queryKeys } from "@camox/api/query-keys";
|
|
15
|
+
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
16
16
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
17
17
|
import { useLocation } from "@tanstack/react-router";
|
|
18
18
|
import { InfoIcon } from "lucide-react";
|
|
19
19
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@camox/ui/command";
|
|
20
|
+
|
|
20
21
|
//#region src/features/preview/components/AddBlockSheet.tsx
|
|
21
|
-
|
|
22
|
+
const AddBlockSheet = () => {
|
|
22
23
|
const $ = c(58);
|
|
23
24
|
const [highlightedValue, setHighlightedValue] = React.useState("");
|
|
24
25
|
const queryClient = useQueryClient();
|
|
@@ -378,5 +379,6 @@ function _temp6(open) {
|
|
|
378
379
|
function _temp7(e) {
|
|
379
380
|
if (e.key === "Escape") previewStore.send({ type: "closeAddBlockSheet" });
|
|
380
381
|
}
|
|
382
|
+
|
|
381
383
|
//#endregion
|
|
382
|
-
export { AddBlockSheet };
|
|
384
|
+
export { AddBlockSheet };
|
|
@@ -3,8 +3,9 @@ import { PreviewSideSheet, Sheet } from "./PreviewSideSheet.js";
|
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useSelector } from "@xstate/store/react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
6
7
|
//#region src/features/preview/components/AgentChatSheet.tsx
|
|
7
|
-
|
|
8
|
+
const AgentChatSheet = () => {
|
|
8
9
|
const $ = c(4);
|
|
9
10
|
const isOpen = useSelector(previewStore, _temp);
|
|
10
11
|
const handleOpenChange = _temp2;
|
|
@@ -42,5 +43,6 @@ function _temp(state) {
|
|
|
42
43
|
function _temp2(open) {
|
|
43
44
|
if (!open) previewStore.send({ type: "closeAgentChatSheet" });
|
|
44
45
|
}
|
|
46
|
+
|
|
45
47
|
//#endregion
|
|
46
|
-
export { AgentChatSheet };
|
|
48
|
+
export { AgentChatSheet };
|
|
@@ -12,12 +12,13 @@ import * as React from "react";
|
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Button } from "@camox/ui/button";
|
|
14
14
|
import { FileIcon, Upload } from "lucide-react";
|
|
15
|
+
|
|
15
16
|
//#region src/features/preview/components/AssetFieldEditor.tsx
|
|
16
17
|
function assetLabel(isImage, multiple) {
|
|
17
18
|
if (isImage) return multiple ? "images" : "image";
|
|
18
19
|
return multiple ? "files" : "file";
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
const AssetActionButtons = (t0) => {
|
|
21
22
|
const $ = c(26);
|
|
22
23
|
const { isImage, multiple, fileInputRef, onPickerOpen, onFilesSelected, uploads } = t0;
|
|
23
24
|
let t1;
|
|
@@ -118,7 +119,7 @@ var AssetActionButtons = (t0) => {
|
|
|
118
119
|
} else t11 = $[25];
|
|
119
120
|
return t11;
|
|
120
121
|
};
|
|
121
|
-
|
|
122
|
+
const SingleAssetFieldEditor = (t0) => {
|
|
122
123
|
const $ = c(28);
|
|
123
124
|
const { fieldName, assetType, currentData, onFieldChange } = t0;
|
|
124
125
|
const asset = currentData[fieldName];
|
|
@@ -261,5 +262,6 @@ function _temp(item) {
|
|
|
261
262
|
return /* @__PURE__ */ jsx(UploadItemRow, { item }, item.id);
|
|
262
263
|
}
|
|
263
264
|
function _temp2() {}
|
|
265
|
+
|
|
264
266
|
//#endregion
|
|
265
|
-
export { AssetActionButtons, SingleAssetFieldEditor };
|
|
267
|
+
export { AssetActionButtons, SingleAssetFieldEditor };
|
|
@@ -15,6 +15,7 @@ import { Check, Download, FileIcon, Link, Loader2, Trash2, X } from "lucide-reac
|
|
|
15
15
|
import { Switch } from "@camox/ui/switch";
|
|
16
16
|
import { ButtonGroup } from "@camox/ui/button-group";
|
|
17
17
|
import { Dialog, DialogContent, DialogTitle } from "@camox/ui/dialog";
|
|
18
|
+
|
|
18
19
|
//#region src/features/preview/components/AssetLightbox.tsx
|
|
19
20
|
function MetadataRow(t0) {
|
|
20
21
|
const $ = c(8);
|
|
@@ -80,7 +81,7 @@ function formatFileSize(bytes) {
|
|
|
80
81
|
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
81
82
|
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
+
const AssetLightbox = ({ open, onOpenChange, fileId }) => {
|
|
84
85
|
const replaceFile = useMutation(fileMutations.replace());
|
|
85
86
|
const deleteFile = useMutation(fileMutations.delete());
|
|
86
87
|
const setAiMetadata = useMutation(fileMutations.setAiMetadata());
|
|
@@ -422,5 +423,6 @@ var AssetLightbox = ({ open, onOpenChange, fileId }) => {
|
|
|
422
423
|
})
|
|
423
424
|
});
|
|
424
425
|
};
|
|
426
|
+
|
|
425
427
|
//#endregion
|
|
426
|
-
export { AssetLightbox };
|
|
428
|
+
export { AssetLightbox };
|
|
@@ -9,8 +9,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { Button } from "@camox/ui/button";
|
|
10
10
|
import { ArrowLeft } from "lucide-react";
|
|
11
11
|
import { Skeleton } from "@camox/ui/skeleton";
|
|
12
|
+
|
|
12
13
|
//#region src/features/preview/components/AssetPickerGrid.tsx
|
|
13
|
-
|
|
14
|
+
const AssetPickerGrid = (t0) => {
|
|
14
15
|
const $ = c(45);
|
|
15
16
|
const { assetType, mode, onSelectSingle, onSelectMultiple, onClose } = t0;
|
|
16
17
|
const projectSlug = useProjectSlug();
|
|
@@ -226,5 +227,6 @@ function _temp2(_, i) {
|
|
|
226
227
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "aspect-4/3 w-full rounded-md" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-3/4 rounded" })]
|
|
227
228
|
}, i);
|
|
228
229
|
}
|
|
230
|
+
|
|
229
231
|
//#endregion
|
|
230
|
-
export { AssetPickerGrid };
|
|
232
|
+
export { AssetPickerGrid };
|
|
@@ -17,8 +17,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
17
17
|
import { Copy, Pen, Settings, Trash2 } from "lucide-react";
|
|
18
18
|
import { Command, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "@camox/ui/command";
|
|
19
19
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
|
|
20
|
+
|
|
20
21
|
//#region src/features/preview/components/BlockActionsPopover.tsx
|
|
21
|
-
|
|
22
|
+
const BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start", isLayoutBlock, layoutPlacement }) => {
|
|
22
23
|
const [blockToDelete, setBlockToDelete] = React.useState(null);
|
|
23
24
|
const camoxApp = useCamoxApp();
|
|
24
25
|
const page = usePreviewedPage();
|
|
@@ -553,5 +554,6 @@ function _temp2() {
|
|
|
553
554
|
function _temp(state) {
|
|
554
555
|
return state.context.selection;
|
|
555
556
|
}
|
|
557
|
+
|
|
556
558
|
//#endregion
|
|
557
|
-
export { BlockActionsPopover, useBlockActionsShortcuts };
|
|
559
|
+
export { BlockActionsPopover, useBlockActionsShortcuts };
|
|
@@ -17,8 +17,9 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
|
|
|
17
17
|
import { Spinner } from "@camox/ui/spinner";
|
|
18
18
|
import { Textarea } from "@camox/ui/textarea";
|
|
19
19
|
import { useForm } from "@tanstack/react-form";
|
|
20
|
+
|
|
20
21
|
//#region src/features/preview/components/CreatePageSheet.tsx
|
|
21
|
-
|
|
22
|
+
const CreatePageSheet = () => {
|
|
22
23
|
const projectSlug = useProjectSlug();
|
|
23
24
|
const open = useSelector(previewStore, (state) => state.context.isCreatePageSheetOpen);
|
|
24
25
|
const createPage = useMutation(pageMutations.create());
|
|
@@ -169,5 +170,6 @@ var CreatePageSheet = () => {
|
|
|
169
170
|
})
|
|
170
171
|
});
|
|
171
172
|
};
|
|
173
|
+
|
|
172
174
|
//#endregion
|
|
173
|
-
export { CreatePageSheet };
|
|
175
|
+
export { CreatePageSheet };
|
|
@@ -4,8 +4,9 @@ import { Label } from "@camox/ui/label";
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Textarea } from "@camox/ui/textarea";
|
|
7
|
+
|
|
7
8
|
//#region src/features/preview/components/DebouncedFieldEditor.tsx
|
|
8
|
-
|
|
9
|
+
const DebouncedFieldEditor = (t0) => {
|
|
9
10
|
const $ = c(22);
|
|
10
11
|
const { label, placeholder, initialValue, onSave, disabled, rows } = t0;
|
|
11
12
|
const [value, setValue] = React.useState(initialValue);
|
|
@@ -104,5 +105,6 @@ var DebouncedFieldEditor = (t0) => {
|
|
|
104
105
|
} else t8 = $[21];
|
|
105
106
|
return t8;
|
|
106
107
|
};
|
|
108
|
+
|
|
107
109
|
//#endregion
|
|
108
|
-
export { DebouncedFieldEditor };
|
|
110
|
+
export { DebouncedFieldEditor };
|
|
@@ -23,8 +23,9 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
|
|
|
23
23
|
import { Spinner } from "@camox/ui/spinner";
|
|
24
24
|
import { useForm } from "@tanstack/react-form";
|
|
25
25
|
import { Switch } from "@camox/ui/switch";
|
|
26
|
+
|
|
26
27
|
//#region src/features/preview/components/EditPageSheet.tsx
|
|
27
|
-
|
|
28
|
+
const EditPageSheet = () => {
|
|
28
29
|
const $ = c(2);
|
|
29
30
|
const editingPageId = useSelector(previewStore, _temp);
|
|
30
31
|
let t0;
|
|
@@ -35,7 +36,7 @@ var EditPageSheet = () => {
|
|
|
35
36
|
} else t0 = $[1];
|
|
36
37
|
return t0;
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
+
const EditPageSheetContent = ({ pageId }) => {
|
|
39
40
|
const projectSlug = useProjectSlug();
|
|
40
41
|
const updatePage = useMutation(pageMutations.update());
|
|
41
42
|
const setLayout = useMutation(pageMutations.setLayout());
|
|
@@ -284,7 +285,7 @@ function truncateText(text, maxLen) {
|
|
|
284
285
|
if (text.length <= maxLen) return text;
|
|
285
286
|
return text.slice(0, maxLen) + "...";
|
|
286
287
|
}
|
|
287
|
-
|
|
288
|
+
const SearchEnginePreview = (t0) => {
|
|
288
289
|
const $ = c(16);
|
|
289
290
|
const { page, metaTitle, metaDescription } = t0;
|
|
290
291
|
const url = `${typeof window !== "undefined" ? window.location.origin : ""}${page.fullPath}`;
|
|
@@ -362,7 +363,7 @@ var SearchEnginePreview = (t0) => {
|
|
|
362
363
|
} else t10 = $[15];
|
|
363
364
|
return t10;
|
|
364
365
|
};
|
|
365
|
-
|
|
366
|
+
const SocialPreviewSection = (t0) => {
|
|
366
367
|
const $ = c(22);
|
|
367
368
|
const { page, metaTitle, metaDescription, layoutId, projectName } = t0;
|
|
368
369
|
const pageMetaTitle = page.metaTitle ?? page.pathSegment;
|
|
@@ -471,7 +472,7 @@ var SocialPreviewSection = (t0) => {
|
|
|
471
472
|
} else t11 = $[21];
|
|
472
473
|
return t11;
|
|
473
474
|
};
|
|
474
|
-
|
|
475
|
+
const PageMarkdownPreview = (t0) => {
|
|
475
476
|
const $ = c(8);
|
|
476
477
|
const { pageId, metaTitle, metaDescription } = t0;
|
|
477
478
|
let t1;
|
|
@@ -518,5 +519,6 @@ var PageMarkdownPreview = (t0) => {
|
|
|
518
519
|
function _temp(state) {
|
|
519
520
|
return state.context.editingPageId;
|
|
520
521
|
}
|
|
522
|
+
|
|
521
523
|
//#endregion
|
|
522
|
-
export { EditPageSheet };
|
|
524
|
+
export { EditPageSheet };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import studio_overlays_default from "../studio-overlays.css?inline.js";
|
|
2
1
|
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import overlayStyles from "virtual:camox-overlay-css";
|
|
4
|
+
|
|
4
5
|
//#region src/features/preview/components/FieldOverlayStyles.tsx
|
|
5
|
-
|
|
6
|
+
const FieldOverlayStyles = () => {
|
|
6
7
|
const $ = c(1);
|
|
7
8
|
let t0;
|
|
8
9
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9
|
-
t0 = /* @__PURE__ */ jsx("style", { children:
|
|
10
|
+
t0 = /* @__PURE__ */ jsx("style", { children: overlayStyles });
|
|
10
11
|
$[0] = t0;
|
|
11
12
|
} else t0 = $[0];
|
|
12
13
|
return t0;
|
|
13
14
|
};
|
|
15
|
+
|
|
14
16
|
//#endregion
|
|
15
|
-
export { FieldOverlayStyles };
|
|
17
|
+
export { FieldOverlayStyles };
|
|
@@ -3,8 +3,9 @@ import { c } from "react/compiler-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
6
7
|
//#region src/features/preview/components/Frame.tsx
|
|
7
|
-
|
|
8
|
+
const FrameContext = React.createContext({
|
|
8
9
|
window: null,
|
|
9
10
|
iframeElement: null
|
|
10
11
|
});
|
|
@@ -13,7 +14,7 @@ function useFrame() {
|
|
|
13
14
|
if (!context) throw new Error("useFrame must be used within a Frame");
|
|
14
15
|
return context;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
const Frame = (t0) => {
|
|
17
18
|
const $ = c(25);
|
|
18
19
|
const { children, className, style, copyStyles: t1, onIframeReady } = t0;
|
|
19
20
|
const copyStyles = t1 === void 0 ? true : t1;
|
|
@@ -158,5 +159,6 @@ function _temp(e) {
|
|
|
158
159
|
e.preventDefault();
|
|
159
160
|
window.top?.location.assign(anchor.href);
|
|
160
161
|
}
|
|
162
|
+
|
|
161
163
|
//#endregion
|
|
162
|
-
export { Frame, useFrame };
|
|
164
|
+
export { Frame, useFrame };
|