@templatical/editor 0.0.1 → 0.0.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.
Files changed (130) hide show
  1. package/dist/AiChatSidebar-busJk9hm.js +214 -0
  2. package/dist/AiFeatureMenu-DLGv_-pj.js +63 -0
  3. package/dist/CloudEditor-BDnHd6Um.js +919 -0
  4. package/dist/CollaboratorBar-Dv3l52vC.js +91 -0
  5. package/dist/CommentsSidebar-4tjp0VU5.js +439 -0
  6. package/dist/DesignReferenceSidebar-CmwXvltV.js +273 -0
  7. package/dist/LoadingTrack-vK8W2PJf.js +10 -0
  8. package/dist/ModuleBrowserModal-lrk3Fr0H.js +205 -0
  9. package/dist/ModulePreviewCanvas-BcBJLnwL.js +106 -0
  10. package/dist/ParagraphEditor-DH8cSC6m.js +625 -0
  11. package/dist/RichTextEditorContent-CQqodi7p.js +133 -0
  12. package/dist/SaveModuleDialog-Bmzi72td.js +122 -0
  13. package/dist/SnapshotHistory-AEgi9Xsn.js +126 -0
  14. package/dist/TemplateScoringPanel-CTgMtc0-.js +249 -0
  15. package/dist/TestEmailModal-Dpq1is9S.js +94 -0
  16. package/dist/TitleEditor-CLcDdcWI.js +167 -0
  17. package/dist/TplModal-CGzRjR96.js +44 -0
  18. package/dist/_plugin-vue_export-helper-B1-bu7yR.js +47 -0
  19. package/dist/blockTypeIcons-BpPTqcok.js +126 -0
  20. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +3 -0
  21. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +1 -0
  22. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +2 -0
  23. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +1 -0
  24. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +3 -0
  25. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +1 -0
  26. package/dist/cdn/chunks/dist-0UheN8rK.js +1 -0
  27. package/dist/cdn/chunks/dist-55mmbGQ9.js +1 -0
  28. package/dist/cdn/chunks/dist-B31mxKyP.js +1 -0
  29. package/dist/cdn/chunks/dist-B5JI9nIg.js +1 -0
  30. package/dist/cdn/chunks/dist-B93vLKhU.js +1 -0
  31. package/dist/cdn/chunks/dist-BDt3FJvj.js +1 -0
  32. package/dist/cdn/chunks/dist-BJRuFHmi.js +1 -0
  33. package/dist/cdn/chunks/dist-BKSzrf0L.js +1 -0
  34. package/dist/cdn/chunks/dist-BL8c5gYQ.js +1 -0
  35. package/dist/cdn/chunks/dist-CYThWMP5.js +1 -0
  36. package/dist/cdn/chunks/dist-DxZbPJYt.js +1 -0
  37. package/dist/cdn/chunks/draggable-ClUwYCFL.js +17 -0
  38. package/dist/cdn/chunks/draggable-ClUwYCFL.js.map +1 -0
  39. package/dist/cdn/chunks/emojiData-6fVLNqeH.js +2 -0
  40. package/dist/cdn/chunks/emojiData-6fVLNqeH.js.map +1 -0
  41. package/dist/cdn/chunks/extensions-ea_ewKUl.js +2 -0
  42. package/dist/cdn/chunks/extensions-ea_ewKUl.js.map +1 -0
  43. package/dist/cdn/chunks/icons-vmLJTaJk.js +2 -0
  44. package/dist/cdn/chunks/icons-vmLJTaJk.js.map +1 -0
  45. package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +1 -0
  46. package/dist/cdn/chunks/styleConstants-CNejCb-L.js +2 -0
  47. package/dist/cdn/chunks/styleConstants-CNejCb-L.js.map +1 -0
  48. package/dist/cdn/chunks/tiptap-Cya4P9CN.js +145 -0
  49. package/dist/cdn/chunks/tiptap-Cya4P9CN.js.map +1 -0
  50. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +2 -0
  51. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +1 -0
  52. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +2 -0
  53. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +1 -0
  54. package/dist/cdn/editor.css +1 -0
  55. package/dist/cdn/editor.js +2 -0
  56. package/dist/cdn/editor.js.map +1 -0
  57. package/dist/check-B7kDuZmP.js +7 -0
  58. package/dist/chevron-down-DJLW2Q9Z.js +7 -0
  59. package/dist/circle-alert-E2vYPs5r.js +25 -0
  60. package/dist/clock-lWIIQA3C.js +12 -0
  61. package/dist/de-B4Ob4vCo.js +682 -0
  62. package/dist/dist-4LiM9FDd.js +35 -0
  63. package/dist/dist-Bu7veieH.js +776 -0
  64. package/dist/dist-C1BIRHCQ.js +61 -0
  65. package/dist/dist-CG-vEqSU.js +314 -0
  66. package/dist/dist-C_ymrGFi.js +10625 -0
  67. package/dist/dist-ChAGLpWo.js +35 -0
  68. package/dist/dist-D_HQYSY-.js +189 -0
  69. package/dist/dist-DkypH7qG.js +5 -0
  70. package/dist/dist-DmOE-Ubp.js +74 -0
  71. package/dist/dist-DmpMJbmZ.js +513 -0
  72. package/dist/dist-DrvKRSU6.js +47 -0
  73. package/dist/dist-Dxnd0GRf.js +5 -0
  74. package/dist/dist-DysAFIPy.js +2054 -0
  75. package/dist/emojiData-BfWQS72m.js +17 -0
  76. package/dist/en-YXsspZJG.js +682 -0
  77. package/dist/extensions-CKM99njP.js +420 -0
  78. package/dist/formatRelativeTime-DX3FgqN9.js +8 -0
  79. package/dist/i18n-CJsFtdbZ.js +23 -0
  80. package/dist/image-up-X4xIq4ea.js +23 -0
  81. package/dist/keys-Dwa2PmdD.js +10 -0
  82. package/dist/liquid.browser-BemTg3sZ.js +3272 -0
  83. package/dist/loader-circle-BTQQxC3l.js +7 -0
  84. package/dist/message-circle-Blgm6V_h.js +7 -0
  85. package/dist/refresh-cw-Bb4PEeW1.js +44 -0
  86. package/dist/scan-line-7lZPfOdm.js +25 -0
  87. package/dist/send-C0ltAQrv.js +10 -0
  88. package/dist/shield-check-f-qv4RKs.js +10 -0
  89. package/dist/sparkles-KhBCGlqB.js +23 -0
  90. package/dist/styleConstants-D4SOZGBV.js +94 -0
  91. package/dist/styles-DSw1VNU3.js +3406 -0
  92. package/dist/templatical-editor.css +2 -1
  93. package/dist/templatical-editor.js +242 -9
  94. package/dist/templatical-editor.umd.cjs +112 -524
  95. package/dist/timeouts-CmBrLeZA.js +4 -0
  96. package/dist/trash-2-OwjZ-guZ.js +25 -0
  97. package/dist/triangle-alert-DOSRIUYZ.js +17 -0
  98. package/dist/useEditorCore-Cc4RCwWq.js +5556 -0
  99. package/dist/useI18n-DUirdXEX.js +17 -0
  100. package/dist/useMergeTag-DVnlvPYJ.js +33 -0
  101. package/dist/x-CGlq2XQe.js +10 -0
  102. package/package.json +30 -20
  103. package/dist/AiChatSidebar-0vx9TP5B.js +0 -305
  104. package/dist/AiFeatureMenu-CI-v74ND.js +0 -69
  105. package/dist/CloudEditor-Wdfv_9xn.js +0 -1132
  106. package/dist/CollaboratorBar-B3uV4Wtw.js +0 -89
  107. package/dist/CommentsSidebar-PVUlloyB.js +0 -655
  108. package/dist/DesignReferenceSidebar-DAlAWrxU.js +0 -351
  109. package/dist/ModuleBrowserModal-1JEcChd8.js +0 -323
  110. package/dist/ModulePreviewCanvas-Cdp484Ae.js +0 -169
  111. package/dist/SaveModuleDialog-eNyr3XKn.js +0 -168
  112. package/dist/SnapshotHistory-D-ZiIj1v.js +0 -169
  113. package/dist/TemplateScoringPanel-DSZPo15C.js +0 -385
  114. package/dist/TestEmailModal-Cwre5elw.js +0 -128
  115. package/dist/TextEditor-BuUOIByX.js +0 -780
  116. package/dist/de-BWIAblxs.js +0 -685
  117. package/dist/en-cYyUzNV1.js +0 -685
  118. package/dist/index-0tWUczNu.js +0 -47
  119. package/dist/index-4okvXjqk.js +0 -41
  120. package/dist/index-BSc6h5zo.js +0 -967
  121. package/dist/index-CrvwWlhN.js +0 -41
  122. package/dist/index-D-iD-7lO.js +0 -10961
  123. package/dist/index-D-ygXbc8.js +0 -2452
  124. package/dist/index-DbrWKz-e.js +0 -1415
  125. package/dist/index-DeUeHy6g.js +0 -422
  126. package/dist/index-Ude6e9RU.js +0 -41
  127. package/dist/index-ZQzHBwkr.js +0 -12767
  128. package/dist/liquid.browser-CeNxS2GL.js +0 -3493
  129. package/dist/loader-circle-tM9j2mRh.js +0 -13
  130. package/dist/shield-check-Ngi9jAQc.js +0 -20
@@ -0,0 +1,35 @@
1
+ import { Wt as e, c as t } from "./dist-C_ymrGFi.js";
2
+ //#region ../../node_modules/.bun/@tiptap+extension-subscript@3.22.1+ea875cbca4543ce7/node_modules/@tiptap/extension-subscript/dist/index.js
3
+ var n = t.create({
4
+ name: "subscript",
5
+ addOptions() {
6
+ return { HTMLAttributes: {} };
7
+ },
8
+ parseHTML() {
9
+ return [{ tag: "sub" }, {
10
+ style: "vertical-align",
11
+ getAttrs(e) {
12
+ return e === "sub" ? null : !1;
13
+ }
14
+ }];
15
+ },
16
+ renderHTML({ HTMLAttributes: t }) {
17
+ return [
18
+ "sub",
19
+ e(this.options.HTMLAttributes, t),
20
+ 0
21
+ ];
22
+ },
23
+ addCommands() {
24
+ return {
25
+ setSubscript: () => ({ commands: e }) => e.setMark(this.name),
26
+ toggleSubscript: () => ({ commands: e }) => e.toggleMark(this.name),
27
+ unsetSubscript: () => ({ commands: e }) => e.unsetMark(this.name)
28
+ };
29
+ },
30
+ addKeyboardShortcuts() {
31
+ return { "Mod-,": () => this.editor.commands.toggleSubscript() };
32
+ }
33
+ }), r = n;
34
+ //#endregion
35
+ export { n as Subscript, r as default };
@@ -0,0 +1,189 @@
1
+ import { Wt as e, c as t, i as n } from "./dist-C_ymrGFi.js";
2
+ //#region ../../node_modules/.bun/@tiptap+extension-text-style@3.22.3+ea875cbca4543ce7/node_modules/@tiptap/extension-text-style/dist/index.js
3
+ var r = 20, i = (e, t = 0) => {
4
+ let n = [];
5
+ return !e.children.length || t > r || Array.from(e.children).forEach((e) => {
6
+ e.tagName === "SPAN" ? n.push(e) : e.children.length && n.push(...i(e, t + 1));
7
+ }), n;
8
+ }, a = (e) => {
9
+ if (!e.children.length) return;
10
+ let t = i(e);
11
+ t && t.forEach((e) => {
12
+ let t = e.getAttribute("style"), n = (e.parentElement?.closest("span"))?.getAttribute("style");
13
+ e.setAttribute("style", `${n};${t}`);
14
+ });
15
+ }, o = t.create({
16
+ name: "textStyle",
17
+ priority: 101,
18
+ addOptions() {
19
+ return {
20
+ HTMLAttributes: {},
21
+ mergeNestedSpanStyles: !0
22
+ };
23
+ },
24
+ parseHTML() {
25
+ return [{
26
+ tag: "span",
27
+ consuming: !1,
28
+ getAttrs: (e) => e.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && a(e), {}) : !1
29
+ }];
30
+ },
31
+ renderHTML({ HTMLAttributes: t }) {
32
+ return [
33
+ "span",
34
+ e(this.options.HTMLAttributes, t),
35
+ 0
36
+ ];
37
+ },
38
+ addCommands() {
39
+ return {
40
+ toggleTextStyle: (e) => ({ commands: t }) => t.toggleMark(this.name, e),
41
+ removeEmptyTextStyle: () => ({ tr: e }) => {
42
+ let { selection: t } = e;
43
+ return e.doc.nodesBetween(t.from, t.to, (t, n) => {
44
+ if (t.isTextblock) return !0;
45
+ t.marks.filter((e) => e.type === this.type).some((e) => Object.values(e.attrs).some((e) => !!e)) || e.removeMark(n, n + t.nodeSize, this.type);
46
+ }), !0;
47
+ }
48
+ };
49
+ }
50
+ }), s = n.create({
51
+ name: "backgroundColor",
52
+ addOptions() {
53
+ return { types: ["textStyle"] };
54
+ },
55
+ addGlobalAttributes() {
56
+ return [{
57
+ types: this.options.types,
58
+ attributes: { backgroundColor: {
59
+ default: null,
60
+ parseHTML: (e) => {
61
+ let t = e.getAttribute("style");
62
+ if (t) {
63
+ let e = t.split(";").map((e) => e.trim()).filter(Boolean);
64
+ for (let t = e.length - 1; t >= 0; --t) {
65
+ let n = e[t].split(":");
66
+ if (n.length >= 2) {
67
+ let e = n[0].trim().toLowerCase(), t = n.slice(1).join(":").trim();
68
+ if (e === "background-color") return t.replace(/['"]+/g, "");
69
+ }
70
+ }
71
+ }
72
+ return e.style.backgroundColor?.replace(/['"]+/g, "");
73
+ },
74
+ renderHTML: (e) => e.backgroundColor ? { style: `background-color: ${e.backgroundColor}` } : {}
75
+ } }
76
+ }];
77
+ },
78
+ addCommands() {
79
+ return {
80
+ setBackgroundColor: (e) => ({ chain: t }) => t().setMark("textStyle", { backgroundColor: e }).run(),
81
+ unsetBackgroundColor: () => ({ chain: e }) => e().setMark("textStyle", { backgroundColor: null }).removeEmptyTextStyle().run()
82
+ };
83
+ }
84
+ }), c = n.create({
85
+ name: "color",
86
+ addOptions() {
87
+ return { types: ["textStyle"] };
88
+ },
89
+ addGlobalAttributes() {
90
+ return [{
91
+ types: this.options.types,
92
+ attributes: { color: {
93
+ default: null,
94
+ parseHTML: (e) => {
95
+ let t = e.getAttribute("style");
96
+ if (t) {
97
+ let e = t.split(";").map((e) => e.trim()).filter(Boolean);
98
+ for (let t = e.length - 1; t >= 0; --t) {
99
+ let n = e[t].split(":");
100
+ if (n.length >= 2) {
101
+ let e = n[0].trim().toLowerCase(), t = n.slice(1).join(":").trim();
102
+ if (e === "color") return t.replace(/['"]+/g, "");
103
+ }
104
+ }
105
+ }
106
+ return e.style.color?.replace(/['"]+/g, "");
107
+ },
108
+ renderHTML: (e) => e.color ? { style: `color: ${e.color}` } : {}
109
+ } }
110
+ }];
111
+ },
112
+ addCommands() {
113
+ return {
114
+ setColor: (e) => ({ chain: t }) => t().setMark("textStyle", { color: e }).run(),
115
+ unsetColor: () => ({ chain: e }) => e().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
116
+ };
117
+ }
118
+ }), l = n.create({
119
+ name: "fontFamily",
120
+ addOptions() {
121
+ return { types: ["textStyle"] };
122
+ },
123
+ addGlobalAttributes() {
124
+ return [{
125
+ types: this.options.types,
126
+ attributes: { fontFamily: {
127
+ default: null,
128
+ parseHTML: (e) => e.style.fontFamily,
129
+ renderHTML: (e) => e.fontFamily ? { style: `font-family: ${e.fontFamily}` } : {}
130
+ } }
131
+ }];
132
+ },
133
+ addCommands() {
134
+ return {
135
+ setFontFamily: (e) => ({ chain: t }) => t().setMark("textStyle", { fontFamily: e }).run(),
136
+ unsetFontFamily: () => ({ chain: e }) => e().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run()
137
+ };
138
+ }
139
+ }), u = n.create({
140
+ name: "fontSize",
141
+ addOptions() {
142
+ return { types: ["textStyle"] };
143
+ },
144
+ addGlobalAttributes() {
145
+ return [{
146
+ types: this.options.types,
147
+ attributes: { fontSize: {
148
+ default: null,
149
+ parseHTML: (e) => e.style.fontSize,
150
+ renderHTML: (e) => e.fontSize ? { style: `font-size: ${e.fontSize}` } : {}
151
+ } }
152
+ }];
153
+ },
154
+ addCommands() {
155
+ return {
156
+ setFontSize: (e) => ({ chain: t }) => t().setMark("textStyle", { fontSize: e }).run(),
157
+ unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
158
+ };
159
+ }
160
+ }), d = n.create({
161
+ name: "lineHeight",
162
+ addOptions() {
163
+ return { types: ["textStyle"] };
164
+ },
165
+ addGlobalAttributes() {
166
+ return [{
167
+ types: this.options.types,
168
+ attributes: { lineHeight: {
169
+ default: null,
170
+ parseHTML: (e) => e.style.lineHeight,
171
+ renderHTML: (e) => e.lineHeight ? { style: `line-height: ${e.lineHeight}` } : {}
172
+ } }
173
+ }];
174
+ },
175
+ addCommands() {
176
+ return {
177
+ setLineHeight: (e) => ({ chain: t }) => t().setMark("textStyle", { lineHeight: e }).run(),
178
+ unsetLineHeight: () => ({ chain: e }) => e().setMark("textStyle", { lineHeight: null }).removeEmptyTextStyle().run()
179
+ };
180
+ }
181
+ }), f = n.create({
182
+ name: "textStyleKit",
183
+ addExtensions() {
184
+ let e = [];
185
+ return this.options.backgroundColor !== !1 && e.push(s.configure(this.options.backgroundColor)), this.options.color !== !1 && e.push(c.configure(this.options.color)), this.options.fontFamily !== !1 && e.push(l.configure(this.options.fontFamily)), this.options.fontSize !== !1 && e.push(u.configure(this.options.fontSize)), this.options.lineHeight !== !1 && e.push(d.configure(this.options.lineHeight)), this.options.textStyle !== !1 && e.push(o.configure(this.options.textStyle)), e;
186
+ }
187
+ });
188
+ //#endregion
189
+ export { s as BackgroundColor, c as Color, l as FontFamily, u as FontSize, d as LineHeight, o as TextStyle, f as TextStyleKit };
@@ -0,0 +1,5 @@
1
+ import { FontFamily as e } from "./dist-D_HQYSY-.js";
2
+ //#region ../../node_modules/.bun/@tiptap+extension-font-family@3.22.3+6d8ea77516bd34fe/node_modules/@tiptap/extension-font-family/dist/index.js
3
+ var t = e;
4
+ //#endregion
5
+ export { e as FontFamily, t as default };
@@ -0,0 +1,74 @@
1
+ import { Ht as e, Vt as t, Wt as n, c as r } from "./dist-C_ymrGFi.js";
2
+ //#region ../../node_modules/.bun/@tiptap+extension-highlight@3.22.1+ea875cbca4543ce7/node_modules/@tiptap/extension-highlight/dist/index.js
3
+ var i = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, a = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, o = r.create({
4
+ name: "highlight",
5
+ addOptions() {
6
+ return {
7
+ multicolor: !1,
8
+ HTMLAttributes: {}
9
+ };
10
+ },
11
+ addAttributes() {
12
+ return this.options.multicolor ? { color: {
13
+ default: null,
14
+ parseHTML: (e) => e.getAttribute("data-color") || e.style.backgroundColor,
15
+ renderHTML: (e) => e.color ? {
16
+ "data-color": e.color,
17
+ style: `background-color: ${e.color}; color: inherit`
18
+ } : {}
19
+ } } : {};
20
+ },
21
+ parseHTML() {
22
+ return [{ tag: "mark" }];
23
+ },
24
+ renderHTML({ HTMLAttributes: e }) {
25
+ return [
26
+ "mark",
27
+ n(this.options.HTMLAttributes, e),
28
+ 0
29
+ ];
30
+ },
31
+ renderMarkdown: (e, t) => `==${t.renderChildren(e)}==`,
32
+ parseMarkdown: (e, t) => t.applyMark("highlight", t.parseInline(e.tokens || [])),
33
+ markdownTokenizer: {
34
+ name: "highlight",
35
+ level: "inline",
36
+ start: (e) => e.indexOf("=="),
37
+ tokenize(e, t, n) {
38
+ let r = /^(==)([^=]+)(==)/.exec(e);
39
+ if (r) {
40
+ let e = r[2].trim(), t = n.inlineTokens(e);
41
+ return {
42
+ type: "highlight",
43
+ raw: r[0],
44
+ text: e,
45
+ tokens: t
46
+ };
47
+ }
48
+ }
49
+ },
50
+ addCommands() {
51
+ return {
52
+ setHighlight: (e) => ({ commands: t }) => t.setMark(this.name, e),
53
+ toggleHighlight: (e) => ({ commands: t }) => t.toggleMark(this.name, e),
54
+ unsetHighlight: () => ({ commands: e }) => e.unsetMark(this.name)
55
+ };
56
+ },
57
+ addKeyboardShortcuts() {
58
+ return { "Mod-Shift-h": () => this.editor.commands.toggleHighlight() };
59
+ },
60
+ addInputRules() {
61
+ return [t({
62
+ find: i,
63
+ type: this.type
64
+ })];
65
+ },
66
+ addPasteRules() {
67
+ return [e({
68
+ find: a,
69
+ type: this.type
70
+ })];
71
+ }
72
+ }), s = o;
73
+ //#endregion
74
+ export { o as Highlight, s as default, i as inputRegex, a as pasteRegex };