@hyperdart/frontend 1.0.6 → 1.0.8

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/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-router-dom"),a=require("@material-ui/core/styles");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},l.apply(this,arguments)}!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===a&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("/* add css module styles here (optional) */\nhtml, body {\n\tmargin: 0;\n\tpadding: 0;\n\theight: 100%;\n\twidth: 100%;\n\tposition: fixed;\n\toverflow: hidden;\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n }\n \n.styles-module_test__1m8-E {\n margin: 2em;\n padding: 0.5em;\n border: 2px solid #000;\n font-size: 2em;\n text-align: center;\n}\n");const s={default:{palette:{type:"light"},typography:{useNextVariants:!0}},light:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"light"},typography:{useNextVariants:!0}},dark:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"dark"},typography:{useNextVariants:!0}},lightsOut:{palette:{primary:{main:"#F05F40"},type:"dark",background:{default:"#000",paper:"#000"}},shadows:Array(25).fill("0px 4px 12px #888888"),typography:{useNextVariants:!0}}};class o extends e.Component{constructor(e){super(e),this.state={themeName:e.themeName||"light"},this.theme=a.createTheme(s[this.state.themeName])}componentDidUpdate(e){this.props.themeName!==e.themeName&&(this.theme=a.createTheme(s[this.props.themeName]),this.setState({themeName:this.props.themeName}))}render(){return n.default.createElement(a.ThemeProvider,{theme:this.theme},this.props.children)}}exports.styles={test:"styles-module_test__1m8-E"},exports.themes=s,exports.withHD=a=>r=>{let{quickPanel:s,basename:i,searchData:m,UIOptions:d,...p}=r?{...r}:{};s=s||!0,i=i||"",p.search=p.search||(e=>console.log("New query = ",e));const u=m&&("object"==typeof m||Array.isArray(m)&&m.length>0);return n.default.createElement(e.Fragment,null,u||d&&d.sandbox?r.match?n.default.createElement(a,r):n.default.createElement(t.BrowserRouter,{basename:i},n.default.createElement(o,{themeName:d&&d.themeName},n.default.createElement(t.Switch,null,n.default.createElement(t.Route,{path:r.baseURL,exact:!0,render:e=>n.default.createElement(a,l({},e,r,{quickPanel:s}))}),n.default.createElement(t.Route,{path:r.baseURL,render:e=>n.default.createElement(a,l({},e,r,{quickPanel:!1}))})))):n.default.createElement(n.default.Fragment,null),!u&&d&&d.sandbox?n.default.createElement("div",{style:{position:"fixed",top:0,width:"100%",display:"flex",justifyContent:"center",backgroundColor:"red",color:"white"}},n.default.createElement("h6",{style:{margin:"5px"}}," No search data received. Component will not loaded... ")):n.default.createElement(n.default.Fragment,null))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-router-dom"),a=require("@material-ui/core/styles");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},l.apply(this,arguments)}const s={default:{palette:{type:"light"},typography:{useNextVariants:!0}},light:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"light"},typography:{useNextVariants:!0}},dark:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"dark"},typography:{useNextVariants:!0}},lightsOut:{palette:{primary:{main:"#F05F40"},type:"dark",background:{default:"#000",paper:"#000"}},shadows:Array(25).fill("0px 4px 12px #888888"),typography:{useNextVariants:!0}}};class o extends e.Component{constructor(e){super(e),this.state={themeName:e.themeName||"light"},this.theme=a.createTheme(s[this.state.themeName])}componentDidUpdate(e){this.props.themeName!==e.themeName&&(this.theme=a.createTheme(s[this.props.themeName]),this.setState({themeName:this.props.themeName}))}render(){return n.default.createElement(a.ThemeProvider,{theme:this.theme},this.props.children)}}exports.themes=s,exports.withHD=a=>r=>{console.log("withHD rendering...");let{quickPanel:s,basename:i,searchData:m,UIOptions:c,...p}=r||{};s=s||!0,i=i||"",p.search=p.search||(e=>console.log("New query = ",e));const u=m&&("object"==typeof m||Array.isArray(m)&&m.length>0);return r.UIOptions&&(r.UIOptions.switchFullScreen=(e=!0)=>{window.parent.postMessage({type:"switchFullScreen",fullScreen:e},"*")}),n.default.createElement(e.Fragment,null,u||c&&c.sandbox?r.match?n.default.createElement(a,r):n.default.createElement(t.BrowserRouter,{basename:i},n.default.createElement(o,{themeName:c&&c.themeName},n.default.createElement(t.Switch,null,n.default.createElement(t.Route,{path:r.baseURL,exact:!0,render:e=>n.default.createElement(a,l({},e,r,{quickPanel:s}))}),n.default.createElement(t.Route,{path:r.baseURL,render:e=>n.default.createElement(a,l({},e,r,{quickPanel:!1}))})))):n.default.createElement(n.default.Fragment,null),!u&&c&&c.sandbox?n.default.createElement("div",{style:{position:"fixed",top:0,width:"100%",display:"flex",justifyContent:"center",backgroundColor:"red",color:"white"}},n.default.createElement("h6",{style:{margin:"5px"}}," No search data received. Component will not be loaded... ")):n.default.createElement(n.default.Fragment,null))};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import e,{Fragment as t,Component as a}from"react";import{BrowserRouter as n,Switch as r,Route as s}from"react-router-dom";import{createTheme as o,ThemeProvider as i}from"@material-ui/core/styles";var l={test:"styles-module_test__1m8-E"};function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},m.apply(this,arguments)}!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("/* add css module styles here (optional) */\nhtml, body {\n\tmargin: 0;\n\tpadding: 0;\n\theight: 100%;\n\twidth: 100%;\n\tposition: fixed;\n\toverflow: hidden;\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n }\n \n.styles-module_test__1m8-E {\n margin: 2em;\n padding: 0.5em;\n border: 2px solid #000;\n font-size: 2em;\n text-align: center;\n}\n");const p={default:{palette:{type:"light"},typography:{useNextVariants:!0}},light:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"light"},typography:{useNextVariants:!0}},dark:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"dark"},typography:{useNextVariants:!0}},lightsOut:{palette:{primary:{main:"#F05F40"},type:"dark",background:{default:"#000",paper:"#000"}},shadows:Array(25).fill("0px 4px 12px #888888"),typography:{useNextVariants:!0}}};class h extends a{constructor(e){super(e),this.state={themeName:e.themeName||"light"},this.theme=o(p[this.state.themeName])}componentDidUpdate(e){this.props.themeName!==e.themeName&&(this.theme=o(p[this.props.themeName]),this.setState({themeName:this.props.themeName}))}render(){return e.createElement(i,{theme:this.theme},this.props.children)}}var d=a=>o=>{let{quickPanel:i,basename:l,searchData:p,UIOptions:d,...c}=o?{...o}:{};i=i||!0,l=l||"",c.search=c.search||(e=>console.log("New query = ",e));const y=p&&("object"==typeof p||Array.isArray(p)&&p.length>0);return e.createElement(t,null,y||d&&d.sandbox?o.match?e.createElement(a,o):e.createElement(n,{basename:l},e.createElement(h,{themeName:d&&d.themeName},e.createElement(r,null,e.createElement(s,{path:o.baseURL,exact:!0,render:t=>e.createElement(a,m({},t,o,{quickPanel:i}))}),e.createElement(s,{path:o.baseURL,render:t=>e.createElement(a,m({},t,o,{quickPanel:!1}))})))):e.createElement(e.Fragment,null),!y&&d&&d.sandbox?e.createElement("div",{style:{position:"fixed",top:0,width:"100%",display:"flex",justifyContent:"center",backgroundColor:"red",color:"white"}},e.createElement("h6",{style:{margin:"5px"}}," No search data received. Component will not loaded... ")):e.createElement(e.Fragment,null))};export{l as styles,p as themes,d as withHD};
1
+ import e,{Fragment as t,Component as a}from"react";import{BrowserRouter as r,Switch as n,Route as s}from"react-router-dom";import{createTheme as l,ThemeProvider as o}from"@material-ui/core/styles";function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},i.apply(this,arguments)}const m={default:{palette:{type:"light"},typography:{useNextVariants:!0}},light:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"light"},typography:{useNextVariants:!0}},dark:{palette:{primary:{main:"#F05F40"},secondary:{main:"#40f0bb"},type:"dark"},typography:{useNextVariants:!0}},lightsOut:{palette:{primary:{main:"#F05F40"},type:"dark",background:{default:"#000",paper:"#000"}},shadows:Array(25).fill("0px 4px 12px #888888"),typography:{useNextVariants:!0}}};class p extends a{constructor(e){super(e),this.state={themeName:e.themeName||"light"},this.theme=l(m[this.state.themeName])}componentDidUpdate(e){this.props.themeName!==e.themeName&&(this.theme=l(m[this.props.themeName]),this.setState({themeName:this.props.themeName}))}render(){return e.createElement(o,{theme:this.theme},this.props.children)}}var c=a=>l=>{console.log("withHD rendering...");let{quickPanel:o,basename:m,searchData:c,UIOptions:h,...d}=l||{};o=o||!0,m=m||"",d.search=d.search||(e=>console.log("New query = ",e));const u=c&&("object"==typeof c||Array.isArray(c)&&c.length>0);return l.UIOptions&&(l.UIOptions.switchFullScreen=(e=!0)=>{window.parent.postMessage({type:"switchFullScreen",fullScreen:e},"*")}),e.createElement(t,null,u||h&&h.sandbox?l.match?e.createElement(a,l):e.createElement(r,{basename:m},e.createElement(p,{themeName:h&&h.themeName},e.createElement(n,null,e.createElement(s,{path:l.baseURL,exact:!0,render:t=>e.createElement(a,i({},t,l,{quickPanel:o}))}),e.createElement(s,{path:l.baseURL,render:t=>e.createElement(a,i({},t,l,{quickPanel:!1}))})))):e.createElement(e.Fragment,null),!u&&h&&h.sandbox?e.createElement("div",{style:{position:"fixed",top:0,width:"100%",display:"flex",justifyContent:"center",backgroundColor:"red",color:"white"}},e.createElement("h6",{style:{margin:"5px"}}," No search data received. Component will not be loaded... ")):e.createElement(e.Fragment,null))};export{m as themes,c as withHD};
2
2
  //# sourceMappingURL=index.modern.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperdart/frontend",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "hyperDart frontend for dart development",
5
5
  "author": "hyperDart",
6
6
  "license": "MIT",