{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAOM,MAAM,kDAAsE,CAAA,GAAA,kBAAc;IAC/F,2DAA2D;IAC3D,mBAAqC;QACnC,6DAA6D;QAC7D,6CAA6C,GAC7C,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAA4B;QAC5D,OAAO,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;gBACpB,cAAc,gBAAgB;YAChC,CAAA,GAAI;YAAC,gBAAgB;SAAa;IACpC;AACF","sources":["packages/react-aria-components/src/TableLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {TableLayout as BaseTableLayout, TableLayoutProps} from 'react-stately/useVirtualizerState';\nimport {LayoutOptionsDelegate} from './Virtualizer';\nimport {TableColumnResizeStateContext} from './Table';\nimport {useContext, useMemo} from 'react';\n\nexport class TableLayout<T, O extends TableLayoutProps = TableLayoutProps> extends BaseTableLayout<T, O> implements LayoutOptionsDelegate<TableLayoutProps> {\n  // Invalidate the layout whenever the column widths change.\n  useLayoutOptions(): TableLayoutProps {\n    // This is not a React class component, just a regular class.\n    /* eslint-disable react-hooks/rules-of-hooks */\n    let colResizeState = useContext(TableColumnResizeStateContext);\n    return useMemo(() => ({\n      columnWidths: colResizeState?.columnWidths\n    }), [colResizeState?.columnWidths]);\n  }\n}\n"],"names":[],"version":3,"file":"TableLayout.mjs.map"}