@meistrari/chat-ui-lang 0.3.0 → 0.4.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 (122) hide show
  1. package/README.md +105 -13
  2. package/dist/actions.d.ts +9 -0
  3. package/dist/answers.d.ts +16 -0
  4. package/dist/components/actions.d.ts +47 -0
  5. package/dist/components/chart.d.ts +23 -0
  6. package/dist/components/chat.d.ts +55 -0
  7. package/dist/components/data.d.ts +31 -0
  8. package/dist/components/form.d.ts +42 -0
  9. package/dist/components/layout.d.ts +1179 -0
  10. package/dist/components/text.d.ts +14 -0
  11. package/dist/define.d.ts +8 -0
  12. package/dist/index.d.ts +25 -0
  13. package/dist/index.js +935 -0
  14. package/dist/library.d.ts +6 -0
  15. package/dist/nuxt/module.d.mts +9 -0
  16. package/dist/nuxt/module.json +9 -0
  17. package/dist/nuxt/module.mjs +31 -0
  18. package/dist/nuxt/runtime/actions.d.ts +15 -0
  19. package/dist/nuxt/runtime/actions.js +40 -0
  20. package/dist/nuxt/runtime/components/openui-widget.d.vue.ts +21 -0
  21. package/dist/nuxt/runtime/components/openui-widget.vue +72 -0
  22. package/dist/nuxt/runtime/components/openui-widget.vue.d.ts +21 -0
  23. package/dist/nuxt/runtime/components/plain-prose.d.vue.ts +7 -0
  24. package/dist/nuxt/runtime/components/plain-prose.vue +12 -0
  25. package/dist/nuxt/runtime/components/plain-prose.vue.d.ts +7 -0
  26. package/dist/nuxt/runtime/components/widgets/bar-chart.d.vue.ts +10 -0
  27. package/dist/nuxt/runtime/components/widgets/bar-chart.vue +39 -0
  28. package/dist/nuxt/runtime/components/widgets/bar-chart.vue.d.ts +10 -0
  29. package/dist/nuxt/runtime/components/widgets/bar.d.vue.ts +10 -0
  30. package/dist/nuxt/runtime/components/widgets/bar.vue +12 -0
  31. package/dist/nuxt/runtime/components/widgets/bar.vue.d.ts +10 -0
  32. package/dist/nuxt/runtime/components/widgets/button.d.vue.ts +11 -0
  33. package/dist/nuxt/runtime/components/widgets/button.vue +30 -0
  34. package/dist/nuxt/runtime/components/widgets/button.vue.d.ts +11 -0
  35. package/dist/nuxt/runtime/components/widgets/buttons.d.vue.ts +8 -0
  36. package/dist/nuxt/runtime/components/widgets/buttons.vue +14 -0
  37. package/dist/nuxt/runtime/components/widgets/buttons.vue.d.ts +8 -0
  38. package/dist/nuxt/runtime/components/widgets/callout.d.vue.ts +11 -0
  39. package/dist/nuxt/runtime/components/widgets/callout.vue +27 -0
  40. package/dist/nuxt/runtime/components/widgets/callout.vue.d.ts +11 -0
  41. package/dist/nuxt/runtime/components/widgets/card.d.vue.ts +9 -0
  42. package/dist/nuxt/runtime/components/widgets/card.vue +19 -0
  43. package/dist/nuxt/runtime/components/widgets/card.vue.d.ts +9 -0
  44. package/dist/nuxt/runtime/components/widgets/checkbox.d.vue.ts +9 -0
  45. package/dist/nuxt/runtime/components/widgets/checkbox.vue +26 -0
  46. package/dist/nuxt/runtime/components/widgets/checkbox.vue.d.ts +9 -0
  47. package/dist/nuxt/runtime/components/widgets/citation.d.vue.ts +9 -0
  48. package/dist/nuxt/runtime/components/widgets/citation.vue +9 -0
  49. package/dist/nuxt/runtime/components/widgets/citation.vue.d.ts +9 -0
  50. package/dist/nuxt/runtime/components/widgets/col.d.vue.ts +10 -0
  51. package/dist/nuxt/runtime/components/widgets/col.vue +16 -0
  52. package/dist/nuxt/runtime/components/widgets/col.vue.d.ts +10 -0
  53. package/dist/nuxt/runtime/components/widgets/file-card.d.vue.ts +9 -0
  54. package/dist/nuxt/runtime/components/widgets/file-card.vue +9 -0
  55. package/dist/nuxt/runtime/components/widgets/file-card.vue.d.ts +9 -0
  56. package/dist/nuxt/runtime/components/widgets/form.d.vue.ts +10 -0
  57. package/dist/nuxt/runtime/components/widgets/form.vue +60 -0
  58. package/dist/nuxt/runtime/components/widgets/form.vue.d.ts +10 -0
  59. package/dist/nuxt/runtime/components/widgets/image.d.vue.ts +10 -0
  60. package/dist/nuxt/runtime/components/widgets/image.vue +34 -0
  61. package/dist/nuxt/runtime/components/widgets/image.vue.d.ts +10 -0
  62. package/dist/nuxt/runtime/components/widgets/input.d.vue.ts +10 -0
  63. package/dist/nuxt/runtime/components/widgets/input.vue +23 -0
  64. package/dist/nuxt/runtime/components/widgets/input.vue.d.ts +10 -0
  65. package/dist/nuxt/runtime/components/widgets/markdown.d.vue.ts +9 -0
  66. package/dist/nuxt/runtime/components/widgets/markdown.vue +14 -0
  67. package/dist/nuxt/runtime/components/widgets/markdown.vue.d.ts +9 -0
  68. package/dist/nuxt/runtime/components/widgets/metric.d.vue.ts +11 -0
  69. package/dist/nuxt/runtime/components/widgets/metric.vue +20 -0
  70. package/dist/nuxt/runtime/components/widgets/metric.vue.d.ts +11 -0
  71. package/dist/nuxt/runtime/components/widgets/option.d.vue.ts +10 -0
  72. package/dist/nuxt/runtime/components/widgets/option.vue +12 -0
  73. package/dist/nuxt/runtime/components/widgets/option.vue.d.ts +10 -0
  74. package/dist/nuxt/runtime/components/widgets/question.d.vue.ts +11 -0
  75. package/dist/nuxt/runtime/components/widgets/question.vue +15 -0
  76. package/dist/nuxt/runtime/components/widgets/question.vue.d.ts +11 -0
  77. package/dist/nuxt/runtime/components/widgets/questions.d.vue.ts +9 -0
  78. package/dist/nuxt/runtime/components/widgets/questions.vue +91 -0
  79. package/dist/nuxt/runtime/components/widgets/questions.vue.d.ts +9 -0
  80. package/dist/nuxt/runtime/components/widgets/select.d.vue.ts +10 -0
  81. package/dist/nuxt/runtime/components/widgets/select.vue +27 -0
  82. package/dist/nuxt/runtime/components/widgets/select.vue.d.ts +10 -0
  83. package/dist/nuxt/runtime/components/widgets/stack.d.vue.ts +9 -0
  84. package/dist/nuxt/runtime/components/widgets/stack.vue +18 -0
  85. package/dist/nuxt/runtime/components/widgets/stack.vue.d.ts +9 -0
  86. package/dist/nuxt/runtime/components/widgets/table.d.vue.ts +9 -0
  87. package/dist/nuxt/runtime/components/widgets/table.vue +41 -0
  88. package/dist/nuxt/runtime/components/widgets/table.vue.d.ts +9 -0
  89. package/dist/nuxt/runtime/context.d.ts +30 -0
  90. package/dist/nuxt/runtime/context.js +4 -0
  91. package/dist/nuxt/runtime/form-fields.d.ts +10 -0
  92. package/dist/nuxt/runtime/form-fields.js +30 -0
  93. package/dist/nuxt/runtime/program.d.ts +15 -0
  94. package/dist/nuxt/runtime/program.js +74 -0
  95. package/dist/nuxt/runtime/registry.d.ts +4 -0
  96. package/dist/nuxt/runtime/registry.js +44 -0
  97. package/dist/nuxt/runtime/render.d.ts +21 -0
  98. package/dist/nuxt/runtime/render.js +48 -0
  99. package/dist/nuxt/runtime/use-openui-context.d.ts +2 -0
  100. package/dist/nuxt/runtime/use-openui-context.js +8 -0
  101. package/dist/nuxt/types.d.mts +9 -0
  102. package/dist/profiles.d.ts +10 -0
  103. package/dist/prompt.d.ts +5 -0
  104. package/dist/safe-url.d.ts +2 -0
  105. package/dist/segments.d.ts +16 -0
  106. package/dist/slack.d.ts +28 -0
  107. package/dist/version.d.ts +2 -0
  108. package/dist/widget-context.d.ts +13 -0
  109. package/package.json +72 -31
  110. package/src/actions.ts +0 -12
  111. package/src/components/actions.ts +0 -21
  112. package/src/components/chart.ts +0 -22
  113. package/src/components/chat.ts +0 -60
  114. package/src/components/data.ts +0 -32
  115. package/src/components/form.ts +0 -41
  116. package/src/components/layout.ts +0 -30
  117. package/src/components/text.ts +0 -20
  118. package/src/define.ts +0 -9
  119. package/src/index.ts +0 -14
  120. package/src/library.ts +0 -64
  121. package/src/prompt.ts +0 -54
  122. package/src/version.ts +0 -2
package/README.md CHANGED
@@ -1,18 +1,110 @@
1
1
  # @meistrari/chat-ui-lang
2
2
 
3
- The catalogue of widgets the chat agent may emit as OpenUI Lang, shared by
4
- chat-nuxt (which renders them) and agent-api (which puts `prompt()` in the
5
- system prompt). No Vue here: only names, descriptions, Zod props and the
6
- prompt generator.
7
-
8
- Adding a widget is a two-part change in this monorepo: define it here and add
9
- its Vue renderer to `chat-nuxt/src/runtime/rendering/openui/registry.ts`. The
10
- registry test fails until both sides match. The full walkthrough is in
3
+ The catalogue of widgets an agent may emit as OpenUI Lang, shared by the renderers and by the agent runtimes that put
4
+ `prompt()` in the system prompt, plus the Nuxt renderer of the web profile.
5
+
6
+ | Entry | Contents |
7
+ | --- | --- |
8
+ | `@meistrari/chat-ui-lang` | Names, descriptions, Zod props, the prompt generator and the formats every surface shares (the answers message, the `<widget_context>` envelope, URL safety). No Vue or Nuxt, so agent runtimes can bundle it. |
9
+ | `@meistrari/chat-ui-lang/nuxt` | A Nuxt module with `<OpenuiWidget>`, which renders any program of the catalogue with Tela Build components. Vue, Nuxt and Tela Build are optional peer dependencies, needed only here. |
10
+
11
+ ## Profiles
12
+
13
+ Each surface renders a subset of the catalogue. `profiles` maps a profile to its library, its extra prompt rules and its
14
+ examples, and `prompt({ profile })` builds the system prompt for one of them.
15
+
16
+ | Profile | Renderer | Offers |
17
+ | --- | --- | --- |
18
+ | `web` | `@meistrari/chat-ui-lang/nuxt` | the whole catalogue |
19
+ | `slack` | `renderSlackAnswer` | layout, text, metrics, one table, buttons |
20
+
21
+ A Slack-only component must still get a web renderer, so every surface can show any message of a conversation that moved
22
+ between them.
23
+
24
+ ## Slack
25
+
26
+ `renderSlackAnswer(content, { prose, threadTs, maxBlocks })` turns an answer with `openui-lang` blocks into Block Kit, or
27
+ returns null when it has none. `prose` is how the connector already renders markdown. Buttons that send a message carry
28
+ `{ t: threadTs, m: message }` in their value under the action id `openui_send_<n>`; `parseSlackWidgetAction` reads it
29
+ back when Slack reports the click. Link buttons (`openui_link_<n>`) only need an acknowledgement. Without `threadTs`,
30
+ send buttons render as text, and so do buttons whose message with its widget context does not fit the 2000-character button value. When the answer does not fit `maxBlocks`, even as prose, `blocks` comes back empty and `text` is the whole answer. `maskWidgets` hides widget code while an answer streams.
31
+
32
+ ## Nuxt renderer
33
+
34
+ chat-nuxt registers it by itself; apps that embed the chat do nothing. Another Nuxt app must extend Tela Build:
35
+
36
+ ```ts
37
+ export default defineNuxtConfig({
38
+ extends: ['@meistrari/tela-build'],
39
+ modules: ['@meistrari/chat-ui-lang/nuxt'],
40
+ })
41
+ ```
42
+
43
+ Give the agent `prompt({ profile: 'web' })` in its system prompt, and render each `openui-lang` block of an answer with:
44
+
45
+ ```vue
46
+ <OpenuiWidget
47
+ :code="block.code"
48
+ :complete="!block.streaming"
49
+ :interactive="isLatestMessage"
50
+ :send="sendUserMessage"
51
+ :host="host"
52
+ @errors="(errors, code) => report(errors, code)"
53
+ @copy-failed="showToast"
54
+ />
55
+ ```
56
+
57
+ | Prop | Meaning |
58
+ | --- | --- |
59
+ | `code` | The program of one block; it may grow while `complete` is false |
60
+ | `complete` | False while the block still streams; controls stay disabled |
61
+ | `interactive` | False disables every control, e.g. on older messages |
62
+ | `send(message)` | Sends a user message; resolve `false` when it was rejected. A widget answers once |
63
+ | `host` | Optional `OpenuiHost` (a type exported by `@meistrari/chat-ui-lang/nuxt`): `prose` renders markdown for Markdown and Callout (props `text`, `partial`), `components` replaces widgets by name |
64
+
65
+ Without a host, prose is plain text, FileCard shows the file name, Image is a link for `https` sources and Citation
66
+ shows its label. chat-nuxt replaces all four with its markdown, vault previews and citation chips.
67
+
68
+ A widget renderer lives in `src/nuxt/runtime/components/widgets/<name>.vue` and is registered in
69
+ `src/nuxt/runtime/registry.ts`; `registry.test.ts` fails until catalogue and renderers match. A widget gets `props`
70
+ (already evaluated) and `partial`; children arrive as element nodes that it renders with `renderNode` from
71
+ `useOpenuiContext()`. In development the module serves `src/nuxt/runtime`, so edits reload without a rebuild.
72
+
73
+ ## Changing the catalogue
74
+
75
+ A widget is a change in this monorepo: define it in `src/components/*.ts`, add it to the groups of every profile that
76
+ offers it (`src/library.ts` for web, `src/profiles.ts` for the others) and add its renderer. The walkthrough is in
11
77
  `packages/chat-nuxt/docs/guides/widgets.md`.
12
78
 
13
- Bump `LIBRARY_VERSION` on every catalogue change: agent-api stamps it on each
14
- turn and chat-nuxt logs it with widget errors, which is how drift between the
15
- prompt and the renderer shows up in production.
79
+ The published version is not bumped by hand: the release workflow derives it from the conventional commits that touch
80
+ this package, and stamps `LIBRARY_VERSION` with it before building (agent-api stamps it on each turn and the renderers
81
+ log it with widget errors, which is how drift between prompt and renderer shows up in production). The values committed
82
+ here are the baseline the workspace itself runs on; keep the two equal (a test fails otherwise).
83
+
84
+ ## Publishing
85
+
86
+ `@meistrari/chat-ui-lang` ships together with `@meistrari/chat-nuxt`, which depends on it, from
87
+ `.github/workflows/release.yml` (through `publish-chat-nuxt.yml`). Nobody runs `npm publish` by hand.
88
+
89
+ | Trigger | What happens to chat-ui-lang |
90
+ |---------|------------------------------|
91
+ | Push to `main` | A release candidate `X.Y.Z-rc.N` is published to the `rc` dist-tag (and tagged `chat-ui-lang-X.Y.Z-rc.N`) when releasable commits touched `packages/ui-lang` since the last tag. Otherwise the newest published version is reused. chat-nuxt is then published pinned to that exact version. |
92
+ | `Deploy` dispatch, `forninho` | The candidate chat-nuxt depends on is reused and exercised by the compatibility matrix. |
93
+ | `Deploy` dispatch, `production` | The candidate chat-nuxt depends on is promoted to `X.Y.Z` on `latest` (the RC's contents, only the version rewritten), then chat-nuxt is promoted to a manifest that depends on `X.Y.Z`. |
94
+
95
+ The build stamps `LIBRARY_VERSION` with the version without its `-rc.N` suffix and applies the `publishConfig` entry
96
+ points to the manifest, both from `scripts/`: promotion republishes the candidate unchanged, so the RC must already
97
+ report the stable version, and `npm publish` (which trusted publishing requires) ignores `publishConfig.main`/`exports`
98
+ that pnpm would apply, leaving entry points that point at `src/`, which the tarball does not contain.
99
+
100
+ Setup that lives outside this repository, needed once:
101
+
102
+ - npmjs.com, package `@meistrari/chat-ui-lang` → Settings → Trusted publisher → GitHub Actions: repository
103
+ `meistrari/chat-app`, workflow `release.yml` (the calling workflow, not `publish-chat-nuxt.yml`). Without it the
104
+ publish fails with a bare `404 Not Found - PUT`.
105
+ - A baseline tag `chat-ui-lang-<last published version>` on a commit merged into `main`. The release derives the next
106
+ version from the tags, and without one it would release the "first version" as a major bump. The workflow refuses to
107
+ run without any `chat-ui-lang-*` tag.
16
108
 
17
- `@openuidev/lang-core` ships a postinstall that sends installation telemetry;
18
- the root `pnpm.neverBuiltDependencies` entry disables it.
109
+ `@openuidev/lang-core` ships a postinstall that sends installation telemetry; the root `pnpm.neverBuiltDependencies`
110
+ entry disables it.
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const CopyText: import("@openuidev/lang-core").DefinedAction<z.ZodObject<{
3
+ text: z.ZodString;
4
+ }, z.core.$strip>, "CopyText">;
5
+ export declare const actions: {
6
+ CopyText: import("@openuidev/lang-core").DefinedAction<z.ZodObject<{
7
+ text: z.ZodString;
8
+ }, z.core.$strip>, "CopyText">;
9
+ };
@@ -0,0 +1,16 @@
1
+ export type AnswerableQuestion = {
2
+ id: string;
3
+ title: string;
4
+ type: 'single' | 'multiple';
5
+ options: ReadonlyArray<{
6
+ id: string;
7
+ label: string;
8
+ description?: string;
9
+ }>;
10
+ };
11
+ export type QuestionAnswer = {
12
+ selected: string[];
13
+ skipped?: boolean;
14
+ };
15
+ /** The user message that answers a set of questions; null until every question has a valid answer. */
16
+ export declare function formatQuestionAnswers(requestId: string, questions: readonly AnswerableQuestion[], answers: Readonly<Record<string, QuestionAnswer>>): string | null;
@@ -0,0 +1,47 @@
1
+ import { z } from 'zod';
2
+ export declare const Button: import("..").UiComponent<z.ZodObject<{
3
+ label: z.ZodString;
4
+ action: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5
+ type: z.ZodLiteral<"open_url">;
6
+ url: z.ZodString;
7
+ }, z.core.$strip>, z.ZodObject<{
8
+ type: z.ZodLiteral<"continue_conversation">;
9
+ context: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ type: z.ZodString;
12
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
13
+ }, z.core.$strip>]>>;
14
+ variant: z.ZodOptional<z.ZodEnum<{
15
+ primary: "primary";
16
+ secondary: "secondary";
17
+ }>>;
18
+ }, z.core.$strip>>;
19
+ export declare const Buttons: import("..").UiComponent<z.ZodObject<{
20
+ buttons: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
21
+ label: string;
22
+ action?: {
23
+ type: "open_url";
24
+ url: string;
25
+ } | {
26
+ type: "continue_conversation";
27
+ context?: string | undefined;
28
+ } | {
29
+ type: string;
30
+ params?: Record<string, any> | undefined;
31
+ } | undefined;
32
+ variant?: "primary" | "secondary" | undefined;
33
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
34
+ label: string;
35
+ action?: {
36
+ type: "open_url";
37
+ url: string;
38
+ } | {
39
+ type: "continue_conversation";
40
+ context?: string | undefined;
41
+ } | {
42
+ type: string;
43
+ params?: Record<string, any> | undefined;
44
+ } | undefined;
45
+ variant?: "primary" | "secondary" | undefined;
46
+ }>, unknown>>>;
47
+ }, z.core.$strip>>;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const Bar: import("..").UiComponent<z.ZodObject<{
3
+ label: z.ZodString;
4
+ value: z.ZodNumber;
5
+ display: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>>;
7
+ export declare const BarChart: import("..").UiComponent<z.ZodObject<{
8
+ title: z.ZodString;
9
+ bars: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
10
+ label: string;
11
+ value: number;
12
+ display?: string | undefined;
13
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
14
+ label: string;
15
+ value: number;
16
+ display?: string | undefined;
17
+ }>, unknown>>>;
18
+ tone: z.ZodOptional<z.ZodEnum<{
19
+ neutral: "neutral";
20
+ positive: "positive";
21
+ negative: "negative";
22
+ }>>;
23
+ }, z.core.$strip>>;
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ export declare const Option: import("..").UiComponent<z.ZodObject<{
3
+ id: z.ZodString;
4
+ label: z.ZodString;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>>;
7
+ export declare const Question: import("..").UiComponent<z.ZodObject<{
8
+ id: z.ZodString;
9
+ title: z.ZodString;
10
+ options: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
11
+ id: string;
12
+ label: string;
13
+ description?: string | undefined;
14
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
15
+ id: string;
16
+ label: string;
17
+ description?: string | undefined;
18
+ }>, unknown>>>;
19
+ multiple: z.ZodOptional<z.ZodBoolean>;
20
+ }, z.core.$strip>>;
21
+ export declare const Questions: import("..").UiComponent<z.ZodObject<{
22
+ requestId: z.ZodString;
23
+ questions: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
24
+ id: string;
25
+ title: string;
26
+ options: import("@openuidev/lang-core").SubComponentOf<{
27
+ id: string;
28
+ label: string;
29
+ description?: string | undefined;
30
+ }>[];
31
+ multiple?: boolean | undefined;
32
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
33
+ id: string;
34
+ title: string;
35
+ options: import("@openuidev/lang-core").SubComponentOf<{
36
+ id: string;
37
+ label: string;
38
+ description?: string | undefined;
39
+ }>[];
40
+ multiple?: boolean | undefined;
41
+ }>, unknown>>>;
42
+ }, z.core.$strip>>;
43
+ export declare const FileCard: import("..").UiComponent<z.ZodObject<{
44
+ vaultRef: z.ZodString;
45
+ name: z.ZodString;
46
+ }, z.core.$strip>>;
47
+ export declare const Citation: import("..").UiComponent<z.ZodObject<{
48
+ ref: z.ZodString;
49
+ label: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strip>>;
51
+ export declare const Image: import("..").UiComponent<z.ZodObject<{
52
+ src: z.ZodString;
53
+ alt: z.ZodString;
54
+ caption: z.ZodOptional<z.ZodString>;
55
+ }, z.core.$strip>>;
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export declare const Metric: import("..").UiComponent<z.ZodObject<{
3
+ label: z.ZodString;
4
+ value: z.ZodString;
5
+ delta: z.ZodOptional<z.ZodString>;
6
+ tone: z.ZodOptional<z.ZodEnum<{
7
+ neutral: "neutral";
8
+ positive: "positive";
9
+ negative: "negative";
10
+ }>>;
11
+ }, z.core.$strip>>;
12
+ export declare const Col: import("..").UiComponent<z.ZodObject<{
13
+ label: z.ZodString;
14
+ values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
15
+ align: z.ZodOptional<z.ZodEnum<{
16
+ left: "left";
17
+ right: "right";
18
+ }>>;
19
+ }, z.core.$strip>>;
20
+ export declare const Table: import("..").UiComponent<z.ZodObject<{
21
+ columns: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
22
+ label: string;
23
+ values: (string | number)[];
24
+ align?: "left" | "right" | undefined;
25
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
26
+ label: string;
27
+ values: (string | number)[];
28
+ align?: "left" | "right" | undefined;
29
+ }>, unknown>>>;
30
+ caption: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>>;
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ export declare const Input: import("..").UiComponent<z.ZodObject<{
3
+ name: z.ZodString;
4
+ label: z.ZodString;
5
+ placeholder: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>>;
7
+ export declare const Select: import("..").UiComponent<z.ZodObject<{
8
+ name: z.ZodString;
9
+ label: z.ZodString;
10
+ options: z.ZodArray<z.ZodString>;
11
+ }, z.core.$strip>>;
12
+ export declare const Checkbox: import("..").UiComponent<z.ZodObject<{
13
+ name: z.ZodString;
14
+ label: z.ZodString;
15
+ }, z.core.$strip>>;
16
+ export declare const Form: import("..").UiComponent<z.ZodObject<{
17
+ name: z.ZodString;
18
+ fields: z.ZodArray<z.ZodUnion<readonly [z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
19
+ name: string;
20
+ label: string;
21
+ placeholder?: string | undefined;
22
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
23
+ name: string;
24
+ label: string;
25
+ placeholder?: string | undefined;
26
+ }>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
27
+ name: string;
28
+ label: string;
29
+ options: string[];
30
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
31
+ name: string;
32
+ label: string;
33
+ options: string[];
34
+ }>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
35
+ name: string;
36
+ label: string;
37
+ }>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
38
+ name: string;
39
+ label: string;
40
+ }>, unknown>>]>>;
41
+ submitLabel: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strip>>;