@htmlplus/element 3.2.4 → 3.2.6
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/README.md +0 -23
- package/dist/client.d.ts +328 -1
- package/dist/client.js +1919 -3
- package/dist/constants.d.ts +1 -2
- package/dist/constants.js +1 -2
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/transformer.d.ts +2 -1
- package/dist/transformer.js +3 -3
- package/package.json +2 -2
- package/dist/client-B2DGXsxR.d.ts +0 -327
- package/dist/client-aQIGQIWV.js +0 -1929
package/dist/constants.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ declare const LIFECYCLE_CONNECTED = "connectedCallback";
|
|
|
20
20
|
declare const LIFECYCLE_CONSTRUCTED = "constructedCallback";
|
|
21
21
|
declare const LIFECYCLE_DISCONNECTED = "disconnectedCallback";
|
|
22
22
|
declare const LIFECYCLE_READY = "readyCallback";
|
|
23
|
-
declare const LIFECYCLE_PREPARE = "prepareCallback";
|
|
24
23
|
declare const LIFECYCLE_UPDATE = "updateCallback";
|
|
25
24
|
declare const LIFECYCLE_UPDATED = "updatedCallback";
|
|
26
25
|
declare const METHOD_RENDER = "render";
|
|
@@ -46,4 +45,4 @@ declare const UTILS_STYLES_IMPORTED = "styles";
|
|
|
46
45
|
declare const UTILS_STYLES_LOCAL = "UTILS_STYLES";
|
|
47
46
|
declare const UTILS_PATH = "@htmlplus/element/internal.js";
|
|
48
47
|
|
|
49
|
-
export { API_CONNECTED, API_HOST, API_RENDER_COMPLETED, API_REQUEST, API_STACKS, API_STYLE, COMMENT_AUTO_ADDED, DECORATOR_CSS_VARIABLE, DECORATOR_ELEMENT, DECORATOR_EVENT, DECORATOR_METHOD, DECORATOR_PROPERTY, DECORATOR_PROPERTY_TYPE, DECORATOR_STATE, ELEMENT_HOST_NAME, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED,
|
|
48
|
+
export { API_CONNECTED, API_HOST, API_RENDER_COMPLETED, API_REQUEST, API_STACKS, API_STYLE, COMMENT_AUTO_ADDED, DECORATOR_CSS_VARIABLE, DECORATOR_ELEMENT, DECORATOR_EVENT, DECORATOR_METHOD, DECORATOR_PROPERTY, DECORATOR_PROPERTY_TYPE, DECORATOR_STATE, ELEMENT_HOST_NAME, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_READY, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BIGINT, TYPE_BOOLEAN, TYPE_DATE, TYPE_ENUM, TYPE_FUNCTION, TYPE_NULL, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING, TYPE_UNDEFINED, UTILS_ATTRIBUTES_IMPORTED, UTILS_ATTRIBUTES_LOCAL, UTILS_HTML_IMPORTED, UTILS_HTML_LOCAL, UTILS_PATH, UTILS_STYLES_IMPORTED, UTILS_STYLES_LOCAL };
|
package/dist/constants.js
CHANGED
|
@@ -26,7 +26,6 @@ const LIFECYCLE_CONNECTED = 'connectedCallback';
|
|
|
26
26
|
const LIFECYCLE_CONSTRUCTED = 'constructedCallback';
|
|
27
27
|
const LIFECYCLE_DISCONNECTED = 'disconnectedCallback';
|
|
28
28
|
const LIFECYCLE_READY = 'readyCallback';
|
|
29
|
-
const LIFECYCLE_PREPARE = 'prepareCallback';
|
|
30
29
|
const LIFECYCLE_UPDATE = 'updateCallback';
|
|
31
30
|
const LIFECYCLE_UPDATED = 'updatedCallback';
|
|
32
31
|
// methods
|
|
@@ -57,4 +56,4 @@ const UTILS_STYLES_IMPORTED = 'styles';
|
|
|
57
56
|
const UTILS_STYLES_LOCAL = 'UTILS_STYLES';
|
|
58
57
|
const UTILS_PATH = '@htmlplus/element/internal.js';
|
|
59
58
|
|
|
60
|
-
export { API_CONNECTED, API_HOST, API_RENDER_COMPLETED, API_REQUEST, API_STACKS, API_STYLE, COMMENT_AUTO_ADDED, DECORATOR_CSS_VARIABLE, DECORATOR_ELEMENT, DECORATOR_EVENT, DECORATOR_METHOD, DECORATOR_PROPERTY, DECORATOR_PROPERTY_TYPE, DECORATOR_STATE, ELEMENT_HOST_NAME, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED,
|
|
59
|
+
export { API_CONNECTED, API_HOST, API_RENDER_COMPLETED, API_REQUEST, API_STACKS, API_STYLE, COMMENT_AUTO_ADDED, DECORATOR_CSS_VARIABLE, DECORATOR_ELEMENT, DECORATOR_EVENT, DECORATOR_METHOD, DECORATOR_PROPERTY, DECORATOR_PROPERTY_TYPE, DECORATOR_STATE, ELEMENT_HOST_NAME, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_READY, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BIGINT, TYPE_BOOLEAN, TYPE_DATE, TYPE_ENUM, TYPE_FUNCTION, TYPE_NULL, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING, TYPE_UNDEFINED, UTILS_ATTRIBUTES_IMPORTED, UTILS_ATTRIBUTES_LOCAL, UTILS_HTML_IMPORTED, UTILS_HTML_LOCAL, UTILS_PATH, UTILS_STYLES_IMPORTED, UTILS_STYLES_LOCAL };
|
package/dist/internal.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as attributes, h as html, s as styles } from './client.js';
|
package/dist/internal.js
CHANGED
package/dist/transformer.d.ts
CHANGED
|
@@ -130,4 +130,5 @@ interface WebTypesOptions {
|
|
|
130
130
|
}
|
|
131
131
|
declare const webTypes: (options?: WebTypesOptions) => TransformerPlugin;
|
|
132
132
|
|
|
133
|
-
export { ASSETS_OPTIONS,
|
|
133
|
+
export { ASSETS_OPTIONS, COPY_OPTIONS, CUSTOM_ELEMENT_OPTIONS, DOCUMENT_OPTIONS, PARSE_OPTIONS, README_OPTIONS, STYLE_OPTIONS, VISUAL_STUDIO_CODE_OPTIONS, WEB_TYPES_OPTIONS, assets, copy, customElement, document, extract, parse, read, readme, style, transformer, validate, visualStudioCode, webTypes };
|
|
134
|
+
export type { AssetsOptions, CopyOptions, CustomElementOptions, DocumentOptions, ParseOptions, ReadmeOptions, StyleOptions, TransformerPlugin, TransformerPluginContext, TransformerPluginGlobal, VisualStudioCodeOptions, WebTypesOptions };
|
package/dist/transformer.js
CHANGED
|
@@ -8,7 +8,7 @@ import template from '@babel/template';
|
|
|
8
8
|
import { pascalCase, kebabCase, camelCase, capitalCase } from 'change-case';
|
|
9
9
|
import ora from 'ora';
|
|
10
10
|
import path, { join, resolve, dirname } from 'node:path';
|
|
11
|
-
import { KEY, COMMENT_AUTO_ADDED, DECORATOR_PROPERTY, STATIC_TAG, UTILS_STYLES_LOCAL, UTILS_PATH,
|
|
11
|
+
import { KEY, COMMENT_AUTO_ADDED, DECORATOR_PROPERTY, STATIC_TAG, UTILS_STYLES_LOCAL, UTILS_PATH, ELEMENT_HOST_NAME, UTILS_HTML_LOCAL, DECORATOR_PROPERTY_TYPE, TYPE_OBJECT, TYPE_NULL, TYPE_ARRAY, TYPE_STRING, TYPE_ENUM, TYPE_NUMBER, TYPE_DATE, TYPE_BOOLEAN, UTILS_ATTRIBUTES_LOCAL, UTILS_STYLES_IMPORTED, UTILS_ATTRIBUTES_IMPORTED, UTILS_HTML_IMPORTED, DECORATOR_CSS_VARIABLE, DECORATOR_EVENT, DECORATOR_METHOD, DECORATOR_STATE, STATIC_STYLE, STYLE_IMPORTED, PACKAGE_NAME, DECORATOR_ELEMENT } from './constants.js';
|
|
12
12
|
|
|
13
13
|
const logger = ora({
|
|
14
14
|
color: 'yellow'
|
|
@@ -1136,7 +1136,7 @@ const visualStudioCode = (options) => {
|
|
|
1136
1136
|
options = Object.assign({}, VISUAL_STUDIO_CODE_OPTIONS, options);
|
|
1137
1137
|
const finish = (global) => {
|
|
1138
1138
|
const contexts = global.contexts.sort((a, b) => {
|
|
1139
|
-
return a.elementKey.toUpperCase() > b.elementKey.toUpperCase() ?
|
|
1139
|
+
return a.elementKey.toUpperCase() > b.elementKey.toUpperCase() ? 1 : -1;
|
|
1140
1140
|
});
|
|
1141
1141
|
const json = {
|
|
1142
1142
|
$schema: 'TODO',
|
|
@@ -1208,7 +1208,7 @@ const webTypes = (options) => {
|
|
|
1208
1208
|
options = Object.assign({}, WEB_TYPES_OPTIONS, options);
|
|
1209
1209
|
const finish = (global) => {
|
|
1210
1210
|
const contexts = global.contexts.sort((a, b) => {
|
|
1211
|
-
return a.elementKey.toUpperCase() > b.elementKey.toUpperCase() ?
|
|
1211
|
+
return a.elementKey.toUpperCase() > b.elementKey.toUpperCase() ? 1 : -1;
|
|
1212
1212
|
});
|
|
1213
1213
|
const json = {
|
|
1214
1214
|
'$schema': 'http://json.schemastore.org/web-types',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlplus/element",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"author": "Masood Abdolian <m.abdolian@gmail.com>",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"rollup-plugin-node-externals": "^7.1.3",
|
|
90
90
|
"semantic-release": "^24.2.0",
|
|
91
91
|
"tslib": "^2.8.0",
|
|
92
|
-
"vite": "^
|
|
92
|
+
"vite": "^6.3.5"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Used to bind a method of a class to the current context,
|
|
3
|
-
* making it easier to reference `this` within the method.
|
|
4
|
-
*/
|
|
5
|
-
declare function Bind(): (target: Object, key: PropertyKey, descriptor: PropertyDescriptor) => {
|
|
6
|
-
configurable: boolean;
|
|
7
|
-
get(): any;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
interface HTMLPlusElement {
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare function Provider(namespace: string): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
14
|
-
declare function Consumer(namespace: string): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* A method decorator that applies debounce behavior to a class method.
|
|
18
|
-
* Ensures that the method executes only after the specified delay,
|
|
19
|
-
* resetting the timer if called again within the delay period.
|
|
20
|
-
*
|
|
21
|
-
* @param {number} delay - The debounce delay in milliseconds.
|
|
22
|
-
*/
|
|
23
|
-
declare function Debounce(delay?: number): (target: Object, key: PropertyKey, descriptor: PropertyDescriptor) => {
|
|
24
|
-
configurable: boolean;
|
|
25
|
-
get(): any;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Indicates whether the [Direction](https://mdn.io/css-direction)
|
|
30
|
-
* of the element is `Right-To-Left` or `Left-To-Right`.
|
|
31
|
-
*/
|
|
32
|
-
declare function Direction(): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The class marked with this decorator is considered a
|
|
36
|
-
* [Custom Element](https://mdn.io/using-custom-elements),
|
|
37
|
-
* and its name, in kebab-case, serves as the element name.
|
|
38
|
-
*/
|
|
39
|
-
declare function Element$1(): (constructor: HTMLPlusElement) => void;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* A function type that generates a `CustomEvent`.
|
|
43
|
-
*/
|
|
44
|
-
type EventEmitter<T = any> = (data?: T) => CustomEvent<T>;
|
|
45
|
-
/**
|
|
46
|
-
* An object that configures
|
|
47
|
-
* [options](https://developer.mozilla.org/docs/Web/API/Event/EventEvent#options)
|
|
48
|
-
* for the event dispatcher.
|
|
49
|
-
*/
|
|
50
|
-
interface EventOptions {
|
|
51
|
-
/**
|
|
52
|
-
* A boolean value indicating whether the event bubbles.
|
|
53
|
-
* The default is `false`.
|
|
54
|
-
*/
|
|
55
|
-
bubbles?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* A boolean value indicating whether the event can be cancelled.
|
|
58
|
-
* The default is `false`.
|
|
59
|
-
*/
|
|
60
|
-
cancelable?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* A boolean value indicating whether the event will trigger listeners outside of a shadow root
|
|
63
|
-
* (see [Event.composed](https://mdn.io/event-composed) for more details).
|
|
64
|
-
* The default is `false`.
|
|
65
|
-
*/
|
|
66
|
-
composed?: boolean;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Provides the capability to dispatch a [CustomEvent](https://mdn.io/custom-event)
|
|
70
|
-
* from an element.
|
|
71
|
-
*
|
|
72
|
-
* @param options An object that configures options for the event dispatcher.
|
|
73
|
-
*/
|
|
74
|
-
declare function Event<T = any>(options?: EventOptions): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Indicates the host of the element.
|
|
78
|
-
*/
|
|
79
|
-
declare function Host(): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Indicates whether the direction of the element is `Right-To-Left` or not.
|
|
83
|
-
*/
|
|
84
|
-
declare function IsRTL(): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* An object that configures
|
|
88
|
-
* [options](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener#options)
|
|
89
|
-
* for the event listener.
|
|
90
|
-
*/
|
|
91
|
-
interface ListenOptions {
|
|
92
|
-
/**
|
|
93
|
-
* A boolean value indicating that events of this type will be dispatched to the registered
|
|
94
|
-
* `listener` before being dispatched to any `EventTarget` beneath it in the DOM tree.
|
|
95
|
-
* If not specified, defaults to `false`.
|
|
96
|
-
*/
|
|
97
|
-
capture?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* A boolean value indicating that the `listener` should be invoked at most once after being added.
|
|
100
|
-
* If `true`, the `listener` would be automatically removed when invoked.
|
|
101
|
-
* If not specified, defaults to `false`.
|
|
102
|
-
*/
|
|
103
|
-
once?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* A boolean value that, if `true`,
|
|
106
|
-
* indicates that the function specified by `listener` will never call
|
|
107
|
-
* [preventDefault()](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault).
|
|
108
|
-
* If a passive listener does call `preventDefault()`,
|
|
109
|
-
* the user agent will do nothing other than generate a console warning.
|
|
110
|
-
*/
|
|
111
|
-
passive?: boolean;
|
|
112
|
-
/**
|
|
113
|
-
* An [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal).
|
|
114
|
-
* The listener will be removed when the given `AbortSignal` object's
|
|
115
|
-
* [abort()](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) method is called.
|
|
116
|
-
* If not specified, no `AbortSignal` is associated with the listener.
|
|
117
|
-
*/
|
|
118
|
-
signal?: AbortSignal;
|
|
119
|
-
/**
|
|
120
|
-
* The target element, defaults to `host`.
|
|
121
|
-
*/
|
|
122
|
-
target?: 'host' | 'body' | 'document' | 'window';
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Will be called whenever the specified event is delivered to the target
|
|
126
|
-
* [More](https://mdn.io/add-event-listener).
|
|
127
|
-
*
|
|
128
|
-
* @param type A case-sensitive string representing the [Event Type](https://mdn.io/events) to listen for.
|
|
129
|
-
* @param options An object that configures
|
|
130
|
-
* [options](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener#options)
|
|
131
|
-
* for the event listener.
|
|
132
|
-
*/
|
|
133
|
-
declare function Listen(type: string, options?: ListenOptions): (target: HTMLPlusElement, key: PropertyKey, descriptor: PropertyDescriptor) => {
|
|
134
|
-
configurable: boolean;
|
|
135
|
-
get(): any;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Provides a way to encapsulate functionality within an element
|
|
140
|
-
* and invoke it as needed, both internally and externally.
|
|
141
|
-
*/
|
|
142
|
-
declare function Method(): (target: HTMLPlusElement, key: PropertyKey, descriptor: PropertyDescriptor) => void;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* The configuration for property decorator.
|
|
146
|
-
*/
|
|
147
|
-
interface PropertyOptions {
|
|
148
|
-
/**
|
|
149
|
-
* Specifies the name of the attribute related to the property.
|
|
150
|
-
*/
|
|
151
|
-
attribute?: string;
|
|
152
|
-
/**
|
|
153
|
-
* Whether property value is reflected back to the associated attribute. default is `false`.
|
|
154
|
-
*/
|
|
155
|
-
reflect?: boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Specifies the property `type` and supports
|
|
158
|
-
* [data types](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures).
|
|
159
|
-
* If this value is not set, it will be set automatically during transforming.
|
|
160
|
-
*/
|
|
161
|
-
type?: any;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Creates a reactive property, reflecting a corresponding attribute value,
|
|
165
|
-
* and updates the element when the property is set.
|
|
166
|
-
*/
|
|
167
|
-
declare function Property(options?: PropertyOptions): (target: HTMLPlusElement, key: string, descriptor?: PropertyDescriptor) => void;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Selects the first element in the shadow dom that matches a specified CSS selector.
|
|
171
|
-
*
|
|
172
|
-
* @param selectors A string containing one or more selectors to match.
|
|
173
|
-
* This string must be a valid CSS selector string; if it isn't, a `SyntaxError` exception is thrown. See
|
|
174
|
-
* [Locating DOM elements using selectors](https://developer.mozilla.org/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors)
|
|
175
|
-
* for more about selectors and how to manage them.
|
|
176
|
-
*/
|
|
177
|
-
declare function Query(selectors: string): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Selects all elements in the shadow dom that match a specified CSS selector.
|
|
181
|
-
*
|
|
182
|
-
* @param selectors A string containing one or more selectors to match against.
|
|
183
|
-
* This string must be a valid
|
|
184
|
-
* [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors)
|
|
185
|
-
* string; if it's not, a `SyntaxError` exception is thrown. See
|
|
186
|
-
* [Locating DOM elements using selectors](https://developer.mozilla.org/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors)
|
|
187
|
-
* for more information about using selectors to identify elements.
|
|
188
|
-
* Multiple selectors may be specified by separating them using commas.
|
|
189
|
-
*/
|
|
190
|
-
declare function QueryAll(selectors: string): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Returns the slots name.
|
|
194
|
-
*/
|
|
195
|
-
declare function Slots$1(): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Applying this decorator to any `class property` will trigger the
|
|
199
|
-
* element to re-render upon the desired property changes.
|
|
200
|
-
*/
|
|
201
|
-
declare function State(): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
202
|
-
|
|
203
|
-
declare function Style(): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Monitors `@Property` and `@State` to detect changes.
|
|
207
|
-
* The decorated method will be called after any changes,
|
|
208
|
-
* with the `key`, `newValue`, and `oldValue` as parameters.
|
|
209
|
-
* If the `key` is not defined, all `@Property` and `@State` are considered.
|
|
210
|
-
*
|
|
211
|
-
* @param keys Collection of `@Property` and `@State` names.
|
|
212
|
-
* @param immediate Triggers the callback immediately after initialization.
|
|
213
|
-
*/
|
|
214
|
-
declare function Watch(keys?: string | string[], immediate?: boolean): (target: HTMLPlusElement, key: PropertyKey) => void;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* TODO
|
|
218
|
-
*/
|
|
219
|
-
declare const classes: (input: any, smart?: boolean) => string;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* TODO
|
|
223
|
-
*/
|
|
224
|
-
interface Config {
|
|
225
|
-
event?: {
|
|
226
|
-
resolver?: (parameters: any) => CustomEvent | undefined;
|
|
227
|
-
};
|
|
228
|
-
asset?: {
|
|
229
|
-
[key: string]: any;
|
|
230
|
-
};
|
|
231
|
-
element?: {
|
|
232
|
-
[key: string]: {
|
|
233
|
-
property?: {
|
|
234
|
-
[key: string]: any;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* TODO
|
|
241
|
-
*/
|
|
242
|
-
interface ConfigOptions {
|
|
243
|
-
/**
|
|
244
|
-
* TODO
|
|
245
|
-
*/
|
|
246
|
-
force?: boolean;
|
|
247
|
-
/**
|
|
248
|
-
* TODO
|
|
249
|
-
*/
|
|
250
|
-
override?: boolean;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* TODO
|
|
254
|
-
*/
|
|
255
|
-
declare const getConfig: (...keys: string[]) => any;
|
|
256
|
-
/**
|
|
257
|
-
* TODO
|
|
258
|
-
*/
|
|
259
|
-
declare const setConfig: (config: Config, options?: ConfigOptions) => void;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Indicates whether the [Direction](https://mdn.io/css-direction)
|
|
263
|
-
* of the element is `Right-To-Left` or `Left-To-Right`.
|
|
264
|
-
*/
|
|
265
|
-
declare const direction: (target: HTMLElement | HTMLPlusElement) => "ltr" | "rtl";
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* TODO
|
|
269
|
-
*/
|
|
270
|
-
declare const dispatch: <T = any>(target: HTMLElement | HTMLPlusElement, type: string, eventInitDict?: CustomEventInit<T>) => CustomEvent<T>;
|
|
271
|
-
/**
|
|
272
|
-
* TODO
|
|
273
|
-
*/
|
|
274
|
-
declare const on: (target: Window | Document | HTMLElement | HTMLPlusElement, type: string, handler: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void;
|
|
275
|
-
/**
|
|
276
|
-
* TODO
|
|
277
|
-
*/
|
|
278
|
-
declare const off: (target: Window | Document | HTMLElement | HTMLPlusElement, type: string, handler: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Indicates the host of the element.
|
|
282
|
-
*/
|
|
283
|
-
declare const host: (target: HTMLElement | HTMLPlusElement) => HTMLElement;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Determines whether the given input string is a valid
|
|
287
|
-
* [CSS Color](https://mdn.io/color-value) or not.
|
|
288
|
-
*/
|
|
289
|
-
declare const isCSSColor: (input: string) => boolean;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Indicates whether the direction of the element is `Right-To-Left` or not.
|
|
293
|
-
*/
|
|
294
|
-
declare const isRTL: (target: HTMLPlusElement) => boolean;
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Selects the first element in the shadow dom that matches a specified CSS selector.
|
|
298
|
-
*/
|
|
299
|
-
declare function query(target: HTMLPlusElement, selectors: string): Element | null | undefined;
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Selects all elements in the shadow dom that match a specified CSS selector.
|
|
303
|
-
*/
|
|
304
|
-
declare function queryAll(target: HTMLPlusElement, selectors: string): NodeListOf<Element> | undefined;
|
|
305
|
-
|
|
306
|
-
type Slots = {
|
|
307
|
-
[key: string]: boolean;
|
|
308
|
-
};
|
|
309
|
-
/**
|
|
310
|
-
* Returns the slots name.
|
|
311
|
-
*/
|
|
312
|
-
declare const slots: (target: HTMLElement | HTMLPlusElement) => Slots;
|
|
313
|
-
|
|
314
|
-
declare const toCSSColor: (input: string) => string | undefined;
|
|
315
|
-
|
|
316
|
-
declare const toCSSUnit: (input?: number | string | null) => string | undefined;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Converts a value to a unit.
|
|
320
|
-
*/
|
|
321
|
-
declare const toUnit: (input: string | number, unit?: string) => string;
|
|
322
|
-
|
|
323
|
-
declare const attributes: any;
|
|
324
|
-
declare const html: any;
|
|
325
|
-
declare const styles: any;
|
|
326
|
-
|
|
327
|
-
export { State as A, Bind as B, type Config as C, Debounce as D, Element$1 as E, Style as F, attributes as G, Host as H, IsRTL as I, html as J, styles as K, type ListenOptions as L, Method as M, Provider as P, Query as Q, Slots$1 as S, Watch as W, type ConfigOptions as a, dispatch as b, classes as c, direction as d, toCSSUnit as e, isRTL as f, getConfig as g, host as h, isCSSColor as i, queryAll as j, off as k, toUnit as l, setConfig as m, Consumer as n, on as o, Direction as p, query as q, type EventEmitter as r, slots as s, toCSSColor as t, type EventOptions as u, Event as v, Listen as w, type PropertyOptions as x, Property as y, QueryAll as z };
|