@roomle/embedding-lib 9.0.0-alpha.1 → 9.0.0-alpha.3
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/docs/md/web/embedding/CHANGELOG.md +58 -98
- package/package.json +1 -1
- package/roomle-embedding-lib.js +64 -55
- package/roomle-embedding-lib.min.js +10 -1
|
@@ -1,99 +1,59 @@
|
|
|
1
|
-
## 9.0.0-alpha.
|
|
1
|
+
## 9.0.0-alpha.3 (2026-10-22)
|
|
2
2
|
|
|
3
|
-
* Merge branch '
|
|
4
|
-
* Merge branch 'master' into
|
|
5
|
-
* Merge branch 'master' into feat/assistant-
|
|
6
|
-
* Merge branch 'master' into
|
|
7
|
-
* Merge branch 'master' into
|
|
8
|
-
* Merge branch 'master' into
|
|
9
|
-
* Merge branch 'master' into fix/
|
|
10
|
-
* Merge branch 'master' into fix/
|
|
11
|
-
* Merge branch 'master' into fix/
|
|
12
|
-
* Merge
|
|
13
|
-
* Merge
|
|
14
|
-
* Merge
|
|
15
|
-
* Merge
|
|
16
|
-
* Merge
|
|
17
|
-
* Merge
|
|
18
|
-
* Merge pull request #
|
|
19
|
-
* Merge pull request #
|
|
20
|
-
* Merge pull request #
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* feat:
|
|
44
|
-
* feat:
|
|
45
|
-
* feat(
|
|
46
|
-
* feat(
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* fix(planner): keep outer wall thickness when deleting a room wall ([17ef1f1](https://github.com/roomle-dev/roomle-ui/commit/17ef1f1))
|
|
61
|
-
* fix(hi): keep the article template whose root the library could not calculate ([f1a940b](https://github.com/roomle-dev/roomle-ui/commit/f1a940b))
|
|
62
|
-
* fix: keep zod out of the public declarations of the hi mcp tools ([afafb0e](https://github.com/roomle-dev/roomle-ui/commit/afafb0e))
|
|
63
|
-
* fix: leave the collision box out of the anchor frame of a hi placement ([7f13b44](https://github.com/roomle-dev/roomle-ui/commit/7f13b44))
|
|
64
|
-
* fix: let the adjust icon take the fill of its button ([68e0407](https://github.com/roomle-dev/roomle-ui/commit/68e0407))
|
|
65
|
-
* fix: let the hi mcp tools that read the plan wait for a running change ([c3aab4d](https://github.com/roomle-dev/roomle-ui/commit/c3aab4d))
|
|
66
|
-
* fix: measure and place interior fittings where their parts are ([ba70c7b](https://github.com/roomle-dev/roomle-ui/commit/ba70c7b))
|
|
67
|
-
* fix(hi): name the offsetMm that keeps a corner group clear of the adjoining wall's window ([7e084d0](https://github.com/roomle-dev/roomle-ui/commit/7e084d0))
|
|
68
|
-
* fix: read the installation elements from the plan objects, not the object DTO ([bca4849](https://github.com/roomle-dev/roomle-ui/commit/bca4849))
|
|
69
|
-
* fix(planner): rebind wall handlers when invisible wall becomes visible again on undo ([2c0c8b9](https://github.com/roomle-dev/roomle-ui/commit/2c0c8b9))
|
|
70
|
-
* fix(hi): recognise upper-row roots by their layout and keep carrier links on a replace ([1db06b1](https://github.com/roomle-dev/roomle-ui/commit/1db06b1))
|
|
71
|
-
* fix: resolve a wall side label to the wall face, openings included ([612c10f](https://github.com/roomle-dev/roomle-ui/commit/612c10f))
|
|
72
|
-
* fix(planner): restore wall visibility toggle in flying menu and drawer ([23e6dca](https://github.com/roomle-dev/roomle-ui/commit/23e6dca))
|
|
73
|
-
* fix: tobuffer JIT fix ([3a463c9](https://github.com/roomle-dev/roomle-ui/commit/3a463c9))
|
|
74
|
-
* fix: traa artifacts caused by fog render order ([463555c](https://github.com/roomle-dev/roomle-ui/commit/463555c))
|
|
75
|
-
* refactor(planner): clean up wall deletion leftovers ([f9bfebb](https://github.com/roomle-dev/roomle-ui/commit/f9bfebb))
|
|
76
|
-
* refactor: move the planning assistant into the embedding-lib ([38f7eb1](https://github.com/roomle-dev/roomle-ui/commit/38f7eb1))
|
|
77
|
-
* refactor(planner): remove wall visibility toggle from UI in favor of wall deletion ([67c0efa](https://github.com/roomle-dev/roomle-ui/commit/67c0efa))
|
|
78
|
-
* docs: describe the measured placement of interior fittings ([a4b9c7f](https://github.com/roomle-dev/roomle-ui/commit/a4b9c7f))
|
|
79
|
-
* docs: describe the obstacle and installation-element sections of the plan context ([137d569](https://github.com/roomle-dev/roomle-ui/commit/137d569))
|
|
80
|
-
* docs: document the hi tool commands and the article selector ([a824ba2](https://github.com/roomle-dev/roomle-ui/commit/a824ba2))
|
|
81
|
-
* chore: delete doors as well on deleting walls ([e101afb](https://github.com/roomle-dev/roomle-ui/commit/e101afb))
|
|
82
|
-
* chore(fix): end drawing issue and update floor square meter after deleting room ([e4c983e](https://github.com/roomle-dev/roomle-ui/commit/e4c983e))
|
|
83
|
-
* chore: formatting ([3b487eb](https://github.com/roomle-dev/roomle-ui/commit/3b487eb))
|
|
84
|
-
* chore: merge release/test back into master ([51bc9b3](https://github.com/roomle-dev/roomle-ui/commit/51bc9b3))
|
|
85
|
-
* chore: merge release/test back into master ([11c456b](https://github.com/roomle-dev/roomle-ui/commit/11c456b))
|
|
86
|
-
* chore: update quality settings ([c138124](https://github.com/roomle-dev/roomle-ui/commit/c138124))
|
|
87
|
-
* chore: webgpu debug modes and cleanup ([b631f2c](https://github.com/roomle-dev/roomle-ui/commit/b631f2c))
|
|
88
|
-
* test(planner-core): add regression test for wall handler rebinding on undo ([ddba94a](https://github.com/roomle-dev/roomle-ui/commit/ddba94a))
|
|
89
|
-
* test: fix playwright test for manual drawing ([100d294](https://github.com/roomle-dev/roomle-ui/commit/100d294))
|
|
90
|
-
* test: fix sdk failing tests ([c8c25df](https://github.com/roomle-dev/roomle-ui/commit/c8c25df))
|
|
91
|
-
* test: isolate configurator component tests with automatic cleanup ([1fb983e](https://github.com/roomle-dev/roomle-ui/commit/1fb983e))
|
|
92
|
-
* style(planner): format plan-view-model test file ([897d6ae](https://github.com/roomle-dev/roomle-ui/commit/897d6ae))
|
|
93
|
-
|
|
94
|
-
### BREAKING CHANGE
|
|
95
|
-
|
|
96
|
-
* the example takes the plan id from the id query parameter
|
|
97
|
-
instead of plan_id.
|
|
98
|
-
|
|
99
|
-
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
3
|
+
* Merge branch 'master' into ci/embedding-lib-dev ([94a1df9](https://github.com/roomle-dev/roomle-ui/commit/94a1df9))
|
|
4
|
+
* Merge branch 'master' into ci/embedding-lib-dev ([4ddd28b](https://github.com/roomle-dev/roomle-ui/commit/4ddd28b))
|
|
5
|
+
* Merge branch 'master' into feat/planning-assistant-input ([f241e13](https://github.com/roomle-dev/roomle-ui/commit/f241e13))
|
|
6
|
+
* Merge branch 'master' into fix/e2e-block-real-requests-RML-18084 ([e6b298b](https://github.com/roomle-dev/roomle-ui/commit/e6b298b))
|
|
7
|
+
* Merge branch 'master' into fix/e2e-block-real-requests-RML-18084 ([fd3c26c](https://github.com/roomle-dev/roomle-ui/commit/fd3c26c))
|
|
8
|
+
* Merge branch 'master' into fix/e2e-block-real-requests-RML-18084 ([bd8b63c](https://github.com/roomle-dev/roomle-ui/commit/bd8b63c))
|
|
9
|
+
* Merge branch 'master' into fix/loco-upload-content-length-RML-18277 ([561f289](https://github.com/roomle-dev/roomle-ui/commit/561f289))
|
|
10
|
+
* Merge branch 'master' into fix/loco-upload-content-length-RML-18277 ([bff0f68](https://github.com/roomle-dev/roomle-ui/commit/bff0f68))
|
|
11
|
+
* Merge branch 'master' into fix/loco-upload-content-length-RML-18277 ([97236d4](https://github.com/roomle-dev/roomle-ui/commit/97236d4))
|
|
12
|
+
* Merge pull request #3096 from roomle-dev/fix/e2e-block-real-requests-RML-18084 ([8a9e467](https://github.com/roomle-dev/roomle-ui/commit/8a9e467)), closes [#3096](https://github.com/roomle-dev/roomle-ui/issues/3096)
|
|
13
|
+
* Merge pull request #3149 from roomle-dev/feat/planning-assistant-input ([8703bae](https://github.com/roomle-dev/roomle-ui/commit/8703bae)), closes [#3149](https://github.com/roomle-dev/roomle-ui/issues/3149)
|
|
14
|
+
* Merge pull request #3152 from roomle-dev/ci/embedding-lib-dev ([a5e1024](https://github.com/roomle-dev/roomle-ui/commit/a5e1024)), closes [#3152](https://github.com/roomle-dev/roomle-ui/issues/3152)
|
|
15
|
+
* Merge pull request #3154 from roomle-dev/chore/ai-image-output-guideline-RML-18261 ([44c0785](https://github.com/roomle-dev/roomle-ui/commit/44c0785)), closes [#3154](https://github.com/roomle-dev/roomle-ui/issues/3154)
|
|
16
|
+
* Merge pull request #3159 from roomle-dev/fix/loco-upload-content-length-RML-18277 ([9dbd265](https://github.com/roomle-dev/roomle-ui/commit/9dbd265)), closes [#3159](https://github.com/roomle-dev/roomle-ui/issues/3159)
|
|
17
|
+
* Merge pull request #3161 from roomle-dev/upgraded-by-ci/core-3.2.0-alpha.3 ([c75bd49](https://github.com/roomle-dev/roomle-ui/commit/c75bd49)), closes [#3161](https://github.com/roomle-dev/roomle-ui/issues/3161)
|
|
18
|
+
* Merge pull request #3162 from roomle-dev/fix/delete-interior-wall-RML-18273 ([c33e5ad](https://github.com/roomle-dev/roomle-ui/commit/c33e5ad)), closes [#3162](https://github.com/roomle-dev/roomle-ui/issues/3162)
|
|
19
|
+
* Merge pull request #3165 from roomle-dev/feat/photo-camera-from-view-RML-18283 ([1a97815](https://github.com/roomle-dev/roomle-ui/commit/1a97815)), closes [#3165](https://github.com/roomle-dev/roomle-ui/issues/3165)
|
|
20
|
+
* Merge pull request #3166 from roomle-dev/feat/birds-eye-view-option-RML-18283 ([f2f5b3b](https://github.com/roomle-dev/roomle-ui/commit/f2f5b3b)), closes [#3166](https://github.com/roomle-dev/roomle-ui/issues/3166)
|
|
21
|
+
* chore: add missing keys ([064e431](https://github.com/roomle-dev/roomle-ui/commit/064e431))
|
|
22
|
+
* chore: merge fix/rapi-v3-per-endpoint-RML-17813 into e2e branch ([72eb978](https://github.com/roomle-dev/roomle-ui/commit/72eb978))
|
|
23
|
+
* chore: merge master into feat/photo-camera-from-view-RML-18283 ([97a0de2](https://github.com/roomle-dev/roomle-ui/commit/97a0de2)), closes [#3166](https://github.com/roomle-dev/roomle-ui/issues/3166)
|
|
24
|
+
* chore: merge master into fix/e2e-block-real-requests-RML-18084 ([4ffd300](https://github.com/roomle-dev/roomle-ui/commit/4ffd300))
|
|
25
|
+
* chore: merge origin/fix/e2e-block-real-requests-RML-18084 ([04a55f3](https://github.com/roomle-dev/roomle-ui/commit/04a55f3))
|
|
26
|
+
* chore: merge origin/fix/loco-upload-content-length-RML-18277 ([166aa2b](https://github.com/roomle-dev/roomle-ui/commit/166aa2b))
|
|
27
|
+
* chore: sync translations from loco ([9452af6](https://github.com/roomle-dev/roomle-ui/commit/9452af6))
|
|
28
|
+
* fix: add ai-chat labels to the loco base translations ([a0b9e77](https://github.com/roomle-dev/roomle-ui/commit/a0b9e77))
|
|
29
|
+
* fix(ai-chat): address review comments on PR #3165 ([607e17b](https://github.com/roomle-dev/roomle-ui/commit/607e17b)), closes [#3165](https://github.com/roomle-dev/roomle-ui/issues/3165)
|
|
30
|
+
* fix: address review comments on PR #3166 ([7129f52](https://github.com/roomle-dev/roomle-ui/commit/7129f52)), closes [#3166](https://github.com/roomle-dev/roomle-ui/issues/3166)
|
|
31
|
+
* fix: correct machine-translated planning assistant labels ([18d7223](https://github.com/roomle-dev/roomle-ui/commit/18d7223))
|
|
32
|
+
* fix(planner): delete an interior wall instead of hiding it ([9f97b7d](https://github.com/roomle-dev/roomle-ui/commit/9f97b7d))
|
|
33
|
+
* fix: end voice input when the planning assistant chat cannot stop it ([5691a82](https://github.com/roomle-dev/roomle-ui/commit/5691a82))
|
|
34
|
+
* fix(ai-render-eval): eval:ab groups follow-ups and models, renders the merge-base ([7767f83](https://github.com/roomle-dev/roomle-ui/commit/7767f83))
|
|
35
|
+
* fix(ai-render-eval): eval:ab keeps the base inputs and compares per size ([82b3da3](https://github.com/roomle-dev/roomle-ui/commit/82b3da3))
|
|
36
|
+
* fix: exit non-zero when the loco download fails ([73fe064](https://github.com/roomle-dev/roomle-ui/commit/73fe064))
|
|
37
|
+
* fix: send byte length to loco and report upload failures ([f97fb0a](https://github.com/roomle-dev/roomle-ui/commit/f97fb0a))
|
|
38
|
+
* docs(ai-chat): birdsEyeView built; evidence inputs are the ten perspective-left scenes ([eec1ccc](https://github.com/roomle-dev/roomle-ui/commit/eec1ccc))
|
|
39
|
+
* docs(ai-chat): eval of the VIEW block for kept bird's-eye inputs ([46c2f5e](https://github.com/roomle-dev/roomle-ui/commit/46c2f5e))
|
|
40
|
+
* docs(agents): guideline for changes that affect the AI image output ([62f04af](https://github.com/roomle-dev/roomle-ui/commit/62f04af))
|
|
41
|
+
* docs(ai-chat): plan for the photo camera from the user's view and the birdsEyeView option ([1b3abf8](https://github.com/roomle-dev/roomle-ui/commit/1b3abf8))
|
|
42
|
+
* docs(agents): prompt changes show the prompt and the images as before / now ([70db08b](https://github.com/roomle-dev/roomle-ui/commit/70db08b))
|
|
43
|
+
* feat: add voice input to the planning assistant chat ([44784d2](https://github.com/roomle-dev/roomle-ui/commit/44784d2))
|
|
44
|
+
* feat(ai-render-eval): before/after renders and reference collector output ([5c281b3](https://github.com/roomle-dev/roomle-ui/commit/5c281b3))
|
|
45
|
+
* feat(ai-chat): derive the photo camera from the user's view ([608d9fc](https://github.com/roomle-dev/roomle-ui/commit/608d9fc))
|
|
46
|
+
* feat(ai-chat): imageGenConfig.birdsEyeView to keep the bird's-eye view as input ([f1482d9](https://github.com/roomle-dev/roomle-ui/commit/f1482d9))
|
|
47
|
+
* feat(ai-chat): imageGenConfig.debug shows the uploaded image above each result ([58a1bdc](https://github.com/roomle-dev/roomle-ui/commit/58a1bdc))
|
|
48
|
+
* feat(ai-chat): keep the photo camera 0.3 m off the walls ([9298d26](https://github.com/roomle-dev/roomle-ui/commit/9298d26))
|
|
49
|
+
* feat(ai-chat): stand the photo camera as far back as the room allows ([90253e9](https://github.com/roomle-dev/roomle-ui/commit/90253e9))
|
|
50
|
+
* feat(core): upgrade to version 3.2.0-alpha.3 ([8f54a38](https://github.com/roomle-dev/roomle-ui/commit/8f54a38))
|
|
51
|
+
* refactor(ai-chat): eval variants build exactly the prompt the chat sends ([d525240](https://github.com/roomle-dev/roomle-ui/commit/d525240))
|
|
52
|
+
* refactor(ai-render-eval): eval:capture-reference takes the scenes from the reference folder ([e8357b7](https://github.com/roomle-dev/roomle-ui/commit/e8357b7))
|
|
53
|
+
* ci: publish embedding-lib dev builds from a manually started workflow ([26fbe8a](https://github.com/roomle-dev/roomle-ui/commit/26fbe8a))
|
|
54
|
+
* test(e2e): address review comments on PR #3096 ([b1a5431](https://github.com/roomle-dev/roomle-ui/commit/b1a5431)), closes [#3096](https://github.com/roomle-dev/roomle-ui/issues/3096)
|
|
55
|
+
* test(e2e): block and mock catalog.roomle.com assets like Cloudinary ([bd888f4](https://github.com/roomle-dev/roomle-ui/commit/bd888f4))
|
|
56
|
+
* test(e2e): block real RAPI and Cloudinary requests and record the missing mocks ([ffe3d1f](https://github.com/roomle-dev/roomle-ui/commit/ffe3d1f))
|
|
57
|
+
* test(e2e): record mocks missing in CI for HI layer 3 and Cloudinary thumbnails ([950e097](https://github.com/roomle-dev/roomle-ui/commit/950e097))
|
|
58
|
+
* test(e2e): record v2 RAPI mocks missing after the master merge ([9477f4f](https://github.com/roomle-dev/roomle-ui/commit/9477f4f))
|
|
59
|
+
* test(e2e): serve catalog.roomle.com and Cloudinary from the shared assets store ([4fc557e](https://github.com/roomle-dev/roomle-ui/commit/4fc557e))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.3",
|
|
4
4
|
"description": "This is a small library which can be used to communicate with the Roomle Configurator. ES modules only (browser-compatible).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./roomle-embedding-lib.js",
|
package/roomle-embedding-lib.js
CHANGED
|
@@ -97,6 +97,14 @@ var t = class {
|
|
|
97
97
|
}, c = /* @__PURE__ */ function(e) {
|
|
98
98
|
return e.BOTTOM_BAR = "bottom_bar", e.PARTLIST_BOUNDS = "partlist_bounds", e.INTERACTION_NOTES = "interaction_notes", e.PARAMETER_GROUPS = "parameter_groups", e;
|
|
99
99
|
}({}), l = (e) => JSON.parse(JSON.stringify(e)), u = {
|
|
100
|
+
staging: !1,
|
|
101
|
+
theme: "scandinavian",
|
|
102
|
+
density: "balanced",
|
|
103
|
+
light: "soft",
|
|
104
|
+
birdsEyeView: "adjust",
|
|
105
|
+
debug: !1,
|
|
106
|
+
stage: "alpha"
|
|
107
|
+
}, d = {
|
|
100
108
|
mobileLandscape: !0,
|
|
101
109
|
floorMaterialRootTag: "materials_root",
|
|
102
110
|
buttons: {
|
|
@@ -124,35 +132,36 @@ var t = class {
|
|
|
124
132
|
openCloseAnimation: !0,
|
|
125
133
|
localExport3d: !1
|
|
126
134
|
},
|
|
135
|
+
imageGenConfig: u,
|
|
127
136
|
configuratorZoom: !1,
|
|
128
137
|
rotationSnapDegrees: 10,
|
|
129
138
|
interactionsCollapsed: !1
|
|
130
|
-
},
|
|
139
|
+
}, f = (e) => (m(e), e?.customApiUrl && (e.customApiUrl = decodeURIComponent(e.customApiUrl)), e.shareUrl && (e.deeplink = e.shareUrl.replace(g, _)), e), p = (e) => e.trim() !== "" && Number.isFinite(Number(e.trim())), m = (e) => {
|
|
131
140
|
if (!e || typeof e != "object") return;
|
|
132
141
|
let t = Object.keys(e);
|
|
133
142
|
for (let n of t) {
|
|
134
143
|
let t = e[n];
|
|
135
|
-
if (!Array.isArray(t) && typeof t == "object" && t &&
|
|
136
|
-
t === "true" || t === "false" ? e[n] = t === "true" : typeof t == "string" &&
|
|
144
|
+
if (!Array.isArray(t) && typeof t == "object" && t && m(t), Array.isArray(t)) for (let e of t) m(e);
|
|
145
|
+
t === "true" || t === "false" ? e[n] = t === "true" : typeof t == "string" && p(t) && (e[n] = Number(t));
|
|
137
146
|
}
|
|
138
|
-
},
|
|
139
|
-
let t = l(
|
|
147
|
+
}, h = () => {
|
|
148
|
+
let t = l(d);
|
|
140
149
|
t.locale ||= e(null, !0), t.id === "(idle)" && delete t.id;
|
|
141
150
|
let n = i();
|
|
142
151
|
return n && a(n) && (t.configuratorId = "demoConfigurator"), t.customApiUrl = "https://rubens.alpha.roomle.com/api/v2", t.emails = !1, t;
|
|
143
|
-
},
|
|
152
|
+
}, g = "<CONF_ID>", _ = "#CONFIGURATIONID#", v = (e) => {
|
|
144
153
|
let t = e.featureFlags;
|
|
145
154
|
if (!t || typeof t != "object" || Array.isArray(t)) return;
|
|
146
155
|
let n = t;
|
|
147
156
|
"enableTwoLevelCatalog" in n && typeof n.enableTwoLevelCatalog == "boolean" && (e.enableTwoLevelCatalog === !1 || e.enableTwoLevelCatalog === void 0) && (e.enableTwoLevelCatalog = n.enableTwoLevelCatalog), "webGpu" in n && typeof n.webGpu == "boolean" && (e.webGpu === !1 || e.webGpu === void 0) && (e.webGpu = n.webGpu);
|
|
148
|
-
},
|
|
157
|
+
}, y = (e) => {
|
|
149
158
|
e.featureFlags ||= {}, typeof e.featureFlags.realPartList != "boolean" && (e.featureFlags.realPartList = !0), typeof e.featureFlags.globalCallbacks != "boolean" && (e.featureFlags.globalCallbacks = !0), typeof e.featureFlags.mocAr != "boolean" && (e.featureFlags.mocAr = !1);
|
|
150
|
-
},
|
|
151
|
-
let n = l(t), r =
|
|
152
|
-
|
|
159
|
+
}, b = (e, t) => {
|
|
160
|
+
let n = l(t), r = h();
|
|
161
|
+
y(r);
|
|
153
162
|
let i = o(o(r, e.settings || {}), n);
|
|
154
|
-
return i.configuratorId = e.id, !i.overrideTenant && e.tenant && (i.overrideTenant = e.tenant),
|
|
155
|
-
},
|
|
163
|
+
return i.configuratorId = e.id, !i.overrideTenant && e.tenant && (i.overrideTenant = e.tenant), v(i), i;
|
|
164
|
+
}, x = () => /(android)/i.test(navigator.userAgent), S = class {
|
|
156
165
|
_messageHandler = null;
|
|
157
166
|
isSetupDone = !1;
|
|
158
167
|
viewName = "main";
|
|
@@ -216,7 +225,7 @@ var t = class {
|
|
|
216
225
|
}
|
|
217
226
|
}));
|
|
218
227
|
}
|
|
219
|
-
},
|
|
228
|
+
}, C = () => {
|
|
220
229
|
let e, t;
|
|
221
230
|
return {
|
|
222
231
|
promise: new Promise((n, r) => {
|
|
@@ -229,7 +238,7 @@ var t = class {
|
|
|
229
238
|
//#endregion
|
|
230
239
|
//#region packages/common/src/utils/rapi-version.ts
|
|
231
240
|
(/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$"));
|
|
232
|
-
var
|
|
241
|
+
var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t, E = {
|
|
233
242
|
SDK: "extended",
|
|
234
243
|
CONFIGURATOR_SDK: "configurator",
|
|
235
244
|
CALLBACKS: "callbacks",
|
|
@@ -237,22 +246,22 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
|
|
|
237
246
|
ANALYTICS: "analytics",
|
|
238
247
|
GLOBAL: "global",
|
|
239
248
|
RAPI: "rapi"
|
|
240
|
-
},
|
|
249
|
+
}, D = ".", O = E.SDK + "." + E.CALLBACKS, k = {
|
|
241
250
|
REQUEST_BOOT: "requestBoot",
|
|
242
251
|
SETUP: "setup",
|
|
243
252
|
WEBSITE_READY: "websiteReady"
|
|
244
|
-
},
|
|
253
|
+
}, A = {
|
|
245
254
|
GET_METHODS: "getMethods",
|
|
246
255
|
RETURN_METHODS: "returnMethods",
|
|
247
256
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
248
257
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
249
|
-
},
|
|
258
|
+
}, j = ["constructor", "callbacks"], M = (e) => e[0] !== "_" && !j.includes(e), N = (e, t, n = !1) => {
|
|
250
259
|
if (!e) return [];
|
|
251
|
-
let r = Object.getOwnPropertyNames(e), i = n ?
|
|
252
|
-
return r.filter(
|
|
253
|
-
},
|
|
260
|
+
let r = Object.getOwnPropertyNames(e), i = n ? E.CALLBACKS + "." : "";
|
|
261
|
+
return r.filter(M).map((e) => t + "." + i + e);
|
|
262
|
+
}, P = async (e, t) => {
|
|
254
263
|
if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
|
|
255
|
-
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i =
|
|
264
|
+
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = T(n, "/configurators/" + e), a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
|
|
256
265
|
method: "GET",
|
|
257
266
|
headers: new Headers({
|
|
258
267
|
apiKey: "roomle_portal_v2",
|
|
@@ -267,7 +276,7 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
|
|
|
267
276
|
cache: "default"
|
|
268
277
|
}), { configurator: s } = await (await fetch(o)).json();
|
|
269
278
|
return s;
|
|
270
|
-
},
|
|
279
|
+
}, F = "data-rml-interaction-container", I = (e, t, n) => {
|
|
271
280
|
let r = null;
|
|
272
281
|
Object.defineProperty(e, t, {
|
|
273
282
|
get() {
|
|
@@ -277,28 +286,28 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
|
|
|
277
286
|
e?.mute ? r = e.value : (console.warn("You override Roomle defined behaviour. To disalbe this warning pass in an object with the following properties"), console.warn("{ mute: true, value: () => void }"), r = e);
|
|
278
287
|
}
|
|
279
288
|
});
|
|
280
|
-
},
|
|
281
|
-
e && setTimeout(() => e.style.setProperty(
|
|
282
|
-
},
|
|
289
|
+
}, L = () => window.innerHeight * .01 + "px", R = (e) => {
|
|
290
|
+
e && setTimeout(() => e.style.setProperty(V, L()), 0);
|
|
291
|
+
}, z = "rml-styles", B = 450, V = "--rml-full-height", H = {
|
|
283
292
|
CONTAINER: "rml-container",
|
|
284
293
|
FILL: "rml-fill",
|
|
285
294
|
POSITION: "rml-pos",
|
|
286
295
|
TRANSITION: "rml-transition",
|
|
287
296
|
ANDROID_HEIGHT: "rml-android-height",
|
|
288
297
|
OVERFLOW_HIDDEN: "rml-overflow-hidden"
|
|
289
|
-
},
|
|
298
|
+
}, U = /* @__PURE__ */ new Map(), W = class extends S {
|
|
290
299
|
static createPlanner(e, t, n, r = []) {
|
|
291
300
|
return this._create(e, t, n, r);
|
|
292
301
|
}
|
|
293
302
|
static async connect(e, n = []) {
|
|
294
|
-
let r = new
|
|
303
|
+
let r = new S();
|
|
295
304
|
r.viewName = e;
|
|
296
|
-
let { resolve: i, promise: a } =
|
|
305
|
+
let { resolve: i, promise: a } = C(), { resolve: o, promise: s } = C(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
|
|
297
306
|
switch (e) {
|
|
298
|
-
case
|
|
307
|
+
case A.REGISTER_CUSTOM_VIEW_DONE:
|
|
299
308
|
i();
|
|
300
309
|
break;
|
|
301
|
-
case
|
|
310
|
+
case A.RETURN_METHODS:
|
|
302
311
|
r.handleSetup(t[0]), o();
|
|
303
312
|
break;
|
|
304
313
|
default: if (r.isSetupDone) return r.executeMessage({
|
|
@@ -309,7 +318,7 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
|
|
|
309
318
|
});
|
|
310
319
|
r.setMessageHandler(c);
|
|
311
320
|
let l = [e];
|
|
312
|
-
return c.sendMessage(
|
|
321
|
+
return c.sendMessage(A.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(A.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
|
|
313
322
|
}
|
|
314
323
|
static createConfigurator(e, t, n, r = []) {
|
|
315
324
|
return this._create(e, t, n, r);
|
|
@@ -323,10 +332,10 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
|
|
|
323
332
|
static async _create(e, t, n, r) {
|
|
324
333
|
return new Promise(async (i, a) => {
|
|
325
334
|
try {
|
|
326
|
-
let a =
|
|
327
|
-
|
|
328
|
-
let c = await
|
|
329
|
-
n =
|
|
335
|
+
let a = f(n), s = h();
|
|
336
|
+
y(s);
|
|
337
|
+
let c = await P(e, o(s, a));
|
|
338
|
+
n = b(c, a);
|
|
330
339
|
let l = new this(c, t, n, r, i);
|
|
331
340
|
return await Promise.allSettled(l.pluginsLoaded), l;
|
|
332
341
|
} catch (e) {
|
|
@@ -341,51 +350,51 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
|
|
|
341
350
|
_iframe;
|
|
342
351
|
constructor(e, n, r, i, a) {
|
|
343
352
|
if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
|
|
344
|
-
if (
|
|
345
|
-
if (!document.getElementById(
|
|
353
|
+
if (U.has(n)) throw Error("There is already an instance on this DOM element");
|
|
354
|
+
if (!document.getElementById(z)) {
|
|
346
355
|
let e = r.zIndex || 9999999, t = document.createElement("style");
|
|
347
|
-
t.type = "text/css", t.id =
|
|
348
|
-
let n = "transition:all ease-in-out " +
|
|
356
|
+
t.type = "text/css", t.id = z;
|
|
357
|
+
let n = "transition:all ease-in-out " + B + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = L();
|
|
349
358
|
t.innerHTML = `
|
|
350
|
-
.${
|
|
351
|
-
.${
|
|
352
|
-
.${
|
|
353
|
-
.${
|
|
354
|
-
.${
|
|
355
|
-
.${
|
|
359
|
+
.${H.CONTAINER}{${V}:${a};}
|
|
360
|
+
.${H.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
|
|
361
|
+
.${H.TRANSITION}{${i}}
|
|
362
|
+
.${H.FILL}{width:100%;height:100%;opacity:1}
|
|
363
|
+
.${H.ANDROID_HEIGHT}{height:calc(var(${V},1vh)*100)}
|
|
364
|
+
.${H.OVERFLOW_HIDDEN}{overflow:hidden}
|
|
356
365
|
`, document.head.appendChild(t);
|
|
357
366
|
}
|
|
358
367
|
this._executeMessage = this._executeMessage.bind(this);
|
|
359
368
|
let o = new t("website", window, null, this._executeMessage);
|
|
360
|
-
this.setMessageHandler(o), this._onResize = this._onResize.bind(this),
|
|
369
|
+
this.setMessageHandler(o), this._onResize = this._onResize.bind(this), x() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
|
|
361
370
|
let s = this._createIframe();
|
|
362
|
-
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe),
|
|
371
|
+
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), U.set(n, !0);
|
|
363
372
|
}
|
|
364
373
|
teardown() {
|
|
365
|
-
this._container &&
|
|
374
|
+
this._container && U.delete(this._container);
|
|
366
375
|
let e = this._container.querySelector("iframe");
|
|
367
376
|
e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
|
|
368
377
|
}
|
|
369
378
|
_createIframe() {
|
|
370
379
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
371
|
-
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(
|
|
380
|
+
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.allow = "microphone", e.classList.add(H.CONTAINER), e.classList.add(H.FILL), e;
|
|
372
381
|
}
|
|
373
382
|
_onResize() {
|
|
374
|
-
|
|
383
|
+
R(this._iframe);
|
|
375
384
|
}
|
|
376
385
|
_onUseFullPage() {
|
|
377
|
-
this._iframe.classList.add(
|
|
386
|
+
this._iframe.classList.add(H.POSITION), document.documentElement.classList.add(H.OVERFLOW_HIDDEN), window.document.body.classList.add(H.OVERFLOW_HIDDEN), x() && (R(this._iframe), this._iframe.classList.add(H.ANDROID_HEIGHT));
|
|
378
387
|
}
|
|
379
388
|
_onBackToWebsite() {
|
|
380
|
-
this._iframe.classList.remove(
|
|
389
|
+
this._iframe.classList.remove(H.POSITION), this._iframe.classList.remove(H.ANDROID_HEIGHT), document.documentElement.classList.remove(H.OVERFLOW_HIDDEN), window.document.body.classList.remove(H.OVERFLOW_HIDDEN);
|
|
381
390
|
}
|
|
382
391
|
_executeMessage({ message: e, args: t }, n) {
|
|
383
|
-
if (n.source && n.source === this._iframe?.contentWindow) return e ===
|
|
392
|
+
if (n.source && n.source === this._iframe?.contentWindow) return e === k.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : (console.error("MessageHandler not set"), Promise.resolve({ error: "MessageHandler not set" })) : e === k.SETUP ? (this.handleSetup(t[0]), I(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), I(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
|
|
384
393
|
if (!this._messageHandler) {
|
|
385
394
|
console.error("MessageHandler not set");
|
|
386
395
|
return;
|
|
387
396
|
}
|
|
388
|
-
this._messageHandler.sendMessage(
|
|
397
|
+
this._messageHandler.sendMessage(k.WEBSITE_READY);
|
|
389
398
|
}, 0), Promise.resolve({ result: null })) : this.executeMessage({
|
|
390
399
|
message: e,
|
|
391
400
|
args: t
|
|
@@ -393,4 +402,4 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
|
|
|
393
402
|
}
|
|
394
403
|
};
|
|
395
404
|
//#endregion
|
|
396
|
-
export {
|
|
405
|
+
export { k as HANDSHAKE_MESSAGES, F as INTERACTION_CONTAINER_SELECTOR, E as NAMESPACE, D as NAMESPACE_SEPARATOR, O as SDK_CALLBACK, A as WELL_KNOWN_MESSAGES, W as default, P as getConfiguratorSettings, N as getMethodNames, M as isExposable };
|
|
@@ -102,6 +102,15 @@ var t = class {
|
|
|
102
102
|
openCloseAnimation: !0,
|
|
103
103
|
localExport3d: !1
|
|
104
104
|
},
|
|
105
|
+
imageGenConfig: {
|
|
106
|
+
staging: !1,
|
|
107
|
+
theme: "scandinavian",
|
|
108
|
+
density: "balanced",
|
|
109
|
+
light: "soft",
|
|
110
|
+
birdsEyeView: "adjust",
|
|
111
|
+
debug: !1,
|
|
112
|
+
stage: "alpha"
|
|
113
|
+
},
|
|
105
114
|
configuratorZoom: !1,
|
|
106
115
|
rotationSnapDegrees: 10,
|
|
107
116
|
interactionsCollapsed: !1
|
|
@@ -343,7 +352,7 @@ var h = /\/v[23]\/?$/, g = {
|
|
|
343
352
|
}
|
|
344
353
|
_createIframe() {
|
|
345
354
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
346
|
-
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(j), e.classList.add(M), e;
|
|
355
|
+
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.allow = "microphone", e.classList.add(j), e.classList.add(M), e;
|
|
347
356
|
}
|
|
348
357
|
_onResize() {
|
|
349
358
|
O(this._iframe);
|