@toon-ui/core 1.2.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,195 +1,65 @@
1
1
  # @toon-ui/core
2
2
 
3
- `@toon-ui/core` is the server and protocol foundation of ToonUI.
3
+ `@toon-ui/core` is the protocol foundation of ToonUI.
4
4
 
5
- Use it when you need:
5
+ Use it when you need the server model, the central catalog, parsing, validation, or event/message conversion.
6
6
 
7
- - `createToonProtocol()` on the server
8
- - prompt generation
9
- - parsing and validation
10
- - interaction payload formatting
11
- - chat-ready interaction messages
7
+ ## Quick path
12
8
 
13
- ---
14
-
15
- ## Install
16
-
17
- ```bash
18
- pnpm add @toon-ui/core
19
- ```
20
-
21
- ---
9
+ 1. Create a protocol with `createToonProtocol()`.
10
+ 2. Feed `toon.prompt` into your system prompt.
11
+ 3. Use `toon.catalog`, `toon.events`, and `toon.messages` as the public API.
22
12
 
23
13
  ## Main exports
24
14
 
25
15
  - `createToonProtocol()`
26
- - `createToonCoreRuntime()` low-level runtime
16
+ - `createToonCatalog()`
17
+ - `TOON_CATALOG`
27
18
  - `parseToonUI()`
28
19
  - `validateToonUI()`
29
20
  - `extractToonBlocks()`
30
- - `formatReplyMessage()`
31
- - `formatSubmitMessage()`
32
- - `createChatMessage()`
33
- - `createChatUIMessage()`
34
- - `createPrompt()`
21
+ - `toToonEventContent()`
35
22
 
36
- ---
37
-
38
- ## Server integration
39
-
40
- This is the PRIMARY use case.
23
+ ## Recommended server usage
41
24
 
42
25
  ```ts
43
26
  import { createToonProtocol } from '@toon-ui/core';
44
- import { streamText } from 'ai';
45
- import { openai } from '@ai-sdk/openai';
46
27
 
47
28
  const toon = createToonProtocol();
29
+ const system = [toon.prompt, 'Available tools:', '- searchProducts(query)'].join('
48
30
 
49
- const system = [
50
- toon.prompt,
51
- 'Available tools:',
52
- '- searchProducts(query)',
53
- '- createProduct(name, price, stock)',
54
- ].join('\n\n');
55
-
56
- export async function POST(req: Request) {
57
- const { messages } = await req.json();
58
-
59
- const result = streamText({
60
- model: openai('gpt-4.1'),
61
- system,
62
- messages,
63
- tools: {
64
- searchProducts: async ({ query }) => ({ ok: true, query }),
65
- createProduct: async ({ name, price, stock }) => ({ ok: true, name, price, stock }),
66
- },
67
- });
68
-
69
- return result.toUIMessageStreamResponse();
70
- }
31
+ ');
71
32
  ```
72
33
 
73
- What `createToonProtocol()` gives you:
74
-
75
- - `prompt`
76
- - `rules`
77
- - `formatReplyMessage()`
78
- - `formatSubmitMessage()`
79
- - `createChatMessage()`
80
-
81
- ---
82
-
83
- ## Frontend integration
84
-
85
- `@toon-ui/core` is NOT the recommended frontend renderer package.
86
-
87
- Use it on the frontend only if you are building custom tooling or your own renderer.
34
+ ## Public API shape
88
35
 
89
36
  ```ts
90
- import { extractToonBlocks, parseToonUI, validateToonUI } from '@toon-ui/core';
91
-
92
- const blocks = extractToonBlocks(content);
93
- const ast = parseToonUI(blocks[0].raw);
94
- const result = validateToonUI(ast);
95
- ```
96
-
97
- If you want React rendering, use:
98
-
99
- - `@toon-ui/react`
100
- - or `@toon-ui/toon-ui`
101
-
102
- ---
103
-
104
- ## Interaction helpers
105
-
106
- ### `formatReplyMessage()`
107
-
108
- ```ts
109
- import { formatReplyMessage } from '@toon-ui/core';
110
-
111
- const content = formatReplyMessage({
112
- kind: 'ui_reply',
113
- eventId: 'reply_123',
114
- source: 'button',
115
- component: 'button',
116
- value: 'Sí, elimínalo',
117
- });
118
- ```
119
-
120
- ### `formatSubmitMessage()`
121
-
122
- ```ts
123
- import { formatSubmitMessage } from '@toon-ui/core';
124
-
125
- const content = formatSubmitMessage({
126
- kind: 'ui_submit',
127
- eventId: 'submit_123',
128
- source: 'form',
129
- intent: 'create_product',
130
- formTitle: 'Crear producto',
131
- values: { name: 'Coca-Cola', price: 2500 },
132
- });
133
- ```
134
-
135
- ### `createChatMessage()`
37
+ const toon = createToonProtocol();
136
38
 
137
- ```ts
138
- import { createChatMessage } from '@toon-ui/core';
139
-
140
- const message = createChatMessage({
141
- kind: 'ui_reply',
142
- eventId: 'reply_123',
143
- source: 'button',
144
- component: 'button',
145
- value: 'Sí, elimínalo',
146
- });
147
-
148
- console.log(message.content);
149
- console.log(message.displayContent);
39
+ toon.catalog.components.form.syntax;
40
+ toon.events.reply('Open details');
41
+ toon.events.submit('create_product', { name: 'Coca-Cola' });
42
+ toon.messages.toContent(payload);
43
+ toon.messages.toModelMessage(payload);
44
+ toon.messages.toUIMessage(payload);
150
45
  ```
151
46
 
152
- ### `createChatUIMessage()`
47
+ ## Why this shape exists
153
48
 
154
- Useful when your frontend uses `useChat`/`UIMessage`-style state and you need:
49
+ The old flat helpers were technically functional but conceptually noisy.
155
50
 
156
- - model-facing `content` in `parts`
157
- - human-facing `displayContent` in `metadata`
158
-
159
- ```ts
160
- import { createChatUIMessage } from '@toon-ui/core';
161
-
162
- const message = createChatUIMessage({
163
- kind: 'ui_submit',
164
- eventId: 'submit_123',
165
- source: 'form',
166
- intent: 'agregar_cliente',
167
- formTitle: 'Agregar cliente',
168
- values: {
169
- name: 'Jefferson Lopez Mendoza',
170
- email: 'jeffersonlopezmendoza343@gmail.com',
171
- },
172
- });
173
-
174
- console.log(message.parts[0].text); // model content
175
- console.log(message.metadata.displayContent); // human content
176
- ```
51
+ The new model is explicit:
177
52
 
178
- ---
53
+ - `catalog` = language definition
54
+ - `events` = user intent objects
55
+ - `messages` = reinjection into chat state
179
56
 
180
57
  ## Boundary
181
58
 
182
- `@toon-ui/core` owns:
59
+ `@toon-ui/core` does NOT render React.
183
60
 
184
- - grammar
185
- - AST
186
- - validation
187
- - prompts
188
- - interaction protocol
61
+ If you need rendering:
189
62
 
190
- It does NOT own:
63
+ - `@toon-ui/react` for explicit adapters
64
+ - `@toon-ui/toon-ui` for the simplest client path
191
65
 
192
- - React rendering
193
- - backend tools
194
- - persistence
195
- - model orchestration
@@ -0,0 +1,188 @@
1
+ export declare const TOON_COMPONENT_KEYS: readonly ["text", "heading", "separator", "card", "form", "field", "button", "confirm", "list", "item", "badge", "alert", "table", "empty", "tabs", "accordion", "dialog", "sheet", "popover", "tooltip", "progress", "loading", "toast", "breadcrumb", "pagination", "menu", "command", "chart"];
2
+ export declare const TOON_BUTTON_VARIANTS: readonly ["primary", "secondary", "danger", "ghost", "outline"];
3
+ export declare const TOON_BADGE_VARIANTS: readonly ["success", "warning", "danger", "neutral", "info"];
4
+ export declare const TOON_ALERT_VARIANTS: readonly ["info", "success", "warning", "danger"];
5
+ export declare const TOON_CONFIRM_VARIANTS: readonly ["neutral", "info", "warning", "danger", "success"];
6
+ export declare const TOON_FIELD_TYPES: readonly ["text", "email", "number", "password", "date", "time", "textarea", "select", "checkbox", "radio", "switch", "combobox", "otp", "slider", "multiselect"];
7
+ export declare const TOON_CHART_TYPES: readonly ["bar", "line", "area", "pie"];
8
+ export declare const TOON_SHEET_SIDES: readonly ["left", "right", "top", "bottom"];
9
+ export declare const TOON_SEPARATOR_ORIENTATIONS: readonly ["horizontal", "vertical"];
10
+ export declare const TOON_CATALOG: {
11
+ readonly components: {
12
+ readonly text: {
13
+ readonly group: "content";
14
+ readonly syntax: "text \"Visible text\"";
15
+ readonly summary: "Leaf node for visible copy.";
16
+ };
17
+ readonly heading: {
18
+ readonly group: "content";
19
+ readonly syntax: "heading <1-6> \"Visible text\"";
20
+ readonly summary: "Semantic heading for hierarchy.";
21
+ };
22
+ readonly separator: {
23
+ readonly group: "content";
24
+ readonly syntax: "separator OR separator horizontal|vertical";
25
+ readonly summary: "Visual divider between sections.";
26
+ };
27
+ readonly card: {
28
+ readonly group: "structure";
29
+ readonly syntax: "card \"Title\": followed by indented child nodes";
30
+ readonly summary: "General content container.";
31
+ readonly children: readonly ["*"];
32
+ };
33
+ readonly form: {
34
+ readonly group: "capture";
35
+ readonly syntax: "form \"Title\": followed by one or more field nodes and one submit button";
36
+ readonly summary: "Structured data capture block.";
37
+ readonly children: readonly ["field", "button"];
38
+ };
39
+ readonly field: {
40
+ readonly group: "capture";
41
+ readonly syntax: "field <name> <fieldType> \"Label\" [placeholder=\"...\"] [required]";
42
+ readonly summary: "Structured form input primitive.";
43
+ };
44
+ readonly button: {
45
+ readonly group: "capture";
46
+ readonly syntax: "button <variant> \"Label\" reply=\"Value\" OR button <variant> \"Label\" submit";
47
+ readonly summary: "Primary interaction trigger.";
48
+ };
49
+ readonly confirm: {
50
+ readonly group: "capture";
51
+ readonly syntax: "confirm <variant> \"Title\": followed by indented child nodes";
52
+ readonly summary: "Confirmation flow container.";
53
+ readonly children: readonly ["*"];
54
+ };
55
+ readonly list: {
56
+ readonly group: "structure";
57
+ readonly syntax: "list \"Title\": followed only by item nodes";
58
+ readonly summary: "Structured repeated result set.";
59
+ readonly children: readonly ["item"];
60
+ };
61
+ readonly item: {
62
+ readonly group: "structure";
63
+ readonly syntax: "item \"Title\": followed by indented child nodes";
64
+ readonly summary: "Single list entry container.";
65
+ readonly children: readonly ["*"];
66
+ };
67
+ readonly badge: {
68
+ readonly group: "content";
69
+ readonly syntax: "badge \"Label\" <variant>";
70
+ readonly summary: "Short semantic status label.";
71
+ };
72
+ readonly alert: {
73
+ readonly group: "feedback";
74
+ readonly syntax: "alert <variant> \"Title\": followed by indented child nodes";
75
+ readonly summary: "Callout block for important state.";
76
+ readonly children: readonly ["*"];
77
+ };
78
+ readonly table: {
79
+ readonly group: "structure";
80
+ readonly syntax: "table \"Title\": followed by columns: ... and one or more row: ... lines";
81
+ readonly summary: "Precise tabular data.";
82
+ readonly children: readonly ["columns", "row"];
83
+ };
84
+ readonly empty: {
85
+ readonly group: "feedback";
86
+ readonly syntax: "empty \"Title\": followed by indented child nodes";
87
+ readonly summary: "Zero-result or empty state.";
88
+ readonly children: readonly ["*"];
89
+ };
90
+ readonly tabs: {
91
+ readonly group: "structure";
92
+ readonly syntax: "tabs \"Title\": followed by one or more tab \"Label\": blocks";
93
+ readonly summary: "Parallel grouped views.";
94
+ readonly children: readonly ["tab"];
95
+ };
96
+ readonly accordion: {
97
+ readonly group: "structure";
98
+ readonly syntax: "accordion \"Title\": followed by one or more section \"Title\": blocks";
99
+ readonly summary: "Progressive disclosure container.";
100
+ readonly children: readonly ["section"];
101
+ };
102
+ readonly dialog: {
103
+ readonly group: "overlay";
104
+ readonly syntax: "dialog \"Title\": followed by indented child nodes";
105
+ readonly summary: "Modal interaction container.";
106
+ readonly children: readonly ["*"];
107
+ };
108
+ readonly sheet: {
109
+ readonly group: "overlay";
110
+ readonly syntax: "sheet \"Title\" side=\"left|right|top|bottom\": followed by indented child nodes";
111
+ readonly summary: "Edge-attached contextual panel.";
112
+ readonly children: readonly ["*"];
113
+ };
114
+ readonly popover: {
115
+ readonly group: "overlay";
116
+ readonly syntax: "popover \"Title\": followed by indented child nodes";
117
+ readonly summary: "Inline contextual overlay.";
118
+ readonly children: readonly ["*"];
119
+ };
120
+ readonly tooltip: {
121
+ readonly group: "overlay";
122
+ readonly syntax: "tooltip \"Visible text\"";
123
+ readonly summary: "Short contextual hint.";
124
+ };
125
+ readonly progress: {
126
+ readonly group: "feedback";
127
+ readonly syntax: "progress \"Label\" value=<number> max=<number>";
128
+ readonly summary: "Deterministic progress indicator.";
129
+ };
130
+ readonly loading: {
131
+ readonly group: "feedback";
132
+ readonly syntax: "loading \"Visible text\"";
133
+ readonly summary: "Transient loading feedback.";
134
+ };
135
+ readonly toast: {
136
+ readonly group: "feedback";
137
+ readonly syntax: "toast <variant> \"Visible text\"";
138
+ readonly summary: "Ephemeral result feedback.";
139
+ };
140
+ readonly breadcrumb: {
141
+ readonly group: "navigation";
142
+ readonly syntax: "breadcrumb: followed by one or more crumb \"Label\" [reply=\"...\"] lines";
143
+ readonly summary: "Hierarchical path navigation.";
144
+ readonly children: readonly ["crumb"];
145
+ };
146
+ readonly pagination: {
147
+ readonly group: "navigation";
148
+ readonly syntax: "pagination page=<number> totalPages=<number>";
149
+ readonly summary: "Page navigation state.";
150
+ };
151
+ readonly menu: {
152
+ readonly group: "navigation";
153
+ readonly syntax: "menu \"Title\": followed by one or more action \"Label\" reply=\"...\" or submit lines";
154
+ readonly summary: "Choice list of actions.";
155
+ readonly children: readonly ["action"];
156
+ };
157
+ readonly command: {
158
+ readonly group: "navigation";
159
+ readonly syntax: "command \"Title\": followed by one or more action \"Label\" reply=\"...\" or submit lines";
160
+ readonly summary: "Command palette style action list.";
161
+ readonly children: readonly ["action"];
162
+ };
163
+ readonly chart: {
164
+ readonly group: "analytics";
165
+ readonly syntax: "chart <type> \"Title\": followed by one or more series \"Label\": blocks with point \"Label\" <number> rows";
166
+ readonly summary: "Trend or comparison visualization.";
167
+ readonly children: readonly ["series"];
168
+ };
169
+ };
170
+ readonly variants: {
171
+ readonly button: readonly ["primary", "secondary", "danger", "ghost", "outline"];
172
+ readonly badge: readonly ["success", "warning", "danger", "neutral", "info"];
173
+ readonly alert: readonly ["info", "success", "warning", "danger"];
174
+ readonly confirm: readonly ["neutral", "info", "warning", "danger", "success"];
175
+ readonly field: readonly ["text", "email", "number", "password", "date", "time", "textarea", "select", "checkbox", "radio", "switch", "combobox", "otp", "slider", "multiselect"];
176
+ readonly chart: readonly ["bar", "line", "area", "pie"];
177
+ readonly sheet: readonly ["left", "right", "top", "bottom"];
178
+ readonly separator: readonly ["horizontal", "vertical"];
179
+ };
180
+ readonly examples: {
181
+ readonly valid: readonly [string, string, string, string, string, string, string, "progress \"Inventory sync\" value=65 max=100", "pagination page=2 totalPages=8", string];
182
+ readonly invalid: readonly ["header \"Customer\" -> INVALID because header is not an allowed component", "card: -> INVALID because card requires a quoted title", "badge success \"Customer\" -> INVALID because badge syntax is badge \"Label\" variant", "alert \"Low stock\" -> INVALID because alert requires a variant and nested block", "empty \"No data\" -> INVALID because empty requires a nested block after :", "progress 65 -> INVALID because progress requires a quoted label plus value= and max=", "pagination 2/8 -> INVALID because pagination requires page= and totalPages=", "confirm \"Delete customer?\": -> VALID for backward compatibility, but prefer confirm danger|warning|neutral \"Title\":", "form \"Customer\": with no submit button -> INVALID", "row: May 09, $ 8,155.35, Completed -> RISKY because commas inside values can break the table unless cells are quoted", "\"Do you want me to build a UI for this?\" -> BAD when a form, confirm, table, list, or card is already the obvious best response"];
183
+ };
184
+ };
185
+ export type ToonCatalog = typeof TOON_CATALOG;
186
+ export declare function createToonCatalog(): ToonCatalog;
187
+ export declare function listToonComponentKeys(): Array<(typeof TOON_COMPONENT_KEYS)[number]>;
188
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,mSA6BtB,CAAC;AAEX,eAAO,MAAM,oBAAoB,iEAAkE,CAAC;AACpG,eAAO,MAAM,mBAAmB,8DAA+D,CAAC;AAChG,eAAO,MAAM,mBAAmB,mDAAoD,CAAC;AACrF,eAAO,MAAM,qBAAqB,8DAA+D,CAAC;AAClG,eAAO,MAAM,gBAAgB,mKAgBnB,CAAC;AACX,eAAO,MAAM,gBAAgB,yCAA0C,CAAC;AACxE,eAAO,MAAM,gBAAgB,6CAA8C,CAAC;AAC5E,eAAO,MAAM,2BAA2B,qCAAsC,CAAC;AAE/E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEf,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC;AAE9C,wBAAgB,iBAAiB,IAAI,WAAW,CAE/C;AAED,wBAAgB,qBAAqB,IAAI,KAAK,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,CAEnF"}
@@ -0,0 +1,130 @@
1
+ export const TOON_COMPONENT_KEYS = [
2
+ 'text',
3
+ 'heading',
4
+ 'separator',
5
+ 'card',
6
+ 'form',
7
+ 'field',
8
+ 'button',
9
+ 'confirm',
10
+ 'list',
11
+ 'item',
12
+ 'badge',
13
+ 'alert',
14
+ 'table',
15
+ 'empty',
16
+ 'tabs',
17
+ 'accordion',
18
+ 'dialog',
19
+ 'sheet',
20
+ 'popover',
21
+ 'tooltip',
22
+ 'progress',
23
+ 'loading',
24
+ 'toast',
25
+ 'breadcrumb',
26
+ 'pagination',
27
+ 'menu',
28
+ 'command',
29
+ 'chart',
30
+ ];
31
+ export const TOON_BUTTON_VARIANTS = ['primary', 'secondary', 'danger', 'ghost', 'outline'];
32
+ export const TOON_BADGE_VARIANTS = ['success', 'warning', 'danger', 'neutral', 'info'];
33
+ export const TOON_ALERT_VARIANTS = ['info', 'success', 'warning', 'danger'];
34
+ export const TOON_CONFIRM_VARIANTS = ['neutral', 'info', 'warning', 'danger', 'success'];
35
+ export const TOON_FIELD_TYPES = [
36
+ 'text',
37
+ 'email',
38
+ 'number',
39
+ 'password',
40
+ 'date',
41
+ 'time',
42
+ 'textarea',
43
+ 'select',
44
+ 'checkbox',
45
+ 'radio',
46
+ 'switch',
47
+ 'combobox',
48
+ 'otp',
49
+ 'slider',
50
+ 'multiselect',
51
+ ];
52
+ export const TOON_CHART_TYPES = ['bar', 'line', 'area', 'pie'];
53
+ export const TOON_SHEET_SIDES = ['left', 'right', 'top', 'bottom'];
54
+ export const TOON_SEPARATOR_ORIENTATIONS = ['horizontal', 'vertical'];
55
+ export const TOON_CATALOG = {
56
+ components: {
57
+ text: { group: 'content', syntax: 'text "Visible text"', summary: 'Leaf node for visible copy.' },
58
+ heading: { group: 'content', syntax: 'heading <1-6> "Visible text"', summary: 'Semantic heading for hierarchy.' },
59
+ separator: { group: 'content', syntax: 'separator OR separator horizontal|vertical', summary: 'Visual divider between sections.' },
60
+ card: { group: 'structure', syntax: 'card "Title": followed by indented child nodes', summary: 'General content container.', children: ['*'] },
61
+ form: { group: 'capture', syntax: 'form "Title": followed by one or more field nodes and one submit button', summary: 'Structured data capture block.', children: ['field', 'button'] },
62
+ field: { group: 'capture', syntax: 'field <name> <fieldType> "Label" [placeholder="..."] [required]', summary: 'Structured form input primitive.' },
63
+ button: { group: 'capture', syntax: 'button <variant> "Label" reply="Value" OR button <variant> "Label" submit', summary: 'Primary interaction trigger.' },
64
+ confirm: { group: 'capture', syntax: 'confirm <variant> "Title": followed by indented child nodes', summary: 'Confirmation flow container.', children: ['*'] },
65
+ list: { group: 'structure', syntax: 'list "Title": followed only by item nodes', summary: 'Structured repeated result set.', children: ['item'] },
66
+ item: { group: 'structure', syntax: 'item "Title": followed by indented child nodes', summary: 'Single list entry container.', children: ['*'] },
67
+ badge: { group: 'content', syntax: 'badge "Label" <variant>', summary: 'Short semantic status label.' },
68
+ alert: { group: 'feedback', syntax: 'alert <variant> "Title": followed by indented child nodes', summary: 'Callout block for important state.', children: ['*'] },
69
+ table: { group: 'structure', syntax: 'table "Title": followed by columns: ... and one or more row: ... lines', summary: 'Precise tabular data.', children: ['columns', 'row'] },
70
+ empty: { group: 'feedback', syntax: 'empty "Title": followed by indented child nodes', summary: 'Zero-result or empty state.', children: ['*'] },
71
+ tabs: { group: 'structure', syntax: 'tabs "Title": followed by one or more tab "Label": blocks', summary: 'Parallel grouped views.', children: ['tab'] },
72
+ accordion: { group: 'structure', syntax: 'accordion "Title": followed by one or more section "Title": blocks', summary: 'Progressive disclosure container.', children: ['section'] },
73
+ dialog: { group: 'overlay', syntax: 'dialog "Title": followed by indented child nodes', summary: 'Modal interaction container.', children: ['*'] },
74
+ sheet: { group: 'overlay', syntax: 'sheet "Title" side="left|right|top|bottom": followed by indented child nodes', summary: 'Edge-attached contextual panel.', children: ['*'] },
75
+ popover: { group: 'overlay', syntax: 'popover "Title": followed by indented child nodes', summary: 'Inline contextual overlay.', children: ['*'] },
76
+ tooltip: { group: 'overlay', syntax: 'tooltip "Visible text"', summary: 'Short contextual hint.' },
77
+ progress: { group: 'feedback', syntax: 'progress "Label" value=<number> max=<number>', summary: 'Deterministic progress indicator.' },
78
+ loading: { group: 'feedback', syntax: 'loading "Visible text"', summary: 'Transient loading feedback.' },
79
+ toast: { group: 'feedback', syntax: 'toast <variant> "Visible text"', summary: 'Ephemeral result feedback.' },
80
+ breadcrumb: { group: 'navigation', syntax: 'breadcrumb: followed by one or more crumb "Label" [reply="..."] lines', summary: 'Hierarchical path navigation.', children: ['crumb'] },
81
+ pagination: { group: 'navigation', syntax: 'pagination page=<number> totalPages=<number>', summary: 'Page navigation state.' },
82
+ menu: { group: 'navigation', syntax: 'menu "Title": followed by one or more action "Label" reply="..." or submit lines', summary: 'Choice list of actions.', children: ['action'] },
83
+ command: { group: 'navigation', syntax: 'command "Title": followed by one or more action "Label" reply="..." or submit lines', summary: 'Command palette style action list.', children: ['action'] },
84
+ chart: { group: 'analytics', syntax: 'chart <type> "Title": followed by one or more series "Label": blocks with point "Label" <number> rows', summary: 'Trend or comparison visualization.', children: ['series'] },
85
+ },
86
+ variants: {
87
+ button: TOON_BUTTON_VARIANTS,
88
+ badge: TOON_BADGE_VARIANTS,
89
+ alert: TOON_ALERT_VARIANTS,
90
+ confirm: TOON_CONFIRM_VARIANTS,
91
+ field: TOON_FIELD_TYPES,
92
+ chart: TOON_CHART_TYPES,
93
+ sheet: TOON_SHEET_SIDES,
94
+ separator: TOON_SEPARATOR_ORIENTATIONS,
95
+ },
96
+ examples: {
97
+ valid: [
98
+ ['form "Create product":', ' field name text "Name" placeholder="Ex: Coca-Cola" required', ' field price number "Price" placeholder="Ex: 25.50" required', ' button primary "Create product" submit'].join('\n'),
99
+ ['card "Customer found":', ' text "Jefferson Lopez Mendoza"', ' badge "Active" success', ' button secondary "View history" reply="View customer history"'].join('\n'),
100
+ ['confirm danger "Delete customer?":', ' text "This action cannot be undone."', ' button secondary "Cancel" reply="Cancel"', ' button danger "Yes, delete" reply="Yes, delete customer"'].join('\n'),
101
+ ['confirm neutral "Continue with selected customer?":', ' text "We will use this customer for the current sale."', ' button secondary "Cancel" reply="Cancel"', ' button primary "Continue" reply="Continue with selected customer"'].join('\n'),
102
+ ['table "Sales":', ' columns: "Date", "Sale number", "Total", "Status"', ' row: "May 14", "177877222574876", "$ 387.45", "Completed"', ' row: "May 09", "177836532655064", "$ 8,155.35", "Completed"'].join('\n'),
103
+ ['alert warning "Low stock":', ' text "Only 3 units remain in the warehouse."'].join('\n'),
104
+ ['empty "No customers found":', ' text "Try another search term or create a new customer."', ' button secondary "Create customer" reply="Create customer"'].join('\n'),
105
+ 'progress "Inventory sync" value=65 max=100',
106
+ 'pagination page=2 totalPages=8',
107
+ ['chart bar "Weekly sales" x="Day" y="Revenue":', ' series "Store A":', ' point "Mon" 1200', ' point "Tue" 980'].join('\n'),
108
+ ],
109
+ invalid: [
110
+ 'header "Customer" -> INVALID because header is not an allowed component',
111
+ 'card: -> INVALID because card requires a quoted title',
112
+ 'badge success "Customer" -> INVALID because badge syntax is badge "Label" variant',
113
+ 'alert "Low stock" -> INVALID because alert requires a variant and nested block',
114
+ 'empty "No data" -> INVALID because empty requires a nested block after :',
115
+ 'progress 65 -> INVALID because progress requires a quoted label plus value= and max=',
116
+ 'pagination 2/8 -> INVALID because pagination requires page= and totalPages=',
117
+ 'confirm "Delete customer?": -> VALID for backward compatibility, but prefer confirm danger|warning|neutral "Title":',
118
+ 'form "Customer": with no submit button -> INVALID',
119
+ 'row: May 09, $ 8,155.35, Completed -> RISKY because commas inside values can break the table unless cells are quoted',
120
+ '"Do you want me to build a UI for this?" -> BAD when a form, confirm, table, list, or card is already the obvious best response',
121
+ ],
122
+ },
123
+ };
124
+ export function createToonCatalog() {
125
+ return TOON_CATALOG;
126
+ }
127
+ export function listToonComponentKeys() {
128
+ return [...TOON_COMPONENT_KEYS];
129
+ }
130
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,G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AM,UAAU,qBAAqB;IACnC,OAAO,CAAC,GAAG,mBAAmB,CAAC,CAAC;AAClC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ export * from './catalog';
1
2
  export * from './types';
2
3
  export { parseToonUI, ToonSyntaxError } from './parser';
3
4
  export { validateToonUI } from './validator';
4
5
  export { extractToonBlocks } from './formatter';
5
- export { createPrompt, createComponentPrompt, createSyntaxPrompt, createFallbackPrompt, createSafetyPrompt, createExamplesPrompt } from './prompts';
6
- export { createRules, createToonProtocol, createToonCoreRuntime, formatSubmitMessage, formatReplyMessage, createChatMessage, createChatUIMessage } from './runtime';
6
+ export { createPrompt, createComponentPrompt, createSyntaxPrompt, createFallbackPrompt, createSafetyPrompt, createExamplesPrompt, } from './prompts';
7
+ export { createRules, createToonProtocol, createToonCoreRuntime, } from './runtime';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACpJ,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ export * from './catalog';
1
2
  export * from './types';
2
3
  export { parseToonUI, ToonSyntaxError } from './parser';
3
4
  export { validateToonUI } from './validator';
4
5
  export { extractToonBlocks } from './formatter';
5
- export { createPrompt, createComponentPrompt, createSyntaxPrompt, createFallbackPrompt, createSafetyPrompt, createExamplesPrompt } from './prompts';
6
- export { createRules, createToonProtocol, createToonCoreRuntime, formatSubmitMessage, formatReplyMessage, createChatMessage, createChatUIMessage } from './runtime';
6
+ export { createPrompt, createComponentPrompt, createSyntaxPrompt, createFallbackPrompt, createSafetyPrompt, createExamplesPrompt, } from './prompts';
7
+ export { createRules, createToonProtocol, createToonCoreRuntime, } from './runtime';
7
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACpJ,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAmCL,KAAK,YAAY,EACjB,KAAK,aAAa,EAGlB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AAOjB,qBAAa,eAAgB,SAAQ,KAAK;IACxC,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;gBAEH,KAAK,EAAE,eAAe;CAOnC;AAuaD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CA2BxD"}
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AACA,OAAO,EAkCL,KAAK,YAAY,EACjB,KAAK,aAAa,EAGlB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AAOjB,qBAAa,eAAgB,SAAQ,KAAK;IACxC,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;gBAEH,KAAK,EAAE,eAAe;CAOnC;AAuaD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CA2BxD"}
package/dist/parser.js CHANGED
@@ -1,4 +1,4 @@
1
- import { OFFICIAL_COMPONENT_KEYS, } from './types';
1
+ import { TOON_COMPONENT_KEYS as OFFICIAL_COMPONENT_KEYS } from './catalog';
2
2
  export class ToonSyntaxError extends Error {
3
3
  code;
4
4
  line;