tinacms 0.0.0-d9672bc-20250218033222 → 0.0.0-ddc5e8e-20250611011547

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 (114) 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/auth/TinaCloudProvider.d.ts +1 -1
  7. package/dist/client.js +10 -1
  8. package/dist/client.mjs +10 -1
  9. package/dist/hooks/create-page-plugin.d.ts +1 -1
  10. package/dist/index.js +101998 -14076
  11. package/dist/index.mjs +102037 -14114
  12. package/dist/internalClient/index.d.ts +3 -3
  13. package/dist/react.d.ts +1 -0
  14. package/dist/react.js +13 -1
  15. package/dist/react.mjs +13 -1
  16. package/dist/rich-text/index.js +10 -4
  17. package/dist/rich-text/index.mjs +10 -4
  18. package/dist/rich-text/prism.js +1 -1
  19. package/dist/rich-text/prism.mjs +1 -1
  20. package/dist/toolkit/components/media/media-manager.d.ts +1 -1
  21. package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
  22. package/dist/toolkit/fields/components/reference/components/command.d.ts +21 -33
  23. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +20 -18
  24. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +14 -10
  25. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +3 -3
  26. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +17 -0
  27. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/error-message.d.ts +6 -0
  28. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-combobox.d.ts +6 -0
  29. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +6 -6
  30. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +2 -11
  31. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +14 -10
  32. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +2 -11
  33. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +112 -0
  34. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dialog.d.ts +12 -0
  35. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +10 -10
  36. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +2 -2
  37. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-element.d.ts +3 -0
  38. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-toolbar-button.d.ts +18 -0
  39. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -1
  40. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +6 -6
  41. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +6 -7
  42. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +1 -1
  43. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +3 -3
  44. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +4 -11
  45. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +4 -5
  46. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +4 -4
  47. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +28 -11
  48. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
  49. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +3 -10
  50. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +6 -8
  51. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +15 -0
  52. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -2
  53. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +6 -6
  54. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +6 -6
  55. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +24 -21
  56. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +2 -2
  57. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +15 -11
  58. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/block-selection.d.ts +6 -0
  59. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +33 -0
  60. 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
  61. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +20 -0
  62. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +15 -0
  63. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +7 -7
  64. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +10 -0
  65. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-state.d.ts +22 -0
  66. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-create-editor.d.ts +6 -0
  67. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
  68. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
  69. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
  70. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +3 -5
  71. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +5 -6
  72. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +18 -2
  73. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +0 -1
  74. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +2 -0
  75. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +2 -2
  76. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +5 -5
  77. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +7 -4
  78. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -5
  79. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +520 -0
  80. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +262 -212
  81. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/floating-toolbar-plugin.d.ts +1 -0
  82. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +1 -1
  83. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
  84. package/dist/toolkit/form-builder/form-builder.d.ts +11 -0
  85. package/dist/toolkit/git-client/git-client.d.ts +25 -2
  86. package/dist/toolkit/git-client/git-file.d.ts +18 -0
  87. package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
  88. package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
  89. package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
  90. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
  91. package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
  92. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
  93. package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
  94. package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
  95. package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
  96. package/dist/toolkit/tina-cms.d.ts +3 -3
  97. package/dist/toolkit/tina-state.d.ts +4 -0
  98. package/dist/unifiedClient/index.d.ts +1 -1
  99. package/package.json +60 -55
  100. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +0 -11
  101. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +0 -27
  102. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +0 -14
  103. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +0 -13
  104. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +0 -8
  105. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +0 -3
  106. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +0 -15
  107. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +0 -2
  108. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +0 -7
  109. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +0 -6
  110. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +0 -5
  111. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +0 -11
  112. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +0 -11
  113. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +0 -2
  114. 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;
@@ -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;
@@ -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,6 +1,6 @@
1
+ import type { Config } from '@tinacms/schema-tools';
1
2
  import AsyncLock from 'async-lock';
2
3
  import type { GraphQLError } from 'graphql';
3
- import type { Config } from '@tinacms/schema-tools';
4
4
  import type { Cache } from '../cache/index';
5
5
  export declare const TINA_HOST = "content.tinajs.io";
6
6
  export interface TinaClientArgs<GenQueries = Record<string, unknown>> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.0.0-d9672bc-20250218033222",
3
+ "version": "0.0.0-ddc5e8e-20250611011547",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -60,40 +60,48 @@
60
60
  "typings": "dist/index.d.ts",
61
61
  "license": "Apache-2.0",
62
62
  "dependencies": {
63
- "@ariakit/react": "^0.4.13",
64
- "@floating-ui/dom": "^1.6.12",
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.2.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.2",
71
- "@radix-ui/react-dialog": "^1.1.2",
72
- "@radix-ui/react-dropdown-menu": "^2.1.2",
73
- "@radix-ui/react-popover": "^1.1.2",
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.4",
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",
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",
95
103
  "async-lock": "^1.4.1",
96
- "class-variance-authority": "^0.7.0",
104
+ "class-variance-authority": "^0.7.1",
97
105
  "clsx": "^2.1.1",
98
106
  "cmdk": "^1.0.4",
99
107
  "color-string": "^1.9.1",
@@ -111,46 +119,43 @@
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",
129
+ "react-icons": "^5.4.0",
122
130
  "react-router-dom": "6.3.0",
123
131
  "react-use": "^17.6.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.4",
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-d9672bc-20250218033222",
133
- "@tinacms/schema-tools": "0.0.0-d9672bc-20250218033222",
134
- "@tinacms/search": "0.0.0-d9672bc-20250218033222"
134
+ "yup": "^1.6.1",
135
+ "zod": "^3.24.2",
136
+ "@tinacms/mdx": "0.0.0-ddc5e8e-20250611011547",
137
+ "@tinacms/schema-tools": "0.0.0-ddc5e8e-20250611011547",
138
+ "@tinacms/search": "0.0.0-ddc5e8e-20250611011547"
135
139
  },
136
140
  "devDependencies": {
137
- "@graphql-tools/utils": "^10.5.6",
141
+ "@graphql-tools/utils": "^10.8.1",
138
142
  "@testing-library/dom": "^10.4.0",
139
143
  "@testing-library/jest-dom": "^6.6.3",
140
- "@testing-library/react": "^16.0.1",
141
- "@testing-library/user-event": "^14.5.2",
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.9.0",
148
- "@types/prop-types": "^15.7.13",
149
- "@types/react": "^18.3.12",
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.1",
155
+ "@types/react-color": "^3.0.13",
156
+ "@types/react-dom": "^18.3.5",
153
157
  "@types/yup": "^0.32.0",
158
+ "lowlight": "^3.3.0",
154
159
  "happy-dom": "15.10.2",
155
160
  "identity-obj-proxy": "^3.0.0",
156
161
  "isomorphic-fetch": "^3.0.0",
@@ -161,10 +166,10 @@
161
166
  "react-is": "^18.3.1",
162
167
  "tsc-alias": "^1.8.10",
163
168
  "tslib": "^2.8.1",
164
- "typescript": "^5.6.3",
165
- "vite": "^5.4.11",
166
- "vitest": "^2.1.5",
167
- "@tinacms/scripts": "1.3.1"
169
+ "typescript": "^5.7.3",
170
+ "vite": "^5.4.14",
171
+ "vitest": "^2.1.9",
172
+ "@tinacms/scripts": "0.0.0-ddc5e8e-20250611011547"
168
173
  },
169
174
  "peerDependencies": {
170
175
  "react": ">=16.14.0",
@@ -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>>;
@@ -1,27 +0,0 @@
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>>;
@@ -1,14 +0,0 @@
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>>;
@@ -1,13 +0,0 @@
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,8 +0,0 @@
1
- /**
2
- *
3
- * This fixes a bug where you can't delete between two void nodes
4
- * without deleting the first node.
5
- *
6
- * https://github.com/ianstormtaylor/slate/issues/3991#issuecomment-832160304
7
- */
8
- export declare const withCorrectVoidBehavior: (editor: any) => any;
@@ -1,3 +0,0 @@
1
- export declare const createCodeBlockPlugin: <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>;
2
- export declare const createHTMLBlockPlugin: <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>;
3
- export declare const createHTMLInlinePlugin: <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,15 +0,0 @@
1
- import React from 'react';
2
- import { type BaseRange } from 'slate';
3
- import { createLinkPlugin } from '@udecode/plate-link';
4
- import { type PlateEditor } from '@udecode/plate-common';
5
- export { createLinkPlugin };
6
- type LinkElement = {
7
- url?: string;
8
- title?: string;
9
- text: string | undefined;
10
- };
11
- export declare const wrapOrRewrapLink: (editor: any) => void;
12
- export declare const LinkForm: (props: any) => React.JSX.Element;
13
- export declare const unwrapLink: (editor: PlateEditor, selection?: BaseRange) => void;
14
- export declare const getLinks: (editor: any) => Generator<import("@udecode/plate-common").TNodeEntry<LinkElement>, void, undefined>;
15
- export declare const isLinkActive: (editor: any) => boolean;
@@ -1,2 +0,0 @@
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,7 +0,0 @@
1
- import type { SoftBreakPlugin } from './types';
2
- export declare const KEY_SOFT_BREAK = "break";
3
- /**
4
- * This code is mostly copied from the plate soft-break plugin
5
- * [here](https://github.com/udecode/plate/blob/3c0de39a66308a9b718cf9f35623502702ae2af4/packages/editor/break/src/soft-break/index.ts)
6
- */
7
- export declare const createSoftBreakPlugin: <OP = SoftBreakPlugin, 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,6 +0,0 @@
1
- /**
2
- * @file Automatically generated by barrelsby.
3
- */
4
- export * from './create-soft-break-plugin';
5
- export * from './on-key-down-soft-break';
6
- export * from './types';
@@ -1,5 +0,0 @@
1
- export declare const onKeyDownSoftBreak: (editor: any, { options: { rules } }: {
2
- options: {
3
- rules?: any[];
4
- };
5
- }) => (event: any) => void;