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.
@@ -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
- /** Gives the consuming application access to initialize a viewer SDK. */
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
+ };
@@ -7,4 +7,5 @@ export type ColourMatchingChartData = {
7
7
  };
8
8
  export type ColourMatchingChartProps = {
9
9
  colourMatching?: ColourMatchingChartData;
10
+ label?: string;
10
11
  };
@@ -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;
@@ -88,6 +88,7 @@ export type PurchasePanelProps = {
88
88
  title: string;
89
89
  description?: string;
90
90
  colourMatching?: ColourMatchingChartData;
91
+ colourMatchingLabel?: string;
91
92
  patternRepeat?: string;
92
93
  onDownloadSwatch?: () => void;
93
94
  onDownloadFullSheet?: () => void;
@@ -6,6 +6,7 @@ export type ProductDetailsData = {
6
6
  summary?: string;
7
7
  content?: React.ReactNode;
8
8
  colourMatching?: ColourMatchingChartData;
9
+ colourMatchingLabel?: string;
9
10
  };
10
11
  export type TextureItem = {
11
12
  key: string;
@@ -35,6 +35,7 @@ export type CategoryPageFilterLabels = {
35
35
  appliedOptionsHeader?: string;
36
36
  clearAllLabel?: string;
37
37
  applyFiltersLabel?: string;
38
+ emptyStateLabel?: string;
38
39
  };
39
40
  export type CategoryPageData = {
40
41
  hero: StandardCopyHeroProps;
@@ -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[];