@roomle/embedding-lib 0.0.0-dev-a4beb99 → 0.0.0-dev-b3e22ed

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,4 +1,4 @@
1
- Third-party software notices for @roomle/embedding-lib a4beb9922a2e4706b508e03482ab924e59466983
1
+ Third-party software notices for @roomle/embedding-lib b3e22ed58302754eb8fb86ca2c3975d509bab7d3
2
2
  Generated 2026-11-10
3
3
 
4
4
  This product includes the following third-party components.
package/ai.js CHANGED
@@ -36,22 +36,7 @@ var e = "roomle_ai_model_connect", t = () => import("./comlink-m82YLjsS.mjs"), n
36
36
  return window.addEventListener("message", s), () => {
37
37
  window.removeEventListener("message", s), o.forEach((e) => e.close());
38
38
  };
39
- }, i = (e = "1:1") => {
40
- let [t, n] = e.split(":").map(Number);
41
- return t === n ? "1024x1024" : t > n ? "1536x1024" : "1024x1536";
42
- }, a = async (e) => (await fetch(e)).blob(), o = async (e, t, { baseUrl: n, model: r, headers: o }) => {
43
- let { prompt: s, image: c, aspect: l } = JSON.parse(e.body), u = await a(c), d = new FormData();
44
- d.append("model", r), d.append("prompt", s), d.append("size", i(l)), d.append("quality", "medium"), d.append("output_format", "png"), d.append("image", u, `scene.${u.type.split("/")[1]}`);
45
- let f = await fetch(`${n}/images/edits`, {
46
- method: "POST",
47
- headers: o,
48
- body: d,
49
- signal: t
50
- });
51
- if (!f.ok) return f;
52
- let { data: p } = await f.json(), m = p?.[0]?.b64_json, h = new FormData();
53
- return m ? h.append("image", await a(`data:image/png;base64,${m}`)) : h.append("text", "The endpoint returned no image"), new Response(h);
54
- }, s = async (e, { features: t, ...n }) => {
39
+ }, i = async (e, { features: t, ...n }) => {
55
40
  if (t?.length === 0) throw Error("serveAiModelRequests: features is empty; leave it out to serve every feature");
56
41
  let i = e.startRelay("ai", (e, t) => r(e, t, n));
57
42
  try {
@@ -70,9 +55,6 @@ var e = "roomle_ai_model_connect", t = () => import("./comlink-m82YLjsS.mjs"), n
70
55
  i.isCurrent() && (i.stop(), await e.ui.setAiModelHost(null));
71
56
  }
72
57
  };
73
- }, c = (e, t) => s(e, {
74
- features: ["lifestyle-rendering"],
75
- onAiModelRequest: (e, n) => o(e, n, t)
76
- });
58
+ };
77
59
  //#endregion
78
- export { o as requestImageEdits, s as serveAiModelRequests, c as serveImageEdits };
60
+ export { i as serveAiModelRequests };
package/ai.min.js CHANGED
@@ -1,20 +1,5 @@
1
1
  /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
- var e = async (e) => (await fetch(e)).blob(), t = async (t, n, { baseUrl: r, model: i, headers: a }) => {
3
- let { prompt: o, image: s, aspect: c } = JSON.parse(t.body), l = await e(s), u = new FormData();
4
- u.append("model", i), u.append("prompt", o), u.append("size", ((e = "1:1") => {
5
- let [t, n] = e.split(":").map(Number);
6
- return t === n ? "1024x1024" : t > n ? "1536x1024" : "1024x1536";
7
- })(c)), u.append("quality", "medium"), u.append("output_format", "png"), u.append("image", l, `scene.${l.type.split("/")[1]}`);
8
- let d = await fetch(`${r}/images/edits`, {
9
- method: "POST",
10
- headers: a,
11
- body: u,
12
- signal: n
13
- });
14
- if (!d.ok) return d;
15
- let { data: f } = await d.json(), p = f?.[0]?.b64_json, m = new FormData();
16
- return p ? m.append("image", await e(`data:image/png;base64,${p}`)) : m.append("text", "The endpoint returned no image"), new Response(m);
17
- }, n = async (e, { features: t, ...n }) => {
2
+ var e = async (e, { features: t, ...n }) => {
18
3
  if (t?.length === 0) throw Error("serveAiModelRequests: features is empty; leave it out to serve every feature");
19
4
  let r = e.startRelay("ai", (e, t) => ((e, t, n) => {
20
5
  let r = [], i = async (i) => {
@@ -69,8 +54,5 @@ var e = async (e) => (await fetch(e)).blob(), t = async (t, n, { baseUrl: r, mod
69
54
  r.isCurrent() && (r.stop(), await e.ui.setAiModelHost(null));
70
55
  }
71
56
  };
72
- }, r = (e, r) => n(e, {
73
- features: ["lifestyle-rendering"],
74
- onAiModelRequest: (e, n) => t(e, n, r)
75
- });
76
- export { t as requestImageEdits, n as serveAiModelRequests, r as serveImageEdits };
57
+ };
58
+ export { e as serveAiModelRequests };
package/hi.js CHANGED
@@ -358,10 +358,25 @@ var i = (e, t) => t === e.libraryId ? e : {
358
358
  headers: n
359
359
  } }
360
360
  };
361
- }, z = {
361
+ }, z = (e = "1:1") => {
362
+ let [t, n] = e.split(":").map(Number);
363
+ return t === n ? "1024x1024" : t > n ? "1536x1024" : "1024x1536";
364
+ }, B = async (e) => (await fetch(e)).blob(), V = async (e, t, { baseUrl: n, model: r, headers: i }) => {
365
+ let { prompt: a, image: o, aspect: s } = JSON.parse(e.body), c = await B(o), l = new FormData();
366
+ l.append("model", r), l.append("prompt", a), l.append("size", z(s)), l.append("quality", "medium"), l.append("output_format", "png"), l.append("image", c, `scene.${c.type.split("/")[1]}`);
367
+ let u = await fetch(`${n}/images/edits`, {
368
+ method: "POST",
369
+ headers: i,
370
+ body: l,
371
+ signal: t
372
+ });
373
+ if (!u.ok) return u;
374
+ let { data: d } = await u.json(), f = d?.[0]?.b64_json, p = new FormData();
375
+ return f ? p.append("image", await B(`data:image/png;base64,${f}`)) : p.append("text", "The endpoint returned no image"), new Response(p);
376
+ }, H = {
362
377
  HIDE: "hide",
363
378
  SHOW_ATTRIBUTES: "attributes",
364
379
  SHOW_ARTICLES: "articles"
365
380
  };
366
381
  //#endregion
367
- export { z as HI_PANEL_ACTION, y as cleanupHi, p as createHiLibraryCallbacks, b as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, R as resolveHiModelProxy, v as setupHi, I as startPlanningAssistant, c as unregisterLegacyUrlFormat };
382
+ export { H as HI_PANEL_ACTION, y as cleanupHi, p as createHiLibraryCallbacks, b as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, V as requestImageEdits, R as resolveHiModelProxy, v as setupHi, I as startPlanningAssistant, c as unregisterLegacyUrlFormat };
package/hi.min.js CHANGED
@@ -322,9 +322,24 @@ var i = (e, t) => t === e.libraryId ? e : {
322
322
  headers: n
323
323
  } }
324
324
  };
325
- }, N = {
325
+ }, N = async (e) => (await fetch(e)).blob(), P = async (e, t, { baseUrl: n, model: r, headers: i }) => {
326
+ let { prompt: a, image: o, aspect: s } = JSON.parse(e.body), c = await N(o), l = new FormData();
327
+ l.append("model", r), l.append("prompt", a), l.append("size", ((e = "1:1") => {
328
+ let [t, n] = e.split(":").map(Number);
329
+ return t === n ? "1024x1024" : t > n ? "1536x1024" : "1024x1536";
330
+ })(s)), l.append("quality", "medium"), l.append("output_format", "png"), l.append("image", c, `scene.${c.type.split("/")[1]}`);
331
+ let u = await fetch(`${n}/images/edits`, {
332
+ method: "POST",
333
+ headers: i,
334
+ body: l,
335
+ signal: t
336
+ });
337
+ if (!u.ok) return u;
338
+ let { data: d } = await u.json(), f = d?.[0]?.b64_json, p = new FormData();
339
+ return f ? p.append("image", await N(`data:image/png;base64,${f}`)) : p.append("text", "The endpoint returned no image"), new Response(p);
340
+ }, F = {
326
341
  HIDE: "hide",
327
342
  SHOW_ATTRIBUTES: "attributes",
328
343
  SHOW_ARTICLES: "articles"
329
344
  };
330
- export { N as HI_PANEL_ACTION, v as cleanupHi, p as createHiLibraryCallbacks, y as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, M as resolveHiModelProxy, _ as setupHi, j as startPlanningAssistant, c as unregisterLegacyUrlFormat };
345
+ export { F as HI_PANEL_ACTION, v as cleanupHi, p as createHiLibraryCallbacks, y as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, P as requestImageEdits, M as resolveHiModelProxy, _ as setupHi, j as startPlanningAssistant, c as unregisterLegacyUrlFormat };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "0.0.0-dev-a4beb99",
3
+ "version": "0.0.0-dev-b3e22ed",
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",
@@ -1,8 +1,6 @@
1
1
  import { default as RoomleEmbeddingApi } from './roomle-embedding-lib';
2
2
  import { AiFeature, AiModelHandlers } from '../../common/src/utils/ai-model-relay';
3
- import { ImageEditsEndpoint } from './image-edits';
4
3
  export type { AiFeature, AiModelAuthReason, AiModelHandlers, AiModelRequest, RenderingInput, } from '../../common/src/utils/ai-model-relay';
5
- export { type ImageEditsEndpoint, requestImageEdits } from './image-edits';
6
4
  export interface AiModelHostOptions extends AiModelHandlers {
7
5
  /**
8
6
  * The features the host answers; the others keep the built-in endpoints.
@@ -27,10 +25,3 @@ export interface AiModelHostControl {
27
25
  * cannot take the host, e.g. an older UI without the AI relay.
28
26
  */
29
27
  export declare const serveAiModelRequests: (instance: Pick<RoomleEmbeddingApi<unknown, unknown>, "startRelay" | "ui">, { features, ...handlers }: AiModelHostOptions) => Promise<AiModelHostControl>;
30
- /**
31
- * The host page answers the renderings of the AI image chat at an
32
- * images/edits endpoint (see requestImageEdits); the other AI features keep
33
- * the built-in endpoints. A host page with its own login calls
34
- * serveAiModelRequests with requestImageEdits and onRequestAiModelAuth.
35
- */
36
- export declare const serveImageEdits: (instance: Pick<RoomleEmbeddingApi<unknown, unknown>, "startRelay" | "ui">, endpoint: ImageEditsEndpoint) => Promise<AiModelHostControl>;
@@ -17,5 +17,6 @@ export { setupHi, cleanupHi } from './homag-intelligence/hi-setup';
17
17
  export { createHiMcpTools, type HiMcpTool, type HiMcpTools, type HiMcpPlannerApi, } from './homag-intelligence/hi-mcp-tools';
18
18
  export { loadChatModel, startPlanningAssistant, type PlanningAssistantConfig, type PlanningAssistantPlannerApi, } from './homag-intelligence/hi-planning-assistant';
19
19
  export { resolveHiModelProxy, type HiModelProxy, type HiModelProxyOptions, } from './homag-intelligence/hi-model-proxy';
20
+ export { requestImageEdits, type ImageEditsEndpoint, } from './homag-intelligence/image-edits';
20
21
  export { type ExternalObjectSnapshotSaveResult, type HiContextAction, } from '../../web-sdk/packages';
21
22
  export { HI_PANEL_ACTION, type HiPanelActionType, type HiOrderHeader, type HiOrder, type HiOrderData, type HiPriceData, type HiCallbacks, } from '../../common/src/hi/hi-types';
@@ -1,4 +1,4 @@
1
- import { ImageEditsEndpoint } from '../image-edits';
1
+ import { ImageEditsEndpoint } from './image-edits';
2
2
  import { PlanningAssistantConfig } from '../planning-assistant/chat-model';
3
3
  /**
4
4
  * What the model proxy of the HI server serves the HI user. The model, its
@@ -1,4 +1,4 @@
1
- import { AiModelRequest } from '../../common/src/utils/ai-model-relay';
1
+ import { AiModelRequest } from '../../../common/src/utils/ai-model-relay';
2
2
  /**
3
3
  * An endpoint that speaks OpenAI images/edits, e.g. the model proxy of the HI
4
4
  * server or an Azure AI Foundry resource
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:60e139e3-8e8f-5f10-bcb0-b35b5ba83ae0",
6
+ "serialNumber": "urn:uuid:43c285ff-db6e-571a-bab7-d0365491f0b4",
7
7
  "metadata": {
8
- "timestamp": "2026-11-10T06:25:07.000Z",
8
+ "timestamp": "2026-11-10T10:46:00.000Z",
9
9
  "component": {
10
10
  "type": "library",
11
11
  "name": "@roomle/embedding-lib",
12
- "version": "a4beb9922a2e4706b508e03482ab924e59466983",
13
- "bom-ref": "@roomle/embedding-lib@a4beb9922a2e4706b508e03482ab924e59466983"
12
+ "version": "b3e22ed58302754eb8fb86ca2c3975d509bab7d3",
13
+ "bom-ref": "@roomle/embedding-lib@b3e22ed58302754eb8fb86ca2c3975d509bab7d3"
14
14
  }
15
15
  },
16
16
  "components": [
@@ -351,7 +351,7 @@
351
351
  ],
352
352
  "dependencies": [
353
353
  {
354
- "ref": "@roomle/embedding-lib@a4beb9922a2e4706b508e03482ab924e59466983"
354
+ "ref": "@roomle/embedding-lib@b3e22ed58302754eb8fb86ca2c3975d509bab7d3"
355
355
  },
356
356
  {
357
357
  "ref": "pkg:npm/%40ai-sdk/anthropic@4.0.68"