@yoopta/code 4.0.0-rc.2 → 4.0.0-rc.21
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/plugin/index.d.ts +2 -11
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/types.d.ts +8 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/CodeBlockOptions.d.ts.map +1 -1
- package/dist/utils/element.d.ts +1 -1
- package/dist/utils/element.d.ts.map +1 -1
- package/dist/utils/languages.d.ts +77 -17
- package/dist/utils/languages.d.ts.map +1 -1
- package/dist/utils/themes.d.ts +1 -1
- package/dist/utils/themes.d.ts.map +1 -1
- package/package.json +10 -5
package/dist/plugin/index.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { YooptaPlugin } from '@yoopta/editor';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
language: string;
|
|
5
|
-
theme: string;
|
|
6
|
-
}, {
|
|
7
|
-
display: {
|
|
8
|
-
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
};
|
|
11
|
-
shortcuts: string[];
|
|
12
|
-
}>;
|
|
2
|
+
import { CodeElementProps, CodePluginBlockOptions } from '../types';
|
|
3
|
+
declare const Code: YooptaPlugin<"code", CodeElementProps, CodePluginBlockOptions>;
|
|
13
4
|
export { Code };
|
|
14
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAsB,MAAM,UAAU,CAAC;AAGxF,QAAA,MAAM,IAAI,gEAgDR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { SlateElement } from '@yoopta/editor';
|
|
2
|
+
import { LANGUAGES_MAP } from './utils/languages';
|
|
3
|
+
import { THEMES_MAP } from './utils/themes';
|
|
2
4
|
export type CodePluginElements = 'code';
|
|
3
5
|
export type CodeElementProps = {
|
|
4
|
-
language?:
|
|
5
|
-
theme?:
|
|
6
|
+
language?: keyof typeof LANGUAGES_MAP;
|
|
7
|
+
theme?: keyof typeof THEMES_MAP;
|
|
8
|
+
};
|
|
9
|
+
export type CodePluginBlockOptions = {
|
|
10
|
+
defaultTheme: keyof typeof THEMES_MAP;
|
|
11
|
+
defaultLanguage: keyof typeof LANGUAGES_MAP;
|
|
6
12
|
};
|
|
7
13
|
export type CodeElement = SlateElement<'code', CodeElementProps>;
|
|
8
14
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,EAAE,MAAM,OAAO,UAAU,CAAC;IACtC,eAAe,EAAE,MAAM,OAAO,aAAa,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/CodeBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS9E,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOvC,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,+BAAgC,KAAK,
|
|
1
|
+
{"version":3,"file":"CodeBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/CodeBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS9E,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOvC,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,+BAAgC,KAAK,4CA+DjE,CAAC"}
|
package/dist/utils/element.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { YooptaBlockData } from '@yoopta/editor';
|
|
2
2
|
export declare const getCodeElement: (block: YooptaBlockData) => import("slate").Descendant | import("@yoopta/editor").SlateElement<string, any>;
|
|
3
|
-
export declare const getCodeElementText: (block: YooptaBlockData) =>
|
|
3
|
+
export declare const getCodeElementText: (block: YooptaBlockData) => string;
|
|
4
4
|
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/utils/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,cAAc,UAAW,eAAe,oFAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,eAAe,
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/utils/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,cAAc,UAAW,eAAe,oFAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,eAAe,WASxD,CAAC"}
|
|
@@ -1,19 +1,79 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
declare const LANGUAGES_MAP: {
|
|
2
|
+
javascript: {
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
6
|
+
};
|
|
7
|
+
css: {
|
|
8
|
+
type: string;
|
|
9
|
+
name: string;
|
|
10
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
11
|
+
};
|
|
12
|
+
php: {
|
|
13
|
+
type: string;
|
|
14
|
+
name: string;
|
|
15
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
16
|
+
};
|
|
17
|
+
python: {
|
|
18
|
+
type: string;
|
|
19
|
+
name: string;
|
|
20
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
21
|
+
};
|
|
22
|
+
markdown: {
|
|
23
|
+
type: string;
|
|
24
|
+
name: string;
|
|
25
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
26
|
+
};
|
|
27
|
+
vue: {
|
|
28
|
+
type: string;
|
|
29
|
+
name: string;
|
|
30
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
31
|
+
};
|
|
32
|
+
json: {
|
|
33
|
+
type: string;
|
|
34
|
+
name: string;
|
|
35
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
36
|
+
};
|
|
37
|
+
sql: {
|
|
38
|
+
type: string;
|
|
39
|
+
name: string;
|
|
40
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
41
|
+
};
|
|
42
|
+
angular: {
|
|
43
|
+
type: string;
|
|
44
|
+
name: string;
|
|
45
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
46
|
+
};
|
|
47
|
+
rust: {
|
|
48
|
+
type: string;
|
|
49
|
+
name: string;
|
|
50
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
51
|
+
};
|
|
52
|
+
xml: {
|
|
53
|
+
type: string;
|
|
54
|
+
name: string;
|
|
55
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
56
|
+
};
|
|
57
|
+
yaml: {
|
|
58
|
+
type: string;
|
|
59
|
+
name: string;
|
|
60
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
61
|
+
};
|
|
62
|
+
java: {
|
|
63
|
+
type: string;
|
|
64
|
+
name: string;
|
|
65
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
66
|
+
};
|
|
67
|
+
html: {
|
|
68
|
+
type: string;
|
|
69
|
+
name: string;
|
|
70
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
71
|
+
};
|
|
72
|
+
cpp: {
|
|
73
|
+
type: string;
|
|
74
|
+
name: string;
|
|
75
|
+
extension: import("@codemirror/language").LanguageSupport;
|
|
76
|
+
};
|
|
17
77
|
};
|
|
18
|
-
export {
|
|
78
|
+
export { LANGUAGES_MAP };
|
|
19
79
|
//# sourceMappingURL=languages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/utils/languages.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/utils/languages.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ElB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/utils/themes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/utils/themes.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/utils/themes.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAatB,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.21",
|
|
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/"
|
|
@@ -50,7 +49,9 @@
|
|
|
50
49
|
"@codemirror/lang-vue": "^0.1.3",
|
|
51
50
|
"@codemirror/lang-xml": "^6.1.0",
|
|
52
51
|
"@codemirror/lang-yaml": "^6.0.0",
|
|
52
|
+
"@codemirror/theme-one-dark": "^6.1.2",
|
|
53
53
|
"@radix-ui/react-select": "^2.0.0",
|
|
54
|
+
"@uiw/codemirror-extensions-basic-setup": "^4.21.24",
|
|
54
55
|
"@uiw/codemirror-theme-basic": "^4.21.24",
|
|
55
56
|
"@uiw/codemirror-theme-copilot": "^4.21.24",
|
|
56
57
|
"@uiw/codemirror-theme-dracula": "^4.21.24",
|
|
@@ -60,8 +61,12 @@
|
|
|
60
61
|
"@uiw/codemirror-theme-okaidia": "^4.21.24",
|
|
61
62
|
"@uiw/codemirror-theme-sublime": "^4.21.24",
|
|
62
63
|
"@uiw/codemirror-theme-vscode": "^4.21.24",
|
|
63
|
-
"@uiw/react-codemirror": "^4.21.
|
|
64
|
+
"@uiw/react-codemirror": "^4.21.25",
|
|
65
|
+
"codemirror": "^6.0.1",
|
|
64
66
|
"copy-to-clipboard": "^3.3.3"
|
|
65
67
|
},
|
|
66
|
-
"
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"check-peer-dependencies": "^4.3.0"
|
|
70
|
+
},
|
|
71
|
+
"gitHead": "e2ca28a0ac34efdd010187ce8aaeb4f4c0b8d752"
|
|
67
72
|
}
|