@visual-platform/next 0.0.0-stage → 0.1.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/dist/events.d.ts +11 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +12 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +240 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +213 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -3
- package/README.md +0 -3
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-only entry (ADR-032): import from "@visual-platform/next/events" in your "use client" files.
|
|
3
|
+
*
|
|
4
|
+
* "use client";
|
|
5
|
+
* import { VisualEvents } from "@visual-platform/next/events";
|
|
6
|
+
* export function Handlers({ children }) {
|
|
7
|
+
* return <VisualEvents handlers={{ onSubscribe: async (e) => { await subscribe(e.value); } }}>{children}</VisualEvents>;
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export { VisualEvents, eventData, type VisualEvent, type VisualEventData, type VisualEventHandler, type VisualEventHandlers, type VisualEventPayload, type EventKind } from "@visual-platform/runtime-core";
|
|
11
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/**
|
|
3
|
+
* Client-only entry (ADR-032): import from "@visual-platform/next/events" in your "use client" files.
|
|
4
|
+
*
|
|
5
|
+
* "use client";
|
|
6
|
+
* import { VisualEvents } from "@visual-platform/next/events";
|
|
7
|
+
* export function Handlers({ children }) {
|
|
8
|
+
* return <VisualEvents handlers={{ onSubscribe: async (e) => { await subscribe(e.value); } }}>{children}</VisualEvents>;
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export { VisualEvents, eventData } from "@visual-platform/runtime-core";
|
|
12
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAsI,MAAM,+BAA+B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { type ResolvedPage } from "@visual-platform/contracts";
|
|
2
|
+
import { type VisualEventData, type VisualRegistry } from "@visual-platform/runtime-core";
|
|
3
|
+
import type { Metadata } from "next";
|
|
4
|
+
import { type ReactNode } from "react";
|
|
5
|
+
export type VisualNextConfig = {
|
|
6
|
+
/** Published API base URL, e.g. process.env.VISUAL_API_URL. */
|
|
7
|
+
apiUrl: string;
|
|
8
|
+
projectId: string;
|
|
9
|
+
/** Public project key from the admin (Integrations → API keys), e.g. process.env.VISUAL_PROJECT_KEY. */
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
registry: VisualRegistry;
|
|
12
|
+
/** Seconds before Next refetches (stale-while-revalidate). Webhook revalidation is immediate. Default 60. */
|
|
13
|
+
revalidate?: number;
|
|
14
|
+
/** Validate API responses with zod (default: in development only). */
|
|
15
|
+
validate?: boolean;
|
|
16
|
+
/** pageKey served at "/" (empty path). Default "home". */
|
|
17
|
+
homePageKey?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Tailwind classes set in Studio (ADR-029). "platform" (default): inject the CSS the platform compiled
|
|
20
|
+
* for the release — works with or without Tailwind in your app. "app": your own Tailwind build
|
|
21
|
+
* generates them (run `vp classes pull` and add .visual/classes.txt as a source).
|
|
22
|
+
*/
|
|
23
|
+
tailwind?: "platform" | "app";
|
|
24
|
+
/** Public origin of your site, e.g. "https://acmecoffee.vn" — used for canonical, hreflang and og:url. */
|
|
25
|
+
siteUrl?: string;
|
|
26
|
+
/**
|
|
27
|
+
* How content is cached (ADR-040); each VisualPage/VisualComponent may override it.
|
|
28
|
+
* "isr" (default): refetched at most every `revalidate` seconds, and immediately on the publish webhook.
|
|
29
|
+
* "static": fetched once (at `next build` for pages listed by `generateStaticParams`, else on first
|
|
30
|
+
* request) and kept until the publish webhook or the next build.
|
|
31
|
+
*/
|
|
32
|
+
rendering?: Rendering;
|
|
33
|
+
};
|
|
34
|
+
export type Rendering = "isr" | "static";
|
|
35
|
+
/** Per page/component override of the caching mode. */
|
|
36
|
+
export type RenderingOptions = {
|
|
37
|
+
rendering?: Rendering;
|
|
38
|
+
revalidate?: number;
|
|
39
|
+
};
|
|
40
|
+
/** Server Actions by event name (ADR-040) — they receive the plain event data (VisualEventData). */
|
|
41
|
+
export type VisualServerHandlers = Record<string, ((e: VisualEventData) => Promise<unknown>) | undefined>;
|
|
42
|
+
/** Cache tags the SDK puts on every fetch (blueprint 53 §5). */
|
|
43
|
+
export declare const visualTags: {
|
|
44
|
+
project: (projectId: string) => string;
|
|
45
|
+
page: (projectId: string, locale: string, path: string) => string;
|
|
46
|
+
component: (projectId: string, id: string) => string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Next.js App Router integration (blueprint 61). Call once at module scope:
|
|
50
|
+
*
|
|
51
|
+
* export const visual = createVisualNext({ apiUrl, projectId, registry });
|
|
52
|
+
*
|
|
53
|
+
* Fetches run on the server with Next fetch caching (cacheComponents OFF, ADR-016) and are
|
|
54
|
+
* de-duplicated per request with React `cache()`, so generateMetadata and the page share one call.
|
|
55
|
+
*/
|
|
56
|
+
export declare function createVisualNext(config: VisualNextConfig): {
|
|
57
|
+
client: {
|
|
58
|
+
projectId: string;
|
|
59
|
+
getResolvedPage(q: import("@visual-platform/client").PageQuery, init?: import("@visual-platform/client").FetchInit): Promise<ResolvedPage | null>;
|
|
60
|
+
getResolvedComponent(id: string, init?: import("@visual-platform/client").FetchInit, opts?: {
|
|
61
|
+
locale?: string | undefined;
|
|
62
|
+
}): Promise<import("@visual-platform/contracts").ResolvedComponent | null>;
|
|
63
|
+
listTables(init?: import("@visual-platform/client").FetchInit): Promise<{
|
|
64
|
+
dataVersion: number;
|
|
65
|
+
tables: {
|
|
66
|
+
key: string;
|
|
67
|
+
name: string;
|
|
68
|
+
columns: unknown[];
|
|
69
|
+
displayColumn: string;
|
|
70
|
+
rowCount: number;
|
|
71
|
+
}[];
|
|
72
|
+
} | null>;
|
|
73
|
+
query<Row = Record<string, unknown>>(q: {
|
|
74
|
+
table: string;
|
|
75
|
+
filter?: string;
|
|
76
|
+
where?: unknown;
|
|
77
|
+
sort?: {
|
|
78
|
+
field: string;
|
|
79
|
+
dir?: "asc" | "desc";
|
|
80
|
+
}[];
|
|
81
|
+
limit?: number;
|
|
82
|
+
offset?: number;
|
|
83
|
+
include?: string[];
|
|
84
|
+
locale?: string;
|
|
85
|
+
}, init?: import("@visual-platform/client").FetchInit): Promise<{
|
|
86
|
+
dataVersion: number;
|
|
87
|
+
total: number;
|
|
88
|
+
rows: (Row & {
|
|
89
|
+
id: string;
|
|
90
|
+
})[];
|
|
91
|
+
} | null>;
|
|
92
|
+
getLocales(init?: import("@visual-platform/client").FetchInit): Promise<import("@visual-platform/contracts").LocaleList | null>;
|
|
93
|
+
listPages(locale?: string, init?: import("@visual-platform/client").FetchInit): Promise<import("@visual-platform/contracts").PageList | null>;
|
|
94
|
+
};
|
|
95
|
+
getPageData: (locale: string, slug: string | string[] | undefined, rendering?: Rendering, revalidate?: number) => Promise<ResolvedPage | null>;
|
|
96
|
+
getComponentData: (id: string, rendering?: Rendering, revalidate?: number, locale?: string) => Promise<{
|
|
97
|
+
project: {
|
|
98
|
+
id: string;
|
|
99
|
+
};
|
|
100
|
+
release: {
|
|
101
|
+
id: string;
|
|
102
|
+
sequence: number;
|
|
103
|
+
manifestHash: string;
|
|
104
|
+
};
|
|
105
|
+
component: {
|
|
106
|
+
id: string;
|
|
107
|
+
versionId: string;
|
|
108
|
+
versionNumber: number;
|
|
109
|
+
document: {
|
|
110
|
+
schemaVersion: 1;
|
|
111
|
+
nodes: import("@visual-platform/contracts").ComponentNode[];
|
|
112
|
+
props: {
|
|
113
|
+
name: string;
|
|
114
|
+
label: string;
|
|
115
|
+
type: "boolean" | "icon" | "image" | "link" | "number" | "select" | "text" | "textarea";
|
|
116
|
+
binds: {
|
|
117
|
+
nodeId: string;
|
|
118
|
+
prop: string;
|
|
119
|
+
}[];
|
|
120
|
+
required?: boolean | undefined;
|
|
121
|
+
options?: string[] | undefined;
|
|
122
|
+
}[];
|
|
123
|
+
defaultLocale: string;
|
|
124
|
+
translations: Record<string, Record<string, string>>;
|
|
125
|
+
theme?: string | undefined;
|
|
126
|
+
data?: {
|
|
127
|
+
name: string;
|
|
128
|
+
label?: string | undefined;
|
|
129
|
+
source: "app" | "table";
|
|
130
|
+
shape: "list" | "object";
|
|
131
|
+
fields: import("@visual-platform/contracts").DataField[];
|
|
132
|
+
sample?: unknown;
|
|
133
|
+
query?: {
|
|
134
|
+
table: string;
|
|
135
|
+
where?: import("@visual-platform/contracts").Filter | undefined;
|
|
136
|
+
sort?: {
|
|
137
|
+
field: string;
|
|
138
|
+
dir: "asc" | "desc";
|
|
139
|
+
}[] | undefined;
|
|
140
|
+
limit: number;
|
|
141
|
+
offset: number;
|
|
142
|
+
include?: string[] | undefined;
|
|
143
|
+
locale?: string | undefined;
|
|
144
|
+
} | undefined;
|
|
145
|
+
single?: boolean | undefined;
|
|
146
|
+
}[] | undefined;
|
|
147
|
+
disabledLocales?: string[] | undefined;
|
|
148
|
+
childrenSlot?: {
|
|
149
|
+
nodeId: string;
|
|
150
|
+
slot: string;
|
|
151
|
+
} | undefined;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
design?: {
|
|
155
|
+
vars: Record<string, string>;
|
|
156
|
+
themes: Record<string, Record<string, string>>;
|
|
157
|
+
fonts: {
|
|
158
|
+
family: string;
|
|
159
|
+
faces: {
|
|
160
|
+
weight: number;
|
|
161
|
+
style: "italic" | "normal";
|
|
162
|
+
url: string;
|
|
163
|
+
format: "opentype" | "truetype" | "woff" | "woff2";
|
|
164
|
+
unicodeRange?: string | undefined;
|
|
165
|
+
}[];
|
|
166
|
+
}[];
|
|
167
|
+
} | null | undefined;
|
|
168
|
+
styles?: string | null | undefined;
|
|
169
|
+
locales?: Record<string, {
|
|
170
|
+
name: string;
|
|
171
|
+
nativeName: string;
|
|
172
|
+
dir: "ltr" | "rtl";
|
|
173
|
+
}> | null | undefined;
|
|
174
|
+
data?: Record<string, unknown> | undefined;
|
|
175
|
+
} | null>;
|
|
176
|
+
VisualPage: (props: {
|
|
177
|
+
locale: string;
|
|
178
|
+
slug?: string | string[] | undefined;
|
|
179
|
+
mode?: "production" | "preview";
|
|
180
|
+
data?: Record<string, unknown>;
|
|
181
|
+
handlers?: VisualServerHandlers;
|
|
182
|
+
} & RenderingOptions) => Promise<import("react").JSX.Element>;
|
|
183
|
+
VisualComponent: (props: {
|
|
184
|
+
id: string;
|
|
185
|
+
locale?: string;
|
|
186
|
+
values?: Record<string, unknown>;
|
|
187
|
+
data?: Record<string, unknown>;
|
|
188
|
+
theme?: string;
|
|
189
|
+
fallback?: ReactNode;
|
|
190
|
+
handlers?: VisualServerHandlers;
|
|
191
|
+
} & RenderingOptions) => Promise<import("react").JSX.Element>;
|
|
192
|
+
generateMetadata: (locale: string, slug: string | string[] | undefined, opts?: {
|
|
193
|
+
titleTemplate?: string;
|
|
194
|
+
baseUrl?: string;
|
|
195
|
+
} & RenderingOptions) => Promise<Metadata>;
|
|
196
|
+
revalidateHandler: (secret: string) => (request: Request) => Promise<Response>;
|
|
197
|
+
locales: () => Promise<{
|
|
198
|
+
code: string;
|
|
199
|
+
name: string;
|
|
200
|
+
nativeName: string;
|
|
201
|
+
dir: "ltr" | "rtl";
|
|
202
|
+
}[]>;
|
|
203
|
+
localeDir: (locale: string) => Promise<"ltr" | "rtl">;
|
|
204
|
+
defaultLocale: () => Promise<string | null>;
|
|
205
|
+
hasLocale: (locale: string) => Promise<boolean>;
|
|
206
|
+
generateStaticParams: (opts?: {
|
|
207
|
+
locales?: string[];
|
|
208
|
+
}) => Promise<{
|
|
209
|
+
locale: string;
|
|
210
|
+
slug: string[];
|
|
211
|
+
}[]>;
|
|
212
|
+
query: <Row = Record<string, unknown>>(q: Parameters<<Row_1 = Record<string, unknown>>(q: {
|
|
213
|
+
table: string;
|
|
214
|
+
filter?: string;
|
|
215
|
+
where?: unknown;
|
|
216
|
+
sort?: {
|
|
217
|
+
field: string;
|
|
218
|
+
dir?: "asc" | "desc";
|
|
219
|
+
}[];
|
|
220
|
+
limit?: number;
|
|
221
|
+
offset?: number;
|
|
222
|
+
include?: string[];
|
|
223
|
+
locale?: string;
|
|
224
|
+
}, init?: import("@visual-platform/client").FetchInit) => Promise<{
|
|
225
|
+
dataVersion: number;
|
|
226
|
+
total: number;
|
|
227
|
+
rows: (Row_1 & {
|
|
228
|
+
id: string;
|
|
229
|
+
})[];
|
|
230
|
+
} | null>>[0], opts?: RenderingOptions) => Promise<{
|
|
231
|
+
dataVersion: number;
|
|
232
|
+
total: number;
|
|
233
|
+
rows: (Row & {
|
|
234
|
+
id: string;
|
|
235
|
+
})[];
|
|
236
|
+
}>;
|
|
237
|
+
};
|
|
238
|
+
export { createVisualRegistry } from "@visual-platform/runtime-core";
|
|
239
|
+
export type { VisualRegistry, VisualNodeProps, VisualEvent, VisualEventData, EventKind } from "@visual-platform/runtime-core";
|
|
240
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"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AC,QAAQ,CAAC;gCA+EhJ,MAAM,eAChB,OAAO;;;;;;;wBAVC,MAAM,KAAG,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;yBAdhC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;wBASrB,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;kCAtJhB;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,KAAQ,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;YA4HhG,GAAG,+BAA+B,UAAU;;;;;;;;;;;;;;;;;;cAAqB,CAAC,CAAC,CAAC,SAAQ,gBAAgB;;;;;;;EAsDlH;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { applyComponent, componentEnabledFor, dirOf, jsonLdDocument, withTheme } from "@visual-platform/contracts";
|
|
3
|
+
import { createVisualClient } from "@visual-platform/client";
|
|
4
|
+
import { renderDocument, VisualEvents } from "@visual-platform/runtime-core";
|
|
5
|
+
import { revalidateTag } from "next/cache";
|
|
6
|
+
import { notFound } from "next/navigation";
|
|
7
|
+
import { cache } from "react";
|
|
8
|
+
/** Cache tags the SDK puts on every fetch (blueprint 53 §5). */
|
|
9
|
+
export const visualTags = {
|
|
10
|
+
project: (projectId) => `visual:project:${projectId}`,
|
|
11
|
+
page: (projectId, locale, path) => `visual:page:${projectId}:${locale}:${path || "/"}`,
|
|
12
|
+
component: (projectId, id) => `visual:component:${projectId}:${id}`,
|
|
13
|
+
};
|
|
14
|
+
const LOCALE_CODE = /^[a-z]{2,3}(-[A-Z]{2})?$/;
|
|
15
|
+
const toPath = (slug) => (Array.isArray(slug) ? slug.join("/") : (slug ?? "")).replace(/^\/+|\/+$/g, "");
|
|
16
|
+
/**
|
|
17
|
+
* Next.js App Router integration (blueprint 61). Call once at module scope:
|
|
18
|
+
*
|
|
19
|
+
* export const visual = createVisualNext({ apiUrl, projectId, registry });
|
|
20
|
+
*
|
|
21
|
+
* Fetches run on the server with Next fetch caching (cacheComponents OFF, ADR-016) and are
|
|
22
|
+
* de-duplicated per request with React `cache()`, so generateMetadata and the page share one call.
|
|
23
|
+
*/
|
|
24
|
+
export function createVisualNext(config) {
|
|
25
|
+
const client = createVisualClient({
|
|
26
|
+
baseUrl: config.apiUrl,
|
|
27
|
+
projectId: config.projectId,
|
|
28
|
+
...(config.apiKey ? { apiKey: config.apiKey } : {}),
|
|
29
|
+
validate: config.validate ?? process.env.NODE_ENV !== "production",
|
|
30
|
+
});
|
|
31
|
+
const home = config.homePageKey ?? "home";
|
|
32
|
+
/** Next fetch options for a caching mode: static = cached until a tag is revalidated; isr = time-based too. */
|
|
33
|
+
const fetchOpts = (tags, rendering, revalidate) => (rendering ?? config.rendering ?? "isr") === "static"
|
|
34
|
+
? { cache: "force-cache", next: { tags } }
|
|
35
|
+
: { next: { revalidate: revalidate ?? config.revalidate ?? 60, tags } };
|
|
36
|
+
const getPageData = cache(async (locale, slug, rendering, revalidate) => {
|
|
37
|
+
// Not a locale code (e.g. /admin, /favicon.ico caught by a [locale] route) → no page → 404, never a 500.
|
|
38
|
+
if (!LOCALE_CODE.test(locale))
|
|
39
|
+
return null;
|
|
40
|
+
const path = toPath(slug);
|
|
41
|
+
return client.getResolvedPage(path ? { locale, path } : { locale, pageKey: home }, fetchOpts([visualTags.project(config.projectId), visualTags.page(config.projectId, locale, path)], rendering, revalidate));
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* For `generateStaticParams` in a `[locale]/[[...slug]]` route (rendering "static"): every published
|
|
45
|
+
* page of the current release. If the API is unreachable at build time, returns [] and pages are
|
|
46
|
+
* generated on first request instead (never fails the build).
|
|
47
|
+
*/
|
|
48
|
+
async function generateStaticParams(opts = {}) {
|
|
49
|
+
try {
|
|
50
|
+
const list = await client.listPages(undefined, fetchOpts([visualTags.project(config.projectId)], "static"));
|
|
51
|
+
return (list?.pages ?? []).filter((p) => !opts.locales || opts.locales.includes(p.locale))
|
|
52
|
+
.map((p) => ({ locale: p.locale, slug: p.pageKey === home ? [] : p.slug.split("/").filter(Boolean) }));
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
console.warn("[visual] generateStaticParams: Published API unreachable — pages will be generated on first request.", e);
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Server Component. Renders the published page or calls notFound().
|
|
61
|
+
* `data` feeds the page's data inputs (ADR-034), e.g. data={{ products }} — fetched by your app.
|
|
62
|
+
*/
|
|
63
|
+
async function VisualPage(props) {
|
|
64
|
+
const data = await getPageData(props.locale, props.slug, props.rendering, props.revalidate);
|
|
65
|
+
if (!data)
|
|
66
|
+
notFound();
|
|
67
|
+
const out = (_jsxs("div", { "data-vp-page": data.page.pageKey, "data-vp-release": data.release.id, lang: data.locale.content, dir: data.locale.dir ?? dirOf(null, data.locale.content), children: [(() => {
|
|
68
|
+
// JSON-LD from Studio (allowlisted schema.org types) as ONE script (@graph when several);
|
|
69
|
+
// "<" escaped so it can never close the script.
|
|
70
|
+
const ld = jsonLdDocument(data.seo.structuredData);
|
|
71
|
+
return ld ? _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: JSON.stringify(ld).replace(/</g, "\\u003c") } }) : null;
|
|
72
|
+
})(), renderDocument(data.page.document, {
|
|
73
|
+
registry: config.registry,
|
|
74
|
+
mode: props.mode ?? "production",
|
|
75
|
+
locale: data.locale.content,
|
|
76
|
+
dir: data.locale.dir ?? dirOf(null, data.locale.content),
|
|
77
|
+
// Data-table inputs come resolved with the page (ADR-041); data from the app wins by name.
|
|
78
|
+
...(data.data || props.data ? { data: { ...(data.data ?? {}), ...(props.data ?? {}) } } : {}),
|
|
79
|
+
// Tokens, themes and fonts pinned by the release (ADR-026); older releases fall back to defaults.
|
|
80
|
+
...(data.design ? { design: data.design } : {}),
|
|
81
|
+
...(config.tailwind !== "app" && data.styles ? { classCss: data.styles } : {}),
|
|
82
|
+
...(data.page.document.root.props.theme ? { theme: data.page.document.root.props.theme } : {}),
|
|
83
|
+
onUnknownComponent: (type, id) => console.warn(`[visual] unknown component "${type}" (node ${id}) — add it to your registry`),
|
|
84
|
+
})] }));
|
|
85
|
+
// Server Actions by event name (ADR-040): no client wrapper needed.
|
|
86
|
+
return props.handlers ? _jsx(VisualEvents, { actions: props.handlers, children: out }) : out;
|
|
87
|
+
}
|
|
88
|
+
const getComponentData = cache((id, rendering, revalidate, locale) => client.getResolvedComponent(id, fetchOpts([visualTags.project(config.projectId), visualTags.component(config.projectId, id)], rendering, revalidate), { locale }));
|
|
89
|
+
/**
|
|
90
|
+
* Server Component for one composed component (ADR-028), anywhere in your app:
|
|
91
|
+
* <visual.VisualComponent id="…" locale="vi" values={{ title: "Flash sale" }} />
|
|
92
|
+
* Text follows `locale` (component translations); `values` fill the component's props;
|
|
93
|
+
* `data` feeds its data inputs (ADR-034).
|
|
94
|
+
* Renders nothing when the component is not published (or `fallback`).
|
|
95
|
+
*/
|
|
96
|
+
async function VisualComponent(props) {
|
|
97
|
+
const data = await getComponentData(props.id, props.rendering, props.revalidate, props.locale);
|
|
98
|
+
if (!data)
|
|
99
|
+
return _jsx(_Fragment, { children: props.fallback ?? null });
|
|
100
|
+
const doc = data.component.document;
|
|
101
|
+
if (!componentEnabledFor(doc, props.locale ?? doc.defaultLocale))
|
|
102
|
+
return _jsx(_Fragment, { children: props.fallback ?? null }); // switched off for this language
|
|
103
|
+
const nodes = withTheme(applyComponent(doc, { locale: props.locale, values: props.values }), doc.theme, `n_c${data.component.versionId.slice(0, 6)}`);
|
|
104
|
+
const page = { schemaVersion: 1, locale: props.locale ?? doc.defaultLocale, root: { props: { seo: { slug: "component", title: "component" } } }, nodes };
|
|
105
|
+
const out = (_jsx("div", { "data-vp-component": props.id, "data-vp-release": data.release.id, children: renderDocument(page, {
|
|
106
|
+
registry: config.registry, mode: "production",
|
|
107
|
+
locale: props.locale ?? doc.defaultLocale,
|
|
108
|
+
dir: dirOf(data.locales, props.locale ?? doc.defaultLocale),
|
|
109
|
+
...(data.data || props.data ? { data: { ...(data.data ?? {}), ...(props.data ?? {}) } } : {}),
|
|
110
|
+
...(data.design ? { design: data.design } : {}),
|
|
111
|
+
...(config.tailwind !== "app" && data.styles ? { classCss: data.styles } : {}),
|
|
112
|
+
...(props.theme ? { theme: props.theme } : {}),
|
|
113
|
+
onUnknownComponent: (type, id) => console.warn(`[visual] unknown component "${type}" (node ${id}) — add it to your registry`),
|
|
114
|
+
}) }));
|
|
115
|
+
// Server Actions by event name (ADR-040): no client wrapper needed.
|
|
116
|
+
return props.handlers ? _jsx(VisualEvents, { actions: props.handlers, children: out }) : out;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Use inside generateMetadata. Everything set in Studio → Page → Settings → SEO: title (+ template),
|
|
120
|
+
* description, robots (noindex/nofollow), canonical, hreflang alternates, Open Graph and Twitter card.
|
|
121
|
+
* JSON-LD is rendered by <VisualPage> itself (Next metadata has no ld+json field).
|
|
122
|
+
*/
|
|
123
|
+
async function generateMetadata(locale, slug, opts = {}) {
|
|
124
|
+
const data = await getPageData(locale, slug, opts.rendering, opts.revalidate);
|
|
125
|
+
if (!data)
|
|
126
|
+
return {};
|
|
127
|
+
const seo = data.seo;
|
|
128
|
+
const base = (opts.baseUrl ?? config.siteUrl ?? "").replace(/\/$/, "");
|
|
129
|
+
// The home page (homePageKey) is served at "/{locale}"; other pages at "/{locale}/{slug}".
|
|
130
|
+
const isHome = data.page.pageKey === (config.homePageKey ?? "home");
|
|
131
|
+
const urlOf = (l, s) => `${base}/${l}${isHome || !s ? "" : `/${s}`}`;
|
|
132
|
+
const title = opts.titleTemplate ? opts.titleTemplate.replace("%s", seo.title) : seo.title;
|
|
133
|
+
const description = seo.description ?? undefined;
|
|
134
|
+
const ogImage = seo.og?.image && "url" in seo.og.image ? seo.og.image : null;
|
|
135
|
+
const url = seo.canonical ?? (base ? urlOf(data.locale.content, data.page.slug) : undefined);
|
|
136
|
+
// hreflang: every published language of this page + x-default (project default language) — ADR-037/038.
|
|
137
|
+
const alts = data.alternates ?? [];
|
|
138
|
+
const def = alts.find((a) => a.locale === data.defaultLocale);
|
|
139
|
+
const languages = base && alts.length
|
|
140
|
+
? { ...Object.fromEntries(alts.map((a) => [a.locale, urlOf(a.locale, a.slug)])), ...(def ? { "x-default": urlOf(def.locale, def.slug) } : {}) }
|
|
141
|
+
: undefined;
|
|
142
|
+
const ogTitle = seo.og?.title ?? title;
|
|
143
|
+
const ogDescription = seo.og?.description ?? description;
|
|
144
|
+
return {
|
|
145
|
+
title,
|
|
146
|
+
...(description ? { description } : {}),
|
|
147
|
+
...(seo.robots ? { robots: { index: seo.robots.index, follow: seo.robots.follow } } : {}),
|
|
148
|
+
...(url || languages ? { alternates: { ...(url ? { canonical: url } : {}), ...(languages ? { languages } : {}) } } : {}),
|
|
149
|
+
openGraph: {
|
|
150
|
+
type: "website", title: ogTitle, locale: data.locale.content.replace("-", "_"),
|
|
151
|
+
...(ogDescription ? { description: ogDescription } : {}),
|
|
152
|
+
...(url ? { url } : {}),
|
|
153
|
+
...(ogImage ? { images: [{ url: ogImage.url, ...(ogImage.width ? { width: ogImage.width } : {}), ...(ogImage.height ? { height: ogImage.height } : {}), ...(ogImage.alt ? { alt: ogImage.alt } : {}) }] } : {}),
|
|
154
|
+
},
|
|
155
|
+
twitter: { card: ogImage ? "summary_large_image" : "summary", title: ogTitle, ...(ogDescription ? { description: ogDescription } : {}), ...(ogImage ? { images: [ogImage.url] } : {}) },
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Query a data table from your own Server Components (ADR-041), cached like pages:
|
|
160
|
+
* const { rows } = await visual.query({ table: "products", filter: "price < 50000", include: ["category"] })
|
|
161
|
+
*/
|
|
162
|
+
async function query(q, opts = {}) {
|
|
163
|
+
return (await client.query(q, fetchOpts([visualTags.project(config.projectId)], opts.rendering, opts.revalidate))) ?? { dataVersion: 0, total: 0, rows: [] };
|
|
164
|
+
}
|
|
165
|
+
const getLocales = cache(() => client.getLocales({
|
|
166
|
+
next: { revalidate: config.revalidate ?? 60, tags: [visualTags.project(config.projectId)] },
|
|
167
|
+
}));
|
|
168
|
+
/**
|
|
169
|
+
* Languages of the project (ADR-035), from the current release: code, name, nativeName, dir.
|
|
170
|
+
* Use for a language switcher, generateStaticParams, or `<html lang dir>` in your layout.
|
|
171
|
+
*/
|
|
172
|
+
async function locales() {
|
|
173
|
+
return (await getLocales())?.locales ?? [];
|
|
174
|
+
}
|
|
175
|
+
/** Default language of the project (current release), for redirecting "/" → "/{locale}". */
|
|
176
|
+
async function defaultLocale() {
|
|
177
|
+
const l = await getLocales();
|
|
178
|
+
if (l?.defaultLocale ?? l?.locales[0]?.code)
|
|
179
|
+
return l.defaultLocale ?? l.locales[0].code;
|
|
180
|
+
// Releases published before ADR-035 carry no language list: use the published home page.
|
|
181
|
+
const pages = await client.listPages(undefined, { next: { revalidate: config.revalidate ?? 60, tags: [visualTags.project(config.projectId)] } });
|
|
182
|
+
return pages?.pages.find((p) => p.pageKey === home)?.locale ?? pages?.pages[0]?.locale ?? null;
|
|
183
|
+
}
|
|
184
|
+
/** Is this one of the project's published languages? Use it to 404 unknown /{locale} segments. */
|
|
185
|
+
async function hasLocale(locale) {
|
|
186
|
+
return LOCALE_CODE.test(locale) && (await locales()).some((l) => l.code === locale);
|
|
187
|
+
}
|
|
188
|
+
/** "rtl" for Arabic etc. — `<html lang={locale} dir={await visual.localeDir(locale)}>`. */
|
|
189
|
+
async function localeDir(locale) {
|
|
190
|
+
const list = await locales();
|
|
191
|
+
return dirOf(Object.fromEntries(list.map((l) => [l.code, l])), locale);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Route handler for the platform's revalidation webhook (blueprint 53 §4 step 5):
|
|
195
|
+
* export const POST = visual.revalidateHandler(process.env.VISUAL_REVALIDATE_SECRET!)
|
|
196
|
+
*/
|
|
197
|
+
function revalidateHandler(secret) {
|
|
198
|
+
return async (request) => {
|
|
199
|
+
if (!secret || request.headers.get("x-visual-secret") !== secret) {
|
|
200
|
+
return Response.json({ error: "unauthorized" }, { status: 401 });
|
|
201
|
+
}
|
|
202
|
+
const body = (await request.json().catch(() => ({})));
|
|
203
|
+
if (body.projectId !== config.projectId)
|
|
204
|
+
return Response.json({ error: "unknown project" }, { status: 400 });
|
|
205
|
+
// Expire now (not stale-while-revalidate): the next visitor after a publish must see it.
|
|
206
|
+
revalidateTag(visualTags.project(config.projectId), { expire: 0 });
|
|
207
|
+
return Response.json({ revalidated: visualTags.project(config.projectId) });
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
return { client, getPageData, getComponentData, VisualPage, VisualComponent, generateMetadata, revalidateHandler, locales, localeDir, defaultLocale, hasLocale, generateStaticParams, query };
|
|
211
|
+
}
|
|
212
|
+
export { createVisualRegistry } from "@visual-platform/runtime-core";
|
|
213
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAqB,MAAM,4BAA4B,CAAC;AACtI,OAAO,EAAE,kBAAkB,EAAqB,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,YAAY,EAA6C,MAAM,+BAA+B,CAAC;AAExH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,QA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AAS,KAAK,MAAM,CAAC,SAAS;gBAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YAC7G,yFAAyF;YACzF,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;YACnE,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC9E,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAChM,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visual-platform/next",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Visual Page Platform — Next.js SDK: <VisualPage>, <VisualComponent>, metadata, ISR/static.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./events": {
|
|
14
|
+
"types": "./dist/events.d.ts",
|
|
15
|
+
"import": "./dist/events.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@visual-platform/client": "^0.1.0",
|
|
26
|
+
"@visual-platform/contracts": "^0.1.0",
|
|
27
|
+
"@visual-platform/runtime-core": "^0.1.0"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"next": ">=16.3.3 <17",
|
|
31
|
+
"react": "^19.2.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@visual-platform/typescript-config": "0.0.0",
|
|
35
|
+
"typescript": "^7.0.2",
|
|
36
|
+
"vitest": "^5.1.0",
|
|
37
|
+
"react": "19.3.0",
|
|
38
|
+
"react-dom": "19.3.0",
|
|
39
|
+
"@types/react": "^19.2.14",
|
|
40
|
+
"@types/react-dom": "^19.2.3",
|
|
41
|
+
"next": "16.4.2"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc -p tsconfig.build.json",
|
|
45
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
46
|
+
"test": "vitest run --passWithNoTests",
|
|
47
|
+
"clean": "rm -rf dist .turbo"
|
|
48
|
+
}
|
|
6
49
|
}
|
package/README.md
DELETED