@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,198 @@
1
+ :root {
2
+ --width-nav-panel: 16rem;
3
+ }
4
+
5
+ :host {
6
+ display: block;
7
+ }
8
+
9
+ .tab-panel {
10
+ height: 100%;
11
+ display: flex;
12
+ flex-direction: column;
13
+ }
14
+
15
+ .tab-bar {
16
+ display: flex;
17
+ padding: 0.1875rem 1rem 0 1rem;
18
+ overflow-y: auto;
19
+ }
20
+ .tab-bar .tab span {
21
+ overflow: hidden;
22
+ white-space: nowrap;
23
+ text-overflow: ellipsis;
24
+ display: inline-block;
25
+ width: 100%;
26
+ padding: 0.125rem 0;
27
+ }
28
+ .tab-bar .tab {
29
+ transition: background-color 0.2s ease;
30
+ cursor: pointer;
31
+ position: relative;
32
+ display: inline-block;
33
+ padding: 0.5rem 1rem;
34
+ text-align: center;
35
+ line-height: 0.9375rem;
36
+ color: rgb(var(--kompendium-contrast-1000));
37
+ font-size: 1rem;
38
+ border-radius: 0.5rem 0.5rem 0 0;
39
+ margin: 0 0.125rem;
40
+ min-width: 3.75rem;
41
+ }
42
+ .tab-bar .tab:before, .tab-bar .tab:after {
43
+ transition: background-color 0.2s ease;
44
+ content: "";
45
+ display: block;
46
+ width: 0.625rem;
47
+ height: 0.625rem;
48
+ position: absolute;
49
+ bottom: 0;
50
+ -webkit-mask-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' clip-rule='evenodd' viewBox='0 0 50 50'><defs/><path d='M0 0c0 27.594 22.406 50 50 50H0V0z'/></svg>");
51
+ mask-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' clip-rule='evenodd' viewBox='0 0 50 50'><defs/><path d='M0 0c0 27.594 22.406 50 50 50H0V0z'/></svg>");
52
+ background: transparent;
53
+ }
54
+ .tab-bar .tab:before {
55
+ left: -0.625rem;
56
+ transform: rotateY(180deg);
57
+ }
58
+ .tab-bar .tab:after {
59
+ right: -0.625rem;
60
+ }
61
+ .tab-bar .tab:hover {
62
+ background-color: rgb(var(--kompendium-contrast-100));
63
+ }
64
+ .tab-bar .tab:hover:before, .tab-bar .tab:hover:after {
65
+ background-color: rgb(var(--kompendium-contrast-100));
66
+ }
67
+ .tab-bar .tab.active {
68
+ z-index: 1;
69
+ color: rgb(var(--kompendium-contrast-1100));
70
+ background: rgb(var(--kompendium-color-code-background));
71
+ }
72
+ .tab-bar .tab.active:before, .tab-bar .tab.active:after {
73
+ background: rgb(var(--kompendium-color-code-background));
74
+ }
75
+
76
+ .tab-items {
77
+ display: flex;
78
+ max-height: 31.25rem;
79
+ }
80
+ .tab-items .tab-item {
81
+ width: 100%;
82
+ display: none;
83
+ }
84
+ .tab-items .tab-item.active {
85
+ display: flex;
86
+ }
87
+
88
+ kompendium-code {
89
+ display: block;
90
+ }
91
+ kompendium-code:before, kompendium-code:after {
92
+ content: "";
93
+ z-index: 1;
94
+ display: block;
95
+ position: absolute;
96
+ left: 0;
97
+ right: 0;
98
+ border-radius: 0.5625rem;
99
+ pointer-events: none;
100
+ }
101
+ kompendium-code:before {
102
+ top: 2.4375rem;
103
+ height: 1.5rem;
104
+ background-image: linear-gradient(rgb(var(--kompendium-color-code-background)), rgba(var(--kompendium-color-code-background), 0));
105
+ }
106
+ kompendium-code:after {
107
+ bottom: 0;
108
+ height: 2rem;
109
+ background-image: linear-gradient(rgba(var(--kompendium-color-code-background), 0), rgb(var(--kompendium-color-code-background)));
110
+ }
111
+
112
+ section.example {
113
+ transition: border-color 0.3s ease 0.05s;
114
+ padding-bottom: 2.5rem;
115
+ margin-bottom: 2.5rem;
116
+ border-bottom: 1px solid rgb(var(--kompendium-contrast-500));
117
+ }
118
+ section.example .result,
119
+ section.example .code {
120
+ box-sizing: border-box;
121
+ display: inline-block;
122
+ vertical-align: top;
123
+ width: 50%;
124
+ }
125
+ section.example .result {
126
+ padding-right: 2.5rem;
127
+ }
128
+ section.example .result kompendium-markdown {
129
+ margin-bottom: 2rem;
130
+ }
131
+ section.example .code {
132
+ position: sticky;
133
+ top: 0;
134
+ }
135
+
136
+ @media (max-width: 1000px) {
137
+ section.example .result,
138
+ section.example .code {
139
+ width: 100%;
140
+ padding-right: 0;
141
+ margin-bottom: 5rem;
142
+ }
143
+ section.example .code {
144
+ position: relative;
145
+ margin-bottom: 2.5rem;
146
+ }
147
+ }
148
+ .show-case_description {
149
+ padding: 0.75rem;
150
+ }
151
+
152
+ .show-case_component {
153
+ font-family: var(--kompendium-example-font-family, inherit);
154
+ font-size: var(--kompendium-example-font-size, inherit);
155
+ line-height: var(--kompendium-example-line-height, inherit);
156
+ color: var(--kompendium-example-color, inherit);
157
+ padding: 1.25rem;
158
+ border-radius: 0.875rem;
159
+ background-color: rgb(var(--kompendium-contrast-100));
160
+ border: 1px solid rgb(var(--kompendium-contrast-300));
161
+ box-shadow: var(--shadow-showcase);
162
+ }
163
+
164
+ .debug {
165
+ display: flex;
166
+ justify-content: flex-end;
167
+ }
168
+ .debug a.debug-link {
169
+ transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
170
+ }
171
+ .debug a.debug-link:hover {
172
+ box-shadow: var(--kompendium-button-shadow-hovered);
173
+ }
174
+ .debug a.debug-link:active {
175
+ box-shadow: var(--kompendium-button-shadow-pressed);
176
+ transform: translate3d(0, 0.08rem, 0);
177
+ }
178
+ .debug a.debug-link:focus {
179
+ outline: none;
180
+ }
181
+ .debug a.debug-link:focus-visible {
182
+ outline: none;
183
+ box-shadow: var(--kompendium-shadow-depth-8-focused);
184
+ }
185
+ .debug a.debug-link {
186
+ transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out, opacity 0.2s ease;
187
+ width: 1.75rem;
188
+ height: 1.75rem;
189
+ font-size: 0;
190
+ margin: -3.25rem -1rem 0 0;
191
+ border-radius: 50%;
192
+ color: rgb(var(--kompendium-contrast-1200));
193
+ opacity: 0.6;
194
+ }
195
+ .debug a.debug-link:hover {
196
+ opacity: 1;
197
+ background-color: rgb(var(--kompendium-contrast-100));
198
+ }
@@ -0,0 +1,174 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { THEME_EVENT_NAME } from "../darkmode-switch/types";
3
+ export class Playground {
4
+ constructor() {
5
+ /**
6
+ * Factory for creating props for example components
7
+ * @returns {Record<string, unknown>} props
8
+ */
9
+ this.propsFactory = () => ({});
10
+ this.activateTab = (id) => () => {
11
+ this.activeTab = id;
12
+ };
13
+ this.themeListener = (event) => {
14
+ this.theme = event.detail;
15
+ };
16
+ this.renderTab = this.renderTab.bind(this);
17
+ this.renderItem = this.renderItem.bind(this);
18
+ }
19
+ connectedCallback() {
20
+ this.theme = document.querySelector('html').dataset.theme;
21
+ document.addEventListener(THEME_EVENT_NAME, this.themeListener);
22
+ }
23
+ disconnectedCallback() {
24
+ document.removeEventListener(THEME_EVENT_NAME, this.themeListener);
25
+ }
26
+ render() {
27
+ if (!this.component) {
28
+ return;
29
+ }
30
+ const sources = this.component.sources || [];
31
+ return (h(Host, { "data-theme": this.theme }, h("section", { class: "example" }, h("div", { class: "result" }, this.renderResult()), h("aside", { class: "code" }, h("nav", { class: "tab-bar" }, this.renderTabs(sources)), h("div", { class: "tab-items" }, this.renderItems(sources))))));
32
+ }
33
+ renderTabs(sources) {
34
+ return sources.map(this.renderTab);
35
+ }
36
+ renderTab(source, index) {
37
+ const classList = {
38
+ tab: true,
39
+ active: this.isTabActive(source, index),
40
+ };
41
+ return (h("a", { class: classList, onClick: this.activateTab(source.filename) }, h("span", null, source.filename)));
42
+ }
43
+ renderItems(sources) {
44
+ return sources.map(this.renderItem);
45
+ }
46
+ renderResult() {
47
+ const ExampleComponent = this.component.tag;
48
+ const text = '##### ' + this.component.docs;
49
+ const factory = this.propsFactory;
50
+ const props = {
51
+ schema: this.schema,
52
+ ...factory(ExampleComponent),
53
+ };
54
+ return (h("div", { class: "show-case" }, h("div", { class: "show-case_description" }, h("kompendium-markdown", { text: text })), h("div", { class: "show-case_component" }, this.renderDebugButton(this.component.tag), h(ExampleComponent, { ...props }))));
55
+ }
56
+ renderItem(source, index) {
57
+ const classList = {
58
+ 'tab-item': true,
59
+ active: this.isTabActive(source, index),
60
+ };
61
+ const code = source.source.replace(/\/\*\*.+?\*\//gms, '');
62
+ const key = [this.component.tag, source.filename].join('/');
63
+ return (h("kompendium-code", { class: classList, language: source.type, key: key }, code));
64
+ }
65
+ renderDebugButton(tag) {
66
+ if (!['localhost', '127.0.0.1'].includes(location.hostname)) {
67
+ return;
68
+ }
69
+ const href = `#/debug/${tag}`;
70
+ return (h("div", { class: "debug" }, h("a", { class: "debug-link", href: href, title: "Debug" }, h("svg", { viewBox: "0 0 400 400", xmlns: "http://www.w3.org/2000/svg", "fill-rule": "evenodd", "clip-rule": "evenodd", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-miterlimit": "1.5" }, h("path", { fill: "none", d: "M0 0h400v400H0z" }), h("path", { d: "M194.97 254.84h77.555", fill: "none", stroke: "currentColor", "stroke-opacity": ".6", "stroke-width": "20" }), h("path", { d: "M127.474 145.16l54.84 54.84M182.315 200l-54.84 54.84", fill: "none", stroke: "currentColor", "stroke-width": "20" })))));
71
+ }
72
+ isTabActive(source, index) {
73
+ let isActive = this.activeTab === source.filename;
74
+ if (!isActive) {
75
+ isActive = index === 0 && !this.activeTab;
76
+ }
77
+ return isActive;
78
+ }
79
+ static get is() { return "kompendium-playground"; }
80
+ static get encapsulation() { return "shadow"; }
81
+ static get originalStyleUrls() {
82
+ return {
83
+ "$": ["playground.scss"]
84
+ };
85
+ }
86
+ static get styleUrls() {
87
+ return {
88
+ "$": ["playground.css"]
89
+ };
90
+ }
91
+ static get properties() {
92
+ return {
93
+ "component": {
94
+ "type": "unknown",
95
+ "mutable": false,
96
+ "complexType": {
97
+ "original": "JsonDocsComponent",
98
+ "resolved": "JsonDocsComponent",
99
+ "references": {
100
+ "JsonDocsComponent": {
101
+ "location": "import",
102
+ "path": "@stencil/core/internal",
103
+ "id": "node_modules::JsonDocsComponent"
104
+ }
105
+ }
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "The component to display"
112
+ },
113
+ "getter": false,
114
+ "setter": false
115
+ },
116
+ "schema": {
117
+ "type": "unknown",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "Record<string, any>",
121
+ "resolved": "{ [x: string]: any; }",
122
+ "references": {
123
+ "Record": {
124
+ "location": "global",
125
+ "id": "global::Record"
126
+ }
127
+ }
128
+ },
129
+ "required": false,
130
+ "optional": false,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": "Schema for the component"
134
+ },
135
+ "getter": false,
136
+ "setter": false
137
+ },
138
+ "propsFactory": {
139
+ "type": "unknown",
140
+ "mutable": false,
141
+ "complexType": {
142
+ "original": "PropsFactory",
143
+ "resolved": "(name: string) => Record<string, unknown>",
144
+ "references": {
145
+ "PropsFactory": {
146
+ "location": "import",
147
+ "path": "./playground.types",
148
+ "id": "src/components/playground/playground.types.ts::PropsFactory"
149
+ }
150
+ }
151
+ },
152
+ "required": false,
153
+ "optional": true,
154
+ "docs": {
155
+ "tags": [{
156
+ "name": "returns",
157
+ "text": "props"
158
+ }],
159
+ "text": "Factory for creating props for example components"
160
+ },
161
+ "getter": false,
162
+ "setter": false,
163
+ "defaultValue": "() => ({})"
164
+ }
165
+ };
166
+ }
167
+ static get states() {
168
+ return {
169
+ "activeTab": {},
170
+ "theme": {}
171
+ };
172
+ }
173
+ }
174
+ //# sourceMappingURL=playground.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground.js","sourceRoot":"","sources":["../../../src/components/playground/playground.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { JsonDocsComponent } from '@stencil/core/internal';\nimport { JsonDocsSource } from '../../kompendium/source';\nimport { Theme, THEME_EVENT_NAME } from '../darkmode-switch/types';\nimport { PropsFactory } from './playground.types';\n\n@Component({\n tag: 'kompendium-playground',\n styleUrl: 'playground.scss',\n shadow: true,\n})\nexport class Playground {\n /**\n * The component to display\n */\n @Prop()\n public component: JsonDocsComponent;\n\n /**\n * Schema for the component\n */\n @Prop()\n public schema: Record<string, any>;\n\n /**\n * Factory for creating props for example components\n * @returns {Record<string, unknown>} props\n */\n @Prop()\n public propsFactory?: PropsFactory = () => ({});\n\n @State()\n private activeTab: string;\n\n @State()\n private theme: Theme;\n\n constructor() {\n this.renderTab = this.renderTab.bind(this);\n this.renderItem = this.renderItem.bind(this);\n }\n\n public connectedCallback() {\n this.theme = document.querySelector('html').dataset.theme as Theme;\n document.addEventListener(THEME_EVENT_NAME, this.themeListener);\n }\n\n public disconnectedCallback() {\n document.removeEventListener(THEME_EVENT_NAME, this.themeListener);\n }\n\n public render(): HTMLElement {\n if (!this.component) {\n return;\n }\n\n const sources: JsonDocsSource[] = (this.component as any).sources || [];\n\n return (\n <Host data-theme={this.theme}>\n <section class=\"example\">\n <div class=\"result\">{this.renderResult()}</div>\n\n <aside class=\"code\">\n <nav class=\"tab-bar\">{this.renderTabs(sources)}</nav>\n <div class=\"tab-items\">{this.renderItems(sources)}</div>\n </aside>\n </section>\n </Host>\n );\n }\n\n private renderTabs(sources: JsonDocsSource[]) {\n return sources.map(this.renderTab);\n }\n\n private renderTab(source: JsonDocsSource, index: number) {\n const classList = {\n tab: true,\n active: this.isTabActive(source, index),\n };\n\n return (\n <a class={classList} onClick={this.activateTab(source.filename)}>\n <span>{source.filename}</span>\n </a>\n );\n }\n\n private renderItems(sources: JsonDocsSource[]) {\n return sources.map(this.renderItem);\n }\n\n private renderResult() {\n const ExampleComponent = this.component.tag;\n const text = '##### ' + this.component.docs;\n const factory = this.propsFactory;\n const props = {\n schema: this.schema,\n ...factory(ExampleComponent),\n };\n\n return (\n <div class=\"show-case\">\n <div class=\"show-case_description\">\n <kompendium-markdown text={text} />\n </div>\n <div class=\"show-case_component\">\n {this.renderDebugButton(this.component.tag)}\n <ExampleComponent {...props} />\n </div>\n </div>\n );\n }\n\n private renderItem(source: JsonDocsSource, index: number) {\n const classList = {\n 'tab-item': true,\n active: this.isTabActive(source, index),\n };\n const code = source.source.replace(/\\/\\*\\*.+?\\*\\//gms, '');\n const key = [this.component.tag, source.filename].join('/');\n\n return (\n <kompendium-code class={classList} language={source.type} key={key}>\n {code}\n </kompendium-code>\n );\n }\n\n private renderDebugButton(tag: string) {\n if (!['localhost', '127.0.0.1'].includes(location.hostname)) {\n return;\n }\n\n const href = `#/debug/${tag}`;\n\n return (\n <div class=\"debug\">\n <a class=\"debug-link\" href={href} title=\"Debug\">\n <svg\n viewBox=\"0 0 400 400\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"1.5\"\n >\n <path fill=\"none\" d=\"M0 0h400v400H0z\" />\n <path\n d=\"M194.97 254.84h77.555\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-opacity=\".6\"\n stroke-width=\"20\"\n />\n <path\n d=\"M127.474 145.16l54.84 54.84M182.315 200l-54.84 54.84\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"20\"\n />\n </svg>\n </a>\n </div>\n );\n }\n\n private activateTab = (id: string) => () => {\n this.activeTab = id;\n };\n\n private isTabActive(source: JsonDocsSource, index: number): boolean {\n let isActive = this.activeTab === source.filename;\n if (!isActive) {\n isActive = index === 0 && !this.activeTab;\n }\n\n return isActive;\n }\n\n private themeListener = (event: CustomEvent<Theme>) => {\n this.theme = event.detail;\n };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=playground.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground.types.js","sourceRoot":"","sources":["../../../src/components/playground/playground.types.ts"],"names":[],"mappings":"","sourcesContent":["export type PropsFactory = (name: string) => Record<string, unknown>;\n"]}