@examind/block-editor 0.1.0

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,68 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import React__default, { RefAttributes } from 'react';
4
+
5
+ type Theme = 'light' | 'dark';
6
+ type ThemeVariables = {
7
+ borderBase?: string;
8
+ fontSans?: string;
9
+ fontSerif?: string;
10
+ fontMono?: string;
11
+ spacingBase?: string;
12
+ fontSizeBase?: string;
13
+ };
14
+
15
+ type BlockEditorProps = {
16
+ themeSettings?: ThemeVariables;
17
+ editable?: boolean;
18
+ editorState?: any;
19
+ theme?: Theme;
20
+ onChange?: (editorState?: any) => void;
21
+ children?: React__default.ReactNode;
22
+ };
23
+ declare function BlockEditor(props: BlockEditorProps): react_jsx_runtime.JSX.Element;
24
+
25
+ declare function Callout(): react_jsx_runtime.JSX.Element;
26
+
27
+ declare function Debug(): react_jsx_runtime.JSX.Element;
28
+
29
+ type ImageSettings = {
30
+ url: string;
31
+ method: 'POST' | 'PUT';
32
+ parameters: Record<string, string>;
33
+ allowedTypes?: Array<string>;
34
+ maxSize?: number;
35
+ onUploaded: (result: any) => string;
36
+ };
37
+
38
+ interface ImageProps {
39
+ imageSettings: ImageSettings;
40
+ }
41
+ declare function Image(props: ImageProps): react_jsx_runtime.JSX.Element;
42
+
43
+ declare function Link(): react_jsx_runtime.JSX.Element;
44
+
45
+ declare function Questions(): react_jsx_runtime.JSX.Element;
46
+
47
+ interface SettingsPanelProps {
48
+ defaultOpen?: boolean;
49
+ }
50
+ declare function SettingsPanel(props: SettingsPanelProps): react_jsx_runtime.JSX.Element;
51
+
52
+ declare function Table(): react_jsx_runtime.JSX.Element;
53
+
54
+ type VariablesSettings = {
55
+ onCreated: (name: string) => void;
56
+ list: Array<string>;
57
+ getVariableValues: () => Record<string, string>;
58
+ };
59
+
60
+ interface VariablesHandler {
61
+ renameVariable: (prevName: string, newName: string) => void;
62
+ }
63
+ type VariablesProps = RefAttributes<VariablesHandler> & {
64
+ variablesSettings: VariablesSettings;
65
+ };
66
+ declare const Variables: React.ForwardRefExoticComponent<Omit<VariablesProps, "ref"> & RefAttributes<VariablesHandler>>;
67
+
68
+ export { BlockEditor, type BlockEditorProps, Callout, Debug, Image, type ImageProps, Link, Questions, SettingsPanel, type SettingsPanelProps, Table, type Theme, Variables, type VariablesHandler, type VariablesProps };
@@ -0,0 +1,68 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import React__default, { RefAttributes } from 'react';
4
+
5
+ type Theme = 'light' | 'dark';
6
+ type ThemeVariables = {
7
+ borderBase?: string;
8
+ fontSans?: string;
9
+ fontSerif?: string;
10
+ fontMono?: string;
11
+ spacingBase?: string;
12
+ fontSizeBase?: string;
13
+ };
14
+
15
+ type BlockEditorProps = {
16
+ themeSettings?: ThemeVariables;
17
+ editable?: boolean;
18
+ editorState?: any;
19
+ theme?: Theme;
20
+ onChange?: (editorState?: any) => void;
21
+ children?: React__default.ReactNode;
22
+ };
23
+ declare function BlockEditor(props: BlockEditorProps): react_jsx_runtime.JSX.Element;
24
+
25
+ declare function Callout(): react_jsx_runtime.JSX.Element;
26
+
27
+ declare function Debug(): react_jsx_runtime.JSX.Element;
28
+
29
+ type ImageSettings = {
30
+ url: string;
31
+ method: 'POST' | 'PUT';
32
+ parameters: Record<string, string>;
33
+ allowedTypes?: Array<string>;
34
+ maxSize?: number;
35
+ onUploaded: (result: any) => string;
36
+ };
37
+
38
+ interface ImageProps {
39
+ imageSettings: ImageSettings;
40
+ }
41
+ declare function Image(props: ImageProps): react_jsx_runtime.JSX.Element;
42
+
43
+ declare function Link(): react_jsx_runtime.JSX.Element;
44
+
45
+ declare function Questions(): react_jsx_runtime.JSX.Element;
46
+
47
+ interface SettingsPanelProps {
48
+ defaultOpen?: boolean;
49
+ }
50
+ declare function SettingsPanel(props: SettingsPanelProps): react_jsx_runtime.JSX.Element;
51
+
52
+ declare function Table(): react_jsx_runtime.JSX.Element;
53
+
54
+ type VariablesSettings = {
55
+ onCreated: (name: string) => void;
56
+ list: Array<string>;
57
+ getVariableValues: () => Record<string, string>;
58
+ };
59
+
60
+ interface VariablesHandler {
61
+ renameVariable: (prevName: string, newName: string) => void;
62
+ }
63
+ type VariablesProps = RefAttributes<VariablesHandler> & {
64
+ variablesSettings: VariablesSettings;
65
+ };
66
+ declare const Variables: React.ForwardRefExoticComponent<Omit<VariablesProps, "ref"> & RefAttributes<VariablesHandler>>;
67
+
68
+ export { BlockEditor, type BlockEditorProps, Callout, Debug, Image, type ImageProps, Link, Questions, SettingsPanel, type SettingsPanelProps, Table, type Theme, Variables, type VariablesHandler, type VariablesProps };