@htmlplus/element 0.7.3 → 0.7.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/bundlers/rollup.d.ts +1 -1
- package/bundlers/rollup.js +3 -1
- package/client/decorators/host.d.ts +2 -0
- package/client/decorators/host.js +10 -0
- package/client/decorators/index.d.ts +3 -0
- package/client/decorators/index.js +3 -0
- package/client/decorators/query.d.ts +2 -0
- package/client/decorators/query.js +11 -0
- package/client/decorators/queryAll.d.ts +2 -0
- package/client/decorators/queryAll.js +11 -0
- package/client/helpers/index.d.ts +1 -1
- package/client/helpers/index.js +1 -1
- package/client/utils/index.d.ts +0 -2
- package/client/utils/index.js +0 -2
- package/package.json +1 -1
- package/client/utils/query.d.ts +0 -3
- package/client/utils/query.js +0 -5
- package/client/utils/queryAll.d.ts +0 -3
- package/client/utils/queryAll.js +0 -5
package/bundlers/rollup.d.ts
CHANGED
package/bundlers/rollup.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from './bind.js';
|
|
2
2
|
export * from './element.js';
|
|
3
3
|
export * from './event.js';
|
|
4
|
+
export * from './host.js';
|
|
4
5
|
export * from './listen.js';
|
|
5
6
|
export * from './method.js';
|
|
6
7
|
export * from './property.js';
|
|
8
|
+
export * from './query.js';
|
|
9
|
+
export * from './queryAll.js';
|
|
7
10
|
export * from './state.js';
|
|
8
11
|
export * from './watch.js';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from './bind.js';
|
|
2
2
|
export * from './element.js';
|
|
3
3
|
export * from './event.js';
|
|
4
|
+
export * from './host.js';
|
|
4
5
|
export * from './listen.js';
|
|
5
6
|
export * from './method.js';
|
|
6
7
|
export * from './property.js';
|
|
8
|
+
export * from './query.js';
|
|
9
|
+
export * from './queryAll.js';
|
|
7
10
|
export * from './state.js';
|
|
8
11
|
export * from './watch.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineProperty, shadowRoot } from '../utils/index.js';
|
|
2
|
+
export function Query(selectors) {
|
|
3
|
+
return function (target, propertyKey) {
|
|
4
|
+
defineProperty(target, propertyKey, {
|
|
5
|
+
get() {
|
|
6
|
+
var _a;
|
|
7
|
+
return (_a = shadowRoot(this)) === null || _a === void 0 ? void 0 : _a.querySelector(selectors);
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineProperty, shadowRoot } from '../utils/index.js';
|
|
2
|
+
export function QueryAll(selectors) {
|
|
3
|
+
return function (target, propertyKey) {
|
|
4
|
+
defineProperty(target, propertyKey, {
|
|
5
|
+
get() {
|
|
6
|
+
var _a;
|
|
7
|
+
return (_a = shadowRoot(this)) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selectors);
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { classes, direction, getConfig, host, isRTL, isServer, on, off,
|
|
1
|
+
export { classes, direction, getConfig, host, isRTL, isServer, on, off, slots, styles, toUnit, setConfig } from '../utils/index.js';
|
package/client/helpers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { classes, direction, getConfig, host, isRTL, isServer, on, off,
|
|
1
|
+
export { classes, direction, getConfig, host, isRTL, isServer, on, off, slots, styles, toUnit, setConfig } from '../utils/index.js';
|
package/client/utils/index.d.ts
CHANGED
|
@@ -18,8 +18,6 @@ export * from './isEvent.js';
|
|
|
18
18
|
export * from './isRTL.js';
|
|
19
19
|
export * from './isServer.js';
|
|
20
20
|
export * from './merge.js';
|
|
21
|
-
export * from './query.js';
|
|
22
|
-
export * from './queryAll.js';
|
|
23
21
|
export * from './request.js';
|
|
24
22
|
export * from './shadowRoot.js';
|
|
25
23
|
export * from './slots.js';
|
package/client/utils/index.js
CHANGED
|
@@ -18,8 +18,6 @@ export * from './isEvent.js';
|
|
|
18
18
|
export * from './isRTL.js';
|
|
19
19
|
export * from './isServer.js';
|
|
20
20
|
export * from './merge.js';
|
|
21
|
-
export * from './query.js';
|
|
22
|
-
export * from './queryAll.js';
|
|
23
21
|
export * from './request.js';
|
|
24
22
|
export * from './shadowRoot.js';
|
|
25
23
|
export * from './slots.js';
|
package/package.json
CHANGED
package/client/utils/query.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare function query<K extends keyof HTMLElementTagNameMap>(target: any, selectors: K): HTMLElementTagNameMap[K] | null;
|
|
2
|
-
export declare function query<K extends keyof SVGElementTagNameMap>(target: any, selectors: K): SVGElementTagNameMap[K] | null;
|
|
3
|
-
export declare function query<E extends Element = Element>(target: any, selectors: string): E | null;
|
package/client/utils/query.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare function queryAll<K extends keyof HTMLElementTagNameMap>(target: any, selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
2
|
-
export declare function queryAll<K extends keyof SVGElementTagNameMap>(target: any, selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
3
|
-
export declare function queryAll<E extends Element = Element>(target: any, selectors: string): NodeListOf<E>;
|