ablok-components 0.3.33 → 0.3.34

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.
@@ -4,8 +4,216 @@ declare function __VLS_template(): {
4
4
  actions?(_: {}): any;
5
5
  };
6
6
  refs: {
7
- image: unknown;
8
- targetImage: unknown;
7
+ image: import('../../../../vue/dist/vue.esm-bundler.js').CreateComponentPublicInstanceWithMixins<Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
8
+ src: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ required: true;
12
+ };
13
+ alt: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ spinner: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ zoom: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ animate: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ ready: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ pending: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ emitPending: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ }>> & Readonly<{
42
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
43
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
44
+ }>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
45
+ "update:ready": (...args: any[]) => void;
46
+ "update:pending": (...args: any[]) => void;
47
+ }, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, {
48
+ animate: boolean;
49
+ src: string;
50
+ alt: string;
51
+ spinner: boolean;
52
+ zoom: boolean;
53
+ ready: boolean;
54
+ pending: boolean;
55
+ emitPending: boolean;
56
+ }, true, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').GlobalComponents, import('../../../../vue/dist/vue.esm-bundler.js').GlobalDirectives, string, {
57
+ image: HTMLImageElement;
58
+ }, any, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, {
59
+ P: {};
60
+ B: {};
61
+ D: {};
62
+ C: {};
63
+ M: {};
64
+ Defaults: {};
65
+ }, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
66
+ src: {
67
+ type: StringConstructor;
68
+ default: string;
69
+ required: true;
70
+ };
71
+ alt: {
72
+ type: StringConstructor;
73
+ default: string;
74
+ };
75
+ spinner: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ zoom: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ animate: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ ready: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ pending: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ emitPending: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ };
99
+ }>> & Readonly<{
100
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
101
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
102
+ }>, {}, {}, {}, {}, {
103
+ animate: boolean;
104
+ src: string;
105
+ alt: string;
106
+ spinner: boolean;
107
+ zoom: boolean;
108
+ ready: boolean;
109
+ pending: boolean;
110
+ emitPending: boolean;
111
+ }> | null;
112
+ targetImage: import('../../../../vue/dist/vue.esm-bundler.js').CreateComponentPublicInstanceWithMixins<Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
113
+ src: {
114
+ type: StringConstructor;
115
+ default: string;
116
+ required: true;
117
+ };
118
+ alt: {
119
+ type: StringConstructor;
120
+ default: string;
121
+ };
122
+ spinner: {
123
+ type: BooleanConstructor;
124
+ default: boolean;
125
+ };
126
+ zoom: {
127
+ type: BooleanConstructor;
128
+ default: boolean;
129
+ };
130
+ animate: {
131
+ type: BooleanConstructor;
132
+ default: boolean;
133
+ };
134
+ ready: {
135
+ type: BooleanConstructor;
136
+ default: boolean;
137
+ };
138
+ pending: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
142
+ emitPending: {
143
+ type: BooleanConstructor;
144
+ default: boolean;
145
+ };
146
+ }>> & Readonly<{
147
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
148
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
149
+ }>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
150
+ "update:ready": (...args: any[]) => void;
151
+ "update:pending": (...args: any[]) => void;
152
+ }, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, {
153
+ animate: boolean;
154
+ src: string;
155
+ alt: string;
156
+ spinner: boolean;
157
+ zoom: boolean;
158
+ ready: boolean;
159
+ pending: boolean;
160
+ emitPending: boolean;
161
+ }, true, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').GlobalComponents, import('../../../../vue/dist/vue.esm-bundler.js').GlobalDirectives, string, {
162
+ image: HTMLImageElement;
163
+ }, any, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, {
164
+ P: {};
165
+ B: {};
166
+ D: {};
167
+ C: {};
168
+ M: {};
169
+ Defaults: {};
170
+ }, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
171
+ src: {
172
+ type: StringConstructor;
173
+ default: string;
174
+ required: true;
175
+ };
176
+ alt: {
177
+ type: StringConstructor;
178
+ default: string;
179
+ };
180
+ spinner: {
181
+ type: BooleanConstructor;
182
+ default: boolean;
183
+ };
184
+ zoom: {
185
+ type: BooleanConstructor;
186
+ default: boolean;
187
+ };
188
+ animate: {
189
+ type: BooleanConstructor;
190
+ default: boolean;
191
+ };
192
+ ready: {
193
+ type: BooleanConstructor;
194
+ default: boolean;
195
+ };
196
+ pending: {
197
+ type: BooleanConstructor;
198
+ default: boolean;
199
+ };
200
+ emitPending: {
201
+ type: BooleanConstructor;
202
+ default: boolean;
203
+ };
204
+ }>> & Readonly<{
205
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
206
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
207
+ }>, {}, {}, {}, {}, {
208
+ animate: boolean;
209
+ src: string;
210
+ alt: string;
211
+ spinner: boolean;
212
+ zoom: boolean;
213
+ ready: boolean;
214
+ pending: boolean;
215
+ emitPending: boolean;
216
+ }> | null;
9
217
  };
10
218
  rootEl: any;
11
219
  };
@@ -47,8 +255,216 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
47
255
  ready: boolean;
48
256
  modelValue: string;
49
257
  }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {
50
- image: unknown;
51
- targetImage: unknown;
258
+ image: import('../../../../vue/dist/vue.esm-bundler.js').CreateComponentPublicInstanceWithMixins<Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
259
+ src: {
260
+ type: StringConstructor;
261
+ default: string;
262
+ required: true;
263
+ };
264
+ alt: {
265
+ type: StringConstructor;
266
+ default: string;
267
+ };
268
+ spinner: {
269
+ type: BooleanConstructor;
270
+ default: boolean;
271
+ };
272
+ zoom: {
273
+ type: BooleanConstructor;
274
+ default: boolean;
275
+ };
276
+ animate: {
277
+ type: BooleanConstructor;
278
+ default: boolean;
279
+ };
280
+ ready: {
281
+ type: BooleanConstructor;
282
+ default: boolean;
283
+ };
284
+ pending: {
285
+ type: BooleanConstructor;
286
+ default: boolean;
287
+ };
288
+ emitPending: {
289
+ type: BooleanConstructor;
290
+ default: boolean;
291
+ };
292
+ }>> & Readonly<{
293
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
294
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
295
+ }>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
296
+ "update:ready": (...args: any[]) => void;
297
+ "update:pending": (...args: any[]) => void;
298
+ }, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, {
299
+ animate: boolean;
300
+ src: string;
301
+ alt: string;
302
+ spinner: boolean;
303
+ zoom: boolean;
304
+ ready: boolean;
305
+ pending: boolean;
306
+ emitPending: boolean;
307
+ }, true, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').GlobalComponents, import('../../../../vue/dist/vue.esm-bundler.js').GlobalDirectives, string, {
308
+ image: HTMLImageElement;
309
+ }, any, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, {
310
+ P: {};
311
+ B: {};
312
+ D: {};
313
+ C: {};
314
+ M: {};
315
+ Defaults: {};
316
+ }, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
317
+ src: {
318
+ type: StringConstructor;
319
+ default: string;
320
+ required: true;
321
+ };
322
+ alt: {
323
+ type: StringConstructor;
324
+ default: string;
325
+ };
326
+ spinner: {
327
+ type: BooleanConstructor;
328
+ default: boolean;
329
+ };
330
+ zoom: {
331
+ type: BooleanConstructor;
332
+ default: boolean;
333
+ };
334
+ animate: {
335
+ type: BooleanConstructor;
336
+ default: boolean;
337
+ };
338
+ ready: {
339
+ type: BooleanConstructor;
340
+ default: boolean;
341
+ };
342
+ pending: {
343
+ type: BooleanConstructor;
344
+ default: boolean;
345
+ };
346
+ emitPending: {
347
+ type: BooleanConstructor;
348
+ default: boolean;
349
+ };
350
+ }>> & Readonly<{
351
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
352
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
353
+ }>, {}, {}, {}, {}, {
354
+ animate: boolean;
355
+ src: string;
356
+ alt: string;
357
+ spinner: boolean;
358
+ zoom: boolean;
359
+ ready: boolean;
360
+ pending: boolean;
361
+ emitPending: boolean;
362
+ }> | null;
363
+ targetImage: import('../../../../vue/dist/vue.esm-bundler.js').CreateComponentPublicInstanceWithMixins<Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
364
+ src: {
365
+ type: StringConstructor;
366
+ default: string;
367
+ required: true;
368
+ };
369
+ alt: {
370
+ type: StringConstructor;
371
+ default: string;
372
+ };
373
+ spinner: {
374
+ type: BooleanConstructor;
375
+ default: boolean;
376
+ };
377
+ zoom: {
378
+ type: BooleanConstructor;
379
+ default: boolean;
380
+ };
381
+ animate: {
382
+ type: BooleanConstructor;
383
+ default: boolean;
384
+ };
385
+ ready: {
386
+ type: BooleanConstructor;
387
+ default: boolean;
388
+ };
389
+ pending: {
390
+ type: BooleanConstructor;
391
+ default: boolean;
392
+ };
393
+ emitPending: {
394
+ type: BooleanConstructor;
395
+ default: boolean;
396
+ };
397
+ }>> & Readonly<{
398
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
399
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
400
+ }>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
401
+ "update:ready": (...args: any[]) => void;
402
+ "update:pending": (...args: any[]) => void;
403
+ }, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, {
404
+ animate: boolean;
405
+ src: string;
406
+ alt: string;
407
+ spinner: boolean;
408
+ zoom: boolean;
409
+ ready: boolean;
410
+ pending: boolean;
411
+ emitPending: boolean;
412
+ }, true, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').GlobalComponents, import('../../../../vue/dist/vue.esm-bundler.js').GlobalDirectives, string, {
413
+ image: HTMLImageElement;
414
+ }, any, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, {
415
+ P: {};
416
+ B: {};
417
+ D: {};
418
+ C: {};
419
+ M: {};
420
+ Defaults: {};
421
+ }, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
422
+ src: {
423
+ type: StringConstructor;
424
+ default: string;
425
+ required: true;
426
+ };
427
+ alt: {
428
+ type: StringConstructor;
429
+ default: string;
430
+ };
431
+ spinner: {
432
+ type: BooleanConstructor;
433
+ default: boolean;
434
+ };
435
+ zoom: {
436
+ type: BooleanConstructor;
437
+ default: boolean;
438
+ };
439
+ animate: {
440
+ type: BooleanConstructor;
441
+ default: boolean;
442
+ };
443
+ ready: {
444
+ type: BooleanConstructor;
445
+ default: boolean;
446
+ };
447
+ pending: {
448
+ type: BooleanConstructor;
449
+ default: boolean;
450
+ };
451
+ emitPending: {
452
+ type: BooleanConstructor;
453
+ default: boolean;
454
+ };
455
+ }>> & Readonly<{
456
+ "onUpdate:ready"?: ((...args: any[]) => any) | undefined;
457
+ "onUpdate:pending"?: ((...args: any[]) => any) | undefined;
458
+ }>, {}, {}, {}, {}, {
459
+ animate: boolean;
460
+ src: string;
461
+ alt: string;
462
+ spinner: boolean;
463
+ zoom: boolean;
464
+ ready: boolean;
465
+ pending: boolean;
466
+ emitPending: boolean;
467
+ }> | null;
52
468
  }, any>;
53
469
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
54
470
  export default _default;
@@ -214,8 +214,8 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
214
214
  enablePreview: boolean;
215
215
  previewWidth: number;
216
216
  dropFiles: boolean;
217
- maxImageWidth: number;
218
217
  enableReview: boolean;
218
+ maxImageWidth: number;
219
219
  }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, HTMLDivElement>;
220
220
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
221
221
  export default _default;
@@ -169,7 +169,7 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
169
169
  authToken: string;
170
170
  baseResponsePath: string;
171
171
  previewWidth: number;
172
- useImageUpload: boolean;
173
172
  maxImageWidth: number;
173
+ useImageUpload: boolean;
174
174
  }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, HTMLDivElement>;
175
175
  export default _default;
@@ -203,8 +203,8 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
203
203
  authToken: string;
204
204
  baseResponsePath: string;
205
205
  previewWidth: number;
206
- useImageUpload: boolean;
207
206
  maxImageWidth: number;
207
+ useImageUpload: boolean;
208
208
  mediaTypeMap: Record<string, any>;
209
209
  }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, HTMLDivElement>;
210
210
  export default _default;
@@ -82,9 +82,9 @@ declare const _default: __VLS_WithTemplateSlots<import('../../../../vue/dist/vue
82
82
  footer: boolean;
83
83
  title: string;
84
84
  modelValue: boolean;
85
- classes: string;
86
85
  modal: boolean;
87
86
  dismiss: boolean;
87
+ classes: string;
88
88
  }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {
89
89
  dialog: HTMLDialogElement;
90
90
  }, HTMLDialogElement>, {
@@ -0,0 +1,85 @@
1
+ import { d as o, aC as s, aB as l, aE as u } from "./index-Ki1Egcx9.mjs";
2
+ var d = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, h = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, g = o.create({
3
+ name: "highlight",
4
+ addOptions() {
5
+ return {
6
+ multicolor: !1,
7
+ HTMLAttributes: {}
8
+ };
9
+ },
10
+ addAttributes() {
11
+ return this.options.multicolor ? {
12
+ color: {
13
+ default: null,
14
+ parseHTML: (t) => t.getAttribute("data-color") || t.style.backgroundColor,
15
+ renderHTML: (t) => t.color ? {
16
+ "data-color": t.color,
17
+ style: `background-color: ${t.color}; color: inherit`
18
+ } : {}
19
+ }
20
+ } : {};
21
+ },
22
+ parseHTML() {
23
+ return [
24
+ {
25
+ tag: "mark"
26
+ }
27
+ ];
28
+ },
29
+ renderHTML({ HTMLAttributes: t }) {
30
+ return ["mark", u(this.options.HTMLAttributes, t), 0];
31
+ },
32
+ renderMarkdown: (t, r) => `==${r.renderChildren(t)}==`,
33
+ parseMarkdown: (t, r) => r.applyMark("highlight", r.parseInline(t.tokens || [])),
34
+ markdownTokenizer: {
35
+ name: "highlight",
36
+ level: "inline",
37
+ start: (t) => t.indexOf("=="),
38
+ tokenize(t, r, a) {
39
+ const e = /^(==)([^=]+)(==)/.exec(t);
40
+ if (e) {
41
+ const n = e[2].trim(), i = a.inlineTokens(n);
42
+ return {
43
+ type: "highlight",
44
+ raw: e[0],
45
+ text: n,
46
+ tokens: i
47
+ };
48
+ }
49
+ }
50
+ },
51
+ addCommands() {
52
+ return {
53
+ setHighlight: (t) => ({ commands: r }) => r.setMark(this.name, t),
54
+ toggleHighlight: (t) => ({ commands: r }) => r.toggleMark(this.name, t),
55
+ unsetHighlight: () => ({ commands: t }) => t.unsetMark(this.name)
56
+ };
57
+ },
58
+ addKeyboardShortcuts() {
59
+ return {
60
+ "Mod-Shift-h": () => this.editor.commands.toggleHighlight()
61
+ };
62
+ },
63
+ addInputRules() {
64
+ return [
65
+ l({
66
+ find: d,
67
+ type: this.type
68
+ })
69
+ ];
70
+ },
71
+ addPasteRules() {
72
+ return [
73
+ s({
74
+ find: h,
75
+ type: this.type
76
+ })
77
+ ];
78
+ }
79
+ }), p = g;
80
+ export {
81
+ g as Highlight,
82
+ p as default,
83
+ d as inputRegex,
84
+ h as pasteRegex
85
+ };
@@ -0,0 +1,47 @@
1
+ import { b as n } from "./index-Ki1Egcx9.mjs";
2
+ var s = n.create({
3
+ name: "textAlign",
4
+ addOptions() {
5
+ return {
6
+ types: [],
7
+ alignments: ["left", "center", "right", "justify"],
8
+ defaultAlignment: null
9
+ };
10
+ },
11
+ addGlobalAttributes() {
12
+ return [
13
+ {
14
+ types: this.options.types,
15
+ attributes: {
16
+ textAlign: {
17
+ default: this.options.defaultAlignment,
18
+ parseHTML: (t) => {
19
+ const e = t.style.textAlign;
20
+ return this.options.alignments.includes(e) ? e : this.options.defaultAlignment;
21
+ },
22
+ renderHTML: (t) => t.textAlign ? { style: `text-align: ${t.textAlign}` } : {}
23
+ }
24
+ }
25
+ }
26
+ ];
27
+ },
28
+ addCommands() {
29
+ return {
30
+ setTextAlign: (t) => ({ commands: e }) => this.options.alignments.includes(t) ? this.options.types.map((i) => e.updateAttributes(i, { textAlign: t })).some((i) => i) : !1,
31
+ unsetTextAlign: () => ({ commands: t }) => this.options.types.map((e) => t.resetAttributes(e, "textAlign")).some((e) => e),
32
+ toggleTextAlign: (t) => ({ editor: e, commands: i }) => this.options.alignments.includes(t) ? e.isActive({ textAlign: t }) ? i.unsetTextAlign() : i.setTextAlign(t) : !1
33
+ };
34
+ },
35
+ addKeyboardShortcuts() {
36
+ return {
37
+ "Mod-Shift-l": () => this.editor.commands.setTextAlign("left"),
38
+ "Mod-Shift-e": () => this.editor.commands.setTextAlign("center"),
39
+ "Mod-Shift-r": () => this.editor.commands.setTextAlign("right"),
40
+ "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
41
+ };
42
+ }
43
+ }), l = s;
44
+ export {
45
+ s as TextAlign,
46
+ l as default
47
+ };