@aegis-framework/pandora 0.1.8 → 0.3.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.
package/package.json CHANGED
@@ -1,43 +1,24 @@
1
1
  {
2
2
  "name": "@aegis-framework/pandora",
3
- "version": "0.1.8",
3
+ "version": "0.3.1",
4
4
  "description": "Aegis Framework Web Components Library",
5
- "main": "./dist/pandora.node.js",
5
+ "type": "module",
6
+ "main": "./dist/pandora.js",
6
7
  "module": "./dist/pandora.js",
7
- "legacy": "./dist/pandora.min.js",
8
- "targets": {
9
- "module": {
10
- "source": "index.js",
11
- "engines": {
12
- "browsers": "Chrome 80"
13
- },
14
- "outputFormat": "esmodule",
15
- "isLibrary": true,
16
- "optimize": true,
17
- "includeNodeModules": true
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/pandora.js",
13
+ "default": "./dist/pandora.js"
18
14
  },
19
- "main": {
20
- "source": "index.js",
21
- "engines": {
22
- "node": ">= 12"
23
- },
24
- "outputFormat": "commonjs",
25
- "isLibrary": true,
26
- "optimize": true,
27
- "includeNodeModules": true
28
- },
29
- "legacy": {
30
- "source": "browser.js",
31
- "context": "browser",
32
- "outputFormat": "global",
33
- "engines": {
34
- "browsers": "> 0.5%, last 2 versions, not dead"
35
- },
36
- "isLibrary": false,
37
- "optimize": true,
38
- "includeNodeModules": true
15
+ "./browser": {
16
+ "types": "./dist/types/index.d.ts",
17
+ "import": "./dist/pandora.browser.js",
18
+ "default": "./dist/pandora.browser.js"
39
19
  }
40
20
  },
21
+ "sideEffects": false,
41
22
  "repository": {
42
23
  "type": "git",
43
24
  "url": "https://gitlab.com/AegisFramework/Pandora.git"
@@ -46,7 +27,7 @@
46
27
  "url": "https://gitlab.com/AegisFramework/Pandora/issues"
47
28
  },
48
29
  "homepage": "https://aegisframework.com/",
49
- "author": "Diego Islas Ocampo <dev@hyuchia.com>",
30
+ "author": "Diana Islas Ocampo <dev@hyuchia.com>",
50
31
  "license": "MIT",
51
32
  "keywords": [
52
33
  "pandora",
@@ -58,25 +39,32 @@
58
39
  "library"
59
40
  ],
60
41
  "scripts": {
61
- "eslint": "eslint index.js src",
62
- "jsdoc": "jsdoc ./src -c ./.jsdoc.json && jsdoc2md -f ./src/* -c ./.jsdoc.json >> ./docs/README.md",
63
- "build": "yarn build:main && yarn build:module && yarn build:legacy",
64
- "build:main": "parcel build --target main --no-cache --public-url .",
65
- "build:module": "parcel build --target module --no-cache --public-url .",
66
- "build:legacy": "parcel build --target legacy --no-cache --public-url .",
67
- "watch": "parcel watch --target legacy --no-cache --public-url ."
42
+ "build": "yarn clean && yarn lint && yarn check && yarn build:module && yarn build:legacy && yarn build:types",
43
+ "build:module": "bun build ./src/index.ts --target browser --format esm --outdir ./dist --sourcemap=linked --minify && mv ./dist/index.js ./dist/pandora.js && mv ./dist/index.js.map ./dist/pandora.js.map && sed -i 's/index.js.map/pandora.js.map/' ./dist/pandora.js",
44
+ "build:legacy": "bun build ./src/browser.ts --target browser --format esm --outdir ./dist --sourcemap=linked --minify && mv ./dist/browser.js ./dist/pandora.browser.js && mv ./dist/browser.js.map ./dist/pandora.browser.js.map && sed -i 's/browser.js.map/pandora.browser.js.map/' ./dist/pandora.browser.js",
45
+ "build:types": "tsc --emitDeclarationOnly --declarationDir ./dist/types",
46
+ "check": "tsc --noEmit",
47
+ "lint": "eslint ./src/**/*.ts",
48
+ "clean": "rm -rf dist",
49
+ "test": "http-server -p 3000 -c-1"
68
50
  },
69
51
  "devDependencies": {
70
- "@babel/eslint-parser": "^7.16.5",
71
- "eslint": "^8.5.0",
72
- "jsdoc": "^3.6.7",
73
- "jsdoc-to-markdown": "^7.1.0",
74
- "parcel": "^2.0.1"
52
+ "@babel/eslint-parser": "^7.28.5",
53
+ "@eslint/js": "^9.39.1",
54
+ "@typescript-eslint/eslint-plugin": "^8.48.1",
55
+ "@typescript-eslint/parser": "^8.48.1",
56
+ "bun": "^1.3.3",
57
+ "eslint": "^9.39.1",
58
+ "http-server": "^14.1.1",
59
+ "typescript": "^5.9.3",
60
+ "typescript-eslint": "^8.48.1"
75
61
  },
76
62
  "files": [
77
- "index.js",
78
- "src/*",
79
- "dist/*"
63
+ "dist/",
64
+ "LICENSE",
65
+ "README.md",
66
+ "package.json"
80
67
  ],
81
- "browserslist": "> 0.5%, last 2 versions, not dead"
68
+ "browserslist": "> 0.5%, last 2 versions, not dead",
69
+ "packageManager": "yarn@4.12.0"
82
70
  }
@@ -1,2 +0,0 @@
1
- !function(){function t(t,e){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t}function e(t,e,n,r){Object.defineProperty(t,e,{get:n,set:r,enumerable:!0,configurable:!0})}var n={},r={};function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t){return u(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t,e){return c(t,e)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function y(t){return t&&t.constructor===Symbol?"symbol":typeof t}function p(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function v(t,e,n){return(v=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&_setPrototypeOf(i,n.prototype),i}).apply(null,arguments)}function m(t,e,n){return v.apply(null,arguments)}function _(t){var e="function"==typeof Map?new Map:void 0;return _=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return m(t,arguments,l(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,t)},_(t)}e(r,"Component",(function(){return k}));var b={};function g(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];try{var o=t.apply(e,r);return o instanceof Promise?o:Promise.resolve(o)}catch(t){return Promise.reject(t)}}function w(t,e,n){var r=void 0===e?"":e,i=void 0===n?0:n,o=Object.keys(t),s="",a=!0,u=!1,l=void 0;try{for(var c,f=o[Symbol.iterator]();!(a=(c=f.next()).done);a=!0){var h=c.value;if("object"==typeof t[h]){r&&0!==h.indexOf("@")?0===h.indexOf("&")?s+="".concat(h.replace(/&/g,r)," {\n"):s+="".concat(r," ").concat(h," {\n"):s+="".concat(h," {\n");var y=Object.keys(t[h]),p=!0,d=!1,v=void 0;try{for(var m,_=y[Symbol.iterator]();!(p=(m=_.next()).done);p=!0){var b=m.value;if(s+="\t".repeat(i),"object"==typeof t[h][b]){var g={};g[b]=t[h][b],s+=w(g,r,i+1)}else s+="\t".concat(b,": ").concat(t[h][b],";\n")}}catch(t){d=!0,v=t}finally{try{p||null==_.return||_.return()}finally{if(d)throw v}}s+="}\n"}else s+="\t".repeat(i),s+="\t".concat(h,": ").concat(t[h],";\n")}}catch(t){u=!0,l=t}finally{try{a||null==f.return||f.return()}finally{if(u)throw l}}return s}e(b,"callAsync",(function(){return g})),e(b,"deserializeCSS",(function(){return w}));var k=function(t){"use strict";function e(){var t;return i(this,e),(t=p(this,l(e).call(this)))._children=t.innerHTML.trim(),t._state={},t._props={},t._ready=[],t._connected=!1,t._isReady=!1,t._style={},t._styleElement=null,t}return h(e,t),s(e,[{key:"width",get:function(){return parseInt(getComputedStyle(this).width.replace("px",""))},set:function(t){this.style.width=t}},{key:"height",get:function(){return parseInt(getComputedStyle(this).height.replace("px",""))},set:function(t){this.style.height=t}},{key:"static",get:function(){return new Proxy(this.constructor,{})},set:function(t){throw new Error("Component static properties cannot be reassigned.")}},{key:"props",get:function(){var t=this;return new Proxy(this,{get:function(e,n){if(t.hasAttribute(n)){var r=t.getAttribute(n);return"string"==typeof r&&("false"===r?r=!1:"true"===r||""===r?r=!0:isNaN(r)||(r=r.indexOf(".")>0?parseFloat(r):parseInt(r))),r}return n in t._props?t._props[n]:null},set:function(t,e,n){throw new Error("Component props should be set using the `setProps` function.")}})},set:function(t){if(!1!==this._connected)throw new Error("Component props cannot be directly assigned. Use the `setProps` function instead.");this._props=Object.assign({},this._props,t)}},{key:"state",get:function(){var t=this;return new Proxy(this._state,{get:function(t,e){return t[e]},set:function(e,n,r){if(!1===t._connected)return e[n]=r;throw new Error("Component state should be set using the `setState` function instead.")}})},set:function(t){if(!1!==this._connected)throw new Error("Component state should be set using the `setState` function instead.");this._state=Object.assign({},this._state,t)}},{key:"dom",get:function(){return this},set:function(t){throw new Error("Component DOM can not be overwritten.")}},{key:"template",value:function(t){var e=void 0===t?null:t;return this.static.template(e,this)}},{key:"_createStyleElement",value:function(){var t=document.body.querySelector("style#".concat(this.static.tag));null!==t&&(this._styleElement=t),this._styleElement instanceof HTMLStyleElement||(this._styleElement=document.createElement("style"),this._styleElement.id=this.static.tag,document.body.prepend(this._styleElement))}},{key:"setStyle",value:function(t,e){var n=void 0!==e&&e;return this._createStyleElement(),"object"==typeof t?(this._style=!1===n?Object.assign({},this._style,t):Object.assign({},t),this._styleElement.innerHTML=w(this._style,this.static.tag)):"string"==typeof t&&(!1===n?this._styleElement.innerHTML+=t:this._styleElement.innerHTML=t),this._style}},{key:"setState",value:function(t){if("object"!=typeof t)throw new TypeError("A state must be an object. Received ".concat(void 0===t?"undefined":y(t),"."));var e=Object.assign({},this._state);this._state=Object.assign({},this._state,t);var n=!0,r=!1,i=void 0;try{for(var o,s=Object.keys(t)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;this.updateCallback(a,e[a],this._state[a],"state",e,this._state)}}catch(t){r=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"setProps",value:function(t){if("object"!=typeof t)throw new TypeError("Props must be an object. Received ".concat("undefined"==typeof state?"undefined":y(state),"."));var e=Object.assign({},this._props);this._props=Object.assign({},this._props,t);var n=!0,r=!1,i=void 0;try{for(var o,s=Object.keys(t)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;this.updateCallback(a,e[a],this._props[a],"props",e,this._props)}}catch(t){r=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this._setPropAttributes(!0)}},{key:"_setPropAttributes",value:function(t){var e=void 0!==t&&t,n=!0,r=!1,i=void 0;try{for(var o,s=Object.keys(this._props)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value,u=this._props[a];this.static._explicitPropTypes.indexOf(void 0===u?"undefined":y(u))>-1&&(!0===e?this.setAttribute(a,this._props[a]):(this._props[a]=this.props[a],this.setAttribute(a,this.props[a])))}}catch(t){r=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"willUpdate",value:function(t,e,n,r,i,o){return Promise.resolve()}},{key:"update",value:function(t,e,n,r,i,o){return Promise.resolve()}},{key:"didUpdate",value:function(t,e,n,r,i,o){return Promise.resolve()}},{key:"onStateUpdate",value:function(t,e,n,r,i){return Promise.resolve()}},{key:"onPropsUpdate",value:function(t,e,n,r,i){return Promise.resolve()}},{key:"willMount",value:function(){return Promise.resolve()}},{key:"didMount",value:function(){return Promise.resolve()}},{key:"willUnmount",value:function(){return Promise.resolve()}},{key:"unmount",value:function(){return Promise.resolve()}},{key:"didUnmount",value:function(){return Promise.resolve()}},{key:"forceRender",value:function(){return this._render()}},{key:"render",value:function(){return""}},{key:"_render",value:function(){var t=this,e=this.render;return null!==this.static._template&&(e=this.template),g(e,this).then((function(e){var n=t.dom.querySelector("slot");"string"==typeof e&&""===(e=e.trim())||null!=e&&(null!==n?n.replaceWith(e):(t.innerHTML=e,""!==t._children&&-1===e.indexOf(t._children)&&(t.innerHTML+=t._children)))}))}},{key:"connectedCallback",value:function(){var t=this;if(this._connected=!0,this.dataset.component=this.static.tag,void 0===this.static._template){var e=document.querySelector("template#".concat(this.static.tag));null!==e?this.template(e.innerHTML):this.static._template=null}return this._setPropAttributes(),this.willMount().then((function(){var e=t;return t._render().then((function(){var t=e;return e.didMount().then((function(){t._isReady=!0;var e=!0,n=!1,r=void 0;try{for(var i,o=t._ready[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.call(t)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}))}))}))}},{key:"ready",value:function(t){this._ready.push(t)}},{key:"disconnectedCallback",value:function(){var t=this;return this.willUnmount().then((function(){var e=t;return t.unmount().then((function(){return e.didUnmount()}))}))}},{key:"updateCallback",value:function(t,e,n,r,i,o){var s=void 0===r?"props":r,a=void 0===i?{}:i,u=void 0===o?{}:o,l=this;return this.willUpdate(s,t,e,n,a,u).then((function(){var r=l;return l.update(s,t,e,n,a,u).then((function(){var i=r;return("state"===s?r.onStateUpdate(t,e,n,a,u):r.onPropsUpdate(t,e,n,a,u)).then((function(){return i.didUpdate(s,t,e,n,a,u)}))}))})).catch((function(t){console.error(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){}}],[{key:"tag",get:function(){if(void 0===this._tag){var t=this.name,e=t.match(/([A-Z])/g),n=!0,r=!1,i=void 0;if(null!==e)try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;t=t.replace(a,"-".concat(a).toLowerCase())}}catch(t){r=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this._tag=t.slice(1)}return this._tag},set:function(t){this._tag=t}},{key:"template",value:function(t,e){var n=void 0===t?null:t,r=void 0===e?null:e;if(null===n)return"function"==typeof this._template?this._template.call(r):this._template;this._template=n,document.querySelectorAll(this.tag).forEach((function(t){t._isReady&&t.forceRender()}))}},{key:"register",value:function(){window.customElements.define(this.tag,this)}}]),e}(_(HTMLElement));a(k,"_tag",void 0),a(k,"_explicitPropTypes",["boolean","string","number"]),a(k,"_template",void 0);var O={};e(O,"ShadowComponent",(function(){return E}));var E=function(t){"use strict";function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o;return i(this,e),(o=p(this,l(e).apply(this,n)))._shadowDOM=o.attachShadow({mode:"open"}),o}return h(e,t),s(e,[{key:"setStyle",value:function(t,e){var n=void 0!==e&&e;return this._createStyleElement(),"object"==typeof t?(this._style=!1===n?Object.assign({},this._style,t):Object.assign({},t),this._styleElement.innerHTML=w(this._style)):"string"==typeof t&&(!1===n?this._styleElement.innerHTML+=t:this._styleElement.innerHTML=t),this._style}},{key:"_createStyleElement",value:function(){this._styleElement instanceof HTMLStyleElement||(this._styleElement=document.createElement("style"),this.dom.prepend(this._styleElement))}},{key:"_render",value:function(){var t=this,e=this.render;return null!==this.static._template&&(e=this.template),g(e,this).then((function(e){t._shadowDOM.innerHTML="",t._styleElement instanceof HTMLStyleElement&&t._shadowDOM.appendChild(t._styleElement),t._shadowDOM.innerHTML+=e}))}},{key:"dom",get:function(){return this._shadowDOM}}]),e}(k);t(n,r),t(n,O),t(n,b),"object"==typeof window&&(window.Pandora=n)}();
2
- //# sour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AAO4D,KAAKsI,eAzDDF,EAAN,CAA8B5F,wBCJf,iBAAXyF,SACVA,OAAOS,QAAUC","sources":["node_modules/@swc/helpers/src/_class_call_check.js","node_modules/@swc/helpers/src/_create_class.js","node_modules/@swc/helpers/src/_define_property.js","node_modules/@swc/helpers/src/_get_prototype_of.js","node_modules/@swc/helpers/src/_set_prototype_of.js","node_modules/@swc/helpers/src/_inherits.js","node_modules/@swc/helpers/src/_type_of.js","node_modules/@swc/helpers/src/_possible_constructor_return.js","node_modules/@swc/helpers/src/_assert_this_initialized.js","node_modules/@swc/helpers/src/_construct.js","node_modules/@swc/helpers/src/_wrap_native_super.js","node_modules/@swc/helpers/src/_is_native_function.js","src/Util.js","src/Component.js","src/ShadowComponent.js","browser.js"],"sourcesContent":["export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n","function getPrototypeOf(o) {\n getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return getPrototypeOf(o);\n}\n\nexport default function _getPrototypeOf(o) {\n return getPrototypeOf(o);\n}","function setPrototypeOf(o, p) {\n setPrototypeOf = Object.setPrototypeOf || function setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return setPrototypeOf(o, p);\n}\n\nexport default function _setPrototypeOf(o, p) {\n return setPrototypeOf(o, p);\n}\n","import setPrototypeOf from './_set_prototype_of';\n\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n","export default function _typeof(obj) {\n return obj && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n};\n","import assertThisInitialized from './_assert_this_initialized';\nimport _typeof from './_type_of';\n\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n","function isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () { }));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n construct = Reflect.construct;\n } else {\n construct = function construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return construct.apply(null, arguments);\n}\n\nexport default function _construct(Parent, args, Class) {\n return construct.apply(null, arguments);\n}","import construct from './_construct';\nimport isNativeFunction from './_is_native_function';\nimport getPrototypeOf from './_get_prototype_of';\nimport setPrototypeOf from './_set_prototype_of';\n\nfunction wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n wrapNativeSuper = function wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return wrapNativeSuper(Class);\n}\n\nexport default function _wrapNativeSuper(Class) {\n return wrapNativeSuper(Class);\n}\n","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n","/**\n *\n * @param {*} callable\n * @param {*} context\n * @param {...any} args\n */\nexport function callAsync (callable, context, ...args) {\n\ttry {\n\t\t// Call the provided function using the context and arguments given\n\t\tconst result = callable.apply (context, args);\n\n\t\t// Check if the function returned a simple value or a Promise\n\t\tif (result instanceof Promise) {\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn Promise.resolve (result);\n\t\t}\n\t} catch (e) {\n\t\treturn Promise.reject (e);\n\t}\n}\n\n/**\n *\n * @param {*} object\n * @param {*} encapsulation\n * @param {*} level\n */\nexport function deserializeCSS (object, encapsulation = '', level = 0, ) {\n\tconst keys = Object.keys (object);\n\n\tlet css = '';\n\n\tfor (const key of keys) {\n\t\tif (typeof object[key] === 'object') {\n\t\t\tif (encapsulation && key.indexOf ('@') !== 0) {\n\t\t\t\tif (key.indexOf ('&') === 0) {\n\t\t\t\t\tcss += `${key.replace(/&/g, encapsulation)} {\\n`;\n\t\t\t\t} else {\n\t\t\t\t\tcss += `${encapsulation} ${key} {\\n`;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcss += `${key} {\\n`;\n\t\t\t}\n\n\t\t\tconst properties = Object.keys (object[key]);\n\t\t\tfor (const property of properties) {\n\t\t\t\tcss += '\\t'.repeat (level);\n\t\t\t\tif (typeof object[key][property] === 'object') {\n\t\t\t\t\tconst temp = {};\n\t\t\t\t\ttemp[property] = object[key][property];\n\n\t\t\t\t\tcss += deserializeCSS (temp, encapsulation, level + 1);\n\t\t\t\t} else {\n\t\t\t\t\tcss += `\\t${property}: ${object[key][property]};\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcss += '}\\n';\n\t\t} else {\n\t\t\tcss += '\\t'.repeat (level);\n\t\t\tcss += `\\t${key}: ${object[key]};\\n`;\n\t\t}\n\t}\n\n\treturn css;\n}\n","/* eslint-disable no-unused-vars */\nimport { callAsync, deserializeCSS } from './Util';\n\n/**\n * A component represents a custom HTML element, and has all of its functionality\n * as well as its general structure and representation self contained on it.\n *\n * @class Component\n */\nexport class Component extends HTMLElement {\n\n\t/**\n\t * _tag {String} - The tag name for the component\n\t *\n\t * @static\n\t */\n\tstatic _tag;\n\n\tstatic get tag () {\n\t\tif (typeof this._tag === 'undefined') {\n\t\t\tlet tag = this.name;\n\t\t\tconst matches = tag.match (/([A-Z])/g);\n\t\t\tif (matches !== null) {\n\t\t\t\tfor (const match of matches) {\n\t\t\t\t\ttag = tag.replace (match, `-${match}`.toLowerCase ());\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._tag = tag.slice (1);\n\t\t}\n\t\treturn this._tag;\n\t}\n\n\tstatic set tag (value) {\n\t\tthis._tag = value;\n\t}\n\n\t/**\n\t * These are the types that can be set as properties on the HTML code of the\n\t * element.\n\t */\n\tstatic _explicitPropTypes = ['boolean', 'string', 'number'];\n\n\t/**\n\t *\n\t *\n\t * @static\n\t */\n\tstatic _template = undefined;\n\n\tstatic template (html = null, context = null) {\n\t\tif (html !== null) {\n\t\t\tthis._template = html;\n\t\t\tdocument.querySelectorAll(this.tag).forEach((instance) => {\n\t\t\t\tif (instance._isReady) {\n\t\t\t\t\tinstance.forceRender ();\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\n\t\t\t// Check if no parameters were set but the HTML is still a function to be called\n\t\t\tif (typeof this._template === 'function') {\n\t\t\t\treturn this._template.call (context);\n\t\t\t}\n\n\t\t\t// If this is reached, the HTML was just a string\n\t\t\treturn this._template;\n\t\t}\n\t}\n\n\tconstructor () {\n\t\tsuper ();\n\t\tthis._children = this.innerHTML.trim ();\n\n\t\t// State Object for the component\n\t\tthis._state = {};\n\n\t\t// Props Object for the component\n\t\tthis._props = {};\n\n\t\t// List of callbacks to run once the component has been mounted successfully\n\t\tthis._ready = [];\n\n\t\tthis._connected = false;\n\t\tthis._isReady = false;\n\n\t\tthis._style = {};\n\n\t\tthis._styleElement = null;\n\t}\n\n\t/**\n\t * width - Determines the real (computed) width of the element\n\t *\n\t * @return {int} - Computed Width of the element on pixels\n\t */\n\tget width () {\n\t\treturn parseInt (getComputedStyle (this).width.replace ('px', ''));\n\t}\n\n\tset width (value) {\n\t\tthis.style.width = value;\n\t}\n\n\t/**\n\t * height - Determines the real (computed) height of the element\n\t *\n\t * @return {int} - Computed height of the element on pixels\n\t */\n\tget height () {\n\t\treturn parseInt (getComputedStyle(this).height.replace ('px', ''));\n\t}\n\n\tset height (value) {\n\t\tthis.style.height = value;\n\t}\n\n\tget static () {\n\t\treturn new Proxy (this.constructor, {});\n\t}\n\n\tset static (value) {\n\t\tthrow new Error ('Component static properties cannot be reassigned.');\n\t}\n\n\tget props () {\n\t\treturn new Proxy (this, {\n\t\t\tget: (target, key) => {\n\t\t\t\tif (this.hasAttribute (key)) {\n\t\t\t\t\tlet value = this.getAttribute (key);\n\t\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\t\tif (value === 'false') {\n\t\t\t\t\t\t\tvalue = false;\n\t\t\t\t\t\t} else if (value === 'true' || value === '') {\n\t\t\t\t\t\t\tvalue = true;\n\t\t\t\t\t\t} else if (!isNaN (value)) {\n\t\t\t\t\t\t\tif (value.indexOf ('.') > 0) {\n\t\t\t\t\t\t\t\tvalue = parseFloat (value);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvalue = parseInt (value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t} else if (key in this._props) {\n\t\t\t\t\treturn this._props[key];\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tset: (target, key, value) => {\n\t\t\t\tthrow new Error ('Component props should be set using the `setProps` function.');\n\t\t\t}\n\t\t});\n\t}\n\n\tset props (value) {\n\t\tif (this._connected === false) {\n\t\t\tthis._props = Object.assign ({}, this._props, value);\n\t\t} else {\n\t\t\tthrow new Error ('Component props cannot be directly assigned. Use the `setProps` function instead.');\n\t\t}\n\t}\n\n\tget state () {\n\t\treturn new Proxy (this._state, {\n\t\t\tget: (target, key) => {\n\t\t\t\treturn target[key];\n\t\t\t},\n\t\t\tset: (target, key, value) => {\n\t\t\t\tif (this._connected === false) {\n\t\t\t\t\treturn target[key] = value;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error ('Component state should be set using the `setState` function instead.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}\n\n\tset state (value) {\n\t\tif (this._connected === false) {\n\t\t\tthis._state = Object.assign ({}, this._state, value);\n\t\t} else {\n\t\t\tthrow new Error ('Component state should be set using the `setState` function instead.');\n\t\t}\n\t}\n\n\tget dom () {\n\t\treturn this;\n\t}\n\n\tset dom (value) {\n\t\tthrow new Error ('Component DOM can not be overwritten.');\n\t}\n\n\t/**\n\t * register - Register the component as a custom HTML element\n\t * using the component's tag as the actual element tag.\n\t *\n\t * This action cannot be reverted nor the controller class for\n\t * the element can be changed.\n\t */\n\tstatic register () {\n\t\twindow.customElements.define (this.tag, this);\n\t}\n\n\t/**\n\t * template - A simple function providing access to the basic HTML\n\t * structure of the component.\n\t *\n\t * @param {function|string} html - A string or function that renders the\n\t * component into a valid HTML structure.\n\t *\n\t * @returns {void|string} - Void or the HTML structure in a string\n\t */\n\ttemplate (html = null) {\n\t\treturn this.static.template (html, this);\n\t}\n\n\t_createStyleElement () {\n\t\tconst sharedStyle = document.body.querySelector (`style#${this.static.tag}`);\n\n\t\tif (sharedStyle !== null) {\n\t\t\tthis._styleElement = sharedStyle;\n\t\t}\n\n\t\tif (!(this._styleElement instanceof HTMLStyleElement)) {\n\t\t\tthis._styleElement = document.createElement ('style');\n\t\t\tthis._styleElement.id = this.static.tag;\n\t\t\tdocument.body.prepend (this._styleElement);\n\t\t}\n\t}\n\n\tsetStyle (style, reset = false) {\n\t\tthis._createStyleElement ();\n\n\t\tif (typeof style === 'object') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._style = Object.assign ({}, this._style, style);\n\t\t\t} else {\n\t\t\t\tthis._style = Object.assign ({}, style);\n\t\t\t}\n\t\t\tthis._styleElement.innerHTML = deserializeCSS (this._style, this.static.tag);\n\t\t} else if (typeof style === 'string') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._styleElement.innerHTML += style;\n\t\t\t} else {\n\t\t\t\tthis._styleElement.innerHTML = style;\n\t\t\t}\n\t\t}\n\n\t\treturn this._style;\n\t}\n\n\tsetState (state) {\n\t\tif (typeof state === 'object') {\n\t\t\tconst oldState = Object.assign ({}, this._state);\n\n\t\t\tthis._state = Object.assign ({}, this._state, state);\n\n\t\t\tfor (const key of Object.keys (state)) {\n\t\t\t\tthis.updateCallback (key, oldState[key], this._state[key], 'state', oldState, this._state);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError(`A state must be an object. Received ${typeof state}.`);\n\t\t}\n\t}\n\n\tsetProps (props) {\n\t\tif (typeof props === 'object') {\n\t\t\tconst oldProps = Object.assign ({}, this._props);\n\n\t\t\tthis._props = Object.assign ({}, this._props, props);\n\n\t\t\tfor (const key of Object.keys (props)) {\n\t\t\t\tthis.updateCallback (key, oldProps[key], this._props[key], 'props', oldProps, this._props);\n\t\t\t}\n\t\t\tthis._setPropAttributes (true);\n\t\t} else {\n\t\t\tthrow new TypeError(`Props must be an object. Received ${typeof state}.`);\n\t\t}\n\t}\n\n\t_setPropAttributes (update = false) {\n\t\tfor (const key of Object.keys (this._props)) {\n\t\t\tconst value = this._props[key];\n\t\t\tif (this.static._explicitPropTypes.indexOf (typeof value) > -1) {\n\t\t\t\tif (update === true) {\n\t\t\t\t\tthis.setAttribute (key, this._props[key]);\n\t\t\t\t} else {\n\t\t\t\t\tthis._props[key] = this.props[key];\n\t\t\t\t\tthis.setAttribute (key, this.props[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * =========================\n\t * Update Cycle\n\t * =========================\n */\n\n\twillUpdate (origin, property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tupdate (origin, property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tdidUpdate (origin, property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tonStateUpdate (property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tonPropsUpdate (property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\t/*\n\t * =========================\n\t * Mount Cycle\n\t * =========================\n */\n\n\twillMount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\tdidMount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\t/*\n\t * =========================\n\t * Unmount Cycle\n\t * =========================\n */\n\n\twillUnmount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\tunmount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\tdidUnmount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\t/*\n\t * =========================\n\t * Render Cycle\n\t * =========================\n */\n\n\t/**\n\t * Forces the component to be rendered again.\n\t *\n\t * @returns {string|Promise<string>} - The HTML to render on the component\n\t */\n\tforceRender () {\n\t\treturn this._render ();\n\t}\n\n\t/**\n\t * This function is the one that defines the HTML that will be rendered\n\t * inside the component. Since some content may need to be loaded before the\n\t * component is rendered, this function can also return a promise.\n\t *\n\t * @returns {string|Promise<string>} - The HTML to render on the component\n\t */\n\trender () {\n\t\treturn '';\n\t}\n\n\t_render () {\n\t\tlet render = this.render;\n\n\t\t// Check if a template has been set to this component, and if that's the\n\t\t// case, use that instead of the render function to render the component's\n\t\t// HTML code.\n\t\tif (this.static._template !== null) {\n\t\t\trender = this.template;\n\t\t}\n\n\t\t// Call the render function asynchronously and set the HTML from it to the\n\t\t// component.\n\t\treturn callAsync (render, this).then ((html) => {\n\t\t\tconst slot = this.dom.querySelector ('slot');\n\n\t\t\tif (typeof html === 'string') {\n\t\t\t\thtml = html.trim ();\n\n\t\t\t\tif (html === '') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (html === null || typeof html === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (slot !== null) {\n\t\t\t\tslot.replaceWith (html);\n\t\t\t} else {\n\t\t\t\tthis.innerHTML = html;\n\n\t\t\t\tif (this._children !== '' && html.indexOf(this._children) === -1) {\n\t\t\t\t\tthis.innerHTML += this._children;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tconnectedCallback () {\n\t\t// Set the state as connected\n\t\tthis._connected = true;\n\n\t\t// Add a data property with the tag of the component\n\t\tthis.dataset.component = this.static.tag;\n\n\t\t// Check if a template for this component was set. The contents on this\n\t\t// if block will only be run once.\n\t\tif (typeof this.static._template === 'undefined') {\n\n\t\t\t// Check if there is an HTML template for this component\n\t\t\tconst template = document.querySelector (`template#${this.static.tag}`);\n\n\t\t\tif (template !== null) {\n\t\t\t\t// If there is, set is as the template for the component\n\t\t\t\tthis.template (template.innerHTML);\n\t\t\t} else {\n\t\t\t\t// If not, set is as null\n\t\t\t\tthis.static._template = null;\n\t\t\t}\n\t\t}\n\n\t\t// Set the initial prop attributes for the component using the given\n\t\t// props\n\t\tthis._setPropAttributes ();\n\n\t\t// Start the Mount Cycle\n\t\treturn this.willMount ().then (() => {\n\n\t\t\treturn this._render ().then (() => {\n\t\t\t\treturn this.didMount ().then (() => {\n\n\t\t\t\t\tthis._isReady = true;\n\t\t\t\t\tfor (const callback of this._ready) {\n\t\t\t\t\t\tcallback.call (this);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Adds a callback to be run once the component has been mounted successfully\n\t *\n\t * @param {function} callback - Callback to run once the component is ready\n\t */\n\tready (callback) {\n\t\tthis._ready.push (callback);\n\t}\n\n\n\tdisconnectedCallback () {\n\t\treturn this.willUnmount ().then (() => {\n\t\t\treturn this.unmount ().then (() => {\n\t\t\t\treturn this.didUnmount ();\n\t\t\t});\n\t\t});\n\t}\n\n\tupdateCallback (property, oldValue, newValue, origin = 'props', oldObject = {}, newObject = {}) {\n\t\treturn this.willUpdate (origin, property, oldValue, newValue, oldObject, newObject).then (() => {\n\t\t\treturn this.update (origin, property, oldValue, newValue, oldObject, newObject).then (() => {\n\t\t\t\tlet promise;\n\t\t\t\tif (origin === 'state') {\n\t\t\t\t\tpromise = this.onStateUpdate (property, oldValue, newValue, oldObject, newObject);\n\t\t\t\t} else {\n\t\t\t\t\tpromise = this.onPropsUpdate (property, oldValue, newValue, oldObject, newObject);\n\t\t\t\t}\n\t\t\t\treturn promise.then (() => {\n\t\t\t\t\treturn this.didUpdate (origin, property, oldValue, newValue, oldObject, newObject);\n\t\t\t\t});\n\t\t\t});\n\t\t}).catch ((e) => {\n\t\t\tconsole.error (e);\n\t\t\t// Component should not update\n\t\t});\n\t}\n\n\tattributeChangedCallback (property, oldValue, newValue) {\n\n\t}\n}\n","import { Component } from './Component';\nimport { callAsync, deserializeCSS } from './Util';\n\n/**\n * @class ShadowComponent\n */\nexport class ShadowComponent extends Component {\n\tconstructor (...props) {\n\t\tsuper (...props);\n\n\t\tthis._shadowDOM = this.attachShadow ({ mode: 'open' });\n\t}\n\n\tsetStyle (style, reset = false) {\n\t\tthis._createStyleElement ();\n\n\t\tif (typeof style === 'object') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._style = Object.assign ({}, this._style, style);\n\t\t\t} else {\n\t\t\t\tthis._style = Object.assign ({}, style);\n\t\t\t}\n\t\t\tthis._styleElement.innerHTML = deserializeCSS (this._style);\n\t\t} else if (typeof style === 'string') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._styleElement.innerHTML += style;\n\t\t\t} else {\n\t\t\t\tthis._styleElement.innerHTML = style;\n\t\t\t}\n\t\t}\n\n\t\treturn this._style;\n\t}\n\n\t_createStyleElement () {\n\t\tif (!(this._styleElement instanceof HTMLStyleElement)) {\n\t\t\tthis._styleElement = document.createElement ('style');\n\t\t\tthis.dom.prepend (this._styleElement);\n\t\t}\n\t}\n\n\t_render () {\n\t\tlet render = this.render;\n\n\t\t// Check if a template has been set to this component, and if that's the\n\t\t// case, use that instead of the render function to render the component's\n\t\t// HTML code.\n\t\tif (this.static._template !== null) {\n\t\t\trender = this.template;\n\t\t}\n\n\t\t// Call the render function asynchronously and set the HTML from it to the\n\t\t// component.\n\t\treturn callAsync (render, this).then ((html) => {\n\t\t\tthis._shadowDOM.innerHTML = '';\n\t\t\tif (this._styleElement instanceof HTMLStyleElement) {\n\t\t\t\tthis._shadowDOM.appendChild (this._styleElement);\n\t\t\t}\n\t\t\tthis._shadowDOM.innerHTML += html;\n\t\t});\n\t}\n\n\tget dom () {\n\t\treturn this._shadowDOM;\n\t}\n\n\n}\n","import * as Pandora from './index';\n\nif (typeof window === 'object') {\n\twindow.Pandora = Pandora;\n}"],"names":["instance","Constructor","TypeError","$e5f9bd0c37e9914c$var$_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","obj","value","$7dc24fd3d8e84af6$var$getPrototypeOf","o1","setPrototypeOf","getPrototypeOf","o","__proto__","$ac93fd2313270fd8$var$setPrototypeOf","p1","p","subClass","superClass","create","constructor","$ac93fd2313270fd8$export$2e2bcd8739ae039","Symbol","self","call","$ee4fec65ef715af7$export$2e2bcd8739ae039","ReferenceError","$08b63c45f54847ee$export$2e2bcd8739ae039","$fb222e0933d810ce$var$isNativeReflectConstruct","Reflect","construct","sham","Proxy","Date","toString","e","$fb222e0933d810ce$var$construct","Parent1","args1","Class1","Parent","args","Class","a","push","apply","Function","bind","_setPrototypeOf","arguments","$24ab38bdd93e1228$var$wrapNativeSuper","_cache","Map","undefined","fn","indexOf","has","get","set","Wrapper","$fb222e0933d810ce$export$2e2bcd8739ae039","$7dc24fd3d8e84af6$export$2e2bcd8739ae039","this","$6dd34ff2c499496e$export$ae8c526ac59e8cc8","callable","context","_len","Array","_key","result","Promise","resolve","reject","$6dd34ff2c499496e$export$d394fc4e7cd94f20","object","param","param1","encapsulation","level","keys","css","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","iterator","next","done","concat","replace","properties","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_step1","_iterator1","property","repeat","temp","err","return","$f24d7e5d01db5130$export$16fa2f45be04daa8","HTMLElement","_children","_this","innerHTML","trim","_state","_props","_ready","_connected","_isReady","_style","_styleElement","parseInt","getComputedStyle","width","style","height","Error","hasAttribute","getAttribute","isNaN","parseFloat","assign","html","static","template","sharedStyle","document","body","querySelector","tag","HTMLStyleElement","createElement","id","prepend","reset","_createStyleElement","state","oldState","updateCallback","oldProps","_setPropAttributes","update","_explicitPropTypes","setAttribute","origin","oldValue","newValue","oldObject","newObject","_render","render","_template","then","slot","dom","replaceWith","dataset","component","willMount","_this2","_this1","didMount","callback","willUnmount","unmount","_this3","didUnmount","param2","willUpdate","_this5","_this4","onStateUpdate","onPropsUpdate","didUpdate","catch","console","error","_tag","name","matches","match","toLowerCase","slice","param3","querySelectorAll","forEach","forceRender","window","customElements","define","$9f3959c2c4ca0ece$export$bfd3c54ba0d8c9e0","Component","_shadowDOM","attachShadow","mode","appendChild","Pandora","$2f70730b9acc4592$exports"],"version":3,"file":"pandora.min.js.map"}
@@ -1,2 +0,0 @@
1
- function t(t,e){return Object.keys(e).forEach((function(s){"default"===s||"__esModule"===s||t.hasOwnProperty(s)||Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[s]}})})),t}function e(t,e,s,n){Object.defineProperty(t,e,{get:s,set:n,enumerable:!0,configurable:!0})}var s={};e(s,"Component",(()=>o));var n={};function i(t,e,...s){try{const n=t.apply(e,s);return n instanceof Promise?n:Promise.resolve(n)}catch(t){return Promise.reject(t)}}function r(t,e="",s=0){const n=Object.keys(t);let i="";for(const o of n)if("object"==typeof t[o]){e&&0!==o.indexOf("@")?0===o.indexOf("&")?i+=`${o.replace(/&/g,e)} {\n`:i+=`${e} ${o} {\n`:i+=`${o} {\n`;const n=Object.keys(t[o]);for(const l of n)if(i+="\t".repeat(s),"object"==typeof t[o][l]){const n={};n[l]=t[o][l],i+=r(n,e,s+1)}else i+=`\t${l}: ${t[o][l]};\n`;i+="}\n"}else i+="\t".repeat(s),i+=`\t${o}: ${t[o]};\n`;return i}e(n,"callAsync",(()=>i)),e(n,"deserializeCSS",(()=>r));class o extends HTMLElement{static _tag;static get tag(){if(void 0===this._tag){let t=this.name;const e=t.match(/([A-Z])/g);if(null!==e)for(const s of e)t=t.replace(s,`-${s}`.toLowerCase());this._tag=t.slice(1)}return this._tag}static set tag(t){this._tag=t}static _explicitPropTypes=["boolean","string","number"];static _template=void 0;static template(t=null,e=null){if(null===t)return"function"==typeof this._template?this._template.call(e):this._template;this._template=t,document.querySelectorAll(this.tag).forEach((t=>{t._isReady&&t.forceRender()}))}constructor(){super(),this._children=this.innerHTML.trim(),this._state={},this._props={},this._ready=[],this._connected=!1,this._isReady=!1,this._style={},this._styleElement=null}get width(){return parseInt(getComputedStyle(this).width.replace("px",""))}set width(t){this.style.width=t}get height(){return parseInt(getComputedStyle(this).height.replace("px",""))}set height(t){this.style.height=t}get static(){return new Proxy(this.constructor,{})}set static(t){throw new Error("Component static properties cannot be reassigned.")}get props(){return new Proxy(this,{get:(t,e)=>{if(this.hasAttribute(e)){let t=this.getAttribute(e);return"string"==typeof t&&("false"===t?t=!1:"true"===t||""===t?t=!0:isNaN(t)||(t=t.indexOf(".")>0?parseFloat(t):parseInt(t))),t}return e in this._props?this._props[e]:null},set:(t,e,s)=>{throw new Error("Component props should be set using the `setProps` function.")}})}set props(t){if(!1!==this._connected)throw new Error("Component props cannot be directly assigned. Use the `setProps` function instead.");this._props=Object.assign({},this._props,t)}get state(){return new Proxy(this._state,{get:(t,e)=>t[e],set:(t,e,s)=>{if(!1===this._connected)return t[e]=s;throw new Error("Component state should be set using the `setState` function instead.")}})}set state(t){if(!1!==this._connected)throw new Error("Component state should be set using the `setState` function instead.");this._state=Object.assign({},this._state,t)}get dom(){return this}set dom(t){throw new Error("Component DOM can not be overwritten.")}static register(){window.customElements.define(this.tag,this)}template(t=null){return this.static.template(t,this)}_createStyleElement(){const t=document.body.querySelector(`style#${this.static.tag}`);null!==t&&(this._styleElement=t),this._styleElement instanceof HTMLStyleElement||(this._styleElement=document.createElement("style"),this._styleElement.id=this.static.tag,document.body.prepend(this._styleElement))}setStyle(t,e=!1){return this._createStyleElement(),"object"==typeof t?(this._style=!1===e?Object.assign({},this._style,t):Object.assign({},t),this._styleElement.innerHTML=r(this._style,this.static.tag)):"string"==typeof t&&(!1===e?this._styleElement.innerHTML+=t:this._styleElement.innerHTML=t),this._style}setState(t){if("object"!=typeof t)throw new TypeError(`A state must be an object. Received ${typeof t}.`);{const e=Object.assign({},this._state);this._state=Object.assign({},this._state,t);for(const s of Object.keys(t))this.updateCallback(s,e[s],this._state[s],"state",e,this._state)}}setProps(t){if("object"!=typeof t)throw new TypeError(`Props must be an object. Received ${typeof state}.`);{const e=Object.assign({},this._props);this._props=Object.assign({},this._props,t);for(const s of Object.keys(t))this.updateCallback(s,e[s],this._props[s],"props",e,this._props);this._setPropAttributes(!0)}}_setPropAttributes(t=!1){for(const e of Object.keys(this._props)){const s=this._props[e];this.static._explicitPropTypes.indexOf(typeof s)>-1&&(!0===t?this.setAttribute(e,this._props[e]):(this._props[e]=this.props[e],this.setAttribute(e,this.props[e])))}}willUpdate(t,e,s,n,i,r){return Promise.resolve()}update(t,e,s,n,i,r){return Promise.resolve()}didUpdate(t,e,s,n,i,r){return Promise.resolve()}onStateUpdate(t,e,s,n,i){return Promise.resolve()}onPropsUpdate(t,e,s,n,i){return Promise.resolve()}willMount(){return Promise.resolve()}didMount(){return Promise.resolve()}willUnmount(){return Promise.resolve()}unmount(){return Promise.resolve()}didUnmount(){return Promise.resolve()}forceRender(){return this._render()}render(){return""}_render(){let t=this.render;return null!==this.static._template&&(t=this.template),i(t,this).then((t=>{const e=this.dom.querySelector("slot");"string"==typeof t&&""===(t=t.trim())||null!=t&&(null!==e?e.replaceWith(t):(this.innerHTML=t,""!==this._children&&-1===t.indexOf(this._children)&&(this.innerHTML+=this._children)))}))}connectedCallback(){if(this._connected=!0,this.dataset.component=this.static.tag,void 0===this.static._template){const t=document.querySelector(`template#${this.static.tag}`);null!==t?this.template(t.innerHTML):this.static._template=null}return this._setPropAttributes(),this.willMount().then((()=>this._render().then((()=>this.didMount().then((()=>{this._isReady=!0;for(const t of this._ready)t.call(this)}))))))}ready(t){this._ready.push(t)}disconnectedCallback(){return this.willUnmount().then((()=>this.unmount().then((()=>this.didUnmount()))))}updateCallback(t,e,s,n="props",i={},r={}){return this.willUpdate(n,t,e,s,i,r).then((()=>this.update(n,t,e,s,i,r).then((()=>{let o;return o="state"===n?this.onStateUpdate(t,e,s,i,r):this.onPropsUpdate(t,e,s,i,r),o.then((()=>this.didUpdate(n,t,e,s,i,r)))})))).catch((t=>{console.error(t)}))}attributeChangedCallback(t,e,s){}}var l={};e(l,"ShadowComponent",(()=>h));class h extends o{constructor(...t){super(...t),this._shadowDOM=this.attachShadow({mode:"open"})}setStyle(t,e=!1){return this._createStyleElement(),"object"==typeof t?(this._style=!1===e?Object.assign({},this._style,t):Object.assign({},t),this._styleElement.innerHTML=r(this._style)):"string"==typeof t&&(!1===e?this._styleElement.innerHTML+=t:this._styleElement.innerHTML=t),this._style}_createStyleElement(){this._styleElement instanceof HTMLStyleElement||(this._styleElement=document.createElement("style"),this.dom.prepend(this._styleElement))}_render(){let t=this.render;return null!==this.static._template&&(t=this.template),i(t,this).then((t=>{this._shadowDOM.innerHTML="",this._styleElement instanceof HTMLStyleElement&&this._shadowDOM.appendChild(this._styleElement),this._shadowDOM.innerHTML+=t}))}get dom(){return this._shadowDOM}}t(module.exports,s),t(module.exports,l),t(module.exports,n);
2
- //# sourceMappingURL=pandora.node.js.map
@@ -1 +0,0 @@
1
- {"mappings":"4UAMgBA,EAAWC,EAAUC,KAAYC,GAChD,IAEC,MAAMC,EAASH,EAASI,MAAOH,EAASC,GAGxC,OAAIC,aAAkBE,QACdF,EAEAE,QAAQC,QAASH,GAExB,MAAOI,GACR,OAAOF,QAAQG,OAAQD,aAUTE,EAAgBC,EAAQC,EAAgB,GAAIC,EAAQ,GACnE,MAAMC,EAAOC,OAAOD,KAAMH,GAE1B,IAAIK,EAAM,GAEV,IAAK,MAAMC,KAAOH,EACjB,GAA2B,iBAAhBH,EAAOM,GAAmB,CAChCL,GAAuC,IAAtBK,EAAIC,QAAS,KACP,IAAtBD,EAAIC,QAAS,KAChBF,GAAG,GAAOC,EAAIE,QAAO,KAAOP,SAE5BI,GAAG,GAAOJ,KAAiBK,QAG5BD,GAAG,GAAOC,QAGX,MAAMG,EAAaL,OAAOD,KAAMH,EAAOM,IACvC,IAAK,MAAMI,KAAYD,EAEtB,GADAJ,GAAO,KAAKM,OAAQT,GACiB,iBAA1BF,EAAOM,GAAKI,GAAwB,CAC9C,MAAME,EAAO,GACbA,EAAKF,GAAYV,EAAOM,GAAKI,GAE7BL,GAAON,EAAgBa,EAAMX,EAAeC,EAAQ,QAEpDG,GAAG,KAASK,MAAaV,EAAOM,GAAKI,QAGvCL,GAAO,WAEPA,GAAO,KAAKM,OAAQT,GACpBG,GAAG,KAASC,MAAQN,EAAOM,QAI7B,OAAOD,+DC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kBxB,OAjBAnE,KAAK0D,sBAEgB,iBAAV1B,GAEThC,KAAK0B,QADQ,IAAVyC,EACWhF,OAAO8D,OAAQ,GAAIjD,KAAK0B,OAAQM,GAEhC7C,OAAO8D,OAAQ,GAAIjB,GAElChC,KAAK2B,cAAcP,UAAYtC,EAAgBkB,KAAK0B,SACzB,iBAAVM,KACH,IAAVmC,EACHnE,KAAK2B,cAAcP,WAAaY,EAEhChC,KAAK2B,cAAcP,UAAYY,GAI1BhC,KAAK0B,OAGbgC,sBACO1D,KAAK2B,yBAAyBmC,mBACnC9D,KAAK2B,cAAgBf,SAASmD,cAAe,SAC7C/D,KAAKmD,IAAIc,QAASjE,KAAK2B,gBAIzBwF,UACC,IAAIC,EAASpH,KAAKoH,OAWlB,OAN8B,OAA1BpH,KAAKF,OAAOY,YACf0G,EAASpH,KAAKwD,UAKRpF,EAAWgJ,EAAQpH,MAAMqH,MAAOC,IACtCtH,KAAK+I,WAAW3H,UAAY,GACxBpB,KAAK2B,yBAAyBmC,kBACjC9D,KAAK+I,WAAWG,YAAalJ,KAAK2B,eAEnC3B,KAAK+I,WAAW3H,WAAakG,KAI3BnE,UACH,OAAOnD,KAAK+I","sources":["src/Util.js","src/Component.js","src/ShadowComponent.js"],"sourcesContent":["/**\n *\n * @param {*} callable\n * @param {*} context\n * @param {...any} args\n */\nexport function callAsync (callable, context, ...args) {\n\ttry {\n\t\t// Call the provided function using the context and arguments given\n\t\tconst result = callable.apply (context, args);\n\n\t\t// Check if the function returned a simple value or a Promise\n\t\tif (result instanceof Promise) {\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn Promise.resolve (result);\n\t\t}\n\t} catch (e) {\n\t\treturn Promise.reject (e);\n\t}\n}\n\n/**\n *\n * @param {*} object\n * @param {*} encapsulation\n * @param {*} level\n */\nexport function deserializeCSS (object, encapsulation = '', level = 0, ) {\n\tconst keys = Object.keys (object);\n\n\tlet css = '';\n\n\tfor (const key of keys) {\n\t\tif (typeof object[key] === 'object') {\n\t\t\tif (encapsulation && key.indexOf ('@') !== 0) {\n\t\t\t\tif (key.indexOf ('&') === 0) {\n\t\t\t\t\tcss += `${key.replace(/&/g, encapsulation)} {\\n`;\n\t\t\t\t} else {\n\t\t\t\t\tcss += `${encapsulation} ${key} {\\n`;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcss += `${key} {\\n`;\n\t\t\t}\n\n\t\t\tconst properties = Object.keys (object[key]);\n\t\t\tfor (const property of properties) {\n\t\t\t\tcss += '\\t'.repeat (level);\n\t\t\t\tif (typeof object[key][property] === 'object') {\n\t\t\t\t\tconst temp = {};\n\t\t\t\t\ttemp[property] = object[key][property];\n\n\t\t\t\t\tcss += deserializeCSS (temp, encapsulation, level + 1);\n\t\t\t\t} else {\n\t\t\t\t\tcss += `\\t${property}: ${object[key][property]};\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcss += '}\\n';\n\t\t} else {\n\t\t\tcss += '\\t'.repeat (level);\n\t\t\tcss += `\\t${key}: ${object[key]};\\n`;\n\t\t}\n\t}\n\n\treturn css;\n}\n","/* eslint-disable no-unused-vars */\nimport { callAsync, deserializeCSS } from './Util';\n\n/**\n * A component represents a custom HTML element, and has all of its functionality\n * as well as its general structure and representation self contained on it.\n *\n * @class Component\n */\nexport class Component extends HTMLElement {\n\n\t/**\n\t * _tag {String} - The tag name for the component\n\t *\n\t * @static\n\t */\n\tstatic _tag;\n\n\tstatic get tag () {\n\t\tif (typeof this._tag === 'undefined') {\n\t\t\tlet tag = this.name;\n\t\t\tconst matches = tag.match (/([A-Z])/g);\n\t\t\tif (matches !== null) {\n\t\t\t\tfor (const match of matches) {\n\t\t\t\t\ttag = tag.replace (match, `-${match}`.toLowerCase ());\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._tag = tag.slice (1);\n\t\t}\n\t\treturn this._tag;\n\t}\n\n\tstatic set tag (value) {\n\t\tthis._tag = value;\n\t}\n\n\t/**\n\t * These are the types that can be set as properties on the HTML code of the\n\t * element.\n\t */\n\tstatic _explicitPropTypes = ['boolean', 'string', 'number'];\n\n\t/**\n\t *\n\t *\n\t * @static\n\t */\n\tstatic _template = undefined;\n\n\tstatic template (html = null, context = null) {\n\t\tif (html !== null) {\n\t\t\tthis._template = html;\n\t\t\tdocument.querySelectorAll(this.tag).forEach((instance) => {\n\t\t\t\tif (instance._isReady) {\n\t\t\t\t\tinstance.forceRender ();\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\n\t\t\t// Check if no parameters were set but the HTML is still a function to be called\n\t\t\tif (typeof this._template === 'function') {\n\t\t\t\treturn this._template.call (context);\n\t\t\t}\n\n\t\t\t// If this is reached, the HTML was just a string\n\t\t\treturn this._template;\n\t\t}\n\t}\n\n\tconstructor () {\n\t\tsuper ();\n\t\tthis._children = this.innerHTML.trim ();\n\n\t\t// State Object for the component\n\t\tthis._state = {};\n\n\t\t// Props Object for the component\n\t\tthis._props = {};\n\n\t\t// List of callbacks to run once the component has been mounted successfully\n\t\tthis._ready = [];\n\n\t\tthis._connected = false;\n\t\tthis._isReady = false;\n\n\t\tthis._style = {};\n\n\t\tthis._styleElement = null;\n\t}\n\n\t/**\n\t * width - Determines the real (computed) width of the element\n\t *\n\t * @return {int} - Computed Width of the element on pixels\n\t */\n\tget width () {\n\t\treturn parseInt (getComputedStyle (this).width.replace ('px', ''));\n\t}\n\n\tset width (value) {\n\t\tthis.style.width = value;\n\t}\n\n\t/**\n\t * height - Determines the real (computed) height of the element\n\t *\n\t * @return {int} - Computed height of the element on pixels\n\t */\n\tget height () {\n\t\treturn parseInt (getComputedStyle(this).height.replace ('px', ''));\n\t}\n\n\tset height (value) {\n\t\tthis.style.height = value;\n\t}\n\n\tget static () {\n\t\treturn new Proxy (this.constructor, {});\n\t}\n\n\tset static (value) {\n\t\tthrow new Error ('Component static properties cannot be reassigned.');\n\t}\n\n\tget props () {\n\t\treturn new Proxy (this, {\n\t\t\tget: (target, key) => {\n\t\t\t\tif (this.hasAttribute (key)) {\n\t\t\t\t\tlet value = this.getAttribute (key);\n\t\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\t\tif (value === 'false') {\n\t\t\t\t\t\t\tvalue = false;\n\t\t\t\t\t\t} else if (value === 'true' || value === '') {\n\t\t\t\t\t\t\tvalue = true;\n\t\t\t\t\t\t} else if (!isNaN (value)) {\n\t\t\t\t\t\t\tif (value.indexOf ('.') > 0) {\n\t\t\t\t\t\t\t\tvalue = parseFloat (value);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvalue = parseInt (value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t} else if (key in this._props) {\n\t\t\t\t\treturn this._props[key];\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tset: (target, key, value) => {\n\t\t\t\tthrow new Error ('Component props should be set using the `setProps` function.');\n\t\t\t}\n\t\t});\n\t}\n\n\tset props (value) {\n\t\tif (this._connected === false) {\n\t\t\tthis._props = Object.assign ({}, this._props, value);\n\t\t} else {\n\t\t\tthrow new Error ('Component props cannot be directly assigned. Use the `setProps` function instead.');\n\t\t}\n\t}\n\n\tget state () {\n\t\treturn new Proxy (this._state, {\n\t\t\tget: (target, key) => {\n\t\t\t\treturn target[key];\n\t\t\t},\n\t\t\tset: (target, key, value) => {\n\t\t\t\tif (this._connected === false) {\n\t\t\t\t\treturn target[key] = value;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error ('Component state should be set using the `setState` function instead.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}\n\n\tset state (value) {\n\t\tif (this._connected === false) {\n\t\t\tthis._state = Object.assign ({}, this._state, value);\n\t\t} else {\n\t\t\tthrow new Error ('Component state should be set using the `setState` function instead.');\n\t\t}\n\t}\n\n\tget dom () {\n\t\treturn this;\n\t}\n\n\tset dom (value) {\n\t\tthrow new Error ('Component DOM can not be overwritten.');\n\t}\n\n\t/**\n\t * register - Register the component as a custom HTML element\n\t * using the component's tag as the actual element tag.\n\t *\n\t * This action cannot be reverted nor the controller class for\n\t * the element can be changed.\n\t */\n\tstatic register () {\n\t\twindow.customElements.define (this.tag, this);\n\t}\n\n\t/**\n\t * template - A simple function providing access to the basic HTML\n\t * structure of the component.\n\t *\n\t * @param {function|string} html - A string or function that renders the\n\t * component into a valid HTML structure.\n\t *\n\t * @returns {void|string} - Void or the HTML structure in a string\n\t */\n\ttemplate (html = null) {\n\t\treturn this.static.template (html, this);\n\t}\n\n\t_createStyleElement () {\n\t\tconst sharedStyle = document.body.querySelector (`style#${this.static.tag}`);\n\n\t\tif (sharedStyle !== null) {\n\t\t\tthis._styleElement = sharedStyle;\n\t\t}\n\n\t\tif (!(this._styleElement instanceof HTMLStyleElement)) {\n\t\t\tthis._styleElement = document.createElement ('style');\n\t\t\tthis._styleElement.id = this.static.tag;\n\t\t\tdocument.body.prepend (this._styleElement);\n\t\t}\n\t}\n\n\tsetStyle (style, reset = false) {\n\t\tthis._createStyleElement ();\n\n\t\tif (typeof style === 'object') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._style = Object.assign ({}, this._style, style);\n\t\t\t} else {\n\t\t\t\tthis._style = Object.assign ({}, style);\n\t\t\t}\n\t\t\tthis._styleElement.innerHTML = deserializeCSS (this._style, this.static.tag);\n\t\t} else if (typeof style === 'string') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._styleElement.innerHTML += style;\n\t\t\t} else {\n\t\t\t\tthis._styleElement.innerHTML = style;\n\t\t\t}\n\t\t}\n\n\t\treturn this._style;\n\t}\n\n\tsetState (state) {\n\t\tif (typeof state === 'object') {\n\t\t\tconst oldState = Object.assign ({}, this._state);\n\n\t\t\tthis._state = Object.assign ({}, this._state, state);\n\n\t\t\tfor (const key of Object.keys (state)) {\n\t\t\t\tthis.updateCallback (key, oldState[key], this._state[key], 'state', oldState, this._state);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError(`A state must be an object. Received ${typeof state}.`);\n\t\t}\n\t}\n\n\tsetProps (props) {\n\t\tif (typeof props === 'object') {\n\t\t\tconst oldProps = Object.assign ({}, this._props);\n\n\t\t\tthis._props = Object.assign ({}, this._props, props);\n\n\t\t\tfor (const key of Object.keys (props)) {\n\t\t\t\tthis.updateCallback (key, oldProps[key], this._props[key], 'props', oldProps, this._props);\n\t\t\t}\n\t\t\tthis._setPropAttributes (true);\n\t\t} else {\n\t\t\tthrow new TypeError(`Props must be an object. Received ${typeof state}.`);\n\t\t}\n\t}\n\n\t_setPropAttributes (update = false) {\n\t\tfor (const key of Object.keys (this._props)) {\n\t\t\tconst value = this._props[key];\n\t\t\tif (this.static._explicitPropTypes.indexOf (typeof value) > -1) {\n\t\t\t\tif (update === true) {\n\t\t\t\t\tthis.setAttribute (key, this._props[key]);\n\t\t\t\t} else {\n\t\t\t\t\tthis._props[key] = this.props[key];\n\t\t\t\t\tthis.setAttribute (key, this.props[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * =========================\n\t * Update Cycle\n\t * =========================\n */\n\n\twillUpdate (origin, property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tupdate (origin, property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tdidUpdate (origin, property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tonStateUpdate (property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\tonPropsUpdate (property, oldValue, newValue, oldObject, newObject) {\n\t\treturn Promise.resolve ();\n\t}\n\n\t/*\n\t * =========================\n\t * Mount Cycle\n\t * =========================\n */\n\n\twillMount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\tdidMount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\t/*\n\t * =========================\n\t * Unmount Cycle\n\t * =========================\n */\n\n\twillUnmount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\tunmount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\tdidUnmount () {\n\t\treturn Promise.resolve ();\n\t}\n\n\t/*\n\t * =========================\n\t * Render Cycle\n\t * =========================\n */\n\n\t/**\n\t * Forces the component to be rendered again.\n\t *\n\t * @returns {string|Promise<string>} - The HTML to render on the component\n\t */\n\tforceRender () {\n\t\treturn this._render ();\n\t}\n\n\t/**\n\t * This function is the one that defines the HTML that will be rendered\n\t * inside the component. Since some content may need to be loaded before the\n\t * component is rendered, this function can also return a promise.\n\t *\n\t * @returns {string|Promise<string>} - The HTML to render on the component\n\t */\n\trender () {\n\t\treturn '';\n\t}\n\n\t_render () {\n\t\tlet render = this.render;\n\n\t\t// Check if a template has been set to this component, and if that's the\n\t\t// case, use that instead of the render function to render the component's\n\t\t// HTML code.\n\t\tif (this.static._template !== null) {\n\t\t\trender = this.template;\n\t\t}\n\n\t\t// Call the render function asynchronously and set the HTML from it to the\n\t\t// component.\n\t\treturn callAsync (render, this).then ((html) => {\n\t\t\tconst slot = this.dom.querySelector ('slot');\n\n\t\t\tif (typeof html === 'string') {\n\t\t\t\thtml = html.trim ();\n\n\t\t\t\tif (html === '') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (html === null || typeof html === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (slot !== null) {\n\t\t\t\tslot.replaceWith (html);\n\t\t\t} else {\n\t\t\t\tthis.innerHTML = html;\n\n\t\t\t\tif (this._children !== '' && html.indexOf(this._children) === -1) {\n\t\t\t\t\tthis.innerHTML += this._children;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tconnectedCallback () {\n\t\t// Set the state as connected\n\t\tthis._connected = true;\n\n\t\t// Add a data property with the tag of the component\n\t\tthis.dataset.component = this.static.tag;\n\n\t\t// Check if a template for this component was set. The contents on this\n\t\t// if block will only be run once.\n\t\tif (typeof this.static._template === 'undefined') {\n\n\t\t\t// Check if there is an HTML template for this component\n\t\t\tconst template = document.querySelector (`template#${this.static.tag}`);\n\n\t\t\tif (template !== null) {\n\t\t\t\t// If there is, set is as the template for the component\n\t\t\t\tthis.template (template.innerHTML);\n\t\t\t} else {\n\t\t\t\t// If not, set is as null\n\t\t\t\tthis.static._template = null;\n\t\t\t}\n\t\t}\n\n\t\t// Set the initial prop attributes for the component using the given\n\t\t// props\n\t\tthis._setPropAttributes ();\n\n\t\t// Start the Mount Cycle\n\t\treturn this.willMount ().then (() => {\n\n\t\t\treturn this._render ().then (() => {\n\t\t\t\treturn this.didMount ().then (() => {\n\n\t\t\t\t\tthis._isReady = true;\n\t\t\t\t\tfor (const callback of this._ready) {\n\t\t\t\t\t\tcallback.call (this);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Adds a callback to be run once the component has been mounted successfully\n\t *\n\t * @param {function} callback - Callback to run once the component is ready\n\t */\n\tready (callback) {\n\t\tthis._ready.push (callback);\n\t}\n\n\n\tdisconnectedCallback () {\n\t\treturn this.willUnmount ().then (() => {\n\t\t\treturn this.unmount ().then (() => {\n\t\t\t\treturn this.didUnmount ();\n\t\t\t});\n\t\t});\n\t}\n\n\tupdateCallback (property, oldValue, newValue, origin = 'props', oldObject = {}, newObject = {}) {\n\t\treturn this.willUpdate (origin, property, oldValue, newValue, oldObject, newObject).then (() => {\n\t\t\treturn this.update (origin, property, oldValue, newValue, oldObject, newObject).then (() => {\n\t\t\t\tlet promise;\n\t\t\t\tif (origin === 'state') {\n\t\t\t\t\tpromise = this.onStateUpdate (property, oldValue, newValue, oldObject, newObject);\n\t\t\t\t} else {\n\t\t\t\t\tpromise = this.onPropsUpdate (property, oldValue, newValue, oldObject, newObject);\n\t\t\t\t}\n\t\t\t\treturn promise.then (() => {\n\t\t\t\t\treturn this.didUpdate (origin, property, oldValue, newValue, oldObject, newObject);\n\t\t\t\t});\n\t\t\t});\n\t\t}).catch ((e) => {\n\t\t\tconsole.error (e);\n\t\t\t// Component should not update\n\t\t});\n\t}\n\n\tattributeChangedCallback (property, oldValue, newValue) {\n\n\t}\n}\n","import { Component } from './Component';\nimport { callAsync, deserializeCSS } from './Util';\n\n/**\n * @class ShadowComponent\n */\nexport class ShadowComponent extends Component {\n\tconstructor (...props) {\n\t\tsuper (...props);\n\n\t\tthis._shadowDOM = this.attachShadow ({ mode: 'open' });\n\t}\n\n\tsetStyle (style, reset = false) {\n\t\tthis._createStyleElement ();\n\n\t\tif (typeof style === 'object') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._style = Object.assign ({}, this._style, style);\n\t\t\t} else {\n\t\t\t\tthis._style = Object.assign ({}, style);\n\t\t\t}\n\t\t\tthis._styleElement.innerHTML = deserializeCSS (this._style);\n\t\t} else if (typeof style === 'string') {\n\t\t\tif (reset === false) {\n\t\t\t\tthis._styleElement.innerHTML += style;\n\t\t\t} else {\n\t\t\t\tthis._styleElement.innerHTML = style;\n\t\t\t}\n\t\t}\n\n\t\treturn this._style;\n\t}\n\n\t_createStyleElement () {\n\t\tif (!(this._styleElement instanceof HTMLStyleElement)) {\n\t\t\tthis._styleElement = document.createElement ('style');\n\t\t\tthis.dom.prepend (this._styleElement);\n\t\t}\n\t}\n\n\t_render () {\n\t\tlet render = this.render;\n\n\t\t// Check if a template has been set to this component, and if that's the\n\t\t// case, use that instead of the render function to render the component's\n\t\t// HTML code.\n\t\tif (this.static._template !== null) {\n\t\t\trender = this.template;\n\t\t}\n\n\t\t// Call the render function asynchronously and set the HTML from it to the\n\t\t// component.\n\t\treturn callAsync (render, this).then ((html) => {\n\t\t\tthis._shadowDOM.innerHTML = '';\n\t\t\tif (this._styleElement instanceof HTMLStyleElement) {\n\t\t\t\tthis._shadowDOM.appendChild (this._styleElement);\n\t\t\t}\n\t\t\tthis._shadowDOM.innerHTML += html;\n\t\t});\n\t}\n\n\tget dom () {\n\t\treturn this._shadowDOM;\n\t}\n\n\n}\n"],"names":["$0fe967576d479a52$export$ae8c526ac59e8cc8","callable","context","args","result","apply","Promise","resolve","e","reject","$0fe967576d479a52$export$d394fc4e7cd94f20","object","encapsulation","level","keys","Object","css","key","indexOf","replace","properties","property","repeat","temp","$a3d42b0c8e8e633b$export$16fa2f45be04daa8","HTMLElement","static","tag","this","_tag","name","matches","match","toLowerCase","slice","value4","undefined","html2","_template","call","document","querySelectorAll","forEach","instance","_isReady","forceRender","super","_children","innerHTML","trim","_state","_props","_ready","_connected","_style","_styleElement","width","parseInt","getComputedStyle","value1","style","height","value2","Proxy","constructor","value3","Error","props","get","target","hasAttribute","value","getAttribute","isNaN","parseFloat","set","value5","assign","state","dom","value6","window","customElements","define","template","html1","_createStyleElement","sharedStyle","body","querySelector","HTMLStyleElement","createElement","id","prepend","setStyle","reset","setState","state1","TypeError","oldState","updateCallback","setProps","oldProps","_setPropAttributes","update","_explicitPropTypes","setAttribute","willUpdate","origin","oldValue","newValue","oldObject","newObject","origin1","property1","oldValue1","newValue1","oldObject1","newObject1","didUpdate","origin2","property2","oldValue2","newValue2","oldObject2","newObject2","onStateUpdate","property3","oldValue3","newValue3","oldObject3","newObject3","onPropsUpdate","property4","oldValue4","newValue4","oldObject4","newObject4","willMount","didMount","willUnmount","unmount","didUnmount","_render","render","then","html","slot","replaceWith","connectedCallback","dataset","component","callback","ready","push","disconnectedCallback","property5","oldValue5","newValue5","origin3","oldObject5","newObject5","promise","catch","console","error","attributeChangedCallback","property6","oldValue6","newValue6","$74268d9f5faf09cb$export$bfd3c54ba0d8c9e0","_shadowDOM","attachShadow","mode","appendChild"],"version":3,"file":"pandora.node.js.map"}
package/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './src/Component';
2
- export * from './src/ShadowComponent';
3
- export * from './src/Util';