@kitnai/chat 0.6.0 → 0.8.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 (211) hide show
  1. package/README.md +9 -9
  2. package/dist/custom-elements.json +1676 -881
  3. package/dist/kitn-chat.es.js +36 -36
  4. package/dist/llms/llms-full.txt +316 -155
  5. package/dist/llms/llms.txt +18 -18
  6. package/dist/schemas/card-envelope.schema.json +14 -0
  7. package/dist/schemas/card-event.schema.json +12 -0
  8. package/dist/schemas/confirm.schema.json +65 -0
  9. package/dist/schemas/embed.schema.json +65 -0
  10. package/dist/schemas/form.result.schema.json +7 -0
  11. package/dist/schemas/form.schema.json +33 -0
  12. package/dist/schemas/link.schema.json +56 -0
  13. package/dist/schemas/task-list.result.schema.json +16 -0
  14. package/dist/schemas/task-list.schema.json +78 -0
  15. package/dist/theme.tokens.css +65 -65
  16. package/dist/tsx-B8rCNbgL.js +1 -0
  17. package/dist/typescript-RycA9KXf.js +1 -0
  18. package/frameworks/react/index.tsx +382 -193
  19. package/frameworks/react/runtime.tsx +2 -2
  20. package/llms-full.txt +316 -155
  21. package/llms.txt +18 -18
  22. package/package.json +5 -2
  23. package/src/components/artifact.stories.tsx +138 -0
  24. package/src/components/artifact.tsx +581 -0
  25. package/src/components/attachments.stories.tsx +7 -8
  26. package/src/components/attachments.tsx +2 -2
  27. package/src/components/card.tsx +110 -0
  28. package/src/components/chain-of-thought.stories.tsx +7 -8
  29. package/src/components/chat-container.stories.tsx +7 -8
  30. package/src/components/chat-container.tsx +4 -0
  31. package/src/components/checkpoint.stories.tsx +7 -8
  32. package/src/components/code-block.stories.tsx +8 -9
  33. package/src/components/component-meta.json +3411 -0
  34. package/src/components/confirm-card.stories.tsx +74 -0
  35. package/src/components/confirm-card.tsx +299 -0
  36. package/src/components/context.stories.tsx +7 -8
  37. package/src/components/conversation-item.stories.tsx +7 -8
  38. package/src/components/conversation-item.tsx +2 -2
  39. package/src/components/conversation-list.stories.tsx +7 -8
  40. package/src/components/conversation-list.tsx +1 -1
  41. package/src/components/embed.tsx +196 -0
  42. package/src/components/empty.stories.tsx +8 -9
  43. package/src/components/feedback-bar.stories.tsx +7 -8
  44. package/src/components/file-tree.stories.tsx +73 -0
  45. package/src/components/file-tree.tsx +383 -0
  46. package/src/components/file-upload.stories.tsx +7 -8
  47. package/src/components/form-widgets.tsx +461 -0
  48. package/src/components/form.tsx +796 -0
  49. package/src/components/image.stories.tsx +7 -8
  50. package/src/components/link-card.tsx +194 -0
  51. package/src/components/loader.stories.tsx +7 -8
  52. package/src/components/markdown.stories.tsx +7 -8
  53. package/src/components/message-narrow.stories.tsx +12 -13
  54. package/src/components/message-skills.stories.tsx +16 -17
  55. package/src/components/message.stories.tsx +17 -18
  56. package/src/components/model-switcher.stories.tsx +7 -8
  57. package/src/components/prompt-input.stories.tsx +8 -9
  58. package/src/components/prompt-suggestion.stories.tsx +7 -8
  59. package/src/components/prompt-suggestion.tsx +3 -3
  60. package/src/components/reasoning.stories.tsx +7 -8
  61. package/src/components/scroll-button.stories.tsx +7 -8
  62. package/src/components/slash-command.stories.tsx +8 -9
  63. package/src/components/slash-command.tsx +2 -2
  64. package/src/components/source.stories.tsx +7 -8
  65. package/src/components/source.tsx +1 -1
  66. package/src/components/task-list-card.stories.tsx +78 -0
  67. package/src/components/task-list-card.tsx +388 -0
  68. package/src/components/text-shimmer.stories.tsx +7 -8
  69. package/src/components/thinking-bar.stories.tsx +7 -8
  70. package/src/components/tool.stories.tsx +7 -8
  71. package/src/components/tool.tsx +2 -2
  72. package/src/components/voice-input.stories.tsx +7 -8
  73. package/src/elements/artifact.stories.tsx +291 -0
  74. package/src/elements/artifact.tsx +72 -0
  75. package/src/elements/{kitn-attachments.stories.tsx → attachments.stories.tsx} +11 -11
  76. package/src/elements/attachments.tsx +4 -4
  77. package/src/elements/card.stories.tsx +118 -0
  78. package/src/elements/card.tsx +40 -0
  79. package/src/elements/catalog.stories.tsx +491 -0
  80. package/src/elements/{kitn-chain-of-thought.stories.tsx → chain-of-thought.stories.tsx} +13 -13
  81. package/src/elements/chain-of-thought.tsx +3 -3
  82. package/src/elements/{kitn-chat-scope-picker.stories.tsx → chat-scope-picker.stories.tsx} +10 -10
  83. package/src/elements/chat-scope-picker.tsx +4 -4
  84. package/src/elements/{kitn-chat-workspace.stories.tsx → chat-workspace.stories.tsx} +71 -29
  85. package/src/elements/chat-workspace.tsx +29 -3
  86. package/src/elements/{kitn-chat.stories.tsx → chat.stories.tsx} +61 -16
  87. package/src/elements/chat.tsx +23 -2
  88. package/src/elements/{kitn-checkpoint.stories.tsx → checkpoint.stories.tsx} +11 -11
  89. package/src/elements/checkpoint.tsx +4 -4
  90. package/src/elements/{kitn-code-block.stories.tsx → code-block.stories.tsx} +10 -10
  91. package/src/elements/code-block.tsx +3 -3
  92. package/src/elements/compiled.css +1 -1
  93. package/src/elements/composed-shell.stories.tsx +316 -0
  94. package/src/elements/confirm-card.stories.tsx +186 -0
  95. package/src/elements/confirm-card.tsx +45 -0
  96. package/src/elements/{kitn-context-meter.stories.tsx → context-meter.stories.tsx} +10 -10
  97. package/src/elements/context-meter.tsx +3 -3
  98. package/src/elements/{kitn-conversation-list.stories.tsx → conversation-list.stories.tsx} +35 -22
  99. package/src/elements/conversation-list.tsx +11 -2
  100. package/src/elements/css.ts +1 -1
  101. package/src/elements/define.tsx +10 -10
  102. package/src/elements/element-meta.json +2649 -0
  103. package/src/elements/element-types.d.ts +251 -125
  104. package/src/elements/embed.stories.tsx +197 -0
  105. package/src/elements/embed.tsx +35 -0
  106. package/src/elements/{kitn-empty.stories.tsx → empty.stories.tsx} +12 -12
  107. package/src/elements/empty.tsx +3 -3
  108. package/src/elements/{kitn-feedback-bar.stories.tsx → feedback-bar.stories.tsx} +11 -11
  109. package/src/elements/feedback-bar.tsx +4 -4
  110. package/src/elements/file-tree.stories.tsx +133 -0
  111. package/src/elements/file-tree.tsx +52 -0
  112. package/src/elements/{kitn-file-upload.stories.tsx → file-upload.stories.tsx} +12 -12
  113. package/src/elements/file-upload.tsx +4 -4
  114. package/src/elements/form.stories.tsx +204 -0
  115. package/src/elements/form.tsx +37 -0
  116. package/src/elements/{kitn-image.stories.tsx → image.stories.tsx} +10 -10
  117. package/src/elements/image.tsx +3 -3
  118. package/src/elements/link-card.stories.tsx +193 -0
  119. package/src/elements/link-card.tsx +34 -0
  120. package/src/elements/{kitn-loader.stories.tsx → loader.stories.tsx} +11 -11
  121. package/src/elements/loader.tsx +3 -3
  122. package/src/elements/{kitn-markdown.stories.tsx → markdown.stories.tsx} +10 -10
  123. package/src/elements/markdown.tsx +3 -3
  124. package/src/elements/{kitn-message-skills.stories.tsx → message-skills.stories.tsx} +10 -10
  125. package/src/elements/message-skills.tsx +3 -3
  126. package/src/elements/{kitn-message.stories.tsx → message.stories.tsx} +12 -12
  127. package/src/elements/message.tsx +5 -5
  128. package/src/elements/{kitn-model-switcher.stories.tsx → model-switcher.stories.tsx} +10 -10
  129. package/src/elements/model-switcher.tsx +5 -5
  130. package/src/elements/{kitn-prompt-input.stories.tsx → prompt-input.stories.tsx} +41 -19
  131. package/src/elements/prompt-input.tsx +5 -5
  132. package/src/elements/{kitn-prompt-suggestions.stories.tsx → prompt-suggestions.stories.tsx} +13 -13
  133. package/src/elements/prompt-suggestions.tsx +4 -4
  134. package/src/elements/{kitn-reasoning.stories.tsx → reasoning.stories.tsx} +10 -10
  135. package/src/elements/reasoning.tsx +4 -4
  136. package/src/elements/register.ts +11 -1
  137. package/src/elements/resizable.stories.tsx +200 -0
  138. package/src/elements/resizable.tsx +264 -0
  139. package/src/elements/{kitn-response-stream.stories.tsx → response-stream.stories.tsx} +10 -10
  140. package/src/elements/response-stream.tsx +4 -4
  141. package/src/elements/{kitn-source-list.stories.tsx → source-list.stories.tsx} +11 -11
  142. package/src/elements/{kitn-source.stories.tsx → source.stories.tsx} +12 -12
  143. package/src/elements/source.tsx +5 -5
  144. package/src/elements/styles.css +140 -1
  145. package/src/elements/task-list-card.stories.tsx +194 -0
  146. package/src/elements/task-list-card.tsx +40 -0
  147. package/src/elements/{kitn-text-shimmer.stories.tsx → text-shimmer.stories.tsx} +10 -10
  148. package/src/elements/text-shimmer.tsx +3 -3
  149. package/src/elements/{kitn-thinking-bar.stories.tsx → thinking-bar.stories.tsx} +11 -11
  150. package/src/elements/thinking-bar.tsx +5 -5
  151. package/src/elements/{kitn-tool.stories.tsx → tool.stories.tsx} +10 -10
  152. package/src/elements/tool.tsx +3 -3
  153. package/src/elements/{kitn-voice-input.stories.tsx → voice-input.stories.tsx} +10 -10
  154. package/src/elements/voice-input.tsx +4 -4
  155. package/src/index.ts +94 -2
  156. package/src/primitives/card-contract.ts +60 -0
  157. package/src/primitives/card-host.tsx +35 -0
  158. package/src/primitives/card-routing.ts +79 -0
  159. package/src/primitives/card-schemas/card-envelope.schema.json +14 -0
  160. package/src/primitives/card-schemas/card-event.schema.json +12 -0
  161. package/src/primitives/card-schemas/confirm.schema.json +65 -0
  162. package/src/primitives/card-schemas/embed.schema.json +65 -0
  163. package/src/primitives/card-schemas/form.result.schema.json +7 -0
  164. package/src/primitives/card-schemas/form.schema.json +33 -0
  165. package/src/primitives/card-schemas/link.schema.json +56 -0
  166. package/src/primitives/card-schemas/task-list.result.schema.json +16 -0
  167. package/src/primitives/card-schemas/task-list.schema.json +78 -0
  168. package/src/primitives/card-validate.ts +95 -0
  169. package/src/primitives/embed-providers.ts +254 -0
  170. package/src/primitives/highlighter.ts +4 -0
  171. package/src/primitives/link-preview.ts +87 -0
  172. package/src/primitives/pdf-preview.ts +121 -0
  173. package/src/stories/chat-panel-layout.stories.tsx +2 -1
  174. package/src/stories/chat-scene.tsx +22 -21
  175. package/src/stories/checkpoint-restore.stories.tsx +10 -10
  176. package/src/stories/conversation-with-reasoning.stories.tsx +4 -4
  177. package/src/stories/conversation-with-sources.stories.tsx +7 -7
  178. package/src/stories/docs/Accessibility.mdx +2 -2
  179. package/src/stories/docs/ForAIAgents.mdx +3 -3
  180. package/src/stories/docs/GettingStarted.mdx +2 -2
  181. package/src/stories/docs/Installation.mdx +2 -2
  182. package/src/stories/docs/Integrations.mdx +29 -29
  183. package/src/stories/docs/Introduction.mdx +3 -3
  184. package/src/stories/docs/Theming.mdx +2 -2
  185. package/src/stories/docs/element-controls.ts +60 -0
  186. package/src/stories/docs/theme-editor/theme-editor.tsx +1 -0
  187. package/src/stories/examples/ChoosingComponents.mdx +94 -0
  188. package/src/stories/examples/sample-data.ts +79 -0
  189. package/src/stories/message-actions.stories.tsx +13 -13
  190. package/src/stories/pattern-centered-conversation.stories.tsx +3 -3
  191. package/src/stories/pattern-docked-widget.stories.tsx +1 -1
  192. package/src/stories/pattern-empty-state.stories.tsx +3 -3
  193. package/src/stories/prompt-input-variants.stories.tsx +13 -13
  194. package/src/stories/streaming-response.stories.tsx +3 -3
  195. package/src/stories/typography.stories.tsx +4 -4
  196. package/src/ui/avatar.stories.tsx +7 -8
  197. package/src/ui/badge.stories.tsx +7 -8
  198. package/src/ui/button.stories.tsx +8 -9
  199. package/src/ui/button.tsx +1 -0
  200. package/src/ui/collapsible.stories.tsx +6 -7
  201. package/src/ui/dropdown.stories.tsx +6 -7
  202. package/src/ui/hover-card.stories.tsx +6 -7
  203. package/src/ui/resizable.stories.tsx +74 -9
  204. package/src/ui/resizable.tsx +351 -71
  205. package/src/ui/scroll-area.stories.tsx +6 -7
  206. package/src/ui/scroll-area.tsx +3 -1
  207. package/src/ui/separator.stories.tsx +7 -8
  208. package/src/ui/skeleton.stories.tsx +7 -8
  209. package/src/ui/textarea.stories.tsx +6 -7
  210. package/src/ui/tooltip.stories.tsx +8 -9
  211. package/theme.css +65 -65
@@ -6,7 +6,9 @@ export interface ScrollAreaProps extends JSX.HTMLAttributes<HTMLDivElement> { ch
6
6
  export function ScrollArea(props: ScrollAreaProps) {
7
7
  const [local, rest] = splitProps(props, ['children', 'class']);
8
8
  return (
9
- <div class={cn('overflow-y-auto scrollbar-thin', local.class)} {...rest}>
9
+ // tabindex=0 keeps the scroll region reachable by keyboard when it has no
10
+ // focusable descendants (WCAG 2.1.1 — axe `scrollable-region-focusable`).
11
+ <div tabindex={0} class={cn('overflow-y-auto scrollbar-thin', local.class)} {...rest}>
10
12
  {local.children}
11
13
  </div>
12
14
  );
@@ -1,5 +1,6 @@
1
1
  import type { Meta, StoryObj } from 'storybook-solidjs-vite';
2
2
  import { Separator } from './separator';
3
+ import { componentDescription } from '../stories/docs/element-controls';
3
4
 
4
5
  const meta = {
5
6
  title: 'UI/Separator',
@@ -9,14 +10,12 @@ const meta = {
9
10
  layout: 'padded',
10
11
  docs: {
11
12
  controls: { exclude: ['use:eventListener'] },
12
- description: {
13
- component: [
14
- 'A thin **divider** line (a `role="separator"` element) that visually splits content either horizontally or vertically.',
15
- '**When to use:** to separate stacked sections, group items in a menu/list, or divide inline controls in a toolbar.',
16
- '**How to use:** set `orientation` to `horizontal` (full-width line) or `vertical` (full-height line). For a vertical separator, give the parent a height so the line has something to fill.',
17
- '**Placement:** between message groups, in dropdown/menu sections, header toolbars, and between sidebar regions.',
18
- ].join('\n\n'),
19
- },
13
+ description: componentDescription([
14
+ 'A thin **divider** line (a `role="separator"` element) that visually splits content either horizontally or vertically.',
15
+ '**When to use:** to separate stacked sections, group items in a menu/list, or divide inline controls in a toolbar.',
16
+ '**How to use:** set `orientation` to `horizontal` (full-width line) or `vertical` (full-height line). For a vertical separator, give the parent a height so the line has something to fill.',
17
+ '**Placement:** between message groups, in dropdown/menu sections, header toolbars, and between sidebar regions.',
18
+ ]),
20
19
  },
21
20
  },
22
21
  argTypes: {
@@ -1,5 +1,6 @@
1
1
  import type { Meta, StoryObj } from 'storybook-solidjs-vite';
2
2
  import { Skeleton } from './skeleton';
3
+ import { componentDescription } from '../stories/docs/element-controls';
3
4
 
4
5
  const meta = {
5
6
  title: 'UI/Skeleton',
@@ -9,14 +10,12 @@ const meta = {
9
10
  layout: 'padded',
10
11
  docs: {
11
12
  controls: { exclude: ['use:eventListener'] },
12
- description: {
13
- component: [
14
- 'A pulsing **placeholder** block used to indicate loading content. It has no shape of its own size and rounding come from the `class` you pass.',
15
- '**When to use:** while content (messages, lists, cards, tool output) is loading, to preserve layout and signal progress without a spinner.',
16
- '**How to use:** compose one or more `Skeleton` elements and set width/height/rounding via utility classes (e.g. `class="h-4 w-3/4"`). Build skeletons that mirror the real layout they replace.',
17
- '**Placement:** message bubbles, conversation lists, code blocks, tool calls, input areas, and full-page loading states.',
18
- ].join('\n\n'),
19
- },
13
+ description: componentDescription([
14
+ 'A pulsing **placeholder** block used to indicate loading content. It has no shape of its own — size and rounding come from the `class` you pass.',
15
+ '**When to use:** while content (messages, lists, cards, tool output) is loading, to preserve layout and signal progress without a spinner.',
16
+ '**How to use:** compose one or more `Skeleton` elements and set width/height/rounding via utility classes (e.g. `class="h-4 w-3/4"`). Build skeletons that mirror the real layout they replace.',
17
+ '**Placement:** message bubbles, conversation lists, code blocks, tool calls, input areas, and full-page loading states.',
18
+ ]),
20
19
  },
21
20
  },
22
21
  argTypes: {
@@ -1,6 +1,7 @@
1
1
  import type { Meta, StoryObj } from 'storybook-solidjs-vite';
2
2
  import type { JSX } from 'solid-js';
3
3
  import { Textarea } from './textarea';
4
+ import { componentDescription } from '../stories/docs/element-controls';
4
5
 
5
6
  const meta = {
6
7
  title: 'UI/Textarea',
@@ -9,13 +10,11 @@ const meta = {
9
10
  parameters: {
10
11
  layout: 'padded',
11
12
  docs: {
12
- description: {
13
- component: [
14
- 'A single-line-by-default textarea that auto-grows with its content up to an optional `maxHeight`, after which it scrolls. It is **transparent and borderless by design** it is meant to drop into a composed input frame that owns the visual boundary and focus ring (the demos below wrap it exactly the way `PromptInput` / `<kitn-prompt-input>` does, with `focus-within` on the frame). This is the editable surface behind `PromptInput`.',
15
- '**When to use:** free-text entry that may span multiple lines a chat composer, a comment box, an editable note.',
16
- '**How to use:** drop it inside a framed container and use it like a native `<textarea>` (`value`, `placeholder`, `onInput`, …). Auto-resize is on by default; set `maxHeight` (px) to cap growth, or `autoResize={false}` for a fixed-height field.',
17
- ].join('\n\n'),
18
- },
13
+ description: componentDescription([
14
+ 'A single-line-by-default textarea that auto-grows with its content up to an optional `maxHeight`, after which it scrolls. It is **transparent and borderless by design** — it is meant to drop into a composed input frame that owns the visual boundary and focus ring (the demos below wrap it exactly the way `PromptInput` / `<kc-prompt-input>` does, with `focus-within` on the frame). This is the editable surface behind `PromptInput`.',
15
+ '**When to use:** free-text entry that may span multiple linesa chat composer, a comment box, an editable note.',
16
+ '**How to use:** drop it inside a framed container and use it like a native `<textarea>` (`value`, `placeholder`, `onInput`, …). Auto-resize is on by default; set `maxHeight` (px) to cap growth, or `autoResize={false}` for a fixed-height field.',
17
+ ]),
19
18
  },
20
19
  },
21
20
  argTypes: {
@@ -1,6 +1,7 @@
1
1
  import type { Meta, StoryObj } from 'storybook-solidjs-vite';
2
2
  import { Tooltip } from './tooltip';
3
3
  import { Button } from './button';
4
+ import { componentDescription } from '../stories/docs/element-controls';
4
5
 
5
6
  const meta = {
6
7
  title: 'UI/Tooltip',
@@ -9,14 +10,12 @@ const meta = {
9
10
  parameters: {
10
11
  layout: 'padded',
11
12
  docs: {
12
- description: {
13
- component: [
14
- 'A small floating label that appears on hover/focus of its trigger element, built with a DIY overlay-core implementation (no third-party dependency, no arrow).',
15
- '**When to use:** to clarify the purpose of icon-only buttons or terse controls short, supplementary hints that are not essential to complete the action.',
16
- '**How to use:** wrap a single interactive `children` element and set `content` to the hint text. The child becomes the trigger.',
17
- '**Placement:** toolbars, message action rows, and any compact icon control where a label would not otherwise fit.',
18
- ].join('\n\n'),
19
- },
13
+ description: componentDescription([
14
+ 'A small floating label that appears on hover/focus of its trigger element, built with a DIY overlay-core implementation (no third-party dependency, no arrow).',
15
+ '**When to use:** to clarify the purpose of icon-only buttons or terse controls — short, supplementary hints that are not essential to complete the action.',
16
+ '**How to use:** wrap a single interactive `children` element and set `content` to the hint text. The child becomes the trigger.',
17
+ '**Placement:** toolbars, message action rows, and any compact icon control where a label would not otherwise fit.',
18
+ ]),
20
19
  controls: { exclude: ['use:eventListener'] },
21
20
  },
22
21
  },
@@ -59,7 +58,7 @@ export const Playground: Story = {
59
58
  export const OnIconButton: Story = {
60
59
  render: () => (
61
60
  <Tooltip content="Add new item">
62
- <Button variant="ghost" size="icon-sm">
61
+ <Button variant="ghost" size="icon-sm" aria-label="Add new item">
63
62
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
64
63
  <line x1="12" y1="5" x2="12" y2="19" />
65
64
  <line x1="5" y1="12" x2="19" y2="12" />
package/theme.css CHANGED
@@ -9,51 +9,51 @@
9
9
  @custom-variant dark (&:is(.dark *));
10
10
 
11
11
  @theme {
12
- --color-background: var(--kitn-color-background, hsl(0 0% 100%));
13
- --color-foreground: var(--kitn-color-foreground, hsl(240 10% 3.9%));
14
- --color-card: var(--kitn-color-card, hsl(0 0% 100%));
15
- --color-card-foreground: var(--kitn-color-card-foreground, hsl(240 10% 3.9%));
16
- --color-popover: var(--kitn-color-popover, hsl(0 0% 100%));
17
- --color-popover-foreground: var(--kitn-color-popover-foreground, hsl(240 10% 3.9%));
18
- --color-primary: var(--kitn-color-primary, hsl(240 5.9% 10%));
19
- --color-primary-foreground: var(--kitn-color-primary-foreground, hsl(0 0% 98%));
20
- --color-secondary: var(--kitn-color-secondary, hsl(240 4.8% 95.9%));
21
- --color-secondary-foreground: var(--kitn-color-secondary-foreground, hsl(240 5.9% 10%));
22
- --color-muted: var(--kitn-color-muted, hsl(240 4.8% 95.9%));
23
- --color-muted-foreground: var(--kitn-color-muted-foreground, hsl(240 3.8% 43%));
24
- --color-accent: var(--kitn-color-accent, hsl(240 4.8% 95.9%));
25
- --color-accent-foreground: var(--kitn-color-accent-foreground, hsl(240 5.9% 10%));
26
- --color-destructive: var(--kitn-color-destructive, hsl(0 84.2% 60.2%));
27
- --color-destructive-foreground: var(--kitn-color-destructive-foreground, hsl(0 0% 98%));
28
- --color-border: var(--kitn-color-border, hsl(240 5.9% 90%));
29
- --color-input: var(--kitn-color-input, hsl(240 5.9% 90%));
12
+ --color-background: var(--kc-color-background, hsl(0 0% 100%));
13
+ --color-foreground: var(--kc-color-foreground, hsl(240 10% 3.9%));
14
+ --color-card: var(--kc-color-card, hsl(0 0% 100%));
15
+ --color-card-foreground: var(--kc-color-card-foreground, hsl(240 10% 3.9%));
16
+ --color-popover: var(--kc-color-popover, hsl(0 0% 100%));
17
+ --color-popover-foreground: var(--kc-color-popover-foreground, hsl(240 10% 3.9%));
18
+ --color-primary: var(--kc-color-primary, hsl(240 5.9% 10%));
19
+ --color-primary-foreground: var(--kc-color-primary-foreground, hsl(0 0% 98%));
20
+ --color-secondary: var(--kc-color-secondary, hsl(240 4.8% 95.9%));
21
+ --color-secondary-foreground: var(--kc-color-secondary-foreground, hsl(240 5.9% 10%));
22
+ --color-muted: var(--kc-color-muted, hsl(240 4.8% 95.9%));
23
+ --color-muted-foreground: var(--kc-color-muted-foreground, hsl(240 3.8% 43%));
24
+ --color-accent: var(--kc-color-accent, hsl(240 4.8% 95.9%));
25
+ --color-accent-foreground: var(--kc-color-accent-foreground, hsl(240 5.9% 10%));
26
+ --color-destructive: var(--kc-color-destructive, hsl(0 72% 45%));
27
+ --color-destructive-foreground: var(--kc-color-destructive-foreground, hsl(0 0% 98%));
28
+ --color-border: var(--kc-color-border, hsl(240 5.9% 90%));
29
+ --color-input: var(--kc-color-input, hsl(240 5.9% 90%));
30
30
  /* Focus ring — a deliberate blue (not a neutral) so keyboard focus is always
31
31
  obvious and on-brand in both modes. Light uses a strong blue; dark uses a
32
32
  brighter one for contrast on dark surfaces. Both clear WCAG 2.1 non-text
33
- contrast (≥3:1) against the kit's backgrounds. Override via --kitn-color-ring. */
34
- --color-ring: var(--kitn-color-ring, hsl(217 91% 53%));
33
+ contrast (≥3:1) against the kit's backgrounds. Override via --kc-color-ring. */
34
+ --color-ring: var(--kc-color-ring, hsl(217 91% 53%));
35
35
  /* Custom scrollbars — thin, rounded, subtle; thumb strengthens on hover. A
36
36
  consistent cross-platform look (the kit styles its OWN scroll regions inside
37
37
  the shadow root; the track stays transparent so nothing is forced where no
38
- scrollbar is needed). Override via --kitn-color-scrollbar-thumb(-hover). */
39
- --color-scrollbar-thumb: var(--kitn-color-scrollbar-thumb, hsl(240 5% 80%));
40
- --color-scrollbar-thumb-hover: var(--kitn-color-scrollbar-thumb-hover, hsl(240 4% 64%));
41
- --color-sidebar: var(--kitn-color-sidebar, hsl(0 0% 100%));
38
+ scrollbar is needed). Override via --kc-color-scrollbar-thumb(-hover). */
39
+ --color-scrollbar-thumb: var(--kc-color-scrollbar-thumb, hsl(240 5% 80%));
40
+ --color-scrollbar-thumb-hover: var(--kc-color-scrollbar-thumb-hover, hsl(240 4% 64%));
41
+ --color-sidebar: var(--kc-color-sidebar, hsl(0 0% 100%));
42
42
 
43
43
  /* Inline `code` accent. Blue text on a translucent blue chip. */
44
- --color-code-foreground: var(--kitn-color-code-foreground, hsl(224.3 76.3% 48%));
44
+ --color-code-foreground: var(--kc-color-code-foreground, hsl(224.3 76.3% 48%));
45
45
 
46
46
  /* Tool/status chip hues. Each chip is hue text over a 15% translucent fill of
47
47
  the SAME hue (set in tool.tsx). The bare hue is too light to reach WCAG AA
48
48
  (4.5:1) on the faint fill in LIGHT mode, so the light values are darkened;
49
49
  dark mode keeps brighter hues for AA on the dark fill. Override via
50
- --kitn-color-tool-* to retheme. */
51
- --color-tool-blue: var(--kitn-color-tool-blue, hsl(217 91% 38%));
52
- --color-tool-amber: var(--kitn-color-tool-amber, hsl(38 92% 28%));
53
- --color-tool-green: var(--kitn-color-tool-green, hsl(142 71% 26%));
54
- --color-tool-red: var(--kitn-color-tool-red, hsl(0 72% 42%));
50
+ --kc-color-tool-* to retheme. */
51
+ --color-tool-blue: var(--kc-color-tool-blue, hsl(217 91% 38%));
52
+ --color-tool-amber: var(--kc-color-tool-amber, hsl(38 92% 28%));
53
+ --color-tool-green: var(--kc-color-tool-green, hsl(142 71% 26%));
54
+ --color-tool-red: var(--kc-color-tool-red, hsl(0 72% 42%));
55
55
 
56
- --radius: var(--kitn-radius, 0.6rem);
56
+ --radius: var(--kc-radius, 0.6rem);
57
57
  --radius-sm: calc(var(--radius) - 4px);
58
58
  --radius-md: calc(var(--radius) - 2px);
59
59
  --radius-lg: var(--radius);
@@ -61,16 +61,16 @@
61
61
 
62
62
  /* Typography scale — semantic sizes shared by all components. Each generates a
63
63
  Tailwind utility (text-caption / text-meta / text-body / text-title). To
64
- restyle the kit's typography, override the namespaced --kitn-text-* token on
65
- :root (e.g. `--kitn-text-body: 0.9375rem`) — it pierces the Shadow DOM via the
66
- var() fallback, exactly like the --kitn-color-* tokens. The bare --text-*
64
+ restyle the kit's typography, override the namespaced --kc-text-* token on
65
+ :root (e.g. `--kc-text-body: 0.9375rem`) — it pierces the Shadow DOM via the
66
+ var() fallback, exactly like the --kc-color-* tokens. The bare --text-*
67
67
  names stay internal so a host's own --text-* can't collide. (Message/markdown/
68
68
  input reading size also scales with the `proseSize` prop; these tokens cover
69
69
  the fixed chrome & controls.) */
70
- --text-caption: var(--kitn-text-caption, 0.6875rem); --text-caption--line-height: 1rem; /* 11px — micro labels, badges, sub-counts */
71
- --text-meta: var(--kitn-text-meta, 0.75rem); --text-meta--line-height: 1.1rem; /* 12px — controls, toggles, switchers, captions */
72
- --text-body: var(--kitn-text-body, 0.875rem); --text-body--line-height: 1.45rem; /* 14px — primary reading text */
73
- --text-title: var(--kitn-text-title, 1rem); --text-title--line-height: 1.5rem; /* 16px — emphasis / headers */
70
+ --text-caption: var(--kc-text-caption, 0.6875rem); --text-caption--line-height: 1rem; /* 11px — micro labels, badges, sub-counts */
71
+ --text-meta: var(--kc-text-meta, 0.75rem); --text-meta--line-height: 1.1rem; /* 12px — controls, toggles, switchers, captions */
72
+ --text-body: var(--kc-text-body, 0.875rem); --text-body--line-height: 1.45rem; /* 14px — primary reading text */
73
+ --text-title: var(--kc-text-title, 1rem); --text-title--line-height: 1.5rem; /* 16px — emphasis / headers */
74
74
 
75
75
  @keyframes typing { 0%,100% { transform: translateY(0); opacity: .5 } 50% { transform: translateY(-2px); opacity: 1 } }
76
76
  @keyframes loading-dots { 0%,100% { opacity: 0 } 50% { opacity: 1 } }
@@ -89,35 +89,35 @@
89
89
  }
90
90
 
91
91
  .dark {
92
- --color-background: var(--kitn-color-background, hsl(50 2% 9%));
93
- --color-foreground: var(--kitn-color-foreground, hsl(0 0% 98%));
94
- --color-card: var(--kitn-color-card, hsl(45 4% 12%));
95
- --color-card-foreground: var(--kitn-color-card-foreground, hsl(0 0% 98%));
96
- --color-popover: var(--kitn-color-popover, hsl(45 4% 12%));
97
- --color-popover-foreground: var(--kitn-color-popover-foreground, hsl(0 0% 98%));
98
- --color-primary: var(--kitn-color-primary, hsl(0 0% 98%));
99
- --color-primary-foreground: var(--kitn-color-primary-foreground, hsl(45 4% 11%));
100
- --color-secondary: var(--kitn-color-secondary, hsl(45 4% 17%));
101
- --color-secondary-foreground: var(--kitn-color-secondary-foreground, hsl(0 0% 98%));
102
- --color-muted: var(--kitn-color-muted, hsl(45 4% 17%));
103
- --color-muted-foreground: var(--kitn-color-muted-foreground, hsl(45 4% 64%));
104
- --color-accent: var(--kitn-color-accent, hsl(45 4% 17%));
105
- --color-accent-foreground: var(--kitn-color-accent-foreground, hsl(0 0% 98%));
106
- --color-destructive: var(--kitn-color-destructive, hsl(0 62.8% 30.6%));
107
- --color-destructive-foreground: var(--kitn-color-destructive-foreground, hsl(0 0% 98%));
108
- --color-border: var(--kitn-color-border, hsl(45 4% 17%));
109
- --color-input: var(--kitn-color-input, hsl(45 4% 17%));
110
- --color-ring: var(--kitn-color-ring, hsl(217 91% 68%));
111
- --color-scrollbar-thumb: var(--kitn-color-scrollbar-thumb, hsl(45 3% 30%));
112
- --color-scrollbar-thumb-hover: var(--kitn-color-scrollbar-thumb-hover, hsl(45 3% 42%));
113
- --color-sidebar: var(--kitn-color-sidebar, hsl(50 2% 7%));
114
- --color-code-foreground: var(--kitn-color-code-foreground, hsl(213 94% 78%));
92
+ --color-background: var(--kc-color-background, hsl(50 2% 9%));
93
+ --color-foreground: var(--kc-color-foreground, hsl(0 0% 98%));
94
+ --color-card: var(--kc-color-card, hsl(45 4% 12%));
95
+ --color-card-foreground: var(--kc-color-card-foreground, hsl(0 0% 98%));
96
+ --color-popover: var(--kc-color-popover, hsl(45 4% 12%));
97
+ --color-popover-foreground: var(--kc-color-popover-foreground, hsl(0 0% 98%));
98
+ --color-primary: var(--kc-color-primary, hsl(0 0% 98%));
99
+ --color-primary-foreground: var(--kc-color-primary-foreground, hsl(45 4% 11%));
100
+ --color-secondary: var(--kc-color-secondary, hsl(45 4% 17%));
101
+ --color-secondary-foreground: var(--kc-color-secondary-foreground, hsl(0 0% 98%));
102
+ --color-muted: var(--kc-color-muted, hsl(45 4% 17%));
103
+ --color-muted-foreground: var(--kc-color-muted-foreground, hsl(45 4% 64%));
104
+ --color-accent: var(--kc-color-accent, hsl(45 4% 17%));
105
+ --color-accent-foreground: var(--kc-color-accent-foreground, hsl(0 0% 98%));
106
+ --color-destructive: var(--kc-color-destructive, hsl(0 62.8% 30.6%));
107
+ --color-destructive-foreground: var(--kc-color-destructive-foreground, hsl(0 0% 98%));
108
+ --color-border: var(--kc-color-border, hsl(45 4% 17%));
109
+ --color-input: var(--kc-color-input, hsl(45 4% 17%));
110
+ --color-ring: var(--kc-color-ring, hsl(217 91% 68%));
111
+ --color-scrollbar-thumb: var(--kc-color-scrollbar-thumb, hsl(45 3% 30%));
112
+ --color-scrollbar-thumb-hover: var(--kc-color-scrollbar-thumb-hover, hsl(45 3% 42%));
113
+ --color-sidebar: var(--kc-color-sidebar, hsl(50 2% 7%));
114
+ --color-code-foreground: var(--kc-color-code-foreground, hsl(213 94% 78%));
115
115
 
116
116
  /* Tool/status chip hues — dark mode. Brighter hues reach AA on the dark fill. */
117
- --color-tool-blue: var(--kitn-color-tool-blue, hsl(217 91% 70%));
118
- --color-tool-amber: var(--kitn-color-tool-amber, hsl(38 92% 50%));
119
- --color-tool-green: var(--kitn-color-tool-green, hsl(142 71% 45%));
120
- --color-tool-red: var(--kitn-color-tool-red, hsl(0 84% 70%));
117
+ --color-tool-blue: var(--kc-color-tool-blue, hsl(217 91% 70%));
118
+ --color-tool-amber: var(--kc-color-tool-amber, hsl(38 92% 50%));
119
+ --color-tool-green: var(--kc-color-tool-green, hsl(142 71% 45%));
120
+ --color-tool-red: var(--kc-color-tool-red, hsl(0 84% 70%));
121
121
  }
122
122
 
123
123
  /* Self-contained markdown styling — replaces the typography plugin's `prose`.