solid-tom-ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (965) hide show
  1. package/README.md +53 -14
  2. package/dist/_virtual/_rolldown/runtime.js +1 -0
  3. package/dist/components/avatar/avatar.js.map +1 -1
  4. package/dist/components/badge/badge.js.map +1 -1
  5. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  6. package/dist/components/button/button.js.map +1 -1
  7. package/dist/components/carousel/carousel.js +1 -1
  8. package/dist/components/carousel/carousel.js.map +1 -1
  9. package/dist/components/chat-bubble/chatBubble.js.map +1 -1
  10. package/dist/components/checkbox/checkbox.js.map +1 -1
  11. package/dist/components/code-preview/code-preview.d.ts +23 -0
  12. package/dist/components/code-preview/code-preview.d.ts.map +1 -0
  13. package/dist/components/code-preview/code-preview.js +2 -0
  14. package/dist/components/code-preview/code-preview.js.map +1 -0
  15. package/dist/components/code-preview/index.d.ts +3 -0
  16. package/dist/components/code-preview/index.d.ts.map +1 -0
  17. package/dist/components/collapse/collapse.js.map +1 -1
  18. package/dist/components/context-menu/context-menu.js +1 -1
  19. package/dist/components/context-menu/context-menu.js.map +1 -1
  20. package/dist/components/context-menu/context-menu.store.js.map +1 -1
  21. package/dist/components/divider/divider.js.map +1 -1
  22. package/dist/components/drawer/drawer.js +1 -1
  23. package/dist/components/drawer/drawer.js.map +1 -1
  24. package/dist/components/dropdown/dropdown.js.map +1 -1
  25. package/dist/components/dropdown/dropdown.store.js.map +1 -1
  26. package/dist/components/float-button/float-button.js.map +1 -1
  27. package/dist/components/hover-3d-image/hover-3d-image.js.map +1 -1
  28. package/dist/components/image-preview/image-preview.js +1 -1
  29. package/dist/components/image-preview/image-preview.js.map +1 -1
  30. package/dist/components/input/input.js.map +1 -1
  31. package/dist/components/input/input.utils.js.map +1 -1
  32. package/dist/components/input/variants/input-color.js.map +1 -1
  33. package/dist/components/input/variants/input-date.js.map +1 -1
  34. package/dist/components/input/variants/input-number.js +1 -1
  35. package/dist/components/input/variants/input-number.js.map +1 -1
  36. package/dist/components/input/variants/input-otp.js.map +1 -1
  37. package/dist/components/input/variants/input-password.js +1 -1
  38. package/dist/components/input/variants/input-password.js.map +1 -1
  39. package/dist/components/input/variants/input-radio.js.map +1 -1
  40. package/dist/components/input/variants/input-range.js.map +1 -1
  41. package/dist/components/input/variants/input-text.js +1 -1
  42. package/dist/components/input/variants/input-text.js.map +1 -1
  43. package/dist/components/input/variants/input-textarea.js +1 -1
  44. package/dist/components/input/variants/input-textarea.js.map +1 -1
  45. package/dist/components/loading/loading.js +1 -1
  46. package/dist/components/loading/loading.js.map +1 -1
  47. package/dist/components/mansory/mansory.js.map +1 -1
  48. package/dist/components/menu/menu.js +1 -1
  49. package/dist/components/menu/menu.js.map +1 -1
  50. package/dist/components/modal/modal.js +1 -1
  51. package/dist/components/modal/modal.js.map +1 -1
  52. package/dist/components/pagination/pagination.js +1 -1
  53. package/dist/components/pagination/pagination.js.map +1 -1
  54. package/dist/components/progress-bar/progress-bar.js.map +1 -1
  55. package/dist/components/qr-code/qr-code.js +1 -1
  56. package/dist/components/qr-code/qr-code.js.map +1 -1
  57. package/dist/components/select/select.js +1 -1
  58. package/dist/components/select/select.js.map +1 -1
  59. package/dist/components/skeleton/skeleton.js.map +1 -1
  60. package/dist/components/slider/slider.js.map +1 -1
  61. package/dist/components/splitter/splitter.js.map +1 -1
  62. package/dist/components/steps/steps.js +1 -1
  63. package/dist/components/steps/steps.js.map +1 -1
  64. package/dist/components/swap/swap.js.map +1 -1
  65. package/dist/components/switch/switch.js.map +1 -1
  66. package/dist/components/tab/tab.js +1 -1
  67. package/dist/components/tab/tab.js.map +1 -1
  68. package/dist/components/table/table.js +1 -1
  69. package/dist/components/table/table.js.map +1 -1
  70. package/dist/components/timeline/timeline.js +1 -1
  71. package/dist/components/timeline/timeline.js.map +1 -1
  72. package/dist/components/toast/icons/ErrorIcon.js.map +1 -1
  73. package/dist/components/toast/icons/IconCircle.js.map +1 -1
  74. package/dist/components/toast/icons/InfoIcon.js.map +1 -1
  75. package/dist/components/toast/icons/LoaderIcon.js.map +1 -1
  76. package/dist/components/toast/icons/SuccessIcon.js.map +1 -1
  77. package/dist/components/toast/icons/WarningIcon.js.map +1 -1
  78. package/dist/components/toast/toast.js +1 -1
  79. package/dist/components/toast/toast.js.map +1 -1
  80. package/dist/components/toast/toast.store.js.map +1 -1
  81. package/dist/components/tooltip/tooltip.js.map +1 -1
  82. package/dist/components/tour/tour.js +2 -2
  83. package/dist/components/tour/tour.js.map +1 -1
  84. package/dist/components/upload/upload.js +1 -1
  85. package/dist/components/upload/upload.js.map +1 -1
  86. package/dist/components/z-index/z-index.context.js.map +1 -1
  87. package/dist/components/z-index/z-index.js.map +1 -1
  88. package/dist/components/z-index/z-index.store.js.map +1 -1
  89. package/dist/components/z-index/z-index.types.js.map +1 -1
  90. package/dist/lib.d.ts +1 -2
  91. package/dist/lib.d.ts.map +1 -1
  92. package/dist/lib.js +1 -1
  93. package/dist/node_modules/.pnpm/@shikijs_core@4.0.2/node_modules/@shikijs/core/dist/index.js +3 -0
  94. package/dist/node_modules/.pnpm/@shikijs_core@4.0.2/node_modules/@shikijs/core/dist/index.js.map +1 -0
  95. package/dist/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/engine-compile.js +2 -0
  96. package/dist/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/engine-compile.js.map +1 -0
  97. package/dist/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/scanner-BFcBmQR1.js +2 -0
  98. package/dist/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/scanner-BFcBmQR1.js.map +1 -0
  99. package/dist/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/index.js +2 -0
  100. package/dist/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/index.js.map +1 -0
  101. package/dist/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +2 -0
  102. package/dist/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js.map +1 -0
  103. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/abap.js +2 -0
  104. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/abap.js.map +1 -0
  105. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -0
  106. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/actionscript-3.js.map +1 -0
  107. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ada.js +2 -0
  108. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ada.js.map +1 -0
  109. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-expression.js +2 -0
  110. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-expression.js.map +1 -0
  111. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-html.js +2 -0
  112. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-html.js.map +1 -0
  113. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-style.js +2 -0
  114. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-style.js.map +1 -0
  115. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-template.js +2 -0
  116. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-template.js.map +1 -0
  117. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-let-declaration.js +2 -0
  118. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-let-declaration.js.map +1 -0
  119. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template-blocks.js +2 -0
  120. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template-blocks.js.map +1 -0
  121. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template.js +2 -0
  122. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template.js.map +1 -0
  123. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-ts.js +2 -0
  124. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-ts.js.map +1 -0
  125. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apache.js +2 -0
  126. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apache.js.map +1 -0
  127. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apex.js +2 -0
  128. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apex.js.map +1 -0
  129. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apl.js +2 -0
  130. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apl.js.map +1 -0
  131. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/applescript.js +2 -0
  132. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/applescript.js.map +1 -0
  133. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ara.js +2 -0
  134. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ara.js.map +1 -0
  135. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asciidoc.js +2 -0
  136. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asciidoc.js.map +1 -0
  137. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asm.js +2 -0
  138. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asm.js.map +1 -0
  139. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/astro.js +2 -0
  140. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/astro.js.map +1 -0
  141. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/awk.js +2 -0
  142. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/awk.js.map +1 -0
  143. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ballerina.js +2 -0
  144. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ballerina.js.map +1 -0
  145. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bat.js +2 -0
  146. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bat.js.map +1 -0
  147. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/beancount.js +2 -0
  148. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/beancount.js.map +1 -0
  149. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/berry.js +2 -0
  150. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/berry.js.map +1 -0
  151. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bibtex.js +2 -0
  152. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bibtex.js.map +1 -0
  153. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bicep.js +2 -0
  154. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bicep.js.map +1 -0
  155. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bird2.js +2 -0
  156. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bird2.js.map +1 -0
  157. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/blade.js +2 -0
  158. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/blade.js.map +1 -0
  159. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bsl.js +2 -0
  160. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bsl.js.map +1 -0
  161. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c.js +2 -0
  162. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c.js.map +1 -0
  163. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c3.js +2 -0
  164. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c3.js.map +1 -0
  165. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cadence.js +2 -0
  166. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cadence.js.map +1 -0
  167. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cairo.js +2 -0
  168. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cairo.js.map +1 -0
  169. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clarity.js +2 -0
  170. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clarity.js.map +1 -0
  171. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clojure.js +2 -0
  172. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clojure.js.map +1 -0
  173. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cmake.js +2 -0
  174. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cmake.js.map +1 -0
  175. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cobol.js +2 -0
  176. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cobol.js.map +1 -0
  177. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeowners.js +2 -0
  178. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeowners.js.map +1 -0
  179. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeql.js +2 -0
  180. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeql.js.map +1 -0
  181. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coffee.js +2 -0
  182. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coffee.js.map +1 -0
  183. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/common-lisp.js +2 -0
  184. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/common-lisp.js.map +1 -0
  185. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coq.js +2 -0
  186. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coq.js.map +1 -0
  187. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp-macro.js +2 -0
  188. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp-macro.js.map +1 -0
  189. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp.js +2 -0
  190. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp.js.map +1 -0
  191. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/crystal.js +2 -0
  192. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/crystal.js.map +1 -0
  193. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csharp.js +2 -0
  194. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csharp.js.map +1 -0
  195. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/css.js +2 -0
  196. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/css.js.map +1 -0
  197. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csv.js +2 -0
  198. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csv.js.map +1 -0
  199. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cue.js +2 -0
  200. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cue.js.map +1 -0
  201. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cypher.js +2 -0
  202. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cypher.js.map +1 -0
  203. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/d.js +2 -0
  204. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/d.js.map +1 -0
  205. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dart.js +2 -0
  206. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dart.js.map +1 -0
  207. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dax.js +2 -0
  208. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dax.js.map +1 -0
  209. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/desktop.js +2 -0
  210. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/desktop.js.map +1 -0
  211. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/diff.js +2 -0
  212. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/diff.js.map +1 -0
  213. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/docker.js +2 -0
  214. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/docker.js.map +1 -0
  215. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dotenv.js +2 -0
  216. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dotenv.js.map +1 -0
  217. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dream-maker.js +2 -0
  218. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dream-maker.js.map +1 -0
  219. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/edge.js +2 -0
  220. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/edge.js.map +1 -0
  221. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elixir.js +2 -0
  222. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elixir.js.map +1 -0
  223. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elm.js +2 -0
  224. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elm.js.map +1 -0
  225. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -0
  226. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/emacs-lisp.js.map +1 -0
  227. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erb.js +2 -0
  228. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erb.js.map +1 -0
  229. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erlang.js +2 -0
  230. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erlang.js.map +1 -0
  231. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-css.js +2 -0
  232. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-css.js.map +1 -0
  233. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-glsl.js +2 -0
  234. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-glsl.js.map +1 -0
  235. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-html.js +2 -0
  236. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-html.js.map +1 -0
  237. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-sql.js +2 -0
  238. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-sql.js.map +1 -0
  239. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-xml.js +2 -0
  240. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-xml.js.map +1 -0
  241. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fennel.js +2 -0
  242. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fennel.js.map +1 -0
  243. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fish.js +2 -0
  244. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fish.js.map +1 -0
  245. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fluent.js +2 -0
  246. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fluent.js.map +1 -0
  247. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +2 -0
  248. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-fixed-form.js.map +1 -0
  249. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -0
  250. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-free-form.js.map +1 -0
  251. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fsharp.js +2 -0
  252. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fsharp.js.map +1 -0
  253. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdresource.js +2 -0
  254. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdresource.js.map +1 -0
  255. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdscript.js +2 -0
  256. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdscript.js.map +1 -0
  257. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdshader.js +2 -0
  258. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdshader.js.map +1 -0
  259. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/genie.js +2 -0
  260. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/genie.js.map +1 -0
  261. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gherkin.js +2 -0
  262. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gherkin.js.map +1 -0
  263. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-commit.js +2 -0
  264. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-commit.js.map +1 -0
  265. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-rebase.js +2 -0
  266. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-rebase.js.map +1 -0
  267. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gleam.js +2 -0
  268. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gleam.js.map +1 -0
  269. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-js.js +2 -0
  270. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-js.js.map +1 -0
  271. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-ts.js +2 -0
  272. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-ts.js.map +1 -0
  273. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glsl.js +2 -0
  274. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glsl.js.map +1 -0
  275. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gn.js +2 -0
  276. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gn.js.map +1 -0
  277. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gnuplot.js +2 -0
  278. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gnuplot.js.map +1 -0
  279. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/go.js +2 -0
  280. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/go.js.map +1 -0
  281. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/graphql.js +2 -0
  282. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/graphql.js.map +1 -0
  283. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/groovy.js +2 -0
  284. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/groovy.js.map +1 -0
  285. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hack.js +2 -0
  286. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hack.js.map +1 -0
  287. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haml.js +2 -0
  288. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haml.js.map +1 -0
  289. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/handlebars.js +2 -0
  290. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/handlebars.js.map +1 -0
  291. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haskell.js +2 -0
  292. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haskell.js.map +1 -0
  293. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haxe.js +2 -0
  294. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haxe.js.map +1 -0
  295. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hcl.js +2 -0
  296. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hcl.js.map +1 -0
  297. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hjson.js +2 -0
  298. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hjson.js.map +1 -0
  299. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hlsl.js +2 -0
  300. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hlsl.js.map +1 -0
  301. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html-derivative.js +2 -0
  302. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html-derivative.js.map +1 -0
  303. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html.js +2 -0
  304. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html.js.map +1 -0
  305. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/http.js +2 -0
  306. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/http.js.map +1 -0
  307. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hurl.js +2 -0
  308. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hurl.js.map +1 -0
  309. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hxml.js +2 -0
  310. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hxml.js.map +1 -0
  311. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hy.js +2 -0
  312. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hy.js.map +1 -0
  313. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/imba.js +2 -0
  314. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/imba.js.map +1 -0
  315. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ini.js +2 -0
  316. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ini.js.map +1 -0
  317. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/java.js +2 -0
  318. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/java.js.map +1 -0
  319. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/javascript.js +2 -0
  320. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/javascript.js.map +1 -0
  321. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja-html.js +2 -0
  322. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja-html.js.map +1 -0
  323. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja.js +2 -0
  324. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja.js.map +1 -0
  325. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jison.js +2 -0
  326. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jison.js.map +1 -0
  327. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json.js +2 -0
  328. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json.js.map +1 -0
  329. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json5.js +2 -0
  330. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json5.js.map +1 -0
  331. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonc.js +2 -0
  332. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonc.js.map +1 -0
  333. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonl.js +2 -0
  334. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonl.js.map +1 -0
  335. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonnet.js +2 -0
  336. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonnet.js.map +1 -0
  337. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jssm.js +2 -0
  338. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jssm.js.map +1 -0
  339. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsx.js +2 -0
  340. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsx.js.map +1 -0
  341. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/julia.js +2 -0
  342. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/julia.js.map +1 -0
  343. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/just.js +2 -0
  344. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/just.js.map +1 -0
  345. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kdl.js +2 -0
  346. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kdl.js.map +1 -0
  347. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kotlin.js +2 -0
  348. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kotlin.js.map +1 -0
  349. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kusto.js +2 -0
  350. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kusto.js.map +1 -0
  351. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/latex.js +2 -0
  352. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/latex.js.map +1 -0
  353. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lean.js +2 -0
  354. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lean.js.map +1 -0
  355. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/less.js +2 -0
  356. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/less.js.map +1 -0
  357. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/liquid.js +2 -0
  358. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/liquid.js.map +1 -0
  359. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/llvm.js +2 -0
  360. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/llvm.js.map +1 -0
  361. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/log.js +2 -0
  362. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/log.js.map +1 -0
  363. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/logo.js +2 -0
  364. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/logo.js.map +1 -0
  365. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lua.js +2 -0
  366. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lua.js.map +1 -0
  367. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/luau.js +2 -0
  368. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/luau.js.map +1 -0
  369. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/make.js +2 -0
  370. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/make.js.map +1 -0
  371. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -0
  372. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-nix.js.map +1 -0
  373. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -0
  374. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-vue.js.map +1 -0
  375. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown.js +2 -0
  376. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown.js.map +1 -0
  377. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/marko.js +2 -0
  378. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/marko.js.map +1 -0
  379. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/matlab.js +2 -0
  380. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/matlab.js.map +1 -0
  381. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdc.js +2 -0
  382. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdc.js.map +1 -0
  383. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdx.js +2 -0
  384. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdx.js.map +1 -0
  385. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mermaid.js +2 -0
  386. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mermaid.js.map +1 -0
  387. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mipsasm.js +2 -0
  388. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mipsasm.js.map +1 -0
  389. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mojo.js +2 -0
  390. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mojo.js.map +1 -0
  391. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/moonbit.js +2 -0
  392. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/moonbit.js.map +1 -0
  393. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/move.js +2 -0
  394. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/move.js.map +1 -0
  395. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/narrat.js +2 -0
  396. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/narrat.js.map +1 -0
  397. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow-groovy.js +2 -0
  398. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow-groovy.js.map +1 -0
  399. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow.js +2 -0
  400. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow.js.map +1 -0
  401. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nginx.js +2 -0
  402. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nginx.js.map +1 -0
  403. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nim.js +2 -0
  404. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nim.js.map +1 -0
  405. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nix.js +2 -0
  406. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nix.js.map +1 -0
  407. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nushell.js +2 -0
  408. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nushell.js.map +1 -0
  409. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-c.js +2 -0
  410. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-c.js.map +1 -0
  411. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -0
  412. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-cpp.js.map +1 -0
  413. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ocaml.js +2 -0
  414. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ocaml.js.map +1 -0
  415. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/odin.js +2 -0
  416. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/odin.js.map +1 -0
  417. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/openscad.js +2 -0
  418. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/openscad.js.map +1 -0
  419. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pascal.js +2 -0
  420. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pascal.js.map +1 -0
  421. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/perl.js +2 -0
  422. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/perl.js.map +1 -0
  423. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/php.js +2 -0
  424. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/php.js.map +1 -0
  425. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pkl.js +2 -0
  426. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pkl.js.map +1 -0
  427. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/plsql.js +2 -0
  428. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/plsql.js.map +1 -0
  429. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/po.js +2 -0
  430. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/po.js.map +1 -0
  431. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/polar.js +2 -0
  432. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/polar.js.map +1 -0
  433. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/postcss.js +2 -0
  434. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/postcss.js.map +1 -0
  435. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powerquery.js +2 -0
  436. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powerquery.js.map +1 -0
  437. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powershell.js +2 -0
  438. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powershell.js.map +1 -0
  439. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prisma.js +2 -0
  440. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prisma.js.map +1 -0
  441. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prolog.js +2 -0
  442. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prolog.js.map +1 -0
  443. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/proto.js +2 -0
  444. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/proto.js.map +1 -0
  445. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pug.js +2 -0
  446. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pug.js.map +1 -0
  447. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/puppet.js +2 -0
  448. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/puppet.js.map +1 -0
  449. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/purescript.js +2 -0
  450. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/purescript.js.map +1 -0
  451. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/python.js +2 -0
  452. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/python.js.map +1 -0
  453. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qml.js +2 -0
  454. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qml.js.map +1 -0
  455. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qmldir.js +2 -0
  456. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qmldir.js.map +1 -0
  457. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qss.js +2 -0
  458. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qss.js.map +1 -0
  459. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/r.js +2 -0
  460. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/r.js.map +1 -0
  461. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/racket.js +2 -0
  462. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/racket.js.map +1 -0
  463. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/raku.js +2 -0
  464. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/raku.js.map +1 -0
  465. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/razor.js +2 -0
  466. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/razor.js.map +1 -0
  467. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/reg.js +2 -0
  468. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/reg.js.map +1 -0
  469. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/regexp.js +2 -0
  470. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/regexp.js.map +1 -0
  471. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rel.js +2 -0
  472. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rel.js.map +1 -0
  473. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/riscv.js +2 -0
  474. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/riscv.js.map +1 -0
  475. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ron.js +2 -0
  476. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ron.js.map +1 -0
  477. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rosmsg.js +2 -0
  478. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rosmsg.js.map +1 -0
  479. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rst.js +2 -0
  480. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rst.js.map +1 -0
  481. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ruby.js +2 -0
  482. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ruby.js.map +1 -0
  483. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rust.js +2 -0
  484. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rust.js.map +1 -0
  485. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sas.js +2 -0
  486. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sas.js.map +1 -0
  487. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sass.js +2 -0
  488. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sass.js.map +1 -0
  489. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scala.js +2 -0
  490. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scala.js.map +1 -0
  491. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scheme.js +2 -0
  492. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scheme.js.map +1 -0
  493. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scss.js +2 -0
  494. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scss.js.map +1 -0
  495. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sdbl.js +2 -0
  496. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sdbl.js.map +1 -0
  497. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shaderlab.js +2 -0
  498. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shaderlab.js.map +1 -0
  499. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellscript.js +2 -0
  500. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellscript.js.map +1 -0
  501. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellsession.js +2 -0
  502. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellsession.js.map +1 -0
  503. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/smalltalk.js +2 -0
  504. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/smalltalk.js.map +1 -0
  505. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/solidity.js +2 -0
  506. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/solidity.js.map +1 -0
  507. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/soy.js +2 -0
  508. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/soy.js.map +1 -0
  509. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sparql.js +2 -0
  510. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sparql.js.map +1 -0
  511. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/splunk.js +2 -0
  512. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/splunk.js.map +1 -0
  513. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sql.js +2 -0
  514. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sql.js.map +1 -0
  515. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ssh-config.js +2 -0
  516. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ssh-config.js.map +1 -0
  517. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stata.js +2 -0
  518. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stata.js.map +1 -0
  519. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stylus.js +2 -0
  520. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stylus.js.map +1 -0
  521. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/surrealql.js +2 -0
  522. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/surrealql.js.map +1 -0
  523. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/svelte.js +2 -0
  524. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/svelte.js.map +1 -0
  525. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/swift.js +2 -0
  526. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/swift.js.map +1 -0
  527. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/system-verilog.js +2 -0
  528. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/system-verilog.js.map +1 -0
  529. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/systemd.js +2 -0
  530. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/systemd.js.map +1 -0
  531. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/talonscript.js +2 -0
  532. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/talonscript.js.map +1 -0
  533. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tasl.js +2 -0
  534. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tasl.js.map +1 -0
  535. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tcl.js +2 -0
  536. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tcl.js.map +1 -0
  537. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/templ.js +2 -0
  538. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/templ.js.map +1 -0
  539. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/terraform.js +2 -0
  540. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/terraform.js.map +1 -0
  541. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tex.js +2 -0
  542. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tex.js.map +1 -0
  543. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/toml.js +2 -0
  544. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/toml.js.map +1 -0
  545. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ts-tags.js +2 -0
  546. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ts-tags.js.map +1 -0
  547. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsv.js +2 -0
  548. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsv.js.map +1 -0
  549. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsx.js +2 -0
  550. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsx.js.map +1 -0
  551. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/turtle.js +2 -0
  552. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/turtle.js.map +1 -0
  553. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/twig.js +2 -0
  554. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/twig.js.map +1 -0
  555. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typescript.js +2 -0
  556. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typescript.js.map +1 -0
  557. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typespec.js +2 -0
  558. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typespec.js.map +1 -0
  559. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typst.js +2 -0
  560. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typst.js.map +1 -0
  561. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/v.js +2 -0
  562. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/v.js.map +1 -0
  563. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vala.js +2 -0
  564. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vala.js.map +1 -0
  565. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vb.js +2 -0
  566. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vb.js.map +1 -0
  567. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/verilog.js +2 -0
  568. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/verilog.js.map +1 -0
  569. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vhdl.js +2 -0
  570. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vhdl.js.map +1 -0
  571. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/viml.js +2 -0
  572. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/viml.js.map +1 -0
  573. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-directives.js +2 -0
  574. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-directives.js.map +1 -0
  575. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-html.js +2 -0
  576. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-html.js.map +1 -0
  577. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -0
  578. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-interpolations.js.map +1 -0
  579. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +2 -0
  580. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js.map +1 -0
  581. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-vine.js +2 -0
  582. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-vine.js.map +1 -0
  583. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue.js +2 -0
  584. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue.js.map +1 -0
  585. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vyper.js +2 -0
  586. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vyper.js.map +1 -0
  587. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wasm.js +2 -0
  588. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wasm.js.map +1 -0
  589. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wenyan.js +2 -0
  590. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wenyan.js.map +1 -0
  591. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wgsl.js +2 -0
  592. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wgsl.js.map +1 -0
  593. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wikitext.js +2 -0
  594. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wikitext.js.map +1 -0
  595. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wit.js +2 -0
  596. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wit.js.map +1 -0
  597. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wolfram.js +2 -0
  598. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wolfram.js.map +1 -0
  599. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xml.js +2 -0
  600. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xml.js.map +1 -0
  601. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xsl.js +2 -0
  602. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xsl.js.map +1 -0
  603. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/yaml.js +2 -0
  604. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/yaml.js.map +1 -0
  605. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zenscript.js +2 -0
  606. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zenscript.js.map +1 -0
  607. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zig.js +2 -0
  608. package/dist/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zig.js.map +1 -0
  609. package/dist/node_modules/.pnpm/@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.js +2 -0
  610. package/dist/node_modules/.pnpm/@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.js.map +1 -0
  611. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/andromeeda.js +2 -0
  612. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/andromeeda.js.map +1 -0
  613. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/aurora-x.js +2 -0
  614. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/aurora-x.js.map +1 -0
  615. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-dark.js +2 -0
  616. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-dark.js.map +1 -0
  617. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-light.js +2 -0
  618. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-light.js.map +1 -0
  619. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-mirage.js +2 -0
  620. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-mirage.js.map +1 -0
  621. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +2 -0
  622. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-frappe.js.map +1 -0
  623. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-latte.js +2 -0
  624. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-latte.js.map +1 -0
  625. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +2 -0
  626. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js.map +1 -0
  627. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +2 -0
  628. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-mocha.js.map +1 -0
  629. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dark-plus.js +2 -0
  630. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dark-plus.js.map +1 -0
  631. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula-soft.js +2 -0
  632. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula-soft.js.map +1 -0
  633. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula.js +2 -0
  634. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula.js.map +1 -0
  635. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-dark.js +2 -0
  636. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-dark.js.map +1 -0
  637. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-light.js +2 -0
  638. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-light.js.map +1 -0
  639. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-default.js +2 -0
  640. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-default.js.map +1 -0
  641. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +2 -0
  642. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-dimmed.js.map +1 -0
  643. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +2 -0
  644. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js.map +1 -0
  645. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark.js +2 -0
  646. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark.js.map +1 -0
  647. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-default.js +2 -0
  648. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-default.js.map +1 -0
  649. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +2 -0
  650. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-high-contrast.js.map +1 -0
  651. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light.js +2 -0
  652. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light.js.map +1 -0
  653. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +2 -0
  654. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js.map +1 -0
  655. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +2 -0
  656. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js.map +1 -0
  657. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +2 -0
  658. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js.map +1 -0
  659. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +2 -0
  660. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js.map +1 -0
  661. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +2 -0
  662. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js.map +1 -0
  663. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +2 -0
  664. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js.map +1 -0
  665. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon-bright.js +2 -0
  666. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon-bright.js.map +1 -0
  667. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon.js +2 -0
  668. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon.js.map +1 -0
  669. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/houston.js +2 -0
  670. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/houston.js.map +1 -0
  671. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +2 -0
  672. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-dragon.js.map +1 -0
  673. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +2 -0
  674. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-lotus.js.map +1 -0
  675. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-wave.js +2 -0
  676. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-wave.js.map +1 -0
  677. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/laserwave.js +2 -0
  678. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/laserwave.js.map +1 -0
  679. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/light-plus.js +2 -0
  680. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/light-plus.js.map +1 -0
  681. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-darker.js +2 -0
  682. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-darker.js.map +1 -0
  683. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-lighter.js +2 -0
  684. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-lighter.js.map +1 -0
  685. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-ocean.js +2 -0
  686. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-ocean.js.map +1 -0
  687. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-palenight.js +2 -0
  688. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-palenight.js.map +1 -0
  689. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme.js +2 -0
  690. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme.js.map +1 -0
  691. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-dark.js +2 -0
  692. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-dark.js.map +1 -0
  693. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-light.js +2 -0
  694. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-light.js.map +1 -0
  695. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/monokai.js +2 -0
  696. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/monokai.js.map +1 -0
  697. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl-light.js +2 -0
  698. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl-light.js.map +1 -0
  699. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl.js +2 -0
  700. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl.js.map +1 -0
  701. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/nord.js +2 -0
  702. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/nord.js.map +1 -0
  703. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-dark-pro.js +2 -0
  704. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-dark-pro.js.map +1 -0
  705. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-light.js +2 -0
  706. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-light.js.map +1 -0
  707. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/plastic.js +2 -0
  708. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/plastic.js.map +1 -0
  709. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/poimandres.js +2 -0
  710. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/poimandres.js.map +1 -0
  711. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/red.js +2 -0
  712. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/red.js.map +1 -0
  713. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +2 -0
  714. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-dawn.js.map +1 -0
  715. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-moon.js +2 -0
  716. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-moon.js.map +1 -0
  717. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine.js +2 -0
  718. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine.js.map +1 -0
  719. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-dark.js +2 -0
  720. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-dark.js.map +1 -0
  721. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-ochin.js +2 -0
  722. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-ochin.js.map +1 -0
  723. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/snazzy-light.js +2 -0
  724. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/snazzy-light.js.map +1 -0
  725. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-dark.js +2 -0
  726. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-dark.js.map +1 -0
  727. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-light.js +2 -0
  728. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-light.js.map +1 -0
  729. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/synthwave-84.js +2 -0
  730. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/synthwave-84.js.map +1 -0
  731. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/tokyo-night.js +2 -0
  732. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/tokyo-night.js.map +1 -0
  733. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vesper.js +2 -0
  734. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vesper.js.map +1 -0
  735. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-black.js +2 -0
  736. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-black.js.map +1 -0
  737. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-dark.js +2 -0
  738. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-dark.js.map +1 -0
  739. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-light.js +2 -0
  740. package/dist/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-light.js.map +1 -0
  741. package/dist/node_modules/.pnpm/@shikijs_types@4.0.2/node_modules/@shikijs/types/dist/index.js +2 -0
  742. package/dist/node_modules/.pnpm/@shikijs_types@4.0.2/node_modules/@shikijs/types/dist/index.js.map +1 -0
  743. package/dist/node_modules/.pnpm/@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.js +4 -0
  744. package/dist/node_modules/.pnpm/@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.js.map +1 -0
  745. package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js +2 -0
  746. package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js.map +1 -0
  747. package/dist/node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.js +2 -0
  748. package/dist/node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.js.map +1 -0
  749. package/dist/node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js +2 -0
  750. package/dist/node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js.map +1 -0
  751. package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js +2 -0
  752. package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js.map +1 -0
  753. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js +2 -0
  754. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js.map +1 -0
  755. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js +2 -0
  756. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js.map +1 -0
  757. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js +10 -0
  758. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js.map +1 -0
  759. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js +2 -0
  760. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js.map +1 -0
  761. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js +2 -0
  762. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js.map +1 -0
  763. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js +2 -0
  764. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js.map +1 -0
  765. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js +2 -0
  766. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js.map +1 -0
  767. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js +2 -0
  768. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js.map +1 -0
  769. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js +2 -0
  770. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js.map +1 -0
  771. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js +2 -0
  772. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js.map +1 -0
  773. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js +2 -0
  774. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js.map +1 -0
  775. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js +2 -0
  776. package/dist/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js.map +1 -0
  777. package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js +2 -0
  778. package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js.map +1 -0
  779. package/dist/node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js +2 -0
  780. package/dist/node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js.map +1 -0
  781. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/Icon.js +2 -0
  782. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/Icon.js.map +1 -0
  783. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/context.js +2 -0
  784. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/context.js.map +1 -0
  785. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/defaultAttributes.js +2 -0
  786. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/defaultAttributes.js.map +1 -0
  787. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/arrow-right.js +2 -0
  788. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/arrow-right.js.map +1 -0
  789. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/check.js +2 -0
  790. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/check.js.map +1 -0
  791. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-down.js +2 -0
  792. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-down.js.map +1 -0
  793. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-left.js +2 -0
  794. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-left.js.map +1 -0
  795. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-right.js +2 -0
  796. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-right.js.map +1 -0
  797. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-up.js +2 -0
  798. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevron-up.js.map +1 -0
  799. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevrons-up-down.js +2 -0
  800. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/chevrons-up-down.js.map +1 -0
  801. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-alert.js +2 -0
  802. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-alert.js.map +1 -0
  803. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-check-big.js +2 -0
  804. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-check-big.js.map +1 -0
  805. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-check.js +2 -0
  806. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-check.js.map +1 -0
  807. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-x.js +2 -0
  808. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/circle-x.js.map +1 -0
  809. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/clipboard-copy.js +2 -0
  810. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/clipboard-copy.js.map +1 -0
  811. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/clock.js +2 -0
  812. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/clock.js.map +1 -0
  813. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/cloud-upload.js +2 -0
  814. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/cloud-upload.js.map +1 -0
  815. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/eye-off.js +2 -0
  816. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/eye-off.js.map +1 -0
  817. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/eye.js +2 -0
  818. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/eye.js.map +1 -0
  819. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/file-image.js +2 -0
  820. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/file-image.js.map +1 -0
  821. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/file-text.js +2 -0
  822. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/file-text.js.map +1 -0
  823. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/file.js +2 -0
  824. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/file.js.map +1 -0
  825. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/film.js +2 -0
  826. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/film.js.map +1 -0
  827. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/flip-horizontal-2.js +2 -0
  828. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/flip-horizontal-2.js.map +1 -0
  829. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/flip-vertical-2.js +2 -0
  830. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/flip-vertical-2.js.map +1 -0
  831. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/info.js +2 -0
  832. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/info.js.map +1 -0
  833. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/loader.js +2 -0
  834. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/loader.js.map +1 -0
  835. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/maximize-2.js +2 -0
  836. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/maximize-2.js.map +1 -0
  837. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/music.js +2 -0
  838. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/music.js.map +1 -0
  839. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/pin-off.js +2 -0
  840. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/pin-off.js.map +1 -0
  841. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/pin.js +2 -0
  842. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/pin.js.map +1 -0
  843. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/plus.js +2 -0
  844. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/plus.js.map +1 -0
  845. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/refresh-cw.js +2 -0
  846. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/refresh-cw.js.map +1 -0
  847. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/rotate-ccw.js +2 -0
  848. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/rotate-ccw.js.map +1 -0
  849. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/rotate-cw.js +2 -0
  850. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/rotate-cw.js.map +1 -0
  851. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/search.js +2 -0
  852. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/search.js.map +1 -0
  853. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/trash-2.js +2 -0
  854. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/trash-2.js.map +1 -0
  855. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/x.js +2 -0
  856. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/x.js.map +1 -0
  857. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/zoom-in.js +2 -0
  858. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/zoom-in.js.map +1 -0
  859. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/zoom-out.js +2 -0
  860. package/dist/node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/zoom-out.js.map +1 -0
  861. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/node-utils.js +2 -0
  862. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/node-utils.js.map +1 -0
  863. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/parse.js +2 -0
  864. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/parse.js.map +1 -0
  865. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js +34 -0
  866. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js.map +1 -0
  867. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/traverser/traverse.js +2 -0
  868. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/traverser/traverse.js.map +1 -0
  869. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/utils.js +2 -0
  870. package/dist/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/utils.js.map +1 -0
  871. package/dist/node_modules/.pnpm/oniguruma-to-es@4.3.5/node_modules/oniguruma-to-es/dist/esm/index.js +95 -0
  872. package/dist/node_modules/.pnpm/oniguruma-to-es@4.3.5/node_modules/oniguruma-to-es/dist/esm/index.js.map +1 -0
  873. package/dist/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/babel.js +16 -0
  874. package/dist/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/babel.js.map +1 -0
  875. package/dist/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/estree.js +45 -0
  876. package/dist/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/estree.js.map +1 -0
  877. package/dist/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/standalone.js +30 -0
  878. package/dist/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/standalone.js.map +1 -0
  879. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js +2 -0
  880. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js.map +1 -0
  881. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js +2 -0
  882. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js.map +1 -0
  883. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.js +2 -0
  884. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.js.map +1 -0
  885. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js +2 -0
  886. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js.map +1 -0
  887. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js +2 -0
  888. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js.map +1 -0
  889. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.js +2 -0
  890. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.js.map +1 -0
  891. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js +2 -0
  892. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js.map +1 -0
  893. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js +2 -0
  894. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js.map +1 -0
  895. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js +2 -0
  896. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js.map +1 -0
  897. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js +2 -0
  898. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js.map +1 -0
  899. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js +2 -0
  900. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js.map +1 -0
  901. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js +2 -0
  902. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js.map +1 -0
  903. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js +2 -0
  904. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js.map +1 -0
  905. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js +2 -0
  906. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js.map +1 -0
  907. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.js +2 -0
  908. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.js.map +1 -0
  909. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.js +2 -0
  910. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.js.map +1 -0
  911. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.js +2 -0
  912. package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.js.map +1 -0
  913. package/dist/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.js +2 -0
  914. package/dist/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.js.map +1 -0
  915. package/dist/node_modules/.pnpm/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.js +2 -0
  916. package/dist/node_modules/.pnpm/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.js.map +1 -0
  917. package/dist/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/atomic.js +17 -0
  918. package/dist/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/atomic.js.map +1 -0
  919. package/dist/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/internals.js +1 -0
  920. package/dist/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/utils-internals.js +2 -0
  921. package/dist/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/utils-internals.js.map +1 -0
  922. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/bundle-full.js +2 -0
  923. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/bundle-full.js.map +1 -0
  924. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/chunk-CtajNgzt.js +2 -0
  925. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/chunk-CtajNgzt.js.map +1 -0
  926. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/engine-oniguruma.js +2 -0
  927. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/engine-oniguruma.js.map +1 -0
  928. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/index.js +2 -0
  929. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/index.js.map +1 -0
  930. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/langs-bundle-full-DfKZStlK.js +2 -0
  931. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/langs-bundle-full-DfKZStlK.js.map +1 -0
  932. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/themes.js +2 -0
  933. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/themes.js.map +1 -0
  934. package/dist/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/wasm.js +1 -0
  935. package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js +2 -0
  936. package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js.map +1 -0
  937. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js +2 -0
  938. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js.map +1 -0
  939. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js +2 -0
  940. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js.map +1 -0
  941. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js +2 -0
  942. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js.map +1 -0
  943. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js +2 -0
  944. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js.map +1 -0
  945. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js +2 -0
  946. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js.map +1 -0
  947. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js +2 -0
  948. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js.map +1 -0
  949. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js +2 -0
  950. package/dist/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js.map +1 -0
  951. package/dist/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js +2 -0
  952. package/dist/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js.map +1 -0
  953. package/dist/solid-ui.css +2 -94
  954. package/dist/utils/cn.js.map +1 -1
  955. package/dist/utils/element-tracker.js.map +1 -1
  956. package/dist/utils/helper.js +1 -1
  957. package/dist/utils/helper.js.map +1 -1
  958. package/dist/utils/hoc.js.map +1 -1
  959. package/dist/utils/shiki-highlight.js +2 -0
  960. package/dist/utils/shiki-highlight.js.map +1 -0
  961. package/package.json +15 -26
  962. package/dist/components/dynamic-icon/DynamicIcon.d.ts +0 -8
  963. package/dist/components/dynamic-icon/DynamicIcon.d.ts.map +0 -1
  964. package/dist/components/dynamic-icon/index.d.ts +0 -2
  965. package/dist/components/dynamic-icon/index.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"loading.js","names":["cn","BaseColorProps","cva","VariantProps","Component","createUniqueId","mergeProps","Switch","Match","Loader","daisy_variants","variants","variant","spinner","dots","ring","ball","bars","infinity","size","xs","sm","md","lg","xl","svg_size_map","const","base_color_vars","Record","primary","secondary","accent","neutral","info","success","warning","error","resolveColor","color","undefined","DaisyVariant","SvgVariant","SizeKey","LoadingProps","class","LoadingVariantsProps","Loading","props","p","isDaisy","includes","resolvedColor","svgClass","_$createComponent","children","when","_el$","_tmpl$","_$effect","_p$","_v$","_v$2","e","_$className","t","_$style","LoadingSpinner3","LoadingSpinner4","LoadingSpinner5","LoadingSpinner6","Spinner","id","_el$2","_tmpl$2","_el$3","firstChild","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$setAttribute","_v$3","_v$4","_v$5","_v$6","_v$7","a","o","i","_el$1","_tmpl$3","_v$8","_v$9","_$setStyleProperty","_el$10","_tmpl$4","_v$0","_v$1","_el$11","_tmpl$5","_el$12","_el$13","_el$14","_v$10","_v$11"],"sources":["../../../src/components/loading/loading.tsx"],"sourcesContent":["import { cn } from '@/utils/cn';\r\nimport { BaseColorProps } from '@/type';\r\nimport { cva, VariantProps } from 'class-variance-authority';\r\nimport { Component, createUniqueId, mergeProps, Switch, Match } from 'solid-js';\r\nimport Loader from 'lucide-solid/icons/loader';\r\n\r\n// Variants dùng DaisyUI classes (spinner, spinner-2, dots, ring, ball, bars, infinity)\r\nconst daisy_variants = cva('loading', {\r\n variants: {\r\n variant: {\r\n spinner: 'loading-spinner',\r\n 'spinner-2': 'loading-spinner-2',\r\n dots: 'loading-dots',\r\n ring: 'loading-ring',\r\n ball: 'loading-ball',\r\n bars: 'loading-bars',\r\n infinity: 'loading-infinity',\r\n },\r\n size: {\r\n xs: 'loading-xs',\r\n sm: 'loading-sm',\r\n md: 'loading-md',\r\n lg: 'loading-lg',\r\n xl: 'loading-xl',\r\n },\r\n },\r\n});\r\n\r\n// Map size → CSS class cho SVG-based spinners\r\nconst svg_size_map = {\r\n xs: 'loading-svg-xs',\r\n sm: 'loading-svg-sm',\r\n md: 'loading-svg-md',\r\n lg: 'loading-svg-lg',\r\n xl: 'loading-svg-xl',\r\n} as const;\r\n\r\n// Map BaseColorProps → CSS variable của DaisyUI/Tailwind\r\nconst base_color_vars: Record<BaseColorProps, string> = {\r\n primary: 'var(--color-primary)',\r\n secondary: 'var(--color-secondary)',\r\n accent: 'var(--color-accent)',\r\n neutral: 'var(--color-neutral)',\r\n info: 'var(--color-info)',\r\n success: 'var(--color-success)',\r\n warning: 'var(--color-warning)',\r\n error: 'var(--color-error)',\r\n};\r\n\r\n/** Resolve color prop: nếu là BaseColorProps key thì map sang CSS var, còn lại dùng trực tiếp */\r\nfunction resolveColor(color: string | undefined): string | undefined {\r\n if (!color) return undefined;\r\n return color in base_color_vars ? base_color_vars[color as BaseColorProps] : color;\r\n}\r\n\r\ntype DaisyVariant = 'spinner' | 'spinner-2' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity';\r\ntype SvgVariant = 'spinner-3' | 'spinner-4' | 'spinner-5' | 'spinner-6';\r\ntype SizeKey = keyof typeof svg_size_map;\r\n\r\ntype LoadingProps = {\r\n variant?: DaisyVariant | SvgVariant;\r\n size?: SizeKey;\r\n /** Nhận BaseColorProps ('primary', 'error', ...) hoặc bất kỳ giá trị CSS color nào */\r\n color?: BaseColorProps | string;\r\n class?: string;\r\n};\r\n\r\nexport type LoadingVariantsProps = VariantProps<typeof daisy_variants>;\r\n\r\nexport const Loading: Component<LoadingProps> = props => {\r\n const p = mergeProps({ variant: 'spinner' as const, size: 'sm' as const }, props);\r\n\r\n const isDaisy = () =>\r\n !['spinner-3', 'spinner-4', 'spinner-5', 'spinner-6'].includes(p.variant as string);\r\n\r\n const resolvedColor = () => resolveColor(p.color);\r\n const svgClass = () => cn(svg_size_map[p.size as SizeKey], p.class);\r\n\r\n return (\r\n <Switch>\r\n <Match when={isDaisy()}>\r\n <div\r\n class={cn(\r\n daisy_variants({\r\n variant: p.variant as DaisyVariant,\r\n size: p.size,\r\n }),\r\n p.class,\r\n )}\r\n style={resolvedColor() ? { color: resolvedColor() } : undefined}\r\n />\r\n </Match>\r\n <Match when={p.variant === 'spinner-3'}>\r\n <LoadingSpinner3 class={svgClass()} color={resolvedColor()} />\r\n </Match>\r\n <Match when={p.variant === 'spinner-4'}>\r\n <LoadingSpinner4 class={svgClass()} color={resolvedColor()} />\r\n </Match>\r\n <Match when={p.variant === 'spinner-5'}>\r\n <LoadingSpinner5 class={svgClass()} color={resolvedColor()} />\r\n </Match>\r\n <Match when={p.variant === 'spinner-6'}>\r\n <LoadingSpinner6 class={svgClass()} color={resolvedColor()} />\r\n </Match>\r\n </Switch>\r\n );\r\n};\r\nexport const Spinner: Component<{ class?: string; color?: string }> = p => {\r\n const id = createUniqueId();\r\n\r\n p = mergeProps({ color: '#6E56CF' } as const, p);\r\n\r\n return (\r\n <div class={cn('size-3 animate-spin', p.class)}>\r\n <svg\r\n width=\"inherit\"\r\n height=\"inherit\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <ellipse\r\n cx=\"9.99995\"\r\n cy=\"9.99995\"\r\n rx=\"7.31001\"\r\n ry=\"7.31001\"\r\n stroke={p.color}\r\n stroke-opacity=\"0.25\"\r\n stroke-width=\"4\"\r\n />\r\n <path\r\n d=\"M9.94939 2.69013C11.8881 2.67671 13.7527 3.43398 15.133 4.79535C16.5134 6.15671 17.2964 8.01067 17.3098 9.94936\"\r\n stroke={`url(#${id})`}\r\n stroke-width=\"4\"\r\n stroke-linecap=\"round\"\r\n stroke-dasharray=\"1.23 1.23\"\r\n />\r\n <defs>\r\n <linearGradient\r\n id={id}\r\n x1=\"16.3108\"\r\n y1=\"13.6892\"\r\n x2=\"3.68922\"\r\n y2=\"6.31075\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop stop-color={p.color} />\r\n <stop offset=\"0.5\" stop-color={p.color} stop-opacity=\"0.01\" />\r\n <stop offset=\"1\" stop-color={p.color} stop-opacity=\"0\" />\r\n </linearGradient>\r\n </defs>\r\n </svg>\r\n </div>\r\n );\r\n};\r\nconst LoadingSpinner3: Component<{ class?: string; color?: string }> = p => {\r\n p = mergeProps({ color: 'currentColor' } as const, p);\r\n return (\r\n <div class={cn('size-7 p-0', p.class)} style={{ color: p.color }}>\r\n <svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g>\r\n <circle cx=\"12\" cy=\"3\" r=\"1\">\r\n <animate\r\n id=\"_dcbb18\"\r\n begin=\"0;_84a13e.end-0.5s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"16.50\" cy=\"4.21\" r=\"1\">\r\n <animate\r\n id=\"_92c238\"\r\n begin=\"_dcbb18.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"7.50\" cy=\"4.21\" r=\"1\">\r\n <animate\r\n id=\"_84a13e\"\r\n begin=\"_5abc3e.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"19.79\" cy=\"7.50\" r=\"1\">\r\n <animate\r\n id=\"_9d19c8\"\r\n begin=\"_92c238.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"4.21\" cy=\"7.50\" r=\"1\">\r\n <animate\r\n id=\"_5abc3e\"\r\n begin=\"_dcfbb2.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"21.00\" cy=\"12.00\" r=\"1\">\r\n <animate\r\n id=\"_cf88a3\"\r\n begin=\"_9d19c8.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"3.00\" cy=\"12.00\" r=\"1\">\r\n <animate\r\n id=\"_dcfbb2\"\r\n begin=\"_514e98.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"19.79\" cy=\"16.50\" r=\"1\">\r\n <animate\r\n id=\"_2fecf8\"\r\n begin=\"_cf88a3.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"4.21\" cy=\"16.50\" r=\"1\">\r\n <animate\r\n id=\"_514e98\"\r\n begin=\"_c4d048.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"16.50\" cy=\"19.79\" r=\"1\">\r\n <animate\r\n id=\"_033759\"\r\n begin=\"_2fecf8.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"7.50\" cy=\"19.79\" r=\"1\">\r\n <animate\r\n id=\"_c4d048\"\r\n begin=\"_3ec8bd.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <circle cx=\"12\" cy=\"21\" r=\"1\">\r\n <animate\r\n id=\"_3ec8bd\"\r\n begin=\"_033759.begin+0.1s\"\r\n attributeName=\"r\"\r\n calcMode=\"spline\"\r\n dur=\"0.6s\"\r\n values=\"1;2;1\"\r\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\r\n />\r\n </circle>\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n dur=\"6s\"\r\n values=\"360 12 12;0 12 12\"\r\n repeatCount=\"indefinite\"\r\n />\r\n </g>\r\n </svg>\r\n </div>\r\n );\r\n};\r\nconst LoadingSpinner4: Component<{ class?: string; color?: string }> = p => {\r\n return <Loader class={cn('animate-spin', p.class)} color={p.color} />;\r\n};\r\nconst LoadingSpinner5: Component<{ class?: string; color?: string }> = p => {\r\n p = mergeProps({ class: 'size-6' } as const, p);\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n x=\"0px\"\r\n y=\"0px\"\r\n viewBox=\"0 0 2400 2400\"\r\n class={p.class}\r\n style={{ color: p.color }}\r\n >\r\n <g stroke-width=\"200\" stroke-linecap=\"round\" stroke=\"currentColor\" fill=\"none\" id=\"spinner\">\r\n <line x1=\"1200\" y1=\"600\" x2=\"1200\" y2=\"100\" />\r\n <line opacity=\"0.5\" x1=\"1200\" y1=\"2300\" x2=\"1200\" y2=\"1800\" />\r\n <line opacity=\"0.917\" x1=\"900\" y1=\"680.4\" x2=\"650\" y2=\"247.4\" />\r\n <line opacity=\"0.417\" x1=\"1750\" y1=\"2152.6\" x2=\"1500\" y2=\"1719.6\" />\r\n <line opacity=\"0.833\" x1=\"680.4\" y1=\"900\" x2=\"247.4\" y2=\"650\" />\r\n <line opacity=\"0.333\" x1=\"2152.6\" y1=\"1750\" x2=\"1719.6\" y2=\"1500\" />\r\n <line opacity=\"0.75\" x1=\"600\" y1=\"1200\" x2=\"100\" y2=\"1200\" />\r\n <line opacity=\"0.25\" x1=\"2300\" y1=\"1200\" x2=\"1800\" y2=\"1200\" />\r\n <line opacity=\"0.667\" x1=\"680.4\" y1=\"1500\" x2=\"247.4\" y2=\"1750\" />\r\n <line opacity=\"0.167\" x1=\"2152.6\" y1=\"650\" x2=\"1719.6\" y2=\"900\" />\r\n <line opacity=\"0.583\" x1=\"900\" y1=\"1719.6\" x2=\"650\" y2=\"2152.6\" />\r\n <line opacity=\"0.083\" x1=\"1750\" y1=\"247.4\" x2=\"1500\" y2=\"680.4\" />\r\n <animateTransform\r\n attributeName=\"transform\"\r\n attributeType=\"XML\"\r\n type=\"rotate\"\r\n keyTimes=\"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667\"\r\n values=\"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199\"\r\n dur=\"0.83333s\"\r\n begin=\"0s\"\r\n repeatCount=\"indefinite\"\r\n calcMode=\"discrete\"\r\n />\r\n </g>\r\n </svg>\r\n );\r\n};\r\nconst LoadingSpinner6: Component<{ class?: string; color?: string }> = p => {\r\n p = mergeProps({ class: 'size-6' } as const, p);\r\n const id = createUniqueId();\r\n return (\r\n <svg\r\n fill=\"none\"\r\n viewBox=\"0 0 20 20\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class={p.class}\r\n style={{ color: p.color }}\r\n >\r\n <defs>\r\n <linearGradient id={id}>\r\n <stop offset=\"0%\" stop-color=\"currentColor\" stop-opacity=\"1\" />\r\n <stop offset=\"100%\" stop-color=\"currentColor\" stop-opacity=\"0.25\" />\r\n </linearGradient>\r\n </defs>\r\n <circle\r\n cx=\"10\"\r\n cy=\"10\"\r\n r=\"8\"\r\n stroke-width=\"2\"\r\n class=\"animate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,MAAKgE,EACE5D,EAAEV,MAAK,OAAAqE,IAAAhD,EAAAG,GAAAsB,EAAAkB,EAAA,QAAA3C,EAAAG,EAAA6C,EAAA,CAAAC,IAAAjD,EAAAK,GAAAiC,EAAAK,EAAA,QAAA3C,EAAAK,EAAA4C,EAAA,CAAAjD,GAAA,CAAAG,EAAAvB,IAAAA,GAAAyB,EAAAzB,IAAAA,GAAA,CAAA,CAAA+D,KAAA"}
1
+ {"version":3,"file":"loading.js","names":["cn","BaseColorProps","cva","VariantProps","Component","createUniqueId","mergeProps","Switch","Match","Loader","daisy_variants","variants","variant","spinner","dots","ring","ball","bars","infinity","size","xs","sm","md","lg","xl","svg_size_map","const","base_color_vars","Record","primary","secondary","accent","neutral","info","success","warning","error","resolveColor","color","undefined","DaisyVariant","SvgVariant","SizeKey","LoadingProps","class","LoadingVariantsProps","Loading","props","p","isDaisy","includes","resolvedColor","svgClass","_$createComponent","children","when","_el$","_tmpl$","_$effect","_p$","_v$","_v$2","e","_$className","t","_$style","LoadingSpinner3","LoadingSpinner4","LoadingSpinner5","LoadingSpinner6","Spinner","id","_el$2","_tmpl$2","_el$3","firstChild","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$setAttribute","_v$3","_v$4","_v$5","_v$6","_v$7","a","o","i","_el$1","_tmpl$3","_v$8","_v$9","_$setStyleProperty","_el$10","_tmpl$4","_v$0","_v$1","_el$11","_tmpl$5","_el$12","_el$13","_el$14","_v$10","_v$11"],"sources":["../../../src/components/loading/loading.tsx"],"sourcesContent":["import { cn } from '@/utils/cn';\nimport { BaseColorProps } from '@/type';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport { Component, createUniqueId, mergeProps, Switch, Match } from 'solid-js';\nimport Loader from 'lucide-solid/icons/loader';\n\n// Variants dùng DaisyUI classes (spinner, spinner-2, dots, ring, ball, bars, infinity)\nconst daisy_variants = cva('loading', {\n variants: {\n variant: {\n spinner: 'loading-spinner',\n 'spinner-2': 'loading-spinner-2',\n dots: 'loading-dots',\n ring: 'loading-ring',\n ball: 'loading-ball',\n bars: 'loading-bars',\n infinity: 'loading-infinity',\n },\n size: {\n xs: 'loading-xs',\n sm: 'loading-sm',\n md: 'loading-md',\n lg: 'loading-lg',\n xl: 'loading-xl',\n },\n },\n});\n\n// Map size → CSS class cho SVG-based spinners\nconst svg_size_map = {\n xs: 'loading-svg-xs',\n sm: 'loading-svg-sm',\n md: 'loading-svg-md',\n lg: 'loading-svg-lg',\n xl: 'loading-svg-xl',\n} as const;\n\n// Map BaseColorProps → CSS variable của DaisyUI/Tailwind\nconst base_color_vars: Record<BaseColorProps, string> = {\n primary: 'var(--color-primary)',\n secondary: 'var(--color-secondary)',\n accent: 'var(--color-accent)',\n neutral: 'var(--color-neutral)',\n info: 'var(--color-info)',\n success: 'var(--color-success)',\n warning: 'var(--color-warning)',\n error: 'var(--color-error)',\n};\n\n/** Resolve color prop: nếu là BaseColorProps key thì map sang CSS var, còn lại dùng trực tiếp */\nfunction resolveColor(color: string | undefined): string | undefined {\n if (!color) return undefined;\n return color in base_color_vars ? base_color_vars[color as BaseColorProps] : color;\n}\n\ntype DaisyVariant = 'spinner' | 'spinner-2' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity';\ntype SvgVariant = 'spinner-3' | 'spinner-4' | 'spinner-5' | 'spinner-6';\ntype SizeKey = keyof typeof svg_size_map;\n\ntype LoadingProps = {\n variant?: DaisyVariant | SvgVariant;\n size?: SizeKey;\n /** Nhận BaseColorProps ('primary', 'error', ...) hoặc bất kỳ giá trị CSS color nào */\n color?: BaseColorProps | string;\n class?: string;\n};\n\nexport type LoadingVariantsProps = VariantProps<typeof daisy_variants>;\n\nexport const Loading: Component<LoadingProps> = props => {\n const p = mergeProps({ variant: 'spinner' as const, size: 'sm' as const }, props);\n\n const isDaisy = () =>\n !['spinner-3', 'spinner-4', 'spinner-5', 'spinner-6'].includes(p.variant as string);\n\n const resolvedColor = () => resolveColor(p.color);\n const svgClass = () => cn(svg_size_map[p.size as SizeKey], p.class);\n\n return (\n <Switch>\n <Match when={isDaisy()}>\n <div\n class={cn(\n daisy_variants({\n variant: p.variant as DaisyVariant,\n size: p.size,\n }),\n p.class,\n )}\n style={resolvedColor() ? { color: resolvedColor() } : undefined}\n />\n </Match>\n <Match when={p.variant === 'spinner-3'}>\n <LoadingSpinner3 class={svgClass()} color={resolvedColor()} />\n </Match>\n <Match when={p.variant === 'spinner-4'}>\n <LoadingSpinner4 class={svgClass()} color={resolvedColor()} />\n </Match>\n <Match when={p.variant === 'spinner-5'}>\n <LoadingSpinner5 class={svgClass()} color={resolvedColor()} />\n </Match>\n <Match when={p.variant === 'spinner-6'}>\n <LoadingSpinner6 class={svgClass()} color={resolvedColor()} />\n </Match>\n </Switch>\n );\n};\nexport const Spinner: Component<{ class?: string; color?: string }> = p => {\n const id = createUniqueId();\n\n p = mergeProps({ color: '#6E56CF' } as const, p);\n\n return (\n <div class={cn('size-3 animate-spin', p.class)}>\n <svg\n width=\"inherit\"\n height=\"inherit\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <ellipse\n cx=\"9.99995\"\n cy=\"9.99995\"\n rx=\"7.31001\"\n ry=\"7.31001\"\n stroke={p.color}\n stroke-opacity=\"0.25\"\n stroke-width=\"4\"\n />\n <path\n d=\"M9.94939 2.69013C11.8881 2.67671 13.7527 3.43398 15.133 4.79535C16.5134 6.15671 17.2964 8.01067 17.3098 9.94936\"\n stroke={`url(#${id})`}\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"1.23 1.23\"\n />\n <defs>\n <linearGradient\n id={id}\n x1=\"16.3108\"\n y1=\"13.6892\"\n x2=\"3.68922\"\n y2=\"6.31075\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color={p.color} />\n <stop offset=\"0.5\" stop-color={p.color} stop-opacity=\"0.01\" />\n <stop offset=\"1\" stop-color={p.color} stop-opacity=\"0\" />\n </linearGradient>\n </defs>\n </svg>\n </div>\n );\n};\nconst LoadingSpinner3: Component<{ class?: string; color?: string }> = p => {\n p = mergeProps({ color: 'currentColor' } as const, p);\n return (\n <div class={cn('size-7 p-0', p.class)} style={{ color: p.color }}>\n <svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <circle cx=\"12\" cy=\"3\" r=\"1\">\n <animate\n id=\"_dcbb18\"\n begin=\"0;_84a13e.end-0.5s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"16.50\" cy=\"4.21\" r=\"1\">\n <animate\n id=\"_92c238\"\n begin=\"_dcbb18.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"7.50\" cy=\"4.21\" r=\"1\">\n <animate\n id=\"_84a13e\"\n begin=\"_5abc3e.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"19.79\" cy=\"7.50\" r=\"1\">\n <animate\n id=\"_9d19c8\"\n begin=\"_92c238.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"4.21\" cy=\"7.50\" r=\"1\">\n <animate\n id=\"_5abc3e\"\n begin=\"_dcfbb2.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"21.00\" cy=\"12.00\" r=\"1\">\n <animate\n id=\"_cf88a3\"\n begin=\"_9d19c8.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"3.00\" cy=\"12.00\" r=\"1\">\n <animate\n id=\"_dcfbb2\"\n begin=\"_514e98.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"19.79\" cy=\"16.50\" r=\"1\">\n <animate\n id=\"_2fecf8\"\n begin=\"_cf88a3.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"4.21\" cy=\"16.50\" r=\"1\">\n <animate\n id=\"_514e98\"\n begin=\"_c4d048.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"16.50\" cy=\"19.79\" r=\"1\">\n <animate\n id=\"_033759\"\n begin=\"_2fecf8.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"7.50\" cy=\"19.79\" r=\"1\">\n <animate\n id=\"_c4d048\"\n begin=\"_3ec8bd.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <circle cx=\"12\" cy=\"21\" r=\"1\">\n <animate\n id=\"_3ec8bd\"\n begin=\"_033759.begin+0.1s\"\n attributeName=\"r\"\n calcMode=\"spline\"\n dur=\"0.6s\"\n values=\"1;2;1\"\n keySplines=\".27,.42,.37,.99;.53,0,.61,.73\"\n />\n </circle>\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n dur=\"6s\"\n values=\"360 12 12;0 12 12\"\n repeatCount=\"indefinite\"\n />\n </g>\n </svg>\n </div>\n );\n};\nconst LoadingSpinner4: Component<{ class?: string; color?: string }> = p => {\n return <Loader class={cn('animate-spin', p.class)} color={p.color} />;\n};\nconst LoadingSpinner5: Component<{ class?: string; color?: string }> = p => {\n p = mergeProps({ class: 'size-6' } as const, p);\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 2400 2400\"\n class={p.class}\n style={{ color: p.color }}\n >\n <g stroke-width=\"200\" stroke-linecap=\"round\" stroke=\"currentColor\" fill=\"none\" id=\"spinner\">\n <line x1=\"1200\" y1=\"600\" x2=\"1200\" y2=\"100\" />\n <line opacity=\"0.5\" x1=\"1200\" y1=\"2300\" x2=\"1200\" y2=\"1800\" />\n <line opacity=\"0.917\" x1=\"900\" y1=\"680.4\" x2=\"650\" y2=\"247.4\" />\n <line opacity=\"0.417\" x1=\"1750\" y1=\"2152.6\" x2=\"1500\" y2=\"1719.6\" />\n <line opacity=\"0.833\" x1=\"680.4\" y1=\"900\" x2=\"247.4\" y2=\"650\" />\n <line opacity=\"0.333\" x1=\"2152.6\" y1=\"1750\" x2=\"1719.6\" y2=\"1500\" />\n <line opacity=\"0.75\" x1=\"600\" y1=\"1200\" x2=\"100\" y2=\"1200\" />\n <line opacity=\"0.25\" x1=\"2300\" y1=\"1200\" x2=\"1800\" y2=\"1200\" />\n <line opacity=\"0.667\" x1=\"680.4\" y1=\"1500\" x2=\"247.4\" y2=\"1750\" />\n <line opacity=\"0.167\" x1=\"2152.6\" y1=\"650\" x2=\"1719.6\" y2=\"900\" />\n <line opacity=\"0.583\" x1=\"900\" y1=\"1719.6\" x2=\"650\" y2=\"2152.6\" />\n <line opacity=\"0.083\" x1=\"1750\" y1=\"247.4\" x2=\"1500\" y2=\"680.4\" />\n <animateTransform\n attributeName=\"transform\"\n attributeType=\"XML\"\n type=\"rotate\"\n keyTimes=\"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667\"\n values=\"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199\"\n dur=\"0.83333s\"\n begin=\"0s\"\n repeatCount=\"indefinite\"\n calcMode=\"discrete\"\n />\n </g>\n </svg>\n );\n};\nconst LoadingSpinner6: Component<{ class?: string; color?: string }> = p => {\n p = mergeProps({ class: 'size-6' } as const, p);\n const id = createUniqueId();\n return (\n <svg\n fill=\"none\"\n viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class={p.class}\n style={{ color: p.color }}\n >\n <defs>\n <linearGradient id={id}>\n <stop offset=\"0%\" stop-color=\"currentColor\" stop-opacity=\"1\" />\n <stop offset=\"100%\" stop-color=\"currentColor\" stop-opacity=\"0.25\" />\n </linearGradient>\n </defs>\n <circle\n cx=\"10\"\n cy=\"10\"\n r=\"8\"\n stroke-width=\"2\"\n class=\"animate-spin\"\n stroke={`url(#${id})`}\n fill=\"none\"\n style={{ 'transform-origin': '50% 50%' }}\n />\n </svg>\n );\n};\n"],"mappings":"8hKAOMU,EAAiBR,EAAI,UAAW,CACpCS,SAAU,CACRC,QAAS,CACPC,QAAS,kBACT,YAAa,oBACbC,KAAM,eACNC,KAAM,eACNC,KAAM,eACNC,KAAM,eACNC,SAAU,mBACX,CACDC,KAAM,CACJC,GAAI,aACJC,GAAI,aACJC,GAAI,aACJC,GAAI,aACJC,GAAI,aACN,CACF,CACD,CAAC,CAGIC,E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leanup","onMount","Show","untrack","cn","createThrottle","MansoryBreakpoint","MansoryItemLayout","MansoryProps","MansoryResponsive","MansoryVirtualOptions","BREAKPOINTS","Record","Exclude","sm","md","lg","xl","BP_KEYS","const","DEFAULT_COLUMNS","default","DEFAULT_GAP","GAP_CACHE_MAX","gapCache","Map","resolveResponsive","config","T","containerWidth","Array","isArray","map","i","length","key","undefined","measureGapPx","gapClass","container","HTMLElement","probe","document","createElement","className","style","display","gridTemplateColumns","appendChild","computed","getComputedStyle","gap","parseFloat","columnGap","removeChild","measureGapPxCached","has","get","value","size","firstKey","keys","next","delete","set","computeLayout","itemHeights","columns","gapPx","layouts","totalHeight","sortedByTop","cols","Math","max","totalGap","colWidth","colHeights","fill","minCol","c","left","top","height","item","index","width","push","j","splice","maxH","findFirstVisible","sorted","visTop","lo","hi","mid","MansoryItemProps","getLayoutAccessor","items","itemClass","children","onRegister","el","HTMLDivElement","onUnregister","MansoryItem","props","itemLayout","styles","l","wrapper","child","widthPx","transform","_el$","_tmpl$","_$use","unregisterItem","_$insert","_$effect","_p$","_v$","_v$2","_v$3","e","_$setAttribute","t","_$className","a","_$style","Mansory","rawProps","virtual","estimateItemHeight","loadMoreThreshold","containerEl","innerEl","setContainerWidth","setItemHeights","currentColumns","resolved","currentGapClass","setGapPx","trackGapClass","_","layout","layoutAccessors","layoutSetters","v","layoutDisposers","getOrCreateLayoutAccessor","layoutSignalRoot","dispose","initialValue","equals","b","disposeLayoutSignal","disposeAllLayoutSignals","values","clear","keyEntryCache","syncLayoutSetters","newLayouts","setter","virtualOpts","overscan","isVirtual","scrollTop","setScrollTop","rafId","pendingScrollTop","loadMoreCooldown","loadMoreTimer","ReturnType","setTimeout","pendingItemChanges","flushItemHeights","applyItemHeightChanges","snapshot","prev","hasChange","idx","h","cancelFlushItemHeights","cancel","itemRO","ResizeObserver","entries","entry","target","parseInt","dataset","mansoryIdx","contentBoxSize","blockSize","contentRect","disconnectItemResizeObserver","disconnect","applyContainerWidth","applyContainerWidthChange","containerRO","inlineSize","observe","disconnectContainerResizeObserver","itemElMap","registerItem","unobserve","len","prevLen","slice","checkLoadMore","currentScrollTop","onLoadMore","scrollHeight","clientHeight","clearTimeout","clearLoadMoreTimer","cancelPendingRaf","cancelAnimationFrame","handleScroll","requestAnimationFrame","allIndices","renderedIndices","viewportHeight","overscanPx","visBottom","start","indices","renderedKeys","getItemKey","activeKeys","Set","add","k","_el$2","_tmpl$3","_el$3","firstChild","_$addEventListener","_ref$","_ref$2","_$createComponent","each","when","_tmpl$2","_v$4","class","_v$5","_$setStyleProperty"],"sources":["../../../src/components/mansory/mansory.tsx"],"sourcesContent":["import {\r\n Accessor,\r\n Component,\r\n createEffect,\r\n createMemo,\r\n createRoot,\r\n createSignal,\r\n For,\r\n mergeProps,\r\n on,\r\n onCleanup,\r\n onMount,\r\n Show,\r\n untrack,\r\n} from 'solid-js';\r\nimport { cn } from '@utils/cn';\r\nimport { createThrottle } from '@utils/helper';\r\nimport type {\r\n MansoryBreakpoint,\r\n MansoryItemLayout,\r\n MansoryProps,\r\n MansoryResponsive,\r\n MansoryVirtualOptions,\r\n} from './mansory.types';\r\n\r\nconst BREAKPOINTS: Record<Exclude<MansoryBreakpoint, 'default'>, number> = {\r\n sm: 640,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n '2xl': 1536,\r\n};\r\n\r\nconst BP_KEYS = ['sm', 'md', 'lg', 'xl', '2xl'] as const;\r\n\r\nconst DEFAULT_COLUMNS: MansoryResponsive<number> = {\r\n default: 1,\r\n sm: 2,\r\n md: 3,\r\n lg: 4,\r\n};\r\n\r\nconst DEFAULT_GAP = 'gap-4';\r\n\r\nconst GAP_CACHE_MAX = 50;\r\nconst gapCache = new Map<string, number>();\r\n\r\nfunction resolveResponsive<T>(config: T | MansoryResponsive<T>, containerWidth: number): T {\r\n if (typeof config !== 'object' || config === null || Array.isArray(config)) {\r\n return config as T;\r\n }\r\n\r\n const map = config as MansoryResponsive<T>;\r\n\r\n for (let i = BP_KEYS.length - 1; i >= 0; i--) {\r\n const key = BP_KEYS[i];\r\n if (containerWidth >= BREAKPOINTS[key] && map[key] !== undefined) {\r\n return map[key] as T;\r\n }\r\n }\r\n\r\n return (map.default ?? (typeof config === 'object' ? undefined : config)) as T;\r\n}\r\n\r\nfunction measureGapPx(gapClass: string, container: HTMLElement): number {\r\n const probe = document.createElement('div');\r\n probe.className = `ma06 ${gapClass}`;\r\n probe.style.display = 'grid';\r\n probe.style.gridTemplateColumns = '1fr 1fr';\r\n\r\n probe.appendChild(document.createElement('div'));\r\n probe.appendChild(document.createElement('div'));\r\n container.appendChild(probe);\r\n const computed = getComputedStyle(probe);\r\n const gap = parseFloat(computed.columnGap || computed.gap || '0');\r\n container.removeChild(probe);\r\n return gap;\r\n}\r\n\r\nfunction measureGapPxCached(gapClass: string, container: HTMLElement): number {\r\n if (gapCache.has(gapClass)) return gapCache.get(gapClass)!;\r\n const value = measureGapPx(gapClass, container);\r\n\r\n if (gapCache.size >= GAP_CACHE_MAX) {\r\n const firstKey = gapCache.keys().next().value;\r\n if (firstKey !== undefined) gapCache.delete(firstKey);\r\n }\r\n gapCache.set(gapClass, value);\r\n return value;\r\n}\r\n\r\nfunction computeLayout(\r\n itemHeights: number[],\r\n columns: number,\r\n containerWidth: number,\r\n gapPx: number,\r\n): { layouts: MansoryItemLayout[]; totalHeight: number; sortedByTop: MansoryItemLayout[] } {\r\n const cols = Math.max(1, columns);\r\n const totalGap = gapPx * (cols - 1);\r\n const colWidth = (containerWidth - totalGap) / cols;\r\n\r\n const colHeights = new Array<number>(cols).fill(0);\r\n const layouts: MansoryItemLayout[] = [];\r\n\r\n const sortedByTop: MansoryItemLayout[] = [];\r\n\r\n for (let i = 0; i < itemHeights.length; i++) {\r\n let minCol = 0;\r\n for (let c = 1; c < cols; c++) {\r\n if (colHeights[c] < colHeights[minCol]) minCol = c;\r\n }\r\n\r\n const left = minCol * (colWidth + gapPx);\r\n const top = colHeights[minCol];\r\n const height = itemHeights[i] ?? 0;\r\n\r\n const item: MansoryItemLayout = { index: i, top, left, width: colWidth, height };\r\n layouts.push(item);\r\n\r\n let j = sortedByTop.length - 1;\r\n while (j >= 0 && sortedByTop[j].top > top) j--;\r\n sortedByTop.splice(j + 1, 0, item);\r\n\r\n colHeights[minCol] = top + height + gapPx;\r\n }\r\n\r\n let maxH = 0;\r\n for (let i = 0; i < colHeights.length; i++) {\r\n if (colHeights[i] > maxH) maxH = colHeights[i];\r\n }\r\n\r\n return { layouts, totalHeight: maxH > 0 ? maxH - gapPx : 0, sortedByTop };\r\n}\r\n\r\nfunction findFirstVisible(sorted: MansoryItemLayout[], visTop: number): number {\r\n let lo = 0,\r\n hi = sorted.length;\r\n while (lo < hi) {\r\n const mid = (lo + hi) >> 1;\r\n if (sorted[mid].top + sorted[mid].height < visTop) lo = mid + 1;\r\n else hi = mid;\r\n }\r\n return lo;\r\n}\r\n\r\ninterface MansoryItemProps {\r\n index: number;\r\n getLayoutAccessor: (index: number) => Accessor<MansoryItemLayout | undefined>;\r\n items: unknown[];\r\n itemClass?: string;\r\n children: MansoryProps['children'];\r\n onRegister: (index: number, el: HTMLDivElement) => void;\r\n onUnregister: (index: number) => void;\r\n}\r\n\r\nconst MansoryItem: Component<MansoryItemProps> = props => {\r\n const itemLayout = props.getLayoutAccessor(props.index);\r\n\r\n const styles = createMemo(() => {\r\n const l = itemLayout();\r\n if (!l) return { wrapper: {} as Record<string, string>, child: {} as Record<string, string> };\r\n const widthPx = `${l.width}px`;\r\n return {\r\n wrapper: { width: widthPx, transform: `translate3d(${l.left}px, ${l.top}px, 0)` },\r\n child: { width: widthPx },\r\n };\r\n });\r\n\r\n return (\r\n <div\r\n ref={el => {\r\n props.onRegister(props.index, el);\r\n onCleanup(function unregisterItem() {\r\n props.onUnregister(props.index);\r\n });\r\n }}\r\n data-mansory-idx={props.index}\r\n class={cn('ma03 ma04', props.itemClass)}\r\n style={styles().wrapper}\r\n >\r\n {props.children(props.items[props.index], () => props.index, styles().child)}\r\n </div>\r\n );\r\n};\r\n\r\nexport const Mansory: Component<MansoryProps> = rawProps => {\r\n const props = mergeProps(\r\n {\r\n columns: DEFAULT_COLUMNS,\r\n gap: DEFAULT_GAP,\r\n virtual: false as boolean | MansoryVirtualOptions,\r\n estimateItemHeight: 200,\r\n loadMoreThreshold: 200,\r\n },\r\n rawProps,\r\n );\r\n\r\n let containerEl!: HTMLDivElement;\r\n let innerEl!: HTMLDivElement;\r\n\r\n const [containerWidth, setContainerWidth] = createSignal(0);\r\n const [itemHeights, setItemHeights] = createSignal<number[]>([]);\r\n\r\n const currentColumns = createMemo(() => {\r\n const resolved = resolveResponsive<number>(props.columns as number, containerWidth());\r\n return Math.max(1, resolved ?? 1);\r\n });\r\n\r\n const currentGapClass = createMemo(() => {\r\n const resolved = resolveResponsive<string>(props.gap as string, containerWidth());\r\n return resolved ?? 'gap-4';\r\n });\r\n\r\n const [gapPx, setGapPx] = createSignal(16);\r\n\r\n createEffect(function trackGapClass() {\r\n const _ = currentGapClass();\r\n if (containerEl) {\r\n setGapPx(measureGapPxCached(currentGapClass(), containerEl));\r\n }\r\n });\r\n\r\n const layout = createMemo(() =>\r\n computeLayout(itemHeights(), currentColumns(), containerWidth(), gapPx()),\r\n );\r\n\r\n const totalHeight = createMemo(() => layout().totalHeight);\r\n\r\n const layoutAccessors = new Map<number, Accessor<MansoryItemLayout | undefined>>();\r\n const layoutSetters = new Map<number, (v: MansoryItemLayout | undefined) => void>();\r\n const layoutDisposers = new Map<number, () => void>();\r\n\r\n function getOrCreateLayoutAccessor(index: number): Accessor<MansoryItemLayout | undefined> {\r\n if (!layoutAccessors.has(index)) {\r\n\r\n createRoot(function layoutSignalRoot(dispose) {\r\n layoutDisposers.set(index, dispose);\r\n const initialValue = untrack(() => layout().layouts[index]);\r\n const [get, set] = createSignal<MansoryItemLayout | undefined>(initialValue, {\r\n equals: (a, b) => {\r\n if (a === b) return true;\r\n if (!a || !b) return false;\r\n return (\r\n a.top === b.top && a.left === b.left && a.width === b.width && a.height === b.height\r\n );\r\n },\r\n });\r\n layoutAccessors.set(index, get);\r\n layoutSetters.set(index, set);\r\n });\r\n }\r\n return layoutAccessors.get(index)!;\r\n }\r\n\r\n function disposeLayoutSignal(index: number) {\r\n layoutDisposers.get(index)?.();\r\n layoutDisposers.delete(index);\r\n layoutAccessors.delete(index);\r\n layoutSetters.delete(index);\r\n }\r\n\r\n onCleanup(function disposeAllLayoutSignals() {\r\n for (const dispose of layoutDisposers.values()) dispose();\r\n layoutDisposers.clear();\r\n layoutAccessors.clear();\r\n layoutSetters.clear();\r\n keyEntryCache.clear();\r\n });\r\n\r\n createEffect(function syncLayoutSetters() {\r\n const newLayouts = layout().layouts;\r\n\r\n for (const [index, setter] of layoutSetters) {\r\n setter(newLayouts[index]);\r\n }\r\n });\r\n\r\n const virtualOpts = createMemo<MansoryVirtualOptions | null>(() => {\r\n const v = props.virtual;\r\n if (!v) return null;\r\n if (v === true) return { overscan: 5 };\r\n return { overscan: v.overscan ?? 5 };\r\n });\r\n\r\n const isVirtual = createMemo(() => virtualOpts() !== null);\r\n\r\n const [scrollTop, setScrollTop] = createSignal(0);\r\n\r\n let rafId: number | null = null;\r\n let pendingScrollTop = 0;\r\n\r\n let loadMoreCooldown = false;\r\n let loadMoreTimer: ReturnType<typeof setTimeout> | null = null;\r\n\r\n const pendingItemChanges = new Map<number, number>();\r\n\r\n const flushItemHeights = createThrottle(function applyItemHeightChanges() {\r\n if (pendingItemChanges.size === 0) return;\r\n const snapshot = new Map(pendingItemChanges);\r\n pendingItemChanges.clear();\r\n\r\n setItemHeights(prev => {\r\n let hasChange = false;\r\n for (const [idx, h] of snapshot) {\r\n if (prev[idx] !== h) {\r\n hasChange = true;\r\n break;\r\n }\r\n }\r\n if (!hasChange) return prev;\r\n\r\n const next = [...prev];\r\n for (const [idx, h] of snapshot) next[idx] = h;\r\n return next;\r\n });\r\n }, 100);\r\n\r\n onCleanup(function cancelFlushItemHeights() {\r\n flushItemHeights.cancel();\r\n });\r\n\r\n const itemRO = new ResizeObserver(entries => {\r\n for (const entry of entries) {\r\n const el = entry.target as HTMLDivElement;\r\n const idx = parseInt(el.dataset.mansoryIdx ?? '-1', 10);\r\n if (idx < 0) continue;\r\n\r\n const h = entry.contentBoxSize?.[0]?.blockSize ?? entry.contentRect.height;\r\n pendingItemChanges.set(idx, h);\r\n }\r\n\r\n flushItemHeights();\r\n });\r\n\r\n onCleanup(function disconnectItemResizeObserver() {\r\n itemRO.disconnect();\r\n });\r\n\r\n onMount(() => {\r\n const applyContainerWidth = createThrottle(function applyContainerWidthChange(width: number) {\r\n setContainerWidth(width);\r\n }, 100);\r\n\r\n const containerRO = new ResizeObserver(entries => {\r\n for (const entry of entries) {\r\n const width = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;\r\n applyContainerWidth(width);\r\n }\r\n });\r\n containerRO.observe(containerEl);\r\n onCleanup(function disconnectContainerResizeObserver() {\r\n applyContainerWidth.cancel();\r\n containerRO.disconnect();\r\n });\r\n });\r\n\r\n const itemElMap = new Map<number, HTMLDivElement>();\r\n\r\n function registerItem(index: number, el: HTMLDivElement) {\r\n itemElMap.set(index, el);\r\n itemRO.observe(el);\r\n }\r\n\r\n function unregisterItem(index: number) {\r\n const el = itemElMap.get(index);\r\n if (el) {\r\n itemRO.unobserve(el);\r\n itemElMap.delete(index);\r\n }\r\n }\r\n\r\n createEffect(\r\n on(\r\n () => props.items.length,\r\n len => {\r\n setItemHeights(prev => {\r\n const prevLen = prev.length;\r\n if (prevLen === len) return prev;\r\n\r\n if (len > prevLen) {\r\n const next = [...prev];\r\n for (let i = prevLen; i < len; i++) next.push(props.estimateItemHeight);\r\n return next;\r\n }\r\n\r\n for (let i = len; i < prevLen; i++) {\r\n disposeLayoutSignal(i);\r\n }\r\n return prev.slice(0, len);\r\n });\r\n },\r\n ),\r\n );\r\n\r\n function checkLoadMore(currentScrollTop: number) {\r\n if (!props.onLoadMore || loadMoreCooldown) return;\r\n const { scrollHeight, clientHeight } = containerEl;\r\n if (currentScrollTop + clientHeight >= scrollHeight - props.loadMoreThreshold) {\r\n loadMoreCooldown = true;\r\n\r\n if (loadMoreTimer) clearTimeout(loadMoreTimer);\r\n loadMoreTimer = setTimeout(() => {\r\n loadMoreCooldown = false;\r\n loadMoreTimer = null;\r\n }, 10_000);\r\n props.onLoadMore();\r\n }\r\n }\r\n\r\n createEffect(\r\n on(\r\n () => props.items.length,\r\n () => {\r\n if (loadMoreTimer) {\r\n clearTimeout(loadMoreTimer);\r\n loadMoreTimer = null;\r\n }\r\n loadMoreCooldown = false;\r\n },\r\n ),\r\n );\r\n\r\n onCleanup(function clearLoadMoreTimer() {\r\n if (loadMoreTimer) clearTimeout(loadMoreTimer);\r\n });\r\n\r\n onCleanup(function cancelPendingRaf() {\r\n if (rafId !== null) cancelAnimationFrame(rafId);\r\n });\r\n\r\n function handleScroll() {\r\n pendingScrollTop = containerEl.scrollTop;\r\n\r\n if (rafId === null) {\r\n rafId = requestAnimationFrame(() => {\r\n rafId = null;\r\n setScrollTop(pendingScrollTop);\r\n checkLoadMore(pendingScrollTop);\r\n });\r\n }\r\n }\r\n\r\n const allIndices = createMemo<number[]>((prev = []) => {\r\n const len = props.items.length;\r\n if (len === prev.length) return prev;\r\n if (len > prev.length) {\r\n const next = [...prev];\r\n for (let i = prev.length; i < len; i++) next.push(i);\r\n return next;\r\n }\r\n return prev.slice(0, len);\r\n });\r\n\r\n const renderedIndices = createMemo(() => {\r\n if (!isVirtual()) {\r\n return allIndices();\r\n }\r\n\r\n if (containerWidth() === 0) return [];\r\n\r\n const currentScrollTop = scrollTop();\r\n const viewportHeight = containerEl.clientHeight;\r\n const overscan = virtualOpts()?.overscan ?? 5;\r\n const overscanPx = overscan * props.estimateItemHeight;\r\n const visTop = currentScrollTop - overscanPx;\r\n const visBottom = currentScrollTop + viewportHeight + overscanPx;\r\n\r\n const sorted = layout().sortedByTop;\r\n const start = findFirstVisible(sorted, visTop);\r\n const indices: number[] = [];\r\n for (let i = start; i < sorted.length; i++) {\r\n if (sorted[i].top > visBottom) break;\r\n indices.push(sorted[i].index);\r\n }\r\n return indices;\r\n });\r\n\r\n const keyEntryCache = new Map<string | number, { key: string | number; index: number }>();\r\n\r\n const renderedKeys = createMemo(() => {\r\n const indices = renderedIndices();\r\n if (!props.getItemKey) return indices;\r\n\r\n const activeKeys = new Set<string | number>();\r\n\r\n const entries = indices.map(i => {\r\n const key = props.getItemKey!(props.items[i], i);\r\n activeKeys.add(key);\r\n\r\n let entry = keyEntryCache.get(key);\r\n if (!entry) {\r\n entry = { key, index: i };\r\n keyEntryCache.set(key, entry);\r\n } else {\r\n\r\n entry.index = i;\r\n }\r\n return entry;\r\n });\r\n\r\n for (const k of keyEntryCache.keys()) {\r\n if (!activeKeys.has(k)) keyEntryCache.delete(k);\r\n }\r\n\r\n return entries;\r\n });\r\n\r\n return (\r\n <div\r\n ref={containerEl}\r\n class={cn('ma01', isVirtual() && 'ma05', props.class)}\r\n onScroll={isVirtual() || props.onLoadMore ? handleScroll : undefined}\r\n >\r\n <div ref={innerEl} class=\"ma02\" style={{ height: `${totalHeight()}px` }}>\r\n <For each={renderedKeys()}>\r\n {entry => {\r\n const index = typeof entry === 'number' ? entry : entry.index;\r\n return (\r\n <MansoryItem\r\n index={index}\r\n getLayoutAccessor={getOrCreateLayoutAccessor}\r\n items={props.items}\r\n itemClass={props.itemClass}\r\n onRegister={registerItem}\r\n onUnregister={unregisterItem}\r\n >\r\n {props.children}\r\n </MansoryItem>\r\n );\r\n }}\r\n </For>\r\n </div>\r\n\r\n <Show when={props.items.length === 0}>\r\n <div class=\"ma08\">No items</div>\r\n </Show>\r\n </div>\r\n );\r\n};"],"mappings":"khBAyBMoB,EAAqE,CACzEG,GAAI,IACJC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJ,MAAO,KACR,CAEKC,EAAU,CAAC,KAAM,KAAM,KAAM,KAAM,MAAM,CAEzCE,EAA6C,CACjDC,QAAS,EACTP,GAAI,EACJC,GAAI,EAC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,EAAA,CAAA/H,GAAA,CAAAI,EAAAzF,IAAAA,GAAA2F,EAAA3F,IAAAA,GAAA,CAAA,CAAAuM,KAAA"}
1
+ {"version":3,"file":"mansory.js","names":["Accessor","Component","createEffect","createMemo","createRoot","createSignal","For","mergeProps","on","onCleanup","onMount","Show","untrack","cn","createThrottle","MansoryBreakpoint","MansoryItemLayout","MansoryProps","MansoryResponsive","MansoryVirtualOptions","BREAKPOINTS","Record","Exclude","sm","md","lg","xl","BP_KEYS","const","DEFAULT_COLUMNS","default","DEFAULT_GAP","GAP_CACHE_MAX","gapCache","Map","resolveResponsive","config","T","containerWidth","Array","isArray","map","i","length","key","undefined","measureGapPx","gapClass","container","HTMLElement","probe","document","createElement","className","style","display","gridTemplateColumns","appendChild","computed","getComputedStyle","gap","parseFloat","columnGap","removeChild","measureGapPxCached","has","get","value","size","firstKey","keys","next","delete","set","computeLayout","itemHeights","columns","gapPx","layouts","totalHeight","sortedByTop","cols","Math","max","totalGap","colWidth","colHeights","fill","minCol","c","left","top","height","item","index","width","push","j","splice","maxH","findFirstVisible","sorted","visTop","lo","hi","mid","MansoryItemProps","getLayoutAccessor","items","itemClass","children","onRegister","el","HTMLDivElement","onUnregister","MansoryItem","props","itemLayout","styles","l","wrapper","child","widthPx","transform","_el$","_tmpl$","_$use","unregisterItem","_$insert","_$effect","_p$","_v$","_v$2","_v$3","e","_$setAttribute","t","_$className","a","_$style","Mansory","rawProps","virtual","estimateItemHeight","loadMoreThreshold","containerEl","innerEl","setContainerWidth","setItemHeights","currentColumns","resolved","currentGapClass","setGapPx","trackGapClass","_","layout","layoutAccessors","layoutSetters","v","layoutDisposers","getOrCreateLayoutAccessor","layoutSignalRoot","dispose","initialValue","equals","b","disposeLayoutSignal","disposeAllLayoutSignals","values","clear","keyEntryCache","syncLayoutSetters","newLayouts","setter","virtualOpts","overscan","isVirtual","scrollTop","setScrollTop","rafId","pendingScrollTop","loadMoreCooldown","loadMoreTimer","ReturnType","setTimeout","pendingItemChanges","flushItemHeights","applyItemHeightChanges","snapshot","prev","hasChange","idx","h","cancelFlushItemHeights","cancel","itemRO","ResizeObserver","entries","entry","target","parseInt","dataset","mansoryIdx","contentBoxSize","blockSize","contentRect","disconnectItemResizeObserver","disconnect","applyContainerWidth","applyContainerWidthChange","containerRO","inlineSize","observe","disconnectContainerResizeObserver","itemElMap","registerItem","unobserve","len","prevLen","slice","checkLoadMore","currentScrollTop","onLoadMore","scrollHeight","clientHeight","clearTimeout","clearLoadMoreTimer","cancelPendingRaf","cancelAnimationFrame","handleScroll","requestAnimationFrame","allIndices","renderedIndices","viewportHeight","overscanPx","visBottom","start","indices","renderedKeys","getItemKey","activeKeys","Set","add","k","_el$2","_tmpl$3","_el$3","firstChild","_$addEventListener","_ref$","_ref$2","_$createComponent","each","when","_tmpl$2","_v$4","class","_v$5","_$setStyleProperty"],"sources":["../../../src/components/mansory/mansory.tsx"],"sourcesContent":["import {\n Accessor,\n Component,\n createEffect,\n createMemo,\n createRoot,\n createSignal,\n For,\n mergeProps,\n on,\n onCleanup,\n onMount,\n Show,\n untrack,\n} from 'solid-js';\nimport { cn } from '@utils/cn';\nimport { createThrottle } from '@utils/helper';\nimport type {\n MansoryBreakpoint,\n MansoryItemLayout,\n MansoryProps,\n MansoryResponsive,\n MansoryVirtualOptions,\n} from './mansory.types';\n\nconst BREAKPOINTS: Record<Exclude<MansoryBreakpoint, 'default'>, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\nconst BP_KEYS = ['sm', 'md', 'lg', 'xl', '2xl'] as const;\n\nconst DEFAULT_COLUMNS: MansoryResponsive<number> = {\n default: 1,\n sm: 2,\n md: 3,\n lg: 4,\n};\n\nconst DEFAULT_GAP = 'gap-4';\n\nconst GAP_CACHE_MAX = 50;\nconst gapCache = new Map<string, number>();\n\nfunction resolveResponsive<T>(config: T | MansoryResponsive<T>, containerWidth: number): T {\n if (typeof config !== 'object' || config === null || Array.isArray(config)) {\n return config as T;\n }\n\n const map = config as MansoryResponsive<T>;\n\n for (let i = BP_KEYS.length - 1; i >= 0; i--) {\n const key = BP_KEYS[i];\n if (containerWidth >= BREAKPOINTS[key] && map[key] !== undefined) {\n return map[key] as T;\n }\n }\n\n return (map.default ?? (typeof config === 'object' ? undefined : config)) as T;\n}\n\nfunction measureGapPx(gapClass: string, container: HTMLElement): number {\n const probe = document.createElement('div');\n probe.className = `ma06 ${gapClass}`;\n probe.style.display = 'grid';\n probe.style.gridTemplateColumns = '1fr 1fr';\n\n probe.appendChild(document.createElement('div'));\n probe.appendChild(document.createElement('div'));\n container.appendChild(probe);\n const computed = getComputedStyle(probe);\n const gap = parseFloat(computed.columnGap || computed.gap || '0');\n container.removeChild(probe);\n return gap;\n}\n\nfunction measureGapPxCached(gapClass: string, container: HTMLElement): number {\n if (gapCache.has(gapClass)) return gapCache.get(gapClass)!;\n const value = measureGapPx(gapClass, container);\n\n if (gapCache.size >= GAP_CACHE_MAX) {\n const firstKey = gapCache.keys().next().value;\n if (firstKey !== undefined) gapCache.delete(firstKey);\n }\n gapCache.set(gapClass, value);\n return value;\n}\n\nfunction computeLayout(\n itemHeights: number[],\n columns: number,\n containerWidth: number,\n gapPx: number,\n): { layouts: MansoryItemLayout[]; totalHeight: number; sortedByTop: MansoryItemLayout[] } {\n const cols = Math.max(1, columns);\n const totalGap = gapPx * (cols - 1);\n const colWidth = (containerWidth - totalGap) / cols;\n\n const colHeights = new Array<number>(cols).fill(0);\n const layouts: MansoryItemLayout[] = [];\n\n const sortedByTop: MansoryItemLayout[] = [];\n\n for (let i = 0; i < itemHeights.length; i++) {\n let minCol = 0;\n for (let c = 1; c < cols; c++) {\n if (colHeights[c] < colHeights[minCol]) minCol = c;\n }\n\n const left = minCol * (colWidth + gapPx);\n const top = colHeights[minCol];\n const height = itemHeights[i] ?? 0;\n\n const item: MansoryItemLayout = { index: i, top, left, width: colWidth, height };\n layouts.push(item);\n\n let j = sortedByTop.length - 1;\n while (j >= 0 && sortedByTop[j].top > top) j--;\n sortedByTop.splice(j + 1, 0, item);\n\n colHeights[minCol] = top + height + gapPx;\n }\n\n let maxH = 0;\n for (let i = 0; i < colHeights.length; i++) {\n if (colHeights[i] > maxH) maxH = colHeights[i];\n }\n\n return { layouts, totalHeight: maxH > 0 ? maxH - gapPx : 0, sortedByTop };\n}\n\nfunction findFirstVisible(sorted: MansoryItemLayout[], visTop: number): number {\n let lo = 0,\n hi = sorted.length;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (sorted[mid].top + sorted[mid].height < visTop) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n}\n\ninterface MansoryItemProps {\n index: number;\n getLayoutAccessor: (index: number) => Accessor<MansoryItemLayout | undefined>;\n items: unknown[];\n itemClass?: string;\n children: MansoryProps['children'];\n onRegister: (index: number, el: HTMLDivElement) => void;\n onUnregister: (index: number) => void;\n}\n\nconst MansoryItem: Component<MansoryItemProps> = props => {\n const itemLayout = props.getLayoutAccessor(props.index);\n\n const styles = createMemo(() => {\n const l = itemLayout();\n if (!l) return { wrapper: {} as Record<string, string>, child: {} as Record<string, string> };\n const widthPx = `${l.width}px`;\n return {\n wrapper: { width: widthPx, transform: `translate3d(${l.left}px, ${l.top}px, 0)` },\n child: { width: widthPx },\n };\n });\n\n return (\n <div\n ref={el => {\n props.onRegister(props.index, el);\n onCleanup(function unregisterItem() {\n props.onUnregister(props.index);\n });\n }}\n data-mansory-idx={props.index}\n class={cn('ma03 ma04', props.itemClass)}\n style={styles().wrapper}\n >\n {props.children(props.items[props.index], () => props.index, styles().child)}\n </div>\n );\n};\n\nexport const Mansory: Component<MansoryProps> = rawProps => {\n const props = mergeProps(\n {\n columns: DEFAULT_COLUMNS,\n gap: DEFAULT_GAP,\n virtual: false as boolean | MansoryVirtualOptions,\n estimateItemHeight: 200,\n loadMoreThreshold: 200,\n },\n rawProps,\n );\n\n let containerEl!: HTMLDivElement;\n let innerEl!: HTMLDivElement;\n\n const [containerWidth, setContainerWidth] = createSignal(0);\n const [itemHeights, setItemHeights] = createSignal<number[]>([]);\n\n const currentColumns = createMemo(() => {\n const resolved = resolveResponsive<number>(props.columns as number, containerWidth());\n return Math.max(1, resolved ?? 1);\n });\n\n const currentGapClass = createMemo(() => {\n const resolved = resolveResponsive<string>(props.gap as string, containerWidth());\n return resolved ?? 'gap-4';\n });\n\n const [gapPx, setGapPx] = createSignal(16);\n\n createEffect(function trackGapClass() {\n const _ = currentGapClass();\n if (containerEl) {\n setGapPx(measureGapPxCached(currentGapClass(), containerEl));\n }\n });\n\n const layout = createMemo(() =>\n computeLayout(itemHeights(), currentColumns(), containerWidth(), gapPx()),\n );\n\n const totalHeight = createMemo(() => layout().totalHeight);\n\n const layoutAccessors = new Map<number, Accessor<MansoryItemLayout | undefined>>();\n const layoutSetters = new Map<number, (v: MansoryItemLayout | undefined) => void>();\n const layoutDisposers = new Map<number, () => void>();\n\n function getOrCreateLayoutAccessor(index: number): Accessor<MansoryItemLayout | undefined> {\n if (!layoutAccessors.has(index)) {\n\n createRoot(function layoutSignalRoot(dispose) {\n layoutDisposers.set(index, dispose);\n const initialValue = untrack(() => layout().layouts[index]);\n const [get, set] = createSignal<MansoryItemLayout | undefined>(initialValue, {\n equals: (a, b) => {\n if (a === b) return true;\n if (!a || !b) return false;\n return (\n a.top === b.top && a.left === b.left && a.width === b.width && a.height === b.height\n );\n },\n });\n layoutAccessors.set(index, get);\n layoutSetters.set(index, set);\n });\n }\n return layoutAccessors.get(index)!;\n }\n\n function disposeLayoutSignal(index: number) {\n layoutDisposers.get(index)?.();\n layoutDisposers.delete(index);\n layoutAccessors.delete(index);\n layoutSetters.delete(index);\n }\n\n onCleanup(function disposeAllLayoutSignals() {\n for (const dispose of layoutDisposers.values()) dispose();\n layoutDisposers.clear();\n layoutAccessors.clear();\n layoutSetters.clear();\n keyEntryCache.clear();\n });\n\n createEffect(function syncLayoutSetters() {\n const newLayouts = layout().layouts;\n\n for (const [index, setter] of layoutSetters) {\n setter(newLayouts[index]);\n }\n });\n\n const virtualOpts = createMemo<MansoryVirtualOptions | null>(() => {\n const v = props.virtual;\n if (!v) return null;\n if (v === true) return { overscan: 5 };\n return { overscan: v.overscan ?? 5 };\n });\n\n const isVirtual = createMemo(() => virtualOpts() !== null);\n\n const [scrollTop, setScrollTop] = createSignal(0);\n\n let rafId: number | null = null;\n let pendingScrollTop = 0;\n\n let loadMoreCooldown = false;\n let loadMoreTimer: ReturnType<typeof setTimeout> | null = null;\n\n const pendingItemChanges = new Map<number, number>();\n\n const flushItemHeights = createThrottle(function applyItemHeightChanges() {\n if (pendingItemChanges.size === 0) return;\n const snapshot = new Map(pendingItemChanges);\n pendingItemChanges.clear();\n\n setItemHeights(prev => {\n let hasChange = false;\n for (const [idx, h] of snapshot) {\n if (prev[idx] !== h) {\n hasChange = true;\n break;\n }\n }\n if (!hasChange) return prev;\n\n const next = [...prev];\n for (const [idx, h] of snapshot) next[idx] = h;\n return next;\n });\n }, 100);\n\n onCleanup(function cancelFlushItemHeights() {\n flushItemHeights.cancel();\n });\n\n const itemRO = new ResizeObserver(entries => {\n for (const entry of entries) {\n const el = entry.target as HTMLDivElement;\n const idx = parseInt(el.dataset.mansoryIdx ?? '-1', 10);\n if (idx < 0) continue;\n\n const h = entry.contentBoxSize?.[0]?.blockSize ?? entry.contentRect.height;\n pendingItemChanges.set(idx, h);\n }\n\n flushItemHeights();\n });\n\n onCleanup(function disconnectItemResizeObserver() {\n itemRO.disconnect();\n });\n\n onMount(() => {\n const applyContainerWidth = createThrottle(function applyContainerWidthChange(width: number) {\n setContainerWidth(width);\n }, 100);\n\n const containerRO = new ResizeObserver(entries => {\n for (const entry of entries) {\n const width = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;\n applyContainerWidth(width);\n }\n });\n containerRO.observe(containerEl);\n onCleanup(function disconnectContainerResizeObserver() {\n applyContainerWidth.cancel();\n containerRO.disconnect();\n });\n });\n\n const itemElMap = new Map<number, HTMLDivElement>();\n\n function registerItem(index: number, el: HTMLDivElement) {\n itemElMap.set(index, el);\n itemRO.observe(el);\n }\n\n function unregisterItem(index: number) {\n const el = itemElMap.get(index);\n if (el) {\n itemRO.unobserve(el);\n itemElMap.delete(index);\n }\n }\n\n createEffect(\n on(\n () => props.items.length,\n len => {\n setItemHeights(prev => {\n const prevLen = prev.length;\n if (prevLen === len) return prev;\n\n if (len > prevLen) {\n const next = [...prev];\n for (let i = prevLen; i < len; i++) next.push(props.estimateItemHeight);\n return next;\n }\n\n for (let i = len; i < prevLen; i++) {\n disposeLayoutSignal(i);\n }\n return prev.slice(0, len);\n });\n },\n ),\n );\n\n function checkLoadMore(currentScrollTop: number) {\n if (!props.onLoadMore || loadMoreCooldown) return;\n const { scrollHeight, clientHeight } = containerEl;\n if (currentScrollTop + clientHeight >= scrollHeight - props.loadMoreThreshold) {\n loadMoreCooldown = true;\n\n if (loadMoreTimer) clearTimeout(loadMoreTimer);\n loadMoreTimer = setTimeout(() => {\n loadMoreCooldown = false;\n loadMoreTimer = null;\n }, 10_000);\n props.onLoadMore();\n }\n }\n\n createEffect(\n on(\n () => props.items.length,\n () => {\n if (loadMoreTimer) {\n clearTimeout(loadMoreTimer);\n loadMoreTimer = null;\n }\n loadMoreCooldown = false;\n },\n ),\n );\n\n onCleanup(function clearLoadMoreTimer() {\n if (loadMoreTimer) clearTimeout(loadMoreTimer);\n });\n\n onCleanup(function cancelPendingRaf() {\n if (rafId !== null) cancelAnimationFrame(rafId);\n });\n\n function handleScroll() {\n pendingScrollTop = containerEl.scrollTop;\n\n if (rafId === null) {\n rafId = requestAnimationFrame(() => {\n rafId = null;\n setScrollTop(pendingScrollTop);\n checkLoadMore(pendingScrollTop);\n });\n }\n }\n\n const allIndices = createMemo<number[]>((prev = []) => {\n const len = props.items.length;\n if (len === prev.length) return prev;\n if (len > prev.length) {\n const next = [...prev];\n for (let i = prev.length; i < len; i++) next.push(i);\n return next;\n }\n return prev.slice(0, len);\n });\n\n const renderedIndices = createMemo(() => {\n if (!isVirtual()) {\n return allIndices();\n }\n\n if (containerWidth() === 0) return [];\n\n const currentScrollTop = scrollTop();\n const viewportHeight = containerEl.clientHeight;\n const overscan = virtualOpts()?.overscan ?? 5;\n const overscanPx = overscan * props.estimateItemHeight;\n const visTop = currentScrollTop - overscanPx;\n const visBottom = currentScrollTop + viewportHeight + overscanPx;\n\n const sorted = layout().sortedByTop;\n const start = findFirstVisible(sorted, visTop);\n const indices: number[] = [];\n for (let i = start; i < sorted.length; i++) {\n if (sorted[i].top > visBottom) break;\n indices.push(sorted[i].index);\n }\n return indices;\n });\n\n const keyEntryCache = new Map<string | number, { key: string | number; index: number }>();\n\n const renderedKeys = createMemo(() => {\n const indices = renderedIndices();\n if (!props.getItemKey) return indices;\n\n const activeKeys = new Set<string | number>();\n\n const entries = indices.map(i => {\n const key = props.getItemKey!(props.items[i], i);\n activeKeys.add(key);\n\n let entry = keyEntryCache.get(key);\n if (!entry) {\n entry = { key, index: i };\n keyEntryCache.set(key, entry);\n } else {\n\n entry.index = i;\n }\n return entry;\n });\n\n for (const k of keyEntryCache.keys()) {\n if (!activeKeys.has(k)) keyEntryCache.delete(k);\n }\n\n return entries;\n });\n\n return (\n <div\n ref={containerEl}\n class={cn('ma01', isVirtual() && 'ma05', props.class)}\n onScroll={isVirtual() || props.onLoadMore ? handleScroll : undefined}\n >\n <div ref={innerEl} class=\"ma02\" style={{ height: `${totalHeight()}px` }}>\n <For each={renderedKeys()}>\n {entry => {\n const index = typeof entry === 'number' ? entry : entry.index;\n return (\n <MansoryItem\n index={index}\n getLayoutAccessor={getOrCreateLayoutAccessor}\n items={props.items}\n itemClass={props.itemClass}\n onRegister={registerItem}\n onUnregister={unregisterItem}\n >\n {props.children}\n </MansoryItem>\n );\n }}\n </For>\n </div>\n\n <Show when={props.items.length === 0}>\n <div class=\"ma08\">No items</div>\n </Show>\n </div>\n );\n};"],"mappings":"khBAyBMoB,EAAqE,CACzEG,GAAI,IACJC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJ,MAAO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AAG,EAAA2G,EAAAlH,EAAAI,EAAAyH,EAAA,CAAAE,IAAA/H,EAAAM,GAAA0H,EAAAZ,EAAA,SAAApH,EAAAM,EAAAyH,EAAA,CAAA/H,GAAA,CAAAI,EAAAzF,IAAAA,GAAA2F,EAAA3F,IAAAA,GAAA,CAAA,CAAAuM,KAAA"}
@@ -1,2 +1,2 @@
1
- import{cn as e}from"../../utils/cn.js";import{getColor as t}from"../../utils/helper.js";import{Button as n}from"../button/button.js";import{className as r,createComponent as i,delegateEvents as a,effect as o,insert as s,memo as c,mergeProps as l,setAttribute as u,spread as d,template as f,use as p}from"solid-js/web";import{cva as m}from"class-variance-authority";import{For as h,Show as g,createEffect as _,createMemo as v,createSignal as y,createUniqueId as b,mergeProps as x,on as S,onCleanup as C,onMount as w}from"solid-js";import T from"lucide-solid/icons/refresh-cw";var E=f(`<span class="loading loading-spinner loading-xs">`),D=f(`<li><details><summary></summary><ul>`),O=f(`<li tabindex=0><div>`),k=f(`<li><h4 class=menu-title></h4><ul>`),A=f(`<div><span class="loading loading-spinner loading-md m-auto">`),j=f(`<ul>`),M=f(`<div class="text-base-content/50 flex flex-col items-center justify-center gap-2 p-4 text-center text-sm italic"><span>No menu items available.`),N=m(`menu`,{variants:{size:{xs:`menu-xs`,sm:`menu-sm`,md:`menu-md`,lg:`menu-lg`,xl:`menu-xl`},direction:{vertical:`menu-vertical`,horizontal:`menu-horizontal`}}}),P=class{parentMap=new Map;register(e,t){this.parentMap.set(e,t)}getPath(e){let t=[],n=e;for(;n!=null;)t.unshift(n),n=this.parentMap.get(n);return t}has(e){return this.parentMap.has(e)}clear(){this.parentMap.clear()}},F=class{refreshFns=new Map;register(e,t){this.refreshFns.set(e,t)}unregister(e){this.refreshFns.delete(e)}refresh(e){let t=this.refreshFns.get(e);t&&t()}refreshAll(){this.refreshFns.forEach(e=>e())}has(e){return this.refreshFns.has(e)}clear(){this.refreshFns.clear()}},I=e=>{let[t,n]=y(null),r=async(r=!1)=>{if(!e.isLoading()&&!(t()!==null&&!r)&&e.item.lazyItems){e.setIsLoading(!0);try{n(await e.item.lazyItems())}catch(t){e.onLoadError(t)}finally{e.setIsLoading(!1)}}},a=()=>{r(!0)};return w(()=>{e.onRegisterRefresh(a)}),_(S(()=>e.shouldLoad(),e=>{e&&t()===null&&r()},{defer:!0})),i(g,{get when(){return t()},get children(){return i(h,{get each(){return t()},children:t=>e.renderItems(t,e.parentId)})}})},L=`_6ca32a`,R=a=>{a=x({size:`md`,direction:`vertical`,color:`secondary`,highlightActive:!0},a);let f,m=new P,w=new F;function R(e){if(!f||!a.highlightActive)return;let t=m.getPath(e);if(t.length===0)return;let n=Array.from(f.getElementsByClassName(L));for(let e of n)e.classList.remove(L);for(let e of t)document.getElementById(e)?.classList?.add(L)}function z(e){let t=m.getPath(e);for(let e of t){let t=document.getElementById(e);if(!t)continue;let n=t.querySelector(`:scope > details`);n&&!n.open&&(n.open=!0)}}function B(e){if(!m.has(e)){console.warn(`Menu.focusById: Node with id "${e}" not found in registry`);return}z(e),R(e)}function V(e){let t=document.getElementById(e);if(!t){console.warn(`Menu.collapseById: Element with id "${e}" not found`);return}let n=t.querySelector(`:scope > details`);if(n){n.open=!1;let e=n.getElementsByClassName(L);for(let t of e)t.classList.remove(L);t.classList.remove(L)}}function H(e){if(!w.has(e)){console.warn(`Menu.refreshById: Lazy folder with id "${e}" not found`);return}w.refresh(e)}function U(){w.refreshAll()}function W(){f&&f.querySelectorAll(`details`).forEach(e=>e.open=!1)}function G(){f&&f.querySelectorAll(`details`).forEach(e=>e.open=!0)}function ee(e){f&&f.querySelectorAll(`:scope > li.folder > details`).forEach(t=>{let n=t.parentElement;n&&n.id!==e&&t.open&&(t.open=!1)})}function K(t,n=null){let c=t.id??b();if(m.register(c,n),t.type===`folder`){let l=x({defaultExpanded:t.defaultExpanded??a.defaultExpanded??!1},t,{id:c}),d=l.lazyItems!==void 0,[f,_]=y(l.defaultExpanded),[v,b]=y(!1),S,C=e=>{let t=e.currentTarget.open;if(v()){e.preventDefault();return}d&&_(t)},T=e=>{if(S&&(S.open=!1),_(!1),a.onError){let t={source:`folder`,itemId:c,path:m.getPath(c),error:e,message:e instanceof Error?e.message:`Failed to load folder items`};a.onError(t)}},O=e=>{if(e.stopPropagation(),v()||t.disabled){e.preventDefault();return}let r=!(S?.open??l.defaultExpanded);if(a.direction===`horizontal`&&n===null&&r&&ee(c),S?.open===!1?R(c):setTimeout(()=>{V(c)}),a.onItemClick){let e=r,n={id:c,path:m.getPath(c),type:`folder`,isExpanded:e,data:t.data};a.onItemClick(n)}};return(()=>{var t=D(),n=t.firstChild,m=n.firstChild,_=m.nextSibling;u(t,`id`,c),n.addEventListener(`toggle`,C);var y=S;return typeof y==`function`?p(y,n):S=n,m.$$click=O,s(m,()=>l.content,null),s(m,i(g,{get when(){return v()},get children(){return E()}}),null),s(_,i(g,{when:d,get fallback(){return i(h,{get each(){return l.items},children:e=>K(e,c)})},get children(){return i(I,{renderItems:K,shouldLoad:f,isLoading:v,setIsLoading:b,item:l,parentId:c,onLoadError:T,onRegisterRefresh:e=>w.register(c,e)})}})),o(i=>{var o=e(`folder`,(l.disabled||v())&&`menu-disabled`,a.class?.itemWrap),s=l.defaultExpanded,c=e(v()&&`after:hidden`,a.class?.itemHeader);return o!==i.e&&r(t,i.e=o),s!==i.t&&(n.open=i.t=s),c!==i.a&&r(m,i.a=c),i},{e:void 0,t:void 0,a:void 0}),t})()}if(t.type===`file`){let n=e=>{if(e.stopPropagation(),R(c),a.onItemClick){let e={id:c,path:m.getPath(c),type:`file`,...t.data&&{data:t.data}};a.onItemClick(e)}};return(()=>{var i=O(),l=i.firstChild;return i.$$click=n,u(i,`id`,c),s(l,()=>t.content),o(()=>r(i,e(`file`,t.disabled&&`menu-disabled`,a.class?.itemWrap))),i})()}if(t.type===`title`){let n=e=>{e.stopPropagation();let n=document.getElementById(c);if(n&&n.classList.contains(L)){let e=n.getElementsByClassName(L);for(let t of e)t.classList.remove(L);n.classList.remove(L)}else R(c);if(a.onItemClick){let e={id:c,path:m.getPath(c),type:`title`,...t.data&&{data:t.data}};a.onItemClick(e)}};return(()=>{var l=k(),d=l.firstChild,f=d.nextSibling;return u(l,`id`,c),d.$$click=n,s(d,()=>t.content),s(f,i(h,{get each(){return t.items},children:e=>K(e,c)})),o(()=>r(l,e(`title`,t.disabled&&`menu-disabled`,a.class?.itemWrap))),l})()}}let q=a.lazyItems!==void 0,[J,Y]=y(q?null:a.items??[]),[X,Z]=y(!1);_(S(()=>a.items,e=>{!q&&e&&(m.clear(),w.clear(),Y(e))},{defer:!0})),C(function(){m.clear(),w.clear()});let Q=async()=>{if(!(!a.lazyItems||J()!==null||X())){Z(!0);try{Y(await a.lazyItems())}catch(e){if(a.onError){let t={source:`root`,error:e,message:e instanceof Error?e.message:`Failed to load menu items`};a.onError(t)}}finally{Z(!1)}}};q&&Q();let $=v(()=>e(N({size:a.size,direction:a.direction}),t(a.color),a.class?.root));return a.setMenuFunction&&a.setMenuFunction({focusById:B,collapseById:V,refreshById:H,refreshAll:U,collapseAll:W,expandedAll:G}),[i(g,{get when(){return X()},get children(){var t=A();return o(()=>r(t,e($(),`flex size-full justify-center p-4`))),t}}),i(g,{get when(){return!X()},get children(){return i(g,{get when(){return c(()=>!!J())()&&J().length>0},get fallback(){return(()=>{var e=M();return e.firstChild,s(e,i(n,{get icon(){return i(T,{size:10})},variant:`default`,size:`4xs`,class:`w-fit px-1.5`,onClick:Q,children:`Try again`}),null),e})()},get children(){var e=j();return p(e=>f=e,e),d(e,l({get class(){return $()}},()=>a.id&&{id:a.id}),!1,!0),s(e,i(h,{get each(){return J()},children:e=>K(e)})),e}})}})]};a([`click`]);export{R as Menu};
1
+ import{cn as e}from"../../utils/cn.js";import{Button as t}from"../button/button.js";import{getColor as n}from"../../utils/helper.js";import{refresh_cw_default as r}from"../../node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/refresh-cw.js";import{className as i,createComponent as a,delegateEvents as o,effect as s,insert as c,memo as l,mergeProps as u,setAttribute as d,spread as f,template as p,use as m}from"solid-js/web";import{cva as h}from"class-variance-authority";import{For as g,Show as _,createEffect as v,createMemo as y,createSignal as b,createUniqueId as x,mergeProps as S,on as C,onCleanup as w,onMount as T}from"solid-js";var E=p(`<span class="loading loading-spinner loading-xs">`),ee=p(`<li><details><summary></summary><ul>`),D=p(`<li tabindex=0><div>`),O=p(`<li><h4 class=menu-title></h4><ul>`),k=p(`<div><span class="loading loading-spinner loading-md m-auto">`),A=p(`<ul>`),j=p(`<div class="text-base-content/50 flex flex-col items-center justify-center gap-2 p-4 text-center text-sm italic"><span>No menu items available.`),M=h(`menu`,{variants:{size:{xs:`menu-xs`,sm:`menu-sm`,md:`menu-md`,lg:`menu-lg`,xl:`menu-xl`},direction:{vertical:`menu-vertical`,horizontal:`menu-horizontal`}}}),N=class{parentMap=new Map;register(e,t){this.parentMap.set(e,t)}getPath(e){let t=[],n=e;for(;n!=null;)t.unshift(n),n=this.parentMap.get(n);return t}has(e){return this.parentMap.has(e)}clear(){this.parentMap.clear()}},P=class{refreshFns=new Map;register(e,t){this.refreshFns.set(e,t)}unregister(e){this.refreshFns.delete(e)}refresh(e){let t=this.refreshFns.get(e);t&&t()}refreshAll(){this.refreshFns.forEach(e=>e())}has(e){return this.refreshFns.has(e)}clear(){this.refreshFns.clear()}},F=e=>{let[t,n]=b(null),r=async(r=!1)=>{if(!e.isLoading()&&!(t()!==null&&!r)&&e.item.lazyItems){e.setIsLoading(!0);try{n(await e.item.lazyItems())}catch(t){e.onLoadError(t)}finally{e.setIsLoading(!1)}}},i=()=>{r(!0)};return T(()=>{e.onRegisterRefresh(i)}),v(C(()=>e.shouldLoad(),e=>{e&&t()===null&&r()},{defer:!0})),a(_,{get when(){return t()},get children(){return a(g,{get each(){return t()},children:t=>e.renderItems(t,e.parentId)})}})},I=`_6ca32a`,L=o=>{o=S({size:`md`,direction:`vertical`,color:`secondary`,highlightActive:!0},o);let p,h=new N,T=new P;function L(e){if(!p||!o.highlightActive)return;let t=h.getPath(e);if(t.length===0)return;let n=Array.from(p.getElementsByClassName(I));for(let e of n)e.classList.remove(I);for(let e of t)document.getElementById(e)?.classList?.add(I)}function R(e){let t=h.getPath(e);for(let e of t){let t=document.getElementById(e);if(!t)continue;let n=t.querySelector(`:scope > details`);n&&!n.open&&(n.open=!0)}}function z(e){if(!h.has(e)){console.warn(`Menu.focusById: Node with id "${e}" not found in registry`);return}R(e),L(e)}function B(e){let t=document.getElementById(e);if(!t){console.warn(`Menu.collapseById: Element with id "${e}" not found`);return}let n=t.querySelector(`:scope > details`);if(n){n.open=!1;let e=n.getElementsByClassName(I);for(let t of e)t.classList.remove(I);t.classList.remove(I)}}function V(e){if(!T.has(e)){console.warn(`Menu.refreshById: Lazy folder with id "${e}" not found`);return}T.refresh(e)}function H(){T.refreshAll()}function U(){p&&p.querySelectorAll(`details`).forEach(e=>e.open=!1)}function W(){p&&p.querySelectorAll(`details`).forEach(e=>e.open=!0)}function G(e){p&&p.querySelectorAll(`:scope > li.folder > details`).forEach(t=>{let n=t.parentElement;n&&n.id!==e&&t.open&&(t.open=!1)})}function K(t,n=null){let r=t.id??x();if(h.register(r,n),t.type===`folder`){let l=S({defaultExpanded:t.defaultExpanded??o.defaultExpanded??!1},t,{id:r}),u=l.lazyItems!==void 0,[f,p]=b(l.defaultExpanded),[v,y]=b(!1),x,C=e=>{let t=e.currentTarget.open;if(v()){e.preventDefault();return}u&&p(t)},w=e=>{if(x&&(x.open=!1),p(!1),o.onError){let t={source:`folder`,itemId:r,path:h.getPath(r),error:e,message:e instanceof Error?e.message:`Failed to load folder items`};o.onError(t)}},D=e=>{if(e.stopPropagation(),v()||t.disabled){e.preventDefault();return}let i=!(x?.open??l.defaultExpanded);if(o.direction===`horizontal`&&n===null&&i&&G(r),x?.open===!1?L(r):setTimeout(()=>{B(r)}),o.onItemClick){let e=i,n={id:r,path:h.getPath(r),type:`folder`,isExpanded:e,data:t.data};o.onItemClick(n)}};return(()=>{var t=ee(),n=t.firstChild,p=n.firstChild,h=p.nextSibling;d(t,`id`,r),n.addEventListener(`toggle`,C);var b=x;return typeof b==`function`?m(b,n):x=n,p.$$click=D,c(p,()=>l.content,null),c(p,a(_,{get when(){return v()},get children(){return E()}}),null),c(h,a(_,{when:u,get fallback(){return a(g,{get each(){return l.items},children:e=>K(e,r)})},get children(){return a(F,{renderItems:K,shouldLoad:f,isLoading:v,setIsLoading:y,item:l,parentId:r,onLoadError:w,onRegisterRefresh:e=>T.register(r,e)})}})),s(r=>{var a=e(`folder`,(l.disabled||v())&&`menu-disabled`,o.class?.itemWrap),s=l.defaultExpanded,c=e(v()&&`after:hidden`,o.class?.itemHeader);return a!==r.e&&i(t,r.e=a),s!==r.t&&(n.open=r.t=s),c!==r.a&&i(p,r.a=c),r},{e:void 0,t:void 0,a:void 0}),t})()}if(t.type===`file`){let n=e=>{if(e.stopPropagation(),L(r),o.onItemClick){let e={id:r,path:h.getPath(r),type:`file`,...t.data&&{data:t.data}};o.onItemClick(e)}};return(()=>{var a=D(),l=a.firstChild;return a.$$click=n,d(a,`id`,r),c(l,()=>t.content),s(()=>i(a,e(`file`,t.disabled&&`menu-disabled`,o.class?.itemWrap))),a})()}if(t.type===`title`){let n=e=>{e.stopPropagation();let n=document.getElementById(r);if(n&&n.classList.contains(I)){let e=n.getElementsByClassName(I);for(let t of e)t.classList.remove(I);n.classList.remove(I)}else L(r);if(o.onItemClick){let e={id:r,path:h.getPath(r),type:`title`,...t.data&&{data:t.data}};o.onItemClick(e)}};return(()=>{var l=O(),u=l.firstChild,f=u.nextSibling;return d(l,`id`,r),u.$$click=n,c(u,()=>t.content),c(f,a(g,{get each(){return t.items},children:e=>K(e,r)})),s(()=>i(l,e(`title`,t.disabled&&`menu-disabled`,o.class?.itemWrap))),l})()}}let q=o.lazyItems!==void 0,[J,Y]=b(q?null:o.items??[]),[X,Z]=b(!1);v(C(()=>o.items,e=>{!q&&e&&(h.clear(),T.clear(),Y(e))},{defer:!0})),w(function(){h.clear(),T.clear()});let Q=async()=>{if(!(!o.lazyItems||J()!==null||X())){Z(!0);try{Y(await o.lazyItems())}catch(e){if(o.onError){let t={source:`root`,error:e,message:e instanceof Error?e.message:`Failed to load menu items`};o.onError(t)}}finally{Z(!1)}}};q&&Q();let $=y(()=>e(M({size:o.size,direction:o.direction}),n(o.color),o.class?.root));return o.setMenuFunction&&o.setMenuFunction({focusById:z,collapseById:B,refreshById:V,refreshAll:H,collapseAll:U,expandedAll:W}),[a(_,{get when(){return X()},get children(){var t=k();return s(()=>i(t,e($(),`flex size-full justify-center p-4`))),t}}),a(_,{get when(){return!X()},get children(){return a(_,{get when(){return l(()=>!!J())()&&J().length>0},get fallback(){return(()=>{var e=j();return e.firstChild,c(e,a(t,{get icon(){return a(r,{size:10})},variant:`default`,size:`4xs`,class:`w-fit px-1.5`,onClick:Q,children:`Try again`}),null),e})()},get children(){var e=A();return m(e=>p=e,e),f(e,u({get class(){return $()}},()=>o.id&&{id:o.id}),!1,!0),c(e,a(g,{get each(){return J()},children:e=>K(e)})),e}})}})]};o([`click`]);export{L as Menu};
2
2
  //# sourceMappingURL=menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","names":["cn","getColor","cva","VariantProps","RefreshCw","Accessor","Component","createEffect","createMemo","createSignal","createUniqueId","For","JSXElement","mergeProps","on","onCleanup","onMount","Setter","Show","Button","FolderItem","ItemClickInfo","MenuErrorInfo","MenuItem","MenuProps","menuVariants","variants","size","xs","sm","md","lg","xl","direction","vertical","horizontal","MenuVariantsProps","NodeRegistry","parentMap","Map","register","id","parentId","set","getPath","path","currentId","unshift","get","has","clear","LazyFolderRegistry","refreshFns","refreshFn","unregister","delete","refresh","fn","refreshAll","forEach","LazyFolderContent","item","renderItems","shouldLoad","isLoading","setIsLoading","onLoadError","error","onRegisterRefresh","props","loadedItems","setLoadedItems","loadItems","force","lazyItems","items","e","defer","_$createComponent","when","children","each","subItem","ACTIVE_CLASSNAME","Menu","p","color","highlightActive","const","ulRootRef","HTMLUListElement","nodeRegistry","lazyFolderRegistry","addActiveClassForId","length","elements","Array","from","getElementsByClassName","el","classList","remove","nodeId","document","getElementById","add","expandPathToId","element","details","querySelector","HTMLDetailsElement","open","focusById","console","warn","collapseById","refreshById","collapseAll","detailsList","querySelectorAll","d","expandedAll","collapseOtherRootFolders","exceptId","rootFolders","li","parentElement","itemId","type","folderItem","defaultExpanded","isLazyFolder","undefined","setShouldLoad","detailsRef","handleToggle","Event","currentTarget","isExpanded","preventDefault","handleLoadError","onError","errorInfo","source","message","Error","handleFolderClick","MouseEvent","stopPropagation","disabled","currentIsExpanded","willExpand","setTimeout","onItemClick","info","data","_el$","_tmpl$2","_el$2","firstChild","_el$3","_el$5","nextSibling","_$setAttribute","addEventListener","_ref$","_$use","$$click","_$insert","content","Element","_tmpl$","fallback","_$effect","_p$","_v$","class","itemWrap","_v$2","_v$3","itemHeader","_$className","t","a","handleFileClick","_el$6","_tmpl$3","_el$7","handleTitleClick","contains","_el$8","_tmpl$4","_el$9","_el$0","isLazyRoot","rootItems","setRootItems","isRootLoading","setIsRootLoading","clearMenuRegistries","loadRootItems","menuClass","root","setMenuFunction","_el$1","_tmpl$5","_$memo","_el$11","_tmpl$7","_el$12","icon","variant","onClick","_el$10","_tmpl$6","ele","_$spread","_$mergeProps","_$delegateEvents"],"sources":["../../../src/components/menu/menu.tsx"],"sourcesContent":["import { cn } from '@/utils/cn';\r\nimport { getColor } from '@/utils/helper';\r\nimport { cva, type VariantProps } from 'class-variance-authority';\r\nimport RefreshCw from 'lucide-solid/icons/refresh-cw';\r\nimport {\r\n Accessor,\r\n Component,\r\n createEffect,\r\n createMemo,\r\n createSignal,\r\n createUniqueId,\r\n For,\r\n JSXElement,\r\n mergeProps,\r\n on,\r\n onCleanup,\r\n onMount,\r\n Setter,\r\n Show,\r\n} from 'solid-js';\r\nimport { Button } from '../button';\r\nimport type { FolderItem, ItemClickInfo, MenuErrorInfo, MenuItem, MenuProps } from './menu.types';\r\n\r\nconst menuVariants = cva('menu', {\r\n variants: {\r\n size: { xs: 'menu-xs', sm: 'menu-sm', md: 'menu-md', lg: 'menu-lg', xl: 'menu-xl' },\r\n direction: { vertical: 'menu-vertical', horizontal: 'menu-horizontal' },\r\n },\r\n});\r\n\r\nexport type MenuVariantsProps = VariantProps<typeof menuVariants>;\r\n\r\nclass NodeRegistry {\r\n private parentMap = new Map<string, string | null>();\r\n register(id: string, parentId: string | null) {\r\n this.parentMap.set(id, parentId);\r\n }\r\n getPath(id: string): string[] {\r\n const path: string[] = [];\r\n let currentId: string | null | undefined = id;\r\n while (currentId != null) {\r\n path.unshift(currentId);\r\n currentId = this.parentMap.get(currentId);\r\n }\r\n return path;\r\n }\r\n has(id: string): boolean {\r\n return this.parentMap.has(id);\r\n }\r\n clear() {\r\n this.parentMap.clear();\r\n }\r\n}\r\n\r\nclass LazyFolderRegistry {\r\n private refreshFns = new Map<string, () => void>();\r\n register(id: string, refreshFn: () => void) {\r\n this.refreshFns.set(id, refreshFn);\r\n }\r\n unregister(id: string) {\r\n this.refreshFns.delete(id);\r\n }\r\n refresh(id: string) {\r\n const fn = this.refreshFns.get(id);\r\n if (fn) fn();\r\n }\r\n refreshAll() {\r\n this.refreshFns.forEach(fn => fn());\r\n }\r\n has(id: string): boolean {\r\n return this.refreshFns.has(id);\r\n }\r\n clear() {\r\n this.refreshFns.clear();\r\n }\r\n}\r\n\r\nconst LazyFolderContent: Component<{\r\n item: FolderItem;\r\n renderItems: (item: MenuItem, parentId: string | null) => JSXElement;\r\n parentId: string | null;\r\n shouldLoad: Accessor<boolean>;\r\n isLoading: Accessor<boolean>;\r\n setIsLoading: Setter<boolean>;\r\n onLoadError: (error: unknown) => void;\r\n onRegisterRefresh: (refreshFn: () => void) => void;\r\n}> = props => {\r\n const [loadedItems, setLoadedItems] = createSignal<MenuItem[] | null>(null);\r\n const loadItems = async (force = false) => {\r\n if (props.isLoading()) return;\r\n if (loadedItems() !== null && !force) return;\r\n if (!props.item.lazyItems) return;\r\n props.setIsLoading(true);\r\n try {\r\n const items = await props.item.lazyItems();\r\n setLoadedItems(items);\r\n } catch (e) {\r\n props.onLoadError(e);\r\n } finally {\r\n props.setIsLoading(false);\r\n }\r\n };\r\n const refresh = () => {\r\n loadItems(true);\r\n };\r\n onMount(() => {\r\n props.onRegisterRefresh(refresh);\r\n });\r\n createEffect(\r\n on(\r\n () => props.shouldLoad(),\r\n shouldLoad => {\r\n if (shouldLoad && loadedItems() === null) {\r\n loadItems();\r\n }\r\n },\r\n { defer: true },\r\n ),\r\n );\r\n return (\r\n <Show when={loadedItems()}>\r\n <For each={loadedItems()!}>{subItem => props.renderItems(subItem, props.parentId)}</For>\r\n </Show>\r\n );\r\n};\r\n\r\nconst ACTIVE_CLASSNAME = '_6ca32a';\r\nexport const Menu: Component<MenuProps> = p => {\r\n p = mergeProps(\r\n { size: 'md', direction: 'vertical', color: 'secondary', highlightActive: true } as const,\r\n p,\r\n );\r\n let ulRootRef: HTMLUListElement;\r\n const nodeRegistry = new NodeRegistry();\r\n const lazyFolderRegistry = new LazyFolderRegistry();\r\n function addActiveClassForId(id: string) {\r\n if (!ulRootRef || !p.highlightActive) return;\r\n const path = nodeRegistry.getPath(id);\r\n if (path.length === 0) return;\r\n\r\n const elements = Array.from(ulRootRef.getElementsByClassName(ACTIVE_CLASSNAME));\r\n\r\n for (const el of elements) el.classList.remove(ACTIVE_CLASSNAME);\r\n for (const nodeId of path) document.getElementById(nodeId)?.classList?.add(ACTIVE_CLASSNAME);\r\n }\r\n function expandPathToId(id: string) {\r\n const path = nodeRegistry.getPath(id);\r\n for (const nodeId of path) {\r\n const element = document.getElementById(nodeId);\r\n if (!element) continue;\r\n const details = element.querySelector(':scope > details') as HTMLDetailsElement | null;\r\n if (details && !details.open) {\r\n details.open = true;\r\n }\r\n }\r\n }\r\n function focusById(id: string) {\r\n if (!nodeRegistry.has(id)) {\r\n console.warn(`Menu.focusById: Node with id \"${id}\" not found in registry`);\r\n return;\r\n }\r\n expandPathToId(id);\r\n addActiveClassForId(id);\r\n }\r\n function collapseById(id: string) {\r\n const element = document.getElementById(id);\r\n if (!element) {\r\n console.warn(`Menu.collapseById: Element with id \"${id}\" not found`);\r\n return;\r\n }\r\n const details = element.querySelector(':scope > details') as HTMLDetailsElement | null;\r\n if (details) {\r\n details.open = false;\r\n const elements = details.getElementsByClassName(ACTIVE_CLASSNAME);\r\n for (const el of elements) el.classList.remove(ACTIVE_CLASSNAME);\r\n element.classList.remove(ACTIVE_CLASSNAME);\r\n }\r\n }\r\n function refreshById(id: string) {\r\n if (!lazyFolderRegistry.has(id)) {\r\n console.warn(`Menu.refreshById: Lazy folder with id \"${id}\" not found`);\r\n return;\r\n }\r\n lazyFolderRegistry.refresh(id);\r\n }\r\n function refreshAll() {\r\n lazyFolderRegistry.refreshAll();\r\n }\r\n function collapseAll() {\r\n if (!ulRootRef) return;\r\n const detailsList = ulRootRef.querySelectorAll('details');\r\n detailsList.forEach(d => (d.open = false));\r\n }\r\n function expandedAll() {\r\n if (!ulRootRef) return;\r\n const detailsList = ulRootRef.querySelectorAll('details');\r\n detailsList.forEach(d => (d.open = true));\r\n }\r\n function collapseOtherRootFolders(exceptId: string) {\r\n if (!ulRootRef) return;\r\n // Only collapse direct children (level 1 folders)\r\n const rootFolders = ulRootRef.querySelectorAll(':scope > li.folder > details');\r\n rootFolders.forEach(details => {\r\n const li = details.parentElement;\r\n if (li && li.id !== exceptId && (details as HTMLDetailsElement).open) {\r\n (details as HTMLDetailsElement).open = false;\r\n }\r\n });\r\n }\r\n function renderItems(item: MenuItem, parentId: string | null = null) {\r\n const itemId = item.id ?? createUniqueId();\r\n nodeRegistry.register(itemId, parentId);\r\n\r\n if (item.type === 'folder') {\r\n const folderItem = mergeProps(\r\n { defaultExpanded: item.defaultExpanded ?? p.defaultExpanded ?? false },\r\n item,\r\n { id: itemId },\r\n );\r\n const isLazyFolder = folderItem.lazyItems !== undefined;\r\n const [shouldLoad, setShouldLoad] = createSignal(folderItem.defaultExpanded);\r\n const [isLoading, setIsLoading] = createSignal(false);\r\n let detailsRef: HTMLDetailsElement | undefined;\r\n\r\n const handleToggle = (e: Event) => {\r\n const details = e.currentTarget as HTMLDetailsElement;\r\n const isExpanded = details.open;\r\n if (isLoading()) {\r\n e.preventDefault();\r\n return;\r\n }\r\n if (isLazyFolder) {\r\n setShouldLoad(isExpanded);\r\n }\r\n };\r\n\r\n const handleLoadError = (error: unknown) => {\r\n if (detailsRef) {\r\n detailsRef.open = false;\r\n }\r\n setShouldLoad(false);\r\n if (p.onError) {\r\n const errorInfo: MenuErrorInfo = {\r\n source: 'folder',\r\n itemId,\r\n path: nodeRegistry.getPath(itemId),\r\n error,\r\n message: error instanceof Error ? error.message : 'Failed to load folder items',\r\n };\r\n p.onError(errorInfo);\r\n }\r\n };\r\n\r\n const handleFolderClick = (e: MouseEvent) => {\r\n e.stopPropagation();\r\n if (isLoading() || item.disabled) {\r\n e.preventDefault();\r\n return;\r\n }\r\n\r\n const currentIsExpanded = detailsRef?.open ?? folderItem.defaultExpanded;\r\n const willExpand = !currentIsExpanded;\r\n\r\n // In horizontal mode, collapse other root folders when expanding a root folder\r\n if (p.direction === 'horizontal' && parentId === null && willExpand) {\r\n collapseOtherRootFolders(itemId);\r\n }\r\n\r\n if (detailsRef?.open === false) {\r\n addActiveClassForId(itemId);\r\n } else {\r\n setTimeout(() => {\r\n collapseById(itemId);\r\n });\r\n }\r\n\r\n if (p.onItemClick) {\r\n const isExpanded = willExpand;\r\n const info: ItemClickInfo = {\r\n id: itemId,\r\n path: nodeRegistry.getPath(itemId),\r\n type: 'folder',\r\n isExpanded,\r\n data: item.data,\r\n };\r\n p.onItemClick(info);\r\n }\r\n };\r\n return (\r\n <li\r\n class={cn(\r\n 'folder',\r\n (folderItem.disabled || isLoading()) && 'menu-disabled',\r\n p.class?.itemWrap,\r\n )}\r\n id={itemId}\r\n >\r\n <details ref={detailsRef} open={folderItem.defaultExpanded} onToggle={handleToggle}>\r\n <summary\r\n class={cn(isLoading() && 'after:hidden', p.class?.itemHeader)}\r\n onClick={handleFolderClick}\r\n >\r\n {folderItem.content as Element}\r\n <Show when={isLoading()}>\r\n <span class=\"loading loading-spinner loading-xs\"></span>\r\n </Show>\r\n </summary>\r\n <ul>\r\n <Show\r\n when={isLazyFolder}\r\n fallback={\r\n <For each={(folderItem as { items: MenuItem[] }).items}>\r\n {subItem => renderItems(subItem, itemId)}\r\n </For>\r\n }\r\n >\r\n <LazyFolderContent\r\n {...{\r\n renderItems,\r\n shouldLoad,\r\n isLoading,\r\n setIsLoading,\r\n item: folderItem,\r\n parentId: itemId,\r\n onLoadError: handleLoadError,\r\n onRegisterRefresh: refreshFn => lazyFolderRegistry.register(itemId, refreshFn),\r\n }}\r\n />\r\n </Show>\r\n </ul>\r\n </details>\r\n </li>\r\n );\r\n }\r\n if (item.type === 'file') {\r\n const handleFileClick = (e: MouseEvent) => {\r\n e.stopPropagation();\r\n addActiveClassForId(itemId);\r\n\r\n if (p.onItemClick) {\r\n const info: ItemClickInfo = {\r\n id: itemId,\r\n path: nodeRegistry.getPath(itemId),\r\n type: 'file',\r\n ...(item.data && { data: item.data }),\r\n };\r\n p.onItemClick(info);\r\n }\r\n };\r\n return (\r\n <li\r\n class={cn('file', item.disabled && 'menu-disabled', p.class?.itemWrap)}\r\n id={itemId}\r\n tabindex=\"0\"\r\n onClick={handleFileClick}\r\n >\r\n <div>{item.content as Element}</div>\r\n </li>\r\n );\r\n }\r\n if (item.type === 'title') {\r\n const handleTitleClick = (e: MouseEvent) => {\r\n e.stopPropagation();\r\n\r\n const li = document.getElementById(itemId);\r\n if (li && li.classList.contains(ACTIVE_CLASSNAME)) {\r\n const elements = li.getElementsByClassName(ACTIVE_CLASSNAME);\r\n for (const el of elements) el.classList.remove(ACTIVE_CLASSNAME);\r\n li.classList.remove(ACTIVE_CLASSNAME);\r\n } else {\r\n addActiveClassForId(itemId);\r\n }\r\n\r\n if (p.onItemClick) {\r\n const info: ItemClickInfo = {\r\n id: itemId,\r\n path: nodeRegistry.getPath(itemId),\r\n type: 'title',\r\n ...(item.data && { data: item.data }),\r\n };\r\n p.onItemClick(info);\r\n }\r\n };\r\n return (\r\n <li class={cn('title', item.disabled && 'menu-disabled', p.class?.itemWrap)} id={itemId}>\r\n <h4 class=\"menu-title\" onClick={handleTitleClick}>\r\n {item.content as Element}\r\n </h4>\r\n <ul>\r\n <For each={item.items}>{subItem => renderItems(subItem, itemId)}</For>\r\n </ul>\r\n </li>\r\n );\r\n }\r\n }\r\n const isLazyRoot = p.lazyItems !== undefined;\r\n const [rootItems, setRootItems] = createSignal<MenuItem[] | null>(\r\n isLazyRoot ? null : (p.items ?? []),\r\n );\r\n const [isRootLoading, setIsRootLoading] = createSignal(false);\r\n\r\n createEffect(\r\n on(\r\n () => p.items,\r\n items => {\r\n if (!isLazyRoot && items) {\r\n nodeRegistry.clear();\r\n lazyFolderRegistry.clear();\r\n setRootItems(items);\r\n }\r\n },\r\n { defer: true },\r\n ),\r\n );\r\n\r\n onCleanup(function clearMenuRegistries() {\r\n nodeRegistry.clear();\r\n lazyFolderRegistry.clear();\r\n });\r\n\r\n const loadRootItems = async () => {\r\n if (!p.lazyItems || rootItems() !== null || isRootLoading()) return;\r\n setIsRootLoading(true);\r\n try {\r\n const items = await p.lazyItems();\r\n setRootItems(items);\r\n } catch (e) {\r\n if (p.onError) {\r\n const errorInfo: MenuErrorInfo = {\r\n source: 'root',\r\n error: e,\r\n message: e instanceof Error ? e.message : 'Failed to load menu items',\r\n };\r\n p.onError(errorInfo);\r\n }\r\n } finally {\r\n setIsRootLoading(false);\r\n }\r\n };\r\n if (isLazyRoot) {\r\n loadRootItems();\r\n }\r\n const menuClass = createMemo(() =>\r\n cn(menuVariants({ size: p.size, direction: p.direction }), getColor(p.color), p.class?.root),\r\n );\r\n\r\n if (p.setMenuFunction) {\r\n p.setMenuFunction({\r\n focusById,\r\n collapseById,\r\n refreshById,\r\n refreshAll,\r\n collapseAll,\r\n expandedAll,\r\n });\r\n }\r\n return (\r\n <>\r\n <Show when={isRootLoading()}>\r\n <div class={cn(menuClass(), 'flex size-full justify-center p-4')}>\r\n <span class=\"loading loading-spinner loading-md m-auto\"></span>\r\n </div>\r\n </Show>\r\n <Show when={!isRootLoading()}>\r\n <Show\r\n when={rootItems() && rootItems()!.length > 0}\r\n fallback={\r\n <div class=\"text-base-content/50 flex flex-col items-center justify-center gap-2 p-4 text-center text-sm italic\">\r\n <span>No menu items available.</span>\r\n <Button\r\n icon={<RefreshCw size={10} />}\r\n variant={'default'}\r\n size={'4xs'}\r\n class=\"w-fit px-1.5\"\r\n onClick={loadRootItems}\r\n >\r\n Try again\r\n </Button>\r\n </div>\r\n }\r\n >\r\n <ul class={menuClass()} ref={ele => (ulRootRef = ele)} {...(p.id && { id: p.id })}>\r\n <For each={rootItems()!}>{item => renderItems(item)}</For>\r\n </ul>\r\n </Show>\r\n </Show>\r\n </>\r\n );\r\n};\r\n"],"mappings":"s9BAuBMyB,EAAevB,EAAI,OAAQ,CAC/BwB,SAAU,CACRC,KAAM,CAAEC,GAAI,UAAWC,GAAI,UAAWC,GAAI,UAAWC,GAAI,UAAWC,GAAI,UAAW,CACnFC,UAAW,CAAEC,SAAU,gBAAiBC,WAAY,kBAAkB,CACxE,CACD,CAAC,CAIIE,EAAN,KAAmB,CACjB,UAAoB,IAAIE,IACxBC,SAASC,EAAYC,EAAyB,CAC5C,KAAKJ,UAAUK,IAAIF,EAAIC,EAAS,CAElCE,QAAQH,EAAsB,CAC5B,IAAMI,EAAiB,EAAE,CACrBC,EAAuCL,EAC3C,KAAOK,GAAa,MAClBD,EAAKE,QAAQD,EAAU,CACvBA,EAAY,KAAKR,UAAUU,IAAIF,EAAU,CAE3C,OAAOD,EAETI,IAAIR,EAAqB,CACvB,OAAO,KAAKH,UAAUW,IAAIR,EAAG,CAE/BS,OAAQ,CACN,KAAKZ,UAAUY,OAAO,GAIpBC,EAAN,KAAyB,CACvB,WAAqB,IAAIZ,IACzBC,SAASC,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M7DK,EAAA,CAAA,QAAA,CAAA"}
1
+ {"version":3,"file":"menu.js","names":["cn","getColor","cva","VariantProps","RefreshCw","Accessor","Component","createEffect","createMemo","createSignal","createUniqueId","For","JSXElement","mergeProps","on","onCleanup","onMount","Setter","Show","Button","FolderItem","ItemClickInfo","MenuErrorInfo","MenuItem","MenuProps","menuVariants","variants","size","xs","sm","md","lg","xl","direction","vertical","horizontal","MenuVariantsProps","NodeRegistry","parentMap","Map","register","id","parentId","set","getPath","path","currentId","unshift","get","has","clear","LazyFolderRegistry","refreshFns","refreshFn","unregister","delete","refresh","fn","refreshAll","forEach","LazyFolderContent","item","renderItems","shouldLoad","isLoading","setIsLoading","onLoadError","error","onRegisterRefresh","props","loadedItems","setLoadedItems","loadItems","force","lazyItems","items","e","defer","_$createComponent","when","children","each","subItem","ACTIVE_CLASSNAME","Menu","p","color","highlightActive","const","ulRootRef","HTMLUListElement","nodeRegistry","lazyFolderRegistry","addActiveClassForId","length","elements","Array","from","getElementsByClassName","el","classList","remove","nodeId","document","getElementById","add","expandPathToId","element","details","querySelector","HTMLDetailsElement","open","focusById","console","warn","collapseById","refreshById","collapseAll","detailsList","querySelectorAll","d","expandedAll","collapseOtherRootFolders","exceptId","rootFolders","li","parentElement","itemId","type","folderItem","defaultExpanded","isLazyFolder","undefined","setShouldLoad","detailsRef","handleToggle","Event","currentTarget","isExpanded","preventDefault","handleLoadError","onError","errorInfo","source","message","Error","handleFolderClick","MouseEvent","stopPropagation","disabled","currentIsExpanded","willExpand","setTimeout","onItemClick","info","data","_el$","_tmpl$2","_el$2","firstChild","_el$3","_el$5","nextSibling","_$setAttribute","addEventListener","_ref$","_$use","$$click","_$insert","content","Element","_tmpl$","fallback","_$effect","_p$","_v$","class","itemWrap","_v$2","_v$3","itemHeader","_$className","t","a","handleFileClick","_el$6","_tmpl$3","_el$7","handleTitleClick","contains","_el$8","_tmpl$4","_el$9","_el$0","isLazyRoot","rootItems","setRootItems","isRootLoading","setIsRootLoading","clearMenuRegistries","loadRootItems","menuClass","root","setMenuFunction","_el$1","_tmpl$5","_$memo","_el$11","_tmpl$7","_el$12","icon","variant","onClick","_el$10","_tmpl$6","ele","_$spread","_$mergeProps","_$delegateEvents"],"sources":["../../../src/components/menu/menu.tsx"],"sourcesContent":["import { cn } from '@/utils/cn';\nimport { getColor } from '@/utils/helper';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport RefreshCw from 'lucide-solid/icons/refresh-cw';\nimport {\n Accessor,\n Component,\n createEffect,\n createMemo,\n createSignal,\n createUniqueId,\n For,\n JSXElement,\n mergeProps,\n on,\n onCleanup,\n onMount,\n Setter,\n Show,\n} from 'solid-js';\nimport { Button } from '../button';\nimport type { FolderItem, ItemClickInfo, MenuErrorInfo, MenuItem, MenuProps } from './menu.types';\n\nconst menuVariants = cva('menu', {\n variants: {\n size: { xs: 'menu-xs', sm: 'menu-sm', md: 'menu-md', lg: 'menu-lg', xl: 'menu-xl' },\n direction: { vertical: 'menu-vertical', horizontal: 'menu-horizontal' },\n },\n});\n\nexport type MenuVariantsProps = VariantProps<typeof menuVariants>;\n\nclass NodeRegistry {\n private parentMap = new Map<string, string | null>();\n register(id: string, parentId: string | null) {\n this.parentMap.set(id, parentId);\n }\n getPath(id: string): string[] {\n const path: string[] = [];\n let currentId: string | null | undefined = id;\n while (currentId != null) {\n path.unshift(currentId);\n currentId = this.parentMap.get(currentId);\n }\n return path;\n }\n has(id: string): boolean {\n return this.parentMap.has(id);\n }\n clear() {\n this.parentMap.clear();\n }\n}\n\nclass LazyFolderRegistry {\n private refreshFns = new Map<string, () => void>();\n register(id: string, refreshFn: () => void) {\n this.refreshFns.set(id, refreshFn);\n }\n unregister(id: string) {\n this.refreshFns.delete(id);\n }\n refresh(id: string) {\n const fn = this.refreshFns.get(id);\n if (fn) fn();\n }\n refreshAll() {\n this.refreshFns.forEach(fn => fn());\n }\n has(id: string): boolean {\n return this.refreshFns.has(id);\n }\n clear() {\n this.refreshFns.clear();\n }\n}\n\nconst LazyFolderContent: Component<{\n item: FolderItem;\n renderItems: (item: MenuItem, parentId: string | null) => JSXElement;\n parentId: string | null;\n shouldLoad: Accessor<boolean>;\n isLoading: Accessor<boolean>;\n setIsLoading: Setter<boolean>;\n onLoadError: (error: unknown) => void;\n onRegisterRefresh: (refreshFn: () => void) => void;\n}> = props => {\n const [loadedItems, setLoadedItems] = createSignal<MenuItem[] | null>(null);\n const loadItems = async (force = false) => {\n if (props.isLoading()) return;\n if (loadedItems() !== null && !force) return;\n if (!props.item.lazyItems) return;\n props.setIsLoading(true);\n try {\n const items = await props.item.lazyItems();\n setLoadedItems(items);\n } catch (e) {\n props.onLoadError(e);\n } finally {\n props.setIsLoading(false);\n }\n };\n const refresh = () => {\n loadItems(true);\n };\n onMount(() => {\n props.onRegisterRefresh(refresh);\n });\n createEffect(\n on(\n () => props.shouldLoad(),\n shouldLoad => {\n if (shouldLoad && loadedItems() === null) {\n loadItems();\n }\n },\n { defer: true },\n ),\n );\n return (\n <Show when={loadedItems()}>\n <For each={loadedItems()!}>{subItem => props.renderItems(subItem, props.parentId)}</For>\n </Show>\n );\n};\n\nconst ACTIVE_CLASSNAME = '_6ca32a';\nexport const Menu: Component<MenuProps> = p => {\n p = mergeProps(\n { size: 'md', direction: 'vertical', color: 'secondary', highlightActive: true } as const,\n p,\n );\n let ulRootRef: HTMLUListElement;\n const nodeRegistry = new NodeRegistry();\n const lazyFolderRegistry = new LazyFolderRegistry();\n function addActiveClassForId(id: string) {\n if (!ulRootRef || !p.highlightActive) return;\n const path = nodeRegistry.getPath(id);\n if (path.length === 0) return;\n\n const elements = Array.from(ulRootRef.getElementsByClassName(ACTIVE_CLASSNAME));\n\n for (const el of elements) el.classList.remove(ACTIVE_CLASSNAME);\n for (const nodeId of path) document.getElementById(nodeId)?.classList?.add(ACTIVE_CLASSNAME);\n }\n function expandPathToId(id: string) {\n const path = nodeRegistry.getPath(id);\n for (const nodeId of path) {\n const element = document.getElementById(nodeId);\n if (!element) continue;\n const details = element.querySelector(':scope > details') as HTMLDetailsElement | null;\n if (details && !details.open) {\n details.open = true;\n }\n }\n }\n function focusById(id: string) {\n if (!nodeRegistry.has(id)) {\n console.warn(`Menu.focusById: Node with id \"${id}\" not found in registry`);\n return;\n }\n expandPathToId(id);\n addActiveClassForId(id);\n }\n function collapseById(id: string) {\n const element = document.getElementById(id);\n if (!element) {\n console.warn(`Menu.collapseById: Element with id \"${id}\" not found`);\n return;\n }\n const details = element.querySelector(':scope > details') as HTMLDetailsElement | null;\n if (details) {\n details.open = false;\n const elements = details.getElementsByClassName(ACTIVE_CLASSNAME);\n for (const el of elements) el.classList.remove(ACTIVE_CLASSNAME);\n element.classList.remove(ACTIVE_CLASSNAME);\n }\n }\n function refreshById(id: string) {\n if (!lazyFolderRegistry.has(id)) {\n console.warn(`Menu.refreshById: Lazy folder with id \"${id}\" not found`);\n return;\n }\n lazyFolderRegistry.refresh(id);\n }\n function refreshAll() {\n lazyFolderRegistry.refreshAll();\n }\n function collapseAll() {\n if (!ulRootRef) return;\n const detailsList = ulRootRef.querySelectorAll('details');\n detailsList.forEach(d => (d.open = false));\n }\n function expandedAll() {\n if (!ulRootRef) return;\n const detailsList = ulRootRef.querySelectorAll('details');\n detailsList.forEach(d => (d.open = true));\n }\n function collapseOtherRootFolders(exceptId: string) {\n if (!ulRootRef) return;\n // Only collapse direct children (level 1 folders)\n const rootFolders = ulRootRef.querySelectorAll(':scope > li.folder > details');\n rootFolders.forEach(details => {\n const li = details.parentElement;\n if (li && li.id !== exceptId && (details as HTMLDetailsElement).open) {\n (details as HTMLDetailsElement).open = false;\n }\n });\n }\n function renderItems(item: MenuItem, parentId: string | null = null) {\n const itemId = item.id ?? createUniqueId();\n nodeRegistry.register(itemId, parentId);\n\n if (item.type === 'folder') {\n const folderItem = mergeProps(\n { defaultExpanded: item.defaultExpanded ?? p.defaultExpanded ?? false },\n item,\n { id: itemId },\n );\n const isLazyFolder = folderItem.lazyItems !== undefined;\n const [shouldLoad, setShouldLoad] = createSignal(folderItem.defaultExpanded);\n const [isLoading, setIsLoading] = createSignal(false);\n let detailsRef: HTMLDetailsElement | undefined;\n\n const handleToggle = (e: Event) => {\n const details = e.currentTarget as HTMLDetailsElement;\n const isExpanded = details.open;\n if (isLoading()) {\n e.preventDefault();\n return;\n }\n if (isLazyFolder) {\n setShouldLoad(isExpanded);\n }\n };\n\n const handleLoadError = (error: unknown) => {\n if (detailsRef) {\n detailsRef.open = false;\n }\n setShouldLoad(false);\n if (p.onError) {\n const errorInfo: MenuErrorInfo = {\n source: 'folder',\n itemId,\n path: nodeRegistry.getPath(itemId),\n error,\n message: error instanceof Error ? error.message : 'Failed to load folder items',\n };\n p.onError(errorInfo);\n }\n };\n\n const handleFolderClick = (e: MouseEvent) => {\n e.stopPropagation();\n if (isLoading() || item.disabled) {\n e.preventDefault();\n return;\n }\n\n const currentIsExpanded = detailsRef?.open ?? folderItem.defaultExpanded;\n const willExpand = !currentIsExpanded;\n\n // In horizontal mode, collapse other root folders when expanding a root folder\n if (p.direction === 'horizontal' && parentId === null && willExpand) {\n collapseOtherRootFolders(itemId);\n }\n\n if (detailsRef?.open === false) {\n addActiveClassForId(itemId);\n } else {\n setTimeout(() => {\n collapseById(itemId);\n });\n }\n\n if (p.onItemClick) {\n const isExpanded = willExpand;\n const info: ItemClickInfo = {\n id: itemId,\n path: nodeRegistry.getPath(itemId),\n type: 'folder',\n isExpanded,\n data: item.data,\n };\n p.onItemClick(info);\n }\n };\n return (\n <li\n class={cn(\n 'folder',\n (folderItem.disabled || isLoading()) && 'menu-disabled',\n p.class?.itemWrap,\n )}\n id={itemId}\n >\n <details ref={detailsRef} open={folderItem.defaultExpanded} onToggle={handleToggle}>\n <summary\n class={cn(isLoading() && 'after:hidden', p.class?.itemHeader)}\n onClick={handleFolderClick}\n >\n {folderItem.content as Element}\n <Show when={isLoading()}>\n <span class=\"loading loading-spinner loading-xs\"></span>\n </Show>\n </summary>\n <ul>\n <Show\n when={isLazyFolder}\n fallback={\n <For each={(folderItem as { items: MenuItem[] }).items}>\n {subItem => renderItems(subItem, itemId)}\n </For>\n }\n >\n <LazyFolderContent\n {...{\n renderItems,\n shouldLoad,\n isLoading,\n setIsLoading,\n item: folderItem,\n parentId: itemId,\n onLoadError: handleLoadError,\n onRegisterRefresh: refreshFn => lazyFolderRegistry.register(itemId, refreshFn),\n }}\n />\n </Show>\n </ul>\n </details>\n </li>\n );\n }\n if (item.type === 'file') {\n const handleFileClick = (e: MouseEvent) => {\n e.stopPropagation();\n addActiveClassForId(itemId);\n\n if (p.onItemClick) {\n const info: ItemClickInfo = {\n id: itemId,\n path: nodeRegistry.getPath(itemId),\n type: 'file',\n ...(item.data && { data: item.data }),\n };\n p.onItemClick(info);\n }\n };\n return (\n <li\n class={cn('file', item.disabled && 'menu-disabled', p.class?.itemWrap)}\n id={itemId}\n tabindex=\"0\"\n onClick={handleFileClick}\n >\n <div>{item.content as Element}</div>\n </li>\n );\n }\n if (item.type === 'title') {\n const handleTitleClick = (e: MouseEvent) => {\n e.stopPropagation();\n\n const li = document.getElementById(itemId);\n if (li && li.classList.contains(ACTIVE_CLASSNAME)) {\n const elements = li.getElementsByClassName(ACTIVE_CLASSNAME);\n for (const el of elements) el.classList.remove(ACTIVE_CLASSNAME);\n li.classList.remove(ACTIVE_CLASSNAME);\n } else {\n addActiveClassForId(itemId);\n }\n\n if (p.onItemClick) {\n const info: ItemClickInfo = {\n id: itemId,\n path: nodeRegistry.getPath(itemId),\n type: 'title',\n ...(item.data && { data: item.data }),\n };\n p.onItemClick(info);\n }\n };\n return (\n <li class={cn('title', item.disabled && 'menu-disabled', p.class?.itemWrap)} id={itemId}>\n <h4 class=\"menu-title\" onClick={handleTitleClick}>\n {item.content as Element}\n </h4>\n <ul>\n <For each={item.items}>{subItem => renderItems(subItem, itemId)}</For>\n </ul>\n </li>\n );\n }\n }\n const isLazyRoot = p.lazyItems !== undefined;\n const [rootItems, setRootItems] = createSignal<MenuItem[] | null>(\n isLazyRoot ? null : (p.items ?? []),\n );\n const [isRootLoading, setIsRootLoading] = createSignal(false);\n\n createEffect(\n on(\n () => p.items,\n items => {\n if (!isLazyRoot && items) {\n nodeRegistry.clear();\n lazyFolderRegistry.clear();\n setRootItems(items);\n }\n },\n { defer: true },\n ),\n );\n\n onCleanup(function clearMenuRegistries() {\n nodeRegistry.clear();\n lazyFolderRegistry.clear();\n });\n\n const loadRootItems = async () => {\n if (!p.lazyItems || rootItems() !== null || isRootLoading()) return;\n setIsRootLoading(true);\n try {\n const items = await p.lazyItems();\n setRootItems(items);\n } catch (e) {\n if (p.onError) {\n const errorInfo: MenuErrorInfo = {\n source: 'root',\n error: e,\n message: e instanceof Error ? e.message : 'Failed to load menu items',\n };\n p.onError(errorInfo);\n }\n } finally {\n setIsRootLoading(false);\n }\n };\n if (isLazyRoot) {\n loadRootItems();\n }\n const menuClass = createMemo(() =>\n cn(menuVariants({ size: p.size, direction: p.direction }), getColor(p.color), p.class?.root),\n );\n\n if (p.setMenuFunction) {\n p.setMenuFunction({\n focusById,\n collapseById,\n refreshById,\n refreshAll,\n collapseAll,\n expandedAll,\n });\n }\n return (\n <>\n <Show when={isRootLoading()}>\n <div class={cn(menuClass(), 'flex size-full justify-center p-4')}>\n <span class=\"loading loading-spinner loading-md m-auto\"></span>\n </div>\n </Show>\n <Show when={!isRootLoading()}>\n <Show\n when={rootItems() && rootItems()!.length > 0}\n fallback={\n <div class=\"text-base-content/50 flex flex-col items-center justify-center gap-2 p-4 text-center text-sm italic\">\n <span>No menu items available.</span>\n <Button\n icon={<RefreshCw size={10} />}\n variant={'default'}\n size={'4xs'}\n class=\"w-fit px-1.5\"\n onClick={loadRootItems}\n >\n Try again\n </Button>\n </div>\n }\n >\n <ul class={menuClass()} ref={ele => (ulRootRef = ele)} {...(p.id && { id: p.id })}>\n <For each={rootItems()!}>{item => renderItems(item)}</For>\n </ul>\n </Show>\n </Show>\n </>\n );\n};\n"],"mappings":"qkCAuBMyB,EAAevB,EAAI,OAAQ,CAC/BwB,SAA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CAAA,OAAApI,EAAG1E,EAAS,CAACuB,KAAM,GAAE,CAAA,EACzBwL,QAAS,UACTxL,KAAM,MAAK,MAAA,eAEXyL,QAASZ,EAAaxH,SAAA,YAAA,CAAA,CAAA,KAAA,CAAA+H,KAAA,EAAA,IAAA/H,UAAA,CAAA,IAAAqI,EAAAC,GAAA,CAQyB,OARzBhD,EAOCiD,GAAQ9H,EAAY8H,EAAIF,EAAA,CAAAG,EAAAH,EAAAI,EAAA,CAAA,IAAA,OAAA,CAAA,OAA1ChB,GAAW,EAAA,KAAsCpH,EAAE5C,IAAM,CAAEA,GAAI4C,EAAE5C,GAAI,CAAA,CAAA,GAAA,GAAA,CAAA+H,EAAA6C,EAAAvI,EAC7EnE,EAAG,CAAA,IAACsE,MAAI,CAAA,OAAEkH,GAAW,EAACnH,SAAGnB,GAAQC,EAAYD,EAAI,CAAC,CAAA,CAAA,CAAAwJ,GAAA,CAAA,EAAA,CAAA,CAAA,EAM7DK,EAAA,CAAA,QAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- import{cn as e}from"../../utils/cn.js";import{renderCSSAnimation as t}from"../../utils/helper.js";import{ZIndexType as n}from"../z-index/z-index.types.js";import{ZIndex as r}from"../z-index/z-index.js";import{conditionalRender as i}from"../../utils/hoc.js";import{addEventListener as a,className as o,createComponent as s,delegateEvents as c,effect as l,insert as u,memo as d,style as f,template as p}from"solid-js/web";import{Show as m,createEffect as h,createSignal as g,createUniqueId as _,mergeProps as v,on as y,onCleanup as b}from"solid-js";import x from"lucide-solid/icons/x";var S=p(`<div>`),C=p(`<div class=mo02>`),w=p(`<div aria-hidden=true>`),T=p(`<div class=mo03><div><div></div><div>`),E=p(`<button aria-label=Close>`),D=p(`<div class=mo07>Modal ID: `),O=new Set([`lightSpeedInRight`,`lightSpeedInLeft`,`fadeInLeft`,`fadeInRight`,`fadeInDown`,`fadeInUp`,`bounceIn`,`scaleInCenter`,`slideInFwdCenter`,`slideInBck`,`tiltIn`,`swingInRightBck`,`puffInCenter`,`scaleInBl`]),[k,A]=g([]);function j(){let e=k().slice();e.pop(),A(e)}var M=new Map;function N(e){if(e.key!==`Escape`)return;let t=k().at(-1);t&&M.get(t)?.()}function P(e,t){M.size===0&&document.addEventListener(`keydown`,N),M.set(e,t)}function F(e){M.delete(e),M.size===0&&document.removeEventListener(`keydown`,N)}var I=i=>{i=v({closeOnOutsideClick:!0,closeOnEsc:!0,open:!0,onClose:()=>{},closable:!0,preRender:!1,animate:{name:`puffInCenter`,duration:`300ms`},mask:!0},i);let c=_();b(function(){F(c),c===k().at(-1)&&j()}),h(y(()=>i.open,e=>{e?(c!==k().at(-1)&&A([...k(),c]),P(c,()=>{i.closeOnEsc&&i.onClose()})):(F(c),c===k().at(-1)&&j())}));let p=()=>!(!i.open||c!==k().at(-1)||i.mask===!1||typeof i.mask==`object`&&i.mask?.enabled===!1),M=()=>typeof i.mask==`object`&&i.mask?.blur===!1?`bg-modal-overlay`:`bg-modal-overlay backdrop-blur-[5px]`,N=()=>i.animate?.name??`none`,I=()=>O.has(N()),L=()=>!I()&&N()!==`none`?{animation:t(i.animate)}:{},R=()=>I()?{animation:t(i.animate)}:{},z=()=>{let e={};return i.width&&(e.width=i.width,e[`min-width`]=i.width),e},[B,V]=g(!1),H=()=>V(!0);h(y(()=>i.open,e=>{e&&V(!1)}));let U=()=>!I()||B(),W=()=>{i.closeOnOutsideClick&&i.onClose()};return s(r,{get type(){return n.MODAL},get open(){return i.open??!1},blockScroll:!0,get preRender(){return i.preRender},position:{inset:`0`},get class(){return e(`mo01`,i.class?.wrapper)},get children(){return[s(m,{get when(){return p()},get children(){var t=S();return t.$$click=W,l(()=>o(t,e(`mo02`,M()))),t}}),s(m,{get when(){return d(()=>!p())()&&i.closeOnOutsideClick},get children(){var e=C();return e.$$click=W,e}}),(()=>{var t=T(),n=t.firstChild,r=n.firstChild,p=r.nextSibling;return t.$$click=e=>e.stopPropagation(),u(t,s(m,{get when(){return d(()=>!!I())()&&!B()},get children(){var t=w();return t.addEventListener(`animationend`,H),l(n=>{var r=e(`mo04`,i.class?.modal),a={...z(),...R()};return r!==n.e&&o(t,n.e=r),n.t=f(t,a,n.t),n},{e:void 0,t:void 0}),t}}),n),u(n,(()=>{var t=d(()=>!!i.closable);return()=>t()&&(()=>{var t=E();return a(t,`click`,i.onClose,!0),u(t,s(x,{size:16})),l(()=>o(t,e(`mo06`,i.class?.closeButton))),t})()})(),r),u(r,s(m,{get when(){return i.header},get fallback(){return(()=>{var e=D();return e.firstChild,u(e,c,null),e})()},get children(){return i.header}})),u(p,s(m,{get when(){return i.body},get children(){return i.body}})),u(n,s(m,{get when(){return i.footer},get children(){var t=S();return u(t,()=>i.footer),l(()=>o(t,e(`mo-footer`,i.class?.footer))),t}}),null),l(t=>{var a=e(`mo05`,i.class?.modal),s={...L(),...z(),visibility:U()?`visible`:`hidden`},c=e(`mo-header`,i.class?.header),l=e(`mo08`,i.class?.body);return a!==t.e&&o(n,t.e=a),t.t=f(n,s,t.t),c!==t.a&&o(r,t.a=c),l!==t.o&&o(p,t.o=l),t},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()]}})},L=i(I,{preRender:`preRender`,when:`open`});c([`click`]);export{I as ComponentModal,L as Modal};
1
+ import{cn as e}from"../../utils/cn.js";import{renderCSSAnimation as t}from"../../utils/helper.js";import{ZIndexType as n}from"../z-index/z-index.types.js";import{ZIndex as r}from"../z-index/z-index.js";import{x_default as i}from"../../node_modules/.pnpm/lucide-solid@1.8.0_solid-js@1.9.11/node_modules/lucide-solid/dist/source/icons/x.js";import{conditionalRender as a}from"../../utils/hoc.js";import{addEventListener as o,className as s,createComponent as c,delegateEvents as l,effect as u,insert as d,memo as f,style as p,template as m}from"solid-js/web";import{Show as h,createEffect as g,createSignal as _,createUniqueId as v,mergeProps as y,on as b,onCleanup as x}from"solid-js";var S=m(`<div>`),C=m(`<div class=mo02>`),w=m(`<div aria-hidden=true>`),T=m(`<div class=mo03><div><div></div><div>`),E=m(`<button aria-label=Close>`),D=m(`<div class=mo07>Modal ID: `),O=new Set([`lightSpeedInRight`,`lightSpeedInLeft`,`fadeInLeft`,`fadeInRight`,`fadeInDown`,`fadeInUp`,`bounceIn`,`scaleInCenter`,`slideInFwdCenter`,`slideInBck`,`tiltIn`,`swingInRightBck`,`puffInCenter`,`scaleInBl`]),[k,A]=_([]);function j(){let e=k().slice();e.pop(),A(e)}var M=new Map;function N(e){if(e.key!==`Escape`)return;let t=k().at(-1);t&&M.get(t)?.()}function P(e,t){M.size===0&&document.addEventListener(`keydown`,N),M.set(e,t)}function F(e){M.delete(e),M.size===0&&document.removeEventListener(`keydown`,N)}var I=a=>{a=y({closeOnOutsideClick:!0,closeOnEsc:!0,open:!0,onClose:()=>{},closable:!0,preRender:!1,animate:{name:`puffInCenter`,duration:`300ms`},mask:!0},a);let l=v();x(function(){F(l),l===k().at(-1)&&j()}),g(b(()=>a.open,e=>{e?(l!==k().at(-1)&&A([...k(),l]),P(l,()=>{a.closeOnEsc&&a.onClose()})):(F(l),l===k().at(-1)&&j())}));let m=()=>!(!a.open||l!==k().at(-1)||a.mask===!1||typeof a.mask==`object`&&a.mask?.enabled===!1),M=()=>typeof a.mask==`object`&&a.mask?.blur===!1?`bg-modal-overlay`:`bg-modal-overlay backdrop-blur-[5px]`,N=()=>a.animate?.name??`none`,I=()=>O.has(N()),L=()=>!I()&&N()!==`none`?{animation:t(a.animate)}:{},R=()=>I()?{animation:t(a.animate)}:{},z=()=>{let e={};return a.width&&(e.width=a.width,e[`min-width`]=a.width),e},[B,V]=_(!1),H=()=>V(!0);g(b(()=>a.open,e=>{e&&V(!1)}));let U=()=>!I()||B(),W=()=>{a.closeOnOutsideClick&&a.onClose()};return c(r,{get type(){return n.MODAL},get open(){return a.open??!1},blockScroll:!0,get preRender(){return a.preRender},position:{inset:`0`},get class(){return e(`mo01`,a.class?.wrapper)},get children(){return[c(h,{get when(){return m()},get children(){var t=S();return t.$$click=W,u(()=>s(t,e(`mo02`,M()))),t}}),c(h,{get when(){return f(()=>!m())()&&a.closeOnOutsideClick},get children(){var e=C();return e.$$click=W,e}}),(()=>{var t=T(),n=t.firstChild,r=n.firstChild,m=r.nextSibling;return t.$$click=e=>e.stopPropagation(),d(t,c(h,{get when(){return f(()=>!!I())()&&!B()},get children(){var t=w();return t.addEventListener(`animationend`,H),u(n=>{var r=e(`mo04`,a.class?.modal),i={...z(),...R()};return r!==n.e&&s(t,n.e=r),n.t=p(t,i,n.t),n},{e:void 0,t:void 0}),t}}),n),d(n,(()=>{var t=f(()=>!!a.closable);return()=>t()&&(()=>{var t=E();return o(t,`click`,a.onClose,!0),d(t,c(i,{size:16})),u(()=>s(t,e(`mo06`,a.class?.closeButton))),t})()})(),r),d(r,c(h,{get when(){return a.header},get fallback(){return(()=>{var e=D();return e.firstChild,d(e,l,null),e})()},get children(){return a.header}})),d(m,c(h,{get when(){return a.body},get children(){return a.body}})),d(n,c(h,{get when(){return a.footer},get children(){var t=S();return d(t,()=>a.footer),u(()=>s(t,e(`mo-footer`,a.class?.footer))),t}}),null),u(t=>{var i=e(`mo05`,a.class?.modal),o={...L(),...z(),visibility:U()?`visible`:`hidden`},c=e(`mo-header`,a.class?.header),l=e(`mo08`,a.class?.body);return i!==t.e&&s(n,t.e=i),t.t=p(n,o,t.t),c!==t.a&&s(r,t.a=c),l!==t.o&&s(m,t.o=l),t},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()]}})},L=a(I,{preRender:`preRender`,when:`open`});l([`click`]);export{I as ComponentModal,L as Modal};
2
2
  //# sourceMappingURL=modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","names":["SolidComponent","cn","AnimationConfig","renderCSSAnimation","conditionalRender","X","Component","createEffect","createSignal","createUniqueId","mergeProps","on","onCleanup","Show","ZIndex","ZIndexType","ModalType","onClose","width","closeOnOutsideClick","closeOnEsc","closable","header","body","footer","open","mask","enabled","blur","class","Partial","Record","preRender","animate","Omit","name","AnimateType","TRANSFORM_ANIMATIONS","Set","modalIds","setModalIds","popModalId","newArr","slice","pop","modalCloseCallbacks","Map","globalKeyDownHandler","e","KeyboardEvent","key","topId","at","get","registerModalCallback","id","cb","size","document","addEventListener","set","unregisterModalCallback","delete","removeEventListener","ComponentModal","p","duration","modalId","unregisterModal","renderMaskEnabled","renderMaskClass","animName","isTransformAnim","has","renderModalBoxAnim","animation","renderOverlayAnim","renderBoxStyle","style","overlayDone","setOverlayDone","handleOverlayAnimEnd","boxVisible","handleBackdropClick","_$createComponent","type","MODAL","blockScroll","position","inset","wrapper","children","when","_el$","_tmpl$","$$click","_$effect","_$className","_$memo","_el$2","_tmpl$2","_el$3","_tmpl$4","_el$5","firstChild","_el$6","_el$7","nextSibling","stopPropagation","_$insert","_el$4","_tmpl$3","_p$","_v$","modal","_v$2","t","_$style","undefined","_c$","_el$9","_tmpl$5","_$addEventListener","closeButton","fallback","_el$0","_tmpl$6","_el$1","Element","_el$8","_v$3","_v$4","visibility","_v$5","_v$6","a","o","Modal","_$delegateEvents"],"sources":["../../../src/components/modal/modal.tsx"],"sourcesContent":["import { SolidComponent } from '@/type';\nimport { cn } from '@/utils/cn';\nimport { AnimationConfig, renderCSSAnimation } from '@/utils/helper';\nimport { conditionalRender } from '@/utils/hoc';\nimport X from 'lucide-solid/icons/x';\n\nimport {\n Component,\n createEffect,\n createSignal,\n createUniqueId,\n mergeProps,\n on,\n onCleanup,\n Show,\n} from 'solid-js';\nimport { ZIndex, ZIndexType } from '../z-index';\n\nexport type ModalType = {\n onClose: () => void;\n width?: string;\n closeOnOutsideClick?: boolean;\n closeOnEsc?: boolean;\n closable?: boolean;\n header?: SolidComponent;\n body?: SolidComponent;\n footer?: SolidComponent;\n open?: boolean;\n mask?: boolean | { enabled: boolean; blur: boolean };\n class?: Partial<\n Record<'wrapper' | 'modal' | 'header' | 'body' | 'footer' | 'closeButton', string>\n >;\n preRender?: boolean;\n animate?: Omit<AnimationConfig, 'name'> & {\n name: AnimateType;\n };\n};\n\n// Only opacity-based animations are safe to use on the modal box directly\n// because transform-based animations create a new containing block for\n// position:fixed descendants, which breaks fixed positioning inside body slots.\n// Transform animations are applied on a sibling overlay div instead.\ntype AnimateType =\n | 'none'\n | 'lightSpeedInRight'\n | 'lightSpeedInLeft'\n | 'fadeIn'\n | 'fadeInLeft'\n | 'fadeInRight'\n | 'fadeInDown'\n | 'fadeInUp'\n | 'bounceIn'\n | 'scaleInCenter'\n | 'slideInFwdCenter'\n | 'slideInBck'\n | 'tiltIn'\n | 'swingInRightBck'\n | 'puffInCenter'\n | 'scaleInBl';\n\n// Animations that use transform in their keyframes — these create a containing\n// block for position:fixed elements during the animation. They must NOT be\n// placed on any ancestor of body content.\nconst TRANSFORM_ANIMATIONS = new Set<AnimateType>([\n 'lightSpeedInRight',\n 'lightSpeedInLeft',\n 'fadeInLeft',\n 'fadeInRight',\n 'fadeInDown',\n 'fadeInUp',\n 'bounceIn',\n 'scaleInCenter',\n 'slideInFwdCenter',\n 'slideInBck',\n 'tiltIn',\n 'swingInRightBck',\n 'puffInCenter',\n 'scaleInBl',\n]);\n\n// Track active modals for overlay logic (only topmost modal shows mask)\nconst [modalIds, setModalIds] = createSignal<string[]>([]);\nfunction popModalId() {\n const newArr = modalIds().slice();\n newArr.pop();\n setModalIds(newArr);\n}\n\n// Global ESC key handler — single listener shared across all modal instances\nconst modalCloseCallbacks = new Map<string, () => void>();\n\nfunction globalKeyDownHandler(e: KeyboardEvent) {\n if (e.key !== 'Escape') return;\n const topId = modalIds().at(-1);\n if (topId) modalCloseCallbacks.get(topId)?.();\n}\n\nfunction registerModalCallback(id: string, cb: () => void) {\n if (modalCloseCallbacks.size === 0) {\n document.addEventListener('keydown', globalKeyDownHandler);\n }\n modalCloseCallbacks.set(id, cb);\n}\n\nfunction unregisterModalCallback(id: string) {\n modalCloseCallbacks.delete(id);\n if (modalCloseCallbacks.size === 0) {\n document.removeEventListener('keydown', globalKeyDownHandler);\n }\n}\n\nconst ComponentModal: Component<ModalType> = p => {\n p = mergeProps(\n {\n closeOnOutsideClick: true,\n closeOnEsc: true,\n open: true,\n onClose: () => {},\n closable: true,\n preRender: false,\n animate: {\n name: 'puffInCenter',\n duration: '300ms',\n },\n mask: true,\n } as ModalType,\n p,\n );\n\n const modalId = createUniqueId();\n\n onCleanup(function unregisterModal() {\n unregisterModalCallback(modalId);\n if (modalId === modalIds().at(-1)) {\n popModalId();\n }\n });\n\n // Manage modalIds stack for overlay logic\n createEffect(\n on(\n () => p.open,\n open => {\n if (open) {\n if (modalId !== modalIds().at(-1)) {\n setModalIds([...modalIds(), modalId]);\n }\n registerModalCallback(modalId, () => { if (p.closeOnEsc) p.onClose(); });\n } else {\n unregisterModalCallback(modalId);\n if (modalId === modalIds().at(-1)) {\n popModalId();\n }\n }\n },\n ),\n );\n\n const renderMaskEnabled = (): boolean => {\n if (!p.open) return false;\n if (modalId !== modalIds().at(-1)) return false;\n if (p.mask === false) return false;\n if (typeof p.mask === 'object' && p.mask?.enabled === false) return false;\n return true;\n };\n\n const renderMaskClass = (): string => {\n if (typeof p.mask === 'object' && p.mask?.blur === false) {\n return 'bg-modal-overlay';\n }\n return 'bg-modal-overlay backdrop-blur-[5px]';\n };\n\n const animName = (): AnimateType => p.animate?.name ?? 'none';\n const isTransformAnim = () => TRANSFORM_ANIMATIONS.has(animName());\n\n // For transform-based animations: rendered on a sibling absolutely-positioned\n // overlay div that visually matches the modal box but is NOT an ancestor of\n // body content. This completely avoids the containing-block issue.\n // For opacity-only animations (fadeIn): applied directly on the modal box.\n const renderModalBoxAnim = () => {\n if (!isTransformAnim() && animName() !== 'none') {\n return { animation: renderCSSAnimation(p.animate!) };\n }\n return {};\n };\n\n const renderOverlayAnim = () => {\n if (isTransformAnim()) {\n return { animation: renderCSSAnimation(p.animate!) };\n }\n return {};\n };\n\n const renderBoxStyle = () => {\n const style: Record<string, any> = {};\n if (p.width) {\n style['width'] = p.width;\n style['min-width'] = p.width;\n }\n return style;\n };\n\n // Overlay: a visually identical copy of the modal box that carries the\n // transform animation. It sits on top of the real modal box via absolute\n // positioning. Once animation ends it is hidden and the real box is shown.\n const [overlayDone, setOverlayDone] = createSignal(false);\n const handleOverlayAnimEnd = () => setOverlayDone(true);\n\n // Reset overlayDone each time modal re-opens so transform animation replays.\n createEffect(\n on(\n () => p.open,\n open => {\n if (open) setOverlayDone(false);\n },\n ),\n );\n\n // Real modal box becomes visible only after transform animation finishes\n // (to avoid showing both simultaneously).\n const boxVisible = () => !isTransformAnim() || overlayDone();\n\n const handleBackdropClick = () => {\n if (p.closeOnOutsideClick) {\n p.onClose();\n }\n };\n\n return (\n <ZIndex\n type={ZIndexType.MODAL}\n open={p.open ?? false}\n blockScroll\n preRender={p.preRender}\n position={{ inset: '0' }}\n class={cn('mo01', p.class?.wrapper)}\n >\n {/* Backdrop overlay — only for topmost modal */}\n <Show when={renderMaskEnabled()}>\n <div class={cn('mo02', renderMaskClass())} onClick={handleBackdropClick} />\n </Show>\n\n {/* Invisible hit area for outside-click when mask is disabled */}\n <Show when={!renderMaskEnabled() && p.closeOnOutsideClick}>\n <div class=\"mo02\" onClick={handleBackdropClick} />\n </Show>\n\n {/* Wrapper: flex item căn giữa bởi parent. Kích thước khớp real box.\n Overlay absolute bên trong → luôn cùng vị trí & kích thước với real box. */}\n <div class=\"mo03\" onClick={e => e.stopPropagation()}>\n {/* === Transform animation approach ===\n Overlay là visual clone với animation transform, positioned absolute\n bên trong wrapper → khớp 100% kích thước/vị trí với real box.\n Giữ body content thoát khỏi transform ancestor. */}\n <Show when={isTransformAnim() && !overlayDone()}>\n <div\n class={cn('mo04', p.class?.modal)}\n style={{ ...renderBoxStyle(), ...renderOverlayAnim() }}\n onAnimationEnd={handleOverlayAnimEnd}\n aria-hidden=\"true\"\n />\n </Show>\n\n {/* === Real modal box ===\n Dùng opacity animation (an toàn) hoặc không animation.\n Body content luôn thoát khỏi transform ancestor. */}\n <div\n class={cn('mo05', p.class?.modal)}\n style={{\n ...renderModalBoxAnim(),\n ...renderBoxStyle(),\n visibility: boxVisible() ? 'visible' : 'hidden',\n }}\n >\n {p.closable && (\n <button class={cn('mo06', p.class?.closeButton)} onClick={p.onClose} aria-label=\"Close\">\n <X size={16} />\n </button>\n )}\n\n <div class={cn('mo-header', p.class?.header)}>\n <Show when={p.header} fallback={<div class=\"mo07\">Modal ID: {modalId}</div>}>\n {p.header as Element}\n </Show>\n </div>\n\n <div class={cn('mo08', p.class?.body)}>\n <Show when={p.body}>{p.body as Element}</Show>\n </div>\n\n <Show when={p.footer}>\n <div class={cn('mo-footer', p.class?.footer)}>{p.footer as Element}</div>\n </Show>\n </div>\n </div>\n </ZIndex>\n );\n};\n\nexport const Modal = conditionalRender(ComponentModal, { preRender: 'preRender', when: 'open' });\n\nexport { ComponentModal };\n"],"mappings":"8vBA+DMqC,EAAuB,IAAIC,IAAiB,CAChD,oBACA,mBACA,aACA,cACA,aACA,WACA,WACA,gBACA,mBACA,aACA,SACA,kBACA,eACA,YACD,CAAC,CAGI,CAACC,EAAUC,GAAehC,EAAuB,EAAE,CAAC,CAC1D,SAASiC,GAAa,CACpB,IAAMC,EAASH,GAAU,CAACI,OAAO,CACjCD,EAAOE,KAAK,CACZJ,EAAYE,EAAO,CAIrB,IAAMG,EAAsB,IAAIC,IAEhC,SAASC,EAAqBC,EAAkB,CAC9C,GAAIA,EAAEE,MAAQ,SAAU,OACxB,IAAMC,EAAQZ,GAAU,CAACa,GAAG,GAAG,CAC3BD,GAAON,EAAoBQ,IAAIF,EAAM,IAAI,CAG/C,SAASG,EAAsBC,EAAYC,EAAgB,CACrDX,EAAoBY,OAAS,GAC/BC,SAASC,iBAAiB,UAAWZ,EAAqB,CAE5DF,EAAoBe,IAAIL,EAAIC,EAAG,CAGjC,SAASK,EAAwBN,EAAY,CAC3CV,EAAoBiB,OAAOP,EAAG,CAC1BV,EAAoBY,OAAS,GAC/BC,SAASK,oBAAoB,UAAWhB,EAAqB,CAIjE,IAAMiB,EAAuCC,GAAK,CAChDA,EAAIvD,EACF,CACES,oBAAqB,GACrBC,WAAY,GACZK,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ent","cn","AnimationConfig","renderCSSAnimation","conditionalRender","X","Component","createEffect","createSignal","createUniqueId","mergeProps","on","onCleanup","Show","ZIndex","ZIndexType","ModalType","onClose","width","closeOnOutsideClick","closeOnEsc","closable","header","body","footer","open","mask","enabled","blur","class","Partial","Record","preRender","animate","Omit","name","AnimateType","TRANSFORM_ANIMATIONS","Set","modalIds","setModalIds","popModalId","newArr","slice","pop","modalCloseCallbacks","Map","globalKeyDownHandler","e","KeyboardEvent","key","topId","at","get","registerModalCallback","id","cb","size","document","addEventListener","set","unregisterModalCallback","delete","removeEventListener","ComponentModal","p","duration","modalId","unregisterModal","renderMaskEnabled","renderMaskClass","animName","isTransformAnim","has","renderModalBoxAnim","animation","renderOverlayAnim","renderBoxStyle","style","overlayDone","setOverlayDone","handleOverlayAnimEnd","boxVisible","handleBackdropClick","_$createComponent","type","MODAL","blockScroll","position","inset","wrapper","children","when","_el$","_tmpl$","$$click","_$effect","_$className","_$memo","_el$2","_tmpl$2","_el$3","_tmpl$4","_el$5","firstChild","_el$6","_el$7","nextSibling","stopPropagation","_$insert","_el$4","_tmpl$3","_p$","_v$","modal","_v$2","t","_$style","undefined","_c$","_el$9","_tmpl$5","_$addEventListener","closeButton","fallback","_el$0","_tmpl$6","_el$1","Element","_el$8","_v$3","_v$4","visibility","_v$5","_v$6","a","o","Modal","_$delegateEvents"],"sources":["../../../src/components/modal/modal.tsx"],"sourcesContent":["import { SolidComponent } from '@/type';\nimport { cn } from '@/utils/cn';\nimport { AnimationConfig, renderCSSAnimation } from '@/utils/helper';\nimport { conditionalRender } from '@/utils/hoc';\nimport X from 'lucide-solid/icons/x';\n\nimport {\n Component,\n createEffect,\n createSignal,\n createUniqueId,\n mergeProps,\n on,\n onCleanup,\n Show,\n} from 'solid-js';\nimport { ZIndex, ZIndexType } from '../z-index';\n\nexport type ModalType = {\n onClose: () => void;\n width?: string;\n closeOnOutsideClick?: boolean;\n closeOnEsc?: boolean;\n closable?: boolean;\n header?: SolidComponent;\n body?: SolidComponent;\n footer?: SolidComponent;\n open?: boolean;\n mask?: boolean | { enabled: boolean; blur: boolean };\n class?: Partial<\n Record<'wrapper' | 'modal' | 'header' | 'body' | 'footer' | 'closeButton', string>\n >;\n preRender?: boolean;\n animate?: Omit<AnimationConfig, 'name'> & {\n name: AnimateType;\n };\n};\n\n// Only opacity-based animations are safe to use on the modal box directly\n// because transform-based animations create a new containing block for\n// position:fixed descendants, which breaks fixed positioning inside body slots.\n// Transform animations are applied on a sibling overlay div instead.\ntype AnimateType =\n | 'none'\n | 'lightSpeedInRight'\n | 'lightSpeedInLeft'\n | 'fadeIn'\n | 'fadeInLeft'\n | 'fadeInRight'\n | 'fadeInDown'\n | 'fadeInUp'\n | 'bounceIn'\n | 'scaleInCenter'\n | 'slideInFwdCenter'\n | 'slideInBck'\n | 'tiltIn'\n | 'swingInRightBck'\n | 'puffInCenter'\n | 'scaleInBl';\n\n// Animations that use transform in their keyframes — these create a containing\n// block for position:fixed elements during the animation. They must NOT be\n// placed on any ancestor of body content.\nconst TRANSFORM_ANIMATIONS = new Set<AnimateType>([\n 'lightSpeedInRight',\n 'lightSpeedInLeft',\n 'fadeInLeft',\n 'fadeInRight',\n 'fadeInDown',\n 'fadeInUp',\n 'bounceIn',\n 'scaleInCenter',\n 'slideInFwdCenter',\n 'slideInBck',\n 'tiltIn',\n 'swingInRightBck',\n 'puffInCenter',\n 'scaleInBl',\n]);\n\n// Track active modals for overlay logic (only topmost modal shows mask)\nconst [modalIds, setModalIds] = createSignal<string[]>([]);\nfunction popModalId() {\n const newArr = modalIds().slice();\n newArr.pop();\n setModalIds(newArr);\n}\n\n// Global ESC key handler — single listener shared across all modal instances\nconst modalCloseCallbacks = new Map<string, () => void>();\n\nfunction globalKeyDownHandler(e: KeyboardEvent) {\n if (e.key !== 'Escape') return;\n const topId = modalIds().at(-1);\n if (topId) modalCloseCallbacks.get(topId)?.();\n}\n\nfunction registerModalCallback(id: string, cb: () => void) {\n if (modalCloseCallbacks.size === 0) {\n document.addEventListener('keydown', globalKeyDownHandler);\n }\n modalCloseCallbacks.set(id, cb);\n}\n\nfunction unregisterModalCallback(id: string) {\n modalCloseCallbacks.delete(id);\n if (modalCloseCallbacks.size === 0) {\n document.removeEventListener('keydown', globalKeyDownHandler);\n }\n}\n\nconst ComponentModal: Component<ModalType> = p => {\n p = mergeProps(\n {\n closeOnOutsideClick: true,\n closeOnEsc: true,\n open: true,\n onClose: () => {},\n closable: true,\n preRender: false,\n animate: {\n name: 'puffInCenter',\n duration: '300ms',\n },\n mask: true,\n } as ModalType,\n p,\n );\n\n const modalId = createUniqueId();\n\n onCleanup(function unregisterModal() {\n unregisterModalCallback(modalId);\n if (modalId === modalIds().at(-1)) {\n popModalId();\n }\n });\n\n // Manage modalIds stack for overlay logic\n createEffect(\n on(\n () => p.open,\n open => {\n if (open) {\n if (modalId !== modalIds().at(-1)) {\n setModalIds([...modalIds(), modalId]);\n }\n registerModalCallback(modalId, () => { if (p.closeOnEsc) p.onClose(); });\n } else {\n unregisterModalCallback(modalId);\n if (modalId === modalIds().at(-1)) {\n popModalId();\n }\n }\n },\n ),\n );\n\n const renderMaskEnabled = (): boolean => {\n if (!p.open) return false;\n if (modalId !== modalIds().at(-1)) return false;\n if (p.mask === false) return false;\n if (typeof p.mask === 'object' && p.mask?.enabled === false) return false;\n return true;\n };\n\n const renderMaskClass = (): string => {\n if (typeof p.mask === 'object' && p.mask?.blur === false) {\n return 'bg-modal-overlay';\n }\n return 'bg-modal-overlay backdrop-blur-[5px]';\n };\n\n const animName = (): AnimateType => p.animate?.name ?? 'none';\n const isTransformAnim = () => TRANSFORM_ANIMATIONS.has(animName());\n\n // For transform-based animations: rendered on a sibling absolutely-positioned\n // overlay div that visually matches the modal box but is NOT an ancestor of\n // body content. This completely avoids the containing-block issue.\n // For opacity-only animations (fadeIn): applied directly on the modal box.\n const renderModalBoxAnim = () => {\n if (!isTransformAnim() && animName() !== 'none') {\n return { animation: renderCSSAnimation(p.animate!) };\n }\n return {};\n };\n\n const renderOverlayAnim = () => {\n if (isTransformAnim()) {\n return { animation: renderCSSAnimation(p.animate!) };\n }\n return {};\n };\n\n const renderBoxStyle = () => {\n const style: Record<string, any> = {};\n if (p.width) {\n style['width'] = p.width;\n style['min-width'] = p.width;\n }\n return style;\n };\n\n // Overlay: a visually identical copy of the modal box that carries the\n // transform animation. It sits on top of the real modal box via absolute\n // positioning. Once animation ends it is hidden and the real box is shown.\n const [overlayDone, setOverlayDone] = createSignal(false);\n const handleOverlayAnimEnd = () => setOverlayDone(true);\n\n // Reset overlayDone each time modal re-opens so transform animation replays.\n createEffect(\n on(\n () => p.open,\n open => {\n if (open) setOverlayDone(false);\n },\n ),\n );\n\n // Real modal box becomes visible only after transform animation finishes\n // (to avoid showing both simultaneously).\n const boxVisible = () => !isTransformAnim() || overlayDone();\n\n const handleBackdropClick = () => {\n if (p.closeOnOutsideClick) {\n p.onClose();\n }\n };\n\n return (\n <ZIndex\n type={ZIndexType.MODAL}\n open={p.open ?? false}\n blockScroll\n preRender={p.preRender}\n position={{ inset: '0' }}\n class={cn('mo01', p.class?.wrapper)}\n >\n {/* Backdrop overlay — only for topmost modal */}\n <Show when={renderMaskEnabled()}>\n <div class={cn('mo02', renderMaskClass())} onClick={handleBackdropClick} />\n </Show>\n\n {/* Invisible hit area for outside-click when mask is disabled */}\n <Show when={!renderMaskEnabled() && p.closeOnOutsideClick}>\n <div class=\"mo02\" onClick={handleBackdropClick} />\n </Show>\n\n {/* Wrapper: flex item căn giữa bởi parent. Kích thước khớp real box.\n Overlay absolute bên trong → luôn cùng vị trí & kích thước với real box. */}\n <div class=\"mo03\" onClick={e => e.stopPropagation()}>\n {/* === Transform animation approach ===\n Overlay là visual clone với animation transform, positioned absolute\n bên trong wrapper → khớp 100% kích thước/vị trí với real box.\n Giữ body content thoát khỏi transform ancestor. */}\n <Show when={isTransformAnim() && !overlayDone()}>\n <div\n class={cn('mo04', p.class?.modal)}\n style={{ ...renderBoxStyle(), ...renderOverlayAnim() }}\n onAnimationEnd={handleOverlayAnimEnd}\n aria-hidden=\"true\"\n />\n </Show>\n\n {/* === Real modal box ===\n Dùng opacity animation (an toàn) hoặc không animation.\n Body content luôn thoát khỏi transform ancestor. */}\n <div\n class={cn('mo05', p.class?.modal)}\n style={{\n ...renderModalBoxAnim(),\n ...renderBoxStyle(),\n visibility: boxVisible() ? 'visible' : 'hidden',\n }}\n >\n {p.closable && (\n <button class={cn('mo06', p.class?.closeButton)} onClick={p.onClose} aria-label=\"Close\">\n <X size={16} />\n </button>\n )}\n\n <div class={cn('mo-header', p.class?.header)}>\n <Show when={p.header} fallback={<div class=\"mo07\">Modal ID: {modalId}</div>}>\n {p.header as Element}\n </Show>\n </div>\n\n <div class={cn('mo08', p.class?.body)}>\n <Show when={p.body}>{p.body as Element}</Show>\n </div>\n\n <Show when={p.footer}>\n <div class={cn('mo-footer', p.class?.footer)}>{p.footer as Element}</div>\n </Show>\n </div>\n </div>\n </ZIndex>\n );\n};\n\nexport const Modal = conditionalRender(ComponentModal, { preRender: 'preRender', when: 'open' });\n\nexport { ComponentModal };\n"],"mappings":"m2BA+DMqC,EAAuB,IAAIC,IAAiB,CAChD,oBACA,mBACA,aACA,cACA,aACA,WACA,WACA,gBACA,mBACA,aACA,SACA,kBACA,eACA,YACD,CAAC,CAGI,CAACC,EAAUC,GAAehC,EAAuB,EAAE,CAAC,CAC1D,SAASiC,GAAa,CACpB,IAAMC,EAASH,GAAU,CAACI,OAAO,CACjCD,EAAOE,KAAK,CACZJ,EAAYE,EAAO,CAIrB,IAAMG,EAAsB,IAAIC,IAEhC,SAASC,EAAqBC,EAAkB,CAC9C,GAAIA,EAAEE,MAAQ,SAAU,OACxB,IAAMC,EAAQZ,GAAU,CAACa,GAAG,GAAG,CAC3BD,GAAON,EAAoBQ,IAAIF,EAAM,IAAI,CAG/C,SAASG,EAAsBC,EAAYC,EAAgB,CACrDX,EAAoBY,OAAS,GAC/BC,SAASC,iBAAiB,UAAWZ,EAAqB,CAE5DF,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