camox 0.6.1 → 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/vite.d.ts +2 -0
- package/dist/features/vite/vite.d.ts.map +1 -1
- package/dist/features/vite/vite.js +26 -30
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddBlockControlBar.d.ts","sourceRoot":"","sources":["../../../src/core/components/AddBlockControlBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddBlockControlBar.d.ts","sourceRoot":"","sources":["../../../src/core/components/AddBlockControlBar.tsx"],"names":[],"mappings":"AAEA,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,GAAI,8CAKhC,uBAAuB,4CA0BzB,CAAC"}
|
|
@@ -1,138 +1,72 @@
|
|
|
1
|
-
import { OVERLAY_COLORS } from "../../features/preview/overlayConstants.js";
|
|
2
1
|
import { c } from "react/compiler-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
//#region src/core/components/AddBlockControlBar.tsx
|
|
6
5
|
var AddBlockControlBar = (t0) => {
|
|
7
|
-
const $ = c(
|
|
6
|
+
const $ = c(14);
|
|
8
7
|
const { position, hidden, onClick, onMouseLeave } = t0;
|
|
9
8
|
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
10
|
-
const t1 =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
position: "absolute",
|
|
19
|
-
top: t1,
|
|
20
|
-
bottom: t2,
|
|
21
|
-
left: "50%",
|
|
22
|
-
right: 0,
|
|
23
|
-
height: "36px",
|
|
24
|
-
transform: t3,
|
|
25
|
-
width: "fit-content",
|
|
26
|
-
display: "flex",
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
justifyContent: "center",
|
|
29
|
-
zIndex: 11,
|
|
30
|
-
opacity: t4,
|
|
31
|
-
pointerEvents: t5,
|
|
32
|
-
transition: "opacity 150ms ease"
|
|
33
|
-
};
|
|
34
|
-
$[0] = t1;
|
|
35
|
-
$[1] = t2;
|
|
36
|
-
$[2] = t3;
|
|
37
|
-
$[3] = t4;
|
|
38
|
-
$[4] = t5;
|
|
39
|
-
$[5] = t6;
|
|
40
|
-
} else t6 = $[5];
|
|
41
|
-
let t7;
|
|
42
|
-
let t8;
|
|
43
|
-
let t9;
|
|
44
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
45
|
-
t7 = {
|
|
46
|
-
width: "120px",
|
|
47
|
-
height: "36px",
|
|
48
|
-
display: "flex",
|
|
49
|
-
alignItems: "center",
|
|
50
|
-
justifyContent: "center"
|
|
51
|
-
};
|
|
52
|
-
t8 = () => setIsExpanded(true);
|
|
53
|
-
t9 = () => setIsExpanded(false);
|
|
54
|
-
$[6] = t7;
|
|
55
|
-
$[7] = t8;
|
|
56
|
-
$[8] = t9;
|
|
9
|
+
const t1 = hidden || void 0;
|
|
10
|
+
let t2;
|
|
11
|
+
let t3;
|
|
12
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13
|
+
t2 = () => setIsExpanded(true);
|
|
14
|
+
t3 = () => setIsExpanded(false);
|
|
15
|
+
$[0] = t2;
|
|
16
|
+
$[1] = t3;
|
|
57
17
|
} else {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
t9 = $[8];
|
|
18
|
+
t2 = $[0];
|
|
19
|
+
t3 = $[1];
|
|
61
20
|
}
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
let t14;
|
|
67
|
-
if ($[9] !== t10 || $[10] !== t11 || $[11] !== t12 || $[12] !== t13) {
|
|
68
|
-
t14 = {
|
|
69
|
-
display: "flex",
|
|
70
|
-
alignItems: "center",
|
|
71
|
-
gap: t10,
|
|
72
|
-
padding: t11,
|
|
73
|
-
width: t12,
|
|
74
|
-
height: t13,
|
|
75
|
-
justifyContent: "center",
|
|
76
|
-
backgroundColor: OVERLAY_COLORS.selected,
|
|
77
|
-
color: "white",
|
|
78
|
-
border: "none",
|
|
79
|
-
borderRadius: "9999px",
|
|
80
|
-
fontSize: "12px",
|
|
81
|
-
fontWeight: 500,
|
|
82
|
-
cursor: "pointer",
|
|
83
|
-
whiteSpace: "nowrap",
|
|
84
|
-
transition: "all 150ms ease"
|
|
85
|
-
};
|
|
86
|
-
$[9] = t10;
|
|
87
|
-
$[10] = t11;
|
|
88
|
-
$[11] = t12;
|
|
89
|
-
$[12] = t13;
|
|
90
|
-
$[13] = t14;
|
|
91
|
-
} else t14 = $[13];
|
|
92
|
-
let t15;
|
|
93
|
-
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
-
t15 = /* @__PURE__ */ jsx("span", {
|
|
21
|
+
const t4 = isExpanded || void 0;
|
|
22
|
+
let t5;
|
|
23
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
24
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
95
25
|
style: { lineHeight: 1 },
|
|
96
26
|
children: "+"
|
|
97
27
|
});
|
|
98
|
-
$[
|
|
99
|
-
} else
|
|
100
|
-
let
|
|
101
|
-
if ($[
|
|
102
|
-
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
} else
|
|
106
|
-
let
|
|
107
|
-
if ($[
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
onMouseEnter:
|
|
111
|
-
onMouseLeave:
|
|
28
|
+
$[2] = t5;
|
|
29
|
+
} else t5 = $[2];
|
|
30
|
+
let t6;
|
|
31
|
+
if ($[3] !== isExpanded) {
|
|
32
|
+
t6 = isExpanded && /* @__PURE__ */ jsx("span", { children: "Add block" });
|
|
33
|
+
$[3] = isExpanded;
|
|
34
|
+
$[4] = t6;
|
|
35
|
+
} else t6 = $[4];
|
|
36
|
+
let t7;
|
|
37
|
+
if ($[5] !== onClick || $[6] !== t4 || $[7] !== t6) {
|
|
38
|
+
t7 = /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "camox-add-block-hitarea",
|
|
40
|
+
onMouseEnter: t2,
|
|
41
|
+
onMouseLeave: t3,
|
|
112
42
|
children: /* @__PURE__ */ jsxs("button", {
|
|
113
|
-
|
|
43
|
+
className: "camox-add-block-button",
|
|
44
|
+
"data-camox-expanded": t4,
|
|
114
45
|
onClick,
|
|
115
|
-
children: [
|
|
46
|
+
children: [t5, t6]
|
|
116
47
|
})
|
|
117
48
|
});
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
} else
|
|
123
|
-
let
|
|
124
|
-
if ($[
|
|
125
|
-
|
|
126
|
-
|
|
49
|
+
$[5] = onClick;
|
|
50
|
+
$[6] = t4;
|
|
51
|
+
$[7] = t6;
|
|
52
|
+
$[8] = t7;
|
|
53
|
+
} else t7 = $[8];
|
|
54
|
+
let t8;
|
|
55
|
+
if ($[9] !== onMouseLeave || $[10] !== position || $[11] !== t1 || $[12] !== t7) {
|
|
56
|
+
t8 = /* @__PURE__ */ jsx("div", {
|
|
57
|
+
className: "camox-add-block",
|
|
58
|
+
"data-camox-position": position,
|
|
59
|
+
"data-camox-hidden": t1,
|
|
127
60
|
onMouseLeave,
|
|
128
|
-
children:
|
|
61
|
+
children: t7
|
|
129
62
|
});
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
|
|
135
|
-
|
|
63
|
+
$[9] = onMouseLeave;
|
|
64
|
+
$[10] = position;
|
|
65
|
+
$[11] = t1;
|
|
66
|
+
$[12] = t7;
|
|
67
|
+
$[13] = t8;
|
|
68
|
+
} else t8 = $[13];
|
|
69
|
+
return t8;
|
|
136
70
|
};
|
|
137
71
|
//#endregion
|
|
138
72
|
export { AddBlockControlBar };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useFrame } from "../../../features/preview/components/Frame.js";
|
|
1
2
|
import { lexicalStateToMarkdown } from "../../lib/lexicalState.js";
|
|
2
3
|
import { createEditorConfig, normalizeLexicalState } from "./editorConfig.js";
|
|
3
4
|
import { InlineContentEditable } from "./InlineContentEditable.js";
|
|
4
5
|
import { SelectionBroadcaster } from "./SelectionBroadcaster.js";
|
|
5
6
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { useFrame } from "@camox/ui/frame";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { INPUT_BASE_STYLES, INPUT_FOCUS_STYLES, cn } from "../../../lib/utils.js";
|
|
1
2
|
import { lexicalStateToMarkdown } from "../../lib/lexicalState.js";
|
|
2
3
|
import { createEditorConfig, normalizeLexicalState } from "./editorConfig.js";
|
|
3
|
-
import { INPUT_BASE_STYLES, INPUT_FOCUS_STYLES, cn } from "../../../lib/utils.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|