@hpcc-js/codemirror 3.3.8 → 3.4.1
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.js +12386 -4649
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -32
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +4 -4
- package/src/Editor.ts +10 -0
- package/types/Editor.d.ts +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/codemirror",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "hpcc-js - Viz Code Mirror",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"update-major": "npx --yes npm-check-updates -u"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@hpcc-js/common": "^3.3.
|
|
40
|
+
"@hpcc-js/common": "^3.3.9"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@hpcc-js/esbuild-plugins": "^1.4.
|
|
43
|
+
"@hpcc-js/esbuild-plugins": "^1.4.9",
|
|
44
44
|
"codemirror": "5.65.19"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
55
55
|
},
|
|
56
56
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "92489547b0e57f479a691236b1a47e977b43cf2e"
|
|
58
58
|
}
|
package/src/Editor.ts
CHANGED
|
@@ -124,6 +124,16 @@ export class Editor extends HTMLWidget {
|
|
|
124
124
|
return this;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
addLineClass(options: { lineNum: number, where?: "text" | "background" | "gutter", cssClass: string }): this {
|
|
128
|
+
this._codemirror.addLineClass(this._codemirror.getLineHandle(options.lineNum), options.where ?? "background", options.cssClass);
|
|
129
|
+
return this;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
removeLineClass(options: { lineNum: number, where?: "text" | "background" | "gutter", cssClass: string }): this {
|
|
133
|
+
this._codemirror.removeLineClass(this._codemirror.getLineHandle(options.lineNum), options.where ?? "background", options.cssClass);
|
|
134
|
+
return this;
|
|
135
|
+
}
|
|
136
|
+
|
|
127
137
|
removeAllHighlight(): this {
|
|
128
138
|
for (const marked of this._markedText) {
|
|
129
139
|
marked.clear();
|
package/types/Editor.d.ts
CHANGED
|
@@ -30,6 +30,16 @@ export declare class Editor extends HTMLWidget {
|
|
|
30
30
|
highlightInfo(start: IPosition | number, end: IPosition | number): this;
|
|
31
31
|
highlightWarning(start: IPosition | number, end: IPosition | number): this;
|
|
32
32
|
highlightError(start: IPosition | number, end: IPosition | number): this;
|
|
33
|
+
addLineClass(options: {
|
|
34
|
+
lineNum: number;
|
|
35
|
+
where?: "text" | "background" | "gutter";
|
|
36
|
+
cssClass: string;
|
|
37
|
+
}): this;
|
|
38
|
+
removeLineClass(options: {
|
|
39
|
+
lineNum: number;
|
|
40
|
+
where?: "text" | "background" | "gutter";
|
|
41
|
+
cssClass: string;
|
|
42
|
+
}): this;
|
|
33
43
|
removeAllHighlight(): this;
|
|
34
44
|
positionAt(i: number): IPosition;
|
|
35
45
|
getLineLength(lineNumber: number): number;
|