@rsdoctor/components 1.2.2 → 1.2.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.
@@ -184,8 +184,8 @@ const tabList = [
184
184
  })
185
185
  },
186
186
  {
187
- key: 'tile',
188
- label: 'Tile Graph'
187
+ key: 'treemap',
188
+ label: 'Treemap'
189
189
  }
190
190
  ];
191
191
  const WebpackModulesOverallBase = ({ errors, cwd, summary, entryPoints })=>{
@@ -366,7 +366,7 @@ const WebpackModulesOverallBase = ({ errors, cwd, summary, entryPoints })=>{
366
366
  })
367
367
  }),
368
368
  /*#__PURE__*/ jsx(Card, {
369
- hidden: 'tile' === graphType,
369
+ hidden: 'treemap' === graphType,
370
370
  tabList: tabList,
371
371
  activeTabKey: graphType,
372
372
  onTabChange: (e)=>setGraphType(e),
@@ -1 +1 @@
1
- {"version":3,"file":"pages/BundleSize/components/index.mjs","sources":["webpack://@rsdoctor/components/./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 'lodash-es';\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, withServerAPI } from '../../../components/Manifest';\nimport { Size } from '../../../constants';\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: 'tile',\n label: 'Tile Graph',\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' | 'tile'}\n onTabChange={(e) => setGraphType(e as 'tree' | 'tile')}\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), 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 === '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 === 'tile'}\n tabList={tabList}\n activeTabKey={graphType as 'tree' | 'tile'}\n onTabChange={(e) => setGraphType(e as 'tree' | 'tile')}\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 = withServerAPI({\n api: SDK.ServerAPI.API.GetProjectInfo,\n responsePropName: 'project',\n Component: (props: {\n project: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetProjectInfo>;\n }) => {\n const { root, errors } = props.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});\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","withServerAPI","props","root"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgDA,MAAM,EAAEA,MAAM,EAAE,GAAGC;AAEnB,MAAMC,iBAAiB;AAQv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C;;;;;;2DAWpC,IAACwG,OAAKA,CAAAA;;;;;;;;YAOjBtE;;;AAGP;AAEO,MAAMuE,wBAAwBC,cAAc;IACjD,KAAKvB,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;IACrC,kBAAkB;IAClB,WAAW,CAACwB;QAGV,MAAM,EAAEC,IAAI,EAAElG,MAAM,EAAE,GAAGiG,MAAM,OAAO;QACtC,OAAO,WAAP,GACE,IAACzB,mBAAiBA;YAChB,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,gBAAgB;YACvC,MAAM;gBAAE,iBAAiB;YAAK;sBAE7B,CAACvE,UACO,WAAP,GACE,IAACsE,mBAAiBA;oBAAC,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;8BACrD,CAACtE,cAAAA,WAAAA,GACA,IAACJ,2BAAAA;4BACC,KAAKmG;4BACL,QAAQlG;4BACR,SAASE;4BACT,aAAaC;;;;IAQ7B;AACF"}
1
+ {"version":3,"file":"pages/BundleSize/components/index.mjs","sources":["webpack://@rsdoctor/components/./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 'lodash-es';\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, withServerAPI } from '../../../components/Manifest';\nimport { Size } from '../../../constants';\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), 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 === '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 = withServerAPI({\n api: SDK.ServerAPI.API.GetProjectInfo,\n responsePropName: 'project',\n Component: (props: {\n project: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetProjectInfo>;\n }) => {\n const { root, errors } = props.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});\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","withServerAPI","props","root"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgDA,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G,OAAKA;4DACJ,2BACE,IAACxG,WAAW,IAAI;gEAAC,QAAM;0EAAC;;;;;;2DAWpC,IAACwG,OAAKA,CAAAA;;;;;;;;YAOjBtE;;;AAGP;AAEO,MAAMuE,wBAAwBC,cAAc;IACjD,KAAKvB,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;IACrC,kBAAkB;IAClB,WAAW,CAACwB;QAGV,MAAM,EAAEC,IAAI,EAAElG,MAAM,EAAE,GAAGiG,MAAM,OAAO;QACtC,OAAO,WAAP,GACE,IAACzB,mBAAiBA;YAChB,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,gBAAgB;YACvC,MAAM;gBAAE,iBAAiB;YAAK;sBAE7B,CAACvE,UACO,WAAP,GACE,IAACsE,mBAAiBA;oBAAC,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;8BACrD,CAACtE,cAAAA,WAAAA,GACA,IAACJ,2BAAAA;4BACC,KAAKmG;4BACL,QAAQlG;4BACR,SAASE;4BACT,aAAaC;;;;IAQ7B;AACF"}
@@ -2,4 +2,4 @@ import { Client } from '@rsdoctor/types';
2
2
  export declare const maxModuleSize = 5000;
3
3
  export declare const name = "BundleSize";
4
4
  export declare const route = Client.RsdoctorClientRoutes.BundleSize;
5
- export type GraphType = 'tile' | 'tree';
5
+ export type GraphType = 'treemap' | 'tree';
@@ -1 +1 @@
1
- {"version":3,"file":"pages/BundleSize/constants.mjs","sources":["webpack://@rsdoctor/components/./src/pages/BundleSize/constants.ts"],"sourcesContent":["import { Client } from '@rsdoctor/types';\n\nexport const maxModuleSize = 5000;\n\nexport const name = 'BundleSize';\n\nexport const route = Client.RsdoctorClientRoutes.BundleSize;\n\nexport type GraphType = 'tile' | 'tree';\n"],"names":["maxModuleSize","name","route","Client"],"mappings":";AAEO,MAAMA,gBAAgB;AAEtB,MAAMC,iBAAO;AAEb,MAAMC,QAAQC,OAAO,oBAAoB,CAAC,UAAU"}
1
+ {"version":3,"file":"pages/BundleSize/constants.mjs","sources":["webpack://@rsdoctor/components/./src/pages/BundleSize/constants.ts"],"sourcesContent":["import { Client } from '@rsdoctor/types';\n\nexport const maxModuleSize = 5000;\n\nexport const name = 'BundleSize';\n\nexport const route = Client.RsdoctorClientRoutes.BundleSize;\n\nexport type GraphType = 'treemap' | 'tree';\n"],"names":["maxModuleSize","name","route","Client"],"mappings":";AAEO,MAAMA,gBAAgB;AAEtB,MAAMC,iBAAO;AAEb,MAAMC,QAAQC,OAAO,oBAAoB,CAAC,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/components",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "license": "MIT",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {
@@ -76,9 +76,9 @@
76
76
  "react-router-dom": "6.4.3",
77
77
  "socket.io-client": "4.6.1",
78
78
  "url-parse": "1.5.10",
79
- "@rsdoctor/types": "1.2.2",
80
- "@rsdoctor/graph": "1.2.2",
81
- "@rsdoctor/utils": "1.2.2"
79
+ "@rsdoctor/graph": "1.2.3",
80
+ "@rsdoctor/types": "1.2.3",
81
+ "@rsdoctor/utils": "1.2.3"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "react": ">=18.3.1",