camox 0.33.1 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/components/lexical/InlineLexicalEditor.js +1 -1
- package/dist/core/components/lexical/SidebarLexicalEditor.js +7 -7
- package/dist/core/components/lexical/TextLinkPopover.js +4 -4
- package/dist/core/createApp.d.ts +2 -1
- package/dist/core/createBlock.d.ts +5 -1451
- package/dist/core/createBlock.js +450 -1603
- package/dist/core/defineDocument.d.ts +7 -0
- package/dist/core/defineDocument.js +7 -0
- package/dist/core/editing/BlockEditingRuntime.js +36 -0
- package/dist/core/editing/CompleteBlockEditingRuntime.js +76 -0
- package/dist/core/editing/createEditableBlock.d.ts +1455 -0
- package/dist/core/editing/createEditableBlock.js +1751 -0
- package/dist/core/lib/lexicalState.js +1 -1
- package/dist/features/agent-chat/components/AgentChatSidebar.js +4 -4
- package/dist/features/agent-chat/components/AgentChatThread.js +5 -5
- package/dist/features/content/components/AssetCard.js +1 -1
- package/dist/features/navigation/navigation.d.ts +39 -0
- package/dist/features/navigation/navigation.js +231 -0
- package/dist/features/page/PublishedPageContent.js +236 -0
- package/dist/features/page/PublishedPageExperience.js +23 -0
- package/dist/features/preview/CamoxPreview.d.ts +4 -0
- package/dist/features/preview/CamoxPreview.js +16 -16
- package/dist/features/preview/EditablePageContent.js +3 -0
- package/dist/features/preview/EditablePageExperience.js +24 -0
- package/dist/features/preview/components/AddBlockSidebar.js +7 -7
- package/dist/features/preview/components/AssetFieldEditor.js +1 -1
- package/dist/features/preview/components/AssetLightbox.js +46 -110
- package/dist/features/preview/components/BlockActionsPopover.js +6 -6
- package/dist/features/preview/components/CreatePageModal.js +7 -7
- package/dist/features/preview/components/DebouncedFieldEditor.js +2 -2
- package/dist/features/preview/components/DraftSwitchDialog.js +1 -1
- package/dist/features/preview/components/FieldToolbar.js +4 -4
- package/dist/features/preview/components/Frame.js +1 -1
- package/dist/features/preview/components/ItemFieldsEditor.js +3 -3
- package/dist/features/preview/components/LeftSidebar.js +1 -1
- package/dist/features/preview/components/LinkFieldEditor.js +3 -3
- package/dist/features/preview/components/Metadata.js +87 -0
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +1 -1
- package/dist/features/preview/components/OverlayTracker.js +3 -3
- package/dist/features/preview/components/Overlays.js +3 -3
- package/dist/features/preview/components/PageEditorSidebar.js +5 -5
- package/dist/features/preview/components/PageInfoSidebar.js +158 -74
- package/dist/features/preview/components/PageLocationFieldset.js +1 -1
- package/dist/features/preview/components/PageNavigatorSidebar.js +10 -10
- package/dist/features/preview/components/PageNicknameField.js +2 -2
- package/dist/features/preview/components/PagePicker.js +4 -4
- package/dist/features/preview/components/PageTree.js +3 -3
- package/dist/features/preview/components/PeekedBlock.js +2 -2
- package/dist/features/preview/components/PreviewPanel.js +2 -2
- package/dist/features/preview/components/PreviewToolbar.js +2 -2
- package/dist/features/preview/components/PublishDialog.js +2 -2
- package/dist/features/preview/components/RepeatableItemsList.js +1 -1
- package/dist/features/preview/components/RightSidebar.js +1 -1
- package/dist/features/preview/components/useRepeatableItemActions.js +1 -1
- package/dist/features/preview/components/useUpdateBlockPosition.js +4 -4
- package/dist/features/provider/AuthenticatedCamoxProvider.js +63 -0
- package/dist/features/provider/CamoxProvider.d.ts +5 -12
- package/dist/features/provider/CamoxProvider.js +81 -337
- package/dist/features/provider/CoreCamoxProvider.js +37 -0
- package/dist/features/provider/LocalhostPreviewProvider.js +159 -0
- package/dist/features/provider/components/CommandPalette.js +1 -1
- package/dist/features/provider/useAdminShortcuts.js +1 -1
- package/dist/features/routes/pageRuntime.js +6 -0
- package/dist/features/runtime/hydrationData.js +9 -0
- package/dist/features/runtime/pageApp.js +188 -0
- package/dist/features/runtime/pageClient.d.ts +6 -0
- package/dist/features/runtime/pageClient.js +20 -0
- package/dist/features/runtime/pageNavigation.js +170 -0
- package/dist/features/runtime/pageServer.d.ts +9 -0
- package/dist/features/runtime/pageServer.js +18 -0
- package/dist/features/runtime/runtime.d.ts +25 -0
- package/dist/features/runtime/runtime.js +44 -0
- package/dist/features/runtime/studioApp.d.ts +15 -0
- package/dist/features/runtime/studioApp.js +185 -0
- package/dist/features/runtime/studioClient.d.ts +6 -0
- package/dist/features/runtime/studioClient.js +20 -0
- package/dist/features/runtime/studioNavigation.js +115 -0
- package/dist/features/runtime/studioServer.d.ts +9 -0
- package/dist/features/runtime/studioServer.js +18 -0
- package/dist/features/studio/CamoxStudio.js +4 -4
- package/dist/features/studio/components/EnvironmentMenu.js +2 -2
- package/dist/features/studio/components/Navbar.js +7 -7
- package/dist/features/studio/components/ProjectMenu.js +9 -9
- package/dist/features/studio/components/UserButton.js +3 -3
- package/dist/features/studio/useTheme.js +1 -22
- package/dist/features/vite/appGeneration.js +16 -5
- package/dist/features/vite/blockBoilerplate.js +1 -1
- package/dist/features/vite/definitionsSync.js +4 -4
- package/dist/features/vite/routeGeneration.js +9 -156
- package/dist/features/vite/runtimeDev.js +291 -0
- package/dist/features/vite/utils.js +3 -1
- package/dist/features/vite/vite.d.ts +22 -3
- package/dist/features/vite/vite.js +42 -19
- package/dist/lib/auth.js +42 -68
- package/dist/lib/normalized-data.js +6 -6
- package/dist/lib/telemetry.js +1 -24
- package/dist/lib/utils.js +1 -1
- package/dist/lib/view-queries.js +28 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/Matches.d.ts +114 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/RouterProvider.d.ts +25 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/config.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/defer.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/fileRoute.d.ts +20 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/global.d.ts +8 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/hash-scroll.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/index.d.ts +18 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/link.d.ts +161 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/load-matches.d.ts +6 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/location.d.ts +54 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/lru-cache.d.ts +8 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/manifest.d.ts +32 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.d.ts +115 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/not-found.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/redirect.d.ts +49 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/rewrite.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/root.d.ts +6 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/route.d.ts +343 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/routeInfo.d.ts +48 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/router.d.ts +695 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchMiddleware.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchParams.d.ts +5 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/RawStream.d.ts +38 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/seroval-plugins.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/transformer.d.ts +65 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/stores.d.ts +69 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/structuralSharing.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/typePrimitives.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderData.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderDeps.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useNavigate.d.ts +10 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useParams.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useRouteContext.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useSearch.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/utils.d.ts +28 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/validators.d.ts +49 -0
- package/package.json +39 -12
- package/skills/camox-block/SKILL.md +4 -4
- package/skills/camox-cli/SKILL.md +3 -3
- package/skills/camox-layout/SKILL.md +2 -2
- package/dist/features/routes/ogRoute.d.ts +0 -12
- package/dist/features/routes/ogRoute.js +0 -20
- package/dist/features/routes/pageRoute.d.ts +0 -48
- package/dist/features/routes/pageRoute.js +0 -254
- package/dist/lib/api-client.d.ts +0 -7
- package/dist/lib/queries.d.ts +0 -12
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useFrame } from "./Frame.js";
|
|
2
|
-
import { isOverlayMessage } from "../overlayMessages.js";
|
|
3
1
|
import { previewStore } from "../previewStore.js";
|
|
2
|
+
import { isOverlayMessage } from "../overlayMessages.js";
|
|
3
|
+
import { useFrame } from "./Frame.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { useSelector } from "@xstate/store-react";
|
|
6
5
|
import * as React from "react";
|
|
6
|
+
import { useSelector } from "@xstate/store-react";
|
|
7
7
|
|
|
8
8
|
//#region src/features/preview/components/OverlayTracker.tsx
|
|
9
9
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isOverlayMessage } from "../overlayMessages.js";
|
|
2
|
-
import { previewStore } from "../previewStore.js";
|
|
3
1
|
import { usePageBlocks } from "../../../lib/normalized-data.js";
|
|
2
|
+
import { previewStore } from "../previewStore.js";
|
|
3
|
+
import { isOverlayMessage } from "../overlayMessages.js";
|
|
4
4
|
import { usePreviewedPage } from "../CamoxPreview.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { useSelector } from "@xstate/store-react";
|
|
7
6
|
import * as React from "react";
|
|
7
|
+
import { useSelector } from "@xstate/store-react";
|
|
8
8
|
|
|
9
9
|
//#region src/features/preview/components/Overlays.tsx
|
|
10
10
|
const Overlays = (t0) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { isFileMarker } from "../../../lib/normalized-data.js";
|
|
1
2
|
import { blockMutations, blockQueries, fileQueries, repeatableItemMutations } from "../../../lib/queries.js";
|
|
2
|
-
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
3
3
|
import { cn } from "../../../lib/utils.js";
|
|
4
|
-
import { previewStore, selectionBlockId, selectionField, selectionItemId } from "../previewStore.js";
|
|
5
|
-
import { isFileMarker } from "../../../lib/normalized-data.js";
|
|
6
4
|
import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
|
|
5
|
+
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
6
|
+
import { previewStore, selectionBlockId, selectionField, selectionItemId } from "../previewStore.js";
|
|
7
7
|
import { useRequireDraftSource } from "../../../core/hooks/useRequireDraftSource.js";
|
|
8
8
|
import { fieldTypesDictionary } from "../../../core/lib/fieldTypes.js";
|
|
9
9
|
import { SingleAssetFieldEditor } from "./AssetFieldEditor.js";
|
|
@@ -11,14 +11,14 @@ import { useRepeatableItemActions } from "./useRepeatableItemActions.js";
|
|
|
11
11
|
import { ItemFieldsEditor, formatFieldName } from "./ItemFieldsEditor.js";
|
|
12
12
|
import { LinkFieldEditor } from "./LinkFieldEditor.js";
|
|
13
13
|
import { MultipleAssetFieldEditor } from "./MultipleAssetFieldEditor.js";
|
|
14
|
-
import { Label } from "@camox/ui/label";
|
|
15
14
|
import { useMutation, useQueries, useQuery } from "@tanstack/react-query";
|
|
16
|
-
import { useSelector } from "@xstate/store-react";
|
|
17
15
|
import * as React from "react";
|
|
18
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { useSelector } from "@xstate/store-react";
|
|
19
18
|
import { Button } from "@camox/ui/button";
|
|
20
19
|
import { CircleMinus, CirclePlus, CornerLeftUp } from "lucide-react";
|
|
21
20
|
import { Spinner } from "@camox/ui/spinner";
|
|
21
|
+
import { Label } from "@camox/ui/label";
|
|
22
22
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@camox/ui/select";
|
|
23
23
|
import { Switch } from "@camox/ui/switch";
|
|
24
24
|
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
+
import { useNavigate } from "../../navigation/navigation.js";
|
|
1
2
|
import { useProjectSlug } from "../../../lib/auth.js";
|
|
2
3
|
import { blockQueries, layoutQueries, pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
|
|
3
|
-
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
4
4
|
import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
|
|
5
|
+
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
5
6
|
import { PageLocationFieldset } from "./PageLocationFieldset.js";
|
|
6
7
|
import { PageNicknameField } from "./PageNicknameField.js";
|
|
7
8
|
import { UploadDropZone } from "../../content/components/UploadDropZone.js";
|
|
8
9
|
import { useDebouncedField } from "../../../hooks/use-debounced-field.js";
|
|
9
10
|
import { DebouncedFieldEditor } from "./DebouncedFieldEditor.js";
|
|
11
|
+
import { Metadata, MetadataRow, formatRelativeTime } from "./Metadata.js";
|
|
10
12
|
import { ShikiMarkdown } from "./ShikiMarkdown.js";
|
|
11
13
|
import { c } from "react/compiler-runtime";
|
|
12
|
-
import { Input } from "@camox/ui/input";
|
|
13
|
-
import { Label } from "@camox/ui/label";
|
|
14
14
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
15
|
-
import { useNavigate } from "@tanstack/react-router";
|
|
16
15
|
import * as React from "react";
|
|
17
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
-
import { toast } from "@camox/ui/toaster";
|
|
19
17
|
import { Button } from "@camox/ui/button";
|
|
20
18
|
import { Globe, Info, Pencil, Trash2, Upload } from "lucide-react";
|
|
21
19
|
import { Alert, AlertDescription, AlertTitle } from "@camox/ui/alert";
|
|
22
20
|
import { Spinner } from "@camox/ui/spinner";
|
|
21
|
+
import { toast } from "@camox/ui/toaster";
|
|
23
22
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@camox/ui/dialog";
|
|
23
|
+
import { Label } from "@camox/ui/label";
|
|
24
24
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@camox/ui/select";
|
|
25
25
|
import { useForm } from "@tanstack/react-form";
|
|
26
26
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText } from "@camox/ui/input-group";
|
|
27
|
+
import { Input } from "@camox/ui/input";
|
|
27
28
|
import { Switch } from "@camox/ui/switch";
|
|
28
29
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
29
30
|
|
|
30
31
|
//#region src/features/preview/components/PageInfoSidebar.tsx
|
|
31
32
|
const usePageMetadataData = (pageId) => {
|
|
32
33
|
const $ = c(29);
|
|
33
|
-
if ($[0] !== "
|
|
34
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
34
35
|
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
35
|
-
$[0] = "
|
|
36
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
36
37
|
}
|
|
37
38
|
const projectSlug = useProjectSlug();
|
|
38
39
|
const camoxApp = useCamoxApp();
|
|
@@ -130,10 +131,10 @@ const usePageMetadataData = (pageId) => {
|
|
|
130
131
|
return t9;
|
|
131
132
|
};
|
|
132
133
|
const PageInfoSidebar = (t0) => {
|
|
133
|
-
const $ = c(
|
|
134
|
-
if ($[0] !== "
|
|
135
|
-
for (let $i = 0; $i <
|
|
136
|
-
$[0] = "
|
|
134
|
+
const $ = c(64);
|
|
135
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
136
|
+
for (let $i = 0; $i < 64; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
137
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
137
138
|
}
|
|
138
139
|
const { pageId } = t0;
|
|
139
140
|
const data = usePageMetadataData(pageId);
|
|
@@ -273,77 +274,160 @@ const PageInfoSidebar = (t0) => {
|
|
|
273
274
|
$[21] = t13;
|
|
274
275
|
} else t13 = $[21];
|
|
275
276
|
let t14;
|
|
276
|
-
if ($[22] !==
|
|
277
|
-
t14 =
|
|
277
|
+
if ($[22] !== page.createdAt) {
|
|
278
|
+
t14 = formatRelativeTime(page.createdAt);
|
|
279
|
+
$[22] = page.createdAt;
|
|
280
|
+
$[23] = t14;
|
|
281
|
+
} else t14 = $[23];
|
|
282
|
+
let t15;
|
|
283
|
+
if ($[24] !== t14) {
|
|
284
|
+
t15 = /* @__PURE__ */ jsx(MetadataRow, {
|
|
285
|
+
label: "Created",
|
|
286
|
+
children: t14
|
|
287
|
+
});
|
|
288
|
+
$[24] = t14;
|
|
289
|
+
$[25] = t15;
|
|
290
|
+
} else t15 = $[25];
|
|
291
|
+
const t16 = page.createdBy ?? "Unknown";
|
|
292
|
+
let t17;
|
|
293
|
+
if ($[26] !== t16) {
|
|
294
|
+
t17 = /* @__PURE__ */ jsx(MetadataRow, {
|
|
295
|
+
label: "Created by",
|
|
296
|
+
children: t16
|
|
297
|
+
});
|
|
298
|
+
$[26] = t16;
|
|
299
|
+
$[27] = t17;
|
|
300
|
+
} else t17 = $[27];
|
|
301
|
+
let t18;
|
|
302
|
+
if ($[28] !== page.updatedAt) {
|
|
303
|
+
t18 = formatRelativeTime(page.updatedAt);
|
|
304
|
+
$[28] = page.updatedAt;
|
|
305
|
+
$[29] = t18;
|
|
306
|
+
} else t18 = $[29];
|
|
307
|
+
let t19;
|
|
308
|
+
if ($[30] !== t18) {
|
|
309
|
+
t19 = /* @__PURE__ */ jsx(MetadataRow, {
|
|
310
|
+
label: "Updated",
|
|
311
|
+
children: t18
|
|
312
|
+
});
|
|
313
|
+
$[30] = t18;
|
|
314
|
+
$[31] = t19;
|
|
315
|
+
} else t19 = $[31];
|
|
316
|
+
let t20;
|
|
317
|
+
if ($[32] !== page.publishedAt) {
|
|
318
|
+
t20 = page.publishedAt == null ? "Never" : formatRelativeTime(page.publishedAt);
|
|
319
|
+
$[32] = page.publishedAt;
|
|
320
|
+
$[33] = t20;
|
|
321
|
+
} else t20 = $[33];
|
|
322
|
+
let t21;
|
|
323
|
+
if ($[34] !== t20) {
|
|
324
|
+
t21 = /* @__PURE__ */ jsx(MetadataRow, {
|
|
325
|
+
label: "Published",
|
|
326
|
+
children: t20
|
|
327
|
+
});
|
|
328
|
+
$[34] = t20;
|
|
329
|
+
$[35] = t21;
|
|
330
|
+
} else t21 = $[35];
|
|
331
|
+
let t22;
|
|
332
|
+
if ($[36] !== page.publishedAt || $[37] !== page.publishedBy) {
|
|
333
|
+
t22 = page.publishedAt != null && /* @__PURE__ */ jsx(MetadataRow, {
|
|
334
|
+
label: "Published by",
|
|
335
|
+
children: page.publishedBy ?? "Unknown"
|
|
336
|
+
});
|
|
337
|
+
$[36] = page.publishedAt;
|
|
338
|
+
$[37] = page.publishedBy;
|
|
339
|
+
$[38] = t22;
|
|
340
|
+
} else t22 = $[38];
|
|
341
|
+
let t23;
|
|
342
|
+
if ($[39] !== t15 || $[40] !== t17 || $[41] !== t19 || $[42] !== t21 || $[43] !== t22) {
|
|
343
|
+
t23 = /* @__PURE__ */ jsxs(Metadata, { children: [
|
|
344
|
+
t15,
|
|
345
|
+
t17,
|
|
346
|
+
t19,
|
|
347
|
+
t21,
|
|
348
|
+
t22
|
|
349
|
+
] });
|
|
350
|
+
$[39] = t15;
|
|
351
|
+
$[40] = t17;
|
|
352
|
+
$[41] = t19;
|
|
353
|
+
$[42] = t21;
|
|
354
|
+
$[43] = t22;
|
|
355
|
+
$[44] = t23;
|
|
356
|
+
} else t23 = $[44];
|
|
357
|
+
let t24;
|
|
358
|
+
if ($[45] !== t23 || $[46] !== t9) {
|
|
359
|
+
t24 = /* @__PURE__ */ jsxs("div", {
|
|
278
360
|
className: "flex-1 space-y-4 overflow-auto p-2 pt-4",
|
|
279
361
|
children: [
|
|
280
362
|
t9,
|
|
281
363
|
t11,
|
|
282
|
-
t13
|
|
364
|
+
t13,
|
|
365
|
+
t23
|
|
283
366
|
]
|
|
284
367
|
});
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
368
|
+
$[45] = t23;
|
|
369
|
+
$[46] = t9;
|
|
370
|
+
$[47] = t24;
|
|
371
|
+
} else t24 = $[47];
|
|
372
|
+
let t25;
|
|
373
|
+
if ($[48] !== isStructureModalOpen || $[49] !== page.id) {
|
|
374
|
+
t25 = /* @__PURE__ */ jsx(PageStructureModal, {
|
|
291
375
|
open: isStructureModalOpen,
|
|
292
376
|
onOpenChange: setIsStructureModalOpen,
|
|
293
377
|
pageId: page.id
|
|
294
378
|
});
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
} else
|
|
299
|
-
let
|
|
300
|
-
if ($[
|
|
301
|
-
|
|
379
|
+
$[48] = isStructureModalOpen;
|
|
380
|
+
$[49] = page.id;
|
|
381
|
+
$[50] = t25;
|
|
382
|
+
} else t25 = $[50];
|
|
383
|
+
let t26;
|
|
384
|
+
if ($[51] !== isSeoModalOpen || $[52] !== page.id) {
|
|
385
|
+
t26 = /* @__PURE__ */ jsx(PageSeoModal, {
|
|
302
386
|
open: isSeoModalOpen,
|
|
303
387
|
onOpenChange: setIsSeoModalOpen,
|
|
304
388
|
pageId: page.id
|
|
305
389
|
});
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
} else
|
|
310
|
-
const
|
|
311
|
-
let
|
|
312
|
-
if ($[
|
|
313
|
-
|
|
390
|
+
$[51] = isSeoModalOpen;
|
|
391
|
+
$[52] = page.id;
|
|
392
|
+
$[53] = t26;
|
|
393
|
+
} else t26 = $[53];
|
|
394
|
+
const t27 = page.metaDescription ?? "";
|
|
395
|
+
let t28;
|
|
396
|
+
if ($[54] !== isMarkdownModalOpen || $[55] !== metaTitle || $[56] !== page.id || $[57] !== t27) {
|
|
397
|
+
t28 = /* @__PURE__ */ jsx(PageMarkdownModal, {
|
|
314
398
|
open: isMarkdownModalOpen,
|
|
315
399
|
onOpenChange: setIsMarkdownModalOpen,
|
|
316
400
|
pageId: page.id,
|
|
317
401
|
metaTitle,
|
|
318
|
-
metaDescription:
|
|
402
|
+
metaDescription: t27
|
|
319
403
|
});
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
} else
|
|
326
|
-
let
|
|
327
|
-
if ($[
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
404
|
+
$[54] = isMarkdownModalOpen;
|
|
405
|
+
$[55] = metaTitle;
|
|
406
|
+
$[56] = page.id;
|
|
407
|
+
$[57] = t27;
|
|
408
|
+
$[58] = t28;
|
|
409
|
+
} else t28 = $[58];
|
|
410
|
+
let t29;
|
|
411
|
+
if ($[59] !== t24 || $[60] !== t25 || $[61] !== t26 || $[62] !== t28) {
|
|
412
|
+
t29 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
413
|
+
t24,
|
|
414
|
+
t25,
|
|
415
|
+
t26,
|
|
416
|
+
t28
|
|
333
417
|
] });
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
} else
|
|
340
|
-
return
|
|
418
|
+
$[59] = t24;
|
|
419
|
+
$[60] = t25;
|
|
420
|
+
$[61] = t26;
|
|
421
|
+
$[62] = t28;
|
|
422
|
+
$[63] = t29;
|
|
423
|
+
} else t29 = $[63];
|
|
424
|
+
return t29;
|
|
341
425
|
};
|
|
342
426
|
const PageNicknameSidebarEditor = (t0) => {
|
|
343
427
|
const $ = c(21);
|
|
344
|
-
if ($[0] !== "
|
|
428
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
345
429
|
for (let $i = 0; $i < 21; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
346
|
-
$[0] = "
|
|
430
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
347
431
|
}
|
|
348
432
|
const { data } = t0;
|
|
349
433
|
const { page } = data;
|
|
@@ -452,9 +536,9 @@ const PageNicknameSidebarEditor = (t0) => {
|
|
|
452
536
|
};
|
|
453
537
|
const PageLayoutSidebarSelect = (t0) => {
|
|
454
538
|
const $ = c(30);
|
|
455
|
-
if ($[0] !== "
|
|
539
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
456
540
|
for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
457
|
-
$[0] = "
|
|
541
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
458
542
|
}
|
|
459
543
|
const { data } = t0;
|
|
460
544
|
const { page, layouts, camoxApp } = data;
|
|
@@ -586,9 +670,9 @@ const PageLayoutSidebarSelect = (t0) => {
|
|
|
586
670
|
};
|
|
587
671
|
const PageStructureModal = (t0) => {
|
|
588
672
|
const $ = c(10);
|
|
589
|
-
if ($[0] !== "
|
|
673
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
590
674
|
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
591
|
-
$[0] = "
|
|
675
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
592
676
|
}
|
|
593
677
|
const { open, onOpenChange, pageId } = t0;
|
|
594
678
|
const data = usePageMetadataData(pageId);
|
|
@@ -762,9 +846,9 @@ const PageStructureEditor = ({ data, includeNickname = true, includeLayout = tru
|
|
|
762
846
|
};
|
|
763
847
|
const PageSeoModal = (t0) => {
|
|
764
848
|
const $ = c(11);
|
|
765
|
-
if ($[0] !== "
|
|
849
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
766
850
|
for (let $i = 0; $i < 11; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
767
|
-
$[0] = "
|
|
851
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
768
852
|
}
|
|
769
853
|
const { open, onOpenChange, pageId } = t0;
|
|
770
854
|
const { page, metaTitle, pageLayoutRecord, project } = usePageMetadataData(pageId);
|
|
@@ -809,9 +893,9 @@ const PageSeoModal = (t0) => {
|
|
|
809
893
|
};
|
|
810
894
|
const PageSeoEditor = (t0) => {
|
|
811
895
|
const $ = c(43);
|
|
812
|
-
if ($[0] !== "
|
|
896
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
813
897
|
for (let $i = 0; $i < 43; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
814
|
-
$[0] = "
|
|
898
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
815
899
|
}
|
|
816
900
|
const { page, metaTitle, layoutId, projectName } = t0;
|
|
817
901
|
let t1;
|
|
@@ -984,9 +1068,9 @@ const PageSeoEditor = (t0) => {
|
|
|
984
1068
|
};
|
|
985
1069
|
const PageMarkdownModal = (t0) => {
|
|
986
1070
|
const $ = c(10);
|
|
987
|
-
if ($[0] !== "
|
|
1071
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
988
1072
|
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
989
|
-
$[0] = "
|
|
1073
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
990
1074
|
}
|
|
991
1075
|
const { open, onOpenChange, pageId, metaTitle, metaDescription } = t0;
|
|
992
1076
|
let t1;
|
|
@@ -1029,9 +1113,9 @@ function truncateText(text, maxLen) {
|
|
|
1029
1113
|
}
|
|
1030
1114
|
const SearchEnginePreview = (t0) => {
|
|
1031
1115
|
const $ = c(17);
|
|
1032
|
-
if ($[0] !== "
|
|
1116
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
1033
1117
|
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1034
|
-
$[0] = "
|
|
1118
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
1035
1119
|
}
|
|
1036
1120
|
const { page, metaTitle, metaDescription } = t0;
|
|
1037
1121
|
const url = `${typeof window !== "undefined" ? window.location.origin : ""}${page.fullPath}`;
|
|
@@ -1114,9 +1198,9 @@ const SearchEnginePreview = (t0) => {
|
|
|
1114
1198
|
};
|
|
1115
1199
|
const SocialPreviewSection = (t0) => {
|
|
1116
1200
|
const $ = c(60);
|
|
1117
|
-
if ($[0] !== "
|
|
1201
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
1118
1202
|
for (let $i = 0; $i < 60; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1119
|
-
$[0] = "
|
|
1203
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
1120
1204
|
}
|
|
1121
1205
|
const { page, metaTitle, metaDescription, layoutId, projectName } = t0;
|
|
1122
1206
|
const pageMetaTitle = page.metaTitle ?? page.pathSegment;
|
|
@@ -1390,9 +1474,9 @@ const SocialPreviewSection = (t0) => {
|
|
|
1390
1474
|
};
|
|
1391
1475
|
const PageMarkdownPreview = (t0) => {
|
|
1392
1476
|
const $ = c(9);
|
|
1393
|
-
if ($[0] !== "
|
|
1477
|
+
if ($[0] !== "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0") {
|
|
1394
1478
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1395
|
-
$[0] = "
|
|
1479
|
+
$[0] = "f125b22ca9b1cdd5f8ebaad664afb96f1358e712b847c82ca5543019e76a82a0";
|
|
1396
1480
|
}
|
|
1397
1481
|
const { pageId, metaTitle, metaDescription } = t0;
|
|
1398
1482
|
let t1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { Label } from "@camox/ui/label";
|
|
3
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Label } from "@camox/ui/label";
|
|
4
4
|
import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger, SelectValue } from "@camox/ui/select";
|
|
5
5
|
import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from "@camox/ui/input-group";
|
|
6
6
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
+
import { useLocation } from "../../navigation/navigation.js";
|
|
1
2
|
import { actionsStore } from "../../provider/actionsStore.js";
|
|
2
3
|
import { useProjectSlug } from "../../../lib/auth.js";
|
|
3
4
|
import { pageMutations } from "../../../lib/queries.js";
|
|
4
|
-
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
5
5
|
import { cn } from "../../../lib/utils.js";
|
|
6
|
+
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
6
7
|
import { previewStore } from "../previewStore.js";
|
|
7
8
|
import { pageFullQueryFn } from "../previewQueryFns.js";
|
|
8
9
|
import { PagePicker } from "./PagePicker.js";
|
|
9
10
|
import { PageTree } from "./PageTree.js";
|
|
10
11
|
import { PublishDialog } from "./PublishDialog.js";
|
|
11
12
|
import { c } from "react/compiler-runtime";
|
|
12
|
-
import { Label } from "@camox/ui/label";
|
|
13
13
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
14
|
-
import { useLocation } from "@tanstack/react-router";
|
|
15
|
-
import { useSelector } from "@xstate/store-react";
|
|
16
14
|
import * as React from "react";
|
|
17
|
-
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
18
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
import {
|
|
16
|
+
import { useSelector } from "@xstate/store-react";
|
|
17
|
+
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
20
18
|
import { Button } from "@camox/ui/button";
|
|
21
19
|
import { MoreHorizontal } from "lucide-react";
|
|
22
20
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
|
|
21
|
+
import { toast } from "@camox/ui/toaster";
|
|
23
22
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@camox/ui/dropdown-menu";
|
|
23
|
+
import { Label } from "@camox/ui/label";
|
|
24
24
|
import { PanelContent, PanelHeader } from "@camox/ui/panel";
|
|
25
25
|
import { ButtonGroup } from "@camox/ui/button-group";
|
|
26
26
|
import { Switch } from "@camox/ui/switch";
|
|
@@ -28,9 +28,9 @@ import { Switch } from "@camox/ui/switch";
|
|
|
28
28
|
//#region src/features/preview/components/PageNavigatorSidebar.tsx
|
|
29
29
|
const PageNavigatorPublishRow = (t0) => {
|
|
30
30
|
const $ = c(102);
|
|
31
|
-
if ($[0] !== "
|
|
31
|
+
if ($[0] !== "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827") {
|
|
32
32
|
for (let $i = 0; $i < 102; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
33
|
-
$[0] = "
|
|
33
|
+
$[0] = "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827";
|
|
34
34
|
}
|
|
35
35
|
const { page } = t0;
|
|
36
36
|
const previewSource = useSelector(previewStore, _temp);
|
|
@@ -519,9 +519,9 @@ const PageNavigatorPublishRow = (t0) => {
|
|
|
519
519
|
};
|
|
520
520
|
const PageNavigatorSidebar = (t0) => {
|
|
521
521
|
const $ = c(8);
|
|
522
|
-
if ($[0] !== "
|
|
522
|
+
if ($[0] !== "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827") {
|
|
523
523
|
for (let $i = 0; $i < 8; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
524
|
-
$[0] = "
|
|
524
|
+
$[0] = "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827";
|
|
525
525
|
}
|
|
526
526
|
const { page } = t0;
|
|
527
527
|
let t1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { Input } from "@camox/ui/input";
|
|
3
|
-
import { Label } from "@camox/ui/label";
|
|
4
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Label } from "@camox/ui/label";
|
|
4
|
+
import { Input } from "@camox/ui/input";
|
|
5
5
|
|
|
6
6
|
//#region src/features/preview/components/PageNicknameField.tsx
|
|
7
7
|
const PAGE_NICKNAME_MAX_LENGTH = 80;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import { useLocation, useNavigate } from "../../navigation/navigation.js";
|
|
1
2
|
import { useProjectSlug } from "../../../lib/auth.js";
|
|
2
3
|
import { pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
|
|
3
4
|
import { cn } from "../../../lib/utils.js";
|
|
4
5
|
import { previewStore } from "../previewStore.js";
|
|
5
6
|
import { PageStatusBadge } from "./PageStatusBadge.js";
|
|
6
|
-
import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
|
|
7
7
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
8
|
-
import { useLocation, useNavigate } from "@tanstack/react-router";
|
|
9
|
-
import { useSelector } from "@xstate/store-react";
|
|
10
8
|
import * as React from "react";
|
|
11
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import {
|
|
10
|
+
import { useSelector } from "@xstate/store-react";
|
|
13
11
|
import { Button } from "@camox/ui/button";
|
|
14
12
|
import { Check, ChevronsUpDown, Pencil, Plus, Trash2 } from "lucide-react";
|
|
15
13
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
|
|
14
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
|
|
15
|
+
import { toast } from "@camox/ui/toaster";
|
|
16
16
|
import { Skeleton } from "@camox/ui/skeleton";
|
|
17
17
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "@camox/ui/command";
|
|
18
18
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { previewStore } from "../previewStore.js";
|
|
3
1
|
import { usePageBlocks } from "../../../lib/normalized-data.js";
|
|
2
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
3
|
import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
|
|
4
|
+
import { previewStore } from "../previewStore.js";
|
|
5
5
|
import { useRequireDraftSource } from "../../../core/hooks/useRequireDraftSource.js";
|
|
6
6
|
import { useUpdateBlockPosition } from "./useUpdateBlockPosition.js";
|
|
7
7
|
import { BlockActionsPopover } from "./BlockActionsPopover.js";
|
|
8
8
|
import { usePreviewedPage } from "../CamoxPreview.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
|
-
import { useSelector } from "@xstate/store-react";
|
|
11
10
|
import * as React from "react";
|
|
12
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { useSelector } from "@xstate/store-react";
|
|
13
13
|
import { Button } from "@camox/ui/button";
|
|
14
14
|
import { Ellipsis, GripVertical, LayoutTemplate, Plus } from "lucide-react";
|
|
15
15
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { previewStore } from "../previewStore.js";
|
|
2
1
|
import { NormalizedDataProvider } from "../../../lib/normalized-data.js";
|
|
3
2
|
import { BlockErrorBoundary } from "./BlockErrorBoundary.js";
|
|
3
|
+
import { previewStore } from "../previewStore.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { useSelector } from "@xstate/store-react";
|
|
6
5
|
import * as React from "react";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { useSelector } from "@xstate/store-react";
|
|
8
8
|
|
|
9
9
|
//#region src/features/preview/components/PeekedBlock.tsx
|
|
10
10
|
const PeekedBlock = (t0) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { actionsStore } from "../../provider/actionsStore.js";
|
|
2
2
|
import { checkIfInputFocused, cn } from "../../../lib/utils.js";
|
|
3
|
-
import { Frame, useFrame } from "./Frame.js";
|
|
4
3
|
import { previewStore } from "../previewStore.js";
|
|
5
4
|
import { useBlockActionsShortcuts } from "./BlockActionsPopover.js";
|
|
6
5
|
import { FieldOverlayStyles } from "./FieldOverlayStyles.js";
|
|
7
6
|
import { FieldToolbar } from "./FieldToolbar.js";
|
|
7
|
+
import { Frame, useFrame } from "./Frame.js";
|
|
8
8
|
import { Overlays } from "./Overlays.js";
|
|
9
9
|
import { OverlayTracker } from "./OverlayTracker.js";
|
|
10
10
|
import { PreviewToolbar } from "./PreviewToolbar.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
12
|
-
import { useSelector } from "@xstate/store-react";
|
|
13
12
|
import * as React from "react";
|
|
14
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { useSelector } from "@xstate/store-react";
|
|
15
15
|
import { PanelContent } from "@camox/ui/panel";
|
|
16
16
|
|
|
17
17
|
//#region src/features/preview/components/PreviewPanel.tsx
|
|
@@ -2,11 +2,11 @@ import { actionsStore } from "../../provider/actionsStore.js";
|
|
|
2
2
|
import { getActionShortcut } from "../../../lib/utils.js";
|
|
3
3
|
import { previewStore } from "../previewStore.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { Label } from "@camox/ui/label";
|
|
6
|
-
import { useSelector } from "@xstate/store-react";
|
|
7
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useSelector } from "@xstate/store-react";
|
|
8
7
|
import { Button } from "@camox/ui/button";
|
|
9
8
|
import { Monitor, Smartphone, Tablet, X } from "lucide-react";
|
|
9
|
+
import { Label } from "@camox/ui/label";
|
|
10
10
|
import { ButtonGroup } from "@camox/ui/button-group";
|
|
11
11
|
import { Switch } from "@camox/ui/switch";
|
|
12
12
|
import * as Tooltip$1 from "@camox/ui/tooltip";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { pageMutations } from "../../../lib/queries.js";
|
|
2
2
|
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
3
|
-
import { Label } from "@camox/ui/label";
|
|
4
3
|
import { useMutation } from "@tanstack/react-query";
|
|
5
4
|
import * as React from "react";
|
|
6
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { toast } from "@camox/ui/toaster";
|
|
8
6
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
|
|
7
|
+
import { toast } from "@camox/ui/toaster";
|
|
8
|
+
import { Label } from "@camox/ui/label";
|
|
9
9
|
import { Switch } from "@camox/ui/switch";
|
|
10
10
|
|
|
11
11
|
//#region src/features/preview/components/PublishDialog.tsx
|
|
@@ -4,8 +4,8 @@ import { previewStore, selectionItemId } from "../previewStore.js";
|
|
|
4
4
|
import { useRepeatableItemActions } from "./useRepeatableItemActions.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { useMutation } from "@tanstack/react-query";
|
|
7
|
-
import { useSelector } from "@xstate/store-react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { useSelector } from "@xstate/store-react";
|
|
9
9
|
import { Button } from "@camox/ui/button";
|
|
10
10
|
import { CircleMinus, CirclePlus, GripVertical } from "lucide-react";
|
|
11
11
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
@@ -3,8 +3,8 @@ import { AgentChatSidebar } from "../../agent-chat/components/AgentChatSidebar.j
|
|
|
3
3
|
import { PageEditorSidebar } from "./PageEditorSidebar.js";
|
|
4
4
|
import { PageInfoSidebar } from "./PageInfoSidebar.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { useSelector } from "@xstate/store-react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { useSelector } from "@xstate/store-react";
|
|
8
8
|
|
|
9
9
|
//#region src/features/preview/components/RightSidebar.tsx
|
|
10
10
|
const getRightSidebarRoute = ({ pageId, selectedBlockId, isAgentChatSidebarOpen }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { repeatableItemMutations } from "../../../lib/queries.js";
|
|
2
|
-
import { previewStore } from "../previewStore.js";
|
|
3
2
|
import "../../provider/components/CamoxAppContext.js";
|
|
3
|
+
import { previewStore } from "../previewStore.js";
|
|
4
4
|
import { useRequireDraftSource } from "../../../core/hooks/useRequireDraftSource.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { useMutation, useQuery } from "@tanstack/react-query";
|