### Changes: - Created `examples/browser_compatible_exports.ts`: - Introduced browser-friendly exports with polyfill for `Buffer` in browser environments. - Implemented shims for Node.js modules (`fs`, `util`, and `path`) to avoid compatibility issues. - Exported browser-compatible types and utilities: `BrainyData`, `NounType`, `VerbType`, graph types, core types, distance functions, embedding utilities, and storage adapters. - Explicitly excluded Node.js/CLI-specific parts to focus on browser compatibility. - Added `src/types/brainyDataInterface.ts`: - Defined `BrainyDataInterface` to break the circular dependency between `brainyData.ts` and `serverSearchAugmentations.ts`. - Provided methods for managing nodes, relationships, initialization, search, and adding vector data with metadata. ### Purpose: - Enhanced the codebase to support browser environments by introducing browser-specific exports and avoiding Node.js dependencies. - Established clearer separation of concerns and modularity by introducing the `BrainyDataInterface` for dependency management, improving maintainability and flexibility. |
||
|---|---|---|
| .. | ||
| browser_compatible_exports.ts | ||
| demo.html | ||