@valbuild/next 0.124.0 → 0.126.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.
- package/CHANGELOG.md +212 -0
- package/README.md +19 -16
- package/dist/{ValApp-18ec7215.cjs.dev.js → ValApp-294e5b53.cjs.dev.js} +9 -6
- package/dist/{ValApp-6d5f5c82.esm.js → ValApp-3a70afe1.esm.js} +9 -6
- package/dist/ValApp-ab8a96fd.cjs.js +7 -0
- package/dist/{ValApp-b852b147.cjs.prod.js → ValApp-ab8a96fd.cjs.prod.js} +9 -6
- package/dist/declarations/src/initVal.d.ts +53 -4
- package/dist/valbuild-next.cjs.dev.js +2 -2
- package/dist/valbuild-next.cjs.prod.js +2 -2
- package/dist/valbuild-next.esm.js +2 -2
- package/dist/version-7b12f65c.cjs.dev.js +94 -0
- package/dist/version-ed4739ee.cjs.prod.js +94 -0
- package/dist/version-f8b10637.esm.js +92 -0
- package/package.json +8 -8
- package/rsc/dist/valbuild-next-rsc.cjs.dev.js +1 -1
- package/rsc/dist/valbuild-next-rsc.cjs.prod.js +1 -1
- package/rsc/dist/valbuild-next-rsc.esm.js +1 -1
- package/server/dist/valbuild-next-server.cjs.dev.js +1 -1
- package/server/dist/valbuild-next-server.cjs.prod.js +1 -1
- package/server/dist/valbuild-next-server.esm.js +1 -1
- package/dist/ValApp-b852b147.cjs.js +0 -7
- package/dist/version-16f6b0ce.esm.js +0 -10
- package/dist/version-d034b2fc.cjs.dev.js +0 -12
- package/dist/version-d2061026.cjs.prod.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,217 @@
|
|
|
1
1
|
# @valbuild/next
|
|
2
2
|
|
|
3
|
+
## 0.126.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#652](https://github.com/valbuild/val/pull/652) [`f2fe70d`](https://github.com/valbuild/val/commit/f2fe70dab2b65000dfaf289f09c70b4a8291467a) Thanks [@freekh](https://github.com/freekh)! - `s.union` is now `s.discriminatedUnion` and `s.enum`.
|
|
8
|
+
|
|
9
|
+
`s.union` did two unrelated jobs and worked out which one you meant from its
|
|
10
|
+
first argument: a string key meant a tagged union of objects, literal schemas
|
|
11
|
+
meant a set of allowed strings. Those are now two schemas with two names.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
// A fixed set of strings — presents as a dropdown
|
|
15
|
+
s.enum("primary", "secondary", "ghost"); // Schema<"primary" | "secondary" | "ghost">
|
|
16
|
+
|
|
17
|
+
// One of several object shapes, told apart by a tag field
|
|
18
|
+
s.discriminatedUnion(
|
|
19
|
+
"type",
|
|
20
|
+
s.object({ type: s.literal("hero"), heading: s.string() }),
|
|
21
|
+
s.object({ type: s.literal("quote"), text: s.string() }),
|
|
22
|
+
);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`s.enum` takes the strings directly, so the `s.literal(...)` wrapper is gone.
|
|
26
|
+
|
|
27
|
+
**`s.union` still works** — it is deprecated, and it builds exactly the schema
|
|
28
|
+
above, so nothing has to change today:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
s.union(s.literal("one"), s.literal("two")); // → s.enum("one", "two")
|
|
32
|
+
s.union("type", pageA, pageB); // → s.discriminatedUnion("type", pageA, pageB)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The two are different kinds of node, and that is the reason for the split. A
|
|
36
|
+
discriminated union is a container: the selected variant's fields are the fields
|
|
37
|
+
being edited, and everything that walks a schema descends through it. An enum is
|
|
38
|
+
a leaf — a string with a closed domain — so nothing recurses into it. Told apart
|
|
39
|
+
only by the shape of `key`, every consumer had to re-derive which one it was
|
|
40
|
+
holding; each now has its own serialized type (`"discriminated-union"` and
|
|
41
|
+
`"enum"`) and Val Studio has a field per kind rather than one field that
|
|
42
|
+
branches.
|
|
43
|
+
|
|
44
|
+
Two behaviour changes fall out of the split, both of them fixes:
|
|
45
|
+
|
|
46
|
+
- A value that is not a string at all now fails an enum's validation with a
|
|
47
|
+
type error. `s.union` of literals only ever checked the value against its
|
|
48
|
+
literals when the value WAS a string, so a number or an object where an enum
|
|
49
|
+
was declared validated clean.
|
|
50
|
+
- An enum field now shows its validation errors in Val Studio where the field
|
|
51
|
+
is opened on its own — the module editor and the canvas's fields column — and
|
|
52
|
+
gets the compact error layout inside an inline list row. It is a leaf now, so
|
|
53
|
+
it goes through the same error rendering as every other leaf field; the string
|
|
54
|
+
union bypassed it and showed nothing in those places.
|
|
55
|
+
|
|
56
|
+
Several latent crashes in the old `s.union` are fixed on the way past, all of
|
|
57
|
+
them cases where it threw a `TypeError` instead of reporting:
|
|
58
|
+
|
|
59
|
+
- A required discriminated union holding `null` now reports a type error rather
|
|
60
|
+
than throwing, and resolving a path underneath a nullable one that is `null`
|
|
61
|
+
gives the error the API promises instead of a crash.
|
|
62
|
+
- `s.literal("")` is a legal discriminator tag, and `s.enum("")` a legal value.
|
|
63
|
+
Both used to be treated as absent by a truthiness check — in path resolution,
|
|
64
|
+
in stega encoding, and in the message that lists a union's valid tags. The
|
|
65
|
+
editor's dropdowns handle them too: an empty value is reserved by the select
|
|
66
|
+
component and had to be mapped around.
|
|
67
|
+
- A variant that omits the discriminator entirely is now reported as the schema
|
|
68
|
+
error it is, instead of throwing while the check looked for it.
|
|
69
|
+
- An enum's value is now indexed for search, like every other string leaf. The
|
|
70
|
+
old string union was never indexed at all, so searching for one of its values
|
|
71
|
+
could not find the field.
|
|
72
|
+
- A nullable discriminated union set to `null` no longer renders a spinner that
|
|
73
|
+
never resolves.
|
|
74
|
+
|
|
75
|
+
`s.discriminatedUnion` also requires at least one variant, as `s.enum` requires
|
|
76
|
+
at least one value: a union with nothing to select is not a thing to write, and
|
|
77
|
+
everything downstream reads the first variant where it needs any.
|
|
78
|
+
|
|
79
|
+
If you read serialized schemas yourself, that is the breaking part: `type` is no
|
|
80
|
+
longer `"union"`, an enum carries `values: string[]` instead of a `key` plus
|
|
81
|
+
`items` of literal schemas, and `UnionSchema` is no longer a class.
|
|
82
|
+
`SerializedUnionSchema`, `SerializedStringUnionSchema`,
|
|
83
|
+
`SerializedObjectUnionSchema` and `UnionSchema` remain as deprecated type
|
|
84
|
+
aliases.
|
|
85
|
+
|
|
86
|
+
- [#661](https://github.com/valbuild/val/pull/661) [`171208a`](https://github.com/valbuild/val/commit/171208a20177e68ed5a8b1a6fdaabfe893a6aa5f) Thanks [@freekh](https://github.com/freekh)! - Every schema method now has a worked `@example` in its JSDoc, so hovering it in
|
|
87
|
+
your editor shows what to write.
|
|
88
|
+
|
|
89
|
+
That covers the whole builder surface — `.describe()`, `.validate()`,
|
|
90
|
+
`.nullable()`, `.readonly()`, `.hidden()`, `.preview()`, `.render()`, and the
|
|
91
|
+
per-type methods such as `.minLength()`, `.regexp()`, `.raw()`, `.multiline()`,
|
|
92
|
+
`.from()` / `.to()`, `.remote()`, `.jsonValues()` and `.external()` — as well as
|
|
93
|
+
`c.define()`, `c.json()`, `c.external()` and the `val` helpers (`val.attrs`,
|
|
94
|
+
`val.raw`, `val.unstable_getPath` and friends).
|
|
95
|
+
|
|
96
|
+
One of the examples corrected a real trap: a custom validator returns
|
|
97
|
+
`false | string`, so the natural-looking
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
s.string().validate((val) => val.trim() === val || "No surrounding spaces");
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
does not type check — `||` yields `true`, and `true` is not one of the two
|
|
104
|
+
answers. Write it as a ternary instead:
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
s.string().validate((val) =>
|
|
108
|
+
val.trim() === val ? false : "No surrounding spaces",
|
|
109
|
+
);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The examples are checked in CI, not just written: one test asks the TypeScript
|
|
113
|
+
checker for the doc each method actually resolves to and fails if it has no
|
|
114
|
+
`@example`, and another compiles every example it finds.
|
|
115
|
+
|
|
116
|
+
- Updated dependencies [[`719ad6b`](https://github.com/valbuild/val/commit/719ad6b607bcf136d0dbde9e90bf4b8a843561a4), [`9830277`](https://github.com/valbuild/val/commit/9830277e9aaca8da3030f629c2656ec58da47e45), [`64bfd0a`](https://github.com/valbuild/val/commit/64bfd0a6c85832ea5169b53e47087f22e193df36), [`7782979`](https://github.com/valbuild/val/commit/7782979e9b52f2015a6e72dc981e630d4f8c78e2), [`5bfd630`](https://github.com/valbuild/val/commit/5bfd630b63dee2189e238f20fe72ecc5537160f7), [`ccbcda6`](https://github.com/valbuild/val/commit/ccbcda60b3e3c465071229ae1ba28ac735483e63), [`f2fe70d`](https://github.com/valbuild/val/commit/f2fe70dab2b65000dfaf289f09c70b4a8291467a), [`5c18c99`](https://github.com/valbuild/val/commit/5c18c99ecc84651f82123481fc042063db953833), [`755e1a3`](https://github.com/valbuild/val/commit/755e1a3953775cb8d2c2dce87d6810d3dc329640), [`c6b1ec8`](https://github.com/valbuild/val/commit/c6b1ec84f1883750a4cfe5f70470b177621e971f), [`656f680`](https://github.com/valbuild/val/commit/656f680043c640f678625a64e690389ab23a0a69), [`610a041`](https://github.com/valbuild/val/commit/610a0414b120b521f38a2eb1182b3778bf778b2b), [`171208a`](https://github.com/valbuild/val/commit/171208a20177e68ed5a8b1a6fdaabfe893a6aa5f)]:
|
|
117
|
+
- @valbuild/ui@0.126.0
|
|
118
|
+
- @valbuild/shared@0.126.0
|
|
119
|
+
- @valbuild/server@0.126.0
|
|
120
|
+
- @valbuild/core@0.126.0
|
|
121
|
+
- @valbuild/react@0.126.0
|
|
122
|
+
- @valbuild/language-server@0.126.0
|
|
123
|
+
- @valbuild/mcp@0.126.0
|
|
124
|
+
|
|
125
|
+
## 0.125.0
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- [#638](https://github.com/valbuild/val/pull/638) [`c390397`](https://github.com/valbuild/val/commit/c390397cb5e203eb1bedae3a6fab15726e850b90) Thanks [@freekh](https://github.com/freekh)! - Val now runs on TanStack Start.
|
|
130
|
+
|
|
131
|
+
`@valbuild/tanstack` is a new package with everything `@valbuild/next` has: Val
|
|
132
|
+
Studio at `/val`, the on-page overlay and canvas, draft mode, the client hooks,
|
|
133
|
+
server-side content reads, images, and the MCP tools.
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
npm install @valbuild/tanstack
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
// val.config.ts
|
|
141
|
+
import { initVal } from "@valbuild/tanstack";
|
|
142
|
+
const { s, c, config, tanstackRouter } = initVal({ project: "org/project" });
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Routes are first class.** A Val module for a route is named after the route
|
|
146
|
+
file it sits beside — `src/routes/posts.$postId.tsx` is served content by
|
|
147
|
+
`src/routes/posts.$postId.val.ts` — and its keys are the URLs that route serves:
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
export default c.define(
|
|
151
|
+
"/src/routes/posts.$postId.val.ts",
|
|
152
|
+
s.router(tanstackRouter, s.object({ title: s.string() })),
|
|
153
|
+
{ "/posts/hello-world": { title: "Hello world" } },
|
|
154
|
+
);
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`.` and `/` both separate segments, `$param` is a parameter, `$` is a splat, and
|
|
158
|
+
`index`, `route`, `(groups)` and `_pathless` layouts add no URL segment — the
|
|
159
|
+
same rules TanStack Router uses for the route file itself. Val validates every
|
|
160
|
+
key against that pattern, and Val Studio shows these modules as a sitemap under
|
|
161
|
+
**Pages**, where an editor can add a page.
|
|
162
|
+
|
|
163
|
+
Point the route generator away from your content files, in `vite.config.ts` and
|
|
164
|
+
`tsr.config.json`:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
tanstackStart({ router: { routeFileIgnorePattern: "\\.val\\.[tj]sx?$" } });
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
See the [README](https://github.com/valbuild/val/blob/main/packages/tanstack/README.md)
|
|
171
|
+
for the full wiring, and `examples/tanstack` for a working app.
|
|
172
|
+
|
|
173
|
+
**Also fixed, for everyone:** `Internal.VERSION.core` was `null` in any ESM
|
|
174
|
+
bundle — it was read with `require("../package.json")` inside a `try`, so the
|
|
175
|
+
failure was silent. That version goes into every remote file ref and proxy mode
|
|
176
|
+
refuses to start without it. Every package now reads its version through a
|
|
177
|
+
static JSON import, which is inlined at build time.
|
|
178
|
+
|
|
179
|
+
Two smaller fixes that came out of running the whole toolchain against a
|
|
180
|
+
TanStack project:
|
|
181
|
+
|
|
182
|
+
- `val versions` reports `@valbuild/tanstack`, and `val debug` writes a snapshot
|
|
183
|
+
that names whichever framework package the captured project actually has.
|
|
184
|
+
- `@valbuild/eslint-plugin` reads a `tsconfig.json` that has comments in it. A
|
|
185
|
+
tsconfig is JSONC, and `JSON.parse` is not — so on any project whose tsconfig
|
|
186
|
+
carries a comment (the TanStack starter's does) the
|
|
187
|
+
`module-in-val-modules` rule threw `Expected double-quoted property name in
|
|
188
|
+
JSON` on the first file and took the whole lint run with it.
|
|
189
|
+
|
|
190
|
+
Three fixes found by driving the Studio against a real TanStack app:
|
|
191
|
+
|
|
192
|
+
- **A draft image now loads on the page.** The source the Studio pushes to the
|
|
193
|
+
host page carries `patch_id` for any file whose bytes are still in a patch, so
|
|
194
|
+
the page asks `/api/val/files/...?patch_id=` rather than a `/public` path that
|
|
195
|
+
nothing has written yet. This was silent — the image just did not appear — and
|
|
196
|
+
it affects any page that reads media through the hooks rather than on the
|
|
197
|
+
server, `@valbuild/next` included.
|
|
198
|
+
- **A splat route no longer logs an error on every render.** TanStack returns
|
|
199
|
+
both `_splat` and `*` for the same parameter; Val reported the second as a
|
|
200
|
+
parameter it could not place in the path.
|
|
201
|
+
- The TanStack example and starter render a 404 page instead of throwing
|
|
202
|
+
`notFound()` from a component, which escaped to the error boundary and logged
|
|
203
|
+
`Error in renderToReadableStream` (and, with no not-found component
|
|
204
|
+
configured, aborted the response) on every miss.
|
|
205
|
+
|
|
206
|
+
- Updated dependencies [[`22f78b4`](https://github.com/valbuild/val/commit/22f78b471fd18e542f518f72b75bd472d7c3dc52), [`c390397`](https://github.com/valbuild/val/commit/c390397cb5e203eb1bedae3a6fab15726e850b90)]:
|
|
207
|
+
- @valbuild/language-server@0.125.0
|
|
208
|
+
- @valbuild/core@0.125.0
|
|
209
|
+
- @valbuild/shared@0.125.0
|
|
210
|
+
- @valbuild/ui@0.125.0
|
|
211
|
+
- @valbuild/mcp@0.125.0
|
|
212
|
+
- @valbuild/react@0.125.0
|
|
213
|
+
- @valbuild/server@0.125.0
|
|
214
|
+
|
|
3
215
|
## 0.124.0
|
|
4
216
|
|
|
5
217
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -571,7 +571,7 @@ const sectionsSchema = s.array(
|
|
|
571
571
|
);
|
|
572
572
|
```
|
|
573
573
|
|
|
574
|
-
A
|
|
574
|
+
A discriminated union with no preview of its own previews as the VARIANT the value
|
|
575
575
|
takes, so a page-builder list previews each block by its own block type.
|
|
576
576
|
|
|
577
577
|
Your function is run on demand, for the rows actually on screen, so it is fine
|
|
@@ -909,20 +909,16 @@ const image = useVal(imageVal);
|
|
|
909
909
|
return <img src={image.url} />;
|
|
910
910
|
```
|
|
911
911
|
|
|
912
|
-
## Union
|
|
912
|
+
## Discriminated Union
|
|
913
913
|
|
|
914
|
-
|
|
914
|
+
A discriminated union is a union of objects which all have the same field (of the same type). This field determines (or "discriminates") which of the union's types a value is.
|
|
915
915
|
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
A tagged union is a union of objects which all have the same field (of the same type). This field can be used to determine (or "discriminate") the exact type of one of the types of the union.
|
|
919
|
-
|
|
920
|
-
It is useful when editors should be able to chose from a set of objects that are different.
|
|
916
|
+
It is useful when editors should be able to choose from a set of objects that are different.
|
|
921
917
|
|
|
922
918
|
Example: let us say you have a page that can be one of the following: blog (page) or product (page). In this case your schema could look like this:
|
|
923
919
|
|
|
924
920
|
```ts
|
|
925
|
-
s.
|
|
921
|
+
s.discriminatedUnion(
|
|
926
922
|
"type", // the key of the "discriminator"
|
|
927
923
|
s.object({
|
|
928
924
|
type: s.literal("blogPage"), // <- each type must have a UNIQUE value
|
|
@@ -937,16 +933,23 @@ s.union(
|
|
|
937
933
|
); // <- Schema<{ type: "blogPage", author: string } | { type: "productPage", sku: number }>
|
|
938
934
|
```
|
|
939
935
|
|
|
940
|
-
##
|
|
936
|
+
## Enum
|
|
937
|
+
|
|
938
|
+
Use `s.enum` for a fixed set of strings. It gives you a type-safe way to describe the valid values an editor can choose from, and it presents as a dropdown in Val Studio.
|
|
939
|
+
|
|
940
|
+
```ts
|
|
941
|
+
s.enum("one", "two"); // <- Schema<"one" | "two">
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
### `s.union` is deprecated
|
|
941
945
|
|
|
942
|
-
|
|
946
|
+
`s.union` did both of these jobs, deciding which one you meant from its first
|
|
947
|
+
argument. It still works, and produces exactly the schemas above, but name the
|
|
948
|
+
one you mean instead:
|
|
943
949
|
|
|
944
950
|
```ts
|
|
945
|
-
s.union(
|
|
946
|
-
|
|
947
|
-
s.literal("two"),
|
|
948
|
-
//...
|
|
949
|
-
); // <- Schema<"one" | "two">
|
|
951
|
+
s.union(s.literal("one"), s.literal("two")); // -> s.enum("one", "two")
|
|
952
|
+
s.union("type", pageA, pageB); // -> s.discriminatedUnion("type", pageA, pageB)
|
|
950
953
|
```
|
|
951
954
|
|
|
952
955
|
## KeyOf
|
|
@@ -17,6 +17,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
|
|
|
17
17
|
|
|
18
18
|
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
19
19
|
|
|
20
|
+
var VAL_READY_PING_MS = 100;
|
|
20
21
|
var ValApp = function ValApp(_ref) {
|
|
21
22
|
var config = _ref.config,
|
|
22
23
|
children = _ref.children;
|
|
@@ -35,7 +36,7 @@ var ValApp = function ValApp(_ref) {
|
|
|
35
36
|
window.parent.postMessage({
|
|
36
37
|
type: "val-ready"
|
|
37
38
|
}, "*");
|
|
38
|
-
});
|
|
39
|
+
}, VAL_READY_PING_MS);
|
|
39
40
|
return function () {
|
|
40
41
|
clearInterval(interval);
|
|
41
42
|
};
|
|
@@ -80,17 +81,19 @@ var ValApp = function ValApp(_ref) {
|
|
|
80
81
|
body.style.backgroundColor = loadingTheme === "dark" ? darkBg : lightBg;
|
|
81
82
|
body.style.minHeight = "100vh";
|
|
82
83
|
body.style.minWidth = "100%";
|
|
83
|
-
|
|
84
|
+
// A stable reference: `removeEventListener` compares by identity, so a
|
|
85
|
+
// second arrow function removes nothing and every re-run of this effect
|
|
86
|
+
// used to leave another listener behind.
|
|
87
|
+
var onCssLoaded = function onCssLoaded() {
|
|
84
88
|
// css was loaded, has been loaded, so let app decide what to do
|
|
85
89
|
setLoadingTheme(null);
|
|
86
|
-
}
|
|
90
|
+
};
|
|
91
|
+
window.addEventListener("val-css-loaded", onCssLoaded);
|
|
87
92
|
return function () {
|
|
88
93
|
body.style.backgroundColor = prevBodyBg;
|
|
89
94
|
body.style.minHeight = prevBodyMinHeight;
|
|
90
95
|
body.style.minWidth = prevBodyMinWidth;
|
|
91
|
-
window.removeEventListener("val-css-loaded",
|
|
92
|
-
setLoadingTheme(null);
|
|
93
|
-
});
|
|
96
|
+
window.removeEventListener("val-css-loaded", onCssLoaded);
|
|
94
97
|
};
|
|
95
98
|
}, [inMessageMode, loadingTheme]);
|
|
96
99
|
if (loadingTheme !== null && isClientSIde) {
|
|
@@ -9,6 +9,7 @@ import './unsupportedIterableToArray-5baabfdc.esm.js';
|
|
|
9
9
|
import '@valbuild/shared/client';
|
|
10
10
|
import '@valbuild/core';
|
|
11
11
|
|
|
12
|
+
var VAL_READY_PING_MS = 100;
|
|
12
13
|
var ValApp = function ValApp(_ref) {
|
|
13
14
|
var config = _ref.config,
|
|
14
15
|
children = _ref.children;
|
|
@@ -27,7 +28,7 @@ var ValApp = function ValApp(_ref) {
|
|
|
27
28
|
window.parent.postMessage({
|
|
28
29
|
type: "val-ready"
|
|
29
30
|
}, "*");
|
|
30
|
-
});
|
|
31
|
+
}, VAL_READY_PING_MS);
|
|
31
32
|
return function () {
|
|
32
33
|
clearInterval(interval);
|
|
33
34
|
};
|
|
@@ -72,17 +73,19 @@ var ValApp = function ValApp(_ref) {
|
|
|
72
73
|
body.style.backgroundColor = loadingTheme === "dark" ? darkBg : lightBg;
|
|
73
74
|
body.style.minHeight = "100vh";
|
|
74
75
|
body.style.minWidth = "100%";
|
|
75
|
-
|
|
76
|
+
// A stable reference: `removeEventListener` compares by identity, so a
|
|
77
|
+
// second arrow function removes nothing and every re-run of this effect
|
|
78
|
+
// used to leave another listener behind.
|
|
79
|
+
var onCssLoaded = function onCssLoaded() {
|
|
76
80
|
// css was loaded, has been loaded, so let app decide what to do
|
|
77
81
|
setLoadingTheme(null);
|
|
78
|
-
}
|
|
82
|
+
};
|
|
83
|
+
window.addEventListener("val-css-loaded", onCssLoaded);
|
|
79
84
|
return function () {
|
|
80
85
|
body.style.backgroundColor = prevBodyBg;
|
|
81
86
|
body.style.minHeight = prevBodyMinHeight;
|
|
82
87
|
body.style.minWidth = prevBodyMinWidth;
|
|
83
|
-
window.removeEventListener("val-css-loaded",
|
|
84
|
-
setLoadingTheme(null);
|
|
85
|
-
});
|
|
88
|
+
window.removeEventListener("val-css-loaded", onCssLoaded);
|
|
86
89
|
};
|
|
87
90
|
}, [inMessageMode, loadingTheme]);
|
|
88
91
|
if (loadingTheme !== null && isClientSIde) {
|
|
@@ -17,6 +17,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
|
|
|
17
17
|
|
|
18
18
|
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
19
19
|
|
|
20
|
+
var VAL_READY_PING_MS = 100;
|
|
20
21
|
var ValApp = function ValApp(_ref) {
|
|
21
22
|
var config = _ref.config,
|
|
22
23
|
children = _ref.children;
|
|
@@ -35,7 +36,7 @@ var ValApp = function ValApp(_ref) {
|
|
|
35
36
|
window.parent.postMessage({
|
|
36
37
|
type: "val-ready"
|
|
37
38
|
}, "*");
|
|
38
|
-
});
|
|
39
|
+
}, VAL_READY_PING_MS);
|
|
39
40
|
return function () {
|
|
40
41
|
clearInterval(interval);
|
|
41
42
|
};
|
|
@@ -80,17 +81,19 @@ var ValApp = function ValApp(_ref) {
|
|
|
80
81
|
body.style.backgroundColor = loadingTheme === "dark" ? darkBg : lightBg;
|
|
81
82
|
body.style.minHeight = "100vh";
|
|
82
83
|
body.style.minWidth = "100%";
|
|
83
|
-
|
|
84
|
+
// A stable reference: `removeEventListener` compares by identity, so a
|
|
85
|
+
// second arrow function removes nothing and every re-run of this effect
|
|
86
|
+
// used to leave another listener behind.
|
|
87
|
+
var onCssLoaded = function onCssLoaded() {
|
|
84
88
|
// css was loaded, has been loaded, so let app decide what to do
|
|
85
89
|
setLoadingTheme(null);
|
|
86
|
-
}
|
|
90
|
+
};
|
|
91
|
+
window.addEventListener("val-css-loaded", onCssLoaded);
|
|
87
92
|
return function () {
|
|
88
93
|
body.style.backgroundColor = prevBodyBg;
|
|
89
94
|
body.style.minHeight = prevBodyMinHeight;
|
|
90
95
|
body.style.minWidth = prevBodyMinWidth;
|
|
91
|
-
window.removeEventListener("val-css-loaded",
|
|
92
|
-
setLoadingTheme(null);
|
|
93
|
-
});
|
|
96
|
+
window.removeEventListener("val-css-loaded", onCssLoaded);
|
|
94
97
|
};
|
|
95
98
|
}, [inMessageMode, loadingTheme]);
|
|
96
99
|
if (loadingTheme !== null && isClientSIde) {
|
|
@@ -26,6 +26,10 @@ export declare const initVal: (config?: ValConfig) => InitVal & {
|
|
|
26
26
|
* cache for every route it covers, for all visitors. It is NOT needed for
|
|
27
27
|
* the `suspend` prop on ValProvider (which detects the cookie client-side)
|
|
28
28
|
* — reserve it for advanced server-side conditionals.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // In a Server Component, a Server Action or a Route Handler:
|
|
32
|
+
* const enabled = await isValEnabled();
|
|
29
33
|
*/
|
|
30
34
|
isValEnabled: typeof isValEnabled;
|
|
31
35
|
val: ValConstructor & {
|
|
@@ -40,10 +44,22 @@ export declare const initVal: (config?: ValConfig) => InitVal & {
|
|
|
40
44
|
*
|
|
41
45
|
* This method is primarily intended for tooling and other advanced use cases
|
|
42
46
|
* outside of the actual application.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* import pageVal from "./page.val";
|
|
50
|
+
* const page = val.unstable_getUnpatchedUnencodedVal(pageVal);
|
|
43
51
|
*/
|
|
44
52
|
unstable_getUnpatchedUnencodedVal: typeof getUnpatchedUnencodedVal;
|
|
45
53
|
/**
|
|
46
54
|
* Convert any object that is encoded with Val stega encoding back to the original values
|
|
55
|
+
*
|
|
56
|
+
* Use it wherever an encoded string would break something: a `key`, a
|
|
57
|
+
* comparison, a URL, anything sent to an API.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* import pageVal from "./page.val";
|
|
61
|
+
* const page = useVal(pageVal);
|
|
62
|
+
* const slug = val.raw(page.slug);
|
|
47
63
|
*/
|
|
48
64
|
raw: typeof raw;
|
|
49
65
|
/**
|
|
@@ -52,12 +68,30 @@ export declare const initVal: (config?: ValConfig) => InitVal & {
|
|
|
52
68
|
* This is typically used to manually set the data-val-path attribute for visual editing on any element.
|
|
53
69
|
*
|
|
54
70
|
* @example
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
71
|
+
* import pageVal from "./page.val";
|
|
72
|
+
* function PageLink() {
|
|
73
|
+
* const page = useVal(pageVal);
|
|
74
|
+
* return (
|
|
75
|
+
* <a href={page.url.href} {...val.attrs(page)}>
|
|
76
|
+
* {page.url.label}
|
|
77
|
+
* </a>
|
|
78
|
+
* );
|
|
79
|
+
* }
|
|
59
80
|
*/
|
|
60
81
|
attrs: typeof attrs;
|
|
82
|
+
/**
|
|
83
|
+
* The Val paths encoded into a single stega encoded string, or `undefined`
|
|
84
|
+
* when there are none.
|
|
85
|
+
*
|
|
86
|
+
* `val.attrs` is what an element usually wants; this is the lower-level
|
|
87
|
+
* read, for when you need the paths themselves. Unstable: the shape of a
|
|
88
|
+
* path is not part of the public API yet.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* import pageVal from "./page.val";
|
|
92
|
+
* const page = useVal(pageVal);
|
|
93
|
+
* const paths = val.unstable_decodeValPathsOfString(page.title);
|
|
94
|
+
*/
|
|
61
95
|
unstable_decodeValPathsOfString: typeof decodeValPathsOfString;
|
|
62
96
|
};
|
|
63
97
|
/**
|
|
@@ -73,6 +107,21 @@ export declare const initVal: (config?: ValConfig) => InitVal & {
|
|
|
73
107
|
* });
|
|
74
108
|
*/
|
|
75
109
|
nextAppRouter: ValRouter;
|
|
110
|
+
/**
|
|
111
|
+
* A router for pages that are NOT in this application: the keys of the record
|
|
112
|
+
* are whole URLs, not route paths of your site.
|
|
113
|
+
*
|
|
114
|
+
* It is what `s.route()` links to when the destination is somewhere else -
|
|
115
|
+
* a campaign site, a docs host, a social profile.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* const links = s.record(s.object({ title: s.string() }));
|
|
119
|
+
* export default c.define(
|
|
120
|
+
* "/content/external.val.ts",
|
|
121
|
+
* links.router(externalPageRouter),
|
|
122
|
+
* { "https://val.build": { title: "Val" } },
|
|
123
|
+
* );
|
|
124
|
+
*/
|
|
76
125
|
externalPageRouter: ValRouter;
|
|
77
126
|
};
|
|
78
127
|
export {};
|
|
@@ -10,9 +10,9 @@ var internal = require('@valbuild/react/internal');
|
|
|
10
10
|
var ValNextProvider = require('./ValNextProvider-062a8dc9.cjs.dev.js');
|
|
11
11
|
var NextImage = require('next/image');
|
|
12
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
-
var ValApp = require('./ValApp-
|
|
13
|
+
var ValApp = require('./ValApp-294e5b53.cjs.dev.js');
|
|
14
14
|
var ValModulesClient = require('./ValModulesClient-4ecabf99.cjs.dev.js');
|
|
15
|
-
var version = require('./version-
|
|
15
|
+
var version = require('./version-7b12f65c.cjs.dev.js');
|
|
16
16
|
var createForOfIteratorHelper = require('./createForOfIteratorHelper-0445603c.cjs.dev.js');
|
|
17
17
|
require('./defineProperty-f90345d7.cjs.dev.js');
|
|
18
18
|
require('./unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
|
|
@@ -10,9 +10,9 @@ var internal = require('@valbuild/react/internal');
|
|
|
10
10
|
var ValNextProvider = require('./ValNextProvider-da189afe.cjs.prod.js');
|
|
11
11
|
var NextImage = require('next/image');
|
|
12
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
-
var ValApp = require('./ValApp-
|
|
13
|
+
var ValApp = require('./ValApp-ab8a96fd.cjs.prod.js');
|
|
14
14
|
var ValModulesClient = require('./ValModulesClient-10c0721c.cjs.prod.js');
|
|
15
|
-
var version = require('./version-
|
|
15
|
+
var version = require('./version-ed4739ee.cjs.prod.js');
|
|
16
16
|
var createForOfIteratorHelper = require('./createForOfIteratorHelper-d4afcad8.cjs.prod.js');
|
|
17
17
|
require('./defineProperty-8951f469.cjs.prod.js');
|
|
18
18
|
require('./unsupportedIterableToArray-0d2087a2.cjs.prod.js');
|
|
@@ -9,9 +9,9 @@ export { ValRichText } from '@valbuild/react/internal';
|
|
|
9
9
|
import { ValNextProvider } from './ValNextProvider-3d2cd7e4.esm.js';
|
|
10
10
|
import NextImage from 'next/image';
|
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
|
12
|
-
export { ValApp } from './ValApp-
|
|
12
|
+
export { ValApp } from './ValApp-3a70afe1.esm.js';
|
|
13
13
|
export { ValModulesClient, useRegisterValModules } from './ValModulesClient-0dd601a1.esm.js';
|
|
14
|
-
import { V as VERSION } from './version-
|
|
14
|
+
import { V as VERSION } from './version-f8b10637.esm.js';
|
|
15
15
|
import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
|
|
16
16
|
import './defineProperty-cca5affa.esm.js';
|
|
17
17
|
import './unsupportedIterableToArray-5baabfdc.esm.js';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageJson = {
|
|
4
|
+
name: "@valbuild/next",
|
|
5
|
+
description: "Val NextJS: hard-coded content - super-charged",
|
|
6
|
+
"private": false,
|
|
7
|
+
repository: {
|
|
8
|
+
type: "git",
|
|
9
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
10
|
+
},
|
|
11
|
+
sideEffects: true,
|
|
12
|
+
keywords: [
|
|
13
|
+
"CMS",
|
|
14
|
+
"next",
|
|
15
|
+
"react"
|
|
16
|
+
],
|
|
17
|
+
version: "0.126.0",
|
|
18
|
+
scripts: {
|
|
19
|
+
typecheck: "tsc --noEmit",
|
|
20
|
+
test: "jest"
|
|
21
|
+
},
|
|
22
|
+
main: "dist/valbuild-next.cjs.js",
|
|
23
|
+
module: "dist/valbuild-next.esm.js",
|
|
24
|
+
exports: {
|
|
25
|
+
".": {
|
|
26
|
+
module: "./dist/valbuild-next.esm.js",
|
|
27
|
+
"default": "./dist/valbuild-next.cjs.js"
|
|
28
|
+
},
|
|
29
|
+
"./rsc": {
|
|
30
|
+
module: "./rsc/dist/valbuild-next-rsc.esm.js",
|
|
31
|
+
"default": "./rsc/dist/valbuild-next-rsc.cjs.js"
|
|
32
|
+
},
|
|
33
|
+
"./client": {
|
|
34
|
+
module: "./client/dist/valbuild-next-client.esm.js",
|
|
35
|
+
"default": "./client/dist/valbuild-next-client.cjs.js"
|
|
36
|
+
},
|
|
37
|
+
"./server": {
|
|
38
|
+
module: "./server/dist/valbuild-next-server.esm.js",
|
|
39
|
+
"default": "./server/dist/valbuild-next-server.cjs.js"
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
types: "dist/valbuild-next.cjs.d.ts",
|
|
44
|
+
preconstruct: {
|
|
45
|
+
entrypoints: [
|
|
46
|
+
"./index.ts",
|
|
47
|
+
"./server/index.ts",
|
|
48
|
+
"./client/index.ts",
|
|
49
|
+
"./rsc/index.ts"
|
|
50
|
+
],
|
|
51
|
+
exports: true
|
|
52
|
+
},
|
|
53
|
+
dependencies: {
|
|
54
|
+
"@valbuild/core": "workspace:*",
|
|
55
|
+
"@valbuild/language-server": "workspace:*",
|
|
56
|
+
"@valbuild/mcp": "workspace:*",
|
|
57
|
+
"@valbuild/react": "workspace:*",
|
|
58
|
+
"@valbuild/server": "workspace:*",
|
|
59
|
+
"@valbuild/shared": "workspace:*",
|
|
60
|
+
"@valbuild/ui": "workspace:*",
|
|
61
|
+
"client-only": "^0.0.1",
|
|
62
|
+
"server-only": "^0.0.1"
|
|
63
|
+
},
|
|
64
|
+
devDependencies: {
|
|
65
|
+
"@testing-library/react": "^16.3.3",
|
|
66
|
+
"@types/react": "^19.2.18",
|
|
67
|
+
"@types/react-dom": "^19.2.5",
|
|
68
|
+
"jest-environment-jsdom": "^30.5.0",
|
|
69
|
+
next: "^16.3.3",
|
|
70
|
+
react: "^19.2.8",
|
|
71
|
+
"react-dom": "^19.2.8",
|
|
72
|
+
typescript: "^6.0.3"
|
|
73
|
+
},
|
|
74
|
+
peerDependencies: {
|
|
75
|
+
next: ">=14.3.0",
|
|
76
|
+
react: ">=19.0.0",
|
|
77
|
+
"react-dom": ">=19.0.0"
|
|
78
|
+
},
|
|
79
|
+
externals: [
|
|
80
|
+
"next"
|
|
81
|
+
],
|
|
82
|
+
files: [
|
|
83
|
+
"CHANGELOG.md",
|
|
84
|
+
"dist",
|
|
85
|
+
"client",
|
|
86
|
+
"server",
|
|
87
|
+
"rsc"
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var _packageJson$version;
|
|
92
|
+
var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
|
|
93
|
+
|
|
94
|
+
exports.VERSION = VERSION;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageJson = {
|
|
4
|
+
name: "@valbuild/next",
|
|
5
|
+
description: "Val NextJS: hard-coded content - super-charged",
|
|
6
|
+
"private": false,
|
|
7
|
+
repository: {
|
|
8
|
+
type: "git",
|
|
9
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
10
|
+
},
|
|
11
|
+
sideEffects: true,
|
|
12
|
+
keywords: [
|
|
13
|
+
"CMS",
|
|
14
|
+
"next",
|
|
15
|
+
"react"
|
|
16
|
+
],
|
|
17
|
+
version: "0.126.0",
|
|
18
|
+
scripts: {
|
|
19
|
+
typecheck: "tsc --noEmit",
|
|
20
|
+
test: "jest"
|
|
21
|
+
},
|
|
22
|
+
main: "dist/valbuild-next.cjs.js",
|
|
23
|
+
module: "dist/valbuild-next.esm.js",
|
|
24
|
+
exports: {
|
|
25
|
+
".": {
|
|
26
|
+
module: "./dist/valbuild-next.esm.js",
|
|
27
|
+
"default": "./dist/valbuild-next.cjs.js"
|
|
28
|
+
},
|
|
29
|
+
"./rsc": {
|
|
30
|
+
module: "./rsc/dist/valbuild-next-rsc.esm.js",
|
|
31
|
+
"default": "./rsc/dist/valbuild-next-rsc.cjs.js"
|
|
32
|
+
},
|
|
33
|
+
"./client": {
|
|
34
|
+
module: "./client/dist/valbuild-next-client.esm.js",
|
|
35
|
+
"default": "./client/dist/valbuild-next-client.cjs.js"
|
|
36
|
+
},
|
|
37
|
+
"./server": {
|
|
38
|
+
module: "./server/dist/valbuild-next-server.esm.js",
|
|
39
|
+
"default": "./server/dist/valbuild-next-server.cjs.js"
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
types: "dist/valbuild-next.cjs.d.ts",
|
|
44
|
+
preconstruct: {
|
|
45
|
+
entrypoints: [
|
|
46
|
+
"./index.ts",
|
|
47
|
+
"./server/index.ts",
|
|
48
|
+
"./client/index.ts",
|
|
49
|
+
"./rsc/index.ts"
|
|
50
|
+
],
|
|
51
|
+
exports: true
|
|
52
|
+
},
|
|
53
|
+
dependencies: {
|
|
54
|
+
"@valbuild/core": "workspace:*",
|
|
55
|
+
"@valbuild/language-server": "workspace:*",
|
|
56
|
+
"@valbuild/mcp": "workspace:*",
|
|
57
|
+
"@valbuild/react": "workspace:*",
|
|
58
|
+
"@valbuild/server": "workspace:*",
|
|
59
|
+
"@valbuild/shared": "workspace:*",
|
|
60
|
+
"@valbuild/ui": "workspace:*",
|
|
61
|
+
"client-only": "^0.0.1",
|
|
62
|
+
"server-only": "^0.0.1"
|
|
63
|
+
},
|
|
64
|
+
devDependencies: {
|
|
65
|
+
"@testing-library/react": "^16.3.3",
|
|
66
|
+
"@types/react": "^19.2.18",
|
|
67
|
+
"@types/react-dom": "^19.2.5",
|
|
68
|
+
"jest-environment-jsdom": "^30.5.0",
|
|
69
|
+
next: "^16.3.3",
|
|
70
|
+
react: "^19.2.8",
|
|
71
|
+
"react-dom": "^19.2.8",
|
|
72
|
+
typescript: "^6.0.3"
|
|
73
|
+
},
|
|
74
|
+
peerDependencies: {
|
|
75
|
+
next: ">=14.3.0",
|
|
76
|
+
react: ">=19.0.0",
|
|
77
|
+
"react-dom": ">=19.0.0"
|
|
78
|
+
},
|
|
79
|
+
externals: [
|
|
80
|
+
"next"
|
|
81
|
+
],
|
|
82
|
+
files: [
|
|
83
|
+
"CHANGELOG.md",
|
|
84
|
+
"dist",
|
|
85
|
+
"client",
|
|
86
|
+
"server",
|
|
87
|
+
"rsc"
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var _packageJson$version;
|
|
92
|
+
var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
|
|
93
|
+
|
|
94
|
+
exports.VERSION = VERSION;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var packageJson = {
|
|
2
|
+
name: "@valbuild/next",
|
|
3
|
+
description: "Val NextJS: hard-coded content - super-charged",
|
|
4
|
+
"private": false,
|
|
5
|
+
repository: {
|
|
6
|
+
type: "git",
|
|
7
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
8
|
+
},
|
|
9
|
+
sideEffects: true,
|
|
10
|
+
keywords: [
|
|
11
|
+
"CMS",
|
|
12
|
+
"next",
|
|
13
|
+
"react"
|
|
14
|
+
],
|
|
15
|
+
version: "0.126.0",
|
|
16
|
+
scripts: {
|
|
17
|
+
typecheck: "tsc --noEmit",
|
|
18
|
+
test: "jest"
|
|
19
|
+
},
|
|
20
|
+
main: "dist/valbuild-next.cjs.js",
|
|
21
|
+
module: "dist/valbuild-next.esm.js",
|
|
22
|
+
exports: {
|
|
23
|
+
".": {
|
|
24
|
+
module: "./dist/valbuild-next.esm.js",
|
|
25
|
+
"default": "./dist/valbuild-next.cjs.js"
|
|
26
|
+
},
|
|
27
|
+
"./rsc": {
|
|
28
|
+
module: "./rsc/dist/valbuild-next-rsc.esm.js",
|
|
29
|
+
"default": "./rsc/dist/valbuild-next-rsc.cjs.js"
|
|
30
|
+
},
|
|
31
|
+
"./client": {
|
|
32
|
+
module: "./client/dist/valbuild-next-client.esm.js",
|
|
33
|
+
"default": "./client/dist/valbuild-next-client.cjs.js"
|
|
34
|
+
},
|
|
35
|
+
"./server": {
|
|
36
|
+
module: "./server/dist/valbuild-next-server.esm.js",
|
|
37
|
+
"default": "./server/dist/valbuild-next-server.cjs.js"
|
|
38
|
+
},
|
|
39
|
+
"./package.json": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
types: "dist/valbuild-next.cjs.d.ts",
|
|
42
|
+
preconstruct: {
|
|
43
|
+
entrypoints: [
|
|
44
|
+
"./index.ts",
|
|
45
|
+
"./server/index.ts",
|
|
46
|
+
"./client/index.ts",
|
|
47
|
+
"./rsc/index.ts"
|
|
48
|
+
],
|
|
49
|
+
exports: true
|
|
50
|
+
},
|
|
51
|
+
dependencies: {
|
|
52
|
+
"@valbuild/core": "workspace:*",
|
|
53
|
+
"@valbuild/language-server": "workspace:*",
|
|
54
|
+
"@valbuild/mcp": "workspace:*",
|
|
55
|
+
"@valbuild/react": "workspace:*",
|
|
56
|
+
"@valbuild/server": "workspace:*",
|
|
57
|
+
"@valbuild/shared": "workspace:*",
|
|
58
|
+
"@valbuild/ui": "workspace:*",
|
|
59
|
+
"client-only": "^0.0.1",
|
|
60
|
+
"server-only": "^0.0.1"
|
|
61
|
+
},
|
|
62
|
+
devDependencies: {
|
|
63
|
+
"@testing-library/react": "^16.3.3",
|
|
64
|
+
"@types/react": "^19.2.18",
|
|
65
|
+
"@types/react-dom": "^19.2.5",
|
|
66
|
+
"jest-environment-jsdom": "^30.5.0",
|
|
67
|
+
next: "^16.3.3",
|
|
68
|
+
react: "^19.2.8",
|
|
69
|
+
"react-dom": "^19.2.8",
|
|
70
|
+
typescript: "^6.0.3"
|
|
71
|
+
},
|
|
72
|
+
peerDependencies: {
|
|
73
|
+
next: ">=14.3.0",
|
|
74
|
+
react: ">=19.0.0",
|
|
75
|
+
"react-dom": ">=19.0.0"
|
|
76
|
+
},
|
|
77
|
+
externals: [
|
|
78
|
+
"next"
|
|
79
|
+
],
|
|
80
|
+
files: [
|
|
81
|
+
"CHANGELOG.md",
|
|
82
|
+
"dist",
|
|
83
|
+
"client",
|
|
84
|
+
"server",
|
|
85
|
+
"rsc"
|
|
86
|
+
]
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var _packageJson$version;
|
|
90
|
+
var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
|
|
91
|
+
|
|
92
|
+
export { VERSION as V };
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"next",
|
|
13
13
|
"react"
|
|
14
14
|
],
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.126.0",
|
|
16
16
|
"main": "dist/valbuild-next.cjs.js",
|
|
17
17
|
"module": "dist/valbuild-next.esm.js",
|
|
18
18
|
"exports": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"client-only": "^0.0.1",
|
|
49
49
|
"server-only": "^0.0.1",
|
|
50
|
-
"@valbuild/core": "0.
|
|
51
|
-
"@valbuild/language-server": "0.
|
|
52
|
-
"@valbuild/
|
|
53
|
-
"@valbuild/
|
|
54
|
-
"@valbuild/server": "0.
|
|
55
|
-
"@valbuild/
|
|
56
|
-
"@valbuild/
|
|
50
|
+
"@valbuild/core": "0.126.0",
|
|
51
|
+
"@valbuild/language-server": "0.126.0",
|
|
52
|
+
"@valbuild/react": "0.126.0",
|
|
53
|
+
"@valbuild/mcp": "0.126.0",
|
|
54
|
+
"@valbuild/server": "0.126.0",
|
|
55
|
+
"@valbuild/shared": "0.126.0",
|
|
56
|
+
"@valbuild/ui": "0.126.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@testing-library/react": "^16.3.3",
|
|
@@ -11,7 +11,7 @@ var stega = require('@valbuild/react/stega');
|
|
|
11
11
|
var core = require('@valbuild/core');
|
|
12
12
|
var internal = require('@valbuild/shared/internal');
|
|
13
13
|
var server = require('@valbuild/server');
|
|
14
|
-
var version = require('../../dist/version-
|
|
14
|
+
var version = require('../../dist/version-7b12f65c.cjs.dev.js');
|
|
15
15
|
require('../../dist/createForOfIteratorHelper-0445603c.cjs.dev.js');
|
|
16
16
|
require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
|
|
17
17
|
require('../../dist/slicedToArray-44036a76.cjs.dev.js');
|
|
@@ -11,7 +11,7 @@ var stega = require('@valbuild/react/stega');
|
|
|
11
11
|
var core = require('@valbuild/core');
|
|
12
12
|
var internal = require('@valbuild/shared/internal');
|
|
13
13
|
var server = require('@valbuild/server');
|
|
14
|
-
var version = require('../../dist/version-
|
|
14
|
+
var version = require('../../dist/version-ed4739ee.cjs.prod.js');
|
|
15
15
|
require('../../dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js');
|
|
16
16
|
require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
|
|
17
17
|
require('../../dist/slicedToArray-ce613de6.cjs.prod.js');
|
|
@@ -7,7 +7,7 @@ import { SET_RSC, stegaEncode, SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/
|
|
|
7
7
|
import { Internal } from '@valbuild/core';
|
|
8
8
|
import { VAL_SESSION_COOKIE } from '@valbuild/shared/internal';
|
|
9
9
|
import { createValServer } from '@valbuild/server';
|
|
10
|
-
import { V as VERSION } from '../../dist/version-
|
|
10
|
+
import { V as VERSION } from '../../dist/version-f8b10637.esm.js';
|
|
11
11
|
import '../../dist/createForOfIteratorHelper-5758a730.esm.js';
|
|
12
12
|
import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
|
|
13
13
|
import '../../dist/slicedToArray-aa291011.esm.js';
|
|
@@ -9,7 +9,7 @@ var objectSpread2 = require('../../dist/objectSpread2-58024783.cjs.dev.js');
|
|
|
9
9
|
var core = require('@valbuild/core');
|
|
10
10
|
var server = require('@valbuild/server');
|
|
11
11
|
var server$1 = require('next/server');
|
|
12
|
-
var version = require('../../dist/version-
|
|
12
|
+
var version = require('../../dist/version-7b12f65c.cjs.dev.js');
|
|
13
13
|
var mcp = require('@valbuild/mcp');
|
|
14
14
|
require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
|
|
15
15
|
require('../../dist/defineProperty-f90345d7.cjs.dev.js');
|
|
@@ -9,7 +9,7 @@ var objectSpread2 = require('../../dist/objectSpread2-13f847a9.cjs.prod.js');
|
|
|
9
9
|
var core = require('@valbuild/core');
|
|
10
10
|
var server = require('@valbuild/server');
|
|
11
11
|
var server$1 = require('next/server');
|
|
12
|
-
var version = require('../../dist/version-
|
|
12
|
+
var version = require('../../dist/version-ed4739ee.cjs.prod.js');
|
|
13
13
|
var mcp = require('@valbuild/mcp');
|
|
14
14
|
require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
|
|
15
15
|
require('../../dist/defineProperty-8951f469.cjs.prod.js');
|
|
@@ -5,7 +5,7 @@ import { _ as _objectSpread2 } from '../../dist/objectSpread2-60d1bd93.esm.js';
|
|
|
5
5
|
import { Internal } from '@valbuild/core';
|
|
6
6
|
import { createValApiRouter, createValServer } from '@valbuild/server';
|
|
7
7
|
import { NextResponse } from 'next/server';
|
|
8
|
-
import { V as VERSION } from '../../dist/version-
|
|
8
|
+
import { V as VERSION } from '../../dist/version-f8b10637.esm.js';
|
|
9
9
|
import { initValMcp as initValMcp$1 } from '@valbuild/mcp';
|
|
10
10
|
import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
|
|
11
11
|
import '../../dist/defineProperty-cca5affa.esm.js';
|