tinacms 1.4.2 → 1.4.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
@@ -45,9 +45,7 @@ const parseRefForBranchName = (ref) => {
45
45
  return matches[1];
46
46
  };
47
47
  const ListBranchResponse = z.object({
48
- name: z.string(),
49
- protected: z.boolean(),
50
- commit: z.object({ sha: z.string(), url: z.string() })
48
+ name: z.string()
51
49
  }).array();
52
50
  const IndexStatusResponse = z.object({
53
51
  status: z.union([
@@ -3155,7 +3153,8 @@ const CollectionListPage = () => {
3155
3153
  order: "asc",
3156
3154
  name: ""
3157
3155
  }));
3158
- const [sortOrder, setSortOrder] = useState("asc");
3156
+ const { order = "asc" } = JSON.parse(sortKey || "{}");
3157
+ const [sortOrder, setSortOrder] = useState(order);
3159
3158
  const loc = useLocation();
3160
3159
  useEffect(() => {
3161
3160
  setSortKey(window.localStorage.getItem(`${LOCAL_STORAGE_KEY}.${collectionName}`) || JSON.stringify({
package/dist/index.js CHANGED
@@ -60,9 +60,7 @@
60
60
  return matches[1];
61
61
  };
62
62
  const ListBranchResponse = zod.z.object({
63
- name: zod.z.string(),
64
- protected: zod.z.boolean(),
65
- commit: zod.z.object({ sha: zod.z.string(), url: zod.z.string() })
63
+ name: zod.z.string()
66
64
  }).array();
67
65
  const IndexStatusResponse = zod.z.object({
68
66
  status: zod.z.union([
@@ -3170,7 +3168,8 @@ This will work when developing locally but NOT when deployed to production.
3170
3168
  order: "asc",
3171
3169
  name: ""
3172
3170
  }));
3173
- const [sortOrder, setSortOrder] = React.useState("asc");
3171
+ const { order = "asc" } = JSON.parse(sortKey || "{}");
3172
+ const [sortOrder, setSortOrder] = React.useState(order);
3174
3173
  const loc = reactRouterDom.useLocation();
3175
3174
  React.useEffect(() => {
3176
3175
  setSortKey(window.localStorage.getItem(`${LOCAL_STORAGE_KEY}.${collectionName}`) || JSON.stringify({
@@ -217,11 +217,6 @@ export declare class Client {
217
217
  timestamp?: number;
218
218
  };
219
219
  name?: string;
220
- protected?: boolean;
221
- commit?: {
222
- url?: string;
223
- sha?: string;
224
- };
225
220
  }[]>;
226
221
  createBranch({ baseBranch, branchName }: BranchData): Promise<string>;
227
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "exports": {
@@ -58,7 +58,7 @@
58
58
  "@react-hook/window-size": "^3.0.7",
59
59
  "@tinacms/schema-tools": "1.4.2",
60
60
  "@tinacms/sharedctx": "1.0.1",
61
- "@tinacms/toolkit": "1.6.1",
61
+ "@tinacms/toolkit": "1.6.3",
62
62
  "crypto-js": "^4.0.0",
63
63
  "encoding": "0.1.13",
64
64
  "fetch-ponyfill": "^7.1.0",