@payloadcms/richtext-lexical 4.0.0-internal.2fddfc0 → 4.0.0-internal.3aa3d85
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/LICENSE.md +1 -1
- package/dist/exports/client/Field-XH5C4HFU.js +2 -0
- package/dist/exports/client/Field-XH5C4HFU.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-X3D4LZS7.js +2 -0
- package/dist/exports/client/chunk-X3D4LZS7.js.map +7 -0
- package/dist/exports/client/index.d.ts +0 -2
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +24 -25
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/blockquote/client/index.js +2 -2
- package/dist/features/blockquote/client/index.js.map +1 -1
- package/dist/features/blockquote/server/index.js +2 -2
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blocks/client/component/index.css +2 -2
- package/dist/features/blocks/client/componentInline/index.css +8 -8
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
- package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/server/schema.d.ts.map +1 -1
- package/dist/features/blocks/server/schema.js +3 -2
- package/dist/features/blocks/server/schema.js.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/markdownToLexical/index.js +5 -2
- package/dist/features/converters/markdownToLexical/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
- package/dist/features/experimental_table/client/index.js +2 -2
- package/dist/features/experimental_table/client/index.js.map +1 -1
- package/dist/features/experimental_table/markdownTransformer.d.ts +2 -2
- package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -1
- package/dist/features/experimental_table/markdownTransformer.js +6 -3
- package/dist/features/experimental_table/markdownTransformer.js.map +1 -1
- package/dist/features/experimental_table/server/index.js +2 -2
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.js +1 -1
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/features/format/bold/feature.server.js +1 -1
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +1 -1
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +1 -1
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/italic/feature.client.js +1 -1
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/features/format/italic/feature.server.js +1 -1
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +1 -1
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +1 -1
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.js +2 -2
- package/dist/features/heading/client/index.js.map +1 -1
- package/dist/features/heading/markdownTransformer.d.ts +2 -2
- package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
- package/dist/features/heading/markdownTransformer.js +6 -19
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/heading/server/index.js +2 -2
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/horizontalRule/client/index.js +2 -2
- package/dist/features/horizontalRule/client/index.js.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.css +2 -2
- package/dist/features/horizontalRule/server/index.js +2 -2
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
- package/dist/features/link/client/index.js +2 -2
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -11
- package/dist/features/link/markdownTransformer.d.ts +4 -4
- package/dist/features/link/markdownTransformer.d.ts.map +1 -1
- package/dist/features/link/markdownTransformer.js +2 -2
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/markdownTransformer.spec.js +10 -10
- package/dist/features/link/markdownTransformer.spec.js.map +1 -1
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/index.js +2 -2
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/schema.d.ts.map +1 -1
- package/dist/features/link/server/schema.js +4 -2
- package/dist/features/link/server/schema.js.map +1 -1
- package/dist/features/lists/checklist/client/index.js +1 -1
- package/dist/features/lists/checklist/client/index.js.map +1 -1
- package/dist/features/lists/checklist/server/index.js +1 -1
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.js +1 -1
- package/dist/features/lists/orderedList/client/index.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +1 -1
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/unorderedList/client/index.js +1 -1
- package/dist/features/lists/unorderedList/client/index.js.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +1 -1
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/server/schema.d.ts +3 -3
- package/dist/features/relationship/server/schema.d.ts.map +1 -1
- package/dist/features/relationship/server/schema.js +22 -5
- package/dist/features/relationship/server/schema.js.map +1 -1
- package/dist/features/textState/feature.client.js +1 -1
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.css +2 -2
- package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -13
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -12
- package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
- package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
- package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
- package/dist/features/typesClient.d.ts +1 -1
- package/dist/features/typesClient.d.ts.map +1 -1
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.d.ts +2 -2
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.css +9 -9
- package/dist/features/upload/client/plugin/index.js +5 -5
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/index.js +2 -2
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
- package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/upload/server/markdownTransformer.js +1 -1
- package/dist/features/upload/server/markdownTransformer.js.map +1 -1
- package/dist/features/upload/server/schema.d.ts +4 -4
- package/dist/features/upload/server/schema.d.ts.map +1 -1
- package/dist/features/upload/server/schema.js +26 -6
- package/dist/features/upload/server/schema.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.css +1 -1
- package/dist/field/Field.js +1 -1
- package/dist/field/Field.js.map +1 -1
- package/dist/field/ViewSelector.css +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.css +11 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -50
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.css +2 -2
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +2 -36
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js +7 -22
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.css +1 -5
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +3 -3
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.css +18 -19
- package/dist/lexical/ui/ContentEditable.css +5 -5
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
- package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
- package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
- package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
- package/dist/types/schema.d.ts.map +1 -1
- package/dist/types/schema.js +12 -5
- package/dist/types/schema.js.map +1 -1
- package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
- package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js +3 -7
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/package.json +22 -27
- package/dist/@types/assets.d.js +0 -2
- package/dist/@types/assets.d.js.map +0 -1
- package/dist/exports/client/Field-VW7ZGT6K.js +0 -2
- package/dist/exports/client/Field-VW7ZGT6K.js.map +0 -7
- package/dist/exports/client/chunk-4EIYXZ6H.js +0 -12
- package/dist/exports/client/chunk-4EIYXZ6H.js.map +0 -7
- package/dist/exports/server/rsc.browser.d.ts +0 -11
- package/dist/exports/server/rsc.browser.d.ts.map +0 -1
- package/dist/exports/server/rsc.browser.js +0 -10
- package/dist/exports/server/rsc.browser.js.map +0 -1
- package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
- package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
- package/dist/features/blockquote/markdownTransformer.js +0 -33
- package/dist/features/blockquote/markdownTransformer.js.map +0 -1
- package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
- package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/bold/markdownTransformers.js +0 -23
- package/dist/features/format/bold/markdownTransformers.js.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
- package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
- package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
- package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
- package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/italic/markdownTransformers.js +0 -12
- package/dist/features/format/italic/markdownTransformers.js.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
- package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
- package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
- package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.js +0 -12
- package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
- package/dist/features/lists/shared/markdown.d.ts +0 -6
- package/dist/features/lists/shared/markdown.d.ts.map +0 -1
- package/dist/features/lists/shared/markdown.js +0 -57
- package/dist/features/lists/shared/markdown.js.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
- package/dist/field/clientEntry.d.ts +0 -29
- package/dist/field/clientEntry.d.ts.map +0 -1
- package/dist/field/clientEntry.js +0 -86
- package/dist/field/clientEntry.js.map +0 -1
- package/dist/lexical/utils/guard.d.ts +0 -5
- package/dist/lexical/utils/guard.d.ts.map +0 -1
- package/dist/lexical/utils/guard.js +0 -9
- package/dist/lexical/utils/guard.js.map +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
- package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js +0 -160
- package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -220
- package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -199
- package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -173
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -352
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
- package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/index.d.ts +0 -29
- package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/index.js +0 -39
- package/dist/packages/@lexical/markdown/index.js.map +0 -1
- package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
- package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/utils.js +0 -267
- package/dist/packages/@lexical/markdown/utils.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ListItemNode, ListNode } from '@lexical/list';
|
|
2
|
+
import { ORDERED_LIST } from '@lexical/markdown';
|
|
2
3
|
import { createServerFeature } from '../../../../utilities/createServerFeature.js';
|
|
3
4
|
import { createNode } from '../../../typeUtilities.js';
|
|
4
5
|
import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
|
|
5
6
|
import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
|
|
6
|
-
import { ORDERED_LIST } from '../markdownTransformer.js';
|
|
7
7
|
import { i18n } from './i18n.js';
|
|
8
8
|
export const OrderedListFeature = createServerFeature({
|
|
9
9
|
feature: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","
|
|
1
|
+
{"version":3,"file":"index.js","names":["ListItemNode","ListNode","ORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { ORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,YAAY,QAAQ;AAE7B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBN,mBAAA,CAAoB;EACpDO,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACX,YAAA,CAAa;MACpCY,KAAA,EAAOP,2BAAA,CAA4B,WAAWI,kBAAA,IAC1C,CACEP,UAAA,CAAW;QACTW,UAAA,EAAYT,kBAAA;QACZU,IAAA,EAAMf;MACR,IACAG,UAAA,CAAW;QACTW,UAAA,EAAYV,sBAAA;QACZW,IAAA,EAAMhB;MACR,GACD,GACD;IACN;EACF;EACAiB,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
|
|
4
|
+
import { UNORDERED_LIST } from '@lexical/markdown';
|
|
4
5
|
import { $isRangeSelection } from 'lexical';
|
|
5
6
|
import { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js';
|
|
6
7
|
import { createClientFeature } from '../../../../utilities/createClientFeature.js';
|
|
7
8
|
import { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js';
|
|
8
9
|
import { LexicalListPlugin } from '../../plugin/index.js';
|
|
9
10
|
import { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js';
|
|
10
|
-
import { UNORDERED_LIST } from '../markdownTransformer.js';
|
|
11
11
|
const toolbarGroups = [toolbarTextDropdownGroupWithItems([{
|
|
12
12
|
ChildComponent: UnorderedListIcon,
|
|
13
13
|
isActive: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["$isListNode","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","UnorderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","slashMenuListGroupWithItems","
|
|
1
|
+
{"version":3,"file":"index.js","names":["$isListNode","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","UNORDERED_LIST","$isRangeSelection","UnorderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","slashMenuListGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","UnorderedListFeatureClient","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/unorderedList/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\n\nimport { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nexport const UnorderedListFeatureClient = createClientFeature({\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,EAAEC,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AACnF,SAASC,cAAc,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ;AAIlC,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD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IAAA,EAAMhC,iBAAA;MACNe,GAAA,EAAK;MACLkB,QAAA,EAAU,CAAC,kBAAkB,KAAK;MAClCjB,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;MACxD;IACF,EACD;EAEL;EACAY,YAAA,EAAc;IACZH,MAAA,EAAQ1B;EACV;EACA8B,aAAA,EAAe;IACbJ,MAAA,EAAQ1B;EACV;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ListItemNode, ListNode } from '@lexical/list';
|
|
2
|
+
import { UNORDERED_LIST } from '@lexical/markdown';
|
|
2
3
|
import { createServerFeature } from '../../../../utilities/createServerFeature.js';
|
|
3
4
|
import { createNode } from '../../../typeUtilities.js';
|
|
4
5
|
import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
|
|
5
|
-
import { UNORDERED_LIST } from '../markdownTransformer.js';
|
|
6
6
|
import { i18n } from './i18n.js';
|
|
7
7
|
export const UnorderedListFeature = createServerFeature({
|
|
8
8
|
feature: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","
|
|
1
|
+
{"version":3,"file":"index.js","names":["ListItemNode","ListNode","UNORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,cAAc,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBL,mBAAA,CAAoB;EACtDM,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACT,cAAA,CAAe;IACtCU,KAAA,EAAO,CACLR,UAAA,CAAW;MACTS,UAAA,EAAYP,kBAAA;MACZQ,IAAA,EAAMb;IACR,IACAG,UAAA,CAAW;MACTS,UAAA,EAAYR,sBAAA;MACZS,IAAA,EAAMd;IACR;EAEJ;EACAe,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { CollectionSlug, DataFromCollectionSlug, UploadCollectionSlug } from 'payload';
|
|
1
|
+
import type { CollectionSlug, DataFromCollectionSlug, IDTypeForCollectionSlug, UploadCollectionSlug } from 'payload';
|
|
2
2
|
import type { LexicalElementFormat } from '../../../types/nodeTypes.js';
|
|
3
3
|
import type { JSONSchemaFn } from '../../typesServer.js';
|
|
4
4
|
import type { RelationshipFeatureProps } from './index.js';
|
|
5
5
|
export type RelationshipData = {
|
|
6
6
|
[TCollectionSlug in CollectionSlug]: {
|
|
7
7
|
relationTo: TCollectionSlug;
|
|
8
|
-
value: DataFromCollectionSlug<TCollectionSlug> |
|
|
8
|
+
value: DataFromCollectionSlug<TCollectionSlug> | IDTypeForCollectionSlug<TCollectionSlug>;
|
|
9
9
|
};
|
|
10
10
|
}[CollectionSlug];
|
|
11
11
|
/**
|
|
@@ -17,7 +17,7 @@ export type NonUploadCollectionSlug = [Exclude<CollectionSlug, UploadCollectionS
|
|
|
17
17
|
export type SerializedRelationshipNode<TSlugs extends CollectionSlug = NonUploadCollectionSlug> = {
|
|
18
18
|
[TSlug in TSlugs]: {
|
|
19
19
|
relationTo: TSlug;
|
|
20
|
-
value: DataFromCollectionSlug<TSlug> |
|
|
20
|
+
value: DataFromCollectionSlug<TSlug> | IDTypeForCollectionSlug<TSlug>;
|
|
21
21
|
};
|
|
22
22
|
}[TSlugs] & {
|
|
23
23
|
format: LexicalElementFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAK1D,MAAM,MAAM,gBAAgB,GAAG;KAC5B,eAAe,IAAI,cAAc,GAAG;QACnC,UAAU,EAAE,eAAe,CAAA;QAC3B,KAAK,EAAE,sBAAsB,CAAC,eAAe,CAAC,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAA;KAC1F;CACF,CAAC,cAAc,CAAC,CAAA;AAEjB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC,SAAS;IAC5F,KAAK;CACN,GACG,cAAc,GACd,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAA;AAEjD,MAAM,MAAM,0BAA0B,CAAC,MAAM,SAAS,cAAc,GAAG,uBAAuB,IAAI;KAC/F,KAAK,IAAI,MAAM,GAAG;QACjB,UAAU,EAAE,KAAK,CAAA;QACjB,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAA;KACtE;CACF,CAAC,MAAM,CAAC,GAAG;IACV,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,cAAc,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AA0BD,eAAO,MAAM,gCAAgC,GAC1C,OAAO,wBAAwB,GAAG,SAAS,KAAG,YAwD9C,CAAA"}
|
|
@@ -8,15 +8,28 @@ const SERIALIZED_RELATIONSHIP_NODE_TS = `export type SerializedRelationshipNode<
|
|
|
8
8
|
} & {
|
|
9
9
|
[TSlug in TSlugs]: {
|
|
10
10
|
relationTo: TSlug;
|
|
11
|
-
value:
|
|
11
|
+
value: Config['collections'][TSlug]['id'] | Config['collections'][TSlug];
|
|
12
|
+
};
|
|
13
|
+
}[TSlugs];`;
|
|
14
|
+
/** Input variant of `SerializedRelationshipNode`: `value` is ID-only (you only ever write an ID). */
|
|
15
|
+
const SERIALIZED_RELATIONSHIP_NODE_INPUT_TS = `export type SerializedRelationshipNodeInput<TSlugs extends keyof Config['collections']> = {
|
|
16
|
+
type: 'relationship';
|
|
17
|
+
format: LexicalElementFormat;
|
|
18
|
+
version: number;
|
|
19
|
+
} & {
|
|
20
|
+
[TSlug in TSlugs]: {
|
|
21
|
+
relationTo: TSlug;
|
|
22
|
+
value: Config['collections'][TSlug]['id'];
|
|
12
23
|
};
|
|
13
24
|
}[TSlugs];`;
|
|
14
25
|
export const createRelationshipNodeJSONSchema = props => ({
|
|
15
26
|
collectionIDFieldTypes,
|
|
16
27
|
config,
|
|
17
|
-
typeStringDefinitions
|
|
28
|
+
typeStringDefinitions,
|
|
29
|
+
variant
|
|
18
30
|
}) => {
|
|
19
|
-
|
|
31
|
+
const isInput = variant === 'input';
|
|
32
|
+
typeStringDefinitions.add(isInput ? SERIALIZED_RELATIONSHIP_NODE_INPUT_TS : SERIALIZED_RELATIONSHIP_NODE_TS);
|
|
20
33
|
const enabledCollections = config?.collections ? filterEnabledRelationshipCollections(config.collections, {
|
|
21
34
|
disabledCollections: props?.disabledCollections,
|
|
22
35
|
enabledCollections: props?.enabledCollections,
|
|
@@ -38,7 +51,10 @@ export const createRelationshipNodeJSONSchema = props => ({
|
|
|
38
51
|
type: 'string',
|
|
39
52
|
const: slug
|
|
40
53
|
},
|
|
41
|
-
value: {
|
|
54
|
+
value: isInput ? {
|
|
55
|
+
type: idType,
|
|
56
|
+
description: 'The related document ID.'
|
|
57
|
+
} : {
|
|
42
58
|
description: 'The related document by ID (string or number). Populated to the full document when read at depth > 0.',
|
|
43
59
|
oneOf: [{
|
|
44
60
|
type: idType
|
|
@@ -70,9 +86,10 @@ export const createRelationshipNodeJSONSchema = props => ({
|
|
|
70
86
|
const baseSchema = variants.length === 1 ? variants[0] : {
|
|
71
87
|
oneOf: variants
|
|
72
88
|
};
|
|
89
|
+
const tsName = isInput ? 'SerializedRelationshipNodeInput' : 'SerializedRelationshipNode';
|
|
73
90
|
schema = {
|
|
74
91
|
...baseSchema,
|
|
75
|
-
tsType:
|
|
92
|
+
tsType: `${tsName}<${slugUnion}>`
|
|
76
93
|
};
|
|
77
94
|
}
|
|
78
95
|
return schema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":["formatSchema","versionSchema","filterEnabledRelationshipCollections","SERIALIZED_RELATIONSHIP_NODE_TS","createRelationshipNodeJSONSchema","props","collectionIDFieldTypes","config","typeStringDefinitions","add","enabledCollections","collections","disabledCollections","uploads","variants","map","collection","slug","idType","type","additionalProperties","properties","const","format","relationTo","value","description","oneOf","$ref","version","required","schema","length","slugUnion","c","join","baseSchema","tsType"],"sources":["../../../../src/features/relationship/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {
|
|
1
|
+
{"version":3,"file":"schema.js","names":["formatSchema","versionSchema","filterEnabledRelationshipCollections","SERIALIZED_RELATIONSHIP_NODE_TS","SERIALIZED_RELATIONSHIP_NODE_INPUT_TS","createRelationshipNodeJSONSchema","props","collectionIDFieldTypes","config","typeStringDefinitions","variant","isInput","add","enabledCollections","collections","disabledCollections","uploads","variants","map","collection","slug","idType","type","additionalProperties","properties","const","format","relationTo","value","description","oneOf","$ref","version","required","schema","length","slugUnion","c","join","baseSchema","tsName","tsType"],"sources":["../../../../src/features/relationship/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {\n CollectionSlug,\n DataFromCollectionSlug,\n IDTypeForCollectionSlug,\n UploadCollectionSlug,\n} from 'payload'\n\nimport type { LexicalElementFormat } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\nimport type { RelationshipFeatureProps } from './index.js'\n\nimport { formatSchema, versionSchema } from '../../../types/jsonSchemaHelpers.js'\nimport { filterEnabledRelationshipCollections } from '../shared/filterEnabledRelationshipCollections.js'\n\nexport type RelationshipData = {\n [TCollectionSlug in CollectionSlug]: {\n relationTo: TCollectionSlug\n value: DataFromCollectionSlug<TCollectionSlug> | IDTypeForCollectionSlug<TCollectionSlug>\n }\n}[CollectionSlug]\n\n/**\n * Exclude upload collection slugs. This matches runtime behavior, as well as the json schema.\n */\nexport type NonUploadCollectionSlug = [Exclude<CollectionSlug, UploadCollectionSlug>] extends [\n never,\n]\n ? CollectionSlug\n : Exclude<CollectionSlug, UploadCollectionSlug>\n\nexport type SerializedRelationshipNode<TSlugs extends CollectionSlug = NonUploadCollectionSlug> = {\n [TSlug in TSlugs]: {\n relationTo: TSlug\n value: DataFromCollectionSlug<TSlug> | IDTypeForCollectionSlug<TSlug>\n }\n}[TSlugs] & {\n format: LexicalElementFormat\n type: 'relationship'\n version: number\n}\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedRelationshipNode` declared above. */\nconst SERIALIZED_RELATIONSHIP_NODE_TS = `export type SerializedRelationshipNode<TSlugs extends keyof Config['collections']> = {\n type: 'relationship';\n format: LexicalElementFormat;\n version: number;\n} & {\n [TSlug in TSlugs]: {\n relationTo: TSlug;\n value: Config['collections'][TSlug]['id'] | Config['collections'][TSlug];\n };\n}[TSlugs];`\n\n/** Input variant of `SerializedRelationshipNode`: `value` is ID-only (you only ever write an ID). */\nconst SERIALIZED_RELATIONSHIP_NODE_INPUT_TS = `export type SerializedRelationshipNodeInput<TSlugs extends keyof Config['collections']> = {\n type: 'relationship';\n format: LexicalElementFormat;\n version: number;\n} & {\n [TSlug in TSlugs]: {\n relationTo: TSlug;\n value: Config['collections'][TSlug]['id'];\n };\n}[TSlugs];`\n\nexport const createRelationshipNodeJSONSchema =\n (props: RelationshipFeatureProps | undefined): JSONSchemaFn =>\n ({ collectionIDFieldTypes, config, typeStringDefinitions, variant }) => {\n const isInput = variant === 'input'\n typeStringDefinitions.add(\n isInput ? SERIALIZED_RELATIONSHIP_NODE_INPUT_TS : SERIALIZED_RELATIONSHIP_NODE_TS,\n )\n const enabledCollections = config?.collections\n ? filterEnabledRelationshipCollections(config.collections, {\n disabledCollections: props?.disabledCollections,\n enabledCollections: props?.enabledCollections,\n uploads: false,\n })\n : []\n\n const variants: JSONSchema4[] = enabledCollections.map((collection) => {\n const slug = collection.slug\n const idType: 'number' | 'string' = collectionIDFieldTypes[slug] ?? 'string'\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: { type: 'string', const: 'relationship' },\n format: formatSchema,\n relationTo: { type: 'string', const: slug },\n value: isInput\n ? { type: idType, description: 'The related document ID.' }\n : {\n description:\n 'The related document by ID (string or number). Populated to the full document when read at depth > 0.',\n oneOf: [{ type: idType }, { $ref: `#/$defs/${slug}` }],\n },\n version: versionSchema,\n },\n required: ['format', 'relationTo', 'type', 'value', 'version'],\n }\n })\n\n let schema: JSONSchema4\n if (variants.length === 0) {\n schema = {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: { type: 'string', const: 'relationship' },\n version: versionSchema,\n },\n required: ['type', 'version'],\n }\n } else {\n const slugUnion = enabledCollections.map((c) => `'${c.slug}'`).join(' | ')\n const baseSchema: JSONSchema4 = variants.length === 1 ? variants[0]! : { oneOf: variants }\n const tsName = isInput ? 'SerializedRelationshipNodeInput' : 'SerializedRelationshipNode'\n schema = { ...baseSchema, tsType: `${tsName}<${slugUnion}>` }\n }\n\n return schema\n }\n"],"mappings":"AAYA,SAASA,YAAY,EAAEC,aAAa,QAAQ;AAC5C,SAASC,oCAAoC,QAAQ;AA6BrD;AACA,MAAMC,+BAAA,GAAkC;;;;;;;;;WAS7B;AAEX;AACA,MAAMC,qCAAA,GAAwC;;;;;;;;;WASnC;AAEX,OAAO,MAAMC,gCAAA,GACVC,KAAA,IACD,CAAC;EAAEC,sBAAsB;EAAEC,MAAM;EAAEC,qBAAqB;EAAEC;AAAO,CAAE;EACjE,MAAMC,OAAA,GAAUD,OAAA,KAAY;EAC5BD,qBAAA,CAAsBG,GAAG,CACvBD,OAAA,GAAUP,qCAAA,GAAwCD,+BAAA;EAEpD,MAAMU,kBAAA,GAAqBL,MAAA,EAAQM,WAAA,GAC/BZ,oCAAA,CAAqCM,MAAA,CAAOM,WAAW,EAAE;IACvDC,mBAAA,EAAqBT,KAAA,EAAOS,mBAAA;IAC5BF,kBAAA,EAAoBP,KAAA,EAAOO,kBAAA;IAC3BG,OAAA,EAAS;EACX,KACA,EAAE;EAEN,MAAMC,QAAA,GAA0BJ,kBAAA,CAAmBK,GAAG,CAAEC,UAAA;IACtD,MAAMC,IAAA,GAAOD,UAAA,CAAWC,IAAI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,IAAUJ,SAAA;IAAa;EAC9D;EAEA,OAAOF,MAAA;AACT","ignoreList":[]}
|
|
@@ -43,7 +43,7 @@ const toolbarGroups = (props, stateMap) => {
|
|
|
43
43
|
type: 'dropdown',
|
|
44
44
|
ChildComponent: () => /*#__PURE__*/_jsx(TextStateIcon, {
|
|
45
45
|
css: {
|
|
46
|
-
color: 'var(--
|
|
46
|
+
color: 'var(--color-icon-secondary)'
|
|
47
47
|
}
|
|
48
48
|
}),
|
|
49
49
|
items: [...clearStyle, ...items],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.js","names":["TextStateIcon","createClientFeature","registerTextStates","setTextState","StatePlugin","toolbarGroups","props","stateMap","items","stateKey","state","key","stateValue","meta","push","ChildComponent","_jsx","css","label","onSelect","editor","clearStyle","i18n","t","undefined","order","type","color","TextStateFeatureClient","plugins","Component","position","toolbarFixed","groups","toolbarInline"],"sources":["../../../src/features/textState/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { ToolbarDropdownGroup, ToolbarGroup } from '../toolbars/types.js'\nimport type { TextStateFeatureProps } from './feature.server.js'\n\nimport { TextStateIcon } from '../../lexical/ui/icons/TextState/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { registerTextStates, setTextState, type StateMap, StatePlugin } from './textState.js'\n\nconst toolbarGroups = (props: TextStateFeatureProps, stateMap: StateMap): ToolbarGroup[] => {\n const items: ToolbarDropdownGroup['items'] = []\n\n for (const stateKey in props.state) {\n const key = props.state[stateKey]!\n for (const stateValue in key) {\n const meta = key[stateValue]!\n items.push({\n ChildComponent: () => <TextStateIcon css={meta.css} />,\n key: stateValue,\n label: meta.label,\n onSelect: ({ editor }) => {\n setTextState(editor, stateMap, stateKey, stateValue)\n },\n })\n }\n }\n\n const clearStyle: ToolbarDropdownGroup['items'] = [\n {\n ChildComponent: () => <TextStateIcon />,\n key: `clear-style`,\n label: ({ i18n }) => i18n.t('lexical:textState:defaultStyle'),\n onSelect: ({ editor }) => {\n for (const stateKey in props.state) {\n setTextState(editor, stateMap, stateKey, undefined)\n }\n },\n order: 1,\n },\n ]\n\n return [\n {\n type: 'dropdown',\n ChildComponent: () => <TextStateIcon css={{ color: 'var(--
|
|
1
|
+
{"version":3,"file":"feature.client.js","names":["TextStateIcon","createClientFeature","registerTextStates","setTextState","StatePlugin","toolbarGroups","props","stateMap","items","stateKey","state","key","stateValue","meta","push","ChildComponent","_jsx","css","label","onSelect","editor","clearStyle","i18n","t","undefined","order","type","color","TextStateFeatureClient","plugins","Component","position","toolbarFixed","groups","toolbarInline"],"sources":["../../../src/features/textState/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { ToolbarDropdownGroup, ToolbarGroup } from '../toolbars/types.js'\nimport type { TextStateFeatureProps } from './feature.server.js'\n\nimport { TextStateIcon } from '../../lexical/ui/icons/TextState/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { registerTextStates, setTextState, type StateMap, StatePlugin } from './textState.js'\n\nconst toolbarGroups = (props: TextStateFeatureProps, stateMap: StateMap): ToolbarGroup[] => {\n const items: ToolbarDropdownGroup['items'] = []\n\n for (const stateKey in props.state) {\n const key = props.state[stateKey]!\n for (const stateValue in key) {\n const meta = key[stateValue]!\n items.push({\n ChildComponent: () => <TextStateIcon css={meta.css} />,\n key: stateValue,\n label: meta.label,\n onSelect: ({ editor }) => {\n setTextState(editor, stateMap, stateKey, stateValue)\n },\n })\n }\n }\n\n const clearStyle: ToolbarDropdownGroup['items'] = [\n {\n ChildComponent: () => <TextStateIcon />,\n key: `clear-style`,\n label: ({ i18n }) => i18n.t('lexical:textState:defaultStyle'),\n onSelect: ({ editor }) => {\n for (const stateKey in props.state) {\n setTextState(editor, stateMap, stateKey, undefined)\n }\n },\n order: 1,\n },\n ]\n\n return [\n {\n type: 'dropdown',\n ChildComponent: () => <TextStateIcon css={{ color: 'var(--color-icon-secondary)' }} />,\n items: [...clearStyle, ...items],\n key: 'textState',\n order: 30,\n },\n ]\n}\n\nexport const TextStateFeatureClient = createClientFeature<TextStateFeatureProps>(({ props }) => {\n const stateMap = registerTextStates(props.state)\n return {\n plugins: [\n {\n Component: () => StatePlugin({ stateMap }),\n position: 'normal',\n },\n ],\n toolbarFixed: {\n groups: toolbarGroups(props, stateMap),\n },\n toolbarInline: {\n groups: toolbarGroups(props, stateMap),\n },\n }\n})\n"],"mappings":"AAAA;;;AAKA,SAASA,aAAa,QAAQ;AAC9B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,kBAAkB,EAAEC,YAAY,EAAiBC,WAAW,QAAQ;AAE7E,MAAMC,aAAA,GAAgBA,CAACC,KAAA,EAA8BC,QAAA;EACnD,MAAMC,KAAA,GAAuC,EAAE;EAE/C,KAAK,MAAMC,QAAA,IAAYH,KAAA,CAAMI,KAAK,EAAE;IAClC,MAAMC,GAAA,GAAML,KAAA,CAAMI,KAAK,CAACD,QAAA,CAAS;IACjC,KAAK,MAAMG,UAAA,IAAcD,GAAA,EAAK;MAC5B,MAAME,IAAA,GAAOF,GAAG,CAACC,UAAA,CAAW;MAC5BJ,KAAA,CAAMM,IAAI,CAAC;QACTC,cAAA,EAAgBA,CAAA,kBAAMC,IAAA,CAAChB,aAAA;UAAciB,GAAA,EAAKJ,IAAA,CAAKI;;QAC/CN,GAAA,EAAKC,UAAA;QACLM,KAAA,EAAOL,IAAA,CAAKK,KAAK;QACjBC,QAAA,EAAUA,CAAC;UAAEC;QAAM,CAAE;UACnBjB,YAAA,CAAaiB,MAAA,EAAQb,QAAA,EAAUE,QAAA,EAAUG,UAAA;QAC3C;MACF;IACF;EACF;EAEA,MAAMS,UAAA,GAA4C,CAChD;IACEN,cAAA,EAAgBA,CAAA,kBAAMC,IAAA,CAAChB,aAAA;IACvBW,GAAA,EAAK,aAAa;IAClBO,KAAA,EAAOA,CAAC;MAAEI;IAAI,CAAE,KAAKA,IAAA,CAAKC,CAAC,CAAC;IAC5BJ,QAAA,EAAUA,CAAC;MAAEC;IAAM,CAAE;MACnB,KAAK,MAAMX,QAAA,IAAYH,KAAA,CAAMI,KAAK,EAAE;QAClCP,YAAA,CAAaiB,MAAA,EAAQb,QAAA,EAAUE,QAAA,EAAUe,SAAA;MAC3C;IACF;IACAC,KAAA,EAAO;EACT,EACD;EAED,OAAO,CACL;IACEC,IAAA,EAAM;IACNX,cAAA,EAAgBA,CAAA,kBAAMC,IAAA,CAAChB,aAAA;MAAciB,GAAA,EAAK;QAAEU,KAAA,EAAO;MAA8B;;IACjFnB,KAAA,EAAO,C,GAAIa,UAAA,E,GAAeb,KAAA,CAAM;IAChCG,GAAA,EAAK;IACLc,KAAA,EAAO;EACT,EACD;AACH;AAEA,OAAO,MAAMG,sBAAA,GAAyB3B,mBAAA,CAA2C,CAAC;EAAEK;AAAK,CAAE;EACzF,MAAMC,QAAA,GAAWL,kBAAA,CAAmBI,KAAA,CAAMI,KAAK;EAC/C,OAAO;IACLmB,OAAA,EAAS,CACP;MACEC,SAAA,EAAWA,CAAA,KAAM1B,WAAA,CAAY;QAAEG;MAAS;MACxCwB,QAAA,EAAU;IACZ,EACD;IACDC,YAAA,EAAc;MACZC,MAAA,EAAQ5B,aAAA,CAAcC,KAAA,EAAOC,QAAA;IAC/B;IACA2B,aAAA,EAAe;MACbD,MAAA,EAAQ5B,aAAA,CAAcC,KAAA,EAAOC,QAAA;IAC/B;EACF;AACF","ignoreList":[]}
|
|
@@ -8,16 +8,13 @@
|
|
|
8
8
|
vertical-align: middle;
|
|
9
9
|
position: absolute;
|
|
10
10
|
top: 0;
|
|
11
|
-
|
|
11
|
+
inset-inline-start: 0;
|
|
12
12
|
z-index: 2;
|
|
13
13
|
opacity: 0;
|
|
14
14
|
border-radius: var(--radius-medium);
|
|
15
15
|
transition: opacity 0.2s;
|
|
16
16
|
will-change: transform;
|
|
17
|
-
box-shadow:
|
|
18
|
-
0px 1px 2px 1px rgba(0, 0, 0, 0.1),
|
|
19
|
-
0px 4px 16px 0px rgba(0, 0, 0, 0.2),
|
|
20
|
-
0px -4px 8px 0px rgba(0, 0, 0, 0.1);
|
|
17
|
+
box-shadow: var(--elevation-300-tooltip);
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
.inline-toolbar-popup__group {
|
|
@@ -32,12 +29,4 @@
|
|
|
32
29
|
background-color: var(--lexical-border-color);
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
|
-
|
|
36
|
-
html[data-theme='light'] {
|
|
37
|
-
.inline-toolbar-popup {
|
|
38
|
-
box-shadow:
|
|
39
|
-
0px 1px 2px 1px rgba(0, 0, 0, 0.05),
|
|
40
|
-
0px 4px 8px 0px rgba(0, 0, 0, 0.1);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
32
|
}
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
align-items: center;
|
|
61
61
|
justify-content: center;
|
|
62
62
|
width: 6px;
|
|
63
|
-
margin: 0
|
|
63
|
+
margin: 0 var(--spacer-1) 0 calc(var(--spacer-1) / 2);
|
|
64
64
|
height: 4px;
|
|
65
65
|
background-color: var(--color-icon);
|
|
66
66
|
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4' viewBox='0 0 6 4' fill='none'%3E%3Cpath d='M4.38921 0.146406C4.58445 -0.0488286 4.90098 -0.0487744 5.09624 0.146406C5.29151 0.341668 5.29151 0.658175 5.09624 0.853437L2.97515 2.97453C2.77987 3.16959 2.46332 3.16972 2.26812 2.97453L0.146049 0.853437C-0.0487219 0.6583 -0.0486443 0.341591 0.146049 0.146406C0.341285 -0.0488288 0.658788 -0.0487749 0.854057 0.146406L2.62164 1.91398L4.38921 0.146406Z' fill='black'/%3E%3C/svg%3E");
|
|
@@ -77,11 +77,7 @@
|
|
|
77
77
|
padding: var(--spacer-2);
|
|
78
78
|
min-width: var(--dropdown-min-width);
|
|
79
79
|
z-index: 100;
|
|
80
|
-
box-shadow:
|
|
81
|
-
0 2px 6px 0 rgba(0, 0, 0, 0.12),
|
|
82
|
-
0 10px 16px 0 rgba(0, 0, 0, 0.08),
|
|
83
|
-
0 0 0.5px 0 rgba(0, 0, 0, 0.12),
|
|
84
|
-
0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
80
|
+
box-shadow: var(--elevation-300-tooltip);
|
|
85
81
|
|
|
86
82
|
.toolbar-popup__dropdown-item {
|
|
87
83
|
all: unset;
|
|
@@ -101,7 +97,7 @@
|
|
|
101
97
|
display: flex;
|
|
102
98
|
align-items: center;
|
|
103
99
|
gap: var(--spacer-1);
|
|
104
|
-
margin-
|
|
100
|
+
margin-inline-end: -var(--spacer-3);
|
|
105
101
|
|
|
106
102
|
.text {
|
|
107
103
|
overflow: hidden;
|
|
@@ -168,15 +164,15 @@
|
|
|
168
164
|
}
|
|
169
165
|
|
|
170
166
|
.btn__tooltip {
|
|
171
|
-
background-color: var(--
|
|
172
|
-
color: var(--
|
|
167
|
+
background-color: var(--color-bg-tooltip);
|
|
168
|
+
color: var(--color-text-ontooltip);
|
|
173
169
|
|
|
174
170
|
&.tooltip--position-top::after {
|
|
175
|
-
border-top-color: var(--
|
|
171
|
+
border-top-color: var(--color-bg-tooltip);
|
|
176
172
|
}
|
|
177
173
|
|
|
178
174
|
&.tooltip--position-bottom::after {
|
|
179
|
-
border-bottom-color: var(--
|
|
175
|
+
border-bottom-color: var(--color-bg-tooltip);
|
|
180
176
|
}
|
|
181
177
|
}
|
|
182
178
|
}
|
|
@@ -198,7 +194,7 @@
|
|
|
198
194
|
& .toolbar-popup__dropdown-item.active::before {
|
|
199
195
|
content: '';
|
|
200
196
|
position: absolute;
|
|
201
|
-
|
|
197
|
+
inset-inline-start: var(--spacer-2-5);
|
|
202
198
|
top: 50%;
|
|
203
199
|
width: var(--spacer-1);
|
|
204
200
|
height: var(--spacer-2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolbarStates.d.ts","sourceRoot":"","sources":["../../../../src/features/toolbars/shared/useToolbarStates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK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AC3C,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAC1C;AAgCD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,GACjC,aAAa,CA2Ff"}
|
|
@@ -114,7 +114,9 @@ export function useToolbarStates(editor, groups) {
|
|
|
114
114
|
}, [editor]);
|
|
115
115
|
useEffect(() => {
|
|
116
116
|
void runDeprioritized(updateStates);
|
|
117
|
-
const listener = () =>
|
|
117
|
+
const listener = () => {
|
|
118
|
+
void runDeprioritized(updateStates);
|
|
119
|
+
};
|
|
118
120
|
const cleanup = mergeRegister(editor.registerUpdateListener(listener));
|
|
119
121
|
document.addEventListener('mouseup', listener);
|
|
120
122
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolbarStates.js","names":["mergeRegister","$getSelection","useCallback","useDeferredValue","useEffect","useRef","useState","useEditorConfigContext","useRunDeprioritized","buildDefaultStates","groups","itemStates","Map","groupStates","length","group","enabledItemKeys","item","items","set","key","active","enabled","push","activeItemKeys","activeItems","enabledGroup","useToolbarStates","editor","states","setStates","deferredStates","editorConfigContext","editorConfigContextRef","current","groupsRef","runDeprioritized","updateStates","getEditorState","read","selection","currentGroups","ctx","newItemStates","newGroupStates","maxActive","type","maxActiveItems","undefined","isActive","isEnabled","listener","cleanup","registerUpdateListener","document","addEventListener","removeEventListener"],"sources":["../../../../src/features/toolbars/shared/useToolbarStates.ts"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { $getSelection } from 'lexical'\nimport { useCallback, useDeferredValue, useEffect, useRef, useState } from 'react'\n\nimport type { ToolbarGroup, ToolbarGroupItem } from '../types.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { useRunDeprioritized } from '../../../utilities/useRunDeprioritized.js'\n\nexport interface ToolbarItemState {\n active: boolean\n enabled: boolean\n}\n\nexport interface ToolbarGroupState {\n activeItemKeys: string[]\n activeItems: ToolbarGroupItem[]\n enabledGroup: boolean\n enabledItemKeys: string[]\n}\n\nexport interface ToolbarStates {\n groupStates: Map<string, ToolbarGroupState>\n itemStates: Map<string, ToolbarItemState>\n}\n\n/**\n * Build default states where every item is enabled and nothing is active.\n * Used as the initial value so toolbar groups render immediately on mount\n * instead of waiting for the first updateStates call.\n */\nfunction buildDefaultStates(groups: ToolbarGroup[] | undefined): ToolbarStates {\n const itemStates = new Map<string, ToolbarItemState>()\n const groupStates = new Map<string, ToolbarGroupState>()\n\n if (!groups?.length) {\n return { groupStates, itemStates }\n }\n\n for (const group of groups) {\n const enabledItemKeys: string[] = []\n for (const item of group.items) {\n itemStates.set(item.key, { active: false, enabled: true })\n enabledItemKeys.push(item.key)\n }\n groupStates.set(group.key, {\n activeItemKeys: [],\n activeItems: [],\n enabledGroup: true,\n enabledItemKeys,\n })\n }\n\n return { groupStates, itemStates }\n}\n\n/**\n * Subscribes once to `editor.registerUpdateListener` and computes\n * isActive / isEnabled for every toolbar item in a read.\n */\nexport function useToolbarStates(\n editor: LexicalEditor,\n groups: ToolbarGroup[] | undefined,\n): ToolbarStates {\n const [states, setStates] = useState<ToolbarStates>(() => buildDefaultStates(groups))\n const deferredStates = useDeferredValue(states)\n\n const editorConfigContext = useEditorConfigContext()\n const editorConfigContextRef = useRef(editorConfigContext)\n editorConfigContextRef.current = editorConfigContext\n\n const groupsRef = useRef(groups)\n groupsRef.current = groups\n\n const runDeprioritized = useRunDeprioritized()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (!selection) {\n return\n }\n\n const currentGroups = groupsRef.current\n if (!currentGroups?.length) {\n return\n }\n\n const ctx = editorConfigContextRef.current\n const newItemStates = new Map<string, ToolbarItemState>()\n const newGroupStates = new Map<string, ToolbarGroupState>()\n\n for (const group of currentGroups) {\n const activeItemKeys: string[] = []\n const activeItems: ToolbarGroupItem[] = []\n const enabledItemKeys: string[] = []\n\n const maxActive = group.type === 'dropdown' ? (group.maxActiveItems ?? 1) : undefined\n\n for (const item of group.items) {\n const isActive = item.isActive\n ? (!maxActive || activeItemKeys.length < maxActive) &&\n item.isActive({ editor, editorConfigContext: ctx, selection })\n : false\n\n const isEnabled = item.isEnabled\n ? item.isEnabled({ editor, editorConfigContext: ctx, selection })\n : true\n\n if (isActive) {\n activeItemKeys.push(item.key)\n activeItems.push(item)\n }\n if (isEnabled) {\n enabledItemKeys.push(item.key)\n }\n\n newItemStates.set(item.key, { active: isActive, enabled: isEnabled })\n }\n\n const enabledGroup =\n group.type === 'dropdown' && group.isEnabled\n ? group.isEnabled({ editor, editorConfigContext: ctx, selection })\n : true\n\n newGroupStates.set(group.key, {\n activeItemKeys,\n activeItems,\n enabledGroup,\n enabledItemKeys,\n })\n }\n\n setStates({ groupStates: newGroupStates, itemStates: newItemStates })\n })\n }, [editor])\n\n useEffect(() => {\n void runDeprioritized(updateStates)\n\n const listener = () => runDeprioritized(updateStates)\n\n const cleanup = mergeRegister(editor.registerUpdateListener(listener))\n document.addEventListener('mouseup', listener)\n\n return () => {\n cleanup()\n document.removeEventListener('mouseup', listener)\n }\n }, [editor, runDeprioritized, updateStates])\n\n return deferredStates\n}\n"],"mappings":"AAAA;;AAGA,SAASA,aAAa,QAAQ;AAC9B,SAASC,aAAa,QAAQ;AAC9B,SAASC,WAAW,EAAEC,gBAAgB,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAI3E,SAASC,sBAAsB,QAAQ;AACvC,SAASC,mBAAmB,QAAQ;AAmBpC;;;;;AAKA,SAASC,mBAAmBC,MAAkC;EAC5D,MAAMC,UAAA,GAAa,IAAIC,GAAA;EACvB,MAAMC,WAAA,GAAc,IAAID,GAAA;EAExB,IAAI,CAACF,MAAA,EAAQI,MAAA,EAAQ;IACnB,OAAO;MAAED,WAAA;MAAaF;IAAW;EACnC;E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nC,KAAA,CAAMmC,SAAS,CAAC;UAAEtB,MAAA;UAAQI,mBAAA,EAAqBU,GAAA;UAAKF;QAAU,KAC9D;QAENI,cAAA,CAAezB,GAAG,CAACJ,KAAA,CAAMK,GAAG,EAAE;UAC5BI,cAAA;UACAC,WAAA;UACAC,YAAA;UACAV;QACF;MACF;MAEAc,SAAA,CAAU;QAAEjB,WAAA,EAAa+B,cAAA;QAAgBjC,UAAA,EAAYgC;MAAc;IACrE;EACF,GAAG,CAACf,MAAA,CAAO;EAEXxB,SAAA,CAAU;IACR,KAAKgC,gBAAA,CAAiBC,YAAA;IAEtB,MAAMc,QAAA,GAAWA,CAAA,
|
|
1
|
+
{"version":3,"file":"useToolbarStates.js","names":["mergeRegister","$getSelection","useCallback","useDeferredValue","useEffect","useRef","useState","useEditorConfigContext","useRunDeprioritized","buildDefaultStates","groups","itemStates","Map","groupStates","length","group","enabledItemKeys","item","items","set","key","active","enabled","push","activeItemKeys","activeItems","enabledGroup","useToolbarStates","editor","states","setStates","deferredStates","editorConfigContext","editorConfigContextRef","current","groupsRef","runDeprioritized","updateStates","getEditorState","read","selection","currentGroups","ctx","newItemStates","newGroupStates","maxActive","type","maxActiveItems","undefined","isActive","isEnabled","listener","cleanup","registerUpdateListener","document","addEventListener","removeEventListener"],"sources":["../../../../src/features/toolbars/shared/useToolbarStates.ts"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { $getSelection } from 'lexical'\nimport { useCallback, useDeferredValue, useEffect, useRef, useState } from 'react'\n\nimport type { ToolbarGroup, ToolbarGroupItem } from '../types.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { useRunDeprioritized } from '../../../utilities/useRunDeprioritized.js'\n\nexport interface ToolbarItemState {\n active: boolean\n enabled: boolean\n}\n\nexport interface ToolbarGroupState {\n activeItemKeys: string[]\n activeItems: ToolbarGroupItem[]\n enabledGroup: boolean\n enabledItemKeys: string[]\n}\n\nexport interface ToolbarStates {\n groupStates: Map<string, ToolbarGroupState>\n itemStates: Map<string, ToolbarItemState>\n}\n\n/**\n * Build default states where every item is enabled and nothing is active.\n * Used as the initial value so toolbar groups render immediately on mount\n * instead of waiting for the first updateStates call.\n */\nfunction buildDefaultStates(groups: ToolbarGroup[] | undefined): ToolbarStates {\n const itemStates = new Map<string, ToolbarItemState>()\n const groupStates = new Map<string, ToolbarGroupState>()\n\n if (!groups?.length) {\n return { groupStates, itemStates }\n }\n\n for (const group of groups) {\n const enabledItemKeys: string[] = []\n for (const item of group.items) {\n itemStates.set(item.key, { active: false, enabled: true })\n enabledItemKeys.push(item.key)\n }\n groupStates.set(group.key, {\n activeItemKeys: [],\n activeItems: [],\n enabledGroup: true,\n enabledItemKeys,\n })\n }\n\n return { groupStates, itemStates }\n}\n\n/**\n * Subscribes once to `editor.registerUpdateListener` and computes\n * isActive / isEnabled for every toolbar item in a read.\n */\nexport function useToolbarStates(\n editor: LexicalEditor,\n groups: ToolbarGroup[] | undefined,\n): ToolbarStates {\n const [states, setStates] = useState<ToolbarStates>(() => buildDefaultStates(groups))\n const deferredStates = useDeferredValue(states)\n\n const editorConfigContext = useEditorConfigContext()\n const editorConfigContextRef = useRef(editorConfigContext)\n editorConfigContextRef.current = editorConfigContext\n\n const groupsRef = useRef(groups)\n groupsRef.current = groups\n\n const runDeprioritized = useRunDeprioritized()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (!selection) {\n return\n }\n\n const currentGroups = groupsRef.current\n if (!currentGroups?.length) {\n return\n }\n\n const ctx = editorConfigContextRef.current\n const newItemStates = new Map<string, ToolbarItemState>()\n const newGroupStates = new Map<string, ToolbarGroupState>()\n\n for (const group of currentGroups) {\n const activeItemKeys: string[] = []\n const activeItems: ToolbarGroupItem[] = []\n const enabledItemKeys: string[] = []\n\n const maxActive = group.type === 'dropdown' ? (group.maxActiveItems ?? 1) : undefined\n\n for (const item of group.items) {\n const isActive = item.isActive\n ? (!maxActive || activeItemKeys.length < maxActive) &&\n item.isActive({ editor, editorConfigContext: ctx, selection })\n : false\n\n const isEnabled = item.isEnabled\n ? item.isEnabled({ editor, editorConfigContext: ctx, selection })\n : true\n\n if (isActive) {\n activeItemKeys.push(item.key)\n activeItems.push(item)\n }\n if (isEnabled) {\n enabledItemKeys.push(item.key)\n }\n\n newItemStates.set(item.key, { active: isActive, enabled: isEnabled })\n }\n\n const enabledGroup =\n group.type === 'dropdown' && group.isEnabled\n ? group.isEnabled({ editor, editorConfigContext: ctx, selection })\n : true\n\n newGroupStates.set(group.key, {\n activeItemKeys,\n activeItems,\n enabledGroup,\n enabledItemKeys,\n })\n }\n\n setStates({ groupStates: newGroupStates, itemStates: newItemStates })\n })\n }, [editor])\n\n useEffect(() => {\n void runDeprioritized(updateStates)\n\n const listener = () => {\n void runDeprioritized(updateStates)\n }\n\n const cleanup = mergeRegister(editor.registerUpdateListener(listener))\n document.addEventListener('mouseup', listener)\n\n return () => {\n cleanup()\n document.removeEventListener('mouseup', listener)\n }\n }, [editor, runDeprioritized, updateStates])\n\n return deferredStates\n}\n"],"mappings":"AAAA;;AAGA,SAASA,aAAa,QAAQ;AAC9B,SAASC,aAAa,QAAQ;AAC9B,SAASC,WAAW,EAAEC,gBAAgB,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAI3E,SAASC,sBAAsB,QAAQ;AACvC,SAASC,mBAAmB,QAAQ;AAmBpC;;;;;AAKA,SAASC,mBAAmBC,MAAkC;EAC5D,MAAMC,UAAA,GAAa,IAAIC,GAAA;EACvB,MAAMC,WAAA,GAAc,IAAID,GAAA;EAExB,IAAI,CAACF,MAAA,EAAQI,MAAA,EAAQ;IACnB,OAAO;MAAED,WAAA;MAAaF;IAAW;EACnC;EAEA,KAAK,MAAMI,KAAA,IAASL,MAAA,EAAQ;IAC1B,MAAMM,eAAA,GAA4B,EAAE;IACpC,KAAK,MAAMC,IAAA,IAAQF,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ezB,GAAG,CAACJ,KAAA,CAAMK,GAAG,EAAE;UAC5BI,cAAA;UACAC,WAAA;UACAC,YAAA;UACAV;QACF;MACF;MAEAc,SAAA,CAAU;QAAEjB,WAAA,EAAa+B,cAAA;QAAgBjC,UAAA,EAAYgC;MAAc;IACrE;EACF,GAAG,CAACf,MAAA,CAAO;EAEXxB,SAAA,CAAU;IACR,KAAKgC,gBAAA,CAAiBC,YAAA;IAEtB,MAAMc,QAAA,GAAWA,CAAA;MACf,KAAKf,gBAAA,CAAiBC,YAAA;IACxB;IAEA,MAAMe,OAAA,GAAUpD,aAAA,CAAc4B,MAAA,CAAOyB,sBAAsB,CAACF,QAAA;IAC5DG,QAAA,CAASC,gBAAgB,CAAC,WAAWJ,QAAA;IAErC,OAAO;MACLC,OAAA;MACAE,QAAA,CAASE,mBAAmB,CAAC,WAAWL,QAAA;IAC1C;EACF,GAAG,CAACvB,MAAA,EAAQQ,gBAAA,EAAkBC,YAAA,CAAa;EAE3C,OAAON,cAAA;AACT","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { Transformer } from '@lexical/markdown';
|
|
1
2
|
import type { Klass, LexicalEditor, LexicalNode, LexicalNodeReplacement, TextFormatType } from 'lexical';
|
|
2
3
|
import type { ClientConfig, RichTextFieldClient } from 'payload';
|
|
3
4
|
import type React from 'react';
|
|
4
5
|
import type { JSX } from 'react';
|
|
5
6
|
import type { ClientEditorConfig } from '../lexical/config/types.js';
|
|
6
7
|
import type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
|
|
7
|
-
import type { Transformer } from '../packages/@lexical/markdown/index.js';
|
|
8
8
|
import type { FeatureClientSchemaMap } from '../types/index.js';
|
|
9
9
|
import type { ToolbarGroup } from './toolbars/types.js';
|
|
10
10
|
export type FeatureProviderProviderClient<UnSanitizedClientFeatureProps = undefined, ClientFeatureProps = UnSanitizedClientFeatureProps> = (props: BaseClientFeatureProps<ClientFeatureProps>) => FeatureProviderClient<ClientFeatureProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typesClient.d.ts","sourceRoot":"","sources":["../../src/features/typesClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,cAAc,EACf,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACtG,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"typesClient.d.ts","sourceRoot":"","sources":["../../src/features/typesClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,cAAc,EACf,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACtG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD,MAAM,MAAM,6BAA6B,CACvC,6BAA6B,GAAG,SAA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{\n Klass,\n LexicalEditor,\n LexicalNode,\n LexicalNodeReplacement,\n TextFormatType,\n} from 'lexical'\nimport type { ClientConfig, RichTextFieldClient } from 'payload'\nimport type React from 'react'\nimport type { JSX } from 'react'\n\nimport type { ClientEditorConfig } from '../lexical/config/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { Transformer } from '../packages/@lexical/markdown/index.js'\nimport type { FeatureClientSchemaMap } from '../types/index.js'\nimport type { ToolbarGroup } from './toolbars/types.js'\n\nexport type FeatureProviderProviderClient<\n UnSanitizedClientFeatureProps = undefined,\n ClientFeatureProps = UnSanitizedClientFeatureProps,\n> = (props: BaseClientFeatureProps<ClientFeatureProps>) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<\n UnSanitizedClientFeatureProps = undefined,\n ClientFeatureProps = UnSanitizedClientFeatureProps,\n> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: BaseClientFeatureProps<UnSanitizedClientFeatureProps>\n feature:\n | ((props: {\n config: ClientConfig\n featureClientImportMap: Record<string, any>\n featureClientSchemaMap: FeatureClientSchemaMap\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n field?: RichTextFieldClient\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n schemaPath: string\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>)\n | ClientFeature<ClientFeatureProps>\n}\n\nexport type PluginComponent<ClientFeatureProps = any> = React.FC<{\n clientProps: ClientFeatureProps\n}>\nexport type PluginComponentWithAnchor<ClientFeatureProps = any> = React.FC<{\n anchorElem: HTMLElement\n clientProps: ClientFeatureProps\n}>\n\n/**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\nexport type SanitizedPlugin =\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n Component: PluginComponent\n key: string\n position: 'aboveContainer'\n }\n | {\n clientProps: any\n Component: PluginComponent\n key: string\n position: 'belowContainer'\n }\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * The text formats which are enabled by this feature.\n */\n enableFormats?: TextFormatType[]\n markdownTransformers?: (\n | ((props: {\n allNodes: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n allTransformers: Transformer[]\n }) => Transformer)\n | Transformer\n )[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'aboveContainer' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor<ClientFeatureProps>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n | {\n Component: PluginComponent<ClientFeatureProps>\n position: 'belowContainer' // Determines at which position the Component will be added.\n }\n >\n /**\n * Client Features can register their own providers, which will be nested below the EditorConfigProvider\n */\n providers?: Array<React.FC<{ children: JSX.Element }>>\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n sanitizedClientFeatureProps?: BaseClientFeatureProps<ClientFeatureProps>\n slashMenu?: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups?: SlashMenuGroup[]\n }\n /**\n * An opt-in, classic fixed toolbar which stays at the top of the editor\n */\n toolbarFixed?: {\n groups: ToolbarGroup[]\n }\n /**\n * The default, floating toolbar which appears when you select text.\n */\n toolbarInline?: {\n /**\n * Array of toolbar groups / sections. Each section can contain multiple toolbar items.\n */\n groups: ToolbarGroup[]\n }\n}\n\nexport type BaseClientFeatureProps<ClientFeatureProps> = ClientFeatureProps extends undefined\n ? {\n featureKey: string\n order: number\n }\n : {\n featureKey: string\n order: number\n } & ClientFeatureProps\n\nexport type ResolvedClientFeature<ClientFeatureProps> = {\n key: string\n order: number\n} & ClientFeature<ClientFeatureProps>\n\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<any>>\n\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<any, any>>\n\nexport type SanitizedClientFeatures = {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n enabledFormats: TextFormatType[]\n markdownTransformers: Transformer[]\n\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups: SlashMenuGroup[]\n }\n} & Required<\n Pick<ResolvedClientFeature<unknown>, 'nodes' | 'providers' | 'toolbarFixed' | 'toolbarInline'>\n>\n"],"mappings":"AAuNA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"typesClient.js","names":[],"sources":["../../src/features/typesClient.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type {\n Klass,\n LexicalEditor,\n LexicalNode,\n LexicalNodeReplacement,\n TextFormatType,\n} from 'lexical'\nimport type { ClientConfig, RichTextFieldClient } from 'payload'\nimport type React from 'react'\nimport type { JSX } from 'react'\n\nimport type { ClientEditorConfig } from '../lexical/config/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { FeatureClientSchemaMap } from '../types/index.js'\nimport type { ToolbarGroup } from './toolbars/types.js'\n\nexport type FeatureProviderProviderClient<\n UnSanitizedClientFeatureProps = undefined,\n ClientFeatureProps = UnSanitizedClientFeatureProps,\n> = (props: BaseClientFeatureProps<ClientFeatureProps>) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<\n UnSanitizedClientFeatureProps = undefined,\n ClientFeatureProps = UnSanitizedClientFeatureProps,\n> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: BaseClientFeatureProps<UnSanitizedClientFeatureProps>\n feature:\n | ((props: {\n config: ClientConfig\n featureClientImportMap: Record<string, any>\n featureClientSchemaMap: FeatureClientSchemaMap\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n field?: RichTextFieldClient\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n schemaPath: string\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>)\n | ClientFeature<ClientFeatureProps>\n}\n\nexport type PluginComponent<ClientFeatureProps = any> = React.FC<{\n clientProps: ClientFeatureProps\n}>\nexport type PluginComponentWithAnchor<ClientFeatureProps = any> = React.FC<{\n anchorElem: HTMLElement\n clientProps: ClientFeatureProps\n}>\n\n/**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\nexport type SanitizedPlugin =\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n | {\n clientProps: any\n Component: PluginComponent\n key: string\n position: 'aboveContainer'\n }\n | {\n clientProps: any\n Component: PluginComponent\n key: string\n position: 'belowContainer'\n }\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * The text formats which are enabled by this feature.\n */\n enableFormats?: TextFormatType[]\n markdownTransformers?: (\n | ((props: {\n allNodes: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n allTransformers: Transformer[]\n }) => Transformer)\n | Transformer\n )[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'aboveContainer' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor<ClientFeatureProps>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n | {\n Component: PluginComponent<ClientFeatureProps>\n position: 'belowContainer' // Determines at which position the Component will be added.\n }\n >\n /**\n * Client Features can register their own providers, which will be nested below the EditorConfigProvider\n */\n providers?: Array<React.FC<{ children: JSX.Element }>>\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n sanitizedClientFeatureProps?: BaseClientFeatureProps<ClientFeatureProps>\n slashMenu?: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups?: SlashMenuGroup[]\n }\n /**\n * An opt-in, classic fixed toolbar which stays at the top of the editor\n */\n toolbarFixed?: {\n groups: ToolbarGroup[]\n }\n /**\n * The default, floating toolbar which appears when you select text.\n */\n toolbarInline?: {\n /**\n * Array of toolbar groups / sections. Each section can contain multiple toolbar items.\n */\n groups: ToolbarGroup[]\n }\n}\n\nexport type BaseClientFeatureProps<ClientFeatureProps> = ClientFeatureProps extends undefined\n ? {\n featureKey: string\n order: number\n }\n : {\n featureKey: string\n order: number\n } & ClientFeatureProps\n\nexport type ResolvedClientFeature<ClientFeatureProps> = {\n key: string\n order: number\n} & ClientFeature<ClientFeatureProps>\n\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<any>>\n\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<any, any>>\n\nexport type SanitizedClientFeatures = {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n enabledFormats: TextFormatType[]\n markdownTransformers: Transformer[]\n\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups: SlashMenuGroup[]\n }\n} & Required<\n Pick<ResolvedClientFeature<unknown>, 'nodes' | 'providers' | 'toolbarFixed' | 'toolbarInline'>\n>\n"],"mappings":"AAuNA","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { Transformer } from '@lexical/markdown';
|
|
1
2
|
import type { GenericLanguages, I18nClient } from '@payloadcms/translations';
|
|
2
3
|
import type { JSONSchema4 } from 'json-schema';
|
|
3
4
|
import type { Klass, LexicalNode, LexicalNodeReplacement, SerializedEditorState, SerializedLexicalNode } from 'lexical';
|
|
4
5
|
import type { Field, FieldSchemaMap, FieldsToJSONSchemaArgs, ImportMapGenerators, JsonObject, PayloadComponent, PayloadRequest, PopulateType, ReplaceAny, RequestContext, RichTextField, RichTextHooks, SanitizedConfig, TypedFallbackLocale, ValidateOptions, ValidationFieldError } from 'payload';
|
|
5
6
|
import type { ServerEditorConfig } from '../lexical/config/types.js';
|
|
6
|
-
import type { Transformer } from '../packages/@lexical/markdown/index.js';
|
|
7
7
|
import type { LexicalRichTextField } from '../types/index.js';
|
|
8
8
|
import type { ElementNodeSchemaFn } from '../types/jsonSchemaHelpers.js';
|
|
9
9
|
import type { BaseClientFeatureProps } from './typesClient.js';
|
|
@@ -157,7 +157,7 @@ export type JSONSchemaArgs = {
|
|
|
157
157
|
field: LexicalRichTextField;
|
|
158
158
|
/** TS name of the node union - use in `tsType` annotations. */
|
|
159
159
|
nodeUnionName: string;
|
|
160
|
-
} & Pick<FieldsToJSONSchemaArgs, 'collectionIDFieldTypes' | 'config' | 'i18n' | 'interfaceNameDefinitions' | 'typeStringDefinitions'>;
|
|
160
|
+
} & Pick<FieldsToJSONSchemaArgs, 'collectionIDFieldTypes' | 'config' | 'i18n' | 'interfaceNameDefinitions' | 'typeStringDefinitions' | 'variant'>;
|
|
161
161
|
export type JSONSchemaFn = (args: JSONSchemaArgs) => JSONSchema4;
|
|
162
162
|
export type NodeWithHooks<T extends LexicalNode = any> = {
|
|
163
163
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typesServer.d.ts","sourceRoot":"","sources":["../../src/features/typesServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"typesServer.d.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