rn-shiki 0.0.8 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (819) hide show
  1. package/eslint.config.mjs +1 -4
  2. package/lib/commonjs/components/syntax/SyntaxHighlighter.js +9 -3
  3. package/lib/commonjs/components/syntax/SyntaxHighlighter.js.map +1 -1
  4. package/lib/commonjs/hooks/useSyntaxHighlighter.js +6 -4
  5. package/lib/commonjs/hooks/useSyntaxHighlighter.js.map +1 -1
  6. package/lib/commonjs/index.js +10 -3
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/commonjs/langs.js +28 -0
  9. package/lib/commonjs/langs.js.map +1 -0
  10. package/lib/commonjs/syntax/highlighter/index.js +5 -97
  11. package/lib/commonjs/syntax/highlighter/index.js.map +1 -1
  12. package/lib/commonjs/syntax/index.js +0 -7
  13. package/lib/commonjs/syntax/index.js.map +1 -1
  14. package/lib/commonjs/themes.js +28 -0
  15. package/lib/commonjs/themes.js.map +1 -0
  16. package/lib/module/components/syntax/SyntaxHighlighter.js +74 -0
  17. package/lib/module/components/syntax/SyntaxHighlighter.js.map +1 -0
  18. package/lib/module/components/syntax/SyntaxLine.js +31 -0
  19. package/lib/module/components/syntax/SyntaxLine.js.map +1 -0
  20. package/lib/module/components/syntax/index.js +5 -0
  21. package/lib/module/components/syntax/index.js.map +1 -0
  22. package/lib/module/hooks/useSyntaxHighlighter.js +60 -0
  23. package/lib/module/hooks/useSyntaxHighlighter.js.map +1 -0
  24. package/lib/module/index.js +6 -0
  25. package/lib/module/index.js.map +1 -0
  26. package/lib/module/langs.js +20 -0
  27. package/lib/module/langs.js.map +1 -0
  28. package/lib/module/package.json +1 -0
  29. package/lib/module/syntax/highlighter/index.js +33 -0
  30. package/lib/module/syntax/highlighter/index.js.map +1 -0
  31. package/lib/module/syntax/index.js +4 -0
  32. package/lib/module/syntax/index.js.map +1 -0
  33. package/lib/module/themes.js +20 -0
  34. package/lib/module/themes.js.map +1 -0
  35. package/lib/module/types/index.js +2 -0
  36. package/lib/module/types/index.js.map +1 -0
  37. package/lib/module/utils/index.js +4 -0
  38. package/lib/module/utils/index.js.map +1 -0
  39. package/lib/module/utils/string.js +22 -0
  40. package/lib/module/utils/string.js.map +1 -0
  41. package/lib/typescript/src/components/syntax/SyntaxHighlighter.d.ts +13 -0
  42. package/lib/typescript/src/components/syntax/SyntaxHighlighter.d.ts.map +1 -0
  43. package/lib/typescript/src/components/syntax/SyntaxLine.d.ts.map +1 -0
  44. package/lib/typescript/src/components/syntax/index.d.ts.map +1 -0
  45. package/lib/typescript/src/hooks/useSyntaxHighlighter.d.ts +15 -0
  46. package/lib/typescript/src/hooks/useSyntaxHighlighter.d.ts.map +1 -0
  47. package/lib/typescript/src/index.d.ts +4 -0
  48. package/lib/typescript/src/index.d.ts.map +1 -0
  49. package/lib/typescript/src/langs.d.ts +6 -0
  50. package/lib/typescript/src/langs.d.ts.map +1 -0
  51. package/lib/typescript/src/syntax/highlighter/index.d.ts +9 -0
  52. package/lib/typescript/src/syntax/highlighter/index.d.ts.map +1 -0
  53. package/lib/typescript/src/syntax/index.d.ts +2 -0
  54. package/lib/typescript/src/syntax/index.d.ts.map +1 -0
  55. package/lib/typescript/src/themes.d.ts +6 -0
  56. package/lib/typescript/src/themes.d.ts.map +1 -0
  57. package/lib/typescript/src/types/index.d.ts.map +1 -0
  58. package/lib/typescript/src/utils/index.d.ts.map +1 -0
  59. package/lib/typescript/src/utils/string.d.ts.map +1 -0
  60. package/package.json +4 -2
  61. package/scripts/build.js +98 -19
  62. package/src/components/syntax/SyntaxHighlighter.tsx +17 -4
  63. package/src/hooks/useSyntaxHighlighter.ts +15 -8
  64. package/src/index.ts +0 -2
  65. package/src/syntax/highlighter/index.ts +5 -127
  66. package/src/syntax/index.ts +0 -2
  67. package/vendor/shiki/langs/abap.d.ts +6 -0
  68. package/vendor/shiki/langs/actionscript-3.d.ts +6 -0
  69. package/vendor/shiki/langs/ada.d.ts +6 -0
  70. package/vendor/shiki/langs/adoc.d.ts +6 -0
  71. package/vendor/shiki/langs/angular-expression.d.ts +6 -0
  72. package/vendor/shiki/langs/angular-html.d.ts +6 -0
  73. package/vendor/shiki/langs/angular-inline-style.d.ts +6 -0
  74. package/vendor/shiki/langs/angular-inline-template.d.ts +6 -0
  75. package/vendor/shiki/langs/angular-let-declaration.d.ts +6 -0
  76. package/vendor/shiki/langs/angular-template-blocks.d.ts +6 -0
  77. package/vendor/shiki/langs/angular-template.d.ts +6 -0
  78. package/vendor/shiki/langs/angular-ts.d.ts +6 -0
  79. package/vendor/shiki/langs/apache.d.ts +6 -0
  80. package/vendor/shiki/langs/apex.d.ts +6 -0
  81. package/vendor/shiki/langs/apl.d.ts +6 -0
  82. package/vendor/shiki/langs/applescript.d.ts +6 -0
  83. package/vendor/shiki/langs/ara.d.ts +6 -0
  84. package/vendor/shiki/langs/asciidoc.d.ts +6 -0
  85. package/vendor/shiki/langs/asm.d.ts +6 -0
  86. package/vendor/shiki/langs/astro.d.ts +6 -0
  87. package/vendor/shiki/langs/awk.d.ts +6 -0
  88. package/vendor/shiki/langs/ballerina.d.ts +6 -0
  89. package/vendor/shiki/langs/bash.d.ts +6 -0
  90. package/vendor/shiki/langs/bat.d.ts +6 -0
  91. package/vendor/shiki/langs/batch.d.ts +6 -0
  92. package/vendor/shiki/langs/be.d.ts +6 -0
  93. package/vendor/shiki/langs/beancount.d.ts +6 -0
  94. package/vendor/shiki/langs/berry.d.ts +6 -0
  95. package/vendor/shiki/langs/bibtex.d.ts +6 -0
  96. package/vendor/shiki/langs/bicep.d.ts +6 -0
  97. package/vendor/shiki/langs/blade.d.ts +6 -0
  98. package/vendor/shiki/langs/c.d.ts +6 -0
  99. package/vendor/shiki/langs/cadence.d.ts +6 -0
  100. package/vendor/shiki/langs/cdc.d.ts +6 -0
  101. package/vendor/shiki/langs/clarity.d.ts +6 -0
  102. package/vendor/shiki/langs/clj.d.ts +6 -0
  103. package/vendor/shiki/langs/clojure.d.ts +6 -0
  104. package/vendor/shiki/langs/closure-templates.d.ts +6 -0
  105. package/vendor/shiki/langs/cmake.d.ts +6 -0
  106. package/vendor/shiki/langs/cmd.d.ts +6 -0
  107. package/vendor/shiki/langs/cobol.d.ts +6 -0
  108. package/vendor/shiki/langs/codeowners.d.ts +6 -0
  109. package/vendor/shiki/langs/codeql.d.ts +6 -0
  110. package/vendor/shiki/langs/coffee.d.ts +6 -0
  111. package/vendor/shiki/langs/coffeescript.d.ts +6 -0
  112. package/vendor/shiki/langs/common-lisp.d.ts +6 -0
  113. package/vendor/shiki/langs/console.d.ts +6 -0
  114. package/vendor/shiki/langs/coq.d.ts +6 -0
  115. package/vendor/shiki/langs/cpp-macro.d.ts +6 -0
  116. package/vendor/shiki/langs/cpp.d.ts +6 -0
  117. package/vendor/shiki/langs/cql.d.ts +6 -0
  118. package/vendor/shiki/langs/crystal.d.ts +6 -0
  119. package/vendor/shiki/langs/cs.d.ts +6 -0
  120. package/vendor/shiki/langs/csharp.d.ts +6 -0
  121. package/vendor/shiki/langs/css.d.ts +6 -0
  122. package/vendor/shiki/langs/csv.d.ts +6 -0
  123. package/vendor/shiki/langs/cue.d.ts +6 -0
  124. package/vendor/shiki/langs/cypher.d.ts +6 -0
  125. package/vendor/shiki/langs/d.d.ts +6 -0
  126. package/vendor/shiki/langs/dart.d.ts +6 -0
  127. package/vendor/shiki/langs/dax.d.ts +6 -0
  128. package/vendor/shiki/langs/desktop.d.ts +6 -0
  129. package/vendor/shiki/langs/diff.d.ts +6 -0
  130. package/vendor/shiki/langs/docker.d.ts +6 -0
  131. package/vendor/shiki/langs/dockerfile.d.ts +6 -0
  132. package/vendor/shiki/langs/dotenv.d.ts +6 -0
  133. package/vendor/shiki/langs/dream-maker.d.ts +6 -0
  134. package/vendor/shiki/langs/edge.d.ts +6 -0
  135. package/vendor/shiki/langs/elisp.d.ts +6 -0
  136. package/vendor/shiki/langs/elixir.d.ts +6 -0
  137. package/vendor/shiki/langs/elm.d.ts +6 -0
  138. package/vendor/shiki/langs/emacs-lisp.d.ts +6 -0
  139. package/vendor/shiki/langs/erb.d.ts +6 -0
  140. package/vendor/shiki/langs/erl.d.ts +6 -0
  141. package/vendor/shiki/langs/erlang.d.ts +6 -0
  142. package/vendor/shiki/langs/es-tag-css.d.ts +6 -0
  143. package/vendor/shiki/langs/es-tag-glsl.d.ts +6 -0
  144. package/vendor/shiki/langs/es-tag-html.d.ts +6 -0
  145. package/vendor/shiki/langs/es-tag-sql.d.ts +6 -0
  146. package/vendor/shiki/langs/es-tag-xml.d.ts +6 -0
  147. package/vendor/shiki/langs/f.d.ts +6 -0
  148. package/vendor/shiki/langs/f03.d.ts +6 -0
  149. package/vendor/shiki/langs/f08.d.ts +6 -0
  150. package/vendor/shiki/langs/f18.d.ts +6 -0
  151. package/vendor/shiki/langs/f77.d.ts +6 -0
  152. package/vendor/shiki/langs/f90.d.ts +6 -0
  153. package/vendor/shiki/langs/f95.d.ts +6 -0
  154. package/vendor/shiki/langs/fennel.d.ts +6 -0
  155. package/vendor/shiki/langs/fish.d.ts +6 -0
  156. package/vendor/shiki/langs/fluent.d.ts +6 -0
  157. package/vendor/shiki/langs/for.d.ts +6 -0
  158. package/vendor/shiki/langs/fortran-fixed-form.d.ts +6 -0
  159. package/vendor/shiki/langs/fortran-free-form.d.ts +6 -0
  160. package/vendor/shiki/langs/fs.d.ts +6 -0
  161. package/vendor/shiki/langs/fsharp.d.ts +6 -0
  162. package/vendor/shiki/langs/fsl.d.ts +6 -0
  163. package/vendor/shiki/langs/ftl.d.ts +6 -0
  164. package/vendor/shiki/langs/gdresource.d.ts +6 -0
  165. package/vendor/shiki/langs/gdscript.d.ts +6 -0
  166. package/vendor/shiki/langs/gdshader.d.ts +6 -0
  167. package/vendor/shiki/langs/genie.d.ts +6 -0
  168. package/vendor/shiki/langs/gherkin.d.ts +6 -0
  169. package/vendor/shiki/langs/git-commit.d.ts +6 -0
  170. package/vendor/shiki/langs/git-rebase.d.ts +6 -0
  171. package/vendor/shiki/langs/gjs.d.ts +6 -0
  172. package/vendor/shiki/langs/gleam.d.ts +6 -0
  173. package/vendor/shiki/langs/glimmer-js.d.ts +6 -0
  174. package/vendor/shiki/langs/glimmer-ts.d.ts +6 -0
  175. package/vendor/shiki/langs/glsl.d.ts +6 -0
  176. package/vendor/shiki/langs/gnuplot.d.ts +6 -0
  177. package/vendor/shiki/langs/go.d.ts +6 -0
  178. package/vendor/shiki/langs/gql.d.ts +6 -0
  179. package/vendor/shiki/langs/graphql.d.ts +6 -0
  180. package/vendor/shiki/langs/groovy.d.ts +6 -0
  181. package/vendor/shiki/langs/gts.d.ts +6 -0
  182. package/vendor/shiki/langs/hack.d.ts +6 -0
  183. package/vendor/shiki/langs/haml.d.ts +6 -0
  184. package/vendor/shiki/langs/handlebars.d.ts +6 -0
  185. package/vendor/shiki/langs/haskell.d.ts +6 -0
  186. package/vendor/shiki/langs/haxe.d.ts +6 -0
  187. package/vendor/shiki/langs/hbs.d.ts +6 -0
  188. package/vendor/shiki/langs/hcl.d.ts +6 -0
  189. package/vendor/shiki/langs/hjson.d.ts +6 -0
  190. package/vendor/shiki/langs/hlsl.d.ts +6 -0
  191. package/vendor/shiki/langs/hs.d.ts +6 -0
  192. package/vendor/shiki/langs/html-derivative.d.ts +6 -0
  193. package/vendor/shiki/langs/html.d.ts +6 -0
  194. package/vendor/shiki/langs/http.d.ts +6 -0
  195. package/vendor/shiki/langs/hxml.d.ts +6 -0
  196. package/vendor/shiki/langs/hy.d.ts +6 -0
  197. package/vendor/shiki/langs/imba.d.ts +6 -0
  198. package/vendor/shiki/langs/ini.d.ts +6 -0
  199. package/vendor/shiki/langs/jade.d.ts +6 -0
  200. package/vendor/shiki/langs/java.d.ts +6 -0
  201. package/vendor/shiki/langs/javascript.d.ts +6 -0
  202. package/vendor/shiki/langs/jinja-html.d.ts +6 -0
  203. package/vendor/shiki/langs/jinja.d.ts +6 -0
  204. package/vendor/shiki/langs/jison.d.ts +6 -0
  205. package/vendor/shiki/langs/jl.d.ts +6 -0
  206. package/vendor/shiki/langs/js.d.ts +6 -0
  207. package/vendor/shiki/langs/json.d.ts +6 -0
  208. package/vendor/shiki/langs/json5.d.ts +6 -0
  209. package/vendor/shiki/langs/jsonc.d.ts +6 -0
  210. package/vendor/shiki/langs/jsonl.d.ts +6 -0
  211. package/vendor/shiki/langs/jsonnet.d.ts +6 -0
  212. package/vendor/shiki/langs/jssm.d.ts +6 -0
  213. package/vendor/shiki/langs/jsx.d.ts +6 -0
  214. package/vendor/shiki/langs/julia.d.ts +6 -0
  215. package/vendor/shiki/langs/kotlin.d.ts +6 -0
  216. package/vendor/shiki/langs/kql.d.ts +6 -0
  217. package/vendor/shiki/langs/kt.d.ts +6 -0
  218. package/vendor/shiki/langs/kts.d.ts +6 -0
  219. package/vendor/shiki/langs/kusto.d.ts +6 -0
  220. package/vendor/shiki/langs/latex.d.ts +6 -0
  221. package/vendor/shiki/langs/lean.d.ts +6 -0
  222. package/vendor/shiki/langs/lean4.d.ts +6 -0
  223. package/vendor/shiki/langs/less.d.ts +6 -0
  224. package/vendor/shiki/langs/liquid.d.ts +6 -0
  225. package/vendor/shiki/langs/lisp.d.ts +6 -0
  226. package/vendor/shiki/langs/lit.d.ts +6 -0
  227. package/vendor/shiki/langs/log.d.ts +6 -0
  228. package/vendor/shiki/langs/logo.d.ts +6 -0
  229. package/vendor/shiki/langs/lua.d.ts +6 -0
  230. package/vendor/shiki/langs/luau.d.ts +6 -0
  231. package/vendor/shiki/langs/make.d.ts +6 -0
  232. package/vendor/shiki/langs/makefile.d.ts +6 -0
  233. package/vendor/shiki/langs/markdown-vue.d.ts +6 -0
  234. package/vendor/shiki/langs/markdown.d.ts +6 -0
  235. package/vendor/shiki/langs/marko.d.ts +6 -0
  236. package/vendor/shiki/langs/matlab.d.ts +6 -0
  237. package/vendor/shiki/langs/md.d.ts +6 -0
  238. package/vendor/shiki/langs/mdc.d.ts +6 -0
  239. package/vendor/shiki/langs/mdx.d.ts +6 -0
  240. package/vendor/shiki/langs/mediawiki.d.ts +6 -0
  241. package/vendor/shiki/langs/mermaid.d.ts +6 -0
  242. package/vendor/shiki/langs/mips.d.ts +6 -0
  243. package/vendor/shiki/langs/mipsasm.d.ts +6 -0
  244. package/vendor/shiki/langs/mmd.d.ts +6 -0
  245. package/vendor/shiki/langs/mojo.d.ts +6 -0
  246. package/vendor/shiki/langs/move.d.ts +6 -0
  247. package/vendor/shiki/langs/nar.d.ts +6 -0
  248. package/vendor/shiki/langs/narrat.d.ts +6 -0
  249. package/vendor/shiki/langs/nextflow.d.ts +6 -0
  250. package/vendor/shiki/langs/nf.d.ts +6 -0
  251. package/vendor/shiki/langs/nginx.d.ts +6 -0
  252. package/vendor/shiki/langs/nim.d.ts +6 -0
  253. package/vendor/shiki/langs/nix.d.ts +6 -0
  254. package/vendor/shiki/langs/nu.d.ts +6 -0
  255. package/vendor/shiki/langs/nushell.d.ts +6 -0
  256. package/vendor/shiki/langs/objc.d.ts +6 -0
  257. package/vendor/shiki/langs/objective-c.d.ts +6 -0
  258. package/vendor/shiki/langs/objective-cpp.d.ts +6 -0
  259. package/vendor/shiki/langs/ocaml.d.ts +6 -0
  260. package/vendor/shiki/langs/pascal.d.ts +6 -0
  261. package/vendor/shiki/langs/perl.d.ts +6 -0
  262. package/vendor/shiki/langs/perl6.d.ts +6 -0
  263. package/vendor/shiki/langs/php.d.ts +6 -0
  264. package/vendor/shiki/langs/plsql.d.ts +6 -0
  265. package/vendor/shiki/langs/po.d.ts +6 -0
  266. package/vendor/shiki/langs/postcss.d.ts +6 -0
  267. package/vendor/shiki/langs/pot.d.ts +6 -0
  268. package/vendor/shiki/langs/potx.d.ts +6 -0
  269. package/vendor/shiki/langs/powerquery.d.ts +6 -0
  270. package/vendor/shiki/langs/powershell.d.ts +6 -0
  271. package/vendor/shiki/langs/prisma.d.ts +6 -0
  272. package/vendor/shiki/langs/prolog.d.ts +6 -0
  273. package/vendor/shiki/langs/properties.d.ts +6 -0
  274. package/vendor/shiki/langs/proto.d.ts +6 -0
  275. package/vendor/shiki/langs/protobuf.d.ts +6 -0
  276. package/vendor/shiki/langs/ps.d.ts +6 -0
  277. package/vendor/shiki/langs/ps1.d.ts +6 -0
  278. package/vendor/shiki/langs/pug.d.ts +6 -0
  279. package/vendor/shiki/langs/puppet.d.ts +6 -0
  280. package/vendor/shiki/langs/purescript.d.ts +6 -0
  281. package/vendor/shiki/langs/py.d.ts +6 -0
  282. package/vendor/shiki/langs/python.d.ts +6 -0
  283. package/vendor/shiki/langs/ql.d.ts +6 -0
  284. package/vendor/shiki/langs/qml.d.ts +6 -0
  285. package/vendor/shiki/langs/qmldir.d.ts +6 -0
  286. package/vendor/shiki/langs/qss.d.ts +6 -0
  287. package/vendor/shiki/langs/r.d.ts +6 -0
  288. package/vendor/shiki/langs/racket.d.ts +6 -0
  289. package/vendor/shiki/langs/raku.d.ts +6 -0
  290. package/vendor/shiki/langs/razor.d.ts +6 -0
  291. package/vendor/shiki/langs/rb.d.ts +6 -0
  292. package/vendor/shiki/langs/reg.d.ts +6 -0
  293. package/vendor/shiki/langs/regex.d.ts +6 -0
  294. package/vendor/shiki/langs/regexp.d.ts +6 -0
  295. package/vendor/shiki/langs/rel.d.ts +6 -0
  296. package/vendor/shiki/langs/riscv.d.ts +6 -0
  297. package/vendor/shiki/langs/rs.d.ts +6 -0
  298. package/vendor/shiki/langs/rst.d.ts +6 -0
  299. package/vendor/shiki/langs/ruby.d.ts +6 -0
  300. package/vendor/shiki/langs/rust.d.ts +6 -0
  301. package/vendor/shiki/langs/sas.d.ts +6 -0
  302. package/vendor/shiki/langs/sass.d.ts +6 -0
  303. package/vendor/shiki/langs/scala.d.ts +6 -0
  304. package/vendor/shiki/langs/scheme.d.ts +6 -0
  305. package/vendor/shiki/langs/scss.d.ts +6 -0
  306. package/vendor/shiki/langs/sh.d.ts +6 -0
  307. package/vendor/shiki/langs/shader.d.ts +6 -0
  308. package/vendor/shiki/langs/shaderlab.d.ts +6 -0
  309. package/vendor/shiki/langs/shell.d.ts +6 -0
  310. package/vendor/shiki/langs/shellscript.d.ts +6 -0
  311. package/vendor/shiki/langs/shellsession.d.ts +6 -0
  312. package/vendor/shiki/langs/smalltalk.d.ts +6 -0
  313. package/vendor/shiki/langs/solidity.d.ts +6 -0
  314. package/vendor/shiki/langs/soy.d.ts +6 -0
  315. package/vendor/shiki/langs/sparql.d.ts +6 -0
  316. package/vendor/shiki/langs/spl.d.ts +6 -0
  317. package/vendor/shiki/langs/splunk.d.ts +6 -0
  318. package/vendor/shiki/langs/sql.d.ts +6 -0
  319. package/vendor/shiki/langs/ssh-config.d.ts +6 -0
  320. package/vendor/shiki/langs/stata.d.ts +6 -0
  321. package/vendor/shiki/langs/styl.d.ts +6 -0
  322. package/vendor/shiki/langs/stylus.d.ts +6 -0
  323. package/vendor/shiki/langs/svelte.d.ts +6 -0
  324. package/vendor/shiki/langs/swift.d.ts +6 -0
  325. package/vendor/shiki/langs/system-verilog.d.ts +6 -0
  326. package/vendor/shiki/langs/systemd.d.ts +6 -0
  327. package/vendor/shiki/langs/tasl.d.ts +6 -0
  328. package/vendor/shiki/langs/tcl.d.ts +6 -0
  329. package/vendor/shiki/langs/templ.d.ts +6 -0
  330. package/vendor/shiki/langs/terraform.d.ts +6 -0
  331. package/vendor/shiki/langs/tex.d.ts +6 -0
  332. package/vendor/shiki/langs/tf.d.ts +6 -0
  333. package/vendor/shiki/langs/tfvars.d.ts +6 -0
  334. package/vendor/shiki/langs/toml.d.ts +6 -0
  335. package/vendor/shiki/langs/ts-tags.d.ts +6 -0
  336. package/vendor/shiki/langs/ts.d.ts +6 -0
  337. package/vendor/shiki/langs/tsp.d.ts +6 -0
  338. package/vendor/shiki/langs/tsv.d.ts +6 -0
  339. package/vendor/shiki/langs/tsx.d.ts +6 -0
  340. package/vendor/shiki/langs/turtle.d.ts +6 -0
  341. package/vendor/shiki/langs/twig.d.ts +6 -0
  342. package/vendor/shiki/langs/typ.d.ts +6 -0
  343. package/vendor/shiki/langs/typescript.d.ts +6 -0
  344. package/vendor/shiki/langs/typespec.d.ts +6 -0
  345. package/vendor/shiki/langs/typst.d.ts +6 -0
  346. package/vendor/shiki/langs/v.d.ts +6 -0
  347. package/vendor/shiki/langs/vala.d.ts +6 -0
  348. package/vendor/shiki/langs/vb.d.ts +6 -0
  349. package/vendor/shiki/langs/verilog.d.ts +6 -0
  350. package/vendor/shiki/langs/vhdl.d.ts +6 -0
  351. package/vendor/shiki/langs/vim.d.ts +6 -0
  352. package/vendor/shiki/langs/viml.d.ts +6 -0
  353. package/vendor/shiki/langs/vimscript.d.ts +6 -0
  354. package/vendor/shiki/langs/vue-directives.d.ts +6 -0
  355. package/vendor/shiki/langs/vue-html.d.ts +6 -0
  356. package/vendor/shiki/langs/vue-interpolations.d.ts +6 -0
  357. package/vendor/shiki/langs/vue-sfc-style-variable-injection.d.ts +6 -0
  358. package/vendor/shiki/langs/vue.d.ts +6 -0
  359. package/vendor/shiki/langs/vy.d.ts +6 -0
  360. package/vendor/shiki/langs/vyper.d.ts +6 -0
  361. package/vendor/shiki/langs/wasm.d.ts +6 -0
  362. package/vendor/shiki/langs/wenyan.d.ts +6 -0
  363. package/vendor/shiki/langs/wgsl.d.ts +6 -0
  364. package/vendor/shiki/langs/wiki.d.ts +6 -0
  365. package/vendor/shiki/langs/wikitext.d.ts +6 -0
  366. package/vendor/shiki/langs/wl.d.ts +6 -0
  367. package/vendor/shiki/langs/wolfram.d.ts +6 -0
  368. package/vendor/shiki/langs/xml.d.ts +6 -0
  369. package/vendor/shiki/langs/xsl.d.ts +6 -0
  370. package/vendor/shiki/langs/yaml.d.ts +6 -0
  371. package/vendor/shiki/langs/yml.d.ts +6 -0
  372. package/vendor/shiki/langs/zenscript.d.ts +6 -0
  373. package/vendor/shiki/langs/zig.d.ts +6 -0
  374. package/vendor/shiki/langs/zsh.d.ts +6 -0
  375. package/vendor/shiki/manifest.json +1468 -0
  376. package/vendor/shiki/themes/andromeeda.d.ts +6 -0
  377. package/vendor/shiki/themes/aurora-x.d.ts +6 -0
  378. package/vendor/shiki/themes/ayu-dark.d.ts +6 -0
  379. package/vendor/shiki/themes/catppuccin-frappe.d.ts +6 -0
  380. package/vendor/shiki/themes/catppuccin-latte.d.ts +6 -0
  381. package/vendor/shiki/themes/catppuccin-macchiato.d.ts +6 -0
  382. package/vendor/shiki/themes/catppuccin-mocha.d.ts +6 -0
  383. package/vendor/shiki/themes/dark-plus.d.ts +6 -0
  384. package/vendor/shiki/themes/dracula-soft.d.ts +6 -0
  385. package/vendor/shiki/themes/dracula.d.ts +6 -0
  386. package/vendor/shiki/themes/everforest-dark.d.ts +6 -0
  387. package/vendor/shiki/themes/everforest-light.d.ts +6 -0
  388. package/vendor/shiki/themes/github-dark-default.d.ts +6 -0
  389. package/vendor/shiki/themes/github-dark-dimmed.d.ts +6 -0
  390. package/vendor/shiki/themes/github-dark-high-contrast.d.ts +6 -0
  391. package/vendor/shiki/themes/github-dark.d.ts +6 -0
  392. package/vendor/shiki/themes/github-light-default.d.ts +6 -0
  393. package/vendor/shiki/themes/github-light-high-contrast.d.ts +6 -0
  394. package/vendor/shiki/themes/github-light.d.ts +6 -0
  395. package/vendor/shiki/themes/houston.d.ts +6 -0
  396. package/vendor/shiki/themes/kanagawa-dragon.d.ts +6 -0
  397. package/vendor/shiki/themes/kanagawa-lotus.d.ts +6 -0
  398. package/vendor/shiki/themes/kanagawa-wave.d.ts +6 -0
  399. package/vendor/shiki/themes/laserwave.d.ts +6 -0
  400. package/vendor/shiki/themes/light-plus.d.ts +6 -0
  401. package/vendor/shiki/themes/material-theme-darker.d.ts +6 -0
  402. package/vendor/shiki/themes/material-theme-lighter.d.ts +6 -0
  403. package/vendor/shiki/themes/material-theme-ocean.d.ts +6 -0
  404. package/vendor/shiki/themes/material-theme-palenight.d.ts +6 -0
  405. package/vendor/shiki/themes/material-theme.d.ts +6 -0
  406. package/vendor/shiki/themes/min-dark.d.ts +6 -0
  407. package/vendor/shiki/themes/min-light.d.ts +6 -0
  408. package/vendor/shiki/themes/monokai.d.ts +6 -0
  409. package/vendor/shiki/themes/night-owl.d.ts +6 -0
  410. package/vendor/shiki/themes/nord.d.ts +6 -0
  411. package/vendor/shiki/themes/one-dark-pro.d.ts +6 -0
  412. package/vendor/shiki/themes/one-light.d.ts +6 -0
  413. package/vendor/shiki/themes/plastic.d.ts +6 -0
  414. package/vendor/shiki/themes/poimandres.d.ts +6 -0
  415. package/vendor/shiki/themes/red.d.ts +6 -0
  416. package/vendor/shiki/themes/rose-pine-dawn.d.ts +6 -0
  417. package/vendor/shiki/themes/rose-pine-moon.d.ts +6 -0
  418. package/vendor/shiki/themes/rose-pine.d.ts +6 -0
  419. package/vendor/shiki/themes/slack-dark.d.ts +6 -0
  420. package/vendor/shiki/themes/slack-ochin.d.ts +6 -0
  421. package/vendor/shiki/themes/snazzy-light.d.ts +6 -0
  422. package/vendor/shiki/themes/solarized-dark.d.ts +6 -0
  423. package/vendor/shiki/themes/solarized-light.d.ts +6 -0
  424. package/vendor/shiki/themes/tokyo-night.d.ts +6 -0
  425. package/vendor/shiki/themes/vesper.d.ts +6 -0
  426. package/vendor/shiki/themes/vitesse-black.d.ts +6 -0
  427. package/vendor/shiki/themes/vitesse-dark.d.ts +6 -0
  428. package/vendor/shiki/themes/vitesse-light.d.ts +6 -0
  429. package/lib/commonjs/syntax/parser/index.js +0 -26
  430. package/lib/commonjs/syntax/parser/index.js.map +0 -1
  431. package/lib/commonjs/types/shiki.d.js +0 -2
  432. package/lib/commonjs/types/shiki.d.js.map +0 -1
  433. package/lib/typescript/components/syntax/SyntaxHighlighter.d.ts +0 -11
  434. package/lib/typescript/components/syntax/SyntaxHighlighter.d.ts.map +0 -1
  435. package/lib/typescript/components/syntax/SyntaxLine.d.ts.map +0 -1
  436. package/lib/typescript/components/syntax/index.d.ts.map +0 -1
  437. package/lib/typescript/hooks/useSyntaxHighlighter.d.ts +0 -11
  438. package/lib/typescript/hooks/useSyntaxHighlighter.d.ts.map +0 -1
  439. package/lib/typescript/index.d.ts +0 -4
  440. package/lib/typescript/index.d.ts.map +0 -1
  441. package/lib/typescript/syntax/highlighter/index.d.ts +0 -18
  442. package/lib/typescript/syntax/highlighter/index.d.ts.map +0 -1
  443. package/lib/typescript/syntax/index.d.ts +0 -4
  444. package/lib/typescript/syntax/index.d.ts.map +0 -1
  445. package/lib/typescript/syntax/parser/index.d.ts +0 -10
  446. package/lib/typescript/syntax/parser/index.d.ts.map +0 -1
  447. package/lib/typescript/types/index.d.ts.map +0 -1
  448. package/lib/typescript/utils/index.d.ts.map +0 -1
  449. package/lib/typescript/utils/string.d.ts.map +0 -1
  450. package/src/syntax/parser/index.ts +0 -32
  451. package/src/types/shiki.d.ts +0 -17
  452. /package/lib/typescript/{components → src/components}/syntax/SyntaxLine.d.ts +0 -0
  453. /package/lib/typescript/{components → src/components}/syntax/index.d.ts +0 -0
  454. /package/lib/typescript/{types → src/types}/index.d.ts +0 -0
  455. /package/lib/typescript/{utils → src/utils}/index.d.ts +0 -0
  456. /package/lib/typescript/{utils → src/utils}/string.d.ts +0 -0
  457. /package/{dist/cache → vendor/shiki}/core/core.js +0 -0
  458. /package/{dist/cache → vendor/shiki}/core/engine-javascript.js +0 -0
  459. /package/{dist/cache → vendor/shiki}/langs/abap.js +0 -0
  460. /package/{dist/cache → vendor/shiki}/langs/actionscript-3.js +0 -0
  461. /package/{dist/cache → vendor/shiki}/langs/ada.js +0 -0
  462. /package/{dist/cache → vendor/shiki}/langs/adoc.js +0 -0
  463. /package/{dist/cache → vendor/shiki}/langs/angular-expression.js +0 -0
  464. /package/{dist/cache → vendor/shiki}/langs/angular-html.js +0 -0
  465. /package/{dist/cache → vendor/shiki}/langs/angular-inline-style.js +0 -0
  466. /package/{dist/cache → vendor/shiki}/langs/angular-inline-template.js +0 -0
  467. /package/{dist/cache → vendor/shiki}/langs/angular-let-declaration.js +0 -0
  468. /package/{dist/cache → vendor/shiki}/langs/angular-template-blocks.js +0 -0
  469. /package/{dist/cache → vendor/shiki}/langs/angular-template.js +0 -0
  470. /package/{dist/cache → vendor/shiki}/langs/angular-ts.js +0 -0
  471. /package/{dist/cache → vendor/shiki}/langs/apache.js +0 -0
  472. /package/{dist/cache → vendor/shiki}/langs/apex.js +0 -0
  473. /package/{dist/cache → vendor/shiki}/langs/apl.js +0 -0
  474. /package/{dist/cache → vendor/shiki}/langs/applescript.js +0 -0
  475. /package/{dist/cache → vendor/shiki}/langs/ara.js +0 -0
  476. /package/{dist/cache → vendor/shiki}/langs/asciidoc.js +0 -0
  477. /package/{dist/cache → vendor/shiki}/langs/asm.js +0 -0
  478. /package/{dist/cache → vendor/shiki}/langs/astro.js +0 -0
  479. /package/{dist/cache → vendor/shiki}/langs/awk.js +0 -0
  480. /package/{dist/cache → vendor/shiki}/langs/ballerina.js +0 -0
  481. /package/{dist/cache → vendor/shiki}/langs/bash.js +0 -0
  482. /package/{dist/cache → vendor/shiki}/langs/bat.js +0 -0
  483. /package/{dist/cache → vendor/shiki}/langs/batch.js +0 -0
  484. /package/{dist/cache → vendor/shiki}/langs/be.js +0 -0
  485. /package/{dist/cache → vendor/shiki}/langs/beancount.js +0 -0
  486. /package/{dist/cache → vendor/shiki}/langs/berry.js +0 -0
  487. /package/{dist/cache → vendor/shiki}/langs/bibtex.js +0 -0
  488. /package/{dist/cache → vendor/shiki}/langs/bicep.js +0 -0
  489. /package/{dist/cache → vendor/shiki}/langs/blade.js +0 -0
  490. /package/{dist/cache → vendor/shiki}/langs/c.js +0 -0
  491. /package/{dist/cache → vendor/shiki}/langs/cadence.js +0 -0
  492. /package/{dist/cache → vendor/shiki}/langs/cdc.js +0 -0
  493. /package/{dist/cache → vendor/shiki}/langs/clarity.js +0 -0
  494. /package/{dist/cache → vendor/shiki}/langs/clj.js +0 -0
  495. /package/{dist/cache → vendor/shiki}/langs/clojure.js +0 -0
  496. /package/{dist/cache → vendor/shiki}/langs/closure-templates.js +0 -0
  497. /package/{dist/cache → vendor/shiki}/langs/cmake.js +0 -0
  498. /package/{dist/cache → vendor/shiki}/langs/cmd.js +0 -0
  499. /package/{dist/cache → vendor/shiki}/langs/cobol.js +0 -0
  500. /package/{dist/cache → vendor/shiki}/langs/codeowners.js +0 -0
  501. /package/{dist/cache → vendor/shiki}/langs/codeql.js +0 -0
  502. /package/{dist/cache → vendor/shiki}/langs/coffee.js +0 -0
  503. /package/{dist/cache → vendor/shiki}/langs/coffeescript.js +0 -0
  504. /package/{dist/cache → vendor/shiki}/langs/common-lisp.js +0 -0
  505. /package/{dist/cache → vendor/shiki}/langs/console.js +0 -0
  506. /package/{dist/cache → vendor/shiki}/langs/coq.js +0 -0
  507. /package/{dist/cache → vendor/shiki}/langs/cpp-macro.js +0 -0
  508. /package/{dist/cache → vendor/shiki}/langs/cpp.js +0 -0
  509. /package/{dist/cache → vendor/shiki}/langs/cql.js +0 -0
  510. /package/{dist/cache → vendor/shiki}/langs/crystal.js +0 -0
  511. /package/{dist/cache → vendor/shiki}/langs/cs.js +0 -0
  512. /package/{dist/cache → vendor/shiki}/langs/csharp.js +0 -0
  513. /package/{dist/cache → vendor/shiki}/langs/css.js +0 -0
  514. /package/{dist/cache → vendor/shiki}/langs/csv.js +0 -0
  515. /package/{dist/cache → vendor/shiki}/langs/cue.js +0 -0
  516. /package/{dist/cache → vendor/shiki}/langs/cypher.js +0 -0
  517. /package/{dist/cache → vendor/shiki}/langs/d.js +0 -0
  518. /package/{dist/cache → vendor/shiki}/langs/dart.js +0 -0
  519. /package/{dist/cache → vendor/shiki}/langs/dax.js +0 -0
  520. /package/{dist/cache → vendor/shiki}/langs/desktop.js +0 -0
  521. /package/{dist/cache → vendor/shiki}/langs/diff.js +0 -0
  522. /package/{dist/cache → vendor/shiki}/langs/docker.js +0 -0
  523. /package/{dist/cache → vendor/shiki}/langs/dockerfile.js +0 -0
  524. /package/{dist/cache → vendor/shiki}/langs/dotenv.js +0 -0
  525. /package/{dist/cache → vendor/shiki}/langs/dream-maker.js +0 -0
  526. /package/{dist/cache → vendor/shiki}/langs/edge.js +0 -0
  527. /package/{dist/cache → vendor/shiki}/langs/elisp.js +0 -0
  528. /package/{dist/cache → vendor/shiki}/langs/elixir.js +0 -0
  529. /package/{dist/cache → vendor/shiki}/langs/elm.js +0 -0
  530. /package/{dist/cache → vendor/shiki}/langs/emacs-lisp.js +0 -0
  531. /package/{dist/cache → vendor/shiki}/langs/erb.js +0 -0
  532. /package/{dist/cache → vendor/shiki}/langs/erl.js +0 -0
  533. /package/{dist/cache → vendor/shiki}/langs/erlang.js +0 -0
  534. /package/{dist/cache → vendor/shiki}/langs/es-tag-css.js +0 -0
  535. /package/{dist/cache → vendor/shiki}/langs/es-tag-glsl.js +0 -0
  536. /package/{dist/cache → vendor/shiki}/langs/es-tag-html.js +0 -0
  537. /package/{dist/cache → vendor/shiki}/langs/es-tag-sql.js +0 -0
  538. /package/{dist/cache → vendor/shiki}/langs/es-tag-xml.js +0 -0
  539. /package/{dist/cache → vendor/shiki}/langs/f.js +0 -0
  540. /package/{dist/cache → vendor/shiki}/langs/f03.js +0 -0
  541. /package/{dist/cache → vendor/shiki}/langs/f08.js +0 -0
  542. /package/{dist/cache → vendor/shiki}/langs/f18.js +0 -0
  543. /package/{dist/cache → vendor/shiki}/langs/f77.js +0 -0
  544. /package/{dist/cache → vendor/shiki}/langs/f90.js +0 -0
  545. /package/{dist/cache → vendor/shiki}/langs/f95.js +0 -0
  546. /package/{dist/cache → vendor/shiki}/langs/fennel.js +0 -0
  547. /package/{dist/cache → vendor/shiki}/langs/fish.js +0 -0
  548. /package/{dist/cache → vendor/shiki}/langs/fluent.js +0 -0
  549. /package/{dist/cache → vendor/shiki}/langs/for.js +0 -0
  550. /package/{dist/cache → vendor/shiki}/langs/fortran-fixed-form.js +0 -0
  551. /package/{dist/cache → vendor/shiki}/langs/fortran-free-form.js +0 -0
  552. /package/{dist/cache → vendor/shiki}/langs/fs.js +0 -0
  553. /package/{dist/cache → vendor/shiki}/langs/fsharp.js +0 -0
  554. /package/{dist/cache → vendor/shiki}/langs/fsl.js +0 -0
  555. /package/{dist/cache → vendor/shiki}/langs/ftl.js +0 -0
  556. /package/{dist/cache → vendor/shiki}/langs/gdresource.js +0 -0
  557. /package/{dist/cache → vendor/shiki}/langs/gdscript.js +0 -0
  558. /package/{dist/cache → vendor/shiki}/langs/gdshader.js +0 -0
  559. /package/{dist/cache → vendor/shiki}/langs/genie.js +0 -0
  560. /package/{dist/cache → vendor/shiki}/langs/gherkin.js +0 -0
  561. /package/{dist/cache → vendor/shiki}/langs/git-commit.js +0 -0
  562. /package/{dist/cache → vendor/shiki}/langs/git-rebase.js +0 -0
  563. /package/{dist/cache → vendor/shiki}/langs/gjs.js +0 -0
  564. /package/{dist/cache → vendor/shiki}/langs/gleam.js +0 -0
  565. /package/{dist/cache → vendor/shiki}/langs/glimmer-js.js +0 -0
  566. /package/{dist/cache → vendor/shiki}/langs/glimmer-ts.js +0 -0
  567. /package/{dist/cache → vendor/shiki}/langs/glsl.js +0 -0
  568. /package/{dist/cache → vendor/shiki}/langs/gnuplot.js +0 -0
  569. /package/{dist/cache → vendor/shiki}/langs/go.js +0 -0
  570. /package/{dist/cache → vendor/shiki}/langs/gql.js +0 -0
  571. /package/{dist/cache → vendor/shiki}/langs/graphql.js +0 -0
  572. /package/{dist/cache → vendor/shiki}/langs/groovy.js +0 -0
  573. /package/{dist/cache → vendor/shiki}/langs/gts.js +0 -0
  574. /package/{dist/cache → vendor/shiki}/langs/hack.js +0 -0
  575. /package/{dist/cache → vendor/shiki}/langs/haml.js +0 -0
  576. /package/{dist/cache → vendor/shiki}/langs/handlebars.js +0 -0
  577. /package/{dist/cache → vendor/shiki}/langs/haskell.js +0 -0
  578. /package/{dist/cache → vendor/shiki}/langs/haxe.js +0 -0
  579. /package/{dist/cache → vendor/shiki}/langs/hbs.js +0 -0
  580. /package/{dist/cache → vendor/shiki}/langs/hcl.js +0 -0
  581. /package/{dist/cache → vendor/shiki}/langs/hjson.js +0 -0
  582. /package/{dist/cache → vendor/shiki}/langs/hlsl.js +0 -0
  583. /package/{dist/cache → vendor/shiki}/langs/hs.js +0 -0
  584. /package/{dist/cache → vendor/shiki}/langs/html-derivative.js +0 -0
  585. /package/{dist/cache → vendor/shiki}/langs/html.js +0 -0
  586. /package/{dist/cache → vendor/shiki}/langs/http.js +0 -0
  587. /package/{dist/cache → vendor/shiki}/langs/hxml.js +0 -0
  588. /package/{dist/cache → vendor/shiki}/langs/hy.js +0 -0
  589. /package/{dist/cache → vendor/shiki}/langs/imba.js +0 -0
  590. /package/{dist/cache → vendor/shiki}/langs/ini.js +0 -0
  591. /package/{dist/cache → vendor/shiki}/langs/jade.js +0 -0
  592. /package/{dist/cache → vendor/shiki}/langs/java.js +0 -0
  593. /package/{dist/cache → vendor/shiki}/langs/javascript.js +0 -0
  594. /package/{dist/cache → vendor/shiki}/langs/jinja-html.js +0 -0
  595. /package/{dist/cache → vendor/shiki}/langs/jinja.js +0 -0
  596. /package/{dist/cache → vendor/shiki}/langs/jison.js +0 -0
  597. /package/{dist/cache → vendor/shiki}/langs/jl.js +0 -0
  598. /package/{dist/cache → vendor/shiki}/langs/js.js +0 -0
  599. /package/{dist/cache → vendor/shiki}/langs/json.js +0 -0
  600. /package/{dist/cache → vendor/shiki}/langs/json5.js +0 -0
  601. /package/{dist/cache → vendor/shiki}/langs/jsonc.js +0 -0
  602. /package/{dist/cache → vendor/shiki}/langs/jsonl.js +0 -0
  603. /package/{dist/cache → vendor/shiki}/langs/jsonnet.js +0 -0
  604. /package/{dist/cache → vendor/shiki}/langs/jssm.js +0 -0
  605. /package/{dist/cache → vendor/shiki}/langs/jsx.js +0 -0
  606. /package/{dist/cache → vendor/shiki}/langs/julia.js +0 -0
  607. /package/{dist/cache → vendor/shiki}/langs/kotlin.js +0 -0
  608. /package/{dist/cache → vendor/shiki}/langs/kql.js +0 -0
  609. /package/{dist/cache → vendor/shiki}/langs/kt.js +0 -0
  610. /package/{dist/cache → vendor/shiki}/langs/kts.js +0 -0
  611. /package/{dist/cache → vendor/shiki}/langs/kusto.js +0 -0
  612. /package/{dist/cache → vendor/shiki}/langs/latex.js +0 -0
  613. /package/{dist/cache → vendor/shiki}/langs/lean.js +0 -0
  614. /package/{dist/cache → vendor/shiki}/langs/lean4.js +0 -0
  615. /package/{dist/cache → vendor/shiki}/langs/less.js +0 -0
  616. /package/{dist/cache → vendor/shiki}/langs/liquid.js +0 -0
  617. /package/{dist/cache → vendor/shiki}/langs/lisp.js +0 -0
  618. /package/{dist/cache → vendor/shiki}/langs/lit.js +0 -0
  619. /package/{dist/cache → vendor/shiki}/langs/log.js +0 -0
  620. /package/{dist/cache → vendor/shiki}/langs/logo.js +0 -0
  621. /package/{dist/cache → vendor/shiki}/langs/lua.js +0 -0
  622. /package/{dist/cache → vendor/shiki}/langs/luau.js +0 -0
  623. /package/{dist/cache → vendor/shiki}/langs/make.js +0 -0
  624. /package/{dist/cache → vendor/shiki}/langs/makefile.js +0 -0
  625. /package/{dist/cache → vendor/shiki}/langs/markdown-vue.js +0 -0
  626. /package/{dist/cache → vendor/shiki}/langs/markdown.js +0 -0
  627. /package/{dist/cache → vendor/shiki}/langs/marko.js +0 -0
  628. /package/{dist/cache → vendor/shiki}/langs/matlab.js +0 -0
  629. /package/{dist/cache → vendor/shiki}/langs/md.js +0 -0
  630. /package/{dist/cache → vendor/shiki}/langs/mdc.js +0 -0
  631. /package/{dist/cache → vendor/shiki}/langs/mdx.js +0 -0
  632. /package/{dist/cache → vendor/shiki}/langs/mediawiki.js +0 -0
  633. /package/{dist/cache → vendor/shiki}/langs/mermaid.js +0 -0
  634. /package/{dist/cache → vendor/shiki}/langs/mips.js +0 -0
  635. /package/{dist/cache → vendor/shiki}/langs/mipsasm.js +0 -0
  636. /package/{dist/cache → vendor/shiki}/langs/mmd.js +0 -0
  637. /package/{dist/cache → vendor/shiki}/langs/mojo.js +0 -0
  638. /package/{dist/cache → vendor/shiki}/langs/move.js +0 -0
  639. /package/{dist/cache → vendor/shiki}/langs/nar.js +0 -0
  640. /package/{dist/cache → vendor/shiki}/langs/narrat.js +0 -0
  641. /package/{dist/cache → vendor/shiki}/langs/nextflow.js +0 -0
  642. /package/{dist/cache → vendor/shiki}/langs/nf.js +0 -0
  643. /package/{dist/cache → vendor/shiki}/langs/nginx.js +0 -0
  644. /package/{dist/cache → vendor/shiki}/langs/nim.js +0 -0
  645. /package/{dist/cache → vendor/shiki}/langs/nix.js +0 -0
  646. /package/{dist/cache → vendor/shiki}/langs/nu.js +0 -0
  647. /package/{dist/cache → vendor/shiki}/langs/nushell.js +0 -0
  648. /package/{dist/cache → vendor/shiki}/langs/objc.js +0 -0
  649. /package/{dist/cache → vendor/shiki}/langs/objective-c.js +0 -0
  650. /package/{dist/cache → vendor/shiki}/langs/objective-cpp.js +0 -0
  651. /package/{dist/cache → vendor/shiki}/langs/ocaml.js +0 -0
  652. /package/{dist/cache → vendor/shiki}/langs/pascal.js +0 -0
  653. /package/{dist/cache → vendor/shiki}/langs/perl.js +0 -0
  654. /package/{dist/cache → vendor/shiki}/langs/perl6.js +0 -0
  655. /package/{dist/cache → vendor/shiki}/langs/php.js +0 -0
  656. /package/{dist/cache → vendor/shiki}/langs/plsql.js +0 -0
  657. /package/{dist/cache → vendor/shiki}/langs/po.js +0 -0
  658. /package/{dist/cache → vendor/shiki}/langs/postcss.js +0 -0
  659. /package/{dist/cache → vendor/shiki}/langs/pot.js +0 -0
  660. /package/{dist/cache → vendor/shiki}/langs/potx.js +0 -0
  661. /package/{dist/cache → vendor/shiki}/langs/powerquery.js +0 -0
  662. /package/{dist/cache → vendor/shiki}/langs/powershell.js +0 -0
  663. /package/{dist/cache → vendor/shiki}/langs/prisma.js +0 -0
  664. /package/{dist/cache → vendor/shiki}/langs/prolog.js +0 -0
  665. /package/{dist/cache → vendor/shiki}/langs/properties.js +0 -0
  666. /package/{dist/cache → vendor/shiki}/langs/proto.js +0 -0
  667. /package/{dist/cache → vendor/shiki}/langs/protobuf.js +0 -0
  668. /package/{dist/cache → vendor/shiki}/langs/ps.js +0 -0
  669. /package/{dist/cache → vendor/shiki}/langs/ps1.js +0 -0
  670. /package/{dist/cache → vendor/shiki}/langs/pug.js +0 -0
  671. /package/{dist/cache → vendor/shiki}/langs/puppet.js +0 -0
  672. /package/{dist/cache → vendor/shiki}/langs/purescript.js +0 -0
  673. /package/{dist/cache → vendor/shiki}/langs/py.js +0 -0
  674. /package/{dist/cache → vendor/shiki}/langs/python.js +0 -0
  675. /package/{dist/cache → vendor/shiki}/langs/ql.js +0 -0
  676. /package/{dist/cache → vendor/shiki}/langs/qml.js +0 -0
  677. /package/{dist/cache → vendor/shiki}/langs/qmldir.js +0 -0
  678. /package/{dist/cache → vendor/shiki}/langs/qss.js +0 -0
  679. /package/{dist/cache → vendor/shiki}/langs/r.js +0 -0
  680. /package/{dist/cache → vendor/shiki}/langs/racket.js +0 -0
  681. /package/{dist/cache → vendor/shiki}/langs/raku.js +0 -0
  682. /package/{dist/cache → vendor/shiki}/langs/razor.js +0 -0
  683. /package/{dist/cache → vendor/shiki}/langs/rb.js +0 -0
  684. /package/{dist/cache → vendor/shiki}/langs/reg.js +0 -0
  685. /package/{dist/cache → vendor/shiki}/langs/regex.js +0 -0
  686. /package/{dist/cache → vendor/shiki}/langs/regexp.js +0 -0
  687. /package/{dist/cache → vendor/shiki}/langs/rel.js +0 -0
  688. /package/{dist/cache → vendor/shiki}/langs/riscv.js +0 -0
  689. /package/{dist/cache → vendor/shiki}/langs/rs.js +0 -0
  690. /package/{dist/cache → vendor/shiki}/langs/rst.js +0 -0
  691. /package/{dist/cache → vendor/shiki}/langs/ruby.js +0 -0
  692. /package/{dist/cache → vendor/shiki}/langs/rust.js +0 -0
  693. /package/{dist/cache → vendor/shiki}/langs/sas.js +0 -0
  694. /package/{dist/cache → vendor/shiki}/langs/sass.js +0 -0
  695. /package/{dist/cache → vendor/shiki}/langs/scala.js +0 -0
  696. /package/{dist/cache → vendor/shiki}/langs/scheme.js +0 -0
  697. /package/{dist/cache → vendor/shiki}/langs/scss.js +0 -0
  698. /package/{dist/cache → vendor/shiki}/langs/sh.js +0 -0
  699. /package/{dist/cache → vendor/shiki}/langs/shader.js +0 -0
  700. /package/{dist/cache → vendor/shiki}/langs/shaderlab.js +0 -0
  701. /package/{dist/cache → vendor/shiki}/langs/shell.js +0 -0
  702. /package/{dist/cache → vendor/shiki}/langs/shellscript.js +0 -0
  703. /package/{dist/cache → vendor/shiki}/langs/shellsession.js +0 -0
  704. /package/{dist/cache → vendor/shiki}/langs/smalltalk.js +0 -0
  705. /package/{dist/cache → vendor/shiki}/langs/solidity.js +0 -0
  706. /package/{dist/cache → vendor/shiki}/langs/soy.js +0 -0
  707. /package/{dist/cache → vendor/shiki}/langs/sparql.js +0 -0
  708. /package/{dist/cache → vendor/shiki}/langs/spl.js +0 -0
  709. /package/{dist/cache → vendor/shiki}/langs/splunk.js +0 -0
  710. /package/{dist/cache → vendor/shiki}/langs/sql.js +0 -0
  711. /package/{dist/cache → vendor/shiki}/langs/ssh-config.js +0 -0
  712. /package/{dist/cache → vendor/shiki}/langs/stata.js +0 -0
  713. /package/{dist/cache → vendor/shiki}/langs/styl.js +0 -0
  714. /package/{dist/cache → vendor/shiki}/langs/stylus.js +0 -0
  715. /package/{dist/cache → vendor/shiki}/langs/svelte.js +0 -0
  716. /package/{dist/cache → vendor/shiki}/langs/swift.js +0 -0
  717. /package/{dist/cache → vendor/shiki}/langs/system-verilog.js +0 -0
  718. /package/{dist/cache → vendor/shiki}/langs/systemd.js +0 -0
  719. /package/{dist/cache → vendor/shiki}/langs/tasl.js +0 -0
  720. /package/{dist/cache → vendor/shiki}/langs/tcl.js +0 -0
  721. /package/{dist/cache → vendor/shiki}/langs/templ.js +0 -0
  722. /package/{dist/cache → vendor/shiki}/langs/terraform.js +0 -0
  723. /package/{dist/cache → vendor/shiki}/langs/tex.js +0 -0
  724. /package/{dist/cache → vendor/shiki}/langs/tf.js +0 -0
  725. /package/{dist/cache → vendor/shiki}/langs/tfvars.js +0 -0
  726. /package/{dist/cache → vendor/shiki}/langs/toml.js +0 -0
  727. /package/{dist/cache → vendor/shiki}/langs/ts-tags.js +0 -0
  728. /package/{dist/cache → vendor/shiki}/langs/ts.js +0 -0
  729. /package/{dist/cache → vendor/shiki}/langs/tsp.js +0 -0
  730. /package/{dist/cache → vendor/shiki}/langs/tsv.js +0 -0
  731. /package/{dist/cache → vendor/shiki}/langs/tsx.js +0 -0
  732. /package/{dist/cache → vendor/shiki}/langs/turtle.js +0 -0
  733. /package/{dist/cache → vendor/shiki}/langs/twig.js +0 -0
  734. /package/{dist/cache → vendor/shiki}/langs/typ.js +0 -0
  735. /package/{dist/cache → vendor/shiki}/langs/typescript.js +0 -0
  736. /package/{dist/cache → vendor/shiki}/langs/typespec.js +0 -0
  737. /package/{dist/cache → vendor/shiki}/langs/typst.js +0 -0
  738. /package/{dist/cache → vendor/shiki}/langs/v.js +0 -0
  739. /package/{dist/cache → vendor/shiki}/langs/vala.js +0 -0
  740. /package/{dist/cache → vendor/shiki}/langs/vb.js +0 -0
  741. /package/{dist/cache → vendor/shiki}/langs/verilog.js +0 -0
  742. /package/{dist/cache → vendor/shiki}/langs/vhdl.js +0 -0
  743. /package/{dist/cache → vendor/shiki}/langs/vim.js +0 -0
  744. /package/{dist/cache → vendor/shiki}/langs/viml.js +0 -0
  745. /package/{dist/cache → vendor/shiki}/langs/vimscript.js +0 -0
  746. /package/{dist/cache → vendor/shiki}/langs/vue-directives.js +0 -0
  747. /package/{dist/cache → vendor/shiki}/langs/vue-html.js +0 -0
  748. /package/{dist/cache → vendor/shiki}/langs/vue-interpolations.js +0 -0
  749. /package/{dist/cache → vendor/shiki}/langs/vue-sfc-style-variable-injection.js +0 -0
  750. /package/{dist/cache → vendor/shiki}/langs/vue.js +0 -0
  751. /package/{dist/cache → vendor/shiki}/langs/vy.js +0 -0
  752. /package/{dist/cache → vendor/shiki}/langs/vyper.js +0 -0
  753. /package/{dist/cache → vendor/shiki}/langs/wasm.js +0 -0
  754. /package/{dist/cache → vendor/shiki}/langs/wenyan.js +0 -0
  755. /package/{dist/cache → vendor/shiki}/langs/wgsl.js +0 -0
  756. /package/{dist/cache → vendor/shiki}/langs/wiki.js +0 -0
  757. /package/{dist/cache → vendor/shiki}/langs/wikitext.js +0 -0
  758. /package/{dist/cache → vendor/shiki}/langs/wl.js +0 -0
  759. /package/{dist/cache → vendor/shiki}/langs/wolfram.js +0 -0
  760. /package/{dist/cache → vendor/shiki}/langs/xml.js +0 -0
  761. /package/{dist/cache → vendor/shiki}/langs/xsl.js +0 -0
  762. /package/{dist/cache → vendor/shiki}/langs/yaml.js +0 -0
  763. /package/{dist/cache → vendor/shiki}/langs/yml.js +0 -0
  764. /package/{dist/cache → vendor/shiki}/langs/zenscript.js +0 -0
  765. /package/{dist/cache → vendor/shiki}/langs/zig.js +0 -0
  766. /package/{dist/cache → vendor/shiki}/langs/zsh.js +0 -0
  767. /package/{dist/cache → vendor/shiki}/themes/andromeeda.js +0 -0
  768. /package/{dist/cache → vendor/shiki}/themes/aurora-x.js +0 -0
  769. /package/{dist/cache → vendor/shiki}/themes/ayu-dark.js +0 -0
  770. /package/{dist/cache → vendor/shiki}/themes/catppuccin-frappe.js +0 -0
  771. /package/{dist/cache → vendor/shiki}/themes/catppuccin-latte.js +0 -0
  772. /package/{dist/cache → vendor/shiki}/themes/catppuccin-macchiato.js +0 -0
  773. /package/{dist/cache → vendor/shiki}/themes/catppuccin-mocha.js +0 -0
  774. /package/{dist/cache → vendor/shiki}/themes/dark-plus.js +0 -0
  775. /package/{dist/cache → vendor/shiki}/themes/dracula-soft.js +0 -0
  776. /package/{dist/cache → vendor/shiki}/themes/dracula.js +0 -0
  777. /package/{dist/cache → vendor/shiki}/themes/everforest-dark.js +0 -0
  778. /package/{dist/cache → vendor/shiki}/themes/everforest-light.js +0 -0
  779. /package/{dist/cache → vendor/shiki}/themes/github-dark-default.js +0 -0
  780. /package/{dist/cache → vendor/shiki}/themes/github-dark-dimmed.js +0 -0
  781. /package/{dist/cache → vendor/shiki}/themes/github-dark-high-contrast.js +0 -0
  782. /package/{dist/cache → vendor/shiki}/themes/github-dark.js +0 -0
  783. /package/{dist/cache → vendor/shiki}/themes/github-light-default.js +0 -0
  784. /package/{dist/cache → vendor/shiki}/themes/github-light-high-contrast.js +0 -0
  785. /package/{dist/cache → vendor/shiki}/themes/github-light.js +0 -0
  786. /package/{dist/cache → vendor/shiki}/themes/houston.js +0 -0
  787. /package/{dist/cache → vendor/shiki}/themes/kanagawa-dragon.js +0 -0
  788. /package/{dist/cache → vendor/shiki}/themes/kanagawa-lotus.js +0 -0
  789. /package/{dist/cache → vendor/shiki}/themes/kanagawa-wave.js +0 -0
  790. /package/{dist/cache → vendor/shiki}/themes/laserwave.js +0 -0
  791. /package/{dist/cache → vendor/shiki}/themes/light-plus.js +0 -0
  792. /package/{dist/cache → vendor/shiki}/themes/material-theme-darker.js +0 -0
  793. /package/{dist/cache → vendor/shiki}/themes/material-theme-lighter.js +0 -0
  794. /package/{dist/cache → vendor/shiki}/themes/material-theme-ocean.js +0 -0
  795. /package/{dist/cache → vendor/shiki}/themes/material-theme-palenight.js +0 -0
  796. /package/{dist/cache → vendor/shiki}/themes/material-theme.js +0 -0
  797. /package/{dist/cache → vendor/shiki}/themes/min-dark.js +0 -0
  798. /package/{dist/cache → vendor/shiki}/themes/min-light.js +0 -0
  799. /package/{dist/cache → vendor/shiki}/themes/monokai.js +0 -0
  800. /package/{dist/cache → vendor/shiki}/themes/night-owl.js +0 -0
  801. /package/{dist/cache → vendor/shiki}/themes/nord.js +0 -0
  802. /package/{dist/cache → vendor/shiki}/themes/one-dark-pro.js +0 -0
  803. /package/{dist/cache → vendor/shiki}/themes/one-light.js +0 -0
  804. /package/{dist/cache → vendor/shiki}/themes/plastic.js +0 -0
  805. /package/{dist/cache → vendor/shiki}/themes/poimandres.js +0 -0
  806. /package/{dist/cache → vendor/shiki}/themes/red.js +0 -0
  807. /package/{dist/cache → vendor/shiki}/themes/rose-pine-dawn.js +0 -0
  808. /package/{dist/cache → vendor/shiki}/themes/rose-pine-moon.js +0 -0
  809. /package/{dist/cache → vendor/shiki}/themes/rose-pine.js +0 -0
  810. /package/{dist/cache → vendor/shiki}/themes/slack-dark.js +0 -0
  811. /package/{dist/cache → vendor/shiki}/themes/slack-ochin.js +0 -0
  812. /package/{dist/cache → vendor/shiki}/themes/snazzy-light.js +0 -0
  813. /package/{dist/cache → vendor/shiki}/themes/solarized-dark.js +0 -0
  814. /package/{dist/cache → vendor/shiki}/themes/solarized-light.js +0 -0
  815. /package/{dist/cache → vendor/shiki}/themes/tokyo-night.js +0 -0
  816. /package/{dist/cache → vendor/shiki}/themes/vesper.js +0 -0
  817. /package/{dist/cache → vendor/shiki}/themes/vitesse-black.js +0 -0
  818. /package/{dist/cache → vendor/shiki}/themes/vitesse-dark.js +0 -0
  819. /package/{dist/cache → vendor/shiki}/themes/vitesse-light.js +0 -0
package/eslint.config.mjs CHANGED
@@ -2,8 +2,5 @@ import antfu from '@antfu/eslint-config'
2
2
 
3
3
  export default antfu({
4
4
  react: true,
5
- ignores: ['./lib', './dist'],
6
- rules: {
7
- 'antfu/no-import-dist': 'off',
8
- },
5
+ ignores: ['lib', 'vendor'],
9
6
  })
@@ -6,13 +6,17 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
+ var _typescript = _interopRequireDefault(require("../../../vendor/shiki/langs/typescript"));
10
+ var _githubDark = _interopRequireDefault(require("../../../vendor/shiki/themes/github-dark"));
9
11
  var _useSyntaxHighlighter = require("../../hooks/useSyntaxHighlighter");
10
12
  var _jsxRuntime = require("react/jsx-runtime");
11
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
14
  function SyntaxHighlighter({
13
15
  text,
14
- lang,
15
- theme = 'github-dark',
16
+ lang = _typescript.default,
17
+ langName = 'typescript',
18
+ theme = _githubDark.default,
19
+ themeName = 'github-dark',
16
20
  fontSize
17
21
  }) {
18
22
  const {
@@ -22,7 +26,9 @@ function SyntaxHighlighter({
22
26
  } = (0, _useSyntaxHighlighter.useSyntaxHighlighter)({
23
27
  text,
24
28
  lang,
25
- theme
29
+ langName,
30
+ theme,
31
+ themeName
26
32
  });
27
33
  if (error) {
28
34
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useSyntaxHighlighter","_jsxRuntime","e","__esModule","default","SyntaxHighlighter","text","lang","theme","fontSize","tokens","error","isLoading","useSyntaxHighlighter","jsxs","Text","style","color","fontFamily","children","jsx","View","map","line","lineIndex","flexDirection","flexWrap","token","tokenIndex","fontStyle","content","replace","_default","exports"],"sourceRoot":"../../../../src","sources":["components/syntax/SyntaxHighlighter.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAAuE,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AASvE,SAASG,iBAAiBA,CAAC;EAAEC,IAAI;EAAEC,IAAI;EAAEC,KAAK,GAAG,aAAa;EAAEC;AAAiC,CAAC,EAAE;EAClG,MAAM;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EAAU,CAAC,GAAG,IAAAC,0CAAoB,EAAC;IACxDP,IAAI;IACJC,IAAI;IACJC;EACF,CAAC,CAAC;EAEF,IAAIG,KAAK,EAAE;IACT,oBACE,IAAAV,WAAA,CAAAa,IAAA,EAACf,YAAA,CAAAgB,IAAI;MAACC,KAAK,EAAE;QAAEC,KAAK,EAAE,SAAS;QAAEC,UAAU,EAAE,WAAW;QAAET;MAAS,CAAE;MAAAU,QAAA,GAAC,QAEpE,EAACR,KAAK;IAAA,CACF,CAAC;EAEX;EAEA,IAAIC,SAAS,EAAE;IACb,oBAAO,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ireDefault","require","_reactNative","_typescript","_githubDark","_useSyntaxHighlighter","_jsxRuntime","e","__esModule","default","SyntaxHighlighter","text","lang","typescript","langName","theme","githubDark","themeName","fontSize","tokens","error","isLoading","useSyntaxHighlighter","jsxs","Text","style","color","fontFamily","children","jsx","View","map","line","lineIndex","flexDirection","flexWrap","token","tokenIndex","fontStyle","content","replace","_default","exports"],"sourceRoot":"../../../../src","sources":["components/syntax/SyntaxHighlighter.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,qBAAA,GAAAJ,OAAA;AAAuE,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAWvE,SAASG,iBAAiBA,CAAC;EACzBC,IAAI;EACJC,IAAI,GAAGC,mBAAU;EACjBC,QAAQ,GAAG,YAAY;EACvBC,KAAK,GAAGC,mBAAU;EAClBC,SAAS,GAAG,aAAa;EACzBC;AACsB,CAAC,EAAE;EACzB,MAAM;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EAAU,CAAC,GAAG,IAAAC,0CAAoB,EAAC;IACxDX,IAAI;IACJC,IAAI;IACJE,QAAQ;IACRC,KAAK;IACLE;EACF,CAAC,CAAC;EAEF,IAAIG,KAAK,EAAE;IACT,oBACE,IAAAd,WAAA,CAAAiB,IAAA,EAACrB,YAAA,CAAAsB,IAAI;MAACC,KAAK,EAAE;QAAEC,KAAK,EAAE,SAAS;QAAEC,UAAU,EAAE,WAAW;QAAET;MAAS,CAAE;MAAAU,QAAA,GAAC,QAEpE,EAACR,KAAK;IAAA,CACF,CAAC;EAEX;EAEA,IAAIC,SAAS,EA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-9,7 +9,9 @@ var _syntax = require("../syntax");
9
9
  function useSyntaxHighlighter({
10
10
  text,
11
11
  lang,
12
- theme
12
+ langName,
13
+ theme,
14
+ themeName
13
15
  }) {
14
16
  const [tokens, setTokens] = (0, _react.useState)([]);
15
17
  const [error, setError] = (0, _react.useState)();
@@ -29,8 +31,8 @@ function useSyntaxHighlighter({
29
31
  themes: [theme]
30
32
  });
31
33
  const result = highlighter.codeToTokens(text, {
32
- lang,
33
- theme
34
+ lang: langName,
35
+ theme: themeName
34
36
  });
35
37
  if (mounted && result.tokens) {
36
38
  setTokens(result.tokens);
@@ -52,7 +54,7 @@ function useSyntaxHighlighter({
52
54
  return () => {
53
55
  mounted = false;
54
56
  };
55
- }, [text, lang, theme]);
57
+ }, [text, lang, langName, theme, themeName]);
56
58
  return {
57
59
  tokens,
58
60
  error,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_syntax","useSyntaxHighlighter","text","lang","theme","tokens","setTokens","useState","error","setError","isLoading","setIsLoading","useEffect","mounted","highlight","highlighter","createHighlighter","langs","themes","result","codeToTokens","undefined","err","console","Error","message"],"sourceRoot":"../../../src","sources":["hooks/useSyntaxHighlighter.ts"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAQO,SAASE,oBAAoBA,CAAC;EAAEC,IAAI;EAAEC,IAAI;EAAEC;AAAoE,CAAC,EAAE;EACxH,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAAkB,EAAE,CAAC;EACzD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAF,eAAQ,EAAS,CAAC;EAC5C,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAJ,eAAQ,EAAC,IAAI,CAAC;EAEhD,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAIC,OAAO,GAAG,IAAI;IAClBF,YAAY,CAAC,IAAI,CAAC;IAElB,eAAeG,SAASA,CAAA,EAAG;MACzB,IAAI,CAACZ,IAAI,EAAE;QACTS,YAAY,CAAC,KAAK,CAAC;QACnBL,SAAS,CAAC,EAAE,CAAC;QACb;MACF;MAEA,IAAI;QACF,MAAMS,WAAW,GAAG,MAAM,IAAAC,yBAAiB,EAAC;UAC1CC,KAAK,EAAE,CAACd,IAAI,CAAsB;UAClCe,MAAM,EAAE,CAACd,KAAK;QAChB,CAAC,CAAC;QAEF,MAAMe,MAAM,GAAGJ,WAAW,CAACK,YAAY,CAAClB,IAAI,EAAE;UAC5CC,IAAI;UACJC;QACF,CAAC,CAAgB;QAEjB,IAAIS,OAAO,IAAIM,MAAM,CAACd,MAAM,EAAE;UAC5BC,SAAS,CAACa,MAAM,CAACd,MAAM,CAAC;UACxBI,QAAQ,CAACY,SAAS,CAAC;QACrB;MACF,CAAC,CACD,OAAOC,GAAG,EAAE;QACVC,OAAO,CAACf,KAAK,CAAC,qBAAqB,EAAEc,GAAG,CAAC;QACzC,IAAIT,OAAO,EAAE;UACXJ,QAAQ,CAACa,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAG,4BAA4B,CAAC;UAC3EnB,SAAS,CAAC,EAAE,CAAC;QACf;MACF,CAAC,SACO;QACN,IAAIO,OAAO,EAAE;UACXF,YAAY,CAAC,KAAK,CAAC;QACrB;MACF;IACF;IAEAG,SAAS,CAAC,CAAC;IACX,OAAO,MAAM;MACXD,OAAO,GAAG,KAAK;IACjB,CAAC;EACH,CAAC,EAAE,CAACX,IAAI,EAAEC,IAAI,EAAEC,KAAK,CAAC,CAAC;EAEvB,OAAO;IAAEC,MAAM;IAAEG,KAAK;IAAEE;EAAU,CAAC;AACrC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_syntax","useSyntaxHighlighter","text","lang","langName","theme","themeName","tokens","setTokens","useState","error","setError","isLoading","setIsLoading","useEffect","mounted","highlight","highlighter","createHighlighter","langs","themes","result","codeToTokens","undefined","err","console","Error","message"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AO,EAAE;UACXJ,QAAQ,CAACa,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAG,4BAA4B,CAAC;UAC3EnB,SAAS,CAAC,EAAE,CAAC;QACf;MACF,CAAC,SACO;QACN,IAAIO,OAAO,EAAE;UACXF,YAAY,CAAC,KAAK,CAAC;QACrB;MACF;IACF;IAEAG,SAAS,CAAC,CAAC;IACX,OAAO,MAAM;MACXD,OAAO,GAAG,KAAK;IACjB,CAAC;EACH,CAAC,EAAE,CAACb,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,CAAC,CAAC;EAE5C,OAAO;IAAEC,MAAM;IAAEG,KAAK;IAAEE;EAAU,CAAC;AACrC","ignoreList":[]}
@@ -15,12 +15,19 @@ Object.defineProperty(exports, "SyntaxLine", {
15
15
  return _syntax.SyntaxLine;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "parseCodeFence", {
18
+ Object.defineProperty(exports, "getLanguage", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _syntax2.parseCodeFence;
21
+ return _langs.getLanguage;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "getTheme", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _themes.getTheme;
22
28
  }
23
29
  });
24
30
  var _syntax = require("./components/syntax");
25
- var _syntax2 = require("./syntax");
31
+ var _langs = require("./langs");
32
+ var _themes = require("./themes");
26
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_syntax","require","_syntax2"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_syntax","require","_langs","_themes"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Languages = void 0;
7
+ exports.getLanguage = getLanguage;
8
+ var _manifest = _interopRequireDefault(require("../vendor/shiki/manifest.json"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ const Languages = exports.Languages = Object.keys(_manifest.default.langs).reduce((acc, lang) => {
13
+ const key = lang.replace(/-/g, '_').toUpperCase();
14
+ return {
15
+ ...acc,
16
+ [key]: lang
17
+ };
18
+ }, {});
19
+ async function getLanguage(langName) {
20
+ try {
21
+ const lang = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`../vendor/shiki/langs/${String(langName)}.js`);
22
+ return lang.default;
23
+ } catch (err) {
24
+ const error = err instanceof Error ? err.message : String(err);
25
+ throw new Error(`Language '${String(langName)}' failed to load: ${error}`);
26
+ }
27
+ }
28
+ //# sourceMappingURL=langs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_manifest","_interopRequireDefault","require","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","_interopRequireWildcard","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Languages","exports","keys","manifest","langs","reduce","acc","lang","key","replace","toUpperCase","getLanguage","langName","specifier","Promise","then","s","String","err","error","Error","message"],"sourceRoot":"../../src","sources":["langs.ts"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAO,wBAAAP,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAE,GAAA,CAAAR,CAAA,UAAAM,CAAA,CAAAG,GAAA,CAAAT,CAAA,OAAAU,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAhB,CAAA,oBAAAgB,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAgB,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,CAAA,EAAAgB,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAhB,CAAA,CAAAgB,CAAA,YAAAN,CAAA,CAAAR,OAAA,GAAAF,CAAA,EAAAM,CAAA,IAAAA,CAAA,CAAAc,GAAA,CAAApB,CAAA,EAAAU,CAAA,GAAAA,CAAA;AAI7C,MAAMW,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGR,MAAM,CAACU,IAAI,CAACC,iBAAQ,CAACC,KAAK,CAAC,CAACC,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAK;EACzE,MAAMC,GAAG,GAAGD,IAAI,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACC,WAAW,CAAC,CAAC;EACjD,OAAO;IAAE,GAAGJ,GAAG;IAAE,CAACE,GAAG,GAAGD;EAA0B,CAAC;AACrD,CAAC,EAAE,CAAC,CAAsC,CAAC;AAEpC,eAAeI,WAAWA,CAACC,QAA2B,EAA0B;EACrF,IAAI;IACF,MAAML,IAAI,GAAG,OAAAM,SAAA,QAAAC,OAAA,CAAA9B,CAAA,IAAAA,CAAA,CAAA6B,SAAA,GAAAE,IAAA,CAAAC,CAAA,IAAA9B,uBAAA,CAAAR,OAAA,CAAAsC,CAAA,KAAa,yBAAyBC,MAAM,CAACL,QAAQ,CAAC,KAAK,CAAC;IACzE,OAAOL,IAAI,CAAC1B,OAAO;EACrB,CAAC,CACD,OAAOqC,GAAG,EAAE;IACV,MAAMC,KAAK,GAAGD,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAGJ,MAAM,CAACC,GAAG,CAAC;IAC9D,MAAM,IAAIE,KAAK,CAAC,aAAaH,MAAM,CAACL,QAAQ,CAAC,qBAAqBO,KAAK,EAAE,CAAC;EAC5E;AACF","ignoreList":[]}
@@ -4,65 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createHighlighter = createHighlighter;
7
- exports.loadLanguage = loadLanguage;
8
- exports.loadTheme = loadTheme;
9
7
  exports.processTokens = processTokens;
10
- var _core = require("../../../dist/cache/core/core.js");
11
- var _engineJavascript = require("../../../dist/cache/core/engine-javascript.js");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- let state = null;
15
- function getState() {
16
- return state;
17
- }
18
- function setState(newState) {
19
- state = newState;
20
- }
21
- async function importLanguage(lang) {
22
- try {
23
- const module = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`../dist/cache/langs/${lang}.js`);
24
- return module.default;
25
- } catch (error) {
26
- console.error(`Failed to load language '${lang}':`, error);
27
- throw new Error(`Language '${lang}' not found in cache`);
28
- }
29
- }
30
- async function importTheme(theme) {
31
- try {
32
- const module = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`../dist/cache/themes/${theme}.js`);
33
- return module.default;
34
- } catch (error) {
35
- console.error(`Failed to load theme '${theme}':`, error);
36
- throw new Error(`Theme '${theme}' not found in cache`);
37
- }
38
- }
8
+ var _shiki = require("shiki");
39
9
  async function initializeHighlighter(langs, themes) {
40
- const [langModules, themeModules] = await Promise.all([Promise.all(langs.map(importLanguage)), Promise.all(themes.map(importTheme))]);
41
- return (0, _core.createHighlighterCore)({
42
- engine: (0, _engineJavascript.createJavaScriptRegexEngine)(),
43
- langs: langModules,
44
- themes: themeModules
10
+ return (0, _shiki.createHighlighterCore)({
11
+ engine: (0, _shiki.createJavaScriptRegexEngine)(),
12
+ langs,
13
+ themes
45
14
  });
46
15
  }
47
- async function loadAdditionalResources(currentState, langs, themes) {
48
- const newLangs = langs.filter(lang => !currentState.loadedLanguages.has(lang));
49
- const newThemes = themes.filter(theme => !currentState.loadedThemes.has(theme));
50
- if (newLangs.length === 0 && newThemes.length === 0) {
51
- return currentState;
52
- }
53
- await Promise.all([...newLangs.map(async lang => {
54
- const langModule = await importLanguage(lang);
55
- await currentState.highlighter.loadLanguage(langModule);
56
- }), ...newThemes.map(async theme => {
57
- const themeModule = await importTheme(theme);
58
- await currentState.highlighter.loadTheme(themeModule);
59
- })]);
60
- return {
61
- highlighter: currentState.highlighter,
62
- loadedLanguages: new Set([...currentState.loadedLanguages, ...newLangs]),
63
- loadedThemes: new Set([...currentState.loadedThemes, ...themes])
64
- };
65
- }
66
16
  async function createHighlighter({
67
17
  langs,
68
18
  themes
@@ -71,55 +21,13 @@ async function createHighlighter({
71
21
  throw new Error('Please provide both `langs` and `themes` when creating a highlighter.');
72
22
  }
73
23
  try {
74
- const currentState = getState();
75
- if (currentState) {
76
- const newState = await loadAdditionalResources(currentState, langs, themes);
77
- setState(newState);
78
- return newState.highlighter;
79
- }
80
24
  const highlighter = await initializeHighlighter(langs, themes);
81
- const newState = {
82
- highlighter,
83
- loadedLanguages: new Set(langs),
84
- loadedThemes: new Set(themes)
85
- };
86
- setState(newState);
87
25
  return highlighter;
88
26
  } catch (error) {
89
27
  console.error('Failed to create highlighter:', error);
90
28
  throw error;
91
29
  }
92
30
  }
93
- async function loadTheme(theme) {
94
- const currentState = getState();
95
- if (!currentState) {
96
- throw new Error('Highlighter not initialized');
97
- }
98
- if (currentState.loadedThemes.has(theme)) {
99
- return;
100
- }
101
- const themeModule = await importTheme(theme);
102
- await currentState.highlighter.loadTheme(themeModule);
103
- setState({
104
- ...currentState,
105
- loadedThemes: new Set([...currentState.loadedThemes, theme])
106
- });
107
- }
108
- async function loadLanguage(lang) {
109
- const currentState = getState();
110
- if (!currentState) {
111
- throw new Error('Highlighter not initialized');
112
- }
113
- if (currentState.loadedLanguages.has(lang)) {
114
- return;
115
- }
116
- const langModule = await importLanguage(lang);
117
- await currentState.highlighter.loadLanguage(langModule);
118
- setState({
119
- ...currentState,
120
- loadedLanguages: new Set([...currentState.loadedLanguages, lang])
121
- });
122
- }
123
31
  function processTokens(tokens) {
124
32
  return tokens.map(token => ({
125
33
  content: token.content,
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_engineJavascript","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","state","getState","setState","newState","importLanguage","lang","module","specifier","Promise","then","s","error","console","Error","importTheme","theme","initializeHighlighter","langs","themes","langModules","themeModules","all","map","createHighlighterCore","engine","createJavaScriptRegexEngine","loadAdditionalResources","currentState","newLangs","filter","loadedLanguages","newThemes","loadedThemes","length","langModule","highlighter","loadLanguage","themeModule","loadTheme","Set","createHighlighter","processTokens","tokens","token","content","color","fontStyle","toString"],"sourceRoot":"../../../../src","sources":["syntax/highlighter/index.ts"],"mappings":";;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAA2F,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBA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CAAC,6BAA6B,CAAC;EAChD;EAEA,IAAIc,YAAY,CAACG,eAAe,CAAC3C,GAAG,CAACkB,IAAI,CAAC,EAAE;IAC1C;EACF;EAEA,MAAM6B,UAAU,GAAG,MAAM9B,cAAc,CAACC,IAAI,CAAC;EAC7C,MAAMsB,YAAY,CAACQ,WAAW,CAACC,YAAY,CAACF,UAAU,CAAC;EAEvDhC,QAAQ,CAAC;IACP,GAAGyB,YAAY;IACfG,eAAe,EAAE,IAAIS,GAAG,CAAC,CAAC,GAAGZ,YAAY,CAACG,eAAe,EAAEzB,IAAI,CAAC;EAClE,CAAC,CAAC;AACJ;AAEO,SAASoC,aAAaA,CAACC,MAAqB,EAAe;EAChE,OAAOA,MAAM,CAACpB,GAAG,CAACqB,KAAK,KAAK;IAC1BC,OAAO,EAAED,KAAK,CAACC,OAAO;IACtBC,KAAK,EAAEF,KAAK,CAACE,KAAK,IAAI,SAAS;IAC/BC,SAAS,EAAEH,KAAK,CAACG,SAAS,EAAEC,QAAQ,CAAC;EACvC,CAAC,CAAC,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"names":["_shiki","require","initializeHighlighter","langs","themes","createHighlighterCore","engine","createJavaScriptRegexEngine","createHighlighter","length","Error","highlighter","error","console","processTokens","tokens","map","token","content","color","fontStyle","toString"],"sourceRoot":"../../../../src","sources":["syntax/highlighter/index.ts"],"mappings":";;;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAEA,eAAeC,qBAAqBA,CAACC,KAAsB,EAAEC,MAAoB,EAA8D;EAC7I,OAAO,IAAAC,4BAAqB,EAAC;IAC3BC,MAAM,EAAE,IAAAC,kCAA2B,EAAC,CAAC;IACrCJ,KAAK;IACLC;EACF,CAAC,CAAC;AACJ;AAEO,eAAeI,iBAAiBA,CAAC;EAAEL,KAAK;EAAEC;AAAyD,CAAC,EAA8D;EACvK,IAAI,CAACD,KAAK,EAAEM,MAAM,IAAI,CAACL,MAAM,EAAEK,MAAM,EAAE;IACrC,MAAM,IAAIC,KAAK,CAAC,uEAAuE,CAAC;EAC1F;EAEA,IAAI;IACF,MAAMC,WAAW,GAAG,MAAMT,qBAAqB,CAACC,KAAK,EAAEC,MAAM,CAAC;IAC9D,OAAOO,WAAW;EACpB,CAAC,CACD,OAAOC,KAAK,EAAE;IACZC,OAAO,CAACD,KAAK,CAAC,+BAA+B,EAAEA,KAAK,CAAC;IACrD,MAAMA,KAAK;EACb;AACF;AAEO,SAASE,aAAaA,CAACC,MAAqB,EAAe;EAChE,OAAOA,MAAM,CAACC,GAAG,CAACC,KAAK,KAAK;IAC1BC,OAAO,EAAED,KAAK,CAACC,OAAO;IACtBC,KAAK,EAAEF,KAAK,CAACE,KAAK,IAAI,SAAS;IAC/BC,SAAS,EAAEH,KAAK,CAACG,SAAS,EAAEC,QAAQ,CAAC;EACvC,CAAC,CAAC,CAAC;AACL","ignoreList":[]}
@@ -9,12 +9,6 @@ Object.defineProperty(exports, "createHighlighter", {
9
9
  return _highlighter.createHighlighter;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "parseCodeFence", {
13
- enumerable: true,
14
- get: function () {
15
- return _parser.parseCodeFence;
16
- }
17
- });
18
12
  Object.defineProperty(exports, "processTokens", {
19
13
  enumerable: true,
20
14
  get: function () {
@@ -22,5 +16,4 @@ Object.defineProperty(exports, "processTokens", {
22
16
  }
23
17
  });
24
18
  var _highlighter = require("./highlighter");
25
- var _parser = require("./parser");
26
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_highlighter","require","_parser"],"sourceRoot":"../../../src","sources":["syntax/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_highlighter","require"],"sourceRoot":"../../../src","sources":["syntax/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Themes = void 0;
7
+ exports.getTheme = getTheme;
8
+ var _manifest = _interopRequireDefault(require("../vendor/shiki/manifest.json"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ const Themes = exports.Themes = Object.keys(_manifest.default.themes).reduce((acc, theme) => {
13
+ const key = theme.replace(/-/g, '_').toUpperCase();
14
+ return {
15
+ ...acc,
16
+ [key]: theme
17
+ };
18
+ }, {});
19
+ async function getTheme(themeName) {
20
+ try {
21
+ const theme = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`../vendor/shiki/themes/${String(themeName)}.js`);
22
+ return theme.default;
23
+ } catch (err) {
24
+ const error = err instanceof Error ? err.message : String(err);
25
+ throw new Error(`Theme '${String(themeName)}' failed to load: ${error}`);
26
+ }
27
+ }
28
+ //# sourceMappingURL=themes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_manifest","_interopRequireDefault","require","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","_interopRequireWildcard","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Themes","exports","keys","manifest","themes","reduce","acc","theme","key","replace","toUpperCase","getTheme","themeName","specifier","Promise","then","s","String","err","error","Error","message"],"sourceRoot":"../../src","sources":["themes.ts"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAO,wBAAAP,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAE,GAAA,CAAAR,CAAA,UAAAM,CAAA,CAAAG,GAAA,CAAAT,CAAA,OAAAU,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAhB,CAAA,oBAAAgB,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAgB,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,CAAA,EAAAgB,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAhB,CAAA,CAAAgB,CAAA,YAAAN,CAAA,CAAAR,OAAA,GAAAF,CAAA,EAAAM,CAAA,IAAAA,CAAA,CAAAc,GAAA,CAAApB,CAAA,EAAAU,CAAA,GAAAA,CAAA;AAI7C,MAAMW,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGR,MAAM,CAACU,IAAI,CAACC,iBAAQ,CAACC,MAAM,CAAC,CAACC,MAAM,CAAiC,CAACC,GAAG,EAAEC,KAAK,KAAK;EACxG,MAAMC,GAAG,GAAID,KAAK,CAAoBE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACC,WAAW,CAAC,CAAC;EACtE,OAAO;IAAE,GAAGJ,GAAG;IAAE,CAACE,GAAG,GAAGD;EAAwB,CAAC;AACnD,CAAC,EAAE,CAAC,CAAmC,CAAC;AAEjC,eAAeI,QAAQA,CAACC,SAAyB,EAAuB;EAC7E,IAAI;IACF,MAAML,KAAK,GAAG,OAAAM,SAAA,QAAAC,OAAA,CAAA9B,CAAA,IAAAA,CAAA,CAAA6B,SAAA,GAAAE,IAAA,CAAAC,CAAA,IAAA9B,uBAAA,CAAAR,OAAA,CAAAsC,CAAA,KAAa,0BAA0BC,MAAM,CAACL,SAAS,CAAC,KAAK,CAAC;IAC5E,OAAOL,KAAK,CAAC1B,OAAO;EACtB,CAAC,CACD,OAAOqC,GAAG,EAAE;IACV,MAAMC,KAAK,GAAGD,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAGJ,MAAM,CAACC,GAAG,CAAC;IAC9D,MAAM,IAAIE,KAAK,CAAC,UAAUH,MAAM,CAACL,SAAS,CAAC,qBAAqBO,KAAK,EAAE,CAAC;EAC1E;AACF","ignoreList":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Text, View } from 'react-native';
5
+ import typescript from '../../../vendor/shiki/langs/typescript';
6
+ import githubDark from '../../../vendor/shiki/themes/github-dark';
7
+ import { useSyntaxHighlighter } from '../../hooks/useSyntaxHighlighter';
8
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
9
+ function SyntaxHighlighter({
10
+ text,
11
+ lang = typescript,
12
+ langName = 'typescript',
13
+ theme = githubDark,
14
+ themeName = 'github-dark',
15
+ fontSize
16
+ }) {
17
+ const {
18
+ tokens,
19
+ error,
20
+ isLoading
21
+ } = useSyntaxHighlighter({
22
+ text,
23
+ lang,
24
+ langName,
25
+ theme,
26
+ themeName
27
+ });
28
+ if (error) {
29
+ return /*#__PURE__*/_jsxs(Text, {
30
+ style: {
31
+ color: '#ff6b6b',
32
+ fontFamily: 'monospace',
33
+ fontSize
34
+ },
35
+ children: ["Error:", error]
36
+ });
37
+ }
38
+ if (isLoading) {
39
+ return /*#__PURE__*/_jsx(Text, {
40
+ style: {
41
+ color: '#f8f8f2',
42
+ fontFamily: 'monospace',
43
+ fontSize
44
+ },
45
+ children: "Loading..."
46
+ });
47
+ }
48
+ return /*#__PURE__*/_jsx(View, {
49
+ children: tokens.map((line, lineIndex) => /*#__PURE__*/_jsxs(View, {
50
+ style: {
51
+ flexDirection: 'row',
52
+ flexWrap: 'wrap'
53
+ },
54
+ children: [line.map((token, tokenIndex) => /*#__PURE__*/_jsx(Text, {
55
+ style: {
56
+ color: token.color || '#FFFFFF',
57
+ fontFamily: 'monospace',
58
+ fontSize,
59
+ fontStyle: token.fontStyle
60
+ },
61
+ children: token.content.replace(/ /g, '\u00A0')
62
+ }, `${lineIndex}-${tokenIndex}`)), /*#__PURE__*/_jsx(Text, {
63
+ style: {
64
+ color: '#FFFFFF',
65
+ fontFamily: 'monospace',
66
+ fontSize
67
+ },
68
+ children: '\n'
69
+ })]
70
+ }, `line-${lineIndex}`))
71
+ });
72
+ }
73
+ export default SyntaxHighlighter;
74
+ //# sourceMappingURL=SyntaxHighlighter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Text","View","typescript","githubDark","useSyntaxHighlighter","jsxs","_jsxs","jsx","_jsx","SyntaxHighlighter","text","lang","langName","theme","themeName","fontSize","tokens","error","isLoading","style","color","fontFamily","children","map","line","lineIndex","flexDirection","flexWrap","token","tokenIndex","fontStyle","content","replace"],"sourceRoot":"../../../../src","sources":["components/syntax/SyntaxHighlighter.tsx"],"mappings":";;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,OAAOC,UAAU,MAAM,wCAAwC;AAC/D,OAAOC,UAAU,MAAM,0CAA0C;AACjE,SAASC,oBAAoB,QAAQ,kCAAkC;AAAA,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;AAWvE,SAASC,iBAAiBA,CAAC;EACzBC,IAAI;EACJC,IAAI,GAAGT,UAAU;EACjBU,QAAQ,GAAG,YAAY;EACvBC,KAAK,GAAGV,UAAU;EAClBW,SAAS,GAAG,aAAa;EACzBC;AACsB,CAAC,EAAE;EACzB,MAAM;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EAAU,CAAC,GAAGd,oBAAoB,CAAC;IACxDM,IAAI;IACJC,IAAI;IACJC,QAAQ;IACRC,KAAK;IACLC;EACF,CAAC,CAAC;EAEF,IAAIG,KAAK,EAAE;IACT,oBACEX,KAAA,CAACN,IAAI;MAACmB,KAAK,EAAE;QAAEC,KAAK,EAAE,SAAS;QAAEC,UAAU,EAAE,WAAW;QAAEN;MAAS,CAAE;MAAAO,QAAA,GAAC,QAEpE,EAACL,KAAK;IAAA,CACF,CAAC;EAEX;EAEA,IAAIC,SAAS,EAAE;IACb,oBAAOV,IAAA,CAACR,IAAI;MAACmB,KAAK,EAAE;QAAEC,KAAK,EAAE,SAAS;QAAEC,UAAU,EAAE,WAAW;QAAEN;MAAS,CAAE;MAAAO,QAAA,EAAC;IAAU,CAAM,CAAC;EAChG;EAEA,oBACEd,IAAA,CAACP,IAAI;IAAAqB,QAAA,EACFN,MAAM,CAACO,GAAG,CAAC,CAACC,IAAI,EAAEC,SAAS,kBAC1BnB,KAAA,CAACL,IAAI;MAA2BkB,KAAK,EAAE;QAAEO,aAAa,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAO,CAAE;MAAAL,QAAA,GAC/EE,IAAI,CAACD,GAAG,CAAC,CAACK,KAAK,EAAEC,UAAU,kBAC1BrB,IAAA,CAACR,IAAI;QAEHmB,KAAK,EAAE;UACLC,KAAK,EAAEQ,KAAK,CAACR,KAAK,IAAI,SAAS;UAC/BC,UAAU,EAAE,WAAW;UACvBN,QAAQ;UACRe,SAAS,EAAEF,KAAK,CAACE;QACnB,CAAE;QAAAR,QAAA,EAEDM,KAAK,CAACG,OAAO,CAACC,OAAO,CAAC,IAAI,EAAE,QAAQ;MAAC,GARjC,GAAGP,SAAS,IAAII,UAAU,EAS3B,CACP,CAAC,eACFrB,IAAA,CAACR,IAAI;QAACmB,KAAK,EAAE;UAAEC,KAAK,EAAE,SAAS;UAAEC,UAAU,EAAE,WAAW;UAAEN;QAAS,CAAE;QAAAO,QAAA,EAAE;MAAI,CAAO,CAAC;IAAA,GAd1E,QAAQG,SAAS,EAetB,CACP;EAAC,CACE,CAAC;AAEX;AAEA,eAAehB,iBAAiB","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Text, View } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ function SyntaxLine({
7
+ line,
8
+ fontSize
9
+ }) {
10
+ return /*#__PURE__*/_jsx(View, {
11
+ style: {
12
+ flexDirection: 'row',
13
+ flexWrap: 'wrap'
14
+ },
15
+ children: line.map((token, tokenIndex) => {
16
+ // Preserve whitespace
17
+ const content = token.content.replace(/ /g, '\u00A0');
18
+ return /*#__PURE__*/_jsx(Text, {
19
+ style: {
20
+ color: token.color,
21
+ fontFamily: 'monospace',
22
+ fontSize,
23
+ fontStyle: token.fontStyle
24
+ },
25
+ children: content
26
+ }, `${content}-${tokenIndex}`);
27
+ })
28
+ });
29
+ }
30
+ export default SyntaxLine;
31
+ //# sourceMappingURL=SyntaxLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Text","View","jsx","_jsx","SyntaxLine","line","fontSize","style","flexDirection","flexWrap","children","map","token","tokenIndex","content","replace","color","fontFamily","fontStyle"],"sourceRoot":"../../../../src","sources":["components/syntax/SyntaxLine.tsx"],"mappings":";;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOzC,SAASC,UAAUA,CAAC;EAAEC,IAAI;EAAEC;AAA0B,CAAC,EAAE;EACvD,oBACEH,IAAA,CAACF,IAAI;IAACM,KAAK,EAAE;MAAEC,aAAa,EAAE,KAAK;MAAEC,QAAQ,EAAE;IAAO,CAAE;IAAAC,QAAA,EACrDL,IAAI,CAACM,GAAG,CAAC,CAACC,KAAK,EAAEC,UAAU,KAAK;MAC/B;MACA,MAAMC,OAAO,GAAGF,KAAK,CAACE,OAAO,CAACC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;MACrD,oBACEZ,IAAA,CAACH,IAAI;QAEHO,KAAK,EAAE;UACLS,KAAK,EAAEJ,KAAK,CAACI,KAAK;UAClBC,UAAU,EAAE,WAAW;UACvBX,QAAQ;UACRY,SAAS,EAAEN,KAAK,CAACM;QACnB,CAAE;QAAAR,QAAA,EAEDI;MAAO,GARH,GAAGA,OAAO,IAAID,UAAU,EASzB,CAAC;IAEX,CAAC;EAAC,CACE,CAAC;AAEX;AAEA,eAAeT,UAAU","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export { default as SyntaxHighlighter } from './SyntaxHighlighter';
4
+ export { default as SyntaxLine } from './SyntaxLine';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["default","SyntaxHighlighter","SyntaxLine"],"sourceRoot":"../../../../src","sources":["components/syntax/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,iBAAiB,QAAQ,qBAAqB;AAClE,SAASD,OAAO,IAAIE,UAAU,QAAQ,cAAc","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ import { useEffect, useState } from 'react';
4
+ import { createHighlighter } from '../syntax';
5
+ export function useSyntaxHighlighter({
6
+ text,
7
+ lang,
8
+ langName,
9
+ theme,
10
+ themeName
11
+ }) {
12
+ const [tokens, setTokens] = useState([]);
13
+ const [error, setError] = useState();
14
+ const [isLoading, setIsLoading] = useState(true);
15
+ useEffect(() => {
16
+ let mounted = true;
17
+ setIsLoading(true);
18
+ async function highlight() {
19
+ if (!text) {
20
+ setIsLoading(false);
21
+ setTokens([]);
22
+ return;
23
+ }
24
+ try {
25
+ const highlighter = await createHighlighter({
26
+ langs: [lang],
27
+ themes: [theme]
28
+ });
29
+ const result = highlighter.codeToTokens(text, {
30
+ lang: langName,
31
+ theme: themeName
32
+ });
33
+ if (mounted && result.tokens) {
34
+ setTokens(result.tokens);
35
+ setError(undefined);
36
+ }
37
+ } catch (err) {
38
+ console.error('Highlighting error:', err);
39
+ if (mounted) {
40
+ setError(err instanceof Error ? err.message : 'Syntax highlighting failed');
41
+ setTokens([]);
42
+ }
43
+ } finally {
44
+ if (mounted) {
45
+ setIsLoading(false);
46
+ }
47
+ }
48
+ }
49
+ highlight();
50
+ return () => {
51
+ mounted = false;
52
+ };
53
+ }, [text, lang, langName, theme, themeName]);
54
+ return {
55
+ tokens,
56
+ error,
57
+ isLoading
58
+ };
59
+ }
60
+ //# sourceMappingURL=useSyntaxHighlighter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useState","createHighlighter","useSyntaxHighlighter","text","lang","langName","theme","themeName","tokens","setTokens","error","setError","isLoading","setIsLoading","mounted","highlight","highlighter","langs","themes","result","codeToTokens","undefined","err","console","Error","message"],"sourceRoot":"../../../src","sources":["hooks/useSyntaxHighlighter.ts"],"mappings":";;AACA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,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,CAAC;QACf;MACF,CAAC,SACO;QACN,IAAIK,OAAO,EAAE;UACXD,YAAY,CAAC,KAAK,CAAC;QACrB;MACF;IACF;IAEAE,SAAS,CAAC,CAAC;IACX,OAAO,MAAM;MACXD,OAAO,GAAG,KAAK;IACjB,CAAC;EACH,CAAC,EAAE,CAACX,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,CAAC,CAAC;EAE5C,OAAO;IAAEC,MAAM;IAAEE,KAAK;IAAEE;EAAU,CAAC;AACrC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export { SyntaxHighlighter, SyntaxLine } from './components/syntax';
4
+ export { getLanguage } from './langs';
5
+ export { getTheme } from './themes';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SyntaxHighlighter","SyntaxLine","getLanguage","getTheme"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,iBAAiB,EAAEC,UAAU,QAAQ,qBAAqB;AACnE,SAASC,WAAW,QAAQ,SAAS;AACrC,SAASC,QAAQ,QAAQ,UAAU","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ import manifest from '../vendor/shiki/manifest.json';
4
+ export const Languages = Object.keys(manifest.langs).reduce((acc, lang) => {
5
+ const key = lang.replace(/-/g, '_').toUpperCase();
6
+ return {
7
+ ...acc,
8
+ [key]: lang
9
+ };
10
+ }, {});
11
+ export async function getLanguage(langName) {
12
+ try {
13
+ const lang = await import(`../vendor/shiki/langs/${String(langName)}.js`);
14
+ return lang.default;
15
+ } catch (err) {
16
+ const error = err instanceof Error ? err.message : String(err);
17
+ throw new Error(`Language '${String(langName)}' failed to load: ${error}`);
18
+ }
19
+ }
20
+ //# sourceMappingURL=langs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["manifest","Languages","Object","keys","langs","reduce","acc","lang","key","replace","toUpperCase","getLanguage","langName","String","default","err","error","Error","message"],"sourceRoot":"../../src","sources":["langs.ts"],"mappings":";;AACA,OAAOA,QAAQ,MAAM,+BAA+B;AAIpD,OAAO,MAAMC,SAAS,GAAGC,MAAM,CAACC,IAAI,CAACH,QAAQ,CAACI,KAAK,CAAC,CAACC,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAK;EACzE,MAAMC,GAAG,GAAGD,IAAI,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACC,WAAW,CAAC,CAAC;EACjD,OAAO;IAAE,GAAGJ,GAAG;IAAE,CAACE,GAAG,GAAGD;EAA0B,CAAC;AACrD,CAAC,EAAE,CAAC,CAAsC,CAAC;AAE3C,OAAO,eAAeI,WAAWA,CAACC,QAA2B,EAA0B;EACrF,IAAI;IACF,MAAML,IAAI,GAAG,MAAM,MAAM,CAAC,yBAAyBM,MAAM,CAACD,QAAQ,CAAC,KAAK,CAAC;IACzE,OAAOL,IAAI,CAACO,OAAO;EACrB,CAAC,CACD,OAAOC,GAAG,EAAE;IACV,MAAMC,KAAK,GAAGD,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAGL,MAAM,CAACE,GAAG,CAAC;IAC9D,MAAM,IAAIE,KAAK,CAAC,aAAaJ,MAAM,CAACD,QAAQ,CAAC,qBAAqBI,KAAK,EAAE,CAAC;EAC5E;AACF","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}