@a2ui/angular 0.8.2 → 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.
Files changed (48) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +111 -3
  3. package/fesm2022/a2ui-angular-src-v0_8.mjs +1797 -0
  4. package/fesm2022/a2ui-angular-src-v0_8.mjs.map +1 -0
  5. package/fesm2022/a2ui-angular-src-v0_9.mjs +2330 -0
  6. package/fesm2022/a2ui-angular-src-v0_9.mjs.map +1 -0
  7. package/fesm2022/a2ui-angular-v0_8.mjs +1797 -0
  8. package/fesm2022/a2ui-angular-v0_8.mjs.map +1 -0
  9. package/fesm2022/a2ui-angular-v0_9.mjs +2330 -0
  10. package/fesm2022/a2ui-angular-v0_9.mjs.map +1 -0
  11. package/fesm2022/a2ui-angular.mjs +1558 -616
  12. package/fesm2022/a2ui-angular.mjs.map +1 -1
  13. package/package.json +51 -7
  14. package/types/a2ui-angular-src-v0_8.d.ts +400 -0
  15. package/types/a2ui-angular-src-v0_9.d.ts +813 -0
  16. package/types/a2ui-angular-v0_8.d.ts +400 -0
  17. package/types/a2ui-angular-v0_9.d.ts +813 -0
  18. package/types/a2ui-angular.d.ts +362 -35
  19. package/fesm2022/a2ui-angular-audio-DoZb9mn_.mjs +0 -48
  20. package/fesm2022/a2ui-angular-audio-DoZb9mn_.mjs.map +0 -1
  21. package/fesm2022/a2ui-angular-button-CvH0kAtN.mjs +0 -61
  22. package/fesm2022/a2ui-angular-button-CvH0kAtN.mjs.map +0 -1
  23. package/fesm2022/a2ui-angular-card-Ix6OIdUv.mjs +0 -48
  24. package/fesm2022/a2ui-angular-card-Ix6OIdUv.mjs.map +0 -1
  25. package/fesm2022/a2ui-angular-checkbox-BN4EF2Ci.mjs +0 -78
  26. package/fesm2022/a2ui-angular-checkbox-BN4EF2Ci.mjs.map +0 -1
  27. package/fesm2022/a2ui-angular-datetime-input-dmZAjvrF.mjs +0 -120
  28. package/fesm2022/a2ui-angular-datetime-input-dmZAjvrF.mjs.map +0 -1
  29. package/fesm2022/a2ui-angular-divider-BizPl3qL.mjs +0 -30
  30. package/fesm2022/a2ui-angular-divider-BizPl3qL.mjs.map +0 -1
  31. package/fesm2022/a2ui-angular-icon-BE9Hj9V6.mjs +0 -48
  32. package/fesm2022/a2ui-angular-icon-BE9Hj9V6.mjs.map +0 -1
  33. package/fesm2022/a2ui-angular-image-BWzAw0rh.mjs +0 -54
  34. package/fesm2022/a2ui-angular-image-BWzAw0rh.mjs.map +0 -1
  35. package/fesm2022/a2ui-angular-list-nEeT59V3.mjs +0 -45
  36. package/fesm2022/a2ui-angular-list-nEeT59V3.mjs.map +0 -1
  37. package/fesm2022/a2ui-angular-modal-mr9LmczA.mjs +0 -108
  38. package/fesm2022/a2ui-angular-modal-mr9LmczA.mjs.map +0 -1
  39. package/fesm2022/a2ui-angular-multiple-choice-Bry7X74i.mjs +0 -78
  40. package/fesm2022/a2ui-angular-multiple-choice-Bry7X74i.mjs.map +0 -1
  41. package/fesm2022/a2ui-angular-slider-BgseUbN2.mjs +0 -79
  42. package/fesm2022/a2ui-angular-slider-BgseUbN2.mjs.map +0 -1
  43. package/fesm2022/a2ui-angular-tabs-q5Mn9vgq.mjs +0 -87
  44. package/fesm2022/a2ui-angular-tabs-q5Mn9vgq.mjs.map +0 -1
  45. package/fesm2022/a2ui-angular-text-field-Deokh07j.mjs +0 -85
  46. package/fesm2022/a2ui-angular-text-field-Deokh07j.mjs.map +0 -1
  47. package/fesm2022/a2ui-angular-video-DuFTfN0B.mjs +0 -48
  48. package/fesm2022/a2ui-angular-video-DuFTfN0B.mjs.map +0 -1
@@ -1,78 +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 Checkbox extends DynamicComponent {
21
- value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
22
- label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
23
- inputChecked = computed(() => super.resolvePrimitive(this.value()) ?? false, ...(ngDevMode ? [{ debugName: "inputChecked" }] : []));
24
- resolvedLabel = computed(() => super.resolvePrimitive(this.label()), ...(ngDevMode ? [{ debugName: "resolvedLabel" }] : []));
25
- inputId = super.getUniqueId('a2ui-checkbox');
26
- handleChange(event) {
27
- const path = this.value()?.path;
28
- if (!(event.target instanceof HTMLInputElement) || !path) {
29
- return;
30
- }
31
- this.processor.setData(this.component(), path, event.target.checked, this.surfaceId());
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Checkbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
34
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: Checkbox, isStandalone: true, selector: "a2ui-checkbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
35
- <section
36
- [class]="theme.components.CheckBox.container"
37
- [style]="theme.additionalStyles?.CheckBox"
38
- >
39
- <input
40
- autocomplete="off"
41
- type="checkbox"
42
- [id]="inputId"
43
- [checked]="inputChecked()"
44
- [class]="theme.components.CheckBox.element"
45
- (change)="handleChange($event)"
46
- />
47
-
48
- <label [htmlFor]="inputId" [class]="theme.components.CheckBox.label">{{
49
- resolvedLabel()
50
- }}</label>
51
- </section>
52
- `, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}input{display:block;width:100%}\n"] });
53
- }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Checkbox, decorators: [{
55
- type: Component,
56
- args: [{ selector: 'a2ui-checkbox', template: `
57
- <section
58
- [class]="theme.components.CheckBox.container"
59
- [style]="theme.additionalStyles?.CheckBox"
60
- >
61
- <input
62
- autocomplete="off"
63
- type="checkbox"
64
- [id]="inputId"
65
- [checked]="inputChecked()"
66
- [class]="theme.components.CheckBox.element"
67
- (change)="handleChange($event)"
68
- />
69
-
70
- <label [htmlFor]="inputId" [class]="theme.components.CheckBox.label">{{
71
- resolvedLabel()
72
- }}</label>
73
- </section>
74
- `, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}input{display:block;width:100%}\n"] }]
75
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
76
-
77
- export { Checkbox };
78
- //# sourceMappingURL=a2ui-angular-checkbox-BN4EF2Ci.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-checkbox-BN4EF2Ci.mjs","sources":["../../src/lib/catalog/checkbox.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-checkbox',\n template: `\n <section\n [class]=\"theme.components.CheckBox.container\"\n [style]=\"theme.additionalStyles?.CheckBox\"\n >\n <input\n autocomplete=\"off\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"inputChecked()\"\n [class]=\"theme.components.CheckBox.element\"\n (change)=\"handleChange($event)\"\n />\n\n <label [htmlFor]=\"inputId\" [class]=\"theme.components.CheckBox.label\">{{\n resolvedLabel()\n }}</label>\n </section>\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n input {\n display: block;\n width: 100%;\n }\n `,\n})\nexport class Checkbox extends DynamicComponent {\n readonly value = input.required<Primitives.BooleanValue | null>();\n readonly label = input.required<Primitives.StringValue | null>();\n\n protected inputChecked = computed(() => super.resolvePrimitive(this.value()) ?? false);\n protected resolvedLabel = computed(() => super.resolvePrimitive(this.label()));\n protected inputId = super.getUniqueId('a2ui-checkbox');\n\n protected handleChange(event: Event) {\n const path = this.value()?.path;\n\n if (!(event.target instanceof HTMLInputElement) || !path) {\n return;\n }\n\n this.processor.setData(this.component(), path, event.target.checked, this.surfaceId());\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAyCG,MAAO,QAAS,SAAQ,gBAAgB,CAAA;AACnC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAkC;AACxD,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAiC;AAEtD,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,KAAK,wDAAC;AAC5E,IAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,yDAAC;AACpE,IAAA,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,eAAe,CAAC;AAE5C,IAAA,YAAY,CAAC,KAAY,EAAA;QACjC,MAAM,IAAI,G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AA,EAAA,MAAA,EAAA,CAAA,qGAAA,CAAA,EAAA;;;;;"}
@@ -1,120 +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 DatetimeInput extends DynamicComponent {
21
- value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
22
- enableDate = input.required(...(ngDevMode ? [{ debugName: "enableDate" }] : []));
23
- enableTime = input.required(...(ngDevMode ? [{ debugName: "enableTime" }] : []));
24
- inputId = super.getUniqueId('a2ui-datetime-input');
25
- inputType = computed(() => {
26
- const enableDate = this.enableDate();
27
- const enableTime = this.enableTime();
28
- if (enableDate && enableTime) {
29
- return 'datetime-local';
30
- }
31
- else if (enableDate) {
32
- return 'date';
33
- }
34
- else if (enableTime) {
35
- return 'time';
36
- }
37
- return 'datetime-local';
38
- }, ...(ngDevMode ? [{ debugName: "inputType" }] : []));
39
- label = computed(() => {
40
- // TODO: this should likely be passed from the model.
41
- const inputType = this.inputType();
42
- if (inputType === 'date') {
43
- return 'Date';
44
- }
45
- else if (inputType === 'time') {
46
- return 'Time';
47
- }
48
- return 'Date & Time';
49
- }, ...(ngDevMode ? [{ debugName: "label" }] : []));
50
- inputValue = computed(() => {
51
- const inputType = this.inputType();
52
- const parsed = super.resolvePrimitive(this.value()) || '';
53
- const date = parsed ? new Date(parsed) : null;
54
- if (!date || isNaN(date.getTime())) {
55
- return '';
56
- }
57
- const year = this.padNumber(date.getFullYear());
58
- const month = this.padNumber(date.getMonth());
59
- const day = this.padNumber(date.getDate());
60
- const hours = this.padNumber(date.getHours());
61
- const minutes = this.padNumber(date.getMinutes());
62
- // Browsers are picky with what format they allow for the `value` attribute of date/time inputs.
63
- // We need to parse it out of the provided value. Note that we don't use `toISOString`,
64
- // because the resulting value is relative to UTC.
65
- if (inputType === 'date') {
66
- return `${year}-${month}-${day}`;
67
- }
68
- else if (inputType === 'time') {
69
- return `${hours}:${minutes}`;
70
- }
71
- return `${year}-${month}-${day}T${hours}:${minutes}`;
72
- }, ...(ngDevMode ? [{ debugName: "inputValue" }] : []));
73
- handleInput(event) {
74
- const path = this.value()?.path;
75
- if (!(event.target instanceof HTMLInputElement) || !path) {
76
- return;
77
- }
78
- this.processor.setData(this.component(), path, event.target.value, this.surfaceId());
79
- }
80
- padNumber(value) {
81
- return value.toString().padStart(2, '0');
82
- }
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DatetimeInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
84
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: DatetimeInput, isStandalone: true, selector: "a2ui-datetime-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, enableDate: { classPropertyName: "enableDate", publicName: "enableDate", isSignal: true, isRequired: true, transformFunction: null }, enableTime: { classPropertyName: "enableTime", publicName: "enableTime", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
85
- <section [class]="theme.components.DateTimeInput.container">
86
- <label [for]="inputId" [class]="theme.components.DateTimeInput.label">{{ label() }}</label>
87
-
88
- <input
89
- autocomplete="off"
90
- [attr.type]="inputType()"
91
- [id]="inputId"
92
- [class]="theme.components.DateTimeInput.element"
93
- [style]="theme.additionalStyles?.DateTimeInput"
94
- [value]="inputValue()"
95
- (input)="handleInput($event)"
96
- />
97
- </section>
98
- `, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}input{display:block;width:100%;box-sizing:border-box}\n"] });
99
- }
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DatetimeInput, decorators: [{
101
- type: Component,
102
- args: [{ selector: 'a2ui-datetime-input', template: `
103
- <section [class]="theme.components.DateTimeInput.container">
104
- <label [for]="inputId" [class]="theme.components.DateTimeInput.label">{{ label() }}</label>
105
-
106
- <input
107
- autocomplete="off"
108
- [attr.type]="inputType()"
109
- [id]="inputId"
110
- [class]="theme.components.DateTimeInput.element"
111
- [style]="theme.additionalStyles?.DateTimeInput"
112
- [value]="inputValue()"
113
- (input)="handleInput($event)"
114
- />
115
- </section>
116
- `, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}input{display:block;width:100%;box-sizing:border-box}\n"] }]
117
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], enableDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableDate", required: true }] }], enableTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableTime", required: true }] }] } });
118
-
119
- export { DatetimeInput };
120
- //# sourceMappingURL=a2ui-angular-datetime-input-dmZAjvrF.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-datetime-input-dmZAjvrF.mjs","sources":["../../src/lib/catalog/datetime-input.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 { computed, Component, input } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Primitives } from '@a2ui/lit/0.8';\n\n@Component({\n selector: 'a2ui-datetime-input',\n template: `\n <section [class]=\"theme.components.DateTimeInput.container\">\n <label [for]=\"inputId\" [class]=\"theme.components.DateTimeInput.label\">{{ label() }}</label>\n\n <input\n autocomplete=\"off\"\n [attr.type]=\"inputType()\"\n [id]=\"inputId\"\n [class]=\"theme.components.DateTimeInput.element\"\n [style]=\"theme.additionalStyles?.DateTimeInput\"\n [value]=\"inputValue()\"\n (input)=\"handleInput($event)\"\n />\n </section>\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n input {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n `,\n})\nexport class DatetimeInput extends DynamicComponent {\n readonly value = input.required<Primitives.StringValue | null>();\n readonly enableDate = input.required<boolean>();\n readonly enableTime = input.required<boolean>();\n protected readonly inputId = super.getUniqueId('a2ui-datetime-input');\n\n protected inputType = computed(() => {\n const enableDate = this.enableDate();\n const enableTime = this.enableTime();\n\n if (enableDate && enableTime) {\n return 'datetime-local';\n } else if (enableDate) {\n return 'date';\n } else if (enableTime) {\n return 'time';\n }\n\n return 'datetime-local';\n });\n\n protected label = computed(() => {\n // TODO: this should likely be passed from the model.\n const inputType = this.inputType();\n\n if (inputType === 'date') {\n return 'Date';\n } else if (inputType === 'time') {\n return 'Time';\n }\n\n return 'Date & Time';\n });\n\n protected inputValue = computed(() => {\n const inputType = this.inputType();\n const parsed = super.resolvePrimitive(this.value()) || '';\n const date = parsed ? new Date(parsed) : null;\n\n if (!date || isNaN(date.getTime())) {\n return '';\n }\n\n const year = this.padNumber(date.getFullYear());\n const month = this.padNumber(date.getMonth());\n const day = this.padNumber(date.getDate());\n const hours = this.padNumber(date.getHours());\n const minutes = this.padNumber(date.getMinutes());\n\n // Browsers are picky with what format they allow for the `value` attribute of date/time inputs.\n // We need to parse it out of the provided value. Note that we don't use `toISOString`,\n // because the resulting value is relative to UTC.\n if (inputType === 'date') {\n return `${year}-${month}-${day}`;\n } else if (inputType === 'time') {\n return `${hours}:${minutes}`;\n }\n\n return `${year}-${month}-${day}T${hours}:${minutes}`;\n });\n\n protected handleInput(event: Event) {\n const path = this.value()?.path;\n\n if (!(event.target instanceof HTMLInputElement) || !path) {\n return;\n }\n\n this.processor.setData(this.component(), path, event.target.value, this.surfaceId());\n }\n\n private padNumber(value: number) {\n return value.toString().padStart(2, '0');\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAsCG,MAAO,aAAc,SAAQ,gBAAgB,CAAA;AACxC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAiC;AACvD,IAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,qDAAW;AACtC,IAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,qDAAW;AAC5B,IAAA,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,qBAAqB,CAAC;AAE3D,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAK;AAClC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE;AACpC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE;AAEpC,QAAA,IAAI,UAAU,IAAI,UAAU,EAAE;AAC5B,YAAA,OAAO,gBAAgB;QACzB;aAAO,IAAI,UAAU,EAAE;AACrB,YAAA,OAAO,MAAM;QACf;aAAO,IAAI,UAAU,EAAE;AACrB,YAAA,OAAO,MAAM;QACf;AAEA,QAAA,OAAO,gBAAgB;AACzB,IAAA,CAAC,qDAAC;AAEQ,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAK;;AAE9B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE;AAElC,QAAA,IAAI,SAAS,KAAK,MAAM,EAAE;AACxB,YAAA,OAAO,MAAM;QACf;AAAO,aAAA,IAAI,SAAS,KAAK,MAAM,EAAE;AAC/B,YAAA,OAAO,MAAM;QACf;AAEA,QAAA,OAAO,aAAa;AACtB,IAAA,CAAC,i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A,EAAA,EAAA,EAAA,QAAA,EA9Bd;;;;;;;;;;;;;;AAcT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA,CAAA;;2FAgBU,aAAa,EAAA,UAAA,EAAA,CAAA;kBAhCzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAAA,QAAA,EACrB;;;;;;;;;;;;;;AAcT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA;;;;;"}
@@ -1,30 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { 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 Divider extends DynamicComponent {
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Divider, deps: null, target: i0.ɵɵFactoryTarget.Component });
22
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: Divider, isStandalone: true, selector: "a2ui-divider", usesInheritance: true, ngImport: i0, template: '<hr [class]="theme.components.Divider" [style]="theme.additionalStyles?.Divider"/>', isInline: true, styles: [":host{display:block;min-height:0;overflow:auto}hr{height:1px;background:#ccc;border:none}\n"] });
23
- }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Divider, decorators: [{
25
- type: Component,
26
- args: [{ selector: 'a2ui-divider', template: '<hr [class]="theme.components.Divider" [style]="theme.additionalStyles?.Divider"/>', styles: [":host{display:block;min-height:0;overflow:auto}hr{height:1px;background:#ccc;border:none}\n"] }]
27
- }] });
28
-
29
- export { Divider };
30
- //# sourceMappingURL=a2ui-angular-divider-BizPl3qL.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-divider-BizPl3qL.mjs","sources":["../../src/lib/catalog/divider.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 } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\n\n@Component({\n selector: 'a2ui-divider',\n template: '<hr [class]=\"theme.components.Divider\" [style]=\"theme.additionalStyles?.Divider\"/>',\n styles: `\n :host {\n display: block;\n min-height: 0;\n overflow: auto;\n }\n\n hr {\n height: 1px;\n background: #ccc;\n border: none;\n }\n `,\n})\nexport class Divider extends DynamicComponent {}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAsBG,MAAO,OAAQ,SAAQ,gBAAgB,CAAA;uGAAhC,OAAO,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,+FAfR,oFAAoF,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,6FAAA,CAAA,EAAA,CAAA;;2FAenF,OAAO,EAAA,UAAA,EAAA,CAAA;kBAjBnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,YACd,oFAAoF,EAAA,MAAA,EAAA,CAAA,6FAAA,CAAA,EAAA;;;;;"}
@@ -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 Icon extends DynamicComponent {
21
- name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
22
- resolvedName = computed(() => this.resolvePrimitive(this.name()), ...(ngDevMode ? [{ debugName: "resolvedName" }] : []));
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Icon, deps: null, target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Icon, isStandalone: true, selector: "a2ui-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
25
- @let resolvedName = this.resolvedName();
26
-
27
- @if (resolvedName) {
28
- <section [class]="theme.components.Icon" [style]="theme.additionalStyles?.Icon">
29
- <span class="g-icon">{{ resolvedName }}</span>
30
- </section>
31
- }
32
- `, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}\n"] });
33
- }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Icon, decorators: [{
35
- type: Component,
36
- args: [{ selector: 'a2ui-icon', template: `
37
- @let resolvedName = this.resolvedName();
38
-
39
- @if (resolvedName) {
40
- <section [class]="theme.components.Icon" [style]="theme.additionalStyles?.Icon">
41
- <span class="g-icon">{{ resolvedName }}</span>
42
- </section>
43
- }
44
- `, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}\n"] }]
45
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }] } });
46
-
47
- export { Icon };
48
- //# sourceMappingURL=a2ui-angular-icon-BE9Hj9V6.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-icon-BE9Hj9V6.mjs","sources":["../../src/lib/catalog/icon.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-icon',\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n `,\n template: `\n @let resolvedName = this.resolvedName();\n\n @if (resolvedName) {\n <section [class]=\"theme.components.Icon\" [style]=\"theme.additionalStyles?.Icon\">\n <span class=\"g-icon\">{{ resolvedName }}</span>\n </section>\n }\n `,\n})\nexport class Icon extends DynamicComponent {\n readonly name = input.required<Primitives.StringValue | null>();\n protected readonly resolvedName = computed(() => this.resolvePrimitive(this.name()));\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AA0BG,MAAO,IAAK,SAAQ,gBAAgB,CAAA;AAC/B,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAiC;AAC5C,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,wDAAC;uGAFzE,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,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAVL;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,sEAAA,CAAA,EAAA,CAAA;;2FAEU,IAAI,EAAA,UAAA,EAAA,CAAA;kBApBhB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,QAAA,EASX;;;;;;;;AAQT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,sEAAA,CAAA,EAAA;;;;;"}
@@ -1,54 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, Component } from '@angular/core';
3
- import { Styles } from '@a2ui/lit/0.8';
4
- import { DynamicComponent } from './a2ui-angular.mjs';
5
-
6
- /*
7
- Copyright 2025 Google LLC
8
-
9
- Licensed under the Apache License, Version 2.0 (the "License");
10
- you may not use this file except in compliance with the License.
11
- You may obtain a copy of the License at
12
-
13
- https://www.apache.org/licenses/LICENSE-2.0
14
-
15
- Unless required by applicable law or agreed to in writing, software
16
- distributed under the License is distributed on an "AS IS" BASIS,
17
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- See the License for the specific language governing permissions and
19
- limitations under the License.
20
- */
21
- class Image extends DynamicComponent {
22
- url = input.required(...(ngDevMode ? [{ debugName: "url" }] : []));
23
- usageHint = input.required(...(ngDevMode ? [{ debugName: "usageHint" }] : []));
24
- resolvedUrl = computed(() => this.resolvePrimitive(this.url()), ...(ngDevMode ? [{ debugName: "resolvedUrl" }] : []));
25
- classes = computed(() => {
26
- const usageHint = this.usageHint();
27
- return Styles.merge(this.theme.components.Image.all, usageHint ? this.theme.components.Image[usageHint] : {});
28
- }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
29
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Image, deps: null, target: i0.ɵɵFactoryTarget.Component });
30
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Image, isStandalone: true, selector: "a2ui-image", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: true, transformFunction: null }, usageHint: { classPropertyName: "usageHint", publicName: "usageHint", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
31
- @let resolvedUrl = this.resolvedUrl();
32
-
33
- @if (resolvedUrl) {
34
- <section [class]="classes()" [style]="theme.additionalStyles?.Image">
35
- <img [src]="resolvedUrl" />
36
- </section>
37
- }
38
- `, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}img{display:block;width:100%;height:100%;box-sizing:border-box}\n"] });
39
- }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Image, decorators: [{
41
- type: Component,
42
- args: [{ selector: 'a2ui-image', template: `
43
- @let resolvedUrl = this.resolvedUrl();
44
-
45
- @if (resolvedUrl) {
46
- <section [class]="classes()" [style]="theme.additionalStyles?.Image">
47
- <img [src]="resolvedUrl" />
48
- </section>
49
- }
50
- `, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}img{display:block;width:100%;height:100%;box-sizing:border-box}\n"] }]
51
- }], propDecorators: { url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: true }] }], usageHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "usageHint", required: true }] }] } });
52
-
53
- export { Image };
54
- //# sourceMappingURL=a2ui-angular-image-BWzAw0rh.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-image-BWzAw0rh.mjs","sources":["../../src/lib/catalog/image.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 { Primitives, Styles, Types } from '@a2ui/lit/0.8';\nimport { DynamicComponent } from '../rendering/dynamic-component';\n\n@Component({\n selector: 'a2ui-image',\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n img {\n display: block;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n `,\n template: `\n @let resolvedUrl = this.resolvedUrl();\n\n @if (resolvedUrl) {\n <section [class]=\"classes()\" [style]=\"theme.additionalStyles?.Image\">\n <img [src]=\"resolvedUrl\" />\n </section>\n }\n `,\n})\nexport class Image extends DynamicComponent {\n readonly url = input.required<Primitives.StringValue | null>();\n readonly usageHint = input.required<Types.ResolvedImage['usageHint'] | null>();\n\n protected readonly resolvedUrl = computed(() => this.resolvePrimitive(this.url()));\n\n protected classes = computed(() => {\n const usageHint = this.usageHint();\n\n return Styles.merge(\n this.theme.components.Image.all,\n usageHint ? this.theme.components.Image[usageHint] : {},\n );\n });\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;AAcG;AAiCG,MAAO,KAAM,SAAQ,gBAAgB,CAAA;AAChC,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,8CAAiC;AACrD,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,oDAA2C;AAE3D,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uDAAC;AAExE,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AAChC,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE;AAElC,QAAA,OAAO,MAAM,CAAC,KAAK,CACjB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAC/B,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CACxD;AACH,IAAA,CAAC,mDAAC;uGAbS,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,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAVN;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qIAAA,CAAA,EAAA,CAAA;;2FAEU,KAAK,EAAA,UAAA,EAAA,CAAA;kBA3BjB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,QAAA,EAgBZ;;;;;;;;AAQT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,qIAAA,CAAA,EAAA;;;;;"}
@@ -1,45 +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 List extends DynamicComponent {
21
- direction = input('vertical', ...(ngDevMode ? [{ debugName: "direction" }] : []));
22
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: List, deps: null, target: i0.ɵɵFactoryTarget.Component });
23
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: List, isStandalone: true, selector: "a2ui-list", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.direction": "direction()" } }, usesInheritance: true, ngImport: i0, template: `
24
- <section [class]="theme.components.List" [style]="theme.additionalStyles?.List">
25
- @for (child of component().properties.children; track child) {
26
- <ng-container a2ui-renderer [surfaceId]="surfaceId()!" [component]="child" />
27
- }
28
- </section>
29
- `, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}:host([direction=\"vertical\"]) section{display:grid}:host([direction=\"horizontal\"]) section{display:flex;max-width:100%;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none}:host([direction=\"horizontal\"]) section>::slotted(*){flex:1 0 fit-content;max-width:min(80%,400px)}\n"], dependencies: [{ kind: "directive", type: Renderer, selector: "ng-container[a2ui-renderer]", inputs: ["surfaceId", "component"] }] });
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: List, decorators: [{
32
- type: Component,
33
- args: [{ selector: 'a2ui-list', imports: [Renderer], host: {
34
- '[attr.direction]': 'direction()',
35
- }, template: `
36
- <section [class]="theme.components.List" [style]="theme.additionalStyles?.List">
37
- @for (child of component().properties.children; track child) {
38
- <ng-container a2ui-renderer [surfaceId]="surfaceId()!" [component]="child" />
39
- }
40
- </section>
41
- `, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}:host([direction=\"vertical\"]) section{display:grid}:host([direction=\"horizontal\"]) section{display:flex;max-width:100%;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none}:host([direction=\"horizontal\"]) section>::slotted(*){flex:1 0 fit-content;max-width:min(80%,400px)}\n"] }]
42
- }], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }] } });
43
-
44
- export { List };
45
- //# sourceMappingURL=a2ui-angular-list-nEeT59V3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-list-nEeT59V3.mjs","sources":["../../src/lib/catalog/list.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-list',\n imports: [Renderer],\n host: {\n '[attr.direction]': 'direction()',\n },\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n :host([direction='vertical']) section {\n display: grid;\n }\n\n :host([direction='horizontal']) section {\n display: flex;\n max-width: 100%;\n overflow-x: scroll;\n overflow-y: hidden;\n scrollbar-width: none;\n\n > ::slotted(*) {\n flex: 1 0 fit-content;\n max-width: min(80%, 400px);\n }\n }\n `,\n template: `\n <section [class]=\"theme.components.List\" [style]=\"theme.additionalStyles?.List\">\n @for (child of component().properties.children; track child) {\n <ng-container a2ui-renderer [surfaceId]=\"surfaceId()!\" [component]=\"child\" />\n }\n </section>\n `,\n})\nexport class List extends DynamicComponent<Types.ListNode> {\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AA8CG,MAAO,IAAK,SAAQ,gBAAgC,CAAA;AAC/C,IAAA,SAAS,GAAG,KAAK,CAA4B,UAAU,qDAAC;uGADtD,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,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EARL;;;;;;AAMT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+VAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAnCS,QAAQ,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAqCP,IAAI,EAAA,UAAA,EAAA,CAAA;kBAvChB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,OAAA,EACZ,CAAC,QAAQ,CAAC,EAAA,IAAA,EACb;AACJ,wBAAA,kBAAkB,EAAE,aAAa;qBAClC,EAAA,QAAA,EA0BS;;;;;;AAMT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,+VAAA,CAAA,EAAA;;;;;"}
@@ -1,108 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { signal, viewChild, effect, 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 Modal extends DynamicComponent {
21
- showDialog = signal(false, ...(ngDevMode ? [{ debugName: "showDialog" }] : []));
22
- dialog = viewChild('dialog', ...(ngDevMode ? [{ debugName: "dialog" }] : []));
23
- constructor() {
24
- super();
25
- effect(() => {
26
- const dialog = this.dialog();
27
- if (dialog && !dialog.nativeElement.open) {
28
- dialog.nativeElement.showModal();
29
- }
30
- });
31
- }
32
- handleDialogClick(event) {
33
- if (event.target instanceof HTMLDialogElement) {
34
- this.closeDialog();
35
- }
36
- }
37
- closeDialog() {
38
- const dialog = this.dialog();
39
- if (!dialog) {
40
- return;
41
- }
42
- if (!dialog.nativeElement.open) {
43
- dialog.nativeElement.close();
44
- }
45
- this.showDialog.set(false);
46
- }
47
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Modal, deps: [], target: i0.ɵɵFactoryTarget.Component });
48
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Modal, isStandalone: true, selector: "a2ui-modal", viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
49
- @if (showDialog()) {
50
- <dialog #dialog [class]="theme.components.Modal.backdrop" (click)="handleDialogClick($event)">
51
- <section [class]="theme.components.Modal.element" [style]="theme.additionalStyles?.Modal">
52
- <div class="controls">
53
- <button (click)="closeDialog()">
54
- <span class="g-icon">close</span>
55
- </button>
56
- </div>
57
-
58
- <ng-container
59
- a2ui-renderer
60
- [surfaceId]="surfaceId()!"
61
- [component]="component().properties.contentChild"
62
- />
63
- </section>
64
- </dialog>
65
- } @else {
66
- <section (click)="showDialog.set(true)">
67
- <ng-container
68
- a2ui-renderer
69
- [surfaceId]="surfaceId()!"
70
- [component]="component().properties.entryPointChild"
71
- />
72
- </section>
73
- }
74
- `, isInline: true, styles: ["dialog{padding:0;border:none;background:none}dialog section .controls{display:flex;justify-content:end;margin-bottom:4px}dialog section .controls button{padding:0;background:none;width:20px;height:20px;pointer:cursor;border:none;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: Renderer, selector: "ng-container[a2ui-renderer]", inputs: ["surfaceId", "component"] }] });
75
- }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Modal, decorators: [{
77
- type: Component,
78
- args: [{ selector: 'a2ui-modal', imports: [Renderer], template: `
79
- @if (showDialog()) {
80
- <dialog #dialog [class]="theme.components.Modal.backdrop" (click)="handleDialogClick($event)">
81
- <section [class]="theme.components.Modal.element" [style]="theme.additionalStyles?.Modal">
82
- <div class="controls">
83
- <button (click)="closeDialog()">
84
- <span class="g-icon">close</span>
85
- </button>
86
- </div>
87
-
88
- <ng-container
89
- a2ui-renderer
90
- [surfaceId]="surfaceId()!"
91
- [component]="component().properties.contentChild"
92
- />
93
- </section>
94
- </dialog>
95
- } @else {
96
- <section (click)="showDialog.set(true)">
97
- <ng-container
98
- a2ui-renderer
99
- [surfaceId]="surfaceId()!"
100
- [component]="component().properties.entryPointChild"
101
- />
102
- </section>
103
- }
104
- `, styles: ["dialog{padding:0;border:none;background:none}dialog section .controls{display:flex;justify-content:end;margin-bottom:4px}dialog section .controls button{padding:0;background:none;width:20px;height:20px;pointer:cursor;border:none;cursor:pointer}\n"] }]
105
- }], ctorParameters: () => [], propDecorators: { dialog: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }] } });
106
-
107
- export { Modal };
108
- //# sourceMappingURL=a2ui-angular-modal-mr9LmczA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-modal-mr9LmczA.mjs","sources":["../../src/lib/catalog/modal.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, signal, viewChild, ElementRef, effect } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Types } from '@a2ui/lit/0.8';\nimport { Renderer } from '../rendering';\n\n@Component({\n selector: 'a2ui-modal',\n imports: [Renderer],\n template: `\n @if (showDialog()) {\n <dialog #dialog [class]=\"theme.components.Modal.backdrop\" (click)=\"handleDialogClick($event)\">\n <section [class]=\"theme.components.Modal.element\" [style]=\"theme.additionalStyles?.Modal\">\n <div class=\"controls\">\n <button (click)=\"closeDialog()\">\n <span class=\"g-icon\">close</span>\n </button>\n </div>\n\n <ng-container\n a2ui-renderer\n [surfaceId]=\"surfaceId()!\"\n [component]=\"component().properties.contentChild\"\n />\n </section>\n </dialog>\n } @else {\n <section (click)=\"showDialog.set(true)\">\n <ng-container\n a2ui-renderer\n [surfaceId]=\"surfaceId()!\"\n [component]=\"component().properties.entryPointChild\"\n />\n </section>\n }\n `,\n styles: `\n dialog {\n padding: 0;\n border: none;\n background: none;\n\n & section {\n & .controls {\n display: flex;\n justify-content: end;\n margin-bottom: 4px;\n\n & button {\n padding: 0;\n background: none;\n width: 20px;\n height: 20px;\n pointer: cursor;\n border: none;\n cursor: pointer;\n }\n }\n }\n }\n `,\n})\nexport class Modal extends DynamicComponent<Types.ModalNode> {\n protected readonly showDialog = signal(false);\n protected readonly dialog = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n constructor() {\n super();\n\n effect(() => {\n const dialog = this.dialog();\n\n if (dialog && !dialog.nativeElement.open) {\n dialog.nativeElement.showModal();\n }\n });\n }\n\n protected handleDialogClick(event: MouseEvent) {\n if (event.target instanceof HTMLDialogElement) {\n this.closeDialog();\n }\n }\n\n protected closeDialog() {\n const dialog = this.dialog();\n\n if (!dialog) {\n return;\n }\n\n if (!dialog.nativeElement.open) {\n dialog.nativeElement.close();\n }\n\n this.showDialog.set(false);\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AA+DG,MAAO,KAAM,SAAQ,gBAAiC,CAAA;AACvC,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC;AAC1B,IAAA,MAAM,GAAG,SAAS,CAAgC,QAAQ,kDAAC;AAE9E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;YAE5B,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE;AACxC,gBAAA,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE;YAClC;AACF,QAAA,CAAC,CAAC;IACJ;AAEU,IAAA,iBAAiB,CAAC,KAAiB,EAAA;AAC3C,QAAA,IAAI,KAAK,CAAC,MAAM,YAAY,iBAAiB,EAAE;YAC7C,IAAI,CAAC,WAAW,EAAE;QACpB;IACF;IAEU,WAAW,GAAA;AACnB,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;QAE5B,IAAI,CAAC,MAAM,EAAE;YACX;QACF;AAEA,QAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE;AAC9B,YAAA,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE;QAC9B;AAEA,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC;IAC5B;uGAlCW,KAAK,EAAA,IAAA,EAAA,EAAA,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,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