@fluxdown/vue-lynx-plugins 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/LICENSE +21 -0
  3. package/README.md +4 -2
  4. package/dist/esm/base/components/animated-text/animation.d.ts +6 -0
  5. package/dist/esm/base/components/animated-text/animation.js +67 -0
  6. package/dist/esm/base/components/animated-text/index.d.ts +16 -0
  7. package/dist/esm/base/components/animated-text/index.js +86 -0
  8. package/dist/esm/base/components/index.d.ts +1 -0
  9. package/dist/esm/base/components/index.js +3 -0
  10. package/dist/esm/base/consts/defaults.d.ts +1 -0
  11. package/dist/esm/base/consts/defaults.js +3 -0
  12. package/dist/esm/base/consts/index.d.ts +1 -0
  13. package/dist/esm/base/consts/index.js +3 -0
  14. package/dist/esm/base/context/index.d.ts +2 -0
  15. package/dist/esm/base/context/index.js +5 -0
  16. package/dist/esm/base/context/text-animation/index.d.ts +14 -0
  17. package/dist/esm/base/context/text-animation/index.js +22 -0
  18. package/dist/esm/base/context/text-animation/type.d.ts +4 -0
  19. package/dist/esm/base/context/text-animation/type.js +2 -0
  20. package/dist/esm/base/context/text-layout-width/index.d.ts +11 -0
  21. package/dist/esm/base/context/text-layout-width/index.js +20 -0
  22. package/dist/esm/base/index.d.ts +6 -0
  23. package/dist/esm/base/index.js +13 -0
  24. package/dist/esm/base/render/index.d.ts +2 -0
  25. package/dist/esm/base/render/index.js +5 -0
  26. package/dist/esm/base/render/layout.d.ts +9 -0
  27. package/dist/esm/base/render/layout.js +111 -0
  28. package/dist/esm/base/render/props.d.ts +3 -0
  29. package/dist/esm/base/render/props.js +43 -0
  30. package/dist/esm/base/slot/base.d.ts +5 -0
  31. package/dist/esm/base/slot/base.js +8 -0
  32. package/dist/esm/base/slot/index.d.ts +3 -0
  33. package/dist/esm/base/slot/index.js +7 -0
  34. package/dist/esm/base/slot/type.d.ts +92 -0
  35. package/dist/esm/base/slot/type.js +2 -0
  36. package/dist/esm/base/slot/utils/create.d.ts +3 -0
  37. package/dist/esm/base/slot/utils/create.js +7 -0
  38. package/dist/esm/base/slot/utils/index.d.ts +3 -0
  39. package/dist/esm/base/slot/utils/index.js +7 -0
  40. package/dist/esm/base/slot/utils/style.d.ts +1 -0
  41. package/dist/esm/base/slot/utils/style.js +3 -0
  42. package/dist/esm/base/slot/utils/url.d.ts +4 -0
  43. package/dist/esm/base/slot/utils/url.js +21 -0
  44. package/dist/esm/base/theme/index.d.ts +25 -0
  45. package/dist/esm/base/theme/index.js +78 -0
  46. package/dist/esm/base/theme/presets/base.d.ts +2 -0
  47. package/dist/esm/base/theme/presets/base.js +117 -0
  48. package/dist/esm/base/theme/presets/dark.d.ts +2 -0
  49. package/dist/esm/base/theme/presets/dark.js +33 -0
  50. package/dist/esm/base/theme/presets/index.d.ts +4 -0
  51. package/dist/esm/base/theme/presets/index.js +13 -0
  52. package/dist/esm/base/theme/presets/light.d.ts +2 -0
  53. package/dist/esm/base/theme/presets/light.js +33 -0
  54. package/dist/esm/base/theme/type.d.ts +141 -0
  55. package/dist/esm/base/theme/type.js +2 -0
  56. package/dist/esm/base/theme/utils.d.ts +4 -0
  57. package/dist/esm/base/theme/utils.js +38 -0
  58. package/dist/esm/env.d.ts +1 -0
  59. package/dist/esm/jsx-runtime.d.ts +27 -0
  60. package/dist/esm/jsx-runtime.js +6 -0
  61. package/dist/esm/plugins/blockquote/index.d.ts +2 -0
  62. package/dist/esm/plugins/blockquote/index.js +19 -0
  63. package/dist/esm/plugins/blockquote/slot/blockquote/index.d.ts +13 -0
  64. package/dist/esm/plugins/blockquote/slot/blockquote/index.js +14 -0
  65. package/dist/esm/plugins/blockquote/slot/blockquote/renderer/index.d.ts +5 -0
  66. package/dist/esm/plugins/blockquote/slot/blockquote/renderer/index.js +38 -0
  67. package/dist/esm/plugins/blockquote/slot/index.d.ts +1 -0
  68. package/dist/esm/plugins/blockquote/slot/index.js +3 -0
  69. package/dist/esm/plugins/break-line/index.d.ts +2 -0
  70. package/dist/esm/plugins/break-line/index.js +19 -0
  71. package/dist/esm/plugins/break-line/slot/break-line/index.d.ts +13 -0
  72. package/dist/esm/plugins/break-line/slot/break-line/index.js +14 -0
  73. package/dist/esm/plugins/break-line/slot/break-line/renderer/index.d.ts +5 -0
  74. package/dist/esm/plugins/break-line/slot/break-line/renderer/index.js +18 -0
  75. package/dist/esm/plugins/break-line/slot/index.d.ts +1 -0
  76. package/dist/esm/plugins/break-line/slot/index.js +3 -0
  77. package/dist/esm/plugins/code/index.d.ts +4 -0
  78. package/dist/esm/plugins/code/index.js +23 -0
  79. package/dist/esm/plugins/code/render/code/index.d.ts +13 -0
  80. package/dist/esm/plugins/code/render/code/index.js +45 -0
  81. package/dist/esm/plugins/code/render/code/utils.d.ts +7 -0
  82. package/dist/esm/plugins/code/render/code/utils.js +61 -0
  83. package/dist/esm/plugins/code/render/index.d.ts +1 -0
  84. package/dist/esm/plugins/code/render/index.js +3 -0
  85. package/dist/esm/plugins/code/slot/code-block/index.d.ts +13 -0
  86. package/dist/esm/plugins/code/slot/code-block/index.js +14 -0
  87. package/dist/esm/plugins/code/slot/code-block/renderer/index.d.ts +5 -0
  88. package/dist/esm/plugins/code/slot/code-block/renderer/index.js +43 -0
  89. package/dist/esm/plugins/code/slot/code-header/index.d.ts +24 -0
  90. package/dist/esm/plugins/code/slot/code-header/index.js +14 -0
  91. package/dist/esm/plugins/code/slot/code-header/renderer/index.d.ts +13 -0
  92. package/dist/esm/plugins/code/slot/code-header/renderer/index.js +122 -0
  93. package/dist/esm/plugins/code/slot/code-highlighter/index.d.ts +14 -0
  94. package/dist/esm/plugins/code/slot/code-highlighter/index.js +16 -0
  95. package/dist/esm/plugins/code/slot/code-highlighter/renderer/index.d.ts +9 -0
  96. package/dist/esm/plugins/code/slot/code-highlighter/renderer/index.js +61 -0
  97. package/dist/esm/plugins/code/slot/code-highlighter/renderer/style.css +4 -0
  98. package/dist/esm/plugins/code/slot/index.d.ts +3 -0
  99. package/dist/esm/plugins/code/slot/index.js +7 -0
  100. package/dist/esm/plugins/code-prism/index.d.ts +3 -0
  101. package/dist/esm/plugins/code-prism/index.js +19 -0
  102. package/dist/esm/plugins/code-prism/slot/code-prism/index.d.ts +16 -0
  103. package/dist/esm/plugins/code-prism/slot/code-prism/index.js +14 -0
  104. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/hooks.d.ts +5 -0
  105. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/hooks.js +36 -0
  106. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/index.d.ts +5 -0
  107. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/index.js +64 -0
  108. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/languages.d.ts +298 -0
  109. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/languages.js +899 -0
  110. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/runtime.d.ts +2 -0
  111. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/runtime.js +11 -0
  112. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/utils.d.ts +9 -0
  113. package/dist/esm/plugins/code-prism/slot/code-prism/renderer/utils.js +98 -0
  114. package/dist/esm/plugins/code-prism/slot/index.d.ts +1 -0
  115. package/dist/esm/plugins/code-prism/slot/index.js +3 -0
  116. package/dist/esm/plugins/code-shiki/index.d.ts +3 -0
  117. package/dist/esm/plugins/code-shiki/index.js +19 -0
  118. package/dist/esm/plugins/code-shiki/slot/code-shiki/index.d.ts +16 -0
  119. package/dist/esm/plugins/code-shiki/slot/code-shiki/index.js +14 -0
  120. package/dist/esm/plugins/code-shiki/slot/code-shiki/renderer/hooks.d.ts +2 -0
  121. package/dist/esm/plugins/code-shiki/slot/code-shiki/renderer/hooks.js +22 -0
  122. package/dist/esm/plugins/code-shiki/slot/code-shiki/renderer/index.d.ts +5 -0
  123. package/dist/esm/plugins/code-shiki/slot/code-shiki/renderer/index.js +80 -0
  124. package/dist/esm/plugins/code-shiki/slot/code-shiki/renderer/utils.d.ts +5 -0
  125. package/dist/esm/plugins/code-shiki/slot/code-shiki/renderer/utils.js +142 -0
  126. package/dist/esm/plugins/code-shiki/slot/index.d.ts +1 -0
  127. package/dist/esm/plugins/code-shiki/slot/index.js +3 -0
  128. package/dist/esm/plugins/effect-chunk/index.d.ts +2 -0
  129. package/dist/esm/plugins/effect-chunk/index.js +19 -0
  130. package/dist/esm/plugins/effect-chunk/slot/effect-chunk/index.d.ts +17 -0
  131. package/dist/esm/plugins/effect-chunk/slot/effect-chunk/index.js +16 -0
  132. package/dist/esm/plugins/effect-chunk/slot/effect-chunk/renderer/index.d.ts +10 -0
  133. package/dist/esm/plugins/effect-chunk/slot/effect-chunk/renderer/index.js +54 -0
  134. package/dist/esm/plugins/effect-chunk/slot/effect-chunk/renderer/style.css +6 -0
  135. package/dist/esm/plugins/effect-chunk/slot/index.d.ts +1 -0
  136. package/dist/esm/plugins/effect-chunk/slot/index.js +3 -0
  137. package/dist/esm/plugins/effect-scale/index.d.ts +4 -0
  138. package/dist/esm/plugins/effect-scale/index.js +22 -0
  139. package/dist/esm/plugins/effect-scale/render/effect-scale/index.d.ts +13 -0
  140. package/dist/esm/plugins/effect-scale/render/effect-scale/index.js +48 -0
  141. package/dist/esm/plugins/effect-scale/render/effect-scale/utils.d.ts +8 -0
  142. package/dist/esm/plugins/effect-scale/render/effect-scale/utils.js +27 -0
  143. package/dist/esm/plugins/effect-scale/render/index.d.ts +1 -0
  144. package/dist/esm/plugins/effect-scale/render/index.js +3 -0
  145. package/dist/esm/plugins/effect-scale/slot/effect-scale/index.d.ts +17 -0
  146. package/dist/esm/plugins/effect-scale/slot/effect-scale/index.js +16 -0
  147. package/dist/esm/plugins/effect-scale/slot/effect-scale/renderer/animation.d.ts +12 -0
  148. package/dist/esm/plugins/effect-scale/slot/effect-scale/renderer/animation.js +123 -0
  149. package/dist/esm/plugins/effect-scale/slot/effect-scale/renderer/index.d.ts +10 -0
  150. package/dist/esm/plugins/effect-scale/slot/effect-scale/renderer/index.js +82 -0
  151. package/dist/esm/plugins/effect-scale/slot/effect-scale/renderer/style.css +16 -0
  152. package/dist/esm/plugins/effect-scale/slot/effect-scale-word/index.d.ts +14 -0
  153. package/dist/esm/plugins/effect-scale/slot/effect-scale-word/index.js +16 -0
  154. package/dist/esm/plugins/effect-scale/slot/effect-scale-word/renderer/index.d.ts +8 -0
  155. package/dist/esm/plugins/effect-scale/slot/effect-scale-word/renderer/index.js +35 -0
  156. package/dist/esm/plugins/effect-scale/slot/index.d.ts +2 -0
  157. package/dist/esm/plugins/effect-scale/slot/index.js +5 -0
  158. package/dist/esm/plugins/effect-shad/index.d.ts +4 -0
  159. package/dist/esm/plugins/effect-shad/index.js +21 -0
  160. package/dist/esm/plugins/effect-shad/render/effect-shad/index.d.ts +13 -0
  161. package/dist/esm/plugins/effect-shad/render/effect-shad/index.js +36 -0
  162. package/dist/esm/plugins/effect-shad/render/effect-shad/utils.d.ts +5 -0
  163. package/dist/esm/plugins/effect-shad/render/effect-shad/utils.js +21 -0
  164. package/dist/esm/plugins/effect-shad/render/index.d.ts +1 -0
  165. package/dist/esm/plugins/effect-shad/render/index.js +3 -0
  166. package/dist/esm/plugins/effect-shad/slot/effect-shad/index.d.ts +17 -0
  167. package/dist/esm/plugins/effect-shad/slot/effect-shad/index.js +16 -0
  168. package/dist/esm/plugins/effect-shad/slot/effect-shad/renderer/index.d.ts +10 -0
  169. package/dist/esm/plugins/effect-shad/slot/effect-shad/renderer/index.js +193 -0
  170. package/dist/esm/plugins/effect-shad/slot/effect-shad/renderer/style.css +19 -0
  171. package/dist/esm/plugins/effect-shad/slot/effect-shad/renderer/utils.d.ts +23 -0
  172. package/dist/esm/plugins/effect-shad/slot/effect-shad/renderer/utils.js +137 -0
  173. package/dist/esm/plugins/effect-shad/slot/index.d.ts +1 -0
  174. package/dist/esm/plugins/effect-shad/slot/index.js +3 -0
  175. package/dist/esm/plugins/effect-suffix/index.d.ts +2 -0
  176. package/dist/esm/plugins/effect-suffix/index.js +19 -0
  177. package/dist/esm/plugins/effect-suffix/slot/effect-suffix/index.d.ts +14 -0
  178. package/dist/esm/plugins/effect-suffix/slot/effect-suffix/index.js +16 -0
  179. package/dist/esm/plugins/effect-suffix/slot/effect-suffix/renderer/index.d.ts +9 -0
  180. package/dist/esm/plugins/effect-suffix/slot/effect-suffix/renderer/index.js +62 -0
  181. package/dist/esm/plugins/effect-suffix/slot/effect-suffix/renderer/style.css +63 -0
  182. package/dist/esm/plugins/effect-suffix/slot/effect-suffix/renderer/utils.d.ts +17 -0
  183. package/dist/esm/plugins/effect-suffix/slot/effect-suffix/renderer/utils.js +36 -0
  184. package/dist/esm/plugins/effect-suffix/slot/index.d.ts +1 -0
  185. package/dist/esm/plugins/effect-suffix/slot/index.js +3 -0
  186. package/dist/esm/plugins/emphasis/index.d.ts +2 -0
  187. package/dist/esm/plugins/emphasis/index.js +19 -0
  188. package/dist/esm/plugins/emphasis/slot/emphasis/index.d.ts +13 -0
  189. package/dist/esm/plugins/emphasis/slot/emphasis/index.js +14 -0
  190. package/dist/esm/plugins/emphasis/slot/emphasis/renderer/index.d.ts +5 -0
  191. package/dist/esm/plugins/emphasis/slot/emphasis/renderer/index.js +33 -0
  192. package/dist/esm/plugins/emphasis/slot/index.d.ts +1 -0
  193. package/dist/esm/plugins/emphasis/slot/index.js +3 -0
  194. package/dist/esm/plugins/fallback/index.d.ts +4 -0
  195. package/dist/esm/plugins/fallback/index.js +21 -0
  196. package/dist/esm/plugins/fallback/render/fallback/index.d.ts +18 -0
  197. package/dist/esm/plugins/fallback/render/fallback/index.js +61 -0
  198. package/dist/esm/plugins/fallback/render/index.d.ts +1 -0
  199. package/dist/esm/plugins/fallback/render/index.js +3 -0
  200. package/dist/esm/plugins/fallback/slot/element/index.d.ts +13 -0
  201. package/dist/esm/plugins/fallback/slot/element/index.js +14 -0
  202. package/dist/esm/plugins/fallback/slot/element/renderer/index.d.ts +5 -0
  203. package/dist/esm/plugins/fallback/slot/element/renderer/index.js +305 -0
  204. package/dist/esm/plugins/fallback/slot/index.d.ts +1 -0
  205. package/dist/esm/plugins/fallback/slot/index.js +3 -0
  206. package/dist/esm/plugins/heading/index.d.ts +2 -0
  207. package/dist/esm/plugins/heading/index.js +19 -0
  208. package/dist/esm/plugins/heading/slot/heading/index.d.ts +13 -0
  209. package/dist/esm/plugins/heading/slot/heading/index.js +14 -0
  210. package/dist/esm/plugins/heading/slot/heading/renderer/index.d.ts +5 -0
  211. package/dist/esm/plugins/heading/slot/heading/renderer/index.js +44 -0
  212. package/dist/esm/plugins/heading/slot/index.d.ts +1 -0
  213. package/dist/esm/plugins/heading/slot/index.js +3 -0
  214. package/dist/esm/plugins/image/index.d.ts +2 -0
  215. package/dist/esm/plugins/image/index.js +19 -0
  216. package/dist/esm/plugins/image/slot/image/index.d.ts +13 -0
  217. package/dist/esm/plugins/image/slot/image/index.js +14 -0
  218. package/dist/esm/plugins/image/slot/image/renderer/index.d.ts +5 -0
  219. package/dist/esm/plugins/image/slot/image/renderer/index.js +48 -0
  220. package/dist/esm/plugins/image/slot/index.d.ts +1 -0
  221. package/dist/esm/plugins/image/slot/index.js +3 -0
  222. package/dist/esm/plugins/link/index.d.ts +2 -0
  223. package/dist/esm/plugins/link/index.js +19 -0
  224. package/dist/esm/plugins/link/slot/index.d.ts +1 -0
  225. package/dist/esm/plugins/link/slot/index.js +3 -0
  226. package/dist/esm/plugins/link/slot/link/index.d.ts +13 -0
  227. package/dist/esm/plugins/link/slot/link/index.js +14 -0
  228. package/dist/esm/plugins/link/slot/link/renderer/index.d.ts +5 -0
  229. package/dist/esm/plugins/link/slot/link/renderer/index.js +43 -0
  230. package/dist/esm/plugins/list/index.d.ts +2 -0
  231. package/dist/esm/plugins/list/index.js +19 -0
  232. package/dist/esm/plugins/list/slot/index.d.ts +1 -0
  233. package/dist/esm/plugins/list/slot/index.js +3 -0
  234. package/dist/esm/plugins/list/slot/list/index.d.ts +13 -0
  235. package/dist/esm/plugins/list/slot/list/index.js +14 -0
  236. package/dist/esm/plugins/list/slot/list/renderer/index.d.ts +5 -0
  237. package/dist/esm/plugins/list/slot/list/renderer/index.js +26 -0
  238. package/dist/esm/plugins/paragraph/index.d.ts +2 -0
  239. package/dist/esm/plugins/paragraph/index.js +19 -0
  240. package/dist/esm/plugins/paragraph/slot/index.d.ts +1 -0
  241. package/dist/esm/plugins/paragraph/slot/index.js +3 -0
  242. package/dist/esm/plugins/paragraph/slot/paragraph/index.d.ts +13 -0
  243. package/dist/esm/plugins/paragraph/slot/paragraph/index.js +14 -0
  244. package/dist/esm/plugins/paragraph/slot/paragraph/renderer/index.d.ts +5 -0
  245. package/dist/esm/plugins/paragraph/slot/paragraph/renderer/index.js +29 -0
  246. package/dist/esm/plugins/strong/index.d.ts +2 -0
  247. package/dist/esm/plugins/strong/index.js +19 -0
  248. package/dist/esm/plugins/strong/slot/index.d.ts +1 -0
  249. package/dist/esm/plugins/strong/slot/index.js +3 -0
  250. package/dist/esm/plugins/strong/slot/strong/index.d.ts +13 -0
  251. package/dist/esm/plugins/strong/slot/strong/index.js +14 -0
  252. package/dist/esm/plugins/strong/slot/strong/renderer/index.d.ts +5 -0
  253. package/dist/esm/plugins/strong/slot/strong/renderer/index.js +34 -0
  254. package/dist/esm/plugins/table/index.d.ts +4 -0
  255. package/dist/esm/plugins/table/index.js +23 -0
  256. package/dist/esm/plugins/table/render/index.d.ts +2 -0
  257. package/dist/esm/plugins/table/render/index.js +5 -0
  258. package/dist/esm/plugins/table/render/table/index.d.ts +13 -0
  259. package/dist/esm/plugins/table/render/table/index.js +64 -0
  260. package/dist/esm/plugins/table/render/table-cell/index.d.ts +13 -0
  261. package/dist/esm/plugins/table/render/table-cell/index.js +45 -0
  262. package/dist/esm/plugins/table/slot/index.d.ts +2 -0
  263. package/dist/esm/plugins/table/slot/index.js +5 -0
  264. package/dist/esm/plugins/table/slot/table/index.d.ts +13 -0
  265. package/dist/esm/plugins/table/slot/table/index.js +14 -0
  266. package/dist/esm/plugins/table/slot/table/renderer/index.d.ts +6 -0
  267. package/dist/esm/plugins/table/slot/table/renderer/index.js +38 -0
  268. package/dist/esm/plugins/table/slot/table/renderer/style.css +11 -0
  269. package/dist/esm/plugins/table/slot/table-cell/index.d.ts +13 -0
  270. package/dist/esm/plugins/table/slot/table-cell/index.js +14 -0
  271. package/dist/esm/plugins/table/slot/table-cell/renderer/index.d.ts +5 -0
  272. package/dist/esm/plugins/table/slot/table-cell/renderer/index.js +52 -0
  273. package/dist/esm/plugins/tex/index.d.ts +2 -0
  274. package/dist/esm/plugins/tex/index.js +19 -0
  275. package/dist/esm/plugins/tex/slot/index.d.ts +1 -0
  276. package/dist/esm/plugins/tex/slot/index.js +3 -0
  277. package/dist/esm/plugins/tex/slot/tex/index.d.ts +14 -0
  278. package/dist/esm/plugins/tex/slot/tex/index.js +16 -0
  279. package/dist/esm/plugins/tex/slot/tex/renderer/index.d.ts +5 -0
  280. package/dist/esm/plugins/tex/slot/tex/renderer/index.js +36 -0
  281. package/dist/esm/plugins/tex-mathjax/index.d.ts +3 -0
  282. package/dist/esm/plugins/tex-mathjax/index.js +19 -0
  283. package/dist/esm/plugins/tex-mathjax/slot/index.d.ts +1 -0
  284. package/dist/esm/plugins/tex-mathjax/slot/index.js +3 -0
  285. package/dist/esm/plugins/tex-mathjax/slot/tex-mathjax/index.d.ts +14 -0
  286. package/dist/esm/plugins/tex-mathjax/slot/tex-mathjax/index.js +16 -0
  287. package/dist/esm/plugins/tex-mathjax/slot/tex-mathjax/renderer/index.d.ts +5 -0
  288. package/dist/esm/plugins/tex-mathjax/slot/tex-mathjax/renderer/index.js +55 -0
  289. package/dist/esm/plugins/tex-mathjax/slot/tex-mathjax/renderer/utils.d.ts +35 -0
  290. package/dist/esm/plugins/tex-mathjax/slot/tex-mathjax/renderer/utils.js +197 -0
  291. package/dist/esm/presets/full/index.d.ts +2 -0
  292. package/dist/esm/presets/full/index.js +85 -0
  293. package/dist/esm/presets/lite/index.d.ts +2 -0
  294. package/dist/esm/presets/lite/index.js +77 -0
  295. package/dist/esm/typings/index.d.ts +2 -0
  296. package/dist/esm/typings/index.js +7 -0
  297. package/dist/esm/typings/plugins/index.d.ts +1 -0
  298. package/dist/esm/typings/plugins/index.js +5 -0
  299. package/dist/esm/typings/plugins/plugins.d.ts +20 -0
  300. package/package.json +88 -3
@@ -0,0 +1,13 @@
1
+ import type { IPluggableConfig } from '@fluxdown/types';
2
+ import { BaseSlotPlugin } from '../../../../base/index.js';
3
+ import { EmphasisRenderer } from './renderer/index.js';
4
+ declare global {
5
+ interface VueSlotConfigs {
6
+ 'slot-emphasis': IPluggableConfig<void>;
7
+ }
8
+ }
9
+ export declare class EmphasisSlotPlugin extends BaseSlotPlugin<'Emphasis'> {
10
+ static readonly key = "slot-emphasis";
11
+ readonly Component: typeof EmphasisRenderer;
12
+ readonly type = "Emphasis";
13
+ }
@@ -0,0 +1,14 @@
1
+ import { BaseSlotPlugin } from "../../../../base/index.js";
2
+ import { EmphasisRenderer } from "./renderer/index.js";
3
+
4
+
5
+
6
+
7
+
8
+ class EmphasisSlotPlugin extends BaseSlotPlugin {
9
+ static key = 'slot-emphasis';
10
+ Component = EmphasisRenderer;
11
+ type = 'Emphasis';
12
+ }
13
+
14
+ export { EmphasisSlotPlugin };
@@ -0,0 +1,5 @@
1
+ import type { EmphasisProps } from '../../../../../base/index.js';
2
+ export declare function EmphasisRenderer({ Raw: _Raw, children, class: className, current: _current, parents: _parents, render: _render, style, ...elementProps }: EmphasisProps): import("../../../../../jsx-runtime.js").JSX.Element;
3
+ export declare namespace EmphasisRenderer {
4
+ var inheritAttrs: boolean;
5
+ }
@@ -0,0 +1,33 @@
1
+ import { createVNode, isVNode, mergeProps } from "vue";
2
+ import { AnimatedText, TextStyleProvider, joinClassNames, useTextStyle } from "../../../../../base/index.js";
3
+
4
+
5
+
6
+
7
+
8
+ function _isSlot(s) {
9
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
10
+ }
11
+ const EmphasisRenderer = ({ Raw: _Raw, children, class: className, current: _current, parents: _parents, render: _render, style, ...elementProps })=>{
12
+ const textStyle = useTextStyle({
13
+ fontStyle: 'italic',
14
+ ...style
15
+ });
16
+ return createVNode(TextStyleProvider, {
17
+ "value": textStyle
18
+ }, {
19
+ default: ()=>[
20
+ createVNode(AnimatedText, mergeProps(elementProps, {
21
+ "class": joinClassNames('fluxdown-emphasis', className),
22
+ "style": textStyle
23
+ }), _isSlot(children) ? children : {
24
+ default: ()=>[
25
+ children
26
+ ]
27
+ })
28
+ ]
29
+ });
30
+ };
31
+ EmphasisRenderer.inheritAttrs = false;
32
+
33
+ export { EmphasisRenderer };
@@ -0,0 +1 @@
1
+ export * from './emphasis/index.js';
@@ -0,0 +1,3 @@
1
+ export * from "./emphasis/index.js";
2
+
3
+
@@ -0,0 +1,4 @@
1
+ import type { IPluginItem } from '@fluxdown/vue-base-plugins/typings';
2
+ export * from './render/index.js';
3
+ export * from './slot/index.js';
4
+ export declare const FallbackPlugin: IPluginItem;
@@ -0,0 +1,21 @@
1
+ import { FallbackRenderPlugin } from "./render/index.js";
2
+ import { ElementSlotPlugin } from "./slot/index.js";
3
+
4
+ export * from "./render/index.js";
5
+ export * from "./slot/index.js";
6
+
7
+
8
+
9
+
10
+
11
+
12
+ const FallbackPlugin = {
13
+ renders: [
14
+ FallbackRenderPlugin
15
+ ],
16
+ slots: [
17
+ ElementSlotPlugin
18
+ ]
19
+ };
20
+
21
+ export { FallbackPlugin };
@@ -0,0 +1,18 @@
1
+ import type { IPluggableConfig } from '@fluxdown/types';
2
+ import type { VueRenderMatchParams, VueRenderParams } from '@fluxdown/vue-base-plugins/base';
3
+ import { BaseVueRenderPlugin } from '@fluxdown/vue-base-plugins/base';
4
+ declare global {
5
+ interface VueRenderConfigs {
6
+ 'render-fallback': IPluggableConfig<void>;
7
+ }
8
+ }
9
+ export declare class FallbackRenderPlugin extends BaseVueRenderPlugin {
10
+ static readonly key = "render-fallback";
11
+ readonly config: {
12
+ priority: number;
13
+ };
14
+ match(_params: VueRenderMatchParams): boolean;
15
+ render({ getProps, node, parents, render, renderChildren }: VueRenderParams): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
+ [key: string]: any;
17
+ }> | null;
18
+ }
@@ -0,0 +1,61 @@
1
+ import { BaseVueRenderPlugin, isHastElement } from "@fluxdown/vue-base-plugins/base";
2
+ import { h } from "vue";
3
+ import { createTypeOfSlot } from "../../../../base/index.js";
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ const Element = /*#__PURE__*/ createTypeOfSlot('Element');
12
+ class FallbackRenderPlugin extends BaseVueRenderPlugin {
13
+ static key = 'render-fallback';
14
+ config = {
15
+ priority: Infinity
16
+ };
17
+ match(_params) {
18
+ return true;
19
+ }
20
+ render({ getProps, node, parents, render, renderChildren }) {
21
+ if (node.type === 'text') {
22
+ const parent = parents.at(-1);
23
+ const inline = parent && isHastElement(parent) && [
24
+ 'p',
25
+ 'h1',
26
+ 'h2',
27
+ 'h3',
28
+ 'h4',
29
+ 'h5',
30
+ 'h6',
31
+ 'li',
32
+ 'td',
33
+ 'th',
34
+ 'span',
35
+ 'a',
36
+ 'strong',
37
+ 'em',
38
+ 'code',
39
+ 'del'
40
+ ].includes(parent.tagName);
41
+ if (inline) {
42
+ return node.value;
43
+ }
44
+ return node.value.trim() ? h('text', null, node.value) : null;
45
+ }
46
+ if (node.type !== 'element') {
47
+ return null;
48
+ }
49
+ return h(Element, {
50
+ ...getProps(node),
51
+ current: node,
52
+ parents,
53
+ render,
54
+ tagName: node.tagName
55
+ }, {
56
+ default: ()=>renderChildren(node)
57
+ });
58
+ }
59
+ }
60
+
61
+ export { FallbackRenderPlugin };
@@ -0,0 +1 @@
1
+ export * from './fallback/index.js';
@@ -0,0 +1,3 @@
1
+ export * from "./fallback/index.js";
2
+
3
+
@@ -0,0 +1,13 @@
1
+ import type { IPluggableConfig } from '@fluxdown/types';
2
+ import { BaseSlotPlugin } from '../../../../base/index.js';
3
+ import { ElementRenderer } from './renderer/index.js';
4
+ declare global {
5
+ interface VueSlotConfigs {
6
+ 'slot-element': IPluggableConfig<void>;
7
+ }
8
+ }
9
+ export declare class ElementSlotPlugin extends BaseSlotPlugin<'Element'> {
10
+ static readonly key = "slot-element";
11
+ readonly Component: typeof ElementRenderer;
12
+ readonly type = "Element";
13
+ }
@@ -0,0 +1,14 @@
1
+ import { BaseSlotPlugin } from "../../../../base/index.js";
2
+ import { ElementRenderer } from "./renderer/index.js";
3
+
4
+
5
+
6
+
7
+
8
+ class ElementSlotPlugin extends BaseSlotPlugin {
9
+ static key = 'slot-element';
10
+ Component = ElementRenderer;
11
+ type = 'Element';
12
+ }
13
+
14
+ export { ElementSlotPlugin };
@@ -0,0 +1,5 @@
1
+ import type { ElementProps } from '../../../../../base/index.js';
2
+ export declare function ElementRenderer({ Raw: _Raw, checked: _checked, children, class: className, columns: _columns, current, parents, render: _render, start: _start, style, tagName, ...elementProps }: ElementProps): import("../../../../../jsx-runtime.js").JSX.Element | null;
3
+ export declare namespace ElementRenderer {
4
+ var inheritAttrs: boolean;
5
+ }
@@ -0,0 +1,305 @@
1
+ import { Text, createVNode, isVNode, mergeProps } from "vue";
2
+ import { isElementWithTag, isHastElement } from "@fluxdown/vue-base-plugins/base";
3
+ import { AnimatedText, TextStyleProvider, isBlockElement, joinClassNames, mapTokensToStyles, useBlockStyle, useTextStyle, useTheme } from "../../../../../base/index.js";
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ function _isSlot(s) {
13
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
14
+ }
15
+ const getFontSize = (size, parentSize)=>/^\d*\.?\d+em$/.test(size) && typeof parentSize === 'string' && parentSize.endsWith('px') ? `${parseFloat(size) * parseFloat(parentSize)}px` : size;
16
+ const getInlineCodeStyle = (tokens, parentSize)=>{
17
+ const variables = mapTokensToStyles(tokens);
18
+ const resolve = (value)=>value.replace(/var\((--[\w-]+)\)/g, (reference, name)=>String(variables[name] ?? reference));
19
+ const fontSize = getFontSize(resolve(tokens.inlineCode.fontSize), parentSize);
20
+ return {
21
+ fontFamily: resolve(tokens.inlineCode.fontFamily),
22
+ fontSize,
23
+ background: resolve(tokens.inlineCode.background),
24
+ border: resolve(tokens.inlineCode.border),
25
+ borderRadius: resolve(tokens.inlineCode.borderRadius),
26
+ padding: `${getFontSize(resolve(tokens.inlineCode.paddingBlock), fontSize)} ${getFontSize(resolve(tokens.inlineCode.paddingInline), fontSize)}`,
27
+ whiteSpace: tokens.inlineCode.whiteSpace === 'nowrap' ? 'nowrap' : 'normal'
28
+ };
29
+ };
30
+ const getLineHeight = ({ fontSize, lineHeight })=>{
31
+ if (!/^\d+(?:\.\d+)?(?:px)?$/.test(String(fontSize))) return Number.NaN;
32
+ const size = parseFloat(String(fontSize));
33
+ return typeof lineHeight === 'string' && lineHeight.endsWith('px') ? parseFloat(lineHeight) : size * Number(lineHeight);
34
+ };
35
+ const getInlineBoxMargin = (inline, parent)=>{
36
+ const padding = String(inline.padding).split(/\s+/);
37
+ const lengths = [
38
+ padding[0] ?? '0',
39
+ padding[2] ?? padding[0] ?? '0',
40
+ inline.border === 'none' ? '0' : String(inline.border).split(/\s+/)[0]
41
+ ];
42
+ if (!lengths.every((length)=>/^\d+(?:\.\d+)?(?:px)?$/.test(length))) return undefined;
43
+ const [top, bottom, border] = lengths.map(parseFloat);
44
+ const excess = getLineHeight(inline) + top + bottom + 2 * border - getLineHeight(parent); // Inline padding paints outside a Web line box. Native attachments include
45
+ // their box in line height, so remove only the excess over the parent line.
46
+ return Number.isFinite(excess) ? `${-Math.max(0, excess)}px` : undefined;
47
+ };
48
+ const ElementRenderer = ({ Raw: _Raw, checked: _checked, children, class: className, columns: _columns, current, parents, render: _render, start: _start, style, tagName, ...elementProps })=>{
49
+ const { tokens } = useTheme();
50
+ const blockStyle = useBlockStyle(current, parents);
51
+ const textStyle = useTextStyle(style);
52
+ if ([
53
+ 'script',
54
+ 'style',
55
+ 'iframe',
56
+ 'object',
57
+ 'embed',
58
+ 'input',
59
+ 'meta',
60
+ 'link'
61
+ ].includes(tagName)) {
62
+ return null;
63
+ }
64
+ if (tagName === 'hr') {
65
+ return createVNode("view", mergeProps(elementProps, {
66
+ "class": joinClassNames('fluxdown-divider', className),
67
+ "style": {
68
+ ...blockStyle,
69
+ height: tokens.divider.height,
70
+ marginLeft: tokens.divider.marginInline,
71
+ marginRight: tokens.divider.marginInline,
72
+ border: tokens.divider.border,
73
+ borderBottom: tokens.divider.borderBlockEnd,
74
+ background: tokens.divider.background,
75
+ ...style
76
+ }
77
+ }), null);
78
+ }
79
+ if (tagName === 'li' && current.type === 'element') {
80
+ const parent = parents.at(-1);
81
+ const ordered = parent && isHastElement(parent) && parent.tagName === 'ol';
82
+ const siblings = parent?.children.filter((child)=>child.type === 'element') ?? [];
83
+ const first = current.children.find((child)=>child.type !== 'text' || child.value.trim());
84
+ const checkbox = first && isElementWithTag(first, 'input') ? first : first && isElementWithTag(first, 'p') ? first.children.find((child)=>isElementWithTag(child, 'input')) : undefined;
85
+ const start = parent && isHastElement(parent) ? Number(parent.properties.start ?? 1) : 1;
86
+ const depth = parents.filter((node)=>isHastElement(node) && isElementWithTag(node, 'ul', 'ol')).length;
87
+ const marker = checkbox ? checkbox.type === 'element' && checkbox.properties.checked ? '☑' : '☐' : ordered ? `${start + siblings.findIndex((node)=>node === current)}.` : depth > 2 ? '▪' : depth === 2 ? '◦' : '•';
88
+ const renderedChildren = Array.isArray(children) ? children : [
89
+ children
90
+ ];
91
+ const content = [];
92
+ let inline = [];
93
+ const flushInline = ()=>{
94
+ if (!inline.length) {
95
+ return;
96
+ }
97
+ const pendingChildren = inline;
98
+ content.push(createVNode(AnimatedText, {
99
+ "key": `inline-${content.length}`,
100
+ "style": textStyle
101
+ }, _isSlot(pendingChildren) ? pendingChildren : {
102
+ default: ()=>[
103
+ pendingChildren
104
+ ]
105
+ }));
106
+ inline = [];
107
+ };
108
+ for (const [index, child] of current.children.entries()){
109
+ if (child.type === 'text' && !child.value.trim()) {
110
+ const previous = current.children[index - 1];
111
+ const next = current.children[index + 1];
112
+ if (!previous || !next || isBlockElement(previous) || isBlockElement(next)) {
113
+ continue;
114
+ }
115
+ }
116
+ if (isBlockElement(child)) {
117
+ flushInline();
118
+ content.push(createVNode("view", {
119
+ "key": `block-${content.length}`
120
+ }, [
121
+ renderedChildren[index]
122
+ ]));
123
+ continue;
124
+ }
125
+ inline.push(renderedChildren[index]);
126
+ }
127
+ flushInline();
128
+ return createVNode("view", mergeProps(elementProps, {
129
+ "class": joinClassNames('fluxdown-list-item', className),
130
+ "style": {
131
+ display: 'flex',
132
+ flexDirection: 'row',
133
+ ...blockStyle,
134
+ ...style
135
+ }
136
+ }), [
137
+ createVNode(AnimatedText, {
138
+ "style": {
139
+ ...textStyle,
140
+ color: checkbox ? tokens.colors.accent : tokens.colors.fgMuted,
141
+ fontWeight: String(tokens.typography.fontWeight.medium),
142
+ width: '20px',
143
+ marginLeft: '-20px',
144
+ flexShrink: 0
145
+ }
146
+ }, _isSlot(marker) ? marker : {
147
+ default: ()=>[
148
+ marker
149
+ ]
150
+ }),
151
+ createVNode("view", {
152
+ "style": {
153
+ display: 'flex',
154
+ flexDirection: 'column',
155
+ flexGrow: 1,
156
+ flexShrink: 1,
157
+ minWidth: '0px',
158
+ paddingLeft: tokens.spacing.xs
159
+ }
160
+ }, [
161
+ content
162
+ ])
163
+ ]);
164
+ }
165
+ if (tagName === 'tr') {
166
+ const siblings = parents.at(-1)?.children.filter((child)=>child.type === 'element') ?? [];
167
+ return createVNode("view", mergeProps(elementProps, {
168
+ "class": className,
169
+ "style": {
170
+ display: 'flex',
171
+ flexDirection: 'row',
172
+ backgroundColor: siblings.findIndex((node)=>node === current) % 2 ? tokens.colors.surfaceSubtle : undefined,
173
+ ...style
174
+ }
175
+ }), [
176
+ children
177
+ ]);
178
+ }
179
+ if ([
180
+ 'thead',
181
+ 'tbody',
182
+ 'tfoot',
183
+ 'div',
184
+ 'section'
185
+ ].includes(tagName)) {
186
+ const footnotes = current.type === 'element' && current.properties.dataFootnotes;
187
+ const sectionTextStyle = footnotes ? {
188
+ ...textStyle,
189
+ color: tokens.footnotes.color,
190
+ fontSize: tokens.footnotes.fontSize === 'var(--fluxdown-typography-font-size-sm)' ? tokens.typography.fontSize.sm : tokens.footnotes.fontSize
191
+ } : textStyle;
192
+ return createVNode(TextStyleProvider, {
193
+ "value": sectionTextStyle
194
+ }, {
195
+ default: ()=>[
196
+ createVNode("view", mergeProps(elementProps, {
197
+ "class": className,
198
+ "style": {
199
+ display: 'flex',
200
+ flexDirection: 'column',
201
+ ...footnotes ? {
202
+ ...blockStyle,
203
+ paddingTop: tokens.footnotes.paddingTop,
204
+ borderTop: tokens.footnotes.borderTop
205
+ } : undefined,
206
+ ...style
207
+ }
208
+ }), [
209
+ children
210
+ ])
211
+ ]
212
+ });
213
+ }
214
+ const inlineStyle = tagName === 'code' ? {
215
+ ...textStyle,
216
+ ...getInlineCodeStyle(tokens, textStyle.fontSize),
217
+ ...style
218
+ } : tagName === 'del' || tagName === 's' ? {
219
+ ...textStyle,
220
+ color: tokens.colors.fgMuted,
221
+ textDecoration: 'line-through'
222
+ } : textStyle;
223
+ const childTextStyle = tagName === 'code' ? {
224
+ ...textStyle,
225
+ fontFamily: inlineStyle.fontFamily,
226
+ fontSize: inlineStyle.fontSize
227
+ } : inlineStyle; // Web paints inline text boxes and preserves their word boundaries. Native
228
+ // text needs attachments for padding and borders.
229
+ if (tagName === 'code' && !(typeof SystemInfo !== 'undefined' && String(SystemInfo.platform) === 'web')) {
230
+ const parts = (Array.isArray(children) ? children : [
231
+ children
232
+ ]).map((child)=>isVNode(child) && child.type === Text ? child.children : child);
233
+ if (parts.every((part)=>typeof part === 'string')) {
234
+ let _slot;
235
+ const value = parts.join('');
236
+ const fragments = inlineStyle.whiteSpace === 'nowrap' ? [
237
+ value
238
+ ] : value.match(/\S+\s*|\s+/g) ?? [];
239
+ const { border, borderRadius, ...fragmentStyle } = inlineStyle;
240
+ const marginBottom = inlineStyle.marginBottom ?? getInlineBoxMargin(inlineStyle, textStyle);
241
+ return createVNode(TextStyleProvider, {
242
+ "value": childTextStyle
243
+ }, {
244
+ default: ()=>[
245
+ createVNode(AnimatedText, mergeProps(elementProps, {
246
+ "class": joinClassNames('fluxdown-inline-code', className),
247
+ "style": childTextStyle
248
+ }), _isSlot(_slot = fragments.map((fragment, index)=>createVNode("view", {
249
+ "key": index,
250
+ "style": {
251
+ ...fragmentStyle,
252
+ borderTop: border,
253
+ borderBottom: border,
254
+ borderLeft: index === 0 ? border : 'none',
255
+ borderRight: index === fragments.length - 1 ? border : 'none',
256
+ borderTopLeftRadius: index === 0 ? borderRadius : '0px',
257
+ borderBottomLeftRadius: index === 0 ? borderRadius : '0px',
258
+ borderTopRightRadius: index === fragments.length - 1 ? borderRadius : '0px',
259
+ borderBottomRightRadius: index === fragments.length - 1 ? borderRadius : '0px',
260
+ marginBottom,
261
+ verticalAlign: 'baseline',
262
+ overflow: 'visible',
263
+ maxWidth: '100%',
264
+ ...index > 0 ? {
265
+ paddingLeft: '0px'
266
+ } : undefined,
267
+ ...index < fragments.length - 1 ? {
268
+ paddingRight: '0px'
269
+ } : undefined
270
+ }
271
+ }, [
272
+ createVNode(AnimatedText, {
273
+ "style": childTextStyle
274
+ }, _isSlot(fragment) ? fragment : {
275
+ default: ()=>[
276
+ fragment
277
+ ]
278
+ })
279
+ ]))) ? _slot : {
280
+ default: ()=>[
281
+ _slot
282
+ ]
283
+ })
284
+ ]
285
+ });
286
+ }
287
+ }
288
+ return createVNode(TextStyleProvider, {
289
+ "value": childTextStyle
290
+ }, {
291
+ default: ()=>[
292
+ createVNode(AnimatedText, mergeProps(elementProps, {
293
+ "class": tagName === 'code' ? joinClassNames('fluxdown-inline-code', className) : className,
294
+ "style": inlineStyle
295
+ }), _isSlot(children) ? children : {
296
+ default: ()=>[
297
+ children
298
+ ]
299
+ })
300
+ ]
301
+ });
302
+ };
303
+ ElementRenderer.inheritAttrs = false;
304
+
305
+ export { ElementRenderer };
@@ -0,0 +1 @@
1
+ export * from './element/index.js';
@@ -0,0 +1,3 @@
1
+ export * from "./element/index.js";
2
+
3
+
@@ -0,0 +1,2 @@
1
+ export * from './slot/index.js';
2
+ export declare const HeadingPlugin: import("@fluxdown/vue-base-plugins/typings").IPluginItem<import("@fluxdown/vue-base-plugins/typings").PluginConfigs>;
@@ -0,0 +1,19 @@
1
+ import { pluginExtends } from "@fluxdown/vue-base-plugins/base";
2
+ import { HeadingPlugin } from "@fluxdown/vue-base-plugins/plugins/heading";
3
+ import { HeadingSlotPlugin } from "./slot/index.js";
4
+
5
+ export * from "./slot/index.js";
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ const heading_HeadingPlugin = /*#__PURE__*/ pluginExtends(HeadingPlugin, {
14
+ slots: [
15
+ HeadingSlotPlugin
16
+ ]
17
+ });
18
+
19
+ export { heading_HeadingPlugin as HeadingPlugin };
@@ -0,0 +1,13 @@
1
+ import type { IPluggableConfig } from '@fluxdown/types';
2
+ import { BaseSlotPlugin } from '../../../../base/index.js';
3
+ import { HeadingRenderer } from './renderer/index.js';
4
+ declare global {
5
+ interface VueSlotConfigs {
6
+ 'slot-heading': IPluggableConfig<void>;
7
+ }
8
+ }
9
+ export declare class HeadingSlotPlugin extends BaseSlotPlugin<'Heading'> {
10
+ static readonly key = "slot-heading";
11
+ readonly Component: typeof HeadingRenderer;
12
+ readonly type = "Heading";
13
+ }
@@ -0,0 +1,14 @@
1
+ import { BaseSlotPlugin } from "../../../../base/index.js";
2
+ import { HeadingRenderer } from "./renderer/index.js";
3
+
4
+
5
+
6
+
7
+
8
+ class HeadingSlotPlugin extends BaseSlotPlugin {
9
+ static key = 'slot-heading';
10
+ Component = HeadingRenderer;
11
+ type = 'Heading';
12
+ }
13
+
14
+ export { HeadingSlotPlugin };
@@ -0,0 +1,5 @@
1
+ import type { HeadingProps } from '../../../../../base/index.js';
2
+ export declare function HeadingRenderer({ Raw: _Raw, children, class: className, current, level, parents, render: _render, style, ...elementProps }: HeadingProps): import("../../../../../jsx-runtime.js").JSX.Element;
3
+ export declare namespace HeadingRenderer {
4
+ var inheritAttrs: boolean;
5
+ }
@@ -0,0 +1,44 @@
1
+ import { createVNode, isVNode, mergeProps } from "vue";
2
+ import { AnimatedText, TextStyleProvider, joinClassNames, useBlockStyle, useTextStyle, useTheme } from "../../../../../base/index.js";
3
+
4
+
5
+
6
+
7
+
8
+ function _isSlot(s) {
9
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
10
+ }
11
+ const HeadingRenderer = ({ Raw: _Raw, children, class: className, current, level, parents, render: _render, style, ...elementProps })=>{
12
+ const { tokens } = useTheme();
13
+ const blockStyle = useBlockStyle(current, parents);
14
+ const safeLevel = Number.isInteger(level) && level >= 1 && level <= 6 ? level : 1;
15
+ const heading = tokens.heading[`h${safeLevel}`];
16
+ const textStyle = useTextStyle({
17
+ color: safeLevel >= 5 ? tokens.colors.fgMuted : tokens.colors.fg,
18
+ fontSize: heading.fontSize,
19
+ fontWeight: String(heading.fontWeight),
20
+ lineHeight: heading.lineHeight,
21
+ letterSpacing: safeLevel <= 2 ? '-0.025em' : '0px',
22
+ ...style
23
+ });
24
+ return createVNode(TextStyleProvider, {
25
+ "value": textStyle
26
+ }, {
27
+ default: ()=>[
28
+ createVNode(AnimatedText, mergeProps(elementProps, {
29
+ "class": joinClassNames('fluxdown-heading', `fluxdown-heading-h${safeLevel}`, className),
30
+ "style": {
31
+ ...blockStyle,
32
+ ...textStyle
33
+ }
34
+ }), _isSlot(children) ? children : {
35
+ default: ()=>[
36
+ children
37
+ ]
38
+ })
39
+ ]
40
+ });
41
+ };
42
+ HeadingRenderer.inheritAttrs = false;
43
+
44
+ export { HeadingRenderer };
@@ -0,0 +1 @@
1
+ export * from './heading/index.js';
@@ -0,0 +1,3 @@
1
+ export * from "./heading/index.js";
2
+
3
+
@@ -0,0 +1,2 @@
1
+ export * from './slot/index.js';
2
+ export declare const ImagePlugin: import("@fluxdown/vue-base-plugins/typings").IPluginItem<import("@fluxdown/vue-base-plugins/typings").PluginConfigs>;