@tinacms/schema-tools 1.4.6 → 1.4.7

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.es.js CHANGED
@@ -423,7 +423,6 @@ class TinaSchema {
423
423
  };
424
424
  this.schema = config;
425
425
  this.walkFields(({ field, collection, path }) => {
426
- var _a;
427
426
  if (!("searchable" in field)) {
428
427
  if (field.type === "image") {
429
428
  field.searchable = false;
@@ -438,13 +437,6 @@ class TinaSchema {
438
437
  if (collection.format === "mdx") {
439
438
  field.parser = { type: "mdx" };
440
439
  } else {
441
- (_a = field.templates) == null ? void 0 : _a.forEach((template) => {
442
- if (!template.match) {
443
- console.warn(`WARNING: Found rich-text template at ${collection.name}.${path.join(".")} with no matches property.
444
- Visit https://tina.io/docs/reference/types/rich-text/#custom-shortcode-syntax to learn more
445
- `);
446
- }
447
- });
448
440
  field.parser = { type: "markdown" };
449
441
  }
450
442
  }
@@ -890,7 +882,8 @@ const tinaConfigKey = z$1.object({
890
882
  }).strict().optional();
891
883
  const tinaSearchKey = z$1.object({
892
884
  indexerToken: z$1.string().optional(),
893
- stopwordLanguages: z$1.array(z$1.string()).nonempty().optional()
885
+ stopwordLanguages: z$1.array(z$1.string()).nonempty().optional(),
886
+ tokenSplitRegex: z$1.string().optional()
894
887
  }).strict().optional();
895
888
  const tinaConfigZod = z$1.object({
896
889
  client: z$1.object({ referenceDepth: z$1.number().optional() }).optional(),
package/dist/index.js CHANGED
@@ -450,7 +450,6 @@
450
450
  };
451
451
  this.schema = config;
452
452
  this.walkFields(({ field, collection, path }) => {
453
- var _a;
454
453
  if (!("searchable" in field)) {
455
454
  if (field.type === "image") {
456
455
  field.searchable = false;
@@ -465,13 +464,6 @@
465
464
  if (collection.format === "mdx") {
466
465
  field.parser = { type: "mdx" };
467
466
  } else {
468
- (_a = field.templates) == null ? void 0 : _a.forEach((template) => {
469
- if (!template.match) {
470
- console.warn(`WARNING: Found rich-text template at ${collection.name}.${path.join(".")} with no matches property.
471
- Visit https://tina.io/docs/reference/types/rich-text/#custom-shortcode-syntax to learn more
472
- `);
473
- }
474
- });
475
467
  field.parser = { type: "markdown" };
476
468
  }
477
469
  }
@@ -917,7 +909,8 @@ ${JSON.stringify(val, null, 2)}
917
909
  }).strict().optional();
918
910
  const tinaSearchKey = z__default["default"].object({
919
911
  indexerToken: z__default["default"].string().optional(),
920
- stopwordLanguages: z__default["default"].array(z__default["default"].string()).nonempty().optional()
912
+ stopwordLanguages: z__default["default"].array(z__default["default"].string()).nonempty().optional(),
913
+ tokenSplitRegex: z__default["default"].string().optional()
921
914
  }).strict().optional();
922
915
  const tinaConfigZod = z__default["default"].object({
923
916
  client: z__default["default"].object({ referenceDepth: z__default["default"].number().optional() }).optional(),
@@ -452,6 +452,10 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
452
452
  * stopword languages to use (default: eng)
453
453
  */
454
454
  stopwordLanguages?: string[];
455
+ /**
456
+ * regex used for splitting tokens (default: /[\p{L}\d_]+/)
457
+ */
458
+ tokenSplitRegex?: string;
455
459
  };
456
460
  }) & {
457
461
  /**
@@ -137,12 +137,15 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
137
137
  tina: z.ZodOptional<z.ZodObject<{
138
138
  indexerToken: z.ZodOptional<z.ZodString>;
139
139
  stopwordLanguages: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
140
+ tokenSplitRegex: z.ZodOptional<z.ZodString>;
140
141
  }, "strict", z.ZodTypeAny, {
141
142
  indexerToken?: string;
142
143
  stopwordLanguages?: [string, ...string[]];
144
+ tokenSplitRegex?: string;
143
145
  }, {
144
146
  indexerToken?: string;
145
147
  stopwordLanguages?: [string, ...string[]];
148
+ tokenSplitRegex?: string;
146
149
  }>>;
147
150
  searchClient: z.ZodOptional<z.ZodAny>;
148
151
  indexBatchSize: z.ZodOptional<z.ZodNumber>;
@@ -152,6 +155,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
152
155
  tina?: {
153
156
  indexerToken?: string;
154
157
  stopwordLanguages?: [string, ...string[]];
158
+ tokenSplitRegex?: string;
155
159
  };
156
160
  searchClient?: any;
157
161
  indexBatchSize?: number;
@@ -160,6 +164,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
160
164
  tina?: {
161
165
  indexerToken?: string;
162
166
  stopwordLanguages?: [string, ...string[]];
167
+ tokenSplitRegex?: string;
163
168
  };
164
169
  searchClient?: any;
165
170
  indexBatchSize?: number;
@@ -170,6 +175,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
170
175
  tina?: {
171
176
  indexerToken?: string;
172
177
  stopwordLanguages?: [string, ...string[]];
178
+ tokenSplitRegex?: string;
173
179
  };
174
180
  searchClient?: any;
175
181
  indexBatchSize?: number;
@@ -190,6 +196,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
190
196
  tina?: {
191
197
  indexerToken?: string;
192
198
  stopwordLanguages?: [string, ...string[]];
199
+ tokenSplitRegex?: string;
193
200
  };
194
201
  searchClient?: any;
195
202
  indexBatchSize?: number;
@@ -224,6 +231,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
224
231
  tina?: {
225
232
  indexerToken?: string;
226
233
  stopwordLanguages?: [string, ...string[]];
234
+ tokenSplitRegex?: string;
227
235
  };
228
236
  searchClient?: any;
229
237
  indexBatchSize?: number;
@@ -258,6 +266,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
258
266
  tina?: {
259
267
  indexerToken?: string;
260
268
  stopwordLanguages?: [string, ...string[]];
269
+ tokenSplitRegex?: string;
261
270
  };
262
271
  searchClient?: any;
263
272
  indexBatchSize?: number;
@@ -292,6 +301,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
292
301
  tina?: {
293
302
  indexerToken?: string;
294
303
  stopwordLanguages?: [string, ...string[]];
304
+ tokenSplitRegex?: string;
295
305
  };
296
306
  searchClient?: any;
297
307
  indexBatchSize?: number;
@@ -326,6 +336,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
326
336
  tina?: {
327
337
  indexerToken?: string;
328
338
  stopwordLanguages?: [string, ...string[]];
339
+ tokenSplitRegex?: string;
329
340
  };
330
341
  searchClient?: any;
331
342
  indexBatchSize?: number;
@@ -40,12 +40,15 @@ export declare const tinaConfigZod: z.ZodObject<{
40
40
  tina: z.ZodOptional<z.ZodObject<{
41
41
  indexerToken: z.ZodOptional<z.ZodString>;
42
42
  stopwordLanguages: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
43
+ tokenSplitRegex: z.ZodOptional<z.ZodString>;
43
44
  }, "strict", z.ZodTypeAny, {
44
45
  indexerToken?: string;
45
46
  stopwordLanguages?: [string, ...string[]];
47
+ tokenSplitRegex?: string;
46
48
  }, {
47
49
  indexerToken?: string;
48
50
  stopwordLanguages?: [string, ...string[]];
51
+ tokenSplitRegex?: string;
49
52
  }>>;
50
53
  searchClient: z.ZodOptional<z.ZodAny>;
51
54
  indexBatchSize: z.ZodOptional<z.ZodNumber>;
@@ -55,6 +58,7 @@ export declare const tinaConfigZod: z.ZodObject<{
55
58
  tina?: {
56
59
  indexerToken?: string;
57
60
  stopwordLanguages?: [string, ...string[]];
61
+ tokenSplitRegex?: string;
58
62
  };
59
63
  searchClient?: any;
60
64
  indexBatchSize?: number;
@@ -63,6 +67,7 @@ export declare const tinaConfigZod: z.ZodObject<{
63
67
  tina?: {
64
68
  indexerToken?: string;
65
69
  stopwordLanguages?: [string, ...string[]];
70
+ tokenSplitRegex?: string;
66
71
  };
67
72
  searchClient?: any;
68
73
  indexBatchSize?: number;
@@ -73,6 +78,7 @@ export declare const tinaConfigZod: z.ZodObject<{
73
78
  tina?: {
74
79
  indexerToken?: string;
75
80
  stopwordLanguages?: [string, ...string[]];
81
+ tokenSplitRegex?: string;
76
82
  };
77
83
  searchClient?: any;
78
84
  indexBatchSize?: number;
@@ -93,6 +99,7 @@ export declare const tinaConfigZod: z.ZodObject<{
93
99
  tina?: {
94
100
  indexerToken?: string;
95
101
  stopwordLanguages?: [string, ...string[]];
102
+ tokenSplitRegex?: string;
96
103
  };
97
104
  searchClient?: any;
98
105
  indexBatchSize?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "exports": {