@everymatrix/general-stories 1.56.0 → 1.56.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.
- package/dist/cjs/{general-stories-f3bf4099.js → general-stories-bbb81cca.js} +14 -27
- package/dist/cjs/general-stories.cjs.entry.js +2 -2
- package/dist/cjs/general-stories.cjs.js +2 -2
- package/dist/cjs/{index-4176da89.js → index-5b8c1770.js} +73 -210
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/general-stories/general-stories.js +13 -42
- package/dist/esm/{general-stories-8ada9aa4.js → general-stories-09d4f95e.js} +14 -27
- package/dist/esm/general-stories.entry.js +2 -2
- package/dist/esm/general-stories.js +3 -3
- package/dist/esm/{index-95b2d607.js → index-b4964764.js} +73 -210
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/general-stories/general-stories.esm.js +1 -1
- package/dist/general-stories/index.esm.js +1 -1
- package/dist/general-stories/p-34426db6.js +1 -0
- package/dist/general-stories/p-c85b316a.js +2 -0
- package/dist/general-stories/p-e1076ee3.entry.js +1 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/general-stories/p-004038c9.js +0 -1
- package/dist/general-stories/p-3e7fe480.entry.js +0 -1
- package/dist/general-stories/p-56d326ea.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-5b8c1770.js');
|
|
4
4
|
|
|
5
5
|
const getDevice = () => {
|
|
6
6
|
let userAgent = window.navigator.userAgent;
|
|
@@ -148,35 +148,9 @@ const GeneralStoriesStyle0 = generalStoriesCss;
|
|
|
148
148
|
const GeneralStories = class {
|
|
149
149
|
constructor(hostRef) {
|
|
150
150
|
index.registerInstance(this, hostRef);
|
|
151
|
-
/**
|
|
152
|
-
* Language of the widget
|
|
153
|
-
*/
|
|
154
|
-
this.language = 'en';
|
|
155
|
-
/**
|
|
156
|
-
* CMS Endpoint stage
|
|
157
|
-
*/
|
|
158
|
-
this.cmsEnv = 'stage';
|
|
159
|
-
/**
|
|
160
|
-
* Client custom styling via string
|
|
161
|
-
*/
|
|
162
|
-
this.clientStyling = '';
|
|
163
|
-
/**
|
|
164
|
-
* Client custom styling via url
|
|
165
|
-
*/
|
|
166
|
-
this.clientStylingUrl = '';
|
|
167
|
-
/**
|
|
168
|
-
* Translations via URL
|
|
169
|
-
*/
|
|
170
|
-
this.translationUrl = '';
|
|
171
|
-
/**
|
|
172
|
-
* Duration of progress bar
|
|
173
|
-
*/
|
|
174
|
-
this.progressBarDuration = 10;
|
|
175
151
|
this.hasErrors = false;
|
|
176
152
|
this.isLoading = true;
|
|
177
153
|
this.isSwipe = false;
|
|
178
|
-
this.currentStoryId = null;
|
|
179
|
-
this.progress = 0;
|
|
180
154
|
this.getStories = () => {
|
|
181
155
|
let url = new URL(`${this.cmsEndpoint}/${this.language}/stories`);
|
|
182
156
|
url.searchParams.append('env', this.cmsEnv);
|
|
@@ -254,6 +228,19 @@ const GeneralStories = class {
|
|
|
254
228
|
const open = () => this.openFullScreenStory(props.id);
|
|
255
229
|
return (index.h("div", { class: `StoryThumbnailContainer ${props.viewed ? 'Viewed' : 'Highlighted'}`, onTouchStart: open }, index.h("img", { class: `StoryThumbnailImage ${props.viewed ? 'Viewed' : 'Highlighted'}`, src: props.icon, alt: "story-icon" })));
|
|
256
230
|
};
|
|
231
|
+
this.cmsEndpoint = undefined;
|
|
232
|
+
this.language = 'en';
|
|
233
|
+
this.cmsEnv = 'stage';
|
|
234
|
+
this.mbSource = undefined;
|
|
235
|
+
this.clientStyling = '';
|
|
236
|
+
this.clientStylingUrl = '';
|
|
237
|
+
this.translationUrl = '';
|
|
238
|
+
this.progressBarDuration = 10;
|
|
239
|
+
this.currentStory = undefined;
|
|
240
|
+
this.currentStoryId = null;
|
|
241
|
+
this.progress = 0;
|
|
242
|
+
this.touchPosStart = undefined;
|
|
243
|
+
this.touchPosEnd = undefined;
|
|
257
244
|
}
|
|
258
245
|
handleClientStylingChange(newValue, oldValue) {
|
|
259
246
|
if (newValue != oldValue) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const generalStories = require('./general-stories-
|
|
6
|
-
require('./index-
|
|
5
|
+
const generalStories = require('./general-stories-bbb81cca.js');
|
|
6
|
+
require('./index-5b8c1770.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5b8c1770.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-stories.cjs.js', document.baseURI).href));
|
|
@@ -21,27 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'general-stories';
|
|
24
|
-
const BUILD = /* general-stories */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false,
|
|
24
|
+
const BUILD = /* general-stories */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
// src/utils/constants.ts
|
|
36
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
-
|
|
39
|
-
// src/client/client-host-ref.ts
|
|
40
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
41
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
42
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
43
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
45
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
46
38
|
const hostRef = {
|
|
47
39
|
$flags$: 0,
|
|
@@ -54,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
54
46
|
hostElement["s-p"] = [];
|
|
55
47
|
hostElement["s-rc"] = [];
|
|
56
48
|
}
|
|
57
|
-
|
|
58
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
59
50
|
};
|
|
60
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
61
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -92,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
92
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
93
84
|
/* webpackMode: "lazy" */
|
|
94
85
|
`./${bundleId}.entry.js${""}`
|
|
95
|
-
)); }).then(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
cmpModules.set(bundleId, importedModule);
|
|
99
|
-
}
|
|
100
|
-
return importedModule[exportName];
|
|
101
|
-
},
|
|
102
|
-
(e) => {
|
|
103
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
104
89
|
}
|
|
105
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
106
92
|
};
|
|
107
93
|
|
|
108
94
|
// src/client/client-style.ts
|
|
109
95
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
111
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
112
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
113
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -181,6 +166,14 @@ var flush = () => {
|
|
|
181
166
|
};
|
|
182
167
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
183
168
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
169
|
+
|
|
170
|
+
// src/utils/constants.ts
|
|
171
|
+
var EMPTY_OBJ = {};
|
|
172
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
173
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
174
|
+
|
|
175
|
+
// src/utils/helpers.ts
|
|
176
|
+
var isDef = (v) => v != null;
|
|
184
177
|
var isComplexType = (o) => {
|
|
185
178
|
o = typeof o;
|
|
186
179
|
return o === "object" || o === "function";
|
|
@@ -392,40 +385,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
392
385
|
}
|
|
393
386
|
if (!appliedStyles.has(scopeId2)) {
|
|
394
387
|
{
|
|
395
|
-
styleElm =
|
|
388
|
+
styleElm = doc.createElement("style");
|
|
396
389
|
styleElm.innerHTML = style;
|
|
397
390
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
398
391
|
if (nonce != null) {
|
|
399
392
|
styleElm.setAttribute("nonce", nonce);
|
|
400
393
|
}
|
|
401
|
-
|
|
402
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
403
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
404
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
405
|
-
styleContainerNode.insertBefore(
|
|
406
|
-
styleElm,
|
|
407
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
408
|
-
);
|
|
409
|
-
} else if ("host" in styleContainerNode) {
|
|
410
|
-
if (supportsConstructableStylesheets) {
|
|
411
|
-
const stylesheet = new CSSStyleSheet();
|
|
412
|
-
stylesheet.replaceSync(style);
|
|
413
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
414
|
-
} else {
|
|
415
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
416
|
-
if (existingStyleContainer) {
|
|
417
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
418
|
-
} else {
|
|
419
|
-
styleContainerNode.prepend(styleElm);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
} else {
|
|
423
|
-
styleContainerNode.append(styleElm);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
427
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
428
|
-
}
|
|
394
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
429
395
|
}
|
|
430
396
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
431
397
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -448,25 +414,23 @@ var attachStyles = (hostRef) => {
|
|
|
448
414
|
const scopeId2 = addStyle(
|
|
449
415
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
450
416
|
cmpMeta);
|
|
451
|
-
if (
|
|
417
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
452
418
|
elm["s-sc"] = scopeId2;
|
|
453
419
|
elm.classList.add(scopeId2 + "-h");
|
|
454
420
|
}
|
|
455
421
|
endAttachStyles();
|
|
456
422
|
};
|
|
457
423
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
458
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
424
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
459
425
|
if (oldValue !== newValue) {
|
|
460
426
|
let isProp = isMemberInElement(elm, memberName);
|
|
461
427
|
let ln = memberName.toLowerCase();
|
|
462
428
|
if (memberName === "class") {
|
|
463
429
|
const classList = elm.classList;
|
|
464
430
|
const oldClasses = parseClassList(oldValue);
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
469
|
-
}
|
|
431
|
+
const newClasses = parseClassList(newValue);
|
|
432
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
433
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
470
434
|
} else if (memberName === "style") {
|
|
471
435
|
{
|
|
472
436
|
for (const prop in oldValue) {
|
|
@@ -519,13 +483,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
519
483
|
if (memberName === "list") {
|
|
520
484
|
isProp = false;
|
|
521
485
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
522
|
-
|
|
523
|
-
elm[memberName] = n;
|
|
524
|
-
} else {
|
|
525
|
-
elm.setAttribute(memberName, n);
|
|
526
|
-
}
|
|
486
|
+
elm[memberName] = n;
|
|
527
487
|
}
|
|
528
|
-
} else
|
|
488
|
+
} else {
|
|
529
489
|
elm[memberName] = newValue;
|
|
530
490
|
}
|
|
531
491
|
} catch (e) {
|
|
@@ -547,44 +507,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
547
507
|
}
|
|
548
508
|
};
|
|
549
509
|
var parseClassListRegex = /\s/;
|
|
550
|
-
var parseClassList = (value) =>
|
|
551
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
552
|
-
value = value.baseVal;
|
|
553
|
-
}
|
|
554
|
-
if (!value || typeof value !== "string") {
|
|
555
|
-
return [];
|
|
556
|
-
}
|
|
557
|
-
return value.split(parseClassListRegex);
|
|
558
|
-
};
|
|
510
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
559
511
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
560
512
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
561
513
|
|
|
562
514
|
// src/runtime/vdom/update-element.ts
|
|
563
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
515
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
564
516
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
565
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
566
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
517
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
518
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
567
519
|
{
|
|
568
520
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
569
521
|
if (!(memberName in newVnodeAttrs)) {
|
|
570
|
-
setAccessor(
|
|
571
|
-
elm,
|
|
572
|
-
memberName,
|
|
573
|
-
oldVnodeAttrs[memberName],
|
|
574
|
-
void 0,
|
|
575
|
-
isSvgMode2,
|
|
576
|
-
newVnode.$flags$);
|
|
522
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
577
523
|
}
|
|
578
524
|
}
|
|
579
525
|
}
|
|
580
526
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
581
|
-
setAccessor(
|
|
582
|
-
elm,
|
|
583
|
-
memberName,
|
|
584
|
-
oldVnodeAttrs[memberName],
|
|
585
|
-
newVnodeAttrs[memberName],
|
|
586
|
-
isSvgMode2,
|
|
587
|
-
newVnode.$flags$);
|
|
527
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
588
528
|
}
|
|
589
529
|
};
|
|
590
530
|
function sortedAttrNames(attrNames) {
|
|
@@ -596,10 +536,13 @@ function sortedAttrNames(attrNames) {
|
|
|
596
536
|
attrNames
|
|
597
537
|
);
|
|
598
538
|
}
|
|
539
|
+
|
|
540
|
+
// src/runtime/vdom/vdom-render.ts
|
|
541
|
+
var scopeId;
|
|
599
542
|
var hostTagName;
|
|
600
543
|
var useNativeShadowDom = false;
|
|
601
544
|
var isSvgMode = false;
|
|
602
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
545
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
603
546
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
604
547
|
let i2 = 0;
|
|
605
548
|
let elm;
|
|
@@ -620,6 +563,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
620
563
|
{
|
|
621
564
|
updateElement(null, newVNode2, isSvgMode);
|
|
622
565
|
}
|
|
566
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
567
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
568
|
+
}
|
|
623
569
|
if (newVNode2.$children$) {
|
|
624
570
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
625
571
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -731,9 +677,6 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
731
677
|
};
|
|
732
678
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
733
679
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
734
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
735
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
736
|
-
}
|
|
737
680
|
return true;
|
|
738
681
|
}
|
|
739
682
|
return false;
|
|
@@ -760,10 +703,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
760
703
|
elm.textContent = "";
|
|
761
704
|
}
|
|
762
705
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
763
|
-
} else if (
|
|
764
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
765
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
766
|
-
) {
|
|
706
|
+
} else if (oldChildren !== null) {
|
|
767
707
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
768
708
|
}
|
|
769
709
|
if (isSvgMode && tag === "svg") {
|
|
@@ -780,9 +720,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
780
720
|
}
|
|
781
721
|
};
|
|
782
722
|
var insertBefore = (parent, newNode, reference) => {
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
723
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
724
|
+
return inserted;
|
|
786
725
|
};
|
|
787
726
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
788
727
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -807,21 +746,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
807
746
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
808
747
|
hostRef.$vnode$ = rootVnode;
|
|
809
748
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
810
|
-
|
|
749
|
+
{
|
|
750
|
+
scopeId = hostElm["s-sc"];
|
|
751
|
+
}
|
|
752
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
811
753
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
812
754
|
};
|
|
813
755
|
|
|
814
756
|
// src/runtime/update-component.ts
|
|
815
757
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
816
758
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
817
|
-
|
|
818
|
-
new Promise(
|
|
819
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
820
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
821
|
-
r();
|
|
822
|
-
}
|
|
823
|
-
)
|
|
824
|
-
);
|
|
759
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
825
760
|
}
|
|
826
761
|
};
|
|
827
762
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -850,12 +785,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
850
785
|
{
|
|
851
786
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
852
787
|
if (hostRef.$queuedListeners$) {
|
|
853
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
788
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
854
789
|
hostRef.$queuedListeners$ = void 0;
|
|
855
790
|
}
|
|
856
791
|
}
|
|
857
792
|
{
|
|
858
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
793
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
859
794
|
}
|
|
860
795
|
}
|
|
861
796
|
endSchedule();
|
|
@@ -929,7 +864,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
929
864
|
addHydratedFlag(elm);
|
|
930
865
|
}
|
|
931
866
|
{
|
|
932
|
-
safeCall(instance, "componentDidLoad"
|
|
867
|
+
safeCall(instance, "componentDidLoad");
|
|
933
868
|
}
|
|
934
869
|
endPostUpdate();
|
|
935
870
|
{
|
|
@@ -953,14 +888,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
953
888
|
}
|
|
954
889
|
};
|
|
955
890
|
var appDidLoad = (who) => {
|
|
891
|
+
{
|
|
892
|
+
addHydratedFlag(doc.documentElement);
|
|
893
|
+
}
|
|
956
894
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
957
895
|
};
|
|
958
|
-
var safeCall = (instance, method, arg
|
|
896
|
+
var safeCall = (instance, method, arg) => {
|
|
959
897
|
if (instance && instance[method]) {
|
|
960
898
|
try {
|
|
961
899
|
return instance[method](arg);
|
|
962
900
|
} catch (e) {
|
|
963
|
-
consoleError(e
|
|
901
|
+
consoleError(e);
|
|
964
902
|
}
|
|
965
903
|
}
|
|
966
904
|
return void 0;
|
|
@@ -1019,68 +957,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1019
957
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1020
958
|
members.map(([memberName, [memberFlags]]) => {
|
|
1021
959
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1022
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1023
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1024
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1025
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1026
|
-
Object.defineProperty(prototype, memberName, {
|
|
1027
|
-
get() {
|
|
1028
|
-
{
|
|
1029
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1030
|
-
return getValue(this, memberName);
|
|
1031
|
-
}
|
|
1032
|
-
const ref = getHostRef(this);
|
|
1033
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1034
|
-
if (!instance) return;
|
|
1035
|
-
return instance[memberName];
|
|
1036
|
-
}
|
|
1037
|
-
},
|
|
1038
|
-
configurable: true,
|
|
1039
|
-
enumerable: true
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
960
|
Object.defineProperty(prototype, memberName, {
|
|
961
|
+
get() {
|
|
962
|
+
return getValue(this, memberName);
|
|
963
|
+
},
|
|
1043
964
|
set(newValue) {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1049
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1050
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1051
|
-
}
|
|
1052
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1053
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1054
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1055
|
-
return;
|
|
1056
|
-
}
|
|
1057
|
-
{
|
|
1058
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1059
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1060
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1061
|
-
ref.$onReadyPromise$.then(() => {
|
|
1062
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1063
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1064
|
-
}
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
return;
|
|
1068
|
-
}
|
|
1069
|
-
const setterSetVal = () => {
|
|
1070
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1071
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1072
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1073
|
-
}
|
|
1074
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1075
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1076
|
-
};
|
|
1077
|
-
if (ref.$lazyInstance$) {
|
|
1078
|
-
setterSetVal();
|
|
1079
|
-
} else {
|
|
1080
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
965
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
966
|
+
},
|
|
967
|
+
configurable: true,
|
|
968
|
+
enumerable: true
|
|
1084
969
|
});
|
|
1085
970
|
}
|
|
1086
971
|
});
|
|
@@ -1090,11 +975,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1090
975
|
plt.jmp(() => {
|
|
1091
976
|
var _a2;
|
|
1092
977
|
const propName = attrNameToPropName.get(attrName);
|
|
1093
|
-
if (this.hasOwnProperty(propName)
|
|
978
|
+
if (this.hasOwnProperty(propName)) {
|
|
1094
979
|
newValue = this[propName];
|
|
1095
980
|
delete this[propName];
|
|
1096
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1097
|
-
this[propName] == newValue) {
|
|
981
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1098
982
|
return;
|
|
1099
983
|
} else if (propName == null) {
|
|
1100
984
|
const hostRef = getHostRef(this);
|
|
@@ -1110,11 +994,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1110
994
|
}
|
|
1111
995
|
return;
|
|
1112
996
|
}
|
|
1113
|
-
|
|
1114
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1115
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1116
|
-
this[propName] = newValue;
|
|
1117
|
-
}
|
|
997
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1118
998
|
});
|
|
1119
999
|
};
|
|
1120
1000
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1143,7 +1023,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1143
1023
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1144
1024
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1145
1025
|
if (bundleId) {
|
|
1146
|
-
const CstrImport = loadModule(cmpMeta
|
|
1026
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1147
1027
|
if (CstrImport && "then" in CstrImport) {
|
|
1148
1028
|
const endLoad = uniqueTime();
|
|
1149
1029
|
Cstr = await CstrImport;
|
|
@@ -1168,7 +1048,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1168
1048
|
try {
|
|
1169
1049
|
new Cstr(hostRef);
|
|
1170
1050
|
} catch (e) {
|
|
1171
|
-
consoleError(e
|
|
1051
|
+
consoleError(e);
|
|
1172
1052
|
}
|
|
1173
1053
|
{
|
|
1174
1054
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1203,7 +1083,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1203
1083
|
schedule();
|
|
1204
1084
|
}
|
|
1205
1085
|
};
|
|
1206
|
-
var fireConnectedCallback = (instance
|
|
1086
|
+
var fireConnectedCallback = (instance) => {
|
|
1207
1087
|
};
|
|
1208
1088
|
|
|
1209
1089
|
// src/runtime/connected-callback.ts
|
|
@@ -1244,9 +1124,9 @@ var connectedCallback = (elm) => {
|
|
|
1244
1124
|
endConnected();
|
|
1245
1125
|
}
|
|
1246
1126
|
};
|
|
1247
|
-
var disconnectInstance = (instance
|
|
1127
|
+
var disconnectInstance = (instance) => {
|
|
1248
1128
|
{
|
|
1249
|
-
safeCall(instance, "disconnectedCallback"
|
|
1129
|
+
safeCall(instance, "disconnectedCallback");
|
|
1250
1130
|
}
|
|
1251
1131
|
};
|
|
1252
1132
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1259,17 +1139,11 @@ var disconnectedCallback = async (elm) => {
|
|
|
1259
1139
|
}
|
|
1260
1140
|
}
|
|
1261
1141
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1262
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1142
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1263
1143
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1264
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1144
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1265
1145
|
}
|
|
1266
1146
|
}
|
|
1267
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1268
|
-
rootAppliedStyles.delete(elm);
|
|
1269
|
-
}
|
|
1270
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1271
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1272
|
-
}
|
|
1273
1147
|
};
|
|
1274
1148
|
|
|
1275
1149
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1354,17 +1228,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1354
1228
|
}
|
|
1355
1229
|
disconnectedCallback() {
|
|
1356
1230
|
plt.jmp(() => disconnectedCallback(this));
|
|
1357
|
-
plt.raf(() => {
|
|
1358
|
-
var _a3;
|
|
1359
|
-
const hostRef = getHostRef(this);
|
|
1360
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1361
|
-
if (i2 > -1) {
|
|
1362
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1363
|
-
}
|
|
1364
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1365
|
-
delete hostRef.$vnode$.$elm$;
|
|
1366
|
-
}
|
|
1367
|
-
});
|
|
1368
1231
|
}
|
|
1369
1232
|
componentOnReady() {
|
|
1370
1233
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1428,7 +1291,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1428
1291
|
}
|
|
1429
1292
|
}
|
|
1430
1293
|
} catch (e) {
|
|
1431
|
-
consoleError(e
|
|
1294
|
+
consoleError(e);
|
|
1432
1295
|
}
|
|
1433
1296
|
};
|
|
1434
1297
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const generalStories = require('./general-stories-
|
|
6
|
-
require('./index-
|
|
5
|
+
const generalStories = require('./general-stories-bbb81cca.js');
|
|
6
|
+
require('./index-5b8c1770.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5b8c1770.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|