laif-ds 0.1.76 → 0.1.80
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/_virtual/index.js +5 -3
- package/dist/_virtual/index2.js +5 -2
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index5.js +2 -5
- package/dist/_virtual/index7.js +3 -2
- package/dist/_virtual/prism-cpp.js +3 -0
- package/dist/_virtual/prism-cpp2.js +5 -0
- package/dist/_virtual/prism-java.js +3 -0
- package/dist/_virtual/prism-java2.js +5 -0
- package/dist/_virtual/prism-python.js +3 -0
- package/dist/_virtual/prism-python2.js +5 -0
- package/dist/_virtual/prism-rust.js +3 -0
- package/dist/_virtual/prism-rust2.js +5 -0
- package/dist/_virtual/prism-typescript.js +3 -0
- package/dist/_virtual/prism-typescript2.js +5 -0
- package/dist/_virtual/prism.js +3 -0
- package/dist/_virtual/prism2.js +5 -0
- package/dist/components/editor/context/toolbar-context.js +42 -0
- package/dist/components/editor/editor-hooks/use-modal.js +30 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +24 -0
- package/dist/components/editor/editor-ui/content-editable.js +26 -0
- package/dist/components/editor/plugins/actions/actions-plugin.js +7 -0
- package/dist/components/editor/plugins/actions/clear-editor-plugin.js +39 -0
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +53 -0
- package/dist/components/editor/plugins/toolbar/block-format/block-format-data.js +52 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +31 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +23 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +24 -0
- package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +56 -0
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +50 -0
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +69 -0
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +34 -0
- package/dist/components/editor/themes/editor-theme.js +112 -0
- package/dist/components/ui/app-editor.js +150 -0
- package/dist/components/ui/app-multiple-select-dropdown.js +2 -2
- package/dist/components/ui/button.js +25 -24
- package/dist/components/ui/calendar.js +9 -9
- package/dist/components/ui/dialog.js +43 -37
- package/dist/components/ui/sidebar.js +20 -19
- package/dist/index.d.ts +23 -1
- package/dist/index.js +48 -44
- package/dist/laif-ds.css +1 -0
- package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +159 -0
- package/dist/node_modules/@lexical/code/LexicalCode.prod.js +236 -0
- package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +46 -0
- package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +89 -0
- package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +108 -0
- package/dist/node_modules/@lexical/link/LexicalLink.prod.js +187 -0
- package/dist/node_modules/@lexical/list/LexicalList.prod.js +729 -0
- package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +367 -0
- package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +11 -0
- package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +45 -0
- package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +22 -0
- package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +55 -0
- package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +49 -0
- package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +15 -0
- package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +16 -0
- package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +56 -0
- package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +21 -0
- package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +376 -0
- package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +107 -0
- package/dist/node_modules/@lexical/table/LexicalTable.prod.js +661 -0
- package/dist/node_modules/@lexical/text/LexicalText.prod.js +37 -0
- package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +102 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/lexical/Lexical.prod.js +4901 -0
- package/dist/node_modules/prismjs/components/prism-c.js +77 -0
- package/dist/node_modules/prismjs/components/prism-clike.js +32 -0
- package/dist/node_modules/prismjs/components/prism-cpp.js +93 -0
- package/dist/node_modules/prismjs/components/prism-css.js +56 -0
- package/dist/node_modules/prismjs/components/prism-java.js +122 -0
- package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
- package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
- package/dist/node_modules/prismjs/components/prism-markup.js +174 -0
- package/dist/node_modules/prismjs/components/prism-objectivec.js +11 -0
- package/dist/node_modules/prismjs/components/prism-powershell.js +56 -0
- package/dist/node_modules/prismjs/components/prism-python.js +69 -0
- package/dist/node_modules/prismjs/components/prism-rust.js +124 -0
- package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
- package/dist/node_modules/prismjs/components/prism-swift.js +114 -0
- package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
- package/dist/node_modules/prismjs/prism.js +1165 -0
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +12 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { addClassNamesToElement as g } from "../utils/LexicalUtils.prod.js";
|
|
3
|
+
import { ElementNode as p, isHTMLAnchorElement as h, $isRangeSelection as f, $applyNodeReplacement as d, $isElementNode as m } from "../../lexical/Lexical.prod.js";
|
|
4
|
+
const k = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
|
|
5
|
+
class u extends p {
|
|
6
|
+
static getType() {
|
|
7
|
+
return "link";
|
|
8
|
+
}
|
|
9
|
+
static clone(t) {
|
|
10
|
+
return new u(t.__url, { rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
|
|
11
|
+
}
|
|
12
|
+
constructor(t = "", e = {}, n) {
|
|
13
|
+
super(n);
|
|
14
|
+
const { target: i = null, rel: s = null, title: l = null } = e;
|
|
15
|
+
this.__url = t, this.__target = i, this.__rel = s, this.__title = l;
|
|
16
|
+
}
|
|
17
|
+
createDOM(t) {
|
|
18
|
+
const e = document.createElement("a");
|
|
19
|
+
return this.updateLinkDOM(null, e, t), g(e, t.theme.link), e;
|
|
20
|
+
}
|
|
21
|
+
updateLinkDOM(t, e, n) {
|
|
22
|
+
if (h(e)) {
|
|
23
|
+
t && t.__url === this.__url || (e.href = this.sanitizeUrl(this.__url));
|
|
24
|
+
for (const i of ["target", "rel", "title"]) {
|
|
25
|
+
const s = `__${i}`, l = this[s];
|
|
26
|
+
t && t[s] === l || (l ? e[i] = l : e.removeAttribute(i));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
updateDOM(t, e, n) {
|
|
31
|
+
return this.updateLinkDOM(t, e, n), !1;
|
|
32
|
+
}
|
|
33
|
+
static importDOM() {
|
|
34
|
+
return { a: (t) => ({ conversion: U, priority: 1 }) };
|
|
35
|
+
}
|
|
36
|
+
static importJSON(t) {
|
|
37
|
+
return o().updateFromJSON(t);
|
|
38
|
+
}
|
|
39
|
+
updateFromJSON(t) {
|
|
40
|
+
return super.updateFromJSON(t).setURL(t.url).setRel(t.rel || null).setTarget(t.target || null).setTitle(t.title || null);
|
|
41
|
+
}
|
|
42
|
+
sanitizeUrl(t) {
|
|
43
|
+
t = c(t);
|
|
44
|
+
try {
|
|
45
|
+
const e = new URL(c(t));
|
|
46
|
+
if (!k.has(e.protocol)) return "about:blank";
|
|
47
|
+
} catch {
|
|
48
|
+
return t;
|
|
49
|
+
}
|
|
50
|
+
return t;
|
|
51
|
+
}
|
|
52
|
+
exportJSON() {
|
|
53
|
+
return { ...super.exportJSON(), rel: this.getRel(), target: this.getTarget(), title: this.getTitle(), url: this.getURL() };
|
|
54
|
+
}
|
|
55
|
+
getURL() {
|
|
56
|
+
return this.getLatest().__url;
|
|
57
|
+
}
|
|
58
|
+
setURL(t) {
|
|
59
|
+
const e = this.getWritable();
|
|
60
|
+
return e.__url = t, e;
|
|
61
|
+
}
|
|
62
|
+
getTarget() {
|
|
63
|
+
return this.getLatest().__target;
|
|
64
|
+
}
|
|
65
|
+
setTarget(t) {
|
|
66
|
+
const e = this.getWritable();
|
|
67
|
+
return e.__target = t, e;
|
|
68
|
+
}
|
|
69
|
+
getRel() {
|
|
70
|
+
return this.getLatest().__rel;
|
|
71
|
+
}
|
|
72
|
+
setRel(t) {
|
|
73
|
+
const e = this.getWritable();
|
|
74
|
+
return e.__rel = t, e;
|
|
75
|
+
}
|
|
76
|
+
getTitle() {
|
|
77
|
+
return this.getLatest().__title;
|
|
78
|
+
}
|
|
79
|
+
setTitle(t) {
|
|
80
|
+
const e = this.getWritable();
|
|
81
|
+
return e.__title = t, e;
|
|
82
|
+
}
|
|
83
|
+
insertNewAfter(t, e = !0) {
|
|
84
|
+
const n = o(this.__url, { rel: this.__rel, target: this.__target, title: this.__title });
|
|
85
|
+
return this.insertAfter(n, e), n;
|
|
86
|
+
}
|
|
87
|
+
canInsertTextBefore() {
|
|
88
|
+
return !1;
|
|
89
|
+
}
|
|
90
|
+
canInsertTextAfter() {
|
|
91
|
+
return !1;
|
|
92
|
+
}
|
|
93
|
+
canBeEmpty() {
|
|
94
|
+
return !1;
|
|
95
|
+
}
|
|
96
|
+
isInline() {
|
|
97
|
+
return !0;
|
|
98
|
+
}
|
|
99
|
+
extractWithChild(t, e, n) {
|
|
100
|
+
if (!f(e)) return !1;
|
|
101
|
+
const i = e.anchor.getNode(), s = e.focus.getNode();
|
|
102
|
+
return this.isParentOf(i) && this.isParentOf(s) && e.getTextContent().length > 0;
|
|
103
|
+
}
|
|
104
|
+
isEmailURI() {
|
|
105
|
+
return this.__url.startsWith("mailto:");
|
|
106
|
+
}
|
|
107
|
+
isWebSiteURI() {
|
|
108
|
+
return this.__url.startsWith("https://") || this.__url.startsWith("http://");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function U(r) {
|
|
112
|
+
let t = null;
|
|
113
|
+
if (h(r)) {
|
|
114
|
+
const e = r.textContent;
|
|
115
|
+
(e !== null && e !== "" || r.children.length > 0) && (t = o(r.getAttribute("href") || "", { rel: r.getAttribute("rel"), target: r.getAttribute("target"), title: r.getAttribute("title") }));
|
|
116
|
+
}
|
|
117
|
+
return { node: t };
|
|
118
|
+
}
|
|
119
|
+
function o(r = "", t) {
|
|
120
|
+
return d(new u(r, t));
|
|
121
|
+
}
|
|
122
|
+
function S(r) {
|
|
123
|
+
return r instanceof u;
|
|
124
|
+
}
|
|
125
|
+
class a extends u {
|
|
126
|
+
constructor(t = "", e = {}, n) {
|
|
127
|
+
super(t, e, n), this.__isUnlinked = e.isUnlinked !== void 0 && e.isUnlinked !== null && e.isUnlinked;
|
|
128
|
+
}
|
|
129
|
+
static getType() {
|
|
130
|
+
return "autolink";
|
|
131
|
+
}
|
|
132
|
+
static clone(t) {
|
|
133
|
+
return new a(t.__url, { isUnlinked: t.__isUnlinked, rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
|
|
134
|
+
}
|
|
135
|
+
getIsUnlinked() {
|
|
136
|
+
return this.__isUnlinked;
|
|
137
|
+
}
|
|
138
|
+
setIsUnlinked(t) {
|
|
139
|
+
const e = this.getWritable();
|
|
140
|
+
return e.__isUnlinked = t, e;
|
|
141
|
+
}
|
|
142
|
+
createDOM(t) {
|
|
143
|
+
return this.__isUnlinked ? document.createElement("span") : super.createDOM(t);
|
|
144
|
+
}
|
|
145
|
+
updateDOM(t, e, n) {
|
|
146
|
+
return super.updateDOM(t, e, n) || t.__isUnlinked !== this.__isUnlinked;
|
|
147
|
+
}
|
|
148
|
+
static importJSON(t) {
|
|
149
|
+
return _().updateFromJSON(t);
|
|
150
|
+
}
|
|
151
|
+
updateFromJSON(t) {
|
|
152
|
+
return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked || !1);
|
|
153
|
+
}
|
|
154
|
+
static importDOM() {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
exportJSON() {
|
|
158
|
+
return { ...super.exportJSON(), isUnlinked: this.__isUnlinked };
|
|
159
|
+
}
|
|
160
|
+
insertNewAfter(t, e = !0) {
|
|
161
|
+
const n = this.getParentOrThrow().insertNewAfter(t, e);
|
|
162
|
+
if (m(n)) {
|
|
163
|
+
const i = _(this.__url, { isUnlinked: this.__isUnlinked, rel: this.__rel, target: this.__target, title: this.__title });
|
|
164
|
+
return n.append(i), i;
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function _(r = "", t) {
|
|
170
|
+
return d(new a(r, t));
|
|
171
|
+
}
|
|
172
|
+
function T(r) {
|
|
173
|
+
return r instanceof a;
|
|
174
|
+
}
|
|
175
|
+
const N = /^\+?[0-9\s()-]{5,}$/;
|
|
176
|
+
function c(r) {
|
|
177
|
+
return r.match(/^[a-z][a-z0-9+.-]*:/i) || r.match(/^[/#.]/) ? r : r.includes("@") ? `mailto:${r}` : N.test(r) ? `tel:${r}` : `https://${r}`;
|
|
178
|
+
}
|
|
179
|
+
export {
|
|
180
|
+
_ as $createAutoLinkNode,
|
|
181
|
+
o as $createLinkNode,
|
|
182
|
+
T as $isAutoLinkNode,
|
|
183
|
+
S as $isLinkNode,
|
|
184
|
+
a as AutoLinkNode,
|
|
185
|
+
u as LinkNode,
|
|
186
|
+
c as formatUrl
|
|
187
|
+
};
|