New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@londondynamics/pericles-webcomponent

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@londondynamics/pericles-webcomponent - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

6

dist/configurator.d.ts

@@ -25,2 +25,3 @@ import { LitElement } from 'lit';

host?: string | undefined;
allowPartialMatch?: 'yes' | 'no';
arPlacement?: 'floor' | 'wall';

@@ -54,3 +55,3 @@ backgroundColor?: string;

* @param {Function} callback
* @example getCurrentValues((values, err) => {})
* @example getCurrentSelection((selection, err) => {})
* @returns {Promise<any>}

@@ -130,5 +131,6 @@ */

* @param {object} selection {featureId: variantId}
* @param {boolean} resetBeforeUpdate (optional) - resets the configuration before updating
* @returns {void}
*/
setSelection(selection: Selection): void;
setSelection(selection: Selection, resetBeforeUpdate?: boolean): void;
/**

@@ -135,0 +137,0 @@ * Selects preset by id

@@ -6,6 +6,6 @@ /**

*/
const k = globalThis, F = k.ShadowRoot && (k.ShadyCSS === void 0 || k.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, J = Symbol(), q = /* @__PURE__ */ new WeakMap();
const H = globalThis, W = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, F = Symbol(), q = /* @__PURE__ */ new WeakMap();
let ot = class {
constructor(t, e, s) {
if (this._$cssResult$ = !0, s !== J)
if (this._$cssResult$ = !0, s !== F)
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");

@@ -17,3 +17,3 @@ this.cssText = t, this.t = e;

const e = this.t;
if (F && t === void 0) {
if (W && t === void 0) {
const s = e !== void 0 && e.length === 1;

@@ -28,3 +28,3 @@ s && (t = q.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && q.set(e, t));

};
const ct = (i) => new ot(typeof i == "string" ? i : i + "", void 0, J), dt = (i, ...t) => {
const ct = (i) => new ot(typeof i == "string" ? i : i + "", void 0, F), dt = (i, ...t) => {
const e = i.length === 1 ? i[0] : t.reduce((s, r, n) => s + ((o) => {

@@ -37,12 +37,12 @@ if (o._$cssResult$ === !0)

})(r) + i[n + 1], i[0]);
return new ot(e, i, J);
return new ot(e, i, F);
}, ut = (i, t) => {
if (F)
if (W)
i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
else
for (const e of t) {
const s = document.createElement("style"), r = k.litNonce;
const s = document.createElement("style"), r = H.litNonce;
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
}
}, G = F ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
}, G = W ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
let e = "";

@@ -58,3 +58,3 @@ for (const s of t.cssRules)

*/
const { is: gt, defineProperty: yt, getOwnPropertyDescriptor: _t, getOwnPropertyNames: $t, getOwnPropertySymbols: mt, getPrototypeOf: ft } = Object, f = globalThis, K = f.trustedTypes, wt = K ? K.emptyScript : "", D = f.reactiveElementPolyfillSupport, C = (i, t) => i, I = { toAttribute(i, t) {
const { is: gt, defineProperty: yt, getOwnPropertyDescriptor: _t, getOwnPropertyNames: $t, getOwnPropertySymbols: mt, getPrototypeOf: ft } = Object, f = globalThis, K = f.trustedTypes, wt = K ? K.emptyScript : "", z = f.reactiveElementPolyfillSupport, C = (i, t) => i, I = { toAttribute(i, t) {
switch (t) {

@@ -87,5 +87,5 @@ case Boolean:

return e;
} }, V = (i, t) => !gt(i, t), Z = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: V };
} }, V = (i, t) => !gt(i, t), Q = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: V };
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
class b extends HTMLElement {
class S extends HTMLElement {
static addInitializer(t) {

@@ -97,3 +97,3 @@ this._$Ei(), (this.l ?? (this.l = [])).push(t);

}
static createProperty(t, e = Z) {
static createProperty(t, e = Q) {
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {

@@ -113,8 +113,8 @@ const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);

}, set(o) {
const p = r == null ? void 0 : r.call(this);
n.call(this, o), this.requestUpdate(t, p, s);
const c = r == null ? void 0 : r.call(this);
n.call(this, o), this.requestUpdate(t, c, s);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(t) {
return this.elementProperties.get(t) ?? Z;
return this.elementProperties.get(t) ?? Q;
}

@@ -219,4 +219,4 @@ static _$Ei() {

if (r !== void 0 && this._$Em !== r) {
const o = s.getPropertyOptions(r), p = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : I;
this._$Em = r, this[r] = p.fromAttribute(e, o.type), this._$Em = null;
const o = s.getPropertyOptions(r), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : I;
this._$Em = r, this[r] = c.fromAttribute(e, o.type), this._$Em = null;
}

@@ -304,3 +304,3 @@ }

}
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[C("elementProperties")] = /* @__PURE__ */ new Map(), b[C("finalized")] = /* @__PURE__ */ new Map(), D == null || D({ ReactiveElement: b }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.0.4");
S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[C("elementProperties")] = /* @__PURE__ */ new Map(), S[C("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: S }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.0.4");
/**

@@ -311,9 +311,9 @@ * @license

*/
const M = globalThis, L = M.trustedTypes, Q = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, nt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, at = "?" + m, At = `<${at}>`, S = document, x = () => S.createComment(""), R = (i) => i === null || typeof i != "object" && typeof i != "function", ht = Array.isArray, St = (i) => ht(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", z = `[
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, X = /-->/g, Y = />/g, w = RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, lt = /^(?:script|style|textarea|title)$/i, bt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), st = bt(1), v = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), it = /* @__PURE__ */ new WeakMap(), A = S.createTreeWalker(S, 129);
const M = globalThis, L = M.trustedTypes, Z = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, nt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, at = "?" + m, bt = `<${at}>`, A = document, x = () => A.createComment(""), O = (i) => i === null || typeof i != "object" && typeof i != "function", ht = Array.isArray, At = (i) => ht(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", j = `[
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, X = /-->/g, Y = />/g, w = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, lt = /^(?:script|style|textarea|title)$/i, St = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), st = St(1), v = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), it = /* @__PURE__ */ new WeakMap(), b = A.createTreeWalker(A, 129);
function pt(i, t) {
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
throw Error("invalid template strings array");
return Q !== void 0 ? Q.createHTML(t) : t;
return Z !== void 0 ? Z.createHTML(t) : t;
}

@@ -323,13 +323,13 @@ const vt = (i, t) => {

let r, n = t === 2 ? "<svg>" : "", o = P;
for (let p = 0; p < e; p++) {
const a = i[p];
for (let c = 0; c < e; c++) {
const a = i[c];
let d, g, u = -1, _ = 0;
for (; _ < a.length && (o.lastIndex = _, g = o.exec(a), g !== null); )
_ = o.lastIndex, o === P ? g[1] === "!--" ? o = X : g[1] !== void 0 ? o = Y : g[2] !== void 0 ? (lt.test(g[2]) && (r = RegExp("</" + g[2], "g")), o = w) : g[3] !== void 0 && (o = w) : o === w ? g[0] === ">" ? (o = r ?? P, u = -1) : g[1] === void 0 ? u = -2 : (u = o.lastIndex - g[2].length, d = g[1], o = g[3] === void 0 ? w : g[3] === '"' ? et : tt) : o === et || o === tt ? o = w : o === X || o === Y ? o = P : (o = w, r = void 0);
const $ = o === w && i[p + 1].startsWith("/>") ? " " : "";
n += o === P ? a + At : u >= 0 ? (s.push(d), a.slice(0, u) + nt + a.slice(u) + m + $) : a + m + (u === -2 ? p : $);
const $ = o === w && i[c + 1].startsWith("/>") ? " " : "";
n += o === P ? a + bt : u >= 0 ? (s.push(d), a.slice(0, u) + nt + a.slice(u) + m + $) : a + m + (u === -2 ? c : $);
}
return [pt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
};
class O {
class R {
constructor({ strings: t, _$litType$: e }, s) {

@@ -339,8 +339,8 @@ let r;

let n = 0, o = 0;
const p = t.length - 1, a = this.parts, [d, g] = vt(t, e);
if (this.el = O.createElement(d, s), A.currentNode = this.el.content, e === 2) {
const c = t.length - 1, a = this.parts, [d, g] = vt(t, e);
if (this.el = R.createElement(d, s), b.currentNode = this.el.content, e === 2) {
const u = this.el.content.firstChild;
u.replaceWith(...u.childNodes);
}
for (; (r = A.nextNode()) !== null && a.length < p; ) {
for (; (r = b.nextNode()) !== null && a.length < c; ) {
if (r.nodeType === 1) {

@@ -350,4 +350,4 @@ if (r.hasAttributes())

if (u.endsWith(nt)) {
const _ = g[o++], $ = r.getAttribute(u).split(m), H = /([.?@])?(.*)/.exec(_);
a.push({ type: 1, index: n, name: H[2], strings: $, ctor: H[1] === "." ? Pt : H[1] === "?" ? Ct : H[1] === "@" ? Mt : B }), r.removeAttribute(u);
const _ = g[o++], $ = r.getAttribute(u).split(m), T = /([.?@])?(.*)/.exec(_);
a.push({ type: 1, index: n, name: T[2], strings: $, ctor: T[1] === "." ? Pt : T[1] === "?" ? Ct : T[1] === "@" ? Mt : D }), r.removeAttribute(u);
} else

@@ -360,3 +360,3 @@ u.startsWith(m) && (a.push({ type: 6, index: n }), r.removeAttribute(u));

for (let $ = 0; $ < _; $++)
r.append(u[$], x()), A.nextNode(), a.push({ type: 2, index: ++n });
r.append(u[$], x()), b.nextNode(), a.push({ type: 2, index: ++n });
r.append(u[_], x());

@@ -377,3 +377,3 @@ }

static createElement(t, e) {
const s = S.createElement("template");
const s = A.createElement("template");
return s.innerHTML = t, s;

@@ -383,8 +383,8 @@ }

function E(i, t, e = i, s) {
var o, p;
var o, c;
if (t === v)
return t;
let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
const n = R(t) ? void 0 : t._$litDirective$;
return (r == null ? void 0 : r.constructor) !== n && ((p = r == null ? void 0 : r._$AO) == null || p.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = E(i, r._$AS(i, t.values), r, s)), t;
const n = O(t) ? void 0 : t._$litDirective$;
return (r == null ? void 0 : r.constructor) !== n && ((c = r == null ? void 0 : r._$AO) == null || c.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = E(i, r._$AS(i, t.values), r, s)), t;
}

@@ -402,13 +402,13 @@ class Et {

u(t) {
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? S).importNode(e, !0);
A.currentNode = r;
let n = A.nextNode(), o = 0, p = 0, a = s[0];
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
b.currentNode = r;
let n = b.nextNode(), o = 0, c = 0, a = s[0];
for (; a !== void 0; ) {
if (o === a.index) {
let d;
a.type === 2 ? d = new T(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Ut(n, this, t)), this._$AV.push(d), a = s[++p];
a.type === 2 ? d = new N(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Ut(n, this, t)), this._$AV.push(d), a = s[++c];
}
o !== (a == null ? void 0 : a.index) && (n = A.nextNode(), o++);
o !== (a == null ? void 0 : a.index) && (n = b.nextNode(), o++);
}
return A.currentNode = S, r;
return b.currentNode = A, r;
}

@@ -421,3 +421,3 @@ p(t) {

}
class T {
class N {
get _$AU() {

@@ -442,3 +442,3 @@ var t;

_$AI(t, e = this) {
t = E(this, t, e), R(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== v && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : St(t) ? this.k(t) : this._(t);
t = E(this, t, e), O(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== v && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : At(t) ? this.k(t) : this._(t);
}

@@ -452,12 +452,12 @@ S(t) {

_(t) {
this._$AH !== y && R(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
this._$AH !== y && O(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
}
$(t) {
var n;
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(pt(s.h, s.h[0]), this.options)), s);
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = R.createElement(pt(s.h, s.h[0]), this.options)), s);
if (((n = this._$AH) == null ? void 0 : n._$AD) === r)
this._$AH.p(e);
else {
const o = new Et(r, this), p = o.u(this.options);
o.p(e), this.T(p), this._$AH = o;
const o = new Et(r, this), c = o.u(this.options);
o.p(e), this.T(c), this._$AH = o;
}

@@ -467,3 +467,3 @@ }

let e = it.get(t.strings);
return e === void 0 && it.set(t.strings, e = new O(t)), e;
return e === void 0 && it.set(t.strings, e = new R(t)), e;
}

@@ -475,3 +475,3 @@ k(t) {

for (const n of t)
r === e.length ? e.push(s = new T(this.S(x()), this.S(x()), this, this.options)) : s = e[r], s._$AI(n), r++;
r === e.length ? e.push(s = new N(this.S(x()), this.S(x()), this, this.options)) : s = e[r], s._$AI(n), r++;
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);

@@ -491,3 +491,3 @@ }

}
class B {
class D {
get tagName() {

@@ -506,8 +506,8 @@ return this.element.tagName;

if (n === void 0)
t = E(this, t, e, 0), o = !R(t) || t !== this._$AH && t !== v, o && (this._$AH = t);
t = E(this, t, e, 0), o = !O(t) || t !== this._$AH && t !== v, o && (this._$AH = t);
else {
const p = t;
const c = t;
let a, d;
for (t = n[0], a = 0; a < n.length - 1; a++)
d = E(this, p[s + a], e, a), d === v && (d = this._$AH[a]), o || (o = !R(d) || d !== this._$AH[a]), d === y ? t = y : t !== y && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
d = E(this, c[s + a], e, a), d === v && (d = this._$AH[a]), o || (o = !O(d) || d !== this._$AH[a]), d === y ? t = y : t !== y && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
}

@@ -520,3 +520,3 @@ o && !r && this.j(t);

}
class Pt extends B {
class Pt extends D {
constructor() {

@@ -529,3 +529,3 @@ super(...arguments), this.type = 3;

}
class Ct extends B {
class Ct extends D {
constructor() {

@@ -538,3 +538,3 @@ super(...arguments), this.type = 4;

}
class Mt extends B {
class Mt extends D {
constructor(t, e, s, r, n) {

@@ -565,4 +565,4 @@ super(t, e, s, r, n), this.type = 5;

}
const j = M.litHtmlPolyfillSupport;
j == null || j(O, T), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.1.3");
const B = M.litHtmlPolyfillSupport;
B == null || B(R, N), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.1.3");
const xt = (i, t, e) => {

@@ -573,3 +573,3 @@ const s = (e == null ? void 0 : e.renderBefore) ?? t;

const n = (e == null ? void 0 : e.renderBefore) ?? null;
s._$litPart$ = r = new T(t.insertBefore(x(), n), n, void 0, e ?? {});
s._$litPart$ = r = new N(t.insertBefore(x(), n), n, void 0, e ?? {});
}

@@ -583,3 +583,3 @@ return r._$AI(i), r;

*/
class U extends b {
class U extends S {
constructor() {

@@ -611,4 +611,4 @@ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;

U._$litElement$ = !0, U.finalized = !0, (rt = globalThis.litElementHydrateSupport) == null || rt.call(globalThis, { LitElement: U });
const W = globalThis.litElementPolyfillSupport;
W == null || W({ LitElement: U });
const J = globalThis.litElementPolyfillSupport;
J == null || J({ LitElement: U });
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.5");

@@ -620,3 +620,3 @@ /**

*/
const Rt = (i) => (t, e) => {
const Ot = (i) => (t, e) => {
e !== void 0 ? e.addInitializer(() => {

@@ -631,3 +631,3 @@ customElements.define(i, t);

*/
const Ot = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: V }, Tt = (i = Ot, t, e) => {
const Rt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: V }, Nt = (i = Rt, t, e) => {
const { kind: s, metadata: r } = e;

@@ -637,7 +637,7 @@ let n = globalThis.litPropertyMetadata.get(r);

const { name: o } = e;
return { set(p) {
return { set(c) {
const a = t.get.call(this);
t.set.call(this, p), this.requestUpdate(o, a, i);
}, init(p) {
return p !== void 0 && this.P(o, void 0, i), p;
t.set.call(this, c), this.requestUpdate(o, a, i);
}, init(c) {
return c !== void 0 && this.P(o, void 0, i), c;
} };

@@ -647,5 +647,5 @@ }

const { name: o } = e;
return function(p) {
return function(c) {
const a = this[o];
t.call(this, p), this.requestUpdate(o, a, i);
t.call(this, c), this.requestUpdate(o, a, i);
};

@@ -655,4 +655,4 @@ }

};
function c(i) {
return (t, e) => typeof e == "object" ? Tt(i, t, e) : ((s, r, n) => {
function p(i) {
return (t, e) => typeof e == "object" ? Nt(i, t, e) : ((s, r, n) => {
const o = r.hasOwnProperty(n);

@@ -662,36 +662,37 @@ return r.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;

}
const Ht = [
"arPlacement",
"backgroundColor",
"cameraOrbitSensitivity",
"cameraTransitionDuration",
"disableScrollWheel",
"enableDarkMode",
"highlightColor",
"interactionPromptStyle",
const Tt = [
"allow-partial-match",
"ar-placement",
"background-color",
"camera-orbit-sensitivity",
"camera-transition-duration",
"disable-scroll-wheel",
"enable-dark-mode",
"highlight-color",
"interaction-prompt-style",
"lights",
"listBulletAlignment",
"listBulletLeadingZeros",
"listBulletStyle",
"list-bullet-alignment",
"list-bullet-leading-zeros",
"list-bullet-style",
"rotation",
"rulerUnit",
"shadowIntensity",
"shadowSoftness",
"showARButton",
"showARButtonLabel",
"showConfigurator",
"showContexts",
"showConfiguratorMobile",
"showHotspots",
"showInteractionPrompt",
"showLightSwitch",
"showRulerButton",
"showPivotButton",
"showPresets",
"startFrame",
"toneMapping",
"zoomType"
], Nt = (i) => {
"ruler-unit",
"shadow-intensity",
"shadow-softness",
"show-ar-button",
"show-ar-button-label",
"show-configurator",
"show-contexts",
"show-configurator-mobile",
"show-hotspots",
"show-interaction-prompt",
"show-light-switch",
"show-ruler-button",
"show-pivot-button",
"show-presets",
"start-frame",
"tone-mapping",
"zoom-type"
], kt = (i) => i.replace(/([-_]\w)/g, (t) => t[1].toUpperCase()), Ht = (i) => {
let t = new URLSearchParams();
return Ht.forEach((e) => {
return Tt.forEach((e) => {
if (i.hasAttribute(e)) {

@@ -701,13 +702,13 @@ let s = i.getAttribute(e);

return;
s === "yes" && (s = "true"), s === "no" && (s = "false"), t.append(e, s);
s === "yes" && (s = "true"), s === "no" && (s = "false"), t.append(kt(e), s);
}
}), t;
};
var kt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, l = (i, t, e, s) => {
for (var r = s > 1 ? void 0 : s ? It(t, e) : t, n = i.length - 1, o; n >= 0; n--)
var It = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, l = (i, t, e, s) => {
for (var r = s > 1 ? void 0 : s ? Lt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
return s && r && kt(t, e, r), r;
return s && r && It(t, e, r), r;
};
const Lt = "{host}{viewer}/by_scene_id/{scene_id}", Bt = "{host}{viewer}/by_product_id/{customer_id}/{product_id}", Dt = "{host}{viewer}/by_product_id/{customer_id}/{sku}", zt = "{host}{viewer}/by_hash/{customer_id}/{hash}";
function N(i, t) {
const Dt = "{host}{viewer}/by_scene_id/{scene_id}", zt = "{host}{viewer}/by_product_id/{customer_id}/{product_id}", jt = "{host}{viewer}/by_product_id/{customer_id}/{sku}", Bt = "{host}{viewer}/by_hash/{customer_id}/{hash}";
function k(i, t) {
var e = new RegExp(Object.keys(t).join("|"), "gi");

@@ -734,3 +735,3 @@ return i.replace(e, function(s) {

}, this._pingpongPostMessage = (i, t) => new Promise((e, s) => {
var p, a;
var c, a;
const r = { ...i, messageId: Date.now() }, n = (d) => {

@@ -745,3 +746,3 @@ if (d.origin === this.host && d.data.messageId === r.messageId && d.data.type === r.type) {

}
}, o = (p = this.shadowRoot) == null ? void 0 : p.querySelector("iframe");
}, o = (c = this.shadowRoot) == null ? void 0 : c.querySelector("iframe");
o && (window.addEventListener("message", n), (a = o.contentWindow) == null || a.postMessage(r, "*"));

@@ -753,3 +754,7 @@ }), this._handleMessage = (i) => {

case "ready":
this._emit("ready", JSON.parse(i.data.options));
this._emit("ready", {
options: JSON.parse(i.data.options),
presets: JSON.parse(i.data.presets),
scene: JSON.parse(i.data.scene)
});
break;

@@ -896,3 +901,4 @@ case "load":

featureId: i,
variantId: t
variantId: t,
allowPartialMatch: this.allowPartialMatch
});

@@ -904,8 +910,11 @@ }

* @param {object} selection {featureId: variantId}
* @param {boolean} resetBeforeUpdate (optional) - resets the configuration before updating
* @returns {void}
*/
setSelection(i) {
setSelection(i, t) {
this._postMessage({
type: "setSelection",
selection: i
selection: i,
resetBeforeUpdate: t,
allowPartialMatch: this.allowPartialMatch
});

@@ -1016,3 +1025,3 @@ }

let i = null, t = null;
return this.host ? this.customerId ? this.hash ? t = N(zt, {
return this.host ? this.customerId ? this.hash ? t = k(Bt, {
"{viewer}": "",

@@ -1022,3 +1031,3 @@ "{host}": this.host,

"{hash}": this.hash
}) : this.sceneId ? t = N(Lt, {
}) : this.sceneId ? t = k(Dt, {
"{viewer}": this.viewer === "360" ? "/360" : "",

@@ -1028,3 +1037,3 @@ "{host}": this.host,

"{scene_id}": this.sceneId
}) : this.sku ? t = N(Dt, {
}) : this.sku ? t = k(jt, {
"{viewer}": this.viewer === "360" ? "/360" : "",

@@ -1034,3 +1043,3 @@ "{host}": this.host,

"{sku}": this.sku
}) : this.productId ? t = N(Bt, {
}) : this.productId ? t = k(zt, {
"{viewer}": this.viewer === "360" ? "/360" : "",

@@ -1040,3 +1049,3 @@ "{host}": this.host,

"{product_id}": this.productId
}) : i = "Missing property: sku/productId, sceneId, or hash code" : i = "Missing property: customerId" : i = "Missing property: host", i ? st`<div>${i}</div>` : (this.hasAttributes() && (t += "?" + Nt(this)), st`<iframe
}) : i = "Missing property: sku, scene-id, or hash" : i = "Missing property: customer-id" : i = "Missing property: host", i ? st`<div>${i}</div>` : (this.hasAttributes() && (t += "?" + Ht(this)), st`<iframe
src="${t}"

@@ -1066,93 +1075,96 @@ width="100%"

l([
c({ type: String })
p({ type: String, attribute: "customer-id" })
], h.prototype, "customerId", 2);
l([
c({ type: String })
p({ type: String, attribute: "product-id" })
], h.prototype, "productId", 2);
l([
c({ type: String })
p({ type: String })
], h.prototype, "sku", 2);
l([
c({ type: String })
p({ type: String, attribute: "scene-id" })
], h.prototype, "sceneId", 2);
l([
c({ type: String })
p({ type: String })
], h.prototype, "hash", 2);
l([
c({ type: String })
p({ type: String })
], h.prototype, "viewer", 2);
l([
c({ type: String })
p({ type: String })
], h.prototype, "host", 2);
l([
c({ type: String, attribute: "arplacement" })
p({ type: String, attribute: "allow-partial-match" })
], h.prototype, "allowPartialMatch", 2);
l([
p({ type: String, attribute: "ar-placement" })
], h.prototype, "arPlacement", 2);
l([
c({ type: String, attribute: "backgroundcolor" })
p({ type: String, attribute: "background-color" })
], h.prototype, "backgroundColor", 2);
l([
c({ type: String, attribute: "enabledarkmode" })
p({ type: String, attribute: "enable-darkmode" })
], h.prototype, "enableDarkMode", 2);
l([
c({ type: String, attribute: "disablescrollwheel" })
p({ type: String, attribute: "disable-scroll-wheel" })
], h.prototype, "disableScrollWheel", 2);
l([
c({ type: String, attribute: "interactionpromptstyle" })
p({ type: String, attribute: "interaction-prompt-style" })
], h.prototype, "interactionPromptStyle", 2);
l([
c({ type: String, attribute: "lights" })
p({ type: String, attribute: "lights" })
], h.prototype, "lights", 2);
l([
c({ type: String, attribute: "rotation" })
p({ type: String, attribute: "rotation" })
], h.prototype, "rotation", 2);
l([
c({ type: String, attribute: "rulerunit" })
p({ type: String, attribute: "ruler-unit" })
], h.prototype, "rulerUnit", 2);
l([
c({ type: String, attribute: "shadowintensity" })
p({ type: String, attribute: "shadow-intensity" })
], h.prototype, "shadowIntensity", 2);
l([
c({ type: String, attribute: "shadowsoftness" })
p({ type: String, attribute: "shadow-softness" })
], h.prototype, "shadowSoftness", 2);
l([
c({ type: String, attribute: "showarbutton" })
p({ type: String, attribute: "show-ar-button" })
], h.prototype, "showARButton", 2);
l([
c({ type: String, attribute: "showarbuttonlabel" })
p({ type: String, attribute: "show-ar-button-label" })
], h.prototype, "showARButtonLabel", 2);
l([
c({ type: String, attribute: "showconfigurator" })
p({ type: String, attribute: "show-configurator" })
], h.prototype, "showConfigurator", 2);
l([
c({ type: String, attribute: "showcontexts" })
p({ type: String, attribute: "show-contexts" })
], h.prototype, "showContexts", 2);
l([
c({ type: String, attribute: "showhotspots" })
p({ type: String, attribute: "show-hotspots" })
], h.prototype, "showHotspots", 2);
l([
c({ type: String, attribute: "showinteractionprompt" })
p({ type: String, attribute: "show-interaction-prompt" })
], h.prototype, "showInteractionPrompt", 2);
l([
c({ type: String, attribute: "showlightswitch" })
p({ type: String, attribute: "show-light-switch" })
], h.prototype, "showLightSwitch", 2);
l([
c({ type: String, attribute: "showrulerbutton" })
p({ type: String, attribute: "show-ruler-button" })
], h.prototype, "showRulerButton", 2);
l([
c({ type: String, attribute: "showpivotbutton" })
p({ type: String, attribute: "show-pivot-button" })
], h.prototype, "showPivotButton", 2);
l([
c({ type: String, attribute: "showpresets" })
p({ type: String, attribute: "show-presets" })
], h.prototype, "showPresets", 2);
l([
c({ type: String, attribute: "startframe" })
p({ type: String, attribute: "start-frame" })
], h.prototype, "startFrame", 2);
l([
c({ type: String, attribute: "tonemapping" })
p({ type: String, attribute: "tone-mapping" })
], h.prototype, "toneMapping", 2);
l([
c({ type: String, attribute: "zoomtype" })
p({ type: String, attribute: "zoom-type" })
], h.prototype, "zoomType", 2);
h = l([
Rt("ld-configurator")
Ot("ld-configurator")
], h);

@@ -1159,0 +1171,0 @@ export {

{
"name": "@londondynamics/pericles-webcomponent",
"license": "MIT",
"version": "1.1.0",
"version": "2.0.0",
"type": "module",

@@ -6,0 +6,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc