@glasshome/ui 1.41.0 → 1.43.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 (188) hide show
  1. package/SPEC.md +5 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +3 -3
  4. package/dist/lib/anchor-placement.d.ts +34 -0
  5. package/dist/lib/balance-rows.d.ts +10 -4
  6. package/dist/lib/behavior/anchored.d.ts +26 -0
  7. package/dist/lib/behavior/button-root.d.ts +7 -0
  8. package/dist/lib/behavior/collection.d.ts +32 -0
  9. package/dist/lib/behavior/controllable.d.ts +8 -0
  10. package/dist/lib/behavior/dismiss.d.ts +13 -0
  11. package/dist/lib/behavior/focus-scope.d.ts +24 -0
  12. package/dist/lib/behavior/hide-outside.d.ts +7 -0
  13. package/dist/lib/behavior/layer-stack.d.ts +34 -0
  14. package/dist/lib/behavior/menu.d.ts +59 -0
  15. package/dist/lib/behavior/modal-root.d.ts +68 -0
  16. package/dist/lib/behavior/polymorphic.d.ts +6 -0
  17. package/dist/lib/behavior/presence.d.ts +18 -0
  18. package/dist/lib/behavior/range.d.ts +44 -0
  19. package/dist/lib/behavior/solid.d.ts +13 -0
  20. package/dist/lib/color/color.d.ts +41 -0
  21. package/dist/lib/color/index.d.ts +2 -0
  22. package/dist/lib/color/intl.d.ts +40 -0
  23. package/dist/lib/dock-slot-classes.d.ts +2 -0
  24. package/dist/lib/hold.d.ts +1 -1
  25. package/dist/lib/locale.d.ts +3 -0
  26. package/dist/lib/menu-classes.d.ts +2 -0
  27. package/dist/lib/motion-classes.d.ts +5 -2
  28. package/dist/lib/overlay-classes.d.ts +4 -0
  29. package/dist/lib/page-cover.d.ts +8 -0
  30. package/dist/lib/scroll-track.d.ts +3 -2
  31. package/dist/lib/section-tokens.d.ts +1 -1
  32. package/dist/lib/segment-classes.d.ts +2 -0
  33. package/dist/lib/shadow-layer.d.ts +0 -43
  34. package/dist/lib/toggle-set.d.ts +44 -0
  35. package/dist/lib/visually-hidden.d.ts +3 -0
  36. package/dist/solid/accordion.d.ts +35 -11
  37. package/dist/solid/alert-dialog.d.ts +5 -8
  38. package/dist/solid/avatar.d.ts +8 -4
  39. package/dist/solid/bottom-sheet/bottom-sheet.d.ts +2 -2
  40. package/dist/solid/bottom-sheet/constants.d.ts +1 -1
  41. package/dist/solid/button.d.ts +5 -4
  42. package/dist/solid/charts.d.ts +1 -1
  43. package/dist/solid/checkbox.d.ts +14 -4
  44. package/dist/solid/collapsible.d.ts +33 -5
  45. package/dist/solid/color-disc.d.ts +1 -1
  46. package/dist/solid/color-slider.d.ts +1 -1
  47. package/dist/solid/color-wheel.d.ts +1 -1
  48. package/dist/solid/context-menu.d.ts +58 -24
  49. package/dist/solid/dialog-parts.d.ts +53 -16
  50. package/dist/solid/dialog.d.ts +7 -10
  51. package/dist/solid/dropdown-menu.d.ts +55 -24
  52. package/dist/solid/empty.d.ts +1 -1
  53. package/dist/solid/form.d.ts +5 -6
  54. package/dist/solid/hover-card.d.ts +65 -9
  55. package/dist/solid/index.d.ts +5 -2
  56. package/dist/solid/index.js +8671 -14317
  57. package/dist/solid/input-group.d.ts +6 -6
  58. package/dist/solid/item.d.ts +1 -1
  59. package/dist/solid/menu-parts.d.ts +175 -24
  60. package/dist/solid/option-card.d.ts +1 -4
  61. package/dist/solid/picker-row.d.ts +2 -0
  62. package/dist/solid/popover.d.ts +77 -12
  63. package/dist/solid/progress.d.ts +11 -3
  64. package/dist/solid/radio-group.d.ts +31 -6
  65. package/dist/solid/responsive-dialog.d.ts +3 -1
  66. package/dist/solid/scroll-area.d.ts +1 -1
  67. package/dist/solid/section-card.d.ts +2 -3
  68. package/dist/solid/select.d.ts +107 -10
  69. package/dist/solid/selection.d.ts +10 -1
  70. package/dist/solid/sheet.d.ts +6 -9
  71. package/dist/solid/sliding-indicator.d.ts +1 -1
  72. package/dist/solid/sonner.d.ts +1 -1
  73. package/dist/solid/stale-veil.d.ts +7 -0
  74. package/dist/solid/tabs.d.ts +28 -9
  75. package/dist/solid/toggle-group.d.ts +30 -5
  76. package/dist/solid/toggle.d.ts +11 -3
  77. package/dist/solid/tooltip.d.ts +71 -9
  78. package/dist/tokens/index.js +54 -51
  79. package/dist/{utils-CGN4X-2O.js → utils-3Codx-NZ.js} +848 -618
  80. package/package.json +6 -7
  81. package/src/index.ts +1 -0
  82. package/src/lib/anchor-placement.ts +77 -4
  83. package/src/lib/balance-rows.ts +115 -40
  84. package/src/lib/behavior/anchored.ts +106 -0
  85. package/src/lib/behavior/button-root.tsx +103 -0
  86. package/src/lib/behavior/collection.ts +218 -0
  87. package/src/lib/behavior/controllable.ts +22 -0
  88. package/src/lib/behavior/dismiss.ts +185 -0
  89. package/src/lib/behavior/focus-scope.ts +227 -0
  90. package/src/lib/behavior/hide-outside.ts +85 -0
  91. package/src/lib/behavior/layer-stack.ts +150 -0
  92. package/src/lib/behavior/menu.ts +470 -0
  93. package/src/lib/behavior/modal-root.tsx +452 -0
  94. package/src/lib/behavior/polymorphic.tsx +30 -0
  95. package/src/lib/behavior/presence.ts +89 -0
  96. package/src/lib/behavior/range.ts +212 -0
  97. package/src/lib/behavior/solid.ts +30 -0
  98. package/src/lib/clipboard.ts +4 -4
  99. package/src/lib/color/color.ts +746 -0
  100. package/src/lib/color/index.ts +2 -0
  101. package/src/lib/color/intl.ts +60 -0
  102. package/src/lib/dock-slot-classes.ts +3 -0
  103. package/src/lib/hold.ts +1 -1
  104. package/src/lib/locale.ts +62 -0
  105. package/src/lib/menu-classes.ts +3 -0
  106. package/src/lib/motion-classes.ts +33 -8
  107. package/src/lib/overlay-classes.ts +8 -3
  108. package/src/lib/page-cover.ts +47 -0
  109. package/src/lib/scroll-track.ts +11 -6
  110. package/src/lib/section-tokens.ts +1 -1
  111. package/src/lib/segment-classes.ts +3 -0
  112. package/src/lib/shadow-layer.ts +0 -136
  113. package/src/lib/toggle-set.ts +133 -0
  114. package/src/lib/visually-hidden.ts +15 -0
  115. package/src/solid/accordion.tsx +294 -20
  116. package/src/solid/alert-dialog.tsx +36 -85
  117. package/src/solid/area-picker.tsx +5 -3
  118. package/src/solid/avatar.tsx +98 -24
  119. package/src/solid/badge.tsx +5 -5
  120. package/src/solid/bottom-sheet/bottom-sheet.tsx +73 -129
  121. package/src/solid/bottom-sheet/constants.ts +3 -1
  122. package/src/solid/bottom-sheet/drag-controller.ts +11 -0
  123. package/src/solid/breadcrumb.tsx +4 -4
  124. package/src/solid/button-group.tsx +4 -4
  125. package/src/solid/button.tsx +12 -6
  126. package/src/solid/card.tsx +5 -4
  127. package/src/solid/charts.tsx +1 -1
  128. package/src/solid/checkbox.tsx +167 -44
  129. package/src/solid/collapsible.tsx +260 -12
  130. package/src/solid/color-disc.tsx +11 -12
  131. package/src/solid/color-slider.tsx +114 -47
  132. package/src/solid/color-wheel.tsx +137 -39
  133. package/src/solid/context-menu.tsx +287 -86
  134. package/src/solid/dialog-parts.tsx +135 -46
  135. package/src/solid/dialog.tsx +44 -76
  136. package/src/solid/dock-edit.tsx +5 -4
  137. package/src/solid/dock.tsx +6 -5
  138. package/src/solid/dropdown-menu.tsx +252 -107
  139. package/src/solid/empty.tsx +1 -1
  140. package/src/solid/entity-selector.tsx +5 -3
  141. package/src/solid/face-toggle.tsx +43 -18
  142. package/src/solid/form.tsx +9 -9
  143. package/src/solid/glyph-tile.tsx +48 -21
  144. package/src/solid/hover-card.tsx +288 -21
  145. package/src/solid/icon-picker.tsx +2 -1
  146. package/src/solid/image-picker.tsx +6 -5
  147. package/src/solid/index.ts +5 -4
  148. package/src/solid/input-group.tsx +7 -5
  149. package/src/solid/input-otp.tsx +2 -1
  150. package/src/solid/item.tsx +5 -5
  151. package/src/solid/logo.tsx +5 -4
  152. package/src/solid/menu-parts.tsx +619 -145
  153. package/src/solid/option-card.tsx +6 -10
  154. package/src/solid/picker-row.tsx +10 -5
  155. package/src/solid/picker-search.tsx +2 -1
  156. package/src/solid/popover.tsx +424 -71
  157. package/src/solid/preview-tile.tsx +1 -1
  158. package/src/solid/progress.tsx +84 -15
  159. package/src/solid/radio-group.tsx +271 -34
  160. package/src/solid/responsive-dialog.tsx +10 -10
  161. package/src/solid/schema-form.tsx +1 -6
  162. package/src/solid/scroll-area.tsx +1 -1
  163. package/src/solid/section-card.tsx +3 -4
  164. package/src/solid/select.tsx +950 -95
  165. package/src/solid/selection.tsx +142 -66
  166. package/src/solid/sheet.tsx +48 -80
  167. package/src/solid/slider.tsx +115 -65
  168. package/src/solid/sliding-indicator.tsx +1 -1
  169. package/src/solid/sonner.tsx +1 -1
  170. package/src/solid/spotlight.tsx +23 -11
  171. package/src/solid/stale-veil.tsx +20 -0
  172. package/src/solid/switch.tsx +8 -6
  173. package/src/solid/tabs.tsx +377 -52
  174. package/src/solid/term.tsx +3 -4
  175. package/src/solid/toggle-group.tsx +237 -95
  176. package/src/solid/toggle.tsx +43 -9
  177. package/src/solid/tooltip.tsx +285 -26
  178. package/src/styles/globals.css +64 -10
  179. package/src/styles/theme.css +12 -4
  180. package/src/tokens/material.ts +11 -2
  181. package/dist/lib/when-animations-settle.d.ts +0 -4
  182. package/dist/solid/bottom-sheet/focus-trap.d.ts +0 -6
  183. package/dist/solid/bottom-sheet/scroll-lock.d.ts +0 -2
  184. package/dist/solid/bottom-sheet/sheet-motion.d.ts +0 -1
  185. package/src/lib/when-animations-settle.ts +0 -12
  186. package/src/solid/bottom-sheet/focus-trap.ts +0 -63
  187. package/src/solid/bottom-sheet/scroll-lock.ts +0 -66
  188. package/src/solid/bottom-sheet/sheet-motion.ts +0 -4
package/SPEC.md CHANGED
@@ -218,6 +218,7 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
218
218
  | tools beside the dock while a mode is on, or a control that belongs to the dock but is no item | `<Dock companion companionOpen>`: a second glass unit that grows out of the dock, above a bottom dock and under a side dock (so a side dock keeps its width), and adds to its measured size; `<Dock lead>`: inside the glass before the strip, never paged away | a bar positioned against `--dock-height` in the app, a chip that pages with the items |
219
219
  | a segmented pick in a column | `<ToggleGroup orientation="vertical">` | a column of buttons with a hand-drawn selection |
220
220
  | pointing at a control while the user operates it | `<Spotlight>` (`blocking` on a targetless veil so the action inside the bubble is the only press that lands; a target taller than half the viewport places the bubble inside it, near the top, instead of above or below; the bubble carries a tail toward its `anchor`, which defaults to `target` and may point at a different element than the hole) | a hand-rolled fixed overlay with a cutout |
221
+ | marking content that is a moment old and not live yet | `<StaleVeil shown>` as the last child of a positioned parent, with `STALE_CONTENT` (black and white, no transition) on that parent, surface tint included: a 40% veil in `--background` that fades in once on `--duration-state`, inert and `aria-hidden` (the host names and announces the state) | a hand-rolled dim `div`, a `backdrop-filter` grey, a looping pulse or a spinner over the content |
221
222
 
222
223
  Server-run `.astro` markup imports `@glasshome/ui/solid` too: the `solid`
223
224
  export condition hands Astro the source, and a component with no `client:`
@@ -302,6 +303,10 @@ Motion is one system, not per-component flair. Four rules, all held by
302
303
  stills. A mode indicator is not decoration: it may loop for as long
303
304
  as its mode is on, provided the mode itself is bounded (dash leaves edit mode
304
305
  after three idle minutes). `.glass-edge-orbit` is that rim.
306
+ An open modal pauses all of it under itself: once its open animation ends,
307
+ `coverPage()` sets `data-covered` on the app's `[data-page]` root (never
308
+ `html`), and a sealed widget's modal reaches it through the realm. An app
309
+ without a `[data-page]` root gets no pause.
305
310
 
306
311
  `HOLD_MOTION`: hold progress. A fill grows out of the touch while held, dissolves once the hold fires, and drains back faster if let go early (holding the dock to change modes).
307
312
 
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { CONTROL_H, CONTROL_ON, FIELD_CHROME, FIELD_CONTROL, FIELD_TEXT, FOCUS_R
8
8
  export { Z, Z_CLASS } from "./lib/layers.js";
9
9
  export { LOGO_DEFAULT_SIZE, LOGO_DEFAULT_SRC, LOGO_DEFAULT_SUB, LOGO_MARK_CLASS, LOGO_MARK_PX, LOGO_NAME_CLASS, LOGO_ROOT_CLASS, LOGO_SIZES, LOGO_STACK_CLASS, LOGO_SUB_CLASS, type LogoSize, } from "./lib/logo-lockup.js";
10
10
  export { MENU_ITEM, MENU_ITEM_BASE, MENU_ITEM_X, MENU_LABEL, MENU_SEPARATOR, } from "./lib/menu-classes.js";
11
- export { FIELD_MOTION, MODAL_MOTION, MORPH_MOTION, OVERLAY_MOTION, PRESS_DIP, SCRIM_MOTION, SETTLE_MOTION, STAGGER, } from "./lib/motion-classes.js";
11
+ export { FIELD_MOTION, MODAL_MOTION, MORPH_MOTION, OVERLAY_MOTION, PRESS_DIP, SCRIM_MOTION, SETTLE_MOTION, STAGGER, STALE_CONTENT, } from "./lib/motion-classes.js";
12
12
  export { createHold, HOLD_GRACE_MS, HOLD_MS, spendLongPress } from "./lib/hold.js";
13
13
  export type { Hold, HoldOptions, HoldPress } from "./lib/hold.js";
14
14
  export { MOTION_WINDOW_MS, startMotionWindow } from "./lib/motion-window.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { $ as e, $t as t, A as n, B as r, Bt as i, C as a, D as ee, Dt as te, E as ne, Et as o, F as s, G as c, Gt as l, H as u, I as d, It as f, J as p, Jt as m, K as h, L as g, M as _, Mt as v, N as y, O as b, Ot as x, P as S, R as C, Rt as w, S as T, U as E, Ut as D, V as O, Vt as k, W as A, Wt as j, Xt as M, Yt as N, Z as P, Zt as F, _ as I, _t as L, at as R, b as z, c as B, cn as V, ct as H, d as U, dn as W, dt as G, en as K, et as q, f as J, ft as Y, g as X, gt as Z, h as re, ht as ie, i as ae, in as oe, it as se, j as ce, jt as le, k as ue, l as de, ln as fe, lt as pe, m as me, mt as he, n as ge, nn as _e, nt as ve, o as ye, on as be, ot as xe, p as Se, pt as Ce, q as we, qt as Te, r as Ee, rn as De, rt as Oe, s as ke, sn as Ae, st as je, t as Me, tn as Ne, tt as Pe, u as Fe, un as Q, ut as Ie, v as Le, w as Re, x as ze, y as Be, yt as Ve, z as He, zt as Ue } from "./utils-CGN4X-2O.js";
1
+ import { $ as e, An as t, B as n, C as r, Cn as i, Dn as a, E as ee, En as te, F as ne, Ft as o, G as s, H as c, Ht as l, I as u, J as d, Jt as f, K as p, L as m, M as h, N as g, O as _, On as v, P as y, Q as b, Qt as x, Sn as S, St as C, T as w, Tn as T, U as E, Ut as D, V as O, W as k, Wt as A, X as j, Y as M, Z as N, _ as P, _t as F, at as I, b as L, bn as R, bt as z, c as B, cn as V, ct as H, d as U, dt as W, en as G, f as K, fn as q, ft as J, g as Y, gn as X, gt as Z, h as re, hn as ie, ht as ae, i as oe, in as se, it as ce, j as le, kn as ue, l as de, ln as fe, lt as pe, m as me, mn as he, mt as ge, n as _e, nt as ve, o as ye, on as be, ot as xe, p as Se, pn as Ce, pt as we, q as Te, qt as Ee, r as De, rn as Oe, s as ke, sn as Ae, st as je, t as Me, tn as Ne, ut as Pe, v as Fe, vn as Q, vt as Ie, w as Le, x as Re, xn as ze, xt as Be, y as Ve, yn as He, yt as Ue, z as We } from "./utils-3Codx-NZ.js";
2
2
  //#region src/lib/motion-window.ts
3
3
  var $ = 3e4;
4
- function We(e = $) {
4
+ function Ge(e = $) {
5
5
  let t, n = document.documentElement, r = () => {
6
6
  clearTimeout(t), t = void 0, delete n.dataset.motion;
7
7
  }, i = () => {
@@ -17,4 +17,4 @@ function We(e = $) {
17
17
  };
18
18
  }
19
19
  //#endregion
20
- export { t as ALERT_CLASS, K as ALERT_CONTENT_CLASS, Ne as ALERT_DESCRIPTION_CLASS, _e as ALERT_ICON_BG_CLASS, De as ALERT_ICON_CLASS, oe as ALERT_ICON_PATHS, be as ALERT_TITLE_CLASS, Ae as ALERT_TONES, Te as BUTTON_DEFAULT_CLASS, m as BUTTON_OUTLINE_CLASS, Ve as CARD_BLUR, o as CARD_SURFACE, te as CARD_SURFACE_BASE, x as CARD_SURFACE_OPAQUE, q as CAROUSEL_DOTS, Pe as CAROUSEL_VIEWPORT, me as CHIP, je as CONTROL_H, I as CONTROL_H_TOUCH, H as CONTROL_ON, pe as FIELD_CHROME, Ie as FIELD_CONTROL, f as FIELD_MOTION, G as FIELD_TEXT, z as FLOATING_PANEL, Y as FOCUS_RING, b as HOLD_GRACE_MS, ue as HOLD_MS, N as ICON_BUTTON_CLASS, re as ICON_PILL, X as ICON_PILL_TINT, Ce as INPUT_CLASS, he as INPUT_SURFACE, ie as INVALID_RING, g as LOGO_DEFAULT_SIZE, C as LOGO_DEFAULT_SRC, He as LOGO_DEFAULT_SUB, r as LOGO_MARK_CLASS, O as LOGO_MARK_PX, u as LOGO_NAME_CLASS, E as LOGO_ROOT_CLASS, A as LOGO_SIZES, c as LOGO_STACK_CLASS, h as LOGO_SUB_CLASS, _ as MENU_ITEM, y as MENU_ITEM_BASE, S as MENU_ITEM_X, s as MENU_LABEL, d as MENU_SEPARATOR, ge as MOBILE_BREAKPOINT, w as MODAL_MOTION, Ue as MORPH_MOTION, $ as MOTION_WINDOW_MS, M as OUTLINE_SURFACE, ze as OVERLAY_BLUR, i as OVERLAY_MOTION, T as OVERLAY_SURFACE, a as OVERLAY_SURFACE_BASE, Re as OVERLAY_SURFACE_OPAQUE, Le as PICKER_LIST, Be as PICKER_TRIGGER, R as POSITION_BAR, xe as POSITION_BAR_LIT, k as PRESS_DIP, ne as SCRIM_CLASS, D as SCRIM_MOTION, Fe as SECTION_INNER_RADIUS, U as SECTION_OUTER_RADIUS, J as SECTION_PADDING, Se as SECTION_ROW_CLASS, le as SECTION_ROW_SURFACE, de as SEGMENT_ITEM, j as SETTLE_MOTION, l as STAGGER, ae as THUMB_CLASS, ye as THUMB_RAIL_BLEED, ke as THUMB_RAIL_PAD, B as THUMB_SIZE, v as TRACK_SURFACE, we as Z, p as Z_CLASS, V as alertBorder, fe as alertFill, Q as alertIconBgStyle, W as alertIconFill, ee as anchorToTriggerTop, F as buttonVariants, ve as carouselDot, Oe as carouselItem, se as carouselTrack, Me as cn, Z as copyImage, L as copyText, n as createHold, Ee as createIsMobile, P as glassToneText, ce as spendLongPress, We as startMotionWindow, e as toneTextMix };
20
+ export { Q as ALERT_CLASS, He as ALERT_CONTENT_CLASS, R as ALERT_DESCRIPTION_CLASS, ze as ALERT_ICON_BG_CLASS, S as ALERT_ICON_CLASS, i as ALERT_ICON_PATHS, T as ALERT_TITLE_CLASS, te as ALERT_TONES, q as BUTTON_DEFAULT_CLASS, Ce as BUTTON_OUTLINE_CLASS, o as CARD_BLUR, l as CARD_SURFACE, D as CARD_SURFACE_BASE, A as CARD_SURFACE_OPAQUE, I as CAROUSEL_DOTS, xe as CAROUSEL_VIEWPORT, re as CHIP, J as CONTROL_H, Fe as CONTROL_H_TOUCH, we as CONTROL_ON, ge as FIELD_CHROME, ae as FIELD_CONTROL, x as FIELD_MOTION, Z as FIELD_TEXT, Re as FLOATING_PANEL, F as FOCUS_RING, h as HOLD_GRACE_MS, g as HOLD_MS, he as ICON_BUTTON_CLASS, Y as ICON_PILL, P as ICON_PILL_TINT, Ie as INPUT_CLASS, Ue as INPUT_SURFACE, z as INVALID_RING, c as LOGO_DEFAULT_SIZE, E as LOGO_DEFAULT_SRC, k as LOGO_DEFAULT_SUB, s as LOGO_MARK_CLASS, p as LOGO_MARK_PX, Te as LOGO_NAME_CLASS, d as LOGO_ROOT_CLASS, M as LOGO_SIZES, j as LOGO_STACK_CLASS, N as LOGO_SUB_CLASS, u as MENU_ITEM, m as MENU_ITEM_BASE, We as MENU_ITEM_X, n as MENU_LABEL, O as MENU_SEPARATOR, _e as MOBILE_BREAKPOINT, G as MODAL_MOTION, Ne as MORPH_MOTION, $ as MOTION_WINDOW_MS, ie as OUTLINE_SURFACE, r as OVERLAY_BLUR, Oe as OVERLAY_MOTION, Le as OVERLAY_SURFACE, w as OVERLAY_SURFACE_BASE, ee as OVERLAY_SURFACE_OPAQUE, Ve as PICKER_LIST, L as PICKER_TRIGGER, Pe as POSITION_BAR, W as POSITION_BAR_LIT, se as PRESS_DIP, _ as SCRIM_CLASS, be as SCRIM_MOTION, U as SECTION_INNER_RADIUS, K as SECTION_OUTER_RADIUS, Se as SECTION_PADDING, me as SECTION_ROW_CLASS, Ee as SECTION_ROW_SURFACE, de as SEGMENT_ITEM, Ae as SETTLE_MOTION, V as STAGGER, fe as STALE_CONTENT, oe as THUMB_CLASS, ye as THUMB_RAIL_BLEED, ke as THUMB_RAIL_PAD, B as THUMB_SIZE, f as TRACK_SURFACE, b as Z, e as Z_CLASS, a as alertBorder, v as alertFill, ue as alertIconBgStyle, t as alertIconFill, le as anchorToTriggerTop, X as buttonVariants, je as carouselDot, H as carouselItem, pe as carouselTrack, Me as cn, Be as copyImage, C as copyText, y as createHold, De as createIsMobile, ve as glassToneText, ne as spendLongPress, Ge as startMotionWindow, ce as toneTextMix };
@@ -1,4 +1,38 @@
1
1
  import type { JSX } from "solid-js";
2
+ export interface Box {
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ export type Side = "top" | "bottom" | "left" | "right";
9
+ export type Align = "start" | "center" | "end";
10
+ export interface AnchorPlace {
11
+ side: Side;
12
+ align: Align;
13
+ offset: number;
14
+ matchAnchorWidth: boolean;
15
+ /** False keeps the chosen side even without room; the part only shifts to stay inside the viewport. */
16
+ flip?: boolean;
17
+ }
18
+ export interface Placement {
19
+ left: number;
20
+ top: number;
21
+ side: Side;
22
+ maxWidth: number;
23
+ maxHeight: number;
24
+ }
25
+ /** Where a part of this size sits beside its anchor: on the chosen side, or the opposite when that
26
+ * side lacks room and the other has more, aligned along the edge and held 16px inside the viewport. */
27
+ export declare function placeBeside(anchor: Box, floating: {
28
+ width: number;
29
+ height: number;
30
+ }, viewport: {
31
+ width: number;
32
+ height: number;
33
+ }, place: AnchorPlace): Placement;
34
+ /** The corner a control takes (rounded-lg is --radius), clamped to a capsule at its height; read from the theme so opening a panel asks the page for no style. */
35
+ export declare const controlRadius: (height: number) => string;
2
36
  /** A panel that grows out of the element that opened it. The --morph-* values start the panel
3
37
  * clipped to the element's box (MORPH_MOTION's keyframes), so it unrolls out of it. */
4
38
  export declare function overAnchor(anchor: HTMLElement, width: number, height?: number): JSX.CSSProperties;
@@ -1,7 +1,13 @@
1
- /** Classes for the element holding the items: one row, then the balanced grid once `data-wrapped` is set. */
2
- export declare const BALANCED_ROWS = "grid grid-flow-col auto-cols-[minmax(max-content,1fr)] data-[wrapped]:grid-flow-row data-[wrapped]:grid-cols-[repeat(var(--balance-columns),minmax(max-content,1fr))]";
1
+ import type { Accessor } from "solid-js";
2
+ /** Marks the element holding the items: a wrapping row until the column count is known, then a grid of that many equal columns (globals.css). */
3
+ export declare const BALANCED_ROWS = "data-balanced-rows";
4
+ /** Marks the node inside each item that sizes to its content in either layout. */
5
+ export declare const BALANCE_CONTENT = "data-balance-content";
3
6
  /**
4
7
  * Lays `items` out in `BALANCED_ROWS`. `sizer` is the element that fills its line once wrapped
5
- * (it takes `data-wrapped` too); `item` selects the items among `items`' children.
8
+ * (it takes `data-wrapped` too); `item` selects the items among `items`' children, each holding
9
+ * one `BALANCE_CONTENT` node. Sizes come from a ResizeObserver only, never a layout read: an
10
+ * item's own width is its content node's width plus its padding and border, the same in either
11
+ * layout, so only the column count waits a frame, and the wrapping row never overflows meanwhile.
6
12
  */
7
- export declare function balanceRows(sizer: HTMLElement, items: HTMLElement, item: string): () => void;
13
+ export declare function balanceRows(sizer: HTMLElement, items: HTMLElement, item: string, members: Accessor<unknown>): () => void;
@@ -0,0 +1,26 @@
1
+ import type { Accessor } from "solid-js";
2
+ import { type Align, type Side } from "../anchor-placement.js";
3
+ /** An element, or a point or box with no element of its own: a context menu opens at the pointer. */
4
+ export interface AnchorLike {
5
+ getBoundingClientRect(): {
6
+ left: number;
7
+ top: number;
8
+ width: number;
9
+ height: number;
10
+ };
11
+ getRootNode?(): Node;
12
+ }
13
+ export interface AnchoredOptions {
14
+ anchor: Accessor<AnchorLike | undefined>;
15
+ floating: Accessor<HTMLElement | undefined>;
16
+ open: Accessor<boolean>;
17
+ side?: Accessor<Side>;
18
+ align?: Accessor<Align>;
19
+ offset?: number;
20
+ matchAnchorWidth?: boolean;
21
+ /** The anchor counts as its top edge and the part never flips: placed below, it covers the anchor. */
22
+ coverAnchor?: boolean;
23
+ /** A custom property the part gets the anchor's width in, for styles sized by the anchor. */
24
+ widthVar?: string;
25
+ }
26
+ export declare function createAnchored(options: AnchoredOptions): void;
@@ -0,0 +1,7 @@
1
+ import { type ComponentProps, type JSX, type ValidComponent } from "solid-js";
2
+ export type ButtonRootProps<T extends ValidComponent = "button"> = Omit<ComponentProps<T>, "as" | "disabled"> & {
3
+ as?: T;
4
+ disabled?: boolean;
5
+ };
6
+ /** A press target: a native button, a link, or any other element made one (role, Tab stop, Enter and Space). */
7
+ export declare function ButtonRoot<T extends ValidComponent = "button">(props: ButtonRootProps<T>): JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { type Accessor } from "solid-js";
2
+ export declare const TYPEAHEAD_MS = 1000;
3
+ type Orientation = "horizontal" | "vertical";
4
+ type HighlightBy = "keyboard" | "pointer";
5
+ export interface CollectionOptions {
6
+ root: Accessor<HTMLElement | undefined>;
7
+ itemSelector: string;
8
+ orientation: Accessor<Orientation>;
9
+ focus: "roving" | "virtual";
10
+ loop?: Accessor<boolean>;
11
+ dir?: Accessor<"ltr" | "rtl">;
12
+ /** Keys that hold the tab stop while focus is outside, first present wins (a selected tab). */
13
+ preferred?: Accessor<readonly string[]>;
14
+ /** APG's focusable when disabled: an `aria-disabled` item stays in the arrow order and can hold the tab stop. */
15
+ disabledFocusable?: boolean;
16
+ }
17
+ export interface Collection {
18
+ highlighted: Accessor<string | undefined>;
19
+ highlight: (key: string, by: HighlightBy) => void;
20
+ tabIndex: (key: string) => 0 | -1;
21
+ onKeyDown: (event: KeyboardEvent) => void;
22
+ /** Items call this as they mount, unmount or change disabled, so the tab stop always sits on a present, enabled item. */
23
+ refresh: () => void;
24
+ }
25
+ export interface Typeahead {
26
+ /** The index in `texts` the key leads to: -1 when nothing matches, `undefined` when the key types nothing. */
27
+ match: (event: KeyboardEvent, texts: readonly string[], from: number) => number | undefined;
28
+ }
29
+ /** The typing buffer alone, for a list whose items are not in the DOM (a closed Select's trigger). */
30
+ export declare function createTypeahead(): Typeahead;
31
+ export declare function createCollection(options: CollectionOptions): Collection;
32
+ export {};
@@ -0,0 +1,8 @@
1
+ import { type Accessor } from "solid-js";
2
+ export interface ControllableOptions<T> {
3
+ value: Accessor<T | undefined>;
4
+ defaultValue: Accessor<T>;
5
+ onChange?: (next: T) => void;
6
+ equals?: (a: T, b: T) => boolean;
7
+ }
8
+ export declare function createControllableSignal<T>(options: ControllableOptions<T>): [Accessor<T>, (next: T) => void];
@@ -0,0 +1,13 @@
1
+ import type { Accessor } from "solid-js";
2
+ import { type LayerHandle } from "./layer-stack.js";
3
+ export type DismissReason = "escape" | "outside-press" | "focus-outside";
4
+ export interface DismissOptions {
5
+ layer: LayerHandle;
6
+ /** `event` is the keydown for `escape`, the pointerdown for `outside-press` and the focusin for `focus-outside`. */
7
+ onDismiss: (reason: DismissReason, event: KeyboardEvent | PointerEvent | FocusEvent) => void;
8
+ outsidePress?: Accessor<boolean>;
9
+ /** Off unless asked: a non-modal layer closes when focus lands outside it. */
10
+ focusOutside?: Accessor<boolean>;
11
+ escapeFrom?: "layer" | "document";
12
+ }
13
+ export declare function createDismiss(options: DismissOptions): void;
@@ -0,0 +1,24 @@
1
+ import { type Accessor } from "solid-js";
2
+ export declare const CANDIDATES = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])";
3
+ export type InitialFocus = "container" | "first" | ((container: HTMLElement) => HTMLElement | null);
4
+ export interface FocusScopeOptions {
5
+ container: Accessor<HTMLElement | undefined>;
6
+ active: Accessor<boolean>;
7
+ trapped: Accessor<boolean>;
8
+ initialFocus?: InitialFocus;
9
+ }
10
+ export interface FocusScope {
11
+ skipRestore(): void;
12
+ untrap(): void;
13
+ }
14
+ /** The focused element in the node's own root, or null while focus is in another root. */
15
+ export declare function activeOf(node: Node): Element | null;
16
+ /** Whether `el` holds focus, from its own focus and blur events, which a sealed widget receives without asking the page. */
17
+ export declare function trackFocus(el: Element): {
18
+ has: () => boolean;
19
+ stop: () => void;
20
+ };
21
+ export declare function focusWithoutTracking(el: HTMLElement | null | undefined, options?: {
22
+ preventScroll?: boolean;
23
+ }): boolean;
24
+ export declare function createFocusScope(options: FocusScopeOptions): FocusScope;
@@ -0,0 +1,7 @@
1
+ import { type Accessor } from "solid-js";
2
+ import type { LayerHandle } from "./layer-stack.js";
3
+ export interface HideOutsideOptions {
4
+ layer: LayerHandle;
5
+ active: Accessor<boolean>;
6
+ }
7
+ export declare function createHideOutside(options: HideOutsideOptions): void;
@@ -0,0 +1,34 @@
1
+ import { type Accessor } from "solid-js";
2
+ export type LayerKind = "modal" | "popover" | "menu" | "tooltip" | "tour";
3
+ export type TopLayer = "auto" | "manual";
4
+ export interface LayerOptions {
5
+ element: Accessor<HTMLElement | undefined>;
6
+ open: Accessor<boolean>;
7
+ kind: LayerKind;
8
+ escape: Accessor<boolean>;
9
+ dismiss?: () => void;
10
+ trigger?: Accessor<Element | undefined>;
11
+ topLayer?: TopLayer;
12
+ /** While open, the page takes no pointer events; this layer and the ones above it still do. */
13
+ blockPointer?: Accessor<boolean>;
14
+ }
15
+ export interface Layer {
16
+ readonly id: number;
17
+ readonly kind: LayerKind;
18
+ element(): HTMLElement | undefined;
19
+ trigger(): Element | undefined;
20
+ escape(): boolean;
21
+ readonly blocksPointer: boolean;
22
+ dismiss?: () => void;
23
+ }
24
+ export interface LayerHandle {
25
+ layer: Accessor<Layer | undefined>;
26
+ isTop: Accessor<boolean>;
27
+ above(): readonly Layer[];
28
+ containsPath(path: readonly EventTarget[]): boolean;
29
+ }
30
+ export declare const layerStack: {
31
+ layers: Accessor<readonly Layer[]>;
32
+ top: Accessor<Layer | undefined>;
33
+ };
34
+ export declare function registerLayer(options: LayerOptions): LayerHandle;
@@ -0,0 +1,59 @@
1
+ import { type Accessor } from "solid-js";
2
+ import type { Align, Side } from "../anchor-placement.js";
3
+ import { type AnchorLike } from "./anchored.js";
4
+ export declare const SUBMENU_OPEN_DELAY_MS = 100;
5
+ export declare const POINTER_GRACE_MS = 300;
6
+ /** Where focus goes as a menu opens: an item, the panel itself, or nowhere (a submenu opened by hover). */
7
+ export type MenuFocus = "first" | "last" | "content" | "none";
8
+ type Dir = "ltr" | "rtl";
9
+ export interface MenuItemEntry {
10
+ disabled: Accessor<boolean>;
11
+ closeOnSelect: Accessor<boolean>;
12
+ onSelect: () => void;
13
+ submenu?: Menu;
14
+ }
15
+ export interface MenuOptions {
16
+ open: Accessor<boolean>;
17
+ onOpenChange: (open: boolean) => void;
18
+ parent?: Menu;
19
+ /** What the menu sits beside, given its trigger; unset, the trigger itself, as a submenu always does. */
20
+ anchor?: (trigger: HTMLElement | undefined) => AnchorLike | undefined;
21
+ /** The panel covers its anchor from the anchor's top edge, as createAnchored's coverAnchor. */
22
+ coverAnchor?: boolean;
23
+ side?: Accessor<Side>;
24
+ align?: Accessor<Align>;
25
+ offset?: number;
26
+ dir?: Accessor<Dir>;
27
+ /** A press on the trigger counts as outside: a context menu's trigger is the area it opens over. */
28
+ triggerIsArea?: boolean;
29
+ }
30
+ export interface Menu {
31
+ parent: Menu | undefined;
32
+ open: Accessor<boolean>;
33
+ dir: Accessor<Dir>;
34
+ content: Accessor<HTMLElement | undefined>;
35
+ setContent: (el: HTMLElement | undefined) => void;
36
+ trigger: Accessor<HTMLElement | undefined>;
37
+ setTrigger: (el: HTMLElement | undefined) => void;
38
+ highlighted: Accessor<string | undefined>;
39
+ tabIndex: (key: string) => 0 | -1;
40
+ show: (focus: MenuFocus) => void;
41
+ /** Closes this menu and its submenus; with `returnFocus`, focus held inside goes back to the trigger. */
42
+ hide: (returnFocus: boolean) => void;
43
+ /** Closes every menu from the root down, as choosing an item does. */
44
+ closeTree: () => void;
45
+ register: (key: string, entry: MenuItemEntry) => void;
46
+ holdsFocus: () => boolean;
47
+ unhighlight: () => void;
48
+ /** A submenu joins its parent, so focus inside it counts as inside the tree. */
49
+ adopt: (child: Menu) => void;
50
+ }
51
+ export interface MenuButton {
52
+ onPointerDown: (event: PointerEvent) => void;
53
+ onClick: () => void;
54
+ onKeyDown: (event: KeyboardEvent) => void;
55
+ }
56
+ export declare function createMenu(options: MenuOptions): Menu;
57
+ /** The APG menu button: a mouse press toggles, a finger toggles on its click, Enter, Space and ArrowDown open on the first item, ArrowUp on the last. */
58
+ export declare function createMenuButton(menu: Menu, disabled: Accessor<boolean>): MenuButton;
59
+ export {};
@@ -0,0 +1,68 @@
1
+ import { type Accessor, type ComponentProps, type JSX, type ValidComponent } from "solid-js";
2
+ export type ModalRole = "dialog" | "alertdialog";
3
+ export interface ModalRootProps {
4
+ open?: boolean;
5
+ defaultOpen?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ modal?: boolean;
8
+ keep?: boolean;
9
+ role?: ModalRole;
10
+ children?: JSX.Element;
11
+ }
12
+ export interface ModalContext {
13
+ isOpen: Accessor<boolean>;
14
+ close: () => void;
15
+ toggle: () => void;
16
+ modal: Accessor<boolean>;
17
+ keep: Accessor<boolean>;
18
+ dormant: Accessor<boolean>;
19
+ bindDormant: (source: Accessor<boolean>) => void;
20
+ readonly role: ModalRole;
21
+ titleId: Accessor<string | undefined>;
22
+ registerTitle: (id: string) => () => void;
23
+ descriptionId: Accessor<string | undefined>;
24
+ registerDescription: (id: string) => () => void;
25
+ contentId: Accessor<string | undefined>;
26
+ registerContent: (id: string) => () => void;
27
+ triggerRef: Accessor<HTMLElement | undefined>;
28
+ setTriggerRef: (el: HTMLElement | undefined) => void;
29
+ panel: Accessor<HTMLElement | undefined>;
30
+ setPanel: (el: HTMLElement | undefined) => void;
31
+ }
32
+ export declare function useDialogContext(): ModalContext;
33
+ /** Whether the modal around the caller is closed and kept; false outside one, so a ticker inside can pause. */
34
+ export declare function useDialogDormant(): Accessor<boolean>;
35
+ export declare function ModalRoot(props: ModalRootProps): JSX.Element;
36
+ export type ModalPartProps<T extends ValidComponent> = {
37
+ as?: T;
38
+ } & Omit<ComponentProps<T>, "as">;
39
+ export declare function ModalTrigger<T extends ValidComponent = "button">(props: ModalPartProps<T>): JSX.Element;
40
+ export declare function ModalTitle<T extends ValidComponent = "h2">(props: ModalPartProps<T>): JSX.Element;
41
+ export declare function ModalDescription<T extends ValidComponent = "p">(props: ModalPartProps<T>): JSX.Element;
42
+ export interface ModalFrameProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "ref" | "style" | "role" | "class"> {
43
+ slot: string;
44
+ panelClass: string;
45
+ scrimClass: string;
46
+ panelStyle?: JSX.CSSProperties;
47
+ ariaLabel?: string;
48
+ ref?: (el: HTMLElement) => void;
49
+ as?: ValidComponent;
50
+ mount?: Node;
51
+ exitMs: number;
52
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
53
+ onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
54
+ onInteractOutside?: (event: InteractOutsideEvent) => void;
55
+ onOpenAutoFocus?: (event: Event) => void;
56
+ onCloseAutoFocus?: (event: Event) => void;
57
+ }
58
+ interface OutsideDetail<T extends Event> {
59
+ originalEvent: T;
60
+ isContextMenu: boolean;
61
+ }
62
+ export type PointerDownOutsideEvent = CustomEvent<OutsideDetail<PointerEvent>>;
63
+ export type FocusOutsideEvent = CustomEvent<OutsideDetail<FocusEvent>>;
64
+ export type InteractOutsideEvent = PointerDownOutsideEvent | FocusOutsideEvent;
65
+ export declare function vetoed<E extends Event>(handler: ((event: E) => void) | undefined, event: E): boolean;
66
+ export declare function interactOutside<T extends PointerEvent | FocusEvent>(original: T, handle: (event: CustomEvent<OutsideDetail<T>>) => void): CustomEvent<OutsideDetail<T>>;
67
+ export declare function ModalFrame(props: ModalFrameProps): JSX.Element;
68
+ export {};
@@ -0,0 +1,6 @@
1
+ import { type ComponentProps, type JSX, type ValidComponent } from "solid-js";
2
+ export type PolymorphicProps<D extends ValidComponent> = {
3
+ as?: ValidComponent;
4
+ defaultAs: D;
5
+ } & ComponentProps<D>;
6
+ export declare function Polymorphic<D extends ValidComponent>(props: PolymorphicProps<D>): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type Accessor } from "solid-js";
2
+ export type PresencePhase = "opening" | "open" | "closing" | "closed";
3
+ export type MotionEvent = AnimationEvent | TransitionEvent;
4
+ export interface PresenceOptions {
5
+ present: Accessor<boolean>;
6
+ element: Accessor<Element | undefined>;
7
+ exitMs: number;
8
+ accept?: (e: MotionEvent) => boolean;
9
+ keep?: Accessor<boolean>;
10
+ }
11
+ export interface Presence {
12
+ mounted: Accessor<boolean>;
13
+ phase: Accessor<PresencePhase>;
14
+ dormant: Accessor<boolean>;
15
+ }
16
+ export declare const PRESENCE_TIMEOUT_MS = 1000;
17
+ export declare function watchMotion(el: Element, exitMs: number, done: () => void, accept?: (e: MotionEvent) => boolean): () => void;
18
+ export declare function createPresence(options: PresenceOptions): Presence;
@@ -0,0 +1,44 @@
1
+ import { type Accessor } from "solid-js";
2
+ export type RangeKey = "decrease" | "increase" | "pageDown" | "pageUp" | "first" | "last";
3
+ export declare function rangeKeyOf(e: KeyboardEvent): RangeKey | undefined;
4
+ export interface RangeOptions {
5
+ values: Accessor<number[] | undefined>;
6
+ defaultValues: Accessor<number[]>;
7
+ min: Accessor<number>;
8
+ max: Accessor<number>;
9
+ step: Accessor<number>;
10
+ minStepsBetween?: Accessor<number>;
11
+ disabled: Accessor<boolean>;
12
+ onChange?: (values: number[]) => void;
13
+ onChangeEnd?: (values: number[]) => void;
14
+ }
15
+ export interface Range {
16
+ values: Accessor<number[]>;
17
+ fraction: (value: number) => number;
18
+ valueAt: (fraction: number) => number;
19
+ setThumb: (index: number, value: number) => void;
20
+ closestThumb: (value: number) => number;
21
+ keyDown: (e: KeyboardEvent, index: number) => void;
22
+ blur: () => void;
23
+ dragEnd: () => void;
24
+ }
25
+ /** Thumbs on a stepped linear track that never cross; a key change ends on blur, a drag on release. */
26
+ export declare function createRange(options: RangeOptions): Range;
27
+ export declare const alongTrack: (e: PointerEvent, rect: DOMRect) => number;
28
+ type Pointer = PointerEvent & {
29
+ currentTarget: HTMLElement;
30
+ };
31
+ export interface DragOptions {
32
+ disabled: Accessor<boolean>;
33
+ start: (e: PointerEvent, rect: DOMRect) => void;
34
+ move: (e: PointerEvent, rect: DOMRect) => void;
35
+ end: () => void;
36
+ }
37
+ /** One primary-pointer drag at a time, captured on the pressed element, its rect read once per drag. */
38
+ export declare function createDrag(options: DragOptions): {
39
+ onPointerDown: (e: Pointer) => void;
40
+ onPointerMove: (e: Pointer) => void;
41
+ onPointerUp: (e: Pointer) => void;
42
+ onPointerCancel: (e: Pointer) => void;
43
+ };
44
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type JSX, mergeProps } from "solid-js";
2
+ export declare function effect<T>(compute: () => T, apply: (value: T) => (() => void) | void): void;
3
+ export declare const merge: typeof mergeProps;
4
+ export declare function omit<T extends object, K extends keyof T>(props: T, ...keys: K[]): {
5
+ [P in keyof T as Exclude<P, K>]: T[P];
6
+ };
7
+ /** Solid's handler prop is a union: a plain function, or the bound
8
+ * `[handler, data]` form that calls `handler(data, event)`. A wrapper that
9
+ * only checks for a function silently drops the bound one. */
10
+ export declare function callEventHandler<T, E extends Event>(event: E & {
11
+ currentTarget: T;
12
+ target: Element;
13
+ }, handler: JSX.EventHandlerUnion<T, E> | undefined): void;
@@ -0,0 +1,41 @@
1
+ import type { ColorIntlTranslations } from "./intl.js";
2
+ type ColorFormat = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hsb" | "hsba";
3
+ type ColorSpace = "rgb" | "hsl" | "hsb";
4
+ export type ColorChannel = "hue" | "saturation" | "brightness" | "lightness" | "red" | "green" | "blue" | "alpha";
5
+ interface ColorAxes {
6
+ xChannel: ColorChannel;
7
+ yChannel: ColorChannel;
8
+ zChannel: ColorChannel;
9
+ }
10
+ interface ColorChannelRange {
11
+ minValue: number;
12
+ maxValue: number;
13
+ step: number;
14
+ pageSize: number;
15
+ }
16
+ /** A color value; every method that changes it returns a new one. */
17
+ export interface Color {
18
+ toFormat(format: ColorFormat): Color;
19
+ toString(format?: ColorFormat | "css"): string;
20
+ clone(): Color;
21
+ toHexInt(): number;
22
+ /** Throws when the channel is not in the color's space. */
23
+ getChannelValue(channel: ColorChannel): number;
24
+ /** Throws when the channel is not in the color's space. */
25
+ withChannelValue(channel: ColorChannel, value: number): Color;
26
+ getChannelRange(channel: ColorChannel): ColorChannelRange;
27
+ getChannelName(channel: ColorChannel, translations: ColorIntlTranslations): string;
28
+ getChannelFormatOptions(channel: ColorChannel): Intl.NumberFormatOptions;
29
+ formatChannelValue(channel: ColorChannel): string;
30
+ getColorSpace(): ColorSpace;
31
+ getColorSpaceAxes(xyChannels: {
32
+ xChannel?: ColorChannel;
33
+ yChannel?: ColorChannel;
34
+ }): ColorAxes;
35
+ getColorChannels(): [ColorChannel, ColorChannel, ColorChannel];
36
+ getColorName(translations: ColorIntlTranslations): string;
37
+ getHueName(translations: ColorIntlTranslations): string;
38
+ }
39
+ /** Parses a color from a string value. Throws an error if the string could not be parsed. */
40
+ export declare function parseColor(value: string): Color;
41
+ export {};
@@ -0,0 +1,2 @@
1
+ export { type Color, type ColorChannel, parseColor } from "./color.js";
2
+ export { COLOR_INTL_TRANSLATIONS } from "./intl.js";
@@ -0,0 +1,40 @@
1
+ export declare const COLOR_INTL_TRANSLATIONS: {
2
+ hue: string;
3
+ saturation: string;
4
+ lightness: string;
5
+ brightness: string;
6
+ red: string;
7
+ green: string;
8
+ blue: string;
9
+ alpha: string;
10
+ colorName: (lightness: string, chroma: string, hue: string) => string;
11
+ transparentColorName: (lightness: string, chroma: string, hue: string, percentTransparent: string) => string;
12
+ "very dark": string;
13
+ dark: string;
14
+ light: string;
15
+ "very light": string;
16
+ pale: string;
17
+ grayish: string;
18
+ vibrant: string;
19
+ black: string;
20
+ white: string;
21
+ gray: string;
22
+ pink: string;
23
+ "pink red": string;
24
+ "red orange": string;
25
+ brown: string;
26
+ orange: string;
27
+ "orange yellow": string;
28
+ "brown yellow": string;
29
+ yellow: string;
30
+ "yellow green": string;
31
+ "green cyan": string;
32
+ cyan: string;
33
+ "cyan blue": string;
34
+ "blue purple": string;
35
+ purple: string;
36
+ "purple magenta": string;
37
+ magenta: string;
38
+ "magenta pink": string;
39
+ };
40
+ export type ColorIntlTranslations = typeof COLOR_INTL_TRANSLATIONS;
@@ -1 +1,3 @@
1
+ /** The rounded-lg in DOCK_SLOT_SHAPE, for a selection flyer that crosses slots. */
2
+ export declare const DOCK_SLOT_RADIUS = "var(--radius-lg)";
1
3
  export declare const DOCK_SLOT_SHAPE = "flex size-11 touch-manipulation items-center justify-center rounded-lg sm:size-12";
@@ -6,7 +6,7 @@ export declare const HOLD_MS = 350;
6
6
  export declare const HOLD_GRACE_MS = 100;
7
7
  /** A fired hold spends the press: the browser's own long press (text selection, context menu)
8
8
  * must not land on what the hold opened under the finger. Lasts until the release.
9
- * @deprecated use createHold, which also spends the release. */
9
+ * @deprecated `createHold`; removed in 2.0.0. */
10
10
  export declare function spendLongPress(): void;
11
11
  /** What a hold reads from a press: a PointerEvent fits, and so does a touch or a recorded point. */
12
12
  export interface HoldPress {
@@ -0,0 +1,3 @@
1
+ export type ReadingDirection = "ltr" | "rtl";
2
+ export declare const locale: string;
3
+ export declare const readingDirection: ReadingDirection;
@@ -1,4 +1,6 @@
1
1
  export declare const MENU_ITEM_BASE = "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&:not([data-tone])_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&>[data-slot=icon]]:shrink-0 [&>[data-slot=icon]]:text-[16px]";
2
+ /** The rounded-sm in MENU_ITEM_BASE, for a selection flyer that crosses rows. */
3
+ export declare const MENU_ITEM_RADIUS = "var(--radius-sm)";
2
4
  export declare const MENU_ITEM_X = "px-2";
3
5
  export declare const MENU_ITEM = "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&:not([data-tone])_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&>[data-slot=icon]]:shrink-0 [&>[data-slot=icon]]:text-[16px] px-2";
4
6
  export declare const MENU_LABEL = "px-2 py-1.5 font-medium text-muted-foreground text-xs";