@blox-cms/preview 0.1.1 → 0.1.2
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/README.md +7 -2
- package/package.json +16 -5
- package/src/protocol.ts +3 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Blox CMS preview interactions 0.1.
|
|
1
|
+
# Blox CMS preview interactions 0.1.2
|
|
2
2
|
|
|
3
3
|
Shared React controls and preview bridge protocol v4. This package contains no
|
|
4
4
|
CMS persistence, credentials, site templates or database code. The npm package
|
|
@@ -30,7 +30,7 @@ not a complete CMS SDK or content delivery client.
|
|
|
30
30
|
Install the published package in a client repository:
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
npm install --save-exact @blox-cms/preview@0.1.
|
|
33
|
+
npm install --save-exact @blox-cms/preview@0.1.2
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Import the controls from `@blox-cms/preview` or the protocol from
|
|
@@ -85,3 +85,8 @@ npm run typecheck -- --incremental false
|
|
|
85
85
|
Browser checks use only an in-memory fixture and localhost, never production
|
|
86
86
|
content. Field-level remote inspection and freeform canvas dragging are later
|
|
87
87
|
capabilities; the sidebar remains the precise nested-editing/reordering surface.
|
|
88
|
+
|
|
89
|
+
### 0.1.2
|
|
90
|
+
|
|
91
|
+
The media-preview access type is now owned by this package. Standalone clients
|
|
92
|
+
no longer need a type import from the CMS repository. Runtime protocol stays v4.
|
package/package.json
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blox-cms/preview",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Blox CMS React preview controls and bridge protocol for independent client websites",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./src/index.ts",
|
|
16
|
+
"./protocol": "./src/protocol.ts"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"react": ">=18 <20"
|
|
20
|
+
}
|
|
10
21
|
}
|
package/src/protocol.ts
CHANGED
|
@@ -21,8 +21,10 @@ export const previewCapability = {
|
|
|
21
21
|
|
|
22
22
|
export type PreviewCapability = typeof previewCapability[keyof typeof previewCapability];
|
|
23
23
|
|
|
24
|
+
export type MediaPreviewAccess = { origin: string; token: string; expiresAt: number };
|
|
25
|
+
|
|
24
26
|
export type RemotePreviewRoute = {
|
|
25
|
-
mediaPreview?:
|
|
27
|
+
mediaPreview?: MediaPreviewAccess | null;
|
|
26
28
|
graph: any;
|
|
27
29
|
subject: any;
|
|
28
30
|
routeType: "page" | "entry";
|