@datalayer/core 0.0.3 → 0.0.5
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 +114 -3
- package/lib/App.css +2 -2
- package/lib/App.d.ts +1 -1
- package/lib/App.js +9 -9
- package/lib/__tests__/index.test.js +5 -5
- package/lib/api/DatalayerApi.d.ts +1 -1
- package/lib/api/DatalayerApi.js +3 -3
- package/lib/api/index.d.ts +3 -3
- package/lib/api/index.js +3 -3
- package/lib/api/runtimes/actions.js +22 -23
- package/lib/api/runtimes/settings.js +3 -3
- package/lib/api/runtimes/snapshots.d.ts +1 -1
- package/lib/api/runtimes/snapshots.js +8 -8
- package/lib/api/runtimes/utils.js +1 -4
- package/lib/collaboration/DatalayerCollaboration.d.ts +9 -0
- package/lib/collaboration/DatalayerCollaboration.js +28 -0
- package/lib/collaboration/DatalayerCollaborationProvider.d.ts +54 -0
- package/lib/collaboration/DatalayerCollaborationProvider.js +162 -0
- package/lib/collaboration/index.d.ts +2 -0
- package/lib/collaboration/index.js +6 -0
- package/lib/components/avatars/BoringAvatar.d.ts +1 -1
- package/lib/components/avatars/BoringAvatar.js +2 -2
- package/lib/components/avatars/UserProfileAvatar.js +2 -9
- package/lib/components/banners/NoAutomationBanner.js +4 -4
- package/lib/components/buttons/DownloadCSVButton.js +1 -1
- package/lib/components/buttons/UploadButton.js +1 -1
- package/lib/components/checkout/StripeCheckout.d.ts +1 -1
- package/lib/components/checkout/StripeCheckout.js +6 -6
- package/lib/components/confetti/ConfettiSuccess.js +1 -1
- package/lib/components/context/OrganizationSelect.js +5 -5
- package/lib/components/context/SpaceSelect.js +7 -7
- package/lib/components/display/AvatarSkeleton.js +1 -1
- package/lib/components/display/CenteredSpinner.js +4 -4
- package/lib/components/display/CodePreview.js +4 -4
- package/lib/components/display/DatalayerBox.js +13 -14
- package/lib/components/display/HorizontalCenter.d.ts +1 -1
- package/lib/components/display/HorizontalCenter.js +1 -1
- package/lib/components/display/JupyterDialog.js +17 -15
- package/lib/components/display/NavLink.d.ts +4 -2
- package/lib/components/display/NavLink.js +6 -4
- package/lib/components/display/NotebookSkeleton.js +2 -2
- package/lib/components/display/Placeholder.js +1 -1
- package/lib/components/display/ToTopBranded.js +1 -1
- package/lib/components/echarts/EChartsReact.d.ts +1 -1
- package/lib/components/echarts/EChartsReact.js +1 -1
- package/lib/components/flashes/FlashClosable.js +11 -11
- package/lib/components/flashes/FlashDisclaimer.js +2 -3
- package/lib/components/flashes/FlashGuest.js +3 -4
- package/lib/components/flashes/FlashSurveys.js +3 -4
- package/lib/components/flashes/FlashUnauthorized.js +2 -2
- package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
- package/lib/components/flashes/surveys/Survey2025_1.js +62 -85
- package/lib/components/iam/ExternalTokenSilentLogin.js +6 -4
- package/lib/components/icons/ArtifactIcon.d.ts +2 -2
- package/lib/components/icons/ArtifactIcon.js +39 -39
- package/lib/components/labels/VisibilityLabel.js +2 -5
- package/lib/components/landings/StepBlock.d.ts +1 -1
- package/lib/components/landings/StepBlock.js +1 -1
- package/lib/components/navbar/NavigationVisbilityObserver.js +2 -2
- package/lib/components/navbar/SubdomainNavBar.js +45 -23
- package/lib/components/navbar/SubdomainNavBar.module.css +33 -14
- package/lib/components/nbgrader/NbGradesDetails.d.ts +1 -1
- package/lib/components/nbgrader/NbGradesDetails.js +5 -8
- package/lib/components/notebooks/JupyterNotebook.js +5 -5
- package/lib/components/notebooks/JupyterNotebookToolbar.js +3 -3
- package/lib/components/primer/Helper.d.ts +1 -1
- package/lib/components/primer/Helper.js +5 -3
- package/lib/components/primer/Portals.d.ts +1 -1
- package/lib/components/primer/Portals.js +2 -2
- package/lib/components/primer/Styles.js +1 -1
- package/lib/components/progress/ConsumptionBar.js +2 -2
- package/lib/components/progress/CreditsIndicator.d.ts +1 -1
- package/lib/components/progress/CreditsIndicator.js +4 -7
- package/lib/components/progress/ProgressRing.js +2 -2
- package/lib/components/runtimes/RuntimeCellVariables.js +9 -9
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +3 -3
- package/lib/components/runtimes/RuntimeLauncherDialog.js +30 -34
- package/lib/components/runtimes/RuntimePickerBase.js +42 -31
- package/lib/components/runtimes/RuntimePickerCell.js +9 -12
- package/lib/components/runtimes/RuntimePickerNotebook.js +44 -44
- package/lib/components/runtimes/RuntimeReservationControl.js +10 -15
- package/lib/components/runtimes/RuntimeSimplePicker.js +9 -12
- package/lib/components/runtimes/RuntimeUtils.js +22 -12
- package/lib/components/runtimes/RuntimeVariables.js +7 -7
- package/lib/components/screenshot/ScreenCapture.js +9 -13
- package/lib/components/screenshot/ScreenCaptureButton.d.ts +1 -1
- package/lib/components/screenshot/ScreenCaptureButton.js +14 -8
- package/lib/components/snapshots/RuntimeSnapshotMenu.js +19 -17
- package/lib/components/snippets/SnippetDialog.js +5 -5
- package/lib/components/storage/ContentsBrowser.js +63 -56
- package/lib/components/storage/ContentsItems.js +10 -8
- package/lib/components/students/StudentItemStatus.d.ts +1 -1
- package/lib/components/students/StudentItemStatus.js +35 -16
- package/lib/components/subnav/SubNav.d.ts +1 -1
- package/lib/components/subnav/SubNav.js +30 -15
- package/lib/components/subnav/SubNav.module.css +55 -21
- package/lib/components/tables/DataTable.js +1 -4
- package/lib/components/text-reveal/TextRevealAnimation.js +7 -2
- package/lib/components/text-reveal/TextRevealAnimation.module.css +4 -2
- package/lib/components/tokens/SpaceVariantToken.d.ts +1 -1
- package/lib/components/tokens/SpaceVariantToken.js +5 -5
- package/lib/components/toolbars/AssignmentEditorToolbar.js +1 -3
- package/lib/components/users/PeerIndicator.d.ts +1 -1
- package/lib/components/users/PeerIndicator.js +5 -5
- package/lib/config/Configuration.d.ts +48 -0
- package/lib/config/Configuration.js +42 -0
- package/lib/config/integrations/Loom.js +3 -3
- package/lib/examples/CellExample.d.ts +2 -2
- package/lib/examples/CellExample.js +34 -3
- package/lib/examples/DatalayerNotebookExample.d.ts +16 -0
- package/lib/examples/DatalayerNotebookExample.js +75 -0
- package/lib/examples/NativeNavigationExample.d.ts +8 -0
- package/lib/examples/NativeNavigationExample.js +97 -0
- package/lib/examples/NotebookExample.d.ts +1 -3
- package/lib/examples/NotebookExample.js +9 -7
- package/lib/examples/NotebookMutationsKernel.d.ts +2 -0
- package/lib/examples/NotebookMutationsKernel.js +115 -0
- package/lib/examples/NotebookMutationsServiceManager.d.ts +2 -0
- package/lib/examples/NotebookMutationsServiceManager.js +107 -0
- package/lib/examples/ReactRouterExample.d.ts +6 -0
- package/lib/examples/ReactRouterExample.js +175 -0
- package/lib/examples/example-selector.d.ts +22 -0
- package/lib/examples/example-selector.js +45 -0
- package/lib/examples/index.d.ts +2 -0
- package/lib/examples/index.js +6 -0
- package/lib/examples/main.js +153 -0
- package/lib/examples/notebooks/IPyWidgetsExample.ipynb.json +101 -0
- package/lib/examples/notebooks/IPyWidgetsExampleWithState.ipynb.json +112 -0
- package/lib/examples/{NotebookExample1.ipynb.json → notebooks/Lite.ipynb.json} +45 -53
- package/lib/examples/notebooks/Matplotlib.ipynb.json +137 -0
- package/lib/examples/notebooks/NotebookExample1.ipynb.json +126 -0
- package/lib/examples/notebooks/NotebookExample2.ipynb.json +48 -0
- package/lib/examples/notebooks/NotebookOutputs.ipynb.json +49 -0
- package/lib/examples/notebooks/NotebookToCExample.ipynb.json +102 -0
- package/lib/examples/notebooks/OutputIPyWidgetsExample.d.ts +145 -0
- package/lib/examples/notebooks/OutputIPyWidgetsExample.js +153 -0
- package/lib/examples/notebooks/PyGWalker.ipynb.json +55 -0
- package/lib/hooks/assets/OutputshotPlaceholders.d.ts +10 -10
- package/lib/hooks/assets/OutputshotPlaceholders.js +10 -10
- package/lib/hooks/index.d.ts +29 -28
- package/lib/hooks/index.js +29 -28
- package/lib/hooks/layouts/LayoutBackdrop.js +3 -6
- package/lib/hooks/layouts/LayoutScreenshot.css +1 -1
- package/lib/hooks/layouts/LayoutScreenshot.js +6 -6
- package/lib/hooks/useAIAgents.d.ts +1 -1
- package/lib/hooks/useAIAgents.js +6 -6
- package/lib/hooks/useAuthorization.js +4 -4
- package/lib/hooks/useBackdrop.js +7 -7
- package/lib/hooks/useBackdropJupyterLab.d.ts +1 -1
- package/lib/hooks/useBackdropJupyterLab.js +4 -4
- package/lib/hooks/useCache.d.ts +6 -2
- package/lib/hooks/useCache.js +233 -179
- package/lib/hooks/useCellOutputshot.js +3 -6
- package/lib/hooks/useContainsFocus.js +2 -1
- package/lib/hooks/useDatalayer.js +5 -3
- package/lib/hooks/useError.d.ts +1 -1
- package/lib/hooks/useError.js +2 -2
- package/lib/hooks/useExternalScript.js +4 -4
- package/lib/hooks/useFocusTrap.js +2 -1
- package/lib/hooks/useIAM.js +4 -5
- package/lib/hooks/useId.js +3 -3
- package/lib/hooks/useJupyterLabTheme.js +3 -1
- package/lib/hooks/useLocation.d.ts +22 -0
- package/lib/hooks/useLocation.js +149 -0
- package/lib/hooks/useLocationHandles.d.ts +2 -2
- package/lib/hooks/useLocationHandles.js +6 -4
- package/lib/hooks/useNavigate.d.ts +5 -1
- package/lib/hooks/useNavigate.js +62 -7
- package/lib/hooks/useNotebookAIAgent.js +3 -1
- package/lib/hooks/useParams.d.ts +5 -0
- package/lib/hooks/useParams.js +112 -0
- package/lib/hooks/useRuntimes.js +2 -2
- package/lib/hooks/useScreenshot.js +5 -5
- package/lib/hooks/useToast.js +15 -13
- package/lib/hooks/useUpload.js +9 -9
- package/lib/hooks/useUser.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +6 -3
- package/lib/index.js +7 -3
- package/lib/mocks/components/FlashMock.js +4 -4
- package/lib/mocks/hooks/rests/rests.js +15 -18
- package/lib/mocks/hooks/useDatalayerMock.d.ts +2 -2
- package/lib/mocks/hooks/useDatalayerMock.js +7 -7
- package/lib/mocks/models/CodeBlockMock.js +1 -1
- package/lib/mocks/models/CodelineMock.js +1 -1
- package/lib/mocks/models/CourseMock.d.ts +1 -1
- package/lib/mocks/models/CourseMock.js +10 -10
- package/lib/mocks/models/InviteMock.d.ts +1 -1
- package/lib/mocks/models/InviteMock.js +21 -6
- package/lib/mocks/models/JupyterLabUserMock.js +2 -2
- package/lib/mocks/models/OrganisationMock.d.ts +1 -1
- package/lib/mocks/models/OrganisationMock.js +11 -7
- package/lib/mocks/models/SchoolMock.d.ts +1 -1
- package/lib/mocks/models/SchoolMock.js +6 -6
- package/lib/mocks/models/SpaceMock.d.ts +1 -1
- package/lib/mocks/models/SpaceMock.js +9 -9
- package/lib/mocks/models/TeamMock.d.ts +1 -1
- package/lib/mocks/models/TeamMock.js +6 -6
- package/lib/mocks/models/UserMock.d.ts +1 -1
- package/lib/mocks/models/UserMock.js +4 -6
- package/lib/mocks/views/ActionMenuMock.js +1 -1
- package/lib/mocks/views/ChartMock.js +3 -3
- package/lib/mocks/views/ChartMockOptions.js +24 -24
- package/lib/mocks/views/DashboardMock.js +74 -74
- package/lib/mocks/views/FormMock.js +1 -1
- package/lib/mocks/views/TableMock.js +1 -1
- package/lib/models/Account.d.ts +2 -2
- package/lib/models/Assignment.d.ts +2 -2
- package/lib/models/Cell.d.ts +1 -1
- package/lib/models/CodeBlock.d.ts +1 -1
- package/lib/models/CodefeedBlocks.d.ts +2 -2
- package/lib/models/Contact.d.ts +1 -1
- package/lib/models/Contact.js +14 -14
- package/lib/models/ContactIAMProvider.js +2 -2
- package/lib/models/Course.d.ts +7 -7
- package/lib/models/Dataset.d.ts +1 -1
- package/lib/models/Dean.d.ts +1 -1
- package/lib/models/Document.d.ts +1 -1
- package/lib/models/Environment.d.ts +2 -2
- package/lib/models/Exercise.d.ts +1 -1
- package/lib/models/IAMProviderLinked.js +1 -1
- package/lib/models/Instructor.d.ts +1 -1
- package/lib/models/Invite.d.ts +2 -2
- package/lib/models/Invite.js +1 -1
- package/lib/models/Item.d.ts +5 -5
- package/lib/models/LandingRoles.js +18 -18
- package/lib/models/Lesson.d.ts +1 -1
- package/lib/models/Member.d.ts +1 -1
- package/lib/models/Notebook.d.ts +1 -1
- package/lib/models/Organization.d.ts +4 -4
- package/lib/models/Organization.js +2 -2
- package/lib/models/OrganizationMember.d.ts +2 -2
- package/lib/models/Page.js +4 -2
- package/lib/models/PageTag.d.ts +1 -1
- package/lib/models/PageTag.js +56 -9
- package/lib/models/Profile.d.ts +1 -1
- package/lib/models/RolesOrganization.d.ts +1 -1
- package/lib/models/RolesOrganization.js +4 -12
- package/lib/models/RolesPlatform.d.ts +1 -1
- package/lib/models/RolesPlatform.js +12 -34
- package/lib/models/RolesTeam.d.ts +1 -1
- package/lib/models/RolesTeam.js +3 -10
- package/lib/models/Runtime.js +4 -4
- package/lib/models/RuntimeSnapshot.js +1 -1
- package/lib/models/School.d.ts +4 -4
- package/lib/models/Space.d.ts +5 -5
- package/lib/models/Space.js +3 -3
- package/lib/models/SpaceItem.d.ts +8 -8
- package/lib/models/SpaceMember.d.ts +2 -2
- package/lib/models/Student.d.ts +2 -2
- package/lib/models/StudentItem.d.ts +3 -3
- package/lib/models/Team.d.ts +3 -3
- package/lib/models/Team.js +2 -2
- package/lib/models/TeamMember.d.ts +2 -2
- package/lib/models/URN.js +1 -1
- package/lib/models/User.d.ts +2 -2
- package/lib/models/User.js +5 -3
- package/lib/models/UserOnboarding.d.ts +1 -1
- package/lib/models/UserOnboarding.js +7 -7
- package/lib/models/UserSettings.js +2 -2
- package/lib/models/index.d.ts +2 -2
- package/lib/models/index.js +2 -2
- package/lib/navigation/adapters/native.d.ts +11 -0
- package/lib/navigation/adapters/native.js +48 -0
- package/lib/navigation/adapters/nextjs.d.ts +9 -0
- package/lib/navigation/adapters/nextjs.js +35 -0
- package/lib/navigation/adapters/react-router.d.ts +4 -0
- package/lib/navigation/adapters/react-router.js +12 -0
- package/lib/navigation/components.d.ts +20 -0
- package/lib/navigation/components.js +36 -0
- package/lib/navigation/index.d.ts +4 -0
- package/lib/navigation/index.js +12 -0
- package/lib/routes/index.d.ts +1 -1
- package/lib/routes/index.js +1 -1
- package/lib/services/DatalayerServiceManager.d.ts +22 -0
- package/lib/services/DatalayerServiceManager.js +69 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.js +7 -0
- package/lib/services/reconnectToRuntime.d.ts +32 -0
- package/lib/services/reconnectToRuntime.js +59 -0
- package/lib/state/State.d.ts +1 -1
- package/lib/state/State.js +1 -1
- package/lib/state/index.d.ts +1 -1
- package/lib/state/index.js +1 -1
- package/lib/state/storage/IAMStorage.js +14 -2
- package/lib/state/storage/index.d.ts +1 -1
- package/lib/state/storage/index.js +1 -1
- package/lib/state/substates/AIAgentState.js +4 -2
- package/lib/state/substates/CellState.js +6 -5
- package/lib/state/substates/CoreState.d.ts +1 -1
- package/lib/state/substates/CoreState.js +26 -17
- package/lib/state/substates/DatasourceState.js +1 -1
- package/lib/state/substates/IAMState.d.ts +4 -0
- package/lib/state/substates/IAMState.js +39 -23
- package/lib/state/substates/JupyterLabState.js +1 -1
- package/lib/state/substates/LayoutState.d.ts +2 -2
- package/lib/state/substates/LayoutState.js +41 -28
- package/lib/state/substates/OrganizationState.js +1 -1
- package/lib/state/substates/RuntimesState.js +11 -6
- package/lib/state/substates/SpaceState.js +1 -1
- package/lib/state/substates/SurveysState.js +4 -4
- package/lib/state/substates/TeamState.js +1 -1
- package/lib/test-setup.js +25 -3
- package/lib/theme/DatalayerTheme.js +1 -1
- package/lib/theme/DatalayerThemeProvider.js +17 -14
- package/lib/theme/Palette.js +1 -1
- package/lib/utils/Avatar.js +2 -2
- package/lib/utils/Browser.js +6 -6
- package/lib/utils/Cells.d.ts +1 -1
- package/lib/utils/Cookie.js +1 -1
- package/lib/utils/Date.js +2 -2
- package/lib/utils/Download.js +5 -3
- package/lib/utils/DownloadFile.js +4 -2
- package/lib/utils/Env.js +2 -1
- package/lib/utils/Lazy.d.ts +1 -1
- package/lib/utils/Lazy.js +2 -2
- package/lib/utils/Name.js +10 -8
- package/lib/utils/Notebook.d.ts +1 -1
- package/lib/utils/Notebook.js +3 -3
- package/lib/utils/Number.js +13 -9
- package/lib/utils/Plots.js +4 -4
- package/lib/utils/Screenshot.js +1 -1
- package/lib/utils/Sleep.js +1 -1
- package/lib/utils/Snapshot.js +2 -2
- package/lib/utils/String.js +2 -2
- package/lib/utils/Uri.js +1 -1
- package/lib/utils/WithSuspense.js +3 -6
- package/lib/utils/logger.d.ts +16 -0
- package/lib/utils/logger.js +52 -0
- package/package.json +49 -5
- package/lib/__tests__/App.test.js +0 -17
- /package/lib/{__tests__/App.test.d.ts → examples/main.d.ts} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Encode SVG online tool https://yoksel.github.io/url-encoder
|
|
3
|
-
*
|
|
4
|
-
* Examples:
|
|
5
|
-
*
|
|
6
|
-
* - https://css-tricks.com/lodge/svg/09-svg-data-uris
|
|
7
|
-
* - https://www.w3schools.com/graphics/svg_examples.asp
|
|
8
|
-
* - https://cloudfour.com/thinks/simple-svg-placeholder
|
|
9
|
-
* - https://css-tricks.com/lodge/svg/06-using-svg-svg-background-image
|
|
10
|
-
* - https://www.geeksforgeeks.org/how-to-set-the-svg-background-color
|
|
11
|
-
*/
|
|
2
|
+
* Encode SVG online tool https://yoksel.github.io/url-encoder
|
|
3
|
+
*
|
|
4
|
+
* Examples:
|
|
5
|
+
*
|
|
6
|
+
* - https://css-tricks.com/lodge/svg/09-svg-data-uris
|
|
7
|
+
* - https://www.w3schools.com/graphics/svg_examples.asp
|
|
8
|
+
* - https://cloudfour.com/thinks/simple-svg-placeholder
|
|
9
|
+
* - https://css-tricks.com/lodge/svg/06-using-svg-svg-background-image
|
|
10
|
+
* - https://www.geeksforgeeks.org/how-to-set-the-svg-background-color
|
|
11
|
+
*/
|
|
12
12
|
export declare const SVG_DATA_TYPE = "data:image/svg+xml;utf8";
|
|
13
13
|
export declare const SVG_BASE64_DATA_TYPE = "data:image/svg+xml;base64";
|
|
14
14
|
export declare const PNG_BASE64_DATA_TYPE = "data:image/png;base64";
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Encode SVG online tool https://yoksel.github.io/url-encoder
|
|
7
|
-
*
|
|
8
|
-
* Examples:
|
|
9
|
-
*
|
|
10
|
-
* - https://css-tricks.com/lodge/svg/09-svg-data-uris
|
|
11
|
-
* - https://www.w3schools.com/graphics/svg_examples.asp
|
|
12
|
-
* - https://cloudfour.com/thinks/simple-svg-placeholder
|
|
13
|
-
* - https://css-tricks.com/lodge/svg/06-using-svg-svg-background-image
|
|
14
|
-
* - https://www.geeksforgeeks.org/how-to-set-the-svg-background-color
|
|
15
|
-
*/
|
|
6
|
+
* Encode SVG online tool https://yoksel.github.io/url-encoder
|
|
7
|
+
*
|
|
8
|
+
* Examples:
|
|
9
|
+
*
|
|
10
|
+
* - https://css-tricks.com/lodge/svg/09-svg-data-uris
|
|
11
|
+
* - https://www.w3schools.com/graphics/svg_examples.asp
|
|
12
|
+
* - https://cloudfour.com/thinks/simple-svg-placeholder
|
|
13
|
+
* - https://css-tricks.com/lodge/svg/06-using-svg-svg-background-image
|
|
14
|
+
* - https://www.geeksforgeeks.org/how-to-set-the-svg-background-color
|
|
15
|
+
*/
|
|
16
16
|
export const SVG_DATA_TYPE = 'data:image/svg+xml;utf8';
|
|
17
17
|
export const SVG_BASE64_DATA_TYPE = 'data:image/svg+xml;base64';
|
|
18
18
|
export const PNG_BASE64_DATA_TYPE = 'data:image/png;base64';
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
1
|
+
export * from './useAIAgents';
|
|
2
|
+
export * from './useAuthorization';
|
|
3
|
+
export * from './useBackdrop';
|
|
4
|
+
export * from './useBackdropJupyterLab';
|
|
5
|
+
export * from './useCache';
|
|
6
|
+
export * from './useContainsFocus';
|
|
7
|
+
export * from './useDatalayer';
|
|
8
|
+
export * from './useError';
|
|
9
|
+
export * from './useExternalScript';
|
|
10
|
+
export * from './useFocusTrap';
|
|
11
|
+
export * from './useIAM';
|
|
12
|
+
export * from './useId';
|
|
13
|
+
export * from './useIsomorphicLayoutEffect';
|
|
14
|
+
export * from './useJupyterLabTheme';
|
|
15
|
+
export * from './useKeyboardEscape';
|
|
16
|
+
export * from './useLocation';
|
|
17
|
+
export * from './useLocationHandles';
|
|
18
|
+
export * from './useNavigate';
|
|
19
|
+
export * from './useParams';
|
|
20
|
+
export * from './useNotebookAIAgent';
|
|
21
|
+
export * from './useOnClickOutside';
|
|
22
|
+
export * from './useRef';
|
|
23
|
+
export * from './useRuntimes';
|
|
24
|
+
export * from './useScreenshot';
|
|
25
|
+
export * from './useToast';
|
|
26
|
+
export * from './useUpload';
|
|
27
|
+
export * from './useUser';
|
|
28
|
+
export * from './useVisibilityObserver';
|
|
29
|
+
export * from './useWindowSize';
|
package/lib/hooks/index.js
CHANGED
|
@@ -2,32 +2,33 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
5
|
+
export * from './useAIAgents';
|
|
6
|
+
export * from './useAuthorization';
|
|
7
|
+
export * from './useBackdrop';
|
|
8
|
+
export * from './useBackdropJupyterLab';
|
|
9
|
+
export * from './useCache';
|
|
10
|
+
export * from './useContainsFocus';
|
|
11
|
+
export * from './useDatalayer';
|
|
12
12
|
// export * from "./useCellOutputshot"; // Do not export html2canvas
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
13
|
+
export * from './useError';
|
|
14
|
+
export * from './useExternalScript';
|
|
15
|
+
export * from './useFocusTrap';
|
|
16
|
+
export * from './useIAM';
|
|
17
|
+
export * from './useId';
|
|
18
|
+
export * from './useIsomorphicLayoutEffect';
|
|
19
|
+
export * from './useJupyterLabTheme';
|
|
20
|
+
export * from './useKeyboardEscape';
|
|
21
|
+
export * from './useLocation';
|
|
22
|
+
export * from './useLocationHandles';
|
|
23
|
+
export * from './useNavigate';
|
|
24
|
+
export * from './useParams';
|
|
25
|
+
export * from './useNotebookAIAgent';
|
|
26
|
+
export * from './useOnClickOutside';
|
|
27
|
+
export * from './useRef';
|
|
28
|
+
export * from './useRuntimes';
|
|
29
|
+
export * from './useScreenshot';
|
|
30
|
+
export * from './useToast';
|
|
31
|
+
export * from './useUpload';
|
|
32
|
+
export * from './useUser';
|
|
33
|
+
export * from './useVisibilityObserver';
|
|
34
|
+
export * from './useWindowSize';
|
|
@@ -3,16 +3,13 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
-
import { useEffect } from
|
|
7
|
-
import { Heading, Box, Spinner } from
|
|
6
|
+
import { useEffect } from 'react';
|
|
7
|
+
import { Heading, Box, Spinner } from '@primer/react';
|
|
8
8
|
import { useBackdrop } from '..';
|
|
9
9
|
import { useLayoutStore } from '../../state';
|
|
10
10
|
const BackdropContent = (props) => {
|
|
11
11
|
const { backdropDisplay } = props;
|
|
12
|
-
return (_jsx(Box, { style: { zIndex: 10999 }, children: backdropDisplay.message ?
|
|
13
|
-
_jsxs(Box, { display: "flex", style: { alignItems: "center" }, children: [_jsx(Box, { mr: 3, children: _jsx(Spinner, { size: "large" }) }), _jsx(Box, { children: _jsx(Heading, { sx: { fontSize: 5, color: 'white' }, children: backdropDisplay.message }) })] })
|
|
14
|
-
:
|
|
15
|
-
_jsx(Spinner, { size: "large" }) }));
|
|
12
|
+
return (_jsx(Box, { style: { zIndex: 10999 }, children: backdropDisplay.message ? (_jsxs(Box, { display: "flex", style: { alignItems: 'center' }, children: [_jsx(Box, { mr: 3, children: _jsx(Spinner, { size: "large" }) }), _jsx(Box, { children: _jsx(Heading, { sx: { fontSize: 5, color: 'white' }, children: backdropDisplay.message }) })] })) : (_jsx(Spinner, { size: "large" })) }));
|
|
16
13
|
};
|
|
17
14
|
export const LayoutBackdrop = () => {
|
|
18
15
|
const { backdrop } = useLayoutStore();
|
|
@@ -3,13 +3,13 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
-
import { useEffect } from
|
|
7
|
-
import { Box } from
|
|
6
|
+
import { useEffect } from 'react';
|
|
7
|
+
import { Box } from '@primer/react';
|
|
8
8
|
import { useScreenshot, useToast } from '..';
|
|
9
|
-
import { lazyWithPreload, WithSuspense } from
|
|
9
|
+
import { lazyWithPreload, WithSuspense } from '../../utils';
|
|
10
10
|
import { useLayoutStore } from '../../state';
|
|
11
11
|
import './LayoutScreenshot.css';
|
|
12
|
-
const ScreenCapture = WithSuspense(lazyWithPreload(() => import(
|
|
12
|
+
const ScreenCapture = WithSuspense(lazyWithPreload(() => import('../../components/screenshot/ScreenCapture')));
|
|
13
13
|
const Capture = (props) => {
|
|
14
14
|
const { onStartCapture } = props;
|
|
15
15
|
useEffect(() => {
|
|
@@ -26,14 +26,14 @@ const ScreenshotContent = (props) => {
|
|
|
26
26
|
hideScreenshot();
|
|
27
27
|
enqueueToast('Screen is captured.', { variant: 'success' });
|
|
28
28
|
};
|
|
29
|
-
return (_jsx(Box, { children: _jsx(ScreenCapture, { onEndCapture: handleScreenCapture, children: ({ onStartCapture }) =>
|
|
29
|
+
return (_jsx(Box, { children: _jsx(ScreenCapture, { onEndCapture: handleScreenCapture, children: ({ onStartCapture }) => _jsx(Capture, { onStartCapture: onStartCapture }) }) }));
|
|
30
30
|
};
|
|
31
31
|
export const LayoutScreenshot = () => {
|
|
32
32
|
const { screenshot } = useLayoutStore();
|
|
33
33
|
const { displayScreenshot, closeScreenshot } = useScreenshot();
|
|
34
34
|
useEffect(() => {
|
|
35
35
|
if (screenshot && screenshot.open) {
|
|
36
|
-
displayScreenshot(() => _jsx(ScreenshotContent, { screenshotDisplay: screenshot }));
|
|
36
|
+
displayScreenshot(() => (_jsx(ScreenshotContent, { screenshotDisplay: screenshot })));
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
closeScreenshot();
|
|
@@ -5,7 +5,7 @@ export type RequestOptions = {
|
|
|
5
5
|
export type RoomType = 'notebook_persist' | 'notebook_memory' | 'doc_memory';
|
|
6
6
|
export declare const useAIAgents: (baseUrlOverride?: string) => {
|
|
7
7
|
createAIAgent: (documentId: string, documentType: RoomType, ingress?: string, token?: string, kernelId?: string, { signal, baseUrl }?: RequestOptions) => Promise<any>;
|
|
8
|
-
getAIAgents: ({ signal, baseUrl }?: RequestOptions) => Promise<any>;
|
|
8
|
+
getAIAgents: ({ signal, baseUrl, }?: RequestOptions) => Promise<any>;
|
|
9
9
|
deleteAIAgent: (documentId: string, { signal, baseUrl }?: RequestOptions) => Promise<any>;
|
|
10
10
|
getAIAgent: (documentId: string, { signal, baseUrl }?: RequestOptions) => Promise<any>;
|
|
11
11
|
patchAIAgent: (documentId: string, ingress?: string, token?: string, kernelId?: string, { signal, baseUrl }?: RequestOptions) => Promise<any>;
|
package/lib/hooks/useAIAgents.js
CHANGED
|
@@ -19,12 +19,12 @@ export const useAIAgents = (baseUrlOverride = 'api/ai-agents/v1') => {
|
|
|
19
19
|
ingress,
|
|
20
20
|
token,
|
|
21
21
|
kernel_id: kernelId,
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
23
|
},
|
|
24
|
-
signal
|
|
24
|
+
signal,
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
const getAIAgents = ({ signal, baseUrl = baseUrlOverride } = {}) => {
|
|
27
|
+
const getAIAgents = ({ signal, baseUrl = baseUrlOverride, } = {}) => {
|
|
28
28
|
return requestDatalayer({
|
|
29
29
|
url: URLExt.join(configuration.aiagentsRunUrl, baseUrl, 'agents'),
|
|
30
30
|
method: 'GET',
|
|
@@ -54,9 +54,9 @@ export const useAIAgents = (baseUrlOverride = 'api/ai-agents/v1') => {
|
|
|
54
54
|
? {
|
|
55
55
|
ingress,
|
|
56
56
|
token,
|
|
57
|
-
kernel_id: kernelId
|
|
57
|
+
kernel_id: kernelId,
|
|
58
58
|
}
|
|
59
|
-
: null
|
|
59
|
+
: null,
|
|
60
60
|
},
|
|
61
61
|
signal,
|
|
62
62
|
});
|
|
@@ -66,7 +66,7 @@ export const useAIAgents = (baseUrlOverride = 'api/ai-agents/v1') => {
|
|
|
66
66
|
getAIAgents,
|
|
67
67
|
deleteAIAgent,
|
|
68
68
|
getAIAgent,
|
|
69
|
-
patchAIAgent
|
|
69
|
+
patchAIAgent,
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
export default useAIAgents;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
import { useLocation } from
|
|
6
|
-
import { PlatformRoles, OrganizationRoles, TeamRoles } from '../models';
|
|
7
|
-
import useNavigate from
|
|
5
|
+
import { useLocation } from './useLocation';
|
|
6
|
+
import { PlatformRoles, OrganizationRoles, TeamRoles, } from '../models';
|
|
7
|
+
import useNavigate from './useNavigate';
|
|
8
8
|
export const useAuthorization = () => {
|
|
9
9
|
const navigate = useNavigate();
|
|
10
10
|
const location = useLocation();
|
|
11
11
|
const goToApplicationStateError = (message) => {
|
|
12
12
|
console.warn(message);
|
|
13
|
-
console.log(
|
|
13
|
+
console.log('Application error while navigating to ', location);
|
|
14
14
|
console.trace();
|
|
15
15
|
navigate('/error/application/state');
|
|
16
16
|
};
|
package/lib/hooks/useBackdrop.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
*/
|
|
6
6
|
import { createContext, useState, useContext } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { LayoutBackdrop } from
|
|
8
|
+
import { LayoutBackdrop } from './layouts';
|
|
9
9
|
export const BackdropContext = createContext({
|
|
10
10
|
closeBackdrop: () => { },
|
|
11
11
|
displayBackdrop: (nextBackdrop) => { },
|
|
@@ -51,7 +51,7 @@ export default App
|
|
|
51
51
|
export function BackdropProvider(props) {
|
|
52
52
|
const { children, zIndex, disableDarken, backdropSurface } = props;
|
|
53
53
|
const defaultBackdropSurface = {
|
|
54
|
-
position:
|
|
54
|
+
position: 'fixed',
|
|
55
55
|
top: 0,
|
|
56
56
|
left: 0,
|
|
57
57
|
width: '100%',
|
|
@@ -64,18 +64,18 @@ export function BackdropProvider(props) {
|
|
|
64
64
|
};
|
|
65
65
|
const [backdrop, setBackdrop] = useState({
|
|
66
66
|
open: false,
|
|
67
|
-
render: (closeBackdrop) => _jsx(_Fragment, {})
|
|
67
|
+
render: (closeBackdrop) => _jsx(_Fragment, {}),
|
|
68
68
|
});
|
|
69
69
|
const displayBackdrop = (nextBackdrop) => {
|
|
70
70
|
setBackdrop({
|
|
71
71
|
open: true,
|
|
72
|
-
render: nextBackdrop
|
|
72
|
+
render: nextBackdrop,
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
75
|
const closeBackdrop = () => {
|
|
76
76
|
setBackdrop({
|
|
77
77
|
open: false,
|
|
78
|
-
render: (closeBackdrop) => _jsx(_Fragment, {})
|
|
78
|
+
render: (closeBackdrop) => _jsx(_Fragment, {}),
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
81
|
return (_jsxs(BackdropContextProvider, { value: { closeBackdrop, displayBackdrop }, children: [_jsx(LayoutBackdrop, {}), children, backdrop.open &&
|
|
@@ -90,11 +90,11 @@ BackdropProvider.propTypes = {
|
|
|
90
90
|
// A render function that returns a Component that overrides (takes the
|
|
91
91
|
// place of) the default darkened div background.
|
|
92
92
|
// See /example/src/ExampleApp.jsx for proper use.
|
|
93
|
-
backdropSurface: PropTypes.func
|
|
93
|
+
backdropSurface: PropTypes.func,
|
|
94
94
|
};
|
|
95
95
|
BackdropProvider.defaultProps = {
|
|
96
96
|
children: undefined,
|
|
97
97
|
disableBackdrop: false,
|
|
98
98
|
zIndex: 9999,
|
|
99
|
-
backdropSurface: null
|
|
99
|
+
backdropSurface: null,
|
|
100
100
|
};
|
|
@@ -10,6 +10,6 @@ type UseJupyterLabBackdropProps = {
|
|
|
10
10
|
openBackdrop: (element: JSX.Element) => void;
|
|
11
11
|
closeBackdrop: () => void;
|
|
12
12
|
};
|
|
13
|
-
declare const JupyterLabBackdropProvider: ({ children }: React.PropsWithChildren<JupyterLabBackdropProps>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const JupyterLabBackdropProvider: ({ children, }: React.PropsWithChildren<JupyterLabBackdropProps>) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
declare function useJupyterLabBackdrop(): UseJupyterLabBackdropProps;
|
|
15
15
|
export { useJupyterLabBackdrop, JupyterLabBackdropProvider };
|
|
@@ -18,7 +18,7 @@ const JupyterLabBackdropComponent = styled.div `
|
|
|
18
18
|
z-index: 1000000000;
|
|
19
19
|
`;
|
|
20
20
|
function JupyterLabBackdrop({ open, element }) {
|
|
21
|
-
return open ? _jsx(JupyterLabBackdropComponent, { children: element }) : _jsx(_Fragment, {});
|
|
21
|
+
return open ? (_jsx(JupyterLabBackdropComponent, { children: element })) : (_jsx(_Fragment, {}));
|
|
22
22
|
}
|
|
23
23
|
export default JupyterLabBackdrop;
|
|
24
24
|
const JupyterLabBackdropContext = createContext({
|
|
@@ -27,9 +27,9 @@ const JupyterLabBackdropContext = createContext({
|
|
|
27
27
|
},
|
|
28
28
|
closeBackdrop: () => {
|
|
29
29
|
/* no-op */
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
31
|
});
|
|
32
|
-
const JupyterLabBackdropProvider = ({ children }) => {
|
|
32
|
+
const JupyterLabBackdropProvider = ({ children, }) => {
|
|
33
33
|
const [opened, setOpened] = useState(false);
|
|
34
34
|
const [element, setElement] = useState();
|
|
35
35
|
const openBackdrop = (element) => {
|
|
@@ -42,7 +42,7 @@ const JupyterLabBackdropProvider = ({ children }) => {
|
|
|
42
42
|
};
|
|
43
43
|
return (_jsxs(JupyterLabBackdropContext.Provider, { value: {
|
|
44
44
|
openBackdrop: openBackdrop,
|
|
45
|
-
closeBackdrop: closeBackdrop
|
|
45
|
+
closeBackdrop: closeBackdrop,
|
|
46
46
|
}, children: [_jsx(JupyterLabBackdrop, { open: opened, element: element }), children] }));
|
|
47
47
|
};
|
|
48
48
|
function useJupyterLabBackdrop() {
|
package/lib/hooks/useCache.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IAnyOrganization, IAnySpace, IAssignment, ICell, IContact, ICourse, IDataset, IDatasource, IDocument, IEnvironment, IExercise, IIAMToken, IInbound, IInvite, IItemType, ILesson, ILinkedInUser, INotebook, IOrganization, IOutbound, IPage, ISchool, ISecret, ISpaceItem, IStudent, ITeam, IUsage, IUser, IUserOnboarding, IUserSettings, LinkedInUser, WaitingListFormData } from
|
|
2
|
-
import { IPrice } from
|
|
1
|
+
import { IAnyOrganization, IAnySpace, IAssignment, ICell, IContact, ICourse, IDataset, IDatasource, IDocument, IEnvironment, IExercise, IIAMToken, IInbound, IInvite, IItemType, ILesson, ILinkedInUser, INotebook, IOrganization, IOutbound, IPage, ISchool, ISecret, ISpaceItem, IStudent, ITeam, IUsage, IUser, IUserOnboarding, IUserSettings, LinkedInUser, WaitingListFormData } from '../models';
|
|
2
|
+
import { IPrice } from './../components/checkout';
|
|
3
3
|
import { type IRESTBaseResponse } from '../models';
|
|
4
4
|
type CacheProps = {
|
|
5
5
|
loginRoute?: string;
|
|
@@ -43,6 +43,7 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
43
43
|
cloneExercise: (exerciseId: string) => Promise<any>;
|
|
44
44
|
cloneLesson: (lessonId: string) => Promise<any>;
|
|
45
45
|
cloneNotebook: (notebookId: string) => Promise<any>;
|
|
46
|
+
createNotebook: (spaceId: string, name: string, description?: string, notebookType?: string) => Promise<any>;
|
|
46
47
|
confirmCourseItemCompletion: (courseId: any, itemType: IItemType, itemId: string, completed: boolean) => Promise<any>;
|
|
47
48
|
confirmEmailUpdate: (token: any) => Promise<any>;
|
|
48
49
|
confirmJoinWithToken: (userHandle: any, token: any) => Promise<any>;
|
|
@@ -302,5 +303,8 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
302
303
|
updateUserSettings: (userId: string, settings: IUserSettings) => Promise<any>;
|
|
303
304
|
validateUserMFACode: (userUid: any, code: string) => Promise<any>;
|
|
304
305
|
whoami: () => Promise<any>;
|
|
306
|
+
notebookUploadLoading: boolean;
|
|
307
|
+
notebookUploadProgress: number;
|
|
308
|
+
resetNotebookUpload: () => void;
|
|
305
309
|
};
|
|
306
310
|
export default useCache;
|