tinacms 0.64.0 → 0.65.1

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.
@@ -16,23 +16,37 @@ import { TinaCloudMediaStoreClass } from './auth';
16
16
  import type { TinaIOConfig } from './client/index';
17
17
  import type { TinaCMS } from '@tinacms/toolkit';
18
18
  import type { formifyCallback } from './hooks/use-graphql-forms';
19
- export declare const TinaCMSProvider2: ({ children, cmsCallback, mediaStore, tinaioConfig, ...props }: {
20
- /** The query from getStaticProps */
21
- query?: string;
22
- /** Any variables from getStaticProps */
23
- variables?: object;
24
- /** The `data` from getStaticProps */
25
- data: object;
26
- /** Your React page component */
27
- children: () => React.ReactNode;
19
+ declare type APIProviderProps = {
28
20
  /**
29
- * The URL for the GraphQL API.
30
- *
31
- * When working locally, this should be http://localhost:4001/graphql.
21
+ * Content API URL
32
22
  *
33
- * For Tina Cloud, use https://content.tinajs.io/content/my-client-id/github/my-branch
34
23
  */
35
24
  apiURL: string;
25
+ /**
26
+ * Point to the local version of GraphQL instead of tina.io
27
+ * https://tina.io/docs/tinacms-context/#adding-tina-to-the-sites-frontend
28
+ *
29
+ * @deprecated use apiURL instead
30
+ */
31
+ isLocalClient?: never;
32
+ /**
33
+ * The base branch to pull content from. Note that this is ignored for local development
34
+ *
35
+ * @deprecated use apiURL instead
36
+ */
37
+ branch?: never;
38
+ /**
39
+ * Your clientID from tina.aio
40
+ *
41
+ * @deprecated use apiURL instead
42
+ */
43
+ clientId?: never;
44
+ } | {
45
+ /**
46
+ * Content API URL
47
+ *
48
+ */
49
+ apiURL?: never;
36
50
  /**
37
51
  * Point to the local version of GraphQL instead of tina.io
38
52
  * https://tina.io/docs/tinacms-context/#adding-tina-to-the-sites-frontend
@@ -52,6 +66,8 @@ export declare const TinaCMSProvider2: ({ children, cmsCallback, mediaStore, tin
52
66
  * @deprecated use apiURL instead
53
67
  */
54
68
  clientId?: string;
69
+ };
70
+ interface BaseProviderProps {
55
71
  /** Callback if you need access to the TinaCMS instance */
56
72
  cmsCallback?: (cms: TinaCMS) => TinaCMS;
57
73
  /** Callback if you need access to the "formify" API */
@@ -61,6 +77,30 @@ export declare const TinaCMSProvider2: ({ children, cmsCallback, mediaStore, tin
61
77
  /** TinaCMS media store instance */
62
78
  mediaStore?: TinaCloudMediaStoreClass | (() => Promise<TinaCloudMediaStoreClass>);
63
79
  tinaioConfig?: TinaIOConfig;
80
+ }
81
+ declare type QueryProviderProps = {
82
+ /** Your React page component */
83
+ children: (props?: any) => React.ReactNode;
84
+ /** The query from getStaticProps */
85
+ query: string | undefined;
86
+ /** Any variables from getStaticProps */
87
+ variables: object | undefined;
88
+ /** The `data` from getStaticProps */
89
+ data: object;
90
+ } | {
91
+ /** Your React page component */
92
+ children: React.ReactNode;
93
+ /** The query from getStaticProps */
94
+ query?: never;
95
+ /** Any variables from getStaticProps */
96
+ variables?: never;
97
+ /** The `data` from getStaticProps */
98
+ data?: never;
99
+ };
100
+ export declare const TinaCMSProvider2: ({ query, documentCreatorCallback, formifyCallback, ...props }: QueryProviderProps & APIProviderProps & BaseProviderProps) => JSX.Element;
101
+ export declare const TinaDataProvider: ({ children, formifyCallback, }: {
102
+ children: any;
103
+ formifyCallback: formifyCallback;
64
104
  }) => JSX.Element;
65
105
  /**
66
106
  * @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/features/data-fetching/#querying-tina-content-in-nextjs for more details
@@ -90,3 +130,4 @@ export declare const staticRequest: ({ query, variables, }: {
90
130
  * query or muation
91
131
  */
92
132
  export declare function gql(strings: TemplateStringsArray, ...args: string[]): string;
133
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.64.0",
3
+ "version": "0.65.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -17,13 +17,14 @@
17
17
  "scripts": {
18
18
  "types": "yarn tsc",
19
19
  "build": "echo \"Run `yarn build` from the root of the repository instead\"",
20
- "test": "jest --env=jsdom --passWithNoTests"
20
+ "test": "jest --env=jsdom --passWithNoTests",
21
+ "test-watch": "jest --env=jsdom --passWithNoTests --watch"
21
22
  },
22
23
  "dependencies": {
23
24
  "@headlessui/react": "^1.4.1",
24
25
  "@heroicons/react": "^1.0.4",
25
- "@tinacms/sharedctx": "0.0.1",
26
- "@tinacms/toolkit": "0.56.6",
26
+ "@tinacms/sharedctx": "0.1.0",
27
+ "@tinacms/toolkit": "0.56.9",
27
28
  "crypto-js": "^4.0.0",
28
29
  "final-form": "4.20.1",
29
30
  "graphql": "^15.1.0",
@@ -38,12 +39,13 @@
38
39
  "@testing-library/jest-dom": "^5.11.9",
39
40
  "@testing-library/react": "^12.0.0",
40
41
  "@testing-library/user-event": "^12.7.0",
41
- "@tinacms/scripts": "0.50.4",
42
+ "@tinacms/scripts": "0.50.5",
42
43
  "@types/jest": "^27.0.1",
43
44
  "@types/lodash": "^4.14.169",
44
45
  "@types/node": "^14.0.13",
45
46
  "@types/react": "^16.9.38",
46
47
  "@types/yup": "^0.29.10",
48
+ "identity-obj-proxy": "^3.0.0",
47
49
  "jest": "^27.0.6",
48
50
  "next": "9.4.2",
49
51
  "react": "16.14.0",
@@ -1,14 +0,0 @@
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;