@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.js CHANGED
@@ -1025,7 +1025,7 @@ function ListView({
1025
1025
  ),
1026
1026
  /* @__PURE__ */ jsxs("div", { className: "surface-tile p-4 flex flex-col lg:flex-row gap-4 items-start lg:items-center", children: [
1027
1027
  /* @__PURE__ */ jsxs("div", { className: "relative flex-1 w-full lg:max-w-md", children: [
1028
- /* @__PURE__ */ jsx(Search, { className: "w-4 h-4" }),
1028
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--kyro-text-muted)]" }),
1029
1029
  /* @__PURE__ */ jsx(
1030
1030
  "input",
1031
1031
  {
@@ -2735,7 +2735,7 @@ function MediaGallery({
2735
2735
  ] })
2736
2736
  ] }) }),
2737
2737
  /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col min-h-0 bg-[var(--kyro-bg)]", children: [
2738
- /* @__PURE__ */ jsx("div", { className: `flex-1 overflow-y-auto custom-scrollbar ${pickerMode ? "px-2 py-4" : "py-8 px-4"}`, children: loading ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5", children: /* @__PURE__ */ jsx(Shimmer, { variant: "media-card", count: 12 }) }) : items.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-32 text-center", children: [
2738
+ /* @__PURE__ */ 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__ */ jsx("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5", children: /* @__PURE__ */ jsx(Shimmer, { variant: "media-card", count: 12 }) }) : items.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-32 text-center", children: [
2739
2739
  /* @__PURE__ */ 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__ */ jsx(Grid3X3, { className: "w-10 h-10 text-[var(--kyro-text-muted)] opacity-30" }) }),
2740
2740
  /* @__PURE__ */ jsx("h3", { className: "text-xl font-bold text-[var(--kyro-text-primary)] tracking-tight", children: "No assets found" }),
2741
2741
  /* @__PURE__ */ 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." }),
@@ -6294,7 +6294,7 @@ var VideoBlock = ({
6294
6294
  {
6295
6295
  type: "button",
6296
6296
  onClick: () => removeBlock(block3.id),
6297
- className: "p-1 hover:bg-red-50 rounded text-red-500",
6297
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
6298
6298
  title: "Remove",
6299
6299
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
6300
6300
  }
@@ -6404,7 +6404,7 @@ var ListBlock = ({
6404
6404
  {
6405
6405
  type: "button",
6406
6406
  onClick: () => removeBlock(block3.id),
6407
- className: "p-1 hover:bg-red-50 rounded text-red-500",
6407
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
6408
6408
  title: "Remove",
6409
6409
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
6410
6410
  }
@@ -6453,7 +6453,7 @@ var CodeBlock = ({
6453
6453
  {
6454
6454
  type: "button",
6455
6455
  onClick: () => removeBlock(block3.id),
6456
- className: "p-1.5 hover:bg-red-500/10 rounded-lg transition-all text-[var(--kyro-text-muted)] hover:text-red-500",
6456
+ className: "p-1.5 hover:bg-[var(--kyro-danger-bg)] rounded-lg transition-all text-[var(--kyro-text-muted)] hover:text-[var(--kyro-danger)]",
6457
6457
  title: "Remove",
6458
6458
  children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
6459
6459
  }
@@ -6552,7 +6552,7 @@ var FileBlock = ({
6552
6552
  {
6553
6553
  type: "button",
6554
6554
  onClick: () => removeBlock(block3.id),
6555
- className: "p-1 hover:bg-red-50 rounded text-red-500",
6555
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
6556
6556
  title: "Remove",
6557
6557
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
6558
6558
  }
@@ -6798,7 +6798,7 @@ var AccordionBlock = ({
6798
6798
  {
6799
6799
  type: "button",
6800
6800
  onClick: () => removeBlock(block3.id),
6801
- className: "p-1 hover:bg-red-50 rounded text-red-500",
6801
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
6802
6802
  title: "Remove",
6803
6803
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
6804
6804
  }
@@ -6850,7 +6850,7 @@ var RichTextBlock = ({
6850
6850
  {
6851
6851
  type: "button",
6852
6852
  onClick: () => removeBlock(block3.id),
6853
- className: "p-1 hover:bg-red-50 rounded text-red-500",
6853
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
6854
6854
  title: "Remove",
6855
6855
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
6856
6856
  }
@@ -7637,7 +7637,7 @@ var ChildBlocksTree = ({
7637
7637
  handleRemoveChild(child.id);
7638
7638
  setConfirmDeleteId(null);
7639
7639
  },
7640
- className: "px-2 py-1 text-xs bg-red-500 text-white rounded hover:bg-red-600",
7640
+ className: "px-2 py-1 text-xs bg-[var(--kyro-danger)] text-white rounded",
7641
7641
  children: "Remove"
7642
7642
  }
7643
7643
  ),
@@ -7660,8 +7660,8 @@ var ChildBlocksTree = ({
7660
7660
  e.stopPropagation();
7661
7661
  setConfirmDeleteId(child.id);
7662
7662
  },
7663
- className: "p-1.5 rounded-md transition-opacity cursor-pointer hover:bg-red-50",
7664
- children: /* @__PURE__ */ jsx(X, { className: "w-3.5 h-3.5 text-red-500 invisible group-hover/column:visible" })
7663
+ className: "p-1.5 rounded-md transition-opacity cursor-pointer hover:bg-[var(--kyro-danger-bg)]",
7664
+ children: /* @__PURE__ */ jsx(X, { className: "w-3.5 h-3.5 text-[var(--kyro-danger)] invisible group-hover/column:visible" })
7665
7665
  }
7666
7666
  )
7667
7667
  ]
@@ -7858,7 +7858,7 @@ var NestedChildBlocks = ({
7858
7858
  handleRemoveChild(child.id);
7859
7859
  setConfirmDeleteId(null);
7860
7860
  },
7861
- className: "px-2 py-1 text-xs bg-red-500 text-white rounded hover:bg-red-600",
7861
+ className: "px-2 py-1 text-xs bg-[var(--kyro-danger)] text-white rounded",
7862
7862
  children: "Remove"
7863
7863
  }
7864
7864
  ),
@@ -7881,8 +7881,8 @@ var NestedChildBlocks = ({
7881
7881
  e.stopPropagation();
7882
7882
  setConfirmDeleteId(child.id);
7883
7883
  },
7884
- className: "p-1.5 rounded-md invisible group-hover:visible transition-opacity cursor-pointer hover:bg-red-50",
7885
- children: /* @__PURE__ */ jsx(X, { className: "w-3.5 h-3.5 text-red-500" })
7884
+ className: "p-1.5 rounded-md invisible group-hover:visible transition-opacity cursor-pointer hover:bg-[var(--kyro-danger-bg)]",
7885
+ children: /* @__PURE__ */ jsx(X, { className: "w-3.5 h-3.5 text-[var(--kyro-danger)]" })
7886
7886
  }
7887
7887
  )
7888
7888
  ]
@@ -8015,7 +8015,7 @@ var HeroBlock = ({
8015
8015
  {
8016
8016
  type: "button",
8017
8017
  onClick: () => removeBlock(block3.id),
8018
- className: "p-1 hover:bg-red-50 rounded text-red-500",
8018
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
8019
8019
  title: "Remove",
8020
8020
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
8021
8021
  }
@@ -8243,7 +8243,7 @@ var ArrayBlock = ({
8243
8243
  {
8244
8244
  type: "button",
8245
8245
  onClick: () => removeBlock(block3.id),
8246
- className: "p-1 hover:bg-red-50 rounded text-red-500",
8246
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
8247
8247
  title: "Remove",
8248
8248
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
8249
8249
  }
@@ -8460,7 +8460,7 @@ var RelationshipBlock = ({
8460
8460
  {
8461
8461
  type: "button",
8462
8462
  onClick: () => removeBlock(block3.id),
8463
- className: "p-1 hover:bg-red-50 rounded text-red-500",
8463
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] rounded text-[var(--kyro-danger)]",
8464
8464
  title: "Remove",
8465
8465
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
8466
8466
  }
@@ -8660,7 +8660,7 @@ var SortableBlockComponent = ({
8660
8660
  removeBlock(block3.id);
8661
8661
  setShowDeleteConfirm(false);
8662
8662
  },
8663
- className: "px-1.5 py-0.5 text-[9px] bg-red-500 hover:bg-red-600 text-white rounded font-semibold transition-colors",
8663
+ className: "px-1.5 py-0.5 text-[9px] bg-[var(--kyro-danger)] text-white rounded font-semibold transition-colors hover:brightness-90",
8664
8664
  children: "Remove"
8665
8665
  }
8666
8666
  ),
@@ -8695,7 +8695,7 @@ var SortableBlockComponent = ({
8695
8695
  e.stopPropagation();
8696
8696
  setShowDeleteConfirm(true);
8697
8697
  },
8698
- className: "p-0.5 hover:bg-red-50 hover:text-red-500 rounded text-[var(--kyro-text-muted)] transition-colors",
8698
+ className: "p-0.5 hover:bg-[var(--kyro-danger-bg)] hover:text-[var(--kyro-danger)] rounded text-[var(--kyro-text-muted)] transition-colors",
8699
8699
  title: "Remove",
8700
8700
  children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
8701
8701
  }
@@ -8759,7 +8759,7 @@ var SortableBlockComponent = ({
8759
8759
  removeBlock(block3.id);
8760
8760
  setShowDeleteConfirm(false);
8761
8761
  },
8762
- className: "px-2.5 py-1 text-[10px] bg-red-500 hover:bg-red-600 text-white rounded font-semibold transition-colors",
8762
+ className: "px-2.5 py-1 text-[10px] bg-[var(--kyro-danger)] text-white rounded font-semibold transition-colors hover:brightness-90",
8763
8763
  children: "Remove"
8764
8764
  }
8765
8765
  ),
@@ -8796,7 +8796,7 @@ var SortableBlockComponent = ({
8796
8796
  e.stopPropagation();
8797
8797
  setShowDeleteConfirm(true);
8798
8798
  },
8799
- className: "p-1 hover:bg-red-50 hover:text-red-500 rounded text-[var(--kyro-text-muted)] transition-colors",
8799
+ className: "p-1 hover:bg-[var(--kyro-danger-bg)] hover:text-[var(--kyro-danger)] rounded text-[var(--kyro-text-muted)] transition-colors",
8800
8800
  title: "Remove Block",
8801
8801
  children: /* @__PURE__ */ jsx(X, { className: "w-3.5 h-3.5" })
8802
8802
  }
@@ -8986,7 +8986,7 @@ var BlocksField = ({
8986
8986
  }
8987
8987
  }
8988
8988
  };
8989
- const activeBlock = activeDrag ? blockCategories.flatMap((cat) => cat.blocks).find((b) => `drawer-${b.type}` === activeDrag.id) || blocks2.find((b) => b.id === activeDrag.id) : null;
8989
+ const activeBlock = activeDrag ? dynamicCategories.flatMap((cat) => cat.blocks).find((b) => `drawer-${b.type}` === activeDrag.id) || blocks2.find((b) => b.id === activeDrag.id) : null;
8990
8990
  activeBlock ? "label" in activeBlock ? activeBlock.label : activeBlock.type : "Block";
8991
8991
  useEffect(() => {
8992
8992
  if (!isDropdownOpen) return;
@@ -11877,13 +11877,14 @@ function Toast({ type, message, onClose }) {
11877
11877
  onMouseEnter: () => setIsPaused(true),
11878
11878
  onMouseLeave: () => setIsPaused(false),
11879
11879
  children: [
11880
+ /* @__PURE__ */ jsx("div", { className: "kyro-toast-accent" }),
11880
11881
  /* @__PURE__ */ jsx("div", { className: "kyro-toast-icon-container", children: /* @__PURE__ */ jsx(Icon, { className: "w-4 h-4" }) }),
11881
11882
  /* @__PURE__ */ jsx("div", { className: "kyro-toast-content", children: /* @__PURE__ */ jsx("p", { className: "kyro-toast-message", children: message }) }),
11882
11883
  /* @__PURE__ */ jsx(
11883
11884
  "button",
11884
11885
  {
11885
11886
  type: "button",
11886
- className: "kyro-toast-close",
11887
+ className: "kyro-toast-close group-hover:opacity-100 opacity-40 transition-opacity",
11887
11888
  onClick: onClose,
11888
11889
  children: /* @__PURE__ */ jsx(X, { className: "w-3.5 h-3.5" })
11889
11890
  }
@@ -14132,7 +14133,11 @@ function Admin({ config, theme = "light", onThemeChange }) {
14132
14133
  }
14133
14134
  };
14134
14135
  window.addEventListener("keydown", handleKeyDown);
14135
- return () => window.removeEventListener("keydown", handleKeyDown);
14136
+ window.openCommandPalette = () => setIsCommandPaletteOpen(true);
14137
+ return () => {
14138
+ window.removeEventListener("keydown", handleKeyDown);
14139
+ delete window.openCommandPalette;
14140
+ };
14136
14141
  }, []);
14137
14142
  if (!authenticated) {
14138
14143
  return /* @__PURE__ */ jsx(