@prosekit/lit 0.1.2 → 0.1.4
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 +307 -60
- package/dist/{chunk-6P3YKUWI.js → chunk-5CI65R73.js} +2 -2
- package/dist/chunk-L6FOAZFL.js +51 -0
- package/dist/chunk-MLUELLVA.js +60 -0
- package/dist/{chunk-PCXKL6TA.js → chunk-PW3MTUZM.js} +7 -6
- package/dist/chunk-S32IZIQF.js +33 -0
- package/dist/{chunk-XBNMYITV.js → chunk-TGJAVLMZ.js} +48 -41
- package/dist/{chunk-7WLKD2U6.js → chunk-Z3PEQ6MW.js} +81 -41
- package/dist/prosekit-lit-autocomplete-empty.d.ts +0 -45
- package/dist/prosekit-lit-autocomplete-empty.js +14 -14
- package/dist/prosekit-lit-autocomplete-item.d.ts +3 -48
- package/dist/prosekit-lit-autocomplete-item.js +3 -3
- package/dist/prosekit-lit-autocomplete-list.d.ts +3 -48
- package/dist/prosekit-lit-autocomplete-list.js +5 -5
- package/dist/prosekit-lit-autocomplete-popover.d.ts +1 -45
- package/dist/prosekit-lit-autocomplete-popover.js +53 -50
- package/dist/prosekit-lit-combo-box-input.d.ts +1 -46
- package/dist/prosekit-lit-combo-box-input.js +39 -26
- package/dist/prosekit-lit-combo-box-item.d.ts +3 -48
- package/dist/prosekit-lit-combo-box-item.js +2 -2
- package/dist/prosekit-lit-combo-box-list.d.ts +3 -48
- package/dist/prosekit-lit-combo-box-list.js +12 -16
- package/dist/prosekit-lit-combo-box.d.ts +1 -46
- package/dist/prosekit-lit-combo-box.js +60 -44
- package/dist/prosekit-lit-inline-popover.d.ts +2 -46
- package/dist/prosekit-lit-inline-popover.js +23 -18
- package/dist/prosekit-lit-popover.d.ts +2 -45
- package/dist/prosekit-lit-popover.js +2 -2
- package/dist/prosekit-lit.d.ts +1 -48
- package/package.json +6 -6
- package/dist/chunk-55G7TJI3.js +0 -48
- package/dist/chunk-GWGDLLFN.js +0 -61
- package/dist/chunk-O5JP3B34.js +0 -31
@@ -1,11 +1,11 @@
|
|
1
1
|
import {
|
2
2
|
AutocompleteList,
|
3
3
|
propNames
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
6
|
-
import "./chunk-
|
7
|
-
import "./chunk-
|
8
|
-
import "./chunk-
|
4
|
+
} from "./chunk-TGJAVLMZ.js";
|
5
|
+
import "./chunk-MLUELLVA.js";
|
6
|
+
import "./chunk-5CI65R73.js";
|
7
|
+
import "./chunk-PW3MTUZM.js";
|
8
|
+
import "./chunk-S32IZIQF.js";
|
9
9
|
export {
|
10
10
|
AutocompleteList,
|
11
11
|
propNames
|
@@ -1,48 +1,4 @@
|
|
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
1
|
export { PopoverOptions } from './_tsup-dts-rollup';
|
2
|
+
export { propNames_alias_5 as propNames } from './_tsup-dts-rollup';
|
20
3
|
export { AutocompletePopoverProps } from './_tsup-dts-rollup';
|
21
4
|
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,20 +1,20 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "./chunk-
|
4
|
-
import "./chunk-
|
5
|
-
import "./chunk-
|
2
|
+
autocompletePopoverContext
|
3
|
+
} from "./chunk-TGJAVLMZ.js";
|
4
|
+
import "./chunk-MLUELLVA.js";
|
5
|
+
import "./chunk-5CI65R73.js";
|
6
6
|
import {
|
7
|
-
Popover
|
8
|
-
|
9
|
-
|
7
|
+
Popover,
|
8
|
+
boundary
|
9
|
+
} from "./chunk-Z3PEQ6MW.js";
|
10
|
+
import "./chunk-PW3MTUZM.js";
|
10
11
|
import {
|
11
|
-
|
12
|
-
} from "./chunk-
|
12
|
+
defineCustomElement
|
13
|
+
} from "./chunk-S32IZIQF.js";
|
13
14
|
|
14
15
|
// src/components/autocomplete-popover/index.ts
|
15
|
-
import {
|
16
|
+
import { ContextProvider } from "@lit/context";
|
16
17
|
import "@prosekit/core";
|
17
|
-
import { customElement, property, state } from "lit/decorators.js";
|
18
18
|
|
19
19
|
// src/components/autocomplete-list/helpers.ts
|
20
20
|
function isAutocompleteList(element) {
|
@@ -114,8 +114,8 @@ import {
|
|
114
114
|
size
|
115
115
|
} from "@floating-ui/dom";
|
116
116
|
var defaultDetectOverflowOptions = {
|
117
|
-
|
118
|
-
|
117
|
+
padding: 8,
|
118
|
+
boundary
|
119
119
|
};
|
120
120
|
var defaultPopoverOptions = {
|
121
121
|
// The main axis is the y axis, and we place the popover at the bottom of the
|
@@ -127,10 +127,10 @@ var defaultPopoverOptions = {
|
|
127
127
|
middleware: [
|
128
128
|
// Use the text caret as the reference point
|
129
129
|
inline(),
|
130
|
-
offset(
|
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
135
|
//
|
136
136
|
// When `flipAlignment` is true, which is the default, ensure `flip() `is
|
@@ -170,40 +170,49 @@ var propNames = ["editor", "regex", "popoverOptions"];
|
|
170
170
|
var AutocompletePopover = class extends Popover {
|
171
171
|
constructor() {
|
172
172
|
super(...arguments);
|
173
|
-
/**
|
173
|
+
/**
|
174
|
+
* @hidden
|
175
|
+
*/
|
174
176
|
this.controller = new AutocompletePopoverController(
|
175
177
|
this,
|
176
178
|
this.updateContext.bind(this)
|
177
179
|
);
|
178
180
|
this.popoverOptions = defaultPopoverOptions;
|
179
|
-
this.context = {
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
181
|
+
this.context = new ContextProvider(this, {
|
182
|
+
context: autocompletePopoverContext,
|
183
|
+
initialValue: {
|
184
|
+
active: false,
|
185
|
+
query: "",
|
186
|
+
handleDismiss: () => {
|
187
|
+
var _a, _b;
|
188
|
+
return (_b = (_a = this.controller).handleDismiss) == null ? void 0 : _b.call(_a);
|
189
|
+
},
|
190
|
+
handleSubmit: () => {
|
191
|
+
var _a, _b;
|
192
|
+
return (_b = (_a = this.controller).handleSubmit) == null ? void 0 : _b.call(_a);
|
193
|
+
}
|
189
194
|
}
|
190
|
-
};
|
195
|
+
});
|
191
196
|
}
|
192
197
|
get list() {
|
193
198
|
const element = this.querySelector("prosekit-autocomplete-list");
|
194
199
|
return isAutocompleteList(element) ? element : null;
|
195
200
|
}
|
196
201
|
updateContext(query, active) {
|
197
|
-
|
202
|
+
const context = this.context.value;
|
203
|
+
if (context.query === query && context.active === active) {
|
198
204
|
return;
|
199
205
|
}
|
200
|
-
this.context
|
206
|
+
this.context.setValue({ ...context, query, active });
|
207
|
+
this.requestUpdate();
|
201
208
|
requestAnimationFrame(() => {
|
202
209
|
var _a;
|
203
210
|
(_a = this.list) == null ? void 0 : _a.selectFirstItem();
|
204
211
|
});
|
205
212
|
}
|
206
|
-
/**
|
213
|
+
/**
|
214
|
+
* @hidden
|
215
|
+
*/
|
207
216
|
willUpdate(changedProperties) {
|
208
217
|
var _a, _b;
|
209
218
|
super.willUpdate(changedProperties);
|
@@ -217,7 +226,9 @@ var AutocompletePopover = class extends Popover {
|
|
217
226
|
this.reference = (_b = this.controller.reference) != null ? _b : void 0;
|
218
227
|
this.options = this.popoverOptions;
|
219
228
|
}
|
220
|
-
/**
|
229
|
+
/**
|
230
|
+
* @hidden
|
231
|
+
*/
|
221
232
|
hide() {
|
222
233
|
var _a;
|
223
234
|
super.hide();
|
@@ -227,25 +238,17 @@ var AutocompletePopover = class extends Popover {
|
|
227
238
|
}
|
228
239
|
}
|
229
240
|
};
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
state()
|
242
|
-
], AutocompletePopover.prototype, "context", 2);
|
243
|
-
__decorateClass([
|
244
|
-
property({ attribute: false })
|
245
|
-
], AutocompletePopover.prototype, "onSelect", 2);
|
246
|
-
AutocompletePopover = __decorateClass([
|
247
|
-
customElement("prosekit-autocomplete-popover")
|
248
|
-
], AutocompletePopover);
|
241
|
+
/**
|
242
|
+
* @hidden
|
243
|
+
*/
|
244
|
+
AutocompletePopover.properties = {
|
245
|
+
...Popover.properties,
|
246
|
+
editor: { attribute: false },
|
247
|
+
regex: { attribute: false },
|
248
|
+
popoverOptions: { attribute: false },
|
249
|
+
onSelect: { attribute: false }
|
250
|
+
};
|
251
|
+
defineCustomElement("prosekit-autocomplete-popover", AutocompletePopover);
|
249
252
|
export {
|
250
253
|
AutocompletePopover,
|
251
254
|
propNames
|
@@ -1,48 +1,3 @@
|
|
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';
|
1
|
+
export { propNames_alias_7 as propNames } from './_tsup-dts-rollup';
|
27
2
|
export { ComboBoxInputProps } from './_tsup-dts-rollup';
|
28
3
|
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';
|
@@ -3,38 +3,52 @@ import {
|
|
3
3
|
} from "./chunk-C4MW43I4.js";
|
4
4
|
import {
|
5
5
|
LightElement,
|
6
|
-
|
7
|
-
} from "./chunk-
|
6
|
+
defineCustomElement
|
7
|
+
} from "./chunk-S32IZIQF.js";
|
8
8
|
|
9
9
|
// src/components/combo-box-input/index.ts
|
10
|
-
import {
|
10
|
+
import { ContextConsumer } from "@lit/context";
|
11
11
|
import { html } from "lit";
|
12
|
-
import { customElement, property, state } from "lit/decorators.js";
|
13
12
|
var propNames = ["placeholder"];
|
14
13
|
var ComboBoxInput = class extends LightElement {
|
15
14
|
constructor() {
|
16
15
|
super(...arguments);
|
17
16
|
this.placeholder = "";
|
18
|
-
this.comboBoxContext =
|
17
|
+
this.comboBoxContext = new ContextConsumer(this, {
|
18
|
+
context: comboBoxContext,
|
19
|
+
subscribe: true
|
20
|
+
});
|
19
21
|
this.visible = false;
|
20
22
|
}
|
21
23
|
handleKeydown(event) {
|
22
24
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
switch (event.code) {
|
26
|
+
case "ArrowUp":
|
27
|
+
(_b = (_a = this.comboBoxContext.value) == null ? void 0 : _a.listManager) == null ? void 0 : _b.handleArrowUp();
|
28
|
+
event.preventDefault();
|
29
|
+
return;
|
30
|
+
case "ArrowDown":
|
31
|
+
(_d = (_c = this.comboBoxContext.value) == null ? void 0 : _c.listManager) == null ? void 0 : _d.handleArrowDown();
|
32
|
+
event.preventDefault();
|
33
|
+
return;
|
34
|
+
case "Escape":
|
35
|
+
(_f = (_e = this.comboBoxContext.value) == null ? void 0 : _e.listManager) == null ? void 0 : _f.handleEscape();
|
36
|
+
event.preventDefault();
|
37
|
+
return;
|
38
|
+
case "Enter":
|
39
|
+
(_h = (_g = this.comboBoxContext.value) == null ? void 0 : _g.listManager) == null ? void 0 : _h.handleEnter();
|
40
|
+
event.preventDefault();
|
41
|
+
return;
|
31
42
|
}
|
32
43
|
}
|
33
44
|
handleInput(event) {
|
34
45
|
var _a, _b, _c;
|
35
46
|
const value = (_b = (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.value) != null ? _b : "";
|
36
|
-
(_c = this.comboBoxContext) == null ? void 0 : _c.setInputValue(value);
|
47
|
+
(_c = this.comboBoxContext.value) == null ? void 0 : _c.setInputValue(value);
|
37
48
|
}
|
49
|
+
/**
|
50
|
+
* @hidden
|
51
|
+
*/
|
38
52
|
firstUpdated() {
|
39
53
|
const resizeObserver = new ResizeObserver((entries) => {
|
40
54
|
const visible = entries.some(
|
@@ -50,22 +64,21 @@ var ComboBoxInput = class extends LightElement {
|
|
50
64
|
});
|
51
65
|
resizeObserver.observe(this);
|
52
66
|
}
|
53
|
-
/**
|
67
|
+
/**
|
68
|
+
* @hidden
|
69
|
+
*/
|
54
70
|
render() {
|
55
71
|
var _a, _b;
|
56
|
-
return html`<input placeholder="${this.placeholder}" @keydown="${(event) => this.handleKeydown(event)}" @input="${(event) => this.handleInput(event)}" value="${(_b = (_a = this.comboBoxContext) == null ? void 0 : _a.inputValue) != null ? _b : ""}">`;
|
72
|
+
return html`<input placeholder="${this.placeholder}" @keydown="${(event) => this.handleKeydown(event)}" @input="${(event) => this.handleInput(event)}" .value="${(_b = (_a = this.comboBoxContext.value) == null ? void 0 : _a.inputValue) != null ? _b : ""}">`;
|
57
73
|
}
|
58
74
|
};
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
ComboBoxInput = __decorateClass([
|
67
|
-
customElement("prosekit-combo-box-input")
|
68
|
-
], ComboBoxInput);
|
75
|
+
/**
|
76
|
+
* @hidden
|
77
|
+
*/
|
78
|
+
ComboBoxInput.properties = {
|
79
|
+
placeholder: { attribute: true }
|
80
|
+
};
|
81
|
+
defineCustomElement("prosekit-combo-box-input", ComboBoxInput);
|
69
82
|
export {
|
70
83
|
ComboBoxInput,
|
71
84
|
propNames
|
@@ -1,48 +1,3 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
3
|
-
export {
|
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
|
+
export { ComboBoxItem_alias_1 as ComboBoxItem } from './_tsup-dts-rollup';
|
2
|
+
export { ComboBoxItemProps_alias_1 as ComboBoxItemProps } from './_tsup-dts-rollup';
|
3
|
+
export { propNames_alias_9 as propNames } from './_tsup-dts-rollup';
|
@@ -1,48 +1,3 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
3
|
-
export {
|
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
|
+
export { ComboBoxList_alias_1 as ComboBoxList } from './_tsup-dts-rollup';
|
2
|
+
export { ComboBoxListProps_alias_1 as ComboBoxListProps } from './_tsup-dts-rollup';
|
3
|
+
export { propNames_alias_11 as propNames } from './_tsup-dts-rollup';
|
@@ -3,45 +3,41 @@ import {
|
|
3
3
|
} from "./chunk-C4MW43I4.js";
|
4
4
|
import {
|
5
5
|
LightElement,
|
6
|
-
|
7
|
-
} from "./chunk-
|
6
|
+
defineCustomElement
|
7
|
+
} from "./chunk-S32IZIQF.js";
|
8
8
|
|
9
9
|
// src/components/combo-box-list/component.ts
|
10
|
-
import {
|
11
|
-
import { customElement, state } from "lit/decorators.js";
|
10
|
+
import { ContextConsumer } from "@lit/context";
|
12
11
|
var propNames = [];
|
13
12
|
var ComboBoxList = class extends LightElement {
|
14
13
|
constructor() {
|
15
14
|
super(...arguments);
|
16
|
-
this.comboBoxContext =
|
15
|
+
this.comboBoxContext = new ContextConsumer(this, {
|
16
|
+
context: comboBoxContext,
|
17
|
+
subscribe: true
|
18
|
+
});
|
17
19
|
}
|
18
20
|
connectedCallback() {
|
19
21
|
super.connectedCallback();
|
20
22
|
this.addEventListener("mousemove", (event) => {
|
21
23
|
var _a;
|
22
|
-
(_a = this.comboBoxContext) == null ? void 0 : _a.listManager.handleMouseMove(event);
|
24
|
+
(_a = this.comboBoxContext.value) == null ? void 0 : _a.listManager.handleMouseMove(event);
|
23
25
|
});
|
24
26
|
this.addEventListener("mouseover", (event) => {
|
25
27
|
var _a;
|
26
|
-
(_a = this.comboBoxContext) == null ? void 0 : _a.listManager.handleMouseOver(event);
|
28
|
+
(_a = this.comboBoxContext.value) == null ? void 0 : _a.listManager.handleMouseOver(event);
|
27
29
|
});
|
28
30
|
this.addEventListener("mousedown", (event) => {
|
29
31
|
var _a;
|
30
|
-
(_a = this.comboBoxContext) == null ? void 0 : _a.listManager.handleMouseDown(event);
|
32
|
+
(_a = this.comboBoxContext.value) == null ? void 0 : _a.listManager.handleMouseDown(event);
|
31
33
|
});
|
32
34
|
this.addEventListener("click", (event) => {
|
33
35
|
var _a;
|
34
|
-
(_a = this.comboBoxContext) == null ? void 0 : _a.listManager.handleClick(event);
|
36
|
+
(_a = this.comboBoxContext.value) == null ? void 0 : _a.listManager.handleClick(event);
|
35
37
|
});
|
36
38
|
}
|
37
39
|
};
|
38
|
-
|
39
|
-
consume({ context: comboBoxContext, subscribe: true }),
|
40
|
-
state()
|
41
|
-
], ComboBoxList.prototype, "comboBoxContext", 2);
|
42
|
-
ComboBoxList = __decorateClass([
|
43
|
-
customElement("prosekit-combo-box-list")
|
44
|
-
], ComboBoxList);
|
40
|
+
defineCustomElement("prosekit-combo-box-list", ComboBoxList);
|
45
41
|
export {
|
46
42
|
ComboBoxList,
|
47
43
|
propNames
|
@@ -1,48 +1,3 @@
|
|
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';
|
1
|
+
export { propNames_alias_6 as propNames } from './_tsup-dts-rollup';
|
25
2
|
export { ComboBoxProps } from './_tsup-dts-rollup';
|
26
3
|
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';
|