@dougongjs/reactive 0.1.0 → 0.2.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/README.md +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -57
- package/dist/observe.d.ts.map +1 -1
- package/dist/protocol.d.ts +6 -0
- package/dist/protocol.d.ts.map +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ On each change to `source`: release the previous `lifetime`, then build a new on
|
|
|
81
81
|
- 文档站 / Documentation: https://tangerg.github.io/dougong/
|
|
82
82
|
- 仓库 / Repository: https://github.com/Tangerg/dougong
|
|
83
83
|
|
|
84
|
-
> 早期开发阶段(0.0.x),当前不承诺向后兼容。需要 Node.js ≥ 22
|
|
85
|
-
> Early development (0.0.x); no backward-compatibility promises yet. Requires Node.js ≥ 22 or
|
|
84
|
+
> 早期开发阶段(0.0.x),当前不承诺向后兼容。需要 Node.js ≥ 22,或 Chrome / Edge 119、Firefox 121、Safari 17.4 及以上浏览器 / WebView。
|
|
85
|
+
> Early development (0.0.x); no backward-compatibility promises yet. Requires Node.js ≥ 22, or Chrome / Edge 119, Firefox 121 or Safari 17.4 and later.
|
|
86
86
|
|
|
87
87
|
MIT
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3E,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAExE,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAE3C,8EAA8E;AAC9E,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,CAAC,aAAa,CAAC,EAAE,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,MAAM,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAClD,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACrB;AAED,OAAO,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,QAAQ,GACd,MAAM,WAAW,CAAC;AA8FnB,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CA4B7C;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAsCpD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAGjE"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (
|
|
1
|
+
function T(t) {
|
|
2
|
+
if (typeof t != "function")
|
|
3
|
+
throw new Error("Unsupported JavaScript runtime: Promise.withResolvers is required");
|
|
4
|
+
}
|
|
5
|
+
function v(t, e) {
|
|
6
|
+
return t ?? Symbol.for(e);
|
|
7
|
+
}
|
|
8
|
+
T(Promise.withResolvers);
|
|
9
|
+
const w = v(
|
|
10
|
+
Symbol.dispose,
|
|
11
|
+
"Symbol.dispose"
|
|
12
|
+
), d = v(
|
|
13
|
+
Symbol.asyncDispose,
|
|
14
|
+
"Symbol.asyncDispose"
|
|
15
|
+
);
|
|
16
|
+
function l(t, e) {
|
|
17
|
+
if (y(t))
|
|
3
18
|
throw Promise.resolve(t).catch(() => {
|
|
4
19
|
}), new TypeError(e);
|
|
5
20
|
}
|
|
6
|
-
function
|
|
21
|
+
function y(t) {
|
|
7
22
|
return t === null || typeof t != "object" && typeof t != "function" ? !1 : typeof t.then == "function";
|
|
8
23
|
}
|
|
9
|
-
class
|
|
24
|
+
class D {
|
|
10
25
|
#e;
|
|
11
26
|
#s;
|
|
12
27
|
#i;
|
|
@@ -20,11 +35,11 @@ class k {
|
|
|
20
35
|
}
|
|
21
36
|
start() {
|
|
22
37
|
const { owner: e, source: s } = this.#w(), i = s.get(), r = e.lifetime("observation");
|
|
23
|
-
|
|
38
|
+
b(r), this.#i = r;
|
|
24
39
|
const n = s.subscribe(() => this.#p());
|
|
25
|
-
|
|
40
|
+
z(n, "Readable.subscribe()"), this.#s = n, this.#l(i, r), this.#n = { present: !0, value: i };
|
|
26
41
|
const o = e.spawn((c) => this.#h(c));
|
|
27
|
-
|
|
42
|
+
P(o), this.#t = o, o.result.then(
|
|
28
43
|
() => this.#v(o),
|
|
29
44
|
() => this.#v(o)
|
|
30
45
|
);
|
|
@@ -36,7 +51,7 @@ class k {
|
|
|
36
51
|
}
|
|
37
52
|
async #f() {
|
|
38
53
|
const e = [];
|
|
39
|
-
if (await a(this.#b(), e), await a(this.#
|
|
54
|
+
if (await a(this.#b(), e), await a(this.#g(), e), await a(this.#u(), e), e.length === 1) throw e[0];
|
|
40
55
|
if (e.length > 1) throw new AggregateError(e, "Observation cleanup failed");
|
|
41
56
|
}
|
|
42
57
|
#p() {
|
|
@@ -46,7 +61,7 @@ class k {
|
|
|
46
61
|
try {
|
|
47
62
|
for (; this.#e.phase === "active" && !e.aborted; )
|
|
48
63
|
for (await this.#a(e); this.#e.phase === "active" && !e.aborted && this.#r; )
|
|
49
|
-
this.#r = !1, await this.#
|
|
64
|
+
this.#r = !1, await this.#m();
|
|
50
65
|
} catch (s) {
|
|
51
66
|
if (this.#e.phase !== "active") throw s;
|
|
52
67
|
await this.#d([s], "Observation stopped after a replacement failed");
|
|
@@ -60,7 +75,7 @@ class k {
|
|
|
60
75
|
this.#o = i, e.addEventListener("abort", i, { once: !0 }), (this.#r || this.#e.phase !== "active" || e.aborted) && i();
|
|
61
76
|
});
|
|
62
77
|
}
|
|
63
|
-
async #
|
|
78
|
+
async #m() {
|
|
64
79
|
if (this.#e.phase !== "active") return;
|
|
65
80
|
const e = this.#e.binding.source.get();
|
|
66
81
|
if (this.#n.present && Object.is(e, this.#n.value)) return;
|
|
@@ -77,7 +92,7 @@ class k {
|
|
|
77
92
|
}
|
|
78
93
|
if (this.#n = { present: !1 }, this.#e.phase !== "active") return;
|
|
79
94
|
const i = this.#e.binding.owner.lifetime("observation");
|
|
80
|
-
|
|
95
|
+
b(i), this.#i = i;
|
|
81
96
|
try {
|
|
82
97
|
this.#l(e, i);
|
|
83
98
|
} catch (r) {
|
|
@@ -101,7 +116,7 @@ class k {
|
|
|
101
116
|
}
|
|
102
117
|
#l(e, s) {
|
|
103
118
|
const i = this.#w().observer(e, s);
|
|
104
|
-
|
|
119
|
+
l(i, "Observers must be synchronous; use lifetime.spawn() for async work");
|
|
105
120
|
}
|
|
106
121
|
#b() {
|
|
107
122
|
const e = this.#s;
|
|
@@ -111,7 +126,7 @@ class k {
|
|
|
111
126
|
const e = this.#i;
|
|
112
127
|
return this.#i = void 0, e;
|
|
113
128
|
}
|
|
114
|
-
#
|
|
129
|
+
#g() {
|
|
115
130
|
const e = this.#t;
|
|
116
131
|
return this.#t = void 0, e;
|
|
117
132
|
}
|
|
@@ -130,14 +145,14 @@ class k {
|
|
|
130
145
|
this.#e = { phase: e }, this.#n = { present: !1 }, this.#r = !1;
|
|
131
146
|
}
|
|
132
147
|
}
|
|
133
|
-
function
|
|
148
|
+
function L(t, e, s) {
|
|
134
149
|
if (!e || typeof e.get != "function" || typeof e.subscribe != "function")
|
|
135
150
|
throw new TypeError("observe() expects a readable source");
|
|
136
151
|
if (typeof s != "function") throw new TypeError("Observer must be a function");
|
|
137
152
|
if (!t || typeof t.cleanup != "function" || typeof t.lifetime != "function" || typeof t.spawn != "function")
|
|
138
153
|
throw new TypeError("observe() expects an observation owner");
|
|
139
|
-
const i = new
|
|
140
|
-
|
|
154
|
+
const i = new D(t, e, s), r = t.cleanup(() => i.dispose());
|
|
155
|
+
R(r, "ObservationOwner.cleanup()");
|
|
141
156
|
try {
|
|
142
157
|
return i.start(), r;
|
|
143
158
|
} catch (n) {
|
|
@@ -145,20 +160,20 @@ function A(t, e, s) {
|
|
|
145
160
|
}), n;
|
|
146
161
|
}
|
|
147
162
|
}
|
|
148
|
-
function
|
|
149
|
-
if (!t || typeof t.dispose != "function" || typeof t[
|
|
163
|
+
function z(t, e) {
|
|
164
|
+
if (!t || typeof t.dispose != "function" || typeof t[w] != "function")
|
|
150
165
|
throw new TypeError(`${e} must return a Disposable`);
|
|
151
166
|
}
|
|
152
|
-
function
|
|
153
|
-
if (!t || typeof t.dispose != "function" || typeof t[
|
|
167
|
+
function R(t, e) {
|
|
168
|
+
if (!t || typeof t.dispose != "function" || typeof t[d] != "function")
|
|
154
169
|
throw new TypeError(`${e} must return an AsyncDisposable`);
|
|
155
170
|
}
|
|
156
|
-
function
|
|
157
|
-
if (!t || typeof t.dispose != "function" || typeof t[
|
|
171
|
+
function b(t) {
|
|
172
|
+
if (!t || typeof t.dispose != "function" || typeof t[d] != "function" || typeof t.cleanup != "function" || typeof t.lifetime != "function" || typeof t.spawn != "function")
|
|
158
173
|
throw new TypeError("ObservationOwner.lifetime() must return an ObservationLifetime");
|
|
159
174
|
}
|
|
160
|
-
function
|
|
161
|
-
if (!t || typeof t.dispose != "function" || typeof t[
|
|
175
|
+
function P(t) {
|
|
176
|
+
if (!t || typeof t.dispose != "function" || typeof t[d] != "function" || !y(t.result))
|
|
162
177
|
throw new TypeError("ObservationOwner.spawn() must return an ObservationTask");
|
|
163
178
|
}
|
|
164
179
|
async function a(t, e) {
|
|
@@ -171,10 +186,10 @@ async function a(t, e) {
|
|
|
171
186
|
}
|
|
172
187
|
let u = 0, h, f;
|
|
173
188
|
const p = /* @__PURE__ */ new WeakMap();
|
|
174
|
-
function
|
|
175
|
-
return new
|
|
189
|
+
function m(t) {
|
|
190
|
+
return new j(t);
|
|
176
191
|
}
|
|
177
|
-
class
|
|
192
|
+
class j {
|
|
178
193
|
#e;
|
|
179
194
|
constructor(e) {
|
|
180
195
|
this.#e = e, Object.freeze(this);
|
|
@@ -183,28 +198,28 @@ class D {
|
|
|
183
198
|
const e = this.#e;
|
|
184
199
|
this.#e = void 0, e?.();
|
|
185
200
|
}
|
|
186
|
-
[
|
|
201
|
+
[w]() {
|
|
187
202
|
this.dispose();
|
|
188
203
|
}
|
|
189
204
|
}
|
|
190
|
-
function
|
|
205
|
+
function A() {
|
|
191
206
|
const t = [];
|
|
192
207
|
for (; h?.size; ) {
|
|
193
208
|
const e = h;
|
|
194
|
-
h = /* @__PURE__ */ new Set(),
|
|
209
|
+
h = /* @__PURE__ */ new Set(), O(e, t);
|
|
195
210
|
}
|
|
196
|
-
h = void 0,
|
|
211
|
+
h = void 0, k(t);
|
|
197
212
|
}
|
|
198
|
-
function
|
|
213
|
+
function g(t) {
|
|
199
214
|
if (u) {
|
|
200
215
|
const s = h ??= /* @__PURE__ */ new Set();
|
|
201
216
|
for (const i of t) s.add(i);
|
|
202
217
|
return;
|
|
203
218
|
}
|
|
204
219
|
const e = [];
|
|
205
|
-
|
|
220
|
+
O(t, e), k(e);
|
|
206
221
|
}
|
|
207
|
-
function
|
|
222
|
+
function O(t, e) {
|
|
208
223
|
for (const s of t) {
|
|
209
224
|
const i = s.listener;
|
|
210
225
|
if (i)
|
|
@@ -215,21 +230,21 @@ function y(t, e) {
|
|
|
215
230
|
}
|
|
216
231
|
}
|
|
217
232
|
}
|
|
218
|
-
function
|
|
233
|
+
function k(t) {
|
|
219
234
|
if (t.length === 1) throw t[0];
|
|
220
235
|
if (t.length > 1)
|
|
221
236
|
throw new AggregateError(t, "Reactive subscribers failed");
|
|
222
237
|
}
|
|
223
|
-
function
|
|
238
|
+
function E(t) {
|
|
224
239
|
f?.(t);
|
|
225
240
|
}
|
|
226
|
-
function
|
|
241
|
+
function x(t) {
|
|
227
242
|
if (typeof t != "function") throw new TypeError("batch() expects a function");
|
|
228
243
|
u++;
|
|
229
244
|
let e;
|
|
230
245
|
try {
|
|
231
246
|
const s = t();
|
|
232
|
-
|
|
247
|
+
l(s, "Reactive batches must be synchronous"), e = { ok: !0, value: s };
|
|
233
248
|
} catch (s) {
|
|
234
249
|
e = { ok: !1, error: s };
|
|
235
250
|
} finally {
|
|
@@ -237,26 +252,26 @@ function C(t) {
|
|
|
237
252
|
}
|
|
238
253
|
if (!u)
|
|
239
254
|
try {
|
|
240
|
-
|
|
255
|
+
A();
|
|
241
256
|
} catch (s) {
|
|
242
257
|
e = e.ok ? { ok: !1, error: s } : { ok: !1, error: new AggregateError([e.error, s], "Reactive batch failed") };
|
|
243
258
|
}
|
|
244
259
|
if (!e.ok) throw e.error;
|
|
245
260
|
return e.value;
|
|
246
261
|
}
|
|
247
|
-
function
|
|
262
|
+
function q(t) {
|
|
248
263
|
let e = t, s = 0;
|
|
249
264
|
const i = /* @__PURE__ */ new Set(), r = {
|
|
250
265
|
get() {
|
|
251
|
-
return
|
|
266
|
+
return E(r), e;
|
|
252
267
|
},
|
|
253
268
|
set(n) {
|
|
254
|
-
Object.is(e, n) || (e = n, s++,
|
|
269
|
+
Object.is(e, n) || (e = n, s++, g(i));
|
|
255
270
|
},
|
|
256
271
|
subscribe(n) {
|
|
257
|
-
|
|
272
|
+
S(n);
|
|
258
273
|
const o = { listener: n };
|
|
259
|
-
return i.add(o),
|
|
274
|
+
return i.add(o), m(() => {
|
|
260
275
|
o.listener = void 0, i.delete(o);
|
|
261
276
|
});
|
|
262
277
|
}
|
|
@@ -269,11 +284,11 @@ function L(t) {
|
|
|
269
284
|
}
|
|
270
285
|
}), Object.freeze(r);
|
|
271
286
|
}
|
|
272
|
-
function
|
|
287
|
+
function B(t) {
|
|
273
288
|
if (typeof t != "function") throw new TypeError("computed() expects a function");
|
|
274
|
-
return new
|
|
289
|
+
return new C(t).view;
|
|
275
290
|
}
|
|
276
|
-
class
|
|
291
|
+
class C {
|
|
277
292
|
#e;
|
|
278
293
|
#s = /* @__PURE__ */ new Set();
|
|
279
294
|
#i = /* @__PURE__ */ new Map();
|
|
@@ -295,10 +310,10 @@ class j {
|
|
|
295
310
|
this.#a();
|
|
296
311
|
}
|
|
297
312
|
#c() {
|
|
298
|
-
return
|
|
313
|
+
return E(this.view), this.#a();
|
|
299
314
|
}
|
|
300
315
|
#f(e) {
|
|
301
|
-
|
|
316
|
+
S(e);
|
|
302
317
|
const s = { listener: e }, i = this.#s.size === 0;
|
|
303
318
|
if (this.#s.add(s), i)
|
|
304
319
|
try {
|
|
@@ -306,12 +321,12 @@ class j {
|
|
|
306
321
|
} catch (r) {
|
|
307
322
|
throw this.#s.delete(s), this.#s.size || this.#h(), r;
|
|
308
323
|
}
|
|
309
|
-
return
|
|
324
|
+
return m(() => {
|
|
310
325
|
s.listener = void 0, this.#s.delete(s), this.#s.size || this.#h();
|
|
311
326
|
});
|
|
312
327
|
}
|
|
313
328
|
#p = () => {
|
|
314
|
-
this.#t || (this.#t = !0,
|
|
329
|
+
this.#t || (this.#t = !0, g(this.#s));
|
|
315
330
|
};
|
|
316
331
|
#h() {
|
|
317
332
|
for (const e of this.#i.values())
|
|
@@ -332,7 +347,7 @@ class j {
|
|
|
332
347
|
this.#r = !0, f = (n) => s.add(n);
|
|
333
348
|
let r;
|
|
334
349
|
try {
|
|
335
|
-
r = this.#e(),
|
|
350
|
+
r = this.#e(), l(r, "Computed signal calculations must be synchronous");
|
|
336
351
|
} finally {
|
|
337
352
|
f = i, this.#r = !1;
|
|
338
353
|
}
|
|
@@ -351,13 +366,13 @@ class j {
|
|
|
351
366
|
return (e.phase === "uninitialized" || !Object.is(e.value, r)) && this.#o++, this.#n = { phase: "cached", value: r }, this.#t = !1, r;
|
|
352
367
|
}
|
|
353
368
|
}
|
|
354
|
-
function
|
|
369
|
+
function S(t) {
|
|
355
370
|
if (typeof t != "function")
|
|
356
371
|
throw new TypeError("Signal subscriber must be a function");
|
|
357
372
|
}
|
|
358
373
|
export {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
374
|
+
x as batch,
|
|
375
|
+
B as computed,
|
|
376
|
+
L as observe,
|
|
377
|
+
q as signal
|
|
363
378
|
};
|
package/dist/observe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAEpB,KAAK,QAAQ,EAEd,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,eAAe;IAChE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,OAAO,CAAC,OAAO,EAAE,MAAM,OAAO,GAAG,eAAe,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAAC;IAC7C,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;CACjF;AAED,MAAM,WAAW,gBAAgB,CAAC,KAAK,SAAS,mBAAmB,GAAG,mBAAmB;IACvF,OAAO,CAAC,OAAO,EAAE,MAAM,OAAO,GAAG,eAAe,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;CACjF;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,KAAK,SAAS,mBAAmB,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;AA+MjG;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,SAAS,mBAAmB,EAC1D,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAC9B,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnB,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,GAC3B,eAAe,CA0BjB"}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/** Fails at module load before an unavailable Promise primitive reaches an observation. */
|
|
2
|
+
export declare function assertPromiseRuntime(withResolvers: unknown): asserts withResolvers is typeof Promise.withResolvers;
|
|
3
|
+
/** Resolves the conventional protocol key without mutating the ambient Symbol constructor. */
|
|
4
|
+
export declare function resolveDisposalSymbol(native: symbol | undefined, name: "Symbol.dispose" | "Symbol.asyncDispose"): symbol;
|
|
5
|
+
export declare const disposeSymbol: typeof Symbol.dispose;
|
|
6
|
+
export declare const asyncDisposeSymbol: typeof Symbol.asyncDispose;
|
|
1
7
|
export interface Disposable {
|
|
2
8
|
dispose(): void;
|
|
3
9
|
[Symbol.dispose](): void;
|
package/dist/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,OAAO,IAAI,IAAI,CAAC;IAChB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,eAAe,CAAC;AAEpD,2FAA2F;AAC3F,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,GAAG,IAAI,CAAC,CAAC;IACT,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;CAC7C"}
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,aAAa,IAAI,OAAO,OAAO,CAAC,aAAa,CAIvD;AAED,8FAA8F;AAC9F,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,gBAAgB,GAAG,qBAAqB,UAG/C;AAID,eAAO,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC,OAGhB,CAAC;AAC3B,eAAO,MAAM,kBAAkB,EAAE,OAAO,MAAM,CAAC,YAGhB,CAAC;AAEhC,MAAM,WAAW,UAAU;IACzB,OAAO,IAAI,IAAI,CAAC;IAChB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,eAAe,CAAC;AAEpD,2FAA2F;AAC3F,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,GAAG,IAAI,CAAC,CAAC;IACT,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;CAC7C"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dougongjs/reactive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
7
7
|
},
|
|
8
|
+
"browserslist": [
|
|
9
|
+
"Chrome >= 119",
|
|
10
|
+
"Edge >= 119",
|
|
11
|
+
"Firefox >= 121",
|
|
12
|
+
"Safari >= 17.4"
|
|
13
|
+
],
|
|
8
14
|
"sideEffects": false,
|
|
9
15
|
"files": [
|
|
10
16
|
"dist",
|