zakeke-configurator-react 0.1.360 → 0.1.361

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +283 -283
  2. package/dist/declarations/3D/src/Components/AR/AndroidAR.d.ts +7 -7
  3. package/dist/declarations/3D/src/Components/ActionExecutor/SceneActionExecutor.d.ts +87 -87
  4. package/dist/declarations/3D/src/Components/CollapseExplode/MeshLocationsManager.d.ts +44 -44
  5. package/dist/declarations/3D/src/Components/DesignManagers/MeshDesignManager.d.ts +166 -166
  6. package/dist/declarations/3D/src/Components/DesignManagers/SceneDesignManager.d.ts +63 -63
  7. package/dist/declarations/3D/src/Components/Draco/DracoCompression.d.ts +106 -106
  8. package/dist/declarations/3D/src/Components/Environment/EnvironmentManager.d.ts +43 -43
  9. package/dist/declarations/3D/src/Components/Glow/GlowManager.d.ts +26 -26
  10. package/dist/declarations/3D/src/Components/IncrementalFiles/IncrementalFiles.d.ts +26 -26
  11. package/dist/declarations/3D/src/Components/IncrementalFiles/MakeIncremental.d.ts +11 -11
  12. package/dist/declarations/3D/src/Components/InfoPointsManager/InfoPointsManager.d.ts +122 -122
  13. package/dist/declarations/3D/src/Components/MaterialsPreview/MaterialsPreview.d.ts +16 -16
  14. package/dist/declarations/3D/src/Components/MeshExpander/MeshExpander.d.ts +24 -24
  15. package/dist/declarations/3D/src/Components/NormalMap/ProceduralNormalMap.d.ts +30 -30
  16. package/dist/declarations/3D/src/Components/Preview3D/Preview3DConfigurationManager.d.ts +51 -51
  17. package/dist/declarations/3D/src/Components/ProceduralTextures/BaseProceduralTexture.d.ts +16 -16
  18. package/dist/declarations/3D/src/Components/ProceduralTextures/BlendProceduralTexture.d.ts +31 -31
  19. package/dist/declarations/3D/src/Components/ProceduralTextures/BlurXProceduralTexture.d.ts +23 -23
  20. package/dist/declarations/3D/src/Components/ProceduralTextures/BlurYProceduralTexture.d.ts +23 -23
  21. package/dist/declarations/3D/src/Components/ProceduralTextures/ForegroundBackgroundProceduralTexture.d.ts +26 -26
  22. package/dist/declarations/3D/src/Components/ProceduralTextures/MoveProceduralTexture.d.ts +23 -23
  23. package/dist/declarations/3D/src/Components/ProceduralTextures/MultiplyProceduralTexture.d.ts +23 -23
  24. package/dist/declarations/3D/src/Components/ProceduralTextures/NormalMapProceduralTexture.d.ts +35 -35
  25. package/dist/declarations/3D/src/Components/ProceduralTextures/OpacityProceduralTexture.d.ts +23 -23
  26. package/dist/declarations/3D/src/Components/ProceduralTextures/OverlayProceduralTexture.d.ts +23 -23
  27. package/dist/declarations/3D/src/Components/SceneHelper.d.ts +352 -352
  28. package/dist/declarations/3D/src/Components/ScenePreview/ScenePreview.d.ts +19 -19
  29. package/dist/declarations/3D/src/Components/SceneToBlobs/SceneToBlobs.d.ts +31 -31
  30. package/dist/declarations/3D/src/Components/Selector/ElementSelector.d.ts +42 -42
  31. package/dist/declarations/3D/src/Components/Shadows/InnerShadow.d.ts +18 -18
  32. package/dist/declarations/3D/src/Components/Shadows/OuterShadow.d.ts +16 -16
  33. package/dist/declarations/3D/src/Components/USDZ/UsdzHelper.d.ts +4 -4
  34. package/dist/declarations/3D/src/Enumerations.d.ts +15 -15
  35. package/dist/declarations/3D/src/Helpers/debounce.d.ts +8 -8
  36. package/dist/declarations/3D/src/Helpers/utils.d.ts +40 -40
  37. package/dist/declarations/3D/src/Interfaces/IDisposable.d.ts +9 -9
  38. package/dist/declarations/3D/src/Interfaces/ISceneEditor.d.ts +11 -11
  39. package/dist/declarations/3D/src/Interfaces/ISupportInitialize.d.ts +13 -13
  40. package/dist/declarations/3D/src/Interfaces/ITryOn.d.ts +76 -76
  41. package/dist/declarations/3D/src/Layers/AxesLayer.d.ts +17 -17
  42. package/dist/declarations/3D/src/Layers/LightsLayer.d.ts +31 -31
  43. package/dist/declarations/3D/src/Misc/Database.d.ts +20 -20
  44. package/dist/declarations/3D/src/Misc/DefaultAssetUrls.d.ts +51 -51
  45. package/dist/declarations/3D/src/Misc/Observable.d.ts +220 -220
  46. package/dist/declarations/3D/src/Misc/StringTools.d.ts +31 -31
  47. package/dist/declarations/3D/src/Misc/WorkerPool.d.ts +24 -24
  48. package/dist/declarations/3D/src/Viewers/MaterialEditor.d.ts +57 -57
  49. package/dist/declarations/3D/src/Viewers/SceneEditor.d.ts +676 -676
  50. package/dist/declarations/3D/src/Viewers/SceneViewer.d.ts +411 -411
  51. package/dist/declarations/3D/src/index.d.ts +61 -61
  52. package/dist/declarations/3D/src/types.d.ts +2 -2
  53. package/dist/declarations/composer/Admin/src/Pages/ParametricMeshesBuilder/uvHelpers.d.ts +1 -1
  54. package/dist/declarations/composer/Components/ChunkedTask.d.ts +16 -16
  55. package/dist/declarations/composer/Module/src/api.d.ts +3 -3
  56. package/dist/declarations/composer/Module/src/components/debug/debugPanel.d.ts +6 -6
  57. package/dist/declarations/composer/Module/src/components/debugs/debugPanel.d.ts +2 -2
  58. package/dist/declarations/composer/Module/src/components/sceneViewer.d.ts +5 -5
  59. package/dist/declarations/composer/Module/src/components/tryOnViewer.d.ts +109 -109
  60. package/dist/declarations/composer/Module/src/components/tryon/deepARQrCode.d.ts +6 -6
  61. package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnBanuba.d.ts +22 -22
  62. package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnDeepAR.d.ts +22 -22
  63. package/dist/declarations/composer/Module/src/environment.d.ts +438 -438
  64. package/dist/declarations/composer/Module/src/fontsManager.d.ts +75 -75
  65. package/dist/declarations/composer/Module/src/generated/feature-flags.d.ts +83 -83
  66. package/dist/declarations/composer/Module/src/helpers.d.ts +49 -49
  67. package/dist/declarations/composer/Module/src/hooks/tryonContext.d.ts +11 -11
  68. package/dist/declarations/composer/Module/src/imageUploadTask.d.ts +20 -20
  69. package/dist/declarations/composer/Module/src/index.d.ts +11 -11
  70. package/dist/declarations/composer/Module/src/models.d.ts +1212 -1212
  71. package/dist/declarations/composer/Module/src/state/createProviderValue.d.ts +3 -3
  72. package/dist/declarations/composer/Module/src/state/provider.d.ts +18 -18
  73. package/dist/declarations/composer/Module/src/state/providerValue.d.ts +275 -275
  74. package/dist/declarations/composer/Module/src/state/state.d.ts +11 -11
  75. package/dist/declarations/libs/pricingRuleBase/DesignPriceCalculatorRuleBased.d.ts +83 -83
  76. package/dist/globals0.js +1 -1
  77. package/dist/globals1.js +1 -1
  78. package/dist/globals3.js +1 -1
  79. package/dist/index.js +59640 -60550
  80. package/dist/index.js.map +1 -1
  81. package/package.json +43 -43
  82. /package/dist/declarations/composer/Module/src/integrations/{Helpers.d.ts → helpers.d.ts} +0 -0
package/README.md CHANGED
@@ -1,284 +1,284 @@
1
- # 🌐 Zakeke Configurator for React 🚀
2
-
3
- This library allows you to build a custom UI for the Zakeke 3D configurator tool. Create your own unique and immersive 3D experience with ease!
4
-
5
- # 🔧 Prerequisites 🛠️
6
-
7
- Before you can use this project, you will need to install Node.js, a JavaScript runtime built on Chrome's V8 JavaScript engine. Here's how to do it:
8
-
9
- 1. Download the latest version of Node.js from the [official Node.js website](https://nodejs.org/en/download/).
10
-
11
- 2. Run the installation file and follow the prompts in the Node.js Setup Wizard.
12
-
13
- 3. To confirm that Node.js was installed correctly, open your command prompt and run the following command:
14
-
15
- ```shell
16
- node -v
17
- ```
18
-
19
- You should see your installed version of Node.js displayed in the command prompt.
20
-
21
-
22
- ## 🛠️ Installation and Running a Basic Example 🏃‍♂️
23
-
24
- To get started with this project, follow these steps:
25
-
26
- 1. Clone the project repository using the following command:
27
-
28
- ```shell
29
- git clone https://github.com/UpCommerce/zakeke-configurator-react-example.git
30
- ```
31
-
32
- 2. Install the necessary dependencies:
33
-
34
- ```shell
35
- npm install
36
- ```
37
-
38
- 3. Start the project:
39
-
40
- ```shell
41
- npm run start
42
- ```
43
-
44
- After running the example, a blank page will open on `localhost:3000`. This is because Zakeke requires some parameters to know what product to load. Let's get these parameters!
45
-
46
- ## 🎯 Getting the Parameters 🌐
47
-
48
- Follow these steps to get all the parameters:
49
-
50
- 1. Go to the Zakeke configurator backoffice.
51
-
52
- 2. Add or edit a new product.
53
-
54
- 3. Navigate to the Shopping Preview page.
55
-
56
- 4. Right-click on the page -> inspect element.
57
-
58
- 5. Find the Zakeke `<iframe>` src attribute and copy all query string parameters.
59
-
60
- 6. Paste the parameters in the localhost page.
61
-
62
- Your URL should look something like this:
63
-
64
- ```
65
- http://localhost:3000?modelCode=XXX&culture=XX&token=XXXXXX....
66
- ```
67
-
68
- With these parameters, you should see the product loading in a basic UI interface. Start customizing it to your needs!
69
-
70
- ## 📚 References 📖
71
-
72
- The library exposes four key elements:
73
-
74
- - `ZakekeEnvironment`: A class that contains the state of the current scene.
75
-
76
- - `ZakekeProvider`: A React component that should wrap your application.
77
-
78
- - `ZakekeViewer`: A React component that will render the 3D scene.
79
-
80
- - `useZakeke`: An effect to retrieve data and execute methods.
81
-
82
- Here is how a basic Zakeke theme would look like:
83
-
84
- ```jsx
85
- const zakekeEnvironment = new ZakekeEnvironment();
86
-
87
- <ZakekeProvider environment={zakekeEnvironment}>
88
- <div>
89
- <ZakekeViewer />
90
- </div>
91
- </ZakekeProvider>
92
- ```
93
-
94
- # 📚 Documentation Reference 📚
95
-
96
- `useZakeke` exposes the following values:
97
-
98
- ```ts
99
- price: number;
100
- isOutOfStock: boolean;
101
- culture: string;
102
- currency: string;
103
- isSceneLoading: boolean;
104
- isAddToCartLoading: boolean;
105
- isInfoPointContentVisible: boolean;
106
- isViewerReady: boolean;
107
- fonts: FontFamily[];
108
- disableTextColors: boolean;
109
- defaultColor: string;
110
- textColors: RestrictionColor[];
111
- groups: Group[];
112
- templates: Template[];
113
- loadedComposition: { templateName: string; attributesOptions: Map<number, number>; selectedCategoryID: number | null } | null;
114
- currentTemplate: Template | null;
115
- items: Item[];
116
- productName: string;
117
- productCode: string;
118
- product: Product | null;
119
- cameras: Camera[];
120
- sellerSettings: SellerSettings | null;
121
- quantityRule: ProductQuantityRule | null;
122
- eventMessages: EventMessage[] | null;
123
- personalizedMessages: EventMessage[] | null;
124
- visibleEventMessages: VisibleEventMessage[];
125
- isAssetsLoading: boolean;
126
- draftCompositions: ThemeCompositions[] | null;
127
- additionalCustomProperties: { name: string; value: number; label: string; formatString: string }[] | null;
128
- currentAttributesSelection: object | null;
129
- currentCompositionInfo: { compositionId: string | null; compositionName: string | null; compositionTags: string[] | null } | null;
130
- translations: Translations | null;
131
- nftSettings: NftSettings | null;
132
- useLegacyScreenshot: boolean;
133
- isAIEnabled: boolean;
134
- uiConfig: UIConfig | null;
135
- backgroundColor: string;
136
- removeBackground: boolean;
137
- setMouseWheelZoomEnabled: (enabled: boolean) => void;
138
- selectOption: (optionId: number) => void;
139
- /**
140
- * @internal
141
- */
142
- internalAppendViewer: (container: HTMLElement) => void;
143
- getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
144
- designUpdate: () => void;
145
- createQuote: (formData: any) => Promise<any>;
146
- setTemplate: (templateId: number) => Promise<void>;
147
- isAreaVisible: (areaId: number) => boolean;
148
- quantity: number;
149
- saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>) => Promise<void>;
150
- addToCart: (
151
- additionalProperties: Record<string, any>,
152
- OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>,
153
- legacyScreenshot?: boolean,
154
- nftForm?: NftForm
155
- ) => Promise<void>;
156
- /**
157
- * Create a PDF of the current configuration
158
- * @returns The URL of the PDF
159
- */
160
- getPDF: () => Promise<string>;
161
- getOnlineScreenshot: (
162
- width: number,
163
- height: number,
164
- legacyScreenshot?: boolean,
165
- backgroundColor?: string,
166
- padding?: number
167
- ) => Promise<{ originalUrl: string; rewrittenUrl: string }>;
168
-
169
- setCamera: (id: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
170
- setCameraByName: (name: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
171
- setCameraZoomEnabled: (enabled: boolean) => void;
172
- resetCameraPivot: () => void;
173
-
174
- setCameraPivot: (meshId: string) => void;
175
- fullyLoadFont: (fontFamily: string | FontFamily) => Promise<FontFamily>;
176
- sanitizeString: (family: FontFamily, text: string) => string;
177
- getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
178
- getImages: (categoryId: number) => Promise<ZakekeImage[]>;
179
- getMacroCategories: () => Promise<ImageMacroCategory[]>;
180
-
181
- previewOnly__setItemImageFromBase64: (guid: string, base64: string) => void;
182
- setItemImageFromFile: (guid: string, file: File) => Promise<void>;
183
- addItemImage: (id: number, areaId: number) => Promise<void>;
184
- /**
185
- * Upload an image and get the uploaded image
186
- * @param file The file to upload
187
- * @param progress A callback to get the upload progress
188
- * @returns The uploaded image
189
- */
190
- createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
191
- createImageFromUrl: (url: string) => Promise<ZakekeImage>;
192
- setItemImage: (guid: string, imageId: number) => Promise<void>;
193
- setItemFontFamily: (guid: string, fontFamily: string) => void;
194
- setItemColor: (guid: string, color: string) => void;
195
- setItemBold: (guid: string, bold: boolean) => void;
196
- setItemItalic: (guid: string, italic: boolean) => void;
197
- setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
198
- setItemText: (guid: string, text: string) => void;
199
- addItemText: (settings: { text: string; fontFamily: string }, areaId: number) => Promise<void>;
200
- /**
201
- * Remove an item from the customization
202
- * @param guid The guid of the item to remove
203
- */
204
- removeItem: (guid: string) => Promise<void>;
205
- setQuantity: (quantity: number) => void;
206
- getShareCompositionUrl: () => Promise<string>;
207
- saveComposition: (customPreviewSize?: CustomPreviewSize) => Promise<void>;
208
- loadComposition: (id: string) => Promise<void>;
209
- switchFullscreen: () => void;
210
- openSecondScreen: () => void;
211
- isFullscreenMode: boolean;
212
- zoomIn: () => void;
213
- zoomOut: () => void;
214
- updateView: (adjustCamera?: boolean) => void;
215
- setHighlightSettings: (settings: { color: string; size: number }) => void;
216
-
217
- hasExplodedMode: () => boolean;
218
- isExplodedMode: boolean;
219
- setExplodedMode: (exploded: boolean) => void;
220
-
221
- // Scene manipulation
222
- getMeshIDbyName: (name: string) => string | undefined | null;
223
- hideMeshAndSaveState: (meshId: string) => void;
224
- restoreMeshVisibility: (meshId: string) => void;
225
- setMeshDesignVisibility: (meshId: string, visible: boolean) => void;
226
-
227
- // Events
228
- clearListeners: () => void;
229
- addFocusAttributesListener: (listenerFunction: FocusAttributesEventListener) => void;
230
- focusAttribute: (attributeId: number) => void;
231
-
232
- // Highlight
233
- highlightGroup: (groupId: number) => void;
234
- highlightAttribute: (attributeId: number) => void;
235
- // AR
236
- getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
237
- getMobileArUrl: (onFlyArUrl?: string) => Promise<Blob | string | null>;
238
- openArMobile: (url: string) => void;
239
- isSceneArEnabled: () => boolean;
240
- isArDeviceCompliant: () => boolean;
241
- IS_ANDROID: boolean;
242
- IS_IOS: boolean;
243
-
244
- setBackgroundColor: (color: string, alpha: number) => void;
245
- getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
246
- isSceneTryOnEnabled: () => boolean;
247
- setCameraLocked: (isBlocked: boolean) => void;
248
- getTemplateUploadRestrictictions: (templateId: number, areaId: number) => TemplateUploadRestrictictions;
249
- saveDraftsComposition: (name: string, tags: string[], isCopy?: boolean) => Promise<void>;
250
- loadSavedComposition: (docID: string) => Promise<void>;
251
- deleteSavedComposition: (docId: string) => Promise<void>;
252
- exportSceneToGlb: () => Promise<string | Blob | null>;
253
- // reset, undo, redo
254
- reset: () => Promise<void>;
255
- undo: () => Promise<void>;
256
- redo: () => Promise<void>;
257
-
258
- // copyright checkbox
259
- getCopyrightMessageAccepted: () => boolean;
260
- setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
261
-
262
- validationNFTEmail: (email: string) => boolean;
263
- validationNFTWalletAddress: (walletAddress: string) => boolean;
264
-
265
- templateMacroCategories: TemplateMacroCategory[] | null;
266
- applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
267
-
268
- configureByAI: (text: string) => Promise<void>;
269
- hasVTryOnEnabled: boolean;
270
- canUseTryOn: boolean;
271
- canUsePD: boolean;
272
- getTryOnSettings: () => Zakeke.TryOnSettings | undefined;
273
- isTryOnMeshVisible: boolean;
274
- isMandatoryPD: boolean;
275
- isVisibleMeshShownForTryOn: boolean;
276
- setPDDistance: (distance: number) => void;
277
- pdDistance: () => number;
278
- exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
279
- ```
280
-
281
- You can find a full and updated list of the values exposed by `useZakeke` in the source code (the definitions files) of the library.
282
- Please refer to the source code comments for a detailed understanding of each value and their usage.
283
-
1
+ # 🌐 Zakeke Configurator for React 🚀
2
+
3
+ This library allows you to build a custom UI for the Zakeke 3D configurator tool. Create your own unique and immersive 3D experience with ease!
4
+
5
+ # 🔧 Prerequisites 🛠️
6
+
7
+ Before you can use this project, you will need to install Node.js, a JavaScript runtime built on Chrome's V8 JavaScript engine. Here's how to do it:
8
+
9
+ 1. Download the latest version of Node.js from the [official Node.js website](https://nodejs.org/en/download/).
10
+
11
+ 2. Run the installation file and follow the prompts in the Node.js Setup Wizard.
12
+
13
+ 3. To confirm that Node.js was installed correctly, open your command prompt and run the following command:
14
+
15
+ ```shell
16
+ node -v
17
+ ```
18
+
19
+ You should see your installed version of Node.js displayed in the command prompt.
20
+
21
+
22
+ ## 🛠️ Installation and Running a Basic Example 🏃‍♂️
23
+
24
+ To get started with this project, follow these steps:
25
+
26
+ 1. Clone the project repository using the following command:
27
+
28
+ ```shell
29
+ git clone https://github.com/UpCommerce/zakeke-configurator-react-example.git
30
+ ```
31
+
32
+ 2. Install the necessary dependencies:
33
+
34
+ ```shell
35
+ npm install
36
+ ```
37
+
38
+ 3. Start the project:
39
+
40
+ ```shell
41
+ npm run start
42
+ ```
43
+
44
+ After running the example, a blank page will open on `localhost:3000`. This is because Zakeke requires some parameters to know what product to load. Let's get these parameters!
45
+
46
+ ## 🎯 Getting the Parameters 🌐
47
+
48
+ Follow these steps to get all the parameters:
49
+
50
+ 1. Go to the Zakeke configurator backoffice.
51
+
52
+ 2. Add or edit a new product.
53
+
54
+ 3. Navigate to the Shopping Preview page.
55
+
56
+ 4. Right-click on the page -> inspect element.
57
+
58
+ 5. Find the Zakeke `<iframe>` src attribute and copy all query string parameters.
59
+
60
+ 6. Paste the parameters in the localhost page.
61
+
62
+ Your URL should look something like this:
63
+
64
+ ```
65
+ http://localhost:3000?modelCode=XXX&culture=XX&token=XXXXXX....
66
+ ```
67
+
68
+ With these parameters, you should see the product loading in a basic UI interface. Start customizing it to your needs!
69
+
70
+ ## 📚 References 📖
71
+
72
+ The library exposes four key elements:
73
+
74
+ - `ZakekeEnvironment`: A class that contains the state of the current scene.
75
+
76
+ - `ZakekeProvider`: A React component that should wrap your application.
77
+
78
+ - `ZakekeViewer`: A React component that will render the 3D scene.
79
+
80
+ - `useZakeke`: An effect to retrieve data and execute methods.
81
+
82
+ Here is how a basic Zakeke theme would look like:
83
+
84
+ ```jsx
85
+ const zakekeEnvironment = new ZakekeEnvironment();
86
+
87
+ <ZakekeProvider environment={zakekeEnvironment}>
88
+ <div>
89
+ <ZakekeViewer />
90
+ </div>
91
+ </ZakekeProvider>
92
+ ```
93
+
94
+ # 📚 Documentation Reference 📚
95
+
96
+ `useZakeke` exposes the following values:
97
+
98
+ ```ts
99
+ price: number;
100
+ isOutOfStock: boolean;
101
+ culture: string;
102
+ currency: string;
103
+ isSceneLoading: boolean;
104
+ isAddToCartLoading: boolean;
105
+ isInfoPointContentVisible: boolean;
106
+ isViewerReady: boolean;
107
+ fonts: FontFamily[];
108
+ disableTextColors: boolean;
109
+ defaultColor: string;
110
+ textColors: RestrictionColor[];
111
+ groups: Group[];
112
+ templates: Template[];
113
+ loadedComposition: { templateName: string; attributesOptions: Map<number, number>; selectedCategoryID: number | null } | null;
114
+ currentTemplate: Template | null;
115
+ items: Item[];
116
+ productName: string;
117
+ productCode: string;
118
+ product: Product | null;
119
+ cameras: Camera[];
120
+ sellerSettings: SellerSettings | null;
121
+ quantityRule: ProductQuantityRule | null;
122
+ eventMessages: EventMessage[] | null;
123
+ personalizedMessages: EventMessage[] | null;
124
+ visibleEventMessages: VisibleEventMessage[];
125
+ isAssetsLoading: boolean;
126
+ draftCompositions: ThemeCompositions[] | null;
127
+ additionalCustomProperties: { name: string; value: number; label: string; formatString: string }[] | null;
128
+ currentAttributesSelection: object | null;
129
+ currentCompositionInfo: { compositionId: string | null; compositionName: string | null; compositionTags: string[] | null } | null;
130
+ translations: Translations | null;
131
+ nftSettings: NftSettings | null;
132
+ useLegacyScreenshot: boolean;
133
+ isAIEnabled: boolean;
134
+ uiConfig: UIConfig | null;
135
+ backgroundColor: string;
136
+ removeBackground: boolean;
137
+ setMouseWheelZoomEnabled: (enabled: boolean) => void;
138
+ selectOption: (optionId: number) => void;
139
+ /**
140
+ * @internal
141
+ */
142
+ internalAppendViewer: (container: HTMLElement) => void;
143
+ getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
144
+ designUpdate: () => void;
145
+ createQuote: (formData: any) => Promise<any>;
146
+ setTemplate: (templateId: number) => Promise<void>;
147
+ isAreaVisible: (areaId: number) => boolean;
148
+ quantity: number;
149
+ saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>) => Promise<void>;
150
+ addToCart: (
151
+ additionalProperties: Record<string, any>,
152
+ OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>,
153
+ legacyScreenshot?: boolean,
154
+ nftForm?: NftForm
155
+ ) => Promise<void>;
156
+ /**
157
+ * Create a PDF of the current configuration
158
+ * @returns The URL of the PDF
159
+ */
160
+ getPDF: () => Promise<string>;
161
+ getOnlineScreenshot: (
162
+ width: number,
163
+ height: number,
164
+ legacyScreenshot?: boolean,
165
+ backgroundColor?: string,
166
+ padding?: number
167
+ ) => Promise<{ originalUrl: string; rewrittenUrl: string }>;
168
+
169
+ setCamera: (id: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
170
+ setCameraByName: (name: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
171
+ setCameraZoomEnabled: (enabled: boolean) => void;
172
+ resetCameraPivot: () => void;
173
+
174
+ setCameraPivot: (meshId: string) => void;
175
+ fullyLoadFont: (fontFamily: string | FontFamily) => Promise<FontFamily>;
176
+ sanitizeString: (family: FontFamily, text: string) => string;
177
+ getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
178
+ getImages: (categoryId: number) => Promise<ZakekeImage[]>;
179
+ getMacroCategories: () => Promise<ImageMacroCategory[]>;
180
+
181
+ previewOnly__setItemImageFromBase64: (guid: string, base64: string) => void;
182
+ setItemImageFromFile: (guid: string, file: File) => Promise<void>;
183
+ addItemImage: (id: number, areaId: number) => Promise<void>;
184
+ /**
185
+ * Upload an image and get the uploaded image
186
+ * @param file The file to upload
187
+ * @param progress A callback to get the upload progress
188
+ * @returns The uploaded image
189
+ */
190
+ createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
191
+ createImageFromUrl: (url: string) => Promise<ZakekeImage>;
192
+ setItemImage: (guid: string, imageId: number) => Promise<void>;
193
+ setItemFontFamily: (guid: string, fontFamily: string) => void;
194
+ setItemColor: (guid: string, color: string) => void;
195
+ setItemBold: (guid: string, bold: boolean) => void;
196
+ setItemItalic: (guid: string, italic: boolean) => void;
197
+ setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
198
+ setItemText: (guid: string, text: string) => void;
199
+ addItemText: (settings: { text: string; fontFamily: string }, areaId: number) => Promise<void>;
200
+ /**
201
+ * Remove an item from the customization
202
+ * @param guid The guid of the item to remove
203
+ */
204
+ removeItem: (guid: string) => Promise<void>;
205
+ setQuantity: (quantity: number) => void;
206
+ getShareCompositionUrl: () => Promise<string>;
207
+ saveComposition: (customPreviewSize?: CustomPreviewSize) => Promise<void>;
208
+ loadComposition: (id: string) => Promise<void>;
209
+ switchFullscreen: () => void;
210
+ openSecondScreen: () => void;
211
+ isFullscreenMode: boolean;
212
+ zoomIn: () => void;
213
+ zoomOut: () => void;
214
+ updateView: (adjustCamera?: boolean) => void;
215
+ setHighlightSettings: (settings: { color: string; size: number }) => void;
216
+
217
+ hasExplodedMode: () => boolean;
218
+ isExplodedMode: boolean;
219
+ setExplodedMode: (exploded: boolean) => void;
220
+
221
+ // Scene manipulation
222
+ getMeshIDbyName: (name: string) => string | undefined | null;
223
+ hideMeshAndSaveState: (meshId: string) => void;
224
+ restoreMeshVisibility: (meshId: string) => void;
225
+ setMeshDesignVisibility: (meshId: string, visible: boolean) => void;
226
+
227
+ // Events
228
+ clearListeners: () => void;
229
+ addFocusAttributesListener: (listenerFunction: FocusAttributesEventListener) => void;
230
+ focusAttribute: (attributeId: number) => void;
231
+
232
+ // Highlight
233
+ highlightGroup: (groupId: number) => void;
234
+ highlightAttribute: (attributeId: number) => void;
235
+ // AR
236
+ getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
237
+ getMobileArUrl: (onFlyArUrl?: string) => Promise<Blob | string | null>;
238
+ openArMobile: (url: string) => void;
239
+ isSceneArEnabled: () => boolean;
240
+ isArDeviceCompliant: () => boolean;
241
+ IS_ANDROID: boolean;
242
+ IS_IOS: boolean;
243
+
244
+ setBackgroundColor: (color: string, alpha: number) => void;
245
+ getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
246
+ isSceneTryOnEnabled: () => boolean;
247
+ setCameraLocked: (isBlocked: boolean) => void;
248
+ getTemplateUploadRestrictictions: (templateId: number, areaId: number) => TemplateUploadRestrictictions;
249
+ saveDraftsComposition: (name: string, tags: string[], isCopy?: boolean) => Promise<void>;
250
+ loadSavedComposition: (docID: string) => Promise<void>;
251
+ deleteSavedComposition: (docId: string) => Promise<void>;
252
+ exportSceneToGlb: () => Promise<string | Blob | null>;
253
+ // reset, undo, redo
254
+ reset: () => Promise<void>;
255
+ undo: () => Promise<void>;
256
+ redo: () => Promise<void>;
257
+
258
+ // copyright checkbox
259
+ getCopyrightMessageAccepted: () => boolean;
260
+ setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
261
+
262
+ validationNFTEmail: (email: string) => boolean;
263
+ validationNFTWalletAddress: (walletAddress: string) => boolean;
264
+
265
+ templateMacroCategories: TemplateMacroCategory[] | null;
266
+ applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
267
+
268
+ configureByAI: (text: string) => Promise<void>;
269
+ hasVTryOnEnabled: boolean;
270
+ canUseTryOn: boolean;
271
+ canUsePD: boolean;
272
+ getTryOnSettings: () => Zakeke.TryOnSettings | undefined;
273
+ isTryOnMeshVisible: boolean;
274
+ isMandatoryPD: boolean;
275
+ isVisibleMeshShownForTryOn: boolean;
276
+ setPDDistance: (distance: number) => void;
277
+ pdDistance: () => number;
278
+ exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
279
+ ```
280
+
281
+ You can find a full and updated list of the values exposed by `useZakeke` in the source code (the definitions files) of the library.
282
+ Please refer to the source code comments for a detailed understanding of each value and their usage.
283
+
284
284
  _Note: Always ensure to handle these values appropriately in your React components to ensure a smooth user experience._
@@ -1,7 +1,7 @@
1
- export declare class AndroidAR {
2
- private static readonly _anchor;
3
- private static readonly _linkOrTitle;
4
- private static readonly _noArViewerSigil;
5
- private static _fallbackInvoked;
6
- static openSceneViewer(gltfSrc: any, notifyUnsupportedAR: () => void, arScale?: boolean, anchor?: 'wall' | 'floor' | null): void;
7
- }
1
+ export declare class AndroidAR {
2
+ private static readonly _anchor;
3
+ private static readonly _linkOrTitle;
4
+ private static readonly _noArViewerSigil;
5
+ private static _fallbackInvoked;
6
+ static openSceneViewer(gltfSrc: any, notifyUnsupportedAR: () => void, arScale?: boolean, anchor?: 'wall' | 'floor' | null): void;
7
+ }