@qwik.dev/devtools 0.2.8 → 0.3.0-beta.3

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 (645) hide show
  1. package/LICENSE +2 -1
  2. package/dist/kit/index.d.mts +568 -0
  3. package/dist/kit/index.mjs +323 -0
  4. package/dist/plugin/codegen.d.mts +13 -0
  5. package/dist/plugin/codegen.mjs +2 -0
  6. package/dist/plugin/create-hook-runtime-ChnIePeB.mjs +739 -0
  7. package/dist/plugin/index.d.mts +9 -4
  8. package/dist/plugin/index.mjs +1562 -9554
  9. package/dist/ui/_virtual/_commonjsHelpers.qwik.mjs +6 -0
  10. package/dist/ui/_virtual/browser.qwik.mjs +7 -0
  11. package/dist/ui/_virtual/browser.qwik2.mjs +4 -0
  12. package/dist/ui/bundle-graph-eeik1E53.json +1 -0
  13. package/dist/ui/entry.extension.qwik.mjs +16 -0
  14. package/dist/ui/index.qwik.mjs +6 -2
  15. package/dist/ui/lib-types/kit/src/overlay-paths.d.ts +2 -0
  16. package/dist/ui/lib-types/ui/src/components/IconButton/IconButton.d.ts +10 -0
  17. package/dist/ui/lib-types/ui/src/components/Icons/Icons.d.ts +15 -0
  18. package/dist/ui/lib-types/ui/src/components/InfoBanner/InfoBanner.d.ts +7 -0
  19. package/dist/ui/lib-types/ui/src/components/ThemeToggle/QwikThemeToggle.d.ts +1 -1
  20. package/dist/ui/lib-types/ui/src/components/Tree/Tree.d.ts +6 -2
  21. package/dist/ui/lib-types/ui/src/components/Tree/type.d.ts +2 -3
  22. package/dist/ui/lib-types/ui/src/devtools/CommandPalette.d.ts +10 -0
  23. package/dist/ui/lib-types/ui/src/devtools/CustomizeTabsPanel.d.ts +11 -0
  24. package/dist/ui/lib-types/ui/src/devtools/DevtoolsContent.d.ts +6 -0
  25. package/dist/ui/lib-types/ui/src/devtools/DevtoolsSidebar.d.ts +6 -0
  26. package/dist/ui/lib-types/ui/src/devtools/QwikDevtools.d.ts +6 -0
  27. package/dist/ui/lib-types/ui/src/devtools/QwikDevtoolsExtension.d.ts +13 -0
  28. package/dist/ui/lib-types/ui/src/devtools/command-palette.d.ts +52 -0
  29. package/dist/ui/lib-types/ui/src/devtools/data-provider.d.ts +12 -0
  30. package/dist/ui/lib-types/ui/src/devtools/page-data-source.d.ts +9 -0
  31. package/dist/ui/lib-types/ui/src/devtools/rpc.d.ts +9 -0
  32. package/dist/ui/lib-types/ui/src/devtools/sidebar-tabs.d.ts +27 -0
  33. package/dist/ui/lib-types/ui/src/devtools/state.d.ts +39 -0
  34. package/dist/ui/lib-types/ui/src/devtools/tabs.d.ts +10 -0
  35. package/dist/ui/lib-types/ui/src/devtools.d.ts +1 -2
  36. package/dist/ui/lib-types/ui/src/entry.extension.d.ts +15 -0
  37. package/dist/ui/lib-types/ui/src/features/BuildAnalysis/BuildAnalysis.d.ts +2 -0
  38. package/dist/ui/lib-types/ui/src/features/CodeBreak/CodeBreak.d.ts +1 -0
  39. package/dist/ui/lib-types/ui/src/features/HookTree/HookTree.d.ts +4 -0
  40. package/dist/ui/lib-types/ui/src/features/HookTree/hookTreeHelpers.d.ts +14 -0
  41. package/dist/ui/lib-types/ui/src/features/Packages/Packages.d.ts +1 -1
  42. package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyCard/DependencyCard.d.ts +5 -2
  43. package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyOperationFeedback/DependencyOperationFeedback.d.ts +14 -0
  44. package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyOperationFeedback/index.d.ts +1 -0
  45. package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyToolbar/DependencyToolbar.d.ts +13 -0
  46. package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyToolbar/index.d.ts +1 -0
  47. package/dist/ui/lib-types/ui/src/features/Packages/components/InstalledDependencyList/InstalledDependencyList.d.ts +12 -0
  48. package/dist/ui/lib-types/ui/src/features/Packages/components/InstalledDependencyList/index.d.ts +1 -0
  49. package/dist/ui/lib-types/ui/src/features/Packages/components/PackageSearchResults/PackageSearchResults.d.ts +15 -0
  50. package/dist/ui/lib-types/ui/src/features/Packages/components/PackageSearchResults/index.d.ts +1 -0
  51. package/dist/ui/lib-types/ui/src/features/Packages/components/SearchResultCard/SearchResultCard.d.ts +11 -0
  52. package/dist/ui/lib-types/ui/src/features/Packages/components/SearchResultCard/index.d.ts +1 -0
  53. package/dist/ui/lib-types/ui/src/features/Packages/package-utils.d.ts +7 -0
  54. package/dist/ui/lib-types/ui/src/features/Packages/types.d.ts +4 -24
  55. package/dist/ui/lib-types/ui/src/features/Performance/Performance.d.ts +4 -1
  56. package/dist/ui/lib-types/ui/src/features/Performance/components/ComponentCard.d.ts +8 -0
  57. package/dist/ui/lib-types/ui/src/features/Performance/components/HookDetailsPanel.d.ts +7 -0
  58. package/dist/ui/lib-types/ui/src/features/Performance/components/PerformanceOverview.d.ts +6 -0
  59. package/dist/ui/lib-types/ui/src/features/Performance/components/StatCard.d.ts +7 -0
  60. package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.d.ts +1 -1
  61. package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.d.ts +5 -4
  62. package/dist/ui/lib-types/ui/src/features/Performance/utils/formatMs.d.ts +1 -0
  63. package/dist/ui/lib-types/ui/src/features/Preloads/Preloads.d.ts +1 -0
  64. package/dist/ui/lib-types/ui/src/features/Preloads/computePreloadViewModel.d.ts +56 -0
  65. package/dist/ui/lib-types/ui/src/features/RenderTree/RenderTree.d.ts +4 -1
  66. package/dist/ui/lib-types/ui/src/features/RenderTree/TreeBuilder.d.ts +15 -41
  67. package/dist/ui/lib-types/ui/src/features/RenderTree/components/HighlightedCodeList.d.ts +7 -0
  68. package/dist/ui/lib-types/ui/src/features/RenderTree/components/HookFiltersCard.d.ts +11 -0
  69. package/dist/ui/lib-types/ui/src/features/RenderTree/components/RenderTreeTabs.d.ts +9 -0
  70. package/dist/ui/lib-types/ui/src/features/RenderTree/components/StateTreeNodeLabel.d.ts +6 -0
  71. package/dist/ui/lib-types/ui/src/features/RenderTree/data.d.ts +12 -20
  72. package/dist/ui/lib-types/ui/src/features/RenderTree/formatTreeData.d.ts +16 -47
  73. package/dist/ui/lib-types/ui/src/features/RenderTree/index.d.ts +1 -1
  74. package/dist/ui/lib-types/ui/src/features/RenderTree/types.d.ts +29 -45
  75. package/dist/ui/lib-types/ui/src/features/RenderTree/utils/filterHookTree.d.ts +3 -0
  76. package/dist/ui/lib-types/ui/src/features/RenderTree/utils/getCodeLanguage.d.ts +1 -0
  77. package/dist/ui/lib-types/ui/src/features/RenderTree/utils/getValueColorClass.d.ts +2 -0
  78. package/dist/ui/lib-types/ui/src/index.d.ts +3 -1
  79. package/dist/ui/lib-types/ui/src/runtime/preloads.d.ts +11 -0
  80. package/dist/ui/lib-types/ui/src/types/state.d.ts +1 -13
  81. package/dist/ui/node_modules/.pnpm/@shikijs_core@4.0.2/node_modules/@shikijs/core/dist/index.qwik.mjs +1035 -1060
  82. package/dist/ui/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/engine-compile.qwik.mjs +36 -0
  83. package/dist/ui/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/scanner-BFcBmQR1.qwik.mjs +78 -0
  84. package/dist/ui/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/index.qwik.mjs +408 -361
  85. package/dist/ui/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.qwik.mjs +9 -6
  86. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/abap.qwik.mjs +7 -3
  87. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/actionscript-3.qwik.mjs +7 -3
  88. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ada.qwik.mjs +7 -3
  89. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-expression.qwik.mjs +7 -3
  90. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-html.qwik.mjs +16 -16
  91. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-style.qwik.mjs +9 -6
  92. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-template.qwik.mjs +10 -10
  93. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-let-declaration.qwik.mjs +9 -6
  94. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template-blocks.qwik.mjs +10 -10
  95. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template.qwik.mjs +9 -6
  96. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-ts.qwik.mjs +18 -18
  97. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apache.qwik.mjs +7 -3
  98. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apex.qwik.mjs +7 -3
  99. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apl.qwik.mjs +16 -16
  100. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/applescript.qwik.mjs +7 -3
  101. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ara.qwik.mjs +7 -3
  102. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asciidoc.qwik.mjs +7 -3
  103. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asm.qwik.mjs +7 -3
  104. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/astro.qwik.mjs +18 -18
  105. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/awk.qwik.mjs +7 -3
  106. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ballerina.qwik.mjs +7 -3
  107. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bat.qwik.mjs +7 -3
  108. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/beancount.qwik.mjs +7 -3
  109. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/berry.qwik.mjs +7 -3
  110. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bibtex.qwik.mjs +7 -3
  111. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bicep.qwik.mjs +7 -3
  112. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bird2.qwik.mjs +7 -3
  113. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/blade.qwik.mjs +20 -20
  114. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bsl.qwik.mjs +9 -6
  115. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c.qwik.mjs +7 -3
  116. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c3.qwik.mjs +7 -3
  117. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cadence.qwik.mjs +7 -3
  118. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cairo.qwik.mjs +9 -6
  119. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clarity.qwik.mjs +7 -3
  120. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clojure.qwik.mjs +7 -3
  121. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cmake.qwik.mjs +7 -3
  122. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cobol.qwik.mjs +10 -10
  123. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeowners.qwik.mjs +7 -3
  124. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeql.qwik.mjs +7 -3
  125. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coffee.qwik.mjs +9 -6
  126. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/common-lisp.qwik.mjs +7 -3
  127. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coq.qwik.mjs +7 -3
  128. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp-macro.qwik.mjs +12 -12
  129. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp.qwik.mjs +14 -14
  130. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/crystal.qwik.mjs +18 -18
  131. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csharp.qwik.mjs +7 -3
  132. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/css.qwik.mjs +7 -3
  133. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csv.qwik.mjs +7 -3
  134. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cue.qwik.mjs +7 -3
  135. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cypher.qwik.mjs +7 -3
  136. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/d.qwik.mjs +7 -3
  137. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dart.qwik.mjs +7 -3
  138. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dax.qwik.mjs +7 -3
  139. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/desktop.qwik.mjs +7 -3
  140. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/diff.qwik.mjs +7 -3
  141. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/docker.qwik.mjs +7 -3
  142. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dotenv.qwik.mjs +7 -3
  143. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dream-maker.qwik.mjs +7 -3
  144. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/edge.qwik.mjs +12 -12
  145. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elixir.qwik.mjs +9 -6
  146. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elm.qwik.mjs +9 -6
  147. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/emacs-lisp.qwik.mjs +7 -3
  148. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erb.qwik.mjs +10 -10
  149. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erlang.qwik.mjs +9 -6
  150. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-css.qwik.mjs +12 -12
  151. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-glsl.qwik.mjs +12 -12
  152. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-html.qwik.mjs +12 -12
  153. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-sql.qwik.mjs +10 -10
  154. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-xml.qwik.mjs +9 -6
  155. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fennel.qwik.mjs +7 -3
  156. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fish.qwik.mjs +7 -3
  157. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fluent.qwik.mjs +7 -3
  158. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-fixed-form.qwik.mjs +9 -6
  159. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-free-form.qwik.mjs +7 -3
  160. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fsharp.qwik.mjs +9 -6
  161. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdresource.qwik.mjs +10 -10
  162. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdscript.qwik.mjs +7 -3
  163. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdshader.qwik.mjs +7 -3
  164. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/genie.qwik.mjs +7 -3
  165. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gherkin.qwik.mjs +7 -3
  166. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-commit.qwik.mjs +9 -6
  167. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-rebase.qwik.mjs +9 -6
  168. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gleam.qwik.mjs +7 -3
  169. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-js.qwik.mjs +14 -14
  170. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-ts.qwik.mjs +14 -14
  171. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glsl.qwik.mjs +9 -6
  172. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gn.qwik.mjs +7 -3
  173. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gnuplot.qwik.mjs +7 -3
  174. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/go.qwik.mjs +7 -3
  175. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/graphql.qwik.mjs +14 -14
  176. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/groovy.qwik.mjs +7 -3
  177. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hack.qwik.mjs +10 -10
  178. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haml.qwik.mjs +10 -10
  179. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/handlebars.qwik.mjs +14 -14
  180. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haskell.qwik.mjs +7 -3
  181. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haxe.qwik.mjs +7 -3
  182. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hcl.qwik.mjs +7 -3
  183. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hjson.qwik.mjs +7 -3
  184. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hlsl.qwik.mjs +7 -3
  185. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html-derivative.qwik.mjs +9 -6
  186. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html.qwik.mjs +10 -10
  187. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/http.qwik.mjs +14 -14
  188. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hurl.qwik.mjs +12 -12
  189. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hxml.qwik.mjs +9 -6
  190. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hy.qwik.mjs +7 -3
  191. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/imba.qwik.mjs +7 -3
  192. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ini.qwik.mjs +7 -3
  193. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/java.qwik.mjs +7 -3
  194. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/javascript.qwik.mjs +7 -3
  195. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja-html.qwik.mjs +9 -6
  196. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja.qwik.mjs +9 -6
  197. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jison.qwik.mjs +9 -6
  198. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json.qwik.mjs +7 -3
  199. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json5.qwik.mjs +7 -3
  200. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonc.qwik.mjs +7 -3
  201. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonl.qwik.mjs +7 -3
  202. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonnet.qwik.mjs +7 -3
  203. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jssm.qwik.mjs +7 -3
  204. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsx.qwik.mjs +7 -3
  205. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/julia.qwik.mjs +16 -16
  206. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/just.qwik.mjs +18 -18
  207. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kdl.qwik.mjs +7 -3
  208. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kotlin.qwik.mjs +7 -3
  209. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kusto.qwik.mjs +7 -3
  210. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/latex.qwik.mjs +9 -6
  211. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lean.qwik.mjs +7 -3
  212. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/less.qwik.mjs +7 -3
  213. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/liquid.qwik.mjs +14 -14
  214. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/llvm.qwik.mjs +7 -3
  215. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/log.qwik.mjs +7 -3
  216. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/logo.qwik.mjs +7 -3
  217. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lua.qwik.mjs +9 -6
  218. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/luau.qwik.mjs +7 -3
  219. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/make.qwik.mjs +7 -3
  220. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-nix.qwik.mjs +7 -3
  221. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-vue.qwik.mjs +7 -3
  222. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown.qwik.mjs +7 -3
  223. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/marko.qwik.mjs +14 -14
  224. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/matlab.qwik.mjs +7 -3
  225. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdc.qwik.mjs +12 -12
  226. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdx.qwik.mjs +7 -3
  227. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mermaid.qwik.mjs +7 -3
  228. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mipsasm.qwik.mjs +7 -3
  229. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mojo.qwik.mjs +7 -3
  230. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/moonbit.qwik.mjs +7 -3
  231. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/move.qwik.mjs +7 -3
  232. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/narrat.qwik.mjs +7 -3
  233. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow-groovy.qwik.mjs +7 -3
  234. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow.qwik.mjs +9 -6
  235. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nginx.qwik.mjs +9 -6
  236. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nim.qwik.mjs +20 -20
  237. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nix.qwik.mjs +9 -6
  238. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nushell.qwik.mjs +7 -3
  239. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-c.qwik.mjs +7 -3
  240. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-cpp.qwik.mjs +7 -3
  241. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ocaml.qwik.mjs +7 -3
  242. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/odin.qwik.mjs +7 -3
  243. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/openscad.qwik.mjs +7 -3
  244. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pascal.qwik.mjs +7 -3
  245. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/perl.qwik.mjs +16 -16
  246. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/php.qwik.mjs +18 -18
  247. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pkl.qwik.mjs +7 -3
  248. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/plsql.qwik.mjs +7 -3
  249. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/po.qwik.mjs +7 -3
  250. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/polar.qwik.mjs +7 -3
  251. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/postcss.qwik.mjs +7 -3
  252. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powerquery.qwik.mjs +7 -3
  253. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powershell.qwik.mjs +7 -3
  254. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prisma.qwik.mjs +7 -3
  255. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prolog.qwik.mjs +7 -3
  256. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/proto.qwik.mjs +7 -3
  257. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pug.qwik.mjs +12 -12
  258. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/puppet.qwik.mjs +7 -3
  259. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/purescript.qwik.mjs +7 -3
  260. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/python.qwik.mjs +7 -3
  261. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qml.qwik.mjs +9 -6
  262. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qmldir.qwik.mjs +7 -3
  263. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qss.qwik.mjs +7 -3
  264. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/r.qwik.mjs +7 -3
  265. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/racket.qwik.mjs +7 -3
  266. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/raku.qwik.mjs +7 -3
  267. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/razor.qwik.mjs +10 -10
  268. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/reg.qwik.mjs +7 -3
  269. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/regexp.qwik.mjs +7 -3
  270. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rel.qwik.mjs +7 -3
  271. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/riscv.qwik.mjs +7 -3
  272. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ron.qwik.mjs +7 -3
  273. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rosmsg.qwik.mjs +7 -3
  274. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rst.qwik.mjs +22 -22
  275. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ruby.qwik.mjs +30 -30
  276. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rust.qwik.mjs +7 -3
  277. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sas.qwik.mjs +9 -6
  278. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sass.qwik.mjs +7 -3
  279. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scala.qwik.mjs +7 -3
  280. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scheme.qwik.mjs +7 -3
  281. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scss.qwik.mjs +9 -6
  282. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sdbl.qwik.mjs +7 -3
  283. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shaderlab.qwik.mjs +9 -6
  284. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellscript.qwik.mjs +7 -3
  285. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellsession.qwik.mjs +9 -6
  286. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/smalltalk.qwik.mjs +7 -3
  287. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/solidity.qwik.mjs +7 -3
  288. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/soy.qwik.mjs +9 -6
  289. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sparql.qwik.mjs +9 -6
  290. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/splunk.qwik.mjs +7 -3
  291. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sql.qwik.mjs +7 -3
  292. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ssh-config.qwik.mjs +7 -3
  293. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stata.qwik.mjs +9 -6
  294. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stylus.qwik.mjs +7 -3
  295. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/surrealql.qwik.mjs +9 -6
  296. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/svelte.qwik.mjs +14 -14
  297. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/swift.qwik.mjs +7 -3
  298. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/system-verilog.qwik.mjs +7 -3
  299. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/systemd.qwik.mjs +7 -3
  300. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/talonscript.qwik.mjs +7 -3
  301. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tasl.qwik.mjs +7 -3
  302. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tcl.qwik.mjs +7 -3
  303. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/templ.qwik.mjs +12 -12
  304. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/terraform.qwik.mjs +7 -3
  305. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tex.qwik.mjs +9 -6
  306. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/toml.qwik.mjs +7 -3
  307. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ts-tags.qwik.mjs +18 -18
  308. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsv.qwik.mjs +7 -3
  309. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsx.qwik.mjs +7 -3
  310. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/turtle.qwik.mjs +7 -3
  311. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/twig.qwik.mjs +18 -18
  312. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typescript.qwik.mjs +7 -3
  313. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typespec.qwik.mjs +7 -3
  314. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typst.qwik.mjs +7 -3
  315. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/v.qwik.mjs +7 -3
  316. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vala.qwik.mjs +7 -3
  317. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vb.qwik.mjs +7 -3
  318. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/verilog.qwik.mjs +7 -3
  319. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vhdl.qwik.mjs +7 -3
  320. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/viml.qwik.mjs +7 -3
  321. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-directives.qwik.mjs +7 -3
  322. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-html.qwik.mjs +9 -6
  323. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-interpolations.qwik.mjs +7 -3
  324. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.qwik.mjs +9 -6
  325. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-vine.qwik.mjs +18 -18
  326. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue.qwik.mjs +26 -26
  327. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vyper.qwik.mjs +7 -3
  328. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wasm.qwik.mjs +7 -3
  329. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wenyan.qwik.mjs +7 -3
  330. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wgsl.qwik.mjs +7 -3
  331. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wikitext.qwik.mjs +7 -3
  332. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wit.qwik.mjs +7 -3
  333. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wolfram.qwik.mjs +7 -3
  334. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xml.qwik.mjs +9 -6
  335. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xsl.qwik.mjs +9 -6
  336. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/yaml.qwik.mjs +7 -3
  337. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zenscript.qwik.mjs +7 -3
  338. package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zig.qwik.mjs +7 -3
  339. package/dist/ui/node_modules/.pnpm/@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs +661 -730
  340. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/andromeeda.qwik.mjs +4 -4
  341. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/aurora-x.qwik.mjs +4 -4
  342. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-dark.qwik.mjs +4 -4
  343. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-light.qwik.mjs +4 -4
  344. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-mirage.qwik.mjs +4 -4
  345. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-frappe.qwik.mjs +4 -4
  346. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-latte.qwik.mjs +4 -4
  347. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-macchiato.qwik.mjs +4 -4
  348. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-mocha.qwik.mjs +4 -4
  349. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dark-plus.qwik.mjs +4 -4
  350. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula-soft.qwik.mjs +4 -4
  351. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula.qwik.mjs +4 -4
  352. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-dark.qwik.mjs +4 -4
  353. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-light.qwik.mjs +4 -4
  354. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-default.qwik.mjs +4 -4
  355. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-dimmed.qwik.mjs +4 -4
  356. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-high-contrast.qwik.mjs +4 -4
  357. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark.qwik.mjs +4 -4
  358. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-default.qwik.mjs +4 -4
  359. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-high-contrast.qwik.mjs +4 -4
  360. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light.qwik.mjs +4 -4
  361. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.qwik.mjs +4 -4
  362. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.qwik.mjs +4 -4
  363. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.qwik.mjs +4 -4
  364. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-hard.qwik.mjs +4 -4
  365. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-medium.qwik.mjs +4 -4
  366. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-soft.qwik.mjs +4 -4
  367. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon-bright.qwik.mjs +4 -4
  368. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon.qwik.mjs +4 -4
  369. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/houston.qwik.mjs +4 -4
  370. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-dragon.qwik.mjs +4 -4
  371. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-lotus.qwik.mjs +4 -4
  372. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-wave.qwik.mjs +4 -4
  373. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/laserwave.qwik.mjs +4 -4
  374. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/light-plus.qwik.mjs +4 -4
  375. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-darker.qwik.mjs +4 -4
  376. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-lighter.qwik.mjs +4 -4
  377. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-ocean.qwik.mjs +4 -4
  378. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-palenight.qwik.mjs +4 -4
  379. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme.qwik.mjs +4 -4
  380. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-dark.qwik.mjs +4 -4
  381. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-light.qwik.mjs +4 -4
  382. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/monokai.qwik.mjs +4 -4
  383. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl-light.qwik.mjs +4 -4
  384. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl.qwik.mjs +4 -4
  385. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/nord.qwik.mjs +4 -4
  386. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-dark-pro.qwik.mjs +4 -4
  387. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-light.qwik.mjs +4 -4
  388. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/plastic.qwik.mjs +4 -4
  389. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/poimandres.qwik.mjs +4 -4
  390. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/red.qwik.mjs +4 -4
  391. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-dawn.qwik.mjs +4 -4
  392. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-moon.qwik.mjs +4 -4
  393. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine.qwik.mjs +4 -4
  394. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-dark.qwik.mjs +4 -4
  395. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-ochin.qwik.mjs +4 -4
  396. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/snazzy-light.qwik.mjs +4 -4
  397. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-dark.qwik.mjs +4 -4
  398. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-light.qwik.mjs +4 -4
  399. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/synthwave-84.qwik.mjs +4 -4
  400. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/tokyo-night.qwik.mjs +4 -4
  401. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vesper.qwik.mjs +4 -4
  402. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-black.qwik.mjs +4 -4
  403. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-dark.qwik.mjs +4 -4
  404. package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-light.qwik.mjs +4 -4
  405. package/dist/ui/node_modules/.pnpm/@shikijs_types@4.0.2/node_modules/@shikijs/types/dist/index.qwik.mjs +7 -7
  406. package/dist/ui/node_modules/.pnpm/@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.qwik.mjs +2953 -2177
  407. package/dist/ui/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.qwik.mjs +14 -22
  408. package/dist/ui/node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.qwik.mjs +256 -261
  409. package/dist/ui/node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.qwik.mjs +110 -115
  410. package/dist/ui/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.qwik.mjs +8 -15
  411. package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.qwik.mjs +177 -0
  412. package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.qwik.mjs +182 -0
  413. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.qwik.mjs +20 -31
  414. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.qwik.mjs +4 -22
  415. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.qwik.mjs +124 -114
  416. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.qwik.mjs +14 -41
  417. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.qwik.mjs +4 -23
  418. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.qwik.mjs +4 -22
  419. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.qwik.mjs +10 -24
  420. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.qwik.mjs +53 -231
  421. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.qwik.mjs +58 -236
  422. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.qwik.mjs +8 -38
  423. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.qwik.mjs +36 -85
  424. package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.qwik.mjs +20 -40
  425. package/dist/ui/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.qwik.mjs +6 -24
  426. package/dist/ui/node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.qwik.mjs +24 -29
  427. package/dist/ui/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.qwik.mjs +120 -121
  428. package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/node-utils.qwik.mjs +14 -0
  429. package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/parse.qwik.mjs +297 -0
  430. package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/tokenizer/tokenize.qwik.mjs +355 -0
  431. package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/traverser/traverse.qwik.mjs +79 -0
  432. package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/utils.qwik.mjs +19 -0
  433. package/dist/ui/node_modules/.pnpm/oniguruma-to-es@4.3.5/node_modules/oniguruma-to-es/dist/esm/index.qwik.mjs +1878 -0
  434. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.qwik.mjs +6 -19
  435. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.qwik.mjs +59 -59
  436. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.qwik.mjs +33 -74
  437. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.qwik.mjs +366 -314
  438. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.qwik.mjs +4 -13
  439. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.qwik.mjs +564 -560
  440. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.qwik.mjs +4 -12
  441. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.qwik.mjs +4 -12
  442. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.qwik.mjs +21 -49
  443. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.qwik.mjs +37 -45
  444. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.qwik.mjs +17 -21
  445. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.qwik.mjs +10 -23
  446. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.qwik.mjs +22 -24
  447. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.qwik.mjs +18 -22
  448. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.qwik.mjs +17 -17
  449. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.qwik.mjs +9 -13
  450. package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.qwik.mjs +8 -11
  451. package/dist/ui/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.qwik.mjs +250 -0
  452. package/dist/ui/node_modules/.pnpm/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.qwik.mjs +98 -0
  453. package/dist/ui/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/atomic.qwik.mjs +174 -0
  454. package/dist/ui/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/utils-internals.qwik.mjs +16 -0
  455. package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/bundle-full.qwik.mjs +59 -23
  456. package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/chunk-CtajNgzt.qwik.mjs +28 -19
  457. package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/engine-oniguruma.qwik.mjs +11 -6
  458. package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/index.qwik.mjs +47 -0
  459. package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/langs-bundle-full-DfKZStlK.qwik.mjs +1284 -1281
  460. package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/themes.qwik.mjs +396 -395
  461. package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/wasm.qwik.mjs +6 -2
  462. package/dist/ui/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.qwik.mjs +4 -12
  463. package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.qwik.mjs +12 -18
  464. package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.qwik.mjs +45 -72
  465. package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.qwik.mjs +4 -18
  466. package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.qwik.mjs +20 -36
  467. package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.qwik.mjs +6 -14
  468. package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.qwik.mjs +6 -14
  469. package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.qwik.mjs +22 -31
  470. package/dist/ui/node_modules/.pnpm/vite-hot-client@2.1.0_vite@7.3.5_@types_node@24.10.0_jiti@2.6.1_lightningcss@1.33.0_terser@5.46.0_tsx@4.21.0_yaml@2.8.3_/node_modules/vite-hot-client/dist/index.qwik.mjs +35 -0
  471. package/dist/ui/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.qwik.mjs +20 -104
  472. package/dist/ui/packages/devtools/kit/src/overlay-paths.qwik.mjs +25 -0
  473. package/dist/ui/packages/devtools/ui/src/components/DevtoolsButton/DevtoolsButton.qwik.mjs +143 -0
  474. package/dist/ui/packages/devtools/ui/src/components/DevtoolsContainer/DevtoolsContainer.qwik.mjs +13 -0
  475. package/dist/ui/packages/devtools/ui/src/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +497 -0
  476. package/dist/ui/packages/devtools/ui/src/components/IconButton/IconButton.qwik.mjs +16 -0
  477. package/dist/ui/packages/devtools/ui/src/components/Icons/Icons.qwik.mjs +664 -0
  478. package/dist/ui/packages/devtools/ui/src/components/InfoBanner/InfoBanner.qwik.mjs +25 -0
  479. package/dist/ui/packages/devtools/ui/src/components/Tab/Tab.qwik.mjs +21 -0
  480. package/dist/ui/packages/devtools/ui/src/components/TabContent/TabContent.qwik.mjs +21 -0
  481. package/dist/ui/packages/devtools/ui/src/components/TabTitle/TabTitle.qwik.mjs +9 -0
  482. package/dist/ui/packages/devtools/ui/src/components/ThemeToggle/QwikThemeToggle.qwik.mjs +58 -0
  483. package/dist/ui/{components → packages/devtools/ui/src/components}/ThemeToggle/theme-script.qwik.mjs +10 -7
  484. package/dist/ui/packages/devtools/ui/src/components/Tree/Tree.qwik.mjs +234 -0
  485. package/dist/ui/packages/devtools/ui/src/components/router-head/theme-script.qwik.mjs +4 -0
  486. package/dist/ui/packages/devtools/ui/src/devtools/CommandPalette.qwik.mjs +284 -0
  487. package/dist/ui/packages/devtools/ui/src/devtools/CustomizeTabsPanel.qwik.mjs +201 -0
  488. package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsContent.qwik.mjs +210 -0
  489. package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsSidebar.qwik.mjs +105 -0
  490. package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtools.qwik.mjs +105 -0
  491. package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtoolsExtension.qwik.mjs +36 -0
  492. package/dist/ui/packages/devtools/ui/src/devtools/command-palette.qwik.mjs +188 -0
  493. package/dist/ui/packages/devtools/ui/src/devtools/page-data-source.qwik.mjs +61 -0
  494. package/dist/ui/packages/devtools/ui/src/devtools/rpc.qwik.mjs +91 -0
  495. package/dist/ui/packages/devtools/ui/src/devtools/sidebar-tabs.qwik.mjs +97 -0
  496. package/dist/ui/packages/devtools/ui/src/devtools/state.qwik.mjs +30 -0
  497. package/dist/ui/packages/devtools/ui/src/devtools/tabs.qwik.mjs +82 -0
  498. package/dist/ui/packages/devtools/ui/src/features/Assets/Assets.qwik.mjs +50 -0
  499. package/dist/ui/packages/devtools/ui/src/features/BuildAnalysis/BuildAnalysis.qwik.mjs +185 -0
  500. package/dist/ui/packages/devtools/ui/src/features/CodeBreak/CodeBreak.qwik.mjs +53 -0
  501. package/dist/ui/packages/devtools/ui/src/features/CodeBreak/HtmlParser.qwik.mjs +149 -0
  502. package/dist/ui/packages/devtools/ui/src/features/CodeBreak/StateParser.qwik.mjs +181 -0
  503. package/dist/ui/packages/devtools/ui/src/features/HookTree/HookTree.qwik.mjs +713 -0
  504. package/dist/ui/packages/devtools/ui/src/features/HookTree/hookTreeHelpers.qwik.mjs +184 -0
  505. package/dist/ui/packages/devtools/ui/src/features/Inspect/Inspect.qwik.mjs +32 -0
  506. package/dist/ui/packages/devtools/ui/src/features/Inspect/constant.qwik.mjs +4 -0
  507. package/dist/ui/packages/devtools/ui/src/features/Inspect/iframe-theme.qwik.mjs +74 -0
  508. package/dist/ui/packages/devtools/ui/src/features/Overview/Overview.qwik.mjs +199 -0
  509. package/dist/ui/packages/devtools/ui/src/features/Packages/Packages.qwik.mjs +295 -0
  510. package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +218 -0
  511. package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyOperationFeedback/DependencyOperationFeedback.qwik.mjs +39 -0
  512. package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyToolbar/DependencyToolbar.qwik.mjs +75 -0
  513. package/dist/ui/packages/devtools/ui/src/features/Packages/components/InstalledDependencyList/InstalledDependencyList.qwik.mjs +58 -0
  514. package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +29 -0
  515. package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageSearchResults/PackageSearchResults.qwik.mjs +51 -0
  516. package/dist/ui/packages/devtools/ui/src/features/Packages/components/SearchResultCard/SearchResultCard.qwik.mjs +97 -0
  517. package/dist/ui/packages/devtools/ui/src/features/Packages/package-utils.qwik.mjs +81 -0
  518. package/dist/ui/packages/devtools/ui/src/features/Performance/Performance.qwik.mjs +254 -0
  519. package/dist/ui/packages/devtools/ui/src/features/Performance/components/ComponentCard.qwik.mjs +49 -0
  520. package/dist/ui/packages/devtools/ui/src/features/Performance/components/HookDetailsPanel.qwik.mjs +95 -0
  521. package/dist/ui/packages/devtools/ui/src/features/Performance/components/PerformanceOverview.qwik.mjs +36 -0
  522. package/dist/ui/packages/devtools/ui/src/features/Performance/components/StatCard.qwik.mjs +21 -0
  523. package/dist/ui/packages/devtools/ui/src/features/Performance/computePerfViewModel.qwik.mjs +118 -0
  524. package/dist/ui/packages/devtools/ui/src/features/Performance/transformPerformanceData.qwik.mjs +36 -0
  525. package/dist/ui/packages/devtools/ui/src/features/Performance/utils/formatMs.qwik.mjs +15 -0
  526. package/dist/ui/packages/devtools/ui/src/features/Preloads/Preloads.qwik.mjs +478 -0
  527. package/dist/ui/packages/devtools/ui/src/features/Preloads/computePreloadViewModel.qwik.mjs +178 -0
  528. package/dist/ui/packages/devtools/ui/src/features/RenderTree/RenderTree.qwik.mjs +277 -0
  529. package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HighlightedCodeList.qwik.mjs +23 -0
  530. package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HookFiltersCard.qwik.mjs +80 -0
  531. package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/RenderTreeTabs.qwik.mjs +25 -0
  532. package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/StateTreeNodeLabel.qwik.mjs +32 -0
  533. package/dist/ui/packages/devtools/ui/src/features/RenderTree/utils/getCodeLanguage.qwik.mjs +18 -0
  534. package/dist/ui/packages/devtools/ui/src/features/RenderTree/utils/getValueColorClass.qwik.mjs +21 -0
  535. package/dist/ui/packages/devtools/ui/src/features/Routes/Routes.qwik.mjs +51 -0
  536. package/dist/ui/packages/devtools/ui/src/runtime/preloads.qwik.mjs +830 -0
  537. package/dist/ui/packages/devtools/ui/src/utils/shiki.qwik.mjs +24 -0
  538. package/dist/ui/q-manifest.json +1878 -1879
  539. package/dist/ui/styles.css +646 -63
  540. package/package.json +83 -39
  541. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/assertClassBrand.qwik.mjs +0 -7
  542. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/checkPrivateRedeclaration.qwik.mjs +0 -6
  543. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateFieldGet2.qwik.mjs +0 -7
  544. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateFieldInitSpec.qwik.mjs +0 -7
  545. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateFieldSet2.qwik.mjs +0 -7
  546. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateMethodInitSpec.qwik.mjs +0 -7
  547. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/defineProperty.qwik.mjs +0 -12
  548. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/toPrimitive.qwik.mjs +0 -14
  549. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/toPropertyKey.qwik.mjs +0 -9
  550. package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/typeof.qwik.mjs +0 -11
  551. package/dist/ui/_virtual/_rolldown/runtime.qwik.mjs +0 -33
  552. package/dist/ui/bundle-graph-C-01xqq_.json +0 -1
  553. package/dist/ui/components/DevtoolsButton/DevtoolsButton.qwik.mjs +0 -132
  554. package/dist/ui/components/DevtoolsContainer/DevtoolsContainer.qwik.mjs +0 -7
  555. package/dist/ui/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +0 -36
  556. package/dist/ui/components/Icons/Icons.qwik.mjs +0 -216
  557. package/dist/ui/components/Tab/Tab.qwik.mjs +0 -14
  558. package/dist/ui/components/TabContent/TabContent.qwik.mjs +0 -10
  559. package/dist/ui/components/TabTitle/TabTitle.qwik.mjs +0 -7
  560. package/dist/ui/components/ThemeToggle/QwikThemeToggle.qwik.mjs +0 -38
  561. package/dist/ui/components/Tree/Tree.qwik.mjs +0 -93
  562. package/dist/ui/components/Tree/filterVnode.qwik.mjs +0 -62
  563. package/dist/ui/components/Tree/type.qwik.mjs +0 -4
  564. package/dist/ui/components/Tree/vnode.qwik.mjs +0 -17
  565. package/dist/ui/components/router-head/theme-script.qwik.mjs +0 -4
  566. package/dist/ui/devtools.qwik.mjs +0 -189
  567. package/dist/ui/features/Assets/Assets.qwik.mjs +0 -18
  568. package/dist/ui/features/CodeBreack/CodeBreack.qwik.mjs +0 -44
  569. package/dist/ui/features/CodeBreack/HtmlParser.qwik.mjs +0 -87
  570. package/dist/ui/features/CodeBreack/StateParser.qwik.mjs +0 -113
  571. package/dist/ui/features/Overview/Overview.qwik.mjs +0 -43
  572. package/dist/ui/features/Packages/Packages.qwik.mjs +0 -16
  573. package/dist/ui/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +0 -97
  574. package/dist/ui/features/Packages/components/DependencyCard/index.qwik.mjs +0 -1
  575. package/dist/ui/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +0 -23
  576. package/dist/ui/features/Packages/components/PackageIcon/index.qwik.mjs +0 -1
  577. package/dist/ui/features/Performance/Performance.qwik.mjs +0 -118
  578. package/dist/ui/features/Performance/computePerfViewModel.qwik.mjs +0 -111
  579. package/dist/ui/features/Performance/transformPerformanceData.qwik.mjs +0 -25
  580. package/dist/ui/features/RenderTree/RenderTree.qwik.mjs +0 -223
  581. package/dist/ui/features/RenderTree/TreeBuilder.qwik.mjs +0 -145
  582. package/dist/ui/features/RenderTree/data.qwik.mjs +0 -40
  583. package/dist/ui/features/RenderTree/formatTreeData.qwik.mjs +0 -169
  584. package/dist/ui/features/RenderTree/types.qwik.mjs +0 -51
  585. package/dist/ui/features/Routes/Routes.qwik.mjs +0 -30
  586. package/dist/ui/features/inspect/Inspect.qwik.mjs +0 -30
  587. package/dist/ui/features/inspect/constant.qwik.mjs +0 -4
  588. package/dist/ui/features/inspect/iframe-theme.qwik.mjs +0 -66
  589. package/dist/ui/lib-types/kit/src/client.d.ts +0 -2
  590. package/dist/ui/lib-types/kit/src/constants.d.ts +0 -16
  591. package/dist/ui/lib-types/kit/src/context.d.ts +0 -10
  592. package/dist/ui/lib-types/kit/src/globals.d.ts +0 -71
  593. package/dist/ui/lib-types/kit/src/index.d.ts +0 -6
  594. package/dist/ui/lib-types/kit/src/server.d.ts +0 -2
  595. package/dist/ui/lib-types/kit/src/shared.d.ts +0 -1
  596. package/dist/ui/lib-types/kit/src/types.d.ts +0 -69
  597. package/dist/ui/lib-types/ui/src/entry.dev.d.ts +0 -2
  598. package/dist/ui/lib-types/ui/src/features/CodeBreack/CodeBreack.d.ts +0 -1
  599. package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.test.d.ts +0 -1
  600. package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.test.d.ts +0 -1
  601. package/dist/ui/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.qwik.mjs +0 -49
  602. package/dist/ui/node_modules/.pnpm/birpc@4.0.0/node_modules/birpc/dist/index.qwik.mjs +0 -200
  603. package/dist/ui/node_modules/.pnpm/brace-expansion@5.0.4/node_modules/brace-expansion/dist/esm/index.qwik.mjs +0 -143
  604. package/dist/ui/node_modules/.pnpm/copy-anything@4.0.5/node_modules/copy-anything/dist/index.qwik.mjs +0 -42
  605. package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.qwik.mjs +0 -200
  606. package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.qwik.mjs +0 -206
  607. package/dist/ui/node_modules/.pnpm/dree@5.1.5/node_modules/dree/bundled/lib/esm/index.esm.qwik.mjs +0 -10
  608. package/dist/ui/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/getType.qwik.mjs +0 -7
  609. package/dist/ui/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isArray.qwik.mjs +0 -8
  610. package/dist/ui/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isPlainObject.qwik.mjs +0 -13
  611. package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/assert-valid-pattern.qwik.mjs +0 -8
  612. package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/ast.qwik.mjs +0 -537
  613. package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/brace-expressions.qwik.mjs +0 -122
  614. package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/escape.qwik.mjs +0 -19
  615. package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/index.qwik.mjs +0 -629
  616. package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/unescape.qwik.mjs +0 -26
  617. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/accessDeep.qwik.mjs +0 -96
  618. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/class-registry.qwik.mjs +0 -19
  619. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/custom-transformer-registry.qwik.mjs +0 -18
  620. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/double-indexed-kv.qwik.mjs +0 -23
  621. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/index.qwik.mjs +0 -81
  622. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/is.qwik.mjs +0 -29
  623. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/pathstringifier.qwik.mjs +0 -34
  624. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/plainer.qwik.mjs +0 -105
  625. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/registry.qwik.mjs +0 -24
  626. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/transformer.qwik.mjs +0 -160
  627. package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/util.qwik.mjs +0 -30
  628. package/dist/ui/node_modules/.pnpm/vite-hot-client@2.1.0_vite@8.0.0_@types_node@25.5.0_esbuild@0.27.4_jiti@2.6.1_tsx@4.21.0_yaml@2.8.2_/node_modules/vite-hot-client/dist/index.qwik.mjs +0 -27
  629. package/dist/ui/packages/kit/src/client.qwik.mjs +0 -17
  630. package/dist/ui/packages/kit/src/constants.qwik.mjs +0 -12
  631. package/dist/ui/packages/kit/src/context.qwik.mjs +0 -18
  632. package/dist/ui/packages/kit/src/globals.qwik.mjs +0 -5
  633. package/dist/ui/packages/kit/src/index.qwik.mjs +0 -7
  634. package/dist/ui/packages/kit/src/server.qwik.mjs +0 -1
  635. package/dist/ui/packages/kit/src/shared.qwik.mjs +0 -4
  636. package/dist/ui/packages/kit/src/types.qwik.mjs +0 -1
  637. package/dist/ui/utils/location.qwik.mjs +0 -10
  638. package/dist/ui/utils/shiki.qwik.mjs +0 -19
  639. package/dist/ui/utils/type.qwik.mjs +0 -13
  640. /package/dist/ui/lib-types/ui/src/features/{CodeBreack → CodeBreak}/HtmlParser.d.ts +0 -0
  641. /package/dist/ui/lib-types/ui/src/features/{CodeBreack → CodeBreak}/StateParser.d.ts +0 -0
  642. /package/dist/ui/lib-types/ui/src/features/{inspect → Inspect}/Inspect.d.ts +0 -0
  643. /package/dist/ui/lib-types/ui/src/features/{inspect → Inspect}/constant.d.ts +0 -0
  644. /package/dist/ui/lib-types/ui/src/features/{inspect → Inspect}/iframe-theme.d.ts +0 -0
  645. /package/dist/ui/lib-types/ui/src/utils/{heplerState.d.ts → helperState.d.ts} +0 -0
@@ -1,1137 +1,1112 @@
1
1
  import { ShikiError } from "../../../../../@shikijs_types@4.0.2/node_modules/@shikijs/types/dist/index.qwik.mjs";
2
+ import { isSpecialTheme, isSpecialLang, createShikiPrimitiveAsync, codeToTokensWithThemes, getLastGrammarState, getLastGrammarStateFromMap, setLastGrammarStateToMap, resolveColorReplacements, applyColorReplacements, isPlainLang, isNoneTheme, codeToTokensBase as codeToTokensBase$1, splitLines } from "../../../../../@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs";
3
+ import { createShikiPrimitive, normalizeGetter, normalizeTheme, toArray, tokenizeWithTheme } from "../../../../../@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs";
2
4
  import { FontStyle } from "../../../../../@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.qwik.mjs";
3
- import { applyColorReplacements, codeToTokensBase as codeToTokensBase$1, codeToTokensWithThemes, createShikiPrimitiveAsync, getLastGrammarState, getLastGrammarStateFromMap, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, resolveColorReplacements, setLastGrammarStateToMap, splitLines } from "../../../../../@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs";
4
5
  import { toHtml } from "../../../../../hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.qwik.mjs";
5
- //#region ../../node_modules/.pnpm/@shikijs+core@4.0.2/node_modules/@shikijs/core/dist/index.mjs
6
- /**
7
- * Utility to append class to a hast node
8
- *
9
- * If the `property.class` is a string, it will be splitted by space and converted to an array.
10
- */
11
6
  function addClassToHast(node, className) {
12
- var _node$properties;
13
- if (!className) return node;
14
- node.properties || (node.properties = {});
15
- (_node$properties = node.properties).class || (_node$properties.class = []);
16
- if (typeof node.properties.class === "string") node.properties.class = node.properties.class.split(/\s+/g);
17
- if (!Array.isArray(node.properties.class)) node.properties.class = [];
18
- const targets = Array.isArray(className) ? className : className.split(/\s+/g);
19
- for (const c of targets) if (c && !node.properties.class.includes(c)) node.properties.class.push(c);
20
- return node;
7
+ var _a;
8
+ if (!className) return node;
9
+ node.properties || (node.properties = {});
10
+ (_a = node.properties).class || (_a.class = []);
11
+ if (typeof node.properties.class === "string") node.properties.class = node.properties.class.split(/\s+/g);
12
+ if (!Array.isArray(node.properties.class)) node.properties.class = [];
13
+ const targets = Array.isArray(className) ? className : className.split(/\s+/g);
14
+ for (const c of targets) if (c && !node.properties.class.includes(c)) node.properties.class.push(c);
15
+ return node;
21
16
  }
22
- /**
23
- * Creates a converter between index and position in a code block.
24
- *
25
- * Overflow/underflow are unchecked.
26
- */
27
17
  function createPositionConverter(code) {
28
- const lines = splitLines(code, true).map(([line]) => line);
29
- function indexToPos(index) {
30
- if (index === code.length) return {
31
- line: lines.length - 1,
32
- character: lines[lines.length - 1].length
33
- };
34
- let character = index;
35
- let line = 0;
36
- for (const lineText of lines) {
37
- if (character < lineText.length) break;
38
- character -= lineText.length;
39
- line++;
40
- }
41
- return {
42
- line,
43
- character
44
- };
45
- }
46
- function posToIndex(line, character) {
47
- let index = 0;
48
- for (let i = 0; i < line; i++) index += lines[i].length;
49
- index += character;
50
- return index;
51
- }
52
- return {
53
- lines,
54
- indexToPos,
55
- posToIndex
56
- };
18
+ const lines = splitLines(code, true).map(([line]) => line);
19
+ function indexToPos(index) {
20
+ if (index === code.length) return {
21
+ line: lines.length - 1,
22
+ character: lines[lines.length - 1].length
23
+ };
24
+ let character = index;
25
+ let line = 0;
26
+ for (const lineText of lines) {
27
+ if (character < lineText.length) break;
28
+ character -= lineText.length;
29
+ line++;
30
+ }
31
+ return {
32
+ line,
33
+ character
34
+ };
35
+ }
36
+ function posToIndex(line, character) {
37
+ let index = 0;
38
+ for (let i = 0; i < line; i++) index += lines[i].length;
39
+ index += character;
40
+ return index;
41
+ }
42
+ return {
43
+ lines,
44
+ indexToPos,
45
+ posToIndex
46
+ };
57
47
  }
58
- /**
59
- * Guess embedded languages from given code and highlighter.
60
- *
61
- * When highlighter is provided, only bundled languages will be included.
62
- *
63
- * @param code - The code string to analyze
64
- * @param _lang - The primary language of the code (currently unused)
65
- * @param highlighter - Optional highlighter instance to validate languages
66
- * @returns Array of detected language identifiers
67
- *
68
- * @example
69
- * ```ts
70
- * // Detects 'javascript' from Vue SFC
71
- * guessEmbeddedLanguages('<script lang="javascript">')
72
- *
73
- * // Detects 'python' from markdown code block
74
- * guessEmbeddedLanguages('```python\nprint("hi")\n```')
75
- * ```
76
- */
77
48
  function guessEmbeddedLanguages(code, _lang, highlighter) {
78
- const langs = /* @__PURE__ */ new Set();
79
- for (const match of code.matchAll(/:?lang=["']([^"']+)["']/g)) {
80
- const lang = match[1].toLowerCase().trim();
81
- if (lang) langs.add(lang);
82
- }
83
- for (const match of code.matchAll(/(?:```|~~~)([\w-]+)/g)) {
84
- const lang = match[1].toLowerCase().trim();
85
- if (lang) langs.add(lang);
86
- }
87
- for (const match of code.matchAll(/\\begin\{([\w-]+)\}/g)) {
88
- const lang = match[1].toLowerCase().trim();
89
- if (lang) langs.add(lang);
90
- }
91
- for (const match of code.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)) {
92
- const fullType = match[1].toLowerCase().trim();
93
- const lang = fullType.includes("/") ? fullType.split("/").pop() : fullType;
94
- if (lang) langs.add(lang);
95
- }
96
- if (!highlighter) return Array.from(langs);
97
- const bundle = highlighter.getBundledLanguages();
98
- return Array.from(langs).filter((l) => l && bundle[l]);
49
+ const langs = /* @__PURE__ */ new Set();
50
+ for (const match of code.matchAll(/:?lang=["']([^"']+)["']/g)) {
51
+ const lang = match[1].toLowerCase().trim();
52
+ if (lang) langs.add(lang);
53
+ }
54
+ for (const match of code.matchAll(/(?:```|~~~)([\w-]+)/g)) {
55
+ const lang = match[1].toLowerCase().trim();
56
+ if (lang) langs.add(lang);
57
+ }
58
+ for (const match of code.matchAll(/\\begin\{([\w-]+)\}/g)) {
59
+ const lang = match[1].toLowerCase().trim();
60
+ if (lang) langs.add(lang);
61
+ }
62
+ for (const match of code.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)) {
63
+ const fullType = match[1].toLowerCase().trim();
64
+ const lang = fullType.includes("/") ? fullType.split("/").pop() : fullType;
65
+ if (lang) langs.add(lang);
66
+ }
67
+ if (!highlighter) return Array.from(langs);
68
+ const bundle = highlighter.getBundledLanguages();
69
+ return Array.from(langs).filter((l) => l && bundle[l]);
99
70
  }
100
- var DEFAULT_COLOR_LIGHT_DARK = "light-dark()";
101
- var COLOR_KEYS = ["color", "background-color"];
102
- /**
103
- * Split a token into multiple tokens by given offsets.
104
- *
105
- * The offsets are relative to the token, and should be sorted.
106
- */
71
+ const DEFAULT_COLOR_LIGHT_DARK = "light-dark()";
72
+ const COLOR_KEYS = ["color", "background-color"];
107
73
  function splitToken(token, offsets) {
108
- let lastOffset = 0;
109
- const tokens = [];
110
- for (const offset of offsets) {
111
- if (offset > lastOffset) tokens.push({
112
- ...token,
113
- content: token.content.slice(lastOffset, offset),
114
- offset: token.offset + lastOffset
115
- });
116
- lastOffset = offset;
117
- }
118
- if (lastOffset < token.content.length) tokens.push({
119
- ...token,
120
- content: token.content.slice(lastOffset),
121
- offset: token.offset + lastOffset
122
- });
123
- return tokens;
74
+ let lastOffset = 0;
75
+ const tokens = [];
76
+ for (const offset of offsets) {
77
+ if (offset > lastOffset) tokens.push({
78
+ ...token,
79
+ content: token.content.slice(lastOffset, offset),
80
+ offset: token.offset + lastOffset
81
+ });
82
+ lastOffset = offset;
83
+ }
84
+ if (lastOffset < token.content.length) tokens.push({
85
+ ...token,
86
+ content: token.content.slice(lastOffset),
87
+ offset: token.offset + lastOffset
88
+ });
89
+ return tokens;
124
90
  }
125
- /**
126
- * Split 2D tokens array by given breakpoints.
127
- */
128
91
  function splitTokens(tokens, breakpoints) {
129
- const sorted = Array.from(breakpoints instanceof Set ? breakpoints : new Set(breakpoints)).sort((a, b) => a - b);
130
- if (!sorted.length) return tokens;
131
- return tokens.map((line) => {
132
- return line.flatMap((token) => {
133
- const breakpointsInToken = sorted.filter((i) => token.offset < i && i < token.offset + token.content.length).map((i) => i - token.offset).sort((a, b) => a - b);
134
- if (!breakpointsInToken.length) return token;
135
- return splitToken(token, breakpointsInToken);
136
- });
137
- });
92
+ const sorted = Array.from(breakpoints instanceof Set ? breakpoints : new Set(breakpoints)).sort((a, b) => a - b);
93
+ if (!sorted.length) return tokens;
94
+ return tokens.map((line) => {
95
+ return line.flatMap((token) => {
96
+ const breakpointsInToken = sorted.filter((i) => token.offset < i && i < token.offset + token.content.length).map((i) => i - token.offset).sort((a, b) => a - b);
97
+ if (!breakpointsInToken.length) return token;
98
+ return splitToken(token, breakpointsInToken);
99
+ });
100
+ });
138
101
  }
139
102
  function flatTokenVariants(merged, variantsOrder, cssVariablePrefix, defaultColor, colorsRendering = "css-vars") {
140
- const token = {
141
- content: merged.content,
142
- explanation: merged.explanation,
143
- offset: merged.offset
144
- };
145
- const styles = variantsOrder.map((t) => getTokenStyleObject(merged.variants[t]));
146
- const styleKeys = new Set(styles.flatMap((t) => Object.keys(t)));
147
- const mergedStyles = {};
148
- const varKey = (idx, key) => {
149
- const keyName = key === "color" ? "" : key === "background-color" ? "-bg" : `-${key}`;
150
- return cssVariablePrefix + variantsOrder[idx] + (key === "color" ? "" : keyName);
151
- };
152
- styles.forEach((cur, idx) => {
153
- for (const key of styleKeys) {
154
- const value = cur[key] || "inherit";
155
- if (idx === 0 && defaultColor && COLOR_KEYS.includes(key)) if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && styles.length > 1) {
156
- const lightIndex = variantsOrder.findIndex((t) => t === "light");
157
- const darkIndex = variantsOrder.findIndex((t) => t === "dark");
158
- if (lightIndex === -1 || darkIndex === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
159
- mergedStyles[key] = `light-dark(${styles[lightIndex][key] || "inherit"}, ${styles[darkIndex][key] || "inherit"})`;
160
- if (colorsRendering === "css-vars") mergedStyles[varKey(idx, key)] = value;
161
- } else mergedStyles[key] = value;
162
- else if (colorsRendering === "css-vars") mergedStyles[varKey(idx, key)] = value;
163
- }
164
- });
165
- token.htmlStyle = mergedStyles;
166
- return token;
103
+ const token = {
104
+ content: merged.content,
105
+ explanation: merged.explanation,
106
+ offset: merged.offset
107
+ };
108
+ const styles = variantsOrder.map((t) => getTokenStyleObject(merged.variants[t]));
109
+ const styleKeys = new Set(styles.flatMap((t) => Object.keys(t)));
110
+ const mergedStyles = {};
111
+ const varKey = (idx, key) => {
112
+ const keyName = key === "color" ? "" : key === "background-color" ? "-bg" : `-${key}`;
113
+ return cssVariablePrefix + variantsOrder[idx] + (key === "color" ? "" : keyName);
114
+ };
115
+ styles.forEach((cur, idx) => {
116
+ for (const key of styleKeys) {
117
+ const value = cur[key] || "inherit";
118
+ if (idx === 0 && defaultColor && COLOR_KEYS.includes(key)) if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && styles.length > 1) {
119
+ const lightIndex = variantsOrder.findIndex((t) => t === "light");
120
+ const darkIndex = variantsOrder.findIndex((t) => t === "dark");
121
+ if (lightIndex === -1 || darkIndex === -1) throw new ShikiError('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
122
+ mergedStyles[key] = `light-dark(${styles[lightIndex][key] || "inherit"}, ${styles[darkIndex][key] || "inherit"})`;
123
+ if (colorsRendering === "css-vars") mergedStyles[varKey(idx, key)] = value;
124
+ } else mergedStyles[key] = value;
125
+ else if (colorsRendering === "css-vars") mergedStyles[varKey(idx, key)] = value;
126
+ }
127
+ });
128
+ token.htmlStyle = mergedStyles;
129
+ return token;
167
130
  }
168
131
  function getTokenStyleObject(token) {
169
- const styles = {};
170
- if (token.color) styles.color = token.color;
171
- if (token.bgColor) styles["background-color"] = token.bgColor;
172
- if (token.fontStyle) {
173
- if (token.fontStyle & FontStyle.Italic) styles["font-style"] = "italic";
174
- if (token.fontStyle & FontStyle.Bold) styles["font-weight"] = "bold";
175
- const decorations = [];
176
- if (token.fontStyle & FontStyle.Underline) decorations.push("underline");
177
- if (token.fontStyle & FontStyle.Strikethrough) decorations.push("line-through");
178
- if (decorations.length) styles["text-decoration"] = decorations.join(" ");
179
- }
180
- return styles;
132
+ const styles = {};
133
+ if (token.color) styles.color = token.color;
134
+ if (token.bgColor) styles["background-color"] = token.bgColor;
135
+ if (token.fontStyle) {
136
+ if (token.fontStyle & FontStyle.Italic) styles["font-style"] = "italic";
137
+ if (token.fontStyle & FontStyle.Bold) styles["font-weight"] = "bold";
138
+ const decorations2 = [];
139
+ if (token.fontStyle & FontStyle.Underline) decorations2.push("underline");
140
+ if (token.fontStyle & FontStyle.Strikethrough) decorations2.push("line-through");
141
+ if (decorations2.length) styles["text-decoration"] = decorations2.join(" ");
142
+ }
143
+ return styles;
181
144
  }
182
145
  function stringifyTokenStyle(token) {
183
- if (typeof token === "string") return token;
184
- return Object.entries(token).map(([key, value]) => `${key}:${value}`).join(";");
146
+ if (typeof token === "string") return token;
147
+ return Object.entries(token).map(([key, value]) => `${key}:${value}`).join(";");
185
148
  }
186
- /**
187
- * A built-in transformer to add decorations to the highlighted code.
188
- */
189
149
  function transformerDecorations() {
190
- const map = /* @__PURE__ */ new WeakMap();
191
- function getContext(shiki) {
192
- if (!map.has(shiki.meta)) {
193
- const converter = createPositionConverter(shiki.source);
194
- function normalizePosition(p) {
195
- if (typeof p === "number") {
196
- if (p < 0 || p > shiki.source.length) throw new ShikiError(`Invalid decoration offset: ${p}. Code length: ${shiki.source.length}`);
197
- return {
198
- ...converter.indexToPos(p),
199
- offset: p
200
- };
201
- } else {
202
- const line = converter.lines[p.line];
203
- if (line === void 0) throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Lines length: ${converter.lines.length}`);
204
- let character = p.character;
205
- if (character < 0) character = line.length + character;
206
- if (character < 0 || character > line.length) throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Line ${p.line} length: ${line.length}`);
207
- return {
208
- ...p,
209
- character,
210
- offset: converter.posToIndex(p.line, character)
211
- };
212
- }
213
- }
214
- const decorations = (shiki.options.decorations || []).map((d) => ({
215
- ...d,
216
- start: normalizePosition(d.start),
217
- end: normalizePosition(d.end)
218
- }));
219
- verifyIntersections(decorations);
220
- map.set(shiki.meta, {
221
- decorations,
222
- converter,
223
- source: shiki.source
224
- });
225
- }
226
- return map.get(shiki.meta);
227
- }
228
- return {
229
- name: "shiki:decorations",
230
- tokens(tokens) {
231
- if (!this.options.decorations?.length) return;
232
- return splitTokens(tokens, getContext(this).decorations.flatMap((d) => [d.start.offset, d.end.offset]));
233
- },
234
- code(codeEl) {
235
- if (!this.options.decorations?.length) return;
236
- const ctx = getContext(this);
237
- const lines = Array.from(codeEl.children).filter((i) => i.type === "element" && i.tagName === "span");
238
- if (lines.length !== ctx.converter.lines.length) throw new ShikiError(`Number of lines in code element (${lines.length}) does not match the number of lines in the source (${ctx.converter.lines.length}). Failed to apply decorations.`);
239
- function applyLineSection(line, start, end, decoration) {
240
- const lineEl = lines[line];
241
- let text = "";
242
- let startIndex = -1;
243
- let endIndex = -1;
244
- if (start === 0) startIndex = 0;
245
- if (end === 0) endIndex = 0;
246
- if (end === Number.POSITIVE_INFINITY) endIndex = lineEl.children.length;
247
- if (startIndex === -1 || endIndex === -1) for (let i = 0; i < lineEl.children.length; i++) {
248
- text += stringify(lineEl.children[i]);
249
- if (startIndex === -1 && text.length === start) startIndex = i + 1;
250
- if (endIndex === -1 && text.length === end) endIndex = i + 1;
251
- }
252
- if (startIndex === -1) throw new ShikiError(`Failed to find start index for decoration ${JSON.stringify(decoration.start)}`);
253
- if (endIndex === -1) throw new ShikiError(`Failed to find end index for decoration ${JSON.stringify(decoration.end)}`);
254
- const children = lineEl.children.slice(startIndex, endIndex);
255
- if (!decoration.alwaysWrap && children.length === lineEl.children.length) applyDecoration(lineEl, decoration, "line");
256
- else if (!decoration.alwaysWrap && children.length === 1 && children[0].type === "element") applyDecoration(children[0], decoration, "token");
257
- else {
258
- const wrapper = {
259
- type: "element",
260
- tagName: "span",
261
- properties: {},
262
- children
263
- };
264
- applyDecoration(wrapper, decoration, "wrapper");
265
- lineEl.children.splice(startIndex, children.length, wrapper);
266
- }
267
- }
268
- function applyLine(line, decoration) {
269
- lines[line] = applyDecoration(lines[line], decoration, "line");
270
- }
271
- function applyDecoration(el, decoration, type) {
272
- const properties = decoration.properties || {};
273
- const transform = decoration.transform || ((i) => i);
274
- el.tagName = decoration.tagName || "span";
275
- el.properties = {
276
- ...el.properties,
277
- ...properties,
278
- class: el.properties.class
279
- };
280
- if (decoration.properties?.class) addClassToHast(el, decoration.properties.class);
281
- el = transform(el, type) || el;
282
- return el;
283
- }
284
- const lineApplies = [];
285
- const sorted = ctx.decorations.sort((a, b) => b.start.offset - a.start.offset || a.end.offset - b.end.offset);
286
- for (const decoration of sorted) {
287
- const { start, end } = decoration;
288
- if (start.line === end.line) applyLineSection(start.line, start.character, end.character, decoration);
289
- else if (start.line < end.line) {
290
- applyLineSection(start.line, start.character, Number.POSITIVE_INFINITY, decoration);
291
- for (let i = start.line + 1; i < end.line; i++) lineApplies.unshift(() => applyLine(i, decoration));
292
- applyLineSection(end.line, 0, end.character, decoration);
293
- }
294
- }
295
- lineApplies.forEach((i) => i());
296
- }
297
- };
150
+ const map = /* @__PURE__ */ new WeakMap();
151
+ function getContext(shiki) {
152
+ if (!map.has(shiki.meta)) {
153
+ let normalizePosition = function(p) {
154
+ if (typeof p === "number") {
155
+ if (p < 0 || p > shiki.source.length) throw new ShikiError(`Invalid decoration offset: ${p}. Code length: ${shiki.source.length}`);
156
+ return {
157
+ ...converter.indexToPos(p),
158
+ offset: p
159
+ };
160
+ } else {
161
+ const line = converter.lines[p.line];
162
+ if (line === void 0) throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Lines length: ${converter.lines.length}`);
163
+ let character = p.character;
164
+ if (character < 0) character = line.length + character;
165
+ if (character < 0 || character > line.length) throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Line ${p.line} length: ${line.length}`);
166
+ return {
167
+ ...p,
168
+ character,
169
+ offset: converter.posToIndex(p.line, character)
170
+ };
171
+ }
172
+ };
173
+ const converter = createPositionConverter(shiki.source);
174
+ const decorations2 = (shiki.options.decorations || []).map((d) => ({
175
+ ...d,
176
+ start: normalizePosition(d.start),
177
+ end: normalizePosition(d.end)
178
+ }));
179
+ verifyIntersections(decorations2);
180
+ map.set(shiki.meta, {
181
+ decorations: decorations2,
182
+ converter,
183
+ source: shiki.source
184
+ });
185
+ }
186
+ return map.get(shiki.meta);
187
+ }
188
+ return {
189
+ name: "shiki:decorations",
190
+ tokens(tokens) {
191
+ if (!this.options.decorations?.length) return;
192
+ return splitTokens(tokens, getContext(this).decorations.flatMap((d) => [d.start.offset, d.end.offset]));
193
+ },
194
+ code(codeEl) {
195
+ if (!this.options.decorations?.length) return;
196
+ const ctx = getContext(this);
197
+ const lines = Array.from(codeEl.children).filter((i) => i.type === "element" && i.tagName === "span");
198
+ if (lines.length !== ctx.converter.lines.length) throw new ShikiError(`Number of lines in code element (${lines.length}) does not match the number of lines in the source (${ctx.converter.lines.length}). Failed to apply decorations.`);
199
+ function applyLineSection(line, start, end, decoration) {
200
+ const lineEl = lines[line];
201
+ let text = "";
202
+ let startIndex = -1;
203
+ let endIndex = -1;
204
+ if (start === 0) startIndex = 0;
205
+ if (end === 0) endIndex = 0;
206
+ if (end === Number.POSITIVE_INFINITY) endIndex = lineEl.children.length;
207
+ if (startIndex === -1 || endIndex === -1) for (let i = 0; i < lineEl.children.length; i++) {
208
+ text += stringify(lineEl.children[i]);
209
+ if (startIndex === -1 && text.length === start) startIndex = i + 1;
210
+ if (endIndex === -1 && text.length === end) endIndex = i + 1;
211
+ }
212
+ if (startIndex === -1) throw new ShikiError(`Failed to find start index for decoration ${JSON.stringify(decoration.start)}`);
213
+ if (endIndex === -1) throw new ShikiError(`Failed to find end index for decoration ${JSON.stringify(decoration.end)}`);
214
+ const children = lineEl.children.slice(startIndex, endIndex);
215
+ if (!decoration.alwaysWrap && children.length === lineEl.children.length) applyDecoration(lineEl, decoration, "line");
216
+ else if (!decoration.alwaysWrap && children.length === 1 && children[0].type === "element") applyDecoration(children[0], decoration, "token");
217
+ else {
218
+ const wrapper = {
219
+ type: "element",
220
+ tagName: "span",
221
+ properties: {},
222
+ children
223
+ };
224
+ applyDecoration(wrapper, decoration, "wrapper");
225
+ lineEl.children.splice(startIndex, children.length, wrapper);
226
+ }
227
+ }
228
+ function applyLine(line, decoration) {
229
+ lines[line] = applyDecoration(lines[line], decoration, "line");
230
+ }
231
+ function applyDecoration(el, decoration, type) {
232
+ const properties = decoration.properties || {};
233
+ const transform = decoration.transform || ((i) => i);
234
+ el.tagName = decoration.tagName || "span";
235
+ el.properties = {
236
+ ...el.properties,
237
+ ...properties,
238
+ class: el.properties.class
239
+ };
240
+ if (decoration.properties?.class) addClassToHast(el, decoration.properties.class);
241
+ el = transform(el, type) || el;
242
+ return el;
243
+ }
244
+ const lineApplies = [];
245
+ const sorted = ctx.decorations.sort((a, b) => b.start.offset - a.start.offset || a.end.offset - b.end.offset);
246
+ for (const decoration of sorted) {
247
+ const { start, end } = decoration;
248
+ if (start.line === end.line) applyLineSection(start.line, start.character, end.character, decoration);
249
+ else if (start.line < end.line) {
250
+ applyLineSection(start.line, start.character, Number.POSITIVE_INFINITY, decoration);
251
+ for (let i = start.line + 1; i < end.line; i++) lineApplies.unshift(() => applyLine(i, decoration));
252
+ applyLineSection(end.line, 0, end.character, decoration);
253
+ }
254
+ }
255
+ lineApplies.forEach((i) => i());
256
+ }
257
+ };
298
258
  }
299
259
  function verifyIntersections(items) {
300
- for (let i = 0; i < items.length; i++) {
301
- const foo = items[i];
302
- if (foo.start.offset > foo.end.offset) throw new ShikiError(`Invalid decoration range: ${JSON.stringify(foo.start)} - ${JSON.stringify(foo.end)}`);
303
- for (let j = i + 1; j < items.length; j++) {
304
- const bar = items[j];
305
- const isFooHasBarStart = foo.start.offset <= bar.start.offset && bar.start.offset < foo.end.offset;
306
- const isFooHasBarEnd = foo.start.offset < bar.end.offset && bar.end.offset <= foo.end.offset;
307
- const isBarHasFooStart = bar.start.offset <= foo.start.offset && foo.start.offset < bar.end.offset;
308
- const isBarHasFooEnd = bar.start.offset < foo.end.offset && foo.end.offset <= bar.end.offset;
309
- if (isFooHasBarStart || isFooHasBarEnd || isBarHasFooStart || isBarHasFooEnd) {
310
- if (isFooHasBarStart && isFooHasBarEnd) continue;
311
- if (isBarHasFooStart && isBarHasFooEnd) continue;
312
- if (isBarHasFooStart && foo.start.offset === foo.end.offset) continue;
313
- if (isFooHasBarEnd && bar.start.offset === bar.end.offset) continue;
314
- throw new ShikiError(`Decorations ${JSON.stringify(foo.start)} and ${JSON.stringify(bar.start)} intersect.`);
315
- }
316
- }
317
- }
260
+ for (let i = 0; i < items.length; i++) {
261
+ const foo = items[i];
262
+ if (foo.start.offset > foo.end.offset) throw new ShikiError(`Invalid decoration range: ${JSON.stringify(foo.start)} - ${JSON.stringify(foo.end)}`);
263
+ for (let j = i + 1; j < items.length; j++) {
264
+ const bar = items[j];
265
+ const isFooHasBarStart = foo.start.offset <= bar.start.offset && bar.start.offset < foo.end.offset;
266
+ const isFooHasBarEnd = foo.start.offset < bar.end.offset && bar.end.offset <= foo.end.offset;
267
+ const isBarHasFooStart = bar.start.offset <= foo.start.offset && foo.start.offset < bar.end.offset;
268
+ const isBarHasFooEnd = bar.start.offset < foo.end.offset && foo.end.offset <= bar.end.offset;
269
+ if (isFooHasBarStart || isFooHasBarEnd || isBarHasFooStart || isBarHasFooEnd) {
270
+ if (isFooHasBarStart && isFooHasBarEnd) continue;
271
+ if (isBarHasFooStart && isBarHasFooEnd) continue;
272
+ if (isBarHasFooStart && foo.start.offset === foo.end.offset) continue;
273
+ if (isFooHasBarEnd && bar.start.offset === bar.end.offset) continue;
274
+ throw new ShikiError(`Decorations ${JSON.stringify(foo.start)} and ${JSON.stringify(bar.start)} intersect.`);
275
+ }
276
+ }
277
+ }
318
278
  }
319
279
  function stringify(el) {
320
- if (el.type === "text") return el.value;
321
- if (el.type === "element") return el.children.map(stringify).join("");
322
- return "";
280
+ if (el.type === "text") return el.value;
281
+ if (el.type === "element") return el.children.map(stringify).join("");
282
+ return "";
323
283
  }
324
- var builtInTransformers = [/* @__PURE__ */ transformerDecorations()];
284
+ const builtInTransformers = [/* @__PURE__ */ transformerDecorations()];
325
285
  function getTransformers(options) {
326
- const transformers = sortTransformersByEnforcement(options.transformers || []);
327
- return [
328
- ...transformers.pre,
329
- ...transformers.normal,
330
- ...transformers.post,
331
- ...builtInTransformers
332
- ];
286
+ const transformers = sortTransformersByEnforcement(options.transformers || []);
287
+ return [
288
+ ...transformers.pre,
289
+ ...transformers.normal,
290
+ ...transformers.post,
291
+ ...builtInTransformers
292
+ ];
333
293
  }
334
294
  function sortTransformersByEnforcement(transformers) {
335
- const pre = [];
336
- const post = [];
337
- const normal = [];
338
- for (const transformer of transformers) switch (transformer.enforce) {
339
- case "pre":
340
- pre.push(transformer);
341
- break;
342
- case "post":
343
- post.push(transformer);
344
- break;
345
- default: normal.push(transformer);
346
- }
347
- return {
348
- pre,
349
- post,
350
- normal
351
- };
295
+ const pre = [];
296
+ const post = [];
297
+ const normal = [];
298
+ for (const transformer of transformers) switch (transformer.enforce) {
299
+ case "pre":
300
+ pre.push(transformer);
301
+ break;
302
+ case "post":
303
+ post.push(transformer);
304
+ break;
305
+ default:
306
+ normal.push(transformer);
307
+ }
308
+ return {
309
+ pre,
310
+ post,
311
+ normal
312
+ };
352
313
  }
353
314
  var namedColors = [
354
- "black",
355
- "red",
356
- "green",
357
- "yellow",
358
- "blue",
359
- "magenta",
360
- "cyan",
361
- "white",
362
- "brightBlack",
363
- "brightRed",
364
- "brightGreen",
365
- "brightYellow",
366
- "brightBlue",
367
- "brightMagenta",
368
- "brightCyan",
369
- "brightWhite"
315
+ "black",
316
+ "red",
317
+ "green",
318
+ "yellow",
319
+ "blue",
320
+ "magenta",
321
+ "cyan",
322
+ "white",
323
+ "brightBlack",
324
+ "brightRed",
325
+ "brightGreen",
326
+ "brightYellow",
327
+ "brightBlue",
328
+ "brightMagenta",
329
+ "brightCyan",
330
+ "brightWhite"
370
331
  ];
371
332
  var decorations = {
372
- 1: "bold",
373
- 2: "dim",
374
- 3: "italic",
375
- 4: "underline",
376
- 7: "reverse",
377
- 8: "hidden",
378
- 9: "strikethrough"
333
+ 1: "bold",
334
+ 2: "dim",
335
+ 3: "italic",
336
+ 4: "underline",
337
+ 7: "reverse",
338
+ 8: "hidden",
339
+ 9: "strikethrough"
379
340
  };
380
341
  function findSequence(value, position) {
381
- const nextEscape = value.indexOf("\x1B", position);
382
- if (nextEscape !== -1) {
383
- if (value[nextEscape + 1] === "[") {
384
- const nextClose = value.indexOf("m", nextEscape);
385
- if (nextClose !== -1) return {
386
- sequence: value.substring(nextEscape + 2, nextClose).split(";"),
387
- startPosition: nextEscape,
388
- position: nextClose + 1
389
- };
390
- }
391
- }
392
- return { position: value.length };
342
+ const nextEscape = value.indexOf("\x1B", position);
343
+ if (nextEscape !== -1) {
344
+ if (value[nextEscape + 1] === "[") {
345
+ const nextClose = value.indexOf("m", nextEscape);
346
+ if (nextClose !== -1) return {
347
+ sequence: value.substring(nextEscape + 2, nextClose).split(";"),
348
+ startPosition: nextEscape,
349
+ position: nextClose + 1
350
+ };
351
+ }
352
+ }
353
+ return { position: value.length };
393
354
  }
394
355
  function parseColor(sequence) {
395
- const colorMode = sequence.shift();
396
- if (colorMode === "2") {
397
- const rgb = sequence.splice(0, 3).map((x) => Number.parseInt(x));
398
- if (rgb.length !== 3 || rgb.some((x) => Number.isNaN(x))) return;
399
- return {
400
- type: "rgb",
401
- rgb
402
- };
403
- } else if (colorMode === "5") {
404
- const index = sequence.shift();
405
- if (index) return {
406
- type: "table",
407
- index: Number(index)
408
- };
409
- }
356
+ const colorMode = sequence.shift();
357
+ if (colorMode === "2") {
358
+ const rgb = sequence.splice(0, 3).map((x) => Number.parseInt(x));
359
+ if (rgb.length !== 3 || rgb.some((x) => Number.isNaN(x))) return;
360
+ return {
361
+ type: "rgb",
362
+ rgb
363
+ };
364
+ } else if (colorMode === "5") {
365
+ const index = sequence.shift();
366
+ if (index) return {
367
+ type: "table",
368
+ index: Number(index)
369
+ };
370
+ }
410
371
  }
411
372
  function parseSequence(sequence) {
412
- const commands = [];
413
- while (sequence.length > 0) {
414
- const code = sequence.shift();
415
- if (!code) continue;
416
- const codeInt = Number.parseInt(code);
417
- if (Number.isNaN(codeInt)) continue;
418
- if (codeInt === 0) commands.push({ type: "resetAll" });
419
- else if (codeInt <= 9) {
420
- if (decorations[codeInt]) commands.push({
421
- type: "setDecoration",
422
- value: decorations[codeInt]
423
- });
424
- } else if (codeInt <= 29) {
425
- const decoration = decorations[codeInt - 20];
426
- if (decoration) {
427
- commands.push({
428
- type: "resetDecoration",
429
- value: decoration
430
- });
431
- if (decoration === "dim") commands.push({
432
- type: "resetDecoration",
433
- value: "bold"
434
- });
435
- }
436
- } else if (codeInt <= 37) commands.push({
437
- type: "setForegroundColor",
438
- value: {
439
- type: "named",
440
- name: namedColors[codeInt - 30]
441
- }
442
- });
443
- else if (codeInt === 38) {
444
- const color = parseColor(sequence);
445
- if (color) commands.push({
446
- type: "setForegroundColor",
447
- value: color
448
- });
449
- } else if (codeInt === 39) commands.push({ type: "resetForegroundColor" });
450
- else if (codeInt <= 47) commands.push({
451
- type: "setBackgroundColor",
452
- value: {
453
- type: "named",
454
- name: namedColors[codeInt - 40]
455
- }
456
- });
457
- else if (codeInt === 48) {
458
- const color = parseColor(sequence);
459
- if (color) commands.push({
460
- type: "setBackgroundColor",
461
- value: color
462
- });
463
- } else if (codeInt === 49) commands.push({ type: "resetBackgroundColor" });
464
- else if (codeInt === 53) commands.push({
465
- type: "setDecoration",
466
- value: "overline"
467
- });
468
- else if (codeInt === 55) commands.push({
469
- type: "resetDecoration",
470
- value: "overline"
471
- });
472
- else if (codeInt >= 90 && codeInt <= 97) commands.push({
473
- type: "setForegroundColor",
474
- value: {
475
- type: "named",
476
- name: namedColors[codeInt - 90 + 8]
477
- }
478
- });
479
- else if (codeInt >= 100 && codeInt <= 107) commands.push({
480
- type: "setBackgroundColor",
481
- value: {
482
- type: "named",
483
- name: namedColors[codeInt - 100 + 8]
484
- }
485
- });
486
- }
487
- return commands;
373
+ const commands = [];
374
+ while (sequence.length > 0) {
375
+ const code = sequence.shift();
376
+ if (!code) continue;
377
+ const codeInt = Number.parseInt(code);
378
+ if (Number.isNaN(codeInt)) continue;
379
+ if (codeInt === 0) commands.push({ type: "resetAll" });
380
+ else if (codeInt <= 9) {
381
+ if (decorations[codeInt]) commands.push({
382
+ type: "setDecoration",
383
+ value: decorations[codeInt]
384
+ });
385
+ } else if (codeInt <= 29) {
386
+ const decoration = decorations[codeInt - 20];
387
+ if (decoration) {
388
+ commands.push({
389
+ type: "resetDecoration",
390
+ value: decoration
391
+ });
392
+ if (decoration === "dim") commands.push({
393
+ type: "resetDecoration",
394
+ value: "bold"
395
+ });
396
+ }
397
+ } else if (codeInt <= 37) commands.push({
398
+ type: "setForegroundColor",
399
+ value: {
400
+ type: "named",
401
+ name: namedColors[codeInt - 30]
402
+ }
403
+ });
404
+ else if (codeInt === 38) {
405
+ const color = parseColor(sequence);
406
+ if (color) commands.push({
407
+ type: "setForegroundColor",
408
+ value: color
409
+ });
410
+ } else if (codeInt === 39) commands.push({ type: "resetForegroundColor" });
411
+ else if (codeInt <= 47) commands.push({
412
+ type: "setBackgroundColor",
413
+ value: {
414
+ type: "named",
415
+ name: namedColors[codeInt - 40]
416
+ }
417
+ });
418
+ else if (codeInt === 48) {
419
+ const color = parseColor(sequence);
420
+ if (color) commands.push({
421
+ type: "setBackgroundColor",
422
+ value: color
423
+ });
424
+ } else if (codeInt === 49) commands.push({ type: "resetBackgroundColor" });
425
+ else if (codeInt === 53) commands.push({
426
+ type: "setDecoration",
427
+ value: "overline"
428
+ });
429
+ else if (codeInt === 55) commands.push({
430
+ type: "resetDecoration",
431
+ value: "overline"
432
+ });
433
+ else if (codeInt >= 90 && codeInt <= 97) commands.push({
434
+ type: "setForegroundColor",
435
+ value: {
436
+ type: "named",
437
+ name: namedColors[codeInt - 90 + 8]
438
+ }
439
+ });
440
+ else if (codeInt >= 100 && codeInt <= 107) commands.push({
441
+ type: "setBackgroundColor",
442
+ value: {
443
+ type: "named",
444
+ name: namedColors[codeInt - 100 + 8]
445
+ }
446
+ });
447
+ }
448
+ return commands;
488
449
  }
489
450
  function createAnsiSequenceParser() {
490
- let foreground = null;
491
- let background = null;
492
- let decorations2 = /* @__PURE__ */ new Set();
493
- return { parse(value) {
494
- const tokens = [];
495
- let position = 0;
496
- do {
497
- const findResult = findSequence(value, position);
498
- const text = findResult.sequence ? value.substring(position, findResult.startPosition) : value.substring(position);
499
- if (text.length > 0) tokens.push({
500
- value: text,
501
- foreground,
502
- background,
503
- decorations: new Set(decorations2)
504
- });
505
- if (findResult.sequence) {
506
- const commands = parseSequence(findResult.sequence);
507
- for (const styleToken of commands) if (styleToken.type === "resetAll") {
508
- foreground = null;
509
- background = null;
510
- decorations2.clear();
511
- } else if (styleToken.type === "resetForegroundColor") foreground = null;
512
- else if (styleToken.type === "resetBackgroundColor") background = null;
513
- else if (styleToken.type === "resetDecoration") decorations2.delete(styleToken.value);
514
- for (const styleToken of commands) if (styleToken.type === "setForegroundColor") foreground = styleToken.value;
515
- else if (styleToken.type === "setBackgroundColor") background = styleToken.value;
516
- else if (styleToken.type === "setDecoration") decorations2.add(styleToken.value);
517
- }
518
- position = findResult.position;
519
- } while (position < value.length);
520
- return tokens;
521
- } };
451
+ let foreground = null;
452
+ let background = null;
453
+ let decorations2 = /* @__PURE__ */ new Set();
454
+ return { parse(value) {
455
+ const tokens = [];
456
+ let position = 0;
457
+ do {
458
+ const findResult = findSequence(value, position);
459
+ const text = findResult.sequence ? value.substring(position, findResult.startPosition) : value.substring(position);
460
+ if (text.length > 0) tokens.push({
461
+ value: text,
462
+ foreground,
463
+ background,
464
+ decorations: new Set(decorations2)
465
+ });
466
+ if (findResult.sequence) {
467
+ const commands = parseSequence(findResult.sequence);
468
+ for (const styleToken of commands) if (styleToken.type === "resetAll") {
469
+ foreground = null;
470
+ background = null;
471
+ decorations2.clear();
472
+ } else if (styleToken.type === "resetForegroundColor") foreground = null;
473
+ else if (styleToken.type === "resetBackgroundColor") background = null;
474
+ else if (styleToken.type === "resetDecoration") decorations2.delete(styleToken.value);
475
+ for (const styleToken of commands) if (styleToken.type === "setForegroundColor") foreground = styleToken.value;
476
+ else if (styleToken.type === "setBackgroundColor") background = styleToken.value;
477
+ else if (styleToken.type === "setDecoration") decorations2.add(styleToken.value);
478
+ }
479
+ position = findResult.position;
480
+ } while (position < value.length);
481
+ return tokens;
482
+ } };
522
483
  }
523
484
  var defaultNamedColorsMap = {
524
- black: "#000000",
525
- red: "#bb0000",
526
- green: "#00bb00",
527
- yellow: "#bbbb00",
528
- blue: "#0000bb",
529
- magenta: "#ff00ff",
530
- cyan: "#00bbbb",
531
- white: "#eeeeee",
532
- brightBlack: "#555555",
533
- brightRed: "#ff5555",
534
- brightGreen: "#00ff00",
535
- brightYellow: "#ffff55",
536
- brightBlue: "#5555ff",
537
- brightMagenta: "#ff55ff",
538
- brightCyan: "#55ffff",
539
- brightWhite: "#ffffff"
485
+ black: "#000000",
486
+ red: "#bb0000",
487
+ green: "#00bb00",
488
+ yellow: "#bbbb00",
489
+ blue: "#0000bb",
490
+ magenta: "#ff00ff",
491
+ cyan: "#00bbbb",
492
+ white: "#eeeeee",
493
+ brightBlack: "#555555",
494
+ brightRed: "#ff5555",
495
+ brightGreen: "#00ff00",
496
+ brightYellow: "#ffff55",
497
+ brightBlue: "#5555ff",
498
+ brightMagenta: "#ff55ff",
499
+ brightCyan: "#55ffff",
500
+ brightWhite: "#ffffff"
540
501
  };
541
502
  function createColorPalette(namedColorsMap = defaultNamedColorsMap) {
542
- function namedColor(name) {
543
- return namedColorsMap[name];
544
- }
545
- function rgbColor(rgb) {
546
- return `#${rgb.map((x) => Math.max(0, Math.min(x, 255)).toString(16).padStart(2, "0")).join("")}`;
547
- }
548
- let colorTable;
549
- function getColorTable() {
550
- if (colorTable) return colorTable;
551
- colorTable = [];
552
- for (let i = 0; i < namedColors.length; i++) colorTable.push(namedColor(namedColors[i]));
553
- let levels = [
554
- 0,
555
- 95,
556
- 135,
557
- 175,
558
- 215,
559
- 255
560
- ];
561
- for (let r = 0; r < 6; r++) for (let g = 0; g < 6; g++) for (let b = 0; b < 6; b++) colorTable.push(rgbColor([
562
- levels[r],
563
- levels[g],
564
- levels[b]
565
- ]));
566
- let level = 8;
567
- for (let i = 0; i < 24; i++, level += 10) colorTable.push(rgbColor([
568
- level,
569
- level,
570
- level
571
- ]));
572
- return colorTable;
573
- }
574
- function tableColor(index) {
575
- return getColorTable()[index];
576
- }
577
- function value(color) {
578
- switch (color.type) {
579
- case "named": return namedColor(color.name);
580
- case "rgb": return rgbColor(color.rgb);
581
- case "table": return tableColor(color.index);
582
- }
583
- }
584
- return { value };
503
+ function namedColor(name) {
504
+ return namedColorsMap[name];
505
+ }
506
+ function rgbColor(rgb) {
507
+ return `#${rgb.map((x) => Math.max(0, Math.min(x, 255)).toString(16).padStart(2, "0")).join("")}`;
508
+ }
509
+ let colorTable;
510
+ function getColorTable() {
511
+ if (colorTable) return colorTable;
512
+ colorTable = [];
513
+ for (let i = 0; i < namedColors.length; i++) colorTable.push(namedColor(namedColors[i]));
514
+ let levels = [
515
+ 0,
516
+ 95,
517
+ 135,
518
+ 175,
519
+ 215,
520
+ 255
521
+ ];
522
+ for (let r = 0; r < 6; r++) for (let g = 0; g < 6; g++) for (let b = 0; b < 6; b++) colorTable.push(rgbColor([
523
+ levels[r],
524
+ levels[g],
525
+ levels[b]
526
+ ]));
527
+ let level = 8;
528
+ for (let i = 0; i < 24; i++, level += 10) colorTable.push(rgbColor([
529
+ level,
530
+ level,
531
+ level
532
+ ]));
533
+ return colorTable;
534
+ }
535
+ function tableColor(index) {
536
+ return getColorTable()[index];
537
+ }
538
+ function value(color) {
539
+ switch (color.type) {
540
+ case "named":
541
+ return namedColor(color.name);
542
+ case "rgb":
543
+ return rgbColor(color.rgb);
544
+ case "table":
545
+ return tableColor(color.index);
546
+ }
547
+ }
548
+ return { value };
585
549
  }
586
- /**
587
- * Default ANSI palette (VSCode compatible fallbacks)
588
- * Used when the theme does not define terminal.ansi* colors.
589
- */
590
- var defaultAnsiColors = {
591
- black: "#000000",
592
- red: "#cd3131",
593
- green: "#0DBC79",
594
- yellow: "#E5E510",
595
- blue: "#2472C8",
596
- magenta: "#BC3FBC",
597
- cyan: "#11A8CD",
598
- white: "#E5E5E5",
599
- brightBlack: "#666666",
600
- brightRed: "#F14C4C",
601
- brightGreen: "#23D18B",
602
- brightYellow: "#F5F543",
603
- brightBlue: "#3B8EEA",
604
- brightMagenta: "#D670D6",
605
- brightCyan: "#29B8DB",
606
- brightWhite: "#FFFFFF"
550
+ const defaultAnsiColors = {
551
+ black: "#000000",
552
+ red: "#cd3131",
553
+ green: "#0DBC79",
554
+ yellow: "#E5E510",
555
+ blue: "#2472C8",
556
+ magenta: "#BC3FBC",
557
+ cyan: "#11A8CD",
558
+ white: "#E5E5E5",
559
+ brightBlack: "#666666",
560
+ brightRed: "#F14C4C",
561
+ brightGreen: "#23D18B",
562
+ brightYellow: "#F5F543",
563
+ brightBlue: "#3B8EEA",
564
+ brightMagenta: "#D670D6",
565
+ brightCyan: "#29B8DB",
566
+ brightWhite: "#FFFFFF"
607
567
  };
608
568
  function tokenizeAnsiWithTheme(theme, fileContents, options) {
609
- const colorReplacements = resolveColorReplacements(theme, options);
610
- const lines = splitLines(fileContents);
611
- const colorPalette = createColorPalette(Object.fromEntries(namedColors.map((name) => {
612
- const key = `terminal.ansi${name[0].toUpperCase()}${name.substring(1)}`;
613
- return [name, theme.colors?.[key] || defaultAnsiColors[name]];
614
- })));
615
- const parser = createAnsiSequenceParser();
616
- return lines.map((line) => parser.parse(line[0]).map((token) => {
617
- let color;
618
- let bgColor;
619
- if (token.decorations.has("reverse")) {
620
- color = token.background ? colorPalette.value(token.background) : theme.bg;
621
- bgColor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;
622
- } else {
623
- color = token.foreground ? colorPalette.value(token.foreground) : theme.fg;
624
- bgColor = token.background ? colorPalette.value(token.background) : void 0;
625
- }
626
- color = applyColorReplacements(color, colorReplacements);
627
- bgColor = applyColorReplacements(bgColor, colorReplacements);
628
- if (token.decorations.has("dim")) color = dimColor(color);
629
- let fontStyle = FontStyle.None;
630
- if (token.decorations.has("bold")) fontStyle |= FontStyle.Bold;
631
- if (token.decorations.has("italic")) fontStyle |= FontStyle.Italic;
632
- if (token.decorations.has("underline")) fontStyle |= FontStyle.Underline;
633
- if (token.decorations.has("strikethrough")) fontStyle |= FontStyle.Strikethrough;
634
- return {
635
- content: token.value,
636
- offset: line[1],
637
- color,
638
- bgColor,
639
- fontStyle
640
- };
641
- }));
569
+ const colorReplacements = resolveColorReplacements(theme, options);
570
+ const lines = splitLines(fileContents);
571
+ const colorPalette = createColorPalette(Object.fromEntries(namedColors.map((name) => {
572
+ const key = `terminal.ansi${name[0].toUpperCase()}${name.substring(1)}`;
573
+ return [name, theme.colors?.[key] || defaultAnsiColors[name]];
574
+ })));
575
+ const parser = createAnsiSequenceParser();
576
+ return lines.map((line) => parser.parse(line[0]).map((token) => {
577
+ let color;
578
+ let bgColor;
579
+ if (token.decorations.has("reverse")) {
580
+ color = token.background ? colorPalette.value(token.background) : theme.bg;
581
+ bgColor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;
582
+ } else {
583
+ color = token.foreground ? colorPalette.value(token.foreground) : theme.fg;
584
+ bgColor = token.background ? colorPalette.value(token.background) : void 0;
585
+ }
586
+ color = applyColorReplacements(color, colorReplacements);
587
+ bgColor = applyColorReplacements(bgColor, colorReplacements);
588
+ if (token.decorations.has("dim")) color = dimColor(color);
589
+ let fontStyle = FontStyle.None;
590
+ if (token.decorations.has("bold")) fontStyle |= FontStyle.Bold;
591
+ if (token.decorations.has("italic")) fontStyle |= FontStyle.Italic;
592
+ if (token.decorations.has("underline")) fontStyle |= FontStyle.Underline;
593
+ if (token.decorations.has("strikethrough")) fontStyle |= FontStyle.Strikethrough;
594
+ return {
595
+ content: token.value,
596
+ offset: line[1],
597
+ color,
598
+ bgColor,
599
+ fontStyle
600
+ };
601
+ }));
642
602
  }
643
- /**
644
- * Adds 50% alpha to a hex color string or the "-dim" postfix to a CSS variable
645
- */
646
603
  function dimColor(color) {
647
- const hexMatch = color.match(/#([0-9a-f]{3,8})/i);
648
- if (hexMatch) {
649
- const hex = hexMatch[1];
650
- if (hex.length === 8) {
651
- const alpha = Math.round(Number.parseInt(hex.slice(6, 8), 16) / 2).toString(16).padStart(2, "0");
652
- return `#${hex.slice(0, 6)}${alpha}`;
653
- } else if (hex.length === 6) return `#${hex}80`;
654
- else if (hex.length === 4) {
655
- const r = hex[0];
656
- const g = hex[1];
657
- const b = hex[2];
658
- const a = hex[3];
659
- return `#${r}${r}${g}${g}${b}${b}${Math.round(Number.parseInt(`${a}${a}`, 16) / 2).toString(16).padStart(2, "0")}`;
660
- } else if (hex.length === 3) {
661
- const r = hex[0];
662
- const g = hex[1];
663
- const b = hex[2];
664
- return `#${r}${r}${g}${g}${b}${b}80`;
665
- }
666
- }
667
- const cssVarMatch = color.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
668
- if (cssVarMatch) return `var(${cssVarMatch[1]}-dim)`;
669
- return color;
604
+ const hexMatch = color.match(/#([0-9a-f]{3,8})/i);
605
+ if (hexMatch) {
606
+ const hex = hexMatch[1];
607
+ if (hex.length === 8) {
608
+ const alpha = Math.round(Number.parseInt(hex.slice(6, 8), 16) / 2).toString(16).padStart(2, "0");
609
+ return `#${hex.slice(0, 6)}${alpha}`;
610
+ } else if (hex.length === 6) return `#${hex}80`;
611
+ else if (hex.length === 4) {
612
+ const r = hex[0];
613
+ const g = hex[1];
614
+ const b = hex[2];
615
+ const a = hex[3];
616
+ return `#${r}${r}${g}${g}${b}${b}${Math.round(Number.parseInt(`${a}${a}`, 16) / 2).toString(16).padStart(2, "0")}`;
617
+ } else if (hex.length === 3) {
618
+ const r = hex[0];
619
+ const g = hex[1];
620
+ const b = hex[2];
621
+ return `#${r}${r}${g}${g}${b}${b}80`;
622
+ }
623
+ }
624
+ const cssVarMatch = color.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
625
+ if (cssVarMatch) return `var(${cssVarMatch[1]}-dim)`;
626
+ return color;
670
627
  }
671
- /**
672
- * Code to tokens, with a simple theme.
673
- * This wraps the tokenizer's implementation to add ANSI support.
674
- */
675
628
  function codeToTokensBase(primitive, code, options = {}) {
676
- const lang = primitive.resolveLangAlias(options.lang || "text");
677
- const { theme: themeName = primitive.getLoadedThemes()[0] } = options;
678
- if (!isPlainLang(lang) && !isNoneTheme(themeName) && lang === "ansi") {
679
- const { theme } = primitive.setTheme(themeName);
680
- return tokenizeAnsiWithTheme(theme, code, options);
681
- }
682
- return codeToTokensBase$1(primitive, code, options);
629
+ const lang = primitive.resolveLangAlias(options.lang || "text");
630
+ const { theme: themeName = primitive.getLoadedThemes()[0] } = options;
631
+ if (!isPlainLang(lang) && !isNoneTheme(themeName) && lang === "ansi") {
632
+ const { theme } = primitive.setTheme(themeName);
633
+ return tokenizeAnsiWithTheme(theme, code, options);
634
+ }
635
+ return codeToTokensBase$1(primitive, code, options);
683
636
  }
684
- /**
685
- * High-level code-to-tokens API.
686
- *
687
- * It will use `codeToTokensWithThemes` or `codeToTokensBase` based on the options.
688
- */
689
637
  function codeToTokens(primitive, code, options) {
690
- let bg;
691
- let fg;
692
- let tokens;
693
- let themeName;
694
- let rootStyle;
695
- let grammarState;
696
- if ("themes" in options) {
697
- const { defaultColor = "light", cssVariablePrefix = "--shiki-", colorsRendering = "css-vars" } = options;
698
- const themes = Object.entries(options.themes).filter((i) => i[1]).map((i) => ({
699
- color: i[0],
700
- theme: i[1]
701
- })).sort((a, b) => a.color === defaultColor ? -1 : b.color === defaultColor ? 1 : 0);
702
- if (themes.length === 0) throw new ShikiError("`themes` option must not be empty");
703
- const themeTokens = codeToTokensWithThemes(primitive, code, options, codeToTokensBase);
704
- grammarState = getLastGrammarStateFromMap(themeTokens);
705
- if (defaultColor && DEFAULT_COLOR_LIGHT_DARK !== defaultColor && !themes.find((t) => t.color === defaultColor)) throw new ShikiError(`\`themes\` option must contain the defaultColor key \`${defaultColor}\``);
706
- const themeRegs = themes.map((t) => primitive.getTheme(t.theme));
707
- const themesOrder = themes.map((t) => t.color);
708
- tokens = themeTokens.map((line) => line.map((token) => flatTokenVariants(token, themesOrder, cssVariablePrefix, defaultColor, colorsRendering)));
709
- if (grammarState) setLastGrammarStateToMap(tokens, grammarState);
710
- const themeColorReplacements = themes.map((t) => resolveColorReplacements(t.theme, options));
711
- fg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, "fg", colorsRendering);
712
- bg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, "bg", colorsRendering);
713
- themeName = `shiki-themes ${themeRegs.map((t) => t.name).join(" ")}`;
714
- rootStyle = defaultColor ? void 0 : [fg, bg].join(";");
715
- } else if ("theme" in options) {
716
- const colorReplacements = resolveColorReplacements(options.theme, options);
717
- tokens = codeToTokensBase(primitive, code, options);
718
- const _theme = primitive.getTheme(options.theme);
719
- bg = applyColorReplacements(_theme.bg, colorReplacements);
720
- fg = applyColorReplacements(_theme.fg, colorReplacements);
721
- themeName = _theme.name;
722
- grammarState = getLastGrammarStateFromMap(tokens);
723
- } else throw new ShikiError("Invalid options, either `theme` or `themes` must be provided");
724
- return {
725
- tokens,
726
- fg,
727
- bg,
728
- themeName,
729
- rootStyle,
730
- grammarState
731
- };
638
+ let bg;
639
+ let fg;
640
+ let tokens;
641
+ let themeName;
642
+ let rootStyle;
643
+ let grammarState;
644
+ if ("themes" in options) {
645
+ const { defaultColor = "light", cssVariablePrefix = "--shiki-", colorsRendering = "css-vars" } = options;
646
+ const themes = Object.entries(options.themes).filter((i) => i[1]).map((i) => ({
647
+ color: i[0],
648
+ theme: i[1]
649
+ })).sort((a, b) => a.color === defaultColor ? -1 : b.color === defaultColor ? 1 : 0);
650
+ if (themes.length === 0) throw new ShikiError("`themes` option must not be empty");
651
+ const themeTokens = codeToTokensWithThemes(primitive, code, options, codeToTokensBase);
652
+ grammarState = getLastGrammarStateFromMap(themeTokens);
653
+ if (defaultColor && DEFAULT_COLOR_LIGHT_DARK !== defaultColor && !themes.find((t) => t.color === defaultColor)) throw new ShikiError(`\`themes\` option must contain the defaultColor key \`${defaultColor}\``);
654
+ const themeRegs = themes.map((t) => primitive.getTheme(t.theme));
655
+ const themesOrder = themes.map((t) => t.color);
656
+ tokens = themeTokens.map((line) => line.map((token) => flatTokenVariants(token, themesOrder, cssVariablePrefix, defaultColor, colorsRendering)));
657
+ if (grammarState) setLastGrammarStateToMap(tokens, grammarState);
658
+ const themeColorReplacements = themes.map((t) => resolveColorReplacements(t.theme, options));
659
+ fg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, "fg", colorsRendering);
660
+ bg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, "bg", colorsRendering);
661
+ themeName = `shiki-themes ${themeRegs.map((t) => t.name).join(" ")}`;
662
+ rootStyle = defaultColor ? void 0 : [fg, bg].join(";");
663
+ } else if ("theme" in options) {
664
+ const colorReplacements = resolveColorReplacements(options.theme, options);
665
+ tokens = codeToTokensBase(primitive, code, options);
666
+ const _theme = primitive.getTheme(options.theme);
667
+ bg = applyColorReplacements(_theme.bg, colorReplacements);
668
+ fg = applyColorReplacements(_theme.fg, colorReplacements);
669
+ themeName = _theme.name;
670
+ grammarState = getLastGrammarStateFromMap(tokens);
671
+ } else throw new ShikiError("Invalid options, either `theme` or `themes` must be provided");
672
+ return {
673
+ tokens,
674
+ fg,
675
+ bg,
676
+ themeName,
677
+ rootStyle,
678
+ grammarState
679
+ };
732
680
  }
733
681
  function mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, property, colorsRendering) {
734
- return themes.map((t, idx) => {
735
- const value = applyColorReplacements(themeRegs[idx][property], themeColorReplacements[idx]) || "inherit";
736
- const cssVar = `${cssVariablePrefix + t.color}${property === "bg" ? "-bg" : ""}:${value}`;
737
- if (idx === 0 && defaultColor) {
738
- if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && themes.length > 1) {
739
- const lightIndex = themes.findIndex((t) => t.color === "light");
740
- const darkIndex = themes.findIndex((t) => t.color === "dark");
741
- if (lightIndex === -1 || darkIndex === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
742
- return `light-dark(${applyColorReplacements(themeRegs[lightIndex][property], themeColorReplacements[lightIndex]) || "inherit"}, ${applyColorReplacements(themeRegs[darkIndex][property], themeColorReplacements[darkIndex]) || "inherit"});${cssVar}`;
743
- }
744
- return value;
745
- }
746
- if (colorsRendering === "css-vars") return cssVar;
747
- return null;
748
- }).filter((i) => !!i).join(";");
682
+ return themes.map((t, idx) => {
683
+ const value = applyColorReplacements(themeRegs[idx][property], themeColorReplacements[idx]) || "inherit";
684
+ const cssVar = `${cssVariablePrefix + t.color}${property === "bg" ? "-bg" : ""}:${value}`;
685
+ if (idx === 0 && defaultColor) {
686
+ if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && themes.length > 1) {
687
+ const lightIndex = themes.findIndex((t2) => t2.color === "light");
688
+ const darkIndex = themes.findIndex((t2) => t2.color === "dark");
689
+ if (lightIndex === -1 || darkIndex === -1) throw new ShikiError('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
690
+ return `light-dark(${applyColorReplacements(themeRegs[lightIndex][property], themeColorReplacements[lightIndex]) || "inherit"}, ${applyColorReplacements(themeRegs[darkIndex][property], themeColorReplacements[darkIndex]) || "inherit"});${cssVar}`;
691
+ }
692
+ return value;
693
+ }
694
+ if (colorsRendering === "css-vars") return cssVar;
695
+ return null;
696
+ }).filter((i) => !!i).join(";");
749
697
  }
750
698
  function codeToHast(primitive, code, options, transformerContext = {
751
- meta: {},
752
- options,
753
- codeToHast: (_code, _options) => codeToHast(primitive, _code, _options),
754
- codeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)
699
+ meta: {},
700
+ options,
701
+ codeToHast: (_code, _options) => codeToHast(primitive, _code, _options),
702
+ codeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)
755
703
  }) {
756
- let input = code;
757
- for (const transformer of getTransformers(options)) input = transformer.preprocess?.call(transformerContext, input, options) || input;
758
- let { tokens, fg, bg, themeName, rootStyle, grammarState } = codeToTokens(primitive, input, options);
759
- const { mergeWhitespaces = true, mergeSameStyleTokens = false } = options;
760
- if (mergeWhitespaces === true) tokens = mergeWhitespaceTokens(tokens);
761
- else if (mergeWhitespaces === "never") tokens = splitWhitespaceTokens(tokens);
762
- if (mergeSameStyleTokens) tokens = mergeAdjacentStyledTokens(tokens);
763
- const contextSource = {
764
- ...transformerContext,
765
- get source() {
766
- return input;
767
- }
768
- };
769
- for (const transformer of getTransformers(options)) tokens = transformer.tokens?.call(contextSource, tokens) || tokens;
770
- return tokensToHast(tokens, {
771
- ...options,
772
- fg,
773
- bg,
774
- themeName,
775
- rootStyle: options.rootStyle === false ? false : options.rootStyle ?? rootStyle
776
- }, contextSource, grammarState);
704
+ let input = code;
705
+ for (const transformer of getTransformers(options)) input = transformer.preprocess?.call(transformerContext, input, options) || input;
706
+ let { tokens, fg, bg, themeName, rootStyle, grammarState } = codeToTokens(primitive, input, options);
707
+ const { mergeWhitespaces = true, mergeSameStyleTokens = false } = options;
708
+ if (mergeWhitespaces === true) tokens = mergeWhitespaceTokens(tokens);
709
+ else if (mergeWhitespaces === "never") tokens = splitWhitespaceTokens(tokens);
710
+ if (mergeSameStyleTokens) tokens = mergeAdjacentStyledTokens(tokens);
711
+ const contextSource = {
712
+ ...transformerContext,
713
+ get source() {
714
+ return input;
715
+ }
716
+ };
717
+ for (const transformer of getTransformers(options)) tokens = transformer.tokens?.call(contextSource, tokens) || tokens;
718
+ return tokensToHast(tokens, {
719
+ ...options,
720
+ fg,
721
+ bg,
722
+ themeName,
723
+ rootStyle: options.rootStyle === false ? false : options.rootStyle ?? rootStyle
724
+ }, contextSource, grammarState);
777
725
  }
778
726
  function tokensToHast(tokens, options, transformerContext, grammarState = getLastGrammarStateFromMap(tokens)) {
779
- const transformers = getTransformers(options);
780
- const lines = [];
781
- const root = {
782
- type: "root",
783
- children: []
784
- };
785
- const { structure = "classic", tabindex = "0" } = options;
786
- const properties = { class: `shiki ${options.themeName || ""}` };
787
- if (options.rootStyle !== false) if (options.rootStyle != null) properties.style = options.rootStyle;
788
- else properties.style = `background-color:${options.bg};color:${options.fg}`;
789
- if (tabindex !== false && tabindex != null) properties.tabindex = tabindex.toString();
790
- for (const [key, value] of Object.entries(options.meta || {})) if (!key.startsWith("_")) properties[key] = value;
791
- let preNode = {
792
- type: "element",
793
- tagName: "pre",
794
- properties,
795
- children: [],
796
- data: options.data
797
- };
798
- let codeNode = {
799
- type: "element",
800
- tagName: "code",
801
- properties: {},
802
- children: lines
803
- };
804
- const lineNodes = [];
805
- const context = {
806
- ...transformerContext,
807
- structure,
808
- addClassToHast,
809
- get source() {
810
- return transformerContext.source;
811
- },
812
- get tokens() {
813
- return tokens;
814
- },
815
- get options() {
816
- return options;
817
- },
818
- get root() {
819
- return root;
820
- },
821
- get pre() {
822
- return preNode;
823
- },
824
- get code() {
825
- return codeNode;
826
- },
827
- get lines() {
828
- return lineNodes;
829
- }
830
- };
831
- tokens.forEach((line, idx) => {
832
- if (idx) {
833
- if (structure === "inline") root.children.push({
834
- type: "element",
835
- tagName: "br",
836
- properties: {},
837
- children: []
838
- });
839
- else if (structure === "classic") lines.push({
840
- type: "text",
841
- value: "\n"
842
- });
843
- }
844
- let lineNode = {
845
- type: "element",
846
- tagName: "span",
847
- properties: { class: "line" },
848
- children: []
849
- };
850
- let col = 0;
851
- for (const token of line) {
852
- let tokenNode = {
853
- type: "element",
854
- tagName: "span",
855
- properties: { ...token.htmlAttrs },
856
- children: [{
857
- type: "text",
858
- value: token.content
859
- }]
860
- };
861
- const style = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));
862
- if (style) tokenNode.properties.style = style;
863
- for (const transformer of transformers) tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode, token) || tokenNode;
864
- if (structure === "inline") root.children.push(tokenNode);
865
- else if (structure === "classic") lineNode.children.push(tokenNode);
866
- col += token.content.length;
867
- }
868
- if (structure === "classic") {
869
- for (const transformer of transformers) lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode;
870
- lineNodes.push(lineNode);
871
- lines.push(lineNode);
872
- } else if (structure === "inline") lineNodes.push(lineNode);
873
- });
874
- if (structure === "classic") {
875
- for (const transformer of transformers) codeNode = transformer?.code?.call(context, codeNode) || codeNode;
876
- preNode.children.push(codeNode);
877
- for (const transformer of transformers) preNode = transformer?.pre?.call(context, preNode) || preNode;
878
- root.children.push(preNode);
879
- } else if (structure === "inline") {
880
- const syntheticLines = [];
881
- let currentLine = {
882
- type: "element",
883
- tagName: "span",
884
- properties: { class: "line" },
885
- children: []
886
- };
887
- for (const child of root.children) if (child.type === "element" && child.tagName === "br") {
888
- syntheticLines.push(currentLine);
889
- currentLine = {
890
- type: "element",
891
- tagName: "span",
892
- properties: { class: "line" },
893
- children: []
894
- };
895
- } else if (child.type === "element" || child.type === "text") currentLine.children.push(child);
896
- syntheticLines.push(currentLine);
897
- let transformedCode = {
898
- type: "element",
899
- tagName: "code",
900
- properties: {},
901
- children: syntheticLines
902
- };
903
- for (const transformer of transformers) transformedCode = transformer?.code?.call(context, transformedCode) || transformedCode;
904
- root.children = [];
905
- for (let i = 0; i < transformedCode.children.length; i++) {
906
- if (i > 0) root.children.push({
907
- type: "element",
908
- tagName: "br",
909
- properties: {},
910
- children: []
911
- });
912
- const line = transformedCode.children[i];
913
- if (line.type === "element") root.children.push(...line.children);
914
- }
915
- }
916
- let result = root;
917
- for (const transformer of transformers) result = transformer?.root?.call(context, result) || result;
918
- if (grammarState) setLastGrammarStateToMap(result, grammarState);
919
- return result;
727
+ const transformers = getTransformers(options);
728
+ const lines = [];
729
+ const root = {
730
+ type: "root",
731
+ children: []
732
+ };
733
+ const { structure = "classic", tabindex = "0" } = options;
734
+ const properties = { class: `shiki ${options.themeName || ""}` };
735
+ if (options.rootStyle !== false) if (options.rootStyle != null) properties.style = options.rootStyle;
736
+ else properties.style = `background-color:${options.bg};color:${options.fg}`;
737
+ if (tabindex !== false && tabindex != null) properties.tabindex = tabindex.toString();
738
+ for (const [key, value] of Object.entries(options.meta || {})) if (!key.startsWith("_")) properties[key] = value;
739
+ let preNode = {
740
+ type: "element",
741
+ tagName: "pre",
742
+ properties,
743
+ children: [],
744
+ data: options.data
745
+ };
746
+ let codeNode = {
747
+ type: "element",
748
+ tagName: "code",
749
+ properties: {},
750
+ children: lines
751
+ };
752
+ const lineNodes = [];
753
+ const context = {
754
+ ...transformerContext,
755
+ structure,
756
+ addClassToHast,
757
+ get source() {
758
+ return transformerContext.source;
759
+ },
760
+ get tokens() {
761
+ return tokens;
762
+ },
763
+ get options() {
764
+ return options;
765
+ },
766
+ get root() {
767
+ return root;
768
+ },
769
+ get pre() {
770
+ return preNode;
771
+ },
772
+ get code() {
773
+ return codeNode;
774
+ },
775
+ get lines() {
776
+ return lineNodes;
777
+ }
778
+ };
779
+ tokens.forEach((line, idx) => {
780
+ if (idx) {
781
+ if (structure === "inline") root.children.push({
782
+ type: "element",
783
+ tagName: "br",
784
+ properties: {},
785
+ children: []
786
+ });
787
+ else if (structure === "classic") lines.push({
788
+ type: "text",
789
+ value: "\n"
790
+ });
791
+ }
792
+ let lineNode = {
793
+ type: "element",
794
+ tagName: "span",
795
+ properties: { class: "line" },
796
+ children: []
797
+ };
798
+ let col = 0;
799
+ for (const token of line) {
800
+ let tokenNode = {
801
+ type: "element",
802
+ tagName: "span",
803
+ properties: { ...token.htmlAttrs },
804
+ children: [{
805
+ type: "text",
806
+ value: token.content
807
+ }]
808
+ };
809
+ const style = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));
810
+ if (style) tokenNode.properties.style = style;
811
+ for (const transformer of transformers) tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode, token) || tokenNode;
812
+ if (structure === "inline") root.children.push(tokenNode);
813
+ else if (structure === "classic") lineNode.children.push(tokenNode);
814
+ col += token.content.length;
815
+ }
816
+ if (structure === "classic") {
817
+ for (const transformer of transformers) lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode;
818
+ lineNodes.push(lineNode);
819
+ lines.push(lineNode);
820
+ } else if (structure === "inline") lineNodes.push(lineNode);
821
+ });
822
+ if (structure === "classic") {
823
+ for (const transformer of transformers) codeNode = transformer?.code?.call(context, codeNode) || codeNode;
824
+ preNode.children.push(codeNode);
825
+ for (const transformer of transformers) preNode = transformer?.pre?.call(context, preNode) || preNode;
826
+ root.children.push(preNode);
827
+ } else if (structure === "inline") {
828
+ const syntheticLines = [];
829
+ let currentLine = {
830
+ type: "element",
831
+ tagName: "span",
832
+ properties: { class: "line" },
833
+ children: []
834
+ };
835
+ for (const child of root.children) if (child.type === "element" && child.tagName === "br") {
836
+ syntheticLines.push(currentLine);
837
+ currentLine = {
838
+ type: "element",
839
+ tagName: "span",
840
+ properties: { class: "line" },
841
+ children: []
842
+ };
843
+ } else if (child.type === "element" || child.type === "text") currentLine.children.push(child);
844
+ syntheticLines.push(currentLine);
845
+ let transformedCode = {
846
+ type: "element",
847
+ tagName: "code",
848
+ properties: {},
849
+ children: syntheticLines
850
+ };
851
+ for (const transformer of transformers) transformedCode = transformer?.code?.call(context, transformedCode) || transformedCode;
852
+ root.children = [];
853
+ for (let i = 0; i < transformedCode.children.length; i++) {
854
+ if (i > 0) root.children.push({
855
+ type: "element",
856
+ tagName: "br",
857
+ properties: {},
858
+ children: []
859
+ });
860
+ const line = transformedCode.children[i];
861
+ if (line.type === "element") root.children.push(...line.children);
862
+ }
863
+ }
864
+ let result = root;
865
+ for (const transformer of transformers) result = transformer?.root?.call(context, result) || result;
866
+ if (grammarState) setLastGrammarStateToMap(result, grammarState);
867
+ return result;
920
868
  }
921
869
  function mergeWhitespaceTokens(tokens) {
922
- return tokens.map((line) => {
923
- const newLine = [];
924
- let carryOnContent = "";
925
- let firstOffset;
926
- line.forEach((token, idx) => {
927
- const couldMerge = !(token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough));
928
- if (couldMerge && token.content.match(/^\s+$/) && line[idx + 1]) {
929
- if (firstOffset === void 0) firstOffset = token.offset;
930
- carryOnContent += token.content;
931
- } else if (carryOnContent) {
932
- if (couldMerge) newLine.push({
933
- ...token,
934
- offset: firstOffset,
935
- content: carryOnContent + token.content
936
- });
937
- else newLine.push({
938
- content: carryOnContent,
939
- offset: firstOffset
940
- }, token);
941
- firstOffset = void 0;
942
- carryOnContent = "";
943
- } else newLine.push(token);
944
- });
945
- return newLine;
946
- });
870
+ return tokens.map((line) => {
871
+ const newLine = [];
872
+ let carryOnContent = "";
873
+ let firstOffset;
874
+ line.forEach((token, idx) => {
875
+ const couldMerge = !(token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough));
876
+ if (couldMerge && token.content.match(/^\s+$/) && line[idx + 1]) {
877
+ if (firstOffset === void 0) firstOffset = token.offset;
878
+ carryOnContent += token.content;
879
+ } else if (carryOnContent) {
880
+ if (couldMerge) newLine.push({
881
+ ...token,
882
+ offset: firstOffset,
883
+ content: carryOnContent + token.content
884
+ });
885
+ else newLine.push({
886
+ content: carryOnContent,
887
+ offset: firstOffset
888
+ }, token);
889
+ firstOffset = void 0;
890
+ carryOnContent = "";
891
+ } else newLine.push(token);
892
+ });
893
+ return newLine;
894
+ });
947
895
  }
948
896
  function splitWhitespaceTokens(tokens) {
949
- return tokens.map((line) => {
950
- return line.flatMap((token) => {
951
- if (token.content.match(/^\s+$/)) return token;
952
- const match = token.content.match(/^(\s*)(.*?)(\s*)$/);
953
- if (!match) return token;
954
- const [, leading, content, trailing] = match;
955
- if (!leading && !trailing) return token;
956
- const expanded = [{
957
- ...token,
958
- offset: token.offset + leading.length,
959
- content
960
- }];
961
- if (leading) expanded.unshift({
962
- content: leading,
963
- offset: token.offset
964
- });
965
- if (trailing) expanded.push({
966
- content: trailing,
967
- offset: token.offset + leading.length + content.length
968
- });
969
- return expanded;
970
- });
971
- });
897
+ return tokens.map((line) => {
898
+ return line.flatMap((token) => {
899
+ if (token.content.match(/^\s+$/)) return token;
900
+ const match = token.content.match(/^(\s*)(.*?)(\s*)$/);
901
+ if (!match) return token;
902
+ const [, leading, content, trailing] = match;
903
+ if (!leading && !trailing) return token;
904
+ const expanded = [{
905
+ ...token,
906
+ offset: token.offset + leading.length,
907
+ content
908
+ }];
909
+ if (leading) expanded.unshift({
910
+ content: leading,
911
+ offset: token.offset
912
+ });
913
+ if (trailing) expanded.push({
914
+ content: trailing,
915
+ offset: token.offset + leading.length + content.length
916
+ });
917
+ return expanded;
918
+ });
919
+ });
972
920
  }
973
921
  function mergeAdjacentStyledTokens(tokens) {
974
- return tokens.map((line) => {
975
- const newLine = [];
976
- for (const token of line) {
977
- if (newLine.length === 0) {
978
- newLine.push({ ...token });
979
- continue;
980
- }
981
- const prevToken = newLine[newLine.length - 1];
982
- const prevStyle = stringifyTokenStyle(prevToken.htmlStyle || getTokenStyleObject(prevToken));
983
- const currentStyle = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));
984
- const isPrevDecorated = prevToken.fontStyle && (prevToken.fontStyle & FontStyle.Underline || prevToken.fontStyle & FontStyle.Strikethrough);
985
- const isDecorated = token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough);
986
- if (!isPrevDecorated && !isDecorated && prevStyle === currentStyle) prevToken.content += token.content;
987
- else newLine.push({ ...token });
988
- }
989
- return newLine;
990
- });
922
+ return tokens.map((line) => {
923
+ const newLine = [];
924
+ for (const token of line) {
925
+ if (newLine.length === 0) {
926
+ newLine.push({ ...token });
927
+ continue;
928
+ }
929
+ const prevToken = newLine[newLine.length - 1];
930
+ const prevStyle = stringifyTokenStyle(prevToken.htmlStyle || getTokenStyleObject(prevToken));
931
+ const currentStyle = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));
932
+ const isPrevDecorated = prevToken.fontStyle && (prevToken.fontStyle & FontStyle.Underline || prevToken.fontStyle & FontStyle.Strikethrough);
933
+ const isDecorated = token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough);
934
+ if (!isPrevDecorated && !isDecorated && prevStyle === currentStyle) prevToken.content += token.content;
935
+ else newLine.push({ ...token });
936
+ }
937
+ return newLine;
938
+ });
991
939
  }
992
- var hastToHtml = toHtml;
993
- /**
994
- * Get highlighted code in HTML.
995
- */
940
+ const hastToHtml = toHtml;
996
941
  function codeToHtml(primitive, code, options) {
997
- const context = {
998
- meta: {},
999
- options,
1000
- codeToHast: (_code, _options) => codeToHast(primitive, _code, _options),
1001
- codeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)
1002
- };
1003
- let result = hastToHtml(codeToHast(primitive, code, options, context));
1004
- for (const transformer of getTransformers(options)) result = transformer.postprocess?.call(context, result, options) || result;
1005
- return result;
942
+ const context = {
943
+ meta: {},
944
+ options,
945
+ codeToHast: (_code, _options) => codeToHast(primitive, _code, _options),
946
+ codeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)
947
+ };
948
+ let result = hastToHtml(codeToHast(primitive, code, options, context));
949
+ for (const transformer of getTransformers(options)) result = transformer.postprocess?.call(context, result, options) || result;
950
+ return result;
1006
951
  }
1007
- /**
1008
- * Create a Shiki core highlighter instance, with no languages or themes bundled.
1009
- * Wasm and each language and theme must be loaded manually.
1010
- *
1011
- * @see http://shiki.style/guide/bundles#fine-grained-bundle
1012
- */
1013
952
  async function createHighlighterCore(options) {
1014
- const primitive = await createShikiPrimitiveAsync(options);
1015
- return {
1016
- getLastGrammarState: (...args) => getLastGrammarState(primitive, ...args),
1017
- codeToTokensBase: (code, options) => codeToTokensBase(primitive, code, options),
1018
- codeToTokensWithThemes: (code, options) => codeToTokensWithThemes(primitive, code, options),
1019
- codeToTokens: (code, options) => codeToTokens(primitive, code, options),
1020
- codeToHast: (code, options) => codeToHast(primitive, code, options),
1021
- codeToHtml: (code, options) => codeToHtml(primitive, code, options),
1022
- getBundledLanguages: () => ({}),
1023
- getBundledThemes: () => ({}),
1024
- ...primitive,
1025
- getInternalContext: () => primitive
1026
- };
953
+ const primitive = await createShikiPrimitiveAsync(options);
954
+ return {
955
+ getLastGrammarState: (...args) => getLastGrammarState(primitive, ...args),
956
+ codeToTokensBase: (code, options2) => codeToTokensBase(primitive, code, options2),
957
+ codeToTokensWithThemes: (code, options2) => codeToTokensWithThemes(primitive, code, options2),
958
+ codeToTokens: (code, options2) => codeToTokens(primitive, code, options2),
959
+ codeToHast: (code, options2) => codeToHast(primitive, code, options2),
960
+ codeToHtml: (code, options2) => codeToHtml(primitive, code, options2),
961
+ getBundledLanguages: () => ({}),
962
+ getBundledThemes: () => ({}),
963
+ ...primitive,
964
+ getInternalContext: () => primitive
965
+ };
1027
966
  }
1028
967
  function createBundledHighlighter(options) {
1029
- const bundledLanguages = options.langs;
1030
- const bundledThemes = options.themes;
1031
- const engine = options.engine;
1032
- async function createHighlighter(options) {
1033
- function resolveLang(lang) {
1034
- if (typeof lang === "string") {
1035
- lang = options.langAlias?.[lang] || lang;
1036
- if (isSpecialLang(lang)) return [];
1037
- const bundle = bundledLanguages[lang];
1038
- if (!bundle) throw new ShikiError(`Language \`${lang}\` is not included in this bundle. You may want to load it from external source.`);
1039
- return bundle;
1040
- }
1041
- return lang;
1042
- }
1043
- function resolveTheme(theme) {
1044
- if (isSpecialTheme(theme)) return "none";
1045
- if (typeof theme === "string") {
1046
- const bundle = bundledThemes[theme];
1047
- if (!bundle) throw new ShikiError(`Theme \`${theme}\` is not included in this bundle. You may want to load it from external source.`);
1048
- return bundle;
1049
- }
1050
- return theme;
1051
- }
1052
- const _themes = (options.themes ?? []).map((i) => resolveTheme(i));
1053
- const langs = (options.langs ?? []).map((i) => resolveLang(i));
1054
- const core = await createHighlighterCore({
1055
- engine: options.engine ?? engine(),
1056
- ...options,
1057
- themes: _themes,
1058
- langs
1059
- });
1060
- return {
1061
- ...core,
1062
- loadLanguage(...langs) {
1063
- return core.loadLanguage(...langs.map(resolveLang));
1064
- },
1065
- loadTheme(...themes) {
1066
- return core.loadTheme(...themes.map(resolveTheme));
1067
- },
1068
- getBundledLanguages() {
1069
- return bundledLanguages;
1070
- },
1071
- getBundledThemes() {
1072
- return bundledThemes;
1073
- }
1074
- };
1075
- }
1076
- return createHighlighter;
968
+ const bundledLanguages = options.langs;
969
+ const bundledThemes = options.themes;
970
+ const engine = options.engine;
971
+ async function createHighlighter(options2) {
972
+ function resolveLang(lang) {
973
+ if (typeof lang === "string") {
974
+ lang = options2.langAlias?.[lang] || lang;
975
+ if (isSpecialLang(lang)) return [];
976
+ const bundle = bundledLanguages[lang];
977
+ if (!bundle) throw new ShikiError(`Language \`${lang}\` is not included in this bundle. You may want to load it from external source.`);
978
+ return bundle;
979
+ }
980
+ return lang;
981
+ }
982
+ function resolveTheme(theme) {
983
+ if (isSpecialTheme(theme)) return "none";
984
+ if (typeof theme === "string") {
985
+ const bundle = bundledThemes[theme];
986
+ if (!bundle) throw new ShikiError(`Theme \`${theme}\` is not included in this bundle. You may want to load it from external source.`);
987
+ return bundle;
988
+ }
989
+ return theme;
990
+ }
991
+ const _themes = (options2.themes ?? []).map((i) => resolveTheme(i));
992
+ const langs = (options2.langs ?? []).map((i) => resolveLang(i));
993
+ const core = await createHighlighterCore({
994
+ engine: options2.engine ?? engine(),
995
+ ...options2,
996
+ themes: _themes,
997
+ langs
998
+ });
999
+ return {
1000
+ ...core,
1001
+ loadLanguage(...langs2) {
1002
+ return core.loadLanguage(...langs2.map(resolveLang));
1003
+ },
1004
+ loadTheme(...themes) {
1005
+ return core.loadTheme(...themes.map(resolveTheme));
1006
+ },
1007
+ getBundledLanguages() {
1008
+ return bundledLanguages;
1009
+ },
1010
+ getBundledThemes() {
1011
+ return bundledThemes;
1012
+ }
1013
+ };
1014
+ }
1015
+ return createHighlighter;
1077
1016
  }
1078
1017
  function makeSingletonHighlighter(createHighlighter) {
1079
- let _shiki;
1080
- async function getSingletonHighlighter(options = {}) {
1081
- if (!_shiki) {
1082
- _shiki = createHighlighter({
1083
- ...options,
1084
- themes: [],
1085
- langs: []
1086
- });
1087
- const s = await _shiki;
1088
- await Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);
1089
- return s;
1090
- } else {
1091
- const s = await _shiki;
1092
- await Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);
1093
- return s;
1094
- }
1095
- }
1096
- return getSingletonHighlighter;
1018
+ let _shiki;
1019
+ async function getSingletonHighlighter(options = {}) {
1020
+ if (!_shiki) {
1021
+ _shiki = createHighlighter({
1022
+ ...options,
1023
+ themes: [],
1024
+ langs: []
1025
+ });
1026
+ const s = await _shiki;
1027
+ await Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);
1028
+ return s;
1029
+ } else {
1030
+ const s = await _shiki;
1031
+ await Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);
1032
+ return s;
1033
+ }
1034
+ }
1035
+ return getSingletonHighlighter;
1097
1036
  }
1098
1037
  function createSingletonShorthands(createHighlighter, config) {
1099
- const getSingletonHighlighter = makeSingletonHighlighter(createHighlighter);
1100
- async function get(code, options) {
1101
- const shiki = await getSingletonHighlighter({
1102
- langs: [options.lang],
1103
- themes: "theme" in options ? [options.theme] : Object.values(options.themes)
1104
- });
1105
- const langs = await config?.guessEmbeddedLanguages?.(code, options.lang, shiki);
1106
- if (langs) await shiki.loadLanguage(...langs);
1107
- return shiki;
1108
- }
1109
- return {
1110
- getSingletonHighlighter(options) {
1111
- return getSingletonHighlighter(options);
1112
- },
1113
- async codeToHtml(code, options) {
1114
- return (await get(code, options)).codeToHtml(code, options);
1115
- },
1116
- async codeToHast(code, options) {
1117
- return (await get(code, options)).codeToHast(code, options);
1118
- },
1119
- async codeToTokens(code, options) {
1120
- return (await get(code, options)).codeToTokens(code, options);
1121
- },
1122
- async codeToTokensBase(code, options) {
1123
- return (await get(code, options)).codeToTokensBase(code, options);
1124
- },
1125
- async codeToTokensWithThemes(code, options) {
1126
- return (await get(code, options)).codeToTokensWithThemes(code, options);
1127
- },
1128
- async getLastGrammarState(code, options) {
1129
- return (await getSingletonHighlighter({
1130
- langs: [options.lang],
1131
- themes: [options.theme]
1132
- })).getLastGrammarState(code, options);
1133
- }
1134
- };
1038
+ const getSingletonHighlighter = makeSingletonHighlighter(createHighlighter);
1039
+ async function get(code, options) {
1040
+ const shiki = await getSingletonHighlighter({
1041
+ langs: [options.lang],
1042
+ themes: "theme" in options ? [options.theme] : Object.values(options.themes)
1043
+ });
1044
+ const langs = await config?.guessEmbeddedLanguages?.(code, options.lang, shiki);
1045
+ if (langs) await shiki.loadLanguage(...langs);
1046
+ return shiki;
1047
+ }
1048
+ return {
1049
+ getSingletonHighlighter(options) {
1050
+ return getSingletonHighlighter(options);
1051
+ },
1052
+ async codeToHtml(code, options) {
1053
+ return (await get(code, options)).codeToHtml(code, options);
1054
+ },
1055
+ async codeToHast(code, options) {
1056
+ return (await get(code, options)).codeToHast(code, options);
1057
+ },
1058
+ async codeToTokens(code, options) {
1059
+ return (await get(code, options)).codeToTokens(code, options);
1060
+ },
1061
+ async codeToTokensBase(code, options) {
1062
+ return (await get(code, options)).codeToTokensBase(code, options);
1063
+ },
1064
+ async codeToTokensWithThemes(code, options) {
1065
+ return (await get(code, options)).codeToTokensWithThemes(code, options);
1066
+ },
1067
+ async getLastGrammarState(code, options) {
1068
+ return (await getSingletonHighlighter({
1069
+ langs: [options.lang],
1070
+ themes: [options.theme]
1071
+ })).getLastGrammarState(code, options);
1072
+ }
1073
+ };
1135
1074
  }
1136
- //#endregion
1137
- export { addClassToHast, createBundledHighlighter, createHighlighterCore, createPositionConverter, createSingletonShorthands, flatTokenVariants, getTokenStyleObject, guessEmbeddedLanguages, hastToHtml, makeSingletonHighlighter, splitToken, splitTokens, stringifyTokenStyle, tokenizeAnsiWithTheme, tokensToHast, transformerDecorations };
1075
+ export {
1076
+ ShikiError,
1077
+ addClassToHast,
1078
+ applyColorReplacements,
1079
+ codeToHast,
1080
+ codeToHtml,
1081
+ codeToTokens,
1082
+ codeToTokensBase,
1083
+ codeToTokensWithThemes,
1084
+ createBundledHighlighter,
1085
+ createHighlighterCore,
1086
+ createPositionConverter,
1087
+ createShikiPrimitive,
1088
+ createShikiPrimitiveAsync,
1089
+ createSingletonShorthands,
1090
+ flatTokenVariants,
1091
+ getLastGrammarState,
1092
+ getTokenStyleObject,
1093
+ guessEmbeddedLanguages,
1094
+ hastToHtml,
1095
+ isNoneTheme,
1096
+ isPlainLang,
1097
+ isSpecialLang,
1098
+ isSpecialTheme,
1099
+ makeSingletonHighlighter,
1100
+ normalizeGetter,
1101
+ normalizeTheme,
1102
+ resolveColorReplacements,
1103
+ splitLines,
1104
+ splitToken,
1105
+ splitTokens,
1106
+ stringifyTokenStyle,
1107
+ toArray,
1108
+ tokenizeAnsiWithTheme,
1109
+ tokenizeWithTheme,
1110
+ tokensToHast,
1111
+ transformerDecorations
1112
+ };