@zazz-ui/core 0.15.0 → 0.16.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 (247) hide show
  1. package/AUTHORING.md +29 -14
  2. package/CHANGELOG.md +162 -0
  3. package/README.md +6 -5
  4. package/dist/{csp-LRx1fynI.js → csp-C1f62vyT.js} +1 -1
  5. package/dist/sri.json +70 -65
  6. package/dist/zazz.css +1 -1
  7. package/dist/zazz.js +1 -1
  8. package/editor/zazz.css-data.json +74 -2
  9. package/editor/zazz.html-data.json +119 -79
  10. package/editor/zazz.language-data.json +402 -314
  11. package/editor/zazz.lint-data.json +1752 -1731
  12. package/package.json +2 -1
  13. package/src/base/_defaults.css +11 -11
  14. package/src/base/_reset.css +2 -10
  15. package/src/base/_typography.css +17 -568
  16. package/src/base/_utilities-box.css +17 -17
  17. package/src/base/_utilities-pseudo.css +2 -2
  18. package/src/base/_variables.css +142 -97
  19. package/src/base/carousel-scroll.d.ts +1 -1
  20. package/src/base/carousel-scroll.js +6 -6
  21. package/src/base/carousel-scroll.ts +6 -6
  22. package/src/base/carousel.d.ts.map +1 -1
  23. package/src/base/carousel.js +6 -2
  24. package/src/base/carousel.ts +6 -2
  25. package/src/base/csp.js +2 -2
  26. package/src/base/csp.ts +2 -2
  27. package/src/base/kit-styling.d.ts.map +1 -1
  28. package/src/base/kit-styling.js +186 -183
  29. package/src/base/kit-styling.ts +186 -183
  30. package/src/base/navigation.d.ts +2 -2
  31. package/src/base/navigation.d.ts.map +1 -1
  32. package/src/base/navigation.js +25 -21
  33. package/src/base/navigation.ts +27 -21
  34. package/src/base/utilities.d.ts +1 -1
  35. package/src/base/utilities.d.ts.map +1 -1
  36. package/src/base/utilities.js +20 -4
  37. package/src/base/utilities.ts +21 -5
  38. package/src/base/zazz-element.d.ts +1 -1
  39. package/src/base/zazz-element.js +1 -1
  40. package/src/base/zazz-element.ts +1 -1
  41. package/src/{base → behaviors}/gesture.d.ts +4 -3
  42. package/src/behaviors/gesture.d.ts.map +1 -0
  43. package/src/{base → behaviors}/gesture.js +1 -1
  44. package/src/{base → behaviors}/gesture.ts +5 -4
  45. package/src/{base → behaviors}/hotkeys.d.ts +2 -1
  46. package/src/behaviors/hotkeys.d.ts.map +1 -0
  47. package/src/{base → behaviors}/hotkeys.ts +2 -1
  48. package/src/behaviors/list-navigation.d.ts +64 -0
  49. package/src/behaviors/list-navigation.d.ts.map +1 -0
  50. package/src/behaviors/list-navigation.js +66 -0
  51. package/src/behaviors/list-navigation.ts +107 -0
  52. package/src/{base → behaviors}/typeahead.d.ts +3 -1
  53. package/src/behaviors/typeahead.d.ts.map +1 -0
  54. package/src/{base → behaviors}/typeahead.js +12 -17
  55. package/src/{base → behaviors}/typeahead.ts +12 -17
  56. package/src/css-properties.json +704 -0
  57. package/src/index.css +7 -0
  58. package/src/manifest.d.ts +20 -9
  59. package/src/manifest.d.ts.map +1 -1
  60. package/src/manifest.js +125 -37
  61. package/src/manifest.ts +132 -38
  62. package/src/primitives/accordion/accordion.json +49 -0
  63. package/src/primitives/alert-dialog/alert-dialog.json +35 -0
  64. package/src/primitives/autocomplete/autocomplete.d.ts +2 -2
  65. package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -1
  66. package/src/primitives/autocomplete/autocomplete.js +2 -2
  67. package/src/primitives/autocomplete/autocomplete.json +65 -0
  68. package/src/primitives/autocomplete/autocomplete.ts +2 -2
  69. package/src/primitives/avatar/avatar.css +108 -0
  70. package/src/primitives/avatar/avatar.html +20 -74
  71. package/src/primitives/avatar/avatar.json +48 -0
  72. package/src/primitives/badge/badge.css +45 -10
  73. package/src/primitives/badge/badge.html +4 -0
  74. package/src/primitives/badge/badge.json +83 -0
  75. package/src/primitives/breadcrumbs/breadcrumbs.json +20 -0
  76. package/src/primitives/button/button.css +50 -66
  77. package/src/primitives/button/button.html +4 -0
  78. package/src/primitives/button/button.json +85 -0
  79. package/src/primitives/button-group/button-group.css +4 -15
  80. package/src/primitives/button-group/button-group.json +40 -0
  81. package/src/primitives/callout/callout.css +1 -1
  82. package/src/primitives/callout/callout.html +12 -12
  83. package/src/primitives/callout/callout.json +54 -0
  84. package/src/primitives/card/card-article.html +13 -37
  85. package/src/primitives/card/card-horizontal.html +11 -14
  86. package/src/primitives/card/card-login.html +4 -4
  87. package/src/primitives/card/card-product.html +3 -3
  88. package/src/primitives/card/card-subgrid.html +4 -4
  89. package/src/primitives/card/card.css +1 -1
  90. package/src/primitives/card/card.html +8 -8
  91. package/src/primitives/card/card.json +73 -0
  92. package/src/primitives/carousel/carousel.css +1 -1
  93. package/src/primitives/carousel/carousel.json +89 -0
  94. package/src/primitives/checkbox/checkbox.css +1 -2
  95. package/src/primitives/checkbox/checkbox.json +51 -0
  96. package/src/primitives/combobox/combobox.css +3 -2
  97. package/src/primitives/combobox/combobox.d.ts +2 -2
  98. package/src/primitives/combobox/combobox.d.ts.map +1 -1
  99. package/src/primitives/combobox/combobox.js +2 -2
  100. package/src/primitives/combobox/combobox.json +113 -0
  101. package/src/primitives/combobox/combobox.ts +2 -2
  102. package/src/primitives/command/command-actions.html +1 -1
  103. package/src/primitives/command/command.d.ts +4 -3
  104. package/src/primitives/command/command.d.ts.map +1 -1
  105. package/src/primitives/command/command.js +7 -6
  106. package/src/primitives/command/command.json +86 -0
  107. package/src/primitives/command/command.ts +7 -6
  108. package/src/primitives/debug/audit-core.d.ts +19 -12
  109. package/src/primitives/debug/audit-core.d.ts.map +1 -1
  110. package/src/primitives/debug/audit-core.js +78 -16
  111. package/src/primitives/debug/audit-core.ts +94 -22
  112. package/src/primitives/debug/debug.d.ts +6 -4
  113. package/src/primitives/debug/debug.d.ts.map +1 -1
  114. package/src/primitives/debug/debug.js +50 -21
  115. package/src/primitives/debug/debug.json +29 -0
  116. package/src/primitives/debug/debug.ts +57 -35
  117. package/src/primitives/dialog/dialog.css +1 -4
  118. package/src/primitives/dialog/dialog.json +78 -0
  119. package/src/primitives/drawer/drawer.css +4 -2
  120. package/src/primitives/drawer/drawer.d.ts.map +1 -1
  121. package/src/primitives/drawer/drawer.js +76 -4
  122. package/src/primitives/drawer/drawer.json +98 -0
  123. package/src/primitives/drawer/drawer.ts +78 -5
  124. package/src/primitives/fields/fields.css +11 -4
  125. package/src/primitives/fields/fields.json +92 -0
  126. package/src/primitives/font/font.css +188 -0
  127. package/src/primitives/font/font.html +14 -0
  128. package/src/primitives/font/font.json +39 -0
  129. package/src/primitives/group/group.json +25 -0
  130. package/src/primitives/input/input.css +1 -2
  131. package/src/primitives/input/input.json +56 -0
  132. package/src/primitives/input-group/input-group-password-group.html +1 -1
  133. package/src/primitives/input-group/input-group.css +32 -3
  134. package/src/primitives/input-group/input-group.html +5 -8
  135. package/src/primitives/input-group/input-group.json +69 -0
  136. package/src/primitives/kbd/kbd.css +1 -1
  137. package/src/primitives/kbd/kbd.json +52 -0
  138. package/src/primitives/layout/layout.json +45 -0
  139. package/src/primitives/lightbox/lightbox.css +4 -3
  140. package/src/primitives/lightbox/lightbox.html +2 -2
  141. package/src/primitives/lightbox/lightbox.js +1 -1
  142. package/src/primitives/lightbox/lightbox.json +87 -0
  143. package/src/primitives/lightbox/lightbox.ts +1 -1
  144. package/src/primitives/link/link.css +28 -0
  145. package/src/primitives/link/link.html +5 -0
  146. package/src/primitives/link/link.json +23 -0
  147. package/src/primitives/menu/menu.d.ts +3 -0
  148. package/src/primitives/menu/menu.d.ts.map +1 -1
  149. package/src/primitives/menu/menu.js +10 -25
  150. package/src/primitives/menu/menu.json +51 -0
  151. package/src/primitives/menu/menu.ts +10 -27
  152. package/src/primitives/menubar/menubar.json +23 -0
  153. package/src/primitives/meter/meter.css +24 -3
  154. package/src/primitives/meter/meter.json +41 -0
  155. package/src/primitives/mobile-menu/mobile-menu.html +1 -1
  156. package/src/primitives/mobile-menu/mobile-menu.json +64 -0
  157. package/src/primitives/navigation-menu/navigation-menu-featured.html +58 -58
  158. package/src/primitives/navigation-menu/navigation-menu-megamenu.html +6 -113
  159. package/src/primitives/navigation-menu/navigation-menu.css +11 -5
  160. package/src/primitives/navigation-menu/navigation-menu.html +1 -1
  161. package/src/primitives/navigation-menu/navigation-menu.json +82 -0
  162. package/src/primitives/otp/otp.css +1 -1
  163. package/src/primitives/otp/otp.d.ts +3 -3
  164. package/src/primitives/otp/otp.js +5 -5
  165. package/src/primitives/otp/otp.json +75 -0
  166. package/src/primitives/otp/otp.ts +5 -5
  167. package/src/primitives/password-group/password-group.css +32 -2
  168. package/src/primitives/password-group/password-group.html +1 -1
  169. package/src/primitives/password-group/password-group.json +74 -0
  170. package/src/primitives/popover/popover.css +1 -1
  171. package/src/primitives/popover/popover.json +64 -0
  172. package/src/primitives/progress/progress.css +25 -3
  173. package/src/primitives/progress/progress.json +41 -0
  174. package/src/primitives/prose/prose.css +341 -0
  175. package/src/primitives/prose/prose.html +11 -11
  176. package/src/primitives/prose/prose.json +47 -0
  177. package/src/primitives/radio/radio.css +1 -1
  178. package/src/primitives/radio/radio.json +48 -0
  179. package/src/primitives/reveal/reveal.json +72 -0
  180. package/src/primitives/scroll-fade/scroll-fade.css +0 -3
  181. package/src/primitives/scroll-fade/scroll-fade.json +34 -0
  182. package/src/primitives/select/select.css +2 -2
  183. package/src/primitives/select/select.json +119 -0
  184. package/src/primitives/separator/separator.json +34 -0
  185. package/src/primitives/slider/slider.css +87 -13
  186. package/src/primitives/slider/slider.json +49 -0
  187. package/src/primitives/style-guard/style-guard.js +1 -1
  188. package/src/primitives/style-guard/style-guard.json +22 -0
  189. package/src/primitives/style-guard/style-guard.ts +2 -2
  190. package/src/primitives/switch/switch.css +107 -18
  191. package/src/primitives/switch/switch.json +71 -0
  192. package/src/primitives/table/table.json +74 -0
  193. package/src/primitives/tabs/tabs.css +24 -12
  194. package/src/primitives/tabs/tabs.d.ts +4 -2
  195. package/src/primitives/tabs/tabs.d.ts.map +1 -1
  196. package/src/primitives/tabs/tabs.js +14 -24
  197. package/src/primitives/tabs/tabs.json +94 -0
  198. package/src/primitives/tabs/tabs.ts +14 -26
  199. package/src/primitives/textarea/textarea.css +1 -1
  200. package/src/primitives/textarea/textarea.json +48 -0
  201. package/src/primitives/toaster/toaster.d.ts.map +1 -1
  202. package/src/primitives/toaster/toaster.js +4 -4
  203. package/src/primitives/toaster/toaster.json +101 -0
  204. package/src/primitives/toaster/toaster.ts +5 -5
  205. package/src/primitives/toggle/toggle.css +2 -52
  206. package/src/primitives/toggle/toggle.json +84 -0
  207. package/src/primitives/toggle-group/toggle-group.css +1 -1
  208. package/src/primitives/toggle-group/toggle-group.json +41 -0
  209. package/src/primitives/toolbar/toolbar.json +26 -0
  210. package/src/primitives/tooltip/tooltip.css +6 -4
  211. package/src/primitives/tooltip/tooltip.json +85 -0
  212. package/src/primitives/utilities/aspect-ratio.html +3 -3
  213. package/src/primitives/utilities/basis.html +5 -5
  214. package/src/primitives/utilities/col-span.html +5 -5
  215. package/src/primitives/utilities/compose.html +3 -3
  216. package/src/primitives/utilities/flex-align.html +3 -3
  217. package/src/primitives/utilities/flex-direction.html +8 -8
  218. package/src/primitives/utilities/flex-grow.html +3 -3
  219. package/src/primitives/utilities/flex-reverse.html +8 -8
  220. package/src/primitives/utilities/gallery.html +19 -19
  221. package/src/primitives/utilities/gap.html +12 -12
  222. package/src/primitives/utilities/grid-cols.html +6 -6
  223. package/src/primitives/utilities/grid-responsive.html +9 -9
  224. package/src/primitives/utilities/inline-flex.html +2 -2
  225. package/src/primitives/utilities/margin-auto.html +1 -1
  226. package/src/primitives/utilities/object-fit.html +3 -3
  227. package/src/primitives/utilities/order.html +3 -3
  228. package/src/primitives/utilities/overflow.html +14 -14
  229. package/src/primitives/utilities/padding-compose.html +3 -3
  230. package/src/primitives/utilities/padding.html +4 -4
  231. package/src/primitives/utilities/position.html +1 -1
  232. package/src/primitives/utilities/responsive-flex.html +4 -4
  233. package/src/primitives/utilities/responsive-grid.html +9 -9
  234. package/src/primitives/utilities/size.html +5 -5
  235. package/src/primitives/utilities/subgrid-col.html +7 -7
  236. package/src/primitives/utilities/subgrid-row.html +9 -9
  237. package/src/primitives/utilities/subgrid.html +9 -9
  238. package/src/primitives/utilities/utilities.json +48 -0
  239. package/src/primitives/utilities/width.html +5 -5
  240. package/src/base/gesture.d.ts.map +0 -1
  241. package/src/base/hotkeys.d.ts.map +0 -1
  242. package/src/base/typeahead.d.ts.map +0 -1
  243. /package/src/{base → behaviors}/command-score.d.ts +0 -0
  244. /package/src/{base → behaviors}/command-score.d.ts.map +0 -0
  245. /package/src/{base → behaviors}/command-score.js +0 -0
  246. /package/src/{base → behaviors}/command-score.ts +0 -0
  247. /package/src/{base → behaviors}/hotkeys.js +0 -0
@@ -14,7 +14,7 @@
14
14
  --_radius: var(--radius);
15
15
  --_radius-len: var(--_radius-resolved);
16
16
  --_radius-num: var(--_radius-resolved);
17
- border-radius: calc(var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier));
17
+ border-radius: calc(var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient));
18
18
  }
19
19
  :where([style*="--radius: full"]) { --_radius: var(--radius-full); corner-shape: round; }
20
20
  :where([style*="--radius: var(--radius-full)"]) { --_corner-shape-resolved: round; corner-shape: round; }
@@ -63,14 +63,14 @@
63
63
  --_radius-t: var(--radius-t);
64
64
  --_radius-t-len: var(--_radius-t-resolved);
65
65
  --_radius-t-num: var(--_radius-t-resolved);
66
- border-start-start-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-multiplier));
67
- border-start-end-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-multiplier));
66
+ border-start-start-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-coefficient));
67
+ border-start-end-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-coefficient));
68
68
  }
69
69
  :where(:is([style*="--radius:"])[style*="--radius-t--"]) {
70
70
  --_radius-t-len: var(--_radius-t-resolved, var(--_radius-resolved, 0));
71
71
  --_radius-t-num: var(--_radius-t-resolved, var(--_radius-resolved, 0));
72
- border-start-start-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-multiplier));
73
- border-start-end-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-multiplier));
72
+ border-start-start-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-coefficient));
73
+ border-start-end-radius: calc(var(--_radius-t-len) + var(--_radius-t-num) * var(--spacing) * var(--radius-coefficient));
74
74
  }
75
75
  :where([style*="--radius-t: full"]) { --_radius-t: var(--radius-full); }
76
76
  @container (width >= 40rem) {
@@ -96,14 +96,14 @@
96
96
  --_radius-b: var(--radius-b);
97
97
  --_radius-b-len: var(--_radius-b-resolved);
98
98
  --_radius-b-num: var(--_radius-b-resolved);
99
- border-end-start-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-multiplier));
100
- border-end-end-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-multiplier));
99
+ border-end-start-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-coefficient));
100
+ border-end-end-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-coefficient));
101
101
  }
102
102
  :where(:is([style*="--radius:"])[style*="--radius-b--"]) {
103
103
  --_radius-b-len: var(--_radius-b-resolved, var(--_radius-resolved, 0));
104
104
  --_radius-b-num: var(--_radius-b-resolved, var(--_radius-resolved, 0));
105
- border-end-start-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-multiplier));
106
- border-end-end-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-multiplier));
105
+ border-end-start-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-coefficient));
106
+ border-end-end-radius: calc(var(--_radius-b-len) + var(--_radius-b-num) * var(--spacing) * var(--radius-coefficient));
107
107
  }
108
108
  :where([style*="--radius-b: full"]) { --_radius-b: var(--radius-full); }
109
109
  @container (width >= 40rem) {
@@ -129,14 +129,14 @@
129
129
  --_radius-l: var(--radius-l);
130
130
  --_radius-l-len: var(--_radius-l-resolved);
131
131
  --_radius-l-num: var(--_radius-l-resolved);
132
- border-start-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-multiplier));
133
- border-end-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-multiplier));
132
+ border-start-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-coefficient));
133
+ border-end-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-coefficient));
134
134
  }
135
135
  :where(:is([style*="--radius:"])[style*="--radius-l--"]) {
136
136
  --_radius-l-len: var(--_radius-l-resolved, var(--_radius-resolved, 0));
137
137
  --_radius-l-num: var(--_radius-l-resolved, var(--_radius-resolved, 0));
138
- border-start-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-multiplier));
139
- border-end-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-multiplier));
138
+ border-start-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-coefficient));
139
+ border-end-start-radius: calc(var(--_radius-l-len) + var(--_radius-l-num) * var(--spacing) * var(--radius-coefficient));
140
140
  }
141
141
  :where([style*="--radius-l: full"]) { --_radius-l: var(--radius-full); }
142
142
  @container (width >= 40rem) {
@@ -162,14 +162,14 @@
162
162
  --_radius-r: var(--radius-r);
163
163
  --_radius-r-len: var(--_radius-r-resolved);
164
164
  --_radius-r-num: var(--_radius-r-resolved);
165
- border-start-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-multiplier));
166
- border-end-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-multiplier));
165
+ border-start-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-coefficient));
166
+ border-end-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-coefficient));
167
167
  }
168
168
  :where(:is([style*="--radius:"])[style*="--radius-r--"]) {
169
169
  --_radius-r-len: var(--_radius-r-resolved, var(--_radius-resolved, 0));
170
170
  --_radius-r-num: var(--_radius-r-resolved, var(--_radius-resolved, 0));
171
- border-start-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-multiplier));
172
- border-end-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-multiplier));
171
+ border-start-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-coefficient));
172
+ border-end-end-radius: calc(var(--_radius-r-len) + var(--_radius-r-num) * var(--spacing) * var(--radius-coefficient));
173
173
  }
174
174
  :where([style*="--radius-r: full"]) { --_radius-r: var(--radius-full); }
175
175
  @container (width >= 40rem) {
@@ -437,7 +437,7 @@
437
437
  :where([style*="--before-radius:"])::before {
438
438
  --_before-radius-len: var(--before-radius);
439
439
  --_before-radius-num: var(--before-radius);
440
- border-radius: calc(var(--_before-radius-len) + var(--_before-radius-num) * var(--spacing) * var(--radius-multiplier));
440
+ border-radius: calc(var(--_before-radius-len) + var(--_before-radius-num) * var(--spacing) * var(--radius-coefficient));
441
441
  corner-shape: var(--radius-corner-shape);
442
442
  }
443
443
  :where([style*="--before-radius: full"])::before {
@@ -449,7 +449,7 @@
449
449
  :where([style*="--after-radius:"])::after {
450
450
  --_after-radius-len: var(--after-radius);
451
451
  --_after-radius-num: var(--after-radius);
452
- border-radius: calc(var(--_after-radius-len) + var(--_after-radius-num) * var(--spacing) * var(--radius-multiplier));
452
+ border-radius: calc(var(--_after-radius-len) + var(--_after-radius-num) * var(--spacing) * var(--radius-coefficient));
453
453
  corner-shape: var(--radius-corner-shape);
454
454
  }
455
455
  :where([style*="--after-radius: full"])::after {
@@ -2,11 +2,14 @@
2
2
  * _variables.css — Global design tokens (Tier 1).
3
3
  *
4
4
  * @layer variables
5
- * @requires _layers.css, _typography.css (--fluid, which --spacing reads)
5
+ * @requires _layers.css
6
6
  * @uses light-dark() — theme roles re-resolve per color-scheme (system,
7
7
  * data-theme="dark" | "light"); tokens stay unregistered on purpose
8
8
  * @uses oklch(from …) — shade/tint scales and shadow alphas
9
9
  * @uses color-mix() — focus ring (--color-ring)
10
+ * @uses tan(atan2()) — divides two lengths into a plain number (a stand-in for
11
+ * progress() that every engine supports)
12
+ * @uses pow() — the type scale's steps
10
13
  * @uses interpolate-size: allow-keywords — discrete block-size animations (details, etc.)
11
14
  * @uses @media (not (hover: hover)) — --_touch-min carries --spacing-touch-min (44px) to
12
15
  * the primitives on touch screens; 0px on a mouse
@@ -79,10 +82,10 @@
79
82
  /* brand */
80
83
  --color-primary: light-dark(var(--color-primary-950), var(--color-primary-50));
81
84
  --color-primary-foreground: light-dark(var(--color-white), var(--color-primary-950));
82
- --color-secondary: light-dark(var(--color-secondary-950), var(--color-secondary-50));
83
- --color-secondary-foreground: light-dark(var(--color-white), var(--color-secondary-950));
84
- --color-tertiary: light-dark(var(--color-tertiary-950), var(--color-tertiary-50));
85
- --color-tertiary-foreground: light-dark(var(--color-white), var(--color-tertiary-950));
85
+ --color-secondary: light-dark(var(--color-secondary-100), var(--color-secondary-800));
86
+ --color-secondary-foreground: light-dark(var(--color-secondary-950), var(--color-white));
87
+ --color-tertiary: light-dark(var(--color-tertiary-500), var(--color-tertiary-600));
88
+ --color-tertiary-foreground: light-dark(var(--color-white), var(--color-white));
86
89
  --color-ring: var(--color-primary);
87
90
  /* the shadow color every --shadow-* token is tinted with (alpha comes from the token) */
88
91
  --color-shadow: var(--color-black);
@@ -126,30 +129,30 @@
126
129
  --color-primary-950: oklch(0.145 0 0);
127
130
 
128
131
  /* secondary */
129
- --color-secondary-50: oklch(98.5% 0.002 247.839);
130
- --color-secondary-100: oklch(96.7% 0.003 264.542);
131
- --color-secondary-200: oklch(92.8% 0.006 264.531);
132
- --color-secondary-300: oklch(87.2% 0.01 258.338);
133
- --color-secondary-400: oklch(70.7% 0.022 261.325);
134
- --color-secondary-500: oklch(55.1% 0.027 264.364);
135
- --color-secondary-600: oklch(44.6% 0.03 256.802);
136
- --color-secondary-700: oklch(37.3% 0.034 259.733);
137
- --color-secondary-800: oklch(27.8% 0.033 256.848);
138
- --color-secondary-900: oklch(21% 0.034 264.665);
139
- --color-secondary-950: oklch(13% 0.028 261.692);
132
+ --color-secondary-50: oklch(0.985 0 0);
133
+ --color-secondary-100: oklch(0.967 0.001 0);
134
+ --color-secondary-200: oklch(0.92 0.004 0);
135
+ --color-secondary-300: oklch(0.87 0 0);
136
+ --color-secondary-400: oklch(0.708 0 0);
137
+ --color-secondary-500: oklch(0.556 0 0);
138
+ --color-secondary-600: oklch(0.439 0 0);
139
+ --color-secondary-700: oklch(0.371 0 0);
140
+ --color-secondary-800: oklch(0.269 0 0);
141
+ --color-secondary-900: oklch(0.205 0 0);
142
+ --color-secondary-950: oklch(0.145 0 0);
140
143
 
141
144
  /* tertiary */
142
- --color-tertiary-50: oklch(0.986 0.002 67.8);
143
- --color-tertiary-100: oklch(0.96 0.002 17.2);
144
- --color-tertiary-200: oklch(0.922 0.005 34.3);
145
- --color-tertiary-300: oklch(0.868 0.007 39.5);
146
- --color-tertiary-400: oklch(0.714 0.014 41.2);
147
- --color-tertiary-500: oklch(0.547 0.021 43.1);
148
- --color-tertiary-600: oklch(0.438 0.017 39.3);
149
- --color-tertiary-700: oklch(0.367 0.016 35.7);
150
- --color-tertiary-800: oklch(0.268 0.011 36.5);
151
- --color-tertiary-900: oklch(0.214 0.009 43.1);
152
- --color-tertiary-950: oklch(0.147 0.004 49.3);
145
+ --color-tertiary-50: oklch(0.984 0.007 286.46);
146
+ --color-tertiary-100: oklch(0.94 0.025 288.37);
147
+ --color-tertiary-200: oklch(0.85 0.068 285.81);
148
+ --color-tertiary-300: oklch(0.765 0.108 284.76);
149
+ --color-tertiary-400: oklch(0.674 0.154 283.18);
150
+ --color-tertiary-500: oklch(0.593 0.193 280.79);
151
+ --color-tertiary-600: oklch(0.511 0.23 276.97);
152
+ --color-tertiary-700: oklch(0.421 0.234 273.27);
153
+ --color-tertiary-800: oklch(0.32 0.179 273.06);
154
+ --color-tertiary-900: oklch(0.229 0.127 273.39);
155
+ --color-tertiary-950: oklch(0.158 0.088 274.05);
153
156
 
154
157
  /* ==========================================================================
155
158
  * Grayscale — neutrals, shade (dim), tint (fade)
@@ -188,23 +191,22 @@
188
191
  --color-shade-950: oklch(from var(--color-neutral-950) l c h / 0.96);
189
192
  --color-shade-full: oklch(from var(--color-neutral-950) l c h / 1);
190
193
 
191
- /* tint — faded overlays (derived from neutral-50, so a tinted neutral reaches
192
- dark-mode muted, faded, and input the way it reaches light mode through the
193
- shades). Solved the same way over the dark background; the curve differs from
194
+ /* tint — faded overlays (pure white at each alpha, so they stay neutral whatever
195
+ the neutral palette's tint). Solved the same way over the dark background; the curve differs from
194
196
  shade's because lightening runs the other way up the same lightness response. */
195
- --color-tint-none: oklch(from var(--color-neutral-50) l c h / 0);
196
- --color-tint-50: oklch(from var(--color-neutral-50) l c h / 0.04);
197
- --color-tint-100: oklch(from var(--color-neutral-50) l c h / 0.085);
198
- --color-tint-200: oklch(from var(--color-neutral-50) l c h / 0.17);
199
- --color-tint-300: oklch(from var(--color-neutral-50) l c h / 0.265);
200
- --color-tint-400: oklch(from var(--color-neutral-50) l c h / 0.36);
201
- --color-tint-500: oklch(from var(--color-neutral-50) l c h / 0.46);
202
- --color-tint-600: oklch(from var(--color-neutral-50) l c h / 0.56);
203
- --color-tint-700: oklch(from var(--color-neutral-50) l c h / 0.67);
204
- --color-tint-800: oklch(from var(--color-neutral-50) l c h / 0.775);
205
- --color-tint-900: oklch(from var(--color-neutral-50) l c h / 0.885);
206
- --color-tint-950: oklch(from var(--color-neutral-50) l c h / 0.945);
207
- --color-tint-full: oklch(from var(--color-neutral-50) l c h / 1);
197
+ --color-tint-none: oklch(from var(--color-white) l c h / 0);
198
+ --color-tint-50: oklch(from var(--color-white) l c h / 0.04);
199
+ --color-tint-100: oklch(from var(--color-white) l c h / 0.085);
200
+ --color-tint-200: oklch(from var(--color-white) l c h / 0.17);
201
+ --color-tint-300: oklch(from var(--color-white) l c h / 0.265);
202
+ --color-tint-400: oklch(from var(--color-white) l c h / 0.36);
203
+ --color-tint-500: oklch(from var(--color-white) l c h / 0.46);
204
+ --color-tint-600: oklch(from var(--color-white) l c h / 0.56);
205
+ --color-tint-700: oklch(from var(--color-white) l c h / 0.67);
206
+ --color-tint-800: oklch(from var(--color-white) l c h / 0.775);
207
+ --color-tint-900: oklch(from var(--color-white) l c h / 0.885);
208
+ --color-tint-950: oklch(from var(--color-white) l c h / 0.945);
209
+ --color-tint-full: oklch(from var(--color-white) l c h / 1);
208
210
 
209
211
  /* ==========================================================================
210
212
  * Typography — typefaces, sizes, weights, tracking, leading
@@ -261,7 +263,7 @@
261
263
  /* typeset — the fluid type scale behind --font-size-*. md is the base; each step above it
262
264
  multiplies by the scale (lg = 1 step, xl = 2, … display = 8). The base and
263
265
  the scale each grow from -min to -max across the fluid range; the math
264
- lives in _typography.css. */
266
+ is the FLUID TYPE SCALE block below. */
265
267
  --typeset-base-min: 1rem;
266
268
  --typeset-base-max: 1rem;
267
269
  --typeset-scale-min: 1.125;
@@ -305,47 +307,47 @@
305
307
  --tracking-2xs: calc(0em + var(--tracking-body-modifier));
306
308
  --tracking-eyebrow: calc(0.05em + var(--tracking-body-modifier));
307
309
 
308
- /* leading multipliers */
309
- --leading-heading-multiplier: 1;
310
- --leading-body-multiplier: 1;
310
+ /* leading coefficients */
311
+ --leading-heading-coefficient: 1;
312
+ --leading-body-coefficient: 1;
311
313
 
312
314
  /* leading */
313
- --leading-display: calc(0.95 * var(--leading-heading-multiplier));
314
- --leading-h1: calc(0.95 * var(--leading-heading-multiplier));
315
- --leading-h2: calc(0.95 * var(--leading-heading-multiplier));
316
- --leading-h3: calc(1 * var(--leading-heading-multiplier));
317
- --leading-h4: calc(1 * var(--leading-heading-multiplier));
318
- --leading-h5: calc(1 * var(--leading-heading-multiplier));
319
- --leading-h6: calc(1 * var(--leading-heading-multiplier));
320
- --leading-2xl: calc(1.25 * var(--leading-body-multiplier));
321
- --leading-xl: calc(1.5 * var(--leading-body-multiplier));
322
- --leading-lg: calc(1.5 * var(--leading-body-multiplier));
323
- --leading-md: calc(1.6 * var(--leading-body-multiplier));
324
- --leading-sm: calc(1.5 * var(--leading-body-multiplier));
325
- --leading-xs: calc(1.5 * var(--leading-body-multiplier));
326
- --leading-2xs: calc(1.5 * var(--leading-body-multiplier));
315
+ --leading-display: calc(0.95 * var(--leading-heading-coefficient));
316
+ --leading-h1: calc(0.95 * var(--leading-heading-coefficient));
317
+ --leading-h2: calc(0.95 * var(--leading-heading-coefficient));
318
+ --leading-h3: calc(1 * var(--leading-heading-coefficient));
319
+ --leading-h4: calc(1 * var(--leading-heading-coefficient));
320
+ --leading-h5: calc(1 * var(--leading-heading-coefficient));
321
+ --leading-h6: calc(1 * var(--leading-heading-coefficient));
322
+ --leading-2xl: calc(1.25 * var(--leading-body-coefficient));
323
+ --leading-xl: calc(1.5 * var(--leading-body-coefficient));
324
+ --leading-lg: calc(1.5 * var(--leading-body-coefficient));
325
+ --leading-md: calc(1.6 * var(--leading-body-coefficient));
326
+ --leading-sm: calc(1.5 * var(--leading-body-coefficient));
327
+ --leading-xs: calc(1.5 * var(--leading-body-coefficient));
328
+ --leading-2xs: calc(1.5 * var(--leading-body-coefficient));
327
329
  /* line-height */
328
- --leading-eyebrow: calc(1.2 * var(--leading-body-multiplier));
330
+ --leading-eyebrow: calc(1.2 * var(--leading-body-coefficient));
329
331
 
330
- /* paragraph-spacing — the space above a block in prose; the multiplier
332
+ /* paragraph-spacing — the space above a block in prose; the coefficient
331
333
  loosens or tightens every step at once (--ui-prose-flow scales it again per prose) */
332
- --paragraph-spacing-multiplier: 1;
333
-
334
- --paragraph-spacing-display: calc(3.5rlh * var(--paragraph-spacing-multiplier));
335
- --paragraph-spacing-h1: calc(3.5rlh * var(--paragraph-spacing-multiplier));
336
- --paragraph-spacing-h2: calc(3rlh * var(--paragraph-spacing-multiplier));
337
- --paragraph-spacing-h3: calc(3rlh * var(--paragraph-spacing-multiplier));
338
- --paragraph-spacing-h4: calc(2rlh * var(--paragraph-spacing-multiplier));
339
- --paragraph-spacing-h5: calc(2rlh * var(--paragraph-spacing-multiplier));
340
- --paragraph-spacing-h6: calc(2rlh * var(--paragraph-spacing-multiplier));
341
- --paragraph-spacing-2xl: calc(1rlh * var(--paragraph-spacing-multiplier));
342
- --paragraph-spacing-xl: calc(0.75rlh * var(--paragraph-spacing-multiplier));
343
- --paragraph-spacing-lg: calc(0.75rlh * var(--paragraph-spacing-multiplier));
344
- --paragraph-spacing-md: calc(0.75rlh * var(--paragraph-spacing-multiplier));
345
- --paragraph-spacing-sm: calc(0.5rlh * var(--paragraph-spacing-multiplier));
346
- --paragraph-spacing-xs: calc(0.5rlh * var(--paragraph-spacing-multiplier));
347
- --paragraph-spacing-2xs: calc(0.5rlh * var(--paragraph-spacing-multiplier));
348
- --paragraph-spacing-eyebrow: calc(1rlh * var(--paragraph-spacing-multiplier));
334
+ --paragraph-spacing-coefficient: 1;
335
+
336
+ --paragraph-spacing-display: calc(3.5rlh * var(--paragraph-spacing-coefficient));
337
+ --paragraph-spacing-h1: calc(3.5rlh * var(--paragraph-spacing-coefficient));
338
+ --paragraph-spacing-h2: calc(3rlh * var(--paragraph-spacing-coefficient));
339
+ --paragraph-spacing-h3: calc(3rlh * var(--paragraph-spacing-coefficient));
340
+ --paragraph-spacing-h4: calc(2rlh * var(--paragraph-spacing-coefficient));
341
+ --paragraph-spacing-h5: calc(2rlh * var(--paragraph-spacing-coefficient));
342
+ --paragraph-spacing-h6: calc(2rlh * var(--paragraph-spacing-coefficient));
343
+ --paragraph-spacing-2xl: calc(1rlh * var(--paragraph-spacing-coefficient));
344
+ --paragraph-spacing-xl: calc(0.75rlh * var(--paragraph-spacing-coefficient));
345
+ --paragraph-spacing-lg: calc(0.75rlh * var(--paragraph-spacing-coefficient));
346
+ --paragraph-spacing-md: calc(0.75rlh * var(--paragraph-spacing-coefficient));
347
+ --paragraph-spacing-sm: calc(0.5rlh * var(--paragraph-spacing-coefficient));
348
+ --paragraph-spacing-xs: calc(0.5rlh * var(--paragraph-spacing-coefficient));
349
+ --paragraph-spacing-2xs: calc(0.5rlh * var(--paragraph-spacing-coefficient));
350
+ --paragraph-spacing-eyebrow: calc(1rlh * var(--paragraph-spacing-coefficient));
349
351
 
350
352
  /* ==========================================================================
351
353
  * Spacing — the --spacing unit and the --space-* scale
@@ -366,7 +368,7 @@
366
368
  --spacing-control-min: 1rem;
367
369
 
368
370
  /* the utility scale unit: `--p: 4` is 4 × --spacing. Fluid between its
369
- min and max across the fluid range (--fluid comes from _typography.css);
371
+ min and max across the fluid range (--fluid comes from the FLUID TYPE SCALE block below);
370
372
  set them equal, or pin `:root { --spacing: 0.25rem }`, for a fixed scale. */
371
373
  --spacing-min: 0.225rem;
372
374
  --spacing-max: 0.25rem;
@@ -383,22 +385,22 @@
383
385
  --space-2xl: calc(var(--spacing) * 40);
384
386
 
385
387
  /* ==========================================================================
386
- * Radius — multiplier, semantic scale, component primitives
388
+ * Radius — coefficient, semantic scale, component primitives
387
389
  * ========================================================================== */
388
390
 
389
391
  /* modifiers */
390
- --radius-multiplier: 1;
392
+ --radius-coefficient: 1;
391
393
  --radius-corner-shape: superellipse(1.3);
392
394
 
393
395
  /* semantic */
394
396
  --radius-none: 0rem;
395
- --radius-2xs: calc(var(--spacing) * 0.5 * var(--radius-multiplier));
396
- --radius-xs: calc(var(--spacing) * var(--radius-multiplier));
397
- --radius-sm: calc(var(--spacing) * 1.5 * var(--radius-multiplier));
398
- --radius-md: calc(var(--spacing) * 2.5 * var(--radius-multiplier));
399
- --radius-lg: calc(var(--spacing) * 4.5 * var(--radius-multiplier));
400
- --radius-xl: calc(var(--spacing) * 7 * var(--radius-multiplier));
401
- --radius-2xl: calc(var(--spacing) * 10 * var(--radius-multiplier));
397
+ --radius-2xs: calc(var(--spacing) * 0.5 * var(--radius-coefficient));
398
+ --radius-xs: calc(var(--spacing) * var(--radius-coefficient));
399
+ --radius-sm: calc(var(--spacing) * 1.5 * var(--radius-coefficient));
400
+ --radius-md: calc(var(--spacing) * 2.5 * var(--radius-coefficient));
401
+ --radius-lg: calc(var(--spacing) * 4.5 * var(--radius-coefficient));
402
+ --radius-xl: calc(var(--spacing) * 7 * var(--radius-coefficient));
403
+ --radius-2xl: calc(var(--spacing) * 10 * var(--radius-coefficient));
402
404
  --radius-full: 9999rem;
403
405
 
404
406
  /* ==========================================================================
@@ -525,14 +527,7 @@
525
527
  --bezier-easing: cubic-bezier(0.32, 0.66, 0.1, 1);
526
528
  --spring-duration: 0.25s;
527
529
 
528
- /* the spring is declared first: the editor data reads the first definition */
529
530
  --default-transition-timing-function: var(--spring-easing);
530
-
531
- /* falls back to cubic-bezier when linear() easing is unsupported */
532
- @supports not (transition-timing-function: linear(0, 1)) {
533
- --default-transition-timing-function: var(--bezier-easing);
534
- }
535
-
536
531
  --default-transition-duration: var(--spring-duration);
537
532
  --default-transition-property-colors:
538
533
  text-decoration-color, background-color, border-color, color, fill, stroke;
@@ -591,6 +586,56 @@
591
586
  --bounce: bounce var(--default-animation);
592
587
  }
593
588
 
589
+ /* ===========================================================================
590
+ FLUID TYPE SCALE — calculations, don't touch; tune the typeset controls
591
+ above. A sized prose (prose.css) re-runs them, so its preset scales the base
592
+ and a :root control still reaches it; the math stays here, in one place.
593
+ =========================================================================== */
594
+
595
+ :where(:root, [data-ui~="prose"][data-prose-size]) {
596
+ /* 0 at --fluid-min, 1 at --fluid-max, linear between, clamped outside:
597
+ (100vi − min) ÷ (max − min). tan(atan2(a, b)) is a ÷ b as a plain number,
598
+ which calc() can't do with two lengths in every engine yet. Same result as
599
+ progress(100vi, var(--fluid-min), var(--fluid-max)). */
600
+ --fluid: clamp(0, tan(atan2(100vi - var(--fluid-min), var(--fluid-max) - var(--fluid-min))), 1);
601
+ --typeset-base: calc(
602
+ (
603
+ var(--typeset-base-min) + var(--fluid) *
604
+ (var(--typeset-base-max) - var(--typeset-base-min))
605
+ ) *
606
+ var(--_prose-size, 1)
607
+ );
608
+ --typeset-scale: calc(
609
+ var(--typeset-scale-min) + var(--fluid) *
610
+ (var(--typeset-scale-max) - var(--typeset-scale-min))
611
+ );
612
+
613
+ --font-size-2xs: calc(
614
+ var(--typeset-base) *
615
+ (var(--typeset-2xs-min) + var(--fluid) * (var(--typeset-2xs-max) - var(--typeset-2xs-min)))
616
+ );
617
+ --font-size-xs: calc(
618
+ var(--typeset-base) *
619
+ (var(--typeset-xs-min) + var(--fluid) * (var(--typeset-xs-max) - var(--typeset-xs-min)))
620
+ );
621
+ --font-size-sm: calc(
622
+ var(--typeset-base) *
623
+ (var(--typeset-sm-min) + var(--fluid) * (var(--typeset-sm-max) - var(--typeset-sm-min)))
624
+ );
625
+ --font-size-eyebrow: var(--font-size-2xs);
626
+ --font-size-md: var(--typeset-base);
627
+ --font-size-lg: calc(var(--typeset-base) * var(--typeset-scale));
628
+ --font-size-xl: calc(var(--typeset-base) * pow(var(--typeset-scale), 2));
629
+ --font-size-2xl: calc(var(--typeset-base) * pow(var(--typeset-scale), 3));
630
+ --font-size-h6: var(--font-size-xl);
631
+ --font-size-h5: var(--font-size-2xl);
632
+ --font-size-h4: calc(var(--typeset-base) * pow(var(--typeset-scale), 4));
633
+ --font-size-h3: calc(var(--typeset-base) * pow(var(--typeset-scale), 5));
634
+ --font-size-h2: calc(var(--typeset-base) * pow(var(--typeset-scale), 6));
635
+ --font-size-h1: calc(var(--typeset-base) * pow(var(--typeset-scale), 7));
636
+ --font-size-display: calc(var(--typeset-base) * pow(var(--typeset-scale), 8));
637
+ }
638
+
594
639
  @media (prefers-reduced-motion: reduce) {
595
640
  :root {
596
641
  --default-transition-duration: 0s;
@@ -144,7 +144,7 @@ declare function readAutoOptions(root: Element): AutoOptions | null;
144
144
  declare function createCarousel(root: Element, viewport: HTMLElement, signal: AbortSignal, config?: EngineConfig): CarouselApi | null;
145
145
  /**
146
146
  * @description Runs a thumb strip on its own engine (options from
147
- * `data-carousel-thumbs-*` on the thumbs slot; drag-free by default) and links
147
+ * `data-carousel-thumbs-*` on the thumbs slot; `snap="free"` by default) and links
148
148
  * it to the main carousel: a thumb click steps the main carousel there, and
149
149
  * each main selection marks its thumb (`active` token and `aria-current`) and
150
150
  * scrolls the strip just enough to show it.
@@ -7,7 +7,7 @@
7
7
  * the browser's own: compositor-driven, no script per frame, and the content
8
8
  * stays scrollable without JS. This module adds what the platform lacks:
9
9
  *
10
- * - **Mouse drag** (`base/gesture.ts`): a mouse press drags the track 1:1 with
10
+ * - **Mouse drag** (`behaviors/gesture.ts`): a mouse press drags the track 1:1 with
11
11
  * snapping off, rubber-bands past the ends, and on release projects the
12
12
  * flick's velocity to a snap and scrolls there. Touch and pen are left to
13
13
  * native scrolling (`canStart` rejects them).
@@ -22,7 +22,7 @@
22
22
  * - **Axis and direction**: every position is logical (px from the track's
23
23
  * start edge), so a vertical track (`data-carousel-axis="y"`) and a
24
24
  * right-to-left one (`dir="rtl"` anywhere above it) run the same code.
25
- * - **Thumbs** (`linkThumbs`): a second engine on the thumb strip, drag-free
25
+ * - **Thumbs** (`linkThumbs`): a second engine on the thumb strip, free-scrolling
26
26
  * by default, that keeps the selected thumb in view.
27
27
  * - **Autoplay / auto-scroll** (`data-carousel-plugins="autoplay"` or
28
28
  * `"auto-scroll"`), with the kit's interaction rules (see `readAutoOptions`).
@@ -32,11 +32,11 @@
32
32
  *
33
33
  * Supported options (on the root): `data-carousel-loop`, `-align`
34
34
  * (`start` | `center` | `end`), `-axis` (`x` | `y`), `-draggable="false"`,
35
- * `-drag-free`, `-skip-snaps` (a flick may pass several snaps; default one),
35
+ * `-snap` (`slide` | `free`), `-skip-snaps` (a flick may pass several snaps; default one),
36
36
  * `-start-snap`. Thumb strips read the same names under
37
37
  * `data-carousel-thumbs-*` on the thumbs slot.
38
38
  */
39
- import { rubberBand, trackDrag } from "./gesture.js";
39
+ import { rubberBand, trackDrag } from "../behaviors/gesture.js";
40
40
  import { Utils } from "./utils.js";
41
41
  // --- Constants ---
42
42
  /** Deceleration for projecting a release, in px/ms² (≈ a native fling's end distance). */
@@ -210,7 +210,7 @@ function createCarousel(root, viewport, signal, config = {}) {
210
210
  // loop needs a neighbour on each side of the current slide
211
211
  loop: flag(raw.loop, defaults.loop ?? false) && slides.length >= 3,
212
212
  draggable: flag(raw.draggable, true),
213
- dragFree: flag(raw.dragFree, defaults.dragFree ?? false),
213
+ dragFree: raw.snap === "free" || (raw.snap !== "slide" && (defaults.dragFree ?? false)),
214
214
  skipSnaps: flag(raw.skipSnaps, false),
215
215
  startSnap: typeof raw.startSnap === "number" ? raw.startSnap : 0,
216
216
  vertical: raw.axis === "y",
@@ -983,7 +983,7 @@ function createCarousel(root, viewport, signal, config = {}) {
983
983
  // --- Thumbs ---
984
984
  /**
985
985
  * @description Runs a thumb strip on its own engine (options from
986
- * `data-carousel-thumbs-*` on the thumbs slot; drag-free by default) and links
986
+ * `data-carousel-thumbs-*` on the thumbs slot; `snap="free"` by default) and links
987
987
  * it to the main carousel: a thumb click steps the main carousel there, and
988
988
  * each main selection marks its thumb (`active` token and `aria-current`) and
989
989
  * scrolls the strip just enough to show it.
@@ -8,7 +8,7 @@
8
8
  * the browser's own: compositor-driven, no script per frame, and the content
9
9
  * stays scrollable without JS. This module adds what the platform lacks:
10
10
  *
11
- * - **Mouse drag** (`base/gesture.ts`): a mouse press drags the track 1:1 with
11
+ * - **Mouse drag** (`behaviors/gesture.ts`): a mouse press drags the track 1:1 with
12
12
  * snapping off, rubber-bands past the ends, and on release projects the
13
13
  * flick's velocity to a snap and scrolls there. Touch and pen are left to
14
14
  * native scrolling (`canStart` rejects them).
@@ -23,7 +23,7 @@
23
23
  * - **Axis and direction**: every position is logical (px from the track's
24
24
  * start edge), so a vertical track (`data-carousel-axis="y"`) and a
25
25
  * right-to-left one (`dir="rtl"` anywhere above it) run the same code.
26
- * - **Thumbs** (`linkThumbs`): a second engine on the thumb strip, drag-free
26
+ * - **Thumbs** (`linkThumbs`): a second engine on the thumb strip, free-scrolling
27
27
  * by default, that keeps the selected thumb in view.
28
28
  * - **Autoplay / auto-scroll** (`data-carousel-plugins="autoplay"` or
29
29
  * `"auto-scroll"`), with the kit's interaction rules (see `readAutoOptions`).
@@ -33,12 +33,12 @@
33
33
  *
34
34
  * Supported options (on the root): `data-carousel-loop`, `-align`
35
35
  * (`start` | `center` | `end`), `-axis` (`x` | `y`), `-draggable="false"`,
36
- * `-drag-free`, `-skip-snaps` (a flick may pass several snaps; default one),
36
+ * `-snap` (`slide` | `free`), `-skip-snaps` (a flick may pass several snaps; default one),
37
37
  * `-start-snap`. Thumb strips read the same names under
38
38
  * `data-carousel-thumbs-*` on the thumbs slot.
39
39
  */
40
40
 
41
- import { rubberBand, trackDrag } from "./gesture.ts";
41
+ import { rubberBand, trackDrag } from "../behaviors/gesture.ts";
42
42
  import { Utils } from "./utils.ts";
43
43
 
44
44
  // --- Types ---
@@ -312,7 +312,7 @@ function createCarousel(
312
312
  // loop needs a neighbour on each side of the current slide
313
313
  loop: flag(raw.loop, defaults.loop ?? false) && slides.length >= 3,
314
314
  draggable: flag(raw.draggable, true),
315
- dragFree: flag(raw.dragFree, defaults.dragFree ?? false),
315
+ dragFree: raw.snap === "free" || (raw.snap !== "slide" && (defaults.dragFree ?? false)),
316
316
  skipSnaps: flag(raw.skipSnaps, false),
317
317
  startSnap: typeof raw.startSnap === "number" ? raw.startSnap : 0,
318
318
  vertical: raw.axis === "y",
@@ -1146,7 +1146,7 @@ function createCarousel(
1146
1146
 
1147
1147
  /**
1148
1148
  * @description Runs a thumb strip on its own engine (options from
1149
- * `data-carousel-thumbs-*` on the thumbs slot; drag-free by default) and links
1149
+ * `data-carousel-thumbs-*` on the thumbs slot; `snap="free"` by default) and links
1150
1150
  * it to the main carousel: a thumb click steps the main carousel there, and
1151
1151
  * each main selection marks its thumb (`active` token and `aria-current`) and
1152
1152
  * scrolls the strip just enough to show it.
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["carousel.ts"],"names":[],"mappings":"AAsFA;;;;;;;;;;;GAWG;AACH,iBAAS,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAuB7C;AAED;;;;;;GAMG;AACH,iBAAS,aAAa,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CAKvD;AA4HD;;;;;;GAMG;AACH,QAAA,MAAM,QAAQ;IACZ,IAAI;IACJ,QAAQ;CACT,CAAC;AAsBF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["carousel.ts"],"names":[],"mappings":"AA0FA;;;;;;;;;;;GAWG;AACH,iBAAS,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAuB7C;AAED;;;;;;GAMG;AACH,iBAAS,aAAa,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CAKvD;AA4HD;;;;;;GAMG;AACH,QAAA,MAAM,QAAQ;IACZ,IAAI;IACJ,QAAQ;CACT,CAAC;AAsBF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -21,7 +21,8 @@
21
21
  * - `data-carousel-align`: `start` (default) | `center` | `end`
22
22
  * - `data-carousel-axis`: `x` (default) | `y`; a vertical viewport needs a block size
23
23
  * - `data-carousel-draggable`: `"false"` turns mouse dragging off (touch still scrolls)
24
- * - `data-carousel-drag-free`: `"true"` scrolls freely with momentum, no snapping
24
+ * - `data-carousel-snap`: `slide` (default) | `free`, which scrolls freely with momentum
25
+ * and never snaps
25
26
  * - `data-carousel-skip-snaps`: `"true"` lets a mouse flick pass several snaps
26
27
  * - `data-carousel-start-snap`: Index to start on
27
28
  * - `data-carousel-keyboard`: `"false"` leaves the arrow keys to native scrolling
@@ -35,8 +36,11 @@
35
36
  * stops it for good), `…-stop-on-mouse-enter`
36
37
  * - Right to left: no option; the track follows the inherited `dir`
37
38
  *
39
+ * Drag opt-out: a mouse press inside `data-draggable="false"` (on a slide, or on
40
+ * anything in one) never drags the track, so text there can be selected.
41
+ *
38
42
  * Thumb strip (on `data-carousel-slot="thumbs"`):
39
- * - `data-carousel-thumbs-*`: the options above for the strip (default: drag-free)
43
+ * - `data-carousel-thumbs-*`: the options above for the strip (default: `snap="free"`)
40
44
  *
41
45
  * Lifecycle and dialog start index:
42
46
  * - `data-carousel-init`: Set by script when a carousel is initialized
@@ -22,7 +22,8 @@
22
22
  * - `data-carousel-align`: `start` (default) | `center` | `end`
23
23
  * - `data-carousel-axis`: `x` (default) | `y`; a vertical viewport needs a block size
24
24
  * - `data-carousel-draggable`: `"false"` turns mouse dragging off (touch still scrolls)
25
- * - `data-carousel-drag-free`: `"true"` scrolls freely with momentum, no snapping
25
+ * - `data-carousel-snap`: `slide` (default) | `free`, which scrolls freely with momentum
26
+ * and never snaps
26
27
  * - `data-carousel-skip-snaps`: `"true"` lets a mouse flick pass several snaps
27
28
  * - `data-carousel-start-snap`: Index to start on
28
29
  * - `data-carousel-keyboard`: `"false"` leaves the arrow keys to native scrolling
@@ -36,8 +37,11 @@
36
37
  * stops it for good), `…-stop-on-mouse-enter`
37
38
  * - Right to left: no option; the track follows the inherited `dir`
38
39
  *
40
+ * Drag opt-out: a mouse press inside `data-draggable="false"` (on a slide, or on
41
+ * anything in one) never drags the track, so text there can be selected.
42
+ *
39
43
  * Thumb strip (on `data-carousel-slot="thumbs"`):
40
- * - `data-carousel-thumbs-*`: the options above for the strip (default: drag-free)
44
+ * - `data-carousel-thumbs-*`: the options above for the strip (default: `snap="free"`)
41
45
  *
42
46
  * Lifecycle and dialog start index:
43
47
  * - `data-carousel-init`: Set by script when a carousel is initialized
package/src/base/csp.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * `cssText` or `setAttribute`, which the policy blocks), then watches for
11
11
  * attributes written later. Utilities then need JavaScript and apply after the
12
12
  * module runs; a policy that allows attributes (`style-src-attr
13
- * 'unsafe-inline'`) needs none of this. `data-ui-guard="off"` opts an element
13
+ * 'unsafe-inline'`) needs none of this. `data-style-guard="off"` opts an element
14
14
  * out, as it does for the style guard.
15
15
  *
16
16
  * Detection never writes a probe: it looks for an element whose attribute
@@ -63,7 +63,7 @@ function inSync(el, wanted) {
63
63
  }
64
64
  /** Writes `el`'s `style` attribute into its declaration block through the CSSOM. No-op when the block already matches. */
65
65
  function applyInlineStyles(el) {
66
- if (!("style" in el) || el.getAttribute("data-ui-guard") === "off")
66
+ if (!("style" in el) || el.getAttribute("data-style-guard") === "off")
67
67
  return;
68
68
  const styled = el;
69
69
  const wanted = declared(el.getAttribute("style") ?? "");
package/src/base/csp.ts CHANGED
@@ -11,7 +11,7 @@
11
11
  * `cssText` or `setAttribute`, which the policy blocks), then watches for
12
12
  * attributes written later. Utilities then need JavaScript and apply after the
13
13
  * module runs; a policy that allows attributes (`style-src-attr
14
- * 'unsafe-inline'`) needs none of this. `data-ui-guard="off"` opts an element
14
+ * 'unsafe-inline'`) needs none of this. `data-style-guard="off"` opts an element
15
15
  * out, as it does for the style guard.
16
16
  *
17
17
  * Detection never writes a probe: it looks for an element whose attribute
@@ -72,7 +72,7 @@ function inSync(el: Styled, wanted: Map<string, [string, string]>): boolean {
72
72
 
73
73
  /** Writes `el`'s `style` attribute into its declaration block through the CSSOM. No-op when the block already matches. */
74
74
  function applyInlineStyles(el: Element): void {
75
- if (!("style" in el) || el.getAttribute("data-ui-guard") === "off") return;
75
+ if (!("style" in el) || el.getAttribute("data-style-guard") === "off") return;
76
76
  const styled = el as Styled;
77
77
  const wanted = declared(el.getAttribute("style") ?? "");
78
78
  if (inSync(styled, wanted)) return;