@roomle/embedding-lib 6.4.0-alpha.13 → 6.4.0-alpha.15

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.
@@ -1,16 +1,70 @@
1
- ## 6.4.0-alpha.13 (2026-03-03)
1
+ ## 6.4.0-alpha.15 (2026-03-06)
2
2
 
3
- * Merge branch 'master' into fix/update-raycast-selection ([9e246f6](https://github.com/roomle-dev/roomle-ui/commit/9e246f6))
4
- * Merge branch 'master' into fix/update-raycast-selection ([2341e22](https://github.com/roomle-dev/roomle-ui/commit/2341e22))
5
- * Merge branch 'master' into fix/update-raycast-selection ([36866ba](https://github.com/roomle-dev/roomle-ui/commit/36866ba))
6
- * Merge pull request #2330 from roomle-dev/fix/update-raycast-selection ([d8f5ca9](https://github.com/roomle-dev/roomle-ui/commit/d8f5ca9)), closes [#2330](https://github.com/roomle-dev/roomle-ui/issues/2330)
7
- * Merge pull request #2344 from roomle-dev/upgraded-by-ci/core-2.71.0-alpha.11 ([7c3c68f](https://github.com/roomle-dev/roomle-ui/commit/7c3c68f)), closes [#2344](https://github.com/roomle-dev/roomle-ui/issues/2344)
8
- * chore: add division by 0 check ([6d16886](https://github.com/roomle-dev/roomle-ui/commit/6d16886))
9
- * chore: implement co-pilot suggestions ([8e6c71f](https://github.com/roomle-dev/roomle-ui/commit/8e6c71f))
10
- * chore: removed unnecessary comments ([70aed3d](https://github.com/roomle-dev/roomle-ui/commit/70aed3d))
11
- * feat: add new function to sort boxes for raycasting ([ffc9577](https://github.com/roomle-dev/roomle-ui/commit/ffc9577))
12
- * feat: core api - externalObjectPositionChanged ([b94c3ef](https://github.com/roomle-dev/roomle-ui/commit/b94c3ef))
13
- * feat(core): upgrade to version 2.71.0-alpha.11 ([186cfc7](https://github.com/roomle-dev/roomle-ui/commit/186cfc7))
14
- * test: add tests for new getBoxSelectionOrder function ([9acd1c2](https://github.com/roomle-dev/roomle-ui/commit/9acd1c2))
15
- * test: disable compareBox3Size to let content team test ([7fc02b4](https://github.com/roomle-dev/roomle-ui/commit/7fc02b4))
16
- * wip: try adding overlap percentage ([6de5abb](https://github.com/roomle-dev/roomle-ui/commit/6de5abb))
3
+ * Apply suggestion from @Copilot ([f8d9e32](https://github.com/roomle-dev/roomle-ui/commit/f8d9e32))
4
+ * Apply suggestion from @Copilot ([7fa3225](https://github.com/roomle-dev/roomle-ui/commit/7fa3225))
5
+ * Initial plan ([61c4ef8](https://github.com/roomle-dev/roomle-ui/commit/61c4ef8))
6
+ * Initial plan ([f8f1591](https://github.com/roomle-dev/roomle-ui/commit/f8f1591))
7
+ * Merge branch 'master' into copilot/enable-strict-null-checks-web-sdk ([f390b24](https://github.com/roomle-dev/roomle-ui/commit/f390b24))
8
+ * Merge branch 'master' into copilot/enable-strict-null-checks-web-sdk ([263a782](https://github.com/roomle-dev/roomle-ui/commit/263a782))
9
+ * Merge branch 'master' into docs/document-no-pre-existing-failures ([76c3460](https://github.com/roomle-dev/roomle-ui/commit/76c3460))
10
+ * Merge branch 'master' into docs/document-no-pre-existing-failures ([544ed0f](https://github.com/roomle-dev/roomle-ui/commit/544ed0f))
11
+ * Merge branch 'master' into docs/document-no-pre-existing-failures ([d2952a2](https://github.com/roomle-dev/roomle-ui/commit/d2952a2))
12
+ * Merge branch 'master' into fix/skinning-colors-RML-16017 ([52b04d2](https://github.com/roomle-dev/roomle-ui/commit/52b04d2))
13
+ * Merge branch 'master' into fix/update-ligna-store-RML-16199 ([b153cf5](https://github.com/roomle-dev/roomle-ui/commit/b153cf5))
14
+ * Merge branch 'master' into upgraded-by-ci/core-2.71.0-alpha.19 ([b27cc2f](https://github.com/roomle-dev/roomle-ui/commit/b27cc2f))
15
+ * Merge pull request #2343 from roomle-dev/fix/skinning-colors-RML-16017 ([fd9719e](https://github.com/roomle-dev/roomle-ui/commit/fd9719e)), closes [#2343](https://github.com/roomle-dev/roomle-ui/issues/2343)
16
+ * Merge pull request #2345 from roomle-dev/fix/update-ligna-store-RML-16199 ([7938cf5](https://github.com/roomle-dev/roomle-ui/commit/7938cf5)), closes [#2345](https://github.com/roomle-dev/roomle-ui/issues/2345)
17
+ * Merge pull request #2350 from roomle-dev/docs/document-no-pre-existing-failures ([db1768e](https://github.com/roomle-dev/roomle-ui/commit/db1768e)), closes [#2350](https://github.com/roomle-dev/roomle-ui/issues/2350)
18
+ * Merge pull request #2353 from roomle-dev/copilot/enable-strict-null-checks-web-sdk ([6a18bdc](https://github.com/roomle-dev/roomle-ui/commit/6a18bdc)), closes [#2353](https://github.com/roomle-dev/roomle-ui/issues/2353)
19
+ * Merge pull request #2358 from roomle-dev/copilot/enable-strict-null-checks-web-sdk-improvement ([ef038d3](https://github.com/roomle-dev/roomle-ui/commit/ef038d3)), closes [#2358](https://github.com/roomle-dev/roomle-ui/issues/2358)
20
+ * Merge pull request #2361 from roomle-dev/upgraded-by-ci/core-2.71.0-alpha.16 ([5de0e54](https://github.com/roomle-dev/roomle-ui/commit/5de0e54)), closes [#2361](https://github.com/roomle-dev/roomle-ui/issues/2361)
21
+ * Merge pull request #2362 from roomle-dev/fix/hi-undo-redo ([23ac6c9](https://github.com/roomle-dev/roomle-ui/commit/23ac6c9)), closes [#2362](https://github.com/roomle-dev/roomle-ui/issues/2362)
22
+ * Merge pull request #2364 from roomle-dev/upgraded-by-ci/core-2.71.0-alpha.17 ([c2f3c57](https://github.com/roomle-dev/roomle-ui/commit/c2f3c57)), closes [#2364](https://github.com/roomle-dev/roomle-ui/issues/2364)
23
+ * Merge pull request #2366 from roomle-dev/upgraded-by-ci/core-2.71.0-alpha.18 ([5694e1a](https://github.com/roomle-dev/roomle-ui/commit/5694e1a)), closes [#2366](https://github.com/roomle-dev/roomle-ui/issues/2366)
24
+ * Merge pull request #2367 from roomle-dev/upgraded-by-ci/core-2.71.0-alpha.19 ([1203766](https://github.com/roomle-dev/roomle-ui/commit/1203766)), closes [#2367](https://github.com/roomle-dev/roomle-ui/issues/2367)
25
+ * Merge pull request #2368 from roomle-dev/docs/document-no-pre-existing-failures ([b0b92ca](https://github.com/roomle-dev/roomle-ui/commit/b0b92ca)), closes [#2368](https://github.com/roomle-dev/roomle-ui/issues/2368)
26
+ * Merge pull request #2369 from roomle-dev/docs/typescript-guidelines-enum-policy ([24d89a2](https://github.com/roomle-dev/roomle-ui/commit/24d89a2)), closes [#2369](https://github.com/roomle-dev/roomle-ui/issues/2369)
27
+ * Merge pull request #2371 from roomle-dev/copilot/update-documentation-git-workflow ([a13e536](https://github.com/roomle-dev/roomle-ui/commit/a13e536)), closes [#2371](https://github.com/roomle-dev/roomle-ui/issues/2371)
28
+ * Merge pull request #2374 from roomle-dev/upgraded-by-ci/core-2.71.0-alpha.20 ([10c1203](https://github.com/roomle-dev/roomle-ui/commit/10c1203)), closes [#2374](https://github.com/roomle-dev/roomle-ui/issues/2374)
29
+ * Merge pull request #2375 from roomle-dev/upgraded-by-ci/core-2.71.0-alpha.21 ([96e6018](https://github.com/roomle-dev/roomle-ui/commit/96e6018)), closes [#2375](https://github.com/roomle-dev/roomle-ui/issues/2375)
30
+ * feat: core api - mergeObjects ([c5cfeea](https://github.com/roomle-dev/roomle-ui/commit/c5cfeea))
31
+ * feat: reason for loading external objects ([e10b23c](https://github.com/roomle-dev/roomle-ui/commit/e10b23c))
32
+ * feat(core): upgrade to version 2.71.0-alpha.16 ([bbbe3eb](https://github.com/roomle-dev/roomle-ui/commit/bbbe3eb))
33
+ * feat(core): upgrade to version 2.71.0-alpha.17 ([9c2b502](https://github.com/roomle-dev/roomle-ui/commit/9c2b502))
34
+ * feat(core): upgrade to version 2.71.0-alpha.18 ([a107824](https://github.com/roomle-dev/roomle-ui/commit/a107824))
35
+ * feat(core): upgrade to version 2.71.0-alpha.19 ([593b675](https://github.com/roomle-dev/roomle-ui/commit/593b675))
36
+ * feat(core): upgrade to version 2.71.0-alpha.20 ([a89449c](https://github.com/roomle-dev/roomle-ui/commit/a89449c))
37
+ * feat(core): upgrade to version 2.71.0-alpha.21 ([9f80314](https://github.com/roomle-dev/roomle-ui/commit/9f80314))
38
+ * docs: add AI agent test verification and strictNullChecks migration guidelines ([1c5eff2](https://github.com/roomle-dev/roomle-ui/commit/1c5eff2))
39
+ * docs: add erasable syntax only section to TypeScript guidelines ([f3c983f](https://github.com/roomle-dev/roomle-ui/commit/f3c983f))
40
+ * docs: add PR #2353 learnings to strictNullChecks plan and create cleanup backlog ([c593b19](https://github.com/roomle-dev/roomle-ui/commit/c593b19)), closes [#2353](https://github.com/roomle-dev/roomle-ui/issues/2353)
41
+ * docs: add strictNullChecks and type-safety guidelines for agents ([74e4db0](https://github.com/roomle-dev/roomle-ui/commit/74e4db0))
42
+ * docs: document that failing checks are never pre-existing ([80580dd](https://github.com/roomle-dev/roomle-ui/commit/80580dd))
43
+ * docs: document that git-workflow.md must not be used when prompt defines its own workflow ([68bd0ab](https://github.com/roomle-dev/roomle-ui/commit/68bd0ab))
44
+ * docs: update TypeScript guidelines — prefer union types over enums, no enums in new code ([5a64ed4](https://github.com/roomle-dev/roomle-ui/commit/5a64ed4))
45
+ * fix: active interaction must not end while dragging ([74ff77a](https://github.com/roomle-dev/roomle-ui/commit/74ff77a))
46
+ * fix: address Copilot review comments on PR #2350 ([9c15538](https://github.com/roomle-dev/roomle-ui/commit/9c15538)), closes [#2350](https://github.com/roomle-dev/roomle-ui/issues/2350)
47
+ * fix: address review comments on PR #2345 ([cd60e57](https://github.com/roomle-dev/roomle-ui/commit/cd60e57)), closes [#2345](https://github.com/roomle-dev/roomle-ui/issues/2345)
48
+ * fix: address self-review findings ([16501d2](https://github.com/roomle-dev/roomle-ui/commit/16501d2)), closes [6-#8](https://github.com/6-/issues/8)
49
+ * fix: adjust sdk so it can work with ligna store ([34cfbc3](https://github.com/roomle-dev/roomle-ui/commit/34cfbc3))
50
+ * fix: end interaction when external object has been moved ([9dfe119](https://github.com/roomle-dev/roomle-ui/commit/9dfe119))
51
+ * fix: guard extRef.jsObject in getScenePlanElementLightSources ([a95e6aa](https://github.com/roomle-dev/roomle-ui/commit/a95e6aa))
52
+ * fix: hi undo/redo interactions ([8110917](https://github.com/roomle-dev/roomle-ui/commit/8110917))
53
+ * fix: keep logic the same as before for getLibraryData and small fixes ([1c73518](https://github.com/roomle-dev/roomle-ui/commit/1c73518))
54
+ * fix: mobile skinning colors for active pill and tab indicator RML-16017 ([2b28aad](https://github.com/roomle-dev/roomle-ui/commit/2b28aad))
55
+ * fix: preserve runtime behavior in strictNullChecks migration ([17e5699](https://github.com/roomle-dev/roomle-ui/commit/17e5699))
56
+ * fix: resolve all strictNullChecks errors in homag-intelligence package ([e343214](https://github.com/roomle-dev/roomle-ui/commit/e343214))
57
+ * fix: revert Promise.all showcase ([adbadc3](https://github.com/roomle-dev/roomle-ui/commit/adbadc3))
58
+ * fix: revert Promise.all showcase with old file ([f74179f](https://github.com/roomle-dev/roomle-ui/commit/f74179f))
59
+ * fix: revert Promise.all showcase with old file once again ([401cd40](https://github.com/roomle-dev/roomle-ui/commit/401cd40))
60
+ * fix: skinning color schema for all configurators RML-16017 ([5c85a04](https://github.com/roomle-dev/roomle-ui/commit/5c85a04))
61
+ * fix: use missing await ([c4eb8fb](https://github.com/roomle-dev/roomle-ui/commit/c4eb8fb))
62
+ * chore: add documentation ([7879268](https://github.com/roomle-dev/roomle-ui/commit/7879268))
63
+ * chore: apply copilot code review suggestions ([37d775e](https://github.com/roomle-dev/roomle-ui/commit/37d775e))
64
+ * chore: better solve those strictNullCheck problems ([9148331](https://github.com/roomle-dev/roomle-ui/commit/9148331))
65
+ * chore: harden stuff a little bit ([803d0f0](https://github.com/roomle-dev/roomle-ui/commit/803d0f0))
66
+ * chore: remove unused RmlPlugin ([b43a045](https://github.com/roomle-dev/roomle-ui/commit/b43a045))
67
+ * chore: tidy up interactions when loading external objects ([8e76092](https://github.com/roomle-dev/roomle-ui/commit/8e76092))
68
+ * test: hi undo/redo interactions ([1a26dce](https://github.com/roomle-dev/roomle-ui/commit/1a26dce))
69
+ * refactor: options for loading external objects ([8298bf5](https://github.com/roomle-dev/roomle-ui/commit/8298bf5))
70
+ * style: fix formatting in glue-logic.ts and update progress tracking ([64660a2](https://github.com/roomle-dev/roomle-ui/commit/64660a2))
package/hi.js CHANGED
@@ -1,46 +1,50 @@
1
- import { c as I } from "./utils-Dav4kGNW.mjs";
2
- import { g as b } from "./browser-CUgD7zyH.mjs";
3
- const m = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=", f = async (e, o, n, s = { property: "default" }) => {
4
- const t = n.serverOptions ?? {}, r = {
1
+ import { c as U } from "./utils-Dav4kGNW.mjs";
2
+ import { g as I } from "./browser-CUgD7zyH.mjs";
3
+ const f = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=", y = async (e, o, n, r = { property: "default" }) => {
4
+ const t = n.serverOptions ?? {}, s = {
5
5
  headers: {
6
6
  "Content-Type": o === "json" ? "application/json" : "text/plain",
7
7
  "Access-Control-Allow-Origin": "*"
8
8
  }
9
9
  };
10
- t.language && (r.headers["Accept-Language"] = t.language), t.authData && (r.headers.Authorization = t.authData);
10
+ t.language && (s.headers["Accept-Language"] = t.language), t.authData && (s.headers.Authorization = t.authData);
11
11
  try {
12
- const a = performance.now(), { baseUrl: c, subscriptionId: p, key: d, endpointUrl: l } = t, u = await fetch(
13
- (c ?? m) + encodeURIComponent(e) + (p ? `&subscriptionId=${encodeURIComponent(p || "")}` : "") + (d ? `&apiKey=${encodeURIComponent(d)}` : "") + (l ? `&baseUrl=${encodeURIComponent(l)}` : ""),
14
- r
15
- ), h = performance.now() - a;
16
- if (!u.ok)
17
- throw console.warn(`Failed to fetch data from ${s.property}`), new Error(
18
- `Failed to fetch data from ${e}: ${u.statusText}`
12
+ const a = performance.now(), { baseUrl: p, subscriptionId: d, key: l, endpointUrl: u } = t, m = await fetch(
13
+ (p ?? f) + encodeURIComponent(e) + (d ? `&subscriptionId=${encodeURIComponent(d || "")}` : "") + (l ? `&apiKey=${encodeURIComponent(l)}` : "") + (u ? `&baseUrl=${encodeURIComponent(u)}` : ""),
14
+ s
15
+ ), L = performance.now() - a;
16
+ if (!m.ok)
17
+ throw console.warn(`Failed to fetch data from ${r.property}`), new Error(
18
+ `Failed to fetch data from ${e}: ${m.statusText}`
19
19
  );
20
- return console.info(`Success to fetch data from ${s.property}`), console.info(
21
- `The data for ${s.property} was fetched in ${h} milliseconds`
22
- ), u;
20
+ return console.info(`Success to fetch data from ${r.property}`), console.info(
21
+ `The data for ${r.property} was fetched in ${L} milliseconds`
22
+ ), m;
23
23
  } catch (a) {
24
- throw console.warn(`Failed to fetch data from ${s.property}`), console.error(a), a;
24
+ throw console.warn(`Failed to fetch data from ${r.property}`), console.error(a), a;
25
25
  }
26
- }, L = {
26
+ }, c = {
27
27
  "e2fe8b3d-da31-4a20-92ab-ab6e3839300e": /* @__PURE__ */ new Set(["Furniture_Smith"])
28
- }, y = (e, o) => {
29
- const { libraryId: n, serverOptions: s } = e;
30
- return s?.subscriptionId && L[s.subscriptionId]?.has(n) ? `api/pos/${o}?libraryId=${n}` : `api/pos/libraries/${n}/${o}`;
31
- }, w = async (e) => await (await f(
32
- y(e, "articles"),
28
+ }, j = (e, o) => {
29
+ c[e] || (c[e] = /* @__PURE__ */ new Set()), c[e].add(o);
30
+ }, R = (e, o) => {
31
+ c[e]?.delete(o), c[e]?.size === 0 && delete c[e];
32
+ }, g = (e, o) => {
33
+ const { libraryId: n, serverOptions: r } = e;
34
+ return r?.subscriptionId && c[r.subscriptionId]?.has(n) ? `api/pos/${o}?libraryId=${n}` : `api/pos/libraries/${n}/${o}`;
35
+ }, w = async (e) => await (await y(
36
+ g(e, "articles"),
33
37
  "json",
34
38
  e,
35
39
  { property: "articles" }
36
- )).json(), g = async (e) => await (await f(
37
- y(e, "masterData"),
40
+ )).json(), h = async (e) => await (await y(
41
+ g(e, "masterData"),
38
42
  "json",
39
43
  e,
40
44
  { property: "masterData" }
41
45
  )).json(), C = async (e) => {
42
- let n = await (await f(
43
- y(e, "calc.js"),
46
+ const n = await (await y(
47
+ g(e, "calc.js"),
44
48
  "text",
45
49
  e,
46
50
  {
@@ -50,27 +54,27 @@ const m = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
50
54
  if (!n)
51
55
  throw new Error("Script load error");
52
56
  return n;
53
- }, j = (e) => ({
57
+ }, _ = (e) => ({
54
58
  onLoadJavascript: (o) => C(e),
55
59
  onLoadArticleCatalog: (o) => w(e),
56
- onLoadMasterData: (o) => g(e)
57
- }), A = async (e, o, n, s = {}) => {
58
- const { baseUrl: t, om: r } = e.serverOptions ?? {}, a = encodeURIComponent(r?.endpointUrl || ""), c = encodeURIComponent(r?.subscriptionId || ""), p = r?.key || "";
60
+ onLoadMasterData: (o) => h(e)
61
+ }), A = async (e, o, n, r = {}) => {
62
+ const { baseUrl: t, om: s } = e.serverOptions ?? {}, a = encodeURIComponent(s?.endpointUrl || ""), p = encodeURIComponent(s?.subscriptionId || ""), d = s?.key || "";
59
63
  return await (await fetch(
60
- (t ?? m) + `${encodeURIComponent(n)}&subscriptionId=${c}&apiKey=${p}&baseUrl=${a}`,
64
+ (t ?? f) + `${encodeURIComponent(n)}&subscriptionId=${p}&apiKey=${d}&baseUrl=${a}`,
61
65
  {
62
66
  method: "POST",
63
67
  body: JSON.stringify(o),
64
68
  headers: {
65
69
  "Content-Type": "application/json",
66
- ...s
70
+ ...r
67
71
  }
68
72
  }
69
73
  )).json();
70
74
  }, E = async (e, o, n = {}) => {
71
- const { baseUrl: s, om: t } = e.serverOptions ?? {}, r = encodeURIComponent(t?.endpointUrl || ""), a = encodeURIComponent(t?.subscriptionId || ""), c = t?.key || "";
75
+ const { baseUrl: r, om: t } = e.serverOptions ?? {}, s = encodeURIComponent(t?.endpointUrl || ""), a = encodeURIComponent(t?.subscriptionId || ""), p = t?.key || "";
72
76
  return await (await fetch(
73
- (s ?? m) + `${encodeURIComponent(o)}&subscriptionId=${a}&apiKey=${c}&baseUrl=${r}`,
77
+ (r ?? f) + `${encodeURIComponent(o)}&subscriptionId=${a}&apiKey=${p}&baseUrl=${s}`,
74
78
  {
75
79
  method: "GET",
76
80
  headers: {
@@ -79,36 +83,38 @@ const m = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
79
83
  }
80
84
  }
81
85
  )).json();
82
- }, U = (e, o) => {
83
- e.serverOptions || (e.serverOptions = {}), !e.serverOptions.language && o?.locale && (e.serverOptions.language = o.locale), e.serverOptions.language || (e.serverOptions.language = b(null, !0));
86
+ }, b = (e, o) => {
87
+ e.serverOptions || (e.serverOptions = {}), !e.serverOptions.language && o?.locale && (e.serverOptions.language = o.locale), e.serverOptions.language || (e.serverOptions.language = I(null, !0));
84
88
  };
85
89
  let i = null;
86
- const _ = async (e, o = {}) => {
90
+ const O = async (e, o = {}) => {
87
91
  i && window.removeEventListener("message", i);
88
92
  const n = typeof e == "string" ? { libraryId: e } : e;
89
- o.onLoadJavascript === void 0 && (o.onLoadJavascript = (t) => C(n)), o.onLoadArticleCatalog === void 0 && (o.onLoadArticleCatalog = (t) => w(n)), o.onLoadMasterData === void 0 && (o.onLoadMasterData = (t) => g(n));
90
- const { expose: s } = await import("./comlink-BAiXCcU9.mjs");
93
+ o.onLoadJavascript === void 0 && (o.onLoadJavascript = (t) => C(n)), o.onLoadArticleCatalog === void 0 && (o.onLoadArticleCatalog = (t) => w(n)), o.onLoadMasterData === void 0 && (o.onLoadMasterData = (t) => h(n));
94
+ const { expose: r } = await import("./comlink-BAiXCcU9.mjs");
91
95
  i = (t) => {
92
96
  if (t.data.type === "connect_hi" && t.data.port) {
93
- const r = t.data.port;
94
- U(n, t.data.globalInitData || {}), r.start?.(), s(I(o), r);
97
+ const s = t.data.port;
98
+ b(n, t.data.globalInitData || {}), s.start?.(), r(U(o), s);
95
99
  }
96
100
  }, window.addEventListener("message", i);
97
- }, O = () => {
101
+ }, S = () => {
98
102
  i && (window.removeEventListener("message", i), i = null);
99
- }, R = {
103
+ }, H = {
100
104
  HIDE: "hide",
101
105
  SHOW_ATTRIBUTES: "attributes",
102
106
  SHOW_ARTICLES: "articles"
103
107
  };
104
108
  export {
105
- R as HI_PANEL_ACTION,
106
- O as cleanupHi,
107
- j as createHiLibraryCallbacks,
109
+ H as HI_PANEL_ACTION,
110
+ S as cleanupHi,
111
+ _ as createHiLibraryCallbacks,
108
112
  w as libLoadArticleCatalog,
109
113
  C as libLoadCalcScript,
110
- g as libLoadMasterData,
114
+ h as libLoadMasterData,
111
115
  E as omGetRequest,
112
116
  A as omPostRequest,
113
- _ as setupHi
117
+ j as registerLegacyUrlFormat,
118
+ O as setupHi,
119
+ R as unregisterLegacyUrlFormat
114
120
  };
package/hi.min.js CHANGED
@@ -1 +1 @@
1
- import{c as e}from"./utils-BqTPLNLs.mjs";import{g as a}from"./browser-BhHw2H1M.mjs";const t="https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=",o=async(e,a,o,n={property:"default"})=>{const s=o.serverOptions??{},r={headers:{"Content-Type":"json"===a?"application/json":"text/plain","Access-Control-Allow-Origin":"*"}};s.language&&(r.headers["Accept-Language"]=s.language),s.authData&&(r.headers.Authorization=s.authData);try{performance.now();const{baseUrl:a,subscriptionId:o,key:n,endpointUrl:i}=s,c=await fetch((a??t)+encodeURIComponent(e)+(o?`&subscriptionId=${encodeURIComponent(o||"")}`:"")+(n?`&apiKey=${encodeURIComponent(n)}`:"")+(i?`&baseUrl=${encodeURIComponent(i)}`:""),r);if(performance.now(),!c.ok)throw new Error(`Failed to fetch data from ${e}: ${c.statusText}`);return c}catch(e){throw e}},n={"e2fe8b3d-da31-4a20-92ab-ab6e3839300e":new Set(["Furniture_Smith"])},s=(e,a)=>{const{libraryId:t,serverOptions:o}=e;return o?.subscriptionId&&n[o.subscriptionId]?.has(t)?`api/pos/${a}?libraryId=${t}`:`api/pos/libraries/${t}/${a}`},r=async e=>await(await o(s(e,"articles"),"json",e,{property:"articles"})).json(),i=async e=>await(await o(s(e,"masterData"),"json",e,{property:"masterData"})).json(),c=async e=>{let a=await(await o(s(e,"calc.js"),"text",e,{property:"calc.js"})).text();if(!a)throw new Error("Script load error");return a},p=e=>({onLoadJavascript:a=>c(e),onLoadArticleCatalog:a=>r(e),onLoadMasterData:a=>i(e)}),l=async(e,a,o,n={})=>{const{baseUrl:s,om:r}=e.serverOptions??{},i=encodeURIComponent(r?.endpointUrl||""),c=encodeURIComponent(r?.subscriptionId||""),p=r?.key||"";return await(await fetch((s??t)+`${encodeURIComponent(o)}&subscriptionId=${c}&apiKey=${p}&baseUrl=${i}`,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json",...n}})).json()},d=async(e,a,o={})=>{const{baseUrl:n,om:s}=e.serverOptions??{},r=encodeURIComponent(s?.endpointUrl||""),i=encodeURIComponent(s?.subscriptionId||""),c=s?.key||"";return await(await fetch((n??t)+`${encodeURIComponent(a)}&subscriptionId=${i}&apiKey=${c}&baseUrl=${r}`,{method:"GET",headers:{"Content-Type":"application/json",...o}})).json()};let u=null;const m=async(t,o={})=>{u&&window.removeEventListener("message",u);const n="string"==typeof t?{libraryId:t}:t;void 0===o.onLoadJavascript&&(o.onLoadJavascript=e=>c(n)),void 0===o.onLoadArticleCatalog&&(o.onLoadArticleCatalog=e=>r(n)),void 0===o.onLoadMasterData&&(o.onLoadMasterData=e=>i(n));const{expose:s}=await import("./comlink-CmT64Qi3.mjs");u=t=>{if("connect_hi"===t.data.type&&t.data.port){const r=t.data.port;((e,t)=>{e.serverOptions||(e.serverOptions={}),!e.serverOptions.language&&t?.locale&&(e.serverOptions.language=t.locale),e.serverOptions.language||(e.serverOptions.language=a(null,!0))})(n,t.data.globalInitData||{}),r.start?.(),s(e(o),r)}},window.addEventListener("message",u)},b=()=>{u&&(window.removeEventListener("message",u),u=null)},w={HIDE:"hide",SHOW_ATTRIBUTES:"attributes",SHOW_ARTICLES:"articles"};export{w as HI_PANEL_ACTION,b as cleanupHi,p as createHiLibraryCallbacks,r as libLoadArticleCatalog,c as libLoadCalcScript,i as libLoadMasterData,d as omGetRequest,l as omPostRequest,m as setupHi};
1
+ import{c as e}from"./utils-BqTPLNLs.mjs";import{g as a}from"./browser-BhHw2H1M.mjs";const t="https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=",o=async(e,a,o,n={property:"default"})=>{const r=o.serverOptions??{},s={headers:{"Content-Type":"json"===a?"application/json":"text/plain","Access-Control-Allow-Origin":"*"}};r.language&&(s.headers["Accept-Language"]=r.language),r.authData&&(s.headers.Authorization=r.authData);try{performance.now();const{baseUrl:a,subscriptionId:o,key:n,endpointUrl:i}=r,c=await fetch((a??t)+encodeURIComponent(e)+(o?`&subscriptionId=${encodeURIComponent(o||"")}`:"")+(n?`&apiKey=${encodeURIComponent(n)}`:"")+(i?`&baseUrl=${encodeURIComponent(i)}`:""),s);if(performance.now(),!c.ok)throw new Error(`Failed to fetch data from ${e}: ${c.statusText}`);return c}catch(e){throw e}},n={"e2fe8b3d-da31-4a20-92ab-ab6e3839300e":new Set(["Furniture_Smith"])},r=(e,a)=>{n[e]||(n[e]=new Set),n[e].add(a)},s=(e,a)=>{n[e]?.delete(a),0===n[e]?.size&&delete n[e]},i=(e,a)=>{const{libraryId:t,serverOptions:o}=e;return o?.subscriptionId&&n[o.subscriptionId]?.has(t)?`api/pos/${a}?libraryId=${t}`:`api/pos/libraries/${t}/${a}`},c=async e=>await(await o(i(e,"articles"),"json",e,{property:"articles"})).json(),p=async e=>await(await o(i(e,"masterData"),"json",e,{property:"masterData"})).json(),l=async e=>{const a=await(await o(i(e,"calc.js"),"text",e,{property:"calc.js"})).text();if(!a)throw new Error("Script load error");return a},d=e=>({onLoadJavascript:a=>l(e),onLoadArticleCatalog:a=>c(e),onLoadMasterData:a=>p(e)}),u=async(e,a,o,n={})=>{const{baseUrl:r,om:s}=e.serverOptions??{},i=encodeURIComponent(s?.endpointUrl||""),c=encodeURIComponent(s?.subscriptionId||""),p=s?.key||"";return await(await fetch((r??t)+`${encodeURIComponent(o)}&subscriptionId=${c}&apiKey=${p}&baseUrl=${i}`,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json",...n}})).json()},m=async(e,a,o={})=>{const{baseUrl:n,om:r}=e.serverOptions??{},s=encodeURIComponent(r?.endpointUrl||""),i=encodeURIComponent(r?.subscriptionId||""),c=r?.key||"";return await(await fetch((n??t)+`${encodeURIComponent(a)}&subscriptionId=${i}&apiKey=${c}&baseUrl=${s}`,{method:"GET",headers:{"Content-Type":"application/json",...o}})).json()};let y=null;const w=async(t,o={})=>{y&&window.removeEventListener("message",y);const n="string"==typeof t?{libraryId:t}:t;void 0===o.onLoadJavascript&&(o.onLoadJavascript=e=>l(n)),void 0===o.onLoadArticleCatalog&&(o.onLoadArticleCatalog=e=>c(n)),void 0===o.onLoadMasterData&&(o.onLoadMasterData=e=>p(n));const{expose:r}=await import("./comlink-CmT64Qi3.mjs");y=t=>{if("connect_hi"===t.data.type&&t.data.port){const s=t.data.port;((e,t)=>{e.serverOptions||(e.serverOptions={}),!e.serverOptions.language&&t?.locale&&(e.serverOptions.language=t.locale),e.serverOptions.language||(e.serverOptions.language=a(null,!0))})(n,t.data.globalInitData||{}),s.start?.(),r(e(o),s)}},window.addEventListener("message",y)},b=()=>{y&&(window.removeEventListener("message",y),y=null)},g={HIDE:"hide",SHOW_ATTRIBUTES:"attributes",SHOW_ARTICLES:"articles"};export{g as HI_PANEL_ACTION,b as cleanupHi,d as createHiLibraryCallbacks,c as libLoadArticleCatalog,l as libLoadCalcScript,p as libLoadMasterData,m as omGetRequest,u as omPostRequest,r as registerLegacyUrlFormat,w as setupHi,s as unregisterLegacyUrlFormat};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "6.4.0-alpha.13",
3
+ "version": "6.4.0-alpha.15",
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",
@@ -11,7 +11,7 @@
11
11
  * ```
12
12
  */
13
13
  export { createHiLibraryCallbacks } from './homag-intelligence/hi-callbacks';
14
- export { libLoadArticleCatalog, libLoadMasterData, libLoadCalcScript, } from './homag-intelligence/hi-requests';
14
+ export { libLoadArticleCatalog, libLoadMasterData, libLoadCalcScript, registerLegacyUrlFormat, unregisterLegacyUrlFormat, } from './homag-intelligence/hi-requests';
15
15
  export { omPostRequest, omGetRequest, } from './homag-intelligence/hi-order-manager';
16
16
  export { setupHi, cleanupHi } from './homag-intelligence/hi-setup';
17
17
  export { type ExternalObjectSnapshotSaveResult, type HiContextAction, } from '../../web-sdk/packages';
@@ -1,4 +1,35 @@
1
1
  import { HomagIntelligenceInitData } from '../../../web-sdk/packages';
2
+ /**
3
+ * Register a subscription/library combination that requires the legacy
4
+ * TecConfig URL format.
5
+ *
6
+ * Call this **before** `setupHi` so that subsequent data fetches
7
+ * (`libLoadArticleCatalog`, `libLoadMasterData`, `libLoadCalcScript`)
8
+ * use the correct URL scheme.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { registerLegacyUrlFormat, setupHi } from '@roomle/embedding-lib/hi';
13
+ *
14
+ * registerLegacyUrlFormat('5bf5fac8-58af-4a95-a5e0-41a4dc52d5f5', 'Furniture_Smith');
15
+ * await setupHi(hiOptions, callbacks);
16
+ * ```
17
+ */
18
+ export declare const registerLegacyUrlFormat: (subscriptionId: string, libraryId: string) => void;
19
+ /**
20
+ * Unregister a subscription/library combination so it no longer uses the
21
+ * legacy TecConfig URL format.
22
+ *
23
+ * Useful when HOMAG migrates a subscription to the newer URL scheme.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * import { unregisterLegacyUrlFormat } from '@roomle/embedding-lib/hi';
28
+ *
29
+ * unregisterLegacyUrlFormat('e2fe8b3d-da31-4a20-92ab-ab6e3839300e', 'Furniture_Smith');
30
+ * ```
31
+ */
32
+ export declare const unregisterLegacyUrlFormat: (subscriptionId: string, libraryId: string) => void;
2
33
  export declare const libLoadArticleCatalog: (hiInitData: HomagIntelligenceInitData) => Promise<any>;
3
34
  export declare const libLoadMasterData: (hiInitData: HomagIntelligenceInitData) => Promise<any>;
4
35
  export declare const libLoadCalcScript: (hiInitData: HomagIntelligenceInitData) => Promise<string>;
@@ -1,5 +1,5 @@
1
1
  import { DragInStrategy } from './types';
2
- import { RapiId, ID_TYPE } from '../../../../web-sdk/packages';
2
+ import { ID_TYPE, RapiId } from '../../../../web-sdk/packages';
3
3
  import { ExposedApi } from '../../../../../src/configurator/embedding/exposed-api';
4
4
  import { DragInSettings } from '../types';
5
5
  import { PossibleCustomViewsAndMain } from '../../../../../src/configurator/embedding/custom-views';
@@ -1,5 +1,5 @@
1
1
  import { DragInStrategy } from './types';
2
- import { RapiId, ID_TYPE } from '../../../../web-sdk/packages';
2
+ import { ID_TYPE, RapiId } from '../../../../web-sdk/packages';
3
3
  import { ExposedApi } from '../../../../../src/configurator/embedding/exposed-api';
4
4
  import { DragInOptions } from '../types';
5
5
  import { OnBeforeUpdateDragGhost } from '../../embedding-plugins';