@qodalis/react-cli 2.0.0-beta.3 → 2.0.0-beta.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.
@@ -0,0 +1,70 @@
1
+ import * as React from 'react';
2
+ import React__default, { RefObject } from 'react';
3
+ import { ICliModule, ICliCommandProcessor, CliEngineSnapshot, CliPanelConfig } from '@qodalis/cli-core';
4
+ import { CliEngineOptions, CliEngine } from '@qodalis/cli';
5
+ export { CliEngine, CliEngineOptions } from '@qodalis/cli';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
+
8
+ interface CliProps {
9
+ modules?: ICliModule[];
10
+ processors?: ICliCommandProcessor[];
11
+ options?: CliEngineOptions;
12
+ services?: Record<string, any>;
13
+ snapshot?: CliEngineSnapshot;
14
+ onReady?: (engine: CliEngine) => void;
15
+ style?: React__default.CSSProperties;
16
+ className?: string;
17
+ }
18
+ declare function Cli({ modules, processors, options, services, snapshot, onReady, style, className, }: CliProps): React__default.JSX.Element;
19
+
20
+ interface CliPanelOptions extends CliEngineOptions, CliPanelConfig {
21
+ }
22
+ interface CliPanelProps {
23
+ options?: CliPanelOptions;
24
+ modules?: ICliModule[];
25
+ processors?: ICliCommandProcessor[];
26
+ services?: Record<string, any>;
27
+ onClose?: () => void;
28
+ style?: React__default.CSSProperties;
29
+ className?: string;
30
+ }
31
+ declare function CliPanel({ options: optionsProp, modules: modulesProp, processors: processorsProp, services: servicesProp, onClose, style, className }: CliPanelProps): react_jsx_runtime.JSX.Element | null;
32
+
33
+ interface CliProviderProps {
34
+ modules?: ICliModule[];
35
+ processors?: ICliCommandProcessor[];
36
+ options?: CliEngineOptions;
37
+ services?: Record<string, any>;
38
+ children: React__default.ReactNode;
39
+ style?: React__default.CSSProperties;
40
+ }
41
+ declare function CliProvider({ modules, processors, options, services, children, style, }: CliProviderProps): React__default.JSX.Element;
42
+
43
+ interface CliContextValue {
44
+ engine: CliEngine | null;
45
+ }
46
+ declare const CliContext: React.Context<CliContextValue>;
47
+ declare function useCli(): CliContextValue;
48
+
49
+ interface CliConfigValue {
50
+ modules?: ICliModule[];
51
+ processors?: ICliCommandProcessor[];
52
+ options?: CliEngineOptions;
53
+ services?: Record<string, any>;
54
+ }
55
+ declare function useCliConfig(): CliConfigValue;
56
+ interface CliConfigProviderProps extends CliConfigValue {
57
+ children: React__default.ReactNode;
58
+ }
59
+ declare function CliConfigProvider({ modules, processors, options, services, children, }: CliConfigProviderProps): React__default.JSX.Element;
60
+
61
+ interface UseCliEngineConfig {
62
+ modules?: ICliModule[];
63
+ processors?: ICliCommandProcessor[];
64
+ options?: CliEngineOptions;
65
+ services?: Record<string, any>;
66
+ disabled?: boolean;
67
+ }
68
+ declare function useCliEngine(containerRef: RefObject<HTMLElement | null>, config?: UseCliEngineConfig): CliEngine | null;
69
+
70
+ export { Cli, CliConfigProvider, type CliConfigProviderProps, type CliConfigValue, CliContext, type CliContextValue, CliPanel, type CliPanelOptions, type CliPanelProps, type CliProps, CliProvider, type CliProviderProps, type UseCliEngineConfig, useCli, useCliConfig, useCliEngine };
@@ -0,0 +1,70 @@
1
+ import * as React from 'react';
2
+ import React__default, { RefObject } from 'react';
3
+ import { ICliModule, ICliCommandProcessor, CliEngineSnapshot, CliPanelConfig } from '@qodalis/cli-core';
4
+ import { CliEngineOptions, CliEngine } from '@qodalis/cli';
5
+ export { CliEngine, CliEngineOptions } from '@qodalis/cli';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
+
8
+ interface CliProps {
9
+ modules?: ICliModule[];
10
+ processors?: ICliCommandProcessor[];
11
+ options?: CliEngineOptions;
12
+ services?: Record<string, any>;
13
+ snapshot?: CliEngineSnapshot;
14
+ onReady?: (engine: CliEngine) => void;
15
+ style?: React__default.CSSProperties;
16
+ className?: string;
17
+ }
18
+ declare function Cli({ modules, processors, options, services, snapshot, onReady, style, className, }: CliProps): React__default.JSX.Element;
19
+
20
+ interface CliPanelOptions extends CliEngineOptions, CliPanelConfig {
21
+ }
22
+ interface CliPanelProps {
23
+ options?: CliPanelOptions;
24
+ modules?: ICliModule[];
25
+ processors?: ICliCommandProcessor[];
26
+ services?: Record<string, any>;
27
+ onClose?: () => void;
28
+ style?: React__default.CSSProperties;
29
+ className?: string;
30
+ }
31
+ declare function CliPanel({ options: optionsProp, modules: modulesProp, processors: processorsProp, services: servicesProp, onClose, style, className }: CliPanelProps): react_jsx_runtime.JSX.Element | null;
32
+
33
+ interface CliProviderProps {
34
+ modules?: ICliModule[];
35
+ processors?: ICliCommandProcessor[];
36
+ options?: CliEngineOptions;
37
+ services?: Record<string, any>;
38
+ children: React__default.ReactNode;
39
+ style?: React__default.CSSProperties;
40
+ }
41
+ declare function CliProvider({ modules, processors, options, services, children, style, }: CliProviderProps): React__default.JSX.Element;
42
+
43
+ interface CliContextValue {
44
+ engine: CliEngine | null;
45
+ }
46
+ declare const CliContext: React.Context<CliContextValue>;
47
+ declare function useCli(): CliContextValue;
48
+
49
+ interface CliConfigValue {
50
+ modules?: ICliModule[];
51
+ processors?: ICliCommandProcessor[];
52
+ options?: CliEngineOptions;
53
+ services?: Record<string, any>;
54
+ }
55
+ declare function useCliConfig(): CliConfigValue;
56
+ interface CliConfigProviderProps extends CliConfigValue {
57
+ children: React__default.ReactNode;
58
+ }
59
+ declare function CliConfigProvider({ modules, processors, options, services, children, }: CliConfigProviderProps): React__default.JSX.Element;
60
+
61
+ interface UseCliEngineConfig {
62
+ modules?: ICliModule[];
63
+ processors?: ICliCommandProcessor[];
64
+ options?: CliEngineOptions;
65
+ services?: Record<string, any>;
66
+ disabled?: boolean;
67
+ }
68
+ declare function useCliEngine(containerRef: RefObject<HTMLElement | null>, config?: UseCliEngineConfig): CliEngine | null;
69
+
70
+ export { Cli, CliConfigProvider, type CliConfigProviderProps, type CliConfigValue, CliContext, type CliContextValue, CliPanel, type CliPanelOptions, type CliPanelProps, type CliProps, CliProvider, type CliProviderProps, type UseCliEngineConfig, useCli, useCliConfig, useCliEngine };