@vitus-labs/core 0.35.0 → 0.36.0

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.
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
6424
6424
  </script>
6425
6425
  <script>
6426
6426
  /*<!--*/
6427
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.js","children":[{"name":"src","children":[{"uid":"5ba4-1","name":"config.ts"},{"uid":"5ba4-3","name":"isEmpty.ts"},{"uid":"5ba4-5","name":"context.tsx"},{"uid":"5ba4-7","name":"compose.ts"},{"uid":"5ba4-9","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"5ba4-11"},{"uid":"5ba4-13","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"5ba4-1":{"renderedLength":810,"gzipLength":294,"brotliLength":0,"mainUid":"5ba4-0"},"5ba4-3":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"5ba4-2"},"5ba4-5":{"renderedLength":783,"gzipLength":332,"brotliLength":0,"mainUid":"5ba4-4"},"5ba4-7":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"5ba4-6"},"5ba4-9":{"renderedLength":893,"gzipLength":284,"brotliLength":0,"mainUid":"5ba4-8"},"5ba4-11":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"5ba4-10"},"5ba4-13":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"5ba4-12"}},"nodeMetas":{"5ba4-0":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.js":"5ba4-1"},"imported":[{"uid":"5ba4-17"}],"importedBy":[{"uid":"5ba4-12"},{"uid":"5ba4-4"}]},"5ba4-2":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.js":"5ba4-3"},"imported":[],"importedBy":[{"uid":"5ba4-12"},{"uid":"5ba4-4"},{"uid":"5ba4-8"}]},"5ba4-4":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.js":"5ba4-5"},"imported":[{"uid":"5ba4-18"},{"uid":"5ba4-0"},{"uid":"5ba4-2"}],"importedBy":[{"uid":"5ba4-12"}]},"5ba4-6":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.js":"5ba4-7"},"imported":[],"importedBy":[{"uid":"5ba4-12"}]},"5ba4-8":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.js":"5ba4-9"},"imported":[{"uid":"5ba4-19"},{"uid":"5ba4-18"},{"uid":"5ba4-2"}],"importedBy":[{"uid":"5ba4-12"}]},"5ba4-10":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.js":"5ba4-11"},"imported":[],"importedBy":[{"uid":"5ba4-16"}]},"5ba4-12":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.js":"5ba4-13"},"imported":[{"uid":"5ba4-14"},{"uid":"5ba4-15"},{"uid":"5ba4-0"},{"uid":"5ba4-4"},{"uid":"5ba4-6"},{"uid":"5ba4-2"},{"uid":"5ba4-8"},{"uid":"5ba4-16"}],"importedBy":[],"isEntry":true},"5ba4-14":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-12"}],"isExternal":true},"5ba4-15":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-12"}],"isExternal":true},"5ba4-16":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"5ba4-10"}],"importedBy":[{"uid":"5ba4-12"}]},"5ba4-17":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-0"}],"isExternal":true},"5ba4-18":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-4"},{"uid":"5ba4-8"}],"isExternal":true},"5ba4-19":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-8"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6427
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.js","children":[{"name":"src","children":[{"uid":"c02c-1","name":"config.ts"},{"uid":"c02c-3","name":"isEmpty.ts"},{"uid":"c02c-5","name":"context.tsx"},{"uid":"c02c-7","name":"compose.ts"},{"uid":"c02c-9","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"c02c-11"},{"uid":"c02c-13","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"c02c-1":{"renderedLength":810,"gzipLength":294,"brotliLength":0,"mainUid":"c02c-0"},"c02c-3":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"c02c-2"},"c02c-5":{"renderedLength":783,"gzipLength":332,"brotliLength":0,"mainUid":"c02c-4"},"c02c-7":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"c02c-6"},"c02c-9":{"renderedLength":893,"gzipLength":284,"brotliLength":0,"mainUid":"c02c-8"},"c02c-11":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"c02c-10"},"c02c-13":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"c02c-12"}},"nodeMetas":{"c02c-0":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.js":"c02c-1"},"imported":[{"uid":"c02c-17"}],"importedBy":[{"uid":"c02c-12"},{"uid":"c02c-4"}]},"c02c-2":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.js":"c02c-3"},"imported":[],"importedBy":[{"uid":"c02c-12"},{"uid":"c02c-4"},{"uid":"c02c-8"}]},"c02c-4":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.js":"c02c-5"},"imported":[{"uid":"c02c-18"},{"uid":"c02c-0"},{"uid":"c02c-2"}],"importedBy":[{"uid":"c02c-12"}]},"c02c-6":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.js":"c02c-7"},"imported":[],"importedBy":[{"uid":"c02c-12"}]},"c02c-8":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.js":"c02c-9"},"imported":[{"uid":"c02c-19"},{"uid":"c02c-18"},{"uid":"c02c-2"}],"importedBy":[{"uid":"c02c-12"}]},"c02c-10":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.js":"c02c-11"},"imported":[],"importedBy":[{"uid":"c02c-16"}]},"c02c-12":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.js":"c02c-13"},"imported":[{"uid":"c02c-14"},{"uid":"c02c-15"},{"uid":"c02c-0"},{"uid":"c02c-4"},{"uid":"c02c-6"},{"uid":"c02c-2"},{"uid":"c02c-8"},{"uid":"c02c-16"}],"importedBy":[],"isEntry":true},"c02c-14":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-12"}],"isExternal":true},"c02c-15":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-12"}],"isExternal":true},"c02c-16":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"c02c-10"}],"importedBy":[{"uid":"c02c-12"}]},"c02c-17":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-0"}],"isExternal":true},"c02c-18":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-4"},{"uid":"c02c-8"}],"isExternal":true},"c02c-19":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-8"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6428
6428
 
6429
6429
  const run = () => {
6430
6430
  const width = window.innerWidth;
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
6424
6424
  </script>
6425
6425
  <script>
6426
6426
  /*<!--*/
6427
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.module.js","children":[{"name":"src","children":[{"uid":"5ba4-21","name":"config.ts"},{"uid":"5ba4-23","name":"isEmpty.ts"},{"uid":"5ba4-25","name":"context.tsx"},{"uid":"5ba4-27","name":"compose.ts"},{"uid":"5ba4-29","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"5ba4-31"},{"uid":"5ba4-33","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"5ba4-21":{"renderedLength":763,"gzipLength":273,"brotliLength":0,"mainUid":"5ba4-20"},"5ba4-23":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"5ba4-22"},"5ba4-25":{"renderedLength":671,"gzipLength":314,"brotliLength":0,"mainUid":"5ba4-24"},"5ba4-27":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"5ba4-26"},"5ba4-29":{"renderedLength":835,"gzipLength":269,"brotliLength":0,"mainUid":"5ba4-28"},"5ba4-31":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"5ba4-30"},"5ba4-33":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"5ba4-32"}},"nodeMetas":{"5ba4-20":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.module.js":"5ba4-21"},"imported":[{"uid":"5ba4-37"}],"importedBy":[{"uid":"5ba4-32"},{"uid":"5ba4-24"}]},"5ba4-22":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.module.js":"5ba4-23"},"imported":[],"importedBy":[{"uid":"5ba4-32"},{"uid":"5ba4-24"},{"uid":"5ba4-28"}]},"5ba4-24":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.module.js":"5ba4-25"},"imported":[{"uid":"5ba4-38"},{"uid":"5ba4-20"},{"uid":"5ba4-22"}],"importedBy":[{"uid":"5ba4-32"}]},"5ba4-26":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.module.js":"5ba4-27"},"imported":[],"importedBy":[{"uid":"5ba4-32"}]},"5ba4-28":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.module.js":"5ba4-29"},"imported":[{"uid":"5ba4-39"},{"uid":"5ba4-38"},{"uid":"5ba4-22"}],"importedBy":[{"uid":"5ba4-32"}]},"5ba4-30":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.module.js":"5ba4-31"},"imported":[],"importedBy":[{"uid":"5ba4-36"}]},"5ba4-32":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.module.js":"5ba4-33"},"imported":[{"uid":"5ba4-34"},{"uid":"5ba4-35"},{"uid":"5ba4-20"},{"uid":"5ba4-24"},{"uid":"5ba4-26"},{"uid":"5ba4-22"},{"uid":"5ba4-28"},{"uid":"5ba4-36"}],"importedBy":[],"isEntry":true},"5ba4-34":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-32"}],"isExternal":true},"5ba4-35":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-32"}],"isExternal":true},"5ba4-36":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"5ba4-30"}],"importedBy":[{"uid":"5ba4-32"}]},"5ba4-37":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-20"}],"isExternal":true},"5ba4-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-24"},{"uid":"5ba4-28"}],"isExternal":true},"5ba4-39":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-28"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6427
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.module.js","children":[{"name":"src","children":[{"uid":"c02c-21","name":"config.ts"},{"uid":"c02c-23","name":"isEmpty.ts"},{"uid":"c02c-25","name":"context.tsx"},{"uid":"c02c-27","name":"compose.ts"},{"uid":"c02c-29","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"c02c-31"},{"uid":"c02c-33","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"c02c-21":{"renderedLength":763,"gzipLength":273,"brotliLength":0,"mainUid":"c02c-20"},"c02c-23":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"c02c-22"},"c02c-25":{"renderedLength":671,"gzipLength":314,"brotliLength":0,"mainUid":"c02c-24"},"c02c-27":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"c02c-26"},"c02c-29":{"renderedLength":835,"gzipLength":269,"brotliLength":0,"mainUid":"c02c-28"},"c02c-31":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"c02c-30"},"c02c-33":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"c02c-32"}},"nodeMetas":{"c02c-20":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.module.js":"c02c-21"},"imported":[{"uid":"c02c-37"}],"importedBy":[{"uid":"c02c-32"},{"uid":"c02c-24"}]},"c02c-22":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.module.js":"c02c-23"},"imported":[],"importedBy":[{"uid":"c02c-32"},{"uid":"c02c-24"},{"uid":"c02c-28"}]},"c02c-24":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.module.js":"c02c-25"},"imported":[{"uid":"c02c-38"},{"uid":"c02c-20"},{"uid":"c02c-22"}],"importedBy":[{"uid":"c02c-32"}]},"c02c-26":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.module.js":"c02c-27"},"imported":[],"importedBy":[{"uid":"c02c-32"}]},"c02c-28":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.module.js":"c02c-29"},"imported":[{"uid":"c02c-39"},{"uid":"c02c-38"},{"uid":"c02c-22"}],"importedBy":[{"uid":"c02c-32"}]},"c02c-30":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.module.js":"c02c-31"},"imported":[],"importedBy":[{"uid":"c02c-36"}]},"c02c-32":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.module.js":"c02c-33"},"imported":[{"uid":"c02c-34"},{"uid":"c02c-35"},{"uid":"c02c-20"},{"uid":"c02c-24"},{"uid":"c02c-26"},{"uid":"c02c-22"},{"uid":"c02c-28"},{"uid":"c02c-36"}],"importedBy":[],"isEntry":true},"c02c-34":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-32"}],"isExternal":true},"c02c-35":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-32"}],"isExternal":true},"c02c-36":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"c02c-30"}],"importedBy":[{"uid":"c02c-32"}]},"c02c-37":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-20"}],"isExternal":true},"c02c-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-24"},{"uid":"c02c-28"}],"isExternal":true},"c02c-39":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-28"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6428
6428
 
6429
6429
  const run = () => {
6430
6430
  const width = window.innerWidth;
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
6424
6424
  </script>
6425
6425
  <script>
6426
6426
  /*<!--*/
6427
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.umd.js","children":[{"name":"src","children":[{"uid":"5ba4-41","name":"config.ts"},{"uid":"5ba4-43","name":"isEmpty.ts"},{"uid":"5ba4-45","name":"context.tsx"},{"uid":"5ba4-47","name":"compose.ts"},{"uid":"5ba4-49","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"5ba4-51"},{"uid":"5ba4-53","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"5ba4-41":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"5ba4-40"},"5ba4-43":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"5ba4-42"},"5ba4-45":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"5ba4-44"},"5ba4-47":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"5ba4-46"},"5ba4-49":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"5ba4-48"},"5ba4-51":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"5ba4-50"},"5ba4-53":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"5ba4-52"}},"nodeMetas":{"5ba4-40":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.js":"5ba4-41"},"imported":[{"uid":"5ba4-57"}],"importedBy":[{"uid":"5ba4-52"},{"uid":"5ba4-44"}]},"5ba4-42":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.js":"5ba4-43"},"imported":[],"importedBy":[{"uid":"5ba4-52"},{"uid":"5ba4-44"},{"uid":"5ba4-48"}]},"5ba4-44":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.js":"5ba4-45"},"imported":[{"uid":"5ba4-58"},{"uid":"5ba4-40"},{"uid":"5ba4-42"}],"importedBy":[{"uid":"5ba4-52"}]},"5ba4-46":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.js":"5ba4-47"},"imported":[],"importedBy":[{"uid":"5ba4-52"}]},"5ba4-48":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.js":"5ba4-49"},"imported":[{"uid":"5ba4-59"},{"uid":"5ba4-58"},{"uid":"5ba4-42"}],"importedBy":[{"uid":"5ba4-52"}]},"5ba4-50":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.js":"5ba4-51"},"imported":[],"importedBy":[{"uid":"5ba4-56"}]},"5ba4-52":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.js":"5ba4-53"},"imported":[{"uid":"5ba4-54"},{"uid":"5ba4-55"},{"uid":"5ba4-40"},{"uid":"5ba4-44"},{"uid":"5ba4-46"},{"uid":"5ba4-42"},{"uid":"5ba4-48"},{"uid":"5ba4-56"}],"importedBy":[],"isEntry":true},"5ba4-54":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-52"}],"isExternal":true},"5ba4-55":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-52"}],"isExternal":true},"5ba4-56":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"5ba4-50"}],"importedBy":[{"uid":"5ba4-52"}]},"5ba4-57":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-40"}],"isExternal":true},"5ba4-58":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-44"},{"uid":"5ba4-48"}],"isExternal":true},"5ba4-59":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-48"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6427
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.umd.js","children":[{"name":"src","children":[{"uid":"c02c-41","name":"config.ts"},{"uid":"c02c-43","name":"isEmpty.ts"},{"uid":"c02c-45","name":"context.tsx"},{"uid":"c02c-47","name":"compose.ts"},{"uid":"c02c-49","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"c02c-51"},{"uid":"c02c-53","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"c02c-41":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"c02c-40"},"c02c-43":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"c02c-42"},"c02c-45":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"c02c-44"},"c02c-47":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"c02c-46"},"c02c-49":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"c02c-48"},"c02c-51":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"c02c-50"},"c02c-53":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"c02c-52"}},"nodeMetas":{"c02c-40":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.js":"c02c-41"},"imported":[{"uid":"c02c-57"}],"importedBy":[{"uid":"c02c-52"},{"uid":"c02c-44"}]},"c02c-42":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.js":"c02c-43"},"imported":[],"importedBy":[{"uid":"c02c-52"},{"uid":"c02c-44"},{"uid":"c02c-48"}]},"c02c-44":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.js":"c02c-45"},"imported":[{"uid":"c02c-58"},{"uid":"c02c-40"},{"uid":"c02c-42"}],"importedBy":[{"uid":"c02c-52"}]},"c02c-46":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.js":"c02c-47"},"imported":[],"importedBy":[{"uid":"c02c-52"}]},"c02c-48":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.js":"c02c-49"},"imported":[{"uid":"c02c-59"},{"uid":"c02c-58"},{"uid":"c02c-42"}],"importedBy":[{"uid":"c02c-52"}]},"c02c-50":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.js":"c02c-51"},"imported":[],"importedBy":[{"uid":"c02c-56"}]},"c02c-52":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.js":"c02c-53"},"imported":[{"uid":"c02c-54"},{"uid":"c02c-55"},{"uid":"c02c-40"},{"uid":"c02c-44"},{"uid":"c02c-46"},{"uid":"c02c-42"},{"uid":"c02c-48"},{"uid":"c02c-56"}],"importedBy":[],"isEntry":true},"c02c-54":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-52"}],"isExternal":true},"c02c-55":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-52"}],"isExternal":true},"c02c-56":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"c02c-50"}],"importedBy":[{"uid":"c02c-52"}]},"c02c-57":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-40"}],"isExternal":true},"c02c-58":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-44"},{"uid":"c02c-48"}],"isExternal":true},"c02c-59":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-48"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6428
6428
 
6429
6429
  const run = () => {
6430
6430
  const width = window.innerWidth;
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
6424
6424
  </script>
6425
6425
  <script>
6426
6426
  /*<!--*/
6427
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.umd.min.js","children":[{"name":"src","children":[{"uid":"5ba4-61","name":"config.ts"},{"uid":"5ba4-63","name":"isEmpty.ts"},{"uid":"5ba4-65","name":"context.tsx"},{"uid":"5ba4-67","name":"compose.ts"},{"uid":"5ba4-69","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"5ba4-71"},{"uid":"5ba4-73","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"5ba4-61":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"5ba4-60"},"5ba4-63":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"5ba4-62"},"5ba4-65":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"5ba4-64"},"5ba4-67":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"5ba4-66"},"5ba4-69":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"5ba4-68"},"5ba4-71":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"5ba4-70"},"5ba4-73":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"5ba4-72"}},"nodeMetas":{"5ba4-60":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.min.js":"5ba4-61"},"imported":[{"uid":"5ba4-77"}],"importedBy":[{"uid":"5ba4-72"},{"uid":"5ba4-64"}]},"5ba4-62":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.min.js":"5ba4-63"},"imported":[],"importedBy":[{"uid":"5ba4-72"},{"uid":"5ba4-64"},{"uid":"5ba4-68"}]},"5ba4-64":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.min.js":"5ba4-65"},"imported":[{"uid":"5ba4-78"},{"uid":"5ba4-60"},{"uid":"5ba4-62"}],"importedBy":[{"uid":"5ba4-72"}]},"5ba4-66":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.min.js":"5ba4-67"},"imported":[],"importedBy":[{"uid":"5ba4-72"}]},"5ba4-68":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.min.js":"5ba4-69"},"imported":[{"uid":"5ba4-79"},{"uid":"5ba4-78"},{"uid":"5ba4-62"}],"importedBy":[{"uid":"5ba4-72"}]},"5ba4-70":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.min.js":"5ba4-71"},"imported":[],"importedBy":[{"uid":"5ba4-76"}]},"5ba4-72":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.min.js":"5ba4-73"},"imported":[{"uid":"5ba4-74"},{"uid":"5ba4-75"},{"uid":"5ba4-60"},{"uid":"5ba4-64"},{"uid":"5ba4-66"},{"uid":"5ba4-62"},{"uid":"5ba4-68"},{"uid":"5ba4-76"}],"importedBy":[],"isEntry":true},"5ba4-74":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-72"}],"isExternal":true},"5ba4-75":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-72"}],"isExternal":true},"5ba4-76":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"5ba4-70"}],"importedBy":[{"uid":"5ba4-72"}]},"5ba4-77":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-60"}],"isExternal":true},"5ba4-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-64"},{"uid":"5ba4-68"}],"isExternal":true},"5ba4-79":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"5ba4-68"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6427
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.umd.min.js","children":[{"name":"src","children":[{"uid":"c02c-61","name":"config.ts"},{"uid":"c02c-63","name":"isEmpty.ts"},{"uid":"c02c-65","name":"context.tsx"},{"uid":"c02c-67","name":"compose.ts"},{"uid":"c02c-69","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"c02c-71"},{"uid":"c02c-73","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"c02c-61":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"c02c-60"},"c02c-63":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"c02c-62"},"c02c-65":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"c02c-64"},"c02c-67":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"c02c-66"},"c02c-69":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"c02c-68"},"c02c-71":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"c02c-70"},"c02c-73":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"c02c-72"}},"nodeMetas":{"c02c-60":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.min.js":"c02c-61"},"imported":[{"uid":"c02c-77"}],"importedBy":[{"uid":"c02c-72"},{"uid":"c02c-64"}]},"c02c-62":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.min.js":"c02c-63"},"imported":[],"importedBy":[{"uid":"c02c-72"},{"uid":"c02c-64"},{"uid":"c02c-68"}]},"c02c-64":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.min.js":"c02c-65"},"imported":[{"uid":"c02c-78"},{"uid":"c02c-60"},{"uid":"c02c-62"}],"importedBy":[{"uid":"c02c-72"}]},"c02c-66":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.min.js":"c02c-67"},"imported":[],"importedBy":[{"uid":"c02c-72"}]},"c02c-68":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.min.js":"c02c-69"},"imported":[{"uid":"c02c-79"},{"uid":"c02c-78"},{"uid":"c02c-62"}],"importedBy":[{"uid":"c02c-72"}]},"c02c-70":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.min.js":"c02c-71"},"imported":[],"importedBy":[{"uid":"c02c-76"}]},"c02c-72":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.min.js":"c02c-73"},"imported":[{"uid":"c02c-74"},{"uid":"c02c-75"},{"uid":"c02c-60"},{"uid":"c02c-64"},{"uid":"c02c-66"},{"uid":"c02c-62"},{"uid":"c02c-68"},{"uid":"c02c-76"}],"importedBy":[],"isEntry":true},"c02c-74":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-72"}],"isExternal":true},"c02c-75":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-72"}],"isExternal":true},"c02c-76":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"c02c-70"}],"importedBy":[{"uid":"c02c-72"}]},"c02c-77":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-60"}],"isExternal":true},"c02c-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-64"},{"uid":"c02c-68"}],"isExternal":true},"c02c-79":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"c02c-68"}],"isExternal":true}},"env":{"rollup":"2.67.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
6428
6428
 
6429
6429
  const run = () => {
6430
6430
  const width = window.innerWidth;
@@ -1 +1 @@
1
- {"version":3,"file":"vitus-labs-core.umd.min.js","sources":["../src/config.ts","../src/isEmpty.ts","../src/context.tsx","../src/compose.ts","../src/html/htmlTags.ts","../src/renderContent.ts"],"sourcesContent":["import { ComponentType } from 'react'\nimport styled, {\n css,\n ThemeProvider,\n ThemedCssFunction,\n StyledInterface,\n DefaultTheme,\n ThemeProviderComponent,\n} from 'styled-components'\nimport type { HTMLTags } from '~/html'\n\nconst OPTIONS: Internal = {\n styled,\n css,\n styledContext: ThemeProvider,\n component: 'div',\n textComponent: 'span',\n} as Internal\n\ntype Init = ({\n styled,\n css,\n context,\n component,\n textComponent,\n}: {\n styled: any\n css: any\n context: any\n component?: ComponentType | HTMLTags\n textComponent?: ComponentType | HTMLTags\n}) => void\n\nconst init: Init = ({\n styled,\n css,\n context,\n component = 'div',\n textComponent = 'span',\n}) => {\n OPTIONS.css = css\n OPTIONS.styled = styled\n OPTIONS.styledContext = context\n OPTIONS.component = component\n OPTIONS.textComponent = textComponent\n}\n\ninterface Internal {\n css: ThemedCssFunction<DefaultTheme>\n styled: StyledInterface\n styledContext: ThemeProviderComponent<any, any>\n component: any\n textComponent: any\n}\n\nconst internal: Internal = Object.freeze({\n get css() {\n return OPTIONS.css\n },\n get styled() {\n return OPTIONS.styled\n },\n get styledContext() {\n return OPTIONS.styledContext\n },\n get component() {\n return OPTIONS.component\n },\n get textComponent() {\n return OPTIONS.textComponent\n },\n})\n\nexport { init }\nexport default internal\n","export type IsEmpty = <T extends Record<string, unknown> | unknown[] | null>(\n param?: T\n) => null | undefined extends T ? true : keyof T extends never ? true : false\n\nconst isEmpty: IsEmpty = (param) => {\n if (!param) return true\n\n if (typeof param !== 'object') {\n return true as any\n }\n\n if (Array.isArray(param) && param.length === 0) {\n return true\n }\n\n if (\n Object.entries(param as any).length === 0 &&\n param.constructor === Object\n ) {\n return true\n }\n\n return false\n}\n\nexport default isEmpty\n","import React, { createContext, FC, useMemo } from 'react'\nimport config from '~/config'\nimport isEmpty from '~/isEmpty'\n\nconst context = createContext<any>({})\nconst VitusLabsProvider = context.Provider\n\ntype Theme = Partial<\n {\n rootSize: number\n breakpoints: Record<string, number | string>\n } & Record<string, any>\n>\n\ntype ProviderType = Partial<\n {\n theme: Theme\n } & Record<string, any>\n>\n\nconst Provider: FC<ProviderType> = ({ theme, children, ...props }) => {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n if (!theme || isEmpty(theme)) return <>{children}</>\n\n const StyledContext = useMemo(() => config.styledContext, [])\n\n if (StyledContext) {\n return (\n <VitusLabsProvider value={{ theme, ...props }}>\n <StyledContext theme={theme}>{children}</StyledContext>\n </VitusLabsProvider>\n )\n }\n\n return (\n <VitusLabsProvider value={{ theme, ...props }}>\n {children}\n </VitusLabsProvider>\n )\n}\n\nexport { context }\n\nexport default Provider\n","// const compose = <R>(fn1: (a: R) => R, ...fns: Array<(a: R) => R>) =>\n// fns.reduce((a, b) => (value) => a(b(value)), fn1)\n\n// const compose = (funcs) =>\n// funcs.reduce(\n// (a, b) => (...args) => a(b(...args)),\n// (arg) => arg\n// )\n\ntype ArityOneFn = (arg: any) => any\ntype PickLastInTuple<T extends any[]> = T extends [\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ...rest: infer U,\n argn: infer L\n]\n ? L\n : any\ntype FirstFnParameterType<T extends any[]> = Parameters<PickLastInTuple<T>>[any]\ntype LastFnReturnType<T extends any[]> = ReturnType<T[0]>\n\nconst compose =\n <T extends ArityOneFn[]>(...fns: T) =>\n (p: FirstFnParameterType<T>): LastFnReturnType<T> =>\n fns.reduceRight((acc: any, cur: any) => cur(acc), p)\n\nexport default compose\n","const TAGS = [\n 'a',\n 'abbr',\n // 'acronym',\n 'address',\n // 'applet',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n // 'base',\n // 'basefont',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n // 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'data',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n // 'dir',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n // 'font',\n 'footer',\n 'form',\n // 'frame',\n // 'frameset',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n // 'head',\n 'header',\n 'hr',\n 'html',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n // 'link',\n 'main',\n 'map',\n 'mark',\n // 'meta',\n 'meter',\n 'nav',\n // 'noframes',\n // 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n // 'param',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n // 'script',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n // 'strike',\n 'strong',\n // 'style',\n 'sub',\n 'summary',\n 'sup',\n 'svg',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n // 'title',\n 'tr',\n 'track',\n // 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n] as const\n\nconst TEXT_TAGS = [\n 'abbr',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'cite',\n 'code',\n 'dl',\n 'dt',\n 'em',\n 'figcaption',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'i',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'p',\n 'pre',\n 'q',\n 'rp',\n 'rt',\n 's',\n 'small',\n 'span',\n 'strong',\n 'sub',\n 'summary',\n 'sup',\n 'time',\n 'u',\n] as const\n\nexport type HTMLTags = typeof TAGS[number]\n\nexport type HTMLTagsText = typeof TEXT_TAGS[number]\n\nexport default TAGS\n","import { isValidElementType, isFragment } from 'react-is'\nimport { createElement, isValidElement, cloneElement, ReactNode } from 'react'\nimport isEmpty from './isEmpty'\n\ntype CreateTypes = Parameters<typeof createElement>[0]\ntype CloneTypes = Parameters<typeof cloneElement>[0]\n\nexport type RenderContent = (\n content?: CreateTypes | CloneTypes | ReactNode | ReactNode[],\n attachProps?: Record<string, any>\n) => ReturnType<typeof createElement> | ReturnType<typeof cloneElement> | null\n\nconst renderContent: RenderContent = (content, attachProps) => {\n if (!content) return null as any\n\n if (typeof content === 'string' && isValidElement(content)) {\n return attachProps\n ? createElement(content, attachProps)\n : createElement(content)\n }\n\n if (['number', 'boolean', 'string'].includes(typeof content)) {\n return content\n }\n\n if (Array.isArray(content) || isFragment(content)) {\n return content\n }\n\n if (isValidElementType(content)) {\n return attachProps\n ? createElement(content, attachProps)\n : createElement(content)\n }\n\n if (isValidElement(content)) {\n if (isEmpty(attachProps)) {\n return content\n }\n\n return cloneElement(content, attachProps)\n }\n\n return content\n}\n\nexport default renderContent\n"],"names":["OPTIONS","styled","css","styledContext","ThemeProvider","component","textComponent","internal","Object","freeze","isEmpty","param","Array","isArray","length","entries","constructor","context","createContext","VitusLabsProvider","Provider","theme","children","props","React","StyledContext","useMemo","config","value","fns","p","reduceRight","acc","cur","content","attachProps","isValidElement","createElement","includes","isFragment","isValidElementType","cloneElement"],"mappings":"yiBAWA,MAAMA,EAAoB,QACxBC,cACAC,MACAC,cAAeC,gBACfC,UAAW,MACXC,cAAe,QAuCXC,EAAqBC,OAAOC,OAAO,CACnCP,UACF,OAAOF,EAAQE,KAEbD,aACF,OAAOD,EAAQC,QAEbE,oBACF,OAAOH,EAAQG,eAEbE,gBACF,OAAOL,EAAQK,WAEbC,oBACF,OAAON,EAAQM,iBCjEbI,EAAoBC,IACnBA,IAEgB,iBAAVA,OAIPC,MAAMC,QAAQF,IAA2B,IAAjBA,EAAMG,SAKQ,IAAxCN,OAAOO,QAAQJ,GAAcG,QAC7BH,EAAMK,cAAgBR,SCbpBS,EAAUC,gBAAmB,IAC7BC,EAAoBF,EAAQG,kkBAeC,EAAGC,MAAAA,EAAOC,SAAAA,KAAaC,MAExD,IAAKF,GAASX,EAAQW,GAAQ,OAAOG,gDAAGF,GAExC,MAAMG,EAAgBC,WAAQ,IAAMC,EAAOxB,eAAe,IAE1D,OAAIsB,EAEAD,wBAACL,GAAkBS,MAAO,CAAEP,MAAAA,KAAUE,IACpCC,wBAACC,GAAcJ,MAAOA,GAAQC,IAMlCE,wBAACL,GAAkBS,MAAO,CAAEP,MAAAA,KAAUE,IACnCD,cCfL,IAA4BO,IAC3BC,GACCD,EAAIE,aAAY,CAACC,EAAUC,IAAaA,EAAID,IAAMF,qCCvBzC,CACX,IACA,OAEA,UAEA,OACA,UACA,QACA,QACA,IAGA,MACA,MACA,MACA,aACA,OACA,KACA,SACA,SACA,UAEA,OACA,OACA,MACA,WACA,OACA,WACA,KACA,MACA,UACA,MACA,SAEA,MACA,KACA,KACA,KACA,QACA,WACA,aACA,SAEA,SACA,OAGA,KACA,KACA,KACA,KACA,KACA,KAEA,SACA,KACA,OACA,IACA,SACA,MACA,QACA,MACA,MACA,QACA,SACA,KAEA,OACA,MACA,OAEA,QACA,MAGA,SACA,KACA,WACA,SACA,SACA,IAEA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OAEA,UACA,SACA,QACA,SACA,OAEA,SAEA,MACA,UACA,MACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OAEA,KACA,QAEA,IACA,KACA,MACA,QACA,cJzFiB,EACjB7B,OAAAA,EACAC,IAAAA,EACAe,QAAAA,EACAZ,UAAAA,EAAY,MACZC,cAAAA,EAAgB,WAEhBN,EAAQE,IAAMA,EACdF,EAAQC,OAASA,EACjBD,EAAQG,cAAgBc,EACxBjB,EAAQK,UAAYA,EACpBL,EAAQM,cAAgBA,+BKhCW,CAAC4B,EAASC,IACxCD,EAEkB,iBAAZA,GAAwBE,iBAAeF,GACzCC,EACHE,gBAAcH,EAASC,GACvBE,gBAAcH,GAGhB,CAAC,SAAU,UAAW,UAAUI,gBAAgBJ,IAIhDtB,MAAMC,QAAQqB,IAAYK,aAAWL,GAHhCA,EAOLM,qBAAmBN,GACdC,EACHE,gBAAcH,EAASC,GACvBE,gBAAcH,GAGhBE,iBAAeF,GACbxB,EAAQyB,GACHD,EAGFO,eAAaP,EAASC,GAGxBD,EA9Bc"}
1
+ {"version":3,"file":"vitus-labs-core.umd.min.js","sources":["../src/config.ts","../src/isEmpty.ts","../src/context.tsx","../src/compose.ts","../src/html/htmlTags.ts","../src/renderContent.ts"],"sourcesContent":["import { ComponentType } from 'react'\nimport styled, {\n css,\n ThemeProvider,\n ThemedCssFunction,\n StyledInterface,\n DefaultTheme,\n ThemeProviderComponent,\n} from 'styled-components'\nimport type { HTMLTags } from '~/html'\n\nconst OPTIONS: Internal = {\n styled,\n css,\n styledContext: ThemeProvider,\n component: 'div',\n textComponent: 'span',\n} as Internal\n\ntype Init = ({\n styled,\n css,\n context,\n component,\n textComponent,\n}: {\n styled: any\n css: any\n context: any\n component?: ComponentType | HTMLTags\n textComponent?: ComponentType | HTMLTags\n}) => void\n\nconst init: Init = ({\n styled,\n css,\n context,\n component = 'div',\n textComponent = 'span',\n}) => {\n OPTIONS.css = css\n OPTIONS.styled = styled\n OPTIONS.styledContext = context\n OPTIONS.component = component\n OPTIONS.textComponent = textComponent\n}\n\ninterface Internal {\n css: ThemedCssFunction<DefaultTheme>\n styled: StyledInterface\n styledContext: ThemeProviderComponent<any, any>\n component: any\n textComponent: any\n}\n\nconst internal: Internal = Object.freeze({\n get css() {\n return OPTIONS.css\n },\n get styled() {\n return OPTIONS.styled\n },\n get styledContext() {\n return OPTIONS.styledContext\n },\n get component() {\n return OPTIONS.component\n },\n get textComponent() {\n return OPTIONS.textComponent\n },\n})\n\nexport { init }\nexport default internal\n","export type IsEmpty = <T extends Record<string, unknown> | unknown[] | null>(\n param?: T\n) => null | undefined extends T ? true : keyof T extends never ? true : false\n\nconst isEmpty: IsEmpty = (param) => {\n if (!param) return true\n\n if (typeof param !== 'object') {\n return true as any\n }\n\n if (Array.isArray(param) && param.length === 0) {\n return true\n }\n\n if (\n Object.entries(param as any).length === 0 &&\n param.constructor === Object\n ) {\n return true\n }\n\n return false\n}\n\nexport default isEmpty\n","import React, { createContext, FC, useMemo } from 'react'\nimport config from '~/config'\nimport isEmpty from '~/isEmpty'\n\nconst context = createContext<any>({})\nconst VitusLabsProvider = context.Provider\n\ntype Theme = Partial<\n {\n rootSize: number\n breakpoints: Record<string, number | string>\n } & Record<string, any>\n>\n\ntype ProviderType = Partial<\n {\n theme: Theme\n } & Record<string, any>\n>\n\nconst Provider: FC<ProviderType> = ({ theme, children, ...props }) => {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n if (!theme || isEmpty(theme)) return <>{children}</>\n\n const StyledContext = useMemo(() => config.styledContext, [])\n\n if (StyledContext) {\n return (\n <VitusLabsProvider value={{ theme, ...props }}>\n <StyledContext theme={theme}>{children}</StyledContext>\n </VitusLabsProvider>\n )\n }\n\n return (\n <VitusLabsProvider value={{ theme, ...props }}>\n {children}\n </VitusLabsProvider>\n )\n}\n\nexport { context }\n\nexport default Provider\n","// const compose = <R>(fn1: (a: R) => R, ...fns: Array<(a: R) => R>) =>\n// fns.reduce((a, b) => (value) => a(b(value)), fn1)\n\n// const compose = (funcs) =>\n// funcs.reduce(\n// (a, b) => (...args) => a(b(...args)),\n// (arg) => arg\n// )\n\ntype ArityOneFn = (arg: any) => any\ntype PickLastInTuple<T extends any[]> = T extends [\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ...rest: infer U,\n argn: infer L\n]\n ? L\n : any\ntype FirstFnParameterType<T extends any[]> = Parameters<PickLastInTuple<T>>[any]\ntype LastFnReturnType<T extends any[]> = ReturnType<T[0]>\n\nconst compose =\n <T extends ArityOneFn[]>(...fns: T) =>\n (p: FirstFnParameterType<T>): LastFnReturnType<T> =>\n fns.reduceRight((acc: any, cur: any) => cur(acc), p)\n\nexport default compose\n","const TAGS = [\n 'a',\n 'abbr',\n // 'acronym',\n 'address',\n // 'applet',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n // 'base',\n // 'basefont',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n // 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'data',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n // 'dir',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n // 'font',\n 'footer',\n 'form',\n // 'frame',\n // 'frameset',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n // 'head',\n 'header',\n 'hr',\n 'html',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n // 'link',\n 'main',\n 'map',\n 'mark',\n // 'meta',\n 'meter',\n 'nav',\n // 'noframes',\n // 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n // 'param',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n // 'script',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n // 'strike',\n 'strong',\n // 'style',\n 'sub',\n 'summary',\n 'sup',\n 'svg',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n // 'title',\n 'tr',\n 'track',\n // 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n] as const\n\nconst TEXT_TAGS = [\n 'abbr',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'cite',\n 'code',\n 'dl',\n 'dt',\n 'em',\n 'figcaption',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'i',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'p',\n 'pre',\n 'q',\n 'rp',\n 'rt',\n 's',\n 'small',\n 'span',\n 'strong',\n 'sub',\n 'summary',\n 'sup',\n 'time',\n 'u',\n] as const\n\nexport type HTMLTags = typeof TAGS[number]\n\nexport type HTMLTagsText = typeof TEXT_TAGS[number]\n\nexport default TAGS\n","import { isValidElementType, isFragment } from 'react-is'\nimport { createElement, isValidElement, cloneElement, ReactNode } from 'react'\nimport isEmpty from './isEmpty'\n\ntype CreateTypes = Parameters<typeof createElement>[0]\ntype CloneTypes = Parameters<typeof cloneElement>[0]\n\nexport type RenderContent = (\n content?: CreateTypes | CloneTypes | ReactNode | ReactNode[],\n attachProps?: Record<string, any>\n) => ReturnType<typeof createElement> | ReturnType<typeof cloneElement> | null\n\nconst renderContent: RenderContent = (content, attachProps) => {\n if (!content) return null as any\n\n if (typeof content === 'string' && isValidElement(content)) {\n return attachProps\n ? createElement(content, attachProps)\n : createElement(content)\n }\n\n if (['number', 'boolean', 'string'].includes(typeof content)) {\n return content\n }\n\n if (Array.isArray(content) || isFragment(content)) {\n return content\n }\n\n if (isValidElementType(content)) {\n return attachProps\n ? createElement(content, attachProps)\n : createElement(content)\n }\n\n if (isValidElement(content)) {\n if (isEmpty(attachProps)) {\n return content\n }\n\n return cloneElement(content, attachProps)\n }\n\n return content\n}\n\nexport default renderContent\n"],"names":["OPTIONS","styled","css","styledContext","ThemeProvider","component","textComponent","internal","Object","freeze","isEmpty","param","Array","isArray","length","entries","constructor","context","createContext","VitusLabsProvider","Provider","theme","children","props","React","StyledContext","useMemo","config","value","fns","p","reduceRight","acc","cur","content","attachProps","isValidElement","createElement","includes","isFragment","isValidElementType","cloneElement"],"mappings":"yiBAWA,MAAMA,EAAoB,QACxBC,cACAC,MACAC,cAAeC,gBACfC,UAAW,MACXC,cAAe,QAuCXC,EAAqBC,OAAOC,OAAO,CACvCP,UACE,OAAOF,EAAQE,KAEjBD,aACE,OAAOD,EAAQC,QAEjBE,oBACE,OAAOH,EAAQG,eAEjBE,gBACE,OAAOL,EAAQK,WAEjBC,oBACE,OAAON,EAAQM,iBCjEbI,EAAoBC,IACnBA,IAEgB,iBAAVA,OAIPC,MAAMC,QAAQF,IAA2B,IAAjBA,EAAMG,SAKQ,IAAxCN,OAAOO,QAAQJ,GAAcG,QAC7BH,EAAMK,cAAgBR,SCbpBS,EAAUC,gBAAmB,IAC7BC,EAAoBF,EAAQG,kkBAeC,EAAGC,MAAAA,EAAOC,SAAAA,KAAaC,MAExD,IAAKF,GAASX,EAAQW,GAAQ,OAAOG,gDAAGF,GAExC,MAAMG,EAAgBC,WAAQ,IAAMC,EAAOxB,eAAe,IAE1D,OAAIsB,EAEAD,wBAACL,GAAkBS,MAAO,CAAEP,MAAAA,KAAUE,IACpCC,wBAACC,GAAcJ,MAAOA,GAAQC,IAMlCE,wBAACL,GAAkBS,MAAO,CAAEP,MAAAA,KAAUE,IACnCD,cCfL,IAA4BO,IAC3BC,GACCD,EAAIE,aAAY,CAACC,EAAUC,IAAaA,EAAID,IAAMF,qCCvBzC,CACX,IACA,OAEA,UAEA,OACA,UACA,QACA,QACA,IAGA,MACA,MACA,MACA,aACA,OACA,KACA,SACA,SACA,UAEA,OACA,OACA,MACA,WACA,OACA,WACA,KACA,MACA,UACA,MACA,SAEA,MACA,KACA,KACA,KACA,QACA,WACA,aACA,SAEA,SACA,OAGA,KACA,KACA,KACA,KACA,KACA,KAEA,SACA,KACA,OACA,IACA,SACA,MACA,QACA,MACA,MACA,QACA,SACA,KAEA,OACA,MACA,OAEA,QACA,MAGA,SACA,KACA,WACA,SACA,SACA,IAEA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OAEA,UACA,SACA,QACA,SACA,OAEA,SAEA,MACA,UACA,MACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OAEA,KACA,QAEA,IACA,KACA,MACA,QACA,cJzFiB,EACjB7B,OAAAA,EACAC,IAAAA,EACAe,QAAAA,EACAZ,UAAAA,EAAY,MACZC,cAAAA,EAAgB,WAEhBN,EAAQE,IAAMA,EACdF,EAAQC,OAASA,EACjBD,EAAQG,cAAgBc,EACxBjB,EAAQK,UAAYA,EACpBL,EAAQM,cAAgBA,+BKhCW,CAAC4B,EAASC,IACxCD,EAEkB,iBAAZA,GAAwBE,iBAAeF,GACzCC,EACHE,gBAAcH,EAASC,GACvBE,gBAAcH,GAGhB,CAAC,SAAU,UAAW,UAAUI,gBAAgBJ,IAIhDtB,MAAMC,QAAQqB,IAAYK,aAAWL,GAHhCA,EAOLM,qBAAmBN,GACdC,EACHE,gBAAcH,EAASC,GACvBE,gBAAcH,GAGhBE,iBAAeF,GACbxB,EAAQyB,GACHD,EAGFO,eAAaP,EAASC,GAGxBD,EA9Bc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitus-labs/core",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "license": "MIT",
5
5
  "author": "Vit Bokisch <vit@bokisch.cz>",
6
6
  "maintainers": [
@@ -62,10 +62,10 @@
62
62
  "@emotion/react": "^11.7.1",
63
63
  "@emotion/styled": "^11.6.0",
64
64
  "@types/lodash": "^4.14.178",
65
- "@vitus-labs/tools-babel": "^0.26.0",
66
- "@vitus-labs/tools-rollup": "^0.26.0",
67
- "@vitus-labs/tools-typescript": "^0.26.0",
65
+ "@vitus-labs/tools-babel": "^0.27.0",
66
+ "@vitus-labs/tools-rollup": "^0.27.0",
67
+ "@vitus-labs/tools-typescript": "^0.27.0",
68
68
  "styled-components": "^5.3.3"
69
69
  },
70
- "gitHead": "68640ca2ea14b1f13d09cd7a291399078079f71c"
70
+ "gitHead": "32d6c7af10d15556e6b2075ba59841e86aa69cff"
71
71
  }