@heyramzi/ui 6.0.1 → 7.0.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 (114) hide show
  1. package/COMPONENTS.md +7 -26
  2. package/README.md +12 -5
  3. package/package.json +14 -16
  4. package/scripts/sync-shadcn.mjs +12 -3
  5. package/src/agents/agent-avatar.svelte +639 -0
  6. package/src/agents/agent-cast.svelte +173 -0
  7. package/src/agents/demo.svelte +78 -0
  8. package/src/agents/index.ts +11 -0
  9. package/src/agents/types.ts +72 -0
  10. package/{LICENSE → src/agents/vendor/LICENSE} +1 -1
  11. package/src/agents/vendor/color.ts +155 -0
  12. package/src/agents/vendor/draw.ts +840 -0
  13. package/src/agents/vendor/engine.ts +845 -0
  14. package/src/agents/vendor/mesh.ts +838 -0
  15. package/src/agents/vendor/plastic.ts +4958 -0
  16. package/src/agents/vendor/presets.ts +103 -0
  17. package/src/agents/vendor/shapes.ts +41 -0
  18. package/src/agents/vendor/ticker.ts +67 -0
  19. package/src/agents/vendor/types.ts +261 -0
  20. package/src/agents/vendor/wear.ts +1699 -0
  21. package/src/ai/index.ts +0 -18
  22. package/src/animations/README.md +3 -3
  23. package/src/lib/sliding-pill.ts +68 -0
  24. package/src/lib/theme-transition.ts +4 -2
  25. package/src/shadcn/code-block/code-block-actions.svelte +23 -0
  26. package/src/shadcn/code-block/code-block-content.svelte +55 -0
  27. package/src/shadcn/code-block/code-block-copy-button.svelte +59 -0
  28. package/src/shadcn/code-block/code-block-footer.svelte +20 -0
  29. package/src/shadcn/code-block/code-block-header.svelte +23 -0
  30. package/src/shadcn/code-block/code-block-line.svelte +71 -0
  31. package/src/shadcn/code-block/code-block-title.svelte +23 -0
  32. package/src/shadcn/code-block/code-block.svelte +47 -0
  33. package/src/shadcn/code-block/index.ts +42 -0
  34. package/src/shadcn/hooks/highlighter.ts +132 -0
  35. package/src/shadcn/hooks/use-highlighted-code.svelte.ts +98 -0
  36. package/src/shadcn/kbd/index.ts +10 -0
  37. package/src/shadcn/kbd/kbd-group.svelte +20 -0
  38. package/src/shadcn/kbd/kbd.svelte +23 -0
  39. package/src/shadcn/message-scroller/index.ts +28 -0
  40. package/src/shadcn/message-scroller/message-scroller-button.svelte +52 -0
  41. package/src/shadcn/message-scroller/message-scroller-content.svelte +17 -0
  42. package/src/shadcn/message-scroller/message-scroller-item.svelte +22 -0
  43. package/src/shadcn/message-scroller/message-scroller-provider.svelte +7 -0
  44. package/src/shadcn/message-scroller/message-scroller-viewport.svelte +20 -0
  45. package/src/shadcn/message-scroller/message-scroller.svelte +20 -0
  46. package/src/shadcn/tabs/tabs-list.svelte +13 -2
  47. package/src/shadcn/tabs/tabs-trigger.svelte +1 -1
  48. package/src/shadcn/trace/index.ts +29 -0
  49. package/src/shadcn/trace/trace-collapsible-content.svelte +29 -0
  50. package/src/shadcn/trace/trace-collapsible-trigger.svelte +29 -0
  51. package/src/shadcn/trace/trace-collapsible.svelte +20 -0
  52. package/src/shadcn/trace/trace-description.svelte +20 -0
  53. package/src/shadcn/trace/trace-icon.svelte +24 -0
  54. package/src/shadcn/trace/trace-line.svelte +31 -0
  55. package/src/shadcn/trace/trace-title.svelte +20 -0
  56. package/src/shadcn/trace/trace.svelte +23 -0
  57. package/src/showcase/AiSection.svelte +0 -7
  58. package/src/showcase/demos/shadcn/code-block.svelte +80 -0
  59. package/src/showcase/demos/shadcn/index.ts +24 -0
  60. package/src/showcase/demos/shadcn/message-scroller.svelte +44 -0
  61. package/src/showcase/demos/shadcn/trace.svelte +51 -0
  62. package/src/showcase/kit.ts +1 -2
  63. package/src/ai/conversation/Conversation.svelte +0 -28
  64. package/src/ai/conversation/ConversationContent.svelte +0 -35
  65. package/src/ai/conversation/ConversationEmptyState.svelte +0 -46
  66. package/src/ai/conversation/ConversationScrollButton.svelte +0 -51
  67. package/src/ai/conversation/index.ts +0 -33
  68. package/src/ai/conversation/stick-to-bottom-context.svelte.ts +0 -131
  69. package/src/charts/animated-value.css +0 -7
  70. package/src/charts/animated-value.svelte +0 -110
  71. package/src/charts/area-chart.css +0 -29
  72. package/src/charts/area-chart.svelte +0 -195
  73. package/src/charts/bar-chart.css +0 -119
  74. package/src/charts/bar-chart.svelte +0 -269
  75. package/src/charts/charts.css +0 -201
  76. package/src/charts/crosshair.svelte +0 -35
  77. package/src/charts/donut-chart.css +0 -56
  78. package/src/charts/donut-chart.svelte +0 -158
  79. package/src/charts/edge-fade.svelte +0 -43
  80. package/src/charts/edge-fade.ts +0 -16
  81. package/src/charts/figure.css +0 -100
  82. package/src/charts/figure.svelte +0 -122
  83. package/src/charts/gauge-chart.css +0 -94
  84. package/src/charts/gauge-chart.svelte +0 -303
  85. package/src/charts/hover-band.test.ts +0 -30
  86. package/src/charts/hover-band.ts +0 -21
  87. package/src/charts/hover-focus.svelte +0 -85
  88. package/src/charts/index.ts +0 -30
  89. package/src/charts/legend.css +0 -131
  90. package/src/charts/legend.svelte +0 -112
  91. package/src/charts/line-chart.css +0 -26
  92. package/src/charts/line-chart.svelte +0 -256
  93. package/src/charts/motion.ts +0 -19
  94. package/src/charts/number-chart.css +0 -168
  95. package/src/charts/number-chart.svelte +0 -177
  96. package/src/charts/primitives/chart-container.svelte +0 -57
  97. package/src/charts/primitives/chart-style.svelte +0 -36
  98. package/src/charts/primitives/chart-tooltip.svelte +0 -161
  99. package/src/charts/primitives/chart-utils.ts +0 -54
  100. package/src/charts/primitives/index.ts +0 -11
  101. package/src/charts/reveal.svelte +0 -61
  102. package/src/charts/ring-chart.css +0 -96
  103. package/src/charts/ring-chart.svelte +0 -158
  104. package/src/charts/sparkline.css +0 -45
  105. package/src/charts/sparkline.svelte +0 -140
  106. package/src/charts/stat-card.css +0 -103
  107. package/src/charts/stat-card.svelte +0 -267
  108. package/src/charts/time-series-chart.css +0 -28
  109. package/src/charts/time-series-chart.svelte +0 -179
  110. package/src/charts/trend-pill.css +0 -38
  111. package/src/charts/trend-pill.svelte +0 -48
  112. package/src/lib/hooks/is-mobile.svelte.ts +0 -11
  113. package/src/showcase/ChartsSection.svelte +0 -458
  114. package/src/showcase/demos/ai/conversation.svelte +0 -59
package/COMPONENTS.md CHANGED
@@ -21,6 +21,7 @@ The style layer lives in [`src/tokens.css`](./src/tokens.css) and the motion CSS
21
21
  - `calendar` — Calendar
22
22
  - `card` — Card
23
23
  - `checkbox` — Checkbox
24
+ - `code-block` — CodeBlock. Highlight with `useHighlightedCode` from `@heyramzi/ui/shadcn/hooks/use-highlighted-code.svelte` (Shiki, ANSI too)
24
25
  - `collapsible` — Collapsible
25
26
  - `command` — Command
26
27
  - `context-menu` — ContextMenu
@@ -34,6 +35,7 @@ The style layer lives in [`src/tokens.css`](./src/tokens.css) and the motion CSS
34
35
  - `label` — Label
35
36
  - `marker` — Marker
36
37
  - `message` — Message
38
+ - `message-scroller` — MessageScroller, the chat transcript scroller: follows a streamed reply, anchors each turn, keeps place on prepend
37
39
  - `popover` — Popover
38
40
  - `progress` — Progress
39
41
  - `radio-group` — RadioGroup
@@ -53,6 +55,7 @@ The style layer lives in [`src/tokens.css`](./src/tokens.css) and the motion CSS
53
55
  - `toggle` — toggleVariants, ToggleSize, ToggleVariant, ToggleVariants
54
56
  - `toggle-group` — ToggleGroup
55
57
  - `tooltip` — Tooltip
58
+ - `trace` — Trace, an agent's steps: reasoning, tool calls and sources as status rows that can expand
56
59
 
57
60
  ## Effects (`src/effects`)
58
61
 
@@ -66,7 +69,7 @@ The style layer lives in [`src/tokens.css`](./src/tokens.css) and the motion CSS
66
69
  - `reveal` — InView, AnimatedGroup, TextEffect, observeInView, RevealPreset, RevealPer
67
70
  - `shader-gradient` — ShaderGradient, ShaderGradientProps, ShaderGradientUniforms
68
71
  - `spotlight` — Spotlight
69
- - `theme-toggle` — ThemeToggle, revealTheme. Props: `isDark`, `mode` (`light`, `dark`, `system`; swaps in the Monitor icon), `onToggle`, `variant` (`outline`, `ghost`, `inverted`; `inverted` boolean is an alias), `size`, `label`, `title`, `skipTransition`, `class`. `revealTheme(event, apply, { skip, duration })` is the circular wipe on its own: `import { revealTheme } from "@heyramzi/ui"` (the `./lib/*` subpath points at `.js` and the source is `.ts`).
72
+ - `theme-toggle` — ThemeToggle, revealTheme. Props: `isDark`, `mode` (`light`, `dark`, `system`; swaps in the Monitor icon), `onToggle`, `variant` (`outline`, `ghost`, `inverted`; `inverted` boolean is an alias), `size`, `label`, `title`, `skipTransition`, `class`. `revealTheme(event, apply, { skip, duration, easing })` is the circular wipe on its own: `import { revealTheme } from "@heyramzi/ui"` (the `./lib/*` subpath points at `.js` and the source is `.ts`).
70
73
 
71
74
  ## Animations (`src/animations`)
72
75
 
@@ -102,7 +105,6 @@ The style layer lives in [`src/tokens.css`](./src/tokens.css) and the motion CSS
102
105
 
103
106
  - `composer` — Composer, ComposerProps
104
107
  - `confirmation` — Confirmation, ConfirmationTitle, ConfirmationRequest, ConfirmationAccepted, ConfirmationRejected, ConfirmationActions, ConfirmationAction
105
- - `conversation` — Conversation, ConversationContent, ConversationEmptyState, ConversationScrollButton
106
108
  - `loading-state` — PixelLoader
107
109
  - `prompt-input` — PromptInput, PromptInputBody, PromptInputToolbar, PromptInputTextarea, PromptInputSubmit
108
110
  - `reasoning` — Reasoning, ReasoningTrigger, ReasoningContent
@@ -112,30 +114,9 @@ The style layer lives in [`src/tokens.css`](./src/tokens.css) and the motion CSS
112
114
  - `typing-dots` — TypingDots
113
115
  - `voice-waveform` — VoiceWaveform
114
116
 
115
- ## Charts (`src/charts`)
116
-
117
- - `animated-value` — AnimatedValue
118
- - `area-chart` — AreaChart
119
- - `bar-chart` — BarChart
120
- - `crosshair` — Crosshair
121
- - `donut-chart` — DonutChart
122
- - `edge-fade` — EdgeFade
123
- - `figure` — Figure
124
- - `gauge-chart` — GaugeChart
125
- - `hover-focus` — HoverFocus
126
- - `legend` — Legend
127
- - `line-chart` — LineChart
128
- - `number-chart` — NumberChart
129
- - `reveal` — Reveal
130
- - `ring-chart` — RingChart
131
- - `sparkline` — Sparkline
132
- - `stat-card` — StatCard
133
- - `time-series-chart` — TimeSeriesChart
134
- - `trend-pill` — TrendPill
135
- - `primitives` — ChartContainer, ChartTooltip, ChartStyle, ChartConfig, TooltipSeriesItem, getPayloadConfigFromPayload
136
-
137
117
  ---
138
118
 
139
119
  Skipped on purpose: brand assets (logos, marks, brand renderer, language flags,
140
- locale switch), the bot avatars (they live in `@heyramzi/agents`), kanban and status
141
- (they live in `@heyramzi/board`).
120
+ locale switch), kanban, list, gantt and status (they live in `@heyramzi/tasks`), and charts
121
+ (they live in `@heyramzi/charts`). The bot avatars
122
+ are in `src/agents`, imported from `@heyramzi/ui/agents`.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @heyramzi/ui
2
2
 
3
3
  Svelte 5 UI primitives you copy into your project and own. Components, visual
4
- effects, CSS animations, charts and a small set of chat and AI surfaces. No build step, no runtime wrapper,
4
+ effects, CSS animations and a small set of chat and AI surfaces. No build step, no runtime wrapper,
5
5
  no framework lock-in.
6
6
 
7
7
  The package is a source registry. Every component is a folder under
@@ -15,9 +15,10 @@ only a convenience.
15
15
  image comparison, shimmer gradients and a theme toggle.
16
16
  - `src/animations` keyframe CSS for dropdowns, modals, tooltips, text swaps,
17
17
  success checks and the rest of the motion vocabulary.
18
- - `src/ai` chat and AI surfaces: conversation, composer, prompt input, response, reasoning, confirmation and loaders.
19
- - `src/charts` SVG charts: line, area, bar, donut, ring, gauge, sparkline,
20
- time series, and stat cards.
18
+ - `src/ai` chat and AI surfaces: composer, prompt input, response, reasoning, confirmation and loaders.
19
+ - `src/agents` bot avatars and a cast grid, imported from `@heyramzi/ui/agents`:
20
+ `AgentAvatar` draws an eyes-only face from a name, role, shape and colour, and
21
+ `AgentCast` lays a list of agents out as cards you can pick from.
21
22
 
22
23
  See [COMPONENTS.md](./COMPONENTS.md) for the full list, one line each.
23
24
 
@@ -40,6 +41,10 @@ Retheme by overriding any variable on `:root`, for example
40
41
  `--color-brand-indigo` or `--radius-lg`. Dark mode keys off a `.dark`
41
42
  class on `html`.
42
43
 
44
+ Charts live in their own package now,
45
+ [`@heyramzi/charts`](https://github.com/heyramzi/ui/tree/main/packages/charts). It reads
46
+ the same tokens, so import `tokens.css` once and both work.
47
+
43
48
  React and other framework ports are out of scope. The source is Svelte 5
44
49
  runes only.
45
50
 
@@ -119,7 +124,9 @@ there, use its page for props and examples:
119
124
  Inspired by [shadcn-svelte](https://github.com/huntabyte/shadcn-svelte).
120
125
  The reveal, marquee and beam effects are inspired by
121
126
  [motion-primitives](https://github.com/ibelick/motion-primitives), and the
122
- motion vocabulary by [transitions-dev](https://transitions.dev).
127
+ motion vocabulary by [transitions-dev](https://transitions.dev). The agent avatars
128
+ vendor [bot-avatars](https://github.com/jakubantalik/bot-avatars); its licence is in
129
+ `src/agents/vendor/LICENSE`.
123
130
 
124
131
  ## License
125
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyramzi/ui",
3
- "version": "6.0.1",
3
+ "version": "7.0.0",
4
4
  "description": "Svelte 5 UI primitives: effects, animations, and shared component CSS.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -115,11 +115,6 @@
115
115
  "./animations/*": {
116
116
  "default": "./src/animations/*"
117
117
  },
118
- "./charts": {
119
- "svelte": "./src/charts/index.ts",
120
- "types": "./src/charts/index.ts",
121
- "default": "./src/charts/index.ts"
122
- },
123
118
  "./showcase": {
124
119
  "svelte": "./src/showcase/index.ts",
125
120
  "types": "./src/showcase/index.ts",
@@ -130,10 +125,10 @@
130
125
  "types": "./src/showcase/kit.ts",
131
126
  "default": "./src/showcase/kit.ts"
132
127
  },
133
- "./shadcn/hooks/is-mobile.svelte": {
134
- "svelte": "./src/shadcn/hooks/is-mobile.svelte.ts",
135
- "types": "./src/shadcn/hooks/is-mobile.svelte.ts",
136
- "default": "./src/shadcn/hooks/is-mobile.svelte.ts"
128
+ "./shadcn/hooks/*": {
129
+ "svelte": "./src/shadcn/hooks/*.ts",
130
+ "types": "./src/shadcn/hooks/*.ts",
131
+ "default": "./src/shadcn/hooks/*.ts"
137
132
  },
138
133
  "./shadcn/*": {
139
134
  "svelte": "./src/shadcn/*/index.ts",
@@ -153,25 +148,28 @@
153
148
  "svelte": "./src/ai/*/index.ts",
154
149
  "types": "./src/ai/*/index.ts",
155
150
  "default": "./src/ai/*/index.ts"
156
- }
151
+ },
152
+ "./agents": {
153
+ "svelte": "./src/agents/index.ts",
154
+ "types": "./src/agents/index.ts",
155
+ "default": "./src/agents/index.ts"
156
+ },
157
+ "./agents/demo.svelte": "./src/agents/demo.svelte"
157
158
  },
158
159
  "dependencies": {
159
160
  "@heyramzi/utils": "^1.3.3",
160
161
  "@lucide/svelte": "^1.52.0",
162
+ "@shadcn-svelte/primitives": "^0.0.1",
161
163
  "clsx": "^2.1.1",
162
- "d3-scale": "^4.0.2",
163
- "d3-shape": "^3.2.0",
164
- "layerchart": "^2.5.1",
165
164
  "marked": "^18.1.0",
166
165
  "phosphor-svelte": "^3.1.0",
166
+ "shiki": "^4.5.0",
167
167
  "tailwind-merge": "^3.7.0",
168
168
  "tailwind-variants": "^3.3.1"
169
169
  },
170
170
  "devDependencies": {
171
171
  "@internationalized/date": "^3.12.4",
172
172
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
173
- "@types/d3-scale": "^4.0.9",
174
- "@types/d3-shape": "^3.2.0",
175
173
  "bits-ui": "^2.19.5",
176
174
  "jsdom": "^30.1.2",
177
175
  "mode-watcher": "^1.1.0",
@@ -42,12 +42,16 @@ const ALIASES = [
42
42
  ["$UTILS$.js", "@heyramzi/utils"],
43
43
  ["$UI$/", "../src/shadcn"],
44
44
  ["$HOOKS$/", "../src/shadcn/hooks"],
45
+ ["$LIB$/", "../src/shadcn/hooks"],
45
46
  ];
46
47
 
47
48
  /* Upstream target path -> ours, where the two differ. Everything else lands at
48
49
  * src/shadcn/<target>. */
49
50
  const REROUTE = {
50
51
  "is-mobile/is-mobile.svelte.ts": "src/shadcn/hooks/is-mobile.svelte.ts",
52
+ "highlighter/highlighter.ts": "src/shadcn/hooks/highlighter.ts",
53
+ "use-highlighted-code/use-highlighted-code.svelte.ts":
54
+ "src/shadcn/hooks/use-highlighted-code.svelte.ts",
51
55
  };
52
56
 
53
57
  const DOCS = "https://raw.githubusercontent.com/huntabyte/shadcn-svelte/main/docs";
@@ -90,12 +94,17 @@ const NOT_SHIPPED = new Set([
90
94
  // `cn` ships from @heyramzi/utils in vibe-kit, so a copy here would be a stray.
91
95
  "utils",
92
96
  "questionnaire",
93
- // Every app chat runs on our ai/conversation, so a second scroller would be two answers to one job.
94
- "message-scroller",
95
97
  ]);
96
98
 
97
99
  /* No demo to take: `hooks`, `is-mobile` and `utils` are not components, and `sidebar` demos as a page block. */
98
- const NO_DEMO = new Set(["hooks", "is-mobile", "sidebar", "utils"]);
100
+ const NO_DEMO = new Set([
101
+ "hooks",
102
+ "is-mobile",
103
+ "highlighter",
104
+ "use-highlighted-code",
105
+ "sidebar",
106
+ "utils",
107
+ ]);
99
108
 
100
109
  const adapt = (text) => ALIASES.reduce((acc, [from, to]) => acc.replaceAll(from, to), text);
101
110
  const adaptDemo = (text) =>