@imagineio/configurator-sdk 0.1.5 → 0.1.7

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
@@ -1,134 +1,134 @@
1
- # @imagineio/configurator-sdk
2
-
3
- Build a 3D product configurator and make it yours. One publishable engine — scene,
4
- options, pricing, save/share, AR, AI chat — driven entirely by your backend: data
5
- selects behavior, your code implements overrides through registries, and nothing
6
- needs an SDK release to change.
7
-
8
- ## Install
9
-
10
- The 3D stack (three / fiber / drei) is installed for you — npm 7+ adds the SDK's
11
- peer packages automatically at the versions the SDK is built against, so your app
12
- ends up with exactly one copy of `three`. Pin React 19 in the same command: a fresh
13
- Vite template scaffolds React 19, which the SDK's 3D stack doesn't support yet
14
- (`@react-three/fiber@9` requires React 19), so installing the SDK alone there
15
- fails with `ERESOLVE`:
16
-
17
- ```bash
18
- npm install @imagineio/configurator-sdk react@^19.3.1 react-dom@^19.3.1
19
- npm install -D @types/react@^19.3.0 @types/react-dom@^19.3.0 # the scaffold's are React 19's
20
- ```
21
-
22
- (The second line matters even in a JavaScript project: create-vite scaffolds React 19
23
- *types*, and pinning the runtime alone leaves them mismatched — no error, just wrong
24
- autocomplete everywhere.)
25
-
26
- Then either add the Vite plugin (recommended — serves the SDK's static assets and
27
- dedupes three/react for you):
28
-
29
- ```js
30
- // vite.config.js
31
- import imagineConfigurator from '@imagineio/configurator-sdk/vite';
32
- export default defineConfig({ plugins: [react(), imagineConfigurator()] });
33
- ```
34
-
35
- …or follow the manual steps in the Getting Started guide.
36
-
37
- ```jsx
38
- import { mount, config } from '@imagineio/configurator-sdk';
39
-
40
- // The backend endpoint is built into the SDK — only the key is yours to set.
41
- config.setApiKey('YOUR_ORG_API_KEY');
42
- // systemId is REQUIRED — it names which configurator loads. Without it nothing does.
43
- mount(document.getElementById('root'), { systemId: YOUR_SYSTEM_ID });
44
- ```
45
-
46
- ## Documentation
47
-
48
- The full documentation site — Getting Started (install to a live configurator in
49
- five steps), theming and UI customization, placement customization, the complete
50
- function reference with runnable examples, the e-commerce bridge protocol, and
51
- troubleshooting — is published by your imagine.io contact. No guides ship inside
52
- this package.
53
-
54
- ## Requirements
55
-
56
- Node ≥ 18, React 19, Vite (recommended). Peer deps (auto-installed by npm 7+):
57
- `react`, `react-dom` , `three` 0.185,
58
- `@react-three/fiber` 9, `@react-three/drei` 10. Everything else is installed as a
59
- regular npm dependency — nothing third-party is bundled into the package itself.
60
-
61
- **Strict CSP?** Two things load at runtime from Google, not from the package: the AR
62
- viewer script (`https://ajax.googleapis.com`, overridable with `VITE_MODEL_VIEWER_SRC`
63
- to self-host it) and theme fonts (`https://fonts.googleapis.com` +
64
- `https://fonts.gstatic.com`, only when a theme names a Google font). Allow those hosts
65
- in `script-src` / `style-src` / `font-src`, or point the override at your own origin.
66
-
67
- ## License
68
-
69
- **Proprietary — licensed, not sold.** Not open source. Copyright (c) 2026 Live Furnish,
70
- Inc., dba imagine.io. Installing or using the package means you accept the licence.
71
-
72
- What follows is a plain-English summary, so you can see the shape of the terms before
73
- installing. **It is not the licence** — the full text in `LICENSE.md` governs, and where
74
- the two differ, that text wins.
75
-
76
- **Free to evaluate and build with.** With an imagine.io Account — a free plan counts — you
77
- may install the SDK to evaluate it, to develop and test your own application (including
78
- with your own data), and to demo that application internally or non-commercially, such as
79
- in a talk, tutorial, or portfolio piece.
80
-
81
- **A Subscription or Agreement is required before you go live** — that is, before you deploy
82
- to production or any customer-facing environment, use the SDK in anything sold or monetised
83
- (including ad-supported and lead-generating deployments), or deliver your application to a
84
- third party. One Subscription covers one organisation or brand; building for several
85
- clients or brands needs one each.
86
-
87
- **Explicitly allowed**, so there is no doubt:
88
-
89
- - copying the SDK as needed to install, build, and back up your application;
90
- - bundling and minifying it into your application's deployed build;
91
- - configuring and customising it through its documented extension points — themes,
92
- registries, hooks, plugins, configuration options.
93
-
94
- **Not allowed:**
95
-
96
- - redistributing the SDK itself — publishing, sublicensing, selling, renting, or shipping
97
- it as a package, library, SDK, template, or starter kit, repackaged or not;
98
- - reverse engineering, decompiling, or deobfuscating it (except where law permits despite
99
- this);
100
- - modifying it outside the documented extension points, including patching or runtime
101
- monkey-patching of the distributed files;
102
- - removing or altering any notice, attribution, watermark, licence check, usage meter, or
103
- integrity mechanism, or circumventing a plan limit;
104
- - building anything that competes with imagine.io, or copying its features or interfaces
105
- for that purpose;
106
- - using the SDK or its documentation to train, fine-tune, or evaluate ML/AI models — your
107
- application's use of imagine.io's own AI features is fine;
108
- - publishing benchmarks or security/performance results without written consent.
109
-
110
- These apply whether or not you hold a Subscription.
111
-
112
- **Minification is not a grant.** The code ships minified as a technical measure. Unreadable
113
- source does not imply permission, and readable source does not waive any restriction.
114
-
115
- **Pre-release builds** — including `@imagineio/configurator-sdk-staging` — are for
116
- evaluation and development only. They may change or be withdrawn at any time, with no
117
- stability or compatibility commitment.
118
-
119
- **Credentials.** The SDK is a client for the imagine.io Platform and needs an Account and
120
- valid credentials. Never put a permanent API key in client-side code or any publicly
121
- reachable page — production must use a server-side auth flow with short-lived session
122
- tokens.
123
-
124
- The licence terminates automatically on material breach or if your Account is terminated.
125
- The Software is provided "as is" without warranty, and liability is limited. The imagine.io
126
- Terms and Conditions also apply, and govern the Platform, your Account, billing, and usage
127
- limits.
128
-
129
- Full text: `LICENSE.md`, shipped inside the package — readable at
130
- `node_modules/@imagineio/configurator-sdk/LICENSE.md` after install. It also carries the
131
- notice and Apache-2.0 text for the one third-party component redistributed here (Google
132
- Draco).
133
-
134
- **Licensing enquiries:** finance@imagine.io
1
+ # @imagineio/configurator-sdk
2
+
3
+ Build a 3D product configurator and make it yours. One publishable engine — scene,
4
+ options, pricing, save/share, AR, AI chat — driven entirely by your backend: data
5
+ selects behavior, your code implements overrides through registries, and nothing
6
+ needs an SDK release to change.
7
+
8
+ ## Install
9
+
10
+ The 3D stack (three / fiber / drei) is installed for you — npm 7+ adds the SDK's
11
+ peer packages automatically at the versions the SDK is built against, so your app
12
+ ends up with exactly one copy of `three`.
13
+
14
+ ```bash
15
+ npm install @imagineio/configurator-sdk
16
+ ```
17
+
18
+ To install with React 18, use this command:
19
+
20
+ ```bash
21
+ npm install @imagineio/configurator-sdk react@^18.2 react-dom@^18.2 three@~0.159.0 @react-three/fiber@^8.15 @react-three/drei@^9.88 @react-three/postprocessing@^2.16 postprocessing@~6.36.0
22
+ ```
23
+
24
+ Then either add the Vite plugin (recommended — serves the SDK's static assets and
25
+ dedupes three/react for you):
26
+
27
+ ```js
28
+ // vite.config.js
29
+ import imagineConfigurator from '@imagineio/configurator-sdk/vite';
30
+ export default defineConfig({ plugins: [react(), imagineConfigurator()] });
31
+ ```
32
+
33
+ …or follow the manual steps in the Getting Started guide.
34
+
35
+ ```jsx
36
+ import { mount, config } from '@imagineio/configurator-sdk';
37
+
38
+ // The backend endpoint is built into the SDK — only the key is yours to set.
39
+ config.setApiKey('YOUR_ORG_API_KEY');
40
+ // systemId is REQUIRED — it names which configurator loads. Without it nothing does.
41
+ mount(document.getElementById('root'), { systemId: YOUR_SYSTEM_ID });
42
+ ```
43
+
44
+ ## Documentation
45
+
46
+ **https://configurator-platform.imagine.io/sdk/index.html**
47
+
48
+ The full documentation site — Getting Started (install to a live configurator in
49
+ five steps), theming and UI customization, placement customization, the complete
50
+ function reference with runnable examples, the e-commerce bridge protocol, and
51
+ troubleshooting — is published by your imagine.io contact. No guides ship inside
52
+ this package.
53
+
54
+ ## Requirements
55
+
56
+ Node ≥ 18, React 19, Vite (recommended). Peer deps (auto-installed by npm 7+):
57
+ `react`, `react-dom` , `three` 0.185,
58
+ `@react-three/fiber` 9, `@react-three/drei` 10. Everything else is installed as a
59
+ regular npm dependency — nothing third-party is bundled into the package itself.
60
+
61
+ **Strict CSP?** Two things load at runtime from Google, not from the package: the AR
62
+ viewer script (`https://ajax.googleapis.com`, overridable with `VITE_MODEL_VIEWER_SRC`
63
+ to self-host it) and theme fonts (`https://fonts.googleapis.com` +
64
+ `https://fonts.gstatic.com`, only when a theme names a Google font). Allow those hosts
65
+ in `script-src` / `style-src` / `font-src`, or point the override at your own origin.
66
+
67
+ ## License
68
+
69
+ **Proprietary — licensed, not sold.** Not open source. Copyright (c) 2026 Live Furnish,
70
+ Inc., dba imagine.io. Installing or using the package means you accept the licence.
71
+
72
+ What follows is a plain-English summary, so you can see the shape of the terms before
73
+ installing. **It is not the licence** — the full text in `LICENSE.md` governs, and where
74
+ the two differ, that text wins.
75
+
76
+ **Free to evaluate and build with.** With an imagine.io Account — a free plan counts — you
77
+ may install the SDK to evaluate it, to develop and test your own application (including
78
+ with your own data), and to demo that application internally or non-commercially, such as
79
+ in a talk, tutorial, or portfolio piece.
80
+
81
+ **A Subscription or Agreement is required before you go live** — that is, before you deploy
82
+ to production or any customer-facing environment, use the SDK in anything sold or monetised
83
+ (including ad-supported and lead-generating deployments), or deliver your application to a
84
+ third party. One Subscription covers one organisation or brand; building for several
85
+ clients or brands needs one each.
86
+
87
+ **Explicitly allowed**, so there is no doubt:
88
+
89
+ - copying the SDK as needed to install, build, and back up your application;
90
+ - bundling and minifying it into your application's deployed build;
91
+ - configuring and customising it through its documented extension points — themes,
92
+ registries, hooks, plugins, configuration options.
93
+
94
+ **Not allowed:**
95
+
96
+ - redistributing the SDK itself — publishing, sublicensing, selling, renting, or shipping
97
+ it as a package, library, SDK, template, or starter kit, repackaged or not;
98
+ - reverse engineering, decompiling, or deobfuscating it (except where law permits despite
99
+ this);
100
+ - modifying it outside the documented extension points, including patching or runtime
101
+ monkey-patching of the distributed files;
102
+ - removing or altering any notice, attribution, watermark, licence check, usage meter, or
103
+ integrity mechanism, or circumventing a plan limit;
104
+ - building anything that competes with imagine.io, or copying its features or interfaces
105
+ for that purpose;
106
+ - using the SDK or its documentation to train, fine-tune, or evaluate ML/AI models — your
107
+ application's use of imagine.io's own AI features is fine;
108
+ - publishing benchmarks or security/performance results without written consent.
109
+
110
+ These apply whether or not you hold a Subscription.
111
+
112
+ **Minification is not a grant.** The code ships minified as a technical measure. Unreadable
113
+ source does not imply permission, and readable source does not waive any restriction.
114
+
115
+ **Pre-release builds** — including `@imagineio/configurator-sdk-staging` — are for
116
+ evaluation and development only. They may change or be withdrawn at any time, with no
117
+ stability or compatibility commitment.
118
+
119
+ **Credentials.** The SDK is a client for the imagine.io Platform and needs an Account and
120
+ valid credentials. Never put a permanent API key in client-side code or any publicly
121
+ reachable page — production must use a server-side auth flow with short-lived session
122
+ tokens.
123
+
124
+ The licence terminates automatically on material breach or if your Account is terminated.
125
+ The Software is provided "as is" without warranty, and liability is limited. The imagine.io
126
+ Terms and Conditions also apply, and govern the Platform, your Account, billing, and usage
127
+ limits.
128
+
129
+ Full text: `LICENSE.md`, shipped inside the package — readable at
130
+ `node_modules/@imagineio/configurator-sdk/LICENSE.md` after install. It also carries the
131
+ notice and Apache-2.0 text for the one third-party component redistributed here (Google
132
+ Draco).
133
+
134
+ **Licensing enquiries:** finance@imagine.io
@@ -1 +1 @@
1
- import{themeLayoutKey as u}from"./5c9fd9201c.js";import o from"./8f60e5059a.js";import m from"./872c4302e0.js";import a from"./be337ddda5.js";function p(){const t=o(e=>e.bootLoading),r=o(e=>e.uiReady),s=o(e=>e.bootDetail),n=o(e=>e.bootProgress),c=o(e=>e.themeReady),i=m(e=>e.isLoading),d=a(e=>e.isLoading);return{loading:!!t,uiReady:!!r,detail:s??null,progress:n??null,themeReady:!!c,catalogLoading:!!i,configLoading:!!d,ready:!i&&!d}}function h(){try{o.getState().endBootLoading?.()}catch{}}function L(){const t=a(n=>n.systemId),r=a(n=>n.systemName),s=a(n=>n.systemConfiguratorKey);return{id:t??null,name:r??null,configuratorKey:s??null}}function S(){try{o.setState(t=>t.themeReady?t:{themeReady:!0})}catch{}}function b(t){try{o.setState({embedded:!!t})}catch{}}function R(t){try{a.setState({systemTheme:u(t),systemThemeRecord:t&&typeof t=="object"?t:null})}catch{}}export{h as endBootLoading,S as markThemeReady,b as setEmbedded,R as setSystemTheme,p as useBootStatus,L as useSystem};
1
+ import{themeLayoutKey as c}from"./5c9fd9201c.js";import o from"./8f60e5059a.js";import m from"./872c4302e0.js";import s from"./be337ddda5.js";function p(){const e=o(t=>t.bootLoading),a=o(t=>t.uiReady),n=o(t=>t.bootDetail),r=o(t=>t.bootProgress),u=o(t=>t.themeReady),d=m(t=>t.isLoading),i=s(t=>t.isLoading);return{loading:!!e,uiReady:!!a,detail:n??null,progress:r??null,themeReady:!!u,catalogLoading:!!d,configLoading:!!i,ready:!d&&!i}}function h(){try{o.getState().endBootLoading?.()}catch{}}function L(){const e=s(r=>r.systemId),a=s(r=>r.systemName),n=s(r=>r.systemConfiguratorKey);return{id:e??null,name:a??null,configuratorKey:n??null}}function R(){try{o.setState(e=>e.themeReady?e:{themeReady:!0})}catch{}}function S(e){try{o.setState({embedded:!!e})}catch{}}function b(e){try{s.setState({systemTheme:c(e),systemThemeRecord:e&&typeof e=="object"?e:null})}catch{}}function x(){return o(e=>e.hostMode)||"public"}function K(){const e=s(n=>n.systemRenderMode)||"3d",a=s(n=>n.systemRender)||null;return{mode:e,render:a}}export{h as endBootLoading,R as markThemeReady,S as setEmbedded,b as setSystemTheme,p as useBootStatus,x as useHostMode,K as useRenderMode,L as useSystem};
@@ -54,6 +54,24 @@
54
54
  transition: background 0.2s;
55
55
  }
56
56
 
57
+ /* why AR did not start (Android, 2026-11-11): above the button */
58
+ .arv-status {
59
+ position: absolute;
60
+ left: 16px;
61
+ right: 16px;
62
+ bottom: 104px;
63
+ z-index: 10;
64
+ margin: 0;
65
+ padding: 10px 14px;
66
+ border-radius: 10px;
67
+ background: rgba(255, 255, 255, 0.92);
68
+ color: #b42318;
69
+ font-size: 13px;
70
+ line-height: 1.4;
71
+ text-align: center;
72
+ word-break: break-word;
73
+ }
74
+
57
75
  .arv-view-btn:active {
58
76
  background: var(--color-brand-primary-dark, #e64a19);
59
77
  }