wrec 0.20.11 → 0.20.13
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/wrec.d.ts +8 -5
- package/dist/wrec.es.js +231 -202
- package/dist/wrec.umd.js +4 -4
- package/package.json +1 -1
package/dist/wrec.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export declare type ChangeListener = {
|
|
|
2
2
|
changed: (statePath: string, componentProperty: string, newValue: unknown, oldValue: unknown, state: WrecState) => void;
|
|
3
3
|
};
|
|
4
4
|
|
|
5
|
-
export declare function createElement(name: string, attributes:
|
|
5
|
+
export declare function createElement(name: string, attributes: StringToString, innerHTML: string): HTMLElement;
|
|
6
6
|
|
|
7
7
|
export declare function css(strings: TemplateStringsArray, ...values: unknown[]): string;
|
|
8
8
|
|
|
@@ -10,17 +10,20 @@ export declare function html(strings: TemplateStringsArray, ...values: unknown[]
|
|
|
10
10
|
|
|
11
11
|
declare type LooseObject = Record<string, unknown>;
|
|
12
12
|
|
|
13
|
-
declare type
|
|
13
|
+
declare type StringToAny = Record<string, any>;
|
|
14
|
+
|
|
15
|
+
declare type StringToString = Record<string, string>;
|
|
14
16
|
|
|
15
17
|
export declare abstract class Wrec extends HTMLElement implements ChangeListener {
|
|
16
18
|
#private;
|
|
17
19
|
static attrToPropMap: Map<string, string>;
|
|
18
20
|
static propToAttrMap: Map<string, string>;
|
|
21
|
+
static context: {};
|
|
19
22
|
static css: string;
|
|
20
23
|
static elementName: string;
|
|
21
24
|
static formAssociated: boolean;
|
|
22
25
|
static html: string;
|
|
23
|
-
static properties:
|
|
26
|
+
static properties: StringToAny;
|
|
24
27
|
static propToComputedMap: Map<string, string[][]>;
|
|
25
28
|
static propToExprsMap: Map<string, string[]>;
|
|
26
29
|
static template: HTMLTemplateElement | null;
|
|
@@ -28,7 +31,7 @@ export declare abstract class Wrec extends HTMLElement implements ChangeListener
|
|
|
28
31
|
static define(elementName: string): void;
|
|
29
32
|
constructor();
|
|
30
33
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string | number | boolean | undefined): void;
|
|
31
|
-
|
|
34
|
+
batchSet(changes: StringToAny): void;
|
|
32
35
|
changed(_statePath: string, componentProp: string, newValue: unknown): void;
|
|
33
36
|
connectedCallback(): void;
|
|
34
37
|
disconnectedCallback(): void;
|
|
@@ -47,7 +50,7 @@ export declare abstract class Wrec extends HTMLElement implements ChangeListener
|
|
|
47
50
|
* @param map - object whose keys are state properties and
|
|
48
51
|
* whose values are component properties
|
|
49
52
|
*/
|
|
50
|
-
useState(state: WrecState, map?:
|
|
53
|
+
useState(state: WrecState, map?: StringToString): void;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
export declare class WrecState {
|