reifyui 0.2.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 +2 -0
- package/dist/index.cjs +407 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +35 -0
- package/dist/index.js +416 -172
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/styles/dialog.css +145 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reifyui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The open-source rendering & interaction layer for agentic applications. Stream and render any agent's output as polished, application-native UI
|
|
3
|
+
"version": "0.3.0",
|
|
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",
|
|
7
7
|
"generative-ui",
|
|
@@ -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
|
+
}
|