@eccenca/gui-elements 23.4.2-rc.0 → 23.5.0
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/CHANGELOG.md +8 -0
- package/dist/cjs/extensions/codemirror/CodeMirror.js +9 -2
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +9 -2
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +14 -1
- package/package.json +1 -1
- package/src/extensions/codemirror/CodeMirror.tsx +27 -1
- package/src/extensions/codemirror/_codemirror.scss +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [23.5.0] - 2024-02-15
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `<CodeEditor />`
|
|
14
|
+
- visualize the usage of tabulator chars by background color and arrow symbol
|
|
15
|
+
- new `tabIntentSize`, `tabIntentStyle`, `tabForceSpaceForModes` properties to give better control over tabulator usage
|
|
16
|
+
|
|
9
17
|
### Fixed
|
|
10
18
|
|
|
11
19
|
- `<Depiction />`
|
|
@@ -50,16 +50,23 @@ exports.supportedCodeEditorModes = [
|
|
|
50
50
|
/**
|
|
51
51
|
* Includes a code editor, currently we use CodeMirror library as base.
|
|
52
52
|
*/
|
|
53
|
-
const CodeEditor = ({ onChange, name, id, mode = "undefined", preventLineNumbers = false, defaultValue, readOnly = false, height, wrapLines = false, outerDivAttributes, }) => {
|
|
53
|
+
const CodeEditor = ({ onChange, name, id, mode = "undefined", preventLineNumbers = false, defaultValue, readOnly = false, height, wrapLines = false, outerDivAttributes, tabIntentSize = 2, tabIntentStyle = "tab", tabForceSpaceForModes = ["python", "yaml"], }) => {
|
|
54
54
|
const domRef = (0, react_1.useRef)(null);
|
|
55
55
|
(0, react_1.useEffect)(() => {
|
|
56
56
|
const editorInstance = codemirror_1.default.fromTextArea(domRef.current, {
|
|
57
57
|
mode: convertMode(mode),
|
|
58
58
|
lineWrapping: wrapLines,
|
|
59
59
|
lineNumbers: !preventLineNumbers,
|
|
60
|
-
tabSize:
|
|
60
|
+
tabSize: tabIntentSize,
|
|
61
|
+
indentUnit: tabIntentSize,
|
|
62
|
+
indentWithTabs: tabIntentStyle === "tab" && !(tabForceSpaceForModes !== null && tabForceSpaceForModes !== void 0 ? tabForceSpaceForModes : []).includes(mode),
|
|
61
63
|
theme: "xq-light",
|
|
62
64
|
readOnly: readOnly,
|
|
65
|
+
extraKeys: {
|
|
66
|
+
Tab: function (cm) {
|
|
67
|
+
cm.execCommand(cm.getOption("indentWithTabs") ? "insertTab" : "insertSoftTab");
|
|
68
|
+
},
|
|
69
|
+
},
|
|
63
70
|
});
|
|
64
71
|
editorInstance.on("change", (api) => {
|
|
65
72
|
onChange(api.getValue());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeMirror.js","sourceRoot":"","sources":["../../../../src/extensions/codemirror/CodeMirror.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyE;AACzE,4DAAmE;AAEnE,gDAA8C;AAC9C,4CAA0C;AAC1C,4CAA0C;AAC1C,sCAAoC;AACpC,4CAA0C;AAC1C,sCAAoC;AACpC,4CAA0C;AAC1C,wCAAsC;AACtC,oDAAkD;AAElD,6DAAsE;AAEzD,QAAA,wBAAwB,GAAG;IACpC,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,MAAM;IACN,MAAM;IACN,WAAW;CACL,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeMirror.js","sourceRoot":"","sources":["../../../../src/extensions/codemirror/CodeMirror.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;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38
38
|
*/
|
|
39
39
|
export var CodeEditor = function (_a) {
|
|
40
|
-
var onChange = _a.onChange, name = _a.name, id = _a.id, _b = _a.mode, mode = _b === void 0 ? "undefined" : _b, _c = _a.preventLineNumbers, preventLineNumbers = _c === void 0 ? false : _c, defaultValue = _a.defaultValue, _d = _a.readOnly, readOnly = _d === void 0 ? false : _d, height = _a.height, _e = _a.wrapLines, wrapLines = _e === void 0 ? false : _e, outerDivAttributes = _a.outerDivAttributes;
|
|
40
|
+
var onChange = _a.onChange, name = _a.name, id = _a.id, _b = _a.mode, mode = _b === void 0 ? "undefined" : _b, _c = _a.preventLineNumbers, preventLineNumbers = _c === void 0 ? false : _c, defaultValue = _a.defaultValue, _d = _a.readOnly, readOnly = _d === void 0 ? false : _d, height = _a.height, _e = _a.wrapLines, wrapLines = _e === void 0 ? false : _e, outerDivAttributes = _a.outerDivAttributes, _f = _a.tabIntentSize, tabIntentSize = _f === void 0 ? 2 : _f, _g = _a.tabIntentStyle, tabIntentStyle = _g === void 0 ? "tab" : _g, _h = _a.tabForceSpaceForModes, tabForceSpaceForModes = _h === void 0 ? ["python", "yaml"] : _h;
|
|
41
41
|
var domRef = useRef(null);
|
|
42
42
|
useEffect(function () {
|
|
43
43
|
var editorInstance = CodeMirror.fromTextArea(domRef.current, {
|
|
44
44
|
mode: convertMode(mode),
|
|
45
45
|
lineWrapping: wrapLines,
|
|
46
46
|
lineNumbers: !preventLineNumbers,
|
|
47
|
-
tabSize:
|
|
47
|
+
tabSize: tabIntentSize,
|
|
48
|
+
indentUnit: tabIntentSize,
|
|
49
|
+
indentWithTabs: tabIntentStyle === "tab" && !(tabForceSpaceForModes !== null && tabForceSpaceForModes !== void 0 ? tabForceSpaceForModes : []).includes(mode),
|
|
48
50
|
theme: "xq-light",
|
|
49
51
|
readOnly: readOnly,
|
|
52
|
+
extraKeys: {
|
|
53
|
+
Tab: function (cm) {
|
|
54
|
+
cm.execCommand(cm.getOption("indentWithTabs") ? "insertTab" : "insertSoftTab");
|
|
55
|
+
},
|
|
56
|
+
},
|
|
50
57
|
});
|
|
51
58
|
editorInstance.on("change", function (api) {
|
|
52
59
|
onChange(api.getValue());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeMirror.js","sourceRoot":"","sources":["../../../../src/extensions/codemirror/CodeMirror.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAA0B,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,UAAyC,MAAM,YAAY,CAAC;AAEnE,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,0CAA0C,CAAC;AAElD,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,CAAC,IAAM,wBAAwB,GAAG;IACpC,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,MAAM;IACN,MAAM;IACN,WAAW;CACL,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeMirror.js","sourceRoot":"","sources":["../../../../src/extensions/codemirror/CodeMirror.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAA0B,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,UAAyC,MAAM,YAAY,CAAC;AAEnE,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAC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
|
/** Long lines are wrapped and displayed on multiple lines */
|
|
46
46
|
wrapLines?: boolean;
|
|
47
47
|
outerDivAttributes?: Partial<TextareaHTMLAttributes<HTMLDivElement>>;
|
|
48
|
+
/**
|
|
49
|
+
* Size in spaces that is used for a tabulator key.
|
|
50
|
+
*/
|
|
51
|
+
tabIntentSize?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Set the char type that is used for the tabulator key.
|
|
54
|
+
* If set to `space` the a number of `tabIntentSize` spaces is used instead of a tab.
|
|
55
|
+
*/
|
|
56
|
+
tabIntentStyle?: "tab" | "space";
|
|
57
|
+
/**
|
|
58
|
+
* For some modes an indent style with `space` can be forced, even if `tabIntentStyle="tab"` is set.
|
|
59
|
+
*/
|
|
60
|
+
tabForceSpaceForModes?: SupportedCodeEditorModes[];
|
|
48
61
|
}
|
|
49
62
|
/**
|
|
50
63
|
* Includes a code editor, currently we use CodeMirror library as base.
|
|
51
64
|
*/
|
|
52
|
-
export declare const CodeEditor: ({ onChange, name, id, mode, preventLineNumbers, defaultValue, readOnly, height, wrapLines, outerDivAttributes, }: CodeEditorProps) => React.JSX.Element;
|
|
65
|
+
export declare const CodeEditor: ({ onChange, name, id, mode, preventLineNumbers, defaultValue, readOnly, height, wrapLines, outerDivAttributes, tabIntentSize, tabIntentStyle, tabForceSpaceForModes, }: CodeEditorProps) => React.JSX.Element;
|
|
53
66
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eccenca/gui-elements",
|
|
3
3
|
"description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
|
|
4
|
-
"version": "23.
|
|
4
|
+
"version": "23.5.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/eccenca/gui-elements",
|
|
7
7
|
"bugs": "https://github.com/eccenca/gui-elements/issues",
|
|
@@ -66,6 +66,22 @@ export interface CodeEditorProps {
|
|
|
66
66
|
wrapLines?: boolean;
|
|
67
67
|
|
|
68
68
|
outerDivAttributes?: Partial<TextareaHTMLAttributes<HTMLDivElement>>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Size in spaces that is used for a tabulator key.
|
|
72
|
+
*/
|
|
73
|
+
tabIntentSize?: number;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Set the char type that is used for the tabulator key.
|
|
77
|
+
* If set to `space` the a number of `tabIntentSize` spaces is used instead of a tab.
|
|
78
|
+
*/
|
|
79
|
+
tabIntentStyle?: "tab" | "space";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* For some modes an indent style with `space` can be forced, even if `tabIntentStyle="tab"` is set.
|
|
83
|
+
*/
|
|
84
|
+
tabForceSpaceForModes?: SupportedCodeEditorModes[];
|
|
69
85
|
}
|
|
70
86
|
|
|
71
87
|
/**
|
|
@@ -82,6 +98,9 @@ export const CodeEditor = ({
|
|
|
82
98
|
height,
|
|
83
99
|
wrapLines = false,
|
|
84
100
|
outerDivAttributes,
|
|
101
|
+
tabIntentSize = 2,
|
|
102
|
+
tabIntentStyle = "tab",
|
|
103
|
+
tabForceSpaceForModes = ["python", "yaml"],
|
|
85
104
|
}: CodeEditorProps) => {
|
|
86
105
|
const domRef = useRef<HTMLTextAreaElement>(null);
|
|
87
106
|
|
|
@@ -90,9 +109,16 @@ export const CodeEditor = ({
|
|
|
90
109
|
mode: convertMode(mode),
|
|
91
110
|
lineWrapping: wrapLines,
|
|
92
111
|
lineNumbers: !preventLineNumbers,
|
|
93
|
-
tabSize:
|
|
112
|
+
tabSize: tabIntentSize,
|
|
113
|
+
indentUnit: tabIntentSize,
|
|
114
|
+
indentWithTabs: tabIntentStyle === "tab" && !(tabForceSpaceForModes ?? []).includes(mode),
|
|
94
115
|
theme: "xq-light",
|
|
95
116
|
readOnly: readOnly,
|
|
117
|
+
extraKeys: {
|
|
118
|
+
Tab: function (cm) {
|
|
119
|
+
cm.execCommand(cm.getOption("indentWithTabs") ? "insertTab" : "insertSoftTab");
|
|
120
|
+
},
|
|
121
|
+
},
|
|
96
122
|
});
|
|
97
123
|
|
|
98
124
|
editorInstance.on("change", (api) => {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
max-width: 100%;
|
|
8
8
|
|
|
9
9
|
.CodeMirror {
|
|
10
|
+
height: 290px;
|
|
10
11
|
clip-path: unset !important; // we may check later why they set inset(0) now
|
|
11
12
|
border-radius: $pt-border-radius;
|
|
12
|
-
height: 290px;
|
|
13
13
|
|
|
14
14
|
// get them a "border" like input boxes from blueprintjs
|
|
15
15
|
box-shadow: input-transition-shadow($input-shadow-color-focus), $pt-input-box-shadow;
|
|
@@ -54,6 +54,20 @@
|
|
|
54
54
|
.CodeMirror-sizer {
|
|
55
55
|
border-right-width: $eccgui-size-inline-whitespace !important;
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
.cm-tab {
|
|
59
|
+
position: relative;
|
|
60
|
+
|
|
61
|
+
// mark tabulator chars
|
|
62
|
+
background-color: $eccgui-color-info-background;
|
|
63
|
+
|
|
64
|
+
&::after {
|
|
65
|
+
position: absolute;
|
|
66
|
+
left: 10%;
|
|
67
|
+
color: rgba($eccgui-color-workspace-text, $eccgui-opacity-muted);
|
|
68
|
+
content: "⇥";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
|