@qodalis/react-cli 2.0.0-beta.9 → 2.0.0-rc.2
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 +188 -529
- package/dist/index.d.mts +36 -17
- package/dist/index.d.ts +36 -17
- package/dist/index.js +227 -586
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +264 -590
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +7 -6
- package/dist/styles.css +8 -0
- package/package.json +7 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { RefObject } from 'react';
|
|
3
|
-
import { ICliModule,
|
|
4
|
-
import { CliEngineOptions, CliEngine } from '@qodalis/cli';
|
|
3
|
+
import { ICliModule, CliEngineSnapshot, CliPanelConfig, CliPanelPosition, ICliPanelRef } from '@qodalis/cli-core';
|
|
4
|
+
import { CliEngineOptions, CliEngine, CreateCliEngineConfig } from '@qodalis/cli';
|
|
5
5
|
export { CliEngine, CliEngineOptions } from '@qodalis/cli';
|
|
6
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
6
|
|
|
8
7
|
interface CliProps {
|
|
9
8
|
modules?: ICliModule[];
|
|
10
|
-
processors?: ICliCommandProcessor[];
|
|
11
9
|
options?: CliEngineOptions;
|
|
12
10
|
services?: Record<string, any>;
|
|
13
11
|
snapshot?: CliEngineSnapshot;
|
|
@@ -15,30 +13,55 @@ interface CliProps {
|
|
|
15
13
|
style?: React__default.CSSProperties;
|
|
16
14
|
className?: string;
|
|
17
15
|
}
|
|
18
|
-
declare function Cli({ modules,
|
|
16
|
+
declare function Cli({ modules, options, services, snapshot, onReady, style, className, }: CliProps): React__default.JSX.Element;
|
|
19
17
|
|
|
20
18
|
interface CliPanelOptions extends CliEngineOptions, CliPanelConfig {
|
|
21
19
|
}
|
|
22
20
|
interface CliPanelProps {
|
|
23
21
|
options?: CliPanelOptions;
|
|
24
22
|
modules?: ICliModule[];
|
|
25
|
-
processors?: ICliCommandProcessor[];
|
|
26
23
|
services?: Record<string, any>;
|
|
27
24
|
onClose?: () => void;
|
|
28
25
|
style?: React__default.CSSProperties;
|
|
29
26
|
className?: string;
|
|
27
|
+
collapsed?: boolean;
|
|
28
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
29
|
+
hidden?: boolean;
|
|
30
|
+
onHiddenChange?: (hidden: boolean) => void;
|
|
31
|
+
maximized?: boolean;
|
|
32
|
+
onMaximizedChange?: (maximized: boolean) => void;
|
|
33
|
+
activeTabId?: number;
|
|
34
|
+
onActiveTabIdChange?: (tabId: number) => void;
|
|
35
|
+
position?: CliPanelPosition;
|
|
36
|
+
onPositionChange?: (position: CliPanelPosition) => void;
|
|
37
|
+
height?: number;
|
|
38
|
+
onHeightChange?: (height: number) => void;
|
|
39
|
+
width?: number;
|
|
40
|
+
onWidthChange?: (width: number) => void;
|
|
41
|
+
onTabAdded?: (event: {
|
|
42
|
+
tabId: number;
|
|
43
|
+
}) => void;
|
|
44
|
+
onTabClosed?: (event: {
|
|
45
|
+
tabId: number;
|
|
46
|
+
}) => void;
|
|
47
|
+
onPaneSplit?: (event: {
|
|
48
|
+
paneId: number;
|
|
49
|
+
tabId: number;
|
|
50
|
+
}) => void;
|
|
51
|
+
onPaneClosed?: (event: {
|
|
52
|
+
paneId: number;
|
|
53
|
+
}) => void;
|
|
30
54
|
}
|
|
31
|
-
declare
|
|
55
|
+
declare const CliPanel: React__default.ForwardRefExoticComponent<CliPanelProps & React__default.RefAttributes<ICliPanelRef<CliEngine>>>;
|
|
32
56
|
|
|
33
57
|
interface CliProviderProps {
|
|
34
58
|
modules?: ICliModule[];
|
|
35
|
-
processors?: ICliCommandProcessor[];
|
|
36
59
|
options?: CliEngineOptions;
|
|
37
60
|
services?: Record<string, any>;
|
|
38
61
|
children: React__default.ReactNode;
|
|
39
62
|
style?: React__default.CSSProperties;
|
|
40
63
|
}
|
|
41
|
-
declare function CliProvider({ modules,
|
|
64
|
+
declare function CliProvider({ modules, options, services, children, style, }: CliProviderProps): React__default.JSX.Element;
|
|
42
65
|
|
|
43
66
|
interface CliContextValue {
|
|
44
67
|
engine: CliEngine | null;
|
|
@@ -48,7 +71,6 @@ declare function useCli(): CliContextValue;
|
|
|
48
71
|
|
|
49
72
|
interface CliConfigValue {
|
|
50
73
|
modules?: ICliModule[];
|
|
51
|
-
processors?: ICliCommandProcessor[];
|
|
52
74
|
options?: CliEngineOptions;
|
|
53
75
|
services?: Record<string, any>;
|
|
54
76
|
}
|
|
@@ -56,15 +78,12 @@ declare function useCliConfig(): CliConfigValue;
|
|
|
56
78
|
interface CliConfigProviderProps extends CliConfigValue {
|
|
57
79
|
children: React__default.ReactNode;
|
|
58
80
|
}
|
|
59
|
-
declare function CliConfigProvider({ modules,
|
|
81
|
+
declare function CliConfigProvider({ modules, options, services, children, }: CliConfigProviderProps): React__default.JSX.Element;
|
|
60
82
|
|
|
61
|
-
interface UseCliEngineConfig {
|
|
62
|
-
modules?: ICliModule[];
|
|
63
|
-
processors?: ICliCommandProcessor[];
|
|
64
|
-
options?: CliEngineOptions;
|
|
65
|
-
services?: Record<string, any>;
|
|
83
|
+
interface UseCliEngineConfig extends Omit<CreateCliEngineConfig, 'framework'> {
|
|
66
84
|
disabled?: boolean;
|
|
67
85
|
}
|
|
68
86
|
declare function useCliEngine(containerRef: RefObject<HTMLElement | null>, config?: UseCliEngineConfig): CliEngine | null;
|
|
69
87
|
|
|
70
|
-
export { Cli, CliConfigProvider,
|
|
88
|
+
export { Cli, CliConfigProvider, CliContext, CliPanel, CliProvider, useCli, useCliConfig, useCliEngine };
|
|
89
|
+
export type { CliConfigProviderProps, CliConfigValue, CliContextValue, CliPanelOptions, CliPanelProps, CliProps, CliProviderProps, UseCliEngineConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { RefObject } from 'react';
|
|
3
|
-
import { ICliModule,
|
|
4
|
-
import { CliEngineOptions, CliEngine } from '@qodalis/cli';
|
|
3
|
+
import { ICliModule, CliEngineSnapshot, CliPanelConfig, CliPanelPosition, ICliPanelRef } from '@qodalis/cli-core';
|
|
4
|
+
import { CliEngineOptions, CliEngine, CreateCliEngineConfig } from '@qodalis/cli';
|
|
5
5
|
export { CliEngine, CliEngineOptions } from '@qodalis/cli';
|
|
6
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
6
|
|
|
8
7
|
interface CliProps {
|
|
9
8
|
modules?: ICliModule[];
|
|
10
|
-
processors?: ICliCommandProcessor[];
|
|
11
9
|
options?: CliEngineOptions;
|
|
12
10
|
services?: Record<string, any>;
|
|
13
11
|
snapshot?: CliEngineSnapshot;
|
|
@@ -15,30 +13,55 @@ interface CliProps {
|
|
|
15
13
|
style?: React__default.CSSProperties;
|
|
16
14
|
className?: string;
|
|
17
15
|
}
|
|
18
|
-
declare function Cli({ modules,
|
|
16
|
+
declare function Cli({ modules, options, services, snapshot, onReady, style, className, }: CliProps): React__default.JSX.Element;
|
|
19
17
|
|
|
20
18
|
interface CliPanelOptions extends CliEngineOptions, CliPanelConfig {
|
|
21
19
|
}
|
|
22
20
|
interface CliPanelProps {
|
|
23
21
|
options?: CliPanelOptions;
|
|
24
22
|
modules?: ICliModule[];
|
|
25
|
-
processors?: ICliCommandProcessor[];
|
|
26
23
|
services?: Record<string, any>;
|
|
27
24
|
onClose?: () => void;
|
|
28
25
|
style?: React__default.CSSProperties;
|
|
29
26
|
className?: string;
|
|
27
|
+
collapsed?: boolean;
|
|
28
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
29
|
+
hidden?: boolean;
|
|
30
|
+
onHiddenChange?: (hidden: boolean) => void;
|
|
31
|
+
maximized?: boolean;
|
|
32
|
+
onMaximizedChange?: (maximized: boolean) => void;
|
|
33
|
+
activeTabId?: number;
|
|
34
|
+
onActiveTabIdChange?: (tabId: number) => void;
|
|
35
|
+
position?: CliPanelPosition;
|
|
36
|
+
onPositionChange?: (position: CliPanelPosition) => void;
|
|
37
|
+
height?: number;
|
|
38
|
+
onHeightChange?: (height: number) => void;
|
|
39
|
+
width?: number;
|
|
40
|
+
onWidthChange?: (width: number) => void;
|
|
41
|
+
onTabAdded?: (event: {
|
|
42
|
+
tabId: number;
|
|
43
|
+
}) => void;
|
|
44
|
+
onTabClosed?: (event: {
|
|
45
|
+
tabId: number;
|
|
46
|
+
}) => void;
|
|
47
|
+
onPaneSplit?: (event: {
|
|
48
|
+
paneId: number;
|
|
49
|
+
tabId: number;
|
|
50
|
+
}) => void;
|
|
51
|
+
onPaneClosed?: (event: {
|
|
52
|
+
paneId: number;
|
|
53
|
+
}) => void;
|
|
30
54
|
}
|
|
31
|
-
declare
|
|
55
|
+
declare const CliPanel: React__default.ForwardRefExoticComponent<CliPanelProps & React__default.RefAttributes<ICliPanelRef<CliEngine>>>;
|
|
32
56
|
|
|
33
57
|
interface CliProviderProps {
|
|
34
58
|
modules?: ICliModule[];
|
|
35
|
-
processors?: ICliCommandProcessor[];
|
|
36
59
|
options?: CliEngineOptions;
|
|
37
60
|
services?: Record<string, any>;
|
|
38
61
|
children: React__default.ReactNode;
|
|
39
62
|
style?: React__default.CSSProperties;
|
|
40
63
|
}
|
|
41
|
-
declare function CliProvider({ modules,
|
|
64
|
+
declare function CliProvider({ modules, options, services, children, style, }: CliProviderProps): React__default.JSX.Element;
|
|
42
65
|
|
|
43
66
|
interface CliContextValue {
|
|
44
67
|
engine: CliEngine | null;
|
|
@@ -48,7 +71,6 @@ declare function useCli(): CliContextValue;
|
|
|
48
71
|
|
|
49
72
|
interface CliConfigValue {
|
|
50
73
|
modules?: ICliModule[];
|
|
51
|
-
processors?: ICliCommandProcessor[];
|
|
52
74
|
options?: CliEngineOptions;
|
|
53
75
|
services?: Record<string, any>;
|
|
54
76
|
}
|
|
@@ -56,15 +78,12 @@ declare function useCliConfig(): CliConfigValue;
|
|
|
56
78
|
interface CliConfigProviderProps extends CliConfigValue {
|
|
57
79
|
children: React__default.ReactNode;
|
|
58
80
|
}
|
|
59
|
-
declare function CliConfigProvider({ modules,
|
|
81
|
+
declare function CliConfigProvider({ modules, options, services, children, }: CliConfigProviderProps): React__default.JSX.Element;
|
|
60
82
|
|
|
61
|
-
interface UseCliEngineConfig {
|
|
62
|
-
modules?: ICliModule[];
|
|
63
|
-
processors?: ICliCommandProcessor[];
|
|
64
|
-
options?: CliEngineOptions;
|
|
65
|
-
services?: Record<string, any>;
|
|
83
|
+
interface UseCliEngineConfig extends Omit<CreateCliEngineConfig, 'framework'> {
|
|
66
84
|
disabled?: boolean;
|
|
67
85
|
}
|
|
68
86
|
declare function useCliEngine(containerRef: RefObject<HTMLElement | null>, config?: UseCliEngineConfig): CliEngine | null;
|
|
69
87
|
|
|
70
|
-
export { Cli, CliConfigProvider,
|
|
88
|
+
export { Cli, CliConfigProvider, CliContext, CliPanel, CliProvider, useCli, useCliConfig, useCliEngine };
|
|
89
|
+
export type { CliConfigProviderProps, CliConfigValue, CliContextValue, CliPanelOptions, CliPanelProps, CliProps, CliProviderProps, UseCliEngineConfig };
|