@datalayer/core 1.0.13 → 1.0.15
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/lib/App.js +2 -2
- package/lib/api/DatalayerApi.js +6 -1
- package/lib/api/constants.d.ts +1 -1
- package/lib/api/constants.js +1 -1
- package/lib/api/iam/authentication.js +3 -3
- package/lib/api/iam/datasources.js +3 -3
- package/lib/api/iam/healthz.js +2 -2
- package/lib/api/iam/index.js +12 -12
- package/lib/api/iam/oauth2.js +2 -2
- package/lib/api/iam/profile.js +3 -3
- package/lib/api/iam/secrets.js +3 -3
- package/lib/api/iam/usage.js +2 -2
- package/lib/api/index.js +8 -8
- package/lib/api/otel/index.js +5 -5
- package/lib/api/otel/logs.js +3 -3
- package/lib/api/otel/metrics.js +3 -3
- package/lib/api/otel/query.js +3 -3
- package/lib/api/otel/services.js +3 -3
- package/lib/api/otel/traces.js +3 -3
- package/lib/api/runtimes/checkpoints.js +3 -3
- package/lib/api/runtimes/environments.js +3 -3
- package/lib/api/runtimes/healthz.js +2 -2
- package/lib/api/runtimes/index.js +5 -5
- package/lib/api/runtimes/runtimes.js +3 -3
- package/lib/api/runtimes/snapshots.js +3 -3
- package/lib/api/spacer/documents.js +2 -2
- package/lib/api/spacer/healthz.js +2 -2
- package/lib/api/spacer/index.js +7 -7
- package/lib/api/spacer/items.js +2 -2
- package/lib/api/spacer/lexicals.d.ts +8 -0
- package/lib/api/spacer/lexicals.js +16 -2
- package/lib/api/spacer/notebooks.d.ts +8 -0
- package/lib/api/spacer/notebooks.js +16 -2
- package/lib/api/spacer/spaces.d.ts +76 -1
- package/lib/api/spacer/spaces.js +143 -3
- package/lib/api/spacer/users.js +3 -3
- package/lib/client/auth/AuthenticationManager.js +3 -3
- package/lib/client/auth/index.js +4 -4
- package/lib/client/auth/storage.d.ts +3 -1
- package/lib/client/auth/storage.js +35 -14
- package/lib/client/auth/strategies.js +3 -3
- package/lib/client/base.js +2 -2
- package/lib/client/index.d.ts +22 -2
- package/lib/client/index.js +21 -20
- package/lib/client/mixins/IAMMixin.js +10 -10
- package/lib/client/mixins/RuntimesMixin.js +7 -7
- package/lib/client/mixins/SpacerMixin.d.ts +99 -0
- package/lib/client/mixins/SpacerMixin.js +265 -11
- package/lib/client/utils/slugify.d.ts +8 -0
- package/lib/client/utils/slugify.js +18 -0
- package/lib/client/utils/spacerUtils.js +3 -3
- package/lib/collaboration/DatalayerCollaborationProvider.js +1 -1
- package/lib/collaboration/index.js +2 -2
- package/lib/components/auth/Login.js +6 -6
- package/lib/components/auth/Login.stories.js +2 -2
- package/lib/components/auth/LoginToken.js +2 -2
- package/lib/components/auth/index.js +3 -3
- package/lib/components/avatars/BoringAvatar.stories.js +1 -1
- package/lib/components/avatars/UserProfileAvatar.js +2 -2
- package/lib/components/avatars/index.js +2 -2
- package/lib/components/banners/NoAutomationBanner.js +1 -1
- package/lib/components/banners/index.js +1 -1
- package/lib/components/buttons/DownloadCSVButton.js +1 -1
- package/lib/components/buttons/DownloadJsonButton.js +1 -1
- package/lib/components/buttons/index.js +5 -5
- package/lib/components/checkout/StripeCheckout.js +1 -1
- package/lib/components/checkout/index.js +1 -1
- package/lib/components/confetti/index.js +1 -1
- package/lib/components/context/OrganizationSelect.js +2 -2
- package/lib/components/context/SpaceSelect.js +2 -2
- package/lib/components/context/index.js +2 -2
- package/lib/components/display/DatalayerBox.js +1 -1
- package/lib/components/display/LiveRelativeTime.js +1 -1
- package/lib/components/display/NavLink.js +1 -1
- package/lib/components/display/index.js +14 -14
- package/lib/components/echarts/index.js +1 -1
- package/lib/components/flashes/FlashDisclaimer.js +2 -2
- package/lib/components/flashes/FlashGuest.js +4 -4
- package/lib/components/flashes/FlashSurveys.js +4 -4
- package/lib/components/flashes/FlashUnauthorized.js +1 -1
- package/lib/components/flashes/index.js +6 -6
- package/lib/components/flashes/surveys/index.js +2 -2
- package/lib/components/iam/ExternalTokenSilentLogin.js +3 -3
- package/lib/components/iam/index.js +1 -1
- package/lib/components/icons/index.js +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/labels/index.js +1 -1
- package/lib/components/landings/index.js +1 -1
- package/lib/components/navbar/NavigationVisbilityObserver.js +4 -4
- package/lib/components/navbar/SubdomainNavBar.js +5 -5
- package/lib/components/navbar/index.js +2 -2
- package/lib/components/nbgrader/index.js +1 -1
- package/lib/components/notebooks/index.js +2 -2
- package/lib/components/progress/ConsumptionBar.js +1 -1
- package/lib/components/progress/CreditsIndicator.js +2 -2
- package/lib/components/progress/index.js +6 -6
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +2 -2
- package/lib/components/runtimes/RuntimeLauncherDialog.js +9 -9
- package/lib/components/runtimes/RuntimePickerBase.js +3 -3
- package/lib/components/runtimes/RuntimePickerCell.js +8 -8
- package/lib/components/runtimes/RuntimePickerNotebook.js +6 -6
- package/lib/components/runtimes/RuntimeSimplePicker.js +3 -3
- package/lib/components/runtimes/index.js +11 -11
- package/lib/components/screencapture/ScreencaptureButton.js +3 -3
- package/lib/components/screencapture/index.js +2 -2
- package/lib/components/snapshots/RuntimeSnapshotMenu.js +4 -4
- package/lib/components/snapshots/index.js +1 -1
- package/lib/components/snippets/SnippetDialog.js +1 -1
- package/lib/components/snippets/index.js +1 -1
- package/lib/components/sparklines/Sparklines.js +5 -1
- package/lib/components/sparklines/dataProcessing.d.ts +2 -4
- package/lib/components/sparklines/dataProcessing.js +1 -1
- package/lib/components/sparklines/index.d.ts +1 -0
- package/lib/components/sparklines/index.js +7 -3
- package/lib/components/sparklines/types.js +1 -1
- package/lib/components/storage/ContentsBrowser.js +3 -3
- package/lib/components/storage/index.js +2 -2
- package/lib/components/students/index.js +1 -1
- package/lib/components/subnav/SubNav.js +2 -2
- package/lib/components/subnav/index.js +1 -1
- package/lib/components/tables/index.js +1 -1
- package/lib/components/text-reveal/TextRevealAnimation.js +1 -1
- package/lib/components/text-reveal/index.js +1 -1
- package/lib/components/tokens/index.js +1 -1
- package/lib/components/toolbars/AssignmentEditorToolbar.js +1 -1
- package/lib/components/toolbars/DocumentEditorToolbar.js +1 -1
- package/lib/components/toolbars/index.js +3 -3
- package/lib/components/users/PeerIndicator.js +1 -1
- package/lib/components/users/index.js +1 -1
- package/lib/config/Configuration.d.ts +1 -1
- package/lib/config/Configuration.js +2 -2
- package/lib/config/index.js +2 -2
- package/lib/config/integrations/index.js +1 -1
- package/lib/hooks/assets/index.js +1 -1
- package/lib/hooks/index.js +33 -33
- package/lib/hooks/layouts/LayoutBackdrop.js +2 -2
- package/lib/hooks/layouts/LayoutScreencapture.js +3 -3
- package/lib/hooks/layouts/index.js +2 -2
- package/lib/hooks/useAuthorization.js +3 -3
- package/lib/hooks/useBackdrop.js +2 -2
- package/lib/hooks/useCache.js +9 -9
- package/lib/hooks/useCellOutputshot.js +2 -2
- package/lib/hooks/useDatalayer.js +6 -6
- package/lib/hooks/useIAM.js +4 -4
- package/lib/hooks/useLocation.js +2 -2
- package/lib/hooks/useLocationHandles.js +3 -3
- package/lib/hooks/useNavigate.js +4 -4
- package/lib/hooks/useParams.js +2 -2
- package/lib/hooks/useProjects.d.ts +2 -8
- package/lib/hooks/useProjects.js +2 -2
- package/lib/hooks/useRuntimes.js +1 -1
- package/lib/hooks/useScreencapture.js +1 -1
- package/lib/hooks/useToast.js +41 -5
- package/lib/hooks/useUpload.js +2 -2
- package/lib/hooks/useUser.js +1 -1
- package/lib/i18n/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +17 -17
- package/lib/main.js +1 -1
- package/lib/mocks/components/FlashMock.js +1 -1
- package/lib/mocks/components/index.js +1 -1
- package/lib/mocks/hooks/index.js +1 -1
- package/lib/mocks/hooks/rests/index.js +1 -1
- package/lib/mocks/hooks/useDatalayerMock.js +5 -5
- package/lib/mocks/index.js +5 -5
- package/lib/mocks/models/CourseMock.js +3 -3
- package/lib/mocks/models/InviteMock.js +2 -2
- package/lib/mocks/models/OrganisationMock.js +1 -1
- package/lib/mocks/models/SchoolMock.js +1 -1
- package/lib/mocks/models/SpaceMock.js +2 -2
- package/lib/mocks/models/TeamMock.js +1 -1
- package/lib/mocks/models/UserMock.js +1 -1
- package/lib/mocks/models/index.js +9 -9
- package/lib/mocks/views/ChartMock.js +3 -3
- package/lib/mocks/views/DashboardMock.js +2 -2
- package/lib/mocks/views/TableMock.js +1 -1
- package/lib/mocks/views/index.js +7 -7
- package/lib/models/Contact.js +3 -3
- package/lib/models/CreditsDTO.js +1 -1
- package/lib/models/Datasource.js +1 -1
- package/lib/models/EnvironmentDTO.d.ts +1 -1
- package/lib/models/EnvironmentDTO.js +2 -2
- package/lib/models/HealthCheck.js +1 -1
- package/lib/models/IAMProviderUsers.js +1 -1
- package/lib/models/Invite.js +1 -1
- package/lib/models/ItemDTO.js +1 -1
- package/lib/models/LexicalDTO.js +4 -4
- package/lib/models/NotebookDTO.js +4 -4
- package/lib/models/Organization.js +2 -2
- package/lib/models/Page.js +2 -2
- package/lib/models/ProjectDTO.d.ts +89 -0
- package/lib/models/ProjectDTO.js +131 -0
- package/lib/models/RuntimeDTO.js +2 -2
- package/lib/models/RuntimeSnapshotDTO.js +2 -2
- package/lib/models/Secret.js +1 -1
- package/lib/models/Space.d.ts +1 -1
- package/lib/models/Space.js +3 -3
- package/lib/models/SpaceDTO.d.ts +61 -0
- package/lib/models/SpaceDTO.js +9 -9
- package/lib/models/Team.js +2 -2
- package/lib/models/User.js +5 -5
- package/lib/models/UserDTO.js +1 -1
- package/lib/models/index.js +75 -75
- package/lib/navigation/components.js +1 -1
- package/lib/navigation/index.js +4 -4
- package/lib/otel/client/OtelClient.js +1 -1
- package/lib/otel/client/index.js +1 -1
- package/lib/otel/hooks/index.js +1 -1
- package/lib/otel/index.js +15 -15
- package/lib/otel/types.d.ts +1 -1
- package/lib/otel/views/OtelLive.js +11 -11
- package/lib/otel/views/OtelLogsList.js +1 -1
- package/lib/otel/views/OtelMetricsList.d.ts +2 -5
- package/lib/otel/views/OtelMetricsList.js +2 -2
- package/lib/otel/views/OtelSpanDetail.js +2 -2
- package/lib/otel/views/OtelSpanTree.js +1 -1
- package/lib/otel/views/OtelSqlView.js +1 -1
- package/lib/otel/views/OtelSystemView.js +1 -1
- package/lib/otel/views/OtelTimeline.js +1 -1
- package/lib/otel/views/OtelTracesList.js +1 -1
- package/lib/otel/views/index.d.ts +1 -0
- package/lib/otel/views/index.js +12 -12
- package/lib/routes/index.js +1 -1
- package/lib/services/DatalayerServiceManager.d.ts +1 -1
- package/lib/services/DatalayerServiceManager.js +4 -4
- package/lib/services/index.js +3 -3
- package/lib/state/State.js +13 -13
- package/lib/state/index.js +3 -3
- package/lib/state/storage/IAMStorage.js +31 -6
- package/lib/state/storage/index.js +1 -1
- package/lib/state/substates/CoreState.js +2 -2
- package/lib/state/substates/IAMState.js +5 -5
- package/lib/state/substates/RuntimesState.js +3 -3
- package/lib/state/substates/SurveysState.js +4 -4
- package/lib/state/substates/TeamState.js +1 -1
- package/lib/state/substates/index.js +14 -14
- package/lib/stateful/index.js +2 -2
- package/lib/stateful/jupyter/exec/Snippets.js +1 -1
- package/lib/stateful/jupyter/exec/index.js +2 -2
- package/lib/stateful/jupyter/index.js +2 -2
- package/lib/stateful/runtimes/actions.js +4 -4
- package/lib/stateful/runtimes/index.js +5 -5
- package/lib/stateful/runtimes/snapshots.js +1 -1
- package/lib/utils/Date.d.ts +11 -0
- package/lib/utils/Date.js +30 -0
- package/lib/utils/cli/index.js +1 -1
- package/lib/utils/index.js +29 -29
- package/lib/views/datasources/DatasourceDetail.js +3 -3
- package/lib/views/datasources/DatasourceNew.js +2 -2
- package/lib/views/datasources/Datasources.js +1 -1
- package/lib/views/datasources/index.js +3 -3
- package/lib/views/iam/SignInSimple.js +1 -1
- package/lib/views/iam/index.js +1 -1
- package/lib/views/iam-tokens/IAMTokenEdit.js +3 -3
- package/lib/views/iam-tokens/IAMTokenNew.js +2 -2
- package/lib/views/iam-tokens/IAMTokens.js +1 -1
- package/lib/views/iam-tokens/Tokens.js +1 -1
- package/lib/views/iam-tokens/index.js +3 -3
- package/lib/views/index.js +3 -3
- package/lib/views/otel/DashboardView.js +1 -1
- package/lib/views/otel/LogsView.js +1 -1
- package/lib/views/otel/MetricsView.js +1 -1
- package/lib/views/otel/OtelHeader.js +1 -1
- package/lib/views/otel/SqlView.js +1 -1
- package/lib/views/otel/SystemView.js +1 -1
- package/lib/views/otel/TracesView.js +1 -1
- package/lib/views/otel/index.js +8 -8
- package/lib/views/otel/simpleAuthStore.js +1 -1
- package/lib/views/profile/UserBadge.js +1 -1
- package/lib/views/profile/index.js +1 -1
- package/lib/views/secrets/SecretEdit.js +3 -3
- package/lib/views/secrets/SecretNew.js +2 -2
- package/lib/views/secrets/Secrets.js +1 -1
- package/lib/views/secrets/index.js +3 -3
- package/package.json +1 -1
|
@@ -5,10 +5,10 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
*/
|
|
6
6
|
import { useCallback } from 'react';
|
|
7
7
|
import { Button, Text } from '@primer/react';
|
|
8
|
-
import { useCoreStore, useIAMStore } from '../../state';
|
|
9
|
-
import { useNavigate, useAuthorization } from '../../hooks';
|
|
10
|
-
import { FlashClosable } from '../../components/flashes';
|
|
11
|
-
import { CONTACT_ROUTE } from '../../routes';
|
|
8
|
+
import { useCoreStore, useIAMStore } from '../../state/index.js';
|
|
9
|
+
import { useNavigate, useAuthorization } from '../../hooks/index.js';
|
|
10
|
+
import { FlashClosable } from '../../components/flashes/index.js';
|
|
11
|
+
import { CONTACT_ROUTE } from '../../routes/index.js';
|
|
12
12
|
export const FlashGuest = () => {
|
|
13
13
|
const { configuration } = useCoreStore();
|
|
14
14
|
const { user, logout } = useIAMStore();
|
|
@@ -5,11 +5,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
*/
|
|
6
6
|
import { useEffect, useState } from 'react';
|
|
7
7
|
import { Text, Link } from '@primer/react';
|
|
8
|
-
import { FlashClosable } from '../../components/flashes';
|
|
8
|
+
import { FlashClosable } from '../../components/flashes/index.js';
|
|
9
9
|
import { Box } from '@datalayer/primer-addons';
|
|
10
|
-
import { useToast } from '../../hooks';
|
|
11
|
-
import { useCoreStore, useSurveysStore } from '../../state';
|
|
12
|
-
import { Survey2025_1 } from './surveys';
|
|
10
|
+
import { useToast } from '../../hooks/index.js';
|
|
11
|
+
import { useCoreStore, useSurveysStore } from '../../state/index.js';
|
|
12
|
+
import { Survey2025_1 } from './surveys/index.js';
|
|
13
13
|
export const SURVEY_2025_1_NAME = '2025-1';
|
|
14
14
|
export const FlashSurveys = (props) => {
|
|
15
15
|
const { surveyName } = props;
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
8
8
|
import { Link } from '@primer/react';
|
|
9
9
|
import { Banner } from '@primer/react/experimental';
|
|
10
10
|
import { QuestionIcon } from '@primer/octicons-react';
|
|
11
|
-
import { useNavigate } from '../../hooks';
|
|
11
|
+
import { useNavigate } from '../../hooks/index.js';
|
|
12
12
|
export const FlashUnauthorized = () => {
|
|
13
13
|
const navigate = useNavigate();
|
|
14
14
|
return (_jsx(_Fragment, { children: _jsx(Banner, { title: "Warning", variant: "warning",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from './surveys';
|
|
6
|
-
export * from './FlashClosable';
|
|
7
|
-
export * from './FlashDisclaimer';
|
|
8
|
-
export * from './FlashGuest';
|
|
9
|
-
export * from './FlashSurveys';
|
|
10
|
-
export * from './FlashUnauthorized';
|
|
5
|
+
export * from './surveys/index.js';
|
|
6
|
+
export * from './FlashClosable.js';
|
|
7
|
+
export * from './FlashDisclaimer.js';
|
|
8
|
+
export * from './FlashGuest.js';
|
|
9
|
+
export * from './FlashSurveys.js';
|
|
10
|
+
export * from './FlashUnauthorized.js';
|
|
@@ -4,9 +4,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
6
|
import { useEffect } from 'react';
|
|
7
|
-
import { CenteredSpinner } from '../../components/display';
|
|
8
|
-
import { useIAMStore } from '../../state';
|
|
9
|
-
import { useToast, useIAM } from '../../hooks';
|
|
7
|
+
import { CenteredSpinner } from '../../components/display/index.js';
|
|
8
|
+
import { useIAMStore } from '../../state/index.js';
|
|
9
|
+
import { useToast, useIAM } from '../../hooks/index.js';
|
|
10
10
|
const ExternalTokenSilentLoginRoute = (props) => {
|
|
11
11
|
const { message } = props;
|
|
12
12
|
const { loginAndNavigate } = useIAM();
|
package/lib/components/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import React, { useCallback, useRef, useState } from 'react';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { ChevronDownIcon } from '@primer/octicons-react';
|
|
9
|
-
import { useVisibilityObserver } from '../../hooks/useVisibilityObserver';
|
|
10
|
-
import { useOnClickOutside } from '../../hooks/useOnClickOutside';
|
|
11
|
-
import { useKeyboardEscape } from '../../hooks/useKeyboardEscape';
|
|
12
|
-
import { useWindowSize } from '../../hooks/useWindowSize';
|
|
9
|
+
import { useVisibilityObserver } from '../../hooks/useVisibilityObserver.js';
|
|
10
|
+
import { useOnClickOutside } from '../../hooks/useOnClickOutside.js';
|
|
11
|
+
import { useKeyboardEscape } from '../../hooks/useKeyboardEscape.js';
|
|
12
|
+
import { useWindowSize } from '../../hooks/useWindowSize.js';
|
|
13
13
|
import styles from './SubdomainNavBar.module.css';
|
|
14
14
|
export function NavigationVisbilityObserver({ children, className, ...rest }) {
|
|
15
15
|
const navRef = useRef(null);
|
|
@@ -8,11 +8,11 @@ import clsx from 'clsx';
|
|
|
8
8
|
import { SearchIcon, XIcon, LinkExternalIcon } from '@primer/octicons-react';
|
|
9
9
|
import { Button, FormControl, Text, TextInput, Label, } from '@primer/react-brand';
|
|
10
10
|
import { CircleYellowIcon } from '@datalayer/icons-react';
|
|
11
|
-
import { NavigationVisbilityObserver } from './NavigationVisbilityObserver';
|
|
12
|
-
import { useCoreStore } from '../../state';
|
|
13
|
-
import { useOnClickOutside, useFocusTrap, useKeyboardEscape, useWindowSize, useNavigate, } from '../../hooks';
|
|
14
|
-
import { useRunStore } from '../../state';
|
|
15
|
-
import { useId } from '../../hooks';
|
|
11
|
+
import { NavigationVisbilityObserver } from './NavigationVisbilityObserver.js';
|
|
12
|
+
import { useCoreStore } from '../../state/index.js';
|
|
13
|
+
import { useOnClickOutside, useFocusTrap, useKeyboardEscape, useWindowSize, useNavigate, } from '../../hooks/index.js';
|
|
14
|
+
import { useRunStore } from '../../state/index.js';
|
|
15
|
+
import { useId } from '../../hooks/index.js';
|
|
16
16
|
/**
|
|
17
17
|
* Design tokens
|
|
18
18
|
*/
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from './NavigationVisbilityObserver';
|
|
6
|
-
export * from './SubdomainNavBar';
|
|
5
|
+
export * from './NavigationVisbilityObserver.js';
|
|
6
|
+
export * from './SubdomainNavBar.js';
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from './JupyterNotebook';
|
|
6
|
-
export * from './JupyterNotebookToolbar';
|
|
5
|
+
export * from './JupyterNotebook.js';
|
|
6
|
+
export * from './JupyterNotebookToolbar.js';
|
|
@@ -7,7 +7,7 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
7
7
|
import { useInterval } from 'usehooks-ts';
|
|
8
8
|
import { ProgressBar, Tooltip, Button } from '@primer/react';
|
|
9
9
|
import { Box } from '@datalayer/primer-addons';
|
|
10
|
-
import { getConsumptionDuration, getConsumptionProgress } from './consumption';
|
|
10
|
+
import { getConsumptionDuration, getConsumptionProgress } from './consumption.js';
|
|
11
11
|
const CRITICAL_LEVEL = 90;
|
|
12
12
|
const WARNING_LEVEL = 75;
|
|
13
13
|
/**
|
|
@@ -5,8 +5,8 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useEffect } from 'react';
|
|
7
7
|
import { Box } from '@datalayer/primer-addons';
|
|
8
|
-
import { useNavigate } from '../../hooks/useNavigate';
|
|
9
|
-
import { ConsumptionBar } from './ConsumptionBar';
|
|
8
|
+
import { useNavigate } from '../../hooks/useNavigate.js';
|
|
9
|
+
import { ConsumptionBar } from './ConsumptionBar.js';
|
|
10
10
|
/**
|
|
11
11
|
* Credits indicator component.
|
|
12
12
|
*/
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from './ConsumptionBar';
|
|
6
|
-
export * from './CreditsIndicator';
|
|
7
|
-
export * from './ProgressBar';
|
|
8
|
-
export * from './ProgressRing';
|
|
9
|
-
export * from './Timer';
|
|
10
|
-
export * from './consumption';
|
|
5
|
+
export * from './ConsumptionBar.js';
|
|
6
|
+
export * from './CreditsIndicator.js';
|
|
7
|
+
export * from './ProgressBar.js';
|
|
8
|
+
export * from './ProgressRing.js';
|
|
9
|
+
export * from './Timer.js';
|
|
10
|
+
export * from './consumption.js';
|
|
@@ -8,8 +8,8 @@ import { Dialog } from '@primer/react/experimental';
|
|
|
8
8
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
9
9
|
import { JSONExt } from '@lumino/coreutils';
|
|
10
10
|
import { KernelExecutor } from '@datalayer/jupyter-react';
|
|
11
|
-
import { RuntimeSnippetsFacade } from '../../stateful/jupyter';
|
|
12
|
-
import { RuntimeCellVariables } from './RuntimeCellVariables';
|
|
11
|
+
import { RuntimeSnippetsFacade } from '../../stateful/jupyter/index.js';
|
|
12
|
+
import { RuntimeCellVariables } from './RuntimeCellVariables.js';
|
|
13
13
|
/**
|
|
14
14
|
* Dialog to define the runtime cell variables to transfer
|
|
15
15
|
*/
|
|
@@ -10,15 +10,15 @@ import { Dialog } from '@primer/react/experimental';
|
|
|
10
10
|
import { AlertIcon } from '@primer/octicons-react';
|
|
11
11
|
import { Box } from '@datalayer/primer-addons';
|
|
12
12
|
import { useJupyterReactStore } from '@datalayer/jupyter-react';
|
|
13
|
-
import { USAGE_ROUTE } from '../../routes';
|
|
14
|
-
import { useNavigate } from '../../hooks';
|
|
15
|
-
import { NO_RUNTIME_AVAILABLE_LABEL } from '../../i18n';
|
|
16
|
-
import { iamStore, useCoreStore, useIAMStore } from '../../state';
|
|
17
|
-
import { createNotebook, sleep } from '../../utils';
|
|
18
|
-
import { Markdown } from '../display';
|
|
19
|
-
import { Timer } from '../progress';
|
|
20
|
-
import { FlashClosable } from '../flashes';
|
|
21
|
-
import { RuntimeReservationControl, MAXIMAL_RUNTIME_TIME_RESERVATION_MINUTES, } from './RuntimeReservationControl';
|
|
13
|
+
import { USAGE_ROUTE } from '../../routes/index.js';
|
|
14
|
+
import { useNavigate } from '../../hooks/index.js';
|
|
15
|
+
import { NO_RUNTIME_AVAILABLE_LABEL } from '../../i18n/index.js';
|
|
16
|
+
import { iamStore, useCoreStore, useIAMStore } from '../../state/index.js';
|
|
17
|
+
import { createNotebook, sleep } from '../../utils/index.js';
|
|
18
|
+
import { Markdown } from '../display/index.js';
|
|
19
|
+
import { Timer } from '../progress/index.js';
|
|
20
|
+
import { FlashClosable } from '../flashes/index.js';
|
|
21
|
+
import { RuntimeReservationControl, MAXIMAL_RUNTIME_TIME_RESERVATION_MINUTES, } from './RuntimeReservationControl.js';
|
|
22
22
|
/**
|
|
23
23
|
* Initial time in milliseconds before retrying in case no kernels are available
|
|
24
24
|
*/
|
|
@@ -11,9 +11,9 @@ import CloudUploadIcon from '@datalayer/icons-react/data1/CloudUploadIcon';
|
|
|
11
11
|
import { Box } from '@datalayer/primer-addons';
|
|
12
12
|
import { CpuIcon } from '@primer/octicons-react';
|
|
13
13
|
import { BrowserIcon, LaptopSimpleIcon } from '@datalayer/icons-react';
|
|
14
|
-
import { CreditsIndicator } from '../../components/progress';
|
|
15
|
-
import { isRuntimeRemote } from '../../stateful/runtimes';
|
|
16
|
-
import { getGroupedRuntimeDescs } from './RuntimeUtils';
|
|
14
|
+
import { CreditsIndicator } from '../../components/progress/index.js';
|
|
15
|
+
import { isRuntimeRemote } from '../../stateful/runtimes/index.js';
|
|
16
|
+
import { getGroupedRuntimeDescs } from './RuntimeUtils.js';
|
|
17
17
|
/**
|
|
18
18
|
* Maximal runtime display name length after which it is trimmed.
|
|
19
19
|
*/
|
|
@@ -7,14 +7,14 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
7
7
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
8
8
|
import { ActionList } from '@primer/react';
|
|
9
9
|
import { CloudUploadIcon } from '@datalayer/icons-react';
|
|
10
|
-
import { useCoreStore, useIAMStore } from '../../state';
|
|
11
|
-
import { isRuntimeRemote } from '../../stateful/runtimes';
|
|
12
|
-
import { RuntimeSnippetsFacade } from '../../stateful/jupyter';
|
|
13
|
-
import { ExternalTokenSilentLogin } from '../../components/iam';
|
|
14
|
-
import { SnippetDialog } from './../snippets/SnippetDialog';
|
|
15
|
-
import { RuntimeLauncherDialog } from './RuntimeLauncherDialog';
|
|
16
|
-
import { RuntimePickerBase } from './RuntimePickerBase';
|
|
17
|
-
import { RuntimeCellVariablesDialog } from './RuntimeCellVariablesDialog';
|
|
10
|
+
import { useCoreStore, useIAMStore } from '../../state/index.js';
|
|
11
|
+
import { isRuntimeRemote } from '../../stateful/runtimes/index.js';
|
|
12
|
+
import { RuntimeSnippetsFacade } from '../../stateful/jupyter/index.js';
|
|
13
|
+
import { ExternalTokenSilentLogin } from '../../components/iam/index.js';
|
|
14
|
+
import { SnippetDialog } from './../snippets/SnippetDialog.js';
|
|
15
|
+
import { RuntimeLauncherDialog } from './RuntimeLauncherDialog.js';
|
|
16
|
+
import { RuntimePickerBase } from './RuntimePickerBase.js';
|
|
17
|
+
import { RuntimeCellVariablesDialog } from './RuntimeCellVariablesDialog.js';
|
|
18
18
|
/**
|
|
19
19
|
* Runtime picker component for a cell.
|
|
20
20
|
*/
|
|
@@ -9,12 +9,12 @@ import { Box } from '@datalayer/primer-addons';
|
|
|
9
9
|
import { AlertIcon } from '@primer/octicons-react';
|
|
10
10
|
import { JSONExt } from '@lumino/coreutils';
|
|
11
11
|
import { KernelExecutor } from '@datalayer/jupyter-react';
|
|
12
|
-
import { RuntimeSnippetsFacade } from '../../stateful/jupyter';
|
|
13
|
-
import { ExternalTokenSilentLogin } from '../../components/iam';
|
|
14
|
-
import { useCoreStore, useIAMStore } from '../../state';
|
|
15
|
-
import { RuntimeReservationControl, MAXIMAL_RUNTIME_TIME_RESERVATION_MINUTES, } from './RuntimeReservationControl';
|
|
16
|
-
import { RuntimeVariables } from './RuntimeVariables';
|
|
17
|
-
import { RuntimePickerBase } from './RuntimePickerBase';
|
|
12
|
+
import { RuntimeSnippetsFacade } from '../../stateful/jupyter/index.js';
|
|
13
|
+
import { ExternalTokenSilentLogin } from '../../components/iam/index.js';
|
|
14
|
+
import { useCoreStore, useIAMStore } from '../../state/index.js';
|
|
15
|
+
import { RuntimeReservationControl, MAXIMAL_RUNTIME_TIME_RESERVATION_MINUTES, } from './RuntimeReservationControl.js';
|
|
16
|
+
import { RuntimeVariables } from './RuntimeVariables.js';
|
|
17
|
+
import { RuntimePickerBase } from './RuntimePickerBase.js';
|
|
18
18
|
/**
|
|
19
19
|
* Runtime Picker components for a Notebook.
|
|
20
20
|
*/
|
|
@@ -10,9 +10,9 @@ import { IMarkdownParser } from '@jupyterlab/rendermime';
|
|
|
10
10
|
import { ActionList, ActionMenu, Box, Button, Tooltip } from '@primer/react';
|
|
11
11
|
import { CloudIcon, EyeIcon, UnfoldIcon } from '@primer/octicons-react';
|
|
12
12
|
import { BrowserIcon, PlusIcon } from '@datalayer/icons-react';
|
|
13
|
-
import { ArtifactIcon } from '../../components/icons';
|
|
14
|
-
import { RuntimeLauncherDialog } from '../../components/runtimes';
|
|
15
|
-
import { useRuntimesStore } from '../../state';
|
|
13
|
+
import { ArtifactIcon } from '../../components/icons/index.js';
|
|
14
|
+
import { RuntimeLauncherDialog } from '../../components/runtimes/index.js';
|
|
15
|
+
import { useRuntimesStore } from '../../state/index.js';
|
|
16
16
|
/**
|
|
17
17
|
* Cause to open the new runtime dialog.
|
|
18
18
|
*/
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from './RuntimeCellVariables';
|
|
6
|
-
export * from './RuntimeCellVariablesDialog';
|
|
7
|
-
export * from './RuntimeLauncherDialog';
|
|
8
|
-
export * from './RuntimePickerBase';
|
|
9
|
-
export * from './RuntimePickerCell';
|
|
10
|
-
export * from './RuntimePickerNotebook';
|
|
11
|
-
export * from './RuntimeReservationControl';
|
|
12
|
-
export * from './RuntimeSimplePicker';
|
|
13
|
-
export * from './RuntimeTransfer';
|
|
14
|
-
export * from './RuntimeUtils';
|
|
15
|
-
export * from './RuntimeVariables';
|
|
5
|
+
export * from './RuntimeCellVariables.js';
|
|
6
|
+
export * from './RuntimeCellVariablesDialog.js';
|
|
7
|
+
export * from './RuntimeLauncherDialog.js';
|
|
8
|
+
export * from './RuntimePickerBase.js';
|
|
9
|
+
export * from './RuntimePickerCell.js';
|
|
10
|
+
export * from './RuntimePickerNotebook.js';
|
|
11
|
+
export * from './RuntimeReservationControl.js';
|
|
12
|
+
export * from './RuntimeSimplePicker.js';
|
|
13
|
+
export * from './RuntimeTransfer.js';
|
|
14
|
+
export * from './RuntimeUtils.js';
|
|
15
|
+
export * from './RuntimeVariables.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Link, Tooltip, Button } from '@primer/react';
|
|
3
3
|
import { ScreenFullIcon } from '@primer/octicons-react';
|
|
4
|
-
import { lazyWithPreload, WithSuspense } from '../../utils';
|
|
5
|
-
import { useToast } from '../../hooks';
|
|
6
|
-
import { useLayoutStore } from '../../state';
|
|
4
|
+
import { lazyWithPreload, WithSuspense } from '../../utils/index.js';
|
|
5
|
+
import { useToast } from '../../hooks/index.js';
|
|
6
|
+
import { useLayoutStore } from '../../state/index.js';
|
|
7
7
|
const Screencapture = WithSuspense(lazyWithPreload(() => import('./Screencapture')));
|
|
8
8
|
export const ScreencaptureButton = (props) => {
|
|
9
9
|
const { enqueueToast } = useToast();
|
|
@@ -8,10 +8,10 @@ import { CameraIcon } from '@datalayer/icons-react';
|
|
|
8
8
|
import { ActionList, ActionMenu, Flash, FormControl, Select, Spinner, } from '@primer/react';
|
|
9
9
|
import { Dialog } from '@primer/react/experimental';
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
|
-
import { useToast } from '../../hooks';
|
|
12
|
-
import { createRuntimeSnapshot, getRuntimeSnapshots, loadBrowserRuntimeSnapshot, loadRuntimeSnapshot, } from '../../stateful/runtimes';
|
|
13
|
-
import { useRuntimesStore } from '../../state';
|
|
14
|
-
import { createRuntimeSnapshotName } from '../../utils';
|
|
11
|
+
import { useToast } from '../../hooks/index.js';
|
|
12
|
+
import { createRuntimeSnapshot, getRuntimeSnapshots, loadBrowserRuntimeSnapshot, loadRuntimeSnapshot, } from '../../stateful/runtimes/index.js';
|
|
13
|
+
import { useRuntimesStore } from '../../state/index.js';
|
|
14
|
+
import { createRuntimeSnapshotName } from '../../utils/index.js';
|
|
15
15
|
/**
|
|
16
16
|
* Runtime Snapshot menu component.
|
|
17
17
|
*/
|
|
@@ -8,7 +8,7 @@ import { nullTranslator } from '@jupyterlab/translation';
|
|
|
8
8
|
import { FormControl, Select, Text } from '@primer/react';
|
|
9
9
|
import { Box } from '@datalayer/primer-addons';
|
|
10
10
|
import { Dialog } from '@primer/react/experimental';
|
|
11
|
-
import { Markdown } from '../display';
|
|
11
|
+
import { Markdown } from '../display/index.js';
|
|
12
12
|
/**
|
|
13
13
|
* Dialog to inject snippet in a cell.
|
|
14
14
|
*/
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
2
6
|
/*
|
|
3
7
|
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
8
|
* Distributed under the terms of the Modified BSD License.
|
|
5
9
|
*/
|
|
6
10
|
import React, { useMemo } from 'react';
|
|
7
|
-
import { dataToPoints } from './dataProcessing';
|
|
11
|
+
import { dataToPoints } from './dataProcessing.js';
|
|
8
12
|
/**
|
|
9
13
|
* Sparklines Component
|
|
10
14
|
*
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Point } from './types';
|
|
2
|
+
export type { Point } from './types';
|
|
1
3
|
/**
|
|
2
4
|
* Get minimum value from array
|
|
3
5
|
*/
|
|
@@ -18,8 +20,4 @@ export interface DataToPointsOptions {
|
|
|
18
20
|
max?: number;
|
|
19
21
|
min?: number;
|
|
20
22
|
}
|
|
21
|
-
export interface Point {
|
|
22
|
-
x: number;
|
|
23
|
-
y: number;
|
|
24
|
-
}
|
|
25
23
|
export declare const dataToPoints: ({ data, limit, width, height, margin, max: maxVal, min: minVal, }: DataToPointsOptions) => Point[];
|
|
@@ -2,3 +2,4 @@ export { Sparklines } from './Sparklines';
|
|
|
2
2
|
export { SparklinesLine } from './SparklinesLine';
|
|
3
3
|
export type { SparklinesProps, SparklinesLineProps, Point } from './types';
|
|
4
4
|
export { dataToPoints, min, max } from './dataProcessing';
|
|
5
|
+
export type { DataToPointsOptions } from './dataProcessing';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
1
5
|
/*
|
|
2
6
|
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
7
|
* Distributed under the terms of the Modified BSD License.
|
|
4
8
|
*/
|
|
5
|
-
export { Sparklines } from './Sparklines';
|
|
6
|
-
export { SparklinesLine } from './SparklinesLine';
|
|
7
|
-
export { dataToPoints, min, max } from './dataProcessing';
|
|
9
|
+
export { Sparklines } from './Sparklines.js';
|
|
10
|
+
export { SparklinesLine } from './SparklinesLine.js';
|
|
11
|
+
export { dataToPoints, min, max } from './dataProcessing.js';
|
|
@@ -11,9 +11,9 @@ import { Box } from '@datalayer/primer-addons';
|
|
|
11
11
|
import { Blankslate, Dialog } from '@primer/react/experimental';
|
|
12
12
|
import { CounterClockWiseIcon } from '@datalayer/icons-react';
|
|
13
13
|
import { useIsMounted } from 'usehooks-ts';
|
|
14
|
-
import { useToast } from '../../hooks';
|
|
15
|
-
import { UploadIconButton } from '../buttons';
|
|
16
|
-
import { DirectoryItem, TreeItem, modelToView, } from './ContentsItems';
|
|
14
|
+
import { useToast } from '../../hooks/index.js';
|
|
15
|
+
import { UploadIconButton } from '../buttons/index.js';
|
|
16
|
+
import { DirectoryItem, TreeItem, modelToView, } from './ContentsItems.js';
|
|
17
17
|
/**
|
|
18
18
|
* The maximum upload size (in bytes) for notebook version < 5.1.0
|
|
19
19
|
*/
|
|
@@ -8,8 +8,8 @@ import { createPortal } from 'react-dom';
|
|
|
8
8
|
import { Button, ButtonGroup, Text, ThemeProvider, useWindowSize, } from '@primer/react-brand';
|
|
9
9
|
import { ChevronDownIcon, ChevronUpIcon } from '@primer/octicons-react';
|
|
10
10
|
import { default as clsx } from 'clsx';
|
|
11
|
-
import { useId } from '../../hooks';
|
|
12
|
-
import { useKeyboardEscape, useOnClickOutside, useProvidedRefOrCreate, useContainsFocus, } from '../../hooks';
|
|
11
|
+
import { useId } from '../../hooks/index.js';
|
|
12
|
+
import { useKeyboardEscape, useOnClickOutside, useProvidedRefOrCreate, useContainsFocus, } from '../../hooks/index.js';
|
|
13
13
|
/**
|
|
14
14
|
* Design tokens
|
|
15
15
|
*/
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { useEffect } from 'react';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
|
-
import { useTextRevealAnimationLines } from './useTextRevealAnimationLines';
|
|
8
|
+
import { useTextRevealAnimationLines } from './useTextRevealAnimationLines.js';
|
|
9
9
|
import styles from './TextRevealAnimation.module.css';
|
|
10
10
|
export function TextRevealAnimation({ children, ...rest }) {
|
|
11
11
|
const [animationStarted, setAnimationStarted] = React.useState(false);
|
|
@@ -8,7 +8,7 @@ import { Box } from '@datalayer/primer-addons';
|
|
|
8
8
|
import { RepoPushIcon } from '@primer/octicons-react';
|
|
9
9
|
// import { PlayIcon, StopIcon } from '@primer/octicons-react';
|
|
10
10
|
// import { notebookStore } from '@datalayer/jupyter-react';
|
|
11
|
-
import { useGradeStore } from '../../state';
|
|
11
|
+
import { useGradeStore } from '../../state/index.js';
|
|
12
12
|
export const AssignmentEditorToolbar = (props) => {
|
|
13
13
|
// const { notebookId } = props;
|
|
14
14
|
// const notebook = notebookStore.getState().selectNotebook(notebookId);
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
import { Button, Box } from '@primer/react';
|
|
7
7
|
import { RepoPushIcon } from '@primer/octicons-react';
|
|
8
|
-
import { documentStore } from '../../state';
|
|
8
|
+
import { documentStore } from '../../state/index.js';
|
|
9
9
|
export const DocumentEditorToolbar = () => {
|
|
10
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
11
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from './AssignmentEditorToolbar';
|
|
6
|
-
export * from './DocumentEditorToolbar';
|
|
7
|
-
export * from './NotebookEditorToolbar';
|
|
5
|
+
export * from './AssignmentEditorToolbar.js';
|
|
6
|
+
export * from './DocumentEditorToolbar.js';
|
|
7
|
+
export * from './NotebookEditorToolbar.js';
|