wrec 0.36.5 → 0.37.0
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-CPzbCpSN.js → wrec-0J9-ZQRj.js} +3 -2
- package/dist/wrec-ssr.d.ts +1 -0
- package/dist/wrec-ssr.es.js +1 -1
- package/dist/wrec.d.ts +1 -0
- package/dist/wrec.es.js +1 -1
- package/package.json +1 -1
- package/scripts/lint.js +5 -3
|
@@ -43,9 +43,10 @@ var r = typeof window < "u" && window.document !== void 0, i = class extends Err
|
|
|
43
43
|
#i;
|
|
44
44
|
#a;
|
|
45
45
|
constructor(n, a, o) {
|
|
46
|
-
|
|
46
|
+
let s = typeof a == "boolean" ? a : !1;
|
|
47
|
+
if (o = typeof a == "boolean" ? o : a, !n) throw new i("name cannot be empty");
|
|
47
48
|
if (e.#e.has(n)) throw new i(`WrecState with name "${n}" already exists`);
|
|
48
|
-
if (this.#r = n, this.#i =
|
|
49
|
+
if (this.#r = n, this.#i = s, this.#a = t({}, this.#s.bind(this)), s && r) {
|
|
49
50
|
let e = sessionStorage.getItem("wrec-state-" + n), t = e ? JSON.parse(e) : void 0;
|
|
50
51
|
t && (o = t);
|
|
51
52
|
}
|
package/dist/wrec-ssr.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export declare class WrecState {
|
|
|
85
85
|
#private;
|
|
86
86
|
static get(name: string): WrecState | undefined;
|
|
87
87
|
[key: string]: unknown;
|
|
88
|
+
constructor(name: string, initial?: LooseObject);
|
|
88
89
|
constructor(name: string, persist: boolean, initial?: LooseObject);
|
|
89
90
|
subscribe(callback: ChangeCallback, paths?: string[]): () => void;
|
|
90
91
|
addProperty(propName: string, initialValue: unknown): void;
|
package/dist/wrec-ssr.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./wrec-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./wrec-0J9-ZQRj.js";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var a = Object.defineProperty, o = Object.getOwnPropertyDescriptor, s = Object.getOwnPropertyNames, c = Object.prototype.hasOwnProperty, l = (e, t) => () => (e && (t = e(e = 0)), t), u = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), d = (e, t) => {
|
|
4
4
|
let n = {};
|
package/dist/wrec.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export declare class WrecState {
|
|
|
85
85
|
#private;
|
|
86
86
|
static get(name: string): WrecState | undefined;
|
|
87
87
|
[key: string]: unknown;
|
|
88
|
+
constructor(name: string, initial?: LooseObject);
|
|
88
89
|
constructor(name: string, persist: boolean, initial?: LooseObject);
|
|
89
90
|
subscribe(callback: ChangeCallback, paths?: string[]): () => void;
|
|
90
91
|
addProperty(propName: string, initialValue: unknown): void;
|
package/dist/wrec.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./wrec-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./wrec-0J9-ZQRj.js";
|
|
2
2
|
export { i as Wrec, e as WrecState, n as createElement, r as css, t as html };
|
package/package.json
CHANGED
package/scripts/lint.js
CHANGED
|
@@ -13,17 +13,19 @@
|
|
|
13
13
|
// - extra arguments passed to methods and context functions
|
|
14
14
|
// - incompatible method arguments in expressions
|
|
15
15
|
// - incompatible context function arguments in expressions
|
|
16
|
-
// -
|
|
17
|
-
// -
|
|
16
|
+
// - incompatible declare property types
|
|
17
|
+
// - arithmetic and other type errors in expressions
|
|
18
|
+
// - invalid computed property references
|
|
18
19
|
// - invalid event handler references
|
|
19
20
|
// - unsupported event names
|
|
20
21
|
// - duplicate property names
|
|
21
22
|
// - reserved property names
|
|
22
23
|
// - missing `type` in property configurations
|
|
24
|
+
// - invalid `type` values in property configurations
|
|
23
25
|
// - invalid default values
|
|
24
26
|
// - invalid `values` configurations
|
|
25
27
|
// - invalid `usedBy` references
|
|
26
|
-
// - missing `
|
|
28
|
+
// - missing required members like `static html` and `formAssociated`
|
|
27
29
|
// - invalid `form-assoc` values
|
|
28
30
|
// - invalid `useState` map entries
|
|
29
31
|
// - unsupported HTML attributes in templates
|