@blac/core 2.0.4 → 2.0.6
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 +98 -126
- package/dist/StateContainerRegistry-Brmferpf.js +588 -0
- package/dist/StateContainerRegistry-Brmferpf.js.map +1 -0
- package/dist/StateContainerRegistry-CVPTMaHn.cjs +629 -0
- package/dist/StateContainerRegistry-CVPTMaHn.cjs.map +1 -0
- package/dist/branded-DndTHjv2.cjs +18 -0
- package/dist/branded-DndTHjv2.cjs.map +1 -0
- package/dist/branded-mwGzzPF1.js +13 -0
- package/dist/branded-mwGzzPF1.js.map +1 -0
- package/dist/config-BInS_9WT.cjs +101 -0
- package/dist/config-BInS_9WT.cjs.map +1 -0
- package/dist/config-BmFnPVM0.js +42 -0
- package/dist/config-BmFnPVM0.js.map +1 -0
- package/dist/constants.d.cts +81 -0
- package/dist/constants.d.ts +81 -0
- package/dist/core/Cubit.d.ts +24 -0
- package/dist/core/StateContainer.d.ts +177 -0
- package/dist/core/StateContainerRegistry.d.ts +189 -0
- package/dist/debug.cjs +11 -26
- package/dist/debug.d.cts +35 -0
- package/dist/debug.d.ts +35 -0
- package/dist/debug.js +2 -18
- package/dist/decorators/blac.d.ts +40 -0
- package/dist/decorators/index.d.ts +1 -0
- package/dist/index.cjs +162 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -794
- package/dist/index.d.ts +17 -794
- package/dist/index.js +145 -31
- package/dist/index.js.map +1 -1
- package/dist/plugin/BlacPlugin.d.ts +143 -0
- package/dist/plugin/PluginManager.d.ts +81 -0
- package/dist/plugins.cjs +3 -3
- package/dist/plugins.d.cts +25 -0
- package/dist/plugins.d.ts +25 -0
- package/dist/plugins.js +2 -3
- package/dist/registry/acquire.d.ts +2 -0
- package/dist/registry/borrow.d.ts +9 -0
- package/dist/registry/config.d.ts +8 -0
- package/dist/registry/ensure.d.ts +2 -0
- package/dist/registry/index.d.ts +7 -0
- package/dist/registry/management.d.ts +4 -0
- package/dist/registry/queries.d.ts +5 -0
- package/dist/registry/release.d.ts +2 -0
- package/dist/resolve-dependencies-B22YjFGk.cjs +773 -0
- package/dist/resolve-dependencies-B22YjFGk.cjs.map +1 -0
- package/dist/resolve-dependencies-Cvq0glJF.js +648 -0
- package/dist/resolve-dependencies-Cvq0glJF.js.map +1 -0
- package/dist/tracked-B_MUXIpe.cjs +216 -0
- package/dist/tracked-B_MUXIpe.cjs.map +1 -0
- package/dist/tracked-I_q9buYg.js +181 -0
- package/dist/tracked-I_q9buYg.js.map +1 -0
- package/dist/tracking.cjs +3 -3
- package/dist/tracking.js +2 -3
- package/dist/types/branded.d.ts +26 -0
- package/dist/types/utilities.d.ts +51 -0
- package/dist/types.cjs +3 -14
- package/dist/types.js +1 -12
- package/dist/utils/idGenerator.d.ts +73 -0
- package/dist/utils/static-props.d.ts +35 -0
- package/dist/watch/index.d.ts +2 -0
- package/dist/watch/watch.d.ts +50 -0
- package/dist/watch-entry.cjs +7 -109
- package/dist/watch-entry.d.cts +26 -0
- package/dist/watch-entry.d.ts +26 -0
- package/dist/watch-entry.js +1 -104
- package/package.json +29 -51
- package/dist/StateContainerRegistry.cjs.map +0 -1
- package/dist/StateContainerRegistry.js.map +0 -1
- package/dist/debug.cjs.map +0 -1
- package/dist/debug.js.map +0 -1
- package/dist/management.cjs.map +0 -1
- package/dist/management.js.map +0 -1
- package/dist/resolve-dependencies.cjs.map +0 -1
- package/dist/resolve-dependencies.js.map +0 -1
- package/dist/types.cjs.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/watch-entry.cjs.map +0 -1
- package/dist/watch-entry.js.map +0 -1
- package/dist/watch.cjs.map +0 -1
- package/dist/watch.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugins Subpath Export
|
|
3
|
+
*
|
|
4
|
+
* Plugin system utilities for extending BlaC functionality.
|
|
5
|
+
* Import from '@blac/core/plugins'
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { PluginManager, getPluginManager, type BlacPlugin } from '@blac/core/plugins';
|
|
10
|
+
*
|
|
11
|
+
* const myPlugin: BlacPlugin = {
|
|
12
|
+
* name: 'my-plugin',
|
|
13
|
+
* onInstanceCreated(context) {
|
|
14
|
+
* console.log('Instance created:', context.instance);
|
|
15
|
+
* },
|
|
16
|
+
* };
|
|
17
|
+
*
|
|
18
|
+
* getPluginManager().register(myPlugin);
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
export { PluginManager } from './plugin/PluginManager';
|
|
24
|
+
export type { BlacPlugin, BlacPluginWithInit, PluginContext, PluginConfig, InstanceMetadata, } from './plugin/BlacPlugin';
|
|
25
|
+
export { getPluginManager } from './core/StateContainerRegistry';
|
package/dist/plugins.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export { PluginManager, getPluginManager };
|
|
1
|
+
import { i as PluginManager, t as getPluginManager } from "./StateContainerRegistry-Brmferpf.js";
|
|
2
|
+
export { PluginManager, getPluginManager };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StateContainerConstructor } from '../types/utilities';
|
|
2
|
+
export declare function borrow<T extends StateContainerConstructor>(BlocClass: T, instanceKey?: string): InstanceType<T>;
|
|
3
|
+
export declare function borrowSafe<T extends StateContainerConstructor>(BlocClass: T, instanceKey?: string): {
|
|
4
|
+
error: Error;
|
|
5
|
+
instance: null;
|
|
6
|
+
} | {
|
|
7
|
+
error: null;
|
|
8
|
+
instance: InstanceType<T>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StateContainerRegistry } from '../core/StateContainerRegistry';
|
|
2
|
+
export declare function getRegistry(): StateContainerRegistry;
|
|
3
|
+
export declare function setRegistry(registry: StateContainerRegistry): void;
|
|
4
|
+
export declare function getStats(): {
|
|
5
|
+
registeredTypes: number;
|
|
6
|
+
totalInstances: number;
|
|
7
|
+
typeBreakdown: Record<string, number>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { acquire } from './acquire';
|
|
2
|
+
export { borrow, borrowSafe } from './borrow';
|
|
3
|
+
export { ensure } from './ensure';
|
|
4
|
+
export { release } from './release';
|
|
5
|
+
export { hasInstance, getRefCount, getAll, forEach } from './queries';
|
|
6
|
+
export { clear, clearAll, register } from './management';
|
|
7
|
+
export { getRegistry, setRegistry, getStats } from './config';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StateContainerConstructor } from '../types/utilities';
|
|
2
|
+
export declare function clear<T extends StateContainerConstructor>(BlocClass: T): void;
|
|
3
|
+
export declare function clearAll(): void;
|
|
4
|
+
export declare function register<T extends StateContainerConstructor>(BlocClass: T, isolated?: boolean): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StateContainerConstructor, InstanceReadonlyState } from '../types/utilities';
|
|
2
|
+
export declare function hasInstance<T extends StateContainerConstructor>(BlocClass: T, instanceKey?: string): boolean;
|
|
3
|
+
export declare function getRefCount<T extends StateContainerConstructor>(BlocClass: T, instanceKey?: string): number;
|
|
4
|
+
export declare function getAll<T extends StateContainerConstructor>(BlocClass: T): InstanceReadonlyState<T>[];
|
|
5
|
+
export declare function forEach<T extends StateContainerConstructor>(BlocClass: T, callback: (instance: InstanceReadonlyState<T>) => void): void;
|