@roomle/embedding-lib 5.34.0-debug.1 → 5.34.0-debug.2

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.
Files changed (75) hide show
  1. package/comlink-BAiXCcU9.mjs +258 -0
  2. package/comlink-CmT64Qi3.mjs +1 -0
  3. package/docs/md/web/embedding/CHANGELOG.md +28 -332
  4. package/{drag-in-BEjBh6zz.mjs → embedding-plugins-CjNos83d.mjs} +15 -14
  5. package/embedding-plugins-DePKqSKW.mjs +1 -0
  6. package/embedding-plugins.d.ts +2 -0
  7. package/embedding-plugins.js +13 -0
  8. package/embedding-plugins.min.js +1 -0
  9. package/{from-custom-view-CobBUshK.mjs → from-custom-view-BAiOXktb.mjs} +9 -8
  10. package/from-custom-view-Ch3rb-JF.mjs +1 -0
  11. package/from-website-B-Vh-DVX.mjs +1 -0
  12. package/{from-website-C2cG-X9g.mjs → from-website-BicmMNsE.mjs} +11 -10
  13. package/hi.d.ts +2 -0
  14. package/hi.js +106 -0
  15. package/hi.min.js +1 -0
  16. package/package.json +19 -9
  17. package/packages/embedding-lib/src/connector.d.ts +1 -1
  18. package/packages/embedding-lib/src/embedding-plugins.d.ts +9 -0
  19. package/packages/embedding-lib/src/hi.d.ts +16 -0
  20. package/packages/embedding-lib/src/homag-intelligence/hi-callbacks.d.ts +1 -1
  21. package/packages/embedding-lib/src/homag-intelligence/hi-order-manager.d.ts +3 -0
  22. package/packages/embedding-lib/src/homag-intelligence/hi-requests.d.ts +1 -4
  23. package/packages/embedding-lib/src/homag-intelligence/hi-setup.d.ts +4 -0
  24. package/packages/embedding-lib/src/homag-intelligence/hi-utils.d.ts +1 -0
  25. package/packages/embedding-lib/src/plugins/drag-in.d.ts +1 -1
  26. package/packages/embedding-lib/src/plugins/strategy/from-custom-view.d.ts +1 -1
  27. package/packages/embedding-lib/src/plugins/strategy/from-website.d.ts +1 -1
  28. package/packages/embedding-lib/src/plugins/strategy/types.d.ts +1 -1
  29. package/packages/embedding-lib/src/{embedding-lib.d.ts → roomle-embedding-lib.d.ts} +23 -3
  30. package/packages/embedding-lib/src/utils.d.ts +1 -0
  31. package/roomle-embedding-lib.d.ts +6 -0
  32. package/roomle-embedding-lib.js +587 -0
  33. package/roomle-embedding-lib.min.js +1 -0
  34. package/touch-drag-BzREygxc.mjs +1 -0
  35. package/touch-drag-DWISKgWm.mjs +57 -0
  36. package/utils-D--vltCL.mjs +113 -0
  37. package/utils-uEcN1DUR.mjs +1 -0
  38. package/drag-in-BmoiEqfA.mjs +0 -1
  39. package/from-custom-view-fYea37BE.mjs +0 -1
  40. package/from-website-CDEUbvDF.mjs +0 -1
  41. package/index.d.ts +0 -4
  42. package/packages/embedding-lib/src/example.d.ts +0 -5
  43. package/packages/embedding-lib/src/examples/activate-deactivate-rd.d.ts +0 -7
  44. package/packages/embedding-lib/src/examples/api-false.d.ts +0 -7
  45. package/packages/embedding-lib/src/examples/configurator-only.d.ts +0 -6
  46. package/packages/embedding-lib/src/examples/download-partlist.d.ts +0 -6
  47. package/packages/embedding-lib/src/examples/drag-in.d.ts +0 -7
  48. package/packages/embedding-lib/src/examples/ext-catalog/ext-catalog-connection.d.ts +0 -1
  49. package/packages/embedding-lib/src/examples/ext-catalog.d.ts +0 -6
  50. package/packages/embedding-lib/src/examples/ext-selection-overlay.d.ts +0 -7
  51. package/packages/embedding-lib/src/examples/hi-single-object-configurator.d.ts +0 -11
  52. package/packages/embedding-lib/src/examples/homag-intelligence-catalog-example.d.ts +0 -11
  53. package/packages/embedding-lib/src/examples/homag-intelligence-catalog-load-async.d.ts +0 -13
  54. package/packages/embedding-lib/src/examples/homag-intelligence-example.d.ts +0 -19
  55. package/packages/embedding-lib/src/examples/planner-and-configurator.d.ts +0 -6
  56. package/packages/embedding-lib/src/examples/start-and-end-configurator.d.ts +0 -6
  57. package/packages/embedding-lib/src/examples/utils/api-false/helpers.d.ts +0 -2
  58. package/packages/embedding-lib/src/examples/utils/drag-listeners.d.ts +0 -3
  59. package/packages/embedding-lib/src/examples/utils/homag-intelligence/create-catalog.d.ts +0 -3
  60. package/packages/embedding-lib/src/examples/utils/homag-intelligence/default-api-options.d.ts +0 -21
  61. package/packages/embedding-lib/src/examples/utils/homag-intelligence/dom-helper.d.ts +0 -12
  62. package/packages/embedding-lib/src/examples/utils/homag-intelligence/drag-in.d.ts +0 -3
  63. package/packages/embedding-lib/src/examples/utils/homag-intelligence/nobilia-api-options.d.ts +0 -38
  64. package/packages/embedding-lib/src/examples/utils/homag-intelligence/overlay.d.ts +0 -2
  65. package/packages/embedding-lib/src/examples/utils/homag-intelligence/state.d.ts +0 -20
  66. package/packages/embedding-lib/src/examples/utils/homag-intelligence/utils.d.ts +0 -18
  67. package/packages/embedding-lib/src/examples/utils/query-params.d.ts +0 -1
  68. package/packages/embedding-lib/src/examples/utils/server-url.d.ts +0 -1
  69. package/packages/embedding-lib/src/overview.d.ts +0 -1
  70. package/roomle-embedding-lib.es.js +0 -833
  71. package/roomle-embedding-lib.es.min.js +0 -1
  72. package/roomle-embedding-lib.umd.js +0 -21
  73. package/roomle-embedding-lib.umd.min.js +0 -1
  74. package/touch-drag-B5zCf87J.mjs +0 -1
  75. package/touch-drag-DXJTOrk5.mjs +0 -146
@@ -0,0 +1,258 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ const M = Symbol("Comlink.proxy"), z = Symbol("Comlink.endpoint"), N = Symbol("Comlink.releaseProxy"), x = Symbol("Comlink.finalizer"), w = Symbol("Comlink.thrown"), S = (e) => typeof e == "object" && e !== null || typeof e == "function", H = {
7
+ canHandle: (e) => S(e) && e[M],
8
+ serialize(e) {
9
+ const { port1: t, port2: r } = new MessageChannel();
10
+ return R(e, t), [r, [r]];
11
+ },
12
+ deserialize(e) {
13
+ return e.start(), I(e);
14
+ }
15
+ }, L = {
16
+ canHandle: (e) => S(e) && w in e,
17
+ serialize({ value: e }) {
18
+ let t;
19
+ return e instanceof Error ? t = {
20
+ isError: !0,
21
+ value: {
22
+ message: e.message,
23
+ name: e.name,
24
+ stack: e.stack
25
+ }
26
+ } : t = { isError: !1, value: e }, [t, []];
27
+ },
28
+ deserialize(e) {
29
+ throw e.isError ? Object.assign(new Error(e.value.message), e.value) : e.value;
30
+ }
31
+ }, A = /* @__PURE__ */ new Map([
32
+ ["proxy", H],
33
+ ["throw", L]
34
+ ]);
35
+ function V(e, t) {
36
+ for (const r of e)
37
+ if (t === r || r === "*" || r instanceof RegExp && r.test(t))
38
+ return !0;
39
+ return !1;
40
+ }
41
+ function R(e, t = globalThis, r = ["*"]) {
42
+ t.addEventListener("message", function g(n) {
43
+ if (!n || !n.data)
44
+ return;
45
+ if (!V(r, n.origin)) {
46
+ console.warn(`Invalid origin '${n.origin}' for comlink proxy`);
47
+ return;
48
+ }
49
+ const { id: a, type: f, path: c } = Object.assign({ path: [] }, n.data), l = (n.data.argumentList || []).map(y);
50
+ let s;
51
+ try {
52
+ const o = c.slice(0, -1).reduce((i, d) => i[d], e), u = c.reduce((i, d) => i[d], e);
53
+ switch (f) {
54
+ case "GET":
55
+ s = u;
56
+ break;
57
+ case "SET":
58
+ o[c.slice(-1)[0]] = y(n.data.value), s = !0;
59
+ break;
60
+ case "APPLY":
61
+ s = u.apply(o, l);
62
+ break;
63
+ case "CONSTRUCT":
64
+ {
65
+ const i = new u(...l);
66
+ s = U(i);
67
+ }
68
+ break;
69
+ case "ENDPOINT":
70
+ {
71
+ const { port1: i, port2: d } = new MessageChannel();
72
+ R(e, d), s = F(i, [i]);
73
+ }
74
+ break;
75
+ case "RELEASE":
76
+ s = void 0;
77
+ break;
78
+ default:
79
+ return;
80
+ }
81
+ } catch (o) {
82
+ s = { value: o, [w]: 0 };
83
+ }
84
+ Promise.resolve(s).catch((o) => ({ value: o, [w]: 0 })).then((o) => {
85
+ const [u, i] = p(o);
86
+ t.postMessage(Object.assign(Object.assign({}, u), { id: a }), i), f === "RELEASE" && (t.removeEventListener("message", g), T(t), x in e && typeof e[x] == "function" && e[x]());
87
+ }).catch((o) => {
88
+ const [u, i] = p({
89
+ value: new TypeError("Unserializable return value"),
90
+ [w]: 0
91
+ });
92
+ t.postMessage(Object.assign(Object.assign({}, u), { id: a }), i);
93
+ });
94
+ }), t.start && t.start();
95
+ }
96
+ function _(e) {
97
+ return e.constructor.name === "MessagePort";
98
+ }
99
+ function T(e) {
100
+ _(e) && e.close();
101
+ }
102
+ function I(e, t) {
103
+ const r = /* @__PURE__ */ new Map();
104
+ return e.addEventListener("message", function(n) {
105
+ const { data: a } = n;
106
+ if (!a || !a.id)
107
+ return;
108
+ const f = r.get(a.id);
109
+ if (f)
110
+ try {
111
+ f(a);
112
+ } finally {
113
+ r.delete(a.id);
114
+ }
115
+ }), P(e, r, [], t);
116
+ }
117
+ function h(e) {
118
+ if (e)
119
+ throw new Error("Proxy has been released and is not useable");
120
+ }
121
+ function C(e) {
122
+ return m(e, /* @__PURE__ */ new Map(), {
123
+ type: "RELEASE"
124
+ }).then(() => {
125
+ T(e);
126
+ });
127
+ }
128
+ const E = /* @__PURE__ */ new WeakMap(), b = "FinalizationRegistry" in globalThis && new FinalizationRegistry((e) => {
129
+ const t = (E.get(e) || 0) - 1;
130
+ E.set(e, t), t === 0 && C(e);
131
+ });
132
+ function W(e, t) {
133
+ const r = (E.get(t) || 0) + 1;
134
+ E.set(t, r), b && b.register(e, t, e);
135
+ }
136
+ function j(e) {
137
+ b && b.unregister(e);
138
+ }
139
+ function P(e, t, r = [], g = function() {
140
+ }) {
141
+ let n = !1;
142
+ const a = new Proxy(g, {
143
+ get(f, c) {
144
+ if (h(n), c === N)
145
+ return () => {
146
+ j(a), C(e), t.clear(), n = !0;
147
+ };
148
+ if (c === "then") {
149
+ if (r.length === 0)
150
+ return { then: () => a };
151
+ const l = m(e, t, {
152
+ type: "GET",
153
+ path: r.map((s) => s.toString())
154
+ }).then(y);
155
+ return l.then.bind(l);
156
+ }
157
+ return P(e, t, [...r, c]);
158
+ },
159
+ set(f, c, l) {
160
+ h(n);
161
+ const [s, o] = p(l);
162
+ return m(e, t, {
163
+ type: "SET",
164
+ path: [...r, c].map((u) => u.toString()),
165
+ value: s
166
+ }, o).then(y);
167
+ },
168
+ apply(f, c, l) {
169
+ h(n);
170
+ const s = r[r.length - 1];
171
+ if (s === z)
172
+ return m(e, t, {
173
+ type: "ENDPOINT"
174
+ }).then(y);
175
+ if (s === "bind")
176
+ return P(e, t, r.slice(0, -1));
177
+ const [o, u] = k(l);
178
+ return m(e, t, {
179
+ type: "APPLY",
180
+ path: r.map((i) => i.toString()),
181
+ argumentList: o
182
+ }, u).then(y);
183
+ },
184
+ construct(f, c) {
185
+ h(n);
186
+ const [l, s] = k(c);
187
+ return m(e, t, {
188
+ type: "CONSTRUCT",
189
+ path: r.map((o) => o.toString()),
190
+ argumentList: l
191
+ }, s).then(y);
192
+ }
193
+ });
194
+ return W(a, e), a;
195
+ }
196
+ function D(e) {
197
+ return Array.prototype.concat.apply([], e);
198
+ }
199
+ function k(e) {
200
+ const t = e.map(p);
201
+ return [t.map((r) => r[0]), D(t.map((r) => r[1]))];
202
+ }
203
+ const O = /* @__PURE__ */ new WeakMap();
204
+ function F(e, t) {
205
+ return O.set(e, t), e;
206
+ }
207
+ function U(e) {
208
+ return Object.assign(e, { [M]: !0 });
209
+ }
210
+ function p(e) {
211
+ for (const [t, r] of A)
212
+ if (r.canHandle(e)) {
213
+ const [g, n] = r.serialize(e);
214
+ return [
215
+ {
216
+ type: "HANDLER",
217
+ name: t,
218
+ value: g
219
+ },
220
+ n
221
+ ];
222
+ }
223
+ return [
224
+ {
225
+ type: "RAW",
226
+ value: e
227
+ },
228
+ O.get(e) || []
229
+ ];
230
+ }
231
+ function y(e) {
232
+ switch (e.type) {
233
+ case "HANDLER":
234
+ return A.get(e.name).deserialize(e.value);
235
+ case "RAW":
236
+ return e.value;
237
+ }
238
+ }
239
+ function m(e, t, r, g) {
240
+ return new Promise((n) => {
241
+ const a = G();
242
+ t.set(a, n), e.start && e.start(), e.postMessage(Object.assign({ id: a }, r), g);
243
+ });
244
+ }
245
+ function G() {
246
+ return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
247
+ }
248
+ export {
249
+ z as createEndpoint,
250
+ R as expose,
251
+ x as finalizer,
252
+ U as proxy,
253
+ M as proxyMarker,
254
+ N as releaseProxy,
255
+ F as transfer,
256
+ A as transferHandlers,
257
+ I as wrap
258
+ };
@@ -0,0 +1 @@
1
+ const e=Symbol("Comlink.proxy"),t=Symbol("Comlink.endpoint"),n=Symbol("Comlink.releaseProxy"),r=Symbol("Comlink.finalizer"),a=Symbol("Comlink.thrown"),s=e=>"object"==typeof e&&null!==e||"function"==typeof e,o=new Map([["proxy",{canHandle:t=>s(t)&&t[e],serialize(e){const{port1:t,port2:n}=new MessageChannel;return i(e,t),[n,[n]]},deserialize:e=>(e.start(),u(e))}],["throw",{canHandle:e=>s(e)&&a in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}}]]);function i(e,t=globalThis,n=["*"]){t.addEventListener("message",function s(o){if(!o||!o.data)return;if(!function(e,t){for(const n of e)if(t===n||"*"===n||n instanceof RegExp&&n.test(t))return!0;return!1}(n,o.origin))return;const{id:u,type:l,path:p}=Object.assign({path:[]},o.data),f=(o.data.argumentList||[]).map(w);let g;try{const t=p.slice(0,-1).reduce((e,t)=>e[t],e),n=p.reduce((e,t)=>e[t],e);switch(l){case"GET":g=n;break;case"SET":t[p.slice(-1)[0]]=w(o.data.value),g=!0;break;case"APPLY":g=n.apply(t,f);break;case"CONSTRUCT":g=b(new n(...f));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;i(e,n),g=E(t,[t])}break;case"RELEASE":g=void 0;break;default:return}}catch(e){g={value:e,[a]:0}}Promise.resolve(g).catch(e=>({value:e,[a]:0})).then(n=>{const[a,o]=v(n);t.postMessage(Object.assign(Object.assign({},a),{id:u}),o),"RELEASE"===l&&(t.removeEventListener("message",s),c(t),r in e&&"function"==typeof e[r]&&e[r]())}).catch(e=>{const[n,r]=v({value:new TypeError("Unserializable return value"),[a]:0});t.postMessage(Object.assign(Object.assign({},n),{id:u}),r)})}),t.start&&t.start()}function c(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function u(e,t){const n=new Map;return e.addEventListener("message",function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}}),m(e,n,[],t)}function l(e){if(e)throw new Error("Proxy has been released and is not useable")}function p(e){return S(e,new Map,{type:"RELEASE"}).then(()=>{c(e)})}const f=new WeakMap,g="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(f.get(e)||0)-1;f.set(e,t),0===t&&p(e)});function m(e,r,a=[],s=function(){}){let o=!1;const i=new Proxy(s,{get(t,s){if(l(o),s===n)return()=>{(function(e){g&&g.unregister(e)})(i),p(e),r.clear(),o=!0};if("then"===s){if(0===a.length)return{then:()=>i};const t=S(e,r,{type:"GET",path:a.map(e=>e.toString())}).then(w);return t.then.bind(t)}return m(e,r,[...a,s])},set(t,n,s){l(o);const[i,c]=v(s);return S(e,r,{type:"SET",path:[...a,n].map(e=>e.toString()),value:i},c).then(w)},apply(n,s,i){l(o);const c=a[a.length-1];if(c===t)return S(e,r,{type:"ENDPOINT"}).then(w);if("bind"===c)return m(e,r,a.slice(0,-1));const[u,p]=d(i);return S(e,r,{type:"APPLY",path:a.map(e=>e.toString()),argumentList:u},p).then(w)},construct(t,n){l(o);const[s,i]=d(n);return S(e,r,{type:"CONSTRUCT",path:a.map(e=>e.toString()),argumentList:s},i).then(w)}});return function(e,t){const n=(f.get(t)||0)+1;f.set(t,n),g&&g.register(e,t,e)}(i,e),i}function y(e){return Array.prototype.concat.apply([],e)}function d(e){const t=e.map(v);return[t.map(e=>e[0]),y(t.map(e=>e[1]))]}const h=new WeakMap;function E(e,t){return h.set(e,t),e}function b(t){return Object.assign(t,{[e]:!0})}function v(e){for(const[t,n]of o)if(n.canHandle(e)){const[r,a]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},a]}return[{type:"RAW",value:e},h.get(e)||[]]}function w(e){switch(e.type){case"HANDLER":return o.get(e.name).deserialize(e.value);case"RAW":return e.value}}function S(e,t,n,r){return new Promise(a=>{const s=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.set(s,a),e.start&&e.start(),e.postMessage(Object.assign({id:s},n),r)})}export{t as createEndpoint,i as expose,r as finalizer,b as proxy,e as proxyMarker,n as releaseProxy,E as transfer,o as transferHandlers,u as wrap};