tinacms 0.0.0-e0ddb8c-20241004065742 → 0.0.0-e5c0e91-20250421003142
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/types.d.ts +3 -0
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/auth/authenticate.d.ts +1 -1
- package/dist/cache/node-cache.d.ts +1 -0
- package/dist/client.d.ts +1 -4
- package/dist/client.js +100 -62
- package/dist/client.mjs +59 -36
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.d.ts +1 -61
- package/dist/index.js +4138 -2382
- package/dist/index.mjs +4134 -2375
- package/dist/internalClient/authProvider.d.ts +2 -0
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/node-cache-5e8db9f0.mjs +63 -0
- package/dist/react.d.ts +1 -33
- package/dist/react.js +13 -1
- package/dist/react.mjs +13 -1
- package/dist/rich-text/index.d.ts +1 -142
- package/dist/rich-text/index.js +42 -11
- package/dist/rich-text/index.mjs +42 -11
- package/dist/rich-text/prism.d.ts +1 -10
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +0 -4
- 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/components/plate-ui/resizable.d.ts +39 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +27 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-dropdown-menu.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +14 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +13 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +54 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +11 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -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/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
- 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/sidebar.d.ts +2 -2
- package/dist/toolkit/tina-state.d.ts +4 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/package.json +43 -42
- package/dist/__vite-browser-external-d06ac358.mjs +0 -4
- package/dist/node-cache-7fa2452c.mjs +0 -43
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-mermaid-element.d.ts +0 -3
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const mediaResizeHandleVariants: (props?: {
|
|
3
|
+
direction?: "left" | "right";
|
|
4
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
5
|
+
export declare const ResizeHandle: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
6
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
options?: import("@udecode/plate-resizable").ResizeHandleOptions | undefined;
|
|
10
|
+
setProps?: ((hookProps: {
|
|
11
|
+
onMouseDown: React.MouseEventHandler<Element>;
|
|
12
|
+
onMouseOut: () => void;
|
|
13
|
+
onMouseOver: () => void;
|
|
14
|
+
onTouchEnd: () => void;
|
|
15
|
+
onTouchMove: () => void;
|
|
16
|
+
onTouchStart: React.TouchEventHandler<Element>;
|
|
17
|
+
}) => Omit<React.HTMLAttributes<HTMLDivElement>, "onResize">) | undefined;
|
|
18
|
+
state?: {
|
|
19
|
+
direction: import("@udecode/plate-resizable").ResizeDirection;
|
|
20
|
+
initialPosition: number;
|
|
21
|
+
initialSize: number;
|
|
22
|
+
isHorizontal: boolean;
|
|
23
|
+
isResizing: boolean;
|
|
24
|
+
onHover: (() => void) | undefined;
|
|
25
|
+
onHoverEnd: (() => void) | undefined;
|
|
26
|
+
onMouseDown: React.MouseEventHandler<Element> | undefined;
|
|
27
|
+
onResize: (event: import("@udecode/plate-resizable").ResizeEvent) => void;
|
|
28
|
+
onTouchStart: React.TouchEventHandler<Element> | undefined;
|
|
29
|
+
setInitialPosition: React.Dispatch<React.SetStateAction<number>>;
|
|
30
|
+
setInitialSize: React.Dispatch<React.SetStateAction<number>>;
|
|
31
|
+
setIsResizing: React.Dispatch<React.SetStateAction<boolean>>;
|
|
32
|
+
} | undefined;
|
|
33
|
+
style?: React.CSSProperties | undefined;
|
|
34
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onResize"> & React.RefAttributes<any>, "ref">, never> & React.RefAttributes<any>>;
|
|
35
|
+
export declare const Resizable: React.ForwardRefExoticComponent<Omit<{
|
|
36
|
+
options: import("@udecode/plate-resizable").ResizableOptions;
|
|
37
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
38
|
+
align?: "center" | "left" | "right";
|
|
39
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const TableCellElement: React.ForwardRefExoticComponent<{
|
|
3
|
+
hideBorder?: boolean;
|
|
4
|
+
isHeader?: boolean;
|
|
5
|
+
} & Omit<Omit<{
|
|
6
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
7
|
+
} & Omit<{
|
|
8
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
9
|
+
asChild?: boolean | undefined;
|
|
10
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
11
|
+
ref?: React.Ref<any>;
|
|
12
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
13
|
+
element: import("@udecode/plate-common").TElement;
|
|
14
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder" | "isHeader"> & React.RefAttributes<any>>;
|
|
15
|
+
export declare const TableCellHeaderElement: React.ForwardRefExoticComponent<Omit<{
|
|
16
|
+
hideBorder?: boolean;
|
|
17
|
+
isHeader?: boolean;
|
|
18
|
+
} & Omit<Omit<{
|
|
19
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
20
|
+
} & Omit<{
|
|
21
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
22
|
+
asChild?: boolean | undefined;
|
|
23
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
24
|
+
ref?: React.Ref<any>;
|
|
25
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
26
|
+
element: import("@udecode/plate-common").TElement;
|
|
27
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder" | "isHeader"> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
|
package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
export declare const TableBordersDropdownMenuContent: React.ForwardRefExoticComponent<Omit<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const TableFloatingToolbar: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("@radix-ui/react-popover").PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const TableElement: React.ForwardRefExoticComponent<Omit<Omit<Omit<{
|
|
6
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
7
|
+
} & Omit<{
|
|
8
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
9
|
+
asChild?: boolean | undefined;
|
|
10
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
11
|
+
ref?: React.Ref<any>;
|
|
12
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
13
|
+
element: import("@udecode/plate-common").TElement;
|
|
14
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const TableRowElement: React.ForwardRefExoticComponent<{
|
|
3
|
+
hideBorder?: boolean;
|
|
4
|
+
} & Omit<Omit<{
|
|
5
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
6
|
+
} & Omit<{
|
|
7
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
8
|
+
asChild?: boolean | undefined;
|
|
9
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
10
|
+
ref?: React.Ref<any>;
|
|
11
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
12
|
+
element: import("@udecode/plate-common").TElement;
|
|
13
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder"> & React.RefAttributes<any>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type PlateEditor } from '@udecode/plate-common';
|
|
2
2
|
export declare const plugins: any[];
|
|
3
|
+
export declare const unsupportedItemsInTable: Set<string>;
|
|
3
4
|
export declare const insertInlineElement: (editor: any, inlineElement: any) => void;
|
|
4
5
|
export declare const insertBlockElement: (editor: any, blockElement: any) => void;
|
|
5
6
|
export declare const helpers: {
|
|
@@ -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"> & {
|
|
@@ -225,4 +220,52 @@ export declare const Components: () => {
|
|
|
225
220
|
element: any;
|
|
226
221
|
children: any;
|
|
227
222
|
}) => React.JSX.Element;
|
|
223
|
+
table: React.ForwardRefExoticComponent<Omit<Omit<Omit<{
|
|
224
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
225
|
+
} & Omit<{
|
|
226
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
227
|
+
asChild?: boolean | undefined;
|
|
228
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
229
|
+
ref?: React.Ref<any>;
|
|
230
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
231
|
+
element: import("@udecode/plate-common").TElement;
|
|
232
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
233
|
+
tr: React.ForwardRefExoticComponent<{
|
|
234
|
+
hideBorder?: boolean;
|
|
235
|
+
} & Omit<Omit<{
|
|
236
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
237
|
+
} & Omit<{
|
|
238
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
239
|
+
asChild?: boolean | undefined;
|
|
240
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
241
|
+
ref?: React.Ref<any>;
|
|
242
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
243
|
+
element: import("@udecode/plate-common").TElement;
|
|
244
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder"> & React.RefAttributes<any>>;
|
|
245
|
+
td: React.ForwardRefExoticComponent<{
|
|
246
|
+
hideBorder?: boolean;
|
|
247
|
+
isHeader?: boolean;
|
|
248
|
+
} & Omit<Omit<{
|
|
249
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
250
|
+
} & Omit<{
|
|
251
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
252
|
+
asChild?: boolean | undefined;
|
|
253
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
254
|
+
ref?: React.Ref<any>;
|
|
255
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
256
|
+
element: import("@udecode/plate-common").TElement;
|
|
257
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder" | "isHeader"> & React.RefAttributes<any>>;
|
|
258
|
+
th: React.ForwardRefExoticComponent<Omit<{
|
|
259
|
+
hideBorder?: boolean;
|
|
260
|
+
isHeader?: boolean;
|
|
261
|
+
} & Omit<Omit<{
|
|
262
|
+
elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
|
|
263
|
+
} & Omit<{
|
|
264
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
265
|
+
asChild?: boolean | undefined;
|
|
266
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
|
|
267
|
+
ref?: React.Ref<any>;
|
|
268
|
+
} & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
|
|
269
|
+
element: import("@udecode/plate-common").TElement;
|
|
270
|
+
} & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder" | "isHeader"> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
|
|
228
271
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
export type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'italic' | 'mermaid' | 'raw' | 'embed';
|
|
2
|
-
export declare const
|
|
1
|
+
export type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'strikethrough' | 'italic' | 'mermaid' | 'raw' | 'embed' | 'table';
|
|
2
|
+
export declare const STANDARD_ICON_WIDTH = 32;
|
|
3
|
+
export declare const HEADING_ICON_WITH_TEXT = 127;
|
|
4
|
+
export declare const HEADING_ICON_ONLY = 58;
|
|
3
5
|
export declare const EMBED_ICON_WIDTH = 78;
|
|
4
|
-
export declare const
|
|
6
|
+
export declare const CONTAINER_MD_BREAKPOINT = 448;
|
|
7
|
+
export declare const FLOAT_BUTTON_WIDTH = 25;
|
|
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;
|
|
@@ -3,6 +3,14 @@ import { FieldProps } from './field-props';
|
|
|
3
3
|
import { Form } from '../../forms';
|
|
4
4
|
export type InputFieldType<ExtraFieldProps, InputProps> = FieldProps<InputProps> & ExtraFieldProps;
|
|
5
5
|
export declare function wrapFieldsWithMeta<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* Same as wrapFieldsWithMeta but excludes the label, and description useful for fields that render their label and description
|
|
8
|
+
*/
|
|
9
|
+
export declare function wrapFieldWithNoHeader<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Same as above but excludes the label, useful for fields that have their own label
|
|
12
|
+
* @deprecated This function is deprecated and will be removed in future versions.
|
|
13
|
+
*/
|
|
6
14
|
export declare function wrapFieldWithError<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
|
|
7
15
|
interface FieldMetaProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
16
|
name: string;
|
|
@@ -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,8 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { Form } from '../../forms';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface FormsViewProps {
|
|
4
|
+
loadingPlaceholder?: React.FC;
|
|
5
|
+
}
|
|
6
|
+
export declare const FormsView: ({ loadingPlaceholder }?: FormsViewProps) => React.JSX.Element;
|
|
6
7
|
export interface MultiformFormHeaderProps {
|
|
7
8
|
activeForm: {
|
|
8
9
|
activeFieldName?: string;
|
|
@@ -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;
|
|
@@ -58,6 +58,9 @@ export type TinaAction = {
|
|
|
58
58
|
} | {
|
|
59
59
|
type: 'sidebar:set-display-state';
|
|
60
60
|
value: TinaState['sidebarDisplayState'] | 'openOrFull';
|
|
61
|
+
} | {
|
|
62
|
+
type: 'sidebar:set-loading-state';
|
|
63
|
+
value: boolean;
|
|
61
64
|
};
|
|
62
65
|
export interface TinaState {
|
|
63
66
|
activeFormId: string | null;
|
|
@@ -76,6 +79,7 @@ export interface TinaState {
|
|
|
76
79
|
}[];
|
|
77
80
|
formLists: FormList[];
|
|
78
81
|
editingMode: 'visual' | 'basic';
|
|
82
|
+
isLoadingContent: boolean;
|
|
79
83
|
quickEditSupported: boolean;
|
|
80
84
|
sidebarDisplayState: 'closed' | 'open' | 'fullscreen';
|
|
81
85
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Config } from '@tinacms/schema-tools';
|
|
2
|
+
import AsyncLock from 'async-lock';
|
|
3
|
+
import type { GraphQLError } from 'graphql';
|
|
2
4
|
import type { Cache } from '../cache/index';
|
|
3
5
|
export declare const TINA_HOST = "content.tinajs.io";
|
|
4
6
|
export interface TinaClientArgs<GenQueries = Record<string, unknown>> {
|
|
@@ -25,12 +27,17 @@ export declare class TinaClient<GenQueries> {
|
|
|
25
27
|
queries: GenQueries;
|
|
26
28
|
errorPolicy: Config['client']['errorPolicy'];
|
|
27
29
|
initialized: boolean;
|
|
30
|
+
cacheLock: AsyncLock | undefined;
|
|
28
31
|
cacheDir: string;
|
|
29
32
|
cache: Cache;
|
|
30
33
|
constructor({ token, url, queries, errorPolicy, cacheDir, }: TinaClientArgs<GenQueries>);
|
|
31
34
|
init(): Promise<void>;
|
|
32
35
|
request<DataType extends Record<string, any> = any>({ errorPolicy, ...args }: TinaClientRequestArgs, options: {
|
|
33
36
|
fetchOptions?: Parameters<typeof fetch>[1];
|
|
34
|
-
}): Promise<
|
|
37
|
+
}): Promise<{
|
|
38
|
+
data: DataType;
|
|
39
|
+
errors: GraphQLError[] | null;
|
|
40
|
+
query: string;
|
|
41
|
+
}>;
|
|
35
42
|
}
|
|
36
43
|
export declare function createClient<GenQueries>(args: TinaClientArgs<GenQueries>): TinaClient<GenQueries>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-e5c0e91-20250421003142",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -60,21 +60,21 @@
|
|
|
60
60
|
"typings": "dist/index.d.ts",
|
|
61
61
|
"license": "Apache-2.0",
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@ariakit/react": "^0.4.
|
|
64
|
-
"@floating-ui/dom": "^1.6.
|
|
63
|
+
"@ariakit/react": "^0.4.15",
|
|
64
|
+
"@floating-ui/dom": "^1.6.13",
|
|
65
65
|
"@floating-ui/react-dom": "^2.1.2",
|
|
66
|
-
"@graphql-inspector/core": "^6.1
|
|
66
|
+
"@graphql-inspector/core": "^6.2.1",
|
|
67
67
|
"@headlessui/react": "2.1.8",
|
|
68
68
|
"@heroicons/react": "^1.0.6",
|
|
69
69
|
"@monaco-editor/react": "4.4.5",
|
|
70
|
-
"@radix-ui/react-checkbox": "^1.1.
|
|
71
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
72
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
73
|
-
"@radix-ui/react-popover": "^1.1.
|
|
74
|
-
"@radix-ui/react-separator": "^1.1.
|
|
75
|
-
"@radix-ui/react-slot": "^1.1.
|
|
76
|
-
"@radix-ui/react-toolbar": "^1.1.
|
|
77
|
-
"@radix-ui/react-tooltip": "^1.1.
|
|
70
|
+
"@radix-ui/react-checkbox": "^1.1.4",
|
|
71
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
72
|
+
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
73
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
74
|
+
"@radix-ui/react-separator": "^1.1.2",
|
|
75
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
76
|
+
"@radix-ui/react-toolbar": "^1.1.2",
|
|
77
|
+
"@radix-ui/react-tooltip": "^1.1.8",
|
|
78
78
|
"@react-hook/window-size": "^3.1.1",
|
|
79
79
|
"@udecode/cn": "^33.0.0",
|
|
80
80
|
"@udecode/plate": "^36.5.9",
|
|
@@ -85,19 +85,20 @@
|
|
|
85
85
|
"@udecode/plate-common": "^36.5.9",
|
|
86
86
|
"@udecode/plate-floating": "^36.3.8",
|
|
87
87
|
"@udecode/plate-heading": "^36.0.12",
|
|
88
|
-
"@udecode/plate-indent": "^36.0.0",
|
|
89
88
|
"@udecode/plate-indent-list": "^36.5.2",
|
|
90
89
|
"@udecode/plate-link": "^36.5.9",
|
|
91
90
|
"@udecode/plate-list": "^36.5.2",
|
|
92
91
|
"@udecode/plate-paragraph": "^36.0.0",
|
|
92
|
+
"@udecode/plate-resizable": "36.0.0",
|
|
93
93
|
"@udecode/plate-slash-command": "^36.0.0",
|
|
94
|
-
"
|
|
94
|
+
"@udecode/plate-table": "36.5.8",
|
|
95
|
+
"async-lock": "^1.4.1",
|
|
96
|
+
"class-variance-authority": "^0.7.1",
|
|
95
97
|
"clsx": "^2.1.1",
|
|
96
|
-
"cmdk": "^1.0.
|
|
98
|
+
"cmdk": "^1.0.4",
|
|
97
99
|
"color-string": "^1.9.1",
|
|
98
100
|
"crypto-js": "^4.2.0",
|
|
99
101
|
"date-fns": "2.30.0",
|
|
100
|
-
"fetch-ponyfill": "^7.1.0",
|
|
101
102
|
"final-form": "4.20.10",
|
|
102
103
|
"final-form-arrays": "^3.1.0",
|
|
103
104
|
"final-form-set-field-data": "^1.0.2",
|
|
@@ -107,50 +108,50 @@
|
|
|
107
108
|
"lodash.get": "^4.4.2",
|
|
108
109
|
"lodash.set": "^4.3.2",
|
|
109
110
|
"lucide-react": "^0.424.0",
|
|
110
|
-
"mermaid": "
|
|
111
|
+
"mermaid": "9.3.0",
|
|
111
112
|
"moment": "2.29.4",
|
|
112
113
|
"monaco-editor": "0.31.0",
|
|
113
|
-
"prism-react-renderer": "^2.4.
|
|
114
|
+
"prism-react-renderer": "^2.4.1",
|
|
114
115
|
"prop-types": "15.7.2",
|
|
115
116
|
"react-beautiful-dnd": "^13.1.1",
|
|
116
117
|
"react-color": "^2.19.3",
|
|
117
|
-
"react-datetime": "^3.
|
|
118
|
+
"react-datetime": "^3.3.1",
|
|
118
119
|
"react-dropzone": "14.2.3",
|
|
119
120
|
"react-final-form": "^6.5.9",
|
|
120
|
-
"react-icons": "^5.
|
|
121
|
-
"react-onclickoutside": "^6.13.1",
|
|
121
|
+
"react-icons": "^5.4.0",
|
|
122
122
|
"react-router-dom": "6.3.0",
|
|
123
|
+
"react-use": "^17.6.0",
|
|
123
124
|
"slate": "^0.103.0",
|
|
124
125
|
"slate-history": "^0.100.0",
|
|
125
126
|
"slate-hyperscript": "^0.100.0",
|
|
126
127
|
"slate-react": "^0.107.1",
|
|
127
|
-
"tailwind-merge": "^2.
|
|
128
|
+
"tailwind-merge": "^2.6.0",
|
|
128
129
|
"webfontloader": "1.6.28",
|
|
129
|
-
"yup": "^1.
|
|
130
|
-
"zod": "^3.
|
|
131
|
-
"@tinacms/
|
|
132
|
-
"@tinacms/
|
|
133
|
-
"@tinacms/
|
|
130
|
+
"yup": "^1.6.1",
|
|
131
|
+
"zod": "^3.24.2",
|
|
132
|
+
"@tinacms/mdx": "0.0.0-e5c0e91-20250421003142",
|
|
133
|
+
"@tinacms/schema-tools": "0.0.0-e5c0e91-20250421003142",
|
|
134
|
+
"@tinacms/search": "0.0.0-e5c0e91-20250421003142"
|
|
134
135
|
},
|
|
135
136
|
"devDependencies": {
|
|
136
|
-
"@graphql-tools/utils": "^10.
|
|
137
|
+
"@graphql-tools/utils": "^10.8.1",
|
|
137
138
|
"@testing-library/dom": "^10.4.0",
|
|
138
|
-
"@testing-library/jest-dom": "^6.
|
|
139
|
-
"@testing-library/react": "^16.0
|
|
140
|
-
"@testing-library/user-event": "^14.
|
|
139
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
140
|
+
"@testing-library/react": "^16.2.0",
|
|
141
|
+
"@testing-library/user-event": "^14.6.1",
|
|
141
142
|
"@types/atob": "^2.1.4",
|
|
142
143
|
"@types/codemirror": "^5.60.15",
|
|
143
144
|
"@types/color-string": "^1.5.5",
|
|
144
145
|
"@types/lodash.debounce": "^4.0.9",
|
|
145
146
|
"@types/lodash.get": "^4.4.9",
|
|
146
|
-
"@types/node": "^22.
|
|
147
|
-
"@types/prop-types": "^15.7.
|
|
148
|
-
"@types/react": "^18.3.
|
|
147
|
+
"@types/node": "^22.13.1",
|
|
148
|
+
"@types/prop-types": "^15.7.14",
|
|
149
|
+
"@types/react": "^18.3.18",
|
|
149
150
|
"@types/react-beautiful-dnd": "^13.1.8",
|
|
150
|
-
"@types/react-color": "^3.0.
|
|
151
|
-
"@types/react-dom": "^18.3.
|
|
151
|
+
"@types/react-color": "^3.0.13",
|
|
152
|
+
"@types/react-dom": "^18.3.5",
|
|
152
153
|
"@types/yup": "^0.32.0",
|
|
153
|
-
"happy-dom": "
|
|
154
|
+
"happy-dom": "15.10.2",
|
|
154
155
|
"identity-obj-proxy": "^3.0.0",
|
|
155
156
|
"isomorphic-fetch": "^3.0.0",
|
|
156
157
|
"jest-file-snapshot": "^0.7.0",
|
|
@@ -159,11 +160,11 @@
|
|
|
159
160
|
"react-dom": "^18.3.1",
|
|
160
161
|
"react-is": "^18.3.1",
|
|
161
162
|
"tsc-alias": "^1.8.10",
|
|
162
|
-
"tslib": "^2.
|
|
163
|
-
"typescript": "^5.
|
|
164
|
-
"vite": "^5.4.
|
|
165
|
-
"vitest": "^2.1.
|
|
166
|
-
"@tinacms/scripts": "1.
|
|
163
|
+
"tslib": "^2.8.1",
|
|
164
|
+
"typescript": "^5.7.3",
|
|
165
|
+
"vite": "^5.4.14",
|
|
166
|
+
"vitest": "^2.1.9",
|
|
167
|
+
"@tinacms/scripts": "1.3.4"
|
|
167
168
|
},
|
|
168
169
|
"peerDependencies": {
|
|
169
170
|
"react": ">=16.14.0",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
const makeCacheDir = async (dir, fs) => {
|
|
2
|
-
const path = await import("./__vite-browser-external-d06ac358.mjs");
|
|
3
|
-
const os = await import("./__vite-browser-external-d06ac358.mjs");
|
|
4
|
-
const parts = dir.split(path.sep).filter(Boolean);
|
|
5
|
-
let cacheDir = dir;
|
|
6
|
-
if (!fs.existsSync(path.join(path.sep, parts[0]))) {
|
|
7
|
-
cacheDir = path.join(os.tmpdir(), parts[parts.length - 1]);
|
|
8
|
-
}
|
|
9
|
-
fs.mkdirSync(cacheDir, { recursive: true });
|
|
10
|
-
return cacheDir;
|
|
11
|
-
};
|
|
12
|
-
const NodeCache = async (dir) => {
|
|
13
|
-
const fs = await import("./__vite-browser-external-d06ac358.mjs");
|
|
14
|
-
const { createHash } = await import("./__vite-browser-external-d06ac358.mjs");
|
|
15
|
-
const cacheDir = await makeCacheDir(dir, fs);
|
|
16
|
-
return {
|
|
17
|
-
makeKey: (key) => {
|
|
18
|
-
const input = key && key instanceof Object ? JSON.stringify(key) : key || "";
|
|
19
|
-
return createHash("sha256").update(input).digest("hex");
|
|
20
|
-
},
|
|
21
|
-
get: async (key) => {
|
|
22
|
-
try {
|
|
23
|
-
const data = await fs.promises.readFile(`${cacheDir}/${key}`, "utf-8");
|
|
24
|
-
return JSON.parse(data);
|
|
25
|
-
} catch (e) {
|
|
26
|
-
if (e.code === "ENOENT") {
|
|
27
|
-
return void 0;
|
|
28
|
-
}
|
|
29
|
-
throw e;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
set: async (key, value) => {
|
|
33
|
-
await fs.promises.writeFile(
|
|
34
|
-
`${cacheDir}/${key}`,
|
|
35
|
-
JSON.stringify(value),
|
|
36
|
-
"utf-8"
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
NodeCache
|
|
43
|
-
};
|