tinacms 2.1.1 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/admin/api.d.ts +1 -1
  2. package/dist/admin/components/GetCollection.d.ts +2 -2
  3. package/dist/admin/pages/utils.d.ts +1 -1
  4. package/dist/auth/authenticate.d.ts +1 -1
  5. package/dist/hooks/create-page-plugin.d.ts +3 -3
  6. package/dist/hooks/use-content-creator.d.ts +2 -2
  7. package/dist/hooks/use-graphql-forms.d.ts +5 -5
  8. package/dist/index.d.ts +10 -10
  9. package/dist/index.js +3060 -2030
  10. package/dist/index.mjs +3117 -2077
  11. package/dist/internalClient/authProvider.d.ts +3 -4
  12. package/dist/internalClient/formify.d.ts +1 -1
  13. package/dist/internalClient/index.d.ts +3 -3
  14. package/dist/react.d.ts +2 -2
  15. package/dist/rich-text/index.d.ts +4 -4
  16. package/dist/rich-text/index.js +1 -1
  17. package/dist/rich-text/index.mjs +1 -1
  18. package/dist/tina-cms.d.ts +1 -1
  19. package/dist/toolkit/alerts/alerts.d.ts +2 -2
  20. package/dist/toolkit/browser-storage/get-flattened-form-values.d.ts +1 -1
  21. package/dist/toolkit/components/media/modal.d.ts +1 -1
  22. package/dist/toolkit/components/tina-provider.d.ts +1 -1
  23. package/dist/toolkit/core/event.d.ts +1 -1
  24. package/dist/toolkit/core/media.d.ts +1 -0
  25. package/dist/toolkit/core/plugins.d.ts +1 -1
  26. package/dist/toolkit/core/subscribable.d.ts +1 -1
  27. package/dist/toolkit/fields/components/button-toggle.d.ts +1 -1
  28. package/dist/toolkit/fields/components/checkbox-group.d.ts +1 -1
  29. package/dist/toolkit/fields/components/color-picker/color-picker.d.ts +1 -1
  30. package/dist/toolkit/fields/components/input.d.ts +1 -1
  31. package/dist/toolkit/fields/components/number-input.d.ts +1 -1
  32. package/dist/toolkit/fields/components/password-field.d.ts +1 -1
  33. package/dist/toolkit/fields/components/radio-group.d.ts +1 -1
  34. package/dist/toolkit/fields/components/reference/index.d.ts +7 -1
  35. package/dist/toolkit/fields/components/select.d.ts +1 -1
  36. package/dist/toolkit/fields/components/text-field.d.ts +1 -1
  37. package/dist/toolkit/fields/components/textarea.d.ts +1 -1
  38. package/dist/toolkit/fields/components/toggle.d.ts +1 -1
  39. package/dist/toolkit/fields/plugins/blocks-field-plugin/index.d.ts +1 -1
  40. package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +0 -1
  41. package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +0 -1
  42. package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +3 -3
  43. package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +7 -3
  44. package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +1 -1
  45. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +7 -7
  46. package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/error-message.d.ts +5 -5
  47. package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/index.d.ts +1 -1
  48. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +25 -0
  49. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +6 -0
  50. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/floating-toolbar-buttons.d.ts +2 -0
  51. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/headings-dropdown.d.ts +3 -0
  52. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +11 -0
  53. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +14 -0
  54. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +11 -0
  55. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +18 -0
  56. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +12 -0
  57. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +11 -0
  58. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +12 -0
  59. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +29 -0
  60. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/fixed-toolbar.d.ts +1 -0
  61. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +5 -0
  62. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +115 -0
  63. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +18 -0
  64. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +19 -0
  65. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +27 -0
  66. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +8 -0
  67. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +11 -0
  68. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +6 -0
  69. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +16 -0
  70. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +13 -0
  71. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +19 -0
  72. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/overflow-menu.d.ts +7 -0
  73. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -0
  74. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +18 -0
  75. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +18 -0
  76. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +4 -0
  77. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +12 -0
  78. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/templates-toolbar-button.d.ts +2 -0
  79. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +30 -0
  80. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/tooltip.d.ts +12 -0
  81. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/turn-into-dropdown-menu.d.ts +3 -0
  82. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
  83. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/nested-form.d.ts +1 -1
  84. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
  85. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
  86. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
  87. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-rules.d.ts +1 -1
  88. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +2 -2
  89. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +3 -4
  90. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +1 -1
  91. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +3 -3
  92. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +4 -3
  93. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +1 -1
  94. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +5 -4
  95. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -3
  96. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +2 -2
  97. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +1 -1
  98. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +1 -1
  99. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +130 -52
  100. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +4 -0
  101. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +16 -0
  102. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +1 -1
  103. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +6 -0
  104. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/types.d.ts +1 -1
  105. package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +0 -1
  106. package/dist/toolkit/fields/plugins/reference-field-plugin.d.ts +0 -1
  107. package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +0 -1
  108. package/dist/toolkit/fields/plugins/text-field-plugin.d.ts +1 -1
  109. package/dist/toolkit/fields/plugins/textarea-field-plugin.d.ts +0 -3
  110. package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +0 -1
  111. package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +2 -2
  112. package/dist/toolkit/form-builder/field-plugin.d.ts +0 -1
  113. package/dist/toolkit/form-builder/form-portal.d.ts +2 -2
  114. package/dist/toolkit/forms/field.d.ts +1 -2
  115. package/dist/toolkit/forms/form.d.ts +1 -1
  116. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
  117. package/dist/toolkit/react-core/use-cms-event.d.ts +1 -1
  118. package/dist/toolkit/react-datetime/DateTime.d.ts +8 -8
  119. package/dist/toolkit/react-datetime/parts/ViewNavigation.d.ts +1 -1
  120. package/dist/toolkit/react-datetime/views/DaysView.d.ts +1 -1
  121. package/dist/toolkit/react-datetime/views/MonthsView.d.ts +1 -1
  122. package/dist/toolkit/react-datetime/views/TimeView.d.ts +1 -1
  123. package/dist/toolkit/react-datetime/views/YearsView.d.ts +1 -1
  124. package/dist/toolkit/react-modals/modal/modal.d.ts +1 -1
  125. package/dist/toolkit/react-modals/modal-provider.d.ts +1 -1
  126. package/dist/toolkit/react-sidebar/components/form-list.d.ts +5 -5
  127. package/dist/toolkit/styles/message.d.ts +2 -2
  128. package/dist/toolkit/tina-cms.d.ts +7 -11
  129. package/dist/toolkit/tina-state.d.ts +3 -3
  130. package/dist/types/cms.d.ts +3 -4
  131. package/dist/unifiedClient/index.d.ts +3 -3
  132. package/package.json +74 -57
  133. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/floating-toolbar.d.ts +0 -5
  134. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/index.d.ts +0 -16
  135. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/overflow-menu.d.ts +0 -6
  136. 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
- declare type Input = Parameters<AuthProvider['fetchWithToken']>[0];
5
- declare type Init = Parameters<AuthProvider['fetchWithToken']>[1];
6
- declare type FetchReturn = ReturnType<AuthProvider['fetchWithToken']>;
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 declare type OnLoginFunc = (args: {
9
+ export type OnLoginFunc = (args: {
10
10
  token?: TokenObject;
11
11
  }) => Promise<void>;
12
- export declare type TinaIOConfig = {
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: 'current' | 'late' | 'delinquent';
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?: Exclude<keyof NonNullable<T>, "__typename" | "_sys">, index?: number) => string;
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
- declare type BaseComponents = {
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
- declare type BaseComponentSignature = {
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 declare type Components<ComponentAndProps extends object> = {
126
+ export type Components<ComponentAndProps extends object> = {
127
127
  [K in keyof ComponentAndProps]: (props: ComponentAndProps[K]) => JSX.Element;
128
128
  } & BaseComponentSignature;
129
- export declare type TinaMarkdownContent = {
129
+ export type TinaMarkdownContent = {
130
130
  type: string;
131
131
  children: TinaMarkdownContent[];
132
132
  };
@@ -104,7 +104,7 @@
104
104
  const Component2 = components[child.type];
105
105
  return /* @__PURE__ */ React.createElement(Component2, { ...props });
106
106
  }
107
- return /* @__PURE__ */ React.createElement("img", { src: child.url, alt: child.caption });
107
+ return /* @__PURE__ */ React.createElement("img", { src: child.url, alt: child.alt });
108
108
  case "a":
109
109
  if (components[child.type]) {
110
110
  const Component2 = components[child.type];
@@ -101,7 +101,7 @@ const Node = ({ components, child }) => {
101
101
  const Component2 = components[child.type];
102
102
  return /* @__PURE__ */ React.createElement(Component2, { ...props });
103
103
  }
104
- return /* @__PURE__ */ React.createElement("img", { src: child.url, alt: child.caption });
104
+ return /* @__PURE__ */ React.createElement("img", { src: child.url, alt: child.alt });
105
105
  case "a":
106
106
  if (components[child.type]) {
107
107
  const Component2 = components[child.type];
@@ -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 declare type DocumentCreatorCallback = Parameters<typeof useDocumentCreatorPlugin>[0];
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 declare type ToAlert = (event: CMSEvent) => AlertArgs;
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 declare type AlertLevel = 'info' | 'success' | 'warn' | 'error';
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,7 +1,7 @@
1
1
  import React from 'react';
2
2
  interface DeleteModalProps {
3
3
  close(): void;
4
- deleteFunc(): void;
4
+ deleteFunc(): Promise<void>;
5
5
  filename: string;
6
6
  }
7
7
  interface NewFolderModalProps {
@@ -11,4 +11,4 @@ export declare const Tina: React.FC<TinaProviderProps>;
11
11
  /**
12
12
  * @deprecated This has been renamed to `TinaProviderProps`.
13
13
  */
14
- export declare type TinaProps = TinaProviderProps;
14
+ export type TinaProps = TinaProviderProps;
@@ -1,4 +1,4 @@
1
- export declare type Callback<E extends CMSEvent = CMSEvent> = (event: E) => void;
1
+ export type Callback<E extends CMSEvent = CMSEvent> = (event: E) => void;
2
2
  export interface CMSEvent {
3
3
  type: string;
4
4
  [key: string]: any;
@@ -84,6 +84,7 @@ export interface MediaListOptions {
84
84
  w: number;
85
85
  h: number;
86
86
  }[];
87
+ filesOnly?: boolean;
87
88
  }
88
89
  /**
89
90
  * The response returned from listing media.
@@ -183,7 +183,7 @@ interface Map<T> {
183
183
  /**
184
184
  * @ignore
185
185
  */
186
- declare type PluginMap<T extends Plugin = Plugin> = Map<T>;
186
+ type PluginMap<T extends Plugin = Plugin> = Map<T>;
187
187
  /**
188
188
  * A collection of plugins with the same `__type` value.
189
189
  */
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * @ignore
8
8
  */
9
- export declare type Unsubscribe = () => void;
9
+ export type Unsubscribe = () => void;
10
10
  /**
11
11
  * A basic class that can be subscribed to.
12
12
  */
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- declare type Option = {
2
+ type Option = {
3
3
  value: string;
4
4
  label?: string;
5
5
  icon?: React.ComponentType<any>;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- declare type Option = {
2
+ type Option = {
3
3
  value: string;
4
4
  label: string;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ColorFormat } from './color-formatter';
3
- declare type WrappedFieldProps = any;
3
+ type WrappedFieldProps = any;
4
4
  interface Props {
5
5
  colorFormat: ColorFormat;
6
6
  userColors: string[];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export interface InputProps {
3
3
  error?: boolean;
4
4
  small?: boolean;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- declare type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
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
- declare type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
2
+ type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3
3
  export interface PasswordFieldProps extends a {
4
4
  error?: boolean;
5
5
  ref?: any;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- declare type Option = {
2
+ type Option = {
3
3
  value: string;
4
4
  label: string;
5
5
  };
@@ -1,14 +1,20 @@
1
1
  import * as React from 'react';
2
- declare type Option = {
2
+ type Option = {
3
3
  value: string;
4
4
  label: string;
5
5
  };
6
+ type OptionComponent = (props: unknown, _sys: InternalSys) => React.ReactElement | string;
7
+ export interface InternalSys {
8
+ filename: string;
9
+ path: string;
10
+ }
6
11
  export interface ReferenceFieldProps {
7
12
  label?: string;
8
13
  name: string;
9
14
  component: string;
10
15
  collections: string[];
11
16
  options: (Option | string)[];
17
+ optionComponent: OptionComponent;
12
18
  }
13
19
  export interface ReferenceProps {
14
20
  name: string;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { Field } from '../../forms';
3
- declare type Option = {
3
+ type Option = {
4
4
  value: string;
5
5
  label: string;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- declare type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
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
- declare type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
2
+ type a = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3
3
  export interface TextAreaProps extends a {
4
4
  error?: boolean;
5
5
  ref?: any;
@@ -14,7 +14,7 @@ interface ToggleFieldDefinition extends Field {
14
14
  component: 'toggle';
15
15
  toggleLabels?: boolean | FieldLabels;
16
16
  }
17
- declare type FieldLabels = {
17
+ type FieldLabels = {
18
18
  true: string;
19
19
  false: string;
20
20
  };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Field, Form } from '../../../forms';
2
+ import type { Field, Form } from '../../../forms';
3
3
  export interface BlocksFieldDefinititon extends Field {
4
4
  component: 'blocks';
5
5
  templates: {
@@ -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 * as React from 'react';
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 * as React from 'react';
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 }: any) => React.JSX.Element;
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
- declare type DefaultItem = string | number | (() => string | number);
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 { InputProps } from 'react-select/lib/components/Input';
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
- export declare type RichTextType = React.PropsWithChildren<InputFieldType<InputProps, {
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?: toolbarItemName[];
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?: toolbarItemName[];
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?: toolbarItemName[];
22
+ toolbarOverride?: ToolbarOverrideType[];
23
23
  }>) => React.JSX.Element;
24
24
  };
@@ -1,27 +1,27 @@
1
1
  import React from 'react';
2
- export declare type EmptyTextElement = {
2
+ export type EmptyTextElement = {
3
3
  type: 'text';
4
4
  text: '';
5
5
  };
6
- export declare type PositionItem = {
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 declare type Position = {
13
+ export type Position = {
14
14
  start: PositionItem;
15
15
  end: PositionItem;
16
16
  };
17
- export declare type InvalidMarkdownElement = {
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
- declare type ErrorType = {
24
+ type ErrorType = {
25
25
  message: string;
26
26
  position?: {
27
27
  startColumn: number;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { RichTextType } from '..';
2
+ import type { RichTextType } from '..';
3
3
  declare const RawEditor: (props: RichTextType) => React.JSX.Element;
4
4
  export default RawEditor;
@@ -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,6 @@
1
+ import React from 'react';
2
+ export type ToolbarItem = {
3
+ label: string;
4
+ Component: React.ReactNode;
5
+ };
6
+ export default function FixedToolbarButtons(): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export default function FloatingToolbarButtons(): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { DropdownMenuProps } from '@radix-ui/react-dropdown-menu';
3
+ export declare function HeadingsMenu(props: DropdownMenuProps): React.JSX.Element;
@@ -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>>;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ export declare const CodeBlockToolbarButton: React.ForwardRefExoticComponent<{
3
+ clear?: string | string[];
4
+ } & Omit<Omit<{
5
+ tooltip?: React.ReactNode;
6
+ tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
7
+ tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
8
+ } & Omit<{
9
+ isDropdown?: boolean;
10
+ pressed?: boolean;
11
+ showArrow?: boolean;
12
+ } & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
13
+ size?: "default" | "sm" | "lg";
14
+ variant?: "default" | "outline";
15
+ } & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
16
+ size?: "default" | "sm" | "lg";
17
+ variant?: "default" | "outline";
18
+ } & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, "clear"> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare const CodeLeaf: React.ForwardRefExoticComponent<Omit<Omit<{
3
+ leafToAttributes?: (leaf: import("@udecode/plate-common").TText) => any;
4
+ } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & Omit<import("slate-react").RenderLeafProps, "text" | "leaf"> & {
5
+ leaf: import("@udecode/plate-common").TText;
6
+ text: import("@udecode/plate-common").TText;
7
+ } & Omit<{
8
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
9
+ asChild?: boolean | undefined;
10
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
11
+ ref?: React.Ref<any>;
12
+ } & React.RefAttributes<HTMLSpanElement>, "ref">, never> & React.RefAttributes<any>>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export declare const CodeLineElement: 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,12 @@
1
+ import React from 'react';
2
+ export declare const CodeSyntaxLeaf: React.ForwardRefExoticComponent<Omit<Omit<{
3
+ leafToAttributes?: (leaf: import("@udecode/plate-common").TText) => any;
4
+ } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & Omit<import("slate-react").RenderLeafProps, "text" | "leaf"> & {
5
+ leaf: import("@udecode/plate-common").TText;
6
+ text: import("@udecode/plate-common").TText;
7
+ } & Omit<{
8
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
9
+ asChild?: boolean | undefined;
10
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
11
+ ref?: React.Ref<any>;
12
+ } & React.RefAttributes<HTMLSpanElement>, "ref">, never> & React.RefAttributes<any>>;