strapi-plugin-firebase-authentication 1.2.1 → 1.2.4

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.
@@ -4,7 +4,7 @@ const m = require("react");
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const rt = require("@radix-ui/react-tooltip");
6
6
  const we$1 = require("react-dom");
7
- const index$2 = require("./index-Rervtuh1.js");
7
+ const index$2 = require("./index-ROJyqJld.js");
8
8
  const admin = require("@strapi/strapi/admin");
9
9
  function _interopNamespace(e) {
10
10
  if (e && e.__esModule) return e;
@@ -4080,26 +4080,26 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
4080
4080
  ]);
4081
4081
  return uncontrolledState;
4082
4082
  }
4083
- var getDefaultParent$1 = function(originalTarget) {
4083
+ var getDefaultParent = function(originalTarget) {
4084
4084
  if (typeof document === "undefined") {
4085
4085
  return null;
4086
4086
  }
4087
4087
  var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
4088
4088
  return sampleTarget.ownerDocument.body;
4089
4089
  };
4090
- var counterMap$1 = /* @__PURE__ */ new WeakMap();
4091
- var uncontrolledNodes$1 = /* @__PURE__ */ new WeakMap();
4092
- var markerMap$1 = {};
4093
- var lockCount$1 = 0;
4094
- var unwrapHost$1 = function(node) {
4095
- return node && (node.host || unwrapHost$1(node.parentNode));
4090
+ var counterMap = /* @__PURE__ */ new WeakMap();
4091
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
4092
+ var markerMap = {};
4093
+ var lockCount = 0;
4094
+ var unwrapHost = function(node) {
4095
+ return node && (node.host || unwrapHost(node.parentNode));
4096
4096
  };
4097
- var correctTargets$1 = function(parent, targets) {
4097
+ var correctTargets = function(parent, targets) {
4098
4098
  return targets.map(function(target) {
4099
4099
  if (parent.contains(target)) {
4100
4100
  return target;
4101
4101
  }
4102
- var correctedTarget = unwrapHost$1(target);
4102
+ var correctedTarget = unwrapHost(target);
4103
4103
  if (correctedTarget && parent.contains(correctedTarget)) {
4104
4104
  return correctedTarget;
4105
4105
  }
@@ -4109,12 +4109,12 @@ var correctTargets$1 = function(parent, targets) {
4109
4109
  return Boolean(x);
4110
4110
  });
4111
4111
  };
4112
- var applyAttributeToOthers$1 = function(originalTarget, parentNode, markerName, controlAttribute) {
4113
- var targets = correctTargets$1(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
4114
- if (!markerMap$1[markerName]) {
4115
- markerMap$1[markerName] = /* @__PURE__ */ new WeakMap();
4112
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
4113
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
4114
+ if (!markerMap[markerName]) {
4115
+ markerMap[markerName] = /* @__PURE__ */ new WeakMap();
4116
4116
  }
4117
- var markerCounter = markerMap$1[markerName];
4117
+ var markerCounter = markerMap[markerName];
4118
4118
  var hiddenNodes = [];
4119
4119
  var elementsToKeep = /* @__PURE__ */ new Set();
4120
4120
  var elementsToStop = new Set(targets);
@@ -4137,13 +4137,13 @@ var applyAttributeToOthers$1 = function(originalTarget, parentNode, markerName,
4137
4137
  try {
4138
4138
  var attr = node.getAttribute(controlAttribute);
4139
4139
  var alreadyHidden = attr !== null && attr !== "false";
4140
- var counterValue = (counterMap$1.get(node) || 0) + 1;
4140
+ var counterValue = (counterMap.get(node) || 0) + 1;
4141
4141
  var markerValue = (markerCounter.get(node) || 0) + 1;
4142
- counterMap$1.set(node, counterValue);
4142
+ counterMap.set(node, counterValue);
4143
4143
  markerCounter.set(node, markerValue);
4144
4144
  hiddenNodes.push(node);
4145
4145
  if (counterValue === 1 && alreadyHidden) {
4146
- uncontrolledNodes$1.set(node, true);
4146
+ uncontrolledNodes.set(node, true);
4147
4147
  }
4148
4148
  if (markerValue === 1) {
4149
4149
  node.setAttribute(markerName, "true");
@@ -4159,45 +4159,45 @@ var applyAttributeToOthers$1 = function(originalTarget, parentNode, markerName,
4159
4159
  };
4160
4160
  deep(parentNode);
4161
4161
  elementsToKeep.clear();
4162
- lockCount$1++;
4162
+ lockCount++;
4163
4163
  return function() {
4164
4164
  hiddenNodes.forEach(function(node) {
4165
- var counterValue = counterMap$1.get(node) - 1;
4165
+ var counterValue = counterMap.get(node) - 1;
4166
4166
  var markerValue = markerCounter.get(node) - 1;
4167
- counterMap$1.set(node, counterValue);
4167
+ counterMap.set(node, counterValue);
4168
4168
  markerCounter.set(node, markerValue);
4169
4169
  if (!counterValue) {
4170
- if (!uncontrolledNodes$1.has(node)) {
4170
+ if (!uncontrolledNodes.has(node)) {
4171
4171
  node.removeAttribute(controlAttribute);
4172
4172
  }
4173
- uncontrolledNodes$1.delete(node);
4173
+ uncontrolledNodes.delete(node);
4174
4174
  }
4175
4175
  if (!markerValue) {
4176
4176
  node.removeAttribute(markerName);
4177
4177
  }
4178
4178
  });
4179
- lockCount$1--;
4180
- if (!lockCount$1) {
4181
- counterMap$1 = /* @__PURE__ */ new WeakMap();
4182
- counterMap$1 = /* @__PURE__ */ new WeakMap();
4183
- uncontrolledNodes$1 = /* @__PURE__ */ new WeakMap();
4184
- markerMap$1 = {};
4179
+ lockCount--;
4180
+ if (!lockCount) {
4181
+ counterMap = /* @__PURE__ */ new WeakMap();
4182
+ counterMap = /* @__PURE__ */ new WeakMap();
4183
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
4184
+ markerMap = {};
4185
4185
  }
4186
4186
  };
4187
4187
  };
4188
- var hideOthers$1 = function(originalTarget, parentNode, markerName) {
4188
+ var hideOthers = function(originalTarget, parentNode, markerName) {
4189
4189
  if (markerName === void 0) {
4190
4190
  markerName = "data-aria-hidden";
4191
4191
  }
4192
4192
  var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
4193
- var activeParentNode = getDefaultParent$1(originalTarget);
4193
+ var activeParentNode = getDefaultParent(originalTarget);
4194
4194
  if (!activeParentNode) {
4195
4195
  return function() {
4196
4196
  return null;
4197
4197
  };
4198
4198
  }
4199
4199
  targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live]")));
4200
- return applyAttributeToOthers$1(targets, activeParentNode, markerName, "aria-hidden");
4200
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
4201
4201
  };
4202
4202
  var __assign = function() {
4203
4203
  __assign = Object.assign || function __assign2(t2) {
@@ -6075,7 +6075,7 @@ const to$1 = [" ", "Enter", "ArrowUp", "ArrowDown"], oo$1 = ["Enter"], no = (o)
6075
6075
  return m__namespace.useEffect(() => {
6076
6076
  e !== "both" && W2(null);
6077
6077
  }, [ce, e]), m__namespace.useEffect(() => {
6078
- if (R2 && k) return hideOthers$1([R2, k]);
6078
+ if (R2 && k) return hideOthers([R2, k]);
6079
6079
  }, [R2, k]), /* @__PURE__ */ jsxRuntime.jsx(lo$1, { children: /* @__PURE__ */ jsxRuntime.jsx(
6080
6080
  ro,
6081
6081
  {
@@ -6823,7 +6823,7 @@ const q$1 = 10, [Ft$1, oe] = pe$1(le), Oo$1 = "SelectContentImpl", Lt$1 = m__nam
6823
6823
  ...x
6824
6824
  } = o, p = X$1(le, e), [y, E2] = m__namespace.useState(null), [O2, F] = m__namespace.useState(null), _2 = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(i, (S) => E2(S)), [k, Z] = m__namespace.useState(null), [U, z] = m__namespace.useState(null), R2 = ve$1(e), [H, L] = m__namespace.useState(false), W2 = m__namespace.useRef(false);
6825
6825
  m__namespace.useEffect(() => {
6826
- if (y) return hideOthers$1(y);
6826
+ if (y) return hideOthers(y);
6827
6827
  }, [y]), $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
6828
6828
  const J = m__namespace.useCallback(
6829
6829
  (S) => {
@@ -8262,125 +8262,6 @@ function $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {
8262
8262
  }
8263
8263
  const $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338;
8264
8264
  const $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
8265
- var getDefaultParent = function(originalTarget) {
8266
- if (typeof document === "undefined") {
8267
- return null;
8268
- }
8269
- var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
8270
- return sampleTarget.ownerDocument.body;
8271
- };
8272
- var counterMap = /* @__PURE__ */ new WeakMap();
8273
- var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
8274
- var markerMap = {};
8275
- var lockCount = 0;
8276
- var unwrapHost = function(node) {
8277
- return node && (node.host || unwrapHost(node.parentNode));
8278
- };
8279
- var correctTargets = function(parent, targets) {
8280
- return targets.map(function(target) {
8281
- if (parent.contains(target)) {
8282
- return target;
8283
- }
8284
- var correctedTarget = unwrapHost(target);
8285
- if (correctedTarget && parent.contains(correctedTarget)) {
8286
- return correctedTarget;
8287
- }
8288
- console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
8289
- return null;
8290
- }).filter(function(x) {
8291
- return Boolean(x);
8292
- });
8293
- };
8294
- var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
8295
- var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
8296
- if (!markerMap[markerName]) {
8297
- markerMap[markerName] = /* @__PURE__ */ new WeakMap();
8298
- }
8299
- var markerCounter = markerMap[markerName];
8300
- var hiddenNodes = [];
8301
- var elementsToKeep = /* @__PURE__ */ new Set();
8302
- var elementsToStop = new Set(targets);
8303
- var keep = function(el2) {
8304
- if (!el2 || elementsToKeep.has(el2)) {
8305
- return;
8306
- }
8307
- elementsToKeep.add(el2);
8308
- keep(el2.parentNode);
8309
- };
8310
- targets.forEach(keep);
8311
- var deep = function(parent) {
8312
- if (!parent || elementsToStop.has(parent)) {
8313
- return;
8314
- }
8315
- Array.prototype.forEach.call(parent.children, function(node) {
8316
- if (elementsToKeep.has(node)) {
8317
- deep(node);
8318
- } else {
8319
- try {
8320
- var attr = node.getAttribute(controlAttribute);
8321
- var alreadyHidden = attr !== null && attr !== "false";
8322
- var counterValue = (counterMap.get(node) || 0) + 1;
8323
- var markerValue = (markerCounter.get(node) || 0) + 1;
8324
- counterMap.set(node, counterValue);
8325
- markerCounter.set(node, markerValue);
8326
- hiddenNodes.push(node);
8327
- if (counterValue === 1 && alreadyHidden) {
8328
- uncontrolledNodes.set(node, true);
8329
- }
8330
- if (markerValue === 1) {
8331
- node.setAttribute(markerName, "true");
8332
- }
8333
- if (!alreadyHidden) {
8334
- node.setAttribute(controlAttribute, "true");
8335
- }
8336
- } catch (e) {
8337
- console.error("aria-hidden: cannot operate on ", node, e);
8338
- }
8339
- }
8340
- });
8341
- };
8342
- deep(parentNode);
8343
- elementsToKeep.clear();
8344
- lockCount++;
8345
- return function() {
8346
- hiddenNodes.forEach(function(node) {
8347
- var counterValue = counterMap.get(node) - 1;
8348
- var markerValue = markerCounter.get(node) - 1;
8349
- counterMap.set(node, counterValue);
8350
- markerCounter.set(node, markerValue);
8351
- if (!counterValue) {
8352
- if (!uncontrolledNodes.has(node)) {
8353
- node.removeAttribute(controlAttribute);
8354
- }
8355
- uncontrolledNodes.delete(node);
8356
- }
8357
- if (!markerValue) {
8358
- node.removeAttribute(markerName);
8359
- }
8360
- });
8361
- lockCount--;
8362
- if (!lockCount) {
8363
- counterMap = /* @__PURE__ */ new WeakMap();
8364
- counterMap = /* @__PURE__ */ new WeakMap();
8365
- uncontrolledNodes = /* @__PURE__ */ new WeakMap();
8366
- markerMap = {};
8367
- }
8368
- };
8369
- };
8370
- var hideOthers = function(originalTarget, parentNode, markerName) {
8371
- if (markerName === void 0) {
8372
- markerName = "data-aria-hidden";
8373
- }
8374
- var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
8375
- var activeParentNode = getDefaultParent(originalTarget);
8376
- if (!activeParentNode) {
8377
- return function() {
8378
- return null;
8379
- };
8380
- }
8381
- targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
8382
- return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
8383
- };
8384
8265
  var effectCar$2 = createSidecarMedium();
8385
8266
  var nothing$2 = function() {
8386
8267
  return;
@@ -11259,10 +11140,11 @@ NodeProp.contextHash = new NodeProp({ perNode: true });
11259
11140
  NodeProp.lookAhead = new NodeProp({ perNode: true });
11260
11141
  NodeProp.mounted = new NodeProp({ perNode: true });
11261
11142
  class MountedTree {
11262
- constructor(tree, overlay, parser2) {
11143
+ constructor(tree, overlay, parser2, bracketed = false) {
11263
11144
  this.tree = tree;
11264
11145
  this.overlay = overlay;
11265
11146
  this.parser = parser2;
11147
+ this.bracketed = bracketed;
11266
11148
  }
11267
11149
  /**
11268
11150
  @internal
@@ -11418,6 +11300,7 @@ var IterMode;
11418
11300
  IterMode2[IterMode2["IncludeAnonymous"] = 2] = "IncludeAnonymous";
11419
11301
  IterMode2[IterMode2["IgnoreMounts"] = 4] = "IgnoreMounts";
11420
11302
  IterMode2[IterMode2["IgnoreOverlays"] = 8] = "IgnoreOverlays";
11303
+ IterMode2[IterMode2["EnterBracketed"] = 16] = "EnterBracketed";
11421
11304
  })(IterMode || (IterMode = {}));
11422
11305
  class Tree {
11423
11306
  /**
@@ -11780,10 +11663,11 @@ class TreeNode extends BaseNode {
11780
11663
  return this.from + this._tree.length;
11781
11664
  }
11782
11665
  nextChild(i, dir, pos, side, mode = 0) {
11666
+ var _a2;
11783
11667
  for (let parent = this; ; ) {
11784
11668
  for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1; i != e; i += dir) {
11785
11669
  let next = children[i], start = positions[i] + parent.from;
11786
- if (!checkSide(side, pos, start, start + next.length))
11670
+ if (!(mode & IterMode.EnterBracketed && next instanceof Tree && ((_a2 = MountedTree.get(next)) === null || _a2 === void 0 ? void 0 : _a2.overlay) === null && (start >= pos || start + next.length <= pos)) && !checkSide(side, pos, start, start + next.length))
11787
11671
  continue;
11788
11672
  if (next instanceof TreeBuffer) {
11789
11673
  if (mode & IterMode.ExcludeBuffers)
@@ -11796,7 +11680,7 @@ class TreeNode extends BaseNode {
11796
11680
  if (!(mode & IterMode.IgnoreMounts) && (mounted = MountedTree.get(next)) && !mounted.overlay)
11797
11681
  return new TreeNode(mounted.tree, start, i, parent);
11798
11682
  let inner = new TreeNode(next, start, i, parent);
11799
- return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side);
11683
+ return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
11800
11684
  }
11801
11685
  }
11802
11686
  if (mode & IterMode.IncludeAnonymous || !parent.type.isAnonymous)
@@ -11852,9 +11736,9 @@ class TreeNode extends BaseNode {
11852
11736
  enter(pos, side, mode = 0) {
11853
11737
  let mounted;
11854
11738
  if (!(mode & IterMode.IgnoreOverlays) && (mounted = MountedTree.get(this._tree)) && mounted.overlay) {
11855
- let rPos = pos - this.from;
11739
+ let rPos = pos - this.from, enterBracketed = mode & IterMode.EnterBracketed && mounted.bracketed;
11856
11740
  for (let { from, to: to2 } of mounted.overlay) {
11857
- if ((side > 0 ? from <= rPos : from < rPos) && (side < 0 ? to2 >= rPos : to2 > rPos))
11741
+ if ((side > 0 || enterBracketed ? from <= rPos : from < rPos) && (side < 0 || enterBracketed ? to2 >= rPos : to2 > rPos))
11858
11742
  return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
11859
11743
  }
11860
11744
  }
@@ -12113,11 +11997,11 @@ class TreeCursor {
12113
11997
  @internal
12114
11998
  */
12115
11999
  constructor(node, mode = 0) {
12116
- this.mode = mode;
12117
12000
  this.buffer = null;
12118
12001
  this.stack = [];
12119
12002
  this.index = 0;
12120
12003
  this.bufferNode = null;
12004
+ this.mode = mode & ~IterMode.EnterBracketed;
12121
12005
  if (node instanceof TreeNode) {
12122
12006
  this.yieldNode(node);
12123
12007
  } else {
@@ -17826,7 +17710,8 @@ class EditorState {
17826
17710
  - Other (anything else)
17827
17711
  */
17828
17712
  charCategorizer(at2) {
17829
- return makeCategorizer(this.languageDataAt("wordChars", at2).join(""));
17713
+ let chars = this.languageDataAt("wordChars", at2);
17714
+ return makeCategorizer(chars.length ? chars[0] : "");
17830
17715
  }
17831
17716
  /**
17832
17717
  Find the word at the given position, meaning the range
@@ -17909,6 +17794,9 @@ class RangeValue {
17909
17794
  RangeValue.prototype.startSide = RangeValue.prototype.endSide = 0;
17910
17795
  RangeValue.prototype.point = false;
17911
17796
  RangeValue.prototype.mapMode = MapMode.TrackDel;
17797
+ function cmpVal(a, b) {
17798
+ return a == b || a.constructor == b.constructor && a.eq(b);
17799
+ }
17912
17800
  class Range2 {
17913
17801
  constructor(from, to2, value) {
17914
17802
  this.from = from;
@@ -18156,7 +18044,7 @@ class RangeSet {
18156
18044
  let sharedChunks = findSharedChunks(a, b);
18157
18045
  let sideA = new SpanCursor(a, sharedChunks, 0).goto(from), sideB = new SpanCursor(b, sharedChunks, 0).goto(from);
18158
18046
  for (; ; ) {
18159
- if (sideA.to != sideB.to || !sameValues(sideA.active, sideB.active) || sideA.point && (!sideB.point || !sideA.point.eq(sideB.point)))
18047
+ if (sideA.to != sideB.to || !sameValues(sideA.active, sideB.active) || sideA.point && (!sideB.point || !cmpVal(sideA.point, sideB.point)))
18160
18048
  return false;
18161
18049
  if (sideA.to > to2)
18162
18050
  return true;
@@ -18606,20 +18494,25 @@ function compare(a, startA, b, startB, length, comparator) {
18606
18494
  b.goto(startB);
18607
18495
  let endB = startB + length;
18608
18496
  let pos = startB, dPos = startB - startA;
18609
- for (; ; ) {
18497
+ let bounds = !!comparator.boundChange;
18498
+ for (let boundChange = false; ; ) {
18610
18499
  let dEnd = a.to + dPos - b.to, diff = dEnd || a.endSide - b.endSide;
18611
18500
  let end = diff < 0 ? a.to + dPos : b.to, clipEnd = Math.min(end, endB);
18612
- if (a.point || b.point) {
18613
- if (!(a.point && b.point && (a.point == b.point || a.point.eq(b.point)) && sameValues(a.activeForPoint(a.to), b.activeForPoint(b.to))))
18501
+ let point = a.point || b.point;
18502
+ if (point) {
18503
+ if (!(a.point && b.point && cmpVal(a.point, b.point) && sameValues(a.activeForPoint(a.to), b.activeForPoint(b.to))))
18614
18504
  comparator.comparePoint(pos, clipEnd, a.point, b.point);
18505
+ boundChange = false;
18615
18506
  } else {
18507
+ if (boundChange)
18508
+ comparator.boundChange(pos);
18616
18509
  if (clipEnd > pos && !sameValues(a.active, b.active))
18617
18510
  comparator.compareRange(pos, clipEnd, a.active, b.active);
18511
+ if (bounds && clipEnd < endB && (dEnd || a.openEnd(end) != b.openEnd(end)))
18512
+ boundChange = true;
18618
18513
  }
18619
18514
  if (end > endB)
18620
18515
  break;
18621
- if ((dEnd || a.openEnd != b.openEnd) && comparator.boundChange)
18622
- comparator.boundChange(end);
18623
18516
  pos = end;
18624
18517
  if (diff <= 0)
18625
18518
  a.next();
@@ -18631,7 +18524,7 @@ function sameValues(a, b) {
18631
18524
  if (a.length != b.length)
18632
18525
  return false;
18633
18526
  for (let i = 0; i < a.length; i++)
18634
- if (a[i] != b[i] && !a[i].eq(b[i]))
18527
+ if (a[i] != b[i] && !cmpVal(a[i], b[i]))
18635
18528
  return false;
18636
18529
  return true;
18637
18530
  }
@@ -20997,6 +20890,13 @@ class TileBuilder {
20997
20890
  /* Reused.DOM */
20998
20891
  );
20999
20892
  }
20893
+ let oldTile = Tile.get(composition.text);
20894
+ if (oldTile)
20895
+ this.cache.reused.set(
20896
+ oldTile,
20897
+ 2
20898
+ /* Reused.DOM */
20899
+ );
21000
20900
  let text = new TextTile(composition.text, composition.text.nodeValue);
21001
20901
  text.flags |= 8;
21002
20902
  head.append(text);
@@ -21274,6 +21174,18 @@ class TileUpdate {
21274
21174
  /* Reused.DOM */
21275
21175
  );
21276
21176
  this.old = new TilePointer(old);
21177
+ this.reuseWalker = {
21178
+ skip: (tile, from, to2) => {
21179
+ this.cache.add(tile);
21180
+ if (tile.isComposite())
21181
+ return false;
21182
+ },
21183
+ enter: (tile) => this.cache.add(tile),
21184
+ leave: () => {
21185
+ },
21186
+ break: () => {
21187
+ }
21188
+ };
21277
21189
  }
21278
21190
  run(changes, composition) {
21279
21191
  let compositionContext = composition && this.getCompositionContext(composition.text);
@@ -21292,6 +21204,7 @@ class TileUpdate {
21292
21204
  if (composition && next.fromA <= composition.range.fromA && next.toA >= composition.range.toA) {
21293
21205
  this.emit(posB, composition.range.fromB);
21294
21206
  this.builder.addComposition(composition, compositionContext);
21207
+ this.text.skip(composition.range.toB - composition.range.fromB);
21295
21208
  this.emit(composition.range.toB, next.toB);
21296
21209
  } else {
21297
21210
  this.emit(posB, next.toB);
@@ -21436,17 +21349,13 @@ class TileUpdate {
21436
21349
  this.openMarks = openEnd;
21437
21350
  }
21438
21351
  forward(from, to2) {
21439
- this.old.advance(to2 - from, 1, {
21440
- skip: (tile, from2, to3) => {
21441
- if (tile.isText() || to3 == tile.length)
21442
- this.cache.add(tile);
21443
- },
21444
- enter: (tile) => this.cache.add(tile),
21445
- leave: () => {
21446
- },
21447
- break: () => {
21448
- }
21449
- });
21352
+ if (to2 - from <= 10) {
21353
+ this.old.advance(to2 - from, 1, this.reuseWalker);
21354
+ } else {
21355
+ this.old.advance(5, -1, this.reuseWalker);
21356
+ this.old.advance(to2 - from - 10, -1);
21357
+ this.old.advance(5, 1, this.reuseWalker);
21358
+ }
21450
21359
  }
21451
21360
  getCompositionContext(text) {
21452
21361
  let marks = [], line = null;
@@ -22462,10 +22371,11 @@ function dirAt(view, pos) {
22462
22371
  }
22463
22372
  const LineBreakPlaceholder = "￿";
22464
22373
  class DOMReader {
22465
- constructor(points, state) {
22374
+ constructor(points, view) {
22466
22375
  this.points = points;
22376
+ this.view = view;
22467
22377
  this.text = "";
22468
- this.lineSeparator = state.facet(EditorState.lineSeparator);
22378
+ this.lineSeparator = view.state.facet(EditorState.lineSeparator);
22469
22379
  }
22470
22380
  append(text) {
22471
22381
  this.text += text;
@@ -22483,7 +22393,7 @@ class DOMReader {
22483
22393
  this.readNode(cur2);
22484
22394
  let tile = Tile.get(cur2), next = cur2.nextSibling;
22485
22395
  if (next == end) {
22486
- if ((tile === null || tile === void 0 ? void 0 : tile.breakAfter) && !next)
22396
+ if ((tile === null || tile === void 0 ? void 0 : tile.breakAfter) && !next && parent != this.view.contentDOM)
22487
22397
  this.lineBreak();
22488
22398
  break;
22489
22399
  }
@@ -22599,7 +22509,7 @@ class DOMChange {
22599
22509
  this.newSel = null;
22600
22510
  } else if (start > -1 && (this.bounds = domBoundsAround(view.docView.tile, start, end, 0))) {
22601
22511
  let selPoints = iHead || iAnchor ? [] : selectionPoints(view);
22602
- let reader = new DOMReader(selPoints, view.state);
22512
+ let reader = new DOMReader(selPoints, view);
22603
22513
  reader.readRange(this.bounds.startDOM, this.bounds.endDOM);
22604
22514
  this.text = reader.text;
22605
22515
  this.newSel = selectionFromPoints(selPoints, this.bounds.from);
@@ -29250,7 +29160,7 @@ Language.setState = /* @__PURE__ */ StateEffect.define();
29250
29160
  function topNodeAt(state, pos, side) {
29251
29161
  let topLang = state.facet(language), tree = syntaxTree(state).topNode;
29252
29162
  if (!topLang || topLang.allowsNesting) {
29253
- for (let node = tree; node; node = node.enter(pos, side, IterMode.ExcludeBuffers))
29163
+ for (let node = tree; node; node = node.enter(pos, side, IterMode.ExcludeBuffers | IterMode.EnterBracketed))
29254
29164
  if (node.type.isTop)
29255
29165
  tree = node;
29256
29166
  }
@@ -31604,7 +31514,13 @@ function copyLine(state, dispatch, forward) {
31604
31514
  else
31605
31515
  changes.push({ from: block.to, insert: state.lineBreak + state.doc.slice(block.from, block.to) });
31606
31516
  }
31607
- dispatch(state.update({ changes, scrollIntoView: true, userEvent: "input.copyline" }));
31517
+ let changeSet = state.changes(changes);
31518
+ dispatch(state.update({
31519
+ changes: changeSet,
31520
+ selection: state.selection.map(changeSet, forward ? 1 : -1),
31521
+ scrollIntoView: true,
31522
+ userEvent: "input.copyline"
31523
+ }));
31608
31524
  return true;
31609
31525
  }
31610
31526
  const copyLineUp = ({ state, dispatch }) => copyLine(state, dispatch, false);