@uva-glass/component-library 1.59.2 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.prod-CO0gPAfo.js → Lexical.prod-qM_1BY0u.js} +961 -952
- package/dist/Lexical.prod-qM_1BY0u.js.map +1 -0
- package/dist/{LexicalUtils.prod-PbdOb6JG.js → LexicalUtils.prod-BFSPHHi1.js} +20 -20
- package/dist/{LexicalUtils.prod-PbdOb6JG.js.map → LexicalUtils.prod-BFSPHHi1.js.map} +1 -1
- package/dist/ListPlugin-Bhkh3IBK.js +625 -0
- package/dist/ListPlugin-Bhkh3IBK.js.map +1 -0
- package/dist/RteEditor.module-Cku3JY-0.js +29 -0
- package/dist/RteEditor.module-Cku3JY-0.js.map +1 -0
- package/dist/TablePlugin-CLPV2OjO.js +294 -0
- package/dist/TablePlugin-CLPV2OjO.js.map +1 -0
- package/dist/assets/EditorHeader.css +1 -1
- package/dist/assets/Periods.css +1 -1
- package/dist/assets/RteEditor.css +1 -1
- package/dist/assets/TableCellContextMenu.css +1 -1
- package/dist/assets/TablePlugin.css +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/Periods/Periods.js +19 -19
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +19 -19
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.d.ts +1 -6
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +34 -20
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +36 -31
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.d.ts +3 -3
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.d.ts +7 -6
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +157 -54
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.d.ts +1 -3
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +5 -6
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +3 -2
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.d.ts +1 -6
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +10 -31
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.d.ts +2 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +104 -31
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +6 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.d.ts +6 -7
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +42 -46
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +13 -12
- package/dist/components/RteEditor/RteEditor.d.ts +13 -4
- package/dist/components/RteEditor/RteEditor.js +593 -601
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
- package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
- package/dist/components/RteEditor/hooks/useTranslation.d.ts +98 -6
- package/dist/components/RteEditor/translations.d.ts +98 -6
- package/dist/components/RteEditor/translations.js +104 -12
- package/dist/components/RteEditor/translations.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-Ec7CfNnA.js → helpers-BB6Byf50.js} +92 -103
- package/dist/helpers-BB6Byf50.js.map +1 -0
- package/dist/{helpers-BewZrn6E.js → helpers-D9T1Tgkj.js} +581 -515
- package/dist/helpers-D9T1Tgkj.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/dist/Lexical.prod-CO0gPAfo.js.map +0 -1
- package/dist/LexicalList.prod-BceA-cJD.js +0 -562
- package/dist/LexicalList.prod-BceA-cJD.js.map +0 -1
- package/dist/RteEditor.module-Dz9a8vaK.js +0 -29
- package/dist/RteEditor.module-Dz9a8vaK.js.map +0 -1
- package/dist/TablePlugin-Cj6IBz2k.js +0 -249
- package/dist/TablePlugin-Cj6IBz2k.js.map +0 -1
- package/dist/helpers-BewZrn6E.js.map +0 -1
- package/dist/helpers-Ec7CfNnA.js.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { w as c, A as d, M as g, x as p, a as m, c as h, m as w, F as v, b as a } from "./Lexical.prod-qM_1BY0u.js";
|
|
2
|
+
function x(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
5
|
+
var L = x(function(e) {
|
|
6
6
|
const n = new URLSearchParams();
|
|
7
7
|
n.append("code", e);
|
|
8
8
|
for (let t = 1; t < arguments.length; t++) n.append("v", arguments[t]);
|
|
9
9
|
throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${n} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
10
10
|
});
|
|
11
|
-
const
|
|
12
|
-
!(!
|
|
11
|
+
const u = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, P = u && "documentMode" in document ? document.documentMode : null;
|
|
12
|
+
!(!u || !("InputEvent" in window) || P) && "getTargetRanges" in new window.InputEvent("input");
|
|
13
13
|
function f(...e) {
|
|
14
14
|
const n = [];
|
|
15
15
|
for (const t of e) if (t && typeof t == "string") for (const [o] of t.matchAll(/\S+/g)) n.push(o);
|
|
16
16
|
return n;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function M(...e) {
|
|
19
19
|
return () => {
|
|
20
20
|
for (let n = e.length - 1; n >= 0; n--) e[n]();
|
|
21
21
|
e.length = 0;
|
|
@@ -29,7 +29,7 @@ function E(e, ...n) {
|
|
|
29
29
|
const t = f(...n);
|
|
30
30
|
t.length > 0 && e.classList.remove(...t);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function I(e, n) {
|
|
33
33
|
let t = e;
|
|
34
34
|
for (; t != null; ) {
|
|
35
35
|
if (t instanceof n) return t;
|
|
@@ -37,19 +37,19 @@ function T(e, n) {
|
|
|
37
37
|
}
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const n =
|
|
42
|
-
return
|
|
40
|
+
function T(e) {
|
|
41
|
+
const n = y(e, (t) => a(t) && !t.isInline());
|
|
42
|
+
return a(n) || L(4, e.__key), n;
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const y = (e, n) => {
|
|
45
45
|
let t = e;
|
|
46
|
-
for (; t !==
|
|
46
|
+
for (; t !== c() && t != null; ) {
|
|
47
47
|
if (n(t)) return t;
|
|
48
48
|
t = t.getParent();
|
|
49
49
|
}
|
|
50
50
|
return null;
|
|
51
51
|
};
|
|
52
|
-
function
|
|
52
|
+
function b(e) {
|
|
53
53
|
const n = d() || g();
|
|
54
54
|
if (p(n)) {
|
|
55
55
|
const { focus: t } = n, o = t.getNode(), s = t.offset;
|
|
@@ -67,7 +67,7 @@ function M(e) {
|
|
|
67
67
|
const o = n.getNodes();
|
|
68
68
|
o[o.length - 1].getTopLevelElementOrThrow().insertAfter(e);
|
|
69
69
|
} else
|
|
70
|
-
|
|
70
|
+
c().append(e);
|
|
71
71
|
const t = v();
|
|
72
72
|
e.insertAfter(t), t.select();
|
|
73
73
|
}
|
|
@@ -82,13 +82,13 @@ function B(e, n) {
|
|
|
82
82
|
}
|
|
83
83
|
export {
|
|
84
84
|
O as $,
|
|
85
|
-
|
|
85
|
+
M as L,
|
|
86
86
|
E as U,
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
I as Z,
|
|
88
|
+
T as e,
|
|
89
89
|
_ as i,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
b as r,
|
|
91
|
+
y as t,
|
|
92
92
|
B as u
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=LexicalUtils.prod-
|
|
94
|
+
//# sourceMappingURL=LexicalUtils.prod-BFSPHHi1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalUtils.prod-PbdOb6JG.js","sources":["../node_modules/@lexical/utils/LexicalUtils.prod.mjs"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$getSelection as e,$isRangeSelection as t,TextNode as n,$getRoot as o,$isElementNode as r,$cloneWithProperties as l,$setSelection as i,$getPreviousSelection as s,$isRootOrShadowRoot as u,$isTextNode as c,$splitNode as f,$createParagraphNode as a}from\"lexical\";export{$splitNode,isBlockDomNode,isHTMLAnchorElement,isHTMLElement,isInlineDomNode}from\"lexical\";import{createRectsFromDOMRange as d}from\"@lexical/selection\";function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var p=g((function(e){const t=new URLSearchParams;t.append(\"code\",e);for(let e=1;e<arguments.length;e++)t.append(\"v\",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const h=\"undefined\"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,m=h&&\"documentMode\"in document?document.documentMode:null,v=h&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),y=h&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),w=!(!h||!(\"InputEvent\"in window)||m)&&\"getTargetRanges\"in new window.InputEvent(\"input\"),E=h&&/Version\\/[\\d.]+.*Safari/.test(navigator.userAgent),P=h&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,S=h&&/Android/.test(navigator.userAgent),x=h&&/^(?=.*Chrome).*/i.test(navigator.userAgent),A=h&&S&&x,N=h&&/AppleWebKit\\/[\\d.]+/.test(navigator.userAgent)&&!x;function b(...e){const t=[];for(const n of e)if(n&&\"string\"==typeof n)for(const[e]of n.matchAll(/\\S+/g))t.push(e);return t}function L(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function T(e){return`${e}px`}const M={attributes:!0,characterData:!0,childList:!0,subtree:!0};function C(e,t,n){let o=null,r=null,l=null,i=[];const s=document.createElement(\"div\");function u(){null===o&&p(182),null===r&&p(183);const{left:l,top:u}=o.getBoundingClientRect(),c=r,f=d(e,t);s.isConnected||c.append(s);let a=!1;for(let e=0;e<f.length;e++){const t=f[e],n=i[e]||document.createElement(\"div\"),o=n.style;\"absolute\"!==o.position&&(o.position=\"absolute\",a=!0);const r=T(t.left-l);o.left!==r&&(o.left=r,a=!0);const c=T(t.top-u);o.top!==c&&(n.style.top=c,a=!0);const d=T(t.width);o.width!==d&&(n.style.width=d,a=!0);const g=T(t.height);o.height!==g&&(n.style.height=g,a=!0),n.parentNode!==s&&(s.append(n),a=!0),i[e]=n}for(;i.length>f.length;)i.pop();a&&n(i)}function c(){r=null,o=null,null!==l&&l.disconnect(),l=null,s.remove();for(const e of i)e.remove();i=[]}const f=e.registerRootListener((function t(){const n=e.getRootElement();if(null===n)return c();const i=n.parentElement;if(!(i instanceof HTMLElement))return c();c(),o=n,r=i,l=new MutationObserver((n=>{const l=e.getRootElement(),i=l&&l.parentElement;if(l!==o||i!==r)return t();for(const e of n)if(!s.contains(e.target))return u()})),l.observe(i,M),u()}));return()=>{f(),c()}}function B(o,r){let l=null,i=null,s=null,u=null,c=()=>{};function f(f){f.read((()=>{const f=e();if(!t(f))return l=null,i=null,s=null,u=null,c(),void(c=()=>{});const{anchor:a,focus:d}=f,g=a.getNode(),h=g.getKey(),m=a.offset,v=d.getNode(),y=v.getKey(),w=d.offset,E=o.getElementByKey(h),P=o.getElementByKey(y),S=null===l||null===E||m!==i||h!==l.getKey()||g!==l&&(!(l instanceof n)||g.updateDOM(l,E,o._config)),x=null===s||null===P||w!==u||y!==s.getKey()||v!==s&&(!(s instanceof n)||v.updateDOM(s,P,o._config));if(S||x){const e=o.getElementByKey(a.getNode().getKey()),t=o.getElementByKey(d.getNode().getKey());if(null!==e&&null!==t&&\"SPAN\"===e.tagName&&\"SPAN\"===t.tagName){const n=document.createRange();let l,i,s,u;d.isBefore(a)?(l=t,i=d.offset,s=e,u=a.offset):(l=e,i=a.offset,s=t,u=d.offset);const f=l.firstChild;null===f&&p(181);const g=s.firstChild;null===g&&p(181),n.setStart(f,i),n.setEnd(g,u),c(),c=C(o,n,(e=>{for(const t of e){const e=t.style;\"Highlight\"!==e.background&&(e.background=\"Highlight\"),\"HighlightText\"!==e.color&&(e.color=\"HighlightText\"),\"-1\"!==e.zIndex&&(e.zIndex=\"-1\"),\"none\"!==e.pointerEvents&&(e.pointerEvents=\"none\"),e.marginTop!==T(-1.5)&&(e.marginTop=T(-1.5)),e.paddingTop!==T(4)&&(e.paddingTop=T(4)),e.paddingBottom!==T(0)&&(e.paddingBottom=T(0))}void 0!==r&&r(e)}))}}l=g,i=m,s=v,u=w}))}return f(o.getEditorState()),L(o.registerUpdateListener((({editorState:e})=>f(e))),c,(()=>{c()}))}const _=w,K=h,O=S,R=A,I=v,H=N,z=x,D=y,k=P,F=E;function $(e,...t){const n=b(...t);n.length>0&&e.classList.add(...n)}function U(e,...t){const n=b(...t);n.length>0&&e.classList.remove(...n)}function W(e,t){for(const n of t)if(e.type.startsWith(n))return!0;return!1}function j(e,t){const n=e[Symbol.iterator]();return new Promise(((e,o)=>{const r=[],l=()=>{const{done:i,value:s}=n.next();if(i)return e(r);const u=new FileReader;u.addEventListener(\"error\",o),u.addEventListener(\"load\",(()=>{const e=u.result;\"string\"==typeof e&&r.push({file:s,result:e}),l()})),W(s,t)?u.readAsDataURL(s):l()};l()}))}function V(e,t){return Array.from(J(e,t))}const q={done:!0,value:void 0},G=e=>({done:!1,value:e});function J(e,t){const n=(e||o()).getLatest(),l=X(n),i=t;let s=n,u=l,c=!0;const f={next(){if(null===s)return q;if(c)return c=!1,G({depth:u,node:s});if(s===i)return q;if(r(s)&&s.getChildrenSize()>0)s=s.getFirstChild(),u++;else{let e;[s,e]=Q(s)||[null,0],u+=e,null==i&&u<=l&&(s=null)}return null===s?q:G({depth:u,node:s})},[Symbol.iterator]:()=>f};return f}function Q(e){let t=e,n=null,o=0;for(;null===n&&null!==t;)n=t.getNextSibling(),null===n?(t=t.getParent(),o--):t=n;return null===t?null:[t,o]}function X(e){let t=e,n=0;for(;null!==(t=t.getParent());)n++;return n}function Y(e){let t=e;if(r(t)&&t.getChildrenSize()>0)t=t.getLastChild();else{let e=null;for(;null===e&&null!==t;)e=t.getPreviousSibling(),t=null===e?t.getParent():e}return t}function Z(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}function ee(e){const t=te(e,(e=>r(e)&&!e.isInline()));return r(t)||p(4,e.__key),t}const te=(e,t)=>{let n=e;for(;n!==o()&&null!=n;){if(t(n))return n;n=n.getParent()}return null};function ne(e,t,n,o){const r=e=>e instanceof t;return e.registerNodeTransform(t,(e=>{const t=(e=>{const t=e.getChildren();for(let e=0;e<t.length;e++){const n=t[e];if(r(n))return null}let n=e,o=e;for(;null!==n;)if(o=n,n=n.getParent(),r(n))return{child:o,parent:n};return null})(e);if(null!==t){const{child:r,parent:l}=t;if(r.is(e)){o(l,e);const t=r.getNextSiblings(),i=t.length;if(l.insertAfter(r),0!==i){const e=n(l);r.insertAfter(e);for(let n=0;n<i;n++)e.append(t[n])}l.canBeEmpty()||0!==l.getChildrenSize()||l.remove()}}}))}function oe(e,t){const n=new Map,o=e._pendingEditorState;for(const[e,o]of t._nodeMap)n.set(e,l(o));o&&(o._nodeMap=n),e._dirtyType=2;const r=t._selection;i(null===r?null:r.clone())}function re(n){const r=e()||s();if(t(r)){const{focus:e}=r,t=e.getNode(),o=e.offset;if(u(t)){const e=t.getChildAtIndex(o);null==e?t.append(n):e.insertBefore(n),n.selectNext()}else{let e,r;c(t)?(e=t.getParentOrThrow(),r=t.getIndexWithinParent(),o>0&&(r+=1,t.splitText(o))):(e=t,r=o);const[,l]=f(e,r);l.insertBefore(n),l.selectStart()}}else{if(null!=r){const e=r.getNodes();e[e.length-1].getTopLevelElementOrThrow().insertAfter(n)}else{o().append(n)}const e=a();n.insertAfter(e),e.select()}return n.getLatest()}function le(e,t){const n=t();return e.replace(n),n.append(e),n}function ie(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}function se(e,t){const n=[];for(let o=0;o<e.length;o++){const r=t(e[o]);null!==r&&n.push(r)}return n}function ue(e,t){const n=e.getFirstChild();null!==n?n.insertBefore(t):e.append(t)}function ce(e){if(D)return 1;let t=1;for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue(\"zoom\")),e=e.parentElement;return t}function fe(e){return null!==e._parentEditor}export{V as $dfs,J as $dfsIterator,se as $filter,te as $findMatchingParent,X as $getDepth,ee as $getNearestBlockElementAncestorOrThrow,Z as $getNearestNodeOfType,Y as $getNextRightPreorderNode,Q as $getNextSiblingOrParentSibling,ue as $insertFirst,re as $insertNodeToNearestRoot,fe as $isEditorIsNestedEditor,oe as $restoreEditorState,le as $wrapNodeInElement,_ as CAN_USE_BEFORE_INPUT,K as CAN_USE_DOM,O as IS_ANDROID,R as IS_ANDROID_CHROME,I as IS_APPLE,H as IS_APPLE_WEBKIT,z as IS_CHROME,D as IS_FIREFOX,k as IS_IOS,F as IS_SAFARI,$ as addClassNamesToElement,ce as calculateZoomLevel,W as isMimeType,B as markSelection,j as mediaFileReader,L as mergeRegister,ie as objectKlassEquals,C as positionNodeOnRange,ne as registerNestedElementResolver,U as removeClassNamesFromElement};\n"],"names":["g","p","t","e","h","m","b","n","L","$","U","Z","ee","te","r","o","re","s","u","c","f","a","ie","ue"],"mappings":";AAQya,SAASA,EAAE,GAAE;AAAC,SAAO,KAAG,EAAE,cAAY,OAAO,UAAU,eAAe,KAAK,GAAE,SAAS,IAAE,EAAE,UAAQ;AAAC;AAAC,IAAIC,IAAED,EAAG,SAAS,GAAE;AAAC,QAAME,IAAE,IAAI;AAAgB,EAAAA,EAAE,OAAO,QAAO,CAAC;AAAE,WAAQC,IAAE,GAAEA,IAAE,UAAU,QAAOA,IAAI,CAAAD,EAAE,OAAO,KAAI,UAAUC,CAAC,CAAC;AAAE,QAAM,MAAM,2BAA2B,CAAC,0CAA0CD,CAAC,gHAAgH;AAAC,CAAG;AAAM,MAACE,IAAe,OAAO,SAApB,OAAqC,OAAO,aAAhB,UAAmC,OAAO,SAAS,kBAAzB,QAAuCC,IAAED,KAAG,kBAAiB,WAAS,SAAS,eAAa;AAA8H,E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,OAAOA,CAAC;AAAC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"LexicalUtils.prod-BFSPHHi1.js","sources":["../node_modules/@lexical/utils/LexicalUtils.prod.mjs"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$getSelection as e,$isRangeSelection as t,TextNode as n,$getRoot as o,$isElementNode as r,$cloneWithProperties as l,$setSelection as i,$getPreviousSelection as s,$isRootOrShadowRoot as u,$isTextNode as c,$splitNode as f,$createParagraphNode as a}from\"lexical\";export{$splitNode,isBlockDomNode,isHTMLAnchorElement,isHTMLElement,isInlineDomNode}from\"lexical\";import{createRectsFromDOMRange as d}from\"@lexical/selection\";function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var p=g((function(e){const t=new URLSearchParams;t.append(\"code\",e);for(let e=1;e<arguments.length;e++)t.append(\"v\",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const h=\"undefined\"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,m=h&&\"documentMode\"in document?document.documentMode:null,v=h&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),y=h&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),w=!(!h||!(\"InputEvent\"in window)||m)&&\"getTargetRanges\"in new window.InputEvent(\"input\"),E=h&&/Version\\/[\\d.]+.*Safari/.test(navigator.userAgent),P=h&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,S=h&&/Android/.test(navigator.userAgent),x=h&&/^(?=.*Chrome).*/i.test(navigator.userAgent),A=h&&S&&x,N=h&&/AppleWebKit\\/[\\d.]+/.test(navigator.userAgent)&&!x;function b(...e){const t=[];for(const n of e)if(n&&\"string\"==typeof n)for(const[e]of n.matchAll(/\\S+/g))t.push(e);return t}function L(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function T(e){return`${e}px`}const M={attributes:!0,characterData:!0,childList:!0,subtree:!0};function C(e,t,n){let o=null,r=null,l=null,i=[];const s=document.createElement(\"div\");function u(){null===o&&p(182),null===r&&p(183);const{left:l,top:u}=o.getBoundingClientRect(),c=r,f=d(e,t);s.isConnected||c.append(s);let a=!1;for(let e=0;e<f.length;e++){const t=f[e],n=i[e]||document.createElement(\"div\"),o=n.style;\"absolute\"!==o.position&&(o.position=\"absolute\",a=!0);const r=T(t.left-l);o.left!==r&&(o.left=r,a=!0);const c=T(t.top-u);o.top!==c&&(n.style.top=c,a=!0);const d=T(t.width);o.width!==d&&(n.style.width=d,a=!0);const g=T(t.height);o.height!==g&&(n.style.height=g,a=!0),n.parentNode!==s&&(s.append(n),a=!0),i[e]=n}for(;i.length>f.length;)i.pop();a&&n(i)}function c(){r=null,o=null,null!==l&&l.disconnect(),l=null,s.remove();for(const e of i)e.remove();i=[]}const f=e.registerRootListener((function t(){const n=e.getRootElement();if(null===n)return c();const i=n.parentElement;if(!(i instanceof HTMLElement))return c();c(),o=n,r=i,l=new MutationObserver((n=>{const l=e.getRootElement(),i=l&&l.parentElement;if(l!==o||i!==r)return t();for(const e of n)if(!s.contains(e.target))return u()})),l.observe(i,M),u()}));return()=>{f(),c()}}function B(o,r){let l=null,i=null,s=null,u=null,c=()=>{};function f(f){f.read((()=>{const f=e();if(!t(f))return l=null,i=null,s=null,u=null,c(),void(c=()=>{});const{anchor:a,focus:d}=f,g=a.getNode(),h=g.getKey(),m=a.offset,v=d.getNode(),y=v.getKey(),w=d.offset,E=o.getElementByKey(h),P=o.getElementByKey(y),S=null===l||null===E||m!==i||h!==l.getKey()||g!==l&&(!(l instanceof n)||g.updateDOM(l,E,o._config)),x=null===s||null===P||w!==u||y!==s.getKey()||v!==s&&(!(s instanceof n)||v.updateDOM(s,P,o._config));if(S||x){const e=o.getElementByKey(a.getNode().getKey()),t=o.getElementByKey(d.getNode().getKey());if(null!==e&&null!==t&&\"SPAN\"===e.tagName&&\"SPAN\"===t.tagName){const n=document.createRange();let l,i,s,u;d.isBefore(a)?(l=t,i=d.offset,s=e,u=a.offset):(l=e,i=a.offset,s=t,u=d.offset);const f=l.firstChild;null===f&&p(181);const g=s.firstChild;null===g&&p(181),n.setStart(f,i),n.setEnd(g,u),c(),c=C(o,n,(e=>{for(const t of e){const e=t.style;\"Highlight\"!==e.background&&(e.background=\"Highlight\"),\"HighlightText\"!==e.color&&(e.color=\"HighlightText\"),\"-1\"!==e.zIndex&&(e.zIndex=\"-1\"),\"none\"!==e.pointerEvents&&(e.pointerEvents=\"none\"),e.marginTop!==T(-1.5)&&(e.marginTop=T(-1.5)),e.paddingTop!==T(4)&&(e.paddingTop=T(4)),e.paddingBottom!==T(0)&&(e.paddingBottom=T(0))}void 0!==r&&r(e)}))}}l=g,i=m,s=v,u=w}))}return f(o.getEditorState()),L(o.registerUpdateListener((({editorState:e})=>f(e))),c,(()=>{c()}))}const _=w,K=h,O=S,R=A,I=v,H=N,z=x,D=y,k=P,F=E;function $(e,...t){const n=b(...t);n.length>0&&e.classList.add(...n)}function U(e,...t){const n=b(...t);n.length>0&&e.classList.remove(...n)}function W(e,t){for(const n of t)if(e.type.startsWith(n))return!0;return!1}function j(e,t){const n=e[Symbol.iterator]();return new Promise(((e,o)=>{const r=[],l=()=>{const{done:i,value:s}=n.next();if(i)return e(r);const u=new FileReader;u.addEventListener(\"error\",o),u.addEventListener(\"load\",(()=>{const e=u.result;\"string\"==typeof e&&r.push({file:s,result:e}),l()})),W(s,t)?u.readAsDataURL(s):l()};l()}))}function V(e,t){return Array.from(J(e,t))}const q={done:!0,value:void 0},G=e=>({done:!1,value:e});function J(e,t){const n=(e||o()).getLatest(),l=X(n),i=t;let s=n,u=l,c=!0;const f={next(){if(null===s)return q;if(c)return c=!1,G({depth:u,node:s});if(s===i)return q;if(r(s)&&s.getChildrenSize()>0)s=s.getFirstChild(),u++;else{let e;[s,e]=Q(s)||[null,0],u+=e,null==i&&u<=l&&(s=null)}return null===s?q:G({depth:u,node:s})},[Symbol.iterator]:()=>f};return f}function Q(e){let t=e,n=null,o=0;for(;null===n&&null!==t;)n=t.getNextSibling(),null===n?(t=t.getParent(),o--):t=n;return null===t?null:[t,o]}function X(e){let t=e,n=0;for(;null!==(t=t.getParent());)n++;return n}function Y(e){let t=e;if(r(t)&&t.getChildrenSize()>0)t=t.getLastChild();else{let e=null;for(;null===e&&null!==t;)e=t.getPreviousSibling(),t=null===e?t.getParent():e}return t}function Z(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}function ee(e){const t=te(e,(e=>r(e)&&!e.isInline()));return r(t)||p(4,e.__key),t}const te=(e,t)=>{let n=e;for(;n!==o()&&null!=n;){if(t(n))return n;n=n.getParent()}return null};function ne(e,t,n,o){const r=e=>e instanceof t;return e.registerNodeTransform(t,(e=>{const t=(e=>{const t=e.getChildren();for(let e=0;e<t.length;e++){const n=t[e];if(r(n))return null}let n=e,o=e;for(;null!==n;)if(o=n,n=n.getParent(),r(n))return{child:o,parent:n};return null})(e);if(null!==t){const{child:r,parent:l}=t;if(r.is(e)){o(l,e);const t=r.getNextSiblings(),i=t.length;if(l.insertAfter(r),0!==i){const e=n(l);r.insertAfter(e);for(let n=0;n<i;n++)e.append(t[n])}l.canBeEmpty()||0!==l.getChildrenSize()||l.remove()}}}))}function oe(e,t){const n=new Map,o=e._pendingEditorState;for(const[e,o]of t._nodeMap)n.set(e,l(o));o&&(o._nodeMap=n),e._dirtyType=2;const r=t._selection;i(null===r?null:r.clone())}function re(n){const r=e()||s();if(t(r)){const{focus:e}=r,t=e.getNode(),o=e.offset;if(u(t)){const e=t.getChildAtIndex(o);null==e?t.append(n):e.insertBefore(n),n.selectNext()}else{let e,r;c(t)?(e=t.getParentOrThrow(),r=t.getIndexWithinParent(),o>0&&(r+=1,t.splitText(o))):(e=t,r=o);const[,l]=f(e,r);l.insertBefore(n),l.selectStart()}}else{if(null!=r){const e=r.getNodes();e[e.length-1].getTopLevelElementOrThrow().insertAfter(n)}else{o().append(n)}const e=a();n.insertAfter(e),e.select()}return n.getLatest()}function le(e,t){const n=t();return e.replace(n),n.append(e),n}function ie(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}function se(e,t){const n=[];for(let o=0;o<e.length;o++){const r=t(e[o]);null!==r&&n.push(r)}return n}function ue(e,t){const n=e.getFirstChild();null!==n?n.insertBefore(t):e.append(t)}function ce(e){if(D)return 1;let t=1;for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue(\"zoom\")),e=e.parentElement;return t}function fe(e){return null!==e._parentEditor}export{V as $dfs,J as $dfsIterator,se as $filter,te as $findMatchingParent,X as $getDepth,ee as $getNearestBlockElementAncestorOrThrow,Z as $getNearestNodeOfType,Y as $getNextRightPreorderNode,Q as $getNextSiblingOrParentSibling,ue as $insertFirst,re as $insertNodeToNearestRoot,fe as $isEditorIsNestedEditor,oe as $restoreEditorState,le as $wrapNodeInElement,_ as CAN_USE_BEFORE_INPUT,K as CAN_USE_DOM,O as IS_ANDROID,R as IS_ANDROID_CHROME,I as IS_APPLE,H as IS_APPLE_WEBKIT,z as IS_CHROME,D as IS_FIREFOX,k as IS_IOS,F as IS_SAFARI,$ as addClassNamesToElement,ce as calculateZoomLevel,W as isMimeType,B as markSelection,j as mediaFileReader,L as mergeRegister,ie as objectKlassEquals,C as positionNodeOnRange,ne as registerNestedElementResolver,U as removeClassNamesFromElement};\n"],"names":["g","p","t","e","h","m","b","n","L","$","U","Z","ee","te","r","o","re","s","u","c","f","a","ie","ue"],"mappings":";AAQya,SAASA,EAAE,GAAE;AAAC,SAAO,KAAG,EAAE,cAAY,OAAO,UAAU,eAAe,KAAK,GAAE,SAAS,IAAE,EAAE,UAAQ;AAAC;AAAC,IAAIC,IAAED,EAAG,SAAS,GAAE;AAAC,QAAME,IAAE,IAAI;AAAgB,EAAAA,EAAE,OAAO,QA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