tinacms 0.68.3 → 0.68.6
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 +34 -0
- package/dist/admin/api.d.ts +7 -9
- package/dist/admin/types.d.ts +1 -0
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/client.d.ts +13 -0
- package/dist/client.es.js +43 -0
- package/dist/client.js +54 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +177 -33
- package/dist/index.js +177 -34
- package/dist/{client → internalClient}/formify.d.ts +0 -0
- package/dist/{client → internalClient}/index.d.ts +0 -0
- package/dist/style.css +87 -9
- package/dist/tina-cms.d.ts +42 -1
- package/dist/unifiedClient/index.d.ts +35 -0
- package/dist/utils/index.d.ts +2 -2
- package/package.json +7 -4
package/dist/tina-cms.d.ts
CHANGED
|
@@ -11,13 +11,19 @@ See the License for the specific language governing permissions and
|
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
|
+
import type { TinaClient } from './client';
|
|
14
15
|
import { TinaCloudMediaStoreClass } from './auth';
|
|
15
16
|
import type { TinaCMS } from '@tinacms/toolkit';
|
|
16
17
|
import type { TinaCloudSchema } from '@tinacms/schema-tools';
|
|
17
|
-
import type { TinaIOConfig } from './
|
|
18
|
+
import type { TinaIOConfig } from './internalClient/index';
|
|
18
19
|
import type { formifyCallback } from './hooks/use-graphql-forms';
|
|
19
20
|
import { useDocumentCreatorPlugin } from './hooks/use-content-creator';
|
|
20
21
|
declare type APIProviderProps = {
|
|
22
|
+
/**
|
|
23
|
+
* The API url From this client will be used to make requests.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
client?: never;
|
|
21
27
|
/**
|
|
22
28
|
* Content API URL
|
|
23
29
|
*
|
|
@@ -42,6 +48,36 @@ declare type APIProviderProps = {
|
|
|
42
48
|
* @deprecated use apiURL instead
|
|
43
49
|
*/
|
|
44
50
|
clientId?: never;
|
|
51
|
+
} | {
|
|
52
|
+
/**
|
|
53
|
+
* The API url From this client will be used to make requests.
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
client: TinaClient<unknown>;
|
|
57
|
+
/**
|
|
58
|
+
* Content API URL
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
apiURL?: never;
|
|
62
|
+
/**
|
|
63
|
+
* Point to the local version of GraphQL instead of tina.io
|
|
64
|
+
* https://tina.io/docs/tinacms-context/#adding-tina-to-the-sites-frontend
|
|
65
|
+
*
|
|
66
|
+
* @deprecated use apiURL instead
|
|
67
|
+
*/
|
|
68
|
+
isLocalClient?: never;
|
|
69
|
+
/**
|
|
70
|
+
* The base branch to pull content from. Note that this is ignored for local development
|
|
71
|
+
*
|
|
72
|
+
* @deprecated use apiURL instead
|
|
73
|
+
*/
|
|
74
|
+
branch?: never;
|
|
75
|
+
/**
|
|
76
|
+
* Your clientID from tina.aio
|
|
77
|
+
*
|
|
78
|
+
* @deprecated use apiURL instead
|
|
79
|
+
*/
|
|
80
|
+
clientId?: never;
|
|
45
81
|
} | {
|
|
46
82
|
/**
|
|
47
83
|
* Content API URL
|
|
@@ -67,6 +103,11 @@ declare type APIProviderProps = {
|
|
|
67
103
|
* @deprecated use apiURL instead
|
|
68
104
|
*/
|
|
69
105
|
clientId?: string;
|
|
106
|
+
/**
|
|
107
|
+
* The API url From this client will be used to make requests.
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
client: never;
|
|
70
111
|
};
|
|
71
112
|
interface BaseProviderProps {
|
|
72
113
|
/** Callback if you need access to the TinaCMS instance */
|
|
@@ -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
|
+
export interface TinaClientArgs<GenQueries = Record<string, unknown>> {
|
|
14
|
+
url: string;
|
|
15
|
+
token?: string;
|
|
16
|
+
queries?: (client: TinaClient<GenQueries>) => GenQueries;
|
|
17
|
+
}
|
|
18
|
+
export declare type TinaClientRequestArgs = {
|
|
19
|
+
variables?: Record<string, any>;
|
|
20
|
+
query: string;
|
|
21
|
+
} & Partial<Omit<TinaClientArgs, 'queries'>>;
|
|
22
|
+
export declare class TinaClient<GenQueries> {
|
|
23
|
+
apiUrl: string;
|
|
24
|
+
readonlyToken?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
queries?: GenQueries;
|
|
29
|
+
constructor({ token, url, queries }: TinaClientArgs<GenQueries>);
|
|
30
|
+
request<DataType extends Record<string, any> = any>(args: TinaClientRequestArgs): Promise<{
|
|
31
|
+
data: DataType;
|
|
32
|
+
query: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
export declare function createClient<GenQueries>(args: TinaClientArgs<GenQueries>): TinaClient<GenQueries>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
-
import { Client } from '../
|
|
14
|
-
import type { TinaIOConfig } from '../
|
|
13
|
+
import { Client } from '../internalClient';
|
|
14
|
+
import type { TinaIOConfig } from '../internalClient';
|
|
15
15
|
import * as yup from 'yup';
|
|
16
16
|
import { TinaCloudSchema } from '@tinacms/schema-tools';
|
|
17
17
|
export interface CreateClientProps {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"entryPoints": [
|
|
10
10
|
"src/index.ts",
|
|
11
11
|
"src/edit-state.tsx",
|
|
12
|
-
"src/rich-text.tsx"
|
|
12
|
+
"src/rich-text.tsx",
|
|
13
|
+
"src/client.ts"
|
|
13
14
|
]
|
|
14
15
|
},
|
|
15
16
|
"typings": "dist/index.d.ts",
|
|
@@ -24,10 +25,12 @@
|
|
|
24
25
|
"@graphql-tools/relay-operation-optimizer": "^6.4.1",
|
|
25
26
|
"@headlessui/react": "^1.5.0",
|
|
26
27
|
"@heroicons/react": "^1.0.4",
|
|
27
|
-
"@
|
|
28
|
+
"@react-hook/window-size": "^3.0.7",
|
|
29
|
+
"@tinacms/schema-tools": "0.0.4",
|
|
28
30
|
"@tinacms/sharedctx": "0.1.1",
|
|
29
|
-
"@tinacms/toolkit": "0.56.
|
|
31
|
+
"@tinacms/toolkit": "0.56.29",
|
|
30
32
|
"crypto-js": "^4.0.0",
|
|
33
|
+
"fetch-ponyfill": "^7.1.0",
|
|
31
34
|
"final-form": "4.20.1",
|
|
32
35
|
"graphql": "^15.1.0",
|
|
33
36
|
"graphql-tag": "^2.11.0",
|