@jaak.ai/stamps 2.1.0-dev.9 → 2.2.0-dev.1
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/README.md +42 -9
- 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-D6NBn_qu.js} +203 -121
- package/dist/cjs/index-D6NBn_qu.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 +20219 -420
- 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 +83 -3
- package/dist/collection/components/my-component/my-component.js +521 -302
- 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 +7 -148
- package/dist/collection/services/DetectionService.js.map +1 -1
- package/dist/collection/services/LicenseValidationService.js +111 -0
- package/dist/collection/services/LicenseValidationService.js.map +1 -0
- package/dist/collection/services/MetricsService.js +350 -0
- package/dist/collection/services/MetricsService.js.map +1 -0
- package/dist/collection/services/ServiceContainer.js +66 -1
- package/dist/collection/services/ServiceContainer.js.map +1 -1
- package/dist/collection/services/TracingService.js +442 -0
- package/dist/collection/services/TracingService.js.map +1 -0
- package/dist/collection/services/interfaces/IDetectionService.js.map +1 -1
- package/dist/collection/services/interfaces/ILicenseValidationService.js +2 -0
- package/dist/collection/services/interfaces/ILicenseValidationService.js.map +1 -0
- package/dist/collection/services/interfaces/IMetricsService.js +2 -0
- package/dist/collection/services/interfaces/IMetricsService.js.map +1 -0
- package/dist/collection/services/interfaces/ITracingService.js +2 -0
- package/dist/collection/services/interfaces/ITracingService.js.map +1 -0
- package/dist/components/index.js +192 -115
- package/dist/components/index.js.map +1 -1
- package/dist/components/jaak-stamps.js +20235 -423
- 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-BCfAsrzL.js} +204 -121
- package/dist/esm/index-BCfAsrzL.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 +20219 -420
- 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-8c49893d.entry.js +7 -0
- package/dist/jaak-stamps-webcomponent/p-8c49893d.entry.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/p-BCfAsrzL.js +3 -0
- package/dist/jaak-stamps-webcomponent/p-BCfAsrzL.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/p-DQuL1Twl.js +2 -0
- package/dist/jaak-stamps-webcomponent/p-DQuL1Twl.js.map +1 -0
- package/dist/types/components/my-component/my-component.d.ts +24 -27
- package/dist/types/components.d.ts +77 -3
- package/dist/types/services/CameraService.d.ts +1 -0
- package/dist/types/services/DetectionService.d.ts +1 -9
- package/dist/types/services/LicenseValidationService.d.ts +59 -0
- package/dist/types/services/MetricsService.d.ts +74 -0
- package/dist/types/services/ServiceContainer.d.ts +14 -1
- package/dist/types/services/TracingService.d.ts +67 -0
- package/dist/types/services/interfaces/IDetectionService.d.ts +0 -6
- package/dist/types/services/interfaces/ILicenseValidationService.d.ts +4 -0
- package/dist/types/services/interfaces/IMetricsService.d.ts +70 -0
- package/dist/types/services/interfaces/ITracingService.d.ts +59 -0
- package/dist/types/stencil-public-runtime.d.ts +12 -5
- package/package.json +20 -2
- package/dist/cjs/index-BfhtOB0D.js.map +0 -1
- package/dist/esm/index-BP1Q4KOg.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/jaak-stamps-webcomponent/p-c115e01a.entry.js +0 -2
- package/dist/jaak-stamps-webcomponent/p-c115e01a.entry.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-globals-DQuL1Twl.js","sources":["@stencil/core/internal/app-globals"],"sourcesContent":["export const globalScripts = () => {};\nexport const globalStyles = \"\";\n"],"names":[],"mappings":"AAAY,MAAC,aAAa,GAAG,MAAM;;;;"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
const NAMESPACE = 'jaak-stamps-webcomponent';
|
|
2
2
|
const BUILD = /* jaak-stamps-webcomponent */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
|
|
3
3
|
|
|
4
|
-
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = "";
|
|
6
|
-
|
|
7
4
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.36.3 | MIT Licensed | https://stenciljs.com
|
|
9
6
|
*/
|
|
10
7
|
var __defProp = Object.defineProperty;
|
|
11
8
|
var __export = (target, all) => {
|
|
@@ -13,6 +10,10 @@ var __export = (target, all) => {
|
|
|
13
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
11
|
};
|
|
15
12
|
|
|
13
|
+
// src/utils/constants.ts
|
|
14
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
+
|
|
16
17
|
// src/utils/es2022-rewire-class-members.ts
|
|
17
18
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
18
19
|
var _a;
|
|
@@ -107,7 +108,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
107
108
|
|
|
108
109
|
// src/client/client-style.ts
|
|
109
110
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
111
111
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
112
112
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
113
113
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -129,6 +129,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
|
129
129
|
}
|
|
130
130
|
return false;
|
|
131
131
|
})() ;
|
|
132
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
132
133
|
var queuePending = false;
|
|
133
134
|
var queueDomReads = [];
|
|
134
135
|
var queueDomWrites = [];
|
|
@@ -228,12 +229,24 @@ var unwrapErr = (result) => {
|
|
|
228
229
|
throw result.value;
|
|
229
230
|
}
|
|
230
231
|
};
|
|
232
|
+
|
|
233
|
+
// src/utils/style.ts
|
|
234
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
235
|
+
return void 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/utils/shadow-root.ts
|
|
239
|
+
var globalStyleSheet;
|
|
231
240
|
function createShadowRoot(cmpMeta) {
|
|
241
|
+
var _a;
|
|
232
242
|
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
233
|
-
if (
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
243
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
|
244
|
+
if (globalStyleSheet) {
|
|
245
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
246
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
247
|
+
} else {
|
|
248
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
249
|
+
}
|
|
237
250
|
}
|
|
238
251
|
}
|
|
239
252
|
var createTime = (fnName, tagName = "") => {
|
|
@@ -250,6 +263,110 @@ var uniqueTime = (key, measureText) => {
|
|
|
250
263
|
};
|
|
251
264
|
}
|
|
252
265
|
};
|
|
266
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
267
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
268
|
+
let style = styles.get(scopeId2);
|
|
269
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
270
|
+
style = style || new CSSStyleSheet();
|
|
271
|
+
if (typeof style === "string") {
|
|
272
|
+
style = cssText;
|
|
273
|
+
} else {
|
|
274
|
+
style.replaceSync(cssText);
|
|
275
|
+
}
|
|
276
|
+
} else {
|
|
277
|
+
style = cssText;
|
|
278
|
+
}
|
|
279
|
+
styles.set(scopeId2, style);
|
|
280
|
+
};
|
|
281
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
282
|
+
var _a;
|
|
283
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
284
|
+
const style = styles.get(scopeId2);
|
|
285
|
+
if (!win.document) {
|
|
286
|
+
return scopeId2;
|
|
287
|
+
}
|
|
288
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
289
|
+
if (style) {
|
|
290
|
+
if (typeof style === "string") {
|
|
291
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
292
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
293
|
+
let styleElm;
|
|
294
|
+
if (!appliedStyles) {
|
|
295
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
296
|
+
}
|
|
297
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
298
|
+
{
|
|
299
|
+
styleElm = win.document.createElement("style");
|
|
300
|
+
styleElm.innerHTML = style;
|
|
301
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
302
|
+
if (nonce != null) {
|
|
303
|
+
styleElm.setAttribute("nonce", nonce);
|
|
304
|
+
}
|
|
305
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
306
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
307
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
308
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
309
|
+
styleContainerNode.insertBefore(
|
|
310
|
+
styleElm,
|
|
311
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
312
|
+
);
|
|
313
|
+
} else if ("host" in styleContainerNode) {
|
|
314
|
+
if (supportsConstructableStylesheets) {
|
|
315
|
+
const stylesheet = new CSSStyleSheet();
|
|
316
|
+
stylesheet.replaceSync(style);
|
|
317
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
318
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
319
|
+
} else {
|
|
320
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
324
|
+
if (existingStyleContainer) {
|
|
325
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
326
|
+
} else {
|
|
327
|
+
styleContainerNode.prepend(styleElm);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
} else {
|
|
331
|
+
styleContainerNode.append(styleElm);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
335
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
339
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
340
|
+
}
|
|
341
|
+
if (appliedStyles) {
|
|
342
|
+
appliedStyles.add(scopeId2);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
346
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
347
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
|
348
|
+
} else {
|
|
349
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return scopeId2;
|
|
354
|
+
};
|
|
355
|
+
var attachStyles = (hostRef) => {
|
|
356
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
357
|
+
const elm = hostRef.$hostElement$;
|
|
358
|
+
const flags = cmpMeta.$flags$;
|
|
359
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
360
|
+
const scopeId2 = addStyle(
|
|
361
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
362
|
+
cmpMeta);
|
|
363
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
364
|
+
elm["s-sc"] = scopeId2;
|
|
365
|
+
elm.classList.add(scopeId2 + "-h");
|
|
366
|
+
}
|
|
367
|
+
endAttachStyles();
|
|
368
|
+
};
|
|
369
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
253
370
|
var h = (nodeName, vnodeData, ...children) => {
|
|
254
371
|
let child = null;
|
|
255
372
|
let key = null;
|
|
@@ -326,10 +443,18 @@ var createSupportsRuleRe = (selector) => {
|
|
|
326
443
|
createSupportsRuleRe("::slotted");
|
|
327
444
|
createSupportsRuleRe(":host");
|
|
328
445
|
createSupportsRuleRe(":host-context");
|
|
329
|
-
var parsePropertyValue = (propValue, propType) => {
|
|
446
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
447
|
+
if (typeof propValue === "string" && (propType & 16 /* Unknown */ || propType & 8 /* Any */) && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
448
|
+
try {
|
|
449
|
+
return JSON.parse(propValue);
|
|
450
|
+
} catch (e) {
|
|
451
|
+
}
|
|
452
|
+
}
|
|
330
453
|
if (propValue != null && !isComplexType(propValue)) {
|
|
331
454
|
if (propType & 4 /* Boolean */) {
|
|
332
|
-
|
|
455
|
+
{
|
|
456
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
457
|
+
}
|
|
333
458
|
}
|
|
334
459
|
if (propType & 2 /* Number */) {
|
|
335
460
|
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
@@ -341,7 +466,10 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
341
466
|
}
|
|
342
467
|
return propValue;
|
|
343
468
|
};
|
|
344
|
-
var getElement = (ref) =>
|
|
469
|
+
var getElement = (ref) => {
|
|
470
|
+
var _a;
|
|
471
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
|
|
472
|
+
};
|
|
345
473
|
|
|
346
474
|
// src/runtime/event-emitter.ts
|
|
347
475
|
var createEvent = (ref, name, flags) => {
|
|
@@ -362,102 +490,6 @@ var emitEvent = (elm, name, opts) => {
|
|
|
362
490
|
elm.dispatchEvent(ev);
|
|
363
491
|
return ev;
|
|
364
492
|
};
|
|
365
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
366
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
367
|
-
let style = styles.get(scopeId2);
|
|
368
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
369
|
-
style = style || new CSSStyleSheet();
|
|
370
|
-
if (typeof style === "string") {
|
|
371
|
-
style = cssText;
|
|
372
|
-
} else {
|
|
373
|
-
style.replaceSync(cssText);
|
|
374
|
-
}
|
|
375
|
-
} else {
|
|
376
|
-
style = cssText;
|
|
377
|
-
}
|
|
378
|
-
styles.set(scopeId2, style);
|
|
379
|
-
};
|
|
380
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
381
|
-
var _a;
|
|
382
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
383
|
-
const style = styles.get(scopeId2);
|
|
384
|
-
if (!win.document) {
|
|
385
|
-
return scopeId2;
|
|
386
|
-
}
|
|
387
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
388
|
-
if (style) {
|
|
389
|
-
if (typeof style === "string") {
|
|
390
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
391
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
392
|
-
let styleElm;
|
|
393
|
-
if (!appliedStyles) {
|
|
394
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
395
|
-
}
|
|
396
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
397
|
-
{
|
|
398
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
399
|
-
styleElm.innerHTML = style;
|
|
400
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
401
|
-
if (nonce != null) {
|
|
402
|
-
styleElm.setAttribute("nonce", nonce);
|
|
403
|
-
}
|
|
404
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
405
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
406
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
407
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
408
|
-
styleContainerNode.insertBefore(
|
|
409
|
-
styleElm,
|
|
410
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
411
|
-
);
|
|
412
|
-
} else if ("host" in styleContainerNode) {
|
|
413
|
-
if (supportsConstructableStylesheets) {
|
|
414
|
-
const stylesheet = new CSSStyleSheet();
|
|
415
|
-
stylesheet.replaceSync(style);
|
|
416
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
417
|
-
} else {
|
|
418
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
419
|
-
if (existingStyleContainer) {
|
|
420
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
421
|
-
} else {
|
|
422
|
-
styleContainerNode.prepend(styleElm);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
} else {
|
|
426
|
-
styleContainerNode.append(styleElm);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
430
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
434
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
435
|
-
}
|
|
436
|
-
if (appliedStyles) {
|
|
437
|
-
appliedStyles.add(scopeId2);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
441
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
return scopeId2;
|
|
445
|
-
};
|
|
446
|
-
var attachStyles = (hostRef) => {
|
|
447
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
448
|
-
const elm = hostRef.$hostElement$;
|
|
449
|
-
const flags = cmpMeta.$flags$;
|
|
450
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
451
|
-
const scopeId2 = addStyle(
|
|
452
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
453
|
-
cmpMeta);
|
|
454
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
455
|
-
elm["s-sc"] = scopeId2;
|
|
456
|
-
elm.classList.add(scopeId2 + "-h");
|
|
457
|
-
}
|
|
458
|
-
endAttachStyles();
|
|
459
|
-
};
|
|
460
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
461
493
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
462
494
|
if (oldValue === newValue) {
|
|
463
495
|
return;
|
|
@@ -517,7 +549,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
517
549
|
}
|
|
518
550
|
} else {
|
|
519
551
|
const isComplex = isComplexType(newValue);
|
|
520
|
-
if ((isProp || isComplex && newValue !== null) &&
|
|
552
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
521
553
|
try {
|
|
522
554
|
if (!elm.tagName.includes("-")) {
|
|
523
555
|
const n = newValue == null ? "" : newValue;
|
|
@@ -610,14 +642,21 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
610
642
|
if (newVNode2.$text$ !== null) {
|
|
611
643
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
612
644
|
} else {
|
|
645
|
+
if (!isSvgMode) {
|
|
646
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
647
|
+
}
|
|
613
648
|
if (!win.document) {
|
|
614
649
|
throw new Error(
|
|
615
650
|
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
616
651
|
);
|
|
617
652
|
}
|
|
618
|
-
elm = newVNode2.$elm$ = win.document.
|
|
653
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
654
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
619
655
|
newVNode2.$tag$
|
|
620
|
-
);
|
|
656
|
+
) ;
|
|
657
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
658
|
+
isSvgMode = false;
|
|
659
|
+
}
|
|
621
660
|
{
|
|
622
661
|
updateElement(null, newVNode2, isSvgMode);
|
|
623
662
|
}
|
|
@@ -629,6 +668,13 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
629
668
|
}
|
|
630
669
|
}
|
|
631
670
|
}
|
|
671
|
+
{
|
|
672
|
+
if (newVNode2.$tag$ === "svg") {
|
|
673
|
+
isSvgMode = false;
|
|
674
|
+
} else if (elm.tagName === "foreignObject") {
|
|
675
|
+
isSvgMode = true;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
632
678
|
}
|
|
633
679
|
elm["s-hn"] = hostTagName;
|
|
634
680
|
return elm;
|
|
@@ -761,8 +807,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
761
807
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
762
808
|
const oldChildren = oldVNode.$children$;
|
|
763
809
|
const newChildren = newVNode2.$children$;
|
|
810
|
+
const tag = newVNode2.$tag$;
|
|
764
811
|
const text = newVNode2.$text$;
|
|
765
812
|
if (text === null) {
|
|
813
|
+
{
|
|
814
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
815
|
+
}
|
|
766
816
|
{
|
|
767
817
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
768
818
|
}
|
|
@@ -778,6 +828,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
778
828
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
779
829
|
) {
|
|
780
830
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
831
|
+
} else ;
|
|
832
|
+
if (isSvgMode && tag === "svg") {
|
|
833
|
+
isSvgMode = false;
|
|
781
834
|
}
|
|
782
835
|
} else if (oldVNode.$text$ !== text) {
|
|
783
836
|
elm.data = text;
|
|
@@ -837,6 +890,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
837
890
|
}
|
|
838
891
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
839
892
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
893
|
+
if (isInitialLoad) {
|
|
894
|
+
queueMicrotask(() => {
|
|
895
|
+
dispatch();
|
|
896
|
+
});
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
840
899
|
return writeTask(dispatch) ;
|
|
841
900
|
};
|
|
842
901
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -974,6 +1033,9 @@ var addHydratedFlag = (elm) => {
|
|
|
974
1033
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
975
1034
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
976
1035
|
const hostRef = getHostRef(ref);
|
|
1036
|
+
if (!hostRef) {
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
977
1039
|
if (!hostRef) {
|
|
978
1040
|
throw new Error(
|
|
979
1041
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
@@ -982,7 +1044,9 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
982
1044
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
983
1045
|
const flags = hostRef.$flags$;
|
|
984
1046
|
const instance = hostRef.$lazyInstance$ ;
|
|
985
|
-
newVal = parsePropertyValue(
|
|
1047
|
+
newVal = parsePropertyValue(
|
|
1048
|
+
newVal,
|
|
1049
|
+
cmpMeta.$members$[propName][0]);
|
|
986
1050
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
987
1051
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
988
1052
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -1031,6 +1095,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1031
1095
|
Object.defineProperty(prototype, memberName, {
|
|
1032
1096
|
set(newValue) {
|
|
1033
1097
|
const ref = getHostRef(this);
|
|
1098
|
+
if (!ref) {
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1034
1101
|
if (origSetter) {
|
|
1035
1102
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1036
1103
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
@@ -1038,7 +1105,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1038
1105
|
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1039
1106
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1040
1107
|
}
|
|
1041
|
-
origSetter.apply(this, [
|
|
1108
|
+
origSetter.apply(this, [
|
|
1109
|
+
parsePropertyValue(
|
|
1110
|
+
newValue,
|
|
1111
|
+
memberFlags)
|
|
1112
|
+
]);
|
|
1042
1113
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1043
1114
|
setValue(this, memberName, newValue, cmpMeta);
|
|
1044
1115
|
return;
|
|
@@ -1060,7 +1131,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1060
1131
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1061
1132
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1062
1133
|
}
|
|
1063
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1134
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1135
|
+
newValue,
|
|
1136
|
+
memberFlags);
|
|
1064
1137
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1065
1138
|
};
|
|
1066
1139
|
if (ref.$lazyInstance$) {
|
|
@@ -1099,7 +1172,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1099
1172
|
} else if (propName == null) {
|
|
1100
1173
|
const hostRef = getHostRef(this);
|
|
1101
1174
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1102
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1175
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1103
1176
|
const instance = hostRef.$lazyInstance$ ;
|
|
1104
1177
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
1105
1178
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
@@ -1120,7 +1193,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1120
1193
|
Cstr.observedAttributes = Array.from(
|
|
1121
1194
|
/* @__PURE__ */ new Set([
|
|
1122
1195
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1123
|
-
...members.filter(([_, m]) => m[0] &
|
|
1196
|
+
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
1124
1197
|
const attrName = m[1] || propName;
|
|
1125
1198
|
attrNameToPropName.set(attrName, propName);
|
|
1126
1199
|
return attrName;
|
|
@@ -1204,6 +1277,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
|
1204
1277
|
var connectedCallback = (elm) => {
|
|
1205
1278
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1206
1279
|
const hostRef = getHostRef(elm);
|
|
1280
|
+
if (!hostRef) {
|
|
1281
|
+
return;
|
|
1282
|
+
}
|
|
1207
1283
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1208
1284
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1209
1285
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
@@ -1318,7 +1394,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1318
1394
|
}
|
|
1319
1395
|
}
|
|
1320
1396
|
connectedCallback() {
|
|
1321
|
-
getHostRef(this);
|
|
1397
|
+
const hostRef = getHostRef(this);
|
|
1398
|
+
if (!hostRef) {
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1322
1401
|
if (!this.hasRegisteredEventListeners) {
|
|
1323
1402
|
this.hasRegisteredEventListeners = true;
|
|
1324
1403
|
}
|
|
@@ -1337,6 +1416,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1337
1416
|
plt.raf(() => {
|
|
1338
1417
|
var _a3;
|
|
1339
1418
|
const hostRef = getHostRef(this);
|
|
1419
|
+
if (!hostRef) {
|
|
1420
|
+
return;
|
|
1421
|
+
}
|
|
1340
1422
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1341
1423
|
if (i2 > -1) {
|
|
1342
1424
|
deferredConnectedCallbacks.splice(i2, 1);
|
|
@@ -1347,7 +1429,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1347
1429
|
});
|
|
1348
1430
|
}
|
|
1349
1431
|
componentOnReady() {
|
|
1350
|
-
|
|
1432
|
+
var _a3;
|
|
1433
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
1351
1434
|
}
|
|
1352
1435
|
};
|
|
1353
1436
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
@@ -1390,7 +1473,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1390
1473
|
// src/runtime/nonce.ts
|
|
1391
1474
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1392
1475
|
|
|
1393
|
-
export {
|
|
1394
|
-
//# sourceMappingURL=index-
|
|
1476
|
+
export { bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1477
|
+
//# sourceMappingURL=index-BCfAsrzL.js.map
|
|
1395
1478
|
|
|
1396
|
-
//# sourceMappingURL=index-
|
|
1479
|
+
//# sourceMappingURL=index-BCfAsrzL.js.map
|