@limetech/kompendium 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +313 -0
  3. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +13 -0
  4. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js.map +1 -0
  5. package/dist/cjs/anchor-scroll-BmplAyR0.js +69 -0
  6. package/dist/cjs/anchor-scroll-BmplAyR0.js.map +1 -0
  7. package/dist/cjs/index-DYiJ6dQL.js +1866 -0
  8. package/dist/cjs/index-DYiJ6dQL.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +3 -0
  10. package/dist/cjs/index.cjs.js.map +1 -0
  11. package/dist/cjs/kompendium-app.kompendium-darkmode-switch.kompendium-navigation.kompendium-search.stencil-route.stencil-route-switch.stencil-router.entry.cjs.js.map +1 -0
  12. package/dist/cjs/kompendium-app_7.cjs.entry.js +2924 -0
  13. package/dist/cjs/kompendium-code.cjs.entry.js +2724 -0
  14. package/dist/cjs/kompendium-code.entry.cjs.js.map +1 -0
  15. package/dist/cjs/kompendium-component.cjs.entry.js +207 -0
  16. package/dist/cjs/kompendium-component.entry.cjs.js.map +1 -0
  17. package/dist/cjs/kompendium-debug.cjs.entry.js +47 -0
  18. package/dist/cjs/kompendium-debug.entry.cjs.js.map +1 -0
  19. package/dist/cjs/kompendium-example-code.cjs.entry.js +20 -0
  20. package/dist/cjs/kompendium-example-code.entry.cjs.js.map +1 -0
  21. package/dist/cjs/kompendium-example-markdown.cjs.entry.js +165 -0
  22. package/dist/cjs/kompendium-example-markdown.entry.cjs.js.map +1 -0
  23. package/dist/cjs/kompendium-guide.cjs.entry.js +33 -0
  24. package/dist/cjs/kompendium-guide.entry.cjs.js.map +1 -0
  25. package/dist/cjs/kompendium-markdown.cjs.entry.js +48923 -0
  26. package/dist/cjs/kompendium-markdown.entry.cjs.js.map +1 -0
  27. package/dist/cjs/kompendium-playground.cjs.entry.js +89 -0
  28. package/dist/cjs/kompendium-playground.entry.cjs.js.map +1 -0
  29. package/dist/cjs/kompendium-proplist.kompendium-taglist.entry.cjs.js.map +1 -0
  30. package/dist/cjs/kompendium-proplist_2.cjs.entry.js +49 -0
  31. package/dist/cjs/kompendium-type.cjs.entry.js +83 -0
  32. package/dist/cjs/kompendium-type.entry.cjs.js.map +1 -0
  33. package/dist/cjs/kompendium.cjs.js +25 -0
  34. package/dist/cjs/kompendium.cjs.js.map +1 -0
  35. package/dist/cjs/loader.cjs.js +13 -0
  36. package/dist/cjs/loader.cjs.js.map +1 -0
  37. package/dist/cjs/markdown-types-B884tLd-.js +15 -0
  38. package/dist/cjs/markdown-types-B884tLd-.js.map +1 -0
  39. package/dist/cjs/methods-DoA78dOH.js +97 -0
  40. package/dist/cjs/methods-DoA78dOH.js.map +1 -0
  41. package/dist/cjs/types-SjA7Kcy_.js +8 -0
  42. package/dist/cjs/types-SjA7Kcy_.js.map +1 -0
  43. package/dist/collection/assets/favicon.svg +65 -0
  44. package/dist/collection/assets/icons/bookmark-fill.svg +1 -0
  45. package/dist/collection/assets/icons/danger.svg +1 -0
  46. package/dist/collection/assets/icons/debug.svg +1 -0
  47. package/dist/collection/assets/icons/important.svg +1 -0
  48. package/dist/collection/assets/icons/info.svg +1 -0
  49. package/dist/collection/assets/icons/logo.svg +1 -0
  50. package/dist/collection/assets/icons/note.svg +1 -0
  51. package/dist/collection/assets/icons/search.svg +1 -0
  52. package/dist/collection/assets/icons/tip.svg +1 -0
  53. package/dist/collection/assets/icons/warning.svg +1 -0
  54. package/dist/collection/assets/logotype.svg +64 -0
  55. package/dist/collection/collection-manifest.json +35 -0
  56. package/dist/collection/components/anchor-scroll.js +61 -0
  57. package/dist/collection/components/anchor-scroll.js.map +1 -0
  58. package/dist/collection/components/app/app.css +125 -0
  59. package/dist/collection/components/app/app.js +149 -0
  60. package/dist/collection/components/app/app.js.map +1 -0
  61. package/dist/collection/components/code/code.css +250 -0
  62. package/dist/collection/components/code/code.js +82 -0
  63. package/dist/collection/components/code/code.js.map +1 -0
  64. package/dist/collection/components/code/examples/code.js +14 -0
  65. package/dist/collection/components/code/examples/code.js.map +1 -0
  66. package/dist/collection/components/component/component.css +383 -0
  67. package/dist/collection/components/component/component.js +191 -0
  68. package/dist/collection/components/component/component.js.map +1 -0
  69. package/dist/collection/components/component/templates/events.js +32 -0
  70. package/dist/collection/components/component/templates/events.js.map +1 -0
  71. package/dist/collection/components/component/templates/examples.js +17 -0
  72. package/dist/collection/components/component/templates/examples.js.map +1 -0
  73. package/dist/collection/components/component/templates/methods.js +54 -0
  74. package/dist/collection/components/component/templates/methods.js.map +1 -0
  75. package/dist/collection/components/component/templates/props.js +36 -0
  76. package/dist/collection/components/component/templates/props.js.map +1 -0
  77. package/dist/collection/components/component/templates/slots.js +14 -0
  78. package/dist/collection/components/component/templates/slots.js.map +1 -0
  79. package/dist/collection/components/component/templates/style.js +14 -0
  80. package/dist/collection/components/component/templates/style.js.map +1 -0
  81. package/dist/collection/components/darkmode-switch/darkmode-switch.css +141 -0
  82. package/dist/collection/components/darkmode-switch/darkmode-switch.js +90 -0
  83. package/dist/collection/components/darkmode-switch/darkmode-switch.js.map +1 -0
  84. package/dist/collection/components/darkmode-switch/types.js +2 -0
  85. package/dist/collection/components/darkmode-switch/types.js.map +1 -0
  86. package/dist/collection/components/debug/debug.js +146 -0
  87. package/dist/collection/components/debug/debug.js.map +1 -0
  88. package/dist/collection/components/guide/guide.js +61 -0
  89. package/dist/collection/components/guide/guide.js.map +1 -0
  90. package/dist/collection/components/markdown/examples/markdown-example.js +150 -0
  91. package/dist/collection/components/markdown/examples/markdown-example.js.map +1 -0
  92. package/dist/collection/components/markdown/examples/markdown.js +14 -0
  93. package/dist/collection/components/markdown/examples/markdown.js.map +1 -0
  94. package/dist/collection/components/markdown/markdown-types.js +8 -0
  95. package/dist/collection/components/markdown/markdown-types.js.map +1 -0
  96. package/dist/collection/components/markdown/markdown.css +660 -0
  97. package/dist/collection/components/markdown/markdown.js +83 -0
  98. package/dist/collection/components/markdown/markdown.js.map +1 -0
  99. package/dist/collection/components/navigation/navigation.css +403 -0
  100. package/dist/collection/components/navigation/navigation.js +184 -0
  101. package/dist/collection/components/navigation/navigation.js.map +1 -0
  102. package/dist/collection/components/playground/playground.css +198 -0
  103. package/dist/collection/components/playground/playground.js +174 -0
  104. package/dist/collection/components/playground/playground.js.map +1 -0
  105. package/dist/collection/components/playground/playground.types.js +2 -0
  106. package/dist/collection/components/playground/playground.types.js.map +1 -0
  107. package/dist/collection/components/proplist/proplist.css +334 -0
  108. package/dist/collection/components/proplist/proplist.js +53 -0
  109. package/dist/collection/components/proplist/proplist.js.map +1 -0
  110. package/dist/collection/components/search/search.css +183 -0
  111. package/dist/collection/components/search/search.js +76 -0
  112. package/dist/collection/components/search/search.js.map +1 -0
  113. package/dist/collection/components/taglist/taglist.css +58 -0
  114. package/dist/collection/components/taglist/taglist.js +82 -0
  115. package/dist/collection/components/taglist/taglist.js.map +1 -0
  116. package/dist/collection/components/type/templates/alias.js +11 -0
  117. package/dist/collection/components/type/templates/alias.js.map +1 -0
  118. package/dist/collection/components/type/templates/enum.js +25 -0
  119. package/dist/collection/components/type/templates/enum.js.map +1 -0
  120. package/dist/collection/components/type/templates/interface.js +13 -0
  121. package/dist/collection/components/type/templates/interface.js.map +1 -0
  122. package/dist/collection/components/type/type.js +97 -0
  123. package/dist/collection/components/type/type.js.map +1 -0
  124. package/dist/collection/index.js +4 -0
  125. package/dist/collection/index.js.map +1 -0
  126. package/dist/collection/kompendium/config.js +7 -0
  127. package/dist/collection/kompendium/config.js.map +1 -0
  128. package/dist/collection/kompendium/filesystem.js +9 -0
  129. package/dist/collection/kompendium/filesystem.js.map +1 -0
  130. package/dist/collection/kompendium/generator.js +217 -0
  131. package/dist/collection/kompendium/generator.js.map +1 -0
  132. package/dist/collection/kompendium/guides.js +30 -0
  133. package/dist/collection/kompendium/guides.js.map +1 -0
  134. package/dist/collection/kompendium/index.js +2 -0
  135. package/dist/collection/kompendium/index.js.map +1 -0
  136. package/dist/collection/kompendium/markdown-admonitions.js +82 -0
  137. package/dist/collection/kompendium/markdown-admonitions.js.map +1 -0
  138. package/dist/collection/kompendium/markdown-code.js +40 -0
  139. package/dist/collection/kompendium/markdown-code.js.map +1 -0
  140. package/dist/collection/kompendium/markdown-frontmatter.js +12 -0
  141. package/dist/collection/kompendium/markdown-frontmatter.js.map +1 -0
  142. package/dist/collection/kompendium/markdown-nodes.js +10 -0
  143. package/dist/collection/kompendium/markdown-nodes.js.map +1 -0
  144. package/dist/collection/kompendium/markdown-typelinks.js +115 -0
  145. package/dist/collection/kompendium/markdown-typelinks.js.map +1 -0
  146. package/dist/collection/kompendium/markdown.js +35 -0
  147. package/dist/collection/kompendium/markdown.js.map +1 -0
  148. package/dist/collection/kompendium/menu.js +149 -0
  149. package/dist/collection/kompendium/menu.js.map +1 -0
  150. package/dist/collection/kompendium/schema.js +167 -0
  151. package/dist/collection/kompendium/schema.js.map +1 -0
  152. package/dist/collection/kompendium/search.js +144 -0
  153. package/dist/collection/kompendium/search.js.map +1 -0
  154. package/dist/collection/kompendium/source.js +81 -0
  155. package/dist/collection/kompendium/source.js.map +1 -0
  156. package/dist/collection/kompendium/test/fixtures/basic.js +48 -0
  157. package/dist/collection/kompendium/test/fixtures/basic.js.map +1 -0
  158. package/dist/collection/kompendium/test/fixtures/filtering/example-type.js +2 -0
  159. package/dist/collection/kompendium/test/fixtures/filtering/example-type.js.map +1 -0
  160. package/dist/collection/kompendium/test/fixtures/filtering/node-modules-type.js +2 -0
  161. package/dist/collection/kompendium/test/fixtures/filtering/node-modules-type.js.map +1 -0
  162. package/dist/collection/kompendium/test/fixtures/filtering/private-types.js +2 -0
  163. package/dist/collection/kompendium/test/fixtures/filtering/private-types.js.map +1 -0
  164. package/dist/collection/kompendium/test/fixtures/filtering/stencil-component-types.js +2 -0
  165. package/dist/collection/kompendium/test/fixtures/filtering/stencil-component-types.js.map +1 -0
  166. package/dist/collection/kompendium/test/fixtures/filtering/test-helper-type.js +2 -0
  167. package/dist/collection/kompendium/test/fixtures/filtering/test-helper-type.js.map +1 -0
  168. package/dist/collection/kompendium/test/fixtures/filtering/valid-types.js +29 -0
  169. package/dist/collection/kompendium/test/fixtures/filtering/valid-types.js.map +1 -0
  170. package/dist/collection/kompendium/typedoc.js +481 -0
  171. package/dist/collection/kompendium/typedoc.js.map +1 -0
  172. package/dist/collection/kompendium/watch.js +9 -0
  173. package/dist/collection/kompendium/watch.js.map +1 -0
  174. package/dist/collection/types.js +2 -0
  175. package/dist/collection/types.js.map +1 -0
  176. package/dist/config.ts +8 -0
  177. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +10 -0
  178. package/dist/esm/_commonjsHelpers-BFTU3MAI.js.map +1 -0
  179. package/dist/esm/anchor-scroll-BAGXN2n6.js +65 -0
  180. package/dist/esm/anchor-scroll-BAGXN2n6.js.map +1 -0
  181. package/dist/esm/index-9UrzenzW.js +1857 -0
  182. package/dist/esm/index-9UrzenzW.js.map +1 -0
  183. package/dist/esm/index.js +2 -0
  184. package/dist/esm/index.js.map +1 -0
  185. package/dist/esm/kompendium-app.kompendium-darkmode-switch.kompendium-navigation.kompendium-search.stencil-route.stencil-route-switch.stencil-router.entry.js.map +1 -0
  186. package/dist/esm/kompendium-app_7.entry.js +2916 -0
  187. package/dist/esm/kompendium-code.entry.js +2722 -0
  188. package/dist/esm/kompendium-code.entry.js.map +1 -0
  189. package/dist/esm/kompendium-component.entry.js +205 -0
  190. package/dist/esm/kompendium-component.entry.js.map +1 -0
  191. package/dist/esm/kompendium-debug.entry.js +45 -0
  192. package/dist/esm/kompendium-debug.entry.js.map +1 -0
  193. package/dist/esm/kompendium-example-code.entry.js +18 -0
  194. package/dist/esm/kompendium-example-code.entry.js.map +1 -0
  195. package/dist/esm/kompendium-example-markdown.entry.js +163 -0
  196. package/dist/esm/kompendium-example-markdown.entry.js.map +1 -0
  197. package/dist/esm/kompendium-guide.entry.js +31 -0
  198. package/dist/esm/kompendium-guide.entry.js.map +1 -0
  199. package/dist/esm/kompendium-markdown.entry.js +48921 -0
  200. package/dist/esm/kompendium-markdown.entry.js.map +1 -0
  201. package/dist/esm/kompendium-playground.entry.js +87 -0
  202. package/dist/esm/kompendium-playground.entry.js.map +1 -0
  203. package/dist/esm/kompendium-proplist.kompendium-taglist.entry.js.map +1 -0
  204. package/dist/esm/kompendium-proplist_2.entry.js +46 -0
  205. package/dist/esm/kompendium-type.entry.js +81 -0
  206. package/dist/esm/kompendium-type.entry.js.map +1 -0
  207. package/dist/esm/kompendium.js +21 -0
  208. package/dist/esm/kompendium.js.map +1 -0
  209. package/dist/esm/loader.js +11 -0
  210. package/dist/esm/loader.js.map +1 -0
  211. package/dist/esm/markdown-types-Ajsawr_9.js +12 -0
  212. package/dist/esm/markdown-types-Ajsawr_9.js.map +1 -0
  213. package/dist/esm/methods-BAjd6f7g.js +94 -0
  214. package/dist/esm/methods-BAjd6f7g.js.map +1 -0
  215. package/dist/esm/types-BIPLEi1G.js +6 -0
  216. package/dist/esm/types-BIPLEi1G.js.map +1 -0
  217. package/dist/filesystem.ts +9 -0
  218. package/dist/generator.ts +302 -0
  219. package/dist/guides.ts +49 -0
  220. package/dist/index.cjs.js +1 -0
  221. package/dist/index.js +1 -0
  222. package/dist/index.ts +1 -0
  223. package/dist/kompendium/index.esm.js +2 -0
  224. package/dist/kompendium/index.esm.js.map +1 -0
  225. package/dist/kompendium/kompendium-app.kompendium-darkmode-switch.kompendium-navigation.kompendium-search.stencil-route.stencil-route-switch.stencil-router.entry.esm.js.map +1 -0
  226. package/dist/kompendium/kompendium-code.entry.esm.js.map +1 -0
  227. package/dist/kompendium/kompendium-component.entry.esm.js.map +1 -0
  228. package/dist/kompendium/kompendium-debug.entry.esm.js.map +1 -0
  229. package/dist/kompendium/kompendium-example-code.entry.esm.js.map +1 -0
  230. package/dist/kompendium/kompendium-example-markdown.entry.esm.js.map +1 -0
  231. package/dist/kompendium/kompendium-guide.entry.esm.js.map +1 -0
  232. package/dist/kompendium/kompendium-markdown.entry.esm.js.map +1 -0
  233. package/dist/kompendium/kompendium-playground.entry.esm.js.map +1 -0
  234. package/dist/kompendium/kompendium-proplist.kompendium-taglist.entry.esm.js.map +1 -0
  235. package/dist/kompendium/kompendium-type.entry.esm.js.map +1 -0
  236. package/dist/kompendium/kompendium.css +47 -0
  237. package/dist/kompendium/kompendium.esm.js +2 -0
  238. package/dist/kompendium/kompendium.esm.js.map +1 -0
  239. package/dist/kompendium/loader.esm.js.map +1 -0
  240. package/dist/kompendium/p-15e4b2c0.entry.js +2 -0
  241. package/dist/kompendium/p-15e4b2c0.entry.js.map +1 -0
  242. package/dist/kompendium/p-1cf0168f.entry.js +2 -0
  243. package/dist/kompendium/p-1cf0168f.entry.js.map +1 -0
  244. package/dist/kompendium/p-29c23c89.entry.js +2 -0
  245. package/dist/kompendium/p-29c23c89.entry.js.map +1 -0
  246. package/dist/kompendium/p-3981d11f.entry.js +2 -0
  247. package/dist/kompendium/p-3981d11f.entry.js.map +1 -0
  248. package/dist/kompendium/p-93f0548d.entry.js +2 -0
  249. package/dist/kompendium/p-93f0548d.entry.js.map +1 -0
  250. package/dist/kompendium/p-97b02575.entry.js +2 -0
  251. package/dist/kompendium/p-97b02575.entry.js.map +1 -0
  252. package/dist/kompendium/p-9UrzenzW.js +3 -0
  253. package/dist/kompendium/p-9UrzenzW.js.map +1 -0
  254. package/dist/kompendium/p-Ajsawr_9.js +2 -0
  255. package/dist/kompendium/p-Ajsawr_9.js.map +1 -0
  256. package/dist/kompendium/p-BAGXN2n6.js +2 -0
  257. package/dist/kompendium/p-BAGXN2n6.js.map +1 -0
  258. package/dist/kompendium/p-BFTU3MAI.js +2 -0
  259. package/dist/kompendium/p-BFTU3MAI.js.map +1 -0
  260. package/dist/kompendium/p-BIPLEi1G.js +2 -0
  261. package/dist/kompendium/p-BIPLEi1G.js.map +1 -0
  262. package/dist/kompendium/p-CnQEA7KO.js +2 -0
  263. package/dist/kompendium/p-CnQEA7KO.js.map +1 -0
  264. package/dist/kompendium/p-b0f95bd6.entry.js +2 -0
  265. package/dist/kompendium/p-b0f95bd6.entry.js.map +1 -0
  266. package/dist/kompendium/p-d9bcc473.entry.js +10 -0
  267. package/dist/kompendium/p-d9bcc473.entry.js.map +1 -0
  268. package/dist/kompendium/p-e36f3f1e.entry.js +2 -0
  269. package/dist/kompendium/p-e36f3f1e.entry.js.map +1 -0
  270. package/dist/kompendium/p-e52a2f57.entry.js +2 -0
  271. package/dist/kompendium/p-e52a2f57.entry.js.map +1 -0
  272. package/dist/kompendium/p-ec5861de.entry.js +2 -0
  273. package/dist/kompendium/p-ec5861de.entry.js.map +1 -0
  274. package/dist/markdown-admonitions.ts +112 -0
  275. package/dist/markdown-code.ts +51 -0
  276. package/dist/markdown-frontmatter.ts +19 -0
  277. package/dist/markdown-nodes.ts +23 -0
  278. package/dist/markdown-typelinks.ts +166 -0
  279. package/dist/markdown.ts +49 -0
  280. package/dist/menu.ts +189 -0
  281. package/dist/schema.ts +233 -0
  282. package/dist/search.ts +197 -0
  283. package/dist/source.ts +129 -0
  284. package/dist/typedoc.ts +665 -0
  285. package/dist/types/components/anchor-scroll.d.ts +36 -0
  286. package/dist/types/components/app/app.d.ts +22 -0
  287. package/dist/types/components/code/code.d.ts +26 -0
  288. package/dist/types/components/code/examples/code.d.ts +3 -0
  289. package/dist/types/components/component/component.d.ts +32 -0
  290. package/dist/types/components/component/templates/events.d.ts +5 -0
  291. package/dist/types/components/component/templates/examples.d.ts +9 -0
  292. package/dist/types/components/component/templates/methods.d.ts +5 -0
  293. package/dist/types/components/component/templates/props.d.ts +5 -0
  294. package/dist/types/components/component/templates/slots.d.ts +5 -0
  295. package/dist/types/components/component/templates/style.d.ts +5 -0
  296. package/dist/types/components/darkmode-switch/darkmode-switch.d.ts +18 -0
  297. package/dist/types/components/darkmode-switch/types.d.ts +2 -0
  298. package/dist/types/components/debug/debug.d.ts +24 -0
  299. package/dist/types/components/guide/guide.d.ts +14 -0
  300. package/dist/types/components/markdown/examples/markdown-example.d.ts +1 -0
  301. package/dist/types/components/markdown/examples/markdown.d.ts +7 -0
  302. package/dist/types/components/markdown/markdown-types.d.ts +2 -0
  303. package/dist/types/components/markdown/markdown.d.ts +20 -0
  304. package/dist/types/components/navigation/navigation.d.ts +35 -0
  305. package/dist/types/components/playground/playground.d.ts +32 -0
  306. package/dist/types/components/playground/playground.types.d.ts +1 -0
  307. package/dist/types/components/proplist/proplist.d.ts +12 -0
  308. package/dist/types/components/search/search.d.ts +15 -0
  309. package/dist/types/components/taglist/taglist.d.ts +16 -0
  310. package/dist/types/components/type/templates/alias.d.ts +4 -0
  311. package/dist/types/components/type/templates/enum.d.ts +4 -0
  312. package/dist/types/components/type/templates/interface.d.ts +4 -0
  313. package/dist/types/components/type/type.d.ts +15 -0
  314. package/dist/types/components.d.ts +517 -0
  315. package/dist/types/index.d.ts +5 -0
  316. package/dist/types/kompendium/config.d.ts +2 -0
  317. package/dist/types/kompendium/filesystem.d.ts +1 -0
  318. package/dist/types/kompendium/generator.d.ts +4 -0
  319. package/dist/types/kompendium/guides.d.ts +9 -0
  320. package/dist/types/kompendium/index.d.ts +1 -0
  321. package/dist/types/kompendium/markdown-admonitions.d.ts +3 -0
  322. package/dist/types/kompendium/markdown-code.d.ts +2 -0
  323. package/dist/types/kompendium/markdown-frontmatter.d.ts +6 -0
  324. package/dist/types/kompendium/markdown-nodes.d.ts +12 -0
  325. package/dist/types/kompendium/markdown-typelinks.d.ts +21 -0
  326. package/dist/types/kompendium/markdown.d.ts +8 -0
  327. package/dist/types/kompendium/menu.d.ts +12 -0
  328. package/dist/types/kompendium/schema.d.ts +9 -0
  329. package/dist/types/kompendium/search.d.ts +3 -0
  330. package/dist/types/kompendium/source.d.ts +10 -0
  331. package/dist/types/kompendium/test/fixtures/basic.d.ts +65 -0
  332. package/dist/types/kompendium/test/fixtures/filtering/example-type.d.ts +8 -0
  333. package/dist/types/kompendium/test/fixtures/filtering/node-modules-type.d.ts +8 -0
  334. package/dist/types/kompendium/test/fixtures/filtering/private-types.d.ts +23 -0
  335. package/dist/types/kompendium/test/fixtures/filtering/stencil-component-types.d.ts +19 -0
  336. package/dist/types/kompendium/test/fixtures/filtering/test-helper-type.d.ts +8 -0
  337. package/dist/types/kompendium/test/fixtures/filtering/valid-types.d.ts +42 -0
  338. package/dist/types/kompendium/typedoc.d.ts +2 -0
  339. package/dist/types/kompendium/watch.d.ts +1 -0
  340. package/dist/types/stencil-public-runtime.d.ts +1746 -0
  341. package/dist/types/types.d.ts +119 -0
  342. package/dist/watch.ts +14 -0
  343. package/loader/cdn.js +1 -0
  344. package/loader/index.cjs.js +1 -0
  345. package/loader/index.d.ts +24 -0
  346. package/loader/index.es2017.js +1 -0
  347. package/loader/index.js +2 -0
  348. package/package.json +116 -0
@@ -0,0 +1,54 @@
1
+ import { h } from "@stencil/core";
2
+ export function MethodList({ methods, id, }) {
3
+ if (!methods.length) {
4
+ return;
5
+ }
6
+ return [
7
+ h("h3", { class: "docs-layout-section-heading", id: id }, "Methods"),
8
+ ...methods.map(renderMethod),
9
+ ];
10
+ }
11
+ function renderMethod(method) {
12
+ const items = [
13
+ {
14
+ key: 'Signature',
15
+ value: method.signature,
16
+ },
17
+ ].filter((item) => item.value !== undefined);
18
+ return (h("div", { class: "methods-layout" }, h("h4", { class: "methods-title" }, method.name), h("div", { class: "methods-content" }, h("div", null, h("kompendium-markdown", { text: method.docs })), h("div", null, h("kompendium-taglist", { tags: method.docsTags }), h("kompendium-proplist", { items: items }), h(ParamList, { params: method.parameters }))), h("div", { class: "methods-returns" }, h(Returns, { value: method.returns }))));
19
+ }
20
+ function ParamList({ params }) {
21
+ if (!params.length) {
22
+ return;
23
+ }
24
+ return [h("h5", null, "Parameters"), ...params.map(renderParam)];
25
+ }
26
+ function renderParam(param) {
27
+ const items = [
28
+ {
29
+ key: 'Type',
30
+ value: param.type,
31
+ },
32
+ {
33
+ key: 'Optional',
34
+ value: String(param.optional),
35
+ },
36
+ {
37
+ key: 'Default',
38
+ value: param.default,
39
+ },
40
+ ].filter((item) => item.value !== undefined);
41
+ return (h("div", null, h("h6", null, param.name), h("kompendium-markdown", { text: param.docs }), h("kompendium-proplist", { items: items })));
42
+ }
43
+ function Returns({ value }) {
44
+ if (!value) {
45
+ return;
46
+ }
47
+ const type = '`' + value.type + '`';
48
+ return [
49
+ h("h5", null, "Returns"),
50
+ h("kompendium-markdown", { text: value.docs }),
51
+ h("kompendium-markdown", { text: type }),
52
+ ];
53
+ }
54
+ //# sourceMappingURL=methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../src/components/component/templates/methods.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIlC,MAAM,UAAU,UAAU,CAAC,EACvB,OAAO,EACP,EAAE,GAIL;IACG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO;IACX,CAAC;IAED,OAAO;QACH,UAAI,KAAK,EAAC,6BAA6B,EAAC,EAAE,EAAE,EAAE,cAEzC;QACL,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;KAC/B,CAAC;AACN,CAAC;AAED,SAAS,YAAY,CAAC,MAAsB;IACxC,MAAM,KAAK,GAAmB;QAC1B;YACI,GAAG,EAAE,WAAW;YAChB,KAAK,EAAE,MAAM,CAAC,SAAS;SAC1B;KACJ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;IAE7C,OAAO,CACH,WAAK,KAAK,EAAC,gBAAgB;QACvB,UAAI,KAAK,EAAC,eAAe,IAAE,MAAM,CAAC,IAAI,CAAM;QAC5C,WAAK,KAAK,EAAC,iBAAiB;YACxB;gBACI,2BAAqB,IAAI,EAAE,MAAM,CAAC,IAAI,GAAI,CACxC;YACN;gBACI,0BAAoB,IAAI,E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ChB,2BAAqB,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI;QACzC,2BAAqB,IAAI,EAAE,IAAI,GAAI;KACtC,CAAC;AACN,CAAC","sourcesContent":["import {\n JsonDocsMethod,\n JsonDocMethodParameter,\n JsonDocsMethodReturn,\n} from '@stencil/core/internal';\nimport { h } from '@stencil/core';\nimport { ProplistItem } from '../../proplist/proplist';\nimport { ParameterDescription } from '../../../types';\n\nexport function MethodList({\n methods,\n id,\n}: {\n id?: string;\n methods: Array<Partial<JsonDocsMethod>>;\n}): HTMLElement[] {\n if (!methods.length) {\n return;\n }\n\n return [\n <h3 class=\"docs-layout-section-heading\" id={id}>\n Methods\n </h3>,\n ...methods.map(renderMethod),\n ];\n}\n\nfunction renderMethod(method: JsonDocsMethod) {\n const items: ProplistItem[] = [\n {\n key: 'Signature',\n value: method.signature,\n },\n ].filter((item) => item.value !== undefined);\n\n return (\n <div class=\"methods-layout\">\n <h4 class=\"methods-title\">{method.name}</h4>\n <div class=\"methods-content\">\n <div>\n <kompendium-markdown text={method.docs} />\n </div>\n <div>\n <kompendium-taglist tags={method.docsTags} />\n <kompendium-proplist items={items} />\n <ParamList params={method.parameters} />\n </div>\n </div>\n <div class=\"methods-returns\">\n <Returns value={method.returns} />\n </div>\n </div>\n );\n}\n\nfunction ParamList({ params }: { params: JsonDocMethodParameter[] }) {\n if (!params.length) {\n return;\n }\n\n return [<h5>Parameters</h5>, ...params.map(renderParam)];\n}\n\nfunction renderParam(param: ParameterDescription) {\n const items: ProplistItem[] = [\n {\n key: 'Type',\n value: param.type,\n },\n {\n key: 'Optional',\n value: String(param.optional),\n },\n {\n key: 'Default',\n value: param.default,\n },\n ].filter((item) => item.value !== undefined);\n\n return (\n <div>\n <h6>{param.name}</h6>\n <kompendium-markdown text={param.docs} />\n <kompendium-proplist items={items} />\n </div>\n );\n}\n\nfunction Returns({ value }: { value: JsonDocsMethodReturn }) {\n if (!value) {\n return;\n }\n\n const type = '`' + value.type + '`';\n\n return [\n <h5>Returns</h5>,\n <kompendium-markdown text={value.docs} />,\n <kompendium-markdown text={type} />,\n ];\n}\n"]}
@@ -0,0 +1,36 @@
1
+ import { h } from "@stencil/core";
2
+ export function PropertyList({ props, id, }) {
3
+ if (!props.length) {
4
+ return;
5
+ }
6
+ return [
7
+ h("h3", { class: "docs-layout-section-heading", id: id }, "Properties"),
8
+ ...props.map(renderProperty),
9
+ ];
10
+ }
11
+ function renderProperty(property) {
12
+ const items = [
13
+ {
14
+ key: 'Type',
15
+ value: property.type,
16
+ },
17
+ {
18
+ key: 'Attribute name',
19
+ value: property.attr,
20
+ },
21
+ {
22
+ key: 'Default value',
23
+ value: property.default,
24
+ },
25
+ {
26
+ key: 'Optional',
27
+ value: String(property.optional),
28
+ },
29
+ {
30
+ key: 'Required',
31
+ value: String(property.required),
32
+ },
33
+ ].filter((item) => item.value !== undefined && item.value !== 'undefined');
34
+ return (h("div", { class: "props-events-layout" }, h("h4", null, property.name), h("kompendium-taglist", { tags: property.docsTags }), h("div", { class: "markdown-props" }, h("kompendium-markdown", { text: property.docs }), h("kompendium-proplist", { items: items }))));
35
+ }
36
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../src/components/component/templates/props.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,MAAM,UAAU,YAAY,CAAC,EACzB,KAAK,EACL,EAAE,GAIL;IACG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAChB,OAAO;IACX,CAAC;IAED,OAAO;QACH,UAAI,KAAK,EAAC,6BAA6B,EAAC,EAAE,EAAE,EAAE,iBAEzC;QACL,GAAG,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC;KAC/B,CAAC;AACN,CAAC;AAED,SAAS,cAAc,CAAC,QAAsB;IAC1C,MAAM,KAAK,GAAmB;QAC1B;YACI,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,QAAQ,CAAC,IAAI;SACvB;QACD;YACI,GAAG,EAAE,gBAAgB;YACrB,KAAK,EAAE,QAAQ,CAAC,IAAI;SACvB;QACD;YACI,GAAG,EAAE,eAAe;YACpB,KAAK,EAAE,QAAQ,CAAC,OAAO;SAC1B;QACD;YACI,GAAG,EAAE,UAAU;YACf,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;SACnC;QACD;YACI,GAAG,EAAE,UAAU;YACf,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;SACnC;KACJ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC;IAE3E,OAAO,CACH,WAAK,KAAK,EAAC,qBAAqB;QAC5B,cAAK,QAAQ,CAAC,IAAI,CAAM;QACxB,0BAAoB,IAAI,EAAE,QAAQ,CAAC,QAAQ,GAAI;QAC/C,WAAK,KAAK,EAAC,gBAAgB;YACvB,2BAAqB,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAI;YAC5C,2BAAqB,KAAK,EAAE,KAAK,GAAI,CACnC,CACJ,CACT,CAAC;AACN,CAAC","sourcesContent":["import { JsonDocsProp } from '@stencil/core/internal';\nimport { h } from '@stencil/core';\nimport { ProplistItem } from '../../proplist/proplist';\n\nexport function PropertyList({\n props,\n id,\n}: {\n id?: string;\n props: Array<Partial<JsonDocsProp>>;\n}): HTMLElement[] {\n if (!props.length) {\n return;\n }\n\n return [\n <h3 class=\"docs-layout-section-heading\" id={id}>\n Properties\n </h3>,\n ...props.map(renderProperty),\n ];\n}\n\nfunction renderProperty(property: JsonDocsProp) {\n const items: ProplistItem[] = [\n {\n key: 'Type',\n value: property.type,\n },\n {\n key: 'Attribute name',\n value: property.attr,\n },\n {\n key: 'Default value',\n value: property.default,\n },\n {\n key: 'Optional',\n value: String(property.optional),\n },\n {\n key: 'Required',\n value: String(property.required),\n },\n ].filter((item) => item.value !== undefined && item.value !== 'undefined');\n\n return (\n <div class=\"props-events-layout\">\n <h4>{property.name}</h4>\n <kompendium-taglist tags={property.docsTags} />\n <div class=\"markdown-props\">\n <kompendium-markdown text={property.docs} />\n <kompendium-proplist items={items} />\n </div>\n </div>\n );\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { h } from "@stencil/core";
2
+ export function SlotList({ slots, id, }) {
3
+ if (!slots.length) {
4
+ return;
5
+ }
6
+ return [
7
+ h("h3", { class: "docs-layout-section-heading", id: id }, "Slots"),
8
+ ...slots.map(renderSlot),
9
+ ];
10
+ }
11
+ function renderSlot(slot) {
12
+ return (h("div", null, h("h4", null, slot.name), h("kompendium-markdown", { text: slot.docs })));
13
+ }
14
+ //# sourceMappingURL=slots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slots.js","sourceRoot":"","sources":["../../../../src/components/component/templates/slots.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,UAAU,QAAQ,CAAC,EACrB,KAAK,EACL,EAAE,GAIL;IACG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAChB,OAAO;IACX,CAAC;IAED,OAAO;QACH,UAAI,KAAK,EAAC,6BAA6B,EAAC,EAAE,EAAE,EAAE,YAEzC;QACL,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC;KAC3B,CAAC;AACN,CAAC;AAED,SAAS,UAAU,CAAC,IAAkB;IAClC,OAAO,CACH;QACI,cAAK,IAAI,CAAC,IAAI,CAAM;QACpB,2BAAqB,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CACtC,CACT,CAAC;AACN,CAAC","sourcesContent":["import { JsonDocsSlot } from '@stencil/core/internal';\nimport { h } from '@stencil/core';\n\nexport function SlotList({\n slots,\n id,\n}: {\n id: string;\n slots: JsonDocsSlot[];\n}): HTMLElement[] {\n if (!slots.length) {\n return;\n }\n\n return [\n <h3 class=\"docs-layout-section-heading\" id={id}>\n Slots\n </h3>,\n ...slots.map(renderSlot),\n ];\n}\n\nfunction renderSlot(slot: JsonDocsSlot) {\n return (\n <div>\n <h4>{slot.name}</h4>\n <kompendium-markdown text={slot.docs} />\n </div>\n );\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { h } from "@stencil/core";
2
+ export function StyleList({ styles, id, }) {
3
+ if (!styles.length) {
4
+ return;
5
+ }
6
+ return [
7
+ h("h3", { class: "docs-layout-section-heading", id: id }, "Styles"),
8
+ ...styles.map(renderStyle),
9
+ ];
10
+ }
11
+ function renderStyle(style) {
12
+ return (h("div", { class: "styles-layout" }, h("div", { class: "styles-title" }, h("code", null, style.name)), h("div", { class: "styles-content" }, h("kompendium-markdown", { text: style.docs }))));
13
+ }
14
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/component/templates/style.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,UAAU,SAAS,CAAC,EACtB,MAAM,EACN,EAAE,GAIL;IACG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO;IACX,CAAC;IAED,OAAO;QACH,UAAI,KAAK,EAAC,6BAA6B,EAAC,EAAE,EAAE,EAAE,aAEzC;QACL,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;KAC7B,CAAC;AACN,CAAC;AAED,SAAS,WAAW,CAAC,KAAoB;IACrC,OAAO,CACH,WAAK,KAAK,EAAC,eAAe;QACtB,WAAK,KAAK,EAAC,cAAc;YACrB,gBAAO,KAAK,CAAC,IAAI,CAAQ,CACvB;QACN,WAAK,KAAK,EAAC,gBAAgB;YACvB,2BAAqB,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,CACvC,CACJ,CACT,CAAC;AACN,CAAC","sourcesContent":["import { JsonDocsStyle } from '@stencil/core/internal';\nimport { h } from '@stencil/core';\n\nexport function StyleList({\n styles,\n id,\n}: {\n id: string;\n styles: JsonDocsStyle[];\n}): HTMLElement[] {\n if (!styles.length) {\n return;\n }\n\n return [\n <h3 class=\"docs-layout-section-heading\" id={id}>\n Styles\n </h3>,\n ...styles.map(renderStyle),\n ];\n}\n\nfunction renderStyle(style: JsonDocsStyle) {\n return (\n <div class=\"styles-layout\">\n <div class=\"styles-title\">\n <code>{style.name}</code>\n </div>\n <div class=\"styles-content\">\n <kompendium-markdown text={style.docs} />\n </div>\n </div>\n );\n}\n"]}
@@ -0,0 +1,141 @@
1
+ :host {
2
+ --toggle-size: 1.25rem;
3
+ }
4
+ :host * {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ .mode-toggle {
9
+ margin: 0.75rem;
10
+ position: relative;
11
+ width: var(--toggle-size);
12
+ height: var(--toggle-size);
13
+ transition: opacity 0.3s ease;
14
+ opacity: 0.7;
15
+ }
16
+ .mode-toggle:hover {
17
+ opacity: 1;
18
+ }
19
+
20
+ .mode-visualization {
21
+ pointer-events: none;
22
+ position: absolute;
23
+ width: var(--toggle-size);
24
+ height: var(--toggle-size);
25
+ }
26
+
27
+ .circle {
28
+ transition: background-color 0.6s ease;
29
+ border-radius: 50%;
30
+ width: var(--toggle-size);
31
+ height: var(--toggle-size);
32
+ overflow: hidden;
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ transform: translate3d(0, 0, 0);
37
+ }
38
+ .circle:after {
39
+ transition: transform 0.7s ease, background-color 0.4s ease;
40
+ content: "";
41
+ display: block;
42
+ border-radius: 50%;
43
+ width: calc(var(--toggle-size) - 0.25rem);
44
+ height: calc(var(--toggle-size) - 0.25rem);
45
+ }
46
+
47
+ .ray {
48
+ transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.37, -0.03, 0.4, 1.18);
49
+ position: absolute;
50
+ top: 0;
51
+ left: 0;
52
+ width: var(--toggle-size);
53
+ height: var(--toggle-size);
54
+ }
55
+ .ray:before, .ray:after {
56
+ content: "";
57
+ display: block;
58
+ height: 0.375rem;
59
+ width: 0.125rem;
60
+ border-radius: var(--toggle-size);
61
+ background-color: rgba(var(--kompendium-color-orange-light), 1);
62
+ position: absolute;
63
+ left: 0;
64
+ right: 0;
65
+ margin: auto;
66
+ }
67
+ .ray:before {
68
+ top: -0.5rem;
69
+ }
70
+ .ray:after {
71
+ bottom: -0.5rem;
72
+ }
73
+ .ray.three:before, .ray.three:after, .ray.four:before, .ray.four:after {
74
+ height: 0.25rem;
75
+ }
76
+
77
+ input[type=checkbox] {
78
+ -webkit-appearance: none;
79
+ position: absolute;
80
+ width: 100%;
81
+ height: 100%;
82
+ margin: 0;
83
+ cursor: pointer;
84
+ border-radius: 0.125rem;
85
+ }
86
+ input[type=checkbox]:focus {
87
+ outline: none;
88
+ }
89
+ input[type=checkbox]:focus-visible {
90
+ outline: none;
91
+ box-shadow: var(--kompendium-shadow-depth-8-focused);
92
+ }
93
+ input[type=checkbox]:not(:checked) + .mode-visualization .circle {
94
+ background-color: rgba(var(--kompendium-color-orange-default), 1);
95
+ box-shadow: 0 0 0.5rem 0.125rem rgba(var(--kompendium-color-orange-light), 0.8), 0 0 0.25rem 0.1875rem rgb(var(--kompendium-color-white));
96
+ }
97
+ input[type=checkbox]:not(:checked) + .mode-visualization .circle:after {
98
+ background-color: rgba(var(--kompendium-color-orange-default), 1);
99
+ transform: translate3d(1rem, -1rem, 0);
100
+ }
101
+ input[type=checkbox]:not(:checked) + .mode-visualization .ray {
102
+ opacity: 0.6;
103
+ }
104
+ input[type=checkbox]:not(:checked) + .mode-visualization .ray.three, input[type=checkbox]:not(:checked) + .mode-visualization .ray.four {
105
+ opacity: 0.4;
106
+ }
107
+ input[type=checkbox]:not(:checked) + .mode-visualization .ray.one {
108
+ transform: rotate(0deg) scale(1);
109
+ }
110
+ input[type=checkbox]:not(:checked) + .mode-visualization .ray.two {
111
+ transform: rotate(90deg) scale(1);
112
+ }
113
+ input[type=checkbox]:not(:checked) + .mode-visualization .ray.three {
114
+ transform: rotate(45deg) scale(1);
115
+ }
116
+ input[type=checkbox]:not(:checked) + .mode-visualization .ray.four {
117
+ transform: rotate(-45deg) scale(1);
118
+ }
119
+ input[type=checkbox]:checked + .mode-visualization .circle {
120
+ background-color: rgba(var(--kompendium-contrast-1700), 0.7);
121
+ box-shadow: 0 0 0.5rem 0.125rem rgba(var(--kompendium-color-white), 0.4), 0 0 0.25rem 0.125rem rgb(var(--kompendium-color-black));
122
+ }
123
+ input[type=checkbox]:checked + .mode-visualization .circle:after {
124
+ transform: translate3d(0.25rem, -0.25rem, 0);
125
+ background-color: rgb(var(--kompendium-contrast-400));
126
+ }
127
+ input[type=checkbox]:checked + .mode-visualization .ray {
128
+ opacity: 0;
129
+ }
130
+ input[type=checkbox]:checked + .mode-visualization .ray.one {
131
+ transform: rotate(60deg) scale(0.5);
132
+ }
133
+ input[type=checkbox]:checked + .mode-visualization .ray.two {
134
+ transform: rotate(150deg) scale(0.5);
135
+ }
136
+ input[type=checkbox]:checked + .mode-visualization .ray.three {
137
+ transform: rotate(105deg) scale(0.5);
138
+ }
139
+ input[type=checkbox]:checked + .mode-visualization .ray.four {
140
+ transform: rotate(15deg) scale(0.5);
141
+ }
@@ -0,0 +1,90 @@
1
+ import { h } from "@stencil/core";
2
+ import { THEME_EVENT_NAME } from "./types";
3
+ const DEFAULT = 'system-default';
4
+ const LIGHT = 'force-light';
5
+ const DARK = 'force-dark';
6
+ const CHECKBOX_LIGHT = false;
7
+ const CHECKBOX_DARK = true;
8
+ const LOCALSTORAGE_KEY = 'kompendium-theme';
9
+ /**
10
+ * @private
11
+ */
12
+ export class DarkmodeSwitch {
13
+ constructor() {
14
+ this.theme = 'system-default';
15
+ this.getSelectRef = (element) => {
16
+ this.checkbox = element;
17
+ };
18
+ this.handleSystemThemeChange = (e) => {
19
+ this.systemSettingIsDark = !!e.matches;
20
+ if (this.theme === DEFAULT) {
21
+ this.checkbox.checked = !this.checkbox.checked;
22
+ }
23
+ };
24
+ this.handleThemeChange = () => {
25
+ const checkboxValue = !!this.checkbox.checked;
26
+ let newTheme = DEFAULT;
27
+ if (this.systemSettingIsDark) {
28
+ if (checkboxValue === CHECKBOX_LIGHT) {
29
+ newTheme = LIGHT;
30
+ }
31
+ }
32
+ else {
33
+ if (checkboxValue === CHECKBOX_DARK) {
34
+ newTheme = DARK;
35
+ }
36
+ }
37
+ this.setTheme(newTheme);
38
+ document.dispatchEvent(new CustomEvent(THEME_EVENT_NAME, { detail: newTheme }));
39
+ };
40
+ this.setTheme = (value) => {
41
+ this.theme = value;
42
+ document.querySelector('html').dataset.theme = value;
43
+ localStorage.setItem(LOCALSTORAGE_KEY, value);
44
+ };
45
+ const colorSchemeMediaQueryFallback = {
46
+ addEventListener: () => { },
47
+ matches: false,
48
+ };
49
+ this.colorSchemeMediaQuery =
50
+ (window.matchMedia &&
51
+ window.matchMedia('(prefers-color-scheme: dark)')) ||
52
+ colorSchemeMediaQueryFallback;
53
+ }
54
+ connectedCallback() {
55
+ this.colorSchemeMediaQuery.addEventListener('change', this.handleSystemThemeChange);
56
+ }
57
+ disconnectedCallback() {
58
+ this.colorSchemeMediaQuery.removeEventListener('change', this.handleSystemThemeChange);
59
+ }
60
+ componentWillLoad() {
61
+ this.systemSettingIsDark = this.colorSchemeMediaQuery.matches;
62
+ this.setTheme((localStorage.getItem(LOCALSTORAGE_KEY) || DEFAULT));
63
+ }
64
+ render() {
65
+ const props = {
66
+ checked: this.theme === DARK ||
67
+ (this.theme === DEFAULT && this.systemSettingIsDark),
68
+ };
69
+ return (h("div", { key: '72bb10f37127840f1e310943a35a6f653bd3859d', class: "mode-toggle" }, h("input", { key: '5869df8eadeb50a5e6c7fe41e0ec6f7dfe8be233', type: "checkbox", onChange: this.handleThemeChange, ref: this.getSelectRef, ...props }), h("div", { key: '4ca3d61f92b73c9239820eadf411fbb9f4eaab7f', class: "mode-visualization" }, h("div", { key: 'e4d99bd1a90298a2a6c634cd2d3cb859c3bbd1bc', class: "circle" }), h("div", { key: '4a7e9b0d7d5bfc4c85db8cd50e6200899d81a6fb', class: "ray one" }), h("div", { key: 'c489f612cabd963e3ebae26996dd7a71f242e0de', class: "ray two" }), h("div", { key: '83288239cf2c67c0ad314728c6c65ffee67f9c1e', class: "ray three" }), h("div", { key: '013b3c4c16e8f49d396a7a3e903108304ad17dfe', class: "ray four" }))));
70
+ }
71
+ static get is() { return "kompendium-darkmode-switch"; }
72
+ static get encapsulation() { return "shadow"; }
73
+ static get originalStyleUrls() {
74
+ return {
75
+ "$": ["darkmode-switch.scss"]
76
+ };
77
+ }
78
+ static get styleUrls() {
79
+ return {
80
+ "$": ["darkmode-switch.css"]
81
+ };
82
+ }
83
+ static get states() {
84
+ return {
85
+ "theme": {},
86
+ "systemSettingIsDark": {}
87
+ };
88
+ }
89
+ }
90
+ //# sourceMappingURL=darkmode-switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"darkmode-switch.js","sourceRoot":"","sources":["../../../src/components/darkmode-switch/darkmode-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAS,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,OAAO,GAAU,gBAAgB,CAAC;AACxC,MAAM,KAAK,GAAU,aAAa,CAAC;AACnC,MAAM,IAAI,GAAU,YAAY,CAAC;AACjC,MAAM,cAAc,GAAG,KAAK,CAAC;AAC7B,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAE5C;;GAEG;AAMH,MAAM,OAAO,cAAc;IAUvB;QARQ,UAAK,GAAU,gBAAgB,CAAC;QAoEhC,iBAAY,GAAG,CAAC,OAAyB,EAAE,EAAE;YACjD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAC5B,CAAC,CAAC;QAEM,4BAAuB,GAAG,CAAC,CAAsB,EAAE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FAULT: Theme = 'system-default';\nconst LIGHT: Theme = 'force-light';\nconst DARK: Theme = 'force-dark';\nconst CHECKBOX_LIGHT = false;\nconst CHECKBOX_DARK = true;\nconst LOCALSTORAGE_KEY = 'kompendium-theme';\n\n/**\n * @private\n */\n@Component({\n tag: 'kompendium-darkmode-switch',\n styleUrl: 'darkmode-switch.scss',\n shadow: true,\n})\nexport class DarkmodeSwitch {\n @State()\n private theme: Theme = 'system-default';\n\n @State()\n private systemSettingIsDark: boolean;\n\n private checkbox: HTMLInputElement;\n private colorSchemeMediaQuery: MediaQueryList;\n\n constructor() {\n const colorSchemeMediaQueryFallback = {\n addEventListener: () => {},\n matches: false,\n } as unknown as MediaQueryList;\n\n this.colorSchemeMediaQuery =\n (window.matchMedia &&\n window.matchMedia('(prefers-color-scheme: dark)')) ||\n colorSchemeMediaQueryFallback;\n }\n\n public connectedCallback() {\n this.colorSchemeMediaQuery.addEventListener(\n 'change',\n this.handleSystemThemeChange,\n );\n }\n\n public disconnectedCallback() {\n this.colorSchemeMediaQuery.removeEventListener(\n 'change',\n this.handleSystemThemeChange,\n );\n }\n\n public componentWillLoad(): void {\n this.systemSettingIsDark = this.colorSchemeMediaQuery.matches;\n\n this.setTheme(\n (localStorage.getItem(LOCALSTORAGE_KEY) || DEFAULT) as Theme,\n );\n }\n\n public render(): HTMLElement {\n const props = {\n checked:\n this.theme === DARK ||\n (this.theme === DEFAULT && this.systemSettingIsDark),\n };\n\n return (\n <div class=\"mode-toggle\">\n <input\n type=\"checkbox\"\n onChange={this.handleThemeChange}\n ref={this.getSelectRef}\n {...props}\n />\n <div class=\"mode-visualization\">\n <div class=\"circle\"></div>\n <div class=\"ray one\"></div>\n <div class=\"ray two\"></div>\n <div class=\"ray three\"></div>\n <div class=\"ray four\"></div>\n </div>\n </div>\n );\n }\n\n private getSelectRef = (element: HTMLInputElement) => {\n this.checkbox = element;\n };\n\n private handleSystemThemeChange = (e: MediaQueryListEvent) => {\n this.systemSettingIsDark = !!e.matches;\n if (this.theme === DEFAULT) {\n this.checkbox.checked = !this.checkbox.checked;\n }\n };\n\n private handleThemeChange = () => {\n const checkboxValue = !!this.checkbox.checked;\n\n let newTheme: Theme = DEFAULT;\n\n if (this.systemSettingIsDark) {\n if (checkboxValue === CHECKBOX_LIGHT) {\n newTheme = LIGHT;\n }\n } else {\n if (checkboxValue === CHECKBOX_DARK) {\n newTheme = DARK;\n }\n }\n\n this.setTheme(newTheme);\n document.dispatchEvent(\n new CustomEvent<Theme>(THEME_EVENT_NAME, { detail: newTheme }),\n );\n };\n\n private setTheme = (value: Theme) => {\n this.theme = value;\n document.querySelector('html').dataset.theme = value;\n localStorage.setItem(LOCALSTORAGE_KEY, value);\n };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export const THEME_EVENT_NAME = 'kompendiumTheme';
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/darkmode-switch/types.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC","sourcesContent":["export type Theme = 'system-default' | 'force-light' | 'force-dark';\nexport const THEME_EVENT_NAME = 'kompendiumTheme';\n"]}
@@ -0,0 +1,146 @@
1
+ import { h } from "@stencil/core";
2
+ export class KompendiumDebug {
3
+ constructor() {
4
+ /**
5
+ * Factory for creating props for example components
6
+ * @returns {Record<string, unknown>} props
7
+ */
8
+ this.examplePropsFactory = () => ({});
9
+ }
10
+ render() {
11
+ const tag = this.match.params.name;
12
+ const component = findComponent(tag, this.docs);
13
+ return (h("article", { key: '29c045c23cd107d1d0006467db9abad681bb7e2e', class: "component" }, h("section", { key: 'ae3e9fe451f3663a720d2113d140f1efb42a5da8', class: "docs debug" }, this.renderComponent(component))));
14
+ }
15
+ renderComponent(component) {
16
+ const ExampleComponent = component.tag;
17
+ const ownerComponent = this.docs.components.find(isOwnerOf(component));
18
+ const schema = this.schemas.find((s) => s.$id === ownerComponent.tag);
19
+ const factory = this.examplePropsFactory;
20
+ const props = {
21
+ schema: schema,
22
+ ...factory(ExampleComponent),
23
+ };
24
+ return (h("div", { class: "show-case" }, h("div", { class: "show-case_component" }, h(ExampleComponent, { ...props }))));
25
+ }
26
+ static get is() { return "kompendium-debug"; }
27
+ static get encapsulation() { return "shadow"; }
28
+ static get properties() {
29
+ return {
30
+ "docs": {
31
+ "type": "unknown",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "JsonDocs",
35
+ "resolved": "JsonDocs",
36
+ "references": {
37
+ "JsonDocs": {
38
+ "location": "import",
39
+ "path": "@stencil/core/internal",
40
+ "id": "node_modules::JsonDocs"
41
+ }
42
+ }
43
+ },
44
+ "required": false,
45
+ "optional": false,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": "The generated documentation data"
49
+ },
50
+ "getter": false,
51
+ "setter": false
52
+ },
53
+ "schemas": {
54
+ "type": "unknown",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "Array<Record<string, any>>",
58
+ "resolved": "Record<string, any>[]",
59
+ "references": {
60
+ "Array": {
61
+ "location": "global",
62
+ "id": "global::Array"
63
+ },
64
+ "Record": {
65
+ "location": "global",
66
+ "id": "global::Record"
67
+ }
68
+ }
69
+ },
70
+ "required": false,
71
+ "optional": false,
72
+ "docs": {
73
+ "tags": [],
74
+ "text": "Component schemas"
75
+ },
76
+ "getter": false,
77
+ "setter": false
78
+ },
79
+ "match": {
80
+ "type": "unknown",
81
+ "mutable": false,
82
+ "complexType": {
83
+ "original": "MatchResults",
84
+ "resolved": "MatchResults",
85
+ "references": {
86
+ "MatchResults": {
87
+ "location": "import",
88
+ "path": "@limetech/stencil-router",
89
+ "id": "node_modules::MatchResults"
90
+ }
91
+ }
92
+ },
93
+ "required": false,
94
+ "optional": false,
95
+ "docs": {
96
+ "tags": [],
97
+ "text": "Matched route parameters"
98
+ },
99
+ "getter": false,
100
+ "setter": false
101
+ },
102
+ "examplePropsFactory": {
103
+ "type": "unknown",
104
+ "mutable": false,
105
+ "complexType": {
106
+ "original": "PropsFactory",
107
+ "resolved": "(name: string) => Record<string, unknown>",
108
+ "references": {
109
+ "PropsFactory": {
110
+ "location": "import",
111
+ "path": "../playground/playground.types",
112
+ "id": "src/components/playground/playground.types.ts::PropsFactory"
113
+ }
114
+ }
115
+ },
116
+ "required": false,
117
+ "optional": true,
118
+ "docs": {
119
+ "tags": [{
120
+ "name": "returns",
121
+ "text": "props"
122
+ }],
123
+ "text": "Factory for creating props for example components"
124
+ },
125
+ "getter": false,
126
+ "setter": false,
127
+ "defaultValue": "() => ({})"
128
+ }
129
+ };
130
+ }
131
+ }
132
+ function findComponent(tag, docs) {
133
+ return docs.components.find((doc) => doc.tag === tag);
134
+ }
135
+ const isOwnerOf = (example) => (component) => {
136
+ return !!component.docsTags
137
+ .filter(isTag('exampleComponent'))
138
+ .find(hasText(example.tag));
139
+ };
140
+ const isTag = (name) => (tag) => {
141
+ return tag.name === name;
142
+ };
143
+ const hasText = (name) => (tag) => {
144
+ return tag.text === name;
145
+ };
146
+ //# sourceMappingURL=debug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/components/debug/debug.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAanD,MAAM,OAAO,eAAe;IAJ5B;QAuBI;;;WAGG;QAEI,wBAAmB,GAAkB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;KAiC1D;IA/BU,MAAM;QACT,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;QACnC,MAAM,SAAS,GAAG,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhD,OAAO,CACH,gEAAS,KAAK,EAAC,WAAW;YACtB,gEAAS,KAAK,EAAC,YAAY,IACtB,IAAI,CAAC,eAAe,CAAC,SAAS,CAA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MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,GAAgB,EAAE,EAAE;IACjD,OAAO,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,GAAgB,EAAE,EAAE;IACnD,OAAO,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC;AAC7B,CAAC,CAAC","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\nimport {\n JsonDocs,\n JsonDocsComponent,\n JsonDocsTag,\n} from '@stencil/core/internal';\nimport { MatchResults } from '@limetech/stencil-router';\nimport { PropsFactory } from '../playground/playground.types';\n\n@Component({\n tag: 'kompendium-debug',\n shadow: true,\n})\nexport class KompendiumDebug {\n /**\n * The generated documentation data\n */\n @Prop()\n public docs: JsonDocs;\n\n /**\n * Component schemas\n */\n @Prop()\n public schemas: Array<Record<string, any>>;\n\n /**\n * Matched route parameters\n */\n @Prop()\n public match: MatchResults;\n\n /**\n * Factory for creating props for example components\n * @returns {Record<string, unknown>} props\n */\n @Prop()\n public examplePropsFactory?: PropsFactory = () => ({});\n\n public render(): HTMLElement {\n const tag = this.match.params.name;\n const component = findComponent(tag, this.docs);\n\n return (\n <article class=\"component\">\n <section class=\"docs debug\">\n {this.renderComponent(component)}\n </section>\n </article>\n );\n }\n\n private renderComponent(component: JsonDocsComponent) {\n const ExampleComponent = component.tag;\n const ownerComponent = this.docs.components.find(isOwnerOf(component));\n const schema = this.schemas.find((s) => s.$id === ownerComponent.tag);\n const factory = this.examplePropsFactory;\n const props = {\n schema: schema,\n ...factory(ExampleComponent),\n };\n\n return (\n <div class=\"show-case\">\n <div class=\"show-case_component\">\n <ExampleComponent {...props} />\n </div>\n </div>\n );\n }\n}\n\nfunction findComponent(tag: string, docs: JsonDocs) {\n return docs.components.find((doc) => doc.tag === tag);\n}\n\nconst isOwnerOf =\n (example: JsonDocsComponent) => (component: JsonDocsComponent) => {\n return !!component.docsTags\n .filter(isTag('exampleComponent'))\n .find(hasText(example.tag));\n };\n\nconst isTag = (name: string) => (tag: JsonDocsTag) => {\n return tag.name === name;\n};\n\nconst hasText = (name: string) => (tag: JsonDocsTag) => {\n return tag.text === name;\n};\n"]}
@@ -0,0 +1,61 @@
1
+ import { h } from "@stencil/core";
2
+ export class Guide {
3
+ constructor() {
4
+ this.setRoute = this.setRoute.bind(this);
5
+ }
6
+ connectedCallback() {
7
+ window.addEventListener('hashchange', this.setRoute);
8
+ this.setRoute();
9
+ }
10
+ disconnectedCallback() {
11
+ window.removeEventListener('hashchange', this.setRoute);
12
+ }
13
+ setRoute() {
14
+ this.route = location.hash.replace('#', '');
15
+ }
16
+ render() {
17
+ this.findGuide();
18
+ return h("kompendium-markdown", { key: '8df12c70deaae9f377a9e0674b7f274bc62076df', text: this.text });
19
+ }
20
+ findGuide() {
21
+ const guide = this.data.guides.find((g) => g.data.path + '/' === this.route);
22
+ if (guide) {
23
+ this.text = guide.content;
24
+ }
25
+ }
26
+ static get is() { return "kompendium-guide"; }
27
+ static get encapsulation() { return "shadow"; }
28
+ static get properties() {
29
+ return {
30
+ "data": {
31
+ "type": "unknown",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "KompendiumData",
35
+ "resolved": "KompendiumData",
36
+ "references": {
37
+ "KompendiumData": {
38
+ "location": "import",
39
+ "path": "../../types",
40
+ "id": "src/types.ts::KompendiumData"
41
+ }
42
+ }
43
+ },
44
+ "required": false,
45
+ "optional": false,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ },
50
+ "getter": false,
51
+ "setter": false
52
+ }
53
+ };
54
+ }
55
+ static get states() {
56
+ return {
57
+ "route": {}
58
+ };
59
+ }
60
+ }
61
+ //# sourceMappingURL=guide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guide.js","sourceRoot":"","sources":["../../../src/components/guide/guide.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAO1D,MAAM,OAAO,KAAK;IAWd;QACI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC5C;IAES,iBAAiB;QACvB,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAES,oBAAoB;QAC1B,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAEO,QAAQ;QACZ,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,MAAM;QACF,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,OAAO,4EAAqB,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;IACpD,CAAC;IAEO,SAAS;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAC/B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,KAAK,IAAI,CAAC,KAAK,CAC1C,CAAC;QAEF,IAAI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,CAAC;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\nimport { KompendiumData } from '../../types';\n\n@Component({\n tag: 'kompendium-guide',\n shadow: true,\n})\nexport class Guide {\n /**\n */\n @Prop()\n public data: KompendiumData;\n\n @State()\n public route: string;\n\n private text: string;\n\n constructor() {\n this.setRoute = this.setRoute.bind(this);\n }\n\n protected connectedCallback(): void {\n window.addEventListener('hashchange', this.setRoute);\n this.setRoute();\n }\n\n protected disconnectedCallback(): void {\n window.removeEventListener('hashchange', this.setRoute);\n }\n\n private setRoute() {\n this.route = location.hash.replace('#', '');\n }\n\n render(): HTMLElement {\n this.findGuide();\n\n return <kompendium-markdown text={this.text} />;\n }\n\n private findGuide() {\n const guide = this.data.guides.find(\n (g) => g.data.path + '/' === this.route,\n );\n\n if (guide) {\n this.text = guide.content;\n }\n }\n}\n"]}