@joplo-app/core 0.1.3 → 0.2.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/dist/catalog.d.ts +1 -1
- package/dist/catalog.js +112 -105
- package/dist/compile.d.ts +2 -0
- package/dist/compile.js +109 -50
- package/dist/guide.d.ts +7 -7
- package/dist/guide.js +347 -296
- package/dist/load.js +5 -5
- package/dist/player.d.ts +39 -1
- package/dist/player.js +104 -19
- package/dist/schema.d.ts +181 -2
- package/dist/schema.js +25 -6
- package/dist/validate.js +34 -34
- package/package.json +2 -2
package/dist/catalog.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* (packages/core/test/catalog.test.ts 与渲染器的类型检查保证)。目录之外的名称在编译时报错,不会被静默渲染。
|
|
7
7
|
* 只换词汇,不换渲染:运行时不引入 Mantine,仍由 Joplo 渲染成低保真风格。
|
|
8
8
|
*/
|
|
9
|
-
export declare const COMPONENT_TYPES: readonly ["AppShell", "AppShell.Header", "AppShell.Navbar", "AppShell.Main", "AppShell.Aside", "AppShell.Footer", "Container", "Stack", "Group", "Flex", "Grid", "Grid.Col", "SimpleGrid", "Center", "Box", "Space", "Paper", "Card", "Card.Section", "Divider", "ScrollArea", "Title", "Text", "Code", "Kbd", "Blockquote", "List", "List.Item", "Badge", "Avatar", "Image", "ThemeIcon", "Indicator", "Timeline", "Timeline.Item", "Table", "Table.Thead", "Table.Tbody", "Table.Tr", "Table.Th", "Table.Td", "DataTable", "Accordion", "Accordion.Item", "Accordion.Panel", "Radio", "Tabs.List", "Tabs.Panel", "Breadcrumbs", "Stepper", "Stepper.Step", "Alert", "Loader", "Progress", "RingProgress", "Skeleton", "Notification", "Modal", "Drawer", "ChatMessage", "ToolCall", "Terminal", "Terminal.Command", "Terminal.Output", "Phone", "Diagram", "Diagram.Group", "Diagram.Node", "Diagram.Edge", "div", "span", "p", "h1", "h2", "h3", "h4", "main", "section", "header", "footer", "nav", "aside", "ul", "ol", "li", "strong", "em", "small", "code", "Placeholder", "Custom", "#text", "Button", "ActionIcon", "CloseButton", "Anchor", "a", "NavLink", "Burger", "TextInput", "PasswordInput", "NumberInput", "Textarea", "Select", "MultiSelect", "Checkbox", "Radio.Group", "Switch", "SegmentedControl", "FileInput", "Tabs", "Tabs.Tab", "Accordion.Control", "Pagination", "PromptInput", "Terminal.Input"];
|
|
9
|
+
export declare const COMPONENT_TYPES: readonly ["AppShell", "AppShell.Header", "AppShell.Navbar", "AppShell.Main", "AppShell.Aside", "AppShell.Footer", "Container", "Stack", "Group", "Flex", "Grid", "Grid.Col", "SimpleGrid", "Center", "Box", "Space", "Paper", "Card", "Card.Section", "Divider", "ScrollArea", "Title", "Text", "Code", "Kbd", "Blockquote", "List", "List.Item", "Badge", "Avatar", "Image", "ThemeIcon", "Indicator", "Timeline", "Timeline.Item", "Table", "Table.Thead", "Table.Tbody", "Table.Tr", "Table.Th", "Table.Td", "DataTable", "Accordion", "Accordion.Item", "Accordion.Panel", "Radio", "Tabs.List", "Tabs.Panel", "Breadcrumbs", "Stepper", "Stepper.Step", "Alert", "Loader", "Progress", "RingProgress", "Skeleton", "Notification", "Modal", "Drawer", "ChatMessage", "ToolCall", "Thinking", "Artifact", "Email", "DataCard", "StateFlow", "Terminal", "Terminal.Command", "Terminal.Output", "Phone", "Diagram", "Diagram.Group", "Diagram.Node", "Diagram.Edge", "div", "span", "p", "h1", "h2", "h3", "h4", "main", "section", "header", "footer", "nav", "aside", "ul", "ol", "li", "strong", "em", "small", "code", "Placeholder", "Custom", "#text", "Button", "ActionIcon", "CloseButton", "Anchor", "a", "NavLink", "Burger", "TextInput", "PasswordInput", "NumberInput", "Textarea", "Select", "MultiSelect", "Checkbox", "Radio.Group", "Switch", "SegmentedControl", "FileInput", "Tabs", "Tabs.Tab", "Accordion.Control", "Pagination", "PromptInput", "Terminal.Input", "Artifact.Ref"];
|
|
10
10
|
export type ComponentType = (typeof COMPONENT_TYPES)[number];
|
|
11
11
|
export declare const INTERACTIVE_TYPES: ReadonlySet<string>;
|
|
12
12
|
/** 可接收输入值;type/select/toggle 动作写入 state.inputs[nodeId]。 */
|
package/dist/catalog.js
CHANGED
|
@@ -23,7 +23,7 @@ const STRUCTURE = [
|
|
|
23
23
|
// 反馈与浮层
|
|
24
24
|
'Alert', 'Loader', 'Progress', 'RingProgress', 'Skeleton', 'Notification', 'Modal', 'Drawer',
|
|
25
25
|
// AI 交互(Joplo 自有)
|
|
26
|
-
'ChatMessage', 'ToolCall',
|
|
26
|
+
'ChatMessage', 'ToolCall', 'Thinking', 'Artifact', 'Email', 'DataCard', 'StateFlow',
|
|
27
27
|
// 设备外框(Joplo 自有):终端与手机
|
|
28
28
|
'Terminal', 'Terminal.Command', 'Terminal.Output', 'Phone',
|
|
29
29
|
// 架构图(Joplo 自有,D41):节点与连线的 state 绑定 $.ui,由 flow 步骤驱动
|
|
@@ -40,6 +40,7 @@ const INTERACTIVE = [
|
|
|
40
40
|
'Button', 'ActionIcon', 'CloseButton', 'Anchor', 'a', 'NavLink', 'Burger',
|
|
41
41
|
'TextInput', 'PasswordInput', 'NumberInput', 'Textarea', 'Select', 'MultiSelect', 'Checkbox', 'Radio.Group', 'Switch',
|
|
42
42
|
'SegmentedControl', 'FileInput', 'Tabs', 'Tabs.Tab', 'Accordion.Control', 'Pagination', 'PromptInput', 'Terminal.Input',
|
|
43
|
+
'Artifact.Ref',
|
|
43
44
|
];
|
|
44
45
|
export const COMPONENT_TYPES = [...STRUCTURE, ...INTERACTIVE];
|
|
45
46
|
export const INTERACTIVE_TYPES = new Set(INTERACTIVE);
|
|
@@ -58,122 +59,128 @@ export const JOPLO_PROPS = ['id', 'when', 'disabledReason', 'unmodeled', 'note']
|
|
|
58
59
|
* 响应式写成 { base, xs, sm, md, lg, xl };visibleFrom / hiddenFrom;以及 Joplo 属性 id/when/disabled/disabledReason/unmodeled/note。
|
|
59
60
|
*/
|
|
60
61
|
export const COMPONENT_DOCS = {
|
|
61
|
-
AppShell: 'header={{ height }}, navbar={{ width, breakpoint, collapsed: { mobile, desktop } }}, aside={{ width, breakpoint, collapsed }}, footer={{ height }}, padding
|
|
62
|
-
'AppShell.Header': '
|
|
63
|
-
'AppShell.Navbar': '
|
|
64
|
-
'AppShell.Main': '
|
|
65
|
-
'AppShell.Aside': '
|
|
66
|
-
'AppShell.Footer': '
|
|
67
|
-
Container: 'size: xs|sm|md|lg|xl|number
|
|
68
|
-
Stack: 'gap
|
|
69
|
-
Group: 'gap
|
|
70
|
-
Flex: 'direction, gap, rowGap, columnGap, align, justify, wrap
|
|
71
|
-
Grid: 'columns
|
|
62
|
+
AppShell: 'header={{ height }}, navbar={{ width, breakpoint, collapsed: { mobile, desktop } }}, aside={{ width, breakpoint, collapsed }}, footer={{ height }}, padding; navigation collapses below breakpoint and shows Burger',
|
|
63
|
+
'AppShell.Header': 'Header; p, px',
|
|
64
|
+
'AppShell.Navbar': 'Navigation sidebar; p; contains NavLink',
|
|
65
|
+
'AppShell.Main': 'Main content; contains <Outlet />',
|
|
66
|
+
'AppShell.Aside': 'Right sidebar; p',
|
|
67
|
+
'AppShell.Footer': 'Footer; p',
|
|
68
|
+
Container: 'size: xs|sm|md|lg|xl|number (default md), fluid',
|
|
69
|
+
Stack: 'gap (default md), align, justify; vertical layout',
|
|
70
|
+
Group: 'gap (default md), justify, align (default center), wrap, grow; horizontal layout',
|
|
71
|
+
Flex: 'direction, gap, rowGap, columnGap, align, justify, wrap; all responsive',
|
|
72
|
+
Grid: 'columns (default 12), gutter, justify, align, grow; Grid.Col children',
|
|
72
73
|
'Grid.Col': 'span: number|"auto"|"content"|{ base, md }, offset',
|
|
73
74
|
SimpleGrid: 'cols={{ base: 1, md: 3 }}, spacing, verticalSpacing',
|
|
74
|
-
Center: 'inline
|
|
75
|
-
Box: '
|
|
76
|
-
Space: 'h, w
|
|
75
|
+
Center: 'inline; centers content',
|
|
76
|
+
Box: 'Generic container; style props only',
|
|
77
|
+
Space: 'h, w; blank space',
|
|
77
78
|
Paper: 'p, withBorder, shadow, radius',
|
|
78
|
-
Card: 'padding
|
|
79
|
+
Card: 'padding (default md), withBorder, shadow, radius; Card.Section for edge-to-edge sections',
|
|
79
80
|
'Card.Section': 'withBorder, inheritPadding',
|
|
80
81
|
Divider: 'label, labelPosition: left|center|right, orientation, my',
|
|
81
82
|
ScrollArea: 'h, mah',
|
|
82
|
-
Title: 'order: 1-6
|
|
83
|
-
Text: 'size: xs|sm|md|lg|xl, c: dimmed|red|green|…, fw, ta, truncate, lineClamp, span
|
|
84
|
-
Code: 'block
|
|
85
|
-
Kbd: '
|
|
83
|
+
Title: 'order: 1-6; text in children',
|
|
84
|
+
Text: 'size: xs|sm|md|lg|xl, c: dimmed|red|green|…, fw, ta, truncate, lineClamp, span; preserves newlines',
|
|
85
|
+
Code: 'block (multiline code block), color',
|
|
86
|
+
Kbd: 'Keyboard key',
|
|
86
87
|
Blockquote: 'cite, color',
|
|
87
|
-
List: 'type: ordered|unordered, spacing
|
|
88
|
-
'List.Item': '
|
|
88
|
+
List: 'type: ordered|unordered, spacing; List.Item children',
|
|
89
|
+
'List.Item': 'List item',
|
|
89
90
|
Badge: 'color, variant: filled|light|outline|dot|default, size',
|
|
90
|
-
Avatar: 'name
|
|
91
|
-
Image: 'src, alt, h, w, radius
|
|
92
|
-
ThemeIcon: 'color, variant, size, radius
|
|
93
|
-
Indicator: 'label, color, disabled
|
|
94
|
-
Timeline: 'active
|
|
95
|
-
'Timeline.Item': 'title, bullet
|
|
96
|
-
Table: 'data={{ head: [...], body: [[...]] }}
|
|
97
|
-
'Table.Thead': '
|
|
98
|
-
'Table.Tbody': '
|
|
99
|
-
'Table.Tr': '
|
|
100
|
-
'Table.Th': '
|
|
101
|
-
'Table.Td': '
|
|
102
|
-
DataTable: 'records
|
|
103
|
-
Accordion: 'value / defaultValue
|
|
104
|
-
'Accordion.Item': 'value
|
|
105
|
-
'Accordion.Panel': '
|
|
106
|
-
Radio: 'value, label
|
|
107
|
-
'Tabs.List': '
|
|
108
|
-
'Tabs.Panel': 'value
|
|
109
|
-
Breadcrumbs: 'separator
|
|
110
|
-
Stepper: 'active
|
|
111
|
-
'Stepper.Step': 'label, description
|
|
112
|
-
Alert: 'title, color
|
|
113
|
-
Loader: 'size, color, type
|
|
91
|
+
Avatar: 'name (shows first character), src, color, radius, size',
|
|
92
|
+
Image: 'src, alt, h, w, radius; renders a placeholder with alt',
|
|
93
|
+
ThemeIcon: 'color, variant, size, radius; one character as child',
|
|
94
|
+
Indicator: 'label, color, disabled; wraps one element with a corner badge',
|
|
95
|
+
Timeline: 'active (completed item index), bulletSize; Timeline.Item children',
|
|
96
|
+
'Timeline.Item': 'title, bullet; description in children',
|
|
97
|
+
Table: 'data={{ head: [...], body: [[...]] }} or Table.Thead/Tbody/Tr/Th/Td; striped, withTableBorder',
|
|
98
|
+
'Table.Thead': 'Table head',
|
|
99
|
+
'Table.Tbody': 'Table body',
|
|
100
|
+
'Table.Tr': 'Row',
|
|
101
|
+
'Table.Th': 'Header cell',
|
|
102
|
+
'Table.Td': 'Cell',
|
|
103
|
+
DataTable: 'records (can bind $.data.x), columns: [{ accessor, title }], noRecordsText; matches mantine-datatable',
|
|
104
|
+
Accordion: 'value / defaultValue (expanded item); select sets the expanded item; Accordion.Item children',
|
|
105
|
+
'Accordion.Item': 'value; contains Accordion.Control and Accordion.Panel',
|
|
106
|
+
'Accordion.Panel': 'Content shown when expanded',
|
|
107
|
+
Radio: 'value, label; place inside Radio.Group',
|
|
108
|
+
'Tabs.List': 'Tab bar; contains Tabs.Tab',
|
|
109
|
+
'Tabs.Panel': 'value; current tab content',
|
|
110
|
+
Breadcrumbs: 'separator; Anchor or text children',
|
|
111
|
+
Stepper: 'active (zero-based); Stepper.Step children',
|
|
112
|
+
'Stepper.Step': 'label, description; step content in children (only current step shown)',
|
|
113
|
+
Alert: 'title, color (default blue), variant; description in children',
|
|
114
|
+
Loader: 'size, color, type; optional child text',
|
|
114
115
|
Progress: 'value 0-100, color, size, striped',
|
|
115
116
|
RingProgress: 'sections: [{ value, color }], label, size, thickness',
|
|
116
117
|
Skeleton: 'h, w, circle, radius, visible',
|
|
117
|
-
Notification: 'title, color, loading, withCloseButton
|
|
118
|
-
Modal: 'opened
|
|
119
|
-
Drawer: 'opened
|
|
120
|
-
ChatMessage: "from: 'user'|'assistant', name
|
|
121
|
-
ToolCall: "title, state: 'running'|'done'|'error'
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
'Terminal.Command
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
118
|
+
Notification: 'title, color, loading, withCloseButton; inline notification (use step toast for temporary messages)',
|
|
119
|
+
Modal: 'opened (gated, usually opened={$.ui.open}), title, size, centered, fullScreen',
|
|
120
|
+
Drawer: 'opened (gated), title, position: left|right|top|bottom (default left), size',
|
|
121
|
+
ChatMessage: "from: 'user'|'assistant', name; message content in children (preserves newlines)",
|
|
122
|
+
ToolCall: "title, state: 'running'|'done'|'error'; call details in children",
|
|
123
|
+
Email: 'from, to, subject, time; simple email card, body in children; can contain Button',
|
|
124
|
+
DataCard: 'title, value (object or state binding), fields?: [{ key, label }]; lists all keys by default; rows changed this step show old value → new value',
|
|
125
|
+
StateFlow: 'value (current state binding), states: string[], labels?: { state: name }; earlier states are completed, current state highlighted',
|
|
126
|
+
Thinking: 'title (current thought; can bind $.ui.x), active (thinking: title pulses), duration (shows "Thought for …" when finished), opened (expands the process); thinking process in children',
|
|
127
|
+
Artifact: "title, kind: 'doc'|'code'|'sheet'|'web'|'image', status: 'generating'|'ready'|'error', version; Agent artifact side panel, content in children",
|
|
128
|
+
Terminal: 'title; terminal window (CLI prototype), Terminal.Command / Terminal.Output / Terminal.Input children; scrolls internally when content exceeds h or mah',
|
|
129
|
+
Diagram: "direction: 'right'|'down' (default right), h (height, default 420); architecture diagram with Diagram.Group / Diagram.Node / Diagram.Edge children; automatic deterministic layout (state changes do not move nodes); scales the whole diagram to fit without scrolling; inspect details with shared demo zoom/pan (wheel / pinch / drag) or shots; orthogonal edges with port and parallel segment spacing ≥ 10px; a shot of 2+ nodes (or one edge) in the same diagram centers them in a compact focused subgraph; use direction='down' for many nodes in limited width. Progressive reveal: set when={$.ui.x} on Group / Node / Edge and set true in flow (layout precomputed from all elements, existing elements stay fixed); describe calls with step trace(), which derives node/edge state",
|
|
130
|
+
'Diagram.Group': 'label; titled group box with Diagram.Node or nested Diagram.Group children',
|
|
131
|
+
'Diagram.Node': "id (required for edges and trace), label, description (small second line), kind: 'client'|'service'|'model'|'database'|'queue'|'storage'|'external'|'tool'|'user', optional state: 'idle'|'active'|'ok'|'error'|'dim'; omitted state is derived from step trace(); explicit state overrides it",
|
|
132
|
+
'Diagram.Edge': "from, to (Node ids in the same Diagram), label, async (dashed), optional state: 'idle'|'active'|'ok'|'error'|'dim'; id defaults to \"from->to\". Use trace('app', 'biz') in steps (this edge becomes active, then ok), trace.fail(...) (error), trace.skip(...) (dim), without manual state; for multiple edges in the same direction use trace('edge_id')",
|
|
133
|
+
'Terminal.Command': 'prompt (default "$"); command text in children',
|
|
134
|
+
'Terminal.Output': "tone: 'plain'|'ok'|'warn'|'error' (default plain); output text in children (preserves newlines)",
|
|
135
|
+
Phone: 'scale (visual scale, default 1), h (screen height, default 844); phone frame, children laid out at mobile width 390 with breakpoints based on that width; viewport: "mobile" on a page adds it automatically; do not add Phone explicitly',
|
|
136
|
+
div: 'HTML fallback; prefer Box/Stack/Group',
|
|
137
|
+
span: 'HTML fallback; prefer Text span',
|
|
138
|
+
p: 'HTML fallback; prefer Text',
|
|
139
|
+
h1: 'HTML fallback; prefer Title order={1}',
|
|
140
|
+
h2: 'HTML fallback; prefer Title order={2}',
|
|
141
|
+
h3: 'HTML fallback; prefer Title order={3}',
|
|
142
|
+
h4: 'HTML fallback; prefer Title order={4}',
|
|
143
|
+
main: 'HTML fallback; prefer AppShell.Main',
|
|
144
|
+
section: 'HTML fallback; prefer Box',
|
|
145
|
+
header: 'HTML fallback; prefer AppShell.Header',
|
|
146
|
+
footer: 'HTML fallback; prefer AppShell.Footer',
|
|
147
|
+
nav: 'HTML fallback; prefer AppShell.Navbar',
|
|
148
|
+
aside: 'HTML fallback; prefer AppShell.Aside',
|
|
149
|
+
ul: 'HTML fallback; prefer List',
|
|
150
|
+
ol: 'HTML fallback; prefer List type="ordered"',
|
|
151
|
+
li: 'HTML fallback; prefer List.Item',
|
|
152
|
+
strong: 'HTML fallback; prefer Text fw={700} span',
|
|
153
|
+
em: 'HTML fallback; prefer Text fs="italic" span',
|
|
154
|
+
small: 'HTML fallback; prefer Text size="xs"',
|
|
155
|
+
code: 'HTML fallback; prefer Code',
|
|
156
|
+
Placeholder: 'label, h; placeholder for images, charts, etc.',
|
|
157
|
+
Custom: 'kind; component absent from the catalog, rendered as a labeled placeholder box',
|
|
158
|
+
'#text': 'Compiler-generated text node (do not use directly)',
|
|
159
|
+
Button: 'variant: filled|light|outline|subtle|default|white, color, size, fullWidth, loading, leftSection (character)',
|
|
160
|
+
ActionIcon: "Icon button: aria-label (required as name), variant, color, size; one character child such as '+'",
|
|
155
161
|
CloseButton: 'aria-label, size',
|
|
156
|
-
Anchor: 'href
|
|
157
|
-
a: 'HTML
|
|
158
|
-
NavLink: 'label, description, href
|
|
159
|
-
Burger: 'opened, aria-label
|
|
160
|
-
TextInput: 'label, placeholder, description, error, withAsterisk, type
|
|
161
|
-
PasswordInput: 'label, placeholder, description, error
|
|
162
|
-
NumberInput: 'label, placeholder, min, max, suffix, prefix
|
|
163
|
-
Textarea: 'label, placeholder, description, error, minRows, autosize
|
|
164
|
-
Select: 'label, data: string[] | { value, label }[], placeholder, description
|
|
165
|
-
MultiSelect: 'label, data, placeholder
|
|
166
|
-
Checkbox: 'label, description, checked
|
|
167
|
-
'Radio.Group': 'label, value
|
|
168
|
-
Switch: 'label, description, checked
|
|
169
|
-
SegmentedControl: 'data: string[] | { value, label }[], fullWidth
|
|
170
|
-
FileInput: 'label, placeholder, accept
|
|
171
|
-
Tabs: 'value / defaultValue
|
|
172
|
-
'Tabs.Tab': 'value, leftSection
|
|
173
|
-
'Accordion.Control': '
|
|
174
|
-
Pagination: 'total, value / defaultValue
|
|
175
|
-
PromptInput: 'placeholder
|
|
176
|
-
'
|
|
162
|
+
Anchor: 'href is display-only; clicking never navigates; use go() in the step; c, underline',
|
|
163
|
+
a: 'HTML fallback; prefer Anchor',
|
|
164
|
+
NavLink: 'label, description, href (highlighted when equal to current route), active, leftSection (character); nested NavLink allowed',
|
|
165
|
+
Burger: 'opened, aria-label; narrow-screen navigation toggle, usually with hiddenFrom="sm"',
|
|
166
|
+
TextInput: 'label, placeholder, description, error, withAsterisk, type; type action writes the value',
|
|
167
|
+
PasswordInput: 'label, placeholder, description, error; type action writes the value, shown as dots',
|
|
168
|
+
NumberInput: 'label, placeholder, min, max, suffix, prefix; type action writes the value',
|
|
169
|
+
Textarea: 'label, placeholder, description, error, minRows, autosize; type action writes the value',
|
|
170
|
+
Select: 'label, data: string[] | { value, label }[], placeholder, description; select accepts value or label',
|
|
171
|
+
MultiSelect: 'label, data, placeholder; each select toggles one option',
|
|
172
|
+
Checkbox: 'label, description, checked; toggle action writes the value',
|
|
173
|
+
'Radio.Group': 'label, value; Radio value/label children; select accepts value or label',
|
|
174
|
+
Switch: 'label, description, checked; toggle action writes the value',
|
|
175
|
+
SegmentedControl: 'data: string[] | { value, label }[], fullWidth; select accepts value or label',
|
|
176
|
+
FileInput: 'label, placeholder, accept; type action writes the filename',
|
|
177
|
+
Tabs: 'value / defaultValue; Tabs.Tab inside Tabs.List, content in Tabs.Panel; select switches tabs',
|
|
178
|
+
'Tabs.Tab': 'value, leftSection (character)',
|
|
179
|
+
'Accordion.Control': 'Clickable heading (requires id)',
|
|
180
|
+
Pagination: 'total, value / defaultValue; select action writes the page number',
|
|
181
|
+
PromptInput: 'placeholder; AI input, type action writes the value; use ActionIcon or Button to send',
|
|
182
|
+
'Artifact.Ref': "title, kind, status; card linking to an artifact in the conversation (requires id; clickable)",
|
|
183
|
+
'Terminal.Input': 'prompt (default "$"), placeholder; terminal input line (requires id), type action writes the value',
|
|
177
184
|
};
|
|
178
185
|
// ---------- 响应式(Mantine 默认断点,按舞台宽度取值) ----------
|
|
179
186
|
/** Mantine 默认断点:36/48/62/75/88em,按 16px 换算。 */
|
package/dist/compile.d.ts
CHANGED
|
@@ -29,4 +29,6 @@ export type CompileResult = {
|
|
|
29
29
|
diagnostics: Diagnostic[];
|
|
30
30
|
};
|
|
31
31
|
export declare function compile(src: AuthoringProject, mode: 'dev' | 'publish'): CompileResult;
|
|
32
|
+
/** 角色的颜色(D56):没写 color 时按声明顺序取。 */
|
|
33
|
+
export declare const ROLE_COLORS: readonly ["#E8590C", "#1971C2", "#2F9E44", "#9C36B5", "#C2255C", "#0C8599"];
|
|
32
34
|
export declare function relSource(root: string, s: string): string;
|