tinacms 1.2.2 → 1.3.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.
- package/dist/admin/api.d.ts +3 -3
- package/dist/admin/components/FullscreenError.d.ts +5 -0
- package/dist/admin/components/GetCollection.d.ts +3 -3
- package/dist/admin/components/GetCollections.d.ts +1 -1
- package/dist/admin/plugins/route-mapping.d.ts +3 -3
- package/dist/admin/types.d.ts +3 -3
- package/dist/hooks/use-graphql-forms.d.ts +0 -12
- package/dist/index.d.ts +11 -20
- package/dist/index.es.js +335 -2425
- package/dist/index.js +337 -2428
- package/dist/internalClient/index.d.ts +3 -7
- package/dist/style.css +212 -188
- package/dist/tina-cms.d.ts +0 -5
- package/dist/types/cms.d.ts +3 -3
- package/dist/utils/index.d.ts +2 -2
- package/package.json +4 -4
- package/dist/hooks/formify/formify-utils.d.ts +0 -81
- package/dist/hooks/formify/formify.d.ts +0 -13
- package/dist/hooks/formify/index.d.ts +0 -16
- package/dist/hooks/formify/reducer.d.ts +0 -18
- package/dist/hooks/formify/spec/runner.d.ts +0 -4
- package/dist/hooks/formify/spec/schema.d.ts +0 -3
- package/dist/hooks/formify/spec/util.d.ts +0 -16
- package/dist/hooks/formify/types.d.ts +0 -166
- package/dist/hooks/formify/util.d.ts +0 -139
package/dist/admin/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TinaCMS } from '@tinacms/toolkit';
|
|
2
2
|
import type { TinaSchema } from '@tinacms/schema-tools';
|
|
3
3
|
import type { Client } from '../internalClient';
|
|
4
|
-
import type {
|
|
4
|
+
import type { DocumentForm } from './types';
|
|
5
5
|
export interface FilterArgs {
|
|
6
6
|
filterField: string;
|
|
7
7
|
startsWith?: string;
|
|
@@ -18,7 +18,7 @@ export declare class TinaAdminApi {
|
|
|
18
18
|
checkGraphqlSchema({ localSchema }: {
|
|
19
19
|
localSchema: any;
|
|
20
20
|
}): Promise<boolean>;
|
|
21
|
-
fetchCollections(): import("@tinacms/schema-tools").
|
|
21
|
+
fetchCollections(): import("@tinacms/schema-tools").Collection<true>[];
|
|
22
22
|
renameDocument({ collection, relativePath, newRelativePath }: {
|
|
23
23
|
collection: any;
|
|
24
24
|
relativePath: any;
|
|
@@ -28,7 +28,7 @@ export declare class TinaAdminApi {
|
|
|
28
28
|
collection: string;
|
|
29
29
|
relativePath: string;
|
|
30
30
|
}): Promise<void>;
|
|
31
|
-
fetchCollection(collectionName: string, includeDocuments: boolean, after?: string, sortKey?: string, order?: 'asc' | 'desc', filterArgs?: FilterArgs): Promise<
|
|
31
|
+
fetchCollection(collectionName: string, includeDocuments: boolean, after?: string, sortKey?: string, order?: 'asc' | 'desc', filterArgs?: FilterArgs): Promise<any>;
|
|
32
32
|
fetchDocument(collectionName: string, relativePath: string): Promise<{
|
|
33
33
|
document: DocumentForm;
|
|
34
34
|
}>;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
/// <reference types="react" />
|
|
5
5
|
import type { TinaCMS } from '@tinacms/toolkit';
|
|
6
6
|
import { FilterArgs } from '../api';
|
|
7
|
-
import type {
|
|
7
|
+
import type { CollectionResponse } from '../types';
|
|
8
8
|
export declare const useGetCollection: (cms: TinaCMS, collectionName: string, includeDocuments?: boolean, after?: string, sortKey?: string, filterArgs?: FilterArgs) => {
|
|
9
|
-
collection:
|
|
9
|
+
collection: CollectionResponse;
|
|
10
10
|
loading: boolean;
|
|
11
11
|
error: Error;
|
|
12
12
|
reFetchCollection: () => void;
|
|
13
|
-
collectionExtra: import("@tinacms/schema-tools").
|
|
13
|
+
collectionExtra: import("@tinacms/schema-tools").Collection<true>;
|
|
14
14
|
};
|
|
15
15
|
declare const GetCollection: ({ cms, collectionName, includeDocuments, startCursor, sortKey, children, filterArgs, }: {
|
|
16
16
|
cms: TinaCMS;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/// <reference types="react" />
|
|
5
5
|
import type { TinaCMS } from '@tinacms/toolkit';
|
|
6
6
|
export declare const useGetCollections: (cms: TinaCMS) => {
|
|
7
|
-
collections: import("@tinacms/schema-tools").
|
|
7
|
+
collections: import("@tinacms/schema-tools").Collection<true>[];
|
|
8
8
|
};
|
|
9
9
|
declare const GetCollections: ({ cms, children }: {
|
|
10
10
|
cms: TinaCMS;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
4
|
import { Plugin } from '@tinacms/toolkit';
|
|
5
|
-
import type {
|
|
5
|
+
import type { CollectionResponse, DocumentSys } from '../types';
|
|
6
6
|
export declare class RouteMappingPlugin implements Plugin {
|
|
7
7
|
__type: string;
|
|
8
8
|
name: string;
|
|
9
|
-
mapper: (collection:
|
|
10
|
-
constructor(mapper: (collection:
|
|
9
|
+
mapper: (collection: CollectionResponse, document: DocumentSys) => string | undefined;
|
|
10
|
+
constructor(mapper: (collection: CollectionResponse, document: DocumentSys) => string | undefined);
|
|
11
11
|
}
|
package/dist/admin/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface TemplateResponse {
|
|
5
5
|
name: string;
|
|
6
6
|
label: string;
|
|
7
7
|
fields: any[];
|
|
@@ -34,12 +34,12 @@ export interface DocumentSys {
|
|
|
34
34
|
extension: string;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface CollectionResponse {
|
|
38
38
|
label: string;
|
|
39
39
|
name: string;
|
|
40
40
|
slug: string;
|
|
41
41
|
format?: string;
|
|
42
|
-
templates?:
|
|
42
|
+
templates?: TemplateResponse[];
|
|
43
43
|
documents?: {
|
|
44
44
|
totalCount?: number;
|
|
45
45
|
pageInfo: {
|
|
@@ -3,18 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Form } from '@tinacms/toolkit';
|
|
5
5
|
import type { FormOptions, TinaCMS } from '@tinacms/toolkit';
|
|
6
|
-
export declare function useGraphqlForms<T extends object>({ variables, onSubmit, query, formify, eventList, }: {
|
|
7
|
-
query: string;
|
|
8
|
-
variables: object;
|
|
9
|
-
onSubmit?: (args: onSubmitArgs) => void;
|
|
10
|
-
formify?: formifyCallback;
|
|
11
|
-
/**
|
|
12
|
-
* This is a test utility which allows us to keep track of all the events
|
|
13
|
-
* received by this hook. See `experimental-examples/unit-test-example/pages/index.js
|
|
14
|
-
* for usage.
|
|
15
|
-
*/
|
|
16
|
-
eventList?: [];
|
|
17
|
-
}): [T, Boolean];
|
|
18
6
|
export declare const transformDocumentIntoMutationRequestPayload: (document: {
|
|
19
7
|
[key: string]: unknown;
|
|
20
8
|
_collection: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './internalClient';
|
|
|
5
5
|
export * from './auth';
|
|
6
6
|
export * from './utils';
|
|
7
7
|
export * from './tina-cms';
|
|
8
|
-
export { useGraphqlForms } from './hooks/use-graphql-forms';
|
|
9
8
|
export { useDocumentCreatorPlugin } from './hooks/use-content-creator';
|
|
10
9
|
export * from '@tinacms/toolkit';
|
|
11
10
|
export { TinaAdmin } from './admin';
|
|
@@ -16,27 +15,23 @@ import { TinaCMSProvider2, DocumentCreatorCallback } from './tina-cms';
|
|
|
16
15
|
import type { TinaCMSProviderDefaultProps } from './types/cms';
|
|
17
16
|
export type { TinaCMSProviderDefaultProps };
|
|
18
17
|
export default TinaCMSProvider2;
|
|
19
|
-
import { TinaCMS } from '@tinacms/toolkit';
|
|
18
|
+
import { MediaStore, TinaCMS } from '@tinacms/toolkit';
|
|
20
19
|
import { formifyCallback } from './hooks/use-graphql-forms';
|
|
21
20
|
export { NAMER, resolveForm } from '@tinacms/schema-tools';
|
|
22
|
-
import
|
|
23
|
-
export type { Config, Schema, Collection, Template,
|
|
21
|
+
import { TinaSchema, TinaField, Config, Schema, Collection, Template } from '@tinacms/schema-tools';
|
|
22
|
+
export type { Config, Schema, Collection, Template, TinaField, TinaSchema };
|
|
24
23
|
/**
|
|
25
|
-
* @deprecated use `
|
|
24
|
+
* @deprecated use `TinaField` instead
|
|
26
25
|
*/
|
|
27
|
-
export declare type TinaFieldEnriched =
|
|
26
|
+
export declare type TinaFieldEnriched = TinaField;
|
|
28
27
|
/**
|
|
29
|
-
* @deprecated use `
|
|
28
|
+
* @deprecated use `TinaField` instead
|
|
30
29
|
*/
|
|
31
|
-
export declare type
|
|
30
|
+
export declare type SchemaField = TinaField;
|
|
32
31
|
/**
|
|
33
32
|
* @deprecated use `Template` instead
|
|
34
33
|
*/
|
|
35
34
|
export declare type TinaTemplate = Template;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated use `Template` instead
|
|
38
|
-
*/
|
|
39
|
-
export declare type Templateable = Template;
|
|
40
35
|
/**
|
|
41
36
|
* @deprecated use `Template` instead
|
|
42
37
|
*/
|
|
@@ -44,20 +39,16 @@ export declare type TinaCloudTemplatebase = Template;
|
|
|
44
39
|
/**
|
|
45
40
|
* @deprecated use `Collection` instead
|
|
46
41
|
*/
|
|
47
|
-
export declare type
|
|
42
|
+
export declare type TinaCloudCollectionCollection = Collection;
|
|
48
43
|
/**
|
|
49
44
|
* @deprecated use `Collection` instead
|
|
50
45
|
*/
|
|
51
46
|
export declare type TinaCollection = Collection;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated use `Schema` instead
|
|
54
|
-
*/
|
|
55
|
-
export declare type TinaSchema = Schema;
|
|
56
47
|
/**
|
|
57
48
|
* @deprecated use `Schema` instead
|
|
58
49
|
*/
|
|
59
50
|
export declare type TinaCloudSchema = Schema;
|
|
60
|
-
export declare const defineSchema: (config: Schema) => Schema
|
|
51
|
+
export declare const defineSchema: (config: Schema) => Schema<false>;
|
|
61
52
|
export declare const defineLegacyConfig: (config: Omit<TinaCMSProviderDefaultProps, 'children'>) => Omit<TinaCMSProviderDefaultProps, "children">;
|
|
62
|
-
export declare const defineStaticConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs,
|
|
63
|
-
export declare const defineConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs,
|
|
53
|
+
export declare const defineStaticConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStore>) => Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStore>;
|
|
54
|
+
export declare const defineConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStore>) => Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStore>;
|