tinacms 0.0.0-e70425b-20241028042614 → 0.0.0-e999254-20250610011143

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 (125) 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/ui/tooltip.d.ts +7 -0
  5. package/dist/admin/pages/CollectionListPage.d.ts +2 -2
  6. package/dist/admin/types.d.ts +3 -0
  7. package/dist/auth/TinaCloudProvider.d.ts +1 -1
  8. package/dist/cache/node-cache.d.ts +1 -0
  9. package/dist/client.js +100 -62
  10. package/dist/client.mjs +59 -36
  11. package/dist/hooks/create-page-plugin.d.ts +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +101806 -13935
  14. package/dist/index.mjs +101824 -13952
  15. package/dist/internalClient/index.d.ts +3 -3
  16. package/dist/node-cache-5e8db9f0.mjs +63 -0
  17. package/dist/react.d.ts +1 -0
  18. package/dist/react.js +13 -1
  19. package/dist/react.mjs +13 -1
  20. package/dist/rich-text/index.js +10 -4
  21. package/dist/rich-text/index.mjs +10 -4
  22. package/dist/rich-text/prism.js +1 -1
  23. package/dist/rich-text/prism.mjs +1 -1
  24. package/dist/toolkit/components/media/media-manager.d.ts +1 -1
  25. package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
  26. package/dist/toolkit/fields/components/reference/components/command.d.ts +21 -33
  27. package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
  28. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
  29. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +20 -18
  30. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +14 -10
  31. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +3 -3
  32. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +17 -0
  33. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/error-message.d.ts +6 -0
  34. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-combobox.d.ts +6 -0
  35. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +6 -6
  36. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +2 -11
  37. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +14 -10
  38. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +2 -11
  39. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +112 -0
  40. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dialog.d.ts +12 -0
  41. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +10 -10
  42. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +2 -2
  43. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-element.d.ts +3 -0
  44. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-toolbar-button.d.ts +18 -0
  45. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -1
  46. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +6 -6
  47. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +6 -7
  48. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +1 -1
  49. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +3 -3
  50. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +4 -11
  51. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +4 -5
  52. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +4 -4
  53. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +28 -11
  54. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
  55. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +3 -10
  56. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +6 -8
  57. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +15 -0
  58. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -2
  59. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +6 -6
  60. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +6 -6
  61. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +24 -21
  62. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +2 -2
  63. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +15 -11
  64. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/block-selection.d.ts +6 -0
  65. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +33 -0
  66. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/{table-dropdown-menu.d.ts → table/table-dropdown-menu.d.ts} +1 -0
  67. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +20 -0
  68. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +15 -0
  69. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +7 -7
  70. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +10 -0
  71. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-state.d.ts +22 -0
  72. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-create-editor.d.ts +6 -0
  73. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
  74. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
  75. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
  76. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
  77. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +3 -5
  78. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +5 -6
  79. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +18 -2
  80. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +0 -1
  81. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +2 -0
  82. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +2 -2
  83. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +5 -5
  84. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +7 -4
  85. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -5
  86. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +520 -0
  87. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +262 -212
  88. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/floating-toolbar-plugin.d.ts +1 -0
  89. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +5 -1
  90. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
  91. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
  92. package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
  93. package/dist/toolkit/form-builder/form-builder.d.ts +11 -0
  94. package/dist/toolkit/git-client/git-client.d.ts +25 -2
  95. package/dist/toolkit/git-client/git-file.d.ts +18 -0
  96. package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
  97. package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
  98. package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
  99. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
  100. package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
  101. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
  102. package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
  103. package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
  104. package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
  105. package/dist/toolkit/tina-cms.d.ts +3 -3
  106. package/dist/toolkit/tina-state.d.ts +4 -0
  107. package/dist/unifiedClient/index.d.ts +8 -1
  108. package/package.json +66 -61
  109. package/dist/__vite-browser-external-d06ac358.mjs +0 -4
  110. package/dist/node-cache-7fa2452c.mjs +0 -43
  111. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +0 -11
  112. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +0 -27
  113. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +0 -14
  114. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +0 -13
  115. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +0 -8
  116. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +0 -3
  117. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +0 -15
  118. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +0 -2
  119. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +0 -7
  120. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +0 -6
  121. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +0 -5
  122. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +0 -11
  123. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +0 -11
  124. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +0 -2
  125. package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
@@ -0,0 +1 @@
1
+ export declare const FloatingToolbarPlugin: import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"floating-toolbar", {}, {}, {}, {}>>;
@@ -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' | 'hr';
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,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;
@@ -19,6 +19,10 @@ export declare const FormWrapper: ({ header, children, id, }: {
19
19
  children: React.ReactNode;
20
20
  id: string;
21
21
  }) => React.JSX.Element;
22
+ /**
23
+ * @deprecated
24
+ * Original misspelt version of CreateBranchModal
25
+ */
22
26
  export declare const CreateBranchModel: ({ close, safeSubmit, relativePath, values, crudType, }: {
23
27
  safeSubmit: () => Promise<void>;
24
28
  close: () => void;
@@ -26,6 +30,13 @@ export declare const CreateBranchModel: ({ close, safeSubmit, relativePath, valu
26
30
  values: Record<string, unknown>;
27
31
  crudType: string;
28
32
  }) => React.JSX.Element;
33
+ export declare const CreateBranchModal: ({ close, safeSubmit, path, values, crudType, }: {
34
+ safeSubmit: () => Promise<void>;
35
+ close: () => void;
36
+ path: string;
37
+ values: Record<string, unknown>;
38
+ crudType: string;
39
+ }) => React.JSX.Element;
29
40
  export declare const PrefixedTextField: ({ prefix, ...props }: {
30
41
  [x: string]: any;
31
42
  prefix?: string;
@@ -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;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { BranchSwitcherProps, Branch } from './types';
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 { BranchSwitcherProps, Branch } from './types';
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 Tina Cloud Config that should be accessible via the CMS.
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 TIna Cloud Configuration
7
+ * about TinaCloud Configuration
8
8
  * cases may include:
9
9
  *
10
- * * Tina Cloud Project Configuration
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
- export declare const FormsView: ({ children, }: {
4
- children?: React.ReactChild | React.ReactChild[];
5
- }) => React.JSX.Element;
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;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const SidebarLoadingPlaceholder: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const SidebarNoFormsPlaceholder: () => React.JSX.Element;
@@ -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
- placeholder: React.FC;
25
+ loadingPlaceholder: React.FC;
26
26
  defaultState: DefaultSidebarState;
27
27
  position: SidebarPosition;
28
28
  renderNav: boolean;
@@ -1,11 +1,11 @@
1
+ import { Alerts, type EventsToAlerts } from './alerts';
1
2
  import { CMS, type CMSConfig, type PluginType } from './core';
2
3
  import type { FieldPlugin } from './form-builder';
3
- import type { ScreenPlugin } from './react-screens';
4
4
  import type { Form } from './forms';
5
- import { Alerts, type EventsToAlerts } from './alerts';
5
+ import type { ScreenPlugin } from './react-screens';
6
6
  import { SidebarState, type SidebarStateOptions } from './react-sidebar';
7
- import type { TinaAction, TinaState } from './tina-state';
8
7
  import type { Client } from '../internalClient';
8
+ import type { TinaAction, TinaState } from './tina-state';
9
9
  export interface TinaCMSConfig extends CMSConfig {
10
10
  sidebar?: SidebarStateOptions | boolean;
11
11
  alerts?: EventsToAlerts;
@@ -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<any>;
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-e70425b-20241028042614",
3
+ "version": "0.0.0-e999254-20250610011143",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -60,45 +60,53 @@
60
60
  "typings": "dist/index.d.ts",
61
61
  "license": "Apache-2.0",
62
62
  "dependencies": {
63
- "@ariakit/react": "^0.4.11",
64
- "@floating-ui/dom": "^1.6.11",
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.0",
66
+ "@graphql-inspector/core": "^6.2.1",
67
67
  "@headlessui/react": "2.1.8",
68
68
  "@heroicons/react": "^1.0.6",
69
- "@monaco-editor/react": "4.4.5",
70
- "@radix-ui/react-checkbox": "^1.1.1",
71
- "@radix-ui/react-dialog": "^1.1.1",
72
- "@radix-ui/react-dropdown-menu": "^2.1.1",
73
- "@radix-ui/react-popover": "^1.1.1",
74
- "@radix-ui/react-separator": "^1.1.0",
75
- "@radix-ui/react-slot": "^1.1.0",
76
- "@radix-ui/react-toolbar": "^1.1.0",
77
- "@radix-ui/react-tooltip": "^1.1.2",
69
+ "@monaco-editor/react": "4.7.0-rc.0",
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.2.6",
78
78
  "@react-hook/window-size": "^3.1.1",
79
- "@udecode/cn": "^33.0.0",
80
- "@udecode/plate": "^36.5.9",
81
- "@udecode/plate-autoformat": "^36.5.6",
82
- "@udecode/plate-block-quote": "^36.0.0",
83
- "@udecode/plate-code-block": "^36.5.6",
84
- "@udecode/plate-combobox": "^36.0.0",
85
- "@udecode/plate-common": "^36.5.9",
86
- "@udecode/plate-floating": "^36.3.8",
87
- "@udecode/plate-heading": "^36.0.12",
88
- "@udecode/plate-indent-list": "^36.5.2",
89
- "@udecode/plate-link": "^36.5.9",
90
- "@udecode/plate-list": "^36.5.2",
91
- "@udecode/plate-paragraph": "^36.0.0",
92
- "@udecode/plate-resizable": "36.0.0",
93
- "@udecode/plate-slash-command": "^36.0.0",
94
- "@udecode/plate-table": "36.5.8",
95
- "class-variance-authority": "^0.7.0",
79
+ "@udecode/cmdk": "^0.2.1",
80
+ "@udecode/cn": "^48.0.3",
81
+ "@udecode/plate": "^48.0.3",
82
+ "@udecode/plate-autoformat": "^48.0.0",
83
+ "@udecode/plate-basic-marks": "^48.0.0",
84
+ "@udecode/plate-block-quote": "^48",
85
+ "@udecode/plate-break": "^48",
86
+ "@udecode/plate-code-block": "^48.0.0",
87
+ "@udecode/plate-combobox": "^48",
88
+ "@udecode/plate-dnd": "^48.0.0",
89
+ "@udecode/plate-floating": "^48.0.0",
90
+ "@udecode/plate-heading": "^48",
91
+ "@udecode/plate-horizontal-rule": "^48",
92
+ "@udecode/plate-indent-list": "^48.0.0",
93
+ "@udecode/plate-link": "^48.0.0",
94
+ "@udecode/plate-list": "^48.0.0",
95
+ "@udecode/plate-node-id": "^48.0.0",
96
+ "@udecode/plate-reset-node": "^48",
97
+ "@udecode/plate-resizable": "^48",
98
+ "@udecode/plate-selection": "^48.0.0",
99
+ "@udecode/plate-slash-command": "^48.0.0",
100
+ "@udecode/plate-table": "^48.0.0",
101
+ "@udecode/plate-trailing-block": "^48.0.0",
102
+ "add": "^2.0.6",
103
+ "async-lock": "^1.4.1",
104
+ "class-variance-authority": "^0.7.1",
96
105
  "clsx": "^2.1.1",
97
- "cmdk": "^1.0.0",
106
+ "cmdk": "^1.0.4",
98
107
  "color-string": "^1.9.1",
99
108
  "crypto-js": "^4.2.0",
100
109
  "date-fns": "2.30.0",
101
- "fetch-ponyfill": "^7.1.0",
102
110
  "final-form": "4.20.10",
103
111
  "final-form-arrays": "^3.1.0",
104
112
  "final-form-set-field-data": "^1.0.2",
@@ -111,47 +119,44 @@
111
119
  "mermaid": "9.3.0",
112
120
  "moment": "2.29.4",
113
121
  "monaco-editor": "0.31.0",
114
- "prism-react-renderer": "^2.4.0",
122
+ "prism-react-renderer": "^2.4.1",
115
123
  "prop-types": "15.7.2",
116
124
  "react-beautiful-dnd": "^13.1.1",
117
125
  "react-color": "^2.19.3",
118
- "react-datetime": "^3.2.0",
126
+ "react-datetime": "^3.3.1",
119
127
  "react-dropzone": "14.2.3",
120
128
  "react-final-form": "^6.5.9",
121
- "react-icons": "^5.3.0",
122
- "react-onclickoutside": "^6.13.1",
129
+ "react-icons": "^5.4.0",
123
130
  "react-router-dom": "6.3.0",
124
- "slate": "^0.103.0",
125
- "slate-history": "^0.100.0",
126
- "slate-hyperscript": "^0.100.0",
127
- "slate-react": "^0.107.1",
128
- "tailwind-merge": "^2.5.2",
131
+ "react-use": "^17.6.0",
132
+ "tailwind-merge": "^2.6.0",
129
133
  "webfontloader": "1.6.28",
130
- "yup": "^1.4.0",
131
- "zod": "^3.23.8",
132
- "@tinacms/mdx": "0.0.0-e70425b-20241028042614",
133
- "@tinacms/schema-tools": "0.0.0-e70425b-20241028042614",
134
- "@tinacms/search": "0.0.0-e70425b-20241028042614"
134
+ "yup": "^1.6.1",
135
+ "zod": "^3.24.2",
136
+ "@tinacms/mdx": "0.0.0-e999254-20250610011143",
137
+ "@tinacms/schema-tools": "0.0.0-e999254-20250610011143",
138
+ "@tinacms/search": "0.0.0-e999254-20250610011143"
135
139
  },
136
140
  "devDependencies": {
137
- "@graphql-tools/utils": "^10.5.4",
141
+ "@graphql-tools/utils": "^10.8.1",
138
142
  "@testing-library/dom": "^10.4.0",
139
- "@testing-library/jest-dom": "^6.5.0",
140
- "@testing-library/react": "^16.0.1",
141
- "@testing-library/user-event": "^14.5.2",
143
+ "@testing-library/jest-dom": "^6.6.3",
144
+ "@testing-library/react": "^16.2.0",
145
+ "@testing-library/user-event": "^14.6.1",
142
146
  "@types/atob": "^2.1.4",
143
147
  "@types/codemirror": "^5.60.15",
144
148
  "@types/color-string": "^1.5.5",
145
149
  "@types/lodash.debounce": "^4.0.9",
146
150
  "@types/lodash.get": "^4.4.9",
147
- "@types/node": "^22.7.4",
148
- "@types/prop-types": "^15.7.13",
149
- "@types/react": "^18.3.10",
151
+ "@types/node": "^22.13.1",
152
+ "@types/prop-types": "^15.7.14",
153
+ "@types/react": "^18.3.18",
150
154
  "@types/react-beautiful-dnd": "^13.1.8",
151
- "@types/react-color": "^3.0.12",
152
- "@types/react-dom": "^18.3.0",
155
+ "@types/react-color": "^3.0.13",
156
+ "@types/react-dom": "^18.3.5",
153
157
  "@types/yup": "^0.32.0",
154
- "happy-dom": "^14.12.3",
158
+ "lowlight": "^3.3.0",
159
+ "happy-dom": "15.10.2",
155
160
  "identity-obj-proxy": "^3.0.0",
156
161
  "isomorphic-fetch": "^3.0.0",
157
162
  "jest-file-snapshot": "^0.7.0",
@@ -160,11 +165,11 @@
160
165
  "react-dom": "^18.3.1",
161
166
  "react-is": "^18.3.1",
162
167
  "tsc-alias": "^1.8.10",
163
- "tslib": "^2.7.0",
164
- "typescript": "^5.6.2",
165
- "vite": "^5.4.8",
166
- "vitest": "^2.1.1",
167
- "@tinacms/scripts": "1.3.0"
168
+ "tslib": "^2.8.1",
169
+ "typescript": "^5.7.3",
170
+ "vite": "^5.4.14",
171
+ "vitest": "^2.1.9",
172
+ "@tinacms/scripts": "0.0.0-e999254-20250610011143"
168
173
  },
169
174
  "peerDependencies": {
170
175
  "react": ">=16.14.0",
@@ -1,4 +0,0 @@
1
- const __viteBrowserExternal = {};
2
- export {
3
- __viteBrowserExternal as default
4
- };
@@ -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
- };
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- export declare const CodeBlockElement: 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>>;