tinacms 1.4.6 → 1.5.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.
@@ -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<any>;
31
+ fetchCollection(collectionName: string, includeDocuments: boolean, folder?: string, 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
  }>;
@@ -5,16 +5,23 @@
5
5
  import type { TinaCMS } from '@tinacms/toolkit';
6
6
  import { FilterArgs } from '../api';
7
7
  import type { CollectionResponse } from '../types';
8
- export declare const useGetCollection: (cms: TinaCMS, collectionName: string, includeDocuments?: boolean, after?: string, sortKey?: string, filterArgs?: FilterArgs) => {
8
+ export declare const useGetCollection: (cms: TinaCMS, collectionName: string, includeDocuments: boolean, folder: {
9
+ loading: boolean;
10
+ fullyQualifiedName: string;
11
+ }, after?: string, sortKey?: string, filterArgs?: FilterArgs) => {
9
12
  collection: CollectionResponse;
10
13
  loading: boolean;
11
14
  error: Error;
12
15
  reFetchCollection: () => void;
13
16
  collectionExtra: import("@tinacms/schema-tools").Collection<true>;
14
17
  };
15
- declare const GetCollection: ({ cms, collectionName, includeDocuments, startCursor, sortKey, children, filterArgs, }: {
18
+ declare const GetCollection: ({ cms, collectionName, folder, includeDocuments, startCursor, sortKey, children, filterArgs, }: {
16
19
  cms: TinaCMS;
17
20
  collectionName: string;
21
+ folder: {
22
+ loading: boolean;
23
+ fullyQualifiedName: string;
24
+ };
18
25
  includeDocuments?: boolean;
19
26
  startCursor?: string;
20
27
  sortKey?: string;
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  declare const CollectionCreatePage: () => JSX.Element;
3
+ export declare const RenderForm: ({ cms, collection, folder, templateName, mutationInfo, customDefaults, }: any) => JSX.Element;
3
4
  export default CollectionCreatePage;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CollectionDuplicatePage: () => JSX.Element;
3
+ export default CollectionDuplicatePage;
@@ -1,6 +1,3 @@
1
- /**
2
-
3
- */
4
1
  /// <reference types="react" />
5
2
  declare const CollectionUpdatePage: () => JSX.Element;
6
3
  export default CollectionUpdatePage;
@@ -0,0 +1,13 @@
1
+ export declare type CollectionFolder = {
2
+ loading: boolean;
3
+ name: string;
4
+ fullyQualifiedName: string;
5
+ parentName: string;
6
+ };
7
+ export declare const parentFolder: (folder: CollectionFolder) => {
8
+ name: string;
9
+ fullyQualifiedName: string;
10
+ parentName: string;
11
+ loading: boolean;
12
+ };
13
+ export declare const useCollectionFolder: () => CollectionFolder;
@@ -8,6 +8,9 @@ export interface TemplateResponse {
8
8
  }
9
9
  export interface DocumentNode {
10
10
  node: {
11
+ __typename: string;
12
+ name?: string;
13
+ path?: string;
11
14
  _sys: {
12
15
  template: string;
13
16
  breadcrumbs: string[];
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export type { TinaCMSProviderDefaultProps };
17
17
  export default TinaCMSProvider2;
18
18
  import { MediaStore, TinaCMS } from '@tinacms/toolkit';
19
19
  import { formifyCallback } from './hooks/use-graphql-forms';
20
- export { NAMER, resolveForm } from '@tinacms/schema-tools';
20
+ export { NAMER, resolveField } from '@tinacms/schema-tools';
21
21
  import { TinaSchema, TinaField, Config, Schema, Collection, Template } from '@tinacms/schema-tools';
22
22
  export type { Config, Schema, Collection, Template, TinaField, TinaSchema };
23
23
  /**
@@ -50,5 +50,8 @@ export declare type TinaCollection = Collection;
50
50
  export declare type TinaCloudSchema = Schema;
51
51
  export declare const defineSchema: (config: Schema) => Schema<false>;
52
52
  export declare const defineLegacyConfig: (config: Omit<TinaCMSProviderDefaultProps, 'children'>) => Omit<TinaCMSProviderDefaultProps, "children">;
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>;
53
+ interface MediaStoreClass {
54
+ new (...args: any[]): MediaStore;
55
+ }
56
+ export declare const defineStaticConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass>) => Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass>;
57
+ export declare const defineConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass>) => Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass>;