@avocadostudio-ai/shared 0.3.0 → 0.3.1
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/schemas.d.ts +17 -0
- package/dist/schemas.js +1 -1
- package/package.json +3 -3
package/dist/schemas.d.ts
CHANGED
|
@@ -20,6 +20,23 @@ export type PageMeta = {
|
|
|
20
20
|
};
|
|
21
21
|
export type PageDoc = {
|
|
22
22
|
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* The page's identity, as a path beginning with `"/"`. The home page is
|
|
25
|
+
* `"/"` — not `""`.
|
|
26
|
+
*
|
|
27
|
+
* This is a convention, not a validated format, and it was discoverable
|
|
28
|
+
* only from `buildSlug([])`'s body and the demo seed data. An integration
|
|
29
|
+
* that projects bare paths (`""`, `"events"`) mostly appears to work,
|
|
30
|
+
* because every non-empty slug resolves by string equality — and then the
|
|
31
|
+
* home page alone answers 400 with "session and slug are required", which
|
|
32
|
+
* reads as a missing query parameter rather than a malformed slug, and
|
|
33
|
+
* lands in the editor as the site's own 404 page inside the iframe.
|
|
34
|
+
*
|
|
35
|
+
* Build it with `buildSlug(segments)` rather than by hand. Where the URL a
|
|
36
|
+
* visitor uses differs from this identity — a locale prefix, a basePath, a
|
|
37
|
+
* CMS that owns its routing — put the URL in `meta.path` and leave the slug
|
|
38
|
+
* as the identity.
|
|
39
|
+
*/
|
|
23
40
|
slug: string;
|
|
24
41
|
title: string;
|
|
25
42
|
updatedAt: string;
|
package/dist/schemas.js
CHANGED
|
@@ -24,7 +24,7 @@ export const pageMetaSchema = z.object({
|
|
|
24
24
|
*
|
|
25
25
|
* Avocado has always treated the slug as the URL, which holds only while a
|
|
26
26
|
* site's routing is Avocado's. It is not for anything with a locale prefix,
|
|
27
|
-
* a basePath, or a CMS that owns its own routes:
|
|
27
|
+
* a basePath, or a CMS that owns its own routes: a field-level-i18n CMS keeps
|
|
28
28
|
* one editable page per (document x language), so `/de/events` is a page
|
|
29
29
|
* identity, while the site serves German at the root and answers 404 for
|
|
30
30
|
* that path. An agent given the slug and told to open it goes to a 404 and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avocadostudio-ai/shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"zod": "^4.3.6",
|
|
22
|
-
"@avocadostudio-ai/richtext": "^0.3.
|
|
22
|
+
"@avocadostudio-ai/richtext": "^0.3.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"tsx": "^4.21.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"visual-editing"
|
|
38
38
|
],
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
|
-
"homepage": "https://
|
|
40
|
+
"homepage": "https://docs.avocadostudio.dev",
|
|
41
41
|
"bugs": {
|
|
42
42
|
"url": "https://github.com/avocadostudio-ai/avocado/issues"
|
|
43
43
|
},
|