@ni/nimble-components 32.6.1 → 32.7.1

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.
@@ -18421,7 +18421,7 @@
18421
18421
  };
18422
18422
  const floppyDiskPen16X16 = {
18423
18423
  name: 'floppy_disk_pen_16_x_16',
18424
- data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7.17 11.108 7.299 11H7V9H5v2H4V8h6v.696l1.626-1.386c.107-.09.228-.155.355-.206L12 3.546c0-.33-.215-.546-.545-.546H2.583A.585.585 0 0 0 2 3.598V10.5l1.5 1.497 3.136.001zM3 7V4h8v3z" class="cls-2"/><path d="M12.275 8.07c.218-.185.693-.008 1.205.552s.635 1.038.418 1.223l-.92.784-1.621-1.775zm-4.92 6.113 1.98-.899-.985.164.043-.94-.32.161.104-.652-1.17 1.786zm2.212-.645L6 15l1.945-3.236 2.1-1.791 1.622 1.774zm2.862-2.49-1.622-1.774c-.118-.13.148-.349.262-.224l1.623 1.775c.117.128-.15.348-.263.224m-.522.452-1.622-1.775c-.118-.129.148-.349.262-.223l1.623 1.774c.117.128-.15.348-.263.224" class="cls-1"/></svg>`,
18424
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7.803 11H7V9H5v2H4V8h6v.617l1.469-1.471q.227-.224.514-.347L12 3.546c0-.33-.215-.546-.545-.546H2.583A.585.585 0 0 0 2 3.598V10.5l1.5 1.497L7.372 12zM3 7V4h8v3zm11.166 1.935L13.09 7.859a.64.64 0 0 0-.908 0l-3.388 3.393-1.503 3.483 3.487-1.5 3.388-3.392a.64.64 0 0 0 0-.908m-5.683 4.803-.198-.199.916-2.116.34 1.06 1.058.35z" class="cls-1"/></svg>`,
18425
18425
  };
18426
18426
  const floppyDiskStarArrowRight16X16 = {
18427
18427
  name: 'floppy_disk_star_arrow_right_16_x_16',
@@ -18519,6 +18519,10 @@
18519
18519
  name: 'layer_group_16_x_16',
18520
18520
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m3.555 9.546.89-.445 5.333 2.667 1.778-.89.889.449v1.33L9.778 13.99l-6.223-3.11Zm0-6.222L6.222 1.99l6.223 3.112v1.333L9.778 7.768l-6.223-3.11Zm0 3.11.89-.444 5.333 2.667 1.778-.89.889.448v1.33L9.778 10.88 3.555 7.768Z" class="cls-1"/></svg>`,
18521
18521
  };
18522
+ const lightbulb16X16 = {
18523
+ name: 'lightbulb_16_x_16',
18524
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12 5.53C12 3.584 10.206 2 8 2S4 3.583 4 5.53c0 .736.256 1.44.74 2.04.801.99 1.285 2.456 1.555 3.427h3.41c.27-.97.754-2.437 1.556-3.428.483-.598.739-1.303.739-2.038M9.138 14H6.862l-.569-1.001v-.3l.285-.15-.285-.15v-.401h3.414v.4l-.285.15.285.15V13z" class="cls-1"/></svg>`,
18525
+ };
18522
18526
  const lightningBolt16X16 = {
18523
18527
  name: 'lightning_bolt_16_x_16',
18524
18528
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.732 7.953 6.909 2h3.636L8.364 7.013h2.909L4.727 14l2.21-6.049Z" class="cls-1"/></svg>`,
@@ -18555,6 +18559,10 @@
18555
18559
  name: 'markdown_16_x_16',
18556
18560
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M14.25 3H1.75a.74.74 0 0 0-.75.73v8.54a.74.74 0 0 0 .75.73h12.5a.74.74 0 0 0 .75-.73V3.73a.74.74 0 0 0-.75-.73m-6.285 7.059h-.991V7.773L5.982 9.35l-.99-1.577v2.286H4V5.934h.91L5.982 7.51l1.073-1.576h.91Zm2.459.007L8.848 7.945h1.1V5.934h.99v2.01H12Z" class="cls-1"/></svg>`,
18557
18561
  };
18562
+ const microphone16X16 = {
18563
+ name: 'microphone_16_x_16',
18564
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6 8V4a2 2 0 1 1 4 0v4a2 2 0 0 1-4 0m6 0v-.5a.5.5 0 1 0-1 0V8a3 3 0 1 1-6 0v-.5a.5.5 0 1 0-1 0V8c0 1.859 1.28 3.411 3 3.858V14h2v-2.142c1.72-.447 3-2 3-3.858" class="cls-1"/><path d="M6 8V4a2 2 0 1 1 4 0v4a2 2 0 0 1-4 0m6 0v-.5a.5.5 0 1 0-1 0V8a3 3 0 1 1-6 0v-.5a.5.5 0 1 0-1 0V8c0 1.859 1.28 3.411 3 3.858V14h2v-2.142c1.72-.447 3-2 3-3.858" class="cls-1"/></svg>`,
18565
+ };
18558
18566
  const minus16X16 = {
18559
18567
  name: 'minus_16_x_16',
18560
18568
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 7h8v2H4z" class="cls-1"/></svg>`,
@@ -18567,6 +18575,10 @@
18567
18575
  name: 'mobile_16_x_16',
18568
18576
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M10.462 2.077H4.538A.54.54 0 0 0 4 2.615v10.77a.54.54 0 0 0 .538.538h5.924a.54.54 0 0 0 .538-.538V2.615a.54.54 0 0 0-.538-.538M10 12H5V3h5Z" class="cls-1"/></svg>`,
18569
18577
  };
18578
+ const mountainSun16X16 = {
18579
+ name: 'mountain_sun_16_x_16',
18580
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m13.457 10.097-1.468-3.011-1.195-1.026-.677.48-2.343-3.556L4.688 8.14l-1.204-.678-1.468 1.543L1 13h14zm-10.478-.2-.939 1.047.372-1.652.975-.993 2.722 3.04zm5.924.764L7.181 9.335l.17-1.958-2.192.896L7.605 4.19 9.4 7.06l-.11.943 1.197-1.038 2.228 4.345zM4.5 4.487a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" class="cls-1"/></svg>`,
18581
+ };
18570
18582
  const ni16X16 = {
18571
18583
  name: 'ni_16_x_16',
18572
18584
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7.172 4c1.675 0 3 1.354 3 3.103V13h-3V7h-3V4zm-3 9h-3V7h3zm10.656-9v9c-1.681 0-3-1.378-3-3V4z" class="cls-1"/></svg>`,
@@ -18587,6 +18599,14 @@
18587
18599
  name: 'outward_squares_three_16_x_16',
18588
18600
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M9 9H7V7h2zm-6 4h4V9H3zM3 3v4h2V5h6v6H9v2h4V3zm7 3H9v1h1z" class="cls-1"/></svg>`,
18589
18601
  };
18602
+ const paperPlane16X16 = {
18603
+ name: 'paper_plane_16_x_16',
18604
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m1 12.5 2-4 6-1-6-1-2-4 14 5z" class="cls-1"/></svg>`,
18605
+ };
18606
+ const paperclip16X16 = {
18607
+ name: 'paperclip_16_x_16',
18608
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8.5 14C6.406 14 5 12.393 5 10V5c0-1.822.981-3 2.5-3S10 3.178 10 5v3.98c0 1.328-.505 2-1.5 2s-1.5-.672-1.5-2V6h1v2.98c0 1 .266 1 .5 1s.5 0 .5-1V5c0-.602-.146-2-1.5-2S6 4.398 6 5v5c0 1.384.654 3 2.5 3s2.5-1.616 2.5-3V6h1v4c0 2.393-1.406 4-3.5 4"/></svg>`,
18609
+ };
18590
18610
  const paste16X16 = {
18591
18611
  name: 'paste_16_x_16',
18592
18612
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M9 5V3H3v6h2v1H2V2h8v3ZM6 6v8h8V6Z" class="cls-1"/></svg>`,
@@ -18597,7 +18617,7 @@
18597
18617
  };
18598
18618
  const pencil16X16 = {
18599
18619
  name: 'pencil_16_x_16',
18600
- data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M11.413 2.674c.326-.288 1.04-.013 1.807.857.768.869.952 1.61.626 1.898l-1.378 1.218-2.433-2.757Zm-7.381 9.493 2.97-1.396-1.477.254.064-1.459-.48.25.156-1.013-1.754 2.774Zm3.319-1.002L2 13.435 4.917 8.41l3.15-2.78L10.5 8.383Zm4.293-3.866L9.21 4.544c-.177-.202.222-.543.394-.349l2.434 2.756c.175.2-.224.54-.394.348m-.783.7L8.428 5.244c-.178-.201.22-.542.393-.347l2.433 2.755c.176.199-.223.54-.393.347" class="cls-1"/></svg>`,
18620
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M10.118 2.793 4.84 8.076 2.5 13.5l5.43-2.335 5.278-5.284a1 1 0 0 0-.001-1.414l-1.675-1.674a1 1 0 0 0-1.414 0m-5.76 9.154-.31-.309 1.427-3.296.53 1.652 1.648.543z" class="cls-1"/></svg>`,
18601
18621
  };
18602
18622
  const play = {
18603
18623
  name: 'play',
@@ -18615,6 +18635,10 @@
18615
18635
  name: 'rectangle_check_lines_16_x_16',
18616
18636
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 2v12h10V2zm9 11H4V3h8z" class="cls-2"/><path d="M5 9h6v1H5zM5 11h3v1H5z" class="cls-2"/><path d="M11 4.643 7.591 8 6 6.434l.682-.672.937.923L10.347 4z" class="cls-1"/></svg>`,
18617
18637
  };
18638
+ const rectangleLines16X16 = {
18639
+ name: 'rectangle_lines_16_x_16',
18640
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 2v11h10V2zm6 7H5V8h4zm2-2H5V6h6zm0-2H5V4h6z" class="cls-1"/></svg>`,
18641
+ };
18618
18642
  const runningArrow16X16 = {
18619
18643
  name: 'running_arrow_16_x_16',
18620
18644
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m13.45 7.985-7.602 4.013L7.75 8 5.848 3.987zM3.945 2.997 2.05 2 4.9 8l-2.85 6 1.902-1.005L6.325 8z" class="cls-1"/></svg>`,
@@ -18679,6 +18703,10 @@
18679
18703
  name: 'square_x_16_x_16',
18680
18704
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 3v10h10V3zm8 7.01-.99.99L8 8.99 5.99 11 5 10.01 7.01 8 5 5.99 5.99 5 8 7.01 10.01 5l.99.99L8.99 8z" class="cls-1"/></svg>`,
18681
18705
  };
18706
+ const star8Point16X16 = {
18707
+ name: 'star_8_point_16_x_16',
18708
+ data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M10.756 6.872 15 8.002 10.754 9.13l1.722 3.335-3.31-1.74L8.046 15l-1.118-4.276-3.312 1.736 1.727-3.332L1 7.996 5.343 6.87 3.621 3.535l3.308 1.74L8.052 1l1.12 4.276 3.31-1.734z" class="cls-1"/></svg>`,
18709
+ };
18682
18710
  const stopSquare16X16 = {
18683
18711
  name: 'stop_square_16_x_16',
18684
18712
  data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 3h10v10H3z" class="cls-1"/></svg>`,
@@ -23881,6 +23909,18 @@ so this becomes the fallback color for the slot */ ''}
23881
23909
  }
23882
23910
  registerIcon('icon-layer-group', IconLayerGroup);
23883
23911
 
23912
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
23913
+ // See generation source in nimble-components/build/generate-icons
23914
+ /**
23915
+ * The icon component for the 'lightbulb' icon
23916
+ */
23917
+ class IconLightbulb extends Icon {
23918
+ constructor() {
23919
+ super(lightbulb16X16);
23920
+ }
23921
+ }
23922
+ registerIcon('icon-lightbulb', IconLightbulb);
23923
+
23884
23924
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
23885
23925
  // See generation source in nimble-components/build/generate-icons
23886
23926
  /**
@@ -23991,6 +24031,18 @@ so this becomes the fallback color for the slot */ ''}
23991
24031
  }
23992
24032
  registerIcon('icon-markdown', IconMarkdown);
23993
24033
 
24034
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24035
+ // See generation source in nimble-components/build/generate-icons
24036
+ /**
24037
+ * The icon component for the 'microphone' icon
24038
+ */
24039
+ class IconMicrophone extends Icon {
24040
+ constructor() {
24041
+ super(microphone16X16);
24042
+ }
24043
+ }
24044
+ registerIcon('icon-microphone', IconMicrophone);
24045
+
23994
24046
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
23995
24047
  // See generation source in nimble-components/build/generate-icons
23996
24048
  /**
@@ -24028,6 +24080,18 @@ so this becomes the fallback color for the slot */ ''}
24028
24080
  }
24029
24081
  registerIcon('icon-mobile', IconMobile);
24030
24082
 
24083
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24084
+ // See generation source in nimble-components/build/generate-icons
24085
+ /**
24086
+ * The icon component for the 'mountainSun' icon
24087
+ */
24088
+ class IconMountainSun extends Icon {
24089
+ constructor() {
24090
+ super(mountainSun16X16);
24091
+ }
24092
+ }
24093
+ registerIcon('icon-mountain-sun', IconMountainSun);
24094
+
24031
24095
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24032
24096
  // See generation source in nimble-components/build/generate-icons
24033
24097
  /**
@@ -24089,6 +24153,30 @@ so this becomes the fallback color for the slot */ ''}
24089
24153
  }
24090
24154
  registerIcon('icon-outward-squares-three', IconOutwardSquaresThree);
24091
24155
 
24156
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24157
+ // See generation source in nimble-components/build/generate-icons
24158
+ /**
24159
+ * The icon component for the 'paperPlane' icon
24160
+ */
24161
+ class IconPaperPlane extends Icon {
24162
+ constructor() {
24163
+ super(paperPlane16X16);
24164
+ }
24165
+ }
24166
+ registerIcon('icon-paper-plane', IconPaperPlane);
24167
+
24168
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24169
+ // See generation source in nimble-components/build/generate-icons
24170
+ /**
24171
+ * The icon component for the 'paperclip' icon
24172
+ */
24173
+ class IconPaperclip extends Icon {
24174
+ constructor() {
24175
+ super(paperclip16X16);
24176
+ }
24177
+ }
24178
+ registerIcon('icon-paperclip', IconPaperclip);
24179
+
24092
24180
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24093
24181
  // See generation source in nimble-components/build/generate-icons
24094
24182
  /**
@@ -24173,6 +24261,18 @@ so this becomes the fallback color for the slot */ ''}
24173
24261
  }
24174
24262
  registerIcon('icon-rectangle-check-lines', IconRectangleCheckLines);
24175
24263
 
24264
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24265
+ // See generation source in nimble-components/build/generate-icons
24266
+ /**
24267
+ * The icon component for the 'rectangleLines' icon
24268
+ */
24269
+ class IconRectangleLines extends Icon {
24270
+ constructor() {
24271
+ super(rectangleLines16X16);
24272
+ }
24273
+ }
24274
+ registerIcon('icon-rectangle-lines', IconRectangleLines);
24275
+
24176
24276
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24177
24277
  // See generation source in nimble-components/build/generate-icons
24178
24278
  /**
@@ -24365,6 +24465,18 @@ so this becomes the fallback color for the slot */ ''}
24365
24465
  }
24366
24466
  registerIcon('icon-square-x', IconSquareX);
24367
24467
 
24468
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24469
+ // See generation source in nimble-components/build/generate-icons
24470
+ /**
24471
+ * The icon component for the 'star8Point' icon
24472
+ */
24473
+ class IconStar8Point extends Icon {
24474
+ constructor() {
24475
+ super(star8Point16X16);
24476
+ }
24477
+ }
24478
+ registerIcon('icon-star-8-point', IconStar8Point);
24479
+
24368
24480
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
24369
24481
  // See generation source in nimble-components/build/generate-icons
24370
24482
  /**
@@ -31636,8 +31748,24 @@ so this becomes the fallback color for the slot */ ''}
31636
31748
  return joinable($pos.nodeBefore, $pos.nodeAfter) &&
31637
31749
  $pos.parent.canReplace(index, index + 1);
31638
31750
  }
31751
+ function canAppendWithSubstitutedLinebreaks(a, b) {
31752
+ if (!b.content.size)
31753
+ a.type.compatibleContent(b.type);
31754
+ let match = a.contentMatchAt(a.childCount);
31755
+ let { linebreakReplacement } = a.type.schema;
31756
+ for (let i = 0; i < b.childCount; i++) {
31757
+ let child = b.child(i);
31758
+ let type = child.type == linebreakReplacement ? a.type.schema.nodes.text : child.type;
31759
+ match = match.matchType(type);
31760
+ if (!match)
31761
+ return false;
31762
+ if (!a.type.allowsMarks(child.marks))
31763
+ return false;
31764
+ }
31765
+ return match.validEnd;
31766
+ }
31639
31767
  function joinable(a, b) {
31640
- return !!(a && b && !a.isLeaf && a.canAppend(b));
31768
+ return !!(a && b && !a.isLeaf && canAppendWithSubstitutedLinebreaks(a, b));
31641
31769
  }
31642
31770
  /**
31643
31771
  Find an ancestor of the given position that can be joined to the
@@ -31670,8 +31798,31 @@ so this becomes the fallback color for the slot */ ''}
31670
31798
  }
31671
31799
  }
31672
31800
  function join(tr, pos, depth) {
31673
- let step = new ReplaceStep(pos - depth, pos + depth, Slice.empty, true);
31674
- tr.step(step);
31801
+ let convertNewlines = null;
31802
+ let { linebreakReplacement } = tr.doc.type.schema;
31803
+ let $before = tr.doc.resolve(pos - depth), beforeType = $before.node().type;
31804
+ if (linebreakReplacement && beforeType.inlineContent) {
31805
+ let pre = beforeType.whitespace == "pre";
31806
+ let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);
31807
+ if (pre && !supportLinebreak)
31808
+ convertNewlines = false;
31809
+ else if (!pre && supportLinebreak)
31810
+ convertNewlines = true;
31811
+ }
31812
+ let mapFrom = tr.steps.length;
31813
+ if (convertNewlines === false) {
31814
+ let $after = tr.doc.resolve(pos + depth);
31815
+ replaceLinebreaks(tr, $after.node(), $after.before(), mapFrom);
31816
+ }
31817
+ if (beforeType.inlineContent)
31818
+ clearIncompatible(tr, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);
31819
+ let mapping = tr.mapping.slice(mapFrom), start = mapping.map(pos - depth);
31820
+ tr.step(new ReplaceStep(start, mapping.map(pos + depth, -1), Slice.empty, true));
31821
+ if (convertNewlines === true) {
31822
+ let $full = tr.doc.resolve(start);
31823
+ replaceNewlines(tr, $full.node(), $full.before(), tr.steps.length);
31824
+ }
31825
+ return tr;
31675
31826
  }
31676
31827
  /**
31677
31828
  Try to find a point where a node of the given type can be inserted
@@ -32155,7 +32306,8 @@ so this becomes the fallback color for the slot */ ''}
32155
32306
  return tr.delete($from.before(depth), $to.after(depth));
32156
32307
  }
32157
32308
  for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {
32158
- if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d)
32309
+ if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d &&
32310
+ $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1)))
32159
32311
  return tr.delete($from.before(d), to);
32160
32312
  }
32161
32313
  tr.delete(from, to);
@@ -34748,16 +34900,17 @@ so this becomes the fallback color for the slot */ ''}
34748
34900
  // some cases they will be split more often than would appear
34749
34901
  // necessary.
34750
34902
  class MarkViewDesc extends ViewDesc {
34751
- constructor(parent, mark, dom, contentDOM) {
34903
+ constructor(parent, mark, dom, contentDOM, spec) {
34752
34904
  super(parent, [], dom, contentDOM);
34753
34905
  this.mark = mark;
34906
+ this.spec = spec;
34754
34907
  }
34755
34908
  static create(parent, mark, inline, view) {
34756
34909
  let custom = view.nodeViews[mark.type.name];
34757
34910
  let spec = custom && custom(mark, view, inline);
34758
34911
  if (!spec || !spec.dom)
34759
34912
  spec = DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline), null, mark.attrs);
34760
- return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom);
34913
+ return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom, spec);
34761
34914
  }
34762
34915
  parseRule() {
34763
34916
  if ((this.dirty & NODE_DIRTY) || this.mark.type.spec.reparseInView)
@@ -34789,6 +34942,11 @@ so this becomes the fallback color for the slot */ ''}
34789
34942
  copy.children = nodes;
34790
34943
  return copy;
34791
34944
  }
34945
+ destroy() {
34946
+ if (this.spec.destroy)
34947
+ this.spec.destroy();
34948
+ super.destroy();
34949
+ }
34792
34950
  }
34793
34951
  // Node view descs are the main, most common type of view desc, and
34794
34952
  // correspond to an actual node in the document. Unlike mark descs,
@@ -35108,7 +35266,7 @@ so this becomes the fallback color for the slot */ ''}
35108
35266
  update(node, outerDeco, innerDeco, view) {
35109
35267
  if (this.dirty == NODE_DIRTY)
35110
35268
  return false;
35111
- if (this.spec.update) {
35269
+ if (this.spec.update && (this.node.type == node.type || this.spec.multiType)) {
35112
35270
  let result = this.spec.update(node, outerDeco, innerDeco);
35113
35271
  if (result)
35114
35272
  this.updateInner(node, outerDeco, innerDeco, view);
@@ -36509,6 +36667,7 @@ so this becomes the fallback color for the slot */ ''}
36509
36667
  function detachedDoc() {
36510
36668
  return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument("title"));
36511
36669
  }
36670
+ let _policy = null;
36512
36671
  function maybeWrapTrusted(html) {
36513
36672
  let trustedTypes = window.trustedTypes;
36514
36673
  if (!trustedTypes)
@@ -36516,7 +36675,9 @@ so this becomes the fallback color for the slot */ ''}
36516
36675
  // With the require-trusted-types-for CSP, Chrome will block
36517
36676
  // innerHTML, even on a detached document. This wraps the string in
36518
36677
  // a way that makes the browser allow us to use its parser again.
36519
- return trustedTypes.createPolicy("detachedDocument", { createHTML: (s) => s }).createHTML(html);
36678
+ if (!_policy)
36679
+ _policy = trustedTypes.createPolicy("ProseMirrorClipboard", { createHTML: (s) => s });
36680
+ return _policy.createHTML(html);
36520
36681
  }
36521
36682
  function readHTML(html) {
36522
36683
  let metas = /^(\s*<meta [^>]*>)*/.exec(html);
@@ -36667,9 +36828,7 @@ so this becomes the fallback color for the slot */ ''}
36667
36828
  // and handling them eagerly tends to corrupt the input.
36668
36829
  if (android && chrome && event.keyCode == 13)
36669
36830
  return;
36670
- if (view.domObserver.selectionChanged(view.domSelectionRange()))
36671
- view.domObserver.flush();
36672
- else if (event.keyCode != 229)
36831
+ if (event.keyCode != 229)
36673
36832
  view.domObserver.forceFlush();
36674
36833
  // On iOS, if we preventDefault enter key presses, the virtual
36675
36834
  // keyboard gets confused. So the hack here is to set a flag that
@@ -38191,9 +38350,6 @@ so this becomes the fallback color for the slot */ ''}
38191
38350
  this.queue.push(mut);
38192
38351
  return this.queue;
38193
38352
  }
38194
- selectionChanged(sel) {
38195
- return !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(this.view) && !this.ignoreSelectionChange(sel);
38196
- }
38197
38353
  flush() {
38198
38354
  let { view } = this;
38199
38355
  if (!view.docView || this.flushingSoon > -1)
@@ -38201,7 +38357,8 @@ so this becomes the fallback color for the slot */ ''}
38201
38357
  let mutations = this.pendingRecords();
38202
38358
  if (mutations.length)
38203
38359
  this.queue = [];
38204
- let sel = view.domSelectionRange(), newSel = this.selectionChanged(sel);
38360
+ let sel = view.domSelectionRange();
38361
+ let newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(view) && !this.ignoreSelectionChange(sel);
38205
38362
  let from = -1, to = -1, typeOver = false, added = [];
38206
38363
  if (view.editable) {
38207
38364
  for (let i = 0; i < mutations.length; i++) {
@@ -39977,10 +40134,7 @@ so this becomes the fallback color for the slot */ ''}
39977
40134
  if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || canJoin(state.doc, $pos.pos)))
39978
40135
  return false;
39979
40136
  if (dispatch)
39980
- dispatch(state.tr
39981
- .clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount))
39982
- .join($pos.pos)
39983
- .scrollIntoView());
40137
+ dispatch(state.tr.join($pos.pos).scrollIntoView());
39984
40138
  return true;
39985
40139
  }
39986
40140
  function deleteBarrier(state, $cut, dispatch, dir) {
@@ -39998,9 +40152,10 @@ so this becomes the fallback color for the slot */ ''}
39998
40152
  wrap = Fragment.from(conn[i].create(null, wrap));
39999
40153
  wrap = Fragment.from(before.copy(wrap));
40000
40154
  let tr = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap, 1, 0), conn.length, true));
40001
- let joinAt = end + 2 * conn.length;
40002
- if (canJoin(tr.doc, joinAt))
40003
- tr.join(joinAt);
40155
+ let $joinAt = tr.doc.resolve(end + 2 * conn.length);
40156
+ if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type &&
40157
+ canJoin(tr.doc, $joinAt.pos))
40158
+ tr.join($joinAt.pos);
40004
40159
  dispatch(tr.scrollIntoView());
40005
40160
  }
40006
40161
  return true;
@@ -55646,84 +55801,8 @@ img.ProseMirror-separator {
55646
55801
  },
55647
55802
  });
55648
55803
 
55649
- /**
55650
- * This extension allows you to create list items.
55651
- * @see https://www.tiptap.dev/api/nodes/list-item
55652
- */
55653
- const ListItem = Node$1.create({
55654
- name: 'listItem',
55655
- addOptions() {
55656
- return {
55657
- HTMLAttributes: {},
55658
- bulletListTypeName: 'bulletList',
55659
- orderedListTypeName: 'orderedList',
55660
- };
55661
- },
55662
- content: 'paragraph block*',
55663
- defining: true,
55664
- parseHTML() {
55665
- return [
55666
- {
55667
- tag: 'li',
55668
- },
55669
- ];
55670
- },
55671
- renderHTML({ HTMLAttributes }) {
55672
- return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
55673
- },
55674
- addKeyboardShortcuts() {
55675
- return {
55676
- Enter: () => this.editor.commands.splitListItem(this.name),
55677
- Tab: () => this.editor.commands.sinkListItem(this.name),
55678
- 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),
55679
- };
55680
- },
55681
- });
55682
-
55683
- /**
55684
- * This extension allows you to create text styles. It is required by default
55685
- * for the `textColor` and `backgroundColor` extensions.
55686
- * @see https://www.tiptap.dev/api/marks/text-style
55687
- */
55688
- const TextStyle = Mark.create({
55689
- name: 'textStyle',
55690
- priority: 101,
55691
- addOptions() {
55692
- return {
55693
- HTMLAttributes: {},
55694
- };
55695
- },
55696
- parseHTML() {
55697
- return [
55698
- {
55699
- tag: 'span',
55700
- getAttrs: element => {
55701
- const hasStyles = element.hasAttribute('style');
55702
- if (!hasStyles) {
55703
- return false;
55704
- }
55705
- return {};
55706
- },
55707
- },
55708
- ];
55709
- },
55710
- renderHTML({ HTMLAttributes }) {
55711
- return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
55712
- },
55713
- addCommands() {
55714
- return {
55715
- removeEmptyTextStyle: () => ({ state, commands }) => {
55716
- const attributes = getMarkAttributes(state, this.type);
55717
- const hasStyles = Object.entries(attributes).some(([, value]) => !!value);
55718
- if (hasStyles) {
55719
- return true;
55720
- }
55721
- return commands.unsetMark(this.name);
55722
- },
55723
- };
55724
- },
55725
- });
55726
-
55804
+ const ListItemName$1 = 'listItem';
55805
+ const TextStyleName$1 = 'textStyle';
55727
55806
  /**
55728
55807
  * Matches a bullet list to a dash or asterisk.
55729
55808
  */
@@ -55760,7 +55839,7 @@ img.ProseMirror-separator {
55760
55839
  return {
55761
55840
  toggleBulletList: () => ({ commands, chain }) => {
55762
55841
  if (this.options.keepAttributes) {
55763
- return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItem.name, this.editor.getAttributes(TextStyle.name)).run();
55842
+ return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName$1, this.editor.getAttributes(TextStyleName$1)).run();
55764
55843
  }
55765
55844
  return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);
55766
55845
  },
@@ -55782,7 +55861,7 @@ img.ProseMirror-separator {
55782
55861
  type: this.type,
55783
55862
  keepMarks: this.options.keepMarks,
55784
55863
  keepAttributes: this.options.keepAttributes,
55785
- getAttributes: () => { return this.editor.getAttributes(TextStyle.name); },
55864
+ getAttributes: () => { return this.editor.getAttributes(TextStyleName$1); },
55786
55865
  editor: this.editor,
55787
55866
  });
55788
55867
  }
@@ -58644,6 +58723,40 @@ img.ProseMirror-separator {
58644
58723
  },
58645
58724
  });
58646
58725
 
58726
+ /**
58727
+ * This extension allows you to create list items.
58728
+ * @see https://www.tiptap.dev/api/nodes/list-item
58729
+ */
58730
+ const ListItem = Node$1.create({
58731
+ name: 'listItem',
58732
+ addOptions() {
58733
+ return {
58734
+ HTMLAttributes: {},
58735
+ bulletListTypeName: 'bulletList',
58736
+ orderedListTypeName: 'orderedList',
58737
+ };
58738
+ },
58739
+ content: 'paragraph block*',
58740
+ defining: true,
58741
+ parseHTML() {
58742
+ return [
58743
+ {
58744
+ tag: 'li',
58745
+ },
58746
+ ];
58747
+ },
58748
+ renderHTML({ HTMLAttributes }) {
58749
+ return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
58750
+ },
58751
+ addKeyboardShortcuts() {
58752
+ return {
58753
+ Enter: () => this.editor.commands.splitListItem(this.name),
58754
+ Tab: () => this.editor.commands.sinkListItem(this.name),
58755
+ 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),
58756
+ };
58757
+ },
58758
+ });
58759
+
58647
58760
  function findSuggestionMatch(config) {
58648
58761
  var _a;
58649
58762
  const { char, allowSpaces, allowedPrefixes, startOfLine, $position, } = config;
@@ -59050,6 +59163,8 @@ img.ProseMirror-separator {
59050
59163
  },
59051
59164
  });
59052
59165
 
59166
+ const ListItemName = 'listItem';
59167
+ const TextStyleName = 'textStyle';
59053
59168
  /**
59054
59169
  * Matches an ordered list to a 1. on input (or any number followed by a dot).
59055
59170
  */
@@ -59107,7 +59222,7 @@ img.ProseMirror-separator {
59107
59222
  return {
59108
59223
  toggleOrderedList: () => ({ commands, chain }) => {
59109
59224
  if (this.options.keepAttributes) {
59110
- return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItem.name, this.editor.getAttributes(TextStyle.name)).run();
59225
+ return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run();
59111
59226
  }
59112
59227
  return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);
59113
59228
  },
@@ -59131,7 +59246,7 @@ img.ProseMirror-separator {
59131
59246
  type: this.type,
59132
59247
  keepMarks: this.options.keepMarks,
59133
59248
  keepAttributes: this.options.keepAttributes,
59134
- getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyle.name) }),
59249
+ getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),
59135
59250
  joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],
59136
59251
  editor: this.editor,
59137
59252
  });
@@ -67546,7 +67661,7 @@ focus outline in that case.
67546
67661
  return;
67547
67662
  }
67548
67663
  let offset = 0;
67549
- const fallback = supportsScrollend ? () => void 0 : debounce(
67664
+ const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce(
67550
67665
  targetWindow,
67551
67666
  () => {
67552
67667
  cb(offset, false);
@@ -67668,6 +67783,7 @@ focus outline in that case.
67668
67783
  isScrollingResetDelay: 150,
67669
67784
  enabled: true,
67670
67785
  isRtl: false,
67786
+ useScrollendEvent: true,
67671
67787
  ...opts2
67672
67788
  };
67673
67789
  };