monacopilot 0.8.10 → 0.8.12
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.d.mts +16 -10
- package/dist/index.d.ts +16 -10
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -7,8 +7,9 @@ type EditorBuiltInTheme = Theme;
|
|
|
7
7
|
|
|
8
8
|
declare const _default: readonly ["react", "angular", "vue.js", "express", "django", "flask", "spring boot", "asp.net core", "ruby on rails", "laravel", "symfony", "node.js", "bootstrap", "tailwind css", "svelte", "meteor", "kotlin", "swiftui", "xamarin", "react native", "flutter", "tensorflow", "pytorch", "keras", "scikit-learn", "fastapi", "graphql", "redux", "electron", "qt", "unity", "unreal engine", "apache hadoop", "apache spark", "apache kafka", "next.js", "nuxt.js", "gatsby", "hugo", "jekyll", "strapi", "drupal", "magento", "shopify", "woocommerce", "cordova", "ionic", "pandas", "numpy", "vuex", "three.js", "anime.js", "babylon.js", "backbone.js", "ember.js", "mocha", "jest", "enzyme", "chai", "sinon", "cypress", "selenium", "playwright", "puppeteer", "greensock (gsap)", "framer motion", "vuetify", "ant design", "material-ui", "foundation", "alpine.js", "akka", "vert.x", "quarkus", "helidon", "micronaut", "grails", "phoenix", "blazor", "tornado", "bottle", "falcon", "masonite", "zurb foundation", "bulma", "milligram", "stimulus", "mithril", "aurelia", "d3.js", "chart.js", "highcharts", "plotly.js", "leaflet", "openlayers", "thymeleaf", "mustache.js", "handlebars", "freemarker", "liquid"];
|
|
9
9
|
|
|
10
|
-
type
|
|
10
|
+
type EndpointType = string;
|
|
11
11
|
type FrameworkType = (typeof _default)[number];
|
|
12
|
+
type CompletionSpeedType = 'little-faster' | 'normal';
|
|
12
13
|
/**
|
|
13
14
|
* Themes available for the Rich Monaco Editor.
|
|
14
15
|
*/
|
|
@@ -16,21 +17,26 @@ type ThemeType = 'active4d' | 'all-hallows-eve' | 'amy' | 'birds-of-paradise' |
|
|
|
16
17
|
interface EditorProps extends EditorProps$1 {
|
|
17
18
|
/**
|
|
18
19
|
* The API endpoint where you started the completion service.
|
|
19
|
-
* [Learn more](https://monacopilot.vercel.app/docs/
|
|
20
|
+
* [Learn more](https://monacopilot.vercel.app/docs/guide/copilot-setup#integrating-copilot-to-the-editor)
|
|
20
21
|
*/
|
|
21
|
-
endpoint?:
|
|
22
|
+
endpoint?: EndpointType;
|
|
22
23
|
/**
|
|
23
24
|
* The framework you want to use for the completion.
|
|
24
25
|
* This can provide framework-specific completions.
|
|
25
26
|
* If you don't specify a framework, the completion will be specific to the language (provided as the `language` prop).
|
|
26
|
-
* [Learn more](https://monacopilot.vercel.app/docs/getting-started#framework)
|
|
27
27
|
*/
|
|
28
28
|
framework?: FrameworkType;
|
|
29
29
|
/**
|
|
30
30
|
* The theme you want to use for the editor.
|
|
31
|
-
* You can play with the themes [here](https://monacopilot.vercel.app/themes).
|
|
32
31
|
*/
|
|
33
32
|
theme?: EditorBuiltInTheme | ThemeType;
|
|
33
|
+
/**
|
|
34
|
+
* Controls the speed of the completion.
|
|
35
|
+
* Set to `little-faster` for slightly faster completions. Note that this option has a high cost, though not exorbitant.
|
|
36
|
+
* For a detailed cost comparison, see the [cost overview table](https://monacopilot.vercel.app/docs/copilot-cost-overview).
|
|
37
|
+
* @default 'normal'
|
|
38
|
+
*/
|
|
39
|
+
completionSpeed?: CompletionSpeedType;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
type CompletionModelType = 'llama3-70b-8192';
|
|
@@ -47,13 +53,13 @@ interface CompletionMetadata {
|
|
|
47
53
|
language: string;
|
|
48
54
|
framework: FrameworkType | undefined;
|
|
49
55
|
cursorPosition: {
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
lineNumber: number;
|
|
57
|
+
columnNumber: number;
|
|
52
58
|
};
|
|
53
59
|
codeAfterCursor: string;
|
|
54
60
|
codeBeforeCursor: string;
|
|
55
61
|
editorState: {
|
|
56
|
-
completionMode: 'fill
|
|
62
|
+
completionMode: 'contextual-fill' | 'continuation' | 'expansion';
|
|
57
63
|
codeLengthBeforeCursor: number;
|
|
58
64
|
totalCodeLength: number;
|
|
59
65
|
};
|
|
@@ -82,6 +88,6 @@ declare class Copilot {
|
|
|
82
88
|
}>;
|
|
83
89
|
}
|
|
84
90
|
|
|
85
|
-
declare const Editor: ({ endpoint, framework, theme, ...props }: EditorProps) => React.JSX.Element;
|
|
91
|
+
declare const Editor: ({ endpoint, framework, theme, completionSpeed, ...props }: EditorProps) => React.JSX.Element;
|
|
86
92
|
|
|
87
|
-
export { Copilot, Editor, type EditorProps, type FrameworkType, type ThemeType as Theme
|
|
93
|
+
export { Copilot, Editor, type EditorProps, type EndpointType, type FrameworkType, type ThemeType as Theme };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ type EditorBuiltInTheme = Theme;
|
|
|
7
7
|
|
|
8
8
|
declare const _default: readonly ["react", "angular", "vue.js", "express", "django", "flask", "spring boot", "asp.net core", "ruby on rails", "laravel", "symfony", "node.js", "bootstrap", "tailwind css", "svelte", "meteor", "kotlin", "swiftui", "xamarin", "react native", "flutter", "tensorflow", "pytorch", "keras", "scikit-learn", "fastapi", "graphql", "redux", "electron", "qt", "unity", "unreal engine", "apache hadoop", "apache spark", "apache kafka", "next.js", "nuxt.js", "gatsby", "hugo", "jekyll", "strapi", "drupal", "magento", "shopify", "woocommerce", "cordova", "ionic", "pandas", "numpy", "vuex", "three.js", "anime.js", "babylon.js", "backbone.js", "ember.js", "mocha", "jest", "enzyme", "chai", "sinon", "cypress", "selenium", "playwright", "puppeteer", "greensock (gsap)", "framer motion", "vuetify", "ant design", "material-ui", "foundation", "alpine.js", "akka", "vert.x", "quarkus", "helidon", "micronaut", "grails", "phoenix", "blazor", "tornado", "bottle", "falcon", "masonite", "zurb foundation", "bulma", "milligram", "stimulus", "mithril", "aurelia", "d3.js", "chart.js", "highcharts", "plotly.js", "leaflet", "openlayers", "thymeleaf", "mustache.js", "handlebars", "freemarker", "liquid"];
|
|
9
9
|
|
|
10
|
-
type
|
|
10
|
+
type EndpointType = string;
|
|
11
11
|
type FrameworkType = (typeof _default)[number];
|
|
12
|
+
type CompletionSpeedType = 'little-faster' | 'normal';
|
|
12
13
|
/**
|
|
13
14
|
* Themes available for the Rich Monaco Editor.
|
|
14
15
|
*/
|
|
@@ -16,21 +17,26 @@ type ThemeType = 'active4d' | 'all-hallows-eve' | 'amy' | 'birds-of-paradise' |
|
|
|
16
17
|
interface EditorProps extends EditorProps$1 {
|
|
17
18
|
/**
|
|
18
19
|
* The API endpoint where you started the completion service.
|
|
19
|
-
* [Learn more](https://monacopilot.vercel.app/docs/
|
|
20
|
+
* [Learn more](https://monacopilot.vercel.app/docs/guide/copilot-setup#integrating-copilot-to-the-editor)
|
|
20
21
|
*/
|
|
21
|
-
endpoint?:
|
|
22
|
+
endpoint?: EndpointType;
|
|
22
23
|
/**
|
|
23
24
|
* The framework you want to use for the completion.
|
|
24
25
|
* This can provide framework-specific completions.
|
|
25
26
|
* If you don't specify a framework, the completion will be specific to the language (provided as the `language` prop).
|
|
26
|
-
* [Learn more](https://monacopilot.vercel.app/docs/getting-started#framework)
|
|
27
27
|
*/
|
|
28
28
|
framework?: FrameworkType;
|
|
29
29
|
/**
|
|
30
30
|
* The theme you want to use for the editor.
|
|
31
|
-
* You can play with the themes [here](https://monacopilot.vercel.app/themes).
|
|
32
31
|
*/
|
|
33
32
|
theme?: EditorBuiltInTheme | ThemeType;
|
|
33
|
+
/**
|
|
34
|
+
* Controls the speed of the completion.
|
|
35
|
+
* Set to `little-faster` for slightly faster completions. Note that this option has a high cost, though not exorbitant.
|
|
36
|
+
* For a detailed cost comparison, see the [cost overview table](https://monacopilot.vercel.app/docs/copilot-cost-overview).
|
|
37
|
+
* @default 'normal'
|
|
38
|
+
*/
|
|
39
|
+
completionSpeed?: CompletionSpeedType;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
type CompletionModelType = 'llama3-70b-8192';
|
|
@@ -47,13 +53,13 @@ interface CompletionMetadata {
|
|
|
47
53
|
language: string;
|
|
48
54
|
framework: FrameworkType | undefined;
|
|
49
55
|
cursorPosition: {
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
lineNumber: number;
|
|
57
|
+
columnNumber: number;
|
|
52
58
|
};
|
|
53
59
|
codeAfterCursor: string;
|
|
54
60
|
codeBeforeCursor: string;
|
|
55
61
|
editorState: {
|
|
56
|
-
completionMode: 'fill
|
|
62
|
+
completionMode: 'contextual-fill' | 'continuation' | 'expansion';
|
|
57
63
|
codeLengthBeforeCursor: number;
|
|
58
64
|
totalCodeLength: number;
|
|
59
65
|
};
|
|
@@ -82,6 +88,6 @@ declare class Copilot {
|
|
|
82
88
|
}>;
|
|
83
89
|
}
|
|
84
90
|
|
|
85
|
-
declare const Editor: ({ endpoint, framework, theme, ...props }: EditorProps) => React.JSX.Element;
|
|
91
|
+
declare const Editor: ({ endpoint, framework, theme, completionSpeed, ...props }: EditorProps) => React.JSX.Element;
|
|
86
92
|
|
|
87
|
-
export { Copilot, Editor, type EditorProps, type FrameworkType, type ThemeType as Theme
|
|
93
|
+
export { Copilot, Editor, type EditorProps, type EndpointType, type FrameworkType, type ThemeType as Theme };
|