@roomle/embedding-lib 0.0.0-dev-1b4351d → 0.0.0-dev-4c2797a

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.
@@ -0,0 +1,212 @@
1
+ Third-party software notices for @roomle/embedding-lib 4c2797aeb1bcaf00618ae9e7374260f8d2655753
2
+ Generated 2026-10-30
3
+
4
+ This product includes the following third-party components.
5
+
6
+ ================================================================================
7
+ comlink@4.4.2
8
+ License: Apache-2.0
9
+ Copyright: 2017 Google Inc.
10
+ Source: https://github.com/GoogleChromeLabs/comlink
11
+
12
+ Apache License
13
+ Version 2.0, January 2004
14
+ http://www.apache.org/licenses/
15
+
16
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
17
+
18
+ 1. Definitions.
19
+
20
+ "License" shall mean the terms and conditions for use, reproduction,
21
+ and distribution as defined by Sections 1 through 9 of this document.
22
+
23
+ "Licensor" shall mean the copyright owner or entity authorized by
24
+ the copyright owner that is granting the License.
25
+
26
+ "Legal Entity" shall mean the union of the acting entity and all
27
+ other entities that control, are controlled by, or are under common
28
+ control with that entity. For the purposes of this definition,
29
+ "control" means (i) the power, direct or indirect, to cause the
30
+ direction or management of such entity, whether by contract or
31
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
32
+ outstanding shares, or (iii) beneficial ownership of such entity.
33
+
34
+ "You" (or "Your") shall mean an individual or Legal Entity
35
+ exercising permissions granted by this License.
36
+
37
+ "Source" form shall mean the preferred form for making modifications,
38
+ including but not limited to software source code, documentation
39
+ source, and configuration files.
40
+
41
+ "Object" form shall mean any form resulting from mechanical
42
+ transformation or translation of a Source form, including but
43
+ not limited to compiled object code, generated documentation,
44
+ and conversions to other media types.
45
+
46
+ "Work" shall mean the work of authorship, whether in Source or
47
+ Object form, made available under the License, as indicated by a
48
+ copyright notice that is included in or attached to the work
49
+ (an example is provided in the Appendix below).
50
+
51
+ "Derivative Works" shall mean any work, whether in Source or Object
52
+ form, that is based on (or derived from) the Work and for which the
53
+ editorial revisions, annotations, elaborations, or other modifications
54
+ represent, as a whole, an original work of authorship. For the purposes
55
+ of this License, Derivative Works shall not include works that remain
56
+ separable from, or merely link (or bind by name) to the interfaces of,
57
+ the Work and Derivative Works thereof.
58
+
59
+ "Contribution" shall mean any work of authorship, including
60
+ the original version of the Work and any modifications or additions
61
+ to that Work or Derivative Works thereof, that is intentionally
62
+ submitted to Licensor for inclusion in the Work by the copyright owner
63
+ or by an individual or Legal Entity authorized to submit on behalf of
64
+ the copyright owner. For the purposes of this definition, "submitted"
65
+ means any form of electronic, verbal, or written communication sent
66
+ to the Licensor or its representatives, including but not limited to
67
+ communication on electronic mailing lists, source code control systems,
68
+ and issue tracking systems that are managed by, or on behalf of, the
69
+ Licensor for the purpose of discussing and improving the Work, but
70
+ excluding communication that is conspicuously marked or otherwise
71
+ designated in writing by the copyright owner as "Not a Contribution."
72
+
73
+ "Contributor" shall mean Licensor and any individual or Legal Entity
74
+ on behalf of whom a Contribution has been received by Licensor and
75
+ subsequently incorporated within the Work.
76
+
77
+ 2. Grant of Copyright License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ copyright license to reproduce, prepare Derivative Works of,
81
+ publicly display, publicly perform, sublicense, and distribute the
82
+ Work and such Derivative Works in Source or Object form.
83
+
84
+ 3. Grant of Patent License. Subject to the terms and conditions of
85
+ this License, each Contributor hereby grants to You a perpetual,
86
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
87
+ (except as stated in this section) patent license to make, have made,
88
+ use, offer to sell, sell, import, and otherwise transfer the Work,
89
+ where such license applies only to those patent claims licensable
90
+ by such Contributor that are necessarily infringed by their
91
+ Contribution(s) alone or by combination of their Contribution(s)
92
+ with the Work to which such Contribution(s) was submitted. If You
93
+ institute patent litigation against any entity (including a
94
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
95
+ or a Contribution incorporated within the Work constitutes direct
96
+ or contributory patent infringement, then any patent licenses
97
+ granted to You under this License for that Work shall terminate
98
+ as of the date such litigation is filed.
99
+
100
+ 4. Redistribution. You may reproduce and distribute copies of the
101
+ Work or Derivative Works thereof in any medium, with or without
102
+ modifications, and in Source or Object form, provided that You
103
+ meet the following conditions:
104
+
105
+ (a) You must give any other recipients of the Work or
106
+ Derivative Works a copy of this License; and
107
+
108
+ (b) You must cause any modified files to carry prominent notices
109
+ stating that You changed the files; and
110
+
111
+ (c) You must retain, in the Source form of any Derivative Works
112
+ that You distribute, all copyright, patent, trademark, and
113
+ attribution notices from the Source form of the Work,
114
+ excluding those notices that do not pertain to any part of
115
+ the Derivative Works; and
116
+
117
+ (d) If the Work includes a "NOTICE" text file as part of its
118
+ distribution, then any Derivative Works that You distribute must
119
+ include a readable copy of the attribution notices contained
120
+ within such NOTICE file, excluding those notices that do not
121
+ pertain to any part of the Derivative Works, in at least one
122
+ of the following places: within a NOTICE text file distributed
123
+ as part of the Derivative Works; within the Source form or
124
+ documentation, if provided along with the Derivative Works; or,
125
+ within a display generated by the Derivative Works, if and
126
+ wherever such third-party notices normally appear. The contents
127
+ of the NOTICE file are for informational purposes only and
128
+ do not modify the License. You may add Your own attribution
129
+ notices within Derivative Works that You distribute, alongside
130
+ or as an addendum to the NOTICE text from the Work, provided
131
+ that such additional attribution notices cannot be construed
132
+ as modifying the License.
133
+
134
+ You may add Your own copyright statement to Your modifications and
135
+ may provide additional or different license terms and conditions
136
+ for use, reproduction, or distribution of Your modifications, or
137
+ for any such Derivative Works as a whole, provided Your use,
138
+ reproduction, and distribution of the Work otherwise complies with
139
+ the conditions stated in this License.
140
+
141
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
142
+ any Contribution intentionally submitted for inclusion in the Work
143
+ by You to the Licensor shall be under the terms and conditions of
144
+ this License, without any additional terms or conditions.
145
+ Notwithstanding the above, nothing herein shall supersede or modify
146
+ the terms of any separate license agreement you may have executed
147
+ with Licensor regarding such Contributions.
148
+
149
+ 6. Trademarks. This License does not grant permission to use the trade
150
+ names, trademarks, service marks, or product names of the Licensor,
151
+ except as required for reasonable and customary use in describing the
152
+ origin of the Work and reproducing the content of the NOTICE file.
153
+
154
+ 7. Disclaimer of Warranty. Unless required by applicable law or
155
+ agreed to in writing, Licensor provides the Work (and each
156
+ Contributor provides its Contributions) on an "AS IS" BASIS,
157
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
158
+ implied, including, without limitation, any warranties or conditions
159
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
160
+ PARTICULAR PURPOSE. You are solely responsible for determining the
161
+ appropriateness of using or redistributing the Work and assume any
162
+ risks associated with Your exercise of permissions under this License.
163
+
164
+ 8. Limitation of Liability. In no event and under no legal theory,
165
+ whether in tort (including negligence), contract, or otherwise,
166
+ unless required by applicable law (such as deliberate and grossly
167
+ negligent acts) or agreed to in writing, shall any Contributor be
168
+ liable to You for damages, including any direct, indirect, special,
169
+ incidental, or consequential damages of any character arising as a
170
+ result of this License or out of the use or inability to use the
171
+ Work (including but not limited to damages for loss of goodwill,
172
+ work stoppage, computer failure or malfunction, or any and all
173
+ other commercial damages or losses), even if such Contributor
174
+ has been advised of the possibility of such damages.
175
+
176
+ 9. Accepting Warranty or Additional Liability. While redistributing
177
+ the Work or Derivative Works thereof, You may choose to offer,
178
+ and charge a fee for, acceptance of support, warranty, indemnity,
179
+ or other liability obligations and/or rights consistent with this
180
+ License. However, in accepting such obligations, You may act only
181
+ on Your own behalf and on Your sole responsibility, not on behalf
182
+ of any other Contributor, and only if You agree to indemnify,
183
+ defend, and hold each Contributor harmless for any liability
184
+ incurred by, or claims asserted against, such Contributor by reason
185
+ of your accepting any such warranty or additional liability.
186
+
187
+ END OF TERMS AND CONDITIONS
188
+
189
+ APPENDIX: How to apply the Apache License to your work.
190
+
191
+ To apply the Apache License to your work, attach the following
192
+ boilerplate notice, with the fields enclosed by brackets "[]"
193
+ replaced with your own identifying information. (Don't include
194
+ the brackets!) The text should be enclosed in the appropriate
195
+ comment syntax for the file format. We also recommend that a
196
+ file or class name and description of purpose be included on the
197
+ same "printed page" as the copyright notice for easier
198
+ identification within third-party archives.
199
+
200
+ Copyright 2017 Google Inc.
201
+
202
+ Licensed under the Apache License, Version 2.0 (the "License");
203
+ you may not use this file except in compliance with the License.
204
+ You may obtain a copy of the License at
205
+
206
+ http://www.apache.org/licenses/LICENSE-2.0
207
+
208
+ Unless required by applicable law or agreed to in writing, software
209
+ distributed under the License is distributed on an "AS IS" BASIS,
210
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
211
+ See the License for the specific language governing permissions and
212
+ limitations under the License.
@@ -1,3 +1,4 @@
1
+
1
2
  var e = [
2
3
  "language",
3
4
  "browserLanguage",
@@ -1,3 +1,4 @@
1
+
1
2
  //#region packages/common/src/utils/browser.ts
2
3
  var e = [
3
4
  "language",
@@ -1,3 +1,4 @@
1
+
1
2
  var e = Symbol("Comlink.proxy"), t = Symbol("Comlink.endpoint"), n = Symbol("Comlink.releaseProxy"), r = Symbol("Comlink.finalizer"), i = Symbol("Comlink.thrown"), a = (e) => typeof e == "object" && !!e || typeof e == "function", o = new Map([["proxy", {
2
3
  canHandle: (t) => a(t) && t[e],
3
4
  serialize(e) {
@@ -1,3 +1,4 @@
1
+
1
2
  //#region node_modules/comlink/dist/esm/comlink.mjs
2
3
  var e = Symbol("Comlink.proxy"), t = Symbol("Comlink.endpoint"), n = Symbol("Comlink.releaseProxy"), r = Symbol("Comlink.finalizer"), i = Symbol("Comlink.thrown"), a = (e) => typeof e == "object" && !!e || typeof e == "function", o = new Map([["proxy", {
3
4
  canHandle: (t) => a(t) && t[e],
@@ -1,4 +1,5 @@
1
- import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-CV1E-DO6.mjs";
1
+
2
+ import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-D_heMFxk.mjs";
2
3
  import "./embedding-plugins.min.js";
3
4
  var o = (e, t, n = 0, r = 0) => {
4
5
  let i = t.x + t.width + n, a = t.x - n, o = t.y + t.height + r, s = t.y - r, { x: c, y: l } = e;
@@ -1,4 +1,5 @@
1
- import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-ClPpCYyi.mjs";
1
+
2
+ import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-O6toxxkY.mjs";
2
3
  import "./embedding-plugins.js";
3
4
  //#region packages/common/src/utils/drag.ts
4
5
  var o = (e, t, n = 0, r = 0) => {
@@ -1,3 +1,4 @@
1
+
1
2
  var e = Object.defineProperty, t = (t, n) => {
2
3
  let r = {};
3
4
  for (var i in t) e(r, i, {
@@ -34,7 +35,7 @@ var e = Object.defineProperty, t = (t, n) => {
34
35
  }
35
36
  async init() {
36
37
  if (await super.init(), this._mode === "website") try {
37
- let { DragInFromWebsiteStrategy: e } = await import("./from-website-BmCO2xli.mjs");
38
+ let { DragInFromWebsiteStrategy: e } = await import("./from-website-Csj57D58.mjs");
38
39
  this._strategy = new e(this._instance, this._mainDomElement, {
39
40
  settings: this.options,
40
41
  mode: "website"
@@ -45,7 +46,7 @@ var e = Object.defineProperty, t = (t, n) => {
45
46
  else {
46
47
  if (this._mode !== "custom-view") throw Error("Unsupported mode");
47
48
  try {
48
- let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-Sx6P6iDI.mjs");
49
+ let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-CnUFpf6f.mjs");
49
50
  this._strategy = new e(this._instance, this._mainDomElement, this.options, this._viewName);
50
51
  } catch (e) {
51
52
  throw e;
@@ -1,3 +1,4 @@
1
+
1
2
  //#region \0rolldown/runtime.js
2
3
  var e = Object.defineProperty, t = (t, n) => {
3
4
  let r = {};
@@ -41,7 +42,7 @@ var e = Object.defineProperty, t = (t, n) => {
41
42
  }
42
43
  async init() {
43
44
  if (await super.init(), this._mode === "website") try {
44
- let { DragInFromWebsiteStrategy: e } = await import("./from-website-DZJy_l42.mjs");
45
+ let { DragInFromWebsiteStrategy: e } = await import("./from-website-bTi4qNXt.mjs");
45
46
  this._strategy = new e(this._instance, this._mainDomElement, {
46
47
  settings: this.options,
47
48
  mode: "website"
@@ -50,7 +51,7 @@ var e = Object.defineProperty, t = (t, n) => {
50
51
  throw console.error("Could not load Dragin strategy \"FromWebsite\""), e;
51
52
  }
52
53
  else if (this._mode === "custom-view") try {
53
- let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-Q9A-J7qV.mjs");
54
+ let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-DsDwSZTY.mjs");
54
55
  this._strategy = new e(this._instance, this._mainDomElement, this.options, this._viewName);
55
56
  } catch (e) {
56
57
  throw console.error("Could not load Dragin strategy \"FromCustomView\""), e;
@@ -1,2 +1,3 @@
1
- import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-ClPpCYyi.mjs";
1
+ /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
+ import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-O6toxxkY.mjs";
2
3
  export { l as DragIn, a as RML_DRAG_GHOST_FADE_IN, e as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, s as RML_DRAG_GHOST_FADE_OUT, c as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, t as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, n as RML_DRAG_IN_FALLBACK_GHOST_URL, r as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, o as RML_DRAG_IN_STYLES_ID, i as TARGET_OPACITY };
@@ -1,2 +1,3 @@
1
- import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-CV1E-DO6.mjs";
1
+ /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
+ import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-D_heMFxk.mjs";
2
3
  export { l as DragIn, a as RML_DRAG_GHOST_FADE_IN, e as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, s as RML_DRAG_GHOST_FADE_OUT, c as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, t as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, n as RML_DRAG_IN_FALLBACK_GHOST_URL, r as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, o as RML_DRAG_IN_STYLES_ID, i as TARGET_OPACITY };
@@ -1,6 +1,7 @@
1
- import { d as e } from "./drag-in-CV1E-DO6.mjs";
2
- import { a as t, c as n, n as r } from "./utils-wJ80awOA.mjs";
3
- import { t as i } from "./drag-ghost-CDFtC1pd.mjs";
1
+
2
+ import { d as e } from "./drag-in-D_heMFxk.mjs";
3
+ import { a as t, c as n, n as r } from "./utils-BoELtcEK.mjs";
4
+ import { t as i } from "./drag-ghost-DRJqglR4.mjs";
4
5
  var a = (e, t = 0) => n(e) ? {
5
6
  clientX: e.touches[t].clientX,
6
7
  clientY: e.touches[t].clientY
@@ -1,6 +1,7 @@
1
- import { d as e } from "./drag-in-ClPpCYyi.mjs";
2
- import { a as t, c as n, n as r } from "./utils-DxJ3PcKe.mjs";
3
- import { t as i } from "./drag-ghost-BxqPJdhq.mjs";
1
+
2
+ import { d as e } from "./drag-in-O6toxxkY.mjs";
3
+ import { a as t, c as n, n as r } from "./utils-BwWn6Fw4.mjs";
4
+ import { t as i } from "./drag-ghost-DvNl926o.mjs";
4
5
  var a = (e, t = 0) => n(e) ? {
5
6
  clientX: e.touches[t].clientX,
6
7
  clientY: e.touches[t].clientY
@@ -1,6 +1,7 @@
1
- import { l as e, p as t, r as n } from "./drag-in-CV1E-DO6.mjs";
2
- import { c as r, i, n as a, o, r as s, s as c } from "./utils-wJ80awOA.mjs";
3
- import { t as l } from "./drag-ghost-CDFtC1pd.mjs";
1
+
2
+ import { l as e, p as t, r as n } from "./drag-in-D_heMFxk.mjs";
3
+ import { c as r, i, n as a, o, r as s, s as c } from "./utils-BoELtcEK.mjs";
4
+ import { t as l } from "./drag-ghost-DRJqglR4.mjs";
4
5
  var u = class {
5
6
  _options = {};
6
7
  _instance;
@@ -1,6 +1,7 @@
1
- import { l as e, p as t, r as n } from "./drag-in-ClPpCYyi.mjs";
2
- import { c as r, i, n as a, o, r as s, s as c } from "./utils-DxJ3PcKe.mjs";
3
- import { t as l } from "./drag-ghost-BxqPJdhq.mjs";
1
+
2
+ import { l as e, p as t, r as n } from "./drag-in-O6toxxkY.mjs";
3
+ import { c as r, i, n as a, o, r as s, s as c } from "./utils-BwWn6Fw4.mjs";
4
+ import { t as l } from "./drag-ghost-DvNl926o.mjs";
4
5
  //#region packages/embedding-lib/src/plugins/strategy/from-website.ts
5
6
  var u = class {
6
7
  _options = {};
package/hi.js CHANGED
@@ -1,5 +1,6 @@
1
- import { t as e } from "./browser-CW9o-dtT.mjs";
2
- import { t } from "./utils-DxJ3PcKe.mjs";
1
+ /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
+ import { t as e } from "./browser-D6M-d6y5.mjs";
3
+ import { t } from "./utils-BwWn6Fw4.mjs";
3
4
  var n = (e, t) => t === e.libraryId ? e : {
4
5
  ...e,
5
6
  libraryId: t
@@ -56,7 +57,7 @@ var n = (e, t) => t === e.libraryId ? e : {
56
57
  h && window.removeEventListener("message", h);
57
58
  let i = typeof e == "string" ? { libraryId: e } : e;
58
59
  r.onLoadJavascript === void 0 && (r.onLoadJavascript = (e) => u(n(i, e))), r.onLoadArticleCatalog === void 0 && (r.onLoadArticleCatalog = (e) => c(n(i, e))), r.onLoadMasterData === void 0 && (r.onLoadMasterData = (e) => l(n(i, e)));
59
- let { expose: a } = await import("./comlink-B5lV2OWp.mjs");
60
+ let { expose: a } = await import("./comlink-CR7SvKHo.mjs");
60
61
  h = (e) => {
61
62
  if (e.data.type === "connect_hi" && e.data.port) {
62
63
  let n = e.data.port;
@@ -161,8 +162,43 @@ var n = (e, t) => t === e.libraryId ? e : {
161
162
  "groups",
162
163
  "obstacles",
163
164
  "installationElements"
164
- ], M = 500, N = 240, P = ({ content: e }) => e.filter((e) => e.type === "text").map((e) => e.text).join("\n"), F = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }, o) => {
165
- let s = o ? { fetch: async (e, t) => (typeof t?.body == "string" && await o(t.body), fetch(e, t)) } : {};
165
+ ], M = 500, N = 240, P = ({ content: e }) => e.filter((e) => e.type === "text").map((e) => e.text).join("\n"), F = "The images of this result follow in the next message.", I = (e) => e.flatMap((e) => {
166
+ if (e.role !== "tool" || typeof e.content == "string") return [e];
167
+ let t = [], n = e.content.map((e) => {
168
+ let n = e.output?.type === "content" ? e.output.value.filter(({ type: e }) => e === "file") : [];
169
+ return !e.output || n.length === 0 ? e : (t.push(...n), {
170
+ ...e,
171
+ output: {
172
+ ...e.output,
173
+ value: [...e.output.value.filter(({ type: e }) => e !== "file"), {
174
+ type: "text",
175
+ text: F
176
+ }]
177
+ }
178
+ });
179
+ });
180
+ return t.length === 0 ? [e] : [{
181
+ ...e,
182
+ content: n
183
+ }, {
184
+ role: "user",
185
+ content: t
186
+ }];
187
+ }), L = (e) => ({
188
+ specificationVersion: e.specificationVersion,
189
+ provider: e.provider,
190
+ modelId: e.modelId,
191
+ supportedUrls: e.supportedUrls,
192
+ doGenerate: (t) => e.doGenerate({
193
+ ...t,
194
+ prompt: I(t.prompt)
195
+ }),
196
+ doStream: (t) => e.doStream({
197
+ ...t,
198
+ prompt: I(t.prompt)
199
+ })
200
+ }), R = async ({ provider: e, model: t, apiKey: n, baseUrl: r, headers: i, chatCompletions: a, reasoningEffort: o }, s) => {
201
+ let c = s ? { fetch: async (e, t) => (typeof t?.body == "string" && await s(t.body), fetch(e, t)) } : {};
166
202
  switch (e) {
167
203
  case "openai": {
168
204
  let { createOpenAI: e } = await import(
@@ -171,23 +207,38 @@ var n = (e, t) => t === e.libraryId ? e : {
171
207
  );
172
208
  return { languageModel: e({
173
209
  apiKey: n,
174
- ...s
210
+ ...c
175
211
  })(t) };
176
212
  }
177
213
  case "azure": {
178
214
  let { createAzure: e } = await import(
179
215
  /* @vite-ignore */
180
216
  D("@ai-sdk/azure@4.0.85")
181
- ), o = e({
217
+ ), i = e({
182
218
  apiKey: n,
183
219
  baseURL: r,
184
- ...s
220
+ ...c
185
221
  });
186
222
  return {
187
- languageModel: i ? o.chat(t) : o(t),
188
- providerOptions: a ? { azure: { reasoningEffort: a } } : void 0
223
+ languageModel: a ? i.chat(t) : i(t),
224
+ providerOptions: o ? { azure: { reasoningEffort: o } } : void 0
189
225
  };
190
226
  }
227
+ case "openai-compatible": {
228
+ if (!r) throw Error("The provider \"openai-compatible\" needs a baseUrl");
229
+ let { createOpenAICompatible: e } = await import(
230
+ /* @vite-ignore */
231
+ D("@ai-sdk/openai-compatible@3.0.59")
232
+ );
233
+ return { languageModel: L(e({
234
+ name: "openai-compatible",
235
+ baseURL: r,
236
+ apiKey: n,
237
+ headers: i,
238
+ includeUsage: !0,
239
+ ...c
240
+ })(t)) };
241
+ }
191
242
  case "mistral": {
192
243
  let { createMistral: e } = await import(
193
244
  /* @vite-ignore */
@@ -195,7 +246,7 @@ var n = (e, t) => t === e.libraryId ? e : {
195
246
  );
196
247
  return { languageModel: e({
197
248
  apiKey: n,
198
- ...s
249
+ ...c
199
250
  })(t) };
200
251
  }
201
252
  case "anthropic": {
@@ -206,7 +257,7 @@ var n = (e, t) => t === e.libraryId ? e : {
206
257
  return { languageModel: e({
207
258
  apiKey: n,
208
259
  headers: { "anthropic-dangerous-direct-browser-access": "true" },
209
- ...s
260
+ ...c
210
261
  })(t) };
211
262
  }
212
263
  case "google": {
@@ -216,12 +267,12 @@ var n = (e, t) => t === e.libraryId ? e : {
216
267
  );
217
268
  return { languageModel: e({
218
269
  apiKey: n,
219
- ...s
270
+ ...c
220
271
  })(t) };
221
272
  }
222
- default: throw Error(`Unknown provider "${e}" - supported: azure, openai, mistral, anthropic, google`);
273
+ default: throw Error(`Unknown provider "${e}" - supported: azure, openai, openai-compatible, mistral, anthropic, google`);
223
274
  }
224
- }, I = async (e, t, n) => {
275
+ }, z = async (e, t, n) => {
225
276
  let r = e.extended, i = (e) => r.planningAssistantOutput(e), a = [], o = null, s = /* @__PURE__ */ new Set(), c;
226
277
  try {
227
278
  c = await Promise.all([
@@ -229,7 +280,7 @@ var n = (e, t) => t === e.libraryId ? e : {
229
280
  /* @vite-ignore */
230
281
  D("ai@7.0.122")
231
282
  ),
232
- F(t, async (e) => {
283
+ R(t, async (e) => {
233
284
  a.push({
234
285
  ...await E(e, s),
235
286
  stepNumber: o
@@ -410,10 +461,10 @@ var n = (e, t) => t === e.libraryId ? e : {
410
461
  type: "availability",
411
462
  available: !0
412
463
  });
413
- }, L = {
464
+ }, B = {
414
465
  HIDE: "hide",
415
466
  SHOW_ATTRIBUTES: "attributes",
416
467
  SHOW_ARTICLES: "articles"
417
468
  };
418
469
  //#endregion
419
- export { L as HI_PANEL_ACTION, _ as cleanupHi, d as createHiLibraryCallbacks, y as createHiMcpTools, c as libLoadArticleCatalog, u as libLoadCalcScript, l as libLoadMasterData, F as loadChatModel, p as omGetRequest, f as omPostRequest, a as registerLegacyUrlFormat, g as setupHi, I as startPlanningAssistant, o as unregisterLegacyUrlFormat };
470
+ export { B as HI_PANEL_ACTION, _ as cleanupHi, d as createHiLibraryCallbacks, y as createHiMcpTools, c as libLoadArticleCatalog, u as libLoadCalcScript, l as libLoadMasterData, R as loadChatModel, p as omGetRequest, f as omPostRequest, a as registerLegacyUrlFormat, g as setupHi, z as startPlanningAssistant, o as unregisterLegacyUrlFormat };
package/hi.min.js CHANGED
@@ -1,5 +1,6 @@
1
- import { t as e } from "./browser-BxG7yIaK.mjs";
2
- import { t } from "./utils-wJ80awOA.mjs";
1
+ /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
+ import { t as e } from "./browser-BjtSrqbu.mjs";
3
+ import { t } from "./utils-BoELtcEK.mjs";
3
4
  var n = (e, t) => t === e.libraryId ? e : {
4
5
  ...e,
5
6
  libraryId: t
@@ -55,7 +56,7 @@ var n = (e, t) => t === e.libraryId ? e : {
55
56
  m && window.removeEventListener("message", m);
56
57
  let a = typeof r == "string" ? { libraryId: r } : r;
57
58
  i.onLoadJavascript === void 0 && (i.onLoadJavascript = (e) => u(n(a, e))), i.onLoadArticleCatalog === void 0 && (i.onLoadArticleCatalog = (e) => c(n(a, e))), i.onLoadMasterData === void 0 && (i.onLoadMasterData = (e) => l(n(a, e)));
58
- let { expose: o } = await import("./comlink-B2Kj_5Ge.mjs");
59
+ let { expose: o } = await import("./comlink-BwWPcVOp.mjs");
59
60
  m = (n) => {
60
61
  if (n.data.type === "connect_hi" && n.data.port) {
61
62
  let r = n.data.port;
@@ -149,32 +150,79 @@ var n = (e, t) => t === e.libraryId ? e : {
149
150
  "groups",
150
151
  "obstacles",
151
152
  "installationElements"
152
- ], k = ({ content: e }) => e.filter((e) => e.type === "text").map((e) => e.text).join("\n"), A = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }, o) => {
153
- let s = o ? { fetch: async (e, t) => (typeof t?.body == "string" && await o(t.body), fetch(e, t)) } : {};
153
+ ], k = ({ content: e }) => e.filter((e) => e.type === "text").map((e) => e.text).join("\n"), A = (e) => e.flatMap((e) => {
154
+ if (e.role !== "tool" || typeof e.content == "string") return [e];
155
+ let t = [], n = e.content.map((e) => {
156
+ let n = e.output?.type === "content" ? e.output.value.filter(({ type: e }) => e === "file") : [];
157
+ return e.output && n.length !== 0 ? (t.push(...n), {
158
+ ...e,
159
+ output: {
160
+ ...e.output,
161
+ value: [...e.output.value.filter(({ type: e }) => e !== "file"), {
162
+ type: "text",
163
+ text: "The images of this result follow in the next message."
164
+ }]
165
+ }
166
+ }) : e;
167
+ });
168
+ return t.length === 0 ? [e] : [{
169
+ ...e,
170
+ content: n
171
+ }, {
172
+ role: "user",
173
+ content: t
174
+ }];
175
+ }), j = (e) => ({
176
+ specificationVersion: e.specificationVersion,
177
+ provider: e.provider,
178
+ modelId: e.modelId,
179
+ supportedUrls: e.supportedUrls,
180
+ doGenerate: (t) => e.doGenerate({
181
+ ...t,
182
+ prompt: A(t.prompt)
183
+ }),
184
+ doStream: (t) => e.doStream({
185
+ ...t,
186
+ prompt: A(t.prompt)
187
+ })
188
+ }), M = async ({ provider: e, model: t, apiKey: n, baseUrl: r, headers: i, chatCompletions: a, reasoningEffort: o }, s) => {
189
+ let c = s ? { fetch: async (e, t) => (typeof t?.body == "string" && await s(t.body), fetch(e, t)) } : {};
154
190
  switch (e) {
155
191
  case "openai": {
156
192
  let { createOpenAI: e } = await import(T("@ai-sdk/openai@4.0.81"));
157
193
  return { languageModel: e({
158
194
  apiKey: n,
159
- ...s
195
+ ...c
160
196
  })(t) };
161
197
  }
162
198
  case "azure": {
163
- let { createAzure: e } = await import(T("@ai-sdk/azure@4.0.85")), o = e({
199
+ let { createAzure: e } = await import(T("@ai-sdk/azure@4.0.85")), i = e({
164
200
  apiKey: n,
165
201
  baseURL: r,
166
- ...s
202
+ ...c
167
203
  });
168
204
  return {
169
- languageModel: i ? o.chat(t) : o(t),
170
- providerOptions: a ? { azure: { reasoningEffort: a } } : void 0
205
+ languageModel: a ? i.chat(t) : i(t),
206
+ providerOptions: o ? { azure: { reasoningEffort: o } } : void 0
171
207
  };
172
208
  }
209
+ case "openai-compatible": {
210
+ if (!r) throw Error("The provider \"openai-compatible\" needs a baseUrl");
211
+ let { createOpenAICompatible: e } = await import(T("@ai-sdk/openai-compatible@3.0.59"));
212
+ return { languageModel: j(e({
213
+ name: "openai-compatible",
214
+ baseURL: r,
215
+ apiKey: n,
216
+ headers: i,
217
+ includeUsage: !0,
218
+ ...c
219
+ })(t)) };
220
+ }
173
221
  case "mistral": {
174
222
  let { createMistral: e } = await import(T("@ai-sdk/mistral@4.0.54"));
175
223
  return { languageModel: e({
176
224
  apiKey: n,
177
- ...s
225
+ ...c
178
226
  })(t) };
179
227
  }
180
228
  case "anthropic": {
@@ -182,24 +230,24 @@ var n = (e, t) => t === e.libraryId ? e : {
182
230
  return { languageModel: e({
183
231
  apiKey: n,
184
232
  headers: { "anthropic-dangerous-direct-browser-access": "true" },
185
- ...s
233
+ ...c
186
234
  })(t) };
187
235
  }
188
236
  case "google": {
189
237
  let { createGoogleGenerativeAI: e } = await import(T("@ai-sdk/google@4.0.85"));
190
238
  return { languageModel: e({
191
239
  apiKey: n,
192
- ...s
240
+ ...c
193
241
  })(t) };
194
242
  }
195
- default: throw Error(`Unknown provider "${e}" - supported: azure, openai, mistral, anthropic, google`);
243
+ default: throw Error(`Unknown provider "${e}" - supported: azure, openai, openai-compatible, mistral, anthropic, google`);
196
244
  }
197
- }, j = async (e, t, n) => {
245
+ }, N = async (e, t, n) => {
198
246
  let r = e.extended, i = (e) => r.planningAssistantOutput(e), a = [], o = null, s = /* @__PURE__ */ new Set(), c;
199
247
  try {
200
248
  c = await Promise.all([
201
249
  import(T("ai@7.0.122")),
202
- A(t, async (e) => {
250
+ M(t, async (e) => {
203
251
  a.push({
204
252
  ...await w(e, s),
205
253
  stepNumber: o
@@ -356,9 +404,9 @@ var n = (e, t) => t === e.libraryId ? e : {
356
404
  type: "availability",
357
405
  available: !0
358
406
  });
359
- }, M = {
407
+ }, P = {
360
408
  HIDE: "hide",
361
409
  SHOW_ATTRIBUTES: "attributes",
362
410
  SHOW_ARTICLES: "articles"
363
411
  };
364
- export { M as HI_PANEL_ACTION, g as cleanupHi, d as createHiLibraryCallbacks, v as createHiMcpTools, c as libLoadArticleCatalog, u as libLoadCalcScript, l as libLoadMasterData, A as loadChatModel, p as omGetRequest, f as omPostRequest, a as registerLegacyUrlFormat, h as setupHi, j as startPlanningAssistant, o as unregisterLegacyUrlFormat };
412
+ export { P as HI_PANEL_ACTION, g as cleanupHi, d as createHiLibraryCallbacks, v as createHiMcpTools, c as libLoadArticleCatalog, u as libLoadCalcScript, l as libLoadMasterData, M as loadChatModel, p as omGetRequest, f as omPostRequest, a as registerLegacyUrlFormat, h as setupHi, N as startPlanningAssistant, o as unregisterLegacyUrlFormat };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "0.0.0-dev-1b4351d",
3
+ "version": "0.0.0-dev-4c2797a",
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",
@@ -5,14 +5,16 @@ import { HiMcpPlannerApi } from './hi-mcp-tools';
5
5
  * `loadChatModel` and `startPlanningAssistant` need to reach it.
6
6
  */
7
7
  export interface PlanningAssistantConfig {
8
- /** `azure` for a deployment on an Azure AI Foundry resource, else the provider of the model. */
9
- provider: 'azure' | 'openai' | 'mistral' | 'anthropic' | 'google';
10
- /** The model id at the provider; for `azure` the name of the deployment. */
8
+ /** `azure` for a deployment on an Azure AI Foundry resource, `openai-compatible` for an endpoint that speaks OpenAI Chat Completions (e.g. a model proxy), else the provider of the model. */
9
+ provider: 'azure' | 'openai' | 'openai-compatible' | 'mistral' | 'anthropic' | 'google';
10
+ /** The model id at the provider; for `azure` the name of the deployment, for `openai-compatible` the model name the endpoint expects. */
11
11
  model: string;
12
- /** The API key of the provider; for `azure` the key of the Foundry resource. */
13
- apiKey: string;
14
- /** `azure` only: the OpenAI v1 endpoint of the Foundry resource, e.g. `https://<resource>.services.ai.azure.com/openai/v1`. */
12
+ /** The API key of the provider, required by every provider but `openai-compatible`; for `azure` the key of the Foundry resource. */
13
+ apiKey?: string;
14
+ /** `azure`: the OpenAI v1 endpoint of the Foundry resource, e.g. `https://<resource>.services.ai.azure.com/openai/v1`; `openai-compatible` (required): the base URL before `/chat/completions`. */
15
15
  baseUrl?: string;
16
+ /** `openai-compatible` only: headers sent with every model request, e.g. the authorization of a model proxy. */
17
+ headers?: Record<string, string>;
16
18
  /** `azure` only: call the deployment through the Chat Completions API instead of the Responses API. */
17
19
  chatCompletions?: boolean;
18
20
  /** `azure` only: the reasoning effort of the deployment; its default when unset. */
@@ -43,7 +45,7 @@ export type PlanningAssistantPlannerApi = HiMcpPlannerApi & {
43
45
  };
44
46
  };
45
47
  /** The AI SDK language model of the config and the provider options `streamText` takes with it. */
46
- export declare const loadChatModel: ({ provider, model, apiKey, baseUrl, chatCompletions, reasoningEffort, }: PlanningAssistantConfig, observeRequest?: (body: string) => Promise<void>) => Promise<{
48
+ export declare const loadChatModel: ({ provider, model, apiKey, baseUrl, headers, chatCompletions, reasoningEffort, }: PlanningAssistantConfig, observeRequest?: (body: string) => Promise<void>) => Promise<{
47
49
  languageModel: any;
48
50
  providerOptions?: undefined;
49
51
  } | {
@@ -1,4 +1,5 @@
1
- import { t as e } from "./browser-CW9o-dtT.mjs";
1
+ /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
+ import { t as e } from "./browser-D6M-d6y5.mjs";
2
3
  //#region packages/common/src/utils/message-handler.ts
3
4
  var t = class {
4
5
  _side;
@@ -203,7 +204,7 @@ var t = class {
203
204
  setupPlugins(e, t, n = "website") {
204
205
  for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
205
206
  try {
206
- import("./drag-in-ClPpCYyi.mjs").then((e) => e.n).then(({ DragIn: i }) => {
207
+ import("./drag-in-O6toxxkY.mjs").then((e) => e.n).then(({ DragIn: i }) => {
207
208
  let a = new i(this.ui, t, n, this.viewName);
208
209
  a.init().then(() => {
209
210
  this.plugins.dragIn = a, e();
@@ -1,4 +1,5 @@
1
- import { t as e } from "./browser-BxG7yIaK.mjs";
1
+ /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
+ import { t as e } from "./browser-BjtSrqbu.mjs";
2
3
  var t = class {
3
4
  _side;
4
5
  _incomingMessageBus = null;
@@ -184,7 +185,7 @@ var t = class {
184
185
  setupPlugins(e, t, n = "website") {
185
186
  for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
186
187
  try {
187
- import("./drag-in-CV1E-DO6.mjs").then((e) => e.n).then(({ DragIn: i }) => {
188
+ import("./drag-in-D_heMFxk.mjs").then((e) => e.n).then(({ DragIn: i }) => {
188
189
  let a = new i(this.ui, t, n, this.viewName);
189
190
  a.init().then(() => {
190
191
  this.plugins.dragIn = a, e();
package/sbom.cdx.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
+ "bomFormat": "CycloneDX",
4
+ "specVersion": "1.6",
5
+ "version": 1,
6
+ "serialNumber": "urn:uuid:91fdbded-a659-5344-9a1d-948360148441",
7
+ "metadata": {
8
+ "timestamp": "2026-10-30T15:07:54.000Z",
9
+ "component": {
10
+ "type": "library",
11
+ "name": "@roomle/embedding-lib",
12
+ "version": "4c2797aeb1bcaf00618ae9e7374260f8d2655753",
13
+ "bom-ref": "@roomle/embedding-lib@4c2797aeb1bcaf00618ae9e7374260f8d2655753"
14
+ }
15
+ },
16
+ "components": [
17
+ {
18
+ "type": "library",
19
+ "name": "comlink",
20
+ "version": "4.4.2",
21
+ "bom-ref": "pkg:npm/comlink@4.4.2",
22
+ "licenses": [
23
+ {
24
+ "license": {
25
+ "id": "Apache-2.0"
26
+ }
27
+ }
28
+ ],
29
+ "copyright": "Copyright 2017 Google Inc.",
30
+ "purl": "pkg:npm/comlink@4.4.2",
31
+ "externalReferences": [
32
+ {
33
+ "url": "https://github.com/GoogleChromeLabs/comlink",
34
+ "type": "vcs"
35
+ }
36
+ ]
37
+ }
38
+ ],
39
+ "dependencies": [
40
+ {
41
+ "ref": "@roomle/embedding-lib@4c2797aeb1bcaf00618ae9e7374260f8d2655753"
42
+ },
43
+ {
44
+ "ref": "pkg:npm/comlink@4.4.2"
45
+ }
46
+ ]
47
+ }
@@ -1,3 +1,4 @@
1
+
1
2
  var e, t = class {
2
3
  _computedStyleCache = /* @__PURE__ */ new Map();
3
4
  _maxLifetime = 16;
@@ -1,3 +1,4 @@
1
+
1
2
  //#region packages/common/src/utils/get-computed-style-cached.ts
2
3
  var e = class {
3
4
  _computedStyleCache = /* @__PURE__ */ new Map();