ablok-photobooth 0.2.40 → 0.2.41
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/ablok-photobooth.js +1 -1
- package/dist/chunks/creative-booth.vue_vue_type_style_index_0_lang-BHKoShl5.js +248 -0
- package/dist/creative-booth.js +2 -2
- package/dist/types/components/creative-booth.vue.d.ts +39 -89
- package/package.json +4 -4
- package/dist/chunks/creative-booth.vue_vue_type_style_index_0_lang-BUDOTH0K.js +0 -210
package/dist/ablok-photobooth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as a } from "./chunks/photo-app.vue_vue_type_style_index_0_lang-CQsO0T0U.js";
|
|
2
2
|
import { _ as e } from "./chunks/fabric-canvas.vue_vue_type_style_index_0_lang-B-D65X2t.js";
|
|
3
|
-
import { _ as s } from "./chunks/creative-booth.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as s } from "./chunks/creative-booth.vue_vue_type_style_index_0_lang-BHKoShl5.js";
|
|
4
4
|
import { _ as m } from "./chunks/face-swap.vue_vue_type_style_index_0_lang-B0EJ4Q3T.js";
|
|
5
5
|
import { _ } from "./chunks/color-booth.vue_vue_type_style_index_0_lang-Cxo8ZMRt.js";
|
|
6
6
|
export {
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { defineComponent as x, ref as c, computed as l, watch as S, openBlock as u, createElementBlock as v, createElementVNode as h, createVNode as B, normalizeClass as M, createCommentVNode as b, createBlock as V } from "vue";
|
|
2
|
+
import w from "ablok-components/components/molecules/media-thumbnails/media-thumbnails.vue";
|
|
3
|
+
import { _ as A } from "./fabric-canvas.vue_vue_type_style_index_0_lang-B-D65X2t.js";
|
|
4
|
+
const C = { class: "creative-booth" }, D = { class: "media-container" }, O = ["innerHTML"], E = { class: "creative-booth__thumbnails" }, F = [
|
|
5
|
+
{
|
|
6
|
+
type: "background",
|
|
7
|
+
thumbnail: "/themes/corp/backgrounds/corporate-your-background-1024x1024.jpg",
|
|
8
|
+
src: "/themes/corp/backgrounds/corporate-your-background-1024x1024.jpg",
|
|
9
|
+
mediaType: "image",
|
|
10
|
+
filters: ["asset-01", "asset-02"]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: "background",
|
|
14
|
+
thumbnail: "/themes/corp/backgrounds/corp-background-09-white.jpg",
|
|
15
|
+
src: "/themes/corp/backgrounds/corp-background-09-white.jpg",
|
|
16
|
+
mediaType: "image",
|
|
17
|
+
filters: ["asset-01", "asset-02"]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "preset",
|
|
21
|
+
thumbnail: "/themes/corp/backgrounds/corporate-your-background-1024x1024.jpg",
|
|
22
|
+
filters: ["asset-01"],
|
|
23
|
+
items: {
|
|
24
|
+
background: {
|
|
25
|
+
type: "background",
|
|
26
|
+
src: "/themes/corp/backgrounds/corporate-your-background-1024x1024.jpg",
|
|
27
|
+
thumbnail: "/themes/corp/backgrounds/corporate-your-background-1024x1024.jpg",
|
|
28
|
+
mediaType: "image"
|
|
29
|
+
},
|
|
30
|
+
overlay: {
|
|
31
|
+
type: "overlay",
|
|
32
|
+
src: "/themes/corp/overlays/corporate-your-overlay-1024x1024.png",
|
|
33
|
+
thumbnail: "/themes/corp/overlays/corporate-your-overlay-1024x1024.png",
|
|
34
|
+
mediaType: "image"
|
|
35
|
+
},
|
|
36
|
+
object: {
|
|
37
|
+
type: "object",
|
|
38
|
+
src: "/themes/corp/stickers/corporate-your-sticker-512x512.svg",
|
|
39
|
+
thumbnail: "/themes/corp/stickers/corporate-your-sticker-512x512.svg",
|
|
40
|
+
mediaType: "svg"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "overlay",
|
|
46
|
+
src: "/themes/corp/overlays/corporate-your-overlay-1024x1024.png",
|
|
47
|
+
mediaType: "image",
|
|
48
|
+
filters: ["asset-01"]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: "overlay",
|
|
52
|
+
src: "/themes/corp/overlays/corp-overlay-02-white.png",
|
|
53
|
+
mediaType: "image",
|
|
54
|
+
filters: ["asset-01"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "object",
|
|
58
|
+
src: "/themes/corp/stickers/corporate-your-sticker-512x512.svg",
|
|
59
|
+
mediaType: "svg",
|
|
60
|
+
filters: ["asset-02"]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "object",
|
|
64
|
+
src: "/themes/corp/stickers/corp-sticker-01.svg",
|
|
65
|
+
mediaType: "svg"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: "object",
|
|
69
|
+
src: "/themes/corp/stickers/corp-sticker-02.svg",
|
|
70
|
+
mediaType: "svg",
|
|
71
|
+
filters: ["asset-01", "asset-02"]
|
|
72
|
+
}
|
|
73
|
+
], I = /* @__PURE__ */ x({
|
|
74
|
+
__name: "creative-booth",
|
|
75
|
+
props: {
|
|
76
|
+
modelValue: {
|
|
77
|
+
default: null
|
|
78
|
+
},
|
|
79
|
+
jsonModel: {
|
|
80
|
+
type: null,
|
|
81
|
+
default: void 0
|
|
82
|
+
},
|
|
83
|
+
config: {
|
|
84
|
+
type: Object,
|
|
85
|
+
default: null
|
|
86
|
+
},
|
|
87
|
+
feature: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: ""
|
|
90
|
+
},
|
|
91
|
+
required: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !1
|
|
94
|
+
},
|
|
95
|
+
variant: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "light"
|
|
98
|
+
},
|
|
99
|
+
messages: {
|
|
100
|
+
type: Object,
|
|
101
|
+
default: {}
|
|
102
|
+
},
|
|
103
|
+
assets: {
|
|
104
|
+
type: Array,
|
|
105
|
+
default: () => F
|
|
106
|
+
},
|
|
107
|
+
assetFilters: {
|
|
108
|
+
type: Array,
|
|
109
|
+
default: () => []
|
|
110
|
+
},
|
|
111
|
+
exportToSvg: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !1
|
|
114
|
+
},
|
|
115
|
+
resetState: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: !1
|
|
118
|
+
},
|
|
119
|
+
ratio: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: "4x3"
|
|
122
|
+
},
|
|
123
|
+
themeData: {
|
|
124
|
+
type: Object,
|
|
125
|
+
default: () => ({})
|
|
126
|
+
},
|
|
127
|
+
autoSelect: Number,
|
|
128
|
+
ready: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: !1
|
|
131
|
+
},
|
|
132
|
+
pending: {
|
|
133
|
+
type: Boolean,
|
|
134
|
+
default: !1
|
|
135
|
+
},
|
|
136
|
+
emitPending: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: !1
|
|
139
|
+
},
|
|
140
|
+
animationDuration: {
|
|
141
|
+
type: Number,
|
|
142
|
+
default: 320
|
|
143
|
+
},
|
|
144
|
+
stackedThumbnails: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: !1
|
|
147
|
+
},
|
|
148
|
+
showThumbnailCount: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
default: !1
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
emits: ["update:modelValue", "update:jsonModel", "update:ready", "update:pending"],
|
|
154
|
+
setup(a, { emit: k }) {
|
|
155
|
+
const s = a, o = k, n = c(), j = c(), d = c(!1), i = l(
|
|
156
|
+
() => s.assetFilters && s.assetFilters.length > 0 ? s.assets.filter((e) => !e.filters || e.filters.length == 0 || s.assetFilters.some((t) => e.filters.includes(t))) : s.assets
|
|
157
|
+
), p = l({
|
|
158
|
+
get() {
|
|
159
|
+
return s.modelValue;
|
|
160
|
+
},
|
|
161
|
+
set(e) {
|
|
162
|
+
o("update:modelValue", e);
|
|
163
|
+
}
|
|
164
|
+
}), m = l({
|
|
165
|
+
get() {
|
|
166
|
+
return s.jsonModel;
|
|
167
|
+
},
|
|
168
|
+
set(e) {
|
|
169
|
+
o("update:jsonModel", e);
|
|
170
|
+
}
|
|
171
|
+
}), y = l({
|
|
172
|
+
get() {
|
|
173
|
+
return s.pending;
|
|
174
|
+
},
|
|
175
|
+
set(e) {
|
|
176
|
+
s.ready && o("update:pending", e);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
S(j, async (e, t) => {
|
|
180
|
+
e && e !== t && o("update:modelValue", e);
|
|
181
|
+
}, { deep: !0 });
|
|
182
|
+
function g(e) {
|
|
183
|
+
switch (e.type) {
|
|
184
|
+
case "background":
|
|
185
|
+
n.value?.setBackgroundImage(e);
|
|
186
|
+
break;
|
|
187
|
+
case "overlay":
|
|
188
|
+
n.value?.setOverlayImage(e);
|
|
189
|
+
break;
|
|
190
|
+
default:
|
|
191
|
+
n.value?.addCanvasObject(e);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function f(e) {
|
|
195
|
+
if (typeof e < "u") {
|
|
196
|
+
const t = i.value[e];
|
|
197
|
+
t.type === "preset" ? Object.values(t.items).forEach(g) : g(t);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const T = (async () => {
|
|
201
|
+
if (d.value = !0, s.autoSelect !== void 0) {
|
|
202
|
+
const e = s.autoSelect >= 0 ? s.autoSelect : Math.floor(Math.random() * i.value.length);
|
|
203
|
+
f(e);
|
|
204
|
+
}
|
|
205
|
+
o("update:ready", !0);
|
|
206
|
+
});
|
|
207
|
+
return (e, t) => (u(), v("div", C, [
|
|
208
|
+
h("div", D, [
|
|
209
|
+
B(A, {
|
|
210
|
+
modelValue: p.value,
|
|
211
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => p.value = r),
|
|
212
|
+
"json-model": m.value,
|
|
213
|
+
"onUpdate:jsonModel": t[1] || (t[1] = (r) => m.value = r),
|
|
214
|
+
pending: y.value,
|
|
215
|
+
"onUpdate:pending": t[2] || (t[2] = (r) => y.value = r),
|
|
216
|
+
ref_key: "canvas",
|
|
217
|
+
ref: n,
|
|
218
|
+
"reset-state": a.resetState,
|
|
219
|
+
options: { themeData: a.themeData },
|
|
220
|
+
feature: a.feature,
|
|
221
|
+
required: a.required,
|
|
222
|
+
class: M(`${a.ratio ? `aspect-ratio aspect-ratio--${a.ratio}` : ""}`),
|
|
223
|
+
onOnReady: T,
|
|
224
|
+
"emit-pending": a.emitPending,
|
|
225
|
+
"animation-duration": a.animationDuration
|
|
226
|
+
}, null, 8, ["modelValue", "json-model", "pending", "reset-state", "options", "feature", "required", "class", "emit-pending", "animation-duration"])
|
|
227
|
+
]),
|
|
228
|
+
a.messages.headline ? (u(), v("p", {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: "headline",
|
|
231
|
+
innerHTML: a.messages.headline
|
|
232
|
+
}, null, 8, O)) : b("", !0),
|
|
233
|
+
h("div", E, [
|
|
234
|
+
d.value ? (u(), V(w, {
|
|
235
|
+
key: 0,
|
|
236
|
+
assets: i.value,
|
|
237
|
+
stacked: a.stackedThumbnails,
|
|
238
|
+
"show-count": a.showThumbnailCount,
|
|
239
|
+
onSelect: f
|
|
240
|
+
}, null, 8, ["assets", "stacked", "show-count"])) : b("", !0)
|
|
241
|
+
])
|
|
242
|
+
]));
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
export {
|
|
246
|
+
F as D,
|
|
247
|
+
I as _
|
|
248
|
+
};
|
package/dist/creative-booth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "./chunks/creative-booth.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { D as m } from "./chunks/creative-booth.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as o } from "./chunks/creative-booth.vue_vue_type_style_index_0_lang-BHKoShl5.js";
|
|
2
|
+
import { D as m } from "./chunks/creative-booth.vue_vue_type_style_index_0_lang-BHKoShl5.js";
|
|
3
3
|
export {
|
|
4
4
|
m as DEFAULT_ASSETS,
|
|
5
5
|
o as default
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export interface AssetItem {
|
|
3
|
+
type: 'background' | 'overlay' | 'object';
|
|
4
4
|
src: string;
|
|
5
|
-
mediaType:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
thumbnail?:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
filters?: undefined;
|
|
19
|
-
})[];
|
|
5
|
+
mediaType: 'image' | 'svg';
|
|
6
|
+
thumbnail?: string;
|
|
7
|
+
filters?: string[];
|
|
8
|
+
name?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PresetAsset {
|
|
11
|
+
type: 'preset';
|
|
12
|
+
thumbnail?: string;
|
|
13
|
+
filters?: string[];
|
|
14
|
+
items: Record<string, AssetItem>;
|
|
15
|
+
}
|
|
16
|
+
export type CreativeAsset = AssetItem | PresetAsset;
|
|
17
|
+
export declare const DEFAULT_ASSETS: CreativeAsset[];
|
|
20
18
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
21
19
|
modelValue: {
|
|
22
20
|
default: null;
|
|
@@ -46,41 +44,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
46
44
|
default: {};
|
|
47
45
|
};
|
|
48
46
|
assets: {
|
|
49
|
-
type:
|
|
50
|
-
|
|
51
|
-
(...items: any[]): any[];
|
|
52
|
-
new (arrayLength: number): any[];
|
|
53
|
-
new (...items: any[]): any[];
|
|
54
|
-
isArray(arg: any): arg is any[];
|
|
55
|
-
readonly prototype: any[];
|
|
56
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
57
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
58
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
59
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
60
|
-
of<T>(...items: T[]): T[];
|
|
61
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
62
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
63
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
64
|
-
};
|
|
65
|
-
default: () => ({
|
|
66
|
-
type: string;
|
|
67
|
-
thumbnail: string;
|
|
68
|
-
src: string;
|
|
69
|
-
mediaType: string;
|
|
70
|
-
filters: string[];
|
|
71
|
-
} | {
|
|
72
|
-
type: string;
|
|
73
|
-
src: string;
|
|
74
|
-
mediaType: string;
|
|
75
|
-
filters: string[];
|
|
76
|
-
thumbnail?: undefined;
|
|
77
|
-
} | {
|
|
78
|
-
type: string;
|
|
79
|
-
src: string;
|
|
80
|
-
mediaType: string;
|
|
81
|
-
thumbnail?: undefined;
|
|
82
|
-
filters?: undefined;
|
|
83
|
-
})[];
|
|
47
|
+
type: PropType<CreativeAsset[]>;
|
|
48
|
+
default: () => CreativeAsset[];
|
|
84
49
|
};
|
|
85
50
|
assetFilters: {
|
|
86
51
|
type: ArrayConstructor;
|
|
@@ -119,6 +84,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
119
84
|
type: NumberConstructor;
|
|
120
85
|
default: number;
|
|
121
86
|
};
|
|
87
|
+
stackedThumbnails: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
showThumbnailCount: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
122
95
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
123
96
|
"update:modelValue": (...args: any[]) => void;
|
|
124
97
|
"update:jsonModel": (...args: any[]) => void;
|
|
@@ -153,41 +126,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
153
126
|
default: {};
|
|
154
127
|
};
|
|
155
128
|
assets: {
|
|
156
|
-
type:
|
|
157
|
-
|
|
158
|
-
(...items: any[]): any[];
|
|
159
|
-
new (arrayLength: number): any[];
|
|
160
|
-
new (...items: any[]): any[];
|
|
161
|
-
isArray(arg: any): arg is any[];
|
|
162
|
-
readonly prototype: any[];
|
|
163
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
164
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
165
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
166
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
167
|
-
of<T>(...items: T[]): T[];
|
|
168
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
169
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
170
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
171
|
-
};
|
|
172
|
-
default: () => ({
|
|
173
|
-
type: string;
|
|
174
|
-
thumbnail: string;
|
|
175
|
-
src: string;
|
|
176
|
-
mediaType: string;
|
|
177
|
-
filters: string[];
|
|
178
|
-
} | {
|
|
179
|
-
type: string;
|
|
180
|
-
src: string;
|
|
181
|
-
mediaType: string;
|
|
182
|
-
filters: string[];
|
|
183
|
-
thumbnail?: undefined;
|
|
184
|
-
} | {
|
|
185
|
-
type: string;
|
|
186
|
-
src: string;
|
|
187
|
-
mediaType: string;
|
|
188
|
-
thumbnail?: undefined;
|
|
189
|
-
filters?: undefined;
|
|
190
|
-
})[];
|
|
129
|
+
type: PropType<CreativeAsset[]>;
|
|
130
|
+
default: () => CreativeAsset[];
|
|
191
131
|
};
|
|
192
132
|
assetFilters: {
|
|
193
133
|
type: ArrayConstructor;
|
|
@@ -226,6 +166,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
226
166
|
type: NumberConstructor;
|
|
227
167
|
default: number;
|
|
228
168
|
};
|
|
169
|
+
stackedThumbnails: {
|
|
170
|
+
type: BooleanConstructor;
|
|
171
|
+
default: boolean;
|
|
172
|
+
};
|
|
173
|
+
showThumbnailCount: {
|
|
174
|
+
type: BooleanConstructor;
|
|
175
|
+
default: boolean;
|
|
176
|
+
};
|
|
229
177
|
}>> & Readonly<{
|
|
230
178
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
231
179
|
"onUpdate:jsonModel"?: ((...args: any[]) => any) | undefined;
|
|
@@ -246,9 +194,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
246
194
|
animationDuration: number;
|
|
247
195
|
themeData: Record<string, any>;
|
|
248
196
|
config: Record<string, any>;
|
|
249
|
-
assets:
|
|
197
|
+
assets: CreativeAsset[];
|
|
250
198
|
assetFilters: unknown[];
|
|
251
199
|
ready: boolean;
|
|
200
|
+
stackedThumbnails: boolean;
|
|
201
|
+
showThumbnailCount: boolean;
|
|
252
202
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
253
203
|
canvas: ({
|
|
254
204
|
$: import('vue').ComponentInternalInstance;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ablok-photobooth",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.41",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@popperjs/core": "^2.11.6",
|
|
8
|
-
"ablok-components": "^0.3.
|
|
8
|
+
"ablok-components": "^0.3.68",
|
|
9
9
|
"bootstrap": "^5.3.8",
|
|
10
10
|
"fabric": "^7.1.0",
|
|
11
11
|
"lodash": "^4.17.23",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@types/lodash": "^4.17.23",
|
|
32
32
|
"@types/node": "^25.1.0",
|
|
33
33
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
34
|
+
"@vue/test-utils": "^2.4.10",
|
|
34
35
|
"histoire": "^1.0.0-beta.1",
|
|
35
36
|
"path": "^0.12.7",
|
|
36
37
|
"sass": "^1.97.3",
|
|
@@ -38,9 +39,8 @@
|
|
|
38
39
|
"vite": "^7.3.1",
|
|
39
40
|
"vite-plugin-dts": "^4.5.4",
|
|
40
41
|
"vite-plugin-mkcert": "^1.17.9",
|
|
41
|
-
"vue-tsc": "^3.2.4",
|
|
42
42
|
"vitest": "^4.1.5",
|
|
43
|
-
"
|
|
43
|
+
"vue-tsc": "^3.2.4"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"dist"
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, ref as d, computed as l, watch as T, openBlock as u, createElementBlock as g, createElementVNode as v, createVNode as M, normalizeClass as V, createCommentVNode as h, createBlock as B } from "vue";
|
|
2
|
-
import x from "ablok-components/components/molecules/media-thumbnails/media-thumbnails.vue";
|
|
3
|
-
import { _ as D } from "./fabric-canvas.vue_vue_type_style_index_0_lang-B-D65X2t.js";
|
|
4
|
-
const A = { class: "creative-booth" }, O = { class: "media-container" }, w = ["innerHTML"], C = { class: "creative-booth__thumbnails" }, F = [
|
|
5
|
-
{
|
|
6
|
-
type: "background",
|
|
7
|
-
thumbnail: "/themes/corp/backgrounds/corporate-your-background-1024x1024.jpg",
|
|
8
|
-
src: "/themes/corp/backgrounds/corporate-your-background-1024x1024.jpg",
|
|
9
|
-
mediaType: "image",
|
|
10
|
-
filters: ["asset-01", "asset-02"]
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
type: "background",
|
|
14
|
-
thumbnail: "/themes/corp/backgrounds/corp-background-09-white.jpg",
|
|
15
|
-
src: "/themes/corp/backgrounds/corp-background-09-white.jpg",
|
|
16
|
-
mediaType: "image",
|
|
17
|
-
filters: ["asset-01", "asset-02"]
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
type: "overlay",
|
|
21
|
-
src: "/themes/corp/overlays/corporate-your-overlay-1024x1024.png",
|
|
22
|
-
mediaType: "image",
|
|
23
|
-
filters: ["asset-01"]
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
type: "overlay",
|
|
27
|
-
src: "/themes/corp/overlays/corp-overlay-02-white.png",
|
|
28
|
-
mediaType: "image",
|
|
29
|
-
filters: ["asset-01"]
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: "object",
|
|
33
|
-
src: "/themes/corp/stickers/corporate-your-sticker-512x512.svg",
|
|
34
|
-
mediaType: "svg",
|
|
35
|
-
filters: ["asset-02"]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: "object",
|
|
39
|
-
src: "/themes/corp/stickers/corp-sticker-01.svg",
|
|
40
|
-
mediaType: "svg"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
type: "object",
|
|
44
|
-
src: "/themes/corp/stickers/corp-sticker-02.svg",
|
|
45
|
-
mediaType: "svg",
|
|
46
|
-
filters: ["asset-01", "asset-02"]
|
|
47
|
-
}
|
|
48
|
-
], U = /* @__PURE__ */ S({
|
|
49
|
-
__name: "creative-booth",
|
|
50
|
-
props: {
|
|
51
|
-
modelValue: {
|
|
52
|
-
default: null
|
|
53
|
-
},
|
|
54
|
-
jsonModel: {
|
|
55
|
-
type: null,
|
|
56
|
-
default: void 0
|
|
57
|
-
},
|
|
58
|
-
config: {
|
|
59
|
-
type: Object,
|
|
60
|
-
default: null
|
|
61
|
-
},
|
|
62
|
-
feature: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: ""
|
|
65
|
-
},
|
|
66
|
-
required: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: !1
|
|
69
|
-
},
|
|
70
|
-
variant: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: "light"
|
|
73
|
-
},
|
|
74
|
-
messages: {
|
|
75
|
-
type: Object,
|
|
76
|
-
default: {}
|
|
77
|
-
},
|
|
78
|
-
assets: {
|
|
79
|
-
type: Array,
|
|
80
|
-
default: () => F
|
|
81
|
-
},
|
|
82
|
-
assetFilters: {
|
|
83
|
-
type: Array,
|
|
84
|
-
default: () => []
|
|
85
|
-
},
|
|
86
|
-
exportToSvg: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: !1
|
|
89
|
-
},
|
|
90
|
-
resetState: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: !1
|
|
93
|
-
},
|
|
94
|
-
ratio: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: "4x3"
|
|
97
|
-
},
|
|
98
|
-
themeData: {
|
|
99
|
-
type: Object,
|
|
100
|
-
default: () => ({})
|
|
101
|
-
},
|
|
102
|
-
autoSelect: Number,
|
|
103
|
-
ready: {
|
|
104
|
-
type: Boolean,
|
|
105
|
-
default: !1
|
|
106
|
-
},
|
|
107
|
-
pending: {
|
|
108
|
-
type: Boolean,
|
|
109
|
-
default: !1
|
|
110
|
-
},
|
|
111
|
-
emitPending: {
|
|
112
|
-
type: Boolean,
|
|
113
|
-
default: !1
|
|
114
|
-
},
|
|
115
|
-
animationDuration: {
|
|
116
|
-
type: Number,
|
|
117
|
-
default: 320
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
emits: ["update:modelValue", "update:jsonModel", "update:ready", "update:pending"],
|
|
121
|
-
setup(s, { emit: b }) {
|
|
122
|
-
const a = s, o = b, r = d(), k = d(), c = d(!1), i = l(
|
|
123
|
-
() => a.assetFilters && a.assetFilters.length > 0 ? a.assets.filter((e) => !e.filters || e.filters.length == 0 || a.assetFilters.some((t) => e.filters.includes(t))) : a.assets
|
|
124
|
-
), m = l({
|
|
125
|
-
get() {
|
|
126
|
-
return a.modelValue;
|
|
127
|
-
},
|
|
128
|
-
set(e) {
|
|
129
|
-
o("update:modelValue", e);
|
|
130
|
-
}
|
|
131
|
-
}), p = l({
|
|
132
|
-
get() {
|
|
133
|
-
return a.jsonModel;
|
|
134
|
-
},
|
|
135
|
-
set(e) {
|
|
136
|
-
o("update:jsonModel", e);
|
|
137
|
-
}
|
|
138
|
-
}), f = l({
|
|
139
|
-
get() {
|
|
140
|
-
return a.pending;
|
|
141
|
-
},
|
|
142
|
-
set(e) {
|
|
143
|
-
a.ready && o("update:pending", e);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
T(k, async (e, t) => {
|
|
147
|
-
e && e !== t && o("update:modelValue", e);
|
|
148
|
-
}, { deep: !0 });
|
|
149
|
-
function y(e) {
|
|
150
|
-
if (typeof e < "u") {
|
|
151
|
-
const t = i.value[e];
|
|
152
|
-
switch (t.type) {
|
|
153
|
-
case "background":
|
|
154
|
-
r.value?.setBackgroundImage(t);
|
|
155
|
-
break;
|
|
156
|
-
case "overlay":
|
|
157
|
-
r.value.setOverlayImage(t);
|
|
158
|
-
break;
|
|
159
|
-
default:
|
|
160
|
-
r.value.addCanvasObject(t);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
const j = (async () => {
|
|
165
|
-
if (c.value = !0, a.autoSelect !== void 0) {
|
|
166
|
-
const e = a.autoSelect >= 0 ? a.autoSelect : Math.floor(Math.random() * i.value.length);
|
|
167
|
-
y(e);
|
|
168
|
-
}
|
|
169
|
-
o("update:ready", !0);
|
|
170
|
-
});
|
|
171
|
-
return (e, t) => (u(), g("div", A, [
|
|
172
|
-
v("div", O, [
|
|
173
|
-
M(D, {
|
|
174
|
-
modelValue: m.value,
|
|
175
|
-
"onUpdate:modelValue": t[0] || (t[0] = (n) => m.value = n),
|
|
176
|
-
"json-model": p.value,
|
|
177
|
-
"onUpdate:jsonModel": t[1] || (t[1] = (n) => p.value = n),
|
|
178
|
-
pending: f.value,
|
|
179
|
-
"onUpdate:pending": t[2] || (t[2] = (n) => f.value = n),
|
|
180
|
-
ref_key: "canvas",
|
|
181
|
-
ref: r,
|
|
182
|
-
"reset-state": s.resetState,
|
|
183
|
-
options: { themeData: s.themeData },
|
|
184
|
-
feature: s.feature,
|
|
185
|
-
required: s.required,
|
|
186
|
-
class: V(`${s.ratio ? `aspect-ratio aspect-ratio--${s.ratio}` : ""}`),
|
|
187
|
-
onOnReady: j,
|
|
188
|
-
"emit-pending": s.emitPending,
|
|
189
|
-
"animation-duration": s.animationDuration
|
|
190
|
-
}, null, 8, ["modelValue", "json-model", "pending", "reset-state", "options", "feature", "required", "class", "emit-pending", "animation-duration"])
|
|
191
|
-
]),
|
|
192
|
-
s.messages.headline ? (u(), g("p", {
|
|
193
|
-
key: 0,
|
|
194
|
-
class: "headline",
|
|
195
|
-
innerHTML: s.messages.headline
|
|
196
|
-
}, null, 8, w)) : h("", !0),
|
|
197
|
-
v("div", C, [
|
|
198
|
-
c.value ? (u(), B(x, {
|
|
199
|
-
key: 0,
|
|
200
|
-
assets: i.value,
|
|
201
|
-
onSelect: y
|
|
202
|
-
}, null, 8, ["assets"])) : h("", !0)
|
|
203
|
-
])
|
|
204
|
-
]));
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
export {
|
|
208
|
-
F as D,
|
|
209
|
-
U as _
|
|
210
|
-
};
|