@moontra/moonui-pro 3.4.12 → 3.4.13

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
@@ -17375,17 +17375,6 @@ var FloatingDockInternal = React71__default.forwardRef(
17375
17375
  }
17376
17376
  };
17377
17377
  }, [isMobileOpen, autoHideDelay, mobileMode, isMobile]);
17378
- const getDockVisibility = () => {
17379
- if (!isMobile)
17380
- return true;
17381
- if (mobileMode === "always")
17382
- return true;
17383
- if (mobileMode === "hidden")
17384
- return false;
17385
- if (mobileMode === "toggle")
17386
- return isMobileOpen;
17387
- return true;
17388
- };
17389
17378
  const slideVariants = {
17390
17379
  right: {
17391
17380
  hidden: { x: "calc(100% + 24px)", opacity: 0 },
@@ -17491,43 +17480,20 @@ var FloatingDockInternal = React71__default.forwardRef(
17491
17480
  }
17492
17481
  }
17493
17482
  };
17494
- return /* @__PURE__ */ jsxs(Fragment, { children: [
17495
- isMobile && mobileMode === "toggle" && /* @__PURE__ */ jsx(
17496
- motion.button,
17497
- {
17498
- className: cn(
17499
- "z-[9998] p-2.5 rounded-full bg-background/95 backdrop-blur-md border border-border shadow-lg hover:shadow-xl transition-shadow",
17500
- getToggleButtonClass()
17501
- ),
17502
- onClick: () => setIsMobileOpen(!isMobileOpen),
17503
- whileTap: { scale: 0.95 },
17504
- initial: { opacity: 0, scale: 0.8 },
17505
- animate: { opacity: 1, scale: 1 },
17506
- transition: { duration: 0.3 },
17507
- children: /* @__PURE__ */ jsx(
17508
- motion.div,
17509
- {
17510
- animate: { rotate: getToggleIconRotation() },
17511
- transition: { duration: 0.3, ease: "easeOut" },
17512
- children: toggleIcon || /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4" })
17513
- }
17514
- )
17515
- }
17516
- ),
17517
- /* @__PURE__ */ jsx(AnimatePresence, { children: getDockVisibility() && /* @__PURE__ */ jsx(
17483
+ if (!isMobile || mobileMode === "always") {
17484
+ return /* @__PURE__ */ jsx(
17518
17485
  motion.div,
17519
17486
  {
17520
17487
  ref,
17521
17488
  className: cn(
17522
17489
  floatingDockVariants({ size: size4, position }),
17523
17490
  getPositionClass(),
17491
+ "z-[99999]",
17524
17492
  className
17525
17493
  ),
17526
- variants: isMobile ? slideVariants[position || "bottom"] : void 0,
17527
- initial: isMobile ? "hidden" : { opacity: 0, scale: 0.95 },
17528
- animate: isMobile ? "visible" : { opacity: 1, scale: 1 },
17529
- exit: "hidden",
17530
- transition: { duration: 0.3, ease: "easeOut" },
17494
+ initial: { opacity: 0, scale: 0.95 },
17495
+ animate: { opacity: 1, scale: 1 },
17496
+ transition: { duration: 0.4, ease: "easeOut" },
17531
17497
  children: items.map((item) => /* @__PURE__ */ jsx(
17532
17498
  DockIcon,
17533
17499
  {
@@ -17540,7 +17506,92 @@ var FloatingDockInternal = React71__default.forwardRef(
17540
17506
  item.id
17541
17507
  ))
17542
17508
  }
17543
- ) })
17509
+ );
17510
+ }
17511
+ if (mobileMode === "hidden") {
17512
+ return null;
17513
+ }
17514
+ return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
17515
+ /* @__PURE__ */ jsx(
17516
+ motion.div,
17517
+ {
17518
+ className: cn(
17519
+ "z-[99999]",
17520
+ getPositionClass()
17521
+ ),
17522
+ variants: slideVariants[position || "bottom"],
17523
+ initial: "hidden",
17524
+ animate: isMobileOpen ? "visible" : "hidden",
17525
+ transition: { duration: 0.3, ease: "easeOut" },
17526
+ children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
17527
+ /* @__PURE__ */ jsx(
17528
+ "div",
17529
+ {
17530
+ ref,
17531
+ className: cn(
17532
+ floatingDockVariants({ size: size4, position }),
17533
+ className
17534
+ ),
17535
+ children: items.map((item) => /* @__PURE__ */ jsx(
17536
+ DockIcon,
17537
+ {
17538
+ item,
17539
+ size: size4 || "md",
17540
+ magnification,
17541
+ showTooltip,
17542
+ position: position || "bottom"
17543
+ },
17544
+ item.id
17545
+ ))
17546
+ }
17547
+ ),
17548
+ /* @__PURE__ */ jsx(
17549
+ motion.button,
17550
+ {
17551
+ className: cn(
17552
+ "absolute p-2.5 rounded-full bg-background/95 backdrop-blur-md border border-border shadow-lg hover:shadow-xl transition-shadow",
17553
+ position === "right" && "-left-14 top-1/2 -translate-y-1/2",
17554
+ position === "left" && "-right-14 top-1/2 -translate-y-1/2",
17555
+ position === "bottom" && "left-1/2 -translate-x-1/2 -top-14",
17556
+ position === "top" && "left-1/2 -translate-x-1/2 -bottom-14"
17557
+ ),
17558
+ onClick: () => setIsMobileOpen(!isMobileOpen),
17559
+ whileTap: { scale: 0.95 },
17560
+ children: /* @__PURE__ */ jsx(
17561
+ motion.div,
17562
+ {
17563
+ animate: { rotate: getToggleIconRotation() },
17564
+ transition: { duration: 0.3, ease: "easeOut" },
17565
+ children: toggleIcon || /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4" })
17566
+ }
17567
+ )
17568
+ }
17569
+ )
17570
+ ] })
17571
+ }
17572
+ ),
17573
+ !isMobileOpen && /* @__PURE__ */ jsx(
17574
+ motion.button,
17575
+ {
17576
+ className: cn(
17577
+ "z-[99999] p-2.5 rounded-full bg-background/95 backdrop-blur-md border border-border shadow-lg hover:shadow-xl transition-shadow",
17578
+ getToggleButtonClass()
17579
+ ),
17580
+ onClick: () => setIsMobileOpen(true),
17581
+ whileTap: { scale: 0.95 },
17582
+ initial: { opacity: 0, scale: 0.8 },
17583
+ animate: { opacity: 1, scale: 1 },
17584
+ transition: { duration: 0.3 },
17585
+ children: /* @__PURE__ */ jsx(
17586
+ motion.div,
17587
+ {
17588
+ animate: { rotate: getToggleIconRotation() },
17589
+ transition: { duration: 0.3, ease: "easeOut" },
17590
+ children: toggleIcon || /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4" })
17591
+ }
17592
+ )
17593
+ }
17594
+ )
17544
17595
  ] });
17545
17596
  }
17546
17597
  );
@@ -23102,7 +23153,7 @@ function findDiffEnd(a, b, posA, posB) {
23102
23153
  posB -= size4;
23103
23154
  }
23104
23155
  }
23105
- var Fragment19 = class {
23156
+ var Fragment18 = class {
23106
23157
  /**
23107
23158
  @internal
23108
23159
  */
@@ -23170,7 +23221,7 @@ var Fragment19 = class {
23170
23221
  }
23171
23222
  for (; i < other.content.length; i++)
23172
23223
  content.push(other.content[i]);
23173
- return new Fragment19(content, this.size + other.size);
23224
+ return new Fragment18(content, this.size + other.size);
23174
23225
  }
23175
23226
  /**
23176
23227
  Cut out the sub-fragment between the two given positions.
@@ -23194,17 +23245,17 @@ var Fragment19 = class {
23194
23245
  }
23195
23246
  pos = end;
23196
23247
  }
23197
- return new Fragment19(result, size4);
23248
+ return new Fragment18(result, size4);
23198
23249
  }
23199
23250
  /**
23200
23251
  @internal
23201
23252
  */
23202
23253
  cutByIndex(from2, to) {
23203
23254
  if (from2 == to)
23204
- return Fragment19.empty;
23255
+ return Fragment18.empty;
23205
23256
  if (from2 == 0 && to == this.content.length)
23206
23257
  return this;
23207
- return new Fragment19(this.content.slice(from2, to));
23258
+ return new Fragment18(this.content.slice(from2, to));
23208
23259
  }
23209
23260
  /**
23210
23261
  Create a new fragment in which the node at the given index is
@@ -23217,21 +23268,21 @@ var Fragment19 = class {
23217
23268
  let copy2 = this.content.slice();
23218
23269
  let size4 = this.size + node.nodeSize - current.nodeSize;
23219
23270
  copy2[index2] = node;
23220
- return new Fragment19(copy2, size4);
23271
+ return new Fragment18(copy2, size4);
23221
23272
  }
23222
23273
  /**
23223
23274
  Create a new fragment by prepending the given node to this
23224
23275
  fragment.
23225
23276
  */
23226
23277
  addToStart(node) {
23227
- return new Fragment19([node].concat(this.content), this.size + node.nodeSize);
23278
+ return new Fragment18([node].concat(this.content), this.size + node.nodeSize);
23228
23279
  }
23229
23280
  /**
23230
23281
  Create a new fragment by appending the given node to this
23231
23282
  fragment.
23232
23283
  */
23233
23284
  addToEnd(node) {
23234
- return new Fragment19(this.content.concat(node), this.size + node.nodeSize);
23285
+ return new Fragment18(this.content.concat(node), this.size + node.nodeSize);
23235
23286
  }
23236
23287
  /**
23237
23288
  Compare this fragment to another one.
@@ -23350,10 +23401,10 @@ var Fragment19 = class {
23350
23401
  */
23351
23402
  static fromJSON(schema, value) {
23352
23403
  if (!value)
23353
- return Fragment19.empty;
23404
+ return Fragment18.empty;
23354
23405
  if (!Array.isArray(value))
23355
23406
  throw new RangeError("Invalid input for Fragment.fromJSON");
23356
- return new Fragment19(value.map(schema.nodeFromJSON));
23407
+ return new Fragment18(value.map(schema.nodeFromJSON));
23357
23408
  }
23358
23409
  /**
23359
23410
  Build a fragment from an array of nodes. Ensures that adjacent
@@ -23361,7 +23412,7 @@ var Fragment19 = class {
23361
23412
  */
23362
23413
  static fromArray(array) {
23363
23414
  if (!array.length)
23364
- return Fragment19.empty;
23415
+ return Fragment18.empty;
23365
23416
  let joined, size4 = 0;
23366
23417
  for (let i = 0; i < array.length; i++) {
23367
23418
  let node = array[i];
@@ -23374,7 +23425,7 @@ var Fragment19 = class {
23374
23425
  joined.push(node);
23375
23426
  }
23376
23427
  }
23377
- return new Fragment19(joined || array, size4);
23428
+ return new Fragment18(joined || array, size4);
23378
23429
  }
23379
23430
  /**
23380
23431
  Create a fragment from something that can be interpreted as a
@@ -23384,17 +23435,17 @@ var Fragment19 = class {
23384
23435
  */
23385
23436
  static from(nodes) {
23386
23437
  if (!nodes)
23387
- return Fragment19.empty;
23388
- if (nodes instanceof Fragment19)
23438
+ return Fragment18.empty;
23439
+ if (nodes instanceof Fragment18)
23389
23440
  return nodes;
23390
23441
  if (Array.isArray(nodes))
23391
23442
  return this.fromArray(nodes);
23392
23443
  if (nodes.attrs)
23393
- return new Fragment19([nodes], nodes.nodeSize);
23444
+ return new Fragment18([nodes], nodes.nodeSize);
23394
23445
  throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
23395
23446
  }
23396
23447
  };
23397
- Fragment19.empty = new Fragment19([], 0);
23448
+ Fragment18.empty = new Fragment18([], 0);
23398
23449
  var found = { index: 0, offset: 0 };
23399
23450
  function retIndex(index2, offset4) {
23400
23451
  found.index = index2;
@@ -23619,7 +23670,7 @@ var Slice = class {
23619
23670
  let openStart = json2.openStart || 0, openEnd = json2.openEnd || 0;
23620
23671
  if (typeof openStart != "number" || typeof openEnd != "number")
23621
23672
  throw new RangeError("Invalid input for Slice.fromJSON");
23622
- return new Slice(Fragment19.fromJSON(schema, json2.content), openStart, openEnd);
23673
+ return new Slice(Fragment18.fromJSON(schema, json2.content), openStart, openEnd);
23623
23674
  }
23624
23675
  /**
23625
23676
  Create a slice from a fragment by taking the maximum possible
@@ -23634,7 +23685,7 @@ var Slice = class {
23634
23685
  return new Slice(fragment, openStart, openEnd);
23635
23686
  }
23636
23687
  };
23637
- Slice.empty = new Slice(Fragment19.empty, 0, 0);
23688
+ Slice.empty = new Slice(Fragment18.empty, 0, 0);
23638
23689
  function removeRange(content, from2, to) {
23639
23690
  let { index: index2, offset: offset4 } = content.findIndex(from2), child = content.maybeChild(index2);
23640
23691
  let { index: indexTo, offset: offsetTo } = content.findIndex(to);
@@ -23732,7 +23783,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
23732
23783
  addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
23733
23784
  }
23734
23785
  addRange($to, null, depth, content);
23735
- return new Fragment19(content);
23786
+ return new Fragment18(content);
23736
23787
  }
23737
23788
  function replaceTwoWay($from, $to, depth) {
23738
23789
  let content = [];
@@ -23742,13 +23793,13 @@ function replaceTwoWay($from, $to, depth) {
23742
23793
  addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
23743
23794
  }
23744
23795
  addRange($to, null, depth, content);
23745
- return new Fragment19(content);
23796
+ return new Fragment18(content);
23746
23797
  }
23747
23798
  function prepareSliceForReplace(slice2, $along) {
23748
23799
  let extra = $along.depth - slice2.openStart, parent = $along.node(extra);
23749
23800
  let node = parent.copy(slice2.content);
23750
23801
  for (let i = extra - 1; i >= 0; i--)
23751
- node = $along.node(i).copy(Fragment19.from(node));
23802
+ node = $along.node(i).copy(Fragment18.from(node));
23752
23803
  return {
23753
23804
  start: node.resolveNoCache(slice2.openStart + extra),
23754
23805
  end: node.resolveNoCache(node.content.size - slice2.openEnd - extra)
@@ -24087,7 +24138,7 @@ var Node2 = class {
24087
24138
  this.type = type;
24088
24139
  this.attrs = attrs;
24089
24140
  this.marks = marks;
24090
- this.content = content || Fragment19.empty;
24141
+ this.content = content || Fragment18.empty;
24091
24142
  }
24092
24143
  /**
24093
24144
  The array of this node's child nodes.
@@ -24392,7 +24443,7 @@ var Node2 = class {
24392
24443
  can optionally pass `start` and `end` indices into the
24393
24444
  replacement fragment.
24394
24445
  */
24395
- canReplace(from2, to, replacement = Fragment19.empty, start = 0, end = replacement.childCount) {
24446
+ canReplace(from2, to, replacement = Fragment18.empty, start = 0, end = replacement.childCount) {
24396
24447
  let one = this.contentMatchAt(from2).matchFragment(replacement, start, end);
24397
24448
  let two = one && one.matchFragment(this.content, to);
24398
24449
  if (!two || !two.validEnd)
@@ -24474,7 +24525,7 @@ var Node2 = class {
24474
24525
  throw new RangeError("Invalid text node in JSON");
24475
24526
  return schema.text(json2.text, marks);
24476
24527
  }
24477
- let content = Fragment19.fromJSON(schema, json2.content);
24528
+ let content = Fragment18.fromJSON(schema, json2.content);
24478
24529
  let node = schema.nodeType(json2.type).create(json2.attrs, content, marks);
24479
24530
  node.type.checkAttrs(node.attrs);
24480
24531
  return node;
@@ -24616,7 +24667,7 @@ var ContentMatch = class {
24616
24667
  function search(match, types) {
24617
24668
  let finished = match.matchFragment(after, startIndex);
24618
24669
  if (finished && (!toEnd || finished.validEnd))
24619
- return Fragment19.from(types.map((tp) => tp.createAndFill()));
24670
+ return Fragment18.from(types.map((tp) => tp.createAndFill()));
24620
24671
  for (let i = 0; i < match.next.length; i++) {
24621
24672
  let { type, next } = match.next[i];
24622
24673
  if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
@@ -25068,7 +25119,7 @@ var NodeType = class {
25068
25119
  create(attrs = null, content, marks) {
25069
25120
  if (this.isText)
25070
25121
  throw new Error("NodeType.create can't construct text nodes");
25071
- return new Node2(this, this.computeAttrs(attrs), Fragment19.from(content), Mark.setFrom(marks));
25122
+ return new Node2(this, this.computeAttrs(attrs), Fragment18.from(content), Mark.setFrom(marks));
25072
25123
  }
25073
25124
  /**
25074
25125
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
@@ -25076,7 +25127,7 @@ var NodeType = class {
25076
25127
  if it doesn't match.
25077
25128
  */
25078
25129
  createChecked(attrs = null, content, marks) {
25079
- content = Fragment19.from(content);
25130
+ content = Fragment18.from(content);
25080
25131
  this.checkContent(content);
25081
25132
  return new Node2(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));
25082
25133
  }
@@ -25090,7 +25141,7 @@ var NodeType = class {
25090
25141
  */
25091
25142
  createAndFill(attrs = null, content, marks) {
25092
25143
  attrs = this.computeAttrs(attrs);
25093
- content = Fragment19.from(content);
25144
+ content = Fragment18.from(content);
25094
25145
  if (content.size) {
25095
25146
  let before = this.contentMatch.fillBefore(content);
25096
25147
  if (!before)
@@ -25098,7 +25149,7 @@ var NodeType = class {
25098
25149
  content = before.append(content);
25099
25150
  }
25100
25151
  let matched = this.contentMatch.matchFragment(content);
25101
- let after = matched && matched.fillBefore(Fragment19.empty, true);
25152
+ let after = matched && matched.fillBefore(Fragment18.empty, true);
25102
25153
  if (!after)
25103
25154
  return null;
25104
25155
  return new Node2(this, attrs, content.append(after), Mark.setFrom(marks));
@@ -25562,7 +25613,7 @@ var NodeContext = class {
25562
25613
  if (!this.match) {
25563
25614
  if (!this.type)
25564
25615
  return [];
25565
- let fill = this.type.contentMatch.fillBefore(Fragment19.from(node));
25616
+ let fill = this.type.contentMatch.fillBefore(Fragment18.from(node));
25566
25617
  if (fill) {
25567
25618
  this.match = this.type.contentMatch.matchFragment(fill);
25568
25619
  } else {
@@ -25588,9 +25639,9 @@ var NodeContext = class {
25588
25639
  this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));
25589
25640
  }
25590
25641
  }
25591
- let content = Fragment19.from(this.content);
25642
+ let content = Fragment18.from(this.content);
25592
25643
  if (!openEnd && this.match)
25593
- content = content.append(this.match.fillBefore(Fragment19.empty, true));
25644
+ content = content.append(this.match.fillBefore(Fragment18.empty, true));
25594
25645
  return this.type ? this.type.create(this.attrs, content, this.marks) : content;
25595
25646
  }
25596
25647
  inlineContext(node) {
@@ -26607,7 +26658,7 @@ function mapFragment(fragment, f, parent) {
26607
26658
  child = f(child, parent, i);
26608
26659
  mapped.push(child);
26609
26660
  }
26610
- return Fragment19.fromArray(mapped);
26661
+ return Fragment18.fromArray(mapped);
26611
26662
  }
26612
26663
  var AddMarkStep = class extends Step {
26613
26664
  /**
@@ -26724,7 +26775,7 @@ var AddNodeMarkStep = class extends Step {
26724
26775
  if (!node)
26725
26776
  return StepResult.fail("No node at mark step's position");
26726
26777
  let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
26727
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment19.from(updated), 0, node.isLeaf ? 0 : 1));
26778
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment18.from(updated), 0, node.isLeaf ? 0 : 1));
26728
26779
  }
26729
26780
  invert(doc3) {
26730
26781
  let node = doc3.nodeAt(this.pos);
@@ -26770,7 +26821,7 @@ var RemoveNodeMarkStep = class extends Step {
26770
26821
  if (!node)
26771
26822
  return StepResult.fail("No node at mark step's position");
26772
26823
  let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
26773
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment19.from(updated), 0, node.isLeaf ? 0 : 1));
26824
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment18.from(updated), 0, node.isLeaf ? 0 : 1));
26774
26825
  }
26775
26826
  invert(doc3) {
26776
26827
  let node = doc3.nodeAt(this.pos);
@@ -27035,7 +27086,7 @@ function clearIncompatible(tr2, pos, parentType, match = parentType.contentMatch
27035
27086
  let m, newline = /\r?\n|\r/g, slice2;
27036
27087
  while (m = newline.exec(child.text)) {
27037
27088
  if (!slice2)
27038
- slice2 = new Slice(Fragment19.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
27089
+ slice2 = new Slice(Fragment18.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
27039
27090
  replSteps.push(new ReplaceStep(cur + m.index, cur + m.index + m[0].length, slice2));
27040
27091
  }
27041
27092
  }
@@ -27043,7 +27094,7 @@ function clearIncompatible(tr2, pos, parentType, match = parentType.contentMatch
27043
27094
  cur = end;
27044
27095
  }
27045
27096
  if (!match.validEnd) {
27046
- let fill = match.fillBefore(Fragment19.empty, true);
27097
+ let fill = match.fillBefore(Fragment18.empty, true);
27047
27098
  tr2.replace(cur, cur, new Slice(fill, 0, 0));
27048
27099
  }
27049
27100
  for (let i = replSteps.length - 1; i >= 0; i--)
@@ -27069,20 +27120,20 @@ function lift(tr2, range, target) {
27069
27120
  let { $from, $to, depth } = range;
27070
27121
  let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
27071
27122
  let start = gapStart, end = gapEnd;
27072
- let before = Fragment19.empty, openStart = 0;
27123
+ let before = Fragment18.empty, openStart = 0;
27073
27124
  for (let d = depth, splitting = false; d > target; d--)
27074
27125
  if (splitting || $from.index(d) > 0) {
27075
27126
  splitting = true;
27076
- before = Fragment19.from($from.node(d).copy(before));
27127
+ before = Fragment18.from($from.node(d).copy(before));
27077
27128
  openStart++;
27078
27129
  } else {
27079
27130
  start--;
27080
27131
  }
27081
- let after = Fragment19.empty, openEnd = 0;
27132
+ let after = Fragment18.empty, openEnd = 0;
27082
27133
  for (let d = depth, splitting = false; d > target; d--)
27083
27134
  if (splitting || $to.after(d + 1) < $to.end(d)) {
27084
27135
  splitting = true;
27085
- after = Fragment19.from($to.node(d).copy(after));
27136
+ after = Fragment18.from($to.node(d).copy(after));
27086
27137
  openEnd++;
27087
27138
  } else {
27088
27139
  end++;
@@ -27122,14 +27173,14 @@ function findWrappingInside(range, type) {
27122
27173
  return inside;
27123
27174
  }
27124
27175
  function wrap(tr2, range, wrappers) {
27125
- let content = Fragment19.empty;
27176
+ let content = Fragment18.empty;
27126
27177
  for (let i = wrappers.length - 1; i >= 0; i--) {
27127
27178
  if (content.size) {
27128
27179
  let match = wrappers[i].type.contentMatch.matchFragment(content);
27129
27180
  if (!match || !match.validEnd)
27130
27181
  throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
27131
27182
  }
27132
- content = Fragment19.from(wrappers[i].type.create(wrappers[i].attrs, content));
27183
+ content = Fragment18.from(wrappers[i].type.create(wrappers[i].attrs, content));
27133
27184
  }
27134
27185
  let start = range.start, end = range.end;
27135
27186
  tr2.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));
@@ -27154,7 +27205,7 @@ function setBlockType(tr2, from2, to, type, attrs) {
27154
27205
  clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type, void 0, convertNewlines === null);
27155
27206
  let mapping = tr2.mapping.slice(mapFrom);
27156
27207
  let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
27157
- tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment19.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
27208
+ tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment18.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
27158
27209
  if (convertNewlines === true)
27159
27210
  replaceNewlines(tr2, node, pos, mapFrom);
27160
27211
  return false;
@@ -27195,7 +27246,7 @@ function setNodeMarkup(tr2, pos, type, attrs, marks) {
27195
27246
  return tr2.replaceWith(pos, pos + node.nodeSize, newNode);
27196
27247
  if (!type.validContent(node.content))
27197
27248
  throw new RangeError("Invalid content for node type " + type.name);
27198
- tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment19.from(newNode), 0, 0), 1, true));
27249
+ tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment18.from(newNode), 0, 0), 1, true));
27199
27250
  }
27200
27251
  function canSplit(doc3, pos, depth = 1, typesAfter) {
27201
27252
  let $pos = doc3.resolve(pos), base2 = $pos.depth - depth;
@@ -27219,11 +27270,11 @@ function canSplit(doc3, pos, depth = 1, typesAfter) {
27219
27270
  return $pos.node(base2).canReplaceWith(index2, index2, baseType ? baseType.type : $pos.node(base2 + 1).type);
27220
27271
  }
27221
27272
  function split(tr2, pos, depth = 1, typesAfter) {
27222
- let $pos = tr2.doc.resolve(pos), before = Fragment19.empty, after = Fragment19.empty;
27273
+ let $pos = tr2.doc.resolve(pos), before = Fragment18.empty, after = Fragment18.empty;
27223
27274
  for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {
27224
- before = Fragment19.from($pos.node(d).copy(before));
27275
+ before = Fragment18.from($pos.node(d).copy(before));
27225
27276
  let typeAfter = typesAfter && typesAfter[i];
27226
- after = Fragment19.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
27277
+ after = Fragment18.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
27227
27278
  }
27228
27279
  tr2.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));
27229
27280
  }
@@ -27362,7 +27413,7 @@ var Fitter = class {
27362
27413
  this.$to = $to;
27363
27414
  this.unplaced = unplaced;
27364
27415
  this.frontier = [];
27365
- this.placed = Fragment19.empty;
27416
+ this.placed = Fragment18.empty;
27366
27417
  for (let i = 0; i <= $from.depth; i++) {
27367
27418
  let node = $from.node(i);
27368
27419
  this.frontier.push({
@@ -27371,7 +27422,7 @@ var Fitter = class {
27371
27422
  });
27372
27423
  }
27373
27424
  for (let i = $from.depth; i > 0; i--)
27374
- this.placed = Fragment19.from($from.node(i).copy(this.placed));
27425
+ this.placed = Fragment18.from($from.node(i).copy(this.placed));
27375
27426
  }
27376
27427
  get depth() {
27377
27428
  return this.frontier.length - 1;
@@ -27428,7 +27479,7 @@ var Fitter = class {
27428
27479
  let first2 = fragment.firstChild;
27429
27480
  for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {
27430
27481
  let { type, match } = this.frontier[frontierDepth], wrap2, inject = null;
27431
- if (pass == 1 && (first2 ? match.matchType(first2.type) || (inject = match.fillBefore(Fragment19.from(first2), false)) : parent && type.compatibleContent(parent.type)))
27482
+ if (pass == 1 && (first2 ? match.matchType(first2.type) || (inject = match.fillBefore(Fragment18.from(first2), false)) : parent && type.compatibleContent(parent.type)))
27432
27483
  return { sliceDepth, frontierDepth, parent, inject };
27433
27484
  else if (pass == 2 && first2 && (wrap2 = match.findWrapping(first2.type)))
27434
27485
  return { sliceDepth, frontierDepth, parent, wrap: wrap2 };
@@ -27488,7 +27539,7 @@ var Fitter = class {
27488
27539
  let toEnd = taken == fragment.childCount;
27489
27540
  if (!toEnd)
27490
27541
  openEndCount = -1;
27491
- this.placed = addToFragment(this.placed, frontierDepth, Fragment19.from(add));
27542
+ this.placed = addToFragment(this.placed, frontierDepth, Fragment18.from(add));
27492
27543
  this.frontier[frontierDepth].match = match;
27493
27544
  if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)
27494
27545
  this.closeFrontierNode();
@@ -27545,12 +27596,12 @@ var Fitter = class {
27545
27596
  openFrontierNode(type, attrs = null, content) {
27546
27597
  let top = this.frontier[this.depth];
27547
27598
  top.match = top.match.matchType(type);
27548
- this.placed = addToFragment(this.placed, this.depth, Fragment19.from(type.create(attrs, content)));
27599
+ this.placed = addToFragment(this.placed, this.depth, Fragment18.from(type.create(attrs, content)));
27549
27600
  this.frontier.push({ type, match: type.contentMatch });
27550
27601
  }
27551
27602
  closeFrontierNode() {
27552
27603
  let open = this.frontier.pop();
27553
- let add = open.match.fillBefore(Fragment19.empty, true);
27604
+ let add = open.match.fillBefore(Fragment18.empty, true);
27554
27605
  if (add.childCount)
27555
27606
  this.placed = addToFragment(this.placed, this.frontier.length, add);
27556
27607
  }
@@ -27579,7 +27630,7 @@ function closeNodeStart(node, openStart, openEnd) {
27579
27630
  if (openStart > 0) {
27580
27631
  frag = node.type.contentMatch.fillBefore(frag).append(frag);
27581
27632
  if (openEnd <= 0)
27582
- frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment19.empty, true));
27633
+ frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment18.empty, true));
27583
27634
  }
27584
27635
  return node.copy(frag);
27585
27636
  }
@@ -27671,7 +27722,7 @@ function closeFragment(fragment, depth, oldOpen, newOpen, parent) {
27671
27722
  if (depth > newOpen) {
27672
27723
  let match = parent.contentMatchAt(0);
27673
27724
  let start = match.fillBefore(fragment).append(fragment);
27674
- fragment = start.append(match.matchFragment(start).fillBefore(Fragment19.empty, true));
27725
+ fragment = start.append(match.matchFragment(start).fillBefore(Fragment18.empty, true));
27675
27726
  }
27676
27727
  return fragment;
27677
27728
  }
@@ -27681,7 +27732,7 @@ function replaceRangeWith(tr2, from2, to, node) {
27681
27732
  if (point != null)
27682
27733
  from2 = to = point;
27683
27734
  }
27684
- tr2.replaceRange(from2, to, new Slice(Fragment19.from(node), 0, 0));
27735
+ tr2.replaceRange(from2, to, new Slice(Fragment18.from(node), 0, 0));
27685
27736
  }
27686
27737
  function deleteRange(tr2, from2, to) {
27687
27738
  let $from = tr2.doc.resolve(from2), $to = tr2.doc.resolve(to);
@@ -27729,7 +27780,7 @@ var AttrStep = class extends Step {
27729
27780
  attrs[name] = node.attrs[name];
27730
27781
  attrs[this.attr] = this.value;
27731
27782
  let updated = node.type.create(attrs, null, node.marks);
27732
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment19.from(updated), 0, node.isLeaf ? 0 : 1));
27783
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment18.from(updated), 0, node.isLeaf ? 0 : 1));
27733
27784
  }
27734
27785
  getMap() {
27735
27786
  return StepMap.empty;
@@ -27864,7 +27915,7 @@ var Transform = class {
27864
27915
  fragment, node, or array of nodes.
27865
27916
  */
27866
27917
  replaceWith(from2, to, content) {
27867
- return this.replace(from2, to, new Slice(Fragment19.from(content), 0, 0));
27918
+ return this.replace(from2, to, new Slice(Fragment18.from(content), 0, 0));
27868
27919
  }
27869
27920
  /**
27870
27921
  Delete the content between the given positions.
@@ -28366,7 +28417,7 @@ var NodeSelection = class extends Selection {
28366
28417
  return new NodeSelection($pos);
28367
28418
  }
28368
28419
  content() {
28369
- return new Slice(Fragment19.from(this.node), 0, 0);
28420
+ return new Slice(Fragment18.from(this.node), 0, 0);
28370
28421
  }
28371
28422
  eq(other) {
28372
28423
  return other instanceof NodeSelection && other.anchor == this.anchor;
@@ -30188,7 +30239,7 @@ var NodeViewDesc = class extends ViewDesc {
30188
30239
  }
30189
30240
  }
30190
30241
  if (!rule.contentElement)
30191
- rule.getContent = () => Fragment19.empty;
30242
+ rule.getContent = () => Fragment18.empty;
30192
30243
  }
30193
30244
  return rule;
30194
30245
  }
@@ -31507,7 +31558,7 @@ function parseFromClipboard(view, text, html, plainText, $context) {
31507
31558
  text = f(text, inCode || plainText, view);
31508
31559
  });
31509
31560
  if (inCode)
31510
- return text ? new Slice(Fragment19.from(view.state.schema.text(text.replace(/\r\n?/g, "\n"))), 0, 0) : Slice.empty;
31561
+ return text ? new Slice(Fragment18.from(view.state.schema.text(text.replace(/\r\n?/g, "\n"))), 0, 0) : Slice.empty;
31511
31562
  let parsed = view.someProp("clipboardTextParser", (f) => f(text, $context, plainText, view));
31512
31563
  if (parsed) {
31513
31564
  slice2 = parsed;
@@ -31596,13 +31647,13 @@ function normalizeSiblings(fragment, $context) {
31596
31647
  }
31597
31648
  });
31598
31649
  if (result)
31599
- return Fragment19.from(result);
31650
+ return Fragment18.from(result);
31600
31651
  }
31601
31652
  return fragment;
31602
31653
  }
31603
31654
  function withWrappers(node, wrap2, from2 = 0) {
31604
31655
  for (let i = wrap2.length - 1; i >= from2; i--)
31605
- node = wrap2[i].create(null, Fragment19.from(node));
31656
+ node = wrap2[i].create(null, Fragment18.from(node));
31606
31657
  return node;
31607
31658
  }
31608
31659
  function addToSibling(wrap2, lastWrap, node, sibling, depth) {
@@ -31612,14 +31663,14 @@ function addToSibling(wrap2, lastWrap, node, sibling, depth) {
31612
31663
  return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));
31613
31664
  let match = sibling.contentMatchAt(sibling.childCount);
31614
31665
  if (match.matchType(depth == wrap2.length - 1 ? node.type : wrap2[depth + 1]))
31615
- return sibling.copy(sibling.content.append(Fragment19.from(withWrappers(node, wrap2, depth + 1))));
31666
+ return sibling.copy(sibling.content.append(Fragment18.from(withWrappers(node, wrap2, depth + 1))));
31616
31667
  }
31617
31668
  }
31618
31669
  function closeRight(node, depth) {
31619
31670
  if (depth == 0)
31620
31671
  return node;
31621
31672
  let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));
31622
- let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment19.empty, true);
31673
+ let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment18.empty, true);
31623
31674
  return node.copy(fragment.append(fill));
31624
31675
  }
31625
31676
  function closeRange(fragment, side, from2, to, depth, openEnd) {
@@ -31629,7 +31680,7 @@ function closeRange(fragment, side, from2, to, depth, openEnd) {
31629
31680
  if (depth < to - 1)
31630
31681
  inner = closeRange(inner, side, from2, to, depth + 1, openEnd);
31631
31682
  if (depth >= from2)
31632
- inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment19.empty, true));
31683
+ inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment18.empty, true));
31633
31684
  return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));
31634
31685
  }
31635
31686
  function closeSlice(slice2, openStart, openEnd) {
@@ -31699,7 +31750,7 @@ function addContext(slice2, context) {
31699
31750
  let type = schema.nodes[array[i]];
31700
31751
  if (!type || type.hasRequiredAttrs())
31701
31752
  break;
31702
- content = Fragment19.from(type.create(array[i + 1], content));
31753
+ content = Fragment18.from(type.create(array[i + 1], content));
31703
31754
  openStart++;
31704
31755
  openEnd++;
31705
31756
  }
@@ -33560,7 +33611,7 @@ function isMarkChange(cur, prev) {
33560
33611
  let updated = [];
33561
33612
  for (let i = 0; i < prev.childCount; i++)
33562
33613
  updated.push(update(prev.child(i)));
33563
- if (Fragment19.from(updated).eq(cur))
33614
+ if (Fragment18.from(updated).eq(cur))
33564
33615
  return { mark, type };
33565
33616
  }
33566
33617
  function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
@@ -34670,10 +34721,10 @@ function deleteBarrier(state, $cut, dispatch2, dir) {
34670
34721
  let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);
34671
34722
  if (canDelAfter && (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match.matchType(conn[0] || after.type).validEnd) {
34672
34723
  if (dispatch2) {
34673
- let end = $cut.pos + after.nodeSize, wrap2 = Fragment19.empty;
34724
+ let end = $cut.pos + after.nodeSize, wrap2 = Fragment18.empty;
34674
34725
  for (let i = conn.length - 1; i >= 0; i--)
34675
- wrap2 = Fragment19.from(conn[i].create(null, wrap2));
34676
- wrap2 = Fragment19.from(before.copy(wrap2));
34726
+ wrap2 = Fragment18.from(conn[i].create(null, wrap2));
34727
+ wrap2 = Fragment18.from(before.copy(wrap2));
34677
34728
  let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
34678
34729
  let $joinAt = tr2.doc.resolve(end + 2 * conn.length);
34679
34730
  if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr2.doc, $joinAt.pos))
@@ -34702,9 +34753,9 @@ function deleteBarrier(state, $cut, dispatch2, dir) {
34702
34753
  afterDepth++;
34703
34754
  if (at2.canReplace(at2.childCount, at2.childCount, afterText.content)) {
34704
34755
  if (dispatch2) {
34705
- let end = Fragment19.empty;
34756
+ let end = Fragment18.empty;
34706
34757
  for (let i = wrap2.length - 1; i >= 0; i--)
34707
- end = Fragment19.from(wrap2[i].copy(end));
34758
+ end = Fragment18.from(wrap2[i].copy(end));
34708
34759
  let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
34709
34760
  dispatch2(tr2.scrollIntoView());
34710
34761
  }
@@ -34809,9 +34860,9 @@ function wrapRangeInList(tr2, range, listType, attrs = null) {
34809
34860
  return true;
34810
34861
  }
34811
34862
  function doWrapInList(tr2, range, wrappers, joinBefore, listType) {
34812
- let content = Fragment19.empty;
34863
+ let content = Fragment18.empty;
34813
34864
  for (let i = wrappers.length - 1; i >= 0; i--)
34814
- content = Fragment19.from(wrappers[i].type.create(wrappers[i].attrs, content));
34865
+ content = Fragment18.from(wrappers[i].type.create(wrappers[i].attrs, content));
34815
34866
  tr2.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice(content, 0, 0), wrappers.length, true));
34816
34867
  let found2 = 0;
34817
34868
  for (let i = 0; i < wrappers.length; i++)
@@ -34845,7 +34896,7 @@ function liftListItem(itemType) {
34845
34896
  function liftToOuterList(state, dispatch2, itemType, range) {
34846
34897
  let tr2 = state.tr, end = range.end, endOfList = range.$to.end(range.depth);
34847
34898
  if (end < endOfList) {
34848
- tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment19.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
34899
+ tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment18.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
34849
34900
  range = new NodeRange(tr2.doc.resolve(range.$from.pos), tr2.doc.resolve(endOfList), range.depth);
34850
34901
  }
34851
34902
  const target = liftTarget(range);
@@ -34869,10 +34920,10 @@ function liftOutOfList(state, dispatch2, range) {
34869
34920
  return false;
34870
34921
  let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;
34871
34922
  let parent = $start.node(-1), indexBefore = $start.index(-1);
34872
- if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment19.empty : Fragment19.from(list))))
34923
+ if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment18.empty : Fragment18.from(list))))
34873
34924
  return false;
34874
34925
  let start = $start.pos, end = start + item.nodeSize;
34875
- tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment19.empty : Fragment19.from(list.copy(Fragment19.empty))).append(atEnd ? Fragment19.empty : Fragment19.from(list.copy(Fragment19.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
34926
+ tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment18.empty : Fragment18.from(list.copy(Fragment18.empty))).append(atEnd ? Fragment18.empty : Fragment18.from(list.copy(Fragment18.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
34876
34927
  dispatch2(tr2.scrollIntoView());
34877
34928
  return true;
34878
34929
  }
@@ -34890,8 +34941,8 @@ function sinkListItem(itemType) {
34890
34941
  return false;
34891
34942
  if (dispatch2) {
34892
34943
  let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;
34893
- let inner = Fragment19.from(nestedBefore ? itemType.create() : null);
34894
- let slice2 = new Slice(Fragment19.from(itemType.create(null, Fragment19.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
34944
+ let inner = Fragment18.from(nestedBefore ? itemType.create() : null);
34945
+ let slice2 = new Slice(Fragment18.from(itemType.create(null, Fragment18.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
34895
34946
  let before = range.start, after = range.end;
34896
34947
  dispatch2(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
34897
34948
  }
@@ -35109,7 +35160,7 @@ function elementFromString(value) {
35109
35160
  return removeWhitespaces(html);
35110
35161
  }
35111
35162
  function createNodeFromContent(content, schema, options) {
35112
- if (content instanceof Node2 || content instanceof Fragment19) {
35163
+ if (content instanceof Node2 || content instanceof Fragment18) {
35113
35164
  return content;
35114
35165
  }
35115
35166
  options = {
@@ -35123,7 +35174,7 @@ function createNodeFromContent(content, schema, options) {
35123
35174
  try {
35124
35175
  const isArrayContent = Array.isArray(content) && content.length > 0;
35125
35176
  if (isArrayContent) {
35126
- return Fragment19.fromArray(content.map((item) => schema.nodeFromJSON(item)));
35177
+ return Fragment18.fromArray(content.map((item) => schema.nodeFromJSON(item)));
35127
35178
  }
35128
35179
  const node = schema.nodeFromJSON(content);
35129
35180
  if (options.errorOnInvalidContent) {
@@ -36261,7 +36312,7 @@ function inputRulesPlugin(props) {
36261
36312
  if (typeof text === "string") {
36262
36313
  text = text;
36263
36314
  } else {
36264
- text = getHTMLFromFragment(Fragment19.from(text), state.schema);
36315
+ text = getHTMLFromFragment(Fragment18.from(text), state.schema);
36265
36316
  }
36266
36317
  const { from: from2 } = simulatedInputMeta;
36267
36318
  const to = from2 + text.length;
@@ -36644,7 +36695,7 @@ function pasteRulesPlugin(props) {
36644
36695
  if (typeof text === "string") {
36645
36696
  text = text;
36646
36697
  } else {
36647
- text = getHTMLFromFragment(Fragment19.from(text), state.schema);
36698
+ text = getHTMLFromFragment(Fragment18.from(text), state.schema);
36648
36699
  }
36649
36700
  const { from: from22 } = simulatedPasteMeta;
36650
36701
  const to2 = from22 + text.length;
@@ -37301,7 +37352,7 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch: dispat
37301
37352
  if (isOnlyTextContent) {
37302
37353
  if (Array.isArray(value)) {
37303
37354
  newContent = value.map((v) => v.text || "").join("");
37304
- } else if (value instanceof Fragment19) {
37355
+ } else if (value instanceof Fragment18) {
37305
37356
  let text = "";
37306
37357
  value.forEach((node) => {
37307
37358
  if (node.text) {
@@ -37771,10 +37822,10 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
37771
37822
  return false;
37772
37823
  }
37773
37824
  if (dispatch2) {
37774
- let wrap2 = Fragment19.empty;
37825
+ let wrap2 = Fragment18.empty;
37775
37826
  const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;
37776
37827
  for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) {
37777
- wrap2 = Fragment19.from($from.node(d).copy(wrap2));
37828
+ wrap2 = Fragment18.from($from.node(d).copy(wrap2));
37778
37829
  }
37779
37830
  const depthAfter = (
37780
37831
  // eslint-disable-next-line no-nested-ternary
@@ -37785,7 +37836,7 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
37785
37836
  ...overrideAttrs
37786
37837
  };
37787
37838
  const nextType2 = ((_a2 = type.contentMatch.defaultType) == null ? void 0 : _a2.createAndFill(newNextTypeAttributes2)) || void 0;
37788
- wrap2 = wrap2.append(Fragment19.from(type.createAndFill(null, nextType2) || void 0));
37839
+ wrap2 = wrap2.append(Fragment18.from(type.createAndFill(null, nextType2) || void 0));
37789
37840
  const start = $from.before($from.depth - (depthBefore - 1));
37790
37841
  tr2.replace(start, $from.after(-depthAfter), new Slice(wrap2, 4 - depthBefore, 0));
37791
37842
  let sel = -1;
@@ -43336,9 +43387,9 @@ function beforeinput(view, event) {
43336
43387
  let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
43337
43388
  if (!insert)
43338
43389
  return false;
43339
- let frag = Fragment19.empty;
43390
+ let frag = Fragment18.empty;
43340
43391
  for (let i = insert.length - 1; i >= 0; i--)
43341
- frag = Fragment19.from(insert[i].createAndFill(null, frag));
43392
+ frag = Fragment18.from(insert[i].createAndFill(null, frag));
43342
43393
  let tr2 = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));
43343
43394
  tr2.setSelection(TextSelection.near(tr2.doc.resolve($from.pos + 1)));
43344
43395
  view.dispatch(tr2);
@@ -45018,10 +45069,10 @@ var CellSelection = class _CellSelection extends Selection {
45018
45069
  }
45019
45070
  rowContent.push(cell);
45020
45071
  }
45021
- rows.push(table.child(row).copy(Fragment19.from(rowContent)));
45072
+ rows.push(table.child(row).copy(Fragment18.from(rowContent)));
45022
45073
  }
45023
45074
  const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
45024
- return new Slice(Fragment19.from(fragment), 1, 1);
45075
+ return new Slice(Fragment18.from(fragment), 1, 1);
45025
45076
  }
45026
45077
  replace(tr2, content = Slice.empty) {
45027
45078
  const mapFrom = tr2.steps.length, ranges = this.ranges;
@@ -45041,7 +45092,7 @@ var CellSelection = class _CellSelection extends Selection {
45041
45092
  tr2.setSelection(sel);
45042
45093
  }
45043
45094
  replaceWith(tr2, node) {
45044
- this.replace(tr2, new Slice(Fragment19.from(node), 0, 0));
45095
+ this.replace(tr2, new Slice(Fragment18.from(node), 0, 0));
45045
45096
  }
45046
45097
  forEachCell(f) {
45047
45098
  const table = this.$anchorCell.node(-1);
@@ -45589,7 +45640,7 @@ function mergeCells(state, dispatch2) {
45589
45640
  if (dispatch2) {
45590
45641
  const tr2 = state.tr;
45591
45642
  const seen = {};
45592
- let content = Fragment19.empty;
45643
+ let content = Fragment18.empty;
45593
45644
  let mergedPos;
45594
45645
  let mergedCell;
45595
45646
  for (let row = rect.top; row < rect.bottom; row++) {
@@ -45970,14 +46021,14 @@ function ensureRectangular(schema, rows) {
45970
46021
  width = Math.max(width, widths[r2]);
45971
46022
  for (let r2 = 0; r2 < widths.length; r2++) {
45972
46023
  if (r2 >= rows.length)
45973
- rows.push(Fragment19.empty);
46024
+ rows.push(Fragment18.empty);
45974
46025
  if (widths[r2] < width) {
45975
46026
  const empty2 = tableNodeTypes(schema).cell.createAndFill();
45976
46027
  const cells = [];
45977
46028
  for (let i = widths[r2]; i < width; i++) {
45978
46029
  cells.push(empty2);
45979
46030
  }
45980
- rows[r2] = rows[r2].append(Fragment19.from(cells));
46031
+ rows[r2] = rows[r2].append(Fragment18.from(cells));
45981
46032
  }
45982
46033
  }
45983
46034
  return { height: rows.length, width, rows };
@@ -46009,7 +46060,7 @@ function clipCells({ width, height, rows }, newWidth, newHeight) {
46009
46060
  for (let j = 1; j < cell.attrs.rowspan; j++)
46010
46061
  added[row + j] = (added[row + j] || 0) + cell.attrs.colspan;
46011
46062
  }
46012
- newRows.push(Fragment19.from(cells));
46063
+ newRows.push(Fragment18.from(cells));
46013
46064
  }
46014
46065
  rows = newRows;
46015
46066
  width = newWidth;
@@ -46030,7 +46081,7 @@ function clipCells({ width, height, rows }, newWidth, newHeight) {
46030
46081
  );
46031
46082
  cells.push(cell);
46032
46083
  }
46033
- newRows.push(Fragment19.from(cells));
46084
+ newRows.push(Fragment18.from(cells));
46034
46085
  }
46035
46086
  rows = newRows;
46036
46087
  height = newHeight;
@@ -46065,7 +46116,7 @@ function growTable(tr2, map2, table, start, width, height, mapFrom) {
46065
46116
  header ? emptyHead || (emptyHead = types.header_cell.createAndFill()) : empty2 || (empty2 = types.cell.createAndFill())
46066
46117
  );
46067
46118
  }
46068
- const emptyRow = types.row.create(null, Fragment19.from(cells)), rows = [];
46119
+ const emptyRow = types.row.create(null, Fragment18.from(cells)), rows = [];
46069
46120
  for (let i = map2.height; i < height; i++)
46070
46121
  rows.push(emptyRow);
46071
46122
  tr2.insert(tr2.mapping.slice(mapFrom).map(start + table.nodeSize - 2), rows);
@@ -46274,7 +46325,7 @@ function handlePaste(view, _2, slice2) {
46274
46325
  width: 1,
46275
46326
  height: 1,
46276
46327
  rows: [
46277
- Fragment19.from(
46328
+ Fragment18.from(
46278
46329
  fitSlice(tableNodeTypes(view.state.schema).cell, slice2)
46279
46330
  )
46280
46331
  ]