@payloadcms/richtext-lexical 3.61.0-canary.5 → 3.61.0-internal.dd40839

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/cell/rscEntry.d.ts +2 -10
  2. package/dist/cell/rscEntry.d.ts.map +1 -1
  3. package/dist/cell/rscEntry.js +1 -2
  4. package/dist/cell/rscEntry.js.map +1 -1
  5. package/dist/exports/client/Field-5VLZM7KJ.js +2 -0
  6. package/dist/exports/client/Field-5VLZM7KJ.js.map +7 -0
  7. package/dist/exports/client/RelationshipComponent-UCIWIEVD.js +2 -0
  8. package/dist/exports/client/RelationshipComponent-UCIWIEVD.js.map +7 -0
  9. package/dist/exports/client/bundled.css +1 -1
  10. package/dist/exports/client/chunk-52JG5GGJ.js +2 -0
  11. package/dist/exports/client/chunk-52JG5GGJ.js.map +7 -0
  12. package/dist/exports/client/chunk-U4AOQOHA.js +12 -0
  13. package/dist/exports/client/chunk-U4AOQOHA.js.map +7 -0
  14. package/dist/exports/client/component-5YLBQB5B.js +2 -0
  15. package/dist/exports/client/component-5YLBQB5B.js.map +7 -0
  16. package/dist/exports/client/componentInline-QEXUNJU4.js +2 -0
  17. package/dist/exports/client/index.js +22 -22
  18. package/dist/exports/client/index.js.map +3 -3
  19. package/dist/exports/react/index.d.ts +1 -1
  20. package/dist/exports/react/index.d.ts.map +1 -1
  21. package/dist/exports/react/index.js.map +1 -1
  22. package/dist/features/blocks/client/component/BlockContent.js +1 -1
  23. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  24. package/dist/features/blocks/client/component/index.d.ts +1 -0
  25. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  26. package/dist/features/blocks/client/component/index.js +23 -20
  27. package/dist/features/blocks/client/component/index.js.map +1 -1
  28. package/dist/features/blocks/client/componentInline/index.d.ts +2 -1
  29. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  30. package/dist/features/blocks/client/componentInline/index.js +6 -6
  31. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  32. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +1 -1
  33. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  34. package/dist/features/blocks/client/nodes/BlocksNode.js +2 -1
  35. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  36. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +1 -1
  37. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  38. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +2 -1
  39. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  40. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -0
  41. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  42. package/dist/features/blocks/server/nodes/BlocksNode.js +6 -0
  43. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  44. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +1 -1
  45. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  46. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +3 -2
  47. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  48. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +2 -14
  49. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  50. package/dist/features/converters/lexicalToJSX/Component/index.js +4 -2
  51. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  52. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +16 -1
  53. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  54. package/dist/features/converters/lexicalToJSX/converter/index.js +76 -4
  55. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  56. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +14 -10
  57. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  58. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  59. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -1
  60. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  61. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  62. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  63. package/dist/features/relationship/client/components/RelationshipComponent.js +2 -2
  64. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  65. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -0
  66. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  67. package/dist/features/relationship/server/nodes/RelationshipNode.js +6 -0
  68. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  69. package/dist/features/typesServer.d.ts +2 -2
  70. package/dist/features/typesServer.d.ts.map +1 -1
  71. package/dist/features/typesServer.js.map +1 -1
  72. package/dist/features/upload/client/component/index.d.ts +1 -0
  73. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  74. package/dist/features/upload/client/component/index.js +2 -2
  75. package/dist/features/upload/client/component/index.js.map +1 -1
  76. package/dist/features/upload/client/nodes/UploadNode.d.ts +2 -2
  77. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  78. package/dist/features/upload/client/nodes/UploadNode.js +2 -1
  79. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  80. package/dist/features/upload/server/nodes/UploadNode.d.ts +2 -1
  81. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  82. package/dist/features/upload/server/nodes/UploadNode.js +6 -0
  83. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  84. package/dist/field/Field.d.ts.map +1 -1
  85. package/dist/field/Field.js +50 -38
  86. package/dist/field/Field.js.map +1 -1
  87. package/dist/field/RichTextViewProvider.d.ts +84 -0
  88. package/dist/field/RichTextViewProvider.d.ts.map +1 -0
  89. package/dist/field/RichTextViewProvider.js +92 -0
  90. package/dist/field/RichTextViewProvider.js.map +1 -0
  91. package/dist/field/ViewSelector.d.ts +4 -0
  92. package/dist/field/ViewSelector.d.ts.map +1 -0
  93. package/dist/field/ViewSelector.js +89 -0
  94. package/dist/field/ViewSelector.js.map +1 -0
  95. package/dist/field/bundled.css +1 -1
  96. package/dist/field/index.d.ts.map +1 -1
  97. package/dist/field/index.js +63 -41
  98. package/dist/field/index.js.map +1 -1
  99. package/dist/field/rscEntry.d.ts +2 -3
  100. package/dist/field/rscEntry.d.ts.map +1 -1
  101. package/dist/field/rscEntry.js +15 -1
  102. package/dist/field/rscEntry.js.map +1 -1
  103. package/dist/index.d.ts +1 -1
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +9 -24
  106. package/dist/index.js.map +1 -1
  107. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  108. package/dist/lexical/LexicalEditor.js +2 -1
  109. package/dist/lexical/LexicalEditor.js.map +1 -1
  110. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  111. package/dist/lexical/LexicalProvider.js +12 -3
  112. package/dist/lexical/LexicalProvider.js.map +1 -1
  113. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  114. package/dist/lexical/config/client/loader.js +2 -4
  115. package/dist/lexical/config/client/loader.js.map +1 -1
  116. package/dist/lexical/nodes/index.d.ts +12 -2
  117. package/dist/lexical/nodes/index.d.ts.map +1 -1
  118. package/dist/lexical/nodes/index.js +195 -2
  119. package/dist/lexical/nodes/index.js.map +1 -1
  120. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts +2 -0
  121. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -0
  122. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +48 -0
  123. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -0
  124. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  125. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +1 -1
  126. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  127. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  128. package/dist/lexical/theme/EditorTheme.js +3 -39
  129. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  130. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  131. package/dist/lexical/ui/ContentEditable.js +16 -9
  132. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  133. package/dist/types.d.ts +138 -4
  134. package/dist/types.d.ts.map +1 -1
  135. package/dist/types.js.map +1 -1
  136. package/dist/utilities/editorConfigFactory.js +1 -1
  137. package/dist/utilities/editorConfigFactory.js.map +1 -1
  138. package/dist/utilities/generateImportMap.d.ts +2 -0
  139. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  140. package/dist/utilities/generateImportMap.js +6 -13
  141. package/dist/utilities/generateImportMap.js.map +1 -1
  142. package/dist/{getDefaultSanitizedEditorConfig.d.ts → utilities/getDefaultSanitizedEditorConfig.d.ts} +1 -1
  143. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -0
  144. package/dist/{getDefaultSanitizedEditorConfig.js → utilities/getDefaultSanitizedEditorConfig.js} +2 -2
  145. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -0
  146. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  147. package/dist/utilities/initLexicalFeatures.js +12 -13
  148. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  149. package/dist/validate/hasText.d.ts +6 -1
  150. package/dist/validate/hasText.d.ts.map +1 -1
  151. package/dist/validate/hasText.js +10 -4
  152. package/dist/validate/hasText.js.map +1 -1
  153. package/package.json +6 -6
  154. package/dist/exports/client/Field-YYMTSGSP.js +0 -2
  155. package/dist/exports/client/Field-YYMTSGSP.js.map +0 -7
  156. package/dist/exports/client/RelationshipComponent-JXQOFHXF.js +0 -2
  157. package/dist/exports/client/RelationshipComponent-JXQOFHXF.js.map +0 -7
  158. package/dist/exports/client/chunk-AFXLIYGL.js +0 -12
  159. package/dist/exports/client/chunk-AFXLIYGL.js.map +0 -7
  160. package/dist/exports/client/chunk-RPFDD27K.js +0 -2
  161. package/dist/exports/client/chunk-RPFDD27K.js.map +0 -7
  162. package/dist/exports/client/component-WT25HAJA.js +0 -2
  163. package/dist/exports/client/component-WT25HAJA.js.map +0 -7
  164. package/dist/exports/client/componentInline-BVC77WQC.js +0 -2
  165. package/dist/getDefaultSanitizedEditorConfig.d.ts.map +0 -1
  166. package/dist/getDefaultSanitizedEditorConfig.js.map +0 -1
  167. /package/dist/exports/client/{componentInline-BVC77WQC.js.map → componentInline-QEXUNJU4.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/upload/client/component/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport type { ClientCollectionConfig, Data, FormState, JsonObject } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n formatDrawerSlug,\n Thumbnail,\n useConfig,\n useEditDepth,\n usePayloadAPI,\n useTranslation,\n} from '@payloadcms/ui'\nimport { $getNodeByKey, type ElementFormatType } from 'lexical'\nimport { isImage } from 'payload/shared'\nimport React, { useCallback, useId, useReducer, useRef, useState } from 'react'\n\nimport type { BaseClientFeatureProps } from '../../../typesClient.js'\nimport type { UploadData } from '../../server/nodes/UploadNode.js'\nimport type { UploadFeaturePropsClient } from '../index.js'\nimport type { UploadNode } from '../nodes/UploadNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport './index.scss'\n\nconst baseClass = 'lexical-upload'\n\nconst initialParams = {\n depth: 0,\n}\n\nexport type ElementProps = {\n data: UploadData\n format?: ElementFormatType\n nodeKey: string\n}\n\nexport const UploadComponent: React.FC<ElementProps> = (props) => {\n const {\n data: { fields, relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.',\n )\n }\n\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n const uploadRef = useRef<HTMLDivElement | null>(null)\n const { uuid } = useEditorConfigContext()\n const editDepth = useEditDepth()\n const [editor] = useLexicalComposerContext()\n\n const {\n editorConfig,\n fieldProps: { schemaPath },\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [relatedCollection] = useState<ClientCollectionConfig>(() =>\n getEntityConfig({ collectionSlug: relationTo }),\n )\n\n const componentID = useId()\n\n const extraFieldsDrawerSlug = formatDrawerSlug({\n slug: `lexical-upload-drawer-` + uuid + componentID, // There can be multiple upload components, each with their own drawer, in one single editor => separate them by componentID\n depth: editDepth,\n })\n\n // Need to use hook to initialize useEffect that restores cursor position\n const { toggleDrawer } = useLexicalDrawer(extraFieldsDrawerSlug, true)\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n // Get the referenced document\n const [{ data }, { setParams }] = usePayloadAPI(\n `${serverURL}${api}/${relatedCollection.slug}/${value}`,\n { initialParams },\n )\n\n const thumbnailSRC = data?.thumbnailURL || data?.url\n\n const removeUpload = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateUpload = useCallback(\n (data: Data) => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n dispatchCacheBust()\n closeDocumentDrawer()\n },\n [setParams, cacheBust, closeDocumentDrawer],\n )\n\n const hasExtraFields = (\n editorConfig?.resolvedFeatureMap?.get('upload')\n ?.sanitizedClientFeatureProps as BaseClientFeatureProps<UploadFeaturePropsClient>\n ).collections?.[relatedCollection.slug]?.hasExtraFields\n\n const onExtraFieldsDrawerSubmit = useCallback(\n (_: FormState, data: JsonObject) => {\n // Update lexical node (with key nodeKey) with new data\n editor.update(() => {\n const uploadNode: null | UploadNode = $getNodeByKey(nodeKey)\n if (uploadNode) {\n const newData: UploadData = {\n ...uploadNode.getData(),\n fields: data,\n }\n uploadNode.setData(newData)\n }\n })\n },\n [editor, nodeKey],\n )\n\n const aspectRatio =\n thumbnailSRC && data?.width && data?.height\n ? data.width > data.height\n ? 'landscape'\n : 'portrait'\n : 'landscape'\n\n return (\n <div\n className={`${baseClass} ${baseClass}--${aspectRatio}`}\n data-filename={data?.filename}\n ref={uploadRef}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__media`}>\n <Thumbnail\n collectionSlug={relationTo}\n fileSrc={isImage(data?.mimeType) ? thumbnailSRC : null}\n height={data?.height}\n size=\"none\"\n width={data?.width}\n />\n\n {isEditable && (\n <div className={`${baseClass}__overlay ${baseClass}__floater`}>\n <div className={`${baseClass}__actions`} role=\"toolbar\">\n {hasExtraFields ? (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__upload-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"edit\"\n onClick={toggleDrawer}\n round\n size=\"medium\"\n tooltip={t('fields:editRelationship')}\n />\n ) : null}\n\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swap-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }}\n round\n size=\"medium\"\n tooltip={t('fields:swapUpload')}\n />\n\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeUpload()\n }}\n round\n size=\"medium\"\n tooltip={t('fields:removeUpload')}\n />\n </div>\n </div>\n )}\n </div>\n\n <div className={`${baseClass}__metaOverlay ${baseClass}__floater`}>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <strong className={`${baseClass}__filename`}>\n {data?.filename || t('general:untitled')}\n </strong>\n </DocumentDrawerToggler>\n <div className={`${baseClass}__collectionLabel`}>\n {getTranslation(relatedCollection.labels.singular, i18n)}\n </div>\n </div>\n </div>\n\n {value ? <DocumentDrawer onSave={updateUpload} /> : null}\n {hasExtraFields ? (\n <FieldsDrawer\n data={fields}\n drawerSlug={extraFieldsDrawerSlug}\n drawerTitle={t('general:editLabel', {\n label: getTranslation(relatedCollection.labels.singular, i18n),\n })}\n featureKey=\"upload\"\n handleDrawerSubmit={onExtraFieldsDrawerSubmit}\n schemaPath={schemaPath}\n schemaPathSuffix={relatedCollection.slug}\n />\n ) : null}\n </div>\n )\n}\n"],
5
- "mappings": "sOAGA,OAASA,6BAAAA,MAAiC,2CAC1C,OAASC,sBAAAA,MAA0B,oCACnC,OAASC,kBAAAA,MAAsB,2BAC/B,OACEC,UAAAA,EACAC,oBAAAA,EACAC,aAAAA,GACAC,aAAAA,GACAC,gBAAAA,GACAC,iBAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,iBAAAA,MAA6C,UACtD,OAASC,WAAAA,OAAe,iBACxB,OAAgBC,eAAAA,EAAaC,SAAAA,GAAOC,cAAAA,GAAYC,UAAAA,GAAQC,YAAAA,OAAgB,QAcxE,IAAMC,EAAY,iBAEZC,EAAgB,CACpBC,MAAO,CACT,EAQaC,GAA2CC,GAAA,CACtD,GAAM,CACJC,KAAM,CAAEC,OAAAA,EAAQC,WAAAA,EAAY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"useLexicalEditable", "getTranslation", "Button", "formatDrawerSlug", "Thumbnail", "useConfig", "useEditDepth", "usePayloadAPI", "useTranslation", "$getNodeByKey", "isImage", "useCallback", "useId", "useReducer", "useRef", "useState", "baseClass", "initialParams", "depth", "UploadComponent", "props", "data", "fields", "relationTo", "value", "nodeKey", "Error", "config", "routes", "api", "serverURL", "getEntityConfig", "useConfig", "uploadRef", "useRef", "uuid", "useEditorConfigContext", "editDepth", "useEditDepth", "editor", "useLexicalComposerContext", "editorConfig", "fieldProps", "schemaPath", "isEditable", "useLexicalEditable", "i18n", "t", "useTranslation", "cacheBust", "dispatchCacheBust", "useReducer", "state", "relatedCollection", "useState", "collectionSlug", "componentID", "useId", "extraFieldsDrawerSlug", "formatDrawerSlug", "slug", "toggleDrawer", "useLexicalDrawer", "closeDocumentDrawer", "DocumentDrawer", "DocumentDrawerToggler", "useLexicalDocumentDrawer", "id", "setParams", "usePayloadAPI", "thumbnailSRC", "thumbnailURL", "url", "removeUpload", "useCallback", "update", "$getNodeByKey", "remove", "updateUpload", "hasExtraFields", "resolvedFeatureMap", "get", "sanitizedClientFeatureProps", "collections", "onExtraFieldsDrawerSubmit", "_", "uploadNode", "newData", "getData", "setData", "aspectRatio", "width", "height", "_jsxs", "className", "filename", "ref", "_jsx", "Thumbnail", "fileSrc", "isImage", "mimeType", "size", "role", "Button", "buttonStyle", "disabled", "el", "icon", "onClick", "round", "tooltip", "dispatchCommand", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "replace", "e", "preventDefault", "getTranslation", "labels", "singular", "onSave", "FieldsDrawer", "drawerSlug", "drawerTitle", "label", "featureKey", "handleDrawerSubmit", "schemaPathSuffix"]
7
- }
@@ -1,2 +0,0 @@
1
- "use client";import{a,b}from"./chunk-RPFDD27K.js";import"./chunk-INBEEENE.js";import"./chunk-BZZVLW4U.js";export{b as InlineBlockComponent,a as useInlineBlockComponentContext};
2
- //# sourceMappingURL=componentInline-BVC77WQC.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultSanitizedEditorConfig.d.ts","sourceRoot":"","sources":["../src/getDefaultSanitizedEditorConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,YAAY,CAAA;AAgB7D,eAAO,MAAM,+BAA+B,SAAgB;IAC1D,MAAM,EAAE,eAAe,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;CAC3B,KAAG,OAAO,CAAC,2BAA2B,CAoBtC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultSanitizedEditorConfig.js","names":["defaultEditorConfig","sanitizeServerEditorConfig","cachedDefaultSanitizedServerEditorConfig","global","_payload_lexical_defaultSanitizedServerEditorConfig","getDefaultSanitizedEditorConfig","args","config","parentIsLocalized","payload_lexical_defaultSanitizedServerEditorConfig"],"sources":["../src/getDefaultSanitizedEditorConfig.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { type SanitizedServerEditorConfig } from './index.js'\nimport { defaultEditorConfig } from './lexical/config/server/default.js'\nimport { sanitizeServerEditorConfig } from './lexical/config/server/sanitize.js'\n\nlet cachedDefaultSanitizedServerEditorConfig:\n | null\n | Promise<SanitizedServerEditorConfig>\n | SanitizedServerEditorConfig = (global as any)\n ._payload_lexical_defaultSanitizedServerEditorConfig\n\nif (!cachedDefaultSanitizedServerEditorConfig) {\n cachedDefaultSanitizedServerEditorConfig = (\n global as any\n )._payload_lexical_defaultSanitizedServerEditorConfig = null\n}\n\nexport const getDefaultSanitizedEditorConfig = async (args: {\n config: SanitizedConfig\n parentIsLocalized: boolean\n}): Promise<SanitizedServerEditorConfig> => {\n const { config, parentIsLocalized } = args\n\n if (cachedDefaultSanitizedServerEditorConfig) {\n return await cachedDefaultSanitizedServerEditorConfig\n }\n\n cachedDefaultSanitizedServerEditorConfig = sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n parentIsLocalized,\n )\n ;(global as any).payload_lexical_defaultSanitizedServerEditorConfig =\n cachedDefaultSanitizedServerEditorConfig\n\n cachedDefaultSanitizedServerEditorConfig = await cachedDefaultSanitizedServerEditorConfig\n ;(global as any).payload_lexical_defaultSanitizedServerEditorConfig =\n cachedDefaultSanitizedServerEditorConfig\n\n return cachedDefaultSanitizedServerEditorConfig\n}\n"],"mappings":"AAGA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,0BAA0B,QAAQ;AAE3C,IAAIC,wCAAA,GAG8BC,MAAC,CAChCC,mDAAmD;AAEtD,IAAI,CAACF,wCAAA,EAA0C;EAC7CA,wCAAA,GAA2CC,MACzC,CACAC,mDAAmD,GAAG;AAC1D;AAEA,OAAO,MAAMC,+BAAA,GAAkC,MAAOC,IAAA;EAIpD,MAAM;IAAEC,MAAM;IAAEC;EAAiB,CAAE,GAAGF,IAAA;EAEtC,IAAIJ,wCAAA,EAA0C;IAC5C,OAAO,MAAMA,wCAAA;EACf;EAEAA,wCAAA,GAA2CD,0BAAA,CACzCD,mBAAA,EACAO,MAAA,EACAC,iBAAA;EAEAL,MAAA,CAAeM,kDAAkD,GACjEP,wCAAA;EAEFA,wCAAA,GAA2C,MAAMA,wCAAA;EAC/CC,MAAA,CAAeM,kDAAkD,GACjEP,wCAAA;EAEF,OAAOA,wCAAA;AACT","ignoreList":[]}