@ni/spright-components 4.2.2 → 4.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.
- package/README.md +4 -4
- package/dist/all-components-bundle.js +386 -200
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2336 -2293
- package/dist/all-components-bundle.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -20337,7 +20337,42 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20337
20337
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
20338
20338
|
|
|
20339
20339
|
const styles$N = css `
|
|
20340
|
+
.error-icon {
|
|
20341
|
+
display: none;
|
|
20342
|
+
}
|
|
20343
|
+
|
|
20344
|
+
:host([error-visible]) .error-icon {
|
|
20345
|
+
display: inline-flex;
|
|
20346
|
+
width: ${iconSize};
|
|
20347
|
+
height: ${iconSize};
|
|
20348
|
+
flex: none;
|
|
20349
|
+
}
|
|
20350
|
+
|
|
20351
|
+
.error-text {
|
|
20352
|
+
display: none;
|
|
20353
|
+
}
|
|
20354
|
+
|
|
20355
|
+
:host([error-visible]) .error-text {
|
|
20356
|
+
display: block;
|
|
20357
|
+
font: ${errorTextFont};
|
|
20358
|
+
color: ${failColor};
|
|
20359
|
+
width: 100%;
|
|
20360
|
+
position: absolute;
|
|
20361
|
+
bottom: calc(-1 * (${errorTextFontLineHeight} + 2px));
|
|
20362
|
+
left: 0px;
|
|
20363
|
+
overflow: hidden;
|
|
20364
|
+
text-overflow: ellipsis;
|
|
20365
|
+
white-space: nowrap;
|
|
20366
|
+
}
|
|
20367
|
+
|
|
20368
|
+
:host([error-visible]) .error-text:empty {
|
|
20369
|
+
display: none;
|
|
20370
|
+
}
|
|
20371
|
+
`;
|
|
20372
|
+
|
|
20373
|
+
const styles$M = css `
|
|
20340
20374
|
${display$1('inline-flex')}
|
|
20375
|
+
${styles$N}
|
|
20341
20376
|
|
|
20342
20377
|
:host {
|
|
20343
20378
|
font: ${bodyFont};
|
|
@@ -20345,16 +20380,25 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20345
20380
|
cursor: pointer;
|
|
20346
20381
|
outline: none;
|
|
20347
20382
|
${userSelectNone}
|
|
20383
|
+
min-height: ${controlHeight};
|
|
20348
20384
|
}
|
|
20349
20385
|
|
|
20350
20386
|
:host([disabled]) {
|
|
20351
20387
|
cursor: default;
|
|
20352
20388
|
}
|
|
20353
20389
|
|
|
20390
|
+
.container {
|
|
20391
|
+
position: relative;
|
|
20392
|
+
display: grid;
|
|
20393
|
+
grid-template-columns: auto 1fr auto;
|
|
20394
|
+
grid-template-rows: ${bodyFontLineHeight} auto;
|
|
20395
|
+
align-items: center;
|
|
20396
|
+
width: 100%;
|
|
20397
|
+
}
|
|
20398
|
+
|
|
20354
20399
|
.control {
|
|
20355
|
-
width:
|
|
20356
|
-
height:
|
|
20357
|
-
flex-shrink: 0;
|
|
20400
|
+
width: ${iconSize};
|
|
20401
|
+
height: ${iconSize};
|
|
20358
20402
|
border: ${borderWidth} solid ${borderColor};
|
|
20359
20403
|
padding: 2px;
|
|
20360
20404
|
display: inline-flex;
|
|
@@ -20367,6 +20411,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20367
20411
|
* Set it to 0 to ensure the outline is just as high as the control.
|
|
20368
20412
|
*/ ''}
|
|
20369
20413
|
line-height: 0;
|
|
20414
|
+
grid-column: 1;
|
|
20415
|
+
grid-row: 1;
|
|
20370
20416
|
}
|
|
20371
20417
|
|
|
20372
20418
|
@media (prefers-reduced-motion) {
|
|
@@ -20394,7 +20440,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20394
20440
|
.label {
|
|
20395
20441
|
font: inherit;
|
|
20396
20442
|
color: ${bodyFontColor};
|
|
20397
|
-
padding-left:
|
|
20443
|
+
padding-left: ${mediumPadding};
|
|
20444
|
+
grid-column: 2;
|
|
20445
|
+
grid-row: 1 / span 2;
|
|
20398
20446
|
cursor: inherit;
|
|
20399
20447
|
}
|
|
20400
20448
|
|
|
@@ -20411,16 +20459,13 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20411
20459
|
height: ${iconSize};
|
|
20412
20460
|
width: ${iconSize};
|
|
20413
20461
|
overflow: visible;
|
|
20462
|
+
fill: ${borderColor};
|
|
20414
20463
|
}
|
|
20415
20464
|
|
|
20416
20465
|
:host(.checked:not(.indeterminate)) slot[name='checked-indicator'] {
|
|
20417
20466
|
display: contents;
|
|
20418
20467
|
}
|
|
20419
20468
|
|
|
20420
|
-
slot[name='checked-indicator'] svg {
|
|
20421
|
-
fill: ${borderColor};
|
|
20422
|
-
}
|
|
20423
|
-
|
|
20424
20469
|
:host([disabled]) slot[name='checked-indicator'] svg {
|
|
20425
20470
|
fill: rgba(${borderRgbPartialColor}, 0.3);
|
|
20426
20471
|
}
|
|
@@ -20442,6 +20487,18 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20442
20487
|
:host([disabled]) slot[name='indeterminate-indicator'] svg {
|
|
20443
20488
|
fill: rgba(${borderRgbPartialColor}, 0.3);
|
|
20444
20489
|
}
|
|
20490
|
+
|
|
20491
|
+
.error-icon {
|
|
20492
|
+
grid-column: 3;
|
|
20493
|
+
grid-row: 1;
|
|
20494
|
+
margin: 0px ${smallPadding};
|
|
20495
|
+
}
|
|
20496
|
+
`;
|
|
20497
|
+
|
|
20498
|
+
const errorTextTemplate = html `
|
|
20499
|
+
<div class="error-text" title="${x => x.errorText}" aria-live="polite">
|
|
20500
|
+
${x => x.errorText}
|
|
20501
|
+
</div>
|
|
20445
20502
|
`;
|
|
20446
20503
|
|
|
20447
20504
|
const template$C = (_context, definition) => html `
|
|
@@ -20456,22 +20513,29 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20456
20513
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
20457
20514
|
class="${x => (x.readOnly ? 'readonly' : '')} ${x => (x.checked ? 'checked' : '')} ${x => (x.indeterminate ? 'indeterminate' : '')}"
|
|
20458
20515
|
>
|
|
20459
|
-
<div part="
|
|
20460
|
-
<
|
|
20461
|
-
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20516
|
+
<div part="container" class="container">
|
|
20517
|
+
<div part="control" class="control">
|
|
20518
|
+
<slot name="checked-indicator">
|
|
20519
|
+
${definition.checkedIndicator || ''}
|
|
20520
|
+
</slot>
|
|
20521
|
+
<slot name="indeterminate-indicator">
|
|
20522
|
+
${definition.indeterminateIndicator || ''}
|
|
20523
|
+
</slot>
|
|
20524
|
+
</div>
|
|
20525
|
+
<label
|
|
20526
|
+
part="label"
|
|
20527
|
+
class="${x => (x.defaultSlottedNodes?.length
|
|
20470
20528
|
? 'label'
|
|
20471
20529
|
: 'label label__hidden')}"
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20530
|
+
>
|
|
20531
|
+
<slot ${slotted('defaultSlottedNodes')}></slot>
|
|
20532
|
+
</label>
|
|
20533
|
+
<${iconExclamationMarkTag}
|
|
20534
|
+
severity="error"
|
|
20535
|
+
class="error-icon"
|
|
20536
|
+
></${iconExclamationMarkTag}>
|
|
20537
|
+
${errorTextTemplate}
|
|
20538
|
+
</div>
|
|
20475
20539
|
</template>
|
|
20476
20540
|
`;
|
|
20477
20541
|
|
|
@@ -20479,6 +20543,10 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20479
20543
|
* A nimble-styled checkbox control.
|
|
20480
20544
|
*/
|
|
20481
20545
|
class Checkbox extends Checkbox$1 {
|
|
20546
|
+
constructor() {
|
|
20547
|
+
super(...arguments);
|
|
20548
|
+
this.errorVisible = false;
|
|
20549
|
+
}
|
|
20482
20550
|
/**
|
|
20483
20551
|
* @internal
|
|
20484
20552
|
*/
|
|
@@ -20490,18 +20558,24 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20490
20558
|
__decorate$1([
|
|
20491
20559
|
attr({ attribute: 'tabindex', converter: nullableNumberConverter })
|
|
20492
20560
|
], Checkbox.prototype, "tabIndex", void 0);
|
|
20561
|
+
__decorate$1([
|
|
20562
|
+
attr({ attribute: 'error-text' })
|
|
20563
|
+
], Checkbox.prototype, "errorText", void 0);
|
|
20564
|
+
__decorate$1([
|
|
20565
|
+
attr({ attribute: 'error-visible', mode: 'boolean' })
|
|
20566
|
+
], Checkbox.prototype, "errorVisible", void 0);
|
|
20493
20567
|
const nimbleCheckbox = Checkbox.compose({
|
|
20494
20568
|
baseName: 'checkbox',
|
|
20495
20569
|
baseClass: Checkbox$1,
|
|
20496
20570
|
template: template$C,
|
|
20497
|
-
styles: styles$
|
|
20571
|
+
styles: styles$M,
|
|
20498
20572
|
checkedIndicator: check16X16.data,
|
|
20499
20573
|
indeterminateIndicator: minus16X16.data
|
|
20500
20574
|
});
|
|
20501
20575
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
20502
20576
|
const checkboxTag = 'nimble-checkbox';
|
|
20503
20577
|
|
|
20504
|
-
const styles$
|
|
20578
|
+
const styles$L = css `
|
|
20505
20579
|
${styles$$}
|
|
20506
20580
|
${buttonAppearanceVariantStyles}
|
|
20507
20581
|
|
|
@@ -20648,7 +20722,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20648
20722
|
const nimbleToggleButton = ToggleButton.compose({
|
|
20649
20723
|
baseName: 'toggle-button',
|
|
20650
20724
|
template: template$B,
|
|
20651
|
-
styles: styles$
|
|
20725
|
+
styles: styles$L,
|
|
20652
20726
|
shadowOptions: {
|
|
20653
20727
|
delegatesFocus: true
|
|
20654
20728
|
}
|
|
@@ -20656,12 +20730,6 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20656
20730
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToggleButton());
|
|
20657
20731
|
const toggleButtonTag = 'nimble-toggle-button';
|
|
20658
20732
|
|
|
20659
|
-
const errorTextTemplate = html `
|
|
20660
|
-
<div class="error-text" title="${x => x.errorText}" aria-live="polite">
|
|
20661
|
-
${x => x.errorText}
|
|
20662
|
-
</div>
|
|
20663
|
-
`;
|
|
20664
|
-
|
|
20665
20733
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
20666
20734
|
// See generation source in nimble-components/build/generate-icons
|
|
20667
20735
|
/**
|
|
@@ -20686,7 +20754,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20686
20754
|
};
|
|
20687
20755
|
|
|
20688
20756
|
// prettier-ignore
|
|
20689
|
-
const styles$
|
|
20757
|
+
const styles$K = css `
|
|
20690
20758
|
${display$1('inline-flex')}
|
|
20691
20759
|
|
|
20692
20760
|
:host {
|
|
@@ -20955,40 +21023,6 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20955
21023
|
}
|
|
20956
21024
|
`));
|
|
20957
21025
|
|
|
20958
|
-
const styles$K = css `
|
|
20959
|
-
.error-icon {
|
|
20960
|
-
display: none;
|
|
20961
|
-
}
|
|
20962
|
-
|
|
20963
|
-
:host([error-visible]) .error-icon {
|
|
20964
|
-
display: inline-flex;
|
|
20965
|
-
width: ${iconSize};
|
|
20966
|
-
height: ${iconSize};
|
|
20967
|
-
flex: none;
|
|
20968
|
-
}
|
|
20969
|
-
|
|
20970
|
-
.error-text {
|
|
20971
|
-
display: none;
|
|
20972
|
-
}
|
|
20973
|
-
|
|
20974
|
-
:host([error-visible]) .error-text {
|
|
20975
|
-
display: block;
|
|
20976
|
-
font: ${errorTextFont};
|
|
20977
|
-
color: ${failColor};
|
|
20978
|
-
width: 100%;
|
|
20979
|
-
position: absolute;
|
|
20980
|
-
bottom: calc(-1 * (${errorTextFontLineHeight} + 2px));
|
|
20981
|
-
left: 0px;
|
|
20982
|
-
overflow: hidden;
|
|
20983
|
-
text-overflow: ellipsis;
|
|
20984
|
-
white-space: nowrap;
|
|
20985
|
-
}
|
|
20986
|
-
|
|
20987
|
-
:host([error-visible]) .error-text:empty {
|
|
20988
|
-
display: none;
|
|
20989
|
-
}
|
|
20990
|
-
`;
|
|
20991
|
-
|
|
20992
21026
|
/**
|
|
20993
21027
|
* Types of dropdown appearance.
|
|
20994
21028
|
* @public
|
|
@@ -21004,8 +21038,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
21004
21038
|
};
|
|
21005
21039
|
|
|
21006
21040
|
const styles$J = css `
|
|
21007
|
-
${styles$L}
|
|
21008
21041
|
${styles$K}
|
|
21042
|
+
${styles$N}
|
|
21009
21043
|
|
|
21010
21044
|
:host {
|
|
21011
21045
|
--ni-private-hover-bottom-border-width: 2px;
|
|
@@ -26514,7 +26548,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
26514
26548
|
|
|
26515
26549
|
const styles$z = css `
|
|
26516
26550
|
${display$1('inline-block')}
|
|
26517
|
-
${styles$
|
|
26551
|
+
${styles$N}
|
|
26518
26552
|
|
|
26519
26553
|
:host {
|
|
26520
26554
|
font: ${bodyFont};
|
|
@@ -26888,7 +26922,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
26888
26922
|
|
|
26889
26923
|
const styles$x = css `
|
|
26890
26924
|
${display$1('inline-block')}
|
|
26891
|
-
${styles$
|
|
26925
|
+
${styles$N}
|
|
26892
26926
|
|
|
26893
26927
|
.positioning-region {
|
|
26894
26928
|
display: flex;
|
|
@@ -27188,7 +27222,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
27188
27222
|
*/
|
|
27189
27223
|
constructor(
|
|
27190
27224
|
/**
|
|
27191
|
-
|
|
27225
|
+
The child nodes in this fragment.
|
|
27192
27226
|
*/
|
|
27193
27227
|
content, size) {
|
|
27194
27228
|
this.content = content;
|
|
@@ -28300,6 +28334,10 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
28300
28334
|
this.content = content || Fragment.empty;
|
|
28301
28335
|
}
|
|
28302
28336
|
/**
|
|
28337
|
+
The array of this node's child nodes.
|
|
28338
|
+
*/
|
|
28339
|
+
get children() { return this.content.content; }
|
|
28340
|
+
/**
|
|
28303
28341
|
The size of this node, as defined by the integer-based [indexing
|
|
28304
28342
|
scheme](/docs/guide/#doc.indexing). For text nodes, this is the
|
|
28305
28343
|
amount of characters. For other leaf nodes, it is one. For
|
|
@@ -28995,16 +29033,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
28995
29033
|
stream.err("Unexpected token '" + stream.next + "'");
|
|
28996
29034
|
}
|
|
28997
29035
|
}
|
|
28998
|
-
|
|
28999
|
-
|
|
29000
|
-
|
|
29001
|
-
|
|
29002
|
-
|
|
29003
|
-
|
|
29004
|
-
|
|
29005
|
-
|
|
29006
|
-
necessary.
|
|
29007
|
-
*/
|
|
29036
|
+
// Construct an NFA from an expression as returned by the parser. The
|
|
29037
|
+
// NFA is represented as an array of states, which are themselves
|
|
29038
|
+
// arrays of edges, which are `{term, to}` objects. The first state is
|
|
29039
|
+
// the entry state and the last node is the success state.
|
|
29040
|
+
//
|
|
29041
|
+
// Note that unlike typical NFAs, the edge ordering in this one is
|
|
29042
|
+
// significant, in that it is used to contruct filler content when
|
|
29043
|
+
// necessary.
|
|
29008
29044
|
function nfa(expr) {
|
|
29009
29045
|
let nfa = [[]];
|
|
29010
29046
|
connect(compile(expr, 0), node());
|
|
@@ -34704,18 +34740,19 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
34704
34740
|
// custom things with the selection. Note that this falls apart when
|
|
34705
34741
|
// a selection starts in such a node and ends in another, in which
|
|
34706
34742
|
// case we just use whatever domFromPos produces as a best effort.
|
|
34707
|
-
setSelection(anchor, head,
|
|
34743
|
+
setSelection(anchor, head, view, force = false) {
|
|
34708
34744
|
// If the selection falls entirely in a child, give it to that child
|
|
34709
34745
|
let from = Math.min(anchor, head), to = Math.max(anchor, head);
|
|
34710
34746
|
for (let i = 0, offset = 0; i < this.children.length; i++) {
|
|
34711
34747
|
let child = this.children[i], end = offset + child.size;
|
|
34712
34748
|
if (from > offset && to < end)
|
|
34713
|
-
return child.setSelection(anchor - offset - child.border, head - offset - child.border,
|
|
34749
|
+
return child.setSelection(anchor - offset - child.border, head - offset - child.border, view, force);
|
|
34714
34750
|
offset = end;
|
|
34715
34751
|
}
|
|
34716
34752
|
let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);
|
|
34717
34753
|
let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);
|
|
34718
|
-
let domSel = root.getSelection();
|
|
34754
|
+
let domSel = view.root.getSelection();
|
|
34755
|
+
let selRange = view.domSelectionRange();
|
|
34719
34756
|
let brKludge = false;
|
|
34720
34757
|
// On Firefox, using Selection.collapse to put the cursor after a
|
|
34721
34758
|
// BR node for some reason doesn't always work (#1073). On Safari,
|
|
@@ -34746,14 +34783,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
34746
34783
|
}
|
|
34747
34784
|
// Firefox can act strangely when the selection is in front of an
|
|
34748
34785
|
// uneditable node. See #1163 and https://bugzilla.mozilla.org/show_bug.cgi?id=1709536
|
|
34749
|
-
if (gecko &&
|
|
34750
|
-
let after =
|
|
34786
|
+
if (gecko && selRange.focusNode && selRange.focusNode != headDOM.node && selRange.focusNode.nodeType == 1) {
|
|
34787
|
+
let after = selRange.focusNode.childNodes[selRange.focusOffset];
|
|
34751
34788
|
if (after && after.contentEditable == "false")
|
|
34752
34789
|
force = true;
|
|
34753
34790
|
}
|
|
34754
34791
|
if (!(force || brKludge && safari) &&
|
|
34755
|
-
isEquivalentPosition(anchorDOM.node, anchorDOM.offset,
|
|
34756
|
-
isEquivalentPosition(headDOM.node, headDOM.offset,
|
|
34792
|
+
isEquivalentPosition(anchorDOM.node, anchorDOM.offset, selRange.anchorNode, selRange.anchorOffset) &&
|
|
34793
|
+
isEquivalentPosition(headDOM.node, headDOM.offset, selRange.focusNode, selRange.focusOffset))
|
|
34757
34794
|
return;
|
|
34758
34795
|
// Selection.extend can be used to create an 'inverted' selection
|
|
34759
34796
|
// (one where the focus is before the anchor), but not all
|
|
@@ -34942,6 +34979,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
34942
34979
|
copy.children = nodes;
|
|
34943
34980
|
return copy;
|
|
34944
34981
|
}
|
|
34982
|
+
ignoreMutation(mutation) {
|
|
34983
|
+
return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : super.ignoreMutation(mutation);
|
|
34984
|
+
}
|
|
34945
34985
|
destroy() {
|
|
34946
34986
|
if (this.spec.destroy)
|
|
34947
34987
|
this.spec.destroy();
|
|
@@ -35285,9 +35325,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
35285
35325
|
deselectNode() {
|
|
35286
35326
|
this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();
|
|
35287
35327
|
}
|
|
35288
|
-
setSelection(anchor, head,
|
|
35289
|
-
this.spec.setSelection ? this.spec.setSelection(anchor, head, root)
|
|
35290
|
-
: super.setSelection(anchor, head,
|
|
35328
|
+
setSelection(anchor, head, view, force) {
|
|
35329
|
+
this.spec.setSelection ? this.spec.setSelection(anchor, head, view.root)
|
|
35330
|
+
: super.setSelection(anchor, head, view, force);
|
|
35291
35331
|
}
|
|
35292
35332
|
destroy() {
|
|
35293
35333
|
if (this.spec.destroy)
|
|
@@ -35947,7 +35987,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
35947
35987
|
if (!sel.empty && !sel.$from.parent.inlineContent)
|
|
35948
35988
|
resetEditableTo = temporarilyEditableNear(view, sel.to);
|
|
35949
35989
|
}
|
|
35950
|
-
view.docView.setSelection(anchor, head, view
|
|
35990
|
+
view.docView.setSelection(anchor, head, view, force);
|
|
35951
35991
|
if (brokenSelectBetweenUneditable) {
|
|
35952
35992
|
if (resetEditableFrom)
|
|
35953
35993
|
resetEditable(resetEditableFrom);
|
|
@@ -40575,6 +40615,13 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
40575
40615
|
}
|
|
40576
40616
|
return this;
|
|
40577
40617
|
}
|
|
40618
|
+
once(event, fn) {
|
|
40619
|
+
const onceFn = (...args) => {
|
|
40620
|
+
this.off(event, onceFn);
|
|
40621
|
+
fn.apply(this, args);
|
|
40622
|
+
};
|
|
40623
|
+
return this.on(event, onceFn);
|
|
40624
|
+
}
|
|
40578
40625
|
removeAllListeners() {
|
|
40579
40626
|
this.callbacks = {};
|
|
40580
40627
|
}
|
|
@@ -40880,6 +40927,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
40880
40927
|
draggable: callOrReturn(getExtensionField(extension, 'draggable', context)),
|
|
40881
40928
|
code: callOrReturn(getExtensionField(extension, 'code', context)),
|
|
40882
40929
|
whitespace: callOrReturn(getExtensionField(extension, 'whitespace', context)),
|
|
40930
|
+
linebreakReplacement: callOrReturn(getExtensionField(extension, 'linebreakReplacement', context)),
|
|
40883
40931
|
defining: callOrReturn(getExtensionField(extension, 'defining', context)),
|
|
40884
40932
|
isolating: callOrReturn(getExtensionField(extension, 'isolating', context)),
|
|
40885
40933
|
attrs: Object.fromEntries(extensionAttributes.map(extensionAttribute => {
|
|
@@ -40973,6 +41021,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
40973
41021
|
return enabled;
|
|
40974
41022
|
}
|
|
40975
41023
|
|
|
41024
|
+
function getHTMLFromFragment(fragment, schema) {
|
|
41025
|
+
const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment);
|
|
41026
|
+
const temporaryDocument = document.implementation.createHTMLDocument();
|
|
41027
|
+
const container = temporaryDocument.createElement('div');
|
|
41028
|
+
container.appendChild(documentFragment);
|
|
41029
|
+
return container.innerHTML;
|
|
41030
|
+
}
|
|
41031
|
+
|
|
40976
41032
|
/**
|
|
40977
41033
|
* Returns the text content of a resolved prosemirror position
|
|
40978
41034
|
* @param $from The resolved position to get the text content from
|
|
@@ -41102,7 +41158,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
41102
41158
|
init() {
|
|
41103
41159
|
return null;
|
|
41104
41160
|
},
|
|
41105
|
-
apply(tr, prev) {
|
|
41161
|
+
apply(tr, prev, state) {
|
|
41106
41162
|
const stored = tr.getMeta(plugin);
|
|
41107
41163
|
if (stored) {
|
|
41108
41164
|
return stored;
|
|
@@ -41112,7 +41168,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
41112
41168
|
const isSimulatedInput = !!simulatedInputMeta;
|
|
41113
41169
|
if (isSimulatedInput) {
|
|
41114
41170
|
setTimeout(() => {
|
|
41115
|
-
|
|
41171
|
+
let { text } = simulatedInputMeta;
|
|
41172
|
+
if (typeof text === 'string') {
|
|
41173
|
+
text = text;
|
|
41174
|
+
}
|
|
41175
|
+
else {
|
|
41176
|
+
text = getHTMLFromFragment(Fragment.from(text), state.schema);
|
|
41177
|
+
}
|
|
41178
|
+
const { from } = simulatedInputMeta;
|
|
41116
41179
|
const to = from + text.length;
|
|
41117
41180
|
run$1$1({
|
|
41118
41181
|
editor,
|
|
@@ -41305,7 +41368,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
41305
41368
|
|
|
41306
41369
|
/**
|
|
41307
41370
|
* Paste rules are used to react to pasted content.
|
|
41308
|
-
* @see https://tiptap.dev/
|
|
41371
|
+
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules
|
|
41309
41372
|
*/
|
|
41310
41373
|
class PasteRule {
|
|
41311
41374
|
constructor(config) {
|
|
@@ -41395,7 +41458,13 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
41395
41458
|
let isPastedFromProseMirror = false;
|
|
41396
41459
|
let isDroppedFromProseMirror = false;
|
|
41397
41460
|
let pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;
|
|
41398
|
-
let dropEvent
|
|
41461
|
+
let dropEvent;
|
|
41462
|
+
try {
|
|
41463
|
+
dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
|
|
41464
|
+
}
|
|
41465
|
+
catch (e) {
|
|
41466
|
+
dropEvent = null;
|
|
41467
|
+
}
|
|
41399
41468
|
const processEvent = ({ state, from, to, rule, pasteEvt, }) => {
|
|
41400
41469
|
const tr = state.tr;
|
|
41401
41470
|
const chainableState = createChainableState({
|
|
@@ -41414,7 +41483,12 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
41414
41483
|
if (!handler || !tr.steps.length) {
|
|
41415
41484
|
return;
|
|
41416
41485
|
}
|
|
41417
|
-
|
|
41486
|
+
try {
|
|
41487
|
+
dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
|
|
41488
|
+
}
|
|
41489
|
+
catch (e) {
|
|
41490
|
+
dropEvent = null;
|
|
41491
|
+
}
|
|
41418
41492
|
pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;
|
|
41419
41493
|
return tr;
|
|
41420
41494
|
};
|
|
@@ -41463,7 +41537,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
41463
41537
|
}
|
|
41464
41538
|
// Handle simulated paste
|
|
41465
41539
|
if (isSimulatedPaste) {
|
|
41466
|
-
|
|
41540
|
+
let { text } = simulatedPasteMeta;
|
|
41541
|
+
if (typeof text === 'string') {
|
|
41542
|
+
text = text;
|
|
41543
|
+
}
|
|
41544
|
+
else {
|
|
41545
|
+
text = getHTMLFromFragment(Fragment.from(text), state.schema);
|
|
41546
|
+
}
|
|
41547
|
+
const { from } = simulatedPasteMeta;
|
|
41467
41548
|
const to = from + text.length;
|
|
41468
41549
|
const pasteEvt = createClipboardPasteEvent(text);
|
|
41469
41550
|
return processEvent({
|
|
@@ -42060,13 +42141,33 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42060
42141
|
|
|
42061
42142
|
function findMarkInSet(marks, type, attributes = {}) {
|
|
42062
42143
|
return marks.find(item => {
|
|
42063
|
-
return item.type === type
|
|
42144
|
+
return (item.type === type
|
|
42145
|
+
&& objectIncludes(
|
|
42146
|
+
// Only check equality for the attributes that are provided
|
|
42147
|
+
Object.fromEntries(Object.keys(attributes).map(k => [k, item.attrs[k]])), attributes));
|
|
42064
42148
|
});
|
|
42065
42149
|
}
|
|
42066
42150
|
function isMarkInSet(marks, type, attributes = {}) {
|
|
42067
42151
|
return !!findMarkInSet(marks, type, attributes);
|
|
42068
42152
|
}
|
|
42069
|
-
|
|
42153
|
+
/**
|
|
42154
|
+
* Get the range of a mark at a resolved position.
|
|
42155
|
+
*/
|
|
42156
|
+
function getMarkRange(
|
|
42157
|
+
/**
|
|
42158
|
+
* The position to get the mark range for.
|
|
42159
|
+
*/
|
|
42160
|
+
$pos,
|
|
42161
|
+
/**
|
|
42162
|
+
* The mark type to get the range for.
|
|
42163
|
+
*/
|
|
42164
|
+
type,
|
|
42165
|
+
/**
|
|
42166
|
+
* The attributes to match against.
|
|
42167
|
+
* If not provided, only the first mark at the position will be matched.
|
|
42168
|
+
*/
|
|
42169
|
+
attributes) {
|
|
42170
|
+
var _a;
|
|
42070
42171
|
if (!$pos || !type) {
|
|
42071
42172
|
return;
|
|
42072
42173
|
}
|
|
@@ -42079,6 +42180,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42079
42180
|
if (!start.node || !start.node.marks.some(mark => mark.type === type)) {
|
|
42080
42181
|
return;
|
|
42081
42182
|
}
|
|
42183
|
+
// Default to only matching against the first mark's attributes
|
|
42184
|
+
attributes = attributes || ((_a = start.node.marks[0]) === null || _a === void 0 ? void 0 : _a.attrs);
|
|
42082
42185
|
// We now know that the cursor is either at the start, middle or end of a text node with the specified mark
|
|
42083
42186
|
// so we can look it up on the targeted mark
|
|
42084
42187
|
const mark = findMarkInSet([...start.node.marks], type, attributes);
|
|
@@ -42089,8 +42192,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42089
42192
|
let startPos = $pos.start() + start.offset;
|
|
42090
42193
|
let endIndex = startIndex + 1;
|
|
42091
42194
|
let endPos = startPos + start.node.nodeSize;
|
|
42092
|
-
|
|
42093
|
-
|
|
42195
|
+
while (startIndex > 0
|
|
42196
|
+
&& isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes)) {
|
|
42094
42197
|
startIndex -= 1;
|
|
42095
42198
|
startPos -= $pos.parent.child(startIndex).nodeSize;
|
|
42096
42199
|
}
|
|
@@ -42266,6 +42369,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42266
42369
|
* @returns The created Prosemirror node or fragment
|
|
42267
42370
|
*/
|
|
42268
42371
|
function createNodeFromContent(content, schema, options) {
|
|
42372
|
+
if (content instanceof Node$2 || content instanceof Fragment) {
|
|
42373
|
+
return content;
|
|
42374
|
+
}
|
|
42269
42375
|
options = {
|
|
42270
42376
|
slice: true,
|
|
42271
42377
|
parseOptions: {},
|
|
@@ -42430,6 +42536,15 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42430
42536
|
if (Array.isArray(value)) {
|
|
42431
42537
|
newContent = value.map(v => v.text || '').join('');
|
|
42432
42538
|
}
|
|
42539
|
+
else if (value instanceof Fragment) {
|
|
42540
|
+
let text = '';
|
|
42541
|
+
value.forEach(node => {
|
|
42542
|
+
if (node.text) {
|
|
42543
|
+
text += node.text;
|
|
42544
|
+
}
|
|
42545
|
+
});
|
|
42546
|
+
newContent = text;
|
|
42547
|
+
}
|
|
42433
42548
|
else if (typeof value === 'object' && !!value && !!value.text) {
|
|
42434
42549
|
newContent = value.text;
|
|
42435
42550
|
}
|
|
@@ -42907,14 +43022,6 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
42907
43022
|
return (selection) => findParentNodeClosestToPos(selection.$from, predicate);
|
|
42908
43023
|
}
|
|
42909
43024
|
|
|
42910
|
-
function getHTMLFromFragment(fragment, schema) {
|
|
42911
|
-
const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment);
|
|
42912
|
-
const temporaryDocument = document.implementation.createHTMLDocument();
|
|
42913
|
-
const container = temporaryDocument.createElement('div');
|
|
42914
|
-
container.appendChild(documentFragment);
|
|
42915
|
-
return container.innerHTML;
|
|
42916
|
-
}
|
|
42917
|
-
|
|
42918
43025
|
/**
|
|
42919
43026
|
* Gets the text of a Prosemirror node
|
|
42920
43027
|
* @param node The Prosemirror node
|
|
@@ -43311,6 +43418,11 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
43311
43418
|
|
|
43312
43419
|
const setNode = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) => {
|
|
43313
43420
|
const type = getNodeType(typeOrName, state.schema);
|
|
43421
|
+
let attributesToCopy;
|
|
43422
|
+
if (state.selection.$anchor.sameParent(state.selection.$head)) {
|
|
43423
|
+
// only copy attributes if the selection is pointing to a node of the same type
|
|
43424
|
+
attributesToCopy = state.selection.$anchor.parent.attrs;
|
|
43425
|
+
}
|
|
43314
43426
|
// TODO: use a fallback like insertContent?
|
|
43315
43427
|
if (!type.isTextblock) {
|
|
43316
43428
|
console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.');
|
|
@@ -43319,14 +43431,14 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
43319
43431
|
return (chain()
|
|
43320
43432
|
// try to convert node to default node if needed
|
|
43321
43433
|
.command(({ commands }) => {
|
|
43322
|
-
const canSetBlock = setBlockType(type, attributes)(state);
|
|
43434
|
+
const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state);
|
|
43323
43435
|
if (canSetBlock) {
|
|
43324
43436
|
return true;
|
|
43325
43437
|
}
|
|
43326
43438
|
return commands.clearNodes();
|
|
43327
43439
|
})
|
|
43328
43440
|
.command(({ state: updatedState }) => {
|
|
43329
|
-
return setBlockType(type, attributes)(updatedState, dispatch);
|
|
43441
|
+
return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch);
|
|
43330
43442
|
})
|
|
43331
43443
|
.run());
|
|
43332
43444
|
};
|
|
@@ -43745,21 +43857,63 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
43745
43857
|
markType = getMarkType(typeOrName, state.schema);
|
|
43746
43858
|
}
|
|
43747
43859
|
if (dispatch) {
|
|
43748
|
-
tr.selection.ranges.forEach(range => {
|
|
43860
|
+
tr.selection.ranges.forEach((range) => {
|
|
43749
43861
|
const from = range.$from.pos;
|
|
43750
43862
|
const to = range.$to.pos;
|
|
43751
|
-
|
|
43752
|
-
|
|
43753
|
-
|
|
43754
|
-
|
|
43863
|
+
let lastPos;
|
|
43864
|
+
let lastNode;
|
|
43865
|
+
let trimmedFrom;
|
|
43866
|
+
let trimmedTo;
|
|
43867
|
+
if (tr.selection.empty) {
|
|
43868
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
43869
|
+
if (nodeType && nodeType === node.type) {
|
|
43870
|
+
trimmedFrom = Math.max(pos, from);
|
|
43871
|
+
trimmedTo = Math.min(pos + node.nodeSize, to);
|
|
43872
|
+
lastPos = pos;
|
|
43873
|
+
lastNode = node;
|
|
43874
|
+
}
|
|
43875
|
+
});
|
|
43876
|
+
}
|
|
43877
|
+
else {
|
|
43878
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
43879
|
+
if (pos < from && nodeType && nodeType === node.type) {
|
|
43880
|
+
trimmedFrom = Math.max(pos, from);
|
|
43881
|
+
trimmedTo = Math.min(pos + node.nodeSize, to);
|
|
43882
|
+
lastPos = pos;
|
|
43883
|
+
lastNode = node;
|
|
43884
|
+
}
|
|
43885
|
+
if (pos >= from && pos <= to) {
|
|
43886
|
+
if (nodeType && nodeType === node.type) {
|
|
43887
|
+
tr.setNodeMarkup(pos, undefined, {
|
|
43888
|
+
...node.attrs,
|
|
43889
|
+
...attributes,
|
|
43890
|
+
});
|
|
43891
|
+
}
|
|
43892
|
+
if (markType && node.marks.length) {
|
|
43893
|
+
node.marks.forEach((mark) => {
|
|
43894
|
+
if (markType === mark.type) {
|
|
43895
|
+
const trimmedFrom2 = Math.max(pos, from);
|
|
43896
|
+
const trimmedTo2 = Math.min(pos + node.nodeSize, to);
|
|
43897
|
+
tr.addMark(trimmedFrom2, trimmedTo2, markType.create({
|
|
43898
|
+
...mark.attrs,
|
|
43899
|
+
...attributes,
|
|
43900
|
+
}));
|
|
43901
|
+
}
|
|
43902
|
+
});
|
|
43903
|
+
}
|
|
43904
|
+
}
|
|
43905
|
+
});
|
|
43906
|
+
}
|
|
43907
|
+
if (lastNode) {
|
|
43908
|
+
if (lastPos !== undefined) {
|
|
43909
|
+
tr.setNodeMarkup(lastPos, undefined, {
|
|
43910
|
+
...lastNode.attrs,
|
|
43755
43911
|
...attributes,
|
|
43756
43912
|
});
|
|
43757
43913
|
}
|
|
43758
|
-
if (markType &&
|
|
43759
|
-
|
|
43914
|
+
if (markType && lastNode.marks.length) {
|
|
43915
|
+
lastNode.marks.forEach((mark) => {
|
|
43760
43916
|
if (markType === mark.type) {
|
|
43761
|
-
const trimmedFrom = Math.max(pos, from);
|
|
43762
|
-
const trimmedTo = Math.min(pos + node.nodeSize, to);
|
|
43763
43917
|
tr.addMark(trimmedFrom, trimmedTo, markType.create({
|
|
43764
43918
|
...mark.attrs,
|
|
43765
43919
|
...attributes,
|
|
@@ -43767,7 +43921,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
43767
43921
|
}
|
|
43768
43922
|
});
|
|
43769
43923
|
}
|
|
43770
|
-
}
|
|
43924
|
+
}
|
|
43771
43925
|
});
|
|
43772
43926
|
}
|
|
43773
43927
|
return true;
|
|
@@ -44571,6 +44725,7 @@ img.ProseMirror-separator {
|
|
|
44571
44725
|
* Creates a ProseMirror view.
|
|
44572
44726
|
*/
|
|
44573
44727
|
createView() {
|
|
44728
|
+
var _a;
|
|
44574
44729
|
let doc;
|
|
44575
44730
|
try {
|
|
44576
44731
|
doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { errorOnInvalidContent: this.options.enableContentCheck });
|
|
@@ -44599,18 +44754,17 @@ img.ProseMirror-separator {
|
|
|
44599
44754
|
const selection = resolveFocusPosition(doc, this.options.autofocus);
|
|
44600
44755
|
this.view = new EditorView(this.options.element, {
|
|
44601
44756
|
...this.options.editorProps,
|
|
44757
|
+
attributes: {
|
|
44758
|
+
// add `role="textbox"` to the editor element
|
|
44759
|
+
role: 'textbox',
|
|
44760
|
+
...(_a = this.options.editorProps) === null || _a === void 0 ? void 0 : _a.attributes,
|
|
44761
|
+
},
|
|
44602
44762
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
44603
44763
|
state: EditorState.create({
|
|
44604
44764
|
doc,
|
|
44605
44765
|
selection: selection || undefined,
|
|
44606
44766
|
}),
|
|
44607
44767
|
});
|
|
44608
|
-
// add `role="textbox"` to the editor element
|
|
44609
|
-
this.view.dom.setAttribute('role', 'textbox');
|
|
44610
|
-
// add aria-label to the editor element
|
|
44611
|
-
if (!this.view.dom.getAttribute('aria-label')) {
|
|
44612
|
-
this.view.dom.setAttribute('aria-label', 'Rich-Text Editor');
|
|
44613
|
-
}
|
|
44614
44768
|
// `editor.view` is not yet available at this time.
|
|
44615
44769
|
// Therefore we will add all plugins and node views directly afterwards.
|
|
44616
44770
|
const newState = this.state.reconfigure({
|
|
@@ -44806,7 +44960,7 @@ img.ProseMirror-separator {
|
|
|
44806
44960
|
/**
|
|
44807
44961
|
* Build an input rule that adds a mark when the
|
|
44808
44962
|
* matched text is typed into it.
|
|
44809
|
-
* @see https://tiptap.dev/
|
|
44963
|
+
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
|
|
44810
44964
|
*/
|
|
44811
44965
|
function markInputRule(config) {
|
|
44812
44966
|
return new InputRule({
|
|
@@ -44860,7 +45014,7 @@ img.ProseMirror-separator {
|
|
|
44860
45014
|
* two nodes. You can pass a join predicate, which takes a regular
|
|
44861
45015
|
* expression match and the node before the wrapped node, and can
|
|
44862
45016
|
* return a boolean to indicate whether a join should happen.
|
|
44863
|
-
* @see https://tiptap.dev/
|
|
45017
|
+
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules
|
|
44864
45018
|
*/
|
|
44865
45019
|
function wrappingInputRule(config) {
|
|
44866
45020
|
return new InputRule({
|
|
@@ -44974,7 +45128,7 @@ img.ProseMirror-separator {
|
|
|
44974
45128
|
/**
|
|
44975
45129
|
* Build an paste rule that adds a mark when the
|
|
44976
45130
|
* matched text is pasted into it.
|
|
44977
|
-
* @see https://tiptap.dev/
|
|
45131
|
+
* @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules
|
|
44978
45132
|
*/
|
|
44979
45133
|
function markPasteRule(config) {
|
|
44980
45134
|
return new PasteRule({
|
|
@@ -45036,6 +45190,7 @@ img.ProseMirror-separator {
|
|
|
45036
45190
|
inline: true,
|
|
45037
45191
|
group: 'inline',
|
|
45038
45192
|
selectable: false,
|
|
45193
|
+
linebreakReplacement: true,
|
|
45039
45194
|
parseHTML() {
|
|
45040
45195
|
return [
|
|
45041
45196
|
{ tag: 'br' },
|
|
@@ -45155,7 +45310,7 @@ img.ProseMirror-separator {
|
|
|
45155
45310
|
}).withDefault(richTextLabelDefaults.richTextToggleNumberedListLabel);
|
|
45156
45311
|
|
|
45157
45312
|
const styles$v = css `
|
|
45158
|
-
${styles$
|
|
45313
|
+
${styles$K}
|
|
45159
45314
|
|
|
45160
45315
|
:host {
|
|
45161
45316
|
height: auto;
|
|
@@ -45576,7 +45731,7 @@ img.ProseMirror-separator {
|
|
|
45576
45731
|
|
|
45577
45732
|
const styles$u = css `
|
|
45578
45733
|
${display$1('inline-flex')}
|
|
45579
|
-
${styles$
|
|
45734
|
+
${styles$N}
|
|
45580
45735
|
|
|
45581
45736
|
:host {
|
|
45582
45737
|
font: ${bodyFont};
|
|
@@ -56636,7 +56791,7 @@ img.ProseMirror-separator {
|
|
|
56636
56791
|
// THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY
|
|
56637
56792
|
// See update-tlds.js for encoding/decoding format
|
|
56638
56793
|
// https://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
|
56639
|
-
const encodedTlds = '
|
|
56794
|
+
const encodedTlds = 'aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2';
|
|
56640
56795
|
// Internationalized domain names containing non-ASCII
|
|
56641
56796
|
const encodedUtlds = 'ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2';
|
|
56642
56797
|
|
|
@@ -56761,10 +56916,7 @@ img.ProseMirror-separator {
|
|
|
56761
56916
|
* @template T
|
|
56762
56917
|
* @param {T} [token] Token that this state emits
|
|
56763
56918
|
*/
|
|
56764
|
-
function State(token) {
|
|
56765
|
-
if (token === void 0) {
|
|
56766
|
-
token = null;
|
|
56767
|
-
}
|
|
56919
|
+
function State(token = null) {
|
|
56768
56920
|
// this.n = null; // DEBUG: State name
|
|
56769
56921
|
/** @type {{ [input: string]: State<T> }} j */
|
|
56770
56922
|
this.j = {}; // IMPLEMENTATION 1
|
|
@@ -56815,10 +56967,7 @@ img.ProseMirror-separator {
|
|
|
56815
56967
|
* @param {string} input
|
|
56816
56968
|
* @param {boolean} exactOnly
|
|
56817
56969
|
*/
|
|
56818
|
-
has(input, exactOnly) {
|
|
56819
|
-
if (exactOnly === void 0) {
|
|
56820
|
-
exactOnly = false;
|
|
56821
|
-
}
|
|
56970
|
+
has(input, exactOnly = false) {
|
|
56822
56971
|
return exactOnly ? input in this.j : !!this.go(input);
|
|
56823
56972
|
},
|
|
56824
56973
|
/**
|
|
@@ -56941,7 +57090,6 @@ img.ProseMirror-separator {
|
|
|
56941
57090
|
}
|
|
56942
57091
|
nextState.t = t; // overwrite anything that was previously there
|
|
56943
57092
|
}
|
|
56944
|
-
|
|
56945
57093
|
state.j[input] = nextState;
|
|
56946
57094
|
return nextState;
|
|
56947
57095
|
}
|
|
@@ -57066,6 +57214,7 @@ img.ProseMirror-separator {
|
|
|
57066
57214
|
const POUND = 'POUND'; // #
|
|
57067
57215
|
const QUERY = 'QUERY'; // ?
|
|
57068
57216
|
const QUOTE = 'QUOTE'; // "
|
|
57217
|
+
const FULLWIDTHMIDDLEDOT = 'FULLWIDTHMIDDLEDOT'; // ・
|
|
57069
57218
|
|
|
57070
57219
|
const SEMI = 'SEMI'; // ;
|
|
57071
57220
|
const SLASH = 'SLASH'; // /
|
|
@@ -57126,6 +57275,7 @@ img.ProseMirror-separator {
|
|
|
57126
57275
|
POUND: POUND,
|
|
57127
57276
|
QUERY: QUERY,
|
|
57128
57277
|
QUOTE: QUOTE,
|
|
57278
|
+
FULLWIDTHMIDDLEDOT: FULLWIDTHMIDDLEDOT,
|
|
57129
57279
|
SEMI: SEMI,
|
|
57130
57280
|
SLASH: SLASH,
|
|
57131
57281
|
TILDE: TILDE,
|
|
@@ -57173,10 +57323,7 @@ img.ProseMirror-separator {
|
|
|
57173
57323
|
* item is a length-2 tuple with the first element set to the string scheme, and
|
|
57174
57324
|
* the second element set to `true` if the `://` after the scheme is optional
|
|
57175
57325
|
*/
|
|
57176
|
-
function init$2(customSchemes) {
|
|
57177
|
-
if (customSchemes === void 0) {
|
|
57178
|
-
customSchemes = [];
|
|
57179
|
-
}
|
|
57326
|
+
function init$2(customSchemes = []) {
|
|
57180
57327
|
// Frequently used states (name argument removed during minification)
|
|
57181
57328
|
/** @type Collections<string> */
|
|
57182
57329
|
const groups = {}; // of tokens
|
|
@@ -57231,6 +57378,7 @@ img.ProseMirror-separator {
|
|
|
57231
57378
|
tt(Start, '~', TILDE);
|
|
57232
57379
|
tt(Start, '_', UNDERSCORE);
|
|
57233
57380
|
tt(Start, '\\', BACKSLASH);
|
|
57381
|
+
tt(Start, '・', FULLWIDTHMIDDLEDOT);
|
|
57234
57382
|
const Num = tr(Start, DIGIT, NUM, {
|
|
57235
57383
|
[numeric]: true
|
|
57236
57384
|
});
|
|
@@ -57414,7 +57562,6 @@ img.ProseMirror-separator {
|
|
|
57414
57562
|
e: cursor // end index (excluding)
|
|
57415
57563
|
});
|
|
57416
57564
|
}
|
|
57417
|
-
|
|
57418
57565
|
return tokens;
|
|
57419
57566
|
}
|
|
57420
57567
|
|
|
@@ -57489,7 +57636,6 @@ img.ProseMirror-separator {
|
|
|
57489
57636
|
while (digits.indexOf(encoded[i + popDigitCount]) >= 0) {
|
|
57490
57637
|
popDigitCount++; // encountered some digits, have to pop to go one level up trie
|
|
57491
57638
|
}
|
|
57492
|
-
|
|
57493
57639
|
if (popDigitCount > 0) {
|
|
57494
57640
|
words.push(stack.join('')); // whatever preceded the pop digits must be a word
|
|
57495
57641
|
for (let popCount = parseInt(encoded.substring(i, i + popDigitCount), 10); popCount > 0; popCount--) {
|
|
@@ -57612,10 +57758,7 @@ img.ProseMirror-separator {
|
|
|
57612
57758
|
* HTML element based on a link token's derived tagName, attributes and HTML.
|
|
57613
57759
|
* Similar to render option
|
|
57614
57760
|
*/
|
|
57615
|
-
function Options(opts, defaultRender) {
|
|
57616
|
-
if (defaultRender === void 0) {
|
|
57617
|
-
defaultRender = null;
|
|
57618
|
-
}
|
|
57761
|
+
function Options(opts, defaultRender = null) {
|
|
57619
57762
|
let o = assign({}, defaults);
|
|
57620
57763
|
if (opts) {
|
|
57621
57764
|
o = assign(o, opts instanceof Options ? opts.o : opts);
|
|
@@ -57758,7 +57901,7 @@ img.ProseMirror-separator {
|
|
|
57758
57901
|
* Returns the `.toString` value by default.
|
|
57759
57902
|
* @param {string} [scheme]
|
|
57760
57903
|
* @return {string}
|
|
57761
|
-
|
|
57904
|
+
*/
|
|
57762
57905
|
toHref(scheme) {
|
|
57763
57906
|
return this.toString();
|
|
57764
57907
|
},
|
|
@@ -57804,10 +57947,7 @@ img.ProseMirror-separator {
|
|
|
57804
57947
|
@method toObject
|
|
57805
57948
|
@param {string} [protocol] `'http'` by default
|
|
57806
57949
|
*/
|
|
57807
|
-
toObject(protocol) {
|
|
57808
|
-
if (protocol === void 0) {
|
|
57809
|
-
protocol = defaults.defaultProtocol;
|
|
57810
|
-
}
|
|
57950
|
+
toObject(protocol = defaults.defaultProtocol) {
|
|
57811
57951
|
return {
|
|
57812
57952
|
type: this.t,
|
|
57813
57953
|
value: this.toString(),
|
|
@@ -57931,10 +58071,7 @@ img.ProseMirror-separator {
|
|
|
57931
58071
|
@param {string} [scheme] default scheme (e.g., 'https')
|
|
57932
58072
|
@return {string} the full href
|
|
57933
58073
|
*/
|
|
57934
|
-
toHref(scheme) {
|
|
57935
|
-
if (scheme === void 0) {
|
|
57936
|
-
scheme = defaults.defaultProtocol;
|
|
57937
|
-
}
|
|
58074
|
+
toHref(scheme = defaults.defaultProtocol) {
|
|
57938
58075
|
// Check if already has a prefix scheme
|
|
57939
58076
|
return this.hasProtocol() ? this.v : `${scheme}://${this.v}`;
|
|
57940
58077
|
},
|
|
@@ -57968,10 +58105,9 @@ img.ProseMirror-separator {
|
|
|
57968
58105
|
* Generate the parser multi token-based state machine
|
|
57969
58106
|
* @param {{ groups: Collections<string> }} tokens
|
|
57970
58107
|
*/
|
|
57971
|
-
function init$1(
|
|
57972
|
-
|
|
57973
|
-
|
|
57974
|
-
} = _ref;
|
|
58108
|
+
function init$1({
|
|
58109
|
+
groups
|
|
58110
|
+
}) {
|
|
57975
58111
|
// Types of characters the URL can definitely end in
|
|
57976
58112
|
const qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]);
|
|
57977
58113
|
|
|
@@ -58106,7 +58242,6 @@ img.ProseMirror-separator {
|
|
|
58106
58242
|
// 『』
|
|
58107
58243
|
[FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN] // <>
|
|
58108
58244
|
];
|
|
58109
|
-
|
|
58110
58245
|
for (let i = 0; i < bracketPairs.length; i++) {
|
|
58111
58246
|
const [OPEN, CLOSE] = bracketPairs[i];
|
|
58112
58247
|
const UrlOpen = tt(Url$1, OPEN); // URL followed by open bracket
|
|
@@ -58284,6 +58419,7 @@ img.ProseMirror-separator {
|
|
|
58284
58419
|
INIT.pluginQueue = [];
|
|
58285
58420
|
INIT.customSchemes = [];
|
|
58286
58421
|
INIT.initialized = false;
|
|
58422
|
+
return INIT;
|
|
58287
58423
|
}
|
|
58288
58424
|
|
|
58289
58425
|
/**
|
|
@@ -58293,10 +58429,7 @@ img.ProseMirror-separator {
|
|
|
58293
58429
|
* @param {string} protocol
|
|
58294
58430
|
* @param {boolean} [optionalSlashSlash]
|
|
58295
58431
|
*/
|
|
58296
|
-
function registerCustomProtocol(scheme, optionalSlashSlash) {
|
|
58297
|
-
if (optionalSlashSlash === void 0) {
|
|
58298
|
-
optionalSlashSlash = false;
|
|
58299
|
-
}
|
|
58432
|
+
function registerCustomProtocol(scheme, optionalSlashSlash = false) {
|
|
58300
58433
|
if (INIT.initialized) {
|
|
58301
58434
|
warn(`linkifyjs: already initialized - will not register custom scheme "${scheme}" ${warnAdvice}`);
|
|
58302
58435
|
}
|
|
@@ -58331,6 +58464,7 @@ img.ProseMirror-separator {
|
|
|
58331
58464
|
});
|
|
58332
58465
|
}
|
|
58333
58466
|
INIT.initialized = true;
|
|
58467
|
+
return INIT;
|
|
58334
58468
|
}
|
|
58335
58469
|
|
|
58336
58470
|
/**
|
|
@@ -58344,6 +58478,7 @@ img.ProseMirror-separator {
|
|
|
58344
58478
|
}
|
|
58345
58479
|
return run(INIT.parser.start, str, run$1(INIT.scanner.start, str));
|
|
58346
58480
|
}
|
|
58481
|
+
tokenize.scan = run$1; // for testing
|
|
58347
58482
|
|
|
58348
58483
|
/**
|
|
58349
58484
|
* Find a list of linkable items in the given string.
|
|
@@ -58353,13 +58488,7 @@ img.ProseMirror-separator {
|
|
|
58353
58488
|
* @param {Opts} [opts] formatting options for final output. Cannot be specified
|
|
58354
58489
|
* if opts already provided in `type` argument
|
|
58355
58490
|
*/
|
|
58356
|
-
function find$1(str, type, opts) {
|
|
58357
|
-
if (type === void 0) {
|
|
58358
|
-
type = null;
|
|
58359
|
-
}
|
|
58360
|
-
if (opts === void 0) {
|
|
58361
|
-
opts = null;
|
|
58362
|
-
}
|
|
58491
|
+
function find$1(str, type = null, opts = null) {
|
|
58363
58492
|
if (type && typeof type === 'object') {
|
|
58364
58493
|
if (opts) {
|
|
58365
58494
|
throw Error(`linkifyjs: Invalid link type ${type}; must be a string`);
|
|
@@ -58472,6 +58601,8 @@ img.ProseMirror-separator {
|
|
|
58472
58601
|
})
|
|
58473
58602
|
// validate link
|
|
58474
58603
|
.filter(link => options.validate(link.value))
|
|
58604
|
+
// check whether should autolink
|
|
58605
|
+
.filter(link => options.shouldAutoLink(link.value))
|
|
58475
58606
|
// Add link mark.
|
|
58476
58607
|
.forEach(link => {
|
|
58477
58608
|
if (getMarksBetween(link.from, link.to, newState.doc).some(item => item.mark.type === options.type)) {
|
|
@@ -58558,17 +58689,32 @@ img.ProseMirror-separator {
|
|
|
58558
58689
|
// eslint-disable-next-line no-control-regex
|
|
58559
58690
|
const ATTR_WHITESPACE = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
|
|
58560
58691
|
function isAllowedUri(uri, protocols) {
|
|
58561
|
-
const allowedProtocols = [
|
|
58692
|
+
const allowedProtocols = [
|
|
58693
|
+
'http',
|
|
58694
|
+
'https',
|
|
58695
|
+
'ftp',
|
|
58696
|
+
'ftps',
|
|
58697
|
+
'mailto',
|
|
58698
|
+
'tel',
|
|
58699
|
+
'callto',
|
|
58700
|
+
'sms',
|
|
58701
|
+
'cid',
|
|
58702
|
+
'xmpp',
|
|
58703
|
+
];
|
|
58562
58704
|
if (protocols) {
|
|
58563
58705
|
protocols.forEach(protocol => {
|
|
58564
|
-
const nextProtocol =
|
|
58706
|
+
const nextProtocol = typeof protocol === 'string' ? protocol : protocol.scheme;
|
|
58565
58707
|
if (nextProtocol) {
|
|
58566
58708
|
allowedProtocols.push(nextProtocol);
|
|
58567
58709
|
}
|
|
58568
58710
|
});
|
|
58569
58711
|
}
|
|
58570
|
-
|
|
58571
|
-
|
|
58712
|
+
return (!uri
|
|
58713
|
+
|| uri
|
|
58714
|
+
.replace(ATTR_WHITESPACE, '')
|
|
58715
|
+
.match(new RegExp(
|
|
58716
|
+
// eslint-disable-next-line no-useless-escape
|
|
58717
|
+
`^(?:(?:${allowedProtocols.join('|')}):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))`, 'i')));
|
|
58572
58718
|
}
|
|
58573
58719
|
/**
|
|
58574
58720
|
* This extension allows you to create links.
|
|
@@ -58580,6 +58726,11 @@ img.ProseMirror-separator {
|
|
|
58580
58726
|
keepOnSplit: false,
|
|
58581
58727
|
exitable: true,
|
|
58582
58728
|
onCreate() {
|
|
58729
|
+
if (this.options.validate && !this.options.shouldAutoLink) {
|
|
58730
|
+
// Copy the validate function to the shouldAutoLink option
|
|
58731
|
+
this.options.shouldAutoLink = this.options.validate;
|
|
58732
|
+
console.warn('The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.');
|
|
58733
|
+
}
|
|
58583
58734
|
this.options.protocols.forEach(protocol => {
|
|
58584
58735
|
if (typeof protocol === 'string') {
|
|
58585
58736
|
registerCustomProtocol(protocol);
|
|
@@ -58606,7 +58757,9 @@ img.ProseMirror-separator {
|
|
|
58606
58757
|
rel: 'noopener noreferrer nofollow',
|
|
58607
58758
|
class: null,
|
|
58608
58759
|
},
|
|
58760
|
+
isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols),
|
|
58609
58761
|
validate: url => !!url,
|
|
58762
|
+
shouldAutoLink: url => !!url,
|
|
58610
58763
|
};
|
|
58611
58764
|
},
|
|
58612
58765
|
addAttributes() {
|
|
@@ -58629,23 +58782,38 @@ img.ProseMirror-separator {
|
|
|
58629
58782
|
};
|
|
58630
58783
|
},
|
|
58631
58784
|
parseHTML() {
|
|
58632
|
-
return [
|
|
58785
|
+
return [
|
|
58786
|
+
{
|
|
58633
58787
|
tag: 'a[href]',
|
|
58634
58788
|
getAttrs: dom => {
|
|
58635
58789
|
const href = dom.getAttribute('href');
|
|
58636
58790
|
// prevent XSS attacks
|
|
58637
|
-
if (!href
|
|
58791
|
+
if (!href
|
|
58792
|
+
|| !this.options.isAllowedUri(href, {
|
|
58793
|
+
defaultValidate: url => !!isAllowedUri(url, this.options.protocols),
|
|
58794
|
+
protocols: this.options.protocols,
|
|
58795
|
+
defaultProtocol: this.options.defaultProtocol,
|
|
58796
|
+
})) {
|
|
58638
58797
|
return false;
|
|
58639
58798
|
}
|
|
58640
58799
|
return null;
|
|
58641
58800
|
},
|
|
58642
|
-
}
|
|
58801
|
+
},
|
|
58802
|
+
];
|
|
58643
58803
|
},
|
|
58644
58804
|
renderHTML({ HTMLAttributes }) {
|
|
58645
58805
|
// prevent XSS attacks
|
|
58646
|
-
if (!isAllowedUri(HTMLAttributes.href,
|
|
58806
|
+
if (!this.options.isAllowedUri(HTMLAttributes.href, {
|
|
58807
|
+
defaultValidate: href => !!isAllowedUri(href, this.options.protocols),
|
|
58808
|
+
protocols: this.options.protocols,
|
|
58809
|
+
defaultProtocol: this.options.defaultProtocol,
|
|
58810
|
+
})) {
|
|
58647
58811
|
// strip out the href
|
|
58648
|
-
return [
|
|
58812
|
+
return [
|
|
58813
|
+
'a',
|
|
58814
|
+
mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }),
|
|
58815
|
+
0,
|
|
58816
|
+
];
|
|
58649
58817
|
}
|
|
58650
58818
|
return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
58651
58819
|
},
|
|
@@ -58674,16 +58842,21 @@ img.ProseMirror-separator {
|
|
|
58674
58842
|
find: text => {
|
|
58675
58843
|
const foundLinks = [];
|
|
58676
58844
|
if (text) {
|
|
58677
|
-
const {
|
|
58678
|
-
const links = find$1(text).filter(item => item.isLink
|
|
58845
|
+
const { protocols, defaultProtocol } = this.options;
|
|
58846
|
+
const links = find$1(text).filter(item => item.isLink
|
|
58847
|
+
&& this.options.isAllowedUri(item.value, {
|
|
58848
|
+
defaultValidate: href => !!isAllowedUri(href, protocols),
|
|
58849
|
+
protocols,
|
|
58850
|
+
defaultProtocol,
|
|
58851
|
+
}));
|
|
58679
58852
|
if (links.length) {
|
|
58680
|
-
links.forEach(link =>
|
|
58853
|
+
links.forEach(link => foundLinks.push({
|
|
58681
58854
|
text: link.value,
|
|
58682
58855
|
data: {
|
|
58683
58856
|
href: link.href,
|
|
58684
58857
|
},
|
|
58685
58858
|
index: link.start,
|
|
58686
|
-
}))
|
|
58859
|
+
}));
|
|
58687
58860
|
}
|
|
58688
58861
|
}
|
|
58689
58862
|
return foundLinks;
|
|
@@ -58700,11 +58873,17 @@ img.ProseMirror-separator {
|
|
|
58700
58873
|
},
|
|
58701
58874
|
addProseMirrorPlugins() {
|
|
58702
58875
|
const plugins = [];
|
|
58876
|
+
const { protocols, defaultProtocol } = this.options;
|
|
58703
58877
|
if (this.options.autolink) {
|
|
58704
58878
|
plugins.push(autolink({
|
|
58705
58879
|
type: this.type,
|
|
58706
58880
|
defaultProtocol: this.options.defaultProtocol,
|
|
58707
|
-
validate: this.options.
|
|
58881
|
+
validate: url => this.options.isAllowedUri(url, {
|
|
58882
|
+
defaultValidate: href => !!isAllowedUri(href, protocols),
|
|
58883
|
+
protocols,
|
|
58884
|
+
defaultProtocol,
|
|
58885
|
+
}),
|
|
58886
|
+
shouldAutoLink: this.options.shouldAutoLink,
|
|
58708
58887
|
}));
|
|
58709
58888
|
}
|
|
58710
58889
|
if (this.options.openOnClick === true) {
|
|
@@ -59471,7 +59650,7 @@ img.ProseMirror-separator {
|
|
|
59471
59650
|
// linkOnPaste can be enabled when hyperlink support added
|
|
59472
59651
|
// See: https://github.com/ni/nimble/issues/1527
|
|
59473
59652
|
linkOnPaste: false,
|
|
59474
|
-
|
|
59653
|
+
shouldAutoLink: href => validAbsoluteLinkRegex.test(href)
|
|
59475
59654
|
});
|
|
59476
59655
|
}
|
|
59477
59656
|
function createCustomMentionExtension(config, activeMentionCharacterEmitter, activeMentionCommandEmitter, mentionListbox) {
|
|
@@ -60340,8 +60519,8 @@ img.ProseMirror-separator {
|
|
|
60340
60519
|
.register(nimbleRichTextViewer());
|
|
60341
60520
|
|
|
60342
60521
|
const styles$s = css `
|
|
60343
|
-
${styles$L}
|
|
60344
60522
|
${styles$K}
|
|
60523
|
+
${styles$N}
|
|
60345
60524
|
|
|
60346
60525
|
${
|
|
60347
60526
|
/* We are using flex `order` to define the visual ordering of the selected value,
|
|
@@ -62043,7 +62222,8 @@ img.ProseMirror-separator {
|
|
|
62043
62222
|
var(--ni-private-switch-height) - var(
|
|
62044
62223
|
--ni-private-switch-indicator-size
|
|
62045
62224
|
)
|
|
62046
|
-
) /
|
|
62225
|
+
) /
|
|
62226
|
+
2
|
|
62047
62227
|
);
|
|
62048
62228
|
border: ${borderWidth} solid
|
|
62049
62229
|
var(--ni-private-switch-indicator-border-color);
|
|
@@ -66091,6 +66271,7 @@ focus outline in that case.
|
|
|
66091
66271
|
|
|
66092
66272
|
.header-row-action-container {
|
|
66093
66273
|
display: flex;
|
|
66274
|
+
align-items: center;
|
|
66094
66275
|
}
|
|
66095
66276
|
|
|
66096
66277
|
.checkbox-container {
|
|
@@ -66167,8 +66348,11 @@ focus outline in that case.
|
|
|
66167
66348
|
);
|
|
66168
66349
|
height: 100%;
|
|
66169
66350
|
left: calc(
|
|
66170
|
-
-1 *
|
|
66171
|
-
|
|
66351
|
+
-1 *
|
|
66352
|
+
(
|
|
66353
|
+
var(--ni-private-column-divider-width) +
|
|
66354
|
+
var(--ni-private-column-divider-padding)
|
|
66355
|
+
)
|
|
66172
66356
|
);
|
|
66173
66357
|
}
|
|
66174
66358
|
|
|
@@ -66517,7 +66701,8 @@ focus outline in that case.
|
|
|
66517
66701
|
|
|
66518
66702
|
nimble-table-cell:first-of-type${focusVisible} {
|
|
66519
66703
|
margin-left: calc(
|
|
66520
|
-
-1 * (${controlHeight} - ${smallPadding}) *
|
|
66704
|
+
-1 * (${controlHeight} - ${smallPadding}) *
|
|
66705
|
+
var(--ni-private-table-cell-focus-offset-multiplier)
|
|
66521
66706
|
);
|
|
66522
66707
|
padding-left: calc(
|
|
66523
66708
|
(${controlHeight} - ${mediumPadding}) *
|
|
@@ -66534,7 +66719,8 @@ focus outline in that case.
|
|
|
66534
66719
|
${controlHeight} *
|
|
66535
66720
|
var(--ni-private-table-cell-nesting-level) +
|
|
66536
66721
|
${smallPadding}
|
|
66537
|
-
) *
|
|
66722
|
+
) *
|
|
66723
|
+
var(--ni-private-table-cell-focus-offset-multiplier)
|
|
66538
66724
|
);
|
|
66539
66725
|
height: ${controlHeight};
|
|
66540
66726
|
}
|
|
@@ -74172,7 +74358,7 @@ focus outline in that case.
|
|
|
74172
74358
|
|
|
74173
74359
|
const styles$7 = css `
|
|
74174
74360
|
${display$1('inline-flex')}
|
|
74175
|
-
${styles$
|
|
74361
|
+
${styles$N}
|
|
74176
74362
|
|
|
74177
74363
|
:host {
|
|
74178
74364
|
font: ${bodyFont};
|
|
@@ -74517,7 +74703,7 @@ focus outline in that case.
|
|
|
74517
74703
|
|
|
74518
74704
|
const styles$6 = css `
|
|
74519
74705
|
${display$1('inline-block')}
|
|
74520
|
-
${styles$
|
|
74706
|
+
${styles$N}
|
|
74521
74707
|
|
|
74522
74708
|
:host {
|
|
74523
74709
|
font: ${bodyFont};
|