@esportsplus/ui 0.63.0 → 0.64.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 (537) hide show
  1. package/.audit/audit.json +2 -2
  2. package/.audit/rules-audit.md +2 -2
  3. package/README.md +15 -18
  4. package/RULES.md +80 -9
  5. package/bin/agent-cli +300 -0
  6. package/build/components/accordion/index.d.ts +4 -0
  7. package/build/components/accordion/index.js +13 -10
  8. package/build/components/breadcrumb/index.d.ts +1 -0
  9. package/build/components/breadcrumb/index.js +43 -37
  10. package/build/components/breadcrumb/scss/index.scss +1 -1
  11. package/build/components/button/kbd.d.ts +1 -1
  12. package/build/components/button/kbd.js +17 -15
  13. package/build/components/button/scss/index.scss +1 -1
  14. package/build/components/button/split.js +14 -16
  15. package/build/components/capslock/scss/index.scss +1 -1
  16. package/build/components/card/scss/index.scss +1 -1
  17. package/build/components/chat/minimap/index.js +4 -5
  18. package/build/components/checkbox/group.d.ts +1 -0
  19. package/build/components/checkbox/group.js +21 -20
  20. package/build/components/checkbox/scss/index.scss +1 -1
  21. package/build/components/color-picker/index.js +6 -6
  22. package/build/components/color-picker/scss/index.scss +1 -1
  23. package/build/components/command/index.d.ts +1 -1
  24. package/build/components/command/palette.d.ts +13 -9
  25. package/build/components/command/palette.js +143 -152
  26. package/build/components/command/scss/index.scss +1 -1
  27. package/build/components/command/search.d.ts +5 -7
  28. package/build/components/command/search.js +6 -26
  29. package/build/components/counter/scss/index.scss +1 -1
  30. package/build/components/editor/code/commands.js +1 -1
  31. package/build/components/editor/code/document.d.ts +1 -3
  32. package/build/components/editor/code/document.js +1 -1
  33. package/build/components/editor/code/editor.d.ts +18 -6
  34. package/build/components/editor/code/editor.js +9 -7
  35. package/build/components/editor/code/features.js +27 -18
  36. package/build/components/editor/code/find.d.ts +1 -1
  37. package/build/components/editor/code/find.js +5 -6
  38. package/build/components/editor/code/folding.d.ts +3 -5
  39. package/build/components/editor/code/folding.js +2 -15
  40. package/build/components/editor/code/gutter.js +2 -2
  41. package/build/components/editor/code/index.d.ts +1 -0
  42. package/build/components/editor/code/index.js +1 -0
  43. package/build/components/editor/code/minimap.d.ts +3 -1
  44. package/build/components/editor/code/minimap.js +31 -5
  45. package/build/components/editor/code/services/model.js +2 -1
  46. package/build/components/editor/code/syntax.js +2 -1
  47. package/build/components/editor/code/view.d.ts +8 -2
  48. package/build/components/editor/code/view.js +37 -56
  49. package/build/components/editor/diffs/index.d.ts +1 -0
  50. package/build/components/editor/diffs/index.js +1 -0
  51. package/build/components/editor/diffs/merge.js +16 -17
  52. package/build/components/editor/diffs/view.js +10 -11
  53. package/build/components/editor/markdown/editing.d.ts +2 -1
  54. package/build/components/editor/markdown/editing.js +14 -5
  55. package/build/components/editor/markdown/format.d.ts +1 -1
  56. package/build/components/editor/markdown/format.js +116 -26
  57. package/build/components/editor/markdown/layout.js +2 -1
  58. package/build/components/editor/markdown/model.d.ts +1 -2
  59. package/build/components/editor/markdown/model.js +1 -29
  60. package/build/components/editor/markdown/render.js +1 -1
  61. package/build/components/editor/markdown/template.d.ts +3 -10
  62. package/build/components/editor/markdown/template.js +2 -29
  63. package/build/components/editor/markdown/toolbar.d.ts +2 -2
  64. package/build/components/editor/markdown/toolbar.js +90 -126
  65. package/build/components/editor/markdown/view.d.ts +1 -1
  66. package/build/components/editor/markdown/view.js +54 -87
  67. package/build/components/editor/tree/drag.js +1 -1
  68. package/build/components/editor/tree/find.js +70 -64
  69. package/build/components/editor/tree/template.js +8 -7
  70. package/build/components/editor/viewer/model.d.ts +1 -1
  71. package/build/components/editor/viewer/template.js +4 -26
  72. package/build/components/editor/workspace/keybindings.d.ts +1 -1
  73. package/build/components/editor/workspace/model.d.ts +12 -2
  74. package/build/components/editor/workspace/model.js +87 -31
  75. package/build/components/editor/workspace/session.d.ts +2 -6
  76. package/build/components/editor/workspace/session.js +99 -16
  77. package/build/components/editor/workspace/status.d.ts +1 -1
  78. package/build/components/editor/workspace/strip.d.ts +10 -9
  79. package/build/components/editor/workspace/strip.js +99 -141
  80. package/build/components/editor/workspace/tabs.d.ts +2 -4
  81. package/build/components/editor/workspace/tabs.js +1 -14
  82. package/build/components/editor/workspace/template.d.ts +1 -1
  83. package/build/components/editor/workspace/template.js +305 -435
  84. package/build/components/error/index.d.ts +4 -13
  85. package/build/components/error/index.js +53 -172
  86. package/build/components/error/scss/index.scss +1 -1
  87. package/build/components/form/action.d.ts +2 -2
  88. package/build/components/form/action.js +2 -2
  89. package/build/components/form/input.d.ts +3 -3
  90. package/build/components/form/input.js +32 -10
  91. package/build/components/frame/scss/index.scss +1 -1
  92. package/build/components/group/index.js +96 -9
  93. package/build/components/group/scss/index.scss +1 -1
  94. package/build/components/heatmap/scss/index.scss +1 -1
  95. package/build/components/highlight/index.js +55 -48
  96. package/build/components/highlight/scss/index.scss +1 -1
  97. package/build/components/icon/scss/index.scss +1 -1
  98. package/build/components/image/scss/index.scss +1 -1
  99. package/build/components/index.d.ts +3 -6
  100. package/build/components/index.js +3 -6
  101. package/build/components/inline-edit/index.d.ts +2 -2
  102. package/build/components/inline-edit/index.js +5 -5
  103. package/build/components/inline-edit/rich.js +4 -4
  104. package/build/components/inline-edit/scss/index.scss +1 -1
  105. package/build/components/inline-edit/status.js +1 -0
  106. package/build/components/input/index.d.ts +4 -0
  107. package/build/components/input/index.js +3 -1
  108. package/build/components/input/otp.d.ts +18 -0
  109. package/build/components/input/otp.js +112 -0
  110. package/build/components/input/password.d.ts +15 -0
  111. package/build/components/input/password.js +163 -0
  112. package/build/components/input/scrub.d.ts +1 -0
  113. package/build/components/input/scrub.js +103 -89
  114. package/build/components/input/scss/index.scss +1 -1
  115. package/build/components/input/tag.d.ts +5 -0
  116. package/build/components/input/tag.js +116 -69
  117. package/build/components/json/download.js +1 -1
  118. package/build/components/link/scss/index.scss +1 -1
  119. package/build/components/marquee/index.js +1 -1
  120. package/build/components/marquee/scss/index.scss +1 -1
  121. package/build/components/nav/scss/index.scss +1 -1
  122. package/build/components/nav/tree.d.ts +2 -1
  123. package/build/components/nav/tree.js +6 -5
  124. package/build/components/notification/index.js +3 -3
  125. package/build/components/notification/scss/index.scss +1 -1
  126. package/build/components/overlay/popup.d.ts +2 -2
  127. package/build/components/overlay/popup.js +1 -1
  128. package/build/components/overlay/scss/index.scss +1 -1
  129. package/build/components/pagination/arrows.js +2 -3
  130. package/build/components/pagination/cards.js +2 -3
  131. package/build/components/pagination/index.d.ts +2 -3
  132. package/build/components/pagination/index.js +18 -13
  133. package/build/components/pagination/scss/index.scss +1 -1
  134. package/build/components/progress/index.js +1 -1
  135. package/build/components/progress/scss/index.scss +1 -1
  136. package/build/components/progress/text.js +3 -3
  137. package/build/components/range/filter.d.ts +7 -1
  138. package/build/components/range/filter.js +188 -171
  139. package/build/components/range/index.d.ts +14 -9
  140. package/build/components/range/index.js +11 -8
  141. package/build/components/range/scss/index.scss +1 -1
  142. package/build/components/range/surface.d.ts +21 -0
  143. package/build/components/range/surface.js +144 -0
  144. package/build/components/relative-time/index.js +2 -2
  145. package/build/components/relative-time/scss/index.scss +1 -1
  146. package/build/components/root/scss/index.scss +1 -1
  147. package/build/components/{preview/header.d.ts → search/button.d.ts} +3 -3
  148. package/build/components/search/button.js +18 -0
  149. package/build/components/search/index.d.ts +8 -0
  150. package/build/components/search/index.js +5 -0
  151. package/build/components/search/input.d.ts +9 -0
  152. package/build/components/search/input.js +23 -0
  153. package/build/components/search/parts.d.ts +5 -0
  154. package/build/components/search/parts.js +17 -0
  155. package/build/components/search/scss/index.scss +2 -0
  156. package/build/components/select/expand.js +4 -5
  157. package/build/components/select/index.d.ts +7 -7
  158. package/build/components/select/index.js +127 -117
  159. package/build/components/select/placement.js +8 -1
  160. package/build/components/select/scss/index.scss +1 -1
  161. package/build/components/{panels → shell}/group.d.ts +21 -5
  162. package/build/components/shell/group.js +336 -0
  163. package/build/components/shell/index.d.ts +15 -17
  164. package/build/components/shell/index.js +583 -238
  165. package/build/components/shell/model.d.ts +94 -0
  166. package/build/components/{panels → shell}/model.js +199 -73
  167. package/build/components/shell/resize.d.ts +5 -0
  168. package/build/components/{panels → shell}/resize.js +54 -30
  169. package/build/components/shell/scss/index.scss +1 -1
  170. package/build/components/shell/sidebar.d.ts +34 -0
  171. package/build/components/shell/sidebar.js +362 -0
  172. package/build/components/{panels → shell}/subtree.js +7 -8
  173. package/build/components/shortcut-recorder/index.d.ts +5 -4
  174. package/build/components/shortcut-recorder/index.js +69 -44
  175. package/build/components/shortcut-recorder/scss/index.scss +1 -1
  176. package/build/components/sortable/index.d.ts +16 -2
  177. package/build/components/sortable/index.js +237 -134
  178. package/build/components/sortable/scss/index.scss +1 -1
  179. package/build/components/story/index.js +46 -34
  180. package/build/components/story/scss/index.scss +1 -1
  181. package/build/components/surface-field/engine.d.ts +2 -0
  182. package/build/components/surface-field/engine.js +86 -33
  183. package/build/components/surface-field/index.d.ts +26 -4
  184. package/build/components/surface-field/index.js +35 -4
  185. package/build/components/surface-field/scss/index.scss +1 -1
  186. package/build/components/surface-field/surface.d.ts +13 -1
  187. package/build/components/surface-field/surface.js +149 -58
  188. package/build/components/tasklist/index.d.ts +1 -4
  189. package/build/components/tasklist/index.js +36 -43
  190. package/build/components/tasklist/scss/index.scss +1 -1
  191. package/build/components/textarea/index.d.ts +1 -1
  192. package/build/components/textarea/index.js +14 -14
  193. package/build/components/theme/scss/index.scss +1 -1
  194. package/build/components/theme/shared.d.ts +1 -2
  195. package/build/components/theme/shared.js +2 -5
  196. package/build/components/toast/index.d.ts +3 -3
  197. package/build/components/toast/index.js +3 -3
  198. package/build/components/toast/scss/index.scss +1 -1
  199. package/build/components/toolbar/index.d.ts +91 -0
  200. package/build/components/toolbar/index.js +1281 -0
  201. package/build/components/toolbar/scss/index.scss +2 -0
  202. package/build/components/tooltip/menu.d.ts +9 -8
  203. package/build/components/tooltip/menu.js +397 -279
  204. package/build/components/tooltip/onclick.d.ts +2 -0
  205. package/build/components/tooltip/onclick.js +13 -4
  206. package/build/components/tooltip/onhover.d.ts +3 -1
  207. package/build/components/tooltip/onhover.js +10 -9
  208. package/build/components/tooltip/scss/index.scss +1 -1
  209. package/build/components/tooltip/shared.d.ts +4 -4
  210. package/build/components/tooltip/shared.js +27 -46
  211. package/build/components/tooltip/utilities.d.ts +5 -2
  212. package/build/components/tooltip/utilities.js +169 -9
  213. package/build/components/typewriter/rotate.js +6 -6
  214. package/build/components/typewriter/scss/index.scss +1 -1
  215. package/build/components/uptime/scss/index.scss +1 -1
  216. package/build/components/usage-meter/index.js +1 -1
  217. package/build/components/usage-meter/scss/index.scss +1 -1
  218. package/build/css-utilities/font/montserrat/OFL.txt +93 -0
  219. package/build/shared/drag.d.ts +15 -9
  220. package/build/shared/drag.js +41 -28
  221. package/build/shared/placement.d.ts +39 -0
  222. package/build/shared/placement.js +55 -0
  223. package/build/shared/transition.js +1 -1
  224. package/build/shared/viewport.d.ts +1 -2
  225. package/build/shared/viewport.js +1 -4
  226. package/package.json +2 -5
  227. package/src/components/accordion/index.ts +12 -5
  228. package/src/components/announcement/index.ts +1 -1
  229. package/src/components/breadcrumb/index.ts +13 -3
  230. package/src/components/breadcrumb/scss/index.scss +6 -6
  231. package/src/components/breadcrumb/scss/variables.scss +7 -0
  232. package/src/components/button/kbd.ts +22 -17
  233. package/src/components/button/scss/index.scss +69 -76
  234. package/src/components/button/scss/variables.scss +51 -18
  235. package/src/components/button/split.ts +12 -8
  236. package/src/components/capslock/index.ts +2 -0
  237. package/src/components/capslock/scss/index.scss +21 -21
  238. package/src/components/card/scss/index.scss +16 -0
  239. package/src/components/card/scss/variables.scss +25 -2
  240. package/src/components/chat/minimap/index.ts +5 -6
  241. package/src/components/chat/minimap/scss/index.scss +12 -11
  242. package/src/components/chat/minimap/scss/variables.scss +23 -17
  243. package/src/components/checkbox/group.ts +8 -7
  244. package/src/components/checkbox/scss/index.scss +59 -35
  245. package/src/components/checkbox/scss/variables.scss +24 -17
  246. package/src/components/color-picker/index.ts +6 -6
  247. package/src/components/color-picker/scss/index.scss +35 -22
  248. package/src/components/color-picker/scss/variables.scss +11 -3
  249. package/src/components/command/index.ts +1 -1
  250. package/src/components/command/palette.ts +174 -166
  251. package/src/components/command/scss/index.scss +18 -51
  252. package/src/components/command/scss/variables.scss +37 -71
  253. package/src/components/command/search.ts +9 -31
  254. package/src/components/counter/index.ts +22 -22
  255. package/src/components/counter/scss/variables.scss +10 -7
  256. package/src/components/editor/code/commands.ts +1 -1
  257. package/src/components/editor/code/document.ts +0 -2
  258. package/src/components/editor/code/editor.ts +31 -13
  259. package/src/components/editor/code/features.ts +39 -24
  260. package/src/components/editor/code/find.ts +5 -6
  261. package/src/components/editor/code/folding.ts +3 -21
  262. package/src/components/editor/code/gutter.ts +2 -2
  263. package/src/components/editor/code/index.ts +1 -0
  264. package/src/components/editor/code/minimap.ts +39 -5
  265. package/src/components/editor/code/scss/_editor.scss +28 -21
  266. package/src/components/editor/code/scss/_features.scss +19 -21
  267. package/src/components/editor/code/scss/_services.scss +14 -11
  268. package/src/components/editor/code/scss/variables.scss +31 -12
  269. package/src/components/editor/code/services/model.ts +2 -1
  270. package/src/components/editor/code/syntax.ts +2 -1
  271. package/src/components/editor/code/view.ts +22 -45
  272. package/src/components/editor/diffs/index.ts +1 -0
  273. package/src/components/editor/diffs/merge.ts +9 -10
  274. package/src/components/editor/diffs/scss/_diffs.scss +39 -63
  275. package/src/components/editor/diffs/scss/_merge.scss +10 -2
  276. package/src/components/editor/diffs/scss/index.scss +0 -1
  277. package/src/components/editor/diffs/scss/variables.scss +36 -17
  278. package/src/components/editor/diffs/view.ts +8 -9
  279. package/src/components/editor/markdown/editing.ts +18 -6
  280. package/src/components/editor/markdown/format.ts +180 -32
  281. package/src/components/editor/markdown/layout.ts +2 -1
  282. package/src/components/editor/markdown/model.ts +0 -38
  283. package/src/components/editor/markdown/render.ts +1 -1
  284. package/src/components/editor/markdown/scss/index.scss +38 -52
  285. package/src/components/editor/markdown/scss/variables.scss +24 -50
  286. package/src/components/editor/markdown/template.ts +3 -63
  287. package/src/components/editor/markdown/toolbar.ts +76 -127
  288. package/src/components/editor/markdown/view.ts +9 -32
  289. package/src/components/editor/tree/drag.ts +1 -1
  290. package/src/components/editor/tree/find.ts +61 -64
  291. package/src/components/editor/tree/scss/index.scss +29 -30
  292. package/src/components/editor/tree/scss/variables.scss +34 -15
  293. package/src/components/editor/tree/template.ts +9 -9
  294. package/src/components/editor/viewer/model.ts +1 -1
  295. package/src/components/editor/viewer/scss/_viewer.scss +4 -5
  296. package/src/components/editor/viewer/scss/variables.scss +3 -3
  297. package/src/components/editor/viewer/template.ts +4 -31
  298. package/src/components/editor/workspace/keybindings.ts +1 -1
  299. package/src/components/editor/workspace/model.ts +136 -37
  300. package/src/components/editor/workspace/scss/_keybindings.scss +3 -20
  301. package/src/components/editor/workspace/scss/_status.scss +0 -1
  302. package/src/components/editor/workspace/scss/_tabs.scss +2 -41
  303. package/src/components/editor/workspace/scss/index.scss +49 -71
  304. package/src/components/editor/workspace/scss/variables.scss +1 -135
  305. package/src/components/editor/workspace/session.ts +138 -18
  306. package/src/components/editor/workspace/status.ts +1 -1
  307. package/src/components/editor/workspace/strip.ts +96 -115
  308. package/src/components/editor/workspace/tabs.ts +2 -23
  309. package/src/components/editor/workspace/template.ts +323 -458
  310. package/src/components/error/index.ts +47 -183
  311. package/src/components/error/scss/index.scss +34 -35
  312. package/src/components/error/scss/variables.scss +14 -26
  313. package/src/components/filter/scss/index.scss +6 -5
  314. package/src/components/form/action.ts +7 -7
  315. package/src/components/form/input.ts +25 -12
  316. package/src/components/frame/scss/index.scss +5 -5
  317. package/src/components/group/index.ts +77 -2
  318. package/src/components/group/scss/index.scss +164 -0
  319. package/src/components/group/scss/variables.scss +110 -2
  320. package/src/components/heatmap/scss/variables.scss +13 -10
  321. package/src/components/highlight/index.ts +87 -79
  322. package/src/components/highlight/scss/index.scss +6 -16
  323. package/src/components/highlight/scss/variables.scss +33 -5
  324. package/src/components/icon/scss/index.scss +2 -2
  325. package/src/components/icon/scss/variables.scss +14 -1
  326. package/src/components/image/scss/index.scss +9 -9
  327. package/src/components/image/scss/variables.scss +1 -1
  328. package/src/components/index.ts +3 -6
  329. package/src/components/inline-edit/index.ts +8 -6
  330. package/src/components/inline-edit/rich.ts +8 -8
  331. package/src/components/inline-edit/scss/index.scss +50 -36
  332. package/src/components/inline-edit/scss/variables.scss +28 -18
  333. package/src/components/inline-edit/status.ts +2 -0
  334. package/src/components/input/index.ts +3 -1
  335. package/src/components/input/otp.ts +175 -0
  336. package/src/components/input/password.ts +178 -0
  337. package/src/components/input/scrub.ts +197 -178
  338. package/src/components/input/scss/index.scss +344 -4
  339. package/src/components/input/scss/variables.scss +234 -65
  340. package/src/components/input/tag.ts +98 -53
  341. package/src/components/json/download.ts +2 -5
  342. package/src/components/link/scss/index.scss +3 -5
  343. package/src/components/loading/scss/index.scss +1 -0
  344. package/src/components/loading/scss/variables.scss +1 -0
  345. package/src/components/marquee/index.ts +1 -1
  346. package/src/components/marquee/scss/index.scss +11 -4
  347. package/src/components/nav/scss/index.scss +10 -26
  348. package/src/components/nav/scss/variables.scss +13 -23
  349. package/src/components/nav/tree.ts +10 -8
  350. package/src/components/notification/index.ts +3 -3
  351. package/src/components/notification/scss/index.scss +7 -14
  352. package/src/components/notification/scss/variables.scss +10 -2
  353. package/src/components/number/index.ts +1 -1
  354. package/src/components/overlay/popup.ts +2 -2
  355. package/src/components/overlay/scss/index.scss +60 -51
  356. package/src/components/page/scss/variables.scss +1 -0
  357. package/src/components/pagination/arrows.ts +2 -3
  358. package/src/components/pagination/cards.ts +2 -3
  359. package/src/components/pagination/index.ts +11 -9
  360. package/src/components/pagination/scss/index.scss +38 -101
  361. package/src/components/pagination/scss/variables.scss +24 -75
  362. package/src/components/progress/index.ts +1 -1
  363. package/src/components/progress/scss/index.scss +22 -11
  364. package/src/components/progress/scss/variables.scss +13 -5
  365. package/src/components/progress/text.ts +3 -3
  366. package/src/components/range/filter.ts +249 -246
  367. package/src/components/range/index.ts +22 -7
  368. package/src/components/range/scss/index.scss +470 -15
  369. package/src/components/range/scss/variables.scss +402 -198
  370. package/src/components/range/surface.ts +135 -0
  371. package/src/components/relative-time/index.ts +2 -2
  372. package/src/components/relative-time/scss/index.scss +4 -2
  373. package/src/components/relative-time/scss/variables.scss +4 -5
  374. package/src/components/root/scss/index.scss +11 -11
  375. package/src/components/root/scss/variables.scss +4 -4
  376. package/src/components/search/button.ts +24 -0
  377. package/src/components/search/index.ts +12 -0
  378. package/src/components/search/input.ts +35 -0
  379. package/src/components/search/parts.ts +24 -0
  380. package/src/components/search/scss/index.scss +36 -0
  381. package/src/components/search/scss/variables.scss +67 -0
  382. package/src/components/section/scss/variables.scss +1 -0
  383. package/src/components/select/expand.ts +3 -4
  384. package/src/components/select/index.ts +55 -41
  385. package/src/components/select/placement.ts +17 -1
  386. package/src/components/select/scss/index.scss +57 -29
  387. package/src/components/select/scss/variables.scss +91 -53
  388. package/src/components/{panels → shell}/group.ts +151 -98
  389. package/src/components/shell/index.ts +805 -284
  390. package/src/components/{panels → shell}/model.ts +329 -102
  391. package/src/components/shell/resize.ts +176 -0
  392. package/src/components/shell/scss/index.scss +502 -89
  393. package/src/components/shell/scss/variables.scss +264 -39
  394. package/src/components/shell/sidebar.ts +325 -0
  395. package/src/components/{panels → shell}/subtree.ts +1 -2
  396. package/src/components/shortcut-recorder/index.ts +99 -61
  397. package/src/components/shortcut-recorder/scss/index.scss +76 -52
  398. package/src/components/shortcut-recorder/scss/variables.scss +25 -30
  399. package/src/components/sortable/index.ts +364 -63
  400. package/src/components/sortable/scss/index.scss +22 -2
  401. package/src/components/sortable/scss/variables.scss +16 -4
  402. package/src/components/story/index.ts +56 -33
  403. package/src/components/story/scss/index.scss +67 -16
  404. package/src/components/story/scss/variables.scss +59 -18
  405. package/src/components/surface-field/engine.ts +157 -61
  406. package/src/components/surface-field/index.ts +64 -9
  407. package/src/components/surface-field/scss/index.scss +88 -77
  408. package/src/components/surface-field/scss/variables.scss +84 -36
  409. package/src/components/surface-field/surface.ts +225 -76
  410. package/src/components/tasklist/index.ts +10 -14
  411. package/src/components/tasklist/scss/index.scss +25 -45
  412. package/src/components/tasklist/scss/variables.scss +12 -29
  413. package/src/components/textarea/index.ts +39 -42
  414. package/src/components/theme/reveal.ts +1 -0
  415. package/src/components/theme/scss/index.scss +20 -16
  416. package/src/components/theme/scss/variables.scss +11 -5
  417. package/src/components/theme/shared.ts +3 -7
  418. package/src/components/toast/index.ts +7 -8
  419. package/src/components/toast/scss/index.scss +44 -36
  420. package/src/components/toast/scss/variables.scss +36 -33
  421. package/src/components/toolbar/index.ts +1675 -0
  422. package/src/components/toolbar/scss/index.scss +759 -0
  423. package/src/components/toolbar/scss/variables.scss +555 -0
  424. package/src/components/tooltip/menu.ts +301 -220
  425. package/src/components/tooltip/onclick.ts +18 -3
  426. package/src/components/tooltip/onhover.ts +13 -9
  427. package/src/components/tooltip/scss/index.scss +155 -188
  428. package/src/components/tooltip/scss/variables.scss +151 -135
  429. package/src/components/tooltip/shared.ts +47 -74
  430. package/src/components/tooltip/utilities.ts +151 -10
  431. package/src/components/truncate/index.ts +1 -1
  432. package/src/components/typewriter/rotate.ts +6 -6
  433. package/src/components/typewriter/scss/index.scss +14 -5
  434. package/src/components/uptime/scss/index.scss +8 -15
  435. package/src/components/uptime/scss/variables.scss +12 -1
  436. package/src/components/usage-meter/index.ts +1 -1
  437. package/src/components/usage-meter/scss/index.scss +6 -4
  438. package/src/components/usage-meter/scss/variables.scss +11 -11
  439. package/src/css-utilities/box-shadow.scss +0 -1
  440. package/src/css-utilities/icon.scss +9 -9
  441. package/src/css-utilities/surface.scss +27 -17
  442. package/src/modifiers/glass/index.ts +2 -2
  443. package/src/modifiers/glass/scss/index.scss +2 -2
  444. package/src/normalize/scss/index.scss +1 -1
  445. package/src/shared/drag.ts +92 -53
  446. package/src/shared/placement.ts +145 -0
  447. package/src/shared/transition.ts +1 -1
  448. package/src/shared/viewport.ts +1 -7
  449. package/src/tokens/scss/color.scss +2 -2
  450. package/src/tokens/scss/scale.scss +5 -1
  451. package/src/tokens/scss/size.scss +0 -7
  452. package/storage/svg/angle.svg +1 -0
  453. package/storage/svg/{chevron-left.svg → arrow.svg} +1 -1
  454. package/storage/svg/calendar.svg +1 -0
  455. package/storage/svg/circle-filled.svg +1 -0
  456. package/storage/svg/cursor-arrow-left.svg +1 -0
  457. package/storage/svg/cursor-arrow-right.svg +1 -0
  458. package/storage/svg/fit.svg +1 -0
  459. package/storage/svg/grip.svg +1 -0
  460. package/storage/svg/mail.svg +1 -0
  461. package/storage/svg/{chevron-down.svg → minus.svg} +1 -1
  462. package/storage/svg/music.svg +1 -0
  463. package/storage/svg/{chevron-up.svg → rotate-ccw.svg} +1 -1
  464. package/vite.config.ts +9 -13
  465. package/build/components/dock/index.d.ts +0 -47
  466. package/build/components/dock/index.js +0 -469
  467. package/build/components/dock/scss/index.scss +0 -2
  468. package/build/components/metric/flash.d.ts +0 -12
  469. package/build/components/metric/flash.js +0 -117
  470. package/build/components/metric/index.d.ts +0 -44
  471. package/build/components/metric/index.js +0 -275
  472. package/build/components/metric/scss/index.scss +0 -2
  473. package/build/components/pagination/dots.d.ts +0 -23
  474. package/build/components/pagination/dots.js +0 -115
  475. package/build/components/panels/dnd.d.ts +0 -47
  476. package/build/components/panels/dnd.js +0 -114
  477. package/build/components/panels/group.js +0 -322
  478. package/build/components/panels/index.d.ts +0 -17
  479. package/build/components/panels/index.js +0 -524
  480. package/build/components/panels/model.d.ts +0 -64
  481. package/build/components/panels/resize.d.ts +0 -9
  482. package/build/components/panels/scss/index.scss +0 -2
  483. package/build/components/preview/buttons.d.ts +0 -12
  484. package/build/components/preview/buttons.js +0 -26
  485. package/build/components/preview/code.d.ts +0 -8
  486. package/build/components/preview/code.js +0 -18
  487. package/build/components/preview/header.js +0 -21
  488. package/build/components/preview/index.d.ts +0 -37
  489. package/build/components/preview/index.js +0 -123
  490. package/build/components/preview/scss/index.scss +0 -2
  491. package/build/components/preview/source.d.ts +0 -12
  492. package/build/components/preview/source.js +0 -79
  493. package/build/components/preview/stage.d.ts +0 -8
  494. package/build/components/preview/stage.js +0 -28
  495. package/build/components/textarea/scss/index.scss +0 -2
  496. package/src/components/dock/index.ts +0 -567
  497. package/src/components/dock/scss/index.scss +0 -346
  498. package/src/components/dock/scss/variables.scss +0 -357
  499. package/src/components/input/scss/_field.scss +0 -39
  500. package/src/components/input/scss/_scrub.scss +0 -89
  501. package/src/components/input/scss/_tag.scss +0 -142
  502. package/src/components/metric/flash.ts +0 -129
  503. package/src/components/metric/index.ts +0 -307
  504. package/src/components/metric/scss/_flash.scss +0 -150
  505. package/src/components/metric/scss/index.scss +0 -155
  506. package/src/components/metric/scss/variables.scss +0 -233
  507. package/src/components/pagination/dots.ts +0 -132
  508. package/src/components/panels/dnd.ts +0 -190
  509. package/src/components/panels/index.ts +0 -676
  510. package/src/components/panels/resize.ts +0 -157
  511. package/src/components/panels/scss/index.scss +0 -379
  512. package/src/components/panels/scss/variables.scss +0 -197
  513. package/src/components/preview/buttons.ts +0 -48
  514. package/src/components/preview/code.ts +0 -28
  515. package/src/components/preview/header.ts +0 -23
  516. package/src/components/preview/index.ts +0 -149
  517. package/src/components/preview/scss/index.scss +0 -158
  518. package/src/components/preview/scss/variables.scss +0 -149
  519. package/src/components/preview/source.ts +0 -73
  520. package/src/components/preview/stage.ts +0 -33
  521. package/src/components/range/scss/_filter.scss +0 -360
  522. package/src/components/range/scss/_slider.scss +0 -65
  523. package/src/components/range/scss/_vertical.scss +0 -10
  524. package/src/components/textarea/scss/index.scss +0 -72
  525. package/src/components/textarea/scss/variables.scss +0 -22
  526. package/storage/svg/amex.svg +0 -1
  527. package/storage/svg/arrow-down.svg +0 -1
  528. package/storage/svg/arrow-left.svg +0 -1
  529. package/storage/svg/arrow-right.svg +0 -1
  530. package/storage/svg/arrow-up.svg +0 -1
  531. package/storage/svg/card.svg +0 -1
  532. package/storage/svg/chip.svg +0 -1
  533. package/storage/svg/discover.svg +0 -1
  534. package/storage/svg/mastercard.svg +0 -1
  535. package/storage/svg/visa.svg +0 -1
  536. /package/build/components/{panels → shell}/subtree.d.ts +0 -0
  537. /package/storage/svg/{chevron-right.svg → chevron.svg} +0 -0
package/.audit/audit.json CHANGED
@@ -476,7 +476,7 @@
476
476
  "file": "src/components/inline-edit/scss/variables.scss",
477
477
  "line": 86,
478
478
  "rule": "Variables: live on the consuming selector, not on a parent with a prefix",
479
- "issue": "&-status sets --check-color, --check-delay, --check-duration, --check-stroke-width, and --dot-size, but only &-status-check and &-status-dot read them. The block-level --icon-swap-duration/--icon-swap-timing-function (line 23) also reach down into the icons.",
479
+ "issue": "&-status sets --check-color, --check-delay, --check-duration, --check-stroke-width, and --dot-size, but only &-status-check and &-status-dot read them. The block-level --swap-duration/--swap-timing-function (line 23) also reach down into the icons.",
480
480
  "severity": "medium"
481
481
  },
482
482
  {
@@ -964,7 +964,7 @@
964
964
  "file": "src/components/select/scss/variables.scss",
965
965
  "line": 52,
966
966
  "rule": "Variables live on the selector that consumes them, not on a parent",
967
- "issue": "Several variables live on a parent instead of the selector that uses them. On &-panel: --fade, --pad and --highlight/--highlight-pressed, used by the scroller and option. On .select: --item-height, --trigger-border-radius, --focus-width and --color-muted (19-24), used by option, scroller, trigger, detail and scroll. On &-option: --icon-swap-* (43-44), used by the child .select-menu-check.",
967
+ "issue": "Several variables live on a parent instead of the selector that uses them. On &-panel: --fade, --pad and --highlight/--highlight-pressed, used by the scroller and option. On .select: --item-height, --trigger-border-radius, --focus-width and --color-muted (19-24), used by option, scroller, trigger, detail and scroll. On &-option: --swap-* (43-44), used by the child .select-menu-check.",
968
968
  "severity": "medium"
969
969
  },
970
970
  {
@@ -244,7 +244,7 @@
244
244
  - [low] `src/components/inline-edit/scss/index.scss:476` (Keyframes: name after the class that uses them): inline-edit-status-enter/-exit are each used by a single class (.inline-edit-status-label-text--enter/--exit, lines 277/281), so they should be named inline-edit-status-label-text--enter/--exit.
245
245
  - [low] `src/components/inline-edit/scss/index.scss:507` (SCSS style: @media nested inside the selector it affects): The prefers-reduced-motion block is a separate top-level rule that re-opens .inline-edit, instead of being nested in &-status and &-toolbar.tooltip-content.
246
246
  - [high] `src/components/inline-edit/scss/variables.scss:8` (Variables: live on the consuming selector, not on a parent with a prefix): The .inline-edit block defines many prefixed variables that only its children read: --box-*, --heading-1/2/3-size (editor h1-h3), --icon-color/--icon-color-saved/--icon-size (&-icon), --link-underline-color, --mark-background, --quote-*, --task-*, --status-margin-top, and the whole --toolbar-* family (button size, colors, select/url widths, format/link display). Each should be set on the selector that uses it (&-toolbar-button, &-icon, &-editor h1, ...).
247
- - [medium] `src/components/inline-edit/scss/variables.scss:86` (Variables: live on the consuming selector, not on a parent with a prefix): &-status sets --check-color, --check-delay, --check-duration, --check-stroke-width, and --dot-size, but only &-status-check and &-status-dot read them. The block-level --icon-swap-duration/--icon-swap-timing-function (line 23) also reach down into the icons.
247
+ - [medium] `src/components/inline-edit/scss/variables.scss:86` (Variables: live on the consuming selector, not on a parent with a prefix): &-status sets --check-color, --check-delay, --check-duration, --check-stroke-width, and --dot-size, but only &-status-check and &-status-dot read them. The block-level --swap-duration/--swap-timing-function (line 23) also reach down into the icons.
248
248
  - [medium] `src/components/inline-edit/scss/variables.scss:102` (Variables: timing is always a pair --{name}-duration + --{name}-timing-function): &-status has five durations (--check-, --enter-, --exit-, --move-, --pulse-duration) that all share one generic --timing-function, and the pulse animation (index.scss:208) uses a literal ease-in-out.
249
249
  - [medium] `src/components/inline-edit/scss/variables.scss:158` (Ordering: modifiers &--* before elements &-*, alphabetical): The &--multiline and &--seamless modifiers sit at the end, after all elements. The elements are also unordered: & > &-field (142) and &-task (148) come after &-toolbar*.
250
250
 
@@ -403,7 +403,7 @@
403
403
  - [low] `src/components/select/scss/index.scss:44` (index.scss vs variables.scss): `--background-default: var(--highlight)` is set in index.scss on &-option--highlighted/:focus; it belongs in variables.scss.
404
404
  - [low] `src/components/select/scss/index.scss:102` (index.scss: values come from var(--*), not literals; timing pair): The scroll arrow uses `transition: opacity 150ms ease-out` and `height: 24px` (96) as literals. Other literals: z-index 9/50 (15/83), max-width calc(90vw - ...) (71), stroke-width 2.25 (22).
405
405
  - [medium] `src/components/select/scss/index.scss:144` (Variables: per-axis --padding-horizontal/--padding-vertical; no literals in index.scss): The trigger uses a hard-coded shorthand `padding: 0 var(--size-200) 0 var(--size-300)` and the option uses `padding: 0 var(--size-100)` (37) instead of padding variables.
406
- - [medium] `src/components/select/scss/variables.scss:52` (Variables live on the selector that consumes them, not on a parent): Several variables live on a parent instead of the selector that uses them. On &-panel: --fade, --pad and --highlight/--highlight-pressed, used by the scroller and option. On .select: --item-height, --trigger-border-radius, --focus-width and --color-muted (19-24), used by option, scroller, trigger, detail and scroll. On &-option: --icon-swap-* (43-44), used by the child .select-menu-check.
406
+ - [medium] `src/components/select/scss/variables.scss:52` (Variables live on the selector that consumes them, not on a parent): Several variables live on a parent instead of the selector that uses them. On &-panel: --fade, --pad and --highlight/--highlight-pressed, used by the scroller and option. On .select: --item-height, --trigger-border-radius, --focus-width and --color-muted (19-24), used by option, scroller, trigger, detail and scroll. On &-option: --swap-* (43-44), used by the child .select-menu-check.
407
407
 
408
408
  ## shell
409
409
 
package/README.md CHANGED
@@ -57,7 +57,8 @@ html`
57
57
  | `checkbox` | Checkbox with label; `checkbox.group` builds a checklist with a select-all header (mixed state), optional counter, and Shift-click ranges | `checkbox.group` |
58
58
  | `radio` | Radio button group | - |
59
59
  | `range` | Range slider; add `class: 'range--slider'` to `range` or `range.filter` for the compact slider appearance (replaces the standalone `slider` component); `orientation: 'vertical'` supports vertical single and dual thumbs, with height set by `--vertical-size` (default `176px`); `range.filter` is a range filter with rolling-digit values, a Clear button, a ghost preview of where a click would stretch the selection, and scale ticks; a number `value` gives one thumb, a pair gives two that stop at each other; `fields` adds editable min/max `input` fields, `disabled`; `state.low`/`state.high`, `format`, `prefix`, `step`, `ticks` | `range.filter` |
60
- | `select` | Dropdown with custom options; `select.menu` is a tooltip-powered macOS-style listbox opening with the selected option over the trigger, with typeahead and hover scrolling. Its surface, checks, and animations are reusable on tooltips with `--select-menu`. `select.expand` is a compact single choice: a button showing the current option that morphs into a row of every option over itself (`openOn: 'click' \| 'hover'`) | `select.menu`, `select.expand` |
60
+ | `search` | `search.input` is an `input` with a magnifier at its start and shortcut keycaps (`kbd`, shown only; the host binds them) at its end, floating over it; `search.button` is a `button` dressed the same way, its `label` where the field's placeholder sits, for opening a search that lives elsewhere. Both take the input's and button's own fill and size modifiers (`input--surface-primary`, `input--compact`, `button--surface-primary`, `button--tactile`) | `search-input`, `search-button`, `search-keys` |
61
+ | `select` | macOS-style listbox that opens in the top layer with the selected option over the trigger, with typeahead and hover scrolling; a `highlight` layer follows the pointer and arrow keys across its options, and an option's `icon` shows before its label in its row and in the trigger, every row keeping the icon's slot once any option has one. `select.arrow`, `select.option`, `select.panel` and `select.trigger` key attributes onto those parts. `select.expand` is a compact single choice: a button showing the current option that morphs into a row of every option over itself (`openOn: 'click' \| 'hover'`) | `select.expand` |
61
62
  | `switch` | Toggle switch; `switch.group` builds the same group as `checkbox.group` with switches, the select-all knob resting midway when mixed | `switch.group` |
62
63
  | `tasklist` | Checklist that strikes through checked tasks and moves them below the open ones; `ordered` keeps both groups in task order, `sortable` lets rows be dragged within their group | `tasklist.checkbox`, `tasklist.content`, `tasklist.description`, `tasklist.item`, `tasklist.label`, `tasklist.row` |
63
64
  | `form` | Form wrapper | `form.action`, `form.input` |
@@ -69,20 +70,19 @@ html`
69
70
  | Component | Description | Variants |
70
71
  |-----------|-------------|----------|
71
72
  | `button` | Standard button, filled by `button--black`, `button--primary` (the theme's ink, lettered in the page color), `button--surface` (its raised surface), `button--surface-primary` or `button--white`; `button.copy` is an icon button copying `value` (a string or a function read on click) whose copy icon turns into a check that draws in, then back after `timeout` ms (default `3000`), with `label`, `success` and `error` as its accessible name per state; `button.faces(status, faces)` stacks keyed faces in one grid cell and shows the one whose `key` matches `status()`; `button.morph` runs an async `onaction` through idle, loading, success and error, carrying the status as a `button--morph-{status}` class (also readable through a passed `state`), collapsing to a circle while `compact(status)` holds (default: loading and success), shaking on error and announcing `announce[status]`; its content is yours, layered with `button-morph-text` (mark the shown one `--active`) and `button-morph-icon--loading` / `--success`; `button.morph.save` is the ready-made save (`onsave`, `label`, `retryLabel`) that morphs into a spinner circle and confirms with a check, coloured by its `--background-default` | `button.copy`, `button.faces`, `button.morph`, `button.morph.save`, `button--black`, `button--primary`, `button--surface`, `button--surface-primary`, `button--white` |
72
- | `tooltip` | Popup content; `tooltip.onhover` also opens on keyboard focus and closes on Escape, and `tooltip.onhover.trigger({ delay, state })` is the same behaviour to spread on your own `.tooltip` element; `delay: { open?, close? }` (ms, on `tooltip.onhover` and `tooltip.shared`; each left out is instant) holds the pointer before opening and after leaving, and for 500ms after a delayed tooltip closes the next opens at once, without its entrance; `tooltip.menu` is a keyboard menu (arrows, Home/End, Escape returns focus, Tab closes) that opens in the top layer, above every stacking context around it, and closes once an option is chosen, `highlight` (default `false`; `true` or the highlight's own attributes) glides a layer between its rows on hover and keyboard focus in place of each item's own fill, its panels a surface whose item hover and pressed fills and highlight are surface primary, `tooltip-menu--surface` restoring that fill on the menu or any ancestor (such as a `button.split`); `tooltip.nestedMenu({ animate, items, onnavigate, state })` is a drill-down menu whose `items` nest to any depth: a branch's panel grows out of its row over the dimmed parent, and its header or the parent's scrim goes back; arrows/Home/End move, Right/Left drill and return, Escape goes back a level then closes (`animate: false` skips the motion, `tooltip.nestedMenu.trigger` styles the button); `tooltip.shared({ delay, direction, dismiss, interactive, keep, state, ...attributes })` is one tooltip for any number of triggers: spread `tip.bind(content)` on a trigger (a string, or a function returning a template, rendered on every open unless `keep`), or `tip.delegate({ content, edge, selector })` on a container to make every matching descendant a trigger (default `[data-tooltip]`, its value the content; `edge` lines the tooltip up past the container's edge), and place `tip.render()` once, carrying the remaining attributes; it opens in the top layer beside the trigger, flips when out of room, and glides between triggers while its content slides in the direction of travel; `interactive` makes it a card the pointer can enter, toggled by taps and keys, with Tab carried into it; `keep` mounts each bound trigger's content on its first open and keeps it for reopening until that trigger unmounts; `dismiss` is a selector whose clicks inside close it (`'a[href]'` for navigation); `state.active` is whether it is open and `state.index` which bound trigger, numbered in `bind()` order (-1 for none), and setting it opens that trigger | `tooltip.context`, `tooltip.menu`, `tooltip.nestedMenu`, `tooltip.onclick`, `tooltip.onhover`, `tooltip.onhover.trigger`, `tooltip.shared`, `tooltip-menu--surface` |
73
+ | `toolbar` | Bar of flat buttons on a raised surface, as the inline editor's formatting toolbar is (which reuses its button and divider styles), built from consumer-defined items: `toolbar.button({ label, hint, icon \| thumbnail, ...attributes })` spreads the consumer's attributes (`onclick`, `aria-pressed`, ...) on the button, its label and hint (text or a function) naming it and showing on hover, `toolbar.item(render, { hint, label })` carries any control (a select, a field), `toolbar.divider()` separates groups, and `toolbar.drawer()` places the drawer's button; as a toolbar it takes one tab stop that the arrow keys, Home and End rove between its controls, and `sortable` (on in a dock) lets buttons drag, with one `tooltip.shared` label gliding between them after `delay`, `arrows` paging through whole buttons once they outgrow the bar, and `direction` (`n`, `s`, `e`, `w`) setting the side the drawer and labels open toward, east and west standing it upright; `drawer` morphs the bar into a panel of the `apps` buttons laid out like `command`, with an optional `search` and arrow keys and Enter, `alphabetical` laying its buttons out under `#` and A to Z headings with a rail of the letters beside them that swells under the pointer and scrolls to each letter it passes, `groups` letting a button let go over another on the bar (or in a group's panel) group with it, or over a group join it at its end, what it is over swelling as it is reached, each group (`toolbar.group({ items, label })`) a 2x2 preview opening a panel of its members that sorts by dragging and is named in place by an `inlineEdit` (`onrename` reports it), nests groups, the ones on the way in listed above it as a dimmed menu panel whose rows go back to them, closes as a button is carried out of it and gives way to its last member, `labels` naming the bar's buttons under them instead of on hover, buttons dragging between bar and drawer and one thrown off the bar going back to it (`state.active` opens it, `onsort` reports each move); `mode: 'dock'` makes the buttons apps that launch with a hop-and-squash and light a running dot (per-item `state.running`, `onlaunch`) | `toolbar.button`, `toolbar.divider`, `toolbar.drawer`, `toolbar.group`, `toolbar.item` |
74
+ | `tooltip` | Popup content that comes out of its trigger; a tooltip or menu reopens on the side it last opened on while it still fits there, and otherwise tries the opposite side, then the other axis (a first open tries above and below first, whichever has more room), kept `--viewport-margin` (default `--size-100`) off the window's edges and capped to the room it has, past which it scrolls; `axis: 'x' | 'y'` (on `tooltip.onclick`, `tooltip.onhover` and `tooltip.shared`) keeps it beside its trigger or above and below it. `tooltip-content--expand` / `tooltip-message--expand` content, like `tooltip.menu({ expand: true })`, covers its trigger instead and grows out of it, keeping the corner it last grew toward on each axis that still fits; `--morph` grows out from behind it; `tooltip.menu` panels scroll their rows with the scrollbar modifier and `scroll-padding-block`, branch panels lift to stay on screen, and `align: 'end'` hangs a menu from its trigger's end edge; `tooltip.onhover` also opens on keyboard focus and closes on Escape, and `tooltip.onhover.trigger({ axis, delay, state })` is the same behaviour to spread on your own `.tooltip` element; `delay: { open?, close? }` (ms, on `tooltip.onhover` and `tooltip.shared`; each left out is instant) holds the pointer before opening and after leaving, and for 500ms after a delayed tooltip closes the next opens at once, without its entrance; `tooltip.menu` is a keyboard menu (arrows, Home/End, Escape returns focus, Tab closes) that opens in the top layer, above every stacking context around it, and closes once an option is chosen, `highlight` (default `false`; `true` or the highlight's own attributes) glides a layer between its rows on hover and keyboard focus in place of each item's own fill, its panels a surface whose item hover and pressed fills and highlight are surface primary, `tooltip-menu--surface` restoring that fill on the menu or any ancestor (such as a `button.split`); `tooltip.nestedMenu({ animate, items, onnavigate, state })` is a drill-down menu whose `items` nest to any depth: a branch's panel grows out of its row over the dimmed parent, and its header or the parent's scrim goes back; arrows/Home/End move, Right/Left drill and return, Escape goes back a level then closes (`animate: false` skips the motion, `tooltip.nestedMenu.trigger` styles the button); `tooltip.shared({ axis, delay, dismiss, interactive, keep, state, ...attributes })` is one tooltip for any number of triggers: spread `tip.bind(content)` on a trigger (a string, or a function returning a template, rendered on every open unless `keep`), or `tip.delegate({ content, edge, selector })` on a container to make every matching descendant a trigger (default `[data-tooltip]`, its value the content; `edge` lines the tooltip up past the container's edge, beside it on the `'x'` axis, else above or below), and place `tip.render()` once, carrying the remaining attributes; it opens in the top layer beside the trigger, flips when out of room, and glides between triggers while its content slides in the direction of travel; `interactive` makes it a card the pointer can enter, toggled by taps and keys, with Tab carried into it; `keep` mounts each bound trigger's content on its first open and keeps it for reopening until that trigger unmounts; `dismiss` is a selector whose clicks inside close it (`'a[href]'` for navigation); `state.active` is whether it is open and `state.index` which bound trigger, numbered in `bind()` order (-1 for none), and setting it opens that trigger | `tooltip.context`, `tooltip.menu`, `tooltip.nestedMenu`, `tooltip.onclick`, `tooltip.onhover`, `tooltip.onhover.trigger`, `tooltip.shared`, `tooltip-menu--surface` |
73
75
  | `accordion` | Collapsible sections driven by `state.active`; `group` (from `accordion.group()`) keeps at most one member open, closing the rest when one opens, and `accordion.group({ required: true })` keeps exactly one open, reopening a member closed while nothing else is. Several opened at once leave the last to join or open; a required group opens its first member when none starts open. Members join while mounted | `accordion.group` |
74
76
  | `clipboard` | `clipboard.write(value)` copies text, resolving `true` once it lands and `false` if the browser refuses | `clipboard.write` |
75
- | `command` | ⌘K/Ctrl+K command palette on `overlay` + `input`: substring-then-subsequence matching with highlighted runs, grouped results, arrow/Enter keys, `onrun`; `tabs` adds a row of tabs under the search, marked by `highlight`, whose views are `frame--swap`s, drifting in from their side, and cycle with Tab/Shift+Tab (All leads with recent commands, persisted through any `store` implementing `get`/`set`, then lists every command; each command group gets its own tab; a Shortcuts tab lists `shortcuts`); setting `state.tab` (`'all'`, `'shortcuts'` or a group name) switches views and clears the search. `render(groups)` supplies custom result markup: each item exposes its `label`, highlighted `content`, command `id`, and `attributes` to spread onto the option element so selection and keyboard navigation keep working. Icons are sprite ids; `.command-trigger` also styles standalone search buttons | `command.dialog` (e.g. `overlay--blur`), `command.input`, `command.option`, `command.trigger`, `command--centered` |
76
- | `editor` | Editor family under one namespace. `editor.code` is a source editor on a persistent native textarea editing an `EditorDocument` that keeps its own undo history: syntax colors (TypeScript/TSX, JavaScript, CSS/SCSS, HTML, JSON, Python, Markdown), line numbers, multiple and rectangular selections, find/replace, go to line, folding, wrap, visible whitespace and a minimap; `options.services` adds completion, hover and diagnostics from a language-server `transport` (or completes from the document's own words); `editor.markdown` renders Markdown in place and edits one block at a time; `editor.code` adds sticky scroll, color swatches, links, unicode warnings, rulers, a git gutter (`baseline`), keybinding overrides (`keybindings`, exported `commands`) and merge-conflict lenses; `editor.tree` is the file tree, with drops from the desktop (`operations.import`), dragging files out (`export`) and next/previous change or problem; `editor.diffs` is a split or unified diff viewer and `editor.diffs.merge` a three-way merge editor; `editor.workspace` combines them with an explorer, tabs, quick open and file operations over a host you supply; `editor.viewer` shows source read-only with syntax colors, line numbers, folding, wrap, visible whitespace, a minimap and an optional copy button, without the editor (import `@esportsplus/ui/editor/viewer` directly to leave the rest of the family out of the bundle) | `editor.code`, `editor.diffs`, `editor.diffs.merge`, `editor.markdown`, `editor.tree`, `editor.viewer`, `editor.workspace` |
77
+ | `command` | ⌘K/Ctrl+K command palette on `overlay` + `input`: substring-then-subsequence matching with highlighted runs, grouped results, arrow/Enter keys, `onrun`; `tabs` adds a row of tabs under the search, marked by `highlight`, whose views are `frame--swap`s, drifting in from their side, and cycle with Tab/Shift+Tab (All leads with recent commands, persisted through any `store` implementing `get`/`set`, then lists every command; each command group gets its own tab; a Shortcuts tab lists `shortcuts`); setting `state.tab` (`'all'`, `'shortcuts'` or a group name) switches views and clears the search. `render(groups)` supplies custom result markup: each item exposes its `label`, highlighted `content`, command `id`, and `attributes` to spread onto the option element so selection and keyboard navigation keep working. Icons are sprite ids. The built-in trigger, and `command.search.trigger` beside a separately mounted `command.search.modal`, is a `search.button` that opens the palette and shows its hotkey; the palette's own field is a `search.input`; `command.trigger` passes attributes to it | `command.dialog` (e.g. `overlay--blur`), `command.input`, `command.option`, `command.trigger`, `command--centered`, `command-dialog--glass` (via `command.dialog`) |
78
+ | `editor` | Editor family under one namespace. `editor.code` is a source editor on a persistent native textarea editing an `EditorDocument` that keeps its own undo history: syntax colors (TypeScript/TSX, JavaScript, CSS/SCSS, HTML, JSON, Python, Markdown), line numbers, multiple and rectangular selections, find/replace, go to line, folding, wrap, visible whitespace and a minimap; `options.services` adds completion, hover and diagnostics from a language-server `transport` (or completes from the document's own words); `editor.markdown` renders Markdown in place and edits one block at a time; `editor.code` adds sticky scroll, color swatches, links, unicode warnings, rulers, a git gutter (`baseline`), keybinding overrides (`keybindings`, exported `commands`) and merge-conflict lenses; `editor.tree` is the file tree, with drops from the desktop (`operations.import`), dragging files out (`export`) and next/previous change or problem; `editor.diffs` is a split or unified diff viewer and `editor.diffs.merge` a three-way merge editor; `editor.workspace` combines them with an explorer, tabs, quick open and file operations over a host you supply, laid out by `shell`: the explorer is a static sidebar on the side `explorerSide` names (opening and closing with the `explorerOpen` preference), each open file is a tab that splits, docks and drags like any panel, a file opens once across the layout, and the model's `layout` (a `shell.state()`) holds where every tab sits while `state.tabs` holds their documents; the host's `session` stores that layout as `layout`, its files named by path; `editor.viewer` shows source read-only with syntax colors, line numbers, folding, wrap, visible whitespace, a minimap and an optional copy button, without the editor (import `@esportsplus/ui/editor/viewer` directly to leave the rest of the family out of the bundle) | `editor.code`, `editor.diffs`, `editor.diffs.merge`, `editor.markdown`, `editor.tree`, `editor.viewer`, `editor.workspace` |
77
79
  | `alert` | Notifications | error, info, success types |
78
80
  | `chatMinimap` | Rail of lines mapping a conversation, one per turn: the hovered line swells its two neighbours either side, one gliding `tooltip.shared` card previews each turn's `title` and `description`, previous/next buttons step through the thread, and `state` (`start`/`end`) lights the turns in view. `turns` may be a `ReactiveArray` so the rail grows with the chat; `chatMinimap.spy({ state, turns })` drives `state` from an `IntersectionObserver` on the thread and its `scrollTo` is the `onnavigate` | `chatMinimap.card`, `chatMinimap.description`, `chatMinimap.item`, `chatMinimap.items`, `chatMinimap.label`, `chatMinimap.line`, `chatMinimap.nav`, `chatMinimap.preview`, `chatMinimap.title`, `side: 'left'` |
79
- | `dock` | macOS-style shelf, unpainted so it is themed where it is placed, whose icons swell toward the cursor on a spring, with one delayed `tooltip.shared` label gliding between its items, items showing an `icon` (a sprite id or a function rendering it) or a `thumbnail` image covering the button, each optionally shaped by its own `modifier` (`plain` for the icon alone, `square`, `squircle`), sortable by drag, with `arrows` paging through whole icons once they outgrow the room the dock has; `direction` (`n`, `s`, `e`, `w`) sets the side the launcher and labels open toward and the way icons swell, east and west standing the dock upright; given `apps`, an 'All apps' button opens a launcher on that side, centered on the dock as a `tooltip-content`, laid out like `command`: a search (an `input`), the apps in a grid the arrow keys walk and Enter opens, and a legend of its keys; the dock and the launcher sort into each other, so dragging moves apps in and out of `items` (`state.active` opens it, `onsort` reports each move), and a hop-and-squash launch that lights a running dot (per-item `state.running`, `onlaunch`) | `dock.button`, `dock.launcher`, `dock--plain`, `dock--square`, `dock--squircle` |
80
- | `pagination.dots` | Page indicator driven by a continuous `state.progress`; the pill stretches between dots like a worm, with an optional autoplay countdown | `pagination.dots.dot`, `pagination--dots-large` |
81
81
  | `pagination.cards` | Previous and next links as two cards, each a small `label` (default 'Previous'/'Next'), a `title` and an optional `description`; the chevron nudges the way it points on hover and focus, and a lone next card keeps the right column | `{ next, previous }`, each `{ description?, href, label?, title }` |
82
82
  | `pagination.arrows` | The same links as two square arrow buttons; a missing side stays in place, disabled, so the pair never shifts | `{ next, previous }` |
83
- | `nav` | `nav.tree` link tree marking the active link with a gliding `highlight`: given its attributes as `[nav.tree.highlight]`, left out for none: a pill, or with a `border` a `highlight--rail` along a rail on that edge; `nav.toc` table of contents, a `nav.tree` of one group with `{ border: 'left', fill: false }`; `nav.spy(ids)` marks the section in view within whichever ancestor scrolls it | `nav.tree`, `nav.toc`, `nav.spy` |
84
- | `sortable` | Drag-and-drop reordering of a reactive list's items, across lists with `group` | `sortable--{effect}` modifiers |
85
- | `story` | Auto-advancing stories, each any `Renderable`, on a `frame--slide` track filling the card, with segmented progress bars overlaid on top whose CSS fill is the timer (`--duration`, or `duration` in ms); tap the left third to go back (replaying the first story) and the rest to advance, drag or flick between stories (rubber-banding at the ends), press-and-hold, hover or Space to pause; past the last story, `repeat` returns to the first (dragging it in after the last), otherwise it stops with its bar full; `state.done` turns true the first time the last story is finished; links and controls inside a story keep their own clicks | |
83
+ | `nav` | `nav.tree` link tree marking the active link with a gliding `highlight`: given its attributes as `[nav.tree.highlight]`, `true` for its defaults, left out for none: a pill, or with a `border` a `highlight--rail` along a rail on that edge; `nav.toc` table of contents, a `nav.tree` of one group with `{ border: 'left', fill: false }`; `nav.spy(ids)` marks the section in view within whichever ancestor scrolls it | `nav.tree`, `nav.toc`, `nav.spy` |
84
+ | `sortable` | Drag-and-drop reordering of a reactive list's items, across lists with `group`; with `onthrow`, an item let go outside every list is thrown out of its list, flung on the way it was going and fading to nothing; with `combine`, letting an item go over the middle of another hands the two to `oncombine` instead of sorting them, the other marked `sortable-item--target` meanwhile, and sorting waits for the pointer to settle near an item's edge; with `outside`, drop targets that aren't lists: while the pointer is over no list, `over(item, x, y)` names the element under it, which carries `--over`, and letting go there takes the item out of its list and hands it to `ondrop`; `disabled(item)` keeps an item from being picked up | `sortable--{effect}` modifiers |
85
+ | `story` | Auto-advancing stories, each any `Renderable`, on a `frame--slide` track filling the card, with segmented progress bars overlaid on top whose CSS fill is the timer (`--duration`, or `duration` in ms); `story--float` moves the bars to a row beneath the card, and `story--dots` draws them as dots whose active one stretches into a pill the timer fills; tap the left third to go back (replaying the first story) and the rest to advance, drag or flick between stories (rubber-banding at the ends), press-and-hold, hover or Space to pause; past the last story, `repeat` returns to the first (dragging it in after the last), otherwise it stops with its bar full; `state.done` turns true the first time the last story is finished; links and controls inside a story keep their own clicks | `story--float`, `story--dots` |
86
86
 
87
87
  ### Display
88
88
  | Component | Description |
@@ -91,12 +91,11 @@ html`
91
91
  | `loader` | Loading spinner |
92
92
  | `loading` | Border loading indicator |
93
93
  | `typewriter` | Animated typing effect; `typewriter.retype` is a headline word that is selected and typed over with a jittered, human rhythm, landing whole words under reduced motion. Both share the caret variables and `--block`/`--hard`/`--underscore` modifiers. `typewriter.rotate` is a rotating word (`state.index`, `state.paused`) whose shared letters glide into place while the others blur out and in; `typewriter-rotate--accent` |
94
- | `group` | Row of items on `%group`, spaced by `--gap-horizontal` / `--gap-vertical` (a quarter of `--size-100`); attributes under `[group.highlight]` add a `highlight` behind the items, none without them; `button--group` items make a segmented control, medium weight while `--active` | `group.highlight` |
95
- | `preview` | An example's card that mounts its content once near the viewport and answers its hash (and its `anchors`) by revealing itself; its parts compose inside it, sharing one `preview.state()`: `preview.header` (numbered title plus controls), `preview.stage` (renders the example untracked, hidden while the source shows), `preview.source` (loads, caches and retries a source on the code view) and `preview.code` (a flush `editor.viewer` with a copy button). `preview.buttons` sits just above the card, a `group` of view buttons from `{ content, view }` items | `preview.buttons`, `preview.code`, `preview.header`, `preview.source`, `preview.stage`, `preview.state` |
96
- | `panels` | Tabbed groups of surfaces in resizable splits, from a `catalog` of kinds (`title`, `render`, optional `icon`, `description`, `shortcut`, `multiple`) and a `panels.state()` holding the layout (`root`, optional `storage` key to persist it); `icons: true` shows tabs as their kind's icon alone, closed from their menu. Tabs drag to reorder, into another group, onto a group's half to split it, or onto the bottom strip to dock a full-width bottom group; separators resize, a double-clicked header maximizes, groups clicked with Ctrl (⌘ on Apple platforms) held fill the layout together once it is let go (Esc cancels) until a double click steps back out, and tabs carry a close menu. `+` and an empty group's launcher open a kind. Each surface renders once and moves between slots, keeping its state until its tab closes | `panels.state` |
97
- | `highlight` | Layer that glides behind its parent's children on hover and focus and rests on the `--active` one (`target` for nested items, `hover: false` for the active layer only); `border: 'bottom' \| 'left' \| 'right' \| 'top'` adds an edge border to the active layer with both fills kept `--border-inset-horizontal` / `--border-inset-vertical` clear of it, `fill: false` drops the active background, `--glide-tail-duration-active` longer than `--glide-duration-active` stretches it toward the next item, `--inset-horizontal` / `--inset-vertical` pull the fill in from the item; `highlight--rail` on the highlight and `highlight-rail` with `highlight-rail--{bottom,left,right,top}` on its container make tabs along a rail at `--rail-width`, the border on the same edge lying over it |
94
+ | `group` | Items in a row that wraps, spaced by `--gap-horizontal` / `--gap-vertical`; `group--column` stacks a `group-label`, a control and a `group-description` / `group-error` / `group-footer` under it, `group--grid` sets the label beside the control (held to `--control-width`) with the description on its own line, `group--row` holds every item on one line without wrapping, `group-header` bolds the label, `group--invalid` reddens the description; `group-item--overlay` items float over a control's start or end (by which side of it they're written on), which `group()` measures and pads the control to clear; attributes under `[group.highlight]` add a `highlight` behind the items; `button--group` items sit joined as a segmented control, medium weight while `--active` | `group.highlight`, `group-item--overlay` |
95
+ | `shell` | The app frame: tabbed groups of surfaces in resizable splits, in a main area between a sidebar on either edge, above a bottom dock. Built from a `catalog` of kinds (`title`, read reactively, `render`, optional `icon`, `description`, `shortcut`, `multiple`, `addable: false` to keep a kind out of `+` and the launcher, `tooltip`, `tab(surface)` returning `attributes` spread on the tab, `badges` after its title and an `icon` in place of the kind's, and `menu(surface)` returning the tab menu's items in place of the layout's own) and a `shell.state()` holding the layout (`root`, `open` for which docks start open, `closing(surfaces)` asked before a close takes surfaces away, which keeps them by returning or resolving `false`, and an optional `store`, any `@esportsplus/web-storage` `Local<{ shell: Saved }>` or object with its async `get` / `set`, which restores the tree once it reads back unless the tree changed first, and saves it after each change); besides its moves and closes the state can `replace(previous, surface)` in place without asking `closing`, `load(root)` a whole tree, and `back()` step back one view as a double click does, returning false once there is nothing left to step out of; `empty` renders what an empty group or main area shows in place of the launcher; `icons: true` shows tabs as their kind's icon alone, closed from their menu, and `sidebars: { left, right }` give each sidebar a `label`, `hover` to peek while the pointer rests on its edge, and `resizable` to drag its inner border; a sidebar named there always shows its toggle, and a sidebar's last group stays when its tabs close, showing the empty state until it is filled or closed. A group's `placement` (`left`, `right`, `bottom`) docks it. Tabs drag to reorder, into another group, onto a group's half to split it, or onto the strip along the left, right or bottom edge to dock there; separators resize, a double-clicked header maximizes, groups clicked with Ctrl (⌘ on Apple platforms) held fill the main area together once it is let go (Esc cancels), or at once when a press with it held sweeps across them and is released; in a layout nested inside a group the innermost layout picks, and a double click on any header steps back one view at a time (out of a maximized group, then each zoom in turn, restoring the group maximized before it) until the layout is back at its own view, where it maximizes again; tabs carry a close menu. `+` and an empty group's launcher open a kind. Each surface renders once and moves between slots, keeping its state until its tab closes. A surface with `sortable: false` stays in its group; alone there, the group is static, showing it without tabs and taking no drops, and a static sidebar swipes closed toward its edge. Sidebars toggle from their top corner (`state.toggle(placement, open?)`), open by clicking or dragging their edge, and, when `resizable`, resize from their inner border between `--sidebar-min-width` and `--sidebar-max-width`, never leaving the main area narrower than `--main-min-width` (`320px`); `--space` is their width until resized, `--toggle-size` / `--toggle-top` / `--toggle-left` / `--toggle-right` place the toggles (by default centred on the group headers' `--header-height`, so they line up with the tabs) and `--slide-duration` / `--slide-timing-function` time the motion. At or below `narrow` (default `1024`) px of the layout's own width, one sidebar opens at a time, pushing the main area aside, and the main area shows one group, switched from its header. A static group docks whole into an empty dock (`state.dock`). Each sidebar, the main area and the bottom dock rebuild only when their own groups change | `shell.state` |
96
+ | `highlight` | Layer that glides behind its parent's children on hover and focus and rests on the `--active` one (`target` for nested items, `hover: false` for the active layer only); `border: 'bottom' \| 'left' \| 'right' \| 'top'` adds an edge border to the active layer with both fills kept `--border-inset-horizontal` / `--border-inset-vertical` clear of it, `fill: false` drops the active background, `--glide-tail-duration-active` longer than `--glide-duration-active` stretches it toward the next item, `--inset-horizontal` / `--inset-vertical` pull the fill in from the item; `highlight--rail` on the highlight and `--highlight-rail` with `--highlight-rail-{bottom,left,right,top}` on its container make tabs along a rail at `--rail-width`, the border on the same edge lying over it |
98
97
  | `ellipsis` | Animated dots |
99
- | `icon` | SVG sprite wrapper, `icon(attributes, href)`: the sized box (`--size`, or `--width`/`--height`) colored by `--color`, whose `fill` the `<svg>` inherits, so a stroked icon sets `fill: none` on the box; attributes under `[icon.svg]` go on the `<svg>` itself, `class` included; `icon--rotate` turns it by `--rotate` (default `0deg`) with an eased transition, skipped under reduced motion | `icon.svg` |
98
+ | `icon` | SVG sprite wrapper, `icon(attributes, href)`: the sized box (`--size`, or `--width`/`--height`) colored by `--color`, whose `fill` the `<svg>` inherits, so a stroked icon sets `fill: none` on the box; attributes under `[icon.svg]` go on the `<svg>` itself, `class` included; it turns by `--rotate` (default `0deg`), and the directional sprites (`arrow.svg`, `chevron.svg`), which point right, take `icon--down`, `icon--left` or `icon--up`; `icon--rotate` eases between turns, skipped under reduced motion | `icon.svg` |
100
99
  | `number` | Number formatting |
101
100
  | `truncate` | Text truncation |
102
101
  | `json` | JSON display |
@@ -105,18 +104,16 @@ html`
105
104
  | `progress` | Progress bar (`state.value`) with an optional label, percentage and a `status` line derived from the value; `progress.text` is a `progressbar` whose label fills with ink on a spring (`state.value`), with rolling digits and a drawn check on done |
106
105
  | `heatmap` | Calendar of daily values that sweeps in by column; one `tooltip.shared` delegated across the cells renders each day through your `tooltip(day, index)` template (`describe(day)` names the cell), drag-to-scroll via `scrollbar.drag`, roving-tabindex grid keys and `heatmap.legend`; `heatmap--blue` |
107
106
  | `relativeTime` | Self-updating `<time>` ("4 min ago") that wakes once per visible change and rolls its digits; full date in a `tooltip` on hover/focus; `state.now` pins the clock |
108
- | `metric` | Card with a title, value, delta and an SVG line chart that draws itself in, with a scrub readout for pointer, touch and arrow keys (`state.active`, `state.index`). Fills its container (`--width: 100%`) and redraws at its measured size on every resize, so the stroke, dot and tip keep their size; the plot height tracks the card width between `--plot-height` bounds, and the delta wraps under the value in narrow cards. A `ReactiveArray` as `data` is live: every mutation (`push`/`shift` for a sliding window, `splice` to replace) redraws the card, which rests on the newest point unless it is being read. Lay cards out with `grid`; `metric--accent`. `metric.flash` is a live value (`state.value`) that marks each change with a directional roll, tint and arrow, announcing the settled value politely |
109
- | `surfaceField` | Canvas field of dots and lines lit by the pointer that clears and bends around surfaces (rounded, circular or turned, read from their styles), carries a pannable `camera` as a parallax floor, draws `links` between surfaces as lit channels, and sleeps when idle; `worker` takes the URL of `@esportsplus/ui/surface-field/worker` (Vite: `?worker&url`) to draw in an OffscreenCanvas worker. `surfaceField.surface` is a draggable, resizable card with an optional `title`/`body`, inline-edited (`inlineEdit`) with `editable` | `surfaceField.surface` |
107
+ | `surfaceField` | Canvas field of dots and lines lit by the pointer that clears and bends around surfaces (rounded, circular or turned, read from their styles), carries a pannable `camera` as a parallax floor, draws `links` between surfaces as lit channels cut at their edges (a `strength` from 0 to 4, and moving links that share a `sequence` carry one wave through them in order), and sleeps when idle; `worker` takes the URL of `@esportsplus/ui/surface-field/worker` (Vite: `?worker&url`) to draw in an OffscreenCanvas worker. `surfaceField.surface` is a card carried by its body; a click selects it and shows a frame whose corners and edges resize it and whose knob turns it (`rotation`; arrow keys move, Alt+arrows resize, `[`/`]` turn), with an optional `title`/`body` inline-edited (`inlineEdit`, showing only the caret) with `editable` and the body in the markdown editor with `rich`, and with `ports` a link drawn from its right dot onto another surface reports it through `onlinking`/`onlink` | `surfaceField.surface` |
110
108
 
111
109
  ### Layout
112
110
  | Component | Description |
113
111
  |-----------|-------------|
114
112
  | `scrollbar` | Spread `scrollbar(options)` on a scroller; it adds `--scrollbar` and one class per option. `--scrollbar-scope` on a site or subtree root styles that root and its descendants, with smooth scrolling (instant under reduced motion); overscroll containment applies to the scope root and `scrollbar()` containers, allowing clipped descendants to pass wheel input to their scroller. Containers keep their own overflow and gutters, while children can override inherited variables or add scrollbar classes such as `--scrollbar-blue` without the base class. `--scrollbar-behavior` and `--scrollbar-overscroll` customize scrolling. All visible variants use arrowless custom bars in Chromium/WebKit: `--scrollbar-size` sets the thumb's resting width (default `6px`; `auto: true` uses the platform width), widening to `--scrollbar-size-hover` (default `--scrollbar-size` + `2px`, which is also the gutter width) while hovered or dragged; `--scrollbar-align` places that growth (default `0` hugs the window edge and grows toward the content, `0.5` grows both ways), and `--scrollbar-rail-color` paints the track (default `transparent`, also used natively elsewhere); and `--scrollbar-border-radius` rounds it (defaults to a third of `--scrollbar-size`, `3px` under `auto: true`; use `0px` for square corners). The thumb follows the token state system: `--scrollbar-color-default`, `--scrollbar-color-hover` and `--scrollbar-color-pressed` (default black `400`/`300`/`500`), or `color` such as `scrollbar({ color: 'blue' })`. `hidden: true` hides the bar and `hover: true` paints it only while hovered or focused; `snap: true` snaps children to center. Other browsers retain native rendering, with `--scrollbar-width` (default `thin`) accepting `auto`, `thin`, or `none`, the default color, and native thumb corners. `horizontal: true` scrolls x only; edge effects driven by scroll timelines, each edge reaching full strength once the content has scrolled the effect's size (`--scrollbar-fade-size`, `--scrollbar-blur-size`) past it, and running along x when combined with `horizontal` (`import { scrollbar } from '@esportsplus/ui/modifiers'`): `scrollbar({ fade: true })` leaves custom bars unfaded and adds a JS fallback only where timelines are unsupported, while `scrollbar({ blur: true })` inserts the sticky blur edges and adds the same fallback; a horizontal blur lays the scroller out as a flex row so the edges sit beside its content; `scrollbar({ drag })` adds mouse drag-to-scroll (`--scrollbar-drag`), along both axes for `true` or one for `'horizontal'` \| `'vertical'`, and combines with `blur` or `fade` (one edge effect per scroller) |
115
- | `card.scss` | Surface (background, radius, shadow and padding variables); `card--morph` makes it a shell that morphs between stacked `card-morph-layer`s inside a clipping `card-morph-viewport`: size it through `--morph-width`/`--morph-height`, each layer is a `frame frame--swap` (mark the shown one `--active`, set `--i` on the viewport and `--n` on each layer), `card--instant` snaps; `--morph-*` variables tune the motion |
113
+ | `card.scss` | Surface (background, radius, shadow and padding variables); `card-header` is a raised strip across the top of a card with no padding of its own, for a title and controls; `card--morph` makes it a shell that morphs between stacked `card-morph-layer`s inside a clipping `card-morph-viewport`: size it through `--morph-width`/`--morph-height`, each layer is a `frame frame--swap` (mark the shown one `--active`, set `--i` on the viewport and `--n` on each layer), `card--instant` snaps; `--morph-*` variables tune the motion |
116
114
  | `frame.scss` | Sibling frames sharing one spot, the `--active` one shown: instant by default, `frame--slide` / `frame--scroll` move them like a horizontal / vertical track, `frame--swap` crossfades in place with a directional drift and blur (the `tooltip.shared` swap); shared by `command`, `tooltip.shared` and `card--morph` |
117
115
  | `overlay` | Native `<dialog>` driven by `state.active` (Esc and backdrop click close it), placed by `overlay--c` (default), an edge (`overlay--n`, `overlay--s`, `overlay--w`, `overlay--e`) or a corner (`overlay--ne`, `overlay--se`, `overlay--sw`, `overlay--nw`, which enter and drag off by their top or bottom edge); placements slide in from their side on the iOS drawer curve and square the corners they touch unless `overlay--floating`. Every overlay but a rail drags to dismiss (toward its edge, or downward when centered) past 25% or on a flick, rubber-bands inward and fades the backdrop with the drag; when its own content scrolls, touch drags only from `overlay.handle`. Overlays opened over one another stack: each covered layer shrinks, dims and peeks out from under the one above (`--stack-scale`, `--stack-dim`, `--stack-peek`) and follows the top layer back as it is dragged away; an `overlay-page` direct child of `<body>` (or of a non-modal overlay's container) recedes the same way; `modal: false` opens without a backdrop, leaves the page interactive and sits in its positioned container; `flow: true` keeps it non-modal in the page layout, preserves focus, skips layer stacking, and collapses its parent row during vertical drag dismissal (used by `announcement`); `rail: true` keeps it open non-modal and widens it while a mouse hovers or keyboard focus is inside (or `state.active` is set) from `--width-closed` to `--max-width`, clipping rows rather than reflowing them. Motion: `overlay--fade`, `overlay--scale`, `overlay--spring`, `overlay--alert`, `overlay--blur` |
118
116
  | `breadcrumb` | Path trail that folds middle segments into a `tooltip.menu` as space runs out, the rest sliding over as each one closes; `onnavigate` intercepts links; `separator: 'chevron' \| 'slash'` (default `'slash'`) |
119
- | `shell` | App frame `shell({ left, right }, content)`: a sidebar on either edge (`Side`: `id`, `label`, `state.active`, optional `content`, `class` and `hover` to peek while the pointer rests on its edge), each with a mirrored `button.sidebar` toggle in its top corner, around a root-surface `card` the page scrolls in. A closed side's edge holds a handle that follows the pointer; dragging from the edge opens the sidebar and dragging a sidebar toward its edge closes it. Below 1024px one sidebar opens at a time; `shell.close(side)` closes one, returning focus to its toggle. `--gap-horizontal` / `--gap-vertical` inset the card from the window, `--space` sizes an open sidebar, `--slide-duration` / `--slide-easing` time the motion |
120
117
 
121
118
  ### Utility
122
119
  | Component | Description |
package/RULES.md CHANGED
@@ -13,7 +13,7 @@ src/components/{component}/
13
13
  └── scss/
14
14
  ├── index.scss logic, rules, structure
15
15
  ├── variables.scss css variables only
16
- └── _{partial}.scss optional partials when index.scss grows too large (see tooltip)
16
+ └── _{partial}.scss optional partials when index.scss grows too large (see editor/code)
17
17
  ```
18
18
 
19
19
  - SCSS always lives in `{component}/scss/`; CSS-only components may have nothing but `scss/`.
@@ -39,10 +39,14 @@ src/components/{component}/
39
39
 
40
40
  ## index.scss vs variables.scss
41
41
 
42
- - `index.scss` holds the logic: layout, properties, selectors, transitions, keyframes. Values come from `var(--*)`, not literals.
42
+ - `index.scss` holds the logic: layout, properties, selectors, transitions, keyframes. Tunable values come from `var(--*)`, not literals.
43
43
  - `variables.scss` holds only css variables (plus themed `%placeholder` extends such as `%background-primary`). They act as
44
44
  arguments: every tunable value is a variable so variants and consumers can finely control the component without
45
45
  touching the logic.
46
+ - A value is tunable when a variant overrides it or a consumer plausibly would: sizes, spacing, colours, radii,
47
+ durations, easings. Structural constants stay literal in `index.scss`: `0`, `1`, `100%`, `none`, `grid-area: 1 / 1`,
48
+ a local `z-index`, a 1px press offset, keyframe steps. A variable nothing overrides and no consumer would reach for
49
+ is bloat; every declared variable costs bytes and style recalculation on each element that carries it.
46
50
  - `index.scss` `@use`s `variables`; both `@use '/tokens'` and any `css-utilities/*` they need, alphabetically.
47
51
  - Variants (`&--primary`, `&--kbd`, ...) should mostly be variable overrides in `variables.scss`; only add rules to
48
52
  `index.scss` when the structure actually changes.
@@ -66,18 +70,39 @@ src/components/{component}/
66
70
  - Timing is always a pair: `--transition-duration` + `--transition-timing-function` (likewise `--{name}-duration` /
67
71
  `--{name}-timing-function` for animations, e.g. `--shake-duration`).
68
72
  - Prefer tokens (`--size-*`, `--border-radius-*`, `--font-size-*`, `--color-*`) over raw values.
69
- - Reduced motion is handled by zeroing durations or removing transitions/animations under
70
- `@media (prefers-reduced-motion: reduce)`.
73
+ - Reduced motion is handled under `@media (prefers-reduced-motion: reduce)`. Default: zero the duration variable in
74
+ `variables.scss` (`--spin-duration: 0s`), which leaves the logic alone. Use `transition: none` / `animation: none` in
75
+ `index.scss` only when zeroing isn't equivalent: the resting value has to change too (a drawn icon's
76
+ `stroke-dashoffset: 0`), the motion has no duration variable of its own, children inherit the variable and would
77
+ lose their own easing (`.button-face` and its icons), a state or consumer sets the duration at higher specificity,
78
+ a delay would outlive the zeroed duration, or script waits on an `animationend` that a 0s animation would fire.
79
+ - Scripts hand measurements and state to CSS as custom properties (`--place-x`, `--morph-top`, `--shared-width`), never
80
+ as inline style properties. Prefix them with the feature that writes them, read them only in SCSS, and give each a
81
+ default in `variables.scss` or a `var()` fallback unless the element only exists, or the rule reading it only
82
+ matches, once the script has written it.
83
+ - Custom properties inherit. One written every frame or pointer move on an element with a large subtree restyles
84
+ the whole subtree: register it with `@property { inherits: false }` (at the top of `index.scss`), or keep the
85
+ inline property on that hot path (the code editor's scroll offsets) and say why.
86
+ - Inline properties also stay where they must outrank styles the component doesn't own: a consumer's element, or
87
+ arbitrary consumer items mid-animation (`filter`'s leaving items).
88
+ - A script-written name consumers may already set or read keeps its name, prefixed or not.
71
89
 
72
90
 
73
91
  ## Naming (BEM-like)
74
92
 
75
93
  - Block: `.button`
76
94
  - Modifier: `.button--kbd`, `.button--processing` (double dash)
77
- - Element: `.button-face`, `.button-split-chevron` (single dash, not `__`)
95
+ - Element: `.button-face`, `.button-split-trigger` (single dash, not `__`)
78
96
  - Element modifier: `.button-face--error`, `.button-icon--draw`
79
97
  - Modifier element/sub-state: `.button--morph-error`, `.button--sidebar-right`
80
- - States use the `tokens.state(...)` mixin (`--active`, `pressed`, ...), not hand-written state classes.
98
+ - States are the `.--active`, `.--disabled`, `.--hover`, `.--pressed` classes, matched through `tokens.state(...)`:
99
+ `@include tokens.state(active pressed) { ... }` on the element carrying the state, or the function form
100
+ `#{tokens.state(active, '.tooltip')} > &` when another element carries it. `hover`, `pressed` and `default` exclude
101
+ `.--active`, and `pressed` also matches `:active`, so the mixin is not interchangeable with the bare class.
102
+ - Hand-write the state class (`&--reveal.--active > &-reveal`, `&.--placed`) where the mixin can't produce the selector
103
+ that's needed: a state combined with a modifier and a child, a selector list mixing states with other conditions,
104
+ a state the map doesn't define, or where the mixin's exclusions would change the result. Don't rewrite a working
105
+ hand-written state selector into the mixin unless the compiled selector is the same.
81
106
  - Always build names with `&--` / `&-` nesting rather than repeating the block name.
82
107
  - Nested/chained selectors are fine when composing components or winning specificity regardless of load order
83
108
  (`& > &-menu > &-trigger`, `&-kbd-icon.icon`, `> .tooltip-menu-layer > .tooltip-menu-panel`). Use `:where()` for
@@ -98,11 +123,24 @@ Alphabetize everything: `@use` statements, selectors, properties, variables, tra
98
123
 
99
124
  Within a block, in this order. Two blank lines separate each group; one blank line separates rules within a group:
100
125
 
101
- 1. `@extend`s, then variables (`--*`), then properties — each alphabetical
126
+ 1. `@extend`s, then variables (`--*`), then properties — each alphabetical. Sass `$variables` the block's selectors
127
+ need follow the properties as their own group.
102
128
  2. Pseudo elements (`&::after`), nested `:where()` / descendant rules, `@media` for the block itself
103
129
  3. Modifiers `&--*`, alphabetical
104
130
  4. Elements `&-*`, alphabetical
105
- 5. State / relational selectors (`&:has(...)`, `&:not(...)`) and descendant selectors (`.button-check`, `svg`)
131
+ 5. State / relational selectors (`&:has(...)`, `&:not(...)`, `&[aria-*]`, `&.--placed`), `@include tokens.state(...)`,
132
+ and descendant selectors (`.button-check`, `svg`)
133
+
134
+ - A selector list sorts by its first selector (`&--kbd, &--tactile` sorts as `&--kbd`), ahead of the single rule of the
135
+ same name. An `@each` sits where the selectors it generates would, and a cluster of related rules (one per
136
+ direction, an element and its qualified forms such as `&-toolbar.tooltip-content` then
137
+ `&-toolbar--instant.tooltip-content`) stays together at its first selector's position.
138
+ - `@media (hover: hover) { &:hover { ... } }` is a state (group 5), not an `@media` for the block.
139
+ - The cascade outranks the alphabet. When two rules of equal specificity set the same property and the result depends
140
+ on which comes later, keep the working order and say so in a comment on the rule that has to stay put. Never reorder
141
+ such a pair to satisfy this section.
142
+ - `scripts/sort-scss.mjs` sorts by raw selector text and knows neither these groups nor the cascade exception. Don't
143
+ run `--write` on components until it does.
106
144
 
107
145
 
108
146
  ## SCSS style
@@ -112,9 +150,39 @@ Within a block, in this order. Two blank lines separate each group; one blank li
112
150
  - Reuse `css-utilities` placeholders via `@extend` (`%absolute-center`, `%hidden-visually`, `%icon-stroke`, ...) instead
113
151
  of rewriting their rules.
114
152
  - Use `@each` loops for symmetric variants (`left`/`right`) instead of duplicating rules.
153
+ - When every entry of a transition shares one duration and easing, write the longhands instead of repeating the pair
154
+ per property:
155
+ ```scss
156
+ transition-duration: var(--transition-duration);
157
+ transition-property: background, border-color, box-shadow, color;
158
+ transition-timing-function: var(--transition-timing-function);
159
+ ```
160
+ Keep the `transition:` list when entries differ in duration, easing or delay (`card--morph`), or when another rule
161
+ sets `transition` on the same element (a state, variant, reduced-motion override or an extended placeholder such as
162
+ `%text` on `.button`), since mixing shorthand and longhands changes what each one resets. A single-entry transition
163
+ stays a shorthand; there is nothing to factor out.
164
+ - Vendor prefixes belong to autoprefixer. Write one by hand only when the property has no standard form
165
+ (`-webkit-touch-callout`, `-webkit-font-smoothing`).
115
166
  - Comments only for a non-obvious why (specificity tricks, timing choices, math); never restate the code.
116
167
 
117
168
 
169
+ ## Performance
170
+
171
+ - Animate `opacity`, `translate`, `scale`, `rotate`, `filter` and `clip-path`. Transitioning a layout property (`width`,
172
+ `height`, `padding`, `grid-template-columns`, `inset`) reflows every frame; do it only when the box really has to
173
+ resize, and say why in a comment.
174
+ - Use the individual `translate` / `scale` / `rotate` properties rather than `transform`, so states and variants compose
175
+ without restating each other's functions. `transform` is for what they can't express (`transform-box`, a matrix, a
176
+ centring offset that must stay out of `translate`'s way).
177
+ - Anchor `:has()` with a combinator and a class (`.group:has(> .button--action)`), never a bare descendant search on a
178
+ large container. A small leaf block may search its own few descendants (`.checkbox:has(input:checked)`), and must
179
+ when consumers write or place that markup themselves. Avoid `*` outside a tightly scoped rule.
180
+ - In TS, read layout before writing it: take every measurement first, then write the variables, so one interaction costs
181
+ one reflow. Observe with `ResizeObserver` / `IntersectionObserver` rather than polling or listening to `scroll` /
182
+ `resize`.
183
+ - No `will-change` left on at rest; set it for the duration of the motion or not at all.
184
+
185
+
118
186
  ## Touching existing code
119
187
 
120
188
  Every file you open is held to the rules above, not just the lines you came for. Apply these in the same change; the
@@ -138,8 +206,11 @@ result must behave identically, and the gate (`tsc --noEmit`, build) must stay c
138
206
  `padding` math in `index.scss` and a partial), pick the one that fits these rules and delete the other. One mechanism
139
207
  per concern. Variants express their differences as variable overrides in `variables.scss`, not as a second copy of
140
208
  the logic.
209
+ - The same holds across components. A rule written identically in three or more components (a focus ring, the
210
+ padding-minus-border math) becomes a `css-utilities` placeholder that each of them `@extend`s; two is not yet a
211
+ pattern.
141
212
  - Remove dead code. Before finishing, grep the component (and its consumers) for every selector, `--variable`,
142
213
  `%placeholder`, keyframe, mixin and exported TS member the file declares; anything with no reader is deleted.
143
214
  Variables declared in `variables.scss` but never read in `index.scss` or a partial, selectors no template renders,
144
- keyframes no `animation` references, and leftover vendor prefixes (autoprefixer owns prefixes) all count.
215
+ keyframes no `animation` references, and vendor prefixes that have a standard form (autoprefixer owns those) all count.
145
216
  - Do not leave both the old and new approach in place "for safety". A superseded rule is removed in the same change.