rift-ds 1.34.0 → 1.35.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 (69) hide show
  1. package/README.md +3 -3
  2. package/behaviors/locale.d.ts +9 -0
  3. package/behaviors/locale.js +2 -0
  4. package/bin/templates/blocks/app/dashboard/page.tsx +1 -1
  5. package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -6
  6. package/chat/ChatTabs.js +1 -1
  7. package/chat/ChatWidget.d.ts +2 -2
  8. package/chat/ChatWidget.js +1 -1
  9. package/chat/DemoWelcome.js +2 -2
  10. package/chat/FollowupSuggestions.js +1 -1
  11. package/components/ActionBar/ActionBar.css +78 -0
  12. package/components/ActionBar/ActionBar.d.ts +40 -0
  13. package/components/ActionBar/ActionBar.js +29 -0
  14. package/components/AiButton/AiButton.js +1 -1
  15. package/components/Alert/Alert.css +16 -0
  16. package/components/Alert/Alert.d.ts +2 -2
  17. package/components/Alert/Alert.js +3 -1
  18. package/components/AppSidebar/AppSidebar.css +140 -4
  19. package/components/AppSidebar/AppSidebar.d.ts +12 -0
  20. package/components/AppSidebar/AppSidebar.js +7 -3
  21. package/components/ChatThread/ChatThread.d.ts +5 -1
  22. package/components/ChatThread/ChatThread.js +1 -1
  23. package/components/ContextMenu/ContextMenu.d.ts +5 -1
  24. package/components/ContextMenu/ContextMenu.js +2 -1
  25. package/components/ContributionGraph/ContributionGraph.d.ts +7 -1
  26. package/components/ContributionGraph/ContributionGraph.js +4 -18
  27. package/components/ContributionGraph/weeks.d.ts +8 -0
  28. package/components/ContributionGraph/weeks.js +25 -0
  29. package/components/DataTable/DataTable.js +1 -1
  30. package/components/DocumentChip/DocumentChip.js +1 -1
  31. package/components/EntitySwitcher/EntitySwitcher.css +11 -3
  32. package/components/EntitySwitcher/EntitySwitcher.js +1 -1
  33. package/components/EventCalendar/EventCalendar.css +152 -0
  34. package/components/EventCalendar/EventCalendar.d.ts +50 -4
  35. package/components/EventCalendar/EventCalendar.js +154 -23
  36. package/components/EventCalendar/eventTime.d.ts +31 -0
  37. package/components/EventCalendar/eventTime.js +42 -0
  38. package/components/FileInput/FileInput.d.ts +12 -4
  39. package/components/FileInput/FileInput.js +27 -4
  40. package/components/Input/Input.css +30 -0
  41. package/components/Input/Input.d.ts +8 -0
  42. package/components/Input/Input.js +3 -0
  43. package/components/Popover/Popover.d.ts +5 -1
  44. package/components/Popover/Popover.js +3 -1
  45. package/components/ProgressBar/ProgressBar.d.ts +5 -1
  46. package/components/ProgressBar/ProgressBar.js +1 -1
  47. package/components/PromptSuggestions/PromptSuggestions.d.ts +5 -1
  48. package/components/PromptSuggestions/PromptSuggestions.js +1 -1
  49. package/components/ResourceTimeline/ResourceTimeline.js +2 -2
  50. package/components/SegmentedControl/SegmentedControl.css +120 -3
  51. package/components/SegmentedControl/SegmentedControl.d.ts +9 -0
  52. package/components/SegmentedControl/SegmentedControl.js +11 -1
  53. package/components/ShaderScene/ShaderScene.d.ts +3 -3
  54. package/components/ShaderScene/scenes.d.ts +17 -0
  55. package/components/ShaderScene/scenes.js +175 -1
  56. package/components/Stat/Stat.css +12 -0
  57. package/components/Stat/Stat.d.ts +5 -0
  58. package/components/Stat/Stat.js +9 -3
  59. package/components/TableToolbar/TableToolbar.js +2 -2
  60. package/components/ThemeToggle/ThemeToggle.d.ts +1 -1
  61. package/components/ThreadTabs/ThreadTabs.d.ts +5 -1
  62. package/components/ThreadTabs/ThreadTabs.js +2 -1
  63. package/components/ToggleGroup/ToggleGroup.d.ts +5 -1
  64. package/components/registry.json +21 -4
  65. package/components/registry.json.d.ts +21 -4
  66. package/components/registry.json.js +1 -1
  67. package/index.d.ts +1 -0
  68. package/index.js +2 -0
  69. package/package.json +1 -1
@@ -38,6 +38,7 @@
38
38
  left: 0; /* ds-allow(physical): the pill slides by the segment's measured offsetLeft, which is a screen offset in either direction */
39
39
  width: 0;
40
40
  height: 0;
41
+ box-sizing: border-box; /* a status pill's hairline sits inside the measured box */
41
42
  border-radius: var(--radius-pill);
42
43
  background-color: var(--color-action-primary-bg);
43
44
  opacity: 0;
@@ -46,7 +47,8 @@
46
47
  transition:
47
48
  transform var(--motion-duration-base) var(--motion-ease-entrance),
48
49
  width var(--motion-duration-base) var(--motion-ease-entrance),
49
- background-color var(--motion-duration-base) var(--motion-ease-standard);
50
+ background-color var(--motion-duration-base) var(--motion-ease-standard),
51
+ border-color var(--motion-duration-base) var(--motion-ease-standard);
50
52
  }
51
53
 
52
54
  .ds-segmented-control--pill-ready .ds-segmented-control__pill {
@@ -64,7 +66,7 @@
64
66
 
65
67
  /* Hovering the active segment darkens the pill, mirroring the retired
66
68
  per-segment hover fill. */
67
- .ds-segmented-control--pill-ready:has(.ds-segmented-control__segment--active:hover) .ds-segmented-control__pill {
69
+ .ds-segmented-control--pill-ready:not(.ds-segmented-control--status):has(.ds-segmented-control__segment--active:hover) .ds-segmented-control__pill {
68
70
  background-color: var(--color-action-primary-bg-hover);
69
71
  }
70
72
 
@@ -72,7 +74,7 @@
72
74
  background-color: var(--color-action-neutral-bg);
73
75
  }
74
76
 
75
- .ds-segmented-control--pill-ready.ds-segmented-control--neutral:has(.ds-segmented-control__segment--active:hover) .ds-segmented-control__pill {
77
+ .ds-segmented-control--pill-ready.ds-segmented-control--neutral:not(.ds-segmented-control--status):has(.ds-segmented-control__segment--active:hover) .ds-segmented-control__pill {
76
78
  background-color: var(--color-action-neutral-bg-hover);
77
79
  }
78
80
 
@@ -191,6 +193,121 @@
191
193
  background-color: var(--color-action-neutral-bg-hover);
192
194
  }
193
195
 
196
+ /* ============================================
197
+ STATUS SEGMENTS (Segment.status)
198
+ A selected segment whose choice is a status
199
+ (Present, Late, Absent) wears that status in
200
+ place of the action colour or the neutral
201
+ tone: the status surface Alert and Toast draw,
202
+ its tinted fill and border with the status
203
+ text on it. The pill keeps sliding, and its
204
+ colours tween with it. Idle segments, hover
205
+ and the focus ring are the control's own; the
206
+ status has no hover step, so hovering the
207
+ selected segment holds its fill.
208
+ ============================================ */
209
+
210
+ .ds-segmented-control__pill--positive,
211
+ .ds-segmented-control__segment--positive {
212
+ --ds-segmented-status-bg: var(--color-status-positive-bg);
213
+ --ds-segmented-status-border: var(--color-status-positive-border);
214
+ --ds-segmented-status-text: var(--color-status-positive-text);
215
+ }
216
+
217
+ .ds-segmented-control__pill--warning,
218
+ .ds-segmented-control__segment--warning {
219
+ --ds-segmented-status-bg: var(--color-status-warning-bg);
220
+ --ds-segmented-status-border: var(--color-status-warning-border);
221
+ --ds-segmented-status-text: var(--color-status-warning-text);
222
+ }
223
+
224
+ .ds-segmented-control__pill--error,
225
+ .ds-segmented-control__segment--error {
226
+ --ds-segmented-status-bg: var(--color-status-error-bg);
227
+ --ds-segmented-status-border: var(--color-status-error-border);
228
+ --ds-segmented-status-text: var(--color-status-error-text);
229
+ }
230
+
231
+ .ds-segmented-control__pill--info,
232
+ .ds-segmented-control__segment--info {
233
+ --ds-segmented-status-bg: var(--color-status-info-bg);
234
+ --ds-segmented-status-border: var(--color-status-info-border);
235
+ --ds-segmented-status-text: var(--color-status-info-text);
236
+ }
237
+
238
+ .ds-segmented-control .ds-segmented-control__pill:is(
239
+ .ds-segmented-control__pill--positive,
240
+ .ds-segmented-control__pill--warning,
241
+ .ds-segmented-control__pill--error,
242
+ .ds-segmented-control__pill--info
243
+ ) {
244
+ background-color: var(--ds-segmented-status-bg);
245
+ border: var(--border-025) solid var(--ds-segmented-status-border);
246
+ }
247
+
248
+ /* Before the pill is measured, the selected segment paints the status
249
+ itself, as it paints the action colour. */
250
+ .ds-segmented-control:not(.ds-segmented-control--pill-ready) .ds-segmented-control__segment--active:is(
251
+ .ds-segmented-control__segment--positive,
252
+ .ds-segmented-control__segment--warning,
253
+ .ds-segmented-control__segment--error,
254
+ .ds-segmented-control__segment--info
255
+ ),
256
+ .ds-segmented-control:not(.ds-segmented-control--pill-ready) .ds-segmented-control__segment--active:is(
257
+ .ds-segmented-control__segment--positive,
258
+ .ds-segmented-control__segment--warning,
259
+ .ds-segmented-control__segment--error,
260
+ .ds-segmented-control__segment--info
261
+ ):hover {
262
+ background-color: var(--ds-segmented-status-bg);
263
+ }
264
+
265
+ .ds-segmented-control .ds-segmented-control__segment--active:is(
266
+ .ds-segmented-control__segment--positive,
267
+ .ds-segmented-control__segment--warning,
268
+ .ds-segmented-control__segment--error,
269
+ .ds-segmented-control__segment--info
270
+ ) :is(.ds-segmented-control__label:not(.ds-segmented-control__label--tip), .ds-segmented-control__icon) {
271
+ color: var(--ds-segmented-status-text);
272
+ }
273
+
274
+ /* Forced colours flatten the status fill to the page, so a selected status
275
+ segment keeps the system highlight every selection wears there. */
276
+ @media (forced-colors: active) {
277
+ .ds-segmented-control .ds-segmented-control__pill:is(
278
+ .ds-segmented-control__pill--positive,
279
+ .ds-segmented-control__pill--warning,
280
+ .ds-segmented-control__pill--error,
281
+ .ds-segmented-control__pill--info
282
+ ),
283
+ .ds-segmented-control:not(.ds-segmented-control--pill-ready) .ds-segmented-control__segment--active:is(
284
+ .ds-segmented-control__segment--positive,
285
+ .ds-segmented-control__segment--warning,
286
+ .ds-segmented-control__segment--error,
287
+ .ds-segmented-control__segment--info
288
+ ) {
289
+ background-color: var(--color-action-primary-bg);
290
+ }
291
+
292
+ .ds-segmented-control .ds-segmented-control__pill:is(
293
+ .ds-segmented-control__pill--positive,
294
+ .ds-segmented-control__pill--warning,
295
+ .ds-segmented-control__pill--error,
296
+ .ds-segmented-control__pill--info
297
+ ) {
298
+ border-color: var(--color-action-primary-bg);
299
+ }
300
+
301
+ .ds-segmented-control .ds-segmented-control__segment--active:is(
302
+ .ds-segmented-control__segment--positive,
303
+ .ds-segmented-control__segment--warning,
304
+ .ds-segmented-control__segment--error,
305
+ .ds-segmented-control__segment--info
306
+ ) :is(.ds-segmented-control__label:not(.ds-segmented-control__label--tip), .ds-segmented-control__icon) {
307
+ color: var(--color-action-primary-text);
308
+ }
309
+ }
310
+
194
311
  /* ============================================
195
312
  DISABLED STATE
196
313
  ============================================ */
@@ -1,4 +1,6 @@
1
1
  import { default as React } from 'react';
2
+ /** The status roles a segment can mean (see `Segment.status`). */
3
+ export type SegmentStatus = 'positive' | 'warning' | 'error' | 'info';
2
4
  export interface Segment {
3
5
  /** Unique value for this segment */
4
6
  value: string;
@@ -8,6 +10,13 @@ export interface Segment {
8
10
  icon?: string | React.ReactNode;
9
11
  /** Whether disabled */
10
12
  disabled?: boolean;
13
+ /**
14
+ * A status the choice itself means. When this segment is selected, the pill
15
+ * takes that status's colours (`--color-status-*`) in place of the action
16
+ * colour, for a set whose options are statuses (Present, Late, Absent).
17
+ * Idle segments, hover and the focus ring are unchanged.
18
+ */
19
+ status?: SegmentStatus;
11
20
  /** The id of the `role="tabpanel"` element this segment shows, written as its `aria-controls`. The consumer renders the panels. */
12
21
  panelId?: string;
13
22
  }
@@ -77,12 +77,14 @@ const SegmentedControl = React.forwardRef(
77
77
  setCollapseState({ key: collapseKey, mode: "full" });
78
78
  }
79
79
  const collapseMode = !showLabels ? "icons" : collapseState.key === collapseKey ? collapseState.mode : "full";
80
+ const activeStatus = segments.find((segment) => segment.value === activeSegment)?.status;
80
81
  const classes = [
81
82
  baseClass,
82
83
  sizeClass,
83
84
  variantClass,
84
85
  fullWidthClass,
85
86
  pillReady ? `${baseClass}--pill-ready` : "",
87
+ activeStatus ? `${baseClass}--status` : "",
86
88
  !showLabels ? `${baseClass}--icons` : "",
87
89
  className
88
90
  ].filter(Boolean).join(" ");
@@ -298,12 +300,20 @@ const SegmentedControl = React.forwardRef(
298
300
  showTip(event.target);
299
301
  },
300
302
  children: [
301
- /* @__PURE__ */ jsx("span", { className: `${baseClass}__pill`, "aria-hidden": "true", ref: pillRef }),
303
+ /* @__PURE__ */ jsx(
304
+ "span",
305
+ {
306
+ className: `${baseClass}__pill${activeStatus ? ` ${baseClass}__pill--${activeStatus}` : ""}`,
307
+ "aria-hidden": "true",
308
+ ref: pillRef
309
+ }
310
+ ),
302
311
  segments.map((segment, idx) => {
303
312
  const isActive = segment.value === activeSegment;
304
313
  const btnClasses = [
305
314
  `${baseClass}__segment`,
306
315
  isActive ? `${baseClass}__segment--active` : "",
316
+ isActive && segment.status ? `${baseClass}__segment--${segment.status}` : "",
307
317
  segment.disabled ? `${baseClass}__segment--disabled` : "",
308
318
  // Icon and label both on screen: the icon's edge takes a step
309
319
  // less padding (design.md, SegmentedControl).
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { ShaderSceneSource, Values } from './types';
3
3
  /** The scenes the library ships, picked by id. */
4
- export type ShaderSceneId = 'horizon' | 'rift' | 'glyphs' | 'prism' | 'meteors' | 'waves' | 'aurora' | 'highway' | 'ocean' | 'sky' | 'galaxy';
4
+ export type ShaderSceneId = 'horizon' | 'rift' | 'glyphs' | 'prism' | 'meteors' | 'waves' | 'aurora' | 'highway' | 'ocean' | 'sky' | 'galaxy' | 'tide';
5
5
  /**
6
6
  * How the scene resolved, the same three states ShaderField reports.
7
7
  * `pending` while the GL context comes up (bounded by a watchdog), `active`
@@ -23,7 +23,7 @@ type ShaderSceneOwnProps = {
23
23
  /**
24
24
  * The scene to paint: one of the library's by id, or a scene of your own as
25
25
  * a `ShaderSceneSource` (its colour roles, its settings and the GLSL that
26
- * paints it). The library's are `horizon`, a planet's limb at night, `rift`, a glowing tear, `glyphs`, soft light printed in type, `prism`, beams of light split into a spectrum, `meteors`, a shower over a planet's edge, `waves`, a rolling sea of points, `highway`, a straight highway at night drawn in light trails, `aurora`, ribbons of colour round a void, `ocean`, open water from above with sea life drawn in type, turquoise on a light page and moonlit on a dark one, `sky`, cloud massed overhead and burning with a low sun, a golden hour on a light page and the last of a sunset under a night sky on a dark one, and `galaxy`, a spiral galaxy seen at a slant, deep in a field of stars. A scene of your own is compared by content, so
26
+ * paints it). The library's are `horizon`, a planet's limb at night, `rift`, a glowing tear, `glyphs`, soft light printed in type, `prism`, beams of light split into a spectrum, `meteors`, a shower over a planet's edge, `waves`, a rolling sea of points, `highway`, a straight highway at night drawn in light trails, `aurora`, ribbons of colour round a void, `ocean`, open water from above with sea life drawn in type, turquoise on a light page and moonlit on a dark one, `sky`, cloud massed overhead and burning with a low sun, a golden hour on a light page and the last of a sunset under a night sky on a dark one, `galaxy`, a spiral galaxy seen at a slant, deep in a field of stars, and `tide`, dusk over still water smeared like a long exposure, a periwinkle evening on a light page and the last of the light on a dark one. A scene of your own is compared by content, so
27
27
  * an object written inline rebuilds nothing until what it says changes.
28
28
  */
29
29
  scene?: ShaderSceneId | ShaderSceneSource;
@@ -74,7 +74,7 @@ export interface ShaderSceneProps extends ShaderSceneOwnProps, Omit<React.Compon
74
74
  }
75
75
  /**
76
76
  * ShaderScene paints one of the system's shader scenes, a horizon, a rift,
77
- * a field of glyphs, a prism, a meteor shower, a sea of points, an aurora, a night highway, an ocean seen from above, a sky of burning cloud or a spiral galaxy, in WebGL2, with finishing passes over it (a scrim, a vignette, top and
77
+ * a field of glyphs, a prism, a meteor shower, a sea of points, an aurora, a night highway, an ocean seen from above, a sky of burning cloud, a spiral galaxy or dusk over still water, in WebGL2, with finishing passes over it (a scrim, a vignette, top and
78
78
  * bottom fades to the page, film grain). Its colours are the background
79
79
  * field's roles (`--color-ambient-*`) read from the live cascade at the
80
80
  * scene, so it re-themes with `data-theme`, a preset or any scoped override,
@@ -151,4 +151,21 @@ export declare const sky: Scene;
151
151
  * at up to two pixels per CSS pixel and sizes everything in CSS pixels.
152
152
  */
153
153
  export declare const galaxy: Scene;
154
+ /**
155
+ * The tide: dusk over still water, painted as if the camera were dragged
156
+ * sideways through a long exposure, so every shape is a horizontal smear.
157
+ * Night comes down from the top of the sky, which clears to a cold band
158
+ * near the water; a band of fire lies right on the horizon with a hot line
159
+ * along it, a dark smear of cloud hangs above the fire and burns along its
160
+ * underside, and a low spit of land runs out on the right. The water below
161
+ * mirrors the sky, broken into streaks that close up as they run off to the
162
+ * horizon, with the fire laid in it and glints under the sun. Like the sky
163
+ * it has a day of its own, told from the page ground: on a light page a
164
+ * periwinkle evening over pale water, on a dark one the last of the light
165
+ * under a night sky. It reads the whole ambient set and casts it by
166
+ * temperature, since a theme's slots carry no fixed hue: the coolest tone
167
+ * is the sky and the water, the warmest the fire and the next warmest its
168
+ * second tone, so a theme recolours it and it still reads as a sunset.
169
+ */
170
+ export declare const tide: Scene;
154
171
  export declare const SCENES: Scene[];
@@ -1681,7 +1681,180 @@ vec3 scene(vec2 uv, float t) {
1681
1681
  `
1682
1682
  )
1683
1683
  };
1684
- const SCENES = [horizon, rift, glyphs, prism, meteors, waves, aurora, highway, ocean, sky, galaxy];
1684
+ const tide = {
1685
+ id: "tide",
1686
+ label: "Tide",
1687
+ description: "Dusk over still water, smeared like a long exposure: a band of fire on the horizon under night coming down, mirrored in the water.",
1688
+ /* The whole set: the scene casts it by temperature. */
1689
+ colours: [
1690
+ "--color-ambient-1",
1691
+ "--color-ambient-2",
1692
+ "--color-ambient-3",
1693
+ "--color-ambient-4",
1694
+ "--color-ambient-5",
1695
+ "--color-ambient-6"
1696
+ ],
1697
+ params: [
1698
+ { key: "horizon", label: "Horizon", min: 0.15, max: 0.95, step: 0.01, default: 0.4 },
1699
+ { key: "glow", label: "Fire", min: 0, max: 2, step: 0.01, default: 1 },
1700
+ { key: "line", label: "Hot line", min: 0, max: 2, step: 0.01, default: 1 },
1701
+ { key: "sunX", label: "Sun position", min: -1, max: 1, step: 0.01, default: 0.15 },
1702
+ { key: "cloud", label: "Cloud", min: 0, max: 1, step: 0.01, default: 0.6 },
1703
+ { key: "cloudY", label: "Cloud height", min: 0, max: 0.4, step: 0.01, default: 0.12 },
1704
+ { key: "ripple", label: "Ripples", min: 0, max: 2, step: 0.01, default: 1 },
1705
+ { key: "land", label: "Land", min: 0, max: 1, step: 0.01, default: 0.5 },
1706
+ { key: "depth", label: "Sky depth", min: 0, max: 1.5, step: 0.01, default: 1 },
1707
+ { key: "brush", label: "Brush", min: 0, max: 2, step: 0.01, default: 1 },
1708
+ { key: "drift", label: "Drift", min: 0, max: 3, step: 0.05, default: 1 }
1709
+ ],
1710
+ glsl: (
1711
+ /* glsl */
1712
+ `
1713
+ vec3 tBlue;
1714
+ vec3 tSlate;
1715
+ vec3 tPale;
1716
+ vec3 tCoral;
1717
+ vec3 tAmber;
1718
+ vec3 tGold;
1719
+ vec3 tViolet;
1720
+ float tDay;
1721
+
1722
+ float tideLum(vec3 c) {
1723
+ return dot(c, vec3(0.2126, 0.7152, 0.0722));
1724
+ }
1725
+
1726
+ /* A theme's ambient tone at full brightness, so it reads as a hue; a tone
1727
+ with next to no hue keeps its own value, or a grey would come out white. */
1728
+ vec3 tideHue(vec3 c) {
1729
+ float hi = max(c.r, max(c.g, c.b));
1730
+ float chroma = (hi - min(c.r, min(c.g, c.b))) / max(hi, 1e-3);
1731
+ return mix(c, c / max(hi, 1e-3), smoothstep(0.04, 0.2, chroma));
1732
+ }
1733
+
1734
+ /* A mix made by eye rather than by light, so a thinned blue stays blue. */
1735
+ vec3 tideMix(vec3 a, vec3 b, float k) {
1736
+ return pow(mix(pow(a, vec3(1.0 / 2.2)), pow(b, vec3(1.0 / 2.2)), k), vec3(2.2));
1737
+ }
1738
+
1739
+ /* One amount by night, another by day. */
1740
+ float tideDk(float night, float day) {
1741
+ return mix(night, day, tDay);
1742
+ }
1743
+
1744
+ /* Light laid on a base: added on a dark ground, mixed in by eye on a light one. */
1745
+ vec3 tideLay(vec3 base, vec3 c, float k) {
1746
+ return mix(base + c * k, tideMix(base, c, clamp(k, 0.0, 1.0)), tDay);
1747
+ }
1748
+
1749
+ /* The sky a height a above the horizon: night overhead, a cold clear band
1750
+ lower down, and the fire right on the water, hottest under the sun. */
1751
+ vec3 tideSky(float x, float a, float sx, float aspect) {
1752
+ float side = exp(-(x - sx) * (x - sx) / (0.5 * aspect * aspect));
1753
+ float climb = pow(clamp(a / max(1.0 - u_horizon, 0.1), 0.0, 1.0), 0.6);
1754
+ vec3 zenith = tideLay(u_ground, mix(tSlate, tViolet, 0.15), tideDk(0.018, 0.62) * u_depth);
1755
+ vec3 clear = tideLay(u_ground, tPale, tideDk(0.09, 0.3) * u_depth * (0.5 + 0.5 * side));
1756
+ vec3 col = mix(clear, zenith, climb);
1757
+ float warm = exp(-a * a / (0.012 * u_glow + 1e-4)) * (0.3 + 0.7 * side);
1758
+ float hot = exp(-a * a / (0.0022 * u_glow + 1e-4)) * (0.4 + 0.6 * side);
1759
+ col = tideLay(col, mix(tCoral, tViolet, 0.15), warm * tideDk(0.22, 0.45) * min(u_glow, 1.0));
1760
+ col = tideLay(col, mix(tCoral, tAmber, 0.5), hot * tideDk(1.4, 0.75) * min(u_glow, 1.4));
1761
+ return col;
1762
+ }
1763
+
1764
+ vec3 scene(vec2 uv, float t) {
1765
+ float aspect = u_size.x / u_size.y;
1766
+ float x = (uv.x - 0.5) * aspect;
1767
+ tDay = smoothstep(0.1, 0.45, tideLum(u_ground));
1768
+ /* A theme's slots carry no fixed hue, so the tones are cast by
1769
+ temperature: the coolest of the set is the sky, the warmest the fire,
1770
+ the next warmest its second tone. */
1771
+ vec3 tones[6];
1772
+ int coolest = 0;
1773
+ int warmest = 0;
1774
+ for (int i = 0; i < 6; i++) {
1775
+ tones[i] = tideHue(u_col[i]);
1776
+ float heat = tones[i].r - tones[i].b;
1777
+ if (heat < tones[coolest].r - tones[coolest].b) coolest = i;
1778
+ if (heat > tones[warmest].r - tones[warmest].b) warmest = i;
1779
+ }
1780
+ int second = warmest == 0 ? 1 : 0;
1781
+ for (int i = 0; i < 6; i++) {
1782
+ if (i != warmest && tones[i].r - tones[i].b > tones[second].r - tones[second].b) second = i;
1783
+ }
1784
+ tBlue = tones[coolest];
1785
+ tSlate = mix(tBlue, vec3(tideLum(tBlue)), 0.35);
1786
+ tPale = mix(tBlue, vec3(1.0), 0.2);
1787
+ tCoral = tones[warmest];
1788
+ tAmber = mix(tones[second], tCoral, 0.3);
1789
+ tGold = mix(tAmber, vec3(1.0, 0.9, 0.6), 0.35);
1790
+ tViolet = mix(tBlue, tCoral, 0.4);
1791
+ float w = t * u_drift;
1792
+ float sx = u_sunX * 0.5 * aspect;
1793
+ float near = exp(-(x - sx) * (x - sx) / 0.15);
1794
+ float side = exp(-(x - sx) * (x - sx) / (0.5 * aspect * aspect));
1795
+
1796
+ /* Every edge is a stroke of the brush, so the bands waver a little
1797
+ along their length. */
1798
+ float jitter = (fbm(vec2(x * 1.3 + w * 0.01, uv.y * 3.0)) - 0.5) * 0.035 * u_brush;
1799
+ float up = uv.y - u_horizon;
1800
+ float a = max(up + jitter * smoothstep(0.0, 0.03, up), 0.0);
1801
+
1802
+ vec3 col = tideSky(x, a, sx, aspect);
1803
+
1804
+ /* A smear of cloud above the fire, combed flat by the drag, dark in its
1805
+ body and burning along its underside where the fire reaches it. */
1806
+ float n = fbm(vec2(x * 0.42 - w * 0.004, uv.y * 7.5 + 3.0));
1807
+ float n2 = fbm(vec2(x * 1.6 - w * 0.006, uv.y * 26.0 + 11.0));
1808
+ float lane = exp(-pow(a - u_cloudY, 2.0) / 0.012);
1809
+ float leftward = mix(1.0, smoothstep(sx + 0.6 * aspect, sx - 0.2 * aspect, x), 0.6);
1810
+ float cloud = smoothstep(0.4, 0.66, n * 0.75 + n2 * 0.35) * lane * leftward * u_cloud * smoothstep(0.0, 0.02, up);
1811
+ vec3 cloudCol = mix(u_ground * 0.55 + tSlate * 0.006, tideMix(u_ground, mix(tSlate, tViolet, 0.2) * 0.3, 0.82), tDay);
1812
+ col = mix(col, cloudCol, min(1.0, cloud * 1.3));
1813
+ float under = cloud * exp(-a * a / (0.03 * u_glow + 1e-4)) * (1.0 - smoothstep(0.35, 0.8, n2));
1814
+ col = tideLay(col, mix(tCoral, tAmber, 0.3), under * tideDk(0.5, 0.55) * (0.4 + 0.6 * side));
1815
+
1816
+ /* The hot line right on the water, a pixel or two thick. */
1817
+ float lw = 1.4 * u_ratio / u_size.y;
1818
+ float line = exp(-up * up / (lw * lw)) + 0.35 * exp(-up * up / (36.0 * lw * lw));
1819
+ col = tideLay(col, mix(tGold, vec3(1.0), 0.3), line * u_line * (0.35 + 0.65 * side) * tideDk(2.4, 0.8));
1820
+
1821
+ /* The water: the sky mirrored and broken into streaks that close up as
1822
+ they run off to the horizon, dark under the near shore. */
1823
+ float d = max(-up, 0.0);
1824
+ float depth = 0.3 / (d + 0.025);
1825
+ float ripple = fbm(vec2(x * depth * 0.12 + w * 0.01, depth * 2.4 - w * 0.12));
1826
+ float fine = vnoise(vec2(x * depth * 0.5 - w * 0.03, depth * 8.0 + w * 0.3));
1827
+ float ra = d * 1.25 + (ripple - 0.5) * 0.06 * u_ripple;
1828
+ vec3 refl = tideSky(x + (fine - 0.5) * 0.04 * u_ripple, max(ra, 0.0), sx, aspect);
1829
+ vec3 waterBase = mix(u_ground + tSlate * 0.02 * u_depth, tideMix(u_ground, tSlate * 0.55, 0.55 * u_depth), tDay);
1830
+ float mirror = exp(-d / 0.22) * mix(1.0, 0.15 + 1.0 * smoothstep(0.4, 0.75, ripple), min(1.0, u_ripple));
1831
+ vec3 water = mix(waterBase, refl * tideDk(0.7, 0.88), min(1.0, mirror * 0.85));
1832
+ vec3 deep = mix(u_ground * 0.9, tideMix(u_ground, tSlate * 0.22, 0.85 * u_depth), tDay);
1833
+ water = mix(water, deep, smoothstep(0.06, 0.45, d) * 0.7);
1834
+ float glint = pow(fine, 5.0) * near * exp(-d / 0.18) * u_ripple;
1835
+ water = tideLay(water, mix(tCoral, tGold, 0.45), glint * tideDk(1.1, 0.6) * min(u_glow, 1.0));
1836
+
1837
+ /* A low spit of land out on the right, laid on the horizon, with its
1838
+ dark reflection under it. */
1839
+ float region = smoothstep(0.05 * aspect, 0.35 * aspect, x) * u_land;
1840
+ float landH = region * (0.014 + 0.012 * fbm(vec2(x * 2.5, 4.0)));
1841
+ float px = u_ratio / u_size.y;
1842
+ vec3 landCol = mix(u_ground * 0.6 + tSlate * 0.008, tideMix(u_ground, tSlate * 0.2, 0.8), tDay);
1843
+ float onLand = smoothstep(landH + px, landH - px, up) * smoothstep(-2.0 * px, 0.0, up) * step(0.001, region);
1844
+ col = mix(col, landCol, onLand);
1845
+ water = mix(water, landCol, smoothstep(landH * 1.3 + px, landH * 1.3 - px, d) * step(0.001, region) * 0.55);
1846
+
1847
+ col = mix(water, col, smoothstep(-px, px, up));
1848
+
1849
+ /* The weave of the canvas, and the fine combing of the brush. */
1850
+ float comb = vnoise(vec2(x * 3.0 + w * 0.004, uv.y * u_size.y / u_ratio * 0.45));
1851
+ col *= 1.0 + (comb - 0.5) * 0.14 * u_brush;
1852
+ return max(col, vec3(0.0));
1853
+ }
1854
+ `
1855
+ )
1856
+ };
1857
+ const SCENES = [horizon, rift, glyphs, prism, meteors, waves, aurora, highway, ocean, sky, galaxy, tide];
1685
1858
  export {
1686
1859
  SCENES,
1687
1860
  aurora,
@@ -1694,5 +1867,6 @@ export {
1694
1867
  prism,
1695
1868
  rift,
1696
1869
  sky,
1870
+ tide,
1697
1871
  waves
1698
1872
  };
@@ -90,6 +90,18 @@
90
90
  color: var(--color-text-tertiary);
91
91
  }
92
92
 
93
+ /* A caption placed under the label: the label's area holds both lines,
94
+ so every placement's grid keeps its areas. */
95
+ .ds-stat__label--captioned {
96
+ display: flex;
97
+ flex-direction: column;
98
+ align-items: flex-start;
99
+ }
100
+
101
+ .ds-stat__label--captioned .ds-stat__caption {
102
+ margin-inline-start: 0;
103
+ }
104
+
93
105
  /* ============================================
94
106
  DELTA — trend-coloured annotation
95
107
  ============================================ */
@@ -23,6 +23,11 @@ type StatOwnProps = {
23
23
  icon?: string | React.ReactNode;
24
24
  /** A short note at the far end of the top row, in the caption face: the period the figure covers ("Last 30 days"), its source. */
25
25
  caption?: React.ReactNode;
26
+ /**
27
+ * Where the caption sits: `head`, at the far end of the top row beside the
28
+ * icon, or `label`, a second line under the label. Defaults to `head`.
29
+ */
30
+ captionPlacement?: 'head' | 'label';
26
31
  /** Shown after the value, label and delta, such as a Sparkline of the metric's recent history or an AvatarGroup of who it counts. */
27
32
  children?: React.ReactNode;
28
33
  /** The BCP 47 locale a number `value` is written in, such as `ar-EG`. Defaults to `en-US`. This component can render from a Server Component, so it takes the prop alone and reads no LocaleProvider. */
@@ -19,6 +19,7 @@ const Stat = React.forwardRef(
19
19
  size = "default",
20
20
  icon,
21
21
  caption,
22
+ captionPlacement = "head",
22
23
  children,
23
24
  locale = DEFAULT_LOCALE,
24
25
  className = "",
@@ -27,7 +28,9 @@ const Stat = React.forwardRef(
27
28
  const baseClass = "ds-stat";
28
29
  const hasIcon = icon != null && icon !== false && icon !== "";
29
30
  const hasCaption = caption != null && caption !== false && caption !== "";
30
- const hasHead = hasIcon || hasCaption;
31
+ const captionInHead = hasCaption && captionPlacement === "head";
32
+ const captionInLabel = hasCaption && captionPlacement === "label";
33
+ const hasHead = hasIcon || captionInHead;
31
34
  const classes = [
32
35
  baseClass,
33
36
  `${baseClass}--${size}`,
@@ -38,7 +41,10 @@ const Stat = React.forwardRef(
38
41
  ].filter(Boolean).join(" ");
39
42
  const parts = /* @__PURE__ */ jsxs(Fragment, { children: [
40
43
  /* @__PURE__ */ jsx("span", { className: `${baseClass}__value`, children: typeof value === "number" ? formatNumber(value, locale) : value }),
41
- /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label }),
44
+ captionInLabel ? /* @__PURE__ */ jsxs("span", { className: `${baseClass}__label ${baseClass}__label--captioned`, children: [
45
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__label-text`, children: label }),
46
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__caption`, children: caption })
47
+ ] }) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label }),
42
48
  delta && /* @__PURE__ */ jsxs("span", { className: `${baseClass}__delta ${baseClass}__delta--${trend}`, children: [
43
49
  /* @__PURE__ */ jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: TREND_ICONS[trend] }),
44
50
  delta
@@ -47,7 +53,7 @@ const Stat = React.forwardRef(
47
53
  return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
48
54
  hasHead && /* @__PURE__ */ jsxs("span", { className: `${baseClass}__head`, children: [
49
55
  hasIcon && (typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, size: "500", tile: true, className: `${baseClass}__icon` }) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__icon`, "aria-hidden": "true", children: icon })),
50
- hasCaption && /* @__PURE__ */ jsx("span", { className: `${baseClass}__caption`, children: caption })
56
+ captionInHead && /* @__PURE__ */ jsx("span", { className: `${baseClass}__caption`, children: caption })
51
57
  ] }),
52
58
  deltaPlacement === "auto" ? /* @__PURE__ */ jsx("span", { className: `${baseClass}__body`, children: parts }) : parts,
53
59
  children != null && children !== false && /* @__PURE__ */ jsx("span", { className: `${baseClass}__extra`, children })
@@ -111,7 +111,7 @@ function ToolbarPanel({
111
111
  {
112
112
  size,
113
113
  surface: "menu",
114
- ariaLabel,
114
+ "aria-label": ariaLabel,
115
115
  position,
116
116
  onOpenChange,
117
117
  content,
@@ -1437,7 +1437,7 @@ const TableToolbar = React.forwardRef(
1437
1437
  {
1438
1438
  surface: "menu",
1439
1439
  size,
1440
- ariaLabel: labels.filters(activeFilters),
1440
+ "aria-label": labels.filters(activeFilters),
1441
1441
  onOpenChange: dropIncomplete,
1442
1442
  content: panelContent,
1443
1443
  children: /* @__PURE__ */ jsx(
@@ -15,7 +15,7 @@ type ThemeToggleOwnProps = {
15
15
  onValueChange?: (value: ColorModeSetting) => void;
16
16
  /** Control size, on SegmentedControl's scale: `default` (the default), the height of the CommandPaletteTrigger and AiButton beside it in a top bar, or `compact`. */
17
17
  size?: 'default' | 'compact';
18
- /** Show each segment's label beside its icon. Set `false` for an icon-only strip: each label becomes the segment's tooltip on hover and keyboard focus, and stays its accessible name. */
18
+ /** Show each segment's label beside its icon. Set `false` for an icon-only strip: each label becomes the segment's tooltip on hover and keyboard focus, and stays its accessible name. The labelled strip is wider than an expanded AppSidebar, so its `footerSlot` takes the icon-only strip. */
19
19
  showLabels?: boolean;
20
20
  /**
21
21
  * Draw one circle that shows the current setting and steps to the next on
@@ -36,7 +36,11 @@ type ThreadTabsOwnProps = {
36
36
  onAdd?: () => void;
37
37
  /** Accessible name for the new-tab button. */
38
38
  addLabel?: string;
39
- /** Accessible name for the tab strip. */
39
+ /**
40
+ * Legacy accessible-name prop for the tab strip. Defaults to "Open threads"; a native `aria-label` wins when both are passed, and names the strip rather than the wrapper.
41
+ *
42
+ * @deprecated Pass the native `aria-label` attribute instead.
43
+ */
40
44
  ariaLabel?: string;
41
45
  /** Additional CSS classes */
42
46
  className?: string;
@@ -30,6 +30,7 @@ const ThreadTabs = React.forwardRef(
30
30
  onAdd,
31
31
  addLabel = "New thread",
32
32
  ariaLabel = "Open threads",
33
+ "aria-label": nativeAriaLabel,
33
34
  className = "",
34
35
  ...rest
35
36
  }, ref) => {
@@ -106,7 +107,7 @@ const ThreadTabs = React.forwardRef(
106
107
  };
107
108
  const classes = [baseClass, className].filter(Boolean).join(" ");
108
109
  return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
109
- /* @__PURE__ */ jsx("ul", { className: `${baseClass}__list`, "aria-label": ariaLabel, ref: listRef, children: entries.map(({ tab, leaving: isLeaving }) => {
110
+ /* @__PURE__ */ jsx("ul", { className: `${baseClass}__list`, "aria-label": nativeAriaLabel ?? ariaLabel, ref: listRef, children: entries.map(({ tab, leaving: isLeaving }) => {
110
111
  const active = !isLeaving && tab.id === activeId;
111
112
  const status = tab.status ?? (tab.unread ? "unread" : "idle");
112
113
  const entering = !isLeaving && !enteredRef.current.has(tab.id);
@@ -4,7 +4,11 @@ export interface ToggleGroupItem {
4
4
  value: string;
5
5
  /** Display label or icon name (Material Symbols) */
6
6
  label: string;
7
- /** Use Material Symbol icon instead of text */
7
+ /**
8
+ * Draw `label` as a Material Symbol icon instead of text. An item is an
9
+ * icon or a label, never both: for icon-plus-label options, use
10
+ * SegmentedControl, whose segments take an `icon` beside their `label`.
11
+ */
8
12
  icon?: boolean;
9
13
  }
10
14
  /** Props owned by ToggleGroup itself — everything else falls through to the wrapper. */