proto-ikons-wc 0.0.83 → 0.0.84
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/acura-ikon_119.cjs.entry.js +1 -1
- package/dist/cjs/{index-5d62eace.js → index-5d33f0ae.js} +32 -0
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/proto-ikons-wc.cjs.js +6 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +1 -1
- package/dist/esm/acura-ikon_119.entry.js +1 -1
- package/dist/esm/{index-33e47d42.js → index-c27f5881.js} +32 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/proto-ikons-wc.js +3 -2
- package/dist/proto-ikons-wc/{p-639fbfc6.entry.js → p-83fbc649.entry.js} +1 -1
- package/dist/proto-ikons-wc/p-f7e8a1cb.js +2 -0
- package/dist/proto-ikons-wc/proto-ikons-wc.esm.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +9 -0
- package/loader/index.d.ts +9 -0
- package/package.json +2 -2
- package/dist/proto-ikons-wc/p-c6323a0a.js +0 -2
|
@@ -66,6 +66,18 @@ const isComplexType = (o) => {
|
|
|
66
66
|
o = typeof o;
|
|
67
67
|
return o === 'object' || o === 'function';
|
|
68
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
71
|
+
* out of a DOM's head.
|
|
72
|
+
*
|
|
73
|
+
* @param doc The DOM containing the `head` to query against
|
|
74
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
75
|
+
* exists or the tag has no content.
|
|
76
|
+
*/
|
|
77
|
+
function queryNonceMetaTagContent(doc) {
|
|
78
|
+
var _a, _b, _c;
|
|
79
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
80
|
+
}
|
|
69
81
|
/**
|
|
70
82
|
* Production h() function based on Preact by
|
|
71
83
|
* Jason Miller (@developit)
|
|
@@ -216,6 +228,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
216
228
|
styles.set(scopeId, style);
|
|
217
229
|
};
|
|
218
230
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
231
|
+
var _a;
|
|
219
232
|
let scopeId = getScopeId(cmpMeta);
|
|
220
233
|
const style = styles.get(scopeId);
|
|
221
234
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -235,6 +248,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
235
248
|
styleElm = doc.createElement('style');
|
|
236
249
|
styleElm.innerHTML = style;
|
|
237
250
|
}
|
|
251
|
+
// Apply CSP nonce to the style tag if it exists
|
|
252
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
253
|
+
if (nonce != null) {
|
|
254
|
+
styleElm.setAttribute('nonce', nonce);
|
|
255
|
+
}
|
|
238
256
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
239
257
|
}
|
|
240
258
|
if (appliedStyles) {
|
|
@@ -1078,6 +1096,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1078
1096
|
}
|
|
1079
1097
|
};
|
|
1080
1098
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1099
|
+
var _a;
|
|
1081
1100
|
const endBootstrap = createTime();
|
|
1082
1101
|
const cmpTags = [];
|
|
1083
1102
|
const exclude = options.exclude || [];
|
|
@@ -1140,6 +1159,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1140
1159
|
{
|
|
1141
1160
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1142
1161
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1162
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1163
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1164
|
+
if (nonce != null) {
|
|
1165
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1166
|
+
}
|
|
1143
1167
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1144
1168
|
}
|
|
1145
1169
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1155,6 +1179,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1155
1179
|
// Fallback appLoad event
|
|
1156
1180
|
endBootstrap();
|
|
1157
1181
|
};
|
|
1182
|
+
/**
|
|
1183
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1184
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1185
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1186
|
+
* @returns void
|
|
1187
|
+
*/
|
|
1188
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1158
1189
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1159
1190
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1160
1191
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1265,3 +1296,4 @@ exports.bootstrapLazy = bootstrapLazy;
|
|
|
1265
1296
|
exports.h = h;
|
|
1266
1297
|
exports.promiseResolve = promiseResolve;
|
|
1267
1298
|
exports.registerInstance = registerInstance;
|
|
1299
|
+
exports.setNonce = setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5d33f0ae.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -18,4 +18,5 @@ const defineCustomElements = (win, options) => {
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
exports.setNonce = index.setNonce;
|
|
21
22
|
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-5d33f0ae.js');
|
|
4
6
|
|
|
5
7
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
8
|
+
Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
7
9
|
*/
|
|
8
10
|
const patchBrowser = () => {
|
|
9
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-ikons-wc.cjs.js', document.baseURI).href));
|
|
@@ -17,3 +19,5 @@ const patchBrowser = () => {
|
|
|
17
19
|
patchBrowser().then(options => {
|
|
18
20
|
return index.bootstrapLazy([["acura-ikon_119.cjs",[[0,"acura-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"alfa-romeo-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"alfa-romeo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"alien-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"am-general-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"asterisk-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"aston-martin-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"aston-martin-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"audi-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"barcode-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"barcode-scan-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"bash-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"beaker-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"bently-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"bmw-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"bugatti-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"buick-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"cadillac-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"chart-bar-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chart-bubble-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chart-donut-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chart-donuts-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"check-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chevrolet-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"chevron-double-left-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"chrysler-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"circular-saw-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"citroen-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"close-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"daewoo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"dodge-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"eagle-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"ferrari-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"fiat-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"fiat-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"fingerprint-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"fire-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"fisker-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"flask-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"ford-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"genesis-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"geo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"git-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"gmc-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"honda-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"hummer-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"hyundai-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"infiniti-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"isuzu-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"jaguar-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"jaguar-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"java-script-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"jeep-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"jeep-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"kia-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lamborghini-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"lamborghini-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"land-rover-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lexus-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lincoln-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"lotus-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"lotus-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"maserati-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"maybach-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mazda-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mazda-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mclaren-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mclaren-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mercedes-benz-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mercedes-benz-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mercury-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mini-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"mini-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"mitsubishi-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"nissan-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"oldsmobile-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"one-password-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"opel-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"panoz-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"paw-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"peugeot-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"peugeot-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"plymouth-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"pontiac-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"porsche-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"protocol-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"pulse-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"puzzle-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"qr-code-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"radio-2-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"radio-icon",{"selected":[4],"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"ram-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"ram-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"refresh-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"renault-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"renault-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"rolls-royce-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"saab-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"saab-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"saturn-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"scion-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"seat-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"skoda-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"slug-icon",{"label":[1],"name":[1],"size":[2]}],[0,"smart-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"spider-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"spyker-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"spyker-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"subaru-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"subaru-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"suzuki-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"svg-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"tesla-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"toyota-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"vector-curve-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"volkswagen-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"volvo-alt-ikon",{"hex":[1],"label":[1],"name":[1],"size":[2]}],[0,"volvo-ikon",{"hex":[1],"name":[1],"size":[2]}],[0,"webhook-icon",{"hex":[1],"label":[1],"name":[1],"size":[2]}]]]], options);
|
|
19
21
|
});
|
|
22
|
+
|
|
23
|
+
exports.setNonce = index.setNonce;
|
|
@@ -131,6 +131,15 @@ export { WebhookIcon as WebhookIcon } from '../types/components/webhook-icon/web
|
|
|
131
131
|
*/
|
|
132
132
|
export declare const setAssetPath: (path: string) => void;
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
136
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
137
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
138
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
139
|
+
* will result in the same behavior.
|
|
140
|
+
*/
|
|
141
|
+
export declare const setNonce: (nonce: string) => void
|
|
142
|
+
|
|
134
143
|
export interface SetPlatformOptions {
|
|
135
144
|
raf?: (c: FrameRequestCallback) => number;
|
|
136
145
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
1
|
+
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { AcuraIkon, defineCustomElement as defineCustomElementAcuraIkon } from './acura-ikon.js';
|
|
3
3
|
export { AlfaRomeoAltIkon, defineCustomElement as defineCustomElementAlfaRomeoAltIkon } from './alfa-romeo-alt-ikon.js';
|
|
4
4
|
export { AlfaRomeoIkon, defineCustomElement as defineCustomElementAlfaRomeoIkon } from './alfa-romeo-ikon.js';
|
|
@@ -44,6 +44,18 @@ const isComplexType = (o) => {
|
|
|
44
44
|
o = typeof o;
|
|
45
45
|
return o === 'object' || o === 'function';
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
49
|
+
* out of a DOM's head.
|
|
50
|
+
*
|
|
51
|
+
* @param doc The DOM containing the `head` to query against
|
|
52
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
53
|
+
* exists or the tag has no content.
|
|
54
|
+
*/
|
|
55
|
+
function queryNonceMetaTagContent(doc) {
|
|
56
|
+
var _a, _b, _c;
|
|
57
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
58
|
+
}
|
|
47
59
|
/**
|
|
48
60
|
* Production h() function based on Preact by
|
|
49
61
|
* Jason Miller (@developit)
|
|
@@ -194,6 +206,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
194
206
|
styles.set(scopeId, style);
|
|
195
207
|
};
|
|
196
208
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
209
|
+
var _a;
|
|
197
210
|
let scopeId = getScopeId(cmpMeta);
|
|
198
211
|
const style = styles.get(scopeId);
|
|
199
212
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -213,6 +226,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
213
226
|
styleElm = doc.createElement('style');
|
|
214
227
|
styleElm.innerHTML = style;
|
|
215
228
|
}
|
|
229
|
+
// Apply CSP nonce to the style tag if it exists
|
|
230
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
231
|
+
if (nonce != null) {
|
|
232
|
+
styleElm.setAttribute('nonce', nonce);
|
|
233
|
+
}
|
|
216
234
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
217
235
|
}
|
|
218
236
|
if (appliedStyles) {
|
|
@@ -1056,6 +1074,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1056
1074
|
}
|
|
1057
1075
|
};
|
|
1058
1076
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1077
|
+
var _a;
|
|
1059
1078
|
const endBootstrap = createTime();
|
|
1060
1079
|
const cmpTags = [];
|
|
1061
1080
|
const exclude = options.exclude || [];
|
|
@@ -1118,6 +1137,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1118
1137
|
{
|
|
1119
1138
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1120
1139
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1140
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1141
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1142
|
+
if (nonce != null) {
|
|
1143
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1144
|
+
}
|
|
1121
1145
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1122
1146
|
}
|
|
1123
1147
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1133,6 +1157,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1133
1157
|
// Fallback appLoad event
|
|
1134
1158
|
endBootstrap();
|
|
1135
1159
|
};
|
|
1160
|
+
/**
|
|
1161
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1162
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1163
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1164
|
+
* @returns void
|
|
1165
|
+
*/
|
|
1166
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1136
1167
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1137
1168
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1138
1169
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1239,4 +1270,4 @@ const flush = () => {
|
|
|
1239
1270
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1240
1271
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1241
1272
|
|
|
1242
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1273
|
+
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c27f5881.js';
|
|
2
|
+
export { s as setNonce } from './index-c27f5881.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
5
|
+
Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchEsm = () => {
|
|
7
8
|
return promiseResolve();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c27f5881.js';
|
|
2
|
+
export { s as setNonce } from './index-c27f5881.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.
|
|
5
|
+
Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchBrowser = () => {
|
|
7
8
|
const importMeta = import.meta.url;
|