@tinacms/vercel-previews 0.0.0-20230516195305 → 0.0.0-20230516235218
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/index.es.js +10 -10
- package/dist/index.js +10 -10
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -15,24 +15,24 @@ function useEditState() {
|
|
|
15
15
|
}, []);
|
|
16
16
|
return { edit };
|
|
17
17
|
}
|
|
18
|
-
const tinaField = (
|
|
18
|
+
const tinaField = (object, property, index) => {
|
|
19
19
|
var _a, _b, _c;
|
|
20
|
-
if (
|
|
21
|
-
if (!
|
|
20
|
+
if (object._content_source) {
|
|
21
|
+
if (!property) {
|
|
22
22
|
return [
|
|
23
|
-
(_a =
|
|
24
|
-
|
|
23
|
+
(_a = object._content_source) == null ? void 0 : _a.queryId,
|
|
24
|
+
object._content_source.path.join(".")
|
|
25
25
|
].join("---");
|
|
26
26
|
}
|
|
27
27
|
if (typeof index === "number") {
|
|
28
28
|
return [
|
|
29
|
-
(_b =
|
|
30
|
-
[...
|
|
29
|
+
(_b = object._content_source) == null ? void 0 : _b.queryId,
|
|
30
|
+
[...object._content_source.path, property, index].join(".")
|
|
31
31
|
].join("---");
|
|
32
32
|
}
|
|
33
33
|
return [
|
|
34
|
-
(_c =
|
|
35
|
-
[...
|
|
34
|
+
(_c = object._content_source) == null ? void 0 : _c.queryId,
|
|
35
|
+
[...object._content_source.path, property].join(".")
|
|
36
36
|
].join("---");
|
|
37
37
|
}
|
|
38
38
|
return "";
|
|
@@ -115,7 +115,7 @@ const useVisualEditing = ({
|
|
|
115
115
|
};
|
|
116
116
|
function encodeEditInfo(path, value, id) {
|
|
117
117
|
const res = `${vercelStegaEncode({
|
|
118
|
-
origin: "
|
|
118
|
+
origin: "tina.io",
|
|
119
119
|
data: { fieldName: `${id}---${path.join(".")}` }
|
|
120
120
|
})}${value}`;
|
|
121
121
|
return res;
|
package/dist/index.js
CHANGED
|
@@ -21,24 +21,24 @@
|
|
|
21
21
|
}, []);
|
|
22
22
|
return { edit };
|
|
23
23
|
}
|
|
24
|
-
const tinaField = (
|
|
24
|
+
const tinaField = (object, property, index) => {
|
|
25
25
|
var _a, _b, _c;
|
|
26
|
-
if (
|
|
27
|
-
if (!
|
|
26
|
+
if (object._content_source) {
|
|
27
|
+
if (!property) {
|
|
28
28
|
return [
|
|
29
|
-
(_a =
|
|
30
|
-
|
|
29
|
+
(_a = object._content_source) == null ? void 0 : _a.queryId,
|
|
30
|
+
object._content_source.path.join(".")
|
|
31
31
|
].join("---");
|
|
32
32
|
}
|
|
33
33
|
if (typeof index === "number") {
|
|
34
34
|
return [
|
|
35
|
-
(_b =
|
|
36
|
-
[...
|
|
35
|
+
(_b = object._content_source) == null ? void 0 : _b.queryId,
|
|
36
|
+
[...object._content_source.path, property, index].join(".")
|
|
37
37
|
].join("---");
|
|
38
38
|
}
|
|
39
39
|
return [
|
|
40
|
-
(_c =
|
|
41
|
-
[...
|
|
40
|
+
(_c = object._content_source) == null ? void 0 : _c.queryId,
|
|
41
|
+
[...object._content_source.path, property].join(".")
|
|
42
42
|
].join("---");
|
|
43
43
|
}
|
|
44
44
|
return "";
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
};
|
|
122
122
|
function encodeEditInfo(path, value, id) {
|
|
123
123
|
const res = `${stega.vercelStegaEncode({
|
|
124
|
-
origin: "
|
|
124
|
+
origin: "tina.io",
|
|
125
125
|
data: { fieldName: `${id}---${path.join(".")}` }
|
|
126
126
|
})}${value}`;
|
|
127
127
|
return res;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/vercel-previews",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20230516235218",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@vercel/stega": "^0.0.4",
|
|
44
|
-
"tinacms": "0.0.0-
|
|
44
|
+
"tinacms": "0.0.0-20230516235218"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": ">=16.14"
|