zakeke-configurator-react 0.1.331 → 0.1.333

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.
@@ -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;
@@ -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>;
@@ -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>;
@@ -259,6 +259,8 @@ export declare class ZakekeEnvironment {
259
259
  text: string;
260
260
  fontFamily: string;
261
261
  }, areaId: number): Promise<void>;
262
+ moveItemUp: (guid: string) => void;
263
+ moveItemDown: (guid: string) => void;
262
264
  setItemText: (guid: string, text: string) => string;
263
265
  setItemItalic: (guid: string, italic: boolean) => void;
264
266
  setItemBold: (guid: string, bold: boolean) => void;
@@ -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 {};
@@ -1,3 +1,3 @@
1
- import { Zakeke } from './providerValue';
2
- import { AppState } from './state';
3
- export declare const createProviderValue: (state: AppState, dispatch: React.Dispatch<any>) => Zakeke;
1
+ import { Zakeke } from './providerValue';
2
+ import { AppState } from './state';
3
+ export declare const createProviderValue: (state: AppState, dispatch: React.Dispatch<any>) => Zakeke;
@@ -226,5 +226,7 @@ export interface Zakeke {
226
226
  setPDDistance: (distance: number) => void;
227
227
  pdDistance: () => number;
228
228
  exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
229
+ moveItemUp: (itemGuid: string) => void;
230
+ moveItemDown: (itemGuid: string) => void;
229
231
  }
230
232
  export {};