@esportsplus/ui 0.57.0 → 0.58.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 (490) hide show
  1. package/README.md +123 -39
  2. package/build/components/accordion/group.d.ts +14 -0
  3. package/build/components/accordion/group.js +21 -0
  4. package/build/components/accordion/index.d.ts +9 -0
  5. package/build/components/accordion/index.js +20 -3
  6. package/build/components/accordion/scss/index.scss +1 -1
  7. package/build/components/announcement/scss/index.scss +1 -1
  8. package/build/components/breadcrumb/scss/index.scss +1 -1
  9. package/build/components/button/scss/index.scss +1 -1
  10. package/build/components/button/sidebar.d.ts +3 -0
  11. package/build/components/button/sidebar.js +40 -10
  12. package/build/components/capslock/index.js +1 -1
  13. package/build/components/capslock/scss/index.scss +1 -1
  14. package/build/components/card/scss/index.scss +1 -1
  15. package/build/components/cc/scss/index.scss +1 -1
  16. package/build/components/chat-minimap/scss/index.scss +1 -1
  17. package/build/components/checkbox/scss/index.scss +1 -1
  18. package/build/components/color-picker/index.d.ts +1 -0
  19. package/build/components/color-picker/index.js +166 -136
  20. package/build/components/color-picker/scss/index.scss +1 -1
  21. package/build/components/command/index.d.ts +0 -1
  22. package/build/components/command/index.js +3 -2
  23. package/build/components/command/scss/index.scss +1 -1
  24. package/build/components/copy/scss/index.scss +1 -1
  25. package/build/components/counter/scss/index.scss +1 -1
  26. package/build/components/datalist/index.js +3 -3
  27. package/build/components/datalist/scss/index.scss +1 -1
  28. package/build/components/dock/scss/index.scss +1 -1
  29. package/build/components/editor/code/index.d.ts +0 -1
  30. package/build/components/editor/code/index.js +0 -1
  31. package/build/components/editor/code/minimap.d.ts +2 -1
  32. package/build/components/editor/code/minimap.js +5 -2
  33. package/build/components/editor/code/view.d.ts +3 -1
  34. package/build/components/editor/code/view.js +37 -26
  35. package/build/components/editor/diffs/index.d.ts +0 -1
  36. package/build/components/editor/diffs/index.js +0 -1
  37. package/build/components/editor/diffs/merge.js +7 -3
  38. package/build/components/editor/diffs/view.js +3 -1
  39. package/build/components/editor/index.d.ts +4 -1
  40. package/build/components/editor/index.js +2 -1
  41. package/build/components/editor/markdown/editing.js +22 -3
  42. package/build/components/editor/markdown/erase.d.ts +9 -0
  43. package/build/components/editor/markdown/erase.js +78 -0
  44. package/build/components/editor/markdown/index.d.ts +0 -1
  45. package/build/components/editor/markdown/index.js +0 -1
  46. package/build/components/editor/markdown/layout.d.ts +2 -9
  47. package/build/components/editor/markdown/layout.js +2 -7
  48. package/build/components/editor/markdown/render.d.ts +0 -1
  49. package/build/components/editor/markdown/render.js +287 -235
  50. package/build/components/editor/markdown/view.js +566 -667
  51. package/build/components/editor/viewer/index.d.ts +27 -0
  52. package/build/components/editor/viewer/index.js +250 -0
  53. package/build/components/editor/viewer/model.d.ts +15 -0
  54. package/build/components/editor/viewer/model.js +73 -0
  55. package/build/components/editor/workspace/index.d.ts +6 -2
  56. package/build/components/editor/workspace/index.js +243 -137
  57. package/build/components/editor/workspace/keybindings.d.ts +37 -0
  58. package/build/components/editor/workspace/keybindings.js +288 -0
  59. package/build/components/editor/workspace/model.d.ts +55 -2
  60. package/build/components/editor/workspace/model.js +141 -3
  61. package/build/components/editor/workspace/navigate.d.ts +19 -0
  62. package/build/components/editor/workspace/navigate.js +118 -0
  63. package/build/components/editor/workspace/session.d.ts +29 -0
  64. package/build/components/editor/workspace/session.js +373 -0
  65. package/build/components/editor/workspace/shortcuts.d.ts +19 -0
  66. package/build/components/editor/workspace/shortcuts.js +185 -0
  67. package/build/components/editor/workspace/status.d.ts +34 -0
  68. package/build/components/editor/workspace/status.js +193 -0
  69. package/build/components/editor/workspace/statusbar.d.ts +15 -0
  70. package/build/components/editor/workspace/statusbar.js +190 -0
  71. package/build/components/editor/workspace/strip.d.ts +27 -0
  72. package/build/components/editor/workspace/strip.js +239 -0
  73. package/build/components/editor/workspace/tabs.d.ts +15 -0
  74. package/build/components/editor/workspace/tabs.js +63 -0
  75. package/build/components/error/index.js +1 -1
  76. package/build/components/error/scss/index.scss +1 -1
  77. package/build/components/filter/index.js +5 -3
  78. package/build/components/filter/scss/index.scss +1 -1
  79. package/build/components/frame/scss/index.scss +1 -1
  80. package/build/components/heatmap/index.js +3 -3
  81. package/build/components/heatmap/scss/index.scss +1 -1
  82. package/build/components/highlight/scss/index.scss +1 -1
  83. package/build/components/icon/scss/index.scss +1 -1
  84. package/build/components/image/scss/index.scss +1 -1
  85. package/build/components/index.d.ts +2 -0
  86. package/build/components/index.js +2 -0
  87. package/build/components/inline-edit/scss/index.scss +1 -1
  88. package/build/components/input/scss/index.scss +1 -1
  89. package/build/components/link/scss/index.scss +1 -1
  90. package/build/components/loading/scss/index.scss +1 -1
  91. package/build/components/marquee/scss/index.scss +1 -1
  92. package/build/components/metric/scss/index.scss +1 -1
  93. package/build/components/nav/index.d.ts +1 -1
  94. package/build/components/nav/scss/index.scss +1 -1
  95. package/build/components/nav/tree.d.ts +3 -1
  96. package/build/components/nav/tree.js +30 -60
  97. package/build/components/notification/scss/index.scss +1 -1
  98. package/build/components/overlay/scss/index.scss +1 -1
  99. package/build/components/page/scss/index.scss +1 -1
  100. package/build/components/pagination/arrows.d.ts +15 -0
  101. package/build/components/pagination/arrows.js +65 -0
  102. package/build/components/pagination/cards.d.ts +23 -0
  103. package/build/components/pagination/cards.js +66 -0
  104. package/build/components/pagination/index.d.ts +5 -0
  105. package/build/components/pagination/index.js +3 -1
  106. package/build/components/pagination/scss/index.scss +1 -1
  107. package/build/components/progress/scss/index.scss +1 -1
  108. package/build/components/pull-to-refresh/scss/index.scss +1 -1
  109. package/build/components/range/index.js +1 -1
  110. package/build/components/range/scss/index.scss +1 -1
  111. package/build/components/relative-time/scss/index.scss +1 -1
  112. package/build/components/root/scss/index.scss +1 -1
  113. package/build/components/section/scss/index.scss +2 -0
  114. package/build/components/select/index.d.ts +1 -0
  115. package/build/components/select/index.js +16 -11
  116. package/build/components/select/scss/index.scss +1 -1
  117. package/build/components/shortcut-recorder/scss/index.scss +1 -1
  118. package/build/components/sortable/scss/index.scss +1 -1
  119. package/build/components/sticky-header/index.js +3 -3
  120. package/build/components/sticky-header/scss/index.scss +1 -1
  121. package/build/components/story/scss/index.scss +1 -1
  122. package/build/components/surface-field/scss/index.scss +1 -1
  123. package/build/components/tasklist/scss/index.scss +1 -1
  124. package/build/components/text/scss/index.scss +1 -1
  125. package/build/components/textarea/scss/index.scss +1 -1
  126. package/build/{css-utilities → components}/theme/index.d.ts +1 -1
  127. package/build/{css-utilities → components}/theme/index.js +15 -5
  128. package/build/components/theme/scss/index.scss +2 -0
  129. package/build/components/theme-picker/index.d.ts +52 -0
  130. package/build/components/theme-picker/index.js +167 -0
  131. package/build/components/theme-picker/scss/index.scss +2 -0
  132. package/build/components/toast/index.js +3 -5
  133. package/build/components/toast/scss/index.scss +1 -1
  134. package/build/components/tooltip/menu.js +3 -1
  135. package/build/components/tooltip/scss/index.scss +1 -1
  136. package/build/components/typewriter/scss/index.scss +1 -1
  137. package/build/components/uptime/scss/index.scss +1 -1
  138. package/build/components/usage-meter/scss/index.scss +1 -1
  139. package/build/{css-utilities → modifiers}/glass/index.d.ts +2 -2
  140. package/build/modifiers/glass/index.js +28 -0
  141. package/build/modifiers/glass/scss/index.scss +2 -0
  142. package/build/{css-utilities → modifiers}/index.d.ts +0 -1
  143. package/build/{css-utilities → modifiers}/index.js +0 -1
  144. package/build/modifiers/scrollbar/index.d.ts +72 -0
  145. package/build/{css-utilities → modifiers}/scrollbar/index.js +52 -19
  146. package/build/modifiers/scrollbar/scss/index.scss +2 -0
  147. package/build/normalize/scss/index.scss +1 -2
  148. package/layer.scss +1 -1
  149. package/package.json +11 -18
  150. package/scripts/code-editor-markdown.test.mjs +45 -14
  151. package/scripts/code-viewer.test.mjs +69 -0
  152. package/scripts/workspace-keybindings.test.mjs +273 -0
  153. package/scripts/workspace-session.test.mjs +349 -0
  154. package/scripts/workspace-status.test.mjs +229 -0
  155. package/scripts/workspace-tabs.test.mjs +142 -0
  156. package/src/components/accordion/group.ts +39 -0
  157. package/src/components/accordion/index.ts +32 -6
  158. package/src/components/accordion/scss/index.scss +12 -21
  159. package/src/components/accordion/scss/variables.scss +18 -3
  160. package/src/components/announcement/scss/index.scss +4 -4
  161. package/src/components/announcement/scss/variables.scss +6 -6
  162. package/src/components/banner/scss/index.scss +1 -1
  163. package/src/components/breadcrumb/scss/index.scss +35 -50
  164. package/src/components/breadcrumb/scss/variables.scss +23 -31
  165. package/src/components/button/scss/_fan.scss +39 -43
  166. package/src/components/button/scss/_morph.scss +66 -78
  167. package/src/components/button/scss/_sidebar.scss +41 -30
  168. package/src/components/button/scss/_split.scss +9 -9
  169. package/src/components/button/scss/index.scss +23 -19
  170. package/src/components/button/scss/variables.scss +94 -90
  171. package/src/components/button/sidebar.ts +36 -24
  172. package/src/components/capslock/index.ts +2 -2
  173. package/src/components/capslock/scss/index.scss +11 -6
  174. package/src/components/capslock/scss/variables.scss +3 -5
  175. package/src/components/card/scss/_expand.scss +58 -64
  176. package/src/components/card/scss/index.scss +40 -21
  177. package/src/components/card/scss/variables.scss +40 -31
  178. package/src/components/cc/scss/index.scss +68 -68
  179. package/src/components/cc/scss/variables.scss +13 -14
  180. package/src/components/chat-minimap/scss/index.scss +24 -16
  181. package/src/components/chat-minimap/scss/variables.scss +37 -37
  182. package/src/components/checkbox/scss/index.scss +54 -52
  183. package/src/components/checkbox/scss/variables.scss +37 -39
  184. package/src/components/color-picker/index.ts +157 -120
  185. package/src/components/color-picker/scss/index.scss +159 -96
  186. package/src/components/color-picker/scss/variables.scss +33 -15
  187. package/src/components/command/index.ts +3 -2
  188. package/src/components/command/scss/index.scss +10 -14
  189. package/src/components/command/scss/variables.scss +12 -35
  190. package/src/components/copy/scss/index.scss +6 -6
  191. package/src/components/copy/scss/variables.scss +12 -15
  192. package/src/components/counter/scss/index.scss +14 -14
  193. package/src/components/counter/scss/variables.scss +1 -1
  194. package/src/components/datalist/index.ts +3 -3
  195. package/src/components/datalist/scss/index.scss +7 -6
  196. package/src/components/datalist/scss/variables.scss +7 -3
  197. package/src/components/dock/scss/index.scss +10 -15
  198. package/src/components/dock/scss/variables.scss +29 -25
  199. package/src/components/editor/code/index.ts +0 -1
  200. package/src/components/editor/code/minimap.ts +13 -5
  201. package/src/components/editor/code/scss/_editor.scss +83 -81
  202. package/src/components/editor/code/scss/_features.scss +106 -97
  203. package/src/components/editor/code/scss/_services.scss +27 -25
  204. package/src/components/editor/code/scss/index.scss +0 -1
  205. package/src/components/editor/code/scss/variables.scss +30 -26
  206. package/src/components/editor/code/view.ts +14 -5
  207. package/src/components/editor/diffs/index.ts +0 -1
  208. package/src/components/editor/diffs/merge.ts +2 -1
  209. package/src/components/editor/diffs/scss/_diffs.scss +67 -57
  210. package/src/components/editor/diffs/scss/_merge.scss +17 -14
  211. package/src/components/editor/diffs/scss/index.scss +0 -1
  212. package/src/components/editor/diffs/scss/variables.scss +25 -18
  213. package/src/components/editor/diffs/view.ts +2 -1
  214. package/src/components/editor/index.ts +7 -1
  215. package/src/components/editor/markdown/editing.ts +38 -3
  216. package/src/components/editor/markdown/erase.ts +124 -0
  217. package/src/components/editor/markdown/index.ts +0 -1
  218. package/src/components/editor/markdown/layout.ts +3 -12
  219. package/src/components/editor/markdown/render.ts +65 -37
  220. package/src/components/editor/markdown/scss/index.scss +92 -124
  221. package/src/components/editor/markdown/scss/variables.scss +39 -19
  222. package/src/components/editor/markdown/view.ts +737 -786
  223. package/src/components/editor/tree/scss/index.scss +121 -110
  224. package/src/components/editor/tree/scss/variables.scss +48 -54
  225. package/src/components/editor/viewer/index.ts +321 -0
  226. package/src/components/editor/viewer/model.ts +130 -0
  227. package/src/components/editor/viewer/scss/_viewer.scss +302 -0
  228. package/src/components/editor/viewer/scss/index.scss +2 -0
  229. package/src/components/editor/viewer/scss/variables.scss +69 -0
  230. package/src/components/editor/workspace/index.ts +159 -31
  231. package/src/components/editor/workspace/keybindings.ts +447 -0
  232. package/src/components/editor/workspace/model.ts +233 -3
  233. package/src/components/editor/workspace/navigate.ts +194 -0
  234. package/src/components/editor/workspace/scss/index.scss +72 -59
  235. package/src/components/editor/workspace/scss/keybindings.scss +190 -0
  236. package/src/components/editor/workspace/scss/status.scss +122 -0
  237. package/src/components/editor/workspace/scss/tabs.scss +56 -0
  238. package/src/components/editor/workspace/session.ts +551 -0
  239. package/src/components/editor/workspace/shortcuts.ts +255 -0
  240. package/src/components/editor/workspace/status.ts +259 -0
  241. package/src/components/editor/workspace/statusbar.ts +255 -0
  242. package/src/components/editor/workspace/strip.ts +273 -0
  243. package/src/components/editor/workspace/tabs.ts +106 -0
  244. package/src/components/error/index.ts +1 -1
  245. package/src/components/error/scss/index.scss +19 -19
  246. package/src/components/error/scss/variables.scss +2 -2
  247. package/src/components/filter/index.ts +7 -2
  248. package/src/components/filter/scss/index.scss +1 -1
  249. package/src/components/filter/scss/variables.scss +11 -10
  250. package/src/components/frame/scss/index.scss +12 -12
  251. package/src/components/frame/scss/variables.scss +8 -8
  252. package/src/components/heatmap/index.ts +3 -3
  253. package/src/components/heatmap/scss/index.scss +28 -26
  254. package/src/components/heatmap/scss/variables.scss +18 -17
  255. package/src/components/highlight/scss/index.scss +17 -13
  256. package/src/components/highlight/scss/variables.scss +8 -10
  257. package/src/components/icon/scss/index.scss +10 -0
  258. package/src/components/icon/scss/variables.scss +5 -0
  259. package/src/components/image/scss/index.scss +9 -9
  260. package/src/components/image/scss/variables.scss +7 -2
  261. package/src/components/index.ts +2 -0
  262. package/src/components/inline-edit/scss/index.scss +99 -104
  263. package/src/components/inline-edit/scss/variables.scss +40 -39
  264. package/src/components/input/scss/_field.scss +6 -20
  265. package/src/components/input/scss/_scrub.scss +10 -8
  266. package/src/components/input/scss/_tag.scss +35 -37
  267. package/src/components/input/scss/variables.scss +100 -99
  268. package/src/components/link/scss/index.scss +4 -1
  269. package/src/components/loading/scss/index.scss +1 -1
  270. package/src/components/loading/scss/variables.scss +1 -1
  271. package/src/components/marquee/scss/index.scss +9 -5
  272. package/src/components/marquee/scss/variables.scss +3 -1
  273. package/src/components/metric/scss/_flash.scss +3 -1
  274. package/src/components/metric/scss/index.scss +8 -6
  275. package/src/components/metric/scss/variables.scss +26 -20
  276. package/src/components/nav/index.ts +1 -1
  277. package/src/components/nav/scss/index.scss +12 -40
  278. package/src/components/nav/scss/variables.scss +30 -11
  279. package/src/components/nav/tree.ts +19 -62
  280. package/src/components/notification/scss/index.scss +7 -7
  281. package/src/components/notification/scss/variables.scss +7 -9
  282. package/src/components/overlay/scss/index.scss +181 -170
  283. package/src/components/overlay/scss/variables.scss +26 -57
  284. package/src/components/page/scss/index.scss +12 -11
  285. package/src/components/page/scss/variables.scss +5 -0
  286. package/src/components/pagination/arrows.ts +58 -0
  287. package/src/components/pagination/cards.ts +57 -0
  288. package/src/components/pagination/index.ts +4 -1
  289. package/src/components/pagination/scss/_arrows.scss +69 -0
  290. package/src/components/pagination/scss/_cards.scss +121 -0
  291. package/src/components/pagination/scss/_dots.scss +2 -5
  292. package/src/components/pagination/scss/index.scss +8 -6
  293. package/src/components/pagination/scss/variables.scss +87 -37
  294. package/src/components/progress/scss/_text.scss +21 -18
  295. package/src/components/progress/scss/index.scss +1 -1
  296. package/src/components/progress/scss/variables.scss +12 -12
  297. package/src/components/pull-to-refresh/scss/index.scss +2 -1
  298. package/src/components/pull-to-refresh/scss/variables.scss +11 -6
  299. package/src/components/range/index.ts +1 -1
  300. package/src/components/range/scss/_filter.scss +62 -51
  301. package/src/components/range/scss/_slider.scss +78 -75
  302. package/src/components/range/scss/_vertical.scss +6 -6
  303. package/src/components/range/scss/index.scss +3 -2
  304. package/src/components/range/scss/variables.scss +26 -23
  305. package/src/components/relative-time/scss/index.scss +27 -27
  306. package/src/components/relative-time/scss/variables.scss +10 -12
  307. package/src/components/root/scss/index.scss +71 -43
  308. package/src/components/root/scss/variables.scss +35 -31
  309. package/src/components/section/scss/index.scss +31 -0
  310. package/src/components/section/scss/variables.scss +21 -0
  311. package/src/components/select/index.ts +11 -6
  312. package/src/components/select/scss/index.scss +21 -32
  313. package/src/components/select/scss/variables.scss +25 -18
  314. package/src/components/shortcut-recorder/scss/index.scss +13 -12
  315. package/src/components/shortcut-recorder/scss/variables.scss +12 -13
  316. package/src/components/sortable/scss/index.scss +47 -44
  317. package/src/components/sortable/scss/variables.scss +4 -5
  318. package/src/components/sticky-header/index.ts +4 -4
  319. package/src/components/sticky-header/scss/index.scss +14 -13
  320. package/src/components/sticky-header/scss/variables.scss +9 -9
  321. package/src/components/story/scss/index.scss +26 -30
  322. package/src/components/story/scss/variables.scss +16 -9
  323. package/src/components/surface-field/scss/index.scss +45 -40
  324. package/src/components/surface-field/scss/variables.scss +5 -6
  325. package/src/components/tasklist/scss/index.scss +19 -19
  326. package/src/components/tasklist/scss/variables.scss +26 -29
  327. package/src/components/text/scss/index.scss +2 -1
  328. package/src/components/textarea/scss/variables.scss +1 -1
  329. package/src/{css-utilities → components}/theme/index.ts +17 -3
  330. package/src/components/theme/scss/index.scss +1 -0
  331. package/src/components/theme/scss/variables.scss +78 -0
  332. package/src/components/theme-picker/index.ts +231 -0
  333. package/src/components/theme-picker/scss/index.scss +264 -0
  334. package/src/components/toast/index.ts +28 -30
  335. package/src/components/toast/scss/index.scss +87 -87
  336. package/src/components/toast/scss/variables.scss +39 -39
  337. package/src/components/tooltip/menu.ts +4 -1
  338. package/src/components/tooltip/scss/_east.scss +10 -10
  339. package/src/components/tooltip/scss/_menu.scss +284 -269
  340. package/src/components/tooltip/scss/_north.scss +10 -10
  341. package/src/components/tooltip/scss/_shared.scss +7 -7
  342. package/src/components/tooltip/scss/_south.scss +10 -10
  343. package/src/components/tooltip/scss/_west.scss +10 -10
  344. package/src/components/tooltip/scss/index.scss +21 -20
  345. package/src/components/tooltip/scss/variables.scss +104 -96
  346. package/src/components/typewriter/scss/_retype.scss +12 -11
  347. package/src/components/typewriter/scss/_rotate.scss +2 -1
  348. package/src/components/typewriter/scss/variables.scss +41 -39
  349. package/src/components/uptime/scss/index.scss +15 -15
  350. package/src/components/uptime/scss/variables.scss +8 -8
  351. package/src/components/usage-meter/scss/index.scss +3 -1
  352. package/src/components/usage-meter/scss/variables.scss +5 -5
  353. package/src/css-utilities/absolute.scss +64 -0
  354. package/src/css-utilities/background.scss +43 -0
  355. package/src/css-utilities/border.scss +45 -0
  356. package/src/css-utilities/box-shadow.scss +29 -0
  357. package/src/css-utilities/color.scss +41 -0
  358. package/src/css-utilities/flex.scss +64 -0
  359. package/src/css-utilities/font/geist/{scss/index.scss → index.scss} +12 -4
  360. package/src/css-utilities/font/montserrat/Montserrat-Italic-Variable.woff2 +0 -0
  361. package/src/css-utilities/font/montserrat/Montserrat-Variable.woff2 +0 -0
  362. package/src/css-utilities/font/montserrat/OFL.txt +93 -0
  363. package/src/css-utilities/font/montserrat/index.scss +38 -0
  364. package/src/{shared/scss → css-utilities}/icon.scss +1 -1
  365. package/src/css-utilities/{inline/scss/index.scss → inline.scss} +1 -1
  366. package/src/css-utilities/{skeleton/scss/index.scss → skeleton.scss} +11 -11
  367. package/src/css-utilities/surface.scss +266 -0
  368. package/src/css-utilities/text.scss +191 -0
  369. package/src/modifiers/glass/index.ts +44 -0
  370. package/src/{css-utilities → modifiers}/glass/scss/index.scss +6 -6
  371. package/src/{css-utilities → modifiers}/glass/scss/variables.scss +1 -1
  372. package/src/{css-utilities → modifiers}/index.ts +0 -1
  373. package/src/{css-utilities → modifiers}/scrollbar/index.ts +92 -17
  374. package/src/{css-utilities → modifiers}/scrollbar/scss/index.scss +178 -177
  375. package/src/{css-utilities → modifiers}/scrollbar/scss/variables.scss +28 -21
  376. package/src/normalize/scss/index.scss +4 -2
  377. package/src/shared/scss/color-weights.scss +19 -0
  378. package/src/shared/scss/index.scss +1 -12
  379. package/src/tokens/scss/blur.scss +5 -0
  380. package/src/tokens/scss/color.scss +74 -50
  381. package/src/tokens/scss/index.scss +1 -2
  382. package/src/tokens/scss/size.scss +0 -2
  383. package/src/tokens/scss/state.scss +3 -2
  384. package/src/tokens/scss/transition.scss +19 -2
  385. package/storage/svg/monitor.svg +1 -0
  386. package/storage/svg/moon.svg +1 -0
  387. package/storage/svg/pin.svg +1 -0
  388. package/storage/svg/sun.svg +1 -0
  389. package/vite.config.ts +33 -8
  390. package/build/css-utilities/background/scss/index.scss +0 -2
  391. package/build/css-utilities/border/scss/index.scss +0 -2
  392. package/build/css-utilities/color/scss/index.scss +0 -2
  393. package/build/css-utilities/flex/scss/index.scss +0 -2
  394. package/build/css-utilities/font/geist/index.d.ts +0 -1
  395. package/build/css-utilities/font/geist/index.js +0 -1
  396. package/build/css-utilities/font/geist/scss/index.scss +0 -2
  397. package/build/css-utilities/font/montserrat/index.d.ts +0 -1
  398. package/build/css-utilities/font/montserrat/index.js +0 -1
  399. package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
  400. package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
  401. package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
  402. package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
  403. package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
  404. package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
  405. package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
  406. package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
  407. package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
  408. package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
  409. package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
  410. package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
  411. package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
  412. package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
  413. package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
  414. package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
  415. package/build/css-utilities/font/montserrat/scss/index.scss +0 -2
  416. package/build/css-utilities/glass/index.js +0 -26
  417. package/build/css-utilities/glass/scss/index.scss +0 -2
  418. package/build/css-utilities/index.scss +0 -2
  419. package/build/css-utilities/inline/scss/index.scss +0 -2
  420. package/build/css-utilities/scrollbar/index.d.ts +0 -42
  421. package/build/css-utilities/scrollbar/scss/index.scss +0 -2
  422. package/build/css-utilities/skeleton/scss/index.scss +0 -2
  423. package/build/css-utilities/text/scss/index.scss +0 -2
  424. package/build/themes/dark/index.d.ts +0 -3
  425. package/build/themes/dark/index.js +0 -3
  426. package/build/themes/dark/input.d.ts +0 -3
  427. package/build/themes/dark/input.js +0 -12
  428. package/build/themes/dark/select.d.ts +0 -3
  429. package/build/themes/dark/select.js +0 -23
  430. package/build/themes/dark/textarea.d.ts +0 -2186
  431. package/build/themes/dark/textarea.js +0 -11
  432. package/src/css-utilities/background/scss/index.scss +0 -1
  433. package/src/css-utilities/background/scss/variables.scss +0 -18
  434. package/src/css-utilities/border/scss/index.scss +0 -1
  435. package/src/css-utilities/border/scss/variables.scss +0 -23
  436. package/src/css-utilities/color/scss/index.scss +0 -1
  437. package/src/css-utilities/color/scss/variables.scss +0 -17
  438. package/src/css-utilities/flex/scss/index.scss +0 -57
  439. package/src/css-utilities/flex/scss/variables.scss +0 -16
  440. package/src/css-utilities/font/geist/index.ts +0 -1
  441. package/src/css-utilities/font/montserrat/index.ts +0 -1
  442. package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
  443. package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
  444. package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
  445. package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
  446. package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
  447. package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
  448. package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
  449. package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
  450. package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
  451. package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
  452. package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
  453. package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
  454. package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
  455. package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
  456. package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
  457. package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
  458. package/src/css-utilities/font/montserrat/scss/index.scss +0 -94
  459. package/src/css-utilities/glass/index.ts +0 -42
  460. package/src/css-utilities/index.scss +0 -13
  461. package/src/css-utilities/skeleton/scss/variables.scss +0 -3
  462. package/src/css-utilities/text/scss/index.scss +0 -152
  463. package/src/css-utilities/text/scss/variables.scss +0 -22
  464. package/src/shared/scss/absolute.scss +0 -28
  465. package/src/shared/scss/background.scss +0 -21
  466. package/src/shared/scss/border.scss +0 -21
  467. package/src/shared/scss/color.scss +0 -21
  468. package/src/shared/scss/position.scss +0 -55
  469. package/src/shared/scss/text.scss +0 -31
  470. package/src/themes/dark/index.ts +0 -3
  471. package/src/themes/dark/input.ts +0 -16
  472. package/src/themes/dark/select.ts +0 -28
  473. package/src/themes/dark/textarea.ts +0 -13
  474. package/src/tokens/scss/box-shadow.scss +0 -23
  475. package/src/tokens/scss/font-family.scss +0 -5
  476. package/storage/code.md +0 -180
  477. package/storage/editor-features.md +0 -227
  478. package/build/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
  479. package/build/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
  480. package/build/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
  481. package/build/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
  482. package/src/{shared/scss → css-utilities}/anchor.scss +6 -6
  483. package/src/{shared/scss → css-utilities}/drag.scss +0 -0
  484. package/src/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
  485. package/src/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
  486. package/src/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
  487. package/src/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
  488. package/src/{shared/scss → css-utilities}/hidden.scss +11 -11
  489. /package/src/{shared/scss → css-utilities}/layer.scss +0 -0
  490. /package/src/{shared/scss → css-utilities}/reset.scss +0 -0
@@ -1,2 +1,2 @@
1
- @layer components{.dock{--background-default:var(--color-grey-400);--border-radius:999px;--border-width:0px;--box-shadow-default:0 0 0 var(--border-width-400) var(--color-border-300), var(--box-shadow-200);--hop-duration:.7s;--icon-ratio:.45;--inset:12px;--item-radius:999px;--light-color:var(--color-text-500);--light-delay:calc(var(--hop-duration) * .55);--light-size:4px;--magnify-duration:.3s;--magnify-timing-function:cubic-bezier(.23, 1, .32, 1);--padding-horizontal:calc(var(--inset) - var(--spacing) / 2);--padding-vertical:0px;--size-far:calc(var(--size-rest) + (var(--size-peak) - var(--size-rest)) / 3);--size-near:calc(var(--size-rest) + (var(--size-peak) - var(--size-rest)) * 2 / 3);--size-peak:54px;--size-rest:40px;--spacing:8px}.dock--square{--border-radius:var(--border-radius-700);--item-radius:var(--border-radius-600)}.dock-button{--background-default:var(--color-white-300);--border-radius:var(--item-radius);--box-shadow-default:0 0 0 var(--border-width-400) var(--color-border-300), var(--box-shadow-100);--color:var(--color-text-500)}.dock-item{--size:var(--size-rest)}@media (hover:hover) and (prefers-reduced-motion:no-preference){.dock-item:hover{--size:var(--size-peak)}.dock-item:hover+.dock-item{--size:var(--size-near)}.dock-item:has(+.dock-item:hover){--size:var(--size-near)}.dock-item:hover+.dock-item+.dock-item{--size:var(--size-far)}.dock-item:has(+.dock-item+.dock-item:hover){--size:var(--size-far)}}.dock-label.tooltip-message,.dock-label.tooltip-shared{--box-shadow:none;--font-weight:var(--font-weight-500);--spacer:calc(var(--size-peak) - var(--size-rest) - var(--inset) + 12px)}.dock-label.tooltip-message{--border-radius:var(--border-radius-300);--offset:4px;--padding-horizontal:8px;--padding-vertical:4px;--transition-duration:.15s;--transition-timing-function:ease-out}.dock-label.tooltip-shared{--padding:4px 8px;--radius:var(--border-radius-300)}@media (prefers-reduced-motion:reduce){.dock{--hop-duration:0s}}.dock{height:calc(var(--size-rest) + var(--inset) * 2);display:flex}.dock-button{color:var(--color);cursor:pointer;height:var(--size);transform-origin:50% 100%;transition:height var(--magnify-duration) var(--magnify-timing-function), scale .15s ease-out, width var(--magnify-duration) var(--magnify-timing-function);width:var(--size);border:0;outline:none;flex-shrink:0;justify-content:center;align-items:center;display:flex}.dock-button:active{scale:.96}.dock-button:focus-visible{outline:2px solid var(--color);outline-offset:2px}.dock-button--launching{animation:dock-hop var(--hop-duration), dock-squash var(--hop-duration) ease-in-out}.dock-button svg{height:calc(var(--icon-ratio) * 100%);width:calc(var(--icon-ratio) * 100%)}.dock-group{display:flex}.dock-item{cursor:default;padding:0 calc(var(--spacing) / 2) var(--inset);flex-shrink:0;align-items:flex-end;display:flex;position:relative}.dock-light{background:var(--light-color);height:var(--light-size);opacity:0;pointer-events:none;left:50%;top:calc(100% - var(--inset) + 4px);width:var(--light-size);border-radius:50%;margin-inline-start:calc(var(--light-size) / -2);transition:opacity .15s cubic-bezier(.23,1,.32,1),scale .15s cubic-bezier(.23,1,.32,1);position:absolute;scale:.5}.dock-light.--active{opacity:1;transition-delay:var(--light-delay);transition-duration:.2s;scale:1}@keyframes dock-hop{0%{animation-timing-function:ease-out;translate:0}30%{animation-timing-function:ease-in;translate:0 -22px}55%{animation-timing-function:ease-out;translate:0}78%{animation-timing-function:ease-in;translate:0 -9px}to{translate:0}}@keyframes dock-squash{0%{scale:1}30%{scale:.97 1.04}55%{scale:1.08 .9}70%{scale:.99 1.02}80%{scale:1.03 .96}to{scale:1}}}
1
+ @layer components{.dock,.dock-button{--surface-shadow-weight:6;--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) calc(c * clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .005) c h),oklch(from var(--surface-background-default) calc(l + .01) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .04) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .04) c h),oklch(from var(--surface-background-active) min(1, l + .06) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .04) c h),oklch(from var(--surface-background-default) min(1, l + .06) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .04) c h),oklch(from var(--surface-background-hover) min(1, l + .06) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .04) c h),oklch(from var(--surface-background-pressed) min(1, l + .06) c h));--surface-shadow-active:var(--surface-shadow-hover);--surface-shadow-color:light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-cast:light-dark(oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .08),oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-default:0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 0, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 5 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 1, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 9 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 25 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -7 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, var(--surface-shadow-weight) - 0, 1) + .05 * clamp(0, var(--surface-shadow-weight) - 2, 1) + .15 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -8 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -10 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -.1 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10));--surface-shadow-hover:0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 5 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 1, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 9 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 25 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -7 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + .15 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -8 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -.1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10));--surface-shadow-pressed:0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 5 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 1, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 9 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 25 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -7 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + .15 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -8 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -.1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10))}@container style(--surface-level:-3){.dock,.dock-button{--surface-level:-2;--surface-shadow-weight:0}}@container style(--surface-level:-2){.dock,.dock-button{--surface-level:-1;--surface-shadow-weight:0}}@container style(--surface-level:-1){.dock,.dock-button{--surface-level:0;--surface-shadow-weight:0}}@container style(--surface-level:0){.dock,.dock-button{--surface-level:1;--surface-shadow-weight:1}}@container style(--surface-level:1){.dock,.dock-button{--surface-level:2;--surface-shadow-weight:2}}@container style(--surface-level:2){.dock,.dock-button{--surface-level:3;--surface-shadow-weight:3}}@container style(--surface-level:3){.dock,.dock-button{--surface-level:4;--surface-shadow-weight:4}}@container style(--surface-level:4){.dock,.dock-button{--surface-level:5;--surface-shadow-weight:5}}@container style(--surface-level:5){.dock,.dock-button{--surface-level:6;--surface-shadow-weight:6}}.dock{--background-default:var(--surface-background-default);--border-radius:999px;--border-width:0px;--box-shadow-default:0 0 0 var(--border-width-400) var(--surface-border-default), var(--surface-shadow-default);--hop-duration:.7s;--icon-ratio:.45;--inset:12px;--item-radius:999px;--light-color:var(--color-primary-500);--light-delay:calc(var(--hop-duration) * .55);--light-size:4px;--magnify-duration:var(--duration-fast);--magnify-timing-function:var(--easing-spring);--padding-horizontal:calc(var(--inset) - var(--spacing) / 2);--padding-vertical:0px;--size-far:calc(var(--size-rest) + (var(--size-peak) - var(--size-rest)) / 3);--size-near:calc(var(--size-rest) + (var(--size-peak) - var(--size-rest)) * 2 / 3);--size-peak:54px;--size-rest:40px;--spacing:var(--size-100)}.dock--square{--border-radius:var(--border-radius-700);--item-radius:var(--border-radius-600)}.dock-button{--background-default:var(--surface-background-default);--border-radius:var(--item-radius);--box-shadow-default:0 0 0 var(--border-width-400) var(--surface-border-default), var(--surface-shadow-default);--color:var(--color-text-500)}.dock-item{--size:var(--size-rest)}@media (hover:hover) and (prefers-reduced-motion:no-preference){.dock-item:hover+.dock-item+.dock-item{--size:var(--size-far)}.dock-item:has(+.dock-item+.dock-item:hover){--size:var(--size-far)}.dock-item:hover+.dock-item{--size:var(--size-near)}.dock-item:has(+.dock-item:hover){--size:var(--size-near)}.dock-item:hover{--size:var(--size-peak)}}.dock-label.tooltip-message{--border-radius:var(--border-radius-300);--offset:calc(var(--size-100) / 2);--padding-horizontal:var(--size-100);--padding-vertical:calc(var(--size-100) / 2)}.dock-label.tooltip-message,.dock-label.tooltip-shared{--box-shadow-default:none;--font-weight:var(--font-weight-500);--spacer:calc(var(--size-peak) - var(--size-rest) - var(--inset) + 12px)}.dock-label.tooltip-shared{--padding:calc(var(--size-100) / 2) var(--size-100);--radius:var(--border-radius-300)}@media (prefers-reduced-motion:reduce){.dock{--hop-duration:0s}}.dock{height:calc(var(--size-rest) + var(--inset) * 2);display:flex}.dock-button{color:var(--color);cursor:pointer;height:var(--size);transform-origin:50% 100%;transition:height var(--magnify-duration) var(--magnify-timing-function), width var(--magnify-duration) var(--magnify-timing-function);width:var(--size);border:0;outline:none;flex-shrink:0;justify-content:center;align-items:center;display:flex}.dock-button--launching{animation:dock-hop var(--hop-duration), dock-squash var(--hop-duration) var(--easing-in-out)}.dock-button:focus-visible{outline:2px solid var(--color);outline-offset:calc(var(--size-100) / 4)}.dock-button svg{height:calc(var(--icon-ratio) * 100%);width:calc(var(--icon-ratio) * 100%)}.dock-group{display:flex}.dock-item{cursor:default;padding:0 calc(var(--spacing) / 2) var(--inset);flex-shrink:0;align-items:flex-end;display:flex;position:relative}.dock-light{background:var(--light-color);height:var(--light-size);opacity:0;pointer-events:none;left:50%;top:calc(100% - var(--inset) + 4px);transition:opacity var(--duration-fast-exit) var(--easing-spring), scale var(--duration-fast-exit) var(--easing-spring);width:var(--light-size);border-radius:50%;margin-inline-start:calc(var(--light-size) / -2);position:absolute;scale:.5}.dock-light.--active{opacity:1;transition-delay:var(--light-delay);transition-duration:var(--duration-fast);scale:1}@keyframes dock-hop{0%{animation-timing-function:var(--easing-out);translate:0}30%{animation-timing-function:ease-in;translate:0 -22px}55%{animation-timing-function:var(--easing-out);translate:0}78%{animation-timing-function:ease-in;translate:0 -9px}to{translate:0}}@keyframes dock-squash{0%{scale:1}30%{scale:.97 1.04}55%{scale:1.08 .9}70%{scale:.99 1.02}80%{scale:1.03 .96}to{scale:1}}}
2
2
  /*$vite$:1*/
@@ -1,5 +1,4 @@
1
1
  import editor from './editor.js';
2
- import '../../../css-utilities/scrollbar/scss/index.scss';
3
2
  import './scss/index.scss';
4
3
  export default editor;
5
4
  export { EditorDocument } from './document.js';
@@ -1,5 +1,4 @@
1
1
  import editor from './editor.js';
2
- import '../../../css-utilities/scrollbar/scss/index.scss';
3
2
  import './scss/index.scss';
4
3
  export default editor;
5
4
  export { EditorDocument } from './document.js';
@@ -33,8 +33,9 @@ declare const minimapMetrics: (height: number, scrollHeight: number, clientHeigh
33
33
  travel: number;
34
34
  };
35
35
  declare const minimapScroll: (y: number, grab: number, height: number, scrollHeight: number, clientHeight: number) => number;
36
- declare const minimap: ({ focus, scroll }: {
36
+ declare const minimap: ({ focus, name, scroll }: {
37
37
  focus: VoidFunction;
38
+ name?: string;
38
39
  scroll: (top: number, relative: boolean) => void;
39
40
  }) => {
40
41
  invalidate: (first?: number | null, last?: number) => void;
@@ -1,7 +1,7 @@
1
1
  import * as reactivity_u0 from '@esportsplus/reactivity';
2
2
  import * as template_u1 from '@esportsplus/template';
3
3
  import { clamp } from '../../../shared/clamp.js';
4
- const template_0bg9uqd2 = template_u1.template(`<div aria-hidden='true' class='code-editor-minimap'><canvas class='code-editor-minimap-canvas'></canvas><div class='code-editor-minimap-slider'>`);
4
+ const template_0bg9uqd2 = template_u1.template(`<div aria-hidden='true'><canvas></canvas><div>`);
5
5
  class ReactiveObject_0bg9uqd0 extends reactivity_u0.ReactiveObject {
6
6
  #height = this[reactivity_u0.SIGNAL](24);
7
7
  #top = this[reactivity_u0.SIGNAL](0);
@@ -43,7 +43,7 @@ const minimapScroll = (y, grab, height, scrollHeight, clientHeight) => {
43
43
  let metrics = minimapMetrics(height, scrollHeight, clientHeight, 0);
44
44
  return metrics.travel ? (clamp(y - grab, 0, metrics.travel) / metrics.travel) * metrics.scroll : 0;
45
45
  };
46
- const minimap = ({ focus, scroll }) => {
46
+ const minimap = ({ focus, name = 'code-editor', scroll }) => {
47
47
  let canvas, colors = {}, content = 0, dirty = null, full = true, grab = null, lineHeight = 20, pixels = '', state = new ReactiveObject_0bg9uqd0(), style = '', viewport = { clientHeight: 0, scrollHeight: 0, scrollTop: 0 }, width = 0;
48
48
  function draw(context, source, scale, index) {
49
49
  let text = source.text(index), top = source.top(index), pitch = Math.max(1, Math.min(3, source.lineHeight * scale));
@@ -161,8 +161,11 @@ const minimap = ({ focus, scroll }) => {
161
161
  state,
162
162
  template: (attributes) => {
163
163
  let root_0bg9uqd1 = template_0bg9uqd2(), element_0bg9uqd3 = root_0bg9uqd1.firstChild, element_0bg9uqd4 = element_0bg9uqd3.firstElementChild, element_0bg9uqd5 = element_0bg9uqd4.nextElementSibling;
164
+ template_u1.setList(element_0bg9uqd5, 'class', template_u1.interpolate([(name), "-minimap-slider"]));
164
165
  template_u1.setList(element_0bg9uqd5, 'style', () => `--slider-height: ${state.height}px; --slider-top: ${state.top}px;`);
166
+ template_u1.setList(element_0bg9uqd4, 'class', template_u1.interpolate([(name), "-minimap-canvas"]));
165
167
  template_u1.onconnect(element_0bg9uqd4, (element) => { canvas = element; });
168
+ template_u1.setList(element_0bg9uqd3, 'class', template_u1.interpolate([(name), "-minimap"]));
166
169
  template_u1.setProperties(element_0bg9uqd3, handlers);
167
170
  template_u1.setProperties(element_0bg9uqd3, attributes);
168
171
  return root_0bg9uqd1;
@@ -17,7 +17,9 @@ type Callbacks = {
17
17
  };
18
18
  type CodeController = Omit<Controller, 'state'> & {
19
19
  readonly state: State;
20
+ readonly textarea: HTMLTextAreaElement;
20
21
  conflicts(): Conflict[];
22
+ folds(): number[];
21
23
  nextChange(): boolean;
22
24
  nextConflict(): boolean;
23
25
  nextProblem(): boolean;
@@ -32,7 +34,6 @@ type Controller = {
32
34
  readonly host: HTMLElement;
33
35
  readonly scroller: HTMLElement;
34
36
  readonly state: Snapshot;
35
- readonly textarea: HTMLTextAreaElement;
36
37
  addNextOccurrence(all?: boolean): boolean;
37
38
  closeFind(): void;
38
39
  dispose(): void;
@@ -86,6 +87,7 @@ type Options = {
86
87
  lineComment?: string | false;
87
88
  lineNumbers?: boolean;
88
89
  links?: boolean | ((url: string) => void);
90
+ minHeight?: number | string;
89
91
  minimap?: boolean;
90
92
  name?: string;
91
93
  onAutocomplete?: (controller: CodeController | Controller, explicit: boolean) => void;
@@ -1,6 +1,7 @@
1
1
  import * as reactivity_u0 from '@esportsplus/reactivity';
2
2
  import { flush } from '@esportsplus/reactivity';
3
3
  import * as template_u1 from '@esportsplus/template';
4
+ import scrollbar from '../../../modifiers/scrollbar/index.js';
4
5
  import { clamp } from '../../../shared/clamp.js';
5
6
  import { mac } from '../../../shared/platform.js';
6
7
  import { observeSize } from '../../../shared/resize.js';
@@ -23,7 +24,7 @@ import { markup, marks, pool, rowBreaks, rowOffset, rowRect, tokens } from './ro
23
24
  import { search as scan } from './search.js';
24
25
  import { services } from './services/index.js';
25
26
  import { commentSyntax, languageFor, syntaxCache } from './syntax.js';
26
- const template_0psre1t3 = template_u1.template(`<div class='code-editor'><!--$--><!--$--><div class='code-editor-surface'><div aria-hidden='true' class='code-editor-overlay'><div class='code-editor-rulers'></div><div class='code-editor-lines'></div><div class='code-editor-decorations'><!--$--></div></div><div aria-hidden='true' class='code-editor-gutter'><div class='code-editor-numbers'></div></div><!--$--><!--$--><!--$--><textarea autocapitalize='off' autocomplete='off' autocorrect='off' class='code-editor-input --scrollbar' dir='ltr' spellcheck='false'></textarea><span aria-hidden='true' class='code-editor-ruler'>0000000000000000000000000000000000000000000000000000000000000000</span></div><!--$--><span class='code-editor-help'>Press Escape then Tab to move focus out of the editor.`);
27
+ const template_0psre1t3 = template_u1.template(`<div class='code-editor'><!--$--><!--$--><div class='code-editor-surface'><div aria-hidden='true' class='code-editor-overlay'><div class='code-editor-rulers'></div><div class='code-editor-lines'></div><div class='code-editor-decorations'><!--$--></div></div><div aria-hidden='true' class='code-editor-gutter'><div class='code-editor-numbers'></div></div><!--$--><!--$--><!--$--><textarea autocapitalize='off' autocomplete='off' autocorrect='off' class='code-editor-input' dir='ltr' spellcheck='false'></textarea><span aria-hidden='true' class='code-editor-ruler'>0000000000000000000000000000000000000000000000000000000000000000</span></div><!--$--><span class='code-editor-help'>Press Escape then Tab to move focus out of the editor.`);
27
28
  const template_0psre1tl = template_u1.template(`<div>`);
28
29
  class ReactiveObject_0psre1t0 extends reactivity_u0.ReactiveObject {
29
30
  #digits;
@@ -31,6 +32,7 @@ class ReactiveObject_0psre1t0 extends reactivity_u0.ReactiveObject {
31
32
  #highlight = this[reactivity_u0.SIGNAL](true);
32
33
  #label = this[reactivity_u0.SIGNAL]('Code editor');
33
34
  #lineNumbers = this[reactivity_u0.SIGNAL](true);
35
+ #minHeight = this[reactivity_u0.SIGNAL]('');
34
36
  #minimap = this[reactivity_u0.SIGNAL](false);
35
37
  #name = this[reactivity_u0.SIGNAL]('');
36
38
  #placeholder = this[reactivity_u0.SIGNAL]('');
@@ -77,77 +79,83 @@ class ReactiveObject_0psre1t0 extends reactivity_u0.ReactiveObject {
77
79
  set lineNumbers(_v4) {
78
80
  reactivity_u0.write(this.#lineNumbers, _v4);
79
81
  }
82
+ get minHeight() {
83
+ return reactivity_u0.read(this.#minHeight);
84
+ }
85
+ set minHeight(_v5) {
86
+ reactivity_u0.write(this.#minHeight, _v5);
87
+ }
80
88
  get minimap() {
81
89
  return reactivity_u0.read(this.#minimap);
82
90
  }
83
- set minimap(_v5) {
84
- reactivity_u0.write(this.#minimap, _v5);
91
+ set minimap(_v6) {
92
+ reactivity_u0.write(this.#minimap, _v6);
85
93
  }
86
94
  get name() {
87
95
  return reactivity_u0.read(this.#name);
88
96
  }
89
- set name(_v6) {
90
- reactivity_u0.write(this.#name, _v6);
97
+ set name(_v7) {
98
+ reactivity_u0.write(this.#name, _v7);
91
99
  }
92
100
  get placeholder() {
93
101
  return reactivity_u0.read(this.#placeholder);
94
102
  }
95
- set placeholder(_v7) {
96
- reactivity_u0.write(this.#placeholder, _v7);
103
+ set placeholder(_v8) {
104
+ reactivity_u0.write(this.#placeholder, _v8);
97
105
  }
98
106
  get readonly() {
99
107
  return reactivity_u0.read(this.#readonly);
100
108
  }
101
- set readonly(_v8) {
102
- reactivity_u0.write(this.#readonly, _v8);
109
+ set readonly(_v9) {
110
+ reactivity_u0.write(this.#readonly, _v9);
103
111
  }
104
112
  get tabSize() {
105
113
  return reactivity_u0.read(this.#tabSize);
106
114
  }
107
- set tabSize(_v9) {
108
- reactivity_u0.write(this.#tabSize, _v9);
115
+ set tabSize(_v10) {
116
+ reactivity_u0.write(this.#tabSize, _v10);
109
117
  }
110
118
  get trackHeight() {
111
119
  return reactivity_u0.read(this.#trackHeight);
112
120
  }
113
- set trackHeight(_v10) {
114
- reactivity_u0.write(this.#trackHeight, _v10);
121
+ set trackHeight(_v11) {
122
+ reactivity_u0.write(this.#trackHeight, _v11);
115
123
  }
116
124
  get trackWidth() {
117
125
  return reactivity_u0.read(this.#trackWidth);
118
126
  }
119
- set trackWidth(_v11) {
120
- reactivity_u0.write(this.#trackWidth, _v11);
127
+ set trackWidth(_v12) {
128
+ reactivity_u0.write(this.#trackWidth, _v12);
121
129
  }
122
130
  get whitespace() {
123
131
  return reactivity_u0.read(this.#whitespace);
124
132
  }
125
- set whitespace(_v12) {
126
- reactivity_u0.write(this.#whitespace, _v12);
133
+ set whitespace(_v13) {
134
+ reactivity_u0.write(this.#whitespace, _v13);
127
135
  }
128
136
  get width() {
129
137
  return reactivity_u0.read(this.#width);
130
138
  }
131
- set width(_v13) {
132
- reactivity_u0.write(this.#width, _v13);
139
+ set width(_v14) {
140
+ reactivity_u0.write(this.#width, _v14);
133
141
  }
134
142
  get wrap() {
135
143
  return reactivity_u0.read(this.#wrap);
136
144
  }
137
- set wrap(_v14) {
138
- reactivity_u0.write(this.#wrap, _v14);
145
+ set wrap(_v15) {
146
+ reactivity_u0.write(this.#wrap, _v15);
139
147
  }
140
148
  get x() {
141
149
  return reactivity_u0.read(this.#x);
142
150
  }
143
- set x(_v15) {
144
- reactivity_u0.write(this.#x, _v15);
151
+ set x(_v16) {
152
+ reactivity_u0.write(this.#x, _v16);
145
153
  }
146
154
  get y() {
147
155
  return reactivity_u0.read(this.#y);
148
156
  }
149
- set y(_v16) {
150
- reactivity_u0.write(this.#y, _v16);
157
+ set y(_v17) {
158
+ reactivity_u0.write(this.#y, _v17);
151
159
  }
152
160
  }
153
161
  class ReactiveObject_0psre1t1 extends reactivity_u0.ReactiveObject {
@@ -1000,6 +1008,7 @@ const view = (model, callbacks, receive) => {
1000
1008
  model.select({ start: 0 });
1001
1009
  rebuild();
1002
1010
  },
1011
+ folds: () => folded.map((fold) => fold.line),
1003
1012
  goToLine: (line, column = 1) => {
1004
1013
  if (disposed || ime.busy()) {
1005
1014
  return;
@@ -1147,6 +1156,7 @@ const view = (model, callbacks, receive) => {
1147
1156
  ui.highlight = options.highlight !== false;
1148
1157
  ui.label = options.label ?? 'Code editor';
1149
1158
  ui.lineNumbers = options.lineNumbers !== false;
1159
+ ui.minHeight = typeof options.minHeight === 'number' ? `${options.minHeight}px` : options.minHeight ?? '';
1150
1160
  ui.minimap = !!options.minimap;
1151
1161
  ui.name = options.name ?? '';
1152
1162
  ui.placeholder = options.placeholder ?? '';
@@ -1515,6 +1525,7 @@ const view = (model, callbacks, receive) => {
1515
1525
  template_u1.onconnect(element_0psre1th, (element) => {
1516
1526
  ruler = element;
1517
1527
  });
1528
+ template_u1.setProperties(element_0psre1tg, scrollbar());
1518
1529
  template_u1.setProperties(element_0psre1tg, field);
1519
1530
  template_u1.setProperties(element_0psre1tg, lsp.aria);
1520
1531
  template_u1.onconnect(element_0psre1tg, (element) => {
@@ -1552,7 +1563,7 @@ const view = (model, callbacks, receive) => {
1552
1563
  receive?.(controller);
1553
1564
  });
1554
1565
  template_u1.ondisconnect(element_0psre1t4, () => controller.dispose());
1555
- template_u1.setList(element_0psre1t4, 'style', () => `--content-width: ${ui.width}px; --digits: ${ui.digits}; --tab-size: ${ui.tabSize}; --track-height: ${ui.trackHeight}px; --track-width: ${ui.trackWidth}px;`);
1566
+ template_u1.setList(element_0psre1t4, 'style', () => `--content-width: ${ui.width}px; --digits: ${ui.digits}; --tab-size: ${ui.tabSize}; --track-height: ${ui.trackHeight}px; --track-width: ${ui.trackWidth}px;${ui.minHeight && ` --min-height: ${ui.minHeight};`}`);
1556
1567
  return root_0psre1t2;
1557
1568
  };
1558
1569
  return { controller, template };
@@ -1,6 +1,5 @@
1
1
  import merge from './merge.js';
2
2
  import view from './view.js';
3
- import '../../../css-utilities/scrollbar/scss/index.scss';
4
3
  import './scss/index.scss';
5
4
  declare const diffs: typeof view & {
6
5
  merge: typeof merge;
@@ -1,6 +1,5 @@
1
1
  import merge from './merge.js';
2
2
  import view from './view.js';
3
- import '../../../css-utilities/scrollbar/scss/index.scss';
4
3
  import './scss/index.scss';
5
4
  const diffs = Object.assign(view, { merge });
6
5
  export default diffs;
@@ -3,6 +3,7 @@ import { untrack } from '@esportsplus/reactivity';
3
3
  import * as template_u1 from '@esportsplus/template';
4
4
  import { component } from '@esportsplus/template';
5
5
  import icon from '../../icon/index.js';
6
+ import scrollbar from '../../../modifiers/scrollbar/index.js';
6
7
  import codeEditor from '../code/index.js';
7
8
  import { EditorDocument } from '../code/document.js';
8
9
  import { languageFor } from '../code/syntax.js';
@@ -17,9 +18,9 @@ const template_0td7se96 = template_u1.template(`<button class='diffs-action' typ
17
18
  const template_0td7se9a = template_u1.template(`<button class='diffs-action' type='button'> Accept incoming </button><button class='diffs-action' type='button'> Accept both `);
18
19
  const template_0td7se9e = template_u1.template(`<button class='diffs-action' type='button'></button><button class='diffs-action' type='button'> Accept both `);
19
20
  const template_0td7se9i = template_u1.template(`<div class='diffs-merge-line '><span class='diffs-number'></span><code class='diffs-code'>`);
20
- const template_0td7se9n = template_u1.template(`<div class='diffs-merge-pane diffs-merge-pane--current'><div class='diffs-merge-title'>Current</div><div class='diffs-merge-scroller --scrollbar' tabindex='0'>`);
21
- const template_0td7se9q = template_u1.template(`<div class='diffs-merge-pane diffs-merge-pane--incoming'><div class='diffs-merge-title'>Incoming</div><div class='diffs-merge-scroller --scrollbar' tabindex='0'>`);
22
- const template_0td7se9t = template_u1.template(`<div class='diffs-merge-pane '><div class='diffs-merge-title'></div><div class='diffs-merge-scroller --scrollbar' tabindex='0'>`);
21
+ const template_0td7se9n = template_u1.template(`<div class='diffs-merge-pane diffs-merge-pane--current'><div class='diffs-merge-title'>Current</div><div class='diffs-merge-scroller' tabindex='0'>`);
22
+ const template_0td7se9q = template_u1.template(`<div class='diffs-merge-pane diffs-merge-pane--incoming'><div class='diffs-merge-title'>Incoming</div><div class='diffs-merge-scroller' tabindex='0'>`);
23
+ const template_0td7se9t = template_u1.template(`<div class='diffs-merge-pane '><div class='diffs-merge-title'></div><div class='diffs-merge-scroller' tabindex='0'>`);
23
24
  const template_0td7se9y = template_u1.template(`<div class='diffs-merge'><div class='diffs-merge-header'><!--$--><span aria-live='polite' class='diffs-position'></span><div class='diffs-controls'><!--$--><button aria-label='Previous conflict (Shift+Alt+F8)' class='diffs-button' title='Previous conflict (Shift+Alt+F8)' type='button'></button><button aria-label='Next conflict (Alt+F8)' class='diffs-button' title='Next conflict (Alt+F8)' type='button'></button><button class='diffs-button diffs-button--primary diffs-button--text' type='button'><!--$--> Complete merge </button></div></div><div class='diffs-merge-sides'><!--$--></div><div class='diffs-merge-result'><div class='diffs-merge-title'>Result`);
24
25
  const template_0td7se91b = template_u1.template(`<span class='diffs-filename'>`);
25
26
  const template_0td7se91e = template_u1.template(`<button class='diffs-button diffs-button--text' type='button'> Accept both `);
@@ -210,15 +211,18 @@ export default component(function (input) {
210
211
  return (side === "current" ? (() => {
211
212
  let root_0td7se9m = template_0td7se9n(), element_0td7se9o = root_0td7se9m.firstChild.firstElementChild.nextElementSibling;
212
213
  template_u1.slot(element_0td7se9o, panes[side].slot.fragment, 1);
214
+ template_u1.setProperties(element_0td7se9o, scrollbar());
213
215
  return root_0td7se9m;
214
216
  })() : side === "incoming" ? (() => {
215
217
  let root_0td7se9p = template_0td7se9q(), element_0td7se9r = root_0td7se9p.firstChild.firstElementChild.nextElementSibling;
216
218
  template_u1.slot(element_0td7se9r, panes[side].slot.fragment, 1);
219
+ template_u1.setProperties(element_0td7se9r, scrollbar());
217
220
  return root_0td7se9p;
218
221
  })() : (() => {
219
222
  let root_0td7se9s = template_0td7se9t(), element_0td7se9u = root_0td7se9s.firstChild, element_0td7se9v = element_0td7se9u.firstElementChild, element_0td7se9w = element_0td7se9v.nextElementSibling;
220
223
  element_0td7se9v.appendChild(template_u1.text(side === 'current' ? 'Current' : 'Incoming'));
221
224
  template_u1.slot(element_0td7se9w, panes[side].slot.fragment, 1);
225
+ template_u1.setProperties(element_0td7se9w, scrollbar());
222
226
  template_u1.setList(element_0td7se9u, 'class', template_u1.interpolate(["diffs-merge-pane--", (side)]));
223
227
  return root_0td7se9s;
224
228
  })());
@@ -3,6 +3,7 @@ import { untrack } from '@esportsplus/reactivity';
3
3
  import * as template_u1 from '@esportsplus/template';
4
4
  import { component } from '@esportsplus/template';
5
5
  import icon from '../../icon/index.js';
6
+ import scrollbar from '../../../modifiers/scrollbar/index.js';
6
7
  import { languageFor } from '../code/syntax.js';
7
8
  import { diffTexts, hunks } from './hunks.js';
8
9
  import { highlighter, markup } from './render.js';
@@ -18,7 +19,7 @@ const template_1uiklwmd = template_u1.template(`<div class='diffs-cell '><span c
18
19
  const template_1uiklwmi = template_u1.template(`<div class='diffs-row diffs-row--gap'><button class='diffs-gap' type='button'><!--$-->`);
19
20
  const template_1uiklwmm = template_u1.template(`<div class='diffs-row diffs-row--split '><!--$--><!--$-->`);
20
21
  const template_1uiklwmr = template_u1.template(`<div class='diffs-row diffs-row--unified '><span class='diffs-number'></span><span class='diffs-number'></span><span aria-hidden='true' class='diffs-sign'></span><code class='diffs-code'>`);
21
- const template_1uiklwmy = template_u1.template(`<div class='diffs'><div class='diffs-header'><!--$--><span class='diffs-stats'><span class='diffs-stat diffs-stat--additions'></span><span class='diffs-stat diffs-stat--deletions'></span></span><span aria-live='polite' class='diffs-position'></span><div class='diffs-controls'><div aria-label='View' class='diffs-modes' role='group'></div><button aria-label='Previous change (Shift+Alt+F5)' class='diffs-button' title='Previous change (Shift+Alt+F5)' type='button'></button><button aria-label='Next change (Alt+F5)' class='diffs-button' title='Next change (Alt+F5)' type='button'></button></div></div><div class='diffs-scroller --scrollbar' tabindex='0'>`);
22
+ const template_1uiklwmy = template_u1.template(`<div class='diffs'><div class='diffs-header'><!--$--><span class='diffs-stats'><span class='diffs-stat diffs-stat--additions'></span><span class='diffs-stat diffs-stat--deletions'></span></span><span aria-live='polite' class='diffs-position'></span><div class='diffs-controls'><div aria-label='View' class='diffs-modes' role='group'></div><button aria-label='Previous change (Shift+Alt+F5)' class='diffs-button' title='Previous change (Shift+Alt+F5)' type='button'></button><button aria-label='Next change (Alt+F5)' class='diffs-button' title='Next change (Alt+F5)' type='button'></button></div></div><div class='diffs-scroller' tabindex='0'>`);
22
23
  const template_1uiklwm19 = template_u1.template(`<span class='diffs-filename'>`);
23
24
  const template_1uiklwm1c = template_u1.template(`<button class='diffs-button diffs-button--text' type='button'> Split `);
24
25
  const template_1uiklwm1f = template_u1.template(`<button class='diffs-button diffs-button--text' type='button'> Unified `);
@@ -343,6 +344,7 @@ export default component(function (input) {
343
344
  template_u1.slot(element_1uiklwm15, icon({ 'aria-hidden': 'true', class: 'diffs-button-icon' }, up), 1);
344
345
  template_u1.slot(element_1uiklwm16, icon({ 'aria-hidden': 'true', class: 'diffs-button-icon' }, down), 1);
345
346
  template_u1.slot(element_1uiklwm17, slot.fragment, 1);
347
+ template_u1.setProperties(element_1uiklwm17, scrollbar());
346
348
  template_u1.setProperty(element_1uiklwm16, 'disabled', () => !ui.changes);
347
349
  template_u1.delegate(element_1uiklwm16, 'click', () => move(1));
348
350
  template_u1.setProperty(element_1uiklwm15, 'disabled', () => !ui.changes);
@@ -2,12 +2,14 @@ import code from './code/index.js';
2
2
  import diffs from './diffs/index.js';
3
3
  import markdown from './markdown/index.js';
4
4
  import tree from './tree/index.js';
5
+ import viewer from './viewer/index.js';
5
6
  import workspace from './workspace/index.js';
6
7
  declare const editor: {
7
8
  code: typeof code;
8
9
  diffs: typeof diffs;
9
10
  markdown: typeof markdown;
10
11
  tree: typeof tree;
12
+ viewer: typeof viewer;
11
13
  workspace: typeof workspace;
12
14
  };
13
15
  export default editor;
@@ -18,4 +20,5 @@ export { EditorWorkspaceModel, isWorkspaceCodeEditor } from './workspace/index.j
18
20
  export type { ConflictMarker, DiffChange, DiffsAttributes, DiffsController, DiffsState, Hunk, MergeAttributes, MergeChoice, MergeRegion, MergeResult } from './diffs/index.js';
19
21
  export type { MarkdownController, MarkdownEditorAttributes, MarkdownOptions } from './markdown/index.js';
20
22
  export type * from './tree/index.js';
21
- export type { CodeEditorWorkspaceAttributes, CodeEditorWorkspaceController, WorkspaceAction, WorkspaceConfirmation, WorkspaceDecision, WorkspaceEditor, WorkspaceEditorAttributes, WorkspaceEditorContext, WorkspaceEditorController, WorkspaceEntry, WorkspaceHost, WorkspacePreferences, WorkspaceTab, WorkspaceTarget } from './workspace/index.js';
23
+ export type { CodeViewerAttributes } from './viewer/index.js';
24
+ export type { CodeEditorWorkspaceAttributes, CodeEditorWorkspaceController, WorkspaceAction, WorkspaceCompare, WorkspaceConfirmation, WorkspaceDecision, WorkspaceEditor, WorkspaceEditorAttributes, WorkspaceEditorContext, WorkspaceEditorController, WorkspaceEntry, WorkspaceHost, WorkspacePreferences, WorkspaceSession, WorkspaceSessionTab, WorkspaceTab, WorkspaceTarget } from './workspace/index.js';
@@ -2,8 +2,9 @@ import code from './code/index.js';
2
2
  import diffs from './diffs/index.js';
3
3
  import markdown from './markdown/index.js';
4
4
  import tree from './tree/index.js';
5
+ import viewer from './viewer/index.js';
5
6
  import workspace from './workspace/index.js';
6
- const editor = { code, diffs, markdown, tree, workspace };
7
+ const editor = { code, diffs, markdown, tree, viewer, workspace };
7
8
  export default editor;
8
9
  export * from './code/index.js';
9
10
  export { acceptChange, conflictMarkers, diff3, diffTexts, hunks, resolveMarker, revertChange, words } from './diffs/index.js';
@@ -1,6 +1,24 @@
1
1
  import { deleteCharacter } from '../code/commands.js';
2
2
  import { EditorDocument } from '../code/document.js';
3
3
  import { markdownBackspace, markdownEnter, toggleMarkdown } from './model.js';
4
+ const FENCE = /^((?: {0,3}>[ \t]?)*) {0,3}(`{3,}|~{3,})[^`]*$/;
5
+ function fence(document) {
6
+ let { end, start } = document.selection, index = document.lineAt(start), line = document.lineText(index), open = FENCE.exec(line);
7
+ if (!open || start !== end || start !== document.lineStart(index) + line.length) {
8
+ return false;
9
+ }
10
+ let marker = open[2], close = new RegExp(`^${open[1]} {0,3}${marker[0] === '`' ? '`' : '~'}{${marker.length},}[ \\t]*$`);
11
+ for (let i = index + 1, n = document.lineCount; i < n; i++) {
12
+ if (close.test(document.lineText(i))) {
13
+ return false;
14
+ }
15
+ }
16
+ let eol = document.eol;
17
+ return document.replace(start, start, eol + open[1] + eol + open[1] + marker, {
18
+ selection: { start: start + eol.length + open[1].length },
19
+ source: 'markdown-enter'
20
+ });
21
+ }
4
22
  function run(document, command, kind) {
5
23
  if (command === 'bold' || command === 'italic') {
6
24
  return toggleMarkdown(document, command === 'bold' ? '**' : '*');
@@ -8,11 +26,12 @@ function run(document, command, kind) {
8
26
  if (command === 'backspace') {
9
27
  return markdownBackspace(document) || deleteCharacter(document, true);
10
28
  }
11
- if (markdownEnter(document, kind?.(document.selection.start))) {
29
+ let at = kind?.(document.selection.start);
30
+ if (markdownEnter(document, at) || fence(document)) {
12
31
  return true;
13
32
  }
14
- let { end, start } = document.selection, eol = document.eol;
15
- return document.replace(start, end, eol, { selection: { start: start + eol.length }, source: 'markdown-enter' });
33
+ let { end, start } = document.selection, eol = document.eol, insert = at === 'paragraph' && document.lineText(document.lineAt(start)).trim() ? eol + eol : eol;
34
+ return document.replace(start, end, insert, { selection: { start: start + insert.length }, source: 'markdown-enter' });
16
35
  }
17
36
  const markdownCommand = (document, command, kind) => {
18
37
  let ranges = document.selections;
@@ -0,0 +1,9 @@
1
+ import type { Inline } from './inline.js';
2
+ type Span = {
3
+ from: number;
4
+ to: number;
5
+ };
6
+ declare const reach: (text: string, spans: readonly Span[], offset: number, backward: boolean) => Span | null;
7
+ declare const widen: (text: string, tokens: readonly Inline[], base: number, span: Span) => Span;
8
+ export { reach, widen };
9
+ export type { Span };
@@ -0,0 +1,78 @@
1
+ const LINE_BREAK = /[\r\n]/;
2
+ const WIDTHS = { em: 1, strike: 2, strong: 2 };
3
+ let graphemes;
4
+ function grapheme(text, offset, limit, backward) {
5
+ graphemes ??= new Intl.Segmenter(undefined, { granularity: 'grapheme' });
6
+ let window = backward ? text.slice(Math.max(limit, offset - 16), offset) : text.slice(offset, Math.min(limit, offset + 16)), length = 0;
7
+ for (let { segment } of graphemes.segment(window)) {
8
+ if (!backward) {
9
+ return segment.length;
10
+ }
11
+ length = segment.length;
12
+ }
13
+ return length;
14
+ }
15
+ const reach = (text, spans, offset, backward) => {
16
+ let next = null, previous = null;
17
+ for (let i = 0, n = spans.length; i < n; i++) {
18
+ let span = spans[i];
19
+ if (span.from === span.to) {
20
+ continue;
21
+ }
22
+ if (backward ? span.from < offset && offset <= span.to : span.from <= offset && offset < span.to) {
23
+ return backward
24
+ ? { from: offset - grapheme(text, offset, span.from, true), to: offset }
25
+ : { from: offset, to: offset + grapheme(text, offset, span.to, false) };
26
+ }
27
+ if (span.to <= offset) {
28
+ previous = span;
29
+ }
30
+ else if (!next && span.from >= offset) {
31
+ next = span;
32
+ }
33
+ }
34
+ if (backward) {
35
+ if (!previous) {
36
+ return null;
37
+ }
38
+ return LINE_BREAK.test(text.slice(previous.to, offset))
39
+ ? { from: previous.to, to: offset }
40
+ : { from: previous.to - grapheme(text, previous.to, previous.from, true), to: previous.to };
41
+ }
42
+ if (!next) {
43
+ return null;
44
+ }
45
+ return LINE_BREAK.test(text.slice(offset, next.from))
46
+ ? { from: offset, to: next.from }
47
+ : { from: next.from, to: next.from + grapheme(text, next.from, next.to, false) };
48
+ };
49
+ const widen = (text, tokens, base, span) => {
50
+ let found = true;
51
+ while (found) {
52
+ found = false;
53
+ let visit = (list) => {
54
+ for (let i = 0, n = list.length; i < n && !found; i++) {
55
+ let token = list[i];
56
+ if (base + token.from === span.from && base + token.to === span.to) {
57
+ let width = WIDTHS[token.kind] ?? 0;
58
+ if (token.kind === 'code') {
59
+ while (text[span.from - width - 1] === '`') {
60
+ width++;
61
+ }
62
+ }
63
+ if (width && span.from - width >= 0) {
64
+ span = { from: span.from - width, to: span.to + width };
65
+ found = true;
66
+ }
67
+ return;
68
+ }
69
+ if (token.children && base + token.from <= span.from && span.to <= base + token.to) {
70
+ visit(token.children);
71
+ }
72
+ }
73
+ };
74
+ visit(tokens);
75
+ }
76
+ return span;
77
+ };
78
+ export { reach, widen };
@@ -2,7 +2,6 @@ import { type Attributes } from '@esportsplus/template';
2
2
  import { EditorDocument } from '../code/document.js';
3
3
  import { type MarkdownController, type MarkdownOptions } from './view.js';
4
4
  import type { Callbacks } from '../code/view.js';
5
- import '../../../css-utilities/scrollbar/scss/index.scss';
6
5
  import '../code/scss/index.scss';
7
6
  import './scss/index.scss';
8
7
  type MarkdownEditorAttributes = Attributes & Callbacks & {
@@ -2,7 +2,6 @@ import { effect, untrack } from '@esportsplus/reactivity';
2
2
  import { component } from '@esportsplus/template';
3
3
  import { EditorDocument } from '../code/document.js';
4
4
  import { view } from './view.js';
5
- import '../../../css-utilities/scrollbar/scss/index.scss';
6
5
  import '../code/scss/index.scss';
7
6
  import './scss/index.scss';
8
7
  export default component(function (input) {
@@ -13,7 +13,6 @@ type Metrics = {
13
13
  width: number;
14
14
  };
15
15
  type Unit = {
16
- active?: boolean;
17
16
  block: MarkdownBlock;
18
17
  continuation: boolean;
19
18
  continues: boolean;
@@ -29,16 +28,10 @@ type Window = {
29
28
  end: number;
30
29
  start: number;
31
30
  };
32
- declare const SCALED_LINE = 1.3;
33
31
  declare const SLICE_LINES = 32;
34
32
  declare const WINDOW_LIMIT = 120;
35
- declare const arrange: (blocks: readonly MarkdownBlock[], text: string, folds: readonly FoldRange[], cache: Cache, active: {
36
- first: number;
37
- last: number;
38
- unit: Unit;
39
- } | null, raw: ((index: number) => boolean) | null) => Unit[];
33
+ declare const arrange: (blocks: readonly MarkdownBlock[], text: string, folds: readonly FoldRange[], cache: Cache, raw: ((index: number) => boolean) | null) => Unit[];
40
34
  declare const cache: () => Cache;
41
- declare const headingScale: (level?: number) => number;
42
35
  declare const unitStart: (unit: Unit) => number;
43
36
  declare class MarkdownLayout {
44
37
  units: Unit[];
@@ -59,5 +52,5 @@ declare class MarkdownLayout {
59
52
  top(index: number): number;
60
53
  window(y: number, height: number, overscan?: number): Window;
61
54
  }
62
- export { arrange, cache, headingScale, MarkdownLayout, SCALED_LINE, SLICE_LINES, unitStart, WINDOW_LIMIT };
55
+ export { arrange, cache, MarkdownLayout, SLICE_LINES, unitStart, WINDOW_LIMIT };
63
56
  export type { Unit };
@@ -74,14 +74,9 @@ function slice(block, text, raw) {
74
74
  }
75
75
  return out;
76
76
  }
77
- const arrange = (blocks, text, folds, cache, active, raw) => {
77
+ const arrange = (blocks, text, folds, cache, raw) => {
78
78
  let f = 0, out = [];
79
79
  for (let i = 0, n = blocks.length; i < n; i++) {
80
- if (active && i === active.first) {
81
- out.push(active.unit);
82
- i = active.last - 1;
83
- continue;
84
- }
85
80
  let block = blocks[i];
86
81
  while (f < folds.length && folds[f].to <= block.from) {
87
82
  f++;
@@ -249,4 +244,4 @@ class MarkdownLayout {
249
244
  return { end, start };
250
245
  }
251
246
  }
252
- export { arrange, cache, headingScale, MarkdownLayout, SCALED_LINE, SLICE_LINES, unitStart, WINDOW_LIMIT };
247
+ export { arrange, cache, MarkdownLayout, SLICE_LINES, unitStart, WINDOW_LIMIT };
@@ -10,7 +10,6 @@ type Host = {
10
10
  fold: (unit: Unit) => void;
11
11
  foldable: (unit: Unit) => boolean;
12
12
  inline: (block: MarkdownBlock) => readonly Inline[];
13
- press: (e: MouseEvent, unit: Unit) => void;
14
13
  readonly: () => boolean;
15
14
  shown: (element: HTMLElement, unit: Unit | null) => void;
16
15
  task: (block: MarkdownBlock) => void;