@fc-components/monaco-editor 0.1.19 → 0.1.20
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/monaco-editor.cjs.development.js +24 -6
- package/dist/monaco-editor.cjs.development.js.map +1 -1
- package/dist/monaco-editor.cjs.production.min.js +1 -1
- package/dist/monaco-editor.cjs.production.min.js.map +1 -1
- package/dist/monaco-editor.esm.js +24 -6
- package/dist/monaco-editor.esm.js.map +1 -1
- package/dist/sql/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/sql/index.tsx +17 -2
|
@@ -3472,17 +3472,20 @@ var SIZE_MAP$2 = {
|
|
|
3472
3472
|
small: {
|
|
3473
3473
|
className: 'ant-input-sm',
|
|
3474
3474
|
top: 1,
|
|
3475
|
-
bottom: 1
|
|
3475
|
+
bottom: 1,
|
|
3476
|
+
minHeight: 24
|
|
3476
3477
|
},
|
|
3477
3478
|
middle: {
|
|
3478
3479
|
className: 'ant-input-md',
|
|
3479
3480
|
top: 1,
|
|
3480
|
-
bottom: 1
|
|
3481
|
+
bottom: 1,
|
|
3482
|
+
minHeight: 32
|
|
3481
3483
|
},
|
|
3482
3484
|
large: {
|
|
3483
3485
|
className: 'ant-input-lg',
|
|
3484
3486
|
top: 3,
|
|
3485
|
-
bottom: 2
|
|
3487
|
+
bottom: 2,
|
|
3488
|
+
minHeight: 40
|
|
3486
3489
|
}
|
|
3487
3490
|
};
|
|
3488
3491
|
var themeMap$2 = {
|
|
@@ -3493,7 +3496,9 @@ var containerDisabledClassName$2 = /*#__PURE__*/css(_templateObject$2 || (_templ
|
|
|
3493
3496
|
var containerReadOnlyClassName$2 = /*#__PURE__*/css(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .monaco-editor .cursors-layer > .cursor {\n opacity: 0 !important;\n }\n"])));
|
|
3494
3497
|
function SqlEditor(props) {
|
|
3495
3498
|
var id = v4();
|
|
3496
|
-
var
|
|
3499
|
+
var maxHeight = props.maxHeight,
|
|
3500
|
+
fontSize = props.fontSize,
|
|
3501
|
+
_props$size = props.size,
|
|
3497
3502
|
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
3498
3503
|
_props$theme = props.theme,
|
|
3499
3504
|
theme = _props$theme === void 0 ? 'light' : _props$theme,
|
|
@@ -3626,7 +3631,13 @@ function SqlEditor(props) {
|
|
|
3626
3631
|
};
|
|
3627
3632
|
var themeValue = themeMap$2[theme];
|
|
3628
3633
|
return React.createElement("div", {
|
|
3629
|
-
className: 'ant-input' + (size ? " " + SIZE_MAP$2[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName$2 : '') + (readOnly ? " " + containerReadOnlyClassName$2 : '')
|
|
3634
|
+
className: 'ant-input' + (size ? " " + SIZE_MAP$2[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName$2 : '') + (readOnly ? " " + containerReadOnlyClassName$2 : ''),
|
|
3635
|
+
style: {
|
|
3636
|
+
resize: 'vertical',
|
|
3637
|
+
overflow: 'auto',
|
|
3638
|
+
minHeight: SIZE_MAP$2[size].minHeight,
|
|
3639
|
+
maxHeight: maxHeight
|
|
3640
|
+
}
|
|
3630
3641
|
}, React.createElement("div", {
|
|
3631
3642
|
ref: containerRef
|
|
3632
3643
|
}, React.createElement(MonacoEditor, {
|
|
@@ -3649,9 +3660,11 @@ function SqlEditor(props) {
|
|
|
3649
3660
|
readOnly: readOnly || disabled,
|
|
3650
3661
|
scrollBeyondLastLine: false,
|
|
3651
3662
|
smoothScrolling: true,
|
|
3663
|
+
fontSize: fontSize,
|
|
3652
3664
|
tabSize: 2,
|
|
3653
3665
|
wordWrap: 'on',
|
|
3654
3666
|
automaticLayout: true,
|
|
3667
|
+
fixedOverflowWidgets: true,
|
|
3655
3668
|
glyphMargin: false,
|
|
3656
3669
|
lineNumbers: 'off',
|
|
3657
3670
|
lineNumbersMinChars: 0,
|
|
@@ -3661,7 +3674,12 @@ function SqlEditor(props) {
|
|
|
3661
3674
|
overviewRulerLanes: 0,
|
|
3662
3675
|
placeholder: placeholder,
|
|
3663
3676
|
renderLineHighlight: 'none',
|
|
3664
|
-
occurrencesHighlight: 'off'
|
|
3677
|
+
occurrencesHighlight: 'off',
|
|
3678
|
+
scrollbar: {
|
|
3679
|
+
vertical: 'hidden',
|
|
3680
|
+
horizontal: 'hidden',
|
|
3681
|
+
alwaysConsumeMouseWheel: false
|
|
3682
|
+
}
|
|
3665
3683
|
}
|
|
3666
3684
|
})));
|
|
3667
3685
|
}
|