@valbuild/next 0.42.0 → 0.43.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.
|
@@ -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
|
-
|
|
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; }
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"next",
|
|
9
9
|
"react"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.43.1",
|
|
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.
|
|
49
|
-
"@valbuild/react": "~0.
|
|
50
|
-
"@valbuild/server": "~0.
|
|
48
|
+
"@valbuild/core": "~0.43.1",
|
|
49
|
+
"@valbuild/react": "~0.43.1",
|
|
50
|
+
"@valbuild/server": "~0.43.1",
|
|
51
51
|
"client-only": "^0.0.1",
|
|
52
52
|
"server-only": "^0.0.1"
|
|
53
53
|
},
|