@payloadcms/richtext-lexical 3.0.0-alpha.48 → 3.0.0-alpha.50
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/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +6 -5
- package/dist/cell/index.js.map +1 -1
- package/dist/field/Field.d.ts +4 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +22 -6
- package/dist/field/Field.js.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.d.ts +4 -2
- package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.js +37 -19
- package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -1
- package/dist/field/features/blocks/component/FormSavePlugin.js +7 -2
- package/dist/field/features/blocks/component/FormSavePlugin.js.map +1 -1
- package/dist/field/features/blocks/component/index.d.ts.map +1 -1
- package/dist/field/features/blocks/component/index.js +19 -12
- package/dist/field/features/blocks/component/index.js.map +1 -1
- package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts +11 -0
- package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts.map +1 -0
- package/dist/field/features/blocks/component/removeEmptyArrayValues.js +16 -0
- package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +1 -0
- package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
- package/dist/field/features/blocks/drawer/index.js +4 -1
- package/dist/field/features/blocks/drawer/index.js.map +1 -1
- package/dist/field/features/blocks/feature.client.d.ts +1 -1
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.client.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +32 -11
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/converters/html/field/index.d.ts +1 -1
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js.map +1 -1
- package/dist/field/features/createClientComponent.d.ts +1 -2
- package/dist/field/features/createClientComponent.d.ts.map +1 -1
- package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -1
- package/dist/field/features/createFeaturePropComponent.js +3 -2
- package/dist/field/features/createFeaturePropComponent.js.map +1 -1
- package/dist/field/features/link/drawer/index.d.ts.map +1 -1
- package/dist/field/features/link/drawer/index.js +20 -10
- package/dist/field/features/link/drawer/index.js.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.js +1 -1
- package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +4 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/field/features/lists/htmlConverter.js +1 -1
- package/dist/field/features/lists/htmlConverter.js.map +1 -1
- package/dist/field/features/relationship/drawer/index.js +1 -1
- package/dist/field/features/relationship/drawer/index.js.map +1 -1
- package/dist/field/features/relationship/feature.client.js +1 -1
- package/dist/field/features/relationship/feature.client.js.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +5 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
- package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
- package/dist/field/features/relationship/plugins/index.js +2 -2
- package/dist/field/features/relationship/plugins/index.js.map +1 -1
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +8 -6
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts +2 -2
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +21 -9
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
- package/dist/field/features/upload/component/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/index.js +10 -3
- package/dist/field/features/upload/component/index.js.map +1 -1
- package/dist/field/features/upload/drawer/index.js +1 -1
- package/dist/field/features/upload/drawer/index.js.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.js +2 -2
- package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
- package/dist/field/features/upload/plugin/index.js +1 -1
- package/dist/field/features/upload/plugin/index.js.map +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +5 -5
- package/dist/field/index.js.map +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/field/lexical/LexicalProvider.js.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +1 -3
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +1 -1
- package/dist/field/lexical/ui/icons/Add/index.svg +4 -4
- package/dist/field/lexical/ui/icons/DraggableBlock/index.svg +8 -8
- package/dist/generateComponentMap.d.ts.map +1 -1
- package/dist/generateComponentMap.js +5 -3
- package/dist/generateComponentMap.js.map +1 -1
- package/dist/generateSchemaMap.d.ts.map +1 -1
- package/dist/generateSchemaMap.js +2 -1
- package/dist/generateSchemaMap.js.map +1 -1
- package/dist/index.d.ts +3 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -21
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +12 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/useLexicalFeature.d.ts.map +1 -1
- package/dist/useLexicalFeature.js +3 -3
- package/dist/useLexicalFeature.js.map +1 -1
- package/package.json +14 -8
- package/src/index.ts +419 -0
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/richtext-lexical",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.50",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/payloadcms/payload.git",
|
|
8
|
+
"directory": "packages/richtext-lexical"
|
|
9
|
+
},
|
|
6
10
|
"license": "MIT",
|
|
7
11
|
"homepage": "https://payloadcms.com",
|
|
8
12
|
"author": "Payload CMS, Inc.",
|
|
@@ -37,14 +41,16 @@
|
|
|
37
41
|
"@types/react": "18.2.15",
|
|
38
42
|
"@types/react-dom": "18.2.7",
|
|
39
43
|
"@payloadcms/eslint-config": "1.1.1",
|
|
40
|
-
"@payloadcms/translations": "3.0.0-alpha.
|
|
41
|
-
"
|
|
42
|
-
"@payloadcms/
|
|
44
|
+
"@payloadcms/translations": "3.0.0-alpha.50",
|
|
45
|
+
"@payloadcms/ui": "3.0.0-alpha.50",
|
|
46
|
+
"@payloadcms/next": "3.0.0-alpha.50",
|
|
47
|
+
"payload": "3.0.0-alpha.50"
|
|
43
48
|
},
|
|
44
49
|
"peerDependencies": {
|
|
45
|
-
"@payloadcms/translations": "3.0.0-alpha.
|
|
46
|
-
"@payloadcms/
|
|
47
|
-
"payload": "3.0.0-alpha.
|
|
50
|
+
"@payloadcms/translations": "3.0.0-alpha.50",
|
|
51
|
+
"@payloadcms/next": "3.0.0-alpha.50",
|
|
52
|
+
"payload": "3.0.0-alpha.50",
|
|
53
|
+
"@payloadcms/ui": "3.0.0-alpha.50"
|
|
48
54
|
},
|
|
49
55
|
"exports": {
|
|
50
56
|
".": {
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import type { JSONSchema4 } from 'json-schema'
|
|
2
|
+
import type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js'
|
|
3
|
+
|
|
4
|
+
import { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'
|
|
5
|
+
import { withNullableJSONSchemaType } from 'payload/utilities'
|
|
6
|
+
|
|
7
|
+
import type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'
|
|
8
|
+
import type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'
|
|
9
|
+
import type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapter } from './types.js'
|
|
10
|
+
|
|
11
|
+
import { RichTextCell } from './cell/index.js'
|
|
12
|
+
import { RichTextField } from './field/index.js'
|
|
13
|
+
import {
|
|
14
|
+
defaultEditorConfig,
|
|
15
|
+
defaultEditorFeatures,
|
|
16
|
+
defaultSanitizedServerEditorConfig,
|
|
17
|
+
} from './field/lexical/config/server/default.js'
|
|
18
|
+
import { loadFeatures } from './field/lexical/config/server/loader.js'
|
|
19
|
+
import { sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js'
|
|
20
|
+
import { cloneDeep } from './field/lexical/utils/cloneDeep.js'
|
|
21
|
+
import { getGenerateComponentMap } from './generateComponentMap.js'
|
|
22
|
+
import { getGenerateSchemaMap } from './generateSchemaMap.js'
|
|
23
|
+
import { richTextRelationshipPromise } from './populate/richTextRelationshipPromise.js'
|
|
24
|
+
import { richTextValidateHOC } from './validate/index.js'
|
|
25
|
+
|
|
26
|
+
export function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapter {
|
|
27
|
+
let resolvedFeatureMap: ResolvedServerFeatureMap = null
|
|
28
|
+
|
|
29
|
+
let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only
|
|
30
|
+
if (!props || (!props.features && !props.lexical)) {
|
|
31
|
+
finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)
|
|
32
|
+
resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap
|
|
33
|
+
} else {
|
|
34
|
+
let features: FeatureProviderServer<unknown, unknown>[] =
|
|
35
|
+
props.features && typeof props.features === 'function'
|
|
36
|
+
? props.features({ defaultFeatures: cloneDeep(defaultEditorFeatures) })
|
|
37
|
+
: (props.features as FeatureProviderServer<unknown, unknown>[])
|
|
38
|
+
if (!features) {
|
|
39
|
+
features = cloneDeep(defaultEditorFeatures)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const lexical: LexicalEditorConfig = props.lexical
|
|
43
|
+
|
|
44
|
+
resolvedFeatureMap = loadFeatures({
|
|
45
|
+
unSanitizedEditorConfig: {
|
|
46
|
+
features,
|
|
47
|
+
lexical: lexical ? lexical : defaultEditorConfig.lexical,
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
finalSanitizedEditorConfig = {
|
|
52
|
+
features: sanitizeServerFeatures(resolvedFeatureMap),
|
|
53
|
+
lexical: lexical ? lexical : defaultEditorConfig.lexical,
|
|
54
|
+
resolvedFeatureMap,
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
CellComponent: withMergedProps({
|
|
60
|
+
Component: RichTextCell,
|
|
61
|
+
toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },
|
|
62
|
+
}),
|
|
63
|
+
FieldComponent: withMergedProps({
|
|
64
|
+
Component: RichTextField,
|
|
65
|
+
toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },
|
|
66
|
+
}),
|
|
67
|
+
afterReadPromise: ({ field, incomingEditorState, siblingDoc }) => {
|
|
68
|
+
return new Promise<void>((resolve, reject) => {
|
|
69
|
+
const promises: Promise<void>[] = []
|
|
70
|
+
|
|
71
|
+
if (finalSanitizedEditorConfig?.features?.hooks?.afterReadPromises?.length) {
|
|
72
|
+
for (const afterReadPromise of finalSanitizedEditorConfig.features.hooks
|
|
73
|
+
.afterReadPromises) {
|
|
74
|
+
const promise = afterReadPromise({
|
|
75
|
+
field,
|
|
76
|
+
incomingEditorState,
|
|
77
|
+
siblingDoc,
|
|
78
|
+
})
|
|
79
|
+
if (promise) {
|
|
80
|
+
promises.push(promise)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
Promise.all(promises)
|
|
86
|
+
.then(() => resolve())
|
|
87
|
+
.catch((error) => reject(error))
|
|
88
|
+
})
|
|
89
|
+
},
|
|
90
|
+
editorConfig: finalSanitizedEditorConfig,
|
|
91
|
+
generateComponentMap: getGenerateComponentMap({
|
|
92
|
+
resolvedFeatureMap,
|
|
93
|
+
}),
|
|
94
|
+
generateSchemaMap: getGenerateSchemaMap({
|
|
95
|
+
resolvedFeatureMap,
|
|
96
|
+
}),
|
|
97
|
+
outputSchema: ({
|
|
98
|
+
collectionIDFieldTypes,
|
|
99
|
+
config,
|
|
100
|
+
field,
|
|
101
|
+
interfaceNameDefinitions,
|
|
102
|
+
isRequired,
|
|
103
|
+
}) => {
|
|
104
|
+
let outputSchema: JSONSchema4 = {
|
|
105
|
+
// This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.
|
|
106
|
+
// In the future, we should
|
|
107
|
+
// 1) allow recursive children
|
|
108
|
+
// 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.
|
|
109
|
+
type: withNullableJSONSchemaType('object', isRequired),
|
|
110
|
+
properties: {
|
|
111
|
+
root: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
additionalProperties: false,
|
|
114
|
+
properties: {
|
|
115
|
+
type: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
},
|
|
118
|
+
children: {
|
|
119
|
+
type: 'array',
|
|
120
|
+
items: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
additionalProperties: true,
|
|
123
|
+
properties: {
|
|
124
|
+
type: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
},
|
|
127
|
+
version: {
|
|
128
|
+
type: 'integer',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
required: ['type', 'version'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
direction: {
|
|
135
|
+
oneOf: [
|
|
136
|
+
{
|
|
137
|
+
enum: ['ltr', 'rtl'],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'null',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
format: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element
|
|
147
|
+
},
|
|
148
|
+
indent: {
|
|
149
|
+
type: 'integer',
|
|
150
|
+
},
|
|
151
|
+
version: {
|
|
152
|
+
type: 'integer',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
required: ['children', 'direction', 'format', 'indent', 'type', 'version'],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ['root'],
|
|
159
|
+
}
|
|
160
|
+
for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes
|
|
161
|
+
.modifyOutputSchemas) {
|
|
162
|
+
outputSchema = modifyOutputSchema({
|
|
163
|
+
collectionIDFieldTypes,
|
|
164
|
+
config,
|
|
165
|
+
currentSchema: outputSchema,
|
|
166
|
+
field,
|
|
167
|
+
interfaceNameDefinitions,
|
|
168
|
+
isRequired,
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return outputSchema
|
|
173
|
+
},
|
|
174
|
+
populationPromise({
|
|
175
|
+
context,
|
|
176
|
+
currentDepth,
|
|
177
|
+
depth,
|
|
178
|
+
field,
|
|
179
|
+
findMany,
|
|
180
|
+
flattenLocales,
|
|
181
|
+
overrideAccess,
|
|
182
|
+
populationPromises,
|
|
183
|
+
req,
|
|
184
|
+
showHiddenFields,
|
|
185
|
+
siblingDoc,
|
|
186
|
+
}) {
|
|
187
|
+
// check if there are any features with nodes which have populationPromises for this field
|
|
188
|
+
if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {
|
|
189
|
+
return richTextRelationshipPromise({
|
|
190
|
+
context,
|
|
191
|
+
currentDepth,
|
|
192
|
+
depth,
|
|
193
|
+
editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,
|
|
194
|
+
field,
|
|
195
|
+
findMany,
|
|
196
|
+
flattenLocales,
|
|
197
|
+
overrideAccess,
|
|
198
|
+
populationPromises,
|
|
199
|
+
req,
|
|
200
|
+
showHiddenFields,
|
|
201
|
+
siblingDoc,
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return null
|
|
206
|
+
},
|
|
207
|
+
validate: richTextValidateHOC({
|
|
208
|
+
editorConfig: finalSanitizedEditorConfig,
|
|
209
|
+
}),
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export { AlignFeature } from './field/features/align/feature.server.js'
|
|
214
|
+
export { BlockQuoteFeature } from './field/features/blockquote/feature.server.js'
|
|
215
|
+
export { BlocksFeature, type BlocksFeatureProps } from './field/features/blocks/feature.server.js'
|
|
216
|
+
export {
|
|
217
|
+
$createBlockNode,
|
|
218
|
+
$isBlockNode,
|
|
219
|
+
type BlockFields,
|
|
220
|
+
BlockNode,
|
|
221
|
+
type SerializedBlockNode,
|
|
222
|
+
} from './field/features/blocks/nodes/BlocksNode.js'
|
|
223
|
+
|
|
224
|
+
export { TextDropdownSectionWithEntries } from './field/features/common/floatingSelectToolbarTextDropdownSection/index.js'
|
|
225
|
+
export { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'
|
|
226
|
+
export { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'
|
|
227
|
+
|
|
228
|
+
export { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'
|
|
229
|
+
export { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'
|
|
230
|
+
export {
|
|
231
|
+
convertLexicalNodesToHTML,
|
|
232
|
+
convertLexicalToHTML,
|
|
233
|
+
} from './field/features/converters/html/converter/index.js'
|
|
234
|
+
export type { HTMLConverter } from './field/features/converters/html/converter/types.js'
|
|
235
|
+
export {
|
|
236
|
+
HTMLConverterFeature,
|
|
237
|
+
type HTMLConverterFeatureProps,
|
|
238
|
+
} from './field/features/converters/html/feature.server.js'
|
|
239
|
+
export {
|
|
240
|
+
consolidateHTMLConverters,
|
|
241
|
+
lexicalHTML,
|
|
242
|
+
} from './field/features/converters/html/field/index.js'
|
|
243
|
+
export { createClientComponent } from './field/features/createClientComponent.js'
|
|
244
|
+
export { TestRecorderFeature } from './field/features/debug/testrecorder/feature.server.js'
|
|
245
|
+
export { TreeViewFeature } from './field/features/debug/treeview/feature.server.js'
|
|
246
|
+
export { BoldFeature } from './field/features/format/bold/feature.server.js'
|
|
247
|
+
export { SectionWithEntries as FormatSectionWithEntries } from './field/features/format/common/floatingSelectToolbarSection.js'
|
|
248
|
+
export { InlineCodeFeature } from './field/features/format/inlinecode/feature.server.js'
|
|
249
|
+
export { ItalicFeature } from './field/features/format/italic/feature.server.js'
|
|
250
|
+
export { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'
|
|
251
|
+
export { SubscriptFeature } from './field/features/format/subscript/feature.server.js'
|
|
252
|
+
export { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'
|
|
253
|
+
export { UnderlineFeature } from './field/features/format/underline/feature.server.js'
|
|
254
|
+
|
|
255
|
+
export { HeadingFeature } from './field/features/heading/feature.server.js'
|
|
256
|
+
export { IndentFeature } from './field/features/indent/feature.server.js'
|
|
257
|
+
|
|
258
|
+
export { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'
|
|
259
|
+
export {
|
|
260
|
+
$createAutoLinkNode,
|
|
261
|
+
$isAutoLinkNode,
|
|
262
|
+
AutoLinkNode,
|
|
263
|
+
} from './field/features/link/nodes/AutoLinkNode.js'
|
|
264
|
+
export {
|
|
265
|
+
$createLinkNode,
|
|
266
|
+
$isLinkNode,
|
|
267
|
+
LinkNode,
|
|
268
|
+
TOGGLE_LINK_COMMAND,
|
|
269
|
+
} from './field/features/link/nodes/LinkNode.js'
|
|
270
|
+
export type {
|
|
271
|
+
LinkFields,
|
|
272
|
+
SerializedAutoLinkNode,
|
|
273
|
+
SerializedLinkNode,
|
|
274
|
+
} from './field/features/link/nodes/types.js'
|
|
275
|
+
export { CheckListFeature } from './field/features/lists/checklist/feature.server.js'
|
|
276
|
+
export { OrderedListFeature } from './field/features/lists/orderedlist/feature.server.js'
|
|
277
|
+
export { UnorderedListFeature } from './field/features/lists/unorderedlist/feature.server.js'
|
|
278
|
+
export { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'
|
|
279
|
+
export { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'
|
|
280
|
+
export { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'
|
|
281
|
+
export { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'
|
|
282
|
+
export { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'
|
|
283
|
+
export { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'
|
|
284
|
+
export { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'
|
|
285
|
+
export { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'
|
|
286
|
+
export { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'
|
|
287
|
+
export { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'
|
|
288
|
+
|
|
289
|
+
export { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'
|
|
290
|
+
export { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'
|
|
291
|
+
export {
|
|
292
|
+
convertSlateNodesToLexical,
|
|
293
|
+
convertSlateToLexical,
|
|
294
|
+
} from './field/features/migrations/slateToLexical/converter/index.js'
|
|
295
|
+
|
|
296
|
+
export type {
|
|
297
|
+
SlateNode,
|
|
298
|
+
SlateNodeConverter,
|
|
299
|
+
} from './field/features/migrations/slateToLexical/converter/types.js'
|
|
300
|
+
export { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'
|
|
301
|
+
export { ParagraphFeature } from './field/features/paragraph/feature.server.js'
|
|
302
|
+
export { RelationshipFeature } from './field/features/relationship/feature.server.js'
|
|
303
|
+
export {
|
|
304
|
+
$createRelationshipNode,
|
|
305
|
+
$isRelationshipNode,
|
|
306
|
+
type RelationshipData,
|
|
307
|
+
RelationshipNode,
|
|
308
|
+
type SerializedRelationshipNode,
|
|
309
|
+
} from './field/features/relationship/nodes/RelationshipNode.js'
|
|
310
|
+
export type {
|
|
311
|
+
ClientFeature,
|
|
312
|
+
ClientFeatureProviderMap,
|
|
313
|
+
FeatureProviderClient,
|
|
314
|
+
FeatureProviderProviderClient,
|
|
315
|
+
FeatureProviderProviderServer,
|
|
316
|
+
FeatureProviderServer,
|
|
317
|
+
NodeValidation,
|
|
318
|
+
PopulationPromise,
|
|
319
|
+
ResolvedClientFeature,
|
|
320
|
+
ResolvedClientFeatureMap,
|
|
321
|
+
ResolvedServerFeature,
|
|
322
|
+
ResolvedServerFeatureMap,
|
|
323
|
+
SanitizedClientFeatures,
|
|
324
|
+
SanitizedPlugin,
|
|
325
|
+
SanitizedServerFeatures,
|
|
326
|
+
ServerFeature,
|
|
327
|
+
ServerFeatureProviderMap,
|
|
328
|
+
} from './field/features/types.js'
|
|
329
|
+
export { UploadFeature } from './field/features/upload/feature.server.js'
|
|
330
|
+
|
|
331
|
+
export type { UploadFeatureProps } from './field/features/upload/feature.server.js'
|
|
332
|
+
|
|
333
|
+
export type { RawUploadPayload } from './field/features/upload/nodes/UploadNode.js'
|
|
334
|
+
|
|
335
|
+
export {
|
|
336
|
+
$createUploadNode,
|
|
337
|
+
$isUploadNode,
|
|
338
|
+
type SerializedUploadNode,
|
|
339
|
+
type UploadData,
|
|
340
|
+
UploadNode,
|
|
341
|
+
} from './field/features/upload/nodes/UploadNode.js'
|
|
342
|
+
export {
|
|
343
|
+
EditorConfigProvider,
|
|
344
|
+
useEditorConfigContext,
|
|
345
|
+
} from './field/lexical/config/client/EditorConfigProvider.js'
|
|
346
|
+
export {
|
|
347
|
+
sanitizeClientEditorConfig,
|
|
348
|
+
sanitizeClientFeatures,
|
|
349
|
+
} from './field/lexical/config/client/sanitize.js'
|
|
350
|
+
export {
|
|
351
|
+
defaultEditorConfig,
|
|
352
|
+
defaultEditorFeatures,
|
|
353
|
+
defaultEditorLexicalConfig,
|
|
354
|
+
defaultSanitizedServerEditorConfig,
|
|
355
|
+
} from './field/lexical/config/server/default.js'
|
|
356
|
+
export {
|
|
357
|
+
loadFeatures,
|
|
358
|
+
sortFeaturesForOptimalLoading,
|
|
359
|
+
} from './field/lexical/config/server/loader.js'
|
|
360
|
+
export {
|
|
361
|
+
sanitizeServerEditorConfig,
|
|
362
|
+
sanitizeServerFeatures,
|
|
363
|
+
} from './field/lexical/config/server/sanitize.js'
|
|
364
|
+
|
|
365
|
+
export type {
|
|
366
|
+
ClientEditorConfig,
|
|
367
|
+
SanitizedClientEditorConfig,
|
|
368
|
+
SanitizedServerEditorConfig,
|
|
369
|
+
ServerEditorConfig,
|
|
370
|
+
} from './field/lexical/config/types.js'
|
|
371
|
+
export { getEnabledNodes } from './field/lexical/nodes/index.js'
|
|
372
|
+
|
|
373
|
+
export {
|
|
374
|
+
type FloatingToolbarSection,
|
|
375
|
+
type FloatingToolbarSectionEntry,
|
|
376
|
+
} from './field/lexical/plugins/FloatingSelectToolbar/types.js'
|
|
377
|
+
export { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'
|
|
378
|
+
export type { AdapterProps }
|
|
379
|
+
|
|
380
|
+
export {
|
|
381
|
+
SlashMenuGroup,
|
|
382
|
+
SlashMenuOption,
|
|
383
|
+
} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'
|
|
384
|
+
export { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'
|
|
385
|
+
export { cloneDeep } from './field/lexical/utils/cloneDeep.js'
|
|
386
|
+
export { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'
|
|
387
|
+
export { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'
|
|
388
|
+
export { isHTMLElement } from './field/lexical/utils/guard.js'
|
|
389
|
+
export { invariant } from './field/lexical/utils/invariant.js'
|
|
390
|
+
export { joinClasses } from './field/lexical/utils/joinClasses.js'
|
|
391
|
+
export { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'
|
|
392
|
+
export {
|
|
393
|
+
DETAIL_TYPE_TO_DETAIL,
|
|
394
|
+
DOUBLE_LINE_BREAK,
|
|
395
|
+
ELEMENT_FORMAT_TO_TYPE,
|
|
396
|
+
ELEMENT_TYPE_TO_FORMAT,
|
|
397
|
+
IS_ALL_FORMATTING,
|
|
398
|
+
LTR_REGEX,
|
|
399
|
+
NON_BREAKING_SPACE,
|
|
400
|
+
NodeFormat,
|
|
401
|
+
RTL_REGEX,
|
|
402
|
+
TEXT_MODE_TO_TYPE,
|
|
403
|
+
TEXT_TYPE_TO_FORMAT,
|
|
404
|
+
TEXT_TYPE_TO_MODE,
|
|
405
|
+
} from './field/lexical/utils/nodeFormat.js'
|
|
406
|
+
export { Point, isPoint } from './field/lexical/utils/point.js'
|
|
407
|
+
export { Rect } from './field/lexical/utils/rect.js'
|
|
408
|
+
export { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'
|
|
409
|
+
export { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'
|
|
410
|
+
export {
|
|
411
|
+
addSwipeDownListener,
|
|
412
|
+
addSwipeLeftListener,
|
|
413
|
+
addSwipeRightListener,
|
|
414
|
+
addSwipeUpListener,
|
|
415
|
+
} from './field/lexical/utils/swipe.js'
|
|
416
|
+
export { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'
|
|
417
|
+
export { defaultRichTextValue } from './populate/defaultValue.js'
|
|
418
|
+
|
|
419
|
+
export type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'
|