@solumflow-app/product-configurator 0.1.0 → 0.3.0

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/README.md CHANGED
@@ -76,7 +76,29 @@ export function Configurator({ product }: { product: { id: string; fields: Recor
76
76
 
77
77
  Pass `labels` for another language, `locale` and `currency` for amounts, and
78
78
  style it through the CSS variables `--pc-bg`, `--pc-surface`, `--pc-fg`,
79
- `--pc-accent` and their neighbours.
79
+ `--pc-accent` and their neighbours. All of them are optional: without them the
80
+ configurator takes your page's own text colour and mixes its greys from it, so
81
+ it reads on a light page and on a dark one. It never follows the visitor's
82
+ system preference on its own -- a page that stays white while the system is
83
+ dark would otherwise get white text.
84
+
85
+ The scene itself is not yours to tune, on purpose: the lighting (one of three
86
+ presets), the materials with their relief and gloss maps, and the 3D models of
87
+ fixed parts are all set in the CRM, so the configurator looks the same in the
88
+ object builder, on the product page and on your site. The canvas background is
89
+ transparent; your page decides what is behind it. The reflections come from a
90
+ room three.js builds in the browser, so nothing is fetched from a CDN.
91
+
92
+ ### Content Security Policy
93
+
94
+ If your site sends a CSP, allow the CRM's storage origin in two directives:
95
+
96
+ - `img-src`: textures and their maps are loaded as images;
97
+ - `connect-src`: 3D models (`.glb`) are fetched.
98
+
99
+ Blocked, neither shows an error on the page, only a line in the console: a
100
+ texture stays a plain colour and a model stays an empty block in the
101
+ material's colour.
80
102
 
81
103
  ## Send a request (server action)
82
104