create-vexcms 0.1.0-alpha.21 → 0.1.0-alpha.22
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/package.json
CHANGED
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@t3-oss/env-nextjs": "0.13.11",
|
|
25
25
|
"@tanstack/react-form": "1.33.1",
|
|
26
26
|
"@tanstack/react-query": "5.101.2",
|
|
27
|
-
"@vexcms/better-auth": "~0.1.0-alpha.
|
|
28
|
-
"@vexcms/core": "~0.1.0-alpha.
|
|
29
|
-
"@vexcms/file-storage-convex": "~0.1.0-alpha.
|
|
30
|
-
"@vexcms/next": "~0.1.0-alpha.
|
|
31
|
-
"@vexcms/react": "~0.1.0-alpha.
|
|
27
|
+
"@vexcms/better-auth": "~0.1.0-alpha.22",
|
|
28
|
+
"@vexcms/core": "~0.1.0-alpha.22",
|
|
29
|
+
"@vexcms/file-storage-convex": "~0.1.0-alpha.22",
|
|
30
|
+
"@vexcms/next": "~0.1.0-alpha.22",
|
|
31
|
+
"@vexcms/react": "~0.1.0-alpha.22",
|
|
32
32
|
"better-auth": "1.6.23",
|
|
33
33
|
"class-variance-authority": "0.7.1",
|
|
34
34
|
"clsx": "2.1.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/node": "20.19.43",
|
|
53
53
|
"@types/react": "19.2.17",
|
|
54
54
|
"@types/react-dom": "19.2.3",
|
|
55
|
-
"@vexcms/cli": "~0.1.0-alpha.
|
|
55
|
+
"@vexcms/cli": "~0.1.0-alpha.22",
|
|
56
56
|
"babel-plugin-react-compiler": "1.0.0",
|
|
57
57
|
"eslint": "9.39.5",
|
|
58
58
|
"eslint-config-next": "15.5.9",
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { convexQuery } from "@convex-dev/react-query"
|
|
4
4
|
import { api } from "@convex/_generated/api"
|
|
5
|
-
import {
|
|
6
|
-
import { type RenderableBlock, RenderBlocks } from "@vexcms/react"
|
|
5
|
+
import { type RenderableBlock, RenderBlocks, useLivePreviewDocumentQuery } from "@vexcms/react"
|
|
7
6
|
|
|
8
7
|
import type { FootersDocument } from "~/vex.types"
|
|
9
8
|
|
|
@@ -16,10 +15,15 @@ export function SiteFooter({
|
|
|
16
15
|
}: {
|
|
17
16
|
initialData?: FootersDocument | null
|
|
18
17
|
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
// See `SiteHeader`: the overlay only reaches documents a consumer hands it,
|
|
19
|
+
// so editing the footer while previewing a page needs this wrapper.
|
|
20
|
+
const { data: footer } = useLivePreviewDocumentQuery(
|
|
21
|
+
{
|
|
22
|
+
...convexQuery(api.footers.getFirst, {}),
|
|
23
|
+
initialData: initialData ?? undefined,
|
|
24
|
+
},
|
|
25
|
+
"footers",
|
|
26
|
+
)
|
|
23
27
|
|
|
24
28
|
const content = footer?.content as null | PageBlockLike[] | undefined
|
|
25
29
|
if (!content) {return null}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { convexQuery } from "@convex-dev/react-query"
|
|
4
4
|
import { api } from "@convex/_generated/api"
|
|
5
|
-
import {
|
|
6
|
-
import { type RenderableBlock, RenderBlocks } from "@vexcms/react"
|
|
5
|
+
import { type RenderableBlock, RenderBlocks, useLivePreviewDocumentQuery } from "@vexcms/react"
|
|
7
6
|
|
|
8
7
|
import type { HeadersDocument } from "~/vex.types"
|
|
9
8
|
|
|
@@ -16,10 +15,16 @@ export function SiteHeader({
|
|
|
16
15
|
}: {
|
|
17
16
|
initialData?: HeadersDocument | null
|
|
18
17
|
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
18
|
+
// `useLivePreviewDocumentQuery`, not a bare `useQuery`: the live-preview
|
|
19
|
+
// overlay only reaches documents a consumer hands it, so a plain query here
|
|
20
|
+
// means editing the header while previewing a page changes nothing.
|
|
21
|
+
const { data: header } = useLivePreviewDocumentQuery(
|
|
22
|
+
{
|
|
23
|
+
...convexQuery(api.headers.getFirst, {}),
|
|
24
|
+
initialData: initialData ?? undefined,
|
|
25
|
+
},
|
|
26
|
+
"headers",
|
|
27
|
+
)
|
|
23
28
|
|
|
24
29
|
const content = header?.content as null | PageBlockLike[] | undefined
|
|
25
30
|
if (!content) {return null}
|