@uva-glass/component-library 3.55.5 → 3.55.6
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/ActionList-O9w1hqNg.js.map +1 -1
- package/dist/{Lexical.prod-sbwgNRjw.js → Lexical.prod-CqPLSi0R.js} +1194 -1096
- package/dist/Lexical.prod-CqPLSi0R.js.map +1 -0
- package/dist/LexicalClipboard.prod-BVw_sFpo.js +651 -0
- package/dist/LexicalClipboard.prod-BVw_sFpo.js.map +1 -0
- package/dist/{LexicalExtension.prod-jTSDl1mh.js → LexicalExtension.prod-CUQTgbur.js} +306 -289
- package/dist/LexicalExtension.prod-CUQTgbur.js.map +1 -0
- package/dist/{LexicalLink.prod-BKLNLyu8.js → LexicalLink.prod-DMhcqD9x.js} +209 -208
- package/dist/LexicalLink.prod-DMhcqD9x.js.map +1 -0
- package/dist/{LexicalList.prod-DEtc4lSr.js → LexicalList.prod-eYlcb5Ao.js} +208 -168
- package/dist/LexicalList.prod-eYlcb5Ao.js.map +1 -0
- package/dist/{LexicalTable.prod-CpIPDW6z.js → LexicalTable.prod-DlOxUQou.js} +787 -781
- package/dist/LexicalTable.prod-DlOxUQou.js.map +1 -0
- package/dist/LexicalUtils.prod-BqcriFWV.js +343 -0
- package/dist/LexicalUtils.prod-BqcriFWV.js.map +1 -0
- package/dist/{LinkContextMenu-CTkNPiIW.js → LinkContextMenu-ePn1iZ_z.js} +2 -2
- package/dist/{LinkContextMenu-CTkNPiIW.js.map → LinkContextMenu-ePn1iZ_z.js.map} +1 -1
- package/dist/MultiSelectBox-Cuh_o-A1.js.map +1 -1
- package/dist/{PasteHandlerPlugin-YpQruA-w.js → PasteHandlerPlugin-BNp8ST0q.js} +5 -5
- package/dist/{PasteHandlerPlugin-YpQruA-w.js.map → PasteHandlerPlugin-BNp8ST0q.js.map} +1 -1
- package/dist/Periods-BYETtB6R.js.map +1 -1
- package/dist/Slider-BlLyrET9.js.map +1 -1
- package/dist/SortableProvider-8HYiBXJS.js.map +1 -1
- package/dist/{TableCellResizerPlugin-Ceof6StD.js → TableCellResizerPlugin-Bc5y-Qbx.js} +37 -37
- package/dist/{TableCellResizerPlugin-Ceof6StD.js.map → TableCellResizerPlugin-Bc5y-Qbx.js.map} +1 -1
- package/dist/{chunk-DeC0fbbY.js → chunk-3e0lkp8x.js} +1 -1
- package/dist/{chunk-SZQXB3JV-KiB8lSa9.js → chunk-SZQXB3JV-D6GR5B4F.js} +2 -2
- package/dist/chunk-SZQXB3JV-D6GR5B4F.js.map +1 -0
- package/dist/{client-CHQ7u_QI.js → client-8jeXrH7N.js} +2 -2
- package/dist/{client-CHQ7u_QI.js.map → client-8jeXrH7N.js.map} +1 -1
- package/dist/components/Accordion/Accordion.stories.js.map +1 -1
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.stories.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.stories.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.stories.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.stories.js.map +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.stories.js.map +1 -1
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +3 -3
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +3 -3
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/CheckboxTree/index.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Chip/Chip.stories.js.map +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
- package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.stories.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
- package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
- package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
- package/dist/components/FormField/FormField.stories.js.map +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +2 -2
- package/dist/components/FormInput/FormInput.stories.js.map +1 -1
- package/dist/components/FormInput/index.js +1 -1
- package/dist/components/GridRow/GridRow.stories.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/components/Icon/Icon.stories.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js.map +1 -1
- package/dist/components/InfoBanner/InfoBanner.stories.js.map +1 -1
- package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
- package/dist/components/Input/Input.stories.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.stories.js.map +1 -1
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.stories.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
- package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.stories.js.map +1 -1
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
- package/dist/components/PeriodSelector/index.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js.map +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js.map +1 -1
- package/dist/components/RadioTabSelector/index.js +1 -1
- package/dist/components/Repeater/Repeater.stories.js.map +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/EditorHeader/index.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +25 -25
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +15 -15
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +23 -23
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/index.js +3 -3
- package/dist/components/RteEditor/RteEditor.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +6 -6
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/RteEditor/index.js +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +12 -12
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +19 -19
- package/dist/components/SearchField/SearcheField.stories.js.map +1 -1
- package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/Slider/Slider.stories.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js.map +1 -1
- package/dist/components/Spinner/Spinner.stories.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.stories.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.stories.js.map +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/WeekSelector/WeekSelector.stories.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{components-DAwjkky5.js → components-BzxAULjf.js} +549 -549
- package/dist/components-BzxAULjf.js.map +1 -0
- package/dist/{dist-BIkFjHck.js → dist-V_v3kC0L.js} +3 -3
- package/dist/dist-V_v3kC0L.js.map +1 -0
- package/dist/{esm-ipAmzhQq.js → esm-BwHoYxVb.js} +3 -3
- package/dist/{esm-ipAmzhQq.js.map → esm-BwHoYxVb.js.map} +1 -1
- package/dist/{helpers-MNJmfDe_.js → helpers-B1VK8xTF.js} +2 -2
- package/dist/{helpers-MNJmfDe_.js.map → helpers-B1VK8xTF.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{lib-6BbFZdI7.js → lib-BvOQt8El.js} +2 -2
- package/dist/{lib-6BbFZdI7.js.map → lib-BvOQt8El.js.map} +1 -1
- package/dist/{react-18-Dwpebadr.js → react-18-B7MZmX_Z.js} +3 -3
- package/dist/{react-18-Dwpebadr.js.map → react-18-B7MZmX_Z.js.map} +1 -1
- package/dist/{react.esm-R7eBXTUI.js → react.esm-D_F72rY1.js} +5 -5
- package/dist/react.esm-D_F72rY1.js.map +1 -0
- package/dist/setupTests.js +2 -2
- package/dist/setupTests.js.map +1 -1
- package/dist/storybook__react.d.js +5 -5
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-Cr_l59hN.js → test-Pa9Lwbsq.js} +2 -2
- package/dist/test-Pa9Lwbsq.js.map +1 -0
- package/dist/{test-utils-BSs0eZfL.js → test-utils-Cmn06m_x.js} +2 -2
- package/dist/{test-utils-BSs0eZfL.js.map → test-utils-Cmn06m_x.js.map} +1 -1
- package/package.json +15 -15
- package/dist/Lexical.prod-sbwgNRjw.js.map +0 -1
- package/dist/LexicalClipboard.prod-DdImsyd1.js +0 -248
- package/dist/LexicalClipboard.prod-DdImsyd1.js.map +0 -1
- package/dist/LexicalExtension.prod-jTSDl1mh.js.map +0 -1
- package/dist/LexicalLink.prod-BKLNLyu8.js.map +0 -1
- package/dist/LexicalList.prod-DEtc4lSr.js.map +0 -1
- package/dist/LexicalTable.prod-CpIPDW6z.js.map +0 -1
- package/dist/LexicalUtils.prod-DjjGkphN.js +0 -360
- package/dist/LexicalUtils.prod-DjjGkphN.js.map +0 -1
- package/dist/chunk-SZQXB3JV-KiB8lSa9.js.map +0 -1
- package/dist/components-DAwjkky5.js.map +0 -1
- package/dist/dist-BIkFjHck.js.map +0 -1
- package/dist/react.esm-R7eBXTUI.js.map +0 -1
- package/dist/test-Cr_l59hN.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { An as e, F as t, Fn as n, Ht as r, Kt as i, Lt as a, Mt as o, O as s, On as c, Rt as l, St as u, U as d, Wt as f, Zt as p, a as m, bn as h, bt as g, er as _, ft as v, kn as y, mt as b, on as x, ot as S, p as ee, pt as te, rt as C, u as w, un as ne, v as T, w as re, wn as ie } from "./Lexical.prod-CqPLSi0R.js";
|
|
2
|
+
import { l as ae, r as oe } from "./LexicalUtils.prod-BqcriFWV.js";
|
|
3
|
+
import { i as E, n as se } from "./LexicalExtension.prod-CUQTgbur.js";
|
|
4
4
|
//#region node_modules/@lexical/link/LexicalLink.prod.mjs
|
|
5
|
-
var
|
|
5
|
+
var ce = new Set([
|
|
6
6
|
"http:",
|
|
7
7
|
"https:",
|
|
8
8
|
"mailto:",
|
|
9
9
|
"sms:",
|
|
10
10
|
"tel:"
|
|
11
|
-
]), D = class
|
|
11
|
+
]), D = class e extends m {
|
|
12
12
|
__url;
|
|
13
13
|
__target;
|
|
14
14
|
__rel;
|
|
@@ -16,12 +16,12 @@ var E = new Set([
|
|
|
16
16
|
static getType() {
|
|
17
17
|
return "link";
|
|
18
18
|
}
|
|
19
|
-
static clone(
|
|
20
|
-
return new t
|
|
21
|
-
rel:
|
|
22
|
-
target:
|
|
23
|
-
title:
|
|
24
|
-
},
|
|
19
|
+
static clone(t) {
|
|
20
|
+
return new e(t.__url, {
|
|
21
|
+
rel: t.__rel,
|
|
22
|
+
target: t.__target,
|
|
23
|
+
title: t.__title
|
|
24
|
+
}, t.__key);
|
|
25
25
|
}
|
|
26
26
|
constructor(e = "", t = {}, n) {
|
|
27
27
|
super(n);
|
|
@@ -33,10 +33,10 @@ var E = new Set([
|
|
|
33
33
|
}
|
|
34
34
|
createDOM(e) {
|
|
35
35
|
let t = document.createElement("a");
|
|
36
|
-
return this.updateLinkDOM(null, t, e),
|
|
36
|
+
return this.updateLinkDOM(null, t, e), ne(t, e.theme.link), t;
|
|
37
37
|
}
|
|
38
38
|
updateLinkDOM(e, t, n) {
|
|
39
|
-
if (
|
|
39
|
+
if (g(t)) {
|
|
40
40
|
e && e.__url === this.__url || (t.href = this.sanitizeUrl(this.__url));
|
|
41
41
|
for (let n of [
|
|
42
42
|
"target",
|
|
@@ -64,10 +64,10 @@ var E = new Set([
|
|
|
64
64
|
return super.updateFromJSON(e).setURL(e.url).setRel(e.rel || null).setTarget(e.target || null).setTitle(e.title || null);
|
|
65
65
|
}
|
|
66
66
|
sanitizeUrl(e) {
|
|
67
|
-
e =
|
|
67
|
+
e = R(e);
|
|
68
68
|
try {
|
|
69
|
-
let t = new URL(
|
|
70
|
-
if (!
|
|
69
|
+
let t = new URL(R(e));
|
|
70
|
+
if (!ce.has(t.protocol)) return "about:blank";
|
|
71
71
|
} catch {
|
|
72
72
|
return e;
|
|
73
73
|
}
|
|
@@ -111,7 +111,7 @@ var E = new Set([
|
|
|
111
111
|
return t.__title = e, t;
|
|
112
112
|
}
|
|
113
113
|
insertNewAfter(e, t = !0) {
|
|
114
|
-
let n =
|
|
114
|
+
let n = d(this);
|
|
115
115
|
return this.insertAfter(n, t), n;
|
|
116
116
|
}
|
|
117
117
|
canInsertTextBefore() {
|
|
@@ -127,7 +127,7 @@ var E = new Set([
|
|
|
127
127
|
return !0;
|
|
128
128
|
}
|
|
129
129
|
extractWithChild(e, t, n) {
|
|
130
|
-
if (!
|
|
130
|
+
if (!T(t)) return !1;
|
|
131
131
|
let r = t.anchor.getNode(), i = t.focus.getNode();
|
|
132
132
|
return this.isParentOf(r) && this.isParentOf(i) && t.getTextContent().length > 0;
|
|
133
133
|
}
|
|
@@ -142,56 +142,56 @@ var E = new Set([
|
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
function O(e) {
|
|
145
|
-
let t =
|
|
145
|
+
let t = ie(e, "next");
|
|
146
146
|
return [t, t.getFlipped()];
|
|
147
147
|
}
|
|
148
148
|
function k(e, t) {
|
|
149
149
|
for (let n of t) if (n.origin.isAttached()) {
|
|
150
|
-
|
|
150
|
+
s(e, y(n));
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
function le(e) {
|
|
155
|
-
let
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
let
|
|
161
|
-
for (let
|
|
162
|
-
let
|
|
163
|
-
if (
|
|
164
|
-
let
|
|
165
|
-
if (
|
|
166
|
-
let t =
|
|
167
|
-
t.append(...
|
|
155
|
+
let t = S(), n = null, r = null;
|
|
156
|
+
function i() {
|
|
157
|
+
T(t) && (k(t.anchor, n), k(t.focus, r), v(t));
|
|
158
|
+
}
|
|
159
|
+
T(t) && (n = O(t.anchor), r = O(t.focus));
|
|
160
|
+
let a = !1;
|
|
161
|
+
for (let t of C(e, "next")) {
|
|
162
|
+
let n = t.origin;
|
|
163
|
+
if (u(n) && !n.isInline()) {
|
|
164
|
+
let r = n.getChildren();
|
|
165
|
+
if (r.length > 0) {
|
|
166
|
+
let t = d(e);
|
|
167
|
+
t.append(...r), n.append(t), a = !0;
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
ae(n, o(t), { $shouldSplit: () => !1 });
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
function s(e, t, n) {
|
|
173
|
-
let [r, i] = e, a = (e) =>
|
|
173
|
+
let [r, i] = e, a = (e) => te(e) && e.origin.is(t);
|
|
174
174
|
if (!a(r) && !a(i)) return e;
|
|
175
|
-
let o =
|
|
175
|
+
let o = y(C(n, "next"));
|
|
176
176
|
return [o, o.getFlipped()];
|
|
177
177
|
}
|
|
178
178
|
if (e.isAttached()) {
|
|
179
179
|
let t = e.getPreviousSibling();
|
|
180
|
-
if (j(t) && t.shouldMergeAdjacentLink(e)) return
|
|
181
|
-
let
|
|
182
|
-
j(
|
|
180
|
+
if (j(t) && t.shouldMergeAdjacentLink(e)) return n &&= s(n, t, e), r &&= s(r, t, e), t.append(...e.getChildren()), e.remove(), void i();
|
|
181
|
+
let o = e.getNextSibling();
|
|
182
|
+
j(o) && e.shouldMergeAdjacentLink(o) && (n &&= s(n, e, o), r &&= s(r, e, o), e.append(...o.getChildren()), o.remove(), a = !0);
|
|
183
183
|
}
|
|
184
|
-
if (
|
|
184
|
+
if (a) {
|
|
185
185
|
if (!e.canBeEmpty() && e.isEmpty()) {
|
|
186
186
|
let t = e.getParent();
|
|
187
187
|
e.remove(), t && t.isEmpty() && t.remove();
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
i();
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
function ue(e) {
|
|
193
193
|
let t = null;
|
|
194
|
-
if (
|
|
194
|
+
if (g(e)) {
|
|
195
195
|
let n = e.textContent;
|
|
196
196
|
(n !== null && n !== "" || e.children.length > 0) && (t = A(e.getAttribute("href") || "", {
|
|
197
197
|
rel: e.getAttribute("rel"),
|
|
@@ -202,7 +202,7 @@ function ue(e) {
|
|
|
202
202
|
return { node: t };
|
|
203
203
|
}
|
|
204
204
|
function A(e = "", t) {
|
|
205
|
-
return
|
|
205
|
+
return _(new D(e, t));
|
|
206
206
|
}
|
|
207
207
|
function j(e) {
|
|
208
208
|
return e instanceof D;
|
|
@@ -268,16 +268,16 @@ var M = class e extends D {
|
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
function N(e = "", t) {
|
|
271
|
-
return
|
|
271
|
+
return _(new M(e, t));
|
|
272
272
|
}
|
|
273
273
|
function P(e) {
|
|
274
274
|
return e instanceof M;
|
|
275
275
|
}
|
|
276
|
-
var F =
|
|
276
|
+
var F = e("TOGGLE_LINK_COMMAND");
|
|
277
277
|
function I(e, t) {
|
|
278
278
|
if (e.type === "element") {
|
|
279
279
|
let n = e.getNode();
|
|
280
|
-
return
|
|
280
|
+
return u(n) || function(e, ...t) {
|
|
281
281
|
let n = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
282
282
|
r.append("code", e);
|
|
283
283
|
for (let e of t) r.append("v", e);
|
|
@@ -286,31 +286,31 @@ function I(e, t) {
|
|
|
286
286
|
}
|
|
287
287
|
return null;
|
|
288
288
|
}
|
|
289
|
-
function L(e,
|
|
290
|
-
let
|
|
289
|
+
function L(e, n = {}) {
|
|
290
|
+
let r;
|
|
291
291
|
if (e && typeof e == "object") {
|
|
292
|
-
let { url:
|
|
293
|
-
|
|
292
|
+
let { url: t, ...i } = e;
|
|
293
|
+
r = t, n = {
|
|
294
294
|
...i,
|
|
295
|
-
...
|
|
295
|
+
...n
|
|
296
296
|
};
|
|
297
|
-
} else
|
|
298
|
-
let { target:
|
|
299
|
-
if (
|
|
300
|
-
if (
|
|
301
|
-
let e =
|
|
297
|
+
} else r = e;
|
|
298
|
+
let { target: a, title: o } = n, s = n.rel === void 0 ? "noreferrer" : n.rel, c = S();
|
|
299
|
+
if (c === null || !T(c) && !t(c)) return;
|
|
300
|
+
if (t(c)) {
|
|
301
|
+
let e = c.getNodes();
|
|
302
302
|
if (e.length === 0) return;
|
|
303
303
|
e.forEach((e) => {
|
|
304
|
-
if (
|
|
305
|
-
let t =
|
|
304
|
+
if (r === null) {
|
|
305
|
+
let t = f(e, (e) => !P(e) && j(e));
|
|
306
306
|
t && (t.insertBefore(e), t.getChildren().length === 0 && t.remove());
|
|
307
307
|
} else {
|
|
308
|
-
let t =
|
|
309
|
-
if (t) t.setURL(
|
|
308
|
+
let t = f(e, (e) => !P(e) && j(e));
|
|
309
|
+
if (t) t.setURL(r), a !== void 0 && t.setTarget(a), s !== void 0 && t.setRel(s);
|
|
310
310
|
else {
|
|
311
|
-
let t = A(
|
|
312
|
-
rel:
|
|
313
|
-
target:
|
|
311
|
+
let t = A(r, {
|
|
312
|
+
rel: s,
|
|
313
|
+
target: a
|
|
314
314
|
});
|
|
315
315
|
e.insertBefore(t), t.append(e);
|
|
316
316
|
}
|
|
@@ -318,23 +318,23 @@ function L(e, t = {}) {
|
|
|
318
318
|
});
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
if (
|
|
322
|
-
let t =
|
|
321
|
+
if (c.isCollapsed() && r === null) for (let e of c.getNodes()) {
|
|
322
|
+
let t = f(e, (e) => !P(e) && j(e));
|
|
323
323
|
t !== null && (t.getChildren().forEach((e) => {
|
|
324
324
|
t.insertBefore(e);
|
|
325
325
|
}), t.remove());
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
|
-
let l =
|
|
329
|
-
if (
|
|
328
|
+
let l = c.extract();
|
|
329
|
+
if (r === null) {
|
|
330
330
|
let e = /* @__PURE__ */ new Set();
|
|
331
331
|
l.forEach((t) => {
|
|
332
|
-
let n =
|
|
332
|
+
let n = f(t, (e) => !P(e) && j(e));
|
|
333
333
|
if (n !== null) {
|
|
334
334
|
let t = n.getKey();
|
|
335
335
|
if (e.has(t)) return;
|
|
336
336
|
(function(e, t) {
|
|
337
|
-
let n = new Set(t.filter((t) => e.isParentOf(t)).map((e) => e.getKey())), r = e.getChildren(), i = (r) => n.has(r.getKey()) ||
|
|
337
|
+
let n = new Set(t.filter((t) => e.isParentOf(t)).map((e) => e.getKey())), r = e.getChildren(), i = (r) => n.has(r.getKey()) || u(r) && t.some((t) => e.isParentOf(t) && r.isParentOf(t)), a = r.filter(i);
|
|
338
338
|
if (a.length === r.length) return r.forEach((t) => e.insertBefore(t)), void e.remove();
|
|
339
339
|
let o = r.findIndex(i), s = r.findLastIndex(i), c = o === 0, l = s === r.length - 1;
|
|
340
340
|
if (c) a.forEach((t) => e.insertBefore(t));
|
|
@@ -343,7 +343,7 @@ function L(e, t = {}) {
|
|
|
343
343
|
for (let t = a.length - 1; t >= 0; t--) e.insertAfter(a[t]);
|
|
344
344
|
let t = r.slice(s + 1);
|
|
345
345
|
if (t.length > 0) {
|
|
346
|
-
let n =
|
|
346
|
+
let n = d(e);
|
|
347
347
|
a[a.length - 1].insertAfter(n), t.forEach((e) => n.append(e));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
@@ -352,46 +352,46 @@ function L(e, t = {}) {
|
|
|
352
352
|
});
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
|
-
let
|
|
356
|
-
|
|
355
|
+
let p = /* @__PURE__ */ new Set(), m = (e) => {
|
|
356
|
+
p.has(e.getKey()) || (p.add(e.getKey()), e.setURL(r), a !== void 0 && e.setTarget(a), s !== void 0 && e.setRel(s), o !== void 0 && e.setTitle(o));
|
|
357
357
|
};
|
|
358
358
|
if (l.length === 1) {
|
|
359
|
-
let e = l[0], t =
|
|
360
|
-
if (t !== null) return
|
|
359
|
+
let e = l[0], t = f(e, j);
|
|
360
|
+
if (t !== null) return m(t);
|
|
361
361
|
}
|
|
362
362
|
(function(e) {
|
|
363
|
-
let t =
|
|
364
|
-
if (!
|
|
365
|
-
let n =
|
|
366
|
-
if (e(),
|
|
367
|
-
let e =
|
|
368
|
-
if (
|
|
363
|
+
let t = S();
|
|
364
|
+
if (!T(t)) return e();
|
|
365
|
+
let n = v(t), r = n.isBackward(), a = I(n.anchor, r ? -1 : 0), o = I(n.focus, r ? 0 : -1);
|
|
366
|
+
if (e(), a || o) {
|
|
367
|
+
let e = S();
|
|
368
|
+
if (T(e)) {
|
|
369
369
|
let t = e.clone();
|
|
370
|
-
if (i) {
|
|
371
|
-
let e = i.getParent();
|
|
372
|
-
e && t.anchor.set(e.getKey(), i.getIndexWithinParent() + +!!r, "element");
|
|
373
|
-
}
|
|
374
370
|
if (a) {
|
|
375
371
|
let e = a.getParent();
|
|
376
|
-
e && t.
|
|
372
|
+
e && t.anchor.set(e.getKey(), a.getIndexWithinParent() + +!!r, "element");
|
|
377
373
|
}
|
|
378
|
-
|
|
374
|
+
if (o) {
|
|
375
|
+
let e = o.getParent();
|
|
376
|
+
e && t.focus.set(e.getKey(), o.getIndexWithinParent() + +!r, "element");
|
|
377
|
+
}
|
|
378
|
+
i(v(t));
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
})(() => {
|
|
382
382
|
let e = null;
|
|
383
383
|
for (let t of l) {
|
|
384
384
|
if (!t.isAttached()) continue;
|
|
385
|
-
let
|
|
386
|
-
if (
|
|
387
|
-
|
|
385
|
+
let n = f(t, j);
|
|
386
|
+
if (n) {
|
|
387
|
+
m(n);
|
|
388
388
|
continue;
|
|
389
389
|
}
|
|
390
|
-
if (
|
|
390
|
+
if (u(t)) {
|
|
391
391
|
if (!t.isInline()) continue;
|
|
392
392
|
if (j(t)) {
|
|
393
393
|
if (!(P(t) || e !== null && e.getParentOrThrow().isParentOf(t))) {
|
|
394
|
-
|
|
394
|
+
m(t), e = t;
|
|
395
395
|
continue;
|
|
396
396
|
}
|
|
397
397
|
for (let e of t.getChildren()) t.insertBefore(e);
|
|
@@ -399,21 +399,21 @@ function L(e, t = {}) {
|
|
|
399
399
|
continue;
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
let
|
|
403
|
-
j(
|
|
404
|
-
rel:
|
|
405
|
-
target:
|
|
406
|
-
title:
|
|
402
|
+
let i = t.getPreviousSibling();
|
|
403
|
+
j(i) && i.is(e) ? i.append(t) : (e = A(r, {
|
|
404
|
+
rel: s,
|
|
405
|
+
target: a,
|
|
406
|
+
title: o
|
|
407
407
|
}), t.insertAfter(e), e.append(t));
|
|
408
408
|
}
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
var
|
|
412
|
-
function
|
|
413
|
-
return e.match(/^[a-z][a-z0-9+.-]*:/i) || e.match(/^[/#.]/) ? e : e.includes("@") ? `mailto:${e}` :
|
|
411
|
+
var de = /^\+?[0-9\s()-]{5,}$/;
|
|
412
|
+
function R(e) {
|
|
413
|
+
return e.match(/^[a-z][a-z0-9+.-]*:/i) || e.match(/^[/#.]/) ? e : e.includes("@") ? `mailto:${e}` : de.test(e) ? `tel:${e}` : `https://${e}`;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
return
|
|
415
|
+
function z(e, t) {
|
|
416
|
+
return w(e.registerNodeTransform(D, le), e.registerCommand(F, (e) => {
|
|
417
417
|
let n = t.validateUrl.peek(), r = t.attributes.peek();
|
|
418
418
|
if (e === null) return L(null), !0;
|
|
419
419
|
if (typeof e == "string") return !(n !== void 0 && !n(e)) && (L(e, r), !0);
|
|
@@ -426,47 +426,47 @@ function B(e, t) {
|
|
|
426
426
|
title: a
|
|
427
427
|
}), !0;
|
|
428
428
|
}
|
|
429
|
-
}, 0),
|
|
429
|
+
}, 0), se(() => {
|
|
430
430
|
let n = t.validateUrl.value;
|
|
431
431
|
if (!n) return;
|
|
432
432
|
let r = t.attributes.value;
|
|
433
|
-
return e.registerCommand(
|
|
434
|
-
let i =
|
|
435
|
-
if (!
|
|
433
|
+
return e.registerCommand(l, (t) => {
|
|
434
|
+
let i = S();
|
|
435
|
+
if (!T(i) || i.isCollapsed() || !oe(t, ClipboardEvent) || t.clipboardData === null) return !1;
|
|
436
436
|
let a = t.clipboardData.getData("text");
|
|
437
|
-
return !!n(a) && !i.getNodes().some((e) =>
|
|
437
|
+
return !!n(a) && !i.getNodes().some((e) => u(e)) && (e.dispatchCommand(F, {
|
|
438
438
|
...r,
|
|
439
439
|
url: a
|
|
440
440
|
}), t.preventDefault(), !0);
|
|
441
441
|
}, 1);
|
|
442
442
|
}));
|
|
443
443
|
}
|
|
444
|
-
var
|
|
445
|
-
build: (e, t, n) =>
|
|
444
|
+
var B = r({
|
|
445
|
+
build: (e, t, n) => E(t),
|
|
446
446
|
config: {
|
|
447
447
|
attributes: void 0,
|
|
448
448
|
validateUrl: void 0
|
|
449
449
|
},
|
|
450
450
|
mergeConfig(e, t) {
|
|
451
|
-
let n =
|
|
452
|
-
return e.attributes && (n.attributes =
|
|
451
|
+
let n = h(e, t);
|
|
452
|
+
return e.attributes && (n.attributes = h(e.attributes, n.attributes)), n;
|
|
453
453
|
},
|
|
454
454
|
name: "@lexical/link/Link",
|
|
455
455
|
nodes: () => [D],
|
|
456
|
-
register: (e, t, n) =>
|
|
456
|
+
register: (e, t, n) => z(e, n.getOutput())
|
|
457
457
|
});
|
|
458
|
-
function
|
|
458
|
+
function V(e, t, n = {}) {
|
|
459
459
|
let r = (n) => {
|
|
460
460
|
let r = n.target;
|
|
461
|
-
if (!
|
|
462
|
-
let
|
|
463
|
-
if (
|
|
464
|
-
let
|
|
465
|
-
if (
|
|
466
|
-
let e =
|
|
461
|
+
if (!c(r)) return;
|
|
462
|
+
let i = ee(r);
|
|
463
|
+
if (i === null) return;
|
|
464
|
+
let a = null, o = null;
|
|
465
|
+
if (i.update(() => {
|
|
466
|
+
let e = re(r);
|
|
467
467
|
if (e !== null) {
|
|
468
|
-
let n =
|
|
469
|
-
if (!t.disabled.peek()) if (j(n))
|
|
468
|
+
let n = f(e, u);
|
|
469
|
+
if (!t.disabled.peek()) if (j(n)) a = n.sanitizeUrl(n.getURL()), o = n.getTarget();
|
|
470
470
|
else {
|
|
471
471
|
let e = function(e, t) {
|
|
472
472
|
let n = e;
|
|
@@ -475,35 +475,35 @@ function H(e, t, n = {}) {
|
|
|
475
475
|
n = n.parentNode;
|
|
476
476
|
}
|
|
477
477
|
return null;
|
|
478
|
-
}(r,
|
|
479
|
-
e !== null && (
|
|
478
|
+
}(r, g);
|
|
479
|
+
e !== null && (a = e.href, o = e.target);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
}),
|
|
483
|
-
let
|
|
484
|
-
if (
|
|
485
|
-
let
|
|
486
|
-
window.open(
|
|
487
|
-
},
|
|
482
|
+
}), a === null || a === "") return;
|
|
483
|
+
let s = e.getEditorState().read(S, { editor: e });
|
|
484
|
+
if (T(s) && !s.isCollapsed()) return void n.preventDefault();
|
|
485
|
+
let l = n.type === "auxclick" && n.button === 1;
|
|
486
|
+
window.open(a, t.newTab.peek() || l || n.metaKey || n.ctrlKey || o === "_blank" ? "_blank" : "_self"), n.preventDefault();
|
|
487
|
+
}, i = (e) => {
|
|
488
488
|
e.button === 1 && r(e);
|
|
489
489
|
};
|
|
490
490
|
return e.registerRootListener((e) => {
|
|
491
|
-
if (e) return e.addEventListener("click", r, n), e.addEventListener("mouseup",
|
|
492
|
-
e.removeEventListener("click", r), e.removeEventListener("mouseup",
|
|
491
|
+
if (e) return e.addEventListener("click", r, n), e.addEventListener("mouseup", i, n), () => {
|
|
492
|
+
e.removeEventListener("click", r), e.removeEventListener("mouseup", i);
|
|
493
493
|
};
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
496
|
r({
|
|
497
|
-
build: (e, t, n) =>
|
|
498
|
-
config:
|
|
497
|
+
build: (e, t, n) => E(t),
|
|
498
|
+
config: a({
|
|
499
499
|
disabled: !1,
|
|
500
500
|
newTab: !1
|
|
501
501
|
}),
|
|
502
|
-
dependencies: [
|
|
502
|
+
dependencies: [B],
|
|
503
503
|
name: "@lexical/link/ClickableLink",
|
|
504
|
-
register: (e, t, n) =>
|
|
504
|
+
register: (e, t, n) => V(e, n.getOutput())
|
|
505
505
|
});
|
|
506
|
-
function
|
|
506
|
+
function fe(e, t = (e) => e) {
|
|
507
507
|
return (n) => {
|
|
508
508
|
let r = e.exec(n);
|
|
509
509
|
return r === null ? null : {
|
|
@@ -514,35 +514,35 @@ function de(e, t = (e) => e) {
|
|
|
514
514
|
};
|
|
515
515
|
};
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function H(e, t) {
|
|
518
518
|
for (let n = 0; n < t.length; n++) {
|
|
519
519
|
let r = t[n](e);
|
|
520
520
|
if (r) return r;
|
|
521
521
|
}
|
|
522
522
|
return null;
|
|
523
523
|
}
|
|
524
|
-
var
|
|
525
|
-
function W(e) {
|
|
526
|
-
return
|
|
524
|
+
var U = /[.,;\s]/;
|
|
525
|
+
function W(e, t) {
|
|
526
|
+
return t.test(e);
|
|
527
527
|
}
|
|
528
|
-
function G(e) {
|
|
529
|
-
return W(e[e.length - 1]);
|
|
528
|
+
function G(e, t) {
|
|
529
|
+
return W(e[e.length - 1], t);
|
|
530
530
|
}
|
|
531
|
-
function K(e) {
|
|
532
|
-
return W(e[0]);
|
|
531
|
+
function K(e, t) {
|
|
532
|
+
return W(e[0], t);
|
|
533
533
|
}
|
|
534
|
-
function q(e) {
|
|
535
|
-
let
|
|
536
|
-
return
|
|
534
|
+
function q(e, t) {
|
|
535
|
+
let r = e.getPreviousSibling();
|
|
536
|
+
return u(r) && (r = r.getLastDescendant()), r === null || n(r) || b(r) && G(r.getTextContent(), t);
|
|
537
537
|
}
|
|
538
|
-
function J(e) {
|
|
539
|
-
let
|
|
540
|
-
return
|
|
538
|
+
function J(e, t) {
|
|
539
|
+
let r = e.getNextSibling();
|
|
540
|
+
return u(r) && (r = r.getFirstDescendant()), r === null || n(r) || b(r) && K(r.getTextContent(), t);
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
return (e > 0 ? W(
|
|
542
|
+
function Y(e, t, n, r, i) {
|
|
543
|
+
return (e > 0 ? W(r[e - 1], n) : q(i[0], n)) ? t < r.length ? W(r[t], n) : J(i[i.length - 1], n) : !1;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function pe(e, t, n) {
|
|
546
546
|
let r = [], i = [], a = [], o = 0, s = 0, c = [...e];
|
|
547
547
|
for (; c.length > 0;) {
|
|
548
548
|
let e = c[0], l = e.getTextContent().length, u = s;
|
|
@@ -555,45 +555,45 @@ function Y(e, t, n) {
|
|
|
555
555
|
a
|
|
556
556
|
];
|
|
557
557
|
}
|
|
558
|
-
function me(e,
|
|
558
|
+
function me(e, n, r, i) {
|
|
559
559
|
let a = N(i.url, i.attributes);
|
|
560
560
|
if (e.length === 1) {
|
|
561
|
-
let
|
|
562
|
-
|
|
563
|
-
let s =
|
|
564
|
-
return s.setFormat(
|
|
561
|
+
let t, o = e[0];
|
|
562
|
+
n === 0 ? [t, o] = o.splitText(r) : [, t, o] = o.splitText(n, r);
|
|
563
|
+
let s = x(i.text);
|
|
564
|
+
return s.setFormat(t.getFormat()), s.setDetail(t.getDetail()), s.setStyle(t.getStyle()), a.append(s), t.replace(a), o;
|
|
565
565
|
}
|
|
566
566
|
if (e.length > 1) {
|
|
567
567
|
let i = e[0], o, s = i.getTextContent().length;
|
|
568
|
-
|
|
569
|
-
let
|
|
568
|
+
n === 0 ? o = i : [, o] = i.splitText(n);
|
|
569
|
+
let c = [], l;
|
|
570
570
|
for (let t = 1; t < e.length; t++) {
|
|
571
571
|
let n = e[t], i = n.getTextContent().length, a = s;
|
|
572
|
-
if (a < r) if (s + i <= r)
|
|
572
|
+
if (a < r) if (s + i <= r) c.push(n);
|
|
573
573
|
else {
|
|
574
574
|
let [e, t] = n.splitText(r - a);
|
|
575
|
-
|
|
575
|
+
c.push(e), l = t;
|
|
576
576
|
}
|
|
577
577
|
s += i;
|
|
578
578
|
}
|
|
579
|
-
let
|
|
580
|
-
return
|
|
579
|
+
let u = S(), d = u ? u.getNodes().find(b) : void 0, f = x(o.getTextContent());
|
|
580
|
+
return f.setFormat(o.getFormat()), f.setDetail(o.getDetail()), f.setStyle(o.getStyle()), a.append(f, ...c), d && d === o && (T(u) ? f.select(u.anchor.offset, u.focus.offset) : t(u) && f.select(0, f.getTextContent().length)), o.replace(a), l;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
function X(e, t, r) {
|
|
583
|
+
function X(e, t, n, r) {
|
|
584
584
|
let i = e.getChildren(), a = i.length;
|
|
585
585
|
for (let t = 0; t < a; t++) {
|
|
586
|
-
let
|
|
587
|
-
if (!
|
|
586
|
+
let r = i[t];
|
|
587
|
+
if (!b(r) || !r.isSimpleText()) return Z(e), void n(null, e.getURL());
|
|
588
588
|
}
|
|
589
|
-
let o = e.getTextContent(), s =
|
|
590
|
-
if (s === null || s.text !== o || !q(e) || !J(e)) return Z(e), void
|
|
589
|
+
let o = e.getTextContent(), s = H(o, t);
|
|
590
|
+
if (s === null || s.text !== o || !q(e, r) || !J(e, r)) return Z(e), void n(null, e.getURL());
|
|
591
591
|
let c = e.getURL();
|
|
592
|
-
if (c !== s.url && (e.setURL(s.url),
|
|
592
|
+
if (c !== s.url && (e.setURL(s.url), n(s.url, c)), s.attributes) {
|
|
593
593
|
let t = e.getRel();
|
|
594
|
-
t !== s.attributes.rel && (e.setRel(s.attributes.rel || null),
|
|
595
|
-
let
|
|
596
|
-
|
|
594
|
+
t !== s.attributes.rel && (e.setRel(s.attributes.rel || null), n(s.attributes.rel || null, t));
|
|
595
|
+
let r = e.getTarget();
|
|
596
|
+
r !== s.attributes.target && (e.setTarget(s.attributes.target || null), n(s.attributes.target || null, r));
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
function Z(e) {
|
|
@@ -604,25 +604,26 @@ function Z(e) {
|
|
|
604
604
|
var Q = {
|
|
605
605
|
changeHandlers: [],
|
|
606
606
|
excludeParents: [],
|
|
607
|
-
matchers: []
|
|
607
|
+
matchers: [],
|
|
608
|
+
separatorRegex: U
|
|
608
609
|
};
|
|
609
610
|
function $(e, t = Q) {
|
|
610
|
-
let { matchers:
|
|
611
|
-
for (let n of
|
|
611
|
+
let { matchers: n, changeHandlers: r, excludeParents: i, separatorRegex: a = U } = t, o = (e, t) => {
|
|
612
|
+
for (let n of r) n(e, t);
|
|
612
613
|
};
|
|
613
|
-
return
|
|
614
|
-
let t = e.getParentOrThrow(),
|
|
615
|
-
P(t) ? X(t,
|
|
614
|
+
return w(e.registerNodeTransform(p, (e) => {
|
|
615
|
+
let t = e.getParentOrThrow(), r = e.getPreviousSibling();
|
|
616
|
+
P(t) ? X(t, n, o, a) : !j(t) && !i.some((e) => e(t)) && (e.isSimpleText() && (K(e.getTextContent(), a) || !P(r)) && (function(e, t, n, r) {
|
|
616
617
|
for (let t of e) {
|
|
617
618
|
let e = t.getParent();
|
|
618
619
|
if (P(e) && !e.getIsUnlinked()) return;
|
|
619
620
|
}
|
|
620
|
-
let
|
|
621
|
-
for (; (
|
|
622
|
-
let e =
|
|
623
|
-
if (
|
|
624
|
-
let [
|
|
625
|
-
for (let e of
|
|
621
|
+
let i = [...e], a = i.map((e) => e.getTextContent()).join(""), o, s = a, c = 0;
|
|
622
|
+
for (; (o = H(s, t)) && o !== null;) {
|
|
623
|
+
let e = o.index, t = e + o.length;
|
|
624
|
+
if (Y(c + e, c + t, r, a, i)) {
|
|
625
|
+
let [r, , a, l] = pe(i, c + e, c + t), u = !1;
|
|
626
|
+
for (let e of a) {
|
|
626
627
|
let t = e.getParent();
|
|
627
628
|
if (P(t) && !t.getIsUnlinked()) {
|
|
628
629
|
u = !0;
|
|
@@ -630,35 +631,35 @@ function $(e, t = Q) {
|
|
|
630
631
|
}
|
|
631
632
|
}
|
|
632
633
|
if (u) {
|
|
633
|
-
|
|
634
|
+
c += t, s = s.substring(t);
|
|
634
635
|
continue;
|
|
635
636
|
}
|
|
636
|
-
let d = me(
|
|
637
|
-
|
|
638
|
-
} else
|
|
639
|
-
|
|
637
|
+
let d = me(a, c + e - r, c + t - r, o);
|
|
638
|
+
i = d ? [d, ...l] : l, n(o.url, null), c = 0;
|
|
639
|
+
} else c += t;
|
|
640
|
+
s = s.substring(t);
|
|
640
641
|
}
|
|
641
642
|
})(function(e) {
|
|
642
|
-
let t = [e],
|
|
643
|
-
for (;
|
|
643
|
+
let t = [e], n = e.getNextSibling();
|
|
644
|
+
for (; n !== null && b(n) && n.isSimpleText() && (t.push(n), !/[\s]/.test(n.getTextContent()));) n = n.getNextSibling();
|
|
644
645
|
return t;
|
|
645
|
-
}(e),
|
|
646
|
-
let
|
|
647
|
-
if (!P(
|
|
648
|
-
if (P(
|
|
649
|
-
if (!K(
|
|
650
|
-
if (
|
|
651
|
-
let
|
|
652
|
-
|
|
646
|
+
}(e), n, o, a), (function(e, t, n, r) {
|
|
647
|
+
let i = e.getParent(), a = e.getPreviousSibling(), o = e.getNextSibling(), s = e.getTextContent();
|
|
648
|
+
if (!P(i) || i.getIsUnlinked()) {
|
|
649
|
+
if (P(a) && !a.getIsUnlinked() && a.is(e.getPreviousSibling()) && e.getParent() === a.getParent()) {
|
|
650
|
+
if (!K(s, r)) return Z(a), void n(null, a.getURL());
|
|
651
|
+
if (c = s, a.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(c) : /^\.[a-zA-Z0-9]{1,}/.test(c)) {
|
|
652
|
+
let i = a.getTextContent() + s, o = H(i, t);
|
|
653
|
+
o !== null && o.text === i && (a.append(e), X(a, t, n, r), n(null, a.getURL()));
|
|
653
654
|
}
|
|
654
655
|
}
|
|
655
|
-
var
|
|
656
|
-
!P(
|
|
656
|
+
var c;
|
|
657
|
+
!P(o) || o.getIsUnlinked() || G(s, r) || o.is(e.getNextSibling()) && e.getParent() === o.getParent() && (Z(o), n(null, o.getURL()));
|
|
657
658
|
}
|
|
658
|
-
})(e,
|
|
659
|
+
})(e, n, o, a));
|
|
659
660
|
}), e.registerCommand(F, (e) => {
|
|
660
|
-
let t =
|
|
661
|
-
return e !== null || !
|
|
661
|
+
let t = S();
|
|
662
|
+
return e !== null || !T(t) || t.extract().forEach((e) => {
|
|
662
663
|
let t = e.getParent();
|
|
663
664
|
P(t) && (t.setIsUnlinked(!t.getIsUnlinked()), t.markDirty());
|
|
664
665
|
}), !1;
|
|
@@ -666,9 +667,9 @@ function $(e, t = Q) {
|
|
|
666
667
|
}
|
|
667
668
|
r({
|
|
668
669
|
config: Q,
|
|
669
|
-
dependencies: [
|
|
670
|
+
dependencies: [B],
|
|
670
671
|
mergeConfig(e, t) {
|
|
671
|
-
let n =
|
|
672
|
+
let n = h(e, t);
|
|
672
673
|
for (let r of [
|
|
673
674
|
"matchers",
|
|
674
675
|
"changeHandlers",
|
|
@@ -684,6 +685,6 @@ r({
|
|
|
684
685
|
register: $
|
|
685
686
|
});
|
|
686
687
|
//#endregion
|
|
687
|
-
export {
|
|
688
|
+
export { V as a, fe as c, F as i, L as n, M as o, z as r, $ as s, D as t };
|
|
688
689
|
|
|
689
|
-
//# sourceMappingURL=LexicalLink.prod-
|
|
690
|
+
//# sourceMappingURL=LexicalLink.prod-DMhcqD9x.js.map
|