@prosekit/lit 0.1.0 → 0.1.2
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/_tsup-dts-rollup.d.ts +2 -2
- package/dist/{chunk-XTIVRSSC.js → chunk-55G7TJI3.js} +1 -1
- package/dist/{chunk-HNKGDXIJ.js → chunk-7WLKD2U6.js} +5 -4
- package/dist/{chunk-XOVIMVFL.js → chunk-GWGDLLFN.js} +1 -1
- package/dist/{chunk-KJJEZNYD.js → chunk-XBNMYITV.js} +13 -17
- package/dist/prosekit-lit-autocomplete-empty.d.ts +45 -0
- package/dist/prosekit-lit-autocomplete-empty.js +1 -1
- package/dist/prosekit-lit-autocomplete-item.d.ts +48 -3
- package/dist/prosekit-lit-autocomplete-item.js +2 -2
- package/dist/prosekit-lit-autocomplete-list.d.ts +48 -3
- package/dist/prosekit-lit-autocomplete-list.js +3 -3
- package/dist/prosekit-lit-autocomplete-popover.d.ts +45 -1
- package/dist/prosekit-lit-autocomplete-popover.js +28 -19
- package/dist/prosekit-lit-combo-box-input.d.ts +46 -1
- package/dist/prosekit-lit-combo-box-input.js +1 -1
- package/dist/prosekit-lit-combo-box-item.d.ts +48 -3
- package/dist/prosekit-lit-combo-box-item.js +2 -2
- package/dist/prosekit-lit-combo-box-list.d.ts +48 -3
- package/dist/prosekit-lit-combo-box-list.js +1 -1
- package/dist/prosekit-lit-combo-box.d.ts +46 -1
- package/dist/prosekit-lit-combo-box.js +3 -3
- package/dist/prosekit-lit-inline-popover.d.ts +46 -2
- package/dist/prosekit-lit-inline-popover.js +5 -6
- package/dist/prosekit-lit-popover.d.ts +45 -2
- package/dist/prosekit-lit-popover.js +2 -2
- package/dist/prosekit-lit.d.ts +48 -1
- package/package.json +4 -4
- package/src/index.ts +1 -0
- /package/dist/{chunk-ZN7DMIEB.js → chunk-O5JP3B34.js} +0 -0
@@ -101,7 +101,7 @@ export declare class AutocompletePopover extends Popover implements Partial<Auto
|
|
101
101
|
private get list();
|
102
102
|
private updateContext;
|
103
103
|
/** @hidden */
|
104
|
-
willUpdate(): void;
|
104
|
+
willUpdate(changedProperties: PropertyValues<this>): void;
|
105
105
|
/** @hidden */
|
106
106
|
hide(): void;
|
107
107
|
}
|
@@ -384,7 +384,7 @@ export declare class Popover extends LightElement implements Partial<PopoverProp
|
|
384
384
|
/** @hidden */
|
385
385
|
disconnectedCallback(): void;
|
386
386
|
/** @hidden */
|
387
|
-
protected updated(): void;
|
387
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
388
388
|
/** @hidden */
|
389
389
|
private start;
|
390
390
|
/** @hidden */
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
LightElement,
|
3
3
|
__decorateClass
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-O5JP3B34.js";
|
5
5
|
|
6
6
|
// src/components/popover/index.ts
|
7
7
|
import {
|
@@ -31,11 +31,11 @@ var defaultPopoverOptions = {
|
|
31
31
|
size({
|
32
32
|
apply: ({ availableWidth, availableHeight, elements }) => {
|
33
33
|
elements.floating.style.setProperty(
|
34
|
-
"
|
34
|
+
"max-width",
|
35
35
|
`${Math.floor(availableWidth)}px`
|
36
36
|
);
|
37
37
|
elements.floating.style.setProperty(
|
38
|
-
"
|
38
|
+
"max-height",
|
39
39
|
`${Math.floor(availableHeight)}px`
|
40
40
|
);
|
41
41
|
},
|
@@ -97,7 +97,8 @@ var Popover = class extends LightElement {
|
|
97
97
|
this.disposeEventListeners = void 0;
|
98
98
|
}
|
99
99
|
/** @hidden */
|
100
|
-
updated() {
|
100
|
+
updated(changedProperties) {
|
101
|
+
super.updated(changedProperties);
|
101
102
|
this.start();
|
102
103
|
this.setHidden(!this.active);
|
103
104
|
}
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
import {
|
8
8
|
LightElement,
|
9
9
|
__decorateClass
|
10
|
-
} from "./chunk-
|
10
|
+
} from "./chunk-O5JP3B34.js";
|
11
11
|
|
12
12
|
// src/components/autocomplete-popover/context.ts
|
13
13
|
import { createContext } from "@lit/context";
|
@@ -125,22 +125,18 @@ var AutocompleteList = class extends LightElement {
|
|
125
125
|
connectedCallback() {
|
126
126
|
super.connectedCallback();
|
127
127
|
this.listManager.selectFirstItem();
|
128
|
-
this.addEventListener(
|
129
|
-
|
130
|
-
|
131
|
-
)
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
);
|
140
|
-
this.addEventListener(
|
141
|
-
"click",
|
142
|
-
(event) => this.listManager.handleClick(event)
|
143
|
-
);
|
128
|
+
this.addEventListener("mousemove", (event) => {
|
129
|
+
this.listManager.handleMouseMove(event);
|
130
|
+
});
|
131
|
+
this.addEventListener("mouseover", (event) => {
|
132
|
+
this.listManager.handleMouseOver(event);
|
133
|
+
});
|
134
|
+
this.addEventListener("mousedown", (event) => {
|
135
|
+
this.listManager.handleMouseDown(event);
|
136
|
+
});
|
137
|
+
this.addEventListener("click", (event) => {
|
138
|
+
this.listManager.handleClick(event);
|
139
|
+
});
|
144
140
|
}
|
145
141
|
get items() {
|
146
142
|
return Array.from(
|
@@ -1,3 +1,48 @@
|
|
1
1
|
export { propNames } from './_tsup-dts-rollup';
|
2
2
|
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
3
|
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,3 +1,48 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
3
|
-
export {
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,3 +1,48 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
3
|
-
export {
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import {
|
2
2
|
AutocompleteList,
|
3
3
|
propNames
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
4
|
+
} from "./chunk-XBNMYITV.js";
|
5
|
+
import "./chunk-GWGDLLFN.js";
|
6
6
|
import "./chunk-6P3YKUWI.js";
|
7
7
|
import "./chunk-PCXKL6TA.js";
|
8
|
-
import "./chunk-
|
8
|
+
import "./chunk-O5JP3B34.js";
|
9
9
|
export {
|
10
10
|
AutocompleteList,
|
11
11
|
propNames
|
@@ -1,4 +1,48 @@
|
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
1
19
|
export { PopoverOptions } from './_tsup-dts-rollup';
|
2
|
-
export { propNames_alias_5 as propNames } from './_tsup-dts-rollup';
|
3
20
|
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
4
21
|
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import {
|
2
2
|
commandPopoverContext
|
3
|
-
} from "./chunk-
|
4
|
-
import "./chunk-
|
3
|
+
} from "./chunk-XBNMYITV.js";
|
4
|
+
import "./chunk-GWGDLLFN.js";
|
5
5
|
import "./chunk-6P3YKUWI.js";
|
6
6
|
import {
|
7
7
|
Popover
|
8
|
-
} from "./chunk-
|
8
|
+
} from "./chunk-7WLKD2U6.js";
|
9
9
|
import "./chunk-PCXKL6TA.js";
|
10
10
|
import {
|
11
11
|
__decorateClass
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-O5JP3B34.js";
|
13
13
|
|
14
14
|
// src/components/autocomplete-popover/index.ts
|
15
15
|
import { provide } from "@lit/context";
|
@@ -82,9 +82,6 @@ var AutocompletePopoverController = class {
|
|
82
82
|
this.onChange(query != null ? query : "", !!this.reference);
|
83
83
|
this.handleDismiss = options.ignoreMatch;
|
84
84
|
this.handleSubmit = options.deleteMatch;
|
85
|
-
setTimeout(() => {
|
86
|
-
this.host.requestUpdate();
|
87
|
-
}, 0);
|
88
85
|
};
|
89
86
|
const handleLeave = () => {
|
90
87
|
this.reference = null;
|
@@ -121,38 +118,49 @@ var defaultDetectOverflowOptions = {
|
|
121
118
|
padding: 8
|
122
119
|
};
|
123
120
|
var defaultPopoverOptions = {
|
124
|
-
|
121
|
+
// The main axis is the y axis, and we place the popover at the bottom of the
|
122
|
+
// reference element.
|
123
|
+
//
|
124
|
+
// The cross axis is the x axis, and we place the popover at the start of the
|
125
|
+
// reference element. The reference element and the popover are left-aligned.
|
126
|
+
placement: "bottom-start",
|
125
127
|
middleware: [
|
126
128
|
// Use the text caret as the reference point
|
127
129
|
inline(),
|
128
|
-
offset((
|
129
|
-
// Put the popover at the bottom right corner
|
130
|
-
alignmentAxis: -rects.floating.width,
|
130
|
+
offset(() => ({
|
131
131
|
// Move down the popover by 4px
|
132
132
|
mainAxis: 4
|
133
133
|
})),
|
134
134
|
// Flip the popover to the top if it's overflowing the viewport
|
135
|
+
//
|
136
|
+
// When `flipAlignment` is true, which is the default, ensure `flip() `is
|
137
|
+
// placed before `shift()` in your middleware array.
|
138
|
+
//
|
139
|
+
// https://floating-ui.com/docs/flip#flipalignment
|
135
140
|
flip({
|
136
|
-
|
137
|
-
|
141
|
+
// Flip the popover to the top if necessary.
|
142
|
+
mainAxis: true,
|
143
|
+
// We don't want to flip the popover to the left or right, since `shift()`
|
144
|
+
// will handle this.
|
138
145
|
crossAxis: false,
|
139
146
|
...defaultDetectOverflowOptions
|
140
147
|
}),
|
148
|
+
// We need to place `shift()` after `flip()`. See https://floating-ui.com/docs/flip#flipalignment
|
149
|
+
shift({
|
150
|
+
...defaultDetectOverflowOptions
|
151
|
+
}),
|
141
152
|
size({
|
142
153
|
apply: ({ availableWidth, availableHeight, elements }) => {
|
143
154
|
elements.floating.style.setProperty(
|
144
|
-
"
|
155
|
+
"max-width",
|
145
156
|
`${Math.floor(availableWidth)}px`
|
146
157
|
);
|
147
158
|
elements.floating.style.setProperty(
|
148
|
-
"
|
159
|
+
"max-height",
|
149
160
|
`${Math.floor(availableHeight)}px`
|
150
161
|
);
|
151
162
|
},
|
152
163
|
...defaultDetectOverflowOptions
|
153
|
-
}),
|
154
|
-
shift({
|
155
|
-
...defaultDetectOverflowOptions
|
156
164
|
})
|
157
165
|
]
|
158
166
|
};
|
@@ -196,8 +204,9 @@ var AutocompletePopover = class extends Popover {
|
|
196
204
|
});
|
197
205
|
}
|
198
206
|
/** @hidden */
|
199
|
-
willUpdate() {
|
207
|
+
willUpdate(changedProperties) {
|
200
208
|
var _a, _b;
|
209
|
+
super.willUpdate(changedProperties);
|
201
210
|
if (this.editor) {
|
202
211
|
this.controller.setEditor(this.editor);
|
203
212
|
}
|
@@ -1,3 +1,48 @@
|
|
1
|
-
export {
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
2
27
|
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
3
28
|
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,3 +1,48 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
3
|
-
export {
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,3 +1,48 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
3
|
-
export {
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,3 +1,48 @@
|
|
1
|
-
export {
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
2
25
|
export { ComboBoxProps } from './_tsup-dts-rollup';
|
3
26
|
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import {
|
2
2
|
Popover
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-7WLKD2U6.js";
|
4
4
|
import {
|
5
5
|
ListManager
|
6
6
|
} from "./chunk-PCXKL6TA.js";
|
7
|
-
import "./chunk-
|
7
|
+
import "./chunk-55G7TJI3.js";
|
8
8
|
import {
|
9
9
|
comboBoxContext
|
10
10
|
} from "./chunk-C4MW43I4.js";
|
11
11
|
import {
|
12
12
|
__decorateClass
|
13
|
-
} from "./chunk-
|
13
|
+
} from "./chunk-O5JP3B34.js";
|
14
14
|
|
15
15
|
// src/components/combo-box/index.ts
|
16
16
|
import { provide } from "@lit/context";
|
@@ -1,4 +1,48 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
3
38
|
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
4
39
|
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
Popover
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-7WLKD2U6.js";
|
4
4
|
import {
|
5
5
|
__decorateClass
|
6
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-O5JP3B34.js";
|
7
7
|
|
8
8
|
// src/components/inline-popover/index.ts
|
9
9
|
import "@prosekit/core";
|
@@ -14,16 +14,15 @@ import { defineUpdateHandler } from "@prosekit/core";
|
|
14
14
|
import "lit";
|
15
15
|
|
16
16
|
// src/components/inline-popover/helpers.ts
|
17
|
-
import { isTextSelection } from "@prosekit/core";
|
17
|
+
import { isNodeSelection, isTextSelection } from "@prosekit/core";
|
18
18
|
function getVirtualSelectionElement(view) {
|
19
19
|
if (typeof window === "undefined" || view.isDestroyed) {
|
20
20
|
return;
|
21
21
|
}
|
22
22
|
const selection = view.state.selection;
|
23
|
-
if (selection.empty &&
|
24
|
-
return;
|
23
|
+
if (!selection.empty && (isTextSelection(selection) || isNodeSelection(selection))) {
|
24
|
+
return getDomRange();
|
25
25
|
}
|
26
|
-
return getDomRange();
|
27
26
|
}
|
28
27
|
function getDomRange() {
|
29
28
|
const selection = window.getSelection();
|
@@ -1,5 +1,48 @@
|
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
1
40
|
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
2
|
-
export { PopoverOptions_alias_2 as PopoverOptions } from './_tsup-dts-rollup';
|
3
|
-
export { propNames_alias_13 as propNames } from './_tsup-dts-rollup';
|
4
41
|
export { PopoverProps } from './_tsup-dts-rollup';
|
5
42
|
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
package/dist/prosekit-lit.d.ts
CHANGED
@@ -1 +1,48 @@
|
|
1
|
-
export {};
|
1
|
+
export { propNames } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteEmpty } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps } from './_tsup-dts-rollup';
|
5
|
+
export { AutocompleteItem } from './_tsup-dts-rollup';
|
6
|
+
export { isAutocompleteItem } from './_tsup-dts-rollup';
|
7
|
+
export { queryClosestAutocompleteItem } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompleteListProps } from './_tsup-dts-rollup';
|
9
|
+
export { AutocompleteList } from './_tsup-dts-rollup';
|
10
|
+
export { AutocompleteListContext } from './_tsup-dts-rollup';
|
11
|
+
export { commandListContext } from './_tsup-dts-rollup';
|
12
|
+
export { AutocompleteListController } from './_tsup-dts-rollup';
|
13
|
+
export { isAutocompleteList } from './_tsup-dts-rollup';
|
14
|
+
export { AutocompletePopoverContext } from './_tsup-dts-rollup';
|
15
|
+
export { commandPopoverContext } from './_tsup-dts-rollup';
|
16
|
+
export { AutocompletePopoverController } from './_tsup-dts-rollup';
|
17
|
+
export { defaultPopoverOptions } from './_tsup-dts-rollup';
|
18
|
+
export { defaultQueryBuilder } from './_tsup-dts-rollup';
|
19
|
+
export { PopoverOptions } from './_tsup-dts-rollup';
|
20
|
+
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
|
+
export { AutocompletePopover } from './_tsup-dts-rollup';
|
22
|
+
export { LightElement } from './_tsup-dts-rollup';
|
23
|
+
export { ComboBoxContext } from './_tsup-dts-rollup';
|
24
|
+
export { comboBoxContext } from './_tsup-dts-rollup';
|
25
|
+
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
|
+
export { ComboBox } from './_tsup-dts-rollup';
|
27
|
+
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
|
+
export { ComboBoxInput } from './_tsup-dts-rollup';
|
29
|
+
export { ComboBoxItemProps } from './_tsup-dts-rollup';
|
30
|
+
export { ComboBoxItem } from './_tsup-dts-rollup';
|
31
|
+
export { isComboBoxItem } from './_tsup-dts-rollup';
|
32
|
+
export { queryClosestComboBoxItem } from './_tsup-dts-rollup';
|
33
|
+
export { ComboBoxListProps } from './_tsup-dts-rollup';
|
34
|
+
export { ComboBoxList } from './_tsup-dts-rollup';
|
35
|
+
export { isComboBoxList } from './_tsup-dts-rollup';
|
36
|
+
export { InlinePopoverController } from './_tsup-dts-rollup';
|
37
|
+
export { getVirtualSelectionElement } from './_tsup-dts-rollup';
|
38
|
+
export { InlinePopoverProps } from './_tsup-dts-rollup';
|
39
|
+
export { InlinePopover } from './_tsup-dts-rollup';
|
40
|
+
export { AutoUpdateOptions } from './_tsup-dts-rollup';
|
41
|
+
export { PopoverProps } from './_tsup-dts-rollup';
|
42
|
+
export { Popover } from './_tsup-dts-rollup';
|
43
|
+
export { ListManager } from './_tsup-dts-rollup';
|
44
|
+
export { blockComponentStyles } from './_tsup-dts-rollup';
|
45
|
+
export { componentStyles } from './_tsup-dts-rollup';
|
46
|
+
export { commandScore } from './_tsup-dts-rollup';
|
47
|
+
export { roundByDPR } from './_tsup-dts-rollup';
|
48
|
+
export { default_alias as default } from './_tsup-dts-rollup';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/lit",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.2",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -86,17 +86,17 @@
|
|
86
86
|
],
|
87
87
|
"dependencies": {
|
88
88
|
"@floating-ui/dom": "^1.5.3",
|
89
|
-
"@lit/context": "^1.0
|
89
|
+
"@lit/context": "^1.1.0",
|
90
90
|
"@prosekit/core": "^0.1.0",
|
91
91
|
"@prosekit/extensions": "^0.1.0",
|
92
92
|
"@prosekit/pm": "^0.1.0",
|
93
93
|
"@superhuman/command-score": "^0.5.0",
|
94
|
-
"lit": "^3.0
|
94
|
+
"lit": "^3.1.0"
|
95
95
|
},
|
96
96
|
"devDependencies": {
|
97
97
|
"@prosekit/dev": "*",
|
98
98
|
"minify-literals": "^1.0.7",
|
99
|
-
"tsup": "^7.
|
99
|
+
"tsup": "^7.3.0",
|
100
100
|
"typescript": "^5.2.2",
|
101
101
|
"vitest": "^0.34.6",
|
102
102
|
"vue": "^3.3.8"
|
package/src/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {}
|
File without changes
|