laif-ds 0.2.85 → 0.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -81
- package/dist/CHANGELOG.md +13 -0
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/agent-docs/adoption-report.json +2 -2
- package/dist/agent-docs/manifest.json +3 -3
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
- package/dist/components/editor/editor-ui/content-editable.js +1 -1
- package/dist/components/editor/nodes/mention-node.js +2 -2
- package/dist/components/editor/plugins/actions/clear-editor-plugin.js +2 -2
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +2 -2
- package/dist/components/editor/plugins/mention-plugin.js +21 -21
- package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +10 -10
- package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +5 -5
- package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +5 -5
- package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +5 -5
- package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +9 -9
- package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +3 -3
- package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +13 -13
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +2 -2
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +18 -19
- package/dist/components/editor/plugins/toolbar/mention-insert-toolbar-plugin.js +1 -1
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +3 -3
- package/dist/components/ui/app-editor.js +51 -51
- package/dist/components/ui/markdown-renderer.js +33 -32
- package/dist/lib/utils.js +35 -34
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/@floating-ui/{utils → core/node_modules/@floating-ui/utils}/dist/floating-ui.utils.js +33 -39
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +20 -19
- package/dist/node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +12 -0
- package/dist/node_modules/@lexical/clipboard/dist/LexicalClipboard.prod.js +354 -0
- package/dist/node_modules/@lexical/code-core/dist/LexicalCodeCore.prod.js +298 -0
- package/dist/node_modules/@lexical/dragon/dist/LexicalDragon.prod.js +89 -0
- package/dist/node_modules/@lexical/extension/dist/LexicalExtension.prod.js +611 -0
- package/dist/node_modules/@lexical/history/dist/LexicalHistory.prod.js +96 -0
- package/dist/node_modules/@lexical/html/dist/LexicalHtml.prod.js +604 -0
- package/dist/node_modules/@lexical/link/dist/LexicalLink.prod.js +201 -0
- package/dist/node_modules/@lexical/list/dist/LexicalList.prod.js +843 -0
- package/dist/node_modules/@lexical/markdown/dist/LexicalMarkdown.prod.js +555 -0
- package/dist/node_modules/@lexical/react/dist/LexicalCheckListPlugin.prod.js +11 -0
- package/dist/node_modules/@lexical/react/dist/LexicalClearEditorPlugin.prod.js +13 -0
- package/dist/node_modules/@lexical/react/dist/LexicalComposer.prod.js +45 -0
- package/dist/node_modules/@lexical/react/{LexicalComposerContext.prod.js → dist/LexicalComposerContext.prod.js} +1 -1
- package/dist/node_modules/@lexical/react/dist/LexicalContentEditable.prod.js +53 -0
- package/dist/node_modules/@lexical/react/dist/LexicalErrorBoundary.prod.js +21 -0
- package/dist/node_modules/@lexical/react/{LexicalHistoryPlugin.prod.js → dist/LexicalHistoryPlugin.prod.js} +3 -3
- package/dist/node_modules/@lexical/react/dist/LexicalListPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/dist/LexicalOnChangePlugin.prod.js +16 -0
- package/dist/node_modules/@lexical/react/dist/LexicalReactProviderExtension.prod.js +6 -0
- package/dist/node_modules/@lexical/react/dist/LexicalRichTextPlugin.prod.js +77 -0
- package/dist/node_modules/@lexical/react/dist/LexicalTypeaheadMenuPlugin.prod.js +245 -0
- package/dist/node_modules/@lexical/react/dist/useLexicalEditable.prod.js +22 -0
- package/dist/node_modules/@lexical/rich-text/dist/LexicalRichText.prod.js +567 -0
- package/dist/node_modules/@lexical/selection/dist/LexicalSelection.prod.js +123 -0
- package/dist/node_modules/@lexical/table/dist/LexicalTable.prod.js +929 -0
- package/dist/node_modules/@lexical/text/{LexicalText.prod.js → dist/LexicalText.prod.js} +6 -6
- package/dist/node_modules/@lexical/utils/dist/LexicalUtils.prod.js +111 -0
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/lexical/dist/Lexical.prod.js +6731 -0
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/package.json +17 -15
- package/dist/_virtual/prism-cpp.js +0 -3
- package/dist/_virtual/prism-cpp2.js +0 -5
- package/dist/_virtual/prism-java.js +0 -3
- package/dist/_virtual/prism-java2.js +0 -5
- package/dist/_virtual/prism-python.js +0 -3
- package/dist/_virtual/prism-python2.js +0 -5
- package/dist/_virtual/prism-rust.js +0 -3
- package/dist/_virtual/prism-rust2.js +0 -5
- package/dist/_virtual/prism-typescript.js +0 -3
- package/dist/_virtual/prism-typescript2.js +0 -5
- package/dist/_virtual/prism.js +0 -3
- package/dist/_virtual/prism2.js +0 -5
- package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +0 -159
- package/dist/node_modules/@lexical/code/LexicalCode.prod.js +0 -236
- package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +0 -46
- package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +0 -89
- package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +0 -108
- package/dist/node_modules/@lexical/link/LexicalLink.prod.js +0 -187
- package/dist/node_modules/@lexical/list/LexicalList.prod.js +0 -729
- package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +0 -367
- package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +0 -11
- package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +0 -17
- package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +0 -45
- package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +0 -55
- package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +0 -49
- package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +0 -17
- package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +0 -16
- package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +0 -56
- package/dist/node_modules/@lexical/react/LexicalTypeaheadMenuPlugin.prod.js +0 -220
- package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +0 -21
- package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +0 -376
- package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +0 -107
- package/dist/node_modules/@lexical/table/LexicalTable.prod.js +0 -661
- package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +0 -102
- package/dist/node_modules/lexical/Lexical.prod.js +0 -4912
- package/dist/node_modules/prismjs/components/prism-c.js +0 -77
- package/dist/node_modules/prismjs/components/prism-clike.js +0 -32
- package/dist/node_modules/prismjs/components/prism-cpp.js +0 -93
- package/dist/node_modules/prismjs/components/prism-css.js +0 -56
- package/dist/node_modules/prismjs/components/prism-java.js +0 -122
- package/dist/node_modules/prismjs/components/prism-javascript.js +0 -138
- package/dist/node_modules/prismjs/components/prism-markdown.js +0 -301
- package/dist/node_modules/prismjs/components/prism-markup.js +0 -174
- package/dist/node_modules/prismjs/components/prism-objectivec.js +0 -11
- package/dist/node_modules/prismjs/components/prism-powershell.js +0 -56
- package/dist/node_modules/prismjs/components/prism-python.js +0 -69
- package/dist/node_modules/prismjs/components/prism-rust.js +0 -124
- package/dist/node_modules/prismjs/components/prism-sql.js +0 -34
- package/dist/node_modules/prismjs/components/prism-swift.js +0 -114
- package/dist/node_modules/prismjs/components/prism-typescript.js +0 -53
- package/dist/node_modules/prismjs/prism.js +0 -1165
- /package/dist/node_modules/@floating-ui/{utils → dom/node_modules/@floating-ui/utils}/dist/floating-ui.utils.dom.js +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ElementNode as p, $getDocument as c, addClassNamesToElement as f, isHTMLAnchorElement as g, $copyNode as m, $isRangeSelection as k, $applyNodeReplacement as d } from "../../../lexical/dist/Lexical.prod.js";
|
|
3
|
+
import { defineImportRule as U, sel as N, $distributeInlineWrapper as O } from "../../html/dist/LexicalHtml.prod.js";
|
|
4
|
+
const L = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
|
|
5
|
+
class a extends p {
|
|
6
|
+
__url;
|
|
7
|
+
__target;
|
|
8
|
+
__rel;
|
|
9
|
+
__title;
|
|
10
|
+
static getType() {
|
|
11
|
+
return "link";
|
|
12
|
+
}
|
|
13
|
+
static clone(t) {
|
|
14
|
+
return new a(t.__url, { rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
|
|
15
|
+
}
|
|
16
|
+
constructor(t = "", e = {}, i) {
|
|
17
|
+
super(i);
|
|
18
|
+
const { target: n = null, rel: s = null, title: l = null } = e;
|
|
19
|
+
this.__url = t, this.__target = n, this.__rel = s, this.__title = l;
|
|
20
|
+
}
|
|
21
|
+
afterCloneFrom(t) {
|
|
22
|
+
super.afterCloneFrom(t), this.__url = t.__url, this.__rel = t.__rel, this.__target = t.__target, this.__title = t.__title;
|
|
23
|
+
}
|
|
24
|
+
createDOM(t) {
|
|
25
|
+
const e = c().createElement("a");
|
|
26
|
+
return this.updateLinkDOM(null, e, t), f(e, t.theme.link), e;
|
|
27
|
+
}
|
|
28
|
+
updateLinkDOM(t, e, i) {
|
|
29
|
+
if (g(e)) {
|
|
30
|
+
t && t.__url === this.__url || (e.href = this.sanitizeUrl(this.__url));
|
|
31
|
+
for (const n of ["target", "rel", "title"]) {
|
|
32
|
+
const s = `__${n}`, l = this[s];
|
|
33
|
+
t && t[s] === l || (l ? e[n] = l : e.removeAttribute(n));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
updateDOM(t, e, i) {
|
|
38
|
+
return this.updateLinkDOM(t, e, i), !1;
|
|
39
|
+
}
|
|
40
|
+
static importDOM() {
|
|
41
|
+
return { a: (t) => ({ conversion: A, priority: 1 }) };
|
|
42
|
+
}
|
|
43
|
+
static importJSON(t) {
|
|
44
|
+
return _().updateFromJSON(t);
|
|
45
|
+
}
|
|
46
|
+
updateFromJSON(t) {
|
|
47
|
+
return super.updateFromJSON(t).setURL(t.url).setRel(t.rel || null).setTarget(t.target || null).setTitle(t.title || null);
|
|
48
|
+
}
|
|
49
|
+
sanitizeUrl(t) {
|
|
50
|
+
t = h(t);
|
|
51
|
+
try {
|
|
52
|
+
const e = new URL(h(t));
|
|
53
|
+
if (!L.has(e.protocol)) return "about:blank";
|
|
54
|
+
} catch {
|
|
55
|
+
return t;
|
|
56
|
+
}
|
|
57
|
+
return t;
|
|
58
|
+
}
|
|
59
|
+
exportJSON() {
|
|
60
|
+
return { ...super.exportJSON(), rel: this.getRel(), target: this.getTarget(), title: this.getTitle(), url: this.getURL() };
|
|
61
|
+
}
|
|
62
|
+
getURL() {
|
|
63
|
+
return this.getLatest().__url;
|
|
64
|
+
}
|
|
65
|
+
setURL(t) {
|
|
66
|
+
const e = this.getWritable();
|
|
67
|
+
return e.__url = t, e;
|
|
68
|
+
}
|
|
69
|
+
getTarget() {
|
|
70
|
+
return this.getLatest().__target;
|
|
71
|
+
}
|
|
72
|
+
setTarget(t) {
|
|
73
|
+
const e = this.getWritable();
|
|
74
|
+
return e.__target = t, e;
|
|
75
|
+
}
|
|
76
|
+
getRel() {
|
|
77
|
+
return this.getLatest().__rel;
|
|
78
|
+
}
|
|
79
|
+
setRel(t) {
|
|
80
|
+
const e = this.getWritable();
|
|
81
|
+
return e.__rel = t, e;
|
|
82
|
+
}
|
|
83
|
+
getTitle() {
|
|
84
|
+
return this.getLatest().__title;
|
|
85
|
+
}
|
|
86
|
+
setTitle(t) {
|
|
87
|
+
const e = this.getWritable();
|
|
88
|
+
return e.__title = t, e;
|
|
89
|
+
}
|
|
90
|
+
insertNewAfter(t, e = !0) {
|
|
91
|
+
const i = m(this);
|
|
92
|
+
return this.insertAfter(i, e), i;
|
|
93
|
+
}
|
|
94
|
+
canInsertTextBefore() {
|
|
95
|
+
return !1;
|
|
96
|
+
}
|
|
97
|
+
canInsertTextAfter() {
|
|
98
|
+
return !1;
|
|
99
|
+
}
|
|
100
|
+
canBeEmpty() {
|
|
101
|
+
return !1;
|
|
102
|
+
}
|
|
103
|
+
isInline() {
|
|
104
|
+
return !0;
|
|
105
|
+
}
|
|
106
|
+
extractWithChild(t, e, i) {
|
|
107
|
+
if (!k(e)) return !1;
|
|
108
|
+
const n = e.anchor.getNode(), s = e.focus.getNode();
|
|
109
|
+
return (this.is(n) || this.isParentOf(n)) && (this.is(s) || this.isParentOf(s)) && e.getTextContent().length > 0;
|
|
110
|
+
}
|
|
111
|
+
isEmailURI() {
|
|
112
|
+
return this.__url.startsWith("mailto:");
|
|
113
|
+
}
|
|
114
|
+
isWebSiteURI() {
|
|
115
|
+
return this.__url.startsWith("https://") || this.__url.startsWith("http://");
|
|
116
|
+
}
|
|
117
|
+
shouldMergeAdjacentLink(t) {
|
|
118
|
+
return this.getType() === t.getType() && this.__url === t.__url && this.__target === t.__target && this.__rel === t.__rel && this.__title === t.__title;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function A(r) {
|
|
122
|
+
let t = null;
|
|
123
|
+
if (g(r)) {
|
|
124
|
+
const e = r.textContent;
|
|
125
|
+
(e !== null && e !== "" || r.children.length > 0) && (t = _(r.getAttribute("href") || "", { rel: r.getAttribute("rel"), target: r.getAttribute("target"), title: r.getAttribute("title") }));
|
|
126
|
+
}
|
|
127
|
+
return { node: t };
|
|
128
|
+
}
|
|
129
|
+
function _(r = "", t) {
|
|
130
|
+
return d(new a(r, t));
|
|
131
|
+
}
|
|
132
|
+
function $(r) {
|
|
133
|
+
return r instanceof a;
|
|
134
|
+
}
|
|
135
|
+
class u extends a {
|
|
136
|
+
__isUnlinked;
|
|
137
|
+
constructor(t = "", e = {}, i) {
|
|
138
|
+
super(t, e, i), this.__isUnlinked = e.isUnlinked !== void 0 && e.isUnlinked !== null && e.isUnlinked;
|
|
139
|
+
}
|
|
140
|
+
afterCloneFrom(t) {
|
|
141
|
+
super.afterCloneFrom(t), this.__isUnlinked = t.__isUnlinked;
|
|
142
|
+
}
|
|
143
|
+
static getType() {
|
|
144
|
+
return "autolink";
|
|
145
|
+
}
|
|
146
|
+
static clone(t) {
|
|
147
|
+
return new u(t.__url, { isUnlinked: t.__isUnlinked, rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
|
|
148
|
+
}
|
|
149
|
+
shouldMergeAdjacentLink(t) {
|
|
150
|
+
return !1;
|
|
151
|
+
}
|
|
152
|
+
getIsUnlinked() {
|
|
153
|
+
return this.__isUnlinked;
|
|
154
|
+
}
|
|
155
|
+
setIsUnlinked(t) {
|
|
156
|
+
const e = this.getWritable();
|
|
157
|
+
return e.__isUnlinked = t, e;
|
|
158
|
+
}
|
|
159
|
+
createDOM(t) {
|
|
160
|
+
return this.__isUnlinked ? c().createElement("span") : super.createDOM(t);
|
|
161
|
+
}
|
|
162
|
+
updateDOM(t, e, i) {
|
|
163
|
+
return super.updateDOM(t, e, i) || t.__isUnlinked !== this.__isUnlinked;
|
|
164
|
+
}
|
|
165
|
+
static importJSON(t) {
|
|
166
|
+
return o().updateFromJSON(t);
|
|
167
|
+
}
|
|
168
|
+
updateFromJSON(t) {
|
|
169
|
+
return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked || !1);
|
|
170
|
+
}
|
|
171
|
+
static importDOM() {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
exportJSON() {
|
|
175
|
+
return { ...super.exportJSON(), isUnlinked: this.__isUnlinked };
|
|
176
|
+
}
|
|
177
|
+
insertNewAfter(t, e = !0) {
|
|
178
|
+
const i = o(this.__url, { isUnlinked: this.__isUnlinked, rel: this.__rel, target: this.__target, title: this.__title });
|
|
179
|
+
return this.insertAfter(i, e), i;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function o(r = "", t) {
|
|
183
|
+
return d(new u(r, t));
|
|
184
|
+
}
|
|
185
|
+
function R(r) {
|
|
186
|
+
return r instanceof u;
|
|
187
|
+
}
|
|
188
|
+
const b = /^\+?[0-9\s()-]{5,}$/;
|
|
189
|
+
function h(r) {
|
|
190
|
+
return r.match(/^[a-z][a-z0-9+.-]*:/i) || r.match(/^[/#.]/) ? r : r.includes("@") ? `mailto:${r}` : b.test(r) ? `tel:${r}` : `https://${r}`;
|
|
191
|
+
}
|
|
192
|
+
N.tag("a");
|
|
193
|
+
export {
|
|
194
|
+
o as $createAutoLinkNode,
|
|
195
|
+
_ as $createLinkNode,
|
|
196
|
+
R as $isAutoLinkNode,
|
|
197
|
+
$ as $isLinkNode,
|
|
198
|
+
u as AutoLinkNode,
|
|
199
|
+
a as LinkNode,
|
|
200
|
+
h as formatUrl
|
|
201
|
+
};
|