@stencil-kit/core 0.0.1

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.
Files changed (70) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/index-BrMvRGjk.js +1430 -0
  4. package/dist/cjs/index.cjs.js +7 -0
  5. package/dist/cjs/loader.cjs.js +13 -0
  6. package/dist/cjs/my-badge.cjs.entry.js +29 -0
  7. package/dist/cjs/my-button.cjs.entry.js +29 -0
  8. package/dist/cjs/my-card.cjs.entry.js +29 -0
  9. package/dist/cjs/my-component.cjs.entry.js +33 -0
  10. package/dist/cjs/stencil-library.cjs.js +25 -0
  11. package/dist/collection/collection-manifest.json +16 -0
  12. package/dist/collection/components/my-badge/my-badge.css +67 -0
  13. package/dist/collection/components/my-badge/my-badge.js +94 -0
  14. package/dist/collection/components/my-button/my-button.css +75 -0
  15. package/dist/collection/components/my-button/my-button.js +94 -0
  16. package/dist/collection/components/my-card/my-card.css +76 -0
  17. package/dist/collection/components/my-card/my-card.js +92 -0
  18. package/dist/collection/components/my-component/my-component.cmp.test.js +27 -0
  19. package/dist/collection/components/my-component/my-component.css +3 -0
  20. package/dist/collection/components/my-component/my-component.js +95 -0
  21. package/dist/collection/index.js +10 -0
  22. package/dist/collection/utils/utils.js +3 -0
  23. package/dist/collection/utils/utils.unit.test.js +16 -0
  24. package/dist/components/index.d.ts +35 -0
  25. package/dist/components/index.js +1 -0
  26. package/dist/components/my-badge.d.ts +11 -0
  27. package/dist/components/my-badge.js +1 -0
  28. package/dist/components/my-button.d.ts +11 -0
  29. package/dist/components/my-button.js +1 -0
  30. package/dist/components/my-card.d.ts +11 -0
  31. package/dist/components/my-card.js +1 -0
  32. package/dist/components/my-component.d.ts +11 -0
  33. package/dist/components/my-component.js +1 -0
  34. package/dist/components/p-BJi3ojZX.js +1 -0
  35. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  36. package/dist/esm/index-Bdf40fwG.js +1424 -0
  37. package/dist/esm/index.js +5 -0
  38. package/dist/esm/loader.js +11 -0
  39. package/dist/esm/my-badge.entry.js +27 -0
  40. package/dist/esm/my-button.entry.js +27 -0
  41. package/dist/esm/my-card.entry.js +27 -0
  42. package/dist/esm/my-component.entry.js +31 -0
  43. package/dist/esm/stencil-library.js +21 -0
  44. package/dist/index.cjs.js +1 -0
  45. package/dist/index.js +1 -0
  46. package/dist/stencil-library/index.esm.js +1 -0
  47. package/dist/stencil-library/p-2b74a573.entry.js +1 -0
  48. package/dist/stencil-library/p-Bdf40fwG.js +2 -0
  49. package/dist/stencil-library/p-DQuL1Twl.js +1 -0
  50. package/dist/stencil-library/p-b36446f6.entry.js +1 -0
  51. package/dist/stencil-library/p-ba774cf9.entry.js +1 -0
  52. package/dist/stencil-library/p-fd06de5e.entry.js +1 -0
  53. package/dist/stencil-library/stencil-library.esm.js +1 -0
  54. package/dist/types/components/my-badge/my-badge.d.ts +15 -0
  55. package/dist/types/components/my-button/my-button.d.ts +15 -0
  56. package/dist/types/components/my-card/my-card.d.ts +15 -0
  57. package/dist/types/components/my-component/my-component.cmp.test.d.ts +1 -0
  58. package/dist/types/components/my-component/my-component.d.ts +16 -0
  59. package/dist/types/components.d.ts +208 -0
  60. package/dist/types/index.d.ts +11 -0
  61. package/dist/types/stencil-public-runtime.d.ts +1861 -0
  62. package/dist/types/utils/utils.d.ts +1 -0
  63. package/dist/types/utils/utils.unit.test.d.ts +1 -0
  64. package/loader/cdn.js +1 -0
  65. package/loader/index.cjs.js +1 -0
  66. package/loader/index.d.ts +24 -0
  67. package/loader/index.es2017.js +1 -0
  68. package/loader/index.js +2 -0
  69. package/package.json +69 -0
  70. package/readme.md +111 -0
@@ -0,0 +1,92 @@
1
+ import { h } from "@stencil/core";
2
+ export class MyCard {
3
+ /**
4
+ * Card title
5
+ */
6
+ cardTitle;
7
+ /**
8
+ * Card subtitle
9
+ */
10
+ subtitle;
11
+ /**
12
+ * Card elevation (shadow depth)
13
+ */
14
+ elevation = 'medium';
15
+ render() {
16
+ return (h("div", { key: '771331816e786b93963b10dcc4577c89da6385c5', class: `card card--${this.elevation}` }, this.cardTitle && (h("div", { key: '525c2dfdda668cb45895f6f1e9b55e6923b9538d', class: "card__header" }, h("h3", { key: 'a3025832b6ce60e73dce68f575bca6fbb1143913', class: "card__title" }, this.cardTitle), this.subtitle && h("p", { key: '3c3f094449a06aa41b63db17b3ab27e7e29be437', class: "card__subtitle" }, this.subtitle))), h("div", { key: '628c69443cf48fb07ee98fde44c0c2f6de148ed5', class: "card__content" }, h("slot", { key: 'f0c2c156603f2179314e7c58aabefbeda3b2e911' })), h("div", { key: '8f5a30d595399c6a606a5cde67c393aca93e3d0d', class: "card__footer" }, h("slot", { key: '1cb72bdc25ce96673d85c9fc86ff5661975cd412', name: "footer" }))));
17
+ }
18
+ static get is() { return "my-card"; }
19
+ static get encapsulation() { return "shadow"; }
20
+ static get originalStyleUrls() {
21
+ return {
22
+ "$": ["my-card.css"]
23
+ };
24
+ }
25
+ static get styleUrls() {
26
+ return {
27
+ "$": ["my-card.css"]
28
+ };
29
+ }
30
+ static get properties() {
31
+ return {
32
+ "cardTitle": {
33
+ "type": "string",
34
+ "mutable": false,
35
+ "complexType": {
36
+ "original": "string",
37
+ "resolved": "string",
38
+ "references": {}
39
+ },
40
+ "required": false,
41
+ "optional": false,
42
+ "docs": {
43
+ "tags": [],
44
+ "text": "Card title"
45
+ },
46
+ "getter": false,
47
+ "setter": false,
48
+ "reflect": false,
49
+ "attribute": "card-title"
50
+ },
51
+ "subtitle": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "string",
56
+ "resolved": "string",
57
+ "references": {}
58
+ },
59
+ "required": false,
60
+ "optional": false,
61
+ "docs": {
62
+ "tags": [],
63
+ "text": "Card subtitle"
64
+ },
65
+ "getter": false,
66
+ "setter": false,
67
+ "reflect": false,
68
+ "attribute": "subtitle"
69
+ },
70
+ "elevation": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "'low' | 'medium' | 'high'",
75
+ "resolved": "\"high\" | \"low\" | \"medium\"",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "Card elevation (shadow depth)"
83
+ },
84
+ "getter": false,
85
+ "setter": false,
86
+ "reflect": false,
87
+ "attribute": "elevation",
88
+ "defaultValue": "'medium'"
89
+ }
90
+ };
91
+ }
92
+ }
@@ -0,0 +1,27 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ describe('my-component', () => {
3
+ it('renders', async () => {
4
+ const { root } = await render(h("my-component", null));
5
+ await expect(root).toEqualHtml(`
6
+ <my-component class="hydrated">
7
+ <mock:shadow-root>
8
+ <div>
9
+ Hello, World! I'm
10
+ </div>
11
+ </mock:shadow-root>
12
+ </my-component>
13
+ `);
14
+ });
15
+ it('renders with values', async () => {
16
+ const { root } = await render(h("my-component", { first: "Stencil", middle: "'Don't call me a framework'", last: "JS" }));
17
+ await expect(root).toEqualHtml(`
18
+ <my-component class="hydrated">
19
+ <mock:shadow-root>
20
+ <div>
21
+ Hello, World! I'm Stencil 'Don't call me a framework' JS
22
+ </div>
23
+ </mock:shadow-root>
24
+ </my-component>
25
+ `);
26
+ });
27
+ });
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: block;
3
+ }
@@ -0,0 +1,95 @@
1
+ import { h } from "@stencil/core";
2
+ import { format } from "../../utils/utils";
3
+ export class MyComponent {
4
+ /**
5
+ * The first name
6
+ */
7
+ first;
8
+ /**
9
+ * The middle name
10
+ */
11
+ middle;
12
+ /**
13
+ * The last name
14
+ */
15
+ last;
16
+ getText() {
17
+ return format(this.first, this.middle, this.last);
18
+ }
19
+ render() {
20
+ return h("div", { key: '543ff9a15c7d307e7e59a1143b033faeee29b1cb' }, "Hello, World! I'm ", this.getText());
21
+ }
22
+ static get is() { return "my-component"; }
23
+ static get encapsulation() { return "shadow"; }
24
+ static get originalStyleUrls() {
25
+ return {
26
+ "$": ["my-component.css"]
27
+ };
28
+ }
29
+ static get styleUrls() {
30
+ return {
31
+ "$": ["my-component.css"]
32
+ };
33
+ }
34
+ static get properties() {
35
+ return {
36
+ "first": {
37
+ "type": "string",
38
+ "mutable": false,
39
+ "complexType": {
40
+ "original": "string",
41
+ "resolved": "string",
42
+ "references": {}
43
+ },
44
+ "required": false,
45
+ "optional": true,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": "The first name"
49
+ },
50
+ "getter": false,
51
+ "setter": false,
52
+ "reflect": false,
53
+ "attribute": "first"
54
+ },
55
+ "middle": {
56
+ "type": "string",
57
+ "mutable": false,
58
+ "complexType": {
59
+ "original": "string",
60
+ "resolved": "string",
61
+ "references": {}
62
+ },
63
+ "required": false,
64
+ "optional": true,
65
+ "docs": {
66
+ "tags": [],
67
+ "text": "The middle name"
68
+ },
69
+ "getter": false,
70
+ "setter": false,
71
+ "reflect": false,
72
+ "attribute": "middle"
73
+ },
74
+ "last": {
75
+ "type": "string",
76
+ "mutable": false,
77
+ "complexType": {
78
+ "original": "string",
79
+ "resolved": "string",
80
+ "references": {}
81
+ },
82
+ "required": false,
83
+ "optional": true,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": "The last name"
87
+ },
88
+ "getter": false,
89
+ "setter": false,
90
+ "reflect": false,
91
+ "attribute": "last"
92
+ }
93
+ };
94
+ }
95
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview entry point for your component library
3
+ *
4
+ * This is the entry point for your component library. Use this file to export utilities,
5
+ * constants or data structure that accompany your components.
6
+ *
7
+ * DO NOT use this file to export your components. Instead, use the recommended approaches
8
+ * to consume components of this package as outlined in the `README.md`.
9
+ */
10
+ export { format } from './utils/utils';
@@ -0,0 +1,3 @@
1
+ export function format(first, middle, last) {
2
+ return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
+ }
@@ -0,0 +1,16 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { format } from "./utils";
3
+ describe('format', () => {
4
+ it('returns empty string for no names defined', () => {
5
+ expect(format(undefined, undefined, undefined)).toEqual('');
6
+ });
7
+ it('formats just first names', () => {
8
+ expect(format('Joseph', undefined, undefined)).toEqual('Joseph');
9
+ });
10
+ it('formats first and last names', () => {
11
+ expect(format('Joseph', undefined, 'Publique')).toEqual('Joseph Publique');
12
+ });
13
+ it('formats first, middle and last names', () => {
14
+ expect(format('Joseph', 'Quincy', 'Publique')).toEqual('Joseph Quincy Publique');
15
+ });
16
+ });
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Get the base path to where the assets can be found. Use "setAssetPath(path)"
3
+ * if the path needs to be customized.
4
+ */
5
+ export declare const getAssetPath: (path: string) => string;
6
+
7
+ /**
8
+ * Used to manually set the base path where assets can be found.
9
+ * If the script is used as "module", it's recommended to use "import.meta.url",
10
+ * such as "setAssetPath(import.meta.url)". Other options include
11
+ * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
12
+ * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
13
+ * But do note that this configuration depends on how your script is bundled, or lack of
14
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
15
+ * will have to ensure the static assets are copied to its build directory.
16
+ */
17
+ export declare const setAssetPath: (path: string) => void;
18
+
19
+ /**
20
+ * Used to specify a nonce value that corresponds with an application's CSP.
21
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
22
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
23
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
24
+ * will result in the same behavior.
25
+ */
26
+ export declare const setNonce: (nonce: string) => void
27
+
28
+ export interface SetPlatformOptions {
29
+ raf?: (c: FrameRequestCallback) => number;
30
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
31
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
32
+ }
33
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
34
+
35
+ export * from '../types';
@@ -0,0 +1 @@
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BJi3ojZX.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyBadge extends Components.MyBadge, HTMLElement {}
4
+ export const MyBadge: {
5
+ prototype: MyBadge;
6
+ new (): MyBadge;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as o,H as t,h as a}from"./p-BJi3ojZX.js";const i=o(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}color="neutral";size="medium";pill=!1;render(){return a("span",{key:"33a316730b54199e32c7ecbd1160997411e5ff95",class:`badge badge--${this.color} badge--${this.size} ${this.pill?"badge--pill":""}`},a("slot",{key:"eb7a3e46ea27e7d714dcc60723ca7f5801204674"}))}static get style(){return":host{display:inline-block}.badge{display:inline-flex;align-items:center;justify-content:center;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;font-weight:600;border-radius:4px;transition:all 0.2s ease}.badge--pill{border-radius:100px}.badge--small{padding:4px 8px;font-size:11px;line-height:1}.badge--medium{padding:6px 12px;font-size:13px;line-height:1}.badge--large{padding:8px 16px;font-size:15px;line-height:1}.badge--success{background-color:#10b981;color:white}.badge--warning{background-color:#f59e0b;color:white}.badge--error{background-color:#ef4444;color:white}.badge--info{background-color:#3b82f6;color:white}.badge--neutral{background-color:#6b7280;color:white}.badge:hover{opacity:0.9;transform:scale(1.05)}"}},[769,"my-badge",{color:[1],size:[1],pill:[4]}]);function n(){"undefined"!=typeof customElements&&["my-badge"].forEach((o=>{"my-badge"===o&&(customElements.get(e(o))||customElements.define(e(o),i))}))}n();const s=i,l=n;export{s as MyBadge,l as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyButton extends Components.MyButton, HTMLElement {}
4
+ export const MyButton: {
5
+ prototype: MyButton;
6
+ new (): MyButton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as t,H as n,h as a}from"./p-BJi3ojZX.js";const r=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}variant="primary";size="medium";disabled=!1;render(){return a("button",{key:"94d04ac3ac7441f76510463322200c2b7a01d569",class:`btn btn--${this.variant} btn--${this.size}`,disabled:this.disabled},a("slot",{key:"80f6c9a56010f80635288b16804d33c780232da5"}))}static get style(){return":host{display:inline-block}.btn{font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;font-weight:600;border:none;border-radius:8px;cursor:pointer;transition:all 0.2s ease;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15)}.btn:active:not(:disabled){transform:translateY(0)}.btn:disabled{opacity:0.5;cursor:not-allowed}.btn--small{padding:8px 16px;font-size:14px}.btn--medium{padding:12px 24px;font-size:16px}.btn--large{padding:16px 32px;font-size:18px}.btn--primary{background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);color:white}.btn--primary:hover:not(:disabled){background:linear-gradient(135deg, #5568d3 0%, #63408a 100%)}.btn--secondary{background:linear-gradient(135deg, #f093fb 0%, #f5576c 100%);color:white}.btn--secondary:hover:not(:disabled){background:linear-gradient(135deg, #d97ee0 0%, #db4a5d 100%)}.btn--danger{background:linear-gradient(135deg, #fa709a 0%, #fee140 100%);color:#333}.btn--danger:hover:not(:disabled){background:linear-gradient(135deg, #e55d87 0%, #e5ca2b 100%)}"}},[769,"my-button",{variant:[1],size:[1],disabled:[4]}]);function d(){"undefined"!=typeof customElements&&["my-button"].forEach((t=>{"my-button"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}d();const i=r,o=d;export{i as MyButton,o as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyCard extends Components.MyCard, HTMLElement {}
4
+ export const MyCard: {
5
+ prototype: MyCard;
6
+ new (): MyCard;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as a,H as t,h as o}from"./p-BJi3ojZX.js";const c=a(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}cardTitle;subtitle;elevation="medium";render(){return o("div",{key:"771331816e786b93963b10dcc4577c89da6385c5",class:"card card--"+this.elevation},this.cardTitle&&o("div",{key:"525c2dfdda668cb45895f6f1e9b55e6923b9538d",class:"card__header"},o("h3",{key:"a3025832b6ce60e73dce68f575bca6fbb1143913",class:"card__title"},this.cardTitle),this.subtitle&&o("p",{key:"3c3f094449a06aa41b63db17b3ab27e7e29be437",class:"card__subtitle"},this.subtitle)),o("div",{key:"628c69443cf48fb07ee98fde44c0c2f6de148ed5",class:"card__content"},o("slot",{key:"f0c2c156603f2179314e7c58aabefbeda3b2e911"})),o("div",{key:"8f5a30d595399c6a606a5cde67c393aca93e3d0d",class:"card__footer"},o("slot",{key:"1cb72bdc25ce96673d85c9fc86ff5661975cd412",name:"footer"})))}static get style(){return":host{display:block}.card{background:white;border-radius:12px;overflow:hidden;transition:all 0.3s ease;border:1px solid #e5e7eb}.card:hover{transform:translateY(-4px)}.card--low{box-shadow:0 1px 3px rgba(0, 0, 0, 0.1)}.card--low:hover{box-shadow:0 4px 6px rgba(0, 0, 0, 0.1)}.card--medium{box-shadow:0 4px 6px rgba(0, 0, 0, 0.1)}.card--medium:hover{box-shadow:0 10px 15px rgba(0, 0, 0, 0.15)}.card--high{box-shadow:0 10px 15px rgba(0, 0, 0, 0.15)}.card--high:hover{box-shadow:0 20px 25px rgba(0, 0, 0, 0.2)}.card__header{padding:24px 24px 0}.card__title{margin:0;font-size:24px;font-weight:700;color:#1f2937;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif}.card__subtitle{margin:8px 0 0;font-size:14px;color:#6b7280;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif}.card__content{padding:24px;color:#374151;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;line-height:1.6}.card__footer{padding:0 24px 24px;display:flex;gap:12px;align-items:center}.card__footer:empty{display:none}"}},[769,"my-card",{cardTitle:[1,"card-title"],subtitle:[1],elevation:[1]}]);function d(){"undefined"!=typeof customElements&&["my-card"].forEach((a=>{"my-card"===a&&(customElements.get(e(a))||customElements.define(e(a),c))}))}d();const s=c,r=d;export{s as MyCard,r as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyComponent extends Components.MyComponent, HTMLElement {}
4
+ export const MyComponent: {
5
+ prototype: MyComponent;
6
+ new (): MyComponent;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t,p as e,H as s,h as o}from"./p-BJi3ojZX.js";import{format as n}from"./index.js";const i=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}first;middle;last;getText(){return n(this.first,this.middle,this.last)}render(){return o("div",{key:"543ff9a15c7d307e7e59a1143b033faeee29b1cb"},"Hello, World! I'm ",this.getText())}static get style(){return":host{display:block}"}},[513,"my-component",{first:[1],middle:[1],last:[1]}]);function m(){"undefined"!=typeof customElements&&["my-component"].forEach((e=>{"my-component"===e&&(customElements.get(t(e))||customElements.define(t(e),i))}))}m();const r=i,c=m;export{r as MyComponent,c as defineCustomElement}
@@ -0,0 +1 @@
1
+ function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>(0,console.error)(t,e),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),a=!1,d=[],h=[],p=(t,e)=>n=>{t.push(n),a||(a=!0,e&&4&c.i?y($):c.raf($))},m=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},$=()=>{m(d),m(h),(a=d.length>0)&&c.raf($)},y=t=>Promise.resolve(undefined).then(t),b=p(h,!0),v=t=>{const e=new URL(t,c.u);return e.origin!==i.location.origin?e.href:e.pathname},w=t=>c.u=t;function g(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(f?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var j,O=new WeakMap,S=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!M(l))&&(l=String(l)),s&&i?r[r.length-1].p+=l:r.push(s?E(null,l):l),i=s)};if(c(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=E(t,null);return u.m=e,r.length>0&&(u.$=r),u.v=o,u},E=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,$:null,m:null,v:null}),A={},C=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?String(t):t,L=(t,e,n,o,s,i)=>{if(n===o)return;let r=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,l=x(n);let s=x(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("key"===e);else{if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=M(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}},_=/\s/,x=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(_):[]),D=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of H(Object.keys(o)))t in s||L(l,t,o[t],void 0,n,e.i);for(const t of H(Object.keys(s)))L(l,t,o[t],s[t],n,e.i)};function H(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var P=!1,U=!1,W=(t,e,n)=>{const l=e.$[n];let o,s,r=0;if(null!=l.p)o=l.O=i.document.createTextNode(l.p);else{if(!i.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=i.document.createElement(l.j),D(null,l,U),l.$){const e="template"===l.j?o.content:o;for(r=0;r<l.$.length;++r)s=W(t,l,r),s&&e.appendChild(s)}}return o["s-hn"]=j,o},N=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=W(null,n,o),i&&(l[o].O=i,z(r,i,e)))},R=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;t&&t.remove()}}},V=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),q=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$,i=e.p;null==i?("slot"!==e.j||P||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{c.i|=1;const e=t.closest(j.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of n?l.reverse():l)null!=t["s-sh"]&&(z(e,t,null!=n?n:null),t["s-sh"]=void 0)}c.i&=-2})(e.O.parentElement)),D(t,e,U),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=l.length-1,m=l[0],$=l[p];const y="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=l[++c];else if(null==$)$=l[--p];else if(V(d,m,o))q(d,m,o),d=e[++r],m=l[++c];else if(V(h,$,o))q(h,$,o),h=e[--a],$=l[--p];else if(V(d,$,o))q(d,$,o),z(y,d.O,h.O.nextSibling),d=e[++r],$=l[--p];else if(V(h,m,o))q(h,m,o),z(y,h.O,d.O),h=e[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].v&&e[f].v===m.v){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=W(e&&e[c],n,u):(q(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=W(e&&e[c],n,c),m=l[++c]),s&&z(d.O.parentNode,s,d.O)}r>a?N(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&R(e,r,a)})(l,o,e,s,n):null!==s?(null!==t.p&&(l.textContent=""),N(l,null,e,s,0,s.length-1)):!n&&null!==o&&R(o,0,o.length-1)):t.p!==i&&(l.data=i)},z=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),F=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.M||E(null,null);var i;const r=(i=e)&&i.j===A?e:k(null,null,e);if(j=l.tagName,n&&r.m)for(const t of Object.keys(r.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=l[t]);r.j=null,r.i|=4,t.M=r,r.O=s.O=l.shadowRoot||l,P=!(!(1&o.i)||128&o.i),q(s,r,n)},T=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},Y=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);T(t,t.A);const n=()=>Z(t,e);if(!e)return b(n);queueMicrotask((()=>{n()}))},Z=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=X(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=B(o,(()=>X(l,"componentWillRender",void 0,n))),B(o,(()=>I(t,l,e)))},B=(t,e)=>G(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),G=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,I=async(t,e,n)=>{var l;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const r=S(e),a=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,a)if("string"==typeof a){let o,s=O.get(t=t.head||t);if(s||O.set(t,s=new Set),!s.has(r)){o=i.document.createElement("style"),o.textContent=a;const d=null!=(n=c.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(a),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=a+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(r)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(a.constructor===n.CSSStyleSheet)l=a;else{l=new n.CSSStyleSheet;for(let t=0;t<a.cssRules.length;t++)l.insertRule(a.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(r)}}return r})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);J(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>K(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},J=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,F(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},K=t=>{const e=t.$hostElement$,n=e,l=t.A;X(n,"componentDidRender",void 0,e),64&t.i?X(n,"componentDidUpdate",void 0,e):(t.i|=64,tt(e),X(n,"componentDidLoad",void 0,e),t.L(e),l||Q()),t.k&&(t.k(),t.k=void 0),512&t.i&&y((()=>Y(t,!1))),t.i&=-517},Q=()=>{y((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"stencil-library"}});return t.dispatchEvent(e),e})(i)))},X=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,l)}},tt=t=>t.classList.add("hydrated"),et=(t,e,n,o)=>{const s=l(t);if(!s)return;const i=t,r=s.o.get(e),c=s.i,u=i;n=C(n,o.t[e][0]);const f=Number.isNaN(r)&&Number.isNaN(n);if(n!==r&&!f&&(s.o.set(e,n),2&c)){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,r,e)&&!(16&c))return;16&c||Y(s,!1)}},nt=(e,n)=>{var o,s;const i=e.prototype;if(n.t){const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):(t=e,l(this).o.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.apply(this,[C(t,o)]),void et(this,e,t=32&o?this[e]:s.$hostElement$[e],n);et(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){c.jmp((()=>{var c;const u=t.get(e),f=l(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.i;if(f&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n._)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===u)),d=a&&4&a[1][0],h=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const p=Object.getOwnPropertyDescriptor(i,u);h||s==this[u]||p.get&&!p.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n._)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},lt=(t,e)=>{const i={i:e[0],h:e[1]};try{i.t=e[2];const r=t.prototype.connectedCallback,f=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,D:new Map};l.H=new Promise((t=>l.L=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const e=l(t);if(!e)return;const n=e.l,i=()=>{};if(1&e.i)(null==e?void 0:e.P)||(null==e?void 0:e.H)&&e.H.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){T(e,e.A=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=S(n);if(!s.has(e)){const l=()=>{};((t,e,n)=>{let l=s.get(t);u&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,s.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.A,i=()=>Y(e,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()}catch(n){o(n,t),e.k&&(e.k(),e.k=void 0),e.L&&e.L(t)}})(t,e,n)}i()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{1&c.i||l(t),O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this),f&&f.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${i.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(this,i)}}),Object.defineProperty(t,"is",{value:i.h,configurable:!0}),nt(t,i)}catch(e){return o(e),t}},ot=t=>c.C=t,st=t=>Object.assign(c,t),it=new WeakMap;function rt(t,e){let n=it.get(e);n||(n={i:0,l:{i:0,h:e.tagName},$hostElement$:e},it.set(e,n)),F(n,t)}function ct(t){return t}export{r as H,ot as a,st as b,v as g,k as h,lt as p,rt as r,w as s,ct as t}
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };