zakeke-configurator-react 0.1.330 → 0.1.332
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 +17 -9
- package/dist/declarations/composer/Module/src/fontsManager.d.ts +75 -75
- package/dist/declarations/composer/Module/src/helpers.d.ts +58 -58
- package/dist/declarations/composer/Module/src/hooks/tryonContext.d.ts +11 -11
- package/dist/declarations/composer/Module/src/imageUploadTask.d.ts +20 -20
- package/dist/declarations/composer/Module/src/models.d.ts +1050 -1019
- package/dist/declarations/composer/Module/src/state/createProviderValue.d.ts +3 -3
- package/dist/declarations/composer/Module/src/state/providerValue.d.ts +11 -5
- 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 +102812 -103071
- 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>;
|
|
@@ -3,6 +3,7 @@ import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
|
|
|
3
3
|
import { EventMessage, ExtensionFields, NftForm, NftSettings, OnBeforeSendDataToParent, SceneAnimationsConfig, TryOnMode, TryOnProvidersTypesMapping, VisibleEventMessage } from '.';
|
|
4
4
|
import { PlatformAttributeSelection } from './integrations/Integration';
|
|
5
5
|
import { BootParameters, Camera, Composition, FontFamily, Group, ImageMacroCategory, Item, Product, ProductQuantityRule, SellerSettings, Settings, Template, TemplateMacroCategory, Translations, TryOnGenericFineTuningSettings, TryOnProduct, TryOnSeller } from './models';
|
|
6
|
+
import { AxiosResponse } from 'axios';
|
|
6
7
|
import { DAMViewerAnalyticsEventType, PrintingMethodsRestrictions, TextSanitationResult, UIConfig, ZakekeImage } from './models';
|
|
7
8
|
declare global {
|
|
8
9
|
interface Window {
|
|
@@ -65,7 +66,8 @@ export declare class ZakekeEnvironment {
|
|
|
65
66
|
private isDraftEditor;
|
|
66
67
|
private isViewerMode;
|
|
67
68
|
private isDAMViewer;
|
|
68
|
-
private
|
|
69
|
+
private isPresetConfigurationEditor;
|
|
70
|
+
shouldLoadDesign: boolean | null;
|
|
69
71
|
private debugMode;
|
|
70
72
|
private draftCompositionDocId;
|
|
71
73
|
private initialSelection;
|
|
@@ -118,7 +120,6 @@ export declare class ZakekeEnvironment {
|
|
|
118
120
|
tryOnSellerSettings: TryOnSeller | null;
|
|
119
121
|
pdSettings: number;
|
|
120
122
|
isInfoPointContentVisible: boolean;
|
|
121
|
-
animationsConfig: SceneAnimationsConfig | null;
|
|
122
123
|
private internalTranslations;
|
|
123
124
|
private integrationVersion;
|
|
124
125
|
translations: Translations | null;
|
|
@@ -129,11 +130,13 @@ export declare class ZakekeEnvironment {
|
|
|
129
130
|
get isViewerReady(): boolean;
|
|
130
131
|
get isShoppingPreview(): boolean;
|
|
131
132
|
uiConfig: UIConfig | null;
|
|
133
|
+
animationsConfig: SceneAnimationsConfig | null;
|
|
132
134
|
backgroundColor: string | null;
|
|
133
135
|
removeBackground: boolean;
|
|
134
136
|
constructor();
|
|
137
|
+
private fetchVisitorToken;
|
|
135
138
|
private parseParameters;
|
|
136
|
-
makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<
|
|
139
|
+
makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<AxiosResponse<any, any>>;
|
|
137
140
|
private getProduct;
|
|
138
141
|
private getScene;
|
|
139
142
|
private getComposerModels;
|
|
@@ -156,6 +159,9 @@ export declare class ZakekeEnvironment {
|
|
|
156
159
|
*/
|
|
157
160
|
boot: (parameters: BootParameters | null) => Promise<void>;
|
|
158
161
|
private buildDeepARSceneGLBUrl;
|
|
162
|
+
stopAllAnimations: () => void;
|
|
163
|
+
hasAnimations: () => boolean;
|
|
164
|
+
playAnimations: () => void;
|
|
159
165
|
loadSceneFromGlbUrl: (glbUrl: string, sceneConfig: Zakeke.SceneConfig) => Promise<void>;
|
|
160
166
|
appendViewer: (container: HTMLElement) => void;
|
|
161
167
|
setHighlightSettings: (settings: {
|
|
@@ -209,7 +215,7 @@ export declare class ZakekeEnvironment {
|
|
|
209
215
|
on: (event: string, callback: any) => void;
|
|
210
216
|
off: (event: string, callback: any) => void;
|
|
211
217
|
setTemplate: (templateId: number) => Promise<void>;
|
|
212
|
-
|
|
218
|
+
getTemplateUploadRestrictions: (areaId: number) => {
|
|
213
219
|
isUserImageAllowed: boolean;
|
|
214
220
|
isJpgAllowed: boolean;
|
|
215
221
|
isPngAllowed: boolean;
|
|
@@ -230,8 +236,8 @@ export declare class ZakekeEnvironment {
|
|
|
230
236
|
getCameraByName(name: string): Zakeke.SceneCameraLocation | undefined;
|
|
231
237
|
setCameraLocation(name: string, animate?: boolean): void;
|
|
232
238
|
private base64StringToFile;
|
|
233
|
-
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number
|
|
234
|
-
addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: ((data: OnBeforeSendDataToParent) => Promise<Record<string, any>>) | undefined, legacyScreenshot?: boolean, nftForm?: NftForm) => Promise<void>;
|
|
239
|
+
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number>, save2dDesign?: boolean) => Promise<void>;
|
|
240
|
+
addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: ((data: OnBeforeSendDataToParent) => Promise<Record<string, any>>) | undefined, legacyScreenshot?: boolean, nftForm?: NftForm, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
235
241
|
zoomIn: () => void;
|
|
236
242
|
zoomOut: () => void;
|
|
237
243
|
isFullscreenEnabled: () => boolean;
|
|
@@ -253,6 +259,8 @@ export declare class ZakekeEnvironment {
|
|
|
253
259
|
text: string;
|
|
254
260
|
fontFamily: string;
|
|
255
261
|
}, areaId: number): Promise<void>;
|
|
262
|
+
moveItemUp: (guid: string) => void;
|
|
263
|
+
moveItemDown: (guid: string) => void;
|
|
256
264
|
setItemText: (guid: string, text: string) => string;
|
|
257
265
|
setItemItalic: (guid: string, italic: boolean) => void;
|
|
258
266
|
setItemBold: (guid: string, bold: boolean) => void;
|
|
@@ -327,7 +335,7 @@ export declare class ZakekeEnvironment {
|
|
|
327
335
|
setCameraLocked: (isBlocked?: boolean) => void;
|
|
328
336
|
isSceneTryOnEnabled: () => boolean;
|
|
329
337
|
getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
|
|
330
|
-
saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean) => Promise<void>;
|
|
338
|
+
saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
331
339
|
private bootstrapComposition;
|
|
332
340
|
loadSavedComposition: (docID: string) => Promise<void>;
|
|
333
341
|
private updateSavedCompositions;
|
|
@@ -341,10 +349,10 @@ export declare class ZakekeEnvironment {
|
|
|
341
349
|
deleteSavedComposition: (docId: string) => Promise<void>;
|
|
342
350
|
applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
|
|
343
351
|
configureByAI: (text: string) => Promise<void>;
|
|
344
|
-
getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping>;
|
|
352
|
+
getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping | null>;
|
|
345
353
|
getTryOnProductInfo: () => Promise<TryOnProduct | null>;
|
|
346
|
-
private getMessagesByProductCode;
|
|
347
354
|
getTryOnSellerInfo: (typeID: number, providerID: number) => Promise<TryOnSeller | null>;
|
|
355
|
+
private getMessagesByProductCode;
|
|
348
356
|
get hasVTryOnEnabled(): boolean;
|
|
349
357
|
get canUseTryOn(): boolean;
|
|
350
358
|
get canUsePD(): boolean;
|
|
@@ -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;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { FontFamily, PlatformSettings, TextItem } from './models';
|
|
2
|
-
export interface PublicTranslations {
|
|
3
|
-
statics: Map<string, string>;
|
|
4
|
-
dynamics: Map<string, string>;
|
|
5
|
-
}
|
|
6
|
-
export declare class T {
|
|
7
|
-
static translations: PublicTranslations | null;
|
|
8
|
-
static _(str: string, domain: string): any;
|
|
9
|
-
static _d(str: string): string;
|
|
10
|
-
}
|
|
11
|
-
export declare function dataURLtoFile(dataurl: any, filename: any): File;
|
|
12
|
-
export declare class StringHelper {
|
|
13
|
-
static padLeft(str: string | number, width: number, char: string): string;
|
|
14
|
-
static padRight(str: string | number, width: number, char: string): string;
|
|
15
|
-
static format(str: string, ...args: string[]): string;
|
|
16
|
-
static camelToSnake(o: any): any[] | {
|
|
17
|
-
[key: string]: {
|
|
18
|
-
val: any;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
static pascalToCamel(o: any): any[] | {
|
|
22
|
-
[key: string]: {
|
|
23
|
-
val: any;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export declare class Browser {
|
|
28
|
-
static openWindow(url: string, width: number, height: number): Window | null;
|
|
29
|
-
}
|
|
30
|
-
export declare class Pagination {
|
|
31
|
-
static nextPage(headerLink: string): string | null;
|
|
32
|
-
}
|
|
33
|
-
export declare function hex2rgb(c: string): {
|
|
34
|
-
r: number;
|
|
35
|
-
g: number;
|
|
36
|
-
b: number;
|
|
37
|
-
};
|
|
38
|
-
export declare function rgb2hex(r: any, g: any, b: any): string;
|
|
39
|
-
export declare function rgbToHsl(r: any, g: any, b: any): any[];
|
|
40
|
-
export declare function hslToRgb(h: any, s: any, l: any): number[];
|
|
41
|
-
export declare function hue2rgb(p: any, q: any, t: any): any;
|
|
42
|
-
export declare function rgbToHsv(r: any, g: any, b: any): any[];
|
|
43
|
-
export declare function hsvToRgb(h: any, s: any, v: any): number[];
|
|
44
|
-
export declare const iOS: boolean;
|
|
45
|
-
export declare function copy(obj: any): any;
|
|
46
|
-
export declare function compare(_obj1: any, _obj2: any): any;
|
|
47
|
-
export declare function isValidJSON(code: string): boolean;
|
|
48
|
-
export declare function isPlatformCode(code: string): any;
|
|
49
|
-
export declare function matchCodes(code1: string, code2: string): any;
|
|
50
|
-
export declare function getPlatformSettings(): PlatformSettings;
|
|
51
|
-
export declare const IS_ANDROID: boolean;
|
|
52
|
-
export declare const IS_IOS: boolean;
|
|
53
|
-
export declare const IS_AR_DEVICE_COMPLIANT: boolean;
|
|
54
|
-
export declare function uuid(): string;
|
|
55
|
-
export declare function sleep(ms: number): Promise<unknown>;
|
|
56
|
-
export declare function ascComparator(getProp: (item: any) => string): (a: any, b: any) => 0 | 1 | -1;
|
|
57
|
-
export declare function getNavigatorQueryParams(): URLSearchParams;
|
|
58
|
-
export declare const sanitizeTextFromUnsupportedAndEmojiCharacters: (item: TextItem, text: string, fonts: FontFamily[]) => string;
|
|
1
|
+
import { FontFamily, PlatformSettings, TextItem } from './models';
|
|
2
|
+
export interface PublicTranslations {
|
|
3
|
+
statics: Map<string, string>;
|
|
4
|
+
dynamics: Map<string, string>;
|
|
5
|
+
}
|
|
6
|
+
export declare class T {
|
|
7
|
+
static translations: PublicTranslations | null;
|
|
8
|
+
static _(str: string, domain: string): any;
|
|
9
|
+
static _d(str: string): string;
|
|
10
|
+
}
|
|
11
|
+
export declare function dataURLtoFile(dataurl: any, filename: any): File;
|
|
12
|
+
export declare class StringHelper {
|
|
13
|
+
static padLeft(str: string | number, width: number, char: string): string;
|
|
14
|
+
static padRight(str: string | number, width: number, char: string): string;
|
|
15
|
+
static format(str: string, ...args: string[]): string;
|
|
16
|
+
static camelToSnake(o: any): any[] | {
|
|
17
|
+
[key: string]: {
|
|
18
|
+
val: any;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
static pascalToCamel(o: any): any[] | {
|
|
22
|
+
[key: string]: {
|
|
23
|
+
val: any;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare class Browser {
|
|
28
|
+
static openWindow(url: string, width: number, height: number): Window | null;
|
|
29
|
+
}
|
|
30
|
+
export declare class Pagination {
|
|
31
|
+
static nextPage(headerLink: string): string | null;
|
|
32
|
+
}
|
|
33
|
+
export declare function hex2rgb(c: string): {
|
|
34
|
+
r: number;
|
|
35
|
+
g: number;
|
|
36
|
+
b: number;
|
|
37
|
+
};
|
|
38
|
+
export declare function rgb2hex(r: any, g: any, b: any): string;
|
|
39
|
+
export declare function rgbToHsl(r: any, g: any, b: any): any[];
|
|
40
|
+
export declare function hslToRgb(h: any, s: any, l: any): number[];
|
|
41
|
+
export declare function hue2rgb(p: any, q: any, t: any): any;
|
|
42
|
+
export declare function rgbToHsv(r: any, g: any, b: any): any[];
|
|
43
|
+
export declare function hsvToRgb(h: any, s: any, v: any): number[];
|
|
44
|
+
export declare const iOS: boolean;
|
|
45
|
+
export declare function copy(obj: any): any;
|
|
46
|
+
export declare function compare(_obj1: any, _obj2: any): any;
|
|
47
|
+
export declare function isValidJSON(code: string): boolean;
|
|
48
|
+
export declare function isPlatformCode(code: string): any;
|
|
49
|
+
export declare function matchCodes(code1: string, code2: string): any;
|
|
50
|
+
export declare function getPlatformSettings(): PlatformSettings;
|
|
51
|
+
export declare const IS_ANDROID: boolean;
|
|
52
|
+
export declare const IS_IOS: boolean;
|
|
53
|
+
export declare const IS_AR_DEVICE_COMPLIANT: boolean;
|
|
54
|
+
export declare function uuid(): string;
|
|
55
|
+
export declare function sleep(ms: number): Promise<unknown>;
|
|
56
|
+
export declare function ascComparator(getProp: (item: any) => string): (a: any, b: any) => 0 | 1 | -1;
|
|
57
|
+
export declare function getNavigatorQueryParams(): URLSearchParams;
|
|
58
|
+
export declare const sanitizeTextFromUnsupportedAndEmojiCharacters: (item: TextItem, text: string, fonts: FontFamily[]) => string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { TryOnMode, ZakekeTryOnExposedMethods } from "../components/tryon/tryOnModels";
|
|
2
|
-
export interface ZakekeTryOnContext {
|
|
3
|
-
tryon: ZakekeTryOnExposedMethods;
|
|
4
|
-
setTryon: (tryon: ZakekeTryOnExposedMethods) => void;
|
|
5
|
-
tryOnPickedMode: TryOnMode;
|
|
6
|
-
setTryOnPickedMode: (mode: TryOnMode) => void;
|
|
7
|
-
tryOnVisibility: boolean;
|
|
8
|
-
setTryOnVisibility: (visibility: boolean) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const TryOnContext: import("react").Context<ZakekeTryOnContext>;
|
|
11
|
-
export declare const useZakekeTryOn: () => ZakekeTryOnContext;
|
|
1
|
+
import { TryOnMode, ZakekeTryOnExposedMethods } from "../components/tryon/tryOnModels";
|
|
2
|
+
export interface ZakekeTryOnContext {
|
|
3
|
+
tryon: ZakekeTryOnExposedMethods;
|
|
4
|
+
setTryon: (tryon: ZakekeTryOnExposedMethods) => void;
|
|
5
|
+
tryOnPickedMode: TryOnMode;
|
|
6
|
+
setTryOnPickedMode: (mode: TryOnMode) => void;
|
|
7
|
+
tryOnVisibility: boolean;
|
|
8
|
+
setTryOnVisibility: (visibility: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const TryOnContext: import("react").Context<ZakekeTryOnContext>;
|
|
11
|
+
export declare const useZakekeTryOn: () => ZakekeTryOnContext;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
declare const MPlaza: any;
|
|
2
|
-
interface ImageTaskOptions {
|
|
3
|
-
convertEpsToSvg: boolean;
|
|
4
|
-
convertPdfToSvg: boolean;
|
|
5
|
-
convertAiToSvg: boolean;
|
|
6
|
-
IsPdfWithRasterAllowed: boolean;
|
|
7
|
-
}
|
|
8
|
-
export default class ImageUploadTask {
|
|
9
|
-
culture: string;
|
|
10
|
-
token: string;
|
|
11
|
-
options: ImageTaskOptions;
|
|
12
|
-
constructor(culture: string, token: string, options?: ImageTaskOptions);
|
|
13
|
-
upload: (file: File, onProgress?: ((progress: number) => void) | undefined) => Promise<any[] | null | undefined>;
|
|
14
|
-
addPrintingOptions: (printingOptions: MPlaza.PrintTypes | undefined) => void;
|
|
15
|
-
private uploadFileChunked;
|
|
16
|
-
private resumableUpload;
|
|
17
|
-
private createImageTask;
|
|
18
|
-
private getImageFromTask;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
declare const MPlaza: any;
|
|
2
|
+
interface ImageTaskOptions {
|
|
3
|
+
convertEpsToSvg: boolean;
|
|
4
|
+
convertPdfToSvg: boolean;
|
|
5
|
+
convertAiToSvg: boolean;
|
|
6
|
+
IsPdfWithRasterAllowed: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default class ImageUploadTask {
|
|
9
|
+
culture: string;
|
|
10
|
+
token: string;
|
|
11
|
+
options: ImageTaskOptions;
|
|
12
|
+
constructor(culture: string, token: string, options?: ImageTaskOptions);
|
|
13
|
+
upload: (file: File, onProgress?: ((progress: number) => void) | undefined) => Promise<any[] | null | undefined>;
|
|
14
|
+
addPrintingOptions: (printingOptions: MPlaza.PrintTypes | undefined) => void;
|
|
15
|
+
private uploadFileChunked;
|
|
16
|
+
private resumableUpload;
|
|
17
|
+
private createImageTask;
|
|
18
|
+
private getImageFromTask;
|
|
19
|
+
}
|
|
20
|
+
export {};
|