reifyui 0.1.0 → 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.
- package/README.md +7 -3
- package/dist/index.cjs +581 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +53 -0
- package/dist/index.js +590 -172
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/dialog.css +145 -0
- package/styles/tasks.css +59 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reifyui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The open-source rendering & interaction layer for agentic applications. Stream and render any agent's output as polished, application-native UI — model-agnostic, framework-agnostic, design-system-native. The foundation for building generative-UI and agent products.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* Dialog — in-app alert / confirm / prompt. Theme-driven: every colour is a variable with a
|
|
2
|
+
sensible fallback, so this inherits the host app's palette without configuration. */
|
|
3
|
+
|
|
4
|
+
.rui-dlg-root { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
|
|
5
|
+
|
|
6
|
+
.rui-dlg-backdrop {
|
|
7
|
+
position: fixed; inset: 0;
|
|
8
|
+
display: flex; align-items: center; justify-content: center;
|
|
9
|
+
padding: 16px;
|
|
10
|
+
background: var(--rui-scrim, rgba(15, 23, 42, .34));
|
|
11
|
+
backdrop-filter: blur(2px);
|
|
12
|
+
pointer-events: auto;
|
|
13
|
+
animation: rui-dlg-fade 120ms ease-out;
|
|
14
|
+
}
|
|
15
|
+
@keyframes rui-dlg-fade { from { opacity: 0 } to { opacity: 1 } }
|
|
16
|
+
|
|
17
|
+
.rui-dlg-card {
|
|
18
|
+
width: min(440px, 100%);
|
|
19
|
+
max-height: 90vh;
|
|
20
|
+
display: flex; flex-direction: column;
|
|
21
|
+
background: var(--rui-surface, #fff);
|
|
22
|
+
border: 1px solid var(--rui-border, rgba(15, 23, 42, .08));
|
|
23
|
+
border-radius: 14px;
|
|
24
|
+
box-shadow: 0 24px 60px rgba(15, 23, 42, .18), 0 4px 16px rgba(15, 23, 42, .08);
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
animation: rui-dlg-pop 140ms cubic-bezier(.2, .7, .2, 1.05);
|
|
27
|
+
}
|
|
28
|
+
.rui-dlg-card.is-wide { width: min(560px, 100%); }
|
|
29
|
+
@keyframes rui-dlg-pop {
|
|
30
|
+
from { transform: translateY(8px) scale(.97); opacity: 0 }
|
|
31
|
+
to { transform: translateY(0) scale(1); opacity: 1 }
|
|
32
|
+
}
|
|
33
|
+
@media (prefers-reduced-motion: reduce) {
|
|
34
|
+
.rui-dlg-backdrop, .rui-dlg-card { animation: none; }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.rui-dlg-h { padding: 16px 20px 0; }
|
|
38
|
+
.rui-dlg-title {
|
|
39
|
+
font-size: 15px; font-weight: 600; line-height: 1.4;
|
|
40
|
+
color: var(--rui-text, #0f172a);
|
|
41
|
+
}
|
|
42
|
+
.rui-dlg-h.is-destructive .rui-dlg-title,
|
|
43
|
+
.rui-dlg-h.is-error .rui-dlg-title { color: var(--rui-danger, #b91c1c); }
|
|
44
|
+
.rui-dlg-h.is-warning .rui-dlg-title { color: var(--rui-warn, #b45309); }
|
|
45
|
+
.rui-dlg-h.is-success .rui-dlg-title { color: var(--rui-ok, #047857); }
|
|
46
|
+
|
|
47
|
+
.rui-dlg-b { padding: 12px 20px 4px; overflow-y: auto; }
|
|
48
|
+
.rui-dlg-msg {
|
|
49
|
+
font-size: 13px; line-height: 1.55;
|
|
50
|
+
color: var(--rui-text-mute, #475569);
|
|
51
|
+
margin-bottom: 8px;
|
|
52
|
+
white-space: pre-wrap; word-break: break-word;
|
|
53
|
+
}
|
|
54
|
+
.rui-dlg-label {
|
|
55
|
+
display: block; margin: 10px 0 6px;
|
|
56
|
+
font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
|
|
57
|
+
color: var(--rui-text-mute, #475569);
|
|
58
|
+
}
|
|
59
|
+
.rui-dlg-input {
|
|
60
|
+
width: 100%; padding: 9px 11px;
|
|
61
|
+
font: inherit; font-size: 13px;
|
|
62
|
+
color: var(--rui-text, #0f172a);
|
|
63
|
+
background: var(--rui-surface, #fff);
|
|
64
|
+
border: 1px solid var(--rui-border, rgba(15, 23, 42, .16));
|
|
65
|
+
border-radius: 8px; outline: none;
|
|
66
|
+
transition: border-color .12s ease, box-shadow .12s ease;
|
|
67
|
+
}
|
|
68
|
+
.rui-dlg-input:focus {
|
|
69
|
+
border-color: var(--rui-accent, #285aff);
|
|
70
|
+
box-shadow: 0 0 0 3px var(--rui-accent-ring, rgba(40, 90, 255, .14));
|
|
71
|
+
}
|
|
72
|
+
.rui-dlg-input.is-err { border-color: var(--rui-danger, #dc2626); }
|
|
73
|
+
.rui-dlg-input.is-err:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
|
|
74
|
+
textarea.rui-dlg-input { resize: vertical; min-height: 80px; line-height: 1.5; }
|
|
75
|
+
|
|
76
|
+
.rui-dlg-help { margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--rui-text-mute, #475569); }
|
|
77
|
+
.rui-dlg-err { margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--rui-danger, #b91c1c); }
|
|
78
|
+
|
|
79
|
+
.rui-dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 16px; }
|
|
80
|
+
|
|
81
|
+
.rui-dlg-btn {
|
|
82
|
+
appearance: none; cursor: pointer;
|
|
83
|
+
font: inherit; font-size: 13px; font-weight: 500;
|
|
84
|
+
padding: 8px 16px; min-width: 76px;
|
|
85
|
+
border: 1px solid transparent; border-radius: 8px;
|
|
86
|
+
background: transparent; color: var(--rui-text, #0f172a);
|
|
87
|
+
transition: background .12s, border-color .12s, color .12s, transform .04s;
|
|
88
|
+
}
|
|
89
|
+
.rui-dlg-btn:focus-visible { outline: 2px solid var(--rui-accent, #285aff); outline-offset: 2px; }
|
|
90
|
+
.rui-dlg-btn:active { transform: translateY(1px); }
|
|
91
|
+
|
|
92
|
+
.rui-dlg-secondary {
|
|
93
|
+
background: var(--rui-surface, #fff);
|
|
94
|
+
border-color: var(--rui-border, rgba(15, 23, 42, .18));
|
|
95
|
+
color: var(--rui-text, #0f172a);
|
|
96
|
+
}
|
|
97
|
+
.rui-dlg-secondary:hover { background: var(--rui-surface-2, #f8fafc); }
|
|
98
|
+
|
|
99
|
+
.rui-dlg-primary {
|
|
100
|
+
background: var(--rui-accent, #285aff);
|
|
101
|
+
border-color: var(--rui-accent, #285aff);
|
|
102
|
+
color: #fff;
|
|
103
|
+
}
|
|
104
|
+
.rui-dlg-primary:hover { filter: brightness(1.06); }
|
|
105
|
+
.rui-dlg-primary.is-destructive {
|
|
106
|
+
background: var(--rui-danger, #dc2626);
|
|
107
|
+
border-color: var(--rui-danger, #dc2626);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.rui-dlg-typegrid {
|
|
111
|
+
display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px;
|
|
112
|
+
margin-bottom: 4px;
|
|
113
|
+
}
|
|
114
|
+
.rui-dlg-type {
|
|
115
|
+
display: flex; align-items: center; gap: 8px;
|
|
116
|
+
padding: 10px 12px; cursor: pointer;
|
|
117
|
+
font: inherit; font-size: 13px; text-align: left;
|
|
118
|
+
color: var(--rui-text, #0f172a);
|
|
119
|
+
background: var(--rui-surface, #fff);
|
|
120
|
+
border: 1px solid var(--rui-border, rgba(15, 23, 42, .14));
|
|
121
|
+
border-radius: 10px;
|
|
122
|
+
}
|
|
123
|
+
.rui-dlg-type:hover { background: var(--rui-surface-2, #f8fafc); }
|
|
124
|
+
.rui-dlg-type.is-on {
|
|
125
|
+
border-color: var(--rui-accent, #285aff);
|
|
126
|
+
box-shadow: 0 0 0 2px var(--rui-accent-ring, rgba(40, 90, 255, .14));
|
|
127
|
+
}
|
|
128
|
+
.rui-dlg-type-ic {
|
|
129
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
130
|
+
width: 26px; height: 26px; border-radius: 7px; flex: none;
|
|
131
|
+
}
|
|
132
|
+
.rui-dlg-type-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
133
|
+
|
|
134
|
+
/* Narrow viewports: the card becomes a bottom sheet and the actions go full-width, so
|
|
135
|
+
nothing crushes and the primary action stays reachable with a thumb. */
|
|
136
|
+
@media (max-width: 480px) {
|
|
137
|
+
.rui-dlg-backdrop { align-items: flex-end; padding: 0; }
|
|
138
|
+
.rui-dlg-card, .rui-dlg-card.is-wide {
|
|
139
|
+
width: 100%; max-height: 88vh;
|
|
140
|
+
border-radius: 16px 16px 0 0;
|
|
141
|
+
border-bottom: none;
|
|
142
|
+
}
|
|
143
|
+
.rui-dlg-f { flex-direction: column-reverse; }
|
|
144
|
+
.rui-dlg-btn { width: 100%; }
|
|
145
|
+
}
|
package/styles/tasks.css
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* TaskList — master list beside a conversation. Theme-driven: every colour comes from the
|
|
2
|
+
theme variables in styles/themes/*.css, so this inherits the host app's palette. */
|
|
3
|
+
.rui-tasks { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 8px; }
|
|
4
|
+
.rui-tasks-header { padding: 0 2px; }
|
|
5
|
+
|
|
6
|
+
.rui-tasks-new {
|
|
7
|
+
appearance: none; cursor: pointer; width: 100%;
|
|
8
|
+
padding: 9px 12px; border-radius: 8px; border: 1px solid transparent;
|
|
9
|
+
background: var(--rui-accent, #285aff); color: #fff;
|
|
10
|
+
font: inherit; font-weight: 600; font-size: 13px;
|
|
11
|
+
}
|
|
12
|
+
.rui-tasks-new:hover { filter: brightness(1.05); }
|
|
13
|
+
|
|
14
|
+
.rui-tasks-filters { display: flex; gap: 6px; }
|
|
15
|
+
.rui-tasks-search, .rui-tasks-status {
|
|
16
|
+
font: inherit; font-size: 13px; padding: 7px 9px; border-radius: 8px;
|
|
17
|
+
border: 1px solid var(--rui-border, #e3e5e8);
|
|
18
|
+
background: var(--rui-surface, #fff); color: var(--rui-text, #1a1a1a);
|
|
19
|
+
}
|
|
20
|
+
.rui-tasks-search { flex: 1; min-width: 0; }
|
|
21
|
+
.rui-tasks-search:focus, .rui-tasks-status:focus {
|
|
22
|
+
outline: none; border-color: var(--rui-accent, #285aff);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.rui-tasks-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
|
|
26
|
+
.rui-tasks-empty { padding: 18px 10px; text-align: center; font-size: 13px; color: var(--rui-text-dim, #6b7280); }
|
|
27
|
+
|
|
28
|
+
.rui-task {
|
|
29
|
+
display: flex; align-items: center; gap: 8px; cursor: pointer;
|
|
30
|
+
padding: 9px 10px; border-radius: 8px; border: 1px solid transparent;
|
|
31
|
+
}
|
|
32
|
+
.rui-task:hover { background: var(--rui-surface-hover, #f5f6f8); }
|
|
33
|
+
.rui-task.is-selected {
|
|
34
|
+
background: var(--rui-surface-hover, #f5f6f8);
|
|
35
|
+
border-color: var(--rui-border, #e3e5e8);
|
|
36
|
+
}
|
|
37
|
+
.rui-task-main { flex: 1; min-width: 0; }
|
|
38
|
+
.rui-task-title {
|
|
39
|
+
font-size: 13px; font-weight: 500; color: var(--rui-text, #1a1a1a);
|
|
40
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
41
|
+
}
|
|
42
|
+
.rui-task-meta {
|
|
43
|
+
display: flex; align-items: center; gap: 6px; margin-top: 3px;
|
|
44
|
+
font-size: 11px; color: var(--rui-text-dim, #6b7280);
|
|
45
|
+
}
|
|
46
|
+
.rui-task-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rui-text-dim, #9aa1ab); flex: none; }
|
|
47
|
+
.rui-task-dot.is-working { background: var(--rui-accent, #285aff); }
|
|
48
|
+
.rui-task-dot.is-done { background: var(--rui-ok, #16a34a); }
|
|
49
|
+
.rui-task-dot.is-failed { background: var(--rui-danger, #dc2626); }
|
|
50
|
+
.rui-task-status { text-transform: capitalize; }
|
|
51
|
+
.rui-task-time { margin-left: auto; }
|
|
52
|
+
|
|
53
|
+
.rui-task-del {
|
|
54
|
+
appearance: none; border: 0; background: transparent; cursor: pointer;
|
|
55
|
+
color: var(--rui-text-dim, #9aa1ab); font-size: 17px; line-height: 1;
|
|
56
|
+
padding: 2px 6px; border-radius: 6px; opacity: 0; flex: none;
|
|
57
|
+
}
|
|
58
|
+
.rui-task:hover .rui-task-del { opacity: 1; }
|
|
59
|
+
.rui-task-del:hover { background: var(--rui-surface, #fff); color: var(--rui-danger, #dc2626); }
|