@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 CHANGED
@@ -15,24 +15,24 @@ function useEditState() {
15
15
  }, []);
16
16
  return { edit };
17
17
  }
18
- const tinaField = (obj, field, index) => {
18
+ const tinaField = (object, property, index) => {
19
19
  var _a, _b, _c;
20
- if (obj._content_source) {
21
- if (!field) {
20
+ if (object._content_source) {
21
+ if (!property) {
22
22
  return [
23
- (_a = obj._content_source) == null ? void 0 : _a.queryId,
24
- obj._content_source.path.join(".")
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 = obj._content_source) == null ? void 0 : _b.queryId,
30
- [...obj._content_source.path, field, index].join(".")
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 = obj._content_source) == null ? void 0 : _c.queryId,
35
- [...obj._content_source.path, field].join(".")
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: "tinacms",
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 = (obj, field, index) => {
24
+ const tinaField = (object, property, index) => {
25
25
  var _a, _b, _c;
26
- if (obj._content_source) {
27
- if (!field) {
26
+ if (object._content_source) {
27
+ if (!property) {
28
28
  return [
29
- (_a = obj._content_source) == null ? void 0 : _a.queryId,
30
- obj._content_source.path.join(".")
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 = obj._content_source) == null ? void 0 : _b.queryId,
36
- [...obj._content_source.path, field, index].join(".")
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 = obj._content_source) == null ? void 0 : _c.queryId,
41
- [...obj._content_source.path, field].join(".")
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: "tinacms",
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-20230516195305",
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-20230516195305"
44
+ "tinacms": "0.0.0-20230516235218"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=16.14"