zakeke-configurator-react 0.1.375 → 0.1.377

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 (27) hide show
  1. package/dist/declarations/composer/Module/src/api.d.ts +3 -3
  2. package/dist/declarations/composer/Module/src/components/debugs/debugPanel.d.ts +2 -2
  3. package/dist/declarations/composer/Module/src/components/sceneViewer.d.ts +5 -5
  4. package/dist/declarations/composer/Module/src/components/tryon/deepARQrCode.d.ts +6 -6
  5. package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnBanuba.d.ts +22 -22
  6. package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnDeepAR.d.ts +22 -22
  7. package/dist/declarations/composer/Module/src/environment.d.ts +444 -444
  8. package/dist/declarations/composer/Module/src/fontsManager.d.ts +75 -75
  9. package/dist/declarations/composer/Module/src/generated/feature-flags.d.ts +83 -83
  10. package/dist/declarations/composer/Module/src/helpers.d.ts +49 -49
  11. package/dist/declarations/composer/Module/src/hooks/tryonContext.d.ts +11 -11
  12. package/dist/declarations/composer/Module/src/imageUploadTask.d.ts +20 -20
  13. package/dist/declarations/composer/Module/src/index.d.ts +11 -11
  14. package/dist/declarations/composer/Module/src/integrations/preview.d.ts +17 -17
  15. package/dist/declarations/composer/Module/src/state/createProviderValue.d.ts +3 -3
  16. package/dist/declarations/composer/Module/src/state/provider.d.ts +18 -18
  17. package/dist/declarations/composer/Module/src/state/providerValue.d.ts +278 -278
  18. package/dist/declarations/composer/Module/src/state/state.d.ts +11 -11
  19. package/dist/declarations/libs/pricingRuleBase/DesignPriceCalculatorRuleBased.d.ts +83 -83
  20. package/dist/globals0.js +1 -1
  21. package/dist/globals1.js +1 -1
  22. package/dist/globals3.js +1 -1
  23. package/dist/index.js +111448 -111363
  24. package/dist/index.js.LICENSE.txt +65 -0
  25. package/dist/index.js.map +1 -1
  26. package/package.json +1 -1
  27. /package/dist/declarations/composer/Module/src/integrations/{Helpers.d.ts → helpers.d.ts} +0 -0
@@ -1,278 +1,278 @@
1
- /**
2
- * @module Zakeke
3
- */
4
- import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
5
- import { EventMessage, FontFamily, Group, Item, OnBeforeSendDataToParent, PrintingMethodsRestrictions, Product, SceneAnimationsConfig, Settings, Template, TemplateMacroCategory, TextSanitationResult, UIConfig, VisibleEventMessage } from '..';
6
- import { Camera, ImageMacroCategory, ProductQuantityRule, SellerSettings, TemplateUploadRestrictions, ZakekeImage, AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult, AIVirtualModelRule } from '../models';
7
- interface RestrictionColor {
8
- colorCode: string;
9
- isDefault: boolean;
10
- }
11
- interface CustomPreviewSize {
12
- customCartPreviewWidth: number;
13
- customCartPreviewHeight: number;
14
- }
15
- interface ThemeCompositions {
16
- name: string;
17
- docID: string;
18
- previewImageUrl: string;
19
- tags: string[];
20
- }
21
- export type { AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult };
22
- /**
23
- * Contains all the data and methods to control a Zakeke configuration
24
- */
25
- export interface Zakeke {
26
- /**
27
- * @internal
28
- */
29
- internalProduct: MPlaza.Model | null;
30
- /**
31
- * @internal
32
- */
33
- internalScene: Zakeke.Scene | null;
34
- /**
35
- * @internal
36
- */
37
- internalCurrentTemplate: MPlaza.Design | null | undefined;
38
- userSettings: Settings | null;
39
- /**
40
- * The current price of the configuration plus the product price
41
- */
42
- price: number;
43
- isOutOfStock: boolean;
44
- culture: string;
45
- currency: string;
46
- isSceneLoading: boolean;
47
- isAddToCartLoading: boolean;
48
- isInfoPointContentVisible: boolean;
49
- imagesMacroCategories: ImageMacroCategory[];
50
- isViewerReady: boolean;
51
- fonts: FontFamily[];
52
- defaultFontID: number | null;
53
- disableTextColors: boolean;
54
- defaultColor: string;
55
- textColors: RestrictionColor[];
56
- groups: Group[];
57
- templates: Template[];
58
- loadedComposition: {
59
- templateName: string;
60
- attributesOptions: Map<number, number>;
61
- selectedCategoryID: number | null;
62
- } | null;
63
- currentTemplate: Template | null;
64
- items: Item[];
65
- productName: string;
66
- productCode: string;
67
- product: Product | null;
68
- isCompositionSaving: boolean;
69
- cameras: Camera[];
70
- sellerSettings: SellerSettings | null;
71
- quantityRule: ProductQuantityRule | null;
72
- eventMessages: EventMessage[] | null;
73
- personalizedMessages: EventMessage[] | null;
74
- visibleEventMessages: VisibleEventMessage[];
75
- isAssetsLoading: boolean;
76
- draftCompositions: ThemeCompositions[] | null;
77
- additionalCustomProperties: {
78
- name: string;
79
- value: number;
80
- label: string;
81
- formatString: string;
82
- }[] | null;
83
- currentAttributesSelection: object | null;
84
- currentCompositionInfo: {
85
- compositionId: string | null;
86
- compositionName: string | null;
87
- compositionTags: string[] | null;
88
- } | null;
89
- useLegacyScreenshot: boolean;
90
- isAIEnabled: boolean;
91
- uiConfig: UIConfig | null;
92
- animationsConfig: SceneAnimationsConfig | null;
93
- backgroundColor: string;
94
- removeBackground: boolean;
95
- deepARsceneGLBUrl: string | null;
96
- shouldLoadDesign: boolean | null;
97
- getDeepARDesktopIframeUrl: () => Promise<string>;
98
- setMouseWheelZoomEnabled: (enabled: boolean) => void;
99
- setCameraPinchingZoom: (toggle: boolean) => void;
100
- selectOption: (optionId: number) => void;
101
- /**
102
- * @internal
103
- */
104
- internalAppendViewer: (container: HTMLElement) => void;
105
- getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
106
- designUpdate: () => void;
107
- createQuote: (formData: any) => Promise<any>;
108
- setTemplate: (templateId: number) => Promise<void>;
109
- isAreaVisible: (areaId: number) => boolean;
110
- quantity: number;
111
- saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>, save2Ddesign?: boolean) => Promise<void>;
112
- addToCart: (additionalProperties: Record<string, any>, OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>, legacyScreenshot?: boolean, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
113
- /**
114
- * Create a PDF of the current configuration
115
- * @returns The URL of the PDF
116
- */
117
- getPDF: () => Promise<string>;
118
- getOnlineScreenshot: (width: number, height: number, legacyScreenshot?: boolean, backgroundColor?: string, padding?: number) => Promise<{
119
- originalUrl: string;
120
- rewrittenUrl: string;
121
- }>;
122
- setCamera: (id: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
123
- setCameraByName: (name: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
124
- setCameraZoomEnabled: (enabled: boolean) => void;
125
- resetCameraPivot: () => void;
126
- setCameraPivot: (meshId: string) => void;
127
- fullyLoadFont: (fontFamily: string | FontFamily) => Promise<FontFamily>;
128
- sanitizeString: (family: FontFamily, text: string) => string;
129
- getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
130
- getImages: (categoryId: number) => Promise<ZakekeImage[]>;
131
- getMacroCategories: () => Promise<ImageMacroCategory[]>;
132
- previewOnly__setItemImageFromBase64: (guid: string, base64: string) => void;
133
- setItemImageFromFile: (guid: string, file: File) => Promise<void>;
134
- addItemImage: (id: number, areaId: number) => Promise<string | null | undefined>;
135
- setItemSize: (guid: string, width: number, height: number) => Promise<void>;
136
- setItemConstraints: (guid: string, constraints: {
137
- canMove?: boolean;
138
- canRotate?: boolean;
139
- canResize?: boolean;
140
- canDelete?: boolean;
141
- }) => void;
142
- /**
143
- * Upload an image and get the uploaded image
144
- * @param file The file to upload
145
- * @param progress A callback to get the upload progress
146
- * @returns The uploaded image
147
- */
148
- createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
149
- createImageFromUrl: (url: string) => Promise<ZakekeImage>;
150
- setItemImage: (guid: string, imageId: number) => Promise<void>;
151
- setItemFontFamily: (guid: string, fontFamily: string) => void;
152
- setItemColor: (guid: string, color: string) => void;
153
- setItemBold: (guid: string, bold: boolean, fontFamily: FontFamily) => void;
154
- setItemItalic: (guid: string, italic: boolean, fontFamily: FontFamily) => void;
155
- setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
156
- setItemText: (guid: string, text: string) => string;
157
- addItemText: (settings: {
158
- text: string;
159
- fontFamily: string;
160
- }, areaId: number) => Promise<void>;
161
- /**
162
- * Remove an item from the customization
163
- * @param guid The guid of the item to remove
164
- */
165
- removeItem: (guid: string) => Promise<void>;
166
- setQuantity: (quantity: number) => void;
167
- getShareCompositionUrl: () => Promise<string>;
168
- saveComposition: (customPreviewSize?: CustomPreviewSize, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
169
- loadComposition: (id: string) => Promise<void>;
170
- switchFullscreen: () => void;
171
- openSecondScreen: () => void;
172
- isFullscreenMode: boolean;
173
- zoomIn: () => void;
174
- zoomOut: () => void;
175
- updateView: (adjustCamera?: boolean) => void;
176
- stopAllAnimations: () => void;
177
- hasAnimations: () => boolean;
178
- playAnimations: () => void;
179
- setHighlightSettings: (settings: {
180
- color: string;
181
- size: number;
182
- }) => void;
183
- hasExplodedMode: () => boolean;
184
- isExplodedMode: boolean;
185
- setExplodedMode: (exploded: boolean) => void;
186
- getMeshIDbyName: (name: string) => string | undefined | null;
187
- hideMeshAndSaveState: (meshId: string) => void;
188
- restoreMeshVisibility: (meshId: string) => void;
189
- setMeshDesignVisibility: (meshId: string, visible: boolean) => void;
190
- clearListeners: () => void;
191
- addFocusAttributesListener: (listenerFunction: FocusAttributesEventListener) => void;
192
- focusAttribute: (attributeId: number) => void;
193
- highlightGroup: (groupId: number) => void;
194
- highlightAttribute: (attributeId: number) => void;
195
- getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
196
- getMobileArUrl: () => Promise<Blob | string | null>;
197
- openArMobile: (url: string) => void;
198
- isSceneArEnabled: () => boolean;
199
- isArDeviceCompliant: () => boolean;
200
- IS_ANDROID: boolean;
201
- IS_IOS: boolean;
202
- setBackgroundColor: (color: string, alpha: number) => void;
203
- getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
204
- isSceneTryOnEnabled: () => boolean;
205
- setCameraLocked: (isBlocked: boolean) => void;
206
- getTemplateUploadRestrictions: (areaId: number) => TemplateUploadRestrictions;
207
- saveDraftsComposition: (name: string, tags: string[], isCopy?: boolean) => Promise<void>;
208
- loadSavedComposition: (docID: string) => Promise<void>;
209
- deleteSavedComposition: (docId: string) => Promise<void>;
210
- exportSceneToGlb: () => Promise<string | Blob | null>;
211
- reset: () => Promise<void>;
212
- undo: () => Promise<void>;
213
- redo: () => Promise<void>;
214
- getCopyrightMessageAccepted: () => boolean;
215
- setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
216
- templateMacroCategories: TemplateMacroCategory[] | null;
217
- applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
218
- configureByAI: (text: string) => Promise<void>;
219
- isAIStudioShoppingPreviewEnabled: boolean;
220
- isAIStudioEnabled: boolean;
221
- isAiEditorEnabled: boolean;
222
- isAiProductStagingEnabled: boolean;
223
- isAiVtoEnabled: boolean;
224
- startAIStudio: () => Promise<void>;
225
- getAIPresetCategories: (presetType: string) => Promise<AIPresetCategory[]>;
226
- getAIPresetPresets: (presetType: string) => Promise<AIPreset[]>;
227
- getApplicableAIStagingRules: (options: {
228
- productID?: number;
229
- printTypeID?: number;
230
- }) => Promise<AIProductStagingRule | null>;
231
- getApplicableAIVirtualModelRules: (options: {
232
- productID?: number;
233
- printTypeID?: number;
234
- }) => Promise<AIVirtualModelRule | null>;
235
- generateAIProductStaging: (options: AIProductStagingOptions) => Promise<AIProductStagingResult>;
236
- generateAIVirtualTryon: (options: AIVirtualTryOnOptions) => Promise<AIVirtualTryOnResult>;
237
- hasVTryOnEnabled: boolean;
238
- canUseTryOn: boolean;
239
- canUsePD: boolean;
240
- getTryOnSettings: () => Zakeke.TryOnSettings | undefined;
241
- isTryOnMeshVisible: boolean;
242
- isMandatoryPD: boolean;
243
- isVisibleMeshShownForTryOn: boolean;
244
- setPDDistance: (distance: number) => void;
245
- pdDistance: () => number;
246
- exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
247
- moveItemUp: (itemGuid: string) => void;
248
- moveItemDown: (itemGuid: string) => void;
249
- getPrintingMethods: () => Array<{
250
- printMethodId: number;
251
- name: string;
252
- }>;
253
- setPrintingMethod: (printingMethodId: number, areaId: number) => void;
254
- getFontWeights: (font: FontFamily) => {
255
- normal: boolean;
256
- bold: boolean;
257
- italic: boolean;
258
- italicBold: boolean;
259
- normalWeight: number;
260
- boldWeight: number;
261
- italicWeight: number;
262
- italicBoldWeight: number;
263
- };
264
- checkFontSupports: (fontName: string, needsBold: boolean, needsItalic: boolean) => {
265
- canKeepStyles: boolean;
266
- supportsBold: boolean;
267
- supportsItalic: boolean;
268
- };
269
- T_static: (str: string) => string;
270
- T_dynamic: (str: string) => string;
271
- areTranslationsLoaded: boolean;
272
- /**
273
- * Forces a resize of the 3D viewer canvas to match its container.
274
- * Call this after all UI components have finished rendering to fix
275
- * canvas buffer/display size mismatches caused by layout reflows.
276
- */
277
- forceViewerResize: () => void;
278
- }
1
+ /**
2
+ * @module Zakeke
3
+ */
4
+ import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
5
+ import { EventMessage, FontFamily, Group, Item, OnBeforeSendDataToParent, PrintingMethodsRestrictions, Product, SceneAnimationsConfig, Settings, Template, TemplateMacroCategory, TextSanitationResult, UIConfig, VisibleEventMessage } from '..';
6
+ import { Camera, ImageMacroCategory, ProductQuantityRule, SellerSettings, TemplateUploadRestrictions, ZakekeImage, AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult, AIVirtualModelRule } from '../models';
7
+ interface RestrictionColor {
8
+ colorCode: string;
9
+ isDefault: boolean;
10
+ }
11
+ interface CustomPreviewSize {
12
+ customCartPreviewWidth: number;
13
+ customCartPreviewHeight: number;
14
+ }
15
+ interface ThemeCompositions {
16
+ name: string;
17
+ docID: string;
18
+ previewImageUrl: string;
19
+ tags: string[];
20
+ }
21
+ export type { AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult };
22
+ /**
23
+ * Contains all the data and methods to control a Zakeke configuration
24
+ */
25
+ export interface Zakeke {
26
+ /**
27
+ * @internal
28
+ */
29
+ internalProduct: MPlaza.Model | null;
30
+ /**
31
+ * @internal
32
+ */
33
+ internalScene: Zakeke.Scene | null;
34
+ /**
35
+ * @internal
36
+ */
37
+ internalCurrentTemplate: MPlaza.Design | null | undefined;
38
+ userSettings: Settings | null;
39
+ /**
40
+ * The current price of the configuration plus the product price
41
+ */
42
+ price: number;
43
+ isOutOfStock: boolean;
44
+ culture: string;
45
+ currency: string;
46
+ isSceneLoading: boolean;
47
+ isAddToCartLoading: boolean;
48
+ isInfoPointContentVisible: boolean;
49
+ imagesMacroCategories: ImageMacroCategory[];
50
+ isViewerReady: boolean;
51
+ fonts: FontFamily[];
52
+ defaultFontID: number | null;
53
+ disableTextColors: boolean;
54
+ defaultColor: string;
55
+ textColors: RestrictionColor[];
56
+ groups: Group[];
57
+ templates: Template[];
58
+ loadedComposition: {
59
+ templateName: string;
60
+ attributesOptions: Map<number, number>;
61
+ selectedCategoryID: number | null;
62
+ } | null;
63
+ currentTemplate: Template | null;
64
+ items: Item[];
65
+ productName: string;
66
+ productCode: string;
67
+ product: Product | null;
68
+ isCompositionSaving: boolean;
69
+ cameras: Camera[];
70
+ sellerSettings: SellerSettings | null;
71
+ quantityRule: ProductQuantityRule | null;
72
+ eventMessages: EventMessage[] | null;
73
+ personalizedMessages: EventMessage[] | null;
74
+ visibleEventMessages: VisibleEventMessage[];
75
+ isAssetsLoading: boolean;
76
+ draftCompositions: ThemeCompositions[] | null;
77
+ additionalCustomProperties: {
78
+ name: string;
79
+ value: number;
80
+ label: string;
81
+ formatString: string;
82
+ }[] | null;
83
+ currentAttributesSelection: object | null;
84
+ currentCompositionInfo: {
85
+ compositionId: string | null;
86
+ compositionName: string | null;
87
+ compositionTags: string[] | null;
88
+ } | null;
89
+ useLegacyScreenshot: boolean;
90
+ isAIEnabled: boolean;
91
+ uiConfig: UIConfig | null;
92
+ animationsConfig: SceneAnimationsConfig | null;
93
+ backgroundColor: string;
94
+ removeBackground: boolean;
95
+ deepARsceneGLBUrl: string | null;
96
+ shouldLoadDesign: boolean | null;
97
+ getDeepARDesktopIframeUrl: () => Promise<string>;
98
+ setMouseWheelZoomEnabled: (enabled: boolean) => void;
99
+ setCameraPinchingZoom: (toggle: boolean) => void;
100
+ selectOption: (optionId: number) => void;
101
+ /**
102
+ * @internal
103
+ */
104
+ internalAppendViewer: (container: HTMLElement) => void;
105
+ getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
106
+ designUpdate: () => void;
107
+ createQuote: (formData: any) => Promise<any>;
108
+ setTemplate: (templateId: number) => Promise<void>;
109
+ isAreaVisible: (areaId: number) => boolean;
110
+ quantity: number;
111
+ saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>, save2Ddesign?: boolean) => Promise<void>;
112
+ addToCart: (additionalProperties: Record<string, any>, OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>, legacyScreenshot?: boolean, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
113
+ /**
114
+ * Create a PDF of the current configuration
115
+ * @returns The URL of the PDF
116
+ */
117
+ getPDF: () => Promise<string>;
118
+ getOnlineScreenshot: (width: number, height: number, legacyScreenshot?: boolean, backgroundColor?: string, padding?: number) => Promise<{
119
+ originalUrl: string;
120
+ rewrittenUrl: string;
121
+ }>;
122
+ setCamera: (id: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
123
+ setCameraByName: (name: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
124
+ setCameraZoomEnabled: (enabled: boolean) => void;
125
+ resetCameraPivot: () => void;
126
+ setCameraPivot: (meshId: string) => void;
127
+ fullyLoadFont: (fontFamily: string | FontFamily) => Promise<FontFamily>;
128
+ sanitizeString: (family: FontFamily, text: string) => string;
129
+ getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
130
+ getImages: (categoryId: number) => Promise<ZakekeImage[]>;
131
+ getMacroCategories: () => Promise<ImageMacroCategory[]>;
132
+ previewOnly__setItemImageFromBase64: (guid: string, base64: string) => void;
133
+ setItemImageFromFile: (guid: string, file: File) => Promise<void>;
134
+ addItemImage: (id: number, areaId: number) => Promise<string | null | undefined>;
135
+ setItemSize: (guid: string, width: number, height: number) => Promise<void>;
136
+ setItemConstraints: (guid: string, constraints: {
137
+ canMove?: boolean;
138
+ canRotate?: boolean;
139
+ canResize?: boolean;
140
+ canDelete?: boolean;
141
+ }) => void;
142
+ /**
143
+ * Upload an image and get the uploaded image
144
+ * @param file The file to upload
145
+ * @param progress A callback to get the upload progress
146
+ * @returns The uploaded image
147
+ */
148
+ createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
149
+ createImageFromUrl: (url: string) => Promise<ZakekeImage>;
150
+ setItemImage: (guid: string, imageId: number) => Promise<void>;
151
+ setItemFontFamily: (guid: string, fontFamily: string) => void;
152
+ setItemColor: (guid: string, color: string) => void;
153
+ setItemBold: (guid: string, bold: boolean, fontFamily: FontFamily) => void;
154
+ setItemItalic: (guid: string, italic: boolean, fontFamily: FontFamily) => void;
155
+ setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
156
+ setItemText: (guid: string, text: string) => string;
157
+ addItemText: (settings: {
158
+ text: string;
159
+ fontFamily: string;
160
+ }, areaId: number) => Promise<void>;
161
+ /**
162
+ * Remove an item from the customization
163
+ * @param guid The guid of the item to remove
164
+ */
165
+ removeItem: (guid: string) => Promise<void>;
166
+ setQuantity: (quantity: number) => void;
167
+ getShareCompositionUrl: () => Promise<string>;
168
+ saveComposition: (customPreviewSize?: CustomPreviewSize, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
169
+ loadComposition: (id: string) => Promise<void>;
170
+ switchFullscreen: () => void;
171
+ openSecondScreen: () => void;
172
+ isFullscreenMode: boolean;
173
+ zoomIn: () => void;
174
+ zoomOut: () => void;
175
+ updateView: (adjustCamera?: boolean) => void;
176
+ stopAllAnimations: () => void;
177
+ hasAnimations: () => boolean;
178
+ playAnimations: () => void;
179
+ setHighlightSettings: (settings: {
180
+ color: string;
181
+ size: number;
182
+ }) => void;
183
+ hasExplodedMode: () => boolean;
184
+ isExplodedMode: boolean;
185
+ setExplodedMode: (exploded: boolean) => void;
186
+ getMeshIDbyName: (name: string) => string | undefined | null;
187
+ hideMeshAndSaveState: (meshId: string) => void;
188
+ restoreMeshVisibility: (meshId: string) => void;
189
+ setMeshDesignVisibility: (meshId: string, visible: boolean) => void;
190
+ clearListeners: () => void;
191
+ addFocusAttributesListener: (listenerFunction: FocusAttributesEventListener) => void;
192
+ focusAttribute: (attributeId: number) => void;
193
+ highlightGroup: (groupId: number) => void;
194
+ highlightAttribute: (attributeId: number) => void;
195
+ getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
196
+ getMobileArUrl: () => Promise<Blob | string | null>;
197
+ openArMobile: (url: string) => void;
198
+ isSceneArEnabled: () => boolean;
199
+ isArDeviceCompliant: () => boolean;
200
+ IS_ANDROID: boolean;
201
+ IS_IOS: boolean;
202
+ setBackgroundColor: (color: string, alpha: number) => void;
203
+ getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
204
+ isSceneTryOnEnabled: () => boolean;
205
+ setCameraLocked: (isBlocked: boolean) => void;
206
+ getTemplateUploadRestrictions: (areaId: number) => TemplateUploadRestrictions;
207
+ saveDraftsComposition: (name: string, tags: string[], isCopy?: boolean) => Promise<void>;
208
+ loadSavedComposition: (docID: string) => Promise<void>;
209
+ deleteSavedComposition: (docId: string) => Promise<void>;
210
+ exportSceneToGlb: () => Promise<string | Blob | null>;
211
+ reset: () => Promise<void>;
212
+ undo: () => Promise<void>;
213
+ redo: () => Promise<void>;
214
+ getCopyrightMessageAccepted: () => boolean;
215
+ setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
216
+ templateMacroCategories: TemplateMacroCategory[] | null;
217
+ applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
218
+ configureByAI: (text: string) => Promise<void>;
219
+ isAIStudioShoppingPreviewEnabled: boolean;
220
+ isAIStudioEnabled: boolean;
221
+ isAiEditorEnabled: boolean;
222
+ isAiProductStagingEnabled: boolean;
223
+ isAiVtoEnabled: boolean;
224
+ startAIStudio: () => Promise<void>;
225
+ getAIPresetCategories: (presetType: string) => Promise<AIPresetCategory[]>;
226
+ getAIPresetPresets: (presetType: string) => Promise<AIPreset[]>;
227
+ getApplicableAIStagingRules: (options: {
228
+ productID?: number;
229
+ printTypeID?: number;
230
+ }) => Promise<AIProductStagingRule | null>;
231
+ getApplicableAIVirtualModelRules: (options: {
232
+ productID?: number;
233
+ printTypeID?: number;
234
+ }) => Promise<AIVirtualModelRule | null>;
235
+ generateAIProductStaging: (options: AIProductStagingOptions) => Promise<AIProductStagingResult>;
236
+ generateAIVirtualTryon: (options: AIVirtualTryOnOptions) => Promise<AIVirtualTryOnResult>;
237
+ hasVTryOnEnabled: boolean;
238
+ canUseTryOn: boolean;
239
+ canUsePD: boolean;
240
+ getTryOnSettings: () => Zakeke.TryOnSettings | undefined;
241
+ isTryOnMeshVisible: boolean;
242
+ isMandatoryPD: boolean;
243
+ isVisibleMeshShownForTryOn: boolean;
244
+ setPDDistance: (distance: number) => void;
245
+ pdDistance: () => number;
246
+ exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
247
+ moveItemUp: (itemGuid: string) => void;
248
+ moveItemDown: (itemGuid: string) => void;
249
+ getPrintingMethods: () => Array<{
250
+ printMethodId: number;
251
+ name: string;
252
+ }>;
253
+ setPrintingMethod: (printingMethodId: number, areaId: number) => void;
254
+ getFontWeights: (font: FontFamily) => {
255
+ normal: boolean;
256
+ bold: boolean;
257
+ italic: boolean;
258
+ italicBold: boolean;
259
+ normalWeight: number;
260
+ boldWeight: number;
261
+ italicWeight: number;
262
+ italicBoldWeight: number;
263
+ };
264
+ checkFontSupports: (fontName: string, needsBold: boolean, needsItalic: boolean) => {
265
+ canKeepStyles: boolean;
266
+ supportsBold: boolean;
267
+ supportsItalic: boolean;
268
+ };
269
+ T_static: (str: string) => string;
270
+ T_dynamic: (str: string) => string;
271
+ areTranslationsLoaded: boolean;
272
+ /**
273
+ * Forces a resize of the 3D viewer canvas to match its container.
274
+ * Call this after all UI components have finished rendering to fix
275
+ * canvas buffer/display size mismatches caused by layout reflows.
276
+ */
277
+ forceViewerResize: () => void;
278
+ }
@@ -1,11 +1,11 @@
1
- import { SceneViewer } from "@zakeke/zakeke-3d-core";
2
- import { ZakekeEnvironment } from "../environment";
3
- export interface AppState {
4
- environment: ZakekeEnvironment;
5
- sceneViewer: SceneViewer | null;
6
- isAddToCartLoading: boolean;
7
- isSceneLoading: boolean;
8
- parametersReceived: boolean;
9
- isDebug: boolean;
10
- customizer: MPlaza.Customizer | null;
11
- }
1
+ import { SceneViewer } from "@zakeke/zakeke-3d-core";
2
+ import { ZakekeEnvironment } from "../environment";
3
+ export interface AppState {
4
+ environment: ZakekeEnvironment;
5
+ sceneViewer: SceneViewer | null;
6
+ isAddToCartLoading: boolean;
7
+ isSceneLoading: boolean;
8
+ parametersReceived: boolean;
9
+ isDebug: boolean;
10
+ customizer: MPlaza.Customizer | null;
11
+ }