@htmlplus/element 2.9.3 → 2.9.5
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 -1
- package/client/decorators/bind.js +1 -1
- package/client/decorators/context.js +4 -6
- package/client/decorators/element.d.ts +1 -1
- package/client/decorators/element.js +44 -47
- package/client/decorators/event.d.ts +1 -1
- package/client/decorators/event.js +4 -5
- package/client/decorators/listen.d.ts +1 -1
- package/client/decorators/listen.js +1 -1
- package/client/decorators/method.d.ts +1 -1
- package/client/decorators/property.d.ts +1 -1
- package/client/decorators/property.js +7 -8
- package/client/decorators/state.d.ts +1 -1
- package/client/decorators/watch.d.ts +1 -1
- package/client/utils/appendToMethod.js +1 -1
- package/client/utils/attributes.d.ts +1 -1
- package/client/utils/attributes.js +1 -1
- package/client/utils/call.js +1 -2
- package/client/utils/config.js +1 -1
- package/client/utils/direction.d.ts +1 -1
- package/client/utils/event.d.ts +1 -1
- package/client/utils/getFramework.d.ts +1 -1
- package/client/utils/getStyles.d.ts +1 -1
- package/client/utils/getStyles.js +1 -2
- package/client/utils/getTag.d.ts +1 -1
- package/client/utils/getTag.js +1 -2
- package/client/utils/host.d.ts +1 -1
- package/client/utils/host.js +1 -1
- package/client/utils/isEvent.js +1 -1
- package/client/utils/isRTL.d.ts +1 -1
- package/client/utils/query.d.ts +1 -1
- package/client/utils/query.js +1 -2
- package/client/utils/queryAll.d.ts +1 -1
- package/client/utils/queryAll.js +1 -2
- package/client/utils/request.d.ts +1 -1
- package/client/utils/request.js +2 -3
- package/client/utils/shadowRoot.d.ts +1 -1
- package/client/utils/shadowRoot.js +1 -2
- package/client/utils/slots.d.ts +1 -1
- package/client/utils/slots.js +1 -2
- package/client/utils/toDecorator.d.ts +1 -1
- package/client/utils/toEvent.js +1 -1
- package/client/utils/toProperty.js +2 -2
- package/client/utils/updateAttribute.d.ts +1 -1
- package/package.json +19 -19
- package/transformer/plugins/assets.d.ts +1 -1
- package/transformer/plugins/copy.d.ts +1 -1
- package/transformer/plugins/customElement.d.ts +1 -1
- package/transformer/plugins/customElement.js +12 -13
- package/transformer/plugins/document.d.ts +1 -1
- package/transformer/plugins/document.js +18 -26
- package/transformer/plugins/extract.d.ts +1 -1
- package/transformer/plugins/extract.js +3 -4
- package/transformer/plugins/parse.d.ts +1 -1
- package/transformer/plugins/read.d.ts +2 -3
- package/transformer/plugins/readme.d.ts +1 -1
- package/transformer/plugins/style.d.ts +1 -1
- package/transformer/plugins/validate.d.ts +1 -1
- package/transformer/plugins/validate.js +1 -2
- package/transformer/plugins/visualStudioCode.d.ts +1 -1
- package/transformer/plugins/visualStudioCode.js +3 -4
- package/transformer/plugins/webTypes.d.ts +1 -1
- package/transformer/plugins/webTypes.js +15 -19
- package/transformer/transformer.d.ts +1 -1
- package/transformer/utils/addDependency.js +2 -3
- package/transformer/utils/extractAttribute.js +1 -1
- package/transformer/utils/extractFromComment.js +11 -8
- package/transformer/utils/getInitializer.js +1 -2
- package/transformer/utils/getType.js +3 -3
- package/transformer/utils/hasDecorator.js +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,6 @@ A powerful tool for building a scalable, reusable, fast, and lightweight `UI Com
|
|
|
26
26
|
- **Style File Recognition**: Identifies and links the relevant style file to the element.
|
|
27
27
|
- **Tag Name Recognition**: Generates tag name from the class name.
|
|
28
28
|
- **Clean Syntax**: Uses a minimal amount of code to achieve the same functionality, making the code easier to read, understand, and maintain.
|
|
29
|
-
- **Attribute Over Class**: Uses HTML attributes instead of HTML class names to keep the size of the start tag short, making it more readable and preventing the DOM from getting dirty.
|
|
30
29
|
|
|
31
30
|
## Quick Start
|
|
32
31
|
|
|
@@ -8,7 +8,7 @@ export function Bind() {
|
|
|
8
8
|
return {
|
|
9
9
|
configurable: true,
|
|
10
10
|
get() {
|
|
11
|
-
const value = descriptor
|
|
11
|
+
const value = descriptor?.value.bind(this);
|
|
12
12
|
defineProperty(this, key, {
|
|
13
13
|
value,
|
|
14
14
|
configurable: true,
|
|
@@ -6,7 +6,7 @@ export function Provider(namespace) {
|
|
|
6
6
|
const [MAIN, SUB] = namespace.split('.');
|
|
7
7
|
const prefix = `htmlplus:${MAIN}`;
|
|
8
8
|
const cleanups = (instance) => {
|
|
9
|
-
return (instance[symbol]
|
|
9
|
+
return (instance[symbol] ||= new Map());
|
|
10
10
|
};
|
|
11
11
|
const update = (instance) => {
|
|
12
12
|
const options = {};
|
|
@@ -31,11 +31,10 @@ export function Provider(namespace) {
|
|
|
31
31
|
cleanups(this).set(prefix, cleanup);
|
|
32
32
|
});
|
|
33
33
|
appendToMethod(target, CONSTANTS.LIFECYCLE_UPDATE, function (states) {
|
|
34
|
-
var _a;
|
|
35
34
|
update(this);
|
|
36
35
|
if (cleanups(this).size && !states.has(SUB))
|
|
37
36
|
return;
|
|
38
|
-
|
|
37
|
+
cleanups(this).get(`${prefix}:${states.get(SUB)}`)?.();
|
|
39
38
|
const type = `${prefix}:${this[SUB]}`;
|
|
40
39
|
const cleanup = () => {
|
|
41
40
|
off(window, `${type}:presence`, onPresence);
|
|
@@ -59,7 +58,7 @@ export function Consumer(namespace) {
|
|
|
59
58
|
const [MAIN, SUB] = namespace.split('.');
|
|
60
59
|
const prefix = `htmlplus:${MAIN}`;
|
|
61
60
|
const cleanups = (instance) => {
|
|
62
|
-
return (instance[symbol]
|
|
61
|
+
return (instance[symbol] ||= new Map());
|
|
63
62
|
};
|
|
64
63
|
const update = (instance, state) => {
|
|
65
64
|
instance[key] = state;
|
|
@@ -94,10 +93,9 @@ export function Consumer(namespace) {
|
|
|
94
93
|
!connected && setTimeout(() => dispatch(this, `${prefix}:presence`, options));
|
|
95
94
|
});
|
|
96
95
|
appendToMethod(target, CONSTANTS.LIFECYCLE_UPDATE, function (states) {
|
|
97
|
-
var _a;
|
|
98
96
|
if (cleanups(this).size && !states.has(SUB))
|
|
99
97
|
return;
|
|
100
|
-
|
|
98
|
+
cleanups(this).get(`${prefix}:${states.get(SUB)}`)?.();
|
|
101
99
|
const type = `${prefix}:${this[SUB]}`;
|
|
102
100
|
const cleanup = () => {
|
|
103
101
|
off(window, `${type}:disconnect`, onDisconnect);
|
|
@@ -17,52 +17,49 @@ export function Element() {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
const proxy = (constructor) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
catch (_b) { }
|
|
45
|
-
}
|
|
46
|
-
connectedCallback() {
|
|
47
|
-
const instance = this[CONSTANTS.API_INSTANCE];
|
|
48
|
-
// TODO: experimental for global config
|
|
49
|
-
Object.assign(instance, getConfig('element', getTag(instance), 'property'));
|
|
50
|
-
instance[CONSTANTS.API_CONNECTED] = true;
|
|
51
|
-
const connect = () => {
|
|
52
|
-
request(instance, undefined, undefined, () => {
|
|
53
|
-
call(instance, CONSTANTS.LIFECYCLE_LOADED);
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
const callback = call(instance, CONSTANTS.LIFECYCLE_CONNECTED);
|
|
57
|
-
if (!(callback === null || callback === void 0 ? void 0 : callback.then))
|
|
58
|
-
return connect();
|
|
59
|
-
callback.then(() => connect());
|
|
20
|
+
return class Plus extends HTMLElement {
|
|
21
|
+
static formAssociated = constructor['formAssociated'];
|
|
22
|
+
static observedAttributes = constructor['observedAttributes'];
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.attachShadow({
|
|
26
|
+
mode: 'open',
|
|
27
|
+
delegatesFocus: constructor['delegatesFocus'],
|
|
28
|
+
slotAssignment: constructor['slotAssignment']
|
|
29
|
+
});
|
|
30
|
+
const instance = (this[CONSTANTS.API_INSTANCE] = new constructor());
|
|
31
|
+
instance[CONSTANTS.API_HOST] = () => this;
|
|
32
|
+
call(instance, CONSTANTS.LIFECYCLE_CONSTRUCTED);
|
|
33
|
+
}
|
|
34
|
+
adoptedCallback() {
|
|
35
|
+
call(this[CONSTANTS.API_INSTANCE], CONSTANTS.LIFECYCLE_ADOPTED);
|
|
36
|
+
}
|
|
37
|
+
attributeChangedCallback(key, prev, next) {
|
|
38
|
+
// Ensures the integrity of readonly properties to prevent potential errors.
|
|
39
|
+
try {
|
|
40
|
+
const attribute = constructor[CONSTANTS.MAPPER]?.[key];
|
|
41
|
+
const property = attribute || camelCase(key);
|
|
42
|
+
this[property] = next;
|
|
60
43
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
44
|
+
catch { }
|
|
45
|
+
}
|
|
46
|
+
connectedCallback() {
|
|
47
|
+
const instance = this[CONSTANTS.API_INSTANCE];
|
|
48
|
+
// TODO: experimental for global config
|
|
49
|
+
Object.assign(instance, getConfig('element', getTag(instance), 'property'));
|
|
50
|
+
instance[CONSTANTS.API_CONNECTED] = true;
|
|
51
|
+
const connect = () => {
|
|
52
|
+
request(instance, undefined, undefined, () => {
|
|
53
|
+
call(instance, CONSTANTS.LIFECYCLE_LOADED);
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const callback = call(instance, CONSTANTS.LIFECYCLE_CONNECTED);
|
|
57
|
+
if (!callback?.then)
|
|
58
|
+
return connect();
|
|
59
|
+
callback.then(() => connect());
|
|
60
|
+
}
|
|
61
|
+
disconnectedCallback() {
|
|
62
|
+
call(this[CONSTANTS.API_INSTANCE], CONSTANTS.LIFECYCLE_DISCONNECTED);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
68
65
|
};
|
|
@@ -11,10 +11,9 @@ export function Event(options = {}) {
|
|
|
11
11
|
defineProperty(target, key, {
|
|
12
12
|
get() {
|
|
13
13
|
return (detail) => {
|
|
14
|
-
var _a, _b;
|
|
15
14
|
const element = host(this);
|
|
16
15
|
const framework = getFramework(this);
|
|
17
|
-
|
|
16
|
+
options.bubbles ??= false;
|
|
18
17
|
let type = String(key);
|
|
19
18
|
switch (framework) {
|
|
20
19
|
// TODO: Experimental
|
|
@@ -28,7 +27,7 @@ export function Event(options = {}) {
|
|
|
28
27
|
})
|
|
29
28
|
});
|
|
30
29
|
}
|
|
31
|
-
catch
|
|
30
|
+
catch { }
|
|
32
31
|
break;
|
|
33
32
|
case 'qwik':
|
|
34
33
|
case 'solid':
|
|
@@ -43,9 +42,9 @@ export function Event(options = {}) {
|
|
|
43
42
|
break;
|
|
44
43
|
}
|
|
45
44
|
let event;
|
|
46
|
-
event
|
|
45
|
+
event ||= getConfig('event', 'resolver')?.({ detail, element, framework, options, type });
|
|
47
46
|
event && element.dispatchEvent(event);
|
|
48
|
-
event
|
|
47
|
+
event ||= dispatch(this, type, { ...options, detail });
|
|
49
48
|
return event;
|
|
50
49
|
};
|
|
51
50
|
}
|
|
@@ -13,7 +13,7 @@ import { Bind } from './bind.js';
|
|
|
13
13
|
export function Listen(type, options) {
|
|
14
14
|
return function (target, key, descriptor) {
|
|
15
15
|
const element = (instance) => {
|
|
16
|
-
switch (options
|
|
16
|
+
switch (options?.target) {
|
|
17
17
|
case 'body':
|
|
18
18
|
return window.document.body;
|
|
19
19
|
case 'document':
|
|
@@ -7,19 +7,18 @@ import { appendToMethod, defineProperty, host, request, toProperty, updateAttrib
|
|
|
7
7
|
*/
|
|
8
8
|
export function Property(options) {
|
|
9
9
|
return function (target, key, descriptor) {
|
|
10
|
-
var _a, _b, _c;
|
|
11
10
|
// Creates a unique symbol for the lock flag.
|
|
12
11
|
const locked = Symbol();
|
|
13
12
|
// Converts property name to string.
|
|
14
13
|
const name = String(key);
|
|
15
14
|
// Calculates attribute.
|
|
16
|
-
const attribute =
|
|
15
|
+
const attribute = options?.attribute || kebabCase(name);
|
|
17
16
|
// Registers an attribute that is intricately linked to the property.
|
|
18
|
-
(
|
|
17
|
+
(target.constructor['observedAttributes'] ||= []).push(attribute);
|
|
19
18
|
// TODO
|
|
20
19
|
if (attribute) {
|
|
21
20
|
// TODO
|
|
22
|
-
|
|
21
|
+
target.constructor[CONSTANTS.MAPPER] ||= {};
|
|
23
22
|
// TODO
|
|
24
23
|
target.constructor[CONSTANTS.MAPPER][attribute] = name;
|
|
25
24
|
}
|
|
@@ -27,12 +26,12 @@ export function Property(options) {
|
|
|
27
26
|
// When the property is a getter function.
|
|
28
27
|
if (descriptor) {
|
|
29
28
|
// Checks the reflection.
|
|
30
|
-
if (options
|
|
29
|
+
if (options?.reflect) {
|
|
31
30
|
// Stores the original getter function.
|
|
32
31
|
const getter = descriptor.get;
|
|
33
32
|
// Defines a new getter function.
|
|
34
33
|
descriptor.get = function () {
|
|
35
|
-
const value = getter
|
|
34
|
+
const value = getter?.apply(this);
|
|
36
35
|
this[locked] = true;
|
|
37
36
|
updateAttribute(this, attribute, value);
|
|
38
37
|
this[locked] = false;
|
|
@@ -62,7 +61,7 @@ export function Property(options) {
|
|
|
62
61
|
request(this, name, previous, (skipped) => {
|
|
63
62
|
if (skipped)
|
|
64
63
|
return;
|
|
65
|
-
if (!
|
|
64
|
+
if (!options?.reflect)
|
|
66
65
|
return;
|
|
67
66
|
this[locked] = true;
|
|
68
67
|
updateAttribute(this, attribute, next);
|
|
@@ -85,7 +84,7 @@ export function Property(options) {
|
|
|
85
84
|
if (this[locked]) {
|
|
86
85
|
return;
|
|
87
86
|
}
|
|
88
|
-
this[key] = toProperty(input, options
|
|
87
|
+
this[key] = toProperty(input, options?.type);
|
|
89
88
|
};
|
|
90
89
|
// TODO: Check the configuration.
|
|
91
90
|
// Attaches the getter and setter functions to the current property of the host element.
|
|
@@ -4,7 +4,7 @@ export const appendToMethod = (target, key, handler) => {
|
|
|
4
4
|
// Creates new function
|
|
5
5
|
function next(...parameters) {
|
|
6
6
|
// Calls the previous
|
|
7
|
-
const result = previous
|
|
7
|
+
const result = previous?.bind(this)(...parameters);
|
|
8
8
|
// Calls the appended
|
|
9
9
|
handler.bind(this)(...parameters);
|
|
10
10
|
// Returns the result
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLPlusElement } from '../../types';
|
|
1
|
+
import { HTMLPlusElement } from '../../types/index.js';
|
|
2
2
|
export declare const attributes: (target: HTMLElement | HTMLPlusElement, attributes: any[]) => void;
|
package/client/utils/call.js
CHANGED
package/client/utils/config.js
CHANGED
|
@@ -23,6 +23,6 @@ export const getConfig = (...keys) => {
|
|
|
23
23
|
export const setConfig = (config, options) => {
|
|
24
24
|
if (isServer())
|
|
25
25
|
return;
|
|
26
|
-
const previous =
|
|
26
|
+
const previous = options?.override ? {} : window[`$htmlplus$`];
|
|
27
27
|
window[`$htmlplus$`] = merge({}, DEFAULTS, previous, config);
|
|
28
28
|
};
|
package/client/utils/event.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLPlusElement } from '../../types';
|
|
1
|
+
import { HTMLPlusElement } from '../../types/index.js';
|
|
2
2
|
export declare const getFramework: (target: HTMLElement | HTMLPlusElement) => string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLPlusElement } from '../../types';
|
|
1
|
+
import { HTMLPlusElement } from '../../types/index.js';
|
|
2
2
|
export declare const getStyles: (target: HTMLPlusElement) => string | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as CONSTANTS from '../../constants/index.js';
|
|
2
2
|
export const getStyles = (target) => {
|
|
3
|
-
|
|
4
|
-
return (_a = target.constructor[CONSTANTS.STATIC_STYLE]) !== null && _a !== void 0 ? _a : target[CONSTANTS.STATIC_STYLE];
|
|
3
|
+
return target.constructor[CONSTANTS.STATIC_STYLE] ?? target[CONSTANTS.STATIC_STYLE];
|
|
5
4
|
};
|
package/client/utils/getTag.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLPlusElement } from '../../types';
|
|
1
|
+
import { HTMLPlusElement } from '../../types/index.js';
|
|
2
2
|
export declare const getTag: (target: HTMLPlusElement) => string | undefined;
|
package/client/utils/getTag.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as CONSTANTS from '../../constants/index.js';
|
|
2
2
|
export const getTag = (target) => {
|
|
3
|
-
|
|
4
|
-
return (_a = target.constructor[CONSTANTS.STATIC_TAG]) !== null && _a !== void 0 ? _a : target[CONSTANTS.STATIC_TAG];
|
|
3
|
+
return target.constructor[CONSTANTS.STATIC_TAG] ?? target[CONSTANTS.STATIC_TAG];
|
|
5
4
|
};
|
package/client/utils/host.d.ts
CHANGED
package/client/utils/host.js
CHANGED
package/client/utils/isEvent.js
CHANGED
package/client/utils/isRTL.d.ts
CHANGED
package/client/utils/query.d.ts
CHANGED
package/client/utils/query.js
CHANGED
|
@@ -3,6 +3,5 @@ import { shadowRoot } from './shadowRoot.js';
|
|
|
3
3
|
* Selects the first element in the shadow dom that matches a specified CSS selector.
|
|
4
4
|
*/
|
|
5
5
|
export function query(target, selectors) {
|
|
6
|
-
|
|
7
|
-
return (_a = shadowRoot(target)) === null || _a === void 0 ? void 0 : _a.querySelector(selectors);
|
|
6
|
+
return shadowRoot(target)?.querySelector(selectors);
|
|
8
7
|
}
|
package/client/utils/queryAll.js
CHANGED
|
@@ -3,6 +3,5 @@ import { shadowRoot } from './shadowRoot.js';
|
|
|
3
3
|
* Selects all elements in the shadow dom that match a specified CSS selector.
|
|
4
4
|
*/
|
|
5
5
|
export function queryAll(target, selectors) {
|
|
6
|
-
|
|
7
|
-
return (_a = shadowRoot(target)) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selectors);
|
|
6
|
+
return shadowRoot(target)?.querySelectorAll(selectors);
|
|
8
7
|
}
|
package/client/utils/request.js
CHANGED
|
@@ -12,9 +12,8 @@ import { html, render } from './uhtml.js';
|
|
|
12
12
|
* @param callback Invoked when the rendering phase is completed.
|
|
13
13
|
*/
|
|
14
14
|
export const request = (target, name, previous, callback) => {
|
|
15
|
-
var _a, _b;
|
|
16
15
|
// Creates/Gets a stacks.
|
|
17
|
-
const stacks = (target[
|
|
16
|
+
const stacks = (target[CONSTANTS.API_STACKS] ||= new Map());
|
|
18
17
|
// Creates/Updates a stack.
|
|
19
18
|
const stack = stacks.get(name) || { callbacks: [], previous };
|
|
20
19
|
// Adds the callback to the stack, if exists.
|
|
@@ -60,7 +59,7 @@ export const request = (target, name, previous, callback) => {
|
|
|
60
59
|
target[CONSTANTS.API_RENDER_COMPLETED] = true;
|
|
61
60
|
};
|
|
62
61
|
// Creates/Gets a micro task function.
|
|
63
|
-
target[
|
|
62
|
+
target[CONSTANTS.API_REQUEST] ||= task({ handler });
|
|
64
63
|
// Calls the micro task.
|
|
65
64
|
call(target, CONSTANTS.API_REQUEST);
|
|
66
65
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLPlusElement } from '../../types';
|
|
1
|
+
import { HTMLPlusElement } from '../../types/index.js';
|
|
2
2
|
export declare const shadowRoot: (target: HTMLElement | HTMLPlusElement) => ShadowRoot | null;
|
package/client/utils/slots.d.ts
CHANGED
package/client/utils/slots.js
CHANGED
|
@@ -3,14 +3,13 @@ import { host } from './host.js';
|
|
|
3
3
|
* Returns the slots name.
|
|
4
4
|
*/
|
|
5
5
|
export const slots = (target) => {
|
|
6
|
-
var _a;
|
|
7
6
|
const element = host(target);
|
|
8
7
|
const slots = {};
|
|
9
8
|
const children = Array.from(element.childNodes);
|
|
10
9
|
for (const child of children) {
|
|
11
10
|
if (child.nodeName == '#comment')
|
|
12
11
|
continue;
|
|
13
|
-
const name = child['slot'] || (
|
|
12
|
+
const name = child['slot'] || (child.nodeValue?.trim() && 'default') || ('slot' in child && 'default');
|
|
14
13
|
if (!name)
|
|
15
14
|
continue;
|
|
16
15
|
slots[name] = true;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLPlusElement } from '../../types';
|
|
1
|
+
import { HTMLPlusElement } from '../../types/index.js';
|
|
2
2
|
export declare function toDecorator(util: Function, ...parameters: any[]): (target: HTMLPlusElement, key: PropertyKey) => void;
|
package/client/utils/toEvent.js
CHANGED
|
@@ -35,7 +35,7 @@ export const toProperty = (input, type) => {
|
|
|
35
35
|
return value;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
catch
|
|
38
|
+
catch { }
|
|
39
39
|
}
|
|
40
40
|
if (CONSTANTS.TYPE_OBJECT & type || type === Object) {
|
|
41
41
|
try {
|
|
@@ -44,7 +44,7 @@ export const toProperty = (input, type) => {
|
|
|
44
44
|
return value;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
catch
|
|
47
|
+
catch { }
|
|
48
48
|
}
|
|
49
49
|
if (CONSTANTS.TYPE_UNDEFINED & type || type === undefined) {
|
|
50
50
|
if (string === 'undefined') {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLPlusElement } from '../../types';
|
|
1
|
+
import { HTMLPlusElement } from '../../types/index.js';
|
|
2
2
|
export declare const updateAttribute: (target: HTMLElement | HTMLPlusElement, key: string, value: any) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlplus/element",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"author": "Masood Abdolian <m.abdolian@gmail.com>",
|
|
@@ -32,31 +32,31 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/htmlplus/element#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@babel/generator": "^7.
|
|
36
|
-
"@babel/parser": "^7.
|
|
37
|
-
"@babel/template": "^7.
|
|
38
|
-
"@babel/traverse": "^7.
|
|
39
|
-
"@babel/types": "^7.
|
|
40
|
-
"@types/node": "^20.
|
|
41
|
-
"change-case": "^5.4.
|
|
35
|
+
"@babel/generator": "^7.24.7",
|
|
36
|
+
"@babel/parser": "^7.24.7",
|
|
37
|
+
"@babel/template": "^7.24.7",
|
|
38
|
+
"@babel/traverse": "^7.24.7",
|
|
39
|
+
"@babel/types": "^7.24.7",
|
|
40
|
+
"@types/node": "^20.14.9",
|
|
41
|
+
"change-case": "^5.4.4",
|
|
42
42
|
"fs-extra": "^11.2.0",
|
|
43
|
-
"glob": "^10.
|
|
43
|
+
"glob": "^10.4.2",
|
|
44
44
|
"ora": "^8.0.1",
|
|
45
45
|
"typescript": "^4.9.5"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@semantic-release/changelog": "^6.0.3",
|
|
49
|
-
"@semantic-release/commit-analyzer": "^
|
|
49
|
+
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
50
50
|
"@semantic-release/git": "^10.0.1",
|
|
51
|
-
"@semantic-release/github": "^
|
|
52
|
-
"@semantic-release/npm": "^
|
|
53
|
-
"@semantic-release/release-notes-generator": "^
|
|
51
|
+
"@semantic-release/github": "^10.0.7",
|
|
52
|
+
"@semantic-release/npm": "^12.0.1",
|
|
53
|
+
"@semantic-release/release-notes-generator": "^14.0.1",
|
|
54
54
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
55
|
-
"cpy": "^11.0.
|
|
56
|
-
"prettier": "^3.2
|
|
57
|
-
"rimraf": "^5.0.
|
|
58
|
-
"semantic-release": "^
|
|
59
|
-
"tsx": "^4.
|
|
60
|
-
"vite": "^5.
|
|
55
|
+
"cpy": "^11.0.1",
|
|
56
|
+
"prettier": "^3.3.2",
|
|
57
|
+
"rimraf": "^5.0.7",
|
|
58
|
+
"semantic-release": "^24.0.0",
|
|
59
|
+
"tsx": "^4.16.2",
|
|
60
|
+
"vite": "^5.3.3"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransformerPlugin, TransformerPluginContext } from '../transformer.types';
|
|
1
|
+
import { TransformerPlugin, TransformerPluginContext } from '../transformer.types.js';
|
|
2
2
|
export declare const ASSETS_OPTIONS: Partial<AssetsOptions>;
|
|
3
3
|
export interface AssetsOptions {
|
|
4
4
|
destination?: (context: TransformerPluginContext) => string;
|