@gntik-ai/templates 0.0.0-stage → 0.6.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 +2420 -0
- package/dist/index.js +14520 -0
- package/dist/index.js.map +1 -0
- package/package.json +64 -3
- package/src/accept-invitation/Page.test.tsx +40 -0
- package/src/accept-invitation/Page.tsx +153 -0
- package/src/accept-invitation/data.ts +22 -0
- package/src/accept-invitation/template.meta.ts +12 -0
- package/src/assistant-chat/Page.test.tsx +51 -0
- package/src/assistant-chat/Page.tsx +273 -0
- package/src/assistant-chat/data.ts +71 -0
- package/src/assistant-chat/template.meta.ts +12 -0
- package/src/audit-log/Page.test.tsx +58 -0
- package/src/audit-log/Page.tsx +284 -0
- package/src/audit-log/data.ts +133 -0
- package/src/audit-log/template.meta.ts +12 -0
- package/src/board/Lane.tsx +117 -0
- package/src/board/Page.test.tsx +68 -0
- package/src/board/Page.tsx +178 -0
- package/src/board/data.ts +127 -0
- package/src/board/template.meta.ts +12 -0
- package/src/board/useBoard.ts +146 -0
- package/src/changelog/Page.test.tsx +31 -0
- package/src/changelog/Page.tsx +174 -0
- package/src/changelog/data.ts +105 -0
- package/src/changelog/template.meta.ts +12 -0
- package/src/code-editor/Page.test.tsx +83 -0
- package/src/code-editor/Page.tsx +207 -0
- package/src/code-editor/data.ts +130 -0
- package/src/code-editor/template.meta.ts +12 -0
- package/src/contact/Page.test.tsx +33 -0
- package/src/contact/Page.tsx +272 -0
- package/src/contact/PublicFrame.tsx +84 -0
- package/src/contact/data.ts +129 -0
- package/src/contact/template.meta.ts +12 -0
- package/src/create-wizard/Overlay.test.tsx +68 -0
- package/src/create-wizard/Page.test.tsx +57 -0
- package/src/create-wizard/Page.tsx +246 -0
- package/src/create-wizard/data.ts +139 -0
- package/src/create-wizard/examples/Overlay.tsx +60 -0
- package/src/create-wizard/template.meta.ts +12 -0
- package/src/create-workspace/Page.test.tsx +41 -0
- package/src/create-workspace/Page.tsx +227 -0
- package/src/create-workspace/data.ts +61 -0
- package/src/create-workspace/template.meta.ts +12 -0
- package/src/data-explorer/Page.test.tsx +45 -0
- package/src/data-explorer/Page.tsx +247 -0
- package/src/data-explorer/data.ts +94 -0
- package/src/data-explorer/template.meta.ts +12 -0
- package/src/docs-article/ArticleFeedback.tsx +75 -0
- package/src/docs-article/Page.test.tsx +34 -0
- package/src/docs-article/Page.tsx +200 -0
- package/src/docs-article/data.ts +65 -0
- package/src/docs-article/template.meta.ts +12 -0
- package/src/evaluations/Page.test.tsx +40 -0
- package/src/evaluations/Page.tsx +238 -0
- package/src/evaluations/data.ts +194 -0
- package/src/evaluations/template.meta.ts +12 -0
- package/src/forgot-password/Page.test.tsx +199 -0
- package/src/forgot-password/Page.tsx +66 -0
- package/src/forgot-password/data.ts +5 -0
- package/src/forgot-password/examples/UsernameOrEmail.tsx +25 -0
- package/src/forgot-password/template.meta.ts +12 -0
- package/src/getting-started/Page.test.tsx +27 -0
- package/src/getting-started/Page.tsx +125 -0
- package/src/getting-started/data.ts +67 -0
- package/src/getting-started/template.meta.ts +12 -0
- package/src/help-home/Page.test.tsx +33 -0
- package/src/help-home/Page.tsx +159 -0
- package/src/help-home/data.ts +151 -0
- package/src/help-home/template.meta.ts +12 -0
- package/src/home-dashboard/Page.test.tsx +57 -0
- package/src/home-dashboard/Page.tsx +152 -0
- package/src/home-dashboard/data.ts +66 -0
- package/src/home-dashboard/template.meta.ts +12 -0
- package/src/incident-board/Page.test.tsx +77 -0
- package/src/incident-board/Page.tsx +263 -0
- package/src/incident-board/data.ts +220 -0
- package/src/incident-board/template.meta.ts +12 -0
- package/src/incident-console/Page.test.tsx +49 -0
- package/src/incident-console/Page.tsx +274 -0
- package/src/incident-console/data.ts +176 -0
- package/src/incident-console/template.meta.ts +12 -0
- package/src/index.ts +250 -0
- package/src/keyboard-shortcuts/Page.test.tsx +45 -0
- package/src/keyboard-shortcuts/Page.tsx +94 -0
- package/src/keyboard-shortcuts/ShortcutSheet.tsx +80 -0
- package/src/keyboard-shortcuts/data.ts +84 -0
- package/src/keyboard-shortcuts/template.meta.ts +12 -0
- package/src/landing/Page.test.tsx +27 -0
- package/src/landing/Page.tsx +110 -0
- package/src/landing/data.ts +17 -0
- package/src/landing/template.meta.ts +11 -0
- package/src/live-event-stream/Page.test.tsx +251 -0
- package/src/live-event-stream/Page.tsx +307 -0
- package/src/live-event-stream/data.ts +44 -0
- package/src/live-event-stream/examples/Connecting.tsx +5 -0
- package/src/live-event-stream/examples/Error.tsx +5 -0
- package/src/live-event-stream/examples/LiveEmpty.tsx +5 -0
- package/src/live-event-stream/examples/LiveWithEvents.tsx +6 -0
- package/src/live-event-stream/examples/Stopped.tsx +6 -0
- package/src/live-event-stream/template.meta.ts +74 -0
- package/src/messaging/Page.test.tsx +34 -0
- package/src/messaging/Page.tsx +236 -0
- package/src/messaging/data.ts +118 -0
- package/src/messaging/template.meta.ts +12 -0
- package/src/meta.ts +24 -0
- package/src/mfa/Page.test.tsx +22 -0
- package/src/mfa/Page.tsx +45 -0
- package/src/mfa/data.ts +6 -0
- package/src/mfa/template.meta.ts +12 -0
- package/src/model-providers/Page.test.tsx +58 -0
- package/src/model-providers/Page.tsx +198 -0
- package/src/model-providers/data.ts +101 -0
- package/src/model-providers/template.meta.ts +12 -0
- package/src/notification-inbox/Page.test.tsx +49 -0
- package/src/notification-inbox/Page.tsx +237 -0
- package/src/notification-inbox/data.ts +129 -0
- package/src/notification-inbox/template.meta.ts +12 -0
- package/src/pending-activation/Page.test.tsx +390 -0
- package/src/pending-activation/Page.tsx +145 -0
- package/src/pending-activation/data.ts +25 -0
- package/src/pending-activation/template.meta.ts +12 -0
- package/src/pricing/ComparisonTable.tsx +75 -0
- package/src/pricing/Page.test.tsx +29 -0
- package/src/pricing/Page.tsx +83 -0
- package/src/pricing/PublicFrame.tsx +84 -0
- package/src/pricing/data.ts +104 -0
- package/src/pricing/template.meta.ts +12 -0
- package/src/prompt-playground/Page.test.tsx +72 -0
- package/src/prompt-playground/Page.tsx +254 -0
- package/src/prompt-playground/data.ts +68 -0
- package/src/prompt-playground/template.meta.ts +12 -0
- package/src/public-hub/Page.test.tsx +176 -0
- package/src/public-hub/Page.tsx +125 -0
- package/src/public-hub/Source.test.ts +54 -0
- package/src/public-hub/data.ts +24 -0
- package/src/public-hub/examples/Dark.tsx +11 -0
- package/src/public-hub/examples/Full.tsx +6 -0
- package/src/public-hub/examples/HighContrast.tsx +11 -0
- package/src/public-hub/examples/Light.tsx +11 -0
- package/src/public-hub/examples/Loading.tsx +6 -0
- package/src/public-hub/examples/Minimal.tsx +5 -0
- package/src/public-hub/examples/MinimalLoading.tsx +5 -0
- package/src/public-hub/template.meta.ts +60 -0
- package/src/reset-password/Page.test.tsx +27 -0
- package/src/reset-password/Page.tsx +46 -0
- package/src/reset-password/data.ts +5 -0
- package/src/reset-password/template.meta.ts +12 -0
- package/src/resource-detail/Page.test.tsx +260 -0
- package/src/resource-detail/Page.tsx +262 -0
- package/src/resource-detail/data.ts +55 -0
- package/src/resource-detail/examples/postgres-table-detail.tsx +28 -0
- package/src/resource-detail/examples/realtime-configuration.tsx +26 -0
- package/src/resource-detail/examples/runtime-with-transition.tsx +30 -0
- package/src/resource-detail/examples/runtime-without-transition.tsx +33 -0
- package/src/resource-detail/examples/shell.ts +12 -0
- package/src/resource-detail/template.meta.ts +21 -0
- package/src/resource-form/Page.test.tsx +40 -0
- package/src/resource-form/Page.tsx +186 -0
- package/src/resource-form/data.ts +63 -0
- package/src/resource-form/template.meta.ts +12 -0
- package/src/resource-gallery/Page.test.tsx +42 -0
- package/src/resource-gallery/Page.tsx +125 -0
- package/src/resource-gallery/data.ts +44 -0
- package/src/resource-gallery/template.meta.ts +20 -0
- package/src/resource-index/Page.test.tsx +120 -0
- package/src/resource-index/Page.tsx +216 -0
- package/src/resource-index/data.ts +84 -0
- package/src/resource-index/template.meta.ts +21 -0
- package/src/resource-tree/Page.test.tsx +31 -0
- package/src/resource-tree/Page.tsx +232 -0
- package/src/resource-tree/data.ts +180 -0
- package/src/resource-tree/template.meta.ts +12 -0
- package/src/run-trace/Page.test.tsx +56 -0
- package/src/run-trace/Page.tsx +242 -0
- package/src/run-trace/data.ts +171 -0
- package/src/run-trace/template.meta.ts +12 -0
- package/src/scorecard/Page.test.tsx +38 -0
- package/src/scorecard/Page.tsx +160 -0
- package/src/scorecard/TargetsTable.tsx +92 -0
- package/src/scorecard/data.ts +118 -0
- package/src/scorecard/template.meta.ts +12 -0
- package/src/search-results/Page.test.tsx +43 -0
- package/src/search-results/Page.tsx +243 -0
- package/src/search-results/data.ts +130 -0
- package/src/search-results/template.meta.ts +12 -0
- package/src/settings-api-keys/Page.test.tsx +39 -0
- package/src/settings-api-keys/Page.tsx +171 -0
- package/src/settings-api-keys/data.ts +58 -0
- package/src/settings-api-keys/template.meta.ts +12 -0
- package/src/settings-appearance/Page.test.tsx +44 -0
- package/src/settings-appearance/Page.tsx +92 -0
- package/src/settings-appearance/data.ts +21 -0
- package/src/settings-appearance/template.meta.ts +11 -0
- package/src/settings-billing/Page.test.tsx +31 -0
- package/src/settings-billing/Page.tsx +71 -0
- package/src/settings-billing/data.ts +15 -0
- package/src/settings-billing/template.meta.ts +19 -0
- package/src/settings-integrations/Page.test.tsx +31 -0
- package/src/settings-integrations/Page.tsx +185 -0
- package/src/settings-integrations/data.ts +116 -0
- package/src/settings-integrations/template.meta.ts +11 -0
- package/src/settings-members/Page.test.tsx +32 -0
- package/src/settings-members/Page.tsx +140 -0
- package/src/settings-members/data.ts +28 -0
- package/src/settings-members/template.meta.ts +12 -0
- package/src/settings-notifications/Page.test.tsx +31 -0
- package/src/settings-notifications/Page.tsx +71 -0
- package/src/settings-notifications/data.ts +12 -0
- package/src/settings-notifications/template.meta.ts +11 -0
- package/src/settings-profile/Baseline.test.tsx +9 -0
- package/src/settings-profile/Editable.test.tsx +21 -0
- package/src/settings-profile/Page.test.tsx +41 -0
- package/src/settings-profile/Page.tsx +133 -0
- package/src/settings-profile/ReadOnly.test.tsx +143 -0
- package/src/settings-profile/ReadOnlyProfile.tsx +85 -0
- package/src/settings-profile/SettingsFrame.test.tsx +55 -0
- package/src/settings-profile/SettingsFrame.tsx +88 -0
- package/src/settings-profile/__tests__/dom.ts +8 -0
- package/src/settings-profile/data.ts +41 -0
- package/src/settings-profile/examples/ReadOnly.tsx +31 -0
- package/src/settings-profile/fixtures/editable.snap +1 -0
- package/src/settings-profile/settings-nav.ts +98 -0
- package/src/settings-profile/template.meta.ts +21 -0
- package/src/settings-security/MfaSetupDialog.tsx +96 -0
- package/src/settings-security/Page.test.tsx +44 -0
- package/src/settings-security/Page.tsx +158 -0
- package/src/settings-security/data.ts +11 -0
- package/src/settings-security/template.meta.ts +11 -0
- package/src/settings-workspace/Page.test.tsx +44 -0
- package/src/settings-workspace/Page.tsx +120 -0
- package/src/settings-workspace/data.ts +44 -0
- package/src/settings-workspace/template.meta.ts +19 -0
- package/src/shared/ConsoleShell.test.tsx +81 -0
- package/src/shared/ConsoleShell.tsx +98 -0
- package/src/shell-sidebar/Page.test.tsx +21 -0
- package/src/shell-sidebar/Page.tsx +85 -0
- package/src/shell-sidebar/data.ts +24 -0
- package/src/shell-sidebar/template.meta.ts +12 -0
- package/src/shell-topnav/Page.test.tsx +25 -0
- package/src/shell-topnav/Page.tsx +94 -0
- package/src/shell-topnav/data.ts +25 -0
- package/src/shell-topnav/template.meta.ts +12 -0
- package/src/sign-in/BrandPanel.tsx +34 -0
- package/src/sign-in/Page.test.tsx +41 -0
- package/src/sign-in/Page.tsx +73 -0
- package/src/sign-in/data.ts +11 -0
- package/src/sign-in/template.meta.ts +12 -0
- package/src/sign-in-card/Page.test.tsx +182 -0
- package/src/sign-in-card/Page.tsx +82 -0
- package/src/sign-in-card/data.ts +8 -0
- package/src/sign-in-card/examples/Username.tsx +28 -0
- package/src/sign-in-card/template.meta.ts +12 -0
- package/src/sign-up/Page.test.tsx +33 -0
- package/src/sign-up/Page.tsx +70 -0
- package/src/sign-up/data.ts +15 -0
- package/src/sign-up/template.meta.ts +12 -0
- package/src/sso-login/Page.test.tsx +41 -0
- package/src/sso-login/Page.tsx +151 -0
- package/src/sso-login/data.ts +10 -0
- package/src/sso-login/template.meta.ts +12 -0
- package/src/status-403/Page.test.tsx +23 -0
- package/src/status-403/Page.tsx +92 -0
- package/src/status-403/data.ts +13 -0
- package/src/status-403/template.meta.ts +12 -0
- package/src/status-404/Page.test.tsx +23 -0
- package/src/status-404/Page.tsx +60 -0
- package/src/status-404/PageHeading.test.tsx +52 -0
- package/src/status-404/data.ts +12 -0
- package/src/status-404/examples/PageHeader.tsx +28 -0
- package/src/status-404/template.meta.ts +12 -0
- package/src/status-500/Page.test.tsx +24 -0
- package/src/status-500/Page.tsx +70 -0
- package/src/status-500/data.ts +20 -0
- package/src/status-500/template.meta.ts +12 -0
- package/src/status-maintenance/Page.test.tsx +24 -0
- package/src/status-maintenance/Page.tsx +84 -0
- package/src/status-maintenance/data.ts +14 -0
- package/src/status-maintenance/template.meta.ts +12 -0
- package/src/styles.css +11 -0
- package/src/test/a11y.ts +18 -0
- package/src/test/setup.ts +36 -0
- package/src/upgrade-required/Page.test.tsx +28 -0
- package/src/upgrade-required/Page.tsx +79 -0
- package/src/upgrade-required/data.ts +19 -0
- package/src/upgrade-required/template.meta.ts +12 -0
- package/src/usage-analytics/Page.test.tsx +83 -0
- package/src/usage-analytics/Page.tsx +184 -0
- package/src/usage-analytics/data.ts +161 -0
- package/src/usage-analytics/template.meta.ts +21 -0
- package/src/verify-email/Page.test.tsx +32 -0
- package/src/verify-email/Page.tsx +118 -0
- package/src/verify-email/data.ts +7 -0
- package/src/verify-email/template.meta.ts +12 -0
- package/src/workflow-builder/Page.test.tsx +97 -0
- package/src/workflow-builder/Page.tsx +163 -0
- package/src/workflow-builder/data.ts +13 -0
- package/src/workflow-builder/template.meta.ts +12 -0
- package/README.md +0 -3
package/src/index.ts
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
export type { TemplateMeta } from './meta';
|
|
2
|
+
export { ConsoleShell, type ConsoleShellProps } from './shared/ConsoleShell';
|
|
3
|
+
export { default as AcceptInvitationPage } from './accept-invitation/Page';
|
|
4
|
+
export { meta as acceptInvitationTemplateMeta } from './accept-invitation/template.meta';
|
|
5
|
+
export type { AcceptInvitationPageProps } from './accept-invitation/Page';
|
|
6
|
+
export type { Invitation } from './accept-invitation/data';
|
|
7
|
+
export { default as AssistantChatPage } from './assistant-chat/Page';
|
|
8
|
+
export { meta as assistantChatTemplateMeta } from './assistant-chat/template.meta';
|
|
9
|
+
export type { AssistantChatProps } from './assistant-chat/Page';
|
|
10
|
+
export type { AssistantTool } from './assistant-chat/data';
|
|
11
|
+
export { default as AuditLogPage } from './audit-log/Page';
|
|
12
|
+
export { meta as auditLogTemplateMeta } from './audit-log/template.meta';
|
|
13
|
+
export type { AuditLogProps } from './audit-log/Page';
|
|
14
|
+
export type { AuditEvent, AuditResult } from './audit-log/data';
|
|
15
|
+
export { default as CreateWizardPage } from './create-wizard/Page';
|
|
16
|
+
export { meta as createWizardTemplateMeta } from './create-wizard/template.meta';
|
|
17
|
+
export type { CreateWizardProps } from './create-wizard/Page';
|
|
18
|
+
export type { CreateWizardCopy, SourceOption, WizardRegion, WizardValues } from './create-wizard/data';
|
|
19
|
+
export { default as CreateWorkspacePage } from './create-workspace/Page';
|
|
20
|
+
export { meta as createWorkspaceTemplateMeta } from './create-workspace/template.meta';
|
|
21
|
+
export type { CreateWorkspaceProps } from './create-workspace/Page';
|
|
22
|
+
export type { WorkspaceRegion, WorkspaceValues as NewWorkspaceValues } from './create-workspace/data';
|
|
23
|
+
export { default as WorkflowBuilderPage } from './workflow-builder/Page';
|
|
24
|
+
export { meta as workflowBuilderTemplateMeta } from './workflow-builder/template.meta';
|
|
25
|
+
export type { FlowBuilderPageProps } from './workflow-builder/Page';
|
|
26
|
+
export { default as ForgotPasswordPage } from './forgot-password/Page';
|
|
27
|
+
export { meta as forgotPasswordTemplateMeta } from './forgot-password/template.meta';
|
|
28
|
+
export type { ForgotPasswordPageProps } from './forgot-password/Page';
|
|
29
|
+
export { default as GettingStartedPage } from './getting-started/Page';
|
|
30
|
+
export { meta as gettingStartedTemplateMeta } from './getting-started/template.meta';
|
|
31
|
+
export type { GettingStartedProps } from './getting-started/Page';
|
|
32
|
+
export type { DocLink, SetupTask } from './getting-started/data';
|
|
33
|
+
export { default as HomeDashboardPage } from './home-dashboard/Page';
|
|
34
|
+
export { meta as homeDashboardTemplateMeta } from './home-dashboard/template.meta';
|
|
35
|
+
export type { HomeDashboardProps, HomeSecondaryChart } from './home-dashboard/Page';
|
|
36
|
+
export type { QuickAction, RequestPoint } from './home-dashboard/data';
|
|
37
|
+
export { default as LandingPage } from './landing/Page';
|
|
38
|
+
export { meta as landingTemplateMeta } from './landing/template.meta';
|
|
39
|
+
export type { LandingProps } from './landing/Page';
|
|
40
|
+
export { default as MfaPage } from './mfa/Page';
|
|
41
|
+
export { meta as mfaTemplateMeta } from './mfa/template.meta';
|
|
42
|
+
export type { MfaChallengePageProps } from './mfa/Page';
|
|
43
|
+
export { default as NotificationInboxPage } from './notification-inbox/Page';
|
|
44
|
+
export { meta as notificationInboxTemplateMeta } from './notification-inbox/template.meta';
|
|
45
|
+
export type { InboxFilter, NotificationInboxProps } from './notification-inbox/Page';
|
|
46
|
+
export type { InboxCategory, InboxNotification } from './notification-inbox/data';
|
|
47
|
+
export { default as ResetPasswordPage } from './reset-password/Page';
|
|
48
|
+
export { meta as resetPasswordTemplateMeta } from './reset-password/template.meta';
|
|
49
|
+
export type { ResetPasswordPageProps } from './reset-password/Page';
|
|
50
|
+
export { default as ResourceDetailPage } from './resource-detail/Page';
|
|
51
|
+
export { meta as resourceDetailTemplateMeta } from './resource-detail/template.meta';
|
|
52
|
+
export type { ResourceDetailProps, ResourceDetailTab } from './resource-detail/Page';
|
|
53
|
+
export type { ResourceSettings } from './resource-detail/data';
|
|
54
|
+
export { default as ResourceFormPage } from './resource-form/Page';
|
|
55
|
+
export { meta as resourceFormTemplateMeta } from './resource-form/template.meta';
|
|
56
|
+
export type { ResourceFormProps } from './resource-form/Page';
|
|
57
|
+
export type { RegionOption as ResourceRegionOption, ResourceFormValues } from './resource-form/data';
|
|
58
|
+
export { default as ResourceGalleryPage } from './resource-gallery/Page';
|
|
59
|
+
export { meta as resourceGalleryTemplateMeta } from './resource-gallery/template.meta';
|
|
60
|
+
export type { GalleryView, ResourceGalleryProps } from './resource-gallery/Page';
|
|
61
|
+
export { default as ResourceIndexPage } from './resource-index/Page';
|
|
62
|
+
export { meta as resourceIndexTemplateMeta } from './resource-index/template.meta';
|
|
63
|
+
export type { ResourceBulkAction, ResourceIndexProps } from './resource-index/Page';
|
|
64
|
+
export type { ResourceRow } from './resource-index/data';
|
|
65
|
+
export { default as SearchResultsPage } from './search-results/Page';
|
|
66
|
+
export { meta as searchResultsTemplateMeta } from './search-results/template.meta';
|
|
67
|
+
export type { SearchResultsProps, SearchSelection } from './search-results/Page';
|
|
68
|
+
export type { SearchFacet, SearchHit, SearchResultType } from './search-results/data';
|
|
69
|
+
export { default as SettingsApiKeysPage } from './settings-api-keys/Page';
|
|
70
|
+
export { meta as settingsApiKeysTemplateMeta } from './settings-api-keys/template.meta';
|
|
71
|
+
export type { SettingsApiKeysProps } from './settings-api-keys/Page';
|
|
72
|
+
export type { ApiKey } from './settings-api-keys/data';
|
|
73
|
+
export { default as SettingsAppearancePage } from './settings-appearance/Page';
|
|
74
|
+
export { meta as settingsAppearanceTemplateMeta } from './settings-appearance/template.meta';
|
|
75
|
+
export type { SettingsAppearanceProps } from './settings-appearance/Page';
|
|
76
|
+
export type { Density, LanguageOption } from './settings-appearance/data';
|
|
77
|
+
export { default as SettingsBillingPage } from './settings-billing/Page';
|
|
78
|
+
export { meta as settingsBillingTemplateMeta } from './settings-billing/template.meta';
|
|
79
|
+
export type { SettingsBillingProps } from './settings-billing/Page';
|
|
80
|
+
export { default as SettingsIntegrationsPage } from './settings-integrations/Page';
|
|
81
|
+
export { meta as settingsIntegrationsTemplateMeta } from './settings-integrations/template.meta';
|
|
82
|
+
export type { SettingsIntegrationsProps } from './settings-integrations/Page';
|
|
83
|
+
export type { Connector, WebhookDelivery, WebhookEndpoint } from './settings-integrations/data';
|
|
84
|
+
export { default as SettingsMembersPage } from './settings-members/Page';
|
|
85
|
+
export { meta as settingsMembersTemplateMeta } from './settings-members/template.meta';
|
|
86
|
+
export type { SettingsMembersProps } from './settings-members/Page';
|
|
87
|
+
export type { RolePermission } from './settings-members/data';
|
|
88
|
+
export { default as SettingsNotificationsPage } from './settings-notifications/Page';
|
|
89
|
+
export { meta as settingsNotificationsTemplateMeta } from './settings-notifications/template.meta';
|
|
90
|
+
export type { SettingsNotificationsProps } from './settings-notifications/Page';
|
|
91
|
+
export { default as SettingsProfilePage } from './settings-profile/Page';
|
|
92
|
+
export { meta as settingsProfileTemplateMeta } from './settings-profile/template.meta';
|
|
93
|
+
export type { SettingsProfileProps } from './settings-profile/Page';
|
|
94
|
+
export type { ProfileDetail } from './settings-profile/ReadOnlyProfile';
|
|
95
|
+
export type { ProfileFormValues, SelectOption } from './settings-profile/data';
|
|
96
|
+
export { SettingsFrame, type SettingsFrameOptions, type SettingsFrameProps } from './settings-profile/SettingsFrame';
|
|
97
|
+
export {
|
|
98
|
+
SETTINGS_TITLES,
|
|
99
|
+
settingsBreadcrumbs,
|
|
100
|
+
settingsNav,
|
|
101
|
+
settingsTitle,
|
|
102
|
+
type SettingsNavExtraItem,
|
|
103
|
+
type SettingsPageId,
|
|
104
|
+
} from './settings-profile/settings-nav';
|
|
105
|
+
export { default as SettingsSecurityPage } from './settings-security/Page';
|
|
106
|
+
export { meta as settingsSecurityTemplateMeta } from './settings-security/template.meta';
|
|
107
|
+
export type { PasswordChange, SettingsSecurityProps } from './settings-security/Page';
|
|
108
|
+
export { default as SettingsWorkspacePage } from './settings-workspace/Page';
|
|
109
|
+
export { meta as settingsWorkspaceTemplateMeta } from './settings-workspace/template.meta';
|
|
110
|
+
export type { SettingsWorkspaceProps } from './settings-workspace/Page';
|
|
111
|
+
export type { RegionOption, WorkspaceValues } from './settings-workspace/data';
|
|
112
|
+
export { default as ShellSidebarPage } from './shell-sidebar/Page';
|
|
113
|
+
export { meta as shellSidebarTemplateMeta } from './shell-sidebar/template.meta';
|
|
114
|
+
export type { ShellSidebarPageProps } from './shell-sidebar/Page';
|
|
115
|
+
export { default as ShellTopnavPage } from './shell-topnav/Page';
|
|
116
|
+
export { meta as shellTopnavTemplateMeta } from './shell-topnav/template.meta';
|
|
117
|
+
export type { ShellTopnavPageProps } from './shell-topnav/Page';
|
|
118
|
+
export { default as SignInPage } from './sign-in/Page';
|
|
119
|
+
export { meta as signInTemplateMeta } from './sign-in/template.meta';
|
|
120
|
+
export type { SignInPageProps } from './sign-in/Page';
|
|
121
|
+
export { default as SignInCardPage } from './sign-in-card/Page';
|
|
122
|
+
export { meta as signInCardTemplateMeta } from './sign-in-card/template.meta';
|
|
123
|
+
export type { SignInCardPageProps } from './sign-in-card/Page';
|
|
124
|
+
|
|
125
|
+
export { default as PublicHubPage } from './public-hub/Page';
|
|
126
|
+
export { meta as publicHubTemplateMeta } from './public-hub/template.meta';
|
|
127
|
+
export type { PublicHubPageProps, PublicHubAction } from './public-hub/Page';
|
|
128
|
+
export { default as SignUpPage } from './sign-up/Page';
|
|
129
|
+
export { meta as signUpTemplateMeta } from './sign-up/template.meta';
|
|
130
|
+
export type { SignUpPageProps } from './sign-up/Page';
|
|
131
|
+
export { default as SsoLoginPage } from './sso-login/Page';
|
|
132
|
+
export { meta as ssoLoginTemplateMeta } from './sso-login/template.meta';
|
|
133
|
+
export type { SsoLoginPageProps } from './sso-login/Page';
|
|
134
|
+
export { default as Status403Page } from './status-403/Page';
|
|
135
|
+
export { meta as status403TemplateMeta } from './status-403/template.meta';
|
|
136
|
+
export type { Status403Props } from './status-403/Page';
|
|
137
|
+
export { default as Status404Page } from './status-404/Page';
|
|
138
|
+
export { meta as status404TemplateMeta } from './status-404/template.meta';
|
|
139
|
+
export type { Status404Props } from './status-404/Page';
|
|
140
|
+
export { default as Status500Page } from './status-500/Page';
|
|
141
|
+
export { meta as status500TemplateMeta } from './status-500/template.meta';
|
|
142
|
+
export type { Status500Props } from './status-500/Page';
|
|
143
|
+
export { default as StatusMaintenancePage } from './status-maintenance/Page';
|
|
144
|
+
export { meta as statusMaintenanceTemplateMeta } from './status-maintenance/template.meta';
|
|
145
|
+
export type { StatusMaintenanceProps } from './status-maintenance/Page';
|
|
146
|
+
export { default as UpgradeRequiredPage } from './upgrade-required/Page';
|
|
147
|
+
export { meta as upgradeRequiredTemplateMeta } from './upgrade-required/template.meta';
|
|
148
|
+
export type { UpgradeRequiredProps } from './upgrade-required/Page';
|
|
149
|
+
export { default as UsageAnalyticsPage } from './usage-analytics/Page';
|
|
150
|
+
export { meta as usageAnalyticsTemplateMeta } from './usage-analytics/template.meta';
|
|
151
|
+
export type { UsageAnalyticsProps, UsageExportRequest } from './usage-analytics/Page';
|
|
152
|
+
export type { TrafficPoint, UsageRow } from './usage-analytics/data';
|
|
153
|
+
export { default as VerifyEmailPage } from './verify-email/Page';
|
|
154
|
+
export { meta as verifyEmailTemplateMeta } from './verify-email/template.meta';
|
|
155
|
+
export type { VerifyEmailPageProps } from './verify-email/Page';
|
|
156
|
+
export { default as PendingActivationPage } from './pending-activation/Page';
|
|
157
|
+
export { meta as pendingActivationTemplateMeta } from './pending-activation/template.meta';
|
|
158
|
+
export type {
|
|
159
|
+
PendingActivationPageProps,
|
|
160
|
+
PendingActivationAction,
|
|
161
|
+
PendingActivationLink,
|
|
162
|
+
} from './pending-activation/Page';
|
|
163
|
+
|
|
164
|
+
// P3 — AI and builders
|
|
165
|
+
export { default as LiveEventStreamPage } from './live-event-stream/Page';
|
|
166
|
+
export { meta as liveEventStreamTemplateMeta } from './live-event-stream/template.meta';
|
|
167
|
+
export type { LiveEventStreamProps, LiveEventStreamStatus, LiveEvent } from './live-event-stream/Page';
|
|
168
|
+
export { default as RunTracePage } from './run-trace/Page';
|
|
169
|
+
export { meta as runTraceTemplateMeta } from './run-trace/template.meta';
|
|
170
|
+
export type { RunTraceProps } from './run-trace/Page';
|
|
171
|
+
export type { SpanDetail, TraceRun } from './run-trace/data';
|
|
172
|
+
export { default as PromptPlaygroundPage } from './prompt-playground/Page';
|
|
173
|
+
export { meta as promptPlaygroundTemplateMeta } from './prompt-playground/template.meta';
|
|
174
|
+
export type { PromptPlaygroundProps } from './prompt-playground/Page';
|
|
175
|
+
export type { PlaygroundModel, PlaygroundOutput } from './prompt-playground/data';
|
|
176
|
+
export { default as EvaluationsPage } from './evaluations/Page';
|
|
177
|
+
export { meta as evaluationsTemplateMeta } from './evaluations/template.meta';
|
|
178
|
+
export type { EvaluationsProps } from './evaluations/Page';
|
|
179
|
+
export { findRegressions, type EvalRegression, type EvalSample } from './evaluations/data';
|
|
180
|
+
export { default as ModelProvidersPage } from './model-providers/Page';
|
|
181
|
+
export { meta as modelProvidersTemplateMeta } from './model-providers/template.meta';
|
|
182
|
+
export type { ModelProvidersProps } from './model-providers/Page';
|
|
183
|
+
export { modelProvidersNavItem, type NewModelKeyInput, type ProviderUsageLimit } from './model-providers/data';
|
|
184
|
+
export { default as CodeEditorPage } from './code-editor/Page';
|
|
185
|
+
export { meta as codeEditorTemplateMeta } from './code-editor/template.meta';
|
|
186
|
+
export type { CodeEditorPageProps } from './code-editor/Page';
|
|
187
|
+
export { default as DataExplorerPage } from './data-explorer/Page';
|
|
188
|
+
export { meta as dataExplorerTemplateMeta } from './data-explorer/template.meta';
|
|
189
|
+
export type { DataExplorerProps } from './data-explorer/Page';
|
|
190
|
+
export { generateExplorerRows, type ExplorerField, type ExplorerRow } from './data-explorer/data';
|
|
191
|
+
|
|
192
|
+
// P3 — work, help and public pack
|
|
193
|
+
export { default as ScorecardPage } from './scorecard/Page';
|
|
194
|
+
export { meta as scorecardTemplateMeta } from './scorecard/template.meta';
|
|
195
|
+
export type { ScorecardProps } from './scorecard/Page';
|
|
196
|
+
export type { RadarPoint, ScorecardMetric } from './scorecard/data';
|
|
197
|
+
export { default as IncidentConsolePage } from './incident-console/Page';
|
|
198
|
+
export { meta as incidentConsoleTemplateMeta } from './incident-console/template.meta';
|
|
199
|
+
export type { IncidentConsoleProps } from './incident-console/Page';
|
|
200
|
+
export type { Incident, IncidentField, IncidentSeverity, IncidentStatus } from './incident-console/data';
|
|
201
|
+
export { default as ResourceTreePage } from './resource-tree/Page';
|
|
202
|
+
export { meta as resourceTreeTemplateMeta } from './resource-tree/template.meta';
|
|
203
|
+
export type { ResourceTreeProps } from './resource-tree/Page';
|
|
204
|
+
export type { ResourceGroupBy, ResourceKind, TreeResource } from './resource-tree/data';
|
|
205
|
+
export { default as BoardPage } from './board/Page';
|
|
206
|
+
export { meta as boardTemplateMeta } from './board/template.meta';
|
|
207
|
+
export type { BoardProps } from './board/Page';
|
|
208
|
+
export type { BoardCard, BoardColumn, BoardState } from './board/data';
|
|
209
|
+
export { default as MessagingPage } from './messaging/Page';
|
|
210
|
+
export { meta as messagingTemplateMeta } from './messaging/template.meta';
|
|
211
|
+
export type { MessagingProps } from './messaging/Page';
|
|
212
|
+
export type { Conversation, DirectMessage, MessageAttachment } from './messaging/data';
|
|
213
|
+
export { default as HelpHomePage } from './help-home/Page';
|
|
214
|
+
export { meta as helpHomeTemplateMeta } from './help-home/template.meta';
|
|
215
|
+
export type { HelpHomeProps } from './help-home/Page';
|
|
216
|
+
export type { HelpArticle, HelpCategory } from './help-home/data';
|
|
217
|
+
export { default as DocsArticlePage } from './docs-article/Page';
|
|
218
|
+
export { meta as docsArticleTemplateMeta } from './docs-article/template.meta';
|
|
219
|
+
export type { DocsArticleProps } from './docs-article/Page';
|
|
220
|
+
export type { ArticleLink } from './docs-article/data';
|
|
221
|
+
export type { ArticleFeedbackValue } from './docs-article/ArticleFeedback';
|
|
222
|
+
export { default as ChangelogPage } from './changelog/Page';
|
|
223
|
+
export { meta as changelogTemplateMeta } from './changelog/template.meta';
|
|
224
|
+
export type { ChangelogProps } from './changelog/Page';
|
|
225
|
+
export type { ChangelogEntry, ChangelogTag } from './changelog/data';
|
|
226
|
+
export { default as KeyboardShortcutsPage, KeyboardShortcutsDialog } from './keyboard-shortcuts/Page';
|
|
227
|
+
export { meta as keyboardShortcutsTemplateMeta } from './keyboard-shortcuts/template.meta';
|
|
228
|
+
export type { KeyboardShortcutsDialogProps, KeyboardShortcutsProps } from './keyboard-shortcuts/Page';
|
|
229
|
+
export type { Shortcut, ShortcutGroup } from './keyboard-shortcuts/data';
|
|
230
|
+
export { default as PricingPage } from './pricing/Page';
|
|
231
|
+
export { meta as pricingTemplateMeta } from './pricing/template.meta';
|
|
232
|
+
export type { PricingProps } from './pricing/Page';
|
|
233
|
+
export type { ComparisonRow, ComparisonSection, ComparisonValue } from './pricing/data';
|
|
234
|
+
export { default as ContactPage } from './contact/Page';
|
|
235
|
+
export { meta as contactTemplateMeta } from './contact/template.meta';
|
|
236
|
+
export type { ContactProps } from './contact/Page';
|
|
237
|
+
export type { ContactTopic, ContactValues, Office } from './contact/data';
|
|
238
|
+
|
|
239
|
+
// Incident triage board + docs article additions
|
|
240
|
+
export { default as IncidentBoardPage } from './incident-board/Page';
|
|
241
|
+
export { meta as incidentBoardTemplateMeta } from './incident-board/template.meta';
|
|
242
|
+
export type { IncidentBoardProps } from './incident-board/Page';
|
|
243
|
+
export {
|
|
244
|
+
applyVisibleMove,
|
|
245
|
+
formatAge as formatIncidentAge,
|
|
246
|
+
type TriageIncident,
|
|
247
|
+
type TriageSeverity,
|
|
248
|
+
type TriageStage,
|
|
249
|
+
} from './incident-board/data';
|
|
250
|
+
export type { SignatureHeader } from './docs-article/data';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { render, screen, within } from '@testing-library/react';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import { expectNoAxeViolations } from '../test/a11y';
|
|
4
|
+
import KeyboardShortcutsPage, { KeyboardShortcutsDialog } from './Page';
|
|
5
|
+
import { filterShortcuts, shortcutGroups } from './data';
|
|
6
|
+
|
|
7
|
+
describe('KeyboardShortcutsPage', () => {
|
|
8
|
+
it('renders the console page with every group', { timeout: 15000 }, async () => {
|
|
9
|
+
render(<KeyboardShortcutsPage />);
|
|
10
|
+
expect(screen.getByRole('main')).toBeInTheDocument();
|
|
11
|
+
expect(screen.getByRole('heading', { level: 1, name: 'Keyboard shortcuts' })).toBeInTheDocument();
|
|
12
|
+
for (const g of shortcutGroups)
|
|
13
|
+
expect(screen.getByRole('heading', { level: 2, name: g.title })).toBeInTheDocument();
|
|
14
|
+
await expectNoAxeViolations();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('filters by description and shows an empty state', { timeout: 15000 }, async () => {
|
|
18
|
+
render(<KeyboardShortcutsPage />);
|
|
19
|
+
const search = screen.getByRole('searchbox', { name: 'Search shortcuts' });
|
|
20
|
+
await userEvent.type(search, 'save');
|
|
21
|
+
expect(screen.getByText('1 shortcut')).toBeInTheDocument();
|
|
22
|
+
const editing = screen.getByRole('region', { name: 'Editing' });
|
|
23
|
+
expect(within(editing).getByText('Save changes')).toBeInTheDocument();
|
|
24
|
+
expect(screen.queryByRole('heading', { name: 'Navigation' })).not.toBeInTheDocument();
|
|
25
|
+
await userEvent.clear(search);
|
|
26
|
+
await userEvent.type(search, 'zzz');
|
|
27
|
+
expect(screen.getByRole('heading', { name: 'No shortcuts match' })).toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('filterShortcuts matches an exact key', () => {
|
|
31
|
+
const groups = filterShortcuts(shortcutGroups, '?');
|
|
32
|
+
expect(groups.flatMap((g) => g.shortcuts.map((s) => s.id))).toEqual(['help']);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('KeyboardShortcutsDialog', () => {
|
|
37
|
+
it('opens from its trigger with the searchable sheet', { timeout: 15000 }, async () => {
|
|
38
|
+
render(<KeyboardShortcutsDialog />);
|
|
39
|
+
await userEvent.click(screen.getByRole('button', { name: 'Keyboard shortcuts' }));
|
|
40
|
+
const dialog = await screen.findByRole('dialog', { name: 'Keyboard shortcuts' });
|
|
41
|
+
expect(within(dialog).getByRole('heading', { level: 3, name: 'General' })).toBeInTheDocument();
|
|
42
|
+
expect(within(dialog).getByRole('searchbox', { name: 'Search shortcuts' })).toHaveFocus();
|
|
43
|
+
await expectNoAxeViolations();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { PageHeader } from '@gntik-ai/blocks';
|
|
2
|
+
import { Keyboard } from '@gntik-ai/icons';
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
Dialog,
|
|
6
|
+
DialogBody,
|
|
7
|
+
DialogContent,
|
|
8
|
+
DialogDescription,
|
|
9
|
+
DialogHeader,
|
|
10
|
+
DialogTitle,
|
|
11
|
+
DialogTrigger,
|
|
12
|
+
Page,
|
|
13
|
+
type BreadcrumbItem,
|
|
14
|
+
} from '@gntik-ai/ui';
|
|
15
|
+
import type { ReactElement } from 'react';
|
|
16
|
+
import { ConsoleShell, type ConsoleShellProps } from '../shared/ConsoleShell';
|
|
17
|
+
import { shortcutBreadcrumbs, shortcutGroups, type ShortcutGroup } from './data';
|
|
18
|
+
import { ShortcutSheet } from './ShortcutSheet';
|
|
19
|
+
|
|
20
|
+
export interface KeyboardShortcutsProps {
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
groups: ShortcutGroup[];
|
|
24
|
+
breadcrumbs: BreadcrumbItem[];
|
|
25
|
+
currentHref: string;
|
|
26
|
+
/** ConsoleShell props (app nav, user, workspaces, sidebar footer, topbar…). */
|
|
27
|
+
shell: Omit<ConsoleShellProps, 'children'>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Keyboard shortcuts as a console page: ConsoleShell + Page with a searchable sheet. */
|
|
31
|
+
export default function KeyboardShortcutsPage(props: Partial<KeyboardShortcutsProps>) {
|
|
32
|
+
const {
|
|
33
|
+
title = 'Keyboard shortcuts',
|
|
34
|
+
description = 'Move around the console without leaving the keyboard. Press ? anywhere to open this list.',
|
|
35
|
+
groups = shortcutGroups,
|
|
36
|
+
breadcrumbs = shortcutBreadcrumbs,
|
|
37
|
+
currentHref = '/help/shortcuts',
|
|
38
|
+
shell,
|
|
39
|
+
} = props;
|
|
40
|
+
return (
|
|
41
|
+
<ConsoleShell breadcrumbs={breadcrumbs} currentHref={currentHref} {...shell}>
|
|
42
|
+
<Page
|
|
43
|
+
header={
|
|
44
|
+
<PageHeader
|
|
45
|
+
breadcrumbs={null}
|
|
46
|
+
title={title}
|
|
47
|
+
description={description}
|
|
48
|
+
status=""
|
|
49
|
+
meta={[]}
|
|
50
|
+
tabs={null}
|
|
51
|
+
actions={[]}
|
|
52
|
+
/>
|
|
53
|
+
}
|
|
54
|
+
>
|
|
55
|
+
<ShortcutSheet groups={groups} />
|
|
56
|
+
</Page>
|
|
57
|
+
</ConsoleShell>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface KeyboardShortcutsDialogProps {
|
|
62
|
+
groups?: ShortcutGroup[];
|
|
63
|
+
open?: boolean;
|
|
64
|
+
defaultOpen?: boolean;
|
|
65
|
+
onOpenChange?: (open: boolean) => void;
|
|
66
|
+
/** Trigger element (rendered through Base UI `render`); omit for a controlled dialog opened by `?`. */
|
|
67
|
+
trigger?: ReactElement | null;
|
|
68
|
+
title?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** The same sheet in a Dialog, for the `?` shortcut or a help menu item. */
|
|
72
|
+
export function KeyboardShortcutsDialog({
|
|
73
|
+
groups = shortcutGroups,
|
|
74
|
+
open,
|
|
75
|
+
defaultOpen,
|
|
76
|
+
onOpenChange,
|
|
77
|
+
trigger = <Button variant="secondary" icon={Keyboard} />,
|
|
78
|
+
title = 'Keyboard shortcuts',
|
|
79
|
+
}: KeyboardShortcutsDialogProps) {
|
|
80
|
+
return (
|
|
81
|
+
<Dialog open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>
|
|
82
|
+
{trigger && <DialogTrigger render={trigger}>{title}</DialogTrigger>}
|
|
83
|
+
<DialogContent size="lg">
|
|
84
|
+
<DialogHeader>
|
|
85
|
+
<DialogTitle>{title}</DialogTitle>
|
|
86
|
+
<DialogDescription>Search by action or key.</DialogDescription>
|
|
87
|
+
</DialogHeader>
|
|
88
|
+
<DialogBody className="max-h-[70vh] overflow-y-auto">
|
|
89
|
+
<ShortcutSheet groups={groups} headingLevel={3} columns={1} autoFocus />
|
|
90
|
+
</DialogBody>
|
|
91
|
+
</DialogContent>
|
|
92
|
+
</Dialog>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Keyboard, Search } from '@gntik-ai/icons';
|
|
2
|
+
import { EmptyState, Grid, Heading, Input, KbdCombo, Stack, Text } from '@gntik-ai/ui';
|
|
3
|
+
import { useId, useState } from 'react';
|
|
4
|
+
import { filterShortcuts, type ShortcutGroup } from './data';
|
|
5
|
+
|
|
6
|
+
export interface ShortcutSheetProps {
|
|
7
|
+
groups: readonly ShortcutGroup[];
|
|
8
|
+
/** Heading level of the group titles (h2 on the page, h3 inside the dialog). */
|
|
9
|
+
headingLevel?: 2 | 3;
|
|
10
|
+
/** Columns of groups at `md` and up. */
|
|
11
|
+
columns?: 1 | 2;
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Searchable shortcut sheet shared by the page and the dialog. */
|
|
16
|
+
export function ShortcutSheet({ groups, headingLevel = 2, columns = 2, autoFocus }: ShortcutSheetProps) {
|
|
17
|
+
const [query, setQuery] = useState('');
|
|
18
|
+
const countId = useId();
|
|
19
|
+
const visible = filterShortcuts(groups, query);
|
|
20
|
+
const total = visible.reduce((n, g) => n + g.shortcuts.length, 0);
|
|
21
|
+
return (
|
|
22
|
+
<Stack gap={5}>
|
|
23
|
+
<Stack gap={2}>
|
|
24
|
+
<Input
|
|
25
|
+
type="search"
|
|
26
|
+
aria-label="Search shortcuts"
|
|
27
|
+
aria-describedby={countId}
|
|
28
|
+
placeholder="Search shortcuts…"
|
|
29
|
+
leadingIcon={Search}
|
|
30
|
+
value={query}
|
|
31
|
+
onValueChange={setQuery}
|
|
32
|
+
autoFocus={autoFocus}
|
|
33
|
+
className="max-w-md"
|
|
34
|
+
/>
|
|
35
|
+
<Text id={countId} variant="caption" tone="muted" aria-live="polite">
|
|
36
|
+
{total === 1 ? '1 shortcut' : `${total} shortcuts`}
|
|
37
|
+
</Text>
|
|
38
|
+
</Stack>
|
|
39
|
+
{visible.length === 0 ? (
|
|
40
|
+
<EmptyState
|
|
41
|
+
icon={Keyboard}
|
|
42
|
+
size="sm"
|
|
43
|
+
titleAs={headingLevel === 2 ? 'h2' : 'h3'}
|
|
44
|
+
title="No shortcuts match"
|
|
45
|
+
description="Try another word, such as “save” or “go to”."
|
|
46
|
+
/>
|
|
47
|
+
) : (
|
|
48
|
+
<Grid cols={{ base: 1, md: columns }} gap={6}>
|
|
49
|
+
{visible.map((g) => (
|
|
50
|
+
<section key={g.id} aria-labelledby={`${countId}-${g.id}`}>
|
|
51
|
+
<Heading id={`${countId}-${g.id}`} level={headingLevel} size="xs" className="mb-2">
|
|
52
|
+
{g.title}
|
|
53
|
+
</Heading>
|
|
54
|
+
<ul className="divide-y divide-border rounded-lg border border-border">
|
|
55
|
+
{g.shortcuts.map((s) => (
|
|
56
|
+
<li key={s.id} className="flex items-center justify-between gap-4 px-3.5 py-2.5">
|
|
57
|
+
<Text as="span" variant="supporting">
|
|
58
|
+
{s.description}
|
|
59
|
+
</Text>
|
|
60
|
+
<span className="flex shrink-0 items-center gap-1.5">
|
|
61
|
+
<KbdCombo keys={s.keys} />
|
|
62
|
+
{s.then && (
|
|
63
|
+
<>
|
|
64
|
+
<Text as="span" variant="caption" tone="muted">
|
|
65
|
+
then
|
|
66
|
+
</Text>
|
|
67
|
+
<KbdCombo keys={s.then} />
|
|
68
|
+
</>
|
|
69
|
+
)}
|
|
70
|
+
</span>
|
|
71
|
+
</li>
|
|
72
|
+
))}
|
|
73
|
+
</ul>
|
|
74
|
+
</section>
|
|
75
|
+
))}
|
|
76
|
+
</Grid>
|
|
77
|
+
)}
|
|
78
|
+
</Stack>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { BreadcrumbItem } from '@gntik-ai/ui';
|
|
2
|
+
|
|
3
|
+
export interface Shortcut {
|
|
4
|
+
id: string;
|
|
5
|
+
/** What the shortcut does. */
|
|
6
|
+
description: string;
|
|
7
|
+
/** Keys pressed together, e.g. ['⌘', 'K']. */
|
|
8
|
+
keys: string[];
|
|
9
|
+
/** A second combination that does the same (e.g. a sequence "G then P"). */
|
|
10
|
+
then?: string[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ShortcutGroup {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
shortcuts: Shortcut[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const shortcutBreadcrumbs: BreadcrumbItem[] = [
|
|
20
|
+
{ label: 'Help', href: '/help' },
|
|
21
|
+
{ label: 'Keyboard shortcuts' },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
/** Neutral console shortcuts, grouped by area. */
|
|
25
|
+
export const shortcutGroups: ShortcutGroup[] = [
|
|
26
|
+
{
|
|
27
|
+
id: 'general',
|
|
28
|
+
title: 'General',
|
|
29
|
+
shortcuts: [
|
|
30
|
+
{ id: 'palette', description: 'Open the command palette', keys: ['⌘', 'K'] },
|
|
31
|
+
{ id: 'help', description: 'Show keyboard shortcuts', keys: ['?'] },
|
|
32
|
+
{ id: 'sidebar', description: 'Collapse or expand the sidebar', keys: ['⌘', 'B'] },
|
|
33
|
+
{ id: 'theme', description: 'Switch theme', keys: ['⌘', '⇧', 'L'] },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'navigation',
|
|
38
|
+
title: 'Navigation',
|
|
39
|
+
shortcuts: [
|
|
40
|
+
{ id: 'go-home', description: 'Go to overview', keys: ['G'], then: ['O'] },
|
|
41
|
+
{ id: 'go-projects', description: 'Go to projects', keys: ['G'], then: ['P'] },
|
|
42
|
+
{ id: 'go-deployments', description: 'Go to deployments', keys: ['G'], then: ['D'] },
|
|
43
|
+
{ id: 'go-settings', description: 'Go to settings', keys: ['G'], then: ['S'] },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'lists',
|
|
48
|
+
title: 'Lists and tables',
|
|
49
|
+
shortcuts: [
|
|
50
|
+
{ id: 'next', description: 'Next row', keys: ['J'] },
|
|
51
|
+
{ id: 'prev', description: 'Previous row', keys: ['K'] },
|
|
52
|
+
{ id: 'open', description: 'Open the selected row', keys: ['↵'] },
|
|
53
|
+
{ id: 'select', description: 'Select the row', keys: ['X'] },
|
|
54
|
+
{ id: 'filter', description: 'Focus the filter', keys: ['/'] },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'editing',
|
|
59
|
+
title: 'Editing',
|
|
60
|
+
shortcuts: [
|
|
61
|
+
{ id: 'save', description: 'Save changes', keys: ['⌘', 'S'] },
|
|
62
|
+
{ id: 'submit', description: 'Submit a form or comment', keys: ['⌘', '↵'] },
|
|
63
|
+
{ id: 'cancel', description: 'Cancel and close', keys: ['Esc'] },
|
|
64
|
+
{ id: 'undo', description: 'Undo', keys: ['⌘', 'Z'] },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
/** Groups with only the shortcuts whose description or keys match the query. */
|
|
70
|
+
export function filterShortcuts(groups: readonly ShortcutGroup[], query: string): ShortcutGroup[] {
|
|
71
|
+
const q = query.trim().toLowerCase();
|
|
72
|
+
if (!q) return [...groups];
|
|
73
|
+
return groups
|
|
74
|
+
.map((g) => ({
|
|
75
|
+
...g,
|
|
76
|
+
shortcuts: g.shortcuts.filter(
|
|
77
|
+
(s) =>
|
|
78
|
+
s.description.toLowerCase().includes(q) ||
|
|
79
|
+
g.title.toLowerCase().includes(q) ||
|
|
80
|
+
[...s.keys, ...(s.then ?? [])].join(' ').toLowerCase() === q,
|
|
81
|
+
),
|
|
82
|
+
}))
|
|
83
|
+
.filter((g) => g.shortcuts.length > 0);
|
|
84
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TemplateMeta } from '../meta';
|
|
2
|
+
|
|
3
|
+
export const meta: TemplateMeta = {
|
|
4
|
+
name: 'Keyboard shortcuts',
|
|
5
|
+
family: 'Help',
|
|
6
|
+
priority: 'P3',
|
|
7
|
+
status: 'experimental',
|
|
8
|
+
description:
|
|
9
|
+
'Searchable shortcut sheet grouped by area (KbdCombo, “G then P” sequences), as a console page and as a Dialog variant (KeyboardShortcutsDialog) for the ? shortcut.',
|
|
10
|
+
layout: 'SidebarLayout · Page',
|
|
11
|
+
blocks: ['app-sidebar', 'app-topbar', 'page-header'],
|
|
12
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { render, screen, within } from '@testing-library/react';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import { expectNoAxeViolations } from '../test/a11y';
|
|
4
|
+
import LandingPage from './Page';
|
|
5
|
+
|
|
6
|
+
describe('LandingPage', () => {
|
|
7
|
+
it('renders the navbar, the marketing sections and the footer', { timeout: 15000 }, async () => {
|
|
8
|
+
render(<LandingPage />);
|
|
9
|
+
expect(screen.getByRole('banner')).toBeInTheDocument();
|
|
10
|
+
expect(screen.getByRole('main')).toBeInTheDocument();
|
|
11
|
+
expect(screen.getByRole('contentinfo')).toBeInTheDocument();
|
|
12
|
+
expect(screen.getAllByRole('heading', { level: 1 })).toHaveLength(1);
|
|
13
|
+
expect(screen.getByRole('navigation', { name: 'Primary' })).toBeInTheDocument();
|
|
14
|
+
expect(screen.getByRole('link', { name: 'Pricing' })).toHaveAttribute('href', '#pricing');
|
|
15
|
+
expect(screen.getByRole('heading', { level: 2, name: 'Simple pricing that scales with you' })).toBeInTheDocument();
|
|
16
|
+
await expectNoAxeViolations();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('switches the billing cycle and selects a tier', { timeout: 15000 }, async () => {
|
|
20
|
+
const onSelectTier = vi.fn();
|
|
21
|
+
render(<LandingPage onSelectTier={onSelectTier} />);
|
|
22
|
+
const pricing = screen.getByRole('region', { name: 'Simple pricing that scales with you' });
|
|
23
|
+
await userEvent.click(within(pricing).getByRole('button', { name: /Annual/ }));
|
|
24
|
+
await userEvent.click(within(pricing).getByRole('button', { name: /Start free trial/ }));
|
|
25
|
+
expect(onSelectTier).toHaveBeenCalledWith(expect.objectContaining({ id: 'team' }), 'annual');
|
|
26
|
+
});
|
|
27
|
+
});
|