payload-richtext-tiptap 0.0.138 → 0.0.140

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 (71) hide show
  1. package/dist/src/fields/TiptapEditor/extensions/AICommand/AICommand.d.ts +1 -1
  2. package/dist/src/fields/TiptapEditor/extensions/AICommand/AICommand.d.ts.map +1 -1
  3. package/dist/src/fields/TiptapEditor/extensions/AICommand/AICommand.js +32 -32
  4. package/dist/src/fields/TiptapEditor/extensions/AICommand/AICommand.js.map +1 -1
  5. package/dist/src/fields/TiptapEditor/extensions/AudioBlock/AudioBlock.js.map +1 -1
  6. package/dist/src/fields/TiptapEditor/extensions/AudioBlock/components/AudioBlockMenu.js.map +1 -1
  7. package/dist/src/fields/TiptapEditor/extensions/FontSize/FontSize.js.map +1 -1
  8. package/dist/src/fields/TiptapEditor/extensions/Heading/Heading.js.map +1 -1
  9. package/dist/src/fields/TiptapEditor/extensions/ImageBlock/ImageBlock.js.map +1 -1
  10. package/dist/src/fields/TiptapEditor/extensions/ImageBlock/components/ImageBlockMenu.js.map +1 -1
  11. package/dist/src/fields/TiptapEditor/extensions/InsideLinks/InsideLink.client.js.map +1 -1
  12. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js +3 -3
  13. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js.map +1 -1
  14. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/menus/ColumnsMenu.js.map +1 -1
  15. package/dist/src/fields/TiptapEditor/extensions/SlashCommand/MenuList.js.map +1 -1
  16. package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Facebook/facebook.js.map +1 -1
  17. package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Instagram/instagram.js.map +1 -1
  18. package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Tiktok/tiktok.js.map +1 -1
  19. package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Twitter/twitter.js.map +1 -1
  20. package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Youtube/youtube.js.map +1 -1
  21. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/VideoBlock.js.map +1 -1
  22. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockMenu.js.map +1 -1
  23. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.d.ts.map +1 -1
  24. package/dist/src/fields/TiptapEditor/extensions/extension-kit.d.ts +1 -1
  25. package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.js.map +1 -1
  26. package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.js.map +1 -1
  27. package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.js.map +1 -1
  28. package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.js.map +1 -1
  29. package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.js.map +1 -1
  30. package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.js.map +1 -1
  31. package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.js.map +1 -1
  32. package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.js.map +1 -1
  33. package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.js.map +1 -1
  34. package/dist/src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.js.map +1 -1
  35. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontFamilyPicker.js.map +1 -1
  36. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontSizePicker.js.map +1 -1
  37. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-completion-command.d.ts +2 -2
  38. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-completion-command.d.ts.map +1 -1
  39. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-completion-command.js +4 -5
  40. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-completion-command.js.map +1 -1
  41. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.d.ts +3 -3
  42. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.d.ts.map +1 -1
  43. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.js +41 -35
  44. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.js.map +1 -1
  45. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.d.ts +3 -3
  46. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.d.ts.map +1 -1
  47. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.js +63 -87
  48. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.js.map +1 -1
  49. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/AIEditorPanel.d.ts +1 -1
  50. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/AIEditorPanel.d.ts.map +1 -1
  51. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/AIEditorPanel.js +50 -64
  52. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/AIEditorPanel.js.map +1 -1
  53. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/EditorPreview.d.ts +11 -0
  54. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/EditorPreview.d.ts.map +1 -0
  55. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/EditorPreview.js +80 -0
  56. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/EditorPreview.js.map +1 -0
  57. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/markdown.hook.d.ts +5 -0
  58. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/markdown.hook.d.ts.map +1 -0
  59. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/markdown.hook.js +67 -0
  60. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/markdown.hook.js.map +1 -0
  61. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/utils.js.map +1 -1
  62. package/dist/src/fields/TiptapEditor/hooks/useBlockEditor.js.map +1 -1
  63. package/dist/src/fields/TiptapEditor/lib/tiptapSchema.d.ts +397 -0
  64. package/dist/src/fields/TiptapEditor/lib/tiptapSchema.d.ts.map +1 -0
  65. package/dist/src/fields/TiptapEditor/lib/tiptapSchema.js +31 -0
  66. package/dist/src/fields/TiptapEditor/lib/tiptapSchema.js.map +1 -0
  67. package/dist/src/fields/TiptapEditor/lib/utils/cssVar.js.map +1 -1
  68. package/dist/src/mobile.css +1 -1
  69. package/dist/src/styles.css +1 -1
  70. package/dist/tsconfig.tsbuildinfo +1 -1
  71. package/package.json +30 -27
@@ -0,0 +1,397 @@
1
+ import { z } from 'zod';
2
+ export declare const JSONContentSchema: z.ZodObject<z.objectUtil.extendShape<{
3
+ type: z.ZodString;
4
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5
+ }, {
6
+ content: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
7
+ type: z.ZodString;
8
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
9
+ }, {
10
+ text: z.ZodString;
11
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
12
+ type: z.ZodString;
13
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ type?: string;
16
+ attrs?: Record<string, any>;
17
+ }, {
18
+ type?: string;
19
+ attrs?: Record<string, any>;
20
+ }>, "many">>;
21
+ }>, "strip", z.ZodTypeAny, {
22
+ type?: string;
23
+ attrs?: Record<string, any>;
24
+ text?: string;
25
+ marks?: {
26
+ type?: string;
27
+ attrs?: Record<string, any>;
28
+ }[];
29
+ }, {
30
+ type?: string;
31
+ attrs?: Record<string, any>;
32
+ text?: string;
33
+ marks?: {
34
+ type?: string;
35
+ attrs?: Record<string, any>;
36
+ }[];
37
+ }>, z.ZodObject<z.objectUtil.extendShape<{
38
+ type: z.ZodString;
39
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
40
+ }, {
41
+ content: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
42
+ type: z.ZodString;
43
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
44
+ }, {
45
+ text: z.ZodString;
46
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
+ type: z.ZodString;
48
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type?: string;
51
+ attrs?: Record<string, any>;
52
+ }, {
53
+ type?: string;
54
+ attrs?: Record<string, any>;
55
+ }>, "many">>;
56
+ }>, "strip", z.ZodTypeAny, {
57
+ type?: string;
58
+ attrs?: Record<string, any>;
59
+ text?: string;
60
+ marks?: {
61
+ type?: string;
62
+ attrs?: Record<string, any>;
63
+ }[];
64
+ }, {
65
+ type?: string;
66
+ attrs?: Record<string, any>;
67
+ text?: string;
68
+ marks?: {
69
+ type?: string;
70
+ attrs?: Record<string, any>;
71
+ }[];
72
+ }>, z.ZodObject<{
73
+ type: z.ZodString;
74
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
75
+ }, "strip", z.ZodTypeAny, {
76
+ type?: string;
77
+ attrs?: Record<string, any>;
78
+ }, {
79
+ type?: string;
80
+ attrs?: Record<string, any>;
81
+ }>]>, "many">>;
82
+ }>, "strip", z.ZodTypeAny, {
83
+ type?: string;
84
+ attrs?: Record<string, any>;
85
+ content?: ({
86
+ type?: string;
87
+ attrs?: Record<string, any>;
88
+ } | {
89
+ type?: string;
90
+ attrs?: Record<string, any>;
91
+ text?: string;
92
+ marks?: {
93
+ type?: string;
94
+ attrs?: Record<string, any>;
95
+ }[];
96
+ })[];
97
+ }, {
98
+ type?: string;
99
+ attrs?: Record<string, any>;
100
+ content?: ({
101
+ type?: string;
102
+ attrs?: Record<string, any>;
103
+ } | {
104
+ type?: string;
105
+ attrs?: Record<string, any>;
106
+ text?: string;
107
+ marks?: {
108
+ type?: string;
109
+ attrs?: Record<string, any>;
110
+ }[];
111
+ })[];
112
+ }>]>, "many">>;
113
+ }>, "strip", z.ZodTypeAny, {
114
+ type?: string;
115
+ attrs?: Record<string, any>;
116
+ content?: ({
117
+ type?: string;
118
+ attrs?: Record<string, any>;
119
+ text?: string;
120
+ marks?: {
121
+ type?: string;
122
+ attrs?: Record<string, any>;
123
+ }[];
124
+ } | {
125
+ type?: string;
126
+ attrs?: Record<string, any>;
127
+ content?: ({
128
+ type?: string;
129
+ attrs?: Record<string, any>;
130
+ } | {
131
+ type?: string;
132
+ attrs?: Record<string, any>;
133
+ text?: string;
134
+ marks?: {
135
+ type?: string;
136
+ attrs?: Record<string, any>;
137
+ }[];
138
+ })[];
139
+ })[];
140
+ }, {
141
+ type?: string;
142
+ attrs?: Record<string, any>;
143
+ content?: ({
144
+ type?: string;
145
+ attrs?: Record<string, any>;
146
+ text?: string;
147
+ marks?: {
148
+ type?: string;
149
+ attrs?: Record<string, any>;
150
+ }[];
151
+ } | {
152
+ type?: string;
153
+ attrs?: Record<string, any>;
154
+ content?: ({
155
+ type?: string;
156
+ attrs?: Record<string, any>;
157
+ } | {
158
+ type?: string;
159
+ attrs?: Record<string, any>;
160
+ text?: string;
161
+ marks?: {
162
+ type?: string;
163
+ attrs?: Record<string, any>;
164
+ }[];
165
+ })[];
166
+ })[];
167
+ }>;
168
+ export declare const TiptapSchema: z.ZodObject<{
169
+ type: z.ZodLiteral<"doc">;
170
+ content: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
171
+ type: z.ZodString;
172
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
173
+ }, {
174
+ content: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
175
+ type: z.ZodString;
176
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
177
+ }, {
178
+ text: z.ZodString;
179
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
180
+ type: z.ZodString;
181
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ type?: string;
184
+ attrs?: Record<string, any>;
185
+ }, {
186
+ type?: string;
187
+ attrs?: Record<string, any>;
188
+ }>, "many">>;
189
+ }>, "strip", z.ZodTypeAny, {
190
+ type?: string;
191
+ attrs?: Record<string, any>;
192
+ text?: string;
193
+ marks?: {
194
+ type?: string;
195
+ attrs?: Record<string, any>;
196
+ }[];
197
+ }, {
198
+ type?: string;
199
+ attrs?: Record<string, any>;
200
+ text?: string;
201
+ marks?: {
202
+ type?: string;
203
+ attrs?: Record<string, any>;
204
+ }[];
205
+ }>, z.ZodObject<z.objectUtil.extendShape<{
206
+ type: z.ZodString;
207
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
208
+ }, {
209
+ content: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
210
+ type: z.ZodString;
211
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
212
+ }, {
213
+ text: z.ZodString;
214
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
215
+ type: z.ZodString;
216
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ type?: string;
219
+ attrs?: Record<string, any>;
220
+ }, {
221
+ type?: string;
222
+ attrs?: Record<string, any>;
223
+ }>, "many">>;
224
+ }>, "strip", z.ZodTypeAny, {
225
+ type?: string;
226
+ attrs?: Record<string, any>;
227
+ text?: string;
228
+ marks?: {
229
+ type?: string;
230
+ attrs?: Record<string, any>;
231
+ }[];
232
+ }, {
233
+ type?: string;
234
+ attrs?: Record<string, any>;
235
+ text?: string;
236
+ marks?: {
237
+ type?: string;
238
+ attrs?: Record<string, any>;
239
+ }[];
240
+ }>, z.ZodObject<{
241
+ type: z.ZodString;
242
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
243
+ }, "strip", z.ZodTypeAny, {
244
+ type?: string;
245
+ attrs?: Record<string, any>;
246
+ }, {
247
+ type?: string;
248
+ attrs?: Record<string, any>;
249
+ }>]>, "many">>;
250
+ }>, "strip", z.ZodTypeAny, {
251
+ type?: string;
252
+ attrs?: Record<string, any>;
253
+ content?: ({
254
+ type?: string;
255
+ attrs?: Record<string, any>;
256
+ } | {
257
+ type?: string;
258
+ attrs?: Record<string, any>;
259
+ text?: string;
260
+ marks?: {
261
+ type?: string;
262
+ attrs?: Record<string, any>;
263
+ }[];
264
+ })[];
265
+ }, {
266
+ type?: string;
267
+ attrs?: Record<string, any>;
268
+ content?: ({
269
+ type?: string;
270
+ attrs?: Record<string, any>;
271
+ } | {
272
+ type?: string;
273
+ attrs?: Record<string, any>;
274
+ text?: string;
275
+ marks?: {
276
+ type?: string;
277
+ attrs?: Record<string, any>;
278
+ }[];
279
+ })[];
280
+ }>]>, "many">>;
281
+ }>, "strip", z.ZodTypeAny, {
282
+ type?: string;
283
+ attrs?: Record<string, any>;
284
+ content?: ({
285
+ type?: string;
286
+ attrs?: Record<string, any>;
287
+ text?: string;
288
+ marks?: {
289
+ type?: string;
290
+ attrs?: Record<string, any>;
291
+ }[];
292
+ } | {
293
+ type?: string;
294
+ attrs?: Record<string, any>;
295
+ content?: ({
296
+ type?: string;
297
+ attrs?: Record<string, any>;
298
+ } | {
299
+ type?: string;
300
+ attrs?: Record<string, any>;
301
+ text?: string;
302
+ marks?: {
303
+ type?: string;
304
+ attrs?: Record<string, any>;
305
+ }[];
306
+ })[];
307
+ })[];
308
+ }, {
309
+ type?: string;
310
+ attrs?: Record<string, any>;
311
+ content?: ({
312
+ type?: string;
313
+ attrs?: Record<string, any>;
314
+ text?: string;
315
+ marks?: {
316
+ type?: string;
317
+ attrs?: Record<string, any>;
318
+ }[];
319
+ } | {
320
+ type?: string;
321
+ attrs?: Record<string, any>;
322
+ content?: ({
323
+ type?: string;
324
+ attrs?: Record<string, any>;
325
+ } | {
326
+ type?: string;
327
+ attrs?: Record<string, any>;
328
+ text?: string;
329
+ marks?: {
330
+ type?: string;
331
+ attrs?: Record<string, any>;
332
+ }[];
333
+ })[];
334
+ })[];
335
+ }>, "many">;
336
+ }, "strip", z.ZodTypeAny, {
337
+ type?: "doc";
338
+ content?: {
339
+ type?: string;
340
+ attrs?: Record<string, any>;
341
+ content?: ({
342
+ type?: string;
343
+ attrs?: Record<string, any>;
344
+ text?: string;
345
+ marks?: {
346
+ type?: string;
347
+ attrs?: Record<string, any>;
348
+ }[];
349
+ } | {
350
+ type?: string;
351
+ attrs?: Record<string, any>;
352
+ content?: ({
353
+ type?: string;
354
+ attrs?: Record<string, any>;
355
+ } | {
356
+ type?: string;
357
+ attrs?: Record<string, any>;
358
+ text?: string;
359
+ marks?: {
360
+ type?: string;
361
+ attrs?: Record<string, any>;
362
+ }[];
363
+ })[];
364
+ })[];
365
+ }[];
366
+ }, {
367
+ type?: "doc";
368
+ content?: {
369
+ type?: string;
370
+ attrs?: Record<string, any>;
371
+ content?: ({
372
+ type?: string;
373
+ attrs?: Record<string, any>;
374
+ text?: string;
375
+ marks?: {
376
+ type?: string;
377
+ attrs?: Record<string, any>;
378
+ }[];
379
+ } | {
380
+ type?: string;
381
+ attrs?: Record<string, any>;
382
+ content?: ({
383
+ type?: string;
384
+ attrs?: Record<string, any>;
385
+ } | {
386
+ type?: string;
387
+ attrs?: Record<string, any>;
388
+ text?: string;
389
+ marks?: {
390
+ type?: string;
391
+ attrs?: Record<string, any>;
392
+ }[];
393
+ })[];
394
+ })[];
395
+ }[];
396
+ }>;
397
+ //# sourceMappingURL=tiptapSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tiptapSchema.d.ts","sourceRoot":"","sources":["../../../../../src/fields/TiptapEditor/lib/tiptapSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA8BvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAA;AAElD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGvB,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ const MarkSchema = z.object({
3
+ type: z.string(),
4
+ attrs: z.record(z.any()).optional()
5
+ });
6
+ const BaseNodeSchema = z.object({
7
+ type: z.string(),
8
+ attrs: z.record(z.any()).optional()
9
+ });
10
+ const TextNodeSchema = BaseNodeSchema.extend({
11
+ text: z.string(),
12
+ marks: z.array(MarkSchema).optional()
13
+ });
14
+ const ContentNodeSchema = BaseNodeSchema.extend({
15
+ content: z.array(z.union([
16
+ TextNodeSchema,
17
+ BaseNodeSchema.extend({
18
+ content: z.array(z.union([
19
+ TextNodeSchema,
20
+ BaseNodeSchema
21
+ ])).optional()
22
+ })
23
+ ])).optional()
24
+ });
25
+ export const JSONContentSchema = ContentNodeSchema;
26
+ export const TiptapSchema = z.object({
27
+ type: z.literal('doc'),
28
+ content: z.array(ContentNodeSchema)
29
+ });
30
+
31
+ //# sourceMappingURL=tiptapSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/fields/TiptapEditor/lib/tiptapSchema.ts"],"sourcesContent":["import { z } from 'zod'\n\nconst MarkSchema = z.object({\n type: z.string(),\n attrs: z.record(z.any()).optional(),\n})\n\nconst BaseNodeSchema = z.object({\n type: z.string(),\n attrs: z.record(z.any()).optional(),\n})\n\nconst TextNodeSchema = BaseNodeSchema.extend({\n text: z.string(),\n marks: z.array(MarkSchema).optional(),\n})\n\nconst ContentNodeSchema = BaseNodeSchema.extend({\n content: z\n .array(\n z.union([\n TextNodeSchema,\n BaseNodeSchema.extend({\n content: z.array(z.union([TextNodeSchema, BaseNodeSchema])).optional(),\n }),\n ]),\n )\n .optional(),\n})\n\nexport const JSONContentSchema = ContentNodeSchema\n\nexport const TiptapSchema = z.object({\n type: z.literal('doc'),\n content: z.array(ContentNodeSchema),\n})\n"],"names":["z","MarkSchema","object","type","string","attrs","record","any","optional","BaseNodeSchema","TextNodeSchema","extend","text","marks","array","ContentNodeSchema","content","union","JSONContentSchema","TiptapSchema","literal"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAK;AAEvB,MAAMC,aAAaD,EAAEE,MAAM,CAAC;IAC1BC,MAAMH,EAAEI,MAAM;IACdC,OAAOL,EAAEM,MAAM,CAACN,EAAEO,GAAG,IAAIC,QAAQ;AACnC;AAEA,MAAMC,iBAAiBT,EAAEE,MAAM,CAAC;IAC9BC,MAAMH,EAAEI,MAAM;IACdC,OAAOL,EAAEM,MAAM,CAACN,EAAEO,GAAG,IAAIC,QAAQ;AACnC;AAEA,MAAME,iBAAiBD,eAAeE,MAAM,CAAC;IAC3CC,MAAMZ,EAAEI,MAAM;IACdS,OAAOb,EAAEc,KAAK,CAACb,YAAYO,QAAQ;AACrC;AAEA,MAAMO,oBAAoBN,eAAeE,MAAM,CAAC;IAC9CK,SAAShB,EACNc,KAAK,CACJd,EAAEiB,KAAK,CAAC;QACNP;QACAD,eAAeE,MAAM,CAAC;YACpBK,SAAShB,EAAEc,KAAK,CAACd,EAAEiB,KAAK,CAAC;gBAACP;gBAAgBD;aAAe,GAAGD,QAAQ;QACtE;KACD,GAEFA,QAAQ;AACb;AAEA,OAAO,MAAMU,oBAAoBH,kBAAiB;AAElD,OAAO,MAAMI,eAAenB,EAAEE,MAAM,CAAC;IACnCC,MAAMH,EAAEoB,OAAO,CAAC;IAChBJ,SAAShB,EAAEc,KAAK,CAACC;AACnB,GAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/lib/utils/cssVar.ts"],"sourcesContent":["export const cssVar = (name: string, value?: string) => {\n let currentName = name\n if (name.substring(0, 2) !== '--') {\n currentName = `--${currentName}`\n }\n\n if (value) {\n document.documentElement.style.setProperty(currentName, value)\n }\n\n return getComputedStyle(document.body).getPropertyValue(currentName)\n}\n\nexport default cssVar\n"],"names":["cssVar","name","value","currentName","substring","document","documentElement","style","setProperty","getComputedStyle","body","getPropertyValue"],"mappings":"AAAA,OAAO,MAAMA,SAAS,CAACC,MAAcC;IACnC,IAAIC,cAAcF;IAClB,IAAIA,KAAKG,SAAS,CAAC,GAAG,OAAO,MAAM;QACjCD,cAAc,CAAC,EAAE,EAAEA,aAAa;IAClC;IAEA,IAAID,OAAO;QACTG,SAASC,eAAe,CAACC,KAAK,CAACC,WAAW,CAACL,aAAaD;IAC1D;IAEA,OAAOO,iBAAiBJ,SAASK,IAAI,EAAEC,gBAAgB,CAACR;AAC1D,EAAC;AAED,eAAeH,OAAM"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/lib/utils/cssVar.ts"],"sourcesContent":["export const cssVar = (name: string, value?: string) => {\n let currentName = name\n if (name.substring(0, 2) !== '--') {\n currentName = `--${currentName}`\n }\n\n if (value) {\n document.documentElement.style.setProperty(currentName, value)\n }\n\n return getComputedStyle(document.body).getPropertyValue(currentName)\n}\n\nexport default cssVar\n"],"names":["cssVar","name","value","currentName","substring","document","documentElement","style","setProperty","getComputedStyle","body","getPropertyValue"],"mappings":"AAAA,OAAO,MAAMA,SAAS,CAACC,MAAcC;IACnC,IAAIC,cAAcF;IAClB,IAAIA,KAAKG,SAAS,CAAC,GAAG,OAAO,MAAM;QACjCD,cAAc,CAAC,EAAE,EAAEA,YAAY,CAAC;IAClC;IAEA,IAAID,OAAO;QACTG,SAASC,eAAe,CAACC,KAAK,CAACC,WAAW,CAACL,aAAaD;IAC1D;IAEA,OAAOO,iBAAiBJ,SAASK,IAAI,EAAEC,gBAAgB,CAACR;AAC1D,EAAC;AAED,eAAeH,OAAM"}