@public-ui/hydrate 1.7.0-rc.2 → 1.7.0-rc.4
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/index.js +97 -87
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
/*!
|
|
9
|
-
Stencil Mock Doc v4.
|
|
9
|
+
Stencil Mock Doc v4.2.0 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
const CONTENT_REF_ID = 'r';
|
|
12
12
|
const ORG_LOCATION_ID = 'o';
|
|
@@ -4953,7 +4953,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
4953
4953
|
|
|
4954
4954
|
|
|
4955
4955
|
const NAMESPACE = 'kolibri';
|
|
4956
|
-
const BUILD = /* kolibri */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
4956
|
+
const BUILD = /* kolibri */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, patchPseudoShadowDom: false, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
4957
4957
|
|
|
4958
4958
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4959
4959
|
|
|
@@ -7221,12 +7221,14 @@ class I18n extends EventEmitter {
|
|
|
7221
7221
|
const usedLng = typeof language === 'string' ? language : this.language;
|
|
7222
7222
|
if (typeof language === 'function') usedCallback = language;
|
|
7223
7223
|
if (!this.options.resources || this.options.partialBundledLanguages) {
|
|
7224
|
-
if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();
|
|
7224
|
+
if (usedLng && usedLng.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
|
|
7225
7225
|
const toLoad = [];
|
|
7226
7226
|
const append = lng => {
|
|
7227
7227
|
if (!lng) return;
|
|
7228
|
+
if (lng === 'cimode') return;
|
|
7228
7229
|
const lngs = this.services.languageUtils.toResolveHierarchy(lng);
|
|
7229
7230
|
lngs.forEach(l => {
|
|
7231
|
+
if (l === 'cimode') return;
|
|
7230
7232
|
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
7231
7233
|
});
|
|
7232
7234
|
};
|
|
@@ -7807,7 +7809,7 @@ const initKoliBri = () => {
|
|
|
7807
7809
|
| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.
|
|
7808
7810
|
| |\\ \\ | '-' | | | | | | '--' / | | | |
|
|
7809
7811
|
\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'
|
|
7810
|
-
🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 1.7.0-rc.
|
|
7812
|
+
🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 1.7.0-rc.4
|
|
7811
7813
|
`, {
|
|
7812
7814
|
forceLog: true,
|
|
7813
7815
|
});
|
|
@@ -7877,8 +7879,8 @@ function forceUpdate() {}
|
|
|
7877
7879
|
|
|
7878
7880
|
function hydrateApp(e, t, o, n, s) {
|
|
7879
7881
|
function l() {
|
|
7880
|
-
if (global.clearTimeout(p), i.clear(), r.clear(), !
|
|
7881
|
-
|
|
7882
|
+
if (global.clearTimeout(p), i.clear(), r.clear(), !h) {
|
|
7883
|
+
h = !0;
|
|
7882
7884
|
try {
|
|
7883
7885
|
t.clientHydrateAnnotations && insertVdomAnnotations(e.document, t.staticComponents),
|
|
7884
7886
|
e.dispatchEvent(new e.Event("DOMContentLoaded")), e.document.createElement = c,
|
|
@@ -7893,9 +7895,9 @@ function hydrateApp(e, t, o, n, s) {
|
|
|
7893
7895
|
renderCatchError(t, o, e), l();
|
|
7894
7896
|
}
|
|
7895
7897
|
const r = new Set, i = new Set, d = new Set, c = e.document.createElement, $ = e.document.createElementNS, m = Promise.resolve();
|
|
7896
|
-
let p,
|
|
7898
|
+
let p, h = !1;
|
|
7897
7899
|
try {
|
|
7898
|
-
function
|
|
7900
|
+
function u() {
|
|
7899
7901
|
return g(this);
|
|
7900
7902
|
}
|
|
7901
7903
|
function f(e) {
|
|
@@ -7904,7 +7906,7 @@ function hydrateApp(e, t, o, n, s) {
|
|
|
7904
7906
|
$tagName$: e.nodeName.toLowerCase(),
|
|
7905
7907
|
$flags$: null
|
|
7906
7908
|
});
|
|
7907
|
-
null != t && null != t.cmpMeta && (i.add(e), e.connectedCallback =
|
|
7909
|
+
null != t && null != t.cmpMeta && (i.add(e), e.connectedCallback = u, registerHost(e, t.cmpMeta),
|
|
7908
7910
|
function o(e, t) {
|
|
7909
7911
|
if ("function" != typeof e.componentOnReady && (e.componentOnReady = componentOnReady),
|
|
7910
7912
|
"function" != typeof e.forceUpdate && (e.forceUpdate = forceUpdate), 1 & t.$flags$ && (e.shadowRoot = e),
|
|
@@ -8254,17 +8256,17 @@ const createElm = (e, t, o, n) => {
|
|
|
8254
8256
|
null !== a ? (r = o["s-cr"]) ? r.parentNode.textContent = a : e.$text$ !== a && (o.data = a) : ((isSvgMode = "svg" === l || "foreignObject" !== l && isSvgMode),
|
|
8255
8257
|
("slot" === l || updateElement(e, t, isSvgMode)),
|
|
8256
8258
|
null !== n && null !== s ? ((e, t, o, n) => {
|
|
8257
|
-
let s, l, a = 0, r = 0, i = 0, d = 0, c = t.length - 1, $ = t[0], m = t[c], p = n.length - 1,
|
|
8258
|
-
for (;a <= c && r <= p; ) if (null == $) $ = t[++a]; else if (null == m) m = t[--c]; else if (null ==
|
|
8259
|
-
$ = t[++a],
|
|
8260
|
-
patch($,
|
|
8261
|
-
patch(m,
|
|
8262
|
-
if (i = -1, BUILD.vdomKey) for (d = a; d <= c; ++d) if (t[d] && null !== t[d].$key$ && t[d].$key$ ===
|
|
8259
|
+
let s, l, a = 0, r = 0, i = 0, d = 0, c = t.length - 1, $ = t[0], m = t[c], p = n.length - 1, h = n[0], u = n[p];
|
|
8260
|
+
for (;a <= c && r <= p; ) if (null == $) $ = t[++a]; else if (null == m) m = t[--c]; else if (null == h) h = n[++r]; else if (null == u) u = n[--p]; else if (isSameVnode($, h)) patch($, h),
|
|
8261
|
+
$ = t[++a], h = n[++r]; else if (isSameVnode(m, u)) patch(m, u), m = t[--c], u = n[--p]; else if (isSameVnode($, u)) "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation($.$elm$.parentNode, !1),
|
|
8262
|
+
patch($, u), e.insertBefore($.$elm$, m.$elm$.nextSibling), $ = t[++a], u = n[--p]; else if (isSameVnode(m, h)) "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation(m.$elm$.parentNode, !1),
|
|
8263
|
+
patch(m, h), e.insertBefore(m.$elm$, $.$elm$), m = t[--c], h = n[++r]; else {
|
|
8264
|
+
if (i = -1, BUILD.vdomKey) for (d = a; d <= c; ++d) if (t[d] && null !== t[d].$key$ && t[d].$key$ === h.$key$) {
|
|
8263
8265
|
i = d;
|
|
8264
8266
|
break;
|
|
8265
8267
|
}
|
|
8266
|
-
i >= 0 ? (l = t[i], l.$tag$ !==
|
|
8267
|
-
t[i] = void 0, s = l.$elm$),
|
|
8268
|
+
i >= 0 ? (l = t[i], l.$tag$ !== h.$tag$ ? s = createElm(t && t[r], o, i, e) : (patch(l, h),
|
|
8269
|
+
t[i] = void 0, s = l.$elm$), h = n[++r]) : (s = createElm(t && t[r], o, r, e), h = n[++r]),
|
|
8268
8270
|
s && (parentReferenceNode($.$elm$).insertBefore(s, referenceNode($.$elm$)) );
|
|
8269
8271
|
}
|
|
8270
8272
|
a > c ? addVnodes(e, null == n[p + 1] ? null : n[p + 1].$elm$, o, n, r, p) : r > p && removeVnodes(t, a, c);
|
|
@@ -19178,13 +19180,11 @@ class KolSelect {
|
|
|
19178
19180
|
return (hAsync(Host, { class: { 'has-value': this.state._hasValue } }, hAsync("kol-input", { class: {
|
|
19179
19181
|
'hide-label': !!this.state._hideLabel,
|
|
19180
19182
|
select: true,
|
|
19181
|
-
}, _disabled: this.state._disabled, _error: this.state._error, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icon: this.state._icon, _id: this.state._id, _required: this.state._required, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); } }, hAsync("span", { slot: "label" }, hasExpertSlot ? hAsync("slot", null) : this.state._label), hAsync("div", { slot: "input" }, hAsync("select",
|
|
19183
|
+
}, _disabled: this.state._disabled, _error: this.state._error, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icon: this.state._icon, _id: this.state._id, _required: this.state._required, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); } }, hAsync("span", { slot: "label" }, hasExpertSlot ? hAsync("slot", null) : this.state._label), hAsync("div", { slot: "input" }, hAsync("select", { ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, multiple: this.state._multiple, name: this.state._name, required: this.state._required, size: this.state._rows, spellcheck: "false", style: {
|
|
19182
19184
|
height: this.state._height,
|
|
19183
|
-
}
|
|
19184
|
-
onClick: this.controller.onFacade.onClick,
|
|
19185
|
+
}, onClick: this.controller.onFacade.onClick,
|
|
19185
19186
|
onBlur: this.controller.onFacade.onBlur,
|
|
19186
|
-
onFocus: this.controller.onFacade.onFocus,
|
|
19187
|
-
}, { onChange: this.onChange }), this.state._options.map((option, index) => {
|
|
19187
|
+
onFocus: this.controller.onFacade.onFocus, onChange: this.onChange }, this.state._options.map((option, index) => {
|
|
19188
19188
|
const key = `-${index}`;
|
|
19189
19189
|
if (Array.isArray(option.options)) {
|
|
19190
19190
|
return this.renderOptgroup(option, key);
|
|
@@ -34066,9 +34066,9 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34066
34066
|
line: r,
|
|
34067
34067
|
column: s
|
|
34068
34068
|
};
|
|
34069
|
-
return t => (t.position = new
|
|
34070
|
-
},
|
|
34071
|
-
const i = e.split("\n"),
|
|
34069
|
+
return t => (t.position = new A(e), m(), t);
|
|
34070
|
+
}, l = o => {
|
|
34071
|
+
const i = e.split("\n"), l = {
|
|
34072
34072
|
level: "error",
|
|
34073
34073
|
type: "css",
|
|
34074
34074
|
language: "css",
|
|
@@ -34090,7 +34090,7 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34090
34090
|
errorCharStart: -1,
|
|
34091
34091
|
errorLength: -1
|
|
34092
34092
|
};
|
|
34093
|
-
|
|
34093
|
+
l.lines.unshift(t);
|
|
34094
34094
|
}
|
|
34095
34095
|
if (r + 2 < i.length) {
|
|
34096
34096
|
const e = {
|
|
@@ -34100,10 +34100,10 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34100
34100
|
errorCharStart: -1,
|
|
34101
34101
|
errorLength: -1
|
|
34102
34102
|
};
|
|
34103
|
-
|
|
34103
|
+
l.lines.push(e);
|
|
34104
34104
|
}
|
|
34105
|
-
return n.push(
|
|
34106
|
-
},
|
|
34105
|
+
return n.push(l), null;
|
|
34106
|
+
}, a = () => u(/^{\s*/), c = () => u(/^}/), u = t => {
|
|
34107
34107
|
const r = t.exec(e);
|
|
34108
34108
|
if (!r) return;
|
|
34109
34109
|
const s = r[0];
|
|
@@ -34111,7 +34111,7 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34111
34111
|
}, d = () => {
|
|
34112
34112
|
let t;
|
|
34113
34113
|
const r = [];
|
|
34114
|
-
for (m(), h(r); e.length && "}" !== e.charAt(0) && (t =
|
|
34114
|
+
for (m(), h(r); e.length && "}" !== e.charAt(0) && (t = T() || w()); ) r.push(t),
|
|
34115
34115
|
h(r);
|
|
34116
34116
|
return r;
|
|
34117
34117
|
}, m = () => u(/^\s*/), h = e => {
|
|
@@ -34123,7 +34123,7 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34123
34123
|
if ("/" !== e.charAt(0) || "*" !== e.charAt(1)) return null;
|
|
34124
34124
|
let r = 2;
|
|
34125
34125
|
for (;"" !== e.charAt(r) && ("*" !== e.charAt(r) || "/" !== e.charAt(r + 1)); ) ++r;
|
|
34126
|
-
if (r += 2, "" === e.charAt(r - 1)) return
|
|
34126
|
+
if (r += 2, "" === e.charAt(r - 1)) return l("End of comment missing");
|
|
34127
34127
|
const n = e.slice(2, r - 2);
|
|
34128
34128
|
return s += 2, o(n), e = e.slice(r), s += 2, t({
|
|
34129
34129
|
type: 1,
|
|
@@ -34140,7 +34140,7 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34140
34140
|
const e = i();
|
|
34141
34141
|
let t = u(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
|
|
34142
34142
|
if (!t) return null;
|
|
34143
|
-
if (t = trim(t[0]), !u(/^:\s*/)) return
|
|
34143
|
+
if (t = trim(t[0]), !u(/^:\s*/)) return l("property missing ':'");
|
|
34144
34144
|
const r = u(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/), s = e({
|
|
34145
34145
|
type: 4,
|
|
34146
34146
|
property: t.replace(commentre, ""),
|
|
@@ -34149,10 +34149,10 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34149
34149
|
return u(/^[;\s]*/), s;
|
|
34150
34150
|
}, y = () => {
|
|
34151
34151
|
const e = [];
|
|
34152
|
-
if (!
|
|
34152
|
+
if (!a()) return l("missing '{'");
|
|
34153
34153
|
let t;
|
|
34154
34154
|
for (h(e); t = g(); ) e.push(t), h(e);
|
|
34155
|
-
return c() ? e :
|
|
34155
|
+
return c() ? e : l("missing '}'");
|
|
34156
34156
|
}, C = () => {
|
|
34157
34157
|
let e;
|
|
34158
34158
|
const t = [], r = i();
|
|
@@ -34172,14 +34172,14 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34172
34172
|
};
|
|
34173
34173
|
return o[e] = n[1].trim(), s(o);
|
|
34174
34174
|
};
|
|
34175
|
-
}, E = S("import", 7), b = S("charset", 0),
|
|
34175
|
+
}, E = S("import", 7), b = S("charset", 0), v = S("namespace", 11), T = () => "@" !== e[0] ? null : (() => {
|
|
34176
34176
|
const e = i();
|
|
34177
34177
|
let t = u(/^@([-\w]+)?keyframes\s*/);
|
|
34178
34178
|
if (!t) return null;
|
|
34179
34179
|
const r = t[1];
|
|
34180
|
-
if (t = u(/^([-\w]+)\s*/), !t) return
|
|
34180
|
+
if (t = u(/^([-\w]+)\s*/), !t) return l("@keyframes missing name");
|
|
34181
34181
|
const s = t[1];
|
|
34182
|
-
if (!
|
|
34182
|
+
if (!a()) return l("@keyframes missing '{'");
|
|
34183
34183
|
let n, o = h();
|
|
34184
34184
|
for (;n = C(); ) o.push(n), o = o.concat(h());
|
|
34185
34185
|
return c() ? e({
|
|
@@ -34187,18 +34187,18 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34187
34187
|
name: s,
|
|
34188
34188
|
vendor: r,
|
|
34189
34189
|
keyframes: o
|
|
34190
|
-
}) :
|
|
34190
|
+
}) : l("@keyframes missing '}'");
|
|
34191
34191
|
})() || (() => {
|
|
34192
34192
|
const e = i(), t = u(/^@media *([^{]+)/);
|
|
34193
34193
|
if (!t) return null;
|
|
34194
34194
|
const r = trim(t[1]);
|
|
34195
|
-
if (!
|
|
34195
|
+
if (!a()) return l("@media missing '{'");
|
|
34196
34196
|
const s = h().concat(d());
|
|
34197
34197
|
return c() ? e({
|
|
34198
34198
|
type: 10,
|
|
34199
34199
|
media: r,
|
|
34200
34200
|
rules: s
|
|
34201
|
-
}) :
|
|
34201
|
+
}) : l("@media missing '}'");
|
|
34202
34202
|
})() || (() => {
|
|
34203
34203
|
const e = i(), t = u(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
|
|
34204
34204
|
return t ? e({
|
|
@@ -34210,65 +34210,65 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34210
34210
|
const e = i(), t = u(/^@supports *([^{]+)/);
|
|
34211
34211
|
if (!t) return null;
|
|
34212
34212
|
const r = trim(t[1]);
|
|
34213
|
-
if (!
|
|
34213
|
+
if (!a()) return l("@supports missing '{'");
|
|
34214
34214
|
const s = h().concat(d());
|
|
34215
34215
|
return c() ? e({
|
|
34216
34216
|
type: 15,
|
|
34217
34217
|
supports: r,
|
|
34218
34218
|
rules: s
|
|
34219
|
-
}) :
|
|
34220
|
-
})() || E() || b() ||
|
|
34219
|
+
}) : l("@supports missing '}'");
|
|
34220
|
+
})() || E() || b() || v() || (() => {
|
|
34221
34221
|
const e = i(), t = u(/^@([-\w]+)?document *([^{]+)/);
|
|
34222
34222
|
if (!t) return null;
|
|
34223
34223
|
const r = trim(t[1]), s = trim(t[2]);
|
|
34224
|
-
if (!
|
|
34224
|
+
if (!a()) return l("@document missing '{'");
|
|
34225
34225
|
const n = h().concat(d());
|
|
34226
34226
|
return c() ? e({
|
|
34227
34227
|
type: 3,
|
|
34228
34228
|
document: s,
|
|
34229
34229
|
vendor: r,
|
|
34230
34230
|
rules: n
|
|
34231
|
-
}) :
|
|
34231
|
+
}) : l("@document missing '}'");
|
|
34232
34232
|
})() || (() => {
|
|
34233
34233
|
const e = i();
|
|
34234
34234
|
if (!u(/^@page */)) return null;
|
|
34235
34235
|
const t = f() || [];
|
|
34236
|
-
if (!
|
|
34236
|
+
if (!a()) return l("@page missing '{'");
|
|
34237
34237
|
let r, s = h();
|
|
34238
34238
|
for (;r = g(); ) s.push(r), s = s.concat(h());
|
|
34239
34239
|
return c() ? e({
|
|
34240
34240
|
type: 12,
|
|
34241
34241
|
selectors: t,
|
|
34242
34242
|
declarations: s
|
|
34243
|
-
}) :
|
|
34243
|
+
}) : l("@page missing '}'");
|
|
34244
34244
|
})() || (() => {
|
|
34245
34245
|
const e = i();
|
|
34246
34246
|
if (!u(/^@host\s*/)) return null;
|
|
34247
|
-
if (!
|
|
34247
|
+
if (!a()) return l("@host missing '{'");
|
|
34248
34248
|
const t = h().concat(d());
|
|
34249
34249
|
return c() ? e({
|
|
34250
34250
|
type: 6,
|
|
34251
34251
|
rules: t
|
|
34252
|
-
}) :
|
|
34252
|
+
}) : l("@host missing '}'");
|
|
34253
34253
|
})() || (() => {
|
|
34254
34254
|
const e = i();
|
|
34255
34255
|
if (!u(/^@font-face\s*/)) return null;
|
|
34256
|
-
if (!
|
|
34256
|
+
if (!a()) return l("@font-face missing '{'");
|
|
34257
34257
|
let t, r = h();
|
|
34258
34258
|
for (;t = g(); ) r.push(t), r = r.concat(h());
|
|
34259
34259
|
return c() ? e({
|
|
34260
34260
|
type: 5,
|
|
34261
34261
|
declarations: r
|
|
34262
|
-
}) :
|
|
34263
|
-
})(),
|
|
34262
|
+
}) : l("@font-face missing '}'");
|
|
34263
|
+
})(), w = () => {
|
|
34264
34264
|
const e = i(), t = f();
|
|
34265
34265
|
return t ? (h(), e({
|
|
34266
34266
|
type: 13,
|
|
34267
34267
|
selectors: t,
|
|
34268
34268
|
declarations: y()
|
|
34269
|
-
})) :
|
|
34269
|
+
})) : l("selector missing");
|
|
34270
34270
|
};
|
|
34271
|
-
class
|
|
34271
|
+
class A {
|
|
34272
34272
|
constructor(e) {
|
|
34273
34273
|
this.start = e, this.end = {
|
|
34274
34274
|
line: r,
|
|
@@ -34276,7 +34276,7 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34276
34276
|
}, this.source = t;
|
|
34277
34277
|
}
|
|
34278
34278
|
}
|
|
34279
|
-
return
|
|
34279
|
+
return A.prototype.content = e, {
|
|
34280
34280
|
diagnostics: n,
|
|
34281
34281
|
...addParent((() => {
|
|
34282
34282
|
const e = d();
|
|
@@ -34317,54 +34317,62 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34317
34317
|
ids: [],
|
|
34318
34318
|
attrs: []
|
|
34319
34319
|
}, serializeCssVisitNode = (e, t, r, s) => {
|
|
34320
|
-
|
|
34321
|
-
|
|
34320
|
+
var n;
|
|
34321
|
+
const o = t.type;
|
|
34322
|
+
return 4 === o ? serializeCssDeclaration(t, r, s) : 13 === o ? serializeCssRule(e, t) : 1 === o ? "!" === (null === (n = t.comment) || void 0 === n ? void 0 : n[0]) ? `/*${t.comment}*/` : "" : 10 === o ? serializeCssMedia(e, t) : 8 === o ? serializeCssKeyframes(e, t) : 9 === o ? serializeCssKeyframe(e, t) : 5 === o ? serializeCssFontFace(e, t) : 15 === o ? serializeCssSupports(e, t) : 7 === o ? "@import " + t.import + ";" : 0 === o ? "@charset " + t.charset + ";" : 12 === o ? serializeCssPage(e, t) : 6 === o ? "@host{" + serializeCssMapVisit(e, t.rules) + "}" : 2 === o ? "@custom-media " + t.name + " " + t.media + ";" : 3 === o ? serializeCssDocument(e, t) : 11 === o ? "@namespace " + t.namespace + ";" : "";
|
|
34322
34323
|
}, serializeCssRule = (e, t) => {
|
|
34323
|
-
|
|
34324
|
-
|
|
34325
|
-
if (
|
|
34326
|
-
|
|
34327
|
-
|
|
34328
|
-
|
|
34329
|
-
|
|
34330
|
-
|
|
34331
|
-
|
|
34332
|
-
|
|
34324
|
+
var r, s;
|
|
34325
|
+
const n = t.declarations, o = e.usedSelectors, i = null !== (s = null === (r = t.selectors) || void 0 === r ? void 0 : r.slice()) && void 0 !== s ? s : [];
|
|
34326
|
+
if (null == n || 0 === n.length) return "";
|
|
34327
|
+
if (o) {
|
|
34328
|
+
let t, r, s = !0;
|
|
34329
|
+
for (t = i.length - 1; t >= 0; t--) {
|
|
34330
|
+
const n = getCssSelectors(i[t]);
|
|
34331
|
+
s = !0;
|
|
34332
|
+
let l = n.classNames.length;
|
|
34333
|
+
if (l > 0 && e.hasUsedClassNames) for (r = 0; r < l; r++) if (!o.classNames.has(n.classNames[r])) {
|
|
34334
|
+
s = !1;
|
|
34333
34335
|
break;
|
|
34334
34336
|
}
|
|
34335
|
-
if (
|
|
34336
|
-
|
|
34337
|
+
if (s && e.hasUsedTags && (l = n.tags.length, l > 0)) for (r = 0; r < l; r++) if (!o.tags.has(n.tags[r])) {
|
|
34338
|
+
s = !1;
|
|
34337
34339
|
break;
|
|
34338
34340
|
}
|
|
34339
|
-
if (
|
|
34340
|
-
|
|
34341
|
+
if (s && e.hasUsedAttrs && (l = n.attrs.length, l > 0)) for (r = 0; r < l; r++) if (!o.attrs.has(n.attrs[r])) {
|
|
34342
|
+
s = !1;
|
|
34341
34343
|
break;
|
|
34342
34344
|
}
|
|
34343
|
-
if (
|
|
34344
|
-
|
|
34345
|
+
if (s && e.hasUsedIds && (l = n.ids.length, l > 0)) for (r = 0; r < l; r++) if (!o.ids.has(n.ids[r])) {
|
|
34346
|
+
s = !1;
|
|
34345
34347
|
break;
|
|
34346
34348
|
}
|
|
34347
|
-
|
|
34349
|
+
s || i.splice(t, 1);
|
|
34348
34350
|
}
|
|
34349
34351
|
}
|
|
34350
|
-
if (0 ===
|
|
34351
|
-
const
|
|
34352
|
-
let
|
|
34353
|
-
for (const e of t.selectors)
|
|
34354
|
-
return `${
|
|
34352
|
+
if (0 === i.length) return "";
|
|
34353
|
+
const l = [];
|
|
34354
|
+
let a = "";
|
|
34355
|
+
if (t.selectors) for (const e of t.selectors) a = removeSelectorWhitespace(e), l.includes(a) || l.push(a);
|
|
34356
|
+
return `${l}{${serializeCssMapVisit(e, n)}}`;
|
|
34355
34357
|
}, serializeCssDeclaration = (e, t, r) => "" === e.value ? "" : r - 1 === t ? e.property + ":" + e.value : e.property + ":" + e.value + ";", serializeCssMedia = (e, t) => {
|
|
34356
34358
|
const r = serializeCssMapVisit(e, t.rules);
|
|
34357
34359
|
return "" === r ? "" : "@media " + removeMediaWhitespace(t.media) + "{" + r + "}";
|
|
34358
34360
|
}, serializeCssKeyframes = (e, t) => {
|
|
34359
34361
|
const r = serializeCssMapVisit(e, t.keyframes);
|
|
34360
34362
|
return "" === r ? "" : "@" + (t.vendor || "") + "keyframes " + t.name + "{" + r + "}";
|
|
34361
|
-
}, serializeCssKeyframe = (e, t) =>
|
|
34363
|
+
}, serializeCssKeyframe = (e, t) => {
|
|
34364
|
+
var r, s;
|
|
34365
|
+
return (null !== (s = null === (r = t.values) || void 0 === r ? void 0 : r.join(",")) && void 0 !== s ? s : "") + "{" + serializeCssMapVisit(e, t.declarations) + "}";
|
|
34366
|
+
}, serializeCssFontFace = (e, t) => {
|
|
34362
34367
|
const r = serializeCssMapVisit(e, t.declarations);
|
|
34363
34368
|
return "" === r ? "" : "@font-face{" + r + "}";
|
|
34364
34369
|
}, serializeCssSupports = (e, t) => {
|
|
34365
34370
|
const r = serializeCssMapVisit(e, t.rules);
|
|
34366
34371
|
return "" === r ? "" : "@supports " + t.supports + "{" + r + "}";
|
|
34367
|
-
}, serializeCssPage = (e, t) =>
|
|
34372
|
+
}, serializeCssPage = (e, t) => {
|
|
34373
|
+
var r, s;
|
|
34374
|
+
return "@page " + (null !== (s = null === (r = t.selectors) || void 0 === r ? void 0 : r.join(", ")) && void 0 !== s ? s : "") + "{" + serializeCssMapVisit(e, t.declarations) + "}";
|
|
34375
|
+
}, serializeCssDocument = (e, t) => {
|
|
34368
34376
|
const r = serializeCssMapVisit(e, t.rules), s = "@" + (t.vendor || "") + "document " + t.document;
|
|
34369
34377
|
return "" === r ? "" : s + "{" + r + "}";
|
|
34370
34378
|
}, serializeCssMapVisit = (e, t) => {
|
|
@@ -34381,12 +34389,14 @@ const templateWindows = new Map, isPromise = e => !!e && ("object" == typeof e |
|
|
|
34381
34389
|
} else t += r;
|
|
34382
34390
|
return t;
|
|
34383
34391
|
}, removeMediaWhitespace = e => {
|
|
34384
|
-
|
|
34385
|
-
|
|
34386
|
-
|
|
34387
|
-
|
|
34388
|
-
|
|
34389
|
-
|
|
34392
|
+
var t;
|
|
34393
|
+
let r = "", s = "";
|
|
34394
|
+
for (let n = 0, o = (e = null !== (t = null == e ? void 0 : e.trim()) && void 0 !== t ? t : "").length; n < o; n++) if (s = e[n],
|
|
34395
|
+
CSS_WS_REG.test(s)) {
|
|
34396
|
+
if (CSS_WS_REG.test(r[r.length - 1])) continue;
|
|
34397
|
+
r += " ";
|
|
34398
|
+
} else r += s;
|
|
34399
|
+
return r;
|
|
34390
34400
|
}, CSS_WS_REG = /\s/, CSS_NEXT_CHAR_REG = /[>\(\)\~\,\+\s]/, CSS_PREV_CHAR_REG = /[>\(\~\,\+]/, collectUsedSelectors = (e, t) => {
|
|
34391
34401
|
if (null != t && 1 === t.nodeType) {
|
|
34392
34402
|
const r = t.children, s = t.nodeName.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/hydrate",
|
|
3
|
-
"version": "1.7.0-rc.
|
|
3
|
+
"version": "1.7.0-rc.4",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": "https://github.com/public-ui/kolibri",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"prepack": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@public-ui/components": "1.7.0-rc.
|
|
49
|
+
"@public-ui/components": "1.7.0-rc.4",
|
|
50
50
|
"rimraf": "3.0.2"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@public-ui/components": "1.7.0-rc.
|
|
53
|
+
"@public-ui/components": "1.7.0-rc.4"
|
|
54
54
|
},
|
|
55
55
|
"sideEffects": false,
|
|
56
56
|
"type": "commonjs",
|