@roomle/embedding-lib 0.0.0-dev-5f60635 → 0.0.0-dev-ec00289
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/THIRD-PARTY-NOTICES.txt +2 -2
- package/configurator.js +1 -1
- package/configurator.min.js +1 -1
- package/hi.js +1 -1
- package/hi.min.js +1 -1
- package/{mcp-tools-D__M74CZ.mjs → mcp-tools-Cnhgobge.mjs} +2 -2
- package/{mcp-tools-CJ7j_FI2.mjs → mcp-tools-D3Ei3Apu.mjs} +2 -2
- package/package.json +1 -1
- package/roomle-embedding-lib.js +40 -43
- package/roomle-embedding-lib.min.js +36 -39
- package/sbom.cdx.json +5 -5
package/THIRD-PARTY-NOTICES.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Third-party software notices for @roomle/embedding-lib
|
|
2
|
-
Generated 2026-11-
|
|
1
|
+
Third-party software notices for @roomle/embedding-lib ec00289223d80a3675e1a9dd26101de142be0d79
|
|
2
|
+
Generated 2026-11-04
|
|
3
3
|
|
|
4
4
|
This product includes the following third-party components.
|
|
5
5
|
|
package/configurator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
|
-
import { n as e, t } from "./mcp-tools-
|
|
2
|
+
import { n as e, t } from "./mcp-tools-Cnhgobge.mjs";
|
|
3
3
|
//#region packages/embedding-lib/src/configurator-agent/configurator-mcp-tools.ts
|
|
4
4
|
var n = async (e) => {
|
|
5
5
|
if (typeof e.getConfiguratorAgentTools != "function" || typeof e.callConfiguratorAgentTool != "function") throw Error("Update the Rubens UI: configurator agent tools are unavailable.");
|
package/configurator.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
|
-
import { n as e, t } from "./mcp-tools-
|
|
2
|
+
import { n as e, t } from "./mcp-tools-D3Ei3Apu.mjs";
|
|
3
3
|
var n = async (e) => {
|
|
4
4
|
if (typeof e.getConfiguratorAgentTools != "function" || typeof e.callConfiguratorAgentTool != "function") throw Error("Update the Rubens UI: configurator agent tools are unavailable.");
|
|
5
5
|
return t(await e.getConfiguratorAgentTools(), (t, n) => e.callConfiguratorAgentTool(t, n), "configurator-mcp");
|
package/hi.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
2
|
import { t as e } from "./browser-zrjtYpL8.mjs";
|
|
3
3
|
import { t } from "./utils-WeolMfC5.mjs";
|
|
4
|
-
import { n, t as r } from "./mcp-tools-
|
|
4
|
+
import { n, t as r } from "./mcp-tools-Cnhgobge.mjs";
|
|
5
5
|
var i = (e, t) => t === e.libraryId ? e : {
|
|
6
6
|
...e,
|
|
7
7
|
libraryId: t
|
package/hi.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
2
|
import { t as e } from "./browser-D6As4Zxr.mjs";
|
|
3
3
|
import { t } from "./utils-CAAGdgk8.mjs";
|
|
4
|
-
import { n, t as r } from "./mcp-tools-
|
|
4
|
+
import { n, t as r } from "./mcp-tools-D3Ei3Apu.mjs";
|
|
5
5
|
var i = (e, t) => t === e.libraryId ? e : {
|
|
6
6
|
...e,
|
|
7
7
|
libraryId: t
|
|
@@ -89,10 +89,10 @@ var e = "The images of this result follow in the next message.", t = (t) => t.fl
|
|
|
89
89
|
}
|
|
90
90
|
case "mistral": {
|
|
91
91
|
let { createMistral: e } = await import("./dist-CqP0aX0A.mjs");
|
|
92
|
-
return { languageModel: e({
|
|
92
|
+
return { languageModel: n(e({
|
|
93
93
|
apiKey: r,
|
|
94
94
|
...u
|
|
95
|
-
})(t) };
|
|
95
|
+
})(t)) };
|
|
96
96
|
}
|
|
97
97
|
case "anthropic": {
|
|
98
98
|
let { createAnthropic: e } = await import("./dist-C5fKJXpB.mjs");
|
|
@@ -88,10 +88,10 @@ var e = (e) => e.flatMap((e) => {
|
|
|
88
88
|
}
|
|
89
89
|
case "mistral": {
|
|
90
90
|
let { createMistral: e } = await import("./dist-CXemOs84.mjs");
|
|
91
|
-
return { languageModel: e({
|
|
91
|
+
return { languageModel: t(e({
|
|
92
92
|
apiKey: r,
|
|
93
93
|
...u
|
|
94
|
-
})(n) };
|
|
94
|
+
})(n)) };
|
|
95
95
|
}
|
|
96
96
|
case "anthropic": {
|
|
97
97
|
let { createAnthropic: e } = await import("./dist-B9yy8ym8.mjs");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-ec00289",
|
|
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
|
@@ -235,14 +235,11 @@ var t = class {
|
|
|
235
235
|
resolve: e,
|
|
236
236
|
reject: t
|
|
237
237
|
};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
let n = E(t) ? "v3" : "v2";
|
|
244
|
-
return e.replace(T, "/" + n) + t;
|
|
245
|
-
}, O = {
|
|
238
|
+
};
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region packages/common/src/utils/rapi-version.ts
|
|
241
|
+
(/* @__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, "[^/]+") + "/?$"));
|
|
242
|
+
var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t, E = {
|
|
246
243
|
SDK: "extended",
|
|
247
244
|
CONFIGURATOR_SDK: "configurator",
|
|
248
245
|
CALLBACKS: "callbacks",
|
|
@@ -250,22 +247,22 @@ var t = class {
|
|
|
250
247
|
ANALYTICS: "analytics",
|
|
251
248
|
GLOBAL: "global",
|
|
252
249
|
RAPI: "rapi"
|
|
253
|
-
},
|
|
250
|
+
}, D = ".", O = E.SDK + "." + E.CALLBACKS, k = {
|
|
254
251
|
REQUEST_BOOT: "requestBoot",
|
|
255
252
|
SETUP: "setup",
|
|
256
253
|
WEBSITE_READY: "websiteReady"
|
|
257
|
-
},
|
|
254
|
+
}, A = {
|
|
258
255
|
GET_METHODS: "getMethods",
|
|
259
256
|
RETURN_METHODS: "returnMethods",
|
|
260
257
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
261
258
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
262
|
-
},
|
|
259
|
+
}, j = ["constructor", "callbacks"], M = (e) => e[0] !== "_" && !j.includes(e), N = (e, t, n = !1) => {
|
|
263
260
|
if (!e) return [];
|
|
264
|
-
let r = Object.getOwnPropertyNames(e), i = n ?
|
|
265
|
-
return r.filter(
|
|
266
|
-
},
|
|
261
|
+
let r = Object.getOwnPropertyNames(e), i = n ? E.CALLBACKS + "." : "";
|
|
262
|
+
return r.filter(M).map((e) => t + "." + i + e);
|
|
263
|
+
}, P = async (e, t) => {
|
|
267
264
|
if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
|
|
268
|
-
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i =
|
|
265
|
+
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, {
|
|
269
266
|
method: "GET",
|
|
270
267
|
headers: new Headers({
|
|
271
268
|
apiKey: "roomle_portal_v2",
|
|
@@ -280,7 +277,7 @@ var t = class {
|
|
|
280
277
|
cache: "default"
|
|
281
278
|
}), { configurator: s } = await (await fetch(o)).json();
|
|
282
279
|
return s;
|
|
283
|
-
},
|
|
280
|
+
}, F = "data-rml-interaction-container", I = (e, t, n) => {
|
|
284
281
|
let r = null;
|
|
285
282
|
Object.defineProperty(e, t, {
|
|
286
283
|
get() {
|
|
@@ -290,16 +287,16 @@ var t = class {
|
|
|
290
287
|
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);
|
|
291
288
|
}
|
|
292
289
|
});
|
|
293
|
-
},
|
|
294
|
-
e && setTimeout(() => e.style.setProperty(
|
|
295
|
-
},
|
|
290
|
+
}, L = () => window.innerHeight * .01 + "px", R = (e) => {
|
|
291
|
+
e && setTimeout(() => e.style.setProperty(V, L()), 0);
|
|
292
|
+
}, z = "rml-styles", B = 450, V = "--rml-full-height", H = {
|
|
296
293
|
CONTAINER: "rml-container",
|
|
297
294
|
FILL: "rml-fill",
|
|
298
295
|
POSITION: "rml-pos",
|
|
299
296
|
TRANSITION: "rml-transition",
|
|
300
297
|
ANDROID_HEIGHT: "rml-android-height",
|
|
301
298
|
OVERFLOW_HIDDEN: "rml-overflow-hidden"
|
|
302
|
-
},
|
|
299
|
+
}, U = /* @__PURE__ */ new Map(), W = class extends S {
|
|
303
300
|
static createPlanner(e, t, n, r = []) {
|
|
304
301
|
return this._create(e, t, n, r);
|
|
305
302
|
}
|
|
@@ -308,10 +305,10 @@ var t = class {
|
|
|
308
305
|
r.viewName = e;
|
|
309
306
|
let { resolve: i, promise: a } = C(), { resolve: o, promise: s } = C(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
|
|
310
307
|
switch (e) {
|
|
311
|
-
case
|
|
308
|
+
case A.REGISTER_CUSTOM_VIEW_DONE:
|
|
312
309
|
i();
|
|
313
310
|
break;
|
|
314
|
-
case
|
|
311
|
+
case A.RETURN_METHODS:
|
|
315
312
|
r.handleSetup(t[0]), o();
|
|
316
313
|
break;
|
|
317
314
|
default: if (r.isSetupDone) return r.executeMessage({
|
|
@@ -322,7 +319,7 @@ var t = class {
|
|
|
322
319
|
});
|
|
323
320
|
r.setMessageHandler(c);
|
|
324
321
|
let l = [e];
|
|
325
|
-
return c.sendMessage(
|
|
322
|
+
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;
|
|
326
323
|
}
|
|
327
324
|
static createConfigurator(e, t, n, r = []) {
|
|
328
325
|
return this._create(e, t, n, r);
|
|
@@ -338,7 +335,7 @@ var t = class {
|
|
|
338
335
|
try {
|
|
339
336
|
let a = f(n), s = h();
|
|
340
337
|
y(s);
|
|
341
|
-
let c = await
|
|
338
|
+
let c = await P(e, o(s, a));
|
|
342
339
|
n = b(c, a);
|
|
343
340
|
let l = new this(c, t, n, r, i);
|
|
344
341
|
return await Promise.allSettled(l.pluginsLoaded), l;
|
|
@@ -354,51 +351,51 @@ var t = class {
|
|
|
354
351
|
_iframe;
|
|
355
352
|
constructor(e, n, r, i, a) {
|
|
356
353
|
if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
|
|
357
|
-
if (
|
|
358
|
-
if (!document.getElementById(
|
|
354
|
+
if (U.has(n)) throw Error("There is already an instance on this DOM element");
|
|
355
|
+
if (!document.getElementById(z)) {
|
|
359
356
|
let e = r.zIndex || 9999999, t = document.createElement("style");
|
|
360
|
-
t.type = "text/css", t.id =
|
|
361
|
-
let n = "transition:all ease-in-out " +
|
|
357
|
+
t.type = "text/css", t.id = z;
|
|
358
|
+
let n = "transition:all ease-in-out " + B + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = L();
|
|
362
359
|
t.innerHTML = `
|
|
363
|
-
.${
|
|
364
|
-
.${
|
|
365
|
-
.${
|
|
366
|
-
.${
|
|
367
|
-
.${
|
|
368
|
-
.${
|
|
360
|
+
.${H.CONTAINER}{${V}:${a};}
|
|
361
|
+
.${H.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
|
|
362
|
+
.${H.TRANSITION}{${i}}
|
|
363
|
+
.${H.FILL}{width:100%;height:100%;opacity:1}
|
|
364
|
+
.${H.ANDROID_HEIGHT}{height:calc(var(${V},1vh)*100)}
|
|
365
|
+
.${H.OVERFLOW_HIDDEN}{overflow:hidden}
|
|
369
366
|
`, document.head.appendChild(t);
|
|
370
367
|
}
|
|
371
368
|
this._executeMessage = this._executeMessage.bind(this);
|
|
372
369
|
let o = new t("website", window, null, this._executeMessage);
|
|
373
370
|
this.setMessageHandler(o), this._onResize = this._onResize.bind(this), x() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
|
|
374
371
|
let s = this._createIframe();
|
|
375
|
-
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),
|
|
372
|
+
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);
|
|
376
373
|
}
|
|
377
374
|
teardown() {
|
|
378
|
-
this._container &&
|
|
375
|
+
this._container && U.delete(this._container);
|
|
379
376
|
let e = this._container.querySelector("iframe");
|
|
380
377
|
e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
|
|
381
378
|
}
|
|
382
379
|
_createIframe() {
|
|
383
380
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
384
|
-
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(
|
|
381
|
+
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;
|
|
385
382
|
}
|
|
386
383
|
_onResize() {
|
|
387
|
-
|
|
384
|
+
R(this._iframe);
|
|
388
385
|
}
|
|
389
386
|
_onUseFullPage() {
|
|
390
|
-
this._iframe.classList.add(
|
|
387
|
+
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));
|
|
391
388
|
}
|
|
392
389
|
_onBackToWebsite() {
|
|
393
|
-
this._iframe.classList.remove(
|
|
390
|
+
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);
|
|
394
391
|
}
|
|
395
392
|
_executeMessage({ message: e, args: t }, n) {
|
|
396
|
-
if (n.source && n.source === this._iframe?.contentWindow) return e ===
|
|
393
|
+
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(() => {
|
|
397
394
|
if (!this._messageHandler) {
|
|
398
395
|
console.error("MessageHandler not set");
|
|
399
396
|
return;
|
|
400
397
|
}
|
|
401
|
-
this._messageHandler.sendMessage(
|
|
398
|
+
this._messageHandler.sendMessage(k.WEBSITE_READY);
|
|
402
399
|
}, 0), Promise.resolve({ result: null })) : this.executeMessage({
|
|
403
400
|
message: e,
|
|
404
401
|
args: t
|
|
@@ -406,4 +403,4 @@ var t = class {
|
|
|
406
403
|
}
|
|
407
404
|
};
|
|
408
405
|
//#endregion
|
|
409
|
-
export {
|
|
406
|
+
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 };
|
|
@@ -216,7 +216,9 @@ var t = class {
|
|
|
216
216
|
resolve: e,
|
|
217
217
|
reject: t
|
|
218
218
|
};
|
|
219
|
-
}
|
|
219
|
+
};
|
|
220
|
+
(/* @__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, "[^/]+") + "/?$"));
|
|
221
|
+
var h = /\/v[23]\/?$/, g = {
|
|
220
222
|
SDK: "extended",
|
|
221
223
|
CONFIGURATOR_SDK: "configurator",
|
|
222
224
|
CALLBACKS: "callbacks",
|
|
@@ -224,29 +226,24 @@ var t = class {
|
|
|
224
226
|
ANALYTICS: "analytics",
|
|
225
227
|
GLOBAL: "global",
|
|
226
228
|
RAPI: "rapi"
|
|
227
|
-
},
|
|
229
|
+
}, _ = ".", v = g.SDK + "." + g.CALLBACKS, y = {
|
|
228
230
|
REQUEST_BOOT: "requestBoot",
|
|
229
231
|
SETUP: "setup",
|
|
230
232
|
WEBSITE_READY: "websiteReady"
|
|
231
|
-
},
|
|
233
|
+
}, b = {
|
|
232
234
|
GET_METHODS: "getMethods",
|
|
233
235
|
RETURN_METHODS: "returnMethods",
|
|
234
236
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
235
237
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
236
|
-
},
|
|
238
|
+
}, x = ["constructor", "callbacks"], S = (e) => e[0] !== "_" && !x.includes(e), C = (e, t, n = !1) => {
|
|
237
239
|
if (!e) return [];
|
|
238
|
-
let r = Object.getOwnPropertyNames(e), i = n ?
|
|
239
|
-
return r.filter(
|
|
240
|
-
},
|
|
240
|
+
let r = Object.getOwnPropertyNames(e), i = n ? g.CALLBACKS + "." : "";
|
|
241
|
+
return r.filter(S).map((e) => t + "." + i + e);
|
|
242
|
+
}, w = async (e, t) => {
|
|
241
243
|
if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
|
|
242
|
-
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = (
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
let t = e.split("?")[0];
|
|
246
|
-
return h.some((e) => e.test(t));
|
|
247
|
-
})(t) ? "v3" : "v2";
|
|
248
|
-
return e.replace(g, "/" + n) + t;
|
|
249
|
-
})(n, "/configurators/" + e), a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
|
|
244
|
+
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = (a = n, o = "/configurators/" + e, h.test(a) ? a.replace(h, "/v2") + o : a + o);
|
|
245
|
+
var a, o;
|
|
246
|
+
let s = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), c = new Request(i, {
|
|
250
247
|
method: "GET",
|
|
251
248
|
headers: new Headers({
|
|
252
249
|
apiKey: "roomle_portal_v2",
|
|
@@ -254,14 +251,14 @@ var t = class {
|
|
|
254
251
|
locale: "en",
|
|
255
252
|
language: "en",
|
|
256
253
|
device: 1,
|
|
257
|
-
token:
|
|
254
|
+
token: s,
|
|
258
255
|
platform: "web"
|
|
259
256
|
}),
|
|
260
257
|
mode: "cors",
|
|
261
258
|
cache: "default"
|
|
262
|
-
}), { configurator:
|
|
263
|
-
return
|
|
264
|
-
},
|
|
259
|
+
}), { configurator: l } = await (await fetch(c)).json();
|
|
260
|
+
return l;
|
|
261
|
+
}, T = "data-rml-interaction-container", E = (e, t, n) => {
|
|
265
262
|
let r = null;
|
|
266
263
|
Object.defineProperty(e, t, {
|
|
267
264
|
get: () => r || n,
|
|
@@ -269,9 +266,9 @@ var t = class {
|
|
|
269
266
|
r = e?.mute ? e.value : e;
|
|
270
267
|
}
|
|
271
268
|
});
|
|
272
|
-
},
|
|
273
|
-
e && setTimeout(() => e.style.setProperty(
|
|
274
|
-
},
|
|
269
|
+
}, D = () => .01 * window.innerHeight + "px", O = (e) => {
|
|
270
|
+
e && setTimeout(() => e.style.setProperty(A, D()), 0);
|
|
271
|
+
}, k = "rml-styles", A = "--rml-full-height", j = "rml-container", M = "rml-fill", N = "rml-pos", P = "rml-android-height", F = "rml-overflow-hidden", I = /* @__PURE__ */ new Map(), L = class extends p {
|
|
275
272
|
static createPlanner(e, t, n, r = []) {
|
|
276
273
|
return this._create(e, t, n, r);
|
|
277
274
|
}
|
|
@@ -280,10 +277,10 @@ var t = class {
|
|
|
280
277
|
r.viewName = e;
|
|
281
278
|
let { resolve: i, promise: a } = m(), { resolve: o, promise: s } = m(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
|
|
282
279
|
switch (e) {
|
|
283
|
-
case
|
|
280
|
+
case b.REGISTER_CUSTOM_VIEW_DONE:
|
|
284
281
|
i();
|
|
285
282
|
break;
|
|
286
|
-
case
|
|
283
|
+
case b.RETURN_METHODS:
|
|
287
284
|
r.handleSetup(t[0]), o();
|
|
288
285
|
break;
|
|
289
286
|
default: if (r.isSetupDone) return r.executeMessage({
|
|
@@ -294,7 +291,7 @@ var t = class {
|
|
|
294
291
|
});
|
|
295
292
|
r.setMessageHandler(c);
|
|
296
293
|
let l = [e];
|
|
297
|
-
return c.sendMessage(
|
|
294
|
+
return c.sendMessage(b.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(b.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
|
|
298
295
|
}
|
|
299
296
|
static createConfigurator(e, t, n, r = []) {
|
|
300
297
|
return this._create(e, t, n, r);
|
|
@@ -310,7 +307,7 @@ var t = class {
|
|
|
310
307
|
try {
|
|
311
308
|
let s = ((e) => (l(e), e?.customApiUrl && (e.customApiUrl = decodeURIComponent(e.customApiUrl)), e.shareUrl && (e.deeplink = e.shareUrl.replace("<CONF_ID>", "#CONFIGURATIONID#")), e))(n), c = u();
|
|
312
309
|
d(c);
|
|
313
|
-
let f = await
|
|
310
|
+
let f = await w(e, r(c, s));
|
|
314
311
|
n = ((e, t) => {
|
|
315
312
|
let n = o(t), i = u();
|
|
316
313
|
d(i);
|
|
@@ -336,44 +333,44 @@ var t = class {
|
|
|
336
333
|
_iframe;
|
|
337
334
|
constructor(e, n, r, i, a) {
|
|
338
335
|
if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
|
|
339
|
-
if (
|
|
340
|
-
if (!document.getElementById(
|
|
336
|
+
if (I.has(n)) throw Error("There is already an instance on this DOM element");
|
|
337
|
+
if (!document.getElementById(k)) {
|
|
341
338
|
let e = r.zIndex || 9999999, t = document.createElement("style");
|
|
342
|
-
t.type = "text/css", t.id =
|
|
339
|
+
t.type = "text/css", t.id = k;
|
|
343
340
|
let n = "transition:all ease-in-out 450ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e + (t + n), "") + n;
|
|
344
|
-
t.innerHTML = `\n .${
|
|
341
|
+
t.innerHTML = `\n .${j}{${A}:${D()};}\n .${N}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${M}{width:100%;height:100%;opacity:1}\n .${P}{height:calc(var(${A},1vh)*100)}\n .${F}{overflow:hidden}\n `, document.head.appendChild(t);
|
|
345
342
|
}
|
|
346
343
|
this._executeMessage = this._executeMessage.bind(this);
|
|
347
344
|
let o = new t("website", window, null, this._executeMessage);
|
|
348
345
|
this.setMessageHandler(o), this._onResize = this._onResize.bind(this), f() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
|
|
349
346
|
let s = this._createIframe();
|
|
350
|
-
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),
|
|
347
|
+
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), I.set(n, !0);
|
|
351
348
|
}
|
|
352
349
|
teardown() {
|
|
353
|
-
this._container &&
|
|
350
|
+
this._container && I.delete(this._container);
|
|
354
351
|
let e = this._container.querySelector("iframe");
|
|
355
352
|
e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
|
|
356
353
|
}
|
|
357
354
|
_createIframe() {
|
|
358
355
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
359
|
-
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(
|
|
356
|
+
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;
|
|
360
357
|
}
|
|
361
358
|
_onResize() {
|
|
362
|
-
|
|
359
|
+
O(this._iframe);
|
|
363
360
|
}
|
|
364
361
|
_onUseFullPage() {
|
|
365
|
-
this._iframe.classList.add(
|
|
362
|
+
this._iframe.classList.add(N), document.documentElement.classList.add(F), window.document.body.classList.add(F), f() && (O(this._iframe), this._iframe.classList.add(P));
|
|
366
363
|
}
|
|
367
364
|
_onBackToWebsite() {
|
|
368
|
-
this._iframe.classList.remove(
|
|
365
|
+
this._iframe.classList.remove(N), this._iframe.classList.remove(P), document.documentElement.classList.remove(F), window.document.body.classList.remove(F);
|
|
369
366
|
}
|
|
370
367
|
_executeMessage({ message: e, args: t }, n) {
|
|
371
|
-
if (n.source && n.source === this._iframe?.contentWindow) return e ===
|
|
372
|
-
this._messageHandler && this._messageHandler.sendMessage(
|
|
368
|
+
if (n.source && n.source === this._iframe?.contentWindow) return e === y.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : Promise.resolve({ error: "MessageHandler not set" }) : e === y.SETUP ? (this.handleSetup(t[0]), E(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), E(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
|
|
369
|
+
this._messageHandler && this._messageHandler.sendMessage(y.WEBSITE_READY);
|
|
373
370
|
}, 0), Promise.resolve({ result: null })) : this.executeMessage({
|
|
374
371
|
message: e,
|
|
375
372
|
args: t
|
|
376
373
|
});
|
|
377
374
|
}
|
|
378
375
|
};
|
|
379
|
-
export {
|
|
376
|
+
export { y as HANDSHAKE_MESSAGES, T as INTERACTION_CONTAINER_SELECTOR, g as NAMESPACE, _ as NAMESPACE_SEPARATOR, v as SDK_CALLBACK, b as WELL_KNOWN_MESSAGES, L as default, w as getConfiguratorSettings, C as getMethodNames, S as isExposable };
|
package/sbom.cdx.json
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.6",
|
|
5
5
|
"version": 1,
|
|
6
|
-
"serialNumber": "urn:uuid:
|
|
6
|
+
"serialNumber": "urn:uuid:00b57021-106e-5672-bdc3-3d0d16c0d79c",
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-04T13:13:52.000Z",
|
|
9
9
|
"component": {
|
|
10
10
|
"type": "library",
|
|
11
11
|
"name": "@roomle/embedding-lib",
|
|
12
|
-
"version": "
|
|
13
|
-
"bom-ref": "@roomle/embedding-lib@
|
|
12
|
+
"version": "ec00289223d80a3675e1a9dd26101de142be0d79",
|
|
13
|
+
"bom-ref": "@roomle/embedding-lib@ec00289223d80a3675e1a9dd26101de142be0d79"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"components": [
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
],
|
|
352
352
|
"dependencies": [
|
|
353
353
|
{
|
|
354
|
-
"ref": "@roomle/embedding-lib@
|
|
354
|
+
"ref": "@roomle/embedding-lib@ec00289223d80a3675e1a9dd26101de142be0d79"
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
"ref": "pkg:npm/%40ai-sdk/anthropic@4.0.68"
|