@assistant-ui/react-generative-ui 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/JSONGenerativeUI.client.d.ts +15 -17
- package/dist/JSONGenerativeUI.client.d.ts.map +1 -1
- package/dist/JSONGenerativeUI.client.js +28 -8
- package/dist/JSONGenerativeUI.client.js.map +1 -1
- package/dist/JSONGenerativeUI.server.d.ts +6 -9
- package/dist/JSONGenerativeUI.server.d.ts.map +1 -1
- package/dist/JSONGenerativeUI.shared.d.ts +42 -44
- package/dist/JSONGenerativeUI.shared.d.ts.map +1 -1
- package/dist/a2ui/convert.d.ts +7 -8
- package/dist/a2ui/convert.d.ts.map +1 -1
- package/dist/a2ui/convert.js +115 -16
- package/dist/a2ui/convert.js.map +1 -1
- package/dist/a2ui/reducer.d.ts +2 -5
- package/dist/a2ui/reducer.d.ts.map +1 -1
- package/dist/a2ui/reducer.js +8 -0
- package/dist/a2ui/reducer.js.map +1 -1
- package/dist/a2ui/snapshot.d.ts +3 -0
- package/dist/a2ui/snapshot.d.ts.map +1 -0
- package/dist/a2ui/snapshot.js +33 -0
- package/dist/a2ui/snapshot.js.map +1 -0
- package/dist/a2ui/types.d.ts +67 -58
- package/dist/a2ui/types.d.ts.map +1 -1
- package/dist/a2ui/types.js.map +1 -1
- package/dist/a2ui.d.ts +5 -4
- package/dist/a2ui.d.ts.map +1 -0
- package/dist/a2ui.js +2 -1
- package/dist/actionRegistry.d.ts +17 -20
- package/dist/actionRegistry.d.ts.map +1 -1
- package/dist/actionRegistry.js.map +1 -1
- package/dist/buildPresentParameters.d.ts +3 -6
- package/dist/buildPresentParameters.d.ts.map +1 -1
- package/dist/buildPresentParameters.js +16 -4
- package/dist/buildPresentParameters.js.map +1 -1
- package/dist/constants.d.ts +2 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/convert/boundSpec.d.ts +7 -10
- package/dist/convert/boundSpec.d.ts.map +1 -1
- package/dist/convert/copyBounded.d.ts +3 -6
- package/dist/convert/copyBounded.d.ts.map +1 -1
- package/dist/convert/isElement.d.ts +2 -5
- package/dist/convert/isElement.d.ts.map +1 -1
- package/dist/convert/takeRun.d.ts +4 -7
- package/dist/convert/takeRun.d.ts.map +1 -1
- package/dist/defineGenerativeComponents.d.ts +2 -5
- package/dist/defineGenerativeComponents.d.ts.map +1 -1
- package/dist/generativeUIToJSX.d.ts +6 -9
- package/dist/generativeUIToJSX.d.ts.map +1 -1
- package/dist/index.d.ts +3 -13
- package/dist/index.d.ts.map +1 -0
- package/dist/index.server.d.ts +3 -13
- package/dist/index.server.d.ts.map +1 -0
- package/dist/index.shared.d.ts +15 -11
- package/dist/index.shared.d.ts.map +1 -0
- package/dist/ir.d.ts +45 -48
- package/dist/ir.d.ts.map +1 -1
- package/dist/renderGenerativeUI.d.ts +3 -6
- package/dist/renderGenerativeUI.d.ts.map +1 -1
- package/dist/scopeSchema.d.ts +6 -0
- package/dist/scopeSchema.d.ts.map +1 -0
- package/dist/scopeSchema.js +56 -0
- package/dist/scopeSchema.js.map +1 -0
- package/dist/slack/constants.d.ts +43 -45
- package/dist/slack/constants.d.ts.map +1 -1
- package/dist/slack/decodeBlockAction.d.ts +2 -5
- package/dist/slack/decodeBlockAction.d.ts.map +1 -1
- package/dist/slack/fromSlackBlocks.d.ts +2 -5
- package/dist/slack/fromSlackBlocks.d.ts.map +1 -1
- package/dist/slack/toSlackBlocks.d.ts +2 -5
- package/dist/slack/toSlackBlocks.d.ts.map +1 -1
- package/dist/slack/toSlackBlocks.js +1 -1
- package/dist/slack/types.d.ts +110 -113
- package/dist/slack/types.d.ts.map +1 -1
- package/dist/slack.d.ts +5 -5
- package/dist/slack.d.ts.map +1 -0
- package/dist/teams/constants.d.ts +15 -18
- package/dist/teams/constants.d.ts.map +1 -1
- package/dist/teams/decodeSubmitData.d.ts +2 -5
- package/dist/teams/decodeSubmitData.d.ts.map +1 -1
- package/dist/teams/toAdaptiveCard.d.ts +10 -13
- package/dist/teams/toAdaptiveCard.d.ts.map +1 -1
- package/dist/teams/toTeamsAttachments.d.ts +2 -5
- package/dist/teams/toTeamsAttachments.d.ts.map +1 -1
- package/dist/teams/types.d.ts +136 -138
- package/dist/teams/types.d.ts.map +1 -1
- package/dist/teams.d.ts +5 -5
- package/dist/teams.d.ts.map +1 -0
- package/dist/types.d.ts +45 -47
- package/dist/types.d.ts.map +1 -1
- package/dist/vocabulary/alert.d.ts +22 -25
- package/dist/vocabulary/alert.d.ts.map +1 -1
- package/dist/vocabulary/collectFormValues.d.ts +12 -13
- package/dist/vocabulary/collectFormValues.d.ts.map +1 -1
- package/dist/vocabulary/collectFormValues.js +3 -2
- package/dist/vocabulary/collectFormValues.js.map +1 -1
- package/dist/vocabulary/data.d.ts +46 -49
- package/dist/vocabulary/data.d.ts.map +1 -1
- package/dist/vocabulary/dispatch.d.ts +4 -7
- package/dist/vocabulary/dispatch.d.ts.map +1 -1
- package/dist/vocabulary/fact.d.ts +9 -12
- package/dist/vocabulary/fact.d.ts.map +1 -1
- package/dist/vocabulary/form.d.ts +8 -11
- package/dist/vocabulary/form.d.ts.map +1 -1
- package/dist/vocabulary/icon.d.ts +38 -41
- package/dist/vocabulary/icon.d.ts.map +1 -1
- package/dist/vocabulary/index.d.ts +2 -5
- package/dist/vocabulary/index.d.ts.map +1 -1
- package/dist/vocabulary/interactive.d.ts +88 -87
- package/dist/vocabulary/interactive.d.ts.map +1 -1
- package/dist/vocabulary/interactive.js +6 -4
- package/dist/vocabulary/interactive.js.map +1 -1
- package/dist/vocabulary/layout.d.ts +76 -79
- package/dist/vocabulary/layout.d.ts.map +1 -1
- package/dist/vocabulary/list.d.ts +11 -14
- package/dist/vocabulary/list.d.ts.map +1 -1
- package/dist/vocabulary/media.d.ts +22 -25
- package/dist/vocabulary/media.d.ts.map +1 -1
- package/dist/vocabulary/text.d.ts +54 -57
- package/dist/vocabulary/text.d.ts.map +1 -1
- package/dist/vocabulary/toTextContent.d.ts +1 -4
- package/dist/vocabulary/toTextContent.d.ts.map +1 -1
- package/package.json +12 -10
- package/src/JSONGenerativeUI.client.tsx +57 -15
- package/src/JSONGenerativeUI.test.tsx +298 -4
- package/src/a2ui/convert.test.ts +496 -0
- package/src/a2ui/convert.ts +170 -25
- package/src/a2ui/reducer.test.ts +18 -0
- package/src/a2ui/reducer.ts +16 -0
- package/src/a2ui/snapshot.test.ts +52 -0
- package/src/a2ui/snapshot.ts +52 -0
- package/src/a2ui/types.ts +16 -0
- package/src/a2ui.ts +2 -0
- package/src/actionRegistry.ts +5 -5
- package/src/buildPresentParameters.test.ts +246 -0
- package/src/buildPresentParameters.ts +18 -3
- package/src/constants.ts +2 -0
- package/src/scopeSchema.test.ts +72 -0
- package/src/scopeSchema.ts +71 -0
- package/src/slack/fromSlackBlocks.test.ts +4 -1
- package/src/slack/toSlackBlocks.test.ts +8 -4
- package/src/teams/toAdaptiveCard.test.ts +5 -3
- package/src/vocabulary/collectFormValues.test.ts +38 -0
- package/src/vocabulary/collectFormValues.ts +11 -2
- package/src/vocabulary/form.test.tsx +1 -0
- package/src/vocabulary/interactive.dispatch.test.tsx +17 -3
- package/src/vocabulary/interactive.test.tsx +33 -1
- package/src/vocabulary/interactive.tsx +12 -2
- package/src/vocabulary/layout.test.tsx +1 -0
- package/src/vocabulary/list.test.tsx +5 -4
- package/dist/node_modules/.pnpm/@types_json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts +0 -141
- package/dist/node_modules/.pnpm/@types_json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
//#region src/types.d.ts
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ZodType } from "zod";
|
|
3
|
+
import type { Action, NormalizedUIElement } from "./ir.js";
|
|
5
4
|
/**
|
|
6
5
|
* The canonical generative-ui element, normalized from the flat `$type` shape
|
|
7
6
|
* or the legacy `component` shape (see {@link normalizeUINode}). `children` is
|
|
@@ -9,25 +8,25 @@ import { ZodType } from "zod";
|
|
|
9
8
|
* `props`. Alias of {@link NormalizedUIElement}; kept under its old name so the
|
|
10
9
|
* package's public surface stays append-only.
|
|
11
10
|
*/
|
|
12
|
-
type GenerativeUIElement = NormalizedUIElement;
|
|
13
|
-
type GenerativeUIProps = NormalizedUIElement["props"];
|
|
11
|
+
export type GenerativeUIElement = NormalizedUIElement;
|
|
12
|
+
export type GenerativeUIProps = NormalizedUIElement["props"];
|
|
14
13
|
/**
|
|
15
14
|
* Anything renderable as generative UI — mirrors React's `ReactNode`: an
|
|
16
15
|
* element, primitive text, a list of nodes, or nothing. Widened beyond the
|
|
17
16
|
* model payload (a {@link GenerativeUIElement}) with the renderer's
|
|
18
17
|
* null/boolean/undefined inputs.
|
|
19
18
|
*/
|
|
20
|
-
type GenerativeUINode = GenerativeUIElement | string | number | boolean | null | undefined | GenerativeUINode[];
|
|
21
|
-
type GenerativeUIAction = Action;
|
|
19
|
+
export type GenerativeUINode = GenerativeUIElement | string | number | boolean | null | undefined | GenerativeUINode[];
|
|
20
|
+
export type GenerativeUIAction = Action;
|
|
22
21
|
/** Whether a node's props are still streaming in or have fully arrived. */
|
|
23
|
-
type GenerativeUIStatus = "streaming" | "done";
|
|
22
|
+
export type GenerativeUIStatus = "streaming" | "done";
|
|
24
23
|
/** The dispatcher an interactive component calls to fire its `$action`. */
|
|
25
|
-
type GenerativeUIDispatch = (action: Action) => unknown;
|
|
24
|
+
export type GenerativeUIDispatch = (action: Action) => unknown;
|
|
26
25
|
/** The render context threaded through {@link renderGenerativeUI}. */
|
|
27
|
-
type GenerativeUIRenderContext = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
export type GenerativeUIRenderContext = {
|
|
27
|
+
/** Whether the tool call's arguments are still streaming or are complete. */
|
|
28
|
+
status: GenerativeUIStatus;
|
|
29
|
+
dispatch?: GenerativeUIDispatch;
|
|
31
30
|
};
|
|
32
31
|
/**
|
|
33
32
|
* Props a component's `render` receives: its model props, rendered `children`,
|
|
@@ -39,22 +38,22 @@ type GenerativeUIRenderContext = {
|
|
|
39
38
|
* collide with a real `status`/`action`/`dispatch` prop.
|
|
40
39
|
*/
|
|
41
40
|
type StreamingRenderProps<P> = (Partial<P> & {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
$status: "streaming";
|
|
43
|
+
$action?: Action;
|
|
44
|
+
$dispatch?: GenerativeUIDispatch;
|
|
46
45
|
}) | (P & {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
$status: "done";
|
|
48
|
+
$action?: Action;
|
|
49
|
+
$dispatch?: GenerativeUIDispatch;
|
|
51
50
|
});
|
|
52
51
|
/** Props for a component that only renders once complete — `$status` is always `"done"`. */
|
|
53
52
|
type StaticRenderProps<P> = P & {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
children?: ReactNode;
|
|
54
|
+
$status: "done";
|
|
55
|
+
$action?: Action;
|
|
56
|
+
$dispatch?: GenerativeUIDispatch;
|
|
58
57
|
};
|
|
59
58
|
/**
|
|
60
59
|
* A component the model is allowed to render, with the schema for its props.
|
|
@@ -68,25 +67,25 @@ type StaticRenderProps<P> = P & {
|
|
|
68
67
|
* fine (each node is mounted on its own fiber), but a given node must keep its
|
|
69
68
|
* `type` across renders for hook identity to be stable.
|
|
70
69
|
*/
|
|
71
|
-
type GenerativeUIComponent<P = any> = {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
export type GenerativeUIComponent<P = any> = {
|
|
71
|
+
/** Natural-language description shown to the model when selecting the component. */
|
|
72
|
+
description: string;
|
|
73
|
+
/** Schema for the props the model must provide. Drives the tool parameters. */
|
|
74
|
+
properties: ZodType<P>;
|
|
75
|
+
/**
|
|
76
|
+
* Render from partially-streamed props. Widened to `boolean | undefined`
|
|
77
|
+
* so a non-literal value (e.g. a variable) still resolves to this branch
|
|
78
|
+
* cleanly rather than matching neither; the strict `false | undefined`
|
|
79
|
+
* branch below is the only one that promises complete props.
|
|
80
|
+
*/
|
|
81
|
+
streamProperties: boolean | undefined;
|
|
82
|
+
render: (props: StreamingRenderProps<P>) => ReactNode;
|
|
84
83
|
} | {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
description: string;
|
|
85
|
+
properties: ZodType<P>;
|
|
86
|
+
/** Render only once props are complete (the default). */
|
|
87
|
+
streamProperties?: false | undefined;
|
|
88
|
+
render: (props: StaticRenderProps<P>) => ReactNode;
|
|
90
89
|
};
|
|
91
90
|
/**
|
|
92
91
|
* The consumer-provided allowlist of components the model is permitted to
|
|
@@ -95,7 +94,6 @@ type GenerativeUIComponent<P = any> = {
|
|
|
95
94
|
*
|
|
96
95
|
* This registry is the security boundary — any `type` not present is rejected.
|
|
97
96
|
*/
|
|
98
|
-
type GenerativeUILibrary = Record<string, GenerativeUIComponent>;
|
|
99
|
-
|
|
100
|
-
export { GenerativeUIAction, GenerativeUIComponent, GenerativeUIDispatch, GenerativeUIElement, GenerativeUILibrary, GenerativeUINode, GenerativeUIProps, GenerativeUIRenderContext, GenerativeUIStatus };
|
|
97
|
+
export type GenerativeUILibrary = Record<string, GenerativeUIComponent>;
|
|
98
|
+
export {};
|
|
101
99
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","
|
|
1
|
+
{"version":3,"file":"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
|
|
23
|
-
|
|
24
|
-
};
|
|
2
|
+
export declare const alertVocabulary: {
|
|
3
|
+
Alert: {
|
|
4
|
+
description: string;
|
|
5
|
+
properties: z.ZodObject<{
|
|
6
|
+
title: z.ZodOptional<z.ZodString>;
|
|
7
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
danger: "danger";
|
|
10
|
+
info: "info";
|
|
11
|
+
success: "success";
|
|
12
|
+
warning: "warning";
|
|
13
|
+
}>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
render: ({ title, description, tone, children }: any) => import("react").JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
Carousel: {
|
|
18
|
+
description: string;
|
|
19
|
+
properties: z.ZodObject<{
|
|
20
|
+
label: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
render: ({ label, children }: any) => import("react").JSX.Element;
|
|
23
|
+
};
|
|
25
24
|
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { alertVocabulary };
|
|
28
25
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/vocabulary/alert.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;CAkEG,CAAC"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { FormEvent } from "react";
|
|
2
|
-
//#region src/vocabulary/collectFormValues.d.ts
|
|
1
|
+
import type { FormEvent } from "react";
|
|
3
2
|
/**
|
|
4
3
|
* The subset of `HTMLInputElement`/`HTMLSelectElement`/`HTMLTextAreaElement` that {@link collectFormValues} reads. A structural type rather than the DOM interfaces themselves, so a plain object can stand in for a form control in tests.
|
|
5
4
|
*/
|
|
6
|
-
type FormControlElementLike = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export type FormControlElementLike = {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly type: string;
|
|
8
|
+
readonly value: string;
|
|
9
|
+
readonly checked?: boolean;
|
|
10
|
+
readonly disabled: boolean;
|
|
11
|
+
readonly hasAttribute: (name: string) => boolean;
|
|
12
|
+
readonly matches?: ((selector: string) => boolean) | undefined;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
|
-
* Collects a submitted form's named control values into a plain object, keyed by `name`, in document order. Reads each control's live DOM state rather than `FormData`, so a checkbox resolves to its `checked` boolean instead of an on/off string. A radio group resolves to its checked option's `value`, or `undefined` if none is checked. Any other repeated `name` resolves to an array of its controls' values, in document order. Controls without a `name`, or that are
|
|
15
|
+
* Collects a submitted form's named control values into a plain object, keyed by `name`, in document order. Reads each control's live DOM state rather than `FormData`, so a checkbox resolves to its `checked` boolean instead of an on/off string. A radio group resolves to its checked option's `value`, or `undefined` if none is checked. Any other repeated `name` resolves to an array of its controls' values, in document order. Controls without a `name`, that carry `data-aui-generated-name`, or that are effectively disabled, including through an ancestor disabled fieldset outside its first legend, are skipped entirely.
|
|
15
16
|
*/
|
|
16
|
-
declare function collectFormValues(elements: ArrayLike<FormControlElementLike>): Record<string, unknown>;
|
|
17
|
+
export declare function collectFormValues(elements: ArrayLike<FormControlElementLike>): Record<string, unknown>;
|
|
17
18
|
/**
|
|
18
19
|
* Convenience wrapper around {@link collectFormValues} for a native form submit event; the cast from `HTMLFormControlsCollection` to `ArrayLike<FormControlElementLike>` lives here once instead of at every call site.
|
|
19
20
|
*/
|
|
20
|
-
declare function collectFormValuesFromEvent(event: FormEvent<HTMLFormElement>): Record<string, unknown>;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { FormControlElementLike, collectFormValues, collectFormValuesFromEvent };
|
|
21
|
+
export declare function collectFormValuesFromEvent(event: FormEvent<HTMLFormElement>): Record<string, unknown>;
|
|
23
22
|
//# sourceMappingURL=collectFormValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectFormValues.d.ts","
|
|
1
|
+
{"version":3,"file":"collectFormValues.d.ts","sourceRoot":"","sources":["../../src/vocabulary/collectFormValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CAChE,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,SAAS,CAAC,sBAAsB,CAAC,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiCzB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKzB"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import "../constants.js";
|
|
1
2
|
//#region src/vocabulary/collectFormValues.ts
|
|
2
3
|
/**
|
|
3
|
-
* Collects a submitted form's named control values into a plain object, keyed by `name`, in document order. Reads each control's live DOM state rather than `FormData`, so a checkbox resolves to its `checked` boolean instead of an on/off string. A radio group resolves to its checked option's `value`, or `undefined` if none is checked. Any other repeated `name` resolves to an array of its controls' values, in document order. Controls without a `name`, or that are
|
|
4
|
+
* Collects a submitted form's named control values into a plain object, keyed by `name`, in document order. Reads each control's live DOM state rather than `FormData`, so a checkbox resolves to its `checked` boolean instead of an on/off string. A radio group resolves to its checked option's `value`, or `undefined` if none is checked. Any other repeated `name` resolves to an array of its controls' values, in document order. Controls without a `name`, that carry `data-aui-generated-name`, or that are effectively disabled, including through an ancestor disabled fieldset outside its first legend, are skipped entirely.
|
|
4
5
|
*/
|
|
5
6
|
function collectFormValues(elements) {
|
|
6
7
|
const values = Object.create(null);
|
|
7
8
|
for (const element of Array.from(elements)) {
|
|
8
9
|
const { name, disabled } = element;
|
|
9
|
-
if (!name || disabled) continue;
|
|
10
|
+
if (!name || disabled || element.hasAttribute("data-aui-generated-name") || element.matches?.(":disabled")) continue;
|
|
10
11
|
if (element.type === "radio") {
|
|
11
12
|
if (element.checked) values[name] = element.value;
|
|
12
13
|
else if (!Object.hasOwn(values, name)) values[name] = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectFormValues.js","names":[],"sources":["../../src/vocabulary/collectFormValues.ts"],"sourcesContent":["import type { FormEvent } from \"react\";\n\n/**\n * The subset of `HTMLInputElement`/`HTMLSelectElement`/`HTMLTextAreaElement` that {@link collectFormValues} reads. A structural type rather than the DOM interfaces themselves, so a plain object can stand in for a form control in tests.\n */\nexport type FormControlElementLike = {\n readonly name: string;\n readonly type: string;\n readonly value: string;\n readonly checked?: boolean;\n readonly disabled: boolean;\n};\n\n/**\n * Collects a submitted form's named control values into a plain object, keyed by `name`, in document order. Reads each control's live DOM state rather than `FormData`, so a checkbox resolves to its `checked` boolean instead of an on/off string. A radio group resolves to its checked option's `value`, or `undefined` if none is checked. Any other repeated `name` resolves to an array of its controls' values, in document order. Controls without a `name`, or that are
|
|
1
|
+
{"version":3,"file":"collectFormValues.js","names":[],"sources":["../../src/vocabulary/collectFormValues.ts"],"sourcesContent":["import type { FormEvent } from \"react\";\nimport { GENERATED_NAME_ATTR } from \"../constants\";\n\n/**\n * The subset of `HTMLInputElement`/`HTMLSelectElement`/`HTMLTextAreaElement` that {@link collectFormValues} reads. A structural type rather than the DOM interfaces themselves, so a plain object can stand in for a form control in tests.\n */\nexport type FormControlElementLike = {\n readonly name: string;\n readonly type: string;\n readonly value: string;\n readonly checked?: boolean;\n readonly disabled: boolean;\n readonly hasAttribute: (name: string) => boolean;\n readonly matches?: ((selector: string) => boolean) | undefined;\n};\n\n/**\n * Collects a submitted form's named control values into a plain object, keyed by `name`, in document order. Reads each control's live DOM state rather than `FormData`, so a checkbox resolves to its `checked` boolean instead of an on/off string. A radio group resolves to its checked option's `value`, or `undefined` if none is checked. Any other repeated `name` resolves to an array of its controls' values, in document order. Controls without a `name`, that carry `data-aui-generated-name`, or that are effectively disabled, including through an ancestor disabled fieldset outside its first legend, are skipped entirely.\n */\nexport function collectFormValues(\n elements: ArrayLike<FormControlElementLike>,\n): Record<string, unknown> {\n const values: Record<string, unknown> = Object.create(null);\n\n for (const element of Array.from(elements)) {\n const { name, disabled } = element;\n if (\n !name ||\n disabled ||\n element.hasAttribute(GENERATED_NAME_ATTR) ||\n element.matches?.(\":disabled\")\n )\n continue;\n\n if (element.type === \"radio\") {\n if (element.checked) values[name] = element.value;\n else if (!Object.hasOwn(values, name)) values[name] = undefined;\n continue;\n }\n\n const value: string | boolean =\n element.type === \"checkbox\" ? (element.checked ?? false) : element.value;\n\n if (Object.hasOwn(values, name)) {\n const existing = values[name];\n values[name] = Array.isArray(existing)\n ? [...existing, value]\n : [existing, value];\n } else {\n values[name] = value;\n }\n }\n\n return values;\n}\n\n/**\n * Convenience wrapper around {@link collectFormValues} for a native form submit event; the cast from `HTMLFormControlsCollection` to `ArrayLike<FormControlElementLike>` lives here once instead of at every call site.\n */\nexport function collectFormValuesFromEvent(\n event: FormEvent<HTMLFormElement>,\n): Record<string, unknown> {\n return collectFormValues(\n event.currentTarget\n .elements as unknown as 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|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
2
|
+
export declare const dataVocabulary: {
|
|
3
|
+
Table: {
|
|
4
|
+
description: string;
|
|
5
|
+
properties: z.ZodObject<{
|
|
6
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
+
label: z.ZodString;
|
|
8
|
+
}, z.core.$strip>>>;
|
|
9
|
+
rows: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
render: ({ columns, rows, children }: any) => import("react").JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
Markdown: {
|
|
14
|
+
description: string;
|
|
15
|
+
properties: z.ZodObject<{
|
|
16
|
+
value: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
streamProperties: true;
|
|
19
|
+
render: ({ value, children }: any) => import("react").JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
Chart: {
|
|
22
|
+
description: string;
|
|
23
|
+
properties: z.ZodObject<{
|
|
24
|
+
variant: z.ZodEnum<{
|
|
25
|
+
bar: "bar";
|
|
26
|
+
line: "line";
|
|
27
|
+
sparkline: "sparkline";
|
|
28
|
+
area: "area";
|
|
29
|
+
}>;
|
|
30
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
label: z.ZodOptional<z.ZodString>;
|
|
32
|
+
value: z.ZodNumber;
|
|
33
|
+
}, z.core.$strip>>>;
|
|
34
|
+
series: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
+
label: z.ZodOptional<z.ZodString>;
|
|
36
|
+
data: z.ZodArray<z.ZodObject<{
|
|
37
|
+
label: z.ZodOptional<z.ZodString>;
|
|
38
|
+
value: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
41
|
+
stacked: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
showAxis: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
showLegend: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
color: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
render: ({ variant, data, series, stacked, showAxis, showLegend, color, }: any) => import("react").JSX.Element;
|
|
47
|
+
};
|
|
49
48
|
};
|
|
50
|
-
//#endregion
|
|
51
|
-
export { dataVocabulary };
|
|
52
49
|
//# sourceMappingURL=data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/vocabulary/data.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmSxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqOI,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { Action } from "../ir.js";
|
|
2
|
-
import { GenerativeUIDispatch } from "../types.js";
|
|
3
|
-
|
|
4
|
-
declare const actionAttr: (a: Action | undefined) => string | undefined;
|
|
1
|
+
import type { Action } from "../ir.js";
|
|
2
|
+
import type { GenerativeUIDispatch } from "../types.js";
|
|
3
|
+
export declare const actionAttr: (a: Action | undefined) => string | undefined;
|
|
5
4
|
/**
|
|
6
5
|
* Fires `$action` through `$dispatch` when both are present, merging a runtime value into the payload under the reserved `$input` key (not `value`) so the user's input never clobbers a model-supplied `value` field. No-op when no registry is wired. The returned promise from an async handler is caught and re-thrown on a microtask so rejections surface rather than going unhandled.
|
|
7
6
|
*/
|
|
8
|
-
declare const fire: ($action: Action | undefined, $dispatch: GenerativeUIDispatch | undefined, input?: unknown) => void;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { actionAttr, fire };
|
|
7
|
+
export declare const fire: ($action: Action | undefined, $dispatch: GenerativeUIDispatch | undefined, input?: unknown) => void;
|
|
11
8
|
//# sourceMappingURL=dispatch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/vocabulary/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAc;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAiB;AAErD,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SACzB,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,IAAI,GACf,SAAS,MAAM,GAAG,SAAS,EAC3B,WAAW,oBAAoB,GAAG,SAAS,EAC3C,QAAQ,OAAO,SAShB,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
2
|
+
export declare const factVocabulary: {
|
|
3
|
+
Fact: {
|
|
4
|
+
description: string;
|
|
5
|
+
properties: z.ZodObject<{
|
|
6
|
+
label: z.ZodString;
|
|
7
|
+
value: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
render: ({ label, value, children }: any) => import("react").JSX.Element;
|
|
10
|
+
};
|
|
12
11
|
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { factVocabulary };
|
|
15
12
|
//# sourceMappingURL=fact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fact.d.ts","
|
|
1
|
+
{"version":3,"file":"fact.d.ts","sourceRoot":"","sources":["../../src/vocabulary/fact.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;;;;CAkBI,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
2
|
+
export declare const formVocabulary: {
|
|
3
|
+
Form: {
|
|
4
|
+
description: string;
|
|
5
|
+
properties: z.ZodObject<{
|
|
6
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
render: ({ gap, $action, $dispatch, children }: any) => import("react").JSX.Element;
|
|
9
|
+
};
|
|
11
10
|
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { formVocabulary };
|
|
14
11
|
//# sourceMappingURL=form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/vocabulary/form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,cAAc;;;;;;;;CA4BI,CAAC"}
|
|
@@ -1,44 +1,41 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
2
|
+
export declare const iconVocabulary: {
|
|
3
|
+
Icon: {
|
|
4
|
+
description: string;
|
|
5
|
+
properties: z.ZodObject<{
|
|
6
|
+
name: z.ZodEnum<{
|
|
7
|
+
sun: "sun";
|
|
8
|
+
moon: "moon";
|
|
9
|
+
cloud: "cloud";
|
|
10
|
+
rain: "rain";
|
|
11
|
+
snow: "snow";
|
|
12
|
+
wind: "wind";
|
|
13
|
+
play: "play";
|
|
14
|
+
pause: "pause";
|
|
15
|
+
check: "check";
|
|
16
|
+
x: "x";
|
|
17
|
+
star: "star";
|
|
18
|
+
heart: "heart";
|
|
19
|
+
"arrow-right": "arrow-right";
|
|
20
|
+
"arrow-up-right": "arrow-up-right";
|
|
21
|
+
"chevron-right": "chevron-right";
|
|
22
|
+
calendar: "calendar";
|
|
23
|
+
clock: "clock";
|
|
24
|
+
"map-pin": "map-pin";
|
|
25
|
+
plane: "plane";
|
|
26
|
+
truck: "truck";
|
|
27
|
+
"credit-card": "credit-card";
|
|
28
|
+
user: "user";
|
|
29
|
+
search: "search";
|
|
30
|
+
bell: "bell";
|
|
31
|
+
}>;
|
|
32
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
sm: "sm";
|
|
34
|
+
md: "md";
|
|
35
|
+
lg: "lg";
|
|
36
|
+
}>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
render: ({ name, size }: any) => import("react").JSX.Element | null;
|
|
39
|
+
};
|
|
41
40
|
};
|
|
42
|
-
//#endregion
|
|
43
|
-
export { iconVocabulary };
|
|
44
41
|
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/vocabulary/icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwIxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCI,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { GenerativeUILibrary } from "../types.js";
|
|
2
|
-
//#region src/vocabulary/index.d.ts
|
|
1
|
+
import type { GenerativeUILibrary } from "../types.js";
|
|
3
2
|
/**
|
|
4
3
|
* The closed generative-ui vocabulary the factory ships: a fixed set of
|
|
5
4
|
* intrinsic components the model may render, each a zod `properties` schema
|
|
@@ -9,7 +8,5 @@ import { GenerativeUILibrary } from "../types.js";
|
|
|
9
8
|
* `new JSONGenerativeUI({ library: defaultGenerativeUILibrary })`, and override
|
|
10
9
|
* or extend entries with their own `defineGenerativeComponents`.
|
|
11
10
|
*/
|
|
12
|
-
declare const defaultGenerativeUILibrary: GenerativeUILibrary;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { defaultGenerativeUILibrary };
|
|
11
|
+
export declare const defaultGenerativeUILibrary: GenerativeUILibrary;
|
|
15
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vocabulary/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAiB;AAYpD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBAWxC,CAAC"}
|