@iclips/ui 0.0.3 → 0.0.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 CHANGED
@@ -46,6 +46,8 @@ var reactColorful = require('react-colorful');
46
46
  var dateFns = require('date-fns');
47
47
  var locale = require('date-fns/locale');
48
48
  var ReactDOM = require('react-dom');
49
+ var index_js = require('use-sync-external-store/shim/index.js');
50
+ var withSelector_js = require('use-sync-external-store/shim/with-selector.js');
49
51
 
50
52
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
51
53
 
@@ -104,13 +106,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
104
106
  var __getOwnPropNames = Object.getOwnPropertyNames;
105
107
  var __getProtoOf = Object.getPrototypeOf;
106
108
  var __hasOwnProp = Object.prototype.hasOwnProperty;
107
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
108
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
109
- }) : x)(function(x) {
110
- if (typeof require !== "undefined") return require.apply(this, arguments);
111
- throw Error('Dynamic require of "' + x + '" is not supported');
112
- });
113
- var __commonJS = (cb, mod) => function __require2() {
109
+ var __commonJS = (cb, mod) => function __require() {
114
110
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
115
111
  };
116
112
  var __export = (target, all) => {
@@ -134,132 +130,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
134
130
  mod
135
131
  ));
136
132
 
137
- // ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
138
- var require_use_sync_external_store_shim_production = __commonJS({
139
- "../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports$1) {
140
- var React31 = __require("react");
141
- function is(x, y) {
142
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
143
- }
144
- var objectIs = "function" === typeof Object.is ? Object.is : is;
145
- var useState18 = React31.useState;
146
- var useEffect16 = React31.useEffect;
147
- var useLayoutEffect4 = React31.useLayoutEffect;
148
- var useDebugValue3 = React31.useDebugValue;
149
- function useSyncExternalStore$2(subscribe, getSnapshot) {
150
- var value = getSnapshot(), _useState = useState18({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
151
- useLayoutEffect4(
152
- function() {
153
- inst.value = value;
154
- inst.getSnapshot = getSnapshot;
155
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
156
- },
157
- [subscribe, value, getSnapshot]
158
- );
159
- useEffect16(
160
- function() {
161
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
162
- return subscribe(function() {
163
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
164
- });
165
- },
166
- [subscribe]
167
- );
168
- useDebugValue3(value);
169
- return value;
170
- }
171
- function checkIfSnapshotChanged(inst) {
172
- var latestGetSnapshot = inst.getSnapshot;
173
- inst = inst.value;
174
- try {
175
- var nextValue = latestGetSnapshot();
176
- return !objectIs(inst, nextValue);
177
- } catch (error) {
178
- return true;
179
- }
180
- }
181
- function useSyncExternalStore$1(subscribe, getSnapshot) {
182
- return getSnapshot();
183
- }
184
- var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
185
- exports$1.useSyncExternalStore = void 0 !== React31.useSyncExternalStore ? React31.useSyncExternalStore : shim;
186
- }
187
- });
188
-
189
- // ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
190
- var require_use_sync_external_store_shim_development = __commonJS({
191
- "../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports$1) {
192
- "production" !== process.env.NODE_ENV && (function() {
193
- function is(x, y) {
194
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
195
- }
196
- function useSyncExternalStore$2(subscribe, getSnapshot) {
197
- didWarnOld18Alpha || void 0 === React31.startTransition || (didWarnOld18Alpha = true, console.error(
198
- "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."
199
- ));
200
- var value = getSnapshot();
201
- if (!didWarnUncachedGetSnapshot) {
202
- var cachedValue = getSnapshot();
203
- objectIs(value, cachedValue) || (console.error(
204
- "The result of getSnapshot should be cached to avoid an infinite loop"
205
- ), didWarnUncachedGetSnapshot = true);
206
- }
207
- cachedValue = useState18({
208
- inst: { value, getSnapshot }
209
- });
210
- var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
211
- useLayoutEffect4(
212
- function() {
213
- inst.value = value;
214
- inst.getSnapshot = getSnapshot;
215
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
216
- },
217
- [subscribe, value, getSnapshot]
218
- );
219
- useEffect16(
220
- function() {
221
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
222
- return subscribe(function() {
223
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
224
- });
225
- },
226
- [subscribe]
227
- );
228
- useDebugValue3(value);
229
- return value;
230
- }
231
- function checkIfSnapshotChanged(inst) {
232
- var latestGetSnapshot = inst.getSnapshot;
233
- inst = inst.value;
234
- try {
235
- var nextValue = latestGetSnapshot();
236
- return !objectIs(inst, nextValue);
237
- } catch (error) {
238
- return true;
239
- }
240
- }
241
- function useSyncExternalStore$1(subscribe, getSnapshot) {
242
- return getSnapshot();
243
- }
244
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
245
- var React31 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState18 = React31.useState, useEffect16 = React31.useEffect, useLayoutEffect4 = React31.useLayoutEffect, useDebugValue3 = React31.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
246
- exports$1.useSyncExternalStore = void 0 !== React31.useSyncExternalStore ? React31.useSyncExternalStore : shim;
247
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
248
- })();
249
- }
250
- });
251
-
252
- // ../node_modules/use-sync-external-store/shim/index.js
253
- var require_shim = __commonJS({
254
- "../node_modules/use-sync-external-store/shim/index.js"(exports$1, module) {
255
- if (process.env.NODE_ENV === "production") {
256
- module.exports = require_use_sync_external_store_shim_production();
257
- } else {
258
- module.exports = require_use_sync_external_store_shim_development();
259
- }
260
- }
261
- });
262
-
263
133
  // ../node_modules/fast-deep-equal/es6/react.js
264
134
  var require_react = __commonJS({
265
135
  "../node_modules/fast-deep-equal/es6/react.js"(exports$1, module) {
@@ -318,151 +188,6 @@ var require_react = __commonJS({
318
188
  }
319
189
  });
320
190
 
321
- // ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
322
- var require_with_selector_production = __commonJS({
323
- "../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js"(exports$1) {
324
- var React31 = __require("react");
325
- var shim = require_shim();
326
- function is(x, y) {
327
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
328
- }
329
- var objectIs = "function" === typeof Object.is ? Object.is : is;
330
- var useSyncExternalStore3 = shim.useSyncExternalStore;
331
- var useRef4 = React31.useRef;
332
- var useEffect16 = React31.useEffect;
333
- var useMemo21 = React31.useMemo;
334
- var useDebugValue3 = React31.useDebugValue;
335
- exports$1.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
336
- var instRef = useRef4(null);
337
- if (null === instRef.current) {
338
- var inst = { hasValue: false, value: null };
339
- instRef.current = inst;
340
- } else inst = instRef.current;
341
- instRef = useMemo21(
342
- function() {
343
- function memoizedSelector(nextSnapshot) {
344
- if (!hasMemo) {
345
- hasMemo = true;
346
- memoizedSnapshot = nextSnapshot;
347
- nextSnapshot = selector(nextSnapshot);
348
- if (void 0 !== isEqual && inst.hasValue) {
349
- var currentSelection = inst.value;
350
- if (isEqual(currentSelection, nextSnapshot))
351
- return memoizedSelection = currentSelection;
352
- }
353
- return memoizedSelection = nextSnapshot;
354
- }
355
- currentSelection = memoizedSelection;
356
- if (objectIs(memoizedSnapshot, nextSnapshot)) 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
- useEffect16(
377
- function() {
378
- inst.hasValue = true;
379
- inst.value = value;
380
- },
381
- [value]
382
- );
383
- useDebugValue3(value);
384
- return value;
385
- };
386
- }
387
- });
388
-
389
- // ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
390
- var require_with_selector_development = __commonJS({
391
- "../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports$1) {
392
- "production" !== process.env.NODE_ENV && (function() {
393
- function is(x, y) {
394
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
395
- }
396
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
397
- var React31 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef4 = React31.useRef, useEffect16 = React31.useEffect, useMemo21 = React31.useMemo, useDebugValue3 = React31.useDebugValue;
398
- exports$1.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
399
- var instRef = useRef4(null);
400
- if (null === instRef.current) {
401
- var inst = { hasValue: false, value: null };
402
- instRef.current = inst;
403
- } else inst = instRef.current;
404
- instRef = useMemo21(
405
- function() {
406
- function memoizedSelector(nextSnapshot) {
407
- if (!hasMemo) {
408
- hasMemo = true;
409
- memoizedSnapshot = nextSnapshot;
410
- nextSnapshot = selector(nextSnapshot);
411
- if (void 0 !== isEqual && inst.hasValue) {
412
- var currentSelection = inst.value;
413
- if (isEqual(currentSelection, nextSnapshot))
414
- return memoizedSelection = currentSelection;
415
- }
416
- return memoizedSelection = nextSnapshot;
417
- }
418
- currentSelection = memoizedSelection;
419
- if (objectIs(memoizedSnapshot, nextSnapshot))
420
- return currentSelection;
421
- var nextSelection = selector(nextSnapshot);
422
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
423
- return memoizedSnapshot = nextSnapshot, currentSelection;
424
- memoizedSnapshot = nextSnapshot;
425
- return memoizedSelection = nextSelection;
426
- }
427
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
428
- return [
429
- function() {
430
- return memoizedSelector(getSnapshot());
431
- },
432
- null === maybeGetServerSnapshot ? void 0 : function() {
433
- return memoizedSelector(maybeGetServerSnapshot());
434
- }
435
- ];
436
- },
437
- [getSnapshot, getServerSnapshot, selector, isEqual]
438
- );
439
- var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
440
- useEffect16(
441
- function() {
442
- inst.hasValue = true;
443
- inst.value = value;
444
- },
445
- [value]
446
- );
447
- useDebugValue3(value);
448
- return value;
449
- };
450
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
451
- })();
452
- }
453
- });
454
-
455
- // ../node_modules/use-sync-external-store/shim/with-selector.js
456
- var require_with_selector = __commonJS({
457
- "../node_modules/use-sync-external-store/shim/with-selector.js"(exports$1, module) {
458
- if (process.env.NODE_ENV === "production") {
459
- module.exports = require_with_selector_production();
460
- } else {
461
- module.exports = require_with_selector_development();
462
- }
463
- }
464
- });
465
-
466
191
  // ../node_modules/fast-deep-equal/index.js
467
192
  var require_fast_deep_equal = __commonJS({
468
193
  "../node_modules/fast-deep-equal/index.js"(exports$1, module) {
@@ -4169,9 +3894,6 @@ function ColorPickerInline({
4169
3894
  );
4170
3895
  }
4171
3896
 
4172
- // ../node_modules/@tiptap/react/dist/index.js
4173
- var import_shim = __toESM(require_shim());
4174
-
4175
3897
  // ../node_modules/orderedmap/dist/index.js
4176
3898
  function OrderedMap(content) {
4177
3899
  this.content = content;
@@ -21805,9 +21527,7 @@ function markPasteRule(config) {
21805
21527
  }
21806
21528
 
21807
21529
  // ../node_modules/@tiptap/react/dist/index.js
21808
- var import_shim2 = __toESM(require_shim());
21809
21530
  var import_react5 = __toESM(require_react());
21810
- var import_with_selector = __toESM(require_with_selector());
21811
21531
  var mergeRefs = (...refs) => {
21812
21532
  return (node) => {
21813
21533
  refs.forEach((ref) => {
@@ -21820,7 +21540,7 @@ var mergeRefs = (...refs) => {
21820
21540
  };
21821
21541
  };
21822
21542
  var Portals = ({ contentComponent }) => {
21823
- const renderers = (0, import_shim.useSyncExternalStore)(
21543
+ const renderers = index_js.useSyncExternalStore(
21824
21544
  contentComponent.subscribe,
21825
21545
  contentComponent.getSnapshot,
21826
21546
  contentComponent.getServerSnapshot
@@ -22024,7 +21744,7 @@ var EditorStateManager = class {
22024
21744
  function useEditorState(options) {
22025
21745
  var _a;
22026
21746
  const [editorStateManager] = React4.useState(() => new EditorStateManager(options.editor));
22027
- const selectedState = (0, import_with_selector.useSyncExternalStoreWithSelector)(
21747
+ const selectedState = withSelector_js.useSyncExternalStoreWithSelector(
22028
21748
  editorStateManager.subscribe,
22029
21749
  editorStateManager.getSnapshot,
22030
21750
  editorStateManager.getServerSnapshot,
@@ -22274,7 +21994,7 @@ function useEditor(options = {}, deps = []) {
22274
21994
  const mostRecentOptions = React4.useRef(options);
22275
21995
  mostRecentOptions.current = options;
22276
21996
  const [instanceManager] = React4.useState(() => new EditorInstanceManager(mostRecentOptions));
22277
- const editor = (0, import_shim2.useSyncExternalStore)(
21997
+ const editor = index_js.useSyncExternalStore(
22278
21998
  instanceManager.subscribe,
22279
21999
  instanceManager.getEditor,
22280
22000
  instanceManager.getServerSnapshot
@@ -59559,52 +59279,6 @@ function UnderlineTabsContent({
59559
59279
  }
59560
59280
  );
59561
59281
  }
59562
- /*! Bundled license information:
59563
-
59564
- use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
59565
- (**
59566
- * @license React
59567
- * use-sync-external-store-shim.production.js
59568
- *
59569
- * Copyright (c) Meta Platforms, Inc. and affiliates.
59570
- *
59571
- * This source code is licensed under the MIT license found in the
59572
- * LICENSE file in the root directory of this source tree.
59573
- *)
59574
-
59575
- use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
59576
- (**
59577
- * @license React
59578
- * use-sync-external-store-shim.development.js
59579
- *
59580
- * Copyright (c) Meta Platforms, Inc. and affiliates.
59581
- *
59582
- * This source code is licensed under the MIT license found in the
59583
- * LICENSE file in the root directory of this source tree.
59584
- *)
59585
-
59586
- use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
59587
- (**
59588
- * @license React
59589
- * use-sync-external-store-shim/with-selector.production.js
59590
- *
59591
- * Copyright (c) Meta Platforms, Inc. and affiliates.
59592
- *
59593
- * This source code is licensed under the MIT license found in the
59594
- * LICENSE file in the root directory of this source tree.
59595
- *)
59596
-
59597
- use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
59598
- (**
59599
- * @license React
59600
- * use-sync-external-store-shim/with-selector.development.js
59601
- *
59602
- * Copyright (c) Meta Platforms, Inc. and affiliates.
59603
- *
59604
- * This source code is licensed under the MIT license found in the
59605
- * LICENSE file in the root directory of this source tree.
59606
- *)
59607
- */
59608
59282
 
59609
59283
  exports.Accordion = Accordion;
59610
59284
  exports.AccordionContent = AccordionContent;