@agentage/components 0.21.0 → 0.22.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.
- package/README.md +15 -11
- package/dist/components/accordion.trigger.js +1 -1
- package/dist/components/approval-bar.d.ts +14 -0
- package/dist/components/approval-bar.d.ts.map +1 -0
- package/dist/components/approval-bar.js +40 -0
- package/dist/components/chat.icons.d.ts +6 -0
- package/dist/components/chat.icons.d.ts.map +1 -0
- package/dist/components/chat.icons.js +23 -0
- package/dist/components/check-list.js +1 -1
- package/dist/components/code-block.body.d.ts +7 -0
- package/dist/components/code-block.body.d.ts.map +1 -0
- package/dist/components/code-block.body.js +24 -0
- package/dist/components/code-block.d.ts +5 -1
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +39 -37
- package/dist/components/context-meter.d.ts +16 -0
- package/dist/components/context-meter.d.ts.map +1 -0
- package/dist/components/context-meter.js +58 -0
- package/dist/components/conversation.d.ts +13 -0
- package/dist/components/conversation.d.ts.map +1 -0
- package/dist/components/conversation.js +61 -0
- package/dist/components/data-table.variants.d.ts.map +1 -1
- package/dist/components/data-table.variants.js +2 -2
- package/dist/components/data-view.board-card.d.ts.map +1 -1
- package/dist/components/data-view.board-card.js +1 -1
- package/dist/components/data-view.d.ts +1 -1
- package/dist/components/data-view.d.ts.map +1 -1
- package/dist/components/data-view.hooks.d.ts +2 -3
- package/dist/components/data-view.hooks.d.ts.map +1 -1
- package/dist/components/data-view.hooks.js +7 -7
- package/dist/components/data-view.types.d.ts +6 -4
- package/dist/components/data-view.types.d.ts.map +1 -1
- package/dist/components/description-list.property.js +1 -1
- package/dist/components/group-header.js +1 -1
- package/dist/components/index.d.ts +19 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +10 -1
- package/dist/components/log-view.row.d.ts.map +1 -1
- package/dist/components/log-view.row.js +26 -27
- package/dist/components/markdown.d.ts +11 -0
- package/dist/components/markdown.d.ts.map +1 -0
- package/dist/components/markdown.js +21 -0
- package/dist/components/markdown.parts.d.ts +4 -0
- package/dist/components/markdown.parts.d.ts.map +1 -0
- package/dist/components/markdown.parts.js +91 -0
- package/dist/components/menu.variants.js +1 -1
- package/dist/components/message.d.ts +10 -0
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +22 -0
- package/dist/components/prompt-input.d.ts +22 -0
- package/dist/components/prompt-input.d.ts.map +1 -0
- package/dist/components/prompt-input.js +59 -0
- package/dist/components/reasoning.d.ts +13 -0
- package/dist/components/reasoning.d.ts.map +1 -0
- package/dist/components/reasoning.js +43 -0
- package/dist/components/row.variants.d.ts.map +1 -1
- package/dist/components/row.variants.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tool-call.d.ts +25 -0
- package/dist/components/tool-call.d.ts.map +1 -0
- package/dist/components/tool-call.js +52 -0
- package/dist/components/tool-call.parts.d.ts +29 -0
- package/dist/components/tool-call.parts.d.ts.map +1 -0
- package/dist/components/tool-call.parts.js +96 -0
- package/dist/components/tool-group.d.ts +20 -0
- package/dist/components/tool-group.d.ts.map +1 -0
- package/dist/components/tool-group.js +49 -0
- package/dist/index.js +10 -1
- package/dist/lib/highlight-code.d.ts +9 -0
- package/dist/lib/highlight-code.d.ts.map +1 -0
- package/dist/lib/highlight-code.js +67 -0
- package/dist/lib/utils.d.ts +4 -4
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/package.json +40 -4
- package/src/styles/syntax.css +92 -0
- package/src/styles/theme.css +3 -0
- package/src/styles/tokens.css +68 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Agentage Components - Syntax colours
|
|
3
|
+
*
|
|
4
|
+
* highlight.js classes mapped to the --syntax-* tokens (tokens.css), so every
|
|
5
|
+
* highlighted block in both themes uses one palette.
|
|
6
|
+
* ============================================================================ */
|
|
7
|
+
|
|
8
|
+
.hljs {
|
|
9
|
+
color: var(--syntax-text);
|
|
10
|
+
background: transparent;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.hljs-comment,
|
|
14
|
+
.hljs-quote {
|
|
15
|
+
color: var(--syntax-comment);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.hljs-keyword,
|
|
19
|
+
.hljs-literal,
|
|
20
|
+
.hljs-meta,
|
|
21
|
+
.hljs-name,
|
|
22
|
+
.hljs-section,
|
|
23
|
+
.hljs-strong,
|
|
24
|
+
.hljs-meta .hljs-keyword {
|
|
25
|
+
color: var(--syntax-keyword);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hljs-built_in,
|
|
29
|
+
.hljs-type,
|
|
30
|
+
.hljs-title.class_ {
|
|
31
|
+
color: var(--syntax-type);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.hljs-title,
|
|
35
|
+
.hljs-title.function_ {
|
|
36
|
+
color: var(--syntax-function);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.hljs-string,
|
|
40
|
+
.hljs-code,
|
|
41
|
+
.hljs-link,
|
|
42
|
+
.hljs-deletion,
|
|
43
|
+
.hljs-meta .hljs-string {
|
|
44
|
+
color: var(--syntax-string);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.hljs-regexp {
|
|
48
|
+
color: var(--syntax-regexp);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.hljs-char.escape_,
|
|
52
|
+
.hljs-selector-tag,
|
|
53
|
+
.hljs-selector-class,
|
|
54
|
+
.hljs-selector-id,
|
|
55
|
+
.hljs-selector-attr,
|
|
56
|
+
.hljs-selector-pseudo {
|
|
57
|
+
color: var(--syntax-selector);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.hljs-number,
|
|
61
|
+
.hljs-addition {
|
|
62
|
+
color: var(--syntax-number);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.hljs-attr,
|
|
66
|
+
.hljs-attribute,
|
|
67
|
+
.hljs-property,
|
|
68
|
+
.hljs-variable,
|
|
69
|
+
.hljs-template-variable,
|
|
70
|
+
.hljs-params,
|
|
71
|
+
.hljs-symbol {
|
|
72
|
+
color: var(--syntax-property);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.hljs-bullet {
|
|
76
|
+
color: var(--syntax-bullet);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.hljs-tag,
|
|
80
|
+
.hljs-punctuation,
|
|
81
|
+
.hljs-operator {
|
|
82
|
+
color: var(--syntax-text);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hljs-emphasis {
|
|
86
|
+
font-style: italic;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.hljs-section,
|
|
90
|
+
.hljs-strong {
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
}
|
package/src/styles/theme.css
CHANGED
|
@@ -6,5 +6,8 @@
|
|
|
6
6
|
/* Semantic tokens, typography, shadows, animation - theme-dependent */
|
|
7
7
|
@import './tokens.css';
|
|
8
8
|
|
|
9
|
+
/* highlight.js classes on the --syntax-* tokens */
|
|
10
|
+
@import './syntax.css';
|
|
11
|
+
|
|
9
12
|
/* Base element styles - resets, scrollbar, body defaults */
|
|
10
13
|
@import './base.css';
|
package/src/styles/tokens.css
CHANGED
|
@@ -170,6 +170,25 @@
|
|
|
170
170
|
--z-toast: 100;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/* ============================================================================
|
|
174
|
+
* Syntax colours (code blocks): the editor dark palette, light values below.
|
|
175
|
+
* Plain vars, not @theme: they colour highlight.js spans in syntax.css only.
|
|
176
|
+
* ============================================================================ */
|
|
177
|
+
|
|
178
|
+
:root {
|
|
179
|
+
--syntax-text: #d4d4d4;
|
|
180
|
+
--syntax-comment: #6a9955;
|
|
181
|
+
--syntax-keyword: #569cd6;
|
|
182
|
+
--syntax-string: #ce9178;
|
|
183
|
+
--syntax-number: #b5cea8;
|
|
184
|
+
--syntax-property: #9cdcfe;
|
|
185
|
+
--syntax-function: #dcdcaa;
|
|
186
|
+
--syntax-type: #4ec9b0;
|
|
187
|
+
--syntax-selector: #d7ba7d;
|
|
188
|
+
--syntax-regexp: #d16969;
|
|
189
|
+
--syntax-bullet: #6796e6;
|
|
190
|
+
}
|
|
191
|
+
|
|
173
192
|
/* ============================================================================
|
|
174
193
|
* Light Theme Overrides
|
|
175
194
|
* ============================================================================ */
|
|
@@ -241,6 +260,19 @@ html[data-theme='light'] {
|
|
|
241
260
|
--shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.06), 0 2px 4px -2px oklch(0 0 0 / 0.06);
|
|
242
261
|
--shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.06), 0 4px 6px -4px oklch(0 0 0 / 0.06);
|
|
243
262
|
--shadow-popover: 0 8px 24px -6px oklch(0 0 0 / 0.16), 0 2px 6px -2px oklch(0 0 0 / 0.08);
|
|
263
|
+
|
|
264
|
+
/* Editor light palette; number and type are one step darker so they clear 4.5:1 on the card. */
|
|
265
|
+
--syntax-text: #1f1f1f;
|
|
266
|
+
--syntax-comment: #008000;
|
|
267
|
+
--syntax-keyword: #0000ff;
|
|
268
|
+
--syntax-string: #a31515;
|
|
269
|
+
--syntax-number: #07754d;
|
|
270
|
+
--syntax-property: #001080;
|
|
271
|
+
--syntax-function: #795e26;
|
|
272
|
+
--syntax-type: #1f6f84;
|
|
273
|
+
--syntax-selector: #800000;
|
|
274
|
+
--syntax-regexp: #811f3f;
|
|
275
|
+
--syntax-bullet: #0451a5;
|
|
244
276
|
}
|
|
245
277
|
|
|
246
278
|
/* System preference fallback */
|
|
@@ -308,6 +340,19 @@ html[data-theme='light'] {
|
|
|
308
340
|
--shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.06), 0 2px 4px -2px oklch(0 0 0 / 0.06);
|
|
309
341
|
--shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.06), 0 4px 6px -4px oklch(0 0 0 / 0.06);
|
|
310
342
|
--shadow-popover: 0 8px 24px -6px oklch(0 0 0 / 0.16), 0 2px 6px -2px oklch(0 0 0 / 0.08);
|
|
343
|
+
|
|
344
|
+
/* Mirrors the html[data-theme='light'] syntax values. */
|
|
345
|
+
--syntax-text: #1f1f1f;
|
|
346
|
+
--syntax-comment: #008000;
|
|
347
|
+
--syntax-keyword: #0000ff;
|
|
348
|
+
--syntax-string: #a31515;
|
|
349
|
+
--syntax-number: #07754d;
|
|
350
|
+
--syntax-property: #001080;
|
|
351
|
+
--syntax-function: #795e26;
|
|
352
|
+
--syntax-type: #1f6f84;
|
|
353
|
+
--syntax-selector: #800000;
|
|
354
|
+
--syntax-regexp: #811f3f;
|
|
355
|
+
--syntax-bullet: #0451a5;
|
|
311
356
|
}
|
|
312
357
|
}
|
|
313
358
|
|
|
@@ -334,6 +379,29 @@ html[data-theme='light'] {
|
|
|
334
379
|
transition-duration: var(--duration-normal);
|
|
335
380
|
}
|
|
336
381
|
|
|
382
|
+
/* Derived once on the root so `on-accent` can read it (a property cannot read itself). */
|
|
383
|
+
:root {
|
|
384
|
+
--color-destructive-on-accent: color-mix(
|
|
385
|
+
in oklab,
|
|
386
|
+
var(--color-destructive) 70%,
|
|
387
|
+
var(--color-foreground)
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* Text on an accent surface (hover, selected, open): lifts muted and destructive text to AA.
|
|
392
|
+
* Use it with the state variant: `hover:bg-accent hover:on-accent`. Contrast on the accent, dark / light:
|
|
393
|
+
* muted 7.2:1 / 8.2:1 (the plain token is 3.6:1 in dark), destructive 5.8:1 / 8.2:1 (plain 3.75:1 in
|
|
394
|
+
* dark). The destructive mix is computed at the root; where that variable is missing the fallback
|
|
395
|
+
* mixes the solid red instead (5.2:1 / 6.6:1), since a property cannot read itself. It resets nothing
|
|
396
|
+
* below it: do not put a card or popover surface inside an on-accent element. */
|
|
397
|
+
@utility on-accent {
|
|
398
|
+
--color-muted-foreground: color-mix(in oklab, var(--color-foreground) 72%, var(--color-accent));
|
|
399
|
+
--color-destructive: var(
|
|
400
|
+
--color-destructive-on-accent,
|
|
401
|
+
color-mix(in oklab, var(--color-destructive-solid) 70%, var(--color-foreground))
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
|
|
337
405
|
/* Same ring on a visual box whose focusable element is the `group` parent. */
|
|
338
406
|
@utility group-focus-ring {
|
|
339
407
|
:where(.group):focus-visible & {
|