@imagineio/configurator-sdk 0.1.0-beta.2 → 0.1.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/LICENSE.md CHANGED
@@ -1,294 +1,149 @@
1
- PROPRIETARY SOFTWARE LICENCE
2
-
3
- Copyright (c) 2026 imagine.io. All rights reserved.
4
-
5
- This software and its accompanying files (the "Software") are the confidential
6
- and proprietary property of imagine.io. The Software is licensed, not sold.
7
-
8
- 1. GRANT. Subject to a separate written agreement with imagine.io ("Agreement"),
9
- and only for the term and scope that Agreement states, you are granted a
10
- non-exclusive, non-transferable, revocable right to install and use the
11
- Software solely to build and operate your own application. Absent such an
12
- Agreement, no rights are granted and any use is unauthorised.
13
-
14
- 2. RESTRICTIONS. You may not, in whole or in part: (a) copy, publish,
15
- redistribute, sublicense, sell, rent, or lease the Software; (b) reverse
16
- engineer, decompile, deobfuscate, or otherwise attempt to derive source code,
17
- except to the extent this restriction is unenforceable under applicable law;
18
- (c) modify, adapt, or create derivative works, including patching, hot-
19
- patching, or runtime monkey-patching of the distributed files; (d) remove,
20
- obscure, or alter any proprietary notice, attribution, watermark, licence
21
- check, or integrity mechanism; (e) use the Software to build a product that
22
- competes with imagine.io; or (f) permit any third party to do the foregoing.
23
-
24
- 3. NO OPEN SOURCE. Minification, bundling, or obfuscation of the distributed
25
- files is a technical measure, not a grant. The absence of readable source
26
- does not imply permission, and the presence of readable source does not
27
- waive any restriction in Section 2.
28
-
29
- 4. OWNERSHIP. imagine.io retains all right, title, and interest in the Software,
30
- including all intellectual property rights. No rights are granted by
31
- implication, estoppel, or otherwise.
32
-
33
- 5. TERMINATION. This licence terminates automatically and immediately upon any
34
- breach of Section 2, or upon termination of the Agreement. On termination you
35
- must cease all use and destroy all copies.
36
-
37
- 6. NO WARRANTY. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
39
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
40
-
41
- 7. LIMITATION OF LIABILITY. IN NO EVENT SHALL IMAGINE.IO BE LIABLE FOR ANY
42
- CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT,
43
- OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE
44
- USE OR OTHER DEALINGS IN THE SOFTWARE.
45
-
46
- 8. THIRD-PARTY SOFTWARE. This package contains and depends on third-party
47
- software licensed separately from this licence. That software remains subject
48
- to its own terms, which this licence does not modify or override. Appendix A
49
- gives the notice required by the one component redistributed inside this
50
- package; Appendix B is the full text of the licence that component carries.
51
-
52
- ================================================================================
53
- APPENDIX A — THIRD-PARTY NOTICE
54
- ================================================================================
55
-
56
- One component requires attribution: it is the only third-party code shipped
57
- INSIDE this package, so its licence terms bind us directly and the notice has to
58
- travel with the package.
59
-
60
- Nothing else is listed because nothing else is redistributed. The build compiles
61
- each of our own files in place (bundle: false) and follows nothing, so no
62
- dependency code is copied into dist/. Every dependency arrives in the consumer's
63
- own node_modules carrying its own licence file, which is what satisfies its
64
- terms — there is no obligation here for this file to discharge.
65
-
66
- --------------------------------------------------------------------------------
1
+ **IMAGINE.IO CONFIGURATOR SDK \-- PROPRIETARY SOFTWARE LICENSE**
2
+
3
+ Copyright (c) 2026 Live Furnish, Inc., doing business as imagine.io. All rights reserved.
4
+
5
+ This license (the "Configurator SDK License" or this "License") governs the imagine.io Configurator SDK, including every package published under the @imagineio npm scope for that SDK (including @imagineio/configurator-sdk), every pre-release, beta, and staging build, and all accompanying files, plugins, static assets, type definitions, and documentation (together, the "Software"). The Software does not include @imagineio/imagine-app-sdk or any other package that imagine.io publishes under a separate license, and this License grants no rights in those packages. The Software is the confidential and proprietary property of Live Furnish, Inc., doing business as imagine.io ("imagine.io," "we," or "us"). The Software is licensed, not sold.
6
+
7
+ "YOU" AND ACCEPTANCE. "You" means the individual or legal entity that downloads, installs, or uses the Software. If you act on behalf of an organization, as an employee or contractor, "you" includes that organization, and you confirm that you have authority to bind it. By downloading, installing, copying, or using the Software, you accept this License. If you do not accept it, do not download, install, or use the Software.
8
+
9
+ DEFINITIONS. "Platform" means the imagine.io Configurator Platform, including its admin panel, APIs, and hosted services. "Terms" means the imagine.io Terms and Conditions, as updated from time to time. "Account" means an account for the Platform created under the Terms. "Subscription" means a current, paid Platform subscription under the Terms. "Agreement" means a separate written agreement signed by you and imagine.io that covers the Software or the Platform. "Your Application" means a software application that you develop using the Software and that adds material functionality beyond the Software itself. "Documented Extension Points" means the configuration options, themes, registries, hooks, plugins, and other interfaces that the Software or its official documentation describes for customizing the Software. "Documentation" means imagine.io's user manuals, handbooks, model cards, and guides relating to the Software and the Platform, as updated from time to time. Capitalized terms used but not defined in this License have the meanings given in the Terms.
10
+
11
+ 1\. EVALUATION AND DEVELOPMENT GRANT. Subject to this License and the Terms, imagine.io grants you a non-exclusive, non-transferable, non-sublicensable, revocable, royalty-free license to install and use the Software, with an Account (including an Account on a free plan), solely to (a) evaluate the Software and the Platform; (b) develop and test Your Application, including with your own data; and (c) demonstrate Your Application internally, or publicly in a Non-Commercial setting such as a conference talk, tutorial, or portfolio piece. "Non-Commercial" means use that does not, directly or indirectly, generate revenue, promote a product or service that is sold, generate leads or sales, or form part of a live, customer-facing offering.
12
+
13
+ 2\. COMMERCIAL GRANT. You need a Subscription or an Agreement before you may:
14
+
15
+ (a) deploy Your Application to a production or customer-facing environment; (b) use the Software in, or as part of, any offering that is sold, licensed, or monetized, including advertising-supported and lead-generating deployments; or (c) deliver Your Application to a third party as a product, a service, or a component of either. While your Subscription or Agreement is in effect, and subject to this License and the Terms, imagine.io grants you a non-exclusive, non-transferable, non-sublicensable license to use the Software for those purposes, but only within the term, scope, and plan limits of that Subscription or Agreement. These rights end when the Subscription or Agreement expires or terminates. Each Subscription covers Your Applications for one organization or brand. You need a separate Subscription (or an Agreement that expressly covers it) for each client, customer, or brand for whom you build, deploy, or operate Your Application, whether or not that party operates it itself.
16
+
17
+ 3\. RESTRICTIONS. Except as this License expressly permits, you may not, and may not permit any third party to, in whole or in part:
18
+
19
+ (a) copy, publish, redistribute, sublicense, sell, rent, lease, or lend the Software, or make it available for others to obtain from you rather than from imagine.io;
20
+
21
+ (b) reverse engineer, decompile, disassemble, deobfuscate, or otherwise attempt to derive the source code, algorithms, or non-public interfaces of the Software, except to the extent applicable law expressly permits this despite this restriction;
22
+
23
+ (c) modify, adapt, translate, or create derivative works of the Software, including by patching, hot-patching, or runtime monkey-patching of the distributed files;
24
+
25
+ (d) remove, obscure, or alter any proprietary notice, attribution, watermark, license check, usage meter, or integrity or security mechanism, or circumvent any plan limit or technical restriction of the Software or the Platform;
26
+
27
+ (e) use the Software, its documentation, or any proprietary or confidential information derived from them to design, build, train, improve, or operate any product or service that competes with the Software or the Platform, including a product configurator, 3D visualization, or configuration SDK or platform, or to copy any feature, function, interface, or graphic of the Software for that purpose;
28
+
29
+ (f) use the Software or its documentation to train, fine-tune, or evaluate any machine-learning or artificial-intelligence model, except for Your Application's own use of any AI Feature that the Platform provides;
30
+
31
+ (g) access or use the Software to benchmark it for publication or for a competitor, or disclose performance or security testing results about the Software without imagine.io's prior written consent; or
32
+
33
+ (h) use the Software in violation of the Terms, the Documentation, or applicable law.
34
+
35
+ These restrictions apply whether or not you hold a Subscription or an Agreement.
36
+
37
+ Clarifications. (i) Copying the Software as reasonably necessary to install it, build Your Application, and back it up, and incorporating the Software into the compiled, bundled, or minified build of Your Application that you deploy as Section 2 permits is not a breach of Section 3(a). (ii) Configuring or customizing the Software only through its Documented Extension Points is not a breach of Section 3(c). (iii) Delivering the Software itself as a package, library, SDK, template, starter kit, or development tool, whether standalone or repackaged, is prohibited in all cases.
38
+
39
+ 4\. NO OPEN SOURCE. Minifying, bundling, or obfuscating the distributed files is a technical measure, not a grant of rights. The absence of readable source does not imply permission, and the presence of readable source (including source maps or a public repository) does not waive any restriction in Section 3 or grant any open-source license.
40
+
41
+ 5\. OWNERSHIP; FEEDBACK. imagine.io and its licensors keep all right, title, and interest in the Software, including all intellectual property rights. No rights are granted by implication, estoppel, or otherwise, and imagine.io reserves all rights not expressly granted. If you give us suggestions or feedback about the Software, you irrevocably assign to imagine.io all right, title, and interest in that feedback, and to the extent any such assignment is not effective, you grant imagine.io a perpetual, irrevocable, worldwide, royalty-free, fully sublicensable license to use, modify, and incorporate that feedback for any purpose, without restriction or obligation to you. This License does not grant any right to use imagine.io's names, logos, or trademarks.
42
+
43
+ 6\. PLATFORM, CREDENTIALS, AND DATA. The Software is a client for the Platform and requires an Account and valid credentials to function. You are responsible for your API keys, session tokens, share links, and other credentials, as the Terms describe. Never place a permanent API key in client-side code or any page accessible to the public; production deployments must use a server-side authentication flow and short-lived session tokens as the Documentation describes. The Software sends data to and receives data from the Platform, and may collect usage and diagnostic information to operate, secure, meter, and improve the Platform. The Terms and the imagine.io Privacy Policy, as updated from time to time, govern that data.
44
+
45
+ 7\. PRE-RELEASE BUILDS. Pre-release, beta, and staging builds of the Software (including @imagineio/configurator-sdk-staging) are provided for evaluation and development. They may be incomplete, may change or be withdrawn at any time without notice, and carry no availability, stability, or compatibility commitment of any kind.
46
+
47
+ 8\. TERM AND TERMINATION. This License continues until terminated. It terminates automatically and immediately if you materially breach this License (including any breach of Section 3\) or if your Account is terminated. The rights in Section 2 end when the Subscription or Agreement that supports them expires or terminates. imagine.io may terminate the rights in Section 1 at any time by notice to you, including by updating the Terms or the Documentation. When this License or any right under it ends, you must stop the use that is no longer licensed and, if this License terminates entirely, delete all copies of the Software in your possession or control and, upon imagine.io's request, certify that deletion in writing.
48
+
49
+ 9\. NO WARRANTY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, AND EXCEPT AS EXPRESSLY PROVIDED IN AN AGREEMENT, THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE," WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, OR NON-INFRINGEMENT, AND ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR-FREE, SECURE, OR UNINTERRUPTED.
50
+
51
+ 10\. LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, AND EXCEPT AS EXPRESSLY PROVIDED IN AN AGREEMENT, IMAGINE.IO WILL NOT BE LIABLE FOR ANY CLAIMS, DAMAGES, OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR ITS USE. IF APPLICABLE LAW DOES NOT ALLOW THAT EXCLUSION, IMAGINE.IO'S TOTAL LIABILITY FOR ALL CLAIMS ARISING FROM OR RELATED TO THIS LICENSE WILL NOT EXCEED THE GREATER OF (A) THE AMOUNTS YOU PAID TO IMAGINE.IO UNDER YOUR SUBSCRIPTION IN THE TWELVE (12) MONTHS BEFORE THE CLAIM AROSE AND (B) FIFTY U.S. DOLLARS (US $50). THE LIMITATIONS OF LIABILITY IN THE TERMS ALSO APPLY TO THE EXTENT NOT INCONSISTENT WITH THIS SECTION.
52
+
53
+ 11\. PLATFORM AVAILABILITY. The Terms and your Subscription or Agreement, not this License, govern the availability, uptime, support, and data durability of the Platform. Nothing in this License, the Software, or the Documentation is a service-level commitment. imagine.io may change, throttle, suspend, or discontinue Platform functionality as the Terms permit.
54
+
55
+ 12\. ORDER OF PRECEDENCE. The Terms also govern your access to and use of the Platform. This License governs the Software. The Terms govern the Platform, your Account and Subscription, billing, usage limits, AI Features, and acceptable use. If this License and the Terms conflict about the Software itself, this License controls. If they conflict about anything else, the Terms control. An Agreement controls over both, but only to the extent it expressly addresses the conflicting subject.
56
+
57
+ 13\. EXPORT; GOVERNMENT USE. You must comply with all applicable export control and sanctions laws in your use of the Software. The Software is "commercial computer software" and is licensed to U.S. government end users only as commercial computer software and only with the rights granted in this License.
58
+
59
+ 14\. GENERAL. The governing law, dispute resolution, venue, assignment, notice, and severability provisions of the Terms apply to this License as if set out in full here, including the arbitration provisions and the exclusive venue that the Terms specify. You acknowledge that any breach of Sections 3, 4, 5, or 6 would cause irreparable harm to imagine.io for which monetary damages would be inadequate, and that imagine.io is entitled to seek injunctive or other equitable relief without the necessity of proving actual damages or posting a bond. If any provision of this License is held unenforceable, it will be enforced to the maximum extent permitted and the rest of this License will remain in effect. imagine.io may update this License for future versions of the Software; the license included with a version governs that version.
60
+
61
+ 15\. SURVIVAL. Sections 3 through 6, 8, and 9 through 16 survive any expiration or termination of this License.
62
+
63
+ 16\. THIRD-PARTY SOFTWARE. The Software contains and depends on third-party software that is licensed separately. That software remains subject to its own license terms, which this License does not modify or override. Appendix A gives the notice required for the one third-party component distributed inside this package, and Appendix B reproduces the full text of that component's license.
64
+
65
+ Licensing inquiries: finance@imagine.io
66
+
67
+ \================================================================================
68
+
69
+ APPENDIX A \-- THIRD-PARTY NOTICE
70
+
71
+ The only third-party code distributed inside this package is listed below. Other dependencies are installed separately by your package manager and carry their own license files.
72
+
73
+ \--------------------------------------------------------------------------------
74
+
67
75
  GOOGLE DRACO
68
- --------------------------------------------------------------------------------
69
-
70
- static/assets/draco/ — the Draco decoder and encoder builds
71
- (draco_decoder.js, draco_decoder.wasm, draco_encoder.js,
72
- draco_encoder_wrapper.js, draco_wasm_wrapper.js), used to decompress
73
- KHR_draco_mesh_compression geometry and to compress the AR export.
74
-
75
- Project: https://github.com/google/draco
76
- Copyright: The Draco Authors
77
- Licence: Apache License, Version 2.0
78
-
79
- A copy of the Apache License 2.0 is reproduced in Appendix B of this file, as
80
- required by section 4(a) of that licence. You may not use these files except
81
- in compliance with the License. Unless required by applicable law or agreed to
82
- in writing, software distributed under the License is distributed on an
83
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
84
- implied.
85
-
86
- UNMODIFIED. These are prebuilt binaries vendored from a three.js distribution
87
- (three/examples/jsm/libs/draco/); the accompanying README.md is Google's, word
88
- for word, differing only where a repo-wide Markdown formatter changed bullet
89
- characters and quote style. Every binary is byte-identical to the day it
90
- entered version control — nothing here is a modified build, so the
91
- statement-of-changes requirement in section 4(b) of the Apache License does
92
- not arise. If a Draco build is ever rebuilt or patched, that changes and this
93
- paragraph must be replaced with a description of the changes.
94
-
95
- --------------------------------------------------------------------------------
96
- MAINTAINING THIS APPENDIX
97
- --------------------------------------------------------------------------------
98
-
99
- What triggers an entry is a file being COPIED INTO this package from a
100
- third-party project — not a dependency being added, which changes nothing here.
101
- If a newly vendored component's licence requires its full text to be
102
- distributed, that text goes into a further appendix of this file, as Apache-2.0
103
- does in Appendix B.
104
-
105
-
106
- ================================================================================
107
- APPENDIX B — APACHE LICENSE, VERSION 2.0
108
- ================================================================================
109
-
110
- Reproduced in full for the component named in Appendix A. This licence applies
111
- to that component ONLY, and grants no rights in the rest of the Software.
112
-
113
-
114
- Apache License
115
- Version 2.0, January 2004
116
- http://www.apache.org/licenses/
117
-
118
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
119
-
120
- 1. Definitions.
121
-
122
- "License" shall mean the terms and conditions for use, reproduction,
123
- and distribution as defined by Sections 1 through 9 of this document.
124
-
125
- "Licensor" shall mean the copyright owner or entity authorized by
126
- the copyright owner that is granting the License.
127
-
128
- "Legal Entity" shall mean the union of the acting entity and all
129
- other entities that control, are controlled by, or are under common
130
- control with that entity. For the purposes of this definition,
131
- "control" means (i) the power, direct or indirect, to cause the
132
- direction or management of such entity, whether by contract or
133
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
134
- outstanding shares, or (iii) beneficial ownership of such entity.
135
-
136
- "You" (or "Your") shall mean an individual or Legal Entity
137
- exercising permissions granted by this License.
138
-
139
- "Source" form shall mean the preferred form for making modifications,
140
- including but not limited to software source code, documentation
141
- source, and configuration files.
142
-
143
- "Object" form shall mean any form resulting from mechanical
144
- transformation or translation of a Source form, including but
145
- not limited to compiled object code, generated documentation,
146
- and conversions to other media types.
147
-
148
- "Work" shall mean the work of authorship, whether in Source or
149
- Object form, made available under the License, as indicated by a
150
- copyright notice that is included in or attached to the work
151
- (an example is provided in the Appendix below).
152
-
153
- "Derivative Works" shall mean any work, whether in Source or Object
154
- form, that is based on (or derived from) the Work and for which the
155
- editorial revisions, annotations, elaborations, or other modifications
156
- represent, as a whole, an original work of authorship. For the purposes
157
- of this License, Derivative Works shall not include works that remain
158
- separable from, or merely link (or bind by name) to the interfaces of,
159
- the Work and Derivative Works thereof.
160
-
161
- "Contribution" shall mean any work of authorship, including
162
- the original version of the Work and any modifications or additions
163
- to that Work or Derivative Works thereof, that is intentionally
164
- submitted to Licensor for inclusion in the Work by the copyright owner
165
- or by an individual or Legal Entity authorized to submit on behalf of
166
- the copyright owner. For the purposes of this definition, "submitted"
167
- means any form of electronic, verbal, or written communication sent
168
- to the Licensor or its representatives, including but not limited to
169
- communication on electronic mailing lists, source code control systems,
170
- and issue tracking systems that are managed by, or on behalf of, the
171
- Licensor for the purpose of discussing and improving the Work, but
172
- excluding communication that is conspicuously marked or otherwise
173
- designated in writing by the copyright owner as "Not a Contribution."
174
-
175
- "Contributor" shall mean Licensor and any individual or Legal Entity
176
- on behalf of whom a Contribution has been received by Licensor and
177
- subsequently incorporated within the Work.
178
-
179
- 2. Grant of Copyright License. Subject to the terms and conditions of
180
- this License, each Contributor hereby grants to You a perpetual,
181
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
182
- copyright license to reproduce, prepare Derivative Works of,
183
- publicly display, publicly perform, sublicense, and distribute the
184
- Work and such Derivative Works in Source or Object form.
185
-
186
- 3. Grant of Patent License. Subject to the terms and conditions of
187
- this License, each Contributor hereby grants to You a perpetual,
188
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
189
- (except as stated in this section) patent license to make, have made,
190
- use, offer to sell, sell, import, and otherwise transfer the Work,
191
- where such license applies only to those patent claims licensable
192
- by such Contributor that are necessarily infringed by their
193
- Contribution(s) alone or by combination of their Contribution(s)
194
- with the Work to which such Contribution(s) was submitted. If You
195
- institute patent litigation against any entity (including a
196
- cross-claim or counterclaim in a lawsuit) alleging that the Work
197
- or a Contribution incorporated within the Work constitutes direct
198
- or contributory patent infringement, then any patent licenses
199
- granted to You under this License for that Work shall terminate
200
- as of the date such litigation is filed.
201
-
202
- 4. Redistribution. You may reproduce and distribute copies of the
203
- Work or Derivative Works thereof in any medium, with or without
204
- modifications, and in Source or Object form, provided that You
205
- meet the following conditions:
206
-
207
- (a) You must give any other recipients of the Work or
208
- Derivative Works a copy of this License; and
209
-
210
- (b) You must cause any modified files to carry prominent notices
211
- stating that You changed the files; and
212
-
213
- (c) You must retain, in the Source form of any Derivative Works
214
- that You distribute, all copyright, patent, trademark, and
215
- attribution notices from the Source form of the Work,
216
- excluding those notices that do not pertain to any part of
217
- the Derivative Works; and
218
-
219
- (d) If the Work includes a "NOTICE" text file as part of its
220
- distribution, then any Derivative Works that You distribute must
221
- include a readable copy of the attribution notices contained
222
- within such NOTICE file, excluding those notices that do not
223
- pertain to any part of the Derivative Works, in at least one
224
- of the following places: within a NOTICE text file distributed
225
- as part of the Derivative Works; within the Source form or
226
- documentation, if provided along with the Derivative Works; or,
227
- within a display generated by the Derivative Works, if and
228
- wherever such third-party notices normally appear. The contents
229
- of the NOTICE file are for informational purposes only and
230
- do not modify the License. You may add Your own attribution
231
- notices within Derivative Works that You distribute, alongside
232
- or as an addendum to the NOTICE text from the Work, provided
233
- that such additional attribution notices cannot be construed
234
- as modifying the License.
235
-
236
- You may add Your own copyright statement to Your modifications and
237
- may provide additional or different license terms and conditions
238
- for use, reproduction, or distribution of Your modifications, or
239
- for any such Derivative Works as a whole, provided Your use,
240
- reproduction, and distribution of the Work otherwise complies with
241
- the conditions stated in this License.
242
-
243
- 5. Submission of Contributions. Unless You explicitly state otherwise,
244
- any Contribution intentionally submitted for inclusion in the Work
245
- by You to the Licensor shall be under the terms and conditions of
246
- this License, without any additional terms or conditions.
247
- Notwithstanding the above, nothing herein shall supersede or modify
248
- the terms of any separate license agreement you may have executed
249
- with Licensor regarding such Contributions.
250
-
251
- 6. Trademarks. This License does not grant permission to use the trade
252
- names, trademarks, service marks, or product names of the Licensor,
253
- except as required for reasonable and customary use in describing the
254
- origin of the Work and reproducing the content of the NOTICE file.
255
-
256
- 7. Disclaimer of Warranty. Unless required by applicable law or
257
- agreed to in writing, Licensor provides the Work (and each
258
- Contributor provides its Contributions) on an "AS IS" BASIS,
259
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
260
- implied, including, without limitation, any warranties or conditions
261
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
262
- PARTICULAR PURPOSE. You are solely responsible for determining the
263
- appropriateness of using or redistributing the Work and assume any
264
- risks associated with Your exercise of permissions under this License.
265
-
266
- 8. Limitation of Liability. In no event and under no legal theory,
267
- whether in tort (including negligence), contract, or otherwise,
268
- unless required by applicable law (such as deliberate and grossly
269
- negligent acts) or agreed to in writing, shall any Contributor be
270
- liable to You for damages, including any direct, indirect, special,
271
- incidental, or consequential damages of any character arising as a
272
- result of this License or out of the use or inability to use the
273
- Work (including but not limited to damages for loss of goodwill,
274
- work stoppage, computer failure or malfunction, or any and all
275
- other commercial damages or losses), even if such Contributor
276
- has been advised of the possibility of such damages.
277
-
278
- 9. Accepting Warranty or Additional Liability. While redistributing
279
- the Work or Derivative Works thereof, You may choose to offer,
280
- and charge a fee for, acceptance of support, warranty, indemnity,
281
- or other liability obligations and/or rights consistent with this
282
- License. However, in accepting such obligations, You may act only
283
- on Your own behalf and on Your sole responsibility, not on behalf
284
- of any other Contributor, and only if You agree to indemnify,
285
- defend, and hold each Contributor harmless for any liability
286
- incurred by, or claims asserted against, such Contributor by reason
287
- of your accepting any such warranty or additional liability.
288
-
289
- END OF TERMS AND CONDITIONS
290
-
291
-
292
- ================================================================================
293
-
294
- For licensing enquiries: legal@imagine.io
76
+
77
+ Files: static/assets/draco/ (draco\_decoder.js, draco\_decoder.wasm, draco\_encoder.js, draco\_encoder.wasm, draco\_encoder\_wrapper.js, draco\_wasm\_wrapper.js) and the accompanying README.md
78
+
79
+ Purpose: Decompressing KHR\_draco\_mesh\_compression geometry and compressing AR exports
80
+
81
+ Project: https://github.com/google/draco
82
+
83
+ Copyright: The Draco Authors
84
+
85
+ License: Apache License, Version 2.0 (reproduced in Appendix B)
86
+
87
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
88
+
89
+ Statement of changes: The binary and JavaScript files are unmodified prebuilt builds obtained from the three.js distribution (three/examples/jsm/libs/draco/). The accompanying README.md is Google's text, changed only in formatting (bullet characters and quotation style) by an automated Markdown formatter.
90
+
91
+ \================================================================================
92
+
93
+ APPENDIX B \-- APACHE LICENSE, VERSION 2.0
94
+
95
+ The license below applies ONLY to the component named in Appendix A. It grants no rights in any other part of the Software.
96
+
97
+ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
98
+
99
+ **TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION**
100
+
101
+ 1\. Definitions.
102
+
103
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
104
+
105
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
106
+
107
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
108
+
109
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
110
+
111
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
112
+
113
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
114
+
115
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the example below).
116
+
117
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
118
+
119
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
120
+
121
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
122
+
123
+ 2\. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
124
+
125
+ 3\. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
126
+
127
+ 4\. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
128
+
129
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
130
+
131
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
132
+
133
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
134
+
135
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
136
+
137
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
138
+
139
+ 5\. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement You may have executed with Licensor regarding such Contributions.
140
+
141
+ 6\. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7\. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
144
+
145
+ 8\. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
146
+
147
+ 9\. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
148
+
149
+ **END OF TERMS AND CONDITIONS**
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @imagine/configurator-sdk
1
+ # @imagineio/configurator-sdk
2
2
 
3
3
  Build a 3D product configurator and make it yours. One publishable engine — scene,
4
4
  options, pricing, save/share, AR, AI chat — driven entirely by your backend: data
@@ -15,7 +15,7 @@ Vite template scaffolds React 19, which the SDK's 3D stack doesn't support yet
15
15
  fails with `ERESOLVE`:
16
16
 
17
17
  ```bash
18
- npm install @imagine/configurator-sdk react@^18.2 react-dom@^18.2
18
+ npm install @imagineio/configurator-sdk react@^18.2 react-dom@^18.2
19
19
  npm install -D @types/react@^18.3 @types/react-dom@^18.3 # the scaffold's are React 19's
20
20
  ```
21
21
 
@@ -28,14 +28,14 @@ dedupes three/react for you):
28
28
 
29
29
  ```js
30
30
  // vite.config.js
31
- import imagineConfigurator from '@imagine/configurator-sdk/vite';
31
+ import imagineConfigurator from '@imagineio/configurator-sdk/vite';
32
32
  export default defineConfig({ plugins: [react(), imagineConfigurator()] });
33
33
  ```
34
34
 
35
35
  …or follow the manual steps in the Getting Started guide.
36
36
 
37
37
  ```jsx
38
- import { mount, config } from '@imagine/configurator-sdk';
38
+ import { mount, config } from '@imagineio/configurator-sdk';
39
39
 
40
40
  // The backend endpoint is built into the SDK — only the key is yours to set.
41
41
  config.setApiKey('YOUR_ORG_API_KEY');
@@ -66,6 +66,69 @@ in `script-src` / `style-src` / `font-src`, or point the override at your own or
66
66
 
67
67
  ## License
68
68
 
69
- Proprietary — see [`LICENSE.md`](LICENSE.md), which also carries the notice and full
70
- licence text for the one third-party component redistributed inside the package
71
- (Google Draco, Apache-2.0).
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
@@ -153,7 +153,27 @@
153
153
  flex: 1 1 auto;
154
154
  min-height: 0;
155
155
  overflow-y: auto;
156
- scrollbar-gutter: stable; /* rows do not shift when the scrollbar appears */
156
+ }
157
+
158
+ /* NO SCROLLBAR IN THE PANEL.
159
+ styles/globals.css gives every scroller an 8px bar with a SOLID track
160
+ (`background: var(--bg-secondary)`), which against this shell's warm cream panel read as a
161
+ grey stripe down its edge. Styling it slim and transparent helped, but the bar still sat
162
+ INSIDE the panel between the rows and its edge, which is worse than nothing on a list this
163
+ short.
164
+ Hidden, which is also what every other shell does — .sidebar__content has hidden its
165
+ scrollbar since the beginning, so this panel was the one place the global default ever
166
+ showed. Scrolling still works by wheel, trackpad, touch and keyboard; only the painted bar
167
+ goes. `scrollbar-gutter: stable` went with it: it reserved room so rows would not shift when
168
+ a visible bar appeared, and nothing appears now. */
169
+ .showcase-layout .showcase-rows,
170
+ .showcase-layout .showcase-panel {
171
+ scrollbar-width: none; /* Firefox */
172
+ -ms-overflow-style: none; /* legacy Edge */
173
+ }
174
+ .showcase-layout .showcase-rows::-webkit-scrollbar,
175
+ .showcase-layout .showcase-panel::-webkit-scrollbar {
176
+ display: none;
157
177
  }
158
178
  .showcase-row {
159
179
  display: flex;
@@ -1 +1 @@
1
- import{Fragment as Jt,jsx as I,jsxs as ct}from"react/jsx-runtime";import{useCallback as tt,useEffect as Y,useMemo as X,useRef as Ee,useState as Pt,useSyncExternalStore as Ne}from"react";import{Html as un,useProgress as pn}from"@react-three/drei";import T from"./9c6c598569.js";import B from"./872c4302e0.js";import D from"./be337ddda5.js";import ft from"./d94df858ea.js";import{normalizeMaterialTargets as hn}from"./dc2a1a0e13.js";import O from"./8f60e5059a.js";import mn from"./60d697292c.js";import fn from"./811b403d43.js";import{useUiToggles as gn}from"./d0f9681634.js";import{ProductInstance as Qt,SelectionActionPanel as In,FreeMovable as Sn,PlacementGaps as yn,SceneStage as bn,SceneRoom as vn,SceneProductsSource as Pn}from"./8a3a57c008.js";import Mn from"./205827c5c8.js";import{computeTargets as xn,resolveTarget as wn,resolveTargetRenderer as Cn,resolveInsertSequence as _n}from"./58e6419ba8.js";import{disarmPlacement as Xe}from"./ab6c80484f.js";import{resolveComponent as Ze,useComponentRegistry as Tn}from"./882bc739c8.js";import{SlotHost as Fn}from"./73f7d65985.js";import{ModalHost as Gn}from"./09c4973968.js";import On from"./6c0a2572dd.js";import An from"./20b0104576.js";import{getConfigState as kn,subscribe as He,getVersion as At}from"./817d930a49.js";import{getPlacementStrategy as je}from"./281cf952fa.js";import{resolveAddMode as Dn,armPlacement as Ln}from"./ab6c80484f.js";import{resolveReplaceTarget as Rn}from"./4d7a0d1897.js";import{enforceCorners as qn}from"./388cadacbd.js";import{resolvePlacementStrategyConfig as Ve}from"./281cf952fa.js";import{getLabel as zn}from"./28d887bf8a.js";import{isAddFeature as En}from"./8c27edda0f.js";import{usePlacementInteraction as Nn}from"./4b8958aa4c.js";import{refreshCanonicalState as Xn,seedInitialState as Zn,addProduct as kt}from"./a77b15c0d6.js";import{resolveLayout as Hn,hasLayout as jn,useLayoutRegistry as Vn,layoutOverride as Un,_publishResolvedLayoutKey as Wn}from"./31ea036f5c.js";import{themeLayoutKey as Yn,useSystemTheme as Bn}from"./5c9fd9201c.js";import"./1a2629800a.css";import{runIntent as Dt,INTENTS as Lt}from"./6d238282c1.js";function Kn(){const P=ft(a=>a.sceneSelections),v=ft(a=>a.selectionOrder),S=T(a=>a.activeSceneConfigId),p=D(a=>a.defaultPresetId),c=D(a=>a.sceneConfigurations),F=D(a=>a.getSceneFeatures),y=Ne(He,At,At);return X(()=>{const a=S||p||Object.keys(c||{})[0],Mt=a?F(a):[],h=B.getState(),K=[],it=new Set,et=(l,R)=>{if(!l||l.id==null||it.has(String(l.id))||R>4)return;it.add(String(l.id)),K.push(l);const f=(h.features?.[l.id]||h.features?.[String(l.id)])?.childOptionSetIds||[];for(const d of f){const Z=h.features?.[d]||h.features?.[String(d)];Z&&et({id:d,type:Z.type,sequence:Z.sequence},R+1)}};for(const l of Mt)et(l,0);const G=K.filter(l=>/finish/i.test(l.type||"")&&P[l.id]!=null).sort((l,R)=>{const _=v?.[String(l.id)]??-1,f=v?.[String(R.id)]??-1;return _!==f?_-f:(l.sequence??0)-(R.sequence??0)}),z={};for(const l of G){const R=P[l.id],_=h.options?.[R]?.value;if(_==null)continue;const f=h.features?.[l.id]||{},d=hn(f.materialTargets??f.material_targets??f.materials);for(const Z of d)z[String(Z).toLowerCase()]=_}return z},[P,v,S,p,c,F,y])}function $n(P,v){if(v==null)return null;const S=String(v);for(const p of Object.values(P.products||{})){const c=p?.components_configuration||p?.componentsConfiguration;if(!(!c||typeof c!="object"))for(const F of Object.values(c))for(const y of Array.isArray(F)?F:[F]){const a=y&&typeof y=="object"?y.componentId??y.component_id:y;if(a!=null&&String(a)===S)return p}}return null}function Qn(P){const v=ft(h=>h.sceneSelections),S=ft(h=>h.setSceneSelection),p=D(h=>h.getSceneFeatures),c=D(h=>h.sceneConfigurations),F=Ne(He,At,At),y=X(()=>new Set((P?p(P)||[]:[]).filter(h=>En(h)).map(h=>String(h.id))),[P,p,c,F]),a=Ee({}),Mt=ft(h=>h.sceneSelectionsSettled);Y(()=>{if(!Mt){a.current={...v};return}const h=a.current,K=[];for(const[G,z]of Object.entries(v||{}))h[G]===z||z==null||y.has(String(G))&&K.push([G,z]);if(a.current={...v},!K.length)return;const it=D.getState().systemId;let et=!1;return(async()=>{const G=B.getState(),z=T.getState();for(const[l,R]of K){const _=G.options?.[R];let f=_?.valueProductVariantId??_?.value_product_variant_id??_?.value_product_variant??_?.variantId??_?.variant_id??null,d=f!=null?G.getProduct?.(f):null;if(d==null){const u=_?.value??(G.optionToProducts?.[String(R)]||[])[0]??_?.product_id??_?.productId??null;d=u!=null?G.getProduct?.(u):null,d==null&&u!=null&&G.getComponent?.(u)&&(d=$n(G,u)),f=d?.id??f??u}else f=d?.id??f;if(f==null){S(l,null);continue}const Z=d?.id??f,lt=d?.placementGroup??d?.placement_group??null,$=d?.productGraph??d?.product_graph??null,H=d?.compatibleSlots??d?.compatible_slots??null;if(Array.isArray(H)&&H.length){const u=new Set(H.map(String));if(Object.values(z.productInstances||{}).some(ut=>{const st=G.getProduct?.(ut.variantId)||G.getProduct?.(ut.productId),g=st?.product_graph??st?.productGraph;return g!=null&&u.has(String(g))})){O.getState().setPendingSlotPlacement?.({productId:Z,variantId:f,name:d?.name??d?.displayName??d?.variantName??"product",compatibleGraphIds:Array.from(u)}),S(l,null);continue}}if(Dn(it,d)==="arm"){Ln({productId:Z,variantId:f});const u=je(),xt=typeof u?.computeTargets=="function",ut=Object.prototype.hasOwnProperty.call(u??{},"armHint")?u.armHint:zn(xt?"placement.armedPickTarget":"placement.armedPickGap",xt?"":"Click a + between pieces to insert it.");ut&&O.getState().showInfo?.(ut),S(l,null);continue}const dt=T.getState(),E=dt.selectedInstanceId,gt=E!=null?(dt.productInstances||{})[E]:null,nt=gt&&Number.isFinite(Number(gt.sequence))?Number(gt.sequence):void 0,It=Rn({placementGroup:lt}),ot=It!=null?(dt.productInstances||{})[It]:null,te=ot&&Number.isFinite(Number(ot.sequence))?Number(ot.sequence):nt,ee=Array.isArray(ot?.position)?ot.position:[0,0,0];let ne=null;try{ne=await Dt({type:Lt.PRODUCT_ADD,productGraphId:$,variantId:f,placementGroup:lt,sequence:te,replacePlacementId:It??void 0},u=>kt({productGraphId:u.productGraphId,variantId:u.variantId,placementGroup:u.placementGroup,position:ee,sequence:u.sequence,replace:u.replacePlacementId!=null,replacePlacementId:u.replacePlacementId}))}catch{}if(et)return;S(l,null)}})(),()=>{et=!0}},[v,y,P,S])}function Jn({position:P,onClick:v}){const[S,p]=Pt(!1);return I(un,{position:P,center:!0,style:{pointerEvents:"auto"},zIndexRange:[100,0],children:I("div",{onClick:v,onPointerEnter:()=>p(!0),onPointerLeave:()=>p(!1),style:{width:22,height:22,borderRadius:"50%",background:S?"#ff8a65":"rgba(255, 87, 34, 0.85)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--bg-primary, #fff)",fontSize:13,fontWeight:"bold",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",cursor:"pointer",transition:"transform 0.2s",transform:S?"scale(1.15)":"scale(1)"},children:"+"})})}function to({isMobile:P}={}){Tn();const v=Ze("SelectionActionPanel",In),S=T(t=>t.productInstances),p=B(t=>t.getProduct),c=B(t=>t.componentGroups),F=T(t=>t.clearSelection),y=T(t=>t.selectedInstanceId),a=T(t=>t.isFocusing),Mt=T(t=>t.removeProductInstance),h=T(t=>t.addProductInstance),K=T(t=>t.updateInstancePosition),it=T(t=>t.updateInstanceRotation),et=T(t=>t.activeSceneConfigId),G=D(t=>t.defaultPresetId),z=D(t=>t.sceneConfigurations),l=D(t=>t.systemId),R=D(t=>t.useTransform),_=O(t=>t.sceneCapabilities),f=O(t=>t.showWalls),d=O(t=>t.showDimensions),Z=O(t=>t.pendingSlotPlacement),lt=Kn(),$=O(t=>t.hostMaterialOverrides),H=(kn()||{}).room||null,dt=et||G||Object.keys(z||{})[0]||null;Qn(dt);const[E,gt]=Pt(!0),[nt,It]=Pt(!1),ot=tt(async()=>{try{await Zn()}catch{}It(!0)},[]),{edgeOf:te,cornerOf:ee,isHostAnchored:ne,isMovable:u,rawFree:xt,splitReliable:ut,freeInstances:st,ordered:g,syntheticHosts:oe,moveInFlightRef:no}=mn(),wt=X(()=>new Map(oe.map(t=>[t.hostedProductId,t])),[oe]),[St,We]=Pt({}),Rt=tt((t,e)=>{We(n=>{const o=n[t],r=e.full||null;return o&&o.width===e.width&&o.depth===e.depth&&o.height===e.height&&o.cx===e.cx&&o.cz===e.cz&&(o.full?.width??null)===(r?.width??null)&&(o.full?.height??null)===(r?.height??null)&&(o.full?.depth??null)===(r?.depth??null)?n:{...n,[t]:{width:e.width,depth:e.depth,height:e.height,cx:e.cx,cz:e.cz,full:r}}})},[]),pt=tt(t=>St[t]||null,[St]),se=B(t=>t.placementBoundsExcludeIds),re=X(()=>new Set((se||[]).map(t=>String(t))),[se]),qt=tt((t,e)=>{const n=t?.componentId??e?.id??e?.componentId??null;return n!=null&&re.has(String(n))||/leg|arm/i.test(String(t?.slotKey||""))?!0:(e?.groups||e?.group_ids||[]).some(r=>{const i=c?.[r]||c?.[String(r)];return/leg|arm/i.test(String(i?.name??i?.slotKey??i?.slot_key??""))})},[c,re]),yt=Ee(!1),L=g.length+st.length,zt=X(()=>[...g,...st],[g,st]),ht=L>0&&zt.every(t=>St[t.productId]),Et=X(()=>zt.filter(t=>St[t.productId]).length,[zt,St]),{active:ae,loaded:ce,total:Nt}=pn(),ie=O(t=>t.isEvaluating),Ct=O(t=>t.isLayoutLoading),le=O(t=>t.bootEvaluating);Y(()=>{if(!nt)return;const t=!ae&&(Nt===0||ce>=Nt),e=(ht||L===0)&&t&&!ie&&!le,n=()=>{gt(!1),O.getState().endBootLoading()};if(e){const r=setTimeout(n,900);return()=>clearTimeout(r)}const o=setTimeout(n,15e3);return()=>clearTimeout(o)},[nt,ht,L,Et,ae,ce,Nt,ie,le]);const[de,ue]=Pt(!1);Y(()=>{if(!E){ue(!1);return}(ht&&L>0||nt&&L===0)&&ue(!0)},[ht,L,nt,E]);const pe=nt?de||L===0?"Finishing up\u2026":`Loading products\u2026 ${Math.min(Et,L)}/${L}`:"Preparing your configurator\u2026",he=de?100:L>0?Math.min(Math.round(Et/L*100),92):0;Y(()=>{E&&O.getState().setBootPhase(pe,he)},[E,pe,he]),Y(()=>(O.setState({initialSceneLoading:E}),()=>O.setState({initialSceneLoading:!1})),[E]),Y(()=>{Ct&&(yt.current=!1)},[Ct]),Y(()=>{if(L===0){yt.current=!1;return}if(yt.current||E||Ct||!ht)return;const t=requestAnimationFrame(()=>{yt.current||(T.getState().resetCameraToDefault?.({instant:!0}),yt.current=!0)});return()=>cancelAnimationFrame(t)},[L,E,Ct,ht]);const bt=je(),_t=X(()=>g.map(t=>{const e=wt.get(t.id);return e?{...t,productId:e.hostVariantId}:t}),[g,wt]),me=R||!!z?.[dt]?.useTransform,N=T(t=>t.pendingPlacementPiece),fe=!!N&&typeof bt?.computeTargets=="function"&&!!Cn(),rt=X(()=>{const t={getProduct:p,getDims:pt,useTransform:me,candidate:N,openSlots:fe,config:Ve()},e=bt.computeLayout?bt.computeLayout(_t,t):_t.map(()=>({position:[0,0,0],rotation:[0,0,0]}));return qn(e,_t,t,bt)},[bt,_t,p,pt,me,N,fe]),j=X(()=>{const e=H?.height>0?H.height:2.7,n=.1,o=.05,r=new Map;let i=1/0,M=-1/0,A=1/0,m=-1/0,V=0,k=!1;if(g.forEach((s,U)=>{const x=rt[U];if(!x||u(s))return;const b=x.position||[0,0,0],w=pt(s.productId),W=p(s.productId),q=w?.full||w,Yt=q?.height>0?q.height:W?.height>0?W.height*.0254:0,Gt=(b[1]||0)+Yt;if(Gt>V&&(V=Gt),(s.positionedAbove??s.positioned_above)!=null)return;const Bt=(b[1]||0)<=.01,Ot=-((Array.isArray(x.rotation)?x.rotation[1]:0)||0),Kt=w?.depth>0?w.depth:W?.depth>0?W.depth*.0254:.6,$t=w?.width>0?w.width:W?.width>0?W.width*.0254:.9,Q=Math.cos(Ot),J=Math.sin(Ot),Pe=w?.cx||0,Me=w?.cz||0,xe=b[0]+Q*Pe-J*Me,we=b[2]+J*Pe+Q*Me,Ce=($t*Math.abs(Q)+Kt*Math.abs(J))/2,_e=($t*Math.abs(J)+Kt*Math.abs(Q))/2,Te=xe-Ce,Fe=xe+Ce,Ge=we-_e,Oe=we+_e,Ae=q?.width>0?q.width:$t,ke=q?.depth>0?q.depth:Kt,De=b[0]+Q*(q?.cx||0)-J*(q?.cz||0),Le=b[2]+J*(q?.cx||0)+Q*(q?.cz||0),Re=(Ae*Math.abs(Q)+ke*Math.abs(J))/2,qe=(Ae*Math.abs(J)+ke*Math.abs(Q))/2,an=De-Re,cn=De+Re,ln=Le-qe,dn=Le+qe,ze=String((Math.round(Ot/(Math.PI/2))%4+4)%4),C=r.get(ze)||{heading:Ot,minX:1/0,maxX:-1/0,minZ:1/0,maxZ:-1/0,fMinX:1/0,fMaxX:-1/0,fMinZ:1/0,fMaxZ:-1/0,hasFloor:!1};C.minX=Math.min(C.minX,Te),C.maxX=Math.max(C.maxX,Fe),C.minZ=Math.min(C.minZ,Ge),C.maxZ=Math.max(C.maxZ,Oe),Bt&&(C.fMinX=Math.min(C.fMinX,Te),C.fMaxX=Math.max(C.fMaxX,Fe),C.fMinZ=Math.min(C.fMinZ,Ge),C.fMaxZ=Math.max(C.fMaxZ,Oe),C.hasFloor=!0),r.set(ze,C),i=Math.min(i,an),M=Math.max(M,cn),A=Math.min(A,ln),m=Math.max(m,dn),k=!0}),!k)return null;const mt=Math.max(e,V>0?V+.02:e),Tt=[...r.values()].map(s=>{const U=Math.sin(s.heading),x=Math.cos(s.heading),b=U,w=-x,W=Math.abs(b)>Math.abs(w),q=s.hasFloor?s.fMinX:s.minX,Yt=s.hasFloor?s.fMaxX:s.maxX,Gt=s.hasFloor?s.fMinZ:s.minZ,Bt=s.hasFloor?s.fMaxZ:s.maxZ,ve=W?(b>0?Yt:q)+(b>0?n/2:-n/2):(w>0?Bt:Gt)+(w>0?n/2:-n/2);return{g:s,isSide:W,plane:ve}}),nn=Tt.filter(s=>s.isSide).map(s=>s.plane),on=Tt.filter(s=>!s.isSide).map(s=>s.plane),Ht=[];for(const s of Tt){const{g:U}=s;if(s.isSide){let x=U.minZ,b=U.maxZ;for(const w of on)x=Math.min(x,w),b=Math.max(b,w);Ht.push({cx:s.plane,cz:(x+b)/2,cy:mt/2,length:b-x+o*2,thickness:n,height:mt,rotY:Math.PI/2})}else{let x=U.minX,b=U.maxX;for(const w of nn)x=Math.min(x,w),b=Math.max(b,w);Ht.push({cx:(x+b)/2,cz:s.plane,cy:mt/2,length:b-x+o*2,thickness:n,height:mt,rotY:0})}}const Ft=.4,be=M>i&&m>A;let jt=i-Ft,Vt=M+Ft,Ut=A-Ft,Wt=m+Ft;for(const s of Tt){const U=Math.sin(s.g.heading),x=-Math.cos(s.g.heading);s.isSide?U<0?jt=s.plane-n/2:Vt=s.plane+n/2:x<0?Ut=s.plane-n/2:Wt=s.plane+n/2}const sn=be?{cx:(jt+Vt)/2,cz:(Ut+Wt)/2,w:Vt-jt,d:Wt-Ut}:null,rn=be?{minX:i,maxX:M,minZ:A,maxZ:m,w:M-i,d:m-A,h:mt,height:V>0?V:mt}:null;return{segments:Ht,floor:sn,bbox:rn}},[g,rt,H,pt,p,u]),Ye=f&&!!(j&&j.segments&&j.segments.length),Be=d&&!!(j&&j.bbox&&j.bbox.w>0),Ke=(t,e)=>{const n=rt[e]||{position:[0,0,0],rotation:[0,0,0]},o=wt.get(t.id);if(!o)return n;const r=n.position||[0,0,0],i=(Array.isArray(n.rotation)?n.rotation[1]:0)||0,M=Math.cos(i),A=Math.sin(i),m=o.offset||[0,0,0];return{position:[r[0]+(m[0]||0)*M+(m[2]||0)*A,r[1]+(m[1]||0),r[2]-(m[0]||0)*A+(m[2]||0)*M],rotation:[0,i+(o.rotDegY||0)*Math.PI/180,0]}},at=Z,vt=!!at,ge=X(()=>{if(!at)return new Set;const t=new Set((at.compatibleGraphIds||[]).map(String)),e=new Set;for(const n of Object.values(S||{})){const o=p(n.variantId)||p(n.productId),r=o?.product_graph??o?.productGraph;r!=null&&t.has(String(r))&&e.add(String(n.id))}return e},[at,S,p]),Xt=tt(()=>{O.getState().clearPendingSlotPlacement?.(),O.getState().clearPendingHostedProduct?.()},[]),Ie=tt((t,e)=>{if(!e)return;const n=B.getState(),o=n.getProduct?.(e.variantId)||n.getProduct?.(e.productId),r=o?.productGraph??o?.product_graph??null,i=T.getState().productInstances?.[String(t)],M=o?.placementGroup??o?.placement_group??i?.placementGroup??null,A=Array.isArray(i?.position)?i.position:[0,0,0],m=i?.variantId??i?.productId??null,V=Number.isFinite(Number(i?.sequence))?Number(i.sequence):void 0;Xt(),Dt({type:Lt.PRODUCT_ADD,productGraphId:r,variantId:e.variantId??e.productId,placementGroup:M,sequence:V,hostPlacementId:String(t),hostVariantId:m},k=>kt({productGraphId:k.productGraphId,variantId:k.variantId,placementGroup:k.placementGroup,position:A,sequence:k.sequence,hostPlacementId:k.hostPlacementId,hostVariantId:k.hostVariantId}).catch(()=>{}))},[Xt]),Zt=tt((t,e)=>{const n=B.getState(),o=n.getProduct?.(e.variantId)||n.getProduct?.(e.productId),r=o?.productGraph??o?.product_graph??null,i=o?.placementGroup??o?.placement_group??null,M=g[t-1]||g[t],A=Array.isArray(M?.position)?M.position:[0,0,0],m=g[t],V=m&&Number.isFinite(Number(m.sequence))?Number(m.sequence):void 0;Dt({type:Lt.PRODUCT_ADD,productGraphId:r,variantId:e.variantId??e.productId,placementGroup:i,sequence:V},k=>kt({productGraphId:k.productGraphId,variantId:k.variantId,placementGroup:k.placementGroup,position:A,sequence:k.sequence}).catch(()=>{}))},[g]);Y(()=>{if(!N||g.length>0)return;const t=N;Xe(),Zt(0,t)},[N,g.length,Zt]);const{gaps:$e,onInsert:Qe}=Nn({systemId:l,count:g.length,positionOf:t=>rt[t]?.position||[0,0,0],insertAt:Zt}),Se=X(()=>{if(!N)return[];const t=B.getState();return xn(g,{candidate:N,getProduct:e=>t.getProduct?.(e),getDims:pt,config:Ve(),layout:rt})},[N,g,rt,pt]),Je=tt(t=>{const e=wn(t,{candidate:N});if(!e)return;const n=B.getState(),o=n.getProduct?.(e.variantId)||n.getProduct?.(e.productId),r=o?.productGraph??o?.product_graph??null,i=o?.placementGroup??o?.placement_group??null,M=e.transform?.position??t.position??[0,0,0],A=_n(e,t,g);Dt({type:Lt.PRODUCT_ADD,productGraphId:r,variantId:e.variantId??e.productId,placementGroup:i,anchor:e.anchor??null,sequence:A},m=>kt({productGraphId:m.productGraphId,variantId:m.variantId,placementGroup:m.placementGroup,position:M,sequence:m.sequence}).catch(()=>{})),Xe()},[N,g]),{selectedInst:oo,swapOrder:so,panelActions:ye,priceInfo:tn}=fn(),en=gn()("selectionPanel");Y(()=>{if(y==null)return;const t=S||{},e=String(y),n="__host";if(e.endsWith(n)){const o=e.slice(0,-n.length);if(t[o]||Object.values(t).some(r=>String(r?.id??r?.instanceId)===o))return}else if(t[y]||Object.values(t).some(o=>String(o?.instanceId??o?.id)===e))return;F?.()},[y,S,F]);const ao=ft(t=>t.placementPricing),co=D(t=>t.getChannelPriceConfig);return ct(Jt,{children:[I(Pn,{onSeeded:ot}),ct(bn,{isMobile:P,camera:{position:[2.6,2.2,4],fov:45},controlsTarget:[0,.5,0],onPointerMissed:()=>F?.(),groundShadowCatcher:!0,overlay:ct(Jt,{children:[!vt&&ye&&en?I(v,{actions:ye,priceInfo:tn}):null,vt&&I("div",{className:"placement-mode-overlay",children:ct("div",{className:"placement-mode-overlay__content",children:[ct("span",{className:"placement-mode-overlay__text",children:["Click on a highlighted slot to place ",I("strong",{children:at?.name})]}),I("button",{type:"button",className:"placement-mode-overlay__cancel",onClick:Xt,children:I("span",{className:"placement-mode-overlay__cancel-text",children:"Cancel"})})]})}),I(Fn,{name:"overlay"}),a&&I("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,zIndex:30,cursor:"default"}})]}),children:[Ye&&I(vn,{width:H?.width,depth:H?.depth,height:H?.height??j?.bbox?.h??2.7,showCeiling:_?.ceiling===!0,segments:j?.segments||null,floor:j?.floor||null}),Be&&(()=>{const t=Ze("SceneDimensions",An);return I(t,{bbox:j.bbox})})(),g.map((t,e)=>{const n=wt.get(t.id),o=rt[e]||{position:[0,0,0],rotation:[0,0,0]};return o.hidden?null:ct("group",{children:[n&&I(Qt,{instance:{id:n.id,instanceId:n.id,productId:n.hostVariantId,variantId:n.hostVariantId,position:o.position||[0,0,0],rotation:o.rotation||[0,0,0]},slotMaterials:{...lt,...$?.[n.hostedProductId]||{},...$?.[n.id]||{}},stateInstanceId:n.hostedProductId,onSelect:()=>T.getState().selectInstance(n.id),isSelected:String(y)===String(n.id),onMeasure:r=>Rt(n.hostVariantId,r),footprintExcludeItem:qt,hoverable:!0,focusable:!0},n.id),I(Qt,{instance:{...t,...Ke(t,e)},slotMaterials:{...lt,...$?.[t.id]||$?.[t.instanceId]||{}},onSelect:(r,i,M)=>{if(vt){ge.has(String(t.id))&&Ie(t.id,at);return}T.getState().selectInstance(r,M??null)},isSelected:!vt&&String(y)===String(t.instanceId??t.id),onMeasure:r=>Rt(t.productId,r),footprintExcludeItem:qt,hoverable:!0,focusable:!0}),vt&&ge.has(String(t.id))&&I(Jn,{position:[o.position?.[0]||0,(o.position?.[1]||0)+.45,o.position?.[2]||0],onClick:()=>Ie(t.id,at)})]},t.id??t.instanceId??e)}),st.map((t,e)=>I(Sn,{selected:y===t.id,disabled:!!t.locked,position:t.position||[0,0,0],rotationY:(Array.isArray(t.rotation)&&t.rotation[1]||0)*Math.PI/180,onCommit:({position:n,rotationY:o})=>{K(t.id,n),it(t.id,[0,o*180/Math.PI,0]),Xn({allowRevert:!0}).catch(()=>{})},children:I(Qt,{instance:{...t,position:[0,0,0],rotation:[0,0,0]},slotMaterials:{...lt,...$?.[t.id]||$?.[t.instanceId]||{}},onMeasure:n=>Rt(t.productId,n),footprintExcludeItem:qt})},t.id??t.instanceId??`free-${e}`)),Se.length>0?I(Mn,{targets:Se,onPick:Je}):I(yn,{gaps:$e,onInsert:Qe})]})]})}const Ue=new Set;function eo(){Vn();const P=D(a=>a.systemLayoutTemplate),v=D(a=>a.systemTheme),S=D(a=>a.systemThemeRecord);Bn(v,S);const p=Yn(S)||(v?String(v).trim().toLowerCase():null);let c=P;try{const a=new URLSearchParams(window.location.search);a.has("template")?c=a.get("template"):a.has("theme")&&(c=a.get("theme"))}catch{}c=c||P||p||null;const F=Un();F&&(c=F),!F&&!P&&c&&c===p&&!jn(c)&&!/^theme\d+$/.test(c)&&!Ue.has(c)&&Ue.add(c),Wn(c);const y=Hn(c);return ct(Jt,{children:[I(y,{Scene:to,template:c}),I(Gn,{}),I(On,{})]})}export{to as SharedConfiguratorScene,eo as default};
1
+ import{Fragment as ne,jsx as g,jsxs as rt}from"react/jsx-runtime";import{useCallback as nt,useEffect as K,useMemo as X,useRef as te,useState as Pt,useSyncExternalStore as Ne}from"react";import{Html as un,useProgress as pn}from"@react-three/drei";import F from"./9c6c598569.js";import $ from"./872c4302e0.js";import R from"./be337ddda5.js";import mt from"./d94df858ea.js";import{normalizeMaterialTargets as hn}from"./dc2a1a0e13.js";import A from"./8f60e5059a.js";import mn from"./60d697292c.js";import fn from"./811b403d43.js";import{useUiToggles as gn}from"./d0f9681634.js";import{ProductInstance as ee,SelectionActionPanel as In,FreeMovable as Sn,PlacementGaps as yn,SceneStage as bn,SceneRoom as vn,SceneProductsSource as Pn}from"./8a3a57c008.js";import Mn from"./205827c5c8.js";import{computeTargets as xn,resolveTarget as wn,resolveTargetRenderer as Cn,resolveInsertSequence as _n}from"./58e6419ba8.js";import{disarmPlacement as Xe}from"./ab6c80484f.js";import{resolveComponent as Ze,useComponentRegistry as Tn}from"./882bc739c8.js";import{SlotHost as Fn}from"./73f7d65985.js";import{ModalHost as Gn}from"./09c4973968.js";import On from"./6c0a2572dd.js";import An from"./20b0104576.js";import{getConfigState as kn,subscribe as He,getVersion as kt}from"./817d930a49.js";import{getPlacementStrategy as je}from"./281cf952fa.js";import{resolveAddMode as Dn,armPlacement as Rn}from"./ab6c80484f.js";import{resolveReplaceTarget as Ln}from"./4d7a0d1897.js";import{enforceCorners as qn}from"./388cadacbd.js";import{resolvePlacementStrategyConfig as Ve}from"./281cf952fa.js";import{getLabel as zn}from"./28d887bf8a.js";import{isAddFeature as En}from"./8c27edda0f.js";import{usePlacementInteraction as Nn}from"./4b8958aa4c.js";import{refreshCanonicalState as Xn,seedInitialState as Zn,addProduct as Dt}from"./a77b15c0d6.js";import{resolveLayout as Hn,hasLayout as jn,useLayoutRegistry as Vn,layoutOverride as Un,_publishResolvedLayoutKey as Wn}from"./31ea036f5c.js";import{themeLayoutKey as Yn,useSystemTheme as Bn}from"./5c9fd9201c.js";import"./1a2629800a.css";import{runIntent as Rt,INTENTS as Lt}from"./6d238282c1.js";function Kn(){const x=mt(r=>r.sceneSelections),I=mt(r=>r.selectionOrder),h=F(r=>r.activeSceneConfigId),u=R(r=>r.defaultPresetId),i=R(r=>r.sceneConfigurations),G=R(r=>r.getSceneFeatures),S=Ne(He,kt,kt);return X(()=>{const r=h||u||Object.keys(i||{})[0],ft=r?G(r):[],U=$.getState(),b=[],Q=new Set,at=(c,O)=>{if(!c||c.id==null||Q.has(String(c.id))||O>4)return;Q.add(String(c.id)),b.push(c);const P=(U.features?.[c.id]||U.features?.[String(c.id)])?.childOptionSetIds||[];for(const M of P){const d=U.features?.[M]||U.features?.[String(M)];d&&at({id:M,type:d.type,sequence:d.sequence},O+1)}};for(const c of ft)at(c,0);const ct=b.filter(c=>/finish/i.test(c.type||"")&&x[c.id]!=null).sort((c,O)=>{const E=I?.[String(c.id)]??-1,P=I?.[String(O.id)]??-1;return E!==P?E-P:(c.sequence??0)-(O.sequence??0)}),y={};for(const c of ct){const O=x[c.id],E=U.options?.[O]?.value;if(E==null)continue;const P=U.features?.[c.id]||{},M=hn(P.materialTargets??P.material_targets??P.materials);for(const d of M)y[String(d).toLowerCase()]=E}return y},[x,I,h,u,i,G,S])}function $n(x,I){if(I==null)return null;const h=String(I);for(const u of Object.values(x.products||{})){const i=u?.components_configuration||u?.componentsConfiguration;if(!(!i||typeof i!="object"))for(const G of Object.values(i))for(const S of Array.isArray(G)?G:[G]){const r=S&&typeof S=="object"?S.componentId??S.component_id:S;if(r!=null&&String(r)===h)return u}}return null}function Qn(x){const I=mt(b=>b.sceneSelections),h=mt(b=>b.setSceneSelection),u=R(b=>b.getSceneFeatures),i=R(b=>b.sceneConfigurations),G=Ne(He,kt,kt),S=X(()=>new Set((x?u(x)||[]:[]).filter(b=>En(b)).map(b=>String(b.id))),[x,u,i,G]),r=te({}),ft=te(!1),U=mt(b=>b.sceneSelectionsSettled);K(()=>{if(!U){r.current={...I};return}if(!ft.current){ft.current=!0;let y=!1;for(const[c,O]of Object.entries(I||{}))O==null||!S.has(String(c))||(h(c,null),y=!0);if(y){r.current={...I};return}}const b=r.current,Q=[];for(const[y,c]of Object.entries(I||{}))b[y]===c||c==null||S.has(String(y))&&Q.push([y,c]);if(r.current={...I},!Q.length)return;const at=R.getState().systemId;let ct=!1;return(async()=>{const y=$.getState(),c=F.getState();for(const[O,E]of Q){const P=y.options?.[E];let M=P?.valueProductVariantId??P?.value_product_variant_id??P?.value_product_variant??P?.variantId??P?.variant_id??null,d=M!=null?y.getProduct?.(M):null;if(d==null){const m=P?.value??(y.optionToProducts?.[String(E)]||[])[0]??P?.product_id??P?.productId??null;d=m!=null?y.getProduct?.(m):null,d==null&&m!=null&&y.getComponent?.(m)&&(d=$n(y,m)),M=d?.id??M??m}else M=d?.id??M;if(M==null){h(O,null);continue}const it=d?.id??M,W=d?.placementGroup??d?.placement_group??null,J=d?.productGraph??d?.product_graph??null,lt=d?.compatibleSlots??d?.compatible_slots??null;if(Array.isArray(lt)&&lt.length){const m=new Set(lt.map(String));if(Object.values(c.productInstances||{}).some(Z=>{const f=y.getProduct?.(Z.variantId)||y.getProduct?.(Z.productId),It=f?.product_graph??f?.productGraph;return It!=null&&m.has(String(It))})){A.getState().setPendingSlotPlacement?.({productId:it,variantId:M,name:d?.name??d?.displayName??d?.variantName??"product",compatibleGraphIds:Array.from(m)}),h(O,null);continue}}if(Dn(at,d)==="arm"){Rn({productId:it,variantId:M});const m=je(),wt=typeof m?.computeTargets=="function",Z=Object.prototype.hasOwnProperty.call(m??{},"armHint")?m.armHint:zn(wt?"placement.armedPickTarget":"placement.armedPickGap",wt?"":"Click a + between pieces to insert it.");Z&&A.getState().showInfo?.(Z),h(O,null);continue}const q=F.getState(),Mt=q.selectedInstanceId,Y=Mt!=null?(q.productInstances||{})[Mt]:null,qt=Y&&Number.isFinite(Number(Y.sequence))?Number(Y.sequence):void 0,gt=Ln({placementGroup:W}),dt=gt!=null?(q.productInstances||{})[gt]:null,oe=dt&&Number.isFinite(Number(dt.sequence))?Number(dt.sequence):qt,se=Array.isArray(dt?.position)?dt.position:[0,0,0];let xt=null;try{xt=await Rt({type:Lt.PRODUCT_ADD,productGraphId:J,variantId:M,placementGroup:W,sequence:oe,replacePlacementId:gt??void 0},m=>Dt({productGraphId:m.productGraphId,variantId:m.variantId,placementGroup:m.placementGroup,position:se,sequence:m.sequence,replace:m.replacePlacementId!=null,replacePlacementId:m.replacePlacementId}))}catch{}if(h(O,null),ct)return}})(),()=>{ct=!0}},[I,S,x,h])}function Jn({position:x,onClick:I}){const[h,u]=Pt(!1);return g(un,{position:x,center:!0,style:{pointerEvents:"auto"},zIndexRange:[100,0],children:g("div",{onClick:I,onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),style:{width:22,height:22,borderRadius:"50%",background:h?"#ff8a65":"rgba(255, 87, 34, 0.85)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--bg-primary, #fff)",fontSize:13,fontWeight:"bold",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",cursor:"pointer",transition:"transform 0.2s",transform:h?"scale(1.15)":"scale(1)"},children:"+"})})}function to({isMobile:x}={}){Tn();const I=Ze("SelectionActionPanel",In),h=F(t=>t.productInstances),u=$(t=>t.getProduct),i=$(t=>t.componentGroups),G=F(t=>t.clearSelection),S=F(t=>t.selectedInstanceId),r=F(t=>t.isFocusing),ft=F(t=>t.removeProductInstance),U=F(t=>t.addProductInstance),b=F(t=>t.updateInstancePosition),Q=F(t=>t.updateInstanceRotation),at=F(t=>t.activeSceneConfigId),ct=R(t=>t.defaultPresetId),y=R(t=>t.sceneConfigurations),c=R(t=>t.systemId),O=R(t=>t.useTransform),E=A(t=>t.sceneCapabilities),P=A(t=>t.showWalls),M=A(t=>t.showDimensions),d=A(t=>t.pendingSlotPlacement),it=Kn(),W=A(t=>t.hostMaterialOverrides),J=(kn()||{}).room||null,lt=at||ct||Object.keys(y||{})[0]||null;Qn(lt);const[q,Mt]=Pt(!0),[Y,qt]=Pt(!1),gt=nt(async()=>{try{await Zn()}catch{}qt(!0)},[]),{edgeOf:dt,cornerOf:oe,isHostAnchored:se,isMovable:xt,rawFree:m,splitReliable:wt,freeInstances:Z,ordered:f,syntheticHosts:It,moveInFlightRef:no}=mn(),Ct=X(()=>new Map(It.map(t=>[t.hostedProductId,t])),[It]),[St,We]=Pt({}),zt=nt((t,e)=>{We(n=>{const o=n[t],a=e.full||null;return o&&o.width===e.width&&o.depth===e.depth&&o.height===e.height&&o.cx===e.cx&&o.cz===e.cz&&(o.full?.width??null)===(a?.width??null)&&(o.full?.height??null)===(a?.height??null)&&(o.full?.depth??null)===(a?.depth??null)?n:{...n,[t]:{width:e.width,depth:e.depth,height:e.height,cx:e.cx,cz:e.cz,full:a}}})},[]),ut=nt(t=>St[t]||null,[St]),re=$(t=>t.placementBoundsExcludeIds),ae=X(()=>new Set((re||[]).map(t=>String(t))),[re]),Et=nt((t,e)=>{const n=t?.componentId??e?.id??e?.componentId??null;return n!=null&&ae.has(String(n))||/leg|arm/i.test(String(t?.slotKey||""))?!0:(e?.groups||e?.group_ids||[]).some(a=>{const l=i?.[a]||i?.[String(a)];return/leg|arm/i.test(String(l?.name??l?.slotKey??l?.slot_key??""))})},[i,ae]),yt=te(!1),L=f.length+Z.length,Nt=X(()=>[...f,...Z],[f,Z]),pt=L>0&&Nt.every(t=>St[t.productId]),Xt=X(()=>Nt.filter(t=>St[t.productId]).length,[Nt,St]),{active:ce,loaded:ie,total:Zt}=pn(),le=A(t=>t.isEvaluating),_t=A(t=>t.isLayoutLoading),de=A(t=>t.bootEvaluating);K(()=>{if(!Y)return;const t=!ce&&(Zt===0||ie>=Zt),e=(pt||L===0)&&t&&!le&&!de,n=()=>{Mt(!1),A.getState().endBootLoading()};if(e){const a=setTimeout(n,900);return()=>clearTimeout(a)}const o=setTimeout(n,15e3);return()=>clearTimeout(o)},[Y,pt,L,Xt,ce,ie,Zt,le,de]);const[ue,pe]=Pt(!1);K(()=>{if(!q){pe(!1);return}(pt&&L>0||Y&&L===0)&&pe(!0)},[pt,L,Y,q]);const he=Y?ue||L===0?"Finishing up\u2026":`Loading products\u2026 ${Math.min(Xt,L)}/${L}`:"Preparing your configurator\u2026",me=ue?100:L>0?Math.min(Math.round(Xt/L*100),92):0;K(()=>{q&&A.getState().setBootPhase(he,me)},[q,he,me]),K(()=>(A.setState({initialSceneLoading:q}),()=>A.setState({initialSceneLoading:!1})),[q]),K(()=>{_t&&(yt.current=!1)},[_t]),K(()=>{if(L===0){yt.current=!1;return}if(yt.current||q||_t||!pt)return;const t=requestAnimationFrame(()=>{yt.current||(F.getState().resetCameraToDefault?.({instant:!0}),yt.current=!0)});return()=>cancelAnimationFrame(t)},[L,q,_t,pt]);const bt=je(),Tt=X(()=>f.map(t=>{const e=Ct.get(t.id);return e?{...t,productId:e.hostVariantId}:t}),[f,Ct]),fe=O||!!y?.[lt]?.useTransform,N=F(t=>t.pendingPlacementPiece),ge=!!N&&typeof bt?.computeTargets=="function"&&!!Cn(),ot=X(()=>{const t={getProduct:u,getDims:ut,useTransform:fe,candidate:N,openSlots:ge,config:Ve()},e=bt.computeLayout?bt.computeLayout(Tt,t):Tt.map(()=>({position:[0,0,0],rotation:[0,0,0]}));return qn(e,Tt,t,bt)},[bt,Tt,u,ut,fe,N,ge]),H=X(()=>{const e=J?.height>0?J.height:2.7,n=.1,o=.05,a=new Map;let l=1/0,w=-1/0,k=1/0,p=-1/0,j=0,D=!1;if(f.forEach((s,V)=>{const C=ot[V];if(!C||xt(s))return;const v=C.position||[0,0,0],_=ut(s.productId),B=u(s.productId),z=_?.full||_,Kt=z?.height>0?z.height:B?.height>0?B.height*.0254:0,Ot=(v[1]||0)+Kt;if(Ot>j&&(j=Ot),(s.positionedAbove??s.positioned_above)!=null)return;const $t=(v[1]||0)<=.01,At=-((Array.isArray(C.rotation)?C.rotation[1]:0)||0),Qt=_?.depth>0?_.depth:B?.depth>0?B.depth*.0254:.6,Jt=_?.width>0?_.width:B?.width>0?B.width*.0254:.9,tt=Math.cos(At),et=Math.sin(At),Me=_?.cx||0,xe=_?.cz||0,we=v[0]+tt*Me-et*xe,Ce=v[2]+et*Me+tt*xe,_e=(Jt*Math.abs(tt)+Qt*Math.abs(et))/2,Te=(Jt*Math.abs(et)+Qt*Math.abs(tt))/2,Fe=we-_e,Ge=we+_e,Oe=Ce-Te,Ae=Ce+Te,ke=z?.width>0?z.width:Jt,De=z?.depth>0?z.depth:Qt,Re=v[0]+tt*(z?.cx||0)-et*(z?.cz||0),Le=v[2]+et*(z?.cx||0)+tt*(z?.cz||0),qe=(ke*Math.abs(tt)+De*Math.abs(et))/2,ze=(ke*Math.abs(et)+De*Math.abs(tt))/2,an=Re-qe,cn=Re+qe,ln=Le-ze,dn=Le+ze,Ee=String((Math.round(At/(Math.PI/2))%4+4)%4),T=a.get(Ee)||{heading:At,minX:1/0,maxX:-1/0,minZ:1/0,maxZ:-1/0,fMinX:1/0,fMaxX:-1/0,fMinZ:1/0,fMaxZ:-1/0,hasFloor:!1};T.minX=Math.min(T.minX,Fe),T.maxX=Math.max(T.maxX,Ge),T.minZ=Math.min(T.minZ,Oe),T.maxZ=Math.max(T.maxZ,Ae),$t&&(T.fMinX=Math.min(T.fMinX,Fe),T.fMaxX=Math.max(T.fMaxX,Ge),T.fMinZ=Math.min(T.fMinZ,Oe),T.fMaxZ=Math.max(T.fMaxZ,Ae),T.hasFloor=!0),a.set(Ee,T),l=Math.min(l,an),w=Math.max(w,cn),k=Math.min(k,ln),p=Math.max(p,dn),D=!0}),!D)return null;const ht=Math.max(e,j>0?j+.02:e),Ft=[...a.values()].map(s=>{const V=Math.sin(s.heading),C=Math.cos(s.heading),v=V,_=-C,B=Math.abs(v)>Math.abs(_),z=s.hasFloor?s.fMinX:s.minX,Kt=s.hasFloor?s.fMaxX:s.maxX,Ot=s.hasFloor?s.fMinZ:s.minZ,$t=s.hasFloor?s.fMaxZ:s.maxZ,Pe=B?(v>0?Kt:z)+(v>0?n/2:-n/2):(_>0?$t:Ot)+(_>0?n/2:-n/2);return{g:s,isSide:B,plane:Pe}}),nn=Ft.filter(s=>s.isSide).map(s=>s.plane),on=Ft.filter(s=>!s.isSide).map(s=>s.plane),Vt=[];for(const s of Ft){const{g:V}=s;if(s.isSide){let C=V.minZ,v=V.maxZ;for(const _ of on)C=Math.min(C,_),v=Math.max(v,_);Vt.push({cx:s.plane,cz:(C+v)/2,cy:ht/2,length:v-C+o*2,thickness:n,height:ht,rotY:Math.PI/2})}else{let C=V.minX,v=V.maxX;for(const _ of nn)C=Math.min(C,_),v=Math.max(v,_);Vt.push({cx:(C+v)/2,cz:s.plane,cy:ht/2,length:v-C+o*2,thickness:n,height:ht,rotY:0})}}const Gt=.4,ve=w>l&&p>k;let Ut=l-Gt,Wt=w+Gt,Yt=k-Gt,Bt=p+Gt;for(const s of Ft){const V=Math.sin(s.g.heading),C=-Math.cos(s.g.heading);s.isSide?V<0?Ut=s.plane-n/2:Wt=s.plane+n/2:C<0?Yt=s.plane-n/2:Bt=s.plane+n/2}const sn=ve?{cx:(Ut+Wt)/2,cz:(Yt+Bt)/2,w:Wt-Ut,d:Bt-Yt}:null,rn=ve?{minX:l,maxX:w,minZ:k,maxZ:p,w:w-l,d:p-k,h:ht,height:j>0?j:ht}:null;return{segments:Vt,floor:sn,bbox:rn}},[f,ot,J,ut,u,xt]),Ye=P&&!!(H&&H.segments&&H.segments.length),Be=M&&!!(H&&H.bbox&&H.bbox.w>0),Ke=(t,e)=>{const n=ot[e]||{position:[0,0,0],rotation:[0,0,0]},o=Ct.get(t.id);if(!o)return n;const a=n.position||[0,0,0],l=(Array.isArray(n.rotation)?n.rotation[1]:0)||0,w=Math.cos(l),k=Math.sin(l),p=o.offset||[0,0,0];return{position:[a[0]+(p[0]||0)*w+(p[2]||0)*k,a[1]+(p[1]||0),a[2]-(p[0]||0)*k+(p[2]||0)*w],rotation:[0,l+(o.rotDegY||0)*Math.PI/180,0]}},st=d,vt=!!st,Ie=X(()=>{if(!st)return new Set;const t=new Set((st.compatibleGraphIds||[]).map(String)),e=new Set;for(const n of Object.values(h||{})){const o=u(n.variantId)||u(n.productId),a=o?.product_graph??o?.productGraph;a!=null&&t.has(String(a))&&e.add(String(n.id))}return e},[st,h,u]),Ht=nt(()=>{A.getState().clearPendingSlotPlacement?.(),A.getState().clearPendingHostedProduct?.()},[]),Se=nt((t,e)=>{if(!e)return;const n=$.getState(),o=n.getProduct?.(e.variantId)||n.getProduct?.(e.productId),a=o?.productGraph??o?.product_graph??null,l=F.getState().productInstances?.[String(t)],w=o?.placementGroup??o?.placement_group??l?.placementGroup??null,k=Array.isArray(l?.position)?l.position:[0,0,0],p=l?.variantId??l?.productId??null,j=Number.isFinite(Number(l?.sequence))?Number(l.sequence):void 0;Ht(),Rt({type:Lt.PRODUCT_ADD,productGraphId:a,variantId:e.variantId??e.productId,placementGroup:w,sequence:j,hostPlacementId:String(t),hostVariantId:p},D=>Dt({productGraphId:D.productGraphId,variantId:D.variantId,placementGroup:D.placementGroup,position:k,sequence:D.sequence,hostPlacementId:D.hostPlacementId,hostVariantId:D.hostVariantId}).catch(()=>{}))},[Ht]),jt=nt((t,e)=>{const n=$.getState(),o=n.getProduct?.(e.variantId)||n.getProduct?.(e.productId),a=o?.productGraph??o?.product_graph??null,l=o?.placementGroup??o?.placement_group??null,w=f[t-1]||f[t],k=Array.isArray(w?.position)?w.position:[0,0,0],p=f[t],j=p&&Number.isFinite(Number(p.sequence))?Number(p.sequence):void 0;Rt({type:Lt.PRODUCT_ADD,productGraphId:a,variantId:e.variantId??e.productId,placementGroup:l,sequence:j},D=>Dt({productGraphId:D.productGraphId,variantId:D.variantId,placementGroup:D.placementGroup,position:k,sequence:D.sequence}).catch(()=>{}))},[f]);K(()=>{if(!N||f.length>0)return;const t=N;Xe(),jt(0,t)},[N,f.length,jt]);const{gaps:$e,onInsert:Qe}=Nn({systemId:c,count:f.length,positionOf:t=>ot[t]?.position||[0,0,0],insertAt:jt}),ye=X(()=>{if(!N)return[];const t=$.getState();return xn(f,{candidate:N,getProduct:e=>t.getProduct?.(e),getDims:ut,config:Ve(),layout:ot})},[N,f,ot,ut]),Je=nt(t=>{const e=wn(t,{candidate:N});if(!e)return;const n=$.getState(),o=n.getProduct?.(e.variantId)||n.getProduct?.(e.productId),a=o?.productGraph??o?.product_graph??null,l=o?.placementGroup??o?.placement_group??null,w=e.transform?.position??t.position??[0,0,0],k=_n(e,t,f);Rt({type:Lt.PRODUCT_ADD,productGraphId:a,variantId:e.variantId??e.productId,placementGroup:l,anchor:e.anchor??null,sequence:k},p=>Dt({productGraphId:p.productGraphId,variantId:p.variantId,placementGroup:p.placementGroup,position:w,sequence:p.sequence}).catch(()=>{})),Xe()},[N,f]),{selectedInst:oo,swapOrder:so,panelActions:be,priceInfo:tn}=fn(),en=gn()("selectionPanel");K(()=>{if(S==null)return;const t=h||{},e=String(S),n="__host";if(e.endsWith(n)){const o=e.slice(0,-n.length);if(t[o]||Object.values(t).some(a=>String(a?.id??a?.instanceId)===o))return}else if(t[S]||Object.values(t).some(o=>String(o?.instanceId??o?.id)===e))return;G?.()},[S,h,G]);const ao=mt(t=>t.placementPricing),co=R(t=>t.getChannelPriceConfig);return rt(ne,{children:[g(Pn,{onSeeded:gt}),rt(bn,{isMobile:x,camera:{position:[2.6,2.2,4],fov:45},controlsTarget:[0,.5,0],onPointerMissed:()=>G?.(),groundShadowCatcher:!0,overlay:rt(ne,{children:[!vt&&be&&en?g(I,{actions:be,priceInfo:tn}):null,vt&&g("div",{className:"placement-mode-overlay",children:rt("div",{className:"placement-mode-overlay__content",children:[rt("span",{className:"placement-mode-overlay__text",children:["Click on a highlighted slot to place ",g("strong",{children:st?.name})]}),g("button",{type:"button",className:"placement-mode-overlay__cancel",onClick:Ht,children:g("span",{className:"placement-mode-overlay__cancel-text",children:"Cancel"})})]})}),g(Fn,{name:"overlay"}),r&&g("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,zIndex:30,cursor:"default"}})]}),children:[Ye&&g(vn,{width:J?.width,depth:J?.depth,height:J?.height??H?.bbox?.h??2.7,showCeiling:E?.ceiling===!0,segments:H?.segments||null,floor:H?.floor||null}),Be&&(()=>{const t=Ze("SceneDimensions",An);return g(t,{bbox:H.bbox})})(),f.map((t,e)=>{const n=Ct.get(t.id),o=ot[e]||{position:[0,0,0],rotation:[0,0,0]};return o.hidden?null:rt("group",{children:[n&&g(ee,{instance:{id:n.id,instanceId:n.id,productId:n.hostVariantId,variantId:n.hostVariantId,position:o.position||[0,0,0],rotation:o.rotation||[0,0,0]},slotMaterials:{...it,...W?.[n.hostedProductId]||{},...W?.[n.id]||{}},stateInstanceId:n.hostedProductId,onSelect:()=>F.getState().selectInstance(n.id),isSelected:String(S)===String(n.id),onMeasure:a=>zt(n.hostVariantId,a),footprintExcludeItem:Et,hoverable:!0,focusable:!0},n.id),g(ee,{instance:{...t,...Ke(t,e)},slotMaterials:{...it,...W?.[t.id]||W?.[t.instanceId]||{}},onSelect:(a,l,w)=>{if(vt){Ie.has(String(t.id))&&Se(t.id,st);return}F.getState().selectInstance(a,w??null)},isSelected:!vt&&String(S)===String(t.instanceId??t.id),onMeasure:a=>zt(t.productId,a),footprintExcludeItem:Et,hoverable:!0,focusable:!0}),vt&&Ie.has(String(t.id))&&g(Jn,{position:[o.position?.[0]||0,(o.position?.[1]||0)+.45,o.position?.[2]||0],onClick:()=>Se(t.id,st)})]},t.id??t.instanceId??e)}),Z.map((t,e)=>g(Sn,{selected:S===t.id,disabled:!!t.locked,position:t.position||[0,0,0],rotationY:(Array.isArray(t.rotation)&&t.rotation[1]||0)*Math.PI/180,onCommit:({position:n,rotationY:o})=>{b(t.id,n),Q(t.id,[0,o*180/Math.PI,0]),Xn({allowRevert:!0}).catch(()=>{})},children:g(ee,{instance:{...t,position:[0,0,0],rotation:[0,0,0]},slotMaterials:{...it,...W?.[t.id]||W?.[t.instanceId]||{}},onMeasure:n=>zt(t.productId,n),footprintExcludeItem:Et})},t.id??t.instanceId??`free-${e}`)),ye.length>0?g(Mn,{targets:ye,onPick:Je}):g(yn,{gaps:$e,onInsert:Qe})]})]})}const Ue=new Set;function eo(){Vn();const x=R(r=>r.systemLayoutTemplate),I=R(r=>r.systemTheme),h=R(r=>r.systemThemeRecord);Bn(I,h);const u=Yn(h)||(I?String(I).trim().toLowerCase():null);let i=x;try{const r=new URLSearchParams(window.location.search);r.has("template")?i=r.get("template"):r.has("theme")&&(i=r.get("theme"))}catch{}i=i||x||u||null;const G=Un();G&&(i=G),!G&&!x&&i&&i===u&&!jn(i)&&!/^theme\d+$/.test(i)&&!Ue.has(i)&&Ue.add(i),Wn(i);const S=Hn(i);return rt(ne,{children:[g(S,{Scene:to,template:i}),g(Gn,{}),g(On,{})]})}export{to as SharedConfiguratorScene,eo as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as s}from"react/jsx-runtime";import{useMemo as c}from"react";import*as y from"three";import{getConcreteWallMaterial as v}from"./22bd38ddcf.js";const o=.1;function b({width:h=4,depth:l=3.5,height:i=2.7,showCeiling:u=!1,showLeftWall:S=!0,showRightWall:w=!0,segments:p=null,floor:a=null}){const r=c(()=>{try{return v()}catch{return null}},[]),g=c(()=>new y.MeshStandardMaterial({color:"#d8d2c8",roughness:.95,metalness:0}),[]),M=c(()=>new y.MeshStandardMaterial({color:"#f0ece6",roughness:1,metalness:0}),[]);if(Array.isArray(p))return s("group",{name:"scene-room",children:[a&&e("mesh",{rotation:[-Math.PI/2,0,0],position:[a.cx||0,0,a.cz||0],material:g,receiveShadow:!0,children:e("planeGeometry",{args:[a.w>0?a.w:4,a.d>0?a.d:4]})}),p.map((t,x)=>s("mesh",{position:[t.cx,t.cy??i/2,t.cz],rotation:[0,t.rotY||0,0],material:r||void 0,receiveShadow:!0,children:[e("boxGeometry",{args:[t.length>0?t.length:1,t.height>0?t.height:i,t.thickness>0?t.thickness:o]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]},x)),u&&a&&e("mesh",{rotation:[Math.PI/2,0,0],position:[a.cx||0,i,a.cz||0],material:M,children:e("planeGeometry",{args:[a.w>0?a.w:4,a.d>0?a.d:4]})})]});const m=h>0?h:4,d=l>0?l:3.5,n=i>0?i:2.7,G=-d/2;return s("group",{name:"scene-room",children:[e("mesh",{rotation:[-Math.PI/2,0,0],position:[0,0,0],material:g,receiveShadow:!0,children:e("planeGeometry",{args:[m,d]})}),s("mesh",{position:[0,n/2,G-o/2],material:r||void 0,receiveShadow:!0,children:[e("boxGeometry",{args:[m+o*2,n,o]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]}),S&&s("mesh",{position:[-m/2-o/2,n/2,0],material:r||void 0,receiveShadow:!0,children:[e("boxGeometry",{args:[o,n,d]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]}),w&&s("mesh",{position:[m/2+o/2,n/2,0],material:r||void 0,receiveShadow:!0,children:[e("boxGeometry",{args:[o,n,d]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]}),u&&e("mesh",{rotation:[Math.PI/2,0,0],position:[0,n,0],material:M,children:e("planeGeometry",{args:[m,d]})})]})}export{b as default};
1
+ import{jsx as e,jsxs as s}from"react/jsx-runtime";import{useMemo as c}from"react";import*as S from"three";import{getConcreteWallMaterial as v}from"./22bd38ddcf.js";const o=.1;function b({width:h=4,depth:l=3.5,height:i=2.7,showCeiling:u=!1,showLeftWall:w=!0,showRightWall:y=!0,segments:p=null,floor:a=null}){const r=c(()=>{try{return v()}catch{return null}},[]),g=c(()=>new S.MeshStandardMaterial({color:"#d8d2c8",roughness:.95,metalness:0}),[]),M=c(()=>new S.MeshStandardMaterial({color:"#f0ece6",roughness:1,metalness:0}),[]);if(Array.isArray(p))return s("group",{name:"scene-room",children:[a&&e("mesh",{rotation:[-Math.PI/2,0,0],position:[a.cx||0,0,a.cz||0],material:g,receiveShadow:!0,children:e("planeGeometry",{args:[a.w>0?a.w:4,a.d>0?a.d:4]})}),p.map((t,x)=>s("mesh",{position:[t.cx,t.cy??i/2,t.cz],rotation:[0,t.rotY||0,0],material:r||void 0,receiveShadow:!0,castShadow:!0,children:[e("boxGeometry",{args:[t.length>0?t.length:1,t.height>0?t.height:i,t.thickness>0?t.thickness:o]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]},x)),u&&a&&e("mesh",{rotation:[Math.PI/2,0,0],position:[a.cx||0,i,a.cz||0],material:M,children:e("planeGeometry",{args:[a.w>0?a.w:4,a.d>0?a.d:4]})})]});const m=h>0?h:4,d=l>0?l:3.5,n=i>0?i:2.7,G=-d/2;return s("group",{name:"scene-room",children:[e("mesh",{rotation:[-Math.PI/2,0,0],position:[0,0,0],material:g,receiveShadow:!0,children:e("planeGeometry",{args:[m,d]})}),s("mesh",{position:[0,n/2,G-o/2],material:r||void 0,receiveShadow:!0,castShadow:!0,children:[e("boxGeometry",{args:[m+o*2,n,o]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]}),w&&s("mesh",{position:[-m/2-o/2,n/2,0],material:r||void 0,receiveShadow:!0,castShadow:!0,children:[e("boxGeometry",{args:[o,n,d]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]}),y&&s("mesh",{position:[m/2+o/2,n/2,0],material:r||void 0,receiveShadow:!0,castShadow:!0,children:[e("boxGeometry",{args:[o,n,d]}),!r&&e("meshStandardMaterial",{color:"#e8e4dd",roughness:.95})]}),u&&e("mesh",{rotation:[Math.PI/2,0,0],position:[0,n,0],material:M,children:e("planeGeometry",{args:[m,d]})})]})}export{b as default};
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@imagineio/configurator-sdk",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0",
4
4
  "description": "Configurator SDK — backend Configuration Engine client, state stores, shared 3D scene primitives, and pluggable placement (strategy + type). Drives every configurator (kitchen, sectional, …) from one self-contained surface.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
7
7
  "publishConfig": {
8
8
  "access": "public",
9
- "tag": "beta"
9
+ "tag": "latest"
10
10
  },
11
11
  "main": "./dist/a0f71d0bf5.js",
12
12
  "module": "./dist/a0f71d0bf5.js",