siteplane 0.1.55 → 0.1.56
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/bin/siteplane.js +8 -0
- package/dist/index.js +8 -0
- package/dist/next.js +8 -0
- package/package.json +1 -1
package/dist/bin/siteplane.js
CHANGED
|
@@ -1409,9 +1409,17 @@ var editorSectionSchema = z16.object({
|
|
|
1409
1409
|
});
|
|
1410
1410
|
var editorRouteSchema = z16.object({
|
|
1411
1411
|
routeKey: siteFieldRouteKeySchema,
|
|
1412
|
+
previewPath: z16.string().trim().refine((path) => path.startsWith("/") && !path.startsWith("//") && !/[\\\[\]?#\s]/u.test(path) && (path === "/" || !path.endsWith("/")), "previewPath must be a concrete same-site path, for example /services/consultation.").optional(),
|
|
1412
1413
|
label: z16.string().trim().min(1),
|
|
1413
1414
|
sections: z16.array(editorSectionSchema).min(1)
|
|
1414
1415
|
}).strict().superRefine((route, context) => {
|
|
1416
|
+
if (route.routeKey.includes("[") && !route.previewPath) {
|
|
1417
|
+
context.addIssue({
|
|
1418
|
+
code: "custom",
|
|
1419
|
+
path: ["previewPath"],
|
|
1420
|
+
message: "Dynamic editor routes need a previewPath for an existing page; keep the canonical routeKey unchanged."
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1415
1423
|
const sections = /* @__PURE__ */ new Set();
|
|
1416
1424
|
for (const [index, section] of route.sections.entries()) {
|
|
1417
1425
|
if (sections.has(section.label)) {
|
package/dist/index.js
CHANGED
|
@@ -1137,9 +1137,17 @@ var editorSectionSchema = z16.object({
|
|
|
1137
1137
|
});
|
|
1138
1138
|
var editorRouteSchema = z16.object({
|
|
1139
1139
|
routeKey: siteFieldRouteKeySchema,
|
|
1140
|
+
previewPath: z16.string().trim().refine((path) => path.startsWith("/") && !path.startsWith("//") && !/[\\\[\]?#\s]/u.test(path) && (path === "/" || !path.endsWith("/")), "previewPath must be a concrete same-site path, for example /services/consultation.").optional(),
|
|
1140
1141
|
label: z16.string().trim().min(1),
|
|
1141
1142
|
sections: z16.array(editorSectionSchema).min(1)
|
|
1142
1143
|
}).strict().superRefine((route, context) => {
|
|
1144
|
+
if (route.routeKey.includes("[") && !route.previewPath) {
|
|
1145
|
+
context.addIssue({
|
|
1146
|
+
code: "custom",
|
|
1147
|
+
path: ["previewPath"],
|
|
1148
|
+
message: "Dynamic editor routes need a previewPath for an existing page; keep the canonical routeKey unchanged."
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1143
1151
|
const sections = /* @__PURE__ */ new Set();
|
|
1144
1152
|
for (const [index, section] of route.sections.entries()) {
|
|
1145
1153
|
if (sections.has(section.label)) {
|
package/dist/next.js
CHANGED
|
@@ -1340,9 +1340,17 @@ var editorSectionSchema = z16.object({
|
|
|
1340
1340
|
});
|
|
1341
1341
|
var editorRouteSchema = z16.object({
|
|
1342
1342
|
routeKey: siteFieldRouteKeySchema,
|
|
1343
|
+
previewPath: z16.string().trim().refine((path) => path.startsWith("/") && !path.startsWith("//") && !/[\\\[\]?#\s]/u.test(path) && (path === "/" || !path.endsWith("/")), "previewPath must be a concrete same-site path, for example /services/consultation.").optional(),
|
|
1343
1344
|
label: z16.string().trim().min(1),
|
|
1344
1345
|
sections: z16.array(editorSectionSchema).min(1)
|
|
1345
1346
|
}).strict().superRefine((route, context) => {
|
|
1347
|
+
if (route.routeKey.includes("[") && !route.previewPath) {
|
|
1348
|
+
context.addIssue({
|
|
1349
|
+
code: "custom",
|
|
1350
|
+
path: ["previewPath"],
|
|
1351
|
+
message: "Dynamic editor routes need a previewPath for an existing page; keep the canonical routeKey unchanged."
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1346
1354
|
const sections = /* @__PURE__ */ new Set();
|
|
1347
1355
|
for (const [index, section] of route.sections.entries()) {
|
|
1348
1356
|
if (sections.has(section.label)) {
|