@rsdoctor/components 1.5.11 → 1.5.13
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/components/Alert/types.d.ts +2 -2
- package/dist/components/Alerts/bundle-alert.d.ts +1 -1
- package/dist/components/Alerts/bundle-alert.mjs.map +1 -1
- package/dist/components/Alerts/collapse-cjs-require.d.ts +1 -1
- package/dist/components/Alerts/collapse-cross-chunks.d.ts +1 -1
- package/dist/components/Alerts/collapse-esm-cjs.d.ts +1 -1
- package/dist/components/Alerts/collapse-module-mixed-chunks.d.ts +1 -1
- package/dist/components/Alerts/collapse-shared.d.ts +2 -2
- package/dist/components/Alerts/collapse-side-effects-only-imports.d.ts +1 -1
- package/dist/components/Alerts/collapse.d.ts +1 -1
- package/dist/components/Alerts/list.d.ts +1 -1
- package/dist/components/Alerts/overlay.mjs.map +1 -1
- package/dist/components/Charts/done.mjs.map +1 -1
- package/dist/components/Configuration/builder.d.ts +1 -5
- package/dist/components/Configuration/builder.mjs.map +1 -1
- package/dist/components/FileTree/index.d.ts +1 -1
- package/dist/components/Layout/index.d.ts +2 -2
- package/dist/components/Layout/index.mjs.map +1 -1
- package/dist/components/Loader/Analysis/files.mjs.map +1 -1
- package/dist/components/Loader/Analysis/index.d.ts +1 -7
- package/dist/components/Loader/Analysis/index.mjs.map +1 -1
- package/dist/components/Loader/executions.d.ts +1 -1
- package/dist/components/Loader/executions.mjs.map +1 -1
- package/dist/components/Manifest/api.d.ts +2 -2
- package/dist/components/Manifest/api.mjs.map +1 -1
- package/dist/components/Opener/code.d.ts +1 -1
- package/dist/components/Opener/code.mjs.map +1 -1
- package/dist/components/Opener/ide.d.ts +1 -1
- package/dist/components/Opener/ide.mjs.map +1 -1
- package/dist/components/Overall/DataSummary.d.ts +1 -1
- package/dist/components/Overall/bundle.d.ts +1 -1
- package/dist/components/Overall/bundle.mjs.map +1 -1
- package/dist/components/Overall/help-center.d.ts +1 -1
- package/dist/components/Overall/overview.d.ts +1 -1
- package/dist/components/TextDrawer/index.d.ts +1 -1
- package/dist/components/TextDrawer/index.mjs.map +1 -1
- package/dist/components/base/CodeViewer/index.d.ts +1 -1
- package/dist/components/base/CodeViewer/index.mjs +2 -2
- package/dist/components/base/CodeViewer/index.mjs.map +1 -1
- package/dist/components/base/CodeViewer/useCodeDrawer.d.ts +1 -1
- package/dist/components/base/DiffViewer/index.d.ts +1 -1
- package/dist/components/base/DiffViewer/index.mjs +1 -1
- package/dist/components/base/DiffViewer/index.mjs.map +1 -1
- package/dist/components/base/DiffViewer/useDiffDrawer.d.ts +1 -1
- package/dist/pages/BundleSize/components/asset.mjs +390 -323
- package/dist/pages/BundleSize/components/asset.mjs.map +1 -1
- package/dist/pages/BundleSize/components/asset.module.mjs +16 -0
- package/dist/pages/BundleSize/components/asset.module.mjs.map +1 -0
- package/dist/pages/BundleSize/components/asset_module.css +103 -0
- package/dist/pages/BundleSize/components/asset_module.css.map +1 -0
- package/dist/pages/BundleSize/components/index.mjs +3 -0
- package/dist/pages/BundleSize/components/index.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index.module.mjs +0 -7
- package/dist/pages/BundleSize/components/index.module.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index_module.css +0 -61
- package/dist/pages/BundleSize/components/index_module.css.map +1 -1
- package/dist/pages/ModuleAnalyze/chunks.mjs.map +1 -1
- package/dist/pages/Overall/responsiveLayout.d.ts +1 -1
- package/dist/pages/Resources/BundleDiff/DiffContainer/types.d.ts +1 -1
- package/dist/pages/Resources/BundleDiff/DiffContainer/utils.d.ts +1 -1
- package/dist/pages/Resources/BundleDiff/DiffServerAPIProvider/index.d.ts +1 -1
- package/dist/pages/Resources/BundleDiff/DiffServerAPIProvider/index.mjs.map +1 -1
- package/dist/pages/TreeShaking/editor.d.ts +1 -1
- package/dist/pages/TreeShaking/editor.mjs +2 -2
- package/dist/pages/TreeShaking/editor.mjs.map +1 -1
- package/dist/pages/TreeShaking/space.d.ts +1 -1
- package/dist/utils/file.d.ts +4 -4
- package/dist/utils/file.mjs.map +1 -1
- package/dist/utils/hooks.d.ts +4 -0
- package/dist/utils/hooks.mjs +42 -3
- package/dist/utils/hooks.mjs.map +1 -1
- package/package.json +18 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages/BundleSize/components/asset.mjs","sources":["../../../../src/pages/BundleSize/components/asset.tsx"],"sourcesContent":["import {\n CodepenCircleOutlined,\n ColumnHeightOutlined,\n InfoCircleOutlined,\n} from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Button,\n Card,\n Col,\n Divider,\n Empty,\n Popover,\n Row,\n Space,\n Tag,\n Tooltip,\n Tree,\n Typography,\n} from 'antd';\nimport { DataNode as AntdDataNode } from 'antd/es/tree';\nimport { omitBy, sumBy } from 'es-toolkit/compat';\nimport { dirname, relative } from 'path';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { CodeViewer } from 'src/components/base';\nimport { Badge as Bdg } from '../../../components/Badge';\nimport { KeywordInput } from '../../../components/Form/keyword';\nimport { Keyword } from '../../../components/Keyword';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { TextDrawer } from '../../../components/TextDrawer';\nimport { Size } from '../../../constants';\nimport {\n DataNode,\n createFileStructures,\n formatSize,\n isJsDataUrl,\n useI18n,\n} from '../../../utils';\nimport { ModuleAnalyzeComponent } from '../../ModuleAnalyze';\nimport { ModuleGraphListContext } from '../config';\nimport styles from './index.module.scss';\n\nconst { DirectoryTree } = Tree;\n\nlet expandedModulesKeys: React.Key[] = [];\nconst TAB_MAP = {\n source: 'source code',\n transformed: 'Transformed Code (After compile)',\n parsedSource: 'Bundled Code (After bundle and tree-shaking)',\n};\n\nconst tagStyle = {\n margin: 'none',\n marginInlineEnd: 0,\n};\n\nconst EmptyCodeItem = () => (\n <Empty\n description={`Do not have the module code.\n (1) If you use the brief mode, there will not have any codes to show.\n (2) If you use lite mode, there will not have source codes.`}\n />\n);\n\nexport const ModuleCodeViewer: React.FC<{ data: SDK.ModuleData }> = ({\n data,\n}) => {\n const [tab, setTab] = useState('');\n const { t } = useI18n();\n\n const TAB_LAB_MAP: Record<string, string> = {\n source: 'Source Code',\n transformed: `Transformed Code(${t('After Compile')})`,\n parsedSource: `Bundled Code(${t('After Bundled')})`,\n };\n if (!data) return null;\n\n const { path } = data;\n\n return (\n <TextDrawer\n text=\"\"\n buttonProps={{\n size: 'small',\n icon: (\n <Popover content=\"Open the Codes Box\">\n <CodepenCircleOutlined />\n </Popover>\n ),\n type: 'default',\n }}\n buttonStyle={{ padding: `0 4px` }}\n drawerProps={{\n destroyOnClose: true,\n title: `Code of \"${path}\"`,\n }}\n >\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetModuleCodeByModuleId}\n body={{ moduleId: data.id }}\n >\n {(source) => {\n return (\n <>\n {!source['source'] &&\n !source['parsedSource'] &&\n !source['transformed'] ? (\n <EmptyCodeItem />\n ) : (\n <Card\n className=\"code-size-card\"\n style={{ width: '100%' }}\n tabList={Object.keys(omitBy(source, (s) => !s))\n .map((k) => ({ tab: k }))\n .map((e) => ({\n ...e,\n tab: TAB_LAB_MAP[e.tab],\n key: e.tab,\n }))}\n defaultActiveTabKey={\n source['parsedSource'] ? 'parsedSource' : 'source'\n }\n onTabChange={(v) => setTab(v)}\n tabBarExtraContent={\n <Popover\n placement=\"bottom\"\n title={\n <Typography.Title level={5}>Explain</Typography.Title>\n }\n content={\n <>\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n marginBottom: 30,\n }}\n >\n <div>\n <Typography.Text strong>Source: </Typography.Text>\n <Typography.Text>\n {TAB_MAP.source}\n </Typography.Text>\n </div>\n <div>\n <Typography.Text strong>\n Transformed:\n </Typography.Text>\n <Typography.Text>\n {TAB_MAP.transformed}\n </Typography.Text>\n </div>\n <div>\n <Typography.Text strong>\n Bundled Source:\n </Typography.Text>\n <Typography.Text>\n {TAB_MAP.parsedSource}\n </Typography.Text>\n </div>\n <br />\n <Typography.Text strong>{'More'}</Typography.Text>\n <Typography.Text>\n {t('CodeModeExplain')}\n </Typography.Text>\n </div>\n </>\n }\n trigger={'hover'}\n >\n <a href=\"#\">Explain</a>\n </Popover>\n }\n styles={{ body: { padding: 0, overflow: 'hidden' } }}\n >\n {source['parsedSource'] ||\n source['source'] ||\n source['transformed'] ? (\n <CodeViewer\n isEmbed\n code={\n tab\n ? source[tab as keyof SDK.ModuleSource]\n : source['parsedSource']\n ? source['parsedSource']\n : source['source']\n }\n filePath={path}\n />\n ) : (\n <EmptyCodeItem />\n )}\n </Card>\n )}\n </>\n );\n }}\n </ServerAPIProvider>\n </TextDrawer>\n );\n};\n\nexport const ModuleGraphViewer: React.FC<{\n id: number | string;\n show: boolean;\n setShow: (_show: boolean) => void;\n cwd: string;\n}> = ({ id, show, setShow, cwd }) => {\n if (!id) return null;\n\n return (\n <ServerAPIProvider api={SDK.ServerAPI.API.GetAllModuleGraph} body={{}}>\n {(modules) => (\n <ModuleAnalyzeComponent\n cwd={cwd}\n moduleId={id}\n modules={modules}\n show={show}\n setShow={setShow}\n />\n )}\n </ServerAPIProvider>\n );\n};\n\nconst inlinedResourcePathKey = '__RESOURCEPATH__';\n\nexport function getChildrenModule(node: DataNode, mods: string[]) {\n if (node.children) {\n node.children.forEach((n: DataNode) => {\n if (n.isLeaf) {\n mods.push(n[inlinedResourcePathKey]);\n } else {\n getChildrenModule(n, mods);\n }\n });\n }\n\n return mods;\n}\n\nexport const ModulesStatistics: React.FC<{\n modules: SDK.ModuleData[];\n chunks: SDK.ChunkData[];\n filteredModules: SDK.ModuleData[];\n}> = ({ modules, chunks, filteredModules }) => {\n const { sourceSize, parsedSize, filteredParsedSize, filteredSourceSize } =\n useMemo(() => {\n return {\n sourceSize: sumBy(modules, (e) => e.size.sourceSize),\n parsedSize: sumBy(modules, (e) => e.size.parsedSize),\n filteredSourceSize: sumBy(filteredModules, (e) => e.size.sourceSize),\n filteredParsedSize: sumBy(filteredModules, (e) => e.size.parsedSize),\n };\n }, [modules, filteredModules]);\n\n return (\n <Space>\n <Tooltip\n title={`total modules count is ${modules.length}, the filtered modules count is ${filteredModules.length}`}\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n Modules: {filteredModules.length} / {modules.length}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n Total modules bundled size: {formatSize(parsedSize)}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n Total modules source size: {formatSize(sourceSize)}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n Filtered modules bundled size: {formatSize(filteredParsedSize)}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n Filtered modules source size: {formatSize(filteredSourceSize)}\n </Typography.Text>\n </Space>\n }\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n Modules Size:\n {filteredParsedSize === parsedSize\n ? formatSize(parsedSize)\n : `${formatSize(filteredParsedSize)} / ${formatSize(parsedSize)}`}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n this asset includes {chunks.length} chunks:\n </Typography.Text>\n {chunks.map((e) => (\n <Bdg label=\"chunk\" value={e.name} key={e.name} />\n ))}\n </Space>\n }\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n Chunks: {chunks.length}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n </Space>\n );\n};\n\nconst ConcatenatedTag = ({ moduleCount }: { moduleCount: number }) => {\n return (\n <Tooltip\n title={\n <Space>\n <Typography.Text style={{ color: 'inherit' }}>\n This is a concatenated container module that includes {moduleCount}{' '}\n modules\n </Typography.Text>\n </Space>\n }\n >\n <Tag color=\"blue\" style={tagStyle}>\n concatenated container\n </Tag>\n </Tooltip>\n );\n};\n\nconst TotalBundledSizeTag = ({ size }: { size: number }) => {\n return (\n <Tooltip\n title={\n <Space>\n <Typography.Text style={{ color: 'inherit' }}>\n The total output size of all the files in this folder. If you\n enabled minification, this value shows the minified size.\n </Typography.Text>\n </Space>\n }\n >\n <Tag style={tagStyle} color={'geekblue'}>\n {`bundled size: ${formatSize(size)}`}\n </Tag>\n </Tooltip>\n );\n};\n\nconst BundledSizeTag = ({ size }: { size: number }) => {\n return (\n <Tooltip\n title={\n <Space>\n <Typography.Text style={{ color: 'inherit' }}>\n The final output size of this file. If you enabled minification,\n this value shows the minified size.\n </Typography.Text>\n </Space>\n }\n >\n <Tag color={'geekblue'}>{`bundled size: ${formatSize(size)}`}</Tag>\n </Tooltip>\n );\n};\n\nconst GzippedSizeTag = ({ size }: { size: number }) => {\n return (\n <Tooltip\n title={\n <Space>\n <Typography.Text style={{ color: 'inherit' }}>\n The compressed file size that users actually download, as most web\n servers use gzip compression.\n </Typography.Text>\n </Space>\n }\n >\n <Tag color={'orange'}>{`gzipped: ${formatSize(size)}`}</Tag>\n </Tooltip>\n );\n};\n\nconst TotalSourceSizeTag = ({ size }: { size: number }) => {\n return (\n <Tooltip\n title={\n <Space>\n <Typography.Text style={{ color: 'inherit' }}>\n The total original size of all the files in this folder, before any\n transformations and minification.\n </Typography.Text>\n </Space>\n }\n >\n <Tag\n style={tagStyle}\n color={'cyan'}\n >{`source size: ${formatSize(size)}`}</Tag>\n </Tooltip>\n );\n};\n\nconst SourceSizeTag = ({ size }: { size: number }) => {\n return (\n <Tooltip\n title={\n <Space>\n <Typography.Text style={{ color: 'inherit' }}>\n The original size of this file, before any transformations and\n minification.\n </Typography.Text>\n </Space>\n }\n >\n <Tag color={'cyan'}>{`source size: ${formatSize(size)}`}</Tag>\n </Tooltip>\n );\n};\n\nexport const AssetDetail: React.FC<{\n asset: SDK.AssetData;\n chunks: SDK.ChunkData[];\n modules: SDK.ModuleData[];\n moduleSizeLimit?: number;\n height?: number;\n root: string;\n}> = ({\n asset,\n chunks: includeChunks,\n modules: includeModules,\n moduleSizeLimit,\n height,\n root,\n}) => {\n const [moduleKeyword, setModuleKeyword] = useState('');\n const [defaultExpandAll, setDefaultExpandAll] = useState(false);\n const [moduleJumpList, setModuleJumpList] = useState([] as number[]);\n const [show, setShow] = useState(false);\n\n const filteredModules = useMemo(() => {\n let res = includeModules.slice();\n if (moduleKeyword) {\n const regexp = new RegExp(moduleKeyword, 'i');\n res = res.filter((e) => regexp.test(e.path));\n }\n\n if (moduleSizeLimit) {\n res = res.filter((e) => e.size.parsedSize >= moduleSizeLimit);\n }\n\n return res;\n }, [includeModules, moduleKeyword, moduleSizeLimit]);\n\n const fileStructures = useMemo(() => {\n // Normalize paths for comparison - convert backslashes to forward slashes\n const normalizePath = (path: string) => path.replace(/\\\\/g, '/');\n const res = createFileStructures({\n files: filteredModules.map((e) => e.path).filter(Boolean),\n inlinedResourcePathKey,\n fileTitle(file, basename) {\n const mod = filteredModules.find(\n (e) => normalizePath(e.path) === normalizePath(file),\n )!;\n\n if (!mod) return basename;\n\n const { parsedSize = 0, sourceSize = 0, gzipSize = 0 } = mod.size;\n const isConcatenation = mod.kind === SDK.ModuleKind.Concatenation;\n\n const containedOtherModules =\n !isConcatenation &&\n parsedSize === 0 &&\n includeModules.filter(\n (e) => e !== mod && e.modules && e.modules.indexOf(mod.id) > -1,\n );\n\n return (\n <div className={styles['bundle-tree']}>\n <Popover\n content={`Open the ${basename}’s module reasons tree.`}\n placement=\"bottom\"\n >\n <div\n className={styles.box}\n onClick={() => {\n setModuleJumpList([mod.id]);\n setShow(true);\n }}\n >\n <div className={styles.keywords}>\n <Keyword ellipsis text={basename} keyword={''} />\n </div>\n <div className={styles.dividerDiv}>\n <Divider className={styles.divider} dashed />\n </div>\n </div>\n </Popover>\n <Space>\n {parsedSize !== 0 ? (\n <>\n {typeof gzipSize === 'number' ? (\n <Popover\n placement=\"bottom\"\n content={<SourceSizeTag size={sourceSize} />}\n >\n <Space direction=\"horizontal\">\n <BundledSizeTag size={parsedSize} />\n <GzippedSizeTag size={gzipSize} />\n </Space>\n </Popover>\n ) : (\n <Space direction=\"horizontal\">\n <BundledSizeTag size={parsedSize} />\n <SourceSizeTag size={sourceSize} />\n </Space>\n )}\n </>\n ) : sourceSize !== 0 ? (\n // fallback to display tag for source size\n <SourceSizeTag size={sourceSize} />\n ) : null}\n {isConcatenation ? (\n <ConcatenatedTag moduleCount={mod.modules?.length || 0} />\n ) : null}\n {containedOtherModules && containedOtherModules.length ? (\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n This module is concatenated into another container\n module:\n </Typography.Text>\n {containedOtherModules.map(({ id, path }) => {\n if (isJsDataUrl(path)) {\n return (\n <Typography.Paragraph\n ellipsis={{ rows: 4 }}\n key={id}\n style={{ color: 'inherit', maxWidth: '100%' }}\n code\n >\n {path}\n </Typography.Paragraph>\n );\n }\n\n const p = relative(dirname(mod.path), path);\n if (p.startsWith('javascript;charset=utf-8;base64,')) {\n return (\n <Typography.Text\n key={id}\n style={{ color: 'inherit', maxWidth: '100%' }}\n code\n >\n {p[0] === '.' ? p : `./${p}`}\n </Typography.Text>\n );\n }\n\n return (\n <Typography.Text\n key={id}\n style={{ color: 'inherit' }}\n code\n >\n {p[0] === '.' ? p : `./${p}`}\n </Typography.Text>\n );\n })}\n </Space>\n }\n >\n <Tag color=\"green\">concatenated</Tag>\n </Tooltip>\n ) : null}\n\n <ModuleCodeViewer data={mod} />\n </Space>\n </div>\n );\n },\n dirTitle(dir, defaultTitle) {\n const mods: string[] = [];\n const paths = getChildrenModule(dir, mods);\n if (paths.length) {\n // Normalize paths for comparison - convert backslashes to forward slashes\n const normalizePath = (path: string) => path.replace(/\\\\/g, '/');\n const mods = paths.map(\n (e) =>\n includeModules.find(\n (m) => normalizePath(m.path) === normalizePath(e),\n )!,\n );\n\n const parsedSize = sumBy(mods, (e) => e?.size?.parsedSize || 0);\n const sourceSize = sumBy(mods, (e) => e?.size?.sourceSize || 0);\n return (\n <div className={styles['bundle-tree']}>\n <div className={styles.box}>\n <div className={styles.keywords}>\n <Keyword ellipsis text={defaultTitle} keyword={''} />\n </div>\n <div className={styles.dividerDiv}>\n <Divider className={styles.divider} dashed />\n </div>\n </div>\n <Space>\n {parsedSize > 0 ? (\n <>\n <TotalBundledSizeTag size={parsedSize} />\n <TotalSourceSizeTag size={sourceSize} />\n </>\n ) : (\n <TotalSourceSizeTag size={sourceSize} />\n )}\n </Space>\n </div>\n );\n }\n\n return defaultTitle;\n },\n page: 'bundle',\n });\n return res;\n }, [filteredModules]);\n\n const onSearch = (value: string) => setModuleKeyword(value);\n\n useEffect(() => {\n setModuleKeyword('');\n setDefaultExpandAll(false);\n }, [asset]);\n\n useEffect(() => {\n setDefaultExpandAll(false);\n }, [moduleKeyword]);\n\n return (\n <ModuleGraphListContext.Provider\n value={{ moduleJumpList, setModuleJumpList }}\n >\n <Card\n className={styles.bundle}\n title={`Modules of \"${asset.path}\"`}\n bodyStyle={{ minHeight: height }}\n size=\"small\"\n >\n {includeModules.length ? (\n <Row>\n <Col span={24}>\n <ModulesStatistics\n modules={includeModules}\n chunks={includeChunks}\n filteredModules={filteredModules}\n />\n </Col>\n <Col span={24}>\n <Space>\n <KeywordInput\n placeholder=\"search module by keyword\"\n onChange={onSearch}\n key={asset.path}\n />\n <Button\n onClick={() => setDefaultExpandAll(true)}\n size=\"small\"\n icon={<ColumnHeightOutlined />}\n />\n </Space>\n </Col>\n <Col span={24} style={{ marginTop: Size.BasePadding }}>\n {filteredModules.length ? (\n <DirectoryTree\n key={`tree_${moduleKeyword}_${defaultExpandAll}_${asset.path}`}\n selectable={false}\n defaultExpandAll={\n defaultExpandAll || filteredModules.length <= 20\n }\n onExpand={(expandedKeys) => {\n expandedModulesKeys = expandedKeys;\n }}\n defaultExpandParent\n // @ts-ignore\n defaultExpandedKeys={\n expandedModulesKeys?.length\n ? expandedModulesKeys\n : fileStructures.length === 1\n ? [fileStructures[0].key]\n : []\n }\n treeData={fileStructures as AntdDataNode[]}\n rootStyle={{\n maxHeight: '500px',\n overflow: 'auto',\n border: '1px solid rgba(235, 237, 241)',\n padding: '14px 20px',\n }}\n />\n ) : (\n <Empty\n description={\n <Typography.Text\n strong\n >{`\"${moduleKeyword}\" can't match any modules`}</Typography.Text>\n }\n />\n )}\n </Col>\n </Row>\n ) : (\n <Empty\n description={\n <Typography.Text\n strong\n >{`\"${asset.path}\" doesn't have any modules`}</Typography.Text>\n }\n />\n )}\n\n <ModuleGraphViewer\n id={\n moduleJumpList?.length\n ? moduleJumpList[moduleJumpList.length - 1]\n : ''\n }\n show={show}\n setShow={setShow}\n cwd={root}\n />\n </Card>\n </ModuleGraphListContext.Provider>\n );\n};\n"],"names":["DirectoryTree","Tree","expandedModulesKeys","TAB_MAP","tagStyle","EmptyCodeItem","Empty","ModuleCodeViewer","data","tab","setTab","useState","t","useI18n","TAB_LAB_MAP","path","TextDrawer","Popover","CodepenCircleOutlined","ServerAPIProvider","SDK","source","Card","Object","omitBy","s","k","e","v","Typography","CodeViewer","ModuleGraphViewer","id","show","setShow","cwd","modules","ModuleAnalyzeComponent","inlinedResourcePathKey","getChildrenModule","node","mods","n","ModulesStatistics","chunks","filteredModules","sourceSize","parsedSize","filteredParsedSize","filteredSourceSize","useMemo","sumBy","Space","Tooltip","InfoCircleOutlined","Divider","formatSize","Bdg","ConcatenatedTag","moduleCount","Tag","TotalBundledSizeTag","size","BundledSizeTag","GzippedSizeTag","TotalSourceSizeTag","SourceSizeTag","AssetDetail","asset","includeChunks","includeModules","moduleSizeLimit","height","root","moduleKeyword","setModuleKeyword","defaultExpandAll","setDefaultExpandAll","moduleJumpList","setModuleJumpList","res","regexp","RegExp","fileStructures","normalizePath","createFileStructures","Boolean","file","basename","mod","gzipSize","isConcatenation","containedOtherModules","styles","Keyword","isJsDataUrl","p","relative","dirname","dir","defaultTitle","paths","m","onSearch","value","useEffect","ModuleGraphListContext","Row","Col","KeywordInput","Button","ColumnHeightOutlined","Size","expandedKeys"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,MAAM,EAAEA,eAAAA,aAAa,EAAE,GAAGC;AAE1B,IAAIC,sBAAmC,EAAE;AACzC,MAAMC,UAAU;IACd,QAAQ;IACR,aAAa;IACb,cAAc;AAChB;AAEA,MAAMC,WAAW;IACf,QAAQ;IACR,iBAAiB;AACnB;AAEA,MAAMC,gBAAgB,kBACpB,IAACC,OAAKA;QACJ,aAAa,CAAC;;6DAE2C,CAAC;;AAIvD,MAAMC,mBAAuD,CAAC,EACnEC,IAAI,EACL;IACC,MAAM,CAACC,KAAKC,OAAO,GAAGC,SAAS;IAC/B,MAAM,EAAEC,CAAC,EAAE,GAAGC;IAEd,MAAMC,cAAsC;QAC1C,QAAQ;QACR,aAAa,CAAC,iBAAiB,EAAEF,EAAE,iBAAiB,CAAC,CAAC;QACtD,cAAc,CAAC,aAAa,EAAEA,EAAE,iBAAiB,CAAC,CAAC;IACrD;IACA,IAAI,CAACJ,MAAM,OAAO;IAElB,MAAM,EAAEO,IAAI,EAAE,GAAGP;IAEjB,OAAO,WAAP,GACE,IAACQ,YAAUA;QACT,MAAK;QACL,aAAa;YACX,MAAM;YACN,MAAM,WAAN,GACE,IAACC,SAAOA;gBAAC,SAAQ;0BACf,kBAACC,uBAAqBA,CAAAA;;YAG1B,MAAM;QACR;QACA,aAAa;YAAE,SAAS;QAAQ;QAChC,aAAa;YACX,gBAAgB;YAChB,OAAO,CAAC,SAAS,EAAEH,KAAK,CAAC,CAAC;QAC5B;kBAEA,kBAACI,mBAAiBA;YAChB,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,uBAAuB;YAC9C,MAAM;gBAAE,UAAUZ,KAAK,EAAE;YAAC;sBAEzB,CAACa,SACO,WAAP,GACE;8BACG,AAACA,MAAM,CAAC,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;;sCAIjC,IAACH,KAAGA;4BAAC,MAAM;4BAAI,OAAO;gCAAE,WAAWI,KAAK,WAAW;4BAAC;sCACjDnE,gBAAgB,MAAM,GAAG,WAAH,GACrB,IAAC7C,eAAaA;gCAEZ,YAAY;gCACZ,kBACE4E,oBAAoB/B,gBAAgB,MAAM,IAAI;gCAEhD,UAAU,CAACoE;oCACT/G,sBAAsB+G;gCACxB;gCACA,qBAAmB;gCAEnB,qBACE/G,qBAAqB,SACjBA,sBACAiF,AAA0B,MAA1BA,eAAe,MAAM,GACnB;oCAACA,cAAc,CAAC,EAAE,CAAC,GAAG;iCAAC,GACvB,EAAE;gCAEV,UAAUA;gCACV,WAAW;oCACT,WAAW;oCACX,UAAU;oCACV,QAAQ;oCACR,SAAS;gCACX;+BAvBK,CAAC,KAAK,EAAET,cAAc,CAAC,EAAEE,iBAAiB,CAAC,EAAER,MAAM,IAAI,EAAE,kBA0BhE,IAAC9D,OAAKA;gCACJ,2BACE,IAACuB,WAAW,IAAI;oCACd,QAAM;8CACN,CAAC,CAAC,EAAE6C,cAAc,yBAAyB,CAAC;;;;;mCAOxD,IAACpE,OAAKA;oBACJ,2BACE,IAACuB,WAAW,IAAI;wBACd,QAAM;kCACN,CAAC,CAAC,EAAEuC,MAAM,IAAI,CAAC,0BAA0B,CAAC;;;8BAKlD,IAACrC,mBAAiBA;oBAChB,IACE+C,gBAAgB,SACZA,cAAc,CAACA,eAAe,MAAM,GAAG,EAAE,GACzC;oBAEN,MAAM7C;oBACN,SAASC;oBACT,KAAKuC;;;;;AAKf"}
|
|
1
|
+
{"version":3,"file":"pages/BundleSize/components/asset.mjs","sources":["../../../../src/pages/BundleSize/components/asset.tsx"],"sourcesContent":["import {\n CodepenCircleOutlined,\n ColumnHeightOutlined,\n InfoCircleOutlined,\n} from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Button,\n Card,\n Divider,\n Empty,\n Popover as BasePopover,\n Space,\n Tag,\n type TagProps,\n type TooltipProps,\n type PopoverProps,\n Tooltip as BaseTooltip,\n Tree,\n Typography,\n} from 'antd';\nimport { DataNode as AntdDataNode } from 'antd/es/tree';\nimport { debounce, omitBy, sumBy } from 'es-toolkit/compat';\nimport { dirname, relative } from 'path';\nimport React, {\n useEffect,\n useMemo,\n useState,\n memo,\n useCallback,\n use,\n createContext,\n} from 'react';\nimport { CodeViewer } from 'src/components/base';\nimport { Badge as Bdg } from '../../../components/Badge';\nimport { KeywordInput } from '../../../components/Form/keyword';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { TextDrawer } from '../../../components/TextDrawer';\nimport { Size } from '../../../constants';\nimport {\n DataNode,\n createFileStructures,\n formatSize,\n isJsDataUrl,\n useElementSize,\n useI18n,\n} from '../../../utils';\nimport { ModuleAnalyzeComponent } from '../../ModuleAnalyze';\nimport { ModuleGraphListContext } from '../config';\nimport styles from './asset.module.scss';\nimport { ModuleData } from '@rsdoctor/graph';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nconst { DirectoryTree } = Tree;\n\nconst TAB_MAP = {\n source: 'source code',\n transformed: 'Transformed Code (After compile)',\n parsedSource: 'Bundled Code (After bundle and tree-shaking)',\n};\n\n// antd's tooltip/popover component often throws 185 error when rendered inside a virtual list.\n// this is used as a reset mechanism for the error boundary.\n// also these tooltips are a real performance killer\n// and they can be easily turned off by wrapping the problematic subtree in DisablePopups\nconst POPUPS_ENABLED_BY_DEFAULT = true;\nconst PopupContext = createContext({ enabled: POPUPS_ENABLED_BY_DEFAULT });\nconst DisablePopups = ({ children }: { children: any }) => (\n <PopupContext.Provider value={{ enabled: false }}>\n {children}\n </PopupContext.Provider>\n);\nconst usePopupsEnabled = (): boolean => use(PopupContext)?.enabled ?? true;\nconst Tooltip = (props: TooltipProps) => {\n const enabled = usePopupsEnabled();\n if (enabled) return <BaseTooltip {...props} />;\n else return props.children ?? null;\n};\nconst Popover = (props: PopoverProps) => {\n const enabled = usePopupsEnabled();\n if (enabled) return <BasePopover {...props} />;\n else return props.children ?? null;\n};\n\nconst EmptyCodeItem = () => (\n <Empty\n description={`Do not have the module code.\n (1) If you use the brief mode, there will not have any codes to show.\n (2) If you use lite mode, there will not have source codes.`}\n />\n);\n\nexport const ModuleCodeViewer: React.FC<{ data: SDK.ModuleData }> = ({\n data,\n}) => {\n const [tab, setTab] = useState('');\n const { t } = useI18n();\n\n const TAB_LAB_MAP: Record<string, string> = {\n source: 'Source Code',\n transformed: `Transformed Code(${t('After Compile')})`,\n parsedSource: `Bundled Code(${t('After Bundled')})`,\n };\n if (!data) return null;\n\n const { path } = data;\n\n return (\n <TextDrawer\n text=\"\"\n buttonProps={{\n size: 'small',\n icon: (\n <Popover content=\"Open the Codes Box\">\n <CodepenCircleOutlined />\n </Popover>\n ),\n type: 'default',\n }}\n buttonStyle={{ padding: `0 4px` }}\n drawerProps={{\n destroyOnClose: true,\n title: `Code of \"${path}\"`,\n }}\n >\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetModuleCodeByModuleId}\n body={{ moduleId: data.id }}\n >\n {(source) => {\n return (\n <>\n {!source['source'] &&\n !source['parsedSource'] &&\n !source['transformed'] ? (\n <EmptyCodeItem />\n ) : (\n <Card\n className=\"code-size-card\"\n style={{ width: '100%' }}\n tabList={Object.keys(omitBy(source, (s) => !s))\n .map((k) => ({ tab: k }))\n .map((e) => ({\n ...e,\n tab: TAB_LAB_MAP[e.tab],\n key: e.tab,\n }))}\n defaultActiveTabKey={\n source['parsedSource'] ? 'parsedSource' : 'source'\n }\n onTabChange={(v) => setTab(v)}\n tabBarExtraContent={\n <Popover\n placement=\"bottom\"\n title={\n <Typography.Title level={5}>Explain</Typography.Title>\n }\n content={\n <>\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n marginBottom: 30,\n }}\n >\n <div>\n <Typography.Text strong>Source: </Typography.Text>\n <Typography.Text>\n {TAB_MAP.source}\n </Typography.Text>\n </div>\n <div>\n <Typography.Text strong>\n Transformed:\n </Typography.Text>\n <Typography.Text>\n {TAB_MAP.transformed}\n </Typography.Text>\n </div>\n <div>\n <Typography.Text strong>\n Bundled Source:\n </Typography.Text>\n <Typography.Text>\n {TAB_MAP.parsedSource}\n </Typography.Text>\n </div>\n <br />\n <Typography.Text strong>{'More'}</Typography.Text>\n <Typography.Text>\n {t('CodeModeExplain')}\n </Typography.Text>\n </div>\n </>\n }\n trigger={'hover'}\n >\n <a href=\"#\">Explain</a>\n </Popover>\n }\n styles={{ body: { padding: 0, overflow: 'hidden' } }}\n >\n {source['parsedSource'] ||\n source['source'] ||\n source['transformed'] ? (\n <CodeViewer\n isEmbed\n code={\n tab\n ? source[tab as keyof SDK.ModuleSource]\n : source['parsedSource']\n ? source['parsedSource']\n : source['source']\n }\n filePath={path}\n />\n ) : (\n <EmptyCodeItem />\n )}\n </Card>\n )}\n </>\n );\n }}\n </ServerAPIProvider>\n </TextDrawer>\n );\n};\n\nexport const ModuleGraphViewer: React.FC<{\n id: number | string;\n show: boolean;\n setShow: (_show: boolean) => void;\n cwd: string;\n}> = ({ id, show, setShow, cwd }) => {\n if (!id) return null;\n\n return (\n <ServerAPIProvider api={SDK.ServerAPI.API.GetAllModuleGraph} body={{}}>\n {(modules) => (\n <ModuleAnalyzeComponent\n cwd={cwd}\n moduleId={id}\n modules={modules}\n show={show}\n setShow={setShow}\n />\n )}\n </ServerAPIProvider>\n );\n};\n\nconst inlinedResourcePathKey = '__RESOURCEPATH__';\n\nexport function getChildrenModule(node: DataNode, mods: string[]) {\n if (node.children) {\n node.children.forEach((n: DataNode) => {\n if (n.isLeaf) {\n mods.push(n[inlinedResourcePathKey]);\n } else {\n getChildrenModule(n, mods);\n }\n });\n }\n\n return mods;\n}\n\nexport const ModulesStatistics: React.FC<{\n modules: SDK.ModuleData[];\n chunks: SDK.ChunkData[];\n filteredModules: SDK.ModuleData[];\n}> = memo(({ modules, chunks, filteredModules }) => {\n const { sourceSize, parsedSize, filteredParsedSize, filteredSourceSize } =\n useMemo(() => {\n return {\n sourceSize: sumBy(modules, (e) => e.size.sourceSize),\n parsedSize: sumBy(modules, (e) => e.size.parsedSize),\n filteredSourceSize: sumBy(filteredModules, (e) => e.size.sourceSize),\n filteredParsedSize: sumBy(filteredModules, (e) => e.size.parsedSize),\n };\n }, [modules, filteredModules]);\n\n return (\n <Space>\n <Tooltip\n title={`total modules count is ${modules.length}, the filtered modules count is ${filteredModules.length}`}\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n Modules: {filteredModules.length} / {modules.length}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n Total modules bundled size: {formatSize(parsedSize)}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n Total modules source size: {formatSize(sourceSize)}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n Filtered modules bundled size: {formatSize(filteredParsedSize)}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n Filtered modules source size: {formatSize(filteredSourceSize)}\n </Typography.Text>\n </Space>\n }\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n Modules Size:\n {filteredParsedSize === parsedSize\n ? formatSize(parsedSize)\n : `${formatSize(filteredParsedSize)} / ${formatSize(parsedSize)}`}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n this asset includes {chunks.length} chunks:\n </Typography.Text>\n {chunks.map((e) => (\n <Bdg label=\"chunk\" value={e.name} key={e.name} />\n ))}\n </Space>\n }\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n Chunks: {chunks.length}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n </Space>\n );\n});\n\nconst defaultTagStyle: React.CSSProperties = {\n margin: 'none',\n marginInlineEnd: 0,\n};\nconst AbstractTag = ({\n color,\n tooltipTitle,\n style = defaultTagStyle,\n children,\n}: {\n color: TagProps['color'];\n children: string;\n tooltipTitle: string;\n style?: React.CSSProperties | null;\n}) => {\n return (\n <Tooltip\n title={\n <Space>\n <Typography.Text style={{ color: 'inherit' }}>\n {tooltipTitle}\n </Typography.Text>\n </Space>\n }\n >\n <Tag color={color} style={style || undefined}>\n {children}\n </Tag>\n </Tooltip>\n );\n};\nconst ConcatenatedTag = ({ moduleCount }: { moduleCount: number }) => {\n return (\n <AbstractTag\n color=\"blue\"\n tooltipTitle={`This is a concatenated container module that includes ${moduleCount} modules`}\n >\n concatenated container\n </AbstractTag>\n );\n};\nconst TotalBundledSizeTag = ({ size }: { size: number }) => {\n return (\n <AbstractTag\n color=\"geekblue\"\n tooltipTitle=\"The total output size of all the files in this folder. If you enabled minification, this value shows the minified size.\"\n >\n {`bundled size: ${formatSize(size)}`}\n </AbstractTag>\n );\n};\nconst BundledSizeTag = ({ size }: { size: number }) => {\n return (\n <AbstractTag\n color=\"geekblue\"\n style={null}\n tooltipTitle=\"The final output size of this file. If you enabled minification, this value shows the minified size.\"\n >\n {`bundled size: ${formatSize(size)}`}\n </AbstractTag>\n );\n};\nconst GzippedSizeTag = ({ size }: { size: number }) => {\n return (\n <AbstractTag\n color=\"orange\"\n style={null}\n tooltipTitle=\"The compressed file size that users actually download, as most web servers use gzip compression.\"\n >\n {`gzipped: ${formatSize(size)}`}\n </AbstractTag>\n );\n};\nconst TotalSourceSizeTag = ({ size }: { size: number }) => {\n return (\n <AbstractTag\n tooltipTitle=\"The total original size of all the files in this folder, before any transformations and minification.\"\n color=\"cyan\"\n >{`source size: ${formatSize(size)}`}</AbstractTag>\n );\n};\nconst SourceSizeTag = ({ size }: { size: number }) => {\n return (\n <AbstractTag\n color=\"cyan\"\n style={null}\n tooltipTitle=\"The original size of this file, before any transformations and minification.\"\n >\n {`source size: ${formatSize(size)}`}\n </AbstractTag>\n );\n};\n\nexport const AssetDetail: React.FC<{\n asset: SDK.AssetData;\n chunks: SDK.ChunkData[];\n modules: SDK.ModuleData[];\n moduleSizeLimit?: number;\n height?: number;\n root: string;\n}> = ({\n asset,\n chunks: includeChunks,\n modules: includeModules,\n moduleSizeLimit,\n height,\n root,\n}) => {\n const [moduleKeyword, setModuleKeyword] = useState('');\n const [defaultExpandAll, setDefaultExpandAll] = useState(false);\n const [moduleJumpList, setModuleJumpList] = useState([] as number[]);\n const [showModuleGraphViewer, setShowModuleGraphViewer] = useState(false);\n const filteredModules = useMemo(() => {\n let res = includeModules.slice();\n if (moduleKeyword) {\n const regexp = new RegExp(moduleKeyword, 'i');\n res = res.filter((e) => regexp.test(e.path));\n }\n\n if (moduleSizeLimit) {\n res = res.filter((e) => e.size.parsedSize >= moduleSizeLimit);\n }\n\n return res;\n }, [includeModules, moduleKeyword, moduleSizeLimit]);\n\n const onSearch = (value: string) => setModuleKeyword(value);\n const openModuleGraphViewer = useCallback((modId: number[]) => {\n setShowModuleGraphViewer(true);\n setModuleJumpList(modId);\n }, []);\n\n useEffect(() => {\n setModuleKeyword('');\n setDefaultExpandAll(false);\n }, [asset]);\n\n useEffect(() => {\n setDefaultExpandAll(false);\n }, [moduleKeyword]);\n\n return (\n <ModuleGraphListContext.Provider\n value={{ moduleJumpList, setModuleJumpList }}\n >\n <Card\n className={styles.bundle}\n title={`Modules of \"${asset.path}\"`}\n style={\n {\n '--body-min-height': height + 'px',\n } as React.CSSProperties\n }\n classNames={{\n body: styles.bundleBody,\n }}\n size=\"small\"\n >\n {includeModules.length ? (\n <>\n <div>\n <ModulesStatistics\n modules={includeModules}\n chunks={includeChunks}\n filteredModules={filteredModules}\n />\n </div>\n <div>\n <Space>\n <KeywordInput\n placeholder=\"search module by keyword\"\n onChange={onSearch}\n key={asset.path}\n />\n <Button\n onClick={() => setDefaultExpandAll(true)}\n size=\"small\"\n icon={<ColumnHeightOutlined />}\n />\n </Space>\n </div>\n <AssetDetailTree\n assetPath={asset.path}\n includeModules={includeModules}\n filteredModules={filteredModules}\n defaultExpandAll={defaultExpandAll}\n moduleKeyword={moduleKeyword}\n openModuleGraphViewer={openModuleGraphViewer}\n />\n </>\n ) : (\n <Empty\n description={\n <Typography.Text\n strong\n >{`\"${asset.path}\" doesn't have any modules`}</Typography.Text>\n }\n />\n )}\n <ModuleGraphViewer\n id={\n moduleJumpList?.length\n ? moduleJumpList[moduleJumpList.length - 1]\n : ''\n }\n show={showModuleGraphViewer}\n setShow={setShowModuleGraphViewer}\n cwd={root}\n />\n </Card>\n </ModuleGraphListContext.Provider>\n );\n};\n\nlet defaultExpandedModulesKeys: React.Key[] = [];\nconst AssetDetailTree = memo(\n ({\n filteredModules,\n includeModules,\n defaultExpandAll,\n moduleKeyword,\n openModuleGraphViewer,\n assetPath,\n }: {\n filteredModules: SDK.ModuleData[];\n includeModules: SDK.ModuleData[];\n defaultExpandAll: boolean;\n moduleKeyword: string;\n openModuleGraphViewer: (moduleId: number[]) => void;\n assetPath: string;\n }) => {\n const ITEM_HEIGHT = 30;\n const PERMANENT_PERF_MODE = false;\n const DISABLE_PERF_MODE_SCROLL_DELAY = 150;\n\n // disable all the tooltips and popovers inside the tree?\n const [performanceMode, setPerformanceMode] = useState(PERMANENT_PERF_MODE);\n const [\n bundleTreeRef,\n { height: bundleTreeHeight, width: bundleTreeWidth },\n ] = useElementSize();\n\n const onScroll = useMemo(() => {\n if (PERMANENT_PERF_MODE) return undefined;\n const disablePerformanceMode = debounce(() => {\n setPerformanceMode(false);\n }, DISABLE_PERF_MODE_SCROLL_DELAY);\n const onScroll = () => {\n setPerformanceMode(true);\n disablePerformanceMode();\n };\n return onScroll;\n }, []);\n\n const treeData = useMemo(() => {\n // Normalize paths for comparison - convert backslashes to forward slashes\n const normalizePath = (path: string) => path.replace(/\\\\/g, '/');\n\n const filteredModulesMap: Map<string, ModuleData> = new Map();\n const files: string[] = [];\n for (const mod of filteredModules) {\n if (mod.path) {\n filteredModulesMap.set(normalizePath(mod.path), mod);\n files.push(mod.path);\n }\n }\n const includeModulesMap: Map<string, ModuleData> = new Map();\n for (const mod of includeModules) {\n if (mod.path) {\n includeModulesMap.set(normalizePath(mod.path), mod);\n }\n }\n\n const onFileEntryClick = (modId: number) =>\n openModuleGraphViewer([modId]);\n\n const treeData = createFileStructures({\n files,\n inlinedResourcePathKey,\n fileTitle(file, basename) {\n const mod = filteredModulesMap.get(normalizePath(file));\n\n if (!mod) return basename;\n\n return (\n <AssetDetailTreeFileEntry\n mod={mod}\n basename={basename}\n includeModules={includeModules}\n onClick={onFileEntryClick}\n />\n );\n },\n dirTitle(dir, defaultTitle) {\n // all these calculations can be done directly in AssetDetailTreeDirEntry component\n // but in that case they'll run on every component render\n // and here it happens only once on dependencies change\n const paths = getChildrenModule(dir, []);\n\n if (!paths.length) return defaultTitle;\n\n const { parsedSize, sourceSize } = paths.reduce(\n (acc, path) => {\n const mod = includeModulesMap.get(normalizePath(path));\n if (mod) {\n acc.sourceSize += mod.size?.sourceSize || 0;\n acc.parsedSize += mod.size?.parsedSize || 0;\n }\n return acc;\n },\n { sourceSize: 0, parsedSize: 0 },\n );\n return (\n <AssetDetailTreeDirEntry\n title={defaultTitle}\n parsedSize={parsedSize}\n sourceSize={sourceSize}\n />\n );\n },\n page: 'bundle',\n });\n return treeData;\n }, [filteredModules, openModuleGraphViewer]);\n\n return (\n <PopupContext.Provider value={{ enabled: !performanceMode }}>\n <div\n className={styles.bundleTree}\n style={\n {\n marginTop: Size.BasePadding,\n '--item-height': ITEM_HEIGHT + 'px',\n } as React.CSSProperties\n }\n >\n <div className={styles.bundleTreeViewport}>\n <div className={styles.bundleTreeInnerViewport} ref={bundleTreeRef}>\n {bundleTreeHeight > 0 && (\n <>\n {filteredModules.length ? (\n <DirectoryTree\n onScroll={onScroll}\n key={`tree_${moduleKeyword}_${defaultExpandAll}_${assetPath}`}\n selectable={false}\n virtual\n itemHeight={ITEM_HEIGHT}\n height={bundleTreeHeight}\n style={\n bundleTreeWidth\n ? { width: bundleTreeWidth + 'px' }\n : undefined\n }\n defaultExpandAll={\n defaultExpandAll || filteredModules.length <= 20\n }\n onExpand={(expandedKeys) => {\n defaultExpandedModulesKeys = expandedKeys;\n }}\n defaultExpandParent\n // @ts-ignore\n defaultExpandedKeys={\n defaultExpandedModulesKeys?.length\n ? defaultExpandedModulesKeys\n : treeData.length === 1\n ? [treeData[0].key]\n : []\n }\n treeData={treeData as AntdDataNode[]}\n />\n ) : (\n <Empty\n description={\n <Typography.Text\n strong\n >{`\"${moduleKeyword}\" can't match any modules`}</Typography.Text>\n }\n />\n )}\n </>\n )}\n </div>\n </div>\n </div>\n </PopupContext.Provider>\n );\n },\n);\n\nconst AssetDetailTreeDirEntry = memo(\n ({\n title,\n parsedSize,\n sourceSize,\n }: {\n title: string;\n parsedSize: number;\n sourceSize: number;\n }) => {\n const render = () => {\n return (\n <div className={styles.bundleTreeEntryContent}>\n <Popover content={title}>\n <Typography.Text className={styles.bundleTreeEntryTitle}>\n {title}\n </Typography.Text>\n </Popover>\n <div className={styles.divider} />\n <Space>\n {parsedSize > 0 ? (\n <>\n <TotalBundledSizeTag size={parsedSize} />\n <TotalSourceSizeTag size={sourceSize} />\n </>\n ) : (\n <TotalSourceSizeTag size={sourceSize} />\n )}\n </Space>\n </div>\n );\n };\n const renderWithoutPopups = () => <DisablePopups>{render()}</DisablePopups>;\n return (\n <div className={styles.bundleTreeEntry}>\n <ErrorBoundary fallbackRender={renderWithoutPopups}>\n {render()}\n </ErrorBoundary>\n </div>\n );\n },\n);\n\nconst AssetDetailTreeFileEntry = memo(\n ({\n mod,\n basename,\n includeModules,\n onClick,\n }: {\n mod: SDK.ModuleData;\n basename: string;\n includeModules: SDK.ModuleData[];\n onClick: (modId: number) => void;\n }) => {\n const isConcatenation = mod.kind === SDK.ModuleKind.Concatenation;\n const { parsedSize = 0, sourceSize = 0, gzipSize = 0 } = mod.size;\n\n const renderSize = () => {\n if (parsedSize !== 0) {\n const sourceSizeTag = <SourceSizeTag size={sourceSize} />;\n const bundledSizeTag = <BundledSizeTag size={parsedSize} />;\n if (typeof gzipSize === 'number') {\n return (\n <Popover placement=\"bottom\" content={sourceSizeTag}>\n <Space direction=\"horizontal\">\n {bundledSizeTag}\n <GzippedSizeTag size={gzipSize} />\n </Space>\n </Popover>\n );\n } else {\n return (\n <Space direction=\"horizontal\">\n {bundledSizeTag}\n {sourceSizeTag}\n </Space>\n );\n }\n } else if (sourceSize !== 0) {\n // fallback to display tag for source size\n return <SourceSizeTag size={sourceSize} />;\n } else {\n return null;\n }\n };\n const renderContainedOtherModules = () => {\n const containedOtherModules =\n !isConcatenation &&\n parsedSize === 0 &&\n includeModules.filter(\n (e) => e !== mod && e.modules && e.modules.indexOf(mod.id) > -1,\n );\n if (containedOtherModules && containedOtherModules.length) {\n return (\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n This module is concatenated into another container module:\n </Typography.Text>\n {containedOtherModules.map(({ id, path }) => {\n if (isJsDataUrl(path)) {\n return (\n <Typography.Paragraph\n ellipsis={{ rows: 4 }}\n key={id}\n style={{ color: 'inherit', maxWidth: '100%' }}\n code\n >\n {path}\n </Typography.Paragraph>\n );\n }\n\n const p = relative(dirname(mod.path), path);\n if (p.startsWith('javascript;charset=utf-8;base64,')) {\n return (\n <Typography.Text\n key={id}\n style={{ color: 'inherit', maxWidth: '100%' }}\n code\n >\n {p[0] === '.' ? p : `./${p}`}\n </Typography.Text>\n );\n }\n\n return (\n <Typography.Text key={id} style={{ color: 'inherit' }} code>\n {p[0] === '.' ? p : `./${p}`}\n </Typography.Text>\n );\n })}\n </Space>\n }\n >\n <Tag color=\"green\">concatenated</Tag>\n </Tooltip>\n );\n } else {\n return null;\n }\n };\n const render = () => {\n return (\n <div className={styles.bundleTreeEntryContent}>\n <Popover\n content={`Open the ${basename}’s module reasons tree.`}\n placement=\"bottom\"\n >\n <div\n className={styles.bundleTreeEntryTitleWrap}\n onClick={() => onClick(mod.id)}\n >\n <Popover content={basename}>\n <Typography.Text className={styles.bundleTreeEntryTitle}>\n {basename}\n </Typography.Text>\n </Popover>\n <div className={styles.divider} />\n </div>\n </Popover>\n <Space>\n {renderSize()}\n {isConcatenation && (\n <ConcatenatedTag moduleCount={mod.modules?.length || 0} />\n )}\n {renderContainedOtherModules()}\n <ModuleCodeViewer data={mod} />\n </Space>\n </div>\n );\n };\n const renderWithoutPopups = () => <DisablePopups>{render()}</DisablePopups>;\n return (\n <div className={styles.bundleTreeEntry}>\n <ErrorBoundary fallbackRender={renderWithoutPopups}>\n {render()}\n </ErrorBoundary>\n </div>\n );\n },\n);\n"],"names":["DirectoryTree","Tree","TAB_MAP","POPUPS_ENABLED_BY_DEFAULT","PopupContext","createContext","DisablePopups","children","usePopupsEnabled","use","Tooltip","props","enabled","BaseTooltip","Popover","BasePopover","EmptyCodeItem","Empty","ModuleCodeViewer","data","tab","setTab","useState","t","useI18n","TAB_LAB_MAP","path","TextDrawer","CodepenCircleOutlined","ServerAPIProvider","SDK","source","Card","Object","omitBy","s","k","e","v","Typography","CodeViewer","ModuleGraphViewer","id","show","setShow","cwd","modules","ModuleAnalyzeComponent","inlinedResourcePathKey","getChildrenModule","node","mods","n","ModulesStatistics","memo","chunks","filteredModules","sourceSize","parsedSize","filteredParsedSize","filteredSourceSize","useMemo","sumBy","Space","InfoCircleOutlined","Divider","formatSize","Bdg","defaultTagStyle","AbstractTag","color","tooltipTitle","style","Tag","undefined","ConcatenatedTag","moduleCount","TotalBundledSizeTag","size","BundledSizeTag","GzippedSizeTag","TotalSourceSizeTag","SourceSizeTag","AssetDetail","asset","includeChunks","includeModules","moduleSizeLimit","height","root","moduleKeyword","setModuleKeyword","defaultExpandAll","setDefaultExpandAll","moduleJumpList","setModuleJumpList","showModuleGraphViewer","setShowModuleGraphViewer","res","regexp","RegExp","onSearch","value","openModuleGraphViewer","useCallback","modId","useEffect","ModuleGraphListContext","styles","KeywordInput","Button","ColumnHeightOutlined","AssetDetailTree","defaultExpandedModulesKeys","assetPath","ITEM_HEIGHT","PERMANENT_PERF_MODE","DISABLE_PERF_MODE_SCROLL_DELAY","performanceMode","setPerformanceMode","bundleTreeRef","bundleTreeHeight","bundleTreeWidth","useElementSize","onScroll","disablePerformanceMode","debounce","treeData","normalizePath","filteredModulesMap","Map","files","mod","includeModulesMap","onFileEntryClick","createFileStructures","file","basename","AssetDetailTreeFileEntry","dir","defaultTitle","paths","acc","AssetDetailTreeDirEntry","Size","expandedKeys","title","render","renderWithoutPopups","ErrorBoundary","onClick","isConcatenation","gzipSize","renderSize","sourceSizeTag","bundledSizeTag","renderContainedOtherModules","containedOtherModules","isJsDataUrl","p","relative","dirname"],"mappings":";;;;;;;;;;;;;;;;;;AAqDA,MAAM,EAAEA,eAAAA,aAAa,EAAE,GAAGC;AAE1B,MAAMC,UAAU;IACd,QAAQ;IACR,aAAa;IACb,cAAc;AAChB;AAMA,MAAMC,4BAA4B;AAClC,MAAMC,eAAe,WAAHA,GAAGC,cAAc;IAAE,SAASF;AAA0B;AACxE,MAAMG,gBAAgB,CAAC,EAAEC,QAAQ,EAAqB,iBACpD,IAACH,aAAa,QAAQ;QAAC,OAAO;YAAE,SAAS;QAAM;kBAC5CG;;AAGL,MAAMC,mBAAmB,IAAeC,IAAIL,eAAe,WAAW;AACtE,MAAMM,gBAAU,CAACC;IACf,MAAMC,UAAUJ;IAChB,IAAII,SAAS,OAAO,WAAP,GAAO,IAACC,SAAWA;QAAE,GAAGF,KAAK;;IACrC,OAAOA,MAAM,QAAQ,IAAI;AAChC;AACA,MAAMG,gBAAU,CAACH;IACf,MAAMC,UAAUJ;IAChB,IAAII,SAAS,OAAO,WAAP,GAAO,IAACG,SAAWA;QAAE,GAAGJ,KAAK;;IACrC,OAAOA,MAAM,QAAQ,IAAI;AAChC;AAEA,MAAMK,gBAAgB,kBACpB,IAACC,OAAKA;QACJ,aAAa,CAAC;;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5",
|
|
6
|
+
bundleTreeViewport: "bundleTreeViewport-JRXX4Y",
|
|
7
|
+
bundleTreeInnerViewport: "bundleTreeInnerViewport-GsHdIR",
|
|
8
|
+
bundleTreeEntry: "bundleTreeEntry-Cd5W_S",
|
|
9
|
+
bundleTreeEntryContent: "bundleTreeEntryContent-E8HDg1",
|
|
10
|
+
bundleTreeEntryTitle: "bundleTreeEntryTitle-XbeexU",
|
|
11
|
+
bundleTreeEntryTitleWrap: "bundleTreeEntryTitleWrap-pgKUih",
|
|
12
|
+
divider: "divider-Iq1wtJ"
|
|
13
|
+
};
|
|
14
|
+
export default asset_module;
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=asset.module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pages/BundleSize/components/asset.module.mjs","sources":["../../../../src/pages/BundleSize/components/asset.module.scss"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./asset_module.css\"\nexport default {\"bundle\":\"bundle-JPUVg_\",\"bundleBody\":\"bundleBody-vDRay7\",\"bundleTree\":\"bundleTree-ym_nR5\",\"bundleTreeViewport\":\"bundleTreeViewport-JRXX4Y\",\"bundleTreeInnerViewport\":\"bundleTreeInnerViewport-GsHdIR\",\"bundleTreeEntry\":\"bundleTreeEntry-Cd5W_S\",\"bundleTreeEntryContent\":\"bundleTreeEntryContent-E8HDg1\",\"bundleTreeEntryTitle\":\"bundleTreeEntryTitle-XbeexU\",\"bundleTreeEntryTitleWrap\":\"bundleTreeEntryTitleWrap-pgKUih\",\"divider\":\"divider-Iq1wtJ\"};"],"names":[],"mappings":";AAEA,qBAAe;IAAC,QAAS;IAAgB,YAAa;IAAoB,YAAa;IAAoB,oBAAqB;IAA4B,yBAA0B;IAAiC,iBAAkB;IAAyB,wBAAyB;IAAgC,sBAAuB;IAA8B,0BAA2B;IAAkC,SAAU;AAAgB"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.bundle-JPUVg_ {
|
|
2
|
+
flex-direction: column;
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.bundle-JPUVg_ .rc-tree-node-content-wrapper {
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.bundle-JPUVg_ .file-icon {
|
|
11
|
+
margin-left: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bundle-JPUVg_ .ant-tree-indent-unit {
|
|
15
|
+
width: 10px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bundle-JPUVg_ .ant-tree-iconEle {
|
|
19
|
+
margin-right: 2px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.bundle-JPUVg_ .ant-tree-node-content-wrapper {
|
|
23
|
+
display: flex;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.bundleBody-vDRay7 {
|
|
27
|
+
min-height: var(--body-min-height, 600px);
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.bundleTree-ym_nR5 {
|
|
34
|
+
--x-pad: 20px;
|
|
35
|
+
--y-pad: 14px;
|
|
36
|
+
--scrollbar-width: 10px;
|
|
37
|
+
--x-pad-minus-scrollbar: calc(var(--x-pad) - var(--scrollbar-width));
|
|
38
|
+
padding: var(--y-pad) var(--x-pad-minus-scrollbar) var(--y-pad) var(--x-pad);
|
|
39
|
+
border: 1px solid #ebedf1;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
flex: 1;
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bundleTreeViewport-JRXX4Y {
|
|
46
|
+
flex: 1;
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.bundleTreeInnerViewport-GsHdIR {
|
|
51
|
+
position: absolute;
|
|
52
|
+
inset: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bundleTreeEntry-Cd5W_S {
|
|
56
|
+
height: var(--item-height, 30px);
|
|
57
|
+
display: flex;
|
|
58
|
+
position: relative;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.bundleTreeEntry-Cd5W_S span.ant-tag {
|
|
62
|
+
margin: none;
|
|
63
|
+
margin-inline-end: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bundleTreeEntryContent-E8HDg1 {
|
|
67
|
+
width: 100%;
|
|
68
|
+
align-items: center;
|
|
69
|
+
padding-inline-end: var(--x-pad-minus-scrollbar, 0px);
|
|
70
|
+
display: flex;
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: 0;
|
|
73
|
+
left: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.bundleTreeEntryTitle-XbeexU {
|
|
77
|
+
text-overflow: ellipsis;
|
|
78
|
+
text-wrap: nowrap;
|
|
79
|
+
color: #000000d9;
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
font-weight: 400;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.bundleTreeEntryTitleWrap-pgKUih {
|
|
86
|
+
flex: 1;
|
|
87
|
+
align-items: center;
|
|
88
|
+
display: flex;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.divider-Iq1wtJ {
|
|
93
|
+
border-bottom: 1px dashed #0000001f;
|
|
94
|
+
flex-grow: 1;
|
|
95
|
+
min-width: 10px;
|
|
96
|
+
height: 1px;
|
|
97
|
+
margin: 0 10px;
|
|
98
|
+
position: relative;
|
|
99
|
+
top: 4px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/*# sourceMappingURL=asset_module.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./src/pages/BundleSize/components/asset.module.scss"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,aAAa;AACf;;AAH2C;EAMzC,eAAe;AACjB;;AAPwG;EAUtG,cAAc;AAChB;;AAXiJ;EAc/I,WAAW;AACb;;AAfkM;EAkBhM,iBAAiB;AACnB;;AAnBqP;EAsBnP,aAAa;AACf;;AAvBiT;EA0B/S,yCAAyC;EACzC,sBAAsB;EACtB,2BAA2B;EAC3B,aAAa;AACf;;AA9Boa;EAiCla,aAAa;EACb,aAAa;EACb,uBAAuB;EACvB,oEAAoE;EACpE,4EAA4E;EAC5E,yBAAyB;EACzB,kBAAkB;EAClB,OAAO;EACP,aAAa;AACf;;AA1CorB;EA6ClrB,OAAO;EACP,kBAAkB;AACpB;;AA/CiuB;EAkD/tB,kBAAkB;EAClB,QAAQ;AACV;;AApDoxB;EAuDlxB,gCAAgC;EAChC,aAAa;EACb,kBAAkB;AACpB;;AA1Do2B;EA6Dl2B,YAAY;EACZ,oBAAoB;AACtB;;AA/D46B;EAkE16B,WAAW;EACX,mBAAmB;EACnB,qDAAqD;EACrD,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,OAAO;AACT;;AAzEmkC;EA4EjkC,uBAAuB;EACvB,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,gBAAgB;AAClB;;AAlFssC;EAqFpsC,OAAO;EACP,mBAAmB;EACnB,aAAa;EACb,gBAAgB;AAClB;;AAzFuxC;EA4FrxC,mCAAmC;EACnC,YAAY;EACZ,eAAe;EACf,WAAW;EACX,cAAc;EACd,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".bundle{display:flex;flex-direction:column}.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{display:flex}.bundleBody{display:flex;flex-direction:column;justify-content:flex-start;min-height:var(--body-min-height, 600px)}.bundleTree{--x-pad: 20px;--y-pad: 14px;--scrollbar-width: 10px;--x-pad-minus-scrollbar: calc(var(--x-pad) - var(--scrollbar-width));display:flex;flex:1;padding:var(--y-pad) var(--x-pad-minus-scrollbar) var(--y-pad) var(--x-pad);border:1px solid #ebedf1;border-radius:8px}.bundleTreeViewport{flex:1;position:relative}.bundleTreeInnerViewport{position:absolute;inset:0}.bundleTreeEntry{display:flex;position:relative;height:var(--item-height, 30px)}.bundleTreeEntry :global span.ant-tag{margin:none;margin-inline-end:0px}.bundleTreeEntryContent{position:absolute;left:0;top:0;width:100%;display:flex;align-items:center;padding-inline-end:var(--x-pad-minus-scrollbar, 0px)}.bundleTreeEntryTitle{text-overflow:ellipsis;overflow:hidden;text-wrap:nowrap;font-size:14px;font-weight:400;color:rgba(0,0,0,.85)}.bundleTreeEntryTitleWrap{display:flex;flex:1;align-items:center;overflow:hidden}.divider{position:relative;top:4px;height:1px;min-width:10px;flex-grow:1;margin:0 10px;border-bottom:1px dashed rgba(0,0,0,.12)}"],"sourceRoot":""}
|
|
@@ -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 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,QAAAA,MAAM,EAAE,GAAGC;AAEnB,MAAMC,iBAAiB;AAShB,MAAMC,4BAET,CAAC,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,WAAW,EAAE;IACxC,MAAM,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QAAK;kBAE7B,CAACzF,UACO,WAAP,GACE,IAACwF,mBAAiBA;gBAAC,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;0BACrD,CAACxF,cAAAA,WAAAA,GACA,IAACJ,2BAAyBA;wBACxB,KAAK4G;wBACL,QAAQ3G;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 style={{ display: 'flex' }} 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,QAAAA,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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
|
|
6
|
-
"bundle-tree": "bundle-tree-IbtEQg",
|
|
7
|
-
bundleTree: "bundle-tree-IbtEQg",
|
|
8
|
-
box: "box-On1BLb",
|
|
9
|
-
keyword: "keyword-PqQzB1",
|
|
10
|
-
divider: "divider-asnppW",
|
|
11
|
-
dividerDiv: "dividerDiv-s50mAr",
|
|
12
6
|
assetsTag: "assetsTag-eAVvyj",
|
|
13
|
-
bundle: "bundle-cPw2Kc",
|
|
14
7
|
modal: "modal-afyzYa",
|
|
15
8
|
"search-btn": "search-btn-To902q",
|
|
16
9
|
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\",\"
|
|
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\",\"assetsTag\":\"assetsTag-eAVvyj\",\"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,WAAY;IAAmB,OAAQ;IAAe,cAAa;IAAoB,WAAY;IAAoB,qBAAoB;IAA2B,iBAAkB;AAA0B"}
|