@tinacms/vercel-previews 0.0.2 → 0.0.4

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
@@ -1,4 +1,4 @@
1
- import { vercelStegaEncode } from "@vercel/stega";
1
+ import { vercelStegaCombine } from "@vercel/stega";
2
2
  import React, { useCallback, useEffect } from "react";
3
3
  function useEditState() {
4
4
  const [edit, setEdit] = React.useState(false);
@@ -114,11 +114,10 @@ const useVisualEditing = ({
114
114
  return data;
115
115
  };
116
116
  function encodeEditInfo(path, value, id) {
117
- const res = `${vercelStegaEncode({
117
+ return vercelStegaCombine(value, {
118
118
  origin: "tina.io",
119
119
  data: { fieldName: `${id}---${path.join(".")}` }
120
- })}${value}`;
121
- return res;
120
+ });
122
121
  }
123
122
  const hashFromQuery = (input) => {
124
123
  let hash = 0;
package/dist/index.js CHANGED
@@ -120,11 +120,10 @@
120
120
  return data;
121
121
  };
122
122
  function encodeEditInfo(path, value, id) {
123
- const res = `${stega.vercelStegaEncode({
123
+ return stega.vercelStegaCombine(value, {
124
124
  origin: "tina.io",
125
125
  data: { fieldName: `${id}---${path.join(".")}` }
126
- })}${value}`;
127
- return res;
126
+ });
128
127
  }
129
128
  const hashFromQuery = (input) => {
130
129
  let hash = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/vercel-previews",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "./dist/index.es.js",
@@ -40,8 +40,8 @@
40
40
  "typescript": "4.3.5"
41
41
  },
42
42
  "dependencies": {
43
- "@vercel/stega": "^0.0.4",
44
- "tinacms": "1.5.7"
43
+ "@vercel/stega": "^0.0.5",
44
+ "tinacms": "1.5.8"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=16.14"