@slipstream-ui/ai 0.3.0 → 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 (34) hide show
  1. package/dist/index.d.mts +33 -1
  2. package/dist/index.d.ts +33 -1
  3. package/dist/index.js +236 -110
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +238 -112
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/manifests/attachment.manifest.json +2 -0
  8. package/dist/manifests/branch.manifest.json +2 -0
  9. package/dist/manifests/code-block.manifest.json +2 -0
  10. package/dist/manifests/command-palette.manifest.json +37 -3
  11. package/dist/manifests/confirmation.manifest.json +2 -0
  12. package/dist/manifests/inline-citation.manifest.json +2 -0
  13. package/dist/manifests/message-actions.manifest.json +3 -0
  14. package/dist/manifests/reasoning.manifest.json +6 -0
  15. package/dist/manifests/response.manifest.json +2 -0
  16. package/dist/manifests/tool-call.manifest.json +6 -0
  17. package/package.json +3 -3
  18. package/src/components/code-block/CodeBlock.tsx +91 -5
  19. package/src/components/command-palette/CommandPalette.test.tsx +21 -0
  20. package/src/components/command-palette/CommandPalette.tsx +71 -6
  21. package/src/components/confirmation/Confirmation.tsx +1 -1
  22. package/src/components/conversation/Conversation.tsx +6 -1
  23. package/src/components/reasoning/Reasoning.tsx +13 -6
  24. package/src/components/tool-call/ToolCall.tsx +24 -8
  25. package/src/manifests/attachment.manifest.json +2 -0
  26. package/src/manifests/branch.manifest.json +2 -0
  27. package/src/manifests/code-block.manifest.json +2 -0
  28. package/src/manifests/command-palette.manifest.json +37 -3
  29. package/src/manifests/confirmation.manifest.json +2 -0
  30. package/src/manifests/inline-citation.manifest.json +2 -0
  31. package/src/manifests/message-actions.manifest.json +3 -0
  32. package/src/manifests/reasoning.manifest.json +6 -0
  33. package/src/manifests/response.manifest.json +2 -0
  34. package/src/manifests/tool-call.manifest.json +6 -0
@@ -44,6 +44,8 @@
44
44
  "implementation": "Icon-labeled button with aria-label that flips to Copied."
45
45
  }
46
46
  ],
47
+ "sourceDir": "code-block",
48
+ "exportName": "CodeBlock",
47
49
  "package": "@slipstream-ui/ai",
48
50
  "importPath": "@slipstream-ui/ai",
49
51
  "version": "0.0.1"
@@ -22,7 +22,13 @@
22
22
  "type": "Command[]",
23
23
  "required": true,
24
24
  "description": "Available commands: { id, label, section?, keywords?, shortcut? }",
25
- "examples": [{ "id": "go-docs", "label": "Open documentation", "section": "Navigation" }]
25
+ "examples": [
26
+ {
27
+ "id": "go-docs",
28
+ "label": "Open documentation",
29
+ "section": "Navigation"
30
+ }
31
+ ]
26
32
  },
27
33
  {
28
34
  "name": "onSelect",
@@ -33,9 +39,34 @@
33
39
  {
34
40
  "name": "placeholder",
35
41
  "type": "string",
36
- "defaultValue": "Type a command…",
42
+ "defaultValue": "Type a command.",
37
43
  "required": false,
38
44
  "description": "Input placeholder text"
45
+ },
46
+ {
47
+ "name": "loadCommands",
48
+ "type": "(query: string) => Promise<Command[]>",
49
+ "required": false,
50
+ "description": "Async command source; debounced and stale-response guarded."
51
+ },
52
+ {
53
+ "name": "debounceMs",
54
+ "type": "number",
55
+ "required": false,
56
+ "defaultValue": "200",
57
+ "description": "Debounce for loadCommands in ms."
58
+ },
59
+ {
60
+ "name": "renderCommand",
61
+ "type": "(command, state: { active: boolean }) => ReactNode",
62
+ "required": false,
63
+ "description": "Custom row renderer (icons, type badges)."
64
+ },
65
+ {
66
+ "name": "loadingText",
67
+ "type": "string",
68
+ "required": false,
69
+ "description": "Shown while async commands load."
39
70
  }
40
71
  ],
41
72
  "examples": [
@@ -71,7 +102,10 @@
71
102
  "relationship": "CommandPalette switches modes/actions; PromptInput captures free-form chat text."
72
103
  }
73
104
  ],
74
- "relatedComponents": ["PromptInput", "Dialog"],
105
+ "relatedComponents": [
106
+ "PromptInput",
107
+ "Dialog"
108
+ ],
75
109
  "package": "@slipstream-ui/ai",
76
110
  "importPath": "@slipstream-ui/ai",
77
111
  "version": "0.0.1",
@@ -137,6 +137,8 @@
137
137
  "implementation": "Status chip text announces Approved/Rejected."
138
138
  }
139
139
  ],
140
+ "sourceDir": "confirmation",
141
+ "exportName": "Confirmation",
140
142
  "package": "@slipstream-ui/ai",
141
143
  "importPath": "@slipstream-ui/ai",
142
144
  "version": "0.0.1"
@@ -40,6 +40,8 @@
40
40
  "implementation": "Card has role=tooltip linked via aria-describedby."
41
41
  }
42
42
  ],
43
+ "sourceDir": "inline-citation",
44
+ "exportName": "InlineCitation",
43
45
  "package": "@slipstream-ui/ai",
44
46
  "importPath": "@slipstream-ui/ai",
45
47
  "version": "0.0.1"
@@ -9,6 +9,7 @@
9
9
  { "name": "onCopy", "type": "(content: string) => void", "required": false, "description": "Called after copy with the copied text." },
10
10
  { "name": "onFeedback", "type": "(rating: 'up' | 'down' | undefined) => void", "required": false, "description": "Rating callback; selecting the active rating again passes undefined." },
11
11
  { "name": "onRegenerate", "type": "() => void", "required": false, "description": "Regeneration request; omit to hide the action." },
12
+ { "name": "autohide", "type": "'always' | 'on-hover' | 'not-last'", "required": false, "defaultValue": "always", "enum": ["always", "on-hover", "not-last"], "description": "Controls visibility: always visible, visible on hover/focus, or hidden until hover for non-latest messages." },
12
13
  { "name": "labels", "type": "{ copy?, copied?, thumbUp?, thumbDown?, regenerate? }", "required": false, "description": "Overrides for all visible labels; enables localization." }
13
14
  ],
14
15
  "examples": [
@@ -29,6 +30,8 @@
29
30
  { "feature": "Toggle state", "implementation": "Rating buttons expose aria-pressed so screen readers announce selection." },
30
31
  { "feature": "Icon buttons", "implementation": "All icon-only controls have accessible labels; labels are localizable." }
31
32
  ],
33
+ "sourceDir": "message-actions",
34
+ "exportName": "MessageActions",
32
35
  "package": "@slipstream-ui/ai",
33
36
  "importPath": "@slipstream-ui/ai",
34
37
  "version": "0.0.1"
@@ -53,6 +53,12 @@
53
53
  "type": "boolean",
54
54
  "required": false,
55
55
  "description": "Shows a streaming indicator while reasoning is in progress"
56
+ },
57
+ {
58
+ "name": "labels",
59
+ "type": "{ title?: string; count?: (count: number) => string; thinking?: string; step?: (index: number) => string }",
60
+ "required": false,
61
+ "description": "Localized header, count and step labels."
56
62
  }
57
63
  ],
58
64
  "examples": [
@@ -45,6 +45,8 @@
45
45
  "implementation": "Routed through CodeBlock with accessible copy button."
46
46
  }
47
47
  ],
48
+ "sourceDir": "response",
49
+ "exportName": "Response",
48
50
  "package": "@slipstream-ui/ai",
49
51
  "importPath": "@slipstream-ui/ai",
50
52
  "version": "0.0.1"
@@ -30,6 +30,12 @@
30
30
  "type": "string",
31
31
  "required": false,
32
32
  "description": "Additional CSS classes to apply"
33
+ },
34
+ {
35
+ "name": "labels",
36
+ "type": "{ pending?: string; running?: string; completed?: string; failed?: string; arguments?: string; result?: string; error?: string }",
37
+ "required": false,
38
+ "description": "Localized status and section labels."
33
39
  }
34
40
  ],
35
41
  "examples": [