bunja 2.1.0 → 2.1.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/bunja.ts +2 -10
- package/deno.json +1 -1
- package/dist/{bunja-BKpQTG04.d.cts → bunja-BvZKLiEP.d.ts} +0 -1
- package/dist/{bunja-B_HNgDan.d.ts → bunja-CPUl4ZRK.d.cts} +0 -1
- package/dist/{bunja-DFFVW7Gi.cjs → bunja-Ce8RwebF.cjs} +2 -9
- package/dist/{bunja-BOUkMIz6.js → bunja-DhBgerdn.js} +2 -9
- package/dist/bunja.cjs +1 -1
- package/dist/bunja.d.cts +1 -1
- package/dist/bunja.d.ts +1 -1
- package/dist/bunja.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/solid.cjs +1 -1
- package/dist/solid.d.cts +1 -1
- package/dist/solid.d.ts +1 -1
- package/dist/solid.js +1 -1
- package/package.json +1 -1
package/bunja.ts
CHANGED
|
@@ -86,10 +86,7 @@ export class BunjaStore {
|
|
|
86
86
|
#bakingContext: BunjaBakingContext | undefined;
|
|
87
87
|
wrapInstance: WrapInstanceFn = defaultWrapInstanceFn;
|
|
88
88
|
constructor() {
|
|
89
|
-
if (__DEV__) {
|
|
90
|
-
devtoolsGlobalHook.stores[this.id] = this;
|
|
91
|
-
devtoolsGlobalHook.emit("storeCreated", { storeId: this.id });
|
|
92
|
-
}
|
|
89
|
+
if (__DEV__) devtoolsGlobalHook.emit("storeCreated", { storeId: this.id });
|
|
93
90
|
}
|
|
94
91
|
get _internalState(): InternalState | undefined {
|
|
95
92
|
if (__DEV__) {
|
|
@@ -110,10 +107,7 @@ export class BunjaStore {
|
|
|
110
107
|
}
|
|
111
108
|
this.#bunjas = {};
|
|
112
109
|
this.#scopes = new Map();
|
|
113
|
-
if (__DEV__) {
|
|
114
|
-
devtoolsGlobalHook.emit("storeDisposed", { storeId: this.id });
|
|
115
|
-
delete devtoolsGlobalHook.stores[this.id];
|
|
116
|
-
}
|
|
110
|
+
if (__DEV__) devtoolsGlobalHook.emit("storeDisposed", { storeId: this.id });
|
|
117
111
|
}
|
|
118
112
|
get<T>(bunja: Bunja<T>, readScope: ReadScope): BunjaStoreGetResult<T> {
|
|
119
113
|
const originalUse = bunjaFn.use;
|
|
@@ -524,7 +518,6 @@ const noop = () => {};
|
|
|
524
518
|
export interface BunjaDevtoolsGlobalHook {
|
|
525
519
|
bunjas: Record<string, Bunja<any>>;
|
|
526
520
|
scopes: Record<string, Scope<any>>;
|
|
527
|
-
stores: Record<string, BunjaStore>;
|
|
528
521
|
listeners: Record<
|
|
529
522
|
BunjaDevtoolsEventType,
|
|
530
523
|
Set<(event: any) => void>
|
|
@@ -564,7 +557,6 @@ if (__DEV__) {
|
|
|
564
557
|
devtoolsGlobalHook = (globalThis as any).__BUNJA_DEVTOOLS_GLOBAL_HOOK__;
|
|
565
558
|
} else {
|
|
566
559
|
devtoolsGlobalHook = {
|
|
567
|
-
stores: {},
|
|
568
560
|
bunjas: {},
|
|
569
561
|
scopes: {},
|
|
570
562
|
listeners: {
|
package/deno.json
CHANGED
|
@@ -96,7 +96,6 @@ declare class ScopeInstance extends RefCounter {
|
|
|
96
96
|
interface BunjaDevtoolsGlobalHook {
|
|
97
97
|
bunjas: Record<string, Bunja<any>>;
|
|
98
98
|
scopes: Record<string, Scope<any>>;
|
|
99
|
-
stores: Record<string, BunjaStore>;
|
|
100
99
|
listeners: Record<BunjaDevtoolsEventType, Set<(event: any) => void>>;
|
|
101
100
|
emit<T extends BunjaDevtoolsEventType>(type: T, event: BunjaDevtoolsEvent[T]): void;
|
|
102
101
|
on<T extends BunjaDevtoolsEventType>(type: T, listener: (event: BunjaDevtoolsEvent[T]) => void): () => void;
|
|
@@ -96,7 +96,6 @@ declare class ScopeInstance extends RefCounter {
|
|
|
96
96
|
interface BunjaDevtoolsGlobalHook {
|
|
97
97
|
bunjas: Record<string, Bunja<any>>;
|
|
98
98
|
scopes: Record<string, Scope<any>>;
|
|
99
|
-
stores: Record<string, BunjaStore>;
|
|
100
99
|
listeners: Record<BunjaDevtoolsEventType, Set<(event: any) => void>>;
|
|
101
100
|
emit<T extends BunjaDevtoolsEventType>(type: T, event: BunjaDevtoolsEvent[T]): void;
|
|
102
101
|
on<T extends BunjaDevtoolsEventType>(type: T, listener: (event: BunjaDevtoolsEvent[T]) => void): () => void;
|
|
@@ -35,10 +35,7 @@ var BunjaStore = class BunjaStore {
|
|
|
35
35
|
#bakingContext;
|
|
36
36
|
wrapInstance = defaultWrapInstanceFn;
|
|
37
37
|
constructor() {
|
|
38
|
-
if (__DEV__) {
|
|
39
|
-
devtoolsGlobalHook.stores[this.id] = this;
|
|
40
|
-
devtoolsGlobalHook.emit("storeCreated", { storeId: this.id });
|
|
41
|
-
}
|
|
38
|
+
if (__DEV__) devtoolsGlobalHook.emit("storeCreated", { storeId: this.id });
|
|
42
39
|
}
|
|
43
40
|
get _internalState() {
|
|
44
41
|
if (__DEV__) return {
|
|
@@ -54,10 +51,7 @@ var BunjaStore = class BunjaStore {
|
|
|
54
51
|
for (const instanceMap of Object.values(this.#scopes)) for (const instance of instanceMap.values()) instance.dispose();
|
|
55
52
|
this.#bunjas = {};
|
|
56
53
|
this.#scopes = /* @__PURE__ */ new Map();
|
|
57
|
-
if (__DEV__) {
|
|
58
|
-
devtoolsGlobalHook.emit("storeDisposed", { storeId: this.id });
|
|
59
|
-
delete devtoolsGlobalHook.stores[this.id];
|
|
60
|
-
}
|
|
54
|
+
if (__DEV__) devtoolsGlobalHook.emit("storeDisposed", { storeId: this.id });
|
|
61
55
|
}
|
|
62
56
|
get(bunja$1, readScope) {
|
|
63
57
|
const originalUse = bunjaFn.use;
|
|
@@ -368,7 +362,6 @@ let devtoolsGlobalHook;
|
|
|
368
362
|
if (__DEV__) if (globalThis.__BUNJA_DEVTOOLS_GLOBAL_HOOK__) devtoolsGlobalHook = globalThis.__BUNJA_DEVTOOLS_GLOBAL_HOOK__;
|
|
369
363
|
else {
|
|
370
364
|
devtoolsGlobalHook = {
|
|
371
|
-
stores: {},
|
|
372
365
|
bunjas: {},
|
|
373
366
|
scopes: {},
|
|
374
367
|
listeners: {
|
|
@@ -34,10 +34,7 @@ var BunjaStore = class BunjaStore {
|
|
|
34
34
|
#bakingContext;
|
|
35
35
|
wrapInstance = defaultWrapInstanceFn;
|
|
36
36
|
constructor() {
|
|
37
|
-
if (__DEV__) {
|
|
38
|
-
devtoolsGlobalHook.stores[this.id] = this;
|
|
39
|
-
devtoolsGlobalHook.emit("storeCreated", { storeId: this.id });
|
|
40
|
-
}
|
|
37
|
+
if (__DEV__) devtoolsGlobalHook.emit("storeCreated", { storeId: this.id });
|
|
41
38
|
}
|
|
42
39
|
get _internalState() {
|
|
43
40
|
if (__DEV__) return {
|
|
@@ -53,10 +50,7 @@ var BunjaStore = class BunjaStore {
|
|
|
53
50
|
for (const instanceMap of Object.values(this.#scopes)) for (const instance of instanceMap.values()) instance.dispose();
|
|
54
51
|
this.#bunjas = {};
|
|
55
52
|
this.#scopes = /* @__PURE__ */ new Map();
|
|
56
|
-
if (__DEV__) {
|
|
57
|
-
devtoolsGlobalHook.emit("storeDisposed", { storeId: this.id });
|
|
58
|
-
delete devtoolsGlobalHook.stores[this.id];
|
|
59
|
-
}
|
|
53
|
+
if (__DEV__) devtoolsGlobalHook.emit("storeDisposed", { storeId: this.id });
|
|
60
54
|
}
|
|
61
55
|
get(bunja$1, readScope) {
|
|
62
56
|
const originalUse = bunjaFn.use;
|
|
@@ -367,7 +361,6 @@ let devtoolsGlobalHook;
|
|
|
367
361
|
if (__DEV__) if (globalThis.__BUNJA_DEVTOOLS_GLOBAL_HOOK__) devtoolsGlobalHook = globalThis.__BUNJA_DEVTOOLS_GLOBAL_HOOK__;
|
|
368
362
|
else {
|
|
369
363
|
devtoolsGlobalHook = {
|
|
370
|
-
stores: {},
|
|
371
364
|
bunjas: {},
|
|
372
365
|
scopes: {},
|
|
373
366
|
listeners: {
|
package/dist/bunja.cjs
CHANGED
package/dist/bunja.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bunja, BunjaDevtoolsEvent, BunjaDevtoolsEventType, BunjaDevtoolsGlobalHook, BunjaEffectCallback, BunjaEffectFn, BunjaFn, BunjaForkFn, BunjaStore, BunjaStoreGetResult, BunjaUseFn, CreateBunjaStoreConfig, Dep, HashFn, ReadScope, Scope, ScopeValuePair, WrapInstanceFn, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-
|
|
1
|
+
import { Bunja, BunjaDevtoolsEvent, BunjaDevtoolsEventType, BunjaDevtoolsGlobalHook, BunjaEffectCallback, BunjaEffectFn, BunjaFn, BunjaForkFn, BunjaStore, BunjaStoreGetResult, BunjaUseFn, CreateBunjaStoreConfig, Dep, HashFn, ReadScope, Scope, ScopeValuePair, WrapInstanceFn, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-CPUl4ZRK.cjs";
|
|
2
2
|
export { Bunja, BunjaDevtoolsEvent, BunjaDevtoolsEventType, BunjaDevtoolsGlobalHook, BunjaEffectCallback, BunjaEffectFn, BunjaFn, BunjaForkFn, BunjaStore, BunjaStoreGetResult, BunjaUseFn, CreateBunjaStoreConfig, Dep, HashFn, ReadScope, Scope, ScopeValuePair, WrapInstanceFn, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount };
|
package/dist/bunja.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bunja, BunjaDevtoolsEvent, BunjaDevtoolsEventType, BunjaDevtoolsGlobalHook, BunjaEffectCallback, BunjaEffectFn, BunjaFn, BunjaForkFn, BunjaStore, BunjaStoreGetResult, BunjaUseFn, CreateBunjaStoreConfig, Dep, HashFn, ReadScope, Scope, ScopeValuePair, WrapInstanceFn, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-
|
|
1
|
+
import { Bunja, BunjaDevtoolsEvent, BunjaDevtoolsEventType, BunjaDevtoolsGlobalHook, BunjaEffectCallback, BunjaEffectFn, BunjaFn, BunjaForkFn, BunjaStore, BunjaStoreGetResult, BunjaUseFn, CreateBunjaStoreConfig, Dep, HashFn, ReadScope, Scope, ScopeValuePair, WrapInstanceFn, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-BvZKLiEP.js";
|
|
2
2
|
export { Bunja, BunjaDevtoolsEvent, BunjaDevtoolsEventType, BunjaDevtoolsGlobalHook, BunjaEffectCallback, BunjaEffectFn, BunjaFn, BunjaForkFn, BunjaStore, BunjaStoreGetResult, BunjaUseFn, CreateBunjaStoreConfig, Dep, HashFn, ReadScope, Scope, ScopeValuePair, WrapInstanceFn, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount };
|
package/dist/bunja.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Bunja, BunjaStore, Scope, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-
|
|
1
|
+
import { Bunja, BunjaStore, Scope, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-DhBgerdn.js";
|
|
2
2
|
|
|
3
3
|
export { Bunja, BunjaStore, Scope, bunja, createBunjaStore, createReadScopeFn, createScope, delayUnmount };
|
package/dist/react.cjs
CHANGED
package/dist/react.d.cts
CHANGED
package/dist/react.d.ts
CHANGED
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import { createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-
|
|
4
|
+
import { createBunjaStore, createReadScopeFn, createScope, delayUnmount } from "./bunja-DhBgerdn.js";
|
|
5
5
|
import { createContext, createElement, useContext, useEffect, useMemo, useState } from "react";
|
|
6
6
|
|
|
7
7
|
//#region react.ts
|
package/dist/solid.cjs
CHANGED
package/dist/solid.d.cts
CHANGED
package/dist/solid.d.ts
CHANGED
package/dist/solid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createBunjaStore, createReadScopeFn, createScope } from "./bunja-
|
|
1
|
+
import { createBunjaStore, createReadScopeFn, createScope } from "./bunja-DhBgerdn.js";
|
|
2
2
|
import { createComponent, createContext, createEffect, createMemo, createRoot, getOwner, onCleanup, useContext } from "solid-js";
|
|
3
3
|
|
|
4
4
|
//#region solid.ts
|