tinacms 0.0.0-d7c745e-20250102002342 → 0.0.0-d94de9b-20250707010010
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/README.md +1 -1
- package/dist/admin/api.d.ts +1 -0
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/admin/components/Page.d.ts +3 -9
- package/dist/admin/components/Sidebar.d.ts +0 -3
- package/dist/admin/components/ui/tooltip.d.ts +7 -0
- package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
- package/dist/admin/pages/CollectionListPage.d.ts +2 -2
- package/dist/admin/pages/DashboardPage.d.ts +0 -3
- package/dist/admin/pages/ScreenPage.d.ts +0 -3
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/client.js +81 -42
- package/dist/client.mjs +58 -31
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.js +9044 -6963
- package/dist/index.mjs +10373 -8293
- package/dist/internalClient/index.d.ts +9 -3
- package/dist/{node-cache-4c336858.mjs → node-cache-5e8db9f0.mjs} +23 -10
- package/dist/react.d.ts +14 -6
- package/dist/react.js +73 -53
- package/dist/react.mjs +73 -53
- package/dist/rich-text/prism.js +1 -1
- package/dist/rich-text/prism.mjs +1 -1
- package/dist/rich-text/static.d.ts +148 -0
- package/dist/rich-text/static.js +239 -0
- package/dist/rich-text/static.mjs +236 -0
- package/dist/toolkit/components/media/media-item.d.ts +1 -1
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
- package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/components/select.d.ts +2 -2
- package/dist/toolkit/fields/components/text-field.d.ts +1 -1
- package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +5 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +6 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +5 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
- package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
- package/dist/toolkit/form-builder/form-builder.d.ts +15 -5
- package/dist/toolkit/forms/field.d.ts +3 -0
- package/dist/toolkit/forms/form.d.ts +22 -3
- package/dist/toolkit/git-client/git-client.d.ts +25 -2
- package/dist/toolkit/git-client/git-file.d.ts +18 -0
- package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
- package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
- package/dist/toolkit/icons/Tina.d.ts +0 -5
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +1 -0
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/alert.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/nav.d.ts +5 -3
- package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +7 -10
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
- package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
- package/dist/toolkit/react-sidebar/index.d.ts +1 -1
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/styles/button.d.ts +2 -2
- package/dist/toolkit/tina-cms.d.ts +3 -3
- package/dist/toolkit/tina-state.d.ts +15 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/dist/utils/cn.d.ts +2 -0
- package/package.json +43 -35
- package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const IndentListToolbarButton: React.ForwardRefExoticComponent<{
|
|
4
|
-
nodeType?: typeof ELEMENT_UL | typeof ELEMENT_OL;
|
|
5
|
-
} & Omit<Omit<{
|
|
2
|
+
export declare const UnorderedListToolbarButton: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
6
3
|
tooltip?: React.ReactNode;
|
|
7
4
|
tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
|
|
8
5
|
tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
|
|
@@ -16,4 +13,19 @@ export declare const IndentListToolbarButton: React.ForwardRefExoticComponent<{
|
|
|
16
13
|
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
|
|
17
14
|
size?: "default" | "sm" | "lg";
|
|
18
15
|
variant?: "default" | "outline";
|
|
19
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">,
|
|
16
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, never> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export declare const OrderedListToolbarButton: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
18
|
+
tooltip?: React.ReactNode;
|
|
19
|
+
tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
|
|
20
|
+
tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
|
|
21
|
+
} & Omit<{
|
|
22
|
+
isDropdown?: boolean;
|
|
23
|
+
pressed?: boolean;
|
|
24
|
+
showArrow?: boolean;
|
|
25
|
+
} & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
26
|
+
size?: "default" | "sm" | "lg";
|
|
27
|
+
variant?: "default" | "outline";
|
|
28
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
|
|
29
|
+
size?: "default" | "sm" | "lg";
|
|
30
|
+
variant?: "default" | "outline";
|
|
31
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, never> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tooltip?: React.ReactNode;
|
|
7
|
-
tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
|
|
8
|
-
tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
|
|
9
|
-
} & Omit<{
|
|
10
|
-
isDropdown?: boolean;
|
|
11
|
-
pressed?: boolean;
|
|
12
|
-
showArrow?: boolean;
|
|
13
|
-
} & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
14
|
-
size?: "default" | "sm" | "lg";
|
|
15
|
-
variant?: "default" | "outline";
|
|
16
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
|
|
17
|
-
size?: "default" | "sm" | "lg";
|
|
18
|
-
variant?: "default" | "outline";
|
|
19
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, "clear" | "nodeType"> & React.RefAttributes<HTMLButtonElement>>;
|
|
2
|
+
export declare const BoldToolbarButton: () => React.JSX.Element;
|
|
3
|
+
export declare const StrikethroughToolbarButton: () => React.JSX.Element;
|
|
4
|
+
export declare const ItalicToolbarButton: () => React.JSX.Element;
|
|
5
|
+
export declare const CodeToolbarButton: () => React.JSX.Element;
|
|
@@ -189,17 +189,12 @@ export declare const Components: () => {
|
|
|
189
189
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
190
190
|
ref?: React.Ref<any>;
|
|
191
191
|
} & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<any>>;
|
|
192
|
-
strikethrough:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
leaf:
|
|
196
|
-
text:
|
|
197
|
-
}
|
|
198
|
-
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
199
|
-
asChild?: boolean | undefined;
|
|
200
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
201
|
-
ref?: React.Ref<any>;
|
|
202
|
-
} & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<any>>;
|
|
192
|
+
strikethrough: ({ editor, leaf, text, ...props }: {
|
|
193
|
+
[x: string]: any;
|
|
194
|
+
editor: any;
|
|
195
|
+
leaf: any;
|
|
196
|
+
text: any;
|
|
197
|
+
}) => React.JSX.Element;
|
|
203
198
|
italic: React.ForwardRefExoticComponent<Omit<{
|
|
204
199
|
leafToAttributes?: (leaf: import("@udecode/plate-common").TText) => any;
|
|
205
200
|
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & Omit<import("slate-react").RenderLeafProps, "text" | "leaf"> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'italic' | 'mermaid' | 'raw' | 'embed' | 'table';
|
|
1
|
+
export type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'strikethrough' | 'italic' | 'mermaid' | 'raw' | 'embed' | 'table';
|
|
2
2
|
export declare const STANDARD_ICON_WIDTH = 32;
|
|
3
3
|
export declare const HEADING_ICON_WITH_TEXT = 127;
|
|
4
4
|
export declare const HEADING_ICON_ONLY = 58;
|
|
@@ -6,3 +6,7 @@ export declare const EMBED_ICON_WIDTH = 78;
|
|
|
6
6
|
export declare const CONTAINER_MD_BREAKPOINT = 448;
|
|
7
7
|
export declare const FLOAT_BUTTON_WIDTH = 25;
|
|
8
8
|
export declare const HEADING_LABEL = "Headings";
|
|
9
|
+
export type ToolbarOverrides = {
|
|
10
|
+
toolbar?: ToolbarOverrideType[];
|
|
11
|
+
showFloatingToolbar?: boolean;
|
|
12
|
+
};
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import type { Form } from '../../../../../forms';
|
|
4
4
|
import type { MdxTemplate } from '../types';
|
|
5
|
-
import type { ToolbarOverrideType } from './toolbar-overrides';
|
|
5
|
+
import type { ToolbarOverrides, ToolbarOverrideType } from './toolbar-overrides';
|
|
6
6
|
interface ToolbarContextProps {
|
|
7
7
|
tinaForm: Form;
|
|
8
8
|
templates: MdxTemplate[];
|
|
9
|
-
overrides: ToolbarOverrideType[];
|
|
9
|
+
overrides: ToolbarOverrideType[] | ToolbarOverrides;
|
|
10
10
|
}
|
|
11
11
|
interface ToolbarProviderProps extends ToolbarContextProps {
|
|
12
12
|
children: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Form } from '../forms';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { type FC } from 'react';
|
|
3
|
-
import type { Form } from '../forms';
|
|
4
4
|
export interface FormBuilderProps {
|
|
5
5
|
form: {
|
|
6
6
|
tinaForm: Form;
|
|
@@ -12,13 +12,16 @@ export interface FormBuilderProps {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const FormBuilder: FC<FormBuilderProps>;
|
|
14
14
|
export declare const FormStatus: ({ pristine }: {
|
|
15
|
-
pristine:
|
|
15
|
+
pristine: boolean;
|
|
16
16
|
}) => React.JSX.Element;
|
|
17
|
-
export declare const FormWrapper: ({
|
|
18
|
-
header?: React.ReactNode;
|
|
19
|
-
children: React.ReactNode;
|
|
17
|
+
export declare const FormWrapper: ({ id, children, }: {
|
|
20
18
|
id: string;
|
|
19
|
+
children: React.ReactNode;
|
|
21
20
|
}) => React.JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
* Original misspelt version of CreateBranchModal
|
|
24
|
+
*/
|
|
22
25
|
export declare const CreateBranchModel: ({ close, safeSubmit, relativePath, values, crudType, }: {
|
|
23
26
|
safeSubmit: () => Promise<void>;
|
|
24
27
|
close: () => void;
|
|
@@ -26,6 +29,13 @@ export declare const CreateBranchModel: ({ close, safeSubmit, relativePath, valu
|
|
|
26
29
|
values: Record<string, unknown>;
|
|
27
30
|
crudType: string;
|
|
28
31
|
}) => React.JSX.Element;
|
|
32
|
+
export declare const CreateBranchModal: ({ close, safeSubmit, path, values, crudType, }: {
|
|
33
|
+
safeSubmit: () => Promise<void>;
|
|
34
|
+
close: () => void;
|
|
35
|
+
path: string;
|
|
36
|
+
values: Record<string, unknown>;
|
|
37
|
+
crudType: string;
|
|
38
|
+
}) => React.JSX.Element;
|
|
29
39
|
export declare const PrefixedTextField: ({ prefix, ...props }: {
|
|
30
40
|
[x: string]: any;
|
|
31
41
|
prefix?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Parser } from '@tinacms/schema-tools';
|
|
1
2
|
export type AnyField = Field & {
|
|
2
3
|
[key: string]: any;
|
|
3
4
|
};
|
|
@@ -7,10 +8,12 @@ export interface Field<F extends Field = AnyField> {
|
|
|
7
8
|
description?: string;
|
|
8
9
|
component: React.FC<any> | string | null;
|
|
9
10
|
inlineComponent?: React.FC<any>;
|
|
11
|
+
parser?: Parser;
|
|
10
12
|
parse?: (value: any, name: string, field: F) => any;
|
|
11
13
|
format?: (value: any, name: string, field: F) => any;
|
|
12
14
|
validate?(value: any, allValues: any, meta: any, field: Field): string | object | undefined;
|
|
13
15
|
defaultValue?: any;
|
|
16
|
+
namespace?: string[];
|
|
14
17
|
fields?: F[];
|
|
15
18
|
/**
|
|
16
19
|
* Focus events can come from outside of the component, this is not
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FormApi, Config, FormState } from 'final-form';
|
|
2
|
-
import type { FormSubscription } from 'final-form';
|
|
3
1
|
import type { Plugin } from '../core';
|
|
4
|
-
import {
|
|
2
|
+
import { Config, FormApi, FormState } from 'final-form';
|
|
3
|
+
import type { FormSubscription } from 'final-form';
|
|
4
|
+
import { AnyField, Field } from './field';
|
|
5
5
|
export type { FormApi };
|
|
6
6
|
type GlobalOptions = {
|
|
7
7
|
global: true;
|
|
@@ -25,7 +25,16 @@ export interface FormOptions<S, F extends Field = AnyField> extends Config<S> {
|
|
|
25
25
|
extraSubscribeValues?: FormSubscription;
|
|
26
26
|
queries?: string[];
|
|
27
27
|
crudType?: 'create' | 'update';
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated
|
|
30
|
+
* Misleading name as per https://github.com/tinacms/tinacms/issues/5686#issuecomment-2899840518
|
|
31
|
+
* Use path property instead.
|
|
32
|
+
*/
|
|
28
33
|
relativePath?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Where to save the form within the content directory on next submission.
|
|
36
|
+
*/
|
|
37
|
+
path?: string;
|
|
29
38
|
}
|
|
30
39
|
export declare class Form<S = any, F extends Field = AnyField> implements Plugin {
|
|
31
40
|
private _reset;
|
|
@@ -42,7 +51,16 @@ export declare class Form<S = any, F extends Field = AnyField> implements Plugin
|
|
|
42
51
|
queries: string[];
|
|
43
52
|
global: GlobalOptions | null;
|
|
44
53
|
loading: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated
|
|
56
|
+
* Misleading name as per https://github.com/tinacms/tinacms/issues/5686#issuecomment-2899840518
|
|
57
|
+
* Use path property instead.
|
|
58
|
+
*/
|
|
45
59
|
relativePath: string;
|
|
60
|
+
/**
|
|
61
|
+
* Where to save the form within the content directory on next submission.
|
|
62
|
+
*/
|
|
63
|
+
path: string;
|
|
46
64
|
crudType?: 'create' | 'update';
|
|
47
65
|
beforeSubmit?: (values: S) => Promise<void | S>;
|
|
48
66
|
constructor({ id, label, fields, actions, buttons, global, reset, loadInitialValues, onChange, queries, ...options }: FormOptions<S, F>);
|
|
@@ -134,6 +152,7 @@ export declare class Form<S = any, F extends Field = AnyField> implements Plugin
|
|
|
134
152
|
label?: string;
|
|
135
153
|
name?: string;
|
|
136
154
|
fields: Field[];
|
|
155
|
+
namespace?: string[];
|
|
137
156
|
};
|
|
138
157
|
private getFieldGroup;
|
|
139
158
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated as the API is clunky and hard to use. Mutations should now be
|
|
3
|
+
* done via Graphql. This will be removed by July 2025.
|
|
4
|
+
*/
|
|
1
5
|
export declare class GitClient {
|
|
2
6
|
private baseUrl;
|
|
3
7
|
constructor(baseUrl: string);
|
|
@@ -29,6 +33,9 @@ export declare class GitClient {
|
|
|
29
33
|
* @deprecated
|
|
30
34
|
*/
|
|
31
35
|
isAuthenticated(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
32
39
|
commit(data: {
|
|
33
40
|
files: string[];
|
|
34
41
|
message?: string;
|
|
@@ -36,15 +43,17 @@ export declare class GitClient {
|
|
|
36
43
|
email?: string;
|
|
37
44
|
}): Promise<Response>;
|
|
38
45
|
/**
|
|
39
|
-
*
|
|
40
46
|
* TODO: Add return type.
|
|
41
47
|
* TODO: Remove `catch`
|
|
48
|
+
*
|
|
49
|
+
* @deprecated
|
|
42
50
|
*/
|
|
43
51
|
push(): Promise<any>;
|
|
44
52
|
/**
|
|
45
|
-
*
|
|
46
53
|
* TODO: Add return type.
|
|
47
54
|
* TODO: Remove `catch`
|
|
55
|
+
*
|
|
56
|
+
* @deprecated
|
|
48
57
|
*/
|
|
49
58
|
writeToDisk(data: {
|
|
50
59
|
fileRelativePath: string;
|
|
@@ -53,6 +62,8 @@ export declare class GitClient {
|
|
|
53
62
|
/**
|
|
54
63
|
* Uploads a File to disk
|
|
55
64
|
* TODO: Remove `catch`
|
|
65
|
+
*
|
|
66
|
+
* @deprecated
|
|
56
67
|
*/
|
|
57
68
|
writeMediaToDisk(data: {
|
|
58
69
|
directory: string;
|
|
@@ -62,31 +73,43 @@ export declare class GitClient {
|
|
|
62
73
|
* TODO: rename `data.relPath` to `data.fileRelativePath`
|
|
63
74
|
* TODO: Add return type.
|
|
64
75
|
* TODO: Remove `catch`
|
|
76
|
+
*
|
|
77
|
+
* @deprecated
|
|
65
78
|
*/
|
|
66
79
|
deleteFromDisk(data: {
|
|
67
80
|
relPath: string;
|
|
68
81
|
}): Promise<any>;
|
|
69
82
|
/**
|
|
70
83
|
* Resets the given files.
|
|
84
|
+
*
|
|
85
|
+
* @deprecated
|
|
71
86
|
*/
|
|
72
87
|
reset(data: {
|
|
73
88
|
files: string[];
|
|
74
89
|
}): Promise<Response>;
|
|
75
90
|
/**
|
|
76
91
|
* Get the contents of a file or directory on disk.
|
|
92
|
+
*
|
|
93
|
+
* @deprecated
|
|
77
94
|
*/
|
|
78
95
|
getFile(fileRelativePath: string): Promise<any>;
|
|
79
96
|
/**
|
|
80
97
|
* Get the contents of a file for the most recent commit.
|
|
98
|
+
*
|
|
99
|
+
* @deprecated
|
|
81
100
|
*/
|
|
82
101
|
show(fileRelativePath: string): Promise<any>;
|
|
83
102
|
/**
|
|
84
103
|
* Get information about a local branch by name, or the current branch if no
|
|
85
104
|
* name is specified.
|
|
105
|
+
*
|
|
106
|
+
* @deprecated
|
|
86
107
|
*/
|
|
87
108
|
branch(name?: string): Promise<any>;
|
|
88
109
|
/**
|
|
89
110
|
* Get a list of the names of all local branches.
|
|
111
|
+
*
|
|
112
|
+
* @deprecated
|
|
90
113
|
*/
|
|
91
114
|
branches(): Promise<any>;
|
|
92
115
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { CMS } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated as the API is clunky and hard to use. Mutations should now be
|
|
4
|
+
* done via Graphql. This will be removed by July 2025.
|
|
5
|
+
*/
|
|
2
6
|
export declare class GitFile {
|
|
3
7
|
private cms;
|
|
4
8
|
relativePath: string;
|
|
@@ -7,10 +11,24 @@ export declare class GitFile {
|
|
|
7
11
|
constructor(cms: CMS, relativePath: string, format: (file: any) => string, parse: (content: string) => any);
|
|
8
12
|
/**
|
|
9
13
|
* Load the contents of this file at HEAD
|
|
14
|
+
*
|
|
15
|
+
* @deprecated
|
|
10
16
|
*/
|
|
11
17
|
show: () => Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated
|
|
20
|
+
*/
|
|
12
21
|
commit: () => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
13
25
|
reset: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated
|
|
28
|
+
*/
|
|
14
29
|
write: (values: any) => void;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated
|
|
32
|
+
*/
|
|
15
33
|
private get git();
|
|
16
34
|
}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { MediaStore, MediaUploadOptions, Media, MediaListOptions, MediaList } from '../core';
|
|
2
2
|
import { GitClient } from './git-client';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated as the API is clunky and hard to use. Mutations should now be
|
|
5
|
+
* done via Graphql. This will be removed by July 2025.
|
|
6
|
+
*/
|
|
3
7
|
export declare class GitMediaStore implements MediaStore {
|
|
4
8
|
private client;
|
|
5
9
|
accept: string;
|
|
6
10
|
constructor(client: GitClient);
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
7
14
|
persist(files: MediaUploadOptions[]): Promise<Media[]>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated
|
|
17
|
+
*/
|
|
8
18
|
list(options?: MediaListOptions): Promise<MediaList>;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
*/
|
|
9
22
|
delete(media: Media): Promise<void>;
|
|
10
23
|
}
|
|
11
24
|
export declare const nextOffset: (offset: number, limit: number, count: number) => number;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { GitFile } from './git-file';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated as the API is clunky and hard to use. Mutations should now be
|
|
4
|
+
* done via Graphql. This will be removed by July 2025.
|
|
5
|
+
*/
|
|
2
6
|
export declare function useGitFile(relativePath: string, format: (file: any) => string, parse: (content: string) => any): GitFile;
|
package/dist/toolkit/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type { TinaState } from './tina-state';
|
|
|
19
19
|
export * from './forms';
|
|
20
20
|
export * from './icons';
|
|
21
21
|
export * from './react-dismissible';
|
|
22
|
-
export { Nav, LocalWarning, BillingWarning,
|
|
22
|
+
export { Nav, LocalWarning, BillingWarning, SyncStatusButton, } from './react-sidebar';
|
|
23
23
|
export { useCMS } from './react-core';
|
|
24
24
|
/**
|
|
25
25
|
* Custom `tinacms` things
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Branch, BranchSwitcherProps } from './types';
|
|
3
3
|
export declare function formatBranchName(str: string): string;
|
|
4
4
|
export declare const BranchSwitcherLegacy: ({ listBranches, createBranch, chooseBranch, }: BranchSwitcherProps) => React.JSX.Element;
|
|
5
5
|
export declare const getFilteredBranchList: (branchList: Branch[], filter: string, currentBranchName: string) => Branch[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Branch, BranchSwitcherProps } from './types';
|
|
3
3
|
export declare function formatBranchName(str: string): string;
|
|
4
4
|
export declare const BranchSwitcher: (props: BranchSwitcherProps) => React.JSX.Element;
|
|
5
5
|
export declare const EditoralBranchSwitcher: ({ listBranches, createBranch, chooseBranch, setModalTitle, }: BranchSwitcherProps) => React.JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Plugin } from '../core';
|
|
2
2
|
import type { IconType } from 'react-icons';
|
|
3
3
|
/**
|
|
4
|
-
* Represents a
|
|
4
|
+
* Represents a TinaCloud Config that should be accessible via the CMS.
|
|
5
5
|
*
|
|
6
6
|
* The purpose of these configs is to give a way to display & edit information
|
|
7
|
-
* about
|
|
7
|
+
* about TinaCloud Configuration
|
|
8
8
|
* cases may include:
|
|
9
9
|
*
|
|
10
|
-
* *
|
|
10
|
+
* * TinaCloud Project Configuration
|
|
11
11
|
* * User Management
|
|
12
12
|
*/
|
|
13
13
|
export interface CloudConfigPlugin extends Plugin {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { ScreenPlugin } from '../../react-screens';
|
|
3
1
|
import type { CloudConfigPlugin } from '../../react-cloud-config';
|
|
2
|
+
import type { ScreenPlugin } from '../../react-screens';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
interface NavCollection {
|
|
5
5
|
label?: string;
|
|
6
6
|
name: string;
|
|
@@ -8,6 +8,8 @@ interface NavCollection {
|
|
|
8
8
|
}
|
|
9
9
|
interface NavProps {
|
|
10
10
|
isLocalMode: boolean;
|
|
11
|
+
showHamburger?: boolean;
|
|
12
|
+
toggleMenu: () => void;
|
|
11
13
|
children?: any;
|
|
12
14
|
className?: string;
|
|
13
15
|
userName?: string;
|
|
@@ -38,5 +40,5 @@ interface NavProps {
|
|
|
38
40
|
};
|
|
39
41
|
}>;
|
|
40
42
|
}
|
|
41
|
-
export declare const Nav: ({ isLocalMode, className, children, showCollections, collectionsInfo, screens, cloudConfigs, contentCreators, sidebarWidth, RenderNavSite, RenderNavCloud, RenderNavCollection, AuthRenderNavCollection, ...props }: NavProps) => React.JSX.Element;
|
|
43
|
+
export declare const Nav: ({ isLocalMode, showHamburger, toggleMenu, className, children, showCollections, collectionsInfo, screens, cloudConfigs, contentCreators, sidebarWidth, RenderNavSite, RenderNavCloud, RenderNavCollection, AuthRenderNavCollection, ...props }: NavProps) => React.JSX.Element;
|
|
42
44
|
export {};
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { Form } from '../../forms';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export interface MultiformFormHeaderProps {
|
|
7
|
-
activeForm: {
|
|
8
|
-
activeFieldName?: string;
|
|
9
|
-
tinaForm: Form;
|
|
10
|
-
};
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface FormsViewProps {
|
|
4
|
+
loadingPlaceholder?: React.FC;
|
|
11
5
|
}
|
|
12
|
-
export declare const
|
|
6
|
+
export declare const FormsView: ({ loadingPlaceholder }?: FormsViewProps) => React.JSX.Element;
|
|
13
7
|
export interface FormHeaderProps {
|
|
14
8
|
activeForm: {
|
|
15
9
|
activeFieldName?: string;
|
|
@@ -17,3 +11,6 @@ export interface FormHeaderProps {
|
|
|
17
11
|
};
|
|
18
12
|
}
|
|
19
13
|
export declare const FormHeader: ({ activeForm }: FormHeaderProps) => React.JSX.Element;
|
|
14
|
+
export declare const FormBreadcrumbs: ({ rootBreadcrumbName, ...props }: {
|
|
15
|
+
rootBreadcrumbName?: string;
|
|
16
|
+
} & React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -3,7 +3,6 @@ import type { SidebarState, SidebarStateOptions } from '../sidebar';
|
|
|
3
3
|
export declare const SidebarContext: React.Context<any>;
|
|
4
4
|
export declare const minPreviewWidth = 440;
|
|
5
5
|
export declare const minSidebarWidth = 360;
|
|
6
|
-
export declare const navBreakpoint = 1279;
|
|
7
6
|
export interface SidebarProviderProps {
|
|
8
7
|
sidebar: SidebarState;
|
|
9
8
|
resizingSidebar: boolean;
|
|
@@ -13,9 +12,3 @@ export interface SidebarProviderProps {
|
|
|
13
12
|
defaultState?: SidebarStateOptions['defaultState'];
|
|
14
13
|
}
|
|
15
14
|
export declare function SidebarProvider({ position, resizingSidebar, setResizingSidebar, defaultWidth, sidebar, }: SidebarProviderProps): React.JSX.Element;
|
|
16
|
-
export declare const updateBodyDisplacement: ({ position, displayState, sidebarWidth, resizingSidebar, }: {
|
|
17
|
-
position?: string;
|
|
18
|
-
displayState: any;
|
|
19
|
-
sidebarWidth: any;
|
|
20
|
-
resizingSidebar: any;
|
|
21
|
-
}) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { TinaCMS } from '../../tina-cms';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
export declare const useGetEvents: (cms: TinaCMS, cursor?: string, existingEvents?: {
|
|
4
4
|
message: string;
|
|
5
5
|
id: string;
|
|
@@ -18,14 +18,11 @@ export declare const useGetEvents: (cms: TinaCMS, cursor?: string, existingEvent
|
|
|
18
18
|
loading: boolean;
|
|
19
19
|
error: Error;
|
|
20
20
|
};
|
|
21
|
-
export declare const SyncErrorWidget: ({ cms }: {
|
|
22
|
-
cms: any;
|
|
23
|
-
}) => React.JSX.Element;
|
|
24
21
|
export declare const SyncStatusModal: ({ closeEventsModal, cms }: {
|
|
25
22
|
closeEventsModal: any;
|
|
26
23
|
cms: any;
|
|
27
24
|
}) => React.JSX.Element;
|
|
28
|
-
export declare const
|
|
29
|
-
cms:
|
|
30
|
-
setEventsOpen:
|
|
31
|
-
}) => React.JSX.Element;
|
|
25
|
+
export declare const SyncStatusButton: ({ cms, setEventsOpen, ...buttonProps }: {
|
|
26
|
+
cms: TinaCMS;
|
|
27
|
+
setEventsOpen: (open: boolean) => void;
|
|
28
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement>) => React.JSX.Element;
|
|
@@ -2,4 +2,4 @@ export * from './sidebar';
|
|
|
2
2
|
export { SidebarProvider } from './components/sidebar';
|
|
3
3
|
export { Nav } from './components/nav';
|
|
4
4
|
export { LocalWarning, BillingWarning } from './components/local-warning';
|
|
5
|
-
export {
|
|
5
|
+
export { SyncStatusButton } from './components/sync-status';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EventBus, Callback } from '../core';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import { Callback, EventBus } from '../core';
|
|
3
3
|
export interface SidebarStateOptions {
|
|
4
4
|
position?: SidebarPosition;
|
|
5
5
|
buttons?: SidebarButtons;
|
|
@@ -22,7 +22,7 @@ export declare type DefaultSidebarState = 'open' | 'closed';
|
|
|
22
22
|
export declare class SidebarState {
|
|
23
23
|
private events;
|
|
24
24
|
private _isOpen;
|
|
25
|
-
|
|
25
|
+
loadingPlaceholder: React.FC;
|
|
26
26
|
defaultState: DefaultSidebarState;
|
|
27
27
|
position: SidebarPosition;
|
|
28
28
|
renderNav: boolean;
|