@vantageos/mosaic 0.3.1 → 0.5.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 (157) hide show
  1. package/CHANGELOG.md +88 -2
  2. package/LICENSE +110 -0
  3. package/README.md +193 -21
  4. package/dist/PipelineBoard-FucyGArR.d.cts +759 -0
  5. package/dist/PipelineBoard-FucyGArR.d.ts +759 -0
  6. package/dist/PipelineBoard.markdown-DIcvrS-2.d.cts +16 -0
  7. package/dist/PipelineBoard.markdown-DIcvrS-2.d.ts +16 -0
  8. package/dist/{StatusBadge.schema-1tOjB4Ir.d.cts → StatusBadge.schema-BEjSH2_4.d.cts} +2 -2
  9. package/dist/{StatusBadge.schema-1tOjB4Ir.d.ts → StatusBadge.schema-BEjSH2_4.d.ts} +2 -2
  10. package/dist/{Tabs.schema-BzcEyeq8.d.cts → Tabs.schema-Dqr6vwV3.d.cts} +2 -2
  11. package/dist/{Tabs.schema-BzcEyeq8.d.ts → Tabs.schema-Dqr6vwV3.d.ts} +2 -2
  12. package/dist/Timeline-Coo_3tA_.d.cts +114 -0
  13. package/dist/Timeline-Coo_3tA_.d.ts +114 -0
  14. package/dist/Timeline.markdown-C6UPDv1H.d.cts +4 -0
  15. package/dist/Timeline.markdown-C6UPDv1H.d.ts +4 -0
  16. package/dist/TransactionPreview-BzWDn8kE.d.cts +391 -0
  17. package/dist/TransactionPreview-BzWDn8kE.d.ts +391 -0
  18. package/dist/TransactionPreview.markdown-Dpb0VYgN.d.cts +7 -0
  19. package/dist/TransactionPreview.markdown-Dpb0VYgN.d.ts +7 -0
  20. package/dist/artifacts.cjs +190 -2
  21. package/dist/artifacts.cjs.map +1 -1
  22. package/dist/artifacts.js +190 -2
  23. package/dist/artifacts.js.map +1 -1
  24. package/dist/confirmation.cjs +728 -2
  25. package/dist/confirmation.cjs.map +1 -1
  26. package/dist/confirmation.d.cts +2 -1
  27. package/dist/confirmation.d.ts +2 -1
  28. package/dist/confirmation.js +726 -4
  29. package/dist/confirmation.js.map +1 -1
  30. package/dist/display.cjs +1555 -203
  31. package/dist/display.cjs.map +1 -1
  32. package/dist/display.d.cts +6 -229
  33. package/dist/display.d.ts +6 -229
  34. package/dist/display.js +1539 -206
  35. package/dist/display.js.map +1 -1
  36. package/dist/forms.cjs +139 -46
  37. package/dist/forms.cjs.map +1 -1
  38. package/dist/forms.d.cts +2 -2
  39. package/dist/forms.d.ts +2 -2
  40. package/dist/forms.js +139 -46
  41. package/dist/forms.js.map +1 -1
  42. package/dist/host.cjs +822 -0
  43. package/dist/host.cjs.map +1 -0
  44. package/dist/host.d.cts +287 -0
  45. package/dist/host.d.ts +287 -0
  46. package/dist/host.js +794 -0
  47. package/dist/host.js.map +1 -0
  48. package/dist/{index-CwXVgtGb.d.cts → index-BadRcCbm.d.cts} +28 -11
  49. package/dist/{index-CwXVgtGb.d.ts → index-BadRcCbm.d.ts} +28 -11
  50. package/dist/index.cjs +2202 -247
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +42 -8
  53. package/dist/index.d.ts +42 -8
  54. package/dist/index.js +2167 -251
  55. package/dist/index.js.map +1 -1
  56. package/dist/input.d.cts +2 -2
  57. package/dist/input.d.ts +2 -2
  58. package/dist/media.cjs +190 -2
  59. package/dist/media.cjs.map +1 -1
  60. package/dist/media.d.cts +1 -1
  61. package/dist/media.d.ts +1 -1
  62. package/dist/media.js +190 -2
  63. package/dist/media.js.map +1 -1
  64. package/dist/preact/artifacts.js +190 -2
  65. package/dist/preact/artifacts.js.map +1 -1
  66. package/dist/preact/confirmation.d.ts +321 -1
  67. package/dist/preact/confirmation.js +629 -4
  68. package/dist/preact/confirmation.js.map +1 -1
  69. package/dist/preact/display.d.ts +570 -31
  70. package/dist/preact/display.js +1248 -126
  71. package/dist/preact/display.js.map +1 -1
  72. package/dist/preact/forms.d.ts +32 -15
  73. package/dist/preact/forms.js +139 -46
  74. package/dist/preact/forms.js.map +1 -1
  75. package/dist/preact/host.d.ts +307 -0
  76. package/dist/preact/host.js +875 -0
  77. package/dist/preact/host.js.map +1 -0
  78. package/dist/preact/media.d.ts +37 -1
  79. package/dist/preact/media.js +423 -0
  80. package/dist/preact/media.js.map +1 -1
  81. package/dist/preact/progress.d.ts +92 -1
  82. package/dist/preact/progress.js +469 -3
  83. package/dist/preact/progress.js.map +1 -1
  84. package/dist/progress.cjs +525 -2
  85. package/dist/progress.cjs.map +1 -1
  86. package/dist/progress.d.cts +2 -1
  87. package/dist/progress.d.ts +2 -1
  88. package/dist/progress.js +522 -3
  89. package/dist/progress.js.map +1 -1
  90. package/dist/react/artifacts.cjs +190 -2
  91. package/dist/react/artifacts.cjs.map +1 -1
  92. package/dist/react/artifacts.js +190 -2
  93. package/dist/react/artifacts.js.map +1 -1
  94. package/dist/react/confirmation.cjs +630 -2
  95. package/dist/react/confirmation.cjs.map +1 -1
  96. package/dist/react/confirmation.d.cts +3 -3
  97. package/dist/react/confirmation.d.ts +3 -3
  98. package/dist/react/confirmation.js +629 -4
  99. package/dist/react/confirmation.js.map +1 -1
  100. package/dist/react/display.cjs +1137 -123
  101. package/dist/react/display.cjs.map +1 -1
  102. package/dist/react/display.d.cts +42 -14
  103. package/dist/react/display.d.ts +42 -14
  104. package/dist/react/display.js +1122 -126
  105. package/dist/react/display.js.map +1 -1
  106. package/dist/react/forms.cjs +139 -46
  107. package/dist/react/forms.cjs.map +1 -1
  108. package/dist/react/forms.d.cts +1 -1
  109. package/dist/react/forms.d.ts +1 -1
  110. package/dist/react/forms.js +139 -46
  111. package/dist/react/forms.js.map +1 -1
  112. package/dist/react/host.cjs +910 -0
  113. package/dist/react/host.cjs.map +1 -0
  114. package/dist/react/host.d.cts +24 -0
  115. package/dist/react/host.d.ts +24 -0
  116. package/dist/react/host.js +875 -0
  117. package/dist/react/host.js.map +1 -0
  118. package/dist/react/input.d.cts +1 -1
  119. package/dist/react/input.d.ts +1 -1
  120. package/dist/react/media.cjs +426 -0
  121. package/dist/react/media.cjs.map +1 -1
  122. package/dist/react/media.d.cts +19 -1
  123. package/dist/react/media.d.ts +19 -1
  124. package/dist/react/media.js +423 -0
  125. package/dist/react/media.js.map +1 -1
  126. package/dist/react/progress.cjs +471 -2
  127. package/dist/react/progress.cjs.map +1 -1
  128. package/dist/react/progress.d.cts +1 -1
  129. package/dist/react/progress.d.ts +1 -1
  130. package/dist/react/progress.js +469 -3
  131. package/dist/react/progress.js.map +1 -1
  132. package/dist/server/resource.cjs +151 -0
  133. package/dist/server/resource.cjs.map +1 -0
  134. package/dist/server/resource.d.cts +90 -0
  135. package/dist/server/resource.d.ts +90 -0
  136. package/dist/server/resource.js +147 -0
  137. package/dist/server/resource.js.map +1 -0
  138. package/dist/server.cjs +1100 -25
  139. package/dist/server.cjs.map +1 -1
  140. package/dist/server.d.cts +84 -5
  141. package/dist/server.d.ts +84 -5
  142. package/dist/server.js +1087 -27
  143. package/dist/server.js.map +1 -1
  144. package/dist/tokens.cjs +73 -22
  145. package/dist/tokens.cjs.map +1 -1
  146. package/dist/tokens.d.cts +23 -3
  147. package/dist/tokens.d.ts +23 -3
  148. package/dist/tokens.js +73 -22
  149. package/dist/tokens.js.map +1 -1
  150. package/package.json +250 -231
  151. package/registry.yaml +51 -2
  152. package/dist/Alert.schema-LPJE5gFP.d.cts +0 -71
  153. package/dist/Alert.schema-LPJE5gFP.d.ts +0 -71
  154. package/dist/ProgressBar.schema-CdVYx0Wq.d.cts +0 -22
  155. package/dist/ProgressBar.schema-CdVYx0Wq.d.ts +0 -22
  156. package/dist/{ConfirmDialog-B3CQQGmJ.d.cts → ConfirmDialog-BCtOcmHe.d.cts} +1 -1
  157. package/dist/{ConfirmDialog-B3CQQGmJ.d.ts → ConfirmDialog-BCtOcmHe.d.ts} +1 -1
@@ -3,6 +3,7 @@ import { ComponentChildren, h } from 'preact';
3
3
  import { z } from 'zod';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode } from 'react';
6
+ export { StatusBadge, StatusBadgeProps, StatusBadgePropsSchema, validateStatusBadgeProps } from './media.js';
6
7
  import { Observable } from 'rxjs';
7
8
 
8
9
  /**
@@ -31,8 +32,8 @@ declare const EmptyStatePropsSchema: z.ZodObject<{
31
32
  }>>;
32
33
  locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
33
34
  }, "strip", z.ZodTypeAny, {
34
- title: string;
35
35
  locale: "en" | "fr";
36
+ title: string;
36
37
  description?: string | undefined;
37
38
  action?: {
38
39
  label: string;
@@ -40,12 +41,12 @@ declare const EmptyStatePropsSchema: z.ZodObject<{
40
41
  } | undefined;
41
42
  }, {
42
43
  title: string;
44
+ locale?: "en" | "fr" | undefined;
43
45
  description?: string | undefined;
44
46
  action?: {
45
47
  label: string;
46
48
  variant?: "primary" | "secondary" | undefined;
47
49
  } | undefined;
48
- locale?: "en" | "fr" | undefined;
49
50
  }>;
50
51
  type EmptyStatePropsSchemaOutput = z.output<typeof EmptyStatePropsSchema>;
51
52
  /**
@@ -123,16 +124,16 @@ declare const SkeletonPropsSchema: z.ZodObject<{
123
124
  animation: z.ZodDefault<z.ZodEnum<["pulse", "wave", "none"]>>;
124
125
  locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
125
126
  }, "strip", z.ZodTypeAny, {
126
- variant: "circle" | "rect" | "text";
127
127
  locale: "en" | "fr";
128
+ variant: "rect" | "circle" | "text";
128
129
  count: number;
129
130
  animation: "none" | "pulse" | "wave";
130
131
  width?: string | number | undefined;
131
132
  height?: string | number | undefined;
132
133
  }, {
133
- variant?: "circle" | "rect" | "text" | undefined;
134
134
  locale?: "en" | "fr" | undefined;
135
135
  width?: string | number | undefined;
136
+ variant?: "rect" | "circle" | "text" | undefined;
136
137
  height?: string | number | undefined;
137
138
  count?: number | undefined;
138
139
  animation?: "none" | "pulse" | "wave" | undefined;
@@ -240,42 +241,77 @@ declare function validateVirtualListProps(raw: unknown): VirtualListPropsSchemaO
240
241
  declare function VirtualList<T = unknown>(props: VirtualListProps<T>): react_jsx_runtime.JSX.Element;
241
242
 
242
243
  /**
243
- * StatusBadge — cross-runtime status indicator badge (Preact 10 implementation).
244
+ * Badge — cross-runtime generic visual label primitive (Preact 10 implementation).
244
245
  *
245
246
  * Accepts `Record<string, unknown>` for MCP postMessage injection safety.
246
247
  * Zod validation narrows before render. Invalid props → accessible error span.
247
248
  *
248
249
  * WCAG-AA:
249
- * - `<output>` has implicit role="status" per ARIA spec §5.3.17
250
- * - aria-label from `label` prop (falls back to `status` string)
250
+ * - `<span>` with explicit aria-label combining Badge label + locale
251
+ * - Optional dot indicator is aria-hidden (decorative)
252
+ * - Optional count is aria-hidden (included in aria-label via label string)
251
253
  * - `lang` attribute set to locale for correct AT language announcement
252
254
  *
255
+ * Badge vs StatusBadge: Badge is the generic visual label primitive (variant + optional
256
+ * dot/count); StatusBadge is the status-specific semantic one using <output>.
257
+ *
253
258
  * Bilingue: EN/FR strings resolved via t() from i18n/strings — no hardcoded literals.
259
+ * Target: 0.3.2 patch release.
254
260
  */
255
- declare function StatusBadge(raw: Record<string, unknown>): preact.JSX.Element;
261
+ declare function Badge(raw: Record<string, unknown>): preact.JSX.Element;
256
262
 
257
- declare const StatusBadgePropsSchema: z.ZodObject<{
258
- status: z.ZodString;
259
- variant: z.ZodDefault<z.ZodEnum<["success", "warning", "danger", "info", "neutral"]>>;
260
- label: z.ZodOptional<z.ZodString>;
261
- locale: z.ZodEnum<["en", "fr"]>;
263
+ declare const BadgePropsSchema: z.ZodObject<{
264
+ label: z.ZodString;
265
+ variant: z.ZodDefault<z.ZodEnum<["default", "primary", "success", "warning", "danger", "info", "neutral"]>>;
266
+ dot: z.ZodOptional<z.ZodBoolean>;
267
+ count: z.ZodOptional<z.ZodNumber>;
268
+ locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
262
269
  }, "strip", z.ZodTypeAny, {
263
- variant: "success" | "warning" | "danger" | "info" | "neutral";
264
- status: string;
270
+ label: string;
271
+ variant: "primary" | "default" | "success" | "warning" | "danger" | "info" | "neutral";
265
272
  locale: "en" | "fr";
266
- label?: string | undefined;
273
+ count?: number | undefined;
274
+ dot?: boolean | undefined;
267
275
  }, {
268
- status: string;
269
- locale: "en" | "fr";
270
- label?: string | undefined;
271
- variant?: "success" | "warning" | "danger" | "info" | "neutral" | undefined;
276
+ label: string;
277
+ variant?: "primary" | "default" | "success" | "warning" | "danger" | "info" | "neutral" | undefined;
278
+ locale?: "en" | "fr" | undefined;
279
+ count?: number | undefined;
280
+ dot?: boolean | undefined;
272
281
  }>;
273
- type StatusBadgeProps = z.infer<typeof StatusBadgePropsSchema>;
274
- declare function validateProps(raw: unknown): StatusBadgeProps;
282
+ type BadgeProps = z.infer<typeof BadgePropsSchema>;
283
+ declare function validateBadgeProps(raw: unknown): BadgeProps;
284
+
285
+ /**
286
+ * TableView pure logic (R01 / R10): sorting, selection and cell-kind rules. No React, no DOM.
287
+ * Shared by the React and Preact runtimes through the shared TableView implementation.
288
+ */
289
+ type SortDirection = "asc" | "desc";
290
+ interface SortState {
291
+ key: string;
292
+ direction: SortDirection;
293
+ }
294
+ /** How a column's cells are compared and rendered. */
295
+ type ColumnKind = "text" | "number" | "amount" | "icon";
296
+ type SelectionMode = "none" | "single" | "multiple";
297
+ /**
298
+ * Exact comparison of decimal strings (token amounts): no Number() round trip, so values
299
+ * beyond 2^53 or with 18 decimals compare correctly. Unparseable input compares as equal.
300
+ */
301
+ declare function compareDecimalStrings(a: string, b: string): number;
302
+ /** Stable sort; missing values last in both directions. Never mutates `items`. */
303
+ declare function sortItems<T>(items: readonly T[], getValue: (item: T) => unknown, kind: ColumnKind, direction: SortDirection, locale: string): T[];
304
+ /** Header click cycle on a column: none -> asc -> desc -> none; another column restarts at asc. */
305
+ declare function nextSort(current: SortState | undefined, key: string): SortState | undefined;
275
306
 
276
307
  type ColumnDef<TRow extends Record<string, unknown> = Record<string, unknown>> = {
277
308
  key: string;
278
309
  header: string;
310
+ type?: "text" | "number" | "amount" | "icon";
311
+ align?: "start" | "center" | "end";
312
+ width?: string | number;
313
+ sortable?: boolean;
314
+ sensitive?: boolean;
279
315
  render?: (row: TRow) => ReactNode;
280
316
  };
281
317
  /**
@@ -287,34 +323,128 @@ declare const TableViewPropsSchema: z.ZodObject<{
287
323
  columns: z.ZodArray<z.ZodObject<{
288
324
  key: z.ZodString;
289
325
  header: z.ZodString;
326
+ /** Cell kind: drives comparison and rendering. `amount` = decimal STRING, never a float. */
327
+ type: z.ZodDefault<z.ZodEnum<["text", "number", "amount", "icon"]>>;
328
+ /** Defaults to `end` for `number` / `amount` columns, `start` otherwise. */
329
+ align: z.ZodOptional<z.ZodEnum<["start", "center", "end"]>>;
330
+ /** CSS width: a number is pixels. */
331
+ width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
332
+ sortable: z.ZodDefault<z.ZodBoolean>;
333
+ /**
334
+ * Values of this column are masked in the A-1 markdown fallback and kept out of the HTML
335
+ * props of a tool result (delivered via the result `_meta`), never written to `content[]`.
336
+ */
337
+ sensitive: z.ZodDefault<z.ZodBoolean>;
290
338
  }, "strip", z.ZodTypeAny, {
339
+ type: "number" | "icon" | "text" | "amount";
291
340
  header: string;
292
341
  key: string;
342
+ sortable: boolean;
343
+ sensitive: boolean;
344
+ width?: string | number | undefined;
345
+ align?: "start" | "center" | "end" | undefined;
293
346
  }, {
294
347
  header: string;
295
348
  key: string;
349
+ type?: "number" | "icon" | "text" | "amount" | undefined;
350
+ width?: string | number | undefined;
351
+ align?: "start" | "center" | "end" | undefined;
352
+ sortable?: boolean | undefined;
353
+ sensitive?: boolean | undefined;
296
354
  }>, "many">;
355
+ /**
356
+ * Serialisable rows, for views built through `createMosaicResource` (the React props carry
357
+ * `rows` separately).
358
+ */
359
+ rows: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
297
360
  virtualizeThreshold: z.ZodDefault<z.ZodNumber>;
298
361
  ariaLabel: z.ZodString;
299
362
  locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
363
+ selectionMode: z.ZodDefault<z.ZodEnum<["none", "single", "multiple"]>>;
364
+ /** Initial sort. */
365
+ sort: z.ZodOptional<z.ZodObject<{
366
+ key: z.ZodString;
367
+ direction: z.ZodEnum<["asc", "desc"]>;
368
+ }, "strip", z.ZodTypeAny, {
369
+ key: string;
370
+ direction: "desc" | "asc";
371
+ }, {
372
+ key: string;
373
+ direction: "desc" | "asc";
374
+ }>>;
375
+ stickyHeader: z.ZodDefault<z.ZodBoolean>;
376
+ /** Scroll region height when `stickyHeader` is on (pixels). */
377
+ maxHeight: z.ZodDefault<z.ZodNumber>;
378
+ density: z.ZodDefault<z.ZodEnum<["comfortable", "compact"]>>;
379
+ loading: z.ZodDefault<z.ZodBoolean>;
300
380
  }, "strip", z.ZodTypeAny, {
301
381
  locale: "en" | "fr";
302
382
  columns: {
383
+ type: "number" | "icon" | "text" | "amount";
303
384
  header: string;
304
385
  key: string;
386
+ sortable: boolean;
387
+ sensitive: boolean;
388
+ width?: string | number | undefined;
389
+ align?: "start" | "center" | "end" | undefined;
305
390
  }[];
391
+ maxHeight: number;
392
+ rows: Record<string, unknown>[];
306
393
  virtualizeThreshold: number;
307
394
  ariaLabel: string;
395
+ selectionMode: "none" | "single" | "multiple";
396
+ stickyHeader: boolean;
397
+ density: "comfortable" | "compact";
398
+ loading: boolean;
399
+ sort?: {
400
+ key: string;
401
+ direction: "desc" | "asc";
402
+ } | undefined;
308
403
  }, {
309
404
  columns: {
310
405
  header: string;
311
406
  key: string;
407
+ type?: "number" | "icon" | "text" | "amount" | undefined;
408
+ width?: string | number | undefined;
409
+ align?: "start" | "center" | "end" | undefined;
410
+ sortable?: boolean | undefined;
411
+ sensitive?: boolean | undefined;
312
412
  }[];
313
413
  ariaLabel: string;
414
+ sort?: {
415
+ key: string;
416
+ direction: "desc" | "asc";
417
+ } | undefined;
314
418
  locale?: "en" | "fr" | undefined;
419
+ maxHeight?: number | undefined;
420
+ rows?: Record<string, unknown>[] | undefined;
315
421
  virtualizeThreshold?: number | undefined;
422
+ selectionMode?: "none" | "single" | "multiple" | undefined;
423
+ stickyHeader?: boolean | undefined;
424
+ density?: "comfortable" | "compact" | undefined;
425
+ loading?: boolean | undefined;
316
426
  }>;
317
427
  type TableViewPropsSchemaOutput = z.output<typeof TableViewPropsSchema>;
428
+ /** Options shared by the static and streaming variants (R01 / R10 extension). */
429
+ type TableViewOptions<TRow extends Record<string, unknown>> = {
430
+ /** `none` (default) adds no selection column. `single` renders radios, `multiple` checkboxes. */
431
+ selectionMode?: SelectionMode;
432
+ /** Controlled selection: row keys (`id` when present, else `row-<original index>`). */
433
+ selectedKeys?: string[];
434
+ defaultSelectedKeys?: string[];
435
+ /** Selected rows in table order, plus their keys. Feed it to `selectionModelContext`. */
436
+ onSelectionChange?: (rows: Partial<TRow>[], keys: string[]) => void;
437
+ /** Controlled sort; `null` = unsorted. */
438
+ sort?: SortState | null;
439
+ defaultSort?: SortState;
440
+ onSortChange?: (sort: SortState | undefined) => void;
441
+ stickyHeader?: boolean;
442
+ /** Scroll region height in pixels when `stickyHeader` is on. Default 400. */
443
+ maxHeight?: number;
444
+ density?: "comfortable" | "compact";
445
+ /** Shows a Skeleton table instead of rows. */
446
+ loading?: boolean;
447
+ };
318
448
  /**
319
449
  * Props for the static TableView — accepts a plain array of rows.
320
450
  * Primary API for already-fetched data (no rxjs required).
@@ -327,7 +457,7 @@ type TableViewProps<TRow extends Record<string, unknown> = Record<string, unknow
327
457
  locale?: "en" | "fr";
328
458
  /** v0.2.1+: when provided, rows become keyboard-activable (role=button + tabIndex=0 + Enter/Space). 5-BU ABSOLUTE blocker fix. */
329
459
  onRowClick?: (row: TRow, index: number) => void;
330
- };
460
+ } & TableViewOptions<TRow>;
331
461
  /**
332
462
  * Props for StreamingTableView — accepts an RxJS Observable for incremental row appending.
333
463
  * Consumers using this variant MUST install rxjs ^7.8.0 in their project.
@@ -340,28 +470,437 @@ type StreamingTableViewProps<TRow extends Record<string, unknown> = Record<strin
340
470
  locale?: "en" | "fr";
341
471
  /** v0.2.1+: same semantics as static TableView. */
342
472
  onRowClick?: (row: TRow, index: number) => void;
343
- };
473
+ } & TableViewOptions<TRow>;
344
474
  declare function validateTableViewProps(raw: unknown): TableViewPropsSchemaOutput;
345
475
 
476
+ type AnyRow = Record<string, unknown>;
346
477
  /**
347
478
  * TableView — Static rows variant (primary API).
348
479
  *
349
480
  * Accepts `rows: Row[]` for already-fetched data — no rxjs required.
350
481
  * Activates TanStack Virtual v3 windowing when rows.length > virtualizeThreshold.
351
482
  * Zod-validates serialisable props; renders role="alert" fallback on failure.
352
- * Fully accessible: aria-rowcount, aria-label, scope="col".
483
+ * Fully accessible: aria-rowcount, aria-label, scope="col", aria-sort on sortable headers.
484
+ *
485
+ * R01 / R10 extension (additive, every new prop optional): sortable columns, single / multiple
486
+ * selection, sticky header, compact density, column align / width, `amount` and `icon` cell kinds
487
+ * and a Skeleton loading state. Claude inline cards want few rows and no nested scrolling:
488
+ * keep inline summaries short and offer fullscreen for the full set.
353
489
  */
354
- declare function TableView<TRow extends Record<string, unknown> = Record<string, unknown>>(props: TableViewProps<TRow>): react_jsx_runtime.JSX.Element;
490
+ declare function TableView<TRow extends AnyRow = AnyRow>(props: TableViewProps<TRow>): react_jsx_runtime.JSX.Element;
355
491
  /**
356
492
  * StreamingTableView — Streaming rows variant (advanced, opt-in).
357
493
  *
358
494
  * Pattern 4 Streaming Hydration reference implementation.
359
495
  * Consumes an RxJS Observable<Row[]> for incremental row appending.
360
496
  * Consumers MUST install rxjs ^7.8.0 in their project.
361
- * Activates TanStack Virtual v3 windowing when rows.length > virtualizeThreshold.
362
- * Zod-validates serialisable props; renders role="alert" fallback on failure.
363
- * Fully accessible: aria-rowcount, aria-label, scope="col".
497
+ * Same extension props as TableView.
498
+ */
499
+ declare function StreamingTableView<TRow extends AnyRow = AnyRow>(props: StreamingTableViewProps<TRow>): react_jsx_runtime.JSX.Element;
500
+
501
+ /**
502
+ * StatCard (R08): one metric — label, value, optional trend and change.
503
+ *
504
+ * Every field has a default so `{}` parses: a ChatGPT global entrypoint opens with empty
505
+ * arguments (openai/mcp-extensions docs/spec.md, entrypoints) and the view then shows an empty
506
+ * state instead of failing. `value` is a STRING (a decimal string for money, never a float).
507
+ * Claude inline cards count each stat toward the "4-5 data points" cap: keep few per card.
508
+ */
509
+ declare const StatCardPropsSchema: z.ZodObject<{
510
+ label: z.ZodDefault<z.ZodString>;
511
+ value: z.ZodDefault<z.ZodString>;
512
+ unit: z.ZodOptional<z.ZodString>;
513
+ trend: z.ZodOptional<z.ZodEnum<["up", "down", "flat"]>>;
514
+ /** Pre-formatted change, e.g. "+4.2%". */
515
+ change: z.ZodOptional<z.ZodString>;
516
+ tone: z.ZodDefault<z.ZodEnum<["neutral", "success", "warning", "danger"]>>;
517
+ description: z.ZodOptional<z.ZodString>;
518
+ loading: z.ZodDefault<z.ZodBoolean>;
519
+ locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ label: string;
522
+ value: string;
523
+ locale: "en" | "fr";
524
+ loading: boolean;
525
+ tone: "success" | "warning" | "danger" | "neutral";
526
+ description?: string | undefined;
527
+ unit?: string | undefined;
528
+ trend?: "flat" | "up" | "down" | undefined;
529
+ change?: string | undefined;
530
+ }, {
531
+ description?: string | undefined;
532
+ label?: string | undefined;
533
+ value?: string | undefined;
534
+ locale?: "en" | "fr" | undefined;
535
+ loading?: boolean | undefined;
536
+ unit?: string | undefined;
537
+ trend?: "flat" | "up" | "down" | undefined;
538
+ change?: string | undefined;
539
+ tone?: "success" | "warning" | "danger" | "neutral" | undefined;
540
+ }>;
541
+ type StatCardProps = z.input<typeof StatCardPropsSchema>;
542
+ type StatCardPropsOutput = z.output<typeof StatCardPropsSchema>;
543
+ declare function validateStatCardProps(raw: unknown): StatCardPropsOutput;
544
+
545
+ /**
546
+ * StatCard — one KPI: label, value, optional unit, trend (word + arrow, never colour alone) and
547
+ * change. Skeleton while `loading`; an empty state for `{}` (ChatGPT entrypoint default).
548
+ * WCAG-AA: a labelled region; the trend is stated in text.
549
+ */
550
+ declare function StatCard(raw: StatCardProps): react_jsx_runtime.JSX.Element;
551
+
552
+ /**
553
+ * BalanceCard (R09): a wallet balance for the Fuse server views.
554
+ *
555
+ * Source shape: fuse-mcp-server `src/tools/getBalance.ts` returns `{ address, token,
556
+ * tokenAddress?, decimals, balanceRaw?, balanceWei?, balanceFormatted }`. `balance` is the
557
+ * `balanceFormatted` DECIMAL STRING — shown as given, never routed through a float. Read-only.
558
+ * `{}` parses (ChatGPT entrypoint default).
559
+ */
560
+ declare const BalanceCardPropsSchema: z.ZodObject<{
561
+ token: z.ZodDefault<z.ZodString>;
562
+ balance: z.ZodDefault<z.ZodString>;
563
+ address: z.ZodDefault<z.ZodString>;
564
+ tokenAddress: z.ZodOptional<z.ZodString>;
565
+ decimals: z.ZodOptional<z.ZodNumber>;
566
+ network: z.ZodOptional<z.ZodString>;
567
+ testnet: z.ZodDefault<z.ZodBoolean>;
568
+ /** Decimal string in `currency`. */
569
+ usdValue: z.ZodOptional<z.ZodString>;
570
+ currency: z.ZodDefault<z.ZodString>;
571
+ loading: z.ZodDefault<z.ZodBoolean>;
572
+ locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
573
+ }, "strip", z.ZodTypeAny, {
574
+ locale: "en" | "fr";
575
+ address: string;
576
+ loading: boolean;
577
+ currency: string;
578
+ token: string;
579
+ balance: string;
580
+ testnet: boolean;
581
+ tokenAddress?: string | undefined;
582
+ decimals?: number | undefined;
583
+ network?: string | undefined;
584
+ usdValue?: string | undefined;
585
+ }, {
586
+ locale?: "en" | "fr" | undefined;
587
+ address?: string | undefined;
588
+ loading?: boolean | undefined;
589
+ currency?: string | undefined;
590
+ token?: string | undefined;
591
+ balance?: string | undefined;
592
+ tokenAddress?: string | undefined;
593
+ decimals?: number | undefined;
594
+ network?: string | undefined;
595
+ testnet?: boolean | undefined;
596
+ usdValue?: string | undefined;
597
+ }>;
598
+ type BalanceCardProps = z.input<typeof BalanceCardPropsSchema>;
599
+ type BalanceCardPropsOutput = z.output<typeof BalanceCardPropsSchema>;
600
+ declare function validateBalanceCardProps(raw: unknown): BalanceCardPropsOutput;
601
+
602
+ /**
603
+ * BalanceCard — composition of {@link StatCard} (amount + token) with the network badge, a
604
+ * testnet badge, the truncated address (full address in `title`) and, when the sandbox exposes
605
+ * the async clipboard, a copy button. Read-only; no wallet action.
606
+ */
607
+ declare function BalanceCard(raw: BalanceCardProps): react_jsx_runtime.JSX.Element;
608
+
609
+ declare const FeedMessageSchema: z.ZodObject<{
610
+ id: z.ZodOptional<z.ZodString>;
611
+ sender: z.ZodString;
612
+ channel: z.ZodOptional<z.ZodString>;
613
+ /** Plain text. Rendered as text, never as HTML. */
614
+ content: z.ZodString;
615
+ /** ISO 8601. */
616
+ timestamp: z.ZodString;
617
+ attachmentUrl: z.ZodOptional<z.ZodString>;
618
+ attachmentLabel: z.ZodOptional<z.ZodString>;
619
+ unread: z.ZodOptional<z.ZodBoolean>;
620
+ }, "strip", z.ZodTypeAny, {
621
+ content: string;
622
+ sender: string;
623
+ timestamp: string;
624
+ id?: string | undefined;
625
+ channel?: string | undefined;
626
+ attachmentUrl?: string | undefined;
627
+ attachmentLabel?: string | undefined;
628
+ unread?: boolean | undefined;
629
+ }, {
630
+ content: string;
631
+ sender: string;
632
+ timestamp: string;
633
+ id?: string | undefined;
634
+ channel?: string | undefined;
635
+ attachmentUrl?: string | undefined;
636
+ attachmentLabel?: string | undefined;
637
+ unread?: boolean | undefined;
638
+ }>;
639
+ type FeedMessage = z.infer<typeof FeedMessageSchema>;
640
+ /**
641
+ * MessageFeed (R03): VantagePeers messages as a READ-ONLY feed — not a chat input (Claude's
642
+ * design guidelines list chat inputs under patterns to avoid; the host composer exists).
643
+ * Messages are ordered oldest first; `maxItems` keeps the latest N (Claude inline: last few).
644
+ * `{}` parses (ChatGPT entrypoint default).
645
+ */
646
+ declare const MessageFeedPropsSchema: z.ZodObject<{
647
+ messages: z.ZodDefault<z.ZodArray<z.ZodObject<{
648
+ id: z.ZodOptional<z.ZodString>;
649
+ sender: z.ZodString;
650
+ channel: z.ZodOptional<z.ZodString>;
651
+ /** Plain text. Rendered as text, never as HTML. */
652
+ content: z.ZodString;
653
+ /** ISO 8601. */
654
+ timestamp: z.ZodString;
655
+ attachmentUrl: z.ZodOptional<z.ZodString>;
656
+ attachmentLabel: z.ZodOptional<z.ZodString>;
657
+ unread: z.ZodOptional<z.ZodBoolean>;
658
+ }, "strip", z.ZodTypeAny, {
659
+ content: string;
660
+ sender: string;
661
+ timestamp: string;
662
+ id?: string | undefined;
663
+ channel?: string | undefined;
664
+ attachmentUrl?: string | undefined;
665
+ attachmentLabel?: string | undefined;
666
+ unread?: boolean | undefined;
667
+ }, {
668
+ content: string;
669
+ sender: string;
670
+ timestamp: string;
671
+ id?: string | undefined;
672
+ channel?: string | undefined;
673
+ attachmentUrl?: string | undefined;
674
+ attachmentLabel?: string | undefined;
675
+ unread?: boolean | undefined;
676
+ }>, "many">>;
677
+ maxItems: z.ZodOptional<z.ZodNumber>;
678
+ /** IANA timezone for timestamps (e.g. `hostContext.timeZone`). */
679
+ timeZone: z.ZodOptional<z.ZodString>;
680
+ /** Above this many shown messages the feed is virtualised through VirtualList. */
681
+ virtualizeThreshold: z.ZodDefault<z.ZodNumber>;
682
+ loading: z.ZodDefault<z.ZodBoolean>;
683
+ locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
684
+ }, "strip", z.ZodTypeAny, {
685
+ locale: "en" | "fr";
686
+ virtualizeThreshold: number;
687
+ loading: boolean;
688
+ messages: {
689
+ content: string;
690
+ sender: string;
691
+ timestamp: string;
692
+ id?: string | undefined;
693
+ channel?: string | undefined;
694
+ attachmentUrl?: string | undefined;
695
+ attachmentLabel?: string | undefined;
696
+ unread?: boolean | undefined;
697
+ }[];
698
+ timeZone?: string | undefined;
699
+ maxItems?: number | undefined;
700
+ }, {
701
+ locale?: "en" | "fr" | undefined;
702
+ virtualizeThreshold?: number | undefined;
703
+ loading?: boolean | undefined;
704
+ timeZone?: string | undefined;
705
+ messages?: {
706
+ content: string;
707
+ sender: string;
708
+ timestamp: string;
709
+ id?: string | undefined;
710
+ channel?: string | undefined;
711
+ attachmentUrl?: string | undefined;
712
+ attachmentLabel?: string | undefined;
713
+ unread?: boolean | undefined;
714
+ }[] | undefined;
715
+ maxItems?: number | undefined;
716
+ }>;
717
+ type MessageFeedProps = z.input<typeof MessageFeedPropsSchema>;
718
+ type MessageFeedPropsOutput = z.output<typeof MessageFeedPropsSchema>;
719
+ declare function validateMessageFeedProps(raw: unknown): MessageFeedPropsOutput;
720
+
721
+ type MessageFeedViewProps = MessageFeedProps & {
722
+ /**
723
+ * Route attachment links through the host (`ui/open-link`, see `openLink` in ./host) —
724
+ * sandboxed views cannot navigate. Without it an http(s) attachment is a plain anchor.
725
+ */
726
+ onOpenLink?: (url: string) => void;
727
+ };
728
+ /**
729
+ * MessageFeed — read-only message feed (R03). Plain-text content, safe attachment links, the
730
+ * latest `maxItems` for inline cards, VirtualList above `virtualizeThreshold`. Not a chat input.
731
+ */
732
+ declare function MessageFeed(raw?: MessageFeedViewProps): react_jsx_runtime.JSX.Element;
733
+
734
+ declare const PipelineDealSchema: z.ZodObject<{
735
+ id: z.ZodString;
736
+ title: z.ZodString;
737
+ /** Decimal STRING (never a float), in the board currency. */
738
+ amount: z.ZodOptional<z.ZodString>;
739
+ contact: z.ZodOptional<z.ZodString>;
740
+ url: z.ZodOptional<z.ZodString>;
741
+ }, "strip", z.ZodTypeAny, {
742
+ title: string;
743
+ id: string;
744
+ amount?: string | undefined;
745
+ url?: string | undefined;
746
+ contact?: string | undefined;
747
+ }, {
748
+ title: string;
749
+ id: string;
750
+ amount?: string | undefined;
751
+ url?: string | undefined;
752
+ contact?: string | undefined;
753
+ }>;
754
+ declare const PipelineStageSchema: z.ZodObject<{
755
+ id: z.ZodString;
756
+ name: z.ZodString;
757
+ deals: z.ZodDefault<z.ZodArray<z.ZodObject<{
758
+ id: z.ZodString;
759
+ title: z.ZodString;
760
+ /** Decimal STRING (never a float), in the board currency. */
761
+ amount: z.ZodOptional<z.ZodString>;
762
+ contact: z.ZodOptional<z.ZodString>;
763
+ url: z.ZodOptional<z.ZodString>;
764
+ }, "strip", z.ZodTypeAny, {
765
+ title: string;
766
+ id: string;
767
+ amount?: string | undefined;
768
+ url?: string | undefined;
769
+ contact?: string | undefined;
770
+ }, {
771
+ title: string;
772
+ id: string;
773
+ amount?: string | undefined;
774
+ url?: string | undefined;
775
+ contact?: string | undefined;
776
+ }>, "many">>;
777
+ }, "strip", z.ZodTypeAny, {
778
+ id: string;
779
+ name: string;
780
+ deals: {
781
+ title: string;
782
+ id: string;
783
+ amount?: string | undefined;
784
+ url?: string | undefined;
785
+ contact?: string | undefined;
786
+ }[];
787
+ }, {
788
+ id: string;
789
+ name: string;
790
+ deals?: {
791
+ title: string;
792
+ id: string;
793
+ amount?: string | undefined;
794
+ url?: string | undefined;
795
+ contact?: string | undefined;
796
+ }[] | undefined;
797
+ }>;
798
+ type PipelineDeal = z.infer<typeof PipelineDealSchema>;
799
+ type PipelineStage = z.infer<typeof PipelineStageSchema>;
800
+ /**
801
+ * PipelineBoard (R06): deals by stage, READ-ONLY (no drag, no stage change), fullscreen-first.
802
+ * `layout: "board"` is the fullscreen columns view; `"summary"` is the inline stage-totals card
803
+ * (see `layoutForDisplayMode`). `{}` parses: ChatGPT opens entrypoints fullscreen with empty
804
+ * arguments (openai/mcp-extensions docs/spec.md).
805
+ */
806
+ declare const PipelineBoardPropsSchema: z.ZodObject<{
807
+ stages: z.ZodDefault<z.ZodArray<z.ZodObject<{
808
+ id: z.ZodString;
809
+ name: z.ZodString;
810
+ deals: z.ZodDefault<z.ZodArray<z.ZodObject<{
811
+ id: z.ZodString;
812
+ title: z.ZodString;
813
+ /** Decimal STRING (never a float), in the board currency. */
814
+ amount: z.ZodOptional<z.ZodString>;
815
+ contact: z.ZodOptional<z.ZodString>;
816
+ url: z.ZodOptional<z.ZodString>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ title: string;
819
+ id: string;
820
+ amount?: string | undefined;
821
+ url?: string | undefined;
822
+ contact?: string | undefined;
823
+ }, {
824
+ title: string;
825
+ id: string;
826
+ amount?: string | undefined;
827
+ url?: string | undefined;
828
+ contact?: string | undefined;
829
+ }>, "many">>;
830
+ }, "strip", z.ZodTypeAny, {
831
+ id: string;
832
+ name: string;
833
+ deals: {
834
+ title: string;
835
+ id: string;
836
+ amount?: string | undefined;
837
+ url?: string | undefined;
838
+ contact?: string | undefined;
839
+ }[];
840
+ }, {
841
+ id: string;
842
+ name: string;
843
+ deals?: {
844
+ title: string;
845
+ id: string;
846
+ amount?: string | undefined;
847
+ url?: string | undefined;
848
+ contact?: string | undefined;
849
+ }[] | undefined;
850
+ }>, "many">>;
851
+ /** ISO 4217 code used to format amounts. */
852
+ currency: z.ZodDefault<z.ZodString>;
853
+ layout: z.ZodDefault<z.ZodEnum<["board", "summary"]>>;
854
+ loading: z.ZodDefault<z.ZodBoolean>;
855
+ locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
856
+ }, "strip", z.ZodTypeAny, {
857
+ locale: "en" | "fr";
858
+ loading: boolean;
859
+ currency: string;
860
+ stages: {
861
+ id: string;
862
+ name: string;
863
+ deals: {
864
+ title: string;
865
+ id: string;
866
+ amount?: string | undefined;
867
+ url?: string | undefined;
868
+ contact?: string | undefined;
869
+ }[];
870
+ }[];
871
+ layout: "summary" | "board";
872
+ }, {
873
+ locale?: "en" | "fr" | undefined;
874
+ loading?: boolean | undefined;
875
+ currency?: string | undefined;
876
+ stages?: {
877
+ id: string;
878
+ name: string;
879
+ deals?: {
880
+ title: string;
881
+ id: string;
882
+ amount?: string | undefined;
883
+ url?: string | undefined;
884
+ contact?: string | undefined;
885
+ }[] | undefined;
886
+ }[] | undefined;
887
+ layout?: "summary" | "board" | undefined;
888
+ }>;
889
+ type PipelineBoardProps = z.input<typeof PipelineBoardPropsSchema>;
890
+ type PipelineBoardPropsOutput = z.output<typeof PipelineBoardPropsSchema>;
891
+ declare function validatePipelineBoardProps(raw: unknown): PipelineBoardPropsOutput;
892
+
893
+ type PipelineBoardViewProps = PipelineBoardProps & {
894
+ /** Summary layout: ask the host for fullscreen (`requestDisplayMode` in ./host). */
895
+ onRequestFullscreen?: () => void;
896
+ /** Deal links go through the host (`ui/open-link`); without it deals with a url are plain text. */
897
+ onOpenLink?: (url: string) => void;
898
+ };
899
+ /**
900
+ * PipelineBoard — deals by stage, READ-ONLY. `board`: one labelled column per stage with stage
901
+ * filter chips (R25); `summary`: the inline stage-totals card. No drag-and-drop and no stage
902
+ * change (R07 deferred). Horizontal pan only; scroll padding honours the host safe-area insets.
364
903
  */
365
- declare function StreamingTableView<TRow extends Record<string, unknown> = Record<string, unknown>>(props: StreamingTableViewProps<TRow>): react_jsx_runtime.JSX.Element;
904
+ declare function PipelineBoard(raw?: PipelineBoardViewProps): react_jsx_runtime.JSX.Element;
366
905
 
367
- export { EmptyState, type EmptyStateProps, EmptyStatePropsSchema, Skeleton, type SkeletonProps, SkeletonPropsSchema, StatusBadge, type StatusBadgeProps, StatusBadgePropsSchema, StreamingTableView, type StreamingTableViewProps, TableView, type TableViewProps, TableViewPropsSchema, VirtualList, type VirtualListProps, VirtualListPropsSchema, resolveSkeletonDimensions, validateEmptyStateProps, validateSkeletonProps, validateProps as validateStatusBadgeProps, validateTableViewProps, validateVirtualListProps };
906
+ export { Badge, type BadgeProps, BadgePropsSchema, BalanceCard, type BalanceCardProps, type BalanceCardPropsOutput, BalanceCardPropsSchema, type ColumnDef, type ColumnKind, EmptyState, type EmptyStateProps, EmptyStatePropsSchema, type FeedMessage, MessageFeed, type MessageFeedProps, type MessageFeedPropsOutput, MessageFeedPropsSchema, type MessageFeedViewProps, PipelineBoard, type PipelineBoardProps, type PipelineBoardPropsOutput, PipelineBoardPropsSchema, type PipelineBoardViewProps, type PipelineDeal, type PipelineStage, type SelectionMode, Skeleton, type SkeletonProps, SkeletonPropsSchema, type SortDirection, type SortState, StatCard, type StatCardProps, type StatCardPropsOutput, StatCardPropsSchema, StreamingTableView, type StreamingTableViewProps, TableView, type TableViewOptions, type TableViewProps, TableViewPropsSchema, VirtualList, type VirtualListProps, VirtualListPropsSchema, compareDecimalStrings, nextSort, resolveSkeletonDimensions, sortItems, validateBadgeProps, validateBalanceCardProps, validateEmptyStateProps, validateMessageFeedProps, validatePipelineBoardProps, validateSkeletonProps, validateStatCardProps, validateTableViewProps, validateVirtualListProps };