@rsdoctor/components 1.5.12 → 1.5.14-beta.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.
Files changed (58) hide show
  1. package/dist/components/Alerts/collapse-cjs-require.d.ts +1 -1
  2. package/dist/components/Alerts/collapse-cross-chunks.d.ts +1 -1
  3. package/dist/components/Alerts/collapse-esm-cjs.d.ts +1 -1
  4. package/dist/components/Alerts/collapse-module-mixed-chunks.d.ts +1 -1
  5. package/dist/components/Alerts/collapse-shared.d.ts +2 -2
  6. package/dist/components/Alerts/collapse-side-effects-only-imports.d.ts +1 -1
  7. package/dist/components/Alerts/collapse.d.ts +1 -1
  8. package/dist/components/Alerts/list.d.ts +1 -1
  9. package/dist/components/FileTree/index.d.ts +1 -1
  10. package/dist/components/Layout/header.d.ts +0 -1
  11. package/dist/components/Layout/header.mjs +14 -53
  12. package/dist/components/Layout/header.mjs.map +1 -1
  13. package/dist/components/Layout/header.module.mjs +15 -0
  14. package/dist/components/Layout/header.module.mjs.map +1 -0
  15. package/dist/components/Layout/header_module.css +88 -0
  16. package/dist/components/Layout/header_module.css.map +1 -0
  17. package/dist/components/Layout/index.mjs +10 -8
  18. package/dist/components/Layout/index.mjs.map +1 -1
  19. package/dist/components/Layout/index.module.mjs +7 -0
  20. package/dist/components/Layout/index.module.mjs.map +1 -0
  21. package/dist/components/Layout/index_module.css +11 -0
  22. package/dist/components/Layout/index_module.css.map +1 -0
  23. package/dist/components/Overall/DataSummary.d.ts +1 -1
  24. package/dist/components/Overall/help-center.d.ts +1 -1
  25. package/dist/components/Overall/overview.d.ts +1 -1
  26. package/dist/components/base/CodeViewer/index.d.ts +1 -1
  27. package/dist/components/base/CodeViewer/useCodeDrawer.d.ts +1 -1
  28. package/dist/components/base/DiffViewer/index.d.ts +1 -1
  29. package/dist/components/base/DiffViewer/useDiffDrawer.d.ts +1 -1
  30. package/dist/pages/BundleSize/components/asset.mjs +392 -323
  31. package/dist/pages/BundleSize/components/asset.mjs.map +1 -1
  32. package/dist/pages/BundleSize/components/asset.module.mjs +16 -0
  33. package/dist/pages/BundleSize/components/asset.module.mjs.map +1 -0
  34. package/dist/pages/BundleSize/components/asset_module.css +111 -0
  35. package/dist/pages/BundleSize/components/asset_module.css.map +1 -0
  36. package/dist/pages/BundleSize/components/index.d.ts +1 -1
  37. package/dist/pages/BundleSize/components/index.mjs +217 -553
  38. package/dist/pages/BundleSize/components/index.mjs.map +1 -1
  39. package/dist/pages/BundleSize/components/index.module.mjs +10 -7
  40. package/dist/pages/BundleSize/components/index.module.mjs.map +1 -1
  41. package/dist/pages/BundleSize/components/index_module.css +47 -59
  42. package/dist/pages/BundleSize/components/index_module.css.map +1 -1
  43. package/dist/pages/BundleSize/components/tree-graph.d.ts +7 -0
  44. package/dist/pages/BundleSize/components/tree-graph.mjs +366 -0
  45. package/dist/pages/BundleSize/components/tree-graph.mjs.map +1 -0
  46. package/dist/pages/BundleSize/index.mjs +1 -11
  47. package/dist/pages/BundleSize/index.mjs.map +1 -1
  48. package/dist/pages/Overall/responsiveLayout.d.ts +1 -1
  49. package/dist/pages/Resources/BundleDiff/DiffContainer/utils.d.ts +1 -1
  50. package/dist/pages/TreeShaking/editor.d.ts +1 -1
  51. package/dist/pages/TreeShaking/space.d.ts +1 -1
  52. package/dist/utils/file.d.ts +1 -1
  53. package/dist/utils/hooks.d.ts +7 -1
  54. package/dist/utils/hooks.mjs +73 -3
  55. package/dist/utils/hooks.mjs.map +1 -1
  56. package/package.json +13 -12
  57. package/dist/components/Layout/header.css +0 -28
  58. package/dist/components/Layout/header.css.map +0 -1
@@ -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,CA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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 height\n ? ({\n '--body-min-height': height + 'px',\n } as React.CSSProperties)\n : undefined\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 const ENABLE_ANIMATIONS = false;\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 motion={ENABLE_ANIMATIONS ? undefined : false}\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","ENABLE_ANIMATIONS","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;;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,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BAAC+B,KAAGA;gBAAC,OAAM;0BAAQ;;;QAIvB,OAAO;IAEX;IACA,MAAM2E,SAAS,IACN,WAAP,GACE,KAAC;YAAI,WAAWxC,aAAAA,sBAA6B;;8BAC3C,IAAC9F,eAAOA;oBACN,SAAS,CAAC,SAAS,EAAE4H,SAAS,uBAAuB,CAAC;oBACtD,WAAU;8BAEV,mBAAC;wBACC,WAAW9B,aAAAA,wBAA+B;wBAC1C,SAAS,IAAM2C,QAAQlB,IAAI,EAAE;;0CAE7B,IAACvH,eAAOA;gCAAC,SAAS4H;0CAChB,kBAACnG,WAAW,IAAI;oCAAC,WAAWqE,aAAAA,oBAA2B;8CACpD8B;;;0CAGL,IAAC;gCAAI,WAAW9B,aAAAA,OAAc;;;;;8BAGlC,KAAC7C,OAAKA;;wBACH2F;wBACAF,mBAAmB,WAAnBA,GACC,IAAC7E,iBAAeA;4BAAC,aAAa0D,IAAI,OAAO,EAAE,UAAU;;wBAEtDwB;sCACD,IAAC3I,kBAAgBA;4BAAC,MAAMmH;;;;;;IAKhC,MAAMgB,sBAAsB,kBAAM,IAAC/I,eAAaA;sBAAE8I;;IAClD,OAAO,WAAP,GACE,IAAC;QAAI,WAAWxC,aAAAA,eAAsB;kBACpC,kBAAC0C,eAAaA;YAAC,gBAAgBD;sBAC5BD;;;AAIT"}
@@ -0,0 +1,16 @@
1
+ import "./asset_module.css";
2
+ const asset_module = {
3
+ bundle: "bundle-JPUVg_",
4
+ bundleBody: "bundleBody-vDRay7",
5
+ bundleTree: "bundleTree-ym_nR5",
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,111 @@
1
+ .bundle-JPUVg_ .rc-tree-node-content-wrapper {
2
+ font-size: 14px;
3
+ }
4
+
5
+ .bundle-JPUVg_ .file-icon {
6
+ margin-left: 0;
7
+ }
8
+
9
+ .bundle-JPUVg_ .ant-tree-indent-unit {
10
+ width: 10px;
11
+ }
12
+
13
+ .bundle-JPUVg_ .ant-tree-iconEle {
14
+ margin-right: 2px;
15
+ }
16
+
17
+ .bundle-JPUVg_ .ant-tree-node-content-wrapper {
18
+ display: flex;
19
+ }
20
+
21
+ .bundleBody-vDRay7 {
22
+ min-height: var(--body-min-height, initial);
23
+ justify-content: flex-start;
24
+ }
25
+
26
+ .bundle-JPUVg_, .bundleBody-vDRay7 {
27
+ flex-direction: column;
28
+ flex: 1;
29
+ display: flex;
30
+ }
31
+
32
+ .bundleTree-ym_nR5 {
33
+ --tree-min-height: 300px;
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
+ min-height: var(--tree-min-height);
39
+ padding: var(--y-pad) var(--x-pad-minus-scrollbar) var(--y-pad) var(--x-pad);
40
+ resize: vertical;
41
+ border: 1px solid #ebedf1;
42
+ border-radius: 8px;
43
+ flex: 1;
44
+ display: flex;
45
+ }
46
+
47
+ @media (max-height: 900px) {
48
+ .bundleTree-ym_nR5 {
49
+ --tree-min-height: 450px;
50
+ }
51
+ }
52
+
53
+ .bundleTreeViewport-JRXX4Y {
54
+ flex: 1;
55
+ position: relative;
56
+ }
57
+
58
+ .bundleTreeInnerViewport-GsHdIR {
59
+ position: absolute;
60
+ inset: 0;
61
+ }
62
+
63
+ .bundleTreeEntry-Cd5W_S {
64
+ height: var(--item-height, 30px);
65
+ display: flex;
66
+ position: relative;
67
+ }
68
+
69
+ .bundleTreeEntry-Cd5W_S span.ant-tag {
70
+ margin: none;
71
+ margin-inline-end: 0;
72
+ }
73
+
74
+ .bundleTreeEntryContent-E8HDg1 {
75
+ width: 100%;
76
+ align-items: center;
77
+ padding-inline-end: var(--x-pad-minus-scrollbar, 0px);
78
+ display: flex;
79
+ position: absolute;
80
+ top: 0;
81
+ left: 0;
82
+ }
83
+
84
+ .bundleTreeEntryTitle-XbeexU {
85
+ text-overflow: ellipsis;
86
+ text-wrap: nowrap;
87
+ color: #000000d9;
88
+ font-size: 14px;
89
+ font-weight: 400;
90
+ overflow: hidden;
91
+ }
92
+
93
+ .bundleTreeEntryTitleWrap-pgKUih {
94
+ flex: 1;
95
+ align-items: center;
96
+ display: flex;
97
+ overflow: hidden;
98
+ }
99
+
100
+ .divider-Iq1wtJ {
101
+ border-bottom: 1px dashed #0000001f;
102
+ flex-grow: 1;
103
+ min-width: 10px;
104
+ height: 1px;
105
+ margin: 0 10px;
106
+ position: relative;
107
+ top: 4px;
108
+ }
109
+
110
+
111
+ /*# sourceMappingURL=asset_module.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://./src/pages/BundleSize/components/asset.module.scss"],"names":[],"mappings":"AAAA;EACE,eAAe;AACjB;;AAF6D;EAK3D,cAAc;AAChB;;AANsG;EASpG,WAAW;AACb;;AAVuJ;EAarJ,iBAAiB;AACnB;;AAd0M;EAiBxM,aAAa;AACf;;AAlBsQ;EAqBpQ,2CAA2C;EAC3C,2BAA2B;AAC7B;;AAvBwV;EA0BtV,sBAAsB;EACtB,OAAO;EACP,aAAa;AACf;;AA7BsZ;EAgCpZ,wBAAwB;EACxB,aAAa;EACb,aAAa;EACb,uBAAuB;EACvB,oEAAoE;EACpE,kCAAkC;EAClC,4EAA4E;EAC5E,gBAAgB;EAChB,yBAAyB;EACzB,kBAAkB;EAClB,OAAO;EACP,aAAa;AACf;;AA5CivB;EAA0B;IAgDvwB,wBAAwB;EAC1B;AACF;;AAlDizB;EAqD/yB,OAAO;EACP,kBAAkB;AACpB;;AAvD81B;EA0D51B,kBAAkB;EAClB,QAAQ;AACV;;AA5Di5B;EA+D/4B,gCAAgC;EAChC,aAAa;EACb,kBAAkB;AACpB;;AAlEi+B;EAqE/9B,YAAY;EACZ,oBAAoB;AACtB;;AAvEyiC;EA0EviC,WAAW;EACX,mBAAmB;EACnB,qDAAqD;EACrD,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,OAAO;AACT;;AAjFgsC;EAoF9rC,uBAAuB;EACvB,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,gBAAgB;AAClB;;AA1Fm0C;EA6Fj0C,OAAO;EACP,mBAAmB;EACnB,aAAa;EACb,gBAAgB;AAClB;;AAjGo5C;EAoGl5C,mCAAmC;EACnC,YAAY;EACZ,eAAe;EACf,WAAW;EACX,cAAc;EACd,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".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{justify-content:flex-start;min-height:var(--body-min-height, initial)}.bundle,.bundleBody{display:flex;flex-direction:column;flex:1}.bundleTree{--tree-min-height: 300px;--x-pad: 20px;--y-pad: 14px;--scrollbar-width: 10px;--x-pad-minus-scrollbar: calc(var(--x-pad) - var(--scrollbar-width));display:flex;flex:1;min-height:var(--tree-min-height);padding:var(--y-pad) var(--x-pad-minus-scrollbar) var(--y-pad) var(--x-pad);border:1px solid #ebedf1;border-radius:8px;resize:vertical}@media(max-height: 900px){.bundleTree{--tree-min-height: 450px}}.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,4 +1,4 @@
1
- import { Client, SDK } from '@rsdoctor/types';
1
+ import { type Client, SDK } from '@rsdoctor/types';
2
2
  import React from 'react';
3
3
  import './index.sass';
4
4
  interface WebpackModulesOverallProps {