@moontra/moonui-pro 2.0.8 → 2.0.10

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
@@ -9,10 +9,12 @@ import { Loader2, ChevronDown, ChevronUp, Check, X, ChevronRight, Circle, Lock,
9
9
  import * as ReactDOM from 'react-dom';
10
10
  import ReactDOM__default, { createPortal, flushSync } from 'react-dom';
11
11
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
12
+ import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';
13
+ import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector.js';
12
14
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
13
15
 
14
16
  /**
15
- * @moontra/moonui-pro v2.0.7
17
+ * @moontra/moonui-pro v2.0.9
16
18
  * Premium UI components for MoonUI
17
19
  * (c) 2025 MoonUI. All rights reserved.
18
20
  * @license Commercial - https://moonui.dev/license
@@ -23,14 +25,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
23
25
  var __getOwnPropNames = Object.getOwnPropertyNames;
24
26
  var __getProtoOf = Object.getPrototypeOf;
25
27
  var __hasOwnProp = Object.prototype.hasOwnProperty;
26
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
27
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
28
- }) : x)(function(x) {
29
- if (typeof require !== "undefined")
30
- return require.apply(this, arguments);
31
- throw new Error('Dynamic require of "' + x + '" is not supported');
32
- });
33
- var __commonJS = (cb, mod) => function __require2() {
28
+ var __commonJS = (cb, mod) => function __require() {
34
29
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
35
30
  };
36
31
  var __copyProps = (to, from2, except, desc) => {
@@ -50,132 +45,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
50
45
  mod
51
46
  ));
52
47
 
53
- // ../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
54
- var require_use_sync_external_store_shim_production = __commonJS({
55
- "../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports) {
56
- var React64 = __require("react");
57
- function is(x, y) {
58
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
59
- }
60
- var objectIs = "function" === typeof Object.is ? Object.is : is;
61
- var useState29 = React64.useState;
62
- var useEffect27 = React64.useEffect;
63
- var useLayoutEffect5 = React64.useLayoutEffect;
64
- var useDebugValue3 = React64.useDebugValue;
65
- function useSyncExternalStore$2(subscribe, getSnapshot) {
66
- var value = getSnapshot(), _useState = useState29({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
67
- useLayoutEffect5(
68
- function() {
69
- inst.value = value;
70
- inst.getSnapshot = getSnapshot;
71
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
72
- },
73
- [subscribe, value, getSnapshot]
74
- );
75
- useEffect27(
76
- function() {
77
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
78
- return subscribe(function() {
79
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
80
- });
81
- },
82
- [subscribe]
83
- );
84
- useDebugValue3(value);
85
- return value;
86
- }
87
- function checkIfSnapshotChanged(inst) {
88
- var latestGetSnapshot = inst.getSnapshot;
89
- inst = inst.value;
90
- try {
91
- var nextValue = latestGetSnapshot();
92
- return !objectIs(inst, nextValue);
93
- } catch (error) {
94
- return true;
95
- }
96
- }
97
- function useSyncExternalStore$1(subscribe, getSnapshot) {
98
- return getSnapshot();
99
- }
100
- var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
101
- exports.useSyncExternalStore = void 0 !== React64.useSyncExternalStore ? React64.useSyncExternalStore : shim;
102
- }
103
- });
104
-
105
- // ../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
106
- var require_use_sync_external_store_shim_development = __commonJS({
107
- "../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
108
- "production" !== process.env.NODE_ENV && function() {
109
- function is(x, y) {
110
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
111
- }
112
- function useSyncExternalStore$2(subscribe, getSnapshot) {
113
- didWarnOld18Alpha || void 0 === React64.startTransition || (didWarnOld18Alpha = true, console.error(
114
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
115
- ));
116
- var value = getSnapshot();
117
- if (!didWarnUncachedGetSnapshot) {
118
- var cachedValue = getSnapshot();
119
- objectIs(value, cachedValue) || (console.error(
120
- "The result of getSnapshot should be cached to avoid an infinite loop"
121
- ), didWarnUncachedGetSnapshot = true);
122
- }
123
- cachedValue = useState29({
124
- inst: { value, getSnapshot }
125
- });
126
- var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
127
- useLayoutEffect5(
128
- function() {
129
- inst.value = value;
130
- inst.getSnapshot = getSnapshot;
131
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
132
- },
133
- [subscribe, value, getSnapshot]
134
- );
135
- useEffect27(
136
- function() {
137
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
138
- return subscribe(function() {
139
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
140
- });
141
- },
142
- [subscribe]
143
- );
144
- useDebugValue3(value);
145
- return value;
146
- }
147
- function checkIfSnapshotChanged(inst) {
148
- var latestGetSnapshot = inst.getSnapshot;
149
- inst = inst.value;
150
- try {
151
- var nextValue = latestGetSnapshot();
152
- return !objectIs(inst, nextValue);
153
- } catch (error) {
154
- return true;
155
- }
156
- }
157
- function useSyncExternalStore$1(subscribe, getSnapshot) {
158
- return getSnapshot();
159
- }
160
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
161
- var React64 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState29 = React64.useState, useEffect27 = React64.useEffect, useLayoutEffect5 = React64.useLayoutEffect, useDebugValue3 = React64.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
162
- exports.useSyncExternalStore = void 0 !== React64.useSyncExternalStore ? React64.useSyncExternalStore : shim;
163
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
164
- }();
165
- }
166
- });
167
-
168
- // ../../node_modules/use-sync-external-store/shim/index.js
169
- var require_shim = __commonJS({
170
- "../../node_modules/use-sync-external-store/shim/index.js"(exports, module) {
171
- if (process.env.NODE_ENV === "production") {
172
- module.exports = require_use_sync_external_store_shim_production();
173
- } else {
174
- module.exports = require_use_sync_external_store_shim_development();
175
- }
176
- }
177
- });
178
-
179
48
  // ../../node_modules/fast-deep-equal/es6/react.js
180
49
  var require_react = __commonJS({
181
50
  "../../node_modules/fast-deep-equal/es6/react.js"(exports, module) {
@@ -251,154 +120,6 @@ var require_react = __commonJS({
251
120
  }
252
121
  });
253
122
 
254
- // ../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
255
- var require_with_selector_production = __commonJS({
256
- "../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js"(exports) {
257
- var React64 = __require("react");
258
- var shim = require_shim();
259
- function is(x, y) {
260
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
261
- }
262
- var objectIs = "function" === typeof Object.is ? Object.is : is;
263
- var useSyncExternalStore3 = shim.useSyncExternalStore;
264
- var useRef23 = React64.useRef;
265
- var useEffect27 = React64.useEffect;
266
- var useMemo10 = React64.useMemo;
267
- var useDebugValue3 = React64.useDebugValue;
268
- exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
269
- var instRef = useRef23(null);
270
- if (null === instRef.current) {
271
- var inst = { hasValue: false, value: null };
272
- instRef.current = inst;
273
- } else
274
- inst = instRef.current;
275
- instRef = useMemo10(
276
- function() {
277
- function memoizedSelector(nextSnapshot) {
278
- if (!hasMemo) {
279
- hasMemo = true;
280
- memoizedSnapshot = nextSnapshot;
281
- nextSnapshot = selector(nextSnapshot);
282
- if (void 0 !== isEqual && inst.hasValue) {
283
- var currentSelection = inst.value;
284
- if (isEqual(currentSelection, nextSnapshot))
285
- return memoizedSelection = currentSelection;
286
- }
287
- return memoizedSelection = nextSnapshot;
288
- }
289
- currentSelection = memoizedSelection;
290
- if (objectIs(memoizedSnapshot, nextSnapshot))
291
- return currentSelection;
292
- var nextSelection = selector(nextSnapshot);
293
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
294
- return memoizedSnapshot = nextSnapshot, currentSelection;
295
- memoizedSnapshot = nextSnapshot;
296
- return memoizedSelection = nextSelection;
297
- }
298
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
299
- return [
300
- function() {
301
- return memoizedSelector(getSnapshot());
302
- },
303
- null === maybeGetServerSnapshot ? void 0 : function() {
304
- return memoizedSelector(maybeGetServerSnapshot());
305
- }
306
- ];
307
- },
308
- [getSnapshot, getServerSnapshot, selector, isEqual]
309
- );
310
- var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
311
- useEffect27(
312
- function() {
313
- inst.hasValue = true;
314
- inst.value = value;
315
- },
316
- [value]
317
- );
318
- useDebugValue3(value);
319
- return value;
320
- };
321
- }
322
- });
323
-
324
- // ../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
325
- var require_with_selector_development = __commonJS({
326
- "../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
327
- "production" !== process.env.NODE_ENV && function() {
328
- function is(x, y) {
329
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
330
- }
331
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
332
- var React64 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef23 = React64.useRef, useEffect27 = React64.useEffect, useMemo10 = React64.useMemo, useDebugValue3 = React64.useDebugValue;
333
- exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
334
- var instRef = useRef23(null);
335
- if (null === instRef.current) {
336
- var inst = { hasValue: false, value: null };
337
- instRef.current = inst;
338
- } else
339
- inst = instRef.current;
340
- instRef = useMemo10(
341
- function() {
342
- function memoizedSelector(nextSnapshot) {
343
- if (!hasMemo) {
344
- hasMemo = true;
345
- memoizedSnapshot = nextSnapshot;
346
- nextSnapshot = selector(nextSnapshot);
347
- if (void 0 !== isEqual && inst.hasValue) {
348
- var currentSelection = inst.value;
349
- if (isEqual(currentSelection, nextSnapshot))
350
- return memoizedSelection = currentSelection;
351
- }
352
- return memoizedSelection = nextSnapshot;
353
- }
354
- currentSelection = memoizedSelection;
355
- if (objectIs(memoizedSnapshot, nextSnapshot))
356
- return currentSelection;
357
- var nextSelection = selector(nextSnapshot);
358
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
359
- return memoizedSnapshot = nextSnapshot, currentSelection;
360
- memoizedSnapshot = nextSnapshot;
361
- return memoizedSelection = nextSelection;
362
- }
363
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
364
- return [
365
- function() {
366
- return memoizedSelector(getSnapshot());
367
- },
368
- null === maybeGetServerSnapshot ? void 0 : function() {
369
- return memoizedSelector(maybeGetServerSnapshot());
370
- }
371
- ];
372
- },
373
- [getSnapshot, getServerSnapshot, selector, isEqual]
374
- );
375
- var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
376
- useEffect27(
377
- function() {
378
- inst.hasValue = true;
379
- inst.value = value;
380
- },
381
- [value]
382
- );
383
- useDebugValue3(value);
384
- return value;
385
- };
386
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
387
- }();
388
- }
389
- });
390
-
391
- // ../../node_modules/use-sync-external-store/shim/with-selector.js
392
- var require_with_selector = __commonJS({
393
- "../../node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
394
- if (process.env.NODE_ENV === "production") {
395
- module.exports = require_with_selector_production();
396
- } else {
397
- module.exports = require_with_selector_development();
398
- }
399
- }
400
- });
401
-
402
123
  // ../../node_modules/highlight.js/lib/core.js
403
124
  var require_core = __commonJS({
404
125
  "../../node_modules/highlight.js/lib/core.js"(exports, module) {
@@ -10985,9 +10706,6 @@ function Kanban({
10985
10706
  ] }) });
10986
10707
  }
10987
10708
 
10988
- // ../../node_modules/@tiptap/react/dist/index.js
10989
- var import_shim = __toESM(require_shim(), 1);
10990
-
10991
10709
  // ../../node_modules/orderedmap/dist/index.js
10992
10710
  function OrderedMap(content) {
10993
10711
  this.content = content;
@@ -27473,9 +27191,7 @@ function markPasteRule(config) {
27473
27191
  }
27474
27192
 
27475
27193
  // ../../node_modules/@tiptap/react/dist/index.js
27476
- var import_shim2 = __toESM(require_shim(), 1);
27477
27194
  var import_react33 = __toESM(require_react(), 1);
27478
- var import_with_selector = __toESM(require_with_selector(), 1);
27479
27195
  var mergeRefs = (...refs) => {
27480
27196
  return (node) => {
27481
27197
  refs.forEach((ref) => {
@@ -27488,7 +27204,7 @@ var mergeRefs = (...refs) => {
27488
27204
  };
27489
27205
  };
27490
27206
  var Portals = ({ contentComponent }) => {
27491
- const renderers = (0, import_shim.useSyncExternalStore)(
27207
+ const renderers = useSyncExternalStore(
27492
27208
  contentComponent.subscribe,
27493
27209
  contentComponent.getSnapshot,
27494
27210
  contentComponent.getServerSnapshot
@@ -27689,7 +27405,7 @@ var EditorStateManager = class {
27689
27405
  function useEditorState(options) {
27690
27406
  var _a2;
27691
27407
  const [editorStateManager] = useState(() => new EditorStateManager(options.editor));
27692
- const selectedState = (0, import_with_selector.useSyncExternalStoreWithSelector)(
27408
+ const selectedState = useSyncExternalStoreWithSelector(
27693
27409
  editorStateManager.subscribe,
27694
27410
  editorStateManager.getSnapshot,
27695
27411
  editorStateManager.getServerSnapshot,
@@ -27702,7 +27418,7 @@ function useEditorState(options) {
27702
27418
  useDebugValue(selectedState);
27703
27419
  return selectedState;
27704
27420
  }
27705
- var isDev = process.env.NODE_ENV !== "production";
27421
+ var isDev = true;
27706
27422
  var isSSR = typeof window === "undefined";
27707
27423
  var isNext = isSSR || Boolean(typeof window !== "undefined" && window.next);
27708
27424
  var EditorInstanceManager = class _EditorInstanceManager {
@@ -27732,12 +27448,11 @@ var EditorInstanceManager = class _EditorInstanceManager {
27732
27448
  getInitialEditor() {
27733
27449
  if (this.options.current.immediatelyRender === void 0) {
27734
27450
  if (isSSR || isNext) {
27735
- if (isDev) {
27451
+ {
27736
27452
  throw new Error(
27737
27453
  "Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."
27738
27454
  );
27739
27455
  }
27740
- return null;
27741
27456
  }
27742
27457
  return this.createEditor();
27743
27458
  }
@@ -27939,7 +27654,7 @@ function useEditor(options = {}, deps = []) {
27939
27654
  const mostRecentOptions = useRef(options);
27940
27655
  mostRecentOptions.current = options;
27941
27656
  const [instanceManager] = useState(() => new EditorInstanceManager(mostRecentOptions));
27942
- const editor = (0, import_shim2.useSyncExternalStore)(
27657
+ const editor = useSyncExternalStore(
27943
27658
  instanceManager.subscribe,
27944
27659
  instanceManager.getEditor,
27945
27660
  instanceManager.getServerSnapshot
@@ -54625,53 +54340,5 @@ var SwipeableCard = React50__default.forwardRef(
54625
54340
  }
54626
54341
  );
54627
54342
  SwipeableCard.displayName = "SwipeableCard";
54628
- /*! Bundled license information:
54629
-
54630
- use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
54631
- (**
54632
- * @license React
54633
- * use-sync-external-store-shim.production.js
54634
- *
54635
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54636
- *
54637
- * This source code is licensed under the MIT license found in the
54638
- * LICENSE file in the root directory of this source tree.
54639
- *)
54640
-
54641
- use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
54642
- (**
54643
- * @license React
54644
- * use-sync-external-store-shim.development.js
54645
- *
54646
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54647
- *
54648
- * This source code is licensed under the MIT license found in the
54649
- * LICENSE file in the root directory of this source tree.
54650
- *)
54651
-
54652
- use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
54653
- (**
54654
- * @license React
54655
- * use-sync-external-store-shim/with-selector.production.js
54656
- *
54657
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54658
- *
54659
- * This source code is licensed under the MIT license found in the
54660
- * LICENSE file in the root directory of this source tree.
54661
- *)
54662
-
54663
- use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
54664
- (**
54665
- * @license React
54666
- * use-sync-external-store-shim/with-selector.development.js
54667
- *
54668
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54669
- *
54670
- * This source code is licensed under the MIT license found in the
54671
- * LICENSE file in the root directory of this source tree.
54672
- *)
54673
- */
54674
54343
 
54675
54344
  export { Calendar2 as Calendar, Kanban, MemoryAnalytics, MemoryEfficientData, RichTextEditor, SelectableVirtualList, SwipeableCard, VirtualList, useStreamingData, useVirtualList };
54676
- //# sourceMappingURL=out.js.map
54677
- //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
- "main": "dist/index.js",
5
+ "type": "module",
6
+ "main": "dist/index.mjs",
6
7
  "module": "dist/index.mjs",
7
8
  "types": "dist/index.d.ts",
8
9
  "files": [
@@ -1,9 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const https = require('https');
4
- const fs = require('fs');
5
- const path = require('path');
6
- const os = require('os');
3
+ import https from 'https';
4
+ import fs from 'fs';
5
+ import path from 'path';
6
+ import os from 'os';
7
+ import { fileURLToPath } from 'url';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
7
11
 
8
12
  // ANSI color codes for console output
9
13
  const colors = {