@atlaskit/jql-editor 5.4.5 → 5.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/analytics/util.js +1 -1
  3. package/dist/cjs/plugins/autocomplete/components/autocomplete-dropdown/index.js +118 -42
  4. package/dist/cjs/plugins/autocomplete/components/autocomplete-dropdown/styled.js +12 -8
  5. package/dist/es2019/analytics/util.js +1 -1
  6. package/dist/es2019/plugins/autocomplete/components/autocomplete-dropdown/index.js +87 -20
  7. package/dist/es2019/plugins/autocomplete/components/autocomplete-dropdown/styled.js +9 -5
  8. package/dist/esm/analytics/util.js +1 -1
  9. package/dist/esm/plugins/autocomplete/components/autocomplete-dropdown/index.js +119 -43
  10. package/dist/esm/plugins/autocomplete/components/autocomplete-dropdown/styled.js +12 -7
  11. package/dist/types/accessibility/styled.d.ts +2 -3
  12. package/dist/types/common/styled.d.ts +2 -3
  13. package/dist/types/hooks/use-editor-theme/index.d.ts +2 -3
  14. package/dist/types/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +1 -1
  15. package/dist/types/plugins/autocomplete/components/autocomplete-dropdown/styled.d.ts +9 -9
  16. package/dist/types/plugins/autocomplete/components/autocomplete-option/styled.d.ts +14 -15
  17. package/dist/types/plugins/rich-inline-nodes/nodes/user/styled.d.ts +6 -7
  18. package/dist/types/state/util.d.ts +3 -3
  19. package/dist/types/ui/index.d.ts +0 -1
  20. package/dist/types/ui/intl-provider/index.d.ts +1 -1
  21. package/dist/types/ui/jql-editor-controls-content/base-expand-toggle/styled.d.ts +2 -3
  22. package/dist/types/ui/jql-editor-controls-content/base-syntax-help/styled.d.ts +2 -3
  23. package/dist/types/ui/jql-editor-footer-content/jql-editor-help/styled.d.ts +2 -3
  24. package/dist/types/ui/jql-editor-footer-content/jql-messages/format/styled.d.ts +4 -5
  25. package/dist/types/ui/jql-editor-layout/index.d.ts +2 -2
  26. package/dist/types/ui/jql-editor-layout/styled.d.ts +19 -20
  27. package/dist/types/ui/jql-editor-portal-provider/context.d.ts +0 -1
  28. package/dist/types/ui/jql-editor-view/index.d.ts +1 -1
  29. package/dist/types/ui/tooltip-tag/styled.d.ts +2 -3
  30. package/dist/types-ts4.5/accessibility/styled.d.ts +2 -3
  31. package/dist/types-ts4.5/common/styled.d.ts +2 -3
  32. package/dist/types-ts4.5/hooks/use-editor-theme/index.d.ts +2 -3
  33. package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +1 -1
  34. package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/styled.d.ts +9 -9
  35. package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/styled.d.ts +14 -15
  36. package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/styled.d.ts +6 -7
  37. package/dist/types-ts4.5/state/util.d.ts +3 -3
  38. package/dist/types-ts4.5/ui/index.d.ts +0 -1
  39. package/dist/types-ts4.5/ui/intl-provider/index.d.ts +1 -1
  40. package/dist/types-ts4.5/ui/jql-editor-controls-content/base-expand-toggle/styled.d.ts +2 -3
  41. package/dist/types-ts4.5/ui/jql-editor-controls-content/base-syntax-help/styled.d.ts +2 -3
  42. package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-editor-help/styled.d.ts +2 -3
  43. package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/format/styled.d.ts +4 -5
  44. package/dist/types-ts4.5/ui/jql-editor-layout/index.d.ts +2 -2
  45. package/dist/types-ts4.5/ui/jql-editor-layout/styled.d.ts +19 -20
  46. package/dist/types-ts4.5/ui/jql-editor-portal-provider/context.d.ts +0 -1
  47. package/dist/types-ts4.5/ui/jql-editor-view/index.d.ts +1 -1
  48. package/dist/types-ts4.5/ui/tooltip-tag/styled.d.ts +2 -3
  49. package/i18n/package.json +1 -1
  50. package/package.json +11 -8
@@ -1,10 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { Popper } from '@atlaskit/popper';
4
6
  import Spinner from '@atlaskit/spinner';
5
7
  import { ScreenReaderText } from '../../../../accessibility';
6
8
  import { JQL_EDITOR_AUTOCOMPLETE_ID } from '../../../../common/constants';
7
- import { useAutocomplete, useAutocompleteIsOpen, useAutocompletePosition, useIntl, useRichInlineNodesEnabled, useScopedId, useStoreActions } from '../../../../state';
9
+ import { useAutocomplete, useAutocompleteIsOpen, useAutocompletePosition, useEditorView, useIntl, useRichInlineNodesEnabled, useScopedId, useStoreActions } from '../../../../state';
8
10
  import { ARROW_DOWN_KEY, ARROW_UP_KEY, CMD_ARROW_DOWN_KEY, CMD_ARROW_UP_KEY, END_KEY, ENTER_KEY, ESCAPE_KEY, HOME_KEY, TAB_KEY } from '../../constants';
9
11
  import { messages } from '../../messages';
10
12
  import AutocompleteOption from '../autocomplete-option';
@@ -54,6 +56,9 @@ var AutocompleteDropdown = function AutocompleteDropdown(_ref) {
54
56
  var _useIntl = useIntl(),
55
57
  _useIntl2 = _slicedToArray(_useIntl, 1),
56
58
  intl = _useIntl2[0];
59
+ var _useEditorView = useEditorView(),
60
+ _useEditorView2 = _slicedToArray(_useEditorView, 1),
61
+ editorView = _useEditorView2[0];
57
62
  var _useStoreActions = useStoreActions(),
58
63
  _useStoreActions2 = _slicedToArray(_useStoreActions, 2),
59
64
  _useStoreActions2$ = _useStoreActions2[1],
@@ -80,10 +85,42 @@ var AutocompleteDropdown = function AutocompleteDropdown(_ref) {
80
85
  var _useScopedId = useScopedId(JQL_EDITOR_AUTOCOMPLETE_ID),
81
86
  _useScopedId2 = _slicedToArray(_useScopedId, 1),
82
87
  autocompleteId = _useScopedId2[0];
88
+ var isPopperPositioningEnabled = fg('jql_editor_autocomplete_use_popper');
89
+
90
+ // Create virtual reference element positioned at cursor location (for popper implementation)
91
+ var virtualReferenceElement = useMemo(function () {
92
+ if (!isPopperPositioningEnabled || !editorView || !isAutocompleteOpen) {
93
+ return null;
94
+ }
95
+
96
+ // Create a virtual element that uses the same positioning logic as the old implementation
97
+ return {
98
+ getBoundingClientRect: function getBoundingClientRect() {
99
+ // Use the same top/left values that the old manual positioning uses
100
+ // This ensures consistency between old and new positioning
101
+ var rect = {
102
+ width: 0,
103
+ height: 0,
104
+ top: top,
105
+ left: left,
106
+ right: left,
107
+ bottom: top,
108
+ x: left,
109
+ y: top,
110
+ toJSON: function toJSON() {
111
+ return rect;
112
+ }
113
+ };
114
+ return rect;
115
+ }
116
+ };
117
+ }, [isPopperPositioningEnabled, editorView, isAutocompleteOpen, top, left]);
83
118
  var onContainerRef = useCallback(function (container) {
84
119
  containerRef.current = container;
85
- setAutocompleteContainer(container);
86
- }, [containerRef, setAutocompleteContainer]);
120
+ if (!isPopperPositioningEnabled) {
121
+ setAutocompleteContainer(container);
122
+ }
123
+ }, [setAutocompleteContainer, isPopperPositioningEnabled]);
87
124
  var onScrollContainerRef = useCallback(function (container) {
88
125
  scrollContainerRef.current = container;
89
126
  }, [scrollContainerRef]);
@@ -190,13 +227,15 @@ var AutocompleteDropdown = function AutocompleteDropdown(_ref) {
190
227
  }
191
228
  }, [isAutocompleteOpen, options, selectedOptionId, setSelectedAutocompleteOptionId]);
192
229
  useLayoutEffect(function () {
193
- requestAnimationFrame(function () {
194
- if (containerRef.current) {
195
- containerRef.current.style.top = "".concat(top, "px");
196
- containerRef.current.style.left = "".concat(left, "px");
197
- }
198
- });
199
- }, [top, left]);
230
+ if (!isPopperPositioningEnabled) {
231
+ requestAnimationFrame(function () {
232
+ if (containerRef.current) {
233
+ containerRef.current.style.top = "".concat(top, "px");
234
+ containerRef.current.style.left = "".concat(left, "px");
235
+ }
236
+ });
237
+ }
238
+ }, [top, left, isPopperPositioningEnabled]);
200
239
  useLayoutEffect(function () {
201
240
  if (navigatingWithKeyboard) {
202
241
  var _selectedItemRef$curr;
@@ -222,45 +261,82 @@ var AutocompleteDropdown = function AutocompleteDropdown(_ref) {
222
261
  }
223
262
  return intl.formatMessage(messages.optionsFound);
224
263
  }, [isAutocompleteOpen, intl, options]);
225
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AutocompleteContainer, {
264
+ var renderAutocompleteContent = function renderAutocompleteContent() {
265
+ return /*#__PURE__*/React.createElement(AutocompleteOptionsContainer, {
266
+ ref: onScrollContainerRef,
267
+ onMouseMove: onMouseMove
268
+ }, /*#__PURE__*/React.createElement(OptionList, {
269
+ role: "listbox",
270
+ id: autocompleteId
271
+ }, options.map(function (option, index) {
272
+ var isSelected = option.id === selectedOptionId;
273
+ return /*#__PURE__*/React.createElement(AutocompleteOption, _extends({
274
+ key: option.value,
275
+ isSelected: isSelected
276
+ }, isSelected && {
277
+ ref: selectedItemRef
278
+ }, {
279
+ option: option,
280
+ onClick: function onClick() {
281
+ return handleClick(option, index, false);
282
+ },
283
+ onMouseMove: function onMouseMove() {
284
+ var _options$index;
285
+ if (((_options$index = options[index]) === null || _options$index === void 0 ? void 0 : _options$index.id) !== selectedOptionId) {
286
+ var _options$index2;
287
+ setSelectedAutocompleteOptionId((_options$index2 = options[index]) === null || _options$index2 === void 0 ? void 0 : _options$index2.id);
288
+ }
289
+ }
290
+ }));
291
+ })));
292
+ };
293
+ var renderLoadingFooter = function renderLoadingFooter() {
294
+ return loading && /*#__PURE__*/React.createElement(AutocompleteLoadingFooter, {
295
+ "data-testid": "jql-editor-autocomplete-loading",
296
+ hasOptions: !!options.length
297
+ }, /*#__PURE__*/React.createElement(Spinner, {
298
+ size: "small"
299
+ }));
300
+ };
301
+
302
+ // Early return if popper positioning is enabled but virtual reference element is not available
303
+ if (isPopperPositioningEnabled && !virtualReferenceElement) {
304
+ return null;
305
+ }
306
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isPopperPositioningEnabled ?
307
+ /*#__PURE__*/
308
+ // New popper-based positioning
309
+ React.createElement(Popper, {
310
+ referenceElement: virtualReferenceElement,
311
+ placement: "bottom-start",
312
+ shouldFitViewport: true
313
+ }, function (_ref2) {
314
+ var ref = _ref2.ref,
315
+ style = _ref2.style;
316
+ return /*#__PURE__*/React.createElement(AutocompleteContainer, {
317
+ "data-testid": "jql-editor-autocomplete",
318
+ tabIndex: -1,
319
+ ref: ref
320
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Popper requires dynamic positioning via style prop
321
+ ,
322
+ style: style,
323
+ isOpen: isAutocompleteOpen,
324
+ usePopper: true,
325
+ onBlur: onEditorViewBlur,
326
+ onFocus: onEditorViewFocus
327
+ }, renderAutocompleteContent(), renderLoadingFooter());
328
+ }) :
329
+ /*#__PURE__*/
330
+ // Old manual positioning
331
+ React.createElement(AutocompleteContainer, {
226
332
  "data-testid": "jql-editor-autocomplete",
227
333
  tabIndex: -1,
228
334
  ref: onContainerRef,
229
335
  isOpen: isAutocompleteOpen,
336
+ usePopper: false,
230
337
  onBlur: onEditorViewBlur,
231
338
  onFocus: onEditorViewFocus
232
- }, /*#__PURE__*/React.createElement(AutocompleteOptionsContainer, {
233
- ref: onScrollContainerRef,
234
- onMouseMove: onMouseMove
235
- }, /*#__PURE__*/React.createElement(OptionList, {
236
- role: "listbox",
237
- id: autocompleteId
238
- }, options.map(function (option, index) {
239
- var isSelected = option.id === selectedOptionId;
240
- return /*#__PURE__*/React.createElement(AutocompleteOption, _extends({
241
- key: option.value,
242
- isSelected: isSelected
243
- }, isSelected && {
244
- ref: selectedItemRef
245
- }, {
246
- option: option,
247
- onClick: function onClick() {
248
- return handleClick(option, index, false);
249
- },
250
- onMouseMove: function onMouseMove() {
251
- var _options$index;
252
- if (((_options$index = options[index]) === null || _options$index === void 0 ? void 0 : _options$index.id) !== selectedOptionId) {
253
- var _options$index2;
254
- setSelectedAutocompleteOptionId((_options$index2 = options[index]) === null || _options$index2 === void 0 ? void 0 : _options$index2.id);
255
- }
256
- }
257
- }));
258
- }))), loading && /*#__PURE__*/React.createElement(AutocompleteLoadingFooter, {
259
- "data-testid": "jql-editor-autocomplete-loading",
260
- hasOptions: !!options.length
261
- }, /*#__PURE__*/React.createElement(Spinner, {
262
- size: "small"
263
- }))), /*#__PURE__*/React.createElement(ScreenReaderText, {
339
+ }, renderAutocompleteContent(), renderLoadingFooter()), /*#__PURE__*/React.createElement(ScreenReaderText, {
264
340
  role: "status",
265
341
  "aria-live": "polite"
266
342
  }, announcedMessage));
@@ -1,6 +1,4 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
2
  import styled from '@emotion/styled';
5
3
  import { N200, N40, N50A, N60A } from '@atlaskit/theme/colors';
6
4
  import { layers } from '@atlaskit/theme/constants';
@@ -24,11 +22,18 @@ export var AutocompleteContainer = styled.div({
24
22
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
25
23
  function (_ref) {
26
24
  var isOpen = _ref.isOpen;
27
- return isOpen ? css({
25
+ return isOpen ? {
28
26
  visibility: 'visible'
29
- }) : css({
27
+ } : {
30
28
  visibility: 'hidden'
31
- });
29
+ };
30
+ },
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
32
+ function (_ref2) {
33
+ var usePopper = _ref2.usePopper;
34
+ return usePopper && {
35
+ marginTop: "var(--ds-space-100, 8px)"
36
+ };
32
37
  });
33
38
 
34
39
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -54,8 +59,8 @@ export var AutocompleteLoadingFooter = styled.div({
54
59
  textAlign: 'center'
55
60
  },
56
61
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
57
- function (_ref2) {
58
- var hasOptions = _ref2.hasOptions;
62
+ function (_ref3) {
63
+ var hasOptions = _ref3.hasOptions;
59
64
  return hasOptions && {
60
65
  borderTop: "solid 1px ".concat("var(--ds-border, ".concat(N40, ")")),
61
66
  marginTop: "var(--ds-space-075, 6px)",
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export declare const ScreenReaderText: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  export declare const hiddenMixin: import("@emotion/react").SerializedStyles;
3
2
  export declare const TooltipContent: import("@emotion/styled").StyledComponent<{
4
- theme?: import("@emotion/react").Theme | undefined;
5
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
6
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type EditorTheme = {
3
2
  /**
4
3
  * The maximum number of rows that are visible in the default editor view.
@@ -32,7 +31,7 @@ export declare const EditorThemeContext: import("react").Context<EditorTheme>;
32
31
  * Hook to manage the theming state of the editor.
33
32
  */
34
33
  export declare const useEditorTheme: ({ isSearch, isCompact, }: {
35
- isSearch?: boolean | undefined;
36
- isCompact?: boolean | undefined;
34
+ isSearch?: boolean;
35
+ isCompact?: boolean;
37
36
  }) => EditorTheme;
38
37
  export declare const useEditorThemeContext: () => EditorTheme;
@@ -7,5 +7,5 @@ type Props = {
7
7
  keymap: PluginKeymap;
8
8
  onClick: (option: SelectableAutocompleteOption, analyticsAttributes: AutocompleteAnalyticsAttributes) => void;
9
9
  };
10
- declare const AutocompleteDropdown: ({ options, loading, keymap, onClick }: Props) => React.JSX.Element;
10
+ declare const AutocompleteDropdown: ({ options, loading, keymap, onClick }: Props) => React.JSX.Element | null;
11
11
  export default AutocompleteDropdown;
@@ -1,21 +1,21 @@
1
- /// <reference types="react" />
2
1
  export declare const AutocompleteContainer: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  } & {
6
5
  isOpen: boolean;
6
+ usePopper?: boolean;
7
7
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
8
  export declare const AutocompleteOptionsContainer: import("@emotion/styled").StyledComponent<{
9
- theme?: import("@emotion/react").Theme | undefined;
10
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
+ theme?: import("@emotion/react").Theme;
10
+ as?: React.ElementType;
11
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
12
  export declare const OptionList: import("@emotion/styled").StyledComponent<{
13
- theme?: import("@emotion/react").Theme | undefined;
14
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
13
+ theme?: import("@emotion/react").Theme;
14
+ as?: React.ElementType;
15
15
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
16
16
  export declare const AutocompleteLoadingFooter: import("@emotion/styled").StyledComponent<{
17
- theme?: import("@emotion/react").Theme | undefined;
18
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
17
+ theme?: import("@emotion/react").Theme;
18
+ as?: React.ElementType;
19
19
  } & {
20
20
  hasOptions: boolean;
21
21
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,32 +1,31 @@
1
- /// <reference types="react" />
2
1
  export declare const TooltipContent: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
5
  export declare const OptionListItem: import("@emotion/styled").StyledComponent<{
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
9
8
  } & {
10
9
  isSelected: boolean;
11
10
  isDeprecated: boolean;
12
11
  }, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
13
12
  export declare const OptionName: import("@emotion/styled").StyledComponent<{
14
- theme?: import("@emotion/react").Theme | undefined;
15
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
13
+ theme?: import("@emotion/react").Theme;
14
+ as?: React.ElementType;
16
15
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
16
  export declare const DeprecatedOptionContainer: import("@emotion/styled").StyledComponent<{
18
- theme?: import("@emotion/react").Theme | undefined;
19
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
17
+ theme?: import("@emotion/react").Theme;
18
+ as?: React.ElementType;
20
19
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
21
20
  export declare const OptionHighlight: import("@emotion/styled").StyledComponent<{
22
- theme?: import("@emotion/react").Theme | undefined;
23
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
21
+ theme?: import("@emotion/react").Theme;
22
+ as?: React.ElementType;
24
23
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
25
24
  export declare const FieldType: import("@emotion/styled").StyledComponent<{
26
- theme?: import("@emotion/react").Theme | undefined;
27
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
25
+ theme?: import("@emotion/react").Theme;
26
+ as?: React.ElementType;
28
27
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
29
28
  export declare const FieldTypeIcon: import("@emotion/styled").StyledComponent<{
30
- theme?: import("@emotion/react").Theme | undefined;
31
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
29
+ theme?: import("@emotion/react").Theme;
30
+ as?: React.ElementType;
32
31
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,16 +1,15 @@
1
- /// <reference types="react" />
2
1
  export declare const UserContainer: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  } & {
6
5
  selected: boolean;
7
6
  error: boolean;
8
7
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
9
8
  export declare const NameContainer: import("@emotion/styled").StyledComponent<{
10
- theme?: import("@emotion/react").Theme | undefined;
11
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
+ theme?: import("@emotion/react").Theme;
10
+ as?: React.ElementType;
12
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
13
12
  export declare const AvatarWrapper: import("@emotion/styled").StyledComponent<{
14
- theme?: import("@emotion/react").Theme | undefined;
15
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
13
+ theme?: import("@emotion/react").Theme;
14
+ as?: React.ElementType;
16
15
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -8,9 +8,9 @@ export declare const getAutocompleteOptionId: (value: string) => any;
8
8
  export declare const tokensToAutocompleteOptions: (tokens: ContextAwareTokenSuggestions) => SelectableAutocompleteOptions;
9
9
  export declare const getReplacePositionStart: ({ rules, tokens }: JQLSuggestions) => number;
10
10
  export declare const getAutocompletePosition: (editorView: EditorView, replacePositionStart: number) => AutocompletePosition;
11
- export declare const sendDebugMessage: (message: string, editorView: EditorView, editorState: EditorState, onDebugUnsafeMessage?: ((message: string, event: {
11
+ export declare const sendDebugMessage: (message: string, editorView: EditorView, editorState: EditorState, onDebugUnsafeMessage?: (message: string, event: {
12
12
  [key: string]: DebugMessageEventAttribute;
13
- }) => void) | undefined, eventAttributes?: {
13
+ }) => void, eventAttributes?: {
14
14
  [key: string]: DebugMessageEventAttribute;
15
- } | undefined) => void;
15
+ }) => void;
16
16
  export declare const getFieldNodes: (ast: Jast) => Set<string>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type JQLEditorProps } from './types';
3
2
  declare const _default: (props: JQLEditorProps) => import("react").JSX.Element;
4
3
  export default _default;
@@ -6,5 +6,5 @@ type WithIntlProviderProps = {
6
6
  */
7
7
  locale?: string;
8
8
  };
9
- export declare const withIntlProvider: <Props extends WithIntlProviderProps>(WrappedComponent: FunctionComponent<Omit<Props, 'locale'>> | ComponentClass<Omit<Props, 'locale'>>) => (props: Props) => React.JSX.Element;
9
+ export declare const withIntlProvider: <Props extends WithIntlProviderProps>(WrappedComponent: FunctionComponent<Omit<Props, "locale">> | ComponentClass<Omit<Props, "locale">>) => (props: Props) => React.JSX.Element;
10
10
  export {};
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export declare const ExpandToggleContainer: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export declare const SyntaxHelpContainer: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  type HelpContainerProps = {
3
2
  isVisible: boolean;
4
3
  };
5
4
  export declare const HelpContainer: import("@emotion/styled").StyledComponent<{
6
- theme?: import("@emotion/react").Theme | undefined;
7
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ theme?: import("@emotion/react").Theme;
6
+ as?: React.ElementType;
8
7
  } & HelpContainerProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
8
  export {};
@@ -1,11 +1,10 @@
1
- /// <reference types="react" />
2
1
  export declare const MessageContainer: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  } & {
6
5
  isSearch: boolean;
7
6
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
7
  export declare const MessageList: import("@emotion/styled").StyledComponent<{
9
- theme?: import("@emotion/react").Theme | undefined;
10
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
8
+ theme?: import("@emotion/react").Theme;
9
+ as?: React.ElementType;
11
10
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
@@ -58,7 +58,7 @@ type ReadOnlyProps = {
58
58
  query: string;
59
59
  };
60
60
  export declare const JQLEditorReadOnly: ({ isSearch, isCompact, ...props }: ReadOnlyProps & {
61
- isSearch?: boolean | undefined;
62
- isCompact?: boolean | undefined;
61
+ isSearch?: boolean;
62
+ isCompact?: boolean;
63
63
  }) => React.JSX.Element;
64
64
  export default JQLEditorLayout;
@@ -1,29 +1,28 @@
1
- /// <reference types="react" />
2
1
  export declare const EditorMain: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
5
  export declare const EditorFooter: import("@emotion/styled").StyledComponent<{
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
9
8
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
9
  type EditorViewContainerProps = {
11
10
  editorViewHasFocus?: boolean;
12
11
  editorViewIsInvalid?: boolean;
13
12
  };
14
13
  export declare const EditorViewContainer: import("@emotion/styled").StyledComponent<{
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: React.ElementType;
17
16
  } & EditorViewContainerProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
18
17
  export declare const ReadOnlyEditorViewContainer: import("@emotion/styled").StyledComponent<{
19
- theme?: import("@emotion/react").Theme | undefined;
20
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
18
+ theme?: import("@emotion/react").Theme;
19
+ as?: React.ElementType;
21
20
  } & EditorViewContainerProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
22
- theme?: import("@emotion/react").Theme | undefined;
21
+ theme?: import("@emotion/react").Theme;
23
22
  }, {}, {}>;
24
23
  export declare const LineNumberToolbar: import("@emotion/styled").StyledComponent<{
25
- theme?: import("@emotion/react").Theme | undefined;
26
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
24
+ theme?: import("@emotion/react").Theme;
25
+ as?: React.ElementType;
27
26
  } & {
28
27
  lineNumbersVisible: boolean;
29
28
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -31,8 +30,8 @@ export declare const LineNumberToolbar: import("@emotion/styled").StyledComponen
31
30
  * The main div which the Prosemirror editor will be rendered into.
32
31
  */
33
32
  export declare const EditorView: import("@emotion/styled").StyledComponent<{
34
- theme?: import("@emotion/react").Theme | undefined;
35
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
33
+ theme?: import("@emotion/react").Theme;
34
+ as?: React.ElementType;
36
35
  } & {
37
36
  defaultMaxRows: number;
38
37
  expandedRows: number;
@@ -40,22 +39,22 @@ export declare const EditorView: import("@emotion/styled").StyledComponent<{
40
39
  isCompact: boolean;
41
40
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
42
41
  export declare const ReadOnlyEditorView: import("@emotion/styled").StyledComponent<{
43
- theme?: import("@emotion/react").Theme | undefined;
44
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
42
+ theme?: import("@emotion/react").Theme;
43
+ as?: React.ElementType;
45
44
  } & {
46
45
  defaultMaxRows: number;
47
46
  expandedRows: number;
48
47
  lineNumbersVisible: boolean;
49
48
  isCompact: boolean;
50
49
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
51
- theme?: import("@emotion/react").Theme | undefined;
50
+ theme?: import("@emotion/react").Theme;
52
51
  }, {}, {}>;
53
52
  export declare const EditorControls: import("@emotion/styled").StyledComponent<{
54
- theme?: import("@emotion/react").Theme | undefined;
55
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
53
+ theme?: import("@emotion/react").Theme;
54
+ as?: React.ElementType;
56
55
  } & {
57
56
  isSearch: boolean;
58
57
  isCompact: boolean;
59
- isVisualRefresh?: boolean | undefined;
58
+ isVisualRefresh?: boolean;
60
59
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
61
60
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type PortalActions } from './types';
3
2
  export declare const PortalActionsContext: import("react").Context<PortalActions>;
4
3
  export declare const usePortalActionsContext: () => PortalActions;
@@ -5,6 +5,6 @@ import React from 'react';
5
5
  declare const JQLEditorView: ({ inputRef }: {
6
6
  inputRef?: React.Ref<{
7
7
  focus: () => void;
8
- }> | undefined;
8
+ }>;
9
9
  }) => React.JSX.Element;
10
10
  export default JQLEditorView;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledTooltipTag: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export declare const ScreenReaderText: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  export declare const hiddenMixin: import("@emotion/react").SerializedStyles;
3
2
  export declare const TooltipContent: import("@emotion/styled").StyledComponent<{
4
- theme?: import("@emotion/react").Theme | undefined;
5
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
6
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type EditorTheme = {
3
2
  /**
4
3
  * The maximum number of rows that are visible in the default editor view.
@@ -32,7 +31,7 @@ export declare const EditorThemeContext: import("react").Context<EditorTheme>;
32
31
  * Hook to manage the theming state of the editor.
33
32
  */
34
33
  export declare const useEditorTheme: ({ isSearch, isCompact, }: {
35
- isSearch?: boolean | undefined;
36
- isCompact?: boolean | undefined;
34
+ isSearch?: boolean;
35
+ isCompact?: boolean;
37
36
  }) => EditorTheme;
38
37
  export declare const useEditorThemeContext: () => EditorTheme;