camox 0.6.0 → 0.7.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/AddBlockControlBar.d.ts.map +1 -1
- package/dist/core/components/AddBlockControlBar.js +51 -117
- package/dist/core/components/lexical/InlineLexicalEditor.js +1 -1
- package/dist/core/components/lexical/SidebarLexicalEditor.js +1 -1
- package/dist/core/createApp.d.ts +314 -44
- package/dist/core/createApp.d.ts.map +1 -1
- package/dist/core/createBlock.d.ts +160 -22
- package/dist/core/createBlock.d.ts.map +1 -1
- package/dist/core/createBlock.js +467 -579
- package/dist/features/content/components/AssetCard.js +1 -1
- package/dist/features/preview/CamoxPreview.d.ts.map +1 -1
- package/dist/features/preview/CamoxPreview.js +12 -16
- package/dist/features/preview/components/AddBlockSheet.d.ts.map +1 -1
- package/dist/features/preview/components/AddBlockSheet.js +1 -2
- package/dist/features/preview/components/AssetLightbox.d.ts.map +1 -1
- package/dist/features/preview/components/AssetLightbox.js +13 -15
- package/dist/features/preview/components/BlockActionsPopover.d.ts.map +1 -1
- package/dist/features/preview/components/BlockActionsPopover.js +19 -22
- package/dist/features/preview/components/CreatePageSheet.d.ts.map +1 -1
- package/dist/features/preview/components/CreatePageSheet.js +10 -4
- package/dist/features/preview/components/EditPageSheet.d.ts +1 -1
- package/dist/features/preview/components/EditPageSheet.d.ts.map +1 -1
- package/dist/features/preview/components/EditPageSheet.js +20 -17
- package/dist/features/preview/components/FieldOverlayStyles.d.ts +2 -0
- package/dist/features/preview/components/FieldOverlayStyles.d.ts.map +1 -0
- package/dist/features/preview/components/FieldOverlayStyles.js +15 -0
- package/dist/features/preview/components/Frame.d.ts +20 -0
- package/dist/features/preview/components/Frame.d.ts.map +1 -0
- package/dist/features/preview/components/Frame.js +162 -0
- package/dist/features/preview/components/LinkFieldEditor.d.ts.map +1 -1
- package/dist/features/preview/components/LinkFieldEditor.js +11 -12
- package/dist/features/preview/components/OverlayTracker.js +1 -1
- package/dist/features/preview/components/PageContentSheet.d.ts.map +1 -1
- package/dist/features/preview/components/PageContentSheet.js +3 -3
- package/dist/features/preview/components/PageLocationFieldset.d.ts.map +1 -1
- package/dist/features/preview/components/PageLocationFieldset.js +9 -11
- package/dist/features/preview/components/PagePicker.d.ts.map +1 -1
- package/dist/features/preview/components/PagePicker.js +15 -15
- package/dist/features/preview/components/PageTree.d.ts.map +1 -1
- package/dist/features/preview/components/PageTree.js +215 -203
- package/dist/features/preview/components/PreviewPanel.d.ts.map +1 -1
- package/dist/features/preview/components/PreviewPanel.js +21 -15
- package/dist/features/preview/components/PreviewSideSheet.d.ts.map +1 -1
- package/dist/features/preview/components/PreviewSideSheet.js +42 -26
- package/dist/features/preview/components/PreviewToolbar.d.ts.map +1 -1
- package/dist/features/preview/components/PreviewToolbar.js +191 -171
- package/dist/features/preview/components/RepeatableItemsList.d.ts.map +1 -1
- package/dist/features/preview/components/RepeatableItemsList.js +4 -5
- package/dist/features/preview/components/TextFormatToolbar.d.ts.map +1 -1
- package/dist/features/preview/components/TextFormatToolbar.js +5 -6
- package/dist/features/preview/components/UnlinkAssetButton.d.ts.map +1 -1
- package/dist/features/preview/components/UnlinkAssetButton.js +70 -91
- package/dist/features/preview/studio-overlays.css?inline.js +4 -0
- package/dist/features/provider/components/CamoxAppContext.d.ts +314 -44
- package/dist/features/provider/components/CamoxAppContext.d.ts.map +1 -1
- package/dist/features/provider/components/CommandPalette.d.ts.map +1 -1
- package/dist/features/provider/components/CommandPalette.js +22 -14
- package/dist/features/studio/CamoxStudio.d.ts +2 -3
- package/dist/features/studio/CamoxStudio.d.ts.map +1 -1
- package/dist/features/studio/components/EnvironmentMenu.d.ts.map +1 -1
- package/dist/features/studio/components/EnvironmentMenu.js +39 -35
- package/dist/features/studio/components/Navbar.js +2 -2
- package/dist/features/studio/components/ProjectMenu.d.ts.map +1 -1
- package/dist/features/studio/components/ProjectMenu.js +143 -129
- package/dist/features/studio/components/UserButton.d.ts.map +1 -1
- package/dist/features/studio/components/UserButton.js +8 -9
- package/dist/features/vite/definitionsSync.d.ts.map +1 -1
- package/dist/features/vite/definitionsSync.js +24 -2
- package/dist/features/vite/vite.d.ts +2 -0
- package/dist/features/vite/vite.d.ts.map +1 -1
- package/dist/features/vite/vite.js +27 -31
- package/dist/lib/api-client.d.ts +17 -17
- package/dist/lib/queries.d.ts +7 -7
- package/dist/studio.css +1 -1
- package/package.json +5 -6
- package/skills/camox-block/SKILL.md +55 -28
- package/dist/features/preview/overlayConstants.d.ts +0 -19
- package/dist/features/preview/overlayConstants.d.ts.map +0 -1
- package/dist/features/preview/overlayConstants.js +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { previewStore } from "../previewStore.js";
|
|
2
|
+
import { useFrame } from "./Frame.js";
|
|
2
3
|
import { isOverlayMessage } from "../overlayMessages.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { useFrame } from "@camox/ui/frame";
|
|
5
5
|
import { useSelector } from "@xstate/store/react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
//#region src/features/preview/components/OverlayTracker.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContentSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PageContentSheet.tsx"],"names":[],"mappings":"AAgHA,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"PageContentSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PageContentSheet.tsx"],"names":[],"mappings":"AAgHA,QAAA,MAAM,gBAAgB,sDAmcrB,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -254,8 +254,8 @@ var PageContentSheet = () => {
|
|
|
254
254
|
children: [/* @__PURE__ */ jsxs(Sheet.SheetHeader, {
|
|
255
255
|
className: "border-border border-b",
|
|
256
256
|
children: [/* @__PURE__ */ jsx(Sheet.SheetTitle, { children: block.summary }), /* @__PURE__ */ jsx(Sheet.SheetDescription, {
|
|
257
|
-
|
|
258
|
-
children: /* @__PURE__ */
|
|
257
|
+
render: /* @__PURE__ */ jsx(Breadcrumb, {}),
|
|
258
|
+
children: /* @__PURE__ */ jsxs(BreadcrumbList, {
|
|
259
259
|
className: "flex-nowrap",
|
|
260
260
|
children: [
|
|
261
261
|
/* @__PURE__ */ jsx(BreadcrumbItem, {
|
|
@@ -316,7 +316,7 @@ var PageContentSheet = () => {
|
|
|
316
316
|
})
|
|
317
317
|
})] })
|
|
318
318
|
]
|
|
319
|
-
})
|
|
319
|
+
})
|
|
320
320
|
})]
|
|
321
321
|
}), /* @__PURE__ */ jsxs("div", {
|
|
322
322
|
className: "flex-1 overflow-auto",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageLocationFieldset.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PageLocationFieldset.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PageLocationFieldset.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PageLocationFieldset.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAK1C,KAAK,yBAAyB,GAAG;IAC/B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC;IAC1B,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,oBAAoB,GAAI,2GAQ3B,yBAAyB,4CAmE3B,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { formatPathSegment } from "../../../lib/utils.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { Input } from "@camox/ui/input";
|
|
4
3
|
import { Label } from "@camox/ui/label";
|
|
5
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger, SelectValue } from "@camox/ui/select";
|
|
7
|
-
import
|
|
8
|
-
import { InputBase, InputBaseAdornment } from "@camox/ui/input-base";
|
|
6
|
+
import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from "@camox/ui/input-group";
|
|
9
7
|
//#region src/features/preview/components/PageLocationFieldset.tsx
|
|
10
8
|
var NO_PARENT_VALUE = "__no_parent__";
|
|
11
9
|
var PageLocationFieldset = (t0) => {
|
|
@@ -49,7 +47,7 @@ var PageLocationFieldset = (t0) => {
|
|
|
49
47
|
t5 = parentPageId != null ? String(parentPageId) : "";
|
|
50
48
|
t6 = disabled || !hasParentOptions;
|
|
51
49
|
if ($[20] !== onParentPageIdChange) {
|
|
52
|
-
t7 = (value) => onParentPageIdChange(["", NO_PARENT_VALUE].includes(value) ? void 0 : Number(value));
|
|
50
|
+
t7 = (value) => onParentPageIdChange(!value || ["", NO_PARENT_VALUE].includes(value) ? void 0 : Number(value));
|
|
53
51
|
$[20] = onParentPageIdChange;
|
|
54
52
|
$[21] = t7;
|
|
55
53
|
} else t7 = $[21];
|
|
@@ -163,10 +161,10 @@ var PageLocationFieldset = (t0) => {
|
|
|
163
161
|
const t16 = getParentPath();
|
|
164
162
|
let t17;
|
|
165
163
|
if ($[43] !== t16) {
|
|
166
|
-
t17 = /* @__PURE__ */ jsx(
|
|
167
|
-
className: "
|
|
168
|
-
children:
|
|
169
|
-
});
|
|
164
|
+
t17 = /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(InputGroupText, {
|
|
165
|
+
className: "px-2",
|
|
166
|
+
children: t16
|
|
167
|
+
}) });
|
|
170
168
|
$[43] = t16;
|
|
171
169
|
$[44] = t17;
|
|
172
170
|
} else t17 = $[44];
|
|
@@ -178,13 +176,13 @@ var PageLocationFieldset = (t0) => {
|
|
|
178
176
|
} else t18 = $[46];
|
|
179
177
|
let t19;
|
|
180
178
|
if ($[47] !== disabled || $[48] !== pathSegment || $[49] !== t18) {
|
|
181
|
-
t19 = /* @__PURE__ */ jsx(
|
|
179
|
+
t19 = /* @__PURE__ */ jsx(InputGroupInput, {
|
|
182
180
|
id: "pathSegment",
|
|
183
181
|
value: pathSegment,
|
|
184
182
|
disabled,
|
|
185
183
|
onChange: t18,
|
|
186
184
|
placeholder: "e.g. pricing, about-us"
|
|
187
|
-
})
|
|
185
|
+
});
|
|
188
186
|
$[47] = disabled;
|
|
189
187
|
$[48] = pathSegment;
|
|
190
188
|
$[49] = t18;
|
|
@@ -192,7 +190,7 @@ var PageLocationFieldset = (t0) => {
|
|
|
192
190
|
} else t19 = $[50];
|
|
193
191
|
let t20;
|
|
194
192
|
if ($[51] !== t17 || $[52] !== t19) {
|
|
195
|
-
t20 = /* @__PURE__ */ jsxs(
|
|
193
|
+
t20 = /* @__PURE__ */ jsxs(InputGroup, { children: [t17, t19] });
|
|
196
194
|
$[51] = t17;
|
|
197
195
|
$[52] = t19;
|
|
198
196
|
$[53] = t20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PagePicker.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PagePicker.tsx"],"names":[],"mappings":"AA0CA,QAAA,MAAM,UAAU,+
|
|
1
|
+
{"version":3,"file":"PagePicker.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PagePicker.tsx"],"names":[],"mappings":"AA0CA,QAAA,MAAM,UAAU,+CAkNf,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -56,17 +56,16 @@ var PagePicker = () => {
|
|
|
56
56
|
previewStore.send({ type: "clearPeekedPage" });
|
|
57
57
|
setOpen(value);
|
|
58
58
|
},
|
|
59
|
-
children: [/* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
children: /* @__PURE__ */ jsxs(Button, {
|
|
59
|
+
children: [/* @__PURE__ */ jsxs(PopoverTrigger, {
|
|
60
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
62
61
|
variant: "outline",
|
|
63
62
|
role: "combobox",
|
|
64
|
-
className: "min-w-0 flex-1 justify-between"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
})
|
|
63
|
+
className: "min-w-0 flex-1 justify-between"
|
|
64
|
+
}),
|
|
65
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "truncate",
|
|
67
|
+
children: currentPage.metaTitle ?? currentPage.fullPath
|
|
68
|
+
}), /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
|
|
70
69
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
71
70
|
className: "flex h-[300px] w-[400px] flex-col p-0",
|
|
72
71
|
align: "start",
|
|
@@ -177,13 +176,14 @@ var PagePicker = () => {
|
|
|
177
176
|
" ",
|
|
178
177
|
/* @__PURE__ */ jsx("strong", { children: pageToDelete ? pageToDelete.metaTitle ?? formatPathSegment(pageToDelete.pathSegment) : "" }),
|
|
179
178
|
"? This action cannot be undone."
|
|
180
|
-
] })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
|
|
179
|
+
] })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
|
|
180
|
+
variant: "outline",
|
|
181
|
+
size: "default",
|
|
182
|
+
children: "Cancel"
|
|
183
|
+
}), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
184
|
+
variant: "destructive",
|
|
181
185
|
onClick: () => pageToDelete && handleDeletePage(pageToDelete),
|
|
182
|
-
|
|
183
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
184
|
-
variant: "destructive",
|
|
185
|
-
children: "Delete"
|
|
186
|
-
})
|
|
186
|
+
children: "Delete"
|
|
187
187
|
})] })] })
|
|
188
188
|
})] });
|
|
189
189
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTree.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PageTree.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PageTree.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PageTree.tsx"],"names":[],"mappings":"AAsfA,QAAA,MAAM,QAAQ,sDA2Jb,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|