@seed-ship/mcp-ui-solid 1.0.7 → 1.0.9
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/CHANGELOG.md +85 -0
- package/dist/components/GenerativeUIErrorBoundary.cjs +24 -34
- package/dist/components/GenerativeUIErrorBoundary.cjs.map +1 -1
- package/dist/components/GenerativeUIErrorBoundary.d.ts.map +1 -1
- package/dist/components/GenerativeUIErrorBoundary.js +25 -35
- package/dist/components/GenerativeUIErrorBoundary.js.map +1 -1
- package/dist/components/StreamingUIRenderer.cjs +103 -188
- package/dist/components/StreamingUIRenderer.cjs.map +1 -1
- package/dist/components/StreamingUIRenderer.js +104 -189
- package/dist/components/StreamingUIRenderer.js.map +1 -1
- package/dist/components/UIResourceRenderer.cjs +95 -201
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.js +96 -202
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,9 @@ const solidJs = require("solid-js");
|
|
|
5
5
|
const useStreamingUI = require("../hooks/useStreamingUI.cjs");
|
|
6
6
|
const validation = require("../services/validation.cjs");
|
|
7
7
|
const GenerativeUIErrorBoundary = require("./GenerativeUIErrorBoundary.cjs");
|
|
8
|
-
var _tmpl$ =
|
|
8
|
+
var _tmpl$ = ["<div", ' class="w-full bg-error-subtle border border-border-error rounded-lg p-4"><p class="text-sm font-medium text-error-primary">Validation Error</p><p class="text-xs text-text-secondary mt-1">', "</p></div>"], _tmpl$2 = ["<h3", ' class="text-sm font-semibold text-text-primary">', "</h3>"], _tmpl$3 = ["<span", ' class="text-sm text-text-secondary">', "</span>"], _tmpl$4 = ["<div", ' class="mt-2"><p class="text-2xl font-semibold text-text-primary">', "</p><!--$-->", "<!--/--></div>"], _tmpl$5 = ["<div", ' class="w-full bg-surface-secondary border border-border-subtle rounded-lg p-4"><div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-text-tertiary uppercase">', "</span></div><!--$-->", "<!--/--><!--$-->", '<!--/--><div class="mt-3 text-xs text-text-tertiary">Component ID: <!--$-->', "<!--/-->...</div></div>"], _tmpl$6 = ["<span", ' class="text-sm text-text-secondary"><!--$-->', "<!--/--> / <!--$-->", "<!--/--></span>"], _tmpl$7 = ["<div", ' class="mt-2"><div class="h-1 w-full overflow-hidden rounded-full bg-surface-tertiary"><div class="animate-progress-indeterminate h-full w-1/3 bg-brand-primary"></div></div></div>'], _tmpl$8 = ["<div", ' class="mb-4 rounded-lg border border-border-subtle bg-surface-secondary p-4"><div class="mb-2 flex items-center justify-between"><span class="text-sm font-medium text-text-primary">', "</span><!--$-->", '<!--/--></div><div class="h-2 w-full overflow-hidden rounded-full bg-surface-tertiary"><div class="h-full bg-brand-primary transition-all duration-300 ease-out" style="', '"></div></div><!--$-->', "<!--/--></div>"], _tmpl$9 = ["<button", ' type="button" class="mt-3 rounded-md bg-error-primary px-3 py-1.5 text-sm font-medium text-white hover:bg-error-hover">Retry</button>'], _tmpl$0 = ["<div", ' class="mb-4 rounded-lg border border-border-error bg-error-subtle p-4"><div class="mb-2 flex items-center gap-2"><svg class="h-5 w-5 text-error-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg><span class="font-medium text-error-primary">', '</span></div><p class="text-sm text-text-secondary">', "</p><!--$-->", "<!--/--></div>"], _tmpl$1 = ["<div", '><div class="font-medium text-text-primary">Cost</div><div>$<!--$-->', "<!--/--></div></div>"], _tmpl$10 = ["<div", '><div class="font-medium text-text-primary">Cached</div><div class="text-success-primary">Yes</div></div>'], _tmpl$11 = ["<div", ' class="mt-6 rounded-lg border border-border-subtle bg-surface-secondary p-4 text-sm text-text-secondary"><div class="grid grid-cols-2 gap-4 md:grid-cols-4"><div><div class="font-medium text-text-primary">Provider</div><div>', '</div></div><div><div class="font-medium text-text-primary">Model</div><div>', '</div></div><div><div class="font-medium text-text-primary">Execution Time</div><div><!--$-->', "<!--/-->ms</div></div><!--$-->", '<!--/--><div><div class="font-medium text-text-primary">TTFB</div><div><!--$-->', "<!--/-->ms</div></div><!--$-->", "<!--/--></div></div>"], _tmpl$12 = ["<div", ' class="', '"><!--$-->', "<!--/--><!--$-->", '<!--/--><div class="grid grid-cols-12 gap-4"><!--$-->', "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"], _tmpl$13 = ["<div", ' class="', '" style="', '">', "</div>"], _tmpl$14 = ["<div", ' class="col-span-12 md:col-span-6 lg:col-span-4"><div class="animate-pulse rounded-lg border border-border-subtle bg-surface-secondary p-4"><div class="mb-4 h-6 w-1/2 rounded bg-surface-tertiary"></div><div class="space-y-3"><div class="h-4 rounded bg-surface-tertiary"></div><div class="h-4 w-5/6 rounded bg-surface-tertiary"></div><div class="h-4 w-4/6 rounded bg-surface-tertiary"></div></div><div class="mt-4 h-32 rounded bg-surface-tertiary"></div></div></div>'];
|
|
9
9
|
function StreamingComponentRenderer(props) {
|
|
10
|
-
var _a;
|
|
10
|
+
var _a, _b, _c;
|
|
11
11
|
const validation$1 = validation.validateComponent(props.component);
|
|
12
12
|
if (!validation$1.valid) {
|
|
13
13
|
(_a = props.onError) == null ? void 0 : _a.call(props, {
|
|
@@ -16,14 +16,7 @@ function StreamingComponentRenderer(props) {
|
|
|
16
16
|
componentId: props.component.id,
|
|
17
17
|
details: validation$1.errors
|
|
18
18
|
});
|
|
19
|
-
return (()
|
|
20
|
-
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
21
|
-
web.insert(_el$3, () => {
|
|
22
|
-
var _a2, _b;
|
|
23
|
-
return ((_b = (_a2 = validation$1.errors) == null ? void 0 : _a2[0]) == null ? void 0 : _b.message) || "Unknown validation error";
|
|
24
|
-
});
|
|
25
|
-
return _el$;
|
|
26
|
-
})();
|
|
19
|
+
return web.ssr(_tmpl$, web.ssrHydrationKey(), web.escape((_c = (_b = validation$1.errors) == null ? void 0 : _b[0]) == null ? void 0 : _c.message) || "Unknown validation error");
|
|
27
20
|
}
|
|
28
21
|
const params = props.component.params;
|
|
29
22
|
return web.createComponent(GenerativeUIErrorBoundary.GenerativeUIErrorBoundary, {
|
|
@@ -38,41 +31,28 @@ function StreamingComponentRenderer(props) {
|
|
|
38
31
|
},
|
|
39
32
|
allowRetry: false,
|
|
40
33
|
get children() {
|
|
41
|
-
|
|
42
|
-
_el$12.nextSibling;
|
|
43
|
-
web.insert(_el$6, () => props.component.type);
|
|
44
|
-
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
34
|
+
return web.ssr(_tmpl$5, web.ssrHydrationKey(), web.escape(props.component.type), web.escape(web.createComponent(solidJs.Show, {
|
|
45
35
|
get when() {
|
|
46
36
|
return params == null ? void 0 : params.title;
|
|
47
37
|
},
|
|
48
38
|
get children() {
|
|
49
|
-
|
|
50
|
-
web.insert(_el$7, () => params.title);
|
|
51
|
-
return _el$7;
|
|
39
|
+
return web.ssr(_tmpl$2, web.ssrHydrationKey(), web.escape(params.title));
|
|
52
40
|
}
|
|
53
|
-
}),
|
|
54
|
-
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
41
|
+
})), web.escape(web.createComponent(solidJs.Show, {
|
|
55
42
|
get when() {
|
|
56
|
-
return
|
|
43
|
+
return props.component.type === "metric" && (params == null ? void 0 : params.value);
|
|
57
44
|
},
|
|
58
45
|
get children() {
|
|
59
|
-
|
|
60
|
-
web.insert(_el$9, () => params.value);
|
|
61
|
-
web.insert(_el$8, web.createComponent(solidJs.Show, {
|
|
46
|
+
return web.ssr(_tmpl$4, web.ssrHydrationKey(), web.escape(params.value), web.escape(web.createComponent(solidJs.Show, {
|
|
62
47
|
get when() {
|
|
63
48
|
return params.unit;
|
|
64
49
|
},
|
|
65
50
|
get children() {
|
|
66
|
-
|
|
67
|
-
web.insert(_el$0, () => params.unit);
|
|
68
|
-
return _el$0;
|
|
51
|
+
return web.ssr(_tmpl$3, web.ssrHydrationKey(), web.escape(params.unit));
|
|
69
52
|
}
|
|
70
|
-
})
|
|
71
|
-
return _el$8;
|
|
53
|
+
})));
|
|
72
54
|
}
|
|
73
|
-
}),
|
|
74
|
-
web.insert(_el$1, () => props.component.id.slice(0, 8), _el$12);
|
|
75
|
-
return _el$4;
|
|
55
|
+
})), web.escape(props.component.id.slice(0, 8)));
|
|
76
56
|
}
|
|
77
57
|
});
|
|
78
58
|
}
|
|
@@ -105,167 +85,102 @@ function StreamingUIRenderer(props) {
|
|
|
105
85
|
});
|
|
106
86
|
}, 500);
|
|
107
87
|
};
|
|
108
|
-
return (()
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
});
|
|
154
|
-
web.insert(_el$22, web.createComponent(solidJs.Show, {
|
|
155
|
-
get when() {
|
|
156
|
-
var _a;
|
|
157
|
-
return (_a = error()) == null ? void 0 : _a.recoverable;
|
|
158
|
-
},
|
|
159
|
-
get children() {
|
|
160
|
-
var _el$27 = _tmpl$9();
|
|
161
|
-
_el$27.$$click = () => startStreaming();
|
|
162
|
-
return _el$27;
|
|
163
|
-
}
|
|
164
|
-
}), null);
|
|
165
|
-
return _el$22;
|
|
166
|
-
}
|
|
167
|
-
}), _el$28);
|
|
168
|
-
web.insert(_el$28, web.createComponent(solidJs.For, {
|
|
169
|
-
get each() {
|
|
170
|
-
return components();
|
|
171
|
-
},
|
|
172
|
-
children: (component) => {
|
|
173
|
-
solidJs.onMount(() => handleComponentRender(component.id));
|
|
174
|
-
return (() => {
|
|
175
|
-
var _el$50 = _tmpl$13();
|
|
176
|
-
web.insert(_el$50, web.createComponent(StreamingComponentRenderer, {
|
|
177
|
-
component,
|
|
178
|
-
get onError() {
|
|
179
|
-
return props.onRenderError;
|
|
180
|
-
}
|
|
181
|
-
}));
|
|
182
|
-
web.effect((_p$) => {
|
|
183
|
-
var _v$ = `
|
|
184
|
-
col-span-${component.position.colSpan}
|
|
88
|
+
return web.ssr(_tmpl$12, web.ssrHydrationKey(), `streaming-ui-renderer ${web.escape(props.class, true) || ""}`, web.escape(web.createComponent(solidJs.Show, {
|
|
89
|
+
get when() {
|
|
90
|
+
return props.showProgress !== false && (isLoading() || isStreaming());
|
|
91
|
+
},
|
|
92
|
+
get children() {
|
|
93
|
+
return web.ssr(_tmpl$8, web.ssrHydrationKey(), web.escape(progress().message), web.escape(web.createComponent(solidJs.Show, {
|
|
94
|
+
get when() {
|
|
95
|
+
return progress().totalCount !== null;
|
|
96
|
+
},
|
|
97
|
+
get children() {
|
|
98
|
+
return web.ssr(_tmpl$6, web.ssrHydrationKey(), web.escape(progress().receivedCount), web.escape(progress().totalCount));
|
|
99
|
+
}
|
|
100
|
+
})), web.ssrStyle(progress().totalCount !== null ? `width: ${progress().receivedCount / progress().totalCount * 100}%` : "width: 0%"), web.escape(web.createComponent(solidJs.Show, {
|
|
101
|
+
get when() {
|
|
102
|
+
return progress().totalCount === null && isStreaming();
|
|
103
|
+
},
|
|
104
|
+
get children() {
|
|
105
|
+
return web.ssr(_tmpl$7, web.ssrHydrationKey());
|
|
106
|
+
}
|
|
107
|
+
})));
|
|
108
|
+
}
|
|
109
|
+
})), web.escape(web.createComponent(solidJs.Show, {
|
|
110
|
+
get when() {
|
|
111
|
+
return error();
|
|
112
|
+
},
|
|
113
|
+
get children() {
|
|
114
|
+
var _a, _b;
|
|
115
|
+
return web.ssr(_tmpl$0, web.ssrHydrationKey(), web.escape((_a = error()) == null ? void 0 : _a.error), web.escape((_b = error()) == null ? void 0 : _b.message), web.escape(web.createComponent(solidJs.Show, {
|
|
116
|
+
get when() {
|
|
117
|
+
var _a2;
|
|
118
|
+
return (_a2 = error()) == null ? void 0 : _a2.recoverable;
|
|
119
|
+
},
|
|
120
|
+
get children() {
|
|
121
|
+
return web.ssr(_tmpl$9, web.ssrHydrationKey());
|
|
122
|
+
}
|
|
123
|
+
})));
|
|
124
|
+
}
|
|
125
|
+
})), web.escape(web.createComponent(solidJs.For, {
|
|
126
|
+
get each() {
|
|
127
|
+
return components();
|
|
128
|
+
},
|
|
129
|
+
children: (component) => {
|
|
130
|
+
solidJs.onMount(() => handleComponentRender(component.id));
|
|
131
|
+
return web.ssr(_tmpl$13, web.ssrHydrationKey(), `
|
|
132
|
+
col-span-${web.escape(component.position.colSpan, true)}
|
|
185
133
|
${animatingComponents().has(component.id) ? "animate-fade-in-up" : ""}
|
|
186
|
-
`,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
134
|
+
`, web.ssrStyle(`grid-column-start: ${component.position.colStart}; grid-column-end: ${component.position.colStart + component.position.colSpan}`), web.escape(web.createComponent(StreamingComponentRenderer, {
|
|
135
|
+
component,
|
|
136
|
+
get onError() {
|
|
137
|
+
return props.onRenderError;
|
|
138
|
+
}
|
|
139
|
+
})));
|
|
140
|
+
}
|
|
141
|
+
})), web.escape(web.createComponent(solidJs.Show, {
|
|
142
|
+
get when() {
|
|
143
|
+
return isStreaming() && progress().totalCount !== null;
|
|
144
|
+
},
|
|
145
|
+
get children() {
|
|
146
|
+
return web.createComponent(solidJs.For, {
|
|
147
|
+
get each() {
|
|
148
|
+
return Array.from({
|
|
149
|
+
length: progress().totalCount - progress().receivedCount
|
|
193
150
|
});
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
var _a;
|
|
225
|
-
return (_a = metadata()) == null ? void 0 : _a.model;
|
|
226
|
-
});
|
|
227
|
-
web.insert(_el$39, () => {
|
|
228
|
-
var _a;
|
|
229
|
-
return (_a = metadata()) == null ? void 0 : _a.executionTimeMs;
|
|
230
|
-
}, _el$40);
|
|
231
|
-
web.insert(_el$30, web.createComponent(solidJs.Show, {
|
|
232
|
-
get when() {
|
|
233
|
-
var _a;
|
|
234
|
-
return ((_a = metadata()) == null ? void 0 : _a.costUSD) !== void 0;
|
|
235
|
-
},
|
|
236
|
-
get children() {
|
|
237
|
-
var _el$41 = _tmpl$1(), _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
|
|
238
|
-
_el$43.firstChild;
|
|
239
|
-
web.insert(_el$43, () => {
|
|
240
|
-
var _a, _b;
|
|
241
|
-
return (_b = (_a = metadata()) == null ? void 0 : _a.costUSD) == null ? void 0 : _b.toFixed(4);
|
|
242
|
-
}, null);
|
|
243
|
-
return _el$41;
|
|
244
|
-
}
|
|
245
|
-
}), _el$45);
|
|
246
|
-
web.insert(_el$47, () => {
|
|
247
|
-
var _a;
|
|
248
|
-
return (_a = metadata()) == null ? void 0 : _a.firstTokenMs;
|
|
249
|
-
}, _el$48);
|
|
250
|
-
web.insert(_el$30, web.createComponent(solidJs.Show, {
|
|
251
|
-
get when() {
|
|
252
|
-
var _a;
|
|
253
|
-
return (_a = metadata()) == null ? void 0 : _a.cached;
|
|
254
|
-
},
|
|
255
|
-
get children() {
|
|
256
|
-
return _tmpl$10();
|
|
257
|
-
}
|
|
258
|
-
}), null);
|
|
259
|
-
return _el$29;
|
|
260
|
-
}
|
|
261
|
-
}), null);
|
|
262
|
-
web.effect(() => web.className(_el$13, `streaming-ui-renderer ${props.class || ""}`));
|
|
263
|
-
return _el$13;
|
|
264
|
-
})();
|
|
151
|
+
},
|
|
152
|
+
children: () => web.createComponent(SkeletonComponent, {})
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
})), web.escape(web.createComponent(solidJs.Show, {
|
|
156
|
+
get when() {
|
|
157
|
+
return props.showMetadata !== false && metadata();
|
|
158
|
+
},
|
|
159
|
+
get children() {
|
|
160
|
+
var _a, _b, _c, _d;
|
|
161
|
+
return web.ssr(_tmpl$11, web.ssrHydrationKey(), web.escape((_a = metadata()) == null ? void 0 : _a.provider), web.escape((_b = metadata()) == null ? void 0 : _b.model), web.escape((_c = metadata()) == null ? void 0 : _c.executionTimeMs), web.escape(web.createComponent(solidJs.Show, {
|
|
162
|
+
get when() {
|
|
163
|
+
var _a2;
|
|
164
|
+
return ((_a2 = metadata()) == null ? void 0 : _a2.costUSD) !== void 0;
|
|
165
|
+
},
|
|
166
|
+
get children() {
|
|
167
|
+
var _a2, _b2;
|
|
168
|
+
return web.ssr(_tmpl$1, web.ssrHydrationKey(), web.escape((_b2 = (_a2 = metadata()) == null ? void 0 : _a2.costUSD) == null ? void 0 : _b2.toFixed(4)));
|
|
169
|
+
}
|
|
170
|
+
})), web.escape((_d = metadata()) == null ? void 0 : _d.firstTokenMs), web.escape(web.createComponent(solidJs.Show, {
|
|
171
|
+
get when() {
|
|
172
|
+
var _a2;
|
|
173
|
+
return (_a2 = metadata()) == null ? void 0 : _a2.cached;
|
|
174
|
+
},
|
|
175
|
+
get children() {
|
|
176
|
+
return web.ssr(_tmpl$10, web.ssrHydrationKey());
|
|
177
|
+
}
|
|
178
|
+
})));
|
|
179
|
+
}
|
|
180
|
+
})));
|
|
265
181
|
}
|
|
266
182
|
function SkeletonComponent() {
|
|
267
|
-
return _tmpl$14();
|
|
183
|
+
return web.ssr(_tmpl$14, web.ssrHydrationKey());
|
|
268
184
|
}
|
|
269
|
-
web.delegateEvents(["click"]);
|
|
270
185
|
exports.StreamingUIRenderer = StreamingUIRenderer;
|
|
271
186
|
//# sourceMappingURL=StreamingUIRenderer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamingUIRenderer.cjs","sources":["../../src/components/StreamingUIRenderer.tsx"],"sourcesContent":["/**\n * StreamingUIRenderer Component - Phase 2\n *\n * Renders streaming dashboard components with skeleton states and progress indicators.\n * Uses the useStreamingUI hook for SSE connection and state management.\n *\n * Features:\n * - Skeleton loading states while components stream\n * - Progress bar and status messages\n * - Smooth component animations on arrival\n * - Error handling with retry capability\n * - Responsive 12-column grid layout\n *\n * Usage:\n * ```tsx\n * <StreamingUIRenderer\n * query=\"Show me revenue trends\"\n * spaceIds={['uuid1', 'uuid2']}\n * onComplete={(metadata) => console.log('Done!', metadata)}\n * />\n * ```\n */\n\nimport { Show, For, createSignal, onMount } from 'solid-js'\nimport { useStreamingUI, type UseStreamingUIOptions } from '../hooks/useStreamingUI'\nimport type { UIComponent, RendererError } from '../types'\nimport { validateComponent } from '../services/validation'\nimport { GenerativeUIErrorBoundary } from './GenerativeUIErrorBoundary'\n\nexport interface StreamingUIRendererProps extends UseStreamingUIOptions {\n class?: string\n showProgress?: boolean\n showMetadata?: boolean\n onRenderError?: (error: RendererError) => void\n}\n\n/**\n * Component Renderer - Inline lightweight version\n * (Full implementation in UIResourceRenderer)\n */\nfunction StreamingComponentRenderer(props: {\n component: UIComponent\n onError?: (error: RendererError) => void\n}) {\n // Validate component before rendering\n const validation = validateComponent(props.component)\n if (!validation.valid) {\n props.onError?.({\n type: 'validation',\n message: 'Component validation failed',\n componentId: props.component.id,\n details: validation.errors,\n })\n\n return (\n <div class=\"w-full bg-error-subtle border border-border-error rounded-lg p-4\">\n <p class=\"text-sm font-medium text-error-primary\">Validation Error</p>\n <p class=\"text-xs text-text-secondary mt-1\">\n {validation.errors?.[0]?.message || 'Unknown validation error'}\n </p>\n </div>\n )\n }\n\n // Simplified renderer - just show component type and title\n // Full rendering logic in UIResourceRenderer\n const params = props.component.params as any\n\n return (\n <GenerativeUIErrorBoundary\n componentId={props.component.id}\n componentType={props.component.type}\n onError={props.onError}\n allowRetry={false}\n >\n <div class=\"w-full bg-surface-secondary border border-border-subtle rounded-lg p-4\">\n <div class=\"flex items-center gap-2 mb-2\">\n <span class=\"text-xs font-medium text-text-tertiary uppercase\">\n {props.component.type}\n </span>\n </div>\n <Show when={params?.title}>\n <h3 class=\"text-sm font-semibold text-text-primary\">{params.title}</h3>\n </Show>\n <Show when={props.component.type === 'metric' && params?.value}>\n <div class=\"mt-2\">\n <p class=\"text-2xl font-semibold text-text-primary\">{params.value}</p>\n <Show when={params.unit}>\n <span class=\"text-sm text-text-secondary\">{params.unit}</span>\n </Show>\n </div>\n </Show>\n <div class=\"mt-3 text-xs text-text-tertiary\">\n Component ID: {props.component.id.slice(0, 8)}...\n </div>\n </div>\n </GenerativeUIErrorBoundary>\n )\n}\n\nexport function StreamingUIRenderer(props: StreamingUIRendererProps) {\n const { components, isLoading, isStreaming, error, progress, metadata, startStreaming } =\n useStreamingUI({\n query: props.query,\n spaceIds: props.spaceIds,\n sessionId: props.sessionId,\n options: props.options,\n onComplete: props.onComplete,\n onError: props.onError,\n onComponentReceived: props.onComponentReceived,\n })\n\n const [animatingComponents, setAnimatingComponents] = createSignal<Set<string>>(new Set())\n\n // Track new components for animation\n const handleComponentRender = (componentId: string) => {\n setAnimatingComponents((prev) => new Set([...prev, componentId]))\n\n // Remove from animating set after animation completes\n setTimeout(() => {\n setAnimatingComponents((prev) => {\n const next = new Set(prev)\n next.delete(componentId)\n return next\n })\n }, 500)\n }\n\n return (\n <div class={`streaming-ui-renderer ${props.class || ''}`}>\n {/* Progress Bar */}\n <Show when={props.showProgress !== false && (isLoading() || isStreaming())}>\n <div class=\"mb-4 rounded-lg border border-border-subtle bg-surface-secondary p-4\">\n {/* Status Message */}\n <div class=\"mb-2 flex items-center justify-between\">\n <span class=\"text-sm font-medium text-text-primary\">{progress().message}</span>\n <Show when={progress().totalCount !== null}>\n <span class=\"text-sm text-text-secondary\">\n {progress().receivedCount} / {progress().totalCount}\n </span>\n </Show>\n </div>\n\n {/* Progress Bar */}\n <div class=\"h-2 w-full overflow-hidden rounded-full bg-surface-tertiary\">\n <div\n class=\"h-full bg-brand-primary transition-all duration-300 ease-out\"\n style={\n progress().totalCount !== null\n ? `width: ${(progress().receivedCount / progress().totalCount!) * 100}%`\n : 'width: 0%'\n }\n />\n </div>\n\n {/* Indeterminate Progress (when totalCount unknown) */}\n <Show when={progress().totalCount === null && isStreaming()}>\n <div class=\"mt-2\">\n <div class=\"h-1 w-full overflow-hidden rounded-full bg-surface-tertiary\">\n <div class=\"animate-progress-indeterminate h-full w-1/3 bg-brand-primary\" />\n </div>\n </div>\n </Show>\n </div>\n </Show>\n\n {/* Error State */}\n <Show when={error()}>\n <div class=\"mb-4 rounded-lg border border-border-error bg-error-subtle p-4\">\n <div class=\"mb-2 flex items-center gap-2\">\n <svg\n class=\"h-5 w-5 text-error-primary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <span class=\"font-medium text-error-primary\">{error()?.error}</span>\n </div>\n <p class=\"text-sm text-text-secondary\">{error()?.message}</p>\n\n {/* Retry Button (if recoverable) */}\n <Show when={error()?.recoverable}>\n <button\n type=\"button\"\n class=\"mt-3 rounded-md bg-error-primary px-3 py-1.5 text-sm font-medium text-white hover:bg-error-hover\"\n onClick={() => startStreaming()}\n >\n Retry\n </button>\n </Show>\n </div>\n </Show>\n\n {/* Components Grid */}\n <div class=\"grid grid-cols-12 gap-4\">\n {/* Render received components */}\n <For each={components()}>\n {(component) => {\n // Trigger animation on mount (SSR-safe, no 'use' directive needed)\n onMount(() => handleComponentRender(component.id))\n\n return (\n <div\n class={`\n col-span-${component.position.colSpan}\n ${animatingComponents().has(component.id) ? 'animate-fade-in-up' : ''}\n `}\n style={`grid-column-start: ${component.position.colStart}; grid-column-end: ${component.position.colStart + component.position.colSpan}`}\n >\n <StreamingComponentRenderer component={component} onError={props.onRenderError} />\n </div>\n )\n }}\n </For>\n\n {/* Skeleton placeholders (if streaming and expecting more) */}\n <Show when={isStreaming() && progress().totalCount !== null}>\n <For\n each={Array.from({\n length: progress().totalCount! - progress().receivedCount,\n })}\n >\n {() => <SkeletonComponent />}\n </For>\n </Show>\n </div>\n\n {/* Metadata Display */}\n <Show when={props.showMetadata !== false && metadata()}>\n <div class=\"mt-6 rounded-lg border border-border-subtle bg-surface-secondary p-4 text-sm text-text-secondary\">\n <div class=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n <div>\n <div class=\"font-medium text-text-primary\">Provider</div>\n <div>{metadata()?.provider}</div>\n </div>\n <div>\n <div class=\"font-medium text-text-primary\">Model</div>\n <div>{metadata()?.model}</div>\n </div>\n <div>\n <div class=\"font-medium text-text-primary\">Execution Time</div>\n <div>{metadata()?.executionTimeMs}ms</div>\n </div>\n <Show when={metadata()?.costUSD !== undefined}>\n <div>\n <div class=\"font-medium text-text-primary\">Cost</div>\n <div>${metadata()?.costUSD?.toFixed(4)}</div>\n </div>\n </Show>\n <div>\n <div class=\"font-medium text-text-primary\">TTFB</div>\n <div>{metadata()?.firstTokenMs}ms</div>\n </div>\n <Show when={metadata()?.cached}>\n <div>\n <div class=\"font-medium text-text-primary\">Cached</div>\n <div class=\"text-success-primary\">Yes</div>\n </div>\n </Show>\n </div>\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Skeleton Component - Placeholder while components load\n */\nfunction SkeletonComponent() {\n return (\n <div class=\"col-span-12 md:col-span-6 lg:col-span-4\">\n <div class=\"animate-pulse rounded-lg border border-border-subtle bg-surface-secondary p-4\">\n {/* Header skeleton */}\n <div class=\"mb-4 h-6 w-1/2 rounded bg-surface-tertiary\" />\n\n {/* Content skeleton */}\n <div class=\"space-y-3\">\n <div class=\"h-4 rounded bg-surface-tertiary\" />\n <div class=\"h-4 w-5/6 rounded bg-surface-tertiary\" />\n <div class=\"h-4 w-4/6 rounded bg-surface-tertiary\" />\n </div>\n\n {/* Chart/visual skeleton */}\n <div class=\"mt-4 h-32 rounded bg-surface-tertiary\" />\n </div>\n </div>\n )\n}\n\n// CSS Animations (add to global styles or Tailwind config)\n/*\n@keyframes fade-in-up {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes progress-indeterminate {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(400%);\n }\n}\n\n.animate-fade-in-up {\n animation: fade-in-up 0.5s ease-out;\n}\n\n.animate-progress-indeterminate {\n animation: progress-indeterminate 1.5s infinite ease-in-out;\n}\n*/\n"],"names":["StreamingComponentRenderer","props","validation","validateComponent","component","valid","onError","type","message","componentId","id","details","errors","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$insert","params","_$createComponent","GenerativeUIErrorBoundary","componentType","allowRetry","children","_el$4","_tmpl$5","_el$5","_el$6","_el$1","_el$10","_el$12","Show","when","title","_el$7","_tmpl$2","_$memo","value","_el$8","_tmpl$4","_el$9","unit","_el$0","_tmpl$3","slice","StreamingUIRenderer","components","isLoading","isStreaming","error","progress","metadata","startStreaming","useStreamingUI","query","spaceIds","sessionId","options","onComplete","onComponentReceived","animatingComponents","setAnimatingComponents","createSignal","Set","handleComponentRender","prev","setTimeout","next","delete","_el$13","_tmpl$12","_el$28","showProgress","_el$14","_tmpl$8","_el$15","_el$16","_el$19","_el$20","totalCount","_el$17","_tmpl$6","_el$18","receivedCount","_tmpl$7","_$effect","_$p","_$style","_el$22","_tmpl$0","_el$23","_el$24","_el$25","_el$26","recoverable","_el$27","_tmpl$9","$$click","For","each","onMount","_el$50","_tmpl$13","onRenderError","_p$","_v$","position","colSpan","has","_v$2","colStart","e","_$className","t","undefined","Array","from","length","SkeletonComponent","showMetadata","_el$29","_tmpl$11","_el$30","_el$31","_el$32","_el$33","_el$34","_el$35","_el$36","_el$37","_el$38","_el$39","_el$40","_el$45","_el$46","_el$47","_el$48","provider","model","executionTimeMs","costUSD","_el$41","_tmpl$1","_el$42","_el$43","toFixed","firstTokenMs","cached","_tmpl$10","class","_tmpl$14","_$delegateEvents"],"mappings":";;;;;;;;AAwCA,SAASA,2BAA2BC,OAGjC;;AAED,QAAMC,eAAaC,WAAAA,kBAAkBF,MAAMG,SAAS;AACpD,MAAI,CAACF,aAAWG,OAAO;AACrBJ,gBAAMK,YAANL,+BAAgB;AAAA,MACdM,MAAM;AAAA,MACNC,SAAS;AAAA,MACTC,aAAaR,MAAMG,UAAUM;AAAAA,MAC7BC,SAAST,aAAWU;AAAAA,IAAAA;AAGtB,YAAA,MAAA;AAAA,UAAAC,OAAAC,OAAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAG;AAAAC,UAAAA,OAAAF,OAAA;;AAIOf,uBAAAA,MAAAA,aAAWU,WAAXV,gBAAAA,IAAoB,OAApBA,mBAAwBM,YAAW;AAAA,OAA0B;AAAA,aAAAK;AAAAA,IAAA,GAAA;AAAA,EAItE;AAIA,QAAMO,SAASnB,MAAMG,UAAUgB;AAE/B,SAAAC,IAAAA,gBACGC,0BAAAA,2BAAyB;AAAA,IAAA,IACxBb,cAAW;AAAA,aAAER,MAAMG,UAAUM;AAAAA,IAAE;AAAA,IAAA,IAC/Ba,gBAAa;AAAA,aAAEtB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,EAAA,GAAA;AA8I5D;AAKA,SAASiD,oBAAoB;AAC3B,SAAAgC,SAAAA;AAkBF;AAGAC,IAAAA,eAAA,CAAA,OAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"StreamingUIRenderer.cjs","sources":["../../src/components/StreamingUIRenderer.tsx"],"sourcesContent":["/**\n * StreamingUIRenderer Component - Phase 2\n *\n * Renders streaming dashboard components with skeleton states and progress indicators.\n * Uses the useStreamingUI hook for SSE connection and state management.\n *\n * Features:\n * - Skeleton loading states while components stream\n * - Progress bar and status messages\n * - Smooth component animations on arrival\n * - Error handling with retry capability\n * - Responsive 12-column grid layout\n *\n * Usage:\n * ```tsx\n * <StreamingUIRenderer\n * query=\"Show me revenue trends\"\n * spaceIds={['uuid1', 'uuid2']}\n * onComplete={(metadata) => console.log('Done!', metadata)}\n * />\n * ```\n */\n\nimport { Show, For, createSignal, onMount } from 'solid-js'\nimport { useStreamingUI, type UseStreamingUIOptions } from '../hooks/useStreamingUI'\nimport type { UIComponent, RendererError } from '../types'\nimport { validateComponent } from '../services/validation'\nimport { GenerativeUIErrorBoundary } from './GenerativeUIErrorBoundary'\n\nexport interface StreamingUIRendererProps extends UseStreamingUIOptions {\n class?: string\n showProgress?: boolean\n showMetadata?: boolean\n onRenderError?: (error: RendererError) => void\n}\n\n/**\n * Component Renderer - Inline lightweight version\n * (Full implementation in UIResourceRenderer)\n */\nfunction StreamingComponentRenderer(props: {\n component: UIComponent\n onError?: (error: RendererError) => void\n}) {\n // Validate component before rendering\n const validation = validateComponent(props.component)\n if (!validation.valid) {\n props.onError?.({\n type: 'validation',\n message: 'Component validation failed',\n componentId: props.component.id,\n details: validation.errors,\n })\n\n return (\n <div class=\"w-full bg-error-subtle border border-border-error rounded-lg p-4\">\n <p class=\"text-sm font-medium text-error-primary\">Validation Error</p>\n <p class=\"text-xs text-text-secondary mt-1\">\n {validation.errors?.[0]?.message || 'Unknown validation error'}\n </p>\n </div>\n )\n }\n\n // Simplified renderer - just show component type and title\n // Full rendering logic in UIResourceRenderer\n const params = props.component.params as any\n\n return (\n <GenerativeUIErrorBoundary\n componentId={props.component.id}\n componentType={props.component.type}\n onError={props.onError}\n allowRetry={false}\n >\n <div class=\"w-full bg-surface-secondary border border-border-subtle rounded-lg p-4\">\n <div class=\"flex items-center gap-2 mb-2\">\n <span class=\"text-xs font-medium text-text-tertiary uppercase\">\n {props.component.type}\n </span>\n </div>\n <Show when={params?.title}>\n <h3 class=\"text-sm font-semibold text-text-primary\">{params.title}</h3>\n </Show>\n <Show when={props.component.type === 'metric' && params?.value}>\n <div class=\"mt-2\">\n <p class=\"text-2xl font-semibold text-text-primary\">{params.value}</p>\n <Show when={params.unit}>\n <span class=\"text-sm text-text-secondary\">{params.unit}</span>\n </Show>\n </div>\n </Show>\n <div class=\"mt-3 text-xs text-text-tertiary\">\n Component ID: {props.component.id.slice(0, 8)}...\n </div>\n </div>\n </GenerativeUIErrorBoundary>\n )\n}\n\nexport function StreamingUIRenderer(props: StreamingUIRendererProps) {\n const { components, isLoading, isStreaming, error, progress, metadata, startStreaming } =\n useStreamingUI({\n query: props.query,\n spaceIds: props.spaceIds,\n sessionId: props.sessionId,\n options: props.options,\n onComplete: props.onComplete,\n onError: props.onError,\n onComponentReceived: props.onComponentReceived,\n })\n\n const [animatingComponents, setAnimatingComponents] = createSignal<Set<string>>(new Set())\n\n // Track new components for animation\n const handleComponentRender = (componentId: string) => {\n setAnimatingComponents((prev) => new Set([...prev, componentId]))\n\n // Remove from animating set after animation completes\n setTimeout(() => {\n setAnimatingComponents((prev) => {\n const next = new Set(prev)\n next.delete(componentId)\n return next\n })\n }, 500)\n }\n\n return (\n <div class={`streaming-ui-renderer ${props.class || ''}`}>\n {/* Progress Bar */}\n <Show when={props.showProgress !== false && (isLoading() || isStreaming())}>\n <div class=\"mb-4 rounded-lg border border-border-subtle bg-surface-secondary p-4\">\n {/* Status Message */}\n <div class=\"mb-2 flex items-center justify-between\">\n <span class=\"text-sm font-medium text-text-primary\">{progress().message}</span>\n <Show when={progress().totalCount !== null}>\n <span class=\"text-sm text-text-secondary\">\n {progress().receivedCount} / {progress().totalCount}\n </span>\n </Show>\n </div>\n\n {/* Progress Bar */}\n <div class=\"h-2 w-full overflow-hidden rounded-full bg-surface-tertiary\">\n <div\n class=\"h-full bg-brand-primary transition-all duration-300 ease-out\"\n style={\n progress().totalCount !== null\n ? `width: ${(progress().receivedCount / progress().totalCount!) * 100}%`\n : 'width: 0%'\n }\n />\n </div>\n\n {/* Indeterminate Progress (when totalCount unknown) */}\n <Show when={progress().totalCount === null && isStreaming()}>\n <div class=\"mt-2\">\n <div class=\"h-1 w-full overflow-hidden rounded-full bg-surface-tertiary\">\n <div class=\"animate-progress-indeterminate h-full w-1/3 bg-brand-primary\" />\n </div>\n </div>\n </Show>\n </div>\n </Show>\n\n {/* Error State */}\n <Show when={error()}>\n <div class=\"mb-4 rounded-lg border border-border-error bg-error-subtle p-4\">\n <div class=\"mb-2 flex items-center gap-2\">\n <svg\n class=\"h-5 w-5 text-error-primary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <span class=\"font-medium text-error-primary\">{error()?.error}</span>\n </div>\n <p class=\"text-sm text-text-secondary\">{error()?.message}</p>\n\n {/* Retry Button (if recoverable) */}\n <Show when={error()?.recoverable}>\n <button\n type=\"button\"\n class=\"mt-3 rounded-md bg-error-primary px-3 py-1.5 text-sm font-medium text-white hover:bg-error-hover\"\n onClick={() => startStreaming()}\n >\n Retry\n </button>\n </Show>\n </div>\n </Show>\n\n {/* Components Grid */}\n <div class=\"grid grid-cols-12 gap-4\">\n {/* Render received components */}\n <For each={components()}>\n {(component) => {\n // Trigger animation on mount (SSR-safe, no 'use' directive needed)\n onMount(() => handleComponentRender(component.id))\n\n return (\n <div\n class={`\n col-span-${component.position.colSpan}\n ${animatingComponents().has(component.id) ? 'animate-fade-in-up' : ''}\n `}\n style={`grid-column-start: ${component.position.colStart}; grid-column-end: ${component.position.colStart + component.position.colSpan}`}\n >\n <StreamingComponentRenderer component={component} onError={props.onRenderError} />\n </div>\n )\n }}\n </For>\n\n {/* Skeleton placeholders (if streaming and expecting more) */}\n <Show when={isStreaming() && progress().totalCount !== null}>\n <For\n each={Array.from({\n length: progress().totalCount! - progress().receivedCount,\n })}\n >\n {() => <SkeletonComponent />}\n </For>\n </Show>\n </div>\n\n {/* Metadata Display */}\n <Show when={props.showMetadata !== false && metadata()}>\n <div class=\"mt-6 rounded-lg border border-border-subtle bg-surface-secondary p-4 text-sm text-text-secondary\">\n <div class=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n <div>\n <div class=\"font-medium text-text-primary\">Provider</div>\n <div>{metadata()?.provider}</div>\n </div>\n <div>\n <div class=\"font-medium text-text-primary\">Model</div>\n <div>{metadata()?.model}</div>\n </div>\n <div>\n <div class=\"font-medium text-text-primary\">Execution Time</div>\n <div>{metadata()?.executionTimeMs}ms</div>\n </div>\n <Show when={metadata()?.costUSD !== undefined}>\n <div>\n <div class=\"font-medium text-text-primary\">Cost</div>\n <div>${metadata()?.costUSD?.toFixed(4)}</div>\n </div>\n </Show>\n <div>\n <div class=\"font-medium text-text-primary\">TTFB</div>\n <div>{metadata()?.firstTokenMs}ms</div>\n </div>\n <Show when={metadata()?.cached}>\n <div>\n <div class=\"font-medium text-text-primary\">Cached</div>\n <div class=\"text-success-primary\">Yes</div>\n </div>\n </Show>\n </div>\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Skeleton Component - Placeholder while components load\n */\nfunction SkeletonComponent() {\n return (\n <div class=\"col-span-12 md:col-span-6 lg:col-span-4\">\n <div class=\"animate-pulse rounded-lg border border-border-subtle bg-surface-secondary p-4\">\n {/* Header skeleton */}\n <div class=\"mb-4 h-6 w-1/2 rounded bg-surface-tertiary\" />\n\n {/* Content skeleton */}\n <div class=\"space-y-3\">\n <div class=\"h-4 rounded bg-surface-tertiary\" />\n <div class=\"h-4 w-5/6 rounded bg-surface-tertiary\" />\n <div class=\"h-4 w-4/6 rounded bg-surface-tertiary\" />\n </div>\n\n {/* Chart/visual skeleton */}\n <div class=\"mt-4 h-32 rounded bg-surface-tertiary\" />\n </div>\n </div>\n )\n}\n\n// CSS Animations (add to global styles or Tailwind config)\n/*\n@keyframes fade-in-up {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes progress-indeterminate {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(400%);\n }\n}\n\n.animate-fade-in-up {\n animation: fade-in-up 0.5s ease-out;\n}\n\n.animate-progress-indeterminate {\n animation: progress-indeterminate 1.5s infinite ease-in-out;\n}\n*/\n"],"names":["StreamingComponentRenderer","props","validation","validateComponent","component","valid","onError","type","message","componentId","id","details","errors","_$ssr","_tmpl$","_$ssrHydrationKey","_$escape","params","_$createComponent","GenerativeUIErrorBoundary","componentType","allowRetry","children","_tmpl$5","Show","when","title","_tmpl$2","value","_tmpl$4","unit","_tmpl$3","slice","StreamingUIRenderer","components","isLoading","isStreaming","error","progress","metadata","startStreaming","useStreamingUI","query","spaceIds","sessionId","options","onComplete","onComponentReceived","animatingComponents","setAnimatingComponents","createSignal","Set","handleComponentRender","prev","setTimeout","next","delete","_tmpl$12","class","showProgress","_tmpl$8","totalCount","_tmpl$6","receivedCount","_$ssrStyle","_tmpl$7","_tmpl$0","recoverable","_tmpl$9","For","each","onMount","_tmpl$13","position","colSpan","has","colStart","onRenderError","Array","from","length","SkeletonComponent","showMetadata","_tmpl$11","provider","model","executionTimeMs","costUSD","undefined","_tmpl$1","toFixed","firstTokenMs","cached","_tmpl$10","_tmpl$14"],"mappings":";;;;;;;;AAwCA,SAASA,2BAA2BC,OAGjC;;AAED,QAAMC,eAAaC,WAAAA,kBAAkBF,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