@datalayer/core 0.0.25 → 0.0.27
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 +11 -11
- package/lib/api/index.d.ts +1 -1
- package/lib/api/index.js +1 -1
- package/lib/api/spacer/agentSpaces.d.ts +193 -0
- package/lib/api/spacer/agentSpaces.js +127 -0
- package/lib/api/spacer/index.d.ts +2 -1
- package/lib/api/spacer/index.js +2 -1
- package/lib/api/utils/validation.d.ts +1 -1
- package/lib/api/utils/validation.js +1 -1
- package/lib/client/auth/AuthenticationManager.d.ts +2 -2
- package/lib/client/auth/AuthenticationManager.js +2 -2
- package/lib/client/auth/index.d.ts +1 -1
- package/lib/client/auth/index.js +1 -1
- package/lib/client/auth/types.d.ts +1 -1
- package/lib/client/auth/types.js +1 -1
- package/lib/client/base.d.ts +9 -9
- package/lib/client/base.js +3 -3
- package/lib/client/constants.d.ts +2 -2
- package/lib/client/constants.js +2 -2
- package/lib/client/index.d.ts +2 -2
- package/lib/client/mixins/IAMMixin.js +1 -1
- package/lib/client/utils/spacerUtils.d.ts +1 -1
- package/lib/client/utils/spacerUtils.js +1 -1
- package/lib/components/auth/Login.d.ts +4 -0
- package/lib/components/auth/Login.js +8 -2
- package/lib/components/auth/Login.stories.d.ts +1 -0
- package/lib/components/progress/ConsumptionBar.js +26 -8
- package/lib/components/progress/CreditsIndicator.d.ts +7 -1
- package/lib/components/progress/CreditsIndicator.js +4 -2
- package/lib/components/{screenshot/ScreenCapture.d.ts → screencapture/Screencapture.d.ts} +5 -5
- package/lib/components/{screenshot/ScreenCapture.js → screencapture/Screencapture.js} +2 -2
- package/lib/components/screencapture/ScreencaptureButton.d.ts +3 -0
- package/lib/components/{screenshot/ScreenCaptureButton.js → screencapture/ScreencaptureButton.js} +8 -8
- package/lib/components/screencapture/index.d.ts +2 -0
- package/lib/components/{screenshot → screencapture}/index.js +2 -2
- package/lib/hooks/index.d.ts +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/layouts/{LayoutScreenshot.css → LayoutScreencapture.css} +2 -2
- package/lib/hooks/layouts/LayoutScreencapture.d.ts +3 -0
- package/lib/hooks/layouts/{LayoutScreenshot.js → LayoutScreencapture.js} +14 -14
- package/lib/hooks/layouts/index.d.ts +1 -1
- package/lib/hooks/layouts/index.js +1 -1
- package/lib/hooks/useCache.d.ts +91 -1
- package/lib/hooks/useCache.js +523 -59
- package/lib/hooks/useCellOutputshot.js +2 -2
- package/lib/hooks/useScreencapture.d.ts +18 -0
- package/lib/hooks/useScreencapture.js +53 -0
- package/lib/index.d.ts +1 -1
- package/lib/models/CreditsDTO.js +1 -1
- package/lib/models/Datasource.d.ts +2 -2
- package/lib/models/Datasource.js +2 -2
- package/lib/models/EnvironmentDTO.d.ts +3 -3
- package/lib/models/EnvironmentDTO.js +2 -2
- package/lib/models/HealthCheck.d.ts +1 -1
- package/lib/models/HealthCheck.js +1 -1
- package/lib/models/IAMProviderUsers.d.ts +11 -0
- package/lib/models/IAMProvidersSpecs.d.ts +2 -1
- package/lib/models/IAMProvidersSpecs.js +14 -0
- package/lib/models/ItemDTO.d.ts +2 -2
- package/lib/models/ItemDTO.js +2 -2
- package/lib/models/LexicalDTO.d.ts +2 -2
- package/lib/models/LexicalDTO.js +2 -2
- package/lib/models/NotebookDTO.d.ts +2 -2
- package/lib/models/NotebookDTO.js +1 -1
- package/lib/models/Page.js +1 -1
- package/lib/models/PageTag.d.ts +1 -1
- package/lib/models/PageTag.js +21 -0
- package/lib/models/RuntimeDTO.d.ts +2 -2
- package/lib/models/RuntimeDTO.js +2 -2
- package/lib/models/RuntimeSnapshotDTO.d.ts +3 -3
- package/lib/models/RuntimeSnapshotDTO.js +1 -1
- package/lib/models/Secret.d.ts +3 -3
- package/lib/models/Secret.js +2 -2
- package/lib/models/SpaceDTO.d.ts +2 -2
- package/lib/models/SpaceDTO.js +3 -3
- package/lib/models/UserDTO.d.ts +2 -2
- package/lib/models/UserDTO.js +1 -1
- package/lib/models/index.d.ts +1 -1
- package/lib/models/index.js +1 -1
- package/lib/state/substates/CoreState.js +1 -1
- package/lib/state/substates/LayoutState.d.ts +5 -5
- package/lib/state/substates/LayoutState.js +3 -3
- package/lib/theme/DatalayerThemeProvider.d.ts +22 -2
- package/lib/theme/DatalayerThemeProvider.js +17 -9
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +1 -0
- package/lib/theme/useSystemColorMode.d.ts +9 -0
- package/lib/theme/useSystemColorMode.js +26 -0
- package/lib/utils/Screencapture.d.ts +1 -0
- package/lib/utils/{Screenshot.js → Screencapture.js} +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/views/datasources/DatasourceNew.d.ts +7 -1
- package/lib/views/datasources/DatasourceNew.js +3 -3
- package/lib/views/datasources/Datasources.d.ts +7 -1
- package/lib/views/datasources/Datasources.js +6 -4
- package/lib/views/iam-tokens/IAMTokenNew.d.ts +5 -1
- package/lib/views/iam-tokens/IAMTokenNew.js +2 -2
- package/lib/views/iam-tokens/IAMTokens.d.ts +7 -1
- package/lib/views/iam-tokens/IAMTokens.js +6 -4
- package/package.json +1 -1
- package/style/screencapture/index.css +58 -0
- package/lib/components/screenshot/ScreenCaptureButton.d.ts +0 -3
- package/lib/components/screenshot/index.d.ts +0 -2
- package/lib/hooks/layouts/LayoutScreenshot.d.ts +0 -3
- package/lib/hooks/useCache0.d.ts +0 -312
- package/lib/hooks/useCache0.js +0 -3189
- package/lib/hooks/useScreenshot.d.ts +0 -18
- package/lib/hooks/useScreenshot.js +0 -53
- package/lib/utils/Screenshot.d.ts +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Fragment as _Fragment, 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 { createContext, useState, useContext } from 'react';
|
|
7
|
+
import { LayoutScreencapture } from './layouts';
|
|
8
|
+
export const ScreencaptureContext = createContext({
|
|
9
|
+
closeScreencapture: () => { },
|
|
10
|
+
displayScreencapture: (nextScreencapture) => { },
|
|
11
|
+
});
|
|
12
|
+
export function useScreencapture() {
|
|
13
|
+
const context = useContext(ScreencaptureContext);
|
|
14
|
+
if (!context)
|
|
15
|
+
throw new Error('useContext must be inside a provider with a value.');
|
|
16
|
+
return context;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The type for the Screencapture context provider.
|
|
20
|
+
*/
|
|
21
|
+
export const ScreencaptureContextProvider = ScreencaptureContext.Provider;
|
|
22
|
+
export function ScreencaptureProvider({ children = null, zIndex = 9999, disableDarken = false, screenshotSurface = undefined, }) {
|
|
23
|
+
const defaultScreencaptureSurface = {
|
|
24
|
+
position: 'fixed',
|
|
25
|
+
top: 0,
|
|
26
|
+
left: 0,
|
|
27
|
+
width: '100%',
|
|
28
|
+
height: '100%',
|
|
29
|
+
display: 'flex',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
backgroundColor: disableDarken ? 'initial' : 'rgba(0, 0, 0, 0.5)',
|
|
33
|
+
zIndex,
|
|
34
|
+
};
|
|
35
|
+
const [screenshot, setScreencapture] = useState({
|
|
36
|
+
open: false,
|
|
37
|
+
render: (closeScreencapture) => _jsx(_Fragment, {}),
|
|
38
|
+
});
|
|
39
|
+
const displayScreencapture = (nextScreencapture) => {
|
|
40
|
+
setScreencapture({
|
|
41
|
+
open: true,
|
|
42
|
+
render: nextScreencapture,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const closeScreencapture = () => {
|
|
46
|
+
setScreencapture({
|
|
47
|
+
open: false,
|
|
48
|
+
render: (closeScreencapture) => _jsx(_Fragment, {}),
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return (_jsxs(ScreencaptureContextProvider, { value: { closeScreencapture, displayScreencapture }, children: [_jsx(LayoutScreencapture, {}), children, screenshot.open &&
|
|
52
|
+
(screenshotSurface ? (screenshotSurface(screenshot.render(closeScreencapture))) : (_jsx("div", { style: defaultScreencaptureSurface, children: screenshot.render(closeScreencapture) })))] }));
|
|
53
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export { API_BASE_PATHS } from './api/constants';
|
|
|
12
12
|
export * as runtimesApi from './api/runtimes';
|
|
13
13
|
export * as iamApi from './api/iam';
|
|
14
14
|
export * as spacerApi from './api/spacer';
|
|
15
|
-
export { DatalayerClient, type DatalayerClientConfig, type
|
|
15
|
+
export { DatalayerClient, type DatalayerClientConfig, type ClientHandlers, User, Runtime, Environment, Snapshot, Space, Notebook, LexicalDTO, Secret, Credits, Item, type RuntimeJSON, type EnvironmentJSON, type UserJSON, type RuntimeData, type EnvironmentData, type UserData, type SpaceData, type SpaceItem, type NotebookData, type LexicalData, type RuntimeSnapshotData, type CreditsInfo, type CreditReservation, type CreateRuntimeRequest, type CreateRuntimeResponse, type ListRuntimesResponse, type ListEnvironmentsResponse, type CreateRuntimeSnapshotRequest, type CreateRuntimeSnapshotResponse, type GetRuntimeSnapshotResponse, type ListRuntimeSnapshotsResponse, type CreateSpaceRequest, type CreateSpaceResponse, type SpacesForUserResponse, type CollaborationSessionResponse, type DeleteSpaceItemResponse, type GetSpaceItemResponse, type GetSpaceItemsResponse, type CreateNotebookRequest, type CreateNotebookResponse, type GetNotebookResponse, type UpdateNotebookRequest, type UpdateNotebookResponse, type CreateLexicalRequest, type CreateLexicalResponse, type GetLexicalResponse, type UpdateLexicalRequest, type UpdateLexicalResponse, type CreditsResponse, type CreateDatasourceResponse, type GetDatasourceResponse, type ListDatasourcesResponse, type UpdateDatasourceResponse, type CreateSecretRequest, type CreateSecretResponse, type GetSecretResponse, type ListSecretsResponse, type UpdateSecretRequest, type UpdateSecretResponse, type SpaceJSON, type NotebookJSON, type LexicalJSON, type RuntimeSnapshotJSON, HealthCheck, type HealthCheckJSON, type LoginRequest, type LoginResponse, type UserMeResponse, type MembershipsResponse, type WhoAmIResponse, type HealthzPingResponse, AuthenticationManager, type IUser, type IBaseUser, type ICell, type IDatasource, type IDatasourceVariant, type ICredits, type ICreditsReservation, type ISpaceItem, type ISurvey, type ISpace, type IBaseSpace, type IAnySpace, type ISpaceVariant, type IBaseTeam, type IAnyTeam, type IOrganization, type IAnyOrganization, type IBaseOrganization, type IRuntimeModel, type IRuntimePod, type IRuntimeType, type IRuntimeLocation, type IRuntimeCapabilities, type IRuntimeSnapshot, type IDatalayerEnvironment, type IResources, type ISnippet, type IRole, type IAssignment, type IContact, type ICourse, type IOrganizationMember, type IPage, type PageTagName, type PageTheme, type PageVariant, type ISecret, type ISecretVariant, type SecretData, type SecretJSON, type DatasourceData, type DatasourceJSON, type DatasourceType, type CreateDatasourceRequest, type UpdateDatasourceRequest, Datasource, type IIAMToken, type IIAMTokenVariant, type IDocument, type IBaseDocument, type IEnvironment, type IExercise, type ICode, type IHelp, type IInvite, type ILesson, type INotebook, type IBaseNotebook, type ISchool, type ITeam, type TeamMember, type IUserOnboarding, type IClient, type IOnboardingPosition, type IOnboardingTours, type ITour, type ITourStatus, type IUserSettings, type IDataset, type IUsage, type IItem, type IItemType, type Member, type Profile, type SpaceMember, type IContactEvent, type IContactIAMProvider, type IStudentItem, type Instructor, type IStudent, type IDean, type IUserEvent, type IIAMProviderLinked, type IContent, type AuthResult, type TokenValidationResult, type AuthOptions, type TokenStorage, type IRuntimeOptions, type IMultiServiceManager, type IRemoteServicesManager, type IEnvironmentsManager, type IRemoteRuntimesManager, type NavigationLinkProps, type IDatalayerCoreConfig, type IRuntimesConfiguration, type IIAMProviderName, } from './client';
|
|
16
16
|
export { getEnvironments, createRuntime, getRuntimes, deleteRuntime, snapshotRuntime, getRuntimeSnapshots, loadRuntimeSnapshot, } from './stateful/runtimes/actions';
|
package/lib/models/CreditsDTO.js
CHANGED
|
@@ -121,7 +121,7 @@ export interface UpdateDatasourceResponse {
|
|
|
121
121
|
datasource: DatasourceData;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* Datasource domain model for the Datalayer
|
|
124
|
+
* Datasource domain model for the Datalayer Client.
|
|
125
125
|
* Provides state management and operations for datasources.
|
|
126
126
|
*
|
|
127
127
|
* @example
|
|
@@ -146,7 +146,7 @@ export declare class DatasourceDTO {
|
|
|
146
146
|
/**
|
|
147
147
|
* Create a Datasource instance.
|
|
148
148
|
* @param data - Datasource data from API
|
|
149
|
-
* @param sdk -
|
|
149
|
+
* @param sdk - Client instance
|
|
150
150
|
*/
|
|
151
151
|
constructor(data: DatasourceData, sdk: DatalayerClient);
|
|
152
152
|
private _checkDeleted;
|
package/lib/models/Datasource.js
CHANGED
|
@@ -20,7 +20,7 @@ export const asDatasource = (s) => {
|
|
|
20
20
|
// ============================================================================
|
|
21
21
|
import { validateJSON } from '../api/utils/validation';
|
|
22
22
|
/**
|
|
23
|
-
* Datasource domain model for the Datalayer
|
|
23
|
+
* Datasource domain model for the Datalayer Client.
|
|
24
24
|
* Provides state management and operations for datasources.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
@@ -45,7 +45,7 @@ export class DatasourceDTO {
|
|
|
45
45
|
/**
|
|
46
46
|
* Create a Datasource instance.
|
|
47
47
|
* @param data - Datasource data from API
|
|
48
|
-
* @param sdk -
|
|
48
|
+
* @param sdk - Client instance
|
|
49
49
|
*/
|
|
50
50
|
constructor(data, sdk) {
|
|
51
51
|
this._data = data;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Environment domain model for the Datalayer
|
|
2
|
+
* Environment domain model for the Datalayer Client.
|
|
3
3
|
*
|
|
4
4
|
* @module models/EnvironmentDTO
|
|
5
5
|
*/
|
|
@@ -47,7 +47,7 @@ export interface EnvironmentData {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Stable public interface for Environment data.
|
|
50
|
-
* This is the contract that
|
|
50
|
+
* This is the contract that Client consumers can rely on.
|
|
51
51
|
* The raw API may change, but this interface remains stable.
|
|
52
52
|
*/
|
|
53
53
|
export interface EnvironmentJSON {
|
|
@@ -92,7 +92,7 @@ export declare class EnvironmentDTO {
|
|
|
92
92
|
* Create an Environment instance.
|
|
93
93
|
*
|
|
94
94
|
* @param data - Environment data from API
|
|
95
|
-
* @param _sdk -
|
|
95
|
+
* @param _sdk - Client instance (not currently used but kept for consistency)
|
|
96
96
|
*/
|
|
97
97
|
constructor(data: EnvironmentData, _sdk: DatalayerClient);
|
|
98
98
|
/** Human-readable title for the environment (e.g., 'AI Environment', 'Python CPU Environment'). */
|
|
@@ -21,11 +21,11 @@ export class EnvironmentDTO {
|
|
|
21
21
|
* Create an Environment instance.
|
|
22
22
|
*
|
|
23
23
|
* @param data - Environment data from API
|
|
24
|
-
* @param _sdk -
|
|
24
|
+
* @param _sdk - Client instance (not currently used but kept for consistency)
|
|
25
25
|
*/
|
|
26
26
|
constructor(data, _sdk) {
|
|
27
27
|
this._data = data;
|
|
28
|
-
//
|
|
28
|
+
// Client instance not currently used but kept for future extensibility
|
|
29
29
|
}
|
|
30
30
|
// ========================================================================
|
|
31
31
|
// Properties
|
|
@@ -11,7 +11,7 @@ export declare class HealthCheck {
|
|
|
11
11
|
/**
|
|
12
12
|
* Create a HealthCheck instance.
|
|
13
13
|
* @param data - The health check data
|
|
14
|
-
* @param sdk - Reference to the
|
|
14
|
+
* @param sdk - Reference to the Client instance (unused but kept for consistency)
|
|
15
15
|
*/
|
|
16
16
|
constructor(data: any, sdk: any);
|
|
17
17
|
/**
|
|
@@ -17,7 +17,7 @@ export class HealthCheck {
|
|
|
17
17
|
/**
|
|
18
18
|
* Create a HealthCheck instance.
|
|
19
19
|
* @param data - The health check data
|
|
20
|
-
* @param sdk - Reference to the
|
|
20
|
+
* @param sdk - Reference to the Client instance (unused but kept for consistency)
|
|
21
21
|
*/
|
|
22
22
|
constructor(data, sdk) {
|
|
23
23
|
// Initialize properties
|
|
@@ -24,6 +24,17 @@ export type ILinkedInUser = {
|
|
|
24
24
|
picture: string;
|
|
25
25
|
getUrn(): string;
|
|
26
26
|
};
|
|
27
|
+
export type IGoogleUser = {
|
|
28
|
+
iamProvider: IIAMProviderName;
|
|
29
|
+
sub: string;
|
|
30
|
+
email_verified: boolean;
|
|
31
|
+
name: string;
|
|
32
|
+
given_name: string;
|
|
33
|
+
family_name: string;
|
|
34
|
+
email: string;
|
|
35
|
+
picture: string;
|
|
36
|
+
locale: string;
|
|
37
|
+
};
|
|
27
38
|
export type IXUser = {
|
|
28
39
|
iamProvider: IIAMProviderName;
|
|
29
40
|
sub: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IUser } from './User';
|
|
2
|
-
export type IIAMProviderName = 'bluesky' | 'discord' | 'github' | 'linkedin' | 'okta' | 'x';
|
|
2
|
+
export type IIAMProviderName = 'bluesky' | 'discord' | 'github' | 'google' | 'linkedin' | 'okta' | 'x';
|
|
3
3
|
export type IIAMProviderSpec = {
|
|
4
4
|
name: IIAMProviderName;
|
|
5
5
|
oauth2CallbackServerRoute: string;
|
|
@@ -16,6 +16,7 @@ export declare class IAMProvidersSpecs {
|
|
|
16
16
|
static getProvider(providerIAMProvidersType: any): IIAMProviderSpec;
|
|
17
17
|
static readonly Bluesky: IIAMProviderSpec;
|
|
18
18
|
static readonly GitHub: IIAMProviderSpec;
|
|
19
|
+
static readonly Google: IIAMProviderSpec;
|
|
19
20
|
static readonly LinkedIn: IIAMProviderSpec;
|
|
20
21
|
static readonly Okta: IIAMProviderSpec;
|
|
21
22
|
}
|
|
@@ -12,6 +12,9 @@ export class IAMProvidersSpecs {
|
|
|
12
12
|
case 'github': {
|
|
13
13
|
return this.GitHub;
|
|
14
14
|
}
|
|
15
|
+
case 'google': {
|
|
16
|
+
return this.Google;
|
|
17
|
+
}
|
|
15
18
|
case 'linkedin': {
|
|
16
19
|
return this.LinkedIn;
|
|
17
20
|
}
|
|
@@ -46,6 +49,17 @@ export class IAMProvidersSpecs {
|
|
|
46
49
|
postShareURL: '',
|
|
47
50
|
registerUploadURL: '',
|
|
48
51
|
};
|
|
52
|
+
static Google = {
|
|
53
|
+
name: 'google',
|
|
54
|
+
oauth2CallbackServerRoute: 'jupyter_iam/oauth2/callback',
|
|
55
|
+
oauth2CallbackUIRoute: '/iam/oauth2/google/callback',
|
|
56
|
+
accessTokenCookieName: (user) => `__datalayer__google_access_token_${user.id}`,
|
|
57
|
+
refreshTokenCookieName: '__datalayer__google_refresh_token',
|
|
58
|
+
userInfoURL: 'https://openidconnect.googleapis.com/v1/userinfo',
|
|
59
|
+
tokenRefreshURL: 'https://oauth2.googleapis.com/token',
|
|
60
|
+
postShareURL: '',
|
|
61
|
+
registerUploadURL: '',
|
|
62
|
+
};
|
|
49
63
|
static LinkedIn = {
|
|
50
64
|
name: 'linkedin',
|
|
51
65
|
oauth2CallbackServerRoute: 'jupyter_iam/oauth2/callback',
|
package/lib/models/ItemDTO.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare abstract class ItemDTO<TData> {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create an Item instance.
|
|
20
20
|
* @param data - Item data from API
|
|
21
|
-
* @param sdk -
|
|
21
|
+
* @param sdk - Client instance
|
|
22
22
|
*/
|
|
23
23
|
constructor(data: TData, sdk: DatalayerClient);
|
|
24
24
|
/** Check if this item has been deleted. */
|
|
@@ -65,7 +65,7 @@ export declare abstract class ItemDTO<TData> {
|
|
|
65
65
|
abstract toJSON(): any;
|
|
66
66
|
/** String representation of the item. */
|
|
67
67
|
toString(): string;
|
|
68
|
-
/** Get
|
|
68
|
+
/** Get Client token for API calls. */
|
|
69
69
|
protected _getToken(): string;
|
|
70
70
|
/** Get spacer API URL for API calls. */
|
|
71
71
|
protected _getSpacerRunUrl(): string;
|
package/lib/models/ItemDTO.js
CHANGED
|
@@ -17,7 +17,7 @@ export class ItemDTO {
|
|
|
17
17
|
/**
|
|
18
18
|
* Create an Item instance.
|
|
19
19
|
* @param data - Item data from API
|
|
20
|
-
* @param sdk -
|
|
20
|
+
* @param sdk - Client instance
|
|
21
21
|
*/
|
|
22
22
|
constructor(data, sdk) {
|
|
23
23
|
this._data = data;
|
|
@@ -171,7 +171,7 @@ export class ItemDTO {
|
|
|
171
171
|
// ========================================================================
|
|
172
172
|
// Protected Helper Methods
|
|
173
173
|
// ========================================================================
|
|
174
|
-
/** Get
|
|
174
|
+
/** Get Client token for API calls. */
|
|
175
175
|
_getToken() {
|
|
176
176
|
return this._sdk.getToken();
|
|
177
177
|
}
|
|
@@ -80,7 +80,7 @@ export interface UpdateLexicalResponse {
|
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
82
|
* Stable public interface for Lexical data.
|
|
83
|
-
* This is the contract that
|
|
83
|
+
* This is the contract that Client consumers can rely on.
|
|
84
84
|
* The raw API may change, but this interface remains stable.
|
|
85
85
|
*/
|
|
86
86
|
export interface LexicalJSON {
|
|
@@ -118,7 +118,7 @@ export declare class LexicalDTO extends ItemDTO<LexicalData> {
|
|
|
118
118
|
* Create a Lexical instance.
|
|
119
119
|
*
|
|
120
120
|
* @param data - Lexical data from API
|
|
121
|
-
* @param sdk -
|
|
121
|
+
* @param sdk - Client instance
|
|
122
122
|
*/
|
|
123
123
|
constructor(data: LexicalData, sdk: DatalayerClient);
|
|
124
124
|
/** Document type identifier. */
|
package/lib/models/LexicalDTO.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Lexical domain model for the Datalayer
|
|
6
|
+
* Lexical domain model for the Datalayer Client.
|
|
7
7
|
*
|
|
8
8
|
* @module models/LexicalDTO
|
|
9
9
|
*/
|
|
@@ -26,7 +26,7 @@ export class LexicalDTO extends ItemDTO {
|
|
|
26
26
|
* Create a Lexical instance.
|
|
27
27
|
*
|
|
28
28
|
* @param data - Lexical data from API
|
|
29
|
-
* @param sdk -
|
|
29
|
+
* @param sdk - Client instance
|
|
30
30
|
*/
|
|
31
31
|
constructor(data, sdk) {
|
|
32
32
|
super(data, sdk);
|
|
@@ -17,7 +17,7 @@ export interface NotebookData {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Stable public interface for Notebook data.
|
|
20
|
-
* This is the contract that
|
|
20
|
+
* This is the contract that Client consumers can rely on.
|
|
21
21
|
* The raw API may change, but this interface remains stable.
|
|
22
22
|
*/
|
|
23
23
|
export interface NotebookJSON {
|
|
@@ -51,7 +51,7 @@ export declare class NotebookDTO extends ItemDTO<NotebookData> {
|
|
|
51
51
|
* Create a Notebook instance.
|
|
52
52
|
*
|
|
53
53
|
* @param data - Notebook data from API
|
|
54
|
-
* @param sdk -
|
|
54
|
+
* @param sdk - Client instance
|
|
55
55
|
*/
|
|
56
56
|
constructor(data: NotebookData, sdk: DatalayerClient);
|
|
57
57
|
/** Document type identifier. */
|
package/lib/models/Page.js
CHANGED
|
@@ -13,7 +13,7 @@ export const asPage = (s) => {
|
|
|
13
13
|
description: s.description_t,
|
|
14
14
|
theme: s.theme_s,
|
|
15
15
|
nbformat: s.nbformat_s ? JSON.parse(s.nbformat_s) : undefined,
|
|
16
|
-
screenCapture: s.screen_capture_s,
|
|
16
|
+
screenCapture: s.screen_capture_cdn_url_s || s.screen_capture_s,
|
|
17
17
|
tags: s.tags_ss ?? [],
|
|
18
18
|
creator: s.creator ? asUser(s.creator) : undefined,
|
|
19
19
|
creatorId: s.creator_uid,
|
package/lib/models/PageTag.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ type CardIconColorsType = (typeof CardIconColors)[number];
|
|
|
4
4
|
export type PageTagMetadata = {
|
|
5
5
|
fillColor: React.CSSProperties['backgroundColor'];
|
|
6
6
|
};
|
|
7
|
-
export type PageTagName = 'ai' | 'deep-learning' | 'example' | 'llm' | 'python' | 'pytorch' | 'spatial' | 'tutorial';
|
|
7
|
+
export type PageTagName = 'agent' | 'ai' | 'ai-agent' | 'deep-learning' | 'example' | 'llm' | 'notebook' | 'python' | 'pytorch' | 'spatial' | 'tutorial';
|
|
8
8
|
export type PageTag = {
|
|
9
9
|
id: string;
|
|
10
10
|
text?: PageTagName;
|
package/lib/models/PageTag.js
CHANGED
|
@@ -9,12 +9,24 @@ export const PAGE_TAGE_NONE = {
|
|
|
9
9
|
Icon: CopilotIcon,
|
|
10
10
|
color: 'pink',
|
|
11
11
|
};
|
|
12
|
+
const PAGE_TAGE_AGENT = {
|
|
13
|
+
id: '9',
|
|
14
|
+
text: 'agent',
|
|
15
|
+
Icon: CopilotIcon,
|
|
16
|
+
color: 'teal',
|
|
17
|
+
};
|
|
12
18
|
const PAGE_TAGE_AI = {
|
|
13
19
|
id: '1',
|
|
14
20
|
text: 'ai',
|
|
15
21
|
Icon: CopilotIcon,
|
|
16
22
|
color: 'pink',
|
|
17
23
|
};
|
|
24
|
+
const PAGE_TAGE_AI_AGENT = {
|
|
25
|
+
id: '10',
|
|
26
|
+
text: 'ai-agent',
|
|
27
|
+
Icon: CopilotIcon,
|
|
28
|
+
color: 'purple',
|
|
29
|
+
};
|
|
18
30
|
const PAGE_TAGE_DEEP_LEARNING = {
|
|
19
31
|
id: '2',
|
|
20
32
|
text: 'deep-learning',
|
|
@@ -33,6 +45,12 @@ const PAGE_TAGE_LLM = {
|
|
|
33
45
|
Icon: CopilotIcon,
|
|
34
46
|
color: 'coral',
|
|
35
47
|
};
|
|
48
|
+
const PAGE_TAGE_NOTEBOOK = {
|
|
49
|
+
id: '11',
|
|
50
|
+
text: 'notebook',
|
|
51
|
+
Icon: CopilotIcon,
|
|
52
|
+
color: 'blue',
|
|
53
|
+
};
|
|
36
54
|
const PAGE_TAGE_PYTHON = {
|
|
37
55
|
id: '5',
|
|
38
56
|
text: 'python',
|
|
@@ -60,10 +78,13 @@ const PAGE_TAGE_TUTORIAL = {
|
|
|
60
78
|
metadata: { fillColor: 'yellow' },
|
|
61
79
|
};
|
|
62
80
|
export const PAGE_TAGS = [
|
|
81
|
+
PAGE_TAGE_AGENT,
|
|
63
82
|
PAGE_TAGE_AI,
|
|
83
|
+
PAGE_TAGE_AI_AGENT,
|
|
64
84
|
PAGE_TAGE_DEEP_LEARNING,
|
|
65
85
|
PAGE_TAGE_EXAMPLE,
|
|
66
86
|
PAGE_TAGE_LLM,
|
|
87
|
+
PAGE_TAGE_NOTEBOOK,
|
|
67
88
|
PAGE_TAGE_PYTHON,
|
|
68
89
|
PAGE_TAGE_PYTORCH,
|
|
69
90
|
PAGE_TAGE_SPATIAL,
|
|
@@ -30,7 +30,7 @@ export interface RuntimeData {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Stable public interface for Runtime data.
|
|
33
|
-
* This is the contract that
|
|
33
|
+
* This is the contract that Client consumers can rely on.
|
|
34
34
|
* The raw API may change, but this interface remains stable.
|
|
35
35
|
*/
|
|
36
36
|
export interface RuntimeJSON {
|
|
@@ -118,7 +118,7 @@ export declare class RuntimeDTO {
|
|
|
118
118
|
* Create a Runtime instance.
|
|
119
119
|
*
|
|
120
120
|
* @param data - Runtime data from API
|
|
121
|
-
* @param sdk -
|
|
121
|
+
* @param sdk - Client instance
|
|
122
122
|
*/
|
|
123
123
|
constructor(data: RuntimeData, sdk: DatalayerClient);
|
|
124
124
|
/**
|
package/lib/models/RuntimeDTO.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Runtime domain model for the Datalayer
|
|
6
|
+
* Runtime domain model for the Datalayer Client.
|
|
7
7
|
*
|
|
8
8
|
* @module models/RuntimeDTO
|
|
9
9
|
*/
|
|
@@ -28,7 +28,7 @@ export class RuntimeDTO {
|
|
|
28
28
|
* Create a Runtime instance.
|
|
29
29
|
*
|
|
30
30
|
* @param data - Runtime data from API
|
|
31
|
-
* @param sdk -
|
|
31
|
+
* @param sdk - Client instance
|
|
32
32
|
*/
|
|
33
33
|
constructor(data, sdk) {
|
|
34
34
|
this._data = data;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Snapshot domain model for the Datalayer
|
|
2
|
+
* Snapshot domain model for the Datalayer Client.
|
|
3
3
|
*
|
|
4
4
|
* @module models/RuntimeSnapshotDTO
|
|
5
5
|
*/
|
|
@@ -39,7 +39,7 @@ export interface RuntimeSnapshotData {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Stable public interface for Snapshot data.
|
|
42
|
-
* This is the contract that
|
|
42
|
+
* This is the contract that Client consumers can rely on.
|
|
43
43
|
* The raw API may change, but this interface remains stable.
|
|
44
44
|
*/
|
|
45
45
|
export interface RuntimeSnapshotJSON {
|
|
@@ -122,7 +122,7 @@ export declare class RuntimeSnapshotDTO {
|
|
|
122
122
|
* Create a Runtime Snapshot instance.
|
|
123
123
|
*
|
|
124
124
|
* @param data - Snapshot data from API
|
|
125
|
-
* @param sdk -
|
|
125
|
+
* @param sdk - Client instance
|
|
126
126
|
*/
|
|
127
127
|
constructor(data: RuntimeSnapshotData, sdk: DatalayerClient);
|
|
128
128
|
/**
|
package/lib/models/Secret.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface CreateSecretRequest {
|
|
|
50
50
|
name: string;
|
|
51
51
|
/** Human-readable description */
|
|
52
52
|
description?: string;
|
|
53
|
-
/** Plain text value (will be Base64 encoded by
|
|
53
|
+
/** Plain text value (will be Base64 encoded by Client) */
|
|
54
54
|
value: string;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
@@ -111,7 +111,7 @@ export interface DeleteSecretResponse {
|
|
|
111
111
|
message: string;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* Secret domain model for the Datalayer
|
|
114
|
+
* Secret domain model for the Datalayer Client.
|
|
115
115
|
* Provides state management and operations for user secrets.
|
|
116
116
|
*
|
|
117
117
|
* @example
|
|
@@ -136,7 +136,7 @@ export declare class SecretDTO {
|
|
|
136
136
|
/**
|
|
137
137
|
* Create a Secret instance.
|
|
138
138
|
* @param data - Secret data from API
|
|
139
|
-
* @param sdk -
|
|
139
|
+
* @param sdk - Client instance
|
|
140
140
|
*/
|
|
141
141
|
constructor(data: SecretData, sdk: DatalayerClient);
|
|
142
142
|
private _checkDeleted;
|
package/lib/models/Secret.js
CHANGED
|
@@ -16,7 +16,7 @@ export const asSecret = (s) => {
|
|
|
16
16
|
// ============================================================================
|
|
17
17
|
import { validateJSON } from '../api/utils/validation';
|
|
18
18
|
/**
|
|
19
|
-
* Secret domain model for the Datalayer
|
|
19
|
+
* Secret domain model for the Datalayer Client.
|
|
20
20
|
* Provides state management and operations for user secrets.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
@@ -41,7 +41,7 @@ export class SecretDTO {
|
|
|
41
41
|
/**
|
|
42
42
|
* Create a Secret instance.
|
|
43
43
|
* @param data - Secret data from API
|
|
44
|
-
* @param sdk -
|
|
44
|
+
* @param sdk - Client instance
|
|
45
45
|
*/
|
|
46
46
|
constructor(data, sdk) {
|
|
47
47
|
this._data = data;
|
package/lib/models/SpaceDTO.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface SpaceData {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Stable public interface for Space data.
|
|
21
|
-
* This is the contract that
|
|
21
|
+
* This is the contract that Client consumers can rely on.
|
|
22
22
|
* The raw API may change, but this interface remains stable.
|
|
23
23
|
*/
|
|
24
24
|
export interface SpaceJSON {
|
|
@@ -55,7 +55,7 @@ export declare class SpaceDTO {
|
|
|
55
55
|
* Create a Space instance.
|
|
56
56
|
*
|
|
57
57
|
* @param data - Space data from API
|
|
58
|
-
* @param sdk -
|
|
58
|
+
* @param sdk - Client instance
|
|
59
59
|
*/
|
|
60
60
|
constructor(data: SpaceData, sdk: DatalayerClient);
|
|
61
61
|
/**
|
package/lib/models/SpaceDTO.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Space domain model for the Datalayer
|
|
6
|
+
* Space domain model for the Datalayer Client.
|
|
7
7
|
*
|
|
8
8
|
* @module models/SpaceDTO
|
|
9
9
|
*/
|
|
@@ -36,7 +36,7 @@ export class SpaceDTO {
|
|
|
36
36
|
* Create a Space instance.
|
|
37
37
|
*
|
|
38
38
|
* @param data - Space data from API
|
|
39
|
-
* @param sdk -
|
|
39
|
+
* @param sdk - Client instance
|
|
40
40
|
*/
|
|
41
41
|
constructor(data, sdk) {
|
|
42
42
|
this._data = data;
|
|
@@ -109,7 +109,7 @@ export class SpaceDTO {
|
|
|
109
109
|
*/
|
|
110
110
|
async _createItem(data) {
|
|
111
111
|
this._checkDeleted();
|
|
112
|
-
// Get necessary configuration from
|
|
112
|
+
// Get necessary configuration from Client
|
|
113
113
|
const token = this._sdk.getToken();
|
|
114
114
|
const spacerRunUrl = this._sdk.getSpacerRunUrl();
|
|
115
115
|
if (data.type === ItemTypes.NOTEBOOK) {
|
package/lib/models/UserDTO.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* User model for the Datalayer
|
|
2
|
+
* User model for the Datalayer Client with rich functionality.
|
|
3
3
|
*
|
|
4
4
|
* @module models/UserDTO
|
|
5
5
|
*/
|
|
@@ -54,7 +54,7 @@ export declare class UserDTO {
|
|
|
54
54
|
* Create a User instance.
|
|
55
55
|
*
|
|
56
56
|
* @param data - User data from API
|
|
57
|
-
* @param sdk -
|
|
57
|
+
* @param sdk - Client instance (currently unused but kept for compatibility)
|
|
58
58
|
*/
|
|
59
59
|
constructor(data: UserData, sdk?: DatalayerClient);
|
|
60
60
|
get id(): string;
|
package/lib/models/UserDTO.js
CHANGED
|
@@ -13,7 +13,7 @@ export class UserDTO {
|
|
|
13
13
|
* Create a User instance.
|
|
14
14
|
*
|
|
15
15
|
* @param data - User data from API
|
|
16
|
-
* @param sdk -
|
|
16
|
+
* @param sdk - Client instance (currently unused but kept for compatibility)
|
|
17
17
|
*/
|
|
18
18
|
constructor(data, sdk) {
|
|
19
19
|
this._data = data;
|
package/lib/models/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Models definitions for all Datalayer API services.
|
|
3
3
|
*
|
|
4
|
-
* This module consolidates all type definitions used by the
|
|
4
|
+
* This module consolidates all type definitions used by the Client, providing
|
|
5
5
|
* comprehensive TypeScript support for requests, responses, and data models
|
|
6
6
|
* across all Datalayer services.
|
|
7
7
|
*
|
package/lib/models/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Models definitions for all Datalayer API services.
|
|
7
7
|
*
|
|
8
|
-
* This module consolidates all type definitions used by the
|
|
8
|
+
* This module consolidates all type definitions used by the Client, providing
|
|
9
9
|
* comprehensive TypeScript support for requests, responses, and data models
|
|
10
10
|
* across all Datalayer services.
|
|
11
11
|
*
|
|
@@ -61,7 +61,7 @@ try {
|
|
|
61
61
|
...htmlOverridingConfiguration,
|
|
62
62
|
};
|
|
63
63
|
configLogger.info('Datalayer configuration loaded from HTML page', initialConfiguration);
|
|
64
|
-
window.document.title = `${initialConfiguration.brand.name}
|
|
64
|
+
window.document.title = `${initialConfiguration.brand.name} ☰ ${initialConfiguration.brand.about}`;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|