@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.
@@ -6,7 +6,6 @@ import { promLanguageDefinition } from 'monaco-promql';
6
6
  import { parser, LabelMatchers, VectorSelector, PromQL, FunctionCallBody, StringLiteral, UnquotedLabelMatcher, BinaryExpr, NumberDurationLiteralInDurationContext, MatrixSelector, GroupingLabels, AggregateModifier, AggregateExpr, Identifier, LabelName, MatchOp, EqlSingle, EqlRegex, Neq, NeqRegex } from '@fc-components/lezer-metricsql';
7
7
  import { v4 } from 'uuid';
8
8
  import { css } from '@emotion/css';
9
- import UFuzzy from '@leeoniya/ufuzzy';
10
9
 
11
10
  function _arrayLikeToArray(r, a) {
12
11
  (null == a || a > r.length) && (a = r.length);
@@ -1487,24 +1486,23 @@ function notEmpty(value) {
1487
1486
  return value !== null && value !== undefined;
1488
1487
  }
1489
1488
 
1490
- var metricNamesSearchClient = /*#__PURE__*/new UFuzzy({
1491
- intraMode: 1
1492
- });
1489
+ // const metricNamesSearchClient = new UFuzzy({ intraMode: 1 });
1493
1490
  // we order items like: history, functions, metrics
1494
1491
  function getAllMetricNamesCompletions(dataProvider) {
1495
1492
  var metricNames = dataProvider.getAllMetricNames();
1496
- if (metricNames.length > dataProvider.metricNamesSuggestionLimit) {
1497
- var monacoSettings = dataProvider.monacoSettings;
1498
- monacoSettings.enableAutocompleteSuggestionsUpdate();
1499
- if (monacoSettings.inputInRange) {
1500
- var _metricNamesSearchCli, _metricNamesSearchCli2;
1501
- metricNames = (_metricNamesSearchCli = (_metricNamesSearchCli2 = metricNamesSearchClient.filter(metricNames, monacoSettings.inputInRange)) == null ? void 0 : _metricNamesSearchCli2.slice(0, dataProvider.metricNamesSuggestionLimit).map(function (idx) {
1502
- return metricNames[idx];
1503
- })) != null ? _metricNamesSearchCli : [];
1504
- } else {
1505
- metricNames = metricNames.slice(0, dataProvider.metricNamesSuggestionLimit);
1506
- }
1507
- }
1493
+ // if (metricNames.length > dataProvider.metricNamesSuggestionLimit) {
1494
+ // const { monacoSettings } = dataProvider;
1495
+ // monacoSettings.enableAutocompleteSuggestionsUpdate();
1496
+ // if (monacoSettings.inputInRange) {
1497
+ // metricNames =
1498
+ // metricNamesSearchClient
1499
+ // .filter(metricNames, monacoSettings.inputInRange)
1500
+ // ?.slice(0, dataProvider.metricNamesSuggestionLimit)
1501
+ // .map((idx) => metricNames[idx]) ?? [];
1502
+ // } else {
1503
+ // metricNames = metricNames.slice(0, dataProvider.metricNamesSuggestionLimit);
1504
+ // }
1505
+ // }
1508
1506
  return dataProvider.metricNamesToMetrics(metricNames).map(function (metric) {
1509
1507
  return {
1510
1508
  type: 'METRIC_NAME',
@@ -1728,7 +1726,7 @@ function _getLabelValues() {
1728
1726
  }
1729
1727
  return _context6.a(3, 7);
1730
1728
  case 6:
1731
- if (key === labelName) {
1729
+ if (key === labelName && value) {
1732
1730
  labelValues.add(value);
1733
1731
  }
1734
1732
  case 7:
@@ -2933,7 +2931,9 @@ function YamlEditor(props) {
2933
2931
  }],
2934
2932
  colors: {
2935
2933
  'editor.background': '#00000000',
2936
- focusBorder: '#00000000'
2934
+ focusBorder: '#00000000',
2935
+ 'editor.lineHighlightBackground': '#00000000',
2936
+ 'editor.lineHighlightBorder': '#00000000'
2937
2937
  }
2938
2938
  });
2939
2939
  editor.defineTheme('yaml-dark', {
@@ -2965,7 +2965,9 @@ function YamlEditor(props) {
2965
2965
  }],
2966
2966
  colors: {
2967
2967
  'editor.background': '#00000000',
2968
- focusBorder: '#00000000'
2968
+ focusBorder: '#00000000',
2969
+ 'editor.lineHighlightBackground': '#00000000',
2970
+ 'editor.lineHighlightBorder': '#00000000'
2969
2971
  }
2970
2972
  });
2971
2973
  var isEditorFocused = editor$1.createContextKey('isEditorFocused' + id, false);
@@ -3143,7 +3145,9 @@ function YamlEditor(props) {
3143
3145
  top: SIZE_MAP$1[size].top,
3144
3146
  bottom: SIZE_MAP$1[size].bottom
3145
3147
  },
3146
- renderLineHighlight: 'line',
3148
+ renderLineHighlight: 'none',
3149
+ renderLineHighlightOnlyWhenFocus: false,
3150
+ hideCursorInOverviewRuler: true,
3147
3151
  scrollbar: {
3148
3152
  vertical: 'auto',
3149
3153
  verticalScrollbarSize: 8,