@regle/schemas 1.10.1 → 1.11.0-beta.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.
@@ -1,7 +1,6 @@
1
1
  import { createScopedUseRegle, useRootStorage } from "@regle/core";
2
2
  import { computed, getCurrentScope, isRef, onScopeDispose, ref, unref, watch } from "vue";
3
3
 
4
- //#region ../shared/utils/isFile.ts
5
4
  /**
6
5
  * Server side friendly way of checking for a File
7
6
  */
@@ -9,8 +8,6 @@ function isFile(value) {
9
8
  return value?.constructor?.name == "File" || value?.constructor?.name == "FileList";
10
9
  }
11
10
 
12
- //#endregion
13
- //#region ../shared/utils/isEmpty.ts
14
11
  /**
15
12
  * This is the inverse of isFilled. It will check if the value is in any way empty (including arrays and objects)
16
13
  *
@@ -30,12 +27,8 @@ function isEmpty(value, considerEmptyArrayInvalid = true) {
30
27
  return !String(value).length;
31
28
  }
32
29
 
33
- //#endregion
34
- //#region ../shared/utils/symbol.ts
35
30
  const RegleRuleSymbol = Symbol("regle-rule");
36
31
 
37
- //#endregion
38
- //#region ../shared/utils/cloneDeep.ts
39
32
  function getRegExpFlags(regExp) {
40
33
  if (typeof regExp.source.flags == "string") return regExp.source.flags;
41
34
  else {
@@ -62,8 +55,6 @@ function cloneDeep(obj) {
62
55
  return result;
63
56
  }
64
57
 
65
- //#endregion
66
- //#region ../shared/utils/object.utils.ts
67
58
  function isObject(obj) {
68
59
  if (obj && (obj instanceof Date || obj.constructor.name == "File" || obj.constructor.name == "FileList")) return false;
69
60
  return typeof obj === "object" && obj !== null && !Array.isArray(obj);
@@ -130,8 +121,6 @@ function merge(_obj1, ..._objs) {
130
121
  return result;
131
122
  }
132
123
 
133
- //#endregion
134
- //#region src/core/useRegleSchema.ts
135
124
  function createUseRegleSchemaComposable(options, shortcuts) {
136
125
  const globalOptions = {
137
126
  autoDirty: options?.autoDirty,
@@ -254,8 +243,6 @@ function createUseRegleSchemaComposable(options, shortcuts) {
254
243
  */
255
244
  const useRegleSchema = createUseRegleSchemaComposable();
256
245
 
257
- //#endregion
258
- //#region src/core/withDeps.ts
259
246
  /**
260
247
  *
261
248
  * Force dependency on any RPC schema
@@ -276,8 +263,6 @@ function withDeps(schema, _depsArray) {
276
263
  return schema;
277
264
  }
278
265
 
279
- //#endregion
280
- //#region src/core/inferSchema.ts
281
266
  function createInferSchemaHelper() {
282
267
  function inferSchema$1(state, rulesFactory) {
283
268
  return rulesFactory;
@@ -293,8 +278,6 @@ function createInferSchemaHelper() {
293
278
  */
294
279
  const inferSchema = createInferSchemaHelper();
295
280
 
296
- //#endregion
297
- //#region src/core/defineRegleSchemaConfig.ts
298
281
  /**
299
282
  * Define a global regle configuration, where you can:
300
283
  * - Define global modifiers
@@ -312,8 +295,6 @@ function defineRegleSchemaConfig({ modifiers, shortcuts }) {
312
295
  };
313
296
  }
314
297
 
315
- //#endregion
316
- //#region src/core/createScopedUseRegleSchema.ts
317
298
  const { useCollectScope: useCollectSchemaScope, useScopedRegle: useScopedRegleSchema } = createScopedUseRegle({ customUseRegle: useRegleSchema });
318
299
  const createScopedUseRegleSchema = (options) => {
319
300
  const { customStore, customUseRegle = useRegleSchema, asRecord = false } = options ?? {};
@@ -324,5 +305,4 @@ const createScopedUseRegleSchema = (options) => {
324
305
  });
325
306
  };
326
307
 
327
- //#endregion
328
308
  export { createScopedUseRegleSchema, defineRegleSchemaConfig, inferSchema, useCollectSchemaScope, useRegleSchema, useScopedRegleSchema, withDeps };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@regle/schemas",
3
- "version": "1.10.1",
3
+ "version": "1.11.0-beta.2",
4
4
  "description": "Schemas adapter for Regle",
5
5
  "dependencies": {
6
6
  "@standard-schema/spec": "1.0.0",
7
- "@regle/core": "1.10.1",
8
- "@regle/rules": "1.10.1"
7
+ "@regle/core": "1.11.0-beta.2",
8
+ "@regle/rules": "1.11.0-beta.2"
9
9
  },
10
10
  "peerDependencies": {
11
11
  "valibot": "^1.0.0",
@@ -32,7 +32,7 @@
32
32
  "type-fest": "5.2.0",
33
33
  "typescript": "5.9.3",
34
34
  "valibot": "1.1.0",
35
- "vitest": "4.0.6",
35
+ "vitest": "4.0.13",
36
36
  "vue": "3.5.22",
37
37
  "vue-tsc": "3.1.3",
38
38
  "zod": "4.1.12"
@@ -41,14 +41,9 @@
41
41
  "exports": {
42
42
  ".": {
43
43
  "types": "./dist/regle-schemas.d.ts",
44
- "node": {
45
- "import": {
46
- "production": "./dist/regle-schemas.min.js",
47
- "development": "./dist/regle-schemas.js",
48
- "default": "./dist/regle-schemas.js"
49
- }
50
- },
51
- "import": "./dist/regle-schemas.js"
44
+ "production": "./dist/regle-schemas.min.js",
45
+ "development": "./dist/regle-schemas.js",
46
+ "default": "./dist/regle-schemas.js"
52
47
  },
53
48
  "./package.json": "./package.json",
54
49
  "./dist/*": "./dist/*"