@kyro-cms/admin 0.9.5 → 0.9.6
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/index.cjs +29 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +52 -51
- package/dist/index.css.map +1 -1
- package/dist/index.js +29 -24
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Admin.tsx +7 -1
- package/src/components/GraphQLPlayground.tsx +460 -224
- package/src/components/ListView.tsx +1 -1
- package/src/components/MediaGallery.tsx +2 -2
- package/src/components/RestPlayground.tsx +443 -519
- package/src/components/blocks/AccordionBlock.tsx +1 -1
- package/src/components/blocks/ArrayBlock.tsx +1 -1
- package/src/components/blocks/ChildBlocksTree.tsx +6 -6
- package/src/components/blocks/CodeBlock.tsx +1 -1
- package/src/components/blocks/FileBlock.tsx +1 -1
- package/src/components/blocks/HeroBlock.tsx +1 -1
- package/src/components/blocks/ListBlock.tsx +1 -1
- package/src/components/blocks/RelationshipBlock.tsx +1 -1
- package/src/components/blocks/RichTextBlock.tsx +1 -1
- package/src/components/blocks/VideoBlock.tsx +1 -1
- package/src/components/fields/BlocksField.tsx +5 -5
- package/src/components/ui/Toast.tsx +2 -1
- package/src/layouts/AdminLayout.astro +16 -1
- package/src/pages/graphql-explorer.astro +7 -51
- package/src/pages/graphql.astro +7 -119
- package/src/pages/index.astro +4 -63
- package/src/pages/rest-playground.astro +3 -29
- package/src/styles/main.css +51 -43
package/dist/index.cjs
CHANGED
|
@@ -1046,7 +1046,7 @@ function ListView({
|
|
|
1046
1046
|
),
|
|
1047
1047
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "surface-tile p-4 flex flex-col lg:flex-row gap-4 items-start lg:items-center", children: [
|
|
1048
1048
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 w-full lg:max-w-md", children: [
|
|
1049
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-4 h-4" }),
|
|
1049
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--kyro-text-muted)]" }),
|
|
1050
1050
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1051
1051
|
"input",
|
|
1052
1052
|
{
|
|
@@ -2756,7 +2756,7 @@ function MediaGallery({
|
|
|
2756
2756
|
] })
|
|
2757
2757
|
] }) }),
|
|
2758
2758
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col min-h-0 bg-[var(--kyro-bg)]", children: [
|
|
2759
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-1 overflow-y-auto custom-scrollbar ${pickerMode ? "px-2 py-4" : "py-8 px-4"}`, children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4
|
|
2759
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-1 overflow-y-auto custom-scrollbar ${pickerMode ? "px-2 py-4" : "py-4 px-2 md:py-8 md:px-4"}`, children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5", children: /* @__PURE__ */ jsxRuntime.jsx(Shimmer, { variant: "media-card", count: 12 }) }) : items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-32 text-center", children: [
|
|
2760
2760
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-24 h-24 rounded-[2rem] bg-[var(--kyro-surface-accent)] flex items-center justify-center mb-8 rotate-12 group-hover:rotate-0 transition-transform duration-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Grid3X3, { className: "w-10 h-10 text-[var(--kyro-text-muted)] opacity-30" }) }),
|
|
2761
2761
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-bold text-[var(--kyro-text-primary)] tracking-tight", children: "No assets found" }),
|
|
2762
2762
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[var(--kyro-text-secondary)] mt-2 max-w-xs mx-auto text-sm font-medium leading-relaxed", children: "Upload your first file or create a folder to organize your media assets." }),
|
|
@@ -6315,7 +6315,7 @@ var VideoBlock = ({
|
|
|
6315
6315
|
{
|
|
6316
6316
|
type: "button",
|
|
6317
6317
|
onClick: () => removeBlock(block3.id),
|
|
6318
|
-
className: "p-1 hover:bg-
|
|
6318
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
6319
6319
|
title: "Remove",
|
|
6320
6320
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
6321
6321
|
}
|
|
@@ -6425,7 +6425,7 @@ var ListBlock = ({
|
|
|
6425
6425
|
{
|
|
6426
6426
|
type: "button",
|
|
6427
6427
|
onClick: () => removeBlock(block3.id),
|
|
6428
|
-
className: "p-1 hover:bg-
|
|
6428
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
6429
6429
|
title: "Remove",
|
|
6430
6430
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
6431
6431
|
}
|
|
@@ -6474,7 +6474,7 @@ var CodeBlock = ({
|
|
|
6474
6474
|
{
|
|
6475
6475
|
type: "button",
|
|
6476
6476
|
onClick: () => removeBlock(block3.id),
|
|
6477
|
-
className: "p-1.5 hover:bg-
|
|
6477
|
+
className: "p-1.5 hover:bg-[var(--kyro-danger-bg)] rounded-lg transition-all text-[var(--kyro-text-muted)] hover:text-[var(--kyro-danger)]",
|
|
6478
6478
|
title: "Remove",
|
|
6479
6479
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
|
|
6480
6480
|
}
|
|
@@ -6573,7 +6573,7 @@ var FileBlock = ({
|
|
|
6573
6573
|
{
|
|
6574
6574
|
type: "button",
|
|
6575
6575
|
onClick: () => removeBlock(block3.id),
|
|
6576
|
-
className: "p-1 hover:bg-
|
|
6576
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
6577
6577
|
title: "Remove",
|
|
6578
6578
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
6579
6579
|
}
|
|
@@ -6819,7 +6819,7 @@ var AccordionBlock = ({
|
|
|
6819
6819
|
{
|
|
6820
6820
|
type: "button",
|
|
6821
6821
|
onClick: () => removeBlock(block3.id),
|
|
6822
|
-
className: "p-1 hover:bg-
|
|
6822
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
6823
6823
|
title: "Remove",
|
|
6824
6824
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
6825
6825
|
}
|
|
@@ -6871,7 +6871,7 @@ var RichTextBlock = ({
|
|
|
6871
6871
|
{
|
|
6872
6872
|
type: "button",
|
|
6873
6873
|
onClick: () => removeBlock(block3.id),
|
|
6874
|
-
className: "p-1 hover:bg-
|
|
6874
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
6875
6875
|
title: "Remove",
|
|
6876
6876
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
6877
6877
|
}
|
|
@@ -7658,7 +7658,7 @@ var ChildBlocksTree = ({
|
|
|
7658
7658
|
handleRemoveChild(child.id);
|
|
7659
7659
|
setConfirmDeleteId(null);
|
|
7660
7660
|
},
|
|
7661
|
-
className: "px-2 py-1 text-xs bg-
|
|
7661
|
+
className: "px-2 py-1 text-xs bg-[var(--kyro-danger)] text-white rounded",
|
|
7662
7662
|
children: "Remove"
|
|
7663
7663
|
}
|
|
7664
7664
|
),
|
|
@@ -7681,8 +7681,8 @@ var ChildBlocksTree = ({
|
|
|
7681
7681
|
e.stopPropagation();
|
|
7682
7682
|
setConfirmDeleteId(child.id);
|
|
7683
7683
|
},
|
|
7684
|
-
className: "p-1.5 rounded-md transition-opacity cursor-pointer hover:bg-
|
|
7685
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5 text-
|
|
7684
|
+
className: "p-1.5 rounded-md transition-opacity cursor-pointer hover:bg-[var(--kyro-danger-bg)]",
|
|
7685
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5 text-[var(--kyro-danger)] invisible group-hover/column:visible" })
|
|
7686
7686
|
}
|
|
7687
7687
|
)
|
|
7688
7688
|
]
|
|
@@ -7879,7 +7879,7 @@ var NestedChildBlocks = ({
|
|
|
7879
7879
|
handleRemoveChild(child.id);
|
|
7880
7880
|
setConfirmDeleteId(null);
|
|
7881
7881
|
},
|
|
7882
|
-
className: "px-2 py-1 text-xs bg-
|
|
7882
|
+
className: "px-2 py-1 text-xs bg-[var(--kyro-danger)] text-white rounded",
|
|
7883
7883
|
children: "Remove"
|
|
7884
7884
|
}
|
|
7885
7885
|
),
|
|
@@ -7902,8 +7902,8 @@ var NestedChildBlocks = ({
|
|
|
7902
7902
|
e.stopPropagation();
|
|
7903
7903
|
setConfirmDeleteId(child.id);
|
|
7904
7904
|
},
|
|
7905
|
-
className: "p-1.5 rounded-md invisible group-hover:visible transition-opacity cursor-pointer hover:bg-
|
|
7906
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5 text-
|
|
7905
|
+
className: "p-1.5 rounded-md invisible group-hover:visible transition-opacity cursor-pointer hover:bg-[var(--kyro-danger-bg)]",
|
|
7906
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5 text-[var(--kyro-danger)]" })
|
|
7907
7907
|
}
|
|
7908
7908
|
)
|
|
7909
7909
|
]
|
|
@@ -8036,7 +8036,7 @@ var HeroBlock = ({
|
|
|
8036
8036
|
{
|
|
8037
8037
|
type: "button",
|
|
8038
8038
|
onClick: () => removeBlock(block3.id),
|
|
8039
|
-
className: "p-1 hover:bg-
|
|
8039
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
8040
8040
|
title: "Remove",
|
|
8041
8041
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
8042
8042
|
}
|
|
@@ -8264,7 +8264,7 @@ var ArrayBlock = ({
|
|
|
8264
8264
|
{
|
|
8265
8265
|
type: "button",
|
|
8266
8266
|
onClick: () => removeBlock(block3.id),
|
|
8267
|
-
className: "p-1 hover:bg-
|
|
8267
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
8268
8268
|
title: "Remove",
|
|
8269
8269
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
8270
8270
|
}
|
|
@@ -8481,7 +8481,7 @@ var RelationshipBlock = ({
|
|
|
8481
8481
|
{
|
|
8482
8482
|
type: "button",
|
|
8483
8483
|
onClick: () => removeBlock(block3.id),
|
|
8484
|
-
className: "p-1 hover:bg-
|
|
8484
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
|
|
8485
8485
|
title: "Remove",
|
|
8486
8486
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
8487
8487
|
}
|
|
@@ -8681,7 +8681,7 @@ var SortableBlockComponent = ({
|
|
|
8681
8681
|
removeBlock(block3.id);
|
|
8682
8682
|
setShowDeleteConfirm(false);
|
|
8683
8683
|
},
|
|
8684
|
-
className: "px-1.5 py-0.5 text-[9px] bg-
|
|
8684
|
+
className: "px-1.5 py-0.5 text-[9px] bg-[var(--kyro-danger)] text-white rounded font-semibold transition-colors hover:brightness-90",
|
|
8685
8685
|
children: "Remove"
|
|
8686
8686
|
}
|
|
8687
8687
|
),
|
|
@@ -8716,7 +8716,7 @@ var SortableBlockComponent = ({
|
|
|
8716
8716
|
e.stopPropagation();
|
|
8717
8717
|
setShowDeleteConfirm(true);
|
|
8718
8718
|
},
|
|
8719
|
-
className: "p-0.5 hover:bg-
|
|
8719
|
+
className: "p-0.5 hover:bg-[var(--kyro-danger-bg)] hover:text-[var(--kyro-danger)] rounded text-[var(--kyro-text-muted)] transition-colors",
|
|
8720
8720
|
title: "Remove",
|
|
8721
8721
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
8722
8722
|
}
|
|
@@ -8780,7 +8780,7 @@ var SortableBlockComponent = ({
|
|
|
8780
8780
|
removeBlock(block3.id);
|
|
8781
8781
|
setShowDeleteConfirm(false);
|
|
8782
8782
|
},
|
|
8783
|
-
className: "px-2.5 py-1 text-[10px] bg-
|
|
8783
|
+
className: "px-2.5 py-1 text-[10px] bg-[var(--kyro-danger)] text-white rounded font-semibold transition-colors hover:brightness-90",
|
|
8784
8784
|
children: "Remove"
|
|
8785
8785
|
}
|
|
8786
8786
|
),
|
|
@@ -8817,7 +8817,7 @@ var SortableBlockComponent = ({
|
|
|
8817
8817
|
e.stopPropagation();
|
|
8818
8818
|
setShowDeleteConfirm(true);
|
|
8819
8819
|
},
|
|
8820
|
-
className: "p-1 hover:bg-
|
|
8820
|
+
className: "p-1 hover:bg-[var(--kyro-danger-bg)] hover:text-[var(--kyro-danger)] rounded text-[var(--kyro-text-muted)] transition-colors",
|
|
8821
8821
|
title: "Remove Block",
|
|
8822
8822
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5" })
|
|
8823
8823
|
}
|
|
@@ -9007,7 +9007,7 @@ var BlocksField = ({
|
|
|
9007
9007
|
}
|
|
9008
9008
|
}
|
|
9009
9009
|
};
|
|
9010
|
-
const activeBlock = activeDrag ?
|
|
9010
|
+
const activeBlock = activeDrag ? dynamicCategories.flatMap((cat) => cat.blocks).find((b) => `drawer-${b.type}` === activeDrag.id) || blocks2.find((b) => b.id === activeDrag.id) : null;
|
|
9011
9011
|
activeBlock ? "label" in activeBlock ? activeBlock.label : activeBlock.type : "Block";
|
|
9012
9012
|
React.useEffect(() => {
|
|
9013
9013
|
if (!isDropdownOpen) return;
|
|
@@ -11898,13 +11898,14 @@ function Toast({ type, message, onClose }) {
|
|
|
11898
11898
|
onMouseEnter: () => setIsPaused(true),
|
|
11899
11899
|
onMouseLeave: () => setIsPaused(false),
|
|
11900
11900
|
children: [
|
|
11901
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kyro-toast-accent" }),
|
|
11901
11902
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kyro-toast-icon-container", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "w-4 h-4" }) }),
|
|
11902
11903
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kyro-toast-content", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kyro-toast-message", children: message }) }),
|
|
11903
11904
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11904
11905
|
"button",
|
|
11905
11906
|
{
|
|
11906
11907
|
type: "button",
|
|
11907
|
-
className: "kyro-toast-close",
|
|
11908
|
+
className: "kyro-toast-close group-hover:opacity-100 opacity-40 transition-opacity",
|
|
11908
11909
|
onClick: onClose,
|
|
11909
11910
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5" })
|
|
11910
11911
|
}
|
|
@@ -14153,7 +14154,11 @@ function Admin({ config, theme = "light", onThemeChange }) {
|
|
|
14153
14154
|
}
|
|
14154
14155
|
};
|
|
14155
14156
|
window.addEventListener("keydown", handleKeyDown);
|
|
14156
|
-
|
|
14157
|
+
window.openCommandPalette = () => setIsCommandPaletteOpen(true);
|
|
14158
|
+
return () => {
|
|
14159
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
14160
|
+
delete window.openCommandPalette;
|
|
14161
|
+
};
|
|
14157
14162
|
}, []);
|
|
14158
14163
|
if (!authenticated) {
|
|
14159
14164
|
return /* @__PURE__ */ jsxRuntime.jsx(
|