@elabs-ai/components-ai 5.3.1 → 5.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 (115) hide show
  1. package/README.md +4 -6
  2. package/dist/_lazy-engine-boundary.js +1 -1
  3. package/dist/_persona-rive.js.map +1 -1
  4. package/dist/_streamdown-i18n.js +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/asset-preview.js +5 -5
  7. package/dist/attachments.js +1 -1
  8. package/dist/audio-player.js +1 -2
  9. package/dist/{chunk-7RL6KZDF.js → chunk-24M6XWVJ.js} +25 -17
  10. package/dist/chunk-24M6XWVJ.js.map +1 -0
  11. package/dist/{chunk-WU5BLGTF.js → chunk-3KXIWGHW.js} +3 -3
  12. package/dist/{chunk-TWPHAJNM.js → chunk-3UHR3RLZ.js} +12 -6
  13. package/dist/chunk-3UHR3RLZ.js.map +1 -0
  14. package/dist/{chunk-V4DORGWJ.js → chunk-5AMSNG2T.js} +2 -2
  15. package/dist/chunk-D7BZMRI3.js +2 -0
  16. package/dist/chunk-D7BZMRI3.js.map +1 -0
  17. package/dist/{chunk-PQBF6ZIQ.js → chunk-DI645WR4.js} +4 -4
  18. package/dist/{chunk-NCL2UZKI.js → chunk-FFA7OPEH.js} +2 -2
  19. package/dist/{chunk-34CQ2VHM.js → chunk-FO44KY7Y.js} +10 -7
  20. package/dist/chunk-FO44KY7Y.js.map +1 -0
  21. package/dist/{chunk-RB7G65JC.js → chunk-GP7ZZCID.js} +7 -5
  22. package/dist/chunk-GP7ZZCID.js.map +1 -0
  23. package/dist/{chunk-6PB2MXCI.js → chunk-HLODND65.js} +2 -2
  24. package/dist/{chunk-ADOYAGGK.js → chunk-IFVO7LQJ.js} +2 -2
  25. package/dist/{chunk-2XOIG5TG.js → chunk-JSEV46SH.js} +18 -12
  26. package/dist/chunk-JSEV46SH.js.map +1 -0
  27. package/dist/{chunk-CZP3RHC4.js → chunk-LY7O4BMP.js} +2 -2
  28. package/dist/{chunk-PTWCTSZL.js → chunk-OCZNA5SO.js} +4 -4
  29. package/dist/chunk-OCZNA5SO.js.map +1 -0
  30. package/dist/{chunk-S3ISPW3A.js → chunk-PWQPVOZJ.js} +1 -1
  31. package/dist/chunk-PWQPVOZJ.js.map +1 -0
  32. package/dist/chunk-RLV64EWK.js +41 -0
  33. package/dist/chunk-RLV64EWK.js.map +1 -0
  34. package/dist/chunk-SSES3F4Q.js +126 -0
  35. package/dist/chunk-SSES3F4Q.js.map +1 -0
  36. package/dist/{chunk-3XNPMDZY.js → chunk-TBCMCF5O.js} +9 -56
  37. package/dist/chunk-TBCMCF5O.js.map +1 -0
  38. package/dist/{chunk-FERYDFZA.js → chunk-WXUXFDJQ.js} +2 -2
  39. package/dist/{chunk-X47QMM6K.js → chunk-YLN7E4OV.js} +2 -2
  40. package/dist/code-block.js +1 -1
  41. package/dist/diff-view.js +2 -2
  42. package/dist/gallery.js +1 -1
  43. package/dist/generated-image.js +9 -0
  44. package/dist/generated-image.js.map +1 -0
  45. package/dist/grouped-parts.js +6 -6
  46. package/dist/image.js +4 -4
  47. package/dist/index.d.ts +92 -150
  48. package/dist/index.js +67 -65
  49. package/dist/markdown-view.js +3 -3
  50. package/dist/message.js +3 -3
  51. package/dist/model-provider-logo.js +1 -1
  52. package/dist/persona.js +2 -2
  53. package/dist/queue.js +1 -1
  54. package/dist/reasoning.js +3 -3
  55. package/dist/sandbox.js +3 -3
  56. package/dist/tool.js +2 -2
  57. package/package.json +8 -13
  58. package/schemas/a2ui-surface.v1.schema.json +5 -2
  59. package/src/__contract__/{image.contract.test.tsx → attachments.contract.test.tsx} +7 -7
  60. package/src/__contract__/generated-image.contract.test.tsx +49 -0
  61. package/src/_lazy-boundary-conformance.ts +12 -18
  62. package/src/_lazy-engine-boundary.tsx +1 -2
  63. package/src/_lazy-mermaid-absent.test.ts +2 -2
  64. package/src/_media-fixtures.ts +47 -0
  65. package/src/_persona-rive.tsx +1 -2
  66. package/src/a2ui/catalog.source.json +3 -2
  67. package/src/asset-preview.stories.tsx +12 -0
  68. package/src/asset-preview.test.tsx +14 -0
  69. package/src/asset-preview.tsx +4 -2
  70. package/src/attachments.stories.tsx +147 -0
  71. package/src/attachments.test.tsx +104 -0
  72. package/src/attachments.tsx +28 -20
  73. package/src/audio-player.stories.tsx +10 -45
  74. package/src/audio-player.test.tsx +166 -61
  75. package/src/audio-player.tsx +175 -266
  76. package/src/chat.stories.tsx +75 -3
  77. package/src/code-block.test.tsx +32 -0
  78. package/src/code-block.tsx +22 -5
  79. package/src/gallery.tsx +13 -77
  80. package/src/generated-image.stories.tsx +67 -0
  81. package/src/generated-image.test.tsx +107 -0
  82. package/src/generated-image.tsx +57 -0
  83. package/src/image.tsx +2 -115
  84. package/src/index.ts +1 -0
  85. package/src/model-provider-logo.tsx +20 -18
  86. package/src/queue.test.tsx +24 -0
  87. package/src/queue.tsx +8 -5
  88. package/src/tool.test.tsx +26 -0
  89. package/src/tool.tsx +2 -2
  90. package/dist/_audio-player-media-chrome.js +0 -85
  91. package/dist/_audio-player-media-chrome.js.map +0 -1
  92. package/dist/chunk-2XOIG5TG.js.map +0 -1
  93. package/dist/chunk-34CQ2VHM.js.map +0 -1
  94. package/dist/chunk-3XNPMDZY.js.map +0 -1
  95. package/dist/chunk-7RL6KZDF.js.map +0 -1
  96. package/dist/chunk-NSCLRHES.js +0 -102
  97. package/dist/chunk-NSCLRHES.js.map +0 -1
  98. package/dist/chunk-PTWCTSZL.js.map +0 -1
  99. package/dist/chunk-RB7G65JC.js.map +0 -1
  100. package/dist/chunk-S3ISPW3A.js.map +0 -1
  101. package/dist/chunk-TWPHAJNM.js.map +0 -1
  102. package/dist/chunk-V6E5DYZD.js +0 -80
  103. package/dist/chunk-V6E5DYZD.js.map +0 -1
  104. package/src/_audio-player-media-chrome.tsx +0 -233
  105. package/src/image.stories.tsx +0 -67
  106. package/src/image.test.tsx +0 -105
  107. /package/dist/{chunk-WU5BLGTF.js.map → chunk-3KXIWGHW.js.map} +0 -0
  108. /package/dist/{chunk-V4DORGWJ.js.map → chunk-5AMSNG2T.js.map} +0 -0
  109. /package/dist/{chunk-PQBF6ZIQ.js.map → chunk-DI645WR4.js.map} +0 -0
  110. /package/dist/{chunk-NCL2UZKI.js.map → chunk-FFA7OPEH.js.map} +0 -0
  111. /package/dist/{chunk-6PB2MXCI.js.map → chunk-HLODND65.js.map} +0 -0
  112. /package/dist/{chunk-ADOYAGGK.js.map → chunk-IFVO7LQJ.js.map} +0 -0
  113. /package/dist/{chunk-CZP3RHC4.js.map → chunk-LY7O4BMP.js.map} +0 -0
  114. /package/dist/{chunk-FERYDFZA.js.map → chunk-WXUXFDJQ.js.map} +0 -0
  115. /package/dist/{chunk-X47QMM6K.js.map → chunk-YLN7E4OV.js.map} +0 -0
package/dist/index.js CHANGED
@@ -115,7 +115,7 @@ import {
115
115
  SandboxTabsBar,
116
116
  SandboxTabsList,
117
117
  SandboxTabsTrigger
118
- } from "./chunk-FERYDFZA.js";
118
+ } from "./chunk-WXUXFDJQ.js";
119
119
  import {
120
120
  SchemaDisplay,
121
121
  SchemaDisplayBody,
@@ -150,7 +150,7 @@ import {
150
150
  } from "./chunk-EY7LVUKQ.js";
151
151
  import {
152
152
  Persona
153
- } from "./chunk-NCL2UZKI.js";
153
+ } from "./chunk-FFA7OPEH.js";
154
154
  import {
155
155
  PERSONA_SOURCES
156
156
  } from "./chunk-YHUSW7D2.js";
@@ -184,12 +184,12 @@ import {
184
184
  QueueSectionContent,
185
185
  QueueSectionLabel,
186
186
  QueueSectionTrigger
187
- } from "./chunk-34CQ2VHM.js";
187
+ } from "./chunk-FO44KY7Y.js";
188
188
  import {
189
189
  MODEL_PROVIDER_LOGO_BASE_URL,
190
190
  ModelProviderLogo,
191
191
  ModelProviderLogoGroup
192
- } from "./chunk-2XOIG5TG.js";
192
+ } from "./chunk-JSEV46SH.js";
193
193
  import {
194
194
  BrandMotionConfig
195
195
  } from "./chunk-PQ5BPIWQ.js";
@@ -309,7 +309,7 @@ import {
309
309
  UserMessage,
310
310
  agentMessageVariants,
311
311
  messageActionsVariants
312
- } from "./chunk-ADOYAGGK.js";
312
+ } from "./chunk-IFVO7LQJ.js";
313
313
  import {
314
314
  MicSelector,
315
315
  MicSelectorContent,
@@ -322,28 +322,18 @@ import {
322
322
  MicSelectorValue,
323
323
  useAudioDevices
324
324
  } from "./chunk-WYTZVSGK.js";
325
- import {
326
- FileTree,
327
- FileTreeActions,
328
- FileTreeFile,
329
- FileTreeFolder,
330
- FileTreeIcon,
331
- FileTreeName,
332
- PRODUCED_ASSET_ICONS,
333
- ProducedAssetTree
334
- } from "./chunk-UBLKJJ7K.js";
335
325
  import {
336
326
  Gallery
337
- } from "./chunk-3XNPMDZY.js";
327
+ } from "./chunk-TBCMCF5O.js";
338
328
  import {
339
329
  GroupedParts
340
- } from "./chunk-WU5BLGTF.js";
330
+ } from "./chunk-3KXIWGHW.js";
341
331
  import {
342
332
  Reasoning,
343
333
  ReasoningContent,
344
334
  ReasoningTrigger,
345
335
  useReasoning
346
- } from "./chunk-X47QMM6K.js";
336
+ } from "./chunk-YLN7E4OV.js";
347
337
  import {
348
338
  Tool,
349
339
  ToolContent,
@@ -353,7 +343,7 @@ import {
353
343
  ToolOutput,
354
344
  getStatusBadge,
355
345
  statusFromToolState
356
- } from "./chunk-PTWCTSZL.js";
346
+ } from "./chunk-OCZNA5SO.js";
357
347
  import {
358
348
  buildPartGroups,
359
349
  defaultPartStatus,
@@ -362,9 +352,10 @@ import {
362
352
  partsFingerprint,
363
353
  rollupStatus
364
354
  } from "./chunk-YSKD7UXX.js";
355
+ import "./chunk-D7BZMRI3.js";
365
356
  import {
366
- Image
367
- } from "./chunk-V6E5DYZD.js";
357
+ GeneratedImage
358
+ } from "./chunk-RLV64EWK.js";
368
359
  import {
369
360
  EvidenceChip,
370
361
  InlineCitation,
@@ -394,31 +385,6 @@ import {
394
385
  MessageCompare,
395
386
  MessageCompareColumn
396
387
  } from "./chunk-5VGYZ62I.js";
397
- import {
398
- ApprovalCard,
399
- ApprovalCardAccepted,
400
- ApprovalCardAction,
401
- ApprovalCardActions,
402
- ApprovalCardApprove,
403
- ApprovalCardDeny,
404
- ApprovalCardDescription,
405
- ApprovalCardOptions,
406
- ApprovalCardReason,
407
- ApprovalCardRejected,
408
- ApprovalCardRequest,
409
- ApprovalCardTarget,
410
- ApprovalCardTitle,
411
- Confirmation,
412
- ConfirmationAccepted,
413
- ConfirmationAction,
414
- ConfirmationActions,
415
- ConfirmationApprove,
416
- ConfirmationDeny,
417
- ConfirmationDescription,
418
- ConfirmationRejected,
419
- ConfirmationRequest,
420
- ConfirmationTitle
421
- } from "./chunk-ELGCZLZF.js";
422
388
  import {
423
389
  Connection
424
390
  } from "./chunk-MOK66734.js";
@@ -436,7 +402,7 @@ import {
436
402
  import {
437
403
  DiffView,
438
404
  diffRowVariants
439
- } from "./chunk-6PB2MXCI.js";
405
+ } from "./chunk-HLODND65.js";
440
406
  import {
441
407
  Edge
442
408
  } from "./chunk-6IQPH2OS.js";
@@ -454,8 +420,15 @@ import {
454
420
  EnvironmentVariablesToggle
455
421
  } from "./chunk-MLFMYCPH.js";
456
422
  import {
457
- Canvas
458
- } from "./chunk-BA3AEMOU.js";
423
+ FileTree,
424
+ FileTreeActions,
425
+ FileTreeFile,
426
+ FileTreeFolder,
427
+ FileTreeIcon,
428
+ FileTreeName,
429
+ PRODUCED_ASSET_ICONS,
430
+ ProducedAssetTree
431
+ } from "./chunk-UBLKJJ7K.js";
459
432
  import {
460
433
  ChainOfThought,
461
434
  ChainOfThoughtContent,
@@ -563,12 +536,30 @@ import {
563
536
  useProviderAttachments
564
537
  } from "./chunk-SSGJ6MEM.js";
565
538
  import {
566
- AgentEvent
567
- } from "./chunk-QJUNPVOS.js";
568
- import {
569
- AgentStep,
570
- AgentTimeline
571
- } from "./chunk-UCJ6IUFS.js";
539
+ ApprovalCard,
540
+ ApprovalCardAccepted,
541
+ ApprovalCardAction,
542
+ ApprovalCardActions,
543
+ ApprovalCardApprove,
544
+ ApprovalCardDeny,
545
+ ApprovalCardDescription,
546
+ ApprovalCardOptions,
547
+ ApprovalCardReason,
548
+ ApprovalCardRejected,
549
+ ApprovalCardRequest,
550
+ ApprovalCardTarget,
551
+ ApprovalCardTitle,
552
+ Confirmation,
553
+ ConfirmationAccepted,
554
+ ConfirmationAction,
555
+ ConfirmationActions,
556
+ ConfirmationApprove,
557
+ ConfirmationDeny,
558
+ ConfirmationDescription,
559
+ ConfirmationRejected,
560
+ ConfirmationRequest,
561
+ ConfirmationTitle
562
+ } from "./chunk-ELGCZLZF.js";
572
563
  import {
573
564
  Agent,
574
565
  AgentContent,
@@ -577,13 +568,13 @@ import {
577
568
  AgentOutput,
578
569
  AgentTool,
579
570
  AgentTools
580
- } from "./chunk-CZP3RHC4.js";
571
+ } from "./chunk-LY7O4BMP.js";
581
572
  import {
582
573
  AssetPreview
583
- } from "./chunk-RB7G65JC.js";
574
+ } from "./chunk-GP7ZZCID.js";
584
575
  import {
585
576
  MarkdownView
586
- } from "./chunk-V4DORGWJ.js";
577
+ } from "./chunk-5AMSNG2T.js";
587
578
  import {
588
579
  ContextPanel,
589
580
  ContextPanelBody,
@@ -610,7 +601,7 @@ import {
610
601
  CodeBlockLanguageSelectorValue,
611
602
  CodeBlockTitle,
612
603
  highlightCode
613
- } from "./chunk-TWPHAJNM.js";
604
+ } from "./chunk-3UHR3RLZ.js";
614
605
  import {
615
606
  Shimmer
616
607
  } from "./chunk-3YPT3V7L.js";
@@ -638,7 +629,7 @@ import {
638
629
  getMediaCategory,
639
630
  useAttachmentContext,
640
631
  useAttachmentsContext
641
- } from "./chunk-7RL6KZDF.js";
632
+ } from "./chunk-24M6XWVJ.js";
642
633
  import {
643
634
  AudioPlayer,
644
635
  AudioPlayerControlBar,
@@ -651,18 +642,27 @@ import {
651
642
  AudioPlayerTimeDisplay,
652
643
  AudioPlayerTimeRange,
653
644
  AudioPlayerVolumeRange
654
- } from "./chunk-NSCLRHES.js";
645
+ } from "./chunk-SSES3F4Q.js";
655
646
  import {
656
647
  AudioVisualizer
657
648
  } from "./chunk-IQJG4IDX.js";
649
+ import {
650
+ Canvas
651
+ } from "./chunk-BA3AEMOU.js";
658
652
  import "./chunk-5NNWUKK5.js";
659
653
  import "./chunk-NP7VID4K.js";
660
654
  import {
661
655
  A2UI_SURFACE_SCHEMA_ID,
662
656
  buildA2uiSurfaceSchema
663
657
  } from "./chunk-BM2LWERA.js";
664
- import "./chunk-PQBF6ZIQ.js";
665
- import "./chunk-VLNBTOH6.js";
658
+ import {
659
+ AgentEvent
660
+ } from "./chunk-QJUNPVOS.js";
661
+ import {
662
+ AgentStep,
663
+ AgentTimeline
664
+ } from "./chunk-UCJ6IUFS.js";
665
+ import "./chunk-DI645WR4.js";
666
666
  import {
667
667
  createLazyMermaidPlugin,
668
668
  lazyMermaid,
@@ -701,7 +701,8 @@ import {
701
701
  import "./chunk-SSKZ2AED.js";
702
702
  import "./chunk-NMVNNO3L.js";
703
703
  import "./chunk-QUDZOTRV.js";
704
- import "./chunk-S3ISPW3A.js";
704
+ import "./chunk-PWQPVOZJ.js";
705
+ import "./chunk-VLNBTOH6.js";
705
706
  export {
706
707
  A2UI_CATALOG_SCHEMA,
707
708
  A2UI_CATALOG_VERSION,
@@ -859,8 +860,9 @@ export {
859
860
  FileTreeIcon,
860
861
  FileTreeName,
861
862
  Gallery,
863
+ GeneratedImage,
862
864
  GroupedParts,
863
- Image,
865
+ GeneratedImage as Image,
864
866
  InlineCitation,
865
867
  InlineCitationCard,
866
868
  InlineCitationCardBody,
@@ -2,15 +2,15 @@
2
2
  "use client";
3
3
  import {
4
4
  MarkdownView
5
- } from "./chunk-V4DORGWJ.js";
6
- import "./chunk-PQBF6ZIQ.js";
7
- import "./chunk-VLNBTOH6.js";
5
+ } from "./chunk-5AMSNG2T.js";
6
+ import "./chunk-DI645WR4.js";
8
7
  import "./chunk-PG7ERDOD.js";
9
8
  import "./chunk-SEVN656N.js";
10
9
  import "./chunk-DZW6LM22.js";
11
10
  import "./chunk-3TDHPXZZ.js";
12
11
  import "./chunk-SSKZ2AED.js";
13
12
  import "./chunk-QUDZOTRV.js";
13
+ import "./chunk-VLNBTOH6.js";
14
14
  export {
15
15
  MarkdownView
16
16
  };
package/dist/message.js CHANGED
@@ -19,15 +19,15 @@ import {
19
19
  UserMessage,
20
20
  agentMessageVariants,
21
21
  messageActionsVariants
22
- } from "./chunk-ADOYAGGK.js";
23
- import "./chunk-PQBF6ZIQ.js";
24
- import "./chunk-VLNBTOH6.js";
22
+ } from "./chunk-IFVO7LQJ.js";
23
+ import "./chunk-DI645WR4.js";
25
24
  import "./chunk-PG7ERDOD.js";
26
25
  import "./chunk-SEVN656N.js";
27
26
  import "./chunk-DZW6LM22.js";
28
27
  import "./chunk-3TDHPXZZ.js";
29
28
  import "./chunk-SSKZ2AED.js";
30
29
  import "./chunk-QUDZOTRV.js";
30
+ import "./chunk-VLNBTOH6.js";
31
31
  export {
32
32
  AgentMessage,
33
33
  Message,
@@ -4,7 +4,7 @@ import {
4
4
  MODEL_PROVIDER_LOGO_BASE_URL,
5
5
  ModelProviderLogo,
6
6
  ModelProviderLogoGroup
7
- } from "./chunk-2XOIG5TG.js";
7
+ } from "./chunk-JSEV46SH.js";
8
8
  export {
9
9
  MODEL_PROVIDER_LOGO_BASE_URL,
10
10
  ModelProviderLogo,
package/dist/persona.js CHANGED
@@ -2,11 +2,11 @@
2
2
  "use client";
3
3
  import {
4
4
  Persona
5
- } from "./chunk-NCL2UZKI.js";
5
+ } from "./chunk-FFA7OPEH.js";
6
6
  import {
7
7
  PERSONA_SOURCES
8
8
  } from "./chunk-YHUSW7D2.js";
9
- import "./chunk-S3ISPW3A.js";
9
+ import "./chunk-PWQPVOZJ.js";
10
10
  export {
11
11
  PERSONA_SOURCES,
12
12
  Persona
package/dist/queue.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  QueueSectionContent,
17
17
  QueueSectionLabel,
18
18
  QueueSectionTrigger
19
- } from "./chunk-34CQ2VHM.js";
19
+ } from "./chunk-FO44KY7Y.js";
20
20
  export {
21
21
  Queue,
22
22
  QueueItem,
package/dist/reasoning.js CHANGED
@@ -5,15 +5,15 @@ import {
5
5
  ReasoningContent,
6
6
  ReasoningTrigger,
7
7
  useReasoning
8
- } from "./chunk-X47QMM6K.js";
8
+ } from "./chunk-YLN7E4OV.js";
9
9
  import "./chunk-3YPT3V7L.js";
10
- import "./chunk-PQBF6ZIQ.js";
11
- import "./chunk-VLNBTOH6.js";
10
+ import "./chunk-DI645WR4.js";
12
11
  import "./chunk-PG7ERDOD.js";
13
12
  import "./chunk-SEVN656N.js";
14
13
  import "./chunk-3TDHPXZZ.js";
15
14
  import "./chunk-SSKZ2AED.js";
16
15
  import "./chunk-QUDZOTRV.js";
16
+ import "./chunk-VLNBTOH6.js";
17
17
  export {
18
18
  Reasoning,
19
19
  ReasoningContent,
package/dist/sandbox.js CHANGED
@@ -9,9 +9,9 @@ import {
9
9
  SandboxTabsBar,
10
10
  SandboxTabsList,
11
11
  SandboxTabsTrigger
12
- } from "./chunk-FERYDFZA.js";
13
- import "./chunk-PTWCTSZL.js";
14
- import "./chunk-TWPHAJNM.js";
12
+ } from "./chunk-WXUXFDJQ.js";
13
+ import "./chunk-OCZNA5SO.js";
14
+ import "./chunk-3UHR3RLZ.js";
15
15
  import "./chunk-3YPT3V7L.js";
16
16
  import "./chunk-3TDHPXZZ.js";
17
17
  import "./chunk-SSKZ2AED.js";
package/dist/tool.js CHANGED
@@ -9,8 +9,8 @@ import {
9
9
  ToolOutput,
10
10
  getStatusBadge,
11
11
  statusFromToolState
12
- } from "./chunk-PTWCTSZL.js";
13
- import "./chunk-TWPHAJNM.js";
12
+ } from "./chunk-OCZNA5SO.js";
13
+ import "./chunk-3UHR3RLZ.js";
14
14
  import "./chunk-3YPT3V7L.js";
15
15
  import "./chunk-3TDHPXZZ.js";
16
16
  import "./chunk-SSKZ2AED.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elabs-ai/components-ai",
3
- "version": "5.3.1",
3
+ "version": "5.5.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,13 +46,12 @@
46
46
  "@rive-app/react-webgl2": "^4.26.1",
47
47
  "@xyflow/react": "^12.11.1",
48
48
  "ai": "^6.0.0 || ^7.0.0",
49
- "media-chrome": "^4.17.2",
50
49
  "mermaid": "^11.12.2",
51
50
  "react": "^18.2.0 || ^19.0.0",
52
51
  "react-dom": "^18.2.0 || ^19.0.0",
53
- "@elabs-ai/components-icons": "^5.3.1",
54
- "@elabs-ai/components-tokens": "^5.3.1",
55
- "@elabs-ai/components-ui": "^5.3.1"
52
+ "@elabs-ai/components-icons": "^5.5.0",
53
+ "@elabs-ai/components-tokens": "^5.5.0",
54
+ "@elabs-ai/components-ui": "^5.5.0"
56
55
  },
57
56
  "peerDependenciesMeta": {
58
57
  "@rive-app/react-webgl2": {
@@ -61,9 +60,6 @@
61
60
  "ai": {
62
61
  "optional": true
63
62
  },
64
- "media-chrome": {
65
- "optional": true
66
- },
67
63
  "mermaid": {
68
64
  "optional": true
69
65
  }
@@ -80,19 +76,18 @@
80
76
  "ai": "^7.0.0",
81
77
  "eslint": "^9.17.0",
82
78
  "jsdom": "^25.0.1",
83
- "media-chrome": "^4.17.2",
84
79
  "mermaid": "^11.12.2",
85
80
  "react": "^19.0.0",
86
81
  "react-dom": "^19.0.0",
87
82
  "tsup": "^8.3.5",
88
83
  "typescript": "^5.7.3",
89
84
  "vitest": "^3.0.2",
90
- "@elabs-ai/components-charts": "5.3.1",
85
+ "@elabs-ai/components-charts": "5.5.0",
91
86
  "@elabs-ai/components-eslint-config": "0.1.0",
92
- "@elabs-ai/components-icons": "5.3.1",
93
- "@elabs-ai/components-tokens": "5.3.1",
87
+ "@elabs-ai/components-icons": "5.5.0",
88
+ "@elabs-ai/components-tokens": "5.5.0",
94
89
  "@elabs-ai/components-typescript-config": "0.1.0",
95
- "@elabs-ai/components-ui": "5.3.1"
90
+ "@elabs-ai/components-ui": "5.5.0"
96
91
  },
97
92
  "scripts": {
98
93
  "build": "tsup",
@@ -762,7 +762,7 @@
762
762
  "type": "boolean"
763
763
  },
764
764
  "spec": {
765
- "description": "{ data: row[], x: string, series: string[] | { key, label?, axis?: left|right, mark?: line|area|column }[] (type: \"dual-axis\" only: default axis left, mark line; needs ≥1 line series, no right-axis columns), type?: line|area|bar|pie|scatter|radar|funnel|candlestick|heatmap|calendar|waterfall|dumbbell|unit|treemap|histogram|box|strip|bump|stream|diverging-bar|dual-axis, xType?: time|category|number, y2?, axes?: { y2?: { align?: independent|ticks, proportional?: boolean, zero?: both|auto } } (type: \"dual-axis\" only, right axis vs left; default align ticks, zero auto), group?, title?, description?, stacked?: boolean|percent|diverging, orientation?: vertical|horizontal, donut?, legend?: boolean (an object form exists; AutoChart reads it as boolean truthy today), valueFormat?: number|compact|currency|percent, currency?, palette?: mono|sequential|categorical, emphasis?: analytical|editorial, kind?: steps|records|ranking|change (change: a two-measure spec reads as a before/after move, for dumbbell), nulls?: gap|zero|connect (line/area/stream non-numeric sample, default gap), curve?: linear|monotone|natural|step|step-before|step-after (line/area/stream, default monotone), symbols?: { placement?: all|ends|first|last, shape?: circle|square|triangle|diamond|cross|star|plus|hexagon, style?: filled|hollow, size? } (line/area/stream point markers), size?: { key, range?: [lo,hi] } (scatter bubble size), shapeBy?: { key, shapes?: marker-shape[] } (scatter shape by category), trend?: linear|log (scatter trend line), shapes?: [{ kind: line|path, … }] (scatter reference lines/areas), variant?: dumbbell|slope|arrow|dots (dumbbell only, default dumbbell), delta?: { show, mode: absolute|percent } (dumbbell delta label), groupSmall?: { threshold?, max?, label? } (pie: fold small slices into an Other slice), half?: boolean (pie half-donut, default false), labels?: { series?: end|key|none, values?: { placement: first|last|all|peaks, count?, minGap?, outline?, matchColor?, format? }, points?: { key, mode?: auto|all, priorityKey? }, slices?: { placement?: inside|outside|none, show: (label|value|percent)[], matchColor?, minAngle? }, comparison?: value|difference|none } (label engine), annotations?: [{ kind: text|range|line|row, … }] (notes, bands, reference lines, row notes in data units), divergingCenter?: string (neutral series when stacked is diverging), sort?: asc|desc|none|{by,dir} (bar) | start|end|delta|deltaPercent|data|label|none (dumbbell) | desc|none (pie) | data|increasesFirst|decreasesFirst (waterfall, default data), groupBy?: string (bar/dumbbell row grouping; waterfall: a subtotal after each group), colorBy?: { key, scale?: categorical|sequential|diverging, steps? } (bar per-bar / scatter per-point colour), overlays?: [{ kind: value|range, … }] (bar value markers, range spans), comparison?: { key, label? } (bar muted prior-period column), notes?: string (italic notes under an enclosing ChartFrame), byline?: { kind?: chart|map|table, author } (ChartFrame footer: kind + author), source?: string | { name, href? } (ChartFrame footer attribution), altText?: string (image text alternative, default: description), tooltip?: { variant?: rows|table|inline, focus?: boolean, pin?: boolean } (forwarded to ChartTooltip, default rows), facet?: { by: string | { series: true }, columns?, scales?: { y?: shared|independent, rangeRounding? }, sort?: start|end|delta|deltaPercent|range|title|data, baseline?: { key } | { series }, panelHeight? } (line/area/bar/pie small multiples), dataFormat?: differences|runningTotals (waterfall only, default differences), zoomToDifferences?: boolean (waterfall only, default false) }",
765
+ "description": "{ data: row[], x: string, series: string[] | { key, label?, axis?: left|right, mark?: line|area|column }[] (type: \"dual-axis\" only: default axis left, mark line; needs ≥1 line series, no right-axis columns), type?: line|area|bar|pie|scatter|radar|funnel|candlestick|heatmap|calendar|waterfall|dumbbell|unit|treemap|histogram|box|strip|bump|stream|diverging-bar|dual-axis, xType?: time|category|number, y2?, axes?: { y2?: { align?: independent|ticks, proportional?: boolean, zero?: both|auto } } (type: \"dual-axis\" only, right axis vs left; default align ticks, zero auto), group?, title?, description?, stacked?: boolean|percent|diverging, orientation?: vertical|horizontal, donut?, legend?: boolean (an object form exists; AutoChart reads it as boolean truthy today), valueFormat?: number|compact|currency|percent, currency?, palette?: mono|sequential|categorical, emphasis?: analytical|editorial, kind?: steps|records|ranking|change (change: a two-measure spec reads as a before/after move, for dumbbell), nulls?: gap|zero|connect (line/area/stream non-numeric sample, default gap), curve?: linear|monotone|natural|step|step-before|step-after (line/area/stream, default monotone), symbols?: { placement?: all|ends|first|last, shape?: circle|square|triangle|diamond|cross|star|plus|hexagon, style?: filled|hollow, size? } (line/area/stream point markers), size?: { key, range?: [lo,hi] } (scatter bubble size), shapeBy?: { key, shapes?: marker-shape[] } (scatter shape by category), trend?: linear|log (scatter trend line), shapes?: [{ kind: line|path, … }] (scatter reference lines/areas), variant?: dumbbell|slope|arrow|dots (dumbbell only, default dumbbell), valueKeys?: string[] (dumbbell variant dots only: one dot per key, in order, and one legend entry each; default the two measures), delta?: { show, mode: absolute|percent } (dumbbell delta label), groupSmall?: { threshold?, max?, label? } (pie: fold small slices into an Other slice), half?: boolean (pie half-donut, default false), labels?: { series?: end|key|none, values?: { placement: first|last|all|peaks, count?, minGap?, outline?, matchColor?, format? }, points?: { key, mode?: auto|all, priorityKey? }, slices?: { placement?: inside|outside|none, show: (label|value|percent)[], matchColor?, minAngle? }, comparison?: value|difference|none } (label engine), annotations?: [{ kind: text|range|line|row, … }] (notes, bands, reference lines, row notes in data units), analytics?: [{ kind: line|band|trend|window|forecast|errorBars, of?: series|all, … }] (computed overlays — line: { value: mean|median|min|max|sum|number|{ percentile }|{ stddev, around? }, axis?: x|y, label?: none|value|computation|text, ifOverflow?: clip|extend }; band: { from, to } | { spread: { percentiles: [lo,hi] }|{ stddev }|{ ci } }; trend: { model?: linear|log|exp|pow|{ poly: 2..6 }|{ loess }, ci?, extent?: data|domain }; window: { k, reduce?: mean|median|sum|min|max|ewm, replace? }; forecast: { horizon, season?, interval? }; errorBars: { low: field|{ percent }, high?, band? }), selection?: { gestures: (range|rect|lasso|radial)[], confirm?: immediate|explicit, field? } (bar/line/area/scatter/heatmap/histogram/box/strip selection gestures with a toolbar — a bar chart with range and lasso selection is { gestures: [range, lasso] }; explicit previews until the reader confirms; intents arrive as the selectionIntent event), divergingCenter?: string (neutral series when stacked is diverging), sort?: asc|desc|none|{by,dir} (bar) | start|end|delta|deltaPercent|data|label|none (dumbbell) | desc|none (pie) | data|increasesFirst|decreasesFirst (waterfall, default data), groupBy?: string (bar/dumbbell row grouping; waterfall: a subtotal after each group), colorBy?: { key, scale?: categorical|sequential|diverging, steps? } (bar per-bar / scatter per-point colour), overlays?: [{ kind: value|range, … }] (bar value markers, range spans), comparison?: { key, label? } (bar muted prior-period column), notes?: string (italic notes under an enclosing ChartFrame), byline?: { kind?: chart|map|table, author } (ChartFrame footer: kind + author), source?: string | { name, href? } (ChartFrame footer attribution), altText?: string (image text alternative, default: description), tooltip?: { variant?: rows|table|inline, focus?: boolean, pin?: boolean } (forwarded to ChartTooltip, default rows), facet?: { by: string | { series: true }, columns?, scales?: { y?: shared|independent, rangeRounding? }, sort?: start|end|delta|deltaPercent|range|title|data, baseline?: { key } | { series }, panelHeight? } (line/area/bar/pie small multiples), dataFormat?: differences|runningTotals (waterfall only, default differences), zoomToDifferences?: boolean (waterfall only, default false), scrollbar?: miniChart|bar|auto|none (bar/diverging-bar/heatmap/calendar and line/area on a category x: an overview strip that scrolls the categories; default none, or auto when maxVisibleItems is set), maxVisibleItems?: number (categories shown at once, the rest scroll behind the strip and the value axis keeps the full domain; for > 30 categories set maxVisibleItems) }",
766
766
  "type": "object"
767
767
  }
768
768
  },
@@ -774,6 +774,9 @@
774
774
  "properties": {
775
775
  "datapointClick": {
776
776
  "$ref": "#/$defs/action"
777
+ },
778
+ "selectionIntent": {
779
+ "$ref": "#/$defs/action"
777
780
  }
778
781
  },
779
782
  "additionalProperties": false
@@ -3195,7 +3198,7 @@
3195
3198
  "type": "boolean"
3196
3199
  },
3197
3200
  "columns": {
3198
- "description": "Target columns at the largest breakpoint. Defaults to 4.",
3201
+ "description": "Target columns once the grid's own container is wide enough (container queries, not the viewport — see `colsMap`). Defaults to 4.",
3199
3202
  "enum": [2, 3, 4]
3200
3203
  },
3201
3204
  "featured": {
@@ -1,12 +1,12 @@
1
1
  // GENERATED by scripts/gen-contract-tests.mjs — do not edit; re-run the generator instead.
2
2
  /**
3
- * Contract probe for Image (`packages/ai/src/image.tsx`), derived from its
4
- * `Default` story (packages/ai/src/image.stories.tsx). See scripts/gen-contract-tests.mjs.
3
+ * Contract probe for Attachments (`packages/ai/src/attachments.tsx`), derived from its
4
+ * `Default` story (packages/ai/src/attachments.stories.tsx). See scripts/gen-contract-tests.mjs.
5
5
  */
6
6
  import { describe, it, expect, afterEach } from "vitest";
7
7
  import { render, cleanup } from "@testing-library/react";
8
8
  import { createRef } from "react";
9
- import * as stories from "../image.stories";
9
+ import * as stories from "../attachments.stories";
10
10
  import knownFailuresJson from "../../../../scripts/check/contract-known-failures.json";
11
11
 
12
12
  afterEach(cleanup);
@@ -24,13 +24,13 @@ const isForwardRefComponent = Component?.["$$typeof"] === Symbol.for("react.forw
24
24
 
25
25
  /** Wrap a known, tracked failure in `it.fails` so fixing it forces the key's removal. */
26
26
  function contractIt(assertion: string, name: string, fn: () => void) {
27
- const key = `ai-image--default|jsdom|jsdom|${assertion}`;
27
+ const key = `revenue-recognition-policy--default|jsdom|jsdom|${assertion}`;
28
28
  const reason = KNOWN_FAILURES[key];
29
29
  if (reason) return it.fails(`${name} (known failure: ${reason})`, fn);
30
30
  return it(name, fn);
31
31
  }
32
32
 
33
- describe("Image contract", () => {
33
+ describe("Attachments contract", () => {
34
34
  it.skipIf(!isForwardRefComponent)("forwards a ref to a DOM element", () => {
35
35
  const ref = createRef<Element>();
36
36
  render(<Component {...args} ref={ref} />);
@@ -42,8 +42,8 @@ describe("Image contract", () => {
42
42
  expect(container.querySelector(".contract-probe")).not.toBeNull();
43
43
  });
44
44
 
45
- contractIt("data-slot", 'exposes data-slot="image" on its root', () => {
45
+ contractIt("data-slot", 'exposes data-slot="attachments" on its root', () => {
46
46
  const { container } = render(<Component {...args} />);
47
- expect(container.querySelector('[data-slot="image"]')).not.toBeNull();
47
+ expect(container.querySelector('[data-slot="attachments"]')).not.toBeNull();
48
48
  });
49
49
  });
@@ -0,0 +1,49 @@
1
+ // GENERATED by scripts/gen-contract-tests.mjs — do not edit; re-run the generator instead.
2
+ /**
3
+ * Contract probe for GeneratedImage (`packages/ai/src/generated-image.tsx`), derived from its
4
+ * `Default` story (packages/ai/src/generated-image.stories.tsx). See scripts/gen-contract-tests.mjs.
5
+ */
6
+ import { describe, it, expect, afterEach } from "vitest";
7
+ import { render, cleanup } from "@testing-library/react";
8
+ import { createRef } from "react";
9
+ import * as stories from "../generated-image.stories";
10
+ import knownFailuresJson from "../../../../scripts/check/contract-known-failures.json";
11
+
12
+ afterEach(cleanup);
13
+
14
+ // Every component here has its own prop/ref/element shape; a generated probe
15
+ // stays generic on purpose (loosely typed, not untyped — see
16
+ // scripts/gen-contract-tests.mjs) rather than re-deriving each one.
17
+ const KNOWN_FAILURES: Record<string, string> = knownFailuresJson;
18
+ const meta = stories.default as { component?: unknown; args?: Record<string, unknown> };
19
+ const Default = (stories as { Default?: { args?: Record<string, unknown> } }).Default;
20
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- probe target; see comment above
21
+ const Component = meta.component as any;
22
+ const args = { ...(meta.args ?? {}), ...(Default?.args ?? {}) };
23
+ const isForwardRefComponent = Component?.["$$typeof"] === Symbol.for("react.forward_ref");
24
+
25
+ /** Wrap a known, tracked failure in `it.fails` so fixing it forces the key's removal. */
26
+ function contractIt(assertion: string, name: string, fn: () => void) {
27
+ const key = `ai-generatedimage--default|jsdom|jsdom|${assertion}`;
28
+ const reason = KNOWN_FAILURES[key];
29
+ if (reason) return it.fails(`${name} (known failure: ${reason})`, fn);
30
+ return it(name, fn);
31
+ }
32
+
33
+ describe("GeneratedImage contract", () => {
34
+ it.skipIf(!isForwardRefComponent)("forwards a ref to a DOM element", () => {
35
+ const ref = createRef<Element>();
36
+ render(<Component {...args} ref={ref} />);
37
+ expect(ref.current).toBeInstanceOf(Element);
38
+ });
39
+
40
+ contractIt("className", "merges a caller className onto the root", () => {
41
+ const { container } = render(<Component {...args} className="contract-probe" />);
42
+ expect(container.querySelector(".contract-probe")).not.toBeNull();
43
+ });
44
+
45
+ contractIt("data-slot", 'exposes data-slot="generated-image" on its root', () => {
46
+ const { container } = render(<Component {...args} />);
47
+ expect(container.querySelector('[data-slot="generated-image"]')).not.toBeNull();
48
+ });
49
+ });
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * `AssertAssignable` — the shared compile-time conformance-check helper for
3
- * issue #101's "own the type locally" pattern (see `persona.tsx`,
4
- * `audio-player.tsx`, and the ADR 0019 amendment). Every `@lazy-boundary`
5
- * sibling module that owns a structurally-compatible mirror of an optional
6
- * peer's type (`_persona-rive.tsx`, `_audio-player-media-chrome.tsx`) uses
7
- * THIS declaration rather than redeclaring it locally previously the same
8
- * three-line type was declared verbatim in both files (round-1 validator
9
- * finding F5), which is exactly the kind of drift this repo's "a convention
10
- * ships with its teeth" rule (@.claude/rules/quality-gates.md) exists to
11
- * avoid: a future edit to one copy (e.g. relaxing the constraint) could
12
- * silently diverge from the other with no gate to catch it.
3
+ * issue #101's "own the type locally" pattern (see `persona.tsx` and the
4
+ * ADR 0019 amendment). A `@lazy-boundary` sibling module that owns a
5
+ * structurally-compatible mirror of an optional peer's type
6
+ * (`_persona-rive.tsx`, the Rive runtime) uses THIS declaration rather than
7
+ * redeclaring it locally, so a future edit (e.g. relaxing the constraint)
8
+ * cannot silently diverge between copies.
13
9
  *
14
10
  * Purely a type-level helper — no runtime value, no import of anything heavy
15
11
  * or peer-owned — so it is safe for a `@lazy-boundary` module to import it
@@ -24,14 +20,12 @@
24
20
  * produce is accepted by the owned type), never the reverse. That is
25
21
  * sufficient to prove the mirror is SAFE to use in place of the real type
26
22
  * wherever the real type is only ever produced (an event object Rive hands
27
- * back, a prop object media-chrome reads) — but it is a ONE-DIRECTIONAL
28
- * check, so it cannot detect the owned type merely being NARROWER than the
29
- * real one. `PersonaRiveEvent["data"]` (`unknown`) and the `AudioPlayer*`
30
- * part-prop types (ordinary HTML attributes only, no per-element instance
31
- * members, no `ref`) are both real, deliberate narrowings versus their real
32
- * peer counterparts — see the CHANGELOG's "Breaking (types)" entry — and this
33
- * assertion passes for both, exactly as designed: a narrower type is still a
34
- * valid supertype-direction match. Don't read a green
23
+ * back) — but it is a ONE-DIRECTIONAL check, so it cannot detect the owned
24
+ * type merely being NARROWER than the real one. `PersonaRiveEvent["data"]`
25
+ * (`unknown`) is a real, deliberate narrowing versus its Rive counterpart —
26
+ * see the CHANGELOG's "Breaking (types)" entry and this assertion passes
27
+ * for it, exactly as designed: a narrower type is still a valid
28
+ * supertype-direction match. Don't read a green
35
29
  * `_*Conformance` type as "identical shape to the peer"; read it as "safe to
36
30
  * substitute here", which is the property issue #101 actually needed.
37
31
  */
@@ -8,8 +8,7 @@ export interface LazyEngineBoundaryProps {
8
8
  * Called once a wrapped `lazy()` import rejects (an optional peer that is
9
9
  * not installed, or any other load-time failure). Return what to render in
10
10
  * its place — the boundary owns no default visual, since the right
11
- * stand-in differs by surface (an orb placeholder for `Persona`, `null`
12
- * for an `AudioPlayer` sub-control).
11
+ * stand-in differs by surface (an orb placeholder for `Persona`).
13
12
  */
14
13
  renderMissing: (error: unknown) => ReactNode;
15
14
  }
@@ -28,8 +28,8 @@ import { describe, expect, it, vi } from "vitest";
28
28
  * ERROR PATH — what happens when `import("mermaid")` resolves to an empty
29
29
  * stub — and nothing more. It does NOT prove mermaid is absent from an
30
30
  * installed consumer tree, and must never be read as though it did. For the
31
- * other four lazy-loaded optional peers (Rive, xterm, `@xterm/addon-fit`,
32
- * media-chrome), `fixtures/consumer-smoke` + `pnpm consumer:check` give an
31
+ * other lazy-loaded optional peers (Rive, xterm, `@xterm/addon-fit`),
32
+ * `fixtures/consumer-smoke` + `pnpm consumer:check` give an
33
33
  * end-to-end proof of genuine absence from the installed tarball. That proof
34
34
  * is currently UNWRITABLE for mermaid: two of `@elabs-ai/components-ai`'s own
35
35
  * plain dependencies (`streamdown`, `@streamdown/mermaid`) each depend on