@gntik-ai/templates 0.5.0 → 0.7.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/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { ActiveFilter, ActivityItem, ApiKeyExpiry, ApiKeyScope, AppSidebarFooterProps, AppSidebarHeaderProps, AppTopbarProps, BillingCycle, BillingPlan, ChartCardProps, ChartCardRange, CodeFile, CodePanelProps, CodeProblem, CommentAuthor, ConsoleEntry, CostPoint, CreateApiKeyInput, DangerZoneAction, DataTableColumn, DeploymentRow, DescriptionItem, DeviceSession, EvalMetric, EvalRow, FaqItem, Feature, FeedbackAction, FilterField, FlowBuilderProps, FlowEdge, FlowNode, FlowNodeKind, ForgotPasswordFormProps, Invitation as Invitation$1, InvitePayload, Invoice, KpiItem, LogLine, MarketingAction, Member, MfaMethod, ModelKey, NotificationChannel, NotificationEvent, NotificationMatrixValue, PageChromeAction, PageHeaderMetaItem, PaletteItem, PaymentMethod, PricingCycle, PricingTier, Profile, PromptRunInput, Quota, ResourceAction, ResourceCard, RoleOption, SavedView, SignInFormProps, SignInValues, SignUpValues, SsoProvider, StatusEvent, ThreadComment, TokenUsagePeriod, TraceSpan } from "@gntik-ai/blocks";
3
- import { BreadcrumbItem, DateRange, KanbanCard, KanbanColumn, KanbanMove, ListInputPair, MegaMenuItem, NavGroup, NavItem, NotificationItem, OutlineItem, PowerSearchField, PowerSearchQuery, SettingsLayoutProps, SidebarLayoutProps, StatusDotTone, StepItem, TransferListItem, UserMenuUser, WizardLayoutProps, Workspace } from "@gntik-ai/ui";
3
+ import { BreadcrumbItem, DateRange, KanbanCard, KanbanColumn, KanbanMove, ListInputPair, MegaMenuItem, NavGroup, NavItem, NotificationItem, OutlineItem, PowerSearchField, PowerSearchQuery, SettingsLayoutProps, SidebarLayoutProps, StatusDotTone, StepItem, StepStatus, TransferListItem, UserMenuUser, WizardLayoutProps, Workspace } from "@gntik-ai/ui";
4
4
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
5
5
  import { ChatFeedback, CitationSource, Suggestion } from "@gntik-ai/chat";
6
6
  import { LucideIcon } from "@gntik-ai/icons";
@@ -163,6 +163,100 @@ declare function AuditLogPage(props: Partial<AuditLogProps>): import("react").JS
163
163
  //#region src/audit-log/template.meta.d.ts
164
164
  declare const meta$2: TemplateMeta;
165
165
  //#endregion
166
+ //#region src/create-wizard/flow-types.d.ts
167
+ type CreateWizardFieldErrors<V> = Partial<Record<keyof V, string>>;
168
+ interface CreateWizardFlowStep<V> {
169
+ id: string;
170
+ label: string;
171
+ /** Render fixed values as text. Field errors are ignored on a read-only step. */
172
+ readOnly?: boolean;
173
+ render: (context: {
174
+ values: V;
175
+ setValue: <K extends keyof V>(key: K, value: V[K]) => void;
176
+ errors: CreateWizardFieldErrors<V>;
177
+ }) => ReactNode;
178
+ /** Pure validation, evaluated on every render, including caller re-renders. */
179
+ validate?: (values: V) => {
180
+ fieldErrors?: CreateWizardFieldErrors<V>;
181
+ blocking?: string;
182
+ };
183
+ }
184
+ interface CreateWizardFlowLabels {
185
+ title: string;
186
+ exit: string;
187
+ cancel: string;
188
+ back: string;
189
+ next: string;
190
+ finish: string;
191
+ pending: string;
192
+ review: string;
193
+ reviewTitle: string;
194
+ edit: (stepLabel: string) => string;
195
+ emptyValue: string;
196
+ success: (result: unknown) => string;
197
+ errorFallback: string;
198
+ openResource: string;
199
+ exitTitle: string;
200
+ exitDescription: string;
201
+ exitConfirm: string;
202
+ exitCancel: string;
203
+ steps: string;
204
+ stepsSummary: string;
205
+ stepStatusText: Record<StepStatus, string>;
206
+ formatStepCount: (position: number, total: number) => string;
207
+ stepAnnouncement: (step: {
208
+ position: number;
209
+ total: number;
210
+ label: ReactNode;
211
+ }) => string;
212
+ skipLink: string;
213
+ }
214
+ type CreateWizardSubmitState = {
215
+ status: 'idle';
216
+ } | {
217
+ status: 'submitting';
218
+ } | {
219
+ status: 'success';
220
+ result?: unknown;
221
+ } | {
222
+ status: 'error';
223
+ error?: unknown;
224
+ message?: string;
225
+ };
226
+ interface CreateWizardFlowProps<V extends object> extends Pick<WizardLayoutProps, 'mode' | 'size' | 'open' | 'onOpenChange' | 'description' | 'returnFocusRef' | 'closeOnInteractOutside' | 'confirmExit'> {
227
+ flowSteps: readonly CreateWizardFlowStep<V>[];
228
+ initialValues: V;
229
+ summary: (values: V) => readonly {
230
+ stepId: string;
231
+ label: string;
232
+ value?: string | null;
233
+ }[];
234
+ labels: CreateWizardFlowLabels;
235
+ onFinish: (values: V, context: {
236
+ signal: AbortSignal;
237
+ }) => void | Promise<unknown>;
238
+ onExit: () => void;
239
+ onComplete?: (result: unknown) => void;
240
+ /** Mode is fixed at mount. Controlled callers discard aborted completions and reset to idle on exit. */
241
+ submitState?: CreateWizardSubmitState;
242
+ resourceHref?: (result: unknown) => string | undefined;
243
+ errorMessage?: (error: unknown) => string | undefined;
244
+ /** Legacy-only props cannot mix with flow mode. */
245
+ copy?: never;
246
+ steps?: never;
247
+ sources?: never;
248
+ regions?: never;
249
+ title?: never;
250
+ onStepChange?: never;
251
+ stepFeedback?: never;
252
+ pendingLabel?: never;
253
+ stepAnnouncement?: never;
254
+ }
255
+ //#endregion
256
+ //#region src/create-wizard/Flow.d.ts
257
+ /** Additive caller-defined flow; the legacy page retains its original props and defaults. */
258
+ export declare function CreateWizardFlow<V extends object>(props: CreateWizardFlowProps<V>): import("react").JSX.Element;
259
+ //#endregion
166
260
  //#region src/create-wizard/data.d.ts
167
261
  interface WizardValues {
168
262
  name: string;
@@ -237,11 +331,30 @@ interface CreateWizardProps extends Pick<WizardLayoutProps, 'mode' | 'size' | 'o
237
331
  /** Step titles, field labels, submit label…; unset keys keep the default (project) wording. */
238
332
  copy: Partial<CreateWizardCopy>;
239
333
  }
240
- /** Multi-step create flow in the focus-mode WizardLayout, ending in a review of every answer. */
241
- declare function CreateWizardPage({ title, steps, initialValues, sources, regions, onFinish, onExit, onStepChange, copy: copyOverrides, stepFeedback, ...presentation }: Partial<CreateWizardProps>): import("react").JSX.Element;
334
+ /** flowSteps selects the additive variant; legacy props cannot be combined with it. */
335
+ declare function CreateWizardPage(props: Partial<CreateWizardProps> & {
336
+ flowSteps?: never;
337
+ labels?: never;
338
+ summary?: never;
339
+ submitState?: never;
340
+ onComplete?: never;
341
+ resourceHref?: never;
342
+ errorMessage?: never;
343
+ }): ReactElement;
344
+ declare function CreateWizardPage<V extends object>(props: CreateWizardFlowProps<V>): ReactElement;
242
345
  //#endregion
243
346
  //#region src/create-wizard/template.meta.d.ts
244
- declare const meta$7: TemplateMeta;
347
+ declare const meta$7: {
348
+ name: string;
349
+ family: "Resources";
350
+ priority: "P2";
351
+ status: "beta";
352
+ description: string;
353
+ layout: string;
354
+ blocks: string[];
355
+ pattern: string;
356
+ keyboard: [string, string][];
357
+ };
245
358
  //#endregion
246
359
  //#region src/create-workspace/data.d.ts
247
360
  interface WorkspaceValues {
@@ -2416,5 +2529,5 @@ declare function IncidentBoardPage(props: Partial<IncidentBoardProps>): import("
2416
2529
  //#region src/incident-board/template.meta.d.ts
2417
2530
  declare const meta$16: TemplateMeta;
2418
2531
  //#endregion
2419
- export { AcceptInvitationPage, type AcceptInvitationPageProps, type ApiKey, type ArticleFeedbackValue, type ArticleLink, AssistantChatPage, type AssistantChatProps, type AssistantTool, type AuditEvent, AuditLogPage, type AuditLogProps, type AuditResult, type BoardCard, type BoardColumn, BoardPage, type BoardProps, type BoardState, type ChangelogEntry, ChangelogPage, type ChangelogProps, type ChangelogTag, CodeEditorPage, type CodeEditorPageProps, type ComparisonRow, type ComparisonSection, type ComparisonValue, type Connector, type ConsoleShellProps, ContactPage, type ContactProps, type ContactTopic, type ContactValues, type Conversation, type CreateWizardCopy, CreateWizardPage, type CreateWizardProps, CreateWorkspacePage, type CreateWorkspaceProps, DataExplorerPage, type DataExplorerProps, type Density, type DirectMessage, type DocLink, DocsArticlePage, type DocsArticleProps, type EvalRegression, type EvalSample, EvaluationsPage, type EvaluationsProps, type ExplorerField, type ExplorerRow, type FlowBuilderPageProps, ForgotPasswordPage, type ForgotPasswordPageProps, type GalleryView, GettingStartedPage, type GettingStartedProps, type HelpArticle, type HelpCategory, HelpHomePage, type HelpHomeProps, HomeDashboardPage, type HomeDashboardProps, type HomeSecondaryChart, type InboxCategory, type InboxFilter, type InboxNotification, type Incident, IncidentBoardPage, type IncidentBoardProps, IncidentConsolePage, type IncidentConsoleProps, type IncidentField, type IncidentSeverity, type IncidentStatus, type Invitation, type KeyboardShortcutsDialogProps, KeyboardShortcutsPage, type KeyboardShortcutsProps, LandingPage, type LandingProps, type LanguageOption, type LiveEvent, LiveEventStreamPage, type LiveEventStreamProps, type LiveEventStreamStatus, type MessageAttachment, MessagingPage, type MessagingProps, type MfaChallengePageProps, MfaChallengePage as MfaPage, ModelProvidersPage, type ModelProvidersProps, type NewModelKeyInput, type WorkspaceValues as NewWorkspaceValues, NotificationInboxPage, type NotificationInboxProps, type Office, type PasswordChange, type PendingActivationAction, type PendingActivationLink, PendingActivationPage, type PendingActivationPageProps, type PlaygroundModel, type PlaygroundOutput, PricingPage, type PricingProps, type ProfileDetail, type ProfileFormValues, PromptPlaygroundPage, type PromptPlaygroundProps, type ProviderUsageLimit, type PublicHubAction, PublicHubPage, type PublicHubPageProps, type QuickAction, type RadarPoint, type RegionOption, type RequestPoint, ResetPasswordPage, type ResetPasswordPageProps, type ResourceBulkAction, ResourceDetailPage, type ResourceDetailProps, type ResourceDetailTab, ResourceFormPage, type ResourceFormProps, type ResourceFormValues, ResourceGalleryPage, type ResourceGalleryProps, type ResourceGroupBy, ResourceIndexPage, type ResourceIndexProps, type ResourceKind, type RegionOption$1 as ResourceRegionOption, type ResourceRow, type ResourceSettings, ResourceTreePage, type ResourceTreeProps, type RolePermission, RunTracePage, type RunTraceProps, type ScorecardMetric, ScorecardPage, type ScorecardProps, type SearchFacet, type SearchHit, type SearchResultType, SearchResultsPage, type SearchResultsProps, type SearchSelection, type SelectOption, SettingsApiKeysPage, type SettingsApiKeysProps, SettingsAppearancePage, type SettingsAppearanceProps, SettingsBillingPage, type SettingsBillingProps, type SettingsFrameOptions, type SettingsFrameProps, SettingsIntegrationsPage, type SettingsIntegrationsProps, SettingsMembersPage, type SettingsMembersProps, type SettingsNavExtraItem, SettingsNotificationsPage, type SettingsNotificationsProps, type SettingsPageId, SettingsProfilePage, type SettingsProfileProps, SettingsSecurityPage, type SettingsSecurityProps, SettingsWorkspacePage, type SettingsWorkspaceProps, type SetupTask, ShellSidebarPage, type ShellSidebarPageProps, ShellTopnavPage, type ShellTopnavPageProps, type Shortcut, type ShortcutGroup, SignInCardPage, type SignInCardPageProps, SignInPage, type SignInPageProps, SignUpPage, type SignUpPageProps, type SignatureHeader, type SourceOption, type SpanDetail, SsoLoginPage, type SsoLoginPageProps, Status403Page, type Status403Props, Status404Page, type Status404Props, Status500Page, type Status500Props, StatusMaintenancePage, type StatusMaintenanceProps, type TemplateMeta, type TraceRun, type TrafficPoint, type TreeResource, type TriageIncident, type TriageSeverity, type TriageStage, UpgradeRequiredPage, type UpgradeRequiredProps, UsageAnalyticsPage, type UsageAnalyticsProps, type UsageExportRequest, type UsageRow, VerifyEmailPage, type VerifyEmailPageProps, type WebhookDelivery, type WebhookEndpoint, type WizardRegion, type WizardValues, FlowBuilderPage as WorkflowBuilderPage, type WorkspaceRegion, type WorkspaceValues$1 as WorkspaceValues, meta as acceptInvitationTemplateMeta, meta$1 as assistantChatTemplateMeta, meta$2 as auditLogTemplateMeta, meta$3 as boardTemplateMeta, meta$4 as changelogTemplateMeta, meta$5 as codeEditorTemplateMeta, meta$6 as contactTemplateMeta, meta$7 as createWizardTemplateMeta, meta$8 as createWorkspaceTemplateMeta, meta$9 as dataExplorerTemplateMeta, meta$10 as docsArticleTemplateMeta, meta$11 as evaluationsTemplateMeta, meta$12 as forgotPasswordTemplateMeta, formatAge as formatIncidentAge, meta$13 as gettingStartedTemplateMeta, meta$14 as helpHomeTemplateMeta, meta$15 as homeDashboardTemplateMeta, meta$16 as incidentBoardTemplateMeta, meta$17 as incidentConsoleTemplateMeta, meta$18 as keyboardShortcutsTemplateMeta, meta$19 as landingTemplateMeta, meta$20 as liveEventStreamTemplateMeta, meta$21 as messagingTemplateMeta, meta$22 as mfaTemplateMeta, meta$23 as modelProvidersTemplateMeta, meta$24 as notificationInboxTemplateMeta, meta$25 as pendingActivationTemplateMeta, meta$26 as pricingTemplateMeta, meta$27 as promptPlaygroundTemplateMeta, meta$28 as publicHubTemplateMeta, meta$29 as resetPasswordTemplateMeta, meta$30 as resourceDetailTemplateMeta, meta$31 as resourceFormTemplateMeta, meta$32 as resourceGalleryTemplateMeta, meta$33 as resourceIndexTemplateMeta, meta$34 as resourceTreeTemplateMeta, meta$35 as runTraceTemplateMeta, meta$36 as scorecardTemplateMeta, meta$37 as searchResultsTemplateMeta, meta$38 as settingsApiKeysTemplateMeta, meta$39 as settingsAppearanceTemplateMeta, meta$40 as settingsBillingTemplateMeta, meta$41 as settingsIntegrationsTemplateMeta, meta$42 as settingsMembersTemplateMeta, meta$43 as settingsNotificationsTemplateMeta, meta$44 as settingsProfileTemplateMeta, meta$45 as settingsSecurityTemplateMeta, meta$46 as settingsWorkspaceTemplateMeta, meta$47 as shellSidebarTemplateMeta, meta$48 as shellTopnavTemplateMeta, meta$49 as signInCardTemplateMeta, meta$50 as signInTemplateMeta, meta$51 as signUpTemplateMeta, meta$52 as ssoLoginTemplateMeta, meta$53 as status403TemplateMeta, meta$54 as status404TemplateMeta, meta$55 as status500TemplateMeta, meta$56 as statusMaintenanceTemplateMeta, meta$57 as upgradeRequiredTemplateMeta, meta$58 as usageAnalyticsTemplateMeta, meta$59 as verifyEmailTemplateMeta, meta$60 as workflowBuilderTemplateMeta };
2532
+ export { AcceptInvitationPage, type AcceptInvitationPageProps, type ApiKey, type ArticleFeedbackValue, type ArticleLink, AssistantChatPage, type AssistantChatProps, type AssistantTool, type AuditEvent, AuditLogPage, type AuditLogProps, type AuditResult, type BoardCard, type BoardColumn, BoardPage, type BoardProps, type BoardState, type ChangelogEntry, ChangelogPage, type ChangelogProps, type ChangelogTag, CodeEditorPage, type CodeEditorPageProps, type ComparisonRow, type ComparisonSection, type ComparisonValue, type Connector, type ConsoleShellProps, ContactPage, type ContactProps, type ContactTopic, type ContactValues, type Conversation, type CreateWizardCopy, type CreateWizardFieldErrors, type CreateWizardFlowLabels, type CreateWizardFlowProps, type CreateWizardFlowStep, CreateWizardPage, type CreateWizardProps, type CreateWizardSubmitState, CreateWorkspacePage, type CreateWorkspaceProps, DataExplorerPage, type DataExplorerProps, type Density, type DirectMessage, type DocLink, DocsArticlePage, type DocsArticleProps, type EvalRegression, type EvalSample, EvaluationsPage, type EvaluationsProps, type ExplorerField, type ExplorerRow, type FlowBuilderPageProps, ForgotPasswordPage, type ForgotPasswordPageProps, type GalleryView, GettingStartedPage, type GettingStartedProps, type HelpArticle, type HelpCategory, HelpHomePage, type HelpHomeProps, HomeDashboardPage, type HomeDashboardProps, type HomeSecondaryChart, type InboxCategory, type InboxFilter, type InboxNotification, type Incident, IncidentBoardPage, type IncidentBoardProps, IncidentConsolePage, type IncidentConsoleProps, type IncidentField, type IncidentSeverity, type IncidentStatus, type Invitation, type KeyboardShortcutsDialogProps, KeyboardShortcutsPage, type KeyboardShortcutsProps, LandingPage, type LandingProps, type LanguageOption, type LiveEvent, LiveEventStreamPage, type LiveEventStreamProps, type LiveEventStreamStatus, type MessageAttachment, MessagingPage, type MessagingProps, type MfaChallengePageProps, MfaChallengePage as MfaPage, ModelProvidersPage, type ModelProvidersProps, type NewModelKeyInput, type WorkspaceValues as NewWorkspaceValues, NotificationInboxPage, type NotificationInboxProps, type Office, type PasswordChange, type PendingActivationAction, type PendingActivationLink, PendingActivationPage, type PendingActivationPageProps, type PlaygroundModel, type PlaygroundOutput, PricingPage, type PricingProps, type ProfileDetail, type ProfileFormValues, PromptPlaygroundPage, type PromptPlaygroundProps, type ProviderUsageLimit, type PublicHubAction, PublicHubPage, type PublicHubPageProps, type QuickAction, type RadarPoint, type RegionOption, type RequestPoint, ResetPasswordPage, type ResetPasswordPageProps, type ResourceBulkAction, ResourceDetailPage, type ResourceDetailProps, type ResourceDetailTab, ResourceFormPage, type ResourceFormProps, type ResourceFormValues, ResourceGalleryPage, type ResourceGalleryProps, type ResourceGroupBy, ResourceIndexPage, type ResourceIndexProps, type ResourceKind, type RegionOption$1 as ResourceRegionOption, type ResourceRow, type ResourceSettings, ResourceTreePage, type ResourceTreeProps, type RolePermission, RunTracePage, type RunTraceProps, type ScorecardMetric, ScorecardPage, type ScorecardProps, type SearchFacet, type SearchHit, type SearchResultType, SearchResultsPage, type SearchResultsProps, type SearchSelection, type SelectOption, SettingsApiKeysPage, type SettingsApiKeysProps, SettingsAppearancePage, type SettingsAppearanceProps, SettingsBillingPage, type SettingsBillingProps, type SettingsFrameOptions, type SettingsFrameProps, SettingsIntegrationsPage, type SettingsIntegrationsProps, SettingsMembersPage, type SettingsMembersProps, type SettingsNavExtraItem, SettingsNotificationsPage, type SettingsNotificationsProps, type SettingsPageId, SettingsProfilePage, type SettingsProfileProps, SettingsSecurityPage, type SettingsSecurityProps, SettingsWorkspacePage, type SettingsWorkspaceProps, type SetupTask, ShellSidebarPage, type ShellSidebarPageProps, ShellTopnavPage, type ShellTopnavPageProps, type Shortcut, type ShortcutGroup, SignInCardPage, type SignInCardPageProps, SignInPage, type SignInPageProps, SignUpPage, type SignUpPageProps, type SignatureHeader, type SourceOption, type SpanDetail, SsoLoginPage, type SsoLoginPageProps, Status403Page, type Status403Props, Status404Page, type Status404Props, Status500Page, type Status500Props, StatusMaintenancePage, type StatusMaintenanceProps, type TemplateMeta, type TraceRun, type TrafficPoint, type TreeResource, type TriageIncident, type TriageSeverity, type TriageStage, UpgradeRequiredPage, type UpgradeRequiredProps, UsageAnalyticsPage, type UsageAnalyticsProps, type UsageExportRequest, type UsageRow, VerifyEmailPage, type VerifyEmailPageProps, type WebhookDelivery, type WebhookEndpoint, type WizardRegion, type WizardValues, FlowBuilderPage as WorkflowBuilderPage, type WorkspaceRegion, type WorkspaceValues$1 as WorkspaceValues, meta as acceptInvitationTemplateMeta, meta$1 as assistantChatTemplateMeta, meta$2 as auditLogTemplateMeta, meta$3 as boardTemplateMeta, meta$4 as changelogTemplateMeta, meta$5 as codeEditorTemplateMeta, meta$6 as contactTemplateMeta, meta$7 as createWizardTemplateMeta, meta$8 as createWorkspaceTemplateMeta, meta$9 as dataExplorerTemplateMeta, meta$10 as docsArticleTemplateMeta, meta$11 as evaluationsTemplateMeta, meta$12 as forgotPasswordTemplateMeta, formatAge as formatIncidentAge, meta$13 as gettingStartedTemplateMeta, meta$14 as helpHomeTemplateMeta, meta$15 as homeDashboardTemplateMeta, meta$16 as incidentBoardTemplateMeta, meta$17 as incidentConsoleTemplateMeta, meta$18 as keyboardShortcutsTemplateMeta, meta$19 as landingTemplateMeta, meta$20 as liveEventStreamTemplateMeta, meta$21 as messagingTemplateMeta, meta$22 as mfaTemplateMeta, meta$23 as modelProvidersTemplateMeta, meta$24 as notificationInboxTemplateMeta, meta$25 as pendingActivationTemplateMeta, meta$26 as pricingTemplateMeta, meta$27 as promptPlaygroundTemplateMeta, meta$28 as publicHubTemplateMeta, meta$29 as resetPasswordTemplateMeta, meta$30 as resourceDetailTemplateMeta, meta$31 as resourceFormTemplateMeta, meta$32 as resourceGalleryTemplateMeta, meta$33 as resourceIndexTemplateMeta, meta$34 as resourceTreeTemplateMeta, meta$35 as runTraceTemplateMeta, meta$36 as scorecardTemplateMeta, meta$37 as searchResultsTemplateMeta, meta$38 as settingsApiKeysTemplateMeta, meta$39 as settingsAppearanceTemplateMeta, meta$40 as settingsBillingTemplateMeta, meta$41 as settingsIntegrationsTemplateMeta, meta$42 as settingsMembersTemplateMeta, meta$43 as settingsNotificationsTemplateMeta, meta$44 as settingsProfileTemplateMeta, meta$45 as settingsSecurityTemplateMeta, meta$46 as settingsWorkspaceTemplateMeta, meta$47 as shellSidebarTemplateMeta, meta$48 as shellTopnavTemplateMeta, meta$49 as signInCardTemplateMeta, meta$50 as signInTemplateMeta, meta$51 as signUpTemplateMeta, meta$52 as ssoLoginTemplateMeta, meta$53 as status403TemplateMeta, meta$54 as status404TemplateMeta, meta$55 as status500TemplateMeta, meta$56 as statusMaintenanceTemplateMeta, meta$57 as upgradeRequiredTemplateMeta, meta$58 as usageAnalyticsTemplateMeta, meta$59 as verifyEmailTemplateMeta, meta$60 as workflowBuilderTemplateMeta };
2420
2533
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { ActivityFeed, AppSidebarFooter, AppSidebarHeader, AppSidebarNav, AppTopbar, AuthHeader, BulkActionBar, ChartCard, CodePanel, CommentThread, ConfirmDestructive, CreateApiKeyDialog, DEPLOYMENT_COLUMNS, DEPLOYMENT_DETAILS, DEPLOYMENT_EVENTS, DEPLOYMENT_ROWS, DangerZone, DataTable, DateRangeFilter, DescriptionListCard, ErrorPanel, EvaluationScorecard, Faq, FeatureGrid, FileUploadPanel, FilterBar, FirstRunEmpty, FlowBuilder, ForgotPasswordForm, FormSection, Hero, InlineCallout, InviteMembersDialog, InvoiceTable, KPI_ITEMS, KpiRow, ListSkeleton, LogViewer, MembersTable, MfaChallenge, ModelKeysList, NoResultsEmpty, NotificationMatrix, PROJECT_ACTIVITY, PageHeader, PageToolbar, PaymentMethodCard, PendingInvitations, PlanCard, PricingTable, ProfileHeader, PromptEditor, QuotaMeters, RESOURCE_CARDS, ResetPasswordForm, ResourceCardGrid, SectionHeader, SessionsDevices, SettingsRow, SignInForm, SignUpForm, SsoButtons, StatusTimeline, StickyActionBar, SystemBanner, TokenCostCard, TraceWaterfall, TrendDelta, ValidationSummary, apiKeyExpiries, apiKeyScopes, appSidebarNavGroups, appSidebarUser, appSidebarUser as appSidebarUser$1, appSidebarWorkspaces, appTopbarNotifications, firstRunSteps, formatSpanDuration, generateDemoSecret, memberRoles, noAccessSample, notificationChannels, notificationDefaults, notificationEvents, sampleDeviceSessions, sampleInvitations, sampleInvoices, sampleMembers, samplePaymentMethod, samplePlan, samplePricingTiers, sampleProfile, sampleQuotas, ssoProviders, ssoProviders as ssoProviders$1 } from "@gntik-ai/blocks";
3
- import { Alert, AuthLayout, Avatar, AvatarGroup, Badge, Blockquote, Breadcrumbs, Button, CanvasLayout, Card, CardBody, CardDescription, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClickableCard, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, Drawer, DrawerBody, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle, EmptyState, Field, FieldDescription, FieldError, FieldLabel, Grid, GridItem, HStack, Heading, IconButton, Input, InspectorLayout, InspectorToggle, JsonViewer, KanbanBoard, Kbd, KbdCombo, Link, ListInput, LiveAnnouncer, Logo, MegaMenu, MenuItem, MenuSeparator, Meter, MobileNav, NavList, OtpInput, OverflowList, Page, PasswordInput, PowerSearch, Progress, Section, Select, SelectContent, SelectItem, SelectTrigger, SelectableCard, SelectableCardGroup, Separator, SettingsLayout, SidebarLayout, SimpleSelect, Skeleton, Spinner, SplitLayout, Stack, StackedLayout, StatusDot, StatusLayout, StatusTag, Switch, Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, Textarea, ThemeSwitcher, Thumbnail, ThumbnailList, Timer, Timestamp, Toggle, ToggleGroup, TokenInput, TooltipProvider, TransferList, TreeList, VisuallyHidden, WizardLayout, cn, emptyPowerSearchQuery, formatPowerSearch, matchPowerSearch, megaMenuNavItems, moveKanbanCard, parsePowerSearch, useAnnounce, useI18n, useInspectorLayout, useTheme } from "@gntik-ai/ui";
3
+ import { Alert, AuthLayout, Avatar, AvatarGroup, Badge, Blockquote, Breadcrumbs, Button, CanvasLayout, Card, CardBody, CardDescription, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClickableCard, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, Drawer, DrawerBody, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle, EmptyState, Field, FieldDescription, FieldError, FieldLabel, Grid, GridItem, HStack, Heading, IconButton, Input, InspectorLayout, InspectorToggle, JsonViewer, KanbanBoard, Kbd, KbdCombo, Link, ListInput, LiveAnnouncer, Logo, MegaMenu, MenuItem, MenuSeparator, Meter, MobileNav, NavList, OtpInput, OverflowList, Page, PasswordInput, PowerSearch, Progress, Section, Select, SelectContent, SelectItem, SelectTrigger, SelectableCard, SelectableCardGroup, Separator, SettingsLayout, SidebarLayout, SimpleSelect, Skeleton, Spinner, SplitLayout, Stack, StackedLayout, StatusDot, StatusLayout, StatusTag, Switch, Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, Textarea, ThemeSwitcher, Thumbnail, ThumbnailList, Timer, Timestamp, Toggle, ToggleGroup, TokenInput, TooltipProvider, TransferList, TreeList, VisuallyHidden, WizardLayout, cn, emptyPowerSearchQuery, formatPowerSearch, matchPowerSearch, megaMenuNavItems, moveKanbanCard, parsePowerSearch, useAnnounce, useHasLiveAnnouncer, useI18n, useInspectorLayout, useTheme } from "@gntik-ai/ui";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- import { Fragment as Fragment$1, createElement, useEffect, useId, useMemo, useRef, useState } from "react";
5
+ import { Fragment as Fragment$1, createElement, useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
6
6
  import { ChatAnnouncer, ChatComposer, ChatLayout, ChatMessage, CitationList, Markdown, SuggestionChips, ToolCallCard } from "@gntik-ai/chat";
7
7
  import { Archive, ArrowLeft, ArrowRight, BarChart3, Bell, BellOff, BellRing, BookOpen, Braces, Building2, CalendarClock, Check, CheckCheck, CircleCheck, Clock, Code2, Columns3, Copy, Cpu, CreditCard, Database, Download, ExternalLink, FileCode, FileDiff, FileJson, FileQuestion, FileSearch, FileText, Folder, FolderKanban, FolderOpen, GitBranch, Globe, GripVertical, Hand, HardDrive, Home, KeyRound, Keyboard, LayoutGrid, LayoutTemplate, LifeBuoy, ListOrdered, ListTodo, Lock, Mail, MailOpen, MapPin, MessageSquare, MessagesSquare, Minus, Palette, Phone, Play, PlayCircle, Plug, Plus, RefreshCw, Rocket, RotateCcw, RotateCw, Rss, Save, Search, SearchX, Send, Server, ServerCrash, Shield, ShieldCheck, Square, SquarePen, Table2, ThumbsDown, ThumbsUp, Trash2, Upload, User, UserPlus, Users, Wrench, X } from "@gntik-ai/icons";
8
8
  import { Heatmap, MiniBar, RadarChart, chartFmt } from "@gntik-ai/charts";
@@ -986,6 +986,269 @@ const meta$2 = {
986
986
  ]
987
987
  };
988
988
  //#endregion
989
+ //#region src/create-wizard/useSubmitState.ts
990
+ const IDLE = { status: "idle" };
991
+ /** Owns attempts, never transport; controlled callers own all settled state. */
992
+ function useSubmitState(props) {
993
+ const [controlled] = useState(() => props.submitState !== void 0);
994
+ const [internal, setInternal] = useState({ status: "idle" });
995
+ const attempt = useRef(null);
996
+ const state = controlled ? props.submitState ?? IDLE : internal;
997
+ const announce = useAnnounce();
998
+ const previous = useRef(state.status);
999
+ const lastError = useRef("");
1000
+ const complete = useEffectEvent((result) => props.onComplete?.(result));
1001
+ const errorText = state.status === "error" ? state.message || props.errorMessage?.(state.error) || props.labels.errorFallback : "";
1002
+ const successText = state.status === "success" ? props.labels.success(state.result) : "";
1003
+ useEffect(() => () => {
1004
+ attempt.current?.abort();
1005
+ }, []);
1006
+ useEffect(() => {
1007
+ const was = previous.current;
1008
+ previous.current = state.status;
1009
+ if (state.status === "error" && (was === "submitting" || was === "error" && lastError.current !== errorText)) announce(errorText, "assertive");
1010
+ lastError.current = errorText;
1011
+ if (state.status !== "success" || was !== "submitting") return;
1012
+ const controller = attempt.current;
1013
+ announce(successText);
1014
+ if (!controlled && controller) requestAnimationFrame(() => {
1015
+ if (!controller.signal.aborted && attempt.current === controller) complete(state.result);
1016
+ });
1017
+ }, [
1018
+ state,
1019
+ successText,
1020
+ errorText,
1021
+ announce,
1022
+ controlled
1023
+ ]);
1024
+ const finish = async (values) => {
1025
+ if (state.status === "submitting" || state.status === "success") return;
1026
+ attempt.current?.abort();
1027
+ const controller = new AbortController();
1028
+ attempt.current = controller;
1029
+ if (!controlled) {
1030
+ previous.current = "submitting";
1031
+ setInternal({ status: "submitting" });
1032
+ }
1033
+ try {
1034
+ const result = await props.onFinish(values, { signal: controller.signal });
1035
+ if (!controlled && !controller.signal.aborted) setInternal({
1036
+ status: "success",
1037
+ result
1038
+ });
1039
+ } catch (error) {
1040
+ if (!controlled && !controller.signal.aborted) setInternal({
1041
+ status: "error",
1042
+ error
1043
+ });
1044
+ }
1045
+ };
1046
+ const reset = () => {
1047
+ attempt.current?.abort();
1048
+ attempt.current = null;
1049
+ previous.current = "idle";
1050
+ if (!controlled) setInternal({ status: "idle" });
1051
+ };
1052
+ return {
1053
+ state,
1054
+ finish,
1055
+ reset,
1056
+ successText,
1057
+ errorText
1058
+ };
1059
+ }
1060
+ //#endregion
1061
+ //#region src/create-wizard/Flow.tsx
1062
+ /** Additive caller-defined flow; the legacy page retains its original props and defaults. */
1063
+ function CreateWizardFlow(props) {
1064
+ return useHasLiveAnnouncer() ? /* @__PURE__ */ jsx(Flow, { ...props }) : /* @__PURE__ */ jsx(LiveAnnouncer, { children: /* @__PURE__ */ jsx(Flow, { ...props }) });
1065
+ }
1066
+ function Flow(props) {
1067
+ const { flowSteps, initialValues, summary, labels, onExit } = props;
1068
+ const { state, finish, reset, successText, errorText } = useSubmitState(props);
1069
+ const id = useId();
1070
+ const announce = useAnnounce();
1071
+ const focused = useRef(null);
1072
+ const [step, setStep] = useState(() => props.submitState && props.submitState.status !== "idle" ? flowSteps.length : 0);
1073
+ const [values, setValues] = useState(initialValues);
1074
+ const [visited, setVisited] = useState(/* @__PURE__ */ new Set());
1075
+ const [invalidPress, setInvalidPress] = useState(0);
1076
+ const body = useRef(null);
1077
+ const editFocus = useRef(false);
1078
+ const current = flowSteps[step];
1079
+ const validation = current?.validate?.(values);
1080
+ const fieldErrors = current?.readOnly ? {} : validation?.fieldErrors ?? {};
1081
+ const errors = current && visited.has(current.id) ? fieldErrors : {};
1082
+ const blocking = validation?.blocking;
1083
+ const locked = state.status === "submitting" || state.status === "success";
1084
+ const resource = state.status === "success" && state.result != null ? props.resourceHref?.(state.result) : void 0;
1085
+ const headingId = `${id}-heading`;
1086
+ const steps = [...flowSteps.map(({ id, label }) => ({
1087
+ id,
1088
+ label
1089
+ })), {
1090
+ id: `${id}-review`,
1091
+ label: labels.review
1092
+ }];
1093
+ const active = props.mode !== "overlay" || props.open === true;
1094
+ useEffect(() => {
1095
+ if (!active || !blocking) return;
1096
+ const frame = requestAnimationFrame(() => announce(blocking));
1097
+ return () => cancelAnimationFrame(frame);
1098
+ }, [
1099
+ active,
1100
+ step,
1101
+ blocking,
1102
+ announce
1103
+ ]);
1104
+ const announceStep = useEffectEvent(() => {
1105
+ if (!blocking && (current || state.status === "idle")) announce(labels.stepAnnouncement({
1106
+ position: step + 1,
1107
+ total: flowSteps.length + 1,
1108
+ label: current?.label ?? labels.review
1109
+ }));
1110
+ });
1111
+ useEffect(() => {
1112
+ if (!active || props.mode !== "overlay") return;
1113
+ const frame = requestAnimationFrame(() => announceStep());
1114
+ return () => cancelAnimationFrame(frame);
1115
+ }, [
1116
+ active,
1117
+ step,
1118
+ props.mode
1119
+ ]);
1120
+ useLayoutEffect(() => {
1121
+ const previous = focused.current;
1122
+ if (!active || !previous) return;
1123
+ const disabled = previous.matches(":disabled");
1124
+ const removed = !previous.isConnected;
1125
+ if ((disabled || removed) && (document.activeElement === previous || document.activeElement === document.body)) (state.status === "success" ? body.current?.querySelector("[data-flow-success] a[href]") ?? body.current?.querySelector("[data-flow-success] h2") : body.current?.querySelector("h1"))?.focus();
1126
+ });
1127
+ useLayoutEffect(() => {
1128
+ if (invalidPress) body.current?.querySelector("[aria-invalid=\"true\"]")?.focus();
1129
+ }, [invalidPress]);
1130
+ useLayoutEffect(() => {
1131
+ if (editFocus.current) {
1132
+ body.current?.querySelector("h1")?.focus();
1133
+ editFocus.current = false;
1134
+ }
1135
+ }, [step]);
1136
+ const go = (next) => {
1137
+ if (locked || next > step && blocking) return;
1138
+ if (next > step && current) setVisited((previous) => /* @__PURE__ */ new Set([...previous, current.id]));
1139
+ if (next > step && current && Object.values(fieldErrors).some(Boolean)) {
1140
+ setInvalidPress((press) => press + 1);
1141
+ return;
1142
+ }
1143
+ setStep(next);
1144
+ };
1145
+ const rows = current ? [] : summary(values);
1146
+ return /* @__PURE__ */ jsx(WizardLayout, {
1147
+ mode: props.mode,
1148
+ size: props.size,
1149
+ open: props.open,
1150
+ onOpenChange: props.onOpenChange,
1151
+ description: props.description,
1152
+ returnFocusRef: props.returnFocusRef,
1153
+ closeOnInteractOutside: props.closeOnInteractOutside,
1154
+ confirmExit: props.confirmExit,
1155
+ fullScreen: true,
1156
+ title: labels.title,
1157
+ steps,
1158
+ current: step,
1159
+ onFocusCapture: (event) => {
1160
+ if (event.target instanceof HTMLElement) focused.current = event.target;
1161
+ },
1162
+ onStepChange: go,
1163
+ stepsInteractive: false,
1164
+ nextDisabled: Boolean(blocking) || state.status === "success",
1165
+ backDisabled: locked,
1166
+ onExit: () => {
1167
+ reset();
1168
+ setValues(initialValues);
1169
+ setStep(0);
1170
+ setVisited(/* @__PURE__ */ new Set());
1171
+ setInvalidPress(0);
1172
+ onExit();
1173
+ },
1174
+ onFinish: () => void finish(values),
1175
+ nextLoading: state.status === "submitting",
1176
+ exitLabel: labels.exit,
1177
+ backLabel: labels.back,
1178
+ nextLabel: labels.next,
1179
+ finishLabel: state.status === "submitting" ? labels.pending : labels.finish,
1180
+ pendingLabel: labels.pending,
1181
+ cancelLabel: labels.cancel,
1182
+ stepsLabel: labels.steps,
1183
+ stepsSummaryLabel: labels.stepsSummary,
1184
+ skipLinkLabel: labels.skipLink,
1185
+ stepStatusText: labels.stepStatusText,
1186
+ formatStepCount: labels.formatStepCount,
1187
+ stepAnnouncement: () => "",
1188
+ exitTitle: labels.exitTitle,
1189
+ exitDescription: labels.exitDescription,
1190
+ exitConfirmLabel: labels.exitConfirm,
1191
+ exitCancelLabel: labels.exitCancel,
1192
+ children: /* @__PURE__ */ jsx("section", {
1193
+ ref: body,
1194
+ "aria-labelledby": headingId,
1195
+ children: /* @__PURE__ */ jsxs(Stack, {
1196
+ gap: 6,
1197
+ children: [
1198
+ /* @__PURE__ */ jsx(Heading, {
1199
+ level: 1,
1200
+ id: headingId,
1201
+ tabIndex: -1,
1202
+ size: "lg",
1203
+ children: current?.label ?? labels.reviewTitle
1204
+ }),
1205
+ current ? current.render({
1206
+ values,
1207
+ setValue: (key, value) => setValues((previous) => ({
1208
+ ...previous,
1209
+ [key]: value
1210
+ })),
1211
+ errors
1212
+ }) : flowSteps.map((source, index) => /* @__PURE__ */ jsx(DescriptionListCard, {
1213
+ titleAs: "h2",
1214
+ title: source.label,
1215
+ description: "",
1216
+ editLabel: labels.edit(source.label),
1217
+ onEdit: locked ? void 0 : () => {
1218
+ editFocus.current = true;
1219
+ go(index);
1220
+ },
1221
+ items: rows.filter((row) => row.stepId === source.id).map((row, rowIndex) => ({
1222
+ id: `${source.id}-${rowIndex}`,
1223
+ label: row.label,
1224
+ value: row.value || labels.emptyValue
1225
+ }))
1226
+ }, source.id)),
1227
+ state.status === "error" && /* @__PURE__ */ jsx("p", {
1228
+ className: "text-destructive-text",
1229
+ children: errorText
1230
+ }),
1231
+ state.status === "success" && /* @__PURE__ */ jsxs("div", {
1232
+ "data-flow-success": true,
1233
+ children: [/* @__PURE__ */ jsx(Heading, {
1234
+ level: 2,
1235
+ tabIndex: -1,
1236
+ children: successText
1237
+ }), resource && /* @__PURE__ */ jsx(Link, {
1238
+ href: resource,
1239
+ children: labels.openResource
1240
+ })]
1241
+ }),
1242
+ blocking && /* @__PURE__ */ jsx("p", {
1243
+ className: "text-destructive-text",
1244
+ children: blocking
1245
+ })
1246
+ ]
1247
+ })
1248
+ })
1249
+ });
1250
+ }
1251
+ //#endregion
989
1252
  //#region src/create-wizard/data.ts
990
1253
  const wizardSteps = [
991
1254
  {
@@ -1101,7 +1364,7 @@ function StepIntro$1({ id, title, children }) {
1101
1364
  });
1102
1365
  }
1103
1366
  /** Multi-step create flow in the focus-mode WizardLayout, ending in a review of every answer. */
1104
- function CreateWizardPage({ title = "New project", steps = wizardSteps, initialValues = wizardInitialValues, sources = wizardSources, regions = wizardRegions, onFinish, onExit, onStepChange, copy: copyOverrides, stepFeedback, ...presentation }) {
1367
+ function LegacyCreateWizardPage({ title = "New project", steps = wizardSteps, initialValues = wizardInitialValues, sources = wizardSources, regions = wizardRegions, onFinish, onExit, onStepChange, copy: copyOverrides, stepFeedback, ...presentation }) {
1105
1368
  const copy = {
1106
1369
  ...wizardCopy,
1107
1370
  ...copyOverrides
@@ -1304,6 +1567,10 @@ function CreateWizardPage({ title = "New project", steps = wizardSteps, initialV
1304
1567
  ]
1305
1568
  });
1306
1569
  }
1570
+ function CreateWizardPage(props) {
1571
+ if (props.flowSteps !== void 0) return /* @__PURE__ */ jsx(CreateWizardFlow, { ...props });
1572
+ return /* @__PURE__ */ jsx(LegacyCreateWizardPage, { ...props });
1573
+ }
1307
1574
  //#endregion
1308
1575
  //#region src/create-wizard/template.meta.ts
1309
1576
  const meta$7 = {
@@ -1311,12 +1578,62 @@ const meta$7 = {
1311
1578
  family: "Resources",
1312
1579
  priority: "P2",
1313
1580
  status: "beta",
1314
- description: "Focus-mode create flow: details, source, configuration and editable review cards. Page mode is the default; mode=\"overlay\" mounts over an existing list without a new route. Overlay size defaults to fullscreen; size=\"dialog\" uses a popup (fullscreen on mobile). Keep it mounted to preserve answers and the current step on close. The examples/Overlay.tsx demo goes from a list through Finish with step-local ErrorPanel and FirstRunEmpty surfaces. For a consumer-owned step model and validation/review slots, use dialog-wizard (default dialog size).",
1581
+ description: `Focus-mode create flow on WizardLayout. Without flowSteps, the existing details, source, configuration and editable review flow, CreateWizardProps, copy and defaults are unchanged. Page mode is the default; mode="overlay" keeps the parent list mounted without a route change. Overlay size defaults to fullscreen; size="dialog" uses a popup (fullscreen on mobile). Legacy closing preserves answers; confirming exit in flow mode resets answers and the current step.
1582
+
1583
+ ## Caller-defined flow mode
1584
+
1585
+ Import CreateWizardPage (or CreateWizardFlow) and CreateWizardFlowProps<V> from @gntik-ai/templates. flowSteps selects the additive generic variant; legacy-only props (steps, copy, sources, regions, title, stepFeedback, onStepChange) cannot mix with it. V is the caller's object type. The kit owns current step, values and validation visibility. The display-only Stepper follows the supplied order and appends review. Zero caller steps renders review directly.
1586
+
1587
+ | Prop | Type / behaviour |
1588
+ | --- | --- |
1589
+ | flowSteps | readonly { id: string; label: string; readOnly?: boolean; render({ values, setValue, errors }): ReactNode; validate?(values): { fieldErrors?, blocking? } }[]; ids must be unique and stable |
1590
+ | initialValues | V; used at mount and restored on confirmed exit |
1591
+ | summary | (values: V) => readonly { stepId: string; label: string; value?: string or null }[] |
1592
+ | labels | Required CreateWizardFlowLabels; no template-owned visible or accessible copy has a fallback |
1593
+ | onFinish | (values: V, { signal: AbortSignal }) => void or Promise<unknown>; one signal per attempt |
1594
+ | onExit | Called once after confirmed exit, after reset and abort; Stay calls nothing |
1595
+ | onComplete | Uncontrolled only; (result: unknown) => void, once after success is committed and announced |
1596
+ | submitState | Controlled when provided at mount: {status:'idle'}, {status:'submitting'}, {status:'success', result?:unknown}, or {status:'error', error?:unknown, message?:string} |
1597
+ | resourceHref | (result: unknown) => string or undefined; only called with a non-null success result |
1598
+ | errorMessage | (error: unknown) => string or undefined; empty text uses labels.errorFallback |
1599
+ | confirmExit | Defaults to true; Exit, Escape and overlay Cancel open confirmation. false exits directly |
1600
+ | mode, size, open, onOpenChange, description, returnFocusRef, closeOnInteractOutside | WizardLayout presentation props; closing itself is not confirmation or reset |
1601
+
1602
+ labels supplies title, exit, cancel, back, next, finish, pending, review (Stepper label), reviewTitle (heading), edit(stepLabel), emptyValue, success(result), errorFallback, openResource, exitTitle, exitDescription, exitConfirm, exitCancel, steps (Stepper name), stepsSummary, skipLink, stepStatusText (complete/current/upcoming/error), formatStepCount(position,total) and stepAnnouncement({position,total,label}). Positions are one-based. Step labels, validation messages, summary labels/values and rendered body content also belong to the caller's namespace. Every DescriptionListCard receives the owning step label as its explicit title, labels.edit(stepLabel), explicit items and an empty description. All steps get a card, even with no matching rows; empty values use labels.emptyValue.
1603
+
1604
+ ## Validation and navigation
1605
+
1606
+ validate runs on every render, including caller re-renders (for example members.count quota changes). A non-empty blocking message disables Next immediately. It is visible as ordinary text and announced politely once per new value, including entry and one frame after overlay opening. Clearing blocking re-enables Next without a press. fieldErrors is Partial<Record<keyof V,string>>. Errors become visible after the first Next press on their step and remain live thereafter. With errors, Next does not advance and focuses the first aria-invalid="true" field. Render fields using Field invalid, FieldLabel, Input and FieldError to associate errors and controls. Blocking does not hide visible field errors. A readOnly step must render its fixed value as text, without editable controls; only its blocking result gates Next and its fieldErrors are ignored. Back, Next and review Edit preserve values. Edit returns to the owning step and focuses its heading. No direct Stepper jumps are available.
1607
+
1608
+ ## Submit ownership and aborts
1609
+
1610
+ In uncontrolled mode, Finish shows labels.pending in both presentations. Resolve commits success, announces labels.success(result) politely, then calls onComplete(result) once. Reject keeps values and review, renders errorMessage(error) or labels.errorFallback, announces assertively and re-enables Finish. Identical repeated failures each announce; changing settled error text announces once, unchanged text does not. Visible success, error and blocking text is never a live region. All announcements use useAnnounce from the nearest LiveAnnouncer; the template provides one only when needed. Put LiveAnnouncer at page level when onComplete closes/unmounts the flow, so the message survives.
1611
+
1612
+ Controlled mode renders submitState only. Each enabled Finish press calls the existing onFinish once; its returned result never changes kit state and onComplete is never called. The caller must pass through submitting for every attempt, discard completions when signal.aborted, and reset submitState to idle in onExit before reopening. Switching between controlled and uncontrolled after mount is unsupported. AbortSignal is a cancellation contract, not a transport: callers must honor it. Confirmed exit and unmount abort the current attempt. Uncontrolled aborted settlements cannot update state, announce or complete, including an older attempt settling after reopening.
1613
+
1614
+ While submitting or after success, Back has backDisabled (aria-disabled but focusable), review cards have no Edit, and Finish is loading or disabled. Exit remains enabled. Pending Finish and locked Back retain focus. A focused control becoming disabled or removed sends focus on success to the resource link, or to the success heading (tabIndex=-1) if no result/href exists; in all other cases it goes to the current heading. Focus never moves to a live region. Page Back/Next preserve focus unless the pressed control becomes disabled. Overlay step changes focus the new heading and announce via LiveAnnouncer. Escape in a portalled Select or Menu stays local.
1615
+
1616
+ ## Examples
1617
+
1618
+ examples/Invite.tsx is a generic single-recipient invite with a read-only workspace context, one email checked against /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/, a members.count quota, exactly Owner/Admin/Member roles, and an optional message with maxLength=500. Its copy is one English page namespace. examples/labels.ts lists every required label. UncontrolledPending, UncontrolledSuccess and UncontrolledError cover a never-settling attempt, a success resource link and a failure fallback. ControlledIdle, ControlledSubmitting, ControlledSuccess and ControlledError show each caller-owned state. Every example has a create-wizard--<kebab-name> preview entry; Invite uses create-wizard--invite. The three-theme browser axe loop visits each step, review, submit state and exit confirmation. examples/Overlay.tsx retains the original list-to-overlay project flow with step-local error and empty surfaces.
1619
+
1620
+ A controlled caller's onFinish can use this pattern (with its own transport, values and state): setSubmitState({status:'submitting'}); try { const result = await save(values, {signal}); if (!signal.aborted) setSubmitState({status:'success',result}); } catch (error) { if (!signal.aborted) setSubmitState({status:'error',error}); }. onExit resets to idle before reopening. Keep the page-level LiveAnnouncer mounted when closing.
1621
+
1622
+ All flow surfaces reuse kit components and existing tokens; no new CSS variables. Themes: dark, light and high_contrast.`,
1315
1623
  layout: "WizardLayout",
1316
1624
  blocks: [
1317
1625
  "description-list-card",
1318
1626
  "error-panel",
1319
1627
  "empty-states"
1628
+ ],
1629
+ pattern: "Caller-defined steps and review with display-only progress; explicit labels; field-error associations; one LiveAnnouncer announcement mechanism; abortable submit lifecycle.",
1630
+ keyboard: [
1631
+ ["Tab / Shift+Tab", "Move through Exit, fields, review Edit and footer controls; the Stepper is display-only."],
1632
+ ["Enter / Space on Next", "Validate; focus the first invalid field, or advance. Blocking disables Next."],
1633
+ ["Enter / Space on Back", "Return one step; disabled on the first page step and locked while submitting or after success."],
1634
+ ["Enter on Edit", "Return to the owning step and focus its heading, preserving answers."],
1635
+ ["Escape / Exit", "Open exit confirmation; Stay does nothing, Leave resets answers and aborts the attempt. Portalled popups handle their own Escape."],
1636
+ ["Finish", "Call onFinish once when enabled; pending keeps focus, success hands focus to a resource link or the success heading if Finish becomes disabled."]
1320
1637
  ]
1321
1638
  };
1322
1639
  //#endregion
@@ -14515,6 +14832,6 @@ const meta$16 = {
14515
14832
  ]
14516
14833
  };
14517
14834
  //#endregion
14518
- export { AcceptInvitationPage, AssistantChatPage, AuditLogPage, BoardPage, ChangelogPage, CodeEditorPage, ConsoleShell, ContactPage, CreateWizardPage, CreateWorkspacePage, DataExplorerPage, DocsArticlePage, EvaluationsPage, ForgotPasswordPage, GettingStartedPage, HelpHomePage, HomeDashboardPage, IncidentBoardPage, IncidentConsolePage, KeyboardShortcutsDialog, KeyboardShortcutsPage, LandingPage, LiveEventStreamPage, MessagingPage, MfaChallengePage as MfaPage, ModelProvidersPage, NotificationInboxPage, PendingActivationPage, PricingPage, PromptPlaygroundPage, PublicHubPage, ResetPasswordPage, ResourceDetailPage, ResourceFormPage, ResourceGalleryPage, ResourceIndexPage, ResourceTreePage, RunTracePage, SETTINGS_TITLES, ScorecardPage, SearchResultsPage, SettingsApiKeysPage, SettingsAppearancePage, SettingsBillingPage, SettingsFrame, SettingsIntegrationsPage, SettingsMembersPage, SettingsNotificationsPage, SettingsProfilePage, SettingsSecurityPage, SettingsWorkspacePage, ShellSidebarPage, ShellTopnavPage, SignInCardPage, SignInPage, SignUpPage, SsoLoginPage, Status403Page, Status404Page, Status500Page, StatusMaintenancePage, UpgradeRequiredPage, UsageAnalyticsPage, VerifyEmailPage, FlowBuilderPage as WorkflowBuilderPage, meta as acceptInvitationTemplateMeta, applyVisibleMove, meta$1 as assistantChatTemplateMeta, meta$2 as auditLogTemplateMeta, meta$3 as boardTemplateMeta, meta$4 as changelogTemplateMeta, meta$5 as codeEditorTemplateMeta, meta$6 as contactTemplateMeta, meta$7 as createWizardTemplateMeta, meta$8 as createWorkspaceTemplateMeta, meta$9 as dataExplorerTemplateMeta, meta$10 as docsArticleTemplateMeta, meta$11 as evaluationsTemplateMeta, findRegressions, meta$12 as forgotPasswordTemplateMeta, formatAge as formatIncidentAge, generateExplorerRows, meta$13 as gettingStartedTemplateMeta, meta$14 as helpHomeTemplateMeta, meta$15 as homeDashboardTemplateMeta, meta$16 as incidentBoardTemplateMeta, meta$17 as incidentConsoleTemplateMeta, meta$18 as keyboardShortcutsTemplateMeta, meta$19 as landingTemplateMeta, meta$20 as liveEventStreamTemplateMeta, meta$21 as messagingTemplateMeta, meta$22 as mfaTemplateMeta, modelProvidersNavItem, meta$23 as modelProvidersTemplateMeta, meta$24 as notificationInboxTemplateMeta, meta$25 as pendingActivationTemplateMeta, meta$26 as pricingTemplateMeta, meta$27 as promptPlaygroundTemplateMeta, meta$28 as publicHubTemplateMeta, meta$29 as resetPasswordTemplateMeta, meta$30 as resourceDetailTemplateMeta, meta$31 as resourceFormTemplateMeta, meta$32 as resourceGalleryTemplateMeta, meta$33 as resourceIndexTemplateMeta, meta$34 as resourceTreeTemplateMeta, meta$35 as runTraceTemplateMeta, meta$36 as scorecardTemplateMeta, meta$37 as searchResultsTemplateMeta, meta$38 as settingsApiKeysTemplateMeta, meta$39 as settingsAppearanceTemplateMeta, meta$40 as settingsBillingTemplateMeta, settingsBreadcrumbs, meta$41 as settingsIntegrationsTemplateMeta, meta$42 as settingsMembersTemplateMeta, settingsNav, meta$43 as settingsNotificationsTemplateMeta, meta$44 as settingsProfileTemplateMeta, meta$45 as settingsSecurityTemplateMeta, settingsTitle, meta$46 as settingsWorkspaceTemplateMeta, meta$47 as shellSidebarTemplateMeta, meta$48 as shellTopnavTemplateMeta, meta$49 as signInCardTemplateMeta, meta$50 as signInTemplateMeta, meta$51 as signUpTemplateMeta, meta$52 as ssoLoginTemplateMeta, meta$53 as status403TemplateMeta, meta$54 as status404TemplateMeta, meta$55 as status500TemplateMeta, meta$56 as statusMaintenanceTemplateMeta, meta$57 as upgradeRequiredTemplateMeta, meta$58 as usageAnalyticsTemplateMeta, meta$59 as verifyEmailTemplateMeta, meta$60 as workflowBuilderTemplateMeta };
14835
+ export { AcceptInvitationPage, AssistantChatPage, AuditLogPage, BoardPage, ChangelogPage, CodeEditorPage, ConsoleShell, ContactPage, CreateWizardFlow, CreateWizardPage, CreateWorkspacePage, DataExplorerPage, DocsArticlePage, EvaluationsPage, ForgotPasswordPage, GettingStartedPage, HelpHomePage, HomeDashboardPage, IncidentBoardPage, IncidentConsolePage, KeyboardShortcutsDialog, KeyboardShortcutsPage, LandingPage, LiveEventStreamPage, MessagingPage, MfaChallengePage as MfaPage, ModelProvidersPage, NotificationInboxPage, PendingActivationPage, PricingPage, PromptPlaygroundPage, PublicHubPage, ResetPasswordPage, ResourceDetailPage, ResourceFormPage, ResourceGalleryPage, ResourceIndexPage, ResourceTreePage, RunTracePage, SETTINGS_TITLES, ScorecardPage, SearchResultsPage, SettingsApiKeysPage, SettingsAppearancePage, SettingsBillingPage, SettingsFrame, SettingsIntegrationsPage, SettingsMembersPage, SettingsNotificationsPage, SettingsProfilePage, SettingsSecurityPage, SettingsWorkspacePage, ShellSidebarPage, ShellTopnavPage, SignInCardPage, SignInPage, SignUpPage, SsoLoginPage, Status403Page, Status404Page, Status500Page, StatusMaintenancePage, UpgradeRequiredPage, UsageAnalyticsPage, VerifyEmailPage, FlowBuilderPage as WorkflowBuilderPage, meta as acceptInvitationTemplateMeta, applyVisibleMove, meta$1 as assistantChatTemplateMeta, meta$2 as auditLogTemplateMeta, meta$3 as boardTemplateMeta, meta$4 as changelogTemplateMeta, meta$5 as codeEditorTemplateMeta, meta$6 as contactTemplateMeta, meta$7 as createWizardTemplateMeta, meta$8 as createWorkspaceTemplateMeta, meta$9 as dataExplorerTemplateMeta, meta$10 as docsArticleTemplateMeta, meta$11 as evaluationsTemplateMeta, findRegressions, meta$12 as forgotPasswordTemplateMeta, formatAge as formatIncidentAge, generateExplorerRows, meta$13 as gettingStartedTemplateMeta, meta$14 as helpHomeTemplateMeta, meta$15 as homeDashboardTemplateMeta, meta$16 as incidentBoardTemplateMeta, meta$17 as incidentConsoleTemplateMeta, meta$18 as keyboardShortcutsTemplateMeta, meta$19 as landingTemplateMeta, meta$20 as liveEventStreamTemplateMeta, meta$21 as messagingTemplateMeta, meta$22 as mfaTemplateMeta, modelProvidersNavItem, meta$23 as modelProvidersTemplateMeta, meta$24 as notificationInboxTemplateMeta, meta$25 as pendingActivationTemplateMeta, meta$26 as pricingTemplateMeta, meta$27 as promptPlaygroundTemplateMeta, meta$28 as publicHubTemplateMeta, meta$29 as resetPasswordTemplateMeta, meta$30 as resourceDetailTemplateMeta, meta$31 as resourceFormTemplateMeta, meta$32 as resourceGalleryTemplateMeta, meta$33 as resourceIndexTemplateMeta, meta$34 as resourceTreeTemplateMeta, meta$35 as runTraceTemplateMeta, meta$36 as scorecardTemplateMeta, meta$37 as searchResultsTemplateMeta, meta$38 as settingsApiKeysTemplateMeta, meta$39 as settingsAppearanceTemplateMeta, meta$40 as settingsBillingTemplateMeta, settingsBreadcrumbs, meta$41 as settingsIntegrationsTemplateMeta, meta$42 as settingsMembersTemplateMeta, settingsNav, meta$43 as settingsNotificationsTemplateMeta, meta$44 as settingsProfileTemplateMeta, meta$45 as settingsSecurityTemplateMeta, settingsTitle, meta$46 as settingsWorkspaceTemplateMeta, meta$47 as shellSidebarTemplateMeta, meta$48 as shellTopnavTemplateMeta, meta$49 as signInCardTemplateMeta, meta$50 as signInTemplateMeta, meta$51 as signUpTemplateMeta, meta$52 as ssoLoginTemplateMeta, meta$53 as status403TemplateMeta, meta$54 as status404TemplateMeta, meta$55 as status500TemplateMeta, meta$56 as statusMaintenanceTemplateMeta, meta$57 as upgradeRequiredTemplateMeta, meta$58 as usageAnalyticsTemplateMeta, meta$59 as verifyEmailTemplateMeta, meta$60 as workflowBuilderTemplateMeta };
14519
14836
 
14520
14837
  //# sourceMappingURL=index.js.map