altitude-design 0.2.1 → 0.3.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 (295) hide show
  1. package/README.md +41 -6
  2. package/dist/adapters/codemirror.cjs +88 -0
  3. package/dist/adapters/codemirror.cjs.map +7 -0
  4. package/dist/adapters/codemirror.js +67 -0
  5. package/dist/adapters/codemirror.js.map +7 -0
  6. package/dist/adapters/react-flow.css +102 -0
  7. package/dist/adapters/tiptap.css +71 -0
  8. package/dist/altitude.css +3121 -244
  9. package/dist/altitude.iife.js +33 -5
  10. package/dist/altitude.no-fonts.css +3121 -244
  11. package/dist/chart-themes.cjs +195 -0
  12. package/dist/chart-themes.cjs.map +7 -0
  13. package/dist/chart-themes.js +165 -0
  14. package/dist/chart-themes.js.map +7 -0
  15. package/dist/cli/altitude.mjs +134 -0
  16. package/dist/guidance/README.md +32 -0
  17. package/dist/guidance/agent-setup.md +22 -0
  18. package/dist/guidance/app-skeleton.md +17 -0
  19. package/dist/guidance/evidence.json +95 -0
  20. package/dist/guidance/index.json +493 -0
  21. package/dist/guidance/llms.txt +20 -0
  22. package/dist/guidance/manifest.json +92 -0
  23. package/dist/guidance/pattern.schema.json +181 -0
  24. package/dist/guidance/patterns/agent-action.json +77 -0
  25. package/dist/guidance/patterns/agent-action.md +39 -0
  26. package/dist/guidance/patterns/assistant-conversation.json +77 -0
  27. package/dist/guidance/patterns/assistant-conversation.md +50 -0
  28. package/dist/guidance/patterns/async-collection.json +71 -0
  29. package/dist/guidance/patterns/async-collection.md +29 -0
  30. package/dist/guidance/patterns/audit-log.json +75 -0
  31. package/dist/guidance/patterns/audit-log.md +27 -0
  32. package/dist/guidance/patterns/auth.json +86 -0
  33. package/dist/guidance/patterns/auth.md +29 -0
  34. package/dist/guidance/patterns/billing.json +80 -0
  35. package/dist/guidance/patterns/billing.md +29 -0
  36. package/dist/guidance/patterns/consequential-action.json +76 -0
  37. package/dist/guidance/patterns/consequential-action.md +27 -0
  38. package/dist/guidance/patterns/developer-settings.json +79 -0
  39. package/dist/guidance/patterns/developer-settings.md +29 -0
  40. package/dist/guidance/patterns/edit-record.json +74 -0
  41. package/dist/guidance/patterns/edit-record.md +51 -0
  42. package/dist/guidance/patterns/import.json +77 -0
  43. package/dist/guidance/patterns/import.md +31 -0
  44. package/dist/guidance/patterns/members.json +77 -0
  45. package/dist/guidance/patterns/members.md +27 -0
  46. package/dist/guidance/patterns/onboarding.json +78 -0
  47. package/dist/guidance/patterns/onboarding.md +31 -0
  48. package/dist/guidance/patterns/review-submit.json +72 -0
  49. package/dist/guidance/patterns/review-submit.md +27 -0
  50. package/dist/guidance/patterns/screen-layout.json +79 -0
  51. package/dist/guidance/patterns/screen-layout.md +40 -0
  52. package/dist/guidance/patterns/settings.json +78 -0
  53. package/dist/guidance/patterns/settings.md +32 -0
  54. package/dist/guidance/patterns/sync.json +77 -0
  55. package/dist/guidance/patterns/sync.md +31 -0
  56. package/dist/guidance/principles.md +23 -0
  57. package/dist/guidance/references/build/checks/agent-action-pattern.mjs +57 -0
  58. package/dist/guidance/references/build/checks/agent-setup.mjs +78 -0
  59. package/dist/guidance/references/build/checks/assistant-conversation-pattern.mjs +49 -0
  60. package/dist/guidance/references/build/checks/audit-log-pattern.mjs +63 -0
  61. package/dist/guidance/references/build/checks/auth-pattern.mjs +67 -0
  62. package/dist/guidance/references/build/checks/billing-pattern.mjs +63 -0
  63. package/dist/guidance/references/build/checks/developer-settings-pattern.mjs +76 -0
  64. package/dist/guidance/references/build/checks/guidance.mjs +71 -0
  65. package/dist/guidance/references/build/checks/import-pattern.mjs +69 -0
  66. package/dist/guidance/references/build/checks/members-pattern.mjs +71 -0
  67. package/dist/guidance/references/build/checks/onboarding-pattern.mjs +54 -0
  68. package/dist/guidance/references/build/checks/pattern-types.mjs +13 -0
  69. package/dist/guidance/references/build/checks/pattern-workflows.mjs +226 -0
  70. package/dist/guidance/references/build/checks/primary-scope.mjs +49 -0
  71. package/dist/guidance/references/build/checks/render-tells.mjs +72 -0
  72. package/dist/guidance/references/build/checks/screen-layout-pattern.mjs +111 -0
  73. package/dist/guidance/references/build/checks/semantics.mjs +72 -0
  74. package/dist/guidance/references/build/checks/settings-pattern.mjs +73 -0
  75. package/dist/guidance/references/build/checks/sync-pattern.mjs +62 -0
  76. package/dist/guidance/references/build/checks/tells-lint.mjs +164 -0
  77. package/dist/guidance/references/build/fixtures/pattern-workflows.tsx +83 -0
  78. package/dist/guidance/references/build/fixtures/patterns/agent-action.jsx +60 -0
  79. package/dist/guidance/references/build/fixtures/patterns/app-skeleton.jsx +94 -0
  80. package/dist/guidance/references/build/fixtures/patterns/assistant-conversation.jsx +79 -0
  81. package/dist/guidance/references/build/fixtures/patterns/audit-log.jsx +81 -0
  82. package/dist/guidance/references/build/fixtures/patterns/auth.jsx +150 -0
  83. package/dist/guidance/references/build/fixtures/patterns/billing.jsx +96 -0
  84. package/dist/guidance/references/build/fixtures/patterns/developer-settings.jsx +95 -0
  85. package/dist/guidance/references/build/fixtures/patterns/import.jsx +102 -0
  86. package/dist/guidance/references/build/fixtures/patterns/members.jsx +106 -0
  87. package/dist/guidance/references/build/fixtures/patterns/onboarding.jsx +70 -0
  88. package/dist/guidance/references/build/fixtures/patterns/screen-layout-decision.jsx +74 -0
  89. package/dist/guidance/references/build/fixtures/patterns/screen-layout-editor.jsx +56 -0
  90. package/dist/guidance/references/build/fixtures/patterns/screen-layout-report.jsx +42 -0
  91. package/dist/guidance/references/build/fixtures/patterns/settings.jsx +73 -0
  92. package/dist/guidance/references/build/fixtures/patterns/sync.jsx +78 -0
  93. package/dist/guidance/references/project/components/src/pattern-async-collection.tsx +57 -0
  94. package/dist/guidance/references/project/components/src/pattern-consequential-action.tsx +77 -0
  95. package/dist/guidance/references/project/components/src/pattern-edit-record.tsx +127 -0
  96. package/dist/guidance/references/project/components/src/pattern-review-submit.tsx +47 -0
  97. package/dist/guidance/references/project/components/src/settings.tsx +79 -0
  98. package/dist/guidance/references/scripts/build-framework-fixture.mjs +20 -0
  99. package/dist/guidance/rules.json +653 -0
  100. package/dist/guidance/visual/Elevation.md +194 -0
  101. package/dist/guidance/visual/Fundamentals.md +83 -0
  102. package/dist/guidance/visual/Research.md +1620 -0
  103. package/dist/index.cjs +18792 -1925
  104. package/dist/index.cjs.map +4 -4
  105. package/dist/index.js +18792 -1925
  106. package/dist/index.js.map +4 -4
  107. package/dist/tokens.css +84 -84
  108. package/dist/tokens.json +301 -128
  109. package/dist/types/adapter-codemirror.d.ts +13 -0
  110. package/dist/types/agent-fleet.d.ts +166 -0
  111. package/dist/types/ai-label.d.ts +30 -0
  112. package/dist/types/app-shell.d.ts +83 -0
  113. package/dist/types/area-chart.d.ts +80 -0
  114. package/dist/types/artifact.d.ts +65 -0
  115. package/dist/types/bar-chart.d.ts +83 -0
  116. package/dist/types/bar-list.d.ts +35 -0
  117. package/dist/types/breadcrumb.d.ts +62 -0
  118. package/dist/types/chart-brush.d.ts +35 -0
  119. package/dist/types/chart-themes.d.ts +229 -0
  120. package/dist/types/chart.d.ts +570 -0
  121. package/dist/types/checklist.d.ts +71 -0
  122. package/dist/types/code-block.d.ts +32 -0
  123. package/dist/types/collections.d.ts +111 -4
  124. package/dist/types/color-picker.d.ts +38 -0
  125. package/dist/types/command.d.ts +6 -3
  126. package/dist/types/comment-thread.d.ts +48 -0
  127. package/dist/types/confirmation.d.ts +60 -0
  128. package/dist/types/context-menu.d.ts +17 -0
  129. package/dist/types/controls.d.ts +100 -17
  130. package/dist/types/conversation.d.ts +130 -0
  131. package/dist/types/copy-button.d.ts +19 -0
  132. package/dist/types/core.d.ts +139 -10
  133. package/dist/types/data-grid.d.ts +76 -0
  134. package/dist/types/date-picker.d.ts +96 -0
  135. package/dist/types/diff-view.d.ts +54 -0
  136. package/dist/types/dot-plot.d.ts +54 -0
  137. package/dist/types/edit-region.d.ts +121 -0
  138. package/dist/types/feature-gate.d.ts +22 -0
  139. package/dist/types/filter-bar.d.ts +65 -0
  140. package/dist/types/formatted-number.d.ts +38 -0
  141. package/dist/types/heatmap.d.ts +64 -0
  142. package/dist/types/in-place.d.ts +24 -0
  143. package/dist/types/index.d.ts +158 -15
  144. package/dist/types/inline-citation.d.ts +35 -0
  145. package/dist/types/inline-edit.d.ts +71 -0
  146. package/dist/types/input-otp.d.ts +37 -0
  147. package/dist/types/item-group.d.ts +104 -0
  148. package/dist/types/line-chart.d.ts +116 -0
  149. package/dist/types/link.d.ts +11 -0
  150. package/dist/types/markdown.d.ts +88 -0
  151. package/dist/types/meter.d.ts +43 -0
  152. package/dist/types/modal-state.d.ts +62 -0
  153. package/dist/types/nav.d.ts +8 -1
  154. package/dist/types/notifications.d.ts +42 -0
  155. package/dist/types/number-input.d.ts +30 -0
  156. package/dist/types/overlays.d.ts +51 -17
  157. package/dist/types/page-header.d.ts +27 -0
  158. package/dist/types/pagination.d.ts +29 -0
  159. package/dist/types/palette.d.ts +64 -0
  160. package/dist/types/password-input.d.ts +22 -0
  161. package/dist/types/pattern-assistant-conversation.d.ts +55 -0
  162. package/dist/types/pattern-async-collection.d.ts +34 -0
  163. package/dist/types/pattern-consequential-action.d.ts +53 -0
  164. package/dist/types/pattern-edit-record.d.ts +72 -0
  165. package/dist/types/pattern-review-submit.d.ts +43 -0
  166. package/dist/types/permission-matrix.d.ts +34 -0
  167. package/dist/types/plan-picker.d.ts +40 -0
  168. package/dist/types/prompt-input.d.ts +106 -0
  169. package/dist/types/property-list.d.ts +67 -0
  170. package/dist/types/question.d.ts +64 -0
  171. package/dist/types/relative-time.d.ts +21 -0
  172. package/dist/types/removal-receipt.d.ts +1180 -0
  173. package/dist/types/resizable.d.ts +48 -0
  174. package/dist/types/roving.d.ts +44 -0
  175. package/dist/types/save-bar.d.ts +38 -0
  176. package/dist/types/saved-views.d.ts +72 -0
  177. package/dist/types/scatter-chart.d.ts +60 -0
  178. package/dist/types/schedule.d.ts +80 -0
  179. package/dist/types/secret-field.d.ts +33 -0
  180. package/dist/types/select.d.ts +44 -2
  181. package/dist/types/separator.d.ts +11 -0
  182. package/dist/types/settings.d.ts +39 -0
  183. package/dist/types/sheet.d.ts +1 -1
  184. package/dist/types/sparkline.d.ts +46 -0
  185. package/dist/types/split-button.d.ts +21 -0
  186. package/dist/types/stat.d.ts +54 -0
  187. package/dist/types/stepper.d.ts +6 -3
  188. package/dist/types/suggestions.d.ts +29 -0
  189. package/dist/types/suspense.d.ts +12 -1
  190. package/dist/types/sync-indicator.d.ts +24 -0
  191. package/dist/types/tag-input.d.ts +65 -0
  192. package/dist/types/terminal.d.ts +33 -0
  193. package/dist/types/thread-list.d.ts +58 -0
  194. package/dist/types/time-input.d.ts +33 -0
  195. package/dist/types/timeline.d.ts +38 -0
  196. package/dist/types/toggle.d.ts +46 -0
  197. package/dist/types/toolbar.d.ts +34 -0
  198. package/dist/types/tour.d.ts +23 -0
  199. package/dist/types/trace.d.ts +65 -0
  200. package/dist/types/tree.d.ts +71 -0
  201. package/dist/types-cjs/adapter-codemirror.d.cts +13 -0
  202. package/dist/types-cjs/agent-fleet.d.cts +166 -0
  203. package/dist/types-cjs/ai-label.d.cts +30 -0
  204. package/dist/types-cjs/app-shell.d.cts +83 -0
  205. package/dist/types-cjs/area-chart.d.cts +80 -0
  206. package/dist/types-cjs/artifact.d.cts +65 -0
  207. package/dist/types-cjs/bar-chart.d.cts +83 -0
  208. package/dist/types-cjs/bar-list.d.cts +35 -0
  209. package/dist/types-cjs/breadcrumb.d.cts +62 -0
  210. package/dist/types-cjs/chart-brush.d.cts +35 -0
  211. package/dist/types-cjs/chart-themes.d.cts +229 -0
  212. package/dist/types-cjs/chart.d.cts +570 -0
  213. package/dist/types-cjs/checklist.d.cts +71 -0
  214. package/dist/types-cjs/code-block.d.cts +32 -0
  215. package/dist/types-cjs/collections.d.cts +246 -0
  216. package/dist/types-cjs/color-picker.d.cts +38 -0
  217. package/dist/types-cjs/command.d.cts +66 -0
  218. package/dist/types-cjs/comment-thread.d.cts +48 -0
  219. package/dist/types-cjs/confirmation.d.cts +60 -0
  220. package/dist/types-cjs/context-menu.d.cts +17 -0
  221. package/dist/types-cjs/controls.d.cts +360 -0
  222. package/dist/types-cjs/conversation.d.cts +130 -0
  223. package/dist/types-cjs/copy-button.d.cts +19 -0
  224. package/dist/types-cjs/core.d.cts +256 -0
  225. package/dist/types-cjs/data-grid.d.cts +76 -0
  226. package/dist/types-cjs/date-picker.d.cts +96 -0
  227. package/dist/types-cjs/diff-view.d.cts +54 -0
  228. package/dist/types-cjs/dot-plot.d.cts +54 -0
  229. package/dist/types-cjs/edit-region.d.cts +121 -0
  230. package/dist/types-cjs/empty.d.cts +24 -0
  231. package/dist/types-cjs/feature-gate.d.cts +22 -0
  232. package/dist/types-cjs/filter-bar.d.cts +65 -0
  233. package/dist/types-cjs/formatted-number.d.cts +38 -0
  234. package/dist/types-cjs/heatmap.d.cts +64 -0
  235. package/dist/types-cjs/in-place.d.cts +24 -0
  236. package/dist/types-cjs/index.d.cts +154 -0
  237. package/dist/types-cjs/inline-citation.d.cts +35 -0
  238. package/dist/types-cjs/inline-edit.d.cts +71 -0
  239. package/dist/types-cjs/input-otp.d.cts +37 -0
  240. package/dist/types-cjs/item-group.d.cts +104 -0
  241. package/dist/types-cjs/line-chart.d.cts +116 -0
  242. package/dist/types-cjs/link.d.cts +11 -0
  243. package/dist/types-cjs/markdown.d.cts +88 -0
  244. package/dist/types-cjs/meter.d.cts +43 -0
  245. package/dist/types-cjs/modal-state.d.cts +62 -0
  246. package/dist/types-cjs/nav.d.cts +25 -0
  247. package/dist/types-cjs/notifications.d.cts +42 -0
  248. package/dist/types-cjs/number-input.d.cts +30 -0
  249. package/dist/types-cjs/overlays.d.cts +170 -0
  250. package/dist/types-cjs/page-header.d.cts +27 -0
  251. package/dist/types-cjs/pagination.d.cts +29 -0
  252. package/dist/types-cjs/palette.d.cts +64 -0
  253. package/dist/types-cjs/password-input.d.cts +22 -0
  254. package/dist/types-cjs/pattern-assistant-conversation.d.cts +55 -0
  255. package/dist/types-cjs/pattern-async-collection.d.cts +34 -0
  256. package/dist/types-cjs/pattern-consequential-action.d.cts +53 -0
  257. package/dist/types-cjs/pattern-edit-record.d.cts +72 -0
  258. package/dist/types-cjs/pattern-review-submit.d.cts +43 -0
  259. package/dist/types-cjs/permission-matrix.d.cts +34 -0
  260. package/dist/types-cjs/pile.d.cts +27 -0
  261. package/dist/types-cjs/plan-picker.d.cts +40 -0
  262. package/dist/types-cjs/prompt-input.d.cts +106 -0
  263. package/dist/types-cjs/property-list.d.cts +67 -0
  264. package/dist/types-cjs/question.d.cts +64 -0
  265. package/dist/types-cjs/relative-time.d.cts +21 -0
  266. package/dist/types-cjs/removal-receipt.d.cts +1180 -0
  267. package/dist/types-cjs/resizable.d.cts +48 -0
  268. package/dist/types-cjs/roving.d.cts +44 -0
  269. package/dist/types-cjs/save-bar.d.cts +38 -0
  270. package/dist/types-cjs/saved-views.d.cts +72 -0
  271. package/dist/types-cjs/scatter-chart.d.cts +60 -0
  272. package/dist/types-cjs/schedule.d.cts +80 -0
  273. package/dist/types-cjs/secret-field.d.cts +33 -0
  274. package/dist/types-cjs/select.d.cts +109 -0
  275. package/dist/types-cjs/separator.d.cts +11 -0
  276. package/dist/types-cjs/settings.d.cts +39 -0
  277. package/dist/types-cjs/sheet.d.cts +27 -0
  278. package/dist/types-cjs/sparkline.d.cts +46 -0
  279. package/dist/types-cjs/split-button.d.cts +21 -0
  280. package/dist/types-cjs/stat.d.cts +54 -0
  281. package/dist/types-cjs/stepper.d.cts +26 -0
  282. package/dist/types-cjs/suggestions.d.cts +29 -0
  283. package/dist/types-cjs/suspense.d.cts +85 -0
  284. package/dist/types-cjs/sync-indicator.d.cts +24 -0
  285. package/dist/types-cjs/tag-input.d.cts +65 -0
  286. package/dist/types-cjs/terminal.d.cts +33 -0
  287. package/dist/types-cjs/thread-list.d.cts +58 -0
  288. package/dist/types-cjs/time-input.d.cts +33 -0
  289. package/dist/types-cjs/timeline.d.cts +38 -0
  290. package/dist/types-cjs/toggle.d.cts +46 -0
  291. package/dist/types-cjs/toolbar.d.cts +34 -0
  292. package/dist/types-cjs/tour.d.cts +23 -0
  293. package/dist/types-cjs/trace.d.cts +65 -0
  294. package/dist/types-cjs/tree.d.cts +71 -0
  295. package/package.json +89 -9
@@ -0,0 +1,121 @@
1
+ import * as React from 'react';
2
+ type Fields<T> = Partial<Record<keyof T, string>>;
3
+ export type EditRegionSaveResult<T> = {
4
+ ok: true;
5
+ value: T;
6
+ } | {
7
+ ok: false;
8
+ error: string;
9
+ fieldErrors?: Fields<T>;
10
+ };
11
+ export interface EditRegionProps<T extends Record<string, unknown>> {
12
+ /** Names the region: “Edit <label>”. */
13
+ label: string;
14
+ /** The committed record. */
15
+ value: T;
16
+ /** Publishes the accepted canonical record, synchronously and without a network write. */
17
+ onValueChange: (canonical: T) => void;
18
+ /** The sole write. `changed` lists only the fields that differ, so you can send a patch. */
19
+ onSave: (draft: T, context: {
20
+ previousValue: T;
21
+ changed: (keyof T)[];
22
+ }) => EditRegionSaveResult<T> | Promise<EditRegionSaveResult<T>>;
23
+ /** Runs on Save. Return an error per field, or undefined. */
24
+ validate?: (draft: T) => Fields<T> | undefined | Promise<Fields<T> | undefined>;
25
+ open?: boolean;
26
+ defaultOpen?: boolean;
27
+ onOpenChange?: (open: boolean) => void;
28
+ disabled?: boolean;
29
+ /** The field focused on opening. Default: the first control in the form. */
30
+ initialFocus?: keyof T;
31
+ /** Used only when completion still owns focus and the Edit button cannot receive it. */
32
+ focusFallback?: () => HTMLElement | null;
33
+ /** Compares one field's values. Default Object.is. */
34
+ isEqual?: (a: unknown, b: unknown) => boolean;
35
+ editLabel?: string;
36
+ saveLabel?: string;
37
+ cancelLabel?: string;
38
+ /** How long the region's afterglow takes to fade after a save, in ms. Default 5000. */
39
+ settleDuration?: number;
40
+ /**
41
+ * 'form' (default): editing opens a form laid out your way. 'in-place': each value's well opens where its text is: mark
42
+ * read values with EditRegionValue, and lay the fields out where the values were. Controls take the value's font and
43
+ * reach 13px past their column on each side (the inset their text sits at), so leave 26px between columns.
44
+ */
45
+ layout?: 'form' | 'in-place';
46
+ className?: string;
47
+ /** EditRegionView and EditRegionForm. */
48
+ children: React.ReactNode;
49
+ }
50
+ /** Binds one field of the draft to a control. Spread the result onto it. */
51
+ export interface EditRegionBinder<T> {
52
+ /** Text controls (Input, Textarea): value + onChange. */
53
+ <K extends keyof T>(key: K): {
54
+ name: string;
55
+ value: T[K];
56
+ onChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
57
+ readOnly: boolean;
58
+ disabled?: boolean;
59
+ 'data-field': string;
60
+ };
61
+ /** Value controls (Select, Combobox, Slider): value + onValueChange. */
62
+ value<K extends keyof T>(key: K): {
63
+ name: string;
64
+ value: T[K];
65
+ onValueChange: (value: T[K]) => void;
66
+ disabled?: boolean;
67
+ 'data-field': string;
68
+ };
69
+ /** Toggles (Switch, Checkbox): checked + onCheckedChange. */
70
+ checked<K extends keyof T>(key: K): {
71
+ checked: boolean;
72
+ onCheckedChange: (checked: boolean) => void;
73
+ disabled?: boolean;
74
+ 'data-field': string;
75
+ };
76
+ /** The field's error, for its Field. */
77
+ error(key: keyof T): string | undefined;
78
+ /** The current draft. */
79
+ draft: T;
80
+ }
81
+ /**
82
+ * Several fields of one record, edited where the record is shown and saved together as one write. Read mode is the
83
+ * record on the ground; Edit lifts it into a static raised editor holding the fields. The editor's padding is there in
84
+ * both modes (with a negative margin), so lifting changes colour and shadow, never position. The session follows
85
+ * InlineEdit: no save on blur, one write in flight, a known failure keeps the draft, and an outside change blocks Save.
86
+ */
87
+ export declare function EditRegion<T extends Record<string, unknown>>({ label, value, onValueChange, onSave, validate, open: openProp, defaultOpen, onOpenChange, disabled, initialFocus, focusFallback, isEqual, editLabel, saveLabel, cancelLabel, settleDuration, layout, className, children }: EditRegionProps<T>): React.JSX.Element;
88
+ /** Read mode: the record as text. Shows an Edit button after it unless `trigger={false}` (then place EditRegionTrigger yourself). */
89
+ export declare function EditRegionView({ children, trigger, className }: {
90
+ children?: React.ReactNode;
91
+ trigger?: boolean;
92
+ className?: string;
93
+ }): React.JSX.Element | null;
94
+ /**
95
+ * One value in read mode, named by the field that edits it. With layout 'in-place', a field whose text opens where its
96
+ * value was simply appears; one that opens elsewhere fades in. `reserve` gives the value its control's height and inset
97
+ * now, so in a list of labelled rows nothing moves at all when Edit opens.
98
+ */
99
+ export declare function EditRegionValue({ field, reserve, children, className }: {
100
+ field: string;
101
+ reserve?: boolean;
102
+ children?: React.ReactNode;
103
+ className?: string;
104
+ }): React.JSX.Element;
105
+ /** The visible Edit button. Rendered by EditRegionView by default. */
106
+ export declare function EditRegionTrigger({ children, className }: {
107
+ children?: React.ReactNode;
108
+ className?: string;
109
+ }): React.JSX.Element | null;
110
+ /**
111
+ * Edit mode: a form (or a group, inside another form) named “Edit <label>”, holding your fields, then any error and
112
+ * Save/Cancel. Children may be a function of the draft binder: `{(field) => <Input {...field('name')} />}`.
113
+ */
114
+ export declare function EditRegionForm<T extends Record<string, unknown> = Record<string, unknown>>({ children, actions, className }: {
115
+ children: React.ReactNode | ((field: EditRegionBinder<T>) => React.ReactNode);
116
+ actions?: boolean;
117
+ className?: string;
118
+ }): React.JSX.Element | null;
119
+ /** Any error, the conflict notice and Save/Cancel. EditRegionForm renders them after the fields unless `actions={false}`. */
120
+ export declare function EditRegionActions(): React.ReactNode;
121
+ export {};
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ export interface FeatureGateProps {
3
+ /** The plan it needs ("Business"). */
4
+ requires: string;
5
+ /** What the feature does, in the explanation. */
6
+ description?: React.ReactNode;
7
+ /** Opens the upgrade. */
8
+ onUpgrade?: () => void;
9
+ /** Where the plans are compared. */
10
+ compareHref?: string;
11
+ /** False when this person can't upgrade (not an admin): the button becomes "Ask an admin to upgrade". Default true. */
12
+ canUpgrade?: boolean;
13
+ /** The control that needs the plan: one element (a Button). It stays live. */
14
+ children: React.ReactElement<any>;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * A feature that needs another plan, shown as locked rather than disabled. Disabled means nothing happens; a locked
19
+ * control does something (it explains the plan and offers the upgrade), so it stays live: normal ink, it lifts when
20
+ * pointed at, it's reachable, and it carries a lock and a plan plate. Pressing it opens a Popover.
21
+ */
22
+ export declare function FeatureGate({ requires, description, onUpgrade, compareHref, canUpgrade, children, className }: FeatureGateProps): React.JSX.Element;
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ export interface FilterOption {
3
+ value: string;
4
+ label: string;
5
+ }
6
+ export interface FilterField {
7
+ key: string;
8
+ label: string;
9
+ /** enum: choose from options. text: a phrase. number. date: an ISO 'YYYY-MM-DD' date ('between' takes two). */
10
+ type: 'enum' | 'text' | 'number' | 'date';
11
+ options?: FilterOption[];
12
+ /** Enum lists get a search field. Default: when there are more than 8 options. */
13
+ searchable?: boolean;
14
+ /** Default by type: enum ['is', 'is not'], text ['contains', 'does not contain'], number ['=', '>', '<'], date ['before', 'after', 'between']. */
15
+ operators?: string[];
16
+ }
17
+ export type FilterValue = string | number | {
18
+ start: string;
19
+ end: string;
20
+ } | undefined;
21
+ export interface Filter {
22
+ id: string;
23
+ field: string;
24
+ operator: string;
25
+ value: FilterValue;
26
+ }
27
+ /** Nested logic: conditions and, with nesting={2}, groups of conditions, each with its own all/any. */
28
+ export interface FilterTree {
29
+ match: 'all' | 'any';
30
+ items: (Filter | FilterGroup)[];
31
+ }
32
+ export interface FilterGroup {
33
+ id: string;
34
+ match: 'all' | 'any';
35
+ items: Filter[];
36
+ }
37
+ export interface FilterBarProps {
38
+ fields: FilterField[];
39
+ /** The conditions; or a FilterTree for nested logic ("Plan is Pro and any of: …"). */
40
+ value: Filter[] | FilterTree;
41
+ onValueChange: ((filters: Filter[]) => void) | ((tree: FilterTree) => void);
42
+ /** With a FilterTree: 2 allows groups one level deep. Default 1 (no groups). */
43
+ nesting?: 1 | 2;
44
+ /** Show the all/any segment even with one condition (a group's own switch). */
45
+ matchAlways?: boolean;
46
+ /** Shown as a segment when there's more than one filter. Omit to hide it. */
47
+ match?: 'all' | 'any';
48
+ onMatchChange?: (match: 'all' | 'any') => void;
49
+ /** Announced after each change: “Status is Done. 12 results”. */
50
+ resultCount?: number;
51
+ /** Ids for new filters. Default: a counter. */
52
+ createId?: () => string;
53
+ 'aria-label'?: string;
54
+ className?: string;
55
+ }
56
+ /** The value as words, or undefined while there isn't one. */
57
+ export declare const filterValueText: (f: FilterField, v: FilterValue) => string | undefined;
58
+ /**
59
+ * A query as a row of conditions. Each condition is a plate stamped into the bar (ground), split into segments that
60
+ * lift when pointed at because each opens its picker (level 3). A condition still waiting for a value keeps that
61
+ * segment as an opening, and so does Add filter. The bar is one Tab stop: a toolbar with ←/→ between segments.
62
+ */
63
+ /** The whole expression in words: "Plan is Pro and any of: Country is Germany, Seats > 50". */
64
+ export declare function filterSentence(fields: FilterField[], value: Filter[] | FilterTree, match?: 'all' | 'any'): string;
65
+ export declare function FilterBar(props: FilterBarProps): React.JSX.Element;
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ export type NumberFormatPreset = 'number' | 'currency' | 'bytes' | 'duration' | 'percent' | 'compact';
3
+ export type DurationUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
4
+ export interface FormatNumberOptions extends Omit<Intl.NumberFormatOptions, 'style' | 'unit' | 'notation'> {
5
+ /** Default 'number'. */
6
+ format?: NumberFormatPreset;
7
+ /** Default: the browser's. */
8
+ locale?: string;
9
+ /** currency: an ISO 4217 code. Default 'USD'. */
10
+ currency?: string;
11
+ /** currency: the value is in minor units (cents), as payment APIs send it, so 4900 is €49.00. Default true. */
12
+ minorUnits?: boolean;
13
+ /** duration: the unit the value is in. Default 'millisecond'. It's shown in the largest unit that keeps it at 1 or more. */
14
+ unit?: DurationUnit;
15
+ /** bytes: 1000 (kB, MB, GB; the default) or 1024 (KiB, MiB, GiB). */
16
+ base?: 1000 | 1024;
17
+ }
18
+ /** The text, the exact value (when the text rounds or abbreviates it) and the words for a symbol that's ambiguous read aloud. */
19
+ export declare function describeNumber(value: number, options?: FormatNumberOptions): {
20
+ text: string;
21
+ full?: string;
22
+ spoken?: string;
23
+ };
24
+ /** Formats a number once, the way FormattedNumber does: for DataTable columns, chart formatters and plain strings. */
25
+ export declare const formatNumber: (value: number, options?: FormatNumberOptions) => string;
26
+ export interface FormattedNumberProps extends FormatNumberOptions {
27
+ value: number;
28
+ className?: string;
29
+ style?: React.CSSProperties;
30
+ id?: string;
31
+ /** Default: the exact value, when the text rounds or abbreviates it. */
32
+ title?: string;
33
+ }
34
+ /**
35
+ * A number is the record, so it lies flush: tabular figures, the exact value on hand when it's rounded or abbreviated,
36
+ * and units spoken in words. A changed value cross-fades and settles with the afterglow; it never counts.
37
+ */
38
+ export declare function FormattedNumber({ value, className, style, id, title, ...options }: FormattedNumberProps): React.JSX.Element;
@@ -0,0 +1,64 @@
1
+ import * as React from 'react';
2
+ import { type ChartConfig, type ChartContextValue, type ChartDatum, type ChartEmpty, type ChartInfo, type ChartReadout } from './chart.js';
3
+ export interface HeatmapProps {
4
+ /** The records: one per cell. Cells with no record, or a null value, are drawn as "No data". */
5
+ data: ChartDatum[] | null | undefined | PromiseLike<ChartDatum[] | null>;
6
+ /** 'grid' (default): x across, y down. 'calendar': a cell per day, a column per week, wrapping by week when it's narrow. */
7
+ variant?: 'grid' | 'calendar';
8
+ /** The grid's column key (hour, region). */
9
+ x?: string;
10
+ /** The grid's row key (weekday, service). */
11
+ y?: string;
12
+ /** The calendar's day key: an ISO date, a timestamp or a Date. */
13
+ date?: string;
14
+ /** The key of each cell's value. It must also be a key of the container's config, which names and formats it. */
15
+ value: string;
16
+ /**
17
+ * Where each step starts, lowest first: `[0, 1, 4, 10]` gives "0", "1–3", "4–9" and "10+". Two to seven steps.
18
+ * Default: five to seven even steps over the values, with zero a step of its own for counts.
19
+ */
20
+ bins?: number[];
21
+ /** 'sequential' (default): how much, on the data-seq ramp. 'diverging': which side of `midpoint`, on the data-div ramp. */
22
+ scale?: 'sequential' | 'diverging';
23
+ /** The diverging scale's neutral value. Default 0. */
24
+ midpoint?: number;
25
+ /** Formats the grid's column values (14 → "14:00"). */
26
+ xFormat?: (value: unknown) => string;
27
+ /** Formats the grid's row values. */
28
+ yFormat?: (value: unknown) => string;
29
+ /** The calendar's first day of the week: 0 Sunday (default) or 1 Monday. */
30
+ weekStart?: 0 | 1;
31
+ /** The steps as swatches with their ranges in words, under the cells. Default true. */
32
+ legend?: boolean;
33
+ /** The readout. Default true. */
34
+ tooltip?: boolean;
35
+ /** Filter in place: which cells match. Misses recede to 35%, keeping their place and colour. */
36
+ relevance?: (d: ChartDatum) => 'match' | 'miss' | undefined;
37
+ /** The selected cell: its record, or its id ("14|Tue" for a grid's x and y, "2026-03-14" for a calendar's day). */
38
+ selected?: ChartDatum | string | null;
39
+ /** Makes cells selectable: called with the chosen record, or null when the selection clears. */
40
+ onSelect?: (d: ChartDatum | null) => void;
41
+ /** Makes cells open a level down, inside a Drilldown: return the id of the current node's child this cell opens. */
42
+ drill?: (d: ChartDatum) => string | null | undefined;
43
+ /** What the plot says when there's no data. */
44
+ empty?: ChartEmpty;
45
+ /** A ChartTooltip, to change what the readout shows. */
46
+ children?: React.ReactNode;
47
+ }
48
+ /**
49
+ * A value per cell across two dimensions: load by hour and weekday, activity by day over a year. The cells are the
50
+ * record, so they lie flat on the plot: a data-seq step (or data-div around a midpoint), parted by 2px of the plot's
51
+ * own colour, never raised, never shaded. Each step also has a pattern density for forced colours and print, and its
52
+ * range in words in the legend, the cell's name and the table.
53
+ */
54
+ export declare function Heatmap(props: HeatmapProps): React.JSX.Element | null;
55
+ export declare namespace Heatmap {
56
+ var chartPoint: (props: Record<string, unknown>, ctx: ChartContextValue, d: ChartDatum) => [number, number];
57
+ var chartBox: (props: Record<string, unknown>, ctx: ChartContextValue, d: ChartDatum) => [number, number, number, number] | null;
58
+ var chartMark: (props: Record<string, unknown>, ctx: ChartContextValue, d: ChartDatum) => string | null;
59
+ var chartNearest: (props: Record<string, unknown>, ctx: ChartContextValue, px: number, py: number) => number | null;
60
+ var chartMove: (props: Record<string, unknown>, ctx: ChartContextValue, i: number, e: React.KeyboardEvent) => number | null;
61
+ var chartName: (props: Record<string, unknown>, ctx: ChartContextValue, d: ChartDatum) => string;
62
+ var chartReadout: (props: Record<string, unknown>, ctx: ChartContextValue, d: ChartDatum) => ChartReadout;
63
+ var chartInfo: (props: Record<string, unknown>, config: ChartConfig) => ChartInfo;
64
+ }
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ /** A change of size at one level: dur-travel-3 up to 120px, then a little longer per pixel (capped), so a long push stays readable. */
3
+ export declare const glideMs: (el: Element, distance: number) => number;
4
+ /** Where a value's text starts: an input's content box, or the first line of text inside anything else. */
5
+ export declare function textOrigin(el: Element): {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ /**
10
+ * Call the returned capture() just before a state change that alters the box. After that render:
11
+ * - the box's own height glides from the old value to the new one, so everything below is pushed continuously, not jumped;
12
+ * - with `widths`, the box's one [data-slot] glides its width, even when the read slot was replaced by the editor's (a
13
+ * well growing sideways from its text). Only for a slot whose siblings don't depend on its width;
14
+ * - parts marked [data-arrive] fade in as the moving edge reaches them;
15
+ * - with `values`, each [data-field] control whose read value ([data-value-for]) was somewhere else fades in, while
16
+ * controls whose text lands where their value was simply appear: nothing slides, so nothing seems to jump around.
17
+ * Under reduced motion (--alt-travel 0) the new layout applies at once.
18
+ */
19
+ export declare function useInPlaceMotion(box: React.RefObject<HTMLElement | null>, { widths, values }?: {
20
+ widths?: boolean | undefined;
21
+ values?: boolean | undefined;
22
+ }): () => void;
23
+ /** A polite status for assistive technology, cleared after dur-linger so nothing lingers in the accessibility tree. */
24
+ export declare function useLingeringStatus(): readonly [string, (next: string) => void];
@@ -1,20 +1,163 @@
1
1
  /**
2
- * altitude-design: a React component library where height is the interface.
2
+ * altitude-design: a design framework where height is the interface.
3
+ * Task guidance: altitude-design/guidance (or dist/guidance/README.md).
4
+ * Discover patterns: altitude patterns "edit settings". Connect agents: altitude init --client codex.
5
+ * Pattern hooks are exported here, sharing the same AltitudeProvider instance.
3
6
  * Docs and live previews: https://richlaconte.github.io/altitude/storybook/
4
7
  * Bugs, feature requests and new components: https://github.com/richlaconte/altitude/issues/new/choose
5
8
  * Agents: you may file issues too; see https://github.com/richlaconte/altitude/blob/main/AGENTS.md
6
9
  */
7
- export { AltitudeProvider, useAltitude, useDepth, useApproach, riseDelay, Layer, Surface, Kbd, Icons, Spinner, deriveAccent, contrast, checkScheme, usePresence } from './core';
8
- export type { Scheme, BuiltInScheme, CustomScheme, SchemeColorToken, SchemeShadowToken } from './core';
9
- export { Button, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Input, Textarea, Field, Checkbox, RadioGroup, Radio, Switch, Tabs, TabsList, TabsTrigger, TabsContent, Slider, Progress, Badge, Avatar, AvatarGroup, Skeleton, Alert, AlertStack, Accordion, HoldButton, ScrollArea, DropZone, SortableList, } from './controls';
10
- export { Pile } from './pile';
11
- export { Tooltip, HoverCard, Popover, DropdownMenu, Dialog, Toaster, toast } from './overlays';
12
- export { Drilldown } from './nav';
13
- export { Sheet, SheetHeader, SheetTitle, SheetDescription, SheetFooter } from './sheet';
14
- export { CommandPalette, commandScore } from './command';
15
- export { Select, SelectItem, Combobox } from './select';
16
- export { Stepper } from './stepper';
17
- export { EmptyState } from './empty';
18
- export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, DataTable, Board, BoardColumn, BoardCard } from './collections';
19
- export { Await, RevealGroup, readPromised, LoadingScope } from './suspense';
20
- export type { Promised, Pending, SkeletonOption, AwaitProps } from './suspense';
10
+ export { ModeContext } from './core.js';
11
+ export type { AppMode } from './core.js';
12
+ export { PrimaryScope } from './core.js';
13
+ export { AltitudeProvider, useAltitude, useDepth, useApproach, riseDelay, Layer, Surface, Kbd, useKeyboardLikely, Icons, Spinner, deriveAccent, contrast, checkScheme, usePresence } from './core.js';
14
+ export type { Scheme, BuiltInScheme, RetiredScheme, CustomScheme, SchemeColorToken, SchemeShadowToken, DataColorToken, SchemeCheck } from './core.js';
15
+ export { Button, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Input, Textarea, Field, Checkbox, RadioGroup, Radio, Switch, Tabs, TabsList, TabsTrigger, TabsContent, Slider, Progress, Badge, Avatar, AvatarGroup, Skeleton, Alert, AlertStack, Accordion, HoldButton, ScrollArea, DropZone, SortableList, } from './controls.js';
16
+ export type { UploadItem } from './controls.js';
17
+ export { Pile } from './pile.js';
18
+ export { Separator } from './separator.js';
19
+ export { Link } from './link.js';
20
+ export { FormattedNumber, formatNumber, describeNumber } from './formatted-number.js';
21
+ export type { FormatNumberOptions, NumberFormatPreset, DurationUnit } from './formatted-number.js';
22
+ export { RelativeTime, formatRelativeTime } from './relative-time.js';
23
+ export { Timeline, TimelineItem } from './timeline.js';
24
+ export { NotificationCenter, NotificationList } from './notifications.js';
25
+ export type { NotificationEntry } from './notifications.js';
26
+ export { SyncIndicator } from './sync-indicator.js';
27
+ export type { SyncState } from './sync-indicator.js';
28
+ export { DiffView, diffChanges, diffLines } from './diff-view.js';
29
+ export type { DiffField } from './diff-view.js';
30
+ export { SaveBar } from './save-bar.js';
31
+ export { SettingsSection, SettingsRow } from './settings.js';
32
+ export { PermissionMatrix } from './permission-matrix.js';
33
+ export type { MatrixRole, MatrixPermission, MatrixInherited } from './permission-matrix.js';
34
+ export { PlanPicker } from './plan-picker.js';
35
+ export type { Plan } from './plan-picker.js';
36
+ export { FeatureGate } from './feature-gate.js';
37
+ export { CommentThread } from './comment-thread.js';
38
+ export type { ThreadComment, Mentionable } from './comment-thread.js';
39
+ export { Tour } from './tour.js';
40
+ export type { TourStep } from './tour.js';
41
+ export { PromptInput, PromptInputTextarea, PromptInputAttachments, PromptInputToolbar, PromptInputAttach, PromptInputSubmit, PromptInputDictate } from './prompt-input.js';
42
+ export type { PromptStatus, PromptAttachment, PromptMessage } from './prompt-input.js';
43
+ export { Conversation, ConversationContent, ConversationScrollButton, Message, MessageContent, MessageActions, MessageAttachments, ConversationQueue, ConversationCheckpoint } from './conversation.js';
44
+ export type { MessageStatus } from './conversation.js';
45
+ export { Confirmation } from './confirmation.js';
46
+ export type { ConfirmationState } from './confirmation.js';
47
+ export { Trace, TraceParallel, TraceStep, TraceToolCall, TraceReasoning } from './trace.js';
48
+ export type { TraceStepStatus } from './trace.js';
49
+ export type { SuggestionProps } from './controls.js';
50
+ export { AILabel } from './ai-label.js';
51
+ export type { AISource } from './ai-label.js';
52
+ export { InlineCitation, Sources } from './inline-citation.js';
53
+ export { Artifact, ArtifactHeader, ArtifactVersions, ArtifactContent, ArtifactReference } from './artifact.js';
54
+ export type { ArtifactProps, ArtifactHeaderProps, ArtifactVersionsProps, ArtifactContentProps, ArtifactReferenceProps, ArtifactStatus } from './artifact.js';
55
+ export { ThreadList, ThreadListGroup, ThreadListItem, ThreadListNew, groupByDate } from './thread-list.js';
56
+ export type { ThreadListProps, ThreadListItemProps, ThreadListGroupProps, ThreadStatus } from './thread-list.js';
57
+ export { AgentFleet, AgentFleetGroup, AgentFleetItem, AgentRequests, AgentRequest, AgentLanes, summarizeFleet, groupAgents, needsYou, formatSpan } from './agent-fleet.js';
58
+ export type { AgentFleetProps, AgentFleetGroupProps, AgentFleetItemProps, AgentRequestsProps, AgentRequestProps, AgentLanesProps, AgentLane, AgentLaneState, AgentState, AgentNeeds } from './agent-fleet.js';
59
+ export { Question, QuestionOption, QuestionSet } from './question.js';
60
+ export type { QuestionProps, QuestionOptionProps, QuestionSetProps, QuestionAnswer, QuestionState } from './question.js';
61
+ export { Terminal } from './terminal.js';
62
+ export type { TerminalProps, TerminalChunk } from './terminal.js';
63
+ export { Suggestions, Suggestion } from './suggestions.js';
64
+ export type { SuggestionsProps, SuggestionItemProps } from './suggestions.js';
65
+ export { Markdown, parseMarkdown, safeUrl } from './markdown.js';
66
+ export type { MarkdownProps, MarkdownComponents } from './markdown.js';
67
+ export type { CitationSource } from './inline-citation.js';
68
+ export type { RelativeTimeOptions } from './relative-time.js';
69
+ export { CopyButton } from './copy-button.js';
70
+ export { Toggle, ToggleGroup, ToggleGroupItem } from './toggle.js';
71
+ export { Toolbar, ToolbarGroup, ToolbarSeparator, ToolbarButton, ToolbarToggle } from './toolbar.js';
72
+ export { SplitButton } from './split-button.js';
73
+ export { NumberInput, parseNumber } from './number-input.js';
74
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from './input-otp.js';
75
+ export { TimeInput } from './time-input.js';
76
+ export { PasswordInput } from './password-input.js';
77
+ export type { PasswordRequirement } from './password-input.js';
78
+ export { SecretField } from './secret-field.js';
79
+ export { CodeBlock } from './code-block.js';
80
+ export type { CodeBlockTab } from './code-block.js';
81
+ export { ColorPicker, ColorSwatchPicker } from './color-picker.js';
82
+ export type { ColorSwatch } from './color-picker.js';
83
+ export { Tooltip, HoverCard, Popover, DropdownMenu, Dialog, Toaster, toast } from './overlays.js';
84
+ export { Drilldown, useDrilldown } from './nav.js';
85
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis } from './breadcrumb.js';
86
+ export type { BreadcrumbEntry } from './breadcrumb.js';
87
+ export { Pagination, pageRange } from './pagination.js';
88
+ export { PageHeader, PageHeaderTitle, PageHeaderDescription } from './page-header.js';
89
+ export { AppShell, SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuBadge, SidebarFooter, SidebarTrigger, SidebarInset, useSidebar } from './app-shell.js';
90
+ export { Sheet, SheetHeader, SheetTitle, SheetDescription, SheetFooter } from './sheet.js';
91
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle } from './resizable.js';
92
+ export { ContextMenu } from './context-menu.js';
93
+ export { CommandPalette, commandScore } from './command.js';
94
+ export { Select, SelectItem, Combobox } from './select.js';
95
+ export { Stepper } from './stepper.js';
96
+ export { EmptyState } from './empty.js';
97
+ export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, DataTable, Board, BoardColumn, BoardCard } from './collections.js';
98
+ export type { DataTablePaging, TableSelection } from './collections.js';
99
+ export { Await, RevealGroup, readPromised, LoadingScope } from './suspense.js';
100
+ export type { Promised, Pending, SkeletonOption, AwaitProps } from './suspense.js';
101
+ export type { AvatarProps, AvatarGroupProps } from './controls.js';
102
+ export { InlineEdit } from './inline-edit.js';
103
+ export type { InlineEditControl, InlineEditProps, InlineEditSaveResult } from './inline-edit.js';
104
+ export { EditRegion, EditRegionView, EditRegionValue, EditRegionForm, EditRegionTrigger, EditRegionActions } from './edit-region.js';
105
+ export type { EditRegionProps, EditRegionSaveResult, EditRegionBinder } from './edit-region.js';
106
+ export { TagInput, Tag } from './tag-input.js';
107
+ export type { TagInputProps, TagProps, TagResult } from './tag-input.js';
108
+ export { DatePicker, DateRangePicker, Calendar, datePresets } from './date-picker.js';
109
+ export type { DatePickerProps, DateRangePickerProps, CalendarProps, DateRange, ISODate, DatePreset } from './date-picker.js';
110
+ export { Tree } from './tree.js';
111
+ export type { TreeProps, TreeHandle, TreeMove, TreeTarget, TreeResult, TreeCreateResult } from './tree.js';
112
+ export { Checklist } from './checklist.js';
113
+ export type { ChecklistProps, ChecklistOp, ChecklistPlace, ChecklistResult } from './checklist.js';
114
+ export { FilterBar, filterValueText, filterSentence } from './filter-bar.js';
115
+ export type { FilterTree, FilterGroup } from './filter-bar.js';
116
+ export { SavedViews, useSavedViews } from './saved-views.js';
117
+ export type { SavedView, ViewState, SavedViewsApi, SavedViewsOptions } from './saved-views.js';
118
+ export type { FilterBarProps, FilterField, FilterOption, Filter, FilterValue } from './filter-bar.js';
119
+ export { Schedule } from './schedule.js';
120
+ export type { ScheduleProps, ScheduleSpan, ScheduleResult, ScheduleCreateResult, LocalDateTime } from './schedule.js';
121
+ export { DataGrid } from './data-grid.js';
122
+ export type { DataGridProps, DataGridColumn, DataGridChange, DataGridResult, DataGridEditorControl } from './data-grid.js';
123
+ export { RemovalReceipt } from './removal-receipt.js';
124
+ export type { RemovalReceiptProps } from './removal-receipt.js';
125
+ export { ItemGroup, Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemSeparator } from './item-group.js';
126
+ export type { ItemGroupProps, ItemGroupRemoval, ItemGroupResult, ItemGroupCreateResult, ItemActionsApi } from './item-group.js';
127
+ export type { BoardCreateResult, BoardRenameResult } from './collections.js';
128
+ export { PropertyList, PropertyListItem } from './property-list.js';
129
+ export type { PropertyListProps, PropertyListItemProps, PropertyListEditAll } from './property-list.js';
130
+ export { ChartContainer, ChartMarker, ChartReference, ChartAnnotation, ChartRelevance, ChartStatusClip, CHART_STATUS_WORDS, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, useChart } from './chart.js';
131
+ export { BarChart } from './bar-chart.js';
132
+ export { LineChart, linePath, windowed } from './line-chart.js';
133
+ export type { LineChartProps, ChartWindow } from './line-chart.js';
134
+ export { AreaChart } from './area-chart.js';
135
+ export { Heatmap } from './heatmap.js';
136
+ export type { HeatmapProps } from './heatmap.js';
137
+ export { ScatterChart } from './scatter-chart.js';
138
+ export type { ScatterChartProps } from './scatter-chart.js';
139
+ export { DotPlot } from './dot-plot.js';
140
+ export type { DotPlotProps } from './dot-plot.js';
141
+ export { ChartBrush } from './chart-brush.js';
142
+ export type { ChartBrushProps } from './chart-brush.js';
143
+ export type { AreaChartProps } from './area-chart.js';
144
+ export { Sparkline } from './sparkline.js';
145
+ export type { SparklineProps } from './sparkline.js';
146
+ export { Stat, StatGroup } from './stat.js';
147
+ export type { StatProps, StatChange, StatGroupProps } from './stat.js';
148
+ export { Meter } from './meter.js';
149
+ export type { MeterProps, MeterSegment } from './meter.js';
150
+ export { BarList } from './bar-list.js';
151
+ export type { BarListProps, BarListItem } from './bar-list.js';
152
+ export type { BarChartProps } from './bar-chart.js';
153
+ export type { ChartConfig, ChartSeriesConfig, ChartSlot, ChartSeries, ChartDatum, ChartContextValue, ChartContainerProps, ChartXScale, LinearScale, TimeScale, BandScale, ChartStage, ChartEncoding, ChartMarkerShape, ChartTooltipItem, ChartTooltipContentProps, ChartLegendItem, ChartLegendContentProps, ChartEmpty, ChartStatus, ChartReferenceProps, ChartAnnotationProps } from './chart.js';
154
+ export { useEditRecord, ErrorSummary, WorkflowStatus } from './pattern-edit-record.js';
155
+ export type { FieldErrors, EditRecordResult, EditRecordPhase, EditRecordOptions, LeaveReason, ErrorSummaryProps } from './pattern-edit-record.js';
156
+ export { useAsyncCollection } from './pattern-async-collection.js';
157
+ export type { AsyncCollectionOptions, CollectionPhase } from './pattern-async-collection.js';
158
+ export { useConsequentialAction } from './pattern-consequential-action.js';
159
+ export { useAssistantTurn, AssistantError, assistantErrorText } from './pattern-assistant-conversation.js';
160
+ export type { AssistantTurn, AssistantTurnOptions, AssistantTurnState, AssistantTurnError, AssistantErrorKind } from './pattern-assistant-conversation.js';
161
+ export type { ConsequentialActionOptions, ConsequentialPhase, ActionResult, UndoResult } from './pattern-consequential-action.js';
162
+ export { useReviewSubmit } from './pattern-review-submit.js';
163
+ export type { ReviewSubmitOptions, ReviewSubmitResult } from './pattern-review-submit.js';
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ export interface CitationSource {
3
+ title: string;
4
+ url?: string;
5
+ /** A passage from the source. */
6
+ excerpt?: string;
7
+ /** The source couldn't be verified: a caution mark and "Unverified source". */
8
+ unverified?: boolean;
9
+ }
10
+ export interface InlineCitationProps {
11
+ /** Its number, counted from 1, matching the Sources list. */
12
+ index: number;
13
+ source: CitationSource;
14
+ /** Where it goes. Default the source's entry in Sources (`#<idPrefix>-<index>`). */
15
+ href?: string;
16
+ /** Shared with Sources. Default "source". */
17
+ idPrefix?: string;
18
+ className?: string;
19
+ }
20
+ /**
21
+ * A numbered source marker in generated text. A citation is part of the record, so it's a small flush plate (the
22
+ * ChartAnnotation build) in the text; it acts, so it lifts one level when pointed at, and a HoverCard previews the
23
+ * source on hover and on focus. Named "Source 2: Billing FAQ", never "[2]".
24
+ */
25
+ export declare function InlineCitation({ index, source, href, idPrefix, className }: InlineCitationProps): React.JSX.Element;
26
+ export interface SourcesProps {
27
+ items: CitationSource[];
28
+ /** Default "Sources". */
29
+ heading?: string;
30
+ /** Shared with InlineCitation. Default "source". */
31
+ idPrefix?: string;
32
+ className?: string;
33
+ }
34
+ /** The sources an answer cites, as a flush ordered list under a heading; each entry is a citation's destination. */
35
+ export declare function Sources({ items, heading, idPrefix, className }: SourcesProps): React.JSX.Element;
@@ -0,0 +1,71 @@
1
+ import * as React from 'react';
2
+ export type InlineEditSaveResult<V = string> = {
3
+ ok: true;
4
+ value: V;
5
+ } | {
6
+ ok: false;
7
+ error: string;
8
+ };
9
+ /** Spread onto any Altitude control (Select, Combobox, Switch through a small adapter, a numeric Input). */
10
+ export interface InlineEditControl<V> {
11
+ value: V;
12
+ onValueChange: (value: V) => void;
13
+ id: string;
14
+ 'aria-describedby'?: string;
15
+ invalid: boolean;
16
+ /** True while checking, saving or blocked by a conflict: changes are ignored until it clears. */
17
+ readOnly: boolean;
18
+ disabled: boolean;
19
+ autoFocus: true;
20
+ }
21
+ export interface InlineEditProps<V = string> {
22
+ value: V;
23
+ onValueChange: (canonicalValue: V) => void;
24
+ onSave: (draft: V, context: {
25
+ previousValue: V;
26
+ }) => InlineEditSaveResult<V> | Promise<InlineEditSaveResult<V>>;
27
+ label: string;
28
+ validate?: (draft: V) => string | undefined | Promise<string | undefined>;
29
+ required?: boolean;
30
+ maxLength?: number;
31
+ disabled?: boolean;
32
+ editLabel?: string;
33
+ saveLabel?: string;
34
+ cancelLabel?: string;
35
+ focusFallback?: () => HTMLElement | null;
36
+ className?: string;
37
+ /** Read mode. Default: the value as text, or “Not set” when empty. */
38
+ renderValue?: (value: V) => React.ReactNode;
39
+ /** Edit mode. Default: the existing Input for a string. */
40
+ editor?: (control: InlineEditControl<V>) => React.ReactNode;
41
+ /** 'on-choose' saves as soon as a single-choice editor reports a value; Save is hidden. Default 'explicit'. */
42
+ commit?: 'explicit' | 'on-choose';
43
+ /** An unchanged draft closes without a write, and an equal observed value isn't an external change. Default Object.is. */
44
+ isEqual?: (a: V, b: V) => boolean;
45
+ /** A Textarea instead of the Input: Enter inserts a newline and Ctrl/Cmd+Enter saves. Default false. */
46
+ multiline?: boolean;
47
+ /** With multiline, the textarea's initial height in lines. Default 3. */
48
+ rows?: number;
49
+ /** With multiline, the textarea grows with its content up to this many lines, then scrolls. Default 12. */
50
+ maxRows?: number;
51
+ /**
52
+ * How editing starts. 'button' (default): the value, then a visible Edit button. The others make the value its own
53
+ * button, named “<label>: <value>. <editLabel>”: 'value' a plate that lifts on hover, 'pencil' a pencil shown on hover
54
+ * or focus, 'field' the input's own border and floor drawn on hover, and a click puts the caret where it landed.
55
+ */
56
+ trigger?: 'button' | 'value' | 'pencil' | 'field';
57
+ /** With trigger 'value', 'pencil' or 'field': 'seam' scores a faint groove under the value at rest, where its well will open, so people know to point at it. Default 'none'. */
58
+ hint?: 'none' | 'seam';
59
+ /** Shown for an empty value. Default “Not set”. */
60
+ emptyLabel?: string;
61
+ /** Single-key shortcut announced on the trigger (aria-keyshortcuts); the surrounding list handles the key. */
62
+ shortcut?: string;
63
+ /** How long a saved value's afterglow takes to fade, in ms. Default 5000. */
64
+ settleDuration?: number;
65
+ }
66
+ /**
67
+ * One local editing session. The application remains the sole owner of the committed value and write. Editing happens
68
+ * in place: the value's text sits in a slot with the control's own inset and font, so when the control opens there, the
69
+ * text doesn't move; only the well (floor, walls, border) fades in around it. Whatever still changes size glides.
70
+ */
71
+ export declare function InlineEdit<V = string>({ value, onValueChange, onSave, label, validate, required, maxLength, disabled, editLabel, saveLabel, cancelLabel, focusFallback, className, renderValue, editor, commit, isEqual, multiline, rows, maxRows, trigger: triggerMode, hint, emptyLabel, shortcut, settleDuration }: InlineEditProps<V>): React.ReactElement;