tinacms 0.57.1 → 0.58.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # tinacms
2
2
 
3
+ ## 0.58.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d1ed404ba: Add support for auto-generated SDK for type-safe data fetching
8
+
9
+ ### Patch Changes
10
+
11
+ - 138ceb8c4: Clean up dependencies
12
+ - 0417e3750: Adds RouteMapperPlugin and FormMetaPlugin
13
+ - Updated dependencies [138ceb8c4]
14
+ - Updated dependencies [0417e3750]
15
+ - Updated dependencies [d9f37ea7e]
16
+ - @tinacms/toolkit@0.55.3
17
+
18
+ ## 0.57.4
19
+
20
+ ### Patch Changes
21
+
22
+ - 4b7795612: Adds support for collection.templates to TinaAdmin
23
+ - a39ddc611: update media store to load only when in edit mode
24
+ - 1096fe3e4: Ensure forms unmount properly when `useGraphQLForms` unmounts
25
+
26
+ ## 0.57.3
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [2724c48c0]
31
+ - @tinacms/toolkit@0.55.2
32
+
33
+ ## 0.57.2
34
+
35
+ ### Patch Changes
36
+
37
+ - 7849c1233: Fix styles on panel
38
+
3
39
  ## 0.57.1
4
40
 
5
41
  ### Patch Changes
@@ -14,6 +14,7 @@ import type { TinaCMS } from '@tinacms/toolkit';
14
14
  interface Document {
15
15
  node: {
16
16
  sys: {
17
+ template: string;
17
18
  breadcrumbs: string[];
18
19
  path: string;
19
20
  basename: string;
@@ -23,10 +24,16 @@ interface Document {
23
24
  };
24
25
  };
25
26
  }
27
+ export interface Template {
28
+ name: string;
29
+ label: string;
30
+ fields: any[];
31
+ }
26
32
  export interface Collection {
27
33
  label: string;
28
34
  name: string;
29
35
  format: string;
36
+ templates: Template[];
30
37
  documents: {
31
38
  totalCount: number;
32
39
  edges: Document[];
@@ -14,21 +14,24 @@ import type { TinaCMS } from '@tinacms/toolkit';
14
14
  interface GetDocumentFields {
15
15
  [collectionName: string]: {
16
16
  collection: Object;
17
- fields: Object[];
17
+ templates?: Object[];
18
+ fields?: Object[];
18
19
  };
19
20
  }
20
21
  export interface Info {
21
22
  collection: Object | undefined;
23
+ template: Object | undefined;
22
24
  fields: Object[] | undefined;
23
25
  mutationInfo: {
24
26
  includeCollection: boolean;
25
27
  includeTemplate: boolean;
26
28
  };
27
29
  }
28
- export declare const useGetDocumentFields: (cms: TinaCMS, collectionName: string) => Info;
29
- declare const GetDocumentFields: ({ cms, collectionName, children, }: {
30
+ export declare const useGetDocumentFields: (cms: TinaCMS, collectionName: string, templateName: string) => Info;
31
+ declare const GetDocumentFields: ({ cms, collectionName, templateName, children, }: {
30
32
  cms: TinaCMS;
31
33
  collectionName: string;
34
+ templateName?: string;
32
35
  children: any;
33
36
  }) => JSX.Element;
34
37
  export default GetDocumentFields;
@@ -0,0 +1,32 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { Plugin } from '@tinacms/toolkit';
14
+ import { Collection } from '../components/GetCollection';
15
+ interface Document {
16
+ sys: {
17
+ template: string;
18
+ breadcrumbs: string[];
19
+ path: string;
20
+ basename: string;
21
+ relativePath: string;
22
+ filename: string;
23
+ extension: string;
24
+ };
25
+ }
26
+ export declare class RouteMappingPlugin implements Plugin {
27
+ __type: string;
28
+ name: string;
29
+ mapper: (collection: Collection, document: Document) => string | undefined;
30
+ constructor(mapper: (collection: Collection, document: Document) => string | undefined);
31
+ }
32
+ export {};
@@ -29,7 +29,7 @@ export interface TinaCloudAuthWallProps {
29
29
  action: () => Promise<void>;
30
30
  primary: boolean;
31
31
  }[];
32
- mediaStore?: TinaCloudMediaStoreClass | Promise<TinaCloudMediaStoreClass>;
32
+ mediaStore?: TinaCloudMediaStoreClass | (() => Promise<TinaCloudMediaStoreClass>);
33
33
  }
34
34
  export declare const AuthWallInner: ({ children, cms, loginScreen, getModalActions, }: TinaCloudAuthWallProps) => JSX.Element;
35
35
  /**
@@ -43,6 +43,9 @@ const ToggleButton = () => {
43
43
  href: "/admin",
44
44
  style: {
45
45
  borderRadius: "0 50px 50px 0",
46
+ fontSize: "16px",
47
+ fontFamily: "Inter, 'Helvetica Neue', 'Arial Nova', Helvetica, Arial, sans-serif",
48
+ fontWeight: "bold",
46
49
  textDecoration: "none",
47
50
  background: "rgb(34, 150, 254)",
48
51
  boxShadow: "0px 1px 3px rgb(0 0 0 / 10%), 0px 2px 6px rgb(0 0 0 / 20%)",
@@ -50,6 +50,9 @@ var __objRest = (source, exclude) => {
50
50
  href: "/admin",
51
51
  style: {
52
52
  borderRadius: "0 50px 50px 0",
53
+ fontSize: "16px",
54
+ fontFamily: "Inter, 'Helvetica Neue', 'Arial Nova', Helvetica, Arial, sans-serif",
55
+ fontWeight: "bold",
53
56
  textDecoration: "none",
54
57
  background: "rgb(34, 150, 254)",
55
58
  boxShadow: "0px 1px 3px rgb(0 0 0 / 10%), 0px 2px 6px rgb(0 0 0 / 20%)",
package/dist/index.d.ts CHANGED
@@ -18,5 +18,6 @@ export { useGraphqlForms } from './hooks/use-graphql-forms';
18
18
  export { useDocumentCreatorPlugin } from './hooks/use-content-creator';
19
19
  export * from '@tinacms/toolkit';
20
20
  export { TinaAdmin } from './admin';
21
+ export { RouteMappingPlugin } from './admin/plugins/route-mapping';
21
22
  import { TinaCMSProvider2 } from './tina-cms';
22
23
  export default TinaCMSProvider2;