@copilotkit/a2ui-renderer 0.0.0-feat-fe-enhancements-middleware-20251226142224
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,193 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCopilotKit } from "@copilotkitnext/react";
|
|
3
|
+
import { v0_8 } from "@a2ui/lit";
|
|
4
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
export function createA2UIMessageRenderer(options) {
|
|
7
|
+
const { theme } = options;
|
|
8
|
+
return {
|
|
9
|
+
activityType: "a2ui-surface",
|
|
10
|
+
content: z.any(),
|
|
11
|
+
render: ({ content, agent }) => {
|
|
12
|
+
const [operations, setOperations] = useState([]);
|
|
13
|
+
const lastSignatureRef = useRef(null);
|
|
14
|
+
const processorsRef = useRef(new Map());
|
|
15
|
+
const { copilotkit } = useCopilotKit();
|
|
16
|
+
const actionLogger = useCallback(async (event, context) => {
|
|
17
|
+
if (!agent) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const resolvedContext = {};
|
|
21
|
+
const processorInstance = context.processor;
|
|
22
|
+
const surfaceKey = context.surfaceId ?? v0_8.Data.A2uiMessageProcessor.DEFAULT_SURFACE_ID;
|
|
23
|
+
const actionContext = event.detail.action?.context;
|
|
24
|
+
if (Array.isArray(actionContext) && actionContext.length > 0) {
|
|
25
|
+
for (const item of actionContext) {
|
|
26
|
+
if (!item?.key) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const valueDescriptor = item.value;
|
|
30
|
+
if (!valueDescriptor) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (typeof valueDescriptor.literalBoolean === "boolean" ||
|
|
34
|
+
typeof valueDescriptor.literalNumber === "number" ||
|
|
35
|
+
typeof valueDescriptor.literalString === "string") {
|
|
36
|
+
resolvedContext[item.key] =
|
|
37
|
+
valueDescriptor.literalBoolean ??
|
|
38
|
+
valueDescriptor.literalNumber ??
|
|
39
|
+
valueDescriptor.literalString;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const path = valueDescriptor.path;
|
|
43
|
+
if (path && processorInstance && typeof path === "string") {
|
|
44
|
+
const resolvedPath = processorInstance.resolvePath(path, event.detail.dataContextPath);
|
|
45
|
+
const value = processorInstance.getData(event.detail.sourceComponent, resolvedPath, surfaceKey);
|
|
46
|
+
if (value !== undefined) {
|
|
47
|
+
resolvedContext[item.key] = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const userAction = {
|
|
53
|
+
userAction: {
|
|
54
|
+
name: event.detail.action.name ?? "",
|
|
55
|
+
surfaceId: context.surfaceId ?? surfaceKey,
|
|
56
|
+
sourceComponentId: event.detail.sourceComponentId,
|
|
57
|
+
timestamp: new Date().toISOString(),
|
|
58
|
+
context: {
|
|
59
|
+
...resolvedContext,
|
|
60
|
+
surfaceId: context.surfaceId ?? surfaceKey,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
try {
|
|
65
|
+
console.info("[A2UI] Action dispatched", userAction.userAction);
|
|
66
|
+
copilotkit.setProperties({
|
|
67
|
+
...(copilotkit.properties ?? {}),
|
|
68
|
+
a2uiAction: userAction,
|
|
69
|
+
});
|
|
70
|
+
await copilotkit.runAgent({ agent });
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
if (copilotkit.properties) {
|
|
74
|
+
const { a2uiAction, ...rest } = copilotkit.properties;
|
|
75
|
+
copilotkit.setProperties(rest);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, [agent, copilotkit]);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (!content || !Array.isArray(content.operations)) {
|
|
81
|
+
processorsRef.current.forEach((processor) => processor.clearSurfaces());
|
|
82
|
+
processorsRef.current.clear();
|
|
83
|
+
lastSignatureRef.current = null;
|
|
84
|
+
setOperations([]);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const processors = processorsRef.current;
|
|
88
|
+
const incoming = content.operations;
|
|
89
|
+
const signature = stringifyOperations(incoming);
|
|
90
|
+
if (signature && signature === lastSignatureRef.current) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const groupedOperations = new Map();
|
|
94
|
+
for (const operation of incoming) {
|
|
95
|
+
const surfaceId = getOperationSurfaceId(operation) ?? v0_8.Data.A2uiMessageProcessor.DEFAULT_SURFACE_ID;
|
|
96
|
+
if (!groupedOperations.has(surfaceId)) {
|
|
97
|
+
groupedOperations.set(surfaceId, []);
|
|
98
|
+
}
|
|
99
|
+
groupedOperations.get(surfaceId).push(operation);
|
|
100
|
+
}
|
|
101
|
+
groupedOperations.forEach((operationsForSurfaceId, surfaceId) => {
|
|
102
|
+
let processor = processors.get(surfaceId);
|
|
103
|
+
if (!processor) {
|
|
104
|
+
processor = new v0_8.Data.A2uiMessageProcessor();
|
|
105
|
+
processors.set(surfaceId, processor);
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
processor.processMessages(operationsForSurfaceId);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
processors.delete(surfaceId);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const emptyProcessors = [];
|
|
115
|
+
processors.forEach((processor, surfaceId) => {
|
|
116
|
+
if (processor.getSurfaces().size === 0) {
|
|
117
|
+
emptyProcessors.push(surfaceId);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
if (emptyProcessors.length > 0) {
|
|
121
|
+
for (const surfaceId of emptyProcessors) {
|
|
122
|
+
processors.delete(surfaceId);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
lastSignatureRef.current = signature;
|
|
126
|
+
setOperations(incoming);
|
|
127
|
+
}, [content]);
|
|
128
|
+
const surfaceEntries = useMemo(() => {
|
|
129
|
+
const entries = [];
|
|
130
|
+
processorsRef.current.forEach((processor) => {
|
|
131
|
+
processor.getSurfaces().forEach((surface, surfaceId) => {
|
|
132
|
+
const typedSurface = surface;
|
|
133
|
+
if (typedSurface?.componentTree) {
|
|
134
|
+
entries.push({ id: surfaceId, surface: typedSurface, processor });
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
return entries;
|
|
139
|
+
}, [operations]);
|
|
140
|
+
if (!surfaceEntries.length) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
return (_jsx("div", { className: "flex min-h-0 flex-1 flex-col gap-6 overflow-auto py-6", children: surfaceEntries.map(({ id, surface, processor }) => (_jsx(SurfaceHost, { actionLogger: actionLogger, processor: processor, surface: surface, surfaceId: id, theme: theme }, id))) }));
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function getOperationSurfaceId(operation) {
|
|
148
|
+
if (!operation || typeof operation !== "object") {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
if (typeof operation.surfaceId === "string") {
|
|
152
|
+
return operation.surfaceId;
|
|
153
|
+
}
|
|
154
|
+
return (operation?.beginRendering?.surfaceId ??
|
|
155
|
+
operation?.surfaceUpdate?.surfaceId ??
|
|
156
|
+
operation?.dataModelUpdate?.surfaceId ??
|
|
157
|
+
operation?.deleteSurface?.surfaceId ??
|
|
158
|
+
null);
|
|
159
|
+
}
|
|
160
|
+
function stringifyOperations(ops) {
|
|
161
|
+
try {
|
|
162
|
+
return JSON.stringify(ops);
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function SurfaceHost({ actionLogger, processor, surface, surfaceId, theme }) {
|
|
169
|
+
const elementRef = useRef(null);
|
|
170
|
+
useEffect(() => {
|
|
171
|
+
const element = elementRef.current;
|
|
172
|
+
if (!element) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
element.processor = processor;
|
|
176
|
+
element.surfaceId = surfaceId;
|
|
177
|
+
element.surface = surface;
|
|
178
|
+
element.onAction = actionLogger;
|
|
179
|
+
element.theme = theme;
|
|
180
|
+
return () => {
|
|
181
|
+
if (elementRef.current === element) {
|
|
182
|
+
element.onAction = null;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}, [processor, surface, surfaceId, actionLogger, theme]);
|
|
186
|
+
return (_jsx("div", { className: "flex w-full flex-none overflow-hidden rounded-lg bg-white/5 p-4", children: React.createElement("themed-a2ui-surface", {
|
|
187
|
+
ref: elementRef,
|
|
188
|
+
className: "flex flex-1",
|
|
189
|
+
style: { height: "100%", overflow: "hidden" },
|
|
190
|
+
"data-surface-id": surfaceId,
|
|
191
|
+
}) }));
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=A2UIMessageRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A2UIMessageRenderer.js","sourceRoot":"","sources":["../src/A2UIMessageRenderer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAqC,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAKjC,OAAO,KAAK,EAAE,EACZ,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,MAAM,UAAU,yBAAyB,CACvC,OAAmC;IAEnC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAE1B,OAAO;QACL,YAAY,EAAE,cAAc;QAC5B,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE;QAChB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;YAC7B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAQ,EAAE,CAAC,CAAC;YACxD,MAAM,gBAAgB,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;YACrD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,GAAG,EAAyB,CAAC,CAAC;YAC/D,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAAC;YACvC,MAAM,YAAY,GAAG,WAAW,CAC9B,KAAK,EAAE,KAA4C,EAAE,OAAiC,EAAE,EAAE;gBACxF,IAAI,CAAC,KAAK,EAAE,CAAC;oBACX,OAAO;gBACT,CAAC;gBAED,MAAM,eAAe,GAA4B,EAAE,CAAC;gBACpD,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,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AE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAoB;IAC3F,MAAM,UAAU,GAAG,MAAM,CAA8B,IAAI,CAAC,CAAC;IAE7D,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QAED,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;QAC9B,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;QAC9B,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;QAC1B,OAAO,CAAC,QAAQ,GAAG,YAAY,CAAC;QAChC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;QAEtB,OAAO,GAAG,EAAE;YACV,IAAI,UAAU,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;gBACnC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzD,OAAO,CACL,cAAK,SAAS,EAAC,iEAAiE,YAC7E,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE;YAC1C,GAAG,EAAE,UAAU;YACf,SAAS,EAAE,aAAa;YACxB,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE;YAC7C,iBAAiB,EAAE,SAAS;SAC7B,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { v0_8 } from "@a2ui/lit";
|
|
3
|
+
export interface A2UIViewerProps {
|
|
4
|
+
/** ID of the root component to render */
|
|
5
|
+
root: string;
|
|
6
|
+
/** Component definitions - array of ComponentInstance */
|
|
7
|
+
components: v0_8.Types.ComponentInstance[];
|
|
8
|
+
/** Data model - nested object, e.g. { user: { name: "John" }, items: ["a", "b"] } */
|
|
9
|
+
data?: Record<string, unknown>;
|
|
10
|
+
/** Called when user triggers an action (button click, etc.) */
|
|
11
|
+
onAction?: (action: v0_8.Types.UserAction) => void;
|
|
12
|
+
/** Surface styles (primaryColor, font, logoUrl) */
|
|
13
|
+
styles?: Record<string, string>;
|
|
14
|
+
/** Optional className for the container */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A2UIViewer renders an A2UI component tree from a JSON definition and data.
|
|
19
|
+
* It re-renders cleanly when props change, discarding previous state.
|
|
20
|
+
*/
|
|
21
|
+
export declare function A2UIViewer({ root, components, data, onAction, styles, className, }: A2UIViewerProps): React.JSX.Element;
|
|
22
|
+
//# sourceMappingURL=A2UIViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A2UIViewer.d.ts","sourceRoot":"","sources":["../src/A2UIViewer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAcjC,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC3C,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACnD,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmIrC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
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
|
+
"use client";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import React, { useCallback, useEffect, useId, useMemo, useRef } from "react";
|
|
19
|
+
import { v0_8 } from "@a2ui/lit";
|
|
20
|
+
import { theme as viewerTheme } from "./theme/viewer-theme.js";
|
|
21
|
+
/**
|
|
22
|
+
* A2UIViewer renders an A2UI component tree from a JSON definition and data.
|
|
23
|
+
* It re-renders cleanly when props change, discarding previous state.
|
|
24
|
+
*/
|
|
25
|
+
export function A2UIViewer({ root, components, data, onAction, styles, className, }) {
|
|
26
|
+
const elementRef = useRef(null);
|
|
27
|
+
// Use React's useId for SSR-safe base ID
|
|
28
|
+
const baseId = useId();
|
|
29
|
+
// Generate a stable surfaceId that changes when definition changes
|
|
30
|
+
// Data changes are handled reactively by the signal-based processor
|
|
31
|
+
// Combine baseId with a hash of the definition for uniqueness
|
|
32
|
+
const surfaceId = useMemo(() => {
|
|
33
|
+
const definitionKey = `${root}-${JSON.stringify(components)}`;
|
|
34
|
+
// Simple hash for the definition
|
|
35
|
+
let hash = 0;
|
|
36
|
+
for (let i = 0; i < definitionKey.length; i++) {
|
|
37
|
+
const char = definitionKey.charCodeAt(i);
|
|
38
|
+
hash = (hash << 5) - hash + char;
|
|
39
|
+
hash = hash & hash; // Convert to 32bit integer
|
|
40
|
+
}
|
|
41
|
+
return `${baseId}-${hash}`;
|
|
42
|
+
}, [baseId, root, components]);
|
|
43
|
+
// Create signal-based processor for reactive updates - new one when surfaceId changes
|
|
44
|
+
const processor = useMemo(() => v0_8.Data.createSignalA2uiMessageProcessor(), [surfaceId]);
|
|
45
|
+
// Build and process messages, returning the surface
|
|
46
|
+
const surface = useMemo(() => {
|
|
47
|
+
const messages = [
|
|
48
|
+
{ beginRendering: { surfaceId, root, styles: styles ?? {} } },
|
|
49
|
+
{ surfaceUpdate: { surfaceId, components } },
|
|
50
|
+
];
|
|
51
|
+
// Add data model updates (convert nested object to ValueMap[])
|
|
52
|
+
if (data && Object.keys(data).length > 0) {
|
|
53
|
+
const contents = objectToValueMaps(data);
|
|
54
|
+
if (contents.length > 0) {
|
|
55
|
+
messages.push({ dataModelUpdate: { surfaceId, path: "/", contents } });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
processor.processMessages(messages);
|
|
59
|
+
return processor.getSurfaces().get(surfaceId) ?? null;
|
|
60
|
+
}, [processor, surfaceId, root, components, data, styles]);
|
|
61
|
+
// Action handler that resolves context bindings
|
|
62
|
+
const handleAction = useCallback((event, context) => {
|
|
63
|
+
if (!onAction)
|
|
64
|
+
return;
|
|
65
|
+
const resolvedContext = {};
|
|
66
|
+
const processorInstance = context.processor;
|
|
67
|
+
const actionContext = event.detail.action?.context;
|
|
68
|
+
// Resolve action context bindings
|
|
69
|
+
if (Array.isArray(actionContext) && actionContext.length > 0) {
|
|
70
|
+
for (const item of actionContext) {
|
|
71
|
+
if (!item?.key)
|
|
72
|
+
continue;
|
|
73
|
+
const valueDescriptor = item.value;
|
|
74
|
+
if (!valueDescriptor)
|
|
75
|
+
continue;
|
|
76
|
+
// Handle literal values
|
|
77
|
+
if (typeof valueDescriptor.literalBoolean === "boolean" ||
|
|
78
|
+
typeof valueDescriptor.literalNumber === "number" ||
|
|
79
|
+
typeof valueDescriptor.literalString === "string") {
|
|
80
|
+
resolvedContext[item.key] =
|
|
81
|
+
valueDescriptor.literalBoolean ??
|
|
82
|
+
valueDescriptor.literalNumber ??
|
|
83
|
+
valueDescriptor.literalString;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
// Handle path-based values
|
|
87
|
+
const path = valueDescriptor.path;
|
|
88
|
+
if (path && processorInstance && typeof path === "string") {
|
|
89
|
+
const resolvedPath = processorInstance.resolvePath(path, event.detail.dataContextPath);
|
|
90
|
+
const value = processorInstance.getData(event.detail.sourceComponent, resolvedPath, surfaceId);
|
|
91
|
+
if (value !== undefined) {
|
|
92
|
+
resolvedContext[item.key] = value;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
onAction({
|
|
98
|
+
actionName: event.detail.action?.name ?? "",
|
|
99
|
+
sourceComponentId: event.detail.sourceComponentId,
|
|
100
|
+
timestamp: new Date().toISOString(),
|
|
101
|
+
context: resolvedContext,
|
|
102
|
+
});
|
|
103
|
+
}, [onAction, surfaceId]);
|
|
104
|
+
// Set properties on the custom element
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const element = elementRef.current;
|
|
107
|
+
if (!element)
|
|
108
|
+
return;
|
|
109
|
+
element.processor = processor;
|
|
110
|
+
element.surfaceId = surfaceId;
|
|
111
|
+
element.surface = surface;
|
|
112
|
+
element.onAction = handleAction;
|
|
113
|
+
element.theme = viewerTheme;
|
|
114
|
+
return () => {
|
|
115
|
+
if (elementRef.current === element) {
|
|
116
|
+
element.onAction = null;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}, [processor, surface, surfaceId, handleAction]);
|
|
120
|
+
// Show placeholder if no content
|
|
121
|
+
if (!surface?.componentTree) {
|
|
122
|
+
return (_jsx("div", { className: className, style: { padding: 16, color: "#666", fontFamily: "system-ui" }, children: "No content to display" }));
|
|
123
|
+
}
|
|
124
|
+
return React.createElement("themed-a2ui-surface", {
|
|
125
|
+
ref: elementRef,
|
|
126
|
+
className,
|
|
127
|
+
"data-surface-id": surfaceId,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Converts a nested JavaScript object to the ValueMap[] format
|
|
132
|
+
* expected by A2UI's dataModelUpdate message.
|
|
133
|
+
*/
|
|
134
|
+
function objectToValueMaps(obj) {
|
|
135
|
+
return Object.entries(obj).map(([key, value]) => valueToValueMap(key, value));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Converts a single key-value pair to a ValueMap.
|
|
139
|
+
*/
|
|
140
|
+
function valueToValueMap(key, value) {
|
|
141
|
+
if (typeof value === "string") {
|
|
142
|
+
return { key, valueString: value };
|
|
143
|
+
}
|
|
144
|
+
if (typeof value === "number") {
|
|
145
|
+
return { key, valueNumber: value };
|
|
146
|
+
}
|
|
147
|
+
if (typeof value === "boolean") {
|
|
148
|
+
return { key, valueBoolean: value };
|
|
149
|
+
}
|
|
150
|
+
if (value === null || value === undefined) {
|
|
151
|
+
return { key };
|
|
152
|
+
}
|
|
153
|
+
if (Array.isArray(value)) {
|
|
154
|
+
// Convert array items with index as key
|
|
155
|
+
const valueMap = value.map((item, index) => valueToValueMap(String(index), item));
|
|
156
|
+
return { key, valueMap };
|
|
157
|
+
}
|
|
158
|
+
if (typeof value === "object") {
|
|
159
|
+
// Convert nested object recursively
|
|
160
|
+
const valueMap = objectToValueMaps(value);
|
|
161
|
+
return { key, valueMap };
|
|
162
|
+
}
|
|
163
|
+
return { key };
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=A2UIViewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A2UIViewer.js","sourceRoot":"","sources":["../src/A2UIViewer.tsx"],"names":[],"m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
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { ThemedA2UISurface } from "./themed-surface.js";
|
|
2
|
+
export type { ThemedA2UISurfaceActionCallback } from "./themed-surface.js";
|
|
3
|
+
export { globalStyles } from "./styles/global.js";
|
|
4
|
+
export { createA2UIMessageRenderer } from "./A2UIMessageRenderer.js";
|
|
5
|
+
export type { A2UIMessageRendererOptions } from "./A2UIMessageRenderer.js";
|
|
6
|
+
export { A2UIViewer } from "./A2UIViewer.js";
|
|
7
|
+
export type { A2UIViewerProps } from "./A2UIViewer.js";
|
|
8
|
+
import { v0_8 } from "@a2ui/lit";
|
|
9
|
+
export type ComponentInstance = v0_8.Types.ComponentInstance;
|
|
10
|
+
export type UserAction = v0_8.Types.UserAction;
|
|
11
|
+
export type Action = v0_8.Types.Action;
|
|
12
|
+
export type ServerToClientMessage = v0_8.Types.ServerToClientMessage;
|
|
13
|
+
export type Surface = v0_8.Types.Surface;
|
|
14
|
+
export type AnyComponentNode = v0_8.Types.AnyComponentNode;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,YAAY,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;AAC7D,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;AAC/C,MAAM,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;AACvC,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC;AACrE,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;AACzC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
export { ThemedA2UISurface } from "./themed-surface.js";
|
|
17
|
+
export { globalStyles } from "./styles/global.js";
|
|
18
|
+
export { createA2UIMessageRenderer } from "./A2UIMessageRenderer.js";
|
|
19
|
+
export { A2UIViewer } from "./A2UIViewer.js";
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/styles/components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/styles/components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const globalStyles = "\n :host {\n --n-100: #ffffff;\n --n-99: #fcfcfc;\n --n-98: #f9f9f9;\n --n-95: #f1f1f1;\n --n-90: #e2e2e2;\n --n-80: #c6c6c6;\n --n-70: #ababab;\n --n-60: #919191;\n --n-50: #777777;\n --n-40: #5e5e5e;\n --n-35: #525252;\n --n-30: #474747;\n --n-25: #3b3b3b;\n --n-20: #303030;\n --n-15: #262626;\n --n-10: #1b1b1b;\n --n-5: #111111;\n --n-0: #000000;\n\n --p-100: var(--a2ui-card-bg, #ffffff);\n --p-99: #fffbff;\n --p-98: #fcf8ff;\n --p-95: #f2efff;\n --p-90: #e1e0ff;\n --p-80: #c0c1ff;\n --p-70: #a0a3ff;\n --p-60: #8487ea;\n --p-50: #6a6dcd;\n --p-40: #5154b3;\n --p-35: #4447a6;\n --p-30: #383b99;\n --p-25: #2c2e8d;\n --p-20: #202182;\n --p-15: #131178;\n --p-10: #06006c;\n --p-5: #03004d;\n --p-0: #000000;\n\n --s-100: #ffffff;\n --s-99: #fffbff;\n --s-98: #fcf8ff;\n --s-95: #f2efff;\n --s-90: #e2e0f9;\n --s-80: #c6c4dd;\n --s-70: #aaa9c1;\n --s-60: #8f8fa5;\n --s-50: #75758b;\n --s-40: #5d5c72;\n --s-35: #515165;\n --s-30: #454559;\n --s-25: #393a4d;\n --s-20: #2e2f42;\n --s-15: #242437;\n --s-10: #191a2c;\n --s-5: #0f0f21;\n --s-0: #000000;\n\n --t-100: #ffffff;\n --t-99: #fffbff;\n --t-98: #fff8f9;\n --t-95: #ffecf4;\n --t-90: #ffd8ec;\n --t-80: #e9b9d3;\n --t-70: #cc9eb8;\n --t-60: #af849d;\n --t-50: #946b83;\n --t-40: #79536a;\n --t-35: #6c475d;\n --t-30: #5f3c51;\n --t-25: #523146;\n --t-20: #46263a;\n --t-15: #3a1b2f;\n --t-10: #2e1125;\n --t-5: #22071a;\n --t-0: #000000;\n\n --nv-100: #ffffff;\n --nv-99: #fffbff;\n --nv-98: #fcf8ff;\n --nv-95: #f2effa;\n --nv-90: #e4e1ec;\n --nv-80: #c8c5d0;\n --nv-70: #acaab4;\n --nv-60: #918f9a;\n --nv-50: #777680;\n --nv-40: #5e5d67;\n --nv-35: #52515b;\n --nv-30: #46464f;\n --nv-25: #3b3b43;\n --nv-20: #303038;\n --nv-15: #25252d;\n --nv-10: #1b1b23;\n --nv-5: #101018;\n --nv-0: #000000;\n\n --e-100: #ffffff;\n --e-99: #fffbff;\n --e-98: #fff8f7;\n --e-95: #ffedea;\n --e-90: #ffdad6;\n --e-80: #ffb4ab;\n --e-70: #ff897d;\n --e-60: #ff5449;\n --e-50: #de3730;\n --e-40: #ba1a1a;\n --e-35: #a80710;\n --e-30: #93000a;\n --e-25: #7e0007;\n --e-20: #690005;\n --e-15: #540003;\n --e-10: #410002;\n --e-5: #2d0001;\n --e-0: #000000;\n\n --primary: #137fec;\n --text-color: #fff;\n --background-light: #f6f7f8;\n --background-dark: #101922;\n --border-color: oklch(from var(--background-light) l c h / calc(alpha * 0.15));\n --elevated-background-light: oklch(\n from var(--background-light) l c h / calc(alpha * 0.05)\n );\n --bb-grid-size: 4px;\n --bb-grid-size-2: calc(var(--bb-grid-size) * 2);\n --bb-grid-size-3: calc(var(--bb-grid-size) * 3);\n --bb-grid-size-4: calc(var(--bb-grid-size) * 4);\n --bb-grid-size-5: calc(var(--bb-grid-size) * 5);\n --bb-grid-size-6: calc(var(--bb-grid-size) * 6);\n --bb-grid-size-7: calc(var(--bb-grid-size) * 7);\n --bb-grid-size-8: calc(var(--bb-grid-size) * 8);\n --bb-grid-size-9: calc(var(--bb-grid-size) * 9);\n --bb-grid-size-10: calc(var(--bb-grid-size) * 10);\n --bb-grid-size-11: calc(var(--bb-grid-size) * 11);\n --bb-grid-size-12: calc(var(--bb-grid-size) * 12);\n --bb-grid-size-13: calc(var(--bb-grid-size) * 13);\n --bb-grid-size-14: calc(var(--bb-grid-size) * 14);\n --bb-grid-size-15: calc(var(--bb-grid-size) * 15);\n --bb-grid-size-16: calc(var(--bb-grid-size) * 16);\n\n font-family: \"Google Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n }\n";
|
|
2
|
+
//# sourceMappingURL=global.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/styles/global.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+mHA+IxB,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export const globalStyles = `
|
|
2
|
+
:host {
|
|
3
|
+
--n-100: #ffffff;
|
|
4
|
+
--n-99: #fcfcfc;
|
|
5
|
+
--n-98: #f9f9f9;
|
|
6
|
+
--n-95: #f1f1f1;
|
|
7
|
+
--n-90: #e2e2e2;
|
|
8
|
+
--n-80: #c6c6c6;
|
|
9
|
+
--n-70: #ababab;
|
|
10
|
+
--n-60: #919191;
|
|
11
|
+
--n-50: #777777;
|
|
12
|
+
--n-40: #5e5e5e;
|
|
13
|
+
--n-35: #525252;
|
|
14
|
+
--n-30: #474747;
|
|
15
|
+
--n-25: #3b3b3b;
|
|
16
|
+
--n-20: #303030;
|
|
17
|
+
--n-15: #262626;
|
|
18
|
+
--n-10: #1b1b1b;
|
|
19
|
+
--n-5: #111111;
|
|
20
|
+
--n-0: #000000;
|
|
21
|
+
|
|
22
|
+
--p-100: var(--a2ui-card-bg, #ffffff);
|
|
23
|
+
--p-99: #fffbff;
|
|
24
|
+
--p-98: #fcf8ff;
|
|
25
|
+
--p-95: #f2efff;
|
|
26
|
+
--p-90: #e1e0ff;
|
|
27
|
+
--p-80: #c0c1ff;
|
|
28
|
+
--p-70: #a0a3ff;
|
|
29
|
+
--p-60: #8487ea;
|
|
30
|
+
--p-50: #6a6dcd;
|
|
31
|
+
--p-40: #5154b3;
|
|
32
|
+
--p-35: #4447a6;
|
|
33
|
+
--p-30: #383b99;
|
|
34
|
+
--p-25: #2c2e8d;
|
|
35
|
+
--p-20: #202182;
|
|
36
|
+
--p-15: #131178;
|
|
37
|
+
--p-10: #06006c;
|
|
38
|
+
--p-5: #03004d;
|
|
39
|
+
--p-0: #000000;
|
|
40
|
+
|
|
41
|
+
--s-100: #ffffff;
|
|
42
|
+
--s-99: #fffbff;
|
|
43
|
+
--s-98: #fcf8ff;
|
|
44
|
+
--s-95: #f2efff;
|
|
45
|
+
--s-90: #e2e0f9;
|
|
46
|
+
--s-80: #c6c4dd;
|
|
47
|
+
--s-70: #aaa9c1;
|
|
48
|
+
--s-60: #8f8fa5;
|
|
49
|
+
--s-50: #75758b;
|
|
50
|
+
--s-40: #5d5c72;
|
|
51
|
+
--s-35: #515165;
|
|
52
|
+
--s-30: #454559;
|
|
53
|
+
--s-25: #393a4d;
|
|
54
|
+
--s-20: #2e2f42;
|
|
55
|
+
--s-15: #242437;
|
|
56
|
+
--s-10: #191a2c;
|
|
57
|
+
--s-5: #0f0f21;
|
|
58
|
+
--s-0: #000000;
|
|
59
|
+
|
|
60
|
+
--t-100: #ffffff;
|
|
61
|
+
--t-99: #fffbff;
|
|
62
|
+
--t-98: #fff8f9;
|
|
63
|
+
--t-95: #ffecf4;
|
|
64
|
+
--t-90: #ffd8ec;
|
|
65
|
+
--t-80: #e9b9d3;
|
|
66
|
+
--t-70: #cc9eb8;
|
|
67
|
+
--t-60: #af849d;
|
|
68
|
+
--t-50: #946b83;
|
|
69
|
+
--t-40: #79536a;
|
|
70
|
+
--t-35: #6c475d;
|
|
71
|
+
--t-30: #5f3c51;
|
|
72
|
+
--t-25: #523146;
|
|
73
|
+
--t-20: #46263a;
|
|
74
|
+
--t-15: #3a1b2f;
|
|
75
|
+
--t-10: #2e1125;
|
|
76
|
+
--t-5: #22071a;
|
|
77
|
+
--t-0: #000000;
|
|
78
|
+
|
|
79
|
+
--nv-100: #ffffff;
|
|
80
|
+
--nv-99: #fffbff;
|
|
81
|
+
--nv-98: #fcf8ff;
|
|
82
|
+
--nv-95: #f2effa;
|
|
83
|
+
--nv-90: #e4e1ec;
|
|
84
|
+
--nv-80: #c8c5d0;
|
|
85
|
+
--nv-70: #acaab4;
|
|
86
|
+
--nv-60: #918f9a;
|
|
87
|
+
--nv-50: #777680;
|
|
88
|
+
--nv-40: #5e5d67;
|
|
89
|
+
--nv-35: #52515b;
|
|
90
|
+
--nv-30: #46464f;
|
|
91
|
+
--nv-25: #3b3b43;
|
|
92
|
+
--nv-20: #303038;
|
|
93
|
+
--nv-15: #25252d;
|
|
94
|
+
--nv-10: #1b1b23;
|
|
95
|
+
--nv-5: #101018;
|
|
96
|
+
--nv-0: #000000;
|
|
97
|
+
|
|
98
|
+
--e-100: #ffffff;
|
|
99
|
+
--e-99: #fffbff;
|
|
100
|
+
--e-98: #fff8f7;
|
|
101
|
+
--e-95: #ffedea;
|
|
102
|
+
--e-90: #ffdad6;
|
|
103
|
+
--e-80: #ffb4ab;
|
|
104
|
+
--e-70: #ff897d;
|
|
105
|
+
--e-60: #ff5449;
|
|
106
|
+
--e-50: #de3730;
|
|
107
|
+
--e-40: #ba1a1a;
|
|
108
|
+
--e-35: #a80710;
|
|
109
|
+
--e-30: #93000a;
|
|
110
|
+
--e-25: #7e0007;
|
|
111
|
+
--e-20: #690005;
|
|
112
|
+
--e-15: #540003;
|
|
113
|
+
--e-10: #410002;
|
|
114
|
+
--e-5: #2d0001;
|
|
115
|
+
--e-0: #000000;
|
|
116
|
+
|
|
117
|
+
--primary: #137fec;
|
|
118
|
+
--text-color: #fff;
|
|
119
|
+
--background-light: #f6f7f8;
|
|
120
|
+
--background-dark: #101922;
|
|
121
|
+
--border-color: oklch(from var(--background-light) l c h / calc(alpha * 0.15));
|
|
122
|
+
--elevated-background-light: oklch(
|
|
123
|
+
from var(--background-light) l c h / calc(alpha * 0.05)
|
|
124
|
+
);
|
|
125
|
+
--bb-grid-size: 4px;
|
|
126
|
+
--bb-grid-size-2: calc(var(--bb-grid-size) * 2);
|
|
127
|
+
--bb-grid-size-3: calc(var(--bb-grid-size) * 3);
|
|
128
|
+
--bb-grid-size-4: calc(var(--bb-grid-size) * 4);
|
|
129
|
+
--bb-grid-size-5: calc(var(--bb-grid-size) * 5);
|
|
130
|
+
--bb-grid-size-6: calc(var(--bb-grid-size) * 6);
|
|
131
|
+
--bb-grid-size-7: calc(var(--bb-grid-size) * 7);
|
|
132
|
+
--bb-grid-size-8: calc(var(--bb-grid-size) * 8);
|
|
133
|
+
--bb-grid-size-9: calc(var(--bb-grid-size) * 9);
|
|
134
|
+
--bb-grid-size-10: calc(var(--bb-grid-size) * 10);
|
|
135
|
+
--bb-grid-size-11: calc(var(--bb-grid-size) * 11);
|
|
136
|
+
--bb-grid-size-12: calc(var(--bb-grid-size) * 12);
|
|
137
|
+
--bb-grid-size-13: calc(var(--bb-grid-size) * 13);
|
|
138
|
+
--bb-grid-size-14: calc(var(--bb-grid-size) * 14);
|
|
139
|
+
--bb-grid-size-15: calc(var(--bb-grid-size) * 15);
|
|
140
|
+
--bb-grid-size-16: calc(var(--bb-grid-size) * 16);
|
|
141
|
+
|
|
142
|
+
font-family: "Google Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
143
|
+
}
|
|
144
|
+
`;
|
|
145
|
+
//# sourceMappingURL=global.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/styles/global.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+I3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer-theme.d.ts","sourceRoot":"","sources":["../../src/theme/viewer-theme.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAqKjC,eAAO,MAAM,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAqO9B,CAAC"}
|