@fc-components/monaco-editor 0.1.14 → 0.1.16

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.
@@ -12,7 +12,6 @@ var monacoPromql = require('monaco-promql');
12
12
  var lezerMetricsql = require('@fc-components/lezer-metricsql');
13
13
  var uuid = require('uuid');
14
14
  var css = require('@emotion/css');
15
- var UFuzzy = _interopDefault(require('@leeoniya/ufuzzy'));
16
15
 
17
16
  function _arrayLikeToArray(r, a) {
18
17
  (null == a || a > r.length) && (a = r.length);
@@ -1493,24 +1492,23 @@ function notEmpty(value) {
1493
1492
  return value !== null && value !== undefined;
1494
1493
  }
1495
1494
 
1496
- var metricNamesSearchClient = /*#__PURE__*/new UFuzzy({
1497
- intraMode: 1
1498
- });
1495
+ // const metricNamesSearchClient = new UFuzzy({ intraMode: 1 });
1499
1496
  // we order items like: history, functions, metrics
1500
1497
  function getAllMetricNamesCompletions(dataProvider) {
1501
1498
  var metricNames = dataProvider.getAllMetricNames();
1502
- if (metricNames.length > dataProvider.metricNamesSuggestionLimit) {
1503
- var monacoSettings = dataProvider.monacoSettings;
1504
- monacoSettings.enableAutocompleteSuggestionsUpdate();
1505
- if (monacoSettings.inputInRange) {
1506
- var _metricNamesSearchCli, _metricNamesSearchCli2;
1507
- metricNames = (_metricNamesSearchCli = (_metricNamesSearchCli2 = metricNamesSearchClient.filter(metricNames, monacoSettings.inputInRange)) == null ? void 0 : _metricNamesSearchCli2.slice(0, dataProvider.metricNamesSuggestionLimit).map(function (idx) {
1508
- return metricNames[idx];
1509
- })) != null ? _metricNamesSearchCli : [];
1510
- } else {
1511
- metricNames = metricNames.slice(0, dataProvider.metricNamesSuggestionLimit);
1512
- }
1513
- }
1499
+ // if (metricNames.length > dataProvider.metricNamesSuggestionLimit) {
1500
+ // const { monacoSettings } = dataProvider;
1501
+ // monacoSettings.enableAutocompleteSuggestionsUpdate();
1502
+ // if (monacoSettings.inputInRange) {
1503
+ // metricNames =
1504
+ // metricNamesSearchClient
1505
+ // .filter(metricNames, monacoSettings.inputInRange)
1506
+ // ?.slice(0, dataProvider.metricNamesSuggestionLimit)
1507
+ // .map((idx) => metricNames[idx]) ?? [];
1508
+ // } else {
1509
+ // metricNames = metricNames.slice(0, dataProvider.metricNamesSuggestionLimit);
1510
+ // }
1511
+ // }
1514
1512
  return dataProvider.metricNamesToMetrics(metricNames).map(function (metric) {
1515
1513
  return {
1516
1514
  type: 'METRIC_NAME',
@@ -1734,7 +1732,7 @@ function _getLabelValues() {
1734
1732
  }
1735
1733
  return _context6.a(3, 7);
1736
1734
  case 6:
1737
- if (key === labelName) {
1735
+ if (key === labelName && value) {
1738
1736
  labelValues.add(value);
1739
1737
  }
1740
1738
  case 7:
@@ -2939,7 +2937,9 @@ function YamlEditor(props) {
2939
2937
  }],
2940
2938
  colors: {
2941
2939
  'editor.background': '#00000000',
2942
- focusBorder: '#00000000'
2940
+ focusBorder: '#00000000',
2941
+ 'editor.lineHighlightBackground': '#00000000',
2942
+ 'editor.lineHighlightBorder': '#00000000'
2943
2943
  }
2944
2944
  });
2945
2945
  monaco.editor.defineTheme('yaml-dark', {
@@ -2971,7 +2971,9 @@ function YamlEditor(props) {
2971
2971
  }],
2972
2972
  colors: {
2973
2973
  'editor.background': '#00000000',
2974
- focusBorder: '#00000000'
2974
+ focusBorder: '#00000000',
2975
+ 'editor.lineHighlightBackground': '#00000000',
2976
+ 'editor.lineHighlightBorder': '#00000000'
2975
2977
  }
2976
2978
  });
2977
2979
  var isEditorFocused = editor.createContextKey('isEditorFocused' + id, false);
@@ -3149,7 +3151,9 @@ function YamlEditor(props) {
3149
3151
  top: SIZE_MAP$1[size].top,
3150
3152
  bottom: SIZE_MAP$1[size].bottom
3151
3153
  },
3152
- renderLineHighlight: 'line',
3154
+ renderLineHighlight: 'none',
3155
+ renderLineHighlightOnlyWhenFocus: false,
3156
+ hideCursorInOverviewRuler: true,
3153
3157
  scrollbar: {
3154
3158
  vertical: 'auto',
3155
3159
  verticalScrollbarSize: 8,