@payloadcms/richtext-lexical 3.0.0-beta.97 → 3.0.0-beta.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +20 -68
- package/dist/cell/index.js.map +1 -1
- package/dist/exports/client/Field-WN5O3VIW.js +2 -0
- package/dist/exports/client/Field-WN5O3VIW.js.map +7 -0
- package/dist/exports/client/{RelationshipComponent-CPYVT3XN.js → RelationshipComponent-Z5SZ5FFT.js} +2 -2
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/{chunk-BR57XNHD.js → chunk-366OGJYE.js} +2 -2
- package/dist/exports/client/{chunk-XIBMVIFW.js → chunk-7UTZDNYS.js} +2 -2
- package/dist/exports/client/{chunk-EPEFKP5H.js → chunk-GTKNWSQW.js} +2 -2
- package/dist/exports/client/{chunk-MFAXC4ZA.js → chunk-TXEIKM77.js} +1 -1
- package/dist/exports/client/chunk-TXEIKM77.js.map +7 -0
- package/dist/exports/client/{component-BRCRMQID.js → component-LHFD5Z33.js} +2 -2
- package/dist/exports/client/component-UJILB3MH.js +2 -0
- package/dist/exports/client/component-UJILB3MH.js.map +7 -0
- package/dist/exports/client/{componentInline-RETIC4OV.js → componentInline-JLMSR7BP.js} +2 -2
- package/dist/exports/client/index.d.ts +0 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +12 -12
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/align/client/index.d.ts +1 -4
- package/dist/features/align/client/index.d.ts.map +1 -1
- package/dist/features/blockquote/client/index.d.ts +1 -4
- package/dist/features/blockquote/client/index.d.ts.map +1 -1
- package/dist/features/blocks/client/index.d.ts +1 -4
- package/dist/features/blocks/client/index.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/client/index.d.ts +1 -4
- package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -1
- package/dist/features/debug/treeView/client/index.d.ts +1 -4
- package/dist/features/debug/treeView/client/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/index.d.ts +1 -1
- package/dist/features/experimental_table/client/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.d.ts +1 -4
- package/dist/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.client.d.ts +1 -4
- package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
- package/dist/features/format/italic/feature.client.d.ts +1 -4
- package/dist/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.client.d.ts +1 -4
- package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.client.d.ts +1 -4
- package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.client.d.ts +1 -4
- package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/underline/feature.client.d.ts +1 -4
- package/dist/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/features/heading/client/index.d.ts +1 -4
- package/dist/features/heading/client/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/index.d.ts +1 -4
- package/dist/features/horizontalRule/client/index.d.ts.map +1 -1
- package/dist/features/indent/client/index.d.ts +1 -4
- package/dist/features/indent/client/index.d.ts.map +1 -1
- package/dist/features/link/client/index.d.ts +1 -13
- package/dist/features/link/client/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/client/index.d.ts +1 -4
- package/dist/features/lists/checklist/client/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/client/index.d.ts +1 -4
- package/dist/features/lists/orderedList/client/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/client/index.d.ts +1 -4
- package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -4
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -4
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +1 -3
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
- package/dist/features/paragraph/client/index.d.ts +1 -4
- package/dist/features/paragraph/client/index.d.ts.map +1 -1
- package/dist/features/relationship/client/index.d.ts +2 -17
- package/dist/features/relationship/client/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/client/index.d.ts +1 -4
- package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -1
- package/dist/features/toolbars/inline/client/index.d.ts +1 -4
- package/dist/features/toolbars/inline/client/index.d.ts.map +1 -1
- package/dist/features/typesClient.d.ts +4 -5
- 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.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +17 -18
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/feature.client.d.ts +1 -4
- package/dist/features/upload/client/feature.client.d.ts.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +62 -71
- package/dist/field/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +1 -3
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js +7 -19
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js +1 -1
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +9 -7
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/types.d.ts +3 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utilities/createClientFeature.d.ts +3 -5
- package/dist/utilities/createClientFeature.d.ts.map +1 -1
- package/dist/utilities/createClientFeature.js +1 -4
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/generateComponentMap.d.ts.map +1 -1
- package/dist/utilities/generateComponentMap.js +10 -17
- package/dist/utilities/generateComponentMap.js.map +1 -1
- package/package.json +7 -7
- package/dist/exports/client/Field-MPDY6IHA.js +0 -2
- package/dist/exports/client/Field-MPDY6IHA.js.map +0 -7
- package/dist/exports/client/chunk-MFAXC4ZA.js.map +0 -7
- package/dist/exports/client/component-3EGTURAI.js +0 -2
- package/dist/exports/client/component-3EGTURAI.js.map +0 -7
- package/dist/features/createClientComponent.d.ts +0 -7
- package/dist/features/createClientComponent.d.ts.map +0 -1
- package/dist/features/createClientComponent.js +0 -13
- package/dist/features/createClientComponent.js.map +0 -1
- package/dist/features/createFeaturePropComponent.d.ts +0 -6
- package/dist/features/createFeaturePropComponent.d.ts.map +0 -1
- package/dist/features/createFeaturePropComponent.js +0 -19
- package/dist/features/createFeaturePropComponent.js.map +0 -1
- /package/dist/exports/client/{RelationshipComponent-CPYVT3XN.js.map → RelationshipComponent-Z5SZ5FFT.js.map} +0 -0
- /package/dist/exports/client/{chunk-BR57XNHD.js.map → chunk-366OGJYE.js.map} +0 -0
- /package/dist/exports/client/{chunk-XIBMVIFW.js.map → chunk-7UTZDNYS.js.map} +0 -0
- /package/dist/exports/client/{chunk-EPEFKP5H.js.map → chunk-GTKNWSQW.js.map} +0 -0
- /package/dist/exports/client/{component-BRCRMQID.js.map → component-LHFD5Z33.js.map} +0 -0
- /package/dist/exports/client/{componentInline-RETIC4OV.js.map → componentInline-JLMSR7BP.js.map} +0 -0
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const AlignFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const AlignFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/index.tsx"],"names":[],"mappings":"AAsJA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/index.tsx"],"names":[],"mappings":"AAsJA,eAAO,MAAM,kBAAkB,oFAO7B,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const BlockquoteFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const BlockquoteFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/client/index.tsx"],"names":[],"mappings":"AA4CA,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/client/index.tsx"],"names":[],"mappings":"AA4CA,eAAO,MAAM,uBAAuB,oFA8BlC,CAAA"}
|
|
@@ -2,8 +2,5 @@ export type BlocksFeatureClientProps = {
|
|
|
2
2
|
clientBlockSlugs: string[];
|
|
3
3
|
clientInlineBlockSlugs: string[];
|
|
4
4
|
};
|
|
5
|
-
export declare const BlocksFeatureClient: import("
|
|
6
|
-
featureKey: string;
|
|
7
|
-
order: number;
|
|
8
|
-
} & BlocksFeatureClientProps>;
|
|
5
|
+
export declare const BlocksFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<BlocksFeatureClientProps, BlocksFeatureClientProps>;
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/client/index.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,wBAAwB,GAAG;IACrC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,sBAAsB,EAAE,MAAM,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/client/index.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,wBAAwB,GAAG;IACrC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,sBAAsB,EAAE,MAAM,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,mBAAmB,kHA0K7B,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const TestRecorderFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const TestRecorderFeatureClient: import("../../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/testRecorder/client/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/testRecorder/client/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,uFAOpC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const TreeViewFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const TreeViewFeatureClient: import("../../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/treeView/client/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/treeView/client/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,uFAOhC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const TableFeatureClient: import("
|
|
1
|
+
export declare const TableFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, any>;
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/experimental_table/client/index.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/experimental_table/client/index.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,kBAAkB,8EAkD7B,CAAA"}
|
|
@@ -29,7 +29,7 @@ function isTableSelectionRectangular(selection) {
|
|
|
29
29
|
const node = nodes[i];
|
|
30
30
|
if ($isTableCellNode(node)) {
|
|
31
31
|
const row = node.getParentOrThrow();
|
|
32
|
-
if (
|
|
32
|
+
if (!$isTableRowNode(row)) {
|
|
33
33
|
throw new Error('Expected CellNode to have a RowNode parent');
|
|
34
34
|
}
|
|
35
35
|
if (currentRow !== row) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","$deleteTableColumn__EXPERIMENTAL","$deleteTableRow__EXPERIMENTAL","$getNodeTriplet","$getTableCellNodeFromLexicalNode","$getTableColumnIndexFromTableCellNode","$getTableNodeFromLexicalNodeOrThrow","$getTableRowIndexFromTableCellNode","$insertTableColumn__EXPERIMENTAL","$insertTableRow__EXPERIMENTAL","$isTableCellNode","$isTableRowNode","$isTableSelection","$unmergeCell","getTableObserverFromTableElement","TableCellHeaderStates","TableCellNode","useScrollInfo","$createParagraphNode","$getRoot","$getSelection","$isElementNode","$isParagraphNode","$isRangeSelection","$isTextNode","React","useCallback","useEffect","useRef","useState","createPortal","MeatballsIcon","computeSelectionCount","selection","selectionShape","getShape","columns","toX","fromX","rows","toY","fromY","isTableSelectionRectangular","nodes","getNodes","currentRows","currentRow","expectedColumns","currentColumns","i","length","node","row","getParentOrThrow","Error","colSpan","__colSpan","j","undefined","__rowSpan","every","v","$canUnmerge","isCollapsed","anchor","is","focus","cell","$cellContainsEmptyParagraph","getChildrenSize","firstChild","getFirstChildOrThrow","isEmpty","$selectLastDescendant","lastDescendant","getLastDescendant","select","selectEnd","selectNext","TableActionMenu","cellMerge","contextRef","onClose","setIsMenuOpen","tableCellNode","_tableCellNode","editor","dropDownRef","updateTableCellNode","selectionCounts","updateSelectionCounts","canMergeCells","setCanMergeCells","canUnmergeCell","setCanUnmergeCell","y","registerMutationListener","nodeMutations","nodeUpdated","get","getKey","getEditorState","read","getLatest","skipInitialization","currentSelectionCounts","menuButtonElement","current","dropDownElement","rootElement","getRootElement","rootEleRect","getBoundingClientRect","menuButtonRect","style","opacity","dropDownElementRect","margin","leftPosition","right","width","window","innerWidth","position","left","pageXOffset","topPosition","top","height","innerHeight","bottom","pageYOffset","handleClickOutside","event","contains","target","addEventListener","removeEventListener","clearTableSelection","update","isAttached","tableNode","tableElement","getElementByKey","tableSelection","clearHighlight","markDirty","rootNode","selectStart","mergeTableCellsAtSelection","firstCell","setColSpan","setRowSpan","getFirstChild","remove","append","getChildren","unmergeTableCellsAtSelection","insertTableRowAtSelection","shouldInsertAfter","insertTableColumnAtSelection","deleteTableRowAtSelection","deleteTableAtSelection","deleteTableColumnAtSelection","toggleTableRowIsHeader","tableRowIndex","tableRows","tableRow","forEach","tableCell","toggleHeaderStyle","ROW","toggleTableColumnIsHeader","tableColumnIndex","maxRowsLength","Math","max","map","r","tableCells","COLUMN","mergeCellButton","_jsx","className","onClick","type","_jsxs","e","stopPropagation","ref","Fragment","__headerState","document","body","TableCellActionMenuContainer","anchorElem","menuButtonRef","menuRootRef","isMenuOpen","setTableMenuCellNode","$moveMenu","menu","nativeSelection","getSelection","activeElement","anchorNode","tableCellNodeFromSelection","getNode","tableCellParentNodeDOM","registerUpdateListener","menuButtonDOM","tableCellNodeDOM","tableCellRect","menuRect","anchorRect","transform","prevTableCellDOM","TableActionMenuPlugin","isEditable"],"sources":["../../../../../../src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx"],"sourcesContent":["'use client'\n\nimport type {\n HTMLTableElementWithWithTableSelectionState,\n TableRowNode,\n TableSelection,\n} from '@lexical/table'\nimport type { ElementNode } from 'lexical'\nimport type { JSX } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n $deleteTableColumn__EXPERIMENTAL,\n $deleteTableRow__EXPERIMENTAL,\n $getNodeTriplet,\n $getTableCellNodeFromLexicalNode,\n $getTableColumnIndexFromTableCellNode,\n $getTableNodeFromLexicalNodeOrThrow,\n $getTableRowIndexFromTableCellNode,\n $insertTableColumn__EXPERIMENTAL,\n $insertTableRow__EXPERIMENTAL,\n $isTableCellNode,\n $isTableRowNode,\n $isTableSelection,\n $unmergeCell,\n getTableObserverFromTableElement,\n TableCellHeaderStates,\n TableCellNode,\n} from '@lexical/table'\nimport { useScrollInfo } from '@payloadcms/ui'\nimport {\n $createParagraphNode,\n $getRoot,\n $getSelection,\n $isElementNode,\n $isParagraphNode,\n $isRangeSelection,\n $isTextNode,\n} from 'lexical'\nimport * as React from 'react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../../typesClient.js'\n\nimport { MeatballsIcon } from '../../../../../lexical/ui/icons/Meatballs/index.js'\nimport './index.scss'\n\nfunction computeSelectionCount(selection: TableSelection): {\n columns: number\n rows: number\n} {\n const selectionShape = selection.getShape()\n return {\n columns: selectionShape.toX - selectionShape.fromX + 1,\n rows: selectionShape.toY - selectionShape.fromY + 1,\n }\n}\n\n// This is important when merging cells as there is no good way to re-merge weird shapes (a result\n// of selecting merged cells and non-merged)\nfunction isTableSelectionRectangular(selection: TableSelection): boolean {\n const nodes = selection.getNodes()\n const currentRows: Array<number> = []\n let currentRow = null\n let expectedColumns = null\n let currentColumns = 0\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]\n if ($isTableCellNode(node)) {\n const row = node.getParentOrThrow()\n if ($isTableRowNode(row)) {\n throw new Error('Expected CellNode to have a RowNode parent')\n }\n if (currentRow !== row) {\n if (expectedColumns !== null && currentColumns !== expectedColumns) {\n return false\n }\n if (currentRow !== null) {\n expectedColumns = currentColumns\n }\n currentRow = row\n currentColumns = 0\n }\n const colSpan = node.__colSpan\n for (let j = 0; j < colSpan; j++) {\n if (currentRows[currentColumns + j] === undefined) {\n currentRows[currentColumns + j] = 0\n }\n currentRows[currentColumns + j] += node.__rowSpan\n }\n currentColumns += colSpan\n }\n }\n return (\n (expectedColumns === null || currentColumns === expectedColumns) &&\n currentRows.every((v) => v === currentRows[0])\n )\n}\n\nfunction $canUnmerge(): boolean {\n const selection = $getSelection()\n if (\n ($isRangeSelection(selection) && !selection.isCollapsed()) ||\n ($isTableSelection(selection) && !selection.anchor.is(selection.focus)) ||\n (!$isRangeSelection(selection) && !$isTableSelection(selection))\n ) {\n return false\n }\n const [cell] = $getNodeTriplet(selection.anchor)\n return cell.__colSpan > 1 || cell.__rowSpan > 1\n}\n\nfunction $cellContainsEmptyParagraph(cell: TableCellNode): boolean {\n if (cell.getChildrenSize() !== 1) {\n return false\n }\n const firstChild = cell.getFirstChildOrThrow()\n if (!$isParagraphNode(firstChild) || !firstChild.isEmpty()) {\n return false\n }\n return true\n}\n\nfunction $selectLastDescendant(node: ElementNode): void {\n const lastDescendant = node.getLastDescendant()\n if ($isTextNode(lastDescendant)) {\n lastDescendant.select()\n } else if ($isElementNode(lastDescendant)) {\n lastDescendant.selectEnd()\n } else if (lastDescendant !== null) {\n lastDescendant.selectNext()\n }\n}\n\ntype TableCellActionMenuProps = Readonly<{\n cellMerge: boolean\n contextRef: { current: HTMLElement | null }\n onClose: () => void\n setIsMenuOpen: (isOpen: boolean) => void\n tableCellNode: TableCellNode\n}>\n\nfunction TableActionMenu({\n cellMerge,\n contextRef,\n onClose,\n setIsMenuOpen,\n tableCellNode: _tableCellNode,\n}: TableCellActionMenuProps) {\n const [editor] = useLexicalComposerContext()\n const dropDownRef = useRef<HTMLDivElement | null>(null)\n const [tableCellNode, updateTableCellNode] = useState(_tableCellNode)\n const [selectionCounts, updateSelectionCounts] = useState({\n columns: 1,\n rows: 1,\n })\n const [canMergeCells, setCanMergeCells] = useState(false)\n const [canUnmergeCell, setCanUnmergeCell] = useState(false)\n const { y } = useScrollInfo()\n\n useEffect(() => {\n return editor.registerMutationListener(\n TableCellNode,\n (nodeMutations) => {\n const nodeUpdated = nodeMutations.get(tableCellNode.getKey()) === 'updated'\n\n if (nodeUpdated) {\n editor.getEditorState().read(() => {\n updateTableCellNode(tableCellNode.getLatest())\n })\n }\n },\n { skipInitialization: true },\n )\n }, [editor, tableCellNode])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n // Merge cells\n if ($isTableSelection(selection)) {\n const currentSelectionCounts = computeSelectionCount(selection)\n updateSelectionCounts(computeSelectionCount(selection))\n setCanMergeCells(\n isTableSelectionRectangular(selection) &&\n (currentSelectionCounts.columns > 1 || currentSelectionCounts.rows > 1),\n )\n }\n // Unmerge cell\n setCanUnmergeCell($canUnmerge())\n })\n }, [editor])\n\n useEffect(() => {\n const menuButtonElement = contextRef.current\n const dropDownElement = dropDownRef.current\n const rootElement = editor.getRootElement()\n\n if (menuButtonElement != null && dropDownElement != null && rootElement != null) {\n const rootEleRect = rootElement.getBoundingClientRect()\n const menuButtonRect = menuButtonElement.getBoundingClientRect()\n dropDownElement.style.opacity = '1'\n const dropDownElementRect = dropDownElement.getBoundingClientRect()\n const margin = 5\n let leftPosition = menuButtonRect.right + margin\n if (\n leftPosition + dropDownElementRect.width > window.innerWidth ||\n leftPosition + dropDownElementRect.width > rootEleRect.right\n ) {\n const position = menuButtonRect.left - dropDownElementRect.width - margin\n leftPosition = (position < 0 ? margin : position) + window.pageXOffset\n }\n dropDownElement.style.left = `${leftPosition + window.pageXOffset}px`\n\n let topPosition = menuButtonRect.top\n if (topPosition + dropDownElementRect.height > window.innerHeight) {\n const position = menuButtonRect.bottom - dropDownElementRect.height\n topPosition = (position < 0 ? margin : position) + window.pageYOffset\n }\n dropDownElement.style.top = `${topPosition}px`\n }\n }, [contextRef, dropDownRef, editor, y])\n\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n if (\n dropDownRef.current != null &&\n contextRef.current != null &&\n !dropDownRef.current.contains(event.target as Node) &&\n !contextRef.current.contains(event.target as Node)\n ) {\n setIsMenuOpen(false)\n }\n }\n\n window.addEventListener('click', handleClickOutside)\n\n return () => window.removeEventListener('click', handleClickOutside)\n }, [setIsMenuOpen, contextRef])\n\n const clearTableSelection = useCallback(() => {\n editor.update(() => {\n if (tableCellNode.isAttached()) {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n const tableElement = editor.getElementByKey(\n tableNode.getKey(),\n ) as HTMLTableElementWithWithTableSelectionState\n\n if (!tableElement) {\n throw new Error('Expected to find tableElement in DOM')\n }\n\n const tableSelection = getTableObserverFromTableElement(tableElement)\n if (tableSelection !== null) {\n tableSelection.clearHighlight()\n }\n\n tableNode.markDirty()\n updateTableCellNode(tableCellNode.getLatest())\n }\n\n const rootNode = $getRoot()\n rootNode.selectStart()\n })\n }, [editor, tableCellNode])\n\n const mergeTableCellsAtSelection = () => {\n editor.update(() => {\n const selection = $getSelection()\n if ($isTableSelection(selection)) {\n const { columns, rows } = computeSelectionCount(selection)\n const nodes = selection.getNodes()\n let firstCell: null | TableCellNode = null\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]\n if ($isTableCellNode(node)) {\n if (firstCell === null) {\n node.setColSpan(columns).setRowSpan(rows)\n firstCell = node\n const isEmpty = $cellContainsEmptyParagraph(node)\n let firstChild\n if (isEmpty && $isParagraphNode((firstChild = node.getFirstChild()))) {\n firstChild.remove()\n }\n } else if ($isTableCellNode(firstCell)) {\n const isEmpty = $cellContainsEmptyParagraph(node)\n if (!isEmpty) {\n firstCell.append(...node.getChildren())\n }\n node.remove()\n }\n }\n }\n if (firstCell !== null) {\n if (firstCell.getChildrenSize() === 0) {\n firstCell.append($createParagraphNode())\n }\n $selectLastDescendant(firstCell)\n }\n onClose()\n }\n })\n }\n\n const unmergeTableCellsAtSelection = () => {\n editor.update(() => {\n $unmergeCell()\n })\n }\n\n const insertTableRowAtSelection = useCallback(\n (shouldInsertAfter: boolean) => {\n editor.update(() => {\n $insertTableRow__EXPERIMENTAL(shouldInsertAfter)\n onClose()\n })\n },\n [editor, onClose],\n )\n\n const insertTableColumnAtSelection = useCallback(\n (shouldInsertAfter: boolean) => {\n editor.update(() => {\n for (let i = 0; i < selectionCounts.columns; i++) {\n $insertTableColumn__EXPERIMENTAL(shouldInsertAfter)\n }\n onClose()\n })\n },\n [editor, onClose, selectionCounts.columns],\n )\n\n const deleteTableRowAtSelection = useCallback(() => {\n editor.update(() => {\n $deleteTableRow__EXPERIMENTAL()\n onClose()\n })\n }, [editor, onClose])\n\n const deleteTableAtSelection = useCallback(() => {\n editor.update(() => {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n tableNode.remove()\n\n clearTableSelection()\n onClose()\n })\n }, [editor, tableCellNode, clearTableSelection, onClose])\n\n const deleteTableColumnAtSelection = useCallback(() => {\n editor.update(() => {\n $deleteTableColumn__EXPERIMENTAL()\n onClose()\n })\n }, [editor, onClose])\n\n const toggleTableRowIsHeader = useCallback(() => {\n editor.update(() => {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n\n const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode)\n\n const tableRows = tableNode.getChildren()\n\n if (tableRowIndex >= tableRows.length || tableRowIndex < 0) {\n throw new Error('Expected table cell to be inside of table row.')\n }\n\n const tableRow = tableRows[tableRowIndex]\n\n if (!$isTableRowNode(tableRow)) {\n throw new Error('Expected table row')\n }\n\n tableRow.getChildren().forEach((tableCell) => {\n if (!$isTableCellNode(tableCell)) {\n throw new Error('Expected table cell')\n }\n\n tableCell.toggleHeaderStyle(TableCellHeaderStates.ROW)\n })\n\n clearTableSelection()\n onClose()\n })\n }, [editor, tableCellNode, clearTableSelection, onClose])\n\n const toggleTableColumnIsHeader = useCallback(() => {\n editor.update(() => {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n\n const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode)\n\n const tableRows = tableNode.getChildren<TableRowNode>()\n const maxRowsLength = Math.max(...tableRows.map((row) => row.getChildren().length))\n\n if (tableColumnIndex >= maxRowsLength || tableColumnIndex < 0) {\n throw new Error('Expected table cell to be inside of table row.')\n }\n\n for (let r = 0; r < tableRows.length; r++) {\n const tableRow = tableRows[r]\n\n if (!$isTableRowNode(tableRow)) {\n throw new Error('Expected table row')\n }\n\n const tableCells = tableRow.getChildren()\n if (tableColumnIndex >= tableCells.length) {\n // if cell is outside of bounds for the current row (for example various merge cell cases) we shouldn't highlight it\n continue\n }\n\n const tableCell = tableCells[tableColumnIndex]\n\n if (!$isTableCellNode(tableCell)) {\n throw new Error('Expected table cell')\n }\n\n tableCell.toggleHeaderStyle(TableCellHeaderStates.COLUMN)\n }\n\n clearTableSelection()\n onClose()\n })\n }, [editor, tableCellNode, clearTableSelection, onClose])\n\n let mergeCellButton: JSX.Element | null = null\n if (cellMerge) {\n if (canMergeCells) {\n mergeCellButton = (\n <button\n className=\"item\"\n data-test-id=\"table-merge-cells\"\n onClick={() => mergeTableCellsAtSelection()}\n type=\"button\"\n >\n Merge cells\n </button>\n )\n } else if (canUnmergeCell) {\n mergeCellButton = (\n <button\n className=\"item\"\n data-test-id=\"table-unmerge-cells\"\n onClick={() => unmergeTableCellsAtSelection()}\n type=\"button\"\n >\n Unmerge cells\n </button>\n )\n }\n }\n\n return createPortal(\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events\n <div\n className=\"table-action-menu-dropdown\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n ref={dropDownRef}\n >\n {mergeCellButton ? (\n <React.Fragment>\n {mergeCellButton}\n <hr />\n </React.Fragment>\n ) : null}\n\n <button\n className=\"item\"\n data-test-id=\"table-insert-row-above\"\n onClick={() => insertTableRowAtSelection(false)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`} above\n </span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-insert-row-below\"\n onClick={() => insertTableRowAtSelection(true)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`} below\n </span>\n </button>\n <hr />\n <button\n className=\"item\"\n data-test-id=\"table-insert-column-before\"\n onClick={() => insertTableColumnAtSelection(false)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`}{' '}\n left\n </span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-insert-column-after\"\n onClick={() => insertTableColumnAtSelection(true)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`}{' '}\n right\n </span>\n </button>\n <hr />\n <button\n className=\"item\"\n data-test-id=\"table-delete-columns\"\n onClick={() => deleteTableColumnAtSelection()}\n type=\"button\"\n >\n <span className=\"text\">Delete column</span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-delete-rows\"\n onClick={() => deleteTableRowAtSelection()}\n type=\"button\"\n >\n <span className=\"text\">Delete row</span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-delete\"\n onClick={() => deleteTableAtSelection()}\n type=\"button\"\n >\n <span className=\"text\">Delete table</span>\n </button>\n <hr />\n <button className=\"item\" onClick={() => toggleTableRowIsHeader()} type=\"button\">\n <span className=\"text\">\n {(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW\n ? 'Remove'\n : 'Add'}{' '}\n row header\n </span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-column-header\"\n onClick={() => toggleTableColumnIsHeader()}\n type=\"button\"\n >\n <span className=\"text\">\n {(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) ===\n TableCellHeaderStates.COLUMN\n ? 'Remove'\n : 'Add'}{' '}\n column header\n </span>\n </button>\n </div>,\n document.body,\n )\n}\n\nfunction TableCellActionMenuContainer({\n anchorElem,\n cellMerge,\n}: {\n anchorElem: HTMLElement\n cellMerge: boolean\n}): JSX.Element {\n const [editor] = useLexicalComposerContext()\n\n const menuButtonRef = useRef(null)\n const menuRootRef = useRef(null)\n const [isMenuOpen, setIsMenuOpen] = useState(false)\n\n const [tableCellNode, setTableMenuCellNode] = useState<null | TableCellNode>(null)\n\n const $moveMenu = useCallback(() => {\n const menu = menuButtonRef.current\n const selection = $getSelection()\n const nativeSelection = window.getSelection()\n const activeElement = document.activeElement\n\n if (selection == null || menu == null) {\n setTableMenuCellNode(null)\n return\n }\n\n const rootElement = editor.getRootElement()\n\n if (\n $isRangeSelection(selection) &&\n rootElement !== null &&\n nativeSelection !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n const tableCellNodeFromSelection = $getTableCellNodeFromLexicalNode(\n selection.anchor.getNode(),\n )\n\n if (tableCellNodeFromSelection == null) {\n setTableMenuCellNode(null)\n return\n }\n\n const tableCellParentNodeDOM = editor.getElementByKey(tableCellNodeFromSelection.getKey())\n\n if (tableCellParentNodeDOM == null) {\n setTableMenuCellNode(null)\n return\n }\n\n setTableMenuCellNode(tableCellNodeFromSelection)\n } else if (!activeElement) {\n setTableMenuCellNode(null)\n }\n }, [editor])\n\n useEffect(() => {\n return editor.registerUpdateListener(() => {\n editor.getEditorState().read(() => {\n $moveMenu()\n })\n })\n })\n\n useEffect(() => {\n const menuButtonDOM = menuButtonRef.current as HTMLButtonElement | null\n\n if (menuButtonDOM != null && tableCellNode != null) {\n const tableCellNodeDOM = editor.getElementByKey(tableCellNode.getKey())\n\n if (tableCellNodeDOM != null) {\n const tableCellRect = tableCellNodeDOM.getBoundingClientRect()\n const menuRect = menuButtonDOM.getBoundingClientRect()\n const anchorRect = anchorElem.getBoundingClientRect()\n\n const top = tableCellRect.top - anchorRect.top + 4\n const left = tableCellRect.right - menuRect.width - 10 - anchorRect.left\n\n menuButtonDOM.style.opacity = '1'\n menuButtonDOM.style.transform = `translate(${left}px, ${top}px)`\n } else {\n menuButtonDOM.style.opacity = '0'\n menuButtonDOM.style.transform = 'translate(-10000px, -10000px)'\n }\n }\n }, [menuButtonRef, tableCellNode, editor, anchorElem])\n\n const prevTableCellDOM = useRef(tableCellNode)\n\n useEffect(() => {\n if (prevTableCellDOM.current !== tableCellNode) {\n setIsMenuOpen(false)\n }\n\n prevTableCellDOM.current = tableCellNode\n }, [prevTableCellDOM, tableCellNode])\n\n return (\n <div className=\"table-cell-action-button-container\" ref={menuButtonRef}>\n {tableCellNode != null && (\n <React.Fragment>\n <button\n className=\"table-cell-action-button\"\n onClick={(e) => {\n e.stopPropagation()\n setIsMenuOpen(!isMenuOpen)\n }}\n ref={menuRootRef}\n type=\"button\"\n >\n <MeatballsIcon />\n </button>\n {isMenuOpen && (\n <TableActionMenu\n cellMerge={cellMerge}\n contextRef={menuRootRef}\n onClose={() => setIsMenuOpen(false)}\n setIsMenuOpen={setIsMenuOpen}\n tableCellNode={tableCellNode}\n />\n )}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nexport const TableActionMenuPlugin: PluginComponentWithAnchor = ({ anchorElem }) => {\n const isEditable = useLexicalEditable()\n return createPortal(\n isEditable ? (\n <TableCellActionMenuContainer anchorElem={anchorElem ?? document.body} cellMerge />\n ) : null,\n anchorElem ?? document.body,\n )\n}\n"],"mappings":"AAAA;;;AAUA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SACEC,gCAAgC,EAChCC,6BAA6B,EAC7BC,eAAe,EACfC,gCAAgC,EAChCC,qCAAqC,EACrCC,mCAAmC,EACnCC,kCAAkC,EAClCC,gCAAgC,EAChCC,6BAA6B,EAC7BC,gBAAgB,EAChBC,eAAe,EACfC,iBAAiB,EACjBC,YAAY,EACZC,gCAAgC,EAChCC,qBAAqB,EACrBC,aAAa,QACR;AACP,SAASC,aAAa,QAAQ;AAC9B,SACEC,oBAAoB,EACpBC,QAAQ,EACRC,aAAa,EACbC,cAAc,EACdC,gBAAgB,EAChBC,iBAAiB,EACjBC,WAAW,QACN;AACP,YAAYC,KAAA,MAAW;AACvB,SAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AACzD,SAASC,YAAY,QAAQ;AAI7B,SAASC,aAAa,QAAQ;AAG9B,SAASC,sBAAsBC,SAAyB;EAItD,MAAMC,cAAA,GAAiBD,SAAA,CAAUE,QAAQ;EACzC,OAAO;IACLC,OAAA,EAASF,cAAA,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AC;IAAIC,SAAA,EAAU;IAAqCM,GAAA,EAAKO,aAAA;cACtDhH,aAAA,IAAiB,qBAChBsG,KAAA,CAACjK,KAAA,CAAMqK,QAAQ;8BACbR,IAAA,CAAC;QACCC,SAAA,EAAU;QACVC,OAAA,EAAUG,CAAA;UACRA,CAAA,CAAEC,eAAe;UACjBzG,aAAA,CAAc,CAACmH,UAAA;QACjB;QACAT,GAAA,EAAKQ,WAAA;QACLZ,IAAA,EAAK;kBAEL,aAAAH,IAAA,CAACvJ,aAAA;UAEFuK,UAAA,iBACChB,IAAA,CAACvG,eAAA;QACCC,SAAA,EAAWA,SAAA;QACXC,UAAA,EAAYoH,WAAA;QACZnH,OAAA,EAASA,CAAA,KAAMC,aAAA,CAAc;QAC7BA,aAAA,EAAeA,aAAA;QACfC,aAAA,EAAeA;;;;AAO7B;AAEA,OAAO,MAAMqI,qBAAA,GAAmDA,CAAC;EAAEtB;AAAU,CAAE;EAC7E,MAAMuB,UAAA,GAAa1N,kBAAA;EACnB,oBAAO8B,YAAA,CACL4L,UAAA,gBACEpC,IAAA,CAACY,4BAAA;IAA6BC,UAAA,EAAYA,UAAA,IAAcH,QAAA,CAASC,IAAI;IAAEjH,SAAS;OAC9E,MACJmH,UAAA,IAAcH,QAAA,CAASC,IAAI;AAE/B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","$deleteTableColumn__EXPERIMENTAL","$deleteTableRow__EXPERIMENTAL","$getNodeTriplet","$getTableCellNodeFromLexicalNode","$getTableColumnIndexFromTableCellNode","$getTableNodeFromLexicalNodeOrThrow","$getTableRowIndexFromTableCellNode","$insertTableColumn__EXPERIMENTAL","$insertTableRow__EXPERIMENTAL","$isTableCellNode","$isTableRowNode","$isTableSelection","$unmergeCell","getTableObserverFromTableElement","TableCellHeaderStates","TableCellNode","useScrollInfo","$createParagraphNode","$getRoot","$getSelection","$isElementNode","$isParagraphNode","$isRangeSelection","$isTextNode","React","useCallback","useEffect","useRef","useState","createPortal","MeatballsIcon","computeSelectionCount","selection","selectionShape","getShape","columns","toX","fromX","rows","toY","fromY","isTableSelectionRectangular","nodes","getNodes","currentRows","currentRow","expectedColumns","currentColumns","i","length","node","row","getParentOrThrow","Error","colSpan","__colSpan","j","undefined","__rowSpan","every","v","$canUnmerge","isCollapsed","anchor","is","focus","cell","$cellContainsEmptyParagraph","getChildrenSize","firstChild","getFirstChildOrThrow","isEmpty","$selectLastDescendant","lastDescendant","getLastDescendant","select","selectEnd","selectNext","TableActionMenu","cellMerge","contextRef","onClose","setIsMenuOpen","tableCellNode","_tableCellNode","editor","dropDownRef","updateTableCellNode","selectionCounts","updateSelectionCounts","canMergeCells","setCanMergeCells","canUnmergeCell","setCanUnmergeCell","y","registerMutationListener","nodeMutations","nodeUpdated","get","getKey","getEditorState","read","getLatest","skipInitialization","currentSelectionCounts","menuButtonElement","current","dropDownElement","rootElement","getRootElement","rootEleRect","getBoundingClientRect","menuButtonRect","style","opacity","dropDownElementRect","margin","leftPosition","right","width","window","innerWidth","position","left","pageXOffset","topPosition","top","height","innerHeight","bottom","pageYOffset","handleClickOutside","event","contains","target","addEventListener","removeEventListener","clearTableSelection","update","isAttached","tableNode","tableElement","getElementByKey","tableSelection","clearHighlight","markDirty","rootNode","selectStart","mergeTableCellsAtSelection","firstCell","setColSpan","setRowSpan","getFirstChild","remove","append","getChildren","unmergeTableCellsAtSelection","insertTableRowAtSelection","shouldInsertAfter","insertTableColumnAtSelection","deleteTableRowAtSelection","deleteTableAtSelection","deleteTableColumnAtSelection","toggleTableRowIsHeader","tableRowIndex","tableRows","tableRow","forEach","tableCell","toggleHeaderStyle","ROW","toggleTableColumnIsHeader","tableColumnIndex","maxRowsLength","Math","max","map","r","tableCells","COLUMN","mergeCellButton","_jsx","className","onClick","type","_jsxs","e","stopPropagation","ref","Fragment","__headerState","document","body","TableCellActionMenuContainer","anchorElem","menuButtonRef","menuRootRef","isMenuOpen","setTableMenuCellNode","$moveMenu","menu","nativeSelection","getSelection","activeElement","anchorNode","tableCellNodeFromSelection","getNode","tableCellParentNodeDOM","registerUpdateListener","menuButtonDOM","tableCellNodeDOM","tableCellRect","menuRect","anchorRect","transform","prevTableCellDOM","TableActionMenuPlugin","isEditable"],"sources":["../../../../../../src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx"],"sourcesContent":["'use client'\n\nimport type {\n HTMLTableElementWithWithTableSelectionState,\n TableRowNode,\n TableSelection,\n} from '@lexical/table'\nimport type { ElementNode } from 'lexical'\nimport type { JSX } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n $deleteTableColumn__EXPERIMENTAL,\n $deleteTableRow__EXPERIMENTAL,\n $getNodeTriplet,\n $getTableCellNodeFromLexicalNode,\n $getTableColumnIndexFromTableCellNode,\n $getTableNodeFromLexicalNodeOrThrow,\n $getTableRowIndexFromTableCellNode,\n $insertTableColumn__EXPERIMENTAL,\n $insertTableRow__EXPERIMENTAL,\n $isTableCellNode,\n $isTableRowNode,\n $isTableSelection,\n $unmergeCell,\n getTableObserverFromTableElement,\n TableCellHeaderStates,\n TableCellNode,\n} from '@lexical/table'\nimport { useScrollInfo } from '@payloadcms/ui'\nimport {\n $createParagraphNode,\n $getRoot,\n $getSelection,\n $isElementNode,\n $isParagraphNode,\n $isRangeSelection,\n $isTextNode,\n} from 'lexical'\nimport * as React from 'react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../../typesClient.js'\n\nimport { MeatballsIcon } from '../../../../../lexical/ui/icons/Meatballs/index.js'\nimport './index.scss'\n\nfunction computeSelectionCount(selection: TableSelection): {\n columns: number\n rows: number\n} {\n const selectionShape = selection.getShape()\n return {\n columns: selectionShape.toX - selectionShape.fromX + 1,\n rows: selectionShape.toY - selectionShape.fromY + 1,\n }\n}\n\n// This is important when merging cells as there is no good way to re-merge weird shapes (a result\n// of selecting merged cells and non-merged)\nfunction isTableSelectionRectangular(selection: TableSelection): boolean {\n const nodes = selection.getNodes()\n const currentRows: Array<number> = []\n let currentRow = null\n let expectedColumns = null\n let currentColumns = 0\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]\n if ($isTableCellNode(node)) {\n const row = node.getParentOrThrow()\n if (!$isTableRowNode(row)) {\n throw new Error('Expected CellNode to have a RowNode parent')\n }\n if (currentRow !== row) {\n if (expectedColumns !== null && currentColumns !== expectedColumns) {\n return false\n }\n if (currentRow !== null) {\n expectedColumns = currentColumns\n }\n currentRow = row\n currentColumns = 0\n }\n const colSpan = node.__colSpan\n for (let j = 0; j < colSpan; j++) {\n if (currentRows[currentColumns + j] === undefined) {\n currentRows[currentColumns + j] = 0\n }\n currentRows[currentColumns + j] += node.__rowSpan\n }\n currentColumns += colSpan\n }\n }\n return (\n (expectedColumns === null || currentColumns === expectedColumns) &&\n currentRows.every((v) => v === currentRows[0])\n )\n}\n\nfunction $canUnmerge(): boolean {\n const selection = $getSelection()\n if (\n ($isRangeSelection(selection) && !selection.isCollapsed()) ||\n ($isTableSelection(selection) && !selection.anchor.is(selection.focus)) ||\n (!$isRangeSelection(selection) && !$isTableSelection(selection))\n ) {\n return false\n }\n const [cell] = $getNodeTriplet(selection.anchor)\n return cell.__colSpan > 1 || cell.__rowSpan > 1\n}\n\nfunction $cellContainsEmptyParagraph(cell: TableCellNode): boolean {\n if (cell.getChildrenSize() !== 1) {\n return false\n }\n const firstChild = cell.getFirstChildOrThrow()\n if (!$isParagraphNode(firstChild) || !firstChild.isEmpty()) {\n return false\n }\n return true\n}\n\nfunction $selectLastDescendant(node: ElementNode): void {\n const lastDescendant = node.getLastDescendant()\n if ($isTextNode(lastDescendant)) {\n lastDescendant.select()\n } else if ($isElementNode(lastDescendant)) {\n lastDescendant.selectEnd()\n } else if (lastDescendant !== null) {\n lastDescendant.selectNext()\n }\n}\n\ntype TableCellActionMenuProps = Readonly<{\n cellMerge: boolean\n contextRef: { current: HTMLElement | null }\n onClose: () => void\n setIsMenuOpen: (isOpen: boolean) => void\n tableCellNode: TableCellNode\n}>\n\nfunction TableActionMenu({\n cellMerge,\n contextRef,\n onClose,\n setIsMenuOpen,\n tableCellNode: _tableCellNode,\n}: TableCellActionMenuProps) {\n const [editor] = useLexicalComposerContext()\n const dropDownRef = useRef<HTMLDivElement | null>(null)\n const [tableCellNode, updateTableCellNode] = useState(_tableCellNode)\n const [selectionCounts, updateSelectionCounts] = useState({\n columns: 1,\n rows: 1,\n })\n const [canMergeCells, setCanMergeCells] = useState(false)\n const [canUnmergeCell, setCanUnmergeCell] = useState(false)\n const { y } = useScrollInfo()\n\n useEffect(() => {\n return editor.registerMutationListener(\n TableCellNode,\n (nodeMutations) => {\n const nodeUpdated = nodeMutations.get(tableCellNode.getKey()) === 'updated'\n\n if (nodeUpdated) {\n editor.getEditorState().read(() => {\n updateTableCellNode(tableCellNode.getLatest())\n })\n }\n },\n { skipInitialization: true },\n )\n }, [editor, tableCellNode])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n // Merge cells\n if ($isTableSelection(selection)) {\n const currentSelectionCounts = computeSelectionCount(selection)\n updateSelectionCounts(computeSelectionCount(selection))\n setCanMergeCells(\n isTableSelectionRectangular(selection) &&\n (currentSelectionCounts.columns > 1 || currentSelectionCounts.rows > 1),\n )\n }\n // Unmerge cell\n setCanUnmergeCell($canUnmerge())\n })\n }, [editor])\n\n useEffect(() => {\n const menuButtonElement = contextRef.current\n const dropDownElement = dropDownRef.current\n const rootElement = editor.getRootElement()\n\n if (menuButtonElement != null && dropDownElement != null && rootElement != null) {\n const rootEleRect = rootElement.getBoundingClientRect()\n const menuButtonRect = menuButtonElement.getBoundingClientRect()\n dropDownElement.style.opacity = '1'\n const dropDownElementRect = dropDownElement.getBoundingClientRect()\n const margin = 5\n let leftPosition = menuButtonRect.right + margin\n if (\n leftPosition + dropDownElementRect.width > window.innerWidth ||\n leftPosition + dropDownElementRect.width > rootEleRect.right\n ) {\n const position = menuButtonRect.left - dropDownElementRect.width - margin\n leftPosition = (position < 0 ? margin : position) + window.pageXOffset\n }\n dropDownElement.style.left = `${leftPosition + window.pageXOffset}px`\n\n let topPosition = menuButtonRect.top\n if (topPosition + dropDownElementRect.height > window.innerHeight) {\n const position = menuButtonRect.bottom - dropDownElementRect.height\n topPosition = (position < 0 ? margin : position) + window.pageYOffset\n }\n dropDownElement.style.top = `${topPosition}px`\n }\n }, [contextRef, dropDownRef, editor, y])\n\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n if (\n dropDownRef.current != null &&\n contextRef.current != null &&\n !dropDownRef.current.contains(event.target as Node) &&\n !contextRef.current.contains(event.target as Node)\n ) {\n setIsMenuOpen(false)\n }\n }\n\n window.addEventListener('click', handleClickOutside)\n\n return () => window.removeEventListener('click', handleClickOutside)\n }, [setIsMenuOpen, contextRef])\n\n const clearTableSelection = useCallback(() => {\n editor.update(() => {\n if (tableCellNode.isAttached()) {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n const tableElement = editor.getElementByKey(\n tableNode.getKey(),\n ) as HTMLTableElementWithWithTableSelectionState\n\n if (!tableElement) {\n throw new Error('Expected to find tableElement in DOM')\n }\n\n const tableSelection = getTableObserverFromTableElement(tableElement)\n if (tableSelection !== null) {\n tableSelection.clearHighlight()\n }\n\n tableNode.markDirty()\n updateTableCellNode(tableCellNode.getLatest())\n }\n\n const rootNode = $getRoot()\n rootNode.selectStart()\n })\n }, [editor, tableCellNode])\n\n const mergeTableCellsAtSelection = () => {\n editor.update(() => {\n const selection = $getSelection()\n if ($isTableSelection(selection)) {\n const { columns, rows } = computeSelectionCount(selection)\n const nodes = selection.getNodes()\n let firstCell: null | TableCellNode = null\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]\n if ($isTableCellNode(node)) {\n if (firstCell === null) {\n node.setColSpan(columns).setRowSpan(rows)\n firstCell = node\n const isEmpty = $cellContainsEmptyParagraph(node)\n let firstChild\n if (isEmpty && $isParagraphNode((firstChild = node.getFirstChild()))) {\n firstChild.remove()\n }\n } else if ($isTableCellNode(firstCell)) {\n const isEmpty = $cellContainsEmptyParagraph(node)\n if (!isEmpty) {\n firstCell.append(...node.getChildren())\n }\n node.remove()\n }\n }\n }\n if (firstCell !== null) {\n if (firstCell.getChildrenSize() === 0) {\n firstCell.append($createParagraphNode())\n }\n $selectLastDescendant(firstCell)\n }\n onClose()\n }\n })\n }\n\n const unmergeTableCellsAtSelection = () => {\n editor.update(() => {\n $unmergeCell()\n })\n }\n\n const insertTableRowAtSelection = useCallback(\n (shouldInsertAfter: boolean) => {\n editor.update(() => {\n $insertTableRow__EXPERIMENTAL(shouldInsertAfter)\n onClose()\n })\n },\n [editor, onClose],\n )\n\n const insertTableColumnAtSelection = useCallback(\n (shouldInsertAfter: boolean) => {\n editor.update(() => {\n for (let i = 0; i < selectionCounts.columns; i++) {\n $insertTableColumn__EXPERIMENTAL(shouldInsertAfter)\n }\n onClose()\n })\n },\n [editor, onClose, selectionCounts.columns],\n )\n\n const deleteTableRowAtSelection = useCallback(() => {\n editor.update(() => {\n $deleteTableRow__EXPERIMENTAL()\n onClose()\n })\n }, [editor, onClose])\n\n const deleteTableAtSelection = useCallback(() => {\n editor.update(() => {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n tableNode.remove()\n\n clearTableSelection()\n onClose()\n })\n }, [editor, tableCellNode, clearTableSelection, onClose])\n\n const deleteTableColumnAtSelection = useCallback(() => {\n editor.update(() => {\n $deleteTableColumn__EXPERIMENTAL()\n onClose()\n })\n }, [editor, onClose])\n\n const toggleTableRowIsHeader = useCallback(() => {\n editor.update(() => {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n\n const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode)\n\n const tableRows = tableNode.getChildren()\n\n if (tableRowIndex >= tableRows.length || tableRowIndex < 0) {\n throw new Error('Expected table cell to be inside of table row.')\n }\n\n const tableRow = tableRows[tableRowIndex]\n\n if (!$isTableRowNode(tableRow)) {\n throw new Error('Expected table row')\n }\n\n tableRow.getChildren().forEach((tableCell) => {\n if (!$isTableCellNode(tableCell)) {\n throw new Error('Expected table cell')\n }\n\n tableCell.toggleHeaderStyle(TableCellHeaderStates.ROW)\n })\n\n clearTableSelection()\n onClose()\n })\n }, [editor, tableCellNode, clearTableSelection, onClose])\n\n const toggleTableColumnIsHeader = useCallback(() => {\n editor.update(() => {\n const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode)\n\n const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode)\n\n const tableRows = tableNode.getChildren<TableRowNode>()\n const maxRowsLength = Math.max(...tableRows.map((row) => row.getChildren().length))\n\n if (tableColumnIndex >= maxRowsLength || tableColumnIndex < 0) {\n throw new Error('Expected table cell to be inside of table row.')\n }\n\n for (let r = 0; r < tableRows.length; r++) {\n const tableRow = tableRows[r]\n\n if (!$isTableRowNode(tableRow)) {\n throw new Error('Expected table row')\n }\n\n const tableCells = tableRow.getChildren()\n if (tableColumnIndex >= tableCells.length) {\n // if cell is outside of bounds for the current row (for example various merge cell cases) we shouldn't highlight it\n continue\n }\n\n const tableCell = tableCells[tableColumnIndex]\n\n if (!$isTableCellNode(tableCell)) {\n throw new Error('Expected table cell')\n }\n\n tableCell.toggleHeaderStyle(TableCellHeaderStates.COLUMN)\n }\n\n clearTableSelection()\n onClose()\n })\n }, [editor, tableCellNode, clearTableSelection, onClose])\n\n let mergeCellButton: JSX.Element | null = null\n if (cellMerge) {\n if (canMergeCells) {\n mergeCellButton = (\n <button\n className=\"item\"\n data-test-id=\"table-merge-cells\"\n onClick={() => mergeTableCellsAtSelection()}\n type=\"button\"\n >\n Merge cells\n </button>\n )\n } else if (canUnmergeCell) {\n mergeCellButton = (\n <button\n className=\"item\"\n data-test-id=\"table-unmerge-cells\"\n onClick={() => unmergeTableCellsAtSelection()}\n type=\"button\"\n >\n Unmerge cells\n </button>\n )\n }\n }\n\n return createPortal(\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events\n <div\n className=\"table-action-menu-dropdown\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n ref={dropDownRef}\n >\n {mergeCellButton ? (\n <React.Fragment>\n {mergeCellButton}\n <hr />\n </React.Fragment>\n ) : null}\n\n <button\n className=\"item\"\n data-test-id=\"table-insert-row-above\"\n onClick={() => insertTableRowAtSelection(false)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`} above\n </span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-insert-row-below\"\n onClick={() => insertTableRowAtSelection(true)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`} below\n </span>\n </button>\n <hr />\n <button\n className=\"item\"\n data-test-id=\"table-insert-column-before\"\n onClick={() => insertTableColumnAtSelection(false)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`}{' '}\n left\n </span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-insert-column-after\"\n onClick={() => insertTableColumnAtSelection(true)}\n type=\"button\"\n >\n <span className=\"text\">\n Insert {selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`}{' '}\n right\n </span>\n </button>\n <hr />\n <button\n className=\"item\"\n data-test-id=\"table-delete-columns\"\n onClick={() => deleteTableColumnAtSelection()}\n type=\"button\"\n >\n <span className=\"text\">Delete column</span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-delete-rows\"\n onClick={() => deleteTableRowAtSelection()}\n type=\"button\"\n >\n <span className=\"text\">Delete row</span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-delete\"\n onClick={() => deleteTableAtSelection()}\n type=\"button\"\n >\n <span className=\"text\">Delete table</span>\n </button>\n <hr />\n <button className=\"item\" onClick={() => toggleTableRowIsHeader()} type=\"button\">\n <span className=\"text\">\n {(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW\n ? 'Remove'\n : 'Add'}{' '}\n row header\n </span>\n </button>\n <button\n className=\"item\"\n data-test-id=\"table-column-header\"\n onClick={() => toggleTableColumnIsHeader()}\n type=\"button\"\n >\n <span className=\"text\">\n {(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) ===\n TableCellHeaderStates.COLUMN\n ? 'Remove'\n : 'Add'}{' '}\n column header\n </span>\n </button>\n </div>,\n document.body,\n )\n}\n\nfunction TableCellActionMenuContainer({\n anchorElem,\n cellMerge,\n}: {\n anchorElem: HTMLElement\n cellMerge: boolean\n}): JSX.Element {\n const [editor] = useLexicalComposerContext()\n\n const menuButtonRef = useRef(null)\n const menuRootRef = useRef(null)\n const [isMenuOpen, setIsMenuOpen] = useState(false)\n\n const [tableCellNode, setTableMenuCellNode] = useState<null | TableCellNode>(null)\n\n const $moveMenu = useCallback(() => {\n const menu = menuButtonRef.current\n const selection = $getSelection()\n const nativeSelection = window.getSelection()\n const activeElement = document.activeElement\n\n if (selection == null || menu == null) {\n setTableMenuCellNode(null)\n return\n }\n\n const rootElement = editor.getRootElement()\n\n if (\n $isRangeSelection(selection) &&\n rootElement !== null &&\n nativeSelection !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n const tableCellNodeFromSelection = $getTableCellNodeFromLexicalNode(\n selection.anchor.getNode(),\n )\n\n if (tableCellNodeFromSelection == null) {\n setTableMenuCellNode(null)\n return\n }\n\n const tableCellParentNodeDOM = editor.getElementByKey(tableCellNodeFromSelection.getKey())\n\n if (tableCellParentNodeDOM == null) {\n setTableMenuCellNode(null)\n return\n }\n\n setTableMenuCellNode(tableCellNodeFromSelection)\n } else if (!activeElement) {\n setTableMenuCellNode(null)\n }\n }, [editor])\n\n useEffect(() => {\n return editor.registerUpdateListener(() => {\n editor.getEditorState().read(() => {\n $moveMenu()\n })\n })\n })\n\n useEffect(() => {\n const menuButtonDOM = menuButtonRef.current as HTMLButtonElement | null\n\n if (menuButtonDOM != null && tableCellNode != null) {\n const tableCellNodeDOM = editor.getElementByKey(tableCellNode.getKey())\n\n if (tableCellNodeDOM != null) {\n const tableCellRect = tableCellNodeDOM.getBoundingClientRect()\n const menuRect = menuButtonDOM.getBoundingClientRect()\n const anchorRect = anchorElem.getBoundingClientRect()\n\n const top = tableCellRect.top - anchorRect.top + 4\n const left = tableCellRect.right - menuRect.width - 10 - anchorRect.left\n\n menuButtonDOM.style.opacity = '1'\n menuButtonDOM.style.transform = `translate(${left}px, ${top}px)`\n } else {\n menuButtonDOM.style.opacity = '0'\n menuButtonDOM.style.transform = 'translate(-10000px, -10000px)'\n }\n }\n }, [menuButtonRef, tableCellNode, editor, anchorElem])\n\n const prevTableCellDOM = useRef(tableCellNode)\n\n useEffect(() => {\n if (prevTableCellDOM.current !== tableCellNode) {\n setIsMenuOpen(false)\n }\n\n prevTableCellDOM.current = tableCellNode\n }, [prevTableCellDOM, tableCellNode])\n\n return (\n <div className=\"table-cell-action-button-container\" ref={menuButtonRef}>\n {tableCellNode != null && (\n <React.Fragment>\n <button\n className=\"table-cell-action-button\"\n onClick={(e) => {\n e.stopPropagation()\n setIsMenuOpen(!isMenuOpen)\n }}\n ref={menuRootRef}\n type=\"button\"\n >\n <MeatballsIcon />\n </button>\n {isMenuOpen && (\n <TableActionMenu\n cellMerge={cellMerge}\n contextRef={menuRootRef}\n onClose={() => setIsMenuOpen(false)}\n setIsMenuOpen={setIsMenuOpen}\n tableCellNode={tableCellNode}\n />\n )}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nexport const TableActionMenuPlugin: PluginComponentWithAnchor = ({ anchorElem }) => {\n const isEditable = useLexicalEditable()\n return createPortal(\n isEditable ? (\n <TableCellActionMenuContainer anchorElem={anchorElem ?? document.body} cellMerge />\n ) : null,\n anchorElem ?? document.body,\n )\n}\n"],"mappings":"AA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OAAO,MAAMqI,qBAAA,GAAmDA,CAAC;EAAEtB;AAAU,CAAE;EAC7E,MAAMuB,UAAA,GAAa1N,kBAAA;EACnB,oBAAO8B,YAAA,CACL4L,UAAA,gBACEpC,IAAA,CAACY,4BAAA;IAA6BC,UAAA,EAAYA,UAAA,IAAcH,QAAA,CAASC,IAAI;IAAEjH,SAAS;OAC9E,MACJmH,UAAA,IAAcH,QAAA,CAASC,IAAI;AAE/B","ignoreList":[]}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const BoldFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const BoldFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.client.tsx"],"names":[],"mappings":"AAkCA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.client.tsx"],"names":[],"mappings":"AAkCA,eAAO,MAAM,iBAAiB,oFAe5B,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const InlineCodeFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const InlineCodeFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,uBAAuB,oFAQlC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const ItalicFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const ItalicFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.client.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.client.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mBAAmB,oFAQ9B,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const StrikethroughFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const StrikethroughFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/strikethrough/feature.client.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/strikethrough/feature.client.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,0BAA0B,oFAQrC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const SubscriptFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const SubscriptFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/subscript/feature.client.tsx"],"names":[],"mappings":"AA6BA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/subscript/feature.client.tsx"],"names":[],"mappings":"AA6BA,eAAO,MAAM,sBAAsB,oFAOjC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const SuperscriptFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const SuperscriptFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/superscript/feature.client.tsx"],"names":[],"mappings":"AA6BA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/superscript/feature.client.tsx"],"names":[],"mappings":"AA6BA,eAAO,MAAM,wBAAwB,oFAOnC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const UnderlineFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const UnderlineFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/underline/feature.client.tsx"],"names":[],"mappings":"AA6BA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/underline/feature.client.tsx"],"names":[],"mappings":"AA6BA,eAAO,MAAM,sBAAsB,oFAOjC,CAAA"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { HeadingFeatureProps } from '../server/index.js';
|
|
2
|
-
export declare const HeadingFeatureClient: import("
|
|
3
|
-
featureKey: string;
|
|
4
|
-
order: number;
|
|
5
|
-
} & HeadingFeatureProps>;
|
|
2
|
+
export declare const HeadingFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<HeadingFeatureProps, HeadingFeatureProps>;
|
|
6
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/heading/client/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AA2B7D,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/heading/client/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AA2B7D,eAAO,MAAM,oBAAoB,wGA6E/B,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const HorizontalRuleFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const HorizontalRuleFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/horizontalRule/client/index.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/horizontalRule/client/index.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,2BAA2B,oFAmDtC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const IndentFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const IndentFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/indent/client/index.tsx"],"names":[],"mappings":"AAuDA,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/indent/client/index.tsx"],"names":[],"mappings":"AAuDA,eAAO,MAAM,mBAAmB,oFAO9B,CAAA"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import type { ExclusiveLinkCollectionsProps } from '../server/index.js';
|
|
2
2
|
export type ClientProps = ExclusiveLinkCollectionsProps;
|
|
3
|
-
export declare const LinkFeatureClient: import("
|
|
4
|
-
featureKey: string;
|
|
5
|
-
order: number;
|
|
6
|
-
} & {
|
|
7
|
-
disabledCollections?: import("packages/payload/src/index.js").CollectionSlug[];
|
|
8
|
-
enabledCollections?: never;
|
|
9
|
-
}) | ({
|
|
10
|
-
featureKey: string;
|
|
11
|
-
order: number;
|
|
12
|
-
} & {
|
|
13
|
-
disabledCollections?: never;
|
|
14
|
-
enabledCollections?: import("packages/payload/src/index.js").CollectionSlug[];
|
|
15
|
-
})>;
|
|
3
|
+
export declare const LinkFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, ExclusiveLinkCollectionsProps>;
|
|
16
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/client/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAevE,MAAM,MAAM,WAAW,GAAG,6BAA6B,CAAA;AAyDvD,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/client/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAevE,MAAM,MAAM,WAAW,GAAG,6BAA6B,CAAA;AAyDvD,eAAO,MAAM,iBAAiB,wGA2B5B,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const ChecklistFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const ChecklistFeatureClient: import("../../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/client/index.tsx"],"names":[],"mappings":"AAwDA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/client/index.tsx"],"names":[],"mappings":"AAwDA,eAAO,MAAM,sBAAsB,uFA8CjC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const OrderedListFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const OrderedListFeatureClient: import("../../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/client/index.tsx"],"names":[],"mappings":"AAsDA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/client/index.tsx"],"names":[],"mappings":"AAsDA,eAAO,MAAM,wBAAwB,uFAoCnC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const UnorderedListFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const UnorderedListFeatureClient: import("../../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/client/index.tsx"],"names":[],"mappings":"AAuDA,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/client/index.tsx"],"names":[],"mappings":"AAuDA,eAAO,MAAM,0BAA0B,uFAgCrC,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const LexicalPluginToLexicalFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const LexicalPluginToLexicalFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,mCAAmC
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,mCAAmC,oFAI9C,CAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const SlateToLexicalFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const SlateToLexicalFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/slateToLexical/feature.client.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/slateToLexical/feature.client.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B,oFAItC,CAAA"}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
4
4
|
import { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js';
|
|
5
|
-
export const SlateToLexicalFeatureClient = createClientFeature(({
|
|
6
|
-
clientFunctions
|
|
7
|
-
}) => {
|
|
5
|
+
export const SlateToLexicalFeatureClient = createClientFeature(() => {
|
|
8
6
|
return {
|
|
9
7
|
nodes: [UnknownConvertedNode]
|
|
10
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.js","names":["createClientFeature","UnknownConvertedNode","SlateToLexicalFeatureClient","
|
|
1
|
+
{"version":3,"file":"feature.client.js","names":["createClientFeature","UnknownConvertedNode","SlateToLexicalFeatureClient","nodes"],"sources":["../../../../src/features/migrations/slateToLexical/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js'\n\nexport const SlateToLexicalFeatureClient = createClientFeature(() => {\n return {\n nodes: [UnknownConvertedNode],\n }\n})\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,oBAAoB,QAAQ;AAErC,OAAO,MAAMC,2BAAA,GAA8BF,mBAAA,CAAoB;EAC7D,OAAO;IACLG,KAAA,EAAO,CAACF,oBAAA;EACV;AACF","ignoreList":[]}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare const ParagraphFeatureClient: import("
|
|
2
|
-
featureKey: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}>;
|
|
1
|
+
export declare const ParagraphFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/paragraph/client/index.tsx"],"names":[],"mappings":"AA0CA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/paragraph/client/index.tsx"],"names":[],"mappings":"AA0CA,eAAO,MAAM,sBAAsB,oFA2BjC,CAAA"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
order: number;
|
|
4
|
-
} & {
|
|
5
|
-
maxDepth?: number;
|
|
6
|
-
} & {
|
|
7
|
-
disabledCollections?: import("packages/payload/src/index.js").CollectionSlug[];
|
|
8
|
-
enabledCollections?: never;
|
|
9
|
-
}) | ({
|
|
10
|
-
featureKey: string;
|
|
11
|
-
order: number;
|
|
12
|
-
} & {
|
|
13
|
-
maxDepth?: number;
|
|
14
|
-
} & {
|
|
15
|
-
disabledCollections?: never;
|
|
16
|
-
enabledCollections?: import("packages/payload/src/index.js").CollectionSlug[];
|
|
17
|
-
})>;
|
|
1
|
+
import type { RelationshipFeatureProps } from '../server/index.js';
|
|
2
|
+
export declare const RelationshipFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<RelationshipFeatureProps, RelationshipFeatureProps>;
|
|
18
3
|
//# sourceMappingURL=index.d.ts.map
|