@francofantomius/material-components 1.1.1 → 1.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 (380) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +2 -1
  3. package/custom-elements.json +1049 -300
  4. package/dist/chunks/{account-menu-Dau0UHTl.js → account-menu-Bo7NghIm.js} +181 -223
  5. package/dist/chunks/{account-menu-Dau0UHTl.js.map → account-menu-Bo7NghIm.js.map} +1 -1
  6. package/dist/chunks/app-drawer-DjKSuatE.js +855 -0
  7. package/dist/chunks/{app-drawer-Du1ePzxZ.js.map → app-drawer-DjKSuatE.js.map} +1 -1
  8. package/dist/chunks/{badge-G4EjcMoy.js → badge-sZzNelZz.js} +30 -34
  9. package/dist/chunks/{badge-G4EjcMoy.js.map → badge-sZzNelZz.js.map} +1 -1
  10. package/dist/chunks/{bottom-sheet-q79BBYAj.js → bottom-sheet-BGgbUmKd.js} +98 -109
  11. package/dist/chunks/{bottom-sheet-q79BBYAj.js.map → bottom-sheet-BGgbUmKd.js.map} +1 -1
  12. package/dist/chunks/{button-D2vn7kJ8.js → button-DeQQlYds.js} +62 -72
  13. package/dist/chunks/{button-D2vn7kJ8.js.map → button-DeQQlYds.js.map} +1 -1
  14. package/dist/chunks/button-group-R2jN8FXK.js +136 -0
  15. package/dist/chunks/{button-group-CNqvJx1n.js.map → button-group-R2jN8FXK.js.map} +1 -1
  16. package/dist/chunks/{card-DVffdPpv.js → card-CVhWizDF.js} +45 -50
  17. package/dist/chunks/{card-DVffdPpv.js.map → card-CVhWizDF.js.map} +1 -1
  18. package/dist/chunks/{carousel-item-BG6kjjjk.js → carousel-item-DNp2zhP9.js} +62 -73
  19. package/dist/chunks/{carousel-item-BG6kjjjk.js.map → carousel-item-DNp2zhP9.js.map} +1 -1
  20. package/dist/chunks/{checkbox-BqlboAHd.js → checkbox-CsqUHVOF.js} +59 -64
  21. package/dist/chunks/{checkbox-BqlboAHd.js.map → checkbox-CsqUHVOF.js.map} +1 -1
  22. package/dist/chunks/{chip-CI1ZINnr.js → chip-B5c-I8bj.js} +56 -63
  23. package/dist/chunks/{chip-CI1ZINnr.js.map → chip-B5c-I8bj.js.map} +1 -1
  24. package/dist/chunks/code-CM6hIZNx.js +1531 -0
  25. package/dist/chunks/{code-C5UFBkCh.js.map → code-CM6hIZNx.js.map} +1 -1
  26. package/dist/chunks/date-picker-B15_rR0f.js +774 -0
  27. package/dist/chunks/date-picker-B15_rR0f.js.map +1 -0
  28. package/dist/chunks/decorate-DknOJ8FJ.js +40 -0
  29. package/dist/chunks/{decorate-DXuynaiA.js.map → decorate-DknOJ8FJ.js.map} +1 -1
  30. package/dist/chunks/{dialog-DGVEE5m_.js → dialog-Czknf8dl.js} +47 -52
  31. package/dist/chunks/{dialog-DGVEE5m_.js.map → dialog-Czknf8dl.js.map} +1 -1
  32. package/dist/chunks/divider-DIyCOosa.js +78 -0
  33. package/dist/chunks/{divider-DNepwoZv.js.map → divider-DIyCOosa.js.map} +1 -1
  34. package/dist/chunks/{fab-C9j3WBHE.js → fab-aZC0-lHo.js} +38 -44
  35. package/dist/chunks/{fab-C9j3WBHE.js.map → fab-aZC0-lHo.js.map} +1 -1
  36. package/dist/chunks/{fab-menu.css-3pu930sZ.js → fab-menu.css-BdVg1k4c.js} +5 -6
  37. package/dist/chunks/{fab-menu.css-3pu930sZ.js.map → fab-menu.css-BdVg1k4c.js.map} +1 -1
  38. package/dist/chunks/focus-ring-K6SY_mIm.js +69 -0
  39. package/dist/chunks/{focus-ring-CuiJuM-y.js.map → focus-ring-K6SY_mIm.js.map} +1 -1
  40. package/dist/chunks/form-associated-Do5uXckv.js +69 -0
  41. package/dist/chunks/{form-associated-Cty_ZaS9.js.map → form-associated-Do5uXckv.js.map} +1 -1
  42. package/dist/chunks/icon-FvKeXi61.js +59 -0
  43. package/dist/chunks/{icon-DrNqcNEL.js.map → icon-FvKeXi61.js.map} +1 -1
  44. package/dist/chunks/{icon-button-BQz73GLa.js → icon-button-CulnCZpZ.js} +58 -67
  45. package/dist/chunks/{icon-button-BQz73GLa.js.map → icon-button-CulnCZpZ.js.map} +1 -1
  46. package/dist/chunks/{list-D8olR7oZ.js → list-D7yrbJRL.js} +64 -72
  47. package/dist/chunks/{list-D8olR7oZ.js.map → list-D7yrbJRL.js.map} +1 -1
  48. package/dist/chunks/{loading-indicator-CvWnZr9o.js → loading-indicator-D9AyxNQh.js} +41 -46
  49. package/dist/chunks/{loading-indicator-CvWnZr9o.js.map → loading-indicator-D9AyxNQh.js.map} +1 -1
  50. package/dist/chunks/{menu-item-BBSp5Cqc.js → menu-item-C3entPo7.js} +77 -91
  51. package/dist/chunks/{menu-item-BBSp5Cqc.js.map → menu-item-C3entPo7.js.map} +1 -1
  52. package/dist/chunks/{navigation-bar-item-C9DfOEzg.js → navigation-bar-item-CWHCQeNw.js} +98 -115
  53. package/dist/chunks/{navigation-bar-item-C9DfOEzg.js.map → navigation-bar-item-CWHCQeNw.js.map} +1 -1
  54. package/dist/chunks/{navigation-drawer-CKl44Ef5.js → navigation-drawer-pGer0t4z.js} +116 -138
  55. package/dist/chunks/{navigation-drawer-CKl44Ef5.js.map → navigation-drawer-pGer0t4z.js.map} +1 -1
  56. package/dist/chunks/{navigation-rail-item-6pdhNHJK.js → navigation-rail-item-CWvGjLjC.js} +70 -86
  57. package/dist/chunks/{navigation-rail-item-6pdhNHJK.js.map → navigation-rail-item-CWvGjLjC.js.map} +1 -1
  58. package/dist/chunks/{player-C4ydiIpr.js → player-dT08kxeG.js} +423 -466
  59. package/dist/chunks/{player-C4ydiIpr.js.map → player-dT08kxeG.js.map} +1 -1
  60. package/dist/chunks/{progress-LQmLMDjX.js → progress-etZuX_VD.js} +46 -53
  61. package/dist/chunks/{progress-LQmLMDjX.js.map → progress-etZuX_VD.js.map} +1 -1
  62. package/dist/chunks/radio-jPCwykIa.js +197 -0
  63. package/dist/chunks/{radio-Bily78NT.js.map → radio-jPCwykIa.js.map} +1 -1
  64. package/dist/chunks/ripple-CBOKeVfm.js +132 -0
  65. package/dist/chunks/{ripple-squbKHhj.js.map → ripple-CBOKeVfm.js.map} +1 -1
  66. package/dist/chunks/{search-bar-fUD0qU2P.js → search-bar-B6xxVT7u.js} +244 -203
  67. package/dist/chunks/search-bar-B6xxVT7u.js.map +1 -0
  68. package/dist/chunks/segmented-button-Fon9kOHV.js +253 -0
  69. package/dist/chunks/{segmented-button-B0BvGSQ7.js.map → segmented-button-Fon9kOHV.js.map} +1 -1
  70. package/dist/chunks/{side-sheet-S2w081AK.js → side-sheet-sQ8qGKVm.js} +73 -81
  71. package/dist/chunks/{side-sheet-S2w081AK.js.map → side-sheet-sQ8qGKVm.js.map} +1 -1
  72. package/dist/chunks/slider-OIyEcUU9.js +448 -0
  73. package/dist/chunks/slider-OIyEcUU9.js.map +1 -0
  74. package/dist/chunks/{snackbar-Wsz3BzEY.js → snackbar-Yi6fF9vM.js} +57 -62
  75. package/dist/chunks/{snackbar-Wsz3BzEY.js.map → snackbar-Yi6fF9vM.js.map} +1 -1
  76. package/dist/chunks/{split-button-DUfjukQY.js → split-button-CLjVJe3I.js} +155 -172
  77. package/dist/chunks/{split-button-DUfjukQY.js.map → split-button-CLjVJe3I.js.map} +1 -1
  78. package/dist/chunks/{switch-DdukrvXb.js → switch-mtu6AVEh.js} +54 -57
  79. package/dist/chunks/{switch-DdukrvXb.js.map → switch-mtu6AVEh.js.map} +1 -1
  80. package/dist/chunks/table-C5rCvdFc.js +724 -0
  81. package/dist/chunks/{table-CqHnneAj.js.map → table-C5rCvdFc.js.map} +1 -1
  82. package/dist/chunks/tabs-C0mtURlT.js +182 -0
  83. package/dist/chunks/{tabs-BfOtoeir.js.map → tabs-C0mtURlT.js.map} +1 -1
  84. package/dist/chunks/{text-field-hN6-2HQy.js → text-field-MifFD7uk.js} +92 -110
  85. package/dist/chunks/{text-field-hN6-2HQy.js.map → text-field-MifFD7uk.js.map} +1 -1
  86. package/dist/chunks/time-picker-JTcLcJuz.js +810 -0
  87. package/dist/chunks/time-picker-JTcLcJuz.js.map +1 -0
  88. package/dist/chunks/{toolbar-DXVQbQKJ.js → toolbar-CsxKc2Yd.js} +48 -55
  89. package/dist/chunks/{toolbar-DXVQbQKJ.js.map → toolbar-CsxKc2Yd.js.map} +1 -1
  90. package/dist/chunks/tooltip-Ds3lNowS.js +380 -0
  91. package/dist/chunks/{tooltip-CE7JMHMu.js.map → tooltip-Ds3lNowS.js.map} +1 -1
  92. package/dist/chunks/{top-app-bar-Dgbp6CFv.js → top-app-bar-TrnjKzOX.js} +52 -53
  93. package/dist/chunks/top-app-bar-TrnjKzOX.js.map +1 -0
  94. package/dist/components/account-menu/account-menu.js +2 -8
  95. package/dist/components/app-drawer/app-drawer.js +2 -9
  96. package/dist/components/badge/badge.js +2 -4
  97. package/dist/components/bottom-sheet/bottom-sheet.js +2 -4
  98. package/dist/components/button/button.js +2 -4
  99. package/dist/components/button-group/button-group.js +2 -4
  100. package/dist/components/card/card.js +2 -4
  101. package/dist/components/carousel/carousel-item.js +2 -4
  102. package/dist/components/carousel/carousel.js +214 -232
  103. package/dist/components/carousel/carousel.js.map +1 -1
  104. package/dist/components/checkbox/checkbox.js +2 -4
  105. package/dist/components/chip/chip.js +2 -5
  106. package/dist/components/code/code.js +2 -5
  107. package/dist/components/date-picker/date-picker.js +2 -4
  108. package/dist/components/dialog/dialog.js +2 -4
  109. package/dist/components/divider/divider.js +2 -4
  110. package/dist/components/fab/fab.js +2 -4
  111. package/dist/components/fab-menu/fab-menu-item.js +53 -61
  112. package/dist/components/fab-menu/fab-menu-item.js.map +1 -1
  113. package/dist/components/fab-menu/fab-menu.js +98 -111
  114. package/dist/components/fab-menu/fab-menu.js.map +1 -1
  115. package/dist/components/icon/icon.js +2 -4
  116. package/dist/components/icon-button/icon-button.js +2 -4
  117. package/dist/components/list/list.js +2 -5
  118. package/dist/components/loading-indicator/loading-indicator.js +2 -4
  119. package/dist/components/menu/menu-item.js +2 -4
  120. package/dist/components/menu/menu.js +165 -183
  121. package/dist/components/menu/menu.js.map +1 -1
  122. package/dist/components/navigation-bar/navigation-bar-item.js +2 -5
  123. package/dist/components/navigation-bar/navigation-bar.js +131 -143
  124. package/dist/components/navigation-bar/navigation-bar.js.map +1 -1
  125. package/dist/components/navigation-drawer/navigation-drawer.js +2 -8
  126. package/dist/components/navigation-rail/navigation-rail-item.js +2 -5
  127. package/dist/components/navigation-rail/navigation-rail.js +92 -102
  128. package/dist/components/navigation-rail/navigation-rail.js.map +1 -1
  129. package/dist/components/player/player.js +2 -7
  130. package/dist/components/progress/progress.js +2 -5
  131. package/dist/components/radio/radio.js +2 -5
  132. package/dist/components/search-bar/search-bar.js +2 -5
  133. package/dist/components/segmented-button/segmented-button.js +2 -5
  134. package/dist/components/side-sheet/side-sheet.js +2 -4
  135. package/dist/components/slider/slider.js +2 -4
  136. package/dist/components/snackbar/snackbar.js +2 -4
  137. package/dist/components/split-button/split-button.js +2 -4
  138. package/dist/components/switch/switch.js +2 -4
  139. package/dist/components/table/table.js +2 -13
  140. package/dist/components/tabs/tabs.js +2 -5
  141. package/dist/components/text-field/text-field.js +2 -4
  142. package/dist/components/time-picker/time-picker.js +2 -4
  143. package/dist/components/toolbar/toolbar.js +2 -4
  144. package/dist/components/tooltip/tooltip.js +2 -4
  145. package/dist/components/top-app-bar/top-app-bar.js +2 -5
  146. package/dist/index.js +52 -150
  147. package/dist/internal/focus-ring/focus-ring.js +2 -4
  148. package/dist/internal/ripple/ripple.js +2 -4
  149. package/dist/tokens/index.js +468 -314
  150. package/dist/tokens/index.js.map +1 -1
  151. package/llms.txt +74 -8
  152. package/package.json +2 -14
  153. package/dist/chunks/app-drawer-Du1ePzxZ.js +0 -903
  154. package/dist/chunks/button-group-CNqvJx1n.js +0 -143
  155. package/dist/chunks/code-C5UFBkCh.js +0 -1830
  156. package/dist/chunks/date-picker-DJeHi4w-.js +0 -777
  157. package/dist/chunks/date-picker-DJeHi4w-.js.map +0 -1
  158. package/dist/chunks/decorate-DXuynaiA.js +0 -39
  159. package/dist/chunks/divider-DNepwoZv.js +0 -82
  160. package/dist/chunks/focus-ring-CuiJuM-y.js +0 -71
  161. package/dist/chunks/form-associated-Cty_ZaS9.js +0 -73
  162. package/dist/chunks/icon-DrNqcNEL.js +0 -62
  163. package/dist/chunks/radio-Bily78NT.js +0 -205
  164. package/dist/chunks/ripple-squbKHhj.js +0 -135
  165. package/dist/chunks/search-bar-fUD0qU2P.js.map +0 -1
  166. package/dist/chunks/segmented-button-B0BvGSQ7.js +0 -265
  167. package/dist/chunks/slider-D-mnO8yQ.js +0 -450
  168. package/dist/chunks/slider-D-mnO8yQ.js.map +0 -1
  169. package/dist/chunks/table-CqHnneAj.js +0 -773
  170. package/dist/chunks/tabs-BfOtoeir.js +0 -191
  171. package/dist/chunks/time-picker-CZnb2sWz.js +0 -785
  172. package/dist/chunks/time-picker-CZnb2sWz.js.map +0 -1
  173. package/dist/chunks/tooltip-CE7JMHMu.js +0 -398
  174. package/dist/chunks/top-app-bar-Dgbp6CFv.js.map +0 -1
  175. package/dist/components/account-menu/account-menu.css.d.ts +0 -3
  176. package/dist/components/account-menu/account-menu.css.d.ts.map +0 -1
  177. package/dist/components/account-menu/account-menu.d.ts +0 -111
  178. package/dist/components/account-menu/account-menu.d.ts.map +0 -1
  179. package/dist/components/app-drawer/app-drawer.css.d.ts +0 -3
  180. package/dist/components/app-drawer/app-drawer.css.d.ts.map +0 -1
  181. package/dist/components/app-drawer/app-drawer.d.ts +0 -173
  182. package/dist/components/app-drawer/app-drawer.d.ts.map +0 -1
  183. package/dist/components/badge/badge.css.d.ts +0 -2
  184. package/dist/components/badge/badge.css.d.ts.map +0 -1
  185. package/dist/components/badge/badge.d.ts +0 -16
  186. package/dist/components/badge/badge.d.ts.map +0 -1
  187. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts +0 -2
  188. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts.map +0 -1
  189. package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -69
  190. package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +0 -1
  191. package/dist/components/button/button.css.d.ts +0 -2
  192. package/dist/components/button/button.css.d.ts.map +0 -1
  193. package/dist/components/button/button.d.ts +0 -25
  194. package/dist/components/button/button.d.ts.map +0 -1
  195. package/dist/components/button-group/button-group.css.d.ts +0 -2
  196. package/dist/components/button-group/button-group.css.d.ts.map +0 -1
  197. package/dist/components/button-group/button-group.d.ts +0 -28
  198. package/dist/components/button-group/button-group.d.ts.map +0 -1
  199. package/dist/components/card/card.css.d.ts +0 -2
  200. package/dist/components/card/card.css.d.ts.map +0 -1
  201. package/dist/components/card/card.d.ts +0 -18
  202. package/dist/components/card/card.d.ts.map +0 -1
  203. package/dist/components/carousel/carousel-item.d.ts +0 -33
  204. package/dist/components/carousel/carousel-item.d.ts.map +0 -1
  205. package/dist/components/carousel/carousel.css.d.ts +0 -3
  206. package/dist/components/carousel/carousel.css.d.ts.map +0 -1
  207. package/dist/components/carousel/carousel.d.ts +0 -81
  208. package/dist/components/carousel/carousel.d.ts.map +0 -1
  209. package/dist/components/checkbox/checkbox.css.d.ts +0 -2
  210. package/dist/components/checkbox/checkbox.css.d.ts.map +0 -1
  211. package/dist/components/checkbox/checkbox.d.ts +0 -24
  212. package/dist/components/checkbox/checkbox.d.ts.map +0 -1
  213. package/dist/components/chip/chip.css.d.ts +0 -3
  214. package/dist/components/chip/chip.css.d.ts.map +0 -1
  215. package/dist/components/chip/chip.d.ts +0 -27
  216. package/dist/components/chip/chip.d.ts.map +0 -1
  217. package/dist/components/code/code.css.d.ts +0 -2
  218. package/dist/components/code/code.css.d.ts.map +0 -1
  219. package/dist/components/code/code.d.ts +0 -106
  220. package/dist/components/code/code.d.ts.map +0 -1
  221. package/dist/components/code/highlighter.d.ts +0 -8
  222. package/dist/components/code/highlighter.d.ts.map +0 -1
  223. package/dist/components/code/linter.d.ts +0 -44
  224. package/dist/components/code/linter.d.ts.map +0 -1
  225. package/dist/components/date-picker/date-picker.css.d.ts +0 -2
  226. package/dist/components/date-picker/date-picker.css.d.ts.map +0 -1
  227. package/dist/components/date-picker/date-picker.d.ts +0 -59
  228. package/dist/components/date-picker/date-picker.d.ts.map +0 -1
  229. package/dist/components/dialog/dialog.css.d.ts +0 -2
  230. package/dist/components/dialog/dialog.css.d.ts.map +0 -1
  231. package/dist/components/dialog/dialog.d.ts +0 -22
  232. package/dist/components/dialog/dialog.d.ts.map +0 -1
  233. package/dist/components/divider/divider.css.d.ts +0 -2
  234. package/dist/components/divider/divider.css.d.ts.map +0 -1
  235. package/dist/components/divider/divider.d.ts +0 -16
  236. package/dist/components/divider/divider.d.ts.map +0 -1
  237. package/dist/components/fab/fab.css.d.ts +0 -2
  238. package/dist/components/fab/fab.css.d.ts.map +0 -1
  239. package/dist/components/fab/fab.d.ts +0 -19
  240. package/dist/components/fab/fab.d.ts.map +0 -1
  241. package/dist/components/fab-menu/fab-menu-item.d.ts +0 -35
  242. package/dist/components/fab-menu/fab-menu-item.d.ts.map +0 -1
  243. package/dist/components/fab-menu/fab-menu.css.d.ts +0 -3
  244. package/dist/components/fab-menu/fab-menu.css.d.ts.map +0 -1
  245. package/dist/components/fab-menu/fab-menu.d.ts +0 -72
  246. package/dist/components/fab-menu/fab-menu.d.ts.map +0 -1
  247. package/dist/components/icon/icon.css.d.ts +0 -2
  248. package/dist/components/icon/icon.css.d.ts.map +0 -1
  249. package/dist/components/icon/icon.d.ts +0 -15
  250. package/dist/components/icon/icon.d.ts.map +0 -1
  251. package/dist/components/icon-button/icon-button.css.d.ts +0 -2
  252. package/dist/components/icon-button/icon-button.css.d.ts.map +0 -1
  253. package/dist/components/icon-button/icon-button.d.ts +0 -22
  254. package/dist/components/icon-button/icon-button.d.ts.map +0 -1
  255. package/dist/components/list/list.css.d.ts +0 -3
  256. package/dist/components/list/list.css.d.ts.map +0 -1
  257. package/dist/components/list/list.d.ts +0 -25
  258. package/dist/components/list/list.d.ts.map +0 -1
  259. package/dist/components/loading-indicator/loading-indicator.css.d.ts +0 -2
  260. package/dist/components/loading-indicator/loading-indicator.css.d.ts.map +0 -1
  261. package/dist/components/loading-indicator/loading-indicator.d.ts +0 -48
  262. package/dist/components/loading-indicator/loading-indicator.d.ts.map +0 -1
  263. package/dist/components/menu/menu-item.d.ts +0 -41
  264. package/dist/components/menu/menu-item.d.ts.map +0 -1
  265. package/dist/components/menu/menu.css.d.ts +0 -3
  266. package/dist/components/menu/menu.css.d.ts.map +0 -1
  267. package/dist/components/menu/menu.d.ts +0 -91
  268. package/dist/components/menu/menu.d.ts.map +0 -1
  269. package/dist/components/navigation-bar/navigation-bar-item.d.ts +0 -49
  270. package/dist/components/navigation-bar/navigation-bar-item.d.ts.map +0 -1
  271. package/dist/components/navigation-bar/navigation-bar.css.d.ts +0 -3
  272. package/dist/components/navigation-bar/navigation-bar.css.d.ts.map +0 -1
  273. package/dist/components/navigation-bar/navigation-bar.d.ts +0 -50
  274. package/dist/components/navigation-bar/navigation-bar.d.ts.map +0 -1
  275. package/dist/components/navigation-drawer/navigation-drawer.css.d.ts +0 -3
  276. package/dist/components/navigation-drawer/navigation-drawer.css.d.ts.map +0 -1
  277. package/dist/components/navigation-drawer/navigation-drawer.d.ts +0 -76
  278. package/dist/components/navigation-drawer/navigation-drawer.d.ts.map +0 -1
  279. package/dist/components/navigation-rail/navigation-rail-item.d.ts +0 -36
  280. package/dist/components/navigation-rail/navigation-rail-item.d.ts.map +0 -1
  281. package/dist/components/navigation-rail/navigation-rail.css.d.ts +0 -3
  282. package/dist/components/navigation-rail/navigation-rail.css.d.ts.map +0 -1
  283. package/dist/components/navigation-rail/navigation-rail.d.ts +0 -43
  284. package/dist/components/navigation-rail/navigation-rail.d.ts.map +0 -1
  285. package/dist/components/player/player.css.d.ts +0 -2
  286. package/dist/components/player/player.css.d.ts.map +0 -1
  287. package/dist/components/player/player.d.ts +0 -99
  288. package/dist/components/player/player.d.ts.map +0 -1
  289. package/dist/components/progress/progress.css.d.ts +0 -2
  290. package/dist/components/progress/progress.css.d.ts.map +0 -1
  291. package/dist/components/progress/progress.d.ts +0 -21
  292. package/dist/components/progress/progress.d.ts.map +0 -1
  293. package/dist/components/radio/radio.css.d.ts +0 -3
  294. package/dist/components/radio/radio.css.d.ts.map +0 -1
  295. package/dist/components/radio/radio.d.ts +0 -38
  296. package/dist/components/radio/radio.d.ts.map +0 -1
  297. package/dist/components/search-bar/search-bar.css.d.ts +0 -2
  298. package/dist/components/search-bar/search-bar.css.d.ts.map +0 -1
  299. package/dist/components/search-bar/search-bar.d.ts +0 -81
  300. package/dist/components/search-bar/search-bar.d.ts.map +0 -1
  301. package/dist/components/segmented-button/segmented-button.css.d.ts +0 -3
  302. package/dist/components/segmented-button/segmented-button.css.d.ts.map +0 -1
  303. package/dist/components/segmented-button/segmented-button.d.ts +0 -40
  304. package/dist/components/segmented-button/segmented-button.d.ts.map +0 -1
  305. package/dist/components/side-sheet/side-sheet.css.d.ts +0 -2
  306. package/dist/components/side-sheet/side-sheet.css.d.ts.map +0 -1
  307. package/dist/components/side-sheet/side-sheet.d.ts +0 -57
  308. package/dist/components/side-sheet/side-sheet.d.ts.map +0 -1
  309. package/dist/components/slider/slider.css.d.ts +0 -2
  310. package/dist/components/slider/slider.css.d.ts.map +0 -1
  311. package/dist/components/slider/slider.d.ts +0 -51
  312. package/dist/components/slider/slider.d.ts.map +0 -1
  313. package/dist/components/snackbar/snackbar.css.d.ts +0 -2
  314. package/dist/components/snackbar/snackbar.css.d.ts.map +0 -1
  315. package/dist/components/snackbar/snackbar.d.ts +0 -24
  316. package/dist/components/snackbar/snackbar.d.ts.map +0 -1
  317. package/dist/components/split-button/split-button.css.d.ts +0 -2
  318. package/dist/components/split-button/split-button.css.d.ts.map +0 -1
  319. package/dist/components/split-button/split-button.d.ts +0 -89
  320. package/dist/components/split-button/split-button.d.ts.map +0 -1
  321. package/dist/components/switch/switch.css.d.ts +0 -2
  322. package/dist/components/switch/switch.css.d.ts.map +0 -1
  323. package/dist/components/switch/switch.d.ts +0 -22
  324. package/dist/components/switch/switch.d.ts.map +0 -1
  325. package/dist/components/table/table.css.d.ts +0 -8
  326. package/dist/components/table/table.css.d.ts.map +0 -1
  327. package/dist/components/table/table.d.ts +0 -158
  328. package/dist/components/table/table.d.ts.map +0 -1
  329. package/dist/components/tabs/tabs.css.d.ts +0 -3
  330. package/dist/components/tabs/tabs.css.d.ts.map +0 -1
  331. package/dist/components/tabs/tabs.d.ts +0 -33
  332. package/dist/components/tabs/tabs.d.ts.map +0 -1
  333. package/dist/components/text-field/text-field.css.d.ts +0 -2
  334. package/dist/components/text-field/text-field.css.d.ts.map +0 -1
  335. package/dist/components/text-field/text-field.d.ts +0 -40
  336. package/dist/components/text-field/text-field.d.ts.map +0 -1
  337. package/dist/components/time-picker/time-picker.css.d.ts +0 -2
  338. package/dist/components/time-picker/time-picker.css.d.ts.map +0 -1
  339. package/dist/components/time-picker/time-picker.d.ts +0 -87
  340. package/dist/components/time-picker/time-picker.d.ts.map +0 -1
  341. package/dist/components/toolbar/toolbar.css.d.ts +0 -2
  342. package/dist/components/toolbar/toolbar.css.d.ts.map +0 -1
  343. package/dist/components/toolbar/toolbar.d.ts +0 -53
  344. package/dist/components/toolbar/toolbar.d.ts.map +0 -1
  345. package/dist/components/tooltip/tooltip.css.d.ts +0 -2
  346. package/dist/components/tooltip/tooltip.css.d.ts.map +0 -1
  347. package/dist/components/tooltip/tooltip.d.ts +0 -89
  348. package/dist/components/tooltip/tooltip.d.ts.map +0 -1
  349. package/dist/components/top-app-bar/top-app-bar.css.d.ts +0 -2
  350. package/dist/components/top-app-bar/top-app-bar.css.d.ts.map +0 -1
  351. package/dist/components/top-app-bar/top-app-bar.d.ts +0 -29
  352. package/dist/components/top-app-bar/top-app-bar.d.ts.map +0 -1
  353. package/dist/index.d.ts +0 -52
  354. package/dist/index.d.ts.map +0 -1
  355. package/dist/internal/base-component.d.ts +0 -13
  356. package/dist/internal/base-component.d.ts.map +0 -1
  357. package/dist/internal/focus-ring/focus-ring.css.d.ts +0 -2
  358. package/dist/internal/focus-ring/focus-ring.css.d.ts.map +0 -1
  359. package/dist/internal/focus-ring/focus-ring.d.ts +0 -18
  360. package/dist/internal/focus-ring/focus-ring.d.ts.map +0 -1
  361. package/dist/internal/form-associated.d.ts +0 -26
  362. package/dist/internal/form-associated.d.ts.map +0 -1
  363. package/dist/internal/ripple/ripple.css.d.ts +0 -2
  364. package/dist/internal/ripple/ripple.css.d.ts.map +0 -1
  365. package/dist/internal/ripple/ripple.d.ts +0 -23
  366. package/dist/internal/ripple/ripple.d.ts.map +0 -1
  367. package/dist/tokens/colors.d.ts +0 -42
  368. package/dist/tokens/colors.d.ts.map +0 -1
  369. package/dist/tokens/elevation.d.ts +0 -9
  370. package/dist/tokens/elevation.d.ts.map +0 -1
  371. package/dist/tokens/index.d.ts +0 -7
  372. package/dist/tokens/index.d.ts.map +0 -1
  373. package/dist/tokens/motion.d.ts +0 -21
  374. package/dist/tokens/motion.d.ts.map +0 -1
  375. package/dist/tokens/shape.d.ts +0 -10
  376. package/dist/tokens/shape.d.ts.map +0 -1
  377. package/dist/tokens/theme.css.d.ts +0 -4
  378. package/dist/tokens/theme.css.d.ts.map +0 -1
  379. package/dist/tokens/typography.d.ts +0 -101
  380. package/dist/tokens/typography.d.ts.map +0 -1
@@ -1,1830 +0,0 @@
1
- import { n as E, t as v } from "./decorate-DXuynaiA.js";
2
- import "./icon-DrNqcNEL.js";
3
- import { css as T, html as x, nothing as C } from "lit";
4
- import { customElement as N, property as k, state as L } from "lit/decorators.js";
5
- import { unsafeHTML as O } from "lit/directives/unsafe-html.js";
6
- var M = T`
7
- :host {
8
- display: block;
9
- box-sizing: border-box;
10
- font-family: 'Fira Code', 'Roboto Mono', Consolas, Monaco, 'Courier New', monospace;
11
- --md-code-bg: var(--md-sys-color-surface-container, #f3edf7);
12
- --md-code-header-bg: var(--md-sys-color-surface-container-high, #ece6f0);
13
- --md-code-border: var(--md-sys-color-outline-variant, #cac4d0);
14
- --md-code-color: var(--md-sys-color-on-surface, #1d1b20);
15
- --md-code-gutter-color: var(--md-sys-color-outline, #79747e);
16
- --md-code-gutter-bg: transparent;
17
- --md-code-radius: var(--md-sys-shape-corner-medium, 12px);
18
- --md-code-font-size: 13.5px;
19
- --md-code-line-height: 1.6;
20
- margin: 1rem 0;
21
- }
22
-
23
- .code-container {
24
- position: relative;
25
- display: flex;
26
- flex-direction: column;
27
- background-color: var(--md-code-bg);
28
- border: 1px solid var(--md-code-border);
29
- border-radius: var(--md-code-radius);
30
- overflow: hidden;
31
- color: var(--md-code-color);
32
- }
33
-
34
- /* Header Bar */
35
- .code-header {
36
- display: flex;
37
- align-items: center;
38
- justify-content: space-between;
39
- padding: 6px 12px;
40
- background-color: var(--md-code-header-bg);
41
- border-bottom: 1px solid var(--md-code-border);
42
- min-height: 40px;
43
- font-size: 12.5px;
44
- font-weight: 500;
45
- user-select: none;
46
- }
47
-
48
- .code-header-left {
49
- display: flex;
50
- align-items: center;
51
- gap: 8px;
52
- overflow: hidden;
53
- text-overflow: ellipsis;
54
- white-space: nowrap;
55
- }
56
-
57
- .lang-badge {
58
- display: inline-flex;
59
- align-items: center;
60
- padding: 2px 8px;
61
- background-color: var(--md-sys-color-secondary-container, #e8def8);
62
- color: var(--md-sys-color-on-secondary-container, #1d192b);
63
- border-radius: var(--md-sys-shape-corner-full, 9999px);
64
- font-size: 11px;
65
- font-weight: 600;
66
- text-transform: uppercase;
67
- letter-spacing: 0.5px;
68
- }
69
-
70
- .code-filename {
71
- font-weight: 500;
72
- color: var(--md-sys-color-on-surface, #1d1b20);
73
- overflow: hidden;
74
- text-overflow: ellipsis;
75
- }
76
-
77
- .code-header-actions {
78
- display: flex;
79
- align-items: center;
80
- gap: 4px;
81
- margin-left: auto;
82
- }
83
-
84
- /* Floating Copy Button (when header is hidden) */
85
- .floating-copy-btn {
86
- position: absolute;
87
- top: 8px;
88
- right: 8px;
89
- z-index: 5;
90
- }
91
-
92
- /* Copy Button inside header or floating */
93
- .action-btn {
94
- display: inline-flex;
95
- align-items: center;
96
- justify-content: center;
97
- gap: 6px;
98
- height: 28px;
99
- padding: 0 10px;
100
- border: none;
101
- border-radius: var(--md-sys-shape-corner-small, 8px);
102
- background-color: transparent;
103
- color: var(--md-sys-color-on-surface-variant, #49454f);
104
- font-family: var(--md-sys-typescale-font-family, 'Roboto', sans-serif);
105
- font-size: 12px;
106
- font-weight: 500;
107
- cursor: pointer;
108
- transition: background-color 150ms ease, color 150ms ease;
109
- outline: none;
110
- }
111
-
112
- .action-btn:hover {
113
- background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
114
- color: var(--md-sys-color-on-surface, #1d1b20);
115
- }
116
-
117
- .action-btn:active {
118
- background-color: var(--md-sys-color-secondary-container, #e8def8);
119
- }
120
-
121
- .action-btn.copied {
122
- color: var(--md-sys-color-primary, #6750a4);
123
- background-color: var(--md-sys-color-primary-container, #eaddff);
124
- }
125
-
126
- .action-btn md-icon {
127
- --md-icon-size: 16px;
128
- }
129
-
130
- /* Code Viewport & Scroll Area */
131
- .code-body {
132
- position: relative;
133
- display: flex;
134
- overflow-x: auto;
135
- overflow-y: auto;
136
- font-size: var(--md-code-font-size);
137
- line-height: var(--md-code-line-height);
138
- }
139
-
140
- pre {
141
- margin: 0;
142
- padding: 12px 16px;
143
- font-family: inherit;
144
- font-size: inherit;
145
- line-height: inherit;
146
- tab-size: 2;
147
- flex-grow: 1;
148
- overflow: visible;
149
- }
150
-
151
- code {
152
- font-family: inherit;
153
- font-size: inherit;
154
- line-height: inherit;
155
- display: block;
156
- }
157
-
158
- :host([wrap-lines]) pre {
159
- white-space: pre-wrap;
160
- word-break: break-word;
161
- }
162
-
163
- :host(:not([wrap-lines])) pre {
164
- white-space: pre;
165
- }
166
-
167
- /* Line Structure */
168
- .code-line {
169
- display: block;
170
- padding: 0 4px;
171
- border-radius: 2px;
172
- }
173
-
174
- .code-line.highlighted {
175
- background-color: rgba(103, 80, 164, 0.12);
176
- }
177
-
178
- .code-line.has-error {
179
- background-color: rgba(179, 38, 30, 0.14);
180
- }
181
-
182
- .code-line.has-warning {
183
- background-color: rgba(230, 81, 0, 0.12);
184
- }
185
-
186
- /* Gutter & Line Numbers */
187
- .code-gutter {
188
- display: flex;
189
- flex-direction: column;
190
- padding: 12px 0 12px 10px;
191
- user-select: none;
192
- background-color: var(--md-code-gutter-bg);
193
- border-right: 1px solid var(--md-code-border);
194
- flex-shrink: 0;
195
- min-width: 44px;
196
- box-sizing: border-box;
197
- }
198
-
199
- .gutter-line {
200
- display: flex;
201
- align-items: center;
202
- justify-content: flex-end;
203
- gap: 4px;
204
- height: calc(var(--md-code-font-size) * var(--md-code-line-height));
205
- padding-right: 8px;
206
- color: var(--md-code-gutter-color);
207
- font-size: 11.5px;
208
- }
209
-
210
- .gutter-marker {
211
- display: inline-flex;
212
- align-items: center;
213
- justify-content: center;
214
- width: 14px;
215
- height: 14px;
216
- cursor: pointer;
217
- }
218
-
219
- .gutter-marker.error {
220
- color: var(--md-sys-color-error, #b3261e);
221
- }
222
-
223
- .gutter-marker.warning {
224
- color: #e65100;
225
- }
226
-
227
- .gutter-marker.info {
228
- color: var(--md-sys-color-primary, #6750a4);
229
- }
230
-
231
- .gutter-marker md-icon {
232
- --md-icon-size: 14px;
233
- }
234
-
235
- /* Lint Status Footer Bar */
236
- .lint-footer {
237
- display: flex;
238
- flex-direction: column;
239
- background-color: var(--md-code-header-bg);
240
- border-top: 1px solid var(--md-code-border);
241
- font-size: 12px;
242
- font-family: var(--md-sys-typescale-font-family, 'Roboto', sans-serif);
243
- }
244
-
245
- .lint-footer-summary {
246
- display: flex;
247
- align-items: center;
248
- justify-content: space-between;
249
- padding: 6px 12px;
250
- cursor: pointer;
251
- user-select: none;
252
- }
253
-
254
- .lint-footer-summary:hover {
255
- background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
256
- }
257
-
258
- .lint-counts {
259
- display: flex;
260
- align-items: center;
261
- gap: 12px;
262
- }
263
-
264
- .lint-count-item {
265
- display: inline-flex;
266
- align-items: center;
267
- gap: 4px;
268
- font-weight: 500;
269
- }
270
-
271
- .lint-count-item.errors {
272
- color: var(--md-sys-color-error, #b3261e);
273
- }
274
-
275
- .lint-count-item.warnings {
276
- color: #e65100;
277
- }
278
-
279
- .lint-count-item.valid {
280
- color: #2e7d32;
281
- }
282
-
283
- .lint-count-item md-icon {
284
- --md-icon-size: 15px;
285
- }
286
-
287
- .lint-issues-list {
288
- display: flex;
289
- flex-direction: column;
290
- max-height: 160px;
291
- overflow-y: auto;
292
- border-top: 1px solid var(--md-code-border);
293
- background-color: var(--md-code-bg);
294
- }
295
-
296
- .lint-issue-item {
297
- display: flex;
298
- align-items: flex-start;
299
- gap: 8px;
300
- padding: 6px 12px;
301
- border-bottom: 1px solid var(--md-code-border);
302
- cursor: pointer;
303
- transition: background-color 100ms ease;
304
- }
305
-
306
- .lint-issue-item:last-child {
307
- border-bottom: none;
308
- }
309
-
310
- .lint-issue-item:hover {
311
- background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
312
- }
313
-
314
- .lint-issue-item.error md-icon {
315
- color: var(--md-sys-color-error, #b3261e);
316
- --md-icon-size: 16px;
317
- }
318
-
319
- .lint-issue-item.warning md-icon {
320
- color: #e65100;
321
- --md-icon-size: 16px;
322
- }
323
-
324
- .lint-issue-item.info md-icon {
325
- color: var(--md-sys-color-primary, #6750a4);
326
- --md-icon-size: 16px;
327
- }
328
-
329
- .lint-issue-content {
330
- display: flex;
331
- flex-direction: column;
332
- gap: 2px;
333
- flex-grow: 1;
334
- }
335
-
336
- .lint-issue-loc {
337
- font-weight: 600;
338
- font-size: 11px;
339
- color: var(--md-sys-color-outline, #79747e);
340
- }
341
-
342
- .lint-issue-msg {
343
- font-size: 12px;
344
- color: var(--md-sys-color-on-surface, #1d1b20);
345
- }
346
-
347
- /* --- Syntax Highlighting Colors (MD3 Color Scheme Aware) --- */
348
- .token-keyword {
349
- color: var(--md-code-token-keyword, var(--md-sys-color-primary, #6750a4));
350
- font-weight: 600;
351
- }
352
-
353
- .token-string {
354
- color: var(--md-code-token-string, #198754);
355
- }
356
-
357
- .token-comment {
358
- color: var(--md-code-token-comment, var(--md-sys-color-outline, #79747e));
359
- font-style: italic;
360
- }
361
-
362
- .token-function {
363
- color: var(--md-code-token-function, var(--md-sys-color-tertiary, #7d5260));
364
- font-weight: 500;
365
- }
366
-
367
- .token-number {
368
- color: var(--md-code-token-number, #b35900);
369
- }
370
-
371
- .token-boolean {
372
- color: var(--md-code-token-boolean, #d9381e);
373
- font-weight: 600;
374
- }
375
-
376
- .token-constant {
377
- color: var(--md-code-token-constant, #b3261e);
378
- font-weight: 600;
379
- }
380
-
381
- .token-tag {
382
- color: var(--md-code-token-tag, var(--md-sys-color-primary, #6750a4));
383
- font-weight: 600;
384
- }
385
-
386
- .token-attr-name {
387
- color: var(--md-code-token-attr-name, var(--md-sys-color-secondary, #625b71));
388
- }
389
-
390
- .token-property {
391
- color: var(--md-code-token-property, var(--md-sys-color-primary, #6750a4));
392
- }
393
-
394
- .token-type {
395
- color: var(--md-code-token-type, #00838f);
396
- font-weight: 500;
397
- }
398
-
399
- .token-variable {
400
- color: var(--md-code-token-variable, #e65100);
401
- }
402
-
403
- .token-operator {
404
- color: var(--md-code-token-operator, var(--md-sys-color-on-surface-variant, #49454f));
405
- }
406
-
407
- .token-punctuation {
408
- color: var(--md-code-token-punctuation, var(--md-sys-color-outline, #79747e));
409
- }
410
-
411
- /* Dark Theme Adjustments */
412
- :host-context([data-theme='dark']) .token-string,
413
- :host([data-theme='dark']) .token-string {
414
- color: #4ade80;
415
- }
416
-
417
- :host-context([data-theme='dark']) .token-number,
418
- :host([data-theme='dark']) .token-number {
419
- color: #fb923c;
420
- }
421
-
422
- :host-context([data-theme='dark']) .token-type,
423
- :host([data-theme='dark']) .token-type {
424
- color: #38bdf8;
425
- }
426
-
427
- :host-context([data-theme='dark']) .token-boolean,
428
- :host([data-theme='dark']) .token-boolean {
429
- color: #f87171;
430
- }
431
- `;
432
- function l(e) {
433
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
434
- }
435
- function c(e, r) {
436
- return `<span class="token-${e}">${r}</span>`;
437
- }
438
- function B(e) {
439
- const r = /* @__PURE__ */ new Set([
440
- "abstract",
441
- "any",
442
- "as",
443
- "async",
444
- "await",
445
- "boolean",
446
- "break",
447
- "case",
448
- "catch",
449
- "class",
450
- "const",
451
- "constructor",
452
- "continue",
453
- "debugger",
454
- "declare",
455
- "default",
456
- "delete",
457
- "do",
458
- "else",
459
- "enum",
460
- "export",
461
- "extends",
462
- "false",
463
- "finally",
464
- "for",
465
- "from",
466
- "function",
467
- "get",
468
- "if",
469
- "implements",
470
- "import",
471
- "in",
472
- "infer",
473
- "instanceof",
474
- "interface",
475
- "is",
476
- "keyof",
477
- "let",
478
- "module",
479
- "namespace",
480
- "never",
481
- "new",
482
- "null",
483
- "number",
484
- "of",
485
- "override",
486
- "package",
487
- "private",
488
- "protected",
489
- "public",
490
- "readonly",
491
- "require",
492
- "return",
493
- "set",
494
- "static",
495
- "string",
496
- "super",
497
- "switch",
498
- "symbol",
499
- "this",
500
- "throw",
501
- "true",
502
- "try",
503
- "type",
504
- "typeof",
505
- "undefined",
506
- "unique",
507
- "unknown",
508
- "var",
509
- "void",
510
- "while",
511
- "with",
512
- "yield"
513
- ]);
514
- let i = "", n = 0;
515
- const o = e.length;
516
- for (; n < o; ) {
517
- if (e[n] === "/" && e[n + 1] === "/") {
518
- let t = e.indexOf(`
519
- `, n);
520
- t === -1 && (t = o), i += c("comment", l(e.slice(n, t))), n = t;
521
- continue;
522
- }
523
- if (e[n] === "/" && e[n + 1] === "*") {
524
- let t = e.indexOf("*/", n + 2);
525
- t === -1 ? t = o : t += 2, i += c("comment", l(e.slice(n, t))), n = t;
526
- continue;
527
- }
528
- if (e[n] === "`") {
529
- let t = n + 1;
530
- for (; t < o && e[t] !== "`"; )
531
- e[t] === "\\" && t++, t++;
532
- t < o && t++, i += c("string", l(e.slice(n, t))), n = t;
533
- continue;
534
- }
535
- if (e[n] === '"' || e[n] === "'") {
536
- const t = e[n];
537
- let s = n + 1;
538
- for (; s < o && e[s] !== t && e[s] !== `
539
- `; )
540
- e[s] === "\\" && s++, s++;
541
- s < o && e[s] === t && s++, i += c("string", l(e.slice(n, s))), n = s;
542
- continue;
543
- }
544
- if (/[0-9]/.test(e[n]) || e[n] === "." && /[0-9]/.test(e[n + 1] || "")) {
545
- let t = n;
546
- for (; t < o && /[0-9a-fA-FxXbBoOeE_.]/.test(e[t]); ) t++;
547
- i += c("number", l(e.slice(n, t))), n = t;
548
- continue;
549
- }
550
- if (/[a-zA-Z_$]/.test(e[n])) {
551
- let t = n;
552
- for (; t < o && /[a-zA-Z0-9_$]/.test(e[t]); ) t++;
553
- const s = e.slice(n, t);
554
- let a = t;
555
- for (; a < o && /\s/.test(e[a]); ) a++;
556
- const d = e[a] === "(";
557
- s === "true" || s === "false" ? i += c("boolean", l(s)) : s === "null" || s === "undefined" ? i += c("constant", l(s)) : r.has(s) ? i += c("keyword", l(s)) : /^[A-Z][a-zA-Z0-9_$]*$/.test(s) && !d ? i += c("type", l(s)) : d ? i += c("function", l(s)) : i += l(s), n = t;
558
- continue;
559
- }
560
- if (/[+\-*/%=&|<>!^~?:.]/.test(e[n])) {
561
- let t = n;
562
- for (; t < o && /[+\-*/%=&|<>!^~?:.]/.test(e[t]); ) t++;
563
- i += c("operator", l(e.slice(n, t))), n = t;
564
- continue;
565
- }
566
- if (/[{}()[\];,]/.test(e[n])) {
567
- i += c("punctuation", l(e[n])), n++;
568
- continue;
569
- }
570
- i += l(e[n]), n++;
571
- }
572
- return i;
573
- }
574
- function j(e) {
575
- let r = "", i = 0;
576
- const n = e.length;
577
- for (; i < n; ) {
578
- if (e.slice(i, i + 4) === "<!--") {
579
- let o = e.indexOf("-->", i + 4);
580
- o === -1 ? o = n : o += 3, r += c("comment", l(e.slice(i, o))), i = o;
581
- continue;
582
- }
583
- if (e[i] === "<") {
584
- let o = e.indexOf(">", i);
585
- o === -1 ? o = n : o += 1;
586
- const t = e.slice(i, o), s = t.match(/^<\/?([a-zA-Z0-9\-:]+)/);
587
- if (s && s[1]) {
588
- let a = c("punctuation", l(t.startsWith("</") ? "</" : "<"));
589
- a += c("tag", l(s[1]));
590
- let d = t.slice(s[0].length);
591
- const h = /([a-zA-Z0-9\-:@?]+)(\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+))?/g;
592
- let p = 0, f;
593
- for (; (f = h.exec(d)) !== null; ) {
594
- f[0];
595
- const m = f[1], g = f[2];
596
- if (a += l(d.slice(p, f.index)), a += c("attr-name", l(m)), g) {
597
- const y = g.indexOf("=");
598
- a += c("operator", "=");
599
- const w = g.slice(y + 1).trim();
600
- a += c("string", l(w));
601
- }
602
- p = h.lastIndex;
603
- }
604
- const u = d.slice(p);
605
- u.endsWith("/>") ? a += l(u.slice(0, -2)) + c("punctuation", "/&gt;") : u.endsWith(">") ? a += l(u.slice(0, -1)) + c("punctuation", "&gt;") : a += l(u), r += a;
606
- } else r += l(t);
607
- i = o;
608
- continue;
609
- }
610
- r += l(e[i]), i++;
611
- }
612
- return r;
613
- }
614
- function U(e) {
615
- let r = "", i = 0;
616
- const n = e.length;
617
- let o = !1;
618
- for (; i < n; ) {
619
- if (e[i] === "/" && e[i + 1] === "*") {
620
- let t = e.indexOf("*/", i + 2);
621
- t === -1 ? t = n : t += 2, r += c("comment", l(e.slice(i, t))), i = t;
622
- continue;
623
- }
624
- if (e[i] === '"' || e[i] === "'") {
625
- const t = e[i];
626
- let s = i + 1;
627
- for (; s < n && e[s] !== t && e[s] !== `
628
- `; ) s++;
629
- s < n && e[s] === t && s++, r += c("string", l(e.slice(i, s))), i = s;
630
- continue;
631
- }
632
- if (e[i] === "{") {
633
- o = !0, r += c("punctuation", "{"), i++;
634
- continue;
635
- }
636
- if (e[i] === "}") {
637
- o = !1, r += c("punctuation", "}"), i++;
638
- continue;
639
- }
640
- if (o && /[a-zA-Z-]/.test(e[i])) {
641
- let t = i;
642
- for (; t < n && /[a-zA-Z0-9_-]/.test(e[t]); ) t++;
643
- const s = e.slice(i, t);
644
- let a = t;
645
- for (; a < n && /\s/.test(e[a]); ) a++;
646
- if (e[a] === ":") {
647
- r += c("property", l(s)), r += l(e.slice(t, a)), r += c("punctuation", ":"), i = a + 1;
648
- continue;
649
- }
650
- }
651
- if (/[0-9]/.test(e[i])) {
652
- let t = i;
653
- for (; t < n && /[0-9a-zA-Z%.]/.test(e[t]); ) t++;
654
- r += c("number", l(e.slice(i, t))), i = t;
655
- continue;
656
- }
657
- if (e[i] === "#" && /[0-9a-fA-F]/.test(e[i + 1] || "")) {
658
- let t = i + 1;
659
- for (; t < n && /[0-9a-fA-F]/.test(e[t]); ) t++;
660
- r += c("number", l(e.slice(i, t))), i = t;
661
- continue;
662
- }
663
- if (/[;:(),]/.test(e[i])) {
664
- r += c("punctuation", l(e[i])), i++;
665
- continue;
666
- }
667
- r += l(e[i]), i++;
668
- }
669
- return r;
670
- }
671
- function W(e) {
672
- let r = "", i = 0;
673
- const n = e.length;
674
- for (; i < n; ) {
675
- if (e[i] === '"') {
676
- let o = i + 1;
677
- for (; o < n && e[o] !== '"'; )
678
- e[o] === "\\" && o++, o++;
679
- o < n && o++;
680
- const t = e.slice(i, o);
681
- let s = o;
682
- for (; s < n && /\s/.test(e[s]); ) s++;
683
- e[s] === ":" ? r += c("property", l(t)) : r += c("string", l(t)), i = o;
684
- continue;
685
- }
686
- if (/[0-9-]/.test(e[i])) {
687
- let o = i;
688
- for (; o < n && /[0-9.eE+-]/.test(e[o]); ) o++;
689
- r += c("number", l(e.slice(i, o))), i = o;
690
- continue;
691
- }
692
- if (/[a-zA-Z]/.test(e[i])) {
693
- let o = i;
694
- for (; o < n && /[a-zA-Z]/.test(e[o]); ) o++;
695
- const t = e.slice(i, o);
696
- t === "true" || t === "false" ? r += c("boolean", l(t)) : t === "null" ? r += c("constant", l(t)) : r += l(t), i = o;
697
- continue;
698
- }
699
- if (/[{}[\]:,]/.test(e[i])) {
700
- r += c("punctuation", l(e[i])), i++;
701
- continue;
702
- }
703
- r += l(e[i]), i++;
704
- }
705
- return r;
706
- }
707
- function H(e) {
708
- const r = /* @__PURE__ */ new Set([
709
- "and",
710
- "as",
711
- "assert",
712
- "async",
713
- "await",
714
- "break",
715
- "class",
716
- "continue",
717
- "def",
718
- "del",
719
- "elif",
720
- "else",
721
- "except",
722
- "False",
723
- "finally",
724
- "for",
725
- "from",
726
- "global",
727
- "if",
728
- "import",
729
- "in",
730
- "is",
731
- "lambda",
732
- "None",
733
- "nonlocal",
734
- "not",
735
- "or",
736
- "pass",
737
- "raise",
738
- "return",
739
- "True",
740
- "try",
741
- "while",
742
- "with",
743
- "yield",
744
- "self"
745
- ]);
746
- let i = "", n = 0;
747
- const o = e.length;
748
- for (; n < o; ) {
749
- if (e[n] === "#") {
750
- let t = e.indexOf(`
751
- `, n);
752
- t === -1 && (t = o), i += c("comment", l(e.slice(n, t))), n = t;
753
- continue;
754
- }
755
- if (e.slice(n, n + 3) === '"""' || e.slice(n, n + 3) === "'''") {
756
- const t = e.slice(n, n + 3);
757
- let s = e.indexOf(t, n + 3);
758
- s === -1 ? s = o : s += 3, i += c("string", l(e.slice(n, s))), n = s;
759
- continue;
760
- }
761
- if (e[n] === '"' || e[n] === "'") {
762
- const t = e[n];
763
- let s = n + 1;
764
- for (; s < o && e[s] !== t && e[s] !== `
765
- `; )
766
- e[s] === "\\" && s++, s++;
767
- s < o && e[s] === t && s++, i += c("string", l(e.slice(n, s))), n = s;
768
- continue;
769
- }
770
- if (/[0-9]/.test(e[n])) {
771
- let t = n;
772
- for (; t < o && /[0-9a-fA-FxXbBoOeE_.]/.test(e[t]); ) t++;
773
- i += c("number", l(e.slice(n, t))), n = t;
774
- continue;
775
- }
776
- if (/[a-zA-Z_]/.test(e[n])) {
777
- let t = n;
778
- for (; t < o && /[a-zA-Z0-9_]/.test(e[t]); ) t++;
779
- const s = e.slice(n, t);
780
- let a = t;
781
- for (; a < o && /\s/.test(e[a]); ) a++;
782
- const d = e[a] === "(";
783
- s === "True" || s === "False" ? i += c("boolean", l(s)) : s === "None" ? i += c("constant", l(s)) : r.has(s) ? i += c("keyword", l(s)) : d ? i += c("function", l(s)) : /^[A-Z][a-zA-Z0-9_]*$/.test(s) ? i += c("type", l(s)) : i += l(s), n = t;
784
- continue;
785
- }
786
- if (/[+\-*/%=&|<>!^~@:]/.test(e[n])) {
787
- i += c("operator", l(e[n])), n++;
788
- continue;
789
- }
790
- if (/[{}()[\];,.]/.test(e[n])) {
791
- i += c("punctuation", l(e[n])), n++;
792
- continue;
793
- }
794
- i += l(e[n]), n++;
795
- }
796
- return i;
797
- }
798
- function R(e) {
799
- const r = /* @__PURE__ */ new Set([
800
- "case",
801
- "do",
802
- "done",
803
- "elif",
804
- "else",
805
- "esac",
806
- "export",
807
- "fi",
808
- "for",
809
- "function",
810
- "if",
811
- "in",
812
- "return",
813
- "select",
814
- "then",
815
- "time",
816
- "until",
817
- "while",
818
- "sudo",
819
- "echo",
820
- "cd",
821
- "mkdir",
822
- "rm",
823
- "cp",
824
- "mv",
825
- "npm",
826
- "npx",
827
- "node",
828
- "git",
829
- "yarn",
830
- "pnpm"
831
- ]);
832
- let i = "", n = 0;
833
- const o = e.length;
834
- for (; n < o; ) {
835
- if (e[n] === "#") {
836
- let t = e.indexOf(`
837
- `, n);
838
- t === -1 && (t = o), i += c("comment", l(e.slice(n, t))), n = t;
839
- continue;
840
- }
841
- if (e[n] === '"' || e[n] === "'") {
842
- const t = e[n];
843
- let s = n + 1;
844
- for (; s < o && e[s] !== t && e[s] !== `
845
- `; )
846
- e[s] === "\\" && s++, s++;
847
- s < o && e[s] === t && s++, i += c("string", l(e.slice(n, s))), n = s;
848
- continue;
849
- }
850
- if (e[n] === "$") {
851
- let t = n + 1;
852
- if (e[t] === "{")
853
- t = e.indexOf("}", t), t === -1 ? t = o : t += 1;
854
- else if (e[t] === "(")
855
- t = e.indexOf(")", t), t === -1 ? t = o : t += 1;
856
- else for (; t < o && /[a-zA-Z0-9_]/.test(e[t]); ) t++;
857
- i += c("variable", l(e.slice(n, t))), n = t;
858
- continue;
859
- }
860
- if (e[n] === "-" && /[a-zA-Z-]/.test(e[n + 1] || "")) {
861
- let t = n + 1;
862
- for (; t < o && /[a-zA-Z0-9_-]/.test(e[t]); ) t++;
863
- i += c("attr-name", l(e.slice(n, t))), n = t;
864
- continue;
865
- }
866
- if (/[a-zA-Z0-9_]/.test(e[n])) {
867
- let t = n;
868
- for (; t < o && /[a-zA-Z0-9_\-./]/.test(e[t]); ) t++;
869
- const s = e.slice(n, t);
870
- r.has(s) ? i += c("keyword", l(s)) : i += l(s), n = t;
871
- continue;
872
- }
873
- if (/[|&><=;]/.test(e[n])) {
874
- i += c("operator", l(e[n])), n++;
875
- continue;
876
- }
877
- i += l(e[n]), n++;
878
- }
879
- return i;
880
- }
881
- function Z(e) {
882
- const r = /* @__PURE__ */ new Set([
883
- "SELECT",
884
- "FROM",
885
- "WHERE",
886
- "INSERT",
887
- "INTO",
888
- "VALUES",
889
- "UPDATE",
890
- "SET",
891
- "DELETE",
892
- "CREATE",
893
- "TABLE",
894
- "DROP",
895
- "ALTER",
896
- "JOIN",
897
- "LEFT",
898
- "RIGHT",
899
- "INNER",
900
- "OUTER",
901
- "FULL",
902
- "ON",
903
- "GROUP",
904
- "BY",
905
- "ORDER",
906
- "HAVING",
907
- "LIMIT",
908
- "OFFSET",
909
- "UNION",
910
- "ALL",
911
- "AS",
912
- "DISTINCT",
913
- "COUNT",
914
- "SUM",
915
- "AVG",
916
- "MIN",
917
- "MAX",
918
- "AND",
919
- "OR",
920
- "NOT",
921
- "IN",
922
- "IS",
923
- "NULL",
924
- "LIKE",
925
- "BETWEEN",
926
- "EXISTS",
927
- "CASE",
928
- "WHEN",
929
- "THEN",
930
- "ELSE",
931
- "END",
932
- "PRIMARY",
933
- "KEY",
934
- "FOREIGN",
935
- "REFERENCES",
936
- "INDEX",
937
- "DEFAULT",
938
- "CHECK",
939
- "CONSTRAINT"
940
- ]);
941
- let i = "", n = 0;
942
- const o = e.length;
943
- for (; n < o; ) {
944
- if (e[n] === "-" && e[n + 1] === "-") {
945
- let t = e.indexOf(`
946
- `, n);
947
- t === -1 && (t = o), i += c("comment", l(e.slice(n, t))), n = t;
948
- continue;
949
- }
950
- if (e[n] === "'" || e[n] === '"') {
951
- const t = e[n];
952
- let s = n + 1;
953
- for (; s < o && e[s] !== t && e[s] !== `
954
- `; ) s++;
955
- s < o && e[s] === t && s++, i += c("string", l(e.slice(n, s))), n = s;
956
- continue;
957
- }
958
- if (/[a-zA-Z_]/.test(e[n])) {
959
- let t = n;
960
- for (; t < o && /[a-zA-Z0-9_]/.test(e[t]); ) t++;
961
- const s = e.slice(n, t);
962
- r.has(s.toUpperCase()) ? i += c("keyword", l(s)) : i += l(s), n = t;
963
- continue;
964
- }
965
- if (/[0-9]/.test(e[n])) {
966
- let t = n;
967
- for (; t < o && /[0-9.]/.test(e[t]); ) t++;
968
- i += c("number", l(e.slice(n, t))), n = t;
969
- continue;
970
- }
971
- if (/[=<>!+*/-]/.test(e[n])) {
972
- i += c("operator", l(e[n])), n++;
973
- continue;
974
- }
975
- if (/[(),;]/.test(e[n])) {
976
- i += c("punctuation", l(e[n])), n++;
977
- continue;
978
- }
979
- i += l(e[n]), n++;
980
- }
981
- return i;
982
- }
983
- function _(e, r) {
984
- if (!e) return "";
985
- switch ((r || "").toLowerCase().trim()) {
986
- case "javascript":
987
- case "js":
988
- case "typescript":
989
- case "ts":
990
- case "jsx":
991
- case "tsx":
992
- return B(e);
993
- case "html":
994
- case "xml":
995
- case "svg":
996
- return j(e);
997
- case "css":
998
- case "scss":
999
- case "less":
1000
- return U(e);
1001
- case "json":
1002
- return W(e);
1003
- case "python":
1004
- case "py":
1005
- return H(e);
1006
- case "bash":
1007
- case "sh":
1008
- case "shell":
1009
- case "zsh":
1010
- return R(e);
1011
- case "sql":
1012
- return Z(e);
1013
- default:
1014
- return l(e);
1015
- }
1016
- }
1017
- function D(e) {
1018
- const r = [];
1019
- if (!e.trim()) return r;
1020
- try {
1021
- return JSON.parse(e), r;
1022
- } catch (i) {
1023
- const n = i instanceof Error ? i.message : String(i);
1024
- let o = 1, t = 1;
1025
- const s = n.match(/at position (\d+)/i), a = n.match(/line (\d+) column (\d+)/i);
1026
- if (a && a[1] && a[2])
1027
- o = parseInt(a[1], 10), t = parseInt(a[2], 10);
1028
- else if (s && s[1]) {
1029
- const h = parseInt(s[1], 10), p = e.slice(0, h).split(`
1030
- `);
1031
- o = p.length, t = (p[p.length - 1]?.length || 0) + 1;
1032
- } else {
1033
- const h = e.split(`
1034
- `);
1035
- let p = !1;
1036
- for (let f = 0; f < h.length; f++) {
1037
- const u = h[f];
1038
- if (/'[^']*'/.test(u)) {
1039
- r.push({
1040
- line: f + 1,
1041
- column: u.indexOf("'") + 1,
1042
- message: "JSON strings must use double quotes, not single quotes",
1043
- severity: "error",
1044
- rule: "json-no-single-quotes"
1045
- }), p = !0;
1046
- break;
1047
- }
1048
- if (/,\s*([}\]])/.test(u)) {
1049
- r.push({
1050
- line: f + 1,
1051
- column: u.search(/,\s*([}\]])/) + 1,
1052
- message: "Trailing comma is not allowed in standard JSON",
1053
- severity: "error",
1054
- rule: "json-no-trailing-comma"
1055
- }), p = !0;
1056
- break;
1057
- }
1058
- if (/\/\//.test(u) || /\/\*/.test(u)) {
1059
- r.push({
1060
- line: f + 1,
1061
- column: u.search(/\/\/|\/\*/) + 1,
1062
- message: "Comments are not permitted in standard JSON",
1063
- severity: "warning",
1064
- rule: "json-no-comments"
1065
- }), p = !0;
1066
- break;
1067
- }
1068
- const m = u.match(/([{,]\s*)([a-zA-Z0-9_$]+)\s*:/);
1069
- if (m && m[1] && m[2]) {
1070
- r.push({
1071
- line: f + 1,
1072
- column: u.indexOf(m[2]) + 1,
1073
- message: `Key "${m[2]}" must be enclosed in double quotes`,
1074
- severity: "error",
1075
- rule: "json-unquoted-key"
1076
- }), p = !0;
1077
- break;
1078
- }
1079
- }
1080
- if (p) return r;
1081
- }
1082
- let d = n.replace(/^JSON\.parse:\s*/i, "").replace(/in JSON at position \d+/i, "").trim();
1083
- d || (d = "Invalid JSON syntax"), r.push({
1084
- line: o,
1085
- column: t,
1086
- message: d,
1087
- severity: "error",
1088
- rule: "json-syntax-error"
1089
- });
1090
- }
1091
- return r;
1092
- }
1093
- function q(e) {
1094
- const r = [], i = e.split(`
1095
- `), n = [], o = {
1096
- "}": "{",
1097
- ")": "(",
1098
- "]": "["
1099
- };
1100
- let t = !1, s = !1;
1101
- for (let a = 0; a < i.length; a++) {
1102
- const d = a + 1, h = i[a];
1103
- let p = null, f = !1;
1104
- for (let u = 0; u < h.length; u++) {
1105
- const m = h[u], g = h[u + 1] || "";
1106
- if (t) {
1107
- m === "*" && g === "/" && (t = !1, u++);
1108
- continue;
1109
- }
1110
- if (s) {
1111
- if (m === "\\") {
1112
- u++;
1113
- continue;
1114
- }
1115
- m === "`" && (s = !1);
1116
- continue;
1117
- }
1118
- if (p) {
1119
- f ? f = !1 : m === "\\" ? f = !0 : m === p && (p = null);
1120
- continue;
1121
- }
1122
- if (m === "/" && g === "/") break;
1123
- if (m === "/" && g === "*") {
1124
- t = !0, u++;
1125
- continue;
1126
- }
1127
- if (m === "`") {
1128
- s = !0;
1129
- continue;
1130
- }
1131
- if (m === '"' || m === "'") {
1132
- p = m;
1133
- continue;
1134
- }
1135
- if (m === "{" || m === "(" || m === "[") n.push({
1136
- char: m,
1137
- line: d,
1138
- col: u + 1
1139
- });
1140
- else if (m === "}" || m === ")" || m === "]") {
1141
- const y = o[m];
1142
- if (n.length === 0) r.push({
1143
- line: d,
1144
- column: u + 1,
1145
- message: `Unexpected closing '${m}' with no matching opening bracket`,
1146
- severity: "error",
1147
- rule: "js-unmatched-bracket"
1148
- });
1149
- else {
1150
- const w = n.pop();
1151
- w.char !== y && r.push({
1152
- line: d,
1153
- column: u + 1,
1154
- message: `Mismatched closing '${m}', expected matching '${w.char === "{" ? "}" : w.char === "(" ? ")" : "]"}' for '${w.char}' from line ${w.line}`,
1155
- severity: "error",
1156
- rule: "js-mismatched-bracket"
1157
- });
1158
- }
1159
- }
1160
- }
1161
- p && r.push({
1162
- line: d,
1163
- column: h.lastIndexOf(p) + 1,
1164
- message: `Unclosed string literal starting with ${p}`,
1165
- severity: "error",
1166
- rule: "js-unclosed-string"
1167
- }), /====+/.test(h) && r.push({
1168
- line: d,
1169
- column: h.indexOf("====") + 1,
1170
- message: 'Invalid equality operator: "===="',
1171
- severity: "error",
1172
- rule: "js-invalid-operator"
1173
- });
1174
- }
1175
- for (t && r.push({
1176
- line: i.length,
1177
- column: 1,
1178
- message: 'Unclosed multi-line comment "/*"',
1179
- severity: "error",
1180
- rule: "js-unclosed-comment"
1181
- }), s && r.push({
1182
- line: i.length,
1183
- column: 1,
1184
- message: "Unclosed template literal (`...`)",
1185
- severity: "error",
1186
- rule: "js-unclosed-template"
1187
- }); n.length > 0; ) {
1188
- const a = n.pop();
1189
- r.push({
1190
- line: a.line,
1191
- column: a.col,
1192
- message: `Unclosed opening bracket '${a.char}'`,
1193
- severity: "error",
1194
- rule: "js-unclosed-bracket"
1195
- });
1196
- }
1197
- return r;
1198
- }
1199
- function F(e) {
1200
- const r = [], i = e.split(`
1201
- `), n = /* @__PURE__ */ new Set([
1202
- "area",
1203
- "base",
1204
- "br",
1205
- "col",
1206
- "embed",
1207
- "hr",
1208
- "img",
1209
- "input",
1210
- "link",
1211
- "meta",
1212
- "param",
1213
- "source",
1214
- "track",
1215
- "wbr",
1216
- "!doctype"
1217
- ]), o = [], t = /<\/?([a-zA-Z0-9\-:]+)(\s+[^>]*?)?(\/?)>/g;
1218
- for (let s = 0; s < i.length; s++) {
1219
- const a = s + 1, d = i[s];
1220
- let h;
1221
- for (t.lastIndex = 0; (h = t.exec(d)) !== null; ) {
1222
- const p = h[0], f = (h[1] || "").toLowerCase(), u = p.startsWith("</"), m = p.endsWith("/>") || n.has(f), g = h.index + 1;
1223
- if (!(f.startsWith("!--") || f.startsWith("!doctype")))
1224
- if (u)
1225
- if (o.length === 0) r.push({
1226
- line: a,
1227
- column: g,
1228
- message: `Unexpected closing tag </${f}> without matching opening tag`,
1229
- severity: "error",
1230
- rule: "html-unmatched-closing-tag"
1231
- });
1232
- else {
1233
- const y = o.pop();
1234
- y.name !== f && r.push({
1235
- line: a,
1236
- column: g,
1237
- message: `Mismatched closing tag </${f}>, expected </${y.name}> (opened on line ${y.line})`,
1238
- severity: "error",
1239
- rule: "html-mismatched-tag"
1240
- });
1241
- }
1242
- else m || o.push({
1243
- name: f,
1244
- line: a,
1245
- col: g
1246
- });
1247
- }
1248
- }
1249
- for (; o.length > 0; ) {
1250
- const s = o.pop();
1251
- r.push({
1252
- line: s.line,
1253
- column: s.col,
1254
- message: `Unclosed tag <${s.name}>`,
1255
- severity: "error",
1256
- rule: "html-unclosed-tag"
1257
- });
1258
- }
1259
- return r;
1260
- }
1261
- function J(e) {
1262
- const r = [], i = e.split(`
1263
- `);
1264
- let n = 0;
1265
- const o = [];
1266
- for (let t = 0; t < i.length; t++) {
1267
- const s = t + 1, a = i[t], d = a.trim();
1268
- if (!(!d || d.startsWith("/*") || d.startsWith("//"))) {
1269
- for (let h = 0; h < a.length; h++) a[h] === "{" ? (n++, o.push({
1270
- line: s,
1271
- col: h + 1
1272
- })) : a[h] === "}" && (n === 0 ? r.push({
1273
- line: s,
1274
- column: h + 1,
1275
- message: 'Unexpected closing brace "}" without opening "{"',
1276
- severity: "error",
1277
- rule: "css-unmatched-brace"
1278
- }) : (n--, o.pop()));
1279
- if (n > 0 && d !== "{" && d !== "}" && !d.endsWith("{") && !d.endsWith("}") && (!d.includes(":") && !d.startsWith("@") && !d.endsWith(",") && r.push({
1280
- line: s,
1281
- column: 1,
1282
- message: `Declaration "${d}" is missing a colon ":" between property and value`,
1283
- severity: "warning",
1284
- rule: "css-missing-colon"
1285
- }), d.includes(":") && !d.endsWith(";") && !d.endsWith("{") && !d.endsWith("}"))) {
1286
- const h = i[t + 1]?.trim() || "";
1287
- h && !h.startsWith("}") && r.push({
1288
- line: s,
1289
- column: a.length,
1290
- message: 'Missing semicolon ";" at the end of CSS declaration',
1291
- severity: "warning",
1292
- rule: "css-missing-semicolon"
1293
- });
1294
- }
1295
- }
1296
- }
1297
- for (; o.length > 0; ) {
1298
- const t = o.pop();
1299
- r.push({
1300
- line: t.line,
1301
- column: t.col,
1302
- message: 'Unclosed CSS block "{"',
1303
- severity: "error",
1304
- rule: "css-unclosed-brace"
1305
- });
1306
- }
1307
- return r;
1308
- }
1309
- function V(e) {
1310
- const r = [], i = e.split(`
1311
- `);
1312
- let n = !1, o = !1;
1313
- const t = [], s = {
1314
- ")": "(",
1315
- "]": "[",
1316
- "}": "{"
1317
- }, a = /^\s*(def\s+.*|class\s+.*|if\s+.*|elif\s+.*|else|for\s+.*|while\s+.*|try|except(\s+.*)?|finally|with\s+.*)$/;
1318
- for (let d = 0; d < i.length; d++) {
1319
- const h = d + 1, p = i[d], f = p.trim();
1320
- if (!f || f.startsWith("#")) continue;
1321
- const u = p.match(/^([ \t]+)/);
1322
- if (u && u[1]) {
1323
- const g = u[1];
1324
- g.includes(" ") && (n = !0), g.includes(" ") && (o = !0), n && o && r.push({
1325
- line: h,
1326
- column: 1,
1327
- message: "Inconsistent indentation: mixed tabs and spaces",
1328
- severity: "warning",
1329
- rule: "python-mixed-indentation"
1330
- });
1331
- }
1332
- a.test(f) && !f.endsWith(":") && !f.includes("#") && r.push({
1333
- line: h,
1334
- column: p.length,
1335
- message: 'Expected ":" at the end of statement header',
1336
- severity: "error",
1337
- rule: "python-missing-colon"
1338
- });
1339
- let m = null;
1340
- for (let g = 0; g < p.length; g++) {
1341
- const y = p[g];
1342
- if (y === "#") break;
1343
- if (m) {
1344
- y === m && p[g - 1] !== "\\" && (m = null);
1345
- continue;
1346
- }
1347
- if (y === '"' || y === "'") {
1348
- m = y;
1349
- continue;
1350
- }
1351
- if (y === "(" || y === "[" || y === "{") t.push({
1352
- char: y,
1353
- line: h,
1354
- col: g + 1
1355
- });
1356
- else if (y === ")" || y === "]" || y === "}") {
1357
- const w = s[y];
1358
- if (t.length === 0) r.push({
1359
- line: h,
1360
- column: g + 1,
1361
- message: `Unmatched closing '${y}'`,
1362
- severity: "error",
1363
- rule: "python-unmatched-bracket"
1364
- });
1365
- else {
1366
- const $ = t.pop();
1367
- $.char !== w && r.push({
1368
- line: h,
1369
- column: g + 1,
1370
- message: `Mismatched bracket '${y}', expected closing for '${$.char}' from line ${$.line}`,
1371
- severity: "error",
1372
- rule: "python-mismatched-bracket"
1373
- });
1374
- }
1375
- }
1376
- }
1377
- }
1378
- for (; t.length > 0; ) {
1379
- const d = t.pop();
1380
- r.push({
1381
- line: d.line,
1382
- column: d.col,
1383
- message: `Unclosed '${d.char}'`,
1384
- severity: "error",
1385
- rule: "python-unclosed-bracket"
1386
- });
1387
- }
1388
- return r;
1389
- }
1390
- function G(e) {
1391
- const r = [], i = e.split(`
1392
- `), n = [];
1393
- for (let o = 0; o < i.length; o++) {
1394
- const t = o + 1, s = i[o], a = s.trim();
1395
- if (!a || a.startsWith("#")) continue;
1396
- const d = a.split(/\s+/);
1397
- for (const h of d) if (h === "if") n.push({
1398
- keyword: "if",
1399
- line: t
1400
- });
1401
- else if (h === "fi") {
1402
- const p = n.pop();
1403
- (!p || p.keyword !== "if") && r.push({
1404
- line: t,
1405
- column: s.indexOf("fi") + 1,
1406
- message: 'Unexpected "fi" with no preceding "if"',
1407
- severity: "error",
1408
- rule: "bash-unmatched-fi"
1409
- });
1410
- } else if (h === "case") n.push({
1411
- keyword: "case",
1412
- line: t
1413
- });
1414
- else if (h === "esac") {
1415
- const p = n.pop();
1416
- (!p || p.keyword !== "case") && r.push({
1417
- line: t,
1418
- column: s.indexOf("esac") + 1,
1419
- message: 'Unexpected "esac" with no preceding "case"',
1420
- severity: "error",
1421
- rule: "bash-unmatched-esac"
1422
- });
1423
- } else if (h === "do") n.push({
1424
- keyword: "do",
1425
- line: t
1426
- });
1427
- else if (h === "done") {
1428
- const p = n.pop();
1429
- (!p || p.keyword !== "do") && r.push({
1430
- line: t,
1431
- column: s.indexOf("done") + 1,
1432
- message: 'Unexpected "done" with no preceding "do" / loop',
1433
- severity: "error",
1434
- rule: "bash-unmatched-done"
1435
- });
1436
- }
1437
- }
1438
- for (; n.length > 0; ) {
1439
- const o = n.pop(), t = o.keyword === "if" ? "fi" : o.keyword === "case" ? "esac" : "done";
1440
- r.push({
1441
- line: o.line,
1442
- column: 1,
1443
- message: `Unclosed "${o.keyword}" block, missing "${t}"`,
1444
- severity: "error",
1445
- rule: "bash-unclosed-block"
1446
- });
1447
- }
1448
- return r;
1449
- }
1450
- function K(e) {
1451
- const r = [], i = e.split(`
1452
- `);
1453
- for (let n = 0; n < i.length; n++) {
1454
- const o = n + 1, t = i[n];
1455
- (/^\t+/.test(t) || /^ +\t+/.test(t)) && r.push({
1456
- line: o,
1457
- column: 1,
1458
- message: "YAML forbids tab characters for indentation; use spaces instead",
1459
- severity: "error",
1460
- rule: "yaml-no-tabs"
1461
- });
1462
- const s = t.trim();
1463
- /^[a-zA-Z0-9_-]+:[^ \t\n\r/#]/.test(s) && !s.startsWith("http:") && !s.startsWith("https:") && r.push({
1464
- line: o,
1465
- column: t.indexOf(":") + 1,
1466
- message: 'YAML mappings require a space after the colon ":" (e.g. "key: value")',
1467
- severity: "warning",
1468
- rule: "yaml-missing-space"
1469
- });
1470
- }
1471
- return r;
1472
- }
1473
- function P(e) {
1474
- const r = [], i = e.split(`
1475
- `);
1476
- let n = 0, o = 1;
1477
- for (let t = 0; t < i.length; t++) {
1478
- const s = t + 1;
1479
- i[t].trim().startsWith("```") && (n === 0 ? (n++, o = s) : n--);
1480
- }
1481
- return n > 0 && r.push({
1482
- line: o,
1483
- column: 1,
1484
- message: "Unclosed Markdown code fence (```)",
1485
- severity: "error",
1486
- rule: "md-unclosed-fence"
1487
- }), r;
1488
- }
1489
- function Y(e, r) {
1490
- if (!e || !e.trim()) return [];
1491
- switch ((r || "").toLowerCase().trim()) {
1492
- case "json":
1493
- return D(e);
1494
- case "javascript":
1495
- case "js":
1496
- case "typescript":
1497
- case "ts":
1498
- case "jsx":
1499
- case "tsx":
1500
- return q(e);
1501
- case "html":
1502
- case "xml":
1503
- case "svg":
1504
- return F(e);
1505
- case "css":
1506
- case "scss":
1507
- case "less":
1508
- return J(e);
1509
- case "python":
1510
- case "py":
1511
- return V(e);
1512
- case "bash":
1513
- case "sh":
1514
- case "shell":
1515
- case "zsh":
1516
- return G(e);
1517
- case "yaml":
1518
- case "yml":
1519
- return K(e);
1520
- case "markdown":
1521
- case "md":
1522
- return P(e);
1523
- default:
1524
- return [];
1525
- }
1526
- }
1527
- var b = class extends E {
1528
- constructor(...r) {
1529
- super(...r), this.code = "", this.language = "plaintext", this.lang = "", this.label = "", this.filename = "", this.lint = !1, this.diagnostics = [], this.showLintSummary = !0, this.lineNumbers = !1, this.highlightLines = "", this.copyable = !0, this.hideCopyButton = !1, this.wrapLines = !1, this.maxHeight = "", this.isCopied = !1, this.isIssuesExpanded = !1, this.internalCode = "", this.activeDiagnostics = [], this.copyTimeout = null, this.handleSlotChange = () => {
1530
- this.code || (this.extractCodeContent(), this.requestUpdate());
1531
- }, this.toggleIssuesList = () => {
1532
- this.isIssuesExpanded = !this.isIssuesExpanded;
1533
- };
1534
- }
1535
- static {
1536
- this.styles = [E.styles, M];
1537
- }
1538
- connectedCallback() {
1539
- super.connectedCallback(), this.extractCodeContent();
1540
- }
1541
- disconnectedCallback() {
1542
- super.disconnectedCallback(), this.copyTimeout && (clearTimeout(this.copyTimeout), this.copyTimeout = null);
1543
- }
1544
- willUpdate(r) {
1545
- r.has("code") && this.code ? this.internalCode = this.code : !this.internalCode && this.textContent && this.textContent.trim() && (this.internalCode = this.normalizeIndentation(this.textContent)), this.runLint();
1546
- }
1547
- extractCodeContent() {
1548
- !this.code && this.textContent && this.textContent.trim() && (this.internalCode = this.normalizeIndentation(this.textContent), this.runLint());
1549
- }
1550
- normalizeIndentation(r) {
1551
- const i = r.replace(/^\r?\n/, "").replace(/\r?\n\s*$/, "").split(`
1552
- `);
1553
- if (i.length === 0) return r;
1554
- let n = 1 / 0;
1555
- for (const o of i) {
1556
- if (o.trim().length === 0) continue;
1557
- const t = o.match(/^[ \t]*/)?.[0]?.length || 0;
1558
- t < n && (n = t);
1559
- }
1560
- return n === 1 / 0 || n === 0 ? i.join(`
1561
- `) : i.map((o) => o.slice(n)).join(`
1562
- `);
1563
- }
1564
- runLint() {
1565
- const r = this.effectiveLanguage;
1566
- let i = [];
1567
- const n = !!(this.lint || this.hasAttribute("lint")), o = this.internalCode || this.code || "";
1568
- return n && o && (i = Y(o, r)), this.diagnostics && this.diagnostics.length > 0 && (i = [...i, ...this.diagnostics]), this.activeDiagnostics = i, this.emitEvent("lint-complete", {
1569
- diagnostics: i,
1570
- isValid: i.length === 0
1571
- }), i;
1572
- }
1573
- get effectiveLanguage() {
1574
- return this.lang || this.language || "plaintext";
1575
- }
1576
- get effectiveLabel() {
1577
- return this.filename || this.label;
1578
- }
1579
- async copy() {
1580
- const r = this.internalCode || this.code || this.textContent || "";
1581
- if (!r) return !1;
1582
- try {
1583
- if (navigator.clipboard && navigator.clipboard.writeText) await navigator.clipboard.writeText(r);
1584
- else {
1585
- const i = document.createElement("textarea");
1586
- i.value = r, i.style.position = "fixed", i.style.opacity = "0", document.body.appendChild(i), i.select(), document.execCommand("copy"), document.body.removeChild(i);
1587
- }
1588
- return this.isCopied = !0, this.emitEvent("copy", { code: r }), this.copyTimeout && clearTimeout(this.copyTimeout), this.copyTimeout = setTimeout(() => {
1589
- this.isCopied = !1;
1590
- }, 2e3), !0;
1591
- } catch {
1592
- return !1;
1593
- }
1594
- }
1595
- parseHighlightedLines() {
1596
- const r = /* @__PURE__ */ new Set();
1597
- if (!this.highlightLines) return r;
1598
- const i = this.highlightLines.split(",");
1599
- for (const n of i) {
1600
- const o = n.trim();
1601
- if (o.includes("-")) {
1602
- const [t, s] = o.split("-"), a = parseInt(t || "", 10), d = parseInt(s || "", 10);
1603
- if (!isNaN(a) && !isNaN(d)) for (let h = a; h <= d; h++) r.add(h);
1604
- } else {
1605
- const t = parseInt(o, 10);
1606
- isNaN(t) || r.add(t);
1607
- }
1608
- }
1609
- return r;
1610
- }
1611
- scrollToLine(r) {
1612
- const i = this.shadowRoot?.querySelector(`[data-line="${r}"]`);
1613
- i && i.scrollIntoView({
1614
- behavior: "smooth",
1615
- block: "center"
1616
- });
1617
- }
1618
- render() {
1619
- const r = this.internalCode || this.code || "", i = this.effectiveLanguage, n = this.effectiveLabel, o = !!(n || i !== "plaintext" || this.copyable), t = this.parseHighlightedLines(), s = /* @__PURE__ */ new Map();
1620
- for (const u of this.activeDiagnostics) {
1621
- const m = s.get(u.line) || [];
1622
- m.push(u), s.set(u.line, m);
1623
- }
1624
- const a = r.split(`
1625
- `).length, d = _(r, i).split(`
1626
- `), h = this.activeDiagnostics.filter((u) => u.severity === "error" || !u.severity).length, p = this.activeDiagnostics.filter((u) => u.severity === "warning").length, f = this.activeDiagnostics.length > 0;
1627
- return x`
1628
- <div class="code-container" style=${this.maxHeight ? `--md-code-max-height: ${this.maxHeight};` : ""}>
1629
- <!-- Hidden Slot for code content fallback -->
1630
- <div style="display: none;">
1631
- <slot @slotchange=${this.handleSlotChange}></slot>
1632
- </div>
1633
-
1634
- <!-- Header -->
1635
- ${o ? x`
1636
- <header class="code-header">
1637
- <div class="code-header-left">
1638
- ${i && i !== "plaintext" ? x`
1639
- <span class="lang-badge">${i}</span>
1640
- ` : C}
1641
- ${n ? x`<span class="code-filename">${n}</span>` : C}
1642
- </div>
1643
-
1644
- <div class="code-header-actions">
1645
- <slot name="actions"></slot>
1646
- ${this.copyable && !this.hideCopyButton ? x`
1647
- <button
1648
- type="button"
1649
- class="action-btn ${this.isCopied ? "copied" : ""}"
1650
- @click=${this.copy}
1651
- aria-label=${this.isCopied ? "Copied to clipboard" : "Copy code to clipboard"}
1652
- title=${this.isCopied ? "Copied!" : "Copy code"}
1653
- >
1654
- <md-icon name=${this.isCopied ? "check" : "content_copy"}></md-icon>
1655
- <span>${this.isCopied ? "Copied!" : "Copy"}</span>
1656
- </button>
1657
- ` : C}
1658
- </div>
1659
- </header>
1660
- ` : this.copyable && !this.hideCopyButton ? x`
1661
- <div class="floating-copy-btn">
1662
- <button
1663
- type="button"
1664
- class="action-btn ${this.isCopied ? "copied" : ""}"
1665
- @click=${this.copy}
1666
- aria-label=${this.isCopied ? "Copied to clipboard" : "Copy code"}
1667
- title=${this.isCopied ? "Copied!" : "Copy code"}
1668
- >
1669
- <md-icon name=${this.isCopied ? "check" : "content_copy"}></md-icon>
1670
- <span>${this.isCopied ? "Copied!" : "Copy"}</span>
1671
- </button>
1672
- </div>
1673
- ` : C}
1674
-
1675
- <!-- Body with Gutter and Code Lines -->
1676
- <div class="code-body" style=${this.maxHeight ? `max-height: ${this.maxHeight};` : ""}>
1677
- ${this.lineNumbers || this.hasAttribute("line-numbers") || this.lint || this.hasAttribute("lint") || this.activeDiagnostics.length > 0 ? x`
1678
- <div class="code-gutter" aria-hidden="true">
1679
- ${Array.from({ length: a }, (u, m) => {
1680
- const g = m + 1, y = s.get(g), w = y?.find(($) => $.severity === "error" || !$.severity) || y?.[0];
1681
- return x`
1682
- <div class="gutter-line" @click=${() => this.scrollToLine(g)}>
1683
- ${w ? x`
1684
- <span
1685
- class="gutter-marker ${w.severity || "error"}"
1686
- title="Line ${g}: ${w.message}"
1687
- >
1688
- <md-icon name=${w.severity === "warning" ? "warning" : "error"}></md-icon>
1689
- </span>
1690
- ` : C}
1691
- ${this.lineNumbers || this.hasAttribute("line-numbers") ? x`<span>${g}</span>` : C}
1692
- </div>
1693
- `;
1694
- })}
1695
- </div>
1696
- ` : C}
1697
-
1698
- <pre><code>${d.map((u, m) => {
1699
- const g = m + 1, y = t.has(g), w = s.get(g), $ = w?.some((S) => S.severity === "error" || !S.severity), I = w?.some((S) => S.severity === "warning"), z = [
1700
- "code-line",
1701
- y ? "highlighted" : "",
1702
- $ ? "has-error" : "",
1703
- I && !$ ? "has-warning" : ""
1704
- ].filter(Boolean).join(" ");
1705
- return x`<div class=${z} data-line=${g}>${O(u || "&nbsp;")}</div>`;
1706
- })}</code></pre>
1707
- </div>
1708
-
1709
- <!-- Lint Summary Footer -->
1710
- ${(this.lint || this.hasAttribute("lint") || this.diagnostics.length > 0 || this.activeDiagnostics.length > 0) && this.showLintSummary !== !1 ? x`
1711
- <footer class="lint-footer">
1712
- <div class="lint-footer-summary" @click=${this.toggleIssuesList} role="button" tabindex="0">
1713
- <div class="lint-counts">
1714
- ${f && h > 0 ? x`
1715
- <span class="lint-count-item errors">
1716
- <md-icon name="error"></md-icon>
1717
- <span>${h} ${h === 1 ? "error" : "errors"}</span>
1718
- </span>
1719
- ` : C}
1720
- ${f && p > 0 ? x`
1721
- <span class="lint-count-item warnings">
1722
- <md-icon name="warning"></md-icon>
1723
- <span>${p} ${p === 1 ? "warning" : "warnings"}</span>
1724
- </span>
1725
- ` : C}
1726
- ${f ? C : x`
1727
- <span class="lint-count-item valid">
1728
- <md-icon name="check_circle"></md-icon>
1729
- <span>No syntax issues detected</span>
1730
- </span>
1731
- `}
1732
- </div>
1733
-
1734
- ${f ? x`
1735
- <button type="button" class="action-btn" aria-label="Toggle issues panel">
1736
- <md-icon name=${this.isIssuesExpanded ? "expand_less" : "expand_more"}></md-icon>
1737
- <span>${this.isIssuesExpanded ? "Hide issues" : "View issues"}</span>
1738
- </button>
1739
- ` : C}
1740
- </div>
1741
-
1742
- ${f && this.isIssuesExpanded ? x`
1743
- <div class="lint-issues-list" role="region" aria-label="Lint diagnostics">
1744
- ${this.activeDiagnostics.map((u) => x`
1745
- <div
1746
- class="lint-issue-item ${u.severity || "error"}"
1747
- @click=${() => this.scrollToLine(u.line)}
1748
- role="button"
1749
- tabindex="0"
1750
- >
1751
- <md-icon name=${u.severity === "warning" ? "warning" : "error"}></md-icon>
1752
- <div class="lint-issue-content">
1753
- <span class="lint-issue-loc">Line ${u.line}${u.column ? `:${u.column}` : ""}${u.rule ? ` • ${u.rule}` : ""}</span>
1754
- <span class="lint-issue-msg">${u.message}</span>
1755
- </div>
1756
- </div>
1757
- `)}
1758
- </div>
1759
- ` : C}
1760
- </footer>
1761
- ` : C}
1762
- </div>
1763
- `;
1764
- }
1765
- };
1766
- v([k({ type: String })], b.prototype, "code", void 0);
1767
- v([k({
1768
- type: String,
1769
- reflect: !0
1770
- })], b.prototype, "language", void 0);
1771
- v([k({ type: String })], b.prototype, "lang", void 0);
1772
- v([k({ type: String })], b.prototype, "label", void 0);
1773
- v([k({ type: String })], b.prototype, "filename", void 0);
1774
- v([k({
1775
- type: Boolean,
1776
- reflect: !0
1777
- })], b.prototype, "lint", void 0);
1778
- v([k({ type: Array })], b.prototype, "diagnostics", void 0);
1779
- v([k({
1780
- type: Boolean,
1781
- attribute: "show-lint-summary",
1782
- converter: {
1783
- fromAttribute: (e) => e === null ? !0 : e !== "false",
1784
- toAttribute: (e) => e ? "" : null
1785
- }
1786
- })], b.prototype, "showLintSummary", void 0);
1787
- v([k({
1788
- type: Boolean,
1789
- attribute: "line-numbers",
1790
- reflect: !0
1791
- })], b.prototype, "lineNumbers", void 0);
1792
- v([k({
1793
- type: String,
1794
- attribute: "highlight-lines"
1795
- })], b.prototype, "highlightLines", void 0);
1796
- v([k({
1797
- type: Boolean,
1798
- reflect: !0,
1799
- converter: {
1800
- fromAttribute: (e) => e === null ? !0 : e !== "false",
1801
- toAttribute: (e) => e ? "" : null
1802
- }
1803
- })], b.prototype, "copyable", void 0);
1804
- v([k({
1805
- type: Boolean,
1806
- attribute: "hide-copy-button"
1807
- })], b.prototype, "hideCopyButton", void 0);
1808
- v([k({
1809
- type: Boolean,
1810
- attribute: "wrap-lines",
1811
- reflect: !0
1812
- })], b.prototype, "wrapLines", void 0);
1813
- v([k({
1814
- type: String,
1815
- attribute: "max-height"
1816
- })], b.prototype, "maxHeight", void 0);
1817
- v([L()], b.prototype, "isCopied", void 0);
1818
- v([L()], b.prototype, "isIssuesExpanded", void 0);
1819
- v([L()], b.prototype, "internalCode", void 0);
1820
- v([L()], b.prototype, "activeDiagnostics", void 0);
1821
- b = v([N("md-code")], b);
1822
- var A = class extends b {
1823
- };
1824
- A = v([N("md-code-block")], A);
1825
- export {
1826
- A as n,
1827
- b as t
1828
- };
1829
-
1830
- //# sourceMappingURL=code-C5UFBkCh.js.map