@timbal-ai/timbal-react 0.2.2 → 0.3.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.
@@ -0,0 +1,210 @@
1
+ /*
2
+ * Optional companion styles for `@timbal-ai/timbal-react`.
3
+ *
4
+ * Import this once from your app entry to get the polished defaults that
5
+ * the blueprint used inline:
6
+ *
7
+ * import "@timbal-ai/timbal-react/styles.css";
8
+ *
9
+ * Tailwind v4 is required for the design tokens (`var(--primary)`, etc.).
10
+ * The package itself ships no bundled CSS — you can drop this file entirely
11
+ * and ship your own.
12
+ */
13
+
14
+ /* ── AI breathing icon (welcome screen) ── */
15
+ @keyframes timbal-ai-breathe {
16
+ 0%, 100% { transform: scale(1); opacity: 0.72; }
17
+ 50% { transform: scale(1.1); opacity: 1; }
18
+ }
19
+
20
+ @keyframes timbal-ai-ring-glow {
21
+ 0%, 100% { opacity: 1; }
22
+ 50% { opacity: 0.55; }
23
+ }
24
+
25
+ @keyframes timbal-ai-pulse-ring {
26
+ 0% { box-shadow: 0 0 0 0 oklch(from var(--primary, #6366f1) l c h / 0.18); }
27
+ 65% { box-shadow: 0 0 0 8px oklch(from var(--primary, #6366f1) l c h / 0); }
28
+ 100% { box-shadow: 0 0 0 0 oklch(from var(--primary, #6366f1) l c h / 0); }
29
+ }
30
+
31
+ .animate-ai-breathe {
32
+ animation: timbal-ai-breathe 3.2s ease-in-out infinite;
33
+ }
34
+
35
+ .animate-ai-ring-glow {
36
+ animation: timbal-ai-ring-glow 3.2s ease-in-out infinite;
37
+ }
38
+
39
+ .animate-ai-pulse-ring {
40
+ animation: timbal-ai-pulse-ring 3.2s ease-in-out infinite;
41
+ border-radius: var(--radius-xl, 12px);
42
+ }
43
+
44
+ /* ── Markdown inline code ── */
45
+ .dark code:not(pre code) {
46
+ background-color: oklch(0.269 0 0 / 0.8);
47
+ }
48
+
49
+ /* ── Shiki dual-theme support ── */
50
+ .shiki-wrapper pre {
51
+ background: var(--shiki-light-bg, oklch(0.98 0 0)) !important;
52
+ }
53
+ .shiki-wrapper code,
54
+ .shiki-wrapper code span {
55
+ color: var(--shiki-light, inherit);
56
+ }
57
+ .dark .shiki-wrapper pre {
58
+ background: var(--shiki-dark-bg, oklch(0.13 0 0)) !important;
59
+ }
60
+ .dark .shiki-wrapper code,
61
+ .dark .shiki-wrapper code span {
62
+ color: var(--shiki-dark, inherit);
63
+ }
64
+
65
+ /* Code-block line numbers */
66
+ .shiki-wrapper code {
67
+ counter-reset: line;
68
+ }
69
+ .shiki-wrapper code > .line::before {
70
+ counter-increment: line;
71
+ content: counter(line);
72
+ display: inline-block;
73
+ width: 1.5rem;
74
+ margin-right: 1rem;
75
+ text-align: right;
76
+ color: oklch(0.556 0 0 / 0.3);
77
+ font-size: 0.7em;
78
+ user-select: none;
79
+ }
80
+ .dark .shiki-wrapper code > .line::before {
81
+ color: oklch(0.556 0 0 / 0.25);
82
+ }
83
+
84
+ /* ── KaTeX math rendering ── */
85
+ .katex-display {
86
+ margin: 1.25rem 0 !important;
87
+ padding: 1rem 1.25rem;
88
+ background: oklch(0.97 0 0 / 0.6);
89
+ border: 1px solid oklch(0.922 0 0);
90
+ border-radius: 0.5rem;
91
+ overflow-x: auto;
92
+ overflow-y: hidden;
93
+ }
94
+ .dark .katex-display {
95
+ background: oklch(0.2 0 0 / 0.5);
96
+ border-color: oklch(1 0 0 / 0.08);
97
+ }
98
+ .katex-display > .katex {
99
+ text-align: center;
100
+ }
101
+ .katex {
102
+ font-size: 1.05em !important;
103
+ }
104
+ .katex-display .katex {
105
+ font-size: 1.15em !important;
106
+ }
107
+ .katex:not(.katex-display .katex) {
108
+ padding: 0 0.15em;
109
+ }
110
+
111
+ /* ── Markdown table zebra striping ── */
112
+ .aui-md-table tbody tr:nth-child(even) {
113
+ background: oklch(0.97 0 0 / 0.4);
114
+ }
115
+ .dark .aui-md-table tbody tr:nth-child(even) {
116
+ background: oklch(0.2 0 0 / 0.3);
117
+ }
118
+
119
+ /* ── Code header polish ── */
120
+ .aui-code-header {
121
+ backdrop-filter: blur(8px);
122
+ }
123
+
124
+ /* ── Smooth link transitions ── */
125
+ .aui-md-a {
126
+ transition: color 0.15s ease, text-decoration-color 0.15s ease;
127
+ }
128
+
129
+ /* ── Blockquote gradient border ── */
130
+ .aui-md-blockquote {
131
+ border-image: linear-gradient(
132
+ to bottom,
133
+ oklch(0.488 0.243 264.376 / 0.6),
134
+ oklch(0.627 0.265 303.9 / 0.3)
135
+ ) 1;
136
+ }
137
+
138
+ /* ── GFM task list checkboxes ── */
139
+ .aui-md-li input[type="checkbox"] {
140
+ appearance: none;
141
+ -webkit-appearance: none;
142
+ width: 14px;
143
+ height: 14px;
144
+ border: 1.5px solid oklch(0.556 0 0 / 0.4);
145
+ border-radius: 4px;
146
+ margin-right: 0.4em;
147
+ vertical-align: middle;
148
+ position: relative;
149
+ top: -1px;
150
+ cursor: default;
151
+ transition: all 0.15s ease;
152
+ }
153
+ .aui-md-li input[type="checkbox"]:checked {
154
+ background: oklch(0.488 0.243 264.376);
155
+ border-color: oklch(0.488 0.243 264.376);
156
+ }
157
+ .aui-md-li input[type="checkbox"]:checked::after {
158
+ content: "";
159
+ position: absolute;
160
+ left: 50%;
161
+ top: 45%;
162
+ width: 3px;
163
+ height: 6px;
164
+ border: solid white;
165
+ border-width: 0 1.5px 1.5px 0;
166
+ transform: translate(-50%, -50%) rotate(45deg);
167
+ }
168
+
169
+ /* ── Custom scrollbars ── */
170
+ .aui-thread-root,
171
+ .aui-thread-root * {
172
+ scrollbar-width: thin;
173
+ scrollbar-color: oklch(0.708 0 0 / 0.3) transparent;
174
+ }
175
+
176
+ .aui-thread-root *::-webkit-scrollbar {
177
+ width: 8px;
178
+ height: 8px;
179
+ }
180
+
181
+ .aui-thread-root *::-webkit-scrollbar-track {
182
+ background: transparent;
183
+ border-radius: 4px;
184
+ }
185
+
186
+ .aui-thread-root *::-webkit-scrollbar-thumb {
187
+ background: oklch(0.708 0 0 / 0.3);
188
+ border-radius: 4px;
189
+ border: 2px solid transparent;
190
+ background-clip: content-box;
191
+ transition: all 0.2s ease;
192
+ }
193
+
194
+ .aui-thread-root *::-webkit-scrollbar-thumb:hover {
195
+ background: oklch(0.708 0 0 / 0.5);
196
+ background-clip: content-box;
197
+ }
198
+
199
+ .dark .aui-thread-root,
200
+ .dark .aui-thread-root * {
201
+ scrollbar-color: oklch(0.708 0 0 / 0.4) transparent;
202
+ }
203
+
204
+ .dark .aui-thread-root *::-webkit-scrollbar-thumb {
205
+ background: oklch(0.708 0 0 / 0.4);
206
+ }
207
+
208
+ .dark .aui-thread-root *::-webkit-scrollbar-thumb:hover {
209
+ background: oklch(0.708 0 0 / 0.6);
210
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timbal-ai/timbal-react",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "React components and runtime for building Timbal chat UIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -11,7 +11,8 @@
11
11
  "types": "./dist/index.d.ts",
12
12
  "import": "./dist/index.esm.js",
13
13
  "require": "./dist/index.cjs"
14
- }
14
+ },
15
+ "./styles.css": "./dist/styles.css"
15
16
  },
16
17
  "files": [
17
18
  "dist",