@decocms/apps-website 7.77.10 → 7.77.12
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/apps-website",
|
|
3
|
-
"version": "7.77.
|
|
3
|
+
"version": "7.77.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco generic-site app: SEO, analytics, theme, and content utilities shared across every commerce backend",
|
|
6
6
|
"repository": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"./mod": "./src/mod.ts",
|
|
19
19
|
"./client": "./src/client.ts",
|
|
20
20
|
"./types": "./src/types.ts",
|
|
21
|
+
"./functions/*": "./src/functions/*.ts",
|
|
21
22
|
"./components/*": "./src/components/*.tsx",
|
|
22
23
|
"./loaders/*": "./src/loaders/*.ts",
|
|
23
24
|
"./loaders/fonts/*": "./src/loaders/fonts/*.ts",
|
|
@@ -32,8 +33,8 @@
|
|
|
32
33
|
"lint:unused": "knip"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@decocms/blocks": "7.77.
|
|
36
|
-
"@decocms/apps-commerce": "7.77.
|
|
36
|
+
"@decocms/blocks": "7.77.12",
|
|
37
|
+
"@decocms/apps-commerce": "7.77.12"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"react": "^19.0.0",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `website/functions/requestToParam.ts` — reads a route param (e.g. `:slug`)
|
|
3
|
+
* from the request URL.
|
|
4
|
+
*
|
|
5
|
+
* The runtime already resolves blocks saved as
|
|
6
|
+
* `{ "__resolveType": "website/functions/requestToParam.ts", "param": "slug" }`
|
|
7
|
+
* (`WELL_KNOWN_TYPES.REQUEST_TO_PARAM` in `@decocms/blocks/cms`). This module
|
|
8
|
+
* gives sections the same prop type deco-cx/deco offered, so the schema
|
|
9
|
+
* generator can emit the admin's "Force param" / "Get params from request
|
|
10
|
+
* parameters" picker for it instead of a bare string.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export interface Props {
|
|
14
|
+
/**
|
|
15
|
+
* @description Param name to extract from the Request URL
|
|
16
|
+
* @default slug
|
|
17
|
+
*/
|
|
18
|
+
param: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A route param from the request URL, or a fixed value. Resolves to a string;
|
|
23
|
+
* the schema generator recognizes this alias by name.
|
|
24
|
+
*/
|
|
25
|
+
export type RequestURLParam = string;
|