simile-search 0.3.0 → 0.3.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/dist/engine.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SearchItem, SearchResult, SearchOptions, SimileConfig, SimileSnapshot, HybridWeights } from "./types";
1
+ import { SearchItem, SearchResult, SearchOptions, SimileConfig, SimileSnapshot, HybridWeights } from "./types.js";
2
2
  export declare class Simile<T = any> {
3
3
  private items;
4
4
  private vectors;
package/dist/engine.js CHANGED
@@ -1,8 +1,8 @@
1
- import { embed, embedBatch, vectorToBase64, base64ToVector } from "./embedder";
2
- import { cosine, fuzzyScore, keywordScore, calculateScoreStats } from "./similarity";
3
- import { hybridScore, getDefaultWeights } from "./ranker";
4
- import { extractText, normalizeScore } from "./utils";
5
- const PACKAGE_VERSION = "0.3.0";
1
+ import { embed, embedBatch, vectorToBase64, base64ToVector } from "./embedder.js";
2
+ import { cosine, fuzzyScore, keywordScore, calculateScoreStats } from "./similarity.js";
3
+ import { hybridScore, getDefaultWeights } from "./ranker.js";
4
+ import { extractText, normalizeScore } from "./utils.js";
5
+ const PACKAGE_VERSION = "0.3.1";
6
6
  export class Simile {
7
7
  constructor(items, vectors, config = {}) {
8
8
  this.items = items;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- export { Simile } from "./engine";
2
- export * from "./types";
3
- export { embed, embedBatch, vectorToBase64, base64ToVector } from "./embedder";
4
- export { cosine, fuzzyScore, keywordScore, calculateScoreStats } from "./similarity";
5
- export { hybridScore, getDefaultWeights } from "./ranker";
6
- export { getByPath, extractText, normalizeScore } from "./utils";
1
+ export * from "./types.js";
2
+ export { embed, embedBatch, vectorToBase64, base64ToVector } from "./embedder.js";
3
+ export { cosine, fuzzyScore, keywordScore, calculateScoreStats } from "./similarity.js";
4
+ export { hybridScore, getDefaultWeights } from "./ranker.js";
5
+ export { getByPath, extractText, normalizeScore } from "./utils.js";
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
- export { Simile } from "./engine";
2
- export * from "./types";
3
- export { embed, embedBatch, vectorToBase64, base64ToVector } from "./embedder";
4
- export { cosine, fuzzyScore, keywordScore, calculateScoreStats } from "./similarity";
5
- export { hybridScore, getDefaultWeights } from "./ranker";
6
- export { getByPath, extractText, normalizeScore } from "./utils";
1
+ export * from "./types.js";
2
+ export { embed, embedBatch, vectorToBase64, base64ToVector } from "./embedder.js";
3
+ export { cosine, fuzzyScore, keywordScore, calculateScoreStats } from "./similarity.js";
4
+ export { hybridScore, getDefaultWeights } from "./ranker.js";
5
+ export { getByPath, extractText, normalizeScore } from "./utils.js";
package/dist/ranker.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { HybridWeights } from "./types";
1
+ import { HybridWeights } from "./types.js";
2
2
  export declare function hybridScore(semantic: number, fuzzy: number, keyword: number, weights?: HybridWeights): number;
3
3
  export declare function getDefaultWeights(): Required<HybridWeights>;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "simile-search",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Offline-first semantic + fuzzy search engine for catalogs, names, and products",
5
+ "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "scripts": {
@@ -34,5 +35,11 @@
34
35
  "ts-node": "^10.9.2",
35
36
  "typescript": "^5.0.0",
36
37
  "vitest": "^4.0.16"
38
+ },
39
+ "exports": {
40
+ ".": {
41
+ "import": "./dist/index.js",
42
+ "require": "./dist/index.cjs"
43
+ }
37
44
  }
38
45
  }