@vitus-labs/core 0.34.0 → 0.37.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":"0319-1","name":"config.ts"},{"uid":"0319-3","name":"isEmpty.ts"},{"uid":"0319-5","name":"context.tsx"},{"uid":"0319-7","name":"compose.ts"},{"uid":"0319-9","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"0319-11"},{"uid":"0319-13","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"0319-1":{"renderedLength":810,"gzipLength":294,"brotliLength":0,"mainUid":"0319-0"},"0319-3":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"0319-2"},"0319-5":{"renderedLength":783,"gzipLength":332,"brotliLength":0,"mainUid":"0319-4"},"0319-7":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"0319-6"},"0319-9":{"renderedLength":893,"gzipLength":284,"brotliLength":0,"mainUid":"0319-8"},"0319-11":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"0319-10"},"0319-13":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"0319-12"}},"nodeMetas":{"0319-0":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.js":"0319-1"},"imported":[{"uid":"0319-17"}],"importedBy":[{"uid":"0319-12"},{"uid":"0319-4"}]},"0319-2":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.js":"0319-3"},"imported":[],"importedBy":[{"uid":"0319-12"},{"uid":"0319-4"},{"uid":"0319-8"}]},"0319-4":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.js":"0319-5"},"imported":[{"uid":"0319-18"},{"uid":"0319-0"},{"uid":"0319-2"}],"importedBy":[{"uid":"0319-12"}]},"0319-6":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.js":"0319-7"},"imported":[],"importedBy":[{"uid":"0319-12"}]},"0319-8":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.js":"0319-9"},"imported":[{"uid":"0319-19"},{"uid":"0319-18"},{"uid":"0319-2"}],"importedBy":[{"uid":"0319-12"}]},"0319-10":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.js":"0319-11"},"imported":[],"importedBy":[{"uid":"0319-16"}]},"0319-12":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.js":"0319-13"},"imported":[{"uid":"0319-14"},{"uid":"0319-15"},{"uid":"0319-0"},{"uid":"0319-4"},{"uid":"0319-6"},{"uid":"0319-2"},{"uid":"0319-8"},{"uid":"0319-16"}],"importedBy":[],"isEntry":true},"0319-14":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-12"}],"isExternal":true},"0319-15":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-12"}],"isExternal":true},"0319-16":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"0319-10"}],"importedBy":[{"uid":"0319-12"}]},"0319-17":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-0"}],"isExternal":true},"0319-18":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-4"},{"uid":"0319-8"}],"isExternal":true},"0319-19":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-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":"285c-1","name":"config.ts"},{"uid":"285c-3","name":"isEmpty.ts"},{"uid":"285c-5","name":"context.tsx"},{"uid":"285c-7","name":"compose.ts"},{"uid":"285c-9","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"285c-11"},{"uid":"285c-13","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"285c-1":{"renderedLength":810,"gzipLength":294,"brotliLength":0,"mainUid":"285c-0"},"285c-3":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"285c-2"},"285c-5":{"renderedLength":783,"gzipLength":332,"brotliLength":0,"mainUid":"285c-4"},"285c-7":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"285c-6"},"285c-9":{"renderedLength":893,"gzipLength":284,"brotliLength":0,"mainUid":"285c-8"},"285c-11":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"285c-10"},"285c-13":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"285c-12"}},"nodeMetas":{"285c-0":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.js":"285c-1"},"imported":[{"uid":"285c-17"}],"importedBy":[{"uid":"285c-12"},{"uid":"285c-4"}]},"285c-2":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.js":"285c-3"},"imported":[],"importedBy":[{"uid":"285c-12"},{"uid":"285c-4"},{"uid":"285c-8"}]},"285c-4":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.js":"285c-5"},"imported":[{"uid":"285c-18"},{"uid":"285c-0"},{"uid":"285c-2"}],"importedBy":[{"uid":"285c-12"}]},"285c-6":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.js":"285c-7"},"imported":[],"importedBy":[{"uid":"285c-12"}]},"285c-8":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.js":"285c-9"},"imported":[{"uid":"285c-19"},{"uid":"285c-18"},{"uid":"285c-2"}],"importedBy":[{"uid":"285c-12"}]},"285c-10":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.js":"285c-11"},"imported":[],"importedBy":[{"uid":"285c-16"}]},"285c-12":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.js":"285c-13"},"imported":[{"uid":"285c-14"},{"uid":"285c-15"},{"uid":"285c-0"},{"uid":"285c-4"},{"uid":"285c-6"},{"uid":"285c-2"},{"uid":"285c-8"},{"uid":"285c-16"}],"importedBy":[],"isEntry":true},"285c-14":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-12"}],"isExternal":true},"285c-15":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-12"}],"isExternal":true},"285c-16":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"285c-10"}],"importedBy":[{"uid":"285c-12"}]},"285c-17":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-0"}],"isExternal":true},"285c-18":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-4"},{"uid":"285c-8"}],"isExternal":true},"285c-19":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-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":"0319-21","name":"config.ts"},{"uid":"0319-23","name":"isEmpty.ts"},{"uid":"0319-25","name":"context.tsx"},{"uid":"0319-27","name":"compose.ts"},{"uid":"0319-29","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"0319-31"},{"uid":"0319-33","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"0319-21":{"renderedLength":763,"gzipLength":273,"brotliLength":0,"mainUid":"0319-20"},"0319-23":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"0319-22"},"0319-25":{"renderedLength":671,"gzipLength":314,"brotliLength":0,"mainUid":"0319-24"},"0319-27":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"0319-26"},"0319-29":{"renderedLength":835,"gzipLength":269,"brotliLength":0,"mainUid":"0319-28"},"0319-31":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"0319-30"},"0319-33":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"0319-32"}},"nodeMetas":{"0319-20":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.module.js":"0319-21"},"imported":[{"uid":"0319-37"}],"importedBy":[{"uid":"0319-32"},{"uid":"0319-24"}]},"0319-22":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.module.js":"0319-23"},"imported":[],"importedBy":[{"uid":"0319-32"},{"uid":"0319-24"},{"uid":"0319-28"}]},"0319-24":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.module.js":"0319-25"},"imported":[{"uid":"0319-38"},{"uid":"0319-20"},{"uid":"0319-22"}],"importedBy":[{"uid":"0319-32"}]},"0319-26":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.module.js":"0319-27"},"imported":[],"importedBy":[{"uid":"0319-32"}]},"0319-28":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.module.js":"0319-29"},"imported":[{"uid":"0319-39"},{"uid":"0319-38"},{"uid":"0319-22"}],"importedBy":[{"uid":"0319-32"}]},"0319-30":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.module.js":"0319-31"},"imported":[],"importedBy":[{"uid":"0319-36"}]},"0319-32":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.module.js":"0319-33"},"imported":[{"uid":"0319-34"},{"uid":"0319-35"},{"uid":"0319-20"},{"uid":"0319-24"},{"uid":"0319-26"},{"uid":"0319-22"},{"uid":"0319-28"},{"uid":"0319-36"}],"importedBy":[],"isEntry":true},"0319-34":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-32"}],"isExternal":true},"0319-35":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-32"}],"isExternal":true},"0319-36":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"0319-30"}],"importedBy":[{"uid":"0319-32"}]},"0319-37":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-20"}],"isExternal":true},"0319-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-24"},{"uid":"0319-28"}],"isExternal":true},"0319-39":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-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":"285c-21","name":"config.ts"},{"uid":"285c-23","name":"isEmpty.ts"},{"uid":"285c-25","name":"context.tsx"},{"uid":"285c-27","name":"compose.ts"},{"uid":"285c-29","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"285c-31"},{"uid":"285c-33","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"285c-21":{"renderedLength":763,"gzipLength":273,"brotliLength":0,"mainUid":"285c-20"},"285c-23":{"renderedLength":358,"gzipLength":180,"brotliLength":0,"mainUid":"285c-22"},"285c-25":{"renderedLength":671,"gzipLength":314,"brotliLength":0,"mainUid":"285c-24"},"285c-27":{"renderedLength":207,"gzipLength":153,"brotliLength":0,"mainUid":"285c-26"},"285c-29":{"renderedLength":835,"gzipLength":269,"brotliLength":0,"mainUid":"285c-28"},"285c-31":{"renderedLength":1715,"gzipLength":502,"brotliLength":0,"mainUid":"285c-30"},"285c-33":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"285c-32"}},"nodeMetas":{"285c-20":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.module.js":"285c-21"},"imported":[{"uid":"285c-37"}],"importedBy":[{"uid":"285c-32"},{"uid":"285c-24"}]},"285c-22":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.module.js":"285c-23"},"imported":[],"importedBy":[{"uid":"285c-32"},{"uid":"285c-24"},{"uid":"285c-28"}]},"285c-24":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.module.js":"285c-25"},"imported":[{"uid":"285c-38"},{"uid":"285c-20"},{"uid":"285c-22"}],"importedBy":[{"uid":"285c-32"}]},"285c-26":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.module.js":"285c-27"},"imported":[],"importedBy":[{"uid":"285c-32"}]},"285c-28":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.module.js":"285c-29"},"imported":[{"uid":"285c-39"},{"uid":"285c-38"},{"uid":"285c-22"}],"importedBy":[{"uid":"285c-32"}]},"285c-30":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.module.js":"285c-31"},"imported":[],"importedBy":[{"uid":"285c-36"}]},"285c-32":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.module.js":"285c-33"},"imported":[{"uid":"285c-34"},{"uid":"285c-35"},{"uid":"285c-20"},{"uid":"285c-24"},{"uid":"285c-26"},{"uid":"285c-22"},{"uid":"285c-28"},{"uid":"285c-36"}],"importedBy":[],"isEntry":true},"285c-34":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-32"}],"isExternal":true},"285c-35":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-32"}],"isExternal":true},"285c-36":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"285c-30"}],"importedBy":[{"uid":"285c-32"}]},"285c-37":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-20"}],"isExternal":true},"285c-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-24"},{"uid":"285c-28"}],"isExternal":true},"285c-39":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-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":"0319-41","name":"config.ts"},{"uid":"0319-43","name":"isEmpty.ts"},{"uid":"0319-45","name":"context.tsx"},{"uid":"0319-47","name":"compose.ts"},{"uid":"0319-49","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"0319-51"},{"uid":"0319-53","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"0319-41":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"0319-40"},"0319-43":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"0319-42"},"0319-45":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"0319-44"},"0319-47":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"0319-46"},"0319-49":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"0319-48"},"0319-51":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"0319-50"},"0319-53":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"0319-52"}},"nodeMetas":{"0319-40":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.js":"0319-41"},"imported":[{"uid":"0319-57"}],"importedBy":[{"uid":"0319-52"},{"uid":"0319-44"}]},"0319-42":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.js":"0319-43"},"imported":[],"importedBy":[{"uid":"0319-52"},{"uid":"0319-44"},{"uid":"0319-48"}]},"0319-44":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.js":"0319-45"},"imported":[{"uid":"0319-58"},{"uid":"0319-40"},{"uid":"0319-42"}],"importedBy":[{"uid":"0319-52"}]},"0319-46":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.js":"0319-47"},"imported":[],"importedBy":[{"uid":"0319-52"}]},"0319-48":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.js":"0319-49"},"imported":[{"uid":"0319-59"},{"uid":"0319-58"},{"uid":"0319-42"}],"importedBy":[{"uid":"0319-52"}]},"0319-50":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.js":"0319-51"},"imported":[],"importedBy":[{"uid":"0319-56"}]},"0319-52":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.js":"0319-53"},"imported":[{"uid":"0319-54"},{"uid":"0319-55"},{"uid":"0319-40"},{"uid":"0319-44"},{"uid":"0319-46"},{"uid":"0319-42"},{"uid":"0319-48"},{"uid":"0319-56"}],"importedBy":[],"isEntry":true},"0319-54":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-52"}],"isExternal":true},"0319-55":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-52"}],"isExternal":true},"0319-56":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"0319-50"}],"importedBy":[{"uid":"0319-52"}]},"0319-57":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-40"}],"isExternal":true},"0319-58":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-44"},{"uid":"0319-48"}],"isExternal":true},"0319-59":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-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":"285c-41","name":"config.ts"},{"uid":"285c-43","name":"isEmpty.ts"},{"uid":"285c-45","name":"context.tsx"},{"uid":"285c-47","name":"compose.ts"},{"uid":"285c-49","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"285c-51"},{"uid":"285c-53","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"285c-41":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"285c-40"},"285c-43":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"285c-42"},"285c-45":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"285c-44"},"285c-47":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"285c-46"},"285c-49":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"285c-48"},"285c-51":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"285c-50"},"285c-53":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"285c-52"}},"nodeMetas":{"285c-40":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.js":"285c-41"},"imported":[{"uid":"285c-57"}],"importedBy":[{"uid":"285c-52"},{"uid":"285c-44"}]},"285c-42":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.js":"285c-43"},"imported":[],"importedBy":[{"uid":"285c-52"},{"uid":"285c-44"},{"uid":"285c-48"}]},"285c-44":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.js":"285c-45"},"imported":[{"uid":"285c-58"},{"uid":"285c-40"},{"uid":"285c-42"}],"importedBy":[{"uid":"285c-52"}]},"285c-46":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.js":"285c-47"},"imported":[],"importedBy":[{"uid":"285c-52"}]},"285c-48":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.js":"285c-49"},"imported":[{"uid":"285c-59"},{"uid":"285c-58"},{"uid":"285c-42"}],"importedBy":[{"uid":"285c-52"}]},"285c-50":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.js":"285c-51"},"imported":[],"importedBy":[{"uid":"285c-56"}]},"285c-52":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.js":"285c-53"},"imported":[{"uid":"285c-54"},{"uid":"285c-55"},{"uid":"285c-40"},{"uid":"285c-44"},{"uid":"285c-46"},{"uid":"285c-42"},{"uid":"285c-48"},{"uid":"285c-56"}],"importedBy":[],"isEntry":true},"285c-54":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-52"}],"isExternal":true},"285c-55":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-52"}],"isExternal":true},"285c-56":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"285c-50"}],"importedBy":[{"uid":"285c-52"}]},"285c-57":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-40"}],"isExternal":true},"285c-58":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-44"},{"uid":"285c-48"}],"isExternal":true},"285c-59":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-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":"0319-61","name":"config.ts"},{"uid":"0319-63","name":"isEmpty.ts"},{"uid":"0319-65","name":"context.tsx"},{"uid":"0319-67","name":"compose.ts"},{"uid":"0319-69","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"0319-71"},{"uid":"0319-73","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"0319-61":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"0319-60"},"0319-63":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"0319-62"},"0319-65":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"0319-64"},"0319-67":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"0319-66"},"0319-69":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"0319-68"},"0319-71":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"0319-70"},"0319-73":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"0319-72"}},"nodeMetas":{"0319-60":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.min.js":"0319-61"},"imported":[{"uid":"0319-77"}],"importedBy":[{"uid":"0319-72"},{"uid":"0319-64"}]},"0319-62":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.min.js":"0319-63"},"imported":[],"importedBy":[{"uid":"0319-72"},{"uid":"0319-64"},{"uid":"0319-68"}]},"0319-64":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.min.js":"0319-65"},"imported":[{"uid":"0319-78"},{"uid":"0319-60"},{"uid":"0319-62"}],"importedBy":[{"uid":"0319-72"}]},"0319-66":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.min.js":"0319-67"},"imported":[],"importedBy":[{"uid":"0319-72"}]},"0319-68":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.min.js":"0319-69"},"imported":[{"uid":"0319-79"},{"uid":"0319-78"},{"uid":"0319-62"}],"importedBy":[{"uid":"0319-72"}]},"0319-70":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.min.js":"0319-71"},"imported":[],"importedBy":[{"uid":"0319-76"}]},"0319-72":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.min.js":"0319-73"},"imported":[{"uid":"0319-74"},{"uid":"0319-75"},{"uid":"0319-60"},{"uid":"0319-64"},{"uid":"0319-66"},{"uid":"0319-62"},{"uid":"0319-68"},{"uid":"0319-76"}],"importedBy":[],"isEntry":true},"0319-74":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-72"}],"isExternal":true},"0319-75":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-72"}],"isExternal":true},"0319-76":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"0319-70"}],"importedBy":[{"uid":"0319-72"}]},"0319-77":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-60"}],"isExternal":true},"0319-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-64"},{"uid":"0319-68"}],"isExternal":true},"0319-79":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"0319-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":"285c-61","name":"config.ts"},{"uid":"285c-63","name":"isEmpty.ts"},{"uid":"285c-65","name":"context.tsx"},{"uid":"285c-67","name":"compose.ts"},{"uid":"285c-69","name":"renderContent.ts"},{"name":"html/htmlTags.ts","uid":"285c-71"},{"uid":"285c-73","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"285c-61":{"renderedLength":872,"gzipLength":297,"brotliLength":0,"mainUid":"285c-60"},"285c-63":{"renderedLength":388,"gzipLength":181,"brotliLength":0,"mainUid":"285c-62"},"285c-65":{"renderedLength":809,"gzipLength":332,"brotliLength":0,"mainUid":"285c-64"},"285c-67":{"renderedLength":213,"gzipLength":155,"brotliLength":0,"mainUid":"285c-66"},"285c-69":{"renderedLength":947,"gzipLength":287,"brotliLength":0,"mainUid":"285c-68"},"285c-71":{"renderedLength":1963,"gzipLength":510,"brotliLength":0,"mainUid":"285c-70"},"285c-73":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"285c-72"}},"nodeMetas":{"285c-60":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.umd.min.js":"285c-61"},"imported":[{"uid":"285c-77"}],"importedBy":[{"uid":"285c-72"},{"uid":"285c-64"}]},"285c-62":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.umd.min.js":"285c-63"},"imported":[],"importedBy":[{"uid":"285c-72"},{"uid":"285c-64"},{"uid":"285c-68"}]},"285c-64":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.umd.min.js":"285c-65"},"imported":[{"uid":"285c-78"},{"uid":"285c-60"},{"uid":"285c-62"}],"importedBy":[{"uid":"285c-72"}]},"285c-66":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.umd.min.js":"285c-67"},"imported":[],"importedBy":[{"uid":"285c-72"}]},"285c-68":{"id":"/src/renderContent.ts","moduleParts":{"vitus-labs-core.umd.min.js":"285c-69"},"imported":[{"uid":"285c-79"},{"uid":"285c-78"},{"uid":"285c-62"}],"importedBy":[{"uid":"285c-72"}]},"285c-70":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.umd.min.js":"285c-71"},"imported":[],"importedBy":[{"uid":"285c-76"}]},"285c-72":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.umd.min.js":"285c-73"},"imported":[{"uid":"285c-74"},{"uid":"285c-75"},{"uid":"285c-60"},{"uid":"285c-64"},{"uid":"285c-66"},{"uid":"285c-62"},{"uid":"285c-68"},{"uid":"285c-76"}],"importedBy":[],"isEntry":true},"285c-74":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-72"}],"isExternal":true},"285c-75":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-72"}],"isExternal":true},"285c-76":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"285c-70"}],"importedBy":[{"uid":"285c-72"}]},"285c-77":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-60"}],"isExternal":true},"285c-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-64"},{"uid":"285c-68"}],"isExternal":true},"285c-79":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"285c-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.34.0",
3
+ "version": "0.37.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": "ea39c67f8a86c8a0ec5063924fc5efba76573d9d"
70
+ "gitHead": "4cd4030a5d4cbd3451ea507b0a8dbcb71ae991e2"
71
71
  }