@rsdoctor/components 1.5.2 → 1.5.3-alpha.0

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.
@@ -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;;sDAGxC,IAACJ,WAAW,IAAI;4CA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AAG,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,MAAMC,SAASxB,QAAQ,GAAG,CAAC,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AQ,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\",\"bundle-size-card\":\"bundle-size-card-N8rW3d\",\"bundleSizeCard\":\"bundle-size-card-N8rW3d\",\"ant-tabs-tab\":\"ant-tabs-tab-SpEjsl\",\"antTabsTab\":\"ant-tabs-tab-SpEjsl\",\"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,oBAAmB;IAA0B,gBAAiB;IAA0B,gBAAe;IAAsB,YAAa;IAAsB,OAAQ;IAAe,cAAa;IAAoB,WAAY;IAAoB,qBAAoB;IAA2B,iBAAkB;AAA0B"}
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"}
@@ -98,10 +98,6 @@
98
98
  display: flex;
99
99
  }
100
100
 
101
- .bundle-size-card-N8rW3d .ant-tabs-tab-SpEjsl {
102
- margin-right: 20px;
103
- }
104
-
105
101
  .modal-afyzYa .ant-input-affix-wrapper {
106
102
  width: 490px;
107
103
  padding: 4px 5px;
@@ -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,kBAAkB;AACpB;;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}.bundle-size-card .ant-tabs-tab{margin-right:20px}.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":""}
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":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/components",
3
- "version": "1.5.2",
3
+ "version": "1.5.3-alpha.0",
4
4
  "license": "MIT",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {
@@ -54,14 +54,14 @@
54
54
  "dependencies": {
55
55
  "@ant-design/icons": "5.6.1",
56
56
  "@monaco-editor/react": "4.7.0",
57
- "ansi-to-react": "6.1.6",
57
+ "ansi-to-react": "6.2.6",
58
58
  "antd": "5.19.1",
59
59
  "axios": "^1.13.4",
60
60
  "clsx": "^2.1.1",
61
61
  "dayjs": "1.11.19",
62
62
  "echarts": "^5.6.0",
63
63
  "echarts-for-react": "^3.0.6",
64
- "es-toolkit": "^1.43.0",
64
+ "es-toolkit": "^1.44.0",
65
65
  "i18next": "22.0.4",
66
66
  "monaco-editor": "0.49.0",
67
67
  "path-browserify": "1.0.1",
@@ -74,9 +74,9 @@
74
74
  "react-markdown": "^9.1.0",
75
75
  "socket.io-client": "4.8.1",
76
76
  "url-parse": "1.5.10",
77
- "@rsdoctor/graph": "1.5.2",
78
- "@rsdoctor/utils": "1.5.2",
79
- "@rsdoctor/types": "1.5.2"
77
+ "@rsdoctor/graph": "1.5.3-alpha.0",
78
+ "@rsdoctor/utils": "1.5.3-alpha.0",
79
+ "@rsdoctor/types": "1.5.3-alpha.0"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "react": ">=18.3.1",