@zekidev/schemas 2.1.0 → 2.3.0

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.
Files changed (3) hide show
  1. package/dist/index.cjs +74 -125
  2. package/dist/index.js +74 -125
  3. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -564,7 +564,7 @@ var require_react_development = __commonJS({
564
564
  pureComponentPrototype.constructor = PureComponent;
565
565
  assign(pureComponentPrototype, Component.prototype);
566
566
  pureComponentPrototype.isPureReactComponent = true;
567
- function createRef2() {
567
+ function createRef() {
568
568
  var refObject = {
569
569
  current: null
570
570
  };
@@ -788,7 +788,7 @@ var require_react_development = __commonJS({
788
788
  }
789
789
  return element;
790
790
  };
791
- function createElement2(type, config, children) {
791
+ function createElement(type, config, children) {
792
792
  var propName;
793
793
  var props = {};
794
794
  var key = null;
@@ -1310,7 +1310,7 @@ var require_react_development = __commonJS({
1310
1310
  }
1311
1311
  return false;
1312
1312
  }
1313
- function memo2(type, compare) {
1313
+ function memo(type, compare) {
1314
1314
  {
1315
1315
  if (!isValidElementType(type)) {
1316
1316
  error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
@@ -1887,7 +1887,7 @@ var require_react_development = __commonJS({
1887
1887
  error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1888
1888
  }
1889
1889
  }
1890
- var element = createElement2.apply(this, arguments);
1890
+ var element = createElement.apply(this, arguments);
1891
1891
  if (element == null) {
1892
1892
  return element;
1893
1893
  }
@@ -2146,11 +2146,11 @@ var require_react_development = __commonJS({
2146
2146
  exports2.createContext = createContext2;
2147
2147
  exports2.createElement = createElement$1;
2148
2148
  exports2.createFactory = createFactory;
2149
- exports2.createRef = createRef2;
2149
+ exports2.createRef = createRef;
2150
2150
  exports2.forwardRef = forwardRef2;
2151
2151
  exports2.isValidElement = isValidElement;
2152
2152
  exports2.lazy = lazy;
2153
- exports2.memo = memo2;
2153
+ exports2.memo = memo;
2154
2154
  exports2.startTransition = startTransition;
2155
2155
  exports2.unstable_act = act;
2156
2156
  exports2.useCallback = useCallback3;
@@ -16552,7 +16552,7 @@ var require_react_dom_development = __commonJS({
16552
16552
  }
16553
16553
  }
16554
16554
  }
16555
- function createElement2(type, props, rootContainerElement, parentNamespace) {
16555
+ function createElement(type, props, rootContainerElement, parentNamespace) {
16556
16556
  var isCustomComponentTag;
16557
16557
  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
16558
16558
  var domElement;
@@ -17422,7 +17422,7 @@ var require_react_dom_development = __commonJS({
17422
17422
  }
17423
17423
  parentNamespace = hostContextDev.namespace;
17424
17424
  }
17425
- var domElement = createElement2(type, props, rootContainerInstance, parentNamespace);
17425
+ var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
17426
17426
  precacheFiberNode(internalInstanceHandle, domElement);
17427
17427
  updateFiberProps(domElement, props);
17428
17428
  return domElement;
@@ -20510,11 +20510,11 @@ var require_react_dom_development = __commonJS({
20510
20510
  }
20511
20511
  function registerMutableSourceForHydration(root2, mutableSource) {
20512
20512
  var getVersion = mutableSource._getVersion;
20513
- var version2 = getVersion(mutableSource._source);
20513
+ var version = getVersion(mutableSource._source);
20514
20514
  if (root2.mutableSourceEagerHydrationData == null) {
20515
- root2.mutableSourceEagerHydrationData = [mutableSource, version2];
20515
+ root2.mutableSourceEagerHydrationData = [mutableSource, version];
20516
20516
  } else {
20517
- root2.mutableSourceEagerHydrationData.push(mutableSource, version2);
20517
+ root2.mutableSourceEagerHydrationData.push(mutableSource, version);
20518
20518
  }
20519
20519
  }
20520
20520
  var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;
@@ -42954,7 +42954,7 @@ function sinkListItem(itemType) {
42954
42954
  };
42955
42955
  }
42956
42956
 
42957
- // ../../node_modules/.pnpm/@tiptap+core@2.27.2_@tiptap+pm@2.27.2/node_modules/@tiptap/core/dist/index.js
42957
+ // ../../node_modules/.pnpm/@tiptap+core@2.11.7_@tiptap+pm@2.11.7/node_modules/@tiptap/core/dist/index.js
42958
42958
  function createChainableState(config) {
42959
42959
  const { state, transaction } = config;
42960
42960
  let { selection } = transaction;
@@ -43902,7 +43902,7 @@ function pasteRulesPlugin(props) {
43902
43902
  dropEvent = event;
43903
43903
  if (!isDroppedFromProseMirror) {
43904
43904
  const dragFromOtherEditor = tiptapDragFromOtherEditor;
43905
- if (dragFromOtherEditor === null || dragFromOtherEditor === void 0 ? void 0 : dragFromOtherEditor.isEditable) {
43905
+ if (dragFromOtherEditor) {
43906
43906
  setTimeout(() => {
43907
43907
  const selection = dragFromOtherEditor.state.selection;
43908
43908
  if (selection) {
@@ -44390,7 +44390,7 @@ var cut = (originRange, targetPos) => ({ editor, tr: tr2 }) => {
44390
44390
  tr2.deleteRange(originRange.from, originRange.to);
44391
44391
  const newPos = tr2.mapping.map(targetPos);
44392
44392
  tr2.insert(newPos, contentSlice.content);
44393
- tr2.setSelection(new TextSelection(tr2.doc.resolve(Math.max(newPos - 1, 0))));
44393
+ tr2.setSelection(new TextSelection(tr2.doc.resolve(newPos - 1)));
44394
44394
  return true;
44395
44395
  };
44396
44396
  var deleteCurrentNode = () => ({ tr: tr2, dispatch }) => {
@@ -44575,9 +44575,6 @@ function isiOS() {
44575
44575
  "iPod"
44576
44576
  ].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
44577
44577
  }
44578
- function isSafari() {
44579
- return typeof navigator !== "undefined" ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : false;
44580
- }
44581
44578
  var focus = (position = null, options = {}) => ({ editor, view, tr: tr2, dispatch }) => {
44582
44579
  options = {
44583
44580
  scrollIntoView: true,
@@ -44590,8 +44587,8 @@ var focus = (position = null, options = {}) => ({ editor, view, tr: tr2, dispatc
44590
44587
  requestAnimationFrame(() => {
44591
44588
  if (!editor.isDestroyed) {
44592
44589
  view.focus();
44593
- if (isSafari() && !isiOS() && !isAndroid()) {
44594
- view.dom.focus({ preventScroll: true });
44590
+ if (options === null || options === void 0 ? void 0 : options.scrollIntoView) {
44591
+ editor.commands.scrollIntoView();
44595
44592
  }
44596
44593
  }
44597
44594
  });
@@ -44744,38 +44741,24 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, editor
44744
44741
  ...options
44745
44742
  };
44746
44743
  let content;
44747
- const emitContentError = (error) => {
44744
+ try {
44745
+ content = createNodeFromContent(value, editor.schema, {
44746
+ parseOptions: {
44747
+ preserveWhitespace: "full",
44748
+ ...options.parseOptions
44749
+ },
44750
+ errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck
44751
+ });
44752
+ } catch (e) {
44748
44753
  editor.emit("contentError", {
44749
44754
  editor,
44750
- error,
44755
+ error: e,
44751
44756
  disableCollaboration: () => {
44752
44757
  if (editor.storage.collaboration) {
44753
44758
  editor.storage.collaboration.isDisabled = true;
44754
44759
  }
44755
44760
  }
44756
44761
  });
44757
- };
44758
- const parseOptions = {
44759
- preserveWhitespace: "full",
44760
- ...options.parseOptions
44761
- };
44762
- if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) {
44763
- try {
44764
- createNodeFromContent(value, editor.schema, {
44765
- parseOptions,
44766
- errorOnInvalidContent: true
44767
- });
44768
- } catch (e) {
44769
- emitContentError(e);
44770
- }
44771
- }
44772
- try {
44773
- content = createNodeFromContent(value, editor.schema, {
44774
- parseOptions,
44775
- errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck
44776
- });
44777
- } catch (e) {
44778
- emitContentError(e);
44779
44762
  return false;
44780
44763
  }
44781
44764
  let { from: from2, to } = typeof position === "number" ? { from: position, to: position } : { from: position.from, to: position.to };
@@ -46287,9 +46270,6 @@ var NodePos = class _NodePos {
46287
46270
  const isBlock = node.isBlock && !node.isTextblock;
46288
46271
  const isNonTextAtom = node.isAtom && !node.isText;
46289
46272
  const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1);
46290
- if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {
46291
- return;
46292
- }
46293
46273
  const $pos = this.resolvedPos.doc.resolve(targetPos);
46294
46274
  if (!isBlock && $pos.depth <= this.depth) {
46295
46275
  return;
@@ -46476,7 +46456,6 @@ var Editor = class extends EventEmitter {
46476
46456
  enablePasteRules: true,
46477
46457
  enableCoreExtensions: true,
46478
46458
  enableContentCheck: false,
46479
- emitContentError: false,
46480
46459
  onBeforeCreate: () => null,
46481
46460
  onCreate: () => null,
46482
46461
  onUpdate: () => null,
@@ -46618,7 +46597,7 @@ var Editor = class extends EventEmitter {
46618
46597
  let plugins = prevPlugins;
46619
46598
  [].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey) => {
46620
46599
  const name = typeof nameOrPluginKey === "string" ? `${nameOrPluginKey}$` : nameOrPluginKey.key;
46621
- plugins = plugins.filter((plugin) => !plugin.key.startsWith(name));
46600
+ plugins = prevPlugins.filter((plugin) => !plugin.key.startsWith(name));
46622
46601
  });
46623
46602
  if (prevPlugins.length === plugins.length) {
46624
46603
  return void 0;
@@ -47099,28 +47078,8 @@ function markPasteRule(config) {
47099
47078
  }
47100
47079
  });
47101
47080
  }
47102
- function canInsertNode(state, nodeType) {
47103
- const { selection } = state;
47104
- const { $from } = selection;
47105
- if (selection instanceof NodeSelection) {
47106
- const index = $from.index();
47107
- const parent = $from.parent;
47108
- return parent.canReplaceWith(index, index + 1, nodeType);
47109
- }
47110
- let depth = $from.depth;
47111
- while (depth >= 0) {
47112
- const index = $from.index(depth);
47113
- const parent = $from.node(depth);
47114
- const match = parent.contentMatchAt(index);
47115
- if (match.matchType(nodeType)) {
47116
- return true;
47117
- }
47118
- depth -= 1;
47119
- }
47120
- return false;
47121
- }
47122
47081
 
47123
- // ../../node_modules/.pnpm/@tiptap+react@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2_react-dom@18.3._dapneixe4e7qjjnfvramineoae/node_modules/@tiptap/react/dist/index.js
47082
+ // ../../node_modules/.pnpm/@tiptap+react@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7_react-dom@18.3._anbgcunlwqk5at6s4gn5quxr7a/node_modules/@tiptap/react/dist/index.js
47124
47083
  var import_react = __toESM(require_react(), 1);
47125
47084
  var import_react_dom = __toESM(require_react_dom(), 1);
47126
47085
  function getDefaultExportFromCjs(x) {
@@ -47967,7 +47926,7 @@ var NodeViewWrapper = import_react.default.forwardRef((props, ref) => {
47967
47926
  );
47968
47927
  });
47969
47928
 
47970
- // ../../node_modules/.pnpm/@tiptap+extension-blockquote@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-blockquote/dist/index.js
47929
+ // ../../node_modules/.pnpm/@tiptap+extension-blockquote@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-blockquote/dist/index.js
47971
47930
  var inputRegex = /^\s*>\s$/;
47972
47931
  var Blockquote = Node2.create({
47973
47932
  name: "blockquote",
@@ -48015,7 +47974,7 @@ var Blockquote = Node2.create({
48015
47974
  }
48016
47975
  });
48017
47976
 
48018
- // ../../node_modules/.pnpm/@tiptap+extension-bold@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-bold/dist/index.js
47977
+ // ../../node_modules/.pnpm/@tiptap+extension-bold@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-bold/dist/index.js
48019
47978
  var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
48020
47979
  var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
48021
47980
  var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
@@ -48094,7 +48053,7 @@ var Bold = Mark2.create({
48094
48053
  }
48095
48054
  });
48096
48055
 
48097
- // ../../node_modules/.pnpm/@tiptap+extension-bullet-list@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-bullet-list/dist/index.js
48056
+ // ../../node_modules/.pnpm/@tiptap+extension-bullet-list@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-bullet-list/dist/index.js
48098
48057
  var ListItemName = "listItem";
48099
48058
  var TextStyleName = "textStyle";
48100
48059
  var inputRegex2 = /^\s*([-+*])\s$/;
@@ -48158,7 +48117,7 @@ var BulletList = Node2.create({
48158
48117
  }
48159
48118
  });
48160
48119
 
48161
- // ../../node_modules/.pnpm/@tiptap+extension-code@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-code/dist/index.js
48120
+ // ../../node_modules/.pnpm/@tiptap+extension-code@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-code/dist/index.js
48162
48121
  var inputRegex3 = /(^|[^`])`([^`]+)`(?!`)/;
48163
48122
  var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;
48164
48123
  var Code = Mark2.create({
@@ -48215,7 +48174,7 @@ var Code = Mark2.create({
48215
48174
  }
48216
48175
  });
48217
48176
 
48218
- // ../../node_modules/.pnpm/@tiptap+extension-code-block@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-code-block/dist/index.js
48177
+ // ../../node_modules/.pnpm/@tiptap+extension-code-block@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-code-block/dist/index.js
48219
48178
  var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
48220
48179
  var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
48221
48180
  var CodeBlock = Node2.create({
@@ -48405,7 +48364,7 @@ var CodeBlock = Node2.create({
48405
48364
  }
48406
48365
  });
48407
48366
 
48408
- // ../../node_modules/.pnpm/@tiptap+extension-document@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-document/dist/index.js
48367
+ // ../../node_modules/.pnpm/@tiptap+extension-document@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-document/dist/index.js
48409
48368
  var Document = Node2.create({
48410
48369
  name: "doc",
48411
48370
  topNode: true,
@@ -48545,7 +48504,7 @@ var DropCursorView = class {
48545
48504
  }
48546
48505
  };
48547
48506
 
48548
- // ../../node_modules/.pnpm/@tiptap+extension-dropcursor@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-dropcursor/dist/index.js
48507
+ // ../../node_modules/.pnpm/@tiptap+extension-dropcursor@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-dropcursor/dist/index.js
48549
48508
  var Dropcursor = Extension.create({
48550
48509
  name: "dropCursor",
48551
48510
  addOptions() {
@@ -48776,7 +48735,7 @@ function drawGapCursor(state) {
48776
48735
  return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, { key: "gapcursor" })]);
48777
48736
  }
48778
48737
 
48779
- // ../../node_modules/.pnpm/@tiptap+extension-gapcursor@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-gapcursor/dist/index.js
48738
+ // ../../node_modules/.pnpm/@tiptap+extension-gapcursor@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-gapcursor/dist/index.js
48780
48739
  var Gapcursor = Extension.create({
48781
48740
  name: "gapCursor",
48782
48741
  addProseMirrorPlugins() {
@@ -48797,7 +48756,7 @@ var Gapcursor = Extension.create({
48797
48756
  }
48798
48757
  });
48799
48758
 
48800
- // ../../node_modules/.pnpm/@tiptap+extension-hard-break@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-hard-break/dist/index.js
48759
+ // ../../node_modules/.pnpm/@tiptap+extension-hard-break@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-hard-break/dist/index.js
48801
48760
  var HardBreak = Node2.create({
48802
48761
  name: "hardBreak",
48803
48762
  addOptions() {
@@ -48854,7 +48813,7 @@ var HardBreak = Node2.create({
48854
48813
  }
48855
48814
  });
48856
48815
 
48857
- // ../../node_modules/.pnpm/@tiptap+extension-heading@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-heading/dist/index.js
48816
+ // ../../node_modules/.pnpm/@tiptap+extension-heading@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-heading/dist/index.js
48858
48817
  var Heading = Node2.create({
48859
48818
  name: "heading",
48860
48819
  addOptions() {
@@ -49458,7 +49417,7 @@ var redo = buildCommand(true, true);
49458
49417
  var undoNoScroll = buildCommand(false, false);
49459
49418
  var redoNoScroll = buildCommand(true, false);
49460
49419
 
49461
- // ../../node_modules/.pnpm/@tiptap+extension-history@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-history/dist/index.js
49420
+ // ../../node_modules/.pnpm/@tiptap+extension-history@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-history/dist/index.js
49462
49421
  var History = Extension.create({
49463
49422
  name: "history",
49464
49423
  addOptions() {
@@ -49494,7 +49453,7 @@ var History = Extension.create({
49494
49453
  }
49495
49454
  });
49496
49455
 
49497
- // ../../node_modules/.pnpm/@tiptap+extension-horizontal-rule@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-horizontal-rule/dist/index.js
49456
+ // ../../node_modules/.pnpm/@tiptap+extension-horizontal-rule@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-horizontal-rule/dist/index.js
49498
49457
  var HorizontalRule = Node2.create({
49499
49458
  name: "horizontalRule",
49500
49459
  addOptions() {
@@ -49512,9 +49471,6 @@ var HorizontalRule = Node2.create({
49512
49471
  addCommands() {
49513
49472
  return {
49514
49473
  setHorizontalRule: () => ({ chain, state }) => {
49515
- if (!canInsertNode(state, state.schema.nodes[this.name])) {
49516
- return false;
49517
- }
49518
49474
  const { selection } = state;
49519
49475
  const { $from: $originFrom, $to: $originTo } = selection;
49520
49476
  const currentChain = chain();
@@ -49569,7 +49525,7 @@ var HorizontalRule = Node2.create({
49569
49525
  }
49570
49526
  });
49571
49527
 
49572
- // ../../node_modules/.pnpm/@tiptap+extension-italic@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-italic/dist/index.js
49528
+ // ../../node_modules/.pnpm/@tiptap+extension-italic@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-italic/dist/index.js
49573
49529
  var starInputRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
49574
49530
  var starPasteRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
49575
49531
  var underscoreInputRegex2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
@@ -49647,7 +49603,7 @@ var Italic = Mark2.create({
49647
49603
  }
49648
49604
  });
49649
49605
 
49650
- // ../../node_modules/.pnpm/@tiptap+extension-list-item@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-list-item/dist/index.js
49606
+ // ../../node_modules/.pnpm/@tiptap+extension-list-item@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-list-item/dist/index.js
49651
49607
  var ListItem = Node2.create({
49652
49608
  name: "listItem",
49653
49609
  addOptions() {
@@ -49678,7 +49634,7 @@ var ListItem = Node2.create({
49678
49634
  }
49679
49635
  });
49680
49636
 
49681
- // ../../node_modules/.pnpm/@tiptap+extension-ordered-list@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-ordered-list/dist/index.js
49637
+ // ../../node_modules/.pnpm/@tiptap+extension-ordered-list@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-ordered-list/dist/index.js
49682
49638
  var ListItemName2 = "listItem";
49683
49639
  var TextStyleName2 = "textStyle";
49684
49640
  var inputRegex4 = /^(\d+)\.\s$/;
@@ -49760,7 +49716,7 @@ var OrderedList = Node2.create({
49760
49716
  }
49761
49717
  });
49762
49718
 
49763
- // ../../node_modules/.pnpm/@tiptap+extension-paragraph@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-paragraph/dist/index.js
49719
+ // ../../node_modules/.pnpm/@tiptap+extension-paragraph@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-paragraph/dist/index.js
49764
49720
  var Paragraph = Node2.create({
49765
49721
  name: "paragraph",
49766
49722
  priority: 1e3,
@@ -49793,7 +49749,7 @@ var Paragraph = Node2.create({
49793
49749
  }
49794
49750
  });
49795
49751
 
49796
- // ../../node_modules/.pnpm/@tiptap+extension-strike@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-strike/dist/index.js
49752
+ // ../../node_modules/.pnpm/@tiptap+extension-strike@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-strike/dist/index.js
49797
49753
  var inputRegex5 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/;
49798
49754
  var pasteRegex2 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g;
49799
49755
  var Strike = Mark2.create({
@@ -49860,13 +49816,13 @@ var Strike = Mark2.create({
49860
49816
  }
49861
49817
  });
49862
49818
 
49863
- // ../../node_modules/.pnpm/@tiptap+extension-text@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text/dist/index.js
49819
+ // ../../node_modules/.pnpm/@tiptap+extension-text@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-text/dist/index.js
49864
49820
  var Text = Node2.create({
49865
49821
  name: "text",
49866
49822
  group: "inline"
49867
49823
  });
49868
49824
 
49869
- // ../../node_modules/.pnpm/@tiptap+starter-kit@2.27.2/node_modules/@tiptap/starter-kit/dist/index.js
49825
+ // ../../node_modules/.pnpm/@tiptap+starter-kit@2.11.7/node_modules/@tiptap/starter-kit/dist/index.js
49870
49826
  var StarterKit = Extension.create({
49871
49827
  name: "starterKit",
49872
49828
  addExtensions() {
@@ -49929,7 +49885,7 @@ var StarterKit = Extension.create({
49929
49885
  }
49930
49886
  });
49931
49887
 
49932
- // ../../node_modules/.pnpm/@tiptap+extension-underline@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-underline/dist/index.js
49888
+ // ../../node_modules/.pnpm/@tiptap+extension-underline@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-underline/dist/index.js
49933
49889
  var Underline = Mark2.create({
49934
49890
  name: "underline",
49935
49891
  addOptions() {
@@ -49973,7 +49929,7 @@ var Underline = Mark2.create({
49973
49929
  }
49974
49930
  });
49975
49931
 
49976
- // ../../node_modules/.pnpm/@tiptap+extension-text-style@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text-style/dist/index.js
49932
+ // ../../node_modules/.pnpm/@tiptap+extension-text-style@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-text-style/dist/index.js
49977
49933
  var mergeNestedSpanStyles = (element) => {
49978
49934
  if (!element.children.length) {
49979
49935
  return;
@@ -50036,7 +49992,7 @@ var TextStyle = Mark2.create({
50036
49992
  }
50037
49993
  });
50038
49994
 
50039
- // ../../node_modules/.pnpm/@tiptap+extension-color@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+extension-text-_nwipyjl2zzg6jzm7vhuho2a42m/node_modules/@tiptap/extension-color/dist/index.js
49995
+ // ../../node_modules/.pnpm/@tiptap+extension-color@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+extension-text-_6inr4ropszdjmgoexhyzt7zmf4/node_modules/@tiptap/extension-color/dist/index.js
50040
49996
  var Color = Extension.create({
50041
49997
  name: "color",
50042
49998
  addOptions() {
@@ -50080,7 +50036,7 @@ var Color = Extension.create({
50080
50036
  }
50081
50037
  });
50082
50038
 
50083
- // ../../node_modules/.pnpm/@tiptap+extension-highlight@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-highlight/dist/index.js
50039
+ // ../../node_modules/.pnpm/@tiptap+extension-highlight@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-highlight/dist/index.js
50084
50040
  var inputRegex6 = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/;
50085
50041
  var pasteRegex3 = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g;
50086
50042
  var Highlight = Mark2.create({
@@ -50157,7 +50113,7 @@ var Highlight = Mark2.create({
50157
50113
  }
50158
50114
  });
50159
50115
 
50160
- // ../../node_modules/.pnpm/@tiptap+extension-text-align@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text-align/dist/index.js
50116
+ // ../../node_modules/.pnpm/@tiptap+extension-text-align@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-text-align/dist/index.js
50161
50117
  var TextAlign = Extension.create({
50162
50118
  name: "textAlign",
50163
50119
  addOptions() {
@@ -50199,15 +50155,6 @@ var TextAlign = Extension.create({
50199
50155
  },
50200
50156
  unsetTextAlign: () => ({ commands: commands2 }) => {
50201
50157
  return this.options.types.map((type) => commands2.resetAttributes(type, "textAlign")).every((response) => response);
50202
- },
50203
- toggleTextAlign: (alignment) => ({ editor, commands: commands2 }) => {
50204
- if (!this.options.alignments.includes(alignment)) {
50205
- return false;
50206
- }
50207
- if (editor.isActive({ textAlign: alignment })) {
50208
- return commands2.unsetTextAlign();
50209
- }
50210
- return commands2.setTextAlign(alignment);
50211
50158
  }
50212
50159
  };
50213
50160
  },
@@ -51368,11 +51315,7 @@ function find(str, type = null, opts = null) {
51368
51315
  return filtered;
51369
51316
  }
51370
51317
 
51371
- // ../../node_modules/.pnpm/@tiptap+extension-link@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-link/dist/index.js
51372
- var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]";
51373
- var UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN);
51374
- var UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`);
51375
- var UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, "g");
51318
+ // ../../node_modules/.pnpm/@tiptap+extension-link@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-link/dist/index.js
51376
51319
  function isValidLinkStructure(tokens) {
51377
51320
  if (tokens.length === 1) {
51378
51321
  return tokens[0].isLink;
@@ -51401,16 +51344,12 @@ function autolink(options) {
51401
51344
  if (nodesInChangedRanges.length > 1) {
51402
51345
  textBlock = nodesInChangedRanges[0];
51403
51346
  textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, textBlock.pos + textBlock.node.nodeSize, void 0, " ");
51404
- } else if (nodesInChangedRanges.length) {
51405
- const endText = newState.doc.textBetween(newRange.from, newRange.to, " ", " ");
51406
- if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) {
51407
- return;
51408
- }
51347
+ } else if (nodesInChangedRanges.length && newState.doc.textBetween(newRange.from, newRange.to, " ", " ").endsWith(" ")) {
51409
51348
  textBlock = nodesInChangedRanges[0];
51410
51349
  textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, newRange.to, void 0, " ");
51411
51350
  }
51412
51351
  if (textBlock && textBeforeWhitespace) {
51413
- const wordsBeforeWhitespace = textBeforeWhitespace.split(UNICODE_WHITESPACE_REGEX).filter(Boolean);
51352
+ const wordsBeforeWhitespace = textBeforeWhitespace.split(" ").filter((s) => s !== "");
51414
51353
  if (wordsBeforeWhitespace.length <= 0) {
51415
51354
  return false;
51416
51355
  }
@@ -51509,6 +51448,7 @@ function pasteHandler(options) {
51509
51448
  }
51510
51449
  });
51511
51450
  }
51451
+ var ATTR_WHITESPACE = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
51512
51452
  function isAllowedUri(uri, protocols) {
51513
51453
  const allowedProtocols = [
51514
51454
  "http",
@@ -51530,7 +51470,7 @@ function isAllowedUri(uri, protocols) {
51530
51470
  }
51531
51471
  });
51532
51472
  }
51533
- return !uri || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, "").match(new RegExp(
51473
+ return !uri || uri.replace(ATTR_WHITESPACE, "").match(new RegExp(
51534
51474
  // eslint-disable-next-line no-useless-escape
51535
51475
  `^(?:(?:${allowedProtocols.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
51536
51476
  "i"
@@ -51722,7 +51662,7 @@ var Link = Mark2.create({
51722
51662
  }
51723
51663
  });
51724
51664
 
51725
- // ../../node_modules/.pnpm/@tiptap+extension-placeholder@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-placeholder/dist/index.js
51665
+ // ../../node_modules/.pnpm/@tiptap+extension-placeholder@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-placeholder/dist/index.js
51726
51666
  var Placeholder = Extension.create({
51727
51667
  name: "placeholder",
51728
51668
  addOptions() {
@@ -52072,11 +52012,18 @@ var sectionMediaFields = [
52072
52012
  })
52073
52013
  ]
52074
52014
  }),
52015
+ (0, import_sanity3.defineField)({
52016
+ name: "backgroundVideoFile",
52017
+ title: "Video de fondo \u2014 subir archivo (MP4/WebM)",
52018
+ type: "file",
52019
+ description: "Subir directamente a Sanity. Tiene prioridad sobre la URL externa de abajo. No se reproduce en mobile \u2014 agreg\xE1 tambi\xE9n una imagen de fondo como poster.",
52020
+ options: { accept: "video/mp4,video/webm,video/*" }
52021
+ }),
52075
52022
  (0, import_sanity3.defineField)({
52076
52023
  name: "backgroundVideoUrl",
52077
52024
  title: "Video de fondo (URL .mp4)",
52078
52025
  type: "string",
52079
- description: "URL directa a un archivo .mp4. No se reproduce en mobile \u2014 se recomienda agregar tambi\xE9n una imagen de fondo como poster."
52026
+ description: "URL directa a un archivo .mp4. Solo se usa si no hay archivo subido arriba. No se reproduce en mobile \u2014 se recomienda agregar tambi\xE9n una imagen de fondo como poster."
52080
52027
  }),
52081
52028
  (0, import_sanity3.defineField)({
52082
52029
  name: "backgroundOverlay",
@@ -52085,7 +52032,7 @@ var sectionMediaFields = [
52085
52032
  description: "Oscurece el fondo para mejorar la legibilidad del texto sobre im\xE1genes o videos (0 = sin overlay, 80 = muy oscuro).",
52086
52033
  initialValue: 0,
52087
52034
  validation: (r) => r.min(0).max(100),
52088
- hidden: ({ parent }) => !parent?.backgroundImage && !parent?.backgroundVideoUrl
52035
+ hidden: ({ parent }) => !parent?.backgroundImage && !parent?.backgroundVideoUrl && !parent?.backgroundVideoFile
52089
52036
  }),
52090
52037
  (0, import_sanity3.defineField)({
52091
52038
  name: "animate",
@@ -52151,7 +52098,7 @@ var heroSection = (0, import_sanity4.defineType)({
52151
52098
  title: "Poster del video (miniatura mientras carga)",
52152
52099
  description: "Se muestra antes de que el video comience a reproducirse.",
52153
52100
  type: "image",
52154
- hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card",
52101
+ hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card" && parent?.variant !== "split",
52155
52102
  options: { hotspot: true },
52156
52103
  fields: [
52157
52104
  (0, import_sanity4.defineField)({ name: "alt", title: "Texto alternativo", type: "string" })
@@ -52161,9 +52108,9 @@ var heroSection = (0, import_sanity4.defineType)({
52161
52108
  (0, import_sanity4.defineField)({
52162
52109
  name: "videoFile",
52163
52110
  title: "Video \u2014 subir archivo (MP4/WebM)",
52164
- description: "Subir directamente a Sanity. Tiene prioridad sobre la URL externa de abajo.",
52111
+ description: "Subir directamente a Sanity. Tiene prioridad sobre la URL externa de abajo. En la variante 'Dividido' se muestra en lugar de la imagen.",
52165
52112
  type: "file",
52166
- hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card",
52113
+ hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card" && parent?.variant !== "split",
52167
52114
  options: { accept: "video/mp4,video/webm,video/*" }
52168
52115
  }),
52169
52116
  (0, import_sanity4.defineField)({
@@ -52171,7 +52118,7 @@ var heroSection = (0, import_sanity4.defineType)({
52171
52118
  title: "Video \u2014 URL externa",
52172
52119
  description: "Peg\xE1 una URL directa de .mp4 / .webm (Cloudinary, S3, Vimeo link directo, etc.). Solo se usa si no hay archivo subido arriba.",
52173
52120
  type: "url",
52174
- hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card"
52121
+ hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card" && parent?.variant !== "split"
52175
52122
  }),
52176
52123
  (0, import_sanity4.defineField)({
52177
52124
  name: "overlayOpacity",
@@ -54326,7 +54273,9 @@ var downloadsSection = (0, import_sanity27.defineType)({
54326
54273
  list: [
54327
54274
  { title: "Grilla \u2014 grupos como cards en grilla", value: "grouped" },
54328
54275
  { title: "Acorde\xF3n \u2014 grupos colapsables", value: "accordion" },
54329
- { title: "Lista plana \u2014 con separadores de grupo", value: "flat" }
54276
+ { title: "Lista plana \u2014 con separadores de grupo", value: "flat" },
54277
+ { title: "Nube \u2014 todos los archivos como chips, sin grupos", value: "cloud" },
54278
+ { title: "Burbujas \u2014 \xEDcono en c\xEDrculo y nombre debajo, sin grupos", value: "bubbles" }
54330
54279
  ],
54331
54280
  layout: "radio"
54332
54281
  },
package/dist/index.js CHANGED
@@ -558,7 +558,7 @@ var require_react_development = __commonJS({
558
558
  pureComponentPrototype.constructor = PureComponent;
559
559
  assign(pureComponentPrototype, Component.prototype);
560
560
  pureComponentPrototype.isPureReactComponent = true;
561
- function createRef2() {
561
+ function createRef() {
562
562
  var refObject = {
563
563
  current: null
564
564
  };
@@ -782,7 +782,7 @@ var require_react_development = __commonJS({
782
782
  }
783
783
  return element;
784
784
  };
785
- function createElement2(type, config, children) {
785
+ function createElement(type, config, children) {
786
786
  var propName;
787
787
  var props = {};
788
788
  var key = null;
@@ -1304,7 +1304,7 @@ var require_react_development = __commonJS({
1304
1304
  }
1305
1305
  return false;
1306
1306
  }
1307
- function memo2(type, compare) {
1307
+ function memo(type, compare) {
1308
1308
  {
1309
1309
  if (!isValidElementType(type)) {
1310
1310
  error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
@@ -1881,7 +1881,7 @@ var require_react_development = __commonJS({
1881
1881
  error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1882
1882
  }
1883
1883
  }
1884
- var element = createElement2.apply(this, arguments);
1884
+ var element = createElement.apply(this, arguments);
1885
1885
  if (element == null) {
1886
1886
  return element;
1887
1887
  }
@@ -2140,11 +2140,11 @@ var require_react_development = __commonJS({
2140
2140
  exports.createContext = createContext2;
2141
2141
  exports.createElement = createElement$1;
2142
2142
  exports.createFactory = createFactory;
2143
- exports.createRef = createRef2;
2143
+ exports.createRef = createRef;
2144
2144
  exports.forwardRef = forwardRef2;
2145
2145
  exports.isValidElement = isValidElement;
2146
2146
  exports.lazy = lazy;
2147
- exports.memo = memo2;
2147
+ exports.memo = memo;
2148
2148
  exports.startTransition = startTransition;
2149
2149
  exports.unstable_act = act;
2150
2150
  exports.useCallback = useCallback3;
@@ -16546,7 +16546,7 @@ var require_react_dom_development = __commonJS({
16546
16546
  }
16547
16547
  }
16548
16548
  }
16549
- function createElement2(type, props, rootContainerElement, parentNamespace) {
16549
+ function createElement(type, props, rootContainerElement, parentNamespace) {
16550
16550
  var isCustomComponentTag;
16551
16551
  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
16552
16552
  var domElement;
@@ -17416,7 +17416,7 @@ var require_react_dom_development = __commonJS({
17416
17416
  }
17417
17417
  parentNamespace = hostContextDev.namespace;
17418
17418
  }
17419
- var domElement = createElement2(type, props, rootContainerInstance, parentNamespace);
17419
+ var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
17420
17420
  precacheFiberNode(internalInstanceHandle, domElement);
17421
17421
  updateFiberProps(domElement, props);
17422
17422
  return domElement;
@@ -20504,11 +20504,11 @@ var require_react_dom_development = __commonJS({
20504
20504
  }
20505
20505
  function registerMutableSourceForHydration(root2, mutableSource) {
20506
20506
  var getVersion = mutableSource._getVersion;
20507
- var version2 = getVersion(mutableSource._source);
20507
+ var version = getVersion(mutableSource._source);
20508
20508
  if (root2.mutableSourceEagerHydrationData == null) {
20509
- root2.mutableSourceEagerHydrationData = [mutableSource, version2];
20509
+ root2.mutableSourceEagerHydrationData = [mutableSource, version];
20510
20510
  } else {
20511
- root2.mutableSourceEagerHydrationData.push(mutableSource, version2);
20511
+ root2.mutableSourceEagerHydrationData.push(mutableSource, version);
20512
20512
  }
20513
20513
  }
20514
20514
  var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;
@@ -42916,7 +42916,7 @@ function sinkListItem(itemType) {
42916
42916
  };
42917
42917
  }
42918
42918
 
42919
- // ../../node_modules/.pnpm/@tiptap+core@2.27.2_@tiptap+pm@2.27.2/node_modules/@tiptap/core/dist/index.js
42919
+ // ../../node_modules/.pnpm/@tiptap+core@2.11.7_@tiptap+pm@2.11.7/node_modules/@tiptap/core/dist/index.js
42920
42920
  function createChainableState(config) {
42921
42921
  const { state, transaction } = config;
42922
42922
  let { selection } = transaction;
@@ -43864,7 +43864,7 @@ function pasteRulesPlugin(props) {
43864
43864
  dropEvent = event;
43865
43865
  if (!isDroppedFromProseMirror) {
43866
43866
  const dragFromOtherEditor = tiptapDragFromOtherEditor;
43867
- if (dragFromOtherEditor === null || dragFromOtherEditor === void 0 ? void 0 : dragFromOtherEditor.isEditable) {
43867
+ if (dragFromOtherEditor) {
43868
43868
  setTimeout(() => {
43869
43869
  const selection = dragFromOtherEditor.state.selection;
43870
43870
  if (selection) {
@@ -44352,7 +44352,7 @@ var cut = (originRange, targetPos) => ({ editor, tr: tr2 }) => {
44352
44352
  tr2.deleteRange(originRange.from, originRange.to);
44353
44353
  const newPos = tr2.mapping.map(targetPos);
44354
44354
  tr2.insert(newPos, contentSlice.content);
44355
- tr2.setSelection(new TextSelection(tr2.doc.resolve(Math.max(newPos - 1, 0))));
44355
+ tr2.setSelection(new TextSelection(tr2.doc.resolve(newPos - 1)));
44356
44356
  return true;
44357
44357
  };
44358
44358
  var deleteCurrentNode = () => ({ tr: tr2, dispatch }) => {
@@ -44537,9 +44537,6 @@ function isiOS() {
44537
44537
  "iPod"
44538
44538
  ].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
44539
44539
  }
44540
- function isSafari() {
44541
- return typeof navigator !== "undefined" ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : false;
44542
- }
44543
44540
  var focus = (position = null, options = {}) => ({ editor, view, tr: tr2, dispatch }) => {
44544
44541
  options = {
44545
44542
  scrollIntoView: true,
@@ -44552,8 +44549,8 @@ var focus = (position = null, options = {}) => ({ editor, view, tr: tr2, dispatc
44552
44549
  requestAnimationFrame(() => {
44553
44550
  if (!editor.isDestroyed) {
44554
44551
  view.focus();
44555
- if (isSafari() && !isiOS() && !isAndroid()) {
44556
- view.dom.focus({ preventScroll: true });
44552
+ if (options === null || options === void 0 ? void 0 : options.scrollIntoView) {
44553
+ editor.commands.scrollIntoView();
44557
44554
  }
44558
44555
  }
44559
44556
  });
@@ -44706,38 +44703,24 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, editor
44706
44703
  ...options
44707
44704
  };
44708
44705
  let content;
44709
- const emitContentError = (error) => {
44706
+ try {
44707
+ content = createNodeFromContent(value, editor.schema, {
44708
+ parseOptions: {
44709
+ preserveWhitespace: "full",
44710
+ ...options.parseOptions
44711
+ },
44712
+ errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck
44713
+ });
44714
+ } catch (e) {
44710
44715
  editor.emit("contentError", {
44711
44716
  editor,
44712
- error,
44717
+ error: e,
44713
44718
  disableCollaboration: () => {
44714
44719
  if (editor.storage.collaboration) {
44715
44720
  editor.storage.collaboration.isDisabled = true;
44716
44721
  }
44717
44722
  }
44718
44723
  });
44719
- };
44720
- const parseOptions = {
44721
- preserveWhitespace: "full",
44722
- ...options.parseOptions
44723
- };
44724
- if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) {
44725
- try {
44726
- createNodeFromContent(value, editor.schema, {
44727
- parseOptions,
44728
- errorOnInvalidContent: true
44729
- });
44730
- } catch (e) {
44731
- emitContentError(e);
44732
- }
44733
- }
44734
- try {
44735
- content = createNodeFromContent(value, editor.schema, {
44736
- parseOptions,
44737
- errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck
44738
- });
44739
- } catch (e) {
44740
- emitContentError(e);
44741
44724
  return false;
44742
44725
  }
44743
44726
  let { from: from2, to } = typeof position === "number" ? { from: position, to: position } : { from: position.from, to: position.to };
@@ -46249,9 +46232,6 @@ var NodePos = class _NodePos {
46249
46232
  const isBlock = node.isBlock && !node.isTextblock;
46250
46233
  const isNonTextAtom = node.isAtom && !node.isText;
46251
46234
  const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1);
46252
- if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {
46253
- return;
46254
- }
46255
46235
  const $pos = this.resolvedPos.doc.resolve(targetPos);
46256
46236
  if (!isBlock && $pos.depth <= this.depth) {
46257
46237
  return;
@@ -46438,7 +46418,6 @@ var Editor = class extends EventEmitter {
46438
46418
  enablePasteRules: true,
46439
46419
  enableCoreExtensions: true,
46440
46420
  enableContentCheck: false,
46441
- emitContentError: false,
46442
46421
  onBeforeCreate: () => null,
46443
46422
  onCreate: () => null,
46444
46423
  onUpdate: () => null,
@@ -46580,7 +46559,7 @@ var Editor = class extends EventEmitter {
46580
46559
  let plugins = prevPlugins;
46581
46560
  [].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey) => {
46582
46561
  const name = typeof nameOrPluginKey === "string" ? `${nameOrPluginKey}$` : nameOrPluginKey.key;
46583
- plugins = plugins.filter((plugin) => !plugin.key.startsWith(name));
46562
+ plugins = prevPlugins.filter((plugin) => !plugin.key.startsWith(name));
46584
46563
  });
46585
46564
  if (prevPlugins.length === plugins.length) {
46586
46565
  return void 0;
@@ -47061,28 +47040,8 @@ function markPasteRule(config) {
47061
47040
  }
47062
47041
  });
47063
47042
  }
47064
- function canInsertNode(state, nodeType) {
47065
- const { selection } = state;
47066
- const { $from } = selection;
47067
- if (selection instanceof NodeSelection) {
47068
- const index = $from.index();
47069
- const parent = $from.parent;
47070
- return parent.canReplaceWith(index, index + 1, nodeType);
47071
- }
47072
- let depth = $from.depth;
47073
- while (depth >= 0) {
47074
- const index = $from.index(depth);
47075
- const parent = $from.node(depth);
47076
- const match = parent.contentMatchAt(index);
47077
- if (match.matchType(nodeType)) {
47078
- return true;
47079
- }
47080
- depth -= 1;
47081
- }
47082
- return false;
47083
- }
47084
47043
 
47085
- // ../../node_modules/.pnpm/@tiptap+react@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2_react-dom@18.3._dapneixe4e7qjjnfvramineoae/node_modules/@tiptap/react/dist/index.js
47044
+ // ../../node_modules/.pnpm/@tiptap+react@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7_react-dom@18.3._anbgcunlwqk5at6s4gn5quxr7a/node_modules/@tiptap/react/dist/index.js
47086
47045
  var import_react = __toESM(require_react(), 1);
47087
47046
  var import_react_dom = __toESM(require_react_dom(), 1);
47088
47047
  function getDefaultExportFromCjs(x) {
@@ -47929,7 +47888,7 @@ var NodeViewWrapper = import_react.default.forwardRef((props, ref) => {
47929
47888
  );
47930
47889
  });
47931
47890
 
47932
- // ../../node_modules/.pnpm/@tiptap+extension-blockquote@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-blockquote/dist/index.js
47891
+ // ../../node_modules/.pnpm/@tiptap+extension-blockquote@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-blockquote/dist/index.js
47933
47892
  var inputRegex = /^\s*>\s$/;
47934
47893
  var Blockquote = Node2.create({
47935
47894
  name: "blockquote",
@@ -47977,7 +47936,7 @@ var Blockquote = Node2.create({
47977
47936
  }
47978
47937
  });
47979
47938
 
47980
- // ../../node_modules/.pnpm/@tiptap+extension-bold@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-bold/dist/index.js
47939
+ // ../../node_modules/.pnpm/@tiptap+extension-bold@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-bold/dist/index.js
47981
47940
  var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
47982
47941
  var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
47983
47942
  var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
@@ -48056,7 +48015,7 @@ var Bold = Mark2.create({
48056
48015
  }
48057
48016
  });
48058
48017
 
48059
- // ../../node_modules/.pnpm/@tiptap+extension-bullet-list@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-bullet-list/dist/index.js
48018
+ // ../../node_modules/.pnpm/@tiptap+extension-bullet-list@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-bullet-list/dist/index.js
48060
48019
  var ListItemName = "listItem";
48061
48020
  var TextStyleName = "textStyle";
48062
48021
  var inputRegex2 = /^\s*([-+*])\s$/;
@@ -48120,7 +48079,7 @@ var BulletList = Node2.create({
48120
48079
  }
48121
48080
  });
48122
48081
 
48123
- // ../../node_modules/.pnpm/@tiptap+extension-code@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-code/dist/index.js
48082
+ // ../../node_modules/.pnpm/@tiptap+extension-code@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-code/dist/index.js
48124
48083
  var inputRegex3 = /(^|[^`])`([^`]+)`(?!`)/;
48125
48084
  var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;
48126
48085
  var Code = Mark2.create({
@@ -48177,7 +48136,7 @@ var Code = Mark2.create({
48177
48136
  }
48178
48137
  });
48179
48138
 
48180
- // ../../node_modules/.pnpm/@tiptap+extension-code-block@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-code-block/dist/index.js
48139
+ // ../../node_modules/.pnpm/@tiptap+extension-code-block@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-code-block/dist/index.js
48181
48140
  var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
48182
48141
  var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
48183
48142
  var CodeBlock = Node2.create({
@@ -48367,7 +48326,7 @@ var CodeBlock = Node2.create({
48367
48326
  }
48368
48327
  });
48369
48328
 
48370
- // ../../node_modules/.pnpm/@tiptap+extension-document@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-document/dist/index.js
48329
+ // ../../node_modules/.pnpm/@tiptap+extension-document@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-document/dist/index.js
48371
48330
  var Document = Node2.create({
48372
48331
  name: "doc",
48373
48332
  topNode: true,
@@ -48507,7 +48466,7 @@ var DropCursorView = class {
48507
48466
  }
48508
48467
  };
48509
48468
 
48510
- // ../../node_modules/.pnpm/@tiptap+extension-dropcursor@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-dropcursor/dist/index.js
48469
+ // ../../node_modules/.pnpm/@tiptap+extension-dropcursor@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-dropcursor/dist/index.js
48511
48470
  var Dropcursor = Extension.create({
48512
48471
  name: "dropCursor",
48513
48472
  addOptions() {
@@ -48738,7 +48697,7 @@ function drawGapCursor(state) {
48738
48697
  return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, { key: "gapcursor" })]);
48739
48698
  }
48740
48699
 
48741
- // ../../node_modules/.pnpm/@tiptap+extension-gapcursor@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-gapcursor/dist/index.js
48700
+ // ../../node_modules/.pnpm/@tiptap+extension-gapcursor@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-gapcursor/dist/index.js
48742
48701
  var Gapcursor = Extension.create({
48743
48702
  name: "gapCursor",
48744
48703
  addProseMirrorPlugins() {
@@ -48759,7 +48718,7 @@ var Gapcursor = Extension.create({
48759
48718
  }
48760
48719
  });
48761
48720
 
48762
- // ../../node_modules/.pnpm/@tiptap+extension-hard-break@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-hard-break/dist/index.js
48721
+ // ../../node_modules/.pnpm/@tiptap+extension-hard-break@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-hard-break/dist/index.js
48763
48722
  var HardBreak = Node2.create({
48764
48723
  name: "hardBreak",
48765
48724
  addOptions() {
@@ -48816,7 +48775,7 @@ var HardBreak = Node2.create({
48816
48775
  }
48817
48776
  });
48818
48777
 
48819
- // ../../node_modules/.pnpm/@tiptap+extension-heading@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-heading/dist/index.js
48778
+ // ../../node_modules/.pnpm/@tiptap+extension-heading@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-heading/dist/index.js
48820
48779
  var Heading = Node2.create({
48821
48780
  name: "heading",
48822
48781
  addOptions() {
@@ -49420,7 +49379,7 @@ var redo = buildCommand(true, true);
49420
49379
  var undoNoScroll = buildCommand(false, false);
49421
49380
  var redoNoScroll = buildCommand(true, false);
49422
49381
 
49423
- // ../../node_modules/.pnpm/@tiptap+extension-history@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-history/dist/index.js
49382
+ // ../../node_modules/.pnpm/@tiptap+extension-history@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-history/dist/index.js
49424
49383
  var History = Extension.create({
49425
49384
  name: "history",
49426
49385
  addOptions() {
@@ -49456,7 +49415,7 @@ var History = Extension.create({
49456
49415
  }
49457
49416
  });
49458
49417
 
49459
- // ../../node_modules/.pnpm/@tiptap+extension-horizontal-rule@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-horizontal-rule/dist/index.js
49418
+ // ../../node_modules/.pnpm/@tiptap+extension-horizontal-rule@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-horizontal-rule/dist/index.js
49460
49419
  var HorizontalRule = Node2.create({
49461
49420
  name: "horizontalRule",
49462
49421
  addOptions() {
@@ -49474,9 +49433,6 @@ var HorizontalRule = Node2.create({
49474
49433
  addCommands() {
49475
49434
  return {
49476
49435
  setHorizontalRule: () => ({ chain, state }) => {
49477
- if (!canInsertNode(state, state.schema.nodes[this.name])) {
49478
- return false;
49479
- }
49480
49436
  const { selection } = state;
49481
49437
  const { $from: $originFrom, $to: $originTo } = selection;
49482
49438
  const currentChain = chain();
@@ -49531,7 +49487,7 @@ var HorizontalRule = Node2.create({
49531
49487
  }
49532
49488
  });
49533
49489
 
49534
- // ../../node_modules/.pnpm/@tiptap+extension-italic@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-italic/dist/index.js
49490
+ // ../../node_modules/.pnpm/@tiptap+extension-italic@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-italic/dist/index.js
49535
49491
  var starInputRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
49536
49492
  var starPasteRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
49537
49493
  var underscoreInputRegex2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
@@ -49609,7 +49565,7 @@ var Italic = Mark2.create({
49609
49565
  }
49610
49566
  });
49611
49567
 
49612
- // ../../node_modules/.pnpm/@tiptap+extension-list-item@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-list-item/dist/index.js
49568
+ // ../../node_modules/.pnpm/@tiptap+extension-list-item@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-list-item/dist/index.js
49613
49569
  var ListItem = Node2.create({
49614
49570
  name: "listItem",
49615
49571
  addOptions() {
@@ -49640,7 +49596,7 @@ var ListItem = Node2.create({
49640
49596
  }
49641
49597
  });
49642
49598
 
49643
- // ../../node_modules/.pnpm/@tiptap+extension-ordered-list@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-ordered-list/dist/index.js
49599
+ // ../../node_modules/.pnpm/@tiptap+extension-ordered-list@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-ordered-list/dist/index.js
49644
49600
  var ListItemName2 = "listItem";
49645
49601
  var TextStyleName2 = "textStyle";
49646
49602
  var inputRegex4 = /^(\d+)\.\s$/;
@@ -49722,7 +49678,7 @@ var OrderedList = Node2.create({
49722
49678
  }
49723
49679
  });
49724
49680
 
49725
- // ../../node_modules/.pnpm/@tiptap+extension-paragraph@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-paragraph/dist/index.js
49681
+ // ../../node_modules/.pnpm/@tiptap+extension-paragraph@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-paragraph/dist/index.js
49726
49682
  var Paragraph = Node2.create({
49727
49683
  name: "paragraph",
49728
49684
  priority: 1e3,
@@ -49755,7 +49711,7 @@ var Paragraph = Node2.create({
49755
49711
  }
49756
49712
  });
49757
49713
 
49758
- // ../../node_modules/.pnpm/@tiptap+extension-strike@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-strike/dist/index.js
49714
+ // ../../node_modules/.pnpm/@tiptap+extension-strike@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-strike/dist/index.js
49759
49715
  var inputRegex5 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/;
49760
49716
  var pasteRegex2 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g;
49761
49717
  var Strike = Mark2.create({
@@ -49822,13 +49778,13 @@ var Strike = Mark2.create({
49822
49778
  }
49823
49779
  });
49824
49780
 
49825
- // ../../node_modules/.pnpm/@tiptap+extension-text@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text/dist/index.js
49781
+ // ../../node_modules/.pnpm/@tiptap+extension-text@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-text/dist/index.js
49826
49782
  var Text = Node2.create({
49827
49783
  name: "text",
49828
49784
  group: "inline"
49829
49785
  });
49830
49786
 
49831
- // ../../node_modules/.pnpm/@tiptap+starter-kit@2.27.2/node_modules/@tiptap/starter-kit/dist/index.js
49787
+ // ../../node_modules/.pnpm/@tiptap+starter-kit@2.11.7/node_modules/@tiptap/starter-kit/dist/index.js
49832
49788
  var StarterKit = Extension.create({
49833
49789
  name: "starterKit",
49834
49790
  addExtensions() {
@@ -49891,7 +49847,7 @@ var StarterKit = Extension.create({
49891
49847
  }
49892
49848
  });
49893
49849
 
49894
- // ../../node_modules/.pnpm/@tiptap+extension-underline@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-underline/dist/index.js
49850
+ // ../../node_modules/.pnpm/@tiptap+extension-underline@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-underline/dist/index.js
49895
49851
  var Underline = Mark2.create({
49896
49852
  name: "underline",
49897
49853
  addOptions() {
@@ -49935,7 +49891,7 @@ var Underline = Mark2.create({
49935
49891
  }
49936
49892
  });
49937
49893
 
49938
- // ../../node_modules/.pnpm/@tiptap+extension-text-style@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text-style/dist/index.js
49894
+ // ../../node_modules/.pnpm/@tiptap+extension-text-style@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-text-style/dist/index.js
49939
49895
  var mergeNestedSpanStyles = (element) => {
49940
49896
  if (!element.children.length) {
49941
49897
  return;
@@ -49998,7 +49954,7 @@ var TextStyle = Mark2.create({
49998
49954
  }
49999
49955
  });
50000
49956
 
50001
- // ../../node_modules/.pnpm/@tiptap+extension-color@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+extension-text-_nwipyjl2zzg6jzm7vhuho2a42m/node_modules/@tiptap/extension-color/dist/index.js
49957
+ // ../../node_modules/.pnpm/@tiptap+extension-color@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+extension-text-_6inr4ropszdjmgoexhyzt7zmf4/node_modules/@tiptap/extension-color/dist/index.js
50002
49958
  var Color = Extension.create({
50003
49959
  name: "color",
50004
49960
  addOptions() {
@@ -50042,7 +49998,7 @@ var Color = Extension.create({
50042
49998
  }
50043
49999
  });
50044
50000
 
50045
- // ../../node_modules/.pnpm/@tiptap+extension-highlight@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-highlight/dist/index.js
50001
+ // ../../node_modules/.pnpm/@tiptap+extension-highlight@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-highlight/dist/index.js
50046
50002
  var inputRegex6 = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/;
50047
50003
  var pasteRegex3 = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g;
50048
50004
  var Highlight = Mark2.create({
@@ -50119,7 +50075,7 @@ var Highlight = Mark2.create({
50119
50075
  }
50120
50076
  });
50121
50077
 
50122
- // ../../node_modules/.pnpm/@tiptap+extension-text-align@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text-align/dist/index.js
50078
+ // ../../node_modules/.pnpm/@tiptap+extension-text-align@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7_/node_modules/@tiptap/extension-text-align/dist/index.js
50123
50079
  var TextAlign = Extension.create({
50124
50080
  name: "textAlign",
50125
50081
  addOptions() {
@@ -50161,15 +50117,6 @@ var TextAlign = Extension.create({
50161
50117
  },
50162
50118
  unsetTextAlign: () => ({ commands: commands2 }) => {
50163
50119
  return this.options.types.map((type) => commands2.resetAttributes(type, "textAlign")).every((response) => response);
50164
- },
50165
- toggleTextAlign: (alignment) => ({ editor, commands: commands2 }) => {
50166
- if (!this.options.alignments.includes(alignment)) {
50167
- return false;
50168
- }
50169
- if (editor.isActive({ textAlign: alignment })) {
50170
- return commands2.unsetTextAlign();
50171
- }
50172
- return commands2.setTextAlign(alignment);
50173
50120
  }
50174
50121
  };
50175
50122
  },
@@ -51330,11 +51277,7 @@ function find(str, type = null, opts = null) {
51330
51277
  return filtered;
51331
51278
  }
51332
51279
 
51333
- // ../../node_modules/.pnpm/@tiptap+extension-link@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-link/dist/index.js
51334
- var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]";
51335
- var UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN);
51336
- var UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`);
51337
- var UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, "g");
51280
+ // ../../node_modules/.pnpm/@tiptap+extension-link@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-link/dist/index.js
51338
51281
  function isValidLinkStructure(tokens) {
51339
51282
  if (tokens.length === 1) {
51340
51283
  return tokens[0].isLink;
@@ -51363,16 +51306,12 @@ function autolink(options) {
51363
51306
  if (nodesInChangedRanges.length > 1) {
51364
51307
  textBlock = nodesInChangedRanges[0];
51365
51308
  textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, textBlock.pos + textBlock.node.nodeSize, void 0, " ");
51366
- } else if (nodesInChangedRanges.length) {
51367
- const endText = newState.doc.textBetween(newRange.from, newRange.to, " ", " ");
51368
- if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) {
51369
- return;
51370
- }
51309
+ } else if (nodesInChangedRanges.length && newState.doc.textBetween(newRange.from, newRange.to, " ", " ").endsWith(" ")) {
51371
51310
  textBlock = nodesInChangedRanges[0];
51372
51311
  textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, newRange.to, void 0, " ");
51373
51312
  }
51374
51313
  if (textBlock && textBeforeWhitespace) {
51375
- const wordsBeforeWhitespace = textBeforeWhitespace.split(UNICODE_WHITESPACE_REGEX).filter(Boolean);
51314
+ const wordsBeforeWhitespace = textBeforeWhitespace.split(" ").filter((s) => s !== "");
51376
51315
  if (wordsBeforeWhitespace.length <= 0) {
51377
51316
  return false;
51378
51317
  }
@@ -51471,6 +51410,7 @@ function pasteHandler(options) {
51471
51410
  }
51472
51411
  });
51473
51412
  }
51413
+ var ATTR_WHITESPACE = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
51474
51414
  function isAllowedUri(uri, protocols) {
51475
51415
  const allowedProtocols = [
51476
51416
  "http",
@@ -51492,7 +51432,7 @@ function isAllowedUri(uri, protocols) {
51492
51432
  }
51493
51433
  });
51494
51434
  }
51495
- return !uri || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, "").match(new RegExp(
51435
+ return !uri || uri.replace(ATTR_WHITESPACE, "").match(new RegExp(
51496
51436
  // eslint-disable-next-line no-useless-escape
51497
51437
  `^(?:(?:${allowedProtocols.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
51498
51438
  "i"
@@ -51684,7 +51624,7 @@ var Link = Mark2.create({
51684
51624
  }
51685
51625
  });
51686
51626
 
51687
- // ../../node_modules/.pnpm/@tiptap+extension-placeholder@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-placeholder/dist/index.js
51627
+ // ../../node_modules/.pnpm/@tiptap+extension-placeholder@2.11.7_@tiptap+core@2.11.7_@tiptap+pm@2.11.7__@tiptap+pm@2.11.7/node_modules/@tiptap/extension-placeholder/dist/index.js
51688
51628
  var Placeholder = Extension.create({
51689
51629
  name: "placeholder",
51690
51630
  addOptions() {
@@ -52034,11 +51974,18 @@ var sectionMediaFields = [
52034
51974
  })
52035
51975
  ]
52036
51976
  }),
51977
+ defineField2({
51978
+ name: "backgroundVideoFile",
51979
+ title: "Video de fondo \u2014 subir archivo (MP4/WebM)",
51980
+ type: "file",
51981
+ description: "Subir directamente a Sanity. Tiene prioridad sobre la URL externa de abajo. No se reproduce en mobile \u2014 agreg\xE1 tambi\xE9n una imagen de fondo como poster.",
51982
+ options: { accept: "video/mp4,video/webm,video/*" }
51983
+ }),
52037
51984
  defineField2({
52038
51985
  name: "backgroundVideoUrl",
52039
51986
  title: "Video de fondo (URL .mp4)",
52040
51987
  type: "string",
52041
- description: "URL directa a un archivo .mp4. No se reproduce en mobile \u2014 se recomienda agregar tambi\xE9n una imagen de fondo como poster."
51988
+ description: "URL directa a un archivo .mp4. Solo se usa si no hay archivo subido arriba. No se reproduce en mobile \u2014 se recomienda agregar tambi\xE9n una imagen de fondo como poster."
52042
51989
  }),
52043
51990
  defineField2({
52044
51991
  name: "backgroundOverlay",
@@ -52047,7 +51994,7 @@ var sectionMediaFields = [
52047
51994
  description: "Oscurece el fondo para mejorar la legibilidad del texto sobre im\xE1genes o videos (0 = sin overlay, 80 = muy oscuro).",
52048
51995
  initialValue: 0,
52049
51996
  validation: (r) => r.min(0).max(100),
52050
- hidden: ({ parent }) => !parent?.backgroundImage && !parent?.backgroundVideoUrl
51997
+ hidden: ({ parent }) => !parent?.backgroundImage && !parent?.backgroundVideoUrl && !parent?.backgroundVideoFile
52051
51998
  }),
52052
51999
  defineField2({
52053
52000
  name: "animate",
@@ -52113,7 +52060,7 @@ var heroSection = defineType2({
52113
52060
  title: "Poster del video (miniatura mientras carga)",
52114
52061
  description: "Se muestra antes de que el video comience a reproducirse.",
52115
52062
  type: "image",
52116
- hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card",
52063
+ hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card" && parent?.variant !== "split",
52117
52064
  options: { hotspot: true },
52118
52065
  fields: [
52119
52066
  defineField3({ name: "alt", title: "Texto alternativo", type: "string" })
@@ -52123,9 +52070,9 @@ var heroSection = defineType2({
52123
52070
  defineField3({
52124
52071
  name: "videoFile",
52125
52072
  title: "Video \u2014 subir archivo (MP4/WebM)",
52126
- description: "Subir directamente a Sanity. Tiene prioridad sobre la URL externa de abajo.",
52073
+ description: "Subir directamente a Sanity. Tiene prioridad sobre la URL externa de abajo. En la variante 'Dividido' se muestra en lugar de la imagen.",
52127
52074
  type: "file",
52128
- hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card",
52075
+ hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card" && parent?.variant !== "split",
52129
52076
  options: { accept: "video/mp4,video/webm,video/*" }
52130
52077
  }),
52131
52078
  defineField3({
@@ -52133,7 +52080,7 @@ var heroSection = defineType2({
52133
52080
  title: "Video \u2014 URL externa",
52134
52081
  description: "Peg\xE1 una URL directa de .mp4 / .webm (Cloudinary, S3, Vimeo link directo, etc.). Solo se usa si no hay archivo subido arriba.",
52135
52082
  type: "url",
52136
- hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card"
52083
+ hidden: ({ parent }) => parent?.variant !== "video" && parent?.variant !== "card" && parent?.variant !== "split"
52137
52084
  }),
52138
52085
  defineField3({
52139
52086
  name: "overlayOpacity",
@@ -54288,7 +54235,9 @@ var downloadsSection = defineType25({
54288
54235
  list: [
54289
54236
  { title: "Grilla \u2014 grupos como cards en grilla", value: "grouped" },
54290
54237
  { title: "Acorde\xF3n \u2014 grupos colapsables", value: "accordion" },
54291
- { title: "Lista plana \u2014 con separadores de grupo", value: "flat" }
54238
+ { title: "Lista plana \u2014 con separadores de grupo", value: "flat" },
54239
+ { title: "Nube \u2014 todos los archivos como chips, sin grupos", value: "cloud" },
54240
+ { title: "Burbujas \u2014 \xEDcono en c\xEDrculo y nombre debajo, sin grupos", value: "bubbles" }
54292
54241
  ],
54293
54242
  layout: "radio"
54294
54243
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zekidev/schemas",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {