@uva-glass/component-library 3.57.2 → 3.57.3
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-D2GC2qPX.js.map +1 -1
- package/dist/AddCatalogueLinkForm-Di0xm7Ep.js.map +1 -1
- package/dist/ClipboardButton-Cg6LGUiD.js.map +1 -1
- package/dist/ControlsButton-Byx4XQtB.js.map +1 -1
- package/dist/CopyableText-BKsM-TuS.js.map +1 -1
- package/dist/DataTable-Cgn_RKTA.js.map +1 -1
- package/dist/{Lexical.prod-nAj5fF96.js → Lexical.prod-Dy5aDppc.js} +2449 -1794
- package/dist/Lexical.prod-Dy5aDppc.js.map +1 -0
- package/dist/LexicalClipboard.prod-CS8a49uL.js +398 -0
- package/dist/LexicalClipboard.prod-CS8a49uL.js.map +1 -0
- package/dist/{LexicalComposerContext.prod-DumMmRBt.js → LexicalComposerContext.prod-D4HOlWII.js} +3 -3
- package/dist/LexicalComposerContext.prod-D4HOlWII.js.map +1 -0
- package/dist/LexicalHtml.prod-BtzosUOH.js +1611 -0
- package/dist/LexicalHtml.prod-BtzosUOH.js.map +1 -0
- package/dist/LexicalLink.prod-DzgwWhQM.js +646 -0
- package/dist/LexicalLink.prod-DzgwWhQM.js.map +1 -0
- package/dist/LexicalList.prod-icY8mpm6.js +710 -0
- package/dist/LexicalList.prod-icY8mpm6.js.map +1 -0
- package/dist/{LexicalTable.prod-BpHQYpBM.js → LexicalTable.prod-Bf0is-op.js} +674 -750
- package/dist/LexicalTable.prod-Bf0is-op.js.map +1 -0
- package/dist/LexicalUtils.prod-CjGUKarD.js +259 -0
- package/dist/LexicalUtils.prod-CjGUKarD.js.map +1 -0
- package/dist/{LinkContextMenu-Byu3AEqp.js → LinkContextMenu-C8ehPbP8.js} +2 -2
- package/dist/{LinkContextMenu-Byu3AEqp.js.map → LinkContextMenu-C8ehPbP8.js.map} +1 -1
- package/dist/MenuLink-sK2_W2zs.js.map +1 -1
- package/dist/MetaDataList-Co9WCexh.js.map +1 -1
- package/dist/MultiSelectBox-D34qAgzc.js.map +1 -1
- package/dist/OverlayStepBar-BiC06Itd.js.map +1 -1
- package/dist/{PasteHandlerPlugin-DyTXcFsj.js → PasteHandlerPlugin-CSo_lOE8.js} +6 -6
- package/dist/{PasteHandlerPlugin-DyTXcFsj.js.map → PasteHandlerPlugin-CSo_lOE8.js.map} +1 -1
- package/dist/Periods-B4ms3N24.js.map +1 -1
- package/dist/SortableProvider-D-6Ttz0h.js.map +1 -1
- package/dist/{TableCellContextMenu--4IdoKAU.js → TableCellContextMenu-Cu5iXYSJ.js} +2 -2
- package/dist/{TableCellContextMenu--4IdoKAU.js.map → TableCellContextMenu-Cu5iXYSJ.js.map} +1 -1
- package/dist/{TableCellResizerPlugin-Dn8Ks2Lm.js → TableCellResizerPlugin-Bb2blXnq.js} +43 -43
- package/dist/TableCellResizerPlugin-Bb2blXnq.js.map +1 -0
- package/dist/VarIndicator-D0cnlcIf.js.map +1 -1
- package/dist/{chunk-5WKL7XVT-3IraU-Ja.js → chunk-5WKL7XVT-CvOIS3NE.js} +15 -15
- package/dist/{chunk-5WKL7XVT-3IraU-Ja.js.map → chunk-5WKL7XVT-CvOIS3NE.js.map} +1 -1
- package/dist/{client-BcEWjSJP.js → client-CXlG3hNo.js} +956 -957
- package/dist/{client-BcEWjSJP.js.map → client-CXlG3hNo.js.map} +1 -1
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.stories.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +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.test.js +2 -2
- package/dist/components/Card/Card.test.js.map +1 -1
- 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/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- 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/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/CopyableText/CopyableText.stories.js.map +1 -1
- package/dist/components/DataTable/DataTable.stories.js +2 -2
- package/dist/components/DataTable/DataTable.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/FeedbackBar/FeedbackBar.stories.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FeedbackBar/FeedbackBar.test.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/index.js +1 -1
- package/dist/components/GridRow/GridRow.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/InputField/InputField.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/Label/Label.test.js.map +1 -1
- 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/MetaDataBar/MetaDataBar.test.js.map +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/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.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/Periods/Periods.stories.js.map +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/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +2 -2
- 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 +35 -35
- 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/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/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +33 -33
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +2 -2
- 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 +4 -4
- 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 +7 -7
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/index.js +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +18 -18
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +22 -22
- 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/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.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.test.js +2 -2
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +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.test.js +3 -3
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/WeekSelector/WeekSelector.js.map +1 -1
- package/dist/components/WeekSelector/WeekSelector.stories.js.map +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOption.js.map +1 -1
- package/dist/components/hooks/useOnClickOutside.js.map +1 -1
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components-CgBF6db6.js +2013 -0
- package/dist/components-CgBF6db6.js.map +1 -0
- package/dist/{dist-C6Ar8a59.js → dist-oLwM--0y.js} +14 -14
- package/dist/{dist-C6Ar8a59.js.map → dist-oLwM--0y.js.map} +1 -1
- package/dist/{esm-B6Pg-v2v.js → esm-BXzGXYWZ.js} +3 -3
- package/dist/{esm-B6Pg-v2v.js.map → esm-BXzGXYWZ.js.map} +1 -1
- package/dist/{helpers-BzYayeT-.js → helpers-MMNO9vlK.js} +9 -9
- package/dist/helpers-MMNO9vlK.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{react-18-DbbN8Pdb.js → react-18-BwdnKC48.js} +3 -3
- package/dist/react-18-BwdnKC48.js.map +1 -0
- package/dist/{react.esm-56DGmlLk.js → react.esm-DwWzhs9e.js} +17 -17
- package/dist/react.esm-DwWzhs9e.js.map +1 -0
- package/dist/setupTests.js +2 -2
- package/dist/setupTests.js.map +1 -1
- package/dist/storybook__react.d.js +266 -266
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-WxLxsxwA.js → test-Gtly6H2f.js} +7 -5
- package/dist/{test-WxLxsxwA.js.map → test-Gtly6H2f.js.map} +1 -1
- package/dist/{test-utils-CMrZ33U0.js → test-utils-BVa31HVj.js} +2 -2
- package/dist/{test-utils-CMrZ33U0.js.map → test-utils-BVa31HVj.js.map} +1 -1
- package/package.json +21 -22
- package/dist/Lexical.prod-nAj5fF96.js.map +0 -1
- package/dist/LexicalClipboard.prod-B9sWgdS2.js +0 -348
- package/dist/LexicalClipboard.prod-B9sWgdS2.js.map +0 -1
- package/dist/LexicalComposerContext.prod-DumMmRBt.js.map +0 -1
- package/dist/LexicalHtml.prod-RCMsF0qt.js +0 -2139
- package/dist/LexicalHtml.prod-RCMsF0qt.js.map +0 -1
- package/dist/LexicalLink.prod-BcBNTFEb.js +0 -707
- package/dist/LexicalLink.prod-BcBNTFEb.js.map +0 -1
- package/dist/LexicalList.prod-THQt9B32.js +0 -890
- package/dist/LexicalList.prod-THQt9B32.js.map +0 -1
- package/dist/LexicalTable.prod-BpHQYpBM.js.map +0 -1
- package/dist/LexicalUtils.prod-7S6iuu9A.js +0 -347
- package/dist/LexicalUtils.prod-7S6iuu9A.js.map +0 -1
- package/dist/TableCellResizerPlugin-Dn8Ks2Lm.js.map +0 -1
- package/dist/components-KU0q76JR.js +0 -2150
- package/dist/components-KU0q76JR.js.map +0 -1
- package/dist/helpers-BzYayeT-.js.map +0 -1
- package/dist/react-18-DbbN8Pdb.js.map +0 -1
- package/dist/react.esm-56DGmlLk.js.map +0 -1
- /package/dist/{chunk-CWhphoD1.js → rolldown-runtime-CWhphoD1.js} +0 -0
|
@@ -1,707 +0,0 @@
|
|
|
1
|
-
import { At as e, C as t, Cn as n, Dt as r, E as i, Gn as a, Ln as o, M as s, Nt as c, O as l, On as u, Qn as d, S as f, U as p, Ut as m, Y as ee, Yt as h, ar as g, bn as te, c as _, dn as ne, ft as re, gt as v, j as y, k as b, ln as x, lt as ie, rn as S, y as C, z as w, zn as ae, zt as T } from "./Lexical.prod-nAj5fF96.js";
|
|
2
|
-
import { c as oe, s as se } from "./LexicalUtils.prod-7S6iuu9A.js";
|
|
3
|
-
import { b as E, c as ce, d as le, m as ue, o as de, p as fe, y as pe } from "./LexicalHtml.prod-RCMsF0qt.js";
|
|
4
|
-
//#region node_modules/.pnpm/@lexical+link@0.45.0/node_modules/@lexical/link/dist/LexicalLink.prod.mjs
|
|
5
|
-
var me = new Set([
|
|
6
|
-
"http:",
|
|
7
|
-
"https:",
|
|
8
|
-
"mailto:",
|
|
9
|
-
"sms:",
|
|
10
|
-
"tel:"
|
|
11
|
-
]), D = class e extends ne {
|
|
12
|
-
__url;
|
|
13
|
-
__target;
|
|
14
|
-
__rel;
|
|
15
|
-
__title;
|
|
16
|
-
static getType() {
|
|
17
|
-
return "link";
|
|
18
|
-
}
|
|
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
|
-
}
|
|
26
|
-
constructor(e = "", t = {}, n) {
|
|
27
|
-
super(n);
|
|
28
|
-
let { target: r = null, rel: i = null, title: a = null } = t;
|
|
29
|
-
this.__url = e, this.__target = r, this.__rel = i, this.__title = a;
|
|
30
|
-
}
|
|
31
|
-
afterCloneFrom(e) {
|
|
32
|
-
super.afterCloneFrom(e), this.__url = e.__url, this.__rel = e.__rel, this.__target = e.__target, this.__title = e.__title;
|
|
33
|
-
}
|
|
34
|
-
createDOM(e) {
|
|
35
|
-
let t = document.createElement("a");
|
|
36
|
-
return this.updateLinkDOM(null, t, e), c(t, e.theme.link), t;
|
|
37
|
-
}
|
|
38
|
-
updateLinkDOM(e, t, n) {
|
|
39
|
-
if (u(t)) {
|
|
40
|
-
e && e.__url === this.__url || (t.href = this.sanitizeUrl(this.__url));
|
|
41
|
-
for (let n of [
|
|
42
|
-
"target",
|
|
43
|
-
"rel",
|
|
44
|
-
"title"
|
|
45
|
-
]) {
|
|
46
|
-
let r = `__${n}`, i = this[r];
|
|
47
|
-
e && e[r] === i || (i ? t[n] = i : t.removeAttribute(n));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
updateDOM(e, t, n) {
|
|
52
|
-
return this.updateLinkDOM(e, t, n), !1;
|
|
53
|
-
}
|
|
54
|
-
static importDOM() {
|
|
55
|
-
return { a: (e) => ({
|
|
56
|
-
conversion: ge,
|
|
57
|
-
priority: 1
|
|
58
|
-
}) };
|
|
59
|
-
}
|
|
60
|
-
static importJSON(e) {
|
|
61
|
-
return A().updateFromJSON(e);
|
|
62
|
-
}
|
|
63
|
-
updateFromJSON(e) {
|
|
64
|
-
return super.updateFromJSON(e).setURL(e.url).setRel(e.rel || null).setTarget(e.target || null).setTitle(e.title || null);
|
|
65
|
-
}
|
|
66
|
-
sanitizeUrl(e) {
|
|
67
|
-
e = z(e);
|
|
68
|
-
try {
|
|
69
|
-
let t = new URL(z(e));
|
|
70
|
-
if (!me.has(t.protocol)) return "about:blank";
|
|
71
|
-
} catch {
|
|
72
|
-
return e;
|
|
73
|
-
}
|
|
74
|
-
return e;
|
|
75
|
-
}
|
|
76
|
-
exportJSON() {
|
|
77
|
-
return {
|
|
78
|
-
...super.exportJSON(),
|
|
79
|
-
rel: this.getRel(),
|
|
80
|
-
target: this.getTarget(),
|
|
81
|
-
title: this.getTitle(),
|
|
82
|
-
url: this.getURL()
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
getURL() {
|
|
86
|
-
return this.getLatest().__url;
|
|
87
|
-
}
|
|
88
|
-
setURL(e) {
|
|
89
|
-
let t = this.getWritable();
|
|
90
|
-
return t.__url = e, t;
|
|
91
|
-
}
|
|
92
|
-
getTarget() {
|
|
93
|
-
return this.getLatest().__target;
|
|
94
|
-
}
|
|
95
|
-
setTarget(e) {
|
|
96
|
-
let t = this.getWritable();
|
|
97
|
-
return t.__target = e, t;
|
|
98
|
-
}
|
|
99
|
-
getRel() {
|
|
100
|
-
return this.getLatest().__rel;
|
|
101
|
-
}
|
|
102
|
-
setRel(e) {
|
|
103
|
-
let t = this.getWritable();
|
|
104
|
-
return t.__rel = e, t;
|
|
105
|
-
}
|
|
106
|
-
getTitle() {
|
|
107
|
-
return this.getLatest().__title;
|
|
108
|
-
}
|
|
109
|
-
setTitle(e) {
|
|
110
|
-
let t = this.getWritable();
|
|
111
|
-
return t.__title = e, t;
|
|
112
|
-
}
|
|
113
|
-
insertNewAfter(e, t = !0) {
|
|
114
|
-
let n = m(this);
|
|
115
|
-
return this.insertAfter(n, t), n;
|
|
116
|
-
}
|
|
117
|
-
canInsertTextBefore() {
|
|
118
|
-
return !1;
|
|
119
|
-
}
|
|
120
|
-
canInsertTextAfter() {
|
|
121
|
-
return !1;
|
|
122
|
-
}
|
|
123
|
-
canBeEmpty() {
|
|
124
|
-
return !1;
|
|
125
|
-
}
|
|
126
|
-
isInline() {
|
|
127
|
-
return !0;
|
|
128
|
-
}
|
|
129
|
-
extractWithChild(e, t, n) {
|
|
130
|
-
if (!d(t)) return !1;
|
|
131
|
-
let r = t.anchor.getNode(), i = t.focus.getNode();
|
|
132
|
-
return this.isParentOf(r) && this.isParentOf(i) && t.getTextContent().length > 0;
|
|
133
|
-
}
|
|
134
|
-
isEmailURI() {
|
|
135
|
-
return this.__url.startsWith("mailto:");
|
|
136
|
-
}
|
|
137
|
-
isWebSiteURI() {
|
|
138
|
-
return this.__url.startsWith("https://") || this.__url.startsWith("http://");
|
|
139
|
-
}
|
|
140
|
-
shouldMergeAdjacentLink(e) {
|
|
141
|
-
return this.getType() === e.getType() && this.__url === e.__url && this.__target === e.__target && this.__rel === e.__rel && this.__title === e.__title;
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
function O(e) {
|
|
145
|
-
let t = ee(e, "next");
|
|
146
|
-
return [t, t.getFlipped()];
|
|
147
|
-
}
|
|
148
|
-
function k(e, t) {
|
|
149
|
-
for (let n of t) if (n.origin.isAttached()) {
|
|
150
|
-
p(e, w(n));
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
function he(e) {
|
|
155
|
-
let n = v(), r = null, i = null;
|
|
156
|
-
function a() {
|
|
157
|
-
d(n) && (k(n.anchor, r), k(n.focus, i), _(n));
|
|
158
|
-
}
|
|
159
|
-
d(n) && (r = O(n.anchor), i = O(n.focus));
|
|
160
|
-
let s = !1;
|
|
161
|
-
for (let n of x(e, "next")) {
|
|
162
|
-
let r = n.origin;
|
|
163
|
-
if (T(r) && !r.isInline()) {
|
|
164
|
-
let i = r.getChildren();
|
|
165
|
-
if (i.length > 0) {
|
|
166
|
-
let t = m(e);
|
|
167
|
-
t.append(...i), r.append(t), s = !0;
|
|
168
|
-
}
|
|
169
|
-
se(r, t(n), { $shouldSplit: () => !1 });
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
function c(e, t, n) {
|
|
173
|
-
let [r, i] = e, a = (e) => o(e) && e.origin.is(t);
|
|
174
|
-
if (!a(r) && !a(i)) return e;
|
|
175
|
-
let s = w(x(n, "next"));
|
|
176
|
-
return [s, s.getFlipped()];
|
|
177
|
-
}
|
|
178
|
-
if (e.isAttached()) {
|
|
179
|
-
let t = e.getPreviousSibling();
|
|
180
|
-
if (j(t) && t.shouldMergeAdjacentLink(e)) return r &&= c(r, t, e), i &&= c(i, t, e), t.append(...e.getChildren()), e.remove(), void a();
|
|
181
|
-
let n = e.getNextSibling();
|
|
182
|
-
j(n) && e.shouldMergeAdjacentLink(n) && (r &&= c(r, e, n), i &&= c(i, e, n), e.append(...n.getChildren()), n.remove(), s = !0);
|
|
183
|
-
}
|
|
184
|
-
if (s) {
|
|
185
|
-
if (!e.canBeEmpty() && e.isEmpty()) {
|
|
186
|
-
let t = e.getParent();
|
|
187
|
-
e.remove(), t && t.isEmpty() && t.remove();
|
|
188
|
-
}
|
|
189
|
-
a();
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
function ge(e) {
|
|
193
|
-
let t = null;
|
|
194
|
-
if (u(e)) {
|
|
195
|
-
let n = e.textContent;
|
|
196
|
-
(n !== null && n !== "" || e.children.length > 0) && (t = A(e.getAttribute("href") || "", {
|
|
197
|
-
rel: e.getAttribute("rel"),
|
|
198
|
-
target: e.getAttribute("target"),
|
|
199
|
-
title: e.getAttribute("title")
|
|
200
|
-
}));
|
|
201
|
-
}
|
|
202
|
-
return { node: t };
|
|
203
|
-
}
|
|
204
|
-
function A(e = "", t) {
|
|
205
|
-
return g(new D(e, t));
|
|
206
|
-
}
|
|
207
|
-
function j(e) {
|
|
208
|
-
return e instanceof D;
|
|
209
|
-
}
|
|
210
|
-
var M = class e extends D {
|
|
211
|
-
__isUnlinked;
|
|
212
|
-
constructor(e = "", t = {}, n) {
|
|
213
|
-
super(e, t, n), this.__isUnlinked = t.isUnlinked !== void 0 && t.isUnlinked !== null && t.isUnlinked;
|
|
214
|
-
}
|
|
215
|
-
afterCloneFrom(e) {
|
|
216
|
-
super.afterCloneFrom(e), this.__isUnlinked = e.__isUnlinked;
|
|
217
|
-
}
|
|
218
|
-
static getType() {
|
|
219
|
-
return "autolink";
|
|
220
|
-
}
|
|
221
|
-
static clone(t) {
|
|
222
|
-
return new e(t.__url, {
|
|
223
|
-
isUnlinked: t.__isUnlinked,
|
|
224
|
-
rel: t.__rel,
|
|
225
|
-
target: t.__target,
|
|
226
|
-
title: t.__title
|
|
227
|
-
}, t.__key);
|
|
228
|
-
}
|
|
229
|
-
shouldMergeAdjacentLink(e) {
|
|
230
|
-
return !1;
|
|
231
|
-
}
|
|
232
|
-
getIsUnlinked() {
|
|
233
|
-
return this.__isUnlinked;
|
|
234
|
-
}
|
|
235
|
-
setIsUnlinked(e) {
|
|
236
|
-
let t = this.getWritable();
|
|
237
|
-
return t.__isUnlinked = e, t;
|
|
238
|
-
}
|
|
239
|
-
createDOM(e) {
|
|
240
|
-
return this.__isUnlinked ? document.createElement("span") : super.createDOM(e);
|
|
241
|
-
}
|
|
242
|
-
updateDOM(e, t, n) {
|
|
243
|
-
return super.updateDOM(e, t, n) || e.__isUnlinked !== this.__isUnlinked;
|
|
244
|
-
}
|
|
245
|
-
static importJSON(e) {
|
|
246
|
-
return N().updateFromJSON(e);
|
|
247
|
-
}
|
|
248
|
-
updateFromJSON(e) {
|
|
249
|
-
return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked || !1);
|
|
250
|
-
}
|
|
251
|
-
static importDOM() {
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
|
-
exportJSON() {
|
|
255
|
-
return {
|
|
256
|
-
...super.exportJSON(),
|
|
257
|
-
isUnlinked: this.__isUnlinked
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
insertNewAfter(e, t = !0) {
|
|
261
|
-
let n = N(this.__url, {
|
|
262
|
-
isUnlinked: this.__isUnlinked,
|
|
263
|
-
rel: this.__rel,
|
|
264
|
-
target: this.__target,
|
|
265
|
-
title: this.__title
|
|
266
|
-
});
|
|
267
|
-
return this.insertAfter(n, t), n;
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
function N(e = "", t) {
|
|
271
|
-
return g(new M(e, t));
|
|
272
|
-
}
|
|
273
|
-
function P(e) {
|
|
274
|
-
return e instanceof M;
|
|
275
|
-
}
|
|
276
|
-
var F = te("TOGGLE_LINK_COMMAND");
|
|
277
|
-
function I(e, t) {
|
|
278
|
-
if (e.type === "element") {
|
|
279
|
-
let n = e.getNode();
|
|
280
|
-
return T(n) || function(e, ...t) {
|
|
281
|
-
let n = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
282
|
-
r.append("code", e);
|
|
283
|
-
for (let e of t) r.append("v", e);
|
|
284
|
-
throw n.search = r.toString(), Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
285
|
-
}(252), n.getChildren()[e.offset + t] || null;
|
|
286
|
-
}
|
|
287
|
-
return null;
|
|
288
|
-
}
|
|
289
|
-
function L(e, t = {}) {
|
|
290
|
-
let n;
|
|
291
|
-
if (e && typeof e == "object") {
|
|
292
|
-
let { url: r, ...i } = e;
|
|
293
|
-
n = r, t = {
|
|
294
|
-
...i,
|
|
295
|
-
...t
|
|
296
|
-
};
|
|
297
|
-
} else n = e;
|
|
298
|
-
let { target: r, title: i } = t, a = t.rel === void 0 ? "noreferrer" : t.rel, o = v();
|
|
299
|
-
if (o === null || !d(o) && !h(o)) return;
|
|
300
|
-
if (h(o)) {
|
|
301
|
-
let e = o.getNodes();
|
|
302
|
-
if (e.length === 0) return;
|
|
303
|
-
e.forEach((e) => {
|
|
304
|
-
if (n === null) {
|
|
305
|
-
let t = y(e, (e) => !P(e) && j(e));
|
|
306
|
-
t && (t.insertBefore(e), t.getChildren().length === 0 && t.remove());
|
|
307
|
-
} else {
|
|
308
|
-
let t = y(e, (e) => !P(e) && j(e));
|
|
309
|
-
if (t) t.setURL(n), r !== void 0 && t.setTarget(r), a !== void 0 && t.setRel(a);
|
|
310
|
-
else {
|
|
311
|
-
let t = A(n, {
|
|
312
|
-
rel: a,
|
|
313
|
-
target: r
|
|
314
|
-
});
|
|
315
|
-
e.insertBefore(t), t.append(e);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
if (o.isCollapsed() && n === null) for (let e of o.getNodes()) {
|
|
322
|
-
let t = y(e, (e) => !P(e) && j(e));
|
|
323
|
-
t !== null && (t.getParentOrThrow().splice(t.getIndexWithinParent(), 0, t.getChildren()), t.remove());
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
let s = o.extract();
|
|
327
|
-
if (n === null) {
|
|
328
|
-
let e = /* @__PURE__ */ new Set();
|
|
329
|
-
s.forEach((t) => {
|
|
330
|
-
let n = y(t, (e) => !P(e) && j(e));
|
|
331
|
-
if (n !== null) {
|
|
332
|
-
let t = n.getKey();
|
|
333
|
-
if (e.has(t)) return;
|
|
334
|
-
(function(e, t) {
|
|
335
|
-
let n = new Set(t.filter((t) => e.isParentOf(t)).map((e) => e.getKey())), r = e.getChildren(), i = (r) => n.has(r.getKey()) || T(r) && t.some((t) => e.isParentOf(t) && r.isParentOf(t)), a = r.filter(i);
|
|
336
|
-
if (a.length === r.length) return r.forEach((t) => e.insertBefore(t)), void e.remove();
|
|
337
|
-
let o = r.findIndex(i), s = r.findLastIndex(i), c = o === 0, l = s === r.length - 1;
|
|
338
|
-
if (c) a.forEach((t) => e.insertBefore(t));
|
|
339
|
-
else if (l) for (let t = a.length - 1; t >= 0; t--) e.insertAfter(a[t]);
|
|
340
|
-
else {
|
|
341
|
-
for (let t = a.length - 1; t >= 0; t--) e.insertAfter(a[t]);
|
|
342
|
-
let t = r.slice(s + 1);
|
|
343
|
-
if (t.length > 0) {
|
|
344
|
-
let n = m(e);
|
|
345
|
-
a[a.length - 1].insertAfter(n), t.forEach((e) => n.append(e));
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
})(n, s), e.add(t);
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
let c = /* @__PURE__ */ new Set(), l = (e) => {
|
|
354
|
-
c.has(e.getKey()) || (c.add(e.getKey()), e.setURL(n), r !== void 0 && e.setTarget(r), a !== void 0 && e.setRel(a), i !== void 0 && e.setTitle(i));
|
|
355
|
-
};
|
|
356
|
-
if (s.length === 1) {
|
|
357
|
-
let e = s[0], t = y(e, j);
|
|
358
|
-
if (t !== null) return l(t);
|
|
359
|
-
}
|
|
360
|
-
(function(e) {
|
|
361
|
-
let t = v();
|
|
362
|
-
if (!d(t)) return e();
|
|
363
|
-
let n = _(t), r = n.isBackward(), i = I(n.anchor, r ? -1 : 0), a = I(n.focus, r ? 0 : -1);
|
|
364
|
-
if (e(), i || a) {
|
|
365
|
-
let e = v();
|
|
366
|
-
if (d(e)) {
|
|
367
|
-
let t = e.clone();
|
|
368
|
-
if (i) {
|
|
369
|
-
let e = i.getParent();
|
|
370
|
-
e && t.anchor.set(e.getKey(), i.getIndexWithinParent() + +!!r, "element");
|
|
371
|
-
}
|
|
372
|
-
if (a) {
|
|
373
|
-
let e = a.getParent();
|
|
374
|
-
e && t.focus.set(e.getKey(), a.getIndexWithinParent() + +!r, "element");
|
|
375
|
-
}
|
|
376
|
-
f(_(t));
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
})(() => {
|
|
380
|
-
let e = null;
|
|
381
|
-
for (let t of s) {
|
|
382
|
-
if (!t.isAttached()) continue;
|
|
383
|
-
let o = y(t, j);
|
|
384
|
-
if (o) {
|
|
385
|
-
l(o);
|
|
386
|
-
continue;
|
|
387
|
-
}
|
|
388
|
-
if (T(t)) {
|
|
389
|
-
if (!t.isInline()) continue;
|
|
390
|
-
if (j(t)) {
|
|
391
|
-
if (!(P(t) || e !== null && e.getParentOrThrow().isParentOf(t))) {
|
|
392
|
-
l(t), e = t;
|
|
393
|
-
continue;
|
|
394
|
-
}
|
|
395
|
-
for (let e of t.getChildren()) t.insertBefore(e);
|
|
396
|
-
t.remove();
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
let s = t.getPreviousSibling();
|
|
401
|
-
j(s) && s.is(e) ? s.append(t) : (e = A(n, {
|
|
402
|
-
rel: a,
|
|
403
|
-
target: r,
|
|
404
|
-
title: i
|
|
405
|
-
}), t.insertAfter(e), e.append(t));
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
var R = /^\+?[0-9\s()-]{5,}$/;
|
|
410
|
-
function z(e) {
|
|
411
|
-
return e.match(/^[a-z][a-z0-9+.-]*:/i) || e.match(/^[/#.]/) ? e : e.includes("@") ? `mailto:${e}` : R.test(e) ? `tel:${e}` : `https://${e}`;
|
|
412
|
-
}
|
|
413
|
-
function B(e, t) {
|
|
414
|
-
return S(e.registerNodeTransform(D, he), e.registerCommand(F, (e) => {
|
|
415
|
-
let n = t.validateUrl.peek(), r = t.attributes.peek();
|
|
416
|
-
if (e === null) return L(null), !0;
|
|
417
|
-
if (typeof e == "string") return !(n !== void 0 && !n(e)) && (L(e, r), !0);
|
|
418
|
-
{
|
|
419
|
-
let { url: t, target: n, rel: i, title: a } = e;
|
|
420
|
-
return L(t, {
|
|
421
|
-
...r,
|
|
422
|
-
rel: i,
|
|
423
|
-
target: n,
|
|
424
|
-
title: a
|
|
425
|
-
}), !0;
|
|
426
|
-
}
|
|
427
|
-
}, 0), pe(() => {
|
|
428
|
-
let n = t.validateUrl.value;
|
|
429
|
-
if (!n) return;
|
|
430
|
-
let r = t.attributes.value;
|
|
431
|
-
return e.registerCommand(s, (t) => {
|
|
432
|
-
let i = v();
|
|
433
|
-
if (!d(i) || i.isCollapsed() || !oe(t, ClipboardEvent) || t.clipboardData === null) return !1;
|
|
434
|
-
let a = t.clipboardData.getData("text");
|
|
435
|
-
return !!n(a) && !i.getNodes().some((e) => T(e)) && (e.dispatchCommand(F, {
|
|
436
|
-
...r,
|
|
437
|
-
url: a
|
|
438
|
-
}), t.preventDefault(), !0);
|
|
439
|
-
}, 1);
|
|
440
|
-
}));
|
|
441
|
-
}
|
|
442
|
-
var V = b({
|
|
443
|
-
build: (e, t, n) => E(t),
|
|
444
|
-
config: {
|
|
445
|
-
attributes: void 0,
|
|
446
|
-
validateUrl: void 0
|
|
447
|
-
},
|
|
448
|
-
mergeConfig(e, t) {
|
|
449
|
-
let n = r(e, t);
|
|
450
|
-
return e.attributes && (n.attributes = r(e.attributes, n.attributes)), n;
|
|
451
|
-
},
|
|
452
|
-
name: "@lexical/link/Link",
|
|
453
|
-
nodes: () => [D],
|
|
454
|
-
register: (e, t, n) => B(e, n.getOutput())
|
|
455
|
-
});
|
|
456
|
-
function H(e, t, r = {}) {
|
|
457
|
-
let i = (r) => {
|
|
458
|
-
let i = r.target;
|
|
459
|
-
if (!re(i)) return;
|
|
460
|
-
let a = ae(i);
|
|
461
|
-
if (a === null) return;
|
|
462
|
-
let o = null, s = null;
|
|
463
|
-
if (a.update(() => {
|
|
464
|
-
let e = n(i);
|
|
465
|
-
if (e !== null) {
|
|
466
|
-
let n = y(e, T);
|
|
467
|
-
if (!t.disabled.peek()) if (j(n)) o = n.sanitizeUrl(n.getURL()), s = n.getTarget();
|
|
468
|
-
else {
|
|
469
|
-
let e = function(e, t) {
|
|
470
|
-
let n = e;
|
|
471
|
-
for (; n != null;) {
|
|
472
|
-
if (t(n)) return n;
|
|
473
|
-
n = n.parentNode;
|
|
474
|
-
}
|
|
475
|
-
return null;
|
|
476
|
-
}(i, u);
|
|
477
|
-
e !== null && (o = e.href, s = e.target);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}), o === null || o === "") return;
|
|
481
|
-
let c = e.getEditorState().read(v, { editor: e });
|
|
482
|
-
if (d(c) && !c.isCollapsed()) return void r.preventDefault();
|
|
483
|
-
let l = r.type === "auxclick" && r.button === 1;
|
|
484
|
-
window.open(o, t.newTab.peek() || l || r.metaKey || r.ctrlKey || s === "_blank" ? "_blank" : "_self"), r.preventDefault();
|
|
485
|
-
}, a = (e) => {
|
|
486
|
-
e.button === 1 && i(e);
|
|
487
|
-
};
|
|
488
|
-
return e.registerRootListener((e) => {
|
|
489
|
-
if (e) return e.addEventListener("click", i, r), e.addEventListener("mouseup", a, r), () => {
|
|
490
|
-
e.removeEventListener("click", i), e.removeEventListener("mouseup", a);
|
|
491
|
-
};
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
b({
|
|
495
|
-
build: (e, t, n) => E(t),
|
|
496
|
-
config: i({
|
|
497
|
-
disabled: !1,
|
|
498
|
-
newTab: !1
|
|
499
|
-
}),
|
|
500
|
-
dependencies: [V],
|
|
501
|
-
name: "@lexical/link/ClickableLink",
|
|
502
|
-
register: (e, t, n) => H(e, n.getOutput())
|
|
503
|
-
});
|
|
504
|
-
function _e(e, t = (e) => e) {
|
|
505
|
-
return (n) => {
|
|
506
|
-
let r = e.exec(n);
|
|
507
|
-
return r === null ? null : {
|
|
508
|
-
index: r.index,
|
|
509
|
-
length: r[0].length,
|
|
510
|
-
text: r[0],
|
|
511
|
-
url: t(r[0])
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
function U(e, t) {
|
|
516
|
-
for (let n = 0; n < t.length; n++) {
|
|
517
|
-
let r = t[n](e);
|
|
518
|
-
if (r) return r;
|
|
519
|
-
}
|
|
520
|
-
return null;
|
|
521
|
-
}
|
|
522
|
-
var W = /[.,;\s]/;
|
|
523
|
-
function G(e, t) {
|
|
524
|
-
return t.test(e);
|
|
525
|
-
}
|
|
526
|
-
function K(e, t) {
|
|
527
|
-
return G(e[e.length - 1], t);
|
|
528
|
-
}
|
|
529
|
-
function q(e, t) {
|
|
530
|
-
return G(e[0], t);
|
|
531
|
-
}
|
|
532
|
-
function J(e, t) {
|
|
533
|
-
let n = e.getPreviousSibling();
|
|
534
|
-
return T(n) && (n = n.getLastDescendant()), n === null || C(n) || l(n) && K(n.getTextContent(), t);
|
|
535
|
-
}
|
|
536
|
-
function Y(e, t) {
|
|
537
|
-
let n = e.getNextSibling();
|
|
538
|
-
return T(n) && (n = n.getFirstDescendant()), n === null || C(n) || l(n) && q(n.getTextContent(), t);
|
|
539
|
-
}
|
|
540
|
-
function ve(e, t, n, r, i) {
|
|
541
|
-
return (e > 0 ? G(r[e - 1], n) : J(i[0], n)) ? t < r.length ? G(r[t], n) : Y(i[i.length - 1], n) : !1;
|
|
542
|
-
}
|
|
543
|
-
function ye(e, t, n) {
|
|
544
|
-
let r = [], i = [], a = [], o = 0, s = 0, c = [...e];
|
|
545
|
-
for (; c.length > 0;) {
|
|
546
|
-
let e = c[0], l = e.getTextContent().length, u = s;
|
|
547
|
-
s + l <= t ? (r.push(e), o += l) : u >= n ? a.push(e) : i.push(e), s += l, c.shift();
|
|
548
|
-
}
|
|
549
|
-
return [
|
|
550
|
-
o,
|
|
551
|
-
r,
|
|
552
|
-
i,
|
|
553
|
-
a
|
|
554
|
-
];
|
|
555
|
-
}
|
|
556
|
-
function be(e, t, n, r) {
|
|
557
|
-
let i = N(r.url, r.attributes);
|
|
558
|
-
if (e.length === 1) {
|
|
559
|
-
let o, s = e[0];
|
|
560
|
-
t === 0 ? [o, s] = s.splitText(n) : [, o, s] = s.splitText(t, n);
|
|
561
|
-
let c = a(r.text);
|
|
562
|
-
return c.setFormat(o.getFormat()), c.setDetail(o.getDetail()), c.setStyle(o.getStyle()), i.append(c), o.replace(i), s;
|
|
563
|
-
}
|
|
564
|
-
if (e.length > 1) {
|
|
565
|
-
let r = e[0], o, s = r.getTextContent().length;
|
|
566
|
-
t === 0 ? o = r : [, o] = r.splitText(t);
|
|
567
|
-
let c = [], u;
|
|
568
|
-
for (let t = 1; t < e.length; t++) {
|
|
569
|
-
let r = e[t], i = r.getTextContent().length, a = s;
|
|
570
|
-
if (a < n) if (s + i <= n) c.push(r);
|
|
571
|
-
else {
|
|
572
|
-
let [e, t] = r.splitText(n - a);
|
|
573
|
-
c.push(e), u = t;
|
|
574
|
-
}
|
|
575
|
-
s += i;
|
|
576
|
-
}
|
|
577
|
-
let f = v(), p = f ? f.getNodes().find(l) : void 0, m = a(o.getTextContent());
|
|
578
|
-
return m.setFormat(o.getFormat()), m.setDetail(o.getDetail()), m.setStyle(o.getStyle()), i.append(m, ...c), p && p === o && (d(f) ? m.select(f.anchor.offset, f.focus.offset) : h(f) && m.select(0, m.getTextContent().length)), o.replace(i), u;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
function X(e, t, n, r) {
|
|
582
|
-
let i = e.getChildren(), a = i.length;
|
|
583
|
-
for (let t = 0; t < a; t++) {
|
|
584
|
-
let r = i[t];
|
|
585
|
-
if (!l(r) || !r.isSimpleText()) return Z(e), void n(null, e.getURL());
|
|
586
|
-
}
|
|
587
|
-
let o = e.getTextContent(), s = U(o, t);
|
|
588
|
-
if (s === null || s.text !== o || !J(e, r) || !Y(e, r)) return Z(e), void n(null, e.getURL());
|
|
589
|
-
let c = e.getURL();
|
|
590
|
-
if (c !== s.url && (e.setURL(s.url), n(s.url, c)), s.attributes) {
|
|
591
|
-
let t = e.getRel();
|
|
592
|
-
t !== s.attributes.rel && (e.setRel(s.attributes.rel || null), n(s.attributes.rel || null, t));
|
|
593
|
-
let r = e.getTarget();
|
|
594
|
-
r !== s.attributes.target && (e.setTarget(s.attributes.target || null), n(s.attributes.target || null, r));
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function Z(e) {
|
|
598
|
-
let t = e.getChildren();
|
|
599
|
-
for (let n = t.length - 1; n >= 0; n--) e.insertAfter(t[n]);
|
|
600
|
-
return e.remove(), t.map((e) => e.getLatest());
|
|
601
|
-
}
|
|
602
|
-
var Q = {
|
|
603
|
-
changeHandlers: [],
|
|
604
|
-
excludeParents: [],
|
|
605
|
-
matchers: [],
|
|
606
|
-
separatorRegex: W
|
|
607
|
-
};
|
|
608
|
-
function $(e, t = Q) {
|
|
609
|
-
let { matchers: n, changeHandlers: r, excludeParents: i, separatorRegex: a = W } = t, o = (e, t) => {
|
|
610
|
-
for (let n of r) n(e, t);
|
|
611
|
-
};
|
|
612
|
-
return S(e.registerNodeTransform(ie, (e) => {
|
|
613
|
-
let t = e.getParentOrThrow(), r = e.getPreviousSibling();
|
|
614
|
-
P(t) ? X(t, n, o, a) : !j(t) && !i.some((e) => e(t)) && (e.isSimpleText() && (q(e.getTextContent(), a) || !P(r)) && (function(e, t, n, r) {
|
|
615
|
-
for (let t of e) {
|
|
616
|
-
let e = t.getParent();
|
|
617
|
-
if (P(e) && !e.getIsUnlinked()) return;
|
|
618
|
-
}
|
|
619
|
-
let i = [...e], a = i.map((e) => e.getTextContent()).join(""), o, s = a, c = 0;
|
|
620
|
-
for (; (o = U(s, t)) && o !== null;) {
|
|
621
|
-
let e = o.index, t = e + o.length;
|
|
622
|
-
if (ve(c + e, c + t, r, a, i)) {
|
|
623
|
-
let [r, , a, l] = ye(i, c + e, c + t), u = !1;
|
|
624
|
-
for (let e of a) {
|
|
625
|
-
let t = e.getParent();
|
|
626
|
-
if (P(t) && !t.getIsUnlinked()) {
|
|
627
|
-
u = !0;
|
|
628
|
-
break;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
if (u) {
|
|
632
|
-
c += t, s = s.substring(t);
|
|
633
|
-
continue;
|
|
634
|
-
}
|
|
635
|
-
let d = be(a, c + e - r, c + t - r, o);
|
|
636
|
-
i = d ? [d, ...l] : l, n(o.url, null), c = 0;
|
|
637
|
-
} else c += t;
|
|
638
|
-
s = s.substring(t);
|
|
639
|
-
}
|
|
640
|
-
})(function(e) {
|
|
641
|
-
let t = [e], n = e.getNextSibling();
|
|
642
|
-
for (; n !== null && l(n) && n.isSimpleText() && (t.push(n), !/[\s]/.test(n.getTextContent()));) n = n.getNextSibling();
|
|
643
|
-
return t;
|
|
644
|
-
}(e), n, o, a), (function(e, t, n, r) {
|
|
645
|
-
let i = e.getParent(), a = e.getPreviousSibling(), o = e.getNextSibling(), s = e.getTextContent();
|
|
646
|
-
if (!P(i) || i.getIsUnlinked()) {
|
|
647
|
-
if (P(a) && !a.getIsUnlinked() && a.is(e.getPreviousSibling()) && e.getParent() === a.getParent()) {
|
|
648
|
-
if (!q(s, r)) return Z(a), void n(null, a.getURL());
|
|
649
|
-
if (c = s, a.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(c) : /^\.[a-zA-Z0-9]{1,}/.test(c)) {
|
|
650
|
-
let i = a.getTextContent() + s, o = U(i, t);
|
|
651
|
-
o !== null && o.text === i && (a.append(e), X(a, t, n, r), n(null, a.getURL()));
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
var c;
|
|
655
|
-
!P(o) || o.getIsUnlinked() || K(s, r) || o.is(e.getNextSibling()) && e.getParent() === o.getParent() && (Z(o), n(null, o.getURL()));
|
|
656
|
-
}
|
|
657
|
-
})(e, n, o, a));
|
|
658
|
-
}), e.registerCommand(F, (e) => {
|
|
659
|
-
let t = v();
|
|
660
|
-
return e !== null || !d(t) || t.extract().forEach((e) => {
|
|
661
|
-
let t = e.getParent();
|
|
662
|
-
P(t) && (t.setIsUnlinked(!t.getIsUnlinked()), t.markDirty());
|
|
663
|
-
}), !1;
|
|
664
|
-
}, 1));
|
|
665
|
-
}
|
|
666
|
-
b({
|
|
667
|
-
config: Q,
|
|
668
|
-
dependencies: [V],
|
|
669
|
-
mergeConfig(e, t) {
|
|
670
|
-
let n = r(e, t);
|
|
671
|
-
for (let r of [
|
|
672
|
-
"matchers",
|
|
673
|
-
"changeHandlers",
|
|
674
|
-
"excludeParents"
|
|
675
|
-
]) {
|
|
676
|
-
let i = t[r];
|
|
677
|
-
Array.isArray(i) && (n[r] = [...e[r], ...i]);
|
|
678
|
-
}
|
|
679
|
-
return n;
|
|
680
|
-
},
|
|
681
|
-
name: "@lexical/link/AutoLink",
|
|
682
|
-
nodes: [M],
|
|
683
|
-
register: $
|
|
684
|
-
}), b({
|
|
685
|
-
dependencies: [
|
|
686
|
-
le,
|
|
687
|
-
V,
|
|
688
|
-
e(de, { rules: [fe({
|
|
689
|
-
$import: (e, t) => {
|
|
690
|
-
if (!t.textContent && t.children.length === 0) return [];
|
|
691
|
-
let n = t.getAttribute("href") || "", r = {
|
|
692
|
-
rel: t.getAttribute("rel"),
|
|
693
|
-
target: t.getAttribute("target"),
|
|
694
|
-
title: t.getAttribute("title")
|
|
695
|
-
};
|
|
696
|
-
return ce(e.$importChildren(t), () => A(n, r));
|
|
697
|
-
},
|
|
698
|
-
match: ue.tag("a"),
|
|
699
|
-
name: "@lexical/link/a"
|
|
700
|
-
})] })
|
|
701
|
-
],
|
|
702
|
-
name: "@lexical/link/Import"
|
|
703
|
-
});
|
|
704
|
-
//#endregion
|
|
705
|
-
export { L as a, D as c, B as i, M as n, H as o, _e as r, F as s, $ as t };
|
|
706
|
-
|
|
707
|
-
//# sourceMappingURL=LexicalLink.prod-BcBNTFEb.js.map
|