@rubrion/agent-kit-react 0.0.0-stage → 0.1.1

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,83 @@
1
+ /* agent-kit: the few styles Tailwind utilities can't express (markdown, mascot,
2
+ motion). Colors come from the shadcn/ui tokens (--primary, --muted, --border…). */
3
+
4
+ /* The kit's roots carry .ak. On a host without Tailwind's preflight, this resets the
5
+ elements the components draw, so browser defaults don't show through. In the base
6
+ layer, so the utilities on each element win. */
7
+ @layer base {
8
+ :where(.ak, .ak *), :where(.ak, .ak *)::before, :where(.ak, .ak *)::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid var(--border, currentColor); }
9
+ :where(.ak) :where(button, input, textarea, select) { font: inherit; color: inherit; background: transparent; letter-spacing: inherit; }
10
+ :where(.ak) :where(button, [role="button"]) { cursor: pointer; }
11
+ :where(.ak) :where(textarea) { resize: none; }
12
+ :where(.ak) :where(ol, ul, menu) { list-style: none; }
13
+ :where(.ak) :where(h1, h2, h3, h4, h5, h6) { font-size: inherit; font-weight: inherit; }
14
+ :where(.ak) :where(svg, img) { display: block; max-width: 100%; }
15
+ :where(.ak) :where(a) { color: inherit; text-decoration: inherit; }
16
+ }
17
+
18
+ @keyframes ak-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
19
+ .ak-rise { animation: ak-rise 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
20
+
21
+ /* The corner button jumping for attention: falls fast, rises slow, so the top of the arc hangs. */
22
+ @keyframes ak-jump {
23
+ 0%, 100% { transform: translateY(-22%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
24
+ 50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
25
+ }
26
+ .ak-jump { animation: ak-jump 1.8s infinite; }
27
+
28
+ /* Mascot: an eye. The pupil's follow-the-cursor offset is set inline (Mascot.tsx);
29
+ these animate the layers inside it, so both combine. */
30
+ .ak-mascot { display: block; flex: 0 0 auto; overflow: visible; color: var(--primary, #555); }
31
+ .ak-mascot__badge { fill: var(--card, #fff); stroke: color-mix(in oklab, var(--foreground, #222) 18%, transparent); }
32
+ .ak-mascot__white { fill: color-mix(in oklab, var(--card, #fff) 92%, var(--foreground, #222)); }
33
+ .ak-mascot__lid, .ak-mascot__lash { stroke: var(--foreground, #222); }
34
+ .ak-mascot__ring { stroke: color-mix(in oklab, var(--card, #fff) 55%, transparent); }
35
+ .ak-mascot__pupil { fill: var(--foreground, #111); }
36
+ .ak-mascot__glint { fill: #fff; opacity: 0.9; }
37
+ .ak-mascot__eye, .ak-mascot__gaze, .ak-mascot__ring, .ak-mascot__iris, .ak-mascot__pupil { transform-box: view-box; transform-origin: 32px 32px; }
38
+ .ak-mascot__look { transition: transform 0.12s ease-out; }
39
+
40
+ /* Idle: a quick blink now and then. */
41
+ @keyframes ak-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.08); } }
42
+ .ak-mascot--idle .ak-mascot__eye { animation: ak-blink 5.2s infinite; }
43
+
44
+ /* Thinking: the gaze drifts up and the pupil narrows, like looking for the answer. */
45
+ @keyframes ak-ponder { 0%, 100% { transform: translate(2.5px, -3.5px); } 50% { transform: translate(-2.5px, -4px); } }
46
+ .ak-mascot--thinking .ak-mascot__gaze { animation: ak-ponder 2.4s ease-in-out infinite; }
47
+ .ak-mascot--thinking .ak-mascot__pupil { transform: scale(0.75); }
48
+
49
+ /* Using a tool: scanning side to side, the iris ring turning. */
50
+ @keyframes ak-scan { 0%, 100% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
51
+ @keyframes ak-turn { to { transform: rotate(360deg); } }
52
+ .ak-mascot--tool .ak-mascot__gaze { animation: ak-scan 1.1s ease-in-out infinite; }
53
+ .ak-mascot--tool .ak-mascot__ring { animation: ak-turn 1.6s linear infinite; }
54
+
55
+ /* Speaking: the iris pulses with the words. */
56
+ @keyframes ak-pulse { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.12); } }
57
+ .ak-mascot--speaking .ak-mascot__iris { animation: ak-pulse 0.5s ease-in-out infinite; }
58
+ .ak-mascot--speaking .ak-mascot__pupil { animation: ak-pulse 0.5s ease-in-out infinite reverse; }
59
+
60
+ @media (prefers-reduced-motion: reduce) {
61
+ .ak-rise, .ak-jump, .ak-mascot * { animation: none !important; transition: none !important; }
62
+ }
63
+
64
+ /* Markdown answers */
65
+ .ak-md { font-size: 0.875rem; line-height: 1.6; overflow-wrap: anywhere; }
66
+ .ak-md > * + * { margin-top: 0.6em; }
67
+ .ak-md h1, .ak-md h2, .ak-md h3 { font-weight: 600; line-height: 1.3; margin-top: 1em; }
68
+ .ak-md h1 { font-size: 1.15em; } .ak-md h2 { font-size: 1.07em; } .ak-md h3 { font-size: 1em; }
69
+ .ak-md ul, .ak-md ol { padding-left: 1.3em; }
70
+ .ak-md ul { list-style: disc; } .ak-md ol { list-style: decimal; }
71
+ .ak-md li + li { margin-top: 0.2em; }
72
+ .ak-md a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
73
+ .ak-md strong { font-weight: 600; }
74
+ .ak-md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; background: var(--muted); border-radius: 4px; padding: 0.1em 0.35em; }
75
+ .ak-md pre { position: relative; background: var(--muted); border-radius: 8px; padding: 0.75em; overflow-x: auto; }
76
+ .ak-md pre code { background: none; padding: 0; }
77
+ .ak-md blockquote { border-left: 3px solid var(--border); padding-left: 0.8em; color: var(--muted-foreground); }
78
+ .ak-md table { width: 100%; border-collapse: collapse; font-size: 0.95em; display: block; overflow-x: auto; }
79
+ .ak-md th, .ak-md td { border: 1px solid var(--border); padding: 0.3em 0.55em; text-align: left; }
80
+ .ak-md th { background: var(--muted); font-weight: 600; }
81
+ .ak-md hr { border: 0; border-top: 1px solid var(--border); }
82
+ .ak-copy { position: absolute; top: 0.4em; right: 0.4em; font-size: 11px; padding: 0.1em 0.5em; border-radius: 4px; border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground); opacity: 0; transition: opacity 0.15s; }
83
+ .ak-md pre:hover .ak-copy, .ak-copy:focus-visible { opacity: 1; }
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@rubrion/agent-kit-react",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "React chat UI for the agent kit: floating chat box, full assistant screen, streamed steps (thinking, tool calls, text).",
5
+ "license": "MIT",
6
+ "author": "Rubrion",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./styles.css": "./dist/styles.css"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "sideEffects": [
22
+ "*.css"
23
+ ],
24
+ "scripts": {
25
+ "build": "rm -rf dist && tsc -p tsconfig.json && cp src/styles.css dist/styles.css",
26
+ "test": "vitest run",
27
+ "prepublishOnly": "npm run build"
28
+ },
29
+ "dependencies": {
30
+ "dompurify": "^3.4.17",
31
+ "marked": "^18.1.2"
32
+ },
33
+ "peerDependencies": {
34
+ "lucide-react": ">=0.400.0",
35
+ "react": ">=18",
36
+ "react-dom": ">=18"
37
+ },
38
+ "devDependencies": {
39
+ "@types/react": "^19.1.0",
40
+ "@types/react-dom": "^19.1.0",
41
+ "lucide-react": "^1.65.0",
42
+ "react": "^19.3.1",
43
+ "react-dom": "^19.3.1",
44
+ "typescript": "^5.9.3",
45
+ "vitest": "^5.0.5"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "engines": {
51
+ "node": ">=20"
52
+ }
53
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.