formica-ui-lib 1.0.310 → 1.0.312
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/componentProps/atoms/interactive3dviewer/Interactive3DViewerProps.d.ts +1 -1
- package/dist/componentProps/integrations/SketchfabViewerProps.d.ts +41 -0
- package/dist/componentProps/molecules/productinformation/colourmatchingchart/ColourMatchingChartProps.d.ts +1 -0
- package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelLeftPanelProps.d.ts +1 -0
- package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelProps.d.ts +1 -0
- package/dist/componentProps/organisms/sections/productinformationsection/ProductInformationSectionProps.d.ts +1 -0
- package/dist/componentProps/templates/categorypagetemplate/CategoryPageTemplateProps.d.ts +1 -0
- package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts +2 -0
- package/dist/index.cjs +9 -9
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3512 -3408
- package/dist/utils/sketchfab/connectSketchfabViewer.d.ts +2 -0
- package/dist/utils/sketchfab/sketchfabViewer.d.ts +6 -0
- package/package.json +1 -1
|
@@ -6,6 +6,6 @@ export type Interactive3DViewerProps = {
|
|
|
6
6
|
title: string;
|
|
7
7
|
/** Viewer height in pixels. Defaults to 500. */
|
|
8
8
|
height?: number;
|
|
9
|
-
/**
|
|
9
|
+
/** Connect through connectSketchfabViewer; use setSketchfabAppearance for brightness/glossiness. */
|
|
10
10
|
iframeRef?: Ref<HTMLIFrameElement>;
|
|
11
11
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type ViewerMaterial = {
|
|
2
|
+
stateSetID: number;
|
|
3
|
+
name: string;
|
|
4
|
+
channels: Record<string, {
|
|
5
|
+
enable?: boolean;
|
|
6
|
+
factor?: number;
|
|
7
|
+
color?: number[];
|
|
8
|
+
texture?: {
|
|
9
|
+
uid: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}>;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
export type ViewerAppearanceSettings = {
|
|
17
|
+
/** 0–1 multiplier relative to the saved material. 1 preserves its strength. */
|
|
18
|
+
brightness: number;
|
|
19
|
+
/** 0 is matte, 1 is glossy. Omit to preserve the saved finish, including its map. */
|
|
20
|
+
glossiness?: number;
|
|
21
|
+
};
|
|
22
|
+
export type ViewerApi = {
|
|
23
|
+
start: () => void;
|
|
24
|
+
addEventListener: (event: "viewerready", callback: () => void) => void;
|
|
25
|
+
getMaterialList: (callback: (error: unknown, materials: ViewerMaterial[]) => void) => void;
|
|
26
|
+
addTexture: (url: string, callback: (error: unknown, uid: string) => void) => void;
|
|
27
|
+
setMaterial: (material: ViewerMaterial, callback: () => void) => void;
|
|
28
|
+
};
|
|
29
|
+
export type SketchfabConstructor = new (iframe: HTMLIFrameElement) => {
|
|
30
|
+
init: (modelId: string, options: {
|
|
31
|
+
success: (api: ViewerApi) => void;
|
|
32
|
+
error: () => void;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}) => void;
|
|
35
|
+
};
|
|
36
|
+
export type SketchfabConnectionOptions = {
|
|
37
|
+
iframe: HTMLIFrameElement;
|
|
38
|
+
embedUrl: string;
|
|
39
|
+
onReady: (api: ViewerApi, materials: ViewerMaterial[]) => void;
|
|
40
|
+
onError: (message: string) => void;
|
|
41
|
+
};
|
|
@@ -22,6 +22,7 @@ export type PurchasePanelLeftPanelProps = {
|
|
|
22
22
|
decor?: string;
|
|
23
23
|
description?: string;
|
|
24
24
|
colourMatching?: ColourMatchingChartData;
|
|
25
|
+
colourMatchingLabel?: string;
|
|
25
26
|
patternRepeat?: string;
|
|
26
27
|
onDownloadSwatch?: () => void;
|
|
27
28
|
onDownloadFullSheet?: () => void;
|
package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type ProductDetailProduct = {
|
|
|
34
34
|
brand?: string;
|
|
35
35
|
description?: string;
|
|
36
36
|
colourMatching?: ColourMatchingChartData;
|
|
37
|
+
colourMatchingLabel?: string;
|
|
37
38
|
sku?: string;
|
|
38
39
|
patternRepeat?: string;
|
|
39
40
|
currency?: string;
|
|
@@ -83,6 +84,7 @@ export type ProductDetailRange = {
|
|
|
83
84
|
summary?: string;
|
|
84
85
|
content?: string;
|
|
85
86
|
colourMatching?: ColourMatchingChartData;
|
|
87
|
+
colourMatchingLabel?: string;
|
|
86
88
|
};
|
|
87
89
|
texture?: {
|
|
88
90
|
groups?: ProductDetailTextureGroup[];
|