@payloadcms/richtext-slate 1.0.0-beta.0 → 1.0.0-beta.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 (111) hide show
  1. package/dist/field/buttons.scss +15 -0
  2. package/dist/field/elements/blockquote/index.scss +9 -0
  3. package/dist/field/elements/link/Element/index.scss +92 -0
  4. package/dist/field/elements/link/LinkDrawer/index.scss +50 -0
  5. package/dist/field/elements/ol/index.scss +7 -0
  6. package/dist/field/elements/relationship/Button/index.scss +7 -0
  7. package/dist/field/elements/relationship/Element/index.scss +93 -0
  8. package/dist/field/elements/ul/index.scss +7 -0
  9. package/dist/field/elements/upload/Button/index.scss +7 -0
  10. package/dist/field/elements/upload/Element/index.scss +147 -0
  11. package/dist/field/icons/IndentLeft/index.scss +16 -0
  12. package/dist/field/icons/IndentRight/index.scss +16 -0
  13. package/dist/field/icons/Link/index.scss +11 -0
  14. package/dist/field/icons/Relationship/index.scss +12 -0
  15. package/dist/field/icons/Upload/index.scss +11 -0
  16. package/dist/field/index.scss +193 -0
  17. package/package.json +6 -5
  18. package/dist/cell/index.d.ts +0 -6
  19. package/dist/data/defaultValue.d.ts +0 -6
  20. package/dist/data/populate.d.ts +0 -20
  21. package/dist/data/recurseNestedFields.d.ts +0 -14
  22. package/dist/data/richTextRelationshipPromise.d.ts +0 -17
  23. package/dist/data/validation.d.ts +0 -4
  24. package/dist/field/RichText.d.ts +0 -16
  25. package/dist/field/elements/Button.d.ts +0 -7
  26. package/dist/field/elements/EnabledRelationshipsCondition.d.ts +0 -3
  27. package/dist/field/elements/ListButton.d.ts +0 -7
  28. package/dist/field/elements/areAllChildrenElements.d.ts +0 -3
  29. package/dist/field/elements/blockquote/index.d.ts +0 -11
  30. package/dist/field/elements/getCommonBlock.d.ts +0 -4
  31. package/dist/field/elements/h1/index.d.ts +0 -10
  32. package/dist/field/elements/h2/index.d.ts +0 -10
  33. package/dist/field/elements/h3/index.d.ts +0 -10
  34. package/dist/field/elements/h4/index.d.ts +0 -10
  35. package/dist/field/elements/h5/index.d.ts +0 -10
  36. package/dist/field/elements/h6/index.d.ts +0 -10
  37. package/dist/field/elements/indent/index.d.ts +0 -10
  38. package/dist/field/elements/index.d.ts +0 -117
  39. package/dist/field/elements/injectVoid.d.ts +0 -4
  40. package/dist/field/elements/isActive.d.ts +0 -4
  41. package/dist/field/elements/isBlockElement.d.ts +0 -9
  42. package/dist/field/elements/isLastSelectedElementEmpty.d.ts +0 -3
  43. package/dist/field/elements/isListActive.d.ts +0 -4
  44. package/dist/field/elements/isWithinListItem.d.ts +0 -3
  45. package/dist/field/elements/li/index.d.ts +0 -6
  46. package/dist/field/elements/link/Button/index.d.ts +0 -7
  47. package/dist/field/elements/link/Element/index.d.ts +0 -12
  48. package/dist/field/elements/link/LinkDrawer/baseFields.d.ts +0 -4
  49. package/dist/field/elements/link/LinkDrawer/index.d.ts +0 -5
  50. package/dist/field/elements/link/LinkDrawer/types.d.ts +0 -9
  51. package/dist/field/elements/link/index.d.ts +0 -17
  52. package/dist/field/elements/link/shared.d.ts +0 -2
  53. package/dist/field/elements/link/utilities.d.ts +0 -16
  54. package/dist/field/elements/listTypes.d.ts +0 -3
  55. package/dist/field/elements/ol/index.d.ts +0 -11
  56. package/dist/field/elements/relationship/Button/Fields/index.d.ts +0 -4
  57. package/dist/field/elements/relationship/Button/index.d.ts +0 -9
  58. package/dist/field/elements/relationship/Element/index.d.ts +0 -13
  59. package/dist/field/elements/relationship/index.d.ts +0 -16
  60. package/dist/field/elements/relationship/plugin.d.ts +0 -3
  61. package/dist/field/elements/textAlign/index.d.ts +0 -7
  62. package/dist/field/elements/toggle.d.ts +0 -4
  63. package/dist/field/elements/toggleList.d.ts +0 -4
  64. package/dist/field/elements/types.d.ts +0 -11
  65. package/dist/field/elements/ul/index.d.ts +0 -11
  66. package/dist/field/elements/unwrapList.d.ts +0 -4
  67. package/dist/field/elements/upload/Button/index.d.ts +0 -9
  68. package/dist/field/elements/upload/Element/UploadDrawer/index.d.ts +0 -8
  69. package/dist/field/elements/upload/Element/index.d.ts +0 -14
  70. package/dist/field/elements/upload/index.d.ts +0 -11
  71. package/dist/field/elements/upload/plugin.d.ts +0 -3
  72. package/dist/field/enablePlugins.d.ts +0 -3
  73. package/dist/field/hotkeys.d.ts +0 -8
  74. package/dist/field/icons/AlignCenter/index.d.ts +0 -4
  75. package/dist/field/icons/AlignLeft/index.d.ts +0 -4
  76. package/dist/field/icons/AlignRight/index.d.ts +0 -4
  77. package/dist/field/icons/Blockquote/index.d.ts +0 -4
  78. package/dist/field/icons/Bold/index.d.ts +0 -4
  79. package/dist/field/icons/Code/index.d.ts +0 -4
  80. package/dist/field/icons/IndentLeft/index.d.ts +0 -5
  81. package/dist/field/icons/IndentRight/index.d.ts +0 -5
  82. package/dist/field/icons/Italic/index.d.ts +0 -4
  83. package/dist/field/icons/Link/index.d.ts +0 -5
  84. package/dist/field/icons/OrderedList/index.d.ts +0 -4
  85. package/dist/field/icons/Relationship/index.d.ts +0 -5
  86. package/dist/field/icons/Strikethrough/index.d.ts +0 -4
  87. package/dist/field/icons/Underline/index.d.ts +0 -4
  88. package/dist/field/icons/UnorderedList/index.d.ts +0 -4
  89. package/dist/field/icons/Upload/index.d.ts +0 -5
  90. package/dist/field/icons/headings/H1/index.d.ts +0 -4
  91. package/dist/field/icons/headings/H2/index.d.ts +0 -4
  92. package/dist/field/icons/headings/H3/index.d.ts +0 -4
  93. package/dist/field/icons/headings/H4/index.d.ts +0 -4
  94. package/dist/field/icons/headings/H5/index.d.ts +0 -4
  95. package/dist/field/icons/headings/H6/index.d.ts +0 -4
  96. package/dist/field/icons/headings/index.d.ts +0 -11
  97. package/dist/field/index.d.ts +0 -5
  98. package/dist/field/leaves/Button.d.ts +0 -8
  99. package/dist/field/leaves/bold/index.d.ts +0 -10
  100. package/dist/field/leaves/code/index.d.ts +0 -10
  101. package/dist/field/leaves/index.d.ts +0 -40
  102. package/dist/field/leaves/isActive.d.ts +0 -3
  103. package/dist/field/leaves/italic/index.d.ts +0 -10
  104. package/dist/field/leaves/strikethrough/index.d.ts +0 -10
  105. package/dist/field/leaves/toggle.d.ts +0 -3
  106. package/dist/field/leaves/underline/index.d.ts +0 -10
  107. package/dist/field/mergeCustomFunctions.d.ts +0 -3
  108. package/dist/field/plugins/withEnterBreakOut.d.ts +0 -3
  109. package/dist/field/plugins/withHTML.d.ts +0 -3
  110. package/dist/index.d.ts +0 -4
  111. package/dist/types.d.ts +0 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-slate",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "The officially supported Slate richtext adapter for Payload",
5
5
  "repository": "https://github.com/payloadcms/payload",
6
6
  "license": "MIT",
@@ -22,8 +22,8 @@
22
22
  "devDependencies": {
23
23
  "@types/node": "20.5.7",
24
24
  "@types/react": "18.2.15",
25
- "payload": "2.0.0-beta.1",
26
- "@payloadcms/eslint-config": "0.0.1"
25
+ "@payloadcms/eslint-config": "0.0.1",
26
+ "payload": "2.0.0-beta.2"
27
27
  },
28
28
  "exports": null,
29
29
  "publishConfig": {
@@ -33,8 +33,9 @@
33
33
  "dist"
34
34
  ],
35
35
  "scripts": {
36
- "build": "pnpm build:swc && pnpm build:types",
36
+ "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types",
37
37
  "build:swc": "swc ./src -d ./dist --config-file .swcrc",
38
- "build:types": "tsc --emitDeclarationOnly --outDir dist"
38
+ "build:types": "tsc --emitDeclarationOnly --outDir dist",
39
+ "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/"
39
40
  }
40
41
  }
@@ -1,6 +0,0 @@
1
- import type { CellComponentProps, RichTextField } from 'payload/types';
2
- import React from 'react';
3
- import type { AdapterArguments } from '../types';
4
- declare const RichTextCell: React.FC<CellComponentProps<RichTextField<AdapterArguments>, any>>;
5
- export default RichTextCell;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,6 +0,0 @@
1
- export declare const defaultRichTextValue: {
2
- children: {
3
- text: string;
4
- }[];
5
- }[];
6
- //# sourceMappingURL=defaultValue.d.ts.map
@@ -1,20 +0,0 @@
1
- import type { PayloadRequest } from 'payload/types';
2
- import type { Collection, Field, RichTextField } from 'payload/types';
3
- import type { AdapterArguments } from '../types';
4
- type Arguments = {
5
- currentDepth?: number;
6
- data: unknown;
7
- depth: number;
8
- field: RichTextField<AdapterArguments>;
9
- key: number | string;
10
- overrideAccess?: boolean;
11
- req: PayloadRequest;
12
- showHiddenFields: boolean;
13
- };
14
- export declare const populate: ({ id, collection, currentDepth, data, depth, key, overrideAccess, req, showHiddenFields, }: Omit<Arguments, "field"> & {
15
- collection: Collection;
16
- field: Field;
17
- id: string;
18
- }) => Promise<void>;
19
- export {};
20
- //# sourceMappingURL=populate.d.ts.map
@@ -1,14 +0,0 @@
1
- import type { Field, PayloadRequest } from 'payload/types';
2
- type NestedRichTextFieldsArgs = {
3
- currentDepth?: number;
4
- data: unknown;
5
- depth: number;
6
- fields: Field[];
7
- overrideAccess: boolean;
8
- promises: Promise<void>[];
9
- req: PayloadRequest;
10
- showHiddenFields: boolean;
11
- };
12
- export declare const recurseNestedFields: ({ currentDepth, data, depth, fields, overrideAccess, promises, req, showHiddenFields, }: NestedRichTextFieldsArgs) => void;
13
- export {};
14
- //# sourceMappingURL=recurseNestedFields.d.ts.map
@@ -1,17 +0,0 @@
1
- import type { PayloadRequest, RichTextAdapter, RichTextField } from 'payload/types';
2
- import type { AdapterArguments } from '../types';
3
- export type Args = Parameters<RichTextAdapter<AdapterArguments>['afterReadPromise']>[0];
4
- type RecurseRichTextArgs = {
5
- children: unknown[];
6
- currentDepth: number;
7
- depth: number;
8
- field: RichTextField<AdapterArguments>;
9
- overrideAccess: boolean;
10
- promises: Promise<void>[];
11
- req: PayloadRequest;
12
- showHiddenFields: boolean;
13
- };
14
- export declare const recurseRichText: ({ children, currentDepth, depth, field, overrideAccess, promises, req, showHiddenFields, }: RecurseRichTextArgs) => void;
15
- export declare const richTextRelationshipPromise: ({ currentDepth, depth, field, overrideAccess, req, showHiddenFields, siblingDoc, }: Args) => Promise<void>;
16
- export {};
17
- //# sourceMappingURL=richTextRelationshipPromise.d.ts.map
@@ -1,4 +0,0 @@
1
- import type { RichTextField, Validate } from 'payload/types';
2
- import type { AdapterArguments } from '../types';
3
- export declare const richText: Validate<unknown, unknown, RichTextField<AdapterArguments>>;
4
- //# sourceMappingURL=validation.d.ts.map
@@ -1,16 +0,0 @@
1
- import type { BaseEditor } from 'slate';
2
- import type { HistoryEditor } from 'slate-history';
3
- import type { ReactEditor } from 'slate-react';
4
- import React from 'react';
5
- import type { ElementNode, FieldProps, TextNode } from '../types';
6
- import './index.scss';
7
- declare module 'slate' {
8
- interface CustomTypes {
9
- Editor: BaseEditor & ReactEditor & HistoryEditor;
10
- Element: ElementNode;
11
- Text: TextNode;
12
- }
13
- }
14
- declare const _default: React.FC<FieldProps>;
15
- export default _default;
16
- //# sourceMappingURL=RichText.d.ts.map
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { ButtonProps } from './types';
3
- import '../buttons.scss';
4
- export declare const baseClass = "rich-text__button";
5
- declare const ElementButton: React.FC<ButtonProps>;
6
- export default ElementButton;
7
- //# sourceMappingURL=Button.d.ts.map
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- export declare const EnabledRelationshipsCondition: React.FC<any>;
3
- //# sourceMappingURL=EnabledRelationshipsCondition.d.ts.map
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { ButtonProps } from './types';
3
- import '../buttons.scss';
4
- export declare const baseClass = "rich-text__button";
5
- declare const ListButton: React.FC<ButtonProps>;
6
- export default ListButton;
7
- //# sourceMappingURL=ListButton.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { Node } from 'slate';
2
- export declare const areAllChildrenElements: (node: Node) => boolean;
3
- //# sourceMappingURL=areAllChildrenElements.d.ts.map
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import './index.scss';
3
- declare const blockquote: {
4
- Button: () => React.JSX.Element;
5
- Element: ({ attributes, children }: {
6
- attributes: any;
7
- children: any;
8
- }) => React.JSX.Element;
9
- };
10
- export default blockquote;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- import type { NodeEntry, NodeMatch } from 'slate';
2
- import { Editor, Node } from 'slate';
3
- export declare const getCommonBlock: (editor: Editor, match?: NodeMatch<Node>) => NodeEntry<Node>;
4
- //# sourceMappingURL=getCommonBlock.d.ts.map
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare const h1: {
3
- Button: () => React.JSX.Element;
4
- Element: ({ attributes, children }: {
5
- attributes: any;
6
- children: any;
7
- }) => React.JSX.Element;
8
- };
9
- export default h1;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare const h2: {
3
- Button: () => React.JSX.Element;
4
- Element: ({ attributes, children }: {
5
- attributes: any;
6
- children: any;
7
- }) => React.JSX.Element;
8
- };
9
- export default h2;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare const h3: {
3
- Button: () => React.JSX.Element;
4
- Element: ({ attributes, children }: {
5
- attributes: any;
6
- children: any;
7
- }) => React.JSX.Element;
8
- };
9
- export default h3;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare const h4: {
3
- Button: () => React.JSX.Element;
4
- Element: ({ attributes, children }: {
5
- attributes: any;
6
- children: any;
7
- }) => React.JSX.Element;
8
- };
9
- export default h4;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare const h5: {
3
- Button: () => React.JSX.Element;
4
- Element: ({ attributes, children }: {
5
- attributes: any;
6
- children: any;
7
- }) => React.JSX.Element;
8
- };
9
- export default h5;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare const h6: {
3
- Button: () => React.JSX.Element;
4
- Element: ({ attributes, children }: {
5
- attributes: any;
6
- children: any;
7
- }) => React.JSX.Element;
8
- };
9
- export default h6;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare const indent: {
3
- Button: () => React.JSX.Element;
4
- Element: ({ attributes, children }: {
5
- attributes: any;
6
- children: any;
7
- }) => React.JSX.Element;
8
- };
9
- export default indent;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,117 +0,0 @@
1
- /// <reference types="react" />
2
- declare const elements: {
3
- blockquote: {
4
- Button: () => import("react").JSX.Element;
5
- Element: ({ attributes, children }: {
6
- attributes: any;
7
- children: any;
8
- }) => import("react").JSX.Element;
9
- };
10
- h1: {
11
- Button: () => import("react").JSX.Element;
12
- Element: ({ attributes, children }: {
13
- attributes: any;
14
- children: any;
15
- }) => import("react").JSX.Element;
16
- };
17
- h2: {
18
- Button: () => import("react").JSX.Element;
19
- Element: ({ attributes, children }: {
20
- attributes: any;
21
- children: any;
22
- }) => import("react").JSX.Element;
23
- };
24
- h3: {
25
- Button: () => import("react").JSX.Element;
26
- Element: ({ attributes, children }: {
27
- attributes: any;
28
- children: any;
29
- }) => import("react").JSX.Element;
30
- };
31
- h4: {
32
- Button: () => import("react").JSX.Element;
33
- Element: ({ attributes, children }: {
34
- attributes: any;
35
- children: any;
36
- }) => import("react").JSX.Element;
37
- };
38
- h5: {
39
- Button: () => import("react").JSX.Element;
40
- Element: ({ attributes, children }: {
41
- attributes: any;
42
- children: any;
43
- }) => import("react").JSX.Element;
44
- };
45
- h6: {
46
- Button: () => import("react").JSX.Element;
47
- Element: ({ attributes, children }: {
48
- attributes: any;
49
- children: any;
50
- }) => import("react").JSX.Element;
51
- };
52
- indent: {
53
- Button: () => import("react").JSX.Element;
54
- Element: ({ attributes, children }: {
55
- attributes: any;
56
- children: any;
57
- }) => import("react").JSX.Element;
58
- };
59
- li: {
60
- Element: (props: any) => import("react").JSX.Element;
61
- };
62
- link: {
63
- Button: import("react").FC<{
64
- fieldProps: import("../../types").FieldProps;
65
- path: string;
66
- }>;
67
- Element: import("react").FC<{
68
- attributes: import("react").HTMLAttributes<HTMLDivElement>;
69
- children: import("react").ReactNode;
70
- editorRef: import("react").RefObject<HTMLDivElement>;
71
- element: any;
72
- fieldProps: import("../../types").FieldProps;
73
- }>;
74
- plugins: ((incomingEditor: import("slate").BaseEditor & import("slate-react").ReactEditor & import("slate-history").HistoryEditor) => import("slate").BaseEditor & import("slate-react").ReactEditor & import("slate-history").HistoryEditor)[];
75
- };
76
- ol: {
77
- Button: () => import("react").JSX.Element;
78
- Element: ({ attributes, children }: {
79
- attributes: any;
80
- children: any;
81
- }) => import("react").JSX.Element;
82
- };
83
- relationship: {
84
- Button: (props: {
85
- enabledCollectionSlugs: string[];
86
- path: string;
87
- }) => import("react").ReactNode;
88
- Element: (props: {
89
- attributes: import("react").HTMLAttributes<HTMLDivElement>;
90
- children: import("react").ReactNode;
91
- element: any;
92
- fieldProps: import("../../types").FieldProps;
93
- }) => import("react").ReactNode;
94
- plugins: ((incomingEditor: any) => any)[];
95
- };
96
- textAlign: {
97
- name: string;
98
- Button: () => import("react").JSX.Element;
99
- };
100
- ul: {
101
- Button: () => import("react").JSX.Element;
102
- Element: ({ attributes, children }: {
103
- attributes: any;
104
- children: any;
105
- }) => import("react").JSX.Element;
106
- };
107
- upload: {
108
- Button: (props: {
109
- enabledCollectionSlugs: string[];
110
- path: string;
111
- }) => import("react").ReactNode;
112
- Element: (props: import("./upload/Element").ElementProps) => import("react").ReactNode;
113
- plugins: ((incomingEditor: any) => any)[];
114
- };
115
- };
116
- export default elements;
117
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- import type { Element } from 'slate';
2
- import { Editor } from 'slate';
3
- export declare const injectVoidElement: (editor: Editor, element: Element) => void;
4
- //# sourceMappingURL=injectVoid.d.ts.map
@@ -1,4 +0,0 @@
1
- import { Editor } from 'slate';
2
- declare const isElementActive: (editor: Editor, format: string, blockType?: string) => boolean;
3
- export default isElementActive;
4
- //# sourceMappingURL=isActive.d.ts.map
@@ -1,9 +0,0 @@
1
- import { Editor } from 'slate';
2
- /**
3
- * Returns true, if the provided node is a Block Element.
4
- * Note: Using Editor.isBlock() is not sufficient, as since slate 0.90 it returns `true` for Text nodes and the editor as well.
5
- *
6
- * Related Issue: https://github.com/ianstormtaylor/slate/issues/5287
7
- */
8
- export declare const isBlockElement: (editor: Editor, node: any) => node is import("../../types").ElementNode;
9
- //# sourceMappingURL=isBlockElement.d.ts.map
@@ -1,3 +0,0 @@
1
- import { Editor } from 'slate';
2
- export declare const isLastSelectedElementEmpty: (editor: Editor) => boolean;
3
- //# sourceMappingURL=isLastSelectedElementEmpty.d.ts.map
@@ -1,4 +0,0 @@
1
- import { Editor } from 'slate';
2
- declare const isListActive: (editor: Editor, format: string) => boolean;
3
- export default isListActive;
4
- //# sourceMappingURL=isListActive.d.ts.map
@@ -1,3 +0,0 @@
1
- import { Editor } from 'slate';
2
- export declare const isWithinListItem: (editor: Editor) => boolean;
3
- //# sourceMappingURL=isWithinListItem.d.ts.map
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- declare const _default: {
3
- Element: (props: any) => React.JSX.Element;
4
- };
5
- export default _default;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { FieldProps } from '../../../../types';
3
- export declare const LinkButton: React.FC<{
4
- fieldProps: FieldProps;
5
- path: string;
6
- }>;
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
3
- import type { FieldProps } from '../../../../types';
4
- import './index.scss';
5
- export declare const LinkElement: React.FC<{
6
- attributes: HTMLAttributes<HTMLDivElement>;
7
- children: React.ReactNode;
8
- editorRef: React.RefObject<HTMLDivElement>;
9
- element: any;
10
- fieldProps: FieldProps;
11
- }>;
12
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- import type { Config } from 'payload/config';
2
- import type { Field } from 'payload/types';
3
- export declare const getBaseFields: (config: Config) => Field[];
4
- //# sourceMappingURL=baseFields.d.ts.map
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import type { Props } from './types';
3
- import './index.scss';
4
- export declare const LinkDrawer: React.FC<Props>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,9 +0,0 @@
1
- import type { Field, Fields } from 'payload/types';
2
- export type Props = {
3
- drawerSlug: string;
4
- fieldSchema: Field[];
5
- handleClose: () => void;
6
- handleModalSubmit: (fields: Fields, data: Record<string, unknown>) => void;
7
- initialState?: Fields;
8
- };
9
- //# sourceMappingURL=types.d.ts.map
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- declare const link: {
3
- Button: import("react").FC<{
4
- fieldProps: import("../../../types").FieldProps;
5
- path: string;
6
- }>;
7
- Element: import("react").FC<{
8
- attributes: import("react").HTMLAttributes<HTMLDivElement>;
9
- children: import("react").ReactNode;
10
- editorRef: import("react").RefObject<HTMLDivElement>;
11
- element: any;
12
- fieldProps: import("../../../types").FieldProps;
13
- }>;
14
- plugins: ((incomingEditor: import("slate").BaseEditor & import("slate-react").ReactEditor & import("slate-history").HistoryEditor) => import("slate").BaseEditor & import("slate-react").ReactEditor & import("slate-history").HistoryEditor)[];
15
- };
16
- export default link;
17
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +0,0 @@
1
- export declare const modalSlug = "rich-text-link-modal";
2
- //# sourceMappingURL=shared.d.ts.map
@@ -1,16 +0,0 @@
1
- import type { i18n } from 'i18next';
2
- import type { SanitizedConfig } from 'payload/config';
3
- import type { Field } from 'payload/types';
4
- import type { Editor } from 'slate';
5
- export declare const unwrapLink: (editor: Editor) => void;
6
- export declare const wrapLink: (editor: Editor) => void;
7
- export declare const withLinks: (incomingEditor: Editor) => Editor;
8
- /**
9
- * This function is run to enrich the basefields which every link has with potential, custom user-added fields.
10
- */
11
- export declare function transformExtraFields(customFieldSchema: ((args: {
12
- config: SanitizedConfig;
13
- defaultFields: Field[];
14
- i18n: i18n;
15
- }) => Field[]) | Field[], config: SanitizedConfig, i18n: i18n): Field[];
16
- //# sourceMappingURL=utilities.d.ts.map
@@ -1,3 +0,0 @@
1
- declare const _default: string[];
2
- export default _default;
3
- //# sourceMappingURL=listTypes.d.ts.map
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import './index.scss';
3
- declare const ol: {
4
- Button: () => React.JSX.Element;
5
- Element: ({ attributes, children }: {
6
- attributes: any;
7
- children: any;
8
- }) => React.JSX.Element;
9
- };
10
- export default ol;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- declare const RelationshipFields: () => React.JSX.Element;
3
- export default RelationshipFields;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './index.scss';
3
- type Props = {
4
- enabledCollectionSlugs: string[];
5
- path: string;
6
- };
7
- declare const _default: (props: Props) => React.ReactNode;
8
- export default _default;
9
- //# sourceMappingURL=index.d.ts.map
@@ -1,13 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
3
- import type { FieldProps } from '../../../../types';
4
- import './index.scss';
5
- type Props = {
6
- attributes: HTMLAttributes<HTMLDivElement>;
7
- children: React.ReactNode;
8
- element: any;
9
- fieldProps: FieldProps;
10
- };
11
- declare const _default: (props: Props) => React.ReactNode;
12
- export default _default;
13
- //# sourceMappingURL=index.d.ts.map
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- Button: (props: {
4
- enabledCollectionSlugs: string[];
5
- path: string;
6
- }) => import("react").ReactNode;
7
- Element: (props: {
8
- attributes: import("react").HTMLAttributes<HTMLDivElement>;
9
- children: import("react").ReactNode;
10
- element: any;
11
- fieldProps: import("../../../types").FieldProps;
12
- }) => import("react").ReactNode;
13
- plugins: ((incomingEditor: any) => any)[];
14
- };
15
- export default _default;
16
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +0,0 @@
1
- declare const withRelationship: (incomingEditor: any) => any;
2
- export default withRelationship;
3
- //# sourceMappingURL=plugin.d.ts.map
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- declare const _default: {
3
- name: string;
4
- Button: () => React.JSX.Element;
5
- };
6
- export default _default;
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- import { Editor } from 'slate';
2
- declare const toggleElement: (editor: Editor, format: string, blockType?: string) => void;
3
- export default toggleElement;
4
- //# sourceMappingURL=toggle.d.ts.map
@@ -1,4 +0,0 @@
1
- import { Editor } from 'slate';
2
- declare const toggleList: (editor: Editor, format: string) => void;
3
- export default toggleList;
4
- //# sourceMappingURL=toggleList.d.ts.map
@@ -1,11 +0,0 @@
1
- import type { ElementType } from 'react';
2
- export type ButtonProps = {
3
- children?: React.ReactNode;
4
- className?: string;
5
- el?: ElementType;
6
- format: string;
7
- onClick?: (e: React.MouseEvent) => void;
8
- tooltip?: string;
9
- type?: string;
10
- };
11
- //# sourceMappingURL=types.d.ts.map
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import './index.scss';
3
- declare const ul: {
4
- Button: () => React.JSX.Element;
5
- Element: ({ attributes, children }: {
6
- attributes: any;
7
- children: any;
8
- }) => React.JSX.Element;
9
- };
10
- export default ul;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- import type { Path } from 'slate';
2
- import { Editor } from 'slate';
3
- export declare const unwrapList: (editor: Editor, atPath: Path) => void;
4
- //# sourceMappingURL=unwrapList.d.ts.map
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './index.scss';
3
- type ButtonProps = {
4
- enabledCollectionSlugs: string[];
5
- path: string;
6
- };
7
- declare const _default: (props: ButtonProps) => React.ReactNode;
8
- export default _default;
9
- //# sourceMappingURL=index.d.ts.map