@payloadcms/richtext-lexical 3.68.0-internal-debug.35482da → 3.68.0-internal-debug.654e4ad
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/exports/client/index.d.ts +1 -0
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +1 -0
- package/dist/exports/client/index.js.map +1 -1
- package/dist/exports/client/internal-client.d.ts +3 -0
- package/dist/exports/client/internal-client.d.ts.map +1 -0
- package/dist/exports/client/internal-client.js +4 -0
- package/dist/exports/client/internal-client.js.map +1 -0
- package/dist/exports/react/index.d.ts +1 -1
- package/dist/exports/react/index.d.ts.map +1 -1
- package/dist/exports/react/index.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +2 -2
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +2 -2
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts +2 -14
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +4 -9
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts +16 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js +87 -5
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts +14 -10
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +37 -21
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RichTextViewProvider.d.ts +83 -0
- package/dist/field/RichTextViewProvider.d.ts.map +1 -0
- package/dist/field/RichTextViewProvider.js +102 -0
- package/dist/field/RichTextViewProvider.js.map +1 -0
- package/dist/field/ViewSelector.d.ts +4 -0
- package/dist/field/ViewSelector.d.ts.map +1 -0
- package/dist/field/ViewSelector.js +90 -0
- package/dist/field/ViewSelector.js.map +1 -0
- package/dist/field/ViewSelector.scss +34 -0
- package/dist/field/index.d.ts +1 -0
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +41 -16
- package/dist/field/index.js.map +1 -1
- package/dist/field/index.scss +12 -0
- package/dist/field/rscEntry.d.ts +1 -1
- package/dist/field/rscEntry.d.ts.map +1 -1
- package/dist/field/rscEntry.js +13 -1
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +34 -28
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js +19 -11
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js +3 -2
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +4 -0
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js +3 -1
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.d.ts +12 -2
- package/dist/lexical/nodes/index.d.ts.map +1 -1
- package/dist/lexical/nodes/index.js +187 -2
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts +2 -0
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +31 -0
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -0
- package/dist/lexical/utils/point.js.map +1 -1
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/types.d.ts +152 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +55 -0
- package/dist/types.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +2 -2
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js +1 -0
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/validate/hasText.d.ts +6 -1
- package/dist/validate/hasText.d.ts.map +1 -1
- package/dist/validate/hasText.js +10 -4
- package/dist/validate/hasText.js.map +1 -1
- package/package.json +13 -8
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { GenericLanguages, GenericTranslationsObject } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n checkDependencies,\n deepMergeSimple,\n type RichTextAdapter,\n withNullableJSONSchemaType,\n} from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from './lexical/config/types.js'\nimport type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapterProvider } from './types.js'\n\nimport { i18n } from './i18n.js'\nimport { defaultEditorFeatures } from './lexical/config/server/default.js'\nimport { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js'\nimport { featuresInputToEditorConfig } from './utilities/editorConfigFactory.js'\nimport { getGenerateImportMap } from './utilities/generateImportMap.js'\nimport { getGenerateSchemaMap } from './utilities/generateSchemaMap.js'\nimport { getDefaultSanitizedEditorConfig } from './utilities/getDefaultSanitizedEditorConfig.js'\nimport { recurseNodeTree } from './utilities/recurseNodeTree.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet checkedDependencies = false\n\nexport const lexicalTargetVersion = '0.35.0'\n\nexport function lexicalEditor(args?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&\n !checkedDependencies\n ) {\n checkedDependencies = true\n void checkDependencies({\n dependencyGroups: [\n {\n name: 'lexical',\n dependencies: [\n 'lexical',\n '@lexical/headless',\n '@lexical/link',\n '@lexical/list',\n '@lexical/mark',\n '@lexical/react',\n '@lexical/rich-text',\n '@lexical/selection',\n '@lexical/utils',\n ],\n targetVersion: lexicalTargetVersion,\n },\n ],\n })\n }\n return async ({ config, isRoot, parentIsLocalized }) => {\n let features: FeatureProviderServer<unknown, unknown, unknown>[] = []\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!args || (!args.features && !args.lexical)) {\n finalSanitizedEditorConfig = await getDefaultSanitizedEditorConfig({\n config,\n parentIsLocalized,\n })\n\n features = defaultEditorFeatures\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n const result = await featuresInputToEditorConfig({\n config,\n features: args?.features,\n isRoot,\n lexical: args?.lexical,\n parentIsLocalized,\n })\n finalSanitizedEditorConfig = result.sanitizedConfig\n features = result.features\n resolvedFeatureMap = result.resolvedFeatureMap\n }\n\n const featureI18n: Partial<GenericLanguages> = finalSanitizedEditorConfig.features.i18n\n for (const _lang in i18n) {\n const lang = _lang as keyof typeof i18n\n const lexicalI18nForLang = ((featureI18n[lang] ??= {}).lexical ??=\n {}) as GenericTranslationsObject\n\n lexicalI18nForLang.general = i18n[lang] ?? {}\n }\n\n config.i18n.translations = deepMergeSimple(config.i18n.translations, featureI18n)\n\n return {\n CellComponent: '@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell',\n DiffComponent: '@payloadcms/richtext-lexical/rsc#LexicalDiffComponent',\n editorConfig: finalSanitizedEditorConfig,\n features,\n FieldComponent: {\n path: '@payloadcms/richtext-lexical/rsc#RscEntryLexicalField',\n serverProps: {\n admin: args?.admin,\n // SanitizedEditorConfig is manually passed by `renderField` in `fieldSchemasToFormState/renderField.tsx`\n // in order to reduce the size of the field schema\n },\n },\n generateImportMap: getGenerateImportMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n parentIsLocalized,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.graphQLPopulationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth: currentDepth ?? 0,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.graphQLPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n parentIsLocalized,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterChange: [\n async (args) => {\n const {\n collection,\n context: _context,\n data,\n field,\n global,\n indexPath,\n operation,\n originalDoc,\n parentIsLocalized,\n path,\n previousDoc,\n previousValue,\n req,\n schemaPath,\n } = args\n\n let { value } = args\n if (finalSanitizedEditorConfig?.features?.hooks?.afterChange?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.afterChange) {\n value = await hook(args)\n }\n }\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.afterChange?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n // TO-DO: We should not use context, as it is intended for external use only\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n recurseNodeTree({\n nodeIDMap: previousNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const afterChangeHooks = finalSanitizedEditorConfig.features.nodeHooks?.afterChange\n const afterChangeHooksForNode = afterChangeHooks?.get(node.type)\n if (afterChangeHooksForNode) {\n for (const hook of afterChangeHooksForNode) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(afterChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n\n previousNode: previousNodeIDMap[id]!,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n\n const nodeSiblingDoc = subFieldDataFn({ node: originalNodeIDMap[id]!, req }) ?? {}\n const nodePreviousSiblingDoc =\n subFieldDataFn({ node: previousNodeIDMap[id]!, req }) ?? {}\n\n if (subFields?.length) {\n await afterChangeTraverseFields({\n blockData: nodeSiblingData,\n collection,\n context,\n data: data ?? {},\n doc: originalDoc,\n fields: subFields,\n global,\n operation,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n previousDoc,\n previousSiblingDoc: { ...nodePreviousSiblingDoc },\n req,\n siblingData: nodeSiblingData || {},\n siblingDoc: { ...nodeSiblingDoc },\n })\n }\n }\n }\n return value\n },\n ],\n afterRead: [\n /**\n * afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.\n */\n async (args) => {\n const {\n collection,\n context: context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n global,\n indexPath,\n locale,\n originalDoc,\n overrideAccess,\n parentIsLocalized,\n path,\n populate,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n } = args\n\n let { value } = args\n\n if (finalSanitizedEditorConfig?.features?.hooks?.afterRead?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.afterRead) {\n value = await hook(args)\n }\n }\n\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.afterRead?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n const flattenedNodes: SerializedLexicalNode[] = []\n\n recurseNodeTree({\n flattenedNodes,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n for (let node of flattenedNodes) {\n const afterReadHooks = finalSanitizedEditorConfig.features.nodeHooks?.afterRead\n const afterReadHooksForNode = afterReadHooks?.get(node.type)\n if (afterReadHooksForNode) {\n for (const hook of afterReadHooksForNode) {\n node = await hook({\n context,\n currentDepth: currentDepth!,\n depth: depth!,\n draft: draft!,\n fallbackLocale: fallbackLocale!,\n fieldPromises: fieldPromises!,\n findMany: findMany!,\n flattenLocales: flattenLocales!,\n locale: locale!,\n node,\n overrideAccess: overrideAccess!,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n populateArg: populate,\n populationPromises: populationPromises!,\n req,\n showHiddenFields: showHiddenFields!,\n triggerAccessControl: triggerAccessControl!,\n triggerHooks: triggerHooks!,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n\n if (subFields?.length) {\n afterReadTraverseFields({\n blockData: nodeSiblingData,\n collection,\n context,\n currentDepth: currentDepth!,\n depth: depth!,\n doc: originalDoc,\n draft: draft!,\n fallbackLocale: fallbackLocale!,\n fieldPromises: fieldPromises!,\n fields: subFields,\n findMany: findMany!,\n flattenLocales: flattenLocales!,\n global,\n locale: locale!,\n overrideAccess: overrideAccess!,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n populate,\n populationPromises: populationPromises!,\n req,\n showHiddenFields: showHiddenFields!,\n siblingDoc: nodeSiblingData,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n }\n\n return value\n },\n ],\n beforeChange: [\n async (args) => {\n const {\n collection,\n context: _context,\n data,\n docWithLocales,\n errors,\n field,\n fieldLabelPath,\n global,\n indexPath,\n mergeLocaleActions,\n operation,\n originalDoc,\n overrideAccess,\n parentIsLocalized,\n path,\n previousValue,\n req,\n schemaPath,\n siblingData,\n siblingDocWithLocales,\n skipValidation,\n } = args\n\n let { value } = args\n\n if (finalSanitizedEditorConfig?.features?.hooks?.beforeChange?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.beforeChange) {\n value = await hook(args)\n }\n }\n\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.beforeChange?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n\n // TO-DO: We should not use context, as it is intended for external use only\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n const previousNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const originalNodeWithLocalesIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n recurseNodeTree({\n nodeIDMap: previousNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n if (field.name && siblingDocWithLocales?.[field.name]) {\n recurseNodeTree({\n nodeIDMap: originalNodeWithLocalesIDMap,\n nodes:\n (siblingDocWithLocales[field.name] as SerializedEditorState)?.root?.children ??\n [],\n })\n }\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.nodeHooks?.beforeChange\n const beforeChangeHooksForNode = beforeChangeHooks?.get(node.type)\n if (beforeChangeHooksForNode) {\n for (const hook of beforeChangeHooksForNode) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n errors: errors!,\n mergeLocaleActions: mergeLocaleActions!,\n node,\n operation: operation!,\n originalNode: originalNodeIDMap[id],\n originalNodeWithLocales: originalNodeWithLocalesIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n previousNode: previousNodeIDMap[id]!,\n req,\n skipValidation: skipValidation!,\n })\n }\n }\n\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n const nodeSiblingDocWithLocales =\n subFieldDataFn({\n node: originalNodeWithLocalesIDMap[id]!,\n req,\n }) ?? {}\n const nodePreviousSiblingDoc =\n subFieldDataFn({ node: previousNodeIDMap[id]!, req }) ?? {}\n\n if (subFields?.length) {\n await beforeChangeTraverseFields({\n id,\n blockData: nodeSiblingData,\n collection,\n context,\n data: data ?? {},\n doc: originalDoc ?? {},\n docWithLocales: docWithLocales ?? {},\n errors: errors!,\n fieldLabelPath,\n fields: subFields,\n global,\n mergeLocaleActions: mergeLocaleActions!,\n operation: operation!,\n overrideAccess,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n req,\n siblingData: nodeSiblingData,\n siblingDoc: nodePreviousSiblingDoc,\n siblingDocWithLocales: nodeSiblingDocWithLocales ?? {},\n skipValidation,\n })\n }\n }\n }\n\n /**\n * within the beforeChange hook, id's may be re-generated.\n * Example:\n * 1. Seed data contains IDs for block feature blocks.\n * 2. Those are used in beforeValidate\n * 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning\n * 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.\n * The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,\n * and in beforeChange, which is where modifications to the provided IDs can occur.\n */\n const newOriginalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousOriginalValue = siblingData[field.name!]\n\n recurseNodeTree({\n nodeIDMap: newOriginalNodeIDMap,\n nodes: (previousOriginalValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!context.internal.richText) {\n context.internal.richText = {}\n }\n context.internal.richText[path.join('.')] = {\n originalNodeIDMap: newOriginalNodeIDMap,\n }\n\n return value\n },\n ],\n beforeValidate: [\n async (args) => {\n const {\n collection,\n context,\n data,\n field,\n global,\n indexPath,\n operation,\n originalDoc,\n overrideAccess,\n parentIsLocalized,\n path,\n previousValue,\n req,\n schemaPath,\n } = args\n\n let { value } = args\n if (finalSanitizedEditorConfig?.features?.hooks?.beforeValidate?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.beforeValidate) {\n value = await hook(args)\n }\n }\n\n // return value if there are NO hooks\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.beforeValidate?.size &&\n !finalSanitizedEditorConfig.features.nodeHooks?.afterChange?.size &&\n !finalSanitizedEditorConfig.features.nodeHooks?.beforeChange?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n\n /**\n * beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.\n *\n */\n\n /**\n * flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:\n * - afterRead\n *\n * The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and\n * thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with\n * an ID.\n */\n //const flattenedNodes: SerializedLexicalNode[] = []\n\n /**\n * Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:\n * - afterChange\n * - beforeChange\n * - beforeValidate\n *\n * Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.\n */\n\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap: originalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!(context as any).internal.richText) {\n ;(context as any).internal.richText = {}\n }\n ;(context as any).internal.richText[path.join('.')] = {\n originalNodeIDMap,\n }\n\n /**\n * Now that the maps for all hooks are set up, we can run the validate hook\n */\n if (!finalSanitizedEditorConfig.features.nodeHooks?.beforeValidate?.size) {\n return value\n }\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n recurseNodeTree({\n //flattenedNodes,\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeValidateHooks =\n finalSanitizedEditorConfig.features.nodeHooks.beforeValidate\n const beforeValidateHooksForNode = beforeValidateHooks?.get(node.type)\n if (beforeValidateHooksForNode) {\n for (const hook of beforeValidateHooksForNode) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeValidate) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n overrideAccess: overrideAccess!,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n\n const nodeSiblingDoc = subFieldDataFn({ node: originalNodeIDMap[id]!, req }) ?? {}\n\n if (subFields?.length) {\n await beforeValidateTraverseFields({\n id,\n blockData: nodeSiblingData,\n collection,\n context,\n data,\n doc: originalDoc,\n fields: subFields,\n global,\n operation,\n overrideAccess: overrideAccess!,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n req,\n siblingData: nodeSiblingData,\n siblingDoc: nodeSiblingDoc,\n })\n }\n }\n }\n\n return value\n },\n ],\n },\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n i18n,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n tsType: 'any',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n i18n,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './features/align/server/index.js'\nexport { BlockquoteFeature } from './features/blockquote/server/index.js'\nexport { CodeBlock } from './features/blocks/premade/CodeBlock/index.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './features/blocks/server/index.js'\nexport {\n $createServerBlockNode,\n $isServerBlockNode,\n type BlockFields,\n ServerBlockNode,\n} from './features/blocks/server/nodes/BlocksNode.js'\n\nexport {\n $createServerInlineBlockNode,\n $isServerInlineBlockNode,\n type InlineBlockFields,\n ServerInlineBlockNode,\n} from './features/blocks/server/nodes/InlineBlocksNode.js'\n\nexport { convertHTMLToLexical } from './features/converters/htmlToLexical/index.js'\n\nexport { lexicalHTMLField } from './features/converters/lexicalToHtml/async/field/index.js'\nexport { LinebreakHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js'\n\nexport { ParagraphHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js'\n\nexport { TabHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/tab.js'\nexport { TextHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/text.js'\nexport { defaultHTMLConverters } from './features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js'\n\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './features/converters/lexicalToHtml_deprecated/converter/index.js'\nexport type { HTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/types.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './features/converters/lexicalToHtml_deprecated/field/index.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './features/converters/lexicalToHtml_deprecated/index.js'\nexport { convertLexicalToMarkdown } from './features/converters/lexicalToMarkdown/index.js'\nexport { convertMarkdownToLexical } from './features/converters/markdownToLexical/index.js'\nexport { getPayloadPopulateFn } from './features/converters/utilities/payloadPopulateFn.js'\n\nexport { getRestPopulateFn } from './features/converters/utilities/restPopulateFn.js'\nexport { DebugJsxConverterFeature } from './features/debug/jsxConverter/server/index.js'\nexport { TestRecorderFeature } from './features/debug/testRecorder/server/index.js'\nexport { TreeViewFeature } from './features/debug/treeView/server/index.js'\nexport { EXPERIMENTAL_TableFeature } from './features/experimental_table/server/index.js'\nexport { BoldFeature } from './features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './features/format/italic/feature.server.js'\nexport { StrikethroughFeature } from './features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './features/format/underline/feature.server.js'\nexport { HeadingFeature, type HeadingFeatureProps } from './features/heading/server/index.js'\nexport { HorizontalRuleFeature } from './features/horizontalRule/server/index.js'\n\nexport { IndentFeature } from './features/indent/server/index.js'\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './features/link/nodes/AutoLinkNode.js'\nexport { $createLinkNode, $isLinkNode, LinkNode } from './features/link/nodes/LinkNode.js'\n\nexport type { LinkFields } from './features/link/nodes/types.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './features/link/server/index.js'\n\nexport { ChecklistFeature } from './features/lists/checklist/server/index.js'\nexport { OrderedListFeature } from './features/lists/orderedList/server/index.js'\n\nexport { UnorderedListFeature } from './features/lists/unorderedList/server/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './features/migrations/slateToLexical/converter/types.js'\nexport { ParagraphFeature } from './features/paragraph/server/index.js'\n\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './features/relationship/server/index.js'\n\nexport {\n type RelationshipData,\n RelationshipServerNode,\n} from './features/relationship/server/nodes/RelationshipNode.js'\nexport { defaultColors } from './features/textState/defaultColors.js'\nexport { TextStateFeature } from './features/textState/feature.server.js'\n\nexport { FixedToolbarFeature } from './features/toolbars/fixed/server/index.js'\n\nexport { InlineToolbarFeature } from './features/toolbars/inline/server/index.js'\nexport type { ToolbarGroup, ToolbarGroupItem } from './features/toolbars/types.js'\nexport type {\n BaseClientFeatureProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n PluginComponent,\n PluginComponentWithAnchor,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n} from './features/typesClient.js'\n\nexport type {\n AfterChangeNodeHook,\n AfterChangeNodeHookArgs,\n AfterReadNodeHook,\n AfterReadNodeHookArgs,\n BaseNodeHookArgs,\n BeforeChangeNodeHook,\n BeforeChangeNodeHookArgs,\n BeforeValidateNodeHook,\n BeforeValidateNodeHookArgs,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n NodeWithHooks,\n PopulationPromise,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './features/typesServer.js'\n\nexport { createNode } from './features/typeUtilities.js' // Only useful in feature.server.ts\n\nexport { UploadFeature } from './features/upload/server/index.js'\nexport type { UploadFeatureProps } from './features/upload/server/index.js'\n\nexport { type UploadData, UploadServerNode } from './features/upload/server/nodes/UploadNode.js'\nexport type { EditorConfigContextType } from './lexical/config/client/EditorConfigProvider.js'\n\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './lexical/config/server/default.js'\nexport { loadFeatures, sortFeaturesForOptimalLoading } from './lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './lexical/config/types.js'\nexport type { AdapterProps }\n\nexport { getEnabledNodes, getEnabledNodesFromServerNodes } from './lexical/nodes/index.js'\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NodeFormat,\n NON_BREAKING_SPACE,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './lexical/utils/nodeFormat.js'\n\nexport { sanitizeUrl, validateUrl } from './lexical/utils/url.js'\n\nexport type * from './nodeTypes.js'\n\nexport { $convertFromMarkdownString } from './packages/@lexical/markdown/index.js'\nexport { defaultRichTextValue } from './populateGraphQL/defaultValue.js'\nexport { populate } from './populateGraphQL/populate.js'\n\nexport type { LexicalEditorProps, LexicalFieldAdminProps, LexicalRichTextAdapter } from './types.js'\n\nexport { buildDefaultEditorState, buildEditorState } from './utilities/buildEditorState.js'\nexport { createServerFeature } from './utilities/createServerFeature.js'\n\nexport { editorConfigFactory } from './utilities/editorConfigFactory.js'\nexport type { FieldsDrawerProps } from './utilities/fieldsDrawer/Drawer.js'\n\nexport { extractPropsFromJSXPropsString } from './utilities/jsx/extractPropsFromJSXPropsString.js'\n\nexport {\n extractFrontmatter,\n frontmatterToObject,\n objectToFrontmatter,\n propsToJSXString,\n} from './utilities/jsx/jsx.js'\nexport { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js'\n"],"names":["afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","checkDependencies","deepMergeSimple","withNullableJSONSchemaType","i18n","defaultEditorFeatures","populateLexicalPopulationPromises","featuresInputToEditorConfig","getGenerateImportMap","getGenerateSchemaMap","getDefaultSanitizedEditorConfig","recurseNodeTree","richTextValidateHOC","checkedDependencies","lexicalTargetVersion","lexicalEditor","args","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","dependencyGroups","name","dependencies","targetVersion","config","isRoot","parentIsLocalized","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","result","sanitizedConfig","featureI18n","_lang","lang","lexicalI18nForLang","general","translations","CellComponent","DiffComponent","editorConfig","FieldComponent","path","serverProps","admin","generateImportMap","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","hooks","afterChange","collection","_context","data","global","indexPath","operation","originalDoc","previousDoc","previousValue","schemaPath","value","length","hook","nodeHooks","getSubFields","nodeIDMap","previousNodeIDMap","originalNodeIDMap","internal","richText","join","Object","keys","nodes","root","children","id","node","entries","afterChangeHooks","afterChangeHooksForNode","get","type","console","warn","originalNode","parentRichTextFieldPath","parentRichTextFieldSchemaPath","previousNode","subFieldFn","subFieldDataFn","getSubFieldsData","subFields","nodeSiblingData","nodeSiblingDoc","nodePreviousSiblingDoc","blockData","doc","fields","parentIndexPath","localized","parentPath","parentSchemaPath","previousSiblingDoc","siblingData","afterRead","fallbackLocale","locale","populate","triggerAccessControl","triggerHooks","flattenedNodes","afterReadHooks","afterReadHooksForNode","populateArg","beforeChange","docWithLocales","errors","fieldLabelPath","mergeLocaleActions","siblingDocWithLocales","skipValidation","originalNodeWithLocalesIDMap","beforeChangeHooks","beforeChangeHooksForNode","originalNodeWithLocales","nodeSiblingDocWithLocales","newOriginalNodeIDMap","previousOriginalValue","beforeValidate","beforeValidateHooks","beforeValidateHooksForNode","outputSchema","collectionIDFieldTypes","interfaceNameDefinitions","isRequired","properties","additionalProperties","items","tsType","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","validate","AlignFeature","BlockquoteFeature","CodeBlock","BlocksFeature","$createServerBlockNode","$isServerBlockNode","ServerBlockNode","$createServerInlineBlockNode","$isServerInlineBlockNode","ServerInlineBlockNode","convertHTMLToLexical","lexicalHTMLField","LinebreakHTMLConverter","ParagraphHTMLConverter","TabHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","consolidateHTMLConverters","lexicalHTML","HTMLConverterFeature","convertLexicalToMarkdown","convertMarkdownToLexical","getPayloadPopulateFn","getRestPopulateFn","DebugJsxConverterFeature","TestRecorderFeature","TreeViewFeature","EXPERIMENTAL_TableFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","LinkFeature","ChecklistFeature","OrderedListFeature","UnorderedListFeature","ParagraphFeature","RelationshipFeature","RelationshipServerNode","defaultColors","TextStateFeature","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","UploadServerNode","defaultEditorConfig","defaultEditorLexicalConfig","loadFeatures","sortFeaturesForOptimalLoading","sanitizeServerEditorConfig","sanitizeServerFeatures","getEnabledNodes","getEnabledNodesFromServerNodes","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NodeFormat","NON_BREAKING_SPACE","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","sanitizeUrl","validateUrl","$convertFromMarkdownString","defaultRichTextValue","buildDefaultEditorState","buildEditorState","createServerFeature","editorConfigFactory","extractPropsFromJSXPropsString","extractFrontmatter","frontmatterToObject","objectToFrontmatter","propsToJSXString","upgrade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C;AACrE,SAASC,gBAAgB,QAAQ,yCAAwC;AAEzE,SAASC,mBAAmB,QAAQ,4CAA2C;AAE/E,SAASC,oBAAoB,QAAQ,6CAA4C;AAsCjF,SAASC,UAAU,QAAQ,8BAA6B;AAAC,mCAAmC;AAE5F,SAASC,aAAa,QAAQ,oCAAmC;AAGjE,SAA0BC,gBAAgB,QAAQ,+CAA8C;AAGhG,SACEC,mBAAmB,EACnBhO,qBAAqB,EACrBiO,0BAA0B,QACrB,qCAAoC;AAC3C,SAASC,YAAY,EAAEC,6BAA6B,QAAQ,oCAAmC;AAE/F,SACEC,0BAA0B,EAC1BC,sBAAsB,QACjB,sCAAqC;AAS5C,SAASC,eAAe,EAAEC,8BAA8B,QAAQ,2BAA0B;AAM1F,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,UAAU,EACVC,kBAAkB,EAClBC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ,gCAA+B;AAEtC,SAASC,WAAW,EAAEC,WAAW,QAAQ,yBAAwB;AAIjE,SAASC,0BAA0B,QAAQ,wCAAuC;AAClF,SAASC,oBAAoB,QAAQ,oCAAmC;AACxE,SAAS/H,QAAQ,QAAQ,gCAA+B;AAIxD,SAASgI,uBAAuB,EAAEC,gBAAgB,QAAQ,kCAAiC;AAC3F,SAASC,mBAAmB,QAAQ,qCAAoC;AAExE,SAASC,mBAAmB,QAAQ,qCAAoC;AAGxE,SAASC,8BAA8B,QAAQ,oDAAmD;AAElG,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,mBAAmB,EACnBC,gBAAgB,QACX,yBAAwB;AAC/B,SAASC,kBAAkB,QAAQ,0CAAyC"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { GenericLanguages, GenericTranslationsObject } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n checkDependencies,\n deepMergeSimple,\n withNullableJSONSchemaType,\n} from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from './lexical/config/types.js'\nimport type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapterProvider } from './types.js'\n\nimport { i18n } from './i18n.js'\nimport { defaultEditorFeatures } from './lexical/config/server/default.js'\nimport { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js'\nimport { featuresInputToEditorConfig } from './utilities/editorConfigFactory.js'\nimport { getGenerateImportMap } from './utilities/generateImportMap.js'\nimport { getGenerateSchemaMap } from './utilities/generateSchemaMap.js'\nimport { getDefaultSanitizedEditorConfig } from './utilities/getDefaultSanitizedEditorConfig.js'\nimport { recurseNodeTree } from './utilities/recurseNodeTree.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet checkedDependencies = false\n\nexport const lexicalTargetVersion = '0.35.0'\n\nexport function lexicalEditor(args?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&\n !checkedDependencies\n ) {\n checkedDependencies = true\n void checkDependencies({\n dependencyGroups: [\n {\n name: 'lexical',\n dependencies: [\n 'lexical',\n '@lexical/headless',\n '@lexical/link',\n '@lexical/list',\n '@lexical/mark',\n '@lexical/react',\n '@lexical/rich-text',\n '@lexical/selection',\n '@lexical/utils',\n ],\n targetVersion: lexicalTargetVersion,\n },\n ],\n })\n }\n return async ({ config, isRoot, parentIsLocalized }) => {\n let features: FeatureProviderServer<unknown, unknown, unknown>[] = []\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!args || (!args.features && !args.lexical)) {\n finalSanitizedEditorConfig = await getDefaultSanitizedEditorConfig({\n config,\n parentIsLocalized,\n })\n\n features = defaultEditorFeatures\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n const result = await featuresInputToEditorConfig({\n config,\n features: args?.features,\n isRoot,\n lexical: args?.lexical,\n parentIsLocalized,\n })\n finalSanitizedEditorConfig = result.sanitizedConfig\n features = result.features\n resolvedFeatureMap = result.resolvedFeatureMap\n }\n\n const featureI18n: Partial<GenericLanguages> = finalSanitizedEditorConfig.features.i18n\n for (const _lang in i18n) {\n const lang = _lang as keyof typeof i18n\n const lexicalI18nForLang = ((featureI18n[lang] ??= {}).lexical ??=\n {}) as GenericTranslationsObject\n\n lexicalI18nForLang.general = i18n[lang] ?? {}\n }\n\n config.i18n.translations = deepMergeSimple(config.i18n.translations, featureI18n)\n\n return {\n CellComponent: '@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell',\n DiffComponent: '@payloadcms/richtext-lexical/rsc#LexicalDiffComponent',\n editorConfig: finalSanitizedEditorConfig,\n features,\n FieldComponent: {\n path: '@payloadcms/richtext-lexical/rsc#RscEntryLexicalField',\n serverProps: {\n admin: args?.admin,\n views: args?.views,\n // SanitizedEditorConfig is manually passed by `renderField` in `fieldSchemasToFormState/renderField.tsx`\n // in order to reduce the size of the field schema\n },\n },\n generateImportMap: getGenerateImportMap({\n lexicalEditorArgs: args,\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n parentIsLocalized,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.graphQLPopulationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth: currentDepth ?? 0,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.graphQLPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n parentIsLocalized,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterChange: [\n async (args) => {\n const {\n collection,\n context: _context,\n data,\n field,\n global,\n indexPath,\n operation,\n originalDoc,\n parentIsLocalized,\n path,\n previousDoc,\n previousValue,\n req,\n schemaPath,\n } = args\n\n let { value } = args\n if (finalSanitizedEditorConfig?.features?.hooks?.afterChange?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.afterChange) {\n value = await hook(args)\n }\n }\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.afterChange?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n // TO-DO: We should not use context, as it is intended for external use only\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n recurseNodeTree({\n nodeIDMap: previousNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const afterChangeHooks = finalSanitizedEditorConfig.features.nodeHooks?.afterChange\n const afterChangeHooksForNode = afterChangeHooks?.get(node.type)\n if (afterChangeHooksForNode) {\n for (const hook of afterChangeHooksForNode) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(afterChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n\n previousNode: previousNodeIDMap[id]!,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n\n const nodeSiblingDoc = subFieldDataFn({ node: originalNodeIDMap[id]!, req }) ?? {}\n const nodePreviousSiblingDoc =\n subFieldDataFn({ node: previousNodeIDMap[id]!, req }) ?? {}\n\n if (subFields?.length) {\n await afterChangeTraverseFields({\n blockData: nodeSiblingData,\n collection,\n context,\n data: data ?? {},\n doc: originalDoc,\n fields: subFields,\n global,\n operation,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n previousDoc,\n previousSiblingDoc: { ...nodePreviousSiblingDoc },\n req,\n siblingData: nodeSiblingData || {},\n siblingDoc: { ...nodeSiblingDoc },\n })\n }\n }\n }\n return value\n },\n ],\n afterRead: [\n /**\n * afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.\n */\n async (args) => {\n const {\n collection,\n context: context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n global,\n indexPath,\n locale,\n originalDoc,\n overrideAccess,\n parentIsLocalized,\n path,\n populate,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n } = args\n\n let { value } = args\n\n if (finalSanitizedEditorConfig?.features?.hooks?.afterRead?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.afterRead) {\n value = await hook(args)\n }\n }\n\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.afterRead?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n const flattenedNodes: SerializedLexicalNode[] = []\n\n recurseNodeTree({\n flattenedNodes,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n for (let node of flattenedNodes) {\n const afterReadHooks = finalSanitizedEditorConfig.features.nodeHooks?.afterRead\n const afterReadHooksForNode = afterReadHooks?.get(node.type)\n if (afterReadHooksForNode) {\n for (const hook of afterReadHooksForNode) {\n node = await hook({\n context,\n currentDepth: currentDepth!,\n depth: depth!,\n draft: draft!,\n fallbackLocale: fallbackLocale!,\n fieldPromises: fieldPromises!,\n findMany: findMany!,\n flattenLocales: flattenLocales!,\n locale: locale!,\n node,\n overrideAccess: overrideAccess!,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n populateArg: populate,\n populationPromises: populationPromises!,\n req,\n showHiddenFields: showHiddenFields!,\n triggerAccessControl: triggerAccessControl!,\n triggerHooks: triggerHooks!,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n\n if (subFields?.length) {\n afterReadTraverseFields({\n blockData: nodeSiblingData,\n collection,\n context,\n currentDepth: currentDepth!,\n depth: depth!,\n doc: originalDoc,\n draft: draft!,\n fallbackLocale: fallbackLocale!,\n fieldPromises: fieldPromises!,\n fields: subFields,\n findMany: findMany!,\n flattenLocales: flattenLocales!,\n global,\n locale: locale!,\n overrideAccess: overrideAccess!,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n populate,\n populationPromises: populationPromises!,\n req,\n showHiddenFields: showHiddenFields!,\n siblingDoc: nodeSiblingData,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n }\n\n return value\n },\n ],\n beforeChange: [\n async (args) => {\n const {\n collection,\n context: _context,\n data,\n docWithLocales,\n errors,\n field,\n fieldLabelPath,\n global,\n indexPath,\n mergeLocaleActions,\n operation,\n originalDoc,\n overrideAccess,\n parentIsLocalized,\n path,\n previousValue,\n req,\n schemaPath,\n siblingData,\n siblingDocWithLocales,\n skipValidation,\n } = args\n\n let { value } = args\n\n if (finalSanitizedEditorConfig?.features?.hooks?.beforeChange?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.beforeChange) {\n value = await hook(args)\n }\n }\n\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.beforeChange?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n\n // TO-DO: We should not use context, as it is intended for external use only\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n const previousNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const originalNodeWithLocalesIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n recurseNodeTree({\n nodeIDMap: previousNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n if (field.name && siblingDocWithLocales?.[field.name]) {\n recurseNodeTree({\n nodeIDMap: originalNodeWithLocalesIDMap,\n nodes:\n (siblingDocWithLocales[field.name] as SerializedEditorState)?.root?.children ??\n [],\n })\n }\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.nodeHooks?.beforeChange\n const beforeChangeHooksForNode = beforeChangeHooks?.get(node.type)\n if (beforeChangeHooksForNode) {\n for (const hook of beforeChangeHooksForNode) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n errors: errors!,\n mergeLocaleActions: mergeLocaleActions!,\n node,\n operation: operation!,\n originalNode: originalNodeIDMap[id],\n originalNodeWithLocales: originalNodeWithLocalesIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n previousNode: previousNodeIDMap[id]!,\n req,\n skipValidation: skipValidation!,\n })\n }\n }\n\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n const nodeSiblingDocWithLocales =\n subFieldDataFn({\n node: originalNodeWithLocalesIDMap[id]!,\n req,\n }) ?? {}\n const nodePreviousSiblingDoc =\n subFieldDataFn({ node: previousNodeIDMap[id]!, req }) ?? {}\n\n if (subFields?.length) {\n await beforeChangeTraverseFields({\n id,\n blockData: nodeSiblingData,\n collection,\n context,\n data: data ?? {},\n doc: originalDoc ?? {},\n docWithLocales: docWithLocales ?? {},\n errors: errors!,\n fieldLabelPath,\n fields: subFields,\n global,\n mergeLocaleActions: mergeLocaleActions!,\n operation: operation!,\n overrideAccess,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n req,\n siblingData: nodeSiblingData,\n siblingDoc: nodePreviousSiblingDoc,\n siblingDocWithLocales: nodeSiblingDocWithLocales ?? {},\n skipValidation,\n })\n }\n }\n }\n\n /**\n * within the beforeChange hook, id's may be re-generated.\n * Example:\n * 1. Seed data contains IDs for block feature blocks.\n * 2. Those are used in beforeValidate\n * 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning\n * 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.\n * The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,\n * and in beforeChange, which is where modifications to the provided IDs can occur.\n */\n const newOriginalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousOriginalValue = siblingData[field.name!]\n\n recurseNodeTree({\n nodeIDMap: newOriginalNodeIDMap,\n nodes: (previousOriginalValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!context.internal.richText) {\n context.internal.richText = {}\n }\n context.internal.richText[path.join('.')] = {\n originalNodeIDMap: newOriginalNodeIDMap,\n }\n\n return value\n },\n ],\n beforeValidate: [\n async (args) => {\n const {\n collection,\n context,\n data,\n field,\n global,\n indexPath,\n operation,\n originalDoc,\n overrideAccess,\n parentIsLocalized,\n path,\n previousValue,\n req,\n schemaPath,\n } = args\n\n let { value } = args\n if (finalSanitizedEditorConfig?.features?.hooks?.beforeValidate?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.beforeValidate) {\n value = await hook(args)\n }\n }\n\n // return value if there are NO hooks\n if (\n !finalSanitizedEditorConfig.features.nodeHooks?.beforeValidate?.size &&\n !finalSanitizedEditorConfig.features.nodeHooks?.afterChange?.size &&\n !finalSanitizedEditorConfig.features.nodeHooks?.beforeChange?.size &&\n !finalSanitizedEditorConfig.features.getSubFields?.size\n ) {\n return value\n }\n\n /**\n * beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.\n *\n */\n\n /**\n * flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:\n * - afterRead\n *\n * The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and\n * thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with\n * an ID.\n */\n //const flattenedNodes: SerializedLexicalNode[] = []\n\n /**\n * Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:\n * - afterChange\n * - beforeChange\n * - beforeValidate\n *\n * Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.\n */\n\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap: originalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!(context as any).internal.richText) {\n ;(context as any).internal.richText = {}\n }\n ;(context as any).internal.richText[path.join('.')] = {\n originalNodeIDMap,\n }\n\n /**\n * Now that the maps for all hooks are set up, we can run the validate hook\n */\n if (!finalSanitizedEditorConfig.features.nodeHooks?.beforeValidate?.size) {\n return value\n }\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n recurseNodeTree({\n //flattenedNodes,\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeValidateHooks =\n finalSanitizedEditorConfig.features.nodeHooks.beforeValidate\n const beforeValidateHooksForNode = beforeValidateHooks?.get(node.type)\n if (beforeValidateHooksForNode) {\n for (const hook of beforeValidateHooksForNode) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeValidate) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n overrideAccess: overrideAccess!,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(\n node.type,\n )\n\n if (subFieldFn && subFieldDataFn) {\n const subFields = subFieldFn({ node, req })\n const nodeSiblingData = subFieldDataFn({ node, req }) ?? {}\n\n const nodeSiblingDoc = subFieldDataFn({ node: originalNodeIDMap[id]!, req }) ?? {}\n\n if (subFields?.length) {\n await beforeValidateTraverseFields({\n id,\n blockData: nodeSiblingData,\n collection,\n context,\n data,\n doc: originalDoc,\n fields: subFields,\n global,\n operation,\n overrideAccess: overrideAccess!,\n parentIndexPath: indexPath.join('-'),\n parentIsLocalized: parentIsLocalized || field.localized || false,\n parentPath: path.join('.'),\n parentSchemaPath: schemaPath.join('.'),\n req,\n siblingData: nodeSiblingData,\n siblingDoc: nodeSiblingDoc,\n })\n }\n }\n }\n\n return value\n },\n ],\n },\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n i18n,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n tsType: 'any',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n i18n,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './features/align/server/index.js'\nexport { BlockquoteFeature } from './features/blockquote/server/index.js'\nexport { CodeBlock } from './features/blocks/premade/CodeBlock/index.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './features/blocks/server/index.js'\nexport {\n $createServerBlockNode,\n $isServerBlockNode,\n type BlockFields,\n ServerBlockNode,\n} from './features/blocks/server/nodes/BlocksNode.js'\n\nexport {\n $createServerInlineBlockNode,\n $isServerInlineBlockNode,\n type InlineBlockFields,\n ServerInlineBlockNode,\n} from './features/blocks/server/nodes/InlineBlocksNode.js'\n\nexport { convertHTMLToLexical } from './features/converters/htmlToLexical/index.js'\n\nexport { lexicalHTMLField } from './features/converters/lexicalToHtml/async/field/index.js'\nexport { LinebreakHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js'\n\nexport { ParagraphHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js'\n\nexport { TabHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/tab.js'\nexport { TextHTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/converters/text.js'\nexport { defaultHTMLConverters } from './features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js'\n\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './features/converters/lexicalToHtml_deprecated/converter/index.js'\nexport type { HTMLConverter } from './features/converters/lexicalToHtml_deprecated/converter/types.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './features/converters/lexicalToHtml_deprecated/field/index.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './features/converters/lexicalToHtml_deprecated/index.js'\nexport { convertLexicalToMarkdown } from './features/converters/lexicalToMarkdown/index.js'\nexport { convertMarkdownToLexical } from './features/converters/markdownToLexical/index.js'\nexport { getPayloadPopulateFn } from './features/converters/utilities/payloadPopulateFn.js'\n\nexport { getRestPopulateFn } from './features/converters/utilities/restPopulateFn.js'\nexport { DebugJsxConverterFeature } from './features/debug/jsxConverter/server/index.js'\nexport { TestRecorderFeature } from './features/debug/testRecorder/server/index.js'\nexport { TreeViewFeature } from './features/debug/treeView/server/index.js'\nexport { EXPERIMENTAL_TableFeature } from './features/experimental_table/server/index.js'\nexport { BoldFeature } from './features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './features/format/italic/feature.server.js'\nexport { StrikethroughFeature } from './features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './features/format/underline/feature.server.js'\nexport { HeadingFeature, type HeadingFeatureProps } from './features/heading/server/index.js'\nexport { HorizontalRuleFeature } from './features/horizontalRule/server/index.js'\n\nexport { IndentFeature } from './features/indent/server/index.js'\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './features/link/nodes/AutoLinkNode.js'\nexport { $createLinkNode, $isLinkNode, LinkNode } from './features/link/nodes/LinkNode.js'\n\nexport type { LinkFields } from './features/link/nodes/types.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './features/link/server/index.js'\n\nexport { ChecklistFeature } from './features/lists/checklist/server/index.js'\nexport { OrderedListFeature } from './features/lists/orderedList/server/index.js'\n\nexport { UnorderedListFeature } from './features/lists/unorderedList/server/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './features/migrations/slateToLexical/converter/types.js'\nexport { ParagraphFeature } from './features/paragraph/server/index.js'\n\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './features/relationship/server/index.js'\n\nexport {\n type RelationshipData,\n RelationshipServerNode,\n} from './features/relationship/server/nodes/RelationshipNode.js'\nexport { defaultColors } from './features/textState/defaultColors.js'\nexport { TextStateFeature } from './features/textState/feature.server.js'\n\nexport { FixedToolbarFeature } from './features/toolbars/fixed/server/index.js'\n\nexport { InlineToolbarFeature } from './features/toolbars/inline/server/index.js'\nexport type { ToolbarGroup, ToolbarGroupItem } from './features/toolbars/types.js'\nexport type {\n BaseClientFeatureProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n PluginComponent,\n PluginComponentWithAnchor,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n} from './features/typesClient.js'\n\nexport type {\n AfterChangeNodeHook,\n AfterChangeNodeHookArgs,\n AfterReadNodeHook,\n AfterReadNodeHookArgs,\n BaseNodeHookArgs,\n BeforeChangeNodeHook,\n BeforeChangeNodeHookArgs,\n BeforeValidateNodeHook,\n BeforeValidateNodeHookArgs,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n NodeWithHooks,\n PopulationPromise,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './features/typesServer.js'\n\nexport { createNode } from './features/typeUtilities.js' // Only useful in feature.server.ts\n\nexport { UploadFeature } from './features/upload/server/index.js'\nexport type { UploadFeatureProps } from './features/upload/server/index.js'\n\nexport { type UploadData, UploadServerNode } from './features/upload/server/nodes/UploadNode.js'\nexport type { EditorConfigContextType } from './lexical/config/client/EditorConfigProvider.js'\n\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './lexical/config/server/default.js'\nexport { loadFeatures, sortFeaturesForOptimalLoading } from './lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './lexical/config/types.js'\nexport type { AdapterProps }\n\nexport { getEnabledNodes, getEnabledNodesFromServerNodes } from './lexical/nodes/index.js'\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NodeFormat,\n NON_BREAKING_SPACE,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './lexical/utils/nodeFormat.js'\n\nexport { sanitizeUrl, validateUrl } from './lexical/utils/url.js'\n\nexport type * from './nodeTypes.js'\n\nexport { $convertFromMarkdownString } from './packages/@lexical/markdown/index.js'\nexport { defaultRichTextValue } from './populateGraphQL/defaultValue.js'\nexport { populate } from './populateGraphQL/populate.js'\n\nexport type {\n LexicalEditorNodeMap,\n LexicalEditorProps,\n LexicalEditorViewMap,\n LexicalFieldAdminProps,\n LexicalRichTextAdapter,\n NodeMapValue,\n} from './types.js'\n\nexport { buildDefaultEditorState, buildEditorState } from './utilities/buildEditorState.js'\nexport { createServerFeature } from './utilities/createServerFeature.js'\n\nexport { editorConfigFactory } from './utilities/editorConfigFactory.js'\nexport type { FieldsDrawerProps } from './utilities/fieldsDrawer/Drawer.js'\n\nexport { extractPropsFromJSXPropsString } from './utilities/jsx/extractPropsFromJSXPropsString.js'\n\nexport {\n extractFrontmatter,\n frontmatterToObject,\n objectToFrontmatter,\n propsToJSXString,\n} from './utilities/jsx/jsx.js'\nexport { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js'\n"],"names":["afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","checkDependencies","deepMergeSimple","withNullableJSONSchemaType","i18n","defaultEditorFeatures","populateLexicalPopulationPromises","featuresInputToEditorConfig","getGenerateImportMap","getGenerateSchemaMap","getDefaultSanitizedEditorConfig","recurseNodeTree","richTextValidateHOC","checkedDependencies","lexicalTargetVersion","lexicalEditor","args","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","dependencyGroups","name","dependencies","targetVersion","config","isRoot","parentIsLocalized","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","result","sanitizedConfig","featureI18n","_lang","lang","lexicalI18nForLang","general","translations","CellComponent","DiffComponent","editorConfig","FieldComponent","path","serverProps","admin","views","generateImportMap","lexicalEditorArgs","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","hooks","afterChange","collection","_context","data","global","indexPath","operation","originalDoc","previousDoc","previousValue","schemaPath","value","length","hook","nodeHooks","getSubFields","nodeIDMap","previousNodeIDMap","originalNodeIDMap","internal","richText","join","Object","keys","nodes","root","children","id","node","entries","afterChangeHooks","afterChangeHooksForNode","get","type","console","warn","originalNode","parentRichTextFieldPath","parentRichTextFieldSchemaPath","previousNode","subFieldFn","subFieldDataFn","getSubFieldsData","subFields","nodeSiblingData","nodeSiblingDoc","nodePreviousSiblingDoc","blockData","doc","fields","parentIndexPath","localized","parentPath","parentSchemaPath","previousSiblingDoc","siblingData","afterRead","fallbackLocale","locale","populate","triggerAccessControl","triggerHooks","flattenedNodes","afterReadHooks","afterReadHooksForNode","populateArg","beforeChange","docWithLocales","errors","fieldLabelPath","mergeLocaleActions","siblingDocWithLocales","skipValidation","originalNodeWithLocalesIDMap","beforeChangeHooks","beforeChangeHooksForNode","originalNodeWithLocales","nodeSiblingDocWithLocales","newOriginalNodeIDMap","previousOriginalValue","beforeValidate","beforeValidateHooks","beforeValidateHooksForNode","outputSchema","collectionIDFieldTypes","interfaceNameDefinitions","isRequired","properties","additionalProperties","items","tsType","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","validate","AlignFeature","BlockquoteFeature","CodeBlock","BlocksFeature","$createServerBlockNode","$isServerBlockNode","ServerBlockNode","$createServerInlineBlockNode","$isServerInlineBlockNode","ServerInlineBlockNode","convertHTMLToLexical","lexicalHTMLField","LinebreakHTMLConverter","ParagraphHTMLConverter","TabHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","consolidateHTMLConverters","lexicalHTML","HTMLConverterFeature","convertLexicalToMarkdown","convertMarkdownToLexical","getPayloadPopulateFn","getRestPopulateFn","DebugJsxConverterFeature","TestRecorderFeature","TreeViewFeature","EXPERIMENTAL_TableFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","LinkFeature","ChecklistFeature","OrderedListFeature","UnorderedListFeature","ParagraphFeature","RelationshipFeature","RelationshipServerNode","defaultColors","TextStateFeature","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","UploadServerNode","defaultEditorConfig","defaultEditorLexicalConfig","loadFeatures","sortFeaturesForOptimalLoading","sanitizeServerEditorConfig","sanitizeServerFeatures","getEnabledNodes","getEnabledNodesFromServerNodes","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NodeFormat","NON_BREAKING_SPACE","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","sanitizeUrl","validateUrl","$convertFromMarkdownString","defaultRichTextValue","buildDefaultEditorState","buildEditorState","createServerFeature","editorConfigFactory","extractPropsFromJSXPropsString","extractFrontmatter","frontmatterToObject","objectToFrontmatter","propsToJSXString","upgradeLexicalData"],"mappings":"AAIA,SACEA,yBAAyB,EACzBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,iBAAiB,EACjBC,eAAe,EACfC,0BAA0B,QACrB,UAAS;AAMhB,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,qBAAqB,QAAQ,qCAAoC;AAC1E,SAASC,iCAAiC,QAAQ,yDAAwD;AAC1G,SAASC,2BAA2B,QAAQ,qCAAoC;AAChF,SAASC,oBAAoB,QAAQ,mCAAkC;AACvE,SAASC,oBAAoB,QAAQ,mCAAkC;AACvE,SAASC,+BAA+B,QAAQ,iDAAgD;AAChG,SAASC,eAAe,QAAQ,iCAAgC;AAChE,SAASC,mBAAmB,QAAQ,sBAAqB;AAEzD,IAAIC,sBAAsB;AAE1B,OAAO,MAAMC,uBAAuB,SAAQ;AAE5C,OAAO,SAASC,cAAcC,IAAyB;IACrD,IACEC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACzBF,QAAQC,GAAG,CAACE,kCAAkC,KAAK,UACnD,CAACP,qBACD;QACAA,sBAAsB;QACtB,KAAKZ,kBAAkB;YACrBoB,kBAAkB;gBAChB;oBACEC,MAAM;oBACNC,cAAc;wBACZ;wBACA;wBACA;wBACA;wBACA;wBACA;wBACA;wBACA;wBACA;qBACD;oBACDC,eAAeV;gBACjB;aACD;QACH;IACF;IACA,OAAO,OAAO,EAAEW,MAAM,EAAEC,MAAM,EAAEC,iBAAiB,EAAE;QACjD,IAAIC,W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AASC,mBAAmB,QAAQ,qCAAoC;AAExE,SAASC,mBAAmB,QAAQ,qCAAoC;AAGxE,SAASC,8BAA8B,QAAQ,oDAAmD;AAElG,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,mBAAmB,EACnBC,gBAAgB,QACX,yBAAwB;AAC/B,SAASC,kBAAkB,QAAQ,0CAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalEditor.d.ts","sourceRoot":"","sources":["../../src/lexical/LexicalEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,OAAO,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"LexicalEditor.d.ts","sourceRoot":"","sources":["../../src/lexical/LexicalEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,OAAO,sBAAsB,CAAA;AAe7B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC;IACE,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC1D,oBAAoB,EAAE,OAAO,CAAA;CAC9B,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,UAAU,CAAC,CAsK5D,CAAA"}
|
|
@@ -18,6 +18,7 @@ import { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/ind
|
|
|
18
18
|
import { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js';
|
|
19
19
|
import { InsertParagraphAtEndPlugin } from './plugins/InsertParagraphAtEnd/index.js';
|
|
20
20
|
import { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js';
|
|
21
|
+
import { NodeViewOverridePlugin } from './plugins/NodeViewOverridePlugin/index.js';
|
|
21
22
|
import { NormalizeSelectionPlugin } from './plugins/NormalizeSelection/index.js';
|
|
22
23
|
import { SelectAllPlugin } from './plugins/SelectAllPlugin/index.js';
|
|
23
24
|
import { SlashMenuPlugin } from './plugins/SlashMenu/index.js';
|
|
@@ -74,7 +75,7 @@ export const LexicalEditor = (props)=>{
|
|
|
74
75
|
plugin: plugin
|
|
75
76
|
}, plugin.key, false, {
|
|
76
77
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
77
|
-
lineNumber:
|
|
78
|
+
lineNumber: 94,
|
|
78
79
|
columnNumber: 18
|
|
79
80
|
}, this);
|
|
80
81
|
}
|
|
@@ -90,7 +91,7 @@ export const LexicalEditor = (props)=>{
|
|
|
90
91
|
plugin: plugin
|
|
91
92
|
}, plugin.key, false, {
|
|
92
93
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
93
|
-
lineNumber:
|
|
94
|
+
lineNumber: 101,
|
|
94
95
|
columnNumber: 15
|
|
95
96
|
}, this);
|
|
96
97
|
}
|
|
@@ -105,55 +106,60 @@ export const LexicalEditor = (props)=>{
|
|
|
105
106
|
editorConfig: editorConfig
|
|
106
107
|
}, void 0, false, {
|
|
107
108
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
108
|
-
lineNumber:
|
|
109
|
+
lineNumber: 109,
|
|
109
110
|
columnNumber: 17
|
|
110
111
|
}, void 0)
|
|
111
112
|
}, void 0, false, {
|
|
112
113
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
113
|
-
lineNumber:
|
|
114
|
+
lineNumber: 108,
|
|
114
115
|
columnNumber: 15
|
|
115
116
|
}, void 0)
|
|
116
117
|
}, void 0, false, {
|
|
117
118
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
118
|
-
lineNumber:
|
|
119
|
+
lineNumber: 107,
|
|
119
120
|
columnNumber: 13
|
|
120
121
|
}, void 0),
|
|
121
122
|
ErrorBoundary: LexicalErrorBoundary
|
|
122
123
|
}, void 0, false, {
|
|
123
124
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
124
|
-
lineNumber:
|
|
125
|
+
lineNumber: 105,
|
|
125
126
|
columnNumber: 9
|
|
126
127
|
}, this),
|
|
127
128
|
/*#__PURE__*/ _jsxDEV(NormalizeSelectionPlugin, {}, void 0, false, {
|
|
128
129
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
129
|
-
lineNumber:
|
|
130
|
+
lineNumber: 115,
|
|
130
131
|
columnNumber: 9
|
|
131
132
|
}, this),
|
|
132
133
|
isEditable && /*#__PURE__*/ _jsxDEV(InsertParagraphAtEndPlugin, {}, void 0, false, {
|
|
133
134
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
134
|
-
lineNumber:
|
|
135
|
+
lineNumber: 116,
|
|
135
136
|
columnNumber: 24
|
|
136
137
|
}, this),
|
|
137
138
|
/*#__PURE__*/ _jsxDEV(DecoratorPlugin, {}, void 0, false, {
|
|
138
139
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
139
|
-
lineNumber:
|
|
140
|
+
lineNumber: 117,
|
|
140
141
|
columnNumber: 9
|
|
141
142
|
}, this),
|
|
142
143
|
/*#__PURE__*/ _jsxDEV(ClipboardPlugin, {}, void 0, false, {
|
|
143
144
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
144
|
-
lineNumber:
|
|
145
|
+
lineNumber: 118,
|
|
145
146
|
columnNumber: 9
|
|
146
147
|
}, this),
|
|
147
148
|
/*#__PURE__*/ _jsxDEV(TextPlugin, {
|
|
148
149
|
features: editorConfig.features
|
|
149
150
|
}, void 0, false, {
|
|
150
151
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
151
|
-
lineNumber:
|
|
152
|
+
lineNumber: 119,
|
|
152
153
|
columnNumber: 9
|
|
153
154
|
}, this),
|
|
154
155
|
/*#__PURE__*/ _jsxDEV(SelectAllPlugin, {}, void 0, false, {
|
|
155
156
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
156
|
-
lineNumber:
|
|
157
|
+
lineNumber: 120,
|
|
158
|
+
columnNumber: 9
|
|
159
|
+
}, this),
|
|
160
|
+
/*#__PURE__*/ _jsxDEV(NodeViewOverridePlugin, {}, void 0, false, {
|
|
161
|
+
fileName: "src/lexical/LexicalEditor.tsx",
|
|
162
|
+
lineNumber: 121,
|
|
157
163
|
columnNumber: 9
|
|
158
164
|
}, this),
|
|
159
165
|
isEditable && /*#__PURE__*/ _jsxDEV(OnChangePlugin, {
|
|
@@ -171,7 +177,7 @@ export const LexicalEditor = (props)=>{
|
|
|
171
177
|
}
|
|
172
178
|
}, void 0, false, {
|
|
173
179
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
174
|
-
lineNumber:
|
|
180
|
+
lineNumber: 123,
|
|
175
181
|
columnNumber: 11
|
|
176
182
|
}, this),
|
|
177
183
|
floatingAnchorElem && /*#__PURE__*/ _jsxDEV(React.Fragment, {
|
|
@@ -182,20 +188,20 @@ export const LexicalEditor = (props)=>{
|
|
|
182
188
|
anchorElem: floatingAnchorElem
|
|
183
189
|
}, void 0, false, {
|
|
184
190
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
185
|
-
lineNumber:
|
|
191
|
+
lineNumber: 143,
|
|
186
192
|
columnNumber: 19
|
|
187
193
|
}, this),
|
|
188
194
|
editorConfig.admin?.hideAddBlockButton ? null : /*#__PURE__*/ _jsxDEV(AddBlockHandlePlugin, {
|
|
189
195
|
anchorElem: floatingAnchorElem
|
|
190
196
|
}, void 0, false, {
|
|
191
197
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
192
|
-
lineNumber:
|
|
198
|
+
lineNumber: 146,
|
|
193
199
|
columnNumber: 19
|
|
194
200
|
}, this)
|
|
195
201
|
]
|
|
196
202
|
}, void 0, true, {
|
|
197
203
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
198
|
-
lineNumber:
|
|
204
|
+
lineNumber: 141,
|
|
199
205
|
columnNumber: 15
|
|
200
206
|
}, this),
|
|
201
207
|
editorConfig.features.plugins?.map((plugin)=>{
|
|
@@ -206,7 +212,7 @@ export const LexicalEditor = (props)=>{
|
|
|
206
212
|
plugin: plugin
|
|
207
213
|
}, plugin.key, false, {
|
|
208
214
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
209
|
-
lineNumber:
|
|
215
|
+
lineNumber: 156,
|
|
210
216
|
columnNumber: 19
|
|
211
217
|
}, this);
|
|
212
218
|
}
|
|
@@ -216,36 +222,36 @@ export const LexicalEditor = (props)=>{
|
|
|
216
222
|
anchorElem: floatingAnchorElem
|
|
217
223
|
}, void 0, false, {
|
|
218
224
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
219
|
-
lineNumber:
|
|
225
|
+
lineNumber: 167,
|
|
220
226
|
columnNumber: 17
|
|
221
227
|
}, this)
|
|
222
228
|
}, void 0, false, {
|
|
223
229
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
224
|
-
lineNumber:
|
|
230
|
+
lineNumber: 166,
|
|
225
231
|
columnNumber: 15
|
|
226
232
|
}, this)
|
|
227
233
|
]
|
|
228
234
|
}, void 0, true, {
|
|
229
235
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
230
|
-
lineNumber:
|
|
236
|
+
lineNumber: 139,
|
|
231
237
|
columnNumber: 11
|
|
232
238
|
}, this),
|
|
233
239
|
isEditable && /*#__PURE__*/ _jsxDEV(React.Fragment, {
|
|
234
240
|
children: [
|
|
235
241
|
/*#__PURE__*/ _jsxDEV(HistoryPlugin, {}, void 0, false, {
|
|
236
242
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
237
|
-
lineNumber:
|
|
243
|
+
lineNumber: 174,
|
|
238
244
|
columnNumber: 13
|
|
239
245
|
}, this),
|
|
240
246
|
editorConfig?.features?.markdownTransformers?.length > 0 && /*#__PURE__*/ _jsxDEV(MarkdownShortcutPlugin, {}, void 0, false, {
|
|
241
247
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
242
|
-
lineNumber:
|
|
248
|
+
lineNumber: 175,
|
|
243
249
|
columnNumber: 74
|
|
244
250
|
}, this)
|
|
245
251
|
]
|
|
246
252
|
}, void 0, true, {
|
|
247
253
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
248
|
-
lineNumber:
|
|
254
|
+
lineNumber: 173,
|
|
249
255
|
columnNumber: 11
|
|
250
256
|
}, this),
|
|
251
257
|
editorConfig.features.plugins?.map((plugin)=>{
|
|
@@ -255,7 +261,7 @@ export const LexicalEditor = (props)=>{
|
|
|
255
261
|
plugin: plugin
|
|
256
262
|
}, plugin.key, false, {
|
|
257
263
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
258
|
-
lineNumber:
|
|
264
|
+
lineNumber: 181,
|
|
259
265
|
columnNumber: 15
|
|
260
266
|
}, this);
|
|
261
267
|
}
|
|
@@ -267,7 +273,7 @@ export const LexicalEditor = (props)=>{
|
|
|
267
273
|
plugin: plugin
|
|
268
274
|
}, plugin.key, false, {
|
|
269
275
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
270
|
-
lineNumber:
|
|
276
|
+
lineNumber: 188,
|
|
271
277
|
columnNumber: 15
|
|
272
278
|
}, this);
|
|
273
279
|
}
|
|
@@ -275,7 +281,7 @@ export const LexicalEditor = (props)=>{
|
|
|
275
281
|
]
|
|
276
282
|
}, void 0, true, {
|
|
277
283
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
278
|
-
lineNumber:
|
|
284
|
+
lineNumber: 97,
|
|
279
285
|
columnNumber: 7
|
|
280
286
|
}, this),
|
|
281
287
|
editorConfig.features.plugins?.map((plugin)=>{
|
|
@@ -285,7 +291,7 @@ export const LexicalEditor = (props)=>{
|
|
|
285
291
|
plugin: plugin
|
|
286
292
|
}, plugin.key, false, {
|
|
287
293
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
288
|
-
lineNumber:
|
|
294
|
+
lineNumber: 195,
|
|
289
295
|
columnNumber: 18
|
|
290
296
|
}, this);
|
|
291
297
|
}
|
|
@@ -293,7 +299,7 @@ export const LexicalEditor = (props)=>{
|
|
|
293
299
|
]
|
|
294
300
|
}, void 0, true, {
|
|
295
301
|
fileName: "src/lexical/LexicalEditor.tsx",
|
|
296
|
-
lineNumber:
|
|
302
|
+
lineNumber: 91,
|
|
297
303
|
columnNumber: 5
|
|
298
304
|
}, this);
|
|
299
305
|
};
|