@jaak.ai/stamps 2.1.0-dev.2 → 2.1.0-dev.20
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.
- package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/{index-BfhtOB0D.js → index-Ga0t6BMe.js} +176 -119
- package/dist/cjs/index-Ga0t6BMe.js.map +1 -0
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js +5 -4
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js.map +1 -1
- package/dist/cjs/jaak-stamps.cjs.entry.js +542 -68
- package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
- package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/my-component/my-component.css +56 -12
- package/dist/collection/components/my-component/my-component.js +429 -67
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/services/CameraService.js +84 -2
- package/dist/collection/services/CameraService.js.map +1 -1
- package/dist/collection/services/DetectionService.js +32 -4
- package/dist/collection/services/DetectionService.js.map +1 -1
- package/dist/components/index.js +165 -113
- package/dist/components/index.js.map +1 -1
- package/dist/components/jaak-stamps.js +546 -68
- package/dist/components/jaak-stamps.js.map +1 -1
- package/dist/esm/app-globals-DQuL1Twl.js +6 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/{index-BP1Q4KOg.js → index-Drbzcuq-.js} +177 -119
- package/dist/esm/index-Drbzcuq-.js.map +1 -0
- package/dist/esm/jaak-stamps-webcomponent.js +5 -4
- package/dist/esm/jaak-stamps-webcomponent.js.map +1 -1
- package/dist/esm/jaak-stamps.entry.js +542 -68
- package/dist/esm/jaak-stamps.entry.js.map +1 -1
- package/dist/esm/loader.js +4 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/loader.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/p-DQuL1Twl.js +2 -0
- package/dist/jaak-stamps-webcomponent/p-DQuL1Twl.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/p-Drbzcuq-.js +3 -0
- package/dist/jaak-stamps-webcomponent/p-Drbzcuq-.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/p-c06e5d7b.entry.js +2 -0
- package/dist/jaak-stamps-webcomponent/p-c06e5d7b.entry.js.map +1 -0
- package/dist/types/components/my-component/my-component.d.ts +19 -0
- package/dist/types/services/CameraService.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +12 -5
- package/package.json +3 -1
- package/dist/cjs/index-BfhtOB0D.js.map +0 -1
- package/dist/esm/index-BP1Q4KOg.js.map +0 -1
- package/dist/jaak-stamps-webcomponent/p-41e88688.entry.js +0 -2
- package/dist/jaak-stamps-webcomponent/p-41e88688.entry.js.map +0 -1
- package/dist/jaak-stamps-webcomponent/p-BP1Q4KOg.js +0 -3
- package/dist/jaak-stamps-webcomponent/p-BP1Q4KOg.js.map +0 -1
package/dist/components/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
const globalStyles = "";
|
|
2
|
-
|
|
3
1
|
const NAMESPACE = 'jaak-stamps-webcomponent';
|
|
4
2
|
const BUILD = /* jaak-stamps-webcomponent */ { hydratedSelectorName: "hydrated", lazyLoad: false, updatable: true, watchCallback: false };
|
|
5
3
|
|
|
6
4
|
/*
|
|
7
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.36.3 | MIT Licensed | https://stenciljs.com
|
|
8
6
|
*/
|
|
9
7
|
var __defProp = Object.defineProperty;
|
|
10
8
|
var __export = (target, all) => {
|
|
@@ -67,7 +65,6 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
67
65
|
|
|
68
66
|
// src/client/client-style.ts
|
|
69
67
|
var styles = /* @__PURE__ */ new Map();
|
|
70
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
71
68
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
72
69
|
var win = typeof window !== "undefined" ? window : {};
|
|
73
70
|
var H = win.HTMLElement || class {
|
|
@@ -90,6 +87,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
|
90
87
|
}
|
|
91
88
|
return false;
|
|
92
89
|
})() ;
|
|
90
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
93
91
|
var queuePending = false;
|
|
94
92
|
var queueDomReads = [];
|
|
95
93
|
var queueDomWrites = [];
|
|
@@ -196,12 +194,24 @@ var unwrapErr = (result) => {
|
|
|
196
194
|
throw result.value;
|
|
197
195
|
}
|
|
198
196
|
};
|
|
197
|
+
|
|
198
|
+
// src/utils/style.ts
|
|
199
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
200
|
+
return void 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// src/utils/shadow-root.ts
|
|
204
|
+
var globalStyleSheet;
|
|
199
205
|
function createShadowRoot(cmpMeta) {
|
|
206
|
+
var _a;
|
|
200
207
|
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
208
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
|
209
|
+
if (globalStyleSheet) {
|
|
210
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
211
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
212
|
+
} else {
|
|
213
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
214
|
+
}
|
|
205
215
|
}
|
|
206
216
|
}
|
|
207
217
|
var createTime = (fnName, tagName = "") => {
|
|
@@ -211,6 +221,110 @@ var createTime = (fnName, tagName = "") => {
|
|
|
211
221
|
};
|
|
212
222
|
}
|
|
213
223
|
};
|
|
224
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
225
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
226
|
+
let style = styles.get(scopeId2);
|
|
227
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
228
|
+
style = style || new CSSStyleSheet();
|
|
229
|
+
if (typeof style === "string") {
|
|
230
|
+
style = cssText;
|
|
231
|
+
} else {
|
|
232
|
+
style.replaceSync(cssText);
|
|
233
|
+
}
|
|
234
|
+
} else {
|
|
235
|
+
style = cssText;
|
|
236
|
+
}
|
|
237
|
+
styles.set(scopeId2, style);
|
|
238
|
+
};
|
|
239
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
240
|
+
var _a;
|
|
241
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
242
|
+
const style = styles.get(scopeId2);
|
|
243
|
+
if (!win.document) {
|
|
244
|
+
return scopeId2;
|
|
245
|
+
}
|
|
246
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
247
|
+
if (style) {
|
|
248
|
+
if (typeof style === "string") {
|
|
249
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
250
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
251
|
+
let styleElm;
|
|
252
|
+
if (!appliedStyles) {
|
|
253
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
254
|
+
}
|
|
255
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
256
|
+
{
|
|
257
|
+
styleElm = win.document.createElement("style");
|
|
258
|
+
styleElm.innerHTML = style;
|
|
259
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
260
|
+
if (nonce != null) {
|
|
261
|
+
styleElm.setAttribute("nonce", nonce);
|
|
262
|
+
}
|
|
263
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
264
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
265
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
266
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
267
|
+
styleContainerNode.insertBefore(
|
|
268
|
+
styleElm,
|
|
269
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
270
|
+
);
|
|
271
|
+
} else if ("host" in styleContainerNode) {
|
|
272
|
+
if (supportsConstructableStylesheets) {
|
|
273
|
+
const stylesheet = new CSSStyleSheet();
|
|
274
|
+
stylesheet.replaceSync(style);
|
|
275
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
276
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
277
|
+
} else {
|
|
278
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
279
|
+
}
|
|
280
|
+
} else {
|
|
281
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
282
|
+
if (existingStyleContainer) {
|
|
283
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
284
|
+
} else {
|
|
285
|
+
styleContainerNode.prepend(styleElm);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
} else {
|
|
289
|
+
styleContainerNode.append(styleElm);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
293
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
297
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
298
|
+
}
|
|
299
|
+
if (appliedStyles) {
|
|
300
|
+
appliedStyles.add(scopeId2);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
304
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
305
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
|
306
|
+
} else {
|
|
307
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return scopeId2;
|
|
312
|
+
};
|
|
313
|
+
var attachStyles = (hostRef) => {
|
|
314
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
315
|
+
const elm = hostRef.$hostElement$;
|
|
316
|
+
const flags = cmpMeta.$flags$;
|
|
317
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
318
|
+
const scopeId2 = addStyle(
|
|
319
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
320
|
+
cmpMeta);
|
|
321
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
322
|
+
elm["s-sc"] = scopeId2;
|
|
323
|
+
elm.classList.add(scopeId2 + "-h");
|
|
324
|
+
}
|
|
325
|
+
endAttachStyles();
|
|
326
|
+
};
|
|
327
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
214
328
|
var h = (nodeName, vnodeData, ...children) => {
|
|
215
329
|
let child = null;
|
|
216
330
|
let key = null;
|
|
@@ -287,10 +401,18 @@ var createSupportsRuleRe = (selector) => {
|
|
|
287
401
|
createSupportsRuleRe("::slotted");
|
|
288
402
|
createSupportsRuleRe(":host");
|
|
289
403
|
createSupportsRuleRe(":host-context");
|
|
290
|
-
var parsePropertyValue = (propValue, propType) => {
|
|
404
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
405
|
+
if (typeof propValue === "string" && (propType & 16 /* Unknown */ || propType & 8 /* Any */) && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
406
|
+
try {
|
|
407
|
+
return JSON.parse(propValue);
|
|
408
|
+
} catch (e) {
|
|
409
|
+
}
|
|
410
|
+
}
|
|
291
411
|
if (propValue != null && !isComplexType(propValue)) {
|
|
292
412
|
if (propType & 4 /* Boolean */) {
|
|
293
|
-
|
|
413
|
+
{
|
|
414
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
415
|
+
}
|
|
294
416
|
}
|
|
295
417
|
if (propType & 2 /* Number */) {
|
|
296
418
|
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
@@ -302,7 +424,9 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
302
424
|
}
|
|
303
425
|
return propValue;
|
|
304
426
|
};
|
|
305
|
-
var getElement = (ref) =>
|
|
427
|
+
var getElement = (ref) => {
|
|
428
|
+
return ref;
|
|
429
|
+
};
|
|
306
430
|
|
|
307
431
|
// src/runtime/event-emitter.ts
|
|
308
432
|
var createEvent = (ref, name, flags) => {
|
|
@@ -323,102 +447,6 @@ var emitEvent = (elm, name, opts) => {
|
|
|
323
447
|
elm.dispatchEvent(ev);
|
|
324
448
|
return ev;
|
|
325
449
|
};
|
|
326
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
327
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
328
|
-
let style = styles.get(scopeId2);
|
|
329
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
330
|
-
style = style || new CSSStyleSheet();
|
|
331
|
-
if (typeof style === "string") {
|
|
332
|
-
style = cssText;
|
|
333
|
-
} else {
|
|
334
|
-
style.replaceSync(cssText);
|
|
335
|
-
}
|
|
336
|
-
} else {
|
|
337
|
-
style = cssText;
|
|
338
|
-
}
|
|
339
|
-
styles.set(scopeId2, style);
|
|
340
|
-
};
|
|
341
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
342
|
-
var _a;
|
|
343
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
344
|
-
const style = styles.get(scopeId2);
|
|
345
|
-
if (!win.document) {
|
|
346
|
-
return scopeId2;
|
|
347
|
-
}
|
|
348
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
349
|
-
if (style) {
|
|
350
|
-
if (typeof style === "string") {
|
|
351
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
352
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
353
|
-
let styleElm;
|
|
354
|
-
if (!appliedStyles) {
|
|
355
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
356
|
-
}
|
|
357
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
358
|
-
{
|
|
359
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
360
|
-
styleElm.innerHTML = style;
|
|
361
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
362
|
-
if (nonce != null) {
|
|
363
|
-
styleElm.setAttribute("nonce", nonce);
|
|
364
|
-
}
|
|
365
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
366
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
367
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
368
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
369
|
-
styleContainerNode.insertBefore(
|
|
370
|
-
styleElm,
|
|
371
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
372
|
-
);
|
|
373
|
-
} else if ("host" in styleContainerNode) {
|
|
374
|
-
if (supportsConstructableStylesheets) {
|
|
375
|
-
const stylesheet = new CSSStyleSheet();
|
|
376
|
-
stylesheet.replaceSync(style);
|
|
377
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
378
|
-
} else {
|
|
379
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
380
|
-
if (existingStyleContainer) {
|
|
381
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
382
|
-
} else {
|
|
383
|
-
styleContainerNode.prepend(styleElm);
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
} else {
|
|
387
|
-
styleContainerNode.append(styleElm);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
391
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
395
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
396
|
-
}
|
|
397
|
-
if (appliedStyles) {
|
|
398
|
-
appliedStyles.add(scopeId2);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
402
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
return scopeId2;
|
|
406
|
-
};
|
|
407
|
-
var attachStyles = (hostRef) => {
|
|
408
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
409
|
-
const elm = hostRef.$hostElement$;
|
|
410
|
-
const flags = cmpMeta.$flags$;
|
|
411
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
412
|
-
const scopeId2 = addStyle(
|
|
413
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
414
|
-
cmpMeta);
|
|
415
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
416
|
-
elm["s-sc"] = scopeId2;
|
|
417
|
-
elm.classList.add(scopeId2 + "-h");
|
|
418
|
-
}
|
|
419
|
-
endAttachStyles();
|
|
420
|
-
};
|
|
421
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
422
450
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
423
451
|
if (oldValue === newValue) {
|
|
424
452
|
return;
|
|
@@ -739,7 +767,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
739
767
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
740
768
|
) {
|
|
741
769
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
742
|
-
}
|
|
770
|
+
} else ;
|
|
743
771
|
} else if (oldVNode.$text$ !== text) {
|
|
744
772
|
elm.data = text;
|
|
745
773
|
}
|
|
@@ -798,6 +826,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
798
826
|
}
|
|
799
827
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
800
828
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
829
|
+
if (isInitialLoad) {
|
|
830
|
+
queueMicrotask(() => {
|
|
831
|
+
dispatch();
|
|
832
|
+
});
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
801
835
|
return writeTask(dispatch) ;
|
|
802
836
|
};
|
|
803
837
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -932,11 +966,16 @@ var addHydratedFlag = (elm) => {
|
|
|
932
966
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
933
967
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
934
968
|
const hostRef = getHostRef(ref);
|
|
969
|
+
if (!hostRef) {
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
935
972
|
const elm = ref;
|
|
936
973
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
937
974
|
const flags = hostRef.$flags$;
|
|
938
975
|
const instance = elm;
|
|
939
|
-
newVal = parsePropertyValue(
|
|
976
|
+
newVal = parsePropertyValue(
|
|
977
|
+
newVal,
|
|
978
|
+
cmpMeta.$members$[propName][0]);
|
|
940
979
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
941
980
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
942
981
|
if (didValueChange) {
|
|
@@ -979,6 +1018,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
979
1018
|
Object.defineProperty(prototype, memberName, {
|
|
980
1019
|
set(newValue) {
|
|
981
1020
|
const ref = getHostRef(this);
|
|
1021
|
+
if (!ref) {
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
982
1024
|
if (origSetter) {
|
|
983
1025
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
984
1026
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
@@ -986,7 +1028,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
986
1028
|
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
987
1029
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
988
1030
|
}
|
|
989
|
-
origSetter.apply(this, [
|
|
1031
|
+
origSetter.apply(this, [
|
|
1032
|
+
parsePropertyValue(
|
|
1033
|
+
newValue,
|
|
1034
|
+
memberFlags)
|
|
1035
|
+
]);
|
|
990
1036
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
991
1037
|
setValue(this, memberName, newValue, cmpMeta);
|
|
992
1038
|
return;
|
|
@@ -1011,7 +1057,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1011
1057
|
} else if (propName == null) {
|
|
1012
1058
|
const hostRef = getHostRef(this);
|
|
1013
1059
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1014
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1060
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1015
1061
|
const elm = this;
|
|
1016
1062
|
const instance = elm;
|
|
1017
1063
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
@@ -1033,7 +1079,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1033
1079
|
Cstr.observedAttributes = Array.from(
|
|
1034
1080
|
/* @__PURE__ */ new Set([
|
|
1035
1081
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1036
|
-
...members.filter(([_, m]) => m[0] &
|
|
1082
|
+
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
1037
1083
|
const attrName = m[1] || propName;
|
|
1038
1084
|
attrNameToPropName.set(attrName, propName);
|
|
1039
1085
|
return attrName;
|
|
@@ -1083,6 +1129,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
|
1083
1129
|
var connectedCallback = (elm) => {
|
|
1084
1130
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1085
1131
|
const hostRef = getHostRef(elm);
|
|
1132
|
+
if (!hostRef) {
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1086
1135
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1087
1136
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1088
1137
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
@@ -1146,7 +1195,10 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
1146
1195
|
},
|
|
1147
1196
|
connectedCallback() {
|
|
1148
1197
|
if (!this.__hasHostListenerAttached) {
|
|
1149
|
-
getHostRef(this);
|
|
1198
|
+
const hostRef = getHostRef(this);
|
|
1199
|
+
if (!hostRef) {
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
1150
1202
|
this.__hasHostListenerAttached = true;
|
|
1151
1203
|
}
|
|
1152
1204
|
connectedCallback(this);
|