@makinbakin/sdk 0.0.1-rc.35 → 0.0.1-rc.36
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/_internal/app/components/drawer.d.ts +1 -3
- package/_internal/app/hooks/use-available-models.d.ts +24 -4
- package/_internal/app/hooks/use-runtime-status.d.ts +22 -6
- package/_internal/app/hooks/use-toast.d.ts +10 -0
- package/_internal/core/adapters/runtime/concepts.d.ts +87 -0
- package/_internal/core/adapters/runtime/index.d.ts +1 -1
- package/_internal/core/adapters/runtime/testing.d.ts +21 -1
- package/_internal/core/plugin-types.d.ts +12 -0
- package/_internal/core/routing/define.d.ts +6 -0
- package/_internal/host/ui/resize.d.ts +2 -0
- package/_internal/ui/{conversation → behaviors}/resize-handle.d.ts +4 -2
- package/_internal/ui/behaviors/use-persisted-leading-edge-resize.d.ts +2 -0
- package/_internal/ui/charts/composition-bar.d.ts +7 -2
- package/_internal/ui/conversation/conversation-panel.d.ts +5 -3
- package/_internal/ui/conversation/conversation.d.ts +3 -1
- package/_internal/ui/forms/field.d.ts +7 -2
- package/_internal/ui/index.d.ts +3 -0
- package/_internal/ui/patterns/data-table.d.ts +7 -1
- package/_internal/ui/patterns/guide-card.d.ts +33 -0
- package/_internal/ui/patterns/index.d.ts +2 -0
- package/_internal/ui/patterns/search-input.d.ts +1 -1
- package/_internal/ui/primitives/card.d.ts +9 -1
- package/_internal/ui/primitives/combobox.d.ts +40 -0
- package/_internal/ui/primitives/control-styles.d.ts +10 -0
- package/_internal/ui/primitives/input-group.d.ts +11 -5
- package/_internal/ui/primitives/input.d.ts +7 -2
- package/_internal/ui/primitives/select.d.ts +14 -4
- package/_internal/ui/primitives/textarea.d.ts +19 -3
- package/_internal/ui/primitives/use-textarea-autosize.d.ts +3 -0
- package/bin/bakin-plugin-test-ui.js +28 -7
- package/charts/index.js +1 -1
- package/content/index.js +8 -10
- package/content/markdown-comparison.d.ts +12 -0
- package/content/markdown-content.d.ts +3 -1
- package/content/markdown-document.d.ts +4 -0
- package/conversation/index.js +2 -2
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +1 -1
- package/navigation/index.js +1 -1
- package/package.json +2 -1
- package/patterns/agent-patterns.d.ts +4 -2
- package/patterns/index.d.ts +2 -2
- package/patterns/index.js +3 -3
- package/patterns/picker-patterns.d.ts +12 -0
- package/styles.css +1 -1
- package/testing/ui/conformance/index.js +2 -2
- package/testing/ui/index.js +1 -1
- package/types/health.d.ts +3 -1
- package/types/services.d.ts +19 -0
- package/ui/index.d.ts +3 -0
- package/ui/index.js +4 -4
- package/utils/index.d.ts +2 -0
- package/utils/index.js +1 -1
- package/utils/plugin-fetch.d.ts +21 -0
|
@@ -3,9 +3,7 @@ declare const MIN_WIDTH = 320;
|
|
|
3
3
|
declare const MAX_WIDTH = 960;
|
|
4
4
|
declare const DEFAULT_WIDTH = 810;
|
|
5
5
|
declare const DRAWER_WIDTH_STORAGE_KEY = "bakin-drawer-width";
|
|
6
|
-
declare function clampDrawerWidth(width: number): number;
|
|
7
6
|
declare function getDrawerWidthStorageKey(storageKey?: string): string;
|
|
8
|
-
declare function getStoredDrawerWidth(defaultWidth: number, storageKey?: string): number;
|
|
9
7
|
export interface DrawerProps {
|
|
10
8
|
open: boolean;
|
|
11
9
|
onOpenChange: (open: boolean) => void;
|
|
@@ -26,4 +24,4 @@ export interface DrawerProps {
|
|
|
26
24
|
busy?: boolean;
|
|
27
25
|
}
|
|
28
26
|
export declare function Drawer({ open, onOpenChange, title, ariaLabel, description, actions, children, defaultWidth, storageKey, onBack, dirty, busy, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export { MIN_WIDTH, MAX_WIDTH, DEFAULT_WIDTH, DRAWER_WIDTH_STORAGE_KEY,
|
|
27
|
+
export { MIN_WIDTH, MAX_WIDTH, DEFAULT_WIDTH, DRAWER_WIDTH_STORAGE_KEY, getDrawerWidthStorageKey, };
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import type { AvailableModel } from '@makinbakin/sdk/types';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The available-models catalog (empty array until loaded / on failure);
|
|
4
|
+
* refetches when the server says it changed. Pass the agent a picker belongs
|
|
5
|
+
* to so its verdicts are that agent's.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useAvailableModels(agentId?: string): AvailableModel[];
|
|
8
|
+
/** The option shape `ModelSelect` consumes — kept structurally identical to `ModelSelectOption`. */
|
|
9
|
+
export interface EligibleModelOption {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
provider?: string;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
description?: string;
|
|
15
|
+
tone?: 'default' | 'danger';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Map catalog rows to picker options so NO picker can select a dead model
|
|
19
|
+
* (#907): `ineligible` rows are disabled, carry the reason as the option's
|
|
20
|
+
* DESCRIPTION (secondary text + `aria-describedby`; the name stays the
|
|
21
|
+
* name) and the `danger` tone (a dead value that is currently selected
|
|
22
|
+
* renders as such in the trigger) — D23; `unknown` rows stay selectable —
|
|
23
|
+
* missing evidence is never a refusal.
|
|
24
|
+
*/
|
|
25
|
+
export declare function toModelSelectOptions(models: readonly AvailableModel[]): EligibleModelOption[];
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
interface
|
|
2
|
-
|
|
1
|
+
export interface RestartAdviceWire {
|
|
2
|
+
needed: boolean;
|
|
3
|
+
title?: string;
|
|
4
|
+
body?: string;
|
|
5
|
+
action?: {
|
|
6
|
+
label: string;
|
|
7
|
+
kind: 'restart-runtime';
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface RuntimeStatus {
|
|
11
|
+
/** A config change is waiting on a runtime restart (adapter-advised, persisted server-side). */
|
|
12
|
+
pending: boolean;
|
|
13
|
+
/** What to render: the adapter's own title/body/action, or the generic fallback. */
|
|
14
|
+
advice: RestartAdviceWire;
|
|
3
15
|
restarting: boolean;
|
|
16
|
+
/** The last restart attempt's failure, when the banner is retained because of it. */
|
|
17
|
+
lastError: string | null;
|
|
4
18
|
restart: () => Promise<void>;
|
|
5
|
-
|
|
19
|
+
/** Re-read server state after a save — the SERVER decides whether a restart is pending. */
|
|
20
|
+
refresh: () => Promise<void>;
|
|
6
21
|
}
|
|
7
22
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Shared
|
|
23
|
+
* Pending-restart status for the active runtime (#878): the banner is a
|
|
24
|
+
* dumb renderer of what the adapter said. Shared by the Models page, agent
|
|
25
|
+
* detail and the team grid. Never set optimistically on the client — a
|
|
26
|
+
* save calls `refresh()` and the server answers from persisted state.
|
|
10
27
|
*/
|
|
11
28
|
export declare function useRuntimeStatus(): RuntimeStatus;
|
|
12
|
-
export {};
|
|
@@ -4,6 +4,16 @@ export interface Toast {
|
|
|
4
4
|
message: ReactNode;
|
|
5
5
|
type: 'success' | 'error' | 'info';
|
|
6
6
|
duration?: number;
|
|
7
|
+
/** Optional heading above the message (the kit Toast's title slot). */
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
/** Optional action row (the kit Toast's action slot). */
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Stays until dismissed — no timer. For attention the operator must act
|
|
13
|
+
* on (the spend ladder's 90% and cap toasts); a caller that needs to know
|
|
14
|
+
* WHEN it was closed subscribes to the store and watches its id go.
|
|
15
|
+
*/
|
|
16
|
+
persistent?: boolean;
|
|
7
17
|
}
|
|
8
18
|
interface ToastStore {
|
|
9
19
|
toasts: Toast[];
|
|
@@ -533,9 +533,60 @@ export interface RuntimeAvailableModel {
|
|
|
533
533
|
contextWindow?: number;
|
|
534
534
|
local?: boolean;
|
|
535
535
|
available?: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* WHY `available` is false, when the runtime knows (#907). Pi reports
|
|
538
|
+
* `no_credentials` for catalog models whose provider has no configured
|
|
539
|
+
* auth — the model exists, the account cannot reach it. Consumers never
|
|
540
|
+
* infer a reason the runtime did not give: absent ⇒ "runtime reports
|
|
541
|
+
* this model unavailable", never "retired".
|
|
542
|
+
*/
|
|
543
|
+
unavailableReason?: 'no_credentials' | 'not_configured' | 'other';
|
|
536
544
|
tags?: string[];
|
|
537
545
|
metadata?: RuntimeMetadata;
|
|
538
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* Status-only record for ONE LLM provider (#907 / the model slice of #378).
|
|
549
|
+
* `configured` is the runtime's own auth resolution (Pi: configured auth;
|
|
550
|
+
* OpenClaw: the merged auth-profiles + CLI probe) — never config-key
|
|
551
|
+
* presence. `authFree` marks providers that need no credential (local
|
|
552
|
+
* models). NEVER carries secret material — the declared field set is
|
|
553
|
+
* pinned by tests/architecture/provider-inventory-shape.test.ts and the
|
|
554
|
+
* runtime values by the conformance suite.
|
|
555
|
+
*/
|
|
556
|
+
export interface ProviderCredentialStatus {
|
|
557
|
+
providerId: string;
|
|
558
|
+
configured: boolean;
|
|
559
|
+
authFree?: boolean;
|
|
560
|
+
source?: 'runtime' | 'env' | 'store';
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* The provider inventory `credentials.providers()` returns. `evidence` is
|
|
564
|
+
* HONEST: 'partial' whenever one of the adapter's credential sources failed
|
|
565
|
+
* (OpenClaw's CLI probe), so consumers treat providers absent from a partial
|
|
566
|
+
* inventory as UNKNOWN — never as credential-less.
|
|
567
|
+
*/
|
|
568
|
+
export interface ProviderCredentialInventory {
|
|
569
|
+
providers: ProviderCredentialStatus[];
|
|
570
|
+
evidence: 'complete' | 'partial';
|
|
571
|
+
detail?: string;
|
|
572
|
+
}
|
|
573
|
+
/** Kinds of Bakin-initiated config change an adapter may need a restart to apply. */
|
|
574
|
+
export type RuntimeConfigChangeKind = 'model-config' | 'roster' | 'routing-policy';
|
|
575
|
+
/**
|
|
576
|
+
* What the runtime says about applying a config change (#878 Models half).
|
|
577
|
+
* The Models page renders this verbatim — title/body/action come from the
|
|
578
|
+
* adapter, never from adapter-id branching upstream. `needed: false` means
|
|
579
|
+
* the change is live already (Pi re-reads its stores per turn).
|
|
580
|
+
*/
|
|
581
|
+
export interface RestartAdvice {
|
|
582
|
+
needed: boolean;
|
|
583
|
+
title?: string;
|
|
584
|
+
body?: string;
|
|
585
|
+
action?: {
|
|
586
|
+
label: string;
|
|
587
|
+
kind: 'restart-runtime';
|
|
588
|
+
};
|
|
589
|
+
}
|
|
539
590
|
export type RuntimeImageOutputFormat = 'png' | 'jpeg' | 'jpg' | 'webp';
|
|
540
591
|
export type RuntimeImageBackground = 'transparent' | 'opaque' | 'auto';
|
|
541
592
|
/**
|
|
@@ -729,6 +780,15 @@ export interface AgentRuntimeAdapter {
|
|
|
729
780
|
* writes and expect the next read to reflect them.
|
|
730
781
|
*/
|
|
731
782
|
restart(): Promise<void>;
|
|
783
|
+
/**
|
|
784
|
+
* OPTIONAL (#878): does a change of this kind need `restart()` before the
|
|
785
|
+
* runtime applies it, and how should the UI say so? SYNC + static, like
|
|
786
|
+
* describeToolAccess(). Adapters that omit the member get a conservative
|
|
787
|
+
* generic banner from the caller; absence is member omission, never a
|
|
788
|
+
* throwing stub (conformance-pinned). Callers feature-detect
|
|
789
|
+
* (`runtime.restartAdvice?.(kind)`).
|
|
790
|
+
*/
|
|
791
|
+
restartAdvice?(change: RuntimeConfigChangeKind): RestartAdvice | undefined;
|
|
732
792
|
/**
|
|
733
793
|
* CRUD error contract (R28): `get` returns `null` for a missing agent —
|
|
734
794
|
* absence is a value, never a throw. Mutations addressing a MISSING agent
|
|
@@ -857,6 +917,18 @@ export interface AgentRuntimeAdapter {
|
|
|
857
917
|
probe?(modelId: string, opts?: {
|
|
858
918
|
signal?: AbortSignal;
|
|
859
919
|
}): Promise<void>;
|
|
920
|
+
/**
|
|
921
|
+
* OPTIONAL (#907 review): the catalog id this runtime would RUN `ref`
|
|
922
|
+
* as — `ref` itself when the catalog lists it verbatim, the runtime's
|
|
923
|
+
* OWN resolution of a non-verbatim reference (Pi accepts bare model
|
|
924
|
+
* ids and resolves them by its registry rule), or null when the
|
|
925
|
+
* runtime would not resolve it. The eligibility engine judges a
|
|
926
|
+
* persisted selection by this row, so the verdict follows the
|
|
927
|
+
* adapter's actual turn-time semantics — never a catalog-shape guess.
|
|
928
|
+
* A runtime that omits the member runs exactly what its catalog lists.
|
|
929
|
+
* Read-only: no network, no turn.
|
|
930
|
+
*/
|
|
931
|
+
resolveId?(ref: string): Promise<string | null>;
|
|
860
932
|
/** Static declaration of which routing-policy fields this runtime honors. */
|
|
861
933
|
routingSupport(): RuntimeRoutingSupport;
|
|
862
934
|
/** The runtime's current routing policy (unsupported fields empty). */
|
|
@@ -900,6 +972,21 @@ export interface AgentRuntimeAdapter {
|
|
|
900
972
|
credentialStatus(opts?: {
|
|
901
973
|
agentId?: string;
|
|
902
974
|
}): Promise<RuntimeCredentialStatus>;
|
|
975
|
+
/**
|
|
976
|
+
* OPTIONAL (#907 / #378 model slice): the per-provider STATUS-ONLY
|
|
977
|
+
* credential inventory the model-eligibility engine reads. Derived from
|
|
978
|
+
* the adapter's real auth resolution (the same path `credentialStatus`
|
|
979
|
+
* uses), with honest `evidence` when a source failed. `opts.agentId`
|
|
980
|
+
* scopes it where the runtime keys credentials per agent. Absence is
|
|
981
|
+
* member omission (conformance-pinned); callers feature-detect
|
|
982
|
+
* (`runtime.credentials?.providers(...)`) and treat absence as
|
|
983
|
+
* "credential evidence unavailable".
|
|
984
|
+
*/
|
|
985
|
+
credentials?: {
|
|
986
|
+
providers(opts?: {
|
|
987
|
+
agentId?: string;
|
|
988
|
+
}): Promise<ProviderCredentialInventory>;
|
|
989
|
+
};
|
|
903
990
|
/**
|
|
904
991
|
* Wire up this runtime so its agents can reach Bakin's exec tools.
|
|
905
992
|
* Idempotent + re-invokable: run at init AND whenever the agent roster or
|
|
@@ -6,6 +6,6 @@ export { hasChannelCapability } from './capabilities';
|
|
|
6
6
|
export { RuntimeError, RuntimeTurnError } from './errors';
|
|
7
7
|
export type { RuntimeErrorKind, RuntimeErrorOptions, RuntimeProviderInfo, RuntimeTurnDiagnosis, RuntimeTurnFailureReason, } from './errors';
|
|
8
8
|
export { getRuntimeMainAgent, getRuntimeMainAgentId, getRuntimeMainAgentName, selectRuntimeMainAgent, } from './helpers';
|
|
9
|
-
export type { AgentRuntimeAdapter, ApprovalDelivery, ApprovalOption, ApprovalPatch, ApprovalRenderRef, ApprovalRenderResult, ApprovalResolveEvent, ApprovalResponse, CancelApprovalArgs, ChannelInfo, ChannelMessageArgs, ChatChunk, ChatTextFormat, ContentDeliveryArgs, CreateApprovalArgs, CreateThreadArgs, CreatedThread, CreateCronJobInput, CreateRuntimeAgentInput, CronJob, CronRun, DeliveryResult, DurableApprovalRecord, EditApprovalArgs, EditChannelMessageArgs, InboundChannelAttachment, InboundChannelMessage, MessageArgs, MessageAttachment, MessageResult, MessageUsage, NotificationArgs, ResolveApprovalArgs, RuntimeAgent, RuntimeAllowlistPatch, RuntimeToolActivity, RuntimeAvailableModel, RuntimeCapabilities, CapabilityMode, ToolAccessStyle, RuntimeToolAccess, ToolAccessProvisioningStatus, RuntimeCredentialStatus, RuntimeRoutingPolicy, RuntimeRoutingSupport, CapabilitySet, RuntimeImageBackground, RuntimeImageEditInput, RuntimeImageFile, RuntimeImageGenerateInput, RuntimeImageGenerationResult, RuntimeImageOutputFormat, RuntimeImageProvider, RuntimeImageProviderCapabilities, RuntimeImagesAccess, RuntimeExtensionInfo, RuntimeExtensionsAccess, RuntimeMemoryEntry, RuntimeMemoryEntryStat, RuntimeMemoryPathMatch, RuntimeMemoryReadRange, RuntimeMemorySearchResult, RuntimeMemoryTier, RuntimeMessageToolPolicy, RuntimeMessageToolsMode, RuntimeMetadata, RawCronSnapshot, RuntimeSession, RuntimeSessionStoreStats, RuntimeSessionContextStats, RuntimeSkill, UpdateCronJobInput, UpdateRuntimeAgentInput, WorkspaceFile, WorkspaceFileStat, } from './concepts';
|
|
9
|
+
export type { AgentRuntimeAdapter, ApprovalDelivery, ApprovalOption, ApprovalPatch, ApprovalRenderRef, ApprovalRenderResult, ApprovalResolveEvent, ApprovalResponse, CancelApprovalArgs, ChannelInfo, ChannelMessageArgs, ChatChunk, ChatTextFormat, ContentDeliveryArgs, CreateApprovalArgs, CreateThreadArgs, CreatedThread, CreateCronJobInput, CreateRuntimeAgentInput, CronJob, CronRun, DeliveryResult, DurableApprovalRecord, EditApprovalArgs, EditChannelMessageArgs, InboundChannelAttachment, InboundChannelMessage, MessageArgs, MessageAttachment, MessageResult, MessageUsage, NotificationArgs, ResolveApprovalArgs, RuntimeAgent, RuntimeAllowlistPatch, RuntimeToolActivity, RuntimeAvailableModel, RuntimeCapabilities, CapabilityMode, ToolAccessStyle, RuntimeToolAccess, ToolAccessProvisioningStatus, RuntimeCredentialStatus, ProviderCredentialStatus, ProviderCredentialInventory, RuntimeConfigChangeKind, RestartAdvice, RuntimeRoutingPolicy, RuntimeRoutingSupport, CapabilitySet, RuntimeImageBackground, RuntimeImageEditInput, RuntimeImageFile, RuntimeImageGenerateInput, RuntimeImageGenerationResult, RuntimeImageOutputFormat, RuntimeImageProvider, RuntimeImageProviderCapabilities, RuntimeImagesAccess, RuntimeExtensionInfo, RuntimeExtensionsAccess, RuntimeMemoryEntry, RuntimeMemoryEntryStat, RuntimeMemoryPathMatch, RuntimeMemoryReadRange, RuntimeMemorySearchResult, RuntimeMemoryTier, RuntimeMessageToolPolicy, RuntimeMessageToolsMode, RuntimeMetadata, RawCronSnapshot, RuntimeSession, RuntimeSessionStoreStats, RuntimeSessionContextStats, RuntimeSkill, UpdateCronJobInput, UpdateRuntimeAgentInput, WorkspaceFile, WorkspaceFileStat, } from './concepts';
|
|
10
10
|
export { RUNTIME_MEDIA_URI_SCHEME, DEFAULT_OVERSIZED_OUTPUT_BYTES } from './concepts';
|
|
11
11
|
export { isSafeSkillFilePath, isExecutableSkillFile, readSkillTree, SKILL_SIDECAR_NAMES } from './skill-files';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentRuntimeAdapter } from './concepts';
|
|
1
|
+
import type { AgentRuntimeAdapter, ProviderCredentialStatus, RestartAdvice } from './concepts';
|
|
2
2
|
/**
|
|
3
3
|
* Opt-in channels surface for the mock (delivery capability pairs with it —
|
|
4
4
|
* see createMockRuntimeAdapter). The DEFAULT mock omits `channels` entirely:
|
|
@@ -9,6 +9,26 @@ import type { AgentRuntimeAdapter } from './concepts';
|
|
|
9
9
|
* Usage: `createMockRuntimeAdapter({ channels: mockChannels() })`
|
|
10
10
|
*/
|
|
11
11
|
export declare function mockChannels(): NonNullable<AgentRuntimeAdapter['channels']>;
|
|
12
|
+
/**
|
|
13
|
+
* Opt-in status-only credential inventory for the mock (#907 / #378 slice).
|
|
14
|
+
* `credentials` is an optional contract member, so the DEFAULT mock omits
|
|
15
|
+
* it — eligibility code must feature-detect and treat absence as
|
|
16
|
+
* "credential evidence unavailable" (models read `unknown`, never
|
|
17
|
+
* `ineligible`). Pass `evidence: 'partial'` to exercise the honest-partial
|
|
18
|
+
* branch (OpenClaw's CLI probe failing).
|
|
19
|
+
*
|
|
20
|
+
* Usage: `createMockRuntimeAdapter({ credentials: mockCredentials([{ providerId: 'mock', configured: true }]) })`
|
|
21
|
+
*/
|
|
22
|
+
export declare function mockCredentials(providers?: ProviderCredentialStatus[], evidence?: 'complete' | 'partial'): NonNullable<AgentRuntimeAdapter['credentials']>;
|
|
23
|
+
/**
|
|
24
|
+
* Opt-in restart advice for the mock (#878). Optional member; the default
|
|
25
|
+
* mock omits it so the Models banner's generic-fallback path is what mock
|
|
26
|
+
* consumers see unless they opt in. The same advice is returned for every
|
|
27
|
+
* change kind unless a per-kind map is given.
|
|
28
|
+
*
|
|
29
|
+
* Usage: `createMockRuntimeAdapter({ restartAdvice: mockRestartAdvice({ needed: false }) })`
|
|
30
|
+
*/
|
|
31
|
+
export declare function mockRestartAdvice(advice: RestartAdvice | Partial<Record<'model-config' | 'roster' | 'routing-policy', RestartAdvice>>): NonNullable<AgentRuntimeAdapter['restartAdvice']>;
|
|
12
32
|
/**
|
|
13
33
|
* Opt-in cron surface for the mock — same rationale as mockChannels():
|
|
14
34
|
* `cron` is an optional contract member (Pi omits it), so the default mock
|
|
@@ -612,6 +612,18 @@ export interface BakinPlugin {
|
|
|
612
612
|
onShutdown?(): void | Promise<void>;
|
|
613
613
|
/** Called when this plugin's settings are updated */
|
|
614
614
|
onSettingsChange?(settings: Record<string, unknown>): void | Promise<void>;
|
|
615
|
+
/**
|
|
616
|
+
* Validate a whole settings document BEFORE the generic
|
|
617
|
+
* `PUT /api/plugin-settings/{id}` writes it. A plugin whose settings are
|
|
618
|
+
* money or policy (the spend plugin) refuses documents its own routes
|
|
619
|
+
* would refuse, so no side door can leave an invalid file on disk.
|
|
620
|
+
*/
|
|
621
|
+
validateSettings?(value: unknown): {
|
|
622
|
+
ok: true;
|
|
623
|
+
} | {
|
|
624
|
+
ok: false;
|
|
625
|
+
error: string;
|
|
626
|
+
};
|
|
615
627
|
/**
|
|
616
628
|
* Called by `bakin plugins remove` BEFORE Bakin tears down the plugin's
|
|
617
629
|
* own bookkeeping (registry rows, settings JSON, plugin dir, etc.).
|
|
@@ -36,6 +36,12 @@ export interface DefinePluginInput {
|
|
|
36
36
|
onReady?(): void | Promise<void>;
|
|
37
37
|
onShutdown?(): void | Promise<void>;
|
|
38
38
|
onSettingsChange?(settings: Record<string, unknown>): void | Promise<void>;
|
|
39
|
+
validateSettings?(value: unknown): {
|
|
40
|
+
ok: true;
|
|
41
|
+
} | {
|
|
42
|
+
ok: false;
|
|
43
|
+
error: string;
|
|
44
|
+
};
|
|
39
45
|
onUninstall?(ctx: any): void | Promise<void>;
|
|
40
46
|
beforeUninstall?(ctx: any): void | Promise<void>;
|
|
41
47
|
settingsSchema?: PluginSettingsSchema;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PersistedResizeHandleProps } from '
|
|
1
|
+
import type { PersistedResizeHandleProps } from './use-persisted-leading-edge-resize';
|
|
2
2
|
/** Props for the shared grab-bar chrome over `usePersistedLeadingEdgeResize`. */
|
|
3
3
|
export interface ResizeHandleProps {
|
|
4
4
|
/** Direction of the grab bar itself: `horizontal` resizes height, `vertical` resizes width. */
|
|
@@ -6,8 +6,10 @@ export interface ResizeHandleProps {
|
|
|
6
6
|
handleProps: PersistedResizeHandleProps;
|
|
7
7
|
/** Accessible name for the separator, e.g. "Resize message input". */
|
|
8
8
|
label: string;
|
|
9
|
+
/** Keep a quiet grab bar visible for panel and drawer boundaries. */
|
|
10
|
+
visibleAtRest?: boolean;
|
|
9
11
|
/** Site-owned layout, positioning, and cursor classes. */
|
|
10
12
|
className?: string;
|
|
11
13
|
}
|
|
12
14
|
/** One resize grab bar; every consumer keeps its own positioning and cursor rules. */
|
|
13
|
-
export declare function ResizeHandle({ orientation, handleProps, label, className }: ResizeHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ResizeHandle({ orientation, handleProps, label, visibleAtRest, className }: ResizeHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,10 +15,12 @@ export interface PersistedResizeHandleProps {
|
|
|
15
15
|
'aria-valuemin': number;
|
|
16
16
|
'aria-valuemax': number;
|
|
17
17
|
'aria-valuenow': number;
|
|
18
|
+
'data-resizing': boolean;
|
|
18
19
|
onPointerDown: (event: PointerEvent<HTMLDivElement>) => void;
|
|
19
20
|
onPointerMove: (event: PointerEvent<HTMLDivElement>) => void;
|
|
20
21
|
onPointerUp: (event: PointerEvent<HTMLDivElement>) => void;
|
|
21
22
|
onPointerCancel: (event: PointerEvent<HTMLDivElement>) => void;
|
|
23
|
+
onLostPointerCapture: (event: PointerEvent<HTMLDivElement>) => void;
|
|
22
24
|
onKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
23
25
|
}
|
|
24
26
|
/** Private shared mechanics for a pane resized from its leading edge. */
|
|
@@ -12,8 +12,13 @@ export interface CompositionBarProps {
|
|
|
12
12
|
data: readonly CompositionBarSegment[];
|
|
13
13
|
/** Accessible name for the strip and basis for its legend name. */
|
|
14
14
|
label: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* `inline` fits inside a metric row; `default` leaves room for the legend;
|
|
17
|
+
* `large` is the tall strip for a headline part-to-whole — each segment
|
|
18
|
+
* carries its label and value inside it (clipped when the segment is too
|
|
19
|
+
* narrow; the legend and the accessible summary always carry them all).
|
|
20
|
+
*/
|
|
21
|
+
size?: 'inline' | 'default' | 'large';
|
|
17
22
|
/**
|
|
18
23
|
* List legend with exact values below the strip. Defaults to true at size
|
|
19
24
|
* `default`; forced off at size `inline`, where the accessible summary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
2
|
import { type AgentTurnProps, type ConversationAgent, type ConversationAvatarRenderer, type ConversationTextRenderer } from './agent-turn';
|
|
3
|
-
import { type ComposerAttachments } from './composer';
|
|
3
|
+
import { type ComposerAttachments, type ComposerHandle } from './composer';
|
|
4
4
|
import { type ConversationProps } from './conversation';
|
|
5
5
|
import { type ConversationChunk, type ConversationMessage } from './fold';
|
|
6
6
|
import { type ConversationQueuedItem } from './queued-message-list';
|
|
@@ -39,6 +39,8 @@ export interface ConversationPanelProps {
|
|
|
39
39
|
inputLabel?: string;
|
|
40
40
|
/** Focus the composer when this panel mounts. Disable for panels embedded below page content. */
|
|
41
41
|
autoFocus?: boolean;
|
|
42
|
+
/** Existing composer draft/focus handle; null while read-only or unmounted. */
|
|
43
|
+
composerHandleRef?: Ref<ComposerHandle>;
|
|
42
44
|
emptyState?: ReactNode;
|
|
43
45
|
maxLength?: number;
|
|
44
46
|
attachments?: ComposerAttachments;
|
|
@@ -56,4 +58,4 @@ export interface ConversationPanelProps {
|
|
|
56
58
|
* Focused conversation composition for embedded sessions. The consumer owns
|
|
57
59
|
* transport, persistence, routing, identity lookup, and attachment mutation.
|
|
58
60
|
*/
|
|
59
|
-
export declare function ConversationPanel({ messages, liveChunks, streaming, agent, resolveAgent, agentControl, onSend, onAbort, onRetry, renderAvatar, renderText, renderAttachment, transformText, formatToolSummary, storageKey, title, showHeader, fitParent, chrome, readOnly, readOnlyNotice, placeholder, inputLabel, autoFocus, emptyState, maxLength, attachments, queueMode, queuedItems, onRemoveQueued, defaultHeight, minHeight, maxHeight, className, }: ConversationPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function ConversationPanel({ messages, liveChunks, streaming, agent, resolveAgent, agentControl, onSend, onAbort, onRetry, renderAvatar, renderText, renderAttachment, transformText, formatToolSummary, storageKey, title, showHeader, fitParent, chrome, readOnly, readOnlyNotice, placeholder, inputLabel, autoFocus, composerHandleRef, emptyState, maxLength, attachments, queueMode, queuedItems, onRemoveQueued, defaultHeight, minHeight, maxHeight, className, }: ConversationPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,8 @@ export interface ConversationProps {
|
|
|
9
9
|
turns: readonly ConversationTurn[];
|
|
10
10
|
/** Document scroll is the product default; contained is for an explicitly bounded standalone surface. */
|
|
11
11
|
mode?: ConversationMode;
|
|
12
|
+
/** Distinguishes contained transcript regions when a page has multiple sessions. */
|
|
13
|
+
ariaLabel?: string;
|
|
12
14
|
/** Fallback identity for agent turns. */
|
|
13
15
|
agent?: ConversationAgent;
|
|
14
16
|
/** Resolve identity when a turn carries its own agent id. */
|
|
@@ -32,4 +34,4 @@ export interface ConversationProps {
|
|
|
32
34
|
* It owns scrolling only in explicit `contained` mode; page recipes should
|
|
33
35
|
* keep this in document mode and let `PageTimeline` own the log.
|
|
34
36
|
*/
|
|
35
|
-
export declare function Conversation({ turns, mode, agent, resolveAgent, emptyState, onRetry, onOpenCall, renderAvatar, renderText, renderAttachment, transformText, formatToolSummary, turnUsage, liveOutEstimate, className, }: ConversationProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function Conversation({ turns, mode, ariaLabel, agent, resolveAgent, emptyState, onRetry, onOpenCall, renderAvatar, renderText, renderAttachment, transformText, formatToolSummary, turnUsage, liveOutEstimate, className, }: ConversationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
+
import { type ControlSize, type ControlVariant } from '../primitives/control-styles';
|
|
3
4
|
export type FieldOrientation = 'vertical' | 'horizontal';
|
|
4
5
|
export type FieldProps = Omit<FieldPrimitive.Root.Props, 'className'> & {
|
|
5
6
|
className?: FieldPrimitive.Root.Props['className'];
|
|
@@ -17,9 +18,13 @@ export type FieldDescriptionProps = FieldPrimitive.Description.Props;
|
|
|
17
18
|
export declare function FieldDescription({ className, ...props }: FieldDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export type FieldErrorProps = FieldPrimitive.Error.Props;
|
|
19
20
|
export declare function FieldError({ className, role, ...props }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export type FieldControlProps = FieldPrimitive.Control.Props
|
|
21
|
+
export type FieldControlProps = Omit<FieldPrimitive.Control.Props, 'size'> & {
|
|
22
|
+
size?: ControlSize;
|
|
23
|
+
variant?: ControlVariant;
|
|
24
|
+
htmlSize?: number;
|
|
25
|
+
};
|
|
21
26
|
/**
|
|
22
27
|
* A styled input by default. Pass `render={<Textarea />}` to associate native
|
|
23
28
|
* controls that do not participate in Base UI's field context themselves.
|
|
24
29
|
*/
|
|
25
|
-
export declare function FieldControl({ className, render, ...props }: FieldControlProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function FieldControl({ className, render, size, variant, htmlSize, ...props }: FieldControlProps): import("react/jsx-runtime").JSX.Element;
|
package/_internal/ui/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export type { CollapsibleContentProps, CollapsibleProps, CollapsibleTriggerProps
|
|
|
53
53
|
export { Label } from './primitives/label';
|
|
54
54
|
export type { LabelProps } from './primitives/label';
|
|
55
55
|
export { Input } from './primitives/input';
|
|
56
|
+
export type { ControlSize, ControlVariant } from './primitives/control-styles';
|
|
56
57
|
export type { InputProps } from './primitives/input';
|
|
57
58
|
export { Textarea } from './primitives/textarea';
|
|
58
59
|
export type { TextareaProps } from './primitives/textarea';
|
|
@@ -84,3 +85,5 @@ export type { CommandDialogProps, CommandEmptyProps, CommandGroupProps, CommandI
|
|
|
84
85
|
export type { InputGroupAddonAlign, InputGroupAddonProps, InputGroupButtonProps, InputGroupButtonSize, InputGroupInputProps, InputGroupProps, InputGroupTextProps, InputGroupTextareaProps, } from './primitives/input-group';
|
|
85
86
|
export { DrawerSection } from './patterns/drawer-section';
|
|
86
87
|
export type { DrawerSectionHeadingLevel, DrawerSectionProps, } from './patterns/drawer-section';
|
|
88
|
+
export { Combobox, ComboboxControl, ComboboxInput, ComboboxTrigger, ComboboxClear, ComboboxValue, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxEmpty, ComboboxStatus, ComboboxChips, ComboboxChip, ComboboxChipRemove } from './primitives/combobox';
|
|
89
|
+
export type { ComboboxProps, ComboboxControlProps, ComboboxInputProps, ComboboxTriggerProps, ComboboxClearProps, ComboboxValueProps, ComboboxContentProps, ComboboxListProps, ComboboxItemProps, ComboboxGroupProps, ComboboxLabelProps, ComboboxEmptyProps, ComboboxStatusProps, ComboboxChipsProps, ComboboxChipProps, ComboboxChipRemoveProps } from './primitives/combobox';
|
|
@@ -114,6 +114,12 @@ export interface DataTableProps<Row, F extends string = string> {
|
|
|
114
114
|
renderTableRow?: (row: Row) => ReactNode;
|
|
115
115
|
/** Extra props merged onto each default `<tr>` (row click handlers, data attributes). */
|
|
116
116
|
rowProps?: (row: Row) => WithDataAttributes<ComponentPropsWithoutRef<'tr'>>;
|
|
117
|
+
/**
|
|
118
|
+
* Kit-owned selected treatment for a row (the ListRow `selected` tint on
|
|
119
|
+
* both renders, `data-selected` on the wide `<tr>`): a deep-linked or
|
|
120
|
+
* currently chosen record. Consumers manage the state.
|
|
121
|
+
*/
|
|
122
|
+
rowSelected?: (row: Row) => boolean;
|
|
117
123
|
/**
|
|
118
124
|
* Kit-owned whole-row activation: pointer click plus Enter/Space with a
|
|
119
125
|
* real focus ring on the wide render, and the ListRow interactive overlay
|
|
@@ -147,5 +153,5 @@ export interface DataTableProps<Row, F extends string = string> {
|
|
|
147
153
|
* by not declaring `sortValue`, not by hiding the affordance). `Table*` stays public as the D9-gated escape hatch
|
|
148
154
|
* for tables this configuration cannot express.
|
|
149
155
|
*/
|
|
150
|
-
export declare function DataTable<Row, F extends string = string>({ columns, rows: inputRows, rowKey, label, sort: controlledSort, onSortChange, defaultSort, pagination, collapseBelow, listVariant, renderTableRow, rowProps, renderRow, onRowActivate, rowActivateLabel, tableProps, className, }: DataTableProps<Row, F>): import("react/jsx-runtime").JSX.Element;
|
|
156
|
+
export declare function DataTable<Row, F extends string = string>({ columns, rows: inputRows, rowKey, label, sort: controlledSort, onSortChange, defaultSort, pagination, collapseBelow, listVariant, renderTableRow, rowProps, rowSelected, renderRow, onRowActivate, rowActivateLabel, tableProps, className, }: DataTableProps<Row, F>): import("react/jsx-runtime").JSX.Element;
|
|
151
157
|
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
export interface GuideCardPoint {
|
|
3
|
+
/** Short overline-style heading for one consideration. */
|
|
4
|
+
heading: string;
|
|
5
|
+
/** One or two sentences a new user can act on. */
|
|
6
|
+
body: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export type GuideCardHeadingLevel = 2 | 3;
|
|
9
|
+
export interface GuideCardProps {
|
|
10
|
+
/** Optional icon drawn in a tinted gutter that indents the whole card body. */
|
|
11
|
+
icon?: ComponentType<{
|
|
12
|
+
className?: string;
|
|
13
|
+
}>;
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
/** What this surface controls and why it exists — always visible. */
|
|
16
|
+
lead: ReactNode;
|
|
17
|
+
/** The things worth weighing before changing anything; rendered as a railed strip. */
|
|
18
|
+
points?: ReadonlyArray<GuideCardPoint>;
|
|
19
|
+
/** Page-level actions that belong to this surface (kept one visual weight below the page header's). */
|
|
20
|
+
actions?: ReactNode;
|
|
21
|
+
/** Document-outline level for the title; the card sits directly under a page title by default. */
|
|
22
|
+
headingLevel?: GuideCardHeadingLevel;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The plain-words opener for a settings surface: what it controls, why it
|
|
27
|
+
* exists, and what to think about before touching it. One icon gutter
|
|
28
|
+
* indents title, lead and the points together; the points read as a railed
|
|
29
|
+
* strip (the stat-strip rhythm with prose in place of numbers) that stacks
|
|
30
|
+
* on narrow containers. Prose stays prose — the accessible outline gets one
|
|
31
|
+
* heading for the card and an overline per point.
|
|
32
|
+
*/
|
|
33
|
+
export declare function GuideCard({ icon: Icon, title, lead, points, actions, headingLevel, className, }: GuideCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -67,6 +67,8 @@ export { StatTile } from './stat-tile';
|
|
|
67
67
|
export type { StatTileProgress, StatTileProgressTone, StatTileProps, StatTileVariant, } from './stat-tile';
|
|
68
68
|
export { StatGroup } from './stat-group';
|
|
69
69
|
export type { StatGroupProps } from './stat-group';
|
|
70
|
+
export { GuideCard } from './guide-card';
|
|
71
|
+
export type { GuideCardHeadingLevel, GuideCardPoint, GuideCardProps } from './guide-card';
|
|
70
72
|
export { DataTable } from './data-table';
|
|
71
73
|
export type { DataTableAlign, DataTableCollapse, DataTableColumn, DataTableNarrowRole, DataTableProps, DataTableSort, } from './data-table';
|
|
72
74
|
export { Timeline, TimelineEntry } from './timeline';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Input } from '../primitives/input';
|
|
3
|
-
type NativeSearchInputProps = Omit<React.ComponentPropsWithoutRef<typeof Input>, 'aria-label' | 'children' | 'className' | 'defaultValue' | 'onChange' | 'size' | 'type' | 'value'>;
|
|
3
|
+
type NativeSearchInputProps = Omit<React.ComponentPropsWithoutRef<typeof Input>, 'aria-label' | 'children' | 'className' | 'defaultValue' | 'onChange' | 'size' | 'variant' | 'type' | 'value'>;
|
|
4
4
|
export interface SearchInputProps extends NativeSearchInputProps {
|
|
5
5
|
/** Durable accessible name; the placeholder is only a visual hint. */
|
|
6
6
|
label: string;
|
|
@@ -29,7 +29,15 @@ export declare function Card({ className, size, tone, selected, orientation, int
|
|
|
29
29
|
*/
|
|
30
30
|
export declare function CardMedia({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export declare function CardHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
export
|
|
32
|
+
export type CardTitleElement = 'div' | 'h2' | 'h3' | 'h4';
|
|
33
|
+
/**
|
|
34
|
+
* The card's title. `as` renders it as a real heading when the card is a
|
|
35
|
+
* section of the page (a settings lane, a guide) so the document outline
|
|
36
|
+
* and heading navigation reach it; the visual treatment is the same.
|
|
37
|
+
*/
|
|
38
|
+
export declare function CardTitle({ as: Comp, className, ...props }: ComponentProps<'div'> & {
|
|
39
|
+
as?: CardTitleElement;
|
|
40
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
33
41
|
export declare function CardDescription({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
34
42
|
export type CardActionReveal = 'always' | 'hover';
|
|
35
43
|
export declare function CardAction({ className, reveal, ...props }: ComponentProps<'div'> & {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';
|
|
2
|
+
import { type ControlSize, type ControlVariant } from './control-styles';
|
|
3
|
+
export type ComboboxProps<Value, Multiple extends boolean | undefined = false> = ComboboxPrimitive.Root.Props<Value, Multiple>;
|
|
4
|
+
export declare const Combobox: typeof ComboboxPrimitive.Root;
|
|
5
|
+
export type ComboboxValueProps = ComboboxPrimitive.Value.Props;
|
|
6
|
+
export declare const ComboboxValue: typeof ComboboxPrimitive.Value;
|
|
7
|
+
export type ComboboxControlProps = ComboboxPrimitive.InputGroup.Props & {
|
|
8
|
+
size?: ControlSize;
|
|
9
|
+
variant?: ControlVariant;
|
|
10
|
+
width?: 'full' | 'auto';
|
|
11
|
+
};
|
|
12
|
+
export declare function ComboboxControl({ size, variant, width, className, ...props }: ComboboxControlProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export type ComboboxInputProps = Omit<ComboboxPrimitive.Input.Props, 'size'> & {
|
|
14
|
+
htmlSize?: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function ComboboxInput({ className, htmlSize, ...props }: ComboboxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export type ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props;
|
|
18
|
+
export declare function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export type ComboboxClearProps = ComboboxPrimitive.Clear.Props;
|
|
20
|
+
export declare function ComboboxClear({ className, children, ...props }: ComboboxClearProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export type ComboboxContentProps = ComboboxPrimitive.Popup.Props & Pick<ComboboxPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>;
|
|
22
|
+
export declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, ...props }: ComboboxContentProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export type ComboboxListProps = ComboboxPrimitive.List.Props;
|
|
24
|
+
export declare function ComboboxList({ className, ...props }: ComboboxListProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export type ComboboxItemProps = ComboboxPrimitive.Item.Props;
|
|
26
|
+
export declare function ComboboxItem({ className, children, ...props }: ComboboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export type ComboboxGroupProps = ComboboxPrimitive.Group.Props;
|
|
28
|
+
export declare function ComboboxGroup({ className, ...props }: ComboboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export type ComboboxLabelProps = ComboboxPrimitive.GroupLabel.Props;
|
|
30
|
+
export declare function ComboboxLabel({ className, ...props }: ComboboxLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export type ComboboxEmptyProps = ComboboxPrimitive.Empty.Props;
|
|
32
|
+
export declare function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export type ComboboxStatusProps = ComboboxPrimitive.Status.Props;
|
|
34
|
+
export declare function ComboboxStatus({ className, ...props }: ComboboxStatusProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export type ComboboxChipsProps = ComboboxPrimitive.Chips.Props;
|
|
36
|
+
export declare function ComboboxChips({ className, ...props }: ComboboxChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export type ComboboxChipProps = ComboboxPrimitive.Chip.Props;
|
|
38
|
+
export declare function ComboboxChip({ className, ...props }: ComboboxChipProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export type ComboboxChipRemoveProps = ComboboxPrimitive.ChipRemove.Props;
|
|
40
|
+
export declare function ComboboxChipRemove({ className, children, ...props }: ComboboxChipRemoveProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ControlSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export type ControlVariant = 'outlined' | 'filled' | 'ghost';
|
|
3
|
+
/** Private presentation shared by field shells, never by Form/Field providers. */
|
|
4
|
+
export declare const controlStyles: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
variant?: "ghost" | "outlined" | "filled" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const controlHeight: Record<ControlSize, string>;
|
|
9
|
+
/** Group focus follows the editable control; addon buttons keep their own ring. */
|
|
10
|
+
export declare const controlGroupFocus = "has-[:is(input,textarea):focus-visible]:outline-solid has-[:is(input,textarea):focus-visible]:outline-2 has-[:is(input,textarea):focus-visible]:outline-offset-2 has-[:is(input,textarea):focus-visible]:outline-bakin-focus-ring";
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
2
|
import type { ButtonProps, ButtonVariant, LegacyButtonVariant } from './button';
|
|
3
|
+
import { type ControlSize, type ControlVariant } from './control-styles';
|
|
3
4
|
import type { InputProps } from './input';
|
|
4
5
|
import type { TextareaProps } from './textarea';
|
|
5
|
-
export type InputGroupProps = ComponentProps<'div'
|
|
6
|
-
|
|
6
|
+
export type InputGroupProps = ComponentProps<'div'> & {
|
|
7
|
+
size?: ControlSize;
|
|
8
|
+
variant?: ControlVariant;
|
|
9
|
+
};
|
|
10
|
+
export declare function InputGroup({ className, size, variant, ...props }: InputGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
7
11
|
export type InputGroupAddonAlign = 'inline-start' | 'inline-end' | 'block-start' | 'block-end';
|
|
8
12
|
export type InputGroupAddonProps = ComponentProps<'div'> & {
|
|
9
13
|
align?: InputGroupAddonAlign;
|
|
@@ -18,7 +22,9 @@ export type InputGroupButtonProps = Omit<ButtonProps, 'size' | 'type' | 'variant
|
|
|
18
22
|
export declare function InputGroupButton({ className, type, variant, size, ...props }: InputGroupButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
23
|
export type InputGroupTextProps = ComponentProps<'span'>;
|
|
20
24
|
export declare function InputGroupText({ className, ...props }: InputGroupTextProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export type InputGroupInputProps = InputProps
|
|
25
|
+
export type InputGroupInputProps = Omit<InputProps, 'size' | 'variant'>;
|
|
22
26
|
export declare function InputGroupInput({ className, ...props }: InputGroupInputProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
|
|
27
|
+
type WithoutAppearance<T> = T extends unknown ? Omit<T, 'size' | 'variant'> : never;
|
|
28
|
+
export type InputGroupTextareaProps = WithoutAppearance<TextareaProps>;
|
|
24
29
|
export declare function InputGroupTextarea({ className, ...props }: InputGroupTextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export {};
|