@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.
Files changed (109) hide show
  1. package/README.md +11 -11
  2. package/lib/api/index.d.ts +1 -1
  3. package/lib/api/index.js +1 -1
  4. package/lib/api/spacer/agentSpaces.d.ts +193 -0
  5. package/lib/api/spacer/agentSpaces.js +127 -0
  6. package/lib/api/spacer/index.d.ts +2 -1
  7. package/lib/api/spacer/index.js +2 -1
  8. package/lib/api/utils/validation.d.ts +1 -1
  9. package/lib/api/utils/validation.js +1 -1
  10. package/lib/client/auth/AuthenticationManager.d.ts +2 -2
  11. package/lib/client/auth/AuthenticationManager.js +2 -2
  12. package/lib/client/auth/index.d.ts +1 -1
  13. package/lib/client/auth/index.js +1 -1
  14. package/lib/client/auth/types.d.ts +1 -1
  15. package/lib/client/auth/types.js +1 -1
  16. package/lib/client/base.d.ts +9 -9
  17. package/lib/client/base.js +3 -3
  18. package/lib/client/constants.d.ts +2 -2
  19. package/lib/client/constants.js +2 -2
  20. package/lib/client/index.d.ts +2 -2
  21. package/lib/client/mixins/IAMMixin.js +1 -1
  22. package/lib/client/utils/spacerUtils.d.ts +1 -1
  23. package/lib/client/utils/spacerUtils.js +1 -1
  24. package/lib/components/auth/Login.d.ts +4 -0
  25. package/lib/components/auth/Login.js +8 -2
  26. package/lib/components/auth/Login.stories.d.ts +1 -0
  27. package/lib/components/progress/ConsumptionBar.js +26 -8
  28. package/lib/components/progress/CreditsIndicator.d.ts +7 -1
  29. package/lib/components/progress/CreditsIndicator.js +4 -2
  30. package/lib/components/{screenshot/ScreenCapture.d.ts → screencapture/Screencapture.d.ts} +5 -5
  31. package/lib/components/{screenshot/ScreenCapture.js → screencapture/Screencapture.js} +2 -2
  32. package/lib/components/screencapture/ScreencaptureButton.d.ts +3 -0
  33. package/lib/components/{screenshot/ScreenCaptureButton.js → screencapture/ScreencaptureButton.js} +8 -8
  34. package/lib/components/screencapture/index.d.ts +2 -0
  35. package/lib/components/{screenshot → screencapture}/index.js +2 -2
  36. package/lib/hooks/index.d.ts +1 -1
  37. package/lib/hooks/index.js +1 -1
  38. package/lib/hooks/layouts/{LayoutScreenshot.css → LayoutScreencapture.css} +2 -2
  39. package/lib/hooks/layouts/LayoutScreencapture.d.ts +3 -0
  40. package/lib/hooks/layouts/{LayoutScreenshot.js → LayoutScreencapture.js} +14 -14
  41. package/lib/hooks/layouts/index.d.ts +1 -1
  42. package/lib/hooks/layouts/index.js +1 -1
  43. package/lib/hooks/useCache.d.ts +91 -1
  44. package/lib/hooks/useCache.js +523 -59
  45. package/lib/hooks/useCellOutputshot.js +2 -2
  46. package/lib/hooks/useScreencapture.d.ts +18 -0
  47. package/lib/hooks/useScreencapture.js +53 -0
  48. package/lib/index.d.ts +1 -1
  49. package/lib/models/CreditsDTO.js +1 -1
  50. package/lib/models/Datasource.d.ts +2 -2
  51. package/lib/models/Datasource.js +2 -2
  52. package/lib/models/EnvironmentDTO.d.ts +3 -3
  53. package/lib/models/EnvironmentDTO.js +2 -2
  54. package/lib/models/HealthCheck.d.ts +1 -1
  55. package/lib/models/HealthCheck.js +1 -1
  56. package/lib/models/IAMProviderUsers.d.ts +11 -0
  57. package/lib/models/IAMProvidersSpecs.d.ts +2 -1
  58. package/lib/models/IAMProvidersSpecs.js +14 -0
  59. package/lib/models/ItemDTO.d.ts +2 -2
  60. package/lib/models/ItemDTO.js +2 -2
  61. package/lib/models/LexicalDTO.d.ts +2 -2
  62. package/lib/models/LexicalDTO.js +2 -2
  63. package/lib/models/NotebookDTO.d.ts +2 -2
  64. package/lib/models/NotebookDTO.js +1 -1
  65. package/lib/models/Page.js +1 -1
  66. package/lib/models/PageTag.d.ts +1 -1
  67. package/lib/models/PageTag.js +21 -0
  68. package/lib/models/RuntimeDTO.d.ts +2 -2
  69. package/lib/models/RuntimeDTO.js +2 -2
  70. package/lib/models/RuntimeSnapshotDTO.d.ts +3 -3
  71. package/lib/models/RuntimeSnapshotDTO.js +1 -1
  72. package/lib/models/Secret.d.ts +3 -3
  73. package/lib/models/Secret.js +2 -2
  74. package/lib/models/SpaceDTO.d.ts +2 -2
  75. package/lib/models/SpaceDTO.js +3 -3
  76. package/lib/models/UserDTO.d.ts +2 -2
  77. package/lib/models/UserDTO.js +1 -1
  78. package/lib/models/index.d.ts +1 -1
  79. package/lib/models/index.js +1 -1
  80. package/lib/state/substates/CoreState.js +1 -1
  81. package/lib/state/substates/LayoutState.d.ts +5 -5
  82. package/lib/state/substates/LayoutState.js +3 -3
  83. package/lib/theme/DatalayerThemeProvider.d.ts +22 -2
  84. package/lib/theme/DatalayerThemeProvider.js +17 -9
  85. package/lib/theme/index.d.ts +1 -0
  86. package/lib/theme/index.js +1 -0
  87. package/lib/theme/useSystemColorMode.d.ts +9 -0
  88. package/lib/theme/useSystemColorMode.js +26 -0
  89. package/lib/utils/Screencapture.d.ts +1 -0
  90. package/lib/utils/{Screenshot.js → Screencapture.js} +1 -1
  91. package/lib/utils/index.js +1 -1
  92. package/lib/views/datasources/DatasourceNew.d.ts +7 -1
  93. package/lib/views/datasources/DatasourceNew.js +3 -3
  94. package/lib/views/datasources/Datasources.d.ts +7 -1
  95. package/lib/views/datasources/Datasources.js +6 -4
  96. package/lib/views/iam-tokens/IAMTokenNew.d.ts +5 -1
  97. package/lib/views/iam-tokens/IAMTokenNew.js +2 -2
  98. package/lib/views/iam-tokens/IAMTokens.d.ts +7 -1
  99. package/lib/views/iam-tokens/IAMTokens.js +6 -4
  100. package/package.json +1 -1
  101. package/style/screencapture/index.css +58 -0
  102. package/lib/components/screenshot/ScreenCaptureButton.d.ts +0 -3
  103. package/lib/components/screenshot/index.d.ts +0 -2
  104. package/lib/hooks/layouts/LayoutScreenshot.d.ts +0 -3
  105. package/lib/hooks/useCache0.d.ts +0 -312
  106. package/lib/hooks/useCache0.js +0 -3189
  107. package/lib/hooks/useScreenshot.d.ts +0 -18
  108. package/lib/hooks/useScreenshot.js +0 -53
  109. package/lib/utils/Screenshot.d.ts +0 -1
@@ -1,18 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type ScreenshotContextType = {
3
- closeScreenshot: () => void;
4
- displayScreenshot: (nextScreenshot: any) => void;
5
- };
6
- export declare const ScreenshotContext: import("react").Context<ScreenshotContextType>;
7
- export declare function useScreenshot(): ScreenshotContextType;
8
- /**
9
- * The type for the Screenshot context provider.
10
- */
11
- export declare const ScreenshotContextProvider: import("react").Provider<ScreenshotContextType>;
12
- export type IScreenshotProviderProps = {
13
- children?: ReactNode;
14
- zIndex?: number;
15
- disableDarken?: boolean;
16
- screenshotSurface?: (qfds: any) => JSX.Element;
17
- };
18
- export declare function ScreenshotProvider({ children, zIndex, disableDarken, screenshotSurface, }: IScreenshotProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,53 +0,0 @@
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 { LayoutScreenshot } from './layouts';
8
- export const ScreenshotContext = createContext({
9
- closeScreenshot: () => { },
10
- displayScreenshot: (nextScreenshot) => { },
11
- });
12
- export function useScreenshot() {
13
- const context = useContext(ScreenshotContext);
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 Screenshot context provider.
20
- */
21
- export const ScreenshotContextProvider = ScreenshotContext.Provider;
22
- export function ScreenshotProvider({ children = null, zIndex = 9999, disableDarken = false, screenshotSurface = undefined, }) {
23
- const defaultScreenshotSurface = {
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, setScreenshot] = useState({
36
- open: false,
37
- render: (closeScreenshot) => _jsx(_Fragment, {}),
38
- });
39
- const displayScreenshot = (nextScreenshot) => {
40
- setScreenshot({
41
- open: true,
42
- render: nextScreenshot,
43
- });
44
- };
45
- const closeScreenshot = () => {
46
- setScreenshot({
47
- open: false,
48
- render: (closeScreenshot) => _jsx(_Fragment, {}),
49
- });
50
- };
51
- return (_jsxs(ScreenshotContextProvider, { value: { closeScreenshot, displayScreenshot }, children: [_jsx(LayoutScreenshot, {}), children, screenshot.open &&
52
- (screenshotSurface ? (screenshotSurface(screenshot.render(closeScreenshot))) : (_jsx("div", { style: defaultScreenshotSurface, children: screenshot.render(closeScreenshot) })))] }));
53
- }
@@ -1 +0,0 @@
1
- export declare const takeHTMLNodeScreenshot: (node: HTMLDivElement) => Promise<string>;