@xtyle/core 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/README.md +43 -10
  2. package/dist/algorithms/factory.d.ts +37 -1
  3. package/dist/algorithms/factory.d.ts.map +1 -1
  4. package/dist/algorithms/factory.js +407 -60
  5. package/dist/algorithms/factory.js.map +1 -1
  6. package/dist/audit.d.ts +36 -0
  7. package/dist/audit.d.ts.map +1 -1
  8. package/dist/audit.js +22 -0
  9. package/dist/audit.js.map +1 -1
  10. package/dist/authoring.d.ts +10 -1
  11. package/dist/authoring.d.ts.map +1 -1
  12. package/dist/authoring.js +6 -1
  13. package/dist/authoring.js.map +1 -1
  14. package/dist/baked.d.ts +14 -1
  15. package/dist/baked.d.ts.map +1 -1
  16. package/dist/baked.js +17 -0
  17. package/dist/baked.js.map +1 -1
  18. package/dist/batteries.js +11 -2
  19. package/dist/cli.js +58 -19
  20. package/dist/cli.js.map +1 -1
  21. package/dist/color.d.ts +6 -0
  22. package/dist/color.d.ts.map +1 -1
  23. package/dist/color.js +20 -0
  24. package/dist/color.js.map +1 -1
  25. package/dist/css/components/app-shell.d.ts.map +1 -1
  26. package/dist/css/components/app-shell.js +10 -0
  27. package/dist/css/components/app-shell.js.map +1 -1
  28. package/dist/css/components/avatar.d.ts.map +1 -1
  29. package/dist/css/components/avatar.js +8 -19
  30. package/dist/css/components/avatar.js.map +1 -1
  31. package/dist/css/components/badge.d.ts.map +1 -1
  32. package/dist/css/components/badge.js +3 -87
  33. package/dist/css/components/badge.js.map +1 -1
  34. package/dist/css/components/bottom-nav.d.ts +2 -0
  35. package/dist/css/components/bottom-nav.d.ts.map +1 -0
  36. package/dist/css/components/bottom-nav.js +72 -0
  37. package/dist/css/components/bottom-nav.js.map +1 -0
  38. package/dist/css/components/carousel.d.ts.map +1 -1
  39. package/dist/css/components/carousel.js +144 -1
  40. package/dist/css/components/carousel.js.map +1 -1
  41. package/dist/css/components/dialog.d.ts.map +1 -1
  42. package/dist/css/components/dialog.js +10 -4
  43. package/dist/css/components/dialog.js.map +1 -1
  44. package/dist/css/components/dot.d.ts +2 -0
  45. package/dist/css/components/dot.d.ts.map +1 -0
  46. package/dist/css/components/dot.js +72 -0
  47. package/dist/css/components/dot.js.map +1 -0
  48. package/dist/css/components/heatmap.d.ts.map +1 -1
  49. package/dist/css/components/heatmap.js +23 -0
  50. package/dist/css/components/heatmap.js.map +1 -1
  51. package/dist/css/components/image.d.ts.map +1 -1
  52. package/dist/css/components/image.js +41 -0
  53. package/dist/css/components/image.js.map +1 -1
  54. package/dist/css/components/mobile-shell.d.ts +2 -0
  55. package/dist/css/components/mobile-shell.d.ts.map +1 -0
  56. package/dist/css/components/mobile-shell.js +63 -0
  57. package/dist/css/components/mobile-shell.js.map +1 -0
  58. package/dist/css/components/panel.js +1 -1
  59. package/dist/css/components/qr.d.ts +2 -0
  60. package/dist/css/components/qr.d.ts.map +1 -0
  61. package/dist/css/components/qr.js +134 -0
  62. package/dist/css/components/qr.js.map +1 -0
  63. package/dist/css/components/radio.d.ts.map +1 -1
  64. package/dist/css/components/radio.js +49 -0
  65. package/dist/css/components/radio.js.map +1 -1
  66. package/dist/css/components/ribbon.d.ts +2 -0
  67. package/dist/css/components/ribbon.d.ts.map +1 -0
  68. package/dist/css/components/ribbon.js +65 -0
  69. package/dist/css/components/ribbon.js.map +1 -0
  70. package/dist/css/components/tree.d.ts.map +1 -1
  71. package/dist/css/components/tree.js +4 -1
  72. package/dist/css/components/tree.js.map +1 -1
  73. package/dist/css/components.d.ts.map +1 -1
  74. package/dist/css/components.js +14 -1
  75. package/dist/css/components.js.map +1 -1
  76. package/dist/css/index.d.ts +2 -0
  77. package/dist/css/index.d.ts.map +1 -1
  78. package/dist/css/index.js +2 -0
  79. package/dist/css/index.js.map +1 -1
  80. package/dist/elements/avatar.d.ts +18 -3
  81. package/dist/elements/avatar.d.ts.map +1 -1
  82. package/dist/elements/avatar.js +35 -6
  83. package/dist/elements/avatar.js.map +1 -1
  84. package/dist/elements/bottom-nav.d.ts +30 -0
  85. package/dist/elements/bottom-nav.d.ts.map +1 -0
  86. package/dist/elements/bottom-nav.js +114 -0
  87. package/dist/elements/bottom-nav.js.map +1 -0
  88. package/dist/elements/carousel.d.ts +61 -0
  89. package/dist/elements/carousel.d.ts.map +1 -1
  90. package/dist/elements/carousel.js +282 -22
  91. package/dist/elements/carousel.js.map +1 -1
  92. package/dist/elements/dialog.d.ts +3 -3
  93. package/dist/elements/dialog.d.ts.map +1 -1
  94. package/dist/elements/dialog.js.map +1 -1
  95. package/dist/elements/dot.d.ts +37 -0
  96. package/dist/elements/dot.d.ts.map +1 -0
  97. package/dist/elements/dot.js +104 -0
  98. package/dist/elements/dot.js.map +1 -0
  99. package/dist/elements/fragment-ssr.d.ts.map +1 -1
  100. package/dist/elements/fragment-ssr.js +10 -0
  101. package/dist/elements/fragment-ssr.js.map +1 -1
  102. package/dist/elements/fragments/avatar/source.generated.d.ts.map +1 -1
  103. package/dist/elements/fragments/avatar/source.generated.js +1 -1
  104. package/dist/elements/fragments/avatar/source.generated.js.map +1 -1
  105. package/dist/elements/fragments/badge/source.generated.d.ts.map +1 -1
  106. package/dist/elements/fragments/badge/source.generated.js +1 -1
  107. package/dist/elements/fragments/badge/source.generated.js.map +1 -1
  108. package/dist/elements/fragments/bottom-nav/source.generated.d.ts +25 -0
  109. package/dist/elements/fragments/bottom-nav/source.generated.d.ts.map +1 -0
  110. package/dist/elements/fragments/bottom-nav/source.generated.js +4 -0
  111. package/dist/elements/fragments/bottom-nav/source.generated.js.map +1 -0
  112. package/dist/elements/fragments/component-host.json +147 -77
  113. package/dist/elements/fragments/dot/source.generated.d.ts +25 -0
  114. package/dist/elements/fragments/dot/source.generated.d.ts.map +1 -0
  115. package/dist/elements/fragments/dot/source.generated.js +4 -0
  116. package/dist/elements/fragments/dot/source.generated.js.map +1 -0
  117. package/dist/elements/fragments/heatmap/source.generated.d.ts.map +1 -1
  118. package/dist/elements/fragments/heatmap/source.generated.js +1 -1
  119. package/dist/elements/fragments/heatmap/source.generated.js.map +1 -1
  120. package/dist/elements/fragments/icon/source.generated.d.ts.map +1 -1
  121. package/dist/elements/fragments/icon/source.generated.js +1 -1
  122. package/dist/elements/fragments/icon/source.generated.js.map +1 -1
  123. package/dist/elements/fragments/image/source.generated.d.ts.map +1 -1
  124. package/dist/elements/fragments/image/source.generated.js +1 -1
  125. package/dist/elements/fragments/image/source.generated.js.map +1 -1
  126. package/dist/elements/fragments/mobile-shell/source.generated.d.ts +25 -0
  127. package/dist/elements/fragments/mobile-shell/source.generated.d.ts.map +1 -0
  128. package/dist/elements/fragments/mobile-shell/source.generated.js +4 -0
  129. package/dist/elements/fragments/mobile-shell/source.generated.js.map +1 -0
  130. package/dist/elements/fragments/qr/source.generated.d.ts +25 -0
  131. package/dist/elements/fragments/qr/source.generated.d.ts.map +1 -0
  132. package/dist/elements/fragments/qr/source.generated.js +4 -0
  133. package/dist/elements/fragments/qr/source.generated.js.map +1 -0
  134. package/dist/elements/fragments/radio/source.generated.d.ts.map +1 -1
  135. package/dist/elements/fragments/radio/source.generated.js +1 -1
  136. package/dist/elements/fragments/radio/source.generated.js.map +1 -1
  137. package/dist/elements/fragments/ribbon/source.generated.d.ts +25 -0
  138. package/dist/elements/fragments/ribbon/source.generated.d.ts.map +1 -0
  139. package/dist/elements/fragments/ribbon/source.generated.js +4 -0
  140. package/dist/elements/fragments/ribbon/source.generated.js.map +1 -0
  141. package/dist/elements/fragments/segmented/source.generated.d.ts.map +1 -1
  142. package/dist/elements/fragments/segmented/source.generated.js +1 -1
  143. package/dist/elements/fragments/segmented/source.generated.js.map +1 -1
  144. package/dist/elements/fragments/slider/source.generated.d.ts.map +1 -1
  145. package/dist/elements/fragments/slider/source.generated.js +1 -1
  146. package/dist/elements/fragments/slider/source.generated.js.map +1 -1
  147. package/dist/elements/fragments/tree/source.generated.d.ts.map +1 -1
  148. package/dist/elements/fragments/tree/source.generated.js +1 -1
  149. package/dist/elements/fragments/tree/source.generated.js.map +1 -1
  150. package/dist/elements/heatmap.d.ts +14 -3
  151. package/dist/elements/heatmap.d.ts.map +1 -1
  152. package/dist/elements/heatmap.js +49 -18
  153. package/dist/elements/heatmap.js.map +1 -1
  154. package/dist/elements/image.d.ts +20 -1
  155. package/dist/elements/image.d.ts.map +1 -1
  156. package/dist/elements/image.js +171 -1
  157. package/dist/elements/image.js.map +1 -1
  158. package/dist/elements/index.d.ts +10 -0
  159. package/dist/elements/index.d.ts.map +1 -1
  160. package/dist/elements/index.js +10 -0
  161. package/dist/elements/index.js.map +1 -1
  162. package/dist/elements/mobile-shell.d.ts +24 -0
  163. package/dist/elements/mobile-shell.d.ts.map +1 -0
  164. package/dist/elements/mobile-shell.js +53 -0
  165. package/dist/elements/mobile-shell.js.map +1 -0
  166. package/dist/elements/qr.d.ts +65 -0
  167. package/dist/elements/qr.d.ts.map +1 -0
  168. package/dist/elements/qr.js +244 -0
  169. package/dist/elements/qr.js.map +1 -0
  170. package/dist/elements/radio.d.ts +1 -0
  171. package/dist/elements/radio.d.ts.map +1 -1
  172. package/dist/elements/radio.js +7 -1
  173. package/dist/elements/radio.js.map +1 -1
  174. package/dist/elements/ribbon.d.ts +36 -0
  175. package/dist/elements/ribbon.d.ts.map +1 -0
  176. package/dist/elements/ribbon.js +91 -0
  177. package/dist/elements/ribbon.js.map +1 -0
  178. package/dist/elements/segmented.d.ts.map +1 -1
  179. package/dist/elements/segmented.js +3 -0
  180. package/dist/elements/segmented.js.map +1 -1
  181. package/dist/elements/slider.d.ts +25 -1
  182. package/dist/elements/slider.d.ts.map +1 -1
  183. package/dist/elements/slider.js +122 -16
  184. package/dist/elements/slider.js.map +1 -1
  185. package/dist/elements/sparkline.d.ts +3 -1
  186. package/dist/elements/sparkline.d.ts.map +1 -1
  187. package/dist/elements/sparkline.js +13 -3
  188. package/dist/elements/sparkline.js.map +1 -1
  189. package/dist/emit/css.d.ts.map +1 -1
  190. package/dist/emit/css.js +5 -1
  191. package/dist/emit/css.js.map +1 -1
  192. package/dist/emit/index.d.ts +2 -1
  193. package/dist/emit/index.d.ts.map +1 -1
  194. package/dist/emit/index.js +3 -1
  195. package/dist/emit/index.js.map +1 -1
  196. package/dist/emit/monaco.d.ts.map +1 -1
  197. package/dist/emit/monaco.js +2 -18
  198. package/dist/emit/monaco.js.map +1 -1
  199. package/dist/emit/terminal.d.ts +9 -0
  200. package/dist/emit/terminal.d.ts.map +1 -0
  201. package/dist/emit/terminal.js +32 -0
  202. package/dist/emit/terminal.js.map +1 -0
  203. package/dist/gauntlet.d.ts.map +1 -1
  204. package/dist/gauntlet.js +26 -0
  205. package/dist/gauntlet.js.map +1 -1
  206. package/dist/host/algorithms-bundle.generated.d.ts.map +1 -1
  207. package/dist/host/algorithms-bundle.generated.js +1 -1
  208. package/dist/host/algorithms-bundle.generated.js.map +1 -1
  209. package/dist/host/authoring-prelude.generated.d.ts +1 -1
  210. package/dist/host/authoring-prelude.generated.d.ts.map +1 -1
  211. package/dist/host/authoring-prelude.generated.js +1 -1
  212. package/dist/host/authoring-prelude.generated.js.map +1 -1
  213. package/dist/host/index.d.ts.map +1 -1
  214. package/dist/host/index.js +12 -0
  215. package/dist/host/index.js.map +1 -1
  216. package/dist/host/registry.d.ts +34 -7
  217. package/dist/host/registry.d.ts.map +1 -1
  218. package/dist/host/registry.js +45 -11
  219. package/dist/host/registry.js.map +1 -1
  220. package/dist/icon-builder.d.ts +41 -0
  221. package/dist/icon-builder.d.ts.map +1 -1
  222. package/dist/icon-builder.js +129 -8
  223. package/dist/icon-builder.js.map +1 -1
  224. package/dist/icons.d.ts +1 -1
  225. package/dist/icons.d.ts.map +1 -1
  226. package/dist/icons.js +2 -0
  227. package/dist/icons.js.map +1 -1
  228. package/dist/index.d.ts +12 -5
  229. package/dist/index.d.ts.map +1 -1
  230. package/dist/index.js +9 -4
  231. package/dist/index.js.map +1 -1
  232. package/dist/knobs.d.ts +22 -0
  233. package/dist/knobs.d.ts.map +1 -0
  234. package/dist/knobs.js +63 -0
  235. package/dist/knobs.js.map +1 -0
  236. package/dist/manifest/avatar.manifest.d.ts.map +1 -1
  237. package/dist/manifest/avatar.manifest.js +37 -17
  238. package/dist/manifest/avatar.manifest.js.map +1 -1
  239. package/dist/manifest/badge.manifest.js +1 -1
  240. package/dist/manifest/badge.manifest.js.map +1 -1
  241. package/dist/manifest/bottom-nav.manifest.d.ts +3 -0
  242. package/dist/manifest/bottom-nav.manifest.d.ts.map +1 -0
  243. package/dist/manifest/bottom-nav.manifest.js +149 -0
  244. package/dist/manifest/bottom-nav.manifest.js.map +1 -0
  245. package/dist/manifest/carousel.manifest.d.ts.map +1 -1
  246. package/dist/manifest/carousel.manifest.js +58 -4
  247. package/dist/manifest/carousel.manifest.js.map +1 -1
  248. package/dist/manifest/dialog.manifest.d.ts.map +1 -1
  249. package/dist/manifest/dialog.manifest.js +7 -4
  250. package/dist/manifest/dialog.manifest.js.map +1 -1
  251. package/dist/manifest/dot.manifest.d.ts +3 -0
  252. package/dist/manifest/dot.manifest.d.ts.map +1 -0
  253. package/dist/manifest/dot.manifest.js +172 -0
  254. package/dist/manifest/dot.manifest.js.map +1 -0
  255. package/dist/manifest/heatmap.manifest.d.ts.map +1 -1
  256. package/dist/manifest/heatmap.manifest.js +60 -2
  257. package/dist/manifest/heatmap.manifest.js.map +1 -1
  258. package/dist/manifest/icon.manifest.d.ts.map +1 -1
  259. package/dist/manifest/icon.manifest.js +28 -1
  260. package/dist/manifest/icon.manifest.js.map +1 -1
  261. package/dist/manifest/image.manifest.d.ts.map +1 -1
  262. package/dist/manifest/image.manifest.js +100 -1
  263. package/dist/manifest/image.manifest.js.map +1 -1
  264. package/dist/manifest/mobile-shell.manifest.d.ts +3 -0
  265. package/dist/manifest/mobile-shell.manifest.d.ts.map +1 -0
  266. package/dist/manifest/mobile-shell.manifest.js +177 -0
  267. package/dist/manifest/mobile-shell.manifest.js.map +1 -0
  268. package/dist/manifest/panel.manifest.d.ts.map +1 -1
  269. package/dist/manifest/panel.manifest.js +2 -1
  270. package/dist/manifest/panel.manifest.js.map +1 -1
  271. package/dist/manifest/qr.manifest.d.ts +3 -0
  272. package/dist/manifest/qr.manifest.d.ts.map +1 -0
  273. package/dist/manifest/qr.manifest.js +314 -0
  274. package/dist/manifest/qr.manifest.js.map +1 -0
  275. package/dist/manifest/radio.manifest.d.ts.map +1 -1
  276. package/dist/manifest/radio.manifest.js +54 -1
  277. package/dist/manifest/radio.manifest.js.map +1 -1
  278. package/dist/manifest/registry.d.ts.map +1 -1
  279. package/dist/manifest/registry.js +10 -0
  280. package/dist/manifest/registry.js.map +1 -1
  281. package/dist/manifest/ribbon.manifest.d.ts +3 -0
  282. package/dist/manifest/ribbon.manifest.d.ts.map +1 -0
  283. package/dist/manifest/ribbon.manifest.js +173 -0
  284. package/dist/manifest/ribbon.manifest.js.map +1 -0
  285. package/dist/manifest/segmented.manifest.js +5 -5
  286. package/dist/manifest/segmented.manifest.js.map +1 -1
  287. package/dist/manifest/slider.manifest.d.ts.map +1 -1
  288. package/dist/manifest/slider.manifest.js +62 -4
  289. package/dist/manifest/slider.manifest.js.map +1 -1
  290. package/dist/manifest/sparkline.manifest.d.ts.map +1 -1
  291. package/dist/manifest/sparkline.manifest.js +27 -1
  292. package/dist/manifest/sparkline.manifest.js.map +1 -1
  293. package/dist/manifest/tree.manifest.d.ts.map +1 -1
  294. package/dist/manifest/tree.manifest.js +24 -10
  295. package/dist/manifest/tree.manifest.js.map +1 -1
  296. package/dist/markup/avatar.d.ts +33 -0
  297. package/dist/markup/avatar.d.ts.map +1 -1
  298. package/dist/markup/avatar.js +55 -5
  299. package/dist/markup/avatar.js.map +1 -1
  300. package/dist/markup/bottom-nav.d.ts +11 -0
  301. package/dist/markup/bottom-nav.d.ts.map +1 -0
  302. package/dist/markup/bottom-nav.js +3 -0
  303. package/dist/markup/bottom-nav.js.map +1 -0
  304. package/dist/markup/dialog.d.ts +3 -0
  305. package/dist/markup/dialog.d.ts.map +1 -1
  306. package/dist/markup/dialog.js.map +1 -1
  307. package/dist/markup/dot.d.ts +27 -0
  308. package/dist/markup/dot.d.ts.map +1 -0
  309. package/dist/markup/dot.js +27 -0
  310. package/dist/markup/dot.js.map +1 -0
  311. package/dist/markup/heatmap.d.ts +2 -2
  312. package/dist/markup/heatmap.d.ts.map +1 -1
  313. package/dist/markup/heatmap.js.map +1 -1
  314. package/dist/markup/image.d.ts +9 -0
  315. package/dist/markup/image.d.ts.map +1 -1
  316. package/dist/markup/image.js +24 -0
  317. package/dist/markup/image.js.map +1 -1
  318. package/dist/markup/index.d.ts +17 -7
  319. package/dist/markup/index.d.ts.map +1 -1
  320. package/dist/markup/index.js +9 -4
  321. package/dist/markup/index.js.map +1 -1
  322. package/dist/markup/mobile-shell.d.ts +3 -0
  323. package/dist/markup/mobile-shell.d.ts.map +1 -0
  324. package/dist/markup/mobile-shell.js +3 -0
  325. package/dist/markup/mobile-shell.js.map +1 -0
  326. package/dist/markup/qr.d.ts +77 -0
  327. package/dist/markup/qr.d.ts.map +1 -0
  328. package/dist/markup/qr.js +37 -0
  329. package/dist/markup/qr.js.map +1 -0
  330. package/dist/markup/radio.d.ts +1 -1
  331. package/dist/markup/radio.d.ts.map +1 -1
  332. package/dist/markup/radio.js +1 -1
  333. package/dist/markup/radio.js.map +1 -1
  334. package/dist/markup/ribbon.d.ts +23 -0
  335. package/dist/markup/ribbon.d.ts.map +1 -0
  336. package/dist/markup/ribbon.js +23 -0
  337. package/dist/markup/ribbon.js.map +1 -0
  338. package/dist/markup/segmented.d.ts +2 -0
  339. package/dist/markup/segmented.d.ts.map +1 -1
  340. package/dist/markup/segmented.js +2 -0
  341. package/dist/markup/segmented.js.map +1 -1
  342. package/dist/markup/sparkline.d.ts +8 -0
  343. package/dist/markup/sparkline.d.ts.map +1 -1
  344. package/dist/markup/sparkline.js +37 -0
  345. package/dist/markup/sparkline.js.map +1 -1
  346. package/dist/markup/tree.d.ts +15 -4
  347. package/dist/markup/tree.d.ts.map +1 -1
  348. package/dist/markup/tree.js +16 -4
  349. package/dist/markup/tree.js.map +1 -1
  350. package/dist/mcp/tools.d.ts +7 -0
  351. package/dist/mcp/tools.d.ts.map +1 -1
  352. package/dist/mcp/tools.js +65 -29
  353. package/dist/mcp/tools.js.map +1 -1
  354. package/dist/qr.d.ts +84 -0
  355. package/dist/qr.d.ts.map +1 -0
  356. package/dist/qr.js +596 -0
  357. package/dist/qr.js.map +1 -0
  358. package/dist/series.d.ts +29 -0
  359. package/dist/series.d.ts.map +1 -1
  360. package/dist/series.js +36 -0
  361. package/dist/series.js.map +1 -1
  362. package/dist/theme-file.d.ts +21 -0
  363. package/dist/theme-file.d.ts.map +1 -1
  364. package/dist/theme-file.js +42 -0
  365. package/dist/theme-file.js.map +1 -1
  366. package/dist/token-meta.d.ts.map +1 -1
  367. package/dist/token-meta.js +6 -0
  368. package/dist/token-meta.js.map +1 -1
  369. package/dist/types.d.ts +99 -2
  370. package/dist/types.d.ts.map +1 -1
  371. package/dist/vocab.d.ts +5 -0
  372. package/dist/vocab.d.ts.map +1 -1
  373. package/dist/vocab.js.map +1 -1
  374. package/manifest.json +25 -2
  375. package/package.json +1 -1
@@ -159,6 +159,34 @@ const titles = [[], [], [, "Wed PM: 6 runs · 2 failed · click to view"]];
159
159
  ---
160
160
 
161
161
  <Heatmap rows={rows} cols={cols} values={values} current={current} titles={titles} currentPulse label="Runs per bucket, this week" />`;
162
+ const categoricalHtmlExample = `<xtyle-heatmap
163
+ scheme="skittles"
164
+ categorical
165
+ scale
166
+ label="Weekly totals by category"></xtyle-heatmap>
167
+ <script>
168
+ const grid = document.querySelector("xtyle-heatmap");
169
+ grid.rows = ["Week 1", "Week 2", "Week 3"];
170
+ grid.cols = ["Bugs", "Features", "Docs", "Chores"];
171
+ grid.values = [[8, 3, 1, 5], [2, 6, 4, 3], [5, 1, 7, 2]];
172
+ </script>`;
173
+ const categoricalSvelteExample = `<script lang="ts">
174
+ import { Heatmap } from "@xtyle/svelte";
175
+
176
+ const rows = ["Week 1", "Week 2", "Week 3"];
177
+ const cols = ["Bugs", "Features", "Docs", "Chores"];
178
+ const values = [[8, 3, 1, 5], [2, 6, 4, 3], [5, 1, 7, 2]];
179
+ </script>
180
+
181
+ <Heatmap {rows} {cols} {values} scheme="skittles" categorical scale label="Weekly totals by category" />`;
182
+ const categoricalAstroExample = `---
183
+ import { Heatmap } from "@xtyle/astro";
184
+ const rows = ["Week 1", "Week 2", "Week 3"];
185
+ const cols = ["Bugs", "Features", "Docs", "Chores"];
186
+ const values = [[8, 3, 1, 5], [2, 6, 4, 3], [5, 1, 7, 2]];
187
+ ---
188
+
189
+ <Heatmap rows={rows} cols={cols} values={values} scheme="skittles" categorical scale label="Weekly totals by category" />`;
162
190
  export const heatmapManifest = {
163
191
  id: "heatmap",
164
192
  name: "Heatmap",
@@ -167,7 +195,7 @@ export const heatmapManifest = {
167
195
  keywords: ["heat map", "activity calendar", "punch card", "contribution graph", "intensity grid"],
168
196
  seeAlso: ["bar", "pie", "sparkline"],
169
197
  summary: "A 2D intensity grid (the activity-calendar / punch-card shape), colored on a theme-derived ramp, with a per-cell readout and opt-in clickable cells.",
170
- description: "Heatmap renders a matrix of values as a grid of colored cells, each cell's fill scaled by its value on an intensity ramp resolved off the live theme, the activity-calendar / punch-card shape (runs per hour over a week, load by host and resource, a GitHub-style contribution grid). Feed it a dense `values` matrix (row-major) plus optional `rows` and `cols` labels; the default `accent` ramp washes from a faint surface up to the accent, and `thermal` or `status` (or an explicit color array) swap the scale. Every cell's intensity is normalized against the data's own maximum, or an explicit `max` so several grids share one scale. It's interactive: hovering or focusing a cell floats a value readout, and the whole grid is mirrored into a visually-hidden data table so assistive tech reads the numbers, not the pixels. Set `selectable` to make cells a drill-in surface, each firing a `select` event with its row, column, and value. `showValues` prints the number in each cell. Feed an optional second `glow` matrix (the same shape as `values`) to carry a second signal in one grid: the fill reads one metric while a per-cell halo reads another (run count vs total runtime, requests vs error rate). An empty matrix shows a muted `No data` message in place of the grid.",
198
+ description: "Heatmap renders a matrix of values as a grid of colored cells, each cell's fill scaled by its value on an intensity ramp resolved off the live theme, the activity-calendar / punch-card shape (runs per hour over a week, load by host and resource, a GitHub-style contribution grid). Feed it a dense `values` matrix (row-major) plus optional `rows` and `cols` labels; the default `accent` ramp washes from a faint surface up to the accent, and `thermal` or `status` (or an explicit color array) swap the scale. Set `categorical` to color by category instead of intensity: each column (or each row, with `categoryAxis=\"row\"`) takes a distinct hue from a categorical `SeriesScheme` (`accents` / `skittles` / `statuses`), and the cell value washes that hue from the surface up. One grid, then, reads its categories by hue and their magnitude by fill: the categorical heat-grid. Turn `scale` on and a legend keys the hues. Every cell's intensity is normalized against the data's own maximum, or an explicit `max` so several grids share one scale. It's interactive: hovering or focusing a cell floats a value readout, and the whole grid is mirrored into a visually-hidden data table so assistive tech reads the numbers, not the pixels. Set `selectable` to make cells a drill-in surface, each firing a `select` event with its row, column, and value. `showValues` prints the number in each cell. Feed an optional second `glow` matrix (the same shape as `values`) to carry a second signal in one grid: the fill reads one metric while a per-cell halo reads another (run count vs total runtime, requests vs error rate). An empty matrix shows a muted `No data` message in place of the grid.",
171
199
  bindings: ["html", "svelte", "astro"],
172
200
  anatomy: [
173
201
  {
@@ -200,6 +228,12 @@ export const heatmapManifest = {
200
228
  selector: ".xtyle-heatmap__scale",
201
229
  tokens: ["--space-2", "--text-xs", "--fg-3", "--bg-0", "--border-thin"],
202
230
  },
231
+ {
232
+ name: "legend",
233
+ description: "The categorical key below the grid: one swatch per category hue, labeled off the category axis.",
234
+ selector: ".xtyle-heatmap__legend",
235
+ tokens: ["--space-1", "--space-3", "--text-xs", "--fg-2", "--fg-3", "--bg-0", "--border-thin"],
236
+ },
203
237
  ],
204
238
  props: [
205
239
  {
@@ -297,9 +331,24 @@ export const heatmapManifest = {
297
331
  name: "scale",
298
332
  type: "boolean",
299
333
  default: "false",
300
- description: "Shows a color-scale key below the grid: five swatches sampled from the ramp between the low (`0`) and high (`max`) value endpoints, so a viewer reads a cell's shade as a magnitude without hovering. The swatches derive off the same ramp as the cells, so the key always matches them.",
334
+ description: "Shows a key below the grid: an intensity mode grid gets five ramp swatches between the low (`0`) and high (`max`) value endpoints, and a `categorical` grid gets a legend of one swatch per category hue. The key derives off the same colors as the cells, so it always matches them.",
335
+ bindings: ["html", "svelte", "astro"],
336
+ },
337
+ {
338
+ name: "categorical",
339
+ type: "boolean",
340
+ default: "false",
341
+ description: "Colors by category instead of intensity: each column (or, with `categoryAxis=\"row\"`, each row) takes a distinct hue from a categorical `SeriesScheme` read off `scheme` (`accents` / `skittles` / `statuses`; defaults to `accents`), and each cell washes that hue from the surface up by its value. The categorical heat-grid, for a matrix whose axis is a set of unrelated categories rather than one low-to-high magnitude. Turn on `scale` for a hue legend.",
301
342
  bindings: ["html", "svelte", "astro"],
302
343
  },
344
+ {
345
+ name: "categoryAxis",
346
+ type: '"col" | "row"',
347
+ default: '"col"',
348
+ description: "Which axis carries the categories in `categorical` mode: `col` (default) gives each column its own hue, `row` each row. Kebab `category-axis` on the element. Ignored unless `categorical` is set.",
349
+ bindings: ["html", "svelte", "astro"],
350
+ options: ["col", "row"],
351
+ },
303
352
  {
304
353
  name: "showValues",
305
354
  type: "boolean",
@@ -354,6 +403,7 @@ export const heatmapManifest = {
354
403
  "--bg-0",
355
404
  "--space-1",
356
405
  "--space-2",
406
+ "--space-3",
357
407
  "--radius-md",
358
408
  "--surface-overlay",
359
409
  "--surface-overlay-border",
@@ -374,6 +424,7 @@ export const heatmapManifest = {
374
424
  ],
375
425
  composition: [
376
426
  "The cell colors derive off the same register as the rest of the UI, so a grid matches its surrounding chrome without hand-picking a scale. `accent` is the neutral default (the contribution-graph wash); reach for `thermal` when the data is a true low-to-high magnitude and the extra hue helps read it.",
427
+ "Reach for `categorical` when the grid's axis is a set of unrelated categories rather than one low-to-high magnitude: each column (or `categoryAxis=\"row\"` each row) takes its own hue from a `SeriesScheme`, and the cell value washes it from the surface up, so a viewer reads which category by hue and how much by fill in one glance. It shares the same `seriesPalette` the `Bar` and `Pie` charts color with, so a categorical grid stays coherent with the rest of a dashboard; a continuous ramp (`accent` / `thermal`) is the wrong tool for distinct categories and vice versa.",
377
428
  "Pin `max` when two grids should be read against each other, so a cell of the same value takes the same color in both.",
378
429
  "Turn on `scale` for a color-scale key so a cell's shade reads as a magnitude at a glance, not only on hover, the way a contribution graph carries its own low-to-high legend. The swatches sample the same ramp as the cells, so the key can't drift from what the grid shows.",
379
430
  "Carry two metrics in one grid with `glow`: the fill reads the primary metric (say, run count) while a per-cell halo reads a second (total runtime), so a cell can be dim-but-glowing (few long runs) or bright-but-quiet (many short ones). The halo takes the ramp's hot-end color, so it stays theme-coherent; pin `glowMax` to share one glow scale across grids.",
@@ -386,6 +437,7 @@ export const heatmapManifest = {
386
437
  "Each cell is a focusable tab stop with an `aria-label` naming its row, column, and value, so the grid is navigable by keyboard and the value readout appears on focus as well as hover.",
387
438
  "With `selectable`, each cell becomes a `role=\"button\"` (announced as actionable) and activates on Enter/Space as well as click; a read-only grid keeps its cells as `role=\"img\"` data points.",
388
439
  "Color is never the only channel: the value readout, the optional in-cell `showValues`, the optional `scale` key's numeric endpoints, and the data table all repeat the number.",
440
+ "In `categorical` mode the category never rests on hue alone: each cell's `aria-label` and the data table already name its row and column, so the category a hue stands for is read from the labels; the legend itself is decorative (`aria-hidden`), a visual shortcut over the axis labels that carry the meaning.",
389
441
  "A `titles[row][col]` becomes that cell's `aria-label`, so the richer hover text is the cell's accessible name too, never a mouse-only affordance; the current-cell ring is decorative, so it never carries meaning on its own.",
390
442
  "The `glow` halo is a visual channel, so it never carries its metric alone: when a `glow` matrix is present, each cell's glow value folds into its accessible name and its hover readout (named by `glowLabel`), so the second metric has a text path for assistive tech even though the halo itself is decorative. The summary data table still lists the primary (fill) metric.",
391
443
  ],
@@ -420,6 +472,12 @@ export const heatmapManifest = {
420
472
  description: "`current` rings the live cell (with `currentPulse` to breathe it and `currentTone` to tint it), the \"you are here\" on a time grid, and `titles` gives a cell a fuller hover readout that doubles as its accessible name.",
421
473
  source: { html: nowHtmlExample, svelte: nowSvelteExample, astro: nowAstroExample },
422
474
  },
475
+ {
476
+ id: "categorical",
477
+ title: "Categorical heat-grid",
478
+ description: "`categorical` colors each column a distinct hue from a `SeriesScheme` (`skittles` here) and washes it up by value, so a grid whose columns are unrelated categories reads by hue, not one shared ramp. `scale` keys the hues in a legend.",
479
+ source: { html: categoricalHtmlExample, svelte: categoricalSvelteExample, astro: categoricalAstroExample },
480
+ },
423
481
  ],
424
482
  };
425
483
  //# sourceMappingURL=heatmap.manifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"heatmap.manifest.js","sourceRoot":"","sources":["../../src/manifest/heatmap.manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,GAAG;;;;;;;;UAQV,CAAC;AAEX,MAAM,aAAa,GAAG;;;;;;;;0EAQoD,CAAC;AAE3E,MAAM,YAAY,GAAG;;;;;;;2FAOsE,CAAC;AAE5F,MAAM,iBAAiB,GAAG;;;;;;;;;UAShB,CAAC;AAEX,MAAM,mBAAmB,GAAG;;;;;;;;iGAQqE,CAAC;AAElG,MAAM,kBAAkB,GAAG;;;;;;;kHAOuF,CAAC;AAEnH,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;UAapB,CAAC;AAEX,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;GAgB7B,CAAC;AAEJ,MAAM,sBAAsB,GAAG;;;;;;;;;;;;UAYrB,CAAC;AAEX,MAAM,eAAe,GAAG;;;;;;;;;;UAUd,CAAC;AAEX,MAAM,iBAAiB,GAAG;;;;;;;;;2HASiG,CAAC;AAE5H,MAAM,gBAAgB,GAAG;;;;;;;;iJAQwH,CAAC;AAElJ,MAAM,cAAc,GAAG;;;;;;;;;;;UAWb,CAAC;AAEX,MAAM,gBAAgB,GAAG;;;;;;;;;;sGAU6E,CAAC;AAEvG,MAAM,eAAe,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
+ {"version":3,"file":"icon.manifest.d.ts","sourceRoot":"","sources":["../../src/manifest/icon.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAgGpD,eAAO,MAAM,YAAY,EAAE,iBAmI1B,CAAC"}
@@ -59,6 +59,27 @@ import Icon from "@xtyle/astro/Icon.astro";
59
59
 
60
60
  <Icon name="success" tone="success" />
61
61
  <Icon name="error" tone="danger" />`;
62
+ const textHtmlExample = `<!-- the letter primitive typesets a glyph; -f1 draws it in the display font -->
63
+ <xtyle-icon name="initial--letter-A" size="xl"></xtyle-icon>
64
+ <xtyle-icon name="mono--letter-7-f2" size="xl"></xtyle-icon>
65
+
66
+ <!-- a monogram badged, colored, and scaled like any primitive -->
67
+ <xtyle-icon name="badge--circle-c1--letter-A-cb-s55" size="xl"></xtyle-icon>
68
+
69
+ <!-- a ---f finish swaps a slot to a named web font (load it separately) -->
70
+ <xtyle-icon name="mark--letter-Q-f1---f1-noto+sans+symbols" size="xl"></xtyle-icon>`;
71
+ const textSvelteExample = `<script lang="ts">
72
+ import { Icon } from "@xtyle/svelte";
73
+ </script>
74
+
75
+ <Icon name="initial--letter-A" size="xl" />
76
+ <Icon name="badge--circle-c1--letter-A-cb-s55" size="xl" />`;
77
+ const textAstroExample = `---
78
+ import Icon from "@xtyle/astro/Icon.astro";
79
+ ---
80
+
81
+ <Icon name="initial--letter-A" size="xl" />
82
+ <Icon name="badge--circle-c1--letter-A-cb-s55" size="xl" />`;
62
83
  export const iconManifest = {
63
84
  id: "icon",
64
85
  name: "Icon",
@@ -67,7 +88,7 @@ export const iconManifest = {
67
88
  keywords: ["glyph", "symbol", "svg", "pictogram", "mark"],
68
89
  seeAlso: ["swatch", "avatar", "rating"],
69
90
  summary: "A functional glyph, or a mark generated from a name, drawn in the current text color.",
70
- description: "Icon renders one glyph from a small functional set (chevrons, arrows, close, check, the status marks, a spinner, the menu dots, and the media-transport family: play, pause, stop, skip-forward, skip-back) as inline SVG. It carries no color of its own: the glyph is drawn in `currentColor`, so it inherits the text color around it and matches the derived theme with nothing to wire. It sizes off the surrounding type by default, so an icon set beside a word lines up with it; `size` steps it in fixed `em` for a standalone glyph. An optional `tone` tints it to a semantic role or named hue, `spin` turns it into a loading affordance, and a `label` promotes it from decorative to a named image for assistive tech. Beyond the lookup, a `name` can carry a spec: a terse grammar (`shield--star-s45-c1`) the engine parses into a layered mark and composes on the fly, placing primitives on a grid, sizing, rotating, outlining, or knocking them out, and coloring them from the theme's own series via `colors` so a generated mark recolors with the theme. Lookup for the common glyph, generation for everything else, one element for both.",
91
+ description: "Icon renders one glyph from a small functional set (chevrons, arrows, close, check, the status marks, a spinner, the menu dots, and the media-transport family: play, pause, stop, skip-forward, skip-back) as inline SVG. It carries no color of its own: the glyph is drawn in `currentColor`, so it inherits the text color around it and matches the derived theme with nothing to wire. It sizes off the surrounding type by default, so an icon set beside a word lines up with it; `size` steps it in fixed `em` for a standalone glyph. An optional `tone` tints it to a semantic role or named hue, `spin` turns it into a loading affordance, and a `label` promotes it from decorative to a named image for assistive tech. Beyond the lookup, a `name` can carry a spec: a terse grammar (`shield--star-s45-c1`) the engine parses into a layered mark and composes on the fly, placing primitives on a grid, sizing, rotating, outlining, or knocking them out, and coloring them from the theme's own series via `colors` so a generated mark recolors with the theme. A parametric `letter` primitive typesets a glyph as a mark (`--letter-A`) in an indexed theme font slot (`f0` sans, `f1` display, `f2` mono) that a `---f` finish can swap for another theme font or a named web font. Lookup for the common glyph, generation for everything else, one element for both.",
71
92
  bindings: ["html", "svelte", "astro"],
72
93
  anatomy: [
73
94
  {
@@ -175,6 +196,12 @@ export const iconManifest = {
175
196
  description: "A `name` carrying a spec is composed on the fly: primitives on a grid, sized / rotated / outlined / knocked out, colored from the theme's series via `colors`.",
176
197
  source: { html: genHtmlExample, svelte: genSvelteExample, astro: genAstroExample },
177
198
  },
199
+ {
200
+ id: "text-marks",
201
+ title: "Text marks",
202
+ description: "The `letter` primitive typesets a glyph as a mark, drawn in an indexed theme font slot (`f0` sans, `f1` display, `f2` mono); a `---f` finish swaps a slot for another theme font or a named web font, and `iconFontImports` returns the loading code for a named web font.",
203
+ source: { html: textHtmlExample, svelte: textSvelteExample, astro: textAstroExample },
204
+ },
178
205
  ],
179
206
  };
180
207
  //# sourceMappingURL=icon.manifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.manifest.js","sourceRoot":"","sources":["../../src/manifest/icon.manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,WAAW,GAAG;;;;;gDAK4B,CAAC;AAEjD,MAAM,eAAe,GAAG;;;;6DAIqC,CAAC;AAE9D,MAAM,aAAa,GAAG;;;;;sBAKA,CAAC;AAEvB,MAAM,iBAAiB,GAAG;;;;;4CAKkB,CAAC;AAE7C,MAAM,YAAY,GAAG;;;;;sBAKC,CAAC;AAEvB,MAAM,cAAc,GAAG;;;;;;;;;;sFAU+D,CAAC;AAEvF,MAAM,gBAAgB,GAAG;;;;;qEAK4C,CAAC;AAEtE,MAAM,eAAe,GAAG;;;;;qEAK6C,CAAC;AAEtE,MAAM,gBAAgB,GAAG;;;;;oCAKW,CAAC;AAErC,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC9C,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC;IACzD,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACvC,OAAO,EAAE,uFAAuF;IAChG,WAAW,EACV,ymCAAymC;IAC1mC,QAAQ,EAAE,CAAC,MAA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C,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpD,WAAW,EAAE;QACZ,8HAA8H;QAC9H,+FAA+F;QAC/F,2GAA2G;QAC3G,uGAAuG;KACvG;IACD,IAAI,EAAE;QACL,sJAAsJ;QACtJ,2IAA2I;QAC3I,+FAA+F;KAC/F;IACD,QAAQ,EAAE;QACT;YACC,EAAE,EAAE,kBAAkB;YACtB,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,gDAAgD;YAC7D,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE;SACzE;QACD;YACC,EAAE,EAAE,oBAAoB;YACxB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,2EAA2E;YACxF,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;SACrF;QACD;YACC,EAAE,EAAE,iBAAiB;YACrB,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACV,gKAAgK;YACjK,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,EAAE;SAClF;QACD;YACC,EAAE,EAAE,YAAY;YAChB,KAAK,EAAE,YAAY;YACnB,WAAW,EACV,4QAA4Q;YAC7Q,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;SACrF;KACD;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"image.manifest.d.ts","sourceRoot":"","sources":["../../src/manifest/image.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAoFpD,eAAO,MAAM,aAAa,EAAE,iBA6L3B,CAAC"}
1
+ {"version":3,"file":"image.manifest.d.ts","sourceRoot":"","sources":["../../src/manifest/image.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAsIpD,eAAO,MAAM,aAAa,EAAE,iBAiP3B,CAAC"}
@@ -69,6 +69,53 @@ const imperativeSvelteExample = `<script lang="ts">
69
69
  <button onclick={() => view("/full.jpg", "A city skyline at dusk")}>
70
70
  <img src="/thumb.jpg" alt="A city skyline at dusk" />
71
71
  </button>`;
72
+ const hoverHtmlExample = `<!-- A video preview on hover: the still is the poster,
73
+ the clip plays muted on hover, and resets to the still on leave. -->
74
+ <xtyle-image src="/cover.jpg" alt="Nebula Drifter" ratio="16/9" hover-src="/preview.mp4"></xtyle-image>
75
+
76
+ <!-- Allow sound: a mute/unmute toggle appears, starting muted. -->
77
+ <xtyle-image src="/cover.jpg" alt="Nebula Drifter" ratio="16/9"
78
+ hover-src="/preview.mp4" hover-audio="off"></xtyle-image>
79
+
80
+ <!-- Or reveal a whole nested carousel of screenshots on hover. -->
81
+ <xtyle-image src="/cover.jpg" alt="Nebula Drifter" ratio="16/9">
82
+ <xtyle-carousel slot="hover" autoplay loop transition="fade" pause-on-hover="false" interval="1200" dots="false" controls="false" label="Screenshots">
83
+ <xtyle-image src="/shot-1.jpg" alt="Screenshot 1" ratio="16/9"></xtyle-image>
84
+ <xtyle-image src="/shot-2.jpg" alt="Screenshot 2" ratio="16/9"></xtyle-image>
85
+ <xtyle-image src="/shot-3.jpg" alt="Screenshot 3" ratio="16/9"></xtyle-image>
86
+ </xtyle-carousel>
87
+ </xtyle-image>`;
88
+ const hoverSvelteExample = `<script lang="ts">
89
+ import { Image, Carousel } from "@xtyle/svelte";
90
+ </script>
91
+
92
+ <!-- A video preview on hover -->
93
+ <Image src="/cover.jpg" alt="Nebula Drifter" ratio="16/9" hoverSrc="/preview.mp4" />
94
+
95
+ <!-- A nested carousel of screenshots on hover -->
96
+ <Image src="/cover.jpg" alt="Nebula Drifter" ratio="16/9">
97
+ <Carousel slot="hover" autoplay loop transition="fade" pauseOnHover={false} interval={1200} dots={false} controls={false} label="Screenshots">
98
+ <Image src="/shot-1.jpg" alt="Screenshot 1" ratio="16/9" />
99
+ <Image src="/shot-2.jpg" alt="Screenshot 2" ratio="16/9" />
100
+ <Image src="/shot-3.jpg" alt="Screenshot 3" ratio="16/9" />
101
+ </Carousel>
102
+ </Image>`;
103
+ const hoverAstroExample = `---
104
+ import Image from "@xtyle/astro/Image.astro";
105
+ import Carousel from "@xtyle/astro/Carousel.astro";
106
+ ---
107
+
108
+ <!-- A video preview on hover -->
109
+ <Image src="/cover.jpg" alt="Nebula Drifter" ratio="16/9" hoverSrc="/preview.mp4" />
110
+
111
+ <!-- A nested carousel of screenshots on hover -->
112
+ <Image src="/cover.jpg" alt="Nebula Drifter" ratio="16/9">
113
+ <Carousel slot="hover" autoplay loop transition="fade" pauseOnHover={false} interval={1200} dots={false} controls={false} label="Screenshots">
114
+ <Image src="/shot-1.jpg" alt="Screenshot 1" ratio="16/9" />
115
+ <Image src="/shot-2.jpg" alt="Screenshot 2" ratio="16/9" />
116
+ <Image src="/shot-3.jpg" alt="Screenshot 3" ratio="16/9" />
117
+ </Carousel>
118
+ </Image>`;
72
119
  export const imageManifest = {
73
120
  id: "image",
74
121
  name: "Image",
@@ -110,6 +157,18 @@ export const imageManifest = {
110
157
  selector: ".xtyle-image__zoom",
111
158
  tokens: ["--bg-1", "--fg-1", "--radius-full", "--surface-overlay-border", "--elevation-3"],
112
159
  },
160
+ {
161
+ name: "hover",
162
+ description: "The hover-preview overlay: hidden until the frame is hovered or focused, then it cross-fades in over the still. Holds the `hover` slot content (a `<video>`, images, or a nested `<xtyle-carousel>`) or the media generated from `hover-src`.",
163
+ selector: ".xtyle-image__hover",
164
+ tokens: ["--duration-slow", "--ease-standard"],
165
+ },
166
+ {
167
+ name: "audio",
168
+ description: "The mute/unmute toggle shown on a hover video when `hover-audio` allows sound.",
169
+ selector: ".xtyle-image__audio",
170
+ tokens: ["--bg-1", "--fg-1", "--radius-full", "--surface-overlay-border", "--elevation-3"],
171
+ },
113
172
  ],
114
173
  props: [
115
174
  {
@@ -175,6 +234,25 @@ export const imageManifest = {
175
234
  description: "An optional caption, rendered as a `figcaption` below the frame.",
176
235
  bindings: ["html", "svelte", "astro"],
177
236
  },
237
+ {
238
+ name: "hover-src",
239
+ type: "string",
240
+ description: "A video (`.mp4`/`.webm`) or gif revealed on hover and focus: the still shows at rest, the media plays on hover (muted, looping), and it resets to the still on leave. The video is auto-detected by extension; the still `src` is its poster. A convenience over the `hover` slot for the single-media case. Wired only when the runtime is present.",
241
+ bindings: ["html", "svelte", "astro"],
242
+ },
243
+ {
244
+ name: "hover-poster",
245
+ type: "string",
246
+ description: "An explicit poster still for the `hover-src` video, shown before it plays. Defaults to the image's own `src`.",
247
+ bindings: ["html", "svelte", "astro"],
248
+ },
249
+ {
250
+ name: "hover-audio",
251
+ type: "ImageHoverAudio",
252
+ description: "Allows sound on the hover video and shows a mute/unmute toggle: `off` starts muted (click to unmute), `on` starts with sound where the browser permits. Omit for a silent preview with no toggle (the default).",
253
+ bindings: ["html", "svelte", "astro"],
254
+ options: ["off", "on"],
255
+ },
178
256
  ],
179
257
  variants: [],
180
258
  sizes: [],
@@ -189,8 +267,19 @@ export const imageManifest = {
189
267
  description: "When the image fails to load: a muted frame with a warning glyph replaces the picture.",
190
268
  selector: ".xtyle-image__frame[data-error]",
191
269
  },
270
+ {
271
+ name: "hover-active",
272
+ description: "While the frame is hovered or focused with hover-preview content: the overlay is faded in and any hover video is playing.",
273
+ selector: ".xtyle-image__frame[data-hover-active]",
274
+ },
275
+ ],
276
+ slots: [
277
+ {
278
+ name: "hover",
279
+ description: "Custom hover-preview content, revealed on hover and focus. Put a `<video slot=\"hover\">` (played and reset by the component), a gif `<img>`, several images, or a whole nested `<xtyle-carousel slot=\"hover\" autoplay>` here. Takes precedence over `hover-src`.",
280
+ bindings: ["html", "svelte", "astro"],
281
+ },
192
282
  ],
193
- slots: [],
194
283
  consumedTokens: [
195
284
  "--bg-1",
196
285
  "--bg-2",
@@ -221,6 +310,7 @@ export const imageManifest = {
221
310
  "Set `lightbox` on gallery thumbnails so a click opens the full image over a scrim; the close control uses the built-in `close` icon.",
222
311
  "For images the component never rendered (a markdown/CMS body, a `{@html}` block, mixed sources), mount one `<xtyle-lightbox>` and tag images with `data-xtyle-lightbox`, or call `openLightbox(src, { alt, caption })`; one shared dialog, not a second bespoke lightbox.",
223
312
  "Pair `fit=\"contain\"` with a framed `ratio` for logos or art that must not be cropped.",
313
+ "Add `hover-src` (a video/gif) or a `hover` slot for a play-on-hover preview: the still animates on hover, then resets on leave. Inside a `Carousel`, each `Image` slide can carry its own preview and the carousel's hover-pause fires in the same gesture; drop a nested `<xtyle-carousel slot=\"hover\">` in for a mini gallery-on-hover.",
224
314
  ],
225
315
  a11y: [
226
316
  "Always set `alt`: it names the image for assistive tech and labels the lightbox trigger. Use an empty `alt` only for a purely decorative image.",
@@ -229,6 +319,9 @@ export const imageManifest = {
229
319
  "`trigger=\"button\"` renders a real `<button>` for the zoom control, so it is keyboard-focusable and activates with Enter or Space; it reveals on hover and on focus so a keyboard user always sees it, and stays visible on touch, where there is no hover. Both trigger modes carry the image's `alt` as their accessible name.",
230
320
  "The blur-up and lightbox are progressive enhancements: with no JavaScript the image renders normally and is never hidden behind a script.",
231
321
  "The loading shimmer and the fade-in honor `prefers-reduced-motion`.",
322
+ "The hover preview is a visual enhancement over the still: the overlay is `aria-hidden`, so the image's `alt` remains the single accessible name and a screen reader is not told the picture changed.",
323
+ "The preview reveals on focus as well as hover, so a keyboard user reaches it too: a hover-only frame becomes a focus stop that shows the preview and restores the still on blur. It is never mouse-only.",
324
+ "A hover video plays muted so it can autoplay; with `hover-audio` an unmute toggle appears, and unmuting is a real click (a user gesture), so sound is never forced on. Under `prefers-reduced-motion` the preview does not reveal or play, leaving the still in place.",
232
325
  ],
233
326
  examples: [
234
327
  {
@@ -237,6 +330,12 @@ export const imageManifest = {
237
330
  description: "A responsive image in a `16/9` frame with a caption; the frame reserves its space while the image loads.",
238
331
  source: { html: htmlExample, svelte: svelteExample, astro: astroExample },
239
332
  },
333
+ {
334
+ id: "hover-preview",
335
+ title: "Hover preview",
336
+ description: "A play-on-hover preview: `hover-src` plays a muted, looping video on hover and focus (resetting to the still on leave), `hover-audio` adds an unmute toggle, and the `hover` slot takes any content, including a whole nested `Carousel`.",
337
+ source: { html: hoverHtmlExample, svelte: hoverSvelteExample, astro: hoverAstroExample },
338
+ },
240
339
  {
241
340
  id: "lightbox",
242
341
  title: "Lightbox",
@@ -1 +1 @@
1
- {"version":3,"file":"image.manifest.js","sourceRoot":"","sources":["../../src/manifest/image.manifest.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;;;;;gBAKJ,CAAC;AAEjB,MAAM,mBAAmB,GAAG;;;;;gBAKZ,CAAC;AAEjB,MAAM,aAAa,GAAG;;;;qEAI+C,CAAC;AAEtE,MAAM,qBAAqB,GAAG;;;;6EAI+C,CAAC;AAE9E,MAAM,YAAY,GAAG;;;;qGAIgF,CAAC;AAEtG,MAAM,oBAAoB,GAAG;;;;6EAIgD,CAAC;AAE9E,MAAM,kBAAkB,GAAG;;;;;;gBAMX,CAAC;AAEjB,MAAM,oBAAoB,GAAG;;;;8FAIiE,CAAC;AAE/F,MAAM,mBAAmB,GAAG;;;;8FAIkE,CAAC;AAE/F,MAAM,oBAAoB,GAAG;;;;;;;;WAQlB,CAAC;AAEZ,MAAM,uBAAuB,GAAG;;;;;;;;;;;;UAYtB,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC/C,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC;IAC3E,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,E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AA2O;YACxP,MAAM,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,iBAAiB,EAAE;SACxF;QACD;YACC,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,mFAAmF;YAChG,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,qBAAqB,EAAE,KAAK,EAAE,oBAAoB,EAAE;SACjG;QACD;YACC,EAAE,EAAE,gBAAgB;YACpB,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,wKAAwK;YACrL,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,oBAAoB,EAAE,KAAK,EAAE,mBAAmB,EAAE;SAC9F;QACD;YACC,EAAE,EAAE,uBAAuB;YAC3B,KAAK,EAAE,0CAA0C;YACjD,WAAW,EACV,+QAA+Q;YAChR,MAAM,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,EAAE,uBAAuB,EAAE;SACvE;KACD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ComponentManifest } from "./types.js";
2
+ export declare const mobileShellManifest: ComponentManifest;
3
+ //# sourceMappingURL=mobile-shell.manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile-shell.manifest.d.ts","sourceRoot":"","sources":["../../src/manifest/mobile-shell.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA6DpD,eAAO,MAAM,mBAAmB,EAAE,iBAwHjC,CAAC"}
@@ -0,0 +1,177 @@
1
+ const htmlExample = `<xtyle-mobile-shell heading="Inbox">
2
+ <xtyle-button slot="actions" variant="ghost" size="sm">Filter</xtyle-button>
3
+
4
+ <!-- the one scrolling column -->
5
+ <p>Whatever the section renders.</p>
6
+
7
+ <xtyle-bottom-nav
8
+ slot="nav"
9
+ value="inbox"
10
+ label="Sections"
11
+ tabs='[{"value":"inbox","label":"Inbox","icon":"folder","badge":3},
12
+ {"value":"threads","label":"Threads","icon":"menu"},
13
+ {"value":"you","label":"You","icon":"gear"}]'
14
+ ></xtyle-bottom-nav>
15
+ </xtyle-mobile-shell>`;
16
+ const svelteExample = `<script lang="ts">
17
+ import { MobileShell, BottomNav } from "@xtyle/svelte";
18
+
19
+ let section = $state("inbox");
20
+ const tabs = [
21
+ { value: "inbox", label: "Inbox", icon: "folder", badge: 3 },
22
+ { value: "threads", label: "Threads", icon: "menu" },
23
+ { value: "you", label: "You", icon: "gear" },
24
+ ];
25
+ </script>
26
+
27
+ <MobileShell heading="Inbox">
28
+ {#snippet actions()}<button>Filter</button>{/snippet}
29
+
30
+ <p>Whatever the section renders.</p>
31
+
32
+ {#snippet nav()}
33
+ <BottomNav {tabs} bind:value={section} label="Sections" />
34
+ {/snippet}
35
+ </MobileShell>`;
36
+ const astroExample = `---
37
+ import MobileShell from "@xtyle/astro/MobileShell.astro";
38
+ import BottomNav from "@xtyle/astro/BottomNav.astro";
39
+ ---
40
+
41
+ <MobileShell heading="Inbox">
42
+ <Fragment slot="actions">…</Fragment>
43
+
44
+ <p>Whatever the section renders.</p>
45
+
46
+ <BottomNav
47
+ slot="nav"
48
+ value="inbox"
49
+ label="Sections"
50
+ tabs={[
51
+ { value: "inbox", label: "Inbox", icon: "folder", badge: 3 },
52
+ { value: "threads", label: "Threads", icon: "menu" },
53
+ { value: "you", label: "You", icon: "gear" },
54
+ ]}
55
+ />
56
+ </MobileShell>`;
57
+ export const mobileShellManifest = {
58
+ id: "mobile-shell",
59
+ name: "MobileShell",
60
+ since: "0.7.0",
61
+ category: "shell",
62
+ keywords: ["mobile", "phone", "touch", "app bar", "frame", "layout", "shell"],
63
+ seeAlso: ["bottom-nav", "app-shell", "toolbar"],
64
+ summary: "The touch-app frame: a sticky app bar, one scrolling column, and a bottom nav in thumb reach.",
65
+ description: "MobileShell is the phone counterpart to `AppShell`, and deliberately a *separate* frame rather than `AppShell` made responsive. `AppShell` is desktop chrome by construction: a three-row grid whose body is a left/main/right split with px-width resizable rails. On a phone that model doesn't degrade so much as stop being the right shape, and bending one frame into both would make each worse. Desktop-IDE chrome and touch-app chrome are different interaction models, not one layout at two widths — so they are two components, and an app picks one at its entry.\n\nThe frame is three regions and nothing else: a sticky app bar (a `heading`, an optional `brand`, and an `actions` slot), a single scrollable `<main>` column, and a `nav` slot for the bottom nav, pinned within thumb reach. The shell renders that chrome itself through its fragment, exactly as `AppShell` does, so a mod can reshape the frame the same way it can reshape any other component.\n\nThe bar and the nav absorb the safe-area insets (`env(safe-area-inset-*)`), so on a notched phone the chrome takes the hardware and the content column between them is never the thing sliding underneath it. The column scrolls itself rather than the page, so the bar and the nav stay put while it moves.",
66
+ bindings: ["html", "svelte", "astro"],
67
+ anatomy: [
68
+ {
69
+ name: "bar",
70
+ description: "The sticky app bar. Absorbs the top safe-area inset, so nothing sits under a notch.",
71
+ selector: ".xtyle-mshell__bar",
72
+ tokens: ["--bg-1", "--line", "--border-thin", "--space-3", "--space-4"],
73
+ },
74
+ {
75
+ name: "title",
76
+ description: "The bar's heading, truncated rather than wrapped so a long one can't grow the bar.",
77
+ selector: ".xtyle-mshell__title",
78
+ tokens: ["--fg-0", "--text-lg", "--weight-semibold"],
79
+ },
80
+ {
81
+ name: "actions",
82
+ description: "The trailing controls in the bar; the heading is pushed to the start, so actions collect at the end.",
83
+ selector: ".xtyle-mshell__actions",
84
+ tokens: ["--space-2"],
85
+ },
86
+ {
87
+ name: "content",
88
+ description: "The one scrolling column, rendered as a real `<main>`. It scrolls itself, not the page, so the bar and the nav hold their place.",
89
+ selector: ".xtyle-mshell__content",
90
+ tokens: ["--space-4", "--space-6", "--ring", "--border-thick"],
91
+ },
92
+ {
93
+ name: "nav",
94
+ description: "The bottom nav region, usually a `BottomNav`. Its own bar absorbs the bottom safe-area inset.",
95
+ selector: ".xtyle-mshell__nav",
96
+ tokens: [],
97
+ },
98
+ ],
99
+ props: [
100
+ {
101
+ name: "heading",
102
+ type: "string",
103
+ description: "The app bar's title. Named `heading` rather than `title`, which `HTMLElement` already owns (the native tooltip), so setting one can never quietly mean the other.",
104
+ bindings: ["html", "svelte", "astro"],
105
+ },
106
+ {
107
+ name: "main-id",
108
+ type: "string",
109
+ default: "main",
110
+ description: "The `id` of the `<main>` column, so a skip link can target it. Override when more than one shell renders on a page.",
111
+ bindings: ["html", "svelte", "astro"],
112
+ },
113
+ ],
114
+ variants: [],
115
+ sizes: [],
116
+ states: [],
117
+ slots: [
118
+ {
119
+ name: "brand",
120
+ description: "A mark rendered before the heading, e.g. a logo.",
121
+ bindings: ["html", "svelte", "astro"],
122
+ },
123
+ {
124
+ name: "actions",
125
+ description: "The bar's trailing controls.",
126
+ bindings: ["html", "svelte", "astro"],
127
+ },
128
+ {
129
+ name: "default",
130
+ description: "The scrolling content column, rendered into `<main>`.",
131
+ bindings: ["html", "svelte", "astro"],
132
+ },
133
+ {
134
+ name: "nav",
135
+ description: "The bottom nav, usually a `BottomNav`.",
136
+ bindings: ["html", "svelte", "astro"],
137
+ },
138
+ ],
139
+ consumedTokens: [
140
+ "--body-bg",
141
+ "--bg-1",
142
+ "--fg-0",
143
+ "--line",
144
+ "--font-sans",
145
+ "--text-body",
146
+ "--text-lg",
147
+ "--weight-semibold",
148
+ "--leading-normal",
149
+ "--border-thin",
150
+ "--border-normal",
151
+ "--border-thick",
152
+ "--ring",
153
+ "--space-2",
154
+ "--space-3",
155
+ "--space-4",
156
+ "--space-6",
157
+ ],
158
+ composition: [
159
+ "Pair it with `BottomNav` in the `nav` slot; the two go together the way `AppShell` goes with `Toolbar` and `Statusbar`.",
160
+ "Reach for `AppShell` on the desktop and MobileShell on a phone, and choose between them at the app's entry rather than trying to morph one into the other at a breakpoint.",
161
+ "The column scrolls itself, so a long list belongs in the default slot and not in a nested scroller; a second scroll region inside it is the usual cause of a page that scrolls in two places at once.",
162
+ ],
163
+ a11y: [
164
+ "The content column is a real `<main>` landmark carrying the `main-id` a skip link targets, and it takes `tabindex=\"-1\"` so focus can be moved into it without making it a tab stop of its own.",
165
+ "The bar and the nav absorb `env(safe-area-inset-*)`, so no control ends up under a notch or a home indicator where a thumb can't reach it.",
166
+ "The chrome is the component's own fragment, so it renders through the same SSR path as every other component: the shell lays out and scrolls before (and without) the runtime.",
167
+ ],
168
+ examples: [
169
+ {
170
+ id: "frame",
171
+ title: "The frame",
172
+ description: "A sticky bar, one scrolling column, and a bottom nav. The shell renders the chrome; the slots take the app's content.",
173
+ source: { html: htmlExample, svelte: svelteExample, astro: astroExample },
174
+ },
175
+ ],
176
+ };
177
+ //# sourceMappingURL=mobile-shell.manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile-shell.manifest.js","sourceRoot":"","sources":["../../src/manifest/mobile-shell.manifest.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;;;;;;;;;;;;;;sBAcE,CAAC;AAEvB,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;eAmBP,CAAC;AAEhB,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;eAoBN,CAAC;AAEhB,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACrD,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;IAC7E,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC;IAC/C,OAAO,EAAE,+FAA+F;IACxG,WAAW,EACV,0uCAA0uC;IAC3uC,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;IACrC,OAAO,EAAE;QACR;YACC,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,qFAAqF;YAClG,QAAQ,EAAE,oBAAoB;YA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AAE,8BAA8B;YAC3C,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;SACrC;QACD;YACC,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,uDAAuD;YACpE,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;SACrC;QACD;YACC,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;SACrC;KACD;IACD,cAAc,EAAE;QACf,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,aAAa;QACb,aAAa;QACb,WAAW;QACX,mBAAmB;QACnB,kBAAkB;QAClB,eAAe;QACf,iBAAiB;QACjB,gBAAgB;QAChB,QAAQ;QACR,WAAW;QACX,WAAW;QACX,WAAW;QACX,WAAW;KACX;IACD,WAAW,EAAE;QACZ,yHAAyH;QACzH,4KAA4K;QAC5K,uMAAuM;KACvM;IACD,IAAI,EAAE;QACL,kMAAkM;QAClM,4IAA4I;QAC5I,gLAAgL;KAChL;IACD,QAAQ,EAAE;QACT;YACC,EAAE,EAAE,OAAO;YACX,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,uHAAuH;YACpI,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE;SACzE;KACD;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"panel.manifest.d.ts","sourceRoot":"","sources":["../../src/manifest/panel.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA2DpD,eAAO,MAAM,aAAa,EAAE,iBAiM3B,CAAC"}
1
+ {"version":3,"file":"panel.manifest.d.ts","sourceRoot":"","sources":["../../src/manifest/panel.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA2DpD,eAAO,MAAM,aAAa,EAAE,iBAkM3B,CAAC"}