svelte-highlight 6.1.1 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/Highlight.svelte.d.ts +21 -12
  3. package/HighlightAuto.svelte.d.ts +9 -16
  4. package/HighlightSvelte.svelte.d.ts +9 -11
  5. package/README.md +89 -24
  6. package/languages/1c.d.ts +2 -0
  7. package/languages/abnf.d.ts +2 -0
  8. package/languages/accesslog.d.ts +2 -0
  9. package/languages/actionscript.d.ts +2 -0
  10. package/languages/ada.d.ts +2 -0
  11. package/languages/angelscript.d.ts +2 -0
  12. package/languages/apache.d.ts +2 -0
  13. package/languages/applescript.d.ts +2 -0
  14. package/languages/arcade.d.ts +2 -0
  15. package/languages/arduino.d.ts +2 -0
  16. package/languages/armasm.d.ts +2 -0
  17. package/languages/asciidoc.d.ts +2 -0
  18. package/languages/aspectj.d.ts +2 -0
  19. package/languages/autohotkey.d.ts +2 -0
  20. package/languages/autoit.d.ts +2 -0
  21. package/languages/avrasm.d.ts +2 -0
  22. package/languages/awk.d.ts +2 -0
  23. package/languages/axapta.d.ts +2 -0
  24. package/languages/bash.d.ts +2 -0
  25. package/languages/basic.d.ts +2 -0
  26. package/languages/bnf.d.ts +2 -0
  27. package/languages/brainfuck.d.ts +2 -0
  28. package/languages/c.d.ts +2 -0
  29. package/languages/cal.d.ts +2 -0
  30. package/languages/capnproto.d.ts +2 -0
  31. package/languages/ceylon.d.ts +2 -0
  32. package/languages/clean.d.ts +2 -0
  33. package/languages/clojure-repl.d.ts +2 -0
  34. package/languages/clojure.d.ts +2 -0
  35. package/languages/cmake.d.ts +2 -0
  36. package/languages/coffeescript.d.ts +2 -0
  37. package/languages/coq.d.ts +2 -0
  38. package/languages/cos.d.ts +2 -0
  39. package/languages/cpp.d.ts +2 -0
  40. package/languages/crmsh.d.ts +2 -0
  41. package/languages/crystal.d.ts +2 -0
  42. package/languages/csharp.d.ts +2 -0
  43. package/languages/csp.d.ts +2 -0
  44. package/languages/css.d.ts +2 -0
  45. package/languages/d.d.ts +2 -0
  46. package/languages/dart.d.ts +2 -0
  47. package/languages/delphi.d.ts +2 -0
  48. package/languages/diff.d.ts +2 -0
  49. package/languages/django.d.ts +2 -0
  50. package/languages/dns.d.ts +2 -0
  51. package/languages/dockerfile.d.ts +2 -0
  52. package/languages/dos.d.ts +2 -0
  53. package/languages/dsconfig.d.ts +2 -0
  54. package/languages/dts.d.ts +2 -0
  55. package/languages/dust.d.ts +2 -0
  56. package/languages/ebnf.d.ts +2 -0
  57. package/languages/elixir.d.ts +2 -0
  58. package/languages/elm.d.ts +2 -0
  59. package/languages/erb.d.ts +2 -0
  60. package/languages/erlang-repl.d.ts +2 -0
  61. package/languages/erlang.d.ts +2 -0
  62. package/languages/excel.d.ts +2 -0
  63. package/languages/fix.d.ts +2 -0
  64. package/languages/flix.d.ts +2 -0
  65. package/languages/fortran.d.ts +2 -0
  66. package/languages/fsharp.d.ts +2 -0
  67. package/languages/gams.d.ts +2 -0
  68. package/languages/gauss.d.ts +2 -0
  69. package/languages/gcode.d.ts +2 -0
  70. package/languages/gherkin.d.ts +2 -0
  71. package/languages/glsl.d.ts +2 -0
  72. package/languages/gml.d.ts +2 -0
  73. package/languages/go.d.ts +2 -0
  74. package/languages/golo.d.ts +2 -0
  75. package/languages/gradle.d.ts +2 -0
  76. package/languages/graphql.d.ts +2 -0
  77. package/languages/groovy.d.ts +2 -0
  78. package/languages/haml.d.ts +2 -0
  79. package/languages/handlebars.d.ts +2 -0
  80. package/languages/haskell.d.ts +2 -0
  81. package/languages/haxe.d.ts +2 -0
  82. package/languages/hsp.d.ts +2 -0
  83. package/languages/http.d.ts +2 -0
  84. package/languages/hy.d.ts +2 -0
  85. package/languages/index.d.ts +199 -0
  86. package/languages/inform7.d.ts +2 -0
  87. package/languages/ini.d.ts +2 -0
  88. package/languages/irpf90.d.ts +2 -0
  89. package/languages/isbl.d.ts +2 -0
  90. package/languages/java.d.ts +2 -0
  91. package/languages/javascript.d.ts +2 -0
  92. package/languages/jboss-cli.d.ts +2 -0
  93. package/languages/json.d.ts +2 -0
  94. package/languages/julia-repl.d.ts +2 -0
  95. package/languages/julia.d.ts +2 -0
  96. package/languages/kotlin.d.ts +2 -0
  97. package/languages/lasso.d.ts +2 -0
  98. package/languages/latex.d.ts +2 -0
  99. package/languages/ldif.d.ts +2 -0
  100. package/languages/leaf.d.ts +2 -0
  101. package/languages/less.d.ts +2 -0
  102. package/languages/lisp.d.ts +2 -0
  103. package/languages/livecodeserver.d.ts +2 -0
  104. package/languages/livescript.d.ts +2 -0
  105. package/languages/llvm.d.ts +2 -0
  106. package/languages/lsl.d.ts +2 -0
  107. package/languages/lua.d.ts +2 -0
  108. package/languages/makefile.d.ts +2 -0
  109. package/languages/markdown.d.ts +2 -0
  110. package/languages/mathematica.d.ts +2 -0
  111. package/languages/matlab.d.ts +2 -0
  112. package/languages/maxima.d.ts +2 -0
  113. package/languages/mel.d.ts +2 -0
  114. package/languages/mercury.d.ts +2 -0
  115. package/languages/mipsasm.d.ts +2 -0
  116. package/languages/mizar.d.ts +2 -0
  117. package/languages/mojolicious.d.ts +2 -0
  118. package/languages/monkey.d.ts +2 -0
  119. package/languages/moonscript.d.ts +2 -0
  120. package/languages/n1ql.d.ts +2 -0
  121. package/languages/nestedtext.d.ts +2 -0
  122. package/languages/nginx.d.ts +2 -0
  123. package/languages/nim.d.ts +2 -0
  124. package/languages/nix.d.ts +2 -0
  125. package/languages/node-repl.d.ts +2 -0
  126. package/languages/nsis.d.ts +2 -0
  127. package/languages/objectivec.d.ts +2 -0
  128. package/languages/ocaml.d.ts +2 -0
  129. package/languages/openscad.d.ts +2 -0
  130. package/languages/oxygene.d.ts +2 -0
  131. package/languages/parser3.d.ts +2 -0
  132. package/languages/perl.d.ts +2 -0
  133. package/languages/pf.d.ts +2 -0
  134. package/languages/pgsql.d.ts +2 -0
  135. package/languages/php-template.d.ts +2 -0
  136. package/languages/php.d.ts +2 -0
  137. package/languages/plaintext.d.ts +2 -0
  138. package/languages/pony.d.ts +2 -0
  139. package/languages/powershell.d.ts +2 -0
  140. package/languages/processing.d.ts +2 -0
  141. package/languages/profile.d.ts +2 -0
  142. package/languages/prolog.d.ts +2 -0
  143. package/languages/properties.d.ts +2 -0
  144. package/languages/protobuf.d.ts +2 -0
  145. package/languages/puppet.d.ts +2 -0
  146. package/languages/purebasic.d.ts +2 -0
  147. package/languages/python-repl.d.ts +2 -0
  148. package/languages/python.d.ts +2 -0
  149. package/languages/q.d.ts +2 -0
  150. package/languages/qml.d.ts +2 -0
  151. package/languages/r.d.ts +2 -0
  152. package/languages/reasonml.d.ts +2 -0
  153. package/languages/rib.d.ts +2 -0
  154. package/languages/roboconf.d.ts +2 -0
  155. package/languages/routeros.d.ts +2 -0
  156. package/languages/rsl.d.ts +2 -0
  157. package/languages/ruby.d.ts +2 -0
  158. package/languages/ruleslanguage.d.ts +2 -0
  159. package/languages/rust.d.ts +2 -0
  160. package/languages/sas.d.ts +2 -0
  161. package/languages/scala.d.ts +2 -0
  162. package/languages/scheme.d.ts +2 -0
  163. package/languages/scilab.d.ts +2 -0
  164. package/languages/scss.d.ts +2 -0
  165. package/languages/shell.d.ts +2 -0
  166. package/languages/smali.d.ts +2 -0
  167. package/languages/smalltalk.d.ts +2 -0
  168. package/languages/sml.d.ts +2 -0
  169. package/languages/sqf.d.ts +2 -0
  170. package/languages/sql.d.ts +2 -0
  171. package/languages/stan.d.ts +2 -0
  172. package/languages/stata.d.ts +2 -0
  173. package/languages/step21.d.ts +2 -0
  174. package/languages/stylus.d.ts +2 -0
  175. package/languages/subunit.d.ts +2 -0
  176. package/languages/swift.d.ts +2 -0
  177. package/languages/taggerscript.d.ts +2 -0
  178. package/languages/tap.d.ts +2 -0
  179. package/languages/tcl.d.ts +2 -0
  180. package/languages/thrift.d.ts +2 -0
  181. package/languages/tp.d.ts +2 -0
  182. package/languages/twig.d.ts +2 -0
  183. package/languages/typescript.d.ts +2 -0
  184. package/languages/vala.d.ts +2 -0
  185. package/languages/vbnet.d.ts +2 -0
  186. package/languages/vbscript-html.d.ts +2 -0
  187. package/languages/vbscript.d.ts +2 -0
  188. package/languages/verilog.d.ts +2 -0
  189. package/languages/vhdl.d.ts +2 -0
  190. package/languages/vim.d.ts +2 -0
  191. package/languages/wasm.d.ts +2 -0
  192. package/languages/wren.d.ts +2 -0
  193. package/languages/x86asm.d.ts +2 -0
  194. package/languages/xl.d.ts +2 -0
  195. package/languages/xml.d.ts +2 -0
  196. package/languages/xquery.d.ts +2 -0
  197. package/languages/yaml.d.ts +2 -0
  198. package/languages/zephir.d.ts +2 -0
  199. package/package.json +16 -11
  200. package/styles/3024.d.ts +1 -0
  201. package/styles/a11y-dark.d.ts +1 -0
  202. package/styles/a11y-light.d.ts +1 -0
  203. package/styles/agate.d.ts +1 -0
  204. package/styles/an-old-hope.d.ts +1 -0
  205. package/styles/androidstudio.d.ts +1 -0
  206. package/styles/apathy.d.ts +1 -0
  207. package/styles/apprentice.d.ts +1 -0
  208. package/styles/arduino-light.d.ts +1 -0
  209. package/styles/arta.d.ts +1 -0
  210. package/styles/ascetic.d.ts +1 -0
  211. package/styles/ashes.d.ts +1 -0
  212. package/styles/atelier-cave-light.d.ts +1 -0
  213. package/styles/atelier-cave.d.ts +1 -0
  214. package/styles/atelier-dune-light.d.ts +1 -0
  215. package/styles/atelier-dune.d.ts +1 -0
  216. package/styles/atelier-estuary-light.d.ts +1 -0
  217. package/styles/atelier-estuary.d.ts +1 -0
  218. package/styles/atelier-forest-light.d.ts +1 -0
  219. package/styles/atelier-forest.d.ts +1 -0
  220. package/styles/atelier-heath-light.d.ts +1 -0
  221. package/styles/atelier-heath.d.ts +1 -0
  222. package/styles/atelier-lakeside-light.d.ts +1 -0
  223. package/styles/atelier-lakeside.d.ts +1 -0
  224. package/styles/atelier-plateau-light.d.ts +1 -0
  225. package/styles/atelier-plateau.d.ts +1 -0
  226. package/styles/atelier-savanna-light.d.ts +1 -0
  227. package/styles/atelier-savanna.d.ts +1 -0
  228. package/styles/atelier-seaside-light.d.ts +1 -0
  229. package/styles/atelier-seaside.d.ts +1 -0
  230. package/styles/atelier-sulphurpool-light.d.ts +1 -0
  231. package/styles/atelier-sulphurpool.d.ts +1 -0
  232. package/styles/atlas.d.ts +1 -0
  233. package/styles/atom-one-dark-reasonable.d.ts +1 -0
  234. package/styles/atom-one-dark.d.ts +1 -0
  235. package/styles/atom-one-light.d.ts +1 -0
  236. package/styles/base16-github.d.ts +1 -0
  237. package/styles/base16-ir-black.d.ts +1 -0
  238. package/styles/base16-monokai.d.ts +1 -0
  239. package/styles/base16-nord.d.ts +1 -0
  240. package/styles/bespin.d.ts +1 -0
  241. package/styles/black-metal-bathory.d.ts +1 -0
  242. package/styles/black-metal-burzum.d.ts +1 -0
  243. package/styles/black-metal-dark-funeral.d.ts +1 -0
  244. package/styles/black-metal-gorgoroth.d.ts +1 -0
  245. package/styles/black-metal-immortal.d.ts +1 -0
  246. package/styles/black-metal-khold.d.ts +1 -0
  247. package/styles/black-metal-marduk.d.ts +1 -0
  248. package/styles/black-metal-mayhem.d.ts +1 -0
  249. package/styles/black-metal-nile.d.ts +1 -0
  250. package/styles/black-metal-venom.d.ts +1 -0
  251. package/styles/black-metal.d.ts +1 -0
  252. package/styles/brewer.d.ts +1 -0
  253. package/styles/bright.d.ts +1 -0
  254. package/styles/brogrammer.d.ts +1 -0
  255. package/styles/brown-paper.d.ts +1 -0
  256. package/styles/brush-trees-dark.d.ts +1 -0
  257. package/styles/brush-trees.d.ts +1 -0
  258. package/styles/chalk.d.ts +1 -0
  259. package/styles/circus.d.ts +1 -0
  260. package/styles/classic-dark.d.ts +1 -0
  261. package/styles/classic-light.d.ts +1 -0
  262. package/styles/codepen-embed.d.ts +1 -0
  263. package/styles/codeschool.d.ts +1 -0
  264. package/styles/color-brewer.d.ts +1 -0
  265. package/styles/colors.d.ts +1 -0
  266. package/styles/cupcake.d.ts +1 -0
  267. package/styles/cupertino.d.ts +1 -0
  268. package/styles/danqing.d.ts +1 -0
  269. package/styles/darcula.d.ts +1 -0
  270. package/styles/dark-violet.d.ts +1 -0
  271. package/styles/dark.d.ts +1 -0
  272. package/styles/darkmoss.d.ts +1 -0
  273. package/styles/darktooth.d.ts +1 -0
  274. package/styles/decaf.d.ts +1 -0
  275. package/styles/default-dark.d.ts +1 -0
  276. package/styles/default-light.d.ts +1 -0
  277. package/styles/default.d.ts +1 -0
  278. package/styles/devibeans.d.ts +1 -0
  279. package/styles/dirtysea.d.ts +1 -0
  280. package/styles/docco.d.ts +1 -0
  281. package/styles/dracula.d.ts +1 -0
  282. package/styles/edge-dark.d.ts +1 -0
  283. package/styles/edge-light.d.ts +1 -0
  284. package/styles/eighties.d.ts +1 -0
  285. package/styles/embers.d.ts +1 -0
  286. package/styles/equilibrium-dark.d.ts +1 -0
  287. package/styles/equilibrium-gray-dark.d.ts +1 -0
  288. package/styles/equilibrium-gray-light.d.ts +1 -0
  289. package/styles/equilibrium-light.d.ts +1 -0
  290. package/styles/espresso.d.ts +1 -0
  291. package/styles/eva-dim.d.ts +1 -0
  292. package/styles/eva.d.ts +1 -0
  293. package/styles/far.d.ts +1 -0
  294. package/styles/felipec.d.ts +1 -0
  295. package/styles/flat.d.ts +1 -0
  296. package/styles/foundation.d.ts +1 -0
  297. package/styles/framer.d.ts +1 -0
  298. package/styles/fruit-soda.d.ts +1 -0
  299. package/styles/gigavolt.d.ts +1 -0
  300. package/styles/github-dark-dimmed.d.ts +1 -0
  301. package/styles/github-dark.d.ts +1 -0
  302. package/styles/github.d.ts +1 -0
  303. package/styles/gml.d.ts +1 -0
  304. package/styles/google-dark.d.ts +1 -0
  305. package/styles/google-light.d.ts +1 -0
  306. package/styles/googlecode.d.ts +1 -0
  307. package/styles/gradient-dark.d.ts +1 -0
  308. package/styles/gradient-light.d.ts +1 -0
  309. package/styles/grayscale-dark.d.ts +1 -0
  310. package/styles/grayscale-light.d.ts +1 -0
  311. package/styles/grayscale.d.ts +1 -0
  312. package/styles/green-screen.d.ts +1 -0
  313. package/styles/gruvbox-dark-hard.d.ts +1 -0
  314. package/styles/gruvbox-dark-medium.d.ts +1 -0
  315. package/styles/gruvbox-dark-pale.d.ts +1 -0
  316. package/styles/gruvbox-dark-soft.d.ts +1 -0
  317. package/styles/gruvbox-light-hard.d.ts +1 -0
  318. package/styles/gruvbox-light-medium.d.ts +1 -0
  319. package/styles/gruvbox-light-soft.d.ts +1 -0
  320. package/styles/hardcore.d.ts +1 -0
  321. package/styles/harmonic16-dark.d.ts +1 -0
  322. package/styles/harmonic16-light.d.ts +1 -0
  323. package/styles/heetch-dark.d.ts +1 -0
  324. package/styles/heetch-light.d.ts +1 -0
  325. package/styles/helios.d.ts +1 -0
  326. package/styles/hopscotch.d.ts +1 -0
  327. package/styles/horizon-dark.d.ts +1 -0
  328. package/styles/horizon-light.d.ts +1 -0
  329. package/styles/humanoid-dark.d.ts +1 -0
  330. package/styles/humanoid-light.d.ts +1 -0
  331. package/styles/hybrid.d.ts +1 -0
  332. package/styles/ia-dark.d.ts +1 -0
  333. package/styles/ia-light.d.ts +1 -0
  334. package/styles/icy-dark.d.ts +1 -0
  335. package/styles/idea.d.ts +1 -0
  336. package/styles/index.d.ts +248 -0
  337. package/styles/index.js +2 -0
  338. package/styles/intellij-light.d.ts +1 -0
  339. package/styles/ir-black.d.ts +1 -0
  340. package/styles/isbl-editor-dark.d.ts +1 -0
  341. package/styles/isbl-editor-light.d.ts +1 -0
  342. package/styles/isotope.d.ts +1 -0
  343. package/styles/kimber.d.ts +1 -0
  344. package/styles/kimbie-dark.d.ts +1 -0
  345. package/styles/kimbie-light.d.ts +1 -0
  346. package/styles/lightfair.d.ts +1 -0
  347. package/styles/lioshi.d.ts +1 -0
  348. package/styles/london-tube.d.ts +1 -0
  349. package/styles/macintosh.d.ts +1 -0
  350. package/styles/magula.d.ts +1 -0
  351. package/styles/marrakesh.d.ts +1 -0
  352. package/styles/materia.d.ts +1 -0
  353. package/styles/material-darker.d.ts +1 -0
  354. package/styles/material-lighter.d.ts +1 -0
  355. package/styles/material-palenight.d.ts +1 -0
  356. package/styles/material-vivid.d.ts +1 -0
  357. package/styles/material.d.ts +1 -0
  358. package/styles/mellow-purple.d.ts +1 -0
  359. package/styles/mexico-light.d.ts +1 -0
  360. package/styles/mocha.d.ts +1 -0
  361. package/styles/mono-blue.d.ts +1 -0
  362. package/styles/monokai-sublime.d.ts +1 -0
  363. package/styles/monokai.d.ts +1 -0
  364. package/styles/nebula.d.ts +1 -0
  365. package/styles/night-owl.d.ts +1 -0
  366. package/styles/nnfx-dark.d.ts +1 -0
  367. package/styles/nnfx-light.d.ts +1 -0
  368. package/styles/nord.d.ts +1 -0
  369. package/styles/nova.d.ts +1 -0
  370. package/styles/obsidian.d.ts +1 -0
  371. package/styles/ocean.d.ts +1 -0
  372. package/styles/oceanicnext.d.ts +1 -0
  373. package/styles/one-light.d.ts +1 -0
  374. package/styles/onedark.d.ts +1 -0
  375. package/styles/outrun-dark.d.ts +1 -0
  376. package/styles/panda-syntax-dark.css +87 -0
  377. package/styles/panda-syntax-dark.d.ts +1 -0
  378. package/styles/panda-syntax-dark.js +3 -0
  379. package/styles/panda-syntax-light.css +84 -0
  380. package/styles/panda-syntax-light.d.ts +1 -0
  381. package/styles/panda-syntax-light.js +3 -0
  382. package/styles/papercolor-dark.d.ts +1 -0
  383. package/styles/papercolor-light.d.ts +1 -0
  384. package/styles/paraiso-dark.d.ts +1 -0
  385. package/styles/paraiso-light.d.ts +1 -0
  386. package/styles/paraiso.d.ts +1 -0
  387. package/styles/pasque.d.ts +1 -0
  388. package/styles/phd.d.ts +1 -0
  389. package/styles/pico.d.ts +1 -0
  390. package/styles/pojoaque.d.ts +1 -0
  391. package/styles/pop.d.ts +1 -0
  392. package/styles/porple.d.ts +1 -0
  393. package/styles/purebasic.d.ts +1 -0
  394. package/styles/qtcreator-dark.d.ts +1 -0
  395. package/styles/qtcreator-light.d.ts +1 -0
  396. package/styles/qualia.d.ts +1 -0
  397. package/styles/railscasts.d.ts +1 -0
  398. package/styles/rainbow.d.ts +1 -0
  399. package/styles/rebecca.d.ts +1 -0
  400. package/styles/ros-pine-dawn.d.ts +1 -0
  401. package/styles/ros-pine-moon.d.ts +1 -0
  402. package/styles/ros-pine.d.ts +1 -0
  403. package/styles/routeros.d.ts +1 -0
  404. package/styles/sagelight.d.ts +1 -0
  405. package/styles/sandcastle.d.ts +1 -0
  406. package/styles/school-book.d.ts +1 -0
  407. package/styles/seti-ui.d.ts +1 -0
  408. package/styles/shades-of-purple.d.ts +1 -0
  409. package/styles/shapeshifter.d.ts +1 -0
  410. package/styles/silk-dark.d.ts +1 -0
  411. package/styles/silk-light.d.ts +1 -0
  412. package/styles/snazzy.d.ts +1 -0
  413. package/styles/solar-flare-light.d.ts +1 -0
  414. package/styles/solar-flare.d.ts +1 -0
  415. package/styles/solarized-dark.d.ts +1 -0
  416. package/styles/solarized-light.d.ts +1 -0
  417. package/styles/spacemacs.d.ts +1 -0
  418. package/styles/srcery.d.ts +1 -0
  419. package/styles/stackoverflow-dark.d.ts +1 -0
  420. package/styles/stackoverflow-light.d.ts +1 -0
  421. package/styles/summercamp.d.ts +1 -0
  422. package/styles/summerfruit-dark.d.ts +1 -0
  423. package/styles/summerfruit-light.d.ts +1 -0
  424. package/styles/sunburst.d.ts +1 -0
  425. package/styles/synth-midnight-terminal-dark.d.ts +1 -0
  426. package/styles/synth-midnight-terminal-light.d.ts +1 -0
  427. package/styles/tango.d.ts +1 -0
  428. package/styles/tender.d.ts +1 -0
  429. package/styles/tokyo-night-dark.d.ts +1 -0
  430. package/styles/tokyo-night-light.d.ts +1 -0
  431. package/styles/tomorrow-night-blue.d.ts +1 -0
  432. package/styles/tomorrow-night-bright.d.ts +1 -0
  433. package/styles/tomorrow-night.d.ts +1 -0
  434. package/styles/tomorrow.d.ts +1 -0
  435. package/styles/twilight.d.ts +1 -0
  436. package/styles/unikitty-dark.d.ts +1 -0
  437. package/styles/unikitty-light.d.ts +1 -0
  438. package/styles/vs.d.ts +1 -0
  439. package/styles/vs2015.d.ts +1 -0
  440. package/styles/vulcan.d.ts +1 -0
  441. package/styles/windows-10-light.d.ts +1 -0
  442. package/styles/windows-10.d.ts +1 -0
  443. package/styles/windows-95-light.d.ts +1 -0
  444. package/styles/windows-95.d.ts +1 -0
  445. package/styles/windows-high-contrast-light.d.ts +1 -0
  446. package/styles/windows-high-contrast.d.ts +1 -0
  447. package/styles/windows-nt-light.d.ts +1 -0
  448. package/styles/windows-nt.d.ts +1 -0
  449. package/styles/woodland.d.ts +1 -0
  450. package/styles/xcode-dusk.d.ts +1 -0
  451. package/styles/xcode.d.ts +1 -0
  452. package/styles/xt256.d.ts +1 -0
  453. package/styles/zenburn.d.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [6.2.1](https://github.com/metonym/svelte-highlight/releases/tag/v6.2.1) - 2022-08-07
9
+
10
+ **Fixes**
11
+
12
+ - generate types for `svelte-highlight/languages/*`, `svelte-highlight/styles/*`
13
+
14
+ **Documentation**
15
+
16
+ - add dynamic import example
17
+ - document CDN styles usage
18
+ - use TypeScript in all example set-ups
19
+ - remove Sapper example as it is deprecated
20
+ - remove Snowpack example as it is no longer maintained
21
+ - update set-up instructions for SvelteKit/Vite
22
+
23
+ ## [6.2.0](https://github.com/metonym/svelte-highlight/releases/tag/v6.2.0) - 2022-07-13
24
+
25
+ **Features**
26
+
27
+ - upgrade `highlight.js` to version [11.6.0](https://github.com/highlightjs/highlight.js/releases/tag/11.6.0) (net +2 styles)
28
+
29
+ ## [6.1.1](https://github.com/metonym/svelte-highlight/releases/tag/v6.1.1) - 2022-07-02
30
+
31
+ **Fixes**
32
+
33
+ - remove `language` prop type from `HighlightAuto` TypeScript definitions
34
+
8
35
  ## [6.1.1](https://github.com/metonym/svelte-highlight/releases/tag/v6.1.1) - 2022-06-27
9
36
 
10
37
  **Refactor**
@@ -38,7 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
38
65
 
39
66
  ## [5.3.2](https://github.com/metonym/svelte-highlight/releases/tag/v5.3.2) - 2022-03-16
40
67
 
41
- - specify in docs that vite should optimize both "highlight.js" and "highlight.js/lib/core" if using SvelteKit or vite
68
+ - specify in docs that Vite should optimize both "highlight.js" and "highlight.js/lib/core" if using SvelteKit or Vite
42
69
 
43
70
  ## [5.3.1](https://github.com/metonym/svelte-highlight/releases/tag/v5.3.1) - 2022-03-16
44
71
 
@@ -5,10 +5,21 @@ export interface Language {
5
5
  name?: string;
6
6
  register: LanguageFn;
7
7
  }
8
+ export interface Slots {
9
+ default: {
10
+ /**
11
+ * The highlighted code.
12
+ */
13
+ highlighted: HighlightedCode;
14
+ };
15
+ }
8
16
  export interface Events {
9
- highlight: {
17
+ highlight: CustomEvent<{
18
+ /**
19
+ * The highlighted code.
20
+ */
10
21
  highlighted?: HighlightedCode;
11
- };
22
+ }>;
12
23
  }
13
24
  declare const __propDef: {
14
25
  props: {
@@ -346,19 +357,17 @@ declare const __propDef: {
346
357
  /**
347
358
  * Set to `true` for the language name to be
348
359
  * displayed at the top right of the code block.
360
+ *
361
+ * Use CSS variables to customize styles:
362
+ * - `--hljs-background`
363
+ * - `--hljs-foreground`
364
+ * - `--hljs-radius`
349
365
  */
350
366
  langtag?: boolean;
351
367
  };
352
- events: {
353
- highlight: CustomEvent<any>;
354
- } & {
355
- [evt: string]: CustomEvent<any>;
356
- };
357
- slots: {
358
- default: {
359
- highlighted: HighlightedCode;
360
- };
361
- };
368
+ slots: Slots;
369
+ getters: {};
370
+ events: Events;
362
371
  };
363
372
  export declare type HighlightProps = typeof __propDef.props;
364
373
  export declare type HighlightEvents = typeof __propDef.events;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { HighlightedCode, Language } from "./Highlight.svelte";
2
+ import type { Slots, Events } from "./Highlight.svelte";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  width?: number;
@@ -328,27 +328,20 @@ declare const __propDef: {
328
328
  * Specify the source code to highlight.
329
329
  */
330
330
  code?: any;
331
- /**
332
- * Provide the language to highlight the code.
333
- * Import languages from `svelte-highlight/languages/*`.
334
- */
335
- language?: Language;
336
331
  /**
337
332
  * Set to `true` for the language name to be
338
333
  * displayed at the top right of the code block.
334
+ *
335
+ * Use CSS variables to customize styles:
336
+ * - `--hljs-background`
337
+ * - `--hljs-foreground`
338
+ * - `--hljs-radius`
339
339
  */
340
340
  langtag?: boolean;
341
341
  };
342
- events: {
343
- highlight: CustomEvent<any>;
344
- } & {
345
- [evt: string]: CustomEvent<any>;
346
- };
347
- slots: {
348
- default: {
349
- highlighted: HighlightedCode;
350
- };
351
- };
342
+ slots: Slots;
343
+ getters: {};
344
+ events: Events;
352
345
  };
353
346
  export declare type HighlightAutoProps = typeof __propDef.props;
354
347
  export declare type HighlightAutoEvents = typeof __propDef.events;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { HighlightedCode } from "./Highlight.svelte";
2
+ import type { Slots, Events } from "./Highlight.svelte";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  width?: number;
@@ -331,19 +331,17 @@ declare const __propDef: {
331
331
  /**
332
332
  * Set to `true` for the language name to be
333
333
  * displayed at the top right of the code block.
334
+ *
335
+ * Use CSS variables to customize styles:
336
+ * - `--hljs-background`
337
+ * - `--hljs-foreground`
338
+ * - `--hljs-radius`
334
339
  */
335
340
  langtag?: boolean;
336
341
  };
337
- events: {
338
- highlight: CustomEvent<any>;
339
- } & {
340
- [evt: string]: CustomEvent<any>;
341
- };
342
- slots: {
343
- default: {
344
- highlighted: HighlightedCode;
345
- };
346
- };
342
+ slots: Slots;
343
+ getters: {};
344
+ events: Events;
347
345
  };
348
346
  export declare type HighlightSvelteProps = typeof __propDef.props;
349
347
  export declare type HighlightSvelteEvents = typeof __propDef.events;
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  > Syntax highlighting for Svelte using [highlight.js](https://github.com/highlightjs/highlight.js).
7
7
 
8
- Try it in the [StackBlitz](https://stackblitz.com/edit/svelte-highlight?file=src%2Froutes%2Findex.svelte).
8
+ Try it in [StackBlitz](https://stackblitz.com/edit/svelte-highlight?file=src%2Froutes%2Findex.svelte).
9
9
 
10
10
  ## [Documentation](https://svhe.onrender.com)
11
11
 
@@ -22,33 +22,40 @@ npm i -D svelte-highlight
22
22
  pnpm i -D svelte-highlight highlight.js
23
23
  ```
24
24
 
25
- Note that [pnpm](https://github.com/pnpm/pnpm) users must also install `highlight.js` as a development dependency.
25
+ Note that [pnpm](https://github.com/pnpm/pnpm) users must also install `highlight.js`.
26
26
 
27
27
  ## SvelteKit Set-up
28
28
 
29
- To use this library with [SvelteKit](https://github.com/sveltejs/kit) or [vite](https://github.com/sveltejs/vite-plugin-svelte), instruct vite to optimize `highlight.js` and `highlight.js/lib/core`:
29
+ To use this library with [SvelteKit](https://github.com/sveltejs/kit) or [Vite](https://github.com/sveltejs/vite-plugin-svelte), instruct Vite to [optimize](https://vitejs.dev/config/dep-optimization-options.html#optimizedeps-include) `highlight.js` and `highlight.js/lib/core`:
30
30
 
31
31
  ```diff
32
- # svelte.config.js
32
+ + optimizeDeps: {
33
+ + include: ["highlight.js", "highlight.js/lib/core"],
34
+ + },
35
+ ```
36
+
37
+ **vite.config.js**
38
+
39
+ ```js
40
+ import { sveltekit } from "@sveltejs/kit/vite";
41
+
42
+ /** @type {import('vite').UserConfig} */
33
43
  export default {
34
- kit: {
35
- + vite: {
36
- + optimizeDeps: {
37
- + include: ["highlight.js", "highlight.js/lib/core"],
38
- + },
39
- + },
44
+ plugins: [sveltekit()],
45
+ optimizeDeps: {
46
+ include: ["highlight.js", "highlight.js/lib/core"],
40
47
  },
41
48
  };
42
49
  ```
43
50
 
44
- Refer to [examples/sveltekit](examples/sveltekit) for an example set-up.
51
+ Refer to [examples/sveltekit](examples/sveltekit) or [examples/vite](examples/vite).
45
52
 
46
53
  ## Usage
47
54
 
48
- There are two ways to apply `highlight.js` styles:
55
+ There are two ways to apply `highlight.js` styles.
49
56
 
50
- 1. JavaScript styles injected into the DOM through `svelte:head`
51
- 2. CSS StyleSheets imported using a file loader
57
+ 1. Injected styles through [svelte:head](https://svelte.dev/docs#template-syntax-svelte-head)
58
+ 2. CSS StyleSheets
52
59
 
53
60
  ### Injected Styles
54
61
 
@@ -86,6 +93,37 @@ Depending on your set-up, importing a CSS StyleSheet in Svelte may require a CSS
86
93
  <Highlight language={typescript} {code} />
87
94
  ```
88
95
 
96
+ #### Linking from a CDN
97
+
98
+ CSS StyleSheets can also be externally linked from a Content Delivery Network (CDN) like [unpkg.com](https://unpkg.com/).
99
+
100
+ This is best suited for prototyping and not recommended for production use.
101
+
102
+ **HTML**
103
+
104
+ ```html
105
+ <!DOCTYPE html>
106
+ <html lang="en">
107
+ <head>
108
+ <link
109
+ rel="stylesheet"
110
+ href="https://unpkg.com/svelte-highlight/styles/github.css"
111
+ />
112
+ </head>
113
+ </html>
114
+ ```
115
+
116
+ **svelte:head**
117
+
118
+ ```svelte
119
+ <svelte:head>
120
+ <link
121
+ rel="stylesheet"
122
+ href="https://unpkg.com/svelte-highlight/styles/github.css"
123
+ />
124
+ </svelte:head>
125
+ ```
126
+
89
127
  ## Svelte Syntax Highlighting
90
128
 
91
129
  Use the `HighlightSvelte` component for Svelte syntax highlighting.
@@ -107,9 +145,9 @@ Use the `HighlightSvelte` component for Svelte syntax highlighting.
107
145
 
108
146
  ## Auto-highlighting
109
147
 
110
- The `HighlightAuto` component invokes the `highlightAuto` API from `highlight.js`.
148
+ The `HighlightAuto` component uses [highlightAuto](https://highlightjs.readthedocs.io/en/latest/api.html#highlightauto) API.
111
149
 
112
- Note that auto-highlighting will result in a larger bundle size in order to infer a language.
150
+ **Note:** auto-highlighting will result in a larger bundle size in order to infer a language.
113
151
 
114
152
  Prefer to specify a language if possible.
115
153
 
@@ -132,8 +170,6 @@ Prefer to specify a language if possible.
132
170
 
133
171
  All `Highlight` components apply a `data-language` attribute on the codeblock containing the language name.
134
172
 
135
- This is also compatible with custom languages.
136
-
137
173
  See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languages.
138
174
 
139
175
  ```css
@@ -146,11 +182,9 @@ See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languag
146
182
 
147
183
  All `Highlight` components allow for a tag to be added at the top-right of the codeblock displaying the language name.
148
184
 
149
- The language tag can be given a custom `background` , `color` , and `border-radius` through the custom properties shown.
185
+ The language tag can be given a custom `background` , `color` , and `border-radius` through CSS custom properties.
150
186
 
151
- This is also compatible with custom languages.
152
-
153
- It is recommended that you set values for `--hljs-background` and `--hljs-foreground` to ensure the langtags remain readable on any theme.
187
+ It is recommended that you set values for `--hljs-background` and `--hljs-foreground` to ensure the langtags are readable with your theme.
154
188
 
155
189
  See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languages.
156
190
 
@@ -194,6 +228,7 @@ Refer to the highlight.js [language definition guide](https://highlightjs.readth
194
228
  register: (hljs) => {
195
229
  return {
196
230
  /** custom language rules */
231
+ contains: [],
197
232
  };
198
233
  },
199
234
  };
@@ -202,6 +237,38 @@ Refer to the highlight.js [language definition guide](https://highlightjs.readth
202
237
  <Highlight {language} code="..." />
203
238
  ```
204
239
 
240
+ ## Code-splitting
241
+
242
+ You can use the `dynamic import` syntax to code-split code.
243
+
244
+ In the example below, the `HighlightAuto` component and injected styles are dynamically loaded.
245
+
246
+ ```svelte
247
+ <script>
248
+ import { onMount } from "svelte";
249
+
250
+ let component;
251
+ let styles;
252
+
253
+ onMount(async () => {
254
+ component = (await import("svelte-highlight")).HighlightAuto;
255
+ styles = (await import("svelte-highlight/styles/github")).default;
256
+ });
257
+ </script>
258
+
259
+ <svelte:head>
260
+ {#if styles}
261
+ {@html styles}
262
+ {/if}
263
+ </svelte:head>
264
+
265
+ <svelte:component
266
+ this={component}
267
+ langtag
268
+ code={`body {\n padding: 0;\n color: red;\n}`}
269
+ />
270
+ ```
271
+
205
272
  ## API
206
273
 
207
274
  ### Props
@@ -241,8 +308,6 @@ TypeScript definitions are auto-generated by SvelteKit.
241
308
  ## Examples
242
309
 
243
310
  - [examples/rollup](examples/rollup)
244
- - [examples/rollup-typescript](examples/rollup-typescript)
245
- - [examples/snowpack](examples/snowpack)
246
311
  - [examples/sveltekit](examples/sveltekit)
247
312
  - [examples/vite](examples/vite)
248
313
  - [examples/webpack](examples/webpack)
@@ -0,0 +1,2 @@
1
+ export { _1c } from "./";
2
+ export { _1c as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { abnf } from "./";
2
+ export { abnf as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { accesslog } from "./";
2
+ export { accesslog as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { actionscript } from "./";
2
+ export { actionscript as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { ada } from "./";
2
+ export { ada as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { angelscript } from "./";
2
+ export { angelscript as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { apache } from "./";
2
+ export { apache as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { applescript } from "./";
2
+ export { applescript as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { arcade } from "./";
2
+ export { arcade as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { arduino } from "./";
2
+ export { arduino as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { armasm } from "./";
2
+ export { armasm as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { asciidoc } from "./";
2
+ export { asciidoc as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { aspectj } from "./";
2
+ export { aspectj as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { autohotkey } from "./";
2
+ export { autohotkey as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { autoit } from "./";
2
+ export { autoit as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { avrasm } from "./";
2
+ export { avrasm as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { awk } from "./";
2
+ export { awk as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { axapta } from "./";
2
+ export { axapta as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { bash } from "./";
2
+ export { bash as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { basic } from "./";
2
+ export { basic as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { bnf } from "./";
2
+ export { bnf as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { brainfuck } from "./";
2
+ export { brainfuck as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { c } from "./";
2
+ export { c as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { cal } from "./";
2
+ export { cal as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { capnproto } from "./";
2
+ export { capnproto as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { ceylon } from "./";
2
+ export { ceylon as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { clean } from "./";
2
+ export { clean as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { clojureRepl } from "./";
2
+ export { clojureRepl as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { clojure } from "./";
2
+ export { clojure as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { cmake } from "./";
2
+ export { cmake as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { coffeescript } from "./";
2
+ export { coffeescript as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { coq } from "./";
2
+ export { coq as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { cos } from "./";
2
+ export { cos as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { cpp } from "./";
2
+ export { cpp as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { crmsh } from "./";
2
+ export { crmsh as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { crystal } from "./";
2
+ export { crystal as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { csharp } from "./";
2
+ export { csharp as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { csp } from "./";
2
+ export { csp as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { css } from "./";
2
+ export { css as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { d } from "./";
2
+ export { d as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { dart } from "./";
2
+ export { dart as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { delphi } from "./";
2
+ export { delphi as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { diff } from "./";
2
+ export { diff as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { django } from "./";
2
+ export { django as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { dns } from "./";
2
+ export { dns as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { dockerfile } from "./";
2
+ export { dockerfile as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { dos } from "./";
2
+ export { dos as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { dsconfig } from "./";
2
+ export { dsconfig as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { dts } from "./";
2
+ export { dts as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { dust } from "./";
2
+ export { dust as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { ebnf } from "./";
2
+ export { ebnf as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { elixir } from "./";
2
+ export { elixir as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { elm } from "./";
2
+ export { elm as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { erb } from "./";
2
+ export { erb as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { erlangRepl } from "./";
2
+ export { erlangRepl as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { erlang } from "./";
2
+ export { erlang as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { excel } from "./";
2
+ export { excel as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { fix } from "./";
2
+ export { fix as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { flix } from "./";
2
+ export { flix as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { fortran } from "./";
2
+ export { fortran as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { fsharp } from "./";
2
+ export { fsharp as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { gams } from "./";
2
+ export { gams as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { gauss } from "./";
2
+ export { gauss as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { gcode } from "./";
2
+ export { gcode as default } from "./";
@@ -0,0 +1,2 @@
1
+ export { gherkin } from "./";
2
+ export { gherkin as default } from "./";