@agnosticui/a2ui-lit 0.0.0-stage → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -2
- package/SKILL.md +52 -0
- package/agnosticui-catalog.json +2184 -0
- package/dist/catalog.d.ts +5 -0
- package/dist/catalog.js +36 -0
- package/dist/components/AgAccordion.d.ts +82 -0
- package/dist/components/AgAccordion.js +29 -0
- package/dist/components/AgAlert.d.ts +971 -0
- package/dist/components/AgAlert.js +46 -0
- package/dist/components/AgAvatar.d.ts +511 -0
- package/dist/components/AgAvatar.js +44 -0
- package/dist/components/AgBadge.d.ts +793 -0
- package/dist/components/AgBadge.js +49 -0
- package/dist/components/AgButton.d.ts +1568 -0
- package/dist/components/AgButton.js +61 -0
- package/dist/components/AgCard.d.ts +565 -0
- package/dist/components/AgCard.js +45 -0
- package/dist/components/AgCheckbox.d.ts +1497 -0
- package/dist/components/AgCheckbox.js +63 -0
- package/dist/components/AgCombobox.d.ts +2733 -0
- package/dist/components/AgCombobox.js +91 -0
- package/dist/components/AgDivider.d.ts +169 -0
- package/dist/components/AgDivider.js +38 -0
- package/dist/components/AgEmptyState.d.ts +607 -0
- package/dist/components/AgEmptyState.js +42 -0
- package/dist/components/AgFieldset.d.ts +433 -0
- package/dist/components/AgFieldset.js +39 -0
- package/dist/components/AgHeader.d.ts +205 -0
- package/dist/components/AgHeader.js +35 -0
- package/dist/components/AgInput.d.ts +2988 -0
- package/dist/components/AgInput.js +91 -0
- package/dist/components/AgMessageBubble.d.ts +670 -0
- package/dist/components/AgMessageBubble.js +45 -0
- package/dist/components/AgProgress.d.ts +433 -0
- package/dist/components/AgProgress.js +39 -0
- package/dist/components/AgProgressRing.d.ts +274 -0
- package/dist/components/AgProgressRing.js +38 -0
- package/dist/components/AgRadio.d.ts +1848 -0
- package/dist/components/AgRadio.js +71 -0
- package/dist/components/AgRating.d.ts +1433 -0
- package/dist/components/AgRating.js +67 -0
- package/dist/components/AgSelect.d.ts +1839 -0
- package/dist/components/AgSelect.js +69 -0
- package/dist/components/AgSpinner.d.ts +151 -0
- package/dist/components/AgSpinner.js +34 -0
- package/dist/components/AgTabs.d.ts +328 -0
- package/dist/components/AgTabs.js +39 -0
- package/dist/components/AgTag.d.ts +752 -0
- package/dist/components/AgTag.js +44 -0
- package/dist/components/AgTimeline.d.ts +274 -0
- package/dist/components/AgTimeline.js +38 -0
- package/dist/components/AgToggle.d.ts +1848 -0
- package/dist/components/AgToggle.js +71 -0
- package/dist/functions/validate-surface.d.ts +27 -0
- package/dist/functions/validate-surface.js +56 -0
- package/dist/harness/mock-stream.d.ts +8 -0
- package/dist/harness/mock-stream.js +5 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +31 -0
- package/dist/primitives/AgText.d.ts +150 -0
- package/dist/primitives/AgText.js +44 -0
- package/dist/test-setup.d.ts +1 -0
- package/dist/test-setup.js +83 -0
- package/package.json +59 -4
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Catalog } from '@a2ui/web_core/v1_0';
|
|
2
|
+
import type { LitComponentApi } from '@a2ui/lit';
|
|
3
|
+
export declare const AGNOSTICUI_CATALOG_ID = "https://agnosticui.com/a2ui/v1/catalog.json";
|
|
4
|
+
export declare const AgnosticUICatalog: Catalog<LitComponentApi>;
|
|
5
|
+
export declare function registerAgnosticUICatalog(): void;
|
package/dist/catalog.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// AUTO-GENERATED by v2/a2ui/catalog/scripts/generate-catalog.ts — do not edit by hand
|
|
2
|
+
import { Catalog, BASIC_FUNCTIONS } from '@a2ui/web_core/v1_0';
|
|
3
|
+
import { registerUniversalElement } from '@a2ui/web_core/universal';
|
|
4
|
+
import { AgText } from './primitives/AgText.js';
|
|
5
|
+
import { ValidateSurfaceImplementation } from './functions/validate-surface.js';
|
|
6
|
+
import { AgAccordion } from './components/AgAccordion.js';
|
|
7
|
+
import { AgAlert } from './components/AgAlert.js';
|
|
8
|
+
import { AgAvatar } from './components/AgAvatar.js';
|
|
9
|
+
import { AgBadge } from './components/AgBadge.js';
|
|
10
|
+
import { AgButton } from './components/AgButton.js';
|
|
11
|
+
import { AgCard } from './components/AgCard.js';
|
|
12
|
+
import { AgCheckbox } from './components/AgCheckbox.js';
|
|
13
|
+
import { AgCombobox } from './components/AgCombobox.js';
|
|
14
|
+
import { AgDivider } from './components/AgDivider.js';
|
|
15
|
+
import { AgEmptyState } from './components/AgEmptyState.js';
|
|
16
|
+
import { AgFieldset } from './components/AgFieldset.js';
|
|
17
|
+
import { AgHeader } from './components/AgHeader.js';
|
|
18
|
+
import { AgInput } from './components/AgInput.js';
|
|
19
|
+
import { AgMessageBubble } from './components/AgMessageBubble.js';
|
|
20
|
+
import { AgProgress } from './components/AgProgress.js';
|
|
21
|
+
import { AgProgressRing } from './components/AgProgressRing.js';
|
|
22
|
+
import { AgRadio } from './components/AgRadio.js';
|
|
23
|
+
import { AgRating } from './components/AgRating.js';
|
|
24
|
+
import { AgSelect } from './components/AgSelect.js';
|
|
25
|
+
import { AgSpinner } from './components/AgSpinner.js';
|
|
26
|
+
import { AgTabs } from './components/AgTabs.js';
|
|
27
|
+
import { AgTag } from './components/AgTag.js';
|
|
28
|
+
import { AgTimeline } from './components/AgTimeline.js';
|
|
29
|
+
import { AgToggle } from './components/AgToggle.js';
|
|
30
|
+
export const AGNOSTICUI_CATALOG_ID = 'https://agnosticui.com/a2ui/v1/catalog.json';
|
|
31
|
+
export const AgnosticUICatalog = new Catalog(AGNOSTICUI_CATALOG_ID, '1.0', [AgText, AgAccordion, AgAlert, AgAvatar, AgBadge, AgButton, AgCard, AgCheckbox, AgCombobox, AgDivider, AgEmptyState, AgFieldset, AgHeader, AgInput, AgMessageBubble, AgProgress, AgProgressRing, AgRadio, AgRating, AgSelect, AgSpinner, AgTabs, AgTag, AgTimeline, AgToggle], [...BASIC_FUNCTIONS, ValidateSurfaceImplementation], undefined, 'Use AgnosticUI components (AgCard, AgFieldset, AgDivider, AgHeader, AgAccordion, AgCollapsible, AgTabs, AgMessageBubble, AgAlert, AgBadge, AgAvatar, AgTag, AgEmptyState, AgTimeline, AgProgress, AgProgressRing, AgSpinner, AgButton, AgInput, AgCombobox, AgSelect, AgCheckbox, AgRadio, AgRating, AgToggle, AgText). Always use UAX #31 component IDs (letters, digits, underscores only; no hyphens) and bind interactive form fields using {"@path": "/..."} pointers.');
|
|
32
|
+
export function registerAgnosticUICatalog() {
|
|
33
|
+
for (const component of AgnosticUICatalog.components.values()) {
|
|
34
|
+
registerUniversalElement(component);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { A2uiLitElement } from '@a2ui/web_core/v1_0';
|
|
3
|
+
import 'agnosticui-core/accordion';
|
|
4
|
+
export declare const AgAccordionSchema: z.ZodObject<{
|
|
5
|
+
children: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
|
|
6
|
+
componentId: z.ZodString;
|
|
7
|
+
path: z.ZodString;
|
|
8
|
+
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
path: string;
|
|
10
|
+
componentId: string;
|
|
11
|
+
}, {
|
|
12
|
+
path: string;
|
|
13
|
+
componentId: string;
|
|
14
|
+
}>]>>;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
children?: string[] | {
|
|
17
|
+
path: string;
|
|
18
|
+
componentId: string;
|
|
19
|
+
} | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
children?: string[] | {
|
|
22
|
+
path: string;
|
|
23
|
+
componentId: string;
|
|
24
|
+
} | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const AgAccordionApi: {
|
|
27
|
+
name: 'AgAccordion';
|
|
28
|
+
schema: z.ZodObject<{
|
|
29
|
+
children: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
|
|
30
|
+
componentId: z.ZodString;
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
path: string;
|
|
34
|
+
componentId: string;
|
|
35
|
+
}, {
|
|
36
|
+
path: string;
|
|
37
|
+
componentId: string;
|
|
38
|
+
}>]>>;
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
|
+
children?: string[] | {
|
|
41
|
+
path: string;
|
|
42
|
+
componentId: string;
|
|
43
|
+
} | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
children?: string[] | {
|
|
46
|
+
path: string;
|
|
47
|
+
componentId: string;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
export declare class AgA2uiAccordionElement extends A2uiLitElement<typeof AgAccordionApi> {
|
|
52
|
+
static readonly tagName = "ag-a2ui-accordion";
|
|
53
|
+
createRenderRoot(): this;
|
|
54
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
55
|
+
}
|
|
56
|
+
export declare const AgAccordion: {
|
|
57
|
+
name: 'AgAccordion';
|
|
58
|
+
schema: z.ZodObject<{
|
|
59
|
+
children: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
|
|
60
|
+
componentId: z.ZodString;
|
|
61
|
+
path: z.ZodString;
|
|
62
|
+
}, "strict", z.ZodTypeAny, {
|
|
63
|
+
path: string;
|
|
64
|
+
componentId: string;
|
|
65
|
+
}, {
|
|
66
|
+
path: string;
|
|
67
|
+
componentId: string;
|
|
68
|
+
}>]>>;
|
|
69
|
+
}, "strict", z.ZodTypeAny, {
|
|
70
|
+
children?: string[] | {
|
|
71
|
+
path: string;
|
|
72
|
+
componentId: string;
|
|
73
|
+
} | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
children?: string[] | {
|
|
76
|
+
path: string;
|
|
77
|
+
componentId: string;
|
|
78
|
+
} | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
element: typeof AgA2uiAccordionElement;
|
|
81
|
+
tagName: string;
|
|
82
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// AUTO-GENERATED by v2/a2ui/catalog/scripts/generate-catalog.ts — do not edit by hand
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { A2uiLitElement, ChildListSchema } from '@a2ui/web_core/v1_0';
|
|
5
|
+
import 'agnosticui-core/accordion';
|
|
6
|
+
export const AgAccordionSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
children: ChildListSchema.describe('REF:#/$defs/ChildList|Child component IDs rendered inside AgAccordion.').optional(),
|
|
9
|
+
})
|
|
10
|
+
.strict();
|
|
11
|
+
export const AgAccordionApi = {
|
|
12
|
+
name: 'AgAccordion',
|
|
13
|
+
schema: AgAccordionSchema,
|
|
14
|
+
};
|
|
15
|
+
export class AgA2uiAccordionElement extends A2uiLitElement {
|
|
16
|
+
static { this.tagName = 'ag-a2ui-accordion'; }
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
const p = this.controller.props;
|
|
22
|
+
return html `<ag-accordion>${(p.children ?? []).map((c) => this.renderNode(c))}</ag-accordion>`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export const AgAccordion = {
|
|
26
|
+
...AgAccordionApi,
|
|
27
|
+
element: AgA2uiAccordionElement,
|
|
28
|
+
tagName: AgA2uiAccordionElement.tagName,
|
|
29
|
+
};
|