@openspecui/search 3.7.0 → 3.7.2

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as SearchIndexDocument, i as SearchIndex, n as SearchDocumentKind, o as SearchProvider, r as SearchHit, s as SearchQuery, t as SearchDocument } from "./types-B4eONYNW.mjs";
1
+ import { a as SearchIndexDocument, i as SearchIndex, n as SearchDocumentKind, o as SearchProvider, r as SearchHit, s as SearchQuery, t as SearchDocument } from "./types-DOR38nFt.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/engine.d.ts
@@ -9,10 +9,10 @@ declare function createSnippet(content: string, terms: string[]): string;
9
9
  declare function searchIndex(index: SearchIndex, query: SearchQuery): SearchHit[];
10
10
  //#endregion
11
11
  //#region src/protocol.d.ts
12
- declare const SearchDocumentKindSchema: z.ZodEnum<["spec", "change", "archive"]>;
12
+ declare const SearchDocumentKindSchema: z.ZodString;
13
13
  declare const SearchDocumentSchema: z.ZodObject<{
14
14
  id: z.ZodString;
15
- kind: z.ZodEnum<["spec", "change", "archive"]>;
15
+ kind: z.ZodString;
16
16
  title: z.ZodString;
17
17
  href: z.ZodString;
18
18
  path: z.ZodString;
@@ -20,7 +20,7 @@ declare const SearchDocumentSchema: z.ZodObject<{
20
20
  updatedAt: z.ZodNumber;
21
21
  }, "strip", z.ZodTypeAny, {
22
22
  id: string;
23
- kind: "spec" | "change" | "archive";
23
+ kind: string;
24
24
  title: string;
25
25
  href: string;
26
26
  path: string;
@@ -28,7 +28,7 @@ declare const SearchDocumentSchema: z.ZodObject<{
28
28
  updatedAt: number;
29
29
  }, {
30
30
  id: string;
31
- kind: "spec" | "change" | "archive";
31
+ kind: string;
32
32
  title: string;
33
33
  href: string;
34
34
  path: string;
@@ -47,7 +47,7 @@ declare const SearchQuerySchema: z.ZodObject<{
47
47
  }>;
48
48
  declare const SearchHitSchema: z.ZodObject<{
49
49
  documentId: z.ZodString;
50
- kind: z.ZodEnum<["spec", "change", "archive"]>;
50
+ kind: z.ZodString;
51
51
  title: z.ZodString;
52
52
  href: z.ZodString;
53
53
  path: z.ZodString;
@@ -55,7 +55,7 @@ declare const SearchHitSchema: z.ZodObject<{
55
55
  snippet: z.ZodString;
56
56
  updatedAt: z.ZodNumber;
57
57
  }, "strip", z.ZodTypeAny, {
58
- kind: "spec" | "change" | "archive";
58
+ kind: string;
59
59
  title: string;
60
60
  href: string;
61
61
  path: string;
@@ -64,7 +64,7 @@ declare const SearchHitSchema: z.ZodObject<{
64
64
  score: number;
65
65
  snippet: string;
66
66
  }, {
67
- kind: "spec" | "change" | "archive";
67
+ kind: string;
68
68
  title: string;
69
69
  href: string;
70
70
  path: string;
@@ -78,7 +78,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
78
78
  type: z.ZodLiteral<"init">;
79
79
  docs: z.ZodArray<z.ZodObject<{
80
80
  id: z.ZodString;
81
- kind: z.ZodEnum<["spec", "change", "archive"]>;
81
+ kind: z.ZodString;
82
82
  title: z.ZodString;
83
83
  href: z.ZodString;
84
84
  path: z.ZodString;
@@ -86,7 +86,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
86
86
  updatedAt: z.ZodNumber;
87
87
  }, "strip", z.ZodTypeAny, {
88
88
  id: string;
89
- kind: "spec" | "change" | "archive";
89
+ kind: string;
90
90
  title: string;
91
91
  href: string;
92
92
  path: string;
@@ -94,7 +94,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
94
94
  updatedAt: number;
95
95
  }, {
96
96
  id: string;
97
- kind: "spec" | "change" | "archive";
97
+ kind: string;
98
98
  title: string;
99
99
  href: string;
100
100
  path: string;
@@ -106,7 +106,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
106
106
  type: "init";
107
107
  docs: {
108
108
  id: string;
109
- kind: "spec" | "change" | "archive";
109
+ kind: string;
110
110
  title: string;
111
111
  href: string;
112
112
  path: string;
@@ -118,7 +118,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
118
118
  type: "init";
119
119
  docs: {
120
120
  id: string;
121
- kind: "spec" | "change" | "archive";
121
+ kind: string;
122
122
  title: string;
123
123
  href: string;
124
124
  path: string;
@@ -130,7 +130,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
130
130
  type: z.ZodLiteral<"replaceAll">;
131
131
  docs: z.ZodArray<z.ZodObject<{
132
132
  id: z.ZodString;
133
- kind: z.ZodEnum<["spec", "change", "archive"]>;
133
+ kind: z.ZodString;
134
134
  title: z.ZodString;
135
135
  href: z.ZodString;
136
136
  path: z.ZodString;
@@ -138,7 +138,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
138
138
  updatedAt: z.ZodNumber;
139
139
  }, "strip", z.ZodTypeAny, {
140
140
  id: string;
141
- kind: "spec" | "change" | "archive";
141
+ kind: string;
142
142
  title: string;
143
143
  href: string;
144
144
  path: string;
@@ -146,7 +146,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
146
146
  updatedAt: number;
147
147
  }, {
148
148
  id: string;
149
- kind: "spec" | "change" | "archive";
149
+ kind: string;
150
150
  title: string;
151
151
  href: string;
152
152
  path: string;
@@ -158,7 +158,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
158
158
  type: "replaceAll";
159
159
  docs: {
160
160
  id: string;
161
- kind: "spec" | "change" | "archive";
161
+ kind: string;
162
162
  title: string;
163
163
  href: string;
164
164
  path: string;
@@ -170,7 +170,7 @@ declare const SearchWorkerRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
170
170
  type: "replaceAll";
171
171
  docs: {
172
172
  id: string;
173
- kind: "spec" | "change" | "archive";
173
+ kind: string;
174
174
  title: string;
175
175
  href: string;
176
176
  path: string;
@@ -228,7 +228,7 @@ declare const SearchWorkerResponseSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
228
228
  type: z.ZodLiteral<"results">;
229
229
  hits: z.ZodArray<z.ZodObject<{
230
230
  documentId: z.ZodString;
231
- kind: z.ZodEnum<["spec", "change", "archive"]>;
231
+ kind: z.ZodString;
232
232
  title: z.ZodString;
233
233
  href: z.ZodString;
234
234
  path: z.ZodString;
@@ -236,7 +236,7 @@ declare const SearchWorkerResponseSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
236
236
  snippet: z.ZodString;
237
237
  updatedAt: z.ZodNumber;
238
238
  }, "strip", z.ZodTypeAny, {
239
- kind: "spec" | "change" | "archive";
239
+ kind: string;
240
240
  title: string;
241
241
  href: string;
242
242
  path: string;
@@ -245,7 +245,7 @@ declare const SearchWorkerResponseSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
245
245
  score: number;
246
246
  snippet: string;
247
247
  }, {
248
- kind: "spec" | "change" | "archive";
248
+ kind: string;
249
249
  title: string;
250
250
  href: string;
251
251
  path: string;
@@ -258,7 +258,7 @@ declare const SearchWorkerResponseSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
258
258
  id: string;
259
259
  type: "results";
260
260
  hits: {
261
- kind: "spec" | "change" | "archive";
261
+ kind: string;
262
262
  title: string;
263
263
  href: string;
264
264
  path: string;
@@ -271,7 +271,7 @@ declare const SearchWorkerResponseSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
271
271
  id: string;
272
272
  type: "results";
273
273
  hits: {
274
- kind: "spec" | "change" | "archive";
274
+ kind: string;
275
275
  title: string;
276
276
  href: string;
277
277
  path: string;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as SearchHitSchema, c as SearchWorkerResponseSchema, i as SearchDocumentSchema, n as buildWebWorkerSource, o as SearchQuerySchema, r as SearchDocumentKindSchema, s as SearchWorkerRequestSchema } from "./worker-source-CMPZlh9-.mjs";
1
+ import { a as SearchHitSchema, c as SearchWorkerResponseSchema, i as SearchDocumentSchema, n as buildWebWorkerSource, o as SearchQuerySchema, r as SearchDocumentKindSchema, s as SearchWorkerRequestSchema } from "./worker-source-D2akmNhf.mjs";
2
2
 
3
3
  //#region src/engine.ts
4
4
  const DEFAULT_LIMIT = 50;
package/dist/node.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { o as SearchProvider, r as SearchHit, s as SearchQuery, t as SearchDocument } from "./types-B4eONYNW.mjs";
1
+ import { o as SearchProvider, r as SearchHit, s as SearchQuery, t as SearchDocument } from "./types-DOR38nFt.mjs";
2
2
 
3
3
  //#region src/node-worker-provider.d.ts
4
4
  declare class NodeWorkerSearchProvider implements SearchProvider {
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as SearchHitSchema, c as SearchWorkerResponseSchema, t as buildNodeWorkerSource } from "./worker-source-CMPZlh9-.mjs";
1
+ import { a as SearchHitSchema, c as SearchWorkerResponseSchema, t as buildNodeWorkerSource } from "./worker-source-D2akmNhf.mjs";
2
2
  import { Worker } from "node:worker_threads";
3
3
 
4
4
  //#region src/node-worker-provider.ts
@@ -1,5 +1,5 @@
1
1
  //#region src/types.d.ts
2
- type SearchDocumentKind = 'spec' | 'change' | 'archive';
2
+ type SearchDocumentKind = string;
3
3
  interface SearchDocument {
4
4
  id: string;
5
5
  kind: SearchDocumentKind;
@@ -1,11 +1,7 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/protocol.ts
4
- const SearchDocumentKindSchema = z.enum([
5
- "spec",
6
- "change",
7
- "archive"
8
- ]);
4
+ const SearchDocumentKindSchema = z.string().min(1);
9
5
  const SearchDocumentSchema = z.object({
10
6
  id: z.string(),
11
7
  kind: SearchDocumentKindSchema,
package/package.json CHANGED
@@ -1,17 +1,21 @@
1
1
  {
2
2
  "name": "@openspecui/search",
3
- "version": "3.7.0",
3
+ "version": "3.7.2",
4
4
  "description": "Shared search engine and worker providers for OpenSpecUI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.mts",
8
8
  "exports": {
9
9
  ".": {
10
+ "development": "./src/index.ts",
10
11
  "import": "./dist/index.mjs",
12
+ "default": "./dist/index.mjs",
11
13
  "types": "./dist/index.d.mts"
12
14
  },
13
15
  "./node": {
16
+ "development": "./src/node.ts",
14
17
  "import": "./dist/node.mjs",
18
+ "default": "./dist/node.mjs",
15
19
  "types": "./dist/node.d.mts"
16
20
  }
17
21
  },