@ni/ok-components 0.3.7 → 0.3.9
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.
|
@@ -17817,6 +17817,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
17817
17817
|
:host([selected]) .control {
|
|
17818
17818
|
--ni-private-step-icon-color: ${borderHoverColor};
|
|
17819
17819
|
--ni-private-step-icon-border-color: ${borderHoverColor};
|
|
17820
|
+
--ni-private-step-icon-border-width: 2px;
|
|
17820
17821
|
--ni-private-step-icon-background-color: rgb(from ${borderHoverColor} r g b / 30%);
|
|
17821
17822
|
--ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
|
|
17822
17823
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
@@ -17856,10 +17857,6 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
17856
17857
|
box-shadow ${smallDelay} ease-in-out;
|
|
17857
17858
|
}
|
|
17858
17859
|
|
|
17859
|
-
:host([selected]) .icon {
|
|
17860
|
-
--ni-private-step-icon-border-width: 2px;
|
|
17861
|
-
}
|
|
17862
|
-
|
|
17863
17860
|
.icon::before {
|
|
17864
17861
|
content: '';
|
|
17865
17862
|
position: absolute;
|
|
@@ -17869,7 +17866,8 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
17869
17866
|
outline-color: var(--ni-private-step-icon-outline-inset-color);
|
|
17870
17867
|
outline-style: solid;
|
|
17871
17868
|
outline-width: 0px;
|
|
17872
|
-
outline-offset
|
|
17869
|
+
${'' /* outline-offset should always be <=-1 to always render inset */}
|
|
17870
|
+
outline-offset: -1px;
|
|
17873
17871
|
border: none;
|
|
17874
17872
|
border-radius: 100%;
|
|
17875
17873
|
color: transparent;
|
|
@@ -17947,9 +17945,9 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
17947
17945
|
min-width: ${standardPadding};
|
|
17948
17946
|
height: 1px;
|
|
17949
17947
|
min-height: 1px;
|
|
17948
|
+
transform: scale(1, 1);
|
|
17950
17949
|
background: var(--ni-private-step-line-color);
|
|
17951
17950
|
background-clip: content-box;
|
|
17952
|
-
transform: scale(1, 1);
|
|
17953
17951
|
transition:
|
|
17954
17952
|
background-color ${smallDelay} ease-in-out,
|
|
17955
17953
|
transform ${smallDelay} ease-in-out;
|
|
@@ -17963,8 +17961,8 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
17963
17961
|
width: 1px;
|
|
17964
17962
|
min-width: 1px;
|
|
17965
17963
|
height: 100%;
|
|
17966
|
-
padding-top: ${smallPadding};
|
|
17967
17964
|
min-height: ${standardPadding};
|
|
17965
|
+
padding-top: ${smallPadding};
|
|
17968
17966
|
}
|
|
17969
17967
|
|
|
17970
17968
|
.subtitle {
|
|
@@ -17993,6 +17991,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
17993
17991
|
@layer hover {
|
|
17994
17992
|
.control:hover {
|
|
17995
17993
|
--ni-private-step-icon-border-color: ${borderHoverColor};
|
|
17994
|
+
--ni-private-step-icon-border-width: 2px;
|
|
17996
17995
|
--ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
|
|
17997
17996
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
17998
17997
|
}
|
|
@@ -18023,8 +18022,12 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
18023
18022
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
18024
18023
|
}
|
|
18025
18024
|
|
|
18026
|
-
.control:hover
|
|
18027
|
-
--ni-private-step-icon-
|
|
18025
|
+
:host([readonly]) .control:hover {
|
|
18026
|
+
--ni-private-step-icon-color: revert-layer;
|
|
18027
|
+
--ni-private-step-icon-border-color: revert-layer;
|
|
18028
|
+
--ni-private-step-icon-border-width: revert-layer;
|
|
18029
|
+
--ni-private-step-icon-background-size: revert-layer;
|
|
18030
|
+
--ni-private-step-line-color: revert-layer;
|
|
18028
18031
|
}
|
|
18029
18032
|
|
|
18030
18033
|
.control:hover .line {
|
|
@@ -18034,11 +18037,16 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
18034
18037
|
.container.vertical .control:hover .line {
|
|
18035
18038
|
transform: scale(2, 1);
|
|
18036
18039
|
}
|
|
18040
|
+
|
|
18041
|
+
:host([readonly]) .container .control:hover .line {
|
|
18042
|
+
transform: revert-layer;
|
|
18043
|
+
}
|
|
18037
18044
|
}
|
|
18038
18045
|
|
|
18039
18046
|
@layer focusVisible {
|
|
18040
18047
|
.control${focusVisible} {
|
|
18041
18048
|
--ni-private-step-icon-border-color: ${borderHoverColor};
|
|
18049
|
+
--ni-private-step-icon-border-width: 2px;
|
|
18042
18050
|
--ni-private-step-icon-outline-inset-color: ${borderHoverColor};
|
|
18043
18051
|
--ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
|
|
18044
18052
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
@@ -18074,10 +18082,6 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
18074
18082
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
18075
18083
|
}
|
|
18076
18084
|
|
|
18077
|
-
.control${focusVisible} .icon {
|
|
18078
|
-
--ni-private-step-icon-border-width: 2px;
|
|
18079
|
-
}
|
|
18080
|
-
|
|
18081
18085
|
.control${focusVisible} .icon::before {
|
|
18082
18086
|
outline-width: ${borderWidth};
|
|
18083
18087
|
${'' /* -1px control to outline edge -2px focus border -1px inset gap */}
|
|
@@ -18096,6 +18100,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
18096
18100
|
@layer active {
|
|
18097
18101
|
.control:active {
|
|
18098
18102
|
--ni-private-step-icon-border-color: ${borderHoverColor};
|
|
18103
|
+
--ni-private-step-icon-border-width: 2px;
|
|
18099
18104
|
--ni-private-step-icon-background-color: ${fillSelectedColor};
|
|
18100
18105
|
--ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
|
|
18101
18106
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
@@ -18127,26 +18132,45 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
18127
18132
|
--ni-private-step-line-color: ${borderHoverColor};
|
|
18128
18133
|
}
|
|
18129
18134
|
|
|
18130
|
-
.control:active
|
|
18131
|
-
--ni-private-step-icon-
|
|
18135
|
+
:host([readonly]) .control:active {
|
|
18136
|
+
--ni-private-step-icon-color: revert-layer;
|
|
18137
|
+
--ni-private-step-icon-border-color: revert-layer;
|
|
18138
|
+
--ni-private-step-icon-border-width: revert-layer;
|
|
18139
|
+
--ni-private-step-icon-background-color: revert-layer;
|
|
18140
|
+
--ni-private-step-icon-background-size: revert-layer;
|
|
18141
|
+
--ni-private-step-line-color: revert-layer;
|
|
18132
18142
|
}
|
|
18133
18143
|
|
|
18134
18144
|
.control:active .icon::before {
|
|
18135
18145
|
outline-width: 0px;
|
|
18136
|
-
outline-offset:
|
|
18146
|
+
outline-offset: -1px;
|
|
18147
|
+
}
|
|
18148
|
+
|
|
18149
|
+
:host([readonly]) .control:active .icon::before {
|
|
18150
|
+
outline-width: revert-layer;
|
|
18151
|
+
outline-offset: revert-layer;
|
|
18137
18152
|
}
|
|
18138
18153
|
|
|
18139
18154
|
.control:active .line {
|
|
18140
18155
|
transform: scale(1, 1);
|
|
18141
18156
|
}
|
|
18157
|
+
|
|
18158
|
+
:host([readonly]) .control:active .line {
|
|
18159
|
+
transform: revert-layer;
|
|
18160
|
+
}
|
|
18142
18161
|
}
|
|
18143
18162
|
|
|
18144
18163
|
@layer disabled {
|
|
18164
|
+
:host([readonly]) .control {
|
|
18165
|
+
cursor: default;
|
|
18166
|
+
}
|
|
18167
|
+
|
|
18145
18168
|
:host([disabled]) .control {
|
|
18146
18169
|
cursor: default;
|
|
18147
18170
|
color: ${buttonLabelDisabledFontColor};
|
|
18148
18171
|
--ni-private-step-icon-color: rgb(from ${buttonLabelFontColor} r g b / 30%);
|
|
18149
18172
|
--ni-private-step-icon-border-color: transparent;
|
|
18173
|
+
--ni-private-step-icon-border-width: 1px;
|
|
18150
18174
|
--ni-private-step-icon-background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
18151
18175
|
--ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
|
|
18152
18176
|
--ni-private-step-icon-outline-inset-color: transparent;
|
|
@@ -19460,6 +19484,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
19460
19484
|
aria-owns="${x => x.ariaOwns}"
|
|
19461
19485
|
aria-relevant="${x => x.ariaRelevant}"
|
|
19462
19486
|
aria-roledescription="${x => x.ariaRoledescription}"
|
|
19487
|
+
@click="${(x, c) => x.onClick(c.event)}"
|
|
19463
19488
|
${ref('control')}
|
|
19464
19489
|
>
|
|
19465
19490
|
<div class="icon-background"></div>
|
|
@@ -19545,6 +19570,15 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
19545
19570
|
*/
|
|
19546
19571
|
this.stepInternals = new StepInternals();
|
|
19547
19572
|
}
|
|
19573
|
+
/**
|
|
19574
|
+
* @internal
|
|
19575
|
+
*/
|
|
19576
|
+
onClick(e) {
|
|
19577
|
+
if (this.disabled || this.readOnly) {
|
|
19578
|
+
e.preventDefault();
|
|
19579
|
+
e.stopImmediatePropagation();
|
|
19580
|
+
}
|
|
19581
|
+
}
|
|
19548
19582
|
}
|
|
19549
19583
|
__decorate([
|
|
19550
19584
|
attr()
|
|
@@ -32803,7 +32837,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
32803
32837
|
return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));
|
|
32804
32838
|
}
|
|
32805
32839
|
map(mapping) {
|
|
32806
|
-
let
|
|
32840
|
+
let to = mapping.mapResult(this.to, -1);
|
|
32841
|
+
let from = this.from == this.to && ReplaceStep.MAP_BIAS < 0 ? to : mapping.mapResult(this.from, 1);
|
|
32807
32842
|
if (from.deletedAcross && to.deletedAcross)
|
|
32808
32843
|
return null;
|
|
32809
32844
|
return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice, this.structure);
|
|
@@ -32842,6 +32877,15 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
32842
32877
|
return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure);
|
|
32843
32878
|
}
|
|
32844
32879
|
}
|
|
32880
|
+
/**
|
|
32881
|
+
By default, for backwards compatibility, an inserting step
|
|
32882
|
+
mapped over an insertion at that same position fill move after
|
|
32883
|
+
the inserted content. In a collaborative editing situation, that
|
|
32884
|
+
can make redone insertions appear in unexpected places. You can
|
|
32885
|
+
set this to -1 to make such mapping keep the step before the
|
|
32886
|
+
insertion instead.
|
|
32887
|
+
*/
|
|
32888
|
+
ReplaceStep.MAP_BIAS = 1;
|
|
32845
32889
|
Step$1.jsonID("replace", ReplaceStep);
|
|
32846
32890
|
/**
|
|
32847
32891
|
Replace a part of the document with a slice of content, but
|
|
@@ -33828,6 +33872,26 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
33828
33872
|
}
|
|
33829
33873
|
function deleteRange$1(tr, from, to) {
|
|
33830
33874
|
let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);
|
|
33875
|
+
// When the deleted range spans from the start of one textblock to
|
|
33876
|
+
// the start of another one, move out of the start of both blocks.
|
|
33877
|
+
if ($from.parent.isTextblock && $to.parent.isTextblock && $from.start() != $to.start() &&
|
|
33878
|
+
$from.parentOffset == 0 && $to.parentOffset == 0) {
|
|
33879
|
+
let shared = $from.sharedDepth(to), isolated = false;
|
|
33880
|
+
for (let d = $from.depth; d > shared; d--)
|
|
33881
|
+
if ($from.node(d).type.spec.isolating)
|
|
33882
|
+
isolated = true;
|
|
33883
|
+
for (let d = $to.depth; d > shared; d--)
|
|
33884
|
+
if ($to.node(d).type.spec.isolating)
|
|
33885
|
+
isolated = true;
|
|
33886
|
+
if (!isolated) {
|
|
33887
|
+
for (let d = $from.depth; d > 0 && from == $from.start(d); d--)
|
|
33888
|
+
from = $from.before(d);
|
|
33889
|
+
for (let d = $to.depth; d > 0 && to == $to.start(d); d--)
|
|
33890
|
+
to = $to.before(d);
|
|
33891
|
+
$from = tr.doc.resolve(from);
|
|
33892
|
+
$to = tr.doc.resolve(to);
|
|
33893
|
+
}
|
|
33894
|
+
}
|
|
33831
33895
|
let covered = coveredDepths($from, $to);
|
|
33832
33896
|
for (let i = 0; i < covered.length; i++) {
|
|
33833
33897
|
let depth = covered[i], last = i == covered.length - 1;
|
|
@@ -42576,7 +42640,6 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42576
42640
|
return !!findMarkInSet(marks, type, attributes);
|
|
42577
42641
|
}
|
|
42578
42642
|
function getMarkRange($pos, type, attributes) {
|
|
42579
|
-
var _a;
|
|
42580
42643
|
if (!$pos || !type) {
|
|
42581
42644
|
return;
|
|
42582
42645
|
}
|
|
@@ -42587,7 +42650,12 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42587
42650
|
if (!start.node || !start.node.marks.some((mark2) => mark2.type === type)) {
|
|
42588
42651
|
return;
|
|
42589
42652
|
}
|
|
42590
|
-
|
|
42653
|
+
if (!attributes) {
|
|
42654
|
+
const firstMark = start.node.marks.find((mark2) => mark2.type === type);
|
|
42655
|
+
if (firstMark) {
|
|
42656
|
+
attributes = firstMark.attrs;
|
|
42657
|
+
}
|
|
42658
|
+
}
|
|
42591
42659
|
const mark = findMarkInSet([...start.node.marks], type, attributes);
|
|
42592
42660
|
if (!mark) {
|
|
42593
42661
|
return;
|
|
@@ -42622,7 +42690,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42622
42690
|
}
|
|
42623
42691
|
|
|
42624
42692
|
// src/commands/extendMarkRange.ts
|
|
42625
|
-
var extendMarkRange = (typeOrName, attributes
|
|
42693
|
+
var extendMarkRange = (typeOrName, attributes) => ({ tr, state, dispatch }) => {
|
|
42626
42694
|
const type = getMarkType(typeOrName, state.schema);
|
|
42627
42695
|
const { doc, selection } = tr;
|
|
42628
42696
|
const { $from, from, to } = selection;
|
|
@@ -45877,7 +45945,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
45877
45945
|
const newEnd = mapping.slice(index).map(step.to);
|
|
45878
45946
|
const oldStart = mapping.invert().map(newStart, -1);
|
|
45879
45947
|
const oldEnd = mapping.invert().map(newEnd);
|
|
45880
|
-
const foundBeforeMark = (_a3 = nextTransaction.doc.nodeAt(newStart - 1)) == null ? void 0 : _a3.marks.some((mark) => mark.eq(step.mark));
|
|
45948
|
+
const foundBeforeMark = newStart > 0 ? (_a3 = nextTransaction.doc.nodeAt(newStart - 1)) == null ? void 0 : _a3.marks.some((mark) => mark.eq(step.mark)) : false;
|
|
45881
45949
|
const foundAfterMark = (_b3 = nextTransaction.doc.nodeAt(newEnd)) == null ? void 0 : _b3.marks.some((mark) => mark.eq(step.mark));
|
|
45882
45950
|
this.editor.emit("delete", {
|
|
45883
45951
|
type: "mark",
|
|
@@ -61858,6 +61926,19 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
61858
61926
|
}
|
|
61859
61927
|
|
|
61860
61928
|
// src/suggestion.ts
|
|
61929
|
+
function hasInsertedWhitespace(transaction) {
|
|
61930
|
+
if (!transaction.docChanged) {
|
|
61931
|
+
return false;
|
|
61932
|
+
}
|
|
61933
|
+
return transaction.steps.some((step) => {
|
|
61934
|
+
const slice = step.slice;
|
|
61935
|
+
if (!(slice == null ? void 0 : slice.content)) {
|
|
61936
|
+
return false;
|
|
61937
|
+
}
|
|
61938
|
+
const inserted = slice.content.textBetween(0, slice.content.size, "\n");
|
|
61939
|
+
return /\s/.test(inserted);
|
|
61940
|
+
});
|
|
61941
|
+
}
|
|
61861
61942
|
var SuggestionPluginKey = new PluginKey("suggestion");
|
|
61862
61943
|
function Suggestion({
|
|
61863
61944
|
pluginKey = SuggestionPluginKey,
|
|
@@ -61876,10 +61957,12 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
61876
61957
|
render = () => ({}),
|
|
61877
61958
|
allow = () => true,
|
|
61878
61959
|
findSuggestionMatch: findSuggestionMatch2 = findSuggestionMatch,
|
|
61879
|
-
shouldShow
|
|
61960
|
+
shouldShow,
|
|
61961
|
+
shouldResetDismissed
|
|
61880
61962
|
}) {
|
|
61881
61963
|
let props;
|
|
61882
61964
|
const renderer = render == null ? void 0 : render();
|
|
61965
|
+
const effectiveAllowSpaces = allowSpaces && !allowToIncludeChar;
|
|
61883
61966
|
const getAnchorClientRect = () => {
|
|
61884
61967
|
const pos = editor.state.selection.$anchor.pos;
|
|
61885
61968
|
const coords = editor.view.coordsAtPos(pos);
|
|
@@ -61901,6 +61984,27 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
61901
61984
|
return (currentDecorationNode == null ? void 0 : currentDecorationNode.getBoundingClientRect()) || null;
|
|
61902
61985
|
};
|
|
61903
61986
|
};
|
|
61987
|
+
const shouldKeepDismissed = ({
|
|
61988
|
+
match,
|
|
61989
|
+
dismissedRange,
|
|
61990
|
+
state,
|
|
61991
|
+
transaction
|
|
61992
|
+
}) => {
|
|
61993
|
+
if (shouldResetDismissed == null ? void 0 : shouldResetDismissed({
|
|
61994
|
+
editor,
|
|
61995
|
+
state,
|
|
61996
|
+
range: dismissedRange,
|
|
61997
|
+
match,
|
|
61998
|
+
transaction,
|
|
61999
|
+
allowSpaces: effectiveAllowSpaces
|
|
62000
|
+
})) {
|
|
62001
|
+
return false;
|
|
62002
|
+
}
|
|
62003
|
+
if (effectiveAllowSpaces) {
|
|
62004
|
+
return match.range.from === dismissedRange.from;
|
|
62005
|
+
}
|
|
62006
|
+
return match.range.from === dismissedRange.from && !hasInsertedWhitespace(transaction);
|
|
62007
|
+
};
|
|
61904
62008
|
function dispatchExit(view, pluginKeyRef) {
|
|
61905
62009
|
var _a;
|
|
61906
62010
|
try {
|
|
@@ -62003,7 +62107,8 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
62003
62107
|
},
|
|
62004
62108
|
query: null,
|
|
62005
62109
|
text: null,
|
|
62006
|
-
composing: false
|
|
62110
|
+
composing: false,
|
|
62111
|
+
dismissedRange: null
|
|
62007
62112
|
};
|
|
62008
62113
|
return state;
|
|
62009
62114
|
},
|
|
@@ -62021,9 +62126,16 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
62021
62126
|
next.range = { from: 0, to: 0 };
|
|
62022
62127
|
next.query = null;
|
|
62023
62128
|
next.text = null;
|
|
62129
|
+
next.dismissedRange = prev.active ? { ...prev.range } : prev.dismissedRange;
|
|
62024
62130
|
return next;
|
|
62025
62131
|
}
|
|
62026
62132
|
next.composing = composing;
|
|
62133
|
+
if (transaction.docChanged && next.dismissedRange !== null) {
|
|
62134
|
+
next.dismissedRange = {
|
|
62135
|
+
from: transaction.mapping.map(next.dismissedRange.from),
|
|
62136
|
+
to: transaction.mapping.map(next.dismissedRange.to)
|
|
62137
|
+
};
|
|
62138
|
+
}
|
|
62027
62139
|
if (isEditable && (empty || editor.view.composing)) {
|
|
62028
62140
|
if ((from < prev.range.from || from > prev.range.to) && !composing && !prev.composing) {
|
|
62029
62141
|
next.active = false;
|
|
@@ -62049,12 +62161,27 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
62049
62161
|
text: match.text,
|
|
62050
62162
|
transaction
|
|
62051
62163
|
}))) {
|
|
62052
|
-
next.
|
|
62053
|
-
|
|
62054
|
-
|
|
62055
|
-
|
|
62056
|
-
|
|
62164
|
+
if (next.dismissedRange !== null && !shouldKeepDismissed({
|
|
62165
|
+
match,
|
|
62166
|
+
dismissedRange: next.dismissedRange,
|
|
62167
|
+
state,
|
|
62168
|
+
transaction
|
|
62169
|
+
})) {
|
|
62170
|
+
next.dismissedRange = null;
|
|
62171
|
+
}
|
|
62172
|
+
if (next.dismissedRange === null) {
|
|
62173
|
+
next.active = true;
|
|
62174
|
+
next.decorationId = prev.decorationId ? prev.decorationId : decorationId;
|
|
62175
|
+
next.range = match.range;
|
|
62176
|
+
next.query = match.query;
|
|
62177
|
+
next.text = match.text;
|
|
62178
|
+
} else {
|
|
62179
|
+
next.active = false;
|
|
62180
|
+
}
|
|
62057
62181
|
} else {
|
|
62182
|
+
if (!match) {
|
|
62183
|
+
next.dismissedRange = null;
|
|
62184
|
+
}
|
|
62058
62185
|
next.active = false;
|
|
62059
62186
|
}
|
|
62060
62187
|
} else {
|
|
@@ -62072,41 +62199,18 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
62072
62199
|
props: {
|
|
62073
62200
|
// Call the keydown hook if suggestion is active.
|
|
62074
62201
|
handleKeyDown(view, event) {
|
|
62075
|
-
var _a, _b
|
|
62202
|
+
var _a, _b;
|
|
62076
62203
|
const { active, range } = plugin.getState(view.state);
|
|
62077
62204
|
if (!active) {
|
|
62078
62205
|
return false;
|
|
62079
62206
|
}
|
|
62080
62207
|
if (event.key === "Escape" || event.key === "Esc") {
|
|
62081
62208
|
const state = plugin.getState(view.state);
|
|
62082
|
-
|
|
62083
|
-
const decorationNode = cachedNode != null ? cachedNode : (state == null ? void 0 : state.decorationId) ? view.dom.querySelector(`[data-decoration-id="${state.decorationId}"]`) : null;
|
|
62084
|
-
const handledByKeyDown = ((_b = renderer == null ? void 0 : renderer.onKeyDown) == null ? void 0 : _b.call(renderer, { view, event, range: state.range })) || false;
|
|
62085
|
-
if (handledByKeyDown) {
|
|
62086
|
-
return true;
|
|
62087
|
-
}
|
|
62088
|
-
const exitProps = {
|
|
62089
|
-
editor,
|
|
62090
|
-
range: state.range,
|
|
62091
|
-
query: state.query,
|
|
62092
|
-
text: state.text,
|
|
62093
|
-
items: [],
|
|
62094
|
-
command: (commandProps) => {
|
|
62095
|
-
return command({ editor, range: state.range, props: commandProps });
|
|
62096
|
-
},
|
|
62097
|
-
decorationNode,
|
|
62098
|
-
// If we have a cached decoration node, use it for the clientRect
|
|
62099
|
-
// to avoid another DOM lookup. If not, leave clientRect null and
|
|
62100
|
-
// let consumer decide if they want to query.
|
|
62101
|
-
clientRect: decorationNode ? () => {
|
|
62102
|
-
return decorationNode.getBoundingClientRect() || null;
|
|
62103
|
-
} : null
|
|
62104
|
-
};
|
|
62105
|
-
(_c = renderer == null ? void 0 : renderer.onExit) == null ? void 0 : _c.call(renderer, exitProps);
|
|
62209
|
+
(_a = renderer == null ? void 0 : renderer.onKeyDown) == null ? void 0 : _a.call(renderer, { view, event, range: state.range });
|
|
62106
62210
|
dispatchExit(view, pluginKey);
|
|
62107
62211
|
return true;
|
|
62108
62212
|
}
|
|
62109
|
-
const handled = ((
|
|
62213
|
+
const handled = ((_b = renderer == null ? void 0 : renderer.onKeyDown) == null ? void 0 : _b.call(renderer, { view, event, range })) || false;
|
|
62110
62214
|
return handled;
|
|
62111
62215
|
},
|
|
62112
62216
|
// Setup decorator on the currently active suggestion.
|
|
@@ -62399,7 +62503,8 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
62399
62503
|
return helpers.parseChildren([tokens[0]]);
|
|
62400
62504
|
}
|
|
62401
62505
|
const content = helpers.parseInline(tokens);
|
|
62402
|
-
|
|
62506
|
+
const hasExplicitEmptyParagraphMarker = tokens.length === 1 && tokens[0].type === "text" && (tokens[0].raw === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].text === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].raw === NBSP_CHAR || tokens[0].text === NBSP_CHAR);
|
|
62507
|
+
if (hasExplicitEmptyParagraphMarker && content.length === 1 && content[0].type === "text" && (content[0].text === EMPTY_PARAGRAPH_MARKDOWN || content[0].text === NBSP_CHAR)) {
|
|
62403
62508
|
return helpers.createNode("paragraph", void 0, []);
|
|
62404
62509
|
}
|
|
62405
62510
|
return helpers.createNode("paragraph", void 0, content);
|
|
@@ -63716,6 +63821,7 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
63716
63821
|
];
|
|
63717
63822
|
}
|
|
63718
63823
|
});
|
|
63824
|
+
var skipTrailingNodeMeta = "skipTrailingNode";
|
|
63719
63825
|
function nodeEqualsType({ types, node }) {
|
|
63720
63826
|
return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types;
|
|
63721
63827
|
}
|
|
@@ -63735,11 +63841,14 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
63735
63841
|
return [
|
|
63736
63842
|
new Plugin({
|
|
63737
63843
|
key: plugin,
|
|
63738
|
-
appendTransaction: (
|
|
63844
|
+
appendTransaction: (transactions, __, state) => {
|
|
63739
63845
|
const { doc, tr, schema } = state;
|
|
63740
63846
|
const shouldInsertNodeAtEnd = plugin.getState(state);
|
|
63741
63847
|
const endPosition = doc.content.size;
|
|
63742
63848
|
const type = schema.nodes[defaultNode];
|
|
63849
|
+
if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) {
|
|
63850
|
+
return;
|
|
63851
|
+
}
|
|
63743
63852
|
if (!shouldInsertNodeAtEnd) {
|
|
63744
63853
|
return;
|
|
63745
63854
|
}
|
|
@@ -66452,6 +66561,7 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
66452
66561
|
aria-pressed="${x => x.ariaPressed}"
|
|
66453
66562
|
aria-relevant="${x => x.ariaRelevant}"
|
|
66454
66563
|
aria-roledescription="${x => x.ariaRoledescription}"
|
|
66564
|
+
@click="${(x, c) => x.onClick(c.event)}"
|
|
66455
66565
|
${ref('control')}
|
|
66456
66566
|
>
|
|
66457
66567
|
<div class="icon-background"></div>
|
|
@@ -66505,6 +66615,15 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
66505
66615
|
*/
|
|
66506
66616
|
this.stepInternals = new StepInternals();
|
|
66507
66617
|
}
|
|
66618
|
+
/**
|
|
66619
|
+
* @internal
|
|
66620
|
+
*/
|
|
66621
|
+
onClick(e) {
|
|
66622
|
+
if (this.disabled || this.readOnly) {
|
|
66623
|
+
e.preventDefault();
|
|
66624
|
+
e.stopImmediatePropagation();
|
|
66625
|
+
}
|
|
66626
|
+
}
|
|
66508
66627
|
}
|
|
66509
66628
|
__decorate([
|
|
66510
66629
|
attr()
|