tinacms 3.12.0 → 3.13.0

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 (33) hide show
  1. package/dist/admin/components/GetDocument.d.ts +1 -1
  2. package/dist/admin/components/UnableToLoadModal.d.ts +4 -0
  3. package/dist/index.js +1798 -1045
  4. package/dist/internalClient/authProvider.d.ts +8 -0
  5. package/dist/internalClient/index.d.ts +14 -2
  6. package/dist/internalClient/types.d.ts +11 -0
  7. package/dist/rich-text/index.js +35 -35
  8. package/dist/rich-text/static.js +40 -37
  9. package/dist/toolkit/alerts/alerts.d.ts +7 -1
  10. package/dist/toolkit/components/media/media-manager.d.ts +3 -1
  11. package/dist/toolkit/components/media/utils.d.ts +12 -0
  12. package/dist/toolkit/core/cms.d.ts +2 -2
  13. package/dist/toolkit/core/errors.d.ts +1 -0
  14. package/dist/toolkit/core/index.d.ts +2 -0
  15. package/dist/toolkit/core/media-store.default.d.ts +41 -15
  16. package/dist/toolkit/core/media.d.ts +18 -0
  17. package/dist/toolkit/core/session-expired.d.ts +6 -0
  18. package/dist/toolkit/fields/components/image-upload/image-upload.d.ts +2 -0
  19. package/dist/toolkit/fields/plugins/blocks-field-plugin/block-selector-big.d.ts +2 -1
  20. package/dist/toolkit/fields/plugins/blocks-field-plugin/block-selector.d.ts +2 -1
  21. package/dist/toolkit/fields/plugins/field-props.d.ts +12 -1
  22. package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +2 -1
  23. package/dist/toolkit/fields/plugins/image-field-plugin.d.ts +2 -0
  24. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +5 -1
  25. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +2 -2
  26. package/dist/toolkit/form-builder/create-branch-modal.d.ts +2 -1
  27. package/dist/toolkit/form-builder/editorial-workflow-utils.d.ts +2 -0
  28. package/dist/toolkit/index.d.ts +1 -1
  29. package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
  30. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +6 -2
  31. package/dist/utils/branch-name.d.ts +3 -0
  32. package/package.json +9 -10
  33. package/dist/toolkit/plugin-branch-switcher/format-branch-name.d.ts +0 -8
@@ -19,7 +19,11 @@ export declare const MdxFieldPlugin: {
19
19
  export declare const MdxFieldPluginExtendible: {
20
20
  name: string;
21
21
  validate(value: any): string;
22
- Component: (props: InputFieldType<InputProps, {
22
+ Component: (props: InputFieldType<InputProps & {
23
+ rawMode?: boolean;
24
+ setRawMode?: (rawMode: boolean) => void;
25
+ rawEditor?: React.ReactNode;
26
+ }, {
23
27
  templates: MdxTemplate[];
24
28
  toolbarOverride?: ToolbarOverrideType[];
25
29
  overrides?: ToolbarOverrides;
@@ -1,6 +1,6 @@
1
1
  export declare const createHTMLBlockPlugin: import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"html", {}, {}, {}, {}>>;
2
2
  export declare const createHTMLInlinePlugin: import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"html_inline", {}, {}, {}, {}>>;
3
- export declare const KEY_BLOCKQUOTE_ENTER_BREAK = "blockquote-enter-break";
4
- export declare const createBlockquoteEnterBreakPlugin: import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"blockquote-enter-break", {}, {}, {}, {}>>;
3
+ export declare const KEY_HARD_BREAK = "tina-hard-break";
4
+ export declare const createHardBreakPlugin: import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"tina-hard-break", {}, {}, {}, {}>>;
5
5
  export declare const ELEMENT_BREAK = "break";
6
6
  export declare const createBreakPlugin: import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"break", {}, {}, {}, {}>>;
@@ -10,7 +10,7 @@ export declare const CreateBranchModal: ({ close, safeSubmit, path, values, crud
10
10
  tinaForm?: Form;
11
11
  onBaseBranchDeleted?: () => void;
12
12
  }) => React.JSX.Element;
13
- export declare const CreateBranchPromptModal: ({ branchName, close, disabled, errorMessage, onBranchNameChange, onCreateBranch, onSaveToProtectedBranch, showSaveOptions, disablePublish, }: {
13
+ export declare const CreateBranchPromptModal: ({ branchName, close, disabled, errorMessage, onBranchNameChange, onCreateBranch, onSaveToProtectedBranch, showSaveOptions, disablePublish, allowSaveToProtectedBranch, }: {
14
14
  branchName: string;
15
15
  close: () => void;
16
16
  disabled?: boolean;
@@ -20,6 +20,7 @@ export declare const CreateBranchPromptModal: ({ branchName, close, disabled, er
20
20
  onSaveToProtectedBranch: () => void;
21
21
  showSaveOptions?: boolean;
22
22
  disablePublish?: boolean;
23
+ allowSaveToProtectedBranch?: boolean;
23
24
  }) => React.JSX.Element;
24
25
  export declare const PrefixedTextField: ({ label, prefix, ...props }: {
25
26
  [x: string]: any;
@@ -2,6 +2,8 @@ export interface MediaWorkflowConfirmBranchEvent {
2
2
  type: 'media:workflow:confirm-branch';
3
3
  branchName: string;
4
4
  baseBranch: string;
5
+ /** Whether the prompt may offer the direct "Save to Protected Branch" action. */
6
+ allowSaveToProtectedBranch: boolean;
5
7
  onConfirm: (branchName: string) => Promise<void>;
6
8
  onCancel: () => void;
7
9
  onSaveToProtectedBranch: () => void;
@@ -6,7 +6,7 @@ export type { Media, MediaUploadOptions, MediaStore, MediaListOptions, MediaList
6
6
  export { MdxFieldPluginExtendible } from './fields/plugins/mdx-field-plugin';
7
7
  export type { CloudConfigPlugin } from './react-cloud-config';
8
8
  export type { Plugin } from './core';
9
- export { MediaManager, MediaListError, EventBus, DummyMediaStore, TinaMediaStore, } from './core';
9
+ export { MediaManager, MediaListError, EventBus, DummyMediaStore, TinaMediaStore, SessionExpiredError, isSessionExpiredError, } from './core';
10
10
  export * from './alerts';
11
11
  export * from './styles';
12
12
  export { useScreenPlugin } from './react-screens';
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Branch, BranchSwitcherProps } from './types';
3
- export declare function formatBranchName(str: string): string;
3
+ export { formatBranchName } from '../../utils/branch-name';
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[];
6
6
  export declare const CreateBranch: React.FC<{
@@ -1,12 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { Branch, BranchSwitcherProps } from './types';
3
3
  export declare const tableHeadingStyle = "px-3 py-3 text-left text-xs font-bold text-gray-700 tracking-wider sticky top-0 bg-gray-100 z-20 border-b-2 border-gray-200 ";
4
- import { formatBranchName } from './format-branch-name';
5
- export { formatBranchName };
4
+ export { formatBranchName } from '../../utils/branch-name';
6
5
  export declare const BranchSwitcher: (props: BranchSwitcherProps) => React.JSX.Element;
7
6
  export declare const EditoralBranchSwitcher: ({ listBranches, createBranch, chooseBranch, setModalTitle, }: BranchSwitcherProps) => React.JSX.Element;
8
7
  export declare const getFilteredBranchList: (branchList: Branch[], search: string, currentBranchName: string, filter?: "content" | "all") => Branch[];
9
8
  export declare const sortBranchListFn: (sortValue: "default" | "updated" | "name") => (a: Branch, b: Branch) => number;
9
+ export declare const BranchCreator: ({ setViewState, handleCreateBranch, currentBranch, }: {
10
+ setViewState: any;
11
+ handleCreateBranch: any;
12
+ currentBranch: any;
13
+ }) => React.JSX.Element;
10
14
  export declare const extractPullRequestId: (url: string) => string;
11
15
  export declare const BranchItem: ({ branch, currentBranch, onChange, refreshBranchList, previewFunction, cms, selectedBranch, onSelectBranch, }: {
12
16
  branch: Branch;
@@ -0,0 +1,3 @@
1
+ export declare const formatDefaultBranchName: (filePath: string, crudType: string) => string;
2
+ export declare const normalizeBranchName: (name: string) => string;
3
+ export declare function formatBranchName(str: string): string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tinacms",
3
3
  "type": "module",
4
4
  "typings": "dist/index.d.ts",
5
- "version": "3.12.0",
5
+ "version": "3.13.0",
6
6
  "main": "dist/index.js",
7
7
  "module": "./dist/index.js",
8
8
  "exports": {
@@ -80,11 +80,10 @@
80
80
  "clsx": "^2.1.1",
81
81
  "cmdk": "^1.0.4",
82
82
  "color-string": "^1.9.1",
83
- "crypto-js": "^4.2.0",
84
83
  "date-fns": "4.1.0",
85
84
  "es-toolkit": "^1.42.0",
86
- "final-form": "4.20.10",
87
- "final-form-arrays": "^3.1.0",
85
+ "final-form": "^5.0.1",
86
+ "final-form-arrays": "^4.0.1",
88
87
  "final-form-set-field-data": "^1.0.2",
89
88
  "graphql": "15.8.0",
90
89
  "graphql-tag": "^2.12.6",
@@ -99,7 +98,7 @@
99
98
  "react-dnd": "^16.0.1",
100
99
  "react-dnd-html5-backend": "^16.0.1",
101
100
  "react-dropzone": "14.2.3",
102
- "react-final-form": "^6.5.9",
101
+ "react-final-form": "^7.0.1",
103
102
  "react-router-dom": "^6.30.3",
104
103
  "react-use": "^17.6.0",
105
104
  "tailwind-merge": "^2.6.0",
@@ -107,9 +106,9 @@
107
106
  "yup": "^1.6.1",
108
107
  "zod": "^3.24.2",
109
108
  "@tinacms/bridge": "^0.3.1",
110
- "@tinacms/mdx": "^2.2.0",
111
- "@tinacms/search": "^1.2.23",
112
- "@tinacms/schema-tools": "^2.9.0"
109
+ "@tinacms/mdx": "^2.2.2",
110
+ "@tinacms/schema-tools": "^2.10.0",
111
+ "@tinacms/search": "^1.2.24"
113
112
  },
114
113
  "devDependencies": {
115
114
  "@graphql-tools/utils": "^10.8.1",
@@ -128,7 +127,7 @@
128
127
  "identity-obj-proxy": "^3.0.0",
129
128
  "jest-file-snapshot": "^0.7.0",
130
129
  "lowlight": "^3.3.0",
131
- "next": "14.2.35",
130
+ "next": "15.5.21",
132
131
  "react": "^18.3.1",
133
132
  "react-dom": "^18.3.1",
134
133
  "react-is": "^18.3.1",
@@ -137,7 +136,7 @@
137
136
  "typescript": "^5.7.3",
138
137
  "vite": "^5.4.14",
139
138
  "vitest": "^2.1.9",
140
- "@tinacms/scripts": "1.6.3"
139
+ "@tinacms/scripts": "1.6.4"
141
140
  },
142
141
  "peerDependencies": {
143
142
  "react": ">=16.14.0",
@@ -1,8 +0,0 @@
1
- /**
2
- * Normalizes user-supplied strings into git-ref-safe branch segments.
3
- * Kept in its own file (no React or workspace-internal imports) so
4
- * non-React callers like `core/media-store.default.ts` can import it
5
- * without dragging in the rest of `plugin-branch-switcher` and creating
6
- * a cycle through `@toolkit/core`.
7
- */
8
- export declare function formatBranchName(str: string): string;