xv-webcomponents 0.1.3
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/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/xv-button-v2.d.ts +11 -0
- package/dist/components/xv-checkbox-v2.d.ts +11 -0
- package/dist/components/xv-checkbox.d.ts +11 -0
- package/dist/types/components/xv-button/xv-button.d.ts +16 -0
- package/dist/types/components/xv-checkbox/xv-checkbox.d.ts +7 -0
- package/dist/types/components.d.ts +95 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/xv-webcomponents/app-globals-0f993ce5.js +5 -0
- package/dist/xv-webcomponents/app-globals-0f993ce5.js.map +1 -0
- package/dist/xv-webcomponents/index-5f0a9e2d.js +3922 -0
- package/dist/xv-webcomponents/index-5f0a9e2d.js.map +1 -0
- package/dist/xv-webcomponents/index.esm.js +17 -0
- package/dist/xv-webcomponents/index.esm.js.map +1 -0
- package/dist/xv-webcomponents/xv-button-v2.entry.js +37 -0
- package/dist/xv-webcomponents/xv-button-v2.entry.js.map +1 -0
- package/dist/xv-webcomponents/xv-checkbox-08da5153.js +28 -0
- package/dist/xv-webcomponents/xv-checkbox-08da5153.js.map +1 -0
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.js +4 -0
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.js.map +1 -0
- package/dist/xv-webcomponents/xv-checkbox.entry.js +4 -0
- package/dist/xv-webcomponents/xv-checkbox.entry.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +49 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +49 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function format(first, middle, last) {
|
|
2
|
+
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview entry point for your component library
|
|
7
|
+
*
|
|
8
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
9
|
+
* constants or data structure that accompany your components.
|
|
10
|
+
*
|
|
11
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
12
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export { format };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"index.esm.js","mappings":"SAAgB,MAAM,CAAC,KAAc,EAAE,MAAe,EAAE,IAAa;IACnE,OAAO,CAAC,KAAK,IAAI,EAAE,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AACjF;;ACFA;;;;;;;;;;;;","names":[],"sources":["src/utils/utils.ts","src/index.ts"],"sourcesContent":["export function format(first?: string, middle?: string, last?: string): string {\r\n return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');\r\n}\r\n","/**\r\n * @fileoverview entry point for your component library\r\n *\r\n * This is the entry point for your component library. Use this file to export utilities,\r\n * constants or data structure that accompany your components.\r\n *\r\n * DO NOT use this file to export your components. Instead, use the recommended approaches\r\n * to consume components of this package as outlined in the `README.md`.\r\n */\r\n\r\nexport { format } from './utils/utils';\r\nexport type * from './components.d.ts';\r\n"],"version":3}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-5f0a9e2d.js';
|
|
2
|
+
|
|
3
|
+
const XvButton = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
/** Button label */
|
|
7
|
+
this.label = 'Click me';
|
|
8
|
+
/** Variant */
|
|
9
|
+
this.variant = 'primary';
|
|
10
|
+
/** Size */
|
|
11
|
+
this.size = 'medium';
|
|
12
|
+
/** Disabled state */
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
/** Automatically detected brand */
|
|
15
|
+
this.detectedBrand = 'default-brand';
|
|
16
|
+
}
|
|
17
|
+
applyGlobalStyles() {
|
|
18
|
+
var _a;
|
|
19
|
+
const globalStyle = document.getElementById("brand-style");
|
|
20
|
+
if (globalStyle) {
|
|
21
|
+
const styleClone = document.createElement("style");
|
|
22
|
+
styleClone.innerHTML = `@import url('${globalStyle.href}');`;
|
|
23
|
+
(_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(styleClone);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
componentWillLoad() {
|
|
27
|
+
this.applyGlobalStyles();
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return (h("button", { key: '1e146a747f3adf613331a392d2a30f0789e0fee1', class: `xv-button ${this.variant} ${this.size}`, disabled: this.disabled }, this.label));
|
|
31
|
+
}
|
|
32
|
+
get el() { return getElement(this); }
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { XvButton as xv_button_v2 };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=xv-button-v2.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"xv-button-v2.entry.esm.js","mappings":";;MAMa,QAAQ;IAJrB;;;QAQU,UAAK,GAAW,UAAU,CAAC;;QAG3B,YAAO,GAA8D,SAAS,CAAC;;QAG/E,SAAI,GAAiC,QAAQ,CAAC;;QAG9C,aAAQ,GAAY,KAAK,CAAC;;QAGzB,kBAAa,GAAW,eAAe,CAAC;KAsBlD;IApBS,iBAAiB;;QACvB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE;YACf,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;SAC7C;KACF;IAED,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACE,+DAAQ,KAAK,EAAE,aAAa,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAC7E,IAAI,CAAC,KAAK,CACJ,EACT;KACH;;;;;;","names":[],"sources":["src/components/xv-button/xv-button.tsx"],"sourcesContent":["import { Component, Prop, State, h, Element } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'xv-button-v2',\r\n shadow: true, // ✅ Enables Shadow DOM\r\n})\r\nexport class XvButton {\r\n @Element() el!: HTMLElement;\r\n\r\n /** Button label */\r\n @Prop() label: string = 'Click me';\r\n\r\n /** Variant */\r\n @Prop() variant: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'ghost' = 'primary';\r\n\r\n /** Size */\r\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\r\n\r\n /** Disabled state */\r\n @Prop() disabled: boolean = false;\r\n\r\n /** Automatically detected brand */\r\n @State() detectedBrand: string = 'default-brand';\r\n\r\n private applyGlobalStyles() {\r\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\r\n if (globalStyle) {\r\n const styleClone = document.createElement(\"style\");\r\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\r\n this.el.shadowRoot?.appendChild(styleClone);\r\n }\r\n }\r\n \r\n componentWillLoad() {\r\n this.applyGlobalStyles();\r\n }\r\n\r\n render() {\r\n return (\r\n <button class={`xv-button ${this.variant} ${this.size}`} disabled={this.disabled}>\r\n {this.label}\r\n </button>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-5f0a9e2d.js';
|
|
2
|
+
|
|
3
|
+
const XvCheckbox = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
this.detectedBrand = 'default-brand';
|
|
7
|
+
}
|
|
8
|
+
applyGlobalStyles() {
|
|
9
|
+
var _a;
|
|
10
|
+
const globalStyle = document.getElementById("brand-style");
|
|
11
|
+
if (globalStyle) {
|
|
12
|
+
const styleClone = document.createElement("style");
|
|
13
|
+
styleClone.innerHTML = `@import url('${globalStyle.href}');`;
|
|
14
|
+
(_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(styleClone);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
this.applyGlobalStyles();
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h("label", { key: '72bd9b9d8ad781ba74a48a34184c5c9d49075930', class: "checkbox-container" }, h("input", { key: 'a645daae3cd3954cd6c170bc1f2d64f7b329fe42', type: "checkbox" }), h("span", { key: '6602efce427536b37edac417bab976c36cf196b1', class: "checkmark" }), h("slot", { key: 'a044876008987287768ec232dc769d6375f8270c' })));
|
|
22
|
+
}
|
|
23
|
+
get el() { return getElement(this); }
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { XvCheckbox as X };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=xv-checkbox-08da5153.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"xv-checkbox-08da5153.js","mappings":";;MAMa,UAAU;IAJvB;;QAMW,kBAAa,GAAW,eAAe,CAAC;KAwBlD;IAtBS,iBAAiB;;QACvB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE;YACf,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;SAC7C;KACF;IAED,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACE,8DAAO,KAAK,EAAC,oBAAoB,IAC/B,8DAAO,IAAI,EAAC,UAAU,GAAG,EACzB,6DAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,8DAAa,CACP,EACR;KACH;;;;;;","names":[],"sources":["src/components/xv-checkbox/xv-checkbox.tsx"],"sourcesContent":["import { Component, h, Element, State } from '@stencil/core';\n\n@Component({\n tag: 'xv-checkbox-v2',\n shadow: true, // ✅ Shadow DOM aktiviert\n})\nexport class XvCheckbox {\n @Element() el!: HTMLElement;\n @State() detectedBrand: string = 'default-brand';\n\n private applyGlobalStyles() {\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\n if (globalStyle) {\n const styleClone = document.createElement(\"style\");\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\n this.el.shadowRoot?.appendChild(styleClone);\n }\n }\n\n componentWillLoad() {\n this.applyGlobalStyles();\n }\n\n render() {\n return (\n <label class=\"checkbox-container\">\n <input type=\"checkbox\" />\n <span class=\"checkmark\"></span>\n <slot></slot>\n </label>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"xv-checkbox-v2.entry.esm.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"xv-checkbox.entry.esm.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { B as BUILD, c as consoleDevInfo, H, d as doc, N as NAMESPACE, p as promiseResolve, b as bootstrapLazy } from './index-5f0a9e2d.js';
|
|
2
|
+
export { s as setNonce } from './index-5f0a9e2d.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
var patchBrowser = () => {
|
|
9
|
+
if (BUILD.isDev && !BUILD.isTesting) {
|
|
10
|
+
consoleDevInfo("Running in development mode.");
|
|
11
|
+
}
|
|
12
|
+
if (BUILD.cloneNodeFix) {
|
|
13
|
+
patchCloneNodeFix(H.prototype);
|
|
14
|
+
}
|
|
15
|
+
const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll("script")).find(
|
|
16
|
+
(s) => new RegExp(`/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === NAMESPACE
|
|
17
|
+
) : null;
|
|
18
|
+
const importMeta = import.meta.url;
|
|
19
|
+
const opts = BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {};
|
|
20
|
+
if (importMeta !== "") {
|
|
21
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
22
|
+
}
|
|
23
|
+
return promiseResolve(opts);
|
|
24
|
+
};
|
|
25
|
+
var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
26
|
+
const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
|
|
27
|
+
HTMLElementPrototype.cloneNode = function(deep) {
|
|
28
|
+
if (this.nodeName === "TEMPLATE") {
|
|
29
|
+
return nativeCloneNodeFn.call(this, deep);
|
|
30
|
+
}
|
|
31
|
+
const clonedNode = nativeCloneNodeFn.call(this, false);
|
|
32
|
+
const srcChildNodes = this.childNodes;
|
|
33
|
+
if (deep) {
|
|
34
|
+
for (let i = 0; i < srcChildNodes.length; i++) {
|
|
35
|
+
if (srcChildNodes[i].nodeType !== 2) {
|
|
36
|
+
clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return clonedNode;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
patchBrowser().then(async (options) => {
|
|
45
|
+
await globalScripts();
|
|
46
|
+
return bootstrapLazy([["xv-button-v2",[[1,"xv-button-v2",{"label":[1],"variant":[1],"size":[1],"disabled":[4],"detectedBrand":[32]}]]],["xv-checkbox",[[1,"xv-checkbox",{"detectedBrand":[32]}]]],["xv-checkbox-v2",[[1,"xv-checkbox-v2",{"detectedBrand":[32]}]]]], options);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=xv-webcomponents.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"xv-webcomponents.esm.js","mappings":";;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AACzB,EAAE,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;AACvC,IAAI,cAAc,CAAC,8BAA8B,CAAC,CAAC;AACnD,GAAG;AACH,EAAE,IAAI,KAAK,CAAC,YAAY,EAAE;AAC1B,IAAI,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACnC,GAAG;AACH,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;AAC1F,IAAI,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,wBAAwB,CAAC,KAAK,SAAS;AACnI,GAAG,GAAG,IAAI,CAAC;AACX,EAAE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACrC,EAAE,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,GAAG,CAAC,SAAS,IAAI,EAAE,EAAE,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AACF,IAAI,iBAAiB,GAAG,CAAC,oBAAoB,KAAK;AAClD,EAAE,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,SAAS,CAAC;AAC3D,EAAE,oBAAoB,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE;AAClD,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;AACtC,MAAM,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAChD,KAAK;AACL,IAAI,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC3D,IAAI,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC;AAC1C,IAAI,IAAI,IAAI,EAAE;AACd,MAAM,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACrD,QAAQ,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,EAAE;AAC7C,UAAU,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,UAAU,CAAC;AACtB,GAAG,CAAC;AACJ,CAAC;;ACrCD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE,CAAC;AACxB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC","names":[],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
|
package/loader/cdn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from '../dist/types/components';
|
|
2
|
+
export interface CustomElementsDefineOptions {
|
|
3
|
+
exclude?: string[];
|
|
4
|
+
resourcesUrl?: string;
|
|
5
|
+
syncQueue?: boolean;
|
|
6
|
+
jmp?: (c: Function) => any;
|
|
7
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
8
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyPolyfills(): Promise<void>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
19
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
20
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
21
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
22
|
+
* will result in the same behavior.
|
|
23
|
+
*/
|
|
24
|
+
export declare function setNonce(nonce: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/esm/loader.js';
|
package/loader/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
2
|
+
export * from '../dist/esm/loader.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xv-webcomponents-loader",
|
|
3
|
+
"private": true,
|
|
4
|
+
"typings": "./index.d.ts",
|
|
5
|
+
"module": "./index.js",
|
|
6
|
+
"main": "./index.cjs.js",
|
|
7
|
+
"jsnext:main": "./index.es2017.js",
|
|
8
|
+
"es2015": "./index.es2017.js",
|
|
9
|
+
"es2017": "./index.es2017.js",
|
|
10
|
+
"unpkg": "./cdn.js"
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xv-webcomponents",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Reusable Web Components for XV Applications",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
9
|
+
"collection:main": "dist/collection/index.js",
|
|
10
|
+
"unpkg": "dist/xv-webcomponents/xv-webcomponents.esm.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/xv-webcomponents/xv-webcomponents.esm.js",
|
|
14
|
+
"require": "./dist/xv-webcomponents/xv-webcomponents.cjs.js"
|
|
15
|
+
},
|
|
16
|
+
"./loader": {
|
|
17
|
+
"import": "./loader/index.js",
|
|
18
|
+
"require": "./loader/index.cjs",
|
|
19
|
+
"types": "./loader/index.d.ts"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/ionic-team/stencil-component-starter.git"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/",
|
|
28
|
+
"loader/"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "stencil build",
|
|
32
|
+
"start": "stencil build --dev --watch --serve",
|
|
33
|
+
"test": "stencil test --spec --e2e",
|
|
34
|
+
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
35
|
+
"generate": "stencil generate"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@stencil/core": "^4.7.0",
|
|
39
|
+
"@types/jest": "^29.5.6",
|
|
40
|
+
"@types/node": "^16.18.11",
|
|
41
|
+
"jest": "^29.7.0",
|
|
42
|
+
"jest-cli": "^29.7.0",
|
|
43
|
+
"puppeteer": "^21.9.0"
|
|
44
|
+
},
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
}
|
|
49
|
+
}
|