@yoopta/code 4.0.0-rc.17 → 4.0.0-rc.19
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/dist/index.es.js +1 -0
- package/dist/index.js +1 -1
- package/dist/library/hooks.d.ts +54 -4
- package/dist/library/hooks.d.ts.map +1 -1
- package/dist/ui/Code.d.ts.map +1 -1
- package/package.json +3 -7
package/dist/library/hooks.d.ts
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EditorState, Extension, EditorStateConfig } from '@codemirror/state';
|
|
3
|
+
import { EditorView, ViewUpdate } from '@codemirror/view';
|
|
4
|
+
export interface ReactCodeMirrorProps extends Omit<EditorStateConfig, 'doc' | 'extensions'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'placeholder'> {
|
|
5
|
+
/** value of the auto created model in the editor. */
|
|
6
|
+
value?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
minHeight?: string;
|
|
9
|
+
maxHeight?: string;
|
|
10
|
+
width?: string;
|
|
11
|
+
minWidth?: string;
|
|
12
|
+
maxWidth?: string;
|
|
13
|
+
autoFocus?: boolean;
|
|
14
|
+
placeholder?: string | HTMLElement;
|
|
15
|
+
theme?: 'light' | 'dark' | 'none' | Extension;
|
|
16
|
+
basicSetup?: boolean | any;
|
|
17
|
+
/**
|
|
18
|
+
* This disables editing of the editor content by the user.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* This disables editing of the editor content by the user.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
readOnly?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Controls whether pressing the `Tab` key inserts a tab character and indents the text (`true`)
|
|
29
|
+
* or behaves according to the browser's default behavior (`false`).
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
indentWithTab?: boolean;
|
|
33
|
+
/** Fired whenever a change occurs to the document. */
|
|
34
|
+
onChange?(value: string, viewUpdate: ViewUpdate): void;
|
|
35
|
+
/** Some data on the statistics editor. */
|
|
36
|
+
onCreateEditor?(view: EditorView, state: EditorState): void;
|
|
37
|
+
extensions?: Extension[];
|
|
38
|
+
root?: ShadowRoot | Document;
|
|
39
|
+
}
|
|
40
|
+
export interface ReactCodeMirrorRef {
|
|
41
|
+
editor?: HTMLDivElement | null;
|
|
42
|
+
state?: EditorState;
|
|
43
|
+
view?: EditorView;
|
|
44
|
+
}
|
|
45
|
+
export interface UseCodeMirror extends ReactCodeMirrorProps {
|
|
46
|
+
container?: HTMLDivElement | null;
|
|
47
|
+
}
|
|
48
|
+
export declare function useCodeMirror(props: UseCodeMirror): {
|
|
49
|
+
state: EditorState | undefined;
|
|
50
|
+
setState: import("react").Dispatch<import("react").SetStateAction<EditorState | undefined>>;
|
|
51
|
+
view: EditorView | undefined;
|
|
52
|
+
setView: import("react").Dispatch<import("react").SetStateAction<EditorView | undefined>>;
|
|
53
|
+
container: HTMLDivElement | null | undefined;
|
|
54
|
+
setContainer: import("react").Dispatch<import("react").SetStateAction<HTMLDivElement | null | undefined>>;
|
|
5
55
|
};
|
|
6
56
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/library/hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/library/hooks.ts"],"names":[],"mappings":";AACA,OAAO,EAAc,WAAW,EAAe,SAAS,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,iBAAiB,EAAE,KAAK,GA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AC,EAAE,cAAc,GAAG,IAAI,CAAC;CACnC;AAID,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa;;;;;;;EAwIjD"}
|
package/dist/ui/Code.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../src/ui/Code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,6BAA6B,EAI9B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../src/ui/Code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,6BAA6B,EAI9B,MAAM,gBAAgB,CAAC;AAqDxB,QAAA,MAAM,UAAU,gBAAiB,6BAA6B,4CA2D7D,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/code",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.19",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": false,
|
|
9
|
-
"type": "module",
|
|
10
9
|
"main": "dist/index.js",
|
|
11
|
-
"module": "dist/index.js",
|
|
10
|
+
"module": "dist/index.es.js",
|
|
12
11
|
"types": "./dist/index.d.ts",
|
|
13
12
|
"files": [
|
|
14
13
|
"dist/"
|
|
@@ -35,7 +34,6 @@
|
|
|
35
34
|
"url": "https://github.com/Darginec05/Editor-Yoopta/issues"
|
|
36
35
|
},
|
|
37
36
|
"dependencies": {
|
|
38
|
-
"@codemirror/basic-setup": "^0.20.0",
|
|
39
37
|
"@codemirror/lang-angular": "^0.1.3",
|
|
40
38
|
"@codemirror/lang-cpp": "^6.0.2",
|
|
41
39
|
"@codemirror/lang-css": "^6.2.1",
|
|
@@ -51,9 +49,7 @@
|
|
|
51
49
|
"@codemirror/lang-vue": "^0.1.3",
|
|
52
50
|
"@codemirror/lang-xml": "^6.1.0",
|
|
53
51
|
"@codemirror/lang-yaml": "^6.0.0",
|
|
54
|
-
"@codemirror/state": "^6.4.1",
|
|
55
52
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
56
|
-
"@codemirror/view": "^6.26.0",
|
|
57
53
|
"@radix-ui/react-select": "^2.0.0",
|
|
58
54
|
"@uiw/codemirror-extensions-basic-setup": "^4.21.24",
|
|
59
55
|
"@uiw/codemirror-theme-basic": "^4.21.24",
|
|
@@ -71,5 +67,5 @@
|
|
|
71
67
|
"devDependencies": {
|
|
72
68
|
"check-peer-dependencies": "^4.3.0"
|
|
73
69
|
},
|
|
74
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "2ab435c70924d16a80928f05657f0f9db1ff42f0"
|
|
75
71
|
}
|