@reblu/site-next 1.8.0 → 1.10.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 +51 -0
- package/README.md +31 -8
- package/dist/academy-server.cjs +52 -0
- package/dist/academy-server.cjs.map +1 -0
- package/dist/academy-server.d.cts +84 -0
- package/dist/academy-server.d.ts +84 -0
- package/dist/academy-server.js +25 -0
- package/dist/academy-server.js.map +1 -0
- package/dist/academy.cjs.map +1 -1
- package/dist/academy.d.cts +3 -82
- package/dist/academy.d.ts +3 -82
- package/dist/academy.js.map +1 -1
- package/dist/consent-server.cjs +88 -0
- package/dist/consent-server.cjs.map +1 -0
- package/dist/consent-server.d.cts +22 -0
- package/dist/consent-server.d.ts +22 -0
- package/dist/consent-server.js +58 -0
- package/dist/consent-server.js.map +1 -0
- package/dist/consent-shared-DbdhEXW2.d.cts +71 -0
- package/dist/consent-shared-DbdhEXW2.d.ts +71 -0
- package/dist/consent.cjs +404 -0
- package/dist/consent.cjs.map +1 -0
- package/dist/consent.d.cts +172 -0
- package/dist/consent.d.ts +172 -0
- package/dist/consent.js +362 -0
- package/dist/consent.js.map +1 -0
- package/dist/site-manifest.cjs +48 -0
- package/dist/site-manifest.cjs.map +1 -0
- package/dist/site-manifest.d.cts +50 -0
- package/dist/site-manifest.d.ts +50 -0
- package/dist/site-manifest.js +23 -0
- package/dist/site-manifest.js.map +1 -0
- package/package.json +45 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/site-manifest.ts
|
|
2
|
+
var MANIFEST_VERSION = 1;
|
|
3
|
+
function createSiteManifestRoute(opts) {
|
|
4
|
+
const { surfaces, sdkVersion } = opts;
|
|
5
|
+
return function handler() {
|
|
6
|
+
const body = {
|
|
7
|
+
manifestVersion: MANIFEST_VERSION,
|
|
8
|
+
...sdkVersion ? { sdkVersion } : {},
|
|
9
|
+
surfaces
|
|
10
|
+
};
|
|
11
|
+
return new Response(JSON.stringify(body), {
|
|
12
|
+
status: 200,
|
|
13
|
+
headers: {
|
|
14
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
15
|
+
"Cache-Control": "public, max-age=300, stale-while-revalidate=60"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
createSiteManifestRoute
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=site-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/site-manifest.ts"],"sourcesContent":["/**\n * `@reblu/site-next/site-manifest` — server-only, dependency-free Route\n * Handler factory for a SITE's capability manifest (REB-777, owner-approved\n * design 2026-09-28). Same isolation rule as `route-handlers.ts` (REB-510):\n * its own tsup entry, no `'use client'`, no `@reblu/site-ui`, so a SITE can\n * import it from `app/.well-known/reblu-site.json/route.ts` without\n * dragging in any client-component graph.\n *\n * The manifest declares, per capability SURFACE key, whether this SITE has\n * implemented it — nexus fetches it to warn an OWNER when a sold module\n * (e.g. academy) has no matching page on their SITE yet. This is NOT\n * REB-744 (canonical route keys + per-route redirect generation, still\n * unimplemented at the time this shipped): REB-744's keys are whole-module\n * redirect targets (`academy`); these are finer-grained capability flags\n * (`academy.enrollment`). See `site-manifest.contract.ts` in base-api for\n * the full direction/relationship note — that file is this factory's\n * canonical schema; this module only imports the TYPE from\n * `@reblu/site-contracts`, never Zod, because it only ever PRODUCES this\n * JSON — validating it is nexus's job, not this factory's.\n *\n * export const GET = createSiteManifestRoute({\n * surfaces: { 'academy.enrollment': { path: '/academia/inscripcion' } },\n * })\n *\n * Public and cacheable briefly — this payload holds no tenant secrets, only\n * the shape of routes this SITE deploys, so the `Cache-Control` below is\n * intentionally permissive (mirrors the design brief: \"public, cacheable\n * briefly\").\n */\nimport type { SiteCapabilitySurfaceKey, SiteManifestSurfaceValue } from '@reblu/site-contracts'\n\nexport interface CreateSiteManifestRouteOptions {\n /**\n * Which capability surfaces this SITE implements, and where. A key not\n * present here is reported to nexus as not implemented — there is no\n * \"maybe\" state on the producer side.\n */\n surfaces: Partial<Record<SiteCapabilitySurfaceKey, SiteManifestSurfaceValue>>\n /** Optional SDK version string, surfaced as-is for nexus/observability. */\n sdkVersion?: string\n}\n\nconst MANIFEST_VERSION = 1 as const\n\n/**\n * Creates a Next.js Route Handler that serves this SITE's capability\n * manifest as JSON. Synchronous and dependency-free by design — there is\n * nothing to await, no upstream to proxy, no `next/server` import needed.\n */\nexport function createSiteManifestRoute(opts: CreateSiteManifestRouteOptions) {\n const { surfaces, sdkVersion } = opts\n\n return function handler(): Response {\n const body = {\n manifestVersion: MANIFEST_VERSION,\n ...(sdkVersion ? { sdkVersion } : {}),\n surfaces,\n }\n\n return new Response(JSON.stringify(body), {\n status: 200,\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n 'Cache-Control': 'public, max-age=300, stale-while-revalidate=60',\n },\n })\n }\n}\n"],"mappings":";AA0CA,IAAM,mBAAmB;AAOlB,SAAS,wBAAwB,MAAsC;AAC5E,QAAM,EAAE,UAAU,WAAW,IAAI;AAEjC,SAAO,SAAS,UAAoB;AAClC,UAAM,OAAO;AAAA,MACX,iBAAiB;AAAA,MACjB,GAAI,aAAa,EAAE,WAAW,IAAI,CAAC;AAAA,MACnC;AAAA,IACF;AAEA,WAAO,IAAI,SAAS,KAAK,UAAU,IAAI,GAAG;AAAA,MACxC,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,MACnB;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reblu/site-next",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Next.js RSC glue for Reblu SITEs — cache + CTA + auth server/client components.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Reblu — Adolfo Unturbe",
|
|
@@ -82,6 +82,16 @@
|
|
|
82
82
|
"default": "./dist/route-handlers.cjs"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
+
"./site-manifest": {
|
|
86
|
+
"import": {
|
|
87
|
+
"types": "./dist/site-manifest.d.ts",
|
|
88
|
+
"default": "./dist/site-manifest.js"
|
|
89
|
+
},
|
|
90
|
+
"require": {
|
|
91
|
+
"types": "./dist/site-manifest.d.cts",
|
|
92
|
+
"default": "./dist/site-manifest.cjs"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
85
95
|
"./json-ld": {
|
|
86
96
|
"import": {
|
|
87
97
|
"types": "./dist/json-ld.d.ts",
|
|
@@ -112,6 +122,16 @@
|
|
|
112
122
|
"default": "./dist/academy.cjs"
|
|
113
123
|
}
|
|
114
124
|
},
|
|
125
|
+
"./academy-server": {
|
|
126
|
+
"import": {
|
|
127
|
+
"types": "./dist/academy-server.d.ts",
|
|
128
|
+
"default": "./dist/academy-server.js"
|
|
129
|
+
},
|
|
130
|
+
"require": {
|
|
131
|
+
"types": "./dist/academy-server.d.cts",
|
|
132
|
+
"default": "./dist/academy-server.cjs"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
115
135
|
"./recaptcha": {
|
|
116
136
|
"import": {
|
|
117
137
|
"types": "./dist/recaptcha.d.ts",
|
|
@@ -121,6 +141,26 @@
|
|
|
121
141
|
"types": "./dist/recaptcha.d.cts",
|
|
122
142
|
"default": "./dist/recaptcha.cjs"
|
|
123
143
|
}
|
|
144
|
+
},
|
|
145
|
+
"./consent-server": {
|
|
146
|
+
"import": {
|
|
147
|
+
"types": "./dist/consent-server.d.ts",
|
|
148
|
+
"default": "./dist/consent-server.js"
|
|
149
|
+
},
|
|
150
|
+
"require": {
|
|
151
|
+
"types": "./dist/consent-server.d.cts",
|
|
152
|
+
"default": "./dist/consent-server.cjs"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"./consent": {
|
|
156
|
+
"import": {
|
|
157
|
+
"types": "./dist/consent.d.ts",
|
|
158
|
+
"default": "./dist/consent.js"
|
|
159
|
+
},
|
|
160
|
+
"require": {
|
|
161
|
+
"types": "./dist/consent.d.cts",
|
|
162
|
+
"default": "./dist/consent.cjs"
|
|
163
|
+
}
|
|
124
164
|
}
|
|
125
165
|
},
|
|
126
166
|
"publishConfig": {
|
|
@@ -132,18 +172,21 @@
|
|
|
132
172
|
"react": ">=19"
|
|
133
173
|
},
|
|
134
174
|
"dependencies": {
|
|
175
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
135
176
|
"@reblu/site-client": "^5.1.0",
|
|
136
|
-
"@reblu/site-contracts": "^1.0
|
|
177
|
+
"@reblu/site-contracts": "^1.2.0",
|
|
137
178
|
"@reblu/site-ui": "^0.5.1"
|
|
138
179
|
},
|
|
139
180
|
"devDependencies": {
|
|
140
181
|
"@testing-library/jest-dom": "^6.9.1",
|
|
141
182
|
"@testing-library/react": "^16.3.1",
|
|
142
183
|
"@testing-library/user-event": "^14.6.1",
|
|
184
|
+
"@types/jest-axe": "^3.5.9",
|
|
143
185
|
"@types/node": "^22.15.3",
|
|
144
186
|
"@types/react": "^19.1.2",
|
|
145
187
|
"@vitejs/plugin-react": "^4.4.1",
|
|
146
188
|
"@vitest/coverage-v8": "^4.0.15",
|
|
189
|
+
"jest-axe": "^10.0.0",
|
|
147
190
|
"jsdom": "^27.3.0",
|
|
148
191
|
"next": "16.2.4",
|
|
149
192
|
"next-themes": "^0.4.6",
|