@elmethis/core 1.0.0-alpha.19 → 1.0.0-alpha.191

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 (314) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.mjs +10 -0
  2. package/dist/components/{headings/ElmHeading4.stories.d.ts → badge/ElmBadge.stories.d.ts} +2 -2
  3. package/dist/components/{typography/ElmBulletedList.vue.d.ts → badge/ElmBadge.vue.d.ts} +8 -7
  4. package/dist/components/badge/ElmBadge.vue.mjs +10 -0
  5. package/dist/components/badge/ElmBadge.vue2.mjs +33 -0
  6. package/dist/components/badge/ElmBadge.vue3.mjs +26 -0
  7. package/dist/components/badge/ElmTag.stories.d.ts +7 -0
  8. package/dist/components/badge/ElmTag.vue.d.ts +14 -0
  9. package/dist/components/badge/ElmTag.vue.mjs +10 -0
  10. package/dist/components/badge/ElmTag.vue2.mjs +39 -0
  11. package/dist/components/badge/ElmTag.vue3.mjs +26 -0
  12. package/dist/components/code/ElmCodeBlock.stories.d.ts +2 -0
  13. package/dist/components/code/ElmCodeBlock.vue.d.ts +31 -2
  14. package/dist/components/code/ElmCodeBlock.vue.mjs +23 -0
  15. package/dist/components/code/ElmCodeBlock.vue2.mjs +127 -0
  16. package/dist/components/code/ElmCodeBlock.vue3.mjs +42 -0
  17. package/dist/components/code/ElmKatex.vue.d.ts +3 -1
  18. package/dist/components/code/ElmKatex.vue.mjs +10 -0
  19. package/dist/components/code/ElmKatex.vue2.mjs +67 -0
  20. package/dist/components/code/ElmKatex.vue3.mjs +20 -0
  21. package/dist/components/code/ElmShikiHighlighter.stories.d.ts +6 -0
  22. package/dist/components/code/ElmShikiHighlighter.vue.d.ts +22 -0
  23. package/dist/components/code/ElmShikiHighlighter.vue.mjs +23 -0
  24. package/dist/components/code/ElmShikiHighlighter.vue2.mjs +55 -0
  25. package/dist/components/code/ElmShikiHighlighter.vue3.mjs +20 -0
  26. package/dist/components/code/shikiInstance.d.ts +2 -0
  27. package/dist/components/code/shikiInstance.mjs +76 -0
  28. package/dist/components/containments/ElmColumn.vue.d.ts +3 -2
  29. package/dist/components/containments/ElmColumn.vue.mjs +10 -0
  30. package/dist/components/containments/ElmColumn.vue2.mjs +16 -0
  31. package/dist/components/containments/ElmColumn.vue3.mjs +20 -0
  32. package/dist/components/containments/ElmColumnList.vue.d.ts +3 -2
  33. package/dist/components/containments/ElmColumnList.vue.mjs +10 -0
  34. package/dist/components/containments/ElmColumnList.vue2.mjs +16 -0
  35. package/dist/components/containments/ElmColumnList.vue3.mjs +18 -0
  36. package/dist/components/containments/ElmDesktopWindow.vue.d.ts +3 -2
  37. package/dist/components/containments/ElmDesktopWindow.vue.mjs +10 -0
  38. package/dist/components/containments/ElmDesktopWindow.vue2.mjs +42 -0
  39. package/dist/components/containments/ElmDesktopWindow.vue3.mjs +26 -0
  40. package/dist/components/containments/ElmModal.vue.d.ts +8 -7
  41. package/dist/components/containments/ElmModal.vue.mjs +23 -0
  42. package/dist/components/containments/ElmModal.vue2.mjs +44 -0
  43. package/dist/components/containments/ElmModal.vue3.mjs +23 -0
  44. package/dist/components/containments/ElmParallax.vue.mjs +10 -0
  45. package/dist/components/containments/ElmParallax.vue2.mjs +35 -0
  46. package/dist/components/containments/ElmParallax.vue3.mjs +20 -0
  47. package/dist/components/containments/ElmSnackbar.stories.d.ts +6 -0
  48. package/dist/components/containments/ElmSnackbar.vue.d.ts +11 -0
  49. package/dist/components/containments/ElmSnackbar.vue.mjs +10 -0
  50. package/dist/components/containments/ElmSnackbar.vue2.mjs +39 -0
  51. package/dist/components/containments/ElmSnackbar.vue3.mjs +26 -0
  52. package/dist/components/containments/ElmSnackbarContainer.vue.d.ts +10 -0
  53. package/dist/components/containments/ElmSnackbarContainer.vue.mjs +23 -0
  54. package/dist/components/containments/ElmSnackbarContainer.vue2.mjs +33 -0
  55. package/dist/components/containments/ElmSnackbarContainer.vue3.mjs +19 -0
  56. package/dist/components/containments/ElmToggle.stories.d.ts +1 -0
  57. package/dist/components/containments/ElmToggle.vue.d.ts +21 -10
  58. package/dist/components/containments/ElmToggle.vue.mjs +23 -0
  59. package/dist/components/containments/ElmToggle.vue2.mjs +103 -0
  60. package/dist/components/containments/ElmToggle.vue3.mjs +33 -0
  61. package/dist/components/containments/ElmTooltip.vue.d.ts +5 -2
  62. package/dist/components/containments/ElmTooltip.vue.mjs +23 -0
  63. package/dist/components/containments/ElmTooltip.vue2.mjs +49 -0
  64. package/dist/components/containments/ElmTooltip.vue3.mjs +20 -0
  65. package/dist/components/containments/useSnackbarState.d.ts +28 -0
  66. package/dist/components/data/ElmMultiProgress.stories.d.ts +6 -0
  67. package/dist/components/data/ElmMultiProgress.vue.d.ts +30 -0
  68. package/dist/components/data/ElmMultiProgress.vue.mjs +10 -0
  69. package/dist/components/data/ElmMultiProgress.vue2.mjs +45 -0
  70. package/dist/components/data/ElmMultiProgress.vue3.mjs +23 -0
  71. package/dist/components/data/ElmProgress.stories.d.ts +1 -0
  72. package/dist/components/data/ElmProgress.vue.d.ts +6 -1
  73. package/dist/components/data/ElmProgress.vue.mjs +10 -0
  74. package/dist/components/data/ElmProgress.vue2.mjs +53 -0
  75. package/dist/components/data/ElmProgress.vue3.mjs +32 -0
  76. package/dist/components/data/ElmStatusMessage.stories.d.ts +9 -0
  77. package/dist/components/data/ElmStatusMessage.vue.d.ts +6 -0
  78. package/dist/components/data/ElmStatusMessage.vue.mjs +23 -0
  79. package/dist/components/data/ElmStatusMessage.vue2.mjs +75 -0
  80. package/dist/components/data/ElmStatusMessage.vue3.mjs +23 -0
  81. package/dist/components/fallback/ElmBlockFallback.stories.d.ts +6 -0
  82. package/dist/components/fallback/ElmBlockFallback.vue.d.ts +4 -0
  83. package/dist/components/fallback/ElmBlockFallback.vue.mjs +10 -0
  84. package/dist/components/fallback/ElmBlockFallback.vue2.mjs +17 -0
  85. package/dist/components/fallback/ElmBlockFallback.vue3.mjs +18 -0
  86. package/dist/components/fallback/ElmRectangleWave.vue.d.ts +1 -1
  87. package/dist/components/fallback/ElmRectangleWave.vue.mjs +10 -0
  88. package/dist/components/fallback/ElmRectangleWave.vue2.mjs +15 -0
  89. package/dist/components/fallback/ElmRectangleWave.vue3.mjs +21 -0
  90. package/dist/components/{headings/ElmHeading1.stories.d.ts → fallback/ElmSpinner.stories.d.ts} +2 -2
  91. package/dist/components/fallback/ElmSpinner.vue.d.ts +9 -0
  92. package/dist/components/fallback/ElmSpinner.vue.mjs +10 -0
  93. package/dist/components/fallback/ElmSpinner.vue2.mjs +30 -0
  94. package/dist/components/fallback/ElmSpinner.vue3.mjs +24 -0
  95. package/dist/components/fallback/ElmUnsupportedBlock.stories.d.ts +6 -0
  96. package/dist/components/fallback/ElmUnsupportedBlock.vue.d.ts +5 -0
  97. package/dist/components/fallback/ElmUnsupportedBlock.vue.mjs +10 -0
  98. package/dist/components/fallback/ElmUnsupportedBlock.vue2.mjs +46 -0
  99. package/dist/components/fallback/ElmUnsupportedBlock.vue3.mjs +29 -0
  100. package/dist/components/form/ElmButton.stories.d.ts +11 -0
  101. package/dist/components/form/ElmButton.vue.d.ts +41 -0
  102. package/dist/components/form/ElmButton.vue.mjs +23 -0
  103. package/dist/components/form/ElmButton.vue2.mjs +68 -0
  104. package/dist/components/form/ElmButton.vue3.mjs +36 -0
  105. package/dist/components/form/ElmCheckbox.vue.d.ts +16 -6
  106. package/dist/components/form/ElmCheckbox.vue.mjs +10 -0
  107. package/dist/components/form/ElmCheckbox.vue2.mjs +177 -0
  108. package/dist/components/form/ElmCheckbox.vue3.mjs +34 -0
  109. package/dist/components/{headings/ElmHeading2.stories.d.ts → form/ElmSwitch.stories.d.ts} +2 -2
  110. package/dist/components/form/ElmSwitch.vue.d.ts +32 -0
  111. package/dist/components/form/ElmSwitch.vue.mjs +10 -0
  112. package/dist/components/form/ElmSwitch.vue2.mjs +61 -0
  113. package/dist/components/form/ElmSwitch.vue3.mjs +28 -0
  114. package/dist/components/form/ElmTextField.stories.d.ts +6 -0
  115. package/dist/components/form/ElmTextField.vue.d.ts +30 -0
  116. package/dist/components/form/ElmTextField.vue.mjs +10 -0
  117. package/dist/components/form/ElmTextField.vue2.mjs +124 -0
  118. package/dist/components/form/ElmTextField.vue3.mjs +46 -0
  119. package/dist/components/{headings/ElmHeading3.stories.d.ts → form/ElmTotp.stories.d.ts} +2 -2
  120. package/dist/components/form/ElmTotp.vue.d.ts +12 -0
  121. package/dist/components/form/ElmTotp.vue.mjs +10 -0
  122. package/dist/components/form/ElmTotp.vue2.mjs +102 -0
  123. package/dist/components/form/ElmTotp.vue3.mjs +34 -0
  124. package/dist/components/icon/ElmArrowIcon.stories.d.ts +6 -0
  125. package/dist/components/icon/ElmArrowIcon.vue.d.ts +26 -0
  126. package/dist/components/icon/ElmArrowIcon.vue.mjs +10 -0
  127. package/dist/components/icon/ElmArrowIcon.vue2.mjs +31 -0
  128. package/dist/components/icon/ElmArrowIcon.vue3.mjs +29 -0
  129. package/dist/components/icon/ElmBookmarkIcon.stories.d.ts +8 -0
  130. package/dist/components/icon/ElmBookmarkIcon.vue.d.ts +7 -0
  131. package/dist/components/icon/ElmBookmarkIcon.vue.mjs +10 -0
  132. package/dist/components/icon/ElmBookmarkIcon.vue2.mjs +45 -0
  133. package/dist/components/icon/ElmBookmarkIcon.vue3.mjs +27 -0
  134. package/dist/components/icon/ElmCubeIcon.vue.d.ts +1 -1
  135. package/dist/components/icon/ElmCubeIcon.vue.mjs +10 -0
  136. package/dist/components/icon/ElmCubeIcon.vue2.mjs +41 -0
  137. package/dist/components/icon/ElmCubeIcon.vue3.mjs +24 -0
  138. package/dist/components/icon/ElmDotLoadingIcon.vue.d.ts +2 -2
  139. package/dist/components/icon/ElmDotLoadingIcon.vue.mjs +10 -0
  140. package/dist/components/icon/ElmDotLoadingIcon.vue2.mjs +28 -0
  141. package/dist/components/icon/ElmDotLoadingIcon.vue3.mjs +26 -0
  142. package/dist/components/icon/ElmInlineIcon.stories.d.ts +6 -0
  143. package/dist/components/icon/ElmInlineIcon.vue.d.ts +12 -0
  144. package/dist/components/icon/ElmInlineIcon.vue.mjs +10 -0
  145. package/dist/components/icon/ElmInlineIcon.vue2.mjs +27 -0
  146. package/dist/components/icon/ElmInlineIcon.vue3.mjs +20 -0
  147. package/dist/components/icon/ElmLanguageIcon.vue.d.ts +1 -1
  148. package/dist/components/icon/ElmLanguageIcon.vue.mjs +23 -0
  149. package/dist/components/icon/ElmLanguageIcon.vue2.mjs +148 -0
  150. package/dist/components/icon/ElmLanguageIcon.vue3.mjs +23 -0
  151. package/dist/components/icon/ElmLoginIcon.stories.d.ts +6 -0
  152. package/dist/components/icon/ElmLoginIcon.vue.d.ts +18 -0
  153. package/dist/components/icon/ElmLoginIcon.vue.mjs +10 -0
  154. package/dist/components/icon/ElmLoginIcon.vue2.mjs +37 -0
  155. package/dist/components/icon/ElmLoginIcon.vue3.mjs +20 -0
  156. package/dist/components/icon/ElmToggleTheme.vue.mjs +10 -0
  157. package/dist/components/icon/ElmToggleTheme.vue2.mjs +30 -0
  158. package/dist/components/icon/ElmToggleTheme.vue3.mjs +20 -0
  159. package/dist/components/icon/languages/Bash.vue.d.ts +1 -1
  160. package/dist/{Bash-mlA01V07.js → components/icon/languages/Bash.vue.mjs} +20 -15
  161. package/dist/components/icon/languages/Bash.vue2.mjs +20 -0
  162. package/dist/components/icon/languages/{JavaScript.vue.d.ts → Css.vue.d.ts} +1 -1
  163. package/dist/components/icon/languages/Css.vue.mjs +19 -0
  164. package/dist/components/icon/languages/Rust.vue.d.ts +1 -1
  165. package/dist/components/icon/languages/Rust.vue.mjs +17 -0
  166. package/dist/components/jsonschema/ElmChildContainer.stories.d.ts +6 -0
  167. package/dist/components/{typography/ElmListItem.vue.d.ts → jsonschema/ElmChildContainer.vue.d.ts} +6 -3
  168. package/dist/components/jsonschema/ElmFieldAttribute.stories.d.ts +6 -0
  169. package/dist/components/jsonschema/ElmFieldAttribute.vue.d.ts +7 -0
  170. package/dist/components/jsonschema/ElmFieldType.stories.d.ts +7 -0
  171. package/dist/components/jsonschema/ElmFieldType.vue.d.ts +8 -0
  172. package/dist/components/jsonschema/ElmJsonSchema.stories.d.ts +7 -0
  173. package/dist/components/jsonschema/ElmJsonSchema.vue.d.ts +7 -0
  174. package/dist/components/media/ElmBlockImage.stories.d.ts +9 -0
  175. package/dist/components/media/ElmBlockImage.vue.d.ts +12 -0
  176. package/dist/components/media/ElmBlockImage.vue.mjs +23 -0
  177. package/dist/components/media/ElmBlockImage.vue2.mjs +117 -0
  178. package/dist/components/media/ElmBlockImage.vue3.mjs +36 -0
  179. package/dist/components/media/ElmFile.vue.d.ts +6 -1
  180. package/dist/components/media/ElmFile.vue.mjs +10 -0
  181. package/dist/components/media/ElmFile.vue2.mjs +77 -0
  182. package/dist/components/media/ElmFile.vue3.mjs +26 -0
  183. package/dist/components/media/ElmImage.stories.d.ts +2 -0
  184. package/dist/components/media/ElmImage.vue.d.ts +5 -0
  185. package/dist/components/media/ElmImage.vue.mjs +23 -0
  186. package/dist/components/media/ElmImage.vue2.mjs +91 -0
  187. package/dist/components/media/ElmImage.vue3.mjs +30 -0
  188. package/dist/components/navigation/ElmBookmark.stories.d.ts +2 -0
  189. package/dist/components/navigation/ElmBookmark.vue.d.ts +14 -10
  190. package/dist/components/navigation/ElmBookmark.vue.mjs +10 -0
  191. package/dist/components/navigation/ElmBookmark.vue2.mjs +115 -0
  192. package/dist/components/navigation/ElmBookmark.vue3.mjs +44 -0
  193. package/dist/components/navigation/ElmBreadcrumb.vue.d.ts +3 -1
  194. package/dist/components/navigation/ElmBreadcrumb.vue.mjs +10 -0
  195. package/dist/components/navigation/ElmBreadcrumb.vue2.mjs +63 -0
  196. package/dist/components/navigation/ElmBreadcrumb.vue3.mjs +30 -0
  197. package/dist/components/navigation/ElmPagetop.vue.d.ts +2 -2
  198. package/dist/components/navigation/ElmPagetop.vue.mjs +10 -0
  199. package/dist/components/navigation/ElmPagetop.vue2.mjs +51 -0
  200. package/dist/components/navigation/ElmPagetop.vue3.mjs +30 -0
  201. package/dist/components/navigation/ElmTableOfContents.vue.d.ts +1 -1
  202. package/dist/components/navigation/ElmTableOfContents.vue.mjs +10 -0
  203. package/dist/components/navigation/ElmTableOfContents.vue2.mjs +43 -0
  204. package/dist/components/navigation/ElmTableOfContents.vue3.mjs +26 -0
  205. package/dist/components/others/ElmColorSample.stories.d.ts +6 -0
  206. package/dist/components/others/ElmColorSample.vue.d.ts +8 -0
  207. package/dist/components/others/ElmColorSample.vue.mjs +23 -0
  208. package/dist/components/others/ElmColorSample.vue2.mjs +72 -0
  209. package/dist/components/others/ElmColorSample.vue3.mjs +21 -0
  210. package/dist/components/others/ElmColorTable.stories.d.ts +6 -0
  211. package/dist/components/others/ElmColorTable.vue.d.ts +11 -0
  212. package/dist/components/others/ElmColorTable.vue.mjs +10 -0
  213. package/dist/components/others/ElmColorTable.vue2.mjs +45 -0
  214. package/dist/components/others/ElmColorTable.vue3.mjs +22 -0
  215. package/dist/components/others/ElmJsonComponentRenderer.stories.d.ts +23 -0
  216. package/dist/components/others/ElmJsonComponentRenderer.vue.d.ts +6 -0
  217. package/dist/components/others/ElmJsonComponentRenderer.vue.mjs +10 -0
  218. package/dist/components/others/ElmJsonComponentRenderer.vue2.mjs +214 -0
  219. package/dist/components/others/ElmJsonComponentRenderer.vue3.mjs +21 -0
  220. package/dist/components/others/ElmTyping.stories.d.ts +6 -0
  221. package/dist/components/others/ElmTyping.vue.d.ts +4 -0
  222. package/dist/components/table/ElmTable.vue.d.ts +32 -4
  223. package/dist/components/table/ElmTable.vue.mjs +10 -0
  224. package/dist/components/table/ElmTable.vue2.mjs +61 -0
  225. package/dist/components/table/ElmTable.vue3.mjs +27 -0
  226. package/dist/components/table/ElmTableBody.vue.d.ts +8 -4
  227. package/dist/components/table/ElmTableBody.vue.mjs +14 -0
  228. package/dist/components/table/ElmTableBody.vue2.mjs +4 -0
  229. package/dist/components/table/ElmTableCell.vue.d.ts +7 -3
  230. package/dist/components/table/ElmTableCell.vue.mjs +10 -0
  231. package/dist/components/table/ElmTableCell.vue2.mjs +28 -0
  232. package/dist/components/table/ElmTableCell.vue3.mjs +26 -0
  233. package/dist/components/table/ElmTableHeader.vue.d.ts +8 -4
  234. package/dist/components/table/ElmTableHeader.vue.mjs +10 -0
  235. package/dist/components/table/ElmTableHeader.vue2.mjs +17 -0
  236. package/dist/components/table/ElmTableHeader.vue3.mjs +20 -0
  237. package/dist/components/table/ElmTableRow.vue.d.ts +8 -4
  238. package/dist/components/table/ElmTableRow.vue.mjs +10 -0
  239. package/dist/components/table/ElmTableRow.vue2.mjs +20 -0
  240. package/dist/components/table/ElmTableRow.vue3.mjs +21 -0
  241. package/dist/components/template/ElmTemplate.vue.d.ts +1 -1
  242. package/dist/components/typography/ElmBlockQuote.vue.d.ts +6 -2
  243. package/dist/components/typography/ElmBlockQuote.vue.mjs +10 -0
  244. package/dist/components/typography/ElmBlockQuote.vue2.mjs +64 -0
  245. package/dist/components/typography/ElmBlockQuote.vue3.mjs +26 -0
  246. package/dist/components/typography/ElmCallout.vue.d.ts +6 -3
  247. package/dist/components/typography/ElmCallout.vue.mjs +10 -0
  248. package/dist/components/typography/ElmCallout.vue2.mjs +57 -0
  249. package/dist/components/typography/ElmCallout.vue3.mjs +26 -0
  250. package/dist/components/typography/ElmDivider.vue.d.ts +8 -1
  251. package/dist/components/typography/ElmDivider.vue.mjs +10 -0
  252. package/dist/components/typography/ElmDivider.vue2.mjs +29 -0
  253. package/dist/components/typography/ElmDivider.vue3.mjs +20 -0
  254. package/dist/components/typography/ElmFragmentIdentifier.stories.d.ts +6 -0
  255. package/dist/components/typography/ElmFragmentIdentifier.vue.d.ts +8 -0
  256. package/dist/components/typography/ElmFragmentIdentifier.vue.mjs +10 -0
  257. package/dist/components/typography/ElmFragmentIdentifier.vue2.mjs +57 -0
  258. package/dist/components/typography/ElmFragmentIdentifier.vue3.mjs +23 -0
  259. package/dist/components/typography/ElmHeading.stories.d.ts +7 -0
  260. package/dist/components/typography/ElmHeading.vue.d.ts +49 -0
  261. package/dist/components/typography/ElmHeading.vue.mjs +10 -0
  262. package/dist/components/typography/ElmHeading.vue2.mjs +72 -0
  263. package/dist/components/typography/ElmHeading.vue3.mjs +39 -0
  264. package/dist/components/{inline → typography}/ElmInlineText.stories.d.ts +3 -0
  265. package/dist/components/{inline → typography}/ElmInlineText.vue.d.ts +22 -1
  266. package/dist/components/typography/ElmInlineText.vue.mjs +10 -0
  267. package/dist/components/typography/ElmInlineText.vue2.mjs +95 -0
  268. package/dist/components/typography/ElmInlineText.vue3.mjs +29 -0
  269. package/dist/components/typography/ElmList.stories.d.ts +8 -0
  270. package/dist/components/typography/ElmList.vue.d.ts +31 -0
  271. package/dist/components/typography/ElmList.vue.mjs +36 -0
  272. package/dist/components/typography/ElmList.vue3.mjs +17 -0
  273. package/dist/components/typography/ElmParagraph.vue.d.ts +5 -2
  274. package/dist/components/typography/ElmParagraph.vue.mjs +10 -0
  275. package/dist/components/typography/ElmParagraph.vue2.mjs +27 -0
  276. package/dist/components/typography/ElmParagraph.vue3.mjs +20 -0
  277. package/dist/components/typography/ElmTypingAnimation.stories.d.ts +6 -0
  278. package/dist/components/typography/ElmTypingAnimation.vue.d.ts +21 -0
  279. package/dist/hooks/useElmethisTheme.mjs +43 -0
  280. package/dist/hooks/useTyping.d.ts +17 -0
  281. package/dist/hooks/useTyping.mjs +37 -0
  282. package/dist/index.d.ts +112 -46
  283. package/dist/index.mjs +128 -0
  284. package/dist/node_modules/.pnpm/@mdi_js@7.4.47/node_modules/@mdi/js/mdi.mjs +14 -0
  285. package/package.json +32 -32
  286. package/dist/JavaScript-stKTLCvS.js +0 -22
  287. package/dist/Rust-PU5XwTn1.js +0 -16
  288. package/dist/TypeScript-ViBgqhx7.js +0 -22
  289. package/dist/components/code/ElmPrismHighlighter.stories.d.ts +0 -7
  290. package/dist/components/code/ElmPrismHighlighter.vue.d.ts +0 -14
  291. package/dist/components/headings/ElmHeading1.vue.d.ts +0 -20
  292. package/dist/components/headings/ElmHeading2.vue.d.ts +0 -20
  293. package/dist/components/headings/ElmHeading3.vue.d.ts +0 -20
  294. package/dist/components/headings/ElmHeading4.vue.d.ts +0 -20
  295. package/dist/components/headings/ElmHeading5.stories.d.ts +0 -6
  296. package/dist/components/headings/ElmHeading5.vue.d.ts +0 -20
  297. package/dist/components/headings/ElmHeading6.stories.d.ts +0 -6
  298. package/dist/components/headings/ElmHeading6.vue.d.ts +0 -20
  299. package/dist/components/icon/languages/TypeScript.vue.d.ts +0 -2
  300. package/dist/components/inline/ElmInlineCode.stories.d.ts +0 -6
  301. package/dist/components/inline/ElmInlineCode.vue.d.ts +0 -15
  302. package/dist/components/inline/ElmInlineLink.stories.d.ts +0 -9
  303. package/dist/components/inline/ElmInlineLink.vue.d.ts +0 -37
  304. package/dist/components/inline/ElmInlineRuby.stories.d.ts +0 -6
  305. package/dist/components/inline/ElmInlineRuby.vue.d.ts +0 -19
  306. package/dist/components/renderer/ElmJsonRenderer.stories.d.ts +0 -19
  307. package/dist/components/renderer/ElmJsonRenderer.vue.d.ts +0 -163
  308. package/dist/components/typography/ElmBulletedList.stories.d.ts +0 -7
  309. package/dist/components/typography/ElmListItem.stories.d.ts +0 -6
  310. package/dist/components/typography/ElmNumberedList.stories.d.ts +0 -7
  311. package/dist/components/typography/ElmNumberedList.vue.d.ts +0 -20
  312. package/dist/elmethis.js +0 -48
  313. package/dist/elmethis.umd.cjs +0 -419
  314. package/dist/index-DvtsYpwQ.js +0 -16274
@@ -0,0 +1,10 @@
1
+ const _export_sfc = (sfc, props) => {
2
+ const target = sfc.__vccOpts || sfc;
3
+ for (const [key, val] of props) {
4
+ target[key] = val;
5
+ }
6
+ return target;
7
+ };
8
+ export {
9
+ _export_sfc as default
10
+ };
@@ -1,6 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/vue3';
2
- import { default as ElmHeading4 } from './ElmHeading4.vue';
3
- declare const meta: Meta<typeof ElmHeading4>;
2
+ import { default as ElmBadge } from './ElmBadge.vue';
3
+ declare const meta: Meta<typeof ElmBadge>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Primary: Story;
@@ -1,16 +1,17 @@
1
- export interface ElmBulletedListProps {
1
+ export interface ElmBadgeProps {
2
+ color: string;
2
3
  }
3
4
  declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
4
6
  slots: {
5
- default?(_: {}): any;
6
- };
7
- refs: {
8
- target: HTMLUListElement;
7
+ left?(_: {}): any;
8
+ right?(_: {}): any;
9
9
  };
10
- attrs: Partial<{}>;
10
+ refs: {};
11
+ rootEl: HTMLSpanElement;
11
12
  };
12
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
- declare const __VLS_component: import('vue').DefineComponent<ElmBulletedListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmBulletedListProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_component: import('vue').DefineComponent<ElmBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmBadgeProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
14
15
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
16
  export default _default;
16
17
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./ElmBadge.vue2.mjs";
2
+ import style0 from "./ElmBadge.vue3.mjs";
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const cssModules = {
5
+ "$style": style0
6
+ };
7
+ const ElmBadge = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
8
+ export {
9
+ ElmBadge as default
10
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, unref, renderSlot } from "vue";
2
+ import { getLuminance } from "polished";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "ElmBadge",
5
+ props: {
6
+ color: {}
7
+ },
8
+ setup(__props) {
9
+ return (_ctx, _cache) => {
10
+ return openBlock(), createElementBlock("span", {
11
+ class: normalizeClass(_ctx.$style.badge),
12
+ style: normalizeStyle({ "--bg-color": _ctx.color })
13
+ }, [
14
+ createElementVNode("span", {
15
+ class: normalizeClass(_ctx.$style.left),
16
+ style: normalizeStyle({
17
+ color: unref(getLuminance)(_ctx.color) > 0.5 ? "rgba(0,0,0,0.7)" : "rgba(255,255,255,0.7)"
18
+ })
19
+ }, [
20
+ renderSlot(_ctx.$slots, "left")
21
+ ], 6),
22
+ createElementVNode("span", {
23
+ class: normalizeClass(_ctx.$style.right)
24
+ }, [
25
+ renderSlot(_ctx.$slots, "right")
26
+ ], 2)
27
+ ], 6);
28
+ };
29
+ }
30
+ });
31
+ export {
32
+ _sfc_main as default
33
+ };
@@ -0,0 +1,26 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode("._badge_gc88x_1{border:1px solid var(--bg-color);border-radius:.25rem}._badge_gc88x_1 ._left_gc88x_5{background-color:var(--bg-color);padding-inline:.5rem}._badge_gc88x_1 ._right_gc88x_9{padding-inline:.5rem}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ const badge = "_badge_gc88x_1";
14
+ const left = "_left_gc88x_5";
15
+ const right = "_right_gc88x_9";
16
+ const style0 = {
17
+ badge,
18
+ left,
19
+ right
20
+ };
21
+ export {
22
+ badge,
23
+ style0 as default,
24
+ left,
25
+ right
26
+ };
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as ElmTag } from './ElmTag.vue';
3
+ declare const meta: Meta<typeof ElmTag>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
7
+ export declare const Multiple: Story;
@@ -0,0 +1,14 @@
1
+ export interface ElmTagProps {
2
+ /**
3
+ * The text to display in the tag.
4
+ */
5
+ text: string;
6
+ /**
7
+ * The color of the tag.
8
+ */
9
+ color?: string;
10
+ }
11
+ declare const _default: import('vue').DefineComponent<ElmTagProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmTagProps> & Readonly<{}>, {
12
+ color: string;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
14
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./ElmTag.vue2.mjs";
2
+ import style0 from "./ElmTag.vue3.mjs";
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const cssModules = {
5
+ "$style": style0
6
+ };
7
+ const ElmTag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
8
+ export {
9
+ ElmTag as default
10
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createVNode, createElementVNode, unref } from "vue";
2
+ import { Icon } from "@iconify/vue";
3
+ import ElmInlineText from "../typography/ElmInlineText.vue.mjs";
4
+ import { getLuminance } from "polished";
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "ElmTag",
7
+ props: {
8
+ text: {},
9
+ color: { default: "transparent" }
10
+ },
11
+ setup(__props) {
12
+ return (_ctx, _cache) => {
13
+ return openBlock(), createElementBlock("div", {
14
+ class: normalizeClass(_ctx.$style.tag),
15
+ style: normalizeStyle({ "--color": _ctx.color })
16
+ }, [
17
+ createVNode(unref(Icon), {
18
+ icon: "tabler:tag",
19
+ class: normalizeClass(_ctx.$style.icon),
20
+ style: normalizeStyle({
21
+ backgroundColor: _ctx.color,
22
+ "--font-color": unref(getLuminance)(_ctx.color) > 0.5 ? "rgba(0,0,0,0.7)" : "rgba(255,255,255,0.7)"
23
+ })
24
+ }, null, 8, ["class", "style"]),
25
+ createElementVNode("div", {
26
+ class: normalizeClass(_ctx.$style.text)
27
+ }, [
28
+ createVNode(ElmInlineText, {
29
+ style: { color: "unset" },
30
+ text: _ctx.text
31
+ }, null, 8, ["text"])
32
+ ], 2)
33
+ ], 6);
34
+ };
35
+ }
36
+ });
37
+ export {
38
+ _sfc_main as default
39
+ };
@@ -0,0 +1,26 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode("._tag_xg111_1{display:inline-flex;width:-moz-min-content;width:min-content;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center;border-width:1px;border-style:solid;border-radius:.25rem;border-color:var(--color);color:#000000b3}[data-theme=dark] ._tag_xg111_1{color:#ffffffb3}._icon_xg111_18{display:block;line-height:1;margin:0;padding:.25rem;color:var(--font-color);border-radius:.125rem 0 0 .125rem}._text_xg111_27{white-space:nowrap;padding-inline:.5rem}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ const tag = "_tag_xg111_1";
14
+ const icon = "_icon_xg111_18";
15
+ const text = "_text_xg111_27";
16
+ const style0 = {
17
+ tag,
18
+ icon,
19
+ text
20
+ };
21
+ export {
22
+ style0 as default,
23
+ icon,
24
+ tag,
25
+ text
26
+ };
@@ -5,3 +5,5 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Rust: Story;
8
+ export declare const Caption: Story;
9
+ export declare const CaptionSlot: Story;
@@ -1,3 +1,5 @@
1
+ import { Property } from 'csstype';
2
+ import { VNode } from 'vue';
1
3
  export interface ElmCodeBlockProps {
2
4
  /**
3
5
  * The code to display.
@@ -12,8 +14,35 @@ export interface ElmCodeBlockProps {
12
14
  * If not provided, the language will be used.
13
15
  */
14
16
  caption?: string;
17
+ /**
18
+ * The margin of the code block.
19
+ */
20
+ margin?: Property.MarginBlock;
15
21
  }
16
- declare const _default: import('vue').DefineComponent<ElmCodeBlockProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmCodeBlockProps> & Readonly<{}>, {
22
+ declare function __VLS_template(): {
23
+ attrs: Partial<{}>;
24
+ slots: Readonly<{
25
+ default?: () => VNode[];
26
+ }> & {
27
+ default?: () => VNode[];
28
+ };
29
+ refs: {
30
+ target: HTMLDivElement;
31
+ tooltipRef: HTMLDivElement;
32
+ };
33
+ rootEl: HTMLDivElement;
34
+ };
35
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
36
+ declare const __VLS_component: import('vue').DefineComponent<ElmCodeBlockProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmCodeBlockProps> & Readonly<{}>, {
17
37
  language: string;
18
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
39
+ target: HTMLDivElement;
40
+ tooltipRef: HTMLDivElement;
41
+ }, HTMLDivElement>;
42
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
43
  export default _default;
44
+ type __VLS_WithTemplateSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,23 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-17343ed2],.v-leave-from[data-v-17343ed2]{opacity:1}.v-enter-active[data-v-17343ed2],.v-leave-active[data-v-17343ed2]{transition:opacity .15s}.v-enter-from[data-v-17343ed2],.v-leave-to[data-v-17343ed2]{opacity:0}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ import _sfc_main from "./ElmCodeBlock.vue2.mjs";
14
+ import style0 from "./ElmCodeBlock.vue3.mjs";
15
+
16
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
17
+ const cssModules = {
18
+ "$style": style0
19
+ };
20
+ const ElmCodeBlock = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-17343ed2"]]);
21
+ export {
22
+ ElmCodeBlock as default
23
+ };
@@ -0,0 +1,127 @@
1
+ import { defineComponent, defineAsyncComponent, ref, useTemplateRef, useSlots, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, createVNode, createBlock, resolveDynamicComponent, unref, Transition, withCtx, createCommentVNode, h } from "vue";
2
+ import { Icon } from "@iconify/vue";
3
+ import ElmLanguageIcon from "../icon/ElmLanguageIcon.vue.mjs";
4
+ import ElmInlineText from "../typography/ElmInlineText.vue.mjs";
5
+ import ElmBlockFallback from "../fallback/ElmBlockFallback.vue.mjs";
6
+ import ElmDotLoadingIcon from "../icon/ElmDotLoadingIcon.vue.mjs";
7
+ import { useClipboard, useIntersectionObserver, useElementHover } from "@vueuse/core";
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "ElmCodeBlock",
10
+ props: {
11
+ code: {},
12
+ language: { default: "txt" },
13
+ caption: {},
14
+ margin: {}
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const AsyncElmShikiHighlighter = defineAsyncComponent({
19
+ loader: () => import("./ElmShikiHighlighter.vue.mjs"),
20
+ loadingComponent: ElmBlockFallback
21
+ });
22
+ const isRendered = ref(false);
23
+ const { copy, copied } = useClipboard({ source: props.code });
24
+ const target = ref(null);
25
+ const targetIsVisible = ref(false);
26
+ useIntersectionObserver(target, ([{ isIntersecting }], _) => {
27
+ targetIsVisible.value = isIntersecting;
28
+ });
29
+ const tooltipElement = useTemplateRef("tooltipRef");
30
+ const isHovered = useElementHover(tooltipElement);
31
+ const slots = useSlots();
32
+ const renderCaption = () => {
33
+ if (props.caption) {
34
+ return h(ElmInlineText, { text: props.caption });
35
+ } else if (slots.default != null) {
36
+ return slots.default();
37
+ } else {
38
+ return h(ElmInlineText, { text: props.language });
39
+ }
40
+ };
41
+ return (_ctx, _cache) => {
42
+ return openBlock(), createElementBlock("div", {
43
+ ref_key: "target",
44
+ ref: target,
45
+ class: normalizeClass(_ctx.$style.wrapper),
46
+ style: normalizeStyle({
47
+ "--margin-block": _ctx.margin,
48
+ "--opacity": targetIsVisible.value ? 1 : 0
49
+ })
50
+ }, [
51
+ createElementVNode("div", {
52
+ class: normalizeClass(_ctx.$style.header)
53
+ }, [
54
+ createElementVNode("div", {
55
+ class: normalizeClass(_ctx.$style.header__left)
56
+ }, [
57
+ createVNode(ElmLanguageIcon, {
58
+ language: _ctx.language,
59
+ size: 20
60
+ }, null, 8, ["language"]),
61
+ (openBlock(), createBlock(resolveDynamicComponent(() => renderCaption())))
62
+ ], 2),
63
+ createElementVNode("div", {
64
+ ref: "tooltipRef",
65
+ class: normalizeClass(_ctx.$style.header__right)
66
+ }, [
67
+ createVNode(unref(Icon), {
68
+ class: normalizeClass(_ctx.$style["copy-icon"]),
69
+ onClick: _cache[0] || (_cache[0] = () => {
70
+ unref(copy)(_ctx.code);
71
+ }),
72
+ icon: unref(copied) ? "mdi:clipboard-check-multiple-outline" : "mdi:clipboard-multiple-outline"
73
+ }, null, 8, ["class", "icon"]),
74
+ createVNode(Transition, null, {
75
+ default: withCtx(() => [
76
+ unref(copied) ? (openBlock(), createElementBlock("div", {
77
+ key: 0,
78
+ class: normalizeClass(_ctx.$style.tooltip)
79
+ }, [
80
+ createVNode(unref(Icon), {
81
+ icon: "mdi:clipboard-check-multiple-outline",
82
+ class: normalizeClass(_ctx.$style["tooltip-check-icon"])
83
+ }, null, 8, ["class"]),
84
+ createVNode(ElmInlineText, { text: "Copied to Clipboard!" })
85
+ ], 2)) : unref(isHovered) && !unref(copied) ? (openBlock(), createElementBlock("div", {
86
+ key: 1,
87
+ class: normalizeClass(_ctx.$style.tooltip)
88
+ }, [
89
+ createVNode(unref(Icon), {
90
+ icon: "mdi:clipboard-multiple-outline",
91
+ class: normalizeClass(_ctx.$style["tooltip-copy-icon"])
92
+ }, null, 8, ["class"]),
93
+ createVNode(ElmInlineText, { text: "Copy to Clipboard" })
94
+ ], 2)) : createCommentVNode("", true)
95
+ ]),
96
+ _: 1
97
+ })
98
+ ], 2)
99
+ ], 2),
100
+ createElementVNode("div", {
101
+ class: normalizeClass(_ctx.$style.code)
102
+ }, [
103
+ createElementVNode("div", {
104
+ class: normalizeClass(_ctx.$style["code-body"]),
105
+ style: normalizeStyle({ opacity: isRendered.value ? 1 : 0 })
106
+ }, [
107
+ createVNode(unref(AsyncElmShikiHighlighter), {
108
+ modelValue: isRendered.value,
109
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRendered.value = $event),
110
+ code: _ctx.code,
111
+ language: _ctx.language
112
+ }, null, 8, ["modelValue", "code", "language"])
113
+ ], 6),
114
+ createElementVNode("div", {
115
+ style: normalizeStyle({ opacity: !isRendered.value ? 1 : 0 }),
116
+ class: normalizeClass(_ctx.$style.fallback)
117
+ }, [
118
+ createVNode(ElmDotLoadingIcon, { size: "48px" })
119
+ ], 6)
120
+ ], 2)
121
+ ], 6);
122
+ };
123
+ }
124
+ });
125
+ export {
126
+ _sfc_main as default
127
+ };
@@ -0,0 +1,42 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode("._wrapper_136yw_1{margin-block:var(--margin-block);opacity:var(--opacity);display:flex;flex-direction:column;border-radius:.25rem;transition:background-color .4s,opacity .8s;background-color:#fff6;box-shadow:0 0 .25rem #0000001a}[data-theme=dark] ._wrapper_136yw_1{background-color:#ffffff0d;box-shadow:0 0 .25rem #0000004d}._header_136yw_16{box-sizing:border-box;padding:.25rem .5rem .5rem;margin:.5rem;display:flex;flex-direction:row;justify-content:space-between;font-family:Source Code Pro,Menlo,Consolas,DejaVu Sans Mono,monospace;border-bottom:solid 1px rgba(0,0,0,.2)}[data-theme=dark] ._header_136yw_16{border-color:#fff3}._header__left_136yw_30{display:flex;flex-direction:row;align-items:center;gap:.5rem}._copy-icon_136yw_37{box-sizing:border-box;padding:.125rem;width:26px;height:26px;border-radius:.125rem;cursor:pointer;transition:background-color .2s;color:#000000b3}[data-theme=dark] ._copy-icon_136yw_37{color:#ffffffb3}._copy-icon_136yw_37:hover{background-color:#0000001a}[data-theme=dark] ._copy-icon_136yw_37:hover{background-color:#ffffff1a}._header__right_136yw_57{position:relative;display:flex;flex-direction:row;align-items:center;gap:.5rem}._code_136yw_65{position:relative;padding:.25rem 1rem 1rem;overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(105,135,184,.3) rgba(105,135,184,.15)}._code-body_136yw_73{transition:opacity .2s}._fallback_136yw_77{position:absolute;top:0;left:0;height:100%;width:100%;box-sizing:border-box;padding:auto;display:flex;justify-content:center;align-items:center;transition:opacity .2s;pointer-events:none}._tooltip_136yw_92{position:absolute;bottom:-2.5rem;right:0;display:flex;flex-wrap:none;justify-content:center;align-items:center;gap:.25rem;height:20px;white-space:nowrap}._tooltip-copy-icon_136yw_105{width:20px;height:20px;color:#4c6da2}._tooltip-check-icon_136yw_111{width:20px;height:20px;color:#449763}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ const wrapper = "_wrapper_136yw_1";
14
+ const header = "_header_136yw_16";
15
+ const header__left = "_header__left_136yw_30";
16
+ const header__right = "_header__right_136yw_57";
17
+ const code = "_code_136yw_65";
18
+ const fallback = "_fallback_136yw_77";
19
+ const tooltip = "_tooltip_136yw_92";
20
+ const style0 = {
21
+ wrapper,
22
+ header,
23
+ header__left,
24
+ "copy-icon": "_copy-icon_136yw_37",
25
+ header__right,
26
+ code,
27
+ "code-body": "_code-body_136yw_73",
28
+ fallback,
29
+ tooltip,
30
+ "tooltip-copy-icon": "_tooltip-copy-icon_136yw_105",
31
+ "tooltip-check-icon": "_tooltip-check-icon_136yw_111"
32
+ };
33
+ export {
34
+ code,
35
+ style0 as default,
36
+ fallback,
37
+ header,
38
+ header__left,
39
+ header__right,
40
+ tooltip,
41
+ wrapper
42
+ };
@@ -14,5 +14,7 @@ export interface ElmKatexProps {
14
14
  }
15
15
  declare const _default: import('vue').DefineComponent<ElmKatexProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmKatexProps> & Readonly<{}>, {
16
16
  block: boolean;
17
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
18
+ targetRef: HTMLSpanElement;
19
+ }, any>;
18
20
  export default _default;
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./ElmKatex.vue2.mjs";
2
+ import style0 from "./ElmKatex.vue3.mjs";
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const cssModules = {
5
+ "$style": style0
6
+ };
7
+ const ElmKatex = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
8
+ export {
9
+ ElmKatex as default
10
+ };
@@ -0,0 +1,67 @@
1
+ import { defineComponent, ref, onMounted, onUpdated, onServerPrefetch, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode } from "vue";
2
+ const _hoisted_1 = ["innerHTML"];
3
+ const _hoisted_2 = ["innerHTML"];
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "ElmKatex",
6
+ props: {
7
+ expression: {},
8
+ block: { type: Boolean, default: false }
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const html = ref();
13
+ let katexRenderToString = null;
14
+ const loadKatex = async () => {
15
+ if (!katexRenderToString) {
16
+ const { renderToString } = await import("katex");
17
+ katexRenderToString = renderToString;
18
+ }
19
+ };
20
+ const render = async () => {
21
+ await loadKatex();
22
+ if (html.value == null && katexRenderToString) {
23
+ try {
24
+ html.value = katexRenderToString(props.expression, {
25
+ displayMode: props.block,
26
+ output: "mathml"
27
+ });
28
+ } catch (err) {
29
+ console.error("KaTeX rendering error:", err);
30
+ }
31
+ }
32
+ };
33
+ onMounted(render);
34
+ onUpdated(render);
35
+ onServerPrefetch(render);
36
+ return (_ctx, _cache) => {
37
+ return props.block ? (openBlock(), createElementBlock("div", {
38
+ key: 0,
39
+ ref: "targetRef",
40
+ class: normalizeClass(_ctx.$style.katex),
41
+ style: normalizeStyle({
42
+ "--margin-block": props.block ? "3rem" : void 0
43
+ })
44
+ }, [
45
+ html.value ? (openBlock(), createElementBlock("span", {
46
+ key: 0,
47
+ innerHTML: html.value
48
+ }, null, 8, _hoisted_1)) : createCommentVNode("", true)
49
+ ], 6)) : (openBlock(), createElementBlock("span", {
50
+ key: 1,
51
+ ref: "targetRef",
52
+ class: normalizeClass(_ctx.$style.katex),
53
+ style: normalizeStyle({
54
+ "--margin-block": props.block ? "3rem" : void 0
55
+ })
56
+ }, [
57
+ html.value ? (openBlock(), createElementBlock("span", {
58
+ key: 0,
59
+ innerHTML: html.value
60
+ }, null, 8, _hoisted_2)) : createCommentVNode("", true)
61
+ ], 6));
62
+ };
63
+ }
64
+ });
65
+ export {
66
+ _sfc_main as default
67
+ };
@@ -0,0 +1,20 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode("._katex_vrtkg_1{margin-block:var(--margin-block);color:#000000b3}._katex_vrtkg_1::-moz-selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}._katex_vrtkg_1::selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}[data-theme=dark] ._katex_vrtkg_1{color:#ffffffb3;color:var(--color, rgba(255, 255, 255, .7))}[data-theme=dark] ._katex_vrtkg_1::-moz-selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}[data-theme=dark] ._katex_vrtkg_1::selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ const katex = "_katex_vrtkg_1";
14
+ const style0 = {
15
+ katex
16
+ };
17
+ export {
18
+ style0 as default,
19
+ katex
20
+ };
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as ElmShikiHighlighter } from './ElmShikiHighlighter.vue';
3
+ declare const meta: Meta<typeof ElmShikiHighlighter>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
@@ -0,0 +1,22 @@
1
+ export interface ElmShikiHighlighterProps {
2
+ /**
3
+ * The code to display.
4
+ */
5
+ code: string;
6
+ /**
7
+ * The language of the code.
8
+ */
9
+ language?: string;
10
+ }
11
+ type __VLS_Props = ElmShikiHighlighterProps;
12
+ type __VLS_PublicProps = {
13
+ modelValue?: boolean;
14
+ } & __VLS_Props;
15
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ "update:modelValue": (value: boolean) => any;
17
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
19
+ }>, {
20
+ language: string;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
22
+ export default _default;
@@ -0,0 +1,23 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode(".shiki,.shiki span{font-family:Source Code Pro,Menlo,Consolas,DejaVu Sans Mono,monospace!important}.shiki *::-moz-selection,.shiki span *::-moz-selection{background-color:#0000001a}.shiki *::selection,.shiki span *::selection{background-color:#0000001a}[data-theme=dark] .shiki *::-moz-selection,[data-theme=dark] .shiki span *::-moz-selection{background-color:#ffffff26}[data-theme=dark] .shiki *::selection,[data-theme=dark] .shiki span *::selection{background-color:#ffffff26}[data-theme=dark] .shiki,[data-theme=dark] .shiki span{color:var(--shiki-dark)!important;background-color:var(--shiki-dark-bg)!important}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ import _sfc_main from "./ElmShikiHighlighter.vue2.mjs";
14
+ import style0 from "./ElmShikiHighlighter.vue3.mjs";
15
+
16
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
17
+ const cssModules = {
18
+ "$style": style0
19
+ };
20
+ const ElmShikiHighlighter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
21
+ export {
22
+ ElmShikiHighlighter as default
23
+ };