@soulcraft/brainy 3.0.1 → 3.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/README.md +77 -4
- package/dist/brainy.d.ts +5 -1
- package/dist/brainy.js +74 -2
- package/dist/neural/embeddedPatterns.js +3 -1
- package/dist/storage/adapters/fileSystemStorage.js +21 -3
- package/dist/storage/baseStorage.js +10 -2
- package/dist/types/brainy.types.d.ts +2 -0
- package/dist/universal/crypto.d.ts +11 -1
- package/dist/universal/crypto.js +24 -93
- package/dist/universal/events.d.ts +3 -2
- package/dist/universal/events.js +6 -75
- package/dist/universal/fs.d.ts +2 -3
- package/dist/universal/fs.js +5 -211
- package/dist/universal/path.d.ts +3 -2
- package/dist/universal/path.js +22 -78
- package/dist/universal/uuid.d.ts +1 -1
- package/dist/universal/uuid.js +1 -1
- package/dist/utils/metadataIndex.js +50 -2
- package/package.json +1 -14
- package/dist/browserFramework.d.ts +0 -15
- package/dist/browserFramework.js +0 -34
- package/dist/browserFramework.minimal.d.ts +0 -14
- package/dist/browserFramework.minimal.js +0 -34
package/dist/browserFramework.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser Framework Entry Point for Brainy
|
|
3
|
-
* Optimized for modern frameworks like Angular, React, Vue, etc.
|
|
4
|
-
* Auto-detects environment and uses optimal storage (OPFS in browsers)
|
|
5
|
-
*/
|
|
6
|
-
import { Brainy } from './brainy.js';
|
|
7
|
-
import { VerbType, NounType } from './types/graphTypes.js';
|
|
8
|
-
/**
|
|
9
|
-
* Create a Brainy instance optimized for browser frameworks
|
|
10
|
-
* Auto-detects environment and selects optimal storage and settings
|
|
11
|
-
*/
|
|
12
|
-
export async function createBrowserBrainy(config = {}) {
|
|
13
|
-
// Brainy already has environment detection and will automatically:
|
|
14
|
-
// - Use OPFS storage in browsers with fallback to Memory
|
|
15
|
-
// - Use FileSystem storage in Node.js
|
|
16
|
-
// - Request persistent storage when appropriate
|
|
17
|
-
const browserConfig = {
|
|
18
|
-
storage: {
|
|
19
|
-
type: 'opfs',
|
|
20
|
-
options: {
|
|
21
|
-
requestPersistentStorage: true // Request persistent storage for better performance
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
...config
|
|
25
|
-
};
|
|
26
|
-
const brainyData = new Brainy(browserConfig);
|
|
27
|
-
await brainyData.init();
|
|
28
|
-
return brainyData;
|
|
29
|
-
}
|
|
30
|
-
// Re-export types and constants for framework use
|
|
31
|
-
export { VerbType, NounType, Brainy };
|
|
32
|
-
// Default export for easy importing
|
|
33
|
-
export default createBrowserBrainy;
|
|
34
|
-
//# sourceMappingURL=browserFramework.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal Browser Framework Entry Point for Brainy
|
|
3
|
-
* Core MIT open source functionality only - no enterprise features
|
|
4
|
-
* Optimized for browser usage with all dependencies bundled
|
|
5
|
-
*/
|
|
6
|
-
import { Brainy } from './brainy.js';
|
|
7
|
-
import { VerbType, NounType } from './types/graphTypes.js';
|
|
8
|
-
/**
|
|
9
|
-
* Create a Brainy instance optimized for browser usage
|
|
10
|
-
* Auto-detects environment and selects optimal storage and settings
|
|
11
|
-
*/
|
|
12
|
-
export declare function createBrowserBrainy(config?: {}): Promise<Brainy<any>>;
|
|
13
|
-
export { VerbType, NounType, Brainy };
|
|
14
|
-
export default createBrowserBrainy;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal Browser Framework Entry Point for Brainy
|
|
3
|
-
* Core MIT open source functionality only - no enterprise features
|
|
4
|
-
* Optimized for browser usage with all dependencies bundled
|
|
5
|
-
*/
|
|
6
|
-
import { Brainy } from './brainy.js';
|
|
7
|
-
import { VerbType, NounType } from './types/graphTypes.js';
|
|
8
|
-
/**
|
|
9
|
-
* Create a Brainy instance optimized for browser usage
|
|
10
|
-
* Auto-detects environment and selects optimal storage and settings
|
|
11
|
-
*/
|
|
12
|
-
export async function createBrowserBrainy(config = {}) {
|
|
13
|
-
// Brainy already has environment detection and will automatically:
|
|
14
|
-
// - Use OPFS storage in browsers with fallback to Memory
|
|
15
|
-
// - Use FileSystem storage in Node.js
|
|
16
|
-
// - Request persistent storage when appropriate
|
|
17
|
-
const browserConfig = {
|
|
18
|
-
storage: {
|
|
19
|
-
type: 'opfs',
|
|
20
|
-
options: {
|
|
21
|
-
requestPersistentStorage: true
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
...config
|
|
25
|
-
};
|
|
26
|
-
const brainyData = new Brainy(browserConfig);
|
|
27
|
-
await brainyData.init();
|
|
28
|
-
return brainyData;
|
|
29
|
-
}
|
|
30
|
-
// Re-export core types and classes for browser use
|
|
31
|
-
export { VerbType, NounType, Brainy };
|
|
32
|
-
// Default export for easy importing
|
|
33
|
-
export default createBrowserBrainy;
|
|
34
|
-
//# sourceMappingURL=browserFramework.minimal.js.map
|