@ni/nimble-components 33.1.0 → 33.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-components-bundle.js +201 -87
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2841 -2807
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/table/models/virtualizer.d.ts +0 -1
- package/dist/esm/table/models/virtualizer.js +1 -10
- package/dist/esm/table/models/virtualizer.js.map +1 -1
- package/dist/esm/text-field/index.d.ts +1 -0
- package/dist/esm/text-field/index.js +4 -0
- package/dist/esm/text-field/index.js.map +1 -1
- package/dist/esm/text-field/styles.js +20 -2
- package/dist/esm/text-field/styles.js.map +1 -1
- package/package.json +3 -3
|
@@ -28195,7 +28195,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
28195
28195
|
tree shape like this (without back pointers) makes easy.
|
|
28196
28196
|
|
|
28197
28197
|
**Do not** directly mutate the properties of a `Node` object. See
|
|
28198
|
-
[the guide](/docs/guide/#doc) for more information.
|
|
28198
|
+
[the guide](https://prosemirror.net/docs/guide/#doc) for more information.
|
|
28199
28199
|
*/
|
|
28200
28200
|
let Node$2 = class Node {
|
|
28201
28201
|
/**
|
|
@@ -28230,7 +28230,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
28230
28230
|
get children() { return this.content.content; }
|
|
28231
28231
|
/**
|
|
28232
28232
|
The size of this node, as defined by the integer-based [indexing
|
|
28233
|
-
scheme](/docs/guide/#doc.indexing). For text nodes, this is the
|
|
28233
|
+
scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the
|
|
28234
28234
|
amount of characters. For other leaf nodes, it is one. For
|
|
28235
28235
|
non-leaf nodes, it is the size of the content plus two (the
|
|
28236
28236
|
start and end token).
|
|
@@ -29876,7 +29876,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
29876
29876
|
value = value.replace(/\r\n?/g, "\n");
|
|
29877
29877
|
}
|
|
29878
29878
|
if (value)
|
|
29879
|
-
this.insertNode(this.parser.schema.text(value), marks);
|
|
29879
|
+
this.insertNode(this.parser.schema.text(value), marks, !/\S/.test(value));
|
|
29880
29880
|
this.findInText(dom);
|
|
29881
29881
|
}
|
|
29882
29882
|
else {
|
|
@@ -29940,7 +29940,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
29940
29940
|
ignoreFallback(dom, marks) {
|
|
29941
29941
|
// Ignored BR nodes should at least create an inline context
|
|
29942
29942
|
if (dom.nodeName == "BR" && (!this.top.type || !this.top.type.inlineContent))
|
|
29943
|
-
this.findPlace(this.parser.schema.text("-"), marks);
|
|
29943
|
+
this.findPlace(this.parser.schema.text("-"), marks, true);
|
|
29944
29944
|
}
|
|
29945
29945
|
// Run any style parser associated with the node's styles. Either
|
|
29946
29946
|
// return an updated array of marks, or null to indicate some of the
|
|
@@ -29988,7 +29988,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
29988
29988
|
marks = inner;
|
|
29989
29989
|
}
|
|
29990
29990
|
}
|
|
29991
|
-
else if (!this.insertNode(nodeType.create(rule.attrs), marks)) {
|
|
29991
|
+
else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == "BR")) {
|
|
29992
29992
|
this.leafFallback(dom, marks);
|
|
29993
29993
|
}
|
|
29994
29994
|
}
|
|
@@ -30005,7 +30005,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30005
30005
|
}
|
|
30006
30006
|
else if (rule.getContent) {
|
|
30007
30007
|
this.findInside(dom);
|
|
30008
|
-
rule.getContent(dom, this.parser.schema).forEach(node => this.insertNode(node, marks));
|
|
30008
|
+
rule.getContent(dom, this.parser.schema).forEach(node => this.insertNode(node, marks, false));
|
|
30009
30009
|
}
|
|
30010
30010
|
else {
|
|
30011
30011
|
let contentDOM = dom;
|
|
@@ -30036,19 +30036,22 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30036
30036
|
// Try to find a way to fit the given node type into the current
|
|
30037
30037
|
// context. May add intermediate wrappers and/or leave non-solid
|
|
30038
30038
|
// nodes that we're in.
|
|
30039
|
-
findPlace(node, marks) {
|
|
30039
|
+
findPlace(node, marks, cautious) {
|
|
30040
30040
|
let route, sync;
|
|
30041
|
-
for (let depth = this.open; depth >= 0; depth--) {
|
|
30041
|
+
for (let depth = this.open, penalty = 0; depth >= 0; depth--) {
|
|
30042
30042
|
let cx = this.nodes[depth];
|
|
30043
30043
|
let found = cx.findWrapping(node);
|
|
30044
|
-
if (found && (!route || route.length > found.length)) {
|
|
30044
|
+
if (found && (!route || route.length > found.length + penalty)) {
|
|
30045
30045
|
route = found;
|
|
30046
30046
|
sync = cx;
|
|
30047
30047
|
if (!found.length)
|
|
30048
30048
|
break;
|
|
30049
30049
|
}
|
|
30050
|
-
if (cx.solid)
|
|
30051
|
-
|
|
30050
|
+
if (cx.solid) {
|
|
30051
|
+
if (cautious)
|
|
30052
|
+
break;
|
|
30053
|
+
penalty += 2;
|
|
30054
|
+
}
|
|
30052
30055
|
}
|
|
30053
30056
|
if (!route)
|
|
30054
30057
|
return null;
|
|
@@ -30058,13 +30061,13 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30058
30061
|
return marks;
|
|
30059
30062
|
}
|
|
30060
30063
|
// Try to insert the given node, adjusting the context when needed.
|
|
30061
|
-
insertNode(node, marks) {
|
|
30064
|
+
insertNode(node, marks, cautious) {
|
|
30062
30065
|
if (node.isInline && this.needsBlock && !this.top.type) {
|
|
30063
30066
|
let block = this.textblockFromContext();
|
|
30064
30067
|
if (block)
|
|
30065
30068
|
marks = this.enterInner(block, null, marks);
|
|
30066
30069
|
}
|
|
30067
|
-
let innerMarks = this.findPlace(node, marks);
|
|
30070
|
+
let innerMarks = this.findPlace(node, marks, cautious);
|
|
30068
30071
|
if (innerMarks) {
|
|
30069
30072
|
this.closeExtra();
|
|
30070
30073
|
let top = this.top;
|
|
@@ -30082,7 +30085,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30082
30085
|
// Try to start a node of the given type, adjusting the context when
|
|
30083
30086
|
// necessary.
|
|
30084
30087
|
enter(type, attrs, marks, preserveWS) {
|
|
30085
|
-
let innerMarks = this.findPlace(type.create(attrs), marks);
|
|
30088
|
+
let innerMarks = this.findPlace(type.create(attrs), marks, false);
|
|
30086
30089
|
if (innerMarks)
|
|
30087
30090
|
innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);
|
|
30088
30091
|
return innerMarks;
|
|
@@ -30687,18 +30690,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30687
30690
|
maps](https://prosemirror.net/docs/ref/#transform.StepMap). It has special provisions for losslessly
|
|
30688
30691
|
handling mapping positions through a series of steps in which some
|
|
30689
30692
|
steps are inverted versions of earlier steps. (This comes up when
|
|
30690
|
-
‘[rebasing](/docs/guide/#transform.rebasing)’ steps for
|
|
30693
|
+
‘[rebasing](https://prosemirror.net/docs/guide/#transform.rebasing)’ steps for
|
|
30691
30694
|
collaboration or history management.)
|
|
30692
30695
|
*/
|
|
30693
30696
|
class Mapping {
|
|
30694
30697
|
/**
|
|
30695
30698
|
Create a new mapping with the given position maps.
|
|
30696
30699
|
*/
|
|
30697
|
-
constructor(
|
|
30698
|
-
/**
|
|
30699
|
-
The step maps in this mapping.
|
|
30700
|
-
*/
|
|
30701
|
-
maps = [],
|
|
30700
|
+
constructor(maps,
|
|
30702
30701
|
/**
|
|
30703
30702
|
@internal
|
|
30704
30703
|
*/
|
|
@@ -30711,23 +30710,22 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30711
30710
|
/**
|
|
30712
30711
|
The end position in the `maps` array.
|
|
30713
30712
|
*/
|
|
30714
|
-
to = maps.length) {
|
|
30715
|
-
this.maps = maps;
|
|
30713
|
+
to = maps ? maps.length : 0) {
|
|
30716
30714
|
this.mirror = mirror;
|
|
30717
30715
|
this.from = from;
|
|
30718
30716
|
this.to = to;
|
|
30717
|
+
this._maps = maps || [];
|
|
30718
|
+
this.ownData = !(maps || mirror);
|
|
30719
30719
|
}
|
|
30720
30720
|
/**
|
|
30721
|
-
|
|
30721
|
+
The step maps in this mapping.
|
|
30722
30722
|
*/
|
|
30723
|
-
|
|
30724
|
-
return new Mapping(this.maps, this.mirror, from, to);
|
|
30725
|
-
}
|
|
30723
|
+
get maps() { return this._maps; }
|
|
30726
30724
|
/**
|
|
30727
|
-
|
|
30725
|
+
Create a mapping that maps only through a part of this one.
|
|
30728
30726
|
*/
|
|
30729
|
-
|
|
30730
|
-
return new Mapping(this.
|
|
30727
|
+
slice(from = 0, to = this.maps.length) {
|
|
30728
|
+
return new Mapping(this._maps, this.mirror, from, to);
|
|
30731
30729
|
}
|
|
30732
30730
|
/**
|
|
30733
30731
|
Add a step map to the end of this mapping. If `mirrors` is
|
|
@@ -30735,18 +30733,23 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30735
30733
|
image of this one.
|
|
30736
30734
|
*/
|
|
30737
30735
|
appendMap(map, mirrors) {
|
|
30738
|
-
|
|
30736
|
+
if (!this.ownData) {
|
|
30737
|
+
this._maps = this._maps.slice();
|
|
30738
|
+
this.mirror = this.mirror && this.mirror.slice();
|
|
30739
|
+
this.ownData = true;
|
|
30740
|
+
}
|
|
30741
|
+
this.to = this._maps.push(map);
|
|
30739
30742
|
if (mirrors != null)
|
|
30740
|
-
this.setMirror(this.
|
|
30743
|
+
this.setMirror(this._maps.length - 1, mirrors);
|
|
30741
30744
|
}
|
|
30742
30745
|
/**
|
|
30743
30746
|
Add all the step maps in a given mapping to this one (preserving
|
|
30744
30747
|
mirroring information).
|
|
30745
30748
|
*/
|
|
30746
30749
|
appendMapping(mapping) {
|
|
30747
|
-
for (let i = 0, startSize = this.
|
|
30750
|
+
for (let i = 0, startSize = this._maps.length; i < mapping._maps.length; i++) {
|
|
30748
30751
|
let mirr = mapping.getMirror(i);
|
|
30749
|
-
this.appendMap(mapping.
|
|
30752
|
+
this.appendMap(mapping._maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);
|
|
30750
30753
|
}
|
|
30751
30754
|
}
|
|
30752
30755
|
/**
|
|
@@ -30772,9 +30775,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30772
30775
|
Append the inverse of the given mapping to this one.
|
|
30773
30776
|
*/
|
|
30774
30777
|
appendMappingInverted(mapping) {
|
|
30775
|
-
for (let i = mapping.maps.length - 1, totalSize = this.
|
|
30778
|
+
for (let i = mapping.maps.length - 1, totalSize = this._maps.length + mapping._maps.length; i >= 0; i--) {
|
|
30776
30779
|
let mirr = mapping.getMirror(i);
|
|
30777
|
-
this.appendMap(mapping.
|
|
30780
|
+
this.appendMap(mapping._maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);
|
|
30778
30781
|
}
|
|
30779
30782
|
}
|
|
30780
30783
|
/**
|
|
@@ -30792,7 +30795,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30792
30795
|
if (this.mirror)
|
|
30793
30796
|
return this._map(pos, assoc, true);
|
|
30794
30797
|
for (let i = this.from; i < this.to; i++)
|
|
30795
|
-
pos = this.
|
|
30798
|
+
pos = this._maps[i].map(pos, assoc);
|
|
30796
30799
|
return pos;
|
|
30797
30800
|
}
|
|
30798
30801
|
/**
|
|
@@ -30806,12 +30809,12 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
30806
30809
|
_map(pos, assoc, simple) {
|
|
30807
30810
|
let delInfo = 0;
|
|
30808
30811
|
for (let i = this.from; i < this.to; i++) {
|
|
30809
|
-
let map = this.
|
|
30812
|
+
let map = this._maps[i], result = map.mapResult(pos, assoc);
|
|
30810
30813
|
if (result.recover != null) {
|
|
30811
30814
|
let corr = this.getMirror(i);
|
|
30812
30815
|
if (corr != null && corr > i && corr < this.to) {
|
|
30813
30816
|
i = corr;
|
|
30814
|
-
pos = this.
|
|
30817
|
+
pos = this._maps[corr].recover(result.recover);
|
|
30815
30818
|
continue;
|
|
30816
30819
|
}
|
|
30817
30820
|
}
|
|
@@ -31216,7 +31219,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
31216
31219
|
let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);
|
|
31217
31220
|
if (from.deletedAcross && to.deletedAcross)
|
|
31218
31221
|
return null;
|
|
31219
|
-
return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice);
|
|
31222
|
+
return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice, this.structure);
|
|
31220
31223
|
}
|
|
31221
31224
|
merge(other) {
|
|
31222
31225
|
if (!(other instanceof ReplaceStep) || other.structure || this.structure)
|
|
@@ -32593,19 +32596,26 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
32593
32596
|
return this;
|
|
32594
32597
|
}
|
|
32595
32598
|
/**
|
|
32596
|
-
Remove a mark (or
|
|
32599
|
+
Remove a mark (or all marks of the given type) from the node at
|
|
32597
32600
|
position `pos`.
|
|
32598
32601
|
*/
|
|
32599
32602
|
removeNodeMark(pos, mark) {
|
|
32600
|
-
|
|
32601
|
-
|
|
32602
|
-
|
|
32603
|
-
|
|
32604
|
-
|
|
32605
|
-
|
|
32606
|
-
|
|
32603
|
+
let node = this.doc.nodeAt(pos);
|
|
32604
|
+
if (!node)
|
|
32605
|
+
throw new RangeError("No node at position " + pos);
|
|
32606
|
+
if (mark instanceof Mark$1) {
|
|
32607
|
+
if (mark.isInSet(node.marks))
|
|
32608
|
+
this.step(new RemoveNodeMarkStep(pos, mark));
|
|
32609
|
+
}
|
|
32610
|
+
else {
|
|
32611
|
+
let set = node.marks, found, steps = [];
|
|
32612
|
+
while (found = mark.isInSet(set)) {
|
|
32613
|
+
steps.push(new RemoveNodeMarkStep(pos, found));
|
|
32614
|
+
set = found.removeFromSet(set);
|
|
32615
|
+
}
|
|
32616
|
+
for (let i = steps.length - 1; i >= 0; i--)
|
|
32617
|
+
this.step(steps[i]);
|
|
32607
32618
|
}
|
|
32608
|
-
this.step(new RemoveNodeMarkStep(pos, mark));
|
|
32609
32619
|
return this;
|
|
32610
32620
|
}
|
|
32611
32621
|
/**
|
|
@@ -32613,7 +32623,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
32613
32623
|
greater than one, any number of nodes above that. By default, the
|
|
32614
32624
|
parts split off will inherit the node type of the original node.
|
|
32615
32625
|
This can be changed by passing an array of types and attributes to
|
|
32616
|
-
use after the split.
|
|
32626
|
+
use after the split (with the outermost nodes coming first).
|
|
32617
32627
|
*/
|
|
32618
32628
|
split(pos, depth = 1, typesAfter) {
|
|
32619
32629
|
split(this, pos, depth, typesAfter);
|
|
@@ -33846,11 +33856,13 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
33846
33856
|
function scrollRectIntoView(view, rect, startDOM) {
|
|
33847
33857
|
let scrollThreshold = view.someProp("scrollThreshold") || 0, scrollMargin = view.someProp("scrollMargin") || 5;
|
|
33848
33858
|
let doc = view.dom.ownerDocument;
|
|
33849
|
-
for (let parent = startDOM || view.dom;;
|
|
33859
|
+
for (let parent = startDOM || view.dom;;) {
|
|
33850
33860
|
if (!parent)
|
|
33851
33861
|
break;
|
|
33852
|
-
if (parent.nodeType != 1)
|
|
33862
|
+
if (parent.nodeType != 1) {
|
|
33863
|
+
parent = parentNode(parent);
|
|
33853
33864
|
continue;
|
|
33865
|
+
}
|
|
33854
33866
|
let elt = parent;
|
|
33855
33867
|
let atTop = elt == doc.body;
|
|
33856
33868
|
let bounding = atTop ? windowRect(doc) : clientRect(elt);
|
|
@@ -33879,8 +33891,10 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
33879
33891
|
rect = { left: rect.left - dX, top: rect.top - dY, right: rect.right - dX, bottom: rect.bottom - dY };
|
|
33880
33892
|
}
|
|
33881
33893
|
}
|
|
33882
|
-
|
|
33894
|
+
let pos = atTop ? "fixed" : getComputedStyle(parent).position;
|
|
33895
|
+
if (/^(fixed|sticky)$/.test(pos))
|
|
33883
33896
|
break;
|
|
33897
|
+
parent = pos == "absolute" ? parent.offsetParent : parentNode(parent);
|
|
33884
33898
|
}
|
|
33885
33899
|
}
|
|
33886
33900
|
// Store the scroll position of the editor's parent nodes, along with
|
|
@@ -36625,7 +36639,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
36625
36639
|
// innerHTML, even on a detached document. This wraps the string in
|
|
36626
36640
|
// a way that makes the browser allow us to use its parser again.
|
|
36627
36641
|
if (!_policy)
|
|
36628
|
-
_policy = trustedTypes.createPolicy("ProseMirrorClipboard", { createHTML: (s) => s });
|
|
36642
|
+
_policy = trustedTypes.defaultPolicy || trustedTypes.createPolicy("ProseMirrorClipboard", { createHTML: (s) => s });
|
|
36629
36643
|
return _policy.createHTML(html);
|
|
36630
36644
|
}
|
|
36631
36645
|
function readHTML(html) {
|
|
@@ -37316,6 +37330,10 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
37316
37330
|
}
|
|
37317
37331
|
}
|
|
37318
37332
|
const dragCopyModifier = mac$2 ? "altKey" : "ctrlKey";
|
|
37333
|
+
function dragMoves(view, event) {
|
|
37334
|
+
let moves = view.someProp("dragCopies", test => !test(event));
|
|
37335
|
+
return moves != null ? moves : !event[dragCopyModifier];
|
|
37336
|
+
}
|
|
37319
37337
|
handlers.dragstart = (view, _event) => {
|
|
37320
37338
|
let event = _event;
|
|
37321
37339
|
let mouseDown = view.input.mouseDown;
|
|
@@ -37345,7 +37363,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
37345
37363
|
event.dataTransfer.effectAllowed = "copyMove";
|
|
37346
37364
|
if (!brokenClipboardAPI)
|
|
37347
37365
|
event.dataTransfer.setData("text/plain", text);
|
|
37348
|
-
view.dragging = new Dragging(slice,
|
|
37366
|
+
view.dragging = new Dragging(slice, dragMoves(view, event), node);
|
|
37349
37367
|
};
|
|
37350
37368
|
handlers.dragend = view => {
|
|
37351
37369
|
let dragging = view.dragging;
|
|
@@ -37372,7 +37390,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
37372
37390
|
else {
|
|
37373
37391
|
slice = parseFromClipboard(view, getText$1(event.dataTransfer), brokenClipboardAPI ? null : event.dataTransfer.getData("text/html"), false, $mouse);
|
|
37374
37392
|
}
|
|
37375
|
-
let move = !!(dragging &&
|
|
37393
|
+
let move = !!(dragging && dragMoves(view, event));
|
|
37376
37394
|
if (view.someProp("handleDrop", f => f(view, event, slice || Slice.empty, move))) {
|
|
37377
37395
|
event.preventDefault();
|
|
37378
37396
|
return;
|
|
@@ -38657,9 +38675,11 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
38657
38675
|
// as being an iOS enter press), just dispatch an Enter key instead.
|
|
38658
38676
|
if (((ios && view.input.lastIOSEnter > Date.now() - 225 &&
|
|
38659
38677
|
(!inlineChange || addedNodes.some(n => n.nodeName == "DIV" || n.nodeName == "P"))) ||
|
|
38660
|
-
(!inlineChange && $from.pos < parse.doc.content.size &&
|
|
38678
|
+
(!inlineChange && $from.pos < parse.doc.content.size &&
|
|
38679
|
+
(!$from.sameParent($to) || !$from.parent.inlineContent) &&
|
|
38680
|
+
!/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", "")) &&
|
|
38661
38681
|
(nextSel = Selection$2.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) &&
|
|
38662
|
-
nextSel.head
|
|
38682
|
+
nextSel.head > $from.pos)) &&
|
|
38663
38683
|
view.someProp("handleKeyDown", f => f(view, keyEvent(13, "Enter")))) {
|
|
38664
38684
|
view.input.lastIOSEnter = 0;
|
|
38665
38685
|
return;
|
|
@@ -39291,6 +39311,17 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39291
39311
|
return doPaste(this, text, null, true, event || new ClipboardEvent("paste"));
|
|
39292
39312
|
}
|
|
39293
39313
|
/**
|
|
39314
|
+
Serialize the given slice as it would be if it was copied from
|
|
39315
|
+
this editor. Returns a DOM element that contains a
|
|
39316
|
+
representation of the slice as its children, a textual
|
|
39317
|
+
representation, and the transformed slice (which can be
|
|
39318
|
+
different from the given input due to hooks like
|
|
39319
|
+
[`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).
|
|
39320
|
+
*/
|
|
39321
|
+
serializeForClipboard(slice) {
|
|
39322
|
+
return serializeForClipboard(this, slice);
|
|
39323
|
+
}
|
|
39324
|
+
/**
|
|
39294
39325
|
Removes the editor from the DOM and destroys all [node
|
|
39295
39326
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
39296
39327
|
*/
|
|
@@ -39738,7 +39769,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39738
39769
|
return false;
|
|
39739
39770
|
};
|
|
39740
39771
|
/**
|
|
39741
|
-
A more limited form of [`joinBackward`](
|
|
39772
|
+
A more limited form of [`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward)
|
|
39742
39773
|
that only tries to join the current textblock to the one before
|
|
39743
39774
|
it, if the cursor is at the start of a textblock.
|
|
39744
39775
|
*/
|
|
@@ -39750,7 +39781,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39750
39781
|
return $cut ? joinTextblocksAround(state, $cut, dispatch) : false;
|
|
39751
39782
|
};
|
|
39752
39783
|
/**
|
|
39753
|
-
A more limited form of [`joinForward`](
|
|
39784
|
+
A more limited form of [`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward)
|
|
39754
39785
|
that only tries to join the current textblock to the one after
|
|
39755
39786
|
it, if the cursor is at the end of a textblock.
|
|
39756
39787
|
*/
|
|
@@ -40101,6 +40132,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
40101
40132
|
types[0] = deflt ? { type: deflt } : null;
|
|
40102
40133
|
can = canSplit(tr.doc, splitPos, types.length, types);
|
|
40103
40134
|
}
|
|
40135
|
+
if (!can)
|
|
40136
|
+
return false;
|
|
40104
40137
|
tr.split(splitPos, types.length, types);
|
|
40105
40138
|
if (!atEnd && atStart && $from.node(splitDepth).type != deflt) {
|
|
40106
40139
|
let first = tr.mapping.map($from.before(splitDepth)), $first = tr.doc.resolve(first);
|
|
@@ -40405,9 +40438,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
40405
40438
|
if (target == null)
|
|
40406
40439
|
return false;
|
|
40407
40440
|
tr.lift(range, target);
|
|
40408
|
-
let after = tr.mapping.map(end, -1) - 1;
|
|
40409
|
-
if (canJoin(tr.doc, after))
|
|
40410
|
-
tr.join(after);
|
|
40441
|
+
let $after = tr.doc.resolve(tr.mapping.map(end, -1) - 1);
|
|
40442
|
+
if (canJoin(tr.doc, $after.pos) && $after.nodeBefore.type == $after.nodeAfter.type)
|
|
40443
|
+
tr.join($after.pos);
|
|
40411
40444
|
dispatch(tr.scrollIntoView());
|
|
40412
40445
|
return true;
|
|
40413
40446
|
}
|
|
@@ -44086,13 +44119,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
44086
44119
|
},
|
|
44087
44120
|
});
|
|
44088
44121
|
|
|
44122
|
+
const focusEventsPluginKey = new PluginKey('focusEvents');
|
|
44089
44123
|
const FocusEvents = Extension.create({
|
|
44090
44124
|
name: 'focusEvents',
|
|
44091
44125
|
addProseMirrorPlugins() {
|
|
44092
44126
|
const { editor } = this;
|
|
44093
44127
|
return [
|
|
44094
44128
|
new Plugin({
|
|
44095
|
-
key:
|
|
44129
|
+
key: focusEventsPluginKey,
|
|
44096
44130
|
props: {
|
|
44097
44131
|
handleDOMEvents: {
|
|
44098
44132
|
focus: (view, event) => {
|
|
@@ -44714,7 +44748,7 @@ img.ProseMirror-separator {
|
|
|
44714
44748
|
// @ts-ignore
|
|
44715
44749
|
const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key;
|
|
44716
44750
|
// @ts-ignore
|
|
44717
|
-
plugins =
|
|
44751
|
+
plugins = plugins.filter(plugin => !plugin.key.startsWith(name));
|
|
44718
44752
|
});
|
|
44719
44753
|
if (prevPlugins.length === plugins.length) {
|
|
44720
44754
|
// No plugin was removed, so we don’t need to update the state
|
|
@@ -53326,6 +53360,16 @@ img.ProseMirror-separator {
|
|
|
53326
53360
|
return output;
|
|
53327
53361
|
}
|
|
53328
53362
|
|
|
53363
|
+
/**
|
|
53364
|
+
* Creates a string based on an array of numeric code points.
|
|
53365
|
+
* @see `punycode.ucs2.decode`
|
|
53366
|
+
* @memberOf punycode.ucs2
|
|
53367
|
+
* @name encode
|
|
53368
|
+
* @param {Array} codePoints The array of numeric code points.
|
|
53369
|
+
* @returns {String} The new Unicode string (UCS-2).
|
|
53370
|
+
*/
|
|
53371
|
+
const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
|
|
53372
|
+
|
|
53329
53373
|
/**
|
|
53330
53374
|
* Converts a basic code point into a digit/integer.
|
|
53331
53375
|
* @see `digitToBasic()`
|
|
@@ -53611,6 +53655,25 @@ img.ProseMirror-separator {
|
|
|
53611
53655
|
|
|
53612
53656
|
/** Define the public API */
|
|
53613
53657
|
const punycode = {
|
|
53658
|
+
/**
|
|
53659
|
+
* A string representing the current Punycode.js version number.
|
|
53660
|
+
* @memberOf punycode
|
|
53661
|
+
* @type String
|
|
53662
|
+
*/
|
|
53663
|
+
'version': '2.3.1',
|
|
53664
|
+
/**
|
|
53665
|
+
* An object of methods to convert from JavaScript's internal character
|
|
53666
|
+
* representation (UCS-2) to Unicode code points, and back.
|
|
53667
|
+
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
53668
|
+
* @memberOf punycode
|
|
53669
|
+
* @type Object
|
|
53670
|
+
*/
|
|
53671
|
+
'ucs2': {
|
|
53672
|
+
'decode': ucs2decode,
|
|
53673
|
+
'encode': ucs2encode
|
|
53674
|
+
},
|
|
53675
|
+
'decode': decode,
|
|
53676
|
+
'encode': encode,
|
|
53614
53677
|
'toASCII': toASCII,
|
|
53615
53678
|
'toUnicode': toUnicode
|
|
53616
53679
|
};
|
|
@@ -54507,6 +54570,7 @@ img.ProseMirror-separator {
|
|
|
54507
54570
|
toDOM(node) { return ["a", node.attrs]; }
|
|
54508
54571
|
},
|
|
54509
54572
|
code: {
|
|
54573
|
+
code: true,
|
|
54510
54574
|
parseDOM: [{ tag: "code" }],
|
|
54511
54575
|
toDOM() { return ["code"]; }
|
|
54512
54576
|
}
|
|
@@ -59444,7 +59508,7 @@ img.ProseMirror-separator {
|
|
|
59444
59508
|
},
|
|
59445
59509
|
},
|
|
59446
59510
|
type: {
|
|
59447
|
-
default:
|
|
59511
|
+
default: null,
|
|
59448
59512
|
parseHTML: element => element.getAttribute('type'),
|
|
59449
59513
|
},
|
|
59450
59514
|
};
|
|
@@ -63721,6 +63785,10 @@ img.ProseMirror-separator {
|
|
|
63721
63785
|
}
|
|
63722
63786
|
};
|
|
63723
63787
|
|
|
63788
|
+
function safelyAccessDocument(_document) {
|
|
63789
|
+
return _document || (typeof document !== 'undefined' ? document : null);
|
|
63790
|
+
}
|
|
63791
|
+
|
|
63724
63792
|
//
|
|
63725
63793
|
|
|
63726
63794
|
//
|
|
@@ -63860,7 +63928,7 @@ img.ProseMirror-separator {
|
|
|
63860
63928
|
columnSizingStart: []
|
|
63861
63929
|
}));
|
|
63862
63930
|
};
|
|
63863
|
-
const contextDocument = _contextDocument
|
|
63931
|
+
const contextDocument = safelyAccessDocument(_contextDocument);
|
|
63864
63932
|
const mouseEvents = {
|
|
63865
63933
|
moveHandler: e => onMove(e.clientX),
|
|
63866
63934
|
upHandler: e => {
|
|
@@ -67791,7 +67859,7 @@ focus outline in that case.
|
|
|
67791
67859
|
function memo(getDeps, fn, opts) {
|
|
67792
67860
|
let deps = opts.initialDeps ?? [];
|
|
67793
67861
|
let result;
|
|
67794
|
-
|
|
67862
|
+
function memoizedFunction() {
|
|
67795
67863
|
var _a, _b, _c, _d;
|
|
67796
67864
|
let depTime;
|
|
67797
67865
|
if (opts.key && ((_a = opts.debug) == null ? void 0 : _a.call(opts))) depTime = Date.now();
|
|
@@ -67829,7 +67897,11 @@ focus outline in that case.
|
|
|
67829
67897
|
}
|
|
67830
67898
|
(_d = opts == null ? void 0 : opts.onChange) == null ? void 0 : _d.call(opts, result);
|
|
67831
67899
|
return result;
|
|
67900
|
+
}
|
|
67901
|
+
memoizedFunction.updateDeps = (newDeps) => {
|
|
67902
|
+
deps = newDeps;
|
|
67832
67903
|
};
|
|
67904
|
+
return memoizedFunction;
|
|
67833
67905
|
}
|
|
67834
67906
|
function notUndefined(value, msg) {
|
|
67835
67907
|
if (value === void 0) {
|
|
@@ -68038,7 +68110,7 @@ focus outline in that case.
|
|
|
68038
68110
|
isScrollingResetDelay: 150,
|
|
68039
68111
|
enabled: true,
|
|
68040
68112
|
isRtl: false,
|
|
68041
|
-
useScrollendEvent:
|
|
68113
|
+
useScrollendEvent: false,
|
|
68042
68114
|
useAnimationFrameWithResizeObserver: false,
|
|
68043
68115
|
...opts2
|
|
68044
68116
|
};
|
|
@@ -68256,6 +68328,7 @@ focus outline in that case.
|
|
|
68256
68328
|
startIndex = range.startIndex;
|
|
68257
68329
|
endIndex = range.endIndex;
|
|
68258
68330
|
}
|
|
68331
|
+
this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
|
|
68259
68332
|
return [
|
|
68260
68333
|
this.options.rangeExtractor,
|
|
68261
68334
|
this.options.overscan,
|
|
@@ -68478,10 +68551,19 @@ focus outline in that case.
|
|
|
68478
68551
|
let end;
|
|
68479
68552
|
if (measurements.length === 0) {
|
|
68480
68553
|
end = this.options.paddingStart;
|
|
68554
|
+
} else if (this.options.lanes === 1) {
|
|
68555
|
+
end = ((_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) ?? 0;
|
|
68481
68556
|
} else {
|
|
68482
|
-
|
|
68483
|
-
|
|
68484
|
-
)
|
|
68557
|
+
const endByLane = Array(this.options.lanes).fill(null);
|
|
68558
|
+
let endIndex = measurements.length - 1;
|
|
68559
|
+
while (endIndex >= 0 && endByLane.some((val) => val === null)) {
|
|
68560
|
+
const item = measurements[endIndex];
|
|
68561
|
+
if (endByLane[item.lane] === null) {
|
|
68562
|
+
endByLane[item.lane] = item.end;
|
|
68563
|
+
}
|
|
68564
|
+
endIndex--;
|
|
68565
|
+
}
|
|
68566
|
+
end = Math.max(...endByLane.filter((val) => val !== null));
|
|
68485
68567
|
}
|
|
68486
68568
|
return Math.max(
|
|
68487
68569
|
end - this.options.scrollMargin + this.options.paddingEnd,
|
|
@@ -68527,6 +68609,12 @@ focus outline in that case.
|
|
|
68527
68609
|
}) {
|
|
68528
68610
|
const lastIndex = measurements.length - 1;
|
|
68529
68611
|
const getOffset = (index) => measurements[index].start;
|
|
68612
|
+
if (measurements.length <= lanes) {
|
|
68613
|
+
return {
|
|
68614
|
+
startIndex: 0,
|
|
68615
|
+
endIndex: lastIndex
|
|
68616
|
+
};
|
|
68617
|
+
}
|
|
68530
68618
|
let startIndex = findNearestBinarySearch(
|
|
68531
68619
|
0,
|
|
68532
68620
|
lastIndex,
|
|
@@ -68534,10 +68622,23 @@ focus outline in that case.
|
|
|
68534
68622
|
scrollOffset
|
|
68535
68623
|
);
|
|
68536
68624
|
let endIndex = startIndex;
|
|
68537
|
-
|
|
68538
|
-
endIndex
|
|
68539
|
-
|
|
68540
|
-
|
|
68625
|
+
if (lanes === 1) {
|
|
68626
|
+
while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) {
|
|
68627
|
+
endIndex++;
|
|
68628
|
+
}
|
|
68629
|
+
} else if (lanes > 1) {
|
|
68630
|
+
const endPerLane = Array(lanes).fill(0);
|
|
68631
|
+
while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
|
|
68632
|
+
const item = measurements[endIndex];
|
|
68633
|
+
endPerLane[item.lane] = item.end;
|
|
68634
|
+
endIndex++;
|
|
68635
|
+
}
|
|
68636
|
+
const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
|
|
68637
|
+
while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
|
|
68638
|
+
const item = measurements[startIndex];
|
|
68639
|
+
startPerLane[item.lane] = item.start;
|
|
68640
|
+
startIndex--;
|
|
68641
|
+
}
|
|
68541
68642
|
startIndex = Math.max(0, startIndex - startIndex % lanes);
|
|
68542
68643
|
endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
|
|
68543
68644
|
}
|
|
@@ -68561,7 +68662,6 @@ focus outline in that case.
|
|
|
68561
68662
|
this.headerContainerMarginRight = 0;
|
|
68562
68663
|
this.rowContainerYOffset = 0;
|
|
68563
68664
|
this._pageSize = 0;
|
|
68564
|
-
this.isScrollingTimer = 0;
|
|
68565
68665
|
this.table = table;
|
|
68566
68666
|
this.tanStackTable = tanStackTable;
|
|
68567
68667
|
this.viewportResizeObserver = new ResizeObserver(entries => {
|
|
@@ -68624,6 +68724,7 @@ focus outline in that case.
|
|
|
68624
68724
|
enableSmoothScroll: true,
|
|
68625
68725
|
overscan: 3,
|
|
68626
68726
|
isScrollingResetDelay: 250,
|
|
68727
|
+
useScrollendEvent: false,
|
|
68627
68728
|
scrollToFn: elementScroll,
|
|
68628
68729
|
observeElementOffset,
|
|
68629
68730
|
observeElementRect,
|
|
@@ -68635,15 +68736,6 @@ focus outline in that case.
|
|
|
68635
68736
|
this.visibleItems = virtualizer.getVirtualItems();
|
|
68636
68737
|
this.scrollHeight = virtualizer.getTotalSize();
|
|
68637
68738
|
this.isScrolling = virtualizer.isScrolling;
|
|
68638
|
-
// There are multiple browser bugs that can result in us getting stuck thinking that we're scrolling.
|
|
68639
|
-
// As a workaround, we assume scrolling stopped if we haven't received an update in 300ms.
|
|
68640
|
-
// Tech debt item to remove this workaround: https://github.com/ni/nimble/issues/2382
|
|
68641
|
-
window.clearTimeout(this.isScrollingTimer);
|
|
68642
|
-
if (this.isScrolling) {
|
|
68643
|
-
this.isScrollingTimer = window.setTimeout(() => {
|
|
68644
|
-
this.isScrolling = false;
|
|
68645
|
-
}, 300);
|
|
68646
|
-
}
|
|
68647
68739
|
// We're using a separate div ('table-scroll') to represent the full height of all rows, and
|
|
68648
68740
|
// the row container's height is only big enough to hold the virtualized rows. So we don't
|
|
68649
68741
|
// use the TanStackVirtual-provided 'start' offset (which is in terms of the full height)
|
|
@@ -74779,6 +74871,7 @@ focus outline in that case.
|
|
|
74779
74871
|
frameless: 'frameless'
|
|
74780
74872
|
};
|
|
74781
74873
|
|
|
74874
|
+
// prettier-ignore
|
|
74782
74875
|
const styles$5 = css `
|
|
74783
74876
|
${display('inline-block')}
|
|
74784
74877
|
${styles$N}
|
|
@@ -74793,12 +74886,17 @@ focus outline in that case.
|
|
|
74793
74886
|
--ni-private-height-within-border: calc(
|
|
74794
74887
|
${controlHeight} - 2 * ${borderWidth}
|
|
74795
74888
|
);
|
|
74889
|
+
--ni-private-default-start-slot-opacity: 0.6;
|
|
74796
74890
|
}
|
|
74797
74891
|
|
|
74798
74892
|
:host([disabled]) {
|
|
74799
74893
|
color: ${bodyDisabledFontColor};
|
|
74800
74894
|
}
|
|
74801
74895
|
|
|
74896
|
+
:host([disabled][appearance-readonly]) {
|
|
74897
|
+
color: ${bodyFontColor};
|
|
74898
|
+
}
|
|
74899
|
+
|
|
74802
74900
|
.label {
|
|
74803
74901
|
display: flex;
|
|
74804
74902
|
color: ${controlLabelFontColor};
|
|
@@ -74809,6 +74907,10 @@ focus outline in that case.
|
|
|
74809
74907
|
color: ${controlLabelDisabledFontColor};
|
|
74810
74908
|
}
|
|
74811
74909
|
|
|
74910
|
+
:host([disabled][appearance-readonly]) .label {
|
|
74911
|
+
color: ${controlLabelFontColor};
|
|
74912
|
+
}
|
|
74913
|
+
|
|
74812
74914
|
.root {
|
|
74813
74915
|
position: relative;
|
|
74814
74916
|
display: flex;
|
|
@@ -74874,7 +74976,7 @@ focus outline in that case.
|
|
|
74874
74976
|
|
|
74875
74977
|
slot[name='start']::slotted(*) {
|
|
74876
74978
|
flex: none;
|
|
74877
|
-
opacity:
|
|
74979
|
+
opacity: var(--ni-private-default-start-slot-opacity);
|
|
74878
74980
|
margin-right: ${smallPadding};
|
|
74879
74981
|
}
|
|
74880
74982
|
|
|
@@ -74882,6 +74984,10 @@ focus outline in that case.
|
|
|
74882
74984
|
opacity: 0.3;
|
|
74883
74985
|
}
|
|
74884
74986
|
|
|
74987
|
+
:host([disabled][appearance-readonly]) slot[name='start']::slotted(*) {
|
|
74988
|
+
opacity: var(--ni-private-default-start-slot-opacity);
|
|
74989
|
+
}
|
|
74990
|
+
|
|
74885
74991
|
.control {
|
|
74886
74992
|
-webkit-appearance: none;
|
|
74887
74993
|
font: inherit;
|
|
@@ -74915,10 +75021,14 @@ focus outline in that case.
|
|
|
74915
75021
|
color: ${controlLabelFontColor};
|
|
74916
75022
|
}
|
|
74917
75023
|
|
|
74918
|
-
|
|
75024
|
+
:host([disabled]) .control::placeholder {
|
|
74919
75025
|
color: ${bodyDisabledFontColor};
|
|
74920
75026
|
}
|
|
74921
75027
|
|
|
75028
|
+
:host([disabled][appearance-readonly]) .control::placeholder {
|
|
75029
|
+
color: ${controlLabelFontColor};
|
|
75030
|
+
}
|
|
75031
|
+
|
|
74922
75032
|
[part='end'] {
|
|
74923
75033
|
display: contents;
|
|
74924
75034
|
}
|
|
@@ -75105,6 +75215,7 @@ focus outline in that case.
|
|
|
75105
75215
|
*/
|
|
75106
75216
|
this.appearance = TextFieldAppearance.underline;
|
|
75107
75217
|
this.fullBleed = false;
|
|
75218
|
+
this.appearanceReadOnly = false;
|
|
75108
75219
|
}
|
|
75109
75220
|
}
|
|
75110
75221
|
__decorate([
|
|
@@ -75113,6 +75224,9 @@ focus outline in that case.
|
|
|
75113
75224
|
__decorate([
|
|
75114
75225
|
attr({ attribute: 'full-bleed', mode: 'boolean' })
|
|
75115
75226
|
], TextField.prototype, "fullBleed", void 0);
|
|
75227
|
+
__decorate([
|
|
75228
|
+
attr({ attribute: 'appearance-readonly', mode: 'boolean' })
|
|
75229
|
+
], TextField.prototype, "appearanceReadOnly", void 0);
|
|
75116
75230
|
const nimbleTextField = TextField.compose({
|
|
75117
75231
|
baseName: 'text-field',
|
|
75118
75232
|
baseClass: TextField$1,
|