@datalayer/core 0.0.1 → 0.0.3
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 +187 -7
- package/lib/App.css +47 -0
- package/lib/App.d.ts +3 -0
- package/lib/App.js +21 -5
- package/lib/__tests__/App.test.d.ts +1 -0
- package/lib/__tests__/App.test.js +17 -0
- package/lib/__tests__/hooks.test.d.ts +1 -0
- package/lib/__tests__/hooks.test.js +19 -0
- package/lib/__tests__/index.test.d.ts +1 -0
- package/lib/__tests__/index.test.js +27 -0
- package/lib/__tests__/integration.test.d.ts +1 -0
- package/lib/__tests__/integration.test.js +57 -0
- package/lib/__tests__/utils.test.d.ts +1 -0
- package/lib/__tests__/utils.test.js +59 -0
- package/lib/api/DatalayerApi.d.ts +75 -0
- package/lib/api/DatalayerApi.js +145 -0
- package/lib/api/index.d.ts +3 -0
- package/lib/api/index.js +7 -0
- package/lib/api/jupyter/exec/Python.d.ts +5 -0
- package/lib/api/jupyter/exec/Python.js +100 -0
- package/lib/api/jupyter/exec/Snippets.d.ts +145 -0
- package/lib/api/jupyter/exec/Snippets.js +120 -0
- package/lib/api/jupyter/exec/index.d.ts +2 -0
- package/lib/api/jupyter/exec/index.js +6 -0
- package/lib/api/jupyter/index.d.ts +2 -0
- package/lib/api/jupyter/index.js +6 -0
- package/lib/api/jupyter/kernelsHandler.d.ts +8 -0
- package/lib/api/jupyter/kernelsHandler.js +39 -0
- package/lib/api/runtimes/actions.d.ts +102 -0
- package/lib/api/runtimes/actions.js +264 -0
- package/lib/api/runtimes/apis.d.ts +273 -0
- package/lib/api/runtimes/apis.js +5 -0
- package/lib/api/runtimes/index.d.ts +5 -0
- package/lib/api/runtimes/index.js +9 -0
- package/lib/api/runtimes/settings.d.ts +15 -0
- package/lib/api/runtimes/settings.js +31 -0
- package/lib/api/runtimes/snapshots.d.ts +25 -0
- package/lib/api/runtimes/snapshots.js +150 -0
- package/lib/api/runtimes/utils.d.ts +7 -0
- package/lib/api/runtimes/utils.js +17 -0
- package/lib/assets/react.svg +1 -0
- package/lib/components/avatars/BoringAvatar.d.ts +19 -0
- package/lib/components/avatars/BoringAvatar.js +44 -0
- package/lib/components/avatars/BoringAvatar.stories.d.ts +27 -0
- package/lib/components/avatars/BoringAvatar.stories.js +23 -0
- package/lib/components/avatars/UserProfileAvatar.d.ts +13 -0
- package/lib/components/avatars/UserProfileAvatar.js +32 -0
- package/lib/components/avatars/index.d.ts +2 -0
- package/lib/components/avatars/index.js +6 -0
- package/lib/components/banners/NoAutomationBanner.d.ts +2 -0
- package/lib/components/banners/NoAutomationBanner.js +13 -0
- package/lib/components/banners/index.d.ts +1 -0
- package/lib/components/banners/index.js +5 -0
- package/lib/components/buttons/DownloadCSVButton.d.ts +13 -0
- package/lib/components/buttons/DownloadCSVButton.js +16 -0
- package/lib/components/buttons/DownloadJsonButton.d.ts +16 -0
- package/lib/components/buttons/DownloadJsonButton.js +18 -0
- package/lib/components/buttons/LongActionButton.d.ts +28 -0
- package/lib/components/buttons/LongActionButton.js +24 -0
- package/lib/components/buttons/UploadButton.d.ts +37 -0
- package/lib/components/buttons/UploadButton.js +43 -0
- package/lib/components/buttons/VariantType.d.ts +1 -0
- package/lib/components/buttons/VariantType.js +5 -0
- package/lib/components/buttons/index.d.ts +5 -0
- package/lib/components/buttons/index.js +9 -0
- package/lib/components/checkout/StripeCheckout.d.ts +32 -0
- package/lib/components/checkout/StripeCheckout.js +95 -0
- package/lib/components/checkout/index.d.ts +1 -0
- package/lib/components/checkout/index.js +5 -0
- package/lib/components/confetti/ConfettiSuccess.d.ts +2 -0
- package/lib/components/confetti/ConfettiSuccess.js +12 -0
- package/lib/components/confetti/index.d.ts +1 -0
- package/lib/components/confetti/index.js +5 -0
- package/lib/components/context/OrganizationSelect.d.ts +2 -0
- package/lib/components/context/OrganizationSelect.js +35 -0
- package/lib/components/context/SpaceSelect.d.ts +2 -0
- package/lib/components/context/SpaceSelect.js +43 -0
- package/lib/components/context/index.d.ts +2 -0
- package/lib/components/context/index.js +6 -0
- package/lib/components/display/AvatarSkeleton.d.ts +5 -0
- package/lib/components/display/AvatarSkeleton.js +11 -0
- package/lib/components/display/CenteredSpinner.d.ts +14 -0
- package/lib/components/display/CenteredSpinner.js +20 -0
- package/lib/components/display/CodePreview.d.ts +4 -0
- package/lib/components/display/CodePreview.js +15 -0
- package/lib/components/display/DatalayerBox.d.ts +8 -0
- package/lib/components/display/DatalayerBox.js +28 -0
- package/lib/components/display/HorizontalCenter.d.ts +9 -0
- package/lib/components/display/HorizontalCenter.js +14 -0
- package/lib/components/display/JupyterDialog.d.ts +69 -0
- package/lib/components/display/JupyterDialog.js +115 -0
- package/lib/components/display/Markdown.d.ts +23 -0
- package/lib/components/display/Markdown.js +20 -0
- package/lib/components/display/NavLink.d.ts +9 -0
- package/lib/components/display/NavLink.js +17 -0
- package/lib/components/display/NotebookSkeleton.d.ts +2 -0
- package/lib/components/display/NotebookSkeleton.js +11 -0
- package/lib/components/display/Placeholder.d.ts +2 -0
- package/lib/components/display/Placeholder.js +9 -0
- package/lib/components/display/ToTopBranded.d.ts +2 -0
- package/lib/components/display/ToTopBranded.js +11 -0
- package/lib/components/display/VisuallyHidden.d.ts +5 -0
- package/lib/components/display/VisuallyHidden.js +24 -0
- package/lib/components/display/index.d.ts +12 -0
- package/lib/components/display/index.js +16 -0
- package/lib/components/echarts/EChartsReact.d.ts +11 -0
- package/lib/components/echarts/EChartsReact.js +53 -0
- package/lib/components/echarts/index.d.ts +1 -0
- package/lib/components/echarts/index.js +5 -0
- package/lib/components/flashes/FlashClosable.d.ts +22 -0
- package/lib/components/flashes/FlashClosable.js +64 -0
- package/lib/components/flashes/FlashDisclaimer.d.ts +2 -0
- package/lib/components/flashes/FlashDisclaimer.js +18 -0
- package/lib/components/flashes/FlashGuest.d.ts +2 -0
- package/lib/components/flashes/FlashGuest.js +30 -0
- package/lib/components/flashes/FlashSurveys.d.ts +6 -0
- package/lib/components/flashes/FlashSurveys.js +36 -0
- package/lib/components/flashes/FlashUnauthorized.d.ts +2 -0
- package/lib/components/flashes/FlashUnauthorized.js +18 -0
- package/lib/components/flashes/index.d.ts +6 -0
- package/lib/components/flashes/index.js +10 -0
- package/lib/components/flashes/surveys/Survey2025_1.d.ts +3 -0
- package/lib/components/flashes/surveys/Survey2025_1.js +129 -0
- package/lib/components/flashes/surveys/SurveyProps.d.ts +6 -0
- package/lib/components/flashes/surveys/SurveyProps.js +5 -0
- package/lib/components/flashes/surveys/index.d.ts +2 -0
- package/lib/components/flashes/surveys/index.js +6 -0
- package/lib/components/iam/ExternalTokenSilentLogin.d.ts +5 -0
- package/lib/components/iam/ExternalTokenSilentLogin.js +33 -0
- package/lib/components/iam/index.d.ts +1 -0
- package/lib/components/iam/index.js +5 -0
- package/lib/components/icons/ArtifactIcon.d.ts +10 -0
- package/lib/components/icons/ArtifactIcon.js +58 -0
- package/lib/components/icons/index.d.ts +1 -0
- package/lib/components/icons/index.js +5 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +5 -0
- package/lib/components/labels/VisibilityLabel.d.ts +4 -0
- package/lib/components/labels/VisibilityLabel.js +17 -0
- package/lib/components/labels/index.d.ts +1 -0
- package/lib/components/labels/index.js +5 -0
- package/lib/components/landings/StepBlock.d.ts +11 -0
- package/lib/components/landings/StepBlock.js +12 -0
- package/lib/components/landings/index.d.ts +1 -0
- package/lib/components/landings/index.js +5 -0
- package/lib/components/navbar/NavigationVisbilityObserver.d.ts +5 -0
- package/lib/components/navbar/NavigationVisbilityObserver.js +58 -0
- package/lib/components/navbar/SubdomainNavBar.d.ts +81 -0
- package/lib/components/navbar/SubdomainNavBar.js +235 -0
- package/lib/components/navbar/SubdomainNavBar.module.css +718 -0
- package/lib/components/navbar/index.d.ts +2 -0
- package/lib/components/navbar/index.js +6 -0
- package/lib/components/nbgrader/NbGradesDetails.d.ts +5 -0
- package/lib/components/nbgrader/NbGradesDetails.js +17 -0
- package/lib/components/nbgrader/index.d.ts +1 -0
- package/lib/components/nbgrader/index.js +5 -0
- package/lib/components/notebooks/JupyterNotebook.d.ts +12 -0
- package/lib/components/notebooks/JupyterNotebook.js +36 -0
- package/lib/components/notebooks/JupyterNotebookToolbar.d.ts +2 -0
- package/lib/components/notebooks/JupyterNotebookToolbar.js +39 -0
- package/lib/components/notebooks/index.d.ts +2 -0
- package/lib/components/notebooks/index.js +6 -0
- package/lib/components/primer/Helper.d.ts +32 -0
- package/lib/components/primer/Helper.js +19 -0
- package/lib/components/primer/Portals.d.ts +9 -0
- package/lib/components/primer/Portals.js +26 -0
- package/lib/components/primer/Styles.d.ts +2 -0
- package/lib/components/primer/Styles.js +11 -0
- package/lib/components/primer/index.d.ts +2 -0
- package/lib/components/primer/index.js +6 -0
- package/lib/components/progress/ConsumptionBar.d.ts +40 -0
- package/lib/components/progress/ConsumptionBar.js +49 -0
- package/lib/components/progress/CreditsIndicator.d.ts +27 -0
- package/lib/components/progress/CreditsIndicator.js +24 -0
- package/lib/components/progress/ProgressBar.d.ts +2 -0
- package/lib/components/progress/ProgressBar.js +21 -0
- package/lib/components/progress/ProgressRing.d.ts +36 -0
- package/lib/components/progress/ProgressRing.js +31 -0
- package/lib/components/progress/Timer.d.ts +9 -0
- package/lib/components/progress/Timer.js +28 -0
- package/lib/components/progress/index.d.ts +5 -0
- package/lib/components/progress/index.js +9 -0
- package/lib/components/runtimes/RuntimeCellVariables.d.ts +39 -0
- package/lib/components/runtimes/RuntimeCellVariables.js +172 -0
- package/lib/components/runtimes/RuntimeCellVariablesDialog.d.ts +37 -0
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +101 -0
- package/lib/components/runtimes/RuntimeLauncherDialog.d.ts +53 -0
- package/lib/components/runtimes/RuntimeLauncherDialog.js +250 -0
- package/lib/components/runtimes/RuntimePickerBase.d.ts +69 -0
- package/lib/components/runtimes/RuntimePickerBase.js +109 -0
- package/lib/components/runtimes/RuntimePickerCell.d.ts +34 -0
- package/lib/components/runtimes/RuntimePickerCell.js +106 -0
- package/lib/components/runtimes/RuntimePickerNotebook.d.ts +42 -0
- package/lib/components/runtimes/RuntimePickerNotebook.js +168 -0
- package/lib/components/runtimes/RuntimeReservationControl.d.ts +47 -0
- package/lib/components/runtimes/RuntimeReservationControl.js +38 -0
- package/lib/components/runtimes/RuntimeSimplePicker.d.ts +34 -0
- package/lib/components/runtimes/RuntimeSimplePicker.js +156 -0
- package/lib/components/runtimes/RuntimeTransfer.d.ts +16 -0
- package/lib/components/runtimes/RuntimeTransfer.js +5 -0
- package/lib/components/runtimes/RuntimeUtils.d.ts +17 -0
- package/lib/components/runtimes/RuntimeUtils.js +168 -0
- package/lib/components/runtimes/RuntimeVariables.d.ts +38 -0
- package/lib/components/runtimes/RuntimeVariables.js +75 -0
- package/lib/components/runtimes/index.d.ts +11 -0
- package/lib/components/runtimes/index.js +15 -0
- package/lib/components/screenshot/ScreenCapture.d.ts +38 -0
- package/lib/components/screenshot/ScreenCapture.js +174 -0
- package/lib/components/screenshot/ScreenCaptureButton.d.ts +3 -0
- package/lib/components/screenshot/ScreenCaptureButton.js +21 -0
- package/lib/components/screenshot/index.d.ts +2 -0
- package/lib/components/screenshot/index.js +6 -0
- package/lib/components/snapshots/RuntimeSnapshotMenu.d.ts +36 -0
- package/lib/components/snapshots/RuntimeSnapshotMenu.js +164 -0
- package/lib/components/snapshots/index.d.ts +1 -0
- package/lib/components/snapshots/index.js +5 -0
- package/lib/components/snippets/SnippetDialog.d.ts +42 -0
- package/lib/components/snippets/SnippetDialog.js +42 -0
- package/lib/components/snippets/index.d.ts +1 -0
- package/lib/components/snippets/index.js +5 -0
- package/lib/components/storage/ContentsBrowser.d.ts +32 -0
- package/lib/components/storage/ContentsBrowser.js +255 -0
- package/lib/components/storage/ContentsItems.d.ts +58 -0
- package/lib/components/storage/ContentsItems.js +78 -0
- package/lib/components/storage/index.d.ts +2 -0
- package/lib/components/storage/index.js +6 -0
- package/lib/components/students/StudentItemStatus.d.ts +7 -0
- package/lib/components/students/StudentItemStatus.js +47 -0
- package/lib/components/students/index.d.ts +1 -0
- package/lib/components/students/index.js +5 -0
- package/lib/components/subnav/SubNav.d.ts +84 -0
- package/lib/components/subnav/SubNav.js +265 -0
- package/lib/components/subnav/SubNav.module.css +683 -0
- package/lib/components/subnav/index.d.ts +1 -0
- package/lib/components/subnav/index.js +5 -0
- package/lib/components/tables/DataTable.d.ts +5 -0
- package/lib/components/tables/DataTable.js +19 -0
- package/lib/components/tables/index.d.ts +1 -0
- package/lib/components/tables/index.js +5 -0
- package/lib/components/text-reveal/TextRevealAnimation.d.ts +6 -0
- package/lib/components/text-reveal/TextRevealAnimation.js +49 -0
- package/lib/components/text-reveal/TextRevealAnimation.module.css +43 -0
- package/lib/components/text-reveal/index.d.ts +1 -0
- package/lib/components/text-reveal/index.js +5 -0
- package/lib/components/text-reveal/useTextRevealAnimationLines.d.ts +4 -0
- package/lib/components/text-reveal/useTextRevealAnimationLines.js +47 -0
- package/lib/components/tokens/SpaceVariantToken.d.ts +5 -0
- package/lib/components/tokens/SpaceVariantToken.js +20 -0
- package/lib/components/tokens/index.d.ts +1 -0
- package/lib/components/tokens/index.js +5 -0
- package/lib/components/toolbars/AssignmentEditorToolbar.d.ts +4 -0
- package/lib/components/toolbars/AssignmentEditorToolbar.js +18 -0
- package/lib/components/toolbars/DocumentEditorToolbar.d.ts +2 -0
- package/lib/components/toolbars/DocumentEditorToolbar.js +12 -0
- package/lib/components/toolbars/NotebookEditorToolbar.d.ts +29 -0
- package/lib/components/toolbars/NotebookEditorToolbar.js +30 -0
- package/lib/components/toolbars/index.d.ts +3 -0
- package/lib/components/toolbars/index.js +7 -0
- package/lib/components/users/PeerIndicator.d.ts +18 -0
- package/lib/components/users/PeerIndicator.js +100 -0
- package/lib/components/users/index.d.ts +1 -0
- package/lib/components/users/index.js +5 -0
- package/lib/config/Configuration.d.ts +111 -0
- package/lib/config/Configuration.js +25 -0
- package/lib/config/index.d.ts +2 -0
- package/lib/config/index.js +6 -0
- package/lib/config/integrations/Loom.d.ts +1 -0
- package/lib/config/integrations/Loom.js +16 -0
- package/lib/config/integrations/index.d.ts +1 -0
- package/lib/config/integrations/index.js +5 -0
- package/lib/examples/CellExample.d.ts +6 -0
- package/lib/examples/CellExample.js +24 -0
- package/lib/examples/NotebookExample.d.ts +8 -0
- package/lib/examples/NotebookExample.js +22 -0
- package/lib/examples/NotebookExample1.ipynb.json +136 -0
- package/lib/hooks/assets/OutputshotPlaceholders.d.ts +19 -0
- package/lib/hooks/assets/OutputshotPlaceholders.js +23 -0
- package/lib/hooks/assets/index.d.ts +1 -0
- package/lib/hooks/assets/index.js +5 -0
- package/lib/hooks/index.d.ts +28 -0
- package/lib/hooks/index.js +33 -0
- package/lib/hooks/layouts/LayoutBackdrop.d.ts +2 -0
- package/lib/hooks/layouts/LayoutBackdrop.js +30 -0
- package/lib/hooks/layouts/LayoutScreenshot.css +58 -0
- package/lib/hooks/layouts/LayoutScreenshot.d.ts +3 -0
- package/lib/hooks/layouts/LayoutScreenshot.js +44 -0
- package/lib/hooks/layouts/index.d.ts +2 -0
- package/lib/hooks/layouts/index.js +6 -0
- package/lib/hooks/useAIAgents.d.ts +13 -0
- package/lib/hooks/useAIAgents.js +72 -0
- package/lib/hooks/useAuthorization.d.ts +19 -0
- package/lib/hooks/useAuthorization.js +124 -0
- package/lib/hooks/useBackdrop.d.ts +28 -0
- package/lib/hooks/useBackdrop.js +100 -0
- package/lib/hooks/useBackdropJupyterLab.d.ts +15 -0
- package/lib/hooks/useBackdropJupyterLab.js +51 -0
- package/lib/hooks/useCache.d.ts +306 -0
- package/lib/hooks/useCache.js +3098 -0
- package/lib/hooks/useCellOutputshot.d.ts +4 -0
- package/lib/hooks/useCellOutputshot.js +28 -0
- package/lib/hooks/useContainsFocus.d.ts +9 -0
- package/lib/hooks/useContainsFocus.js +43 -0
- package/lib/hooks/useDatalayer.d.ts +21 -0
- package/lib/hooks/useDatalayer.js +81 -0
- package/lib/hooks/useError.d.ts +9 -0
- package/lib/hooks/useError.js +26 -0
- package/lib/hooks/useExternalScript.d.ts +2 -0
- package/lib/hooks/useExternalScript.js +17 -0
- package/lib/hooks/useFocusTrap.d.ts +30 -0
- package/lib/hooks/useFocusTrap.js +48 -0
- package/lib/hooks/useIAM.d.ts +14 -0
- package/lib/hooks/useIAM.js +93 -0
- package/lib/hooks/useId.d.ts +19 -0
- package/lib/hooks/useId.js +100 -0
- package/lib/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/lib/hooks/useIsomorphicLayoutEffect.js +11 -0
- package/lib/hooks/useJupyterLabTheme.d.ts +6 -0
- package/lib/hooks/useJupyterLabTheme.js +24 -0
- package/lib/hooks/useKeyboardEscape.d.ts +1 -0
- package/lib/hooks/useKeyboardEscape.js +18 -0
- package/lib/hooks/useLocationHandles.d.ts +10 -0
- package/lib/hooks/useLocationHandles.js +22 -0
- package/lib/hooks/useNavigate.d.ts +2 -0
- package/lib/hooks/useNavigate.js +24 -0
- package/lib/hooks/useNotebookAIAgent.d.ts +8 -0
- package/lib/hooks/useNotebookAIAgent.js +54 -0
- package/lib/hooks/useOnClickOutside.d.ts +1 -0
- package/lib/hooks/useOnClickOutside.js +29 -0
- package/lib/hooks/useRef.d.ts +10 -0
- package/lib/hooks/useRef.js +17 -0
- package/lib/hooks/useRuntimes.d.ts +5 -0
- package/lib/hooks/useRuntimes.js +34 -0
- package/lib/hooks/useScreenshot.d.ts +21 -0
- package/lib/hooks/useScreenshot.js +60 -0
- package/lib/hooks/useToast.d.ts +42 -0
- package/lib/hooks/useToast.js +141 -0
- package/lib/hooks/useUpload.d.ts +7 -0
- package/lib/hooks/useUpload.js +46 -0
- package/lib/hooks/useUser.d.ts +3 -0
- package/lib/hooks/useUser.js +22 -0
- package/lib/hooks/useVisibilityObserver.d.ts +5 -0
- package/lib/hooks/useVisibilityObserver.js +42 -0
- package/lib/hooks/useWindowSize.d.ts +21 -0
- package/lib/hooks/useWindowSize.js +74 -0
- package/lib/i18n/Labels.d.ts +1 -0
- package/lib/i18n/Labels.js +5 -0
- package/lib/i18n/index.d.ts +1 -0
- package/lib/i18n/index.js +5 -0
- package/lib/index.css +73 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +6 -0
- package/lib/main.d.ts +1 -0
- package/lib/main.js +5 -2
- package/lib/mocks/components/FlashMock.d.ts +2 -0
- package/lib/mocks/components/FlashMock.js +13 -0
- package/lib/mocks/components/index.d.ts +1 -0
- package/lib/mocks/components/index.js +5 -0
- package/lib/mocks/hooks/index.d.ts +1 -0
- package/lib/mocks/hooks/index.js +5 -0
- package/lib/mocks/hooks/rests/index.d.ts +1 -0
- package/lib/mocks/hooks/rests/index.js +5 -0
- package/lib/mocks/hooks/rests/rests.d.ts +22 -0
- package/lib/mocks/hooks/rests/rests.js +32 -0
- package/lib/mocks/hooks/useDatalayerMock.d.ts +6 -0
- package/lib/mocks/hooks/useDatalayerMock.js +78 -0
- package/lib/mocks/index.d.ts +4 -0
- package/lib/mocks/index.js +9 -0
- package/lib/mocks/jupyter/index.d.ts +1 -0
- package/lib/mocks/jupyter/index.js +5 -0
- package/lib/mocks/models/CodeBlockMock.d.ts +1 -0
- package/lib/mocks/models/CodeBlockMock.js +5 -0
- package/lib/mocks/models/CodelineMock.d.ts +1 -0
- package/lib/mocks/models/CodelineMock.js +5 -0
- package/lib/mocks/models/CourseMock.d.ts +6 -0
- package/lib/mocks/models/CourseMock.js +29 -0
- package/lib/mocks/models/InviteMock.d.ts +6 -0
- package/lib/mocks/models/InviteMock.js +22 -0
- package/lib/mocks/models/JupyterLabUserMock.d.ts +2 -0
- package/lib/mocks/models/JupyterLabUserMock.js +17 -0
- package/lib/mocks/models/OrganisationMock.d.ts +5 -0
- package/lib/mocks/models/OrganisationMock.js +24 -0
- package/lib/mocks/models/SchoolMock.d.ts +6 -0
- package/lib/mocks/models/SchoolMock.js +25 -0
- package/lib/mocks/models/SpaceMock.d.ts +6 -0
- package/lib/mocks/models/SpaceMock.js +25 -0
- package/lib/mocks/models/TeamMock.d.ts +5 -0
- package/lib/mocks/models/TeamMock.js +26 -0
- package/lib/mocks/models/UserMock.d.ts +2 -0
- package/lib/mocks/models/UserMock.js +29 -0
- package/lib/mocks/models/index.d.ts +9 -0
- package/lib/mocks/models/index.js +13 -0
- package/lib/mocks/views/ActionMenuMock.d.ts +5 -0
- package/lib/mocks/views/ActionMenuMock.js +12 -0
- package/lib/mocks/views/ChartMock.d.ts +5 -0
- package/lib/mocks/views/ChartMock.js +15 -0
- package/lib/mocks/views/ChartMockOptions.d.ts +92 -0
- package/lib/mocks/views/ChartMockOptions.js +102 -0
- package/lib/mocks/views/DashboardMock.d.ts +2 -0
- package/lib/mocks/views/DashboardMock.js +118 -0
- package/lib/mocks/views/FormMock.d.ts +5 -0
- package/lib/mocks/views/FormMock.js +28 -0
- package/lib/mocks/views/TableMock.d.ts +5 -0
- package/lib/mocks/views/TableMock.js +155 -0
- package/lib/mocks/views/WipMock.d.ts +5 -0
- package/lib/mocks/views/WipMock.js +12 -0
- package/lib/mocks/views/index.d.ts +7 -0
- package/lib/mocks/views/index.js +11 -0
- package/lib/models/AIAgent.d.ts +17 -0
- package/lib/models/AIAgent.js +5 -0
- package/lib/models/Account.d.ts +4 -0
- package/lib/models/Account.js +5 -0
- package/lib/models/Assignment.d.ts +7 -0
- package/lib/models/Assignment.js +5 -0
- package/lib/models/Base.d.ts +16 -0
- package/lib/models/Base.js +5 -0
- package/lib/models/Cell.d.ts +8 -0
- package/lib/models/Cell.js +5 -0
- package/lib/models/CodeBlock.d.ts +10 -0
- package/lib/models/CodeBlock.js +5 -0
- package/lib/models/CodefeedBlocks.d.ts +7 -0
- package/lib/models/CodefeedBlocks.js +5 -0
- package/lib/models/Contact.d.ts +73 -0
- package/lib/models/Contact.js +90 -0
- package/lib/models/ContactEvent.d.ts +10 -0
- package/lib/models/ContactEvent.js +14 -0
- package/lib/models/ContactIAMProvider.d.ts +12 -0
- package/lib/models/ContactIAMProvider.js +20 -0
- package/lib/models/ContactTags.d.ts +23 -0
- package/lib/models/ContactTags.js +73 -0
- package/lib/models/Content.d.ts +5 -0
- package/lib/models/Content.js +5 -0
- package/lib/models/Course.d.ts +17 -0
- package/lib/models/Course.js +5 -0
- package/lib/models/Credits.d.ts +76 -0
- package/lib/models/Credits.js +11 -0
- package/lib/models/Dataset.d.ts +16 -0
- package/lib/models/Dataset.js +5 -0
- package/lib/models/Datasource.d.ts +11 -0
- package/lib/models/Datasource.js +14 -0
- package/lib/models/Dean.d.ts +3 -0
- package/lib/models/Dean.js +5 -0
- package/lib/models/Document.d.ts +8 -0
- package/lib/models/Document.js +5 -0
- package/lib/models/Environment.d.ts +82 -0
- package/lib/models/Environment.js +5 -0
- package/lib/models/Errors.d.ts +6 -0
- package/lib/models/Errors.js +13 -0
- package/lib/models/Exercise.d.ts +16 -0
- package/lib/models/Exercise.js +5 -0
- package/lib/models/GrowthKPI.d.ts +5 -0
- package/lib/models/GrowthKPI.js +9 -0
- package/lib/models/IAMProviderLinked.d.ts +9 -0
- package/lib/models/IAMProviderLinked.js +13 -0
- package/lib/models/IAMProviderPost.d.ts +8 -0
- package/lib/models/IAMProviderPost.js +22 -0
- package/lib/models/IAMProviderUsers.d.ts +49 -0
- package/lib/models/IAMProviderUsers.js +29 -0
- package/lib/models/IAMProvidersSpecs.d.ts +22 -0
- package/lib/models/IAMProvidersSpecs.js +72 -0
- package/lib/models/IAMToken.d.ts +11 -0
- package/lib/models/IAMToken.js +14 -0
- package/lib/models/Inbound.d.ts +25 -0
- package/lib/models/Inbound.js +29 -0
- package/lib/models/Instructor.d.ts +3 -0
- package/lib/models/Instructor.js +5 -0
- package/lib/models/Invite.d.ts +14 -0
- package/lib/models/Invite.js +24 -0
- package/lib/models/Item.d.ts +20 -0
- package/lib/models/Item.js +5 -0
- package/lib/models/ItemType.d.ts +2 -0
- package/lib/models/ItemType.js +5 -0
- package/lib/models/LandingRoles.d.ts +3 -0
- package/lib/models/LandingRoles.js +27 -0
- package/lib/models/Lesson.d.ts +5 -0
- package/lib/models/Lesson.js +5 -0
- package/lib/models/Library.d.ts +10 -0
- package/lib/models/Library.js +5 -0
- package/lib/models/Member.d.ts +3 -0
- package/lib/models/Member.js +5 -0
- package/lib/models/Notebook.d.ts +11 -0
- package/lib/models/Notebook.js +5 -0
- package/lib/models/Organization.d.ts +27 -0
- package/lib/models/Organization.js +36 -0
- package/lib/models/OrganizationMember.d.ts +6 -0
- package/lib/models/OrganizationMember.js +5 -0
- package/lib/models/Outbound.d.ts +41 -0
- package/lib/models/Outbound.js +45 -0
- package/lib/models/Page.d.ts +36 -0
- package/lib/models/Page.js +23 -0
- package/lib/models/PageTag.d.ts +19 -0
- package/lib/models/PageTag.js +26 -0
- package/lib/models/Profile.d.ts +1 -0
- package/lib/models/Profile.js +5 -0
- package/lib/models/Role.d.ts +9 -0
- package/lib/models/Role.js +5 -0
- package/lib/models/RolesOrganization.d.ts +9 -0
- package/lib/models/RolesOrganization.js +58 -0
- package/lib/models/RolesPlatform.d.ts +16 -0
- package/lib/models/RolesPlatform.js +142 -0
- package/lib/models/RolesTeam.d.ts +7 -0
- package/lib/models/RolesTeam.js +34 -0
- package/lib/models/Runtime.d.ts +123 -0
- package/lib/models/Runtime.js +18 -0
- package/lib/models/RuntimeSnapshot.d.ts +92 -0
- package/lib/models/RuntimeSnapshot.js +13 -0
- package/lib/models/School.d.ts +11 -0
- package/lib/models/School.js +5 -0
- package/lib/models/Secret.d.ts +10 -0
- package/lib/models/Secret.js +13 -0
- package/lib/models/Space.d.ts +34 -0
- package/lib/models/Space.js +39 -0
- package/lib/models/SpaceItem.d.ts +10 -0
- package/lib/models/SpaceItem.js +5 -0
- package/lib/models/SpaceMember.d.ts +6 -0
- package/lib/models/SpaceMember.js +5 -0
- package/lib/models/Student.d.ts +6 -0
- package/lib/models/Student.js +5 -0
- package/lib/models/StudentItem.d.ts +21 -0
- package/lib/models/StudentItem.js +5 -0
- package/lib/models/Survey.d.ts +20 -0
- package/lib/models/Survey.js +14 -0
- package/lib/models/Team.d.ts +22 -0
- package/lib/models/Team.js +32 -0
- package/lib/models/TeamMember.d.ts +6 -0
- package/lib/models/TeamMember.js +5 -0
- package/lib/models/URN.d.ts +63 -0
- package/lib/models/URN.js +40 -0
- package/lib/models/Usage.d.ts +46 -0
- package/lib/models/Usage.js +21 -0
- package/lib/models/User.d.ts +71 -0
- package/lib/models/User.js +98 -0
- package/lib/models/UserEvent.d.ts +10 -0
- package/lib/models/UserEvent.js +14 -0
- package/lib/models/UserOnboarding.d.ts +14 -0
- package/lib/models/UserOnboarding.js +19 -0
- package/lib/models/UserSettings.d.ts +16 -0
- package/lib/models/UserSettings.js +27 -0
- package/lib/models/WaitingListFormData.d.ts +6 -0
- package/lib/models/WaitingListFormData.js +5 -0
- package/lib/models/index.d.ts +65 -0
- package/lib/models/index.js +69 -0
- package/lib/routes/Routes.d.ts +3 -0
- package/lib/routes/Routes.js +7 -0
- package/lib/routes/index.d.ts +1 -0
- package/lib/routes/index.js +5 -0
- package/lib/state/State.d.ts +33 -0
- package/lib/state/State.js +44 -0
- package/lib/state/index.d.ts +3 -0
- package/lib/state/index.js +7 -0
- package/lib/state/storage/IAMStorage.d.ts +33 -0
- package/lib/state/storage/IAMStorage.js +76 -0
- package/lib/state/storage/index.d.ts +1 -0
- package/lib/state/storage/index.js +5 -0
- package/lib/state/substates/AIAgentState.d.ts +11 -0
- package/lib/state/substates/AIAgentState.js +40 -0
- package/lib/state/substates/CellState.d.ts +12 -0
- package/lib/state/substates/CellState.js +21 -0
- package/lib/state/substates/CoreState.d.ts +25 -0
- package/lib/state/substates/CoreState.js +88 -0
- package/lib/state/substates/DatasourceState.d.ts +11 -0
- package/lib/state/substates/DatasourceState.js +16 -0
- package/lib/state/substates/DocumentState.d.ts +10 -0
- package/lib/state/substates/DocumentState.js +14 -0
- package/lib/state/substates/GradeState.d.ts +10 -0
- package/lib/state/substates/GradeState.js +14 -0
- package/lib/state/substates/IAMState.d.ts +75 -0
- package/lib/state/substates/IAMState.js +291 -0
- package/lib/state/substates/JupyterLabState.d.ts +16 -0
- package/lib/state/substates/JupyterLabState.js +17 -0
- package/lib/state/substates/LayoutState.d.ts +62 -0
- package/lib/state/substates/LayoutState.js +74 -0
- package/lib/state/substates/NbformatState.d.ts +13 -0
- package/lib/state/substates/NbformatState.js +16 -0
- package/lib/state/substates/OrganizationState.d.ts +11 -0
- package/lib/state/substates/OrganizationState.js +16 -0
- package/lib/state/substates/RuntimesState.d.ts +88 -0
- package/lib/state/substates/RuntimesState.js +178 -0
- package/lib/state/substates/SpaceState.d.ts +11 -0
- package/lib/state/substates/SpaceState.js +16 -0
- package/lib/state/substates/SurveysState.d.ts +14 -0
- package/lib/state/substates/SurveysState.js +98 -0
- package/lib/state/substates/TeamState.d.ts +11 -0
- package/lib/state/substates/TeamState.js +17 -0
- package/lib/state/substates/index.d.ts +15 -0
- package/lib/state/substates/index.js +19 -0
- package/lib/stories/assets/accessibility.png +0 -0
- package/lib/stories/assets/accessibility.svg +1 -0
- package/lib/stories/assets/addon-library.png +0 -0
- package/lib/stories/assets/assets.png +0 -0
- package/lib/stories/assets/context.png +0 -0
- package/lib/stories/assets/discord.svg +1 -0
- package/lib/stories/assets/docs.png +0 -0
- package/lib/stories/assets/figma-plugin.png +0 -0
- package/lib/stories/assets/github.svg +1 -0
- package/lib/stories/assets/share.png +0 -0
- package/lib/stories/assets/styling.png +0 -0
- package/lib/stories/assets/testing.png +0 -0
- package/lib/stories/assets/theming.png +0 -0
- package/lib/stories/assets/tutorials.svg +1 -0
- package/lib/stories/assets/youtube.svg +1 -0
- package/lib/stories/button.css +35 -0
- package/lib/stories/header.css +37 -0
- package/lib/stories/page.css +73 -0
- package/lib/test-setup.d.ts +1 -0
- package/lib/test-setup.js +57 -0
- package/lib/theme/DatalayerTheme.d.ts +37 -0
- package/lib/theme/DatalayerTheme.js +62 -0
- package/lib/theme/DatalayerThemeProvider.d.ts +17 -0
- package/lib/theme/DatalayerThemeProvider.js +69 -0
- package/lib/theme/Palette.d.ts +5 -0
- package/lib/theme/Palette.js +22 -0
- package/lib/theme/index.d.ts +3 -0
- package/lib/theme/index.js +7 -0
- package/lib/utils/Array.d.ts +2 -0
- package/lib/utils/Array.js +16 -0
- package/lib/utils/Avatar.d.ts +9 -0
- package/lib/utils/Avatar.js +34 -0
- package/lib/utils/Browser.d.ts +3 -0
- package/lib/utils/Browser.js +63 -0
- package/lib/utils/Cells.d.ts +2 -0
- package/lib/utils/Cells.js +28 -0
- package/lib/utils/Cookie.d.ts +12 -0
- package/lib/utils/Cookie.js +48 -0
- package/lib/utils/Date.d.ts +2 -0
- package/lib/utils/Date.js +60 -0
- package/lib/utils/Download.d.ts +3 -0
- package/lib/utils/Download.js +48 -0
- package/lib/utils/DownloadFile.d.ts +10 -0
- package/lib/utils/DownloadFile.js +36 -0
- package/lib/utils/Env.d.ts +1 -0
- package/lib/utils/Env.js +7 -0
- package/lib/utils/File.d.ts +7 -0
- package/lib/utils/File.js +16 -0
- package/lib/utils/Format.d.ts +17 -0
- package/lib/utils/Format.js +54 -0
- package/lib/utils/Ids.d.ts +2 -0
- package/lib/utils/Ids.js +12 -0
- package/lib/utils/Jupyter.d.ts +1 -0
- package/lib/utils/Jupyter.js +12 -0
- package/lib/utils/Lazy.d.ts +8 -0
- package/lib/utils/Lazy.js +23 -0
- package/lib/utils/Msc.d.ts +16 -0
- package/lib/utils/Msc.js +28 -0
- package/lib/utils/Name.d.ts +7 -0
- package/lib/utils/Name.js +34 -0
- package/lib/utils/Notebook.d.ts +19 -0
- package/lib/utils/Notebook.js +37 -0
- package/lib/utils/Number.d.ts +1 -0
- package/lib/utils/Number.js +21 -0
- package/lib/utils/Plots.d.ts +16 -0
- package/lib/utils/Plots.js +56 -0
- package/lib/utils/Random.d.ts +1 -0
- package/lib/utils/Random.js +7 -0
- package/lib/utils/Screenshot.d.ts +1 -0
- package/lib/utils/Screenshot.js +27 -0
- package/lib/utils/Scroll.d.ts +2 -0
- package/lib/utils/Scroll.js +32 -0
- package/lib/utils/Sleep.d.ts +2 -0
- package/lib/utils/Sleep.js +8 -0
- package/lib/utils/Snapshot.d.ts +7 -0
- package/lib/utils/Snapshot.js +21 -0
- package/lib/utils/String.d.ts +1 -0
- package/lib/utils/String.js +13 -0
- package/lib/utils/Uri.d.ts +2 -0
- package/lib/utils/Uri.js +26 -0
- package/lib/utils/Validator.d.ts +12 -0
- package/lib/utils/Validator.js +44 -0
- package/lib/utils/WithSuspense.d.ts +2 -0
- package/lib/utils/WithSuspense.js +21 -0
- package/lib/utils/index.d.ts +26 -0
- package/lib/utils/index.js +31 -0
- package/package.json +86 -17
- package/style/animation/Animation.module.css +174 -0
- package/style/base.css +62 -3
- package/style/index.css +2 -3
- package/style/index.js +0 -7
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../primer';
|
|
3
|
+
export type TextRevealAnimationProps = BaseProps<HTMLSpanElement> & Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> & {
|
|
4
|
+
children: React.ReactChild;
|
|
5
|
+
};
|
|
6
|
+
export declare function TextRevealAnimation({ children, ...rest }: TextRevealAnimationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, 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 React, { useEffect } from 'react';
|
|
7
|
+
import clsx from 'clsx';
|
|
8
|
+
import { useTextRevealAnimationLines } from './useTextRevealAnimationLines';
|
|
9
|
+
import styles from './TextRevealAnimation.module.css';
|
|
10
|
+
export function TextRevealAnimation({ children, ...rest }) {
|
|
11
|
+
const [animationStarted, setAnimationStarted] = React.useState(false);
|
|
12
|
+
const [hasAnimationCompleted, setHasAnimationCompleted] = React.useState(false);
|
|
13
|
+
const { ref, lines } = useTextRevealAnimationLines(children.toString() || '');
|
|
14
|
+
const onLineAnimationEnd = (i) => {
|
|
15
|
+
if (lines && i === lines.length - 1) {
|
|
16
|
+
setHasAnimationCompleted(true);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const el = ref.current;
|
|
21
|
+
const observer = new IntersectionObserver(entries => {
|
|
22
|
+
for (const entry of entries) {
|
|
23
|
+
if (entry.isIntersecting) {
|
|
24
|
+
setAnimationStarted(true);
|
|
25
|
+
if (el) {
|
|
26
|
+
observer.unobserve(el);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
threshold: 1,
|
|
32
|
+
rootMargin: '0px 0px -10% 0px',
|
|
33
|
+
});
|
|
34
|
+
if (el) {
|
|
35
|
+
observer.observe(el);
|
|
36
|
+
}
|
|
37
|
+
return () => {
|
|
38
|
+
if (el) {
|
|
39
|
+
observer.unobserve(el);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}, [ref]);
|
|
43
|
+
if (typeof children !== 'string' && (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test')) {
|
|
44
|
+
console.warn('Children passed to TextRevealAnimation must be a string');
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return (_jsx("span", { ref: ref, ...rest, children: lines?.map((line, i) => (_jsxs(React.Fragment, { children: [_jsx("span", { className: clsx(styles.TextRevealAnimation, animationStarted && styles['TextRevealAnimation--visible'], animationStarted &&
|
|
48
|
+
(hasAnimationCompleted ? styles['TextRevealAnimation'] : styles['TextRevealAnimation--animated'])), style: { '--animation-delay': `${220 + i * 200}ms` }, onAnimationEnd: () => onLineAnimationEnd(i), children: line }), ' '] }, line))) }));
|
|
49
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@keyframes wipe {
|
|
7
|
+
from {
|
|
8
|
+
transform: scaleX(1);
|
|
9
|
+
}
|
|
10
|
+
to {
|
|
11
|
+
transform: scaleX(0);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.TextRevealAnimation {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
transition: opacity var(--brand-animation-duration-default) var(--brand-animation-easing-default);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.TextRevealAnimation--visible {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.TextRevealAnimation,
|
|
25
|
+
.TextRevealAnimation--animated {
|
|
26
|
+
width: 100%;
|
|
27
|
+
min-height: 1lh;
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.TextRevealAnimation--animated::after {
|
|
32
|
+
content: '';
|
|
33
|
+
display: inline;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
background-color: var(--brand-color-accent-primary);
|
|
40
|
+
transform-origin: right;
|
|
41
|
+
animation: wipe var(--brand-animation-duration-extended) forwards var(--brand-animation-easing-default);
|
|
42
|
+
animation-delay: var(--animation-delay);
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextRevealAnimation';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { useRef, useEffect, useState } from 'react';
|
|
6
|
+
export const useTextRevealAnimationLines = (text) => {
|
|
7
|
+
const ref = useRef(null);
|
|
8
|
+
const [lines, setLines] = useState();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!ref.current || !text)
|
|
11
|
+
return;
|
|
12
|
+
const wrapLines = () => {
|
|
13
|
+
const element = ref.current;
|
|
14
|
+
if (!element || !text)
|
|
15
|
+
return;
|
|
16
|
+
const originalColor = window.getComputedStyle(element).color;
|
|
17
|
+
element.style.color = 'transparent';
|
|
18
|
+
element.textContent = '';
|
|
19
|
+
const words = text.split(' ');
|
|
20
|
+
const lineBreakPositions = [];
|
|
21
|
+
let prevHeight = 0;
|
|
22
|
+
const linesArr = [];
|
|
23
|
+
for (const word of words) {
|
|
24
|
+
element.textContent += `${word} `;
|
|
25
|
+
const height = element.offsetHeight;
|
|
26
|
+
if (linesArr.length === 0) {
|
|
27
|
+
prevHeight = height;
|
|
28
|
+
linesArr.push([word]);
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (height > prevHeight) {
|
|
32
|
+
lineBreakPositions.push(linesArr.length);
|
|
33
|
+
linesArr.push([word]);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
linesArr.at(-1)?.push(word);
|
|
37
|
+
}
|
|
38
|
+
prevHeight = height;
|
|
39
|
+
}
|
|
40
|
+
element.style.color = originalColor;
|
|
41
|
+
element.textContent = '';
|
|
42
|
+
setLines(linesArr.map(line => line.join(' ')));
|
|
43
|
+
};
|
|
44
|
+
wrapLines();
|
|
45
|
+
}, [text]);
|
|
46
|
+
return { ref, lines };
|
|
47
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, 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
|
+
import { Token } from "@primer/react";
|
|
7
|
+
import { ProjectIcon } from "@primer/octicons-react";
|
|
8
|
+
import { StudentIcon } from "@datalayer/icons-react";
|
|
9
|
+
export const SpaceVariantToken = (props) => {
|
|
10
|
+
const { variant } = props;
|
|
11
|
+
switch (variant) {
|
|
12
|
+
case ("default"):
|
|
13
|
+
return _jsx(Token, { text: "default", leadingVisual: ProjectIcon });
|
|
14
|
+
case ("course"):
|
|
15
|
+
return _jsx(Token, { text: "course", leadingVisual: StudentIcon });
|
|
16
|
+
default:
|
|
17
|
+
return _jsx(_Fragment, {});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export default SpaceVariantToken;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SpaceVariantToken';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, 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 { Button, Box } from '@primer/react';
|
|
7
|
+
import { RepoPushIcon, PlayIcon, StopIcon } from '@primer/octicons-react';
|
|
8
|
+
import { notebookStore } from '@datalayer/jupyter-react';
|
|
9
|
+
import { useGradeStore } from '../../state';
|
|
10
|
+
export const AssignmentEditorToolbar = (props) => {
|
|
11
|
+
const { notebookId } = props;
|
|
12
|
+
const { grade } = useGradeStore();
|
|
13
|
+
const notebook = notebookStore.getState().selectNotebook(notebookId);
|
|
14
|
+
return (_jsxs(Box, { display: "flex", children: [_jsx(Box, { children: _jsx(Button, { variant: "invisible", size: "small", leadingVisual: RepoPushIcon, onClick: () => grade(new Date()), children: "Grade" }) }), notebook?.kernelStatus !== 'busy' &&
|
|
15
|
+
_jsx(Box, { children: _jsx(Button, { variant: "invisible", size: "small", leadingVisual: PlayIcon, onClick: e => notebookStore.getState().runAll(notebookId), children: "Run all" }) }), notebook?.kernelStatus === 'busy' &&
|
|
16
|
+
_jsx(Box, { children: _jsx(Button, { variant: "danger", size: "small", leadingVisual: StopIcon, onClick: e => notebookStore.getState().interrupt(notebookId), children: "Interrupt" }) })] }));
|
|
17
|
+
};
|
|
18
|
+
export default AssignmentEditorToolbar;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
import { Button, Box } from '@primer/react';
|
|
7
|
+
import { RepoPushIcon } from '@primer/octicons-react';
|
|
8
|
+
import { documentStore } from '../../state';
|
|
9
|
+
export const DocumentEditorToolbar = () => {
|
|
10
|
+
return (_jsx(Box, { display: "flex", children: _jsx(Box, { children: _jsx(Button, { variant: "invisible", size: "small", leadingVisual: RepoPushIcon, onClick: () => documentStore.getState().save(new Date()), children: "Save" }) }) }));
|
|
11
|
+
};
|
|
12
|
+
export default DocumentEditorToolbar;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Session } from '@jupyterlab/services';
|
|
2
|
+
import { CommandRegistry } from '@lumino/commands';
|
|
3
|
+
import type { IRuntimeDesc } from '../../models';
|
|
4
|
+
/**
|
|
5
|
+
* NotebookEditorToolbar component properties
|
|
6
|
+
*/
|
|
7
|
+
export type INotebookEditorToolbar = {
|
|
8
|
+
/**
|
|
9
|
+
* Jupyter commands registry
|
|
10
|
+
*/
|
|
11
|
+
commandRegistry?: CommandRegistry;
|
|
12
|
+
/**
|
|
13
|
+
* Kernel description
|
|
14
|
+
*/
|
|
15
|
+
runtimeDesc?: IRuntimeDesc;
|
|
16
|
+
/**
|
|
17
|
+
* Callback to save the notebook model
|
|
18
|
+
*/
|
|
19
|
+
save: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Session connection
|
|
22
|
+
*/
|
|
23
|
+
sessionConnection?: Session.ISessionConnection;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Notebook editor toolbar
|
|
27
|
+
*/
|
|
28
|
+
export declare function NotebookEditorToolbar(props: INotebookEditorToolbar): JSX.Element;
|
|
29
|
+
export default NotebookEditorToolbar;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { NotebookCommandIds } from '@datalayer/jupyter-react';
|
|
7
|
+
import { Button } from '@primer/react';
|
|
8
|
+
import { PlayIcon, StopIcon } from '@primer/octicons-react';
|
|
9
|
+
import { useEffect, useState } from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Notebook editor toolbar
|
|
12
|
+
*/
|
|
13
|
+
export function NotebookEditorToolbar(props) {
|
|
14
|
+
const { commandRegistry, runtimeDesc, sessionConnection } = props;
|
|
15
|
+
const [kernelStatus, setKernelStatus] = useState();
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const onStatusChanged = () => {
|
|
18
|
+
setKernelStatus(sessionConnection?.kernel?.status);
|
|
19
|
+
};
|
|
20
|
+
onStatusChanged();
|
|
21
|
+
sessionConnection?.statusChanged.connect(onStatusChanged);
|
|
22
|
+
sessionConnection?.connectionStatusChanged.connect(onStatusChanged);
|
|
23
|
+
return () => {
|
|
24
|
+
sessionConnection?.statusChanged.disconnect(onStatusChanged);
|
|
25
|
+
sessionConnection?.connectionStatusChanged.disconnect(onStatusChanged);
|
|
26
|
+
};
|
|
27
|
+
}, [sessionConnection]);
|
|
28
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "invisible", size: "small", leadingVisual: PlayIcon, disabled: !runtimeDesc?.location || kernelStatus === 'busy', onClick: (e) => commandRegistry?.execute(NotebookCommandIds.runAll), children: "Run all" }), _jsx(Button, { variant: "invisible", size: "small", leadingVisual: StopIcon, disabled: !runtimeDesc?.location || kernelStatus !== 'busy', onClick: (e) => commandRegistry?.execute(NotebookCommandIds.interrupt), children: "Interrupt" })] }));
|
|
29
|
+
}
|
|
30
|
+
export default NotebookEditorToolbar;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Awareness } from 'y-protocols/awareness';
|
|
2
|
+
/**
|
|
3
|
+
* PeersIndicator properties
|
|
4
|
+
*/
|
|
5
|
+
export type IPeersIndicatorProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Document awareness
|
|
8
|
+
*/
|
|
9
|
+
awareness: Awareness;
|
|
10
|
+
/**
|
|
11
|
+
* Current user handle
|
|
12
|
+
*/
|
|
13
|
+
currentUserHandle: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Connected peers indicator
|
|
17
|
+
*/
|
|
18
|
+
export declare function PeersIndicator({ awareness, currentUserHandle }: IPeersIndicatorProps): JSX.Element | null;
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import { Avatar, AvatarStack } from '@primer/react';
|
|
8
|
+
import { getAvatarURL, getRelativeTime } from '../../utils';
|
|
9
|
+
const AVATAR_SIZE = 28;
|
|
10
|
+
const SPACER_USER_AGENT = 'DatalayerSpacer';
|
|
11
|
+
const AWARENESS_NOTIFICATION_TIMEOUT_MS = 30_000;
|
|
12
|
+
var NotificationType;
|
|
13
|
+
(function (NotificationType) {
|
|
14
|
+
NotificationType["PROGRESS"] = "var(--borderColor-accent-emphasis)";
|
|
15
|
+
NotificationType["ERROR"] = "var(--borderColor-danger-emphasis)";
|
|
16
|
+
NotificationType["SUCCESS"] = "var(--borderColor-success-emphasis)";
|
|
17
|
+
})(NotificationType || (NotificationType = {}));
|
|
18
|
+
const MSG_TO_NOTIFICATION = {
|
|
19
|
+
'-1': NotificationType.ERROR,
|
|
20
|
+
'0': NotificationType.PROGRESS,
|
|
21
|
+
'1': NotificationType.SUCCESS
|
|
22
|
+
};
|
|
23
|
+
function isExpired(timestamp) {
|
|
24
|
+
// Timestamp is expired if older than 10 seconds ago
|
|
25
|
+
return timestamp + AWARENESS_NOTIFICATION_TIMEOUT_MS < Date.now();
|
|
26
|
+
}
|
|
27
|
+
function defaultAvatarSrc(color, text) {
|
|
28
|
+
const svg = `<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="${color}" stroke="none" /><text x="12" y="12" fill="black">${text}</text></svg>`;
|
|
29
|
+
return 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Connected peers indicator
|
|
33
|
+
*/
|
|
34
|
+
export function PeersIndicator({ awareness, currentUserHandle }) {
|
|
35
|
+
const [peers, setPeers] = useState([]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const onAwarenessChange = () => {
|
|
38
|
+
const peers = awareness.getStates();
|
|
39
|
+
setPeers(Array.from(peers.values())
|
|
40
|
+
.filter(p => p.user &&
|
|
41
|
+
p.user?.name !== currentUserHandle &&
|
|
42
|
+
!(p.user?.agent ?? '').startsWith(SPACER_USER_AGENT))
|
|
43
|
+
.reduce((agg, peer) => {
|
|
44
|
+
const user = peer.user;
|
|
45
|
+
const notExpiredNotification = !isExpired(peer.notification?.timestamp ?? 0);
|
|
46
|
+
const newPeer = user.agent
|
|
47
|
+
? {
|
|
48
|
+
// TODO pick something better
|
|
49
|
+
avatarUrl: 'https://static.vecteezy.com/system/resources/previews/006/662/139/large_2x/artificial-intelligence-ai-processor-chip-icon-symbol-for-graphic-design-logo-web-site-social-media-mobile-app-ui-illustration-free-vector.jpg',
|
|
50
|
+
color: user.color,
|
|
51
|
+
displayName: user.agent,
|
|
52
|
+
handle: 'agent',
|
|
53
|
+
initials: 'AI',
|
|
54
|
+
username: user.agent,
|
|
55
|
+
notification: notExpiredNotification
|
|
56
|
+
? `${peer.notification?.message} ${getRelativeTime(new Date(peer.notification.timestamp))}`
|
|
57
|
+
: undefined,
|
|
58
|
+
notificationType: notExpiredNotification &&
|
|
59
|
+
peer.notification?.message_type !== undefined
|
|
60
|
+
? MSG_TO_NOTIFICATION[peer.notification?.message_type.toString()]
|
|
61
|
+
: undefined
|
|
62
|
+
}
|
|
63
|
+
: {
|
|
64
|
+
avatarUrl: user.avatar_url,
|
|
65
|
+
color: user.color,
|
|
66
|
+
displayName: user.display_name,
|
|
67
|
+
handle: user.name,
|
|
68
|
+
initials: user.initials,
|
|
69
|
+
username: user.username
|
|
70
|
+
};
|
|
71
|
+
// Ensure to display a peer only once
|
|
72
|
+
if (!agg.map(p => p.username).includes(newPeer.username)) {
|
|
73
|
+
agg.push(newPeer);
|
|
74
|
+
}
|
|
75
|
+
return agg;
|
|
76
|
+
}, []));
|
|
77
|
+
};
|
|
78
|
+
onAwarenessChange();
|
|
79
|
+
awareness.on('change', onAwarenessChange);
|
|
80
|
+
// Force regular update to update agent notification
|
|
81
|
+
const updateInterval = setInterval(onAwarenessChange, AWARENESS_NOTIFICATION_TIMEOUT_MS / 3);
|
|
82
|
+
return () => {
|
|
83
|
+
clearInterval(updateInterval);
|
|
84
|
+
awareness.off('change', onAwarenessChange);
|
|
85
|
+
};
|
|
86
|
+
}, [awareness, currentUserHandle]);
|
|
87
|
+
return (_jsx(AvatarStack, { children: peers.map(peer => {
|
|
88
|
+
let title = `${peer.displayName}\n${peer.handle}`;
|
|
89
|
+
if (peer.notification) {
|
|
90
|
+
title += `\n${peer.notification}`;
|
|
91
|
+
}
|
|
92
|
+
return (_jsx(Avatar, { sx: {
|
|
93
|
+
border: peer.notificationType
|
|
94
|
+
? `var(--borderWidth-thick) solid ${peer.notificationType}`
|
|
95
|
+
: 'none'
|
|
96
|
+
}, title: title, src: peer.avatarUrl
|
|
97
|
+
? getAvatarURL(peer.avatarUrl)
|
|
98
|
+
: defaultAvatarSrc(peer.color, peer.initials), size: AVATAR_SIZE }, peer.displayName));
|
|
99
|
+
}) }));
|
|
100
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PeerIndicator';
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ISignal } from '@lumino/signaling';
|
|
2
|
+
export declare const FORCE_ACTIVATE_RUNTIMES_PLUGINS = false;
|
|
3
|
+
export type IDatalayerCoreConfig = {
|
|
4
|
+
/**
|
|
5
|
+
* Use mock model, useful for e.g. storybooks.
|
|
6
|
+
*/
|
|
7
|
+
useMock: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Does the webapp need a jupyter server.
|
|
10
|
+
*/
|
|
11
|
+
jupyterServerless: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* IAM API URL.
|
|
14
|
+
*/
|
|
15
|
+
iamRunUrl: string;
|
|
16
|
+
/**
|
|
17
|
+
* Runtimes API URL.
|
|
18
|
+
*/
|
|
19
|
+
runtimesRunUrl: string;
|
|
20
|
+
/**
|
|
21
|
+
* Spacer API URL.
|
|
22
|
+
*/
|
|
23
|
+
spacerRunUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* Library API URL.
|
|
26
|
+
*/
|
|
27
|
+
libraryRunUrl: string;
|
|
28
|
+
/**
|
|
29
|
+
* AI Agents API URL.
|
|
30
|
+
*/
|
|
31
|
+
aiagentsRunUrl: string;
|
|
32
|
+
/**
|
|
33
|
+
* Growth API URL.
|
|
34
|
+
*/
|
|
35
|
+
growthRunUrl: string;
|
|
36
|
+
/**
|
|
37
|
+
* Inbounds API URL.
|
|
38
|
+
*/
|
|
39
|
+
inboundsRunUrl: string;
|
|
40
|
+
/**
|
|
41
|
+
* Success API URL.
|
|
42
|
+
*/
|
|
43
|
+
successRunUrl: string;
|
|
44
|
+
/**
|
|
45
|
+
* Support API URL.
|
|
46
|
+
*/
|
|
47
|
+
supportRunUrl: string;
|
|
48
|
+
/**
|
|
49
|
+
* Load configuration from server.
|
|
50
|
+
*/
|
|
51
|
+
loadConfigurationFromServer: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Launcher card customization.
|
|
54
|
+
*/
|
|
55
|
+
launcher: {
|
|
56
|
+
/**
|
|
57
|
+
* Card category.
|
|
58
|
+
*/
|
|
59
|
+
category: string;
|
|
60
|
+
/**
|
|
61
|
+
* Card name.
|
|
62
|
+
*/
|
|
63
|
+
name: string;
|
|
64
|
+
/**
|
|
65
|
+
* Card icon SVG URL.
|
|
66
|
+
*/
|
|
67
|
+
icon: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Card rank.
|
|
70
|
+
*/
|
|
71
|
+
rank: number;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Brand customization.
|
|
75
|
+
*/
|
|
76
|
+
brand: {
|
|
77
|
+
name: string;
|
|
78
|
+
logoUrl: string;
|
|
79
|
+
logoSquareUrl: string;
|
|
80
|
+
about: string;
|
|
81
|
+
copyright: string;
|
|
82
|
+
docsUrl: string;
|
|
83
|
+
supportUrl: string;
|
|
84
|
+
pricingUrl: string;
|
|
85
|
+
termsUrl: string;
|
|
86
|
+
privacyUrl: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Whether to display the white labelled user interface or not.
|
|
90
|
+
*/
|
|
91
|
+
whiteLabel: boolean;
|
|
92
|
+
};
|
|
93
|
+
export interface IRuntimesConfiguration {
|
|
94
|
+
/**
|
|
95
|
+
* Maximal number of notebook remote runtimes per user.
|
|
96
|
+
*/
|
|
97
|
+
maxNotebookRuntimes: number;
|
|
98
|
+
/**
|
|
99
|
+
* Maximal number of cell remote runtimes per user.
|
|
100
|
+
*/
|
|
101
|
+
maxCellRuntimes: number;
|
|
102
|
+
}
|
|
103
|
+
export declare class DatalayerConfiguration {
|
|
104
|
+
private _configuration;
|
|
105
|
+
private _configurationChanged;
|
|
106
|
+
constructor();
|
|
107
|
+
set configuration(configuration: IDatalayerCoreConfig);
|
|
108
|
+
get configuration(): IDatalayerCoreConfig;
|
|
109
|
+
get configurationChanged(): ISignal<DatalayerConfiguration, IDatalayerCoreConfig>;
|
|
110
|
+
}
|
|
111
|
+
export default DatalayerConfiguration;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { Signal } from '@lumino/signaling';
|
|
6
|
+
import { coreStore } from '../state';
|
|
7
|
+
export const FORCE_ACTIVATE_RUNTIMES_PLUGINS = false;
|
|
8
|
+
export class DatalayerConfiguration {
|
|
9
|
+
_configuration = coreStore.getState().configuration;
|
|
10
|
+
_configurationChanged;
|
|
11
|
+
constructor() {
|
|
12
|
+
this._configurationChanged = new Signal(this);
|
|
13
|
+
}
|
|
14
|
+
set configuration(configuration) {
|
|
15
|
+
this._configuration = configuration;
|
|
16
|
+
this._configurationChanged.emit(configuration);
|
|
17
|
+
}
|
|
18
|
+
get configuration() {
|
|
19
|
+
return this._configuration;
|
|
20
|
+
}
|
|
21
|
+
get configurationChanged() {
|
|
22
|
+
return this._configurationChanged;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export default DatalayerConfiguration;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLoomPublicAppId: () => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
const IS_LOCALHOST = location.hostname === 'localhost';
|
|
6
|
+
export const getLoomPublicAppId = () => {
|
|
7
|
+
return IS_LOCALHOST
|
|
8
|
+
? LOOM_PUBLIC_APP_ID.LOCALHOST
|
|
9
|
+
: LOOM_PUBLIC_APP_ID.DATALAYER_IO;
|
|
10
|
+
};
|
|
11
|
+
// It is safe to expose PUBLIC APP ID here.
|
|
12
|
+
// @see https://dev.loom.com/docs
|
|
13
|
+
const LOOM_PUBLIC_APP_ID = {
|
|
14
|
+
LOCALHOST: "05754d5d-4778-4e6f-852a-a22fa0b5e87f",
|
|
15
|
+
DATALAYER_IO: "4b431848-adf7-457e-a545-0b0c7d21602a"
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Loom';
|