@codemirror/view 6.29.0 → 6.30.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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _codemirror_state from '@codemirror/state';
2
- import { RangeSet, RangeValue, Range, EditorState, Extension, Transaction, ChangeSet, SelectionRange, ChangeDesc, EditorSelection, EditorStateConfig, StateEffect, TransactionSpec, Line, Facet } from '@codemirror/state';
2
+ import { RangeSet, RangeValue, Range, EditorState, Extension, Transaction, ChangeSet, SelectionRange, ChangeDesc, EditorSelection, EditorStateConfig, StateEffect, TransactionSpec, Line, Facet, StateField } from '@codemirror/state';
3
3
  import { StyleModule, StyleSpec } from 'style-mod';
4
4
 
5
5
  /**
@@ -1948,6 +1948,11 @@ pointer is before the position, 1 if after the position.
1948
1948
  Note that all hover tooltips are hosted within a single tooltip
1949
1949
  container element. This allows multiple tooltips over the same
1950
1950
  range to be "merged" together without overlapping.
1951
+
1952
+ The return value is a valid [editor extension](https://codemirror.net/6/docs/ref/#state.Extension)
1953
+ but also provides an `active` property holding a state field that
1954
+ can be used to read the currently active tooltips produced by this
1955
+ extension.
1951
1956
  */
1952
1957
  declare function hoverTooltip(source: HoverTooltipSource, options?: {
1953
1958
  /**
@@ -1965,7 +1970,9 @@ declare function hoverTooltip(source: HoverTooltipSource, options?: {
1965
1970
  milliseconds. Defaults to 300ms.
1966
1971
  */
1967
1972
  hoverTime?: number;
1968
- }): Extension;
1973
+ }): Extension & {
1974
+ active: StateField<readonly Tooltip[]>;
1975
+ };
1969
1976
  /**
1970
1977
  Get the active tooltip view for a given tooltip, if available.
1971
1978
  */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _codemirror_state from '@codemirror/state';
2
- import { RangeSet, RangeValue, Range, EditorState, Extension, Transaction, ChangeSet, SelectionRange, ChangeDesc, EditorSelection, EditorStateConfig, StateEffect, TransactionSpec, Line, Facet } from '@codemirror/state';
2
+ import { RangeSet, RangeValue, Range, EditorState, Extension, Transaction, ChangeSet, SelectionRange, ChangeDesc, EditorSelection, EditorStateConfig, StateEffect, TransactionSpec, Line, Facet, StateField } from '@codemirror/state';
3
3
  import { StyleModule, StyleSpec } from 'style-mod';
4
4
 
5
5
  /**
@@ -1948,6 +1948,11 @@ pointer is before the position, 1 if after the position.
1948
1948
  Note that all hover tooltips are hosted within a single tooltip
1949
1949
  container element. This allows multiple tooltips over the same
1950
1950
  range to be "merged" together without overlapping.
1951
+
1952
+ The return value is a valid [editor extension](https://codemirror.net/6/docs/ref/#state.Extension)
1953
+ but also provides an `active` property holding a state field that
1954
+ can be used to read the currently active tooltips produced by this
1955
+ extension.
1951
1956
  */
1952
1957
  declare function hoverTooltip(source: HoverTooltipSource, options?: {
1953
1958
  /**
@@ -1965,7 +1970,9 @@ declare function hoverTooltip(source: HoverTooltipSource, options?: {
1965
1970
  milliseconds. Defaults to 300ms.
1966
1971
  */
1967
1972
  hoverTime?: number;
1968
- }): Extension;
1973
+ }): Extension & {
1974
+ active: StateField<readonly Tooltip[]>;
1975
+ };
1969
1976
  /**
1970
1977
  Get the active tooltip view for a given tooltip, if available.
1971
1978
  */