joe-stencil-library 0.0.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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/index-Bz7jpGsd.js +1942 -0
  4. package/dist/cjs/index.cjs.js +7 -0
  5. package/dist/cjs/loader.cjs.js +13 -0
  6. package/dist/cjs/my-component.cjs.entry.js +33 -0
  7. package/dist/cjs/stencil-library.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +12 -0
  9. package/dist/collection/components/my-component/my-component.css +3 -0
  10. package/dist/collection/components/my-component/my-component.js +95 -0
  11. package/dist/collection/index.js +10 -0
  12. package/dist/collection/utils/utils.js +3 -0
  13. package/dist/components/index.d.ts +35 -0
  14. package/dist/components/index.js +1 -0
  15. package/dist/components/my-component.d.ts +11 -0
  16. package/dist/components/my-component.js +1 -0
  17. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  18. package/dist/esm/index-CmKZewjN.js +1936 -0
  19. package/dist/esm/index.js +5 -0
  20. package/dist/esm/loader.js +11 -0
  21. package/dist/esm/my-component.entry.js +31 -0
  22. package/dist/esm/stencil-library.js +21 -0
  23. package/dist/index.cjs.js +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/stencil-library/index.esm.js +1 -0
  26. package/dist/stencil-library/p-5dacfe00.entry.js +1 -0
  27. package/dist/stencil-library/p-CmKZewjN.js +2 -0
  28. package/dist/stencil-library/p-DQuL1Twl.js +1 -0
  29. package/dist/stencil-library/stencil-library.esm.js +1 -0
  30. package/dist/types/components/my-component/my-component.d.ts +16 -0
  31. package/dist/types/components.d.ts +61 -0
  32. package/dist/types/index.d.ts +11 -0
  33. package/dist/types/stencil-public-runtime.d.ts +1839 -0
  34. package/dist/types/utils/utils.d.ts +1 -0
  35. package/hydrate/index.d.ts +287 -0
  36. package/hydrate/index.js +22761 -0
  37. package/hydrate/index.mjs +22751 -0
  38. package/hydrate/package.json +12 -0
  39. package/loader/cdn.js +1 -0
  40. package/loader/index.cjs.js +1 -0
  41. package/loader/index.d.ts +24 -0
  42. package/loader/index.es2017.js +1 -0
  43. package/loader/index.js +2 -0
  44. package/package.json +67 -0
  45. package/readme.md +111 -0
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ function format(first, middle, last) {
4
+ return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
5
+ }
6
+
7
+ exports.format = format;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Bz7jpGsd.js');
4
+ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
+
6
+ const defineCustomElements = async (win, options) => {
7
+ if (typeof window === 'undefined') return undefined;
8
+ await appGlobals.globalScripts();
9
+ return index.bootstrapLazy([["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
10
+ };
11
+
12
+ exports.setNonce = index.setNonce;
13
+ exports.defineCustomElements = defineCustomElements;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Bz7jpGsd.js');
4
+ var index$1 = require('./index.cjs.js');
5
+
6
+ const myComponentCss = () => `:host{display:block}`;
7
+
8
+ const MyComponent = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ }
12
+ /**
13
+ * The first name
14
+ */
15
+ first;
16
+ /**
17
+ * The middle name
18
+ */
19
+ middle;
20
+ /**
21
+ * The last name
22
+ */
23
+ last;
24
+ getText() {
25
+ return index$1.format(this.first, this.middle, this.last);
26
+ }
27
+ render() {
28
+ return index.h("div", { key: '8a6d28dfa48a307c7e3435580dd1314f34d0446b', style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
29
+ }
30
+ };
31
+ MyComponent.style = myComponentCss();
32
+
33
+ exports.my_component = MyComponent;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Bz7jpGsd.js');
4
+ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
+
6
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
7
+ /*
8
+ Stencil Client Patch Browser v4.41.2 | MIT Licensed | https://stenciljs.com
9
+ */
10
+
11
+ var patchBrowser = () => {
12
+ const importMeta = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('stencil-library.cjs.js', document.baseURI).href));
13
+ const opts = {};
14
+ if (importMeta !== "") {
15
+ opts.resourcesUrl = new URL(".", importMeta).href;
16
+ }
17
+ return index.promiseResolve(opts);
18
+ };
19
+
20
+ patchBrowser().then(async (options) => {
21
+ await appGlobals.globalScripts();
22
+ return index.bootstrapLazy([["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
23
+ });
24
+
25
+ exports.setNonce = index.setNonce;
@@ -0,0 +1,12 @@
1
+ {
2
+ "entries": [
3
+ "components/my-component/my-component.js"
4
+ ],
5
+ "compiler": {
6
+ "name": "@stencil/core",
7
+ "version": "4.41.2",
8
+ "typescriptVersion": "5.8.3"
9
+ },
10
+ "collections": [],
11
+ "bundles": []
12
+ }
@@ -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: '8a6d28dfa48a307c7e3435580dd1314f34d0446b', style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", 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": false,
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": false,
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": false,
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,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
+ var t,n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(e||{}),l="type",o="value",s="serialized:",r=(t,n)=>{var e;Object.entries(null!=(e=n.l.t)?e:{}).map((([e,[l]])=>{if(31&l||32&l){const l=t[e],o=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(t,e,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.o.has(e)?n.o.get(e):l}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>(0,console.error)(t,n),u=new Map,f="s-id",a="sty-id",d="c-id",$="undefined"!=typeof window?window:{},p=$.HTMLElement||class{},h={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},m=(()=>{try{return!!$.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),y=!!m&&(()=>!!$.document&&Object.getOwnPropertyDescriptor($.document.adoptedStyleSheets,"length").writable)(),b=!1,v=[],g=[],w=(t,n)=>e=>{t.push(e),b||(b=!0,n&&4&h.i?S(O):h.raf(O))},j=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){c(t)}t.length=0},O=()=>{j(v),j(g),(b=v.length>0)&&h.raf(O)},S=t=>Promise.resolve(void 0).then(t),k=w(g,!0),x=t=>{const n=new URL(t,h.u);return n.origin!==$.location.origin?n.href:n.pathname},I=t=>h.u=t;function M(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(y?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var N=(t,n,e,l)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,r=E(s,"appendChild");if(void 0!==l){o["s-oo"]=l;const t=E(s,"childNodes"),n=[o];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>r.call(s,t)))}else r.call(s,o);t["s-ol"]=o,t["s-sh"]=n["s-hn"]};function E(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var _=new WeakMap,C=(t,n,e)=>{let l=u.get(t);m&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,u.set(t,l)},A=(t,n)=>{var e,l,o;const s=L(n),r=u.get(s);if(!$.document)return s;if(t=11===t.nodeType?t:$.document,r)if("string"==typeof r){let o,i=_.get(t=t.head||t);i||_.set(t,i=new Set);const c=t.querySelector(`[${a}="${s}"]`);if(c)c.textContent=r;else if(!i.has(s)){o=$.document.createElement("style"),o.textContent=r;const c=null!=(e=h.$)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=$.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=c&&o.setAttribute("nonce",c),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(m){const n=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(r),y?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=r+n.textContent:t.prepend(o)}else t.append(o);1&n.i&&t.insertBefore(o,null),4&n.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let n=_.get(t);if(n||_.set(t,n=new Set),!n.has(s)){const e=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(r.constructor===e.CSSStyleSheet)l=r;else{l=new e.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)l.insertRule(r.cssRules[t].cssText,t)}y?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],n.add(s)}}return s},L=t=>"sc-"+t.p,D=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),U=t=>"object"==(t=typeof t)||"function"===t,P=(t,n,...e)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=n=>{for(let e=0;e<n.length;e++)l=n[e],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!U(l))&&(l+=""),s&&r?i[i.length-1].h+=l:i.push(s?R(null,l):l),r=s)};c(e),n&&n.key&&(o=n.key);const u=R(t,null);return u.m=n,i.length>0&&(u.v=i),u.j=o,u},R=(t,n)=>({i:0,O:t,h:null!=n?n:null,S:null,v:null,m:null,j:null}),V={},W=(t,n,e,l,o,s,r,i=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(d),c&&(u=c.split("."),u[0]===r||"0"===u[0])){f=F({i:0,k:u[0],I:u[1],M:u[2],N:u[3],O:s.tagName.toLowerCase(),S:s,m:{class:s.className||""}}),n.push(f),s.removeAttribute(d),t.v||(t.v=[]);const o=f.S.getAttribute("s-sn");"string"==typeof o&&("slot-fb"===f.O&&H(o,u[2],f,s,t,n,e,l,i),f.S["s-sn"]=o,f.S.removeAttribute("s-sn")),void 0!==f.N&&(t.v[f.N]=f),t=f,l&&"0"===f.M&&(l[f.N]=f.S)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)W(t,n,e,l,o,s.shadowRoot.childNodes[a],r,i);const $=s.__childNodes||s.childNodes;for(a=$.length-1;a>=0;a--)W(t,n,e,l,o,$[a],r,i)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===r||"0"===u[1])&&(c=u[0],f=F({k:u[1],I:u[2],M:u[3],N:u[4]||"0",S:s,m:null,v:null,j:null,_:null,O:null,h:null}),"t"===c?(f.S=Y(s,3),f.S&&3===f.S.nodeType&&(f.h=f.S.textContent,n.push(f),s.remove(),r===f.k&&(t.v||(t.v=[]),t.v[f.N]=f),l&&"0"===f.M&&(l[f.N]=f.S))):"c"===c?(f.S=Y(s,8),f.S&&8===f.S.nodeType&&(n.push(f),s.remove())):f.k===r&&("s"===c?H(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,l,i):"r"===c&&l&&s.remove()));else if(t&&"style"===t.O){const n=R(null,s.textContent);n.S=s,n.N="0",t.v=[n]}return t},B=(t,n)=>{if(1===t.nodeType){const e=t[f]||t.getAttribute(f);e&&n.set(e,t);let l=0;if(t.shadowRoot)for(;l<t.shadowRoot.childNodes.length;l++)B(t.shadowRoot.childNodes[l],n);const o=t.__childNodes||t.childNodes;for(l=0;l<o.length;l++)B(o[l],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},F=t=>({i:0,k:null,I:null,M:null,N:"0",S:null,m:null,v:null,j:null,_:null,O:null,h:null,...t});function H(t,n,e,l,o,s,r,i,c){l["s-sr"]=!0,e._=t||null,e.O="slot";const u=(null==o?void 0:o.S)?o.S["s-id"]||o.S.getAttribute("s-id"):"";if(i&&$.document){const s=e.S=$.document.createElement(e.O);e._&&e.S.setAttribute("name",t),o.S.shadowRoot&&u&&u!==e.k?E(o.S,"insertBefore")(s,E(o.S,"children")[0]):E(E(l,"parentNode"),"insertBefore")(s,l),z(c,n,t,l,e.k),l.remove(),"0"===e.M&&(i[e.N]=e.S)}else{const s=e.S,r=u&&u!==e.k&&o.S.shadowRoot;z(c,n,t,l,r?u:e.k),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],l=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const l=t[e]["s-nr"]||void 0;l&&l.isConnected&&n.push(l)}return n})(o.childNodes)).forEach((t=>{l===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(l),r&&o.S.insertBefore(s,o.S.children[0])}s.push(e),r.push(e),o.v||(o.v=[]),o.v[e.N]=e}var q,z=(t,n,e,l,o)=>{var s,r;let i=l.nextSibling;if(t[n]=t[n]||[],i&&!(null==(s=i.nodeValue)?void 0:s.startsWith("s.")))do{!i||(i.getAttribute&&i.getAttribute("slot")||i["s-sn"])!==e&&(""!==e||i["s-sn"]||i.getAttribute&&i.getAttribute("slot")||8!==i.nodeType&&3!==i.nodeType)||(i["s-sn"]=e,t[n].push({slot:l,node:i,hostId:o})),i=null==i?void 0:i.nextSibling}while(i&&!(null==(r=i.nodeValue)?void 0:r.startsWith("s.")))},Y=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},J=class t{static fromLocalValue(n){const e=n[l],s=o in n?n[o]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,l]of s){const o="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(l);n.set(o,s)}return n;case"object":const l={};for(const[n,e]of s)l[n]=t.fromLocalValue(e);return l;case"regexp":const{pattern:o,flags:r}=s;return RegExp(o,r);case"set":const i=new Set;for(const n of s)i.add(t.fromLocalValue(n));return i;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+e)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(l))return!1;const s=t[l];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(o))}},G=(t,n)=>"string"==typeof t&&t.startsWith(s)?t=function(t){return"string"==typeof t&&t.startsWith(s)?J.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||U(t)?t:1&n?t+"":t,K=(t,n,e,l)=>{if(e!==l&&(n.toLowerCase(),"style"===n)){for(const n in e)l&&null!=l[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in l)e&&l[n]===e[n]||(n.includes("-")?t.style.setProperty(n,l[n]):t.style[n]=l[n])}},Q=(t,n)=>{const e=11===n.S.nodeType&&n.S.host?n.S.host:n.S,l=t&&t.m||{},o=n.m||{};for(const t of T(Object.keys(l)))t in o||K(e,t,l[t],void 0);for(const t of T(Object.keys(o)))K(e,t,l[t],o[t])};function T(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var X=(t,n,e)=>{const l=n.v[e];let o,s,r=0;if(null!=l.h)o=l.S=$.document.createTextNode(l.h);else{if(!$.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.S=$.document.createElement(l.O),Q(null,l),l.v){const n="template"===l.O?o.content:o;for(r=0;r<l.v.length;++r)s=X(t,l,r),s&&n.appendChild(s)}}return o["s-hn"]=q,o},Z=(t,n,e,l,o,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===q&&(i=i.shadowRoot),"template"===e.O&&(i=i.content);o<=s;++o)l[o]&&(r=X(null,e,o),r&&(l[o].S=r,lt(i,r,n)))},tt=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.S;t&&t.remove()}}},nt=(t,n,e=!1)=>t.O===n.O&&(e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),et=(t,n,e=!1)=>{const l=n.S=t.S,o=t.v,s=n.v,r=n.h;null==r?(Q(t,n),null!==o&&null!==s?((t,n,e,l,o=!1)=>{let s,r,i=0,c=0,u=0,f=0,a=n.length-1,d=n[0],$=n[a],p=l.length-1,h=l[0],m=l[p];const y="template"===e.O?t.content:t;for(;i<=a&&c<=p;)if(null==d)d=n[++i];else if(null==$)$=n[--a];else if(null==h)h=l[++c];else if(null==m)m=l[--p];else if(nt(d,h,o))et(d,h,o),d=n[++i],h=l[++c];else if(nt($,m,o))et($,m,o),$=n[--a],m=l[--p];else if(nt(d,m,o))et(d,m,o),lt(y,d.S,$.S.nextSibling),d=n[++i],m=l[--p];else if(nt($,h,o))et($,h,o),lt(y,$.S,d.S),$=n[--a],h=l[++c];else{for(u=-1,f=i;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===h.j){u=f;break}u>=0?(r=n[u],r.O!==h.O?s=X(n&&n[c],e,u):(et(r,h,o),n[u]=void 0,s=r.S),h=l[++c]):(s=X(n&&n[c],e,c),h=l[++c]),s&&lt(d.S.parentNode,s,d.S)}i>a?Z(t,null==l[p+1]?null:l[p+1].S,e,l,c,p):c>p&&tt(n,i,a)})(l,o,n,s,e):null!==s?(null!==t.h&&(l.textContent=""),Z(l,null,n,s,0,s.length-1)):e||null===o?e&&null!==o&&null===s&&(n.v=o):tt(o,0,o.length-1)):t.h!==r&&(l.data=r)},lt=(t,n,e)=>t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e),ot=(t,n,e=!1)=>{const l=t.$hostElement$,o=t.C||R(null,null),s=(t=>t&&t.O===V)(n)?n:P(null,null,n);if(q=l.tagName,e&&s.m)for(const t of Object.keys(s.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=l[t]);s.O=null,s.i|=4,t.C=s,s.S=o.S=l.shadowRoot||l,et(o,s,e)},st=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((l=>t.A=()=>{n["s-p"].splice(e-1,1),l()})))}},rt=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);st(t,t.L);const e=()=>it(t,n);if(!n)return k(e);queueMicrotask((()=>{e()}))},it=(t,n)=>{const e=t.$hostElement$,l=e;if(!l)throw Error(`Can't render component <${e.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=pt(l,n?"componentWillLoad":"componentWillUpdate",void 0,e),o=ct(o,(()=>pt(l,"componentWillRender",void 0,e))),ct(o,(()=>ft(t,l,n)))},ct=(t,n)=>ut(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),ut=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ft=async(t,n,e)=>{var l;const o=t.$hostElement$,s=o["s-rc"];e&&(t=>{const n=t.l,e=t.$hostElement$,l=n.i,o=A(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(t);at(t,n,o,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!=(l=o["s-p"])?l:[],e=()=>dt(t);0===n.length?e():(Promise.all(n).then(e),t.i|=4,n.length=0)}},at=(t,n,e,l)=>{try{n=n.render(),t.i&=-17,t.i|=2,ot(t,n,l)}catch(n){c(n,t.$hostElement$)}return null},dt=t=>{const n=t.$hostElement$,e=n,l=t.L;pt(e,"componentDidRender",void 0,n),64&t.i?pt(e,"componentDidUpdate",void 0,n):(t.i|=64,ht(n),pt(e,"componentDidLoad",void 0,n),t.D(n),l||$t()),t.A&&(t.A(),t.A=void 0),512&t.i&&S((()=>rt(t,!1))),t.i&=-517},$t=()=>{var t;S((()=>(t=>{const n=h.ce("appload",{detail:{namespace:"stencil-library"}});return t.dispatchEvent(n),n})($))),(null==(t=h.U)?void 0:t.size)&&h.U.clear()},pt=(t,n,e,l)=>{if(t&&t[n])try{return t[n](e)}catch(t){c(t,l)}},ht=t=>t.classList.add("hydrated"),mt=(t,n,e,l)=>{const o=i(t);if(!o)return;const s=t,r=o.o.get(n),c=o.i,u=s;if(!((e=G(e,l.t[n][0]))===r||Number.isNaN(r)&&Number.isNaN(e)||(o.o.set(n,e),2!=(18&c)))){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,r,n))return;rt(o,!1)}},yt=(t,n)=>{var e,l;const o=t.prototype;if(n.t){const s=Object.entries(null!=(e=n.t)?e:{});s.map((([t,[e]])=>{if(31&e||32&e){const{get:l,set:s}=Object.getOwnPropertyDescriptor(o,t)||{};l&&(n.t[t][0]|=2048),s&&(n.t[t][0]|=4096),Object.defineProperty(o,t,{get(){return l?l.apply(this):((t,n)=>i(this).o.get(n))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(l){const o=i(this);if(o){if(s)return void 0===(32&e?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(l=o.o.get(t)),s.call(this,G(l,e)),void mt(this,t,l=32&e?this[t]:o.$hostElement$[t],n);mt(this,t,l,n)}}})}}));{const e=new Map;o.attributeChangedCallback=function(t,l,r){h.jmp((()=>{var c;const u=e.get(t),f=i(this);if(this.hasOwnProperty(u),o.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==r)return;if(null==u){const e=null==f?void 0:f.i;if(f&&e&&!(8&e)&&r!==l){const o=this,s=null==(c=n.P)?void 0:c[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&e||1&i)&&o[s].call(o,r,l,t)}))}return}const a=s.find((([t])=>t===u));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(o,u);r==this[u]||d.get&&!d.set||(this[u]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.P)?l:{}),...s.filter((([t,n])=>31&n[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))]))}}return t},bt=(t,n)=>{const e={i:n[0],p:n[1]};e.t=n[2],(()=>{if(!$.document)return;const t=$.document.querySelectorAll(`[${a}]`);let n=0;for(;n<t.length;n++)C(t[n].getAttribute(a),D(t[n].innerHTML),!0)})();const l=t.prototype.connectedCallback,o=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const e={i:0,$hostElement$:t,l:n,o:new Map,R:new Map};e.V=new Promise((t=>e.D=t)),t["s-p"]=[],t["s-rc"]=[];const l=e;t.__stencil__getHostRef=()=>l,512&n.i&&r(t,e)})(this,e)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!i(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&h.i)){const n=i(t);if(!n)return;const e=n.l,l=()=>{};if(1&n.i)(null==n?void 0:n.W)||(null==n?void 0:n.V)&&n.V.then((()=>{}));else{let l;if(n.i|=1,l=t.getAttribute(f),l){if(1&e.i){const n=A(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}((t,n,e,l)=>{var o,s,r,c;const u=t.shadowRoot,a=[],d=[],p=u?[]:null,m=R(n,null);m.S=t,!$.document||h.U&&h.U.size||B($.document.body,h.U=new Map),t[f]=e,t.removeAttribute(f),l.C=W(m,a,[],p,t,t,e,d);let y=0;const b=a.length;let v;for(;y<b;y++){v=a[y];const e=v.k+"."+v.I,l=h.U.get(e),s=v.S;if(u){if((null==(o=v.O)?void 0:(""+o).includes("-"))&&"slot-fb"!==v.O&&!v.S.shadowRoot){const t=i(v.S);if(t){const n=L(t.l),e=$.document.querySelector(`style[sty-id="${n}"]`);e&&p.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===v.O&&(s["s-cr"]=t["s-cr"]);"slot"===v.O&&(v._=v.S["s-sn"]||v.S.name||null,v.v?(v.i|=2,v.S.childNodes.length||v.v.forEach((t=>{v.S.appendChild(t.S)}))):v.i|=1),l&&l.isConnected&&(l.parentElement.shadowRoot&&""===l["s-en"]&&l.parentNode.insertBefore(s,l.nextSibling),l.parentNode.removeChild(l),u||(s["s-oo"]=parseInt(v.I))),l&&!l["s-id"]&&h.U.delete(e)}const g=[],w=d.length;let j,O,S,k,x=0,I=0;for(;x<w;x++)if(j=d[x],j&&j.length)for(S=j.length,O=0;O<S;O++){if(k=j[O],g[k.hostId]||(g[k.hostId]=h.U.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(r=null==(s=j[O-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),N(k.node,k.slot,0,k.node["s-oo"]||I),(null==(c=k.node.parentElement)?void 0:c.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),I=(k.node["s-oo"]||I)+1}if(u&&!u.childNodes.length){let n=0;const e=p.length;if(e){for(;n<e;n++){const t=p[n];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}l.$hostElement$=t})(t,e.p,l,n)}{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){st(n,n.L=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let l;if(!(32&n.i)&&(n.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const n=L(e);if(!u.has(n)){const l=()=>{};C(n,t,!!(1&e.i)),l()}}const o=n.L,s=()=>rt(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(t,n,e)}l()}})(this),l&&l.call(this)},disconnectedCallback(){(async t=>{_.has(t)&&_.delete(t),t.shadowRoot&&_.has(t.shadowRoot)&&_.delete(t.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${e.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else M.call(this,e)}}),t.is=e.p,yt(t,e)},vt=t=>h.$=t,gt=t=>Object.assign(h,t);function wt(t,n){ot({$hostElement$:n},t)}function jt(t){return t}function Ot(t,n,e){return(t||"")+(n?" "+n:"")+(e?" "+e:"")}export{p as H,Ot as format,x as getAssetPath,P as h,bt as p,wt as render,I as setAssetPath,vt as setNonce,gt as setPlatformOptions,jt as t}
@@ -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 o,format as s,h as n}from"./index.js";const d=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}first;middle;last;getText(){return s(this.first,this.middle,this.last)}render(){return n("div",{key:"8a6d28dfa48a307c7e3435580dd1314f34d0446b",style:{color:"red",width:"100%",height:"60px",boxSizing:"border-box",border:"1px solid #eee",backgroundColor:"#f5f5f5",padding:"10px",borderRadius:"4px"}},"Stencil-Component: ",this.getText())}static get style(){return":host{display:block}"}},[513,"my-component",{first:[1],middle:[1],last:[1]}]);function r(){"undefined"!=typeof customElements&&["my-component"].forEach((e=>{"my-component"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))}r();const i=d,c=r;export{i as MyComponent,c as defineCustomElement}
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };