@moontra/moonui-pro 2.25.15 → 2.25.17

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.mjs CHANGED
@@ -1725,6 +1725,32 @@ var require_core = __commonJS({
1725
1725
  highlight.default = highlight;
1726
1726
  }
1727
1727
  });
1728
+
1729
+ // #style-inject:#style-inject
1730
+ function styleInject(css2, { insertAt } = {}) {
1731
+ if (!css2 || typeof document === "undefined")
1732
+ return;
1733
+ const head = document.head || document.getElementsByTagName("head")[0];
1734
+ const style2 = document.createElement("style");
1735
+ style2.type = "text/css";
1736
+ if (insertAt === "top") {
1737
+ if (head.firstChild) {
1738
+ head.insertBefore(style2, head.firstChild);
1739
+ } else {
1740
+ head.appendChild(style2);
1741
+ }
1742
+ } else {
1743
+ head.appendChild(style2);
1744
+ }
1745
+ if (style2.styleSheet) {
1746
+ style2.styleSheet.cssText = css2;
1747
+ } else {
1748
+ style2.appendChild(document.createTextNode(css2));
1749
+ }
1750
+ }
1751
+
1752
+ // src/styles/components.css
1753
+ styleInject(".moonui-pro-sidebar {\n isolation: isolate;\n position: relative;\n}\n.moonui-pro-sidebar > * {\n margin: 0;\n}\n.moonui-pro-navbar {\n isolation: isolate;\n position: relative;\n width: 100%;\n}\n.moonui-pro-sidebar *:not(.moonui-pro-sidebar *),\n.moonui-pro-navbar *:not(.moonui-pro-navbar *) {\n all: revert;\n}\n@media (max-width: 768px) {\n .moonui-pro-sidebar {\n position: fixed;\n height: 100vh;\n z-index: 50;\n }\n}\n");
1728
1754
  function cn(...inputs) {
1729
1755
  return twMerge(clsx(inputs));
1730
1756
  }
@@ -8594,8 +8620,6 @@ function toast({ ...props }) {
8594
8620
  update
8595
8621
  };
8596
8622
  }
8597
-
8598
- // ../../node_modules/@radix-ui/primitive/dist/index.mjs
8599
8623
  function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
8600
8624
  return function handleEvent(event) {
8601
8625
  originalEventHandler?.(event);
@@ -9925,15 +9949,9 @@ function getWindowScrollBarX(element, rect) {
9925
9949
  }
9926
9950
  return rect.left + leftScroll;
9927
9951
  }
9928
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
9929
- if (ignoreScrollbarX === void 0) {
9930
- ignoreScrollbarX = false;
9931
- }
9952
+ function getHTMLOffset(documentElement, scroll) {
9932
9953
  const htmlRect = documentElement.getBoundingClientRect();
9933
- const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : (
9934
- // RTL <body> scrollbar.
9935
- getWindowScrollBarX(documentElement, htmlRect)
9936
- ));
9954
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
9937
9955
  const y = htmlRect.top + scroll.scrollTop;
9938
9956
  return {
9939
9957
  x,
@@ -9971,7 +9989,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
9971
9989
  offsets.y = offsetRect.y + offsetParent.clientTop;
9972
9990
  }
9973
9991
  }
9974
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
9992
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
9975
9993
  return {
9976
9994
  width: rect.width * scale.x,
9977
9995
  height: rect.height * scale.y,
@@ -10000,6 +10018,7 @@ function getDocumentRect(element) {
10000
10018
  y
10001
10019
  };
10002
10020
  }
10021
+ var SCROLLBAR_MAX = 25;
10003
10022
  function getViewportRect(element, strategy) {
10004
10023
  const win = getWindow(element);
10005
10024
  const html = getDocumentElement(element);
@@ -10017,6 +10036,19 @@ function getViewportRect(element, strategy) {
10017
10036
  y = visualViewport.offsetTop;
10018
10037
  }
10019
10038
  }
10039
+ const windowScrollbarX = getWindowScrollBarX(html);
10040
+ if (windowScrollbarX <= 0) {
10041
+ const doc3 = html.ownerDocument;
10042
+ const body = doc3.body;
10043
+ const bodyStyles = getComputedStyle(body);
10044
+ const bodyMarginInline = doc3.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
10045
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
10046
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
10047
+ width -= clippingStableScrollbarWidth;
10048
+ }
10049
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
10050
+ width += windowScrollbarX;
10051
+ }
10020
10052
  return {
10021
10053
  width,
10022
10054
  height,
@@ -10759,8 +10791,13 @@ var PopperAnchor = t.forwardRef(
10759
10791
  const context = usePopperContext(ANCHOR_NAME, __scopePopper);
10760
10792
  const ref = t.useRef(null);
10761
10793
  const composedRefs = useComposedRefs2(forwardedRef, ref);
10794
+ const anchorRef = t.useRef(null);
10762
10795
  t.useEffect(() => {
10763
- context.onAnchorChange(virtualRef?.current || ref.current);
10796
+ const previousAnchor = anchorRef.current;
10797
+ anchorRef.current = virtualRef?.current || ref.current;
10798
+ if (previousAnchor !== anchorRef.current) {
10799
+ context.onAnchorChange(anchorRef.current);
10800
+ }
10764
10801
  });
10765
10802
  return virtualRef ? null : /* @__PURE__ */ jsx(Primitive2.div, { ...anchorProps, ref: composedRefs });
10766
10803
  }
@@ -11083,7 +11120,7 @@ function usePresence2(present) {
11083
11120
  const ownerWindow = node.ownerDocument.defaultView ?? window;
11084
11121
  const handleAnimationEnd = (event) => {
11085
11122
  const currentAnimationName = getAnimationName2(stylesRef.current);
11086
- const isCurrentAnimation = currentAnimationName.includes(event.animationName);
11123
+ const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
11087
11124
  if (event.target === node && isCurrentAnimation) {
11088
11125
  send("ANIMATION_END");
11089
11126
  if (!prevPresentRef.current) {
@@ -32979,12 +33016,17 @@ function run2(config) {
32979
33016
  });
32980
33017
  const handlers2 = [];
32981
33018
  state.doc.nodesBetween(from2, to, (node, pos) => {
32982
- if (!node.isTextblock || node.type.spec.code) {
33019
+ var _a2, _b, _c, _d, _e2;
33020
+ if (((_b = (_a2 = node.type) == null ? void 0 : _a2.spec) == null ? void 0 : _b.code) || !(node.isText || node.isTextblock || node.isInline)) {
32983
33021
  return;
32984
33022
  }
33023
+ const contentSize = (_e2 = (_d = (_c = node.content) == null ? void 0 : _c.size) != null ? _d : node.nodeSize) != null ? _e2 : 0;
32985
33024
  const resolvedFrom = Math.max(from2, pos);
32986
- const resolvedTo = Math.min(to, pos + node.content.size);
32987
- const textToMatch = node.textBetween(resolvedFrom - pos, resolvedTo - pos, void 0, "\uFFFC");
33025
+ const resolvedTo = Math.min(to, pos + contentSize);
33026
+ if (resolvedFrom >= resolvedTo) {
33027
+ return;
33028
+ }
33029
+ const textToMatch = node.isText ? node.text || "" : node.textBetween(resolvedFrom - pos, resolvedTo - pos, void 0, "\uFFFC");
32988
33030
  const matches2 = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent);
32989
33031
  matches2.forEach((match) => {
32990
33032
  if (match.index === void 0) {
@@ -33199,8 +33241,6 @@ var ExtensionManager = class {
33199
33241
  get plugins() {
33200
33242
  const { editor } = this;
33201
33243
  const extensions = sortExtensions([...this.extensions].reverse());
33202
- const inputRules = [];
33203
- const pasteRules = [];
33204
33244
  const allPlugins = extensions.map((extension) => {
33205
33245
  const context = {
33206
33246
  name: extension.name,
@@ -33231,11 +33271,23 @@ var ExtensionManager = class {
33231
33271
  plugins.push(keyMapPlugin);
33232
33272
  const addInputRules = getExtensionField(extension, "addInputRules", context);
33233
33273
  if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) {
33234
- inputRules.push(...addInputRules());
33274
+ const rules = addInputRules();
33275
+ if (rules && rules.length) {
33276
+ const inputResult = inputRulesPlugin({
33277
+ editor,
33278
+ rules
33279
+ });
33280
+ const inputPlugins = Array.isArray(inputResult) ? inputResult : [inputResult];
33281
+ plugins.push(...inputPlugins);
33282
+ }
33235
33283
  }
33236
33284
  const addPasteRules = getExtensionField(extension, "addPasteRules", context);
33237
33285
  if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) {
33238
- pasteRules.push(...addPasteRules());
33286
+ const rules = addPasteRules();
33287
+ if (rules && rules.length) {
33288
+ const pasteRules = pasteRulesPlugin({ editor, rules });
33289
+ plugins.push(...pasteRules);
33290
+ }
33239
33291
  }
33240
33292
  const addProseMirrorPlugins = getExtensionField(
33241
33293
  extension,
@@ -33248,17 +33300,7 @@ var ExtensionManager = class {
33248
33300
  }
33249
33301
  return plugins;
33250
33302
  }).flat();
33251
- return [
33252
- inputRulesPlugin({
33253
- editor,
33254
- rules: inputRules
33255
- }),
33256
- ...pasteRulesPlugin({
33257
- editor,
33258
- rules: pasteRules
33259
- }),
33260
- ...allPlugins
33261
- ];
33303
+ return allPlugins;
33262
33304
  }
33263
33305
  /**
33264
33306
  * Get all attributes from the extensions.
@@ -34060,7 +34102,8 @@ function canSetMark(state, tr2, newMarkType) {
34060
34102
  }
34061
34103
  if (cursor) {
34062
34104
  const currentMarks = (_a2 = state.storedMarks) != null ? _a2 : cursor.marks();
34063
- return !!newMarkType.isInSet(currentMarks) || !currentMarks.some((mark) => mark.type.excludes(newMarkType));
34105
+ const parentAllowsMarkType = cursor.parent.type.allowsMarkType(newMarkType);
34106
+ return parentAllowsMarkType && (!!newMarkType.isInSet(currentMarks) || !currentMarks.some((mark) => mark.type.excludes(newMarkType)));
34064
34107
  }
34065
34108
  const { ranges } = selection;
34066
34109
  return ranges.some(({ $from, $to }) => {
@@ -35160,6 +35203,8 @@ var Editor = class extends EventEmitter {
35160
35203
  emitContentError: false,
35161
35204
  onBeforeCreate: () => null,
35162
35205
  onCreate: () => null,
35206
+ onMount: () => null,
35207
+ onUnmount: () => null,
35163
35208
  onUpdate: () => null,
35164
35209
  onSelectionUpdate: () => null,
35165
35210
  onTransaction: () => null,
@@ -35181,6 +35226,8 @@ var Editor = class extends EventEmitter {
35181
35226
  this.createSchema();
35182
35227
  this.on("beforeCreate", this.options.onBeforeCreate);
35183
35228
  this.emit("beforeCreate", { editor: this });
35229
+ this.on("mount", this.options.onMount);
35230
+ this.on("unmount", this.options.onUnmount);
35184
35231
  this.on("contentError", this.options.onContentError);
35185
35232
  this.on("create", this.options.onCreate);
35186
35233
  this.on("update", this.options.onUpdate);
@@ -35213,6 +35260,7 @@ var Editor = class extends EventEmitter {
35213
35260
  );
35214
35261
  }
35215
35262
  this.createView(el);
35263
+ this.emit("mount", { editor: this });
35216
35264
  window.setTimeout(() => {
35217
35265
  if (this.isDestroyed) {
35218
35266
  return;
@@ -35226,7 +35274,6 @@ var Editor = class extends EventEmitter {
35226
35274
  * Remove the editor from the DOM, but still allow remounting at a different point in time
35227
35275
  */
35228
35276
  unmount() {
35229
- var _a2;
35230
35277
  if (this.editorView) {
35231
35278
  const dom = this.editorView.dom;
35232
35279
  if (dom == null ? void 0 : dom.editor) {
@@ -35236,8 +35283,19 @@ var Editor = class extends EventEmitter {
35236
35283
  }
35237
35284
  this.editorView = null;
35238
35285
  this.isInitialized = false;
35239
- (_a2 = this.css) == null ? void 0 : _a2.remove();
35286
+ if (this.css) {
35287
+ try {
35288
+ if (typeof this.css.remove === "function") {
35289
+ this.css.remove();
35290
+ } else if (this.css.parentNode) {
35291
+ this.css.parentNode.removeChild(this.css);
35292
+ }
35293
+ } catch (error) {
35294
+ console.warn("Failed to remove CSS element:", error);
35295
+ }
35296
+ }
35240
35297
  this.css = null;
35298
+ this.emit("unmount", { editor: this });
35241
35299
  }
35242
35300
  /**
35243
35301
  * Returns the editor storage.
@@ -36563,7 +36621,7 @@ var Bold = Mark2.create({
36563
36621
  });
36564
36622
 
36565
36623
  // ../../node_modules/@tiptap/extension-code/dist/index.js
36566
- var inputRegex2 = /(^|[^`])`([^`]+)`(?!`)/;
36624
+ var inputRegex2 = /(^|[^`])`([^`]+)`(?!`)$/;
36567
36625
  var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;
36568
36626
  var Code = Mark2.create({
36569
36627
  name: "code",
@@ -36628,6 +36686,8 @@ var CodeBlock = Node3.create({
36628
36686
  exitOnTripleEnter: true,
36629
36687
  exitOnArrowDown: true,
36630
36688
  defaultLanguage: null,
36689
+ enableTabIndentation: false,
36690
+ tabSize: 4,
36631
36691
  HTMLAttributes: {}
36632
36692
  };
36633
36693
  },
@@ -36701,6 +36761,91 @@ var CodeBlock = Node3.create({
36701
36761
  }
36702
36762
  return false;
36703
36763
  },
36764
+ // handle tab indentation
36765
+ Tab: ({ editor }) => {
36766
+ if (!this.options.enableTabIndentation) {
36767
+ return false;
36768
+ }
36769
+ const { state } = editor;
36770
+ const { selection } = state;
36771
+ const { $from, empty: empty2 } = selection;
36772
+ if ($from.parent.type !== this.type) {
36773
+ return false;
36774
+ }
36775
+ const indent = " ".repeat(this.options.tabSize);
36776
+ if (empty2) {
36777
+ return editor.commands.insertContent(indent);
36778
+ }
36779
+ return editor.commands.command(({ tr: tr2 }) => {
36780
+ const { from: from2, to } = selection;
36781
+ const text = state.doc.textBetween(from2, to, "\n", "\n");
36782
+ const lines = text.split("\n");
36783
+ const indentedText = lines.map((line) => indent + line).join("\n");
36784
+ tr2.replaceWith(from2, to, state.schema.text(indentedText));
36785
+ return true;
36786
+ });
36787
+ },
36788
+ // handle shift+tab reverse indentation
36789
+ "Shift-Tab": ({ editor }) => {
36790
+ if (!this.options.enableTabIndentation) {
36791
+ return false;
36792
+ }
36793
+ const { state } = editor;
36794
+ const { selection } = state;
36795
+ const { $from, empty: empty2 } = selection;
36796
+ if ($from.parent.type !== this.type) {
36797
+ return false;
36798
+ }
36799
+ if (empty2) {
36800
+ return editor.commands.command(({ tr: tr2 }) => {
36801
+ var _a2;
36802
+ const { pos } = $from;
36803
+ const codeBlockStart = $from.start();
36804
+ const codeBlockEnd = $from.end();
36805
+ const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, "\n", "\n");
36806
+ const lines = allText.split("\n");
36807
+ let currentLineIndex = 0;
36808
+ let charCount = 0;
36809
+ const relativeCursorPos = pos - codeBlockStart;
36810
+ for (let i = 0; i < lines.length; i += 1) {
36811
+ if (charCount + lines[i].length >= relativeCursorPos) {
36812
+ currentLineIndex = i;
36813
+ break;
36814
+ }
36815
+ charCount += lines[i].length + 1;
36816
+ }
36817
+ const currentLine = lines[currentLineIndex];
36818
+ const leadingSpaces = ((_a2 = currentLine.match(/^ */)) == null ? void 0 : _a2[0]) || "";
36819
+ const spacesToRemove = Math.min(leadingSpaces.length, this.options.tabSize);
36820
+ if (spacesToRemove === 0) {
36821
+ return true;
36822
+ }
36823
+ let lineStartPos = codeBlockStart;
36824
+ for (let i = 0; i < currentLineIndex; i += 1) {
36825
+ lineStartPos += lines[i].length + 1;
36826
+ }
36827
+ tr2.delete(lineStartPos, lineStartPos + spacesToRemove);
36828
+ const cursorPosInLine = pos - lineStartPos;
36829
+ if (cursorPosInLine <= spacesToRemove) {
36830
+ tr2.setSelection(TextSelection.create(tr2.doc, lineStartPos));
36831
+ }
36832
+ return true;
36833
+ });
36834
+ }
36835
+ return editor.commands.command(({ tr: tr2 }) => {
36836
+ const { from: from2, to } = selection;
36837
+ const text = state.doc.textBetween(from2, to, "\n", "\n");
36838
+ const lines = text.split("\n");
36839
+ const reverseIndentText = lines.map((line) => {
36840
+ var _a2;
36841
+ const leadingSpaces = ((_a2 = line.match(/^ */)) == null ? void 0 : _a2[0]) || "";
36842
+ const spacesToRemove = Math.min(leadingSpaces.length, this.options.tabSize);
36843
+ return line.slice(spacesToRemove);
36844
+ }).join("\n");
36845
+ tr2.replaceWith(from2, to, state.schema.text(reverseIndentText));
36846
+ return true;
36847
+ });
36848
+ },
36704
36849
  // exit node on triple enter
36705
36850
  Enter: ({ editor }) => {
36706
36851
  if (!this.options.exitOnTripleEnter) {
@@ -43701,6 +43846,20 @@ var BackgroundColor = Extension.create({
43701
43846
  default: null,
43702
43847
  parseHTML: (element) => {
43703
43848
  var _a2;
43849
+ const styleAttr = element.getAttribute("style");
43850
+ if (styleAttr) {
43851
+ const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
43852
+ for (let i = decls.length - 1; i >= 0; i -= 1) {
43853
+ const parts = decls[i].split(":");
43854
+ if (parts.length >= 2) {
43855
+ const prop = parts[0].trim().toLowerCase();
43856
+ const val = parts.slice(1).join(":").trim();
43857
+ if (prop === "background-color") {
43858
+ return val.replace(/['"]+/g, "");
43859
+ }
43860
+ }
43861
+ }
43862
+ }
43704
43863
  return (_a2 = element.style.backgroundColor) == null ? void 0 : _a2.replace(/['"]+/g, "");
43705
43864
  },
43706
43865
  renderHTML: (attributes) => {
@@ -43743,6 +43902,20 @@ var Color = Extension.create({
43743
43902
  default: null,
43744
43903
  parseHTML: (element) => {
43745
43904
  var _a2;
43905
+ const styleAttr = element.getAttribute("style");
43906
+ if (styleAttr) {
43907
+ const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
43908
+ for (let i = decls.length - 1; i >= 0; i -= 1) {
43909
+ const parts = decls[i].split(":");
43910
+ if (parts.length >= 2) {
43911
+ const prop = parts[0].trim().toLowerCase();
43912
+ const val = parts.slice(1).join(":").trim();
43913
+ if (prop === "color") {
43914
+ return val.replace(/['"]+/g, "");
43915
+ }
43916
+ }
43917
+ }
43918
+ }
43746
43919
  return (_a2 = element.style.color) == null ? void 0 : _a2.replace(/['"]+/g, "");
43747
43920
  },
43748
43921
  renderHTML: (attributes) => {
@@ -44235,6 +44408,8 @@ var CodeBlockLowlight = index_default.extend({
44235
44408
  exitOnTripleEnter: true,
44236
44409
  exitOnArrowDown: true,
44237
44410
  defaultLanguage: null,
44411
+ enableTabIndentation: false,
44412
+ tabSize: 4,
44238
44413
  HTMLAttributes: {}
44239
44414
  };
44240
44415
  },
@@ -57939,29 +58114,6 @@ var SlashCommandsExtension = Extension.create({
57939
58114
  }
57940
58115
  });
57941
58116
 
57942
- // #style-inject:#style-inject
57943
- function styleInject(css2, { insertAt } = {}) {
57944
- if (!css2 || typeof document === "undefined")
57945
- return;
57946
- const head = document.head || document.getElementsByTagName("head")[0];
57947
- const style2 = document.createElement("style");
57948
- style2.type = "text/css";
57949
- if (insertAt === "top") {
57950
- if (head.firstChild) {
57951
- head.insertBefore(style2, head.firstChild);
57952
- } else {
57953
- head.appendChild(style2);
57954
- }
57955
- } else {
57956
- head.appendChild(style2);
57957
- }
57958
- if (style2.styleSheet) {
57959
- style2.styleSheet.cssText = css2;
57960
- } else {
57961
- style2.appendChild(document.createTextNode(css2));
57962
- }
57963
- }
57964
-
57965
58117
  // src/components/rich-text-editor/slash-commands.css
57966
58118
  styleInject(".slash-commands-menu {\n border-radius: var(--radius);\n border-width: 1px;\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.slash-commands-menu:is(.dark *) {\n --tw-border-opacity: 1;\n border-color: rgb(55 65 81 / var(--tw-border-opacity, 1));\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));\n}\n.slash-commands-menu {\n max-height: 20rem;\n min-width: 280px;\n overflow-y: auto;\n padding: 0.5rem;\n}\n.slash-command-item {\n display: flex;\n cursor: pointer;\n align-items: center;\n gap: 0.75rem;\n border-radius: calc(var(--radius) - 2px);\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.slash-command-item:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n.slash-command-item:hover:is(.dark *) {\n --tw-bg-opacity: 1;\n background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));\n}\n.slash-command-item.selected {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n.slash-command-item.selected:is(.dark *) {\n --tw-bg-opacity: 1;\n background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));\n}\n.slash-command-item svg {\n height: 1rem;\n width: 1rem;\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1));\n}\n.slash-command-item svg:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity, 1));\n}\n.slash-command-item > div {\n flex: 1 1 0%;\n}\n.slash-command-item .command-name {\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.slash-command-item .command-name:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(243 244 246 / var(--tw-text-opacity, 1));\n}\n.slash-command-item .command-description {\n margin-top: 0.125rem;\n font-size: 0.75rem;\n line-height: 1rem;\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1));\n}\n.slash-command-item .command-description:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity, 1));\n}\n.dark .slash-commands-menu {\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);\n}\n");
57967
58119
 
@@ -62513,7 +62665,8 @@ function AdvancedChartInternal({
62513
62665
  showTooltip && /* @__PURE__ */ jsx(
62514
62666
  Tooltip,
62515
62667
  {
62516
- cursor: { fill: darkMode ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)" }
62668
+ cursor: { fill: darkMode ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)" },
62669
+ content: customTooltip ? customTooltip : CustomTooltip
62517
62670
  }
62518
62671
  ),
62519
62672
  showLegend && /* @__PURE__ */ jsx(
@@ -62585,7 +62738,12 @@ function AdvancedChartInternal({
62585
62738
  axisLine: { stroke: darkMode ? "#4b5563" : "#d1d5db" }
62586
62739
  }
62587
62740
  ),
62588
- showTooltip && /* @__PURE__ */ jsx(Tooltip, {}),
62741
+ showTooltip && /* @__PURE__ */ jsx(
62742
+ Tooltip,
62743
+ {
62744
+ content: customTooltip ? customTooltip : CustomTooltip
62745
+ }
62746
+ ),
62589
62747
  showLegend && /* @__PURE__ */ jsx(
62590
62748
  Legend,
62591
62749
  {
@@ -62716,7 +62874,12 @@ function AdvancedChartInternal({
62716
62874
  axisLine: { stroke: darkMode ? "#4b5563" : "#d1d5db" }
62717
62875
  }
62718
62876
  ),
62719
- showTooltip && /* @__PURE__ */ jsx(Tooltip, {}),
62877
+ showTooltip && /* @__PURE__ */ jsx(
62878
+ Tooltip,
62879
+ {
62880
+ content: customTooltip ? customTooltip : CustomTooltip
62881
+ }
62882
+ ),
62720
62883
  showLegend && /* @__PURE__ */ jsx(
62721
62884
  Legend,
62722
62885
  {
@@ -74847,7 +75010,7 @@ function SidebarInternal({
74847
75010
  ] });
74848
75011
  });
74849
75012
  const sidebarClasses = cn(
74850
- "moonui-pro flex h-full flex-col bg-background border-r",
75013
+ "moonui-pro-sidebar flex flex-col bg-background border-r",
74851
75014
  glassmorphism && "bg-background/80 backdrop-blur-xl border-white/10",
74852
75015
  collapsed && !isMobile && "w-16",
74853
75016
  !collapsed && !isMobile && "w-64",
@@ -74875,7 +75038,7 @@ function SidebarInternal({
74875
75038
  children: /* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" })
74876
75039
  }
74877
75040
  ),
74878
- /* @__PURE__ */ jsx(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsx(SheetContent, { side: "left", className: "w-80 p-0", children: /* @__PURE__ */ jsxs("div", { className: cn(sidebarClasses, "sidebar-container flex flex-col"), children: [
75041
+ /* @__PURE__ */ jsx(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsx(SheetContent, { side: "left", className: "w-80 p-0", children: /* @__PURE__ */ jsxs("div", { className: cn(sidebarClasses, "h-full overflow-y-auto"), children: [
74879
75042
  animatedBackground && /* @__PURE__ */ jsx(
74880
75043
  motion.div,
74881
75044
  {
@@ -74901,7 +75064,7 @@ function SidebarInternal({
74901
75064
  ] }) }) })
74902
75065
  ] });
74903
75066
  }
74904
- return /* @__PURE__ */ jsxs("aside", { className: cn(sidebarClasses, "sidebar-container hidden md:flex flex-col"), children: [
75067
+ return /* @__PURE__ */ jsxs("aside", { className: cn(sidebarClasses, "hidden md:flex sticky top-0 h-screen overflow-y-auto"), children: [
74905
75068
  animatedBackground && /* @__PURE__ */ jsx(
74906
75069
  motion.div,
74907
75070
  {
@@ -75091,7 +75254,7 @@ function NavbarInternal({
75091
75254
  }) });
75092
75255
  const MobileMenu = () => /* @__PURE__ */ jsxs(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [
75093
75256
  /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "icon", className: "md:hidden", children: /* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" }) }) }),
75094
- /* @__PURE__ */ jsx(SheetContent, { side: mobileMenuPosition, className: "w-80 p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col", children: [
75257
+ /* @__PURE__ */ jsx(SheetContent, { side: mobileMenuPosition, className: "w-80 p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen overflow-y-auto", children: [
75095
75258
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
75096
75259
  branding && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
75097
75260
  branding.logo,
@@ -75180,7 +75343,7 @@ function NavbarInternal({
75180
75343
  className
75181
75344
  );
75182
75345
  return /* @__PURE__ */ jsxs(Fragment, { children: [
75183
- /* @__PURE__ */ jsxs("nav", { ref: navRef, className: navClasses, children: [
75346
+ /* @__PURE__ */ jsxs("nav", { ref: navRef, className: cn("moonui-pro-navbar", navClasses), children: [
75184
75347
  /* @__PURE__ */ jsxs("div", { className: cn(
75185
75348
  "flex items-center",
75186
75349
  getHeight(),
@@ -78445,10 +78608,10 @@ var cardVariants = cva(
78445
78608
  glass: "border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"
78446
78609
  },
78447
78610
  size: {
78448
- default: "p-6",
78449
- sm: "p-4",
78450
- lg: "p-8",
78451
- xl: "p-10"
78611
+ default: "",
78612
+ sm: "",
78613
+ lg: "",
78614
+ xl: ""
78452
78615
  },
78453
78616
  radius: {
78454
78617
  default: "rounded-lg",
@@ -78501,7 +78664,7 @@ var CardHeader = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
78501
78664
  "div",
78502
78665
  {
78503
78666
  ref,
78504
- className: cn2("moonui-theme", "flex flex-col space-y-1.5", className),
78667
+ className: cn2("moonui-theme", "flex flex-col space-y-1.5 p-6", className),
78505
78668
  ...props
78506
78669
  }
78507
78670
  ));
@@ -78524,13 +78687,13 @@ var CardDescription2 = t.forwardRef(({ className, ...props }, ref) => /* @__PURE
78524
78687
  }
78525
78688
  ));
78526
78689
  CardDescription2.displayName = "CardDescription";
78527
- var CardContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn2("moonui-theme", "pt-0", className), ...props }));
78690
+ var CardContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn2("moonui-theme", "p-6 pt-0", className), ...props }));
78528
78691
  CardContent.displayName = "CardContent";
78529
78692
  var CardFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
78530
78693
  "div",
78531
78694
  {
78532
78695
  ref,
78533
- className: cn2("moonui-theme", "flex items-center pt-4", className),
78696
+ className: cn2("moonui-theme", "flex items-center p-6 pt-0", className),
78534
78697
  ...props
78535
78698
  }
78536
78699
  ));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.25.15",
3
+ "version": "2.25.17",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",