@a2ui/angular 0.8.3 → 0.9.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +203 -0
- package/README.md +111 -3
- package/fesm2022/a2ui-angular-src-v0_8.mjs +1797 -0
- package/fesm2022/a2ui-angular-src-v0_8.mjs.map +1 -0
- package/fesm2022/a2ui-angular-src-v0_9.mjs +2330 -0
- package/fesm2022/a2ui-angular-src-v0_9.mjs.map +1 -0
- package/fesm2022/a2ui-angular-v0_8.mjs +1797 -0
- package/fesm2022/a2ui-angular-v0_8.mjs.map +1 -0
- package/fesm2022/a2ui-angular-v0_9.mjs +2330 -0
- package/fesm2022/a2ui-angular-v0_9.mjs.map +1 -0
- package/fesm2022/a2ui-angular.mjs +1558 -616
- package/fesm2022/a2ui-angular.mjs.map +1 -1
- package/package.json +51 -7
- package/types/a2ui-angular-src-v0_8.d.ts +400 -0
- package/types/a2ui-angular-src-v0_9.d.ts +813 -0
- package/types/a2ui-angular-v0_8.d.ts +400 -0
- package/types/a2ui-angular-v0_9.d.ts +813 -0
- package/types/a2ui-angular.d.ts +362 -35
- package/fesm2022/a2ui-angular-audio-DoZb9mn_.mjs +0 -48
- package/fesm2022/a2ui-angular-audio-DoZb9mn_.mjs.map +0 -1
- package/fesm2022/a2ui-angular-button-CvH0kAtN.mjs +0 -61
- package/fesm2022/a2ui-angular-button-CvH0kAtN.mjs.map +0 -1
- package/fesm2022/a2ui-angular-card-Ix6OIdUv.mjs +0 -48
- package/fesm2022/a2ui-angular-card-Ix6OIdUv.mjs.map +0 -1
- package/fesm2022/a2ui-angular-checkbox-BN4EF2Ci.mjs +0 -78
- package/fesm2022/a2ui-angular-checkbox-BN4EF2Ci.mjs.map +0 -1
- package/fesm2022/a2ui-angular-datetime-input-dmZAjvrF.mjs +0 -120
- package/fesm2022/a2ui-angular-datetime-input-dmZAjvrF.mjs.map +0 -1
- package/fesm2022/a2ui-angular-divider-BizPl3qL.mjs +0 -30
- package/fesm2022/a2ui-angular-divider-BizPl3qL.mjs.map +0 -1
- package/fesm2022/a2ui-angular-icon-BE9Hj9V6.mjs +0 -48
- package/fesm2022/a2ui-angular-icon-BE9Hj9V6.mjs.map +0 -1
- package/fesm2022/a2ui-angular-image-BWzAw0rh.mjs +0 -54
- package/fesm2022/a2ui-angular-image-BWzAw0rh.mjs.map +0 -1
- package/fesm2022/a2ui-angular-list-nEeT59V3.mjs +0 -45
- package/fesm2022/a2ui-angular-list-nEeT59V3.mjs.map +0 -1
- package/fesm2022/a2ui-angular-modal-mr9LmczA.mjs +0 -108
- package/fesm2022/a2ui-angular-modal-mr9LmczA.mjs.map +0 -1
- package/fesm2022/a2ui-angular-multiple-choice-Bry7X74i.mjs +0 -78
- package/fesm2022/a2ui-angular-multiple-choice-Bry7X74i.mjs.map +0 -1
- package/fesm2022/a2ui-angular-slider-BgseUbN2.mjs +0 -79
- package/fesm2022/a2ui-angular-slider-BgseUbN2.mjs.map +0 -1
- package/fesm2022/a2ui-angular-tabs-q5Mn9vgq.mjs +0 -87
- package/fesm2022/a2ui-angular-tabs-q5Mn9vgq.mjs.map +0 -1
- package/fesm2022/a2ui-angular-text-field-Deokh07j.mjs +0 -85
- package/fesm2022/a2ui-angular-text-field-Deokh07j.mjs.map +0 -1
- package/fesm2022/a2ui-angular-video-DuFTfN0B.mjs +0 -48
- package/fesm2022/a2ui-angular-video-DuFTfN0B.mjs.map +0 -1
package/types/a2ui-angular.d.ts
CHANGED
|
@@ -1,16 +1,98 @@
|
|
|
1
|
+
import * as WebCore from '@a2ui/web_core/v0_8';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Type, Binding, InjectionToken,
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { Type, Binding, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
4
|
+
import { Subject, Observable } from 'rxjs';
|
|
5
|
+
import * as _a2ui_web_core from '@a2ui/web_core';
|
|
6
|
+
import * as Primitives from '@a2ui/web_core/types/primitives';
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Centralized namespace for v0.8 renderer types.
|
|
10
|
+
* Standardizes on the `...Node` suffix for component types and provides
|
|
11
|
+
* resolved variants for property binding.
|
|
12
|
+
*/
|
|
13
|
+
declare namespace Types {
|
|
14
|
+
type Action = WebCore.Action;
|
|
15
|
+
type FunctionCall = unknown;
|
|
16
|
+
type SurfaceID = string;
|
|
17
|
+
type StringValue = WebCore.StringValue;
|
|
18
|
+
type BooleanValue = WebCore.BooleanValue;
|
|
19
|
+
type NumberValue = WebCore.NumberValue;
|
|
20
|
+
type Surface = WebCore.Surface;
|
|
21
|
+
type A2UIClientEventMessage = WebCore.A2UIClientEventMessage;
|
|
22
|
+
type ClientToServerMessage = A2UIClientEventMessage;
|
|
23
|
+
type ServerToClientMessage = WebCore.ServerToClientMessage;
|
|
24
|
+
interface Component<P = Record<string, unknown>> {
|
|
25
|
+
id: string;
|
|
26
|
+
type: string;
|
|
27
|
+
properties: P;
|
|
28
|
+
}
|
|
29
|
+
type AnyComponentNode = WebCore.AnyComponentNode;
|
|
30
|
+
type CustomNode = WebCore.CustomNode;
|
|
31
|
+
type Theme = WebCore.Theme;
|
|
32
|
+
type RowNode = WebCore.RowNode;
|
|
33
|
+
type ColumnNode = WebCore.ColumnNode;
|
|
34
|
+
type TextNode = WebCore.TextNode;
|
|
35
|
+
type ListNode = WebCore.ListNode;
|
|
36
|
+
type ImageNode = WebCore.ImageNode;
|
|
37
|
+
type IconNode = WebCore.IconNode;
|
|
38
|
+
type VideoNode = WebCore.VideoNode;
|
|
39
|
+
type AudioPlayerNode = WebCore.AudioPlayerNode;
|
|
40
|
+
type ButtonNode = WebCore.ButtonNode;
|
|
41
|
+
type DividerNode = WebCore.DividerNode;
|
|
42
|
+
type MultipleChoiceNode = WebCore.MultipleChoiceNode;
|
|
43
|
+
type TextFieldNode = WebCore.TextFieldNode;
|
|
44
|
+
type CheckboxNode = WebCore.CheckboxNode;
|
|
45
|
+
type SliderNode = WebCore.SliderNode;
|
|
46
|
+
type DateTimeInputNode = WebCore.DateTimeInputNode;
|
|
47
|
+
type TabsNode = WebCore.TabsNode;
|
|
48
|
+
type ModalNode = WebCore.ModalNode;
|
|
49
|
+
type CardNode = WebCore.CardNode;
|
|
50
|
+
type ResolvedRow = WebCore.ResolvedRow;
|
|
51
|
+
type ResolvedColumn = WebCore.ResolvedColumn;
|
|
52
|
+
type ResolvedText = WebCore.ResolvedText;
|
|
53
|
+
type ResolvedList = WebCore.ResolvedList;
|
|
54
|
+
type ResolvedImage = WebCore.ResolvedImage;
|
|
55
|
+
type ResolvedIcon = WebCore.ResolvedIcon;
|
|
56
|
+
type ResolvedVideo = WebCore.ResolvedVideo;
|
|
57
|
+
type ResolvedAudioPlayer = WebCore.ResolvedAudioPlayer;
|
|
58
|
+
type ResolvedButton = WebCore.ResolvedButton;
|
|
59
|
+
type ResolvedDivider = WebCore.ResolvedDivider;
|
|
60
|
+
type ResolvedMultipleChoice = WebCore.ResolvedMultipleChoice;
|
|
61
|
+
type ResolvedTextField = WebCore.ResolvedTextField;
|
|
62
|
+
type ResolvedCheckbox = WebCore.ResolvedCheckbox;
|
|
63
|
+
type ResolvedSlider = WebCore.ResolvedSlider;
|
|
64
|
+
type ResolvedDateTimeInput = WebCore.ResolvedDateTimeInput;
|
|
65
|
+
type ResolvedTabs = WebCore.ResolvedTabs;
|
|
66
|
+
type ResolvedModal = WebCore.ResolvedModal;
|
|
67
|
+
type ResolvedCard = WebCore.ResolvedCard;
|
|
68
|
+
type MarkdownRenderer = WebCore.MarkdownRenderer;
|
|
69
|
+
type MarkdownRendererOptions = WebCore.MarkdownRendererOptions;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface A2UIClientEvent {
|
|
7
73
|
message: Types.A2UIClientEventMessage;
|
|
8
74
|
completion: Subject<Types.ServerToClientMessage[]>;
|
|
9
75
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
76
|
+
type DispatchedEvent = A2UIClientEvent;
|
|
77
|
+
declare class MessageProcessor {
|
|
78
|
+
private baseProcessor;
|
|
79
|
+
private readonly eventsSubject;
|
|
80
|
+
readonly events: Observable<A2UIClientEvent>;
|
|
81
|
+
private readonly versionSignal;
|
|
82
|
+
readonly version: _angular_core.Signal<number>;
|
|
83
|
+
constructor();
|
|
84
|
+
/**
|
|
85
|
+
* Increments the version signal to notify Angular that the data model has changed.
|
|
86
|
+
* This should be called after any update to the underlying base processor's surfaces.
|
|
87
|
+
*/
|
|
88
|
+
private notify;
|
|
89
|
+
processMessages(messages: Types.ServerToClientMessage[]): void;
|
|
13
90
|
dispatch(message: Types.A2UIClientEventMessage): Promise<Types.ServerToClientMessage[]>;
|
|
91
|
+
getData(node: Types.AnyComponentNode, path: string, surfaceId?: string | null): unknown;
|
|
92
|
+
setData(node: Types.AnyComponentNode | null, path: string, value: any, surfaceId: string): void;
|
|
93
|
+
resolvePath(path: string, dataContextPath?: string): string;
|
|
94
|
+
getSurfaces(): ReadonlyMap<string, WebCore.Surface>;
|
|
95
|
+
clearSurfaces(): void;
|
|
14
96
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageProcessor, never>;
|
|
15
97
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MessageProcessor>;
|
|
16
98
|
}
|
|
@@ -27,16 +109,49 @@ type A2AServerPayload = Array<A2DataPayload | A2TextPayload> | {
|
|
|
27
109
|
error: string;
|
|
28
110
|
};
|
|
29
111
|
|
|
112
|
+
declare abstract class MarkdownRenderer {
|
|
113
|
+
abstract render(markdown: string, options?: Types.MarkdownRendererOptions): Promise<string>;
|
|
114
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownRenderer, never>;
|
|
115
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MarkdownRenderer>;
|
|
116
|
+
}
|
|
117
|
+
declare class DefaultMarkdownRenderer extends MarkdownRenderer {
|
|
118
|
+
private static warningLogged;
|
|
119
|
+
render(markdown: string, options?: Types.MarkdownRendererOptions): Promise<string>;
|
|
120
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DefaultMarkdownRenderer, never>;
|
|
121
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DefaultMarkdownRenderer>;
|
|
122
|
+
}
|
|
123
|
+
declare function provideMarkdownRenderer(renderFn?: Types.MarkdownRenderer): {
|
|
124
|
+
provide: typeof MarkdownRenderer;
|
|
125
|
+
useValue: {
|
|
126
|
+
render: _a2ui_web_core.MarkdownRenderer;
|
|
127
|
+
};
|
|
128
|
+
useClass?: undefined;
|
|
129
|
+
} | {
|
|
130
|
+
provide: typeof MarkdownRenderer;
|
|
131
|
+
useClass: typeof DefaultMarkdownRenderer;
|
|
132
|
+
useValue?: undefined;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
declare class Theme {
|
|
136
|
+
components: Types.Theme['components'];
|
|
137
|
+
elements: Types.Theme['elements'];
|
|
138
|
+
markdown: Types.Theme['markdown'];
|
|
139
|
+
additionalStyles?: Types.Theme['additionalStyles'];
|
|
140
|
+
update(theme: Types.Theme): void;
|
|
141
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Theme, never>;
|
|
142
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<Theme>;
|
|
143
|
+
}
|
|
144
|
+
|
|
30
145
|
declare abstract class DynamicComponent<T extends Types.AnyComponentNode = Types.AnyComponentNode> {
|
|
31
146
|
protected readonly processor: MessageProcessor;
|
|
32
|
-
protected readonly theme:
|
|
147
|
+
protected readonly theme: Theme;
|
|
33
148
|
readonly surfaceId: _angular_core.InputSignal<string | null>;
|
|
34
149
|
readonly component: _angular_core.InputSignal<T>;
|
|
35
150
|
readonly weight: _angular_core.InputSignal<string | number>;
|
|
36
151
|
protected sendAction(action: Types.Action): Promise<Types.ServerToClientMessage[]>;
|
|
37
|
-
protected resolvePrimitive(value:
|
|
38
|
-
protected resolvePrimitive(value:
|
|
39
|
-
protected resolvePrimitive(value:
|
|
152
|
+
protected resolvePrimitive(value: Types.StringValue | null): string | null;
|
|
153
|
+
protected resolvePrimitive(value: Types.BooleanValue | null): boolean | null;
|
|
154
|
+
protected resolvePrimitive(value: Types.NumberValue | null): number | null;
|
|
40
155
|
protected getUniqueId(prefix: string): string;
|
|
41
156
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicComponent<any>, never>;
|
|
42
157
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DynamicComponent<any>, never, never, { "surfaceId": { "alias": "surfaceId"; "required": true; "isSignal": true; }; "component": { "alias": "component"; "required": true; "isSignal": true; }; "weight": { "alias": "weight"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -52,39 +167,251 @@ interface Catalog {
|
|
|
52
167
|
}
|
|
53
168
|
declare const Catalog: InjectionToken<Catalog>;
|
|
54
169
|
|
|
55
|
-
declare
|
|
56
|
-
|
|
57
|
-
|
|
170
|
+
declare const DEFAULT_CATALOG: Catalog;
|
|
171
|
+
declare function registerStandardComponents(catalog: Catalog): void;
|
|
172
|
+
|
|
173
|
+
declare class AudioPlayer extends DynamicComponent<Types.AudioPlayerNode> {
|
|
174
|
+
readonly url: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
175
|
+
protected readonly resolvedUrl: _angular_core.Signal<string | null>;
|
|
176
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AudioPlayer, never>;
|
|
177
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AudioPlayer, "a2ui-audio", never, { "url": { "alias": "url"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare class Button extends DynamicComponent<Types.ButtonNode> {
|
|
181
|
+
readonly action: _angular_core.InputSignal<_a2ui_web_core.Action | null>;
|
|
182
|
+
readonly child: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode | null>;
|
|
183
|
+
readonly primary: _angular_core.InputSignal<boolean | null>;
|
|
184
|
+
protected handleClick(): void;
|
|
185
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Button, never>;
|
|
186
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Button, "a2ui-button", never, { "action": { "alias": "action"; "required": false; "isSignal": true; }; "child": { "alias": "child"; "required": false; "isSignal": true; }; "primary": { "alias": "primary"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare class Card extends DynamicComponent<Types.CardNode> {
|
|
190
|
+
readonly child: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode | null>;
|
|
191
|
+
readonly children: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode[]>;
|
|
192
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Card, never>;
|
|
193
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Card, "a2ui-card", never, { "child": { "alias": "child"; "required": false; "isSignal": true; }; "children": { "alias": "children"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare class Checkbox extends DynamicComponent<Types.CheckboxNode> {
|
|
197
|
+
readonly label: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
198
|
+
readonly checked: _angular_core.InputSignal<_a2ui_web_core.BooleanValue | null>;
|
|
199
|
+
protected inputChecked: _angular_core.Signal<boolean>;
|
|
200
|
+
protected resolvedLabel: _angular_core.Signal<string | null>;
|
|
201
|
+
protected readonly inputId: string;
|
|
202
|
+
onToggle(event: Event): void;
|
|
203
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Checkbox, never>;
|
|
204
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Checkbox, "a2ui-checkbox", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "checked": { "alias": "checked"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
declare class Column extends DynamicComponent<Types.ColumnNode> {
|
|
208
|
+
readonly alignment: _angular_core.InputSignal<"start" | "center" | "end" | "stretch" | undefined>;
|
|
209
|
+
readonly distribution: _angular_core.InputSignal<"start" | "center" | "end" | "spaceBetween" | "spaceAround" | "spaceEvenly" | undefined>;
|
|
210
|
+
readonly children: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode[] | null | undefined>;
|
|
211
|
+
protected readonly classes: _angular_core.Signal<{
|
|
212
|
+
[x: string]: boolean;
|
|
213
|
+
}>;
|
|
214
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Column, never>;
|
|
215
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Column, "a2ui-column", never, { "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "distribution": { "alias": "distribution"; "required": false; "isSignal": true; }; "children": { "alias": "children"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
declare class DateTimeInput extends DynamicComponent<Types.DateTimeInputNode> {
|
|
219
|
+
readonly label: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
220
|
+
readonly value: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
221
|
+
readonly enableDate: _angular_core.InputSignal<boolean>;
|
|
222
|
+
readonly enableTime: _angular_core.InputSignal<boolean>;
|
|
223
|
+
protected readonly inputId: string;
|
|
224
|
+
protected inputType: _angular_core.Signal<"date" | "datetime-local" | "time">;
|
|
225
|
+
protected readonly resolvedLabel: _angular_core.Signal<string | null>;
|
|
226
|
+
protected resolvedValue: _angular_core.Signal<string | null>;
|
|
227
|
+
onChange(event: Event): void;
|
|
228
|
+
private handleAction;
|
|
229
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateTimeInput, never>;
|
|
230
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateTimeInput, "a2ui-datetime-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "enableDate": { "alias": "enableDate"; "required": false; "isSignal": true; }; "enableTime": { "alias": "enableTime"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
declare class Divider extends DynamicComponent<Types.DividerNode> {
|
|
234
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Divider, never>;
|
|
235
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Divider, "a2ui-divider", never, {}, {}, never, never, true, never>;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
declare class Icon extends DynamicComponent<Types.IconNode> {
|
|
239
|
+
readonly name: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
240
|
+
protected readonly resolvedName: _angular_core.Signal<string | null>;
|
|
241
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Icon, never>;
|
|
242
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Icon, "a2ui-icon", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare class Image extends DynamicComponent<Types.ImageNode> {
|
|
246
|
+
readonly url: _angular_core.InputSignal<Primitives.StringValue | null>;
|
|
247
|
+
readonly usageHint: _angular_core.InputSignal<"header" | "icon" | "avatar" | "smallFeature" | "mediumFeature" | "largeFeature" | null | undefined>;
|
|
248
|
+
readonly fit: _angular_core.InputSignal<"fill" | "contain" | "cover" | "none" | "scale-down" | null | undefined>;
|
|
249
|
+
readonly altText: _angular_core.InputSignal<Primitives.StringValue | null>;
|
|
250
|
+
protected readonly resolvedUrl: _angular_core.Signal<string | null>;
|
|
251
|
+
protected readonly resolvedAltText: _angular_core.Signal<string>;
|
|
252
|
+
protected classes: _angular_core.Signal<Record<string, boolean>>;
|
|
253
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Image, never>;
|
|
254
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Image, "a2ui-image", never, { "url": { "alias": "url"; "required": false; "isSignal": true; }; "usageHint": { "alias": "usageHint"; "required": false; "isSignal": true; }; "fit": { "alias": "fit"; "required": false; "isSignal": true; }; "altText": { "alias": "altText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare class List extends DynamicComponent<Types.ListNode> {
|
|
258
|
+
readonly alignment: _angular_core.InputSignal<"start" | "center" | "end" | "stretch" | undefined>;
|
|
259
|
+
readonly direction: _angular_core.InputSignal<"vertical" | "horizontal" | undefined>;
|
|
260
|
+
readonly children: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode[] | null>;
|
|
261
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<List, never>;
|
|
262
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<List, "a2ui-list", never, { "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "children": { "alias": "children"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
declare class Modal extends DynamicComponent<Types.ModalNode> {
|
|
266
|
+
readonly entryPointChild: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode>;
|
|
267
|
+
readonly contentChild: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode>;
|
|
268
|
+
protected readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
269
|
+
protected openModal(): void;
|
|
270
|
+
protected closeModal(): void;
|
|
271
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Modal, never>;
|
|
272
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Modal, "a2ui-modal", never, { "entryPointChild": { "alias": "entryPointChild"; "required": true; "isSignal": true; }; "contentChild": { "alias": "contentChild"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
declare class MultipleChoice extends DynamicComponent<Types.MultipleChoiceNode> {
|
|
276
|
+
readonly label: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
277
|
+
readonly options: _angular_core.InputSignal<{
|
|
278
|
+
label: Types.StringValue;
|
|
279
|
+
value: string;
|
|
280
|
+
}[]>;
|
|
281
|
+
readonly selections: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode | null>;
|
|
282
|
+
protected readonly selectId: string;
|
|
283
|
+
protected readonly resolvedLabel: _angular_core.Signal<string | null>;
|
|
284
|
+
protected readonly resolvedOptions: _angular_core.Signal<{
|
|
285
|
+
label: string | null;
|
|
286
|
+
value: string;
|
|
287
|
+
}[]>;
|
|
288
|
+
protected readonly resolvedSelections: _angular_core.Signal<string[]>;
|
|
289
|
+
onChange(event: Event): void;
|
|
290
|
+
private handleAction;
|
|
291
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MultipleChoice, never>;
|
|
292
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MultipleChoice, "a2ui-multiple-choice", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "selections": { "alias": "selections"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
declare class Row extends DynamicComponent<Types.RowNode> {
|
|
296
|
+
readonly alignment: _angular_core.InputSignal<"start" | "center" | "end" | "stretch" | undefined>;
|
|
297
|
+
readonly distribution: _angular_core.InputSignal<"start" | "center" | "end" | "spaceBetween" | "spaceAround" | "spaceEvenly" | undefined>;
|
|
298
|
+
readonly children: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode[] | null | undefined>;
|
|
299
|
+
protected readonly classes: _angular_core.Signal<{
|
|
300
|
+
[x: string]: boolean;
|
|
301
|
+
}>;
|
|
302
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Row, never>;
|
|
303
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Row, "a2ui-row", never, { "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "distribution": { "alias": "distribution"; "required": false; "isSignal": true; }; "children": { "alias": "children"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
declare class Slider extends DynamicComponent<Types.SliderNode> {
|
|
307
|
+
readonly label: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
308
|
+
readonly value: _angular_core.InputSignal<_a2ui_web_core.NumberValue | null>;
|
|
309
|
+
readonly minValue: _angular_core.InputSignal<number>;
|
|
310
|
+
readonly maxValue: _angular_core.InputSignal<number>;
|
|
311
|
+
protected readonly inputId: string;
|
|
312
|
+
protected readonly labelId: string;
|
|
313
|
+
protected resolvedLabel: _angular_core.Signal<string | null>;
|
|
314
|
+
protected resolvedValue: _angular_core.Signal<number | null>;
|
|
315
|
+
onInput(event: Event): void;
|
|
316
|
+
private handleAction;
|
|
317
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Slider, never>;
|
|
318
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Slider, "a2ui-slider", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
declare class Surface {
|
|
322
|
+
private readonly processor;
|
|
323
|
+
readonly surfaceId: _angular_core.InputSignal<string>;
|
|
324
|
+
readonly surfaceInput: _angular_core.InputSignal<_a2ui_web_core.Surface | null>;
|
|
325
|
+
protected readonly surface: _angular_core.Signal<_a2ui_web_core.Surface | null>;
|
|
326
|
+
protected readonly rootComponent: _angular_core.Signal<_a2ui_web_core.AnyComponentNode | null>;
|
|
327
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Surface, never>;
|
|
328
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Surface, "a2ui-surface", never, { "surfaceId": { "alias": "surfaceId"; "required": true; "isSignal": true; }; "surfaceInput": { "alias": "surface"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
declare class Tabs extends DynamicComponent<Types.TabsNode> {
|
|
332
|
+
readonly tabItems: _angular_core.InputSignal<_a2ui_web_core.ResolvedTabItem[]>;
|
|
333
|
+
protected readonly selectedIndex: _angular_core.WritableSignal<number>;
|
|
334
|
+
protected selectTab(index: number): void;
|
|
335
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tabs, never>;
|
|
336
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Tabs, "a2ui-tabs", never, { "tabItems": { "alias": "tabItems"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
declare class TextField extends DynamicComponent<Types.TextFieldNode> {
|
|
340
|
+
readonly label: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
341
|
+
readonly text: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
342
|
+
readonly textFieldType: _angular_core.InputSignal<"number" | "date" | "shortText" | "longText" | undefined>;
|
|
343
|
+
protected readonly inputId: string;
|
|
344
|
+
protected resolvedLabel: _angular_core.Signal<string | null>;
|
|
345
|
+
protected resolvedText: _angular_core.Signal<string | null>;
|
|
346
|
+
protected htmlInputType: _angular_core.Signal<"text" | "number" | "date">;
|
|
347
|
+
onInput(event: Event): void;
|
|
348
|
+
private handleAction;
|
|
349
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TextField, never>;
|
|
350
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextField, "a2ui-text-field", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "textFieldType": { "alias": "textFieldType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
declare class Text extends DynamicComponent<Types.TextNode> {
|
|
354
|
+
private markdownRenderer;
|
|
355
|
+
readonly text: _angular_core.InputSignal<Primitives.StringValue | null>;
|
|
356
|
+
readonly usageHint: _angular_core.InputSignal<"body" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | null | undefined>;
|
|
357
|
+
protected resolvedText: _angular_core.Signal<Promise<string>>;
|
|
358
|
+
protected classes: _angular_core.Signal<Record<string, boolean>>;
|
|
359
|
+
protected additionalStyles: _angular_core.Signal<Record<string, string> | null>;
|
|
360
|
+
private areHintedStyles;
|
|
361
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Text, never>;
|
|
362
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Text, "a2ui-text", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; "usageHint": { "alias": "usageHint"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
declare class Video extends DynamicComponent<Types.VideoNode> {
|
|
366
|
+
readonly url: _angular_core.InputSignal<_a2ui_web_core.StringValue | null>;
|
|
367
|
+
protected readonly resolvedUrl: _angular_core.Signal<string | null>;
|
|
368
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Video, never>;
|
|
369
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Video, "a2ui-video", never, { "url": { "alias": "url"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
declare class Renderer {
|
|
58
373
|
private static hasInsertedStyles;
|
|
59
|
-
private
|
|
60
|
-
private
|
|
374
|
+
private readonly catalog;
|
|
375
|
+
private readonly container;
|
|
376
|
+
private readonly processor;
|
|
61
377
|
readonly surfaceId: _angular_core.InputSignal<string>;
|
|
62
|
-
readonly component: _angular_core.InputSignal<
|
|
378
|
+
readonly component: _angular_core.InputSignal<_a2ui_web_core.AnyComponentNode>;
|
|
379
|
+
private currentId;
|
|
380
|
+
private currentType;
|
|
381
|
+
private currentComponentRef;
|
|
63
382
|
constructor();
|
|
64
|
-
ngOnDestroy(): void;
|
|
65
383
|
private render;
|
|
66
|
-
private
|
|
384
|
+
private resolveComponentType;
|
|
385
|
+
/**
|
|
386
|
+
* Updates the inputs of an existing component instance with the latest data from the node.
|
|
387
|
+
* This is called during component reuse to keep the UI in sync without losing DOM state (like focus).
|
|
388
|
+
*/
|
|
389
|
+
private updateInputs;
|
|
67
390
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Renderer, never>;
|
|
68
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Renderer, "
|
|
391
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Renderer, "[a2ui-renderer]", never, { "surfaceId": { "alias": "surfaceId"; "required": true; "isSignal": true; }; "component": { "alias": "component"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
69
392
|
}
|
|
70
393
|
|
|
71
|
-
declare const Theme: InjectionToken<Types.Theme>;
|
|
72
|
-
type Theme = Types.Theme;
|
|
73
|
-
|
|
74
394
|
declare function provideA2UI(config: {
|
|
75
395
|
catalog: Catalog;
|
|
76
|
-
theme: Theme;
|
|
396
|
+
theme: Types.Theme;
|
|
77
397
|
}): EnvironmentProviders;
|
|
78
398
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
399
|
+
/**
|
|
400
|
+
* Copyright 2026 Google LLC
|
|
401
|
+
*
|
|
402
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
403
|
+
* you may not use this file except in compliance with the License.
|
|
404
|
+
* You may obtain a copy of the License at
|
|
405
|
+
*
|
|
406
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
407
|
+
*
|
|
408
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
409
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
410
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
411
|
+
* See the License for the specific language governing permissions and
|
|
412
|
+
* limitations under the License.
|
|
413
|
+
*/
|
|
414
|
+
declare const A2UI_ANGULAR_VERSION = "0.9.0";
|
|
88
415
|
|
|
89
|
-
export { Catalog, DEFAULT_CATALOG, DynamicComponent, MessageProcessor, Renderer, Surface, Theme, provideA2UI };
|
|
90
|
-
export type { A2AServerPayload, A2DataPayload, A2TextPayload, CatalogEntry, CatalogLoader, DispatchedEvent };
|
|
416
|
+
export { A2UI_ANGULAR_VERSION, AudioPlayer, Button, Card, Catalog, Checkbox, Column, DEFAULT_CATALOG, DateTimeInput, Divider, DynamicComponent, Icon, Image, List, MessageProcessor, Modal, MultipleChoice, Renderer, Row, Slider, Surface, Tabs, Text, TextField, Theme, Types, Video, provideA2UI, provideMarkdownRenderer, registerStandardComponents };
|
|
417
|
+
export type { A2AServerPayload, A2DataPayload, A2TextPayload, A2UIClientEvent, CatalogEntry, CatalogLoader, DispatchedEvent };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Component } from '@angular/core';
|
|
3
|
-
import { DynamicComponent } from './a2ui-angular.mjs';
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2025 Google LLC
|
|
7
|
-
|
|
8
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
you may not use this file except in compliance with the License.
|
|
10
|
-
You may obtain a copy of the License at
|
|
11
|
-
|
|
12
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
|
|
14
|
-
Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
See the License for the specific language governing permissions and
|
|
18
|
-
limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
class Audio extends DynamicComponent {
|
|
21
|
-
url = input.required(...(ngDevMode ? [{ debugName: "url" }] : []));
|
|
22
|
-
resolvedUrl = computed(() => this.resolvePrimitive(this.url()), ...(ngDevMode ? [{ debugName: "resolvedUrl" }] : []));
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Audio, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Audio, isStandalone: true, selector: "a2ui-audio", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
25
|
-
@let resolvedUrl = this.resolvedUrl();
|
|
26
|
-
|
|
27
|
-
@if (resolvedUrl) {
|
|
28
|
-
<section [class]="theme.components.AudioPlayer" [style]="theme.additionalStyles?.AudioPlayer">
|
|
29
|
-
<audio controls [src]="resolvedUrl"></audio>
|
|
30
|
-
</section>
|
|
31
|
-
}
|
|
32
|
-
`, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}audio{display:block;width:100%;box-sizing:border-box}\n"] });
|
|
33
|
-
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Audio, decorators: [{
|
|
35
|
-
type: Component,
|
|
36
|
-
args: [{ selector: 'a2ui-audio', template: `
|
|
37
|
-
@let resolvedUrl = this.resolvedUrl();
|
|
38
|
-
|
|
39
|
-
@if (resolvedUrl) {
|
|
40
|
-
<section [class]="theme.components.AudioPlayer" [style]="theme.additionalStyles?.AudioPlayer">
|
|
41
|
-
<audio controls [src]="resolvedUrl"></audio>
|
|
42
|
-
</section>
|
|
43
|
-
}
|
|
44
|
-
`, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}audio{display:block;width:100%;box-sizing:border-box}\n"] }]
|
|
45
|
-
}], propDecorators: { url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: true }] }] } });
|
|
46
|
-
|
|
47
|
-
export { Audio };
|
|
48
|
-
//# sourceMappingURL=a2ui-angular-audio-DoZb9mn_.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-angular-audio-DoZb9mn_.mjs","sources":["../../src/lib/catalog/audio.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { Component, computed, input } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Primitives } from '@a2ui/lit/0.8';\n\n@Component({\n selector: 'a2ui-audio',\n template: `\n @let resolvedUrl = this.resolvedUrl();\n\n @if (resolvedUrl) {\n <section [class]=\"theme.components.AudioPlayer\" [style]=\"theme.additionalStyles?.AudioPlayer\">\n <audio controls [src]=\"resolvedUrl\"></audio>\n </section>\n }\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n audio {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n `\n})\nexport class Audio extends DynamicComponent {\n readonly url = input.required<Primitives.StringValue | null>();\n protected readonly resolvedUrl = computed(() => this.resolvePrimitive(this.url()));\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAgCG,MAAO,KAAM,SAAQ,gBAAgB,CAAA;AAChC,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,8CAAiC;AAC3C,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uDAAC;uGAFvE,KAAK,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAK,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAxBN;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA,CAAA;;2FAgBU,KAAK,EAAA,UAAA,EAAA,CAAA;kBA1BjB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,QAAA,EACZ;;;;;;;;AAQT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component } from '@angular/core';
|
|
3
|
-
import { DynamicComponent, Renderer } from './a2ui-angular.mjs';
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2025 Google LLC
|
|
7
|
-
|
|
8
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
you may not use this file except in compliance with the License.
|
|
10
|
-
You may obtain a copy of the License at
|
|
11
|
-
|
|
12
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
|
|
14
|
-
Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
See the License for the specific language governing permissions and
|
|
18
|
-
limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
class Button extends DynamicComponent {
|
|
21
|
-
action = input.required(...(ngDevMode ? [{ debugName: "action" }] : []));
|
|
22
|
-
handleClick() {
|
|
23
|
-
const action = this.action();
|
|
24
|
-
if (action) {
|
|
25
|
-
super.sendAction(action);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: Button, isStandalone: true, selector: "a2ui-button", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
30
|
-
<button
|
|
31
|
-
[class]="theme.components.Button"
|
|
32
|
-
[style]="theme.additionalStyles?.Button"
|
|
33
|
-
(click)="handleClick()"
|
|
34
|
-
>
|
|
35
|
-
<ng-container
|
|
36
|
-
a2ui-renderer
|
|
37
|
-
[surfaceId]="surfaceId()!"
|
|
38
|
-
[component]="component().properties.child"
|
|
39
|
-
/>
|
|
40
|
-
</button>
|
|
41
|
-
`, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0}\n"], dependencies: [{ kind: "directive", type: Renderer, selector: "ng-container[a2ui-renderer]", inputs: ["surfaceId", "component"] }] });
|
|
42
|
-
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Button, decorators: [{
|
|
44
|
-
type: Component,
|
|
45
|
-
args: [{ selector: 'a2ui-button', imports: [Renderer], template: `
|
|
46
|
-
<button
|
|
47
|
-
[class]="theme.components.Button"
|
|
48
|
-
[style]="theme.additionalStyles?.Button"
|
|
49
|
-
(click)="handleClick()"
|
|
50
|
-
>
|
|
51
|
-
<ng-container
|
|
52
|
-
a2ui-renderer
|
|
53
|
-
[surfaceId]="surfaceId()!"
|
|
54
|
-
[component]="component().properties.child"
|
|
55
|
-
/>
|
|
56
|
-
</button>
|
|
57
|
-
`, styles: [":host{display:block;flex:var(--weight);min-height:0}\n"] }]
|
|
58
|
-
}], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }] } });
|
|
59
|
-
|
|
60
|
-
export { Button };
|
|
61
|
-
//# sourceMappingURL=a2ui-angular-button-CvH0kAtN.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-angular-button-CvH0kAtN.mjs","sources":["../../src/lib/catalog/button.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { Component, input } from '@angular/core';\nimport { Types } from '@a2ui/lit/0.8';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Renderer } from '../rendering/renderer';\n\n@Component({\n selector: 'a2ui-button',\n imports: [Renderer],\n template: `\n <button\n [class]=\"theme.components.Button\"\n [style]=\"theme.additionalStyles?.Button\"\n (click)=\"handleClick()\"\n >\n <ng-container\n a2ui-renderer\n [surfaceId]=\"surfaceId()!\"\n [component]=\"component().properties.child\"\n />\n </button>\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n }\n `,\n})\nexport class Button extends DynamicComponent<Types.ButtonNode> {\n readonly action = input.required<Types.Action | null>();\n\n protected handleClick() {\n const action = this.action();\n\n if (action) {\n super.sendAction(action);\n }\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AA+BG,MAAO,MAAO,SAAQ,gBAAkC,CAAA;AACnD,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAuB;IAE7C,WAAW,GAAA;AACnB,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;QAE5B,IAAI,MAAM,EAAE;AACV,YAAA,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;QAC1B;IACF;uGATW,MAAM,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EArBP;;;;;;;;;;;;AAYT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAbS,QAAQ,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAsBP,MAAM,EAAA,UAAA,EAAA,CAAA;kBAxBlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,OAAA,EACd,CAAC,QAAQ,CAAC,EAAA,QAAA,EACT;;;;;;;;;;;;AAYT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
-
import { DynamicComponent, Renderer } from './a2ui-angular.mjs';
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2025 Google LLC
|
|
7
|
-
|
|
8
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
you may not use this file except in compliance with the License.
|
|
10
|
-
You may obtain a copy of the License at
|
|
11
|
-
|
|
12
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
|
|
14
|
-
Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
See the License for the specific language governing permissions and
|
|
18
|
-
limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
class Card extends DynamicComponent {
|
|
21
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Card, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Card, isStandalone: true, selector: "a2ui-card", usesInheritance: true, ngImport: i0, template: `
|
|
23
|
-
@let properties = component().properties;
|
|
24
|
-
@let children = properties.children || [properties.child];
|
|
25
|
-
|
|
26
|
-
<section [class]="theme.components.Card" [style]="theme.additionalStyles?.Card">
|
|
27
|
-
@for (child of children; track child) {
|
|
28
|
-
<ng-container a2ui-renderer [surfaceId]="surfaceId()!" [component]="child" />
|
|
29
|
-
}
|
|
30
|
-
</section>
|
|
31
|
-
`, isInline: true, styles: ["a2ui-card{display:block;flex:var(--weight);min-height:0;overflow:auto}a2ui-card>section{height:100%;width:100%;min-height:0;overflow:auto}a2ui-card>section>*{height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: Renderer, selector: "ng-container[a2ui-renderer]", inputs: ["surfaceId", "component"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
32
|
-
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Card, decorators: [{
|
|
34
|
-
type: Component,
|
|
35
|
-
args: [{ selector: 'a2ui-card', imports: [Renderer], encapsulation: ViewEncapsulation.None, template: `
|
|
36
|
-
@let properties = component().properties;
|
|
37
|
-
@let children = properties.children || [properties.child];
|
|
38
|
-
|
|
39
|
-
<section [class]="theme.components.Card" [style]="theme.additionalStyles?.Card">
|
|
40
|
-
@for (child of children; track child) {
|
|
41
|
-
<ng-container a2ui-renderer [surfaceId]="surfaceId()!" [component]="child" />
|
|
42
|
-
}
|
|
43
|
-
</section>
|
|
44
|
-
`, styles: ["a2ui-card{display:block;flex:var(--weight);min-height:0;overflow:auto}a2ui-card>section{height:100%;width:100%;min-height:0;overflow:auto}a2ui-card>section>*{height:100%;width:100%}\n"] }]
|
|
45
|
-
}] });
|
|
46
|
-
|
|
47
|
-
export { Card };
|
|
48
|
-
//# sourceMappingURL=a2ui-angular-card-Ix6OIdUv.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-angular-card-Ix6OIdUv.mjs","sources":["../../src/lib/catalog/card.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { Component, ViewEncapsulation } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Renderer } from '../rendering/renderer';\nimport { Types } from '@a2ui/lit/0.8';\n\n@Component({\n selector: 'a2ui-card',\n imports: [Renderer],\n encapsulation: ViewEncapsulation.None,\n styles: `\n a2ui-card {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n a2ui-card > section {\n height: 100%;\n width: 100%;\n min-height: 0;\n overflow: auto;\n }\n\n a2ui-card > section > * {\n height: 100%;\n width: 100%;\n }\n `,\n template: `\n @let properties = component().properties;\n @let children = properties.children || [properties.child];\n\n <section [class]=\"theme.components.Card\" [style]=\"theme.additionalStyles?.Card\">\n @for (child of children; track child) {\n <ng-container a2ui-renderer [surfaceId]=\"surfaceId()!\" [component]=\"child\" />\n }\n </section>\n `,\n})\nexport class Card extends DynamicComponent<Types.CardNode> { }\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AA0CG,MAAO,IAAK,SAAQ,gBAAgC,CAAA;uGAA7C,IAAI,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAJ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,IAAI,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXL;;;;;;;;;AAST,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,yLAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EA/BS,QAAQ,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAiCP,IAAI,EAAA,UAAA,EAAA,CAAA;kBAnChB,SAAS;+BACE,WAAW,EAAA,OAAA,EACZ,CAAC,QAAQ,CAAC,iBACJ,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAqB3B;;;;;;;;;AAST,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,yLAAA,CAAA,EAAA;;;;;"}
|