camox 0.41.1 → 0.43.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/{GradientNode.js → HighlightNode.js} +34 -34
- package/dist/core/components/lexical/InlineLexicalEditor.js +14 -14
- package/dist/core/components/lexical/InlineStylesPlugin.js +6 -6
- package/dist/core/components/lexical/SelectionBroadcaster.js +5 -5
- package/dist/core/components/lexical/SidebarLexicalEditor.js +52 -49
- package/dist/core/components/lexical/TextLinkPopover.js +191 -208
- package/dist/core/components/lexical/editorConfig.js +2 -2
- package/dist/core/createApp.d.ts +19 -4
- package/dist/core/createApp.js +2 -1
- package/dist/core/createLayout.d.ts +16 -3
- package/dist/core/createLayout.js +15 -15
- package/dist/core/derivedRoutes.js +1 -1
- package/dist/core/dom.d.ts +17 -0
- package/dist/core/dom.js +22 -0
- package/dist/core/editing/createEditableBlock.d.ts +8 -1
- package/dist/core/editing/createEditableBlock.js +636 -459
- package/dist/core/hooks/useOverlayState.js +11 -0
- package/dist/core/lib/fieldTypes.js +5 -5
- package/dist/core/lib/lexicalReact.js +4 -4
- package/dist/core/lib/lexicalState.js +20 -4
- package/dist/core/lib/modifierFormats.js +1 -1
- package/dist/core/lib/textLinks.js +5 -2
- package/dist/core/lib/textStyles.d.ts +2 -2
- package/dist/core/lib/textStyles.js +6 -11
- package/dist/core/pageDestinations.js +37 -0
- package/dist/features/og/imageResponse.node.js +11 -9
- package/dist/features/preview/CamoxPreview.js +108 -124
- package/dist/features/preview/commentsEnabled.js +8 -0
- package/dist/features/preview/components/AddBlockSidebar.js +80 -90
- package/dist/features/preview/components/AssetLightbox.js +4 -11
- package/dist/features/preview/components/AttachedComments.js +194 -0
- package/dist/features/preview/components/BlockActionsPopover.js +14 -65
- package/dist/features/preview/components/CommentHeader.js +122 -0
- package/dist/features/preview/components/CommentSidebar.js +29 -0
- package/dist/features/preview/components/CommentTargetQuote.js +166 -0
- package/dist/features/preview/components/CreatePageModal.js +4 -10
- package/dist/features/preview/components/DerivedLayoutSidebar.js +45 -26
- package/dist/features/preview/components/DerivedPageInfoSidebar.js +38 -26
- package/dist/features/preview/components/FieldToolbar.js +7 -7
- package/dist/features/preview/components/ItemFieldsEditor.js +275 -204
- package/dist/features/preview/components/LeftSidebar.js +18 -18
- package/dist/features/preview/components/LinkFieldEditor.js +212 -209
- package/dist/features/preview/components/OverlayTracker.js +14 -20
- package/dist/features/preview/components/Overlays.js +26 -35
- package/dist/features/preview/components/PageEditorSidebar.js +90 -91
- package/dist/features/preview/components/PageInfoSidebar.js +128 -159
- package/dist/features/preview/components/PagePicker.js +29 -24
- package/dist/features/preview/components/PageTree.js +159 -157
- package/dist/features/preview/components/PreviewComments.js +56 -0
- package/dist/features/preview/components/PreviewPanel.js +122 -78
- package/dist/features/preview/components/PreviewToolbar.js +280 -231
- package/dist/features/preview/components/PublicationRow.js +8 -11
- package/dist/features/preview/components/RightSidebar.js +14 -11
- package/dist/features/preview/components/SidebarSection.js +121 -0
- package/dist/features/preview/components/useRepeatableItemActions.js +1 -1
- package/dist/features/preview/previewCommentsStore.js +115 -0
- package/dist/features/preview/previewSelection.js +75 -0
- package/dist/features/preview/previewStore.js +19 -39
- package/dist/features/preview/publication.js +10 -0
- package/dist/features/provider/AuthenticatedCamoxProvider.js +46 -34
- package/dist/features/provider/CoreCamoxProvider.js +1 -1
- package/dist/features/provider/components/CommandPalette.js +142 -58
- package/dist/features/provider/useAdminShortcuts.js +19 -8
- package/dist/features/routes/pageRuntime.js +0 -6
- package/dist/features/runtime/RuntimeChrome.js +40 -37
- package/dist/features/runtime/runtime.js +20 -21
- package/dist/features/studio/CamoxStudio.js +30 -50
- package/dist/features/studio/components/EnvironmentMenu.js +3 -2
- package/dist/features/studio/components/Navbar.js +53 -80
- package/dist/features/vite/layoutGeneration.js +7 -3
- package/dist/features/vite/runtimeDev.js +4 -1
- package/dist/features/vite/vite.d.ts +3 -2
- package/dist/features/vite/vite.js +14 -6
- package/dist/hooks/use-file-upload.js +0 -2
- package/dist/hooks/use-page-destinations.js +53 -0
- package/dist/lib/auth.js +11 -14
- package/dist/lib/server-auth-cookie.js +21 -0
- package/dist/studio.css +1 -1
- package/package.json +9 -7
- package/skills/camox/SKILL.md +32 -9
- package/skills/camox/references/block-definitions.md +84 -290
- package/skills/camox/references/cli-common.md +2 -4
- package/skills/camox/references/cli-content.md +147 -0
- package/skills/camox/references/cli-environments.md +1 -1
- package/skills/camox/references/dom-integrations.md +93 -0
- package/skills/camox/references/field-styling.md +50 -0
- package/skills/camox/references/layout-definitions.md +33 -147
- package/skills/camox/references/routed-layouts.md +71 -0
- package/skills/camoxify/SKILL.md +52 -0
- package/dist/lib/telemetry-client.js +0 -66
- package/dist/lib/telemetry.js +0 -26
- package/skills/camox/references/cli-blocks.md +0 -78
- package/skills/camox/references/cli-pages.md +0 -53
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Alert, AlertDescription, AlertTitle } from "@camox/ui/alert";
|
|
5
5
|
|
|
6
6
|
//#region src/features/preview/components/DerivedPageInfoSidebar.tsx
|
|
7
7
|
function DerivedPageInfoSidebar(t0) {
|
|
8
|
-
const $ = c(
|
|
9
|
-
if ($[0] !== "
|
|
10
|
-
for (let $i = 0; $i <
|
|
11
|
-
$[0] = "
|
|
8
|
+
const $ = c(13);
|
|
9
|
+
if ($[0] !== "4055e1683cf89ee8b21c17d486a36f5d2dcf14d6cea02195afa4565d830e71cf") {
|
|
10
|
+
for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
11
|
+
$[0] = "4055e1683cf89ee8b21c17d486a36f5d2dcf14d6cea02195afa4565d830e71cf";
|
|
12
12
|
}
|
|
13
13
|
const { layoutId } = t0;
|
|
14
14
|
const camoxApp = useCamoxApp();
|
|
@@ -19,7 +19,9 @@ function DerivedPageInfoSidebar(t0) {
|
|
|
19
19
|
$[2] = layoutId;
|
|
20
20
|
$[3] = t1;
|
|
21
21
|
} else t1 = $[3];
|
|
22
|
-
const
|
|
22
|
+
const layout = t1;
|
|
23
|
+
const layoutName = layout?._internal.title ?? layoutId;
|
|
24
|
+
const singleton = layout?._internal.kind === "singleton";
|
|
23
25
|
let t2;
|
|
24
26
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
25
27
|
t2 = /* @__PURE__ */ jsx("p", {
|
|
@@ -28,29 +30,39 @@ function DerivedPageInfoSidebar(t0) {
|
|
|
28
30
|
});
|
|
29
31
|
$[4] = t2;
|
|
30
32
|
} else t2 = $[4];
|
|
31
|
-
|
|
32
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
33
|
-
t3 = /* @__PURE__ */ jsx(AlertTitle, { children: "Derived page" });
|
|
34
|
-
$[5] = t3;
|
|
35
|
-
} else t3 = $[5];
|
|
33
|
+
const t3 = singleton ? "Singleton page" : "Derived page";
|
|
36
34
|
let t4;
|
|
37
|
-
if ($[
|
|
38
|
-
t4 = /* @__PURE__ */
|
|
35
|
+
if ($[5] !== t3) {
|
|
36
|
+
t4 = /* @__PURE__ */ jsx(AlertTitle, { children: t3 });
|
|
37
|
+
$[5] = t3;
|
|
38
|
+
$[6] = t4;
|
|
39
|
+
} else t4 = $[6];
|
|
40
|
+
let t5;
|
|
41
|
+
if ($[7] !== layoutName || $[8] !== singleton) {
|
|
42
|
+
t5 = /* @__PURE__ */ jsx(AlertDescription, { children: singleton ? /* @__PURE__ */ jsx(Fragment, { children: "This page and its URL are defined in code. Select a block in the preview to edit its content. The page cannot be deleted or moved in Studio." }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
|
+
"This page is generated using the",
|
|
44
|
+
" ",
|
|
45
|
+
/* @__PURE__ */ jsx("strong", {
|
|
46
|
+
className: "font-semibold italic",
|
|
47
|
+
children: layoutName
|
|
48
|
+
}),
|
|
49
|
+
" layout. Select a shared block in the preview to edit it."
|
|
50
|
+
] }) });
|
|
51
|
+
$[7] = layoutName;
|
|
52
|
+
$[8] = singleton;
|
|
53
|
+
$[9] = t5;
|
|
54
|
+
} else t5 = $[9];
|
|
55
|
+
let t6;
|
|
56
|
+
if ($[10] !== t4 || $[11] !== t5) {
|
|
57
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
39
58
|
className: "flex-1 space-y-4 p-2 pt-4",
|
|
40
|
-
children: [t2, /* @__PURE__ */ jsxs(Alert, { children: [
|
|
41
|
-
"This page is generated using the",
|
|
42
|
-
" ",
|
|
43
|
-
/* @__PURE__ */ jsx("strong", {
|
|
44
|
-
className: "font-semibold italic",
|
|
45
|
-
children: layoutName
|
|
46
|
-
}),
|
|
47
|
-
" layout. Select a shared block in the preview to edit it."
|
|
48
|
-
] })] })]
|
|
59
|
+
children: [t2, /* @__PURE__ */ jsxs(Alert, { children: [t4, t5] })]
|
|
49
60
|
});
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
$[10] = t4;
|
|
62
|
+
$[11] = t5;
|
|
63
|
+
$[12] = t6;
|
|
64
|
+
} else t6 = $[12];
|
|
65
|
+
return t6;
|
|
54
66
|
}
|
|
55
67
|
|
|
56
68
|
//#endregion
|
|
@@ -9,7 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { useSelector } from "@xstate/store-react";
|
|
10
10
|
import { Kbd } from "@camox/ui/kbd";
|
|
11
11
|
import { Button } from "@camox/ui/button";
|
|
12
|
-
import {
|
|
12
|
+
import { Bold, Highlighter, Italic, Underline } from "lucide-react";
|
|
13
13
|
import * as Tooltip$1 from "@camox/ui/tooltip";
|
|
14
14
|
import { ButtonGroup } from "@camox/ui/button-group";
|
|
15
15
|
import { FloatingToolbar } from "@camox/ui/floating-toolbar";
|
|
@@ -39,18 +39,18 @@ const FORMAT_BUTTONS = [
|
|
|
39
39
|
shortcut: "⌘ U"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
key: "
|
|
43
|
-
flag: FORMAT_FLAGS.
|
|
44
|
-
icon:
|
|
45
|
-
label: "
|
|
42
|
+
key: "highlight",
|
|
43
|
+
flag: FORMAT_FLAGS.highlight,
|
|
44
|
+
icon: Highlighter,
|
|
45
|
+
label: "Highlight",
|
|
46
46
|
shortcut: null
|
|
47
47
|
}
|
|
48
48
|
];
|
|
49
49
|
const FieldToolbar = () => {
|
|
50
50
|
const $ = c(28);
|
|
51
|
-
if ($[0] !== "
|
|
51
|
+
if ($[0] !== "cb7cd90f7cc268633db3dcbb4458cac864e661f9d57f1cb6764d8a2f3e167b39") {
|
|
52
52
|
for (let $i = 0; $i < 28; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
53
|
-
$[0] = "
|
|
53
|
+
$[0] = "cb7cd90f7cc268633db3dcbb4458cac864e661f9d57f1cb6764d8a2f3e167b39";
|
|
54
54
|
}
|
|
55
55
|
const iframeElement = useSelector(previewStore, _temp);
|
|
56
56
|
const [hasSelection, setHasSelection] = React.useState(false);
|