tinacms 0.0.0-b1fe6d2-20241008011354 → 0.0.0-b25c5f0-20250618074247

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.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/admin/api.d.ts +1 -0
  3. package/dist/admin/components/GetCollection.d.ts +2 -2
  4. package/dist/admin/components/Page.d.ts +3 -9
  5. package/dist/admin/components/Sidebar.d.ts +0 -3
  6. package/dist/admin/components/ui/tooltip.d.ts +7 -0
  7. package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
  8. package/dist/admin/pages/CollectionListPage.d.ts +2 -2
  9. package/dist/admin/pages/DashboardPage.d.ts +0 -3
  10. package/dist/admin/pages/ScreenPage.d.ts +0 -3
  11. package/dist/admin/types.d.ts +3 -0
  12. package/dist/auth/TinaCloudProvider.d.ts +1 -1
  13. package/dist/cache/node-cache.d.ts +1 -0
  14. package/dist/client.js +100 -62
  15. package/dist/client.mjs +59 -36
  16. package/dist/hooks/create-page-plugin.d.ts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +9980 -8095
  19. package/dist/index.mjs +11669 -9781
  20. package/dist/internalClient/index.d.ts +3 -3
  21. package/dist/node-cache-5e8db9f0.mjs +63 -0
  22. package/dist/react.d.ts +1 -0
  23. package/dist/react.js +13 -1
  24. package/dist/react.mjs +13 -1
  25. package/dist/rich-text/index.d.ts +3 -0
  26. package/dist/rich-text/index.js +45 -12
  27. package/dist/rich-text/index.mjs +45 -12
  28. package/dist/rich-text/prism.js +1 -1
  29. package/dist/rich-text/prism.mjs +1 -1
  30. package/dist/toolkit/components/media/media-item.d.ts +1 -1
  31. package/dist/toolkit/components/media/media-manager.d.ts +1 -1
  32. package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
  33. package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
  34. package/dist/toolkit/fields/components/password-field.d.ts +1 -1
  35. package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
  36. package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
  37. package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
  38. package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
  39. package/dist/toolkit/fields/components/select.d.ts +2 -2
  40. package/dist/toolkit/fields/components/text-field.d.ts +1 -1
  41. package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
  42. package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
  43. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +5 -2
  44. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +0 -4
  45. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -0
  46. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
  47. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
  48. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +11 -0
  49. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +20 -0
  50. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +39 -0
  51. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +27 -0
  52. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-dropdown-menu.d.ts +3 -0
  53. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +14 -0
  54. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +13 -0
  55. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/text-area.d.ts +5 -0
  56. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
  57. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +1 -0
  58. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +2 -0
  59. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +4 -2
  60. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +64 -11
  61. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +11 -3
  62. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +3 -3
  63. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
  64. package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
  65. package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
  66. package/dist/toolkit/form-builder/form-builder.d.ts +15 -5
  67. package/dist/toolkit/forms/field.d.ts +3 -0
  68. package/dist/toolkit/forms/form.d.ts +22 -3
  69. package/dist/toolkit/git-client/git-client.d.ts +25 -2
  70. package/dist/toolkit/git-client/git-file.d.ts +18 -0
  71. package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
  72. package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
  73. package/dist/toolkit/icons/Tina.d.ts +0 -5
  74. package/dist/toolkit/index.d.ts +1 -1
  75. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +1 -0
  76. package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
  77. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
  78. package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
  79. package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
  80. package/dist/toolkit/react-sidebar/components/alert.d.ts +5 -0
  81. package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
  82. package/dist/toolkit/react-sidebar/components/nav.d.ts +5 -3
  83. package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
  84. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +7 -10
  85. package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
  86. package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
  87. package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
  88. package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
  89. package/dist/toolkit/react-sidebar/index.d.ts +1 -1
  90. package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
  91. package/dist/toolkit/styles/button.d.ts +2 -2
  92. package/dist/toolkit/tina-cms.d.ts +3 -3
  93. package/dist/toolkit/tina-state.d.ts +15 -0
  94. package/dist/unifiedClient/index.d.ts +8 -1
  95. package/dist/utils/cn.d.ts +2 -0
  96. package/package.json +44 -42
  97. package/dist/__vite-browser-external-d06ac358.mjs +0 -4
  98. package/dist/node-cache-7fa2452c.mjs +0 -43
  99. package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
  100. package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
@@ -1,19 +1,5 @@
1
1
  import React from 'react';
2
- export declare const MarkToolbarButton: React.ForwardRefExoticComponent<{
3
- clear?: string | string[];
4
- nodeType: string;
5
- } & Omit<Omit<{
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;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export declare const MermaidElement: React.ForwardRefExoticComponent<Omit<Omit<{
3
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
4
+ } & Omit<{
5
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
6
+ asChild?: boolean | undefined;
7
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
8
+ ref?: React.Ref<any>;
9
+ } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
10
+ element: import("@udecode/plate-common").TElement;
11
+ } & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<any>>;
@@ -0,0 +1,20 @@
1
+ import { type PlateEditor } from '@udecode/plate-common';
2
+ import React from 'react';
3
+ export declare const insertEmptyMermaid: (editor: PlateEditor) => void;
4
+ export declare const MermaidToolbarButton: React.ForwardRefExoticComponent<{
5
+ clear?: string | string[];
6
+ } & Omit<Omit<{
7
+ tooltip?: React.ReactNode;
8
+ tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
9
+ tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
10
+ } & Omit<{
11
+ isDropdown?: boolean;
12
+ pressed?: boolean;
13
+ showArrow?: boolean;
14
+ } & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
15
+ size?: "default" | "sm" | "lg";
16
+ variant?: "default" | "outline";
17
+ } & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
18
+ size?: "default" | "sm" | "lg";
19
+ variant?: "default" | "outline";
20
+ } & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, "clear"> & React.RefAttributes<HTMLButtonElement>>;
@@ -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>>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { DropdownMenuProps } from '@radix-ui/react-dropdown-menu';
3
+ export declare function TableDropdownMenu(props: DropdownMenuProps): React.JSX.Element;
@@ -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>>;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ }
4
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
5
+ export { Textarea };
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import type { RichTextType } from '..';
3
- export declare const RichEditor: (props: RichTextType) => React.JSX.Element;
3
+ export declare const RichEditor: ({ input, tinaForm, field }: RichTextType) => React.JSX.Element;
@@ -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: {
@@ -0,0 +1,2 @@
1
+ export declare const ELEMENT_MERMAID = "mermaid";
2
+ export declare const createMermaidPlugin: <OP = import("@udecode/plate-common").AnyObject, OV extends import("@udecode/plate-common").Value = import("@udecode/plate-common").Value, OE extends import("@udecode/plate-common").PlateEditor<OV> = import("@udecode/plate-common").PlateEditor<OV>>(override?: Partial<import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>>, overrideByKey?: import("@udecode/plate-common").OverrideByKey<OV, OE>) => import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>;
@@ -1,9 +1,11 @@
1
- import React from 'react';
2
1
  import { type PlateEditor, type TElement } from '@udecode/plate-common';
3
- export declare const CodeBlock: ({ attributes, editor, element, language: restrictLanguage, ...props }: {
2
+ import React from 'react';
3
+ export declare const CodeBlock: ({ attributes, editor, element, language: restrictLanguage, onChangeCallback, defaultValue, ...props }: {
4
4
  attributes: Record<string, unknown>;
5
5
  element: TElement;
6
6
  editor: PlateEditor;
7
7
  language?: string;
8
8
  children: React.ReactNode;
9
+ defaultValue?: unknown;
10
+ onChangeCallback?: (value: string) => void;
9
11
  }) => React.JSX.Element;
@@ -60,6 +60,16 @@ export declare const Components: () => {
60
60
  editor: any;
61
61
  element: any;
62
62
  }) => React.JSX.Element;
63
+ mermaid: React.ForwardRefExoticComponent<Omit<Omit<{
64
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
65
+ } & Omit<{
66
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
67
+ asChild?: boolean | undefined;
68
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
69
+ ref?: React.Ref<any>;
70
+ } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
71
+ element: import("@udecode/plate-common").TElement;
72
+ } & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<any>>;
63
73
  blockquote: React.ForwardRefExoticComponent<Omit<Omit<{
64
74
  elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
65
75
  } & Omit<{
@@ -179,17 +189,12 @@ export declare const Components: () => {
179
189
  } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
180
190
  ref?: React.Ref<any>;
181
191
  } & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<any>>;
182
- strikethrough: React.ForwardRefExoticComponent<Omit<{
183
- leafToAttributes?: (leaf: import("@udecode/plate-common").TText) => any;
184
- } & 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"> & {
185
- leaf: import("@udecode/plate-common").TText;
186
- text: import("@udecode/plate-common").TText;
187
- } & Omit<{
188
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
189
- asChild?: boolean | undefined;
190
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
191
- ref?: React.Ref<any>;
192
- } & 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;
193
198
  italic: React.ForwardRefExoticComponent<Omit<{
194
199
  leafToAttributes?: (leaf: import("@udecode/plate-common").TText) => any;
195
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"> & {
@@ -215,4 +220,52 @@ export declare const Components: () => {
215
220
  element: any;
216
221
  children: any;
217
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>>;
218
271
  };
@@ -1,4 +1,12 @@
1
- export type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'italic' | 'raw' | 'embed';
2
- export declare const ICON_WIDTH = 32;
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 HEADING = 138;
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
+ };
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import { type ReactNode } from 'react';
3
- import type { MdxTemplate } from '../types';
4
3
  import type { Form } from '../../../../../forms';
5
- import type { ToolbarOverrideType } from './toolbar-overrides';
4
+ import type { MdxTemplate } from '../types';
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,5 @@
1
1
  /**
2
- * RegExps. A URL must match #1 and then at least one of #2/#3. Use two levels
3
- * of REs to avoid REDOS.
2
+ * RegExps. A URL must match #1 or #2 or #3 or #4.
4
3
  */
5
4
  /** Loosely validate a URL `string`. */
6
5
  export declare const isUrl: (string: any) => boolean;
@@ -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
+ import { Field, Form } from '../forms';
1
2
  import * as React from 'react';
2
- import { Form, Field } from '../forms';
3
3
  export interface FieldsBuilderProps {
4
4
  form: Form;
5
5
  activeFieldName?: string;
@@ -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: any;
15
+ pristine: boolean;
16
16
  }) => React.JSX.Element;
17
- export declare const FormWrapper: ({ header, children, id, }: {
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 { Field, AnyField } from './field';
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;