zakeke-configurator-react 0.1.363 → 0.1.365
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/declarations/composer/Module/src/api.d.ts +3 -3
- package/dist/declarations/composer/Module/src/components/debugs/debugPanel.d.ts +2 -2
- package/dist/declarations/composer/Module/src/components/sceneViewer.d.ts +5 -5
- package/dist/declarations/composer/Module/src/components/tryon/deepARQrCode.d.ts +6 -6
- package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnBanuba.d.ts +22 -22
- package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnDeepAR.d.ts +22 -22
- package/dist/declarations/composer/Module/src/environment.d.ts +104 -17
- package/dist/declarations/composer/Module/src/fontsManager.d.ts +75 -75
- package/dist/declarations/composer/Module/src/generated/feature-flags.d.ts +83 -83
- package/dist/declarations/composer/Module/src/helpers.d.ts +49 -58
- package/dist/declarations/composer/Module/src/hooks/tryonContext.d.ts +11 -11
- package/dist/declarations/composer/Module/src/imageUploadTask.d.ts +20 -19
- package/dist/declarations/composer/Module/src/index.d.ts +11 -10
- package/dist/declarations/composer/Module/src/integrations/Integration.d.ts +2 -2
- package/dist/declarations/composer/Module/src/integrations/generic.d.ts +1 -1
- package/dist/declarations/composer/Module/src/models.d.ts +1212 -1005
- package/dist/declarations/composer/Module/src/state/createProviderValue.d.ts +3 -3
- package/dist/declarations/composer/Module/src/state/provider.d.ts +18 -16
- package/dist/declarations/composer/Module/src/state/providerValue.d.ts +78 -11
- package/dist/declarations/composer/Module/src/state/state.d.ts +11 -10
- package/dist/declarations/libs/pricingRuleBase/DesignPriceCalculatorRuleBased.d.ts +83 -80
- package/dist/globals1.js +1 -1
- package/dist/globals3.js +1 -1
- package/dist/index.js +83692 -78359
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- /package/dist/declarations/composer/Module/src/integrations/{Helpers.d.ts → helpers.d.ts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
export declare let axiosApi: AxiosInstance;
|
|
3
|
-
export declare function setupApi(culture: string, token: string): void;
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
export declare let axiosApi: AxiosInstance;
|
|
3
|
+
export declare function setupApi(culture: string, token: string): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const DebugPanel: React.FunctionComponent;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const DebugPanel: React.FunctionComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
export declare const ZakekeViewer: FunctionComponent<{
|
|
3
|
-
bgColor?: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
}>;
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export declare const ZakekeViewer: FunctionComponent<{
|
|
3
|
+
bgColor?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface QRCodeGeneratorProps {
|
|
3
|
-
url: string;
|
|
4
|
-
}
|
|
5
|
-
declare const DeepARQrCodeContentContainer: React.FC<QRCodeGeneratorProps>;
|
|
6
|
-
export default DeepARQrCodeContentContainer;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface QRCodeGeneratorProps {
|
|
3
|
+
url: string;
|
|
4
|
+
}
|
|
5
|
+
declare const DeepARQrCodeContentContainer: React.FC<QRCodeGeneratorProps>;
|
|
6
|
+
export default DeepARQrCodeContentContainer;
|
package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnBanuba.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { TryOnProviderProps, ValueOf } from '../tryOnModels';
|
|
3
|
-
export declare const BanubaTryOnReceivedMessage: {
|
|
4
|
-
readonly WaitingAuthentication: "WAITING_AUTH";
|
|
5
|
-
readonly TryOnLoaded: "MODEL_LOADED";
|
|
6
|
-
readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
|
|
7
|
-
readonly WebcamStopped: "WEBCAM_STOPPED";
|
|
8
|
-
readonly Start: "";
|
|
9
|
-
readonly AuthSuccessful: "AUTH_SUCCESS";
|
|
10
|
-
readonly AuthError: "AUTH_ERROR";
|
|
11
|
-
readonly WebcamError: "WEBCAM_ERROR";
|
|
12
|
-
};
|
|
13
|
-
export type BanubaTryOnReceivedMessageType = ValueOf<typeof BanubaTryOnReceivedMessage>;
|
|
14
|
-
export declare const BanubaTryOnResponseMessage: {
|
|
15
|
-
readonly StartAuthenticationTryOn: "AUTH";
|
|
16
|
-
readonly LoadTryOn: "LOAD_MODEL";
|
|
17
|
-
readonly LoadHands: "LOAD_HANDS";
|
|
18
|
-
readonly TakeScreenshot: "TAKE_SCREENSHOT";
|
|
19
|
-
readonly StopWebcam: "STOP_WEBCAM";
|
|
20
|
-
};
|
|
21
|
-
export type BanubaTryOnResponseMessageType = ValueOf<typeof BanubaTryOnResponseMessage>;
|
|
22
|
-
export declare const BanubaTryOn: FunctionComponent<TryOnProviderProps>;
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { TryOnProviderProps, ValueOf } from '../tryOnModels';
|
|
3
|
+
export declare const BanubaTryOnReceivedMessage: {
|
|
4
|
+
readonly WaitingAuthentication: "WAITING_AUTH";
|
|
5
|
+
readonly TryOnLoaded: "MODEL_LOADED";
|
|
6
|
+
readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
|
|
7
|
+
readonly WebcamStopped: "WEBCAM_STOPPED";
|
|
8
|
+
readonly Start: "";
|
|
9
|
+
readonly AuthSuccessful: "AUTH_SUCCESS";
|
|
10
|
+
readonly AuthError: "AUTH_ERROR";
|
|
11
|
+
readonly WebcamError: "WEBCAM_ERROR";
|
|
12
|
+
};
|
|
13
|
+
export type BanubaTryOnReceivedMessageType = ValueOf<typeof BanubaTryOnReceivedMessage>;
|
|
14
|
+
export declare const BanubaTryOnResponseMessage: {
|
|
15
|
+
readonly StartAuthenticationTryOn: "AUTH";
|
|
16
|
+
readonly LoadTryOn: "LOAD_MODEL";
|
|
17
|
+
readonly LoadHands: "LOAD_HANDS";
|
|
18
|
+
readonly TakeScreenshot: "TAKE_SCREENSHOT";
|
|
19
|
+
readonly StopWebcam: "STOP_WEBCAM";
|
|
20
|
+
};
|
|
21
|
+
export type BanubaTryOnResponseMessageType = ValueOf<typeof BanubaTryOnResponseMessage>;
|
|
22
|
+
export declare const BanubaTryOn: FunctionComponent<TryOnProviderProps>;
|
package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnDeepAR.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { TryOnProviderProps, ValueOf } from '../tryOnModels';
|
|
3
|
-
export declare const DeepARTryOnReceivedMessage: {
|
|
4
|
-
readonly WaitingAuthentication: "WAITING_AUTH";
|
|
5
|
-
readonly TryOnLoaded: "MODEL_LOADED";
|
|
6
|
-
readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
|
|
7
|
-
readonly WebcamStopped: "WEBCAM_STOPPED";
|
|
8
|
-
readonly Start: "";
|
|
9
|
-
readonly AuthSuccessful: "AUTH_SUCCESS";
|
|
10
|
-
readonly AuthError: "AUTH_ERROR";
|
|
11
|
-
readonly WebcamError: "WEBCAM_ERROR";
|
|
12
|
-
};
|
|
13
|
-
export type DeepARTryOnReceivedMessageType = ValueOf<typeof DeepARTryOnReceivedMessage>;
|
|
14
|
-
export declare const DeepARTryOnResponseMessage: {
|
|
15
|
-
readonly StartAuthenticationTryOn: "AUTH";
|
|
16
|
-
readonly LoadTryOn: "LOAD_MODEL";
|
|
17
|
-
readonly LoadHands: "LOAD_HANDS";
|
|
18
|
-
readonly TakeScreenshot: "TAKE_SCREENSHOT";
|
|
19
|
-
readonly StopWebcam: "STOP_WEBCAM";
|
|
20
|
-
};
|
|
21
|
-
export type DeepARTryOnResponseMessageType = ValueOf<typeof DeepARTryOnResponseMessage>;
|
|
22
|
-
export declare const DeepARTryOn: FunctionComponent<TryOnProviderProps>;
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { TryOnProviderProps, ValueOf } from '../tryOnModels';
|
|
3
|
+
export declare const DeepARTryOnReceivedMessage: {
|
|
4
|
+
readonly WaitingAuthentication: "WAITING_AUTH";
|
|
5
|
+
readonly TryOnLoaded: "MODEL_LOADED";
|
|
6
|
+
readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
|
|
7
|
+
readonly WebcamStopped: "WEBCAM_STOPPED";
|
|
8
|
+
readonly Start: "";
|
|
9
|
+
readonly AuthSuccessful: "AUTH_SUCCESS";
|
|
10
|
+
readonly AuthError: "AUTH_ERROR";
|
|
11
|
+
readonly WebcamError: "WEBCAM_ERROR";
|
|
12
|
+
};
|
|
13
|
+
export type DeepARTryOnReceivedMessageType = ValueOf<typeof DeepARTryOnReceivedMessage>;
|
|
14
|
+
export declare const DeepARTryOnResponseMessage: {
|
|
15
|
+
readonly StartAuthenticationTryOn: "AUTH";
|
|
16
|
+
readonly LoadTryOn: "LOAD_MODEL";
|
|
17
|
+
readonly LoadHands: "LOAD_HANDS";
|
|
18
|
+
readonly TakeScreenshot: "TAKE_SCREENSHOT";
|
|
19
|
+
readonly StopWebcam: "STOP_WEBCAM";
|
|
20
|
+
};
|
|
21
|
+
export type DeepARTryOnResponseMessageType = ValueOf<typeof DeepARTryOnResponseMessage>;
|
|
22
|
+
export declare const DeepARTryOn: FunctionComponent<TryOnProviderProps>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../typescript_definitions/declarations/All.d.ts" />
|
|
1
2
|
import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
|
|
2
|
-
import { EventMessage, ExtensionFields, OnBeforeSendDataToParent, TryOnMode, TryOnProvidersTypesMapping, VisibleEventMessage } from '.';
|
|
3
|
+
import { EventMessage, ExtensionFields, NftForm, NftSettings, OnBeforeSendDataToParent, SceneAnimationsConfig, TryOnMode, TryOnProvidersTypesMapping, VisibleEventMessage } from '.';
|
|
3
4
|
import { PlatformAttributeSelection } from './integrations/Integration';
|
|
4
|
-
import { BootParameters, Camera, Composition, FontFamily, Group, ImageMacroCategory, Item, Product, ProductQuantityRule, SellerSettings, Template, TemplateMacroCategory,
|
|
5
|
+
import { BootParameters, Camera, Composition, FontFamily, Group, ImageMacroCategory, Item, Product, ProductQuantityRule, SellerSettings, Settings, Template, TemplateMacroCategory, TryOnGenericFineTuningSettings, TryOnProduct, TryOnSeller, AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult, AIVirtualModelRule } from './models';
|
|
6
|
+
import { AxiosResponse } from 'axios';
|
|
5
7
|
import { DAMViewerAnalyticsEventType, PrintingMethodsRestrictions, TextSanitationResult, UIConfig, ZakekeImage } from './models';
|
|
6
8
|
declare global {
|
|
7
9
|
interface Window {
|
|
@@ -64,7 +66,8 @@ export declare class ZakekeEnvironment {
|
|
|
64
66
|
private isDraftEditor;
|
|
65
67
|
private isViewerMode;
|
|
66
68
|
private isDAMViewer;
|
|
67
|
-
private
|
|
69
|
+
private isPresetConfigurationEditor;
|
|
70
|
+
shouldLoadDesign: boolean | null;
|
|
68
71
|
private debugMode;
|
|
69
72
|
private draftCompositionDocId;
|
|
70
73
|
private initialSelection;
|
|
@@ -76,6 +79,15 @@ export declare class ZakekeEnvironment {
|
|
|
76
79
|
private copyrightMessageLocalStorageKey;
|
|
77
80
|
private isPupillaryDistanceMandatory;
|
|
78
81
|
isAIEnabled: boolean;
|
|
82
|
+
isAIStudioShoppingPreviewEnabled: boolean;
|
|
83
|
+
isAIStudioEditorEnabled: boolean;
|
|
84
|
+
isAIStudioEnabled: boolean;
|
|
85
|
+
isAiProductStagingEnabled: boolean;
|
|
86
|
+
isAiVtoEnabled: boolean;
|
|
87
|
+
private lastProductStagingGenerationTime;
|
|
88
|
+
private lastVirtualTryonGenerationTime;
|
|
89
|
+
/** Session ID (GUID) persisted for the lifetime of this environment instance, sent as ZKK-Session-ID header */
|
|
90
|
+
private readonly aiSessionId;
|
|
79
91
|
sellerSettings: SellerSettings | null;
|
|
80
92
|
get internalProduct(): MPlaza.Model | null;
|
|
81
93
|
get internalScene(): Zakeke.Scene | null;
|
|
@@ -84,6 +96,7 @@ export declare class ZakekeEnvironment {
|
|
|
84
96
|
currency: string;
|
|
85
97
|
groups: Group[];
|
|
86
98
|
fonts: FontFamily[];
|
|
99
|
+
defaultFontID: number | null;
|
|
87
100
|
disableTextColors: boolean;
|
|
88
101
|
textColors: RestrictionColor[];
|
|
89
102
|
/**
|
|
@@ -108,6 +121,7 @@ export declare class ZakekeEnvironment {
|
|
|
108
121
|
isExplodedMode: boolean;
|
|
109
122
|
isAssetsLoading: boolean;
|
|
110
123
|
additionalCustomProperties: ExtensionFields[];
|
|
124
|
+
nftSettings: NftSettings | null;
|
|
111
125
|
eventMessages: EventMessage[] | null;
|
|
112
126
|
personalizedMessages: EventMessage[] | null;
|
|
113
127
|
visibleEventMessages: VisibleEventMessage[];
|
|
@@ -116,23 +130,45 @@ export declare class ZakekeEnvironment {
|
|
|
116
130
|
tryOnSellerSettings: TryOnSeller | null;
|
|
117
131
|
pdSettings: number;
|
|
118
132
|
isInfoPointContentVisible: boolean;
|
|
133
|
+
imagesMacroCategories: ImageMacroCategory[];
|
|
134
|
+
isCompositionSaving: boolean;
|
|
119
135
|
private internalTranslations;
|
|
136
|
+
areTranslationsLoaded: boolean;
|
|
120
137
|
private integrationVersion;
|
|
121
|
-
translations: Translations | null;
|
|
122
138
|
useLegacyScreenshot: boolean;
|
|
139
|
+
visibleCustomizer: MPlaza.Customizer | null;
|
|
123
140
|
get isFullscreenMode(): boolean;
|
|
141
|
+
get userSettings(): Settings;
|
|
124
142
|
get isViewerReady(): boolean;
|
|
125
143
|
get isShoppingPreview(): boolean;
|
|
126
144
|
uiConfig: UIConfig | null;
|
|
145
|
+
animationsConfig: SceneAnimationsConfig | null;
|
|
127
146
|
backgroundColor: string | null;
|
|
128
147
|
removeBackground: boolean;
|
|
129
148
|
constructor();
|
|
149
|
+
private fetchVisitorToken;
|
|
130
150
|
private parseParameters;
|
|
131
|
-
makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<
|
|
151
|
+
makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<AxiosResponse<any, any, {}>>;
|
|
132
152
|
private getProduct;
|
|
133
153
|
private getScene;
|
|
134
154
|
private getComposerModels;
|
|
135
155
|
private getFonts;
|
|
156
|
+
getFontWeights: (font: FontFamily) => {
|
|
157
|
+
normal: boolean;
|
|
158
|
+
bold: boolean;
|
|
159
|
+
italic: boolean;
|
|
160
|
+
italicBold: boolean;
|
|
161
|
+
normalWeight: number;
|
|
162
|
+
boldWeight: number;
|
|
163
|
+
italicWeight: number;
|
|
164
|
+
italicBoldWeight: number;
|
|
165
|
+
};
|
|
166
|
+
private updateFontWeightForTextItem;
|
|
167
|
+
checkFontSupports: (fontName: string, needsBold: boolean, needsItalic: boolean) => {
|
|
168
|
+
canKeepStyles: boolean;
|
|
169
|
+
supportsBold: boolean;
|
|
170
|
+
supportsItalic: boolean;
|
|
171
|
+
};
|
|
136
172
|
private getSettings;
|
|
137
173
|
private getSellerSetting;
|
|
138
174
|
createQuote: (formData: any) => Promise<any>;
|
|
@@ -141,6 +177,9 @@ export declare class ZakekeEnvironment {
|
|
|
141
177
|
private loadLocalization;
|
|
142
178
|
getTemplateMacroCategories: () => Promise<TemplateMacroCategory[]>;
|
|
143
179
|
private loadScript;
|
|
180
|
+
validationNFTEmail: (email: string) => boolean;
|
|
181
|
+
validationNFTWalletAddress: (address: string) => boolean;
|
|
182
|
+
private saveCustomerWalletInfo;
|
|
144
183
|
setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
|
|
145
184
|
getCopyrightMessageAccepted: () => boolean;
|
|
146
185
|
/**
|
|
@@ -148,8 +187,17 @@ export declare class ZakekeEnvironment {
|
|
|
148
187
|
*/
|
|
149
188
|
boot: (parameters: BootParameters | null) => Promise<void>;
|
|
150
189
|
private buildDeepARSceneGLBUrl;
|
|
190
|
+
stopAllAnimations: () => void;
|
|
191
|
+
hasAnimations: () => boolean;
|
|
192
|
+
playAnimations: () => void;
|
|
151
193
|
loadSceneFromGlbUrl: (glbUrl: string, sceneConfig: Zakeke.SceneConfig) => Promise<void>;
|
|
152
194
|
appendViewer: (container: HTMLElement) => void;
|
|
195
|
+
/**
|
|
196
|
+
* Forces a resize of the 3D viewer canvas to match its container.
|
|
197
|
+
* Call this from the theme after all UI components have finished rendering
|
|
198
|
+
* to fix canvas buffer/display size mismatches caused by layout reflows.
|
|
199
|
+
*/
|
|
200
|
+
forceViewerResize: () => void;
|
|
153
201
|
setHighlightSettings: (settings: {
|
|
154
202
|
color: string;
|
|
155
203
|
size: number;
|
|
@@ -201,7 +249,7 @@ export declare class ZakekeEnvironment {
|
|
|
201
249
|
on: (event: string, callback: any) => void;
|
|
202
250
|
off: (event: string, callback: any) => void;
|
|
203
251
|
setTemplate: (templateId: number) => Promise<void>;
|
|
204
|
-
|
|
252
|
+
getTemplateUploadRestrictions: (areaId: number) => {
|
|
205
253
|
isUserImageAllowed: boolean;
|
|
206
254
|
isJpgAllowed: boolean;
|
|
207
255
|
isPngAllowed: boolean;
|
|
@@ -222,8 +270,8 @@ export declare class ZakekeEnvironment {
|
|
|
222
270
|
getCameraByName(name: string): Zakeke.SceneCameraLocation | undefined;
|
|
223
271
|
setCameraLocation(name: string, animate?: boolean): void;
|
|
224
272
|
private base64StringToFile;
|
|
225
|
-
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number
|
|
226
|
-
addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any
|
|
273
|
+
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number>, save2dDesign?: boolean) => Promise<void>;
|
|
274
|
+
addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: ((data: OnBeforeSendDataToParent) => Promise<Record<string, any>>) | undefined, legacyScreenshot?: boolean, nftForm?: NftForm, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
227
275
|
zoomIn: () => void;
|
|
228
276
|
zoomOut: () => void;
|
|
229
277
|
isFullscreenEnabled: () => boolean;
|
|
@@ -245,21 +293,37 @@ export declare class ZakekeEnvironment {
|
|
|
245
293
|
text: string;
|
|
246
294
|
fontFamily: string;
|
|
247
295
|
}, areaId: number): Promise<void>;
|
|
296
|
+
setPrintingMethod(printingMethodId: number, areaId: number): Promise<void>;
|
|
297
|
+
getPrintingMethods(): Array<{
|
|
298
|
+
printMethodId: number;
|
|
299
|
+
name: string;
|
|
300
|
+
}>;
|
|
301
|
+
moveItemUp: (guid: string) => void;
|
|
302
|
+
moveItemDown: (guid: string) => void;
|
|
248
303
|
setItemText: (guid: string, text: string) => string;
|
|
249
|
-
setItemItalic: (guid: string, italic: boolean) => void;
|
|
250
|
-
setItemBold: (guid: string, bold: boolean) => void;
|
|
304
|
+
setItemItalic: (guid: string, italic: boolean, font?: FontFamily) => void;
|
|
305
|
+
setItemBold: (guid: string, bold: boolean, font?: FontFamily) => void;
|
|
251
306
|
setItemColor: (guid: string, color: string) => void;
|
|
252
307
|
setItemFontFamily: (guid: string, fontFamily: string) => Promise<void>;
|
|
253
308
|
setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
|
|
254
309
|
fullyLoadFont(font: string | FontFamily): Promise<FontFamily>;
|
|
255
310
|
sanitizeString: (family: FontFamily, text: string) => string;
|
|
256
311
|
getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
|
|
257
|
-
createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
|
|
312
|
+
createImage: (file: File, progress?: ((percentage: number) => void) | undefined) => Promise<ZakekeImage>;
|
|
258
313
|
createImageFromUrl: (url: string) => Promise<ZakekeImage>;
|
|
259
|
-
addItemImage: (id: number, areaId: number) => Promise<
|
|
260
|
-
setItemImageFromFile: (guid: string, file: File, progress?: (percentage: number) => void) => Promise<void>;
|
|
314
|
+
addItemImage: (id: number, areaId: number) => Promise<string | null | undefined>;
|
|
315
|
+
setItemImageFromFile: (guid: string, file: File, progress?: ((percentage: number) => void) | undefined) => Promise<void>;
|
|
261
316
|
setItemImageFromBase64: (guid: string, base64: string) => Promise<void>;
|
|
262
317
|
setItemImage: (guid: string, id: number) => Promise<void>;
|
|
318
|
+
setItemSize: (guid: string, width: number, height: number) => Promise<void>;
|
|
319
|
+
setItemConstraints: (guid: string, constraints: {
|
|
320
|
+
canMove?: boolean;
|
|
321
|
+
canResize?: boolean;
|
|
322
|
+
canRotate?: boolean;
|
|
323
|
+
canDelete?: boolean;
|
|
324
|
+
}) => Promise<void>;
|
|
325
|
+
T_static: (str: string) => any;
|
|
326
|
+
T_dynamic: (str: string) => string;
|
|
263
327
|
getMacroCategories: () => Promise<ImageMacroCategory[]>;
|
|
264
328
|
getImages: (categoryId: number) => Promise<ZakekeImage[]>;
|
|
265
329
|
setCameraPivot(meshID: string): void;
|
|
@@ -283,7 +347,7 @@ export declare class ZakekeEnvironment {
|
|
|
283
347
|
private buildModelViewerUrl;
|
|
284
348
|
isSceneArEnabled: () => boolean;
|
|
285
349
|
private getPregeneratedARUrl;
|
|
286
|
-
getQrCodeArUrl: (device:
|
|
350
|
+
getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
|
|
287
351
|
getMobileArUrl: () => Promise<string | null>;
|
|
288
352
|
getMobileLocalArUrl: () => Promise<string>;
|
|
289
353
|
openArMobile: (url: string) => void;
|
|
@@ -312,7 +376,7 @@ export declare class ZakekeEnvironment {
|
|
|
312
376
|
setCameraLocked: (isBlocked?: boolean) => void;
|
|
313
377
|
isSceneTryOnEnabled: () => boolean;
|
|
314
378
|
getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
|
|
315
|
-
saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean) => Promise<void>;
|
|
379
|
+
saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
316
380
|
private bootstrapComposition;
|
|
317
381
|
loadSavedComposition: (docID: string) => Promise<void>;
|
|
318
382
|
private updateSavedCompositions;
|
|
@@ -326,10 +390,10 @@ export declare class ZakekeEnvironment {
|
|
|
326
390
|
deleteSavedComposition: (docId: string) => Promise<void>;
|
|
327
391
|
applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
|
|
328
392
|
configureByAI: (text: string) => Promise<void>;
|
|
329
|
-
getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping>;
|
|
393
|
+
getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping | null>;
|
|
330
394
|
getTryOnProductInfo: () => Promise<TryOnProduct | null>;
|
|
331
|
-
private getMessagesByProductCode;
|
|
332
395
|
getTryOnSellerInfo: (typeID: number, providerID: number) => Promise<TryOnSeller | null>;
|
|
396
|
+
private getMessagesByProductCode;
|
|
333
397
|
get hasVTryOnEnabled(): boolean;
|
|
334
398
|
get canUseTryOn(): boolean;
|
|
335
399
|
get canUsePD(): boolean;
|
|
@@ -353,5 +417,28 @@ export declare class ZakekeEnvironment {
|
|
|
353
417
|
getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
|
|
354
418
|
setMouseWheelZoomEnabled: (enabled: boolean) => void;
|
|
355
419
|
setCameraPinchingZoom: (toggle: boolean) => void;
|
|
420
|
+
get isAiEditorEnabled(): boolean;
|
|
421
|
+
startAIStudio: () => Promise<void>;
|
|
422
|
+
private _aiPresetCategoriesPromise;
|
|
423
|
+
private _aiPresetPresetsPromise;
|
|
424
|
+
private fetchAllAIPresetCategories;
|
|
425
|
+
private fetchAllAIPresetPresets;
|
|
426
|
+
getAIPresetCategories: (presetType: string) => Promise<AIPresetCategory[]>;
|
|
427
|
+
getAIPresetPresets: (presetType: string) => Promise<AIPreset[]>;
|
|
428
|
+
getApplicableAIStagingRules: (options: {
|
|
429
|
+
productID?: number;
|
|
430
|
+
printTypeID?: number;
|
|
431
|
+
}) => Promise<AIProductStagingRule | null>;
|
|
432
|
+
getApplicableAIVirtualModelRules: (options: {
|
|
433
|
+
productID?: number;
|
|
434
|
+
printTypeID?: number;
|
|
435
|
+
}) => Promise<AIVirtualModelRule | null>;
|
|
436
|
+
private fetchServicesAvailability;
|
|
437
|
+
private createAIProductStagingTask;
|
|
438
|
+
private pollAIProductStagingTask;
|
|
439
|
+
generateAIProductStaging: (options: AIProductStagingOptions) => Promise<AIProductStagingResult>;
|
|
440
|
+
private createAIVirtualTryonTask;
|
|
441
|
+
private pollAIVirtualTryonTask;
|
|
442
|
+
generateAIVirtualTryon: (options: AIVirtualTryOnOptions) => Promise<AIVirtualTryOnResult>;
|
|
356
443
|
}
|
|
357
444
|
export {};
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { FontFamily, FontFamilyFace, TextSanitationResult } from '.';
|
|
2
|
-
/**
|
|
3
|
-
* Download a list of font families so that are available for the browser
|
|
4
|
-
*
|
|
5
|
-
* @param fontFamilies List of font families to download
|
|
6
|
-
* @returns A promise that resolves when all fonts are downloaded
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadFonts(fontFamilies: FontFamily[]): Promise<void>;
|
|
9
|
-
/**
|
|
10
|
-
* Downlod all fonts used in a design
|
|
11
|
-
*
|
|
12
|
-
* @param design Design to load fonts for
|
|
13
|
-
* @param downloadedFonts A list of downloaded fonts
|
|
14
|
-
*/
|
|
15
|
-
export declare function downloadFontsOfDesign(design: MPlaza.Design, downloadedFonts: FontFamily[]): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Remove invalid characters from the text.
|
|
18
|
-
* Invalid characters include backspace (\x08) and null (\u0000) characters.
|
|
19
|
-
*
|
|
20
|
-
* @param text The text to remove invalid characters from
|
|
21
|
-
* @returns The text without invalid characters
|
|
22
|
-
*/
|
|
23
|
-
export declare function removeInvalidCharactersFromText(text: string): string;
|
|
24
|
-
/**
|
|
25
|
-
* Remove unsupported characters from the text.
|
|
26
|
-
* Unsupported characters include characters that cannot be displayed or processed correctly.
|
|
27
|
-
* @param face The font to check character support
|
|
28
|
-
* @param text The text to remove unsupported characters from
|
|
29
|
-
* @returns The text without unsupported characters
|
|
30
|
-
*/
|
|
31
|
-
export declare function sanitizeString(face: FontFamilyFace, string: string): string;
|
|
32
|
-
/**
|
|
33
|
-
* Remove unsupported characters from the text and return a list of removed characters.
|
|
34
|
-
* Unsupported characters include characters that cannot be displayed or processed correctly.
|
|
35
|
-
* @param face The font to check character support
|
|
36
|
-
* @param text The text to remove unsupported characters from
|
|
37
|
-
* @returns The text without unsupported characters and a list of removed characters
|
|
38
|
-
*/
|
|
39
|
-
export declare function sanitizeText(face: FontFamilyFace, text: string): TextSanitationResult;
|
|
40
|
-
/**
|
|
41
|
-
* Remove invalid characters from the text based on the font file.
|
|
42
|
-
* Invalid characters include whitespace or characters that are not supported by the font.
|
|
43
|
-
*
|
|
44
|
-
* @param text The text to remove invalid characters from
|
|
45
|
-
* @param fontFile The font file used to check character support
|
|
46
|
-
* @returns The text without invalid characters
|
|
47
|
-
*/
|
|
48
|
-
export declare function removeInvalidCharacters(text: string, fontFile: any): string;
|
|
49
|
-
/**
|
|
50
|
-
* Get the parsed file from a font
|
|
51
|
-
*
|
|
52
|
-
* @param face The font to get the parsed file from
|
|
53
|
-
* @returns The parsed file
|
|
54
|
-
*/
|
|
55
|
-
export declare function getParsedFileFromFont(face: FontFamilyFace): import("./models").FontFamilyFaceFiles | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Remove unsupported characters from the text.
|
|
58
|
-
* Unsupported characters include characters that cannot be displayed or processed correctly.
|
|
59
|
-
* @param text The text to remove unsupported characters from
|
|
60
|
-
* @returns The text without unsupported characters
|
|
61
|
-
*/
|
|
62
|
-
export declare function removeUnsupportedCharacters(text: string, currentFont: FontFamilyFace): string;
|
|
63
|
-
/**
|
|
64
|
-
* Remove textual emojis from the text.
|
|
65
|
-
* Textual emojis include emojis that are made up of multiple characters.
|
|
66
|
-
* @param text The text to remove textual emojis from
|
|
67
|
-
* @returns The text without textual emojis
|
|
68
|
-
*/
|
|
69
|
-
export declare function removeTextualEmojisFromText(text: string): string;
|
|
70
|
-
/**
|
|
71
|
-
* Remove emojis from the text.
|
|
72
|
-
* @param text The text to remove emojis from
|
|
73
|
-
* @returns The text without emojis
|
|
74
|
-
*/
|
|
75
|
-
export declare function removeEmojisFromText(text: string): string;
|
|
1
|
+
import { FontFamily, FontFamilyFace, TextSanitationResult } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* Download a list of font families so that are available for the browser
|
|
4
|
+
*
|
|
5
|
+
* @param fontFamilies List of font families to download
|
|
6
|
+
* @returns A promise that resolves when all fonts are downloaded
|
|
7
|
+
*/
|
|
8
|
+
export declare function loadFonts(fontFamilies: FontFamily[]): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Downlod all fonts used in a design
|
|
11
|
+
*
|
|
12
|
+
* @param design Design to load fonts for
|
|
13
|
+
* @param downloadedFonts A list of downloaded fonts
|
|
14
|
+
*/
|
|
15
|
+
export declare function downloadFontsOfDesign(design: MPlaza.Design, downloadedFonts: FontFamily[]): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Remove invalid characters from the text.
|
|
18
|
+
* Invalid characters include backspace (\x08) and null (\u0000) characters.
|
|
19
|
+
*
|
|
20
|
+
* @param text The text to remove invalid characters from
|
|
21
|
+
* @returns The text without invalid characters
|
|
22
|
+
*/
|
|
23
|
+
export declare function removeInvalidCharactersFromText(text: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Remove unsupported characters from the text.
|
|
26
|
+
* Unsupported characters include characters that cannot be displayed or processed correctly.
|
|
27
|
+
* @param face The font to check character support
|
|
28
|
+
* @param text The text to remove unsupported characters from
|
|
29
|
+
* @returns The text without unsupported characters
|
|
30
|
+
*/
|
|
31
|
+
export declare function sanitizeString(face: FontFamilyFace, string: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Remove unsupported characters from the text and return a list of removed characters.
|
|
34
|
+
* Unsupported characters include characters that cannot be displayed or processed correctly.
|
|
35
|
+
* @param face The font to check character support
|
|
36
|
+
* @param text The text to remove unsupported characters from
|
|
37
|
+
* @returns The text without unsupported characters and a list of removed characters
|
|
38
|
+
*/
|
|
39
|
+
export declare function sanitizeText(face: FontFamilyFace, text: string): TextSanitationResult;
|
|
40
|
+
/**
|
|
41
|
+
* Remove invalid characters from the text based on the font file.
|
|
42
|
+
* Invalid characters include whitespace or characters that are not supported by the font.
|
|
43
|
+
*
|
|
44
|
+
* @param text The text to remove invalid characters from
|
|
45
|
+
* @param fontFile The font file used to check character support
|
|
46
|
+
* @returns The text without invalid characters
|
|
47
|
+
*/
|
|
48
|
+
export declare function removeInvalidCharacters(text: string, fontFile: any): string;
|
|
49
|
+
/**
|
|
50
|
+
* Get the parsed file from a font
|
|
51
|
+
*
|
|
52
|
+
* @param face The font to get the parsed file from
|
|
53
|
+
* @returns The parsed file
|
|
54
|
+
*/
|
|
55
|
+
export declare function getParsedFileFromFont(face: FontFamilyFace): import("./models").FontFamilyFaceFiles | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Remove unsupported characters from the text.
|
|
58
|
+
* Unsupported characters include characters that cannot be displayed or processed correctly.
|
|
59
|
+
* @param text The text to remove unsupported characters from
|
|
60
|
+
* @returns The text without unsupported characters
|
|
61
|
+
*/
|
|
62
|
+
export declare function removeUnsupportedCharacters(text: string, currentFont: FontFamilyFace): string;
|
|
63
|
+
/**
|
|
64
|
+
* Remove textual emojis from the text.
|
|
65
|
+
* Textual emojis include emojis that are made up of multiple characters.
|
|
66
|
+
* @param text The text to remove textual emojis from
|
|
67
|
+
* @returns The text without textual emojis
|
|
68
|
+
*/
|
|
69
|
+
export declare function removeTextualEmojisFromText(text: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Remove emojis from the text.
|
|
72
|
+
* @param text The text to remove emojis from
|
|
73
|
+
* @returns The text without emojis
|
|
74
|
+
*/
|
|
75
|
+
export declare function removeEmojisFromText(text: string): string;
|