tinacms 2.1.0 → 2.2.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/admin/api.d.ts +1 -1
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/admin/pages/utils.d.ts +1 -1
- package/dist/auth/authenticate.d.ts +1 -1
- package/dist/hooks/create-page-plugin.d.ts +3 -3
- package/dist/hooks/use-content-creator.d.ts +2 -2
- package/dist/hooks/use-graphql-forms.d.ts +5 -5
- package/dist/index.d.ts +10 -10
- package/dist/index.js +3376 -2178
- package/dist/index.mjs +3333 -2119
- package/dist/internalClient/authProvider.d.ts +3 -4
- package/dist/internalClient/formify.d.ts +1 -1
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/lib/utils.d.ts +2 -0
- package/dist/react.d.ts +2 -2
- package/dist/rich-text/index.d.ts +4 -4
- package/dist/tina-cms.d.ts +1 -1
- package/dist/toolkit/alerts/alerts.d.ts +2 -2
- package/dist/toolkit/browser-storage/get-flattened-form-values.d.ts +1 -1
- package/dist/toolkit/components/media/modal.d.ts +1 -1
- package/dist/toolkit/components/tina-provider.d.ts +1 -1
- package/dist/toolkit/core/event.d.ts +1 -1
- package/dist/toolkit/core/media.d.ts +1 -0
- package/dist/toolkit/core/plugins.d.ts +1 -1
- package/dist/toolkit/core/subscribable.d.ts +1 -1
- package/dist/toolkit/fields/components/button-toggle.d.ts +1 -1
- package/dist/toolkit/fields/components/checkbox-group.d.ts +1 -1
- package/dist/toolkit/fields/components/color-picker/color-picker.d.ts +1 -1
- package/dist/toolkit/fields/components/input.d.ts +1 -1
- package/dist/toolkit/fields/components/number-input.d.ts +1 -1
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/fields/components/radio-group.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/button.d.ts +11 -0
- package/dist/toolkit/fields/components/reference/components/command.d.ts +67 -0
- package/dist/toolkit/fields/components/reference/components/popover.d.ts +6 -0
- package/dist/toolkit/fields/components/reference/index.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +4 -4
- package/dist/toolkit/fields/components/select.d.ts +1 -1
- package/dist/toolkit/fields/components/text-field.d.ts +1 -1
- package/dist/toolkit/fields/components/textarea.d.ts +1 -1
- package/dist/toolkit/fields/components/toggle.d.ts +1 -1
- package/dist/toolkit/fields/plugins/blocks-field-plugin/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +0 -1
- package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +0 -1
- package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +3 -3
- package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +7 -3
- package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +7 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/error-message.d.ts +5 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +25 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/floating-toolbar-buttons.d.ts +2 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/headings-dropdown.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +11 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +14 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +11 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +12 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +11 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +12 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +29 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/fixed-toolbar.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +5 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +115 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +19 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +27 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +8 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +11 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +16 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +13 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +19 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/overflow-menu.d.ts +7 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +4 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +12 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/templates-toolbar-button.d.ts +2 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +30 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/tooltip.d.ts +12 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/turn-into-dropdown-menu.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/nested-form.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-rules.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +3 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +4 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +5 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +130 -52
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +4 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +16 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/types.d.ts +1 -1
- package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +0 -1
- package/dist/toolkit/fields/plugins/reference-field-plugin.d.ts +0 -1
- package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +0 -1
- package/dist/toolkit/fields/plugins/text-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +0 -1
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +2 -2
- package/dist/toolkit/form-builder/field-plugin.d.ts +0 -1
- package/dist/toolkit/form-builder/form-portal.d.ts +2 -2
- package/dist/toolkit/forms/field.d.ts +1 -2
- package/dist/toolkit/forms/form.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/react-core/use-cms-event.d.ts +1 -1
- package/dist/toolkit/react-datetime/DateTime.d.ts +8 -8
- package/dist/toolkit/react-datetime/parts/ViewNavigation.d.ts +1 -1
- package/dist/toolkit/react-datetime/views/DaysView.d.ts +1 -1
- package/dist/toolkit/react-datetime/views/MonthsView.d.ts +1 -1
- package/dist/toolkit/react-datetime/views/TimeView.d.ts +1 -1
- package/dist/toolkit/react-datetime/views/YearsView.d.ts +1 -1
- package/dist/toolkit/react-modals/modal/modal.d.ts +1 -1
- package/dist/toolkit/react-modals/modal-provider.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +5 -5
- package/dist/toolkit/styles/message.d.ts +2 -2
- package/dist/toolkit/tina-cms.d.ts +7 -11
- package/dist/toolkit/tina-state.d.ts +3 -3
- package/dist/types/cms.d.ts +3 -4
- package/dist/unifiedClient/index.d.ts +3 -3
- package/package.json +76 -52
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/floating-toolbar.d.ts +0 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/index.d.ts +0 -16
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/overflow-menu.d.ts +0 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/toolbar-item.d.ts +0 -21
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { AuthProvider, LoginStrategy } from '@tinacms/schema-tools';
|
|
3
2
|
import { TokenObject } from '../auth/authenticate';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type Input = Parameters<AuthProvider['fetchWithToken']>[0];
|
|
4
|
+
type Init = Parameters<AuthProvider['fetchWithToken']>[1];
|
|
5
|
+
type FetchReturn = ReturnType<AuthProvider['fetchWithToken']>;
|
|
7
6
|
export declare abstract class AbstractAuthProvider implements AuthProvider {
|
|
8
7
|
/**
|
|
9
8
|
* Wraps the normal fetch function with same API but adds the authorization header token.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
|
-
import { DocumentNode, FieldNode, GraphQLField, GraphQLSchema } from 'graphql';
|
|
4
|
+
import { type DocumentNode, type FieldNode, type GraphQLField, type GraphQLSchema } from 'graphql';
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* Given a valid GraphQL query,the `formify` will populate the query
|
|
@@ -6,10 +6,10 @@ import { TinaSchema, Schema, AuthProvider } from '@tinacms/schema-tools';
|
|
|
6
6
|
import { TinaCloudProject } from './types';
|
|
7
7
|
import { SearchClient } from '@tinacms/search/dist/index-client';
|
|
8
8
|
export * from './authProvider';
|
|
9
|
-
export
|
|
9
|
+
export type OnLoginFunc = (args: {
|
|
10
10
|
token?: TokenObject;
|
|
11
11
|
}) => Promise<void>;
|
|
12
|
-
export
|
|
12
|
+
export type TinaIOConfig = {
|
|
13
13
|
assetsApiUrlOverride?: string;
|
|
14
14
|
frontendUrlOverride?: string;
|
|
15
15
|
identityApiUrlOverride?: string;
|
|
@@ -105,7 +105,7 @@ export declare class Client {
|
|
|
105
105
|
getBillingState(): Promise<{
|
|
106
106
|
clientId: string;
|
|
107
107
|
delinquencyDate: number;
|
|
108
|
-
billingState:
|
|
108
|
+
billingState: "current" | "late" | "delinquent";
|
|
109
109
|
}>;
|
|
110
110
|
waitForIndexStatus({ ref }: {
|
|
111
111
|
ref: string;
|
package/dist/react.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ export declare function useEditState(): {
|
|
|
14
14
|
* to signal to Tina which DOM element the field
|
|
15
15
|
* is working with.
|
|
16
16
|
*/
|
|
17
|
-
export declare const tinaField: <T extends object & {
|
|
17
|
+
export declare const tinaField: <T extends (object & {
|
|
18
18
|
_content_source?: {
|
|
19
19
|
queryId: string;
|
|
20
20
|
path: (number | string)[];
|
|
21
21
|
};
|
|
22
|
-
}>(object: T, property?:
|
|
22
|
+
}) | undefined | null>(object: T, property?: keyof Omit<NonNullable<T>, "__typename" | "_sys">, index?: number) => string;
|
|
23
23
|
export declare const addMetadata: <T extends object>(id: string, object: T & {
|
|
24
24
|
type?: string;
|
|
25
25
|
_content_source?: unknown;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
|
-
|
|
5
|
+
type BaseComponents = {
|
|
6
6
|
h1?: {
|
|
7
7
|
children: JSX.Element;
|
|
8
8
|
};
|
|
@@ -93,7 +93,7 @@ declare type BaseComponents = {
|
|
|
93
93
|
name: string;
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
-
|
|
96
|
+
type BaseComponentSignature = {
|
|
97
97
|
[BK in keyof BaseComponents]: (props: BaseComponents[BK]) => JSX.Element;
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
@@ -123,10 +123,10 @@ declare type BaseComponentSignature = {
|
|
|
123
123
|
* }
|
|
124
124
|
* ```
|
|
125
125
|
*/
|
|
126
|
-
export
|
|
126
|
+
export type Components<ComponentAndProps extends object> = {
|
|
127
127
|
[K in keyof ComponentAndProps]: (props: ComponentAndProps[K]) => JSX.Element;
|
|
128
128
|
} & BaseComponentSignature;
|
|
129
|
-
export
|
|
129
|
+
export type TinaMarkdownContent = {
|
|
130
130
|
type: string;
|
|
131
131
|
children: TinaMarkdownContent[];
|
|
132
132
|
};
|
package/dist/tina-cms.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { TinaCMSProviderDefaultProps } from './types/cms';
|
|
|
7
7
|
* See https://tina.io/blog/upgrading-to-iframe/ for full migration details
|
|
8
8
|
*/
|
|
9
9
|
export declare const TinaCMSProvider2: ({ query, documentCreatorCallback, formifyCallback, schema, ...props }: TinaCMSProviderDefaultProps) => React.JSX.Element;
|
|
10
|
-
export
|
|
10
|
+
export type DocumentCreatorCallback = Parameters<typeof useDocumentCreatorPlugin>[0];
|
|
11
11
|
/**
|
|
12
12
|
* @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/features/data-fetching/#querying-tina-content-in-nextjs for more details
|
|
13
13
|
*
|
|
@@ -3,7 +3,7 @@ import type { EventBus, Callback, CMSEvent } from '../core';
|
|
|
3
3
|
export interface EventsToAlerts {
|
|
4
4
|
[key: string]: ToAlert | AlertArgs;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type ToAlert = (event: CMSEvent) => AlertArgs;
|
|
7
7
|
export interface AlertArgs {
|
|
8
8
|
level: AlertLevel;
|
|
9
9
|
message: string;
|
|
@@ -25,7 +25,7 @@ export declare class Alerts {
|
|
|
25
25
|
warn(message: string | React.FunctionComponent, timeout?: number): () => void;
|
|
26
26
|
error(message: string | React.FunctionComponent, timeout?: number): () => void;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export type AlertLevel = 'info' | 'success' | 'warn' | 'error';
|
|
29
29
|
export interface Alert {
|
|
30
30
|
id: string;
|
|
31
31
|
level: AlertLevel;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Form } from '../forms';
|
|
1
|
+
import type { Form } from '../forms';
|
|
2
2
|
export declare function getFlattenedFormValues(form: Form): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
3
3
|
export interface NumberProps extends a {
|
|
4
4
|
step?: string | number;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
3
3
|
export interface PasswordFieldProps extends a {
|
|
4
4
|
error?: boolean;
|
|
5
5
|
ref?: any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: {
|
|
4
|
+
variant?: "outline";
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg";
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
5
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
9
|
+
label?: string;
|
|
10
|
+
shouldFilter?: boolean;
|
|
11
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
value?: string;
|
|
14
|
+
onValueChange?: (value: string) => void;
|
|
15
|
+
loop?: boolean;
|
|
16
|
+
disablePointerSelection?: boolean;
|
|
17
|
+
vimBindings?: boolean;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
20
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
21
|
+
} & {
|
|
22
|
+
asChild?: boolean;
|
|
23
|
+
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "asChild">, "value" | "type" | "onChange"> & {
|
|
24
|
+
value?: string;
|
|
25
|
+
onValueChange?: (search: string) => void;
|
|
26
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
27
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
30
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
31
|
+
} & {
|
|
32
|
+
asChild?: boolean;
|
|
33
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
34
|
+
label?: string;
|
|
35
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
39
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
40
|
+
} & {
|
|
41
|
+
asChild?: boolean;
|
|
42
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
46
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
47
|
+
} & {
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
50
|
+
heading?: React.ReactNode;
|
|
51
|
+
value?: string;
|
|
52
|
+
forceMount?: boolean;
|
|
53
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
55
|
+
children?: React.ReactNode;
|
|
56
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
57
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
} & {
|
|
59
|
+
asChild?: boolean;
|
|
60
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
onSelect?: (value: string) => void;
|
|
63
|
+
value?: string;
|
|
64
|
+
keywords?: string[];
|
|
65
|
+
forceMount?: boolean;
|
|
66
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Field } from '../../../forms';
|
|
2
2
|
import type { TinaCMS } from '../../../tina-cms';
|
|
3
|
+
import * as React from 'react';
|
|
3
4
|
import type { ReferenceFieldProps } from './index';
|
|
4
|
-
import { Field } from '../../../forms';
|
|
5
5
|
interface ReferenceSelectProps {
|
|
6
6
|
cms: TinaCMS;
|
|
7
7
|
input: any;
|
|
8
8
|
field: ReferenceFieldProps & Field;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const ComboboxDemo: React.FC<ReferenceSelectProps>;
|
|
11
|
+
export default ComboboxDemo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
3
3
|
export interface TextFieldProps extends a {
|
|
4
4
|
error?: boolean;
|
|
5
5
|
ref?: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
3
3
|
export interface TextAreaProps extends a {
|
|
4
4
|
error?: boolean;
|
|
5
5
|
ref?: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const ButtonToggleField: (props: import("./wrap-field-with-meta").InputFieldType<import("../components").ButtonToggleProps, {}>) => import("react").JSX.Element;
|
|
3
2
|
export declare const ButtonToggleFieldPlugin: {
|
|
4
3
|
name: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const CheckboxGroupField: (props: import("./wrap-field-with-meta").InputFieldType<import("../components").CheckboxGroupProps, {}>) => import("react").JSX.Element;
|
|
3
2
|
export declare const CheckboxGroupFieldPlugin: {
|
|
4
3
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { InputProps } from '../components';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type InputProps } from '../components';
|
|
3
3
|
import type { DatetimepickerProps } from 'react-datetime';
|
|
4
|
-
import { Field } from '../../forms';
|
|
4
|
+
import type { Field } from '../../forms';
|
|
5
5
|
export declare const DateField: (props: import("./wrap-field-with-meta").InputFieldType<InputProps, DatetimepickerProps>) => React.JSX.Element;
|
|
6
6
|
export declare const ReactDateTimeWithStyles: (props: DatetimepickerProps & Partial<Field>) => React.JSX.Element;
|
|
7
7
|
export declare const DateFieldPlugin: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Field, Form } from '../../forms';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Field, Form } from '../../forms';
|
|
3
3
|
interface GroupFieldDefinititon extends Field {
|
|
4
4
|
component: 'group';
|
|
5
5
|
fields: Field[];
|
|
@@ -41,7 +41,11 @@ export declare const GroupLabel: ({ error, children, }: {
|
|
|
41
41
|
children?: any;
|
|
42
42
|
error?: boolean;
|
|
43
43
|
}) => React.JSX.Element;
|
|
44
|
-
export declare const ItemHeader: ({ isDragging, children, provider, ...props }:
|
|
44
|
+
export declare const ItemHeader: ({ isDragging, children, provider, ...props }: {
|
|
45
|
+
isDragging: boolean;
|
|
46
|
+
children: any | any[];
|
|
47
|
+
provider: any;
|
|
48
|
+
} & any) => React.JSX.Element;
|
|
45
49
|
export declare const ItemDeleteButton: ({ onClick, disabled }: {
|
|
46
50
|
onClick: any;
|
|
47
51
|
disabled?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Field, Form } from '../../forms';
|
|
3
|
-
|
|
3
|
+
type DefaultItem = string | number | (() => string | number);
|
|
4
4
|
interface ListFieldDefinititon extends Field {
|
|
5
5
|
component: 'list';
|
|
6
6
|
defaultItem?: DefaultItem;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { InputFieldType } from '../wrap-field-with-meta';
|
|
4
|
-
import { toolbarItemName } from './plate/plugins/ui/toolbar';
|
|
2
|
+
import { type InputFieldType } from '../wrap-field-with-meta';
|
|
5
3
|
import type { MdxTemplate } from './plate/types';
|
|
6
|
-
|
|
4
|
+
import type { InputProps } from '../../../fields/components';
|
|
5
|
+
import type { ToolbarOverrideType } from './plate/toolbar/toolbar-overrides';
|
|
6
|
+
export type RichTextType = React.PropsWithChildren<InputFieldType<InputProps, {
|
|
7
7
|
templates: MdxTemplate[];
|
|
8
|
-
toolbarOverride?:
|
|
8
|
+
toolbarOverride?: ToolbarOverrideType[];
|
|
9
9
|
}>>;
|
|
10
10
|
export declare const MdxFieldPlugin: {
|
|
11
11
|
name: string;
|
|
12
12
|
Component: (props: InputFieldType<InputProps, {
|
|
13
13
|
templates: MdxTemplate[];
|
|
14
|
-
toolbarOverride?:
|
|
14
|
+
toolbarOverride?: ToolbarOverrideType[];
|
|
15
15
|
}>) => React.JSX.Element;
|
|
16
16
|
};
|
|
17
17
|
export declare const MdxFieldPluginExtendible: {
|
|
@@ -19,6 +19,6 @@ export declare const MdxFieldPluginExtendible: {
|
|
|
19
19
|
validate(value: any): string;
|
|
20
20
|
Component: (props: InputFieldType<InputProps, {
|
|
21
21
|
templates: MdxTemplate[];
|
|
22
|
-
toolbarOverride?:
|
|
22
|
+
toolbarOverride?: ToolbarOverrideType[];
|
|
23
23
|
}>) => React.JSX.Element;
|
|
24
24
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type EmptyTextElement = {
|
|
3
3
|
type: 'text';
|
|
4
4
|
text: '';
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type PositionItem = {
|
|
7
7
|
line?: number | null;
|
|
8
8
|
column?: number | null;
|
|
9
9
|
offset?: number | null;
|
|
10
10
|
_index?: number | null;
|
|
11
11
|
_bufferIndex?: number | null;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type Position = {
|
|
14
14
|
start: PositionItem;
|
|
15
15
|
end: PositionItem;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type InvalidMarkdownElement = {
|
|
18
18
|
type: 'invalid_markdown';
|
|
19
19
|
value: string;
|
|
20
20
|
message: string;
|
|
21
21
|
position?: Position;
|
|
22
22
|
children: [EmptyTextElement];
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
type ErrorType = {
|
|
25
25
|
message: string;
|
|
26
26
|
position?: {
|
|
27
27
|
startColumn: number;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PlateContentProps } from '@udecode/plate-common';
|
|
3
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const editorVariants: (props?: {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
focusRing?: boolean;
|
|
7
|
+
focused?: boolean;
|
|
8
|
+
size?: "sm" | "md";
|
|
9
|
+
variant?: "ghost" | "outline";
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
11
|
+
export type EditorProps = PlateContentProps & VariantProps<typeof editorVariants>;
|
|
12
|
+
declare const Editor: React.ForwardRefExoticComponent<{
|
|
13
|
+
renderEditable?: (editable: React.ReactElement) => React.ReactNode;
|
|
14
|
+
} & {
|
|
15
|
+
decorate?: (entry: import("@udecode/plate-common").TNodeEntry) => import("slate").Range[];
|
|
16
|
+
renderElement?: import("@udecode/plate-common").RenderElementFn;
|
|
17
|
+
renderLeaf?: import("@udecode/plate-common").RenderLeafFn;
|
|
18
|
+
} & Omit<import("slate-react/dist/components/editable").EditableProps, "decorate" | "renderElement" | "renderLeaf"> & VariantProps<(props?: {
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
focusRing?: boolean;
|
|
21
|
+
focused?: boolean;
|
|
22
|
+
size?: "sm" | "md";
|
|
23
|
+
variant?: "ghost" | "outline";
|
|
24
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { Editor };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const BlockquoteElement: 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>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export declare const buttonVariants: (props?: {
|
|
4
|
+
isMenu?: boolean;
|
|
5
|
+
size?: "default" | "none" | "icon" | "sm" | "lg" | "sms" | "xs";
|
|
6
|
+
variant?: "default" | "link" | "secondary" | "ghost" | "outline" | "destructive" | "inlineLink";
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
+
export declare const Button: React.ForwardRefExoticComponent<{
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
} & VariantProps<(props?: {
|
|
11
|
+
isMenu?: boolean;
|
|
12
|
+
size?: "default" | "none" | "icon" | "sm" | "lg" | "sms" | "xs";
|
|
13
|
+
variant?: "default" | "link" | "secondary" | "ghost" | "outline" | "destructive" | "inlineLink";
|
|
14
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "size" | "variant" | "asChild" | "isMenu"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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>>;
|