altitude-design 0.2.0 → 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 +46 -8
  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 +3165 -246
  9. package/dist/altitude.iife.js +33 -5
  10. package/dist/altitude.no-fonts.css +3165 -246
  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 +19009 -1854
  104. package/dist/index.cjs.map +4 -4
  105. package/dist/index.js +19009 -1854
  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 +116 -5
  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 +134 -22
  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 +159 -14
  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 +56 -15
  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 +85 -0
  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 +90 -9
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ export interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
3
+ /** A line icon, drawn in ink-muted: 24px, or 18px at size sm. */
4
+ icon?: React.ReactNode;
5
+ /** What is empty, as a statement: "No gift ideas yet". It names the region. */
6
+ title: React.ReactNode;
7
+ /** Why it's empty, or what will appear here. Linked as the region's description. */
8
+ description?: React.ReactNode;
9
+ /** The one obvious next step: usually a primary Button. */
10
+ action?: React.ReactNode;
11
+ /** A quieter alternative beside it: usually a ghost Button or a link. */
12
+ secondary?: React.ReactNode;
13
+ /** md fills a page or a panel; sm fits a widget or a list. Default 'md'. */
14
+ size?: 'sm' | 'md';
15
+ /** The title's heading level. Default 3. */
16
+ headingLevel?: 2 | 3 | 4;
17
+ /** Say it politely when it appears, for an empty that follows a change (a filter, a search). true says the title, if it's text; a string says that. */
18
+ announce?: boolean | string;
19
+ }
20
+ /**
21
+ * An opening the first record will fill. Nothing here yet is a well cut into the page (not a raised card, not an
22
+ * alert), with a dashed rim, a title that names what's empty and one next action standing in it.
23
+ */
24
+ export declare function EmptyState({ icon, title, description, action, secondary, size, headingLevel, announce, className, children, ...rest }: EmptyStateProps): React.JSX.Element;
@@ -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.cjs';
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];
@@ -0,0 +1,154 @@
1
+ export { ModeContext } from './core.cjs';
2
+ export type { AppMode } from './core.cjs';
3
+ export { PrimaryScope } from './core.cjs';
4
+ export { AltitudeProvider, useAltitude, useDepth, useApproach, riseDelay, Layer, Surface, Kbd, useKeyboardLikely, Icons, Spinner, deriveAccent, contrast, checkScheme, usePresence } from './core.cjs';
5
+ export type { Scheme, BuiltInScheme, RetiredScheme, CustomScheme, SchemeColorToken, SchemeShadowToken, DataColorToken, SchemeCheck } from './core.cjs';
6
+ 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.cjs';
7
+ export type { UploadItem } from './controls.cjs';
8
+ export { Pile } from './pile.cjs';
9
+ export { Separator } from './separator.cjs';
10
+ export { Link } from './link.cjs';
11
+ export { FormattedNumber, formatNumber, describeNumber } from './formatted-number.cjs';
12
+ export type { FormatNumberOptions, NumberFormatPreset, DurationUnit } from './formatted-number.cjs';
13
+ export { RelativeTime, formatRelativeTime } from './relative-time.cjs';
14
+ export { Timeline, TimelineItem } from './timeline.cjs';
15
+ export { NotificationCenter, NotificationList } from './notifications.cjs';
16
+ export type { NotificationEntry } from './notifications.cjs';
17
+ export { SyncIndicator } from './sync-indicator.cjs';
18
+ export type { SyncState } from './sync-indicator.cjs';
19
+ export { DiffView, diffChanges, diffLines } from './diff-view.cjs';
20
+ export type { DiffField } from './diff-view.cjs';
21
+ export { SaveBar } from './save-bar.cjs';
22
+ export { SettingsSection, SettingsRow } from './settings.cjs';
23
+ export { PermissionMatrix } from './permission-matrix.cjs';
24
+ export type { MatrixRole, MatrixPermission, MatrixInherited } from './permission-matrix.cjs';
25
+ export { PlanPicker } from './plan-picker.cjs';
26
+ export type { Plan } from './plan-picker.cjs';
27
+ export { FeatureGate } from './feature-gate.cjs';
28
+ export { CommentThread } from './comment-thread.cjs';
29
+ export type { ThreadComment, Mentionable } from './comment-thread.cjs';
30
+ export { Tour } from './tour.cjs';
31
+ export type { TourStep } from './tour.cjs';
32
+ export { PromptInput, PromptInputTextarea, PromptInputAttachments, PromptInputToolbar, PromptInputAttach, PromptInputSubmit, PromptInputDictate } from './prompt-input.cjs';
33
+ export type { PromptStatus, PromptAttachment, PromptMessage } from './prompt-input.cjs';
34
+ export { Conversation, ConversationContent, ConversationScrollButton, Message, MessageContent, MessageActions, MessageAttachments, ConversationQueue, ConversationCheckpoint } from './conversation.cjs';
35
+ export type { MessageStatus } from './conversation.cjs';
36
+ export { Confirmation } from './confirmation.cjs';
37
+ export type { ConfirmationState } from './confirmation.cjs';
38
+ export { Trace, TraceParallel, TraceStep, TraceToolCall, TraceReasoning } from './trace.cjs';
39
+ export type { TraceStepStatus } from './trace.cjs';
40
+ export type { SuggestionProps } from './controls.cjs';
41
+ export { AILabel } from './ai-label.cjs';
42
+ export type { AISource } from './ai-label.cjs';
43
+ export { InlineCitation, Sources } from './inline-citation.cjs';
44
+ export { Artifact, ArtifactHeader, ArtifactVersions, ArtifactContent, ArtifactReference } from './artifact.cjs';
45
+ export type { ArtifactProps, ArtifactHeaderProps, ArtifactVersionsProps, ArtifactContentProps, ArtifactReferenceProps, ArtifactStatus } from './artifact.cjs';
46
+ export { ThreadList, ThreadListGroup, ThreadListItem, ThreadListNew, groupByDate } from './thread-list.cjs';
47
+ export type { ThreadListProps, ThreadListItemProps, ThreadListGroupProps, ThreadStatus } from './thread-list.cjs';
48
+ export { AgentFleet, AgentFleetGroup, AgentFleetItem, AgentRequests, AgentRequest, AgentLanes, summarizeFleet, groupAgents, needsYou, formatSpan } from './agent-fleet.cjs';
49
+ export type { AgentFleetProps, AgentFleetGroupProps, AgentFleetItemProps, AgentRequestsProps, AgentRequestProps, AgentLanesProps, AgentLane, AgentLaneState, AgentState, AgentNeeds } from './agent-fleet.cjs';
50
+ export { Question, QuestionOption, QuestionSet } from './question.cjs';
51
+ export type { QuestionProps, QuestionOptionProps, QuestionSetProps, QuestionAnswer, QuestionState } from './question.cjs';
52
+ export { Terminal } from './terminal.cjs';
53
+ export type { TerminalProps, TerminalChunk } from './terminal.cjs';
54
+ export { Suggestions, Suggestion } from './suggestions.cjs';
55
+ export type { SuggestionsProps, SuggestionItemProps } from './suggestions.cjs';
56
+ export { Markdown, parseMarkdown, safeUrl } from './markdown.cjs';
57
+ export type { MarkdownProps, MarkdownComponents } from './markdown.cjs';
58
+ export type { CitationSource } from './inline-citation.cjs';
59
+ export type { RelativeTimeOptions } from './relative-time.cjs';
60
+ export { CopyButton } from './copy-button.cjs';
61
+ export { Toggle, ToggleGroup, ToggleGroupItem } from './toggle.cjs';
62
+ export { Toolbar, ToolbarGroup, ToolbarSeparator, ToolbarButton, ToolbarToggle } from './toolbar.cjs';
63
+ export { SplitButton } from './split-button.cjs';
64
+ export { NumberInput, parseNumber } from './number-input.cjs';
65
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from './input-otp.cjs';
66
+ export { TimeInput } from './time-input.cjs';
67
+ export { PasswordInput } from './password-input.cjs';
68
+ export type { PasswordRequirement } from './password-input.cjs';
69
+ export { SecretField } from './secret-field.cjs';
70
+ export { CodeBlock } from './code-block.cjs';
71
+ export type { CodeBlockTab } from './code-block.cjs';
72
+ export { ColorPicker, ColorSwatchPicker } from './color-picker.cjs';
73
+ export type { ColorSwatch } from './color-picker.cjs';
74
+ export { Tooltip, HoverCard, Popover, DropdownMenu, Dialog, Toaster, toast } from './overlays.cjs';
75
+ export { Drilldown, useDrilldown } from './nav.cjs';
76
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis } from './breadcrumb.cjs';
77
+ export type { BreadcrumbEntry } from './breadcrumb.cjs';
78
+ export { Pagination, pageRange } from './pagination.cjs';
79
+ export { PageHeader, PageHeaderTitle, PageHeaderDescription } from './page-header.cjs';
80
+ export { AppShell, SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuBadge, SidebarFooter, SidebarTrigger, SidebarInset, useSidebar } from './app-shell.cjs';
81
+ export { Sheet, SheetHeader, SheetTitle, SheetDescription, SheetFooter } from './sheet.cjs';
82
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle } from './resizable.cjs';
83
+ export { ContextMenu } from './context-menu.cjs';
84
+ export { CommandPalette, commandScore } from './command.cjs';
85
+ export { Select, SelectItem, Combobox } from './select.cjs';
86
+ export { Stepper } from './stepper.cjs';
87
+ export { EmptyState } from './empty.cjs';
88
+ export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, DataTable, Board, BoardColumn, BoardCard } from './collections.cjs';
89
+ export type { DataTablePaging, TableSelection } from './collections.cjs';
90
+ export { Await, RevealGroup, readPromised, LoadingScope } from './suspense.cjs';
91
+ export type { Promised, Pending, SkeletonOption, AwaitProps } from './suspense.cjs';
92
+ export type { AvatarProps, AvatarGroupProps } from './controls.cjs';
93
+ export { InlineEdit } from './inline-edit.cjs';
94
+ export type { InlineEditControl, InlineEditProps, InlineEditSaveResult } from './inline-edit.cjs';
95
+ export { EditRegion, EditRegionView, EditRegionValue, EditRegionForm, EditRegionTrigger, EditRegionActions } from './edit-region.cjs';
96
+ export type { EditRegionProps, EditRegionSaveResult, EditRegionBinder } from './edit-region.cjs';
97
+ export { TagInput, Tag } from './tag-input.cjs';
98
+ export type { TagInputProps, TagProps, TagResult } from './tag-input.cjs';
99
+ export { DatePicker, DateRangePicker, Calendar, datePresets } from './date-picker.cjs';
100
+ export type { DatePickerProps, DateRangePickerProps, CalendarProps, DateRange, ISODate, DatePreset } from './date-picker.cjs';
101
+ export { Tree } from './tree.cjs';
102
+ export type { TreeProps, TreeHandle, TreeMove, TreeTarget, TreeResult, TreeCreateResult } from './tree.cjs';
103
+ export { Checklist } from './checklist.cjs';
104
+ export type { ChecklistProps, ChecklistOp, ChecklistPlace, ChecklistResult } from './checklist.cjs';
105
+ export { FilterBar, filterValueText, filterSentence } from './filter-bar.cjs';
106
+ export type { FilterTree, FilterGroup } from './filter-bar.cjs';
107
+ export { SavedViews, useSavedViews } from './saved-views.cjs';
108
+ export type { SavedView, ViewState, SavedViewsApi, SavedViewsOptions } from './saved-views.cjs';
109
+ export type { FilterBarProps, FilterField, FilterOption, Filter, FilterValue } from './filter-bar.cjs';
110
+ export { Schedule } from './schedule.cjs';
111
+ export type { ScheduleProps, ScheduleSpan, ScheduleResult, ScheduleCreateResult, LocalDateTime } from './schedule.cjs';
112
+ export { DataGrid } from './data-grid.cjs';
113
+ export type { DataGridProps, DataGridColumn, DataGridChange, DataGridResult, DataGridEditorControl } from './data-grid.cjs';
114
+ export { RemovalReceipt } from './removal-receipt.cjs';
115
+ export type { RemovalReceiptProps } from './removal-receipt.cjs';
116
+ export { ItemGroup, Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemSeparator } from './item-group.cjs';
117
+ export type { ItemGroupProps, ItemGroupRemoval, ItemGroupResult, ItemGroupCreateResult, ItemActionsApi } from './item-group.cjs';
118
+ export type { BoardCreateResult, BoardRenameResult } from './collections.cjs';
119
+ export { PropertyList, PropertyListItem } from './property-list.cjs';
120
+ export type { PropertyListProps, PropertyListItemProps, PropertyListEditAll } from './property-list.cjs';
121
+ export { ChartContainer, ChartMarker, ChartReference, ChartAnnotation, ChartRelevance, ChartStatusClip, CHART_STATUS_WORDS, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, useChart } from './chart.cjs';
122
+ export { BarChart } from './bar-chart.cjs';
123
+ export { LineChart, linePath, windowed } from './line-chart.cjs';
124
+ export type { LineChartProps, ChartWindow } from './line-chart.cjs';
125
+ export { AreaChart } from './area-chart.cjs';
126
+ export { Heatmap } from './heatmap.cjs';
127
+ export type { HeatmapProps } from './heatmap.cjs';
128
+ export { ScatterChart } from './scatter-chart.cjs';
129
+ export type { ScatterChartProps } from './scatter-chart.cjs';
130
+ export { DotPlot } from './dot-plot.cjs';
131
+ export type { DotPlotProps } from './dot-plot.cjs';
132
+ export { ChartBrush } from './chart-brush.cjs';
133
+ export type { ChartBrushProps } from './chart-brush.cjs';
134
+ export type { AreaChartProps } from './area-chart.cjs';
135
+ export { Sparkline } from './sparkline.cjs';
136
+ export type { SparklineProps } from './sparkline.cjs';
137
+ export { Stat, StatGroup } from './stat.cjs';
138
+ export type { StatProps, StatChange, StatGroupProps } from './stat.cjs';
139
+ export { Meter } from './meter.cjs';
140
+ export type { MeterProps, MeterSegment } from './meter.cjs';
141
+ export { BarList } from './bar-list.cjs';
142
+ export type { BarListProps, BarListItem } from './bar-list.cjs';
143
+ export type { BarChartProps } from './bar-chart.cjs';
144
+ 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.cjs';
145
+ export { useEditRecord, ErrorSummary, WorkflowStatus } from './pattern-edit-record.cjs';
146
+ export type { FieldErrors, EditRecordResult, EditRecordPhase, EditRecordOptions, LeaveReason, ErrorSummaryProps } from './pattern-edit-record.cjs';
147
+ export { useAsyncCollection } from './pattern-async-collection.cjs';
148
+ export type { AsyncCollectionOptions, CollectionPhase } from './pattern-async-collection.cjs';
149
+ export { useConsequentialAction } from './pattern-consequential-action.cjs';
150
+ export { useAssistantTurn, AssistantError, assistantErrorText } from './pattern-assistant-conversation.cjs';
151
+ export type { AssistantTurn, AssistantTurnOptions, AssistantTurnState, AssistantTurnError, AssistantErrorKind } from './pattern-assistant-conversation.cjs';
152
+ export type { ConsequentialActionOptions, ConsequentialPhase, ActionResult, UndoResult } from './pattern-consequential-action.cjs';
153
+ export { useReviewSubmit } from './pattern-review-submit.cjs';
154
+ export type { ReviewSubmitOptions, ReviewSubmitResult } from './pattern-review-submit.cjs';
@@ -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;
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ export interface InputOTPProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'pattern' | 'children'> {
3
+ /** How many characters the code has. */
4
+ maxLength: number;
5
+ value?: string;
6
+ defaultValue?: string;
7
+ onChange?: (code: string) => void;
8
+ /** Called when the last character lands, and again whenever a full code changes. */
9
+ onComplete?: (code: string) => void;
10
+ /** Which characters it takes. Default 'digits'. Anything else typed or pasted is dropped. */
11
+ pattern?: 'digits' | 'alphanumeric' | RegExp;
12
+ /** Show • instead of the characters. */
13
+ mask?: boolean;
14
+ invalid?: boolean;
15
+ /** The code is being checked: aria-busy, and nothing more can be typed. */
16
+ verifying?: boolean;
17
+ /** InputOTPGroup, InputOTPSlot and InputOTPSeparator. Default: one group of maxLength slots. */
18
+ children?: React.ReactNode;
19
+ className?: string;
20
+ }
21
+ /**
22
+ * A one-time code as a row of openings that fill. One real input (inputmode numeric, autocomplete one-time-code) drives
23
+ * the slots, so autofill, paste and screen readers see one field; each slot is a well whose floor rises flush as its
24
+ * character lands, and a rejected code drops the whole row to a trench.
25
+ */
26
+ export declare const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.RefAttributes<HTMLInputElement>>;
27
+ /** Slots that sit together, parted from the next group by an InputOTPSeparator. */
28
+ export declare function InputOTPGroup({ className, ...rest }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
29
+ /** One character's opening: a well whose floor rises flush when its character lands. */
30
+ export declare function InputOTPSlot({ index, className }: {
31
+ index: number;
32
+ className?: string;
33
+ }): React.JSX.Element;
34
+ /** A decorative dash between groups. */
35
+ export declare function InputOTPSeparator({ className }: {
36
+ className?: string;
37
+ }): React.JSX.Element;