@rsdoctor/components 1.5.2 → 1.5.3
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/common/svg/cursor.mjs +22 -0
- package/dist/common/svg/cursor.mjs.map +1 -0
- package/dist/common/svg/trae.mjs +21 -0
- package/dist/common/svg/trae.mjs.map +1 -0
- package/dist/common/svg/vscode.mjs +158 -0
- package/dist/common/svg/vscode.mjs.map +1 -0
- package/dist/components/Charts/TreeMap.d.ts +1 -2
- package/dist/components/Charts/TreeMap.mjs +1 -14
- package/dist/components/Charts/TreeMap.mjs.map +1 -1
- package/dist/components/Configuration/builder.d.ts +1 -1
- package/dist/components/Loader/Analysis/index.d.ts +1 -1
- package/dist/components/Loader/executions.mjs +138 -118
- package/dist/components/Loader/executions.mjs.map +1 -1
- package/dist/components/Opener/code.mjs +1 -1
- package/dist/components/Opener/code.mjs.map +1 -1
- package/dist/components/Opener/{vscode.d.ts → ide.d.ts} +2 -0
- package/dist/components/Opener/ide.mjs +62 -0
- package/dist/components/Opener/ide.mjs.map +1 -0
- package/dist/components/Opener/index.d.ts +1 -1
- package/dist/components/Opener/index.mjs +1 -1
- package/dist/components/base/CodeViewer/index.d.ts +1 -1
- package/dist/components/base/CodeViewer/index.mjs +9 -2
- package/dist/components/base/CodeViewer/index.mjs.map +1 -1
- package/dist/components/base/CodeViewer/interface.d.ts +5 -0
- package/dist/pages/BundleSize/components/index.mjs +390 -399
- package/dist/pages/BundleSize/components/index.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index.module.mjs +0 -4
- package/dist/pages/BundleSize/components/index.module.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index_module.css +0 -4
- package/dist/pages/BundleSize/components/index_module.css.map +1 -1
- package/dist/pages/ModuleAnalyze/fileTree.d.ts +2 -0
- package/dist/pages/ModuleAnalyze/fileTree.mjs +168 -33
- package/dist/pages/ModuleAnalyze/fileTree.mjs.map +1 -1
- package/dist/pages/ModuleAnalyze/index.mjs +87 -76
- package/dist/pages/ModuleAnalyze/index.mjs.map +1 -1
- package/package.json +10 -10
- package/dist/components/Opener/vscode.mjs +0 -33
- package/dist/components/Opener/vscode.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages/BundleSize/components/index.mjs","sources":["../../../../src/pages/BundleSize/components/index.tsx"],"sourcesContent":["import {\n CodeOutlined,\n CodepenCircleOutlined,\n DeploymentUnitOutlined,\n InfoCircleOutlined,\n} from '@ant-design/icons';\nimport { Client, SDK } from '@rsdoctor/types';\nimport {\n Button,\n Card,\n Col,\n Divider,\n Empty,\n InputNumber,\n Row,\n Select,\n Space,\n Tag,\n Tooltip,\n Typography,\n} from 'antd';\nimport { debounce, sumBy } from 'es-toolkit/compat';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useCodeDrawer } from 'src/components/base/CodeViewer/useCodeDrawer';\nimport { Badge as Bdg } from '../../../components/Badge';\nimport { FileTree } from '../../../components/FileTree';\nimport { KeywordInput } from '../../../components/Form/keyword';\nimport { Keyword } from '../../../components/Keyword';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { Size } from '../../../constants';\nimport { useProjectInfo } from '../../../components/Layout/project-info-context';\nimport {\n createFileStructures,\n flattenTreemapData,\n formatSize,\n useI18n,\n} from '../../../utils';\nimport { GraphType } from '../constants';\nimport { AssetDetail } from './asset';\nimport { BundleCards } from './cards';\nimport styles from './index.module.scss';\nimport './index.sass';\nimport { SearchModal } from './search-modal';\nimport {\n AssetTreemapWithFilter,\n TreeNode,\n} from 'src/components/Charts/TreeMap';\nimport { Rspack } from '@rsdoctor/utils/common';\n\nconst { Option } = Select;\n\nconst cardBodyHeight = 600;\n\ninterface WebpackModulesOverallProps {\n cwd: string;\n errors: SDK.ErrorsData;\n summary: Client.RsdoctorClientAssetsSummary;\n entryPoints: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetEntryPoints>;\n}\nconst tabList = [\n {\n key: 'tree',\n label: (\n <Space>\n <Typography.Text>{'Tree Graph'}</Typography.Text>\n <Tooltip\n overlayStyle={{ maxWidth: 380 }}\n overlayInnerStyle={{ marginLeft: 16, padding: 10 }}\n color=\"white\"\n title={\n <Space direction=\"vertical\" color=\"white\" size=\"middle\">\n <Row>\n <Col>\n <Tag color=\"cyan\" style={{ margin: 0 }}>\n initial\n </Tag>\n <Typography.Text style={{ marginLeft: 4 }}>\n Identify whether the chunk is an initial chunk.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Tag color=\"green\" style={{ margin: 0 }}>\n concatenated\n </Tag>\n <Typography.Text style={{ marginLeft: 4 }}>\n Identify whether the module is a concatenated module\n </Typography.Text>\n <Tooltip\n overlayStyle={{ maxWidth: 408 }}\n placement=\"bottom\"\n color=\"white\"\n title={\n <Space direction=\"vertical\" color=\"white\">\n <Row>\n <Col>\n <Typography.Text strong>\n Concatenated Module\n </Typography.Text>\n <Typography.Text>\n : A performance optimization where multiple\n modules are merged (or \"hoisted\") into a single\n scope instead of wrapping each module in separate\n function closures. This reduces the bundle size\n and improves runtime performance by minimizing\n function call overhead.\n </Typography.Text>\n </Col>\n </Row>\n </Space>\n }\n >\n <InfoCircleOutlined\n style={{ color: 'rgba(0,0,0,.45)', marginLeft: 4 }}\n />\n </Tooltip>\n <Typography.Text>.</Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Button size=\"small\" icon={<CodepenCircleOutlined />} />\n <Typography.Text style={{ marginLeft: 4 }}>\n Open the code.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Button size=\"small\" icon={<DeploymentUnitOutlined />} />\n <Typography.Text style={{ marginLeft: 4 }}>\n View the module dependency, that is, module reasons in\n stats.json.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Tag color={'purple'}>{'Bundled: 15.77 KB'}</Tag>\n <Typography.Text>\n The final size of the output files after processing,\n bundling, and optimization. This is what is delivered to the\n browser.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Tag color={'orange'}>{'Source: 60.46 KB'}</Tag>\n <Typography.Text>\n The original size of your source code files before any\n processing or transformations. This is the raw size of your\n code as you wrote it.\n </Typography.Text>\n </Col>\n </Row>\n </Space>\n }\n >\n <InfoCircleOutlined style={{ color: 'rgba(0,0,0,.45)' }} />\n </Tooltip>\n </Space>\n ),\n },\n {\n key: 'treemap',\n label: 'Treemap',\n },\n];\n\nexport const WebpackModulesOverallBase: React.FC<\n WebpackModulesOverallProps\n> = ({ errors, cwd, summary, entryPoints }) => {\n const [selectedEntryPoints, setEntryPoints] = useState<SDK.EntryPointData[]>(\n [],\n );\n const [inputModule, setModuleValue] = useState(0);\n const [inputAssetName, setAssetName] = useState('');\n const [inputAssetSize, setAssetSize] = useState(0);\n const [defaultExpandAll, setDefaultExpandAll] = useState(false);\n const [inputModuleUnit, setModuleUnit] = useState('');\n const [inputChunkUnit, setChunkUnit] = useState('');\n const [assetPath, setAssetPath] = useState<string | null>(null);\n const [graphType, setGraphType] = useState('tree' as GraphType);\n const { showCode, codeDrawerComponent } = useCodeDrawer(\n 'Do not have the codes of assets. If you use the lite or brief mode, there will have codes.',\n );\n\n const { t } = useI18n();\n\n const assets = summary.all.total.files;\n\n const handleChange = useCallback(\n (type: string) => (value: string) => {\n if (type === 'module') {\n setModuleUnit(value);\n } else if (type === 'chunk') {\n setChunkUnit(value);\n }\n },\n [],\n );\n\n const selectAfter = (type: string) => (\n <Select defaultValue=\"kb\" onChange={handleChange(type)}>\n <Option value=\"kb\">KB</Option>\n <Option value=\"mb\">MB</Option>\n </Select>\n );\n const onChangeModule = useCallback(\n debounce((newValue: number) => {\n const count =\n inputModuleUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setModuleValue(count);\n }, 300),\n [],\n );\n\n const onChangeAsset = useCallback(\n debounce((newValue: number) => {\n const count =\n inputChunkUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setAssetSize(count);\n }, 300),\n [],\n );\n\n const filteredAssets = useMemo(() => {\n let res = assets.slice();\n\n if (inputAssetName) {\n res = res.filter((e) => e.path.indexOf(inputAssetName) > -1);\n }\n\n if (inputAssetSize > 0) {\n res = res.filter((e) => e.size >= inputAssetSize);\n }\n\n if (selectedEntryPoints.length) {\n res = res.filter((e) => {\n if (selectedEntryPoints.some((ep) => ep.assets.includes(e.path))) {\n return true;\n }\n return false;\n });\n }\n\n return res.sort((a, b) => {\n const _a = a.path.indexOf('/') > -1 ? 1 : 0;\n const _b = b.path.indexOf('/') > -1 ? 1 : 0;\n // return _a - _b;\n return _b - _a;\n });\n }, [assets, selectedEntryPoints, inputAssetName, inputAssetSize]);\n\n useEffect(() => {\n function getFileExtension(filePath: string) {\n const parts = filePath.split('.');\n return parts.length > 1 ? parts.pop() : '';\n }\n\n summary.all.total.files.forEach((f) => {\n const ext = getFileExtension(f.path);\n if (ext === 'js') {\n setAssetPath(f.path);\n }\n });\n }, [summary.all.total.files]);\n\n const assetsStructures = useMemo(() => {\n const res = createFileStructures({\n files: filteredAssets.map((e) => e.path).filter(Boolean),\n fileTitle(file, basename) {\n const target = filteredAssets.find((e) => e.path === file)!;\n const { size, initial, path, content } = target;\n\n return (\n <div\n className={styles.assetBox}\n onClick={() => {\n setAssetPath(path);\n }}\n >\n <Keyword text={basename} keyword={''} className={styles.fileText} />\n <Space size=\"small\" className={styles.assetsTag}>\n <Divider type=\"vertical\" />\n <Typography.Text style={{ color: '#4FD233' }}>\n {formatSize(size)}\n </Typography.Text>\n <Divider type=\"vertical\" />\n {initial ? (\n <Typography.Text style={{ color: '#009A9E' }}>\n initial\n </Typography.Text>\n ) : null}\n <CodeOutlined\n style={{ fontSize: 14, padding: 0 }}\n onClick={() => showCode({ code: content!, filePath: path })}\n />\n </Space>\n </div>\n );\n },\n });\n return res;\n }, [filteredAssets]);\n\n const onSearch = (value: string) => {\n setAssetName(value);\n setDefaultExpandAll(false);\n };\n\n return (\n <>\n <div className=\"bundle-size-card\">\n <BundleCards cwd={cwd} errors={errors} summary={summary} />\n <Card\n className=\"bundle-size=card\"\n tabList={tabList}\n activeTabKey={graphType as 'tree' | 'treemap'}\n onTabChange={(e) => setGraphType(e as 'tree' | 'treemap')}\n hidden={graphType === 'tree'}\n tabProps={{\n size: 'middle',\n }}\n >\n <ServerAPIProvider api={SDK.ServerAPI.API.GetProjectInfo}>\n {(data) => {\n const { isRspack, hasSourceMap } = Rspack.checkSourceMapSupport(\n data.configs,\n );\n return (\n <ServerAPIProvider api={SDK.ServerAPI.API.GetSummaryBundles}>\n {(data) => {\n // Filter assets to only show JS (js, cjs, mjs), .bundle, CSS, and HTML files\n const isTargetFileType = (filePath: string): boolean => {\n const ext = filePath.toLowerCase().split('.').pop() || '';\n return (\n ext === 'js' ||\n ext === 'cjs' ||\n ext === 'mjs' ||\n ext === 'bundle' ||\n ext === 'css' ||\n ext === 'html'\n );\n };\n\n const computedTreeData: TreeNode[] = data\n .filter((item) => isTargetFileType(item.asset.path))\n .map((item) => ({\n name: item.asset.path,\n value: item.asset.size,\n children: flattenTreemapData(item.modules).children,\n }));\n return (\n <AssetTreemapWithFilter\n treeData={computedTreeData}\n bundledSize={hasSourceMap || isRspack}\n />\n );\n }}\n </ServerAPIProvider>\n );\n }}\n </ServerAPIProvider>\n </Card>\n\n <Card\n hidden={graphType === 'treemap'}\n tabList={tabList}\n activeTabKey={graphType as 'tree' | 'treemap'}\n onTabChange={(e) => setGraphType(e as 'tree' | 'treemap')}\n tabProps={{\n size: 'middle',\n }}\n >\n <Space direction=\"vertical\">\n <Row align=\"middle\" gutter={[Size.BasePadding, Size.BasePadding]}>\n {entryPoints && entryPoints.length ? (\n <Col>\n <Select\n mode=\"multiple\"\n value={selectedEntryPoints.map((e) => e.name)}\n style={{ minWidth: 230, width: 'auto', maxWidth: 300 }}\n placeholder={'filter assets by entry point'}\n onChange={(name: string[]) => {\n setEntryPoints(\n name\n .map((e) => entryPoints.find((ep) => ep.name === e)!)\n .filter(Boolean),\n );\n }}\n allowClear\n onClear={() => {\n setEntryPoints([]);\n }}\n >\n {entryPoints.map((e) => {\n return (\n <Select.Option key={e.name} value={e.name}>\n <Space>\n <Bdg\n label={e.name}\n value={formatSize(e.size)}\n tooltip={e.name}\n />\n </Space>\n </Select.Option>\n );\n })}\n </Select>\n </Col>\n ) : null}\n <Col>\n <KeywordInput\n placeholder=\"search asset by keyword\"\n onChange={onSearch}\n />\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text\n style={{ fontSize: 14, color: 'inherit' }}\n >\n Asset Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the output assets which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'rgba(0,0,0,.45)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => onChangeAsset(Number(value))}\n addonAfter={selectAfter('chunk')}\n />\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text\n style={{ fontSize: 14, color: 'inherit' }}\n >\n Module Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the modules which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'rgba(0,0,0,.45)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => {\n onChangeModule(Number(value));\n }}\n addonAfter={selectAfter('module')}\n />\n </Col>\n </Row>\n <Row>\n <SearchModal />\n </Row>\n <Row align=\"middle\" gutter={[Size.BasePadding, Size.BasePadding]}>\n <Col span={24}>\n {filteredAssets.length ? (\n <Row gutter={Size.BasePadding}>\n <Col span={6}>\n <Card\n title={\n <Space>\n <Typography.Text>\n {t('Output Assets List')}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={`total assets count is ${assets.length}, the filtered assets count is ${filteredAssets.length}`}\n >\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n {filteredAssets.length} / {assets.length}\n </Typography.Text>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n {formatSize(sumBy(filteredAssets, (e) => e.size))}\n </Typography.Text>\n </Space>\n }\n size=\"small\"\n bodyStyle={{\n overflow: 'scroll',\n height: cardBodyHeight,\n }}\n >\n <FileTree\n className={styles.assets}\n treeData={assetsStructures}\n autoExpandParent\n defaultExpandAll={\n defaultExpandAll || filteredAssets.length <= 20\n }\n key={`tree_${inputAssetName}_${defaultExpandAll}`}\n />\n </Card>\n </Col>\n <Col span={18}>\n {assetPath ? (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetDetails}\n body={{ assetPath }}\n >\n {(details) => (\n <AssetDetail\n asset={details.asset}\n chunks={details.chunks}\n modules={details.modules}\n height={cardBodyHeight}\n moduleSizeLimit={inputModule}\n root={cwd}\n />\n )}\n </ServerAPIProvider>\n ) : (\n <Card\n bodyStyle={{\n height: cardBodyHeight,\n }}\n >\n <Empty\n description={\n <Typography.Text strong>\n Click the file path on the left to show the\n modules of the asset\n </Typography.Text>\n }\n />\n </Card>\n )}\n </Col>\n </Row>\n ) : (\n <Empty />\n )}\n </Col>\n </Row>\n </Space>\n </Card>\n </div>\n {codeDrawerComponent}\n </>\n );\n};\n\nexport const WebpackModulesOverall: React.FC = () => {\n const { project } = useProjectInfo();\n\n if (!project) {\n return null;\n }\n\n const { root, errors } = project;\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: true }}\n >\n {(summary) => {\n return (\n <ServerAPIProvider api={SDK.ServerAPI.API.GetEntryPoints}>\n {(entryPoints) => (\n <WebpackModulesOverallBase\n cwd={root}\n errors={errors}\n summary={summary}\n entryPoints={entryPoints}\n />\n )}\n </ServerAPIProvider>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["Option","Select","cardBodyHeight","tabList","Space","Typography","Tooltip","Row","Col","Tag","InfoCircleOutlined","Button","CodepenCircleOutlined","DeploymentUnitOutlined","WebpackModulesOverallBase","errors","cwd","summary","entryPoints","selectedEntryPoints","setEntryPoints","useState","inputModule","setModuleValue","inputAssetName","setAssetName","inputAssetSize","setAssetSize","defaultExpandAll","setDefaultExpandAll","inputModuleUnit","setModuleUnit","inputChunkUnit","setChunkUnit","assetPath","setAssetPath","graphType","setGraphType","showCode","codeDrawerComponent","useCodeDrawer","t","useI18n","assets","handleChange","useCallback","type","value","selectAfter","onChangeModule","debounce","newValue","count","onChangeAsset","filteredAssets","useMemo","res","e","ep","a","b","_a","_b","useEffect","getFileExtension","filePath","parts","f","ext","assetsStructures","createFileStructures","Boolean","file","basename","target","size","initial","path","content","styles","Keyword","Divider","formatSize","CodeOutlined","onSearch","BundleCards","Card","ServerAPIProvider","SDK","data","isRspack","hasSourceMap","Rspack","isTargetFileType","computedTreeData","item","flattenTreemapData","AssetTreemapWithFilter","Size","name","Bdg","KeywordInput","InputNumber","Number","SearchModal","sumBy","FileTree","details","AssetDetail","Empty","WebpackModulesOverall","project","useProjectInfo","root"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiDA,MAAM,EAAEA,MAAM,EAAE,GAAGC;AAEnB,MAAMC,iBAAiB;AAQvB,MAAMC,UAAU;IACd;QACE,KAAK;QACL,OAAO,WAAP,GACE,KAACC,OAAKA;;8BACJ,IAACC,WAAW,IAAI;8BAAE;;8BAClB,IAACC,SAAOA;oBACN,cAAc;wBAAE,UAAU;oBAAI;oBAC9B,mBAAmB;wBAAE,YAAY;wBAAI,SAAS;oBAAG;oBACjD,OAAM;oBACN,qBACE,KAACF,OAAKA;wBAAC,WAAU;wBAAW,OAAM;wBAAQ,MAAK;;0CAC7C,IAACG,KAAGA;0CACF,mBAACC,KAAGA;;sDACF,IAACC,KAAGA;4CAAC,OAAM;4CAAO,OAAO;gDAAE,QAAQ;4CAAE;sDAAG;;sDAG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KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;0BACrD,CAACtE,cAAAA,WAAAA,GACA,IAACJ,2BAAAA;wBACC,KAAKmG;wBACL,QAAQlG;wBACR,SAASE;wBACT,aAAaC;;;;AAQ7B"}
|
|
1
|
+
{"version":3,"file":"pages/BundleSize/components/index.mjs","sources":["../../../../src/pages/BundleSize/components/index.tsx"],"sourcesContent":["import {\n CodeOutlined,\n CodepenCircleOutlined,\n DeploymentUnitOutlined,\n InfoCircleOutlined,\n} from '@ant-design/icons';\nimport { Client, SDK } from '@rsdoctor/types';\nimport {\n Button,\n Card,\n Col,\n Divider,\n Empty,\n InputNumber,\n Row,\n Select,\n Space,\n Tag,\n Tooltip,\n Typography,\n Tabs,\n} from 'antd';\nimport { debounce, sumBy } from 'es-toolkit/compat';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useCodeDrawer } from 'src/components/base/CodeViewer/useCodeDrawer';\nimport { Badge as Bdg } from '../../../components/Badge';\nimport { FileTree } from '../../../components/FileTree';\nimport { KeywordInput } from '../../../components/Form/keyword';\nimport { Keyword } from '../../../components/Keyword';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { Size } from '../../../constants';\nimport { useProjectInfo } from '../../../components/Layout/project-info-context';\nimport {\n createFileStructures,\n flattenTreemapData,\n formatSize,\n useI18n,\n} from '../../../utils';\nimport { AssetDetail } from './asset';\nimport { BundleCards } from './cards';\nimport styles from './index.module.scss';\nimport './index.sass';\nimport { SearchModal } from './search-modal';\nimport {\n AssetTreemapWithFilter,\n TreeNode,\n} from 'src/components/Charts/TreeMap';\nimport { Rspack } from '@rsdoctor/utils/common';\n\nconst { Option } = Select;\n\nconst cardBodyHeight = 600;\n\ninterface WebpackModulesOverallProps {\n cwd: string;\n errors: SDK.ErrorsData;\n summary: Client.RsdoctorClientAssetsSummary;\n entryPoints: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetEntryPoints>;\n}\n\nexport const WebpackModulesOverallBase: React.FC<\n WebpackModulesOverallProps\n> = ({ errors, cwd, summary, entryPoints }) => {\n const [selectedEntryPoints, setEntryPoints] = useState<SDK.EntryPointData[]>(\n [],\n );\n const [inputModule, setModuleValue] = useState(0);\n const [inputAssetName, setAssetName] = useState('');\n const [inputAssetSize, setAssetSize] = useState(0);\n const [defaultExpandAll, setDefaultExpandAll] = useState(false);\n const [inputModuleUnit, setModuleUnit] = useState('');\n const [inputChunkUnit, setChunkUnit] = useState('');\n const [assetPath, setAssetPath] = useState<string | null>(null);\n const { showCode, codeDrawerComponent } = useCodeDrawer(\n 'Do not have the codes of assets. If you use the lite or brief mode, there will have codes.',\n );\n\n const { t } = useI18n();\n\n const assets = summary.all.total.files;\n\n const handleChange = useCallback(\n (type: string) => (value: string) => {\n if (type === 'module') {\n setModuleUnit(value);\n } else if (type === 'chunk') {\n setChunkUnit(value);\n }\n },\n [],\n );\n\n const selectAfter = (type: string) => (\n <Select defaultValue=\"kb\" onChange={handleChange(type)}>\n <Option value=\"kb\">KB</Option>\n <Option value=\"mb\">MB</Option>\n </Select>\n );\n const onChangeModule = useCallback(\n debounce((newValue: number) => {\n const count =\n inputModuleUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setModuleValue(count);\n }, 300),\n [],\n );\n\n const onChangeAsset = useCallback(\n debounce((newValue: number) => {\n const count =\n inputChunkUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setAssetSize(count);\n }, 300),\n [],\n );\n\n const filteredAssets = useMemo(() => {\n let res = assets.slice();\n\n if (inputAssetName) {\n res = res.filter((e) => e.path.indexOf(inputAssetName) > -1);\n }\n\n if (inputAssetSize > 0) {\n res = res.filter((e) => e.size >= inputAssetSize);\n }\n\n if (selectedEntryPoints.length) {\n res = res.filter((e) => {\n if (selectedEntryPoints.some((ep) => ep.assets.includes(e.path))) {\n return true;\n }\n return false;\n });\n }\n\n return res.sort((a, b) => {\n const _a = a.path.indexOf('/') > -1 ? 1 : 0;\n const _b = b.path.indexOf('/') > -1 ? 1 : 0;\n // return _a - _b;\n return _b - _a;\n });\n }, [assets, selectedEntryPoints, inputAssetName, inputAssetSize]);\n\n useEffect(() => {\n function getFileExtension(filePath: string) {\n const parts = filePath.split('.');\n return parts.length > 1 ? parts.pop() : '';\n }\n\n summary.all.total.files.forEach((f) => {\n const ext = getFileExtension(f.path);\n if (ext === 'js') {\n setAssetPath(f.path);\n }\n });\n }, [summary.all.total.files]);\n\n const assetsStructures = useMemo(() => {\n const res = createFileStructures({\n files: filteredAssets.map((e) => e.path).filter(Boolean),\n fileTitle(file, basename) {\n const target = filteredAssets.find((e) => e.path === file)!;\n const { size, initial, path, content } = target;\n\n return (\n <div\n className={styles.assetBox}\n onClick={() => {\n setAssetPath(path);\n }}\n >\n <Keyword text={basename} keyword={''} className={styles.fileText} />\n <Space size=\"small\" className={styles.assetsTag}>\n <Divider type=\"vertical\" />\n <Typography.Text style={{ color: '#4FD233' }}>\n {formatSize(size)}\n </Typography.Text>\n <Divider type=\"vertical\" />\n {initial ? (\n <Typography.Text style={{ color: '#009A9E' }}>\n initial\n </Typography.Text>\n ) : null}\n <CodeOutlined\n style={{ fontSize: 14, padding: 0 }}\n onClick={() => showCode({ code: content!, filePath: path })}\n />\n </Space>\n </div>\n );\n },\n });\n return res;\n }, [filteredAssets]);\n\n const onSearch = (value: string) => {\n setAssetName(value);\n setDefaultExpandAll(false);\n };\n return (\n <>\n <div>\n <BundleCards cwd={cwd} errors={errors} summary={summary} />\n <Card styles={{ body: { paddingTop: 0 } }}>\n <Tabs\n size=\"middle\"\n items={[\n {\n key: 'tree',\n label: (\n <Space>\n <Typography.Text>Tree Graph</Typography.Text>\n <Tooltip\n overlayStyle={{ maxWidth: 380 }}\n overlayInnerStyle={{ marginLeft: 16, padding: 10 }}\n color=\"white\"\n title={\n <Space direction=\"vertical\" color=\"white\" size=\"middle\">\n <Row>\n <Col>\n <Tag color=\"cyan\" style={{ margin: 0 }}>\n initial\n </Tag>\n <Typography.Text style={{ marginLeft: 4 }}>\n Identify whether the chunk is an initial chunk.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Tag color=\"green\" style={{ margin: 0 }}>\n concatenated\n </Tag>\n <Typography.Text style={{ marginLeft: 4 }}>\n Identify whether the module is a concatenated\n module\n </Typography.Text>\n <Tooltip\n overlayStyle={{ maxWidth: 408 }}\n placement=\"bottom\"\n color=\"white\"\n title={\n <Space direction=\"vertical\" color=\"white\">\n <Row>\n <Col>\n <Typography.Text strong>\n Concatenated Module\n </Typography.Text>\n <Typography.Text>\n : A performance optimization where\n multiple modules are merged (or\n \"hoisted\") into a single scope instead\n of wrapping each module in separate\n function closures. This reduces the\n bundle size and improves runtime\n performance by minimizing function\n call overhead.\n </Typography.Text>\n </Col>\n </Row>\n </Space>\n }\n >\n <InfoCircleOutlined\n style={{\n color: 'rgba(0,0,0,.45)',\n marginLeft: 4,\n }}\n />\n </Tooltip>\n <Typography.Text>.</Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Button\n size=\"small\"\n icon={<CodepenCircleOutlined />}\n />\n <Typography.Text style={{ marginLeft: 4 }}>\n Open the code.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Button\n size=\"small\"\n icon={<DeploymentUnitOutlined />}\n />\n <Typography.Text style={{ marginLeft: 4 }}>\n View the module dependency, that is, module\n reasons in stats.json.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Tag color={'purple'}>{'Bundled: 15.77 KB'}</Tag>\n <Typography.Text>\n The final size of the output files after\n processing, bundling, and optimization. This is\n what is delivered to the browser.\n </Typography.Text>\n </Col>\n </Row>\n <Row>\n <Col>\n <Tag color={'orange'}>{'Source: 60.46 KB'}</Tag>\n <Typography.Text>\n The original size of your source code files\n before any processing or transformations. This\n is the raw size of your code as you wrote it.\n </Typography.Text>\n </Col>\n </Row>\n </Space>\n }\n >\n <InfoCircleOutlined\n style={{ color: 'rgba(0,0,0,.45)' }}\n />\n </Tooltip>\n </Space>\n ),\n children: (\n <Space direction=\"vertical\">\n <Row\n align=\"middle\"\n gutter={[Size.BasePadding, Size.BasePadding]}\n >\n {entryPoints && entryPoints.length ? (\n <Col>\n <Select\n mode=\"multiple\"\n value={selectedEntryPoints.map((e) => e.name)}\n style={{\n minWidth: 230,\n width: 'auto',\n maxWidth: 300,\n }}\n placeholder={'filter assets by entry point'}\n onChange={(name: string[]) => {\n setEntryPoints(\n name\n .map(\n (e) =>\n entryPoints.find((ep) => ep.name === e)!,\n )\n .filter(Boolean),\n );\n }}\n allowClear\n onClear={() => {\n setEntryPoints([]);\n }}\n >\n {entryPoints.map((e) => {\n return (\n <Select.Option key={e.name} value={e.name}>\n <Space>\n <Bdg\n label={e.name}\n value={formatSize(e.size)}\n tooltip={e.name}\n />\n </Space>\n </Select.Option>\n );\n })}\n </Select>\n </Col>\n ) : null}\n <Col>\n <KeywordInput\n placeholder=\"search asset by keyword\"\n onChange={onSearch}\n />\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text\n style={{ fontSize: 14, color: 'inherit' }}\n >\n Asset Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the output assets which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'rgba(0,0,0,.45)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => onChangeAsset(Number(value))}\n addonAfter={selectAfter('chunk')}\n />\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text\n style={{ fontSize: 14, color: 'inherit' }}\n >\n Module Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the modules which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'rgba(0,0,0,.45)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => {\n onChangeModule(Number(value));\n }}\n addonAfter={selectAfter('module')}\n />\n </Col>\n </Row>\n <Row>\n <SearchModal />\n </Row>\n <Row\n align=\"middle\"\n gutter={[Size.BasePadding, Size.BasePadding]}\n >\n <Col span={24}>\n {filteredAssets.length ? (\n <Row gutter={Size.BasePadding}>\n <Col span={6}>\n <Card\n title={\n <Space>\n <Typography.Text>\n {t('Output Assets List')}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={`total assets count is ${assets.length}, the filtered assets count is ${filteredAssets.length}`}\n >\n <Typography.Text\n type=\"secondary\"\n style={{\n fontSize: 12,\n fontWeight: 400,\n }}\n >\n {filteredAssets.length} /{' '}\n {assets.length}\n </Typography.Text>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n {formatSize(\n sumBy(filteredAssets, (e) => e.size),\n )}\n </Typography.Text>\n </Space>\n }\n size=\"small\"\n bodyStyle={{\n overflow: 'scroll',\n height: cardBodyHeight,\n }}\n >\n <FileTree\n className={styles.assets}\n treeData={assetsStructures}\n autoExpandParent\n defaultExpandAll={\n defaultExpandAll ||\n filteredAssets.length <= 20\n }\n key={`tree_${inputAssetName}_${defaultExpandAll}`}\n />\n </Card>\n </Col>\n <Col span={18}>\n {assetPath ? (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetDetails}\n body={{ assetPath }}\n >\n {(details) => (\n <AssetDetail\n asset={details.asset}\n chunks={details.chunks}\n modules={details.modules}\n height={cardBodyHeight}\n moduleSizeLimit={inputModule}\n root={cwd}\n />\n )}\n </ServerAPIProvider>\n ) : (\n <Card\n bodyStyle={{\n height: cardBodyHeight,\n }}\n >\n <Empty\n description={\n <Typography.Text strong>\n Click the file path on the left to show\n the modules of the asset\n </Typography.Text>\n }\n />\n </Card>\n )}\n </Col>\n </Row>\n ) : (\n <Empty />\n )}\n </Col>\n </Row>\n </Space>\n ),\n },\n {\n key: 'treemap',\n label: 'Treemap',\n children: (\n <ServerAPIProvider api={SDK.ServerAPI.API.GetProjectInfo}>\n {(data) => {\n const { isRspack, hasSourceMap } =\n Rspack.checkSourceMapSupport(data.configs);\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetSummaryBundles}\n >\n {(data) => {\n // Filter assets to only show JS (js, cjs, mjs), .bundle, CSS, and HTML files\n const isTargetFileType = (\n filePath: string,\n ): boolean => {\n const ext =\n filePath.toLowerCase().split('.').pop() || '';\n return (\n ext === 'js' ||\n ext === 'cjs' ||\n ext === 'mjs' ||\n ext === 'bundle' ||\n ext === 'css' ||\n ext === 'html'\n );\n };\n\n const computedTreeData: TreeNode[] = data\n .filter((item) =>\n isTargetFileType(item.asset.path),\n )\n .map((item) => ({\n name: item.asset.path,\n value: item.asset.size,\n children: flattenTreemapData(item.modules)\n .children,\n }));\n return (\n <AssetTreemapWithFilter\n treeData={computedTreeData}\n bundledSize={hasSourceMap || isRspack}\n />\n );\n }}\n </ServerAPIProvider>\n );\n }}\n </ServerAPIProvider>\n ),\n },\n ]}\n defaultActiveKey=\"tree\"\n />\n </Card>\n </div>\n {codeDrawerComponent}\n </>\n );\n};\n\nexport const WebpackModulesOverall: React.FC = () => {\n const { project } = useProjectInfo();\n\n if (!project) {\n return null;\n }\n\n const { root, errors } = project;\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: true }}\n >\n {(summary) => {\n return (\n <ServerAPIProvider api={SDK.ServerAPI.API.GetEntryPoints}>\n {(entryPoints) => (\n <WebpackModulesOverallBase\n cwd={root}\n errors={errors}\n summary={summary}\n entryPoints={entryPoints}\n />\n )}\n </ServerAPIProvider>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["Option","Select","cardBodyHeight","WebpackModulesOverallBase","errors","cwd","summary","entryPoints","selectedEntryPoints","setEntryPoints","useState","inputModule","setModuleValue","inputAssetName","setAssetName","inputAssetSize","setAssetSize","defaultExpandAll","setDefaultExpandAll","inputModuleUnit","setModuleUnit","inputChunkUnit","setChunkUnit","assetPath","setAssetPath","showCode","codeDrawerComponent","useCodeDrawer","t","useI18n","assets","handleChange","useCallback","type","value","selectAfter","onChangeModule","debounce","newValue","count","onChangeAsset","filteredAssets","useMemo","res","e","ep","a","b","_a","_b","useEffect","getFileExtension","filePath","parts","f","ext","assetsStructures","createFileStructures","Boolean","file","basename","target","size","initial","path","content","styles","Keyword","Space","Divider","Typography","formatSize","CodeOutlined","onSearch","BundleCards","Card","Tabs","Tooltip","Row","Col","Tag","InfoCircleOutlined","Button","CodepenCircleOutlined","DeploymentUnitOutlined","Size","name","Bdg","KeywordInput","InputNumber","Number","SearchModal","sumBy","FileTree","ServerAPIProvider","SDK","details","AssetDetail","Empty","data","isRspack","hasSourceMap","Rspack","isTargetFileType","computedTreeData","item","flattenTreemapData","AssetTreemapWithFilter","WebpackModulesOverall","project","useProjectInfo","root"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiDA,MAAM,EAAEA,MAAM,EAAE,GAAGC;AAEnB,MAAMC,iBAAiB;AAShB,MAAMC,4BAET,CAAC,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,WAAW,EAAE;IACxC,MAAM,CAACC,qBAAqBC,eAAe,GAAGC,SAC5C,EAAE;IAEJ,MAAM,CAACC,aAAaC,eAAe,GAAGF,SAAS;IAC/C,MAAM,CAACG,gBAAgBC,aAAa,GAAGJ,SAAS;IAChD,MAAM,CAACK,gBAAgBC,aAAa,GAAGN,SAAS;IAChD,MAAM,CAACO,kBAAkBC,oBAAoB,GAAGR,SAAS;IACzD,MAAM,CAACS,iBAAiBC,cAAc,GAAGV,SAAS;IAClD,MAAM,CAACW,gBAAgBC,aAAa,GAAGZ,SAAS;IAChD,MAAM,CAACa,WAAWC,aAAa,GAAGd,SAAwB;IAC1D,MAAM,EAAEe,QAAQ,EAAEC,mBAAmB,EAAE,GAAGC,cACxC;IAGF,MAAM,EAAEC,CAAC,EAAE,GAAGC;IAEd,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UAARA,OACAA,AAAQ,UAARA,OACAA,AAAQ,aAARA,OACAA,AAAQ,UAARA,OACAA,AAAQ,WAARA;oDAEJ;oDAEA,MAAMiD,mBAA+BL,KAClC,MAAM,CAAC,CAACM,OACPF,iBAAiBE,KAAK,KAAK,CAAC,IAAI,GAEjC,GAAG,CAAC,CAACA,OAAU;4DACd,MAAMA,KAAK,KAAK,CAAC,IAAI;4DACrB,OAAOA,KAAK,KAAK,CAAC,IAAI;4DACtB,UAAUC,mBAAmBD,KAAK,OAAO,EACtC,QAAQ;wDACb;oDACF,OAAO,WAAP,GACE,IAACE,wBAAsBA;wDACrB,UAAUH;wDACV,aAAaH,gBAAgBD;;gDAGnC;;wCAGN;;gCAGN;6BACD;4BACD,kBAAiB;;;;;YAItB1E;;;AAGP;AAEO,MAAMkF,wBAAkC;IAC7C,MAAM,EAAEC,OAAO,EAAE,GAAGC;IAEpB,IAAI,CAACD,SACH,OAAO;IAGT,MAAM,EAAEE,IAAI,EAAE3G,MAAM,EAAE,GAAGyG;IACzB,OAAO,WAAP,GACE,IAACf,mBAAiBA;QAChB,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,gBAAgB;QACvC,MAAM;YAAE,iBAAiB;QAAK;kBAE7B,CAACzF,UACO,WAAP,GACE,IAACwF,mBAAiBA;gBAAC,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;0BACrD,CAACxF,cAAAA,WAAAA,GACA,IAACJ,2BAAAA;wBACC,KAAK4G;wBACL,QAAQ3G;wBACR,SAASE;wBACT,aAAaC;;;;AAQ7B"}
|
|
@@ -11,10 +11,6 @@ const index_module = {
|
|
|
11
11
|
dividerDiv: "dividerDiv-s50mAr",
|
|
12
12
|
assetsTag: "assetsTag-eAVvyj",
|
|
13
13
|
bundle: "bundle-cPw2Kc",
|
|
14
|
-
"bundle-size-card": "bundle-size-card-N8rW3d",
|
|
15
|
-
bundleSizeCard: "bundle-size-card-N8rW3d",
|
|
16
|
-
"ant-tabs-tab": "ant-tabs-tab-SpEjsl",
|
|
17
|
-
antTabsTab: "ant-tabs-tab-SpEjsl",
|
|
18
14
|
modal: "modal-afyzYa",
|
|
19
15
|
"search-btn": "search-btn-To902q",
|
|
20
16
|
searchBtn: "search-btn-To902q",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages/BundleSize/components/index.module.mjs","sources":["../../../../src/pages/BundleSize/components/index.module.scss"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./index_module.css\"\nexport default {\"assets\":\"assets-ll1P_L\",\"assetBox\":\"assetBox-Y8vGse\",\"fileText\":\"fileText-W0quVZ\",\"bundle-tree\":\"bundle-tree-IbtEQg\",\"bundleTree\":\"bundle-tree-IbtEQg\",\"box\":\"box-On1BLb\",\"keyword\":\"keyword-PqQzB1\",\"divider\":\"divider-asnppW\",\"dividerDiv\":\"dividerDiv-s50mAr\",\"assetsTag\":\"assetsTag-eAVvyj\",\"bundle\":\"bundle-cPw2Kc\",\"
|
|
1
|
+
{"version":3,"file":"pages/BundleSize/components/index.module.mjs","sources":["../../../../src/pages/BundleSize/components/index.module.scss"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./index_module.css\"\nexport default {\"assets\":\"assets-ll1P_L\",\"assetBox\":\"assetBox-Y8vGse\",\"fileText\":\"fileText-W0quVZ\",\"bundle-tree\":\"bundle-tree-IbtEQg\",\"bundleTree\":\"bundle-tree-IbtEQg\",\"box\":\"box-On1BLb\",\"keyword\":\"keyword-PqQzB1\",\"divider\":\"divider-asnppW\",\"dividerDiv\":\"dividerDiv-s50mAr\",\"assetsTag\":\"assetsTag-eAVvyj\",\"bundle\":\"bundle-cPw2Kc\",\"modal\":\"modal-afyzYa\",\"search-btn\":\"search-btn-To902q\",\"searchBtn\":\"search-btn-To902q\",\"search-modal-list\":\"search-modal-list-G_Uxc8\",\"searchModalList\":\"search-modal-list-G_Uxc8\"};"],"names":[],"mappings":";AAEA,qBAAe;IAAC,QAAS;IAAgB,UAAW;IAAkB,UAAW;IAAkB,eAAc;IAAqB,YAAa;IAAqB,KAAM;IAAa,SAAU;IAAiB,SAAU;IAAiB,YAAa;IAAoB,WAAY;IAAmB,QAAS;IAAgB,OAAQ;IAAe,cAAa;IAAoB,WAAY;IAAoB,qBAAoB;IAA2B,iBAAkB;AAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/pages/BundleSize/components/index.module.scss"],"names":[],"mappings":"AADA;EAEE,WAAW;AACb;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,iBAAiB;AACnB;;AAEA;EACE,mBAAmB;EACnB,aAAa;AACf;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,YAAY;EACZ,oBAAoB;AACtB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAEA;EACE,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,uBAAuB;EACvB,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,
|
|
1
|
+
{"version":3,"sources":["webpack://./src/pages/BundleSize/components/index.module.scss"],"names":[],"mappings":"AADA;EAEE,WAAW;AACb;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,iBAAiB;AACnB;;AAEA;EACE,mBAAmB;EACnB,aAAa;AACf;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,YAAY;EACZ,oBAAoB;AACtB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAEA;EACE,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,uBAAuB;EACvB,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,YAAY;EACZ,gBAAgB;AAClB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,WAAW;EACX,UAAU;EACV,sBAAsB;EACtB,qDAAqD;EACrD,mBAAmB;EACnB,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,iBAAiB;EACjB,cAAc;AAChB;;AAEA;EACE,eAAe;EACf,sBAAsB;AACxB","sourcesContent":[".assets :global .rc-tree-indent-unit{width:22px}.assets :global .rc-tree-treenode{line-height:30px !important}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher{position:relative;bottom:4px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper{font-size:14px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon{padding:10px 0 0 0;margin-left:0}.assets .assetBox{display:flex;align-items:center}.assets .assetBox .fileText{margin-right:4px}.bundle-tree{display:flex}.bundle-tree :global span.ant-tag{margin:none;margin-inline-end:0px}.box{display:flex;height:30px;width:100%}.box .keyword{flex:0 0 auto;padding-right:5}.divider{border-color:rgba(0,0,0,.12);position:relative;bottom:20%}.dividerDiv{flex-grow:1;margin:0 10px;bottom:10%;position:relative}.assetsTag{height:30px}.assetsTag :global .ant-divider-vertical{margin-inline:0}.bundle :global{font-size:14px}.bundle :global .rc-tree-node-content-wrapper{font-size:14px}.bundle :global .file-icon{margin-left:0}.bundle :global .ant-tree-indent-unit{width:10px}.bundle :global .ant-tree-iconEle{margin-right:2px}.bundle :global .ant-tree-node-content-wrapper-open{display:flex}.bundle :global .ant-tree-node-content-wrapper-close{display:flex}.modal :global .ant-input-affix-wrapper{padding:4px 5px;width:490px}.search-btn{color:#fff}.search-btn>span{position:relative}.search-btn::before{content:\"\";background:linear-gradient(135deg, #6253e1, #04befe);position:absolute;inset:-1px;opacity:1;transition:all .3s;border-radius:inherit}.search-btn:hover::before{opacity:0}.search-modal-list :global .ant-spin-container{overflow:auto;max-height:30rem}.search-modal-list :global .search-list-item.clickable:hover{background-color:#eee;cursor:pointer}"],"sourceRoot":""}
|
|
@@ -2,6 +2,8 @@ import { SDK } from '@rsdoctor/types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const BailoutReasonCard: React.FC<{
|
|
4
4
|
reasons?: string[];
|
|
5
|
+
sideEffectCodes?: SDK.SideEffectCodeData[];
|
|
6
|
+
modulePath?: string;
|
|
5
7
|
}>;
|
|
6
8
|
export declare const ModuleFilesTree: React.FC<{
|
|
7
9
|
modules: SDK.ModuleData[];
|
|
@@ -1,60 +1,195 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card, Col, Empty, Popover, Typography } from "antd";
|
|
2
|
+
import { Card, Col, Empty, Popover, Tooltip, Typography } from "antd";
|
|
3
3
|
import { useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { Size } from "../../constants.mjs";
|
|
5
|
+
import { openCursor, openTrae, openVSCode } from "../../components/Opener/index.mjs";
|
|
6
|
+
import { CodeViewer } from "../../components/base/index.mjs";
|
|
7
|
+
import vscode from "../../common/svg/vscode.mjs";
|
|
8
|
+
import cursor from "../../common/svg/cursor.mjs";
|
|
9
|
+
import trae from "../../common/svg/trae.mjs";
|
|
5
10
|
import { FileTree } from "./components/fileTreeCom.mjs";
|
|
6
11
|
import { clsNamePrefix } from "./constants.mjs";
|
|
7
12
|
import dependency from "./dependency.mjs";
|
|
8
13
|
import { getImporteds } from "./utils/index.mjs";
|
|
9
14
|
import { useCreateFileTreeData } from "./utils/hooks.mjs";
|
|
10
15
|
import { TabList } from "./index.mjs";
|
|
11
|
-
const BailoutReasonCard = ({ reasons })=>{
|
|
12
|
-
if (!reasons || !reasons.length) return
|
|
16
|
+
const BailoutReasonCard = ({ reasons, sideEffectCodes, modulePath })=>{
|
|
17
|
+
if ((!reasons || !reasons.length) && (!sideEffectCodes || !sideEffectCodes.length)) return /*#__PURE__*/ jsx(Card, {
|
|
18
|
+
className: `${clsNamePrefix}-bailout-card`,
|
|
19
|
+
bordered: false,
|
|
20
|
+
bodyStyle: {
|
|
21
|
+
padding: 20,
|
|
22
|
+
height: '100%'
|
|
23
|
+
},
|
|
24
|
+
children: /*#__PURE__*/ jsx(Empty, {})
|
|
25
|
+
});
|
|
13
26
|
return /*#__PURE__*/ jsxs(Card, {
|
|
14
27
|
className: `${clsNamePrefix}-bailout-card`,
|
|
15
28
|
bordered: false,
|
|
16
29
|
bodyStyle: {
|
|
17
|
-
padding: 20
|
|
30
|
+
padding: 20,
|
|
31
|
+
height: '100%'
|
|
18
32
|
},
|
|
19
33
|
children: [
|
|
20
|
-
/*#__PURE__*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
34
|
+
reasons && /*#__PURE__*/ jsxs(Fragment, {
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ jsx(Typography.Text, {
|
|
37
|
+
strong: true,
|
|
38
|
+
className: `${clsNamePrefix}-bailout-card-title`,
|
|
39
|
+
children: "Bailout Reasons"
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ jsx("div", {
|
|
42
|
+
className: `${clsNamePrefix}-bailout-card-list`,
|
|
43
|
+
style: {
|
|
44
|
+
maxHeight: 156,
|
|
45
|
+
overflowY: 'auto'
|
|
46
|
+
},
|
|
47
|
+
children: reasons.length > 0 ? reasons.map((reason, index)=>/*#__PURE__*/ jsxs("div", {
|
|
48
|
+
className: `${clsNamePrefix}-bailout-card-item`,
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ jsx(Popover, {
|
|
51
|
+
content: reason,
|
|
52
|
+
trigger: "hover",
|
|
53
|
+
children: /*#__PURE__*/ jsx(Typography.Paragraph, {
|
|
54
|
+
ellipsis: {
|
|
55
|
+
rows: 1
|
|
56
|
+
},
|
|
57
|
+
className: `${clsNamePrefix}-bailout-card-text`,
|
|
58
|
+
style: {
|
|
59
|
+
marginBottom: 0
|
|
60
|
+
},
|
|
61
|
+
children: reason
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ jsxs(Typography.Text, {
|
|
65
|
+
type: "secondary",
|
|
66
|
+
className: `${clsNamePrefix}-bailout-card-meta`,
|
|
67
|
+
children: [
|
|
68
|
+
"#",
|
|
69
|
+
String(index + 1).padStart(2, '0')
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
}, `${reason}-${index}`)) : /*#__PURE__*/ jsx(Empty, {})
|
|
74
|
+
})
|
|
75
|
+
]
|
|
24
76
|
}),
|
|
25
|
-
/*#__PURE__*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
77
|
+
sideEffectCodes && sideEffectCodes.length > 0 && /*#__PURE__*/ jsxs(Fragment, {
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ jsxs("div", {
|
|
80
|
+
style: {
|
|
81
|
+
display: 'flex',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
gap: 8,
|
|
84
|
+
marginTop: reasons?.length ? 12 : 0
|
|
85
|
+
},
|
|
33
86
|
children: [
|
|
34
|
-
/*#__PURE__*/ jsx(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
children:
|
|
38
|
-
|
|
39
|
-
|
|
87
|
+
/*#__PURE__*/ jsx(Typography.Text, {
|
|
88
|
+
strong: true,
|
|
89
|
+
className: `${clsNamePrefix}-bailout-card-title`,
|
|
90
|
+
children: "Side Effect Codes"
|
|
91
|
+
}),
|
|
92
|
+
modulePath && sideEffectCodes[0] && /*#__PURE__*/ jsx(Tooltip, {
|
|
93
|
+
title: `Open in VSCode: line ${sideEffectCodes[0].startLine}`,
|
|
94
|
+
children: /*#__PURE__*/ jsx(vscode, {
|
|
95
|
+
style: {
|
|
96
|
+
width: 16,
|
|
97
|
+
height: 16,
|
|
98
|
+
cursor: 'pointer',
|
|
99
|
+
flexShrink: 0,
|
|
100
|
+
marginBottom: 12
|
|
40
101
|
},
|
|
41
|
-
|
|
102
|
+
onClick: ()=>openVSCode({
|
|
103
|
+
file: modulePath,
|
|
104
|
+
line: sideEffectCodes[0].startLine
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
}),
|
|
108
|
+
modulePath && sideEffectCodes[0] && /*#__PURE__*/ jsx(Tooltip, {
|
|
109
|
+
title: `Open in Cursor: line ${sideEffectCodes[0].startLine}`,
|
|
110
|
+
children: /*#__PURE__*/ jsx(cursor, {
|
|
42
111
|
style: {
|
|
43
|
-
|
|
112
|
+
width: 16,
|
|
113
|
+
height: 16,
|
|
114
|
+
cursor: 'pointer',
|
|
115
|
+
flexShrink: 0,
|
|
116
|
+
marginBottom: 12
|
|
44
117
|
},
|
|
45
|
-
|
|
118
|
+
onClick: ()=>openCursor({
|
|
119
|
+
file: modulePath,
|
|
120
|
+
line: sideEffectCodes[0].startLine
|
|
121
|
+
})
|
|
46
122
|
})
|
|
47
123
|
}),
|
|
48
|
-
/*#__PURE__*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
124
|
+
modulePath && sideEffectCodes[0] && /*#__PURE__*/ jsx(Tooltip, {
|
|
125
|
+
title: `Open in Trae: line ${sideEffectCodes[0].startLine}`,
|
|
126
|
+
children: /*#__PURE__*/ jsx(trae, {
|
|
127
|
+
style: {
|
|
128
|
+
width: 16,
|
|
129
|
+
height: 16,
|
|
130
|
+
cursor: 'pointer',
|
|
131
|
+
flexShrink: 0,
|
|
132
|
+
marginBottom: 12
|
|
133
|
+
},
|
|
134
|
+
onClick: ()=>openTrae({
|
|
135
|
+
file: modulePath,
|
|
136
|
+
line: sideEffectCodes[0].startLine
|
|
137
|
+
})
|
|
138
|
+
})
|
|
55
139
|
})
|
|
56
140
|
]
|
|
57
|
-
},
|
|
141
|
+
}),
|
|
142
|
+
/*#__PURE__*/ jsx("div", {
|
|
143
|
+
className: `${clsNamePrefix}-bailout-card-list`,
|
|
144
|
+
style: {
|
|
145
|
+
minHeight: '50vh',
|
|
146
|
+
display: 'flex',
|
|
147
|
+
flexDirection: 'column',
|
|
148
|
+
gap: 12,
|
|
149
|
+
overflow: 'auto'
|
|
150
|
+
},
|
|
151
|
+
children: sideEffectCodes.map((item, index)=>/*#__PURE__*/ jsx("div", {
|
|
152
|
+
className: `${clsNamePrefix}-bailout-card-item`,
|
|
153
|
+
style: {
|
|
154
|
+
display: 'flex',
|
|
155
|
+
flexDirection: 'column',
|
|
156
|
+
alignItems: 'flex-start',
|
|
157
|
+
gap: 8,
|
|
158
|
+
minHeight: 0,
|
|
159
|
+
flex: '1 1 0'
|
|
160
|
+
},
|
|
161
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
162
|
+
style: {
|
|
163
|
+
flex: 1,
|
|
164
|
+
minHeight: 0,
|
|
165
|
+
width: '100%',
|
|
166
|
+
display: 'flex',
|
|
167
|
+
flexDirection: 'column'
|
|
168
|
+
},
|
|
169
|
+
children: item.code ? /*#__PURE__*/ jsx(CodeViewer, {
|
|
170
|
+
code: item.code,
|
|
171
|
+
ranges: [
|
|
172
|
+
{
|
|
173
|
+
start: {
|
|
174
|
+
line: item.startLine || 0,
|
|
175
|
+
column: 0
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
filePath: '',
|
|
180
|
+
lang: "javascript",
|
|
181
|
+
style: {
|
|
182
|
+
flex: 1,
|
|
183
|
+
minHeight: '40vh',
|
|
184
|
+
width: '100%'
|
|
185
|
+
},
|
|
186
|
+
isLightTheme: false,
|
|
187
|
+
formatOnMount: true
|
|
188
|
+
}) : /*#__PURE__*/ jsx(Empty, {})
|
|
189
|
+
})
|
|
190
|
+
}, `${item.moduleId}-${index}`))
|
|
191
|
+
})
|
|
192
|
+
]
|
|
58
193
|
})
|
|
59
194
|
]
|
|
60
195
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages/ModuleAnalyze/fileTree.mjs","sources":["../../../src/pages/ModuleAnalyze/fileTree.tsx"],"sourcesContent":["import { SDK } from '@rsdoctor/types';\nimport { Card, Col, Empty, Popover, Typography } from 'antd';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { Size } from 'src/constants';\nimport { FileTree } from './components/fileTreeCom';\nimport { clsNamePrefix } from './constants';\nimport DependencyTree from './dependency';\nimport { getImporteds } from './utils';\nimport { useCreateFileTreeData } from './utils/hooks';\nimport { TabList } from './index';\n\nexport const BailoutReasonCard: React.FC<{ reasons?: string[] }> = ({\n reasons,\n}) => {\n if (!reasons || !reasons.length) {\n return null;\n }\n return (\n <Card\n className={`${clsNamePrefix}-bailout-card`}\n bordered={false}\n bodyStyle={{ padding: 20 }}\n >\n <Typography.Text strong className={`${clsNamePrefix}-bailout-card-title`}>\n Bailout Reasons\n </Typography.Text>\n <div\n className={`${clsNamePrefix}-bailout-card-list`}\n style={{ maxHeight: 156, overflowY: 'auto' }}\n >\n {reasons.map((reason, index) => (\n <div\n className={`${clsNamePrefix}-bailout-card-item`}\n key={`${reason}-${index}`}\n >\n <Popover content={reason} trigger=\"hover\">\n <Typography.Paragraph\n ellipsis={{ rows: 1 }}\n className={`${clsNamePrefix}-bailout-card-text`}\n style={{ marginBottom: 0 }}\n >\n {reason}\n </Typography.Paragraph>\n </Popover>\n <Typography.Text\n type=\"secondary\"\n className={`${clsNamePrefix}-bailout-card-meta`}\n >\n #{String(index + 1).padStart(2, '0')}\n </Typography.Text>\n </div>\n ))}\n </div>\n </Card>\n );\n};\n\nexport const ModuleFilesTree: React.FC<{\n modules: SDK.ModuleData[];\n dependencies: SDK.DependencyData[];\n curModule: SDK.ModuleData;\n cwd: string;\n selectedChunk: string;\n activeTabKey: string;\n}> = (props) => {\n const {\n curModule,\n modules,\n dependencies,\n cwd,\n activeTabKey,\n selectedChunk = '',\n } = props;\n const [importedModules, setImportedModules] = useState(\n [] as SDK.ModuleData[],\n );\n\n const { data: fileStructures } = useCreateFileTreeData(\n modules,\n importedModules,\n curModule,\n );\n\n useEffect(() => {\n const importeds = getImporteds(curModule, modules);\n setImportedModules(importeds);\n }, [curModule, modules]);\n\n const mainContent = useMemo(() => {\n if (activeTabKey === TabList[TabList.Reasons]) {\n return importedModules ? (\n <FileTree\n cwd={cwd}\n treeData={fileStructures}\n needCode={true}\n needShowAllTree={true}\n needJumpto={true}\n selectedChunk={selectedChunk}\n defaultOpenFather={1}\n />\n ) : (\n <Empty className={`${clsNamePrefix}-empty`} />\n );\n }\n\n return (\n <div\n className={`${clsNamePrefix}-file-tree`}\n style={{ padding: Size.BasePadding / 2 }}\n >\n <Col span={24} style={{ marginTop: Size.BasePadding / 2 }}>\n {curModule ? (\n <DependencyTree\n module={curModule}\n dependencies={dependencies}\n cwd={cwd}\n />\n ) : (\n <Empty className={`${clsNamePrefix}-empty`} />\n )}\n </Col>\n </div>\n );\n }, [\n activeTabKey,\n curModule,\n dependencies,\n fileStructures,\n importedModules,\n cwd,\n selectedChunk,\n ]);\n\n return <>{mainContent}</>;\n};\n"],"names":["BailoutReasonCard","reasons","Card","clsNamePrefix","Typography","reason","index","Popover","String","ModuleFilesTree","props","curModule","modules","dependencies","cwd","activeTabKey","selectedChunk","importedModules","setImportedModules","useState","fileStructures","useCreateFileTreeData","useEffect","importeds","getImporteds","mainContent","useMemo","TabList","FileTree","Empty","Size","Col","DependencyTree"],"mappings":";;;;;;;;;;AAWO,MAAMA,oBAAsD,CAAC,EAClEC,OAAO,EACR;IACC,IAAI,CAACA,WAAW,CAACA,QAAQ,MAAM,EAC7B,OAAO;IAET,OAAO,WAAP,GACE,KAACC,MAAIA;QACH,WAAW,GAAGC,cAAc,aAAa,CAAC;QAC1C,UAAU;QACV,WAAW;YAAE,SAAS;QAAG;;0BAEzB,IAACC,WAAW,IAAI;gBAAC,QAAM;gBAAC,WAAW,GAAGD,cAAc,mBAAmB,CAAC;0BAAE;;0BAG1E,IAAC;gBACC,WAAW,GAAGA,cAAc,kBAAkB,CAAC;gBAC/C,OAAO;oBAAE,WAAW;oBAAK,WAAW;gBAAO;0BAE1CF,QAAQ,GAAG,CAAC,CAACI,QAAQC,QAAAA,WAAAA,GACpB,KAAC;wBACC,WAAW,GAAGH,cAAc,kBAAkB,CAAC;;0CAG/C,IAACI,SAAOA;gCAAC,SAASF;gCAAQ,SAAQ;0CAChC,kBAACD,WAAW,SAAS;oCACnB,UAAU;wCAAE,MAAM;oCAAE;oCACpB,WAAW,GAAGD,cAAc,kBAAkB,CAAC;oCAC/C,OAAO;wCAAE,cAAc;oCAAE;8CAExBE;;;0CAGL,KAACD,WAAW,IAAI;gCACd,MAAK;gCACL,WAAW,GAAGD,cAAc,kBAAkB,CAAC;;oCAChD;oCACGK,OAAOF,QAAQ,GAAG,QAAQ,CAAC,GAAG;;;;uBAf7B,GAAGD,OAAO,CAAC,EAAEC,OAAO;;;;AAsBrC;AAEO,MAAMG,kBAOR,CAACC;IACJ,MAAM,EACJC,SAAS,EACTC,OAAO,EACPC,YAAY,EACZC,GAAG,EACHC,YAAY,EACZC,gBAAgB,EAAE,EACnB,GAAGN;IACJ,MAAM,CAACO,iBAAiBC,mBAAmB,GAAGC,SAC5C,EAAE;IAGJ,MAAM,EAAE,MAAMC,cAAc,EAAE,GAAGC,sBAC/BT,SACAK,iBACAN;IAGFW,UAAU;QACR,MAAMC,YAAYC,aAAab,WAAWC;QAC1CM,mBAAmBK;IACrB,GAAG;QAACZ;QAAWC;KAAQ;IAEvB,MAAMa,cAAcC,QAAQ;QAC1B,IAAIX,iBAAiBY,OAAO,CAACA,QAAQ,OAAO,CAAC,EAC3C,OAAOV,kBAAkB,WAAlBA,GACL,IAACW,UAAQA;YACP,KAAKd;YACL,UAAUM;YACV,UAAU;YACV,iBAAiB;YACjB,YAAY;YACZ,eAAeJ;YACf,mBAAmB;2BAGrB,IAACa,OAAKA;YAAC,WAAW,GAAG1B,cAAc,MAAM,CAAC;;QAI9C,OAAO,WAAP,GACE,IAAC;YACC,WAAW,GAAGA,cAAc,UAAU,CAAC;YACvC,OAAO;gBAAE,SAAS2B,KAAK,WAAW,GAAG;YAAE;sBAEvC,kBAACC,KAAGA;gBAAC,MAAM;gBAAI,OAAO;oBAAE,WAAWD,KAAK,WAAW,GAAG;gBAAE;0BACrDnB,YAAY,WAAZA,GACC,IAACqB,YAAcA;oBACb,QAAQrB;oBACR,cAAcE;oBACd,KAAKC;mCAGP,IAACe,OAAKA;oBAAC,WAAW,GAAG1B,cAAc,MAAM,CAAC;;;;IAKpD,GAAG;QACDY;QACAJ;QACAE;QACAO;QACAH;QACAH;QACAE;KACD;IAED,OAAO,WAAP,GAAO;kBAAGS;;AACZ"}
|
|
1
|
+
{"version":3,"file":"pages/ModuleAnalyze/fileTree.mjs","sources":["../../../src/pages/ModuleAnalyze/fileTree.tsx"],"sourcesContent":["import { SDK } from '@rsdoctor/types';\nimport { Card, Col, Empty, Popover, Tooltip, Typography } from 'antd';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { Size } from 'src/constants';\nimport { openVSCode, openCursor, openTrae } from 'src/components/Opener';\nimport { CodeViewer } from 'src/components/base';\nimport VSCodeIcon from '../../common/svg/vscode.svg';\nimport CursorIcon from '../../common/svg/cursor.svg';\nimport TraeIcon from '../../common/svg/trae.svg';\nimport { FileTree } from './components/fileTreeCom';\nimport { clsNamePrefix } from './constants';\nimport DependencyTree from './dependency';\nimport { getImporteds } from './utils';\nimport { useCreateFileTreeData } from './utils/hooks';\nimport { TabList } from './index';\n\nexport const BailoutReasonCard: React.FC<{\n reasons?: string[];\n sideEffectCodes?: SDK.SideEffectCodeData[];\n modulePath?: string;\n}> = ({ reasons, sideEffectCodes, modulePath }) => {\n if (\n (!reasons || !reasons.length) &&\n (!sideEffectCodes || !sideEffectCodes.length)\n ) {\n return (\n <Card\n className={`${clsNamePrefix}-bailout-card`}\n bordered={false}\n bodyStyle={{ padding: 20, height: '100%' }}\n >\n <Empty />\n </Card>\n );\n }\n\n return (\n <Card\n className={`${clsNamePrefix}-bailout-card`}\n bordered={false}\n bodyStyle={{ padding: 20, height: '100%' }}\n >\n {reasons && (\n <>\n <Typography.Text\n strong\n className={`${clsNamePrefix}-bailout-card-title`}\n >\n Bailout Reasons\n </Typography.Text>\n <div\n className={`${clsNamePrefix}-bailout-card-list`}\n style={{ maxHeight: 156, overflowY: 'auto' }}\n >\n {reasons.length > 0 ? (\n reasons.map((reason, index) => (\n <div\n className={`${clsNamePrefix}-bailout-card-item`}\n key={`${reason}-${index}`}\n >\n <Popover content={reason} trigger=\"hover\">\n <Typography.Paragraph\n ellipsis={{ rows: 1 }}\n className={`${clsNamePrefix}-bailout-card-text`}\n style={{ marginBottom: 0 }}\n >\n {reason}\n </Typography.Paragraph>\n </Popover>\n <Typography.Text\n type=\"secondary\"\n className={`${clsNamePrefix}-bailout-card-meta`}\n >\n #{String(index + 1).padStart(2, '0')}\n </Typography.Text>\n </div>\n ))\n ) : (\n <Empty />\n )}\n </div>\n </>\n )}\n {sideEffectCodes && sideEffectCodes.length > 0 && (\n <>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n marginTop: reasons?.length ? 12 : 0,\n }}\n >\n <Typography.Text\n strong\n className={`${clsNamePrefix}-bailout-card-title`}\n >\n Side Effect Codes\n </Typography.Text>\n {modulePath && sideEffectCodes[0] && (\n <Tooltip\n title={`Open in VSCode: line ${sideEffectCodes[0].startLine}`}\n >\n <VSCodeIcon\n style={{\n width: 16,\n height: 16,\n cursor: 'pointer',\n flexShrink: 0,\n marginBottom: 12,\n }}\n onClick={() =>\n openVSCode({\n file: modulePath,\n line: sideEffectCodes[0].startLine,\n })\n }\n />\n </Tooltip>\n )}\n {modulePath && sideEffectCodes[0] && (\n <Tooltip\n title={`Open in Cursor: line ${sideEffectCodes[0].startLine}`}\n >\n <CursorIcon\n style={{\n width: 16,\n height: 16,\n cursor: 'pointer',\n flexShrink: 0,\n marginBottom: 12,\n }}\n onClick={() =>\n openCursor({\n file: modulePath,\n line: sideEffectCodes[0].startLine,\n })\n }\n />\n </Tooltip>\n )}\n {modulePath && sideEffectCodes[0] && (\n <Tooltip\n title={`Open in Trae: line ${sideEffectCodes[0].startLine}`}\n >\n <TraeIcon\n style={{\n width: 16,\n height: 16,\n cursor: 'pointer',\n flexShrink: 0,\n marginBottom: 12,\n }}\n onClick={() =>\n openTrae({\n file: modulePath,\n line: sideEffectCodes[0].startLine,\n })\n }\n />\n </Tooltip>\n )}\n </div>\n <div\n className={`${clsNamePrefix}-bailout-card-list`}\n style={{\n minHeight: '50vh',\n display: 'flex',\n flexDirection: 'column',\n gap: 12,\n overflow: 'auto',\n }}\n >\n {sideEffectCodes.map((item, index) => (\n <div\n className={`${clsNamePrefix}-bailout-card-item`}\n key={`${item.moduleId}-${index}`}\n style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n gap: 8,\n minHeight: 0,\n flex: '1 1 0',\n }}\n >\n <div\n style={{\n flex: 1,\n minHeight: 0,\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n {item.code ? (\n <CodeViewer\n code={item.code}\n ranges={[\n {\n start: {\n line: item.startLine || 0,\n column: 0,\n },\n },\n ]}\n filePath={''}\n lang=\"javascript\"\n style={{ flex: 1, minHeight: '40vh', width: '100%' }}\n isLightTheme={false}\n formatOnMount\n />\n ) : (\n <Empty />\n )}\n </div>\n </div>\n ))}\n </div>\n </>\n )}\n </Card>\n );\n};\n\nexport const ModuleFilesTree: React.FC<{\n modules: SDK.ModuleData[];\n dependencies: SDK.DependencyData[];\n curModule: SDK.ModuleData;\n cwd: string;\n selectedChunk: string;\n activeTabKey: string;\n}> = (props) => {\n const {\n curModule,\n modules,\n dependencies,\n cwd,\n activeTabKey,\n selectedChunk = '',\n } = props;\n const [importedModules, setImportedModules] = useState(\n [] as SDK.ModuleData[],\n );\n\n const { data: fileStructures } = useCreateFileTreeData(\n modules,\n importedModules,\n curModule,\n );\n\n useEffect(() => {\n const importeds = getImporteds(curModule, modules);\n setImportedModules(importeds);\n }, [curModule, modules]);\n\n const mainContent = useMemo(() => {\n if (activeTabKey === TabList[TabList.Reasons]) {\n return importedModules ? (\n <FileTree\n cwd={cwd}\n treeData={fileStructures}\n needCode={true}\n needShowAllTree={true}\n needJumpto={true}\n selectedChunk={selectedChunk}\n defaultOpenFather={1}\n />\n ) : (\n <Empty className={`${clsNamePrefix}-empty`} />\n );\n }\n\n return (\n <div\n className={`${clsNamePrefix}-file-tree`}\n style={{ padding: Size.BasePadding / 2 }}\n >\n <Col span={24} style={{ marginTop: Size.BasePadding / 2 }}>\n {curModule ? (\n <DependencyTree\n module={curModule}\n dependencies={dependencies}\n cwd={cwd}\n />\n ) : (\n <Empty className={`${clsNamePrefix}-empty`} />\n )}\n </Col>\n </div>\n );\n }, [\n activeTabKey,\n curModule,\n dependencies,\n fileStructures,\n importedModules,\n cwd,\n selectedChunk,\n ]);\n\n return <>{mainContent}</>;\n};\n"],"names":["BailoutReasonCard","reasons","sideEffectCodes","modulePath","Card","clsNamePrefix","Empty","Typography","reason","index","Popover","String","Tooltip","VSCodeIcon","openVSCode","CursorIcon","openCursor","TraeIcon","openTrae","item","CodeViewer","ModuleFilesTree","props","curModule","modules","dependencies","cwd","activeTabKey","selectedChunk","importedModules","setImportedModules","useState","fileStructures","useCreateFileTreeData","useEffect","importeds","getImporteds","mainContent","useMemo","TabList","FileTree","Size","Col","DependencyTree"],"mappings":";;;;;;;;;;;;;;;AAgBO,MAAMA,oBAIR,CAAC,EAAEC,OAAO,EAAEC,eAAe,EAAEC,UAAU,EAAE;IAC5C,IACG,EAACF,WAAW,CAACA,QAAQ,MAAK,KAC1B,EAACC,mBAAmB,CAACA,gBAAgB,MAAK,GAE3C,OAAO,WAAP,GACE,IAACE,MAAIA;QACH,WAAW,GAAGC,cAAc,aAAa,CAAC;QAC1C,UAAU;QACV,WAAW;YAAE,SAAS;YAAI,QAAQ;QAAO;kBAEzC,kBAACC,OAAKA,CAAAA;;IAKZ,OAAO,WAAP,GACE,KAACF,MAAIA;QACH,WAAW,GAAGC,cAAc,aAAa,CAAC;QAC1C,UAAU;QACV,WAAW;YAAE,SAAS;YAAI,QAAQ;QAAO;;YAExCJ,WAAW,WAAXA,GACC;;kCACE,IAACM,WAAW,IAAI;wBACd,QAAM;wBACN,WAAW,GAAGF,cAAc,mBAAmB,CAAC;kCACjD;;kCAGD,IAAC;wBACC,WAAW,GAAGA,cAAc,kBAAkB,CAAC;wBAC/C,OAAO;4BAAE,WAAW;4BAAK,WAAW;wBAAO;kCAE1CJ,QAAQ,MAAM,GAAG,IAChBA,QAAQ,GAAG,CAAC,CAACO,QAAQC,QAAAA,WAAAA,GACnB,KAAC;gCACC,WAAW,GAAGJ,cAAc,kBAAkB,CAAC;;kDAG/C,IAACK,SAAOA;wCAAC,SAASF;wCAAQ,SAAQ;kDAChC,kBAACD,WAAW,SAAS;4CACnB,UAAU;gDAAE,MAAM;4CAAE;4CACpB,WAAW,GAAGF,cAAc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