@threadlabs/looma 0.2.5 → 0.2.7

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 (427) hide show
  1. package/dist/chunk-3HMMDK27.js +2914 -0
  2. package/dist/chunk-3K45IWIJ.js +4733 -0
  3. package/dist/chunk-MLKGABMK.js +9 -0
  4. package/dist/declarative-generated.cjs +135 -0
  5. package/dist/declarative-generated.d.cts +10 -0
  6. package/dist/declarative-generated.d.ts +10 -0
  7. package/dist/declarative-generated.js +111 -0
  8. package/dist/declarative.cjs +2942 -0
  9. package/dist/declarative.d.cts +27 -0
  10. package/dist/declarative.d.ts +27 -0
  11. package/dist/declarative.js +13 -0
  12. package/dist/index.cjs +7478 -6457
  13. package/dist/index.d.cts +4 -58
  14. package/dist/index.d.ts +4 -58
  15. package/dist/index.js +15 -27
  16. package/dist/loader.cjs +7652 -0
  17. package/dist/loader.d.cts +4 -0
  18. package/dist/loader.d.ts +4 -0
  19. package/dist/loader.js +16 -0
  20. package/dist/valibot.cjs +31 -0
  21. package/dist/valibot.d.cts +10 -0
  22. package/dist/valibot.d.ts +1 -43
  23. package/dist/valibot.js +2 -0
  24. package/dist/{types/field/validation.d.ts → validation-bxcou-l-.d.cts} +13 -11
  25. package/dist/validation-bxcou-l-.d.ts +58 -0
  26. package/editor/{chunk-B5WVJOPV.js → chunk-BXICJBWS.js} +118 -8
  27. package/editor/{chunk-ZOUKEZ77.js → chunk-JK53ENSG.js} +8 -21
  28. package/editor/chunk-WI7ZA44X.js +2558 -0
  29. package/editor/extensions/index.d.ts +11 -2
  30. package/editor/extensions/index.js +9 -7
  31. package/editor/index.d.ts +1 -1
  32. package/editor/index.js +10 -8
  33. package/editor/ui.js +2 -2
  34. package/editor.css +32 -0
  35. package/layout/index.cjs +466 -400
  36. package/layout/index.d.cts +1 -2
  37. package/layout/index.d.ts +1 -2
  38. package/layout/index.js +471 -395
  39. package/package.json +14 -5
  40. package/vue/chunk-4DPYH3IT.js +3538 -0
  41. package/vue/editor/index.d.ts +17 -7
  42. package/vue/editor/index.js +53 -35
  43. package/vue/index.d.ts +48 -31
  44. package/vue/index.js +1 -1
  45. package/dist/chunk-24OTMNIU.js +0 -1617
  46. package/dist/chunk-D5WRORG6.js +0 -366
  47. package/dist/chunk-HNFCGIBP.js +0 -8
  48. package/dist/chunk-NB6DBRXQ.js +0 -323
  49. package/dist/chunk-OF57X5AR.js +0 -10
  50. package/dist/chunk-TL4FIE7X.js +0 -93
  51. package/dist/chunk-UL7UIUJZ.js +0 -20
  52. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  53. package/dist/cjs/controlled-state-BFya8rAX.js +0 -9
  54. package/dist/cjs/events-TcQIzpNv.js +0 -19
  55. package/dist/cjs/icons-BAdjrnhS.js +0 -680
  56. package/dist/cjs/id-CYbKpaYr.js +0 -9
  57. package/dist/cjs/index-BHG9Rpil.js +0 -1602
  58. package/dist/cjs/index.cjs.js +0 -2
  59. package/dist/cjs/loader.cjs.js +0 -13
  60. package/dist/cjs/looma.cjs.js +0 -25
  61. package/dist/cjs/manager-Ce25WRtl.js +0 -95
  62. package/dist/cjs/positioning-CCR6ifPj.js +0 -426
  63. package/dist/cjs/ui-affordance-scope.cjs.entry.js +0 -43
  64. package/dist/cjs/ui-avatar-group.cjs.entry.js +0 -43
  65. package/dist/cjs/ui-avatar.cjs.entry.js +0 -50
  66. package/dist/cjs/ui-badge.cjs.entry.js +0 -19
  67. package/dist/cjs/ui-button.cjs.entry.js +0 -75
  68. package/dist/cjs/ui-callout.cjs.entry.js +0 -27
  69. package/dist/cjs/ui-checkbox.cjs.entry.js +0 -97
  70. package/dist/cjs/ui-chip_2.cjs.entry.js +0 -258
  71. package/dist/cjs/ui-combobox.cjs.entry.js +0 -708
  72. package/dist/cjs/ui-context-menu.cjs.entry.js +0 -239
  73. package/dist/cjs/ui-dialog.cjs.entry.js +0 -131
  74. package/dist/cjs/ui-disclosure.cjs.entry.js +0 -112
  75. package/dist/cjs/ui-editable.cjs.entry.js +0 -100
  76. package/dist/cjs/ui-floating-action-button.cjs.entry.js +0 -20
  77. package/dist/cjs/ui-form-field.cjs.entry.js +0 -114
  78. package/dist/cjs/ui-icon-button.cjs.entry.js +0 -23
  79. package/dist/cjs/ui-input.cjs.entry.js +0 -106
  80. package/dist/cjs/ui-menu-item.cjs.entry.js +0 -19
  81. package/dist/cjs/ui-menu.cjs.entry.js +0 -182
  82. package/dist/cjs/ui-popover.cjs.entry.js +0 -135
  83. package/dist/cjs/ui-radio-group.cjs.entry.js +0 -134
  84. package/dist/cjs/ui-radio.cjs.entry.js +0 -94
  85. package/dist/cjs/ui-search-result-row.cjs.entry.js +0 -47
  86. package/dist/cjs/ui-search-shell.cjs.entry.js +0 -39
  87. package/dist/cjs/ui-select.cjs.entry.js +0 -108
  88. package/dist/cjs/ui-switch.cjs.entry.js +0 -74
  89. package/dist/cjs/ui-tabs.cjs.entry.js +0 -118
  90. package/dist/cjs/ui-textarea.cjs.entry.js +0 -110
  91. package/dist/cjs/ui-toast-region.cjs.entry.js +0 -93
  92. package/dist/cjs/ui-top-bar.cjs.entry.js +0 -43
  93. package/dist/cjs/ui-tree-item.cjs.entry.js +0 -135
  94. package/dist/cjs/ui-tree.cjs.entry.js +0 -500
  95. package/dist/collection/collection-manifest.json +0 -45
  96. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.css +0 -8
  97. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +0 -70
  98. package/dist/collection/components/ui-avatar/ui-avatar.css +0 -35
  99. package/dist/collection/components/ui-avatar/ui-avatar.js +0 -130
  100. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +0 -32
  101. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +0 -95
  102. package/dist/collection/components/ui-badge/ui-badge.css +0 -90
  103. package/dist/collection/components/ui-badge/ui-badge.js +0 -62
  104. package/dist/collection/components/ui-button/ui-button.css +0 -121
  105. package/dist/collection/components/ui-button/ui-button.js +0 -141
  106. package/dist/collection/components/ui-callout/ui-callout.css +0 -74
  107. package/dist/collection/components/ui-callout/ui-callout.js +0 -59
  108. package/dist/collection/components/ui-checkbox/ui-checkbox.css +0 -24
  109. package/dist/collection/components/ui-checkbox/ui-checkbox.js +0 -228
  110. package/dist/collection/components/ui-chip/ui-chip.css +0 -57
  111. package/dist/collection/components/ui-chip/ui-chip.js +0 -67
  112. package/dist/collection/components/ui-combobox/ui-combobox.css +0 -47
  113. package/dist/collection/components/ui-combobox/ui-combobox.js +0 -1295
  114. package/dist/collection/components/ui-context-menu/ui-context-menu.css +0 -34
  115. package/dist/collection/components/ui-context-menu/ui-context-menu.js +0 -311
  116. package/dist/collection/components/ui-dialog/ui-dialog.css +0 -72
  117. package/dist/collection/components/ui-dialog/ui-dialog.js +0 -242
  118. package/dist/collection/components/ui-disclosure/ui-disclosure.css +0 -7
  119. package/dist/collection/components/ui-disclosure/ui-disclosure.js +0 -184
  120. package/dist/collection/components/ui-editable/ui-editable.css +0 -2
  121. package/dist/collection/components/ui-editable/ui-editable.js +0 -196
  122. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +0 -73
  123. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +0 -85
  124. package/dist/collection/components/ui-form-field/ui-form-field.css +0 -25
  125. package/dist/collection/components/ui-form-field/ui-form-field.js +0 -180
  126. package/dist/collection/components/ui-icon-button/ui-icon-button.css +0 -145
  127. package/dist/collection/components/ui-icon-button/ui-icon-button.js +0 -128
  128. package/dist/collection/components/ui-input/ui-input.css +0 -48
  129. package/dist/collection/components/ui-input/ui-input.js +0 -217
  130. package/dist/collection/components/ui-menu/ui-menu.css +0 -73
  131. package/dist/collection/components/ui-menu/ui-menu.js +0 -280
  132. package/dist/collection/components/ui-menu-item/ui-menu-item.css +0 -32
  133. package/dist/collection/components/ui-menu-item/ui-menu-item.js +0 -64
  134. package/dist/collection/components/ui-popover/ui-popover.css +0 -58
  135. package/dist/collection/components/ui-popover/ui-popover.js +0 -232
  136. package/dist/collection/components/ui-radio/ui-radio.css +0 -22
  137. package/dist/collection/components/ui-radio/ui-radio.js +0 -226
  138. package/dist/collection/components/ui-radio-group/ui-radio-group.css +0 -10
  139. package/dist/collection/components/ui-radio-group/ui-radio-group.js +0 -247
  140. package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +0 -80
  141. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +0 -100
  142. package/dist/collection/components/ui-search-shell/ui-search-shell.css +0 -63
  143. package/dist/collection/components/ui-search-shell/ui-search-shell.js +0 -46
  144. package/dist/collection/components/ui-select/ui-select.css +0 -64
  145. package/dist/collection/components/ui-select/ui-select.js +0 -218
  146. package/dist/collection/components/ui-switch/ui-switch.css +0 -63
  147. package/dist/collection/components/ui-switch/ui-switch.js +0 -185
  148. package/dist/collection/components/ui-tabs/ui-tabs.css +0 -68
  149. package/dist/collection/components/ui-tabs/ui-tabs.js +0 -190
  150. package/dist/collection/components/ui-textarea/ui-textarea.css +0 -49
  151. package/dist/collection/components/ui-textarea/ui-textarea.js +0 -241
  152. package/dist/collection/components/ui-toast-region/ui-toast-region.css +0 -59
  153. package/dist/collection/components/ui-toast-region/ui-toast-region.js +0 -126
  154. package/dist/collection/components/ui-tooltip/ui-tooltip.css +0 -43
  155. package/dist/collection/components/ui-tooltip/ui-tooltip.js +0 -430
  156. package/dist/collection/components/ui-top-bar/ui-top-bar.css +0 -51
  157. package/dist/collection/components/ui-top-bar/ui-top-bar.js +0 -52
  158. package/dist/collection/components/ui-tree/ui-tree.css +0 -12
  159. package/dist/collection/components/ui-tree/ui-tree.js +0 -515
  160. package/dist/collection/components/ui-tree-item/ui-tree-item.css +0 -217
  161. package/dist/collection/components/ui-tree-item/ui-tree-item.js +0 -406
  162. package/dist/collection/field/combobox.js +0 -4
  163. package/dist/collection/field/editable.js +0 -1
  164. package/dist/collection/field/multi-combobox.js +0 -1
  165. package/dist/collection/field/valibot.js +0 -5
  166. package/dist/collection/field/validation.js +0 -62
  167. package/dist/collection/icons.js +0 -71
  168. package/dist/collection/input-modality.js +0 -24
  169. package/dist/collection/overlay/manager.js +0 -92
  170. package/dist/collection/overlay/positioning.js +0 -424
  171. package/dist/collection/utils/controlled-state.js +0 -4
  172. package/dist/collection/utils/drag-drop.js +0 -51
  173. package/dist/collection/utils/events.js +0 -13
  174. package/dist/collection/utils/id.js +0 -5
  175. package/dist/collection/utils/initials.js +0 -11
  176. package/dist/components/index.d.ts +0 -102
  177. package/dist/components/index.js +0 -1
  178. package/dist/components/p-6SWSrfmW.js +0 -1
  179. package/dist/components/p-B_DaIVEY.js +0 -1
  180. package/dist/components/p-Bh_1GxOD.js +0 -1
  181. package/dist/components/p-BnGhGgTH.js +0 -1
  182. package/dist/components/p-BzaB_bXo.js +0 -1
  183. package/dist/components/p-C-0syqXZ.js +0 -1
  184. package/dist/components/p-CoFximGM.js +0 -13
  185. package/dist/components/p-JwSoedEO.js +0 -1
  186. package/dist/components/p-Vc4ExHFc.js +0 -1
  187. package/dist/components/p-hgBUJRDa.js +0 -1
  188. package/dist/components/ui-affordance-scope.d.ts +0 -11
  189. package/dist/components/ui-affordance-scope.js +0 -1
  190. package/dist/components/ui-avatar-group.d.ts +0 -11
  191. package/dist/components/ui-avatar-group.js +0 -1
  192. package/dist/components/ui-avatar.d.ts +0 -11
  193. package/dist/components/ui-avatar.js +0 -1
  194. package/dist/components/ui-badge.d.ts +0 -11
  195. package/dist/components/ui-badge.js +0 -1
  196. package/dist/components/ui-button.d.ts +0 -11
  197. package/dist/components/ui-button.js +0 -1
  198. package/dist/components/ui-callout.d.ts +0 -11
  199. package/dist/components/ui-callout.js +0 -1
  200. package/dist/components/ui-checkbox.d.ts +0 -11
  201. package/dist/components/ui-checkbox.js +0 -1
  202. package/dist/components/ui-chip.d.ts +0 -11
  203. package/dist/components/ui-chip.js +0 -1
  204. package/dist/components/ui-combobox.d.ts +0 -11
  205. package/dist/components/ui-combobox.js +0 -1
  206. package/dist/components/ui-context-menu.d.ts +0 -11
  207. package/dist/components/ui-context-menu.js +0 -1
  208. package/dist/components/ui-dialog.d.ts +0 -11
  209. package/dist/components/ui-dialog.js +0 -1
  210. package/dist/components/ui-disclosure.d.ts +0 -11
  211. package/dist/components/ui-disclosure.js +0 -1
  212. package/dist/components/ui-editable.d.ts +0 -11
  213. package/dist/components/ui-editable.js +0 -1
  214. package/dist/components/ui-floating-action-button.d.ts +0 -11
  215. package/dist/components/ui-floating-action-button.js +0 -1
  216. package/dist/components/ui-form-field.d.ts +0 -11
  217. package/dist/components/ui-form-field.js +0 -1
  218. package/dist/components/ui-icon-button.d.ts +0 -11
  219. package/dist/components/ui-icon-button.js +0 -1
  220. package/dist/components/ui-input.d.ts +0 -11
  221. package/dist/components/ui-input.js +0 -1
  222. package/dist/components/ui-menu-item.d.ts +0 -11
  223. package/dist/components/ui-menu-item.js +0 -1
  224. package/dist/components/ui-menu.d.ts +0 -11
  225. package/dist/components/ui-menu.js +0 -1
  226. package/dist/components/ui-popover.d.ts +0 -11
  227. package/dist/components/ui-popover.js +0 -1
  228. package/dist/components/ui-radio-group.d.ts +0 -11
  229. package/dist/components/ui-radio-group.js +0 -1
  230. package/dist/components/ui-radio.d.ts +0 -11
  231. package/dist/components/ui-radio.js +0 -1
  232. package/dist/components/ui-search-result-row.d.ts +0 -11
  233. package/dist/components/ui-search-result-row.js +0 -1
  234. package/dist/components/ui-search-shell.d.ts +0 -11
  235. package/dist/components/ui-search-shell.js +0 -1
  236. package/dist/components/ui-select.d.ts +0 -11
  237. package/dist/components/ui-select.js +0 -1
  238. package/dist/components/ui-switch.d.ts +0 -11
  239. package/dist/components/ui-switch.js +0 -1
  240. package/dist/components/ui-tabs.d.ts +0 -11
  241. package/dist/components/ui-tabs.js +0 -1
  242. package/dist/components/ui-textarea.d.ts +0 -11
  243. package/dist/components/ui-textarea.js +0 -1
  244. package/dist/components/ui-toast-region.d.ts +0 -11
  245. package/dist/components/ui-toast-region.js +0 -1
  246. package/dist/components/ui-tooltip.d.ts +0 -11
  247. package/dist/components/ui-tooltip.js +0 -1
  248. package/dist/components/ui-top-bar.d.ts +0 -11
  249. package/dist/components/ui-top-bar.js +0 -1
  250. package/dist/components/ui-tree-item.d.ts +0 -11
  251. package/dist/components/ui-tree-item.js +0 -1
  252. package/dist/components/ui-tree.d.ts +0 -11
  253. package/dist/components/ui-tree.js +0 -1
  254. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  255. package/dist/esm/controlled-state-BnGhGgTH.js +0 -6
  256. package/dist/esm/events-JwSoedEO.js +0 -15
  257. package/dist/esm/icons-CoFximGM.js +0 -678
  258. package/dist/esm/id-hgBUJRDa.js +0 -7
  259. package/dist/esm/index-8BGiMGQ0.js +0 -1593
  260. package/dist/esm/index.js +0 -1
  261. package/dist/esm/loader.js +0 -11
  262. package/dist/esm/looma.js +0 -21
  263. package/dist/esm/manager-C-0syqXZ.js +0 -91
  264. package/dist/esm/positioning-ZOr-2PSe.js +0 -421
  265. package/dist/esm/ui-affordance-scope.entry.js +0 -41
  266. package/dist/esm/ui-avatar-group.entry.js +0 -41
  267. package/dist/esm/ui-avatar.entry.js +0 -48
  268. package/dist/esm/ui-badge.entry.js +0 -17
  269. package/dist/esm/ui-button.entry.js +0 -73
  270. package/dist/esm/ui-callout.entry.js +0 -25
  271. package/dist/esm/ui-checkbox.entry.js +0 -95
  272. package/dist/esm/ui-chip_2.entry.js +0 -255
  273. package/dist/esm/ui-combobox.entry.js +0 -706
  274. package/dist/esm/ui-context-menu.entry.js +0 -237
  275. package/dist/esm/ui-dialog.entry.js +0 -129
  276. package/dist/esm/ui-disclosure.entry.js +0 -110
  277. package/dist/esm/ui-editable.entry.js +0 -98
  278. package/dist/esm/ui-floating-action-button.entry.js +0 -18
  279. package/dist/esm/ui-form-field.entry.js +0 -112
  280. package/dist/esm/ui-icon-button.entry.js +0 -21
  281. package/dist/esm/ui-input.entry.js +0 -104
  282. package/dist/esm/ui-menu-item.entry.js +0 -17
  283. package/dist/esm/ui-menu.entry.js +0 -180
  284. package/dist/esm/ui-popover.entry.js +0 -133
  285. package/dist/esm/ui-radio-group.entry.js +0 -132
  286. package/dist/esm/ui-radio.entry.js +0 -92
  287. package/dist/esm/ui-search-result-row.entry.js +0 -45
  288. package/dist/esm/ui-search-shell.entry.js +0 -37
  289. package/dist/esm/ui-select.entry.js +0 -106
  290. package/dist/esm/ui-switch.entry.js +0 -72
  291. package/dist/esm/ui-tabs.entry.js +0 -116
  292. package/dist/esm/ui-textarea.entry.js +0 -108
  293. package/dist/esm/ui-toast-region.entry.js +0 -91
  294. package/dist/esm/ui-top-bar.entry.js +0 -41
  295. package/dist/esm/ui-tree-item.entry.js +0 -133
  296. package/dist/esm/ui-tree.entry.js +0 -498
  297. package/dist/index.cjs.js +0 -1
  298. package/dist/looma/index.esm.js +0 -0
  299. package/dist/looma/looma.esm.js +0 -1
  300. package/dist/looma/p-08f80207.entry.js +0 -1
  301. package/dist/looma/p-0b5b8d9e.entry.js +0 -1
  302. package/dist/looma/p-1249a806.entry.js +0 -1
  303. package/dist/looma/p-16e0669d.entry.js +0 -1
  304. package/dist/looma/p-1c00670f.entry.js +0 -1
  305. package/dist/looma/p-1c5a7522.entry.js +0 -1
  306. package/dist/looma/p-22842f8c.entry.js +0 -1
  307. package/dist/looma/p-2915d5c0.entry.js +0 -1
  308. package/dist/looma/p-3b2961a6.entry.js +0 -1
  309. package/dist/looma/p-3f60f4c8.entry.js +0 -1
  310. package/dist/looma/p-424d6719.entry.js +0 -1
  311. package/dist/looma/p-4caccfce.entry.js +0 -1
  312. package/dist/looma/p-5fdcee1d.entry.js +0 -1
  313. package/dist/looma/p-6d8b99ee.entry.js +0 -1
  314. package/dist/looma/p-6f20d470.entry.js +0 -1
  315. package/dist/looma/p-7c0b5364.entry.js +0 -1
  316. package/dist/looma/p-8BGiMGQ0.js +0 -2
  317. package/dist/looma/p-8bdd9495.entry.js +0 -1
  318. package/dist/looma/p-99116a72.entry.js +0 -1
  319. package/dist/looma/p-9cfbf722.entry.js +0 -1
  320. package/dist/looma/p-9d2662ca.entry.js +0 -1
  321. package/dist/looma/p-9ff2fa19.entry.js +0 -1
  322. package/dist/looma/p-BnGhGgTH.js +0 -1
  323. package/dist/looma/p-C-0syqXZ.js +0 -1
  324. package/dist/looma/p-CoFximGM.js +0 -13
  325. package/dist/looma/p-DQuL1Twl.js +0 -1
  326. package/dist/looma/p-JwSoedEO.js +0 -1
  327. package/dist/looma/p-ZOr-2PSe.js +0 -1
  328. package/dist/looma/p-a2dd4c6c.entry.js +0 -1
  329. package/dist/looma/p-add67e4c.entry.js +0 -1
  330. package/dist/looma/p-b6ede6bb.entry.js +0 -1
  331. package/dist/looma/p-b76e2111.entry.js +0 -1
  332. package/dist/looma/p-ca2a54fd.entry.js +0 -1
  333. package/dist/looma/p-d372b0db.entry.js +0 -1
  334. package/dist/looma/p-d4825822.entry.js +0 -1
  335. package/dist/looma/p-d56571a2.entry.js +0 -1
  336. package/dist/looma/p-d5c3954f.entry.js +0 -1
  337. package/dist/looma/p-e604e906.entry.js +0 -1
  338. package/dist/looma/p-f1f7c5cb.entry.js +0 -1
  339. package/dist/looma/p-hgBUJRDa.js +0 -1
  340. package/dist/types/components/ui-affordance-scope/ui-affordance-scope.d.ts +0 -11
  341. package/dist/types/components/ui-avatar/ui-avatar.d.ts +0 -11
  342. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +0 -11
  343. package/dist/types/components/ui-badge/ui-badge.d.ts +0 -5
  344. package/dist/types/components/ui-button/ui-button.d.ts +0 -13
  345. package/dist/types/components/ui-callout/ui-callout.d.ts +0 -6
  346. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +0 -20
  347. package/dist/types/components/ui-chip/ui-chip.d.ts +0 -8
  348. package/dist/types/components/ui-combobox/ui-combobox.d.ts +0 -128
  349. package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +0 -43
  350. package/dist/types/components/ui-dialog/ui-dialog.d.ts +0 -27
  351. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +0 -21
  352. package/dist/types/components/ui-editable/ui-editable.d.ts +0 -24
  353. package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +0 -6
  354. package/dist/types/components/ui-form-field/ui-form-field.d.ts +0 -18
  355. package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +0 -9
  356. package/dist/types/components/ui-input/ui-input.d.ts +0 -19
  357. package/dist/types/components/ui-menu/ui-menu.d.ts +0 -28
  358. package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +0 -5
  359. package/dist/types/components/ui-popover/ui-popover.d.ts +0 -26
  360. package/dist/types/components/ui-radio/ui-radio.d.ts +0 -20
  361. package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +0 -21
  362. package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +0 -15
  363. package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +0 -9
  364. package/dist/types/components/ui-select/ui-select.d.ts +0 -20
  365. package/dist/types/components/ui-switch/ui-switch.d.ts +0 -16
  366. package/dist/types/components/ui-tabs/ui-tabs.d.ts +0 -18
  367. package/dist/types/components/ui-textarea/ui-textarea.d.ts +0 -20
  368. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +0 -16
  369. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +0 -57
  370. package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +0 -12
  371. package/dist/types/components/ui-tree/ui-tree.d.ts +0 -53
  372. package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +0 -44
  373. package/dist/types/components.d.ts +0 -1889
  374. package/dist/types/field/combobox.d.ts +0 -46
  375. package/dist/types/field/editable.d.ts +0 -5
  376. package/dist/types/field/multi-combobox.d.ts +0 -11
  377. package/dist/types/field/valibot.d.ts +0 -7
  378. package/dist/types/icons.d.ts +0 -53
  379. package/dist/types/input-modality.d.ts +0 -6
  380. package/dist/types/overlay/manager.d.ts +0 -17
  381. package/dist/types/overlay/positioning.d.ts +0 -74
  382. package/dist/types/stencil-public-runtime.d.ts +0 -1860
  383. package/dist/types/utils/controlled-state.d.ts +0 -4
  384. package/dist/types/utils/drag-drop.d.ts +0 -15
  385. package/dist/types/utils/events.d.ts +0 -4
  386. package/dist/types/utils/id.d.ts +0 -1
  387. package/dist/types/utils/initials.d.ts +0 -1
  388. package/dist/ui-affordance-scope.entry-L6TIXYOP.js +0 -54
  389. package/dist/ui-avatar-group.entry-TCAA6P72.js +0 -51
  390. package/dist/ui-avatar.entry-52DQ7VXA.js +0 -51
  391. package/dist/ui-badge.entry-2XCAA6LL.js +0 -22
  392. package/dist/ui-button.entry-MNFBMNSX.js +0 -83
  393. package/dist/ui-callout.entry-SSHT5TH2.js +0 -32
  394. package/dist/ui-checkbox.entry-LOWIWIWI.js +0 -111
  395. package/dist/ui-chip_2.entry-BIMTSF6C.js +0 -272
  396. package/dist/ui-combobox.entry-25Z4MN7N.js +0 -717
  397. package/dist/ui-context-menu.entry-YZDL5Y4M.js +0 -248
  398. package/dist/ui-dialog.entry-HIXZX5AB.js +0 -146
  399. package/dist/ui-disclosure.entry-2JZHZNDQ.js +0 -126
  400. package/dist/ui-editable.entry-U3VR3XPT.js +0 -110
  401. package/dist/ui-floating-action-button.entry-6S3QN3KJ.js +0 -23
  402. package/dist/ui-form-field.entry-GQOSMLHT.js +0 -120
  403. package/dist/ui-icon-button.entry-QJXKVDM6.js +0 -26
  404. package/dist/ui-input.entry-UWMQ6JMP.js +0 -114
  405. package/dist/ui-menu-item.entry-NHNZKKJS.js +0 -22
  406. package/dist/ui-menu.entry-D53RUJND.js +0 -192
  407. package/dist/ui-popover.entry-7ZSIWCFQ.js +0 -152
  408. package/dist/ui-radio-group.entry-37MSYIH4.js +0 -142
  409. package/dist/ui-radio.entry-7YGCDHXT.js +0 -108
  410. package/dist/ui-search-result-row.entry-6FCCLGAS.js +0 -50
  411. package/dist/ui-search-shell.entry-HSBEXPER.js +0 -41
  412. package/dist/ui-select.entry-GIDIAYRD.js +0 -117
  413. package/dist/ui-switch.entry-MYAL6XPC.js +0 -87
  414. package/dist/ui-tabs.entry-R4TEXQSD.js +0 -128
  415. package/dist/ui-textarea.entry-FW32JNDV.js +0 -119
  416. package/dist/ui-toast-region.entry-BTMFPKZF.js +0 -104
  417. package/dist/ui-top-bar.entry-5DQGJF3B.js +0 -49
  418. package/dist/ui-tree-item.entry-ADT7DSOS.js +0 -145
  419. package/dist/ui-tree.entry-7PYQ5RIN.js +0 -470
  420. package/editor/chunk-64GLF274.js +0 -1271
  421. package/layout/index.css +0 -387
  422. package/loader/cdn.js +0 -1
  423. package/loader/index.cjs.js +0 -1
  424. package/loader/index.d.ts +0 -24
  425. package/loader/index.es2017.js +0 -1
  426. package/loader/index.js +0 -2
  427. package/vue/chunk-ROMBQS2L.js +0 -352
package/layout/index.cjs CHANGED
@@ -17,417 +17,483 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- registerLayoutPrimitives: () => registerLayoutPrimitives
20
+ // src/declarative-index.ts
21
+ var declarative_index_exports = {};
22
+ module.exports = __toCommonJS(declarative_index_exports);
23
+ var import_declarative = require("@threadlabs/looma/core/declarative");
24
+
25
+ // ../../tools/migrate-html-next/generated/layout/components/controllers/ui-reel.js
26
+ var ui_reel_exports = {};
27
+ __export(ui_reel_exports, {
28
+ default: () => controller
24
29
  });
25
- module.exports = __toCommonJS(index_exports);
26
- var ORIENTATION_HORIZONTAL = "horizontal";
27
- var ORIENTATION_VERTICAL = "vertical";
28
- function normalizeOrientation(value) {
29
- return value === ORIENTATION_VERTICAL ? ORIENTATION_VERTICAL : ORIENTATION_HORIZONTAL;
30
+ function controller(host) {
31
+ const element = host.element;
32
+ if (!element.hasAttribute("role")) element.setAttribute("role", "region");
33
+ if (!element.hasAttribute("tabindex")) element.setAttribute("tabindex", "0");
30
34
  }
31
- if (typeof HTMLElement !== "undefined") {
32
- class UILayoutElement extends HTMLElement {
33
- getPrimitiveAttribute(name) {
34
- return this.getAttribute(name) ?? "";
35
- }
36
- setPrimitiveAttribute(name, value) {
37
- const normalizedValue = value.trim();
38
- if (normalizedValue.length === 0) {
39
- this.removeAttribute(name);
40
- return;
41
- }
42
- this.setAttribute(name, normalizedValue);
43
- }
35
+
36
+ // ../../tools/migrate-html-next/generated/layout/components/controllers/ui-separator.js
37
+ var ui_separator_exports = {};
38
+ __export(ui_separator_exports, {
39
+ default: () => controller2
40
+ });
41
+ function controller2(host) {
42
+ const element = host.element;
43
+ const sync = () => {
44
+ if (!element.hasAttribute("role")) element.setAttribute("role", "separator");
45
+ if (element.getAttribute("role") === "separator") {
46
+ element.setAttribute("aria-orientation", host.state.orientation === "vertical" ? "vertical" : "horizontal");
47
+ } else {
48
+ element.removeAttribute("aria-orientation");
49
+ }
50
+ };
51
+ const stop = host.effect(sync);
52
+ const observer = new MutationObserver(sync);
53
+ observer.observe(element, { attributes: true, attributeFilter: ["role"] });
54
+ sync();
55
+ return () => {
56
+ stop();
57
+ observer.disconnect();
58
+ };
59
+ }
60
+
61
+ // ../../tools/migrate-html-next/generated/layout/components/controllers/ui-sidebar.js
62
+ var ui_sidebar_exports = {};
63
+ __export(ui_sidebar_exports, {
64
+ default: () => controller3
65
+ });
66
+ function positive(value, fallback) {
67
+ const number = Number(value);
68
+ return Number.isFinite(number) && number > 0 ? number : fallback;
69
+ }
70
+ function controller3(host) {
71
+ const element = host.element;
72
+ let resizeHandle;
73
+ let pointerAbort;
74
+ const bounds = () => {
75
+ const min = positive(host.state.minWidth, 176);
76
+ return { min, max: Math.max(min, positive(host.state.maxWidth, 480)), step: positive(host.state.resizeStep, 16) };
77
+ };
78
+ const defaultWidth = () => host.state.width === "narrow" ? 224 : host.state.width === "wide" ? 384 : 288;
79
+ const storageId = () => {
80
+ const key = String(host.state.storageKey ?? "").trim();
81
+ return key ? `looma:sidebar-width:${key}` : null;
82
+ };
83
+ const readStoredWidth = () => {
84
+ const key = storageId();
85
+ if (!key || typeof localStorage === "undefined") return null;
86
+ try {
87
+ const value = Number(localStorage.getItem(key));
88
+ return Number.isFinite(value) && value > 0 ? value : null;
89
+ } catch {
90
+ return null;
91
+ }
92
+ };
93
+ const persistWidth = (width) => {
94
+ const key = storageId();
95
+ if (!key || typeof localStorage === "undefined") return;
96
+ try {
97
+ localStorage.setItem(key, String(width));
98
+ } catch {
99
+ }
100
+ };
101
+ const currentWidth = () => {
102
+ const inline = Number.parseFloat(element.style.getPropertyValue("--ui-sidebar-width"));
103
+ if (Number.isFinite(inline)) return inline;
104
+ const children = [...element.children].filter((child) => !child.hasAttribute("data-ui-sidebar-resizer"));
105
+ const region = host.state.side === "end" ? children.at(-1) : children[0];
106
+ return region?.getBoundingClientRect().width || defaultWidth();
107
+ };
108
+ const setWidth = (value, persist = false, trigger = "programmatic") => {
109
+ const { min, max } = bounds();
110
+ const width = Math.round(Math.max(min, Math.min(max, value)));
111
+ const previous = Number.parseFloat(element.style.getPropertyValue("--ui-sidebar-width"));
112
+ element.style.setProperty("--ui-sidebar-width", `${width}px`);
113
+ resizeHandle?.setAttribute("aria-valuemin", String(min));
114
+ resizeHandle?.setAttribute("aria-valuemax", String(max));
115
+ resizeHandle?.setAttribute("aria-valuenow", String(width));
116
+ if (persist && previous !== width) persistWidth(width);
117
+ if (!Number.isFinite(previous) || previous !== width) host.dispatch("resize", { width, trigger });
118
+ };
119
+ const onKeydown = (event) => {
120
+ const { min, max, step } = bounds();
121
+ let next = null;
122
+ if (event.key === "Home") next = min;
123
+ if (event.key === "End") next = max;
124
+ if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
125
+ const delta = event.key === "ArrowRight" ? step : -step;
126
+ next = currentWidth() + (host.state.side === "end" ? -delta : delta);
127
+ }
128
+ if (next === null) return;
129
+ event.preventDefault();
130
+ setWidth(next, true, "keyboard");
131
+ };
132
+ const onPointerdown = (event) => {
133
+ if (event.button !== 0 || pointerAbort) return;
134
+ event.preventDefault();
135
+ const startX = event.clientX;
136
+ const startWidth = currentWidth();
137
+ const multiplier = host.state.side === "end" ? -1 : 1;
138
+ pointerAbort = new AbortController();
139
+ const signal = pointerAbort.signal;
140
+ const finish = () => {
141
+ persistWidth(currentWidth());
142
+ pointerAbort?.abort();
143
+ pointerAbort = void 0;
144
+ };
145
+ window.addEventListener("pointermove", (move) => {
146
+ setWidth(startWidth + (move.clientX - startX) * multiplier, false, "pointer");
147
+ }, { signal });
148
+ window.addEventListener("pointerup", finish, { once: true, signal });
149
+ window.addEventListener("pointercancel", finish, { once: true, signal });
150
+ };
151
+ const removeHandle = () => {
152
+ pointerAbort?.abort();
153
+ pointerAbort = void 0;
154
+ resizeHandle?.remove();
155
+ resizeHandle = void 0;
156
+ };
157
+ const sync = () => {
158
+ if (!host.state.resizable) {
159
+ removeHandle();
160
+ return;
161
+ }
162
+ if (!resizeHandle) {
163
+ resizeHandle = document.createElement("div");
164
+ resizeHandle.setAttribute("data-ui-sidebar-resizer", "");
165
+ resizeHandle.setAttribute("data-ui-affordance", "resize");
166
+ resizeHandle.setAttribute("role", "separator");
167
+ resizeHandle.setAttribute("aria-orientation", "vertical");
168
+ resizeHandle.setAttribute("tabindex", "0");
169
+ const guide = document.createElement("span");
170
+ guide.setAttribute("data-ui-guide", "");
171
+ guide.setAttribute("aria-hidden", "true");
172
+ resizeHandle.append(guide);
173
+ resizeHandle.addEventListener("keydown", onKeydown);
174
+ resizeHandle.addEventListener("pointerdown", onPointerdown);
175
+ resizeHandle.addEventListener("dblclick", () => setWidth(defaultWidth(), true, "pointer"));
176
+ element.append(resizeHandle);
177
+ setWidth(readStoredWidth() ?? currentWidth());
178
+ }
179
+ resizeHandle.setAttribute("aria-label", String(host.state.resizeLabel || "Resize sidebar"));
180
+ setWidth(currentWidth());
181
+ };
182
+ const stop = host.effect(sync);
183
+ sync();
184
+ return () => {
185
+ stop();
186
+ removeHandle();
187
+ };
188
+ }
189
+
190
+ // ../../tools/migrate-html-next/generated/adoption/layout/registry.js
191
+ var records = [
192
+ { tag: "ui-center", source: '<template component="ui-center" status="early" summary="Looma ui-center layout primitive.">\n <defs>\n <prop name="measure" type="narrow | wide">measure token.</prop>\n <prop name="gutters" type="s | m | l">gutters token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
193
+ { tag: "ui-cluster", source: '<template component="ui-cluster" status="early" summary="Looma ui-cluster layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n <prop name="justify" type="start | center | end | between">justify token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
194
+ { tag: "ui-grid", source: '<template component="ui-grid" status="early" summary="Looma ui-grid layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="min" type="sm | md | lg">min token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
195
+ { tag: "ui-inline", source: '<template component="ui-inline" status="early" summary="Looma ui-inline layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n <prop name="justify" type="start | center | end | between">justify token.</prop>\n <prop name="wrap" type="wrap | nowrap">wrap token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
196
+ { tag: "ui-reel", source: '<template component="ui-reel" status="early" summary="Looma ui-reel layout primitive." controller="./controllers/ui-reel.js">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="itemWidth" type="sm | md | lg">itemWidth token.</prop>\n <prop name="snap" type="start | center">snap token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: ui_reel_exports },
197
+ { tag: "ui-separator", source: '<template component="ui-separator" status="early" summary="Looma ui-separator layout primitive." controller="./controllers/ui-separator.js">\n <defs>\n <prop name="orientation" type="horizontal | vertical" default="horizontal">orientation token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: ui_separator_exports },
198
+ { tag: "ui-sidebar", source: '<template component="ui-sidebar" status="early" summary="Looma ui-sidebar layout primitive." controller="./controllers/ui-sidebar.js">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="side" type="start | end" default="start">side token.</prop>\n <prop name="width" type="narrow | default | wide" default="default">width token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n <prop name="resizable" type="boolean" default="false">resizable token.</prop>\n <prop name="storageKey" type="string">storageKey token.</prop>\n <prop name="minWidth" type="number" default="176">minWidth token.</prop>\n <prop name="maxWidth" type="number" default="480">maxWidth token.</prop>\n <prop name="resizeStep" type="number" default="16">resizeStep token.</prop>\n <prop name="resizeLabel" type="string" default="Resize sidebar">resizeLabel token.</prop>\n <event name="resize" type="object({ width: number, trigger: keyboard | pointer | programmatic })"></event>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: ui_sidebar_exports },
199
+ { tag: "ui-stack", source: '<template component="ui-stack" status="early" summary="Looma ui-stack layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n <prop name="justify" type="start | center | end | between">justify token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 },
200
+ { tag: "ui-switcher", source: '<template component="ui-switcher" status="early" summary="Looma ui-switcher layout primitive.">\n <defs>\n <prop name="gap" type="xs | s | m | l | xl">gap token.</prop>\n <prop name="threshold" type="xs | sm | md | lg">threshold token.</prop>\n <prop name="align" type="start | center | end | stretch">align token.</prop>\n </defs>\n <div><slot></slot></div>\n</template>\n', controller: void 0 }
201
+ ];
202
+ var styles = `/* Unlayered: box-model guarantees that remain safe for host composition. */
203
+ :where([data-component-root~="ui-stack"], [data-component-root~="ui-inline"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-center"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]),
204
+ :where([data-component-root~="ui-stack"], [data-component-root~="ui-inline"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-center"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) *,
205
+ :where([data-component-root~="ui-stack"], [data-component-root~="ui-inline"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-center"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) *::before,
206
+ :where([data-component-root~="ui-stack"], [data-component-root~="ui-inline"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-center"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) *::after {
207
+ box-sizing: border-box;
208
+ }
209
+
210
+ :where([data-component-root~="ui-stack"], [data-component-root~="ui-inline"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-center"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) {
211
+ /* Reveal Looma's component layer instead of reverting past it. */
212
+ all: revert-layer;
213
+ box-sizing: border-box;
214
+ font-family: var(--ui-font-family-sans);
215
+ font-size: var(--ui-font-size-md);
216
+ line-height: var(--ui-line-height-md);
217
+ color: var(--ui-text-primary);
218
+ }
219
+
220
+ :where([data-component-root~="ui-stack"], [data-component-root~="ui-inline"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-center"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"])[data-ui-inherit-typography] {
221
+ font-family: inherit;
222
+ font-size: inherit;
223
+ line-height: inherit;
224
+ font-weight: inherit;
225
+ color: inherit;
226
+ direction: inherit;
227
+ writing-mode: inherit;
228
+ text-orientation: inherit;
229
+ text-rendering: inherit;
230
+ font-feature-settings: inherit;
231
+ font-variation-settings: inherit;
232
+ }
233
+
234
+ @layer components {
235
+ :where([data-component-root~="ui-stack"], [data-component-root~="ui-inline"], [data-component-root~="ui-cluster"], [data-component-root~="ui-grid"], [data-component-root~="ui-center"], [data-component-root~="ui-switcher"], [data-component-root~="ui-sidebar"], [data-component-root~="ui-reel"], [data-component-root~="ui-separator"]) {
236
+ min-inline-size: 0;
237
+ max-inline-size: 100%;
238
+ margin: 0;
44
239
  }
45
- class UIStackElement extends UILayoutElement {
46
- static get observedAttributes() {
47
- return ["gap", "align", "justify"];
48
- }
49
- get gap() {
50
- return this.getPrimitiveAttribute("gap");
51
- }
52
- set gap(value) {
53
- this.setPrimitiveAttribute("gap", value);
54
- }
55
- get align() {
56
- return this.getPrimitiveAttribute("align");
57
- }
58
- set align(value) {
59
- this.setPrimitiveAttribute("align", value);
60
- }
61
- get justify() {
62
- return this.getPrimitiveAttribute("justify");
63
- }
64
- set justify(value) {
65
- this.setPrimitiveAttribute("justify", value);
66
- }
240
+
241
+ [data-component-root~="ui-stack"] {
242
+ --ui-layout-gap: var(--ui-space-4, 1rem);
243
+ --ui-layout-align: stretch;
244
+ --ui-layout-justify: flex-start;
245
+ display: flex;
246
+ flex-direction: column;
247
+ gap: var(--ui-layout-gap);
248
+ align-items: var(--ui-layout-align);
249
+ justify-content: var(--ui-layout-justify);
67
250
  }
68
- class UIInlineElement extends UILayoutElement {
69
- static get observedAttributes() {
70
- return ["gap", "align", "justify", "wrap"];
71
- }
72
- get gap() {
73
- return this.getPrimitiveAttribute("gap");
74
- }
75
- set gap(value) {
76
- this.setPrimitiveAttribute("gap", value);
77
- }
78
- get align() {
79
- return this.getPrimitiveAttribute("align");
80
- }
81
- set align(value) {
82
- this.setPrimitiveAttribute("align", value);
83
- }
84
- get justify() {
85
- return this.getPrimitiveAttribute("justify");
86
- }
87
- set justify(value) {
88
- this.setPrimitiveAttribute("justify", value);
89
- }
90
- get wrap() {
91
- return this.getPrimitiveAttribute("wrap");
92
- }
93
- set wrap(value) {
94
- this.setPrimitiveAttribute("wrap", value);
95
- }
251
+
252
+ [data-component-root~="ui-stack"][data-gap="xs"] { --ui-layout-gap: var(--ui-space-2, 0.5rem); }
253
+ [data-component-root~="ui-stack"][data-gap="s"] { --ui-layout-gap: var(--ui-space-3, 0.75rem); }
254
+ [data-component-root~="ui-stack"][data-gap="m"] { --ui-layout-gap: var(--ui-space-4, 1rem); }
255
+ [data-component-root~="ui-stack"][data-gap="l"] { --ui-layout-gap: var(--ui-space-5, 1.5rem); }
256
+ [data-component-root~="ui-stack"][data-gap="xl"] { --ui-layout-gap: var(--ui-space-6, 2rem); }
257
+ [data-component-root~="ui-stack"][data-align="start"] { --ui-layout-align: flex-start; }
258
+ [data-component-root~="ui-stack"][data-align="center"] { --ui-layout-align: center; }
259
+ [data-component-root~="ui-stack"][data-align="end"] { --ui-layout-align: flex-end; }
260
+ [data-component-root~="ui-stack"][data-justify="center"] { --ui-layout-justify: center; }
261
+ [data-component-root~="ui-stack"][data-justify="end"] { --ui-layout-justify: flex-end; }
262
+ [data-component-root~="ui-stack"][data-justify="between"] { --ui-layout-justify: space-between; }
263
+
264
+ [data-component-root~="ui-inline"],
265
+ [data-component-root~="ui-cluster"] {
266
+ --ui-layout-gap: var(--ui-space-3, 0.75rem);
267
+ --ui-layout-align: center;
268
+ --ui-layout-justify: flex-start;
269
+ display: flex;
270
+ flex-wrap: wrap;
271
+ align-items: var(--ui-layout-align);
272
+ justify-content: var(--ui-layout-justify);
273
+ gap: var(--ui-layout-gap);
96
274
  }
97
- class UIClusterElement extends UILayoutElement {
98
- static get observedAttributes() {
99
- return ["gap", "align", "justify"];
100
- }
101
- get gap() {
102
- return this.getPrimitiveAttribute("gap");
103
- }
104
- set gap(value) {
105
- this.setPrimitiveAttribute("gap", value);
106
- }
107
- get align() {
108
- return this.getPrimitiveAttribute("align");
109
- }
110
- set align(value) {
111
- this.setPrimitiveAttribute("align", value);
112
- }
113
- get justify() {
114
- return this.getPrimitiveAttribute("justify");
115
- }
116
- set justify(value) {
117
- this.setPrimitiveAttribute("justify", value);
118
- }
275
+
276
+ [data-component-root~="ui-inline"][data-wrap="nowrap"] { flex-wrap: nowrap; }
277
+ [data-component-root~="ui-inline"][data-gap="xs"],
278
+ [data-component-root~="ui-cluster"][data-gap="xs"] { --ui-layout-gap: var(--ui-space-2, 0.5rem); }
279
+ [data-component-root~="ui-inline"][data-gap="s"],
280
+ [data-component-root~="ui-cluster"][data-gap="s"] { --ui-layout-gap: var(--ui-space-3, 0.75rem); }
281
+ [data-component-root~="ui-inline"][data-gap="m"],
282
+ [data-component-root~="ui-cluster"][data-gap="m"] { --ui-layout-gap: var(--ui-space-4, 1rem); }
283
+
284
+ [data-component-root~="ui-grid"] {
285
+ --ui-grid-gap: var(--ui-space-4, 1rem);
286
+ --ui-grid-min: 16rem;
287
+ display: grid;
288
+ gap: var(--ui-grid-gap);
289
+ grid-template-columns: repeat(auto-fit, minmax(min(var(--ui-grid-min), 100%), 1fr));
119
290
  }
120
- class UIGridElement extends UILayoutElement {
121
- static get observedAttributes() {
122
- return ["gap", "min"];
123
- }
124
- get gap() {
125
- return this.getPrimitiveAttribute("gap");
126
- }
127
- set gap(value) {
128
- this.setPrimitiveAttribute("gap", value);
129
- }
130
- get min() {
131
- return this.getPrimitiveAttribute("min");
132
- }
133
- set min(value) {
134
- this.setPrimitiveAttribute("min", value);
135
- }
291
+
292
+ [data-component-root~="ui-grid"][data-gap="xs"] { --ui-grid-gap: var(--ui-space-2, 0.5rem); }
293
+ [data-component-root~="ui-grid"][data-gap="s"] { --ui-grid-gap: var(--ui-space-3, 0.75rem); }
294
+ [data-component-root~="ui-grid"][data-gap="m"] { --ui-grid-gap: var(--ui-space-4, 1rem); }
295
+ [data-component-root~="ui-grid"][data-gap="l"] { --ui-grid-gap: var(--ui-space-5, 1.5rem); }
296
+ [data-component-root~="ui-grid"][data-min="sm"] { --ui-grid-min: 12rem; }
297
+ [data-component-root~="ui-grid"][data-min="md"] { --ui-grid-min: 16rem; }
298
+ [data-component-root~="ui-grid"][data-min="lg"] { --ui-grid-min: 20rem; }
299
+
300
+ [data-component-root~="ui-center"] {
301
+ --ui-center-measure: 65ch;
302
+ --ui-center-gutters: var(--ui-space-4, 1rem);
303
+ display: block;
304
+ inline-size: 100%;
305
+ max-inline-size: var(--ui-center-measure);
306
+ margin-inline: auto;
307
+ padding-inline: var(--ui-center-gutters);
136
308
  }
137
- class UICenterElement extends UILayoutElement {
138
- static get observedAttributes() {
139
- return ["measure", "gutters"];
140
- }
141
- get measure() {
142
- return this.getPrimitiveAttribute("measure");
143
- }
144
- set measure(value) {
145
- this.setPrimitiveAttribute("measure", value);
146
- }
147
- get gutters() {
148
- return this.getPrimitiveAttribute("gutters");
149
- }
150
- set gutters(value) {
151
- this.setPrimitiveAttribute("gutters", value);
152
- }
309
+
310
+ [data-component-root~="ui-center"][data-measure="narrow"] { --ui-center-measure: 45ch; }
311
+ [data-component-root~="ui-center"][data-measure="wide"] { --ui-center-measure: 80ch; }
312
+ [data-component-root~="ui-center"][data-gutters="s"] { --ui-center-gutters: var(--ui-space-3, 0.75rem); }
313
+ [data-component-root~="ui-center"][data-gutters="m"] { --ui-center-gutters: var(--ui-space-4, 1rem); }
314
+ [data-component-root~="ui-center"][data-gutters="l"] { --ui-center-gutters: var(--ui-space-5, 1.5rem); }
315
+
316
+ [data-component-root~="ui-switcher"] {
317
+ --ui-switcher-gap: var(--ui-space-4, 1rem);
318
+ --ui-switcher-threshold: 30rem;
319
+ --ui-switcher-align: stretch;
320
+ display: flex;
321
+ flex-wrap: wrap;
322
+ gap: var(--ui-switcher-gap);
323
+ align-items: var(--ui-switcher-align);
153
324
  }
154
- class UISwitcherElement extends UILayoutElement {
155
- static get observedAttributes() {
156
- return ["gap", "threshold", "align"];
157
- }
158
- get gap() {
159
- return this.getPrimitiveAttribute("gap");
160
- }
161
- set gap(value) {
162
- this.setPrimitiveAttribute("gap", value);
163
- }
164
- get threshold() {
165
- return this.getPrimitiveAttribute("threshold");
166
- }
167
- set threshold(value) {
168
- this.setPrimitiveAttribute("threshold", value);
169
- }
170
- get align() {
171
- return this.getPrimitiveAttribute("align");
172
- }
173
- set align(value) {
174
- this.setPrimitiveAttribute("align", value);
175
- }
325
+
326
+ [data-component-root~="ui-switcher"] > * {
327
+ min-inline-size: 0;
328
+ flex-grow: 1;
329
+ flex-basis: calc((var(--ui-switcher-threshold) - 100%) * 999);
176
330
  }
177
- class UISidebarElement extends UILayoutElement {
178
- static get observedAttributes() {
179
- return ["gap", "side", "width", "align", "resizable", "storage-key", "min-width", "max-width", "resize-step", "resize-label"];
180
- }
181
- resizeHandle = null;
182
- resizeAbort = null;
183
- pointerAbort = null;
184
- connectedCallback() {
185
- this.syncResizable();
186
- }
187
- disconnectedCallback() {
188
- this.resizeAbort?.abort();
189
- this.resizeAbort = null;
190
- this.pointerAbort?.abort();
191
- this.pointerAbort = null;
192
- }
193
- attributeChangedCallback(name) {
194
- if (["resizable", "storage-key", "min-width", "max-width", "resize-step", "resize-label", "side", "width"].includes(name)) {
195
- this.syncResizable();
196
- }
197
- }
198
- get gap() {
199
- return this.getPrimitiveAttribute("gap");
200
- }
201
- set gap(value) {
202
- this.setPrimitiveAttribute("gap", value);
203
- }
204
- get side() {
205
- return this.getPrimitiveAttribute("side");
206
- }
207
- set side(value) {
208
- this.setPrimitiveAttribute("side", value);
209
- }
210
- get width() {
211
- return this.getPrimitiveAttribute("width");
212
- }
213
- set width(value) {
214
- this.setPrimitiveAttribute("width", value);
215
- }
216
- get align() {
217
- return this.getPrimitiveAttribute("align");
218
- }
219
- set align(value) {
220
- this.setPrimitiveAttribute("align", value);
221
- }
222
- get resizable() {
223
- return this.hasAttribute("resizable");
224
- }
225
- set resizable(value) {
226
- this.toggleAttribute("resizable", value);
227
- }
228
- numericAttribute(name, fallback) {
229
- const parsed = Number(this.getAttribute(name));
230
- return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
231
- }
232
- bounds() {
233
- const min = this.numericAttribute("min-width", 176);
234
- const max = Math.max(min, this.numericAttribute("max-width", 480));
235
- return { min, max, step: this.numericAttribute("resize-step", 16) };
236
- }
237
- defaultWidth() {
238
- if (this.width === "narrow") return 224;
239
- if (this.width === "wide") return 384;
240
- return 288;
241
- }
242
- storageId() {
243
- const key = this.getAttribute("storage-key")?.trim();
244
- return key ? `looma:sidebar-width:${key}` : null;
245
- }
246
- readStoredWidth() {
247
- const key = this.storageId();
248
- if (!key || typeof localStorage === "undefined") return null;
249
- try {
250
- const parsed = Number(localStorage.getItem(key));
251
- return Number.isFinite(parsed) && parsed > 0 ? parsed : null;
252
- } catch {
253
- return null;
254
- }
255
- }
256
- persistWidth(width) {
257
- const key = this.storageId();
258
- if (!key || typeof localStorage === "undefined") return;
259
- try {
260
- localStorage.setItem(key, String(width));
261
- } catch {
262
- }
263
- }
264
- currentWidth() {
265
- const inline = Number.parseFloat(this.style.getPropertyValue("--ui-sidebar-width"));
266
- if (Number.isFinite(inline)) return inline;
267
- const sideRegion = this.getAttribute("side") === "end" ? this.querySelector(":scope > :last-child:not([data-ui-sidebar-resizer])") : this.querySelector(":scope > :first-child:not([data-ui-sidebar-resizer])");
268
- return sideRegion?.getBoundingClientRect().width || this.defaultWidth();
269
- }
270
- setWidth(value, persist = false, trigger = "programmatic") {
271
- const { min, max } = this.bounds();
272
- const width = Math.round(Math.max(min, Math.min(max, value)));
273
- const previous = Number.parseFloat(this.style.getPropertyValue("--ui-sidebar-width"));
274
- const changed = !Number.isFinite(previous) || previous !== width;
275
- this.style.setProperty("--ui-sidebar-width", `${width}px`);
276
- this.resizeHandle?.setAttribute("aria-valuemin", String(min));
277
- this.resizeHandle?.setAttribute("aria-valuemax", String(max));
278
- this.resizeHandle?.setAttribute("aria-valuenow", String(width));
279
- if (persist && changed) this.persistWidth(width);
280
- if (changed) {
281
- this.dispatchEvent(new CustomEvent("resize", { detail: { width, trigger }, bubbles: true }));
282
- }
283
- }
284
- syncResizable() {
285
- if (!this.isConnected) return;
286
- if (!this.resizable) {
287
- this.resizeAbort?.abort();
288
- this.resizeAbort = null;
289
- this.pointerAbort?.abort();
290
- this.pointerAbort = null;
291
- this.resizeHandle?.remove();
292
- this.resizeHandle = null;
293
- return;
294
- }
295
- if (!this.resizeHandle) {
296
- this.resizeHandle = document.createElement("div");
297
- this.resizeHandle.setAttribute("data-ui-sidebar-resizer", "");
298
- this.resizeHandle.setAttribute("data-ui-affordance", "resize");
299
- this.resizeHandle.setAttribute("role", "separator");
300
- this.resizeHandle.setAttribute("aria-orientation", "vertical");
301
- this.resizeHandle.setAttribute("tabindex", "0");
302
- const guide = document.createElement("span");
303
- guide.setAttribute("data-ui-guide", "");
304
- guide.setAttribute("aria-hidden", "true");
305
- this.resizeHandle.append(guide);
306
- this.append(this.resizeHandle);
307
- }
308
- this.resizeHandle.setAttribute("aria-label", this.getAttribute("resize-label") || "Resize sidebar");
309
- this.resizeAbort?.abort();
310
- this.resizeAbort = new AbortController();
311
- const signal = this.resizeAbort.signal;
312
- this.resizeHandle.addEventListener("keydown", (event) => this.onResizeKey(event), { signal });
313
- this.resizeHandle.addEventListener("pointerdown", (event) => this.onResizePointer(event), { signal });
314
- this.resizeHandle.addEventListener("dblclick", () => this.setWidth(this.defaultWidth(), true, "pointer"), { signal });
315
- this.setWidth(this.readStoredWidth() ?? this.currentWidth());
316
- }
317
- onResizeKey(event) {
318
- const { min, max, step } = this.bounds();
319
- let next = null;
320
- if (event.key === "Home") next = min;
321
- if (event.key === "End") next = max;
322
- if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
323
- const physicalDelta = event.key === "ArrowRight" ? step : -step;
324
- next = this.currentWidth() + (this.side === "end" ? -physicalDelta : physicalDelta);
325
- }
326
- if (next === null) return;
327
- event.preventDefault();
328
- this.setWidth(next, true, "keyboard");
329
- }
330
- onResizePointer(event) {
331
- if (event.button !== 0 || this.pointerAbort) return;
332
- event.preventDefault();
333
- const startX = event.clientX;
334
- const startWidth = this.currentWidth();
335
- const multiplier = this.side === "end" ? -1 : 1;
336
- const controller = new AbortController();
337
- this.pointerAbort = controller;
338
- const finish = () => {
339
- this.persistWidth(this.currentWidth());
340
- controller.abort();
341
- this.pointerAbort = null;
342
- };
343
- window.addEventListener("pointermove", (moveEvent) => {
344
- this.setWidth(startWidth + (moveEvent.clientX - startX) * multiplier, false, "pointer");
345
- }, { signal: controller.signal });
346
- window.addEventListener("pointerup", finish, { once: true, signal: controller.signal });
347
- window.addEventListener("pointercancel", finish, { once: true, signal: controller.signal });
348
- }
331
+
332
+ [data-component-root~="ui-switcher"][data-gap="xs"] { --ui-switcher-gap: var(--ui-space-2, 0.5rem); }
333
+ [data-component-root~="ui-switcher"][data-gap="s"] { --ui-switcher-gap: var(--ui-space-3, 0.75rem); }
334
+ [data-component-root~="ui-switcher"][data-gap="m"] { --ui-switcher-gap: var(--ui-space-4, 1rem); }
335
+ [data-component-root~="ui-switcher"][data-gap="l"] { --ui-switcher-gap: var(--ui-space-5, 1.5rem); }
336
+ [data-component-root~="ui-switcher"][data-threshold="xs"] { --ui-switcher-threshold: 20rem; }
337
+ [data-component-root~="ui-switcher"][data-threshold="sm"] { --ui-switcher-threshold: 30rem; }
338
+ [data-component-root~="ui-switcher"][data-threshold="md"] { --ui-switcher-threshold: 45rem; }
339
+ [data-component-root~="ui-switcher"][data-threshold="lg"] { --ui-switcher-threshold: 60rem; }
340
+ [data-component-root~="ui-switcher"][data-align="start"] { --ui-switcher-align: flex-start; }
341
+ [data-component-root~="ui-switcher"][data-align="center"] { --ui-switcher-align: center; }
342
+ [data-component-root~="ui-switcher"][data-align="end"] { --ui-switcher-align: flex-end; }
343
+
344
+ [data-component-root~="ui-sidebar"] {
345
+ --ui-sidebar-gap: var(--ui-space-4, 1rem);
346
+ --ui-sidebar-width: 18rem;
347
+ --ui-sidebar-content-min: 50%;
348
+ --ui-sidebar-align: stretch;
349
+ display: flex;
350
+ flex-wrap: wrap;
351
+ gap: var(--ui-sidebar-gap);
352
+ align-items: var(--ui-sidebar-align);
349
353
  }
350
- class UIReelElement extends UILayoutElement {
351
- static get observedAttributes() {
352
- return ["gap", "item-width", "snap"];
353
- }
354
- connectedCallback() {
355
- if (!this.hasAttribute("role")) this.setAttribute("role", "region");
356
- if (!this.hasAttribute("tabindex")) this.setAttribute("tabindex", "0");
357
- }
358
- get gap() {
359
- return this.getPrimitiveAttribute("gap");
360
- }
361
- set gap(value) {
362
- this.setPrimitiveAttribute("gap", value);
363
- }
364
- get itemWidth() {
365
- return this.getPrimitiveAttribute("item-width");
366
- }
367
- set itemWidth(value) {
368
- this.setPrimitiveAttribute("item-width", value);
369
- }
370
- get snap() {
371
- return this.getPrimitiveAttribute("snap");
372
- }
373
- set snap(value) {
374
- this.setPrimitiveAttribute("snap", value);
375
- }
354
+
355
+ [data-component-root~="ui-sidebar"] > :not([data-ui-sidebar-resizer]) { min-inline-size: 0; }
356
+ [data-component-root~="ui-sidebar"] > :first-child {
357
+ flex-basis: var(--ui-sidebar-width);
358
+ flex-grow: 1;
376
359
  }
377
- class UISeparatorElement extends UILayoutElement {
378
- static get observedAttributes() {
379
- return ["orientation", "role"];
380
- }
381
- connectedCallback() {
382
- this.ensureDefaults();
383
- }
384
- get orientation() {
385
- return normalizeOrientation(this.getAttribute("orientation"));
386
- }
387
- set orientation(value) {
388
- const normalizedValue = normalizeOrientation(value);
389
- this.setPrimitiveAttribute("orientation", normalizedValue);
390
- this.syncOrientationAria();
391
- }
392
- attributeChangedCallback(name) {
393
- if (name === "orientation" || name === "role") {
394
- this.syncOrientationAria();
395
- }
396
- }
397
- ensureDefaults() {
398
- if (!this.hasAttribute("role")) {
399
- this.setAttribute("role", "separator");
400
- }
401
- this.syncOrientationAria();
402
- }
403
- syncOrientationAria() {
404
- if (this.getAttribute("role") !== "separator") {
405
- this.removeAttribute("aria-orientation");
406
- return;
407
- }
408
- this.setAttribute("aria-orientation", this.orientation);
409
- }
360
+ [data-component-root~="ui-sidebar"] > :last-child:not([data-ui-sidebar-resizer]),
361
+ [data-component-root~="ui-sidebar"][data-resizable='true'] > :nth-last-child(2):not([data-ui-sidebar-resizer]) {
362
+ flex-basis: 0;
363
+ flex-grow: 999;
364
+ min-inline-size: min(var(--ui-sidebar-content-min), 100%);
410
365
  }
411
- const definitions = [
412
- ["ui-stack", UIStackElement],
413
- ["ui-inline", UIInlineElement],
414
- ["ui-cluster", UIClusterElement],
415
- ["ui-grid", UIGridElement],
416
- ["ui-center", UICenterElement],
417
- ["ui-switcher", UISwitcherElement],
418
- ["ui-sidebar", UISidebarElement],
419
- ["ui-reel", UIReelElement],
420
- ["ui-separator", UISeparatorElement]
421
- ];
422
- for (const [tag, constructor] of definitions) {
423
- if (!customElements.get(tag)) {
424
- customElements.define(tag, constructor);
425
- }
366
+ [data-component-root~="ui-sidebar"][data-side="end"] > :first-child {
367
+ flex-basis: 0;
368
+ flex-grow: 999;
369
+ min-inline-size: min(var(--ui-sidebar-content-min), 100%);
370
+ }
371
+ [data-component-root~="ui-sidebar"][data-side="end"] > :last-child:not([data-ui-sidebar-resizer]),
372
+ [data-component-root~="ui-sidebar"][data-side="end"][data-resizable='true'] > :nth-last-child(2):not([data-ui-sidebar-resizer]) {
373
+ flex-basis: var(--ui-sidebar-width);
374
+ flex-grow: 1;
375
+ min-inline-size: 0;
376
+ }
377
+ [data-component-root~="ui-sidebar"][data-gap="xs"] { --ui-sidebar-gap: var(--ui-space-2, 0.5rem); }
378
+ [data-component-root~="ui-sidebar"][data-gap="s"] { --ui-sidebar-gap: var(--ui-space-3, 0.75rem); }
379
+ [data-component-root~="ui-sidebar"][data-gap="m"] { --ui-sidebar-gap: var(--ui-space-4, 1rem); }
380
+ [data-component-root~="ui-sidebar"][data-gap="l"] { --ui-sidebar-gap: var(--ui-space-5, 1.5rem); }
381
+ [data-component-root~="ui-sidebar"][data-width="narrow"] { --ui-sidebar-width: 14rem; }
382
+ [data-component-root~="ui-sidebar"][data-width="wide"] { --ui-sidebar-width: 24rem; }
383
+ [data-component-root~="ui-sidebar"][data-align="start"] { --ui-sidebar-align: flex-start; }
384
+ [data-component-root~="ui-sidebar"][data-align="center"] { --ui-sidebar-align: center; }
385
+ [data-component-root~="ui-sidebar"][data-align="end"] { --ui-sidebar-align: flex-end; }
386
+ [data-component-root~="ui-sidebar"][data-resizable='true'] {
387
+ position: relative;
388
+ flex-wrap: nowrap;
389
+ }
390
+ [data-component-root~="ui-sidebar"][data-resizable='true'] > :first-child:not([data-ui-sidebar-resizer]) {
391
+ flex: 0 0 var(--ui-sidebar-width);
392
+ }
393
+ [data-component-root~="ui-sidebar"][data-side="end"][data-resizable='true'] > :first-child:not([data-ui-sidebar-resizer]) {
394
+ flex: 1 1 0;
395
+ }
396
+ [data-component-root~="ui-sidebar"][data-side="end"][data-resizable='true'] > :nth-last-child(2):not([data-ui-sidebar-resizer]) {
397
+ flex: 0 0 var(--ui-sidebar-width);
398
+ }
399
+ [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer] {
400
+ position: absolute;
401
+ z-index: 1;
402
+ inset-block: 0;
403
+ inset-inline-start: var(--ui-sidebar-width);
404
+ inline-size: 8px;
405
+ min-inline-size: 8px;
406
+ transform: translateX(-50%);
407
+ cursor: col-resize;
408
+ touch-action: none;
409
+ outline: none;
410
+ }
411
+ [data-component-root~="ui-sidebar"][data-side="end"] > [data-ui-sidebar-resizer] {
412
+ inset-inline-start: auto;
413
+ inset-inline-end: var(--ui-sidebar-width);
414
+ transform: translateX(50%);
415
+ }
416
+ [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]::after {
417
+ content: "";
418
+ position: absolute;
419
+ inset-block: 0;
420
+ inset-inline-start: 3px;
421
+ inline-size: 2px;
422
+ background: color-mix(in srgb, var(--ui-affordance-guide-color, var(--ui-border-strong)) 45%, transparent);
423
+ opacity: var(--ui-affordance-guide-opacity, 0.42);
424
+ transition:
425
+ background-color var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease),
426
+ opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);
427
+ }
428
+ [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer] > [data-ui-guide] {
429
+ position: absolute;
430
+ inset-block-start: 50%;
431
+ inset-inline-start: 50%;
432
+ inline-size: 6px;
433
+ block-size: 22px;
434
+ border: 1px solid var(--ui-border-strong, #c8c8c4);
435
+ border-radius: var(--ui-radius-round, 999px);
436
+ background: var(--ui-surface-elevated, #fff);
437
+ opacity: 0;
438
+ transform: translate(-50%, -50%);
439
+ transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);
440
+ pointer-events: none;
441
+ }
442
+ [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]:hover::after,
443
+ [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]:focus-visible::after {
444
+ background: var(--ui-affordance-direct-color, var(--ui-accent-solid, var(--ui-color-focus, Highlight)));
445
+ opacity: 1;
446
+ }
447
+ [data-component-root~="ui-sidebar"] > [data-ui-sidebar-resizer]:is(:hover, :focus-visible) > [data-ui-guide] {
448
+ opacity: 1;
449
+ }
450
+
451
+ [data-component-root~="ui-reel"] {
452
+ --ui-reel-gap: var(--ui-space-4, 1rem);
453
+ --ui-reel-item-width: auto;
454
+ display: flex;
455
+ inline-size: 100%;
456
+ gap: var(--ui-reel-gap);
457
+ overflow-x: auto;
458
+ overflow-y: hidden;
459
+ overscroll-behavior-inline: contain;
460
+ -webkit-overflow-scrolling: touch;
461
+ }
462
+
463
+ [data-component-root~="ui-reel"] > * {
464
+ min-inline-size: 0;
465
+ flex: 0 0 var(--ui-reel-item-width);
466
+ }
467
+ [data-component-root~="ui-reel"][data-gap="xs"] { --ui-reel-gap: var(--ui-space-2, 0.5rem); }
468
+ [data-component-root~="ui-reel"][data-gap="s"] { --ui-reel-gap: var(--ui-space-3, 0.75rem); }
469
+ [data-component-root~="ui-reel"][data-gap="m"] { --ui-reel-gap: var(--ui-space-4, 1rem); }
470
+ [data-component-root~="ui-reel"][data-gap="l"] { --ui-reel-gap: var(--ui-space-5, 1.5rem); }
471
+ [data-component-root~="ui-reel"][data-item-width="sm"] { --ui-reel-item-width: 12rem; }
472
+ [data-component-root~="ui-reel"][data-item-width="md"] { --ui-reel-item-width: 16rem; }
473
+ [data-component-root~="ui-reel"][data-item-width="lg"] { --ui-reel-item-width: 20rem; }
474
+ [data-component-root~="ui-reel"][data-snap="start"],
475
+ [data-component-root~="ui-reel"][data-snap="center"] { scroll-snap-type: inline mandatory; }
476
+ [data-component-root~="ui-reel"][data-snap="start"] > * { scroll-snap-align: start; }
477
+ [data-component-root~="ui-reel"][data-snap="center"] > * { scroll-snap-align: center; }
478
+
479
+ [data-component-root~="ui-separator"] {
480
+ --ui-separator-color: var(--ui-border-default, #d0d5dd);
481
+ --ui-separator-space: var(--ui-space-4, 1rem);
482
+ display: block;
483
+ margin: 0;
484
+ border: 0;
485
+ border-block-start: 1px solid var(--ui-separator-color);
486
+ padding: 0;
487
+ }
488
+
489
+ [data-component-root~="ui-separator"][data-orientation="vertical"] {
490
+ inline-size: 1px;
491
+ block-size: 100%;
492
+ border-block-start: 0;
493
+ border-inline-start: 1px solid var(--ui-separator-color);
426
494
  }
427
495
  }
428
- function registerLayoutPrimitives() {
429
- }
430
- // Annotate the CommonJS export names for ESM import in node:
431
- 0 && (module.exports = {
432
- registerLayoutPrimitives
433
- });
496
+ `;
497
+
498
+ // src/declarative-index.ts
499
+ (0, import_declarative.registerLoomaPackage)("layout", records, styles);