eddyter 1.4.12 → 1.4.13

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.
Files changed (41) hide show
  1. package/README.md +3 -2
  2. package/dist/CommentBubblePlugin-DDCERFQO.js +29 -0
  3. package/dist/{LazyCodeMirror-CcceEUqu.js → LazyCodeMirror-C1bW4mVF.js} +941 -1484
  4. package/dist/{LazySignatureCanvas-Cck44R9l.js → LazySignatureCanvas-D5P1189T.js} +21 -38
  5. package/dist/Provider/EditorProvider.d.ts +2 -0
  6. package/dist/api/auth.d.ts +4 -0
  7. package/dist/assets/style.css +1 -1
  8. package/dist/{babel-CCPWkrf4.js → babel-B9hn44Wo.js} +726 -1302
  9. package/dist/components/ColorPicker/LazyHexColorPicker.d.ts +2 -0
  10. package/dist/components/CommentToggle/CommentToggle.d.ts +2 -2
  11. package/dist/components/ConfigurableEditorWithAuth.d.ts +2 -2
  12. package/dist/components/EmojiPickerWidget/LazyEmojiPicker.d.ts +4 -0
  13. package/dist/components/LockedFeature/FeatureLockCard.d.ts +22 -0
  14. package/dist/components/LockedFeature/FeatureLockTooltipContent.d.ts +12 -0
  15. package/dist/components/LockedFeature/LockedFeature.d.ts +6 -1
  16. package/dist/components/LockedFeature/lockedFeatureMetadata.d.ts +7 -0
  17. package/dist/components/Toolbar/styles.d.ts +5 -5
  18. package/dist/components/ui/tooltip.d.ts +2 -1
  19. package/dist/{estree-CxUPh9wa.js → estree-CocPn_Md.js} +529 -917
  20. package/dist/{generateDocxThumbnail-DGj_L73_.js → generateDocxThumbnail-BVFpoKUP.js} +762 -1118
  21. package/dist/{generatePdfThumbnail-D1ui86rp.js → generatePdfThumbnail-Pvt57kGy.js} +13 -19
  22. package/dist/{generateXlsxThumbnail-CbJOr-_6.js → generateXlsxThumbnail-DRggrLYK.js} +3322 -3508
  23. package/dist/{html-CmniStvG.js → html-CxCicOef.js} +350 -589
  24. package/dist/{html2canvas.esm-C2wu93Kq.js → html2canvas.esm-BD_Vwvv8.js} +139 -204
  25. package/dist/{html2pdf.bundle.min-CN_w9Sxu.js → html2pdf.bundle.min-DElEIEzd.js} +3405 -5221
  26. package/dist/{index-DiSjJC3k.js → index-C9Dld3-L.js} +13 -13
  27. package/dist/{index-CuwrKBfY.js → index-Cojy1w7r.js} +194 -217
  28. package/dist/index-D11sRTul.js +147 -0
  29. package/dist/{index-Dh0oRk6u.js → index-DFEFJp4J.js} +37294 -41489
  30. package/dist/index-D_izLqTY.js +552 -0
  31. package/dist/{index-hrDzgkRb.js → index-ZBDns08-.js} +81 -80
  32. package/dist/index-rm00T8b9.js +166 -0
  33. package/dist/index.js +2 -2
  34. package/dist/{markdown-B0mEGGfQ.js → markdown-BUjgWFLu.js} +578 -1015
  35. package/dist/{objectWithoutPropertiesLoose-DO0w4vQT.js → objectWithoutPropertiesLoose-DiWPeE4c.js} +6 -10
  36. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +1 -1
  37. package/dist/plugins/LocalStoragePlugin.d.ts +0 -2
  38. package/dist/{postcss-B0bxXf7u.js → postcss-CGIcwj_g.js} +615 -1065
  39. package/dist/{standalone-DmuJV5rn.js → standalone-C0qguT38.js} +350 -596
  40. package/dist/{typescript-DZlC_9M8.js → typescript-BM7wk6k-.js} +1114 -1806
  41. package/package.json +8 -1
@@ -0,0 +1,147 @@
1
+ import { jsx as i, jsxs as b } from "react/jsx-runtime";
2
+ import { useLexicalComposerContext as k } from "@lexical/react/LexicalComposerContext";
3
+ import { c as L, g as I, h as w } from "./index-DFEFJp4J.js";
4
+ import { useBasicTypeaheadTriggerMatch as C, LexicalTypeaheadMenuPlugin as S, MenuOption as R } from "@lexical/react/LexicalTypeaheadMenuPlugin";
5
+ import { useState as y, useMemo as v, useCallback as g, useEffect as O } from "react";
6
+ import * as E from "react-dom";
7
+ const U = L("UserRound", [
8
+ ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
9
+ ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
10
+ ]), A = `\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`, P = {
11
+ PUNCTUATION: A
12
+ }, M = P.PUNCTUATION, x = ["@"].join(""), _ = "[^" + x + M + "\\s]", G = "(?:\\.[ |$]| |[" + M + "]|)", $ = 75, D = new RegExp(
13
+ "(^|\\s|\\()([" + x + "]((?:" + _ + G + "){0," + $ + "}))$"
14
+ ), F = 5, m = /* @__PURE__ */ new Map(), j = {
15
+ search(o, e, r) {
16
+ setTimeout(() => {
17
+ const c = o.filter(
18
+ (t) => t.toLowerCase().includes(e.toLowerCase())
19
+ );
20
+ r(c);
21
+ }, 500);
22
+ }
23
+ };
24
+ function Q(o = [], e) {
25
+ const [r, c] = y([]);
26
+ return O(() => {
27
+ const t = m.get(e);
28
+ if (e == null) {
29
+ c([]);
30
+ return;
31
+ }
32
+ if (t !== null) {
33
+ if (t !== void 0) {
34
+ c(t);
35
+ return;
36
+ }
37
+ m.set(e, null), j.search(o, e, (a) => {
38
+ m.set(e, a), c(a);
39
+ });
40
+ }
41
+ }, [e]), r;
42
+ }
43
+ function z(o, e) {
44
+ const r = D.exec(o);
45
+ if (r !== null) {
46
+ const c = r[1], t = r[3];
47
+ if (t.length >= e)
48
+ return {
49
+ leadOffset: r.index + c.length,
50
+ matchingString: t,
51
+ replaceableString: r[2]
52
+ };
53
+ }
54
+ return null;
55
+ }
56
+ function H(o) {
57
+ return z(o, 0);
58
+ }
59
+ class V extends R {
60
+ name;
61
+ picture;
62
+ constructor(e, r) {
63
+ super(e), this.name = e, this.picture = r;
64
+ }
65
+ }
66
+ function q({
67
+ index: o,
68
+ isSelected: e,
69
+ onClick: r,
70
+ onMouseEnter: c,
71
+ option: t
72
+ }) {
73
+ return /* @__PURE__ */ b(
74
+ "li",
75
+ {
76
+ tabIndex: -1,
77
+ className: `group cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-3 cteditor-py-2 cteditor-rounded-none cteditor-cursor-pointer cteditor-transition-all cteditor-duration-150 cteditor-text-foreground cteditor-border-l-2 ${e ? "cteditor-bg-primary/10 cteditor-border-primary selected" : "cteditor-border-transparent hover:cteditor-bg-accent hover:cteditor-border-primary"}`,
78
+ ref: t.setRefElement,
79
+ role: "option",
80
+ "aria-selected": e,
81
+ id: "typeahead-item-" + o,
82
+ onMouseEnter: c,
83
+ onClick: r,
84
+ children: [
85
+ t.picture,
86
+ /* @__PURE__ */ i("span", { className: "cteditor-flex-1 cteditor-text-sm cteditor-font-normal cteditor-overflow-hidden cteditor-text-ellipsis cteditor-whitespace-nowrap", children: t.name })
87
+ ]
88
+ },
89
+ t.key
90
+ );
91
+ }
92
+ function Y({
93
+ userList: o
94
+ }) {
95
+ const [e] = k(), [r, c] = y(null), t = Q(o, r), { isDark: a } = I(), f = C("/", {
96
+ minLength: 0
97
+ }), l = v(
98
+ () => t.map(
99
+ (n) => new V(
100
+ n,
101
+ /* @__PURE__ */ i("i", { className: "cteditor-flex cteditor-items-center cteditor-justify-center cteditor-w-6 cteditor-h-6 cteditor-rounded-full cteditor-bg-muted cteditor-shrink-0 group-[.selected]:cteditor-bg-primary-foreground/20", children: /* @__PURE__ */ i(U, { size: 14 }) })
102
+ )
103
+ ).slice(0, F),
104
+ [t]
105
+ ), N = g(
106
+ (n, s, p) => {
107
+ e.update(() => {
108
+ const d = w(n.name);
109
+ s && s.replace(d), d.select(), p();
110
+ });
111
+ },
112
+ [e]
113
+ ), T = g(
114
+ (n) => f(n, e) !== null ? null : H(n),
115
+ [f, e]
116
+ );
117
+ return /* @__PURE__ */ i(
118
+ S,
119
+ {
120
+ onQueryChange: c,
121
+ onSelectOption: N,
122
+ triggerFn: T,
123
+ options: l,
124
+ menuRenderFn: (n, { selectedIndex: s, selectOptionAndCleanUp: p, setHighlightedIndex: d }) => n.current ? E.createPortal(
125
+ /* @__PURE__ */ i("div", { id: "ct-editor-f47ac10b", className: `typeahead-popover mentions-menu eddyter-scope ${a ? "dark cteditor-dark" : ""} `, style: { width: "fit-content", borderRadius: "6px" }, children: l.length > 0 ? /* @__PURE__ */ i("ul", { className: "cteditor-list-none cteditor-m-0 cteditor-p-0 cteditor-w-fit cteditor-border cteditor-rounded-md cteditor-border-foreground/10", children: l.map((h, u) => /* @__PURE__ */ i(
126
+ q,
127
+ {
128
+ index: u,
129
+ isSelected: s === u,
130
+ onClick: () => {
131
+ d(u), p(h);
132
+ },
133
+ onMouseEnter: () => {
134
+ d(u);
135
+ },
136
+ option: h
137
+ },
138
+ h.key
139
+ )) }) : /* @__PURE__ */ i("div", { className: "cteditor-text-center cteditor-text-muted-foreground cteditor-text-sm cteditor-whitespace-nowrap", children: "No users found" }) }),
140
+ n.current
141
+ ) : null
142
+ }
143
+ );
144
+ }
145
+ export {
146
+ Y as default
147
+ };