Skip to content

Commit f9d7116

Browse files
rsbhclaude
andauthored
chore: upgrade apsara rc.4 → rc.7, fix breaking changes, auto-expand sidebar groups (#70)
* chore: upgrade @raystack/apsara to 1.0.0-rc.5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: upgrade @raystack/apsara to 1.0.0-rc.6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: rename InputField to Input for apsara rc.6 compatibility Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: replace string gap props with numbers for apsara rc.6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update Link to use external prop for apsara rc.6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: upgrade @raystack/apsara to 1.0.0-rc.7 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: auto-open sidebar folder when active page is inside it Uses NodeType constants from tree-utils. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: remove unused apsara re-export wrappers All were pure 'use client' + re-export. Apsara rc.6+ already marks its exports as client components. Only callout.tsx kept (has logic). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: use onValueChange instead of onChange for Input Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9e8961b commit f9d7116

18 files changed

Lines changed: 45 additions & 96 deletions

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/chronicle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@opentelemetry/sdk-metrics": "^2.6.1",
4848
"@opentelemetry/semantic-conventions": "^1.40.0",
4949
"@radix-ui/react-icons": "^1.3.2",
50-
"@raystack/apsara": "1.0.0-rc.4",
50+
"@raystack/apsara": "1.0.0-rc.7",
5151
"@shikijs/rehype": "^4.0.2",
5252
"@vitejs/plugin-react": "^6.0.1",
5353
"chalk": "^5.6.2",

packages/chronicle/src/components/api/playground-dialog.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useState, useCallback, useMemo } from 'react'
44
import type { OpenAPIV3 } from 'openapi-types'
5-
import { Dialog, Button, Badge, IconButton, InputField, CopyButton, Select, Menu } from '@raystack/apsara'
5+
import { Dialog, Button, Badge, IconButton, Input, CopyButton, Select, Menu } from '@raystack/apsara'
66
import { Cross2Icon, ChevronDownIcon, ChevronUpIcon, PlayIcon, PlusIcon } from '@radix-ui/react-icons'
77
import { CounterClockwiseClockIcon, CodeIcon } from '@radix-ui/react-icons'
88
import { MethodBadge } from '@/components/api/method-badge'
@@ -263,29 +263,29 @@ export function PlaygroundDialog({
263263
<div className={styles.fieldRow}>
264264
<span className={styles.fieldLabel}>Username</span>
265265
<div className={styles.fieldInput}>
266-
<InputField size="small" placeholder="Enter username" value={basicUser} onChange={(e) => setBasicUser(e.target.value)} />
266+
<Input size="small" placeholder="Enter username" value={basicUser} onValueChange={setBasicUser} />
267267
</div>
268268
</div>
269269
<div className={styles.fieldRow}>
270270
<span className={styles.fieldLabel}>Password</span>
271271
<div className={styles.fieldInput}>
272-
<InputField size="small" type="password" placeholder="Enter password" value={basicPass} onChange={(e) => setBasicPass(e.target.value)} />
272+
<Input size="small" type="password" placeholder="Enter password" value={basicPass} onValueChange={setBasicPass} />
273273
</div>
274274
</div>
275275
</>
276276
) : currentScheme.type !== 'none' ? (
277277
<div className={styles.fieldRow}>
278278
<span className={styles.fieldLabel}>{currentScheme.headerName}</span>
279279
<div className={styles.fieldInput}>
280-
<InputField size="small" placeholder={currentScheme.placeholder} value={authToken} onChange={(e) => setAuthToken(e.target.value)} />
280+
<Input size="small" placeholder={currentScheme.placeholder} value={authToken} onValueChange={setAuthToken} />
281281
</div>
282282
</div>
283283
) : null}
284284
{headerFields.filter((f) => f.name !== currentScheme.headerName).map((f) => (
285285
<div key={f.name} className={styles.fieldRow}>
286286
<span className={styles.fieldLabel}>{f.name}</span>
287287
<div className={styles.fieldInput}>
288-
<InputField size="small" placeholder="Enter value" value={headerValues[f.name] ?? ''} onChange={(e) => setHeaderValues({ ...headerValues, [f.name]: e.target.value })} />
288+
<Input size="small" placeholder="Enter value" value={headerValues[f.name] ?? ''} onValueChange={(v) => setHeaderValues({ ...headerValues, [f.name]: v })} />
289289
</div>
290290
</div>
291291
))}
@@ -307,11 +307,11 @@ export function PlaygroundDialog({
307307
<div key={f.name} className={styles.fieldRow}>
308308
<span className={styles.fieldLabel}>{f.name}</span>
309309
<div className={styles.fieldInput}>
310-
<InputField
310+
<Input
311311
size="small"
312312
placeholder="Enter value"
313313
value={pathValues[f.name] ?? ''}
314-
onChange={(e) => setPathValues({ ...pathValues, [f.name]: e.target.value })}
314+
onValueChange={(v) => setPathValues({ ...pathValues, [f.name]: v })}
315315
/>
316316
</div>
317317
</div>
@@ -332,11 +332,11 @@ export function PlaygroundDialog({
332332
<div key={f.name} className={styles.fieldRow}>
333333
<span className={styles.fieldLabel}>{f.name}</span>
334334
<div className={styles.fieldInput}>
335-
<InputField
335+
<Input
336336
size="small"
337337
placeholder={f.description ?? 'Enter value'}
338338
value={queryValues[f.name] ?? ''}
339-
onChange={(e) => setQueryValues({ ...queryValues, [f.name]: e.target.value })}
339+
onValueChange={(v) => setQueryValues({ ...queryValues, [f.name]: v })}
340340
/>
341341
</div>
342342
</div>
@@ -494,13 +494,13 @@ function BodyFieldRow({ field, value, onChange }: {
494494
{items.map((item, i) => (
495495
<div key={i} className={styles.arrayItemRow}>
496496
<div className={styles.fieldInput}>
497-
<InputField
497+
<Input
498498
size="small"
499499
placeholder={`${field.name}[${i}]`}
500500
value={String(item)}
501-
onChange={(e) => {
501+
onValueChange={(v) => {
502502
const updated = [...items]
503-
updated[i] = e.target.value
503+
updated[i] = v
504504
onChange(updated)
505505
}}
506506
/>
@@ -539,11 +539,11 @@ function BodyFieldRow({ field, value, onChange }: {
539539
<div className={styles.fieldRow}>
540540
<span className={styles.fieldLabel}>{field.name} {field.required && <Badge variant="danger" size="micro">required</Badge>}</span>
541541
<div className={styles.fieldInput}>
542-
<InputField
542+
<Input
543543
size="small"
544544
placeholder={field.description ?? 'Enter value'}
545545
value={String(value ?? '')}
546-
onChange={(e) => onChange(e.target.value)}
546+
onValueChange={(v) => onChange(v)}
547547
/>
548548
</div>
549549
</div>

packages/chronicle/src/components/common/breadcrumb.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/chronicle/src/components/common/button.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/chronicle/src/components/common/code-block.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/chronicle/src/components/common/dialog.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/chronicle/src/components/common/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/chronicle/src/components/common/input-field.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/chronicle/src/components/common/sidebar.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)