tinacms 0.0.0-e0ddb8c-20241004065742 → 0.0.0-e1b6d05-20251114052813
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/README.md +1 -1
- package/dist/admin/api.d.ts +4 -0
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/admin/components/Page.d.ts +3 -9
- package/dist/admin/components/Sidebar.d.ts +0 -3
- package/dist/admin/components/ui/tooltip.d.ts +7 -0
- package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
- package/dist/admin/pages/CollectionListPage.d.ts +2 -2
- package/dist/admin/pages/DashboardPage.d.ts +0 -3
- package/dist/admin/pages/ScreenPage.d.ts +0 -3
- package/dist/admin/types.d.ts +3 -0
- package/dist/auth/AuthModal.d.ts +1 -4
- package/dist/auth/TinaCloudProvider.d.ts +1 -2
- package/dist/cache/node-cache.d.ts +1 -0
- package/dist/client.js +100 -62
- package/dist/client.mjs +59 -36
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +104151 -14618
- package/dist/index.mjs +104717 -15181
- package/dist/internalClient/index.d.ts +28 -3
- package/dist/node-cache-5e8db9f0.mjs +63 -0
- package/dist/react.d.ts +14 -6
- package/dist/react.js +73 -53
- package/dist/react.mjs +73 -53
- package/dist/rich-text/index.d.ts +6 -0
- package/dist/rich-text/index.js +60 -16
- package/dist/rich-text/index.mjs +60 -16
- package/dist/rich-text/prism.js +1 -1
- package/dist/rich-text/prism.mjs +1 -1
- package/dist/rich-text/static.d.ts +154 -0
- package/dist/rich-text/static.js +246 -0
- package/dist/rich-text/static.mjs +243 -0
- package/dist/tina-cms.d.ts +1 -1
- package/dist/toolkit/components/ProgressBar.d.ts +11 -0
- package/dist/toolkit/components/media/media-item.d.ts +11 -1
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
- package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/button.d.ts +2 -2
- package/dist/toolkit/fields/components/reference/components/command.d.ts +21 -33
- package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/components/select.d.ts +2 -2
- package/dist/toolkit/fields/components/text-field.d.ts +1 -1
- package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +1 -0
- package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
- package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +5 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +20 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +0 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +14 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +5 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +17 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/error-message.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-combobox.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +2 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +14 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +2 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +112 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dialog.d.ts +12 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +10 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-element.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +6 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +4 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +4 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +4 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +28 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +3 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +6 -8
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +15 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +42 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +15 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/block-selection.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +33 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-dropdown-menu.d.ts +4 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +20 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +15 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +7 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +10 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-state.d.ts +22 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-create-editor.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +3 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +12 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +18 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +0 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +5 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +7 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +520 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +264 -166
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/floating-toolbar-plugin.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +11 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
- package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
- package/dist/toolkit/form-builder/editorial-workflow-constants.d.ts +17 -0
- package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
- package/dist/toolkit/form-builder/form-builder.d.ts +8 -9
- package/dist/toolkit/form-builder/index.d.ts +1 -0
- package/dist/toolkit/forms/field.d.ts +3 -0
- package/dist/toolkit/forms/form.d.ts +22 -3
- package/dist/toolkit/git-client/git-client.d.ts +25 -2
- package/dist/toolkit/git-client/git-file.d.ts +18 -0
- package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
- package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
- package/dist/toolkit/icons/Tina.d.ts +0 -5
- package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
- package/dist/toolkit/icons/index.d.ts +1 -0
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +4 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
- package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/badge.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
- package/dist/toolkit/react-sidebar/components/nav.d.ts +6 -3
- package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +7 -10
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
- package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
- package/dist/toolkit/react-sidebar/index.d.ts +1 -1
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/styles/button.d.ts +2 -2
- package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
- package/dist/toolkit/styles/index.d.ts +1 -0
- package/dist/toolkit/tina-cms.d.ts +3 -3
- package/dist/toolkit/tina-state.d.ts +15 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/dist/utils/cn.d.ts +2 -0
- package/package.json +75 -61
- package/dist/__vite-browser-external-d06ac358.mjs +0 -4
- package/dist/admin/pages/IndexingPage.d.ts +0 -2
- package/dist/node-cache-7fa2452c.mjs +0 -43
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-mermaid-element.d.ts +0 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +0 -8
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +0 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +0 -15
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +0 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +0 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +0 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +0 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +0 -2
- package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
variant?: 'primary' | 'secondary' | 'white' | 'ghost' | 'danger';
|
|
3
|
+
variant?: 'primary' | 'secondary' | 'white' | 'ghost' | 'danger' | 'accent' | 'custom';
|
|
4
4
|
as?: React.ElementType;
|
|
5
5
|
href?: string;
|
|
6
6
|
target?: string;
|
|
7
7
|
size?: 'small' | 'medium' | 'custom';
|
|
8
8
|
busy?: boolean;
|
|
9
|
-
rounded?: 'full' | 'left' | 'right' | 'custom';
|
|
9
|
+
rounded?: 'full' | 'left' | 'right' | 'custom' | 'none';
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
className?: string;
|
|
12
12
|
children?: React.ReactNode;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
3
|
+
export interface DropdownButtonItem {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
variant?: 'default' | 'destructive';
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DropdownButtonProps extends Omit<ButtonProps, 'onClick'> {
|
|
11
|
+
/**
|
|
12
|
+
* The main action to perform when the button is clicked
|
|
13
|
+
*/
|
|
14
|
+
onMainAction?: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Array of dropdown menu items
|
|
17
|
+
*/
|
|
18
|
+
items: DropdownButtonItem[];
|
|
19
|
+
/**
|
|
20
|
+
* Whether to show the dropdown arrow in a split button style
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showSplitButton?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Alignment of the dropdown menu
|
|
26
|
+
* @default 'end'
|
|
27
|
+
*/
|
|
28
|
+
align?: 'start' | 'center' | 'end';
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A button component that combines a primary action with a dropdown menu of additional options.
|
|
32
|
+
*
|
|
33
|
+
* This component follows the split-button pattern found in TinaCMS, where the main button
|
|
34
|
+
* performs a primary action and a small arrow button opens a dropdown menu with additional options.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // Basic usage with split button
|
|
38
|
+
* <DropdownButton
|
|
39
|
+
* variant="primary"
|
|
40
|
+
* onMainAction={() => console.log('Save to new branch')}
|
|
41
|
+
* items={[
|
|
42
|
+
* { label: 'Save to protected branch', onClick: () => console.log('Protected') },
|
|
43
|
+
* { label: 'Save and publish', onClick: () => console.log('Publish') },
|
|
44
|
+
* ]}
|
|
45
|
+
* >
|
|
46
|
+
* Save to new branch
|
|
47
|
+
* </DropdownButton>
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Dropdown-only button (no main action)
|
|
51
|
+
* <DropdownButton
|
|
52
|
+
* variant="secondary"
|
|
53
|
+
* showSplitButton={false}
|
|
54
|
+
* items={[
|
|
55
|
+
* { label: 'Save to new branch', onClick: () => console.log('New branch') },
|
|
56
|
+
* { label: 'Save to protected branch', onClick: () => console.log('Protected') },
|
|
57
|
+
* ]}
|
|
58
|
+
* >
|
|
59
|
+
* Save options
|
|
60
|
+
* </DropdownButton>
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* // With icons and destructive action
|
|
64
|
+
* <DropdownButton
|
|
65
|
+
* variant="primary"
|
|
66
|
+
* onMainAction={() => console.log('Save')}
|
|
67
|
+
* items={[
|
|
68
|
+
* { label: 'Duplicate', onClick: () => console.log('Duplicate'), icon: <CopyIcon /> },
|
|
69
|
+
* { label: 'Delete', onClick: () => console.log('Delete'), variant: 'destructive', icon: <TrashIcon /> },
|
|
70
|
+
* ]}
|
|
71
|
+
* >
|
|
72
|
+
* Save
|
|
73
|
+
* </DropdownButton>
|
|
74
|
+
*/
|
|
75
|
+
export declare const DropdownButton: React.ForwardRefExoticComponent<DropdownButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -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 {
|
|
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;
|
|
@@ -15,6 +15,12 @@ type FormList = {
|
|
|
15
15
|
items: FormListItem[];
|
|
16
16
|
formIds: string[];
|
|
17
17
|
};
|
|
18
|
+
type Breadcrumb = {
|
|
19
|
+
label: string;
|
|
20
|
+
formId: string;
|
|
21
|
+
formName: string;
|
|
22
|
+
namespace: string[];
|
|
23
|
+
};
|
|
18
24
|
export type TinaAction = {
|
|
19
25
|
type: 'forms:add';
|
|
20
26
|
value: Form;
|
|
@@ -58,8 +64,12 @@ export type TinaAction = {
|
|
|
58
64
|
} | {
|
|
59
65
|
type: 'sidebar:set-display-state';
|
|
60
66
|
value: TinaState['sidebarDisplayState'] | 'openOrFull';
|
|
67
|
+
} | {
|
|
68
|
+
type: 'sidebar:set-loading-state';
|
|
69
|
+
value: boolean;
|
|
61
70
|
};
|
|
62
71
|
export interface TinaState {
|
|
72
|
+
breadcrumbs: Breadcrumb[];
|
|
63
73
|
activeFormId: string | null;
|
|
64
74
|
/**
|
|
65
75
|
* Forms are wrapped here because we need `activeFieldName` to be reactive, so adding it as a propery
|
|
@@ -76,9 +86,14 @@ export interface TinaState {
|
|
|
76
86
|
}[];
|
|
77
87
|
formLists: FormList[];
|
|
78
88
|
editingMode: 'visual' | 'basic';
|
|
89
|
+
isLoadingContent: boolean;
|
|
79
90
|
quickEditSupported: boolean;
|
|
80
91
|
sidebarDisplayState: 'closed' | 'open' | 'fullscreen';
|
|
81
92
|
}
|
|
82
93
|
export declare const initialState: (cms: TinaCMS) => TinaState;
|
|
83
94
|
export declare function tinaReducer(state: TinaState, action: TinaAction): TinaState;
|
|
95
|
+
export declare function calculateBreadcrumbs(forms: {
|
|
96
|
+
activeFieldName?: string | null;
|
|
97
|
+
tinaForm: Form;
|
|
98
|
+
}[], activeFormId: string, activeFieldName?: string): Breadcrumb[];
|
|
84
99
|
export {};
|
|
@@ -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<
|
|
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-
|
|
3
|
+
"version": "0.0.0-e1b6d05-20251114052813",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
"import": "./dist/rich-text/index.mjs",
|
|
30
30
|
"require": "./dist/rich-text/index.js"
|
|
31
31
|
},
|
|
32
|
+
"./dist/rich-text/static": {
|
|
33
|
+
"types": "./dist/rich-text/static.d.ts",
|
|
34
|
+
"import": "./dist/rich-text/static.mjs",
|
|
35
|
+
"require": "./dist/rich-text/static.js"
|
|
36
|
+
},
|
|
32
37
|
"./dist/rich-text/prism": {
|
|
33
38
|
"types": "./dist/rich-text/prism.d.ts",
|
|
34
39
|
"import": "./dist/rich-text/prism.mjs",
|
|
@@ -42,6 +47,7 @@
|
|
|
42
47
|
"entryPoints": [
|
|
43
48
|
"src/index.ts",
|
|
44
49
|
"src/rich-text/index.tsx",
|
|
50
|
+
"src/rich-text/static.tsx",
|
|
45
51
|
"src/rich-text/prism.tsx",
|
|
46
52
|
"src/react.tsx",
|
|
47
53
|
"src/client.ts"
|
|
@@ -60,44 +66,53 @@
|
|
|
60
66
|
"typings": "dist/index.d.ts",
|
|
61
67
|
"license": "Apache-2.0",
|
|
62
68
|
"dependencies": {
|
|
63
|
-
"@ariakit/react": "^0.4.
|
|
64
|
-
"@floating-ui/dom": "^1.6.
|
|
69
|
+
"@ariakit/react": "^0.4.15",
|
|
70
|
+
"@floating-ui/dom": "^1.6.13",
|
|
65
71
|
"@floating-ui/react-dom": "^2.1.2",
|
|
66
|
-
"@graphql-inspector/core": "^6.1
|
|
72
|
+
"@graphql-inspector/core": "^6.2.1",
|
|
67
73
|
"@headlessui/react": "2.1.8",
|
|
68
74
|
"@heroicons/react": "^1.0.6",
|
|
69
|
-
"@monaco-editor/react": "4.
|
|
70
|
-
"@radix-ui/react-checkbox": "^1.1.
|
|
71
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
72
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
73
|
-
"@radix-ui/react-popover": "^1.1.
|
|
74
|
-
"@radix-ui/react-separator": "^1.1.
|
|
75
|
-
"@radix-ui/react-slot": "^1.1.
|
|
76
|
-
"@radix-ui/react-toolbar": "^1.1.
|
|
77
|
-
"@radix-ui/react-tooltip": "^1.
|
|
75
|
+
"@monaco-editor/react": "4.7.0-rc.0",
|
|
76
|
+
"@radix-ui/react-checkbox": "^1.1.4",
|
|
77
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
78
|
+
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
79
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
80
|
+
"@radix-ui/react-separator": "^1.1.2",
|
|
81
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
82
|
+
"@radix-ui/react-toolbar": "^1.1.2",
|
|
83
|
+
"@radix-ui/react-tooltip": "^1.2.6",
|
|
78
84
|
"@react-hook/window-size": "^3.1.1",
|
|
79
|
-
"@udecode/
|
|
80
|
-
"@udecode/
|
|
81
|
-
"@udecode/plate
|
|
82
|
-
"@udecode/plate-
|
|
83
|
-
"@udecode/plate-
|
|
84
|
-
"@udecode/plate-
|
|
85
|
-
"@udecode/plate-
|
|
86
|
-
"@udecode/plate-
|
|
87
|
-
"@udecode/plate-
|
|
88
|
-
"@udecode/plate-
|
|
89
|
-
"@udecode/plate-
|
|
90
|
-
"@udecode/plate-
|
|
91
|
-
"@udecode/plate-
|
|
92
|
-
"@udecode/plate-
|
|
93
|
-
"@udecode/plate-
|
|
94
|
-
"
|
|
85
|
+
"@udecode/cmdk": "^0.2.1",
|
|
86
|
+
"@udecode/cn": "^48.0.3",
|
|
87
|
+
"@udecode/plate": "^48.0.3",
|
|
88
|
+
"@udecode/plate-autoformat": "^48.0.0",
|
|
89
|
+
"@udecode/plate-basic-marks": "^48.0.0",
|
|
90
|
+
"@udecode/plate-block-quote": "^48",
|
|
91
|
+
"@udecode/plate-break": "^48",
|
|
92
|
+
"@udecode/plate-code-block": "^48.0.0",
|
|
93
|
+
"@udecode/plate-combobox": "^48",
|
|
94
|
+
"@udecode/plate-dnd": "^48.0.0",
|
|
95
|
+
"@udecode/plate-floating": "^48.0.0",
|
|
96
|
+
"@udecode/plate-heading": "^48",
|
|
97
|
+
"@udecode/plate-horizontal-rule": "^48",
|
|
98
|
+
"@udecode/plate-indent-list": "^48.0.0",
|
|
99
|
+
"@udecode/plate-link": "^48.0.0",
|
|
100
|
+
"@udecode/plate-list": "^48.0.0",
|
|
101
|
+
"@udecode/plate-node-id": "^48.0.0",
|
|
102
|
+
"@udecode/plate-reset-node": "^48",
|
|
103
|
+
"@udecode/plate-resizable": "^48",
|
|
104
|
+
"@udecode/plate-selection": "^48.0.0",
|
|
105
|
+
"@udecode/plate-slash-command": "^48.0.0",
|
|
106
|
+
"@udecode/plate-table": "^48.0.0",
|
|
107
|
+
"@udecode/plate-trailing-block": "^48.0.0",
|
|
108
|
+
"add": "^2.0.6",
|
|
109
|
+
"async-lock": "^1.4.1",
|
|
110
|
+
"class-variance-authority": "^0.7.1",
|
|
95
111
|
"clsx": "^2.1.1",
|
|
96
|
-
"cmdk": "^1.0.
|
|
112
|
+
"cmdk": "^1.0.4",
|
|
97
113
|
"color-string": "^1.9.1",
|
|
98
114
|
"crypto-js": "^4.2.0",
|
|
99
115
|
"date-fns": "2.30.0",
|
|
100
|
-
"fetch-ponyfill": "^7.1.0",
|
|
101
116
|
"final-form": "4.20.10",
|
|
102
117
|
"final-form-arrays": "^3.1.0",
|
|
103
118
|
"final-form-set-field-data": "^1.0.2",
|
|
@@ -107,50 +122,49 @@
|
|
|
107
122
|
"lodash.get": "^4.4.2",
|
|
108
123
|
"lodash.set": "^4.3.2",
|
|
109
124
|
"lucide-react": "^0.424.0",
|
|
110
|
-
"mermaid": "
|
|
125
|
+
"mermaid": "9.3.0",
|
|
111
126
|
"moment": "2.29.4",
|
|
112
127
|
"monaco-editor": "0.31.0",
|
|
113
|
-
"prism-react-renderer": "^2.4.
|
|
128
|
+
"prism-react-renderer": "^2.4.1",
|
|
114
129
|
"prop-types": "15.7.2",
|
|
115
130
|
"react-beautiful-dnd": "^13.1.1",
|
|
116
131
|
"react-color": "^2.19.3",
|
|
117
|
-
"react-datetime": "^3.
|
|
132
|
+
"react-datetime": "^3.3.1",
|
|
133
|
+
"react-dnd": "^16.0.1",
|
|
134
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
118
135
|
"react-dropzone": "14.2.3",
|
|
119
136
|
"react-final-form": "^6.5.9",
|
|
120
|
-
"react-icons": "^5.
|
|
121
|
-
"react-onclickoutside": "^6.13.1",
|
|
137
|
+
"react-icons": "^5.4.0",
|
|
122
138
|
"react-router-dom": "6.3.0",
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"slate-hyperscript": "^0.100.0",
|
|
126
|
-
"slate-react": "^0.107.1",
|
|
127
|
-
"tailwind-merge": "^2.5.2",
|
|
139
|
+
"react-use": "^17.6.0",
|
|
140
|
+
"tailwind-merge": "^2.6.0",
|
|
128
141
|
"webfontloader": "1.6.28",
|
|
129
|
-
"yup": "^1.
|
|
130
|
-
"zod": "^3.
|
|
131
|
-
"@tinacms/
|
|
132
|
-
"@tinacms/
|
|
133
|
-
"@tinacms/
|
|
142
|
+
"yup": "^1.6.1",
|
|
143
|
+
"zod": "^3.24.2",
|
|
144
|
+
"@tinacms/mdx": "1.8.1",
|
|
145
|
+
"@tinacms/schema-tools": "1.9.1",
|
|
146
|
+
"@tinacms/search": "1.1.1"
|
|
134
147
|
},
|
|
135
148
|
"devDependencies": {
|
|
136
|
-
"@graphql-tools/utils": "^10.
|
|
149
|
+
"@graphql-tools/utils": "^10.8.1",
|
|
137
150
|
"@testing-library/dom": "^10.4.0",
|
|
138
|
-
"@testing-library/jest-dom": "^6.
|
|
139
|
-
"@testing-library/react": "^16.0
|
|
140
|
-
"@testing-library/user-event": "^14.
|
|
151
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
152
|
+
"@testing-library/react": "^16.2.0",
|
|
153
|
+
"@testing-library/user-event": "^14.6.1",
|
|
141
154
|
"@types/atob": "^2.1.4",
|
|
142
155
|
"@types/codemirror": "^5.60.15",
|
|
143
156
|
"@types/color-string": "^1.5.5",
|
|
144
157
|
"@types/lodash.debounce": "^4.0.9",
|
|
145
158
|
"@types/lodash.get": "^4.4.9",
|
|
146
|
-
"@types/node": "^22.
|
|
147
|
-
"@types/prop-types": "^15.7.
|
|
148
|
-
"@types/react": "^18.3.
|
|
159
|
+
"@types/node": "^22.13.1",
|
|
160
|
+
"@types/prop-types": "^15.7.14",
|
|
161
|
+
"@types/react": "^18.3.18",
|
|
149
162
|
"@types/react-beautiful-dnd": "^13.1.8",
|
|
150
|
-
"@types/react-color": "^3.0.
|
|
151
|
-
"@types/react-dom": "^18.3.
|
|
163
|
+
"@types/react-color": "^3.0.13",
|
|
164
|
+
"@types/react-dom": "^18.3.5",
|
|
152
165
|
"@types/yup": "^0.32.0",
|
|
153
|
-
"
|
|
166
|
+
"lowlight": "^3.3.0",
|
|
167
|
+
"happy-dom": "15.10.2",
|
|
154
168
|
"identity-obj-proxy": "^3.0.0",
|
|
155
169
|
"isomorphic-fetch": "^3.0.0",
|
|
156
170
|
"jest-file-snapshot": "^0.7.0",
|
|
@@ -159,11 +173,11 @@
|
|
|
159
173
|
"react-dom": "^18.3.1",
|
|
160
174
|
"react-is": "^18.3.1",
|
|
161
175
|
"tsc-alias": "^1.8.10",
|
|
162
|
-
"tslib": "^2.
|
|
163
|
-
"typescript": "^5.
|
|
164
|
-
"vite": "^5.4.
|
|
165
|
-
"vitest": "^2.1.
|
|
166
|
-
"@tinacms/scripts": "1.
|
|
176
|
+
"tslib": "^2.8.1",
|
|
177
|
+
"typescript": "^5.7.3",
|
|
178
|
+
"vite": "^5.4.14",
|
|
179
|
+
"vitest": "^2.1.9",
|
|
180
|
+
"@tinacms/scripts": "1.4.0"
|
|
167
181
|
},
|
|
168
182
|
"peerDependencies": {
|
|
169
183
|
"react": ">=16.14.0",
|
|
@@ -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>>;
|
|
@@ -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;
|
package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts
DELETED
|
@@ -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>;
|
package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts
DELETED
|
@@ -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;
|
package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts
DELETED
|
@@ -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,11 +0,0 @@
|
|
|
1
|
-
import type { QueryNodeOptions } from '@udecode/plate-common';
|
|
2
|
-
export interface SoftBreakRule {
|
|
3
|
-
hotkey: string;
|
|
4
|
-
/**
|
|
5
|
-
* Filter the block types where the rule applies.
|
|
6
|
-
*/
|
|
7
|
-
query?: QueryNodeOptions;
|
|
8
|
-
}
|
|
9
|
-
export interface SoftBreakPlugin {
|
|
10
|
-
rules?: SoftBreakRule[];
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type PlateEditor, type TElement } from '@udecode/plate-common';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export declare const CodeBlock: ({ attributes, editor, element, language: restrictLanguage, onChangeCallback, defaultValue, ...props }: {
|
|
4
|
-
attributes: Record<string, unknown>;
|
|
5
|
-
element: TElement;
|
|
6
|
-
editor: PlateEditor;
|
|
7
|
-
language?: string;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
defaultValue?: unknown;
|
|
10
|
-
onChangeCallback?: (value: string) => void;
|
|
11
|
-
}) => React.JSX.Element;
|