@rsdoctor/components 1.5.8 → 1.5.10

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 (62) hide show
  1. package/dist/components/Alert/ecma-version-check_module.css.map +1 -1
  2. package/dist/components/Alert/index.css.map +1 -1
  3. package/dist/components/Alert/package-relation.mjs.map +1 -1
  4. package/dist/components/Alert/package-relation_module.css.map +1 -1
  5. package/dist/components/Alerts/bundle-alert_module.css.map +1 -1
  6. package/dist/components/Alerts/collapse_module.css.map +1 -1
  7. package/dist/components/Alerts/list_module.css.map +1 -1
  8. package/dist/components/Alerts/overlay_module.css.map +1 -1
  9. package/dist/components/Card/index.mjs.map +1 -1
  10. package/dist/components/Card/size_module.css.map +1 -1
  11. package/dist/components/Charts/index.mjs +1 -1
  12. package/dist/components/Charts/index.mjs.map +1 -1
  13. package/dist/components/Charts/loader.css.map +1 -1
  14. package/dist/components/Charts/tooltips.css.map +1 -1
  15. package/dist/components/Charts/treemap_module.css.map +1 -1
  16. package/dist/components/Charts/utils.mjs +1 -1
  17. package/dist/components/Charts/utils.mjs.map +1 -1
  18. package/dist/components/Configuration/builder_module.css.map +1 -1
  19. package/dist/components/FileTree/index.css.map +1 -1
  20. package/dist/components/Keyword/style_module.css.map +1 -1
  21. package/dist/components/Layout/header.css.map +1 -1
  22. package/dist/components/Layout/header.mjs +2 -1
  23. package/dist/components/Layout/header.mjs.map +1 -1
  24. package/dist/components/Loader/Analysis/style_module.css.map +1 -1
  25. package/dist/components/Overall/DataSummary_module.css.map +1 -1
  26. package/dist/components/Overall/bundle_module.css.map +1 -1
  27. package/dist/components/Overall/card_module.css.map +1 -1
  28. package/dist/components/Overall/compile_module.css.map +1 -1
  29. package/dist/components/Overall/help-center_module.css.map +1 -1
  30. package/dist/components/Overall/list_module.css.map +1 -1
  31. package/dist/components/Overall/overview_module.css.map +1 -1
  32. package/dist/components/Overall/project_module.css.map +1 -1
  33. package/dist/components/Resolver/analysis.mjs.map +1 -1
  34. package/dist/components/Select/index.css.map +1 -1
  35. package/dist/components/base/CodeViewer/index_module.css.map +1 -1
  36. package/dist/components/base/CodeViewer/utils.mjs +1 -1
  37. package/dist/components/base/CodeViewer/utils.mjs.map +1 -1
  38. package/dist/components/base/DiffViewer/index_module.css.map +1 -1
  39. package/dist/constants.mjs.map +1 -1
  40. package/dist/pages/BundleSize/components/asset.mjs +1 -1
  41. package/dist/pages/BundleSize/components/asset.mjs.map +1 -1
  42. package/dist/pages/BundleSize/components/card_module.css.map +1 -1
  43. package/dist/pages/BundleSize/components/cards.mjs.map +1 -1
  44. package/dist/pages/BundleSize/components/index.css.map +1 -1
  45. package/dist/pages/BundleSize/components/index_module.css.map +1 -1
  46. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css.map +1 -1
  47. package/dist/pages/ModuleAnalyze/index.css.map +1 -1
  48. package/dist/pages/Overall/index_module.css.map +1 -1
  49. package/dist/pages/Resources/BundleDiff/DiffContainer/row.mjs +1 -1
  50. package/dist/pages/Resources/BundleDiff/DiffContainer/row.mjs.map +1 -1
  51. package/dist/pages/TreeShaking/index.css.map +1 -1
  52. package/dist/pages/WebpackPlugins/index.css.map +1 -1
  53. package/dist/utils/data/index.mjs +1 -1
  54. package/dist/utils/data/index.mjs.map +1 -1
  55. package/dist/utils/file.mjs +3 -3
  56. package/dist/utils/file.mjs.map +1 -1
  57. package/dist/utils/hooks.mjs +1 -1
  58. package/dist/utils/hooks.mjs.map +1 -1
  59. package/dist/utils/socket.mjs.map +1 -1
  60. package/dist/utils/storage.mjs +1 -1
  61. package/dist/utils/storage.mjs.map +1 -1
  62. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"pages/BundleSize/components/cards.mjs","sources":["../../../../src/pages/BundleSize/components/cards.tsx"],"sourcesContent":["/* eslint-disable react/jsx-key */\nimport React, { useState, useMemo } from 'react';\nimport { Divider, Segmented, theme, Avatar, Tree } from 'antd';\nimport { Client, SDK } from '@rsdoctor/types';\nimport { RightOutlined, FileFilled, GoldenFilled } from '@ant-design/icons';\n\nimport { formatSize, useDuplicatePackagesByErrors } from '../../../utils';\nimport { StatisticCard } from '../../../components/Card/statistic';\nimport { SizeCard, bgColorType } from '../../../components/Card/size';\nimport Overview from '../../../components/Overall/overview';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { getFiles } from '../../..//components/Overall';\nimport { TextDrawer } from '../../..//components/TextDrawer';\n\nimport styles from './card.module.scss';\n\nconst { DirectoryTree } = Tree;\nconst { useToken } = theme;\nconst { innerWidth } = window;\n\ninterface CardProps {\n showProgress?: boolean;\n data: Client.RsdoctorClientAssetsSummary['all']['total'];\n total: number;\n tagBgColor?: string;\n type?: string;\n}\n\nconst AssetCard: React.FC<CardProps> = ({\n showProgress = false,\n data,\n total,\n tagBgColor,\n type,\n}) => {\n const { token } = useToken();\n const _tagBgColor = tagBgColor || token.colorPrimaryBorderHover;\n return (\n <SizeCard\n type={type!}\n files={data.files}\n total={total}\n showProgress={showProgress}\n tagBgColor={_tagBgColor}\n />\n );\n};\n\nconst AssetCardContainer: React.FC<{\n type?: string;\n titles: string[];\n datas: CardProps[];\n bgColor?: bgColorType;\n}> = ({ titles, datas, bgColor, type }) => {\n const [selectedTitle, setSelectedTitle] = useState(titles[0]);\n const idx = useMemo(\n () => titles.indexOf(selectedTitle),\n [titles, selectedTitle],\n );\n const currentIdx = idx >= 0 ? idx : 0;\n const fileType = type || selectedTitle || titles[0];\n\n // Add bounds checking to prevent accessing undefined data\n const currentData =\n currentIdx >= 0 && currentIdx < datas.length\n ? datas[currentIdx]\n : datas[0] || {};\n\n return (\n <StatisticCard\n title={\n <div className={styles.cardTitle}>\n <div className={styles.title}>{fileType}</div>\n {titles.length > 1 ? (\n <Segmented\n defaultValue={titles[0]}\n options={titles}\n onChange={(value) => {\n setSelectedTitle(value as string);\n }}\n size=\"small\"\n style={{ transition: 'transform 0.3s ease' }}\n value={selectedTitle}\n />\n ) : null}\n </div>\n }\n value={\n <AssetCard\n type={fileType}\n {...currentData}\n tagBgColor={bgColor?.tagBgColor}\n />\n }\n boxProps={{\n style: {\n background: bgColor?.bgColor,\n width: innerWidth > 1300 ? '80%' : '95%',\n },\n }}\n />\n );\n};\n\nexport const BundleCards: React.FC<{\n cwd: string;\n errors: SDK.ErrorsData;\n summary: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetAssetsSummary>;\n}> = ({ errors, summary }) => {\n const duplicatePackages = useDuplicatePackagesByErrors(errors);\n const [totalSize, totalSizeUnit] = formatSize(summary.all.total.size).split(\n ' ',\n );\n\n const arr = [\n <AssetCardContainer\n type={'JS'}\n titles={['Total', 'Initial']}\n datas={[\n {\n data: summary.js.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.js.initial,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n <AssetCardContainer\n type={'CSS'}\n titles={['Total', 'Initial']}\n datas={[\n {\n data: summary.css.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.css.initial,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n <AssetCardContainer\n titles={['Images', 'Fonts', 'Media']}\n datas={[\n {\n data: summary.imgs.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.fonts.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.media.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n <AssetCardContainer\n type={'HTML'}\n titles={['HTML Files']}\n datas={[\n {\n data: summary.html.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n ];\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: false }}\n >\n {(res) => {\n const { treeData } = getFiles(res['all'].total);\n return (\n <div className={styles.container}>\n <div className={styles.summary}>\n <Overview\n title={\n <TextDrawer\n buttonProps={{\n size: 'small',\n }}\n buttonStyle={{\n fontSize: 'inherit',\n }}\n drawerProps={{\n title: 'Files',\n }}\n text={\n <div style={{ color: '#000000a6' }}>\n <span style={{ marginRight: '5px' }}>Total Files</span>\n <RightOutlined />\n </div>\n }\n >\n <DirectoryTree\n defaultExpandAll\n selectable={false}\n treeData={treeData}\n rootStyle={{\n minHeight: '800px',\n border: '1px solid rgba(235, 237, 241)',\n }}\n />\n </TextDrawer>\n }\n description={\n <>\n <span className={styles.description}>{totalSize}</span>\n <span className={styles.unit}>{totalSizeUnit}</span>\n <div className={styles.totalNumber}>\n <span style={{ marginRight: '7px' }}>\n Number of files\n </span>\n <span style={{ fontWeight: 500 }}>\n {summary.all.total.count}\n </span>\n </div>\n </>\n }\n icon={\n <Avatar\n style={{ background: '#3874F6' }}\n shape=\"circle\"\n icon={<FileFilled style={{ fontSize: '18px' }} />}\n />\n }\n style={{\n marginBottom: '12px',\n minWidth: '210px',\n }}\n />\n <Overview\n style={{ minWidth: '210px' }}\n title={\n <div style={{ margin: '4px 0' }}>\n <span style={{ marginRight: '5px' }}>\n Duplicate Packages\n </span>\n </div>\n }\n description={duplicatePackages.length}\n icon={\n <Avatar\n style={{ background: '#13C2C2' }}\n shape=\"circle\"\n icon={<GoldenFilled style={{ fontSize: '18px' }} />}\n />\n }\n />\n </div>\n <Divider style={{ height: '200px' }} type=\"vertical\" />\n <div className={styles.chartsContainer}>\n {arr.map((e, idx) => (\n <>\n <div key={idx} className={styles.chart}>\n {e}\n </div>\n {idx !== arr.length - 1 ? (\n <Divider\n key={`${idx}-divider`}\n style={{ height: '200px' }}\n type=\"vertical\"\n />\n ) : null}\n </>\n ))}\n </div>\n </div>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["DirectoryTree","Tree","useToken","theme","innerWidth","window","AssetCard","showProgress","data","total","tagBgColor","type","token","_tagBgColor","SizeCard","AssetCardContainer","titles","datas","bgColor","selectedTitle","setSelectedTitle","useState","idx","useMemo","currentIdx","fileType","currentData","StatisticCard","styles","Segmented","value","BundleCards","errors","summary","duplicatePackages","useDuplicatePackagesByErrors","totalSize","totalSizeUnit","formatSize","arr","ServerAPIProvider","SDK","res","treeData","getFiles","Overview","TextDrawer","RightOutlined","Avatar","FileFilled","GoldenFilled","Divider","e"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,EAAEA,eAAAA,aAAa,EAAE,GAAGC;AAC1B,MAAM,EAAEC,UAAAA,QAAQ,EAAE,GAAGC;AACrB,MAAM,EAAEC,YAAAA,gBAAU,EAAE,GAAGC;AAUvB,MAAMC,YAAiC,CAAC,EACtCC,eAAe,KAAK,EACpBC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,IAAI,EACL;IACC,MAAM,EAAEC,KAAK,EAAE,GAAGV;IAClB,MAAMW,cAAcH,cAAcE,MAAM,uBAAuB;IAC/D,OAAO,WAAP,GACE,IAACE,UAAQA;QACP,MAAMH;QACN,OAAOH,KAAK,KAAK;QACjB,OAAOC;QACP,cAAcF;QACd,YAAYM;;AAGlB;AAEA,MAAME,qBAKD,CAAC,EAAEC,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEP,IAAI,EAAE;IACpC,MAAM,CAACQ,eAAeC,iBAAiB,GAAGC,SAASL,MAAM,CAAC,EAAE;IAC5D,MAAMM,MAAMC,QACV,IAAMP,OAAO,OAAO,CAACG,gBACrB;QAACH;QAAQG;KAAc;IAEzB,MAAMK,aAAaF,OAAO,IAAIA,MAAM;IACpC,MAAMG,WAAWd,QAAQQ,iBAAiBH,MAAM,CAAC,EAAE;IAGnD,MAAMU,cACJF,cAAc,KAAKA,aAAaP,MAAM,MAAM,GACxCA,KAAK,CAACO,WAAW,GACjBP,KAAK,CAAC,EAAE,IAAI,CAAC;IAEnB,OAAO,WAAP,GACE,IAACU,eAAaA;QACZ,qBACE,KAAC;YAAI,WAAWC,YAAAA,SAAgB;;8BAC9B,IAAC;oBAAI,WAAWA,YAAAA,KAAY;8BAAGH;;gBAC9BT,OAAO,MAAM,GAAG,IAAI,WAAJ,GACf,IAACa,WAASA;oBACR,cAAcb,MAA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;wCAAQ;wCACzB,MAAK;uCAFA,GAAG7B,IAAI,QAAQ,CAAC,IAIrB;;;;;;QAMhB;;AAGN"}
1
+ {"version":3,"file":"pages/BundleSize/components/cards.mjs","sources":["../../../../src/pages/BundleSize/components/cards.tsx"],"sourcesContent":["/* rslint-disable react/jsx-key */\nimport React, { useState, useMemo } from 'react';\nimport { Divider, Segmented, theme, Avatar, Tree } from 'antd';\nimport { Client, SDK } from '@rsdoctor/types';\nimport { RightOutlined, FileFilled, GoldenFilled } from '@ant-design/icons';\n\nimport { formatSize, useDuplicatePackagesByErrors } from '../../../utils';\nimport { StatisticCard } from '../../../components/Card/statistic';\nimport { SizeCard, bgColorType } from '../../../components/Card/size';\nimport Overview from '../../../components/Overall/overview';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { getFiles } from '../../..//components/Overall';\nimport { TextDrawer } from '../../..//components/TextDrawer';\n\nimport styles from './card.module.scss';\n\nconst { DirectoryTree } = Tree;\nconst { useToken } = theme;\nconst { innerWidth } = window;\n\ninterface CardProps {\n showProgress?: boolean;\n data: Client.RsdoctorClientAssetsSummary['all']['total'];\n total: number;\n tagBgColor?: string;\n type?: string;\n}\n\nconst AssetCard: React.FC<CardProps> = ({\n showProgress = false,\n data,\n total,\n tagBgColor,\n type,\n}) => {\n const { token } = useToken();\n const _tagBgColor = tagBgColor || token.colorPrimaryBorderHover;\n return (\n <SizeCard\n type={type!}\n files={data.files}\n total={total}\n showProgress={showProgress}\n tagBgColor={_tagBgColor}\n />\n );\n};\n\nconst AssetCardContainer: React.FC<{\n type?: string;\n titles: string[];\n datas: CardProps[];\n bgColor?: bgColorType;\n}> = ({ titles, datas, bgColor, type }) => {\n const [selectedTitle, setSelectedTitle] = useState(titles[0]);\n const idx = useMemo(\n () => titles.indexOf(selectedTitle),\n [titles, selectedTitle],\n );\n const currentIdx = idx >= 0 ? idx : 0;\n const fileType = type || selectedTitle || titles[0];\n\n // Add bounds checking to prevent accessing undefined data\n const currentData =\n currentIdx >= 0 && currentIdx < datas.length\n ? datas[currentIdx]\n : datas[0] || {};\n\n return (\n <StatisticCard\n title={\n <div className={styles.cardTitle}>\n <div className={styles.title}>{fileType}</div>\n {titles.length > 1 ? (\n <Segmented\n defaultValue={titles[0]}\n options={titles}\n onChange={(value) => {\n setSelectedTitle(value as string);\n }}\n size=\"small\"\n style={{ transition: 'transform 0.3s ease' }}\n value={selectedTitle}\n />\n ) : null}\n </div>\n }\n value={\n <AssetCard\n type={fileType}\n {...currentData}\n tagBgColor={bgColor?.tagBgColor}\n />\n }\n boxProps={{\n style: {\n background: bgColor?.bgColor,\n width: innerWidth > 1300 ? '80%' : '95%',\n },\n }}\n />\n );\n};\n\nexport const BundleCards: React.FC<{\n cwd: string;\n errors: SDK.ErrorsData;\n summary: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetAssetsSummary>;\n}> = ({ errors, summary }) => {\n const duplicatePackages = useDuplicatePackagesByErrors(errors);\n const [totalSize, totalSizeUnit] = formatSize(summary.all.total.size).split(\n ' ',\n );\n\n const arr = [\n <AssetCardContainer\n type={'JS'}\n titles={['Total', 'Initial']}\n datas={[\n {\n data: summary.js.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.js.initial,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n <AssetCardContainer\n type={'CSS'}\n titles={['Total', 'Initial']}\n datas={[\n {\n data: summary.css.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.css.initial,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n <AssetCardContainer\n titles={['Images', 'Fonts', 'Media']}\n datas={[\n {\n data: summary.imgs.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.fonts.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n {\n data: summary.media.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n <AssetCardContainer\n type={'HTML'}\n titles={['HTML Files']}\n datas={[\n {\n data: summary.html.total,\n total: summary.all.total.size,\n showProgress: true,\n },\n ]}\n />,\n ];\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: false }}\n >\n {(res) => {\n const { treeData } = getFiles(res['all'].total);\n return (\n <div className={styles.container}>\n <div className={styles.summary}>\n <Overview\n title={\n <TextDrawer\n buttonProps={{\n size: 'small',\n }}\n buttonStyle={{\n fontSize: 'inherit',\n }}\n drawerProps={{\n title: 'Files',\n }}\n text={\n <div style={{ color: '#000000a6' }}>\n <span style={{ marginRight: '5px' }}>Total Files</span>\n <RightOutlined />\n </div>\n }\n >\n <DirectoryTree\n defaultExpandAll\n selectable={false}\n treeData={treeData}\n rootStyle={{\n minHeight: '800px',\n border: '1px solid rgba(235, 237, 241)',\n }}\n />\n </TextDrawer>\n }\n description={\n <>\n <span className={styles.description}>{totalSize}</span>\n <span className={styles.unit}>{totalSizeUnit}</span>\n <div className={styles.totalNumber}>\n <span style={{ marginRight: '7px' }}>\n Number of files\n </span>\n <span style={{ fontWeight: 500 }}>\n {summary.all.total.count}\n </span>\n </div>\n </>\n }\n icon={\n <Avatar\n style={{ background: '#3874F6' }}\n shape=\"circle\"\n icon={<FileFilled style={{ fontSize: '18px' }} />}\n />\n }\n style={{\n marginBottom: '12px',\n minWidth: '210px',\n }}\n />\n <Overview\n style={{ minWidth: '210px' }}\n title={\n <div style={{ margin: '4px 0' }}>\n <span style={{ marginRight: '5px' }}>\n Duplicate Packages\n </span>\n </div>\n }\n description={duplicatePackages.length}\n icon={\n <Avatar\n style={{ background: '#13C2C2' }}\n shape=\"circle\"\n icon={<GoldenFilled style={{ fontSize: '18px' }} />}\n />\n }\n />\n </div>\n <Divider style={{ height: '200px' }} type=\"vertical\" />\n <div className={styles.chartsContainer}>\n {arr.map((e, idx) => (\n <>\n <div key={idx} className={styles.chart}>\n {e}\n </div>\n {idx !== arr.length - 1 ? (\n <Divider\n key={`${idx}-divider`}\n style={{ height: '200px' }}\n type=\"vertical\"\n />\n ) : null}\n </>\n ))}\n </div>\n </div>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["DirectoryTree","Tree","useToken","theme","innerWidth","window","AssetCard","showProgress","data","total","tagBgColor","type","token","_tagBgColor","SizeCard","AssetCardContainer","titles","datas","bgColor","selectedTitle","setSelectedTitle","useState","idx","useMemo","currentIdx","fileType","currentData","StatisticCard","styles","Segmented","value","BundleCards","errors","summary","duplicatePackages","useDuplicatePackagesByErrors","totalSize","totalSizeUnit","formatSize","arr","ServerAPIProvider","SDK","res","treeData","getFiles","Overview","TextDrawer","RightOutlined","Avatar","FileFilled","GoldenFilled","Divider","e"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,EAAEA,eAAAA,aAAa,EAAE,GAAGC;AAC1B,MAAM,EAAEC,UAAAA,QAAQ,EAAE,GAAGC;AACrB,MAAM,EAAEC,YAAAA,gBAAU,EAAE,GAAGC;AAUvB,MAAMC,YAAiC,CAAC,EACtCC,eAAe,KAAK,EACpBC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,IAAI,EACL;IACC,MAAM,EAAEC,KAAK,EAAE,GAAGV;IAClB,MAAMW,cAAcH,cAAcE,MAAM,uBAAuB;IAC/D,OAAO,WAAP,GACE,IAACE,UAAQA;QACP,MAAMH;QACN,OAAOH,KAAK,KAAK;QACjB,OAAOC;QACP,cAAcF;QACd,YAAYM;;AAGlB;AAEA,MAAME,qBAKD,CAAC,EAAEC,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEP,IAAI,EAAE;IACpC,MAAM,CAACQ,eAAeC,iBAAiB,GAAGC,SAASL,MAAM,CAAC,EAAE;IAC5D,MAAMM,MAAMC,QACV,IAAMP,OAAO,OAAO,CAACG,gBACrB;QAACH;QAAQG;KAAc;IAEzB,MAAMK,aAAaF,OAAO,IAAIA,MAAM;IACpC,MAAMG,WAAWd,QAAQQ,iBAAiBH,MAAM,CAAC,EAAE;IAGnD,MAAMU,cACJF,cAAc,KAAKA,aAAa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,QAAQ;wBAAQ;wBAAG,MAAK;;kCAC1C,IAAC;wBAAI,WAAWvB,YAAAA,eAAsB;kCACnCW,IAAI,GAAG,CAAC,CAACa,GAAG9B,MAAAA,WAAAA,GACX;;kDACE,IAAC;wCAAc,WAAWM,YAAAA,KAAY;kDACnCwB;uCADO9B;oCAGTA,QAAQiB,IAAI,MAAM,GAAG,IAAI,WAAJ,GACpB,IAACY,SAAOA;wCAEN,OAAO;4CAAE,QAAQ;wCAAQ;wCACzB,MAAK;uCAFA,GAAG7B,IAAI,QAAQ,CAAC,IAIrB;;;;;;QAMhB;;AAGN"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.0-rc.1_@emnapi+core@1.8.1_@emnapi+runtime@1.8.1_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/BundleSize/components/index.scss","webpack://./src/pages/BundleSize/components/index.scss"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,WAAW;AACb;;ADH4E;ECM1E,YAAY;EACZ,aAAa;EACb,iBAAiB;AACnB;;ADT0I;ECYxI,WAAW;EACX,yBAAyB;EACzB,UAAU;AACZ;;ADf2N;ECkBzN,gBAAgB;AAClB;;ADnBsQ;ECsBpQ,WAAW;AACb","sourcesContent":[".monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.bundle-size-editor{margin-left:40px;flex-grow:1;height:700px}.bundle-size-editor .ant-card-body{width:auto;height:calc(100% - 48px);padding:0}.bundle-size-module-bunton{margin-left:4em}.ant-tabs-nav{width:100%}",".monaco-hover .markdown-hover.hover-row hr {\n background-color: gray;\n margin: 2px;\n}\n\n.bundle-size-editor {\n flex-grow: 1;\n height: 700px;\n margin-left: 40px;\n}\n\n.bundle-size-editor .ant-card-body {\n width: auto;\n height: calc(100% - 48px);\n padding: 0;\n}\n\n.bundle-size-module-bunton {\n margin-left: 4em;\n}\n\n.ant-tabs-nav {\n width: 100%;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/BundleSize/components/index.scss","webpack://./src/pages/BundleSize/components/index.scss"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,WAAW;AACb;;ADH4E;ECM1E,YAAY;EACZ,aAAa;EACb,iBAAiB;AACnB;;ADT0I;ECYxI,WAAW;EACX,yBAAyB;EACzB,UAAU;AACZ;;ADf2N;ECkBzN,gBAAgB;AAClB;;ADnBsQ;ECsBpQ,WAAW;AACb","sourcesContent":[".monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.bundle-size-editor{margin-left:40px;flex-grow:1;height:700px}.bundle-size-editor .ant-card-body{width:auto;height:calc(100% - 48px);padding:0}.bundle-size-module-bunton{margin-left:4em}.ant-tabs-nav{width:100%}",".monaco-hover .markdown-hover.hover-row hr {\n background-color: gray;\n margin: 2px;\n}\n\n.bundle-size-editor {\n flex-grow: 1;\n height: 700px;\n margin-left: 40px;\n}\n\n.bundle-size-editor .ant-card-body {\n width: auto;\n height: calc(100% - 48px);\n padding: 0;\n}\n\n.bundle-size-module-bunton {\n margin-left: 4em;\n}\n\n.ant-tabs-nav {\n width: 100%;\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.0-rc.1_@emnapi+core@1.8.1_@emnapi+runtime@1.8.1_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/BundleSize/components/index.module.scss","webpack://./src/pages/BundleSize/components/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,WAAW;AACb;;ADFgD;ECK9C,4BAA4B;AAC9B;;ADN8G;ECS5G,kBAAkB;EAClB,WAAW;AACb;;ADX0Q;ECcxQ,eAAe;AACjB;;ADfoa;ECkBla,cAAc;EACd,iBAAiB;AACnB;;ADpB6jB;ECuB3jB,mBAAmB;EACnB,aAAa;AACf;;ADzB+mB;EC4B7mB,iBAAiB;AACnB;;AD7B4pB;ECgC1pB,aAAa;AACf;;ADjCsrB;ECoCprB,YAAY;EACZ,oBAAoB;AACtB;;ADtC0vB;ECyCxvB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AD5CmyB;EC+CjyB,UAAU;EACV,kBAAkB;AACpB;;ADjD+0B;ECoD70B,uBAAuB;EACvB,kBAAkB;EAClB,WAAW;AACb;;ADvDk5B;EC0Dh5B,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,WAAW;AACb;;AD9Dq9B;ECiEn9B,YAAY;AACd;;ADlE4+B;ECqE1+B,gBAAgB;AAClB;;ADtEqiC;ECyEniC,eAAe;AACjB;;AD1EokC;EC6ElkC,eAAe;AACjB;;AD9EioC;ECiF/nC,cAAc;AAChB;;ADlF0qC;ECqFxqC,WAAW;AACb;;ADtF2tC;ECyFztC,iBAAiB;AACnB;;AD1F8wC;EC6F5wC,aAAa;AACf;;AD9F+0C;ECiG70C,aAAa;AACf;;ADlGi5C;ECqG/4C,YAAY;EACZ,gBAAgB;AAClB;;ADvGq9C;EC0Gn9C,WAAW;AACb;;AD3G4+C;EC8G1+C,kBAAkB;AACpB;;AD/G+gD;ECkH7gD,WAAW;EACX,UAAU;EACV,sBAAsB;EACtB,qDAAqD;EACrD,mBAAmB;EACnB,kBAAkB;EAClB,WAAW;AACb;;ADzHmrD;EC4HjrD,UAAU;AACZ;;AD7HutD;ECgIrtD,iBAAiB;EACjB,cAAc;AAChB;;ADlIqyD;ECqInyD,eAAe;EACf,sBAAsB;AACxB","sourcesContent":[".assets :global .rc-tree-indent-unit{width:22px}.assets :global .rc-tree-treenode{line-height:30px !important}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher{position:relative;bottom:4px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper{font-size:14px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon{padding:10px 0 0 0;margin-left:0}.assets .assetBox{display:flex;align-items:center}.assets .assetBox .fileText{margin-right:4px}.bundle-tree{display:flex}.bundle-tree :global span.ant-tag{margin:none;margin-inline-end:0px}.box{display:flex;height:30px;width:100%}.box .keyword{flex:0 0 auto;padding-right:5}.divider{border-color:rgba(0,0,0,.12);position:relative;bottom:20%}.dividerDiv{flex-grow:1;margin:0 10px;bottom:10%;position:relative}.assetsTag{height:30px}.assetsTag :global .ant-divider-vertical{margin-inline:0}.bundle :global{font-size:14px}.bundle :global .rc-tree-node-content-wrapper{font-size:14px}.bundle :global .file-icon{margin-left:0}.bundle :global .ant-tree-indent-unit{width:10px}.bundle :global .ant-tree-iconEle{margin-right:2px}.bundle :global .ant-tree-node-content-wrapper-open{display:flex}.bundle :global .ant-tree-node-content-wrapper-close{display:flex}.modal :global .ant-input-affix-wrapper{padding:4px 5px;width:490px}.search-btn{color:#fff}.search-btn>span{position:relative}.search-btn::before{content:\"\";background:linear-gradient(135deg, #6253e1, #04befe);position:absolute;inset:-1px;opacity:1;transition:all .3s;border-radius:inherit}.search-btn:hover::before{opacity:0}.search-modal-list :global .ant-spin-container{overflow:auto;max-height:30rem}.search-modal-list :global .search-list-item.clickable:hover{background-color:#eee;cursor:pointer}",".assets :global .rc-tree-indent-unit {\n width: 22px;\n}\n\n.assets :global .rc-tree-treenode {\n line-height: 30px !important;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher {\n position: relative;\n bottom: 4px;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper {\n font-size: 14px;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon {\n margin-left: 0;\n padding: 10px 0 0;\n}\n\n.assets .assetBox {\n align-items: center;\n display: flex;\n}\n\n.assets .assetBox .fileText {\n margin-right: 4px;\n}\n\n.bundle-tree {\n display: flex;\n}\n\n.bundle-tree :global span.ant-tag {\n margin: none;\n margin-inline-end: 0;\n}\n\n.box {\n width: 100%;\n height: 30px;\n display: flex;\n}\n\n.box .keyword {\n flex: none;\n padding-right: 5px;\n}\n\n.divider {\n border-color: #0000001f;\n position: relative;\n bottom: 20%;\n}\n\n.dividerDiv {\n flex-grow: 1;\n margin: 0 10px;\n position: relative;\n bottom: 10%;\n}\n\n.assetsTag {\n height: 30px;\n}\n\n.assetsTag :global .ant-divider-vertical {\n margin-inline: 0;\n}\n\n.bundle :global {\n font-size: 14px;\n}\n\n.bundle :global .rc-tree-node-content-wrapper {\n font-size: 14px;\n}\n\n.bundle :global .file-icon {\n margin-left: 0;\n}\n\n.bundle :global .ant-tree-indent-unit {\n width: 10px;\n}\n\n.bundle :global .ant-tree-iconEle {\n margin-right: 2px;\n}\n\n.bundle :global .ant-tree-node-content-wrapper-open {\n display: flex;\n}\n\n.bundle :global .ant-tree-node-content-wrapper-close {\n display: flex;\n}\n\n.modal :global .ant-input-affix-wrapper {\n width: 490px;\n padding: 4px 5px;\n}\n\n.search-btn {\n color: #fff;\n}\n\n.search-btn > span {\n position: relative;\n}\n\n.search-btn:before {\n content: \"\";\n opacity: 1;\n border-radius: inherit;\n background: linear-gradient(135deg, #6253e1, #04befe);\n transition: all .3s;\n position: absolute;\n inset: -1px;\n}\n\n.search-btn:hover:before {\n opacity: 0;\n}\n\n.search-modal-list :global .ant-spin-container {\n max-height: 30rem;\n overflow: auto;\n}\n\n.search-modal-list :global .search-list-item.clickable:hover {\n cursor: pointer;\n background-color: #eee;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/BundleSize/components/index.module.scss","webpack://./src/pages/BundleSize/components/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,WAAW;AACb;;ADFgD;ECK9C,4BAA4B;AAC9B;;ADN8G;ECS5G,kBAAkB;EAClB,WAAW;AACb;;ADX0Q;ECcxQ,eAAe;AACjB;;ADfoa;ECkBla,cAAc;EACd,iBAAiB;AACnB;;ADpB6jB;ECuB3jB,mBAAmB;EACnB,aAAa;AACf;;ADzB+mB;EC4B7mB,iBAAiB;AACnB;;AD7B4pB;ECgC1pB,aAAa;AACf;;ADjCsrB;ECoCprB,YAAY;EACZ,oBAAoB;AACtB;;ADtC0vB;ECyCxvB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AD5CmyB;EC+CjyB,UAAU;EACV,kBAAkB;AACpB;;ADjD+0B;ECoD70B,uBAAuB;EACvB,kBAAkB;EAClB,WAAW;AACb;;ADvDk5B;EC0Dh5B,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,WAAW;AACb;;AD9Dq9B;ECiEn9B,YAAY;AACd;;ADlE4+B;ECqE1+B,gBAAgB;AAClB;;ADtEqiC;ECyEniC,eAAe;AACjB;;AD1EokC;EC6ElkC,eAAe;AACjB;;AD9EioC;ECiF/nC,cAAc;AAChB;;ADlF0qC;ECqFxqC,WAAW;AACb;;ADtF2tC;ECyFztC,iBAAiB;AACnB;;AD1F8wC;EC6F5wC,aAAa;AACf;;AD9F+0C;ECiG70C,aAAa;AACf;;ADlGi5C;ECqG/4C,YAAY;EACZ,gBAAgB;AAClB;;ADvGq9C;EC0Gn9C,WAAW;AACb;;AD3G4+C;EC8G1+C,kBAAkB;AACpB;;AD/G+gD;ECkH7gD,WAAW;EACX,UAAU;EACV,sBAAsB;EACtB,qDAAqD;EACrD,mBAAmB;EACnB,kBAAkB;EAClB,WAAW;AACb;;ADzHmrD;EC4HjrD,UAAU;AACZ;;AD7HutD;ECgIrtD,iBAAiB;EACjB,cAAc;AAChB;;ADlIqyD;ECqInyD,eAAe;EACf,sBAAsB;AACxB","sourcesContent":[".assets :global .rc-tree-indent-unit{width:22px}.assets :global .rc-tree-treenode{line-height:30px !important}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher{position:relative;bottom:4px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper{font-size:14px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon{padding:10px 0 0 0;margin-left:0}.assets .assetBox{display:flex;align-items:center}.assets .assetBox .fileText{margin-right:4px}.bundle-tree{display:flex}.bundle-tree :global span.ant-tag{margin:none;margin-inline-end:0px}.box{display:flex;height:30px;width:100%}.box .keyword{flex:0 0 auto;padding-right:5}.divider{border-color:rgba(0,0,0,.12);position:relative;bottom:20%}.dividerDiv{flex-grow:1;margin:0 10px;bottom:10%;position:relative}.assetsTag{height:30px}.assetsTag :global .ant-divider-vertical{margin-inline:0}.bundle :global{font-size:14px}.bundle :global .rc-tree-node-content-wrapper{font-size:14px}.bundle :global .file-icon{margin-left:0}.bundle :global .ant-tree-indent-unit{width:10px}.bundle :global .ant-tree-iconEle{margin-right:2px}.bundle :global .ant-tree-node-content-wrapper-open{display:flex}.bundle :global .ant-tree-node-content-wrapper-close{display:flex}.modal :global .ant-input-affix-wrapper{padding:4px 5px;width:490px}.search-btn{color:#fff}.search-btn>span{position:relative}.search-btn::before{content:\"\";background:linear-gradient(135deg, #6253e1, #04befe);position:absolute;inset:-1px;opacity:1;transition:all .3s;border-radius:inherit}.search-btn:hover::before{opacity:0}.search-modal-list :global .ant-spin-container{overflow:auto;max-height:30rem}.search-modal-list :global .search-list-item.clickable:hover{background-color:#eee;cursor:pointer}",".assets :global .rc-tree-indent-unit {\n width: 22px;\n}\n\n.assets :global .rc-tree-treenode {\n line-height: 30px !important;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher {\n position: relative;\n bottom: 4px;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper {\n font-size: 14px;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon {\n margin-left: 0;\n padding: 10px 0 0;\n}\n\n.assets .assetBox {\n align-items: center;\n display: flex;\n}\n\n.assets .assetBox .fileText {\n margin-right: 4px;\n}\n\n.bundle-tree {\n display: flex;\n}\n\n.bundle-tree :global span.ant-tag {\n margin: none;\n margin-inline-end: 0;\n}\n\n.box {\n width: 100%;\n height: 30px;\n display: flex;\n}\n\n.box .keyword {\n flex: none;\n padding-right: 5px;\n}\n\n.divider {\n border-color: #0000001f;\n position: relative;\n bottom: 20%;\n}\n\n.dividerDiv {\n flex-grow: 1;\n margin: 0 10px;\n position: relative;\n bottom: 10%;\n}\n\n.assetsTag {\n height: 30px;\n}\n\n.assetsTag :global .ant-divider-vertical {\n margin-inline: 0;\n}\n\n.bundle :global {\n font-size: 14px;\n}\n\n.bundle :global .rc-tree-node-content-wrapper {\n font-size: 14px;\n}\n\n.bundle :global .file-icon {\n margin-left: 0;\n}\n\n.bundle :global .ant-tree-indent-unit {\n width: 10px;\n}\n\n.bundle :global .ant-tree-iconEle {\n margin-right: 2px;\n}\n\n.bundle :global .ant-tree-node-content-wrapper-open {\n display: flex;\n}\n\n.bundle :global .ant-tree-node-content-wrapper-close {\n display: flex;\n}\n\n.modal :global .ant-input-affix-wrapper {\n width: 490px;\n padding: 4px 5px;\n}\n\n.search-btn {\n color: #fff;\n}\n\n.search-btn > span {\n position: relative;\n}\n\n.search-btn:before {\n content: \"\";\n opacity: 1;\n border-radius: inherit;\n background: linear-gradient(135deg, #6253e1, #04befe);\n transition: all .3s;\n position: absolute;\n inset: -1px;\n}\n\n.search-btn:hover:before {\n opacity: 0;\n}\n\n.search-modal-list :global .ant-spin-container {\n max-height: 30rem;\n overflow: auto;\n}\n\n.search-modal-list :global .search-list-item.clickable:hover {\n cursor: pointer;\n background-color: #eee;\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.0-rc.1_@emnapi+core@1.8.1_@emnapi+runtime@1.8.1_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/ModuleAnalyze/components/fileTreeCom.scss","webpack://./src/pages/ModuleAnalyze/components/fileTreeCom.scss"],"names":[],"mappings":"AAAA;ECCE,SAAS;AACX;;ADFwB;ECKtB,mBAAmB;EACnB,UAAU;EACV,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,gBAAgB;AAClB;;ADXgJ;ECc9I,sBAAsB;EACtB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,SAAS;EACT,cAAc;EACd,qBAAqB;EACrB,qBAAqB;EACrB,kBAAkB;AACpB;;ADvBkX;EC0BhX,wBAAwB;AAC1B;;AD3B2c;EC8Bzc,aAAa;AACf;;AD/Bkf;ECkChf,cAAc;AAChB;;ADnC+hB;ECsC7hB,cAAc;EACd,mBAAmB;AACrB;;ADxC0qB;EC2CxqB,qBAAqB;EACrB,kBAAkB;AACpB;;AD7C2vB;ECgDzvB,eAAe;EACf,qBAAqB;AACvB;;ADlDozB;ECqDlzB,eAAe;EACf,yBAAyB;EACzB,yBAAyB;EACzB,UAAU;AACZ;;ADzD+5B;EC4D75B,cAAc;AAChB;;AD7Dm+B;ECgEj+B,gBAAgB;AAClB;;ADjE0hC;ECoExhC,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;ADvEomC;EC0ElmC,WAAW;EACX,qBAAqB;AACvB;;AD5E+pC;EC+E7pC,yBAAyB;EACzB,oBAAoB;AACtB;;ADjF8uC;ECoF5uC,wBAAwB;AAC1B;;ADrFuyC;ECwFryC,2BAA2B;AAC7B;;ADzFg4C;EC4F93C,sBAAsB;EACtB,aAAa;AACf;;AD9Fu/C;ECiGr/C,eAAe;EACf,iBAAiB;EACjB,aAAa;AACf;;ADpGkpD;ECuGhpD,eAAe;AACjB;;ADxGw5D;EC2Gt5D,sBAAsB;AACxB;;AD5G+gE;EC+G7gE,oBAAoB;AACtB;;ADhH+nE;ECmH7nE,eAAe;EACf,cAAc;AAChB;;ADrH6vE;ECwH3vE,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;AD3Hi0E;EC8H/zE,WAAW;EACX,qBAAqB;AACvB","sourcesContent":[".file-tree-com{margin:0}.file-tree-com .file-tree-com-treenode{margin:0;padding:0;line-height:24px;white-space:nowrap;list-style:none;outline:0}.file-tree-com .file-tree-com-treenode .file-tree-com-node-content-wrapper{position:relative;display:inline-block;height:24px;margin:0;padding:0 4px;box-sizing:border-box;text-decoration:none;vertical-align:top;cursor:pointer}.file-tree-com .file-tree-com-treenode .file-tree-com-arrow-icon{transform:rotate(90deg)}.file-tree-com-child-tree{display:none}.file-tree-com-child-tree-open{display:block}.file-tree-com-treenode-disabled>span:not(.file-tree-com-switcher),.file-tree-com>a,.file-tree-com>a span{color:#767676;cursor:not-allowed}.file-tree-com-treenode-selected{background:rgba(5,145,255,.3);border-radius:4px}.file-tree-com-title{display:inline-block;cursor:pointer}.file-tree-com-titles-box:hover{background-color:#f0f3f5;border:1px solid #e5e6eb;cursor:pointer;width:80%}.file-tree-com-titles-box:hover .ant-typography:hover{color:#0079ff}.file-tree-com-node-title .file-icon{padding:4px 0 0 0}.file-tree-com-indent{display:inline-block;height:0;vertical-align:bottom}.file-tree-com-indent-unit{display:inline-block;width:14px}.file-tree-switcher-arrow{transform:rotate(0deg);transition:transform .3s ease}.file-tree-switcher-arrow-expand{transform:rotate(90deg)}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child){border-left:1px solid #eee}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles{display:flex;flex-direction:column}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title{display:flex;cursor:pointer;line-height:30px}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img{cursor:pointer}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img-tag{cursor:pointer}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-selected{background-color:#ff0}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-tag{margin-inline-end:0}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-code-tag{cursor:pointer;padding:0 2px}.rc-tree-indent{display:inline-block;height:0;vertical-align:bottom}.rc-tree-indent-unit{display:inline-block;width:14px}",".file-tree-com {\n margin: 0;\n}\n\n.file-tree-com .file-tree-com-treenode {\n white-space: nowrap;\n outline: 0;\n margin: 0;\n padding: 0;\n line-height: 24px;\n list-style: none;\n}\n\n.file-tree-com .file-tree-com-treenode .file-tree-com-node-content-wrapper {\n box-sizing: border-box;\n vertical-align: top;\n cursor: pointer;\n height: 24px;\n margin: 0;\n padding: 0 4px;\n text-decoration: none;\n display: inline-block;\n position: relative;\n}\n\n.file-tree-com .file-tree-com-treenode .file-tree-com-arrow-icon {\n transform: rotate(90deg);\n}\n\n.file-tree-com-child-tree {\n display: none;\n}\n\n.file-tree-com-child-tree-open {\n display: block;\n}\n\n.file-tree-com-treenode-disabled > span:not(.file-tree-com-switcher), .file-tree-com > a, .file-tree-com > a span {\n color: #767676;\n cursor: not-allowed;\n}\n\n.file-tree-com-treenode-selected {\n background: #0591ff4d;\n border-radius: 4px;\n}\n\n.file-tree-com-title {\n cursor: pointer;\n display: inline-block;\n}\n\n.file-tree-com-titles-box:hover {\n cursor: pointer;\n background-color: #f0f3f5;\n border: 1px solid #e5e6eb;\n width: 80%;\n}\n\n.file-tree-com-titles-box:hover .ant-typography:hover {\n color: #0079ff;\n}\n\n.file-tree-com-node-title .file-icon {\n padding: 4px 0 0;\n}\n\n.file-tree-com-indent {\n vertical-align: bottom;\n height: 0;\n display: inline-block;\n}\n\n.file-tree-com-indent-unit {\n width: 14px;\n display: inline-block;\n}\n\n.file-tree-switcher-arrow {\n transition: transform .3s;\n transform: rotate(0);\n}\n\n.file-tree-switcher-arrow-expand {\n transform: rotate(90deg);\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) {\n border-left: 1px solid #eee;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles {\n flex-direction: column;\n display: flex;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title {\n cursor: pointer;\n line-height: 30px;\n display: flex;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img, .rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img-tag {\n cursor: pointer;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-selected {\n background-color: #ff0;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-tag {\n margin-inline-end: 0;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-code-tag {\n cursor: pointer;\n padding: 0 2px;\n}\n\n.rc-tree-indent {\n vertical-align: bottom;\n height: 0;\n display: inline-block;\n}\n\n.rc-tree-indent-unit {\n width: 14px;\n display: inline-block;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/ModuleAnalyze/components/fileTreeCom.scss","webpack://./src/pages/ModuleAnalyze/components/fileTreeCom.scss"],"names":[],"mappings":"AAAA;ECCE,SAAS;AACX;;ADFwB;ECKtB,mBAAmB;EACnB,UAAU;EACV,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,gBAAgB;AAClB;;ADXgJ;ECc9I,sBAAsB;EACtB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,SAAS;EACT,cAAc;EACd,qBAAqB;EACrB,qBAAqB;EACrB,kBAAkB;AACpB;;ADvBkX;EC0BhX,wBAAwB;AAC1B;;AD3B2c;EC8Bzc,aAAa;AACf;;AD/Bkf;ECkChf,cAAc;AAChB;;ADnC+hB;ECsC7hB,cAAc;EACd,mBAAmB;AACrB;;ADxC0qB;EC2CxqB,qBAAqB;EACrB,kBAAkB;AACpB;;AD7C2vB;ECgDzvB,eAAe;EACf,qBAAqB;AACvB;;ADlDozB;ECqDlzB,eAAe;EACf,yBAAyB;EACzB,yBAAyB;EACzB,UAAU;AACZ;;ADzD+5B;EC4D75B,cAAc;AAChB;;AD7Dm+B;ECgEj+B,gBAAgB;AAClB;;ADjE0hC;ECoExhC,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;ADvEomC;EC0ElmC,WAAW;EACX,qBAAqB;AACvB;;AD5E+pC;EC+E7pC,yBAAyB;EACzB,oBAAoB;AACtB;;ADjF8uC;ECoF5uC,wBAAwB;AAC1B;;ADrFuyC;ECwFryC,2BAA2B;AAC7B;;ADzFg4C;EC4F93C,sBAAsB;EACtB,aAAa;AACf;;AD9Fu/C;ECiGr/C,eAAe;EACf,iBAAiB;EACjB,aAAa;AACf;;ADpGkpD;ECuGhpD,eAAe;AACjB;;ADxGw5D;EC2Gt5D,sBAAsB;AACxB;;AD5G+gE;EC+G7gE,oBAAoB;AACtB;;ADhH+nE;ECmH7nE,eAAe;EACf,cAAc;AAChB;;ADrH6vE;ECwH3vE,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;AD3Hi0E;EC8H/zE,WAAW;EACX,qBAAqB;AACvB","sourcesContent":[".file-tree-com{margin:0}.file-tree-com .file-tree-com-treenode{margin:0;padding:0;line-height:24px;white-space:nowrap;list-style:none;outline:0}.file-tree-com .file-tree-com-treenode .file-tree-com-node-content-wrapper{position:relative;display:inline-block;height:24px;margin:0;padding:0 4px;box-sizing:border-box;text-decoration:none;vertical-align:top;cursor:pointer}.file-tree-com .file-tree-com-treenode .file-tree-com-arrow-icon{transform:rotate(90deg)}.file-tree-com-child-tree{display:none}.file-tree-com-child-tree-open{display:block}.file-tree-com-treenode-disabled>span:not(.file-tree-com-switcher),.file-tree-com>a,.file-tree-com>a span{color:#767676;cursor:not-allowed}.file-tree-com-treenode-selected{background:rgba(5,145,255,.3);border-radius:4px}.file-tree-com-title{display:inline-block;cursor:pointer}.file-tree-com-titles-box:hover{background-color:#f0f3f5;border:1px solid #e5e6eb;cursor:pointer;width:80%}.file-tree-com-titles-box:hover .ant-typography:hover{color:#0079ff}.file-tree-com-node-title .file-icon{padding:4px 0 0 0}.file-tree-com-indent{display:inline-block;height:0;vertical-align:bottom}.file-tree-com-indent-unit{display:inline-block;width:14px}.file-tree-switcher-arrow{transform:rotate(0deg);transition:transform .3s ease}.file-tree-switcher-arrow-expand{transform:rotate(90deg)}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child){border-left:1px solid #eee}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles{display:flex;flex-direction:column}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title{display:flex;cursor:pointer;line-height:30px}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img{cursor:pointer}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img-tag{cursor:pointer}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-selected{background-color:#ff0}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-tag{margin-inline-end:0}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-code-tag{cursor:pointer;padding:0 2px}.rc-tree-indent{display:inline-block;height:0;vertical-align:bottom}.rc-tree-indent-unit{display:inline-block;width:14px}",".file-tree-com {\n margin: 0;\n}\n\n.file-tree-com .file-tree-com-treenode {\n white-space: nowrap;\n outline: 0;\n margin: 0;\n padding: 0;\n line-height: 24px;\n list-style: none;\n}\n\n.file-tree-com .file-tree-com-treenode .file-tree-com-node-content-wrapper {\n box-sizing: border-box;\n vertical-align: top;\n cursor: pointer;\n height: 24px;\n margin: 0;\n padding: 0 4px;\n text-decoration: none;\n display: inline-block;\n position: relative;\n}\n\n.file-tree-com .file-tree-com-treenode .file-tree-com-arrow-icon {\n transform: rotate(90deg);\n}\n\n.file-tree-com-child-tree {\n display: none;\n}\n\n.file-tree-com-child-tree-open {\n display: block;\n}\n\n.file-tree-com-treenode-disabled > span:not(.file-tree-com-switcher), .file-tree-com > a, .file-tree-com > a span {\n color: #767676;\n cursor: not-allowed;\n}\n\n.file-tree-com-treenode-selected {\n background: #0591ff4d;\n border-radius: 4px;\n}\n\n.file-tree-com-title {\n cursor: pointer;\n display: inline-block;\n}\n\n.file-tree-com-titles-box:hover {\n cursor: pointer;\n background-color: #f0f3f5;\n border: 1px solid #e5e6eb;\n width: 80%;\n}\n\n.file-tree-com-titles-box:hover .ant-typography:hover {\n color: #0079ff;\n}\n\n.file-tree-com-node-title .file-icon {\n padding: 4px 0 0;\n}\n\n.file-tree-com-indent {\n vertical-align: bottom;\n height: 0;\n display: inline-block;\n}\n\n.file-tree-com-indent-unit {\n width: 14px;\n display: inline-block;\n}\n\n.file-tree-switcher-arrow {\n transition: transform .3s;\n transform: rotate(0);\n}\n\n.file-tree-switcher-arrow-expand {\n transform: rotate(90deg);\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) {\n border-left: 1px solid #eee;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles {\n flex-direction: column;\n display: flex;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title {\n cursor: pointer;\n line-height: 30px;\n display: flex;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img, .rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img-tag {\n cursor: pointer;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-selected {\n background-color: #ff0;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-tag {\n margin-inline-end: 0;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-code-tag {\n cursor: pointer;\n padding: 0 2px;\n}\n\n.rc-tree-indent {\n vertical-align: bottom;\n height: 0;\n display: inline-block;\n}\n\n.rc-tree-indent-unit {\n width: 14px;\n display: inline-block;\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.0-rc.1_@emnapi+core@1.8.1_@emnapi+runtime@1.8.1_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/ModuleAnalyze/index.scss","webpack://./src/pages/ModuleAnalyze/index.scss"],"names":[],"mappings":"AAAA;ECCE,aAAa;EACb,gBAAgB;AAClB;;ADHuD;ECMrD,eAAe;AACjB;;ADPsH;ECUpH,sBAAsB;EACtB,aAAa;AACf;;ADZ6K;ECe3K,iBAAiB;AACnB;;ADhBwN;ECmBtN,gBAAgB;EAChB,gBAAgB;EAChB,2BAA2B;EAC3B,kBAAkB;EAClB,gBAAgB;EAChB,mBAAmB;AACrB;;ADzB2W;EC4BzW,gBAAgB;EAChB,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,qBAAqB;AACvB;;ADjC6e;ECoC3e,sBAAsB;EACtB,QAAQ;EACR,aAAa;AACf;;ADvC0jB;EC0CxjB,kCAAkC;EAClC,8BAA8B;EAC9B,mBAAmB;EACnB,cAAc;EACd,aAAa;AACf;;AD/CmtB;ECkDjtB,mBAAmB;AACrB;;ADnDmxB;ECsDjxB,gBAAgB;EAChB,4BAA4B;EAC5B,eAAe;EACf,gBAAgB;AAClB;;AD1Dw4B;EC6Dt4B,gBAAgB;EAChB,eAAe;AACjB","sourcesContent":[".module-analyze-file-tree{width:\"100%\";min-height:50em}.module-analyze-file-tree .module-analyze-empty{margin-top:20%}.module-analyze-box{display:flex;flex-direction:column}.file-tree-com-titles-box{line-height:30px}.module-analyze-bailout-card{margin-top:16px;border-radius:8px;border:1px solid rgba(5,5,5,.06);box-shadow:none;background:#fff;margin-bottom:24px}.module-analyze-bailout-card-title{display:inline-block;font-size:14px;margin-bottom:12px;color:rgba(28,31,35,.8);font-weight:600}.module-analyze-bailout-card-list{display:flex;flex-direction:column;gap:8px}.module-analyze-bailout-card-item{display:flex;align-items:center;justify-content:space-between;padding:6px 0;border-bottom:1px solid rgba(22,26,35,.08)}.module-analyze-bailout-card-item:last-child{border-bottom:none}.module-analyze-bailout-card-text{max-width:calc(100% - 70px);font-weight:400;font-size:12px;color:rgba(28,31,35,.8)}.module-analyze-bailout-card-meta{font-size:12px;color:rgba(28,31,35,.45)}",".module-analyze-file-tree {\n width: \"100%\";\n min-height: 50em;\n}\n\n.module-analyze-file-tree .module-analyze-empty {\n margin-top: 20%;\n}\n\n.module-analyze-box {\n flex-direction: column;\n display: flex;\n}\n\n.file-tree-com-titles-box {\n line-height: 30px;\n}\n\n.module-analyze-bailout-card {\n box-shadow: none;\n background: #fff;\n border: 1px solid #0505050f;\n border-radius: 8px;\n margin-top: 16px;\n margin-bottom: 24px;\n}\n\n.module-analyze-bailout-card-title {\n color: #1c1f23cc;\n margin-bottom: 12px;\n font-size: 14px;\n font-weight: 600;\n display: inline-block;\n}\n\n.module-analyze-bailout-card-list {\n flex-direction: column;\n gap: 8px;\n display: flex;\n}\n\n.module-analyze-bailout-card-item {\n border-bottom: 1px solid #161a2314;\n justify-content: space-between;\n align-items: center;\n padding: 6px 0;\n display: flex;\n}\n\n.module-analyze-bailout-card-item:last-child {\n border-bottom: none;\n}\n\n.module-analyze-bailout-card-text {\n color: #1c1f23cc;\n max-width: calc(100% - 70px);\n font-size: 12px;\n font-weight: 400;\n}\n\n.module-analyze-bailout-card-meta {\n color: #1c1f2373;\n font-size: 12px;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/ModuleAnalyze/index.scss","webpack://./src/pages/ModuleAnalyze/index.scss"],"names":[],"mappings":"AAAA;ECCE,aAAa;EACb,gBAAgB;AAClB;;ADHuD;ECMrD,eAAe;AACjB;;ADPsH;ECUpH,sBAAsB;EACtB,aAAa;AACf;;ADZ6K;ECe3K,iBAAiB;AACnB;;ADhBwN;ECmBtN,gBAAgB;EAChB,gBAAgB;EAChB,2BAA2B;EAC3B,kBAAkB;EAClB,gBAAgB;EAChB,mBAAmB;AACrB;;ADzB2W;EC4BzW,gBAAgB;EAChB,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,qBAAqB;AACvB;;ADjC6e;ECoC3e,sBAAsB;EACtB,QAAQ;EACR,aAAa;AACf;;ADvC0jB;EC0CxjB,kCAAkC;EAClC,8BAA8B;EAC9B,mBAAmB;EACnB,cAAc;EACd,aAAa;AACf;;AD/CmtB;ECkDjtB,mBAAmB;AACrB;;ADnDmxB;ECsDjxB,gBAAgB;EAChB,4BAA4B;EAC5B,eAAe;EACf,gBAAgB;AAClB;;AD1Dw4B;EC6Dt4B,gBAAgB;EAChB,eAAe;AACjB","sourcesContent":[".module-analyze-file-tree{width:\"100%\";min-height:50em}.module-analyze-file-tree .module-analyze-empty{margin-top:20%}.module-analyze-box{display:flex;flex-direction:column}.file-tree-com-titles-box{line-height:30px}.module-analyze-bailout-card{margin-top:16px;border-radius:8px;border:1px solid rgba(5,5,5,.06);box-shadow:none;background:#fff;margin-bottom:24px}.module-analyze-bailout-card-title{display:inline-block;font-size:14px;margin-bottom:12px;color:rgba(28,31,35,.8);font-weight:600}.module-analyze-bailout-card-list{display:flex;flex-direction:column;gap:8px}.module-analyze-bailout-card-item{display:flex;align-items:center;justify-content:space-between;padding:6px 0;border-bottom:1px solid rgba(22,26,35,.08)}.module-analyze-bailout-card-item:last-child{border-bottom:none}.module-analyze-bailout-card-text{max-width:calc(100% - 70px);font-weight:400;font-size:12px;color:rgba(28,31,35,.8)}.module-analyze-bailout-card-meta{font-size:12px;color:rgba(28,31,35,.45)}",".module-analyze-file-tree {\n width: \"100%\";\n min-height: 50em;\n}\n\n.module-analyze-file-tree .module-analyze-empty {\n margin-top: 20%;\n}\n\n.module-analyze-box {\n flex-direction: column;\n display: flex;\n}\n\n.file-tree-com-titles-box {\n line-height: 30px;\n}\n\n.module-analyze-bailout-card {\n box-shadow: none;\n background: #fff;\n border: 1px solid #0505050f;\n border-radius: 8px;\n margin-top: 16px;\n margin-bottom: 24px;\n}\n\n.module-analyze-bailout-card-title {\n color: #1c1f23cc;\n margin-bottom: 12px;\n font-size: 14px;\n font-weight: 600;\n display: inline-block;\n}\n\n.module-analyze-bailout-card-list {\n flex-direction: column;\n gap: 8px;\n display: flex;\n}\n\n.module-analyze-bailout-card-item {\n border-bottom: 1px solid #161a2314;\n justify-content: space-between;\n align-items: center;\n padding: 6px 0;\n display: flex;\n}\n\n.module-analyze-bailout-card-item:last-child {\n border-bottom: none;\n}\n\n.module-analyze-bailout-card-text {\n color: #1c1f23cc;\n max-width: calc(100% - 70px);\n font-size: 12px;\n font-weight: 400;\n}\n\n.module-analyze-bailout-card-meta {\n color: #1c1f2373;\n font-size: 12px;\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.0-rc.1_@emnapi+core@1.8.1_@emnapi+runtime@1.8.1_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/Overall/index.module.scss","webpack://./src/pages/Overall/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,6NAA6N;AAC/N;;ADFoO;ECKlO,6BAA6B;AAC/B;;ADNmS;ECSjS,OAAO;AACT;;ADVwU;ECatU,aAAa;AACf;;ADdyY;ECiBvY,8BAA8B;EAC9B,aAAa;AACf;;ADnB6b;ECsB3b,mBAAmB;AACrB","sourcesContent":[":root{--font-family-code: Roboto, Roboto Mono, -apple-system, BlinkMacSystemFont, 'Segoe UI', Menlo, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'}:root :global .ant-layout-content{padding:16px 32px !important}:root :global .ant-tree-title{flex:1}:root :global .ant-tree-node-content-wrapper-normal{display:flex}.overall{display:flex;justify-content:space-between}.layout .row{margin-bottom:16px}",":root {\n --font-family-code: Roboto, Roboto Mono, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Menlo, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n}\n\n:root :global .ant-layout-content {\n padding: 16px 32px !important;\n}\n\n:root :global .ant-tree-title {\n flex: 1;\n}\n\n:root :global .ant-tree-node-content-wrapper-normal {\n display: flex;\n}\n\n.overall {\n justify-content: space-between;\n display: flex;\n}\n\n.layout .row {\n margin-bottom: 16px;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/Overall/index.module.scss","webpack://./src/pages/Overall/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,6NAA6N;AAC/N;;ADFoO;ECKlO,6BAA6B;AAC/B;;ADNmS;ECSjS,OAAO;AACT;;ADVwU;ECatU,aAAa;AACf;;ADdyY;ECiBvY,8BAA8B;EAC9B,aAAa;AACf;;ADnB6b;ECsB3b,mBAAmB;AACrB","sourcesContent":[":root{--font-family-code: Roboto, Roboto Mono, -apple-system, BlinkMacSystemFont, 'Segoe UI', Menlo, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'}:root :global .ant-layout-content{padding:16px 32px !important}:root :global .ant-tree-title{flex:1}:root :global .ant-tree-node-content-wrapper-normal{display:flex}.overall{display:flex;justify-content:space-between}.layout .row{margin-bottom:16px}",":root {\n --font-family-code: Roboto, Roboto Mono, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Menlo, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n}\n\n:root :global .ant-layout-content {\n padding: 16px 32px !important;\n}\n\n:root :global .ant-tree-title {\n flex: 1;\n}\n\n:root :global .ant-tree-node-content-wrapper-normal {\n display: flex;\n}\n\n.overall {\n justify-content: space-between;\n display: flex;\n}\n\n.layout .row {\n margin-bottom: 16px;\n}\n"],"sourceRoot":""}
@@ -296,7 +296,7 @@ const ModuleRowForAsset = ({ data, baseline, current })=>{
296
296
  }),
297
297
  /*#__PURE__*/ jsx(Button, {
298
298
  onClick: ()=>{
299
- clearFilters && handleReset(clearFilters);
299
+ if (clearFilters) handleReset(clearFilters);
300
300
  setSelectedKeys([]);
301
301
  handleSearch([], confirm);
302
302
  },
@@ -1 +1 @@
1
- {"version":3,"file":"pages/Resources/BundleDiff/DiffContainer/row.mjs","sources":["../../../../../src/pages/Resources/BundleDiff/DiffContainer/row.tsx"],"sourcesContent":["import { InfoCircleOutlined, SearchOutlined } from '@ant-design/icons';\nimport {\n Button,\n Divider,\n Input,\n InputRef,\n Space,\n Table,\n Tag,\n Tooltip,\n Typography,\n} from 'antd';\nimport {\n ColumnGroupType,\n ColumnType,\n FilterConfirmProps,\n} from 'antd/es/table/interface';\nimport { upperFirst } from 'es-toolkit/compat';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { Client } from '@rsdoctor/types';\nimport { CompareFn } from 'antd/lib/table/interface';\nimport { Color } from '../../../../constants';\nimport {\n beautifyModulePath,\n formatPercent,\n formatSize,\n} from '../../../../utils';\nimport { ViewChanges } from './changes';\nimport { FileUpdateTypeTag, getUpdateType } from './modules';\nimport {\n BundleDiffComponentCardProps,\n BundleDiffTableAssetsData,\n BundleDiffTableModulesData,\n} from './types';\nimport { UpdateType } from './constants';\nimport { formatDiffSize } from './utils';\nimport { Graph } from '@rsdoctor/utils/common';\n\nexport const ModuleHashPattern = /[a-fA-F0-9]{20,}/;\n\nexport const getSizeColumnPropsForModuleRow = (\n key: 'baseline' | 'current',\n sizeKey: 'parsedSize' | 'sourceSize',\n sortByChanged?: boolean,\n): ColumnType<BundleDiffTableModulesData> => {\n const sortByChangedFn: CompareFn<any> = (a, b) =>\n (a.current?.size[sizeKey] || 0) -\n (a.baseline?.size[sizeKey] || 0) -\n (b.current?.size[sizeKey] || 0) +\n (b.baseline?.size[sizeKey] || 0);\n\n const sorterFn: CompareFn<any> = sortByChanged\n ? (a, b) => sortByChangedFn(a, b)\n : (a, b) => (a[key]?.size[sizeKey] || 0) - (b[key]?.size[sizeKey] || 0);\n\n return {\n width: 200,\n sorter: (a, b) => sorterFn(a, b),\n render: (_v, r) => {\n if (!r[key]) return '-';\n const size = r[key]!.size[sizeKey];\n return (\n <Space>\n <Typography.Text>{formatSize(size)}</Typography.Text>\n {key === 'current'\n ? formatDiffSize(\n r.baseline?.size[sizeKey] || 0,\n size,\n (r.baseline?.size[sizeKey] || 0) > size\n ? Client.RsdoctorClientDiffState.Down\n : Client.RsdoctorClientDiffState.Up,\n )\n : null}\n </Space>\n );\n },\n };\n};\n\nexport const getTargetColumnPropsForModuleRow = (\n key: 'baseline' | 'current',\n bModulesCount: number,\n cModulesCount: number,\n): ColumnGroupType<BundleDiffTableModulesData> => {\n const [sortByChanged, setSortByChanged] = useState(false);\n\n const isB = key === 'baseline';\n return {\n title: () => {\n const count = isB ? bModulesCount : cModulesCount;\n const title = upperFirst(key);\n const diff = Graph.diffSize(bModulesCount, cModulesCount);\n return (\n <div>\n <Typography.Text>{title}</Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n {title} modules is {count}\n </Typography.Text>\n {isB ? null : (\n <Typography.Text style={{ color: 'inherit' }}>\n Percent is {formatPercent(diff.percent)}\n </Typography.Text>\n )}\n </Space>\n }\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 10, fontWeight: 400 }}\n >\n {count}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n </div>\n );\n },\n children: [\n {\n title: 'Source Size',\n ...getSizeColumnPropsForModuleRow(key, 'sourceSize', sortByChanged),\n },\n {\n title: 'Parsed Size',\n defaultSortOrder: isB ? undefined : 'descend',\n ...getSizeColumnPropsForModuleRow(key, 'parsedSize', sortByChanged),\n },\n ],\n filterSearch: true,\n filters: [\n {\n text: 'Show Changed',\n value: UpdateType.NotChanged,\n },\n {\n text: 'Show All',\n value: 'All',\n },\n ],\n onFilter(v, r) {\n if (v === UpdateType.NotChanged) {\n setSortByChanged(true);\n } else {\n setSortByChanged(false);\n }\n return v === UpdateType.NotChanged ? getUpdateType(r) !== v : true;\n },\n };\n};\n\nexport const ModuleRowForAsset: React.FC<\n { data: BundleDiffTableAssetsData } & Pick<\n BundleDiffComponentCardProps,\n 'baseline' | 'current'\n >\n> = ({ data, baseline, current }) => {\n const { modules: bTotalModules } = baseline.moduleGraph;\n const { modules: cTotalModules } = current.moduleGraph;\n const { chunks: bToTalChunks } = baseline.chunkGraph;\n const { chunks: cToTalChunks } = current.chunkGraph;\n const bRoot = baseline.root;\n const cRoot = current.root;\n\n const [searchText, setSearchText] = useState('');\n const searchInput = useRef<InputRef>(null);\n\n const handleSearch = (\n selectedKeys: string[],\n confirm: (param?: FilterConfirmProps) => void,\n ) => {\n confirm();\n setSearchText(selectedKeys[0]);\n };\n\n const handleReset = (clearFilters: () => void) => {\n clearFilters();\n setSearchText('');\n };\n\n const isBaseline = '__is_baseline__' as const;\n\n const bModules = useMemo(\n () =>\n data.baseline\n ? Graph.getModulesByAsset(data.baseline, bToTalChunks, bTotalModules)\n .map((e) => ({\n ...e,\n [isBaseline]: true,\n }))\n .filter((cModule) => !cModule.concatenationModules?.length)\n : [],\n [data, baseline],\n );\n const cModules = useMemo(\n () =>\n data.current\n ? Graph.getModulesByAsset(data.current, cToTalChunks, cTotalModules)\n .map((e) => ({\n ...e,\n [isBaseline]: false,\n }))\n .filter((cModule) => !cModule.concatenationModules?.length)\n : [],\n [data, current],\n );\n\n const getPathInfo = (r: BundleDiffTableModulesData) =>\n beautifyModulePath(r.path, r.__is_baseline__ ? bRoot : cRoot);\n\n const dataSource: BundleDiffTableModulesData[] = useMemo(() => {\n const mods = [...bModules, ...cModules];\n const map = new Map<string, BundleDiffTableModulesData>();\n\n // group by module.path\n mods.forEach((mod) => {\n const modPath =\n mod.webpackId?.replace(ModuleHashPattern, '') ||\n mod.path?.replace(ModuleHashPattern, '');\n let t: BundleDiffTableModulesData = map.get(modPath)!;\n\n if (!t) {\n t = { path: modPath };\n }\n\n if (mod[isBaseline]) {\n t.baseline = mod;\n } else {\n t.current = mod;\n }\n map.set(modPath, t);\n });\n\n return [...map.values()];\n }, [bModules, cModules, searchText]);\n\n const { bModulesCount, cModulesCount, totalCount } = useMemo(() => {\n const fileNameFilter = (e: BundleDiffTableModulesData) =>\n getPathInfo(e).alias.indexOf(searchText) > -1;\n\n let b = dataSource.filter((e) => e.baseline);\n let c = dataSource.filter((e) => e.current);\n let totalCount = dataSource.length;\n\n if (searchText) {\n b = b.filter(fileNameFilter);\n c = c.filter(fileNameFilter);\n totalCount = dataSource.filter(fileNameFilter).length;\n }\n\n return {\n bModulesCount: b.length,\n cModulesCount: c.length,\n totalCount,\n };\n }, [dataSource, searchText]);\n\n return (\n <Table\n dataSource={dataSource}\n rowKey={(e) => e.path}\n size=\"small\"\n pagination={{\n size: 'small',\n }}\n bordered\n scroll={{ x: 1500 }}\n columns={[\n {\n fixed: 'left',\n title: () => {\n return (\n <div>\n <Typography.Text>\n Modules of {`\"${data.alias}\"`}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n filtered modules: {totalCount}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n total modules: {dataSource.length}\n </Typography.Text>\n </Space>\n }\n >\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 10, fontWeight: 400, marginRight: 4 }}\n >\n {totalCount}/{dataSource.length}\n </Typography.Text>\n <InfoCircleOutlined />\n </Tooltip>\n </div>\n );\n },\n filterDropdown({\n setSelectedKeys,\n selectedKeys,\n confirm,\n clearFilters,\n }) {\n return (\n <div\n style={{ padding: 8 }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <Input\n ref={searchInput}\n placeholder={`Search by file name`}\n value={selectedKeys[0]}\n onChange={(e) =>\n setSelectedKeys(e.target.value ? [e.target.value] : [])\n }\n onPressEnter={() =>\n handleSearch(selectedKeys as string[], confirm)\n }\n style={{ marginBottom: 8, display: 'block' }}\n />\n <Space>\n <Button\n type=\"primary\"\n onClick={() =>\n handleSearch(selectedKeys as string[], confirm)\n }\n icon={<SearchOutlined />}\n size=\"small\"\n style={{ width: 90 }}\n >\n Search\n </Button>\n <Button\n onClick={() => {\n clearFilters && handleReset(clearFilters);\n setSelectedKeys([]);\n handleSearch([], confirm);\n }}\n size=\"small\"\n style={{ width: 90 }}\n >\n Reset\n </Button>\n </Space>\n </div>\n );\n },\n filterSearch: true,\n filterIcon: (filtered) => (\n <Space>\n <Typography.Text\n type={searchText ? undefined : 'secondary'}\n style={{ fontWeight: 400 }}\n >\n {searchText || 'Search by file name'}\n </Typography.Text>\n <SearchOutlined\n style={{ color: filtered ? Color.Blue : undefined }}\n />\n </Space>\n ),\n onFilterDropdownOpenChange: (visible) => {\n if (visible) {\n setTimeout(() => searchInput.current?.focus(), 100);\n }\n },\n onFilter(v, r) {\n return getPathInfo(r).alias.indexOf(v as string) > -1;\n },\n render: (_v, r) => {\n const { alias, inNodeModules } = getPathInfo(r);\n return (\n <Space>\n <Tooltip title={r.path}>\n <Typography.Text copyable={{ text: r.path }}>\n {alias}\n </Typography.Text>\n </Tooltip>\n {inNodeModules ? <Tag color=\"warning\">node_modules</Tag> : null}\n <FileUpdateTypeTag type={getUpdateType(r)} />\n </Space>\n );\n },\n },\n getTargetColumnPropsForModuleRow(\n 'current',\n bModulesCount,\n cModulesCount,\n ),\n getTargetColumnPropsForModuleRow(\n 'baseline',\n bModulesCount,\n cModulesCount,\n ),\n {\n title: 'Actions',\n width: 200,\n render: (_v, r) => {\n return (\n <Space direction=\"vertical\" style={{ maxWidth: 170 }}>\n <ViewChanges\n text=\"View Changes\"\n file={r.path}\n data={[\n {\n baseline:\n baseline.moduleCodeMap[r.baseline?.id as number]\n ?.source,\n current:\n current.moduleCodeMap[r.current?.id as number]?.source,\n group: 'Source',\n },\n {\n baseline:\n baseline.moduleCodeMap[r.baseline?.id as number]\n ?.transformed,\n current:\n current.moduleCodeMap[r.current?.id as number]\n ?.transformed,\n group: 'Transformed Source',\n },\n {\n baseline:\n baseline.moduleCodeMap[r.baseline?.id as number]\n ?.parsedSource,\n current:\n current.moduleCodeMap[r.current?.id as number]\n ?.parsedSource,\n group: 'Parsed Source',\n },\n ]}\n />\n </Space>\n );\n },\n },\n ]}\n />\n );\n};\n"],"names":["ModuleHashPattern","getSizeColumnPropsForModuleRow","key","sizeKey","sortByChanged","sortByChangedFn","a","b","sorterFn","_v","r","size","Space","Typography","formatSize","formatDiffSize","Client","getTargetColumnPropsForModuleRow","bModulesCount","cModulesCount","setSortByChanged","useState","isB","count","title","upperFirst","diff","Graph","Divider","Tooltip","formatPercent","InfoCircleOutlined","undefined","UpdateType","v","getUpdateType","ModuleRowForAsset","data","baseline","current","bTotalModules","cTotalModules","bToTalChunks","cToTalChunks","bRoot","cRoot","searchText","setSearchText","searchInput","useRef","handleSearch","selectedKeys","confirm","handleReset","clearFilters","isBaseline","bModules","useMemo","e","cModule","cModules","getPathInfo","beautifyModulePath","dataSource","mods","map","Map","mod","modPath","t","totalCount","fileNameFilter","c","Table","setSelectedKeys","Input","Button","SearchOutlined","filtered","Color","visible","setTimeout","alias","inNodeModules","Tag","FileUpdateTypeTag","ViewChanges"],"mappings":";;;;;;;;;;;;;AAsCO,MAAMA,oBAAoB;AAE1B,MAAMC,iCAAiC,CAC5CC,KACAC,SACAC;IAEA,MAAMC,kBAAkC,CAACC,GAAGC,IACzCD,AAAAA,CAAAA,EAAE,OAAO,EAAE,IAAI,CAACH,QAAQ,IAAI,KAC5BG,CAAAA,EAAE,QAAQ,EAAE,IAAI,CAACH,QAAQ,IAAI,KAC7BI,CAAAA,EAAE,OAAO,EAAE,IAAI,CAACJ,QAAQ,IAAI,KAC5BI,CAAAA,EAAE,QAAQ,EAAE,IAAI,CAACJ,QAAQ,IAAI;IAEhC,MAAMK,WAA2BJ,gBAC7B,CAACE,GAAGC,IAAMF,gBAAgBC,GAAGC,KAC7B,CAACD,GAAGC,IAAOD,AAAAA,CAAAA,CAAC,CAACJ,IAAI,EAAE,IAAI,CAACC,QAAQ,IAAI,KAAMI,CAAAA,CAAC,CAACL,IAAI,EAAE,IAAI,CAACC,QAAQ,IAAI;IAEvE,OAAO;QACL,OAAO;QACP,QAAQ,CAACG,GAAGC,IAAMC,SAASF,GAAGC;QAC9B,QAAQ,CAACE,IAAIC;YACX,IAAI,CAACA,CAAC,CAACR,IAAI,EAAE,OAAO;YACpB,MAAMS,OAAOD,CAAC,CAACR,IAAI,CAAE,IAAI,CAACC,QAAQ;YAClC,OAAO,WAAP,GACE,KAACS,OAAKA;;kCACJ,IAACC,WAAW,IAAI;kCAAEC,WAAWH;;oBACpB,cAART,MACGa,eACEL,EAAE,QAAQ,EAAE,IAAI,CAACP,QAAQ,IAAI,GAC7BQ,MACCD,AAAAA,CAAAA,EAAE,QAAQ,EAAE,IAAI,CAACP,QAAQ,IAAI,KAAKQ,OAC/BK,OAAO,uBAAuB,CAAC,IAAI,GACnCA,OAAO,uBAAuB,CAAC,EAAE,IAEvC;;;QAGV;IACF;AACF;AAEO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,WAAP,GACE,IAACE,OAAKA;wBAAC,WAAU;wBAAW,OAAO;4BAAE,UAAU;wBAAI;kCACjD,kBAAC0E,aAAWA;4BACV,MAAK;4BACL,MAAM5E,EAAE,IAAI;4BACZ,MAAM;gCACJ;oCACE,UACE4B,SAAS,aAAa,CAAC5B,EAAE,QAAQ,EAAE,GAAa,EAC5C;oCACN,SACE6B,QAAQ,aAAa,CAAC7B,EAAE,OAAO,EAAE,GAAa,EAAE;oCAClD,OAAO;gCACT;gCACA;oCACE,UACE4B,SAAS,aAAa,CAAC5B,EAAE,QAAQ,EAAE,GAAa,EAC5C;oCACN,SACE6B,QAAQ,aAAa,CAAC7B,EAAE,OAAO,EAAE,GAAa,EAC1C;oCACN,OAAO;gCACT;gCACA;oCACE,UACE4B,SAAS,aAAa,CAAC5B,EAAE,QAAQ,EAAE,GAAa,EAC5C;oCACN,SACE6B,QAAQ,aAAa,CAAC7B,EAAE,OAAO,EAAE,GAAa,EAC1C;oCACN,OAAO;gCACT;6BACD;;;YAKX;SACD;;AAGP"}
1
+ {"version":3,"file":"pages/Resources/BundleDiff/DiffContainer/row.mjs","sources":["../../../../../src/pages/Resources/BundleDiff/DiffContainer/row.tsx"],"sourcesContent":["import { InfoCircleOutlined, SearchOutlined } from '@ant-design/icons';\nimport {\n Button,\n Divider,\n Input,\n InputRef,\n Space,\n Table,\n Tag,\n Tooltip,\n Typography,\n} from 'antd';\nimport {\n ColumnGroupType,\n ColumnType,\n FilterConfirmProps,\n} from 'antd/es/table/interface';\nimport { upperFirst } from 'es-toolkit/compat';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { Client } from '@rsdoctor/types';\nimport { CompareFn } from 'antd/lib/table/interface';\nimport { Color } from '../../../../constants';\nimport {\n beautifyModulePath,\n formatPercent,\n formatSize,\n} from '../../../../utils';\nimport { ViewChanges } from './changes';\nimport { FileUpdateTypeTag, getUpdateType } from './modules';\nimport {\n BundleDiffComponentCardProps,\n BundleDiffTableAssetsData,\n BundleDiffTableModulesData,\n} from './types';\nimport { UpdateType } from './constants';\nimport { formatDiffSize } from './utils';\nimport { Graph } from '@rsdoctor/utils/common';\n\nexport const ModuleHashPattern = /[a-fA-F0-9]{20,}/;\n\nexport const getSizeColumnPropsForModuleRow = (\n key: 'baseline' | 'current',\n sizeKey: 'parsedSize' | 'sourceSize',\n sortByChanged?: boolean,\n): ColumnType<BundleDiffTableModulesData> => {\n const sortByChangedFn: CompareFn<any> = (a, b) =>\n (a.current?.size[sizeKey] || 0) -\n (a.baseline?.size[sizeKey] || 0) -\n (b.current?.size[sizeKey] || 0) +\n (b.baseline?.size[sizeKey] || 0);\n\n const sorterFn: CompareFn<any> = sortByChanged\n ? (a, b) => sortByChangedFn(a, b)\n : (a, b) => (a[key]?.size[sizeKey] || 0) - (b[key]?.size[sizeKey] || 0);\n\n return {\n width: 200,\n sorter: (a, b) => sorterFn(a, b),\n render: (_v, r) => {\n if (!r[key]) return '-';\n const size = r[key]!.size[sizeKey];\n return (\n <Space>\n <Typography.Text>{formatSize(size)}</Typography.Text>\n {key === 'current'\n ? formatDiffSize(\n r.baseline?.size[sizeKey] || 0,\n size,\n (r.baseline?.size[sizeKey] || 0) > size\n ? Client.RsdoctorClientDiffState.Down\n : Client.RsdoctorClientDiffState.Up,\n )\n : null}\n </Space>\n );\n },\n };\n};\n\nexport const getTargetColumnPropsForModuleRow = (\n key: 'baseline' | 'current',\n bModulesCount: number,\n cModulesCount: number,\n): ColumnGroupType<BundleDiffTableModulesData> => {\n const [sortByChanged, setSortByChanged] = useState(false);\n\n const isB = key === 'baseline';\n return {\n title: () => {\n const count = isB ? bModulesCount : cModulesCount;\n const title = upperFirst(key);\n const diff = Graph.diffSize(bModulesCount, cModulesCount);\n return (\n <div>\n <Typography.Text>{title}</Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n {title} modules is {count}\n </Typography.Text>\n {isB ? null : (\n <Typography.Text style={{ color: 'inherit' }}>\n Percent is {formatPercent(diff.percent)}\n </Typography.Text>\n )}\n </Space>\n }\n >\n <Space>\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 10, fontWeight: 400 }}\n >\n {count}\n </Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n </div>\n );\n },\n children: [\n {\n title: 'Source Size',\n ...getSizeColumnPropsForModuleRow(key, 'sourceSize', sortByChanged),\n },\n {\n title: 'Parsed Size',\n defaultSortOrder: isB ? undefined : 'descend',\n ...getSizeColumnPropsForModuleRow(key, 'parsedSize', sortByChanged),\n },\n ],\n filterSearch: true,\n filters: [\n {\n text: 'Show Changed',\n value: UpdateType.NotChanged,\n },\n {\n text: 'Show All',\n value: 'All',\n },\n ],\n onFilter(v, r) {\n if (v === UpdateType.NotChanged) {\n setSortByChanged(true);\n } else {\n setSortByChanged(false);\n }\n return v === UpdateType.NotChanged ? getUpdateType(r) !== v : true;\n },\n };\n};\n\nexport const ModuleRowForAsset: React.FC<\n { data: BundleDiffTableAssetsData } & Pick<\n BundleDiffComponentCardProps,\n 'baseline' | 'current'\n >\n> = ({ data, baseline, current }) => {\n const { modules: bTotalModules } = baseline.moduleGraph;\n const { modules: cTotalModules } = current.moduleGraph;\n const { chunks: bToTalChunks } = baseline.chunkGraph;\n const { chunks: cToTalChunks } = current.chunkGraph;\n const bRoot = baseline.root;\n const cRoot = current.root;\n\n const [searchText, setSearchText] = useState('');\n const searchInput = useRef<InputRef>(null);\n\n const handleSearch = (\n selectedKeys: string[],\n confirm: (param?: FilterConfirmProps) => void,\n ) => {\n confirm();\n setSearchText(selectedKeys[0]);\n };\n\n const handleReset = (clearFilters: () => void) => {\n clearFilters();\n setSearchText('');\n };\n\n const isBaseline = '__is_baseline__' as const;\n\n const bModules = useMemo(\n () =>\n data.baseline\n ? Graph.getModulesByAsset(data.baseline, bToTalChunks, bTotalModules)\n .map((e) => ({\n ...e,\n [isBaseline]: true,\n }))\n .filter((cModule) => !cModule.concatenationModules?.length)\n : [],\n [data, baseline],\n );\n const cModules = useMemo(\n () =>\n data.current\n ? Graph.getModulesByAsset(data.current, cToTalChunks, cTotalModules)\n .map((e) => ({\n ...e,\n [isBaseline]: false,\n }))\n .filter((cModule) => !cModule.concatenationModules?.length)\n : [],\n [data, current],\n );\n\n const getPathInfo = (r: BundleDiffTableModulesData) =>\n beautifyModulePath(r.path, r.__is_baseline__ ? bRoot : cRoot);\n\n const dataSource: BundleDiffTableModulesData[] = useMemo(() => {\n const mods = [...bModules, ...cModules];\n const map = new Map<string, BundleDiffTableModulesData>();\n\n // group by module.path\n mods.forEach((mod) => {\n const modPath =\n mod.webpackId?.replace(ModuleHashPattern, '') ||\n mod.path?.replace(ModuleHashPattern, '');\n let t: BundleDiffTableModulesData = map.get(modPath)!;\n\n if (!t) {\n t = { path: modPath };\n }\n\n if (mod[isBaseline]) {\n t.baseline = mod;\n } else {\n t.current = mod;\n }\n map.set(modPath, t);\n });\n\n return [...map.values()];\n }, [bModules, cModules, searchText]);\n\n const { bModulesCount, cModulesCount, totalCount } = useMemo(() => {\n const fileNameFilter = (e: BundleDiffTableModulesData) =>\n getPathInfo(e).alias.indexOf(searchText) > -1;\n\n let b = dataSource.filter((e) => e.baseline);\n let c = dataSource.filter((e) => e.current);\n let totalCount = dataSource.length;\n\n if (searchText) {\n b = b.filter(fileNameFilter);\n c = c.filter(fileNameFilter);\n totalCount = dataSource.filter(fileNameFilter).length;\n }\n\n return {\n bModulesCount: b.length,\n cModulesCount: c.length,\n totalCount,\n };\n }, [dataSource, searchText]);\n\n return (\n <Table\n dataSource={dataSource}\n rowKey={(e) => e.path}\n size=\"small\"\n pagination={{\n size: 'small',\n }}\n bordered\n scroll={{ x: 1500 }}\n columns={[\n {\n fixed: 'left',\n title: () => {\n return (\n <div>\n <Typography.Text>\n Modules of {`\"${data.alias}\"`}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={\n <Space direction=\"vertical\">\n <Typography.Text style={{ color: 'inherit' }}>\n filtered modules: {totalCount}\n </Typography.Text>\n <Typography.Text style={{ color: 'inherit' }}>\n total modules: {dataSource.length}\n </Typography.Text>\n </Space>\n }\n >\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 10, fontWeight: 400, marginRight: 4 }}\n >\n {totalCount}/{dataSource.length}\n </Typography.Text>\n <InfoCircleOutlined />\n </Tooltip>\n </div>\n );\n },\n filterDropdown({\n setSelectedKeys,\n selectedKeys,\n confirm,\n clearFilters,\n }) {\n return (\n <div\n style={{ padding: 8 }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <Input\n ref={searchInput}\n placeholder={`Search by file name`}\n value={selectedKeys[0]}\n onChange={(e) =>\n setSelectedKeys(e.target.value ? [e.target.value] : [])\n }\n onPressEnter={() =>\n handleSearch(selectedKeys as string[], confirm)\n }\n style={{ marginBottom: 8, display: 'block' }}\n />\n <Space>\n <Button\n type=\"primary\"\n onClick={() =>\n handleSearch(selectedKeys as string[], confirm)\n }\n icon={<SearchOutlined />}\n size=\"small\"\n style={{ width: 90 }}\n >\n Search\n </Button>\n <Button\n onClick={() => {\n if (clearFilters) {\n handleReset(clearFilters);\n }\n setSelectedKeys([]);\n handleSearch([], confirm);\n }}\n size=\"small\"\n style={{ width: 90 }}\n >\n Reset\n </Button>\n </Space>\n </div>\n );\n },\n filterSearch: true,\n filterIcon: (filtered) => (\n <Space>\n <Typography.Text\n type={searchText ? undefined : 'secondary'}\n style={{ fontWeight: 400 }}\n >\n {searchText || 'Search by file name'}\n </Typography.Text>\n <SearchOutlined\n style={{ color: filtered ? Color.Blue : undefined }}\n />\n </Space>\n ),\n onFilterDropdownOpenChange: (visible) => {\n if (visible) {\n setTimeout(() => searchInput.current?.focus(), 100);\n }\n },\n onFilter(v, r) {\n return getPathInfo(r).alias.indexOf(v as string) > -1;\n },\n render: (_v, r) => {\n const { alias, inNodeModules } = getPathInfo(r);\n return (\n <Space>\n <Tooltip title={r.path}>\n <Typography.Text copyable={{ text: r.path }}>\n {alias}\n </Typography.Text>\n </Tooltip>\n {inNodeModules ? <Tag color=\"warning\">node_modules</Tag> : null}\n <FileUpdateTypeTag type={getUpdateType(r)} />\n </Space>\n );\n },\n },\n getTargetColumnPropsForModuleRow(\n 'current',\n bModulesCount,\n cModulesCount,\n ),\n getTargetColumnPropsForModuleRow(\n 'baseline',\n bModulesCount,\n cModulesCount,\n ),\n {\n title: 'Actions',\n width: 200,\n render: (_v, r) => {\n return (\n <Space direction=\"vertical\" style={{ maxWidth: 170 }}>\n <ViewChanges\n text=\"View Changes\"\n file={r.path}\n data={[\n {\n baseline:\n baseline.moduleCodeMap[r.baseline?.id as number]\n ?.source,\n current:\n current.moduleCodeMap[r.current?.id as number]?.source,\n group: 'Source',\n },\n {\n baseline:\n baseline.moduleCodeMap[r.baseline?.id as number]\n ?.transformed,\n current:\n current.moduleCodeMap[r.current?.id as number]\n ?.transformed,\n group: 'Transformed Source',\n },\n {\n baseline:\n baseline.moduleCodeMap[r.baseline?.id as number]\n ?.parsedSource,\n current:\n current.moduleCodeMap[r.current?.id as number]\n ?.parsedSource,\n group: 'Parsed Source',\n },\n ]}\n />\n </Space>\n );\n },\n },\n ]}\n />\n );\n};\n"],"names":["ModuleHashPattern","getSizeColumnPropsForModuleRow","key","sizeKey","sortByChanged","sortByChangedFn","a","b","sorterFn","_v","r","size","Space","Typography","formatSize","formatDiffSize","Client","getTargetColumnPropsForModuleRow","bModulesCount","cModulesCount","setSortByChanged","useState","isB","count","title","upperFirst","diff","Graph","Divider","Tooltip","formatPercent","InfoCircleOutlined","undefined","UpdateType","v","getUpdateType","ModuleRowForAsset","data","baseline","current","bTotalModules","cTotalModules","bToTalChunks","cToTalChunks","bRoot","cRoot","searchText","setSearchText","searchInput","useRef","handleSearch","selectedKeys","confirm","handleReset","clearFilters","isBaseline","bModules","useMemo","e","cModule","cModules","getPathInfo","beautifyModulePath","dataSource","mods","map","Map","mod","modPath","t","totalCount","fileNameFilter","c","Table","setSelectedKeys","Input","Button","Search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WAAU;wBAAW,OAAO;4BAAE,UAAU;wBAAI;kCACjD,kBAAC0E,aAAWA;4BACV,MAAK;4BACL,MAAM5E,EAAE,IAAI;4BACZ,MAAM;gCACJ;oCACE,UACE4B,SAAS,aAAa,CAAC5B,EAAE,QAAQ,EAAE,GAAa,EAC5C;oCACN,SACE6B,QAAQ,aAAa,CAAC7B,EAAE,OAAO,EAAE,GAAa,EAAE;oCAClD,OAAO;gCACT;gCACA;oCACE,UACE4B,SAAS,aAAa,CAAC5B,EAAE,QAAQ,EAAE,GAAa,EAC5C;oCACN,SACE6B,QAAQ,aAAa,CAAC7B,EAAE,OAAO,EAAE,GAAa,EAC1C;oCACN,OAAO;gCACT;gCACA;oCACE,UACE4B,SAAS,aAAa,CAAC5B,EAAE,QAAQ,EAAE,GAAa,EAC5C;oCACN,SACE6B,QAAQ,aAAa,CAAC7B,EAAE,OAAO,EAAE,GAAa,EAC1C;oCACN,OAAO;gCACT;6BACD;;;YAKX;SACD;;AAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.0-rc.1_@emnapi+core@1.8.1_@emnapi+runtime@1.8.1_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/TreeShaking/index.scss","webpack://./src/pages/TreeShaking/index.scss"],"names":[],"mappings":"AAAA;ECCE,WAAW;EACX,YAAY;AACd;;ADH0C;ECMxC,sBAAsB;EACtB,aAAa;AACf;;ADR0G;ECWxG,mBAAmB;EACnB,0BAA0B;AAC5B;;ADb8M;ECgB5M,mBAAmB;EACnB,0BAA0B;AAC5B;;ADlB6T;ECqB3T,aAAa;AACf;;ADtBqX;ECyBnX,YAAY;EACZ,cAAc;AAChB;;AD3Bsb;EC8Bpb,YAAY;EACZ,aAAa;AACf;;ADhCuf;ECmCrf,UAAU;AACZ;;ADpCwjB;ECuCtjB,WAAW;EACX,yBAAyB;AAC3B;;ADzC8rB;EC4C5rB,UAAU;AACZ;;AD7CqwB;ECgDnwB,YAAY;AACd;;ADjD21B;ECoDz1B,mBAAmB;AACrB;;ADrDi9B;ECwD/8B,+BAA+B;AACjC;;ADzD4oC;EC4D1oC,4BAA4B;AAC9B;;AD7D60C;ECgE30C,0BAA0B;AAC5B;;ADjE2gD;ECoEzgD,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;AACf;;ADvEunD;EC0ErnD,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;AAClB;;AD7EuwD;ECgFrwD,sBAAsB;EACtB,WAAW;AACb;;ADlFm1D;ECqFj1D,kBAAkB;EAClB,iBAAiB;AACnB;;ADvFq8D;EC0Fn8D,aAAa;AACf","sourcesContent":[".tree-shaking-page{width:100%;height:100%}.tree-shaking-page .ant-card{display:flex;flex-direction:column}.tree-shaking-page .tree-shaking-statement-side-effect{text-decoration:underline;background:#711f1c}.tree-shaking-page .tree-shaking-statement-declaration-identifier{text-decoration:underline;background:#2c87ec}.tree-shaking-page .tree-shaking-files-box{height:700px}.tree-shaking-page .tree-shaking-files{overflow:auto;height:100%}.tree-shaking-page .tree-shaking-editor{flex-grow:1;height:700px}.tree-shaking-page .tree-shaking-editor .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-files-box,.tree-shaking-page .tree-shaking-editor .ant-card-body{width:auto;height:calc(100% - 48px)}.tree-shaking-page .tree-shaking-export-table .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider{margin:24px}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td{border-bottom:none}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th{border-top:1px solid rgba(5,5,5,.06)}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:first-child{border-start-start-radius:0}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:last-child{border-start-end-radius:0}.tree-shaking-page .tree-shaking-side-effect-list{display:flex;flex-direction:column;align-items:flex-start}.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol{margin:4px 0 10px 0;padding-left:4px}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol pre{margin:2px 0}",".tree-shaking-page {\n width: 100%;\n height: 100%;\n}\n\n.tree-shaking-page .ant-card {\n flex-direction: column;\n display: flex;\n}\n\n.tree-shaking-page .tree-shaking-statement-side-effect {\n background: #711f1c;\n text-decoration: underline;\n}\n\n.tree-shaking-page .tree-shaking-statement-declaration-identifier {\n background: #2c87ec;\n text-decoration: underline;\n}\n\n.tree-shaking-page .tree-shaking-files-box {\n height: 700px;\n}\n\n.tree-shaking-page .tree-shaking-files {\n height: 100%;\n overflow: auto;\n}\n\n.tree-shaking-page .tree-shaking-editor {\n flex-grow: 1;\n height: 700px;\n}\n\n.tree-shaking-page .tree-shaking-editor .ant-card-body {\n padding: 0;\n}\n\n.tree-shaking-page .tree-shaking-files-box, .tree-shaking-page .tree-shaking-editor .ant-card-body {\n width: auto;\n height: calc(100% - 48px);\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-card-body {\n padding: 0;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider {\n margin: 24px;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td {\n border-bottom: none;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th {\n border-top: 1px solid #0505050f;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:first-child {\n border-start-start-radius: 0;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:last-child {\n border-start-end-radius: 0;\n}\n\n.tree-shaking-page .tree-shaking-side-effect-list {\n flex-direction: column;\n align-items: flex-start;\n display: flex;\n}\n\n.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.monaco-hover .markdown-hover.hover-row hr {\n background-color: gray;\n margin: 2px;\n}\n\n.monaco-hover .markdown-hover.hover-row div[data-code=\"tree-shaking-hover\"] ol {\n margin: 4px 0 10px;\n padding-left: 4px;\n}\n\n.monaco-hover .markdown-hover.hover-row div[data-code=\"tree-shaking-hover\"] ol pre {\n margin: 2px 0;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/TreeShaking/index.scss","webpack://./src/pages/TreeShaking/index.scss"],"names":[],"mappings":"AAAA;ECCE,WAAW;EACX,YAAY;AACd;;ADH0C;ECMxC,sBAAsB;EACtB,aAAa;AACf;;ADR0G;ECWxG,mBAAmB;EACnB,0BAA0B;AAC5B;;ADb8M;ECgB5M,mBAAmB;EACnB,0BAA0B;AAC5B;;ADlB6T;ECqB3T,aAAa;AACf;;ADtBqX;ECyBnX,YAAY;EACZ,cAAc;AAChB;;AD3Bsb;EC8Bpb,YAAY;EACZ,aAAa;AACf;;ADhCuf;ECmCrf,UAAU;AACZ;;ADpCwjB;ECuCtjB,WAAW;EACX,yBAAyB;AAC3B;;ADzC8rB;EC4C5rB,UAAU;AACZ;;AD7CqwB;ECgDnwB,YAAY;AACd;;ADjD21B;ECoDz1B,mBAAmB;AACrB;;ADrDi9B;ECwD/8B,+BAA+B;AACjC;;ADzD4oC;EC4D1oC,4BAA4B;AAC9B;;AD7D60C;ECgE30C,0BAA0B;AAC5B;;ADjE2gD;ECoEzgD,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;AACf;;ADvEunD;EC0ErnD,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;AAClB;;AD7EuwD;ECgFrwD,sBAAsB;EACtB,WAAW;AACb;;ADlFm1D;ECqFj1D,kBAAkB;EAClB,iBAAiB;AACnB;;ADvFq8D;EC0Fn8D,aAAa;AACf","sourcesContent":[".tree-shaking-page{width:100%;height:100%}.tree-shaking-page .ant-card{display:flex;flex-direction:column}.tree-shaking-page .tree-shaking-statement-side-effect{text-decoration:underline;background:#711f1c}.tree-shaking-page .tree-shaking-statement-declaration-identifier{text-decoration:underline;background:#2c87ec}.tree-shaking-page .tree-shaking-files-box{height:700px}.tree-shaking-page .tree-shaking-files{overflow:auto;height:100%}.tree-shaking-page .tree-shaking-editor{flex-grow:1;height:700px}.tree-shaking-page .tree-shaking-editor .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-files-box,.tree-shaking-page .tree-shaking-editor .ant-card-body{width:auto;height:calc(100% - 48px)}.tree-shaking-page .tree-shaking-export-table .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider{margin:24px}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td{border-bottom:none}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th{border-top:1px solid rgba(5,5,5,.06)}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:first-child{border-start-start-radius:0}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:last-child{border-start-end-radius:0}.tree-shaking-page .tree-shaking-side-effect-list{display:flex;flex-direction:column;align-items:flex-start}.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol{margin:4px 0 10px 0;padding-left:4px}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol pre{margin:2px 0}",".tree-shaking-page {\n width: 100%;\n height: 100%;\n}\n\n.tree-shaking-page .ant-card {\n flex-direction: column;\n display: flex;\n}\n\n.tree-shaking-page .tree-shaking-statement-side-effect {\n background: #711f1c;\n text-decoration: underline;\n}\n\n.tree-shaking-page .tree-shaking-statement-declaration-identifier {\n background: #2c87ec;\n text-decoration: underline;\n}\n\n.tree-shaking-page .tree-shaking-files-box {\n height: 700px;\n}\n\n.tree-shaking-page .tree-shaking-files {\n height: 100%;\n overflow: auto;\n}\n\n.tree-shaking-page .tree-shaking-editor {\n flex-grow: 1;\n height: 700px;\n}\n\n.tree-shaking-page .tree-shaking-editor .ant-card-body {\n padding: 0;\n}\n\n.tree-shaking-page .tree-shaking-files-box, .tree-shaking-page .tree-shaking-editor .ant-card-body {\n width: auto;\n height: calc(100% - 48px);\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-card-body {\n padding: 0;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider {\n margin: 24px;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td {\n border-bottom: none;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th {\n border-top: 1px solid #0505050f;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:first-child {\n border-start-start-radius: 0;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:last-child {\n border-start-end-radius: 0;\n}\n\n.tree-shaking-page .tree-shaking-side-effect-list {\n flex-direction: column;\n align-items: flex-start;\n display: flex;\n}\n\n.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.monaco-hover .markdown-hover.hover-row hr {\n background-color: gray;\n margin: 2px;\n}\n\n.monaco-hover .markdown-hover.hover-row div[data-code=\"tree-shaking-hover\"] ol {\n margin: 4px 0 10px;\n padding-left: 4px;\n}\n\n.monaco-hover .markdown-hover.hover-row div[data-code=\"tree-shaking-hover\"] ol pre {\n margin: 2px 0;\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.0-rc.1_@emnapi+core@1.8.1_@emnapi+runtime@1.8.1_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.1_@rsbuild+core@2.0.0-rc.1_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/WebpackPlugins/index.scss","webpack://./src/pages/WebpackPlugins/index.scss"],"names":[],"mappings":"AAAA;ECCE,YAAY;AACd","sourcesContent":[".plugin-select .ant-select-selector{width:300px}",".plugin-select .ant-select-selector {\n width: 300px;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/WebpackPlugins/index.scss","webpack://./src/pages/WebpackPlugins/index.scss"],"names":[],"mappings":"AAAA;ECCE,YAAY;AACd","sourcesContent":[".plugin-select .ant-select-selector{width:300px}",".plugin-select .ant-select-selector {\n width: 300px;\n}\n"],"sourceRoot":""}
@@ -18,7 +18,7 @@ async function createDataLoader(manifest) {
18
18
  console.log("[LocalServerDataLoader]");
19
19
  return new LocalServerDataLoader(manifest);
20
20
  }
21
- } catch (error) {
21
+ } catch {
22
22
  console.log('[DataLoader] fallback to RemoteDataLoader');
23
23
  }
24
24
  return new RemoteDataLoader(manifest);
@@ -1 +1 @@
1
- {"version":3,"file":"utils/data/index.mjs","sources":["../../../src/utils/data/index.ts"],"sourcesContent":["import { Constants, Manifest } from '@rsdoctor/types';\nimport { useEffect, useState } from 'react';\nimport { LocalServerDataLoader } from './local';\nimport { RemoteDataLoader } from './remote';\nimport { BaseDataLoader } from './base';\nimport { getAPILoaderModeFromStorage } from '../storage';\nimport { APILoaderMode4Dev } from '../../constants';\nimport { BriefDataLoader } from './brief';\n\nconst loaderTask = new WeakMap<\n Manifest.RsdoctorManifestWithShardingFiles,\n Promise<BaseDataLoader>\n>();\n\nasync function createDataLoader(\n manifest: Manifest.RsdoctorManifestWithShardingFiles,\n) {\n try {\n if (process.env.NODE_ENV === 'development') {\n const mode = getAPILoaderModeFromStorage();\n console.log(`[development]-${mode}`);\n if (mode === APILoaderMode4Dev.Local)\n return new LocalServerDataLoader(manifest);\n if (mode === APILoaderMode4Dev.Remote)\n return new RemoteDataLoader(manifest);\n }\n\n // local server exists\n if (manifest.__LOCAL__SERVER__) {\n console.log(`[LocalServerDataLoader]`);\n return new LocalServerDataLoader(manifest);\n }\n } catch (error) {\n console.log('[DataLoader] fallback to RemoteDataLoader');\n }\n\n return new RemoteDataLoader(manifest);\n}\n\nexport function useDataLoader(\n manifest: Manifest.RsdoctorManifestWithShardingFiles | void,\n) {\n const [loader, setLoader] = useState<BaseDataLoader | void>(undefined);\n\n useEffect(() => {\n if (window[Constants.WINDOW_RSDOCTOR_TAG]) {\n console.log('[brief mode]');\n const loader = new BriefDataLoader({ data: [] } as any);\n setLoader(loader);\n }\n }, []);\n\n useEffect(() => {\n if (!manifest) return;\n\n if (!loaderTask.has(manifest)) {\n const promise = createDataLoader(manifest);\n loaderTask.set(manifest, promise);\n }\n\n const task = loaderTask.get(manifest)!;\n task.then((loader) => {\n setLoader(loader);\n });\n }, [manifest]);\n\n return {\n loader,\n };\n}\n"],"names":["loaderTask","WeakMap","createDataLoader","manifest","process","mode","getAPILoaderModeFromStorage","console","APILoaderMode4Dev","LocalServerDataLoader","RemoteDataLoader","error","useDataLoader","loader","setLoader","useState","undefined","useEffect","window","Constants","BriefDataLoader","promise","task"],"mappings":";;;;;;;AASA,MAAMA,aAAa,IAAIC;AAKvB,eAAeC,iBACbC,QAAoD;IAEpD,IAAI;QACF,IAAIC,AAAyB,kBAAzBA,QAAQ,GAAG,CAAC,QAAQ,EAAoB;YAC1C,MAAMC,OAAOC;YACbC,QAAQ,GAAG,CAAC,CAAC,cAAc,EAAEF,MAAM;YACnC,IAAIA,SAASG,kBAAkB,KAAK,EAClC,OAAO,IAAIC,sBAAsBN;YACnC,IAAIE,SAASG,kBAAkB,MAAM,EACnC,OAAO,IAAIE,iBAAiBP;QAChC;QAGA,IAAIA,SAAS,iBAAiB,EAAE;YAC9BI,QAAQ,GAAG,CAAC;YACZ,OAAO,IAAIE,sBAAsBN;QACnC;IACF,EAAE,OAAOQ,OAAO;QACdJ,QAAQ,GAAG,CAAC;IACd;IAEA,OAAO,IAAIG,iBAAiBP;AAC9B;AAEO,SAASS,cACdT,QAA2D;IAE3D,MAAM,CAACU,QAAQC,UAAU,GAAGC,SAAgCC;IAE5DC,UAAU;QACR,IAAIC,MAAM,CAACC,UAAU,mBAAmB,CAAC,EAAE;YACzCZ,QAAQ,GAAG,CAAC;YACZ,MAAMM,SAAS,IAAIO,gBAAgB;gBAAE,MAAM,EAAE;YAAC;YAC9CN,UAAUD;QACZ;IACF,GAAG,EAAE;IAELI,UAAU;QACR,IAAI,CAACd,UAAU;QAEf,IAAI,CAACH,WAAW,GAAG,CAACG,WAAW;YAC7B,MAAMkB,UAAUnB,iBAAiBC;YACjCH,WAAW,GAAG,CAACG,UAAUkB;QAC3B;QAEA,MAAMC,OAAOtB,WAAW,GAAG,CAACG;QAC5BmB,KAAK,IAAI,CAAC,CAACT;YACTC,UAAUD;QACZ;IACF,GAAG;QAACV;KAAS;IAEb,OAAO;QACLU;IACF;AACF"}
1
+ {"version":3,"file":"utils/data/index.mjs","sources":["../../../src/utils/data/index.ts"],"sourcesContent":["import { Constants, Manifest } from '@rsdoctor/types';\nimport { useEffect, useState } from 'react';\nimport { LocalServerDataLoader } from './local';\nimport { RemoteDataLoader } from './remote';\nimport { BaseDataLoader } from './base';\nimport { getAPILoaderModeFromStorage } from '../storage';\nimport { APILoaderMode4Dev } from '../../constants';\nimport { BriefDataLoader } from './brief';\n\nconst loaderTask = new WeakMap<\n Manifest.RsdoctorManifestWithShardingFiles,\n Promise<BaseDataLoader>\n>();\n\nasync function createDataLoader(\n manifest: Manifest.RsdoctorManifestWithShardingFiles,\n) {\n try {\n if (process.env.NODE_ENV === 'development') {\n const mode = getAPILoaderModeFromStorage();\n console.log(`[development]-${mode}`);\n if (mode === APILoaderMode4Dev.Local)\n return new LocalServerDataLoader(manifest);\n if (mode === APILoaderMode4Dev.Remote)\n return new RemoteDataLoader(manifest);\n }\n\n // local server exists\n if (manifest.__LOCAL__SERVER__) {\n console.log(`[LocalServerDataLoader]`);\n return new LocalServerDataLoader(manifest);\n }\n } catch {\n console.log('[DataLoader] fallback to RemoteDataLoader');\n }\n\n return new RemoteDataLoader(manifest);\n}\n\nexport function useDataLoader(\n manifest: Manifest.RsdoctorManifestWithShardingFiles | void,\n) {\n const [loader, setLoader] = useState<BaseDataLoader | void>(undefined);\n\n useEffect(() => {\n if (window[Constants.WINDOW_RSDOCTOR_TAG]) {\n console.log('[brief mode]');\n const loader = new BriefDataLoader({ data: [] } as any);\n setLoader(loader);\n }\n }, []);\n\n useEffect(() => {\n if (!manifest) return;\n\n if (!loaderTask.has(manifest)) {\n const promise = createDataLoader(manifest);\n loaderTask.set(manifest, promise);\n }\n\n const task = loaderTask.get(manifest)!;\n task.then((loader) => {\n setLoader(loader);\n });\n }, [manifest]);\n\n return {\n loader,\n };\n}\n"],"names":["loaderTask","WeakMap","createDataLoader","manifest","process","mode","getAPILoaderModeFromStorage","console","APILoaderMode4Dev","LocalServerDataLoader","RemoteDataLoader","useDataLoader","loader","setLoader","useState","undefined","useEffect","window","Constants","BriefDataLoader","promise","task"],"mappings":";;;;;;;AASA,MAAMA,aAAa,IAAIC;AAKvB,eAAeC,iBACbC,QAAoD;IAEpD,IAAI;QACF,IAAIC,AAAyB,kBAAzBA,QAAQ,GAAG,CAAC,QAAQ,EAAoB;YAC1C,MAAMC,OAAOC;YACbC,QAAQ,GAAG,CAAC,CAAC,cAAc,EAAEF,MAAM;YACnC,IAAIA,SAASG,kBAAkB,KAAK,EAClC,OAAO,IAAIC,sBAAsBN;YACnC,IAAIE,SAASG,kBAAkB,MAAM,EACnC,OAAO,IAAIE,iBAAiBP;QAChC;QAGA,IAAIA,SAAS,iBAAiB,EAAE;YAC9BI,QAAQ,GAAG,CAAC;YACZ,OAAO,IAAIE,sBAAsBN;QACnC;IACF,EAAE,OAAM;QACNI,QAAQ,GAAG,CAAC;IACd;IAEA,OAAO,IAAIG,iBAAiBP;AAC9B;AAEO,SAASQ,cACdR,QAA2D;IAE3D,MAAM,CAACS,QAAQC,UAAU,GAAGC,SAAgCC;IAE5DC,UAAU;QACR,IAAIC,MAAM,CAACC,UAAU,mBAAmB,CAAC,EAAE;YACzCX,QAAQ,GAAG,CAAC;YACZ,MAAMK,SAAS,IAAIO,gBAAgB;gBAAE,MAAM,EAAE;YAAC;YAC9CN,UAAUD;QACZ;IACF,GAAG,EAAE;IAELI,UAAU;QACR,IAAI,CAACb,UAAU;QAEf,IAAI,CAACH,WAAW,GAAG,CAACG,WAAW;YAC7B,MAAMiB,UAAUlB,iBAAiBC;YACjCH,WAAW,GAAG,CAACG,UAAUiB;QAC3B;QAEA,MAAMC,OAAOrB,WAAW,GAAG,CAACG;QAC5BkB,KAAK,IAAI,CAAC,CAACT;YACTC,UAAUD;QACZ;IACF,GAAG;QAACT;KAAS;IAEb,OAAO;QACLS;IACF;AACF"}
@@ -39,12 +39,12 @@ function flattenDirectory(n, parent, sep = '/', inlinedResourcePathKey, dirTitle
39
39
  ].join('-');
40
40
  parent.children = n.children;
41
41
  parent.title = dirTitle(parent, defaultTitle);
42
- n.children && n.children.forEach((c)=>{
42
+ if (n.children) n.children.forEach((c)=>{
43
43
  flattenDirectory(c, parent, sep, inlinedResourcePathKey, dirTitle);
44
44
  });
45
45
  } else {
46
46
  n.title = dirTitle(n, n[basenameKey]);
47
- n.children && n.children.forEach((c)=>{
47
+ if (n.children) n.children.forEach((c)=>{
48
48
  flattenDirectory(c, n, sep, inlinedResourcePathKey, dirTitle);
49
49
  });
50
50
  }
@@ -95,7 +95,7 @@ function createFileStructures({ files, inlinedResourcePathKey = '__RESOURCEPATH_
95
95
  children: []
96
96
  }).children;
97
97
  res.forEach((e)=>{
98
- e.children && e.children.forEach((item)=>flattenDirectory(item, e, internalSep, inlinedResourcePathKey, dirTitle));
98
+ if (e.children) e.children.forEach((item)=>flattenDirectory(item, e, internalSep, inlinedResourcePathKey, dirTitle));
99
99
  });
100
100
  return res;
101
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils/file.mjs","sources":["../../src/utils/file.tsx"],"sourcesContent":["import { get } from 'es-toolkit/compat';\nimport { Common, SDK } from '@rsdoctor/types';\nimport { message, Space, TreeNodeProps, UploadFile } from 'antd';\nimport { FieldDataNode } from 'rc-tree';\nimport {\n FolderOpenTwoTone,\n FolderTwoTone,\n FileOutlined,\n RightOutlined,\n} from '@ant-design/icons';\nimport { getFileCom } from 'src/components/FileTree';\n\nexport type DataNode = FieldDataNode<{\n key: string | number;\n title?: React.ReactNode | ((data: DataNode) => React.ReactNode);\n}> & { __BASENAME__?: any; __RESOURCEPATH__?: any; children?: DataNode[] };\n\nexport const rootDirname = (file: string, sep = '/'): string | null => {\n const idx = file?.indexOf(sep);\n if (idx === -1) {\n return null;\n }\n if (idx === 0) {\n return sep + (rootDirname(file?.slice(1), sep) || '');\n }\n return file?.slice(0, idx);\n};\n\nexport function mapFileKey(\n arr: DataNode[],\n depth = 2,\n filter: (node: DataNode) => boolean = () => true,\n): DataNode['key'][] {\n let d = 0;\n const res: DataNode['key'][] = [];\n let parent: DataNode[] = arr;\n while (d < depth) {\n parent.filter(filter).forEach((e) => {\n if (!e.isLeaf) {\n res.push(e.key);\n }\n });\n parent = parent.reduce<DataNode[]>(\n (t, e) => t.concat(e.children || []),\n [],\n );\n if (!parent.length) break;\n d++;\n }\n return res;\n}\n\nconst basenameKey = '__BASENAME__';\n\nexport function flattenDirectory(\n n: DataNode,\n parent: DataNode,\n sep = '/',\n inlinedResourcePathKey: keyof DataNode,\n dirTitle = (_dir: DataNode, defaultTitle: string): JSX.Element | string =>\n defaultTitle,\n) {\n if (n.isLeaf) return;\n if (parent.children && parent.children.length === 1) {\n const defaultTitle = [parent[basenameKey], n[basenameKey]].join(sep);\n parent[inlinedResourcePathKey] = n[inlinedResourcePathKey];\n parent[basenameKey] = defaultTitle;\n parent.key = [parent.key, n.key].join('-');\n parent.children = n.children;\n parent.title = dirTitle(parent, defaultTitle);\n\n n.children &&\n n.children.forEach((c) => {\n flattenDirectory(c, parent, sep, inlinedResourcePathKey, dirTitle);\n });\n } else {\n // parent has more than 1 child.\n n.title = dirTitle(n, n[basenameKey]);\n\n n.children &&\n n.children.forEach((c) => {\n flattenDirectory(c, n, sep, inlinedResourcePathKey, dirTitle);\n });\n }\n}\n\nexport function createFileStructures({\n files,\n inlinedResourcePathKey = '__RESOURCEPATH__',\n fileTitle = (_file: string, basename: string) => basename,\n dirTitle = (_dir: DataNode, defaultTitle: string) => defaultTitle,\n page = 'other',\n}: {\n files: string[];\n cwd?: string;\n inlinedResourcePathKey?: keyof DataNode;\n dirTitle?(dir: DataNode, defaultTitle: string): JSX.Element | string;\n fileTitle?(file: string, basename: string): JSX.Element | string;\n page?: 'bundle' | 'other';\n}): DataNode[] {\n // Normalize all paths to use forward slash as internal separator for consistency\n // This ensures Windows paths (using backslash) are properly converted to forward slashes\n const normalizedFiles = files.map((file) => {\n // Always convert backslashes to forward slashes for internal processing\n return file.replace(/\\\\/g, '/');\n });\n\n // Use forward slash as the internal separator for consistency\n const internalSep = '/';\n const sepRegexp = new RegExp(internalSep);\n\n const res = normalizedFiles.reduce<DataNode>(\n (t, file) => {\n let dir = rootDirname(file, internalSep);\n let basename = dir ? file?.slice(dir.length + 1) : file;\n let parent: DataNode = t;\n\n while (dir) {\n // find the match directory.\n let exist = parent.children!.find((e) => e.title === dir) as DataNode;\n if (!exist) {\n const p = [parent[inlinedResourcePathKey], dir]\n .filter(Boolean)\n .join(internalSep);\n exist = {\n title: dir,\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps, false)\n : null,\n // key: [parent.key, parent.children!.length].join('-'),\n key: p,\n children: [],\n [inlinedResourcePathKey]: p,\n [basenameKey]: dir,\n };\n parent.children!.push(exist);\n }\n\n parent = exist;\n dir = rootDirname(basename, internalSep);\n basename = dir\n ? basename.slice(dir.length).replace(sepRegexp, '')\n : basename;\n }\n\n // uniq\n if (parent.children!.some((e) => get(e, inlinedResourcePathKey) === file))\n return t;\n\n parent.children!.push({\n title() {\n return fileTitle(file, basename);\n },\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps)\n : null,\n key: file,\n isLeaf: true,\n [inlinedResourcePathKey]: file,\n [basenameKey]: basename,\n });\n\n return t;\n },\n { key: '0', children: [] },\n ).children!;\n\n res.forEach((e) => {\n e.children &&\n e.children.forEach((item) =>\n flattenDirectory(\n item,\n e,\n internalSep,\n inlinedResourcePathKey,\n dirTitle,\n ),\n );\n });\n\n return res;\n}\n\nexport function beautifyPath(path: string, cwd: string) {\n if (path.startsWith(cwd)) {\n return path.replace(cwd, '.');\n }\n\n return path;\n}\n\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: UploadFile,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: Blob,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: unknown,\n): Promise<T> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const { result } = reader;\n try {\n const json = JSON.parse(result!.toString());\n resolve(json);\n } catch (err) {\n message.error('json parse error');\n reject(err);\n }\n };\n reader.onerror = () => {\n const msg = 'upload json file error, please try again.';\n message.error(msg);\n reject(new Error(msg));\n };\n reader.readAsText(((file as UploadFile).originFileObj || file) as Blob);\n });\n}\n\n/**\n * beautify module path, will replace cwd & last 'node_modules'\n */\nexport function beautifyModulePath(modulePath: string, cwd: string) {\n const res = beautifyPath(modulePath, cwd);\n\n const str = '/node_modules/';\n\n const idx = res.lastIndexOf(str);\n\n if (idx > -1) {\n return {\n alias: res.slice(idx + str.length),\n inNodeModules: true,\n };\n }\n\n return {\n alias: res,\n inNodeModules: false,\n };\n}\n\nexport function getFileIcon(props: TreeNodeProps, addRowIcon = true) {\n const { data } = props;\n const expanded = props.expanded;\n if (data?.children) {\n return (\n <Space>\n {addRowIcon ? (\n <RightOutlined\n className={`file-tree-switcher-arrow ${expanded ? 'file-tree-switcher-arrow-expand' : ''}`}\n />\n ) : (\n <></>\n )}\n {expanded ? <FolderOpenTwoTone /> : <FolderTwoTone />}\n </Space>\n );\n }\n if (props.eventKey && typeof props.eventKey === 'string') {\n return getFileCom(props.eventKey);\n }\n return <FileOutlined />;\n}\n\ntype TreeNode = {\n name: string;\n value?: number;\n children?: TreeNode[];\n path?: string;\n sourceSize?: number;\n bundledSize?: number;\n gzipSize?: number;\n id?: string | number;\n // Internal helper, not exported\n _map?: Map<string, TreeNode>;\n};\n\nexport function buildTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const root: TreeNode = { name: rootName, children: [], _map: new Map() };\n\n for (const mod of modules) {\n const parts = mod.path.split(/[\\\\/]/).filter(Boolean);\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n if (i === parts.length - 1) {\n // File node\n if (!current.children) current.children = [];\n current.children.push({\n name: part,\n path: mod.path,\n sourceSize: mod.size?.sourceSize ?? 0,\n bundledSize: mod.size?.parsedSize ?? 0,\n gzipSize: mod.size?.gzipSize ?? 0,\n id: mod.id,\n });\n } else {\n // Directory node\n if (!current._map) current._map = new Map();\n let child = current._map.get(part);\n if (!child) {\n child = { name: part, children: [], _map: new Map() };\n current.children!.push(child);\n current._map.set(part, child);\n }\n current = child;\n }\n }\n }\n\n // Clean up _map property\n function clean(node: TreeNode) {\n delete node._map;\n if (node.children) node.children.forEach(clean);\n }\n clean(root);\n\n return root;\n}\n\nfunction flattenSingleChildDirs(node: TreeNode): TreeNode {\n // Return directly if leaf node\n if (!node.children || node.children.length === 0) return node;\n\n let current = node;\n // As long as children has only one child and it's not a leaf, merge\n while (\n current.children &&\n current.children.length === 1 &&\n !current.children[0].sourceSize // Not a leaf\n ) {\n current = {\n name: current.name + '/' + current.children[0].name,\n children: current.children[0].children,\n };\n }\n\n // Recursively process all child nodes\n if (current.children) {\n current.children = current.children.map(flattenSingleChildDirs);\n }\n return current;\n}\n\nfunction sumDirValue(node: TreeNode): {\n sourceSize: number;\n bundledSize: number;\n gzipSize: number;\n} {\n if (!node.children || node.children.length === 0) {\n // Leaf node, just return value\n return {\n sourceSize: node.sourceSize ?? 0,\n bundledSize: node.bundledSize ?? 0,\n gzipSize: node.gzipSize ?? 0,\n };\n }\n // Recursively sum all child nodes\n let sourceSum = 0;\n let bundledSum = 0;\n let gzipSum = 0;\n for (const child of node.children) {\n const { sourceSize, bundledSize, gzipSize } = sumDirValue(child);\n sourceSum += sourceSize;\n bundledSum += bundledSize;\n gzipSum += gzipSize;\n }\n node.sourceSize = sourceSum;\n node.bundledSize = bundledSum;\n node.gzipSize = gzipSum;\n return { sourceSize: sourceSum, bundledSize: bundledSum, gzipSize: gzipSum };\n}\n\nexport function flattenTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const rawTree = buildTreemapData(modules, rootName);\n const flattenedTree = flattenSingleChildDirs(rawTree);\n sumDirValue(flattenedTree); // Recursive sum\n return flattenedTree;\n}\n"],"names":["rootDirname","file","sep","idx","mapFileKey","arr","depth","filter","d","res","parent","e","t","basenameKey","flattenDirectory","n","inlinedResourcePathKey","dirTitle","_dir","defaultTitle","c","createFileStructures","files","fileTitle","_file","basename","page","normalizedFiles","internalSep","sepRegexp","RegExp","dir","exist","p","Boolean","props","getFileIcon","get","item","beautifyPath","path","cwd","readJSONByFileReader","Promise","resolve","reject","reader","FileReader","result","json","JSON","err","message","msg","Error","beautifyModulePath","modulePath","str","addRowIcon","data","expanded","Space","RightOutlined","FolderOpenTwoTone","FolderTwoTone","getFileCom","FileOutlined","buildTreemapData","modules","rootName","root","Map","mod","parts","current","i","part","child","clean","node","flattenSingleChildDirs","sumDirValue","sourceSum","bundledSum","gzipSum","sourceSize","bundledSize","gzipSize","flattenTreemapData","rawTree","flattenedTree"],"mappings":";;;;;AAiBO,MAAMA,cAAc,CAACC,MAAcC,MAAM,GAAG;IACjD,MAAMC,MAAMF,MAAM,QAAQC;IAC1B,IAAIC,AAAQ,OAARA,KACF,OAAO;IAET,IAAIA,AAAQ,MAARA,KACF,OAAOD,MAAOF,CAAAA,YAAYC,MAAM,MA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IA,QAAQ,QAAQ,EAClBA,QAAQ,QAAQ,GAAGA,QAAQ,QAAQ,CAAC,GAAG,CAACM;IAE1C,OAAON;AACT;AAEA,SAASO,YAAYF,IAAc;IAKjC,IAAI,CAACA,KAAK,QAAQ,IAAIA,AAAyB,MAAzBA,KAAK,QAAQ,CAAC,MAAM,EAExC,OAAO;QACL,YAAYA,KAAK,UAAU,IAAI;QAC/B,aAAaA,KAAK,WAAW,IAAI;QACjC,UAAUA,KAAK,QAAQ,IAAI;IAC7B;IAGF,IAAIG,YAAY;IAChB,IAAIC,aAAa;IACjB,IAAIC,UAAU;IACd,KAAK,MAAMP,SAASE,KAAK,QAAQ,CAAE;QACjC,MAAM,EAAEM,UAAU,EAAEC,WAAW,EAAEC,QAAQ,EAAE,GAAGN,YAAYJ;QAC1DK,aAAaG;QACbF,cAAcG;QACdF,WAAWG;IACb;IACAR,KAAK,UAAU,GAAGG;IAClBH,KAAK,WAAW,GAAGI;IACnBJ,KAAK,QAAQ,GAAGK;IAChB,OAAO;QAAE,YAAYF;QAAW,aAAaC;QAAY,UAAUC;IAAQ;AAC7E;AAEO,SAASI,mBACdpB,OAAyB,EACzBC,WAAW,MAAM;IAEjB,MAAMoB,UAAUtB,iBAAiBC,SAASC;IAC1C,MAAMqB,gBAAgBV,uBAAuBS;IAC7CR,YAAYS;IACZ,OAAOA;AACT"}
1
+ {"version":3,"file":"utils/file.mjs","sources":["../../src/utils/file.tsx"],"sourcesContent":["import { get } from 'es-toolkit/compat';\nimport { Common, SDK } from '@rsdoctor/types';\nimport { message, Space, TreeNodeProps, UploadFile } from 'antd';\nimport { FieldDataNode } from 'rc-tree';\nimport {\n FolderOpenTwoTone,\n FolderTwoTone,\n FileOutlined,\n RightOutlined,\n} from '@ant-design/icons';\nimport { getFileCom } from 'src/components/FileTree';\n\nexport type DataNode = FieldDataNode<{\n key: string | number;\n title?: React.ReactNode | ((data: DataNode) => React.ReactNode);\n}> & { __BASENAME__?: any; __RESOURCEPATH__?: any; children?: DataNode[] };\n\nexport const rootDirname = (file: string, sep = '/'): string | null => {\n const idx = file?.indexOf(sep);\n if (idx === -1) {\n return null;\n }\n if (idx === 0) {\n return sep + (rootDirname(file?.slice(1), sep) || '');\n }\n return file?.slice(0, idx);\n};\n\nexport function mapFileKey(\n arr: DataNode[],\n depth = 2,\n filter: (node: DataNode) => boolean = () => true,\n): DataNode['key'][] {\n let d = 0;\n const res: DataNode['key'][] = [];\n let parent: DataNode[] = arr;\n while (d < depth) {\n parent.filter(filter).forEach((e) => {\n if (!e.isLeaf) {\n res.push(e.key);\n }\n });\n parent = parent.reduce<DataNode[]>(\n (t, e) => t.concat(e.children || []),\n [],\n );\n if (!parent.length) break;\n d++;\n }\n return res;\n}\n\nconst basenameKey = '__BASENAME__';\n\nexport function flattenDirectory(\n n: DataNode,\n parent: DataNode,\n sep = '/',\n inlinedResourcePathKey: keyof DataNode,\n dirTitle = (_dir: DataNode, defaultTitle: string): JSX.Element | string =>\n defaultTitle,\n) {\n if (n.isLeaf) return;\n if (parent.children && parent.children.length === 1) {\n const defaultTitle = [parent[basenameKey], n[basenameKey]].join(sep);\n parent[inlinedResourcePathKey] = n[inlinedResourcePathKey];\n parent[basenameKey] = defaultTitle;\n parent.key = [parent.key, n.key].join('-');\n parent.children = n.children;\n parent.title = dirTitle(parent, defaultTitle);\n\n if (n.children) {\n n.children.forEach((c) => {\n flattenDirectory(c, parent, sep, inlinedResourcePathKey, dirTitle);\n });\n }\n } else {\n // parent has more than 1 child.\n n.title = dirTitle(n, n[basenameKey]);\n\n if (n.children) {\n n.children.forEach((c) => {\n flattenDirectory(c, n, sep, inlinedResourcePathKey, dirTitle);\n });\n }\n }\n}\n\nexport function createFileStructures({\n files,\n inlinedResourcePathKey = '__RESOURCEPATH__',\n fileTitle = (_file: string, basename: string) => basename,\n dirTitle = (_dir: DataNode, defaultTitle: string) => defaultTitle,\n page = 'other',\n}: {\n files: string[];\n cwd?: string;\n inlinedResourcePathKey?: keyof DataNode;\n dirTitle?(dir: DataNode, defaultTitle: string): JSX.Element | string;\n fileTitle?(file: string, basename: string): JSX.Element | string;\n page?: 'bundle' | 'other';\n}): DataNode[] {\n // Normalize all paths to use forward slash as internal separator for consistency\n // This ensures Windows paths (using backslash) are properly converted to forward slashes\n const normalizedFiles = files.map((file) => {\n // Always convert backslashes to forward slashes for internal processing\n return file.replace(/\\\\/g, '/');\n });\n\n // Use forward slash as the internal separator for consistency\n const internalSep = '/';\n const sepRegexp = new RegExp(internalSep);\n\n const res = normalizedFiles.reduce<DataNode>(\n (t, file) => {\n let dir = rootDirname(file, internalSep);\n let basename = dir ? file?.slice(dir.length + 1) : file;\n let parent: DataNode = t;\n\n while (dir) {\n // find the match directory.\n let exist = parent.children!.find((e) => e.title === dir) as DataNode;\n if (!exist) {\n const p = [parent[inlinedResourcePathKey], dir]\n .filter(Boolean)\n .join(internalSep);\n exist = {\n title: dir,\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps, false)\n : null,\n // key: [parent.key, parent.children!.length].join('-'),\n key: p,\n children: [],\n [inlinedResourcePathKey]: p,\n [basenameKey]: dir,\n };\n parent.children!.push(exist);\n }\n\n parent = exist;\n dir = rootDirname(basename, internalSep);\n basename = dir\n ? basename.slice(dir.length).replace(sepRegexp, '')\n : basename;\n }\n\n // uniq\n if (parent.children!.some((e) => get(e, inlinedResourcePathKey) === file))\n return t;\n\n parent.children!.push({\n title() {\n return fileTitle(file, basename);\n },\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps)\n : null,\n key: file,\n isLeaf: true,\n [inlinedResourcePathKey]: file,\n [basenameKey]: basename,\n });\n\n return t;\n },\n { key: '0', children: [] },\n ).children!;\n\n res.forEach((e) => {\n if (e.children) {\n e.children.forEach((item) =>\n flattenDirectory(\n item,\n e,\n internalSep,\n inlinedResourcePathKey,\n dirTitle,\n ),\n );\n }\n });\n\n return res;\n}\n\nexport function beautifyPath(path: string, cwd: string) {\n if (path.startsWith(cwd)) {\n return path.replace(cwd, '.');\n }\n\n return path;\n}\n\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: UploadFile,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: Blob,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: unknown,\n): Promise<T> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const { result } = reader;\n try {\n const json = JSON.parse(result!.toString());\n resolve(json);\n } catch (err) {\n message.error('json parse error');\n reject(err);\n }\n };\n reader.onerror = () => {\n const msg = 'upload json file error, please try again.';\n message.error(msg);\n reject(new Error(msg));\n };\n reader.readAsText(((file as UploadFile).originFileObj || file) as Blob);\n });\n}\n\n/**\n * beautify module path, will replace cwd & last 'node_modules'\n */\nexport function beautifyModulePath(modulePath: string, cwd: string) {\n const res = beautifyPath(modulePath, cwd);\n\n const str = '/node_modules/';\n\n const idx = res.lastIndexOf(str);\n\n if (idx > -1) {\n return {\n alias: res.slice(idx + str.length),\n inNodeModules: true,\n };\n }\n\n return {\n alias: res,\n inNodeModules: false,\n };\n}\n\nexport function getFileIcon(props: TreeNodeProps, addRowIcon = true) {\n const { data } = props;\n const expanded = props.expanded;\n if (data?.children) {\n return (\n <Space>\n {addRowIcon ? (\n <RightOutlined\n className={`file-tree-switcher-arrow ${expanded ? 'file-tree-switcher-arrow-expand' : ''}`}\n />\n ) : (\n <></>\n )}\n {expanded ? <FolderOpenTwoTone /> : <FolderTwoTone />}\n </Space>\n );\n }\n if (props.eventKey && typeof props.eventKey === 'string') {\n return getFileCom(props.eventKey);\n }\n return <FileOutlined />;\n}\n\ntype TreeNode = {\n name: string;\n value?: number;\n children?: TreeNode[];\n path?: string;\n sourceSize?: number;\n bundledSize?: number;\n gzipSize?: number;\n id?: string | number;\n // Internal helper, not exported\n _map?: Map<string, TreeNode>;\n};\n\nexport function buildTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const root: TreeNode = { name: rootName, children: [], _map: new Map() };\n\n for (const mod of modules) {\n const parts = mod.path.split(/[\\\\/]/).filter(Boolean);\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n if (i === parts.length - 1) {\n // File node\n if (!current.children) current.children = [];\n current.children.push({\n name: part,\n path: mod.path,\n sourceSize: mod.size?.sourceSize ?? 0,\n bundledSize: mod.size?.parsedSize ?? 0,\n gzipSize: mod.size?.gzipSize ?? 0,\n id: mod.id,\n });\n } else {\n // Directory node\n if (!current._map) current._map = new Map();\n let child = current._map.get(part);\n if (!child) {\n child = { name: part, children: [], _map: new Map() };\n current.children!.push(child);\n current._map.set(part, child);\n }\n current = child;\n }\n }\n }\n\n // Clean up _map property\n function clean(node: TreeNode) {\n delete node._map;\n if (node.children) node.children.forEach(clean);\n }\n clean(root);\n\n return root;\n}\n\nfunction flattenSingleChildDirs(node: TreeNode): TreeNode {\n // Return directly if leaf node\n if (!node.children || node.children.length === 0) return node;\n\n let current = node;\n // As long as children has only one child and it's not a leaf, merge\n while (\n current.children &&\n current.children.length === 1 &&\n !current.children[0].sourceSize // Not a leaf\n ) {\n current = {\n name: current.name + '/' + current.children[0].name,\n children: current.children[0].children,\n };\n }\n\n // Recursively process all child nodes\n if (current.children) {\n current.children = current.children.map(flattenSingleChildDirs);\n }\n return current;\n}\n\nfunction sumDirValue(node: TreeNode): {\n sourceSize: number;\n bundledSize: number;\n gzipSize: number;\n} {\n if (!node.children || node.children.length === 0) {\n // Leaf node, just return value\n return {\n sourceSize: node.sourceSize ?? 0,\n bundledSize: node.bundledSize ?? 0,\n gzipSize: node.gzipSize ?? 0,\n };\n }\n // Recursively sum all child nodes\n let sourceSum = 0;\n let bundledSum = 0;\n let gzipSum = 0;\n for (const child of node.children) {\n const { sourceSize, bundledSize, gzipSize } = sumDirValue(child);\n sourceSum += sourceSize;\n bundledSum += bundledSize;\n gzipSum += gzipSize;\n }\n node.sourceSize = sourceSum;\n node.bundledSize = bundledSum;\n node.gzipSize = gzipSum;\n return { sourceSize: sourceSum, bundledSize: bundledSum, gzipSize: gzipSum };\n}\n\nexport function flattenTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const rawTree = buildTreemapData(modules, rootName);\n const flattenedTree = flattenSingleChildDirs(rawTree);\n sumDirValue(flattenedTree); // Recursive sum\n return flattenedTree;\n}\n"],"names":["rootDirname","file","sep","idx","mapFileKey","arr","depth","filter","d","res","parent","e","t","basenameKey","flattenDirectory","n","inlinedResourcePathKey","dirTitle","_dir","defaultTitle","c","createFileStructures","files","fileTitle","_file","basename","page","normalizedFiles","internalSep","sepRegexp","RegExp","dir","exist","p","Boolean","props","getFileIcon","get","item","beautifyPath","path","cwd","readJSONByFileReader","Promise","resolve","reject","reader","FileReader","result","json","JSON","err","message","msg","Error","beautifyModulePath","modulePath","str","addRowIcon","data","expanded","Space","RightOutlined","FolderOpenTwoTone","FolderTwoTone","getFileCom","FileOutlined","buildTreemapData","modules","rootName","root","Map","mod","parts","current","i","part","child","clean","node","flattenSingleChildDirs","sumDirValue","sourceSum","bundledSum","gzipSum","sourceSize","bundledSize","gzipSize","flattenTreemapData","rawTree","flattenedTree"],"mappings":";;;;;AAiBO,MAAMA,cAAc,CAACC,MAAcC,MAAM,GAAG;IACjD,MAAMC,MAAMF,MAAM,QAAQC;IAC1B,IAAIC,AAAQ,OAARA,KACF,OAAO;IAET,IAAIA,AAAQ,MAARA,KACF,OAAOD,MAAOF,CAAAA,YAAYC,MAAM,MAAM,IAAIC,QAAQ,EAAC;IAErD,OAAOD,MAAM,MAAM,GAAGE;AACxB;AAEO,SAASC,WACdC,GAAe,EACfC,QAAQ,CAAC,EACTC,SAAsC,IAAM,IAAI;IAEhD,IAAIC,IAAI;IACR,MAAMC,MAAyB,EAAE;IACjC,IAAIC,SAAqBL;IACzB,MAAOG,IAAIF,MAAO;QAChBI,OAAO,MAAM,CAACH,QAAQ,OAAO,CAAC,CAACI;YAC7B,IAAI,CAACA,EA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;QACjC,UAAUA,KAAK,QAAQ,IAAI;IAC7B;IAGF,IAAIG,YAAY;IAChB,IAAIC,aAAa;IACjB,IAAIC,UAAU;IACd,KAAK,MAAMP,SAASE,KAAK,QAAQ,CAAE;QACjC,MAAM,EAAEM,UAAU,EAAEC,WAAW,EAAEC,QAAQ,EAAE,GAAGN,YAAYJ;QAC1DK,aAAaG;QACbF,cAAcG;QACdF,WAAWG;IACb;IACAR,KAAK,UAAU,GAAGG;IAClBH,KAAK,WAAW,GAAGI;IACnBJ,KAAK,QAAQ,GAAGK;IAChB,OAAO;QAAE,YAAYF;QAAW,aAAaC;QAAY,UAAUC;IAAQ;AAC7E;AAEO,SAASI,mBACdpB,OAAyB,EACzBC,WAAW,MAAM;IAEjB,MAAMoB,UAAUtB,iBAAiBC,SAASC;IAC1C,MAAMqB,gBAAgBV,uBAAuBS;IAC7CR,YAAYS;IACZ,OAAOA;AACT"}
@@ -17,7 +17,7 @@ const useI18n = ()=>{
17
17
  changeLanguage (lng, callback) {
18
18
  return i18n.changeLanguage(lng, (error, t)=>{
19
19
  if (!error) setLocaleToStorage(lng);
20
- callback && callback(error, t);
20
+ if (callback) callback(error, t);
21
21
  });
22
22
  }
23
23
  }