element-vir 26.7.0 → 26.7.1
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/declarative-element/define-element.js +11 -5
- package/dist/declarative-element/directives/attributes.directive.d.ts +1 -1
- package/dist/declarative-element/directives/create-attribute-directive.d.ts +1 -1
- package/dist/declarative-element/directives/mutate.directive.d.ts +2 -2
- package/dist/declarative-element/directives/on-dom-created.directive.d.ts +1 -1
- package/dist/declarative-element/directives/on-dom-rendered.directive.d.ts +1 -1
- package/dist/declarative-element/directives/on-intersect.directive.d.ts +1 -1
- package/dist/declarative-element/directives/on-resize.directive.d.ts +1 -1
- package/dist/declarative-element/directives/test-id.directive.d.ts +1 -1
- package/package.json +7 -7
|
@@ -224,11 +224,17 @@ function internalDefineElement(init) {
|
|
|
224
224
|
writable: true,
|
|
225
225
|
},
|
|
226
226
|
});
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
/**
|
|
228
|
+
* `window` will be `undefined` in Node.js and we want to be able to import these files into
|
|
229
|
+
* Node.js.
|
|
230
|
+
*/
|
|
231
|
+
if (globalThis.window) {
|
|
232
|
+
if (globalThis.window.customElements.get(init.tagName)) {
|
|
233
|
+
console.warn(`Tried to define custom element '${init.tagName}' but it is already defined.`);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
globalThis.window.customElements.define(init.tagName, anonymousClass);
|
|
237
|
+
}
|
|
232
238
|
}
|
|
233
239
|
return anonymousClass;
|
|
234
240
|
}
|
|
@@ -24,7 +24,7 @@ export declare const attributes: (values_0: AttributeValues | undefined) => impo
|
|
|
24
24
|
new (partInfo: import("lit-html/directive.js").PartInfo): {
|
|
25
25
|
readonly element: HTMLElement;
|
|
26
26
|
render(params_0: AttributeValues | undefined): symbol;
|
|
27
|
-
|
|
27
|
+
get _$isConnected(): boolean;
|
|
28
28
|
update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
|
|
29
29
|
};
|
|
30
30
|
}>;
|
|
@@ -19,7 +19,7 @@ export declare function createAttributeDirective(attributeName: string): {
|
|
|
19
19
|
new (partInfo: PartInfo): {
|
|
20
20
|
readonly element: Element;
|
|
21
21
|
render(attributeValue: string): symbol;
|
|
22
|
-
|
|
22
|
+
get _$isConnected(): boolean;
|
|
23
23
|
update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
|
|
24
24
|
};
|
|
25
25
|
}>;
|
|
@@ -19,7 +19,7 @@ export declare const mutate: (callback: (params: Omit<MutateDirectiveParams, "pa
|
|
|
19
19
|
readonly element: HTMLElement;
|
|
20
20
|
lastKey: string | undefined;
|
|
21
21
|
render(callback: (params: Omit<MutateDirectiveParams, "params">) => void): symbol;
|
|
22
|
-
|
|
22
|
+
get _$isConnected(): boolean;
|
|
23
23
|
update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
|
|
24
24
|
};
|
|
25
25
|
}>;
|
|
@@ -32,7 +32,7 @@ export declare function createMutateDirective<Params extends any[]>(directiveNam
|
|
|
32
32
|
new (partInfo: PartInfo): {
|
|
33
33
|
readonly element: HTMLElement;
|
|
34
34
|
render(...params: Params): symbol;
|
|
35
|
-
|
|
35
|
+
get _$isConnected(): boolean;
|
|
36
36
|
update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
|
|
37
37
|
};
|
|
38
38
|
}>;
|
|
@@ -39,6 +39,6 @@ export declare const onDomCreated: (callback: OnDomCreatedCallback) => import("l
|
|
|
39
39
|
element: Element | undefined;
|
|
40
40
|
update(partInfo: PartInfo, [callback]: [OnDomCreatedCallback]): undefined;
|
|
41
41
|
render(callback: OnDomCreatedCallback): undefined;
|
|
42
|
-
|
|
42
|
+
get _$isConnected(): boolean;
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
@@ -36,6 +36,6 @@ export declare const onDomRendered: (callback: OnDomRenderedCallback) => import(
|
|
|
36
36
|
new (partInfo: PartInfo): {
|
|
37
37
|
update(partInfo: PartInfo, [callback]: [OnDomRenderedCallback]): undefined;
|
|
38
38
|
render(callback: OnDomRenderedCallback): undefined;
|
|
39
|
-
|
|
39
|
+
get _$isConnected(): boolean;
|
|
40
40
|
};
|
|
41
41
|
}>;
|
|
@@ -59,6 +59,6 @@ export declare const onIntersect: (options: IntersectionObserverInit, callback:
|
|
|
59
59
|
fireCallback(entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
|
|
60
60
|
update(partInfo: PartInfo, [options, callback,]: [OnIntersectOptions, OnIntersectCallback]): undefined;
|
|
61
61
|
render(options: OnIntersectOptions, callback: OnIntersectCallback): undefined;
|
|
62
|
-
|
|
62
|
+
get _$isConnected(): boolean;
|
|
63
63
|
};
|
|
64
64
|
}>;
|
|
@@ -43,6 +43,6 @@ export declare const onResize: (callback: OnResizeCallback) => import("lit-html/
|
|
|
43
43
|
fireCallback(entries: ResizeObserverEntry[]): void;
|
|
44
44
|
update(partInfo: PartInfo, [callback]: [OnResizeCallback]): undefined;
|
|
45
45
|
render(callback: OnResizeCallback): undefined;
|
|
46
|
-
|
|
46
|
+
get _$isConnected(): boolean;
|
|
47
47
|
};
|
|
48
48
|
}>;
|
|
@@ -21,7 +21,7 @@ export declare const testId: (this: void, attributeValue: string) => import("lit
|
|
|
21
21
|
new (partInfo: import("lit-html/directive.js").PartInfo): {
|
|
22
22
|
readonly element: Element;
|
|
23
23
|
render(attributeValue: string): symbol;
|
|
24
|
-
|
|
24
|
+
get _$isConnected(): boolean;
|
|
25
25
|
update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
|
|
26
26
|
};
|
|
27
27
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "element-vir",
|
|
3
|
-
"version": "26.7.
|
|
3
|
+
"version": "26.7.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"custom",
|
|
6
6
|
"web",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"test:docs": "virmator docs check"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@augment-vir/assert": "^31.
|
|
43
|
-
"@augment-vir/common": "^31.
|
|
42
|
+
"@augment-vir/assert": "^31.30.1",
|
|
43
|
+
"@augment-vir/common": "^31.30.1",
|
|
44
44
|
"date-vir": "^7.4.0",
|
|
45
45
|
"lit": "^3.3.1",
|
|
46
46
|
"lit-css-vars": "^3.0.11",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"typed-event-target": "^4.1.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@augment-vir/test": "^31.
|
|
54
|
-
"@augment-vir/web": "^31.
|
|
53
|
+
"@augment-vir/test": "^31.30.1",
|
|
54
|
+
"@augment-vir/web": "^31.30.1",
|
|
55
55
|
"@web/dev-server-esbuild": "^1.0.4",
|
|
56
56
|
"@web/test-runner": "^0.20.2",
|
|
57
57
|
"@web/test-runner-commands": "^0.9.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
62
62
|
"markdown-code-example-inserter": "^3.0.3",
|
|
63
63
|
"type-fest": "^4.41.0",
|
|
64
|
-
"typedoc": "^0.28.
|
|
65
|
-
"typescript": "5.
|
|
64
|
+
"typedoc": "^0.28.9",
|
|
65
|
+
"typescript": "5.9.2",
|
|
66
66
|
"vite": "^7.0.6",
|
|
67
67
|
"vite-tsconfig-paths": "^5.1.4"
|
|
68
68
|
},
|