@copilotkit/a2ui-renderer 0.0.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.
- package/dist/.tsbuildinfo +1 -0
- package/dist/A2UIMessageRenderer.d.ts +7 -0
- package/dist/A2UIMessageRenderer.d.ts.map +1 -0
- package/dist/A2UIMessageRenderer.js +193 -0
- package/dist/A2UIMessageRenderer.js.map +1 -0
- package/dist/A2UIViewer.d.ts +22 -0
- package/dist/A2UIViewer.d.ts.map +1 -0
- package/dist/A2UIViewer.js +165 -0
- package/dist/A2UIViewer.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/components.d.ts +7 -0
- package/dist/styles/components.d.ts.map +1 -0
- package/dist/styles/components.js +7 -0
- package/dist/styles/components.js.map +1 -0
- package/dist/styles/global.d.ts +2 -0
- package/dist/styles/global.d.ts.map +1 -0
- package/dist/styles/global.js +145 -0
- package/dist/styles/global.js.map +1 -0
- package/dist/theme/viewer-theme.d.ts +3 -0
- package/dist/theme/viewer-theme.d.ts.map +1 -0
- package/dist/theme/viewer-theme.js +391 -0
- package/dist/theme/viewer-theme.js.map +1 -0
- package/dist/themed-surface.d.ts +20 -0
- package/dist/themed-surface.d.ts.map +1 -0
- package/dist/themed-surface.js +133 -0
- package/dist/themed-surface.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Google LLC
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { v0_8 } from "@a2ui/lit";
|
|
17
|
+
/** Elements */
|
|
18
|
+
const a = {
|
|
19
|
+
"typography-f-sf": true,
|
|
20
|
+
"typography-fs-n": true,
|
|
21
|
+
"typography-w-500": true,
|
|
22
|
+
"layout-as-n": true,
|
|
23
|
+
"layout-dis-iflx": true,
|
|
24
|
+
"layout-al-c": true,
|
|
25
|
+
};
|
|
26
|
+
const audio = {
|
|
27
|
+
"layout-w-100": true,
|
|
28
|
+
};
|
|
29
|
+
const body = {
|
|
30
|
+
"typography-f-s": true,
|
|
31
|
+
"typography-fs-n": true,
|
|
32
|
+
"typography-w-400": true,
|
|
33
|
+
"layout-mt-0": true,
|
|
34
|
+
"layout-mb-2": true,
|
|
35
|
+
"typography-sz-bm": true,
|
|
36
|
+
"color-c-n10": true,
|
|
37
|
+
};
|
|
38
|
+
const button = {
|
|
39
|
+
"typography-f-sf": true,
|
|
40
|
+
"typography-fs-n": true,
|
|
41
|
+
"typography-w-500": true,
|
|
42
|
+
"layout-pt-3": true,
|
|
43
|
+
"layout-pb-3": true,
|
|
44
|
+
"layout-pl-5": true,
|
|
45
|
+
"layout-pr-5": true,
|
|
46
|
+
"layout-mb-1": true,
|
|
47
|
+
"border-br-16": true,
|
|
48
|
+
"border-bw-0": true,
|
|
49
|
+
"border-c-n70": true,
|
|
50
|
+
"border-bs-s": true,
|
|
51
|
+
"color-bgc-s30": true,
|
|
52
|
+
"color-c-n100": true,
|
|
53
|
+
"behavior-ho-80": true,
|
|
54
|
+
};
|
|
55
|
+
const heading = {
|
|
56
|
+
"typography-f-sf": true,
|
|
57
|
+
"typography-fs-n": true,
|
|
58
|
+
"typography-w-500": true,
|
|
59
|
+
"layout-mt-0": true,
|
|
60
|
+
"layout-mb-2": true,
|
|
61
|
+
"color-c-n10": true,
|
|
62
|
+
};
|
|
63
|
+
const h1 = {
|
|
64
|
+
...heading,
|
|
65
|
+
"typography-sz-tl": true,
|
|
66
|
+
};
|
|
67
|
+
const h2 = {
|
|
68
|
+
...heading,
|
|
69
|
+
"typography-sz-tm": true,
|
|
70
|
+
};
|
|
71
|
+
const h3 = {
|
|
72
|
+
...heading,
|
|
73
|
+
"typography-sz-ts": true,
|
|
74
|
+
};
|
|
75
|
+
const iframe = {
|
|
76
|
+
"behavior-sw-n": true,
|
|
77
|
+
};
|
|
78
|
+
const input = {
|
|
79
|
+
"typography-f-sf": true,
|
|
80
|
+
"typography-fs-n": true,
|
|
81
|
+
"typography-w-400": true,
|
|
82
|
+
"layout-pl-4": true,
|
|
83
|
+
"layout-pr-4": true,
|
|
84
|
+
"layout-pt-2": true,
|
|
85
|
+
"layout-pb-2": true,
|
|
86
|
+
"border-br-6": true,
|
|
87
|
+
"border-bw-1": true,
|
|
88
|
+
"color-bc-s70": true,
|
|
89
|
+
"border-bs-s": true,
|
|
90
|
+
"layout-as-n": true,
|
|
91
|
+
"color-c-n10": true,
|
|
92
|
+
};
|
|
93
|
+
const p = {
|
|
94
|
+
"typography-f-s": true,
|
|
95
|
+
"typography-fs-n": true,
|
|
96
|
+
"typography-w-400": true,
|
|
97
|
+
"layout-m-0": true,
|
|
98
|
+
"typography-sz-bm": true,
|
|
99
|
+
"layout-as-n": true,
|
|
100
|
+
"color-c-n10": true,
|
|
101
|
+
};
|
|
102
|
+
const orderedList = {
|
|
103
|
+
"typography-f-s": true,
|
|
104
|
+
"typography-fs-n": true,
|
|
105
|
+
"typography-w-400": true,
|
|
106
|
+
"layout-m-0": true,
|
|
107
|
+
"typography-sz-bm": true,
|
|
108
|
+
"layout-as-n": true,
|
|
109
|
+
};
|
|
110
|
+
const unorderedList = {
|
|
111
|
+
"typography-f-s": true,
|
|
112
|
+
"typography-fs-n": true,
|
|
113
|
+
"typography-w-400": true,
|
|
114
|
+
"layout-m-0": true,
|
|
115
|
+
"typography-sz-bm": true,
|
|
116
|
+
"layout-as-n": true,
|
|
117
|
+
};
|
|
118
|
+
const listItem = {
|
|
119
|
+
"typography-f-s": true,
|
|
120
|
+
"typography-fs-n": true,
|
|
121
|
+
"typography-w-400": true,
|
|
122
|
+
"layout-m-0": true,
|
|
123
|
+
"typography-sz-bm": true,
|
|
124
|
+
"layout-as-n": true,
|
|
125
|
+
};
|
|
126
|
+
const pre = {
|
|
127
|
+
"typography-f-c": true,
|
|
128
|
+
"typography-fs-n": true,
|
|
129
|
+
"typography-w-400": true,
|
|
130
|
+
"typography-sz-bm": true,
|
|
131
|
+
"typography-ws-p": true,
|
|
132
|
+
"layout-as-n": true,
|
|
133
|
+
};
|
|
134
|
+
const textarea = {
|
|
135
|
+
...input,
|
|
136
|
+
"layout-r-none": true,
|
|
137
|
+
"layout-fs-c": true,
|
|
138
|
+
};
|
|
139
|
+
const video = {
|
|
140
|
+
"layout-el-cv": true,
|
|
141
|
+
};
|
|
142
|
+
const aLight = v0_8.Styles.merge(a, { "color-c-n5": true });
|
|
143
|
+
const inputLight = v0_8.Styles.merge(input, { "color-c-n5": true });
|
|
144
|
+
const textareaLight = v0_8.Styles.merge(textarea, { "color-c-n5": true });
|
|
145
|
+
const buttonLight = v0_8.Styles.merge(button, { "color-c-n100": true });
|
|
146
|
+
const h1Light = v0_8.Styles.merge(h1, { "color-c-n5": true });
|
|
147
|
+
const h2Light = v0_8.Styles.merge(h2, { "color-c-n5": true });
|
|
148
|
+
const h3Light = v0_8.Styles.merge(h3, { "color-c-n5": true });
|
|
149
|
+
const bodyLight = v0_8.Styles.merge(body, { "color-c-n5": true });
|
|
150
|
+
const pLight = v0_8.Styles.merge(p, { "color-c-n35": true });
|
|
151
|
+
const preLight = v0_8.Styles.merge(pre, { "color-c-n35": true });
|
|
152
|
+
const orderedListLight = v0_8.Styles.merge(orderedList, {
|
|
153
|
+
"color-c-n35": true,
|
|
154
|
+
});
|
|
155
|
+
const unorderedListLight = v0_8.Styles.merge(unorderedList, {
|
|
156
|
+
"color-c-n35": true,
|
|
157
|
+
});
|
|
158
|
+
const listItemLight = v0_8.Styles.merge(listItem, {
|
|
159
|
+
"color-c-n35": true,
|
|
160
|
+
});
|
|
161
|
+
export const theme = {
|
|
162
|
+
additionalStyles: {
|
|
163
|
+
Button: {
|
|
164
|
+
"--n-35": "var(--n-100)",
|
|
165
|
+
},
|
|
166
|
+
Card: {
|
|
167
|
+
padding: "32px",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
components: {
|
|
171
|
+
AudioPlayer: {},
|
|
172
|
+
Button: {
|
|
173
|
+
"layout-pt-2": true,
|
|
174
|
+
"layout-pb-2": true,
|
|
175
|
+
"layout-pl-3": true,
|
|
176
|
+
"layout-pr-3": true,
|
|
177
|
+
"border-br-12": true,
|
|
178
|
+
"border-bw-0": true,
|
|
179
|
+
"border-bs-s": true,
|
|
180
|
+
"color-bgc-p30": true,
|
|
181
|
+
"color-c-n100": true,
|
|
182
|
+
"behavior-ho-70": true,
|
|
183
|
+
},
|
|
184
|
+
Card: { "border-br-9": true, "color-bgc-p100": true },
|
|
185
|
+
CheckBox: {
|
|
186
|
+
element: {
|
|
187
|
+
"layout-m-0": true,
|
|
188
|
+
"layout-mr-2": true,
|
|
189
|
+
"layout-p-2": true,
|
|
190
|
+
"border-br-12": true,
|
|
191
|
+
"border-bw-1": true,
|
|
192
|
+
"border-bs-s": true,
|
|
193
|
+
"color-bgc-p100": true,
|
|
194
|
+
"color-bc-p60": true,
|
|
195
|
+
"color-c-n30": true,
|
|
196
|
+
"color-c-p30": true,
|
|
197
|
+
},
|
|
198
|
+
label: {
|
|
199
|
+
"color-c-p30": true,
|
|
200
|
+
"typography-f-sf": true,
|
|
201
|
+
"typography-v-r": true,
|
|
202
|
+
"typography-w-400": true,
|
|
203
|
+
"layout-flx-1": true,
|
|
204
|
+
"typography-sz-ll": true,
|
|
205
|
+
},
|
|
206
|
+
container: {
|
|
207
|
+
"layout-dsp-iflex": true,
|
|
208
|
+
"layout-al-c": true,
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
Column: {
|
|
212
|
+
"layout-g-2": true,
|
|
213
|
+
},
|
|
214
|
+
DateTimeInput: {
|
|
215
|
+
container: {},
|
|
216
|
+
label: {},
|
|
217
|
+
element: {
|
|
218
|
+
"layout-pt-2": true,
|
|
219
|
+
"layout-pb-2": true,
|
|
220
|
+
"layout-pl-3": true,
|
|
221
|
+
"layout-pr-3": true,
|
|
222
|
+
"border-br-12": true,
|
|
223
|
+
"border-bw-1": true,
|
|
224
|
+
"border-bs-s": true,
|
|
225
|
+
"color-bgc-p100": true,
|
|
226
|
+
"color-bc-p60": true,
|
|
227
|
+
"color-c-n30": true,
|
|
228
|
+
"color-c-p30": true,
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
Divider: {},
|
|
232
|
+
Image: {
|
|
233
|
+
all: {
|
|
234
|
+
"border-br-5": true,
|
|
235
|
+
"layout-el-cv": true,
|
|
236
|
+
"layout-w-100": true,
|
|
237
|
+
"layout-h-100": true,
|
|
238
|
+
},
|
|
239
|
+
avatar: { "is-avatar": true },
|
|
240
|
+
header: {},
|
|
241
|
+
icon: {},
|
|
242
|
+
largeFeature: {},
|
|
243
|
+
mediumFeature: {},
|
|
244
|
+
smallFeature: {},
|
|
245
|
+
},
|
|
246
|
+
Icon: {},
|
|
247
|
+
List: {
|
|
248
|
+
"layout-g-4": true,
|
|
249
|
+
"layout-p-2": true,
|
|
250
|
+
},
|
|
251
|
+
Modal: {
|
|
252
|
+
backdrop: { "color-bbgc-p60_20": true },
|
|
253
|
+
element: {
|
|
254
|
+
"border-br-2": true,
|
|
255
|
+
"color-bgc-p100": true,
|
|
256
|
+
"layout-p-4": true,
|
|
257
|
+
"border-bw-1": true,
|
|
258
|
+
"border-bs-s": true,
|
|
259
|
+
"color-bc-p80": true,
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
MultipleChoice: {
|
|
263
|
+
container: {},
|
|
264
|
+
label: {},
|
|
265
|
+
element: {},
|
|
266
|
+
},
|
|
267
|
+
Row: {
|
|
268
|
+
"layout-g-4": true,
|
|
269
|
+
},
|
|
270
|
+
Slider: {
|
|
271
|
+
container: {},
|
|
272
|
+
label: {},
|
|
273
|
+
element: {},
|
|
274
|
+
},
|
|
275
|
+
Tabs: {
|
|
276
|
+
container: {},
|
|
277
|
+
controls: { all: {}, selected: {} },
|
|
278
|
+
element: {},
|
|
279
|
+
},
|
|
280
|
+
Text: {
|
|
281
|
+
all: {
|
|
282
|
+
"layout-w-100": true,
|
|
283
|
+
"layout-g-2": true,
|
|
284
|
+
},
|
|
285
|
+
h1: {
|
|
286
|
+
"typography-f-sf": true,
|
|
287
|
+
"typography-v-r": true,
|
|
288
|
+
"typography-w-400": true,
|
|
289
|
+
"layout-m-0": true,
|
|
290
|
+
"layout-p-0": true,
|
|
291
|
+
"typography-sz-tl": true,
|
|
292
|
+
},
|
|
293
|
+
h2: {
|
|
294
|
+
"typography-f-sf": true,
|
|
295
|
+
"typography-v-r": true,
|
|
296
|
+
"typography-w-400": true,
|
|
297
|
+
"layout-m-0": true,
|
|
298
|
+
"layout-p-0": true,
|
|
299
|
+
"typography-sz-tm": true,
|
|
300
|
+
},
|
|
301
|
+
h3: {
|
|
302
|
+
"typography-f-sf": true,
|
|
303
|
+
"typography-v-r": true,
|
|
304
|
+
"typography-w-400": true,
|
|
305
|
+
"layout-m-0": true,
|
|
306
|
+
"layout-p-0": true,
|
|
307
|
+
"typography-sz-ts": true,
|
|
308
|
+
},
|
|
309
|
+
h4: {
|
|
310
|
+
"typography-f-sf": true,
|
|
311
|
+
"typography-v-r": true,
|
|
312
|
+
"typography-w-400": true,
|
|
313
|
+
"layout-m-0": true,
|
|
314
|
+
"layout-p-0": true,
|
|
315
|
+
"typography-sz-bl": true,
|
|
316
|
+
},
|
|
317
|
+
h5: {
|
|
318
|
+
"typography-f-sf": true,
|
|
319
|
+
"typography-v-r": true,
|
|
320
|
+
"typography-w-400": true,
|
|
321
|
+
"layout-m-0": true,
|
|
322
|
+
"layout-p-0": true,
|
|
323
|
+
"typography-sz-bm": true,
|
|
324
|
+
},
|
|
325
|
+
body: {},
|
|
326
|
+
caption: {},
|
|
327
|
+
},
|
|
328
|
+
TextField: {
|
|
329
|
+
container: {
|
|
330
|
+
"typography-sz-bm": true,
|
|
331
|
+
"layout-w-100": true,
|
|
332
|
+
"layout-g-2": true,
|
|
333
|
+
"layout-dsp-flexhor": true,
|
|
334
|
+
"layout-al-c": true,
|
|
335
|
+
},
|
|
336
|
+
label: {
|
|
337
|
+
"layout-flx-0": true,
|
|
338
|
+
},
|
|
339
|
+
element: {
|
|
340
|
+
"typography-sz-bm": true,
|
|
341
|
+
"layout-pt-2": true,
|
|
342
|
+
"layout-pb-2": true,
|
|
343
|
+
"layout-pl-3": true,
|
|
344
|
+
"layout-pr-3": true,
|
|
345
|
+
"border-br-12": true,
|
|
346
|
+
"border-bw-1": true,
|
|
347
|
+
"border-bs-s": true,
|
|
348
|
+
"color-bgc-p100": true,
|
|
349
|
+
"color-bc-p60": true,
|
|
350
|
+
"color-c-n30": true,
|
|
351
|
+
"color-c-p30": true,
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
Video: {
|
|
355
|
+
"border-br-5": true,
|
|
356
|
+
"layout-el-cv": true,
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
elements: {
|
|
360
|
+
a: aLight,
|
|
361
|
+
audio,
|
|
362
|
+
body: bodyLight,
|
|
363
|
+
button: buttonLight,
|
|
364
|
+
h1: h1Light,
|
|
365
|
+
h2: h2Light,
|
|
366
|
+
h3: h3Light,
|
|
367
|
+
h4: {},
|
|
368
|
+
h5: {},
|
|
369
|
+
iframe,
|
|
370
|
+
input: inputLight,
|
|
371
|
+
p: pLight,
|
|
372
|
+
pre: preLight,
|
|
373
|
+
textarea: textareaLight,
|
|
374
|
+
video,
|
|
375
|
+
},
|
|
376
|
+
markdown: {
|
|
377
|
+
p: [...Object.keys(pLight)],
|
|
378
|
+
h1: [...Object.keys(h1Light)],
|
|
379
|
+
h2: [...Object.keys(h2Light)],
|
|
380
|
+
h3: [...Object.keys(h3Light)],
|
|
381
|
+
h4: [],
|
|
382
|
+
h5: [],
|
|
383
|
+
ul: [...Object.keys(unorderedListLight)],
|
|
384
|
+
ol: [...Object.keys(orderedListLight)],
|
|
385
|
+
li: [...Object.keys(listItemLight)],
|
|
386
|
+
a: [...Object.keys(aLight)],
|
|
387
|
+
strong: [],
|
|
388
|
+
em: [],
|
|
389
|
+
},
|
|
390
|
+
};
|
|
391
|
+
//# sourceMappingURL=viewer-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer-theme.js","sourceRoot":"","sources":["../../src/theme/viewer-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,eAAe;AAEf,MAAM,CAAC,GAAG;IACR,iBAAiB,EAAE,IAAI;IACvB,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,IAAI;IACnB,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,KAAK,GAAG;IACZ,cAAc,EAAE,IAAI;CACrB,CAAC;AAEF,MAAM,IAAI,GAAG;IACX,gBAAgB,EAAE,IAAI;IACtB,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,MAAM,GAAG;IACb,iBAAiB,EAAE,IAAI;IACvB,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;I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,EAAE,EAAE;QACN,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACxC,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACtC,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACnC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,MAAM,EAAE,EAAE;QACV,EAAE,EAAE,EAAE;KACP;CACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { v0_8 } from "@a2ui/lit";
|
|
3
|
+
export type ThemedA2UISurfaceActionCallback = (event: v0_8.Events.StateEvent<"a2ui.action">, context: ThemedA2UISurfaceContext) => void;
|
|
4
|
+
export type ThemedA2UISurfaceContext = {
|
|
5
|
+
surfaceId: v0_8.Types.SurfaceID | null;
|
|
6
|
+
surface: v0_8.Types.Surface | null;
|
|
7
|
+
processor: InstanceType<typeof v0_8.Data.A2uiMessageProcessor> | null;
|
|
8
|
+
};
|
|
9
|
+
declare const ThemedA2UISurface_base: typeof LitElement;
|
|
10
|
+
export declare class ThemedA2UISurface extends ThemedA2UISurface_base {
|
|
11
|
+
#private;
|
|
12
|
+
accessor theme: v0_8.Types.Theme;
|
|
13
|
+
accessor surfaceId: v0_8.Types.SurfaceID | null;
|
|
14
|
+
accessor surface: v0_8.Types.Surface | null;
|
|
15
|
+
accessor processor: InstanceType<typeof v0_8.Data.A2uiMessageProcessor> | null;
|
|
16
|
+
accessor onAction: ThemedA2UISurfaceActionCallback | null;
|
|
17
|
+
render(): import("lit").TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=themed-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themed-surface.d.ts","sourceRoot":"","sources":["../src/themed-surface.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAGvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,MAAM,MAAM,+BAA+B,GAAG,CAC5C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,EAC5C,OAAO,EAAE,wBAAwB,KAC9B,IAAI,CAAC;AAEV,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC;CACvE,CAAC;;AAEF,qBACa,iBAAkB,SAAQ,sBAAyB;;IAG9D,QAAQ,CAAC,KAAK,EAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAGlC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAQ;IAGvD,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAQ;IAGnD,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAQ;IAGtF,QAAQ,CAAC,QAAQ,EAAE,+BAA+B,GAAG,IAAI,CAAQ;IAUjE,MAAM;CAWP"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2025 Google LLC
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
17
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
18
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
19
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
20
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
21
|
+
var _, done = false;
|
|
22
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
23
|
+
var context = {};
|
|
24
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
25
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
26
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
27
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
28
|
+
if (kind === "accessor") {
|
|
29
|
+
if (result === void 0) continue;
|
|
30
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
31
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
32
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
33
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
34
|
+
}
|
|
35
|
+
else if (_ = accept(result)) {
|
|
36
|
+
if (kind === "field") initializers.unshift(_);
|
|
37
|
+
else descriptor[key] = _;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
41
|
+
done = true;
|
|
42
|
+
};
|
|
43
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
44
|
+
var useValue = arguments.length > 2;
|
|
45
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
46
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
47
|
+
}
|
|
48
|
+
return useValue ? value : void 0;
|
|
49
|
+
};
|
|
50
|
+
import { SignalWatcher } from "@lit-labs/signals";
|
|
51
|
+
import { provide } from "@lit/context";
|
|
52
|
+
import { html, LitElement } from "lit";
|
|
53
|
+
import { customElement, property } from "lit/decorators.js";
|
|
54
|
+
import * as UI from "@a2ui/lit/ui";
|
|
55
|
+
import { globalStyles } from "./styles/global.js";
|
|
56
|
+
let ThemedA2UISurface = (() => {
|
|
57
|
+
let _classDecorators = [customElement("themed-a2ui-surface")];
|
|
58
|
+
let _classDescriptor;
|
|
59
|
+
let _classExtraInitializers = [];
|
|
60
|
+
let _classThis;
|
|
61
|
+
let _classSuper = SignalWatcher(LitElement);
|
|
62
|
+
let _theme_decorators;
|
|
63
|
+
let _theme_initializers = [];
|
|
64
|
+
let _theme_extraInitializers = [];
|
|
65
|
+
let _surfaceId_decorators;
|
|
66
|
+
let _surfaceId_initializers = [];
|
|
67
|
+
let _surfaceId_extraInitializers = [];
|
|
68
|
+
let _surface_decorators;
|
|
69
|
+
let _surface_initializers = [];
|
|
70
|
+
let _surface_extraInitializers = [];
|
|
71
|
+
let _processor_decorators;
|
|
72
|
+
let _processor_initializers = [];
|
|
73
|
+
let _processor_extraInitializers = [];
|
|
74
|
+
let _onAction_decorators;
|
|
75
|
+
let _onAction_initializers = [];
|
|
76
|
+
let _onAction_extraInitializers = [];
|
|
77
|
+
var ThemedA2UISurface = class extends _classSuper {
|
|
78
|
+
static { _classThis = this; }
|
|
79
|
+
static {
|
|
80
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
81
|
+
_theme_decorators = [provide({ context: UI.Context.themeContext }), property({ attribute: false })];
|
|
82
|
+
_surfaceId_decorators = [property({ attribute: false })];
|
|
83
|
+
_surface_decorators = [property({ attribute: false })];
|
|
84
|
+
_processor_decorators = [property({ attribute: false })];
|
|
85
|
+
_onAction_decorators = [property({ attribute: false })];
|
|
86
|
+
__esDecorate(this, null, _theme_decorators, { kind: "accessor", name: "theme", static: false, private: false, access: { has: obj => "theme" in obj, get: obj => obj.theme, set: (obj, value) => { obj.theme = value; } }, metadata: _metadata }, _theme_initializers, _theme_extraInitializers);
|
|
87
|
+
__esDecorate(this, null, _surfaceId_decorators, { kind: "accessor", name: "surfaceId", static: false, private: false, access: { has: obj => "surfaceId" in obj, get: obj => obj.surfaceId, set: (obj, value) => { obj.surfaceId = value; } }, metadata: _metadata }, _surfaceId_initializers, _surfaceId_extraInitializers);
|
|
88
|
+
__esDecorate(this, null, _surface_decorators, { kind: "accessor", name: "surface", static: false, private: false, access: { has: obj => "surface" in obj, get: obj => obj.surface, set: (obj, value) => { obj.surface = value; } }, metadata: _metadata }, _surface_initializers, _surface_extraInitializers);
|
|
89
|
+
__esDecorate(this, null, _processor_decorators, { kind: "accessor", name: "processor", static: false, private: false, access: { has: obj => "processor" in obj, get: obj => obj.processor, set: (obj, value) => { obj.processor = value; } }, metadata: _metadata }, _processor_initializers, _processor_extraInitializers);
|
|
90
|
+
__esDecorate(this, null, _onAction_decorators, { kind: "accessor", name: "onAction", static: false, private: false, access: { has: obj => "onAction" in obj, get: obj => obj.onAction, set: (obj, value) => { obj.onAction = value; } }, metadata: _metadata }, _onAction_initializers, _onAction_extraInitializers);
|
|
91
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
92
|
+
ThemedA2UISurface = _classThis = _classDescriptor.value;
|
|
93
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
94
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
95
|
+
}
|
|
96
|
+
#theme_accessor_storage = __runInitializers(this, _theme_initializers, void 0);
|
|
97
|
+
get theme() { return this.#theme_accessor_storage; }
|
|
98
|
+
set theme(value) { this.#theme_accessor_storage = value; }
|
|
99
|
+
#surfaceId_accessor_storage = (__runInitializers(this, _theme_extraInitializers), __runInitializers(this, _surfaceId_initializers, null));
|
|
100
|
+
get surfaceId() { return this.#surfaceId_accessor_storage; }
|
|
101
|
+
set surfaceId(value) { this.#surfaceId_accessor_storage = value; }
|
|
102
|
+
#surface_accessor_storage = (__runInitializers(this, _surfaceId_extraInitializers), __runInitializers(this, _surface_initializers, null));
|
|
103
|
+
get surface() { return this.#surface_accessor_storage; }
|
|
104
|
+
set surface(value) { this.#surface_accessor_storage = value; }
|
|
105
|
+
#processor_accessor_storage = (__runInitializers(this, _surface_extraInitializers), __runInitializers(this, _processor_initializers, null));
|
|
106
|
+
get processor() { return this.#processor_accessor_storage; }
|
|
107
|
+
set processor(value) { this.#processor_accessor_storage = value; }
|
|
108
|
+
#onAction_accessor_storage = (__runInitializers(this, _processor_extraInitializers), __runInitializers(this, _onAction_initializers, null));
|
|
109
|
+
get onAction() { return this.#onAction_accessor_storage; }
|
|
110
|
+
set onAction(value) { this.#onAction_accessor_storage = value; }
|
|
111
|
+
#handleAction = (__runInitializers(this, _onAction_extraInitializers), (event) => {
|
|
112
|
+
this.onAction?.(event, {
|
|
113
|
+
surfaceId: this.surfaceId,
|
|
114
|
+
surface: this.surface,
|
|
115
|
+
processor: this.processor,
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
render() {
|
|
119
|
+
return html `<style>
|
|
120
|
+
${globalStyles}
|
|
121
|
+
</style>
|
|
122
|
+
<a2ui-surface
|
|
123
|
+
@a2uiaction=${this.#handleAction}
|
|
124
|
+
.surfaceId=${this.surfaceId}
|
|
125
|
+
.surface=${this.surface}
|
|
126
|
+
.processor=${this.processor}
|
|
127
|
+
></a2ui-surface>`;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return ThemedA2UISurface = _classThis;
|
|
131
|
+
})();
|
|
132
|
+
export { ThemedA2UISurface };
|
|
133
|
+
//# sourceMappingURL=themed-surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themed-surface.js","sourceRoot":"","sources":["../src/themed-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,KAAK,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;IAcrC,iBAAiB;4BAD7B,aAAa,CAAC,qBAAqB,CAAC;;;;sBACE,aAAa,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;iCAAjC,SAAQ,WAAyB;;;;iCAC7D,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,EAC7C,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;qCAG9B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mCAG9B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;qCAG9B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;oCAG9B,QAAQ,CAAC,EAAE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,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "A2UI Renderer for CopilotKit - render A2UI surfaces in React applications",
|
|
6
|
+
"homepage": "https://github.com/CopilotKit/CopilotKit",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/CopilotKit/CopilotKit.git",
|
|
10
|
+
"directory": "packages/a2ui-renderer"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"type": "module",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"keywords": [
|
|
29
|
+
"copilotkit",
|
|
30
|
+
"a2ui",
|
|
31
|
+
"react",
|
|
32
|
+
"ai",
|
|
33
|
+
"ui",
|
|
34
|
+
"renderer"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@a2ui/lit": "^0.8.1",
|
|
38
|
+
"@lit-labs/signals": "^0.1.3",
|
|
39
|
+
"@lit/context": "^1.1.4",
|
|
40
|
+
"lit": "^3.2.1",
|
|
41
|
+
"zod": "^3.25.75"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@copilotkit/react-core": "^1.50.0",
|
|
45
|
+
"@copilotkitnext/react": "*",
|
|
46
|
+
"react": "^18 || ^19 || ^19.0.0-rc",
|
|
47
|
+
"react-dom": "^18 || ^19 || ^19.0.0-rc"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@copilotkitnext/react": "^0.0.31",
|
|
51
|
+
"@types/react": "^19.2.3",
|
|
52
|
+
"@types/react-dom": "^19.2.3",
|
|
53
|
+
"typescript": "5.9.2"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "tsc -p tsconfig.json",
|
|
57
|
+
"check-types": "tsc --noEmit -p tsconfig.json"
|
|
58
|
+
}
|
|
59
|
+
}
|