[lexical-table] Refactor: Rename and deprecate some table utils#7415
[lexical-table] Refactor: Rename and deprecate some table utils#7415takuyakanbr merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
DescriptionI haven’t fully understood Lexical’s build process yet, but it seems there’s an issue with the file type declaration in index.ts. /**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
export type { SerializedTableCellNode } from './LexicalTableCellNode';
export { $createTableCellNode, $isTableCellNode, TableCellHeaderStates, TableCellNode, } from './LexicalTableCellNode';
export type { InsertTableCommandPayload, InsertTableCommandPayloadHeaders, } from './LexicalTableCommands';
export { INSERT_TABLE_COMMAND } from './LexicalTableCommands';
export type { SerializedTableNode } from './LexicalTableNode';
export { $createTableNode, $getElementForTableNode, $isScrollableTablesActive, $isTableNode, setScrollableTablesActive, TableNode, } from './LexicalTableNode';
export type { TableDOMCell } from './LexicalTableObserver';
export { $getTableAndElementByKey, TableObserver } from './LexicalTableObserver';
export { registerTableCellUnmergeTransform, registerTablePlugin, registerTableSelectionObserver, } from './LexicalTablePluginHelpers';
export type { SerializedTableRowNode } from './LexicalTableRowNode';
export { $createTableRowNode, $isTableRowNode, TableRowNode, } from './LexicalTableRowNode';
export type { TableMapType, TableMapValueType, TableSelection, TableSelectionShape, } from './LexicalTableSelection';
export { $createTableSelection, $createTableSelectionFrom, $isTableSelection, } from './LexicalTableSelection';
export type { HTMLTableElementWithWithTableSelectionState } from './LexicalTableSelectionHelpers';
export { $findCellNode, $findTableNode, applyTableHandlers, getDOMCellFromTarget, getTableElement, getTableObserverFromTableElement, } from './LexicalTableSelectionHelpers';
export { $computeTableMap, $computeTableMapSkipCellCheck, $createTableNodeWithDimensions, $deleteTableColumn, $deleteTableColumn__EXPERIMENTAL, $deleteTableRow__EXPERIMENTAL, $getNodeTriplet, $getTableCellNodeFromLexicalNode, $getTableCellNodeRect, $getTableColumnIndexFromTableCellNode, $getTableNodeFromLexicalNodeOrThrow, $getTableRowIndexFromTableCellNode, $getTableRowNodeFromTableCellNodeOrThrow, $insertTableColumn, $insertTableColumn__EXPERIMENTAL, $insertTableRow, $insertTableRow__EXPERIMENTAL, $removeTableRowAtIndex, $unmergeCell, } from './LexicalTableUtils';The installed package version, including the lock file, is correctly set to 0.29.0. |
|
@Seolhun - This change isn't in v0.29.0. There hasn't yet been a release since this change was merged |
Aha. Thank you for replying. |
Fixes #13386 Below I write a clarification to copy and paste into the release note, based on our latest upgrade of Lexical [in v3.29.0](https://github.com/payloadcms/payload/releases/tag/v3.29.0). ## Important This release upgrades the lexical dependency from 0.28.0 to 0.34.0. If you installed lexical manually, update it to 0.34.0. Installing lexical manually is not recommended, as it may break between updates, and our re-exported versions should be used. See the [yellow banner box](https://payloadcms.com/docs/rich-text/custom-features) for details. If you still encounter richtext-lexical errors, do the following, in this order: - Delete node_modules - Delete your lockfile (e.g. pnpm-lock.json) - Reinstall your dependencies (e.g. pnpm install) ### Lexical Breaking Changes The following Lexical releases describe breaking changes. We recommend reading them if you're using Lexical APIs directly (`@payloadcms/richtext-lexical/lexical/*`). - [v.0.33.0](https://github.com/facebook/lexical/releases/tag/v0.33.0) - [v.0.30.0](https://github.com/facebook/lexical/releases/tag/v0.30.0) - [v.0.29.0](https://github.com/facebook/lexical/releases/tag/v0.29.0) ___ TODO: - [x] facebook/lexical#7719 - [x] facebook/lexical#7362 - [x] facebook/lexical#7707 - [x] facebook/lexical#7388 - [x] facebook/lexical#7357 - [x] facebook/lexical#7352 - [x] facebook/lexical#7472 - [x] facebook/lexical#7556 - [x] facebook/lexical#7417 - [x] facebook/lexical#1036 - [x] facebook/lexical#7509 - [x] facebook/lexical#7693 - [x] facebook/lexical#7408 - [x] facebook/lexical#7450 - [x] facebook/lexical#7415 - [x] facebook/lexical#7368 - [x] facebook/lexical#7372 - [x] facebook/lexical#7572 - [x] facebook/lexical#7558 - [x] facebook/lexical#7613 - [x] facebook/lexical#7405 - [x] facebook/lexical#7420 - [x] facebook/lexical#7662 --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1211202581885926

Description
Rename some table utils that are marked as experimental. I'm double-exporting them with their experimental suffixes as well, but marking those as deprecated.
$deleteTableColumn__EXPERIMENTAL=>$deleteTableColumnAtSelection$deleteTableRow__EXPERIMENTAL=>$deleteTableRowAtSelection$insertTableColumn__EXPERIMENTAL=>$insertTableColumnAtSelection$insertTableRow__EXPERIMENTAL=>$insertTableRowAtSelectionMarking legacy table utils as deprecated. These utils do not handle tables with merged cells. (Note:
$deleteTableRowdoes not exist.)$deleteTableColumn$insertTableRow$insertTableColumnThis is a follow-up from #7408.
Test plan
No logic changes. Run existing unit and E2E tests.