@yoopta/code 4.0.0-rc.20 → 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.
@@ -1,5 +1,5 @@
1
1
  import { YooptaPlugin } from '@yoopta/editor';
2
- import { CodeElementProps } from '../types';
3
- declare const Code: YooptaPlugin<"code", CodeElementProps, Record<string, unknown>>;
2
+ import { CodeElementProps, CodePluginBlockOptions } from '../types';
3
+ declare const Code: YooptaPlugin<"code", CodeElementProps, CodePluginBlockOptions>;
4
4
  export { Code };
5
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,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAsB,MAAM,UAAU,CAAC;AAGhE,QAAA,MAAM,IAAI,iEA8CR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
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?: string;
5
- theme?: string;
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
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC,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,4CA4DjE,CAAC"}
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"}
@@ -1,19 +1,79 @@
1
- declare const LANGUAGES: {
2
- HTML: import("@codemirror/language").LanguageSupport;
3
- CSS: import("@codemirror/language").LanguageSupport;
4
- JavaScript: import("@codemirror/language").LanguageSupport;
5
- PHP: import("@codemirror/language").LanguageSupport;
6
- 'C++': import("@codemirror/language").LanguageSupport;
7
- Java: import("@codemirror/language").LanguageSupport;
8
- Python: import("@codemirror/language").LanguageSupport;
9
- Markdown: import("@codemirror/language").LanguageSupport;
10
- Rust: import("@codemirror/language").LanguageSupport;
11
- Vue: import("@codemirror/language").LanguageSupport;
12
- SQL: import("@codemirror/language").LanguageSupport;
13
- Angular: import("@codemirror/language").LanguageSupport;
14
- JSON: import("@codemirror/language").LanguageSupport;
15
- XML: import("@codemirror/language").LanguageSupport;
16
- YAML: import("@codemirror/language").LanguageSupport;
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 { LANGUAGES };
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,SAAS;;;;;;;;;;;;;;;;CAgBd,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
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"}
@@ -1,4 +1,4 @@
1
- export declare const themes: {
1
+ export declare const THEMES_MAP: {
2
2
  BasicLight: import("@codemirror/state").Extension;
3
3
  BasicDark: import("@codemirror/state").Extension;
4
4
  VSCode: import("@codemirror/state").Extension;
@@ -1 +1 @@
1
- {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/utils/themes.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAalB,CAAC"}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/code",
3
- "version": "4.0.0-rc.20",
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",
@@ -68,5 +68,5 @@
68
68
  "devDependencies": {
69
69
  "check-peer-dependencies": "^4.3.0"
70
70
  },
71
- "gitHead": "daa226c7a3570b330c6f196f6a19729d72785733"
71
+ "gitHead": "e2ca28a0ac34efdd010187ce8aaeb4f4c0b8d752"
72
72
  }