kr-elements 0.0.1-alpha.12 → 0.0.1-alpha.14
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/cjs/combobox/Boolean.attribute.value.normalizer.js +1 -0
- package/dist/cjs/combobox/Combobox.markup.js +5 -0
- package/dist/cjs/combobox/HTML.combobox.element.js +6 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/combobox/Boolean.attribute.value.normalizer.js +1 -0
- package/dist/esm/combobox/Combobox.markup.js +5 -0
- package/dist/esm/combobox/HTML.combobox.element.js +6 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/combobox/Boolean.attribute.value.normalizer.d.ts +1 -0
- package/dist/types/combobox/Boolean.attribute.value.normalizer.d.ts.map +1 -1
- package/dist/types/index.d.ts +132 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/types.d.ts +4 -2
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toBoolean = toBoolean;
|
|
4
|
+
/** Transform invalid (nullish or stringed) values to correct boolean value */
|
|
4
5
|
function toBoolean(value) {
|
|
5
6
|
if (value == null || value === 'false' || value === false)
|
|
6
7
|
value = false;
|
|
@@ -39,12 +39,15 @@ class ComboboxMarkup {
|
|
|
39
39
|
this.optionsContainer.querySelectorAll('box-option')
|
|
40
40
|
.forEach(option => {
|
|
41
41
|
if (query === '') {
|
|
42
|
+
// option.style.order = "unset";
|
|
42
43
|
option.style.display = "initial";
|
|
43
44
|
}
|
|
44
45
|
else if (!regex.test(option.label)) {
|
|
46
|
+
// option.style.order = "-1";
|
|
45
47
|
option.style.display = "none";
|
|
46
48
|
}
|
|
47
49
|
else {
|
|
50
|
+
// option.style.order = "unset";
|
|
48
51
|
option.style.order = "initial";
|
|
49
52
|
}
|
|
50
53
|
});
|
|
@@ -85,6 +88,7 @@ class ComboboxMarkup {
|
|
|
85
88
|
try {
|
|
86
89
|
this.setDropdownPosition(this.#shadowRoot.host.getBoundingClientRect());
|
|
87
90
|
this.dropdown.style.display = 'flex';
|
|
91
|
+
// @ts-ignore
|
|
88
92
|
this.dropdown.showPopover();
|
|
89
93
|
this.#internals.ariaExpanded = "true";
|
|
90
94
|
}
|
|
@@ -96,6 +100,7 @@ class ComboboxMarkup {
|
|
|
96
100
|
if (event.composedPath().includes(this.#shadowRoot.host))
|
|
97
101
|
return;
|
|
98
102
|
try {
|
|
103
|
+
// @ts-ignore
|
|
99
104
|
this.dropdown.hidePopover();
|
|
100
105
|
this.dropdown.style.display = 'none';
|
|
101
106
|
this.#internals.ariaExpanded = "false";
|
|
@@ -26,6 +26,7 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
26
26
|
this.shadowRoot.adoptedStyleSheets = _a.styleSheet;
|
|
27
27
|
this.#observer = new MutationObserver(this.#onOptionsChanges);
|
|
28
28
|
}
|
|
29
|
+
// Lifecycle callbacks
|
|
29
30
|
connectedCallback() {
|
|
30
31
|
this.#markup.connect();
|
|
31
32
|
this.#initialAttributesSynchronization();
|
|
@@ -48,6 +49,8 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
48
49
|
formDisabledCallback(isDisabled) {
|
|
49
50
|
this.disabled = isDisabled;
|
|
50
51
|
}
|
|
52
|
+
// Instance properties
|
|
53
|
+
// readonly
|
|
51
54
|
get valueAsArray() {
|
|
52
55
|
return Array.from(this.#values);
|
|
53
56
|
}
|
|
@@ -60,6 +63,7 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
60
63
|
get willValidate() {
|
|
61
64
|
return this.internals.willValidate;
|
|
62
65
|
}
|
|
66
|
+
// configurable
|
|
63
67
|
get value() {
|
|
64
68
|
return this.valueAsArray.join(',');
|
|
65
69
|
}
|
|
@@ -155,6 +159,7 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
155
159
|
this.#markup.searchInput.placeholder = value;
|
|
156
160
|
}
|
|
157
161
|
}
|
|
162
|
+
// Instance methods
|
|
158
163
|
setAttribute(name, value) {
|
|
159
164
|
if (_a.booleanAttributes.has(name)) {
|
|
160
165
|
Reflect.set(this, name, (0, Boolean_attribute_value_normalizer_js_1.toBoolean)(value));
|
|
@@ -190,6 +195,7 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
190
195
|
this.internals.setValidity({ customError: true }, message);
|
|
191
196
|
}
|
|
192
197
|
}
|
|
198
|
+
// Internal
|
|
193
199
|
#onInput = (event) => {
|
|
194
200
|
if (this.filterable) {
|
|
195
201
|
if (event.target && event.target instanceof HTMLInputElement) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../../src/index.ts","../../src/
|
|
1
|
+
{"root":["../../src/index.ts","../../src/combobox/boolean.attribute.value.normalizer.ts","../../src/combobox/combobox.markup.ts","../../src/combobox/html.combobox.element.ts","../../src/combobox/html.combobox.option.element.ts","../../src/combobox/html.combobox.tag.element.ts","../../src/combobox/index.ts"],"version":"5.9.3"}
|
|
@@ -36,12 +36,15 @@ export class ComboboxMarkup {
|
|
|
36
36
|
this.optionsContainer.querySelectorAll('box-option')
|
|
37
37
|
.forEach(option => {
|
|
38
38
|
if (query === '') {
|
|
39
|
+
// option.style.order = "unset";
|
|
39
40
|
option.style.display = "initial";
|
|
40
41
|
}
|
|
41
42
|
else if (!regex.test(option.label)) {
|
|
43
|
+
// option.style.order = "-1";
|
|
42
44
|
option.style.display = "none";
|
|
43
45
|
}
|
|
44
46
|
else {
|
|
47
|
+
// option.style.order = "unset";
|
|
45
48
|
option.style.order = "initial";
|
|
46
49
|
}
|
|
47
50
|
});
|
|
@@ -82,6 +85,7 @@ export class ComboboxMarkup {
|
|
|
82
85
|
try {
|
|
83
86
|
this.setDropdownPosition(this.#shadowRoot.host.getBoundingClientRect());
|
|
84
87
|
this.dropdown.style.display = 'flex';
|
|
88
|
+
// @ts-ignore
|
|
85
89
|
this.dropdown.showPopover();
|
|
86
90
|
this.#internals.ariaExpanded = "true";
|
|
87
91
|
}
|
|
@@ -93,6 +97,7 @@ export class ComboboxMarkup {
|
|
|
93
97
|
if (event.composedPath().includes(this.#shadowRoot.host))
|
|
94
98
|
return;
|
|
95
99
|
try {
|
|
100
|
+
// @ts-ignore
|
|
96
101
|
this.dropdown.hidePopover();
|
|
97
102
|
this.dropdown.style.display = 'none';
|
|
98
103
|
this.#internals.ariaExpanded = "false";
|
|
@@ -22,6 +22,7 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
22
22
|
this.shadowRoot.adoptedStyleSheets = HTMLComboboxElement.styleSheet;
|
|
23
23
|
this.#observer = new MutationObserver(this.#onOptionsChanges);
|
|
24
24
|
}
|
|
25
|
+
// Lifecycle callbacks
|
|
25
26
|
connectedCallback() {
|
|
26
27
|
this.#markup.connect();
|
|
27
28
|
this.#initialAttributesSynchronization();
|
|
@@ -44,6 +45,8 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
44
45
|
formDisabledCallback(isDisabled) {
|
|
45
46
|
this.disabled = isDisabled;
|
|
46
47
|
}
|
|
48
|
+
// Instance properties
|
|
49
|
+
// readonly
|
|
47
50
|
get valueAsArray() {
|
|
48
51
|
return Array.from(this.#values);
|
|
49
52
|
}
|
|
@@ -56,6 +59,7 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
56
59
|
get willValidate() {
|
|
57
60
|
return this.internals.willValidate;
|
|
58
61
|
}
|
|
62
|
+
// configurable
|
|
59
63
|
get value() {
|
|
60
64
|
return this.valueAsArray.join(',');
|
|
61
65
|
}
|
|
@@ -151,6 +155,7 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
151
155
|
this.#markup.searchInput.placeholder = value;
|
|
152
156
|
}
|
|
153
157
|
}
|
|
158
|
+
// Instance methods
|
|
154
159
|
setAttribute(name, value) {
|
|
155
160
|
if (HTMLComboboxElement.booleanAttributes.has(name)) {
|
|
156
161
|
Reflect.set(this, name, toBoolean(value));
|
|
@@ -186,6 +191,7 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
186
191
|
this.internals.setValidity({ customError: true }, message);
|
|
187
192
|
}
|
|
188
193
|
}
|
|
194
|
+
// Internal
|
|
189
195
|
#onInput = (event) => {
|
|
190
196
|
if (this.filterable) {
|
|
191
197
|
if (event.target && event.target instanceof HTMLInputElement) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../../src/index.ts","../../src/
|
|
1
|
+
{"root":["../../src/index.ts","../../src/combobox/boolean.attribute.value.normalizer.ts","../../src/combobox/combobox.markup.ts","../../src/combobox/html.combobox.element.ts","../../src/combobox/html.combobox.option.element.ts","../../src/combobox/html.combobox.tag.element.ts","../../src/combobox/index.ts"],"version":"5.9.3"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Boolean.attribute.value.normalizer.d.ts","sourceRoot":"","sources":["../../../src/combobox/Boolean.attribute.value.normalizer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Boolean.attribute.value.normalizer.d.ts","sourceRoot":"","sources":["../../../src/combobox/Boolean.attribute.value.normalizer.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,WAInC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,134 @@
|
|
|
1
1
|
export * from './combobox/index.js';
|
|
2
|
+
interface HTMLComboboxTagElement extends HTMLElement {
|
|
3
|
+
}
|
|
4
|
+
interface HTMLComboboxOptionElement extends HTMLOptionElement {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
interface HTMLComboboxElement extends HTMLSelectElement {
|
|
9
|
+
/** List of selected options value attribute */
|
|
10
|
+
valueAsArray: string[];
|
|
11
|
+
multiple: boolean;
|
|
12
|
+
/** The value of internal input
|
|
13
|
+
*
|
|
14
|
+
* Internal input is visible when either "searchable" or "filterable" attribute is presented */
|
|
15
|
+
query: string;
|
|
16
|
+
/** The placeholder of internal input
|
|
17
|
+
*
|
|
18
|
+
* Internal input is visible when either "searchable" or "filterable" attribute is presented
|
|
19
|
+
*
|
|
20
|
+
* When <combo-box> is empty, this value is also shown as <combo-box> placeholder itself
|
|
21
|
+
* */
|
|
22
|
+
placeholder: string;
|
|
23
|
+
/** When is true, the clear-all-button is shown in the <combo-box> itself,
|
|
24
|
+
* and the clear-button is shown for each selected tag.
|
|
25
|
+
*
|
|
26
|
+
* If multiple attribute is set to "true", this is also enabled.
|
|
27
|
+
*
|
|
28
|
+
* If multiple attribute is set to "false", i.e. the <combo-box> is used as a <select>,
|
|
29
|
+
* then setting this attribute to "true" will make the clear-button of selected tag visible
|
|
30
|
+
* */
|
|
31
|
+
clearable: boolean;
|
|
32
|
+
/** When is true, the internal input is shown.
|
|
33
|
+
*
|
|
34
|
+
* When user type something, available options are not filtered by this query.
|
|
35
|
+
* You have to set an "input" listener to the <combo-box> and filter options by yourself
|
|
36
|
+
*
|
|
37
|
+
* Setting both "searchable" and "filterable" make no sense, the "searchable" will have priority
|
|
38
|
+
* */
|
|
39
|
+
searchable: boolean;
|
|
40
|
+
/** When is true, the internal input is shown.
|
|
41
|
+
*
|
|
42
|
+
* When user type something, available options are filtered by this query.
|
|
43
|
+
*
|
|
44
|
+
* Setting both "filterable" and "searchable" make no sense, the "searchable" will have priority
|
|
45
|
+
* */
|
|
46
|
+
filterable: boolean;
|
|
47
|
+
selectedOptions: HTMLCollectionOf<HTMLComboboxOptionElement>;
|
|
48
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
49
|
+
addEventListener<K extends keyof ComboboxEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: ComboboxEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
50
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
51
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
52
|
+
removeEventListener<K extends keyof ComboboxEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: ComboboxEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
53
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
54
|
+
}
|
|
55
|
+
interface ComboboxEvent extends Event {
|
|
56
|
+
readonly target: HTMLComboboxElement;
|
|
57
|
+
readonly currentTarget: HTMLComboboxElement;
|
|
58
|
+
}
|
|
59
|
+
interface ComboboxInputEvent extends InputEvent {
|
|
60
|
+
readonly target: HTMLComboboxElement;
|
|
61
|
+
readonly currentTarget: HTMLComboboxElement;
|
|
62
|
+
}
|
|
63
|
+
interface ComboboxFocusEvent extends FocusEvent {
|
|
64
|
+
readonly target: HTMLComboboxElement;
|
|
65
|
+
}
|
|
66
|
+
interface ComboboxEventMap extends HTMLElementEventMap {
|
|
67
|
+
"change": ComboboxEvent;
|
|
68
|
+
"blur": ComboboxFocusEvent;
|
|
69
|
+
"focus": ComboboxFocusEvent;
|
|
70
|
+
"focusin": ComboboxFocusEvent;
|
|
71
|
+
"focusout": ComboboxFocusEvent;
|
|
72
|
+
"input": ComboboxInputEvent;
|
|
73
|
+
"invalid": ComboboxEvent;
|
|
74
|
+
"selectionchange": ComboboxEvent;
|
|
75
|
+
"selectstart": ComboboxEvent;
|
|
76
|
+
}
|
|
77
|
+
interface ComboboxJsxAttributes {
|
|
78
|
+
/** The value of the internal input.
|
|
79
|
+
*
|
|
80
|
+
* The internal input is visible when either the `searchable` or `filterable` attribute is present.
|
|
81
|
+
*
|
|
82
|
+
* Setting ""
|
|
83
|
+
* */
|
|
84
|
+
query?: string;
|
|
85
|
+
/** A comma-separated list of descendant `<box-option>` value attributes to be selected by default.
|
|
86
|
+
*
|
|
87
|
+
* When the `multiple` attribute is present, only the first option will be selected.
|
|
88
|
+
*
|
|
89
|
+
* Alternatively, you can set default selections by adding the `selected` attribute directly to individual `<box-option>` elements. */
|
|
90
|
+
value?: string;
|
|
91
|
+
/** This Boolean attribute indicates that multiple options can be selected.
|
|
92
|
+
*
|
|
93
|
+
* When present, users can select multiple options. When absent, only one option can be selected at a time (the `<combo-box>` behaves like a `<select>`). */
|
|
94
|
+
multiple?: boolean;
|
|
95
|
+
/** The placeholder for the internal input.
|
|
96
|
+
*
|
|
97
|
+
* The internal input is visible when either the `searchable` or `filterable` attribute is present.
|
|
98
|
+
*
|
|
99
|
+
* When the `<combo-box>` is empty, this value is also shown as the `<combo-box>` placeholder itself. */
|
|
100
|
+
placeholder?: string;
|
|
101
|
+
/** When present, the clear-all button is shown in the `<combo-box>` itself, and the clear button is shown for each selected tag.
|
|
102
|
+
*
|
|
103
|
+
* This attribute is automatically enabled when the `multiple` attribute is present.
|
|
104
|
+
*
|
|
105
|
+
* When the `multiple` attribute is absent (single-select mode), setting `clearable` makes the clear button visible on the selected tag. */
|
|
106
|
+
clearable?: boolean;
|
|
107
|
+
/** When present, the internal input is shown.
|
|
108
|
+
*
|
|
109
|
+
* As the user types, available options are **not** filtered by the query. You must attach an `input` listener to the `<combo-box>` and filter options manually.
|
|
110
|
+
*
|
|
111
|
+
* Setting both `searchable` and `filterable` is not recommended—`searchable` takes precedence. */
|
|
112
|
+
searchable?: boolean;
|
|
113
|
+
/** When present, the internal input is shown.
|
|
114
|
+
*
|
|
115
|
+
* As the user types, available options are filtered by the query automatically.
|
|
116
|
+
*
|
|
117
|
+
* Setting both `filterable` and `searchable` is not recommended—`searchable` takes precedence. */
|
|
118
|
+
filterable?: boolean;
|
|
119
|
+
/** A Boolean attribute indicating that at least one option must be selected. */
|
|
120
|
+
required?: boolean;
|
|
121
|
+
disabled?: boolean;
|
|
122
|
+
}
|
|
123
|
+
declare global {
|
|
124
|
+
namespace React {
|
|
125
|
+
namespace JSX {
|
|
126
|
+
interface IntrinsicElements {
|
|
127
|
+
'combo-box': React.DetailedHTMLProps<Omit<React.HTMLAttributes<HTMLComboboxElement>, 'defaultValue'>, HTMLComboboxElement> & ComboboxJsxAttributes;
|
|
128
|
+
'box-option': HTMLComboboxOptionElement;
|
|
129
|
+
'box-tag': HTMLComboboxTagElement;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
2
134
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AAEpC,UAAU,sBAAuB,SAAQ,WAAW;CAAG;AAEvD,UAAU,yBAA0B,SAAQ,iBAAiB;IAC3D,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,mBAAoB,SAAQ,iBAAiB;IACrD,+CAA+C;IAC/C,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB,QAAQ,EAAE,OAAO,CAAC;IAElB;;mGAE+F;IAC/F,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;SAKK;IACL,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;SAOK;IACL,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;;;SAMK;IACL,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;;SAKK;IACL,UAAU,EAAE,OAAO,CAAC;IAEpB,eAAe,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;IAI7D,gBAAgB,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAClD,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,IAAI,EAA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,CAAC,EAAE,cAAc,CAAC,EAClG,mBAAmB,CACpB,GAAG,qBAAqB,CAAC;gBAE1B,YAAY,EAAE,yBAAyB,CAAC;gBACxC,SAAS,EAAE,sBAAsB,CAAC;aACnC;SACF;KACF;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../../src/index.ts","../../src/
|
|
1
|
+
{"root":["../../src/index.ts","../../src/combobox/boolean.attribute.value.normalizer.ts","../../src/combobox/combobox.markup.ts","../../src/combobox/html.combobox.element.ts","../../src/combobox/html.combobox.option.element.ts","../../src/combobox/html.combobox.tag.element.ts","../../src/combobox/index.ts"],"version":"5.9.3"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -179,13 +179,15 @@ interface ComboboxJsxAttributes {
|
|
|
179
179
|
|
|
180
180
|
/** A Boolean attribute indicating that at least one option must be selected. */
|
|
181
181
|
required?: boolean;
|
|
182
|
+
|
|
183
|
+
disabled?: boolean;
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
declare namespace React {
|
|
185
187
|
namespace JSX {
|
|
186
188
|
interface IntrinsicElements {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
// @ts-ignore
|
|
190
|
+
'combo-box': React.DetailedHTMLProps<Omit<React.HTMLAttributes<HTMLComboboxElement>, 'defaultValue'>,
|
|
189
191
|
HTMLComboboxElement
|
|
190
192
|
> & ComboboxJsxAttributes;
|
|
191
193
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kr-elements",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.14",
|
|
4
4
|
"description": "Custom elements",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepare": "husky",
|
|
8
8
|
"clean": "rm -rf dist",
|
|
9
|
-
"build:combobox": "tsc -b configs/tsconfig.cjs.json configs/tsconfig.esm.json configs/tsconfig.types.json
|
|
9
|
+
"build:combobox": "tsc -b configs/tsconfig.cjs.json configs/tsconfig.esm.json configs/tsconfig.types.json",
|
|
10
10
|
"generate": "node --import tsx ./scripts/genPackageFiles.ts",
|
|
11
11
|
"build": "npm-run-all clean build:combobox generate",
|
|
12
12
|
"check-types": "tsc --noEmit"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
],
|
|
40
40
|
"main": "dist/cjs/index.js",
|
|
41
41
|
"module": "dist/esm/index.js",
|
|
42
|
-
"types": "dist/types.d.ts"
|
|
42
|
+
"types": "dist/types/index.d.ts"
|
|
43
43
|
}
|