zakeke-configurator-react 0.0.178 → 0.0.180
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/environment.d.ts +16 -58
- package/dist/declarations/composer/Module/src/helpers.d.ts +2 -2
- package/dist/declarations/composer/Module/src/hooks/useZakeke.d.ts +9 -0
- package/dist/declarations/composer/Module/src/index.d.ts +4 -3
- package/dist/declarations/composer/Module/src/models.d.ts +1082 -24
- package/dist/declarations/composer/Module/src/state/createProviderValue.d.ts +3 -0
- package/dist/declarations/composer/Module/src/state/provider.d.ts +6 -6
- package/dist/declarations/composer/Module/src/state/providerValue.d.ts +485 -30
- package/dist/index.js +1000 -320
- package/package.json +1 -1
|
@@ -1,61 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { EventMessage, ExtensionFields, NftForm, NftSettings, OnBeforeSendDataToParent, VisibleEventMessage } from '.';
|
|
1
|
+
import { AdditionalCustomProperties, EventMessage, NftForm, NftSettings, OnBeforeSendDataToParent, VisibleEventMessage } from '.';
|
|
3
2
|
import { FocusAttributesEventListener } from '../../../3D/src';
|
|
4
3
|
import { PlatformAttributeSelection } from './integrations/Integration';
|
|
5
4
|
import { Camera, Composition, FontFamily, Group, ImageMacroCategory, Item, Product, ProductQuantityRule, SellerSettings, Template } from './models';
|
|
6
|
-
import type { Image } from './models';
|
|
5
|
+
import type { CurrentCompositionInfo, CustomPreviewSize, Image, RestrictionColor, TemplateMacroCategory, ThemeCompositions, Translations } from './models';
|
|
7
6
|
declare global {
|
|
8
7
|
interface Window {
|
|
9
8
|
token: string;
|
|
10
9
|
isOwin: boolean;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
interface RestrictionColor {
|
|
14
|
-
colorCode: string;
|
|
15
|
-
isDefault: boolean;
|
|
16
|
-
}
|
|
17
|
-
interface CustomPreviewSize {
|
|
18
|
-
customCartPreviewWidth: number;
|
|
19
|
-
customCartPreviewHeight: number;
|
|
20
|
-
}
|
|
21
|
-
interface ThemeCompositions {
|
|
22
|
-
name: string;
|
|
23
|
-
docID: string;
|
|
24
|
-
previewImageUrl: string;
|
|
25
|
-
tags: string[];
|
|
26
|
-
}
|
|
27
|
-
interface CurrentCompositionInfo {
|
|
28
|
-
compositionId: string | null;
|
|
29
|
-
compositionName: string | null;
|
|
30
|
-
compositionTags: string[] | null;
|
|
31
|
-
}
|
|
32
|
-
interface StaticTranslation {
|
|
33
|
-
original: string;
|
|
34
|
-
localization: string;
|
|
35
|
-
lcid: number;
|
|
36
|
-
}
|
|
37
|
-
interface DynamicTranslation {
|
|
38
|
-
original: string;
|
|
39
|
-
localization: string;
|
|
40
|
-
lcid: number;
|
|
41
|
-
}
|
|
42
|
-
interface CategoryNameAndID {
|
|
43
|
-
categoryName: string;
|
|
44
|
-
categoryID: number;
|
|
45
|
-
}
|
|
46
|
-
export interface TemplateCategory {
|
|
47
|
-
macroCategoryName: string;
|
|
48
|
-
macroCategoryID: number;
|
|
49
|
-
categories: CategoryNameAndID[];
|
|
50
|
-
}
|
|
51
|
-
export interface Translations {
|
|
52
|
-
statics: StaticTranslation[];
|
|
53
|
-
dynamics: DynamicTranslation[];
|
|
54
|
-
}
|
|
55
|
-
export interface PublicTranslations {
|
|
56
|
-
statics: Map<string, string>;
|
|
57
|
-
dynamics: Map<string, string>;
|
|
58
|
-
}
|
|
59
12
|
export declare class ZakekeEnvironment {
|
|
60
13
|
private token;
|
|
61
14
|
private platformAttributesSelection;
|
|
@@ -108,6 +61,9 @@ export declare class ZakekeEnvironment {
|
|
|
108
61
|
fonts: FontFamily[];
|
|
109
62
|
disableTextColors: boolean;
|
|
110
63
|
textColors: RestrictionColor[];
|
|
64
|
+
/**
|
|
65
|
+
* Get the current text default color.
|
|
66
|
+
*/
|
|
111
67
|
defaultColor: string;
|
|
112
68
|
quantity: number;
|
|
113
69
|
quantityRule: ProductQuantityRule | null;
|
|
@@ -121,17 +77,17 @@ export declare class ZakekeEnvironment {
|
|
|
121
77
|
templates: Template[];
|
|
122
78
|
currentTemplate: Template | null;
|
|
123
79
|
product: Product | null;
|
|
124
|
-
|
|
80
|
+
templateMacroCategories: TemplateMacroCategory[] | null;
|
|
125
81
|
cameras: Camera[];
|
|
126
82
|
isExplodedMode: boolean;
|
|
127
83
|
isAssetsLoading: boolean;
|
|
128
|
-
|
|
84
|
+
additionalCustomProperties: AdditionalCustomProperties[];
|
|
129
85
|
nftSettings: NftSettings | null;
|
|
130
86
|
eventMessages: EventMessage[] | null;
|
|
131
87
|
visibleEventMessages: VisibleEventMessage[];
|
|
132
|
-
private
|
|
88
|
+
private internalTranslations;
|
|
133
89
|
private integrationVersion;
|
|
134
|
-
|
|
90
|
+
translations: Translations | null;
|
|
135
91
|
useLegacyScreenshot: boolean;
|
|
136
92
|
get isFullscreenMode(): boolean;
|
|
137
93
|
get isViewerReady(): boolean;
|
|
@@ -147,13 +103,16 @@ export declare class ZakekeEnvironment {
|
|
|
147
103
|
private getPrice;
|
|
148
104
|
private getTranslations;
|
|
149
105
|
private loadLocalization;
|
|
150
|
-
getTemplateMacroCategories: () => Promise<
|
|
106
|
+
getTemplateMacroCategories: () => Promise<TemplateMacroCategory[]>;
|
|
151
107
|
private loadScript;
|
|
152
108
|
validationNFTEmail: (email: string) => boolean;
|
|
153
109
|
validationNFTWalletAddress: (address: string) => boolean;
|
|
154
110
|
private saveCustomerWalletInfo;
|
|
155
111
|
setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
|
|
156
112
|
getCopyrightMessageAccepted: () => boolean;
|
|
113
|
+
/**
|
|
114
|
+
* @private
|
|
115
|
+
*/
|
|
157
116
|
boot: (parameters?: any) => Promise<void>;
|
|
158
117
|
appendViewer: (container: HTMLElement) => void;
|
|
159
118
|
setHighlightSettings: (settings: {
|
|
@@ -161,10 +120,10 @@ export declare class ZakekeEnvironment {
|
|
|
161
120
|
size: number;
|
|
162
121
|
}) => void;
|
|
163
122
|
renderDesign: () => Promise<void>;
|
|
164
|
-
debouncedChange
|
|
123
|
+
private debouncedChange;
|
|
165
124
|
resize: () => void;
|
|
166
125
|
private buildRecapProps;
|
|
167
|
-
|
|
126
|
+
updateRecapAndAdditionalCustomProperties: () => void;
|
|
168
127
|
private getCurrentExtensionFields;
|
|
169
128
|
private handleSceneLoaded;
|
|
170
129
|
private getComposition;
|
|
@@ -175,7 +134,7 @@ export declare class ZakekeEnvironment {
|
|
|
175
134
|
loadComposition: (id: string | null) => Promise<void>;
|
|
176
135
|
private internalLoadComposition;
|
|
177
136
|
sync3DAndPlatformSelectionWithCurrentSelection: () => Promise<void>;
|
|
178
|
-
cloneSelection
|
|
137
|
+
private cloneSelection;
|
|
179
138
|
undo: () => Promise<void>;
|
|
180
139
|
redo: () => Promise<void>;
|
|
181
140
|
reset: () => Promise<void>;
|
|
@@ -327,4 +286,3 @@ export declare class ZakekeEnvironment {
|
|
|
327
286
|
deleteSavedComposition: (docId: string) => Promise<void>;
|
|
328
287
|
applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
|
|
329
288
|
}
|
|
330
|
-
export {};
|
|
@@ -36,10 +36,10 @@ export declare function hex2rgb(c: string): {
|
|
|
36
36
|
b: number;
|
|
37
37
|
};
|
|
38
38
|
export declare function rgb2hex(r: any, g: any, b: any): string;
|
|
39
|
-
export declare function rgbToHsl(r: any, g: any, b: any):
|
|
39
|
+
export declare function rgbToHsl(r: any, g: any, b: any): any[];
|
|
40
40
|
export declare function hslToRgb(h: any, s: any, l: any): number[];
|
|
41
41
|
export declare function hue2rgb(p: any, q: any, t: any): any;
|
|
42
|
-
export declare function rgbToHsv(r: any, g: any, b: any):
|
|
42
|
+
export declare function rgbToHsv(r: any, g: any, b: any): any[];
|
|
43
43
|
export declare function hsvToRgb(h: any, s: any, v: any): number[];
|
|
44
44
|
export declare const iOS: boolean;
|
|
45
45
|
export declare function copy(obj: any): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Use Zakeke hook
|
|
3
|
+
* @module useZakeke
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The entry point to use all Zakeke features
|
|
7
|
+
* @returns {import("../state/providerValue").Zakeke} Contains all the data and methods to control a Zakeke configuration
|
|
8
|
+
*/
|
|
9
|
+
export declare const useZakeke: () => import("../state/providerValue").Zakeke;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from './environment';
|
|
2
|
-
export * from './components/sceneViewer';
|
|
3
1
|
export * from './components/customizer';
|
|
4
|
-
export * from './
|
|
2
|
+
export * from './components/sceneViewer';
|
|
3
|
+
export * from './environment';
|
|
4
|
+
export * from './hooks/useZakeke';
|
|
5
5
|
export * from './models';
|
|
6
|
+
export * from './state/provider';
|