tinacms 3.8.3 → 3.9.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.
- package/dist/index.d.ts +0 -4
- package/dist/index.js +1156 -567
- package/dist/internalClient/index.d.ts +30 -8
- package/dist/toolkit/components/media/index.d.ts +1 -1
- package/dist/toolkit/components/media/media-workflow-overlay.d.ts +2 -0
- package/dist/toolkit/components/media/utils.d.ts +8 -0
- package/dist/toolkit/core/event.d.ts +15 -1
- package/dist/toolkit/core/media-store.default.d.ts +31 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +8 -8
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/heading-items.d.ts +15 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +2 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +171 -165
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +3 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +10 -1
- package/dist/toolkit/form-builder/create-branch-modal.d.ts +9 -0
- package/dist/toolkit/form-builder/editorial-workflow-progress-modal.d.ts +15 -0
- package/dist/toolkit/form-builder/editorial-workflow-utils.d.ts +20 -0
- package/dist/toolkit/form-builder/use-editorial-workflow.d.ts +2 -0
- package/dist/toolkit/git-client/git-client.d.ts +0 -6
- package/dist/toolkit/git-client/git-file.d.ts +1 -1
- package/dist/toolkit/index.d.ts +2 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +2 -1
- package/dist/toolkit/plugin-branch-switcher/format-branch-name.d.ts +8 -0
- package/dist/toolkit/react-core/use-cms-event.d.ts +1 -1
- package/package.json +4 -4
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { AutoformatRule } from '@udecode/plate-autoformat';
|
|
3
3
|
import { ListStyleType } from '@udecode/plate-indent-list';
|
|
4
4
|
import { createLowlight } from 'lowlight';
|
|
5
|
+
import type { HeadingLevel } from '@tinacms/schema-tools';
|
|
5
6
|
export declare const HANDLES_MDX: ("h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p")[];
|
|
6
7
|
export declare const viewPlugins: readonly [import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"basicMarks", {}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"underline", {}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"highlight", {}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"heading", {
|
|
7
8
|
levels?: import("@udecode/plate-heading").HeadingLevel | import("@udecode/plate-heading").HeadingLevel[];
|
|
@@ -9,11 +10,152 @@ export declare const viewPlugins: readonly [import("@udecode/plate/react").Plate
|
|
|
9
10
|
defaultLanguage?: string | null;
|
|
10
11
|
lowlight?: ReturnType<typeof createLowlight> | null;
|
|
11
12
|
}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"blockquote", {}, {}, {}, {}>>];
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
13
|
+
export interface CreateEditorPluginsOptions {
|
|
14
|
+
/** Heading levels exposed via markdown autoformat shortcuts (`# `, `## `, …).
|
|
15
|
+
* Omit to allow all levels 1-6. */
|
|
16
|
+
headingLevels?: readonly HeadingLevel[];
|
|
17
|
+
}
|
|
18
|
+
export declare const createEditorPlugins: ({ headingLevels, }?: CreateEditorPluginsOptions) => (import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"code_block", {
|
|
19
|
+
defaultLanguage?: string | null;
|
|
20
|
+
lowlight?: ReturnType<typeof createLowlight> | null;
|
|
21
|
+
}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"table", {
|
|
22
|
+
_cellIndices: Record<string, {
|
|
23
|
+
col: number;
|
|
24
|
+
row: number;
|
|
25
|
+
}>;
|
|
26
|
+
selectedCells: import("@udecode/plate").TElement[] | null;
|
|
27
|
+
selectedTables: import("@udecode/plate").TElement[] | null;
|
|
28
|
+
disableExpandOnInsert?: boolean;
|
|
29
|
+
disableMarginLeft?: boolean;
|
|
30
|
+
disableMerge?: boolean;
|
|
31
|
+
enableUnsetSingleColSize?: boolean;
|
|
32
|
+
initialTableWidth?: number;
|
|
33
|
+
minColumnWidth?: number;
|
|
34
|
+
}, {
|
|
35
|
+
create: {
|
|
36
|
+
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyTableNodeOptions) => import("@udecode/plate-table").TTableElement>;
|
|
37
|
+
tableCell: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { children, header, row }?: import("@udecode/plate-table").CreateCellOptions) => {
|
|
38
|
+
children: import("@udecode/plate").Descendant[];
|
|
39
|
+
type: string;
|
|
40
|
+
}>;
|
|
41
|
+
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyRowNodeOptions) => {
|
|
42
|
+
children: {
|
|
43
|
+
children: import("@udecode/plate").Descendant[];
|
|
44
|
+
type: string;
|
|
45
|
+
}[];
|
|
46
|
+
type: string;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
table: {
|
|
50
|
+
getCellBorders: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, defaultBorder, element, }: {
|
|
51
|
+
element: import("@udecode/plate-table").TTableCellElement;
|
|
52
|
+
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
53
|
+
defaultBorder?: import("@udecode/plate-table").BorderStyle;
|
|
54
|
+
}) => import("@udecode/plate-table").BorderStylesDefault>;
|
|
55
|
+
getCellSize: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, colSizes, element, rowSize, }: {
|
|
56
|
+
element: import("@udecode/plate-table").TTableCellElement;
|
|
57
|
+
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
58
|
+
colSizes?: number[];
|
|
59
|
+
rowSize?: number;
|
|
60
|
+
}) => {
|
|
61
|
+
minHeight: number | undefined;
|
|
62
|
+
width: number;
|
|
63
|
+
}>;
|
|
64
|
+
getColSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
65
|
+
getRowSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
66
|
+
getCellChildren: (cell: import("@udecode/plate-table").TTableCellElement) => import("@udecode/plate").Descendant[];
|
|
67
|
+
};
|
|
68
|
+
} & {
|
|
69
|
+
create: {
|
|
70
|
+
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyTableNodeOptions) => import("@udecode/plate-table").TTableElement>;
|
|
71
|
+
tableCell: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { children, header, row }?: import("@udecode/plate-table").CreateCellOptions) => {
|
|
72
|
+
children: import("@udecode/plate").Descendant[];
|
|
73
|
+
type: string;
|
|
74
|
+
}>;
|
|
75
|
+
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyRowNodeOptions) => {
|
|
76
|
+
children: {
|
|
77
|
+
children: import("@udecode/plate").Descendant[];
|
|
78
|
+
type: string;
|
|
79
|
+
}[];
|
|
80
|
+
type: string;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
table: {
|
|
84
|
+
getCellBorders: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, defaultBorder, element, }: {
|
|
85
|
+
element: import("@udecode/plate-table").TTableCellElement;
|
|
86
|
+
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
87
|
+
defaultBorder?: import("@udecode/plate-table").BorderStyle;
|
|
88
|
+
}) => import("@udecode/plate-table").BorderStylesDefault>;
|
|
89
|
+
getCellSize: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, colSizes, element, rowSize, }: {
|
|
90
|
+
element: import("@udecode/plate-table").TTableCellElement;
|
|
91
|
+
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
92
|
+
colSizes?: number[];
|
|
93
|
+
rowSize?: number;
|
|
94
|
+
}) => {
|
|
95
|
+
minHeight: number | undefined;
|
|
96
|
+
width: number;
|
|
97
|
+
}>;
|
|
98
|
+
getColSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
99
|
+
getRowSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
100
|
+
getCellChildren: (cell: import("@udecode/plate-table").TTableCellElement) => import("@udecode/plate").Descendant[];
|
|
101
|
+
};
|
|
102
|
+
}, {
|
|
103
|
+
insert: {
|
|
104
|
+
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount }?: import("@udecode/plate-table").GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import("@udecode/plate").InsertNodesOptions) => void>;
|
|
105
|
+
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
106
|
+
at?: import("@udecode/plate").Path;
|
|
107
|
+
before?: boolean;
|
|
108
|
+
fromCell?: import("@udecode/plate").Path;
|
|
109
|
+
header?: boolean;
|
|
110
|
+
select?: boolean;
|
|
111
|
+
}) => void>;
|
|
112
|
+
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
113
|
+
at?: import("@udecode/plate").Path;
|
|
114
|
+
before?: boolean;
|
|
115
|
+
fromRow?: import("@udecode/plate").Path;
|
|
116
|
+
header?: boolean;
|
|
117
|
+
select?: boolean;
|
|
118
|
+
}) => void>;
|
|
119
|
+
};
|
|
120
|
+
remove: {
|
|
121
|
+
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
122
|
+
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
123
|
+
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
124
|
+
};
|
|
125
|
+
table: {
|
|
126
|
+
merge: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
127
|
+
split: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
128
|
+
};
|
|
129
|
+
} & {
|
|
130
|
+
insert: {
|
|
131
|
+
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount }?: import("@udecode/plate-table").GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import("@udecode/plate").InsertNodesOptions) => void>;
|
|
132
|
+
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
133
|
+
at?: import("@udecode/plate").Path;
|
|
134
|
+
before?: boolean;
|
|
135
|
+
fromCell?: import("@udecode/plate").Path;
|
|
136
|
+
header?: boolean;
|
|
137
|
+
select?: boolean;
|
|
138
|
+
}) => void>;
|
|
139
|
+
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
140
|
+
at?: import("@udecode/plate").Path;
|
|
141
|
+
before?: boolean;
|
|
142
|
+
fromRow?: import("@udecode/plate").Path;
|
|
143
|
+
header?: boolean;
|
|
144
|
+
select?: boolean;
|
|
145
|
+
}) => void>;
|
|
146
|
+
};
|
|
147
|
+
remove: {
|
|
148
|
+
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
149
|
+
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
150
|
+
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
151
|
+
};
|
|
152
|
+
table: {
|
|
153
|
+
merge: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
154
|
+
split: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
155
|
+
};
|
|
156
|
+
}, {
|
|
157
|
+
cellIndices?: (id: string) => import("@udecode/plate-table").CellIndices;
|
|
158
|
+
}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"p", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"blockquote", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"a", {
|
|
17
159
|
allowedSchemes?: string[];
|
|
18
160
|
dangerouslySkipSanitization?: boolean;
|
|
19
161
|
defaultLinkAttributes?: React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
@@ -337,12 +479,29 @@ export declare const editorPlugins: readonly [import("@udecode/plate/react").Pla
|
|
|
337
479
|
};
|
|
338
480
|
}, {}, {
|
|
339
481
|
isOpen?: (editorId: string) => boolean;
|
|
340
|
-
}
|
|
482
|
+
}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"highlight", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"underline", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"hr", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"img", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"mdxJsxTextElement", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"mdxJsxFlowElement", {}, {}, {}, {}>> | import("@udecode/plate").SlatePlugin<import("@udecode/plate").PluginConfig<"trailingBlock", {
|
|
483
|
+
type: string;
|
|
484
|
+
} & {
|
|
485
|
+
level?: number;
|
|
486
|
+
type?: string;
|
|
487
|
+
} & import("@udecode/plate").QueryNodeOptions, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"autoformat", {
|
|
488
|
+
enableUndoOnDelete?: boolean;
|
|
489
|
+
rules?: AutoformatRule[];
|
|
490
|
+
}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"exitBreak", {
|
|
491
|
+
rules?: import("node_modules/@udecode/plate-break/dist/BaseSoftBreakPlugin-CeLtcSTo").E[];
|
|
492
|
+
}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"resetNode", {
|
|
493
|
+
disableEditorReset?: boolean;
|
|
494
|
+
disableFirstBlockReset?: boolean;
|
|
495
|
+
rules?: import("@udecode/plate-reset-node").ResetNodePluginRule[];
|
|
496
|
+
}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"softBreak", {
|
|
497
|
+
rules?: import("node_modules/@udecode/plate-break/dist/BaseSoftBreakPlugin-CeLtcSTo").b[];
|
|
498
|
+
}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"invalid_markdown", {
|
|
499
|
+
isElement: boolean;
|
|
500
|
+
isVoid: boolean;
|
|
501
|
+
isInline: boolean;
|
|
502
|
+
}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"floating-toolbar", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"html", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"html_inline", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"blockquote-enter-break", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"break", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"basicMarks", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"heading", {
|
|
341
503
|
levels?: import("@udecode/plate-heading").HeadingLevel | import("@udecode/plate-heading").HeadingLevel[];
|
|
342
|
-
}, {}, {}, {}
|
|
343
|
-
defaultLanguage?: string | null;
|
|
344
|
-
lowlight?: ReturnType<typeof createLowlight> | null;
|
|
345
|
-
}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"blockquote", {}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"list", {
|
|
504
|
+
}, {}, {}, {}>> | import("@udecode/plate").SlatePlugin<import("@udecode/plate").PluginConfig<"WITH_CORRECT_NODE_BEHAVIOR", {}, {}, {}, {}>> | import("@udecode/plate").SlatePlugin<import("@udecode/plate").PluginConfig<"CLEAR_HIGHLIGHT_ON_ENTER", {}, {}, {}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"list", {
|
|
346
505
|
enableResetOnShiftTab?: boolean;
|
|
347
506
|
validLiChildrenTypes?: string[];
|
|
348
507
|
}, {}, {
|
|
@@ -355,7 +514,7 @@ export declare const editorPlugins: readonly [import("@udecode/plate/react").Pla
|
|
|
355
514
|
}) => boolean);
|
|
356
515
|
numberedList: (() => boolean) & (() => boolean);
|
|
357
516
|
};
|
|
358
|
-
}, {}
|
|
517
|
+
}, {}>> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"listStyleType", {
|
|
359
518
|
getSiblingIndentListOptions?: import("@udecode/plate-indent-list").GetSiblingIndentListOptions<import("@udecode/plate").TElement>;
|
|
360
519
|
listStyleTypes?: Record<string, {
|
|
361
520
|
type: string;
|
|
@@ -364,157 +523,4 @@ export declare const editorPlugins: readonly [import("@udecode/plate/react").Pla
|
|
|
364
523
|
markerComponent?: React.FC<Omit<import("@udecode/plate").SlateRenderElementProps, "children">>;
|
|
365
524
|
}>;
|
|
366
525
|
getListStyleType?: (element: HTMLElement) => ListStyleType;
|
|
367
|
-
}, {}, {}, {}
|
|
368
|
-
_cellIndices: Record<string, {
|
|
369
|
-
col: number;
|
|
370
|
-
row: number;
|
|
371
|
-
}>;
|
|
372
|
-
selectedCells: import("@udecode/plate").TElement[] | null;
|
|
373
|
-
selectedTables: import("@udecode/plate").TElement[] | null;
|
|
374
|
-
disableExpandOnInsert?: boolean;
|
|
375
|
-
disableMarginLeft?: boolean;
|
|
376
|
-
disableMerge?: boolean;
|
|
377
|
-
enableUnsetSingleColSize?: boolean;
|
|
378
|
-
initialTableWidth?: number;
|
|
379
|
-
minColumnWidth?: number;
|
|
380
|
-
}, {
|
|
381
|
-
create: {
|
|
382
|
-
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyTableNodeOptions) => import("@udecode/plate-table").TTableElement>;
|
|
383
|
-
tableCell: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { children, header, row }?: import("@udecode/plate-table").CreateCellOptions) => {
|
|
384
|
-
children: import("@udecode/plate").Descendant[];
|
|
385
|
-
type: string;
|
|
386
|
-
}>;
|
|
387
|
-
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyRowNodeOptions) => {
|
|
388
|
-
children: {
|
|
389
|
-
children: import("@udecode/plate").Descendant[];
|
|
390
|
-
type: string;
|
|
391
|
-
}[];
|
|
392
|
-
type: string;
|
|
393
|
-
}>;
|
|
394
|
-
};
|
|
395
|
-
table: {
|
|
396
|
-
getCellBorders: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, defaultBorder, element, }: {
|
|
397
|
-
element: import("@udecode/plate-table").TTableCellElement;
|
|
398
|
-
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
399
|
-
defaultBorder?: import("@udecode/plate-table").BorderStyle;
|
|
400
|
-
}) => import("@udecode/plate-table").BorderStylesDefault>;
|
|
401
|
-
getCellSize: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, colSizes, element, rowSize, }: {
|
|
402
|
-
element: import("@udecode/plate-table").TTableCellElement;
|
|
403
|
-
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
404
|
-
colSizes?: number[];
|
|
405
|
-
rowSize?: number;
|
|
406
|
-
}) => {
|
|
407
|
-
minHeight: number | undefined;
|
|
408
|
-
width: number;
|
|
409
|
-
}>;
|
|
410
|
-
getColSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
411
|
-
getRowSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
412
|
-
getCellChildren: (cell: import("@udecode/plate-table").TTableCellElement) => import("@udecode/plate").Descendant[];
|
|
413
|
-
};
|
|
414
|
-
} & {
|
|
415
|
-
create: {
|
|
416
|
-
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyTableNodeOptions) => import("@udecode/plate-table").TTableElement>;
|
|
417
|
-
tableCell: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { children, header, row }?: import("@udecode/plate-table").CreateCellOptions) => {
|
|
418
|
-
children: import("@udecode/plate").Descendant[];
|
|
419
|
-
type: string;
|
|
420
|
-
}>;
|
|
421
|
-
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, ...cellOptions }?: import("@udecode/plate-table").GetEmptyRowNodeOptions) => {
|
|
422
|
-
children: {
|
|
423
|
-
children: import("@udecode/plate").Descendant[];
|
|
424
|
-
type: string;
|
|
425
|
-
}[];
|
|
426
|
-
type: string;
|
|
427
|
-
}>;
|
|
428
|
-
};
|
|
429
|
-
table: {
|
|
430
|
-
getCellBorders: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, defaultBorder, element, }: {
|
|
431
|
-
element: import("@udecode/plate-table").TTableCellElement;
|
|
432
|
-
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
433
|
-
defaultBorder?: import("@udecode/plate-table").BorderStyle;
|
|
434
|
-
}) => import("@udecode/plate-table").BorderStylesDefault>;
|
|
435
|
-
getCellSize: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { cellIndices, colSizes, element, rowSize, }: {
|
|
436
|
-
element: import("@udecode/plate-table").TTableCellElement;
|
|
437
|
-
cellIndices?: import("@udecode/plate-table").CellIndices;
|
|
438
|
-
colSizes?: number[];
|
|
439
|
-
rowSize?: number;
|
|
440
|
-
}) => {
|
|
441
|
-
minHeight: number | undefined;
|
|
442
|
-
width: number;
|
|
443
|
-
}>;
|
|
444
|
-
getColSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
445
|
-
getRowSpan: (cellElem: import("@udecode/plate-table").TTableCellElement) => number;
|
|
446
|
-
getCellChildren: (cell: import("@udecode/plate-table").TTableCellElement) => import("@udecode/plate").Descendant[];
|
|
447
|
-
};
|
|
448
|
-
}, {
|
|
449
|
-
insert: {
|
|
450
|
-
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount }?: import("@udecode/plate-table").GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import("@udecode/plate").InsertNodesOptions) => void>;
|
|
451
|
-
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
452
|
-
at?: import("@udecode/plate").Path;
|
|
453
|
-
before?: boolean;
|
|
454
|
-
fromCell?: import("@udecode/plate").Path;
|
|
455
|
-
header?: boolean;
|
|
456
|
-
select?: boolean;
|
|
457
|
-
}) => void>;
|
|
458
|
-
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
459
|
-
at?: import("@udecode/plate").Path;
|
|
460
|
-
before?: boolean;
|
|
461
|
-
fromRow?: import("@udecode/plate").Path;
|
|
462
|
-
header?: boolean;
|
|
463
|
-
select?: boolean;
|
|
464
|
-
}) => void>;
|
|
465
|
-
};
|
|
466
|
-
remove: {
|
|
467
|
-
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
468
|
-
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
469
|
-
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
470
|
-
};
|
|
471
|
-
table: {
|
|
472
|
-
merge: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
473
|
-
split: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
474
|
-
};
|
|
475
|
-
} & {
|
|
476
|
-
insert: {
|
|
477
|
-
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, { colCount, header, rowCount }?: import("@udecode/plate-table").GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import("@udecode/plate").InsertNodesOptions) => void>;
|
|
478
|
-
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
479
|
-
at?: import("@udecode/plate").Path;
|
|
480
|
-
before?: boolean;
|
|
481
|
-
fromCell?: import("@udecode/plate").Path;
|
|
482
|
-
header?: boolean;
|
|
483
|
-
select?: boolean;
|
|
484
|
-
}) => void>;
|
|
485
|
-
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor, options?: {
|
|
486
|
-
at?: import("@udecode/plate").Path;
|
|
487
|
-
before?: boolean;
|
|
488
|
-
fromRow?: import("@udecode/plate").Path;
|
|
489
|
-
header?: boolean;
|
|
490
|
-
select?: boolean;
|
|
491
|
-
}) => void>;
|
|
492
|
-
};
|
|
493
|
-
remove: {
|
|
494
|
-
table: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
495
|
-
tableColumn: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
496
|
-
tableRow: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
497
|
-
};
|
|
498
|
-
table: {
|
|
499
|
-
merge: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
500
|
-
split: import("@udecode/plate").OmitFirst<(editor: import("@udecode/plate").SlateEditor) => void>;
|
|
501
|
-
};
|
|
502
|
-
}, {
|
|
503
|
-
cellIndices?: (id: string) => import("@udecode/plate-table").CellIndices;
|
|
504
|
-
}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"slash_command", import("@udecode/plate-combobox").TriggerComboboxPluginOptions, {}, {}, {}>>, import("@udecode/plate").SlatePlugin<import("@udecode/plate").PluginConfig<"trailingBlock", {
|
|
505
|
-
type: string;
|
|
506
|
-
} & {
|
|
507
|
-
level?: number;
|
|
508
|
-
type?: string;
|
|
509
|
-
} & import("@udecode/plate").QueryNodeOptions, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"break", {}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"floating-toolbar", {}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"autoformat", {
|
|
510
|
-
enableUndoOnDelete?: boolean;
|
|
511
|
-
rules?: AutoformatRule[];
|
|
512
|
-
}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"exitBreak", {
|
|
513
|
-
rules?: import("node_modules/@udecode/plate-break/dist/BaseSoftBreakPlugin-CeLtcSTo").E[];
|
|
514
|
-
}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"resetNode", {
|
|
515
|
-
disableEditorReset?: boolean;
|
|
516
|
-
disableFirstBlockReset?: boolean;
|
|
517
|
-
rules?: import("@udecode/plate-reset-node").ResetNodePluginRule[];
|
|
518
|
-
}, {}, {}, {}>>, import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"softBreak", {
|
|
519
|
-
rules?: import("node_modules/@udecode/plate-break/dist/BaseSoftBreakPlugin-CeLtcSTo").b[];
|
|
520
|
-
}, {}, {}, {}>>];
|
|
526
|
+
}, {}, {}, {}>> | import("@udecode/plate").SlatePlugin<import("@udecode/plate-node-id").NodeIdConfig> | import("@udecode/plate/react").PlatePlugin<import("@udecode/plate").PluginConfig<"slash_command", import("@udecode/plate-combobox").TriggerComboboxPluginOptions, {}, {}, {}>>)[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ToolbarOverrideType } from '@tinacms/schema-tools';
|
|
2
|
-
export type { ToolbarOverrideType };
|
|
1
|
+
import type { HeadingLevel, ToolbarOverrideType } from '@tinacms/schema-tools';
|
|
2
|
+
export type { HeadingLevel, ToolbarOverrideType };
|
|
3
3
|
export declare const STANDARD_ICON_WIDTH = 32;
|
|
4
4
|
export declare const HEADING_ICON_WITH_TEXT = 127;
|
|
5
5
|
export declare const HEADING_ICON_ONLY = 58;
|
|
@@ -10,4 +10,5 @@ export declare const HEADING_LABEL = "Headings";
|
|
|
10
10
|
export type ToolbarOverrides = {
|
|
11
11
|
toolbar?: ToolbarOverrideType[];
|
|
12
12
|
showFloatingToolbar?: boolean;
|
|
13
|
+
headingLevels?: HeadingLevel[];
|
|
13
14
|
};
|
|
@@ -2,13 +2,22 @@ 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 HeadingLevel } from '@tinacms/schema-tools';
|
|
5
6
|
import type { ToolbarOverrides, ToolbarOverrideType } from './toolbar-overrides';
|
|
6
7
|
interface ToolbarContextProps {
|
|
7
8
|
tinaForm: Form;
|
|
8
9
|
templates: MdxTemplate[];
|
|
9
10
|
overrides: ToolbarOverrideType[] | ToolbarOverrides;
|
|
11
|
+
headingLevels: readonly HeadingLevel[];
|
|
12
|
+
/**
|
|
13
|
+
* True when the schema explicitly sets `overrides.headingLevels`
|
|
14
|
+
* (including an explicit empty array, which means "no headings").
|
|
15
|
+
* Lets consumers (e.g. the slash menu) distinguish "user opted in"
|
|
16
|
+
* from "use the legacy default" without re-deriving the check.
|
|
17
|
+
*/
|
|
18
|
+
headingLevelsConfigured: boolean;
|
|
10
19
|
}
|
|
11
|
-
interface ToolbarProviderProps extends ToolbarContextProps {
|
|
20
|
+
interface ToolbarProviderProps extends Omit<ToolbarContextProps, 'headingLevels' | 'headingLevelsConfigured'> {
|
|
12
21
|
children: ReactNode;
|
|
13
22
|
}
|
|
14
23
|
export declare const ToolbarProvider: React.FC<ToolbarProviderProps>;
|
|
@@ -9,6 +9,15 @@ export declare const CreateBranchModal: ({ close, safeSubmit, path, values, crud
|
|
|
9
9
|
tinaForm?: Form;
|
|
10
10
|
onBaseBranchDeleted?: () => void;
|
|
11
11
|
}) => React.JSX.Element;
|
|
12
|
+
export declare const CreateBranchPromptModal: ({ branchName, close, disabled, errorMessage, onBranchNameChange, onCreateBranch, onSaveToProtectedBranch, }: {
|
|
13
|
+
branchName: string;
|
|
14
|
+
close: () => void;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
onBranchNameChange: (value: string) => void;
|
|
18
|
+
onCreateBranch: () => void;
|
|
19
|
+
onSaveToProtectedBranch: () => void;
|
|
20
|
+
}) => React.JSX.Element;
|
|
12
21
|
export declare const PrefixedTextField: ({ label, prefix, ...props }: {
|
|
13
22
|
[x: string]: any;
|
|
14
23
|
label?: any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface EditorialWorkflowProgressModalProps {
|
|
3
|
+
title: string;
|
|
4
|
+
currentStep: number;
|
|
5
|
+
elapsedTime: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Shared modal shell for any "we're creating a branch + PR right now"
|
|
9
|
+
* state. Both the content-save flow (`CreateBranchModal`) and the
|
|
10
|
+
* media-store flow (`MediaWorkflowOverlay`) render this while the
|
|
11
|
+
* workflow is in flight so the editor sees the same indicator regardless
|
|
12
|
+
* of what triggered it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EditorialWorkflowProgressModal: ({ title, currentStep, elapsedTime, }: EditorialWorkflowProgressModalProps) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface MediaWorkflowConfirmBranchEvent {
|
|
2
|
+
type: 'media:workflow:confirm-branch';
|
|
3
|
+
branchName: string;
|
|
4
|
+
baseBranch: string;
|
|
5
|
+
onConfirm: (branchName: string) => Promise<void>;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onSaveToProtectedBranch: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const getEditorialWorkflowPrTitle: (branchName: string) => string;
|
|
10
|
+
export declare const TARGET_BRANCH_EXISTS_ERROR = "A branch with this name already exists";
|
|
11
|
+
export declare const checkBaseBranchExists: (tinaApi: {
|
|
12
|
+
branchExists: (branchName: string, args?: {
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
}) => Promise<boolean>;
|
|
15
|
+
}, baseBranch: string, debugLabel: string, signal?: AbortSignal) => Promise<boolean>;
|
|
16
|
+
export declare const checkTargetBranchExists: (tinaApi: {
|
|
17
|
+
branchExists: (branchName: string, args?: {
|
|
18
|
+
signal?: AbortSignal;
|
|
19
|
+
}) => Promise<boolean>;
|
|
20
|
+
}, targetBranch: string, debugLabel: string, signal?: AbortSignal) => Promise<boolean>;
|
|
@@ -12,6 +12,7 @@ export interface ExecuteWorkflowOptions {
|
|
|
12
12
|
values: Record<string, unknown>;
|
|
13
13
|
crudType: string;
|
|
14
14
|
tinaForm?: Form;
|
|
15
|
+
signal?: AbortSignal;
|
|
15
16
|
}
|
|
16
17
|
export interface UseEditorialWorkflowResult {
|
|
17
18
|
isExecuting: boolean;
|
|
@@ -23,4 +24,5 @@ export interface UseEditorialWorkflowResult {
|
|
|
23
24
|
/** Reset error/executing state so the form can be retried */
|
|
24
25
|
reset: () => void;
|
|
25
26
|
}
|
|
27
|
+
export declare const getEditorialWorkflowErrorMessage: (e: unknown) => string;
|
|
26
28
|
export declare function useEditorialWorkflow(): UseEditorialWorkflowResult;
|
package/dist/toolkit/index.d.ts
CHANGED
|
@@ -37,4 +37,5 @@ export { TinaUI } from './components/tina-ui';
|
|
|
37
37
|
export type { TinaUIProps } from './components/tina-ui';
|
|
38
38
|
export { useLocalStorage } from './hooks/use-local-storage';
|
|
39
39
|
export { CursorPaginator } from './components/media/pagination';
|
|
40
|
-
export { DEFAULT_MEDIA_UPLOAD_TYPES } from './components/media';
|
|
40
|
+
export { DEFAULT_MEDIA_UPLOAD_TYPES, sanitizeFilename, } from './components/media';
|
|
41
|
+
export { MediaWorkflowOverlay } from './components/media/media-workflow-overlay';
|
|
@@ -1,7 +1,8 @@
|
|
|
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
|
-
|
|
4
|
+
import { formatBranchName } from './format-branch-name';
|
|
5
|
+
export { formatBranchName };
|
|
5
6
|
export declare const BranchSwitcher: (props: BranchSwitcherProps) => React.JSX.Element;
|
|
6
7
|
export declare const EditoralBranchSwitcher: ({ listBranches, createBranch, chooseBranch, setModalTitle, }: BranchSwitcherProps) => React.JSX.Element;
|
|
7
8
|
export declare const getFilteredBranchList: (branchList: Branch[], search: string, currentBranchName: string, filter?: "content" | "all") => Branch[];
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -3,6 +3,6 @@ import { Callback, CMSEvent } from '../core';
|
|
|
3
3
|
export declare function useCMSEvent<E extends CMSEvent = CMSEvent>(event: E['type'] | E['type'][], callback: Callback<E>, deps: React.DependencyList): void;
|
|
4
4
|
export declare const useEventSubscription: typeof useCMSEvent;
|
|
5
5
|
export declare function useEvent<E extends CMSEvent = CMSEvent>(eventType: E['type']): {
|
|
6
|
-
dispatch: (event: Omit<E, "type">) =>
|
|
6
|
+
dispatch: (event: Omit<E, "type">) => boolean;
|
|
7
7
|
subscribe: (callback: (event: E) => any) => () => void;
|
|
8
8
|
};
|
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.
|
|
5
|
+
"version": "3.9.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
"webfontloader": "1.6.28",
|
|
118
118
|
"yup": "^1.6.1",
|
|
119
119
|
"zod": "^3.24.2",
|
|
120
|
+
"@tinacms/schema-tools": "2.8.1",
|
|
120
121
|
"@tinacms/bridge": "0.3.0",
|
|
121
|
-
"@tinacms/mdx": "2.1.
|
|
122
|
-
"@tinacms/
|
|
123
|
-
"@tinacms/search": "1.2.16"
|
|
122
|
+
"@tinacms/mdx": "2.1.6",
|
|
123
|
+
"@tinacms/search": "1.2.17"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@graphql-tools/utils": "^10.8.1",
|