tinacms 0.56.0 → 0.57.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,39 @@
1
1
  # tinacms
2
2
 
3
+ ## 0.57.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b99baebf1: Add rich-text editor based on mdx, bump React dependency requirement to 16.14
8
+
9
+ ### Patch Changes
10
+
11
+ - 891623c7c: Adds support for List and Update to TinaAdmin
12
+ - d5e3adf37: Adds support for Log In & Log Out to TinaAdmin
13
+ - Updated dependencies [b99baebf1]
14
+ - @tinacms/toolkit@0.55.0
15
+
16
+ ## 0.56.3
17
+
18
+ ### Patch Changes
19
+
20
+ - 67df49220: Allow dashes in filenames for content creator
21
+ - Updated dependencies [b961c7417]
22
+ - @tinacms/toolkit@0.54.1
23
+
24
+ ## 0.56.2
25
+
26
+ ### Patch Changes
27
+
28
+ - 84a86358f: Fix bug which reset the form onChange for GraphQL forms
29
+
30
+ ## 0.56.1
31
+
32
+ ### Patch Changes
33
+
34
+ - a05aa61bd: Fix issue where forms weren't being removed when the page unmounted
35
+ - @tinacms/toolkit@0.54.0
36
+
3
37
  ## 0.56.0
4
38
 
5
39
  ### Minor Changes
@@ -0,0 +1,16 @@
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
+ declare const GetCMS: ({ children }: {
14
+ children: any;
15
+ }) => JSX.Element;
16
+ export default GetCMS;
@@ -0,0 +1,42 @@
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 type { TinaCMS } from '@tinacms/toolkit';
14
+ interface Document {
15
+ node: {
16
+ sys: {
17
+ breadcrumbs: string[];
18
+ path: string;
19
+ basename: string;
20
+ relativePath: string;
21
+ filename: string;
22
+ extension: string;
23
+ };
24
+ };
25
+ }
26
+ export interface Collection {
27
+ label: string;
28
+ name: string;
29
+ format: string;
30
+ documents: {
31
+ totalCount: number;
32
+ edges: Document[];
33
+ };
34
+ }
35
+ export declare const useGetCollection: (cms: TinaCMS, collectionName: string, includeDocuments?: boolean) => Collection;
36
+ declare const GetCollection: ({ cms, collectionName, includeDocuments, children, }: {
37
+ cms: TinaCMS;
38
+ collectionName: string;
39
+ includeDocuments?: boolean;
40
+ children: any;
41
+ }) => JSX.Element;
42
+ export default GetCollection;
@@ -0,0 +1,23 @@
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 type { TinaCMS } from '@tinacms/toolkit';
14
+ export interface Collection {
15
+ label: string;
16
+ name: string;
17
+ }
18
+ export declare const useGetCollections: (cms: TinaCMS) => Collection[];
19
+ declare const GetCollections: ({ cms, children }: {
20
+ cms: TinaCMS;
21
+ children: any;
22
+ }) => JSX.Element;
23
+ export default GetCollections;
@@ -0,0 +1,35 @@
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 type { TinaCMS } from '@tinacms/toolkit';
14
+ export interface Document {
15
+ form: {
16
+ label: string;
17
+ name: string;
18
+ fields: Object[];
19
+ mutationInfo: {
20
+ path: string[];
21
+ string: string;
22
+ includeCollection: boolean;
23
+ includeTemplate: boolean;
24
+ };
25
+ };
26
+ values: Object;
27
+ }
28
+ export declare const useGetDocument: (cms: TinaCMS, collectionName: string, relativePath: string) => Document;
29
+ declare const GetDocument: ({ cms, collectionName, relativePath, children, }: {
30
+ cms: TinaCMS;
31
+ collectionName: string;
32
+ relativePath: string;
33
+ children: any;
34
+ }) => JSX.Element;
35
+ export default GetDocument;
@@ -0,0 +1,34 @@
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 type { TinaCMS } from '@tinacms/toolkit';
14
+ interface GetDocumentFields {
15
+ [collectionName: string]: {
16
+ collection: Object;
17
+ fields: Object[];
18
+ };
19
+ }
20
+ export interface Info {
21
+ collection: Object | undefined;
22
+ fields: Object[] | undefined;
23
+ mutationInfo: {
24
+ includeCollection: boolean;
25
+ includeTemplate: boolean;
26
+ };
27
+ }
28
+ export declare const useGetDocumentFields: (cms: TinaCMS, collectionName: string) => Info;
29
+ declare const GetDocumentFields: ({ cms, collectionName, children, }: {
30
+ cms: TinaCMS;
31
+ collectionName: string;
32
+ children: any;
33
+ }) => JSX.Element;
34
+ export default GetDocumentFields;
@@ -0,0 +1,16 @@
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
+ declare const Layout: ({ children }: {
14
+ children: any;
15
+ }) => JSX.Element;
16
+ export default Layout;
@@ -0,0 +1,14 @@
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
+ declare const useEmbedTailwind: () => void;
14
+ export default useEmbedTailwind;
@@ -0,0 +1,13 @@
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
+ export declare const TinaAdmin: () => JSX.Element;
@@ -0,0 +1,14 @@
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
+ declare const CollectionCreatePage: () => JSX.Element;
14
+ export default CollectionCreatePage;
@@ -0,0 +1,14 @@
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
+ declare const CollectionListPage: () => JSX.Element;
14
+ export default CollectionListPage;
@@ -0,0 +1,14 @@
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
+ declare const CollectionUpdatePage: () => JSX.Element;
14
+ export default CollectionUpdatePage;
@@ -0,0 +1,14 @@
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
+ declare const DashboardPage: () => JSX.Element;
14
+ export default DashboardPage;
@@ -0,0 +1,14 @@
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
+ declare const LoginPage: () => JSX.Element;
14
+ export default LoginPage;
@@ -20,6 +20,15 @@ export declare function useGraphqlForms<T extends object>({ query, variables, on
20
20
  onSubmit?: (args: onSubmitArgs) => void;
21
21
  formify?: formifyCallback;
22
22
  }): [T, Boolean];
23
+ export declare const transformDocumentIntoMutationRequestPayload: (document: {
24
+ [key: string]: unknown;
25
+ _collection: string;
26
+ __typename?: string;
27
+ _template: string;
28
+ }, instructions: {
29
+ includeCollection?: boolean;
30
+ includeTemplate?: boolean;
31
+ }) => any;
23
32
  declare type FormCreator = (formConfig: FormOptions<any>) => Form;
24
33
  export interface FormifyArgs {
25
34
  formConfig: FormOptions<any>;
package/dist/index.d.ts CHANGED
@@ -17,5 +17,6 @@ export * from './tina-cms';
17
17
  export { useGraphqlForms } from './hooks/use-graphql-forms';
18
18
  export { useDocumentCreatorPlugin } from './hooks/use-content-creator';
19
19
  export * from '@tinacms/toolkit';
20
+ export { TinaAdmin } from './admin';
20
21
  import { TinaCMSProvider2 } from './tina-cms';
21
22
  export default TinaCMSProvider2;