@blac/core 2.0.16 → 2.0.18
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 +7 -1
- package/dist/StateContainerRegistry-4Ljd9EJx.js +1018 -0
- package/dist/StateContainerRegistry-4Ljd9EJx.js.map +1 -0
- package/dist/StateContainerRegistry-B1GYx9Xo.js +975 -0
- package/dist/StateContainerRegistry-B1GYx9Xo.js.map +1 -0
- package/dist/StateContainerRegistry-CEWpc1bj.cjs +1113 -0
- package/dist/StateContainerRegistry-CEWpc1bj.cjs.map +1 -0
- package/dist/StateContainerRegistry-CSNm2Ws5.cjs +1085 -0
- package/dist/StateContainerRegistry-CSNm2Ws5.cjs.map +1 -0
- package/dist/StateContainerRegistry-CvBOhAT2.js +996 -0
- package/dist/StateContainerRegistry-CvBOhAT2.js.map +1 -0
- package/dist/StateContainerRegistry-DJQqLrli.cjs +1046 -0
- package/dist/StateContainerRegistry-DJQqLrli.cjs.map +1 -0
- package/dist/acquire-B1Wuqla6.cjs +46 -0
- package/dist/acquire-B1Wuqla6.cjs.map +1 -0
- package/dist/acquire-BP-ZfUH2.js +35 -0
- package/dist/acquire-BP-ZfUH2.js.map +1 -0
- package/dist/acquire-BZIs6tpN.cjs +46 -0
- package/dist/acquire-BZIs6tpN.cjs.map +1 -0
- package/dist/acquire-CbMz7gWs.cjs +46 -0
- package/dist/acquire-CbMz7gWs.cjs.map +1 -0
- package/dist/acquire-CwB083au.js +35 -0
- package/dist/acquire-CwB083au.js.map +1 -0
- package/dist/acquire-G8aB3GAx.js +35 -0
- package/dist/acquire-G8aB3GAx.js.map +1 -0
- package/dist/config-C7Ktkjh2.cjs +32 -0
- package/dist/config-C7Ktkjh2.cjs.map +1 -0
- package/dist/config-COT4Xkbc.js +16 -0
- package/dist/config-COT4Xkbc.js.map +1 -0
- package/dist/config-Dk1FxfXj.js +16 -0
- package/dist/config-Dk1FxfXj.js.map +1 -0
- package/dist/config-b2z51Y_C.cjs +32 -0
- package/dist/config-b2z51Y_C.cjs.map +1 -0
- package/dist/config-buwpT7l3.js +16 -0
- package/dist/config-buwpT7l3.js.map +1 -0
- package/dist/config-sCPKPYxZ.cjs +32 -0
- package/dist/config-sCPKPYxZ.cjs.map +1 -0
- package/dist/core/Cubit.d.ts +4 -4
- package/dist/core/StateContainer.d.ts +85 -48
- package/dist/core/StateContainerRegistry.d.ts +3 -3
- package/dist/core/meta.d.ts +73 -0
- package/dist/core/symbols.d.ts +10 -17
- package/dist/debug.cjs +3 -3
- package/dist/debug.js +3 -3
- package/dist/ensure-B9oOqpOB.cjs +558 -0
- package/dist/ensure-B9oOqpOB.cjs.map +1 -0
- package/dist/ensure-BfYnvAsI.js +709 -0
- package/dist/ensure-BfYnvAsI.js.map +1 -0
- package/dist/ensure-C1a8IFWy.js +535 -0
- package/dist/ensure-C1a8IFWy.js.map +1 -0
- package/dist/ensure-DEXSmA-N.js +526 -0
- package/dist/ensure-DEXSmA-N.js.map +1 -0
- package/dist/ensure-Dx86f80B.cjs +567 -0
- package/dist/ensure-Dx86f80B.cjs.map +1 -0
- package/dist/ensure-DzqGej43.js +526 -0
- package/dist/ensure-DzqGej43.js.map +1 -0
- package/dist/ensure-_Oh8XPm4.cjs +732 -0
- package/dist/ensure-_Oh8XPm4.cjs.map +1 -0
- package/dist/ensure-fsQMjaQL.cjs +567 -0
- package/dist/ensure-fsQMjaQL.cjs.map +1 -0
- package/dist/index.cjs +10 -9
- package/dist/index.d.cts +6 -9
- package/dist/index.d.ts +6 -9
- package/dist/index.js +7 -7
- package/dist/management-14vsHr4t.cjs +85 -0
- package/dist/management-14vsHr4t.cjs.map +1 -0
- package/dist/management-444tdCBG.js +38 -0
- package/dist/management-444tdCBG.js.map +1 -0
- package/dist/management-BqGBdL01.js +38 -0
- package/dist/management-BqGBdL01.js.map +1 -0
- package/dist/management-BvUAjril.js +38 -0
- package/dist/management-BvUAjril.js.map +1 -0
- package/dist/management-DAV9sN-k.cjs +85 -0
- package/dist/management-DAV9sN-k.cjs.map +1 -0
- package/dist/management-Df7Y2sF1.cjs +85 -0
- package/dist/management-Df7Y2sF1.cjs.map +1 -0
- package/dist/plugin/BlacPlugin.d.ts +11 -12
- package/dist/plugin/PluginManager.d.ts +3 -4
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.js +1 -1
- package/dist/testing.cjs +10 -15
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -6
- package/dist/testing.d.ts +4 -6
- package/dist/testing.js +10 -14
- package/dist/testing.js.map +1 -1
- package/dist/watch-B91opmva.cjs +70 -0
- package/dist/watch-B91opmva.cjs.map +1 -0
- package/dist/watch-CfrSSrRY.js +59 -0
- package/dist/watch-CfrSSrRY.js.map +1 -0
- package/dist/watch-Cnh3PtQA.cjs +70 -0
- package/dist/watch-Cnh3PtQA.cjs.map +1 -0
- package/dist/watch-D8hwbFU1.js +59 -0
- package/dist/watch-D8hwbFU1.js.map +1 -0
- package/dist/watch-DPVUwPUY.js +59 -0
- package/dist/watch-DPVUwPUY.js.map +1 -0
- package/dist/watch-DVmvZBMD.cjs +70 -0
- package/dist/watch-DVmvZBMD.cjs.map +1 -0
- package/dist/watch-entry.cjs +1 -1
- package/dist/watch-entry.js +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_StateContainerRegistry = require("./StateContainerRegistry-
|
|
3
|
-
const require_ensure = require("./ensure-
|
|
4
|
-
const require_config = require("./config-
|
|
5
|
-
const require_acquire = require("./acquire-
|
|
6
|
-
const require_management = require("./management-
|
|
7
|
-
const require_watch = require("./watch-
|
|
2
|
+
const require_StateContainerRegistry = require("./StateContainerRegistry-CSNm2Ws5.cjs");
|
|
3
|
+
const require_ensure = require("./ensure-B9oOqpOB.cjs");
|
|
4
|
+
const require_config = require("./config-C7Ktkjh2.cjs");
|
|
5
|
+
const require_acquire = require("./acquire-B1Wuqla6.cjs");
|
|
6
|
+
const require_management = require("./management-14vsHr4t.cjs");
|
|
7
|
+
const require_watch = require("./watch-Cnh3PtQA.cjs");
|
|
8
8
|
const require_branded = require("./branded-BybA0_xw.cjs");
|
|
9
9
|
let _dirtytalk_structural = require("@dirtytalk/structural");
|
|
10
10
|
//#region src/registry/borrow.ts
|
|
@@ -69,11 +69,12 @@ Object.defineProperty(exports, "ALL_PATHS", {
|
|
|
69
69
|
return _dirtytalk_structural.ALL_PATHS;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
exports.APPLY_DEPS =
|
|
72
|
+
exports.APPLY_DEPS = require_StateContainerRegistry.APPLY_DEPS;
|
|
73
73
|
exports.Cubit = require_ensure.Cubit;
|
|
74
|
-
exports.
|
|
74
|
+
exports.DEP_BRAND = require_ensure.DEP_BRAND;
|
|
75
|
+
exports.INIT_CONFIG = require_StateContainerRegistry.INIT_CONFIG;
|
|
75
76
|
exports.PluginManager = require_StateContainerRegistry.PluginManager;
|
|
76
|
-
exports.REMOVE_DEPS_OWNER =
|
|
77
|
+
exports.REMOVE_DEPS_OWNER = require_StateContainerRegistry.REMOVE_DEPS_OWNER;
|
|
77
78
|
exports.StateContainer = require_ensure.StateContainer;
|
|
78
79
|
exports.StateContainerRegistry = require_StateContainerRegistry.StateContainerRegistry;
|
|
79
80
|
exports.acquire = require_acquire.acquire;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
export { configureBlac, getBlacConfig, resetBlacConfig, shallowEqualState, type BlacConfig, type EqualityFn, } from './config';
|
|
2
|
-
export { StateContainer } from './core/StateContainer';
|
|
3
|
-
export type { HydrationStatus, StateContainerConfig, SystemEvent, SystemEventPayloads, } from './core/StateContainer';
|
|
2
|
+
export { StateContainer, DEP_BRAND } from './core/StateContainer';
|
|
3
|
+
export type { HydrationStatus, StateContainerConfig, SystemEvent, SystemEventPayloads, DepHandle, } from './core/StateContainer';
|
|
4
4
|
export { Cubit } from './core/Cubit';
|
|
5
5
|
/**
|
|
6
|
-
* @internal symbols — read by
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `EMIT` is deprecated: zero external consumers per A2 audit, but the
|
|
10
|
-
* in-package legacy tests still index `[EMIT]`. Kept as a thin alias for
|
|
11
|
-
* `emit()` so those tests typecheck and run unchanged; C5 deletes it.
|
|
6
|
+
* @internal symbols — read by `@blac/react` (APPLY_DEPS / REMOVE_DEPS_OWNER)
|
|
7
|
+
* and in-package tests (INIT_CONFIG).
|
|
12
8
|
*/
|
|
13
|
-
export {
|
|
9
|
+
export { APPLY_DEPS, REMOVE_DEPS_OWNER, INIT_CONFIG } from './core/symbols';
|
|
10
|
+
export type { BlacMeta, BlacHydration } from './core/meta';
|
|
14
11
|
export { ALL_PATHS } from '@dirtytalk/structural';
|
|
15
12
|
export type { PathSet } from '@dirtytalk/structural';
|
|
16
13
|
export { acquire, resolveInstanceKey, borrow, borrowSafe, ensure, release, clear, clearAll, register, hasInstance, getRefCount, getRefIds, getAll, forEach, getRegistry, setRegistry, getStats, } from './registry';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
export { configureBlac, getBlacConfig, resetBlacConfig, shallowEqualState, type BlacConfig, type EqualityFn, } from './config';
|
|
2
|
-
export { StateContainer } from './core/StateContainer';
|
|
3
|
-
export type { HydrationStatus, StateContainerConfig, SystemEvent, SystemEventPayloads, } from './core/StateContainer';
|
|
2
|
+
export { StateContainer, DEP_BRAND } from './core/StateContainer';
|
|
3
|
+
export type { HydrationStatus, StateContainerConfig, SystemEvent, SystemEventPayloads, DepHandle, } from './core/StateContainer';
|
|
4
4
|
export { Cubit } from './core/Cubit';
|
|
5
5
|
/**
|
|
6
|
-
* @internal symbols — read by
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `EMIT` is deprecated: zero external consumers per A2 audit, but the
|
|
10
|
-
* in-package legacy tests still index `[EMIT]`. Kept as a thin alias for
|
|
11
|
-
* `emit()` so those tests typecheck and run unchanged; C5 deletes it.
|
|
6
|
+
* @internal symbols — read by `@blac/react` (APPLY_DEPS / REMOVE_DEPS_OWNER)
|
|
7
|
+
* and in-package tests (INIT_CONFIG).
|
|
12
8
|
*/
|
|
13
|
-
export {
|
|
9
|
+
export { APPLY_DEPS, REMOVE_DEPS_OWNER, INIT_CONFIG } from './core/symbols';
|
|
10
|
+
export type { BlacMeta, BlacHydration } from './core/meta';
|
|
14
11
|
export { ALL_PATHS } from '@dirtytalk/structural';
|
|
15
12
|
export type { PathSet } from '@dirtytalk/structural';
|
|
16
13
|
export { acquire, resolveInstanceKey, borrow, borrowSafe, ensure, release, clear, clearAll, register, hasInstance, getRefCount, getRefIds, getAll, forEach, getRegistry, setRegistry, getStats, } from './registry';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import { n as getStats, r as setRegistry, t as getRegistry } from "./config-
|
|
4
|
-
import { n as resolveInstanceKey, t as acquire } from "./acquire-
|
|
5
|
-
import { a as getAll, c as hasInstance, i as forEach, n as clearAll, o as getRefCount, r as register, s as getRefIds, t as clear } from "./management-
|
|
6
|
-
import { n as watch, t as instance } from "./watch-
|
|
1
|
+
import { a as INIT_CONFIG, c as isExcludedFromDevTools, d as PluginManager, f as configureBlac, h as shallowEqualState, i as APPLY_DEPS, l as isKeepAliveClass, m as resetBlacConfig, n as getPluginManager, o as REMOVE_DEPS_OWNER, p as getBlacConfig, r as globalRegistry, t as StateContainerRegistry, u as BLAC_STATIC_PROPS } from "./StateContainerRegistry-CvBOhAT2.js";
|
|
2
|
+
import { i as StateContainer, n as Cubit, r as DEP_BRAND, t as ensure } from "./ensure-C1a8IFWy.js";
|
|
3
|
+
import { n as getStats, r as setRegistry, t as getRegistry } from "./config-buwpT7l3.js";
|
|
4
|
+
import { n as resolveInstanceKey, t as acquire } from "./acquire-BP-ZfUH2.js";
|
|
5
|
+
import { a as getAll, c as hasInstance, i as forEach, n as clearAll, o as getRefCount, r as register, s as getRefIds, t as clear } from "./management-BvUAjril.js";
|
|
6
|
+
import { n as watch, t as instance } from "./watch-D8hwbFU1.js";
|
|
7
7
|
import { t as instanceId } from "./branded-DkbUzncc.js";
|
|
8
8
|
import { ALL_PATHS } from "@dirtytalk/structural";
|
|
9
9
|
//#region src/registry/borrow.ts
|
|
@@ -62,6 +62,6 @@ function blac(options) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
//#endregion
|
|
65
|
-
export { ALL_PATHS, APPLY_DEPS, Cubit,
|
|
65
|
+
export { ALL_PATHS, APPLY_DEPS, Cubit, DEP_BRAND, INIT_CONFIG, PluginManager, REMOVE_DEPS_OWNER, StateContainer, StateContainerRegistry, acquire, blac, borrow, borrowSafe, clear, clearAll, configureBlac, ensure, forEach, getAll, getBlacConfig, getPluginManager, getRefCount, getRefIds, getRegistry, getStats, globalRegistry, hasInstance, instance, instanceId, isExcludedFromDevTools, isKeepAliveClass, register, release, resetBlacConfig, resolveInstanceKey, setRegistry, shallowEqualState, watch };
|
|
66
66
|
|
|
67
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const require_config = require("./config-C7Ktkjh2.cjs");
|
|
2
|
+
//#region src/registry/queries.ts
|
|
3
|
+
function hasInstance(BlocClass, opts) {
|
|
4
|
+
const registry = require_config.getRegistry();
|
|
5
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
6
|
+
return registry.hasInstance(BlocClass, key);
|
|
7
|
+
}
|
|
8
|
+
function getRefCount(BlocClass, opts) {
|
|
9
|
+
const registry = require_config.getRegistry();
|
|
10
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
11
|
+
return registry.getRefCount(BlocClass, key);
|
|
12
|
+
}
|
|
13
|
+
function getRefIds(BlocClass, opts) {
|
|
14
|
+
const registry = require_config.getRegistry();
|
|
15
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
16
|
+
return registry.getRefIds(BlocClass, key);
|
|
17
|
+
}
|
|
18
|
+
function getAll(BlocClass) {
|
|
19
|
+
return require_config.getRegistry().getAll(BlocClass);
|
|
20
|
+
}
|
|
21
|
+
function forEach(BlocClass, callback) {
|
|
22
|
+
require_config.getRegistry().forEach(BlocClass, callback);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/registry/management.ts
|
|
26
|
+
function clear(BlocClass) {
|
|
27
|
+
require_config.getRegistry().clear(BlocClass);
|
|
28
|
+
}
|
|
29
|
+
function clearAll() {
|
|
30
|
+
require_config.getRegistry().clearAll();
|
|
31
|
+
}
|
|
32
|
+
function register(BlocClass) {
|
|
33
|
+
require_config.getRegistry().register(BlocClass);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
Object.defineProperty(exports, "clear", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function() {
|
|
39
|
+
return clear;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "clearAll", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function() {
|
|
45
|
+
return clearAll;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "forEach", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function() {
|
|
51
|
+
return forEach;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "getAll", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function() {
|
|
57
|
+
return getAll;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "getRefCount", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function() {
|
|
63
|
+
return getRefCount;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "getRefIds", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function() {
|
|
69
|
+
return getRefIds;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "hasInstance", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function() {
|
|
75
|
+
return hasInstance;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "register", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function() {
|
|
81
|
+
return register;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=management-14vsHr4t.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-14vsHr4t.cjs","names":["getRegistry"],"sources":["../src/registry/queries.ts","../src/registry/management.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n InstanceReadonlyState,\n} from '../types/utilities';\n\nexport function hasInstance<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): boolean {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.hasInstance(BlocClass, key);\n}\n\nexport function getRefCount<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): number {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefCount(BlocClass, key);\n}\n\nexport function getRefIds<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): string[] {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefIds(BlocClass, key);\n}\n\nexport function getAll<T extends StateContainerConstructor>(\n BlocClass: T,\n): InstanceReadonlyState<T>[] {\n return getRegistry().getAll(BlocClass);\n}\n\nexport function forEach<T extends StateContainerConstructor>(\n BlocClass: T,\n callback: (instance: InstanceReadonlyState<T>) => void,\n): void {\n getRegistry().forEach(BlocClass, callback);\n}\n","import { getRegistry } from './config';\nimport type { StateContainerConstructor } from '../types/utilities';\n\nexport function clear<T extends StateContainerConstructor>(BlocClass: T): void {\n getRegistry().clear(BlocClass);\n}\n\nexport function clearAll(): void {\n getRegistry().clearAll();\n}\n\nexport function register<T extends StateContainerConstructor>(\n BlocClass: T,\n): void {\n getRegistry().register(BlocClass);\n}\n"],"mappings":";;AAOA,SAAgB,YACd,WACA,MACS;CACT,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,YACd,WACA,MACQ;CACR,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,UACd,WACA,MACU;CACV,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,UAAU,WAAW,GAAG;AAC1C;AAEA,SAAgB,OACd,WAC4B;CAC5B,OAAOA,eAAAA,YAAY,EAAE,OAAO,SAAS;AACvC;AAEA,SAAgB,QACd,WACA,UACM;CACN,eAAA,YAAY,EAAE,QAAQ,WAAW,QAAQ;AAC3C;;;AC1CA,SAAgB,MAA2C,WAAoB;CAC7E,eAAA,YAAY,EAAE,MAAM,SAAS;AAC/B;AAEA,SAAgB,WAAiB;CAC/B,eAAA,YAAY,EAAE,SAAS;AACzB;AAEA,SAAgB,SACd,WACM;CACN,eAAA,YAAY,EAAE,SAAS,SAAS;AAClC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as getRegistry } from "./config-Dk1FxfXj.js";
|
|
2
|
+
//#region src/registry/queries.ts
|
|
3
|
+
function hasInstance(BlocClass, opts) {
|
|
4
|
+
const registry = getRegistry();
|
|
5
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
6
|
+
return registry.hasInstance(BlocClass, key);
|
|
7
|
+
}
|
|
8
|
+
function getRefCount(BlocClass, opts) {
|
|
9
|
+
const registry = getRegistry();
|
|
10
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
11
|
+
return registry.getRefCount(BlocClass, key);
|
|
12
|
+
}
|
|
13
|
+
function getRefIds(BlocClass, opts) {
|
|
14
|
+
const registry = getRegistry();
|
|
15
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
16
|
+
return registry.getRefIds(BlocClass, key);
|
|
17
|
+
}
|
|
18
|
+
function getAll(BlocClass) {
|
|
19
|
+
return getRegistry().getAll(BlocClass);
|
|
20
|
+
}
|
|
21
|
+
function forEach(BlocClass, callback) {
|
|
22
|
+
getRegistry().forEach(BlocClass, callback);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/registry/management.ts
|
|
26
|
+
function clear(BlocClass) {
|
|
27
|
+
getRegistry().clear(BlocClass);
|
|
28
|
+
}
|
|
29
|
+
function clearAll() {
|
|
30
|
+
getRegistry().clearAll();
|
|
31
|
+
}
|
|
32
|
+
function register(BlocClass) {
|
|
33
|
+
getRegistry().register(BlocClass);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { getAll as a, hasInstance as c, forEach as i, clearAll as n, getRefCount as o, register as r, getRefIds as s, clear as t };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=management-444tdCBG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-444tdCBG.js","names":[],"sources":["../src/registry/queries.ts","../src/registry/management.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n InstanceReadonlyState,\n} from '../types/utilities';\n\nexport function hasInstance<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): boolean {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.hasInstance(BlocClass, key);\n}\n\nexport function getRefCount<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): number {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefCount(BlocClass, key);\n}\n\nexport function getRefIds<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): string[] {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefIds(BlocClass, key);\n}\n\nexport function getAll<T extends StateContainerConstructor>(\n BlocClass: T,\n): InstanceReadonlyState<T>[] {\n return getRegistry().getAll(BlocClass);\n}\n\nexport function forEach<T extends StateContainerConstructor>(\n BlocClass: T,\n callback: (instance: InstanceReadonlyState<T>) => void,\n): void {\n getRegistry().forEach(BlocClass, callback);\n}\n","import { getRegistry } from './config';\nimport type { StateContainerConstructor } from '../types/utilities';\n\nexport function clear<T extends StateContainerConstructor>(BlocClass: T): void {\n getRegistry().clear(BlocClass);\n}\n\nexport function clearAll(): void {\n getRegistry().clearAll();\n}\n\nexport function register<T extends StateContainerConstructor>(\n BlocClass: T,\n): void {\n getRegistry().register(BlocClass);\n}\n"],"mappings":";;AAOA,SAAgB,YACd,WACA,MACS;CACT,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,YACd,WACA,MACQ;CACR,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,UACd,WACA,MACU;CACV,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,UAAU,WAAW,GAAG;AAC1C;AAEA,SAAgB,OACd,WAC4B;CAC5B,OAAO,YAAY,EAAE,OAAO,SAAS;AACvC;AAEA,SAAgB,QACd,WACA,UACM;CACN,YAAY,EAAE,QAAQ,WAAW,QAAQ;AAC3C;;;AC1CA,SAAgB,MAA2C,WAAoB;CAC7E,YAAY,EAAE,MAAM,SAAS;AAC/B;AAEA,SAAgB,WAAiB;CAC/B,YAAY,EAAE,SAAS;AACzB;AAEA,SAAgB,SACd,WACM;CACN,YAAY,EAAE,SAAS,SAAS;AAClC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as getRegistry } from "./config-COT4Xkbc.js";
|
|
2
|
+
//#region src/registry/queries.ts
|
|
3
|
+
function hasInstance(BlocClass, opts) {
|
|
4
|
+
const registry = getRegistry();
|
|
5
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
6
|
+
return registry.hasInstance(BlocClass, key);
|
|
7
|
+
}
|
|
8
|
+
function getRefCount(BlocClass, opts) {
|
|
9
|
+
const registry = getRegistry();
|
|
10
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
11
|
+
return registry.getRefCount(BlocClass, key);
|
|
12
|
+
}
|
|
13
|
+
function getRefIds(BlocClass, opts) {
|
|
14
|
+
const registry = getRegistry();
|
|
15
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
16
|
+
return registry.getRefIds(BlocClass, key);
|
|
17
|
+
}
|
|
18
|
+
function getAll(BlocClass) {
|
|
19
|
+
return getRegistry().getAll(BlocClass);
|
|
20
|
+
}
|
|
21
|
+
function forEach(BlocClass, callback) {
|
|
22
|
+
getRegistry().forEach(BlocClass, callback);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/registry/management.ts
|
|
26
|
+
function clear(BlocClass) {
|
|
27
|
+
getRegistry().clear(BlocClass);
|
|
28
|
+
}
|
|
29
|
+
function clearAll() {
|
|
30
|
+
getRegistry().clearAll();
|
|
31
|
+
}
|
|
32
|
+
function register(BlocClass) {
|
|
33
|
+
getRegistry().register(BlocClass);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { getAll as a, hasInstance as c, forEach as i, clearAll as n, getRefCount as o, register as r, getRefIds as s, clear as t };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=management-BqGBdL01.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-BqGBdL01.js","names":[],"sources":["../src/registry/queries.ts","../src/registry/management.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n InstanceReadonlyState,\n} from '../types/utilities';\n\nexport function hasInstance<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): boolean {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.hasInstance(BlocClass, key);\n}\n\nexport function getRefCount<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): number {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefCount(BlocClass, key);\n}\n\nexport function getRefIds<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): string[] {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefIds(BlocClass, key);\n}\n\nexport function getAll<T extends StateContainerConstructor>(\n BlocClass: T,\n): InstanceReadonlyState<T>[] {\n return getRegistry().getAll(BlocClass);\n}\n\nexport function forEach<T extends StateContainerConstructor>(\n BlocClass: T,\n callback: (instance: InstanceReadonlyState<T>) => void,\n): void {\n getRegistry().forEach(BlocClass, callback);\n}\n","import { getRegistry } from './config';\nimport type { StateContainerConstructor } from '../types/utilities';\n\nexport function clear<T extends StateContainerConstructor>(BlocClass: T): void {\n getRegistry().clear(BlocClass);\n}\n\nexport function clearAll(): void {\n getRegistry().clearAll();\n}\n\nexport function register<T extends StateContainerConstructor>(\n BlocClass: T,\n): void {\n getRegistry().register(BlocClass);\n}\n"],"mappings":";;AAOA,SAAgB,YACd,WACA,MACS;CACT,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,YACd,WACA,MACQ;CACR,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,UACd,WACA,MACU;CACV,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,UAAU,WAAW,GAAG;AAC1C;AAEA,SAAgB,OACd,WAC4B;CAC5B,OAAO,YAAY,EAAE,OAAO,SAAS;AACvC;AAEA,SAAgB,QACd,WACA,UACM;CACN,YAAY,EAAE,QAAQ,WAAW,QAAQ;AAC3C;;;AC1CA,SAAgB,MAA2C,WAAoB;CAC7E,YAAY,EAAE,MAAM,SAAS;AAC/B;AAEA,SAAgB,WAAiB;CAC/B,YAAY,EAAE,SAAS;AACzB;AAEA,SAAgB,SACd,WACM;CACN,YAAY,EAAE,SAAS,SAAS;AAClC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as getRegistry } from "./config-buwpT7l3.js";
|
|
2
|
+
//#region src/registry/queries.ts
|
|
3
|
+
function hasInstance(BlocClass, opts) {
|
|
4
|
+
const registry = getRegistry();
|
|
5
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
6
|
+
return registry.hasInstance(BlocClass, key);
|
|
7
|
+
}
|
|
8
|
+
function getRefCount(BlocClass, opts) {
|
|
9
|
+
const registry = getRegistry();
|
|
10
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
11
|
+
return registry.getRefCount(BlocClass, key);
|
|
12
|
+
}
|
|
13
|
+
function getRefIds(BlocClass, opts) {
|
|
14
|
+
const registry = getRegistry();
|
|
15
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
16
|
+
return registry.getRefIds(BlocClass, key);
|
|
17
|
+
}
|
|
18
|
+
function getAll(BlocClass) {
|
|
19
|
+
return getRegistry().getAll(BlocClass);
|
|
20
|
+
}
|
|
21
|
+
function forEach(BlocClass, callback) {
|
|
22
|
+
getRegistry().forEach(BlocClass, callback);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/registry/management.ts
|
|
26
|
+
function clear(BlocClass) {
|
|
27
|
+
getRegistry().clear(BlocClass);
|
|
28
|
+
}
|
|
29
|
+
function clearAll() {
|
|
30
|
+
getRegistry().clearAll();
|
|
31
|
+
}
|
|
32
|
+
function register(BlocClass) {
|
|
33
|
+
getRegistry().register(BlocClass);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { getAll as a, hasInstance as c, forEach as i, clearAll as n, getRefCount as o, register as r, getRefIds as s, clear as t };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=management-BvUAjril.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-BvUAjril.js","names":[],"sources":["../src/registry/queries.ts","../src/registry/management.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n InstanceReadonlyState,\n} from '../types/utilities';\n\nexport function hasInstance<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): boolean {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.hasInstance(BlocClass, key);\n}\n\nexport function getRefCount<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): number {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefCount(BlocClass, key);\n}\n\nexport function getRefIds<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): string[] {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefIds(BlocClass, key);\n}\n\nexport function getAll<T extends StateContainerConstructor>(\n BlocClass: T,\n): InstanceReadonlyState<T>[] {\n return getRegistry().getAll(BlocClass);\n}\n\nexport function forEach<T extends StateContainerConstructor>(\n BlocClass: T,\n callback: (instance: InstanceReadonlyState<T>) => void,\n): void {\n getRegistry().forEach(BlocClass, callback);\n}\n","import { getRegistry } from './config';\nimport type { StateContainerConstructor } from '../types/utilities';\n\nexport function clear<T extends StateContainerConstructor>(BlocClass: T): void {\n getRegistry().clear(BlocClass);\n}\n\nexport function clearAll(): void {\n getRegistry().clearAll();\n}\n\nexport function register<T extends StateContainerConstructor>(\n BlocClass: T,\n): void {\n getRegistry().register(BlocClass);\n}\n"],"mappings":";;AAOA,SAAgB,YACd,WACA,MACS;CACT,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,YACd,WACA,MACQ;CACR,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,UACd,WACA,MACU;CACV,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,UAAU,WAAW,GAAG;AAC1C;AAEA,SAAgB,OACd,WAC4B;CAC5B,OAAO,YAAY,EAAE,OAAO,SAAS;AACvC;AAEA,SAAgB,QACd,WACA,UACM;CACN,YAAY,EAAE,QAAQ,WAAW,QAAQ;AAC3C;;;AC1CA,SAAgB,MAA2C,WAAoB;CAC7E,YAAY,EAAE,MAAM,SAAS;AAC/B;AAEA,SAAgB,WAAiB;CAC/B,YAAY,EAAE,SAAS;AACzB;AAEA,SAAgB,SACd,WACM;CACN,YAAY,EAAE,SAAS,SAAS;AAClC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const require_config = require("./config-sCPKPYxZ.cjs");
|
|
2
|
+
//#region src/registry/queries.ts
|
|
3
|
+
function hasInstance(BlocClass, opts) {
|
|
4
|
+
const registry = require_config.getRegistry();
|
|
5
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
6
|
+
return registry.hasInstance(BlocClass, key);
|
|
7
|
+
}
|
|
8
|
+
function getRefCount(BlocClass, opts) {
|
|
9
|
+
const registry = require_config.getRegistry();
|
|
10
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
11
|
+
return registry.getRefCount(BlocClass, key);
|
|
12
|
+
}
|
|
13
|
+
function getRefIds(BlocClass, opts) {
|
|
14
|
+
const registry = require_config.getRegistry();
|
|
15
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
16
|
+
return registry.getRefIds(BlocClass, key);
|
|
17
|
+
}
|
|
18
|
+
function getAll(BlocClass) {
|
|
19
|
+
return require_config.getRegistry().getAll(BlocClass);
|
|
20
|
+
}
|
|
21
|
+
function forEach(BlocClass, callback) {
|
|
22
|
+
require_config.getRegistry().forEach(BlocClass, callback);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/registry/management.ts
|
|
26
|
+
function clear(BlocClass) {
|
|
27
|
+
require_config.getRegistry().clear(BlocClass);
|
|
28
|
+
}
|
|
29
|
+
function clearAll() {
|
|
30
|
+
require_config.getRegistry().clearAll();
|
|
31
|
+
}
|
|
32
|
+
function register(BlocClass) {
|
|
33
|
+
require_config.getRegistry().register(BlocClass);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
Object.defineProperty(exports, "clear", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function() {
|
|
39
|
+
return clear;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "clearAll", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function() {
|
|
45
|
+
return clearAll;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "forEach", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function() {
|
|
51
|
+
return forEach;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "getAll", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function() {
|
|
57
|
+
return getAll;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "getRefCount", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function() {
|
|
63
|
+
return getRefCount;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "getRefIds", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function() {
|
|
69
|
+
return getRefIds;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "hasInstance", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function() {
|
|
75
|
+
return hasInstance;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "register", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function() {
|
|
81
|
+
return register;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=management-DAV9sN-k.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-DAV9sN-k.cjs","names":["getRegistry"],"sources":["../src/registry/queries.ts","../src/registry/management.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n InstanceReadonlyState,\n} from '../types/utilities';\n\nexport function hasInstance<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): boolean {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.hasInstance(BlocClass, key);\n}\n\nexport function getRefCount<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): number {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefCount(BlocClass, key);\n}\n\nexport function getRefIds<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): string[] {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefIds(BlocClass, key);\n}\n\nexport function getAll<T extends StateContainerConstructor>(\n BlocClass: T,\n): InstanceReadonlyState<T>[] {\n return getRegistry().getAll(BlocClass);\n}\n\nexport function forEach<T extends StateContainerConstructor>(\n BlocClass: T,\n callback: (instance: InstanceReadonlyState<T>) => void,\n): void {\n getRegistry().forEach(BlocClass, callback);\n}\n","import { getRegistry } from './config';\nimport type { StateContainerConstructor } from '../types/utilities';\n\nexport function clear<T extends StateContainerConstructor>(BlocClass: T): void {\n getRegistry().clear(BlocClass);\n}\n\nexport function clearAll(): void {\n getRegistry().clearAll();\n}\n\nexport function register<T extends StateContainerConstructor>(\n BlocClass: T,\n): void {\n getRegistry().register(BlocClass);\n}\n"],"mappings":";;AAOA,SAAgB,YACd,WACA,MACS;CACT,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,YACd,WACA,MACQ;CACR,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,UACd,WACA,MACU;CACV,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,UAAU,WAAW,GAAG;AAC1C;AAEA,SAAgB,OACd,WAC4B;CAC5B,OAAOA,eAAAA,YAAY,EAAE,OAAO,SAAS;AACvC;AAEA,SAAgB,QACd,WACA,UACM;CACN,eAAA,YAAY,EAAE,QAAQ,WAAW,QAAQ;AAC3C;;;AC1CA,SAAgB,MAA2C,WAAoB;CAC7E,eAAA,YAAY,EAAE,MAAM,SAAS;AAC/B;AAEA,SAAgB,WAAiB;CAC/B,eAAA,YAAY,EAAE,SAAS;AACzB;AAEA,SAAgB,SACd,WACM;CACN,eAAA,YAAY,EAAE,SAAS,SAAS;AAClC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const require_config = require("./config-b2z51Y_C.cjs");
|
|
2
|
+
//#region src/registry/queries.ts
|
|
3
|
+
function hasInstance(BlocClass, opts) {
|
|
4
|
+
const registry = require_config.getRegistry();
|
|
5
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
6
|
+
return registry.hasInstance(BlocClass, key);
|
|
7
|
+
}
|
|
8
|
+
function getRefCount(BlocClass, opts) {
|
|
9
|
+
const registry = require_config.getRegistry();
|
|
10
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
11
|
+
return registry.getRefCount(BlocClass, key);
|
|
12
|
+
}
|
|
13
|
+
function getRefIds(BlocClass, opts) {
|
|
14
|
+
const registry = require_config.getRegistry();
|
|
15
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
16
|
+
return registry.getRefIds(BlocClass, key);
|
|
17
|
+
}
|
|
18
|
+
function getAll(BlocClass) {
|
|
19
|
+
return require_config.getRegistry().getAll(BlocClass);
|
|
20
|
+
}
|
|
21
|
+
function forEach(BlocClass, callback) {
|
|
22
|
+
require_config.getRegistry().forEach(BlocClass, callback);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/registry/management.ts
|
|
26
|
+
function clear(BlocClass) {
|
|
27
|
+
require_config.getRegistry().clear(BlocClass);
|
|
28
|
+
}
|
|
29
|
+
function clearAll() {
|
|
30
|
+
require_config.getRegistry().clearAll();
|
|
31
|
+
}
|
|
32
|
+
function register(BlocClass) {
|
|
33
|
+
require_config.getRegistry().register(BlocClass);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
Object.defineProperty(exports, "clear", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function() {
|
|
39
|
+
return clear;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "clearAll", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function() {
|
|
45
|
+
return clearAll;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "forEach", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function() {
|
|
51
|
+
return forEach;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "getAll", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function() {
|
|
57
|
+
return getAll;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "getRefCount", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function() {
|
|
63
|
+
return getRefCount;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "getRefIds", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function() {
|
|
69
|
+
return getRefIds;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "hasInstance", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function() {
|
|
75
|
+
return hasInstance;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "register", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function() {
|
|
81
|
+
return register;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=management-Df7Y2sF1.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-Df7Y2sF1.cjs","names":["getRegistry"],"sources":["../src/registry/queries.ts","../src/registry/management.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n InstanceReadonlyState,\n} from '../types/utilities';\n\nexport function hasInstance<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): boolean {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.hasInstance(BlocClass, key);\n}\n\nexport function getRefCount<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): number {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefCount(BlocClass, key);\n}\n\nexport function getRefIds<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T> },\n): string[] {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.getRefIds(BlocClass, key);\n}\n\nexport function getAll<T extends StateContainerConstructor>(\n BlocClass: T,\n): InstanceReadonlyState<T>[] {\n return getRegistry().getAll(BlocClass);\n}\n\nexport function forEach<T extends StateContainerConstructor>(\n BlocClass: T,\n callback: (instance: InstanceReadonlyState<T>) => void,\n): void {\n getRegistry().forEach(BlocClass, callback);\n}\n","import { getRegistry } from './config';\nimport type { StateContainerConstructor } from '../types/utilities';\n\nexport function clear<T extends StateContainerConstructor>(BlocClass: T): void {\n getRegistry().clear(BlocClass);\n}\n\nexport function clearAll(): void {\n getRegistry().clearAll();\n}\n\nexport function register<T extends StateContainerConstructor>(\n BlocClass: T,\n): void {\n getRegistry().register(BlocClass);\n}\n"],"mappings":";;AAOA,SAAgB,YACd,WACA,MACS;CACT,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,YACd,WACA,MACQ;CACR,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,YAAY,WAAW,GAAG;AAC5C;AAEA,SAAgB,UACd,WACA,MACU;CACV,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,UAAU,WAAW,GAAG;AAC1C;AAEA,SAAgB,OACd,WAC4B;CAC5B,OAAOA,eAAAA,YAAY,EAAE,OAAO,SAAS;AACvC;AAEA,SAAgB,QACd,WACA,UACM;CACN,eAAA,YAAY,EAAE,QAAQ,WAAW,QAAQ;AAC3C;;;AC1CA,SAAgB,MAA2C,WAAoB;CAC7E,eAAA,YAAY,EAAE,MAAM,SAAS;AAC/B;AAEA,SAAgB,WAAiB;CAC/B,eAAA,YAAY,EAAE,SAAS;AACzB;AAEA,SAAgB,SACd,WACM;CACN,eAAA,YAAY,EAAE,SAAS,SAAS;AAClC"}
|
|
@@ -19,10 +19,9 @@ export interface InstanceMetadata {
|
|
|
19
19
|
/**
|
|
20
20
|
* Per-event context delivered to plugin hooks.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* context object.
|
|
22
|
+
* `PluginContext` is per-container — it identifies the bloc, not the event.
|
|
23
|
+
* Per-event data (e.g. the changed `PathSet`) is passed via dedicated method
|
|
24
|
+
* arguments, never via the context object.
|
|
26
25
|
*
|
|
27
26
|
* The `container` field is the focal bloc for the event. For `onInstall`
|
|
28
27
|
* (which fires once at install time, not bound to any container) the
|
|
@@ -54,9 +53,9 @@ export interface PluginContext {
|
|
|
54
53
|
/**
|
|
55
54
|
* BlaC plugin hook surface.
|
|
56
55
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
56
|
+
* State-change events carry the `PathSet` of paths that changed in the flush.
|
|
57
|
+
* Lifecycle events (`onCreated`, `onDestroyed`) are not tied to a state change
|
|
58
|
+
* and so do not carry `paths`.
|
|
60
59
|
*
|
|
61
60
|
* Hook firing model:
|
|
62
61
|
* - `onCreated` fires synchronously when a container is first acquired.
|
|
@@ -66,9 +65,9 @@ export interface PluginContext {
|
|
|
66
65
|
* - `onDestroyed` fires synchronously when a container is disposed (after
|
|
67
66
|
* its system 'dispose' event).
|
|
68
67
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
68
|
+
* The ref/deps hooks (`onRefAcquired`, `onRefReleased`, `onDepsChanged`) are
|
|
69
|
+
* devtools-only — they drive devtools-connect and are orthogonal to the
|
|
70
|
+
* state-change event payload.
|
|
72
71
|
*/
|
|
73
72
|
export interface BlacPlugin {
|
|
74
73
|
readonly name: string;
|
|
@@ -102,12 +101,12 @@ export interface BlacPlugin {
|
|
|
102
101
|
onHydrationChange?(ctx: PluginContext, status: HydrationStatus, previousStatus: HydrationStatus): void;
|
|
103
102
|
/**
|
|
104
103
|
* @internal Devtools-only — fires when a named ref is acquired.
|
|
105
|
-
* Not part of the
|
|
104
|
+
* Not part of the state-change event payload.
|
|
106
105
|
*/
|
|
107
106
|
onRefAcquired?(ctx: PluginContext, refId: string): void;
|
|
108
107
|
/**
|
|
109
108
|
* @internal Devtools-only — fires when a named ref is released.
|
|
110
|
-
* Not part of the
|
|
109
|
+
* Not part of the state-change event payload.
|
|
111
110
|
*/
|
|
112
111
|
onRefReleased?(ctx: PluginContext, refId: string): void;
|
|
113
112
|
/**
|
|
@@ -105,8 +105,7 @@ export declare class PluginManager {
|
|
|
105
105
|
*
|
|
106
106
|
* Note: `prev` is captured once and reused across plugins — every
|
|
107
107
|
* plugin sees the same `prev`/`next`/`paths` regardless of dispatch
|
|
108
|
-
* order, matching the "snapshot prev once per flush" invariant
|
|
109
|
-
* out in the C2 spec pitfalls.
|
|
108
|
+
* order, matching the "snapshot prev once per flush" invariant.
|
|
110
109
|
*/
|
|
111
110
|
private dispatchStateChange;
|
|
112
111
|
/**
|
|
@@ -114,7 +113,7 @@ export declare class PluginManager {
|
|
|
114
113
|
*
|
|
115
114
|
* Builds a fresh `PluginContext` per dispatch (instance becomes
|
|
116
115
|
* `ctx.container`), so plugins can reach the focal bloc through
|
|
117
|
-
* `ctx.container
|
|
116
|
+
* `ctx.container`.
|
|
118
117
|
*/
|
|
119
118
|
private notifyPlugins;
|
|
120
119
|
/**
|
|
@@ -123,7 +122,7 @@ export declare class PluginManager {
|
|
|
123
122
|
* so we create one per dispatch rather than caching per container.
|
|
124
123
|
* This sidesteps the lifetime question of "when do we evict a cached
|
|
125
124
|
* context?" and keeps `paths`-vs-`container` lifetimes cleanly
|
|
126
|
-
* separated
|
|
125
|
+
* separated.
|
|
127
126
|
*/
|
|
128
127
|
private buildContext;
|
|
129
128
|
/**
|
package/dist/plugins.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_StateContainerRegistry = require("./StateContainerRegistry-
|
|
2
|
+
const require_StateContainerRegistry = require("./StateContainerRegistry-CSNm2Ws5.cjs");
|
|
3
3
|
exports.PluginManager = require_StateContainerRegistry.PluginManager;
|
|
4
4
|
exports.getPluginManager = require_StateContainerRegistry.getPluginManager;
|
package/dist/plugins.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as PluginManager, n as getPluginManager } from "./StateContainerRegistry-CvBOhAT2.js";
|
|
2
2
|
export { PluginManager, getPluginManager };
|