@valbuild/next 0.43.0 → 0.44.0

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,8 @@
1
1
  import { GenericSelector, SelectorOf, SelectorSource } from "@valbuild/core";
2
2
  import { StegaOfSource } from "@valbuild/react/stega";
3
3
  import { ValConfig } from "@valbuild/core";
4
- declare function useValStega<T extends SelectorSource>(selector: T): SelectorOf<T> extends GenericSelector<infer S> ? StegaOfSource<S> : never;
4
+ export type UseValType<T extends SelectorSource> = SelectorOf<T> extends GenericSelector<infer S> ? StegaOfSource<S> : never;
5
+ declare function useValStega<T extends SelectorSource>(selector: T): UseValType<T>;
5
6
  export declare function initValClient(config: ValConfig): {
6
7
  useValStega: typeof useValStega;
7
8
  };
@@ -16,3 +16,7 @@ export { ValRichText } from "@valbuild/react/internal";
16
16
  export { type ValEncodedString } from "@valbuild/react/stega";
17
17
  export { ValProvider } from "./ValProvider.js";
18
18
  export { initVal } from "./initVal.js";
19
+ import type { UseValType } from "./client/initValClient.js";
20
+ import { Schema, SelectorSource } from "@valbuild/core";
21
+ import { SelectorOfSchema } from "@valbuild/core";
22
+ export type InferSchemaType<S extends Schema<SelectorSource>> = UseValType<SelectorOfSchema<S>>;
@@ -106,6 +106,8 @@ var initVal = function initVal(config) {
106
106
  // NOTE! Side effects:
107
107
  stega.autoTagJSX();
108
108
 
109
+ // Convenience types
110
+
109
111
  Object.defineProperty(exports, 'FILE_REF_PROP', {
110
112
  enumerable: true,
111
113
  get: function () { return core.FILE_REF_PROP; }
@@ -106,6 +106,8 @@ var initVal = function initVal(config) {
106
106
  // NOTE! Side effects:
107
107
  stega.autoTagJSX();
108
108
 
109
+ // Convenience types
110
+
109
111
  Object.defineProperty(exports, 'FILE_REF_PROP', {
110
112
  enumerable: true,
111
113
  get: function () { return core.FILE_REF_PROP; }
@@ -85,4 +85,6 @@ var initVal = function initVal(config) {
85
85
  // NOTE! Side effects:
86
86
  autoTagJSX();
87
87
 
88
+ // Convenience types
89
+
88
90
  export { ValProvider, initVal };
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "next",
9
9
  "react"
10
10
  ],
11
- "version": "0.43.0",
11
+ "version": "0.44.0",
12
12
  "scripts": {
13
13
  "typecheck": "tsc --noEmit",
14
14
  "test": "jest"
@@ -45,9 +45,9 @@
45
45
  "exports": true
46
46
  },
47
47
  "dependencies": {
48
- "@valbuild/core": "~0.43.0",
49
- "@valbuild/react": "~0.43.0",
50
- "@valbuild/server": "~0.43.0",
48
+ "@valbuild/core": "~0.44.0",
49
+ "@valbuild/react": "~0.44.0",
50
+ "@valbuild/server": "~0.44.0",
51
51
  "client-only": "^0.0.1",
52
52
  "server-only": "^0.0.1"
53
53
  },