@datalayer/core 1.1.59 → 1.1.66
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/README.md +2 -2
- package/lib/api/DatalayerApi.d.ts +42 -1
- package/lib/api/DatalayerApi.js +90 -3
- package/lib/api/constants.d.ts +18 -0
- package/lib/api/constants.js +18 -0
- package/lib/api/contents/attachments.d.ts +9 -0
- package/lib/api/contents/attachments.js +43 -0
- package/lib/api/contents/bridges.d.ts +22 -0
- package/lib/api/contents/bridges.js +79 -0
- package/lib/api/contents/capabilities.d.ts +11 -0
- package/lib/api/contents/capabilities.js +21 -0
- package/lib/api/contents/cloudStorage.d.ts +31 -0
- package/lib/api/contents/cloudStorage.js +89 -0
- package/lib/api/contents/dataservers.d.ts +37 -0
- package/lib/api/contents/dataservers.js +121 -0
- package/lib/api/contents/datasets.d.ts +15 -0
- package/lib/api/contents/datasets.js +45 -0
- package/lib/api/contents/datasources.d.ts +70 -0
- package/lib/api/contents/datasources.js +149 -0
- package/lib/api/contents/generated.d.ts +1070 -0
- package/lib/api/contents/index.d.ts +16 -0
- package/lib/api/contents/index.js +20 -0
- package/lib/api/contents/mcp.d.ts +46 -0
- package/lib/api/contents/mcp.js +157 -0
- package/lib/api/contents/objects.d.ts +31 -0
- package/lib/api/contents/objects.js +88 -0
- package/lib/api/contents/operations.d.ts +3 -0
- package/lib/api/contents/operations.js +19 -0
- package/lib/api/contents/runtimeMounts.d.ts +40 -0
- package/lib/api/contents/runtimeMounts.js +59 -0
- package/lib/api/contents/sandboxUid.d.ts +53 -0
- package/lib/api/contents/sandboxUid.js +78 -0
- package/lib/api/contents/sources.d.ts +19 -0
- package/lib/api/contents/sources.js +119 -0
- package/lib/api/contents/sync.d.ts +18 -0
- package/lib/api/contents/sync.js +69 -0
- package/lib/api/contents/transfers.d.ts +38 -0
- package/lib/api/contents/transfers.js +123 -0
- package/lib/api/iam/connectedAgents.d.ts +39 -0
- package/lib/api/iam/connectedAgents.js +52 -0
- package/lib/api/iam/index.d.ts +2 -1
- package/lib/api/iam/index.js +2 -1
- package/lib/api/iam/mcpAlertRules.d.ts +51 -0
- package/lib/api/iam/mcpAlertRules.js +198 -0
- package/lib/api/iam/mcpAuditSettings.d.ts +46 -0
- package/lib/api/iam/mcpAuditSettings.js +120 -0
- package/lib/api/iam/mcpPolicy.d.ts +80 -0
- package/lib/api/iam/mcpPolicy.js +132 -0
- package/lib/api/iam/organizationTeams.d.ts +13 -0
- package/lib/api/iam/organizationTeams.js +43 -0
- package/lib/api/iam/serviceAgents.d.ts +68 -0
- package/lib/api/iam/serviceAgents.js +119 -0
- package/lib/api/index.d.ts +4 -1
- package/lib/api/index.js +3 -1
- package/lib/api/mcp/activity.d.ts +37 -0
- package/lib/api/mcp/activity.js +26 -0
- package/lib/api/mcp/alerts.d.ts +25 -0
- package/lib/api/mcp/alerts.js +51 -0
- package/lib/api/mcp/audit.d.ts +29 -0
- package/lib/api/mcp/audit.js +55 -0
- package/lib/api/mcp/bindings.d.ts +18 -0
- package/lib/api/mcp/bindings.js +42 -0
- package/lib/api/mcp/forwarding.d.ts +25 -0
- package/lib/api/mcp/forwarding.js +46 -0
- package/lib/api/mcp/gateway.d.ts +16 -0
- package/lib/api/mcp/gateway.js +70 -0
- package/lib/api/mcp/generated.d.ts +22 -0
- package/lib/api/mcp/generated.js +213 -0
- package/lib/api/mcp/index.d.ts +17 -0
- package/lib/api/mcp/index.js +25 -0
- package/lib/api/mcp/observability.d.ts +125 -0
- package/lib/api/mcp/observability.js +254 -0
- package/lib/api/mcp/operations.d.ts +83 -0
- package/lib/api/mcp/operations.js +50 -0
- package/lib/api/mcp/organizations.d.ts +102 -0
- package/lib/api/mcp/organizations.js +46 -0
- package/lib/api/mcp/policy.d.ts +9 -0
- package/lib/api/mcp/policy.js +23 -0
- package/lib/api/mcp/tasks.d.ts +49 -0
- package/lib/api/mcp/tasks.js +147 -0
- package/lib/api/utils/validation.d.ts +1 -1
- package/lib/api/utils/validation.js +1 -1
- package/lib/client/auth/index.js +0 -5
- package/lib/client/auth/storage.js +0 -5
- package/lib/client/auth/strategies.js +0 -5
- package/lib/client/base.d.ts +6 -0
- package/lib/client/base.js +8 -0
- package/lib/client/index.d.ts +0 -10
- package/lib/client/index.js +2 -2
- package/lib/client/mixins/ContentsMixin.d.ts +71 -0
- package/lib/client/mixins/ContentsMixin.js +157 -0
- package/lib/client/mixins/IAMMixin.d.ts +0 -31
- package/lib/client/mixins/IAMMixin.js +0 -58
- package/lib/components/animation/AnimatedText.d.ts +1 -0
- package/lib/components/animation/AnimatedText.js +0 -4
- package/lib/components/auth/SigInAPIKey.d.ts +1 -0
- package/lib/components/auth/SigInAPIKey.js +0 -6
- package/lib/components/auth/SignIn.d.ts +1 -0
- package/lib/components/auth/SignIn.js +0 -4
- package/lib/components/auth/SignIn.stories.d.ts +2 -2
- package/lib/components/avatars/BoringAvatar.d.ts +1 -1
- package/lib/components/avatars/BoringAvatar.stories.d.ts +1 -1
- package/lib/components/avatars/DLAvatar.d.ts +1 -1
- package/lib/components/avatars/DLAvatar.js +0 -4
- package/lib/components/avatars/UserAvatar.d.ts +18 -1
- package/lib/components/avatars/UserAvatar.js +14 -14
- package/lib/components/avatars/UserProfileAvatar.d.ts +1 -1
- package/lib/components/banners/NoAutomationBanner.d.ts +1 -1
- package/lib/components/billing/BillingEntitySelect.d.ts +10 -0
- package/lib/components/billing/BillingEntitySelect.js +0 -17
- package/lib/components/billing/index.js +0 -4
- package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
- package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
- package/lib/components/buttons/LongActionButton.d.ts +1 -0
- package/lib/components/buttons/LongActionButton.js +0 -4
- package/lib/components/buttons/UploadButton.d.ts +1 -0
- package/lib/components/buttons/UploadButton.js +0 -4
- package/lib/components/checkout/StripeCheckout.d.ts +1 -1
- package/lib/components/collaboration/LiveEditorCollaborators.d.ts +31 -0
- package/lib/components/collaboration/LiveEditorCollaborators.js +98 -53
- package/lib/components/collaboration/index.js +0 -4
- package/lib/components/confetti/ConfettiSuccess.d.ts +1 -1
- package/lib/components/contents/ContentSourceCard.d.ts +8 -0
- package/lib/components/contents/ContentSourceCard.js +23 -0
- package/lib/components/contents/HomeFolderObjectsBrowser.d.ts +10 -0
- package/lib/components/contents/HomeFolderObjectsBrowser.js +148 -0
- package/lib/components/contents/index.d.ts +2 -0
- package/lib/components/contents/index.js +6 -0
- package/lib/components/context/OrganizationSelect.d.ts +1 -1
- package/lib/components/display/AvatarSkeleton.d.ts +1 -1
- package/lib/components/display/BusyDots.d.ts +1 -1
- package/lib/components/display/CenteredSpinner.d.ts +1 -1
- package/lib/components/display/CodePreview.d.ts +1 -1
- package/lib/components/display/DatalayerBox.d.ts +7 -2
- package/lib/components/display/DatalayerBox.js +6 -6
- package/lib/components/display/HorizontalCenter.d.ts +1 -1
- package/lib/components/display/JupyterDialog.d.ts +1 -0
- package/lib/components/display/JupyterDialog.js +1 -7
- package/lib/components/display/Markdown.d.ts +1 -0
- package/lib/components/display/NotebookSkeleton.d.ts +1 -1
- package/lib/components/display/Placeholder.d.ts +1 -1
- package/lib/components/display/ToTopBranded.d.ts +1 -1
- package/lib/components/echarts/EChartsReact.d.ts +1 -1
- package/lib/components/flashes/FlashClosable.d.ts +1 -0
- package/lib/components/flashes/FlashClosable.js +0 -4
- package/lib/components/flashes/FlashGuest.d.ts +1 -1
- package/lib/components/flashes/FlashSurveys.d.ts +1 -1
- package/lib/components/flashes/FlashUnauthorized.d.ts +1 -0
- package/lib/components/flashes/FlashUnauthorized.js +0 -6
- package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
- package/lib/components/iam/ExternalTokenSilentLogin.d.ts +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +2 -0
- package/lib/components/labels/StatusLabels.d.ts +10 -0
- package/lib/components/labels/StatusLabels.js +30 -1
- package/lib/components/labels/VisibilityLabel.d.ts +1 -1
- package/lib/components/landings/StepBlock.d.ts +1 -1
- package/lib/components/mcp/ClientBadge.d.ts +41 -0
- package/lib/components/mcp/ClientBadge.js +33 -0
- package/lib/components/mcp/McpErrorBlankslate.d.ts +21 -0
- package/lib/components/mcp/McpErrorBlankslate.js +17 -0
- package/lib/components/mcp/ScopeList.d.ts +28 -0
- package/lib/components/mcp/ScopeList.js +14 -0
- package/lib/components/mcp/index.d.ts +10 -0
- package/lib/components/mcp/index.js +18 -0
- package/lib/components/navbar/NavigationVisbilityObserver.d.ts +2 -1
- package/lib/components/navbar/SubdomainNavBar.d.ts +10 -5
- package/lib/components/navbar/SubdomainNavBar.js +2 -1
- package/lib/components/notebooks/JupyterNotebook.d.ts +1 -1
- package/lib/components/notebooks/JupyterNotebookToolbar.d.ts +1 -1
- package/lib/components/principal/PrincipalAppearance.d.ts +1 -0
- package/lib/components/principal/PrincipalAppearance.js +0 -8
- package/lib/components/principal/PrincipalAvatar.d.ts +9 -1
- package/lib/components/principal/PrincipalAvatar.js +25 -10
- package/lib/components/principal/PrincipalBadge.d.ts +1 -1
- package/lib/components/principal/PrincipalBanner.d.ts +1 -1
- package/lib/components/principal/PrincipalDetailsOverlay.d.ts +31 -1
- package/lib/components/principal/PrincipalDetailsOverlay.js +64 -33
- package/lib/components/principal/PrincipalHoverCard.d.ts +31 -0
- package/lib/components/principal/PrincipalHoverCard.js +52 -0
- package/lib/components/principal/PrincipalSwitcherMenu.d.ts +1 -0
- package/lib/components/principal/PrincipalSwitcherMenu.js +7 -15
- package/lib/components/principal/index.d.ts +2 -1
- package/lib/components/principal/index.js +2 -1
- package/lib/components/progress/ConsumptionBar.d.ts +1 -0
- package/lib/components/progress/ConsumptionBar.js +0 -4
- package/lib/components/progress/ProgressRing.d.ts +1 -0
- package/lib/components/progress/SpinnerBar.d.ts +1 -1
- package/lib/components/progress/Timer.d.ts +1 -0
- package/lib/components/progress/Timer.js +0 -4
- package/lib/components/screencapture/ScreencaptureButton.d.ts +1 -1
- package/lib/components/sharing/ShareAccessComponent.d.ts +15 -1
- package/lib/components/sharing/ShareAccessComponent.js +36 -23
- package/lib/components/sharing/SharingEditor.d.ts +17 -0
- package/lib/components/sharing/SharingEditor.js +0 -24
- package/lib/components/sparklines/Sparklines.js +3 -4
- package/lib/components/sparklines/index.js +0 -4
- package/lib/components/storage/ContentsBrowser.d.ts +25 -1
- package/lib/components/storage/ContentsBrowser.js +145 -52
- package/lib/components/storage/ContentsBrowserMock.d.ts +3 -0
- package/lib/components/storage/ContentsBrowserMock.js +75 -0
- package/lib/components/storage/ContentsItems.d.ts +2 -1
- package/lib/components/storage/ContentsItems.js +0 -4
- package/lib/components/storage/ContentsTable.d.ts +50 -0
- package/lib/components/storage/ContentsTable.js +134 -0
- package/lib/components/storage/HomeFolderDrive.d.ts +71 -0
- package/lib/components/storage/HomeFolderDrive.js +248 -0
- package/lib/components/storage/index.d.ts +2 -0
- package/lib/components/storage/index.js +2 -0
- package/lib/components/students/StudentItemStatus.d.ts +1 -1
- package/lib/components/students/StudentResultCircle.d.ts +1 -1
- package/lib/components/subnav/SubNav.d.ts +5 -5
- package/lib/components/subnav/SubNav.js +11 -9
- package/lib/components/tables/DataTable.d.ts +1 -1
- package/lib/components/text-reveal/TextRevealAnimation.d.ts +2 -2
- package/lib/components/text-reveal/useTextRevealAnimationLines.d.ts +1 -1
- package/lib/components/time/LiveRelativeTime.d.ts +1 -0
- package/lib/components/time/LiveRelativeTime.js +0 -8
- package/lib/components/time/index.js +0 -4
- package/lib/components/timeline/Timeline.d.ts +1 -1
- package/lib/components/timeline/index.js +0 -4
- package/lib/components/users/PeerIndicator.d.ts +1 -0
- package/lib/components/users/PeerIndicator.js +0 -4
- package/lib/config/Configuration.d.ts +15 -17
- package/lib/config/Configuration.js +7 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/layouts/LayoutBackdrop.d.ts +1 -1
- package/lib/hooks/layouts/LayoutScreencapture.d.ts +1 -1
- package/lib/hooks/useBackdrop.d.ts +1 -1
- package/lib/hooks/useBackdropJupyterLab.d.ts +3 -2
- package/lib/hooks/useBackdropJupyterLab.js +0 -4
- package/lib/hooks/useCache.d.ts +310 -105
- package/lib/hooks/useCache.js +142 -355
- package/lib/hooks/useContainsFocus.d.ts +1 -1
- package/lib/hooks/useContents.d.ts +313 -0
- package/lib/hooks/useContents.js +964 -0
- package/lib/hooks/useFocusTrap.d.ts +4 -4
- package/lib/hooks/useFocusTrap.js +1 -1
- package/lib/hooks/useMcp.d.ts +229 -0
- package/lib/hooks/useMcp.js +656 -0
- package/lib/hooks/useMobile.js +0 -5
- package/lib/hooks/useProjectStore.d.ts +3 -3
- package/lib/hooks/useProjectStore.js +4 -4
- package/lib/hooks/useRef.d.ts +1 -1
- package/lib/hooks/useRef.js +3 -0
- package/lib/hooks/useScreencapture.d.ts +2 -1
- package/lib/hooks/useScreencapture.js +0 -4
- package/lib/hooks/useToast.js +0 -4
- package/lib/hooks/useUser.js +42 -0
- package/lib/hooks/useVisibilityObserver.d.ts +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +3 -1
- package/lib/mocks/components/FlashMock.d.ts +1 -1
- package/lib/mocks/views/ActionMenuMock.d.ts +1 -1
- package/lib/mocks/views/ChartMock.d.ts +1 -1
- package/lib/mocks/views/DashboardMock.d.ts +1 -1
- package/lib/mocks/views/FormMock.d.ts +1 -1
- package/lib/mocks/views/TableMock.d.ts +1 -1
- package/lib/mocks/views/WipMock.d.ts +1 -1
- package/lib/models/Credits.d.ts +16 -0
- package/lib/models/Credits.js +22 -0
- package/lib/models/McpAuditEvent.d.ts +52 -0
- package/lib/models/McpAuditEvent.js +5 -0
- package/lib/models/McpBinding.d.ts +51 -0
- package/lib/models/McpBinding.js +5 -0
- package/lib/models/McpPolicy.d.ts +77 -0
- package/lib/models/McpPolicy.js +5 -0
- package/lib/models/McpTask.d.ts +94 -0
- package/lib/models/McpTask.js +7 -0
- package/lib/models/StartedBy.d.ts +57 -0
- package/lib/models/StartedBy.js +81 -0
- package/lib/models/UserDTO.js +4 -2
- package/lib/models/contents/__fixtures__/solr-codec.json +57 -0
- package/lib/models/contents/__fixtures__/v1-contracts.json +66 -0
- package/lib/models/contents/fieldCase.d.ts +8 -0
- package/lib/models/contents/fieldCase.js +37 -0
- package/lib/models/contents/index.d.ts +2 -0
- package/lib/models/contents/index.js +6 -0
- package/lib/models/contents/permissions.d.ts +16 -0
- package/lib/models/contents/permissions.js +34 -0
- package/lib/models/index.d.ts +5 -1
- package/lib/models/index.js +5 -1
- package/lib/state/substates/CoreState.d.ts +15 -7
- package/lib/state/substates/CoreState.js +18 -14
- package/lib/state/substates/IAMState.d.ts +1 -1
- package/lib/state/substates/IAMState.js +5 -5
- package/lib/state/substates/ProfileState.js +0 -4
- package/lib/state/substates/index.d.ts +0 -1
- package/lib/state/substates/index.js +0 -1
- package/lib/utils/Jwt.d.ts +26 -0
- package/lib/utils/Jwt.js +37 -0
- package/lib/utils/WithSuspense.d.ts +1 -1
- package/lib/views/api-keys/APIKeyEdit.d.ts +1 -1
- package/lib/views/api-keys/APIKeyNew.d.ts +1 -1
- package/lib/views/api-keys/APIKeys.d.ts +1 -1
- package/lib/views/api-keys/APIKeys.js +30 -4
- package/lib/views/api-keys/APIKeysStandalone.d.ts +5 -1
- package/lib/views/api-keys/APIKeysStandalone.js +2 -2
- package/lib/views/datasources/DatasourceDetail.d.ts +12 -5
- package/lib/views/datasources/DatasourceDetail.js +80 -110
- package/lib/views/datasources/DatasourceNew.d.ts +14 -8
- package/lib/views/datasources/DatasourceNew.js +129 -118
- package/lib/views/datasources/Datasources.d.ts +39 -7
- package/lib/views/datasources/Datasources.js +95 -40
- package/lib/views/datasources/DatasourcesMock.d.ts +3 -0
- package/lib/views/datasources/DatasourcesMock.js +57 -0
- package/lib/views/iam/SignInSimple.d.ts +12 -0
- package/lib/views/iam/SignInSimple.js +4 -4
- package/lib/views/index.d.ts +1 -0
- package/lib/views/index.js +1 -0
- package/lib/views/mcp/AlertDestinations.d.ts +34 -0
- package/lib/views/mcp/AlertDestinations.js +75 -0
- package/lib/views/mcp/AlertRules.d.ts +32 -0
- package/lib/views/mcp/AlertRules.js +245 -0
- package/lib/views/mcp/AuditLog.d.ts +42 -0
- package/lib/views/mcp/AuditLog.js +144 -0
- package/lib/views/mcp/ConnectedAgents.d.ts +34 -0
- package/lib/views/mcp/ConnectedAgents.js +100 -0
- package/lib/views/mcp/EnterpriseConsole.d.ts +74 -0
- package/lib/views/mcp/EnterpriseConsole.js +173 -0
- package/lib/views/mcp/McpDashboard.d.ts +50 -0
- package/lib/views/mcp/McpDashboard.js +347 -0
- package/lib/views/mcp/McpHome.d.ts +92 -0
- package/lib/views/mcp/McpHome.js +153 -0
- package/lib/views/mcp/McpObservability.d.ts +50 -0
- package/lib/views/mcp/McpObservability.js +150 -0
- package/lib/views/mcp/OrganizationPolicy.d.ts +45 -0
- package/lib/views/mcp/OrganizationPolicy.js +107 -0
- package/lib/views/mcp/OrganizationUsage.d.ts +69 -0
- package/lib/views/mcp/OrganizationUsage.js +113 -0
- package/lib/views/mcp/PersonalPolicy.d.ts +54 -0
- package/lib/views/mcp/PersonalPolicy.js +125 -0
- package/lib/views/mcp/Policies.d.ts +53 -0
- package/lib/views/mcp/Policies.js +210 -0
- package/lib/views/mcp/PolicyForm.d.ts +67 -0
- package/lib/views/mcp/PolicyForm.js +91 -0
- package/lib/views/mcp/PolicyHistory.d.ts +45 -0
- package/lib/views/mcp/PolicyHistory.js +62 -0
- package/lib/views/mcp/ServiceAgents.d.ts +46 -0
- package/lib/views/mcp/ServiceAgents.js +194 -0
- package/lib/views/mcp/TeamPolicies.d.ts +33 -0
- package/lib/views/mcp/TeamPolicies.js +98 -0
- package/lib/views/mcp/format.d.ts +25 -0
- package/lib/views/mcp/format.js +77 -0
- package/lib/views/mcp/index.d.ts +29 -0
- package/lib/views/mcp/index.js +37 -0
- package/lib/views/mcp/types.d.ts +66 -0
- package/lib/views/mcp/types.js +5 -0
- package/lib/views/secrets/SecretEdit.d.ts +5 -1
- package/lib/views/secrets/SecretEdit.js +2 -2
- package/lib/views/secrets/SecretNew.d.ts +11 -1
- package/lib/views/secrets/SecretNew.js +2 -2
- package/lib/views/secrets/Secrets.d.ts +12 -1
- package/lib/views/secrets/Secrets.js +2 -2
- package/package.json +28 -24
- package/scripts/generate-contents-types.py +169 -0
- package/scripts/generate-mcp-types.py +233 -0
- package/lib/api/iam/datasources.d.ts +0 -86
- package/lib/api/iam/datasources.js +0 -185
- package/lib/components/toolbars/index.d.ts +0 -1
- package/lib/models/Datasource.d.ts +0 -181
- package/lib/models/Datasource.js +0 -154
- package/lib/state/substates/DatasourceState.d.ts +0 -11
- package/lib/state/substates/DatasourceState.js +0 -16
- /package/lib/{components/toolbars/index.js → api/contents/generated.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ToTopBranded: () => import("react
|
|
1
|
+
export declare const ToTopBranded: () => import("react").JSX.Element;
|
|
2
2
|
export default ToTopBranded;
|
|
@@ -7,5 +7,5 @@ export interface EChartsProps {
|
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
theme?: 'light' | 'dark';
|
|
9
9
|
}
|
|
10
|
-
export declare const EChartsReact: ({ options, style, settings, loading, theme, }: EChartsProps) => import("react
|
|
10
|
+
export declare const EChartsReact: ({ options, style, settings, loading, theme, }: EChartsProps) => import("react").JSX.Element;
|
|
11
11
|
export default EChartsReact;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
|
-
* Distributed under the terms of the Modified BSD License.
|
|
5
|
-
*/
|
|
6
2
|
import { AlertIcon, CheckIcon, InfoIcon, StopIcon, XIcon, } from '@primer/octicons-react';
|
|
7
3
|
import { Flash as PrimerFlash, IconButton } from '@primer/react';
|
|
8
4
|
import { Box } from '@datalayer/primer-addons';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const FlashGuest: () => import("react
|
|
1
|
+
export declare const FlashGuest: () => import("react").JSX.Element;
|
|
2
2
|
export default FlashGuest;
|
|
@@ -2,5 +2,5 @@ export declare const SURVEY_2025_1_NAME = "2025-1";
|
|
|
2
2
|
type IFlashSurveysProps = {
|
|
3
3
|
surveyName?: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const FlashSurveys: (props: IFlashSurveysProps) => import("react
|
|
5
|
+
export declare const FlashSurveys: (props: IFlashSurveysProps) => import("react").JSX.Element;
|
|
6
6
|
export default FlashSurveys;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
|
-
* Distributed under the terms of the Modified BSD License.
|
|
5
|
-
*/
|
|
6
|
-
// import { AlertIcon } from '@primer/octicons-react';
|
|
7
|
-
// import { Box, Flash as PrimerFlash, Link } from '@primer/react';
|
|
8
2
|
import { Link } from '@primer/react';
|
|
9
3
|
import { Banner } from '@primer/react/experimental';
|
|
10
4
|
import { QuestionIcon } from '@primer/octicons-react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type IExternalTokenSilentLoginProps = {
|
|
2
2
|
message: string;
|
|
3
3
|
};
|
|
4
|
-
export declare const ExternalTokenSilentLogin: (props: IExternalTokenSilentLoginProps) => import("react
|
|
4
|
+
export declare const ExternalTokenSilentLogin: (props: IExternalTokenSilentLoginProps) => import("react").JSX.Element;
|
|
5
5
|
export default ExternalTokenSilentLogin;
|
package/lib/components/index.js
CHANGED
|
@@ -6,6 +6,8 @@ export * from './auth/index.js';
|
|
|
6
6
|
export * from './animation/index.js';
|
|
7
7
|
export * from './billing/index.js';
|
|
8
8
|
export * from './collaboration/index.js';
|
|
9
|
+
export * from './contents/index.js';
|
|
10
|
+
export * from './mcp/index.js';
|
|
9
11
|
export * from './sharing/index.js';
|
|
10
12
|
export * from './sparklines/index.js';
|
|
11
13
|
export * from './time/index.js';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module components/labels/StatusLabels
|
|
11
11
|
*/
|
|
12
|
+
import type { JSX } from 'react';
|
|
12
13
|
import type { ReactNode } from 'react';
|
|
13
14
|
/** The tones a status pill is read in. */
|
|
14
15
|
export type StatusLabelTone = 'accent' | 'attention' | 'success' | 'neutral';
|
|
@@ -39,4 +40,13 @@ export declare function AdminLabel(props?: StatusLabelProps): JSX.Element;
|
|
|
39
40
|
* The one that is taken when none is chosen — the default space of an account.
|
|
40
41
|
*/
|
|
41
42
|
export declare function DefaultLabel(props?: StatusLabelProps): JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Something announced and not there yet.
|
|
45
|
+
*
|
|
46
|
+
* A tone of its own, and deliberately not the accent an alpha wears: one says
|
|
47
|
+
* "you may try this, it may bite", the other "there is nothing to try". Read
|
|
48
|
+
* side by side in a navigation, two labels of one colour say the same thing
|
|
49
|
+
* about two entries that mean different things.
|
|
50
|
+
*/
|
|
51
|
+
export declare function SoonLabel(props?: StatusLabelProps): JSX.Element;
|
|
42
52
|
export default StatusLabel;
|
|
@@ -33,7 +33,24 @@ export function StatusLabel(props) {
|
|
|
33
33
|
return (_jsx(Label, { variant: "secondary", size: size, sx: {
|
|
34
34
|
textTransform: 'lowercase',
|
|
35
35
|
lineHeight: 1.2,
|
|
36
|
-
|
|
36
|
+
/*
|
|
37
|
+
* The tone, under a doubled selector.
|
|
38
|
+
*
|
|
39
|
+
* Primer ships `NavList` and `ActionList` as CSS modules, and the
|
|
40
|
+
* colour they set on the contents of an item ties with the one Emotion
|
|
41
|
+
* generates for `sx` — so the same label came out in the colour of the
|
|
42
|
+
* navigation in one place and in its own colour in another, depending
|
|
43
|
+
* on which stylesheet happened to come last. `&&` raises the
|
|
44
|
+
* specificity enough that the tone always lands, wherever the label is
|
|
45
|
+
* put.
|
|
46
|
+
*/
|
|
47
|
+
'&&': {
|
|
48
|
+
...TONES[tone],
|
|
49
|
+
// The navigation of Primer colours the contents of its items, and
|
|
50
|
+
// its stylesheet is loaded after ours: a doubled selector was not
|
|
51
|
+
// enough on its own, so the colour of the tone is stated as final.
|
|
52
|
+
color: `${TONES[tone].color} !important`,
|
|
53
|
+
},
|
|
37
54
|
...sx,
|
|
38
55
|
}, children: children }));
|
|
39
56
|
}
|
|
@@ -58,4 +75,16 @@ export function DefaultLabel(props = {}) {
|
|
|
58
75
|
const { children = 'default', ...rest } = props;
|
|
59
76
|
return (_jsx(StatusLabel, { tone: "accent", ...rest, children: children }));
|
|
60
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Something announced and not there yet.
|
|
80
|
+
*
|
|
81
|
+
* A tone of its own, and deliberately not the accent an alpha wears: one says
|
|
82
|
+
* "you may try this, it may bite", the other "there is nothing to try". Read
|
|
83
|
+
* side by side in a navigation, two labels of one colour say the same thing
|
|
84
|
+
* about two entries that mean different things.
|
|
85
|
+
*/
|
|
86
|
+
export function SoonLabel(props = {}) {
|
|
87
|
+
const { children = 'soon', ...rest } = props;
|
|
88
|
+
return (_jsx(StatusLabel, { tone: "neutral", ...rest, children: children }));
|
|
89
|
+
}
|
|
61
90
|
export default StatusLabel;
|
|
@@ -7,5 +7,5 @@ type IStepBlockProps = {
|
|
|
7
7
|
colored?: boolean;
|
|
8
8
|
}>;
|
|
9
9
|
};
|
|
10
|
-
export declare const StepBlock: (props: IStepBlockProps) => import("react
|
|
10
|
+
export declare const StepBlock: (props: IStepBlockProps) => import("react").JSX.Element;
|
|
11
11
|
export default StepBlock;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which client this is, said the way its identity was established.
|
|
3
|
+
*
|
|
4
|
+
* A client that registered by Client ID Metadata Document *is* its URL: the
|
|
5
|
+
* host is the part of its identity nobody can invent, and it is what the
|
|
6
|
+
* consent screen showed — so the URL is the client id on screen, with the
|
|
7
|
+
* hostname read out beneath the name. A client registered through the
|
|
8
|
+
* deprecated dynamic path has an opaque id and gets it plainly, marked as
|
|
9
|
+
* such, because the two are not the same kind of fact.
|
|
10
|
+
*
|
|
11
|
+
* The badge explains itself through `title` and its accessible name rather
|
|
12
|
+
* than a Primer `Tooltip`. That component requires an interactive child and
|
|
13
|
+
* warns otherwise, because a tooltip on a label appears on hover and nowhere
|
|
14
|
+
* else — it does not exist for a keyboard or a screen reader. A `<button>`
|
|
15
|
+
* around the word would silence the warning by trading one problem for
|
|
16
|
+
* another: a tab stop that announces itself as a button and does nothing.
|
|
17
|
+
*
|
|
18
|
+
* The word alone is the part that needs explaining. "Document" read out on
|
|
19
|
+
* its own says nothing, so the accessible name is the whole sentence.
|
|
20
|
+
*
|
|
21
|
+
* @module components/mcp/ClientBadge
|
|
22
|
+
*/
|
|
23
|
+
import type { JSX } from 'react';
|
|
24
|
+
import type { ConnectedAgentRegistration } from '../../api/iam/connectedAgents';
|
|
25
|
+
export interface ClientBadgeProps {
|
|
26
|
+
clientId: string;
|
|
27
|
+
clientName?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* How the client registered, when IAM said. Without it the id's shape is
|
|
30
|
+
* used, which is what an audit row or a task leaves us with.
|
|
31
|
+
*/
|
|
32
|
+
registration?: ConnectedAgentRegistration;
|
|
33
|
+
/** The document's hostname, when IAM answered one. */
|
|
34
|
+
clientHostname?: string | null;
|
|
35
|
+
/** Without the second line, for a dense table. */
|
|
36
|
+
compact?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** The hostname of a document URL, or an empty string for anything else. */
|
|
39
|
+
export declare const clientHostnameOf: (clientId: string) => string;
|
|
40
|
+
export declare const ClientBadge: ({ clientId, clientName, registration, clientHostname, compact, }: ClientBadgeProps) => JSX.Element;
|
|
41
|
+
export default ClientBadge;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Label, Text } from '@primer/react';
|
|
3
|
+
import { Box } from '@datalayer/primer-addons';
|
|
4
|
+
import { isCimdClientId } from '../../api/iam/connectedAgents.js';
|
|
5
|
+
/** The hostname of a document URL, or an empty string for anything else. */
|
|
6
|
+
export const clientHostnameOf = (clientId) => {
|
|
7
|
+
try {
|
|
8
|
+
return new URL(clientId).hostname;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export const ClientBadge = ({ clientId, clientName, registration, clientHostname, compact = false, }) => {
|
|
15
|
+
const byDocument = (registration ?? (isCimdClientId(clientId) ? 'cimd' : 'dcr')) === 'cimd';
|
|
16
|
+
const hostname = clientHostname || (byDocument ? clientHostnameOf(clientId) : '');
|
|
17
|
+
const name = clientName || (byDocument ? hostname : '') || clientId || 'Unknown client';
|
|
18
|
+
return (_jsxs(Box, { sx: { display: 'grid', gap: '2px', minWidth: 0 }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2, minWidth: 0 }, children: [_jsx(Text, { sx: {
|
|
19
|
+
fontSize: 1,
|
|
20
|
+
fontWeight: 'semibold',
|
|
21
|
+
overflow: 'hidden',
|
|
22
|
+
textOverflow: 'ellipsis',
|
|
23
|
+
whiteSpace: 'nowrap',
|
|
24
|
+
}, children: name }), byDocument ? (_jsx(Label, { size: "small", variant: "accent", title: "Registered by Client ID Metadata Document", "aria-label": "Registered by Client ID Metadata Document", children: "Document" })) : (_jsx(Label, { size: "small", variant: "secondary", title: "Registered dynamically; its id is opaque", "aria-label": "Registered dynamically; its id is opaque", children: "Dynamic" }))] }), !compact && clientId && (_jsx(Text, { sx: {
|
|
25
|
+
fontSize: 0,
|
|
26
|
+
color: 'fg.muted',
|
|
27
|
+
fontFamily: 'mono',
|
|
28
|
+
overflow: 'hidden',
|
|
29
|
+
textOverflow: 'ellipsis',
|
|
30
|
+
whiteSpace: 'nowrap',
|
|
31
|
+
}, title: clientId, children: clientId }))] }));
|
|
32
|
+
};
|
|
33
|
+
export default ClientBadge;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A failure, said in the reader's terms, with a way out of it.
|
|
3
|
+
*
|
|
4
|
+
* The four situations "could not be loaded" covers each call for a
|
|
5
|
+
* different response — sign in, ask for access, wait, report — so the
|
|
6
|
+
* heading and the description come from the application's catalog and the
|
|
7
|
+
* retry button appears only when retrying could plausibly work.
|
|
8
|
+
*
|
|
9
|
+
* @module components/mcp/McpErrorBlankslate
|
|
10
|
+
*/
|
|
11
|
+
import type { JSX } from 'react';
|
|
12
|
+
import type { McpErrorState } from '../../views/mcp/types';
|
|
13
|
+
export interface McpErrorBlankslateProps {
|
|
14
|
+
state: McpErrorState;
|
|
15
|
+
/** Asked again; drawn only when the failure is retryable. */
|
|
16
|
+
onRetry?: () => void;
|
|
17
|
+
/** Without a border when it sits inside a panel that has one. */
|
|
18
|
+
border?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const McpErrorBlankslate: ({ state, onRetry, border, }: McpErrorBlankslateProps) => JSX.Element;
|
|
21
|
+
export default McpErrorBlankslate;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from '@primer/react';
|
|
3
|
+
import { Blankslate } from '@primer/react/experimental';
|
|
4
|
+
import { AlertIcon, LockIcon, SearchIcon, ShieldLockIcon, StopIcon, } from '@primer/octicons-react';
|
|
5
|
+
import { Box } from '@datalayer/primer-addons';
|
|
6
|
+
const VISUAL = {
|
|
7
|
+
unauthenticated: ShieldLockIcon,
|
|
8
|
+
forbidden: LockIcon,
|
|
9
|
+
'not-found': SearchIcon,
|
|
10
|
+
unavailable: StopIcon,
|
|
11
|
+
unknown: AlertIcon,
|
|
12
|
+
};
|
|
13
|
+
export const McpErrorBlankslate = ({ state, onRetry, border = true, }) => {
|
|
14
|
+
const Icon = VISUAL[state.reason];
|
|
15
|
+
return (_jsx(Box, { sx: { width: '100%', minWidth: 0 }, children: _jsxs(Blankslate, { border: border, spacious: true, children: [_jsx(Blankslate.Visual, { children: _jsx(Icon, { size: "medium" }) }), _jsx(Blankslate.Heading, { children: state.heading }), _jsx(Blankslate.Description, { children: _jsx(Text, { sx: { textAlign: 'center' }, children: state.description }) }), state.retryable && onRetry && (_jsx(Button, { size: "small", onClick: onRetry, children: "Try again" }))] }) }));
|
|
16
|
+
};
|
|
17
|
+
export default McpErrorBlankslate;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The scopes a grant carries, as labels.
|
|
3
|
+
*
|
|
4
|
+
* A grant with a dozen scopes would push every other column off the row, so
|
|
5
|
+
* the list shows the first few and says how many more there are; the whole
|
|
6
|
+
* list is in the title, which is where a reader who needs it looks.
|
|
7
|
+
*
|
|
8
|
+
* The `+N` is **not** a Primer `Tooltip`. That component requires an
|
|
9
|
+
* interactive child and warns otherwise, for a good reason: a tooltip on a
|
|
10
|
+
* span appears on hover and nowhere else, so it does not exist for anybody
|
|
11
|
+
* using a keyboard or a screen reader. Wrapping the count in a `<button>`
|
|
12
|
+
* would silence the warning by trading one problem for another — a tab stop
|
|
13
|
+
* that announces itself as a button and does nothing when pressed.
|
|
14
|
+
*
|
|
15
|
+
* So the scopes go where they are actually readable: `title` for the mouse,
|
|
16
|
+
* and the accessible name for everything else. Which is what the sentence
|
|
17
|
+
* above always said.
|
|
18
|
+
*
|
|
19
|
+
* @module components/mcp/ScopeList
|
|
20
|
+
*/
|
|
21
|
+
import type { JSX } from 'react';
|
|
22
|
+
export interface ScopeListProps {
|
|
23
|
+
scopes: string[];
|
|
24
|
+
/** How many are drawn before the rest become a count. */
|
|
25
|
+
max?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare const ScopeList: ({ scopes, max }: ScopeListProps) => JSX.Element;
|
|
28
|
+
export default ScopeList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Label, Text } from '@primer/react';
|
|
3
|
+
import { Box } from '@datalayer/primer-addons';
|
|
4
|
+
export const ScopeList = ({ scopes, max = 3 }) => {
|
|
5
|
+
if (scopes.length === 0) {
|
|
6
|
+
// A grant with no scope grants nothing, which is worth saying rather
|
|
7
|
+
// than drawing as an empty cell.
|
|
8
|
+
return _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "No scope" });
|
|
9
|
+
}
|
|
10
|
+
const shown = scopes.slice(0, max);
|
|
11
|
+
const rest = scopes.length - shown.length;
|
|
12
|
+
return (_jsxs(Box, { sx: { display: 'flex', gap: 1, flexWrap: 'wrap', alignItems: 'center' }, children: [shown.map(scope => (_jsx(Label, { size: "small", variant: "secondary", children: scope }, scope))), rest > 0 && (_jsxs(Text, { as: "span", title: scopes.join('\n'), "aria-label": `and ${rest} more: ${scopes.slice(max).join(', ')}`, sx: { fontSize: 0, color: 'fg.muted' }, children: ["+", rest] }))] }));
|
|
13
|
+
};
|
|
14
|
+
export default ScopeList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pieces every MCP surface is drawn from, so a client, a scope and a
|
|
3
|
+
* failure look the same on the dashboard, in the settings and in the
|
|
4
|
+
* Enterprise console.
|
|
5
|
+
*
|
|
6
|
+
* @module components/mcp
|
|
7
|
+
*/
|
|
8
|
+
export * from './ClientBadge';
|
|
9
|
+
export * from './McpErrorBlankslate';
|
|
10
|
+
export * from './ScopeList';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The pieces every MCP surface is drawn from, so a client, a scope and a
|
|
11
|
+
* failure look the same on the dashboard, in the settings and in the
|
|
12
|
+
* Enterprise console.
|
|
13
|
+
*
|
|
14
|
+
* @module components/mcp
|
|
15
|
+
*/
|
|
16
|
+
export * from './ClientBadge.js';
|
|
17
|
+
export * from './McpErrorBlankslate.js';
|
|
18
|
+
export * from './ScopeList.js';
|
|
@@ -34,13 +34,18 @@ export type SubdomainNavBarProps = {
|
|
|
34
34
|
*/
|
|
35
35
|
logoHref?: string;
|
|
36
36
|
};
|
|
37
|
-
declare function Root({ children, className, fixed, fullWidth, logoHref, title, titleHref, ...rest }: SubdomainNavBarProps):
|
|
37
|
+
declare function Root({ children, className, fixed, fullWidth, logoHref, title, titleHref, ...rest }: SubdomainNavBarProps): React.JSX.Element;
|
|
38
38
|
type LinkProps = {
|
|
39
39
|
href: string;
|
|
40
40
|
isExternal?: boolean;
|
|
41
41
|
target?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Set from the link's own text when the overflow menu clones it, so
|
|
44
|
+
* `useVisibilityObserver` can track which items are visible.
|
|
45
|
+
*/
|
|
46
|
+
'data-navitemid'?: React.ReactNode;
|
|
42
47
|
} & React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
|
|
43
|
-
declare function Link({ href, className, children, isExternal, target, ...rest }: PropsWithChildren<LinkProps>):
|
|
48
|
+
declare function Link({ href, className, children, isExternal, target, ...rest }: PropsWithChildren<LinkProps>): React.JSX.Element;
|
|
44
49
|
export type SubdomainNavBarSearchResultProps = {
|
|
45
50
|
title: string;
|
|
46
51
|
description: string;
|
|
@@ -51,7 +56,7 @@ export type SubdomainNavBarSearchResultProps = {
|
|
|
51
56
|
type SearchProps = {
|
|
52
57
|
onSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
53
58
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
54
|
-
ref: React.RefObject<HTMLInputElement>;
|
|
59
|
+
ref: React.RefObject<HTMLInputElement | null>;
|
|
55
60
|
active?: boolean;
|
|
56
61
|
title?: string;
|
|
57
62
|
handlerFn?: (event: MouseEvent | TouchEvent | FocusEvent) => void;
|
|
@@ -63,8 +68,8 @@ type CTAActionProps = {
|
|
|
63
68
|
hasArrow?: boolean;
|
|
64
69
|
size?: string;
|
|
65
70
|
} & React.HTMLAttributes<HTMLAnchorElement>;
|
|
66
|
-
declare function PrimaryAction({ children, ...rest }: PropsWithChildren<CTAActionProps>):
|
|
67
|
-
declare function SecondaryAction({ children, ...rest }: PropsWithChildren<CTAActionProps>):
|
|
71
|
+
declare function PrimaryAction({ children, ...rest }: PropsWithChildren<CTAActionProps>): React.JSX.Element;
|
|
72
|
+
declare function SecondaryAction({ children, ...rest }: PropsWithChildren<CTAActionProps>): React.JSX.Element;
|
|
68
73
|
export declare const SubdomainNavBar: typeof Root & {
|
|
69
74
|
Link: typeof Link;
|
|
70
75
|
Search: React.ForwardRefExoticComponent<Omit<SearchProps, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -81,7 +81,8 @@ function Root({ children, className, fixed = true, fullWidth = false, logoHref =
|
|
|
81
81
|
[]).length > 0;
|
|
82
82
|
const menuItems = useMemo(() => React.Children.toArray(children)
|
|
83
83
|
.map((child, index) => {
|
|
84
|
-
if (React.isValidElement(child) &&
|
|
84
|
+
if (React.isValidElement(child) &&
|
|
85
|
+
typeof child.type !== 'string') {
|
|
85
86
|
if (child.type === Link) {
|
|
86
87
|
return React.cloneElement(child, {
|
|
87
88
|
'data-navitemid': child.props.children,
|
|
@@ -3,5 +3,5 @@ type IJupyterNotebooProps = {
|
|
|
3
3
|
boxPanel: BoxPanel;
|
|
4
4
|
height?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const JupyterNotebook: ({ boxPanel, height, }: IJupyterNotebooProps) => import("react
|
|
6
|
+
export declare const JupyterNotebook: ({ boxPanel, height, }: IJupyterNotebooProps) => import("react").JSX.Element;
|
|
7
7
|
export default JupyterNotebook;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const JupyterNotebookToolbar: () => import("react
|
|
1
|
+
export declare const JupyterNotebookToolbar: () => import("react").JSX.Element;
|
|
2
2
|
export default JupyterNotebookToolbar;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
|
-
* Distributed under the terms of the Modified BSD License.
|
|
5
|
-
*/
|
|
6
|
-
/*
|
|
7
|
-
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
8
|
-
* Distributed under the terms of the Modified BSD License.
|
|
9
|
-
*/
|
|
10
2
|
import { useEffect, useState } from 'react';
|
|
11
3
|
import { Box, Button, Text, Tooltip } from '@primer/react';
|
|
12
4
|
import { Dialog } from '@primer/react/experimental';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
1
2
|
import { type PrincipalType } from './PrincipalAppearance';
|
|
2
3
|
export type PrincipalAvatarKind = PrincipalType;
|
|
3
4
|
export type PrincipalAvatarProps = {
|
|
@@ -7,7 +8,14 @@ export type PrincipalAvatarProps = {
|
|
|
7
8
|
alt?: string;
|
|
8
9
|
size?: number;
|
|
9
10
|
square?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether a ring is drawn around the avatar.
|
|
13
|
+
*
|
|
14
|
+
* Off by default, and the same option `UserAvatar` carries — a public
|
|
15
|
+
* profile wants the edge, a menu entry does not.
|
|
16
|
+
*/
|
|
17
|
+
ring?: boolean;
|
|
10
18
|
className?: string;
|
|
11
19
|
};
|
|
12
|
-
export declare function PrincipalAvatar({ kind, avatarUrl, avatarIcon, alt, size, square, className, }: PrincipalAvatarProps): JSX.Element;
|
|
20
|
+
export declare function PrincipalAvatar({ kind, avatarUrl, avatarIcon, alt, size, square, ring, className, }: PrincipalAvatarProps): JSX.Element;
|
|
13
21
|
export default PrincipalAvatar;
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
|
-
* Distributed under the terms of the Modified BSD License.
|
|
5
|
-
*/
|
|
6
2
|
import { Box } from '@datalayer/primer-addons';
|
|
7
3
|
import { OrganizationIcon, PeopleIcon } from '@primer/octicons-react';
|
|
8
4
|
import { UserAvatar } from '../avatars/index.js';
|
|
9
|
-
import { getPrincipalAvatarIcon } from './PrincipalAppearance.js';
|
|
5
|
+
import { getPrincipalAvatarIcon, } from './PrincipalAppearance.js';
|
|
10
6
|
function getFallbackIconSize(size) {
|
|
11
7
|
return Math.max(12, Math.round(size * 0.62));
|
|
12
8
|
}
|
|
13
|
-
export function PrincipalAvatar({ kind, avatarUrl, avatarIcon, alt, size = 20, square = false, className, }) {
|
|
9
|
+
export function PrincipalAvatar({ kind, avatarUrl, avatarIcon, alt, size = 20, square = false, ring = false, className, }) {
|
|
14
10
|
const SelectedIcon = getPrincipalAvatarIcon(avatarIcon);
|
|
11
|
+
// Outside the edge rather than a border, so the avatar keeps the size it
|
|
12
|
+
// was asked for — see `UserAvatar`, which draws its ring the same way.
|
|
13
|
+
const ringSx = ring
|
|
14
|
+
? { boxShadow: '0 0 0 1px var(--borderColor-default, currentColor)' }
|
|
15
|
+
: undefined;
|
|
16
|
+
/*
|
|
17
|
+
* A person is drawn by `UserAvatar`, whatever they wear.
|
|
18
|
+
*
|
|
19
|
+
* It is the single source of truth for a user's avatar — a photograph, a
|
|
20
|
+
* chosen icon, or the default one — and it sets a chosen icon on the tinted
|
|
21
|
+
* disc that makes it read as an avatar rather than as a loose glyph.
|
|
22
|
+
* Answering the icon here first drew that same icon WITHOUT the disc, so a
|
|
23
|
+
* person who had chosen one was a bare drawing among circles.
|
|
24
|
+
*/
|
|
25
|
+
if (kind === 'personal') {
|
|
26
|
+
return (_jsx(UserAvatar, { avatarUrl: avatarUrl, avatarIcon: avatarIcon, size: size, square: square, iconSize: getFallbackIconSize(size), ring: ring, className: className }));
|
|
27
|
+
}
|
|
15
28
|
if (SelectedIcon) {
|
|
16
29
|
return (_jsx(Box, { className: className, sx: {
|
|
17
30
|
width: size,
|
|
@@ -21,10 +34,11 @@ export function PrincipalAvatar({ kind, avatarUrl, avatarIcon, alt, size = 20, s
|
|
|
21
34
|
justifyContent: 'center',
|
|
22
35
|
overflow: 'hidden',
|
|
23
36
|
borderRadius: square ? 2 : '50%',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
// The disc of `UserAvatar`, for the same reason: the shape is what
|
|
38
|
+
// says "avatar", and an icon drawn on nothing shows none of it.
|
|
39
|
+
bg: 'accent.subtle',
|
|
40
|
+
...ringSx,
|
|
41
|
+
}, "aria-label": alt || `${kind} avatar`, children: _jsx(SelectedIcon, { size: getFallbackIconSize(size), themed: true, colormode: true }) }));
|
|
28
42
|
}
|
|
29
43
|
const iconSize = getFallbackIconSize(size);
|
|
30
44
|
const borderRadius = square ? 2 : '50%';
|
|
@@ -39,6 +53,7 @@ export function PrincipalAvatar({ kind, avatarUrl, avatarIcon, alt, size = 20, s
|
|
|
39
53
|
borderRadius,
|
|
40
54
|
border: '1px solid',
|
|
41
55
|
borderColor: 'border.default',
|
|
56
|
+
...ringSx,
|
|
42
57
|
}, "aria-label": alt || (kind === 'team' ? 'Team' : 'Organization'), children: _jsx(Icon, { size: iconSize }) }));
|
|
43
58
|
}
|
|
44
59
|
export default PrincipalAvatar;
|
|
@@ -16,5 +16,5 @@ type PrincipalBadgeProps = {
|
|
|
16
16
|
* (user / organization / team). Falls back to the currently selected
|
|
17
17
|
* principal when no explicit `principal` prop is supplied.
|
|
18
18
|
*/
|
|
19
|
-
export declare const PrincipalBadge: ({ principal: providedPrincipal, showPrincipalLabel, showApplyingToText, showOriginLabel, principalLabel, isAdmin, sx, }?: PrincipalBadgeProps) => import("react
|
|
19
|
+
export declare const PrincipalBadge: ({ principal: providedPrincipal, showPrincipalLabel, showApplyingToText, showOriginLabel, principalLabel, isAdmin, sx, }?: PrincipalBadgeProps) => import("react").JSX.Element;
|
|
20
20
|
export default PrincipalBadge;
|
|
@@ -3,5 +3,5 @@ export type PrincipalBannerProps = {
|
|
|
3
3
|
caption?: string;
|
|
4
4
|
rightContent?: ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export declare const PrincipalBanner: ({ caption, rightContent, }: PrincipalBannerProps) => import("react
|
|
6
|
+
export declare const PrincipalBanner: ({ caption, rightContent, }: PrincipalBannerProps) => import("react").JSX.Element;
|
|
7
7
|
export default PrincipalBanner;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
1
2
|
export type PrincipalKind = 'personal' | 'team' | 'organization';
|
|
2
3
|
export type PrincipalDetailsOverlayProps = {
|
|
3
4
|
kind: PrincipalKind;
|
|
@@ -20,6 +21,20 @@ export type PrincipalDetailsOverlayProps = {
|
|
|
20
21
|
/** Team/organization visibility. */
|
|
21
22
|
isPublic?: boolean;
|
|
22
23
|
isAdmin?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Show a route some other way than through the router of this subtree.
|
|
26
|
+
*
|
|
27
|
+
* The card is also shown inside the notebook and document editors, which
|
|
28
|
+
* JupyterLab embeds under a `MemoryRouter` of their own — a router with none
|
|
29
|
+
* of the application's routes behind it, where a `navigate` reaches nobody.
|
|
30
|
+
* Those editors hand the route to the view that does have the routes; the
|
|
31
|
+
* profile then renders there, navigated to rather than loaded, and the page
|
|
32
|
+
* is never reloaded.
|
|
33
|
+
*
|
|
34
|
+
* Left out, the route is followed with `useNavigate`, which is what the web
|
|
35
|
+
* application and the Datalayer view both want.
|
|
36
|
+
*/
|
|
37
|
+
onNavigate?: (path: string) => void;
|
|
23
38
|
};
|
|
24
39
|
export declare function buildPrincipalProfilePath({ kind, uid, handle, accountHandle, isAdmin, }: {
|
|
25
40
|
kind: PrincipalKind;
|
|
@@ -28,5 +43,20 @@ export declare function buildPrincipalProfilePath({ kind, uid, handle, accountHa
|
|
|
28
43
|
accountHandle?: string;
|
|
29
44
|
isAdmin?: boolean;
|
|
30
45
|
}): string | null;
|
|
31
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The card of a principal, on its own — avatar, identity, and the buttons.
|
|
48
|
+
*
|
|
49
|
+
* The body every surface that shows a principal shares: the click overlay
|
|
50
|
+
* anchored on a name ({@link PrincipalDetailsOverlay}) and the hover card
|
|
51
|
+
* anchored on an avatar ({@link PrincipalHoverCard}) both render this, so
|
|
52
|
+
* the two never drift.
|
|
53
|
+
*/
|
|
54
|
+
export declare function PrincipalDetailsCard({ kind, uid, displayName, name, description, handle, accountHandle, firstName, lastName, email, origin, avatarUrl, avatarIcon, organizationName, memberCount, isPublic, isAdmin, onNavigate, }: PrincipalDetailsOverlayProps): JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* A principal's details, shown from a click on their name.
|
|
57
|
+
*
|
|
58
|
+
* The name is the anchor; clicking it opens the shared
|
|
59
|
+
* {@link PrincipalDetailsCard}.
|
|
60
|
+
*/
|
|
61
|
+
export declare function PrincipalDetailsOverlay(props: PrincipalDetailsOverlayProps): JSX.Element;
|
|
32
62
|
export default PrincipalDetailsOverlay;
|