proto-ikons-wc 0.1.1 → 0.1.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6c2fd3c8.js');
5
+ const index = require('./index-975ba1f5.js');
6
6
 
7
7
  const acuraIkonCss = "";
8
8
  const AcuraIkonStyle0 = acuraIkonCss;
@@ -24,7 +24,7 @@ const NAMESPACE = 'proto-ikons-wc';
24
24
  const BUILD = /* proto-ikons-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, 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: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: true, watchCallback: false };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.27.0 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.27.1 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -105,7 +105,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
105
105
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
106
106
  var XLINK_NS = "http://www.w3.org/1999/xlink";
107
107
  var win = typeof window !== "undefined" ? window : {};
108
- var doc = win.document || { head: {} };
109
108
  var plt = {
110
109
  $flags$: 0,
111
110
  $resourcesUrl$: "",
@@ -166,9 +165,9 @@ var isComplexType = (o) => {
166
165
  };
167
166
 
168
167
  // src/utils/query-nonce-meta-tag-content.ts
169
- function queryNonceMetaTagContent(doc2) {
168
+ function queryNonceMetaTagContent(doc) {
170
169
  var _a, _b, _c;
171
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
170
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
172
171
  }
173
172
 
174
173
  // src/utils/result.ts
@@ -336,7 +335,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
336
335
  var _a;
337
336
  const scopeId2 = getScopeId(cmpMeta);
338
337
  const style = styles.get(scopeId2);
339
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
338
+ if (!win.document) {
339
+ return scopeId2;
340
+ }
341
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
340
342
  if (style) {
341
343
  if (typeof style === "string") {
342
344
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -347,9 +349,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
347
349
  }
348
350
  if (!appliedStyles.has(scopeId2)) {
349
351
  {
350
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
352
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
351
353
  styleElm.innerHTML = style;
352
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
354
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
353
355
  if (nonce != null) {
354
356
  styleElm.setAttribute("nonce", nonce);
355
357
  }
@@ -522,12 +524,17 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
522
524
  let elm;
523
525
  let childNode;
524
526
  if (newVNode2.$text$ !== null) {
525
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
527
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
526
528
  } else {
527
529
  if (!isSvgMode) {
528
530
  isSvgMode = newVNode2.$tag$ === "svg";
529
531
  }
530
- elm = newVNode2.$elm$ = doc.createElementNS(
532
+ if (!win.document) {
533
+ throw new Error(
534
+ "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."
535
+ );
536
+ }
537
+ elm = newVNode2.$elm$ = win.document.createElementNS(
531
538
  isSvgMode ? SVG_NS : HTML_NS,
532
539
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
533
540
  ) ;
@@ -1170,18 +1177,22 @@ var disconnectedCallback = async (elm) => {
1170
1177
  // src/runtime/bootstrap-lazy.ts
1171
1178
  var bootstrapLazy = (lazyBundles, options = {}) => {
1172
1179
  var _a;
1180
+ if (!win.document) {
1181
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1182
+ return;
1183
+ }
1173
1184
  const endBootstrap = createTime();
1174
1185
  const cmpTags = [];
1175
1186
  const exclude = options.exclude || [];
1176
1187
  const customElements2 = win.customElements;
1177
- const head = doc.head;
1188
+ const head = win.document.head;
1178
1189
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1179
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
1190
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1180
1191
  const deferredConnectedCallbacks = [];
1181
1192
  let appLoadFallback;
1182
1193
  let isBootstrapping = true;
1183
1194
  Object.assign(plt, options);
1184
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
1195
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1185
1196
  let hasSlotRelocation = false;
1186
1197
  lazyBundles.map((lazyBundle) => {
1187
1198
  lazyBundle[1].map((compactMeta) => {
@@ -1258,7 +1269,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1258
1269
  }
1259
1270
  if (dataStyles.innerHTML.length) {
1260
1271
  dataStyles.setAttribute("data-styles", "");
1261
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1272
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1262
1273
  if (nonce != null) {
1263
1274
  dataStyles.setAttribute("nonce", nonce);
1264
1275
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6c2fd3c8.js');
5
+ const index = require('./index-975ba1f5.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6c2fd3c8.js');
5
+ const index = require('./index-975ba1f5.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.27.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.27.1 | 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('proto-ikons-wc.cjs.js', document.baseURI).href));
@@ -122,7 +122,7 @@
122
122
  ],
123
123
  "compiler": {
124
124
  "name": "@stencil/core",
125
- "version": "4.27.0",
125
+ "version": "4.27.1",
126
126
  "typescriptVersion": "5.5.4"
127
127
  },
128
128
  "collections": [],
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-11bb37f0.js';
1
+ import { r as registerInstance, h } from './index-854c1ae4.js';
2
2
 
3
3
  const acuraIkonCss = "";
4
4
  const AcuraIkonStyle0 = acuraIkonCss;
@@ -2,7 +2,7 @@ const NAMESPACE = 'proto-ikons-wc';
2
2
  const BUILD = /* proto-ikons-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, 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: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: true, watchCallback: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.27.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.27.1 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -83,7 +83,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
83
83
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
84
84
  var XLINK_NS = "http://www.w3.org/1999/xlink";
85
85
  var win = typeof window !== "undefined" ? window : {};
86
- var doc = win.document || { head: {} };
87
86
  var plt = {
88
87
  $flags$: 0,
89
88
  $resourcesUrl$: "",
@@ -144,9 +143,9 @@ var isComplexType = (o) => {
144
143
  };
145
144
 
146
145
  // src/utils/query-nonce-meta-tag-content.ts
147
- function queryNonceMetaTagContent(doc2) {
146
+ function queryNonceMetaTagContent(doc) {
148
147
  var _a, _b, _c;
149
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
148
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
150
149
  }
151
150
 
152
151
  // src/utils/result.ts
@@ -314,7 +313,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
314
313
  var _a;
315
314
  const scopeId2 = getScopeId(cmpMeta);
316
315
  const style = styles.get(scopeId2);
317
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
316
+ if (!win.document) {
317
+ return scopeId2;
318
+ }
319
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
318
320
  if (style) {
319
321
  if (typeof style === "string") {
320
322
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -325,9 +327,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
325
327
  }
326
328
  if (!appliedStyles.has(scopeId2)) {
327
329
  {
328
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
330
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
329
331
  styleElm.innerHTML = style;
330
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
332
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
331
333
  if (nonce != null) {
332
334
  styleElm.setAttribute("nonce", nonce);
333
335
  }
@@ -500,12 +502,17 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
500
502
  let elm;
501
503
  let childNode;
502
504
  if (newVNode2.$text$ !== null) {
503
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
505
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
504
506
  } else {
505
507
  if (!isSvgMode) {
506
508
  isSvgMode = newVNode2.$tag$ === "svg";
507
509
  }
508
- elm = newVNode2.$elm$ = doc.createElementNS(
510
+ if (!win.document) {
511
+ throw new Error(
512
+ "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."
513
+ );
514
+ }
515
+ elm = newVNode2.$elm$ = win.document.createElementNS(
509
516
  isSvgMode ? SVG_NS : HTML_NS,
510
517
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
511
518
  ) ;
@@ -1148,18 +1155,22 @@ var disconnectedCallback = async (elm) => {
1148
1155
  // src/runtime/bootstrap-lazy.ts
1149
1156
  var bootstrapLazy = (lazyBundles, options = {}) => {
1150
1157
  var _a;
1158
+ if (!win.document) {
1159
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1160
+ return;
1161
+ }
1151
1162
  const endBootstrap = createTime();
1152
1163
  const cmpTags = [];
1153
1164
  const exclude = options.exclude || [];
1154
1165
  const customElements2 = win.customElements;
1155
- const head = doc.head;
1166
+ const head = win.document.head;
1156
1167
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1157
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
1168
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1158
1169
  const deferredConnectedCallbacks = [];
1159
1170
  let appLoadFallback;
1160
1171
  let isBootstrapping = true;
1161
1172
  Object.assign(plt, options);
1162
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
1173
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1163
1174
  let hasSlotRelocation = false;
1164
1175
  lazyBundles.map((lazyBundle) => {
1165
1176
  lazyBundle[1].map((compactMeta) => {
@@ -1236,7 +1247,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1236
1247
  }
1237
1248
  if (dataStyles.innerHTML.length) {
1238
1249
  dataStyles.setAttribute("data-styles", "");
1239
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1250
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1240
1251
  if (nonce != null) {
1241
1252
  dataStyles.setAttribute("nonce", nonce);
1242
1253
  }
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-11bb37f0.js';
2
- export { s as setNonce } from './index-11bb37f0.js';
1
+ import { b as bootstrapLazy } from './index-854c1ae4.js';
2
+ export { s as setNonce } from './index-854c1ae4.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-11bb37f0.js';
2
- export { s as setNonce } from './index-11bb37f0.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-854c1ae4.js';
2
+ export { s as setNonce } from './index-854c1ae4.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.27.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;