create-theokit 1.23.1 → 1.23.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-theokit",
3
- "version": "1.23.1",
3
+ "version": "1.23.2",
4
4
  "type": "module",
5
5
  "description": "Scaffold a new TheoKit project",
6
6
  "license": "Apache-2.0",
@@ -115,6 +115,10 @@ function ProgressDemo({
115
115
  /**
116
116
  * Renders the demo surface for a non-`chat` `mode`, IN PLACE OF the composer. Each interactive demo
117
117
  * completes back to chat via `onComplete` and reports its outcome via `onToast`.
118
+ *
119
+ * The friendly look is the Claude-Code trick: the surface sits in a rounded box with padding, so the GROUP
120
+ * breathes (like the welcome banner) while the menu items inside stay tight — Claude Code doesn't space menu
121
+ * rows either; the box + padding is what makes it feel airy. Restyle the border/padding here to taste.
118
122
  */
119
123
  export function DemoSurface({
120
124
  mode,
@@ -129,53 +133,61 @@ export function DemoSurface({
129
133
  onComplete: () => void
130
134
  onToast: (t: ToastPayload) => void
131
135
  }): ReactElement {
132
- switch (mode) {
133
- case 'plan':
134
- return (
135
- <PlanApproval
136
- plan={DEMO_PLAN}
137
- onDecision={(d) => {
138
- onComplete()
139
- onToast({
140
- message:
141
- d.kind === 'approve'
142
- ? 'Plan approved'
143
- : `Revision requested${d.feedback ? `: ${d.feedback}` : ''}`,
144
- variant: 'success',
145
- })
146
- }}
147
- />
148
- )
149
- case 'ask':
150
- return (
151
- <QuestionPrompt
152
- header="Backend"
153
- question="Which backend should the app ship next to?"
154
- options={DEMO_ASK_OPTIONS}
155
- allowFreeText
156
- onAnswer={(a) => {
157
- onComplete()
158
- onToast({
159
- message: `Answered: ${a.values.join(', ')}${a.text ? ` (${a.text})` : ''}`,
160
- variant: 'info',
161
- })
162
- }}
163
- />
164
- )
165
- case 'select':
166
- return (
167
- <SelectList
168
- items={DEMO_SELECT_ITEMS}
169
- multi
170
- onSubmit={(values) => {
171
- onComplete()
172
- onToast({ message: `Selected: ${values.join(', ') || '(none)'}`, variant: 'info' })
173
- }}
174
- />
175
- )
176
- case 'progress':
177
- return (
178
- <ProgressDemo elapsed={elapsed} tokens={tokens} onComplete={onComplete} onToast={onToast} />
179
- )
180
- }
136
+ const body = ((): ReactElement => {
137
+ switch (mode) {
138
+ case 'plan':
139
+ return (
140
+ <PlanApproval
141
+ plan={DEMO_PLAN}
142
+ onDecision={(d) => {
143
+ onComplete()
144
+ onToast({
145
+ message:
146
+ d.kind === 'approve'
147
+ ? 'Plan approved'
148
+ : `Revision requested${d.feedback ? `: ${d.feedback}` : ''}`,
149
+ variant: 'success',
150
+ })
151
+ }}
152
+ />
153
+ )
154
+ case 'ask':
155
+ return (
156
+ <QuestionPrompt
157
+ header="Backend"
158
+ question="Which backend should the app ship next to?"
159
+ options={DEMO_ASK_OPTIONS}
160
+ allowFreeText
161
+ onAnswer={(a) => {
162
+ onComplete()
163
+ onToast({
164
+ message: `Answered: ${a.values.join(', ')}${a.text ? ` (${a.text})` : ''}`,
165
+ variant: 'info',
166
+ })
167
+ }}
168
+ />
169
+ )
170
+ case 'select':
171
+ return (
172
+ <SelectList
173
+ items={DEMO_SELECT_ITEMS}
174
+ multi
175
+ onSubmit={(values) => {
176
+ onComplete()
177
+ onToast({ message: `Selected: ${values.join(', ') || '(none)'}`, variant: 'info' })
178
+ }}
179
+ />
180
+ )
181
+ case 'progress':
182
+ return (
183
+ <ProgressDemo elapsed={elapsed} tokens={tokens} onComplete={onComplete} onToast={onToast} />
184
+ )
185
+ }
186
+ })()
187
+
188
+ return (
189
+ <Box flexDirection="column" borderStyle="round" paddingX={2} paddingY={1}>
190
+ {body}
191
+ </Box>
192
+ )
181
193
  }