@rsdoctor/components 1.6.0 → 1.6.1

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 (69) hide show
  1. package/dist/components/Alerts/bundle-alert.mjs +4 -2
  2. package/dist/components/Alerts/bundle-alert.mjs.map +1 -1
  3. package/dist/components/Alerts/bundle.mjs +2 -2
  4. package/dist/components/Alerts/bundle.mjs.map +1 -1
  5. package/dist/components/Card/size.d.ts +1 -0
  6. package/dist/components/Card/size.mjs +29 -7
  7. package/dist/components/Card/size.mjs.map +1 -1
  8. package/dist/components/Card/size.module.mjs +1 -0
  9. package/dist/components/Card/size.module.mjs.map +1 -1
  10. package/dist/components/Card/size_module.css +5 -0
  11. package/dist/components/Card/size_module.css.map +1 -1
  12. package/dist/components/Charts/TimelineCharts/index.mjs +116 -116
  13. package/dist/components/Charts/TimelineCharts/index.mjs.map +1 -1
  14. package/dist/components/Charts/TreeMap.d.ts +2 -1
  15. package/dist/components/Charts/TreeMap.mjs +28 -30
  16. package/dist/components/Charts/TreeMap.mjs.map +1 -1
  17. package/dist/components/Charts/constants.d.ts +1 -0
  18. package/dist/components/Charts/constants.mjs +11 -1
  19. package/dist/components/Charts/constants.mjs.map +1 -1
  20. package/dist/components/Charts/loader.css +1 -1
  21. package/dist/components/Charts/loader.css.map +1 -1
  22. package/dist/components/Charts/treeMapSize.d.ts +10 -0
  23. package/dist/components/Charts/treeMapSize.mjs +17 -0
  24. package/dist/components/Charts/treeMapSize.mjs.map +1 -0
  25. package/dist/components/Charts/treeMapSize.test.d.ts +1 -0
  26. package/dist/components/Charts/treeMapSize.test.mjs +44 -0
  27. package/dist/components/Charts/treeMapSize.test.mjs.map +1 -0
  28. package/dist/components/Layout/header.mjs +24 -18
  29. package/dist/components/Layout/header.mjs.map +1 -1
  30. package/dist/components/Layout/header.module.mjs +5 -1
  31. package/dist/components/Layout/header.module.mjs.map +1 -1
  32. package/dist/components/Layout/header_module.css +69 -15
  33. package/dist/components/Layout/header_module.css.map +1 -1
  34. package/dist/components/Layout/index.mjs +9 -2
  35. package/dist/components/Layout/index.mjs.map +1 -1
  36. package/dist/components/Layout/menus.mjs +6 -5
  37. package/dist/components/Layout/menus.mjs.map +1 -1
  38. package/dist/components/Overall/DataSummary.d.ts +1 -1
  39. package/dist/components/Overall/DataSummary.mjs +1 -1
  40. package/dist/components/Overall/DataSummary.mjs.map +1 -1
  41. package/dist/components/Overall/DataSummary_module.css +6 -1
  42. package/dist/components/Overall/DataSummary_module.css.map +1 -1
  43. package/dist/components/Overall/bundle.mjs +2 -3
  44. package/dist/components/Overall/bundle.mjs.map +1 -1
  45. package/dist/components/Overall/bundle.module.mjs +1 -0
  46. package/dist/components/Overall/bundle.module.mjs.map +1 -1
  47. package/dist/components/Overall/bundle_module.css +11 -0
  48. package/dist/components/Overall/bundle_module.css.map +1 -1
  49. package/dist/components/Overall/list_module.css +18 -0
  50. package/dist/components/Overall/list_module.css.map +1 -1
  51. package/dist/components/Overall/overview_module.css +12 -4
  52. package/dist/components/Overall/overview_module.css.map +1 -1
  53. package/dist/components/Overall/project.mjs +1 -1
  54. package/dist/components/Overall/project.mjs.map +1 -1
  55. package/dist/components/Overall/project_module.css +8 -0
  56. package/dist/components/Overall/project_module.css.map +1 -1
  57. package/dist/pages/BundleSize/components/card_module.css +7 -1
  58. package/dist/pages/BundleSize/components/card_module.css.map +1 -1
  59. package/dist/pages/BundleSize/components/tree-graph.mjs +2 -2
  60. package/dist/pages/BundleSize/components/tree-graph.mjs.map +1 -1
  61. package/dist/pages/Overall/index.mjs +5 -13
  62. package/dist/pages/Overall/index.mjs.map +1 -1
  63. package/dist/pages/Overall/index.module.mjs +3 -0
  64. package/dist/pages/Overall/index.module.mjs.map +1 -1
  65. package/dist/pages/Overall/index_module.css +35 -2
  66. package/dist/pages/Overall/index_module.css.map +1 -1
  67. package/dist/pages/Overall/responsiveLayout.mjs +3 -3
  68. package/dist/pages/Overall/responsiveLayout.mjs.map +1 -1
  69. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"components/Overall/bundle.mjs","sources":["../../../src/components/Overall/bundle.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Descriptions,\n DescriptionsProps,\n Button,\n Tree,\n Tag,\n Segmented,\n} from 'antd';\nimport { FolderOpenTwoTone, RightOutlined } from '@ant-design/icons';\nimport { useNavigate } from 'react-router-dom';\n\nimport { getFileCom } from '../FileTree';\nimport { formatSize, useI18n } from '../../utils';\nimport { TextDrawer } from '../TextDrawer';\nimport { Card } from '../Card';\nimport { ServerAPIProvider } from '../Manifest';\nimport listStyles from './list.module.scss';\nimport cardStyles from './card.module.scss';\nimport { DataSummary } from './DataSummary';\n\nimport { Client, SDK } from '@rsdoctor/types';\nimport type { TreeDataNode } from 'antd';\n\nimport styles from './bundle.module.scss';\n\ntype viewType = 'files' | 'size';\n\nconst { DirectoryTree } = Tree;\n\nexport const getFiles = (\n data: Client.RsdoctorClientAssetsSummary['all']['total'],\n) => {\n let files: Array<{\n fileName: string;\n defaultDir: string;\n size: number;\n initial: boolean;\n }> = [];\n if (data.files.length) {\n files = data.files.map((fileMessage) => {\n const filePath = fileMessage.path;\n const pathArray = filePath.split('/');\n const fileName = pathArray.pop()!;\n const defaultDir = pathArray.join('/') || 'output';\n\n return {\n fileName,\n defaultDir,\n size: fileMessage.size,\n initial: fileMessage.initial,\n };\n });\n }\n\n const treeData: TreeDataNode[] = [];\n files.forEach((file) => {\n const target = treeData.find((data) => data.title === file.defaultDir);\n const parent: TreeDataNode = target || {\n title: file.defaultDir,\n key: file.defaultDir,\n icon: <FolderOpenTwoTone />,\n children: [],\n };\n const icon = getFileCom(file.fileName);\n if (!target) {\n treeData.push(parent);\n }\n parent.children!.push({\n title: (\n <div className={styles.treeContainer}>\n <div className={styles.treeTitle}>{file.fileName}</div>\n <div className={styles.line} />\n <Tag className={styles.tag} color=\"green\">\n {formatSize(file.size)}\n </Tag>\n {file.initial ? (\n <Tag className={styles.tag} color=\"cyan\">\n initial\n </Tag>\n ) : null}\n </div>\n ),\n key: file.fileName,\n isLeaf: true,\n icon,\n });\n });\n\n return {\n treeData,\n };\n};\n\nexport const getFilesWithDrawer = (\n data: Client.RsdoctorClientAssetsSummary['all']['total'],\n): React.JSX.Element => {\n const { treeData } = getFiles(data);\n\n return (\n <>\n {data.files.length ? (\n <TextDrawer\n buttonProps={{\n size: 'small',\n }}\n buttonStyle={{\n fontSize: 'inherit',\n }}\n drawerProps={{\n title: 'Files',\n }}\n text={<span>{data.count}</span>}\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 data.count\n )}\n </>\n );\n};\n\nconst BundleDescriptions = ({\n res,\n view,\n}: {\n res: Client.RsdoctorClientAssetsSummary;\n view: viewType;\n}) => {\n const fileItems: DescriptionsProps['items'] = [\n {\n key: 'js-files-count',\n label: 'JS files',\n children: (\n <span className={`${styles.description} ${styles.column}`}>\n {getFilesWithDrawer(res.js.total)}\n </span>\n ),\n },\n {\n key: 'css-files-count',\n label: 'CSS files',\n children: (\n <span className={`${styles.description} ${styles.column}`}>\n {getFilesWithDrawer(res.css.total)}\n </span>\n ),\n },\n {\n key: 'font-files-count',\n label: 'Font files',\n children: (\n <span className={`${styles.description} ${styles.column}`}>\n {getFilesWithDrawer(res.fonts.total)}\n </span>\n ),\n },\n {\n key: 'html-files-count',\n label: 'HTML files',\n children: (\n <span className={styles.description}>\n {getFilesWithDrawer(res.html.total)}\n </span>\n ),\n },\n {\n key: 'image-files-count',\n label: 'Image files',\n children: (\n <span className={styles.description}>\n {getFilesWithDrawer(res.imgs.total)}\n </span>\n ),\n },\n {\n key: 'media-files-count',\n label: 'Media files',\n children: (\n <span className={styles.description}>\n {getFilesWithDrawer(res.media.total)}\n </span>\n ),\n },\n ];\n\n const [jsSize, jsSizeUnit] = formatSize(res.js.total.size).split(' ');\n const [cssSize, cssSizeUnit] = formatSize(res.css.total.size).split(' ');\n const [fontSize, fontSizeUnit] = formatSize(res.fonts.total.size).split(' ');\n const [htmlSize, htmlSizeUnit] = formatSize(res.html.total.size).split(' ');\n const [imgSize, imgSizeUnit] = formatSize(res.imgs.total.size).split(' ');\n const [mediaSize, mediaSizeUnit] = formatSize(res.media.total.size).split(\n ' ',\n );\n\n const sizeItems: DescriptionsProps['items'] = [\n {\n key: 'js-files-size',\n label: <span className={styles.label}>JS size</span>,\n children: (\n <div className={styles.column}>\n <span className={styles.description}>{jsSize}</span>\n <span className={styles.unit}>{jsSizeUnit}</span>\n </div>\n ),\n },\n {\n key: 'css-files-size',\n label: <span className={styles.label}>CSS size</span>,\n children: (\n <div className={styles.column}>\n <span className={styles.description}>{cssSize}</span>\n <span className={styles.unit}>{cssSizeUnit}</span>\n </div>\n ),\n },\n {\n key: 'font-files-size',\n label: <span className={styles.label}>Font size</span>,\n children: (\n <div className={styles.column}>\n <span className={styles.description}>{fontSize}</span>\n <span className={styles.unit}>{fontSizeUnit}</span>\n </div>\n ),\n },\n {\n key: 'html-files-size',\n label: <span className={styles.label}>HTML size</span>,\n children: (\n <>\n <span className={styles.description}>{htmlSize}</span>\n <span className={styles.unit}>{htmlSizeUnit}</span>\n </>\n ),\n },\n {\n key: 'image-files-size',\n label: <span className={styles.label}>Image size</span>,\n children: (\n <>\n <span className={styles.description}>{imgSize}</span>\n <span className={styles.unit}>{imgSizeUnit}</span>\n </>\n ),\n },\n {\n key: 'media-files-size',\n label: <span className={styles.label}>Media size</span>,\n children: (\n <>\n <span className={styles.description}>{mediaSize}</span>\n <span className={styles.unit}>{mediaSizeUnit}</span>\n </>\n ),\n },\n ];\n\n return (\n <Descriptions\n layout={'vertical'}\n className={listStyles.bundleOverall}\n size=\"small\"\n column={3}\n colon={false}\n items={view === 'files' ? fileItems : sizeItems}\n />\n );\n};\n\nexport const BundleOverall: React.FC<{\n errors: SDK.ErrorsData;\n cwd: string;\n}> = (): React.JSX.Element | null => {\n const [view, setView] = useState<viewType>('size');\n const navigate = useNavigate();\n const { t } = useI18n();\n\n const handleViewChange = (value: viewType) => {\n setView(value);\n };\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: false }}\n >\n {(res) => {\n const totalSizeStr = formatSize(res.all.total.size);\n return (\n <Card className={cardStyles.card} style={{ height: '316px' }}>\n <div>\n <div className={styles.title}>\n <span>{t('Bundle Overall')}</span>\n <Button\n type=\"link\"\n style={{ padding: '0px' }}\n onClick={() => {\n navigate(Client.RsdoctorClientRoutes.BundleSize);\n }}\n >\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <span style={{ marginRight: '8px', fontSize: '13px' }}>\n {t('ViewBundleSize')}\n </span>\n <RightOutlined style={{ fontSize: '10px' }} />\n </div>\n </Button>\n </div>\n <Segmented\n options={['Size', 'Files']}\n onChange={(val) =>\n handleViewChange(val.toLocaleLowerCase() as viewType)\n }\n size=\"small\"\n style={{ marginBottom: 8, fontSize: '14px' }}\n />\n <DataSummary\n theme={view === 'files' ? 'common' : 'warning'}\n number={view === 'files' ? res.all.total.count : totalSizeStr}\n description={`Total ${view}`}\n />\n <BundleDescriptions view={view} res={res} />\n </div>\n </Card>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["DirectoryTree","Tree","getFiles","data","files","fileMessage","filePath","pathArray","fileName","defaultDir","treeData","file","target","parent","FolderOpenTwoTone","icon","getFileCom","styles","Tag","formatSize","getFilesWithDrawer","TextDrawer","BundleDescriptions","res","view","fileItems","jsSize","jsSizeUnit","cssSize","cssSizeUnit","fontSize","fontSizeUnit","htmlSize","htmlSizeUnit","imgSize","imgSizeUnit","mediaSize","mediaSizeUnit","sizeItems","Descriptions","listStyles","BundleOverall","setView","useState","navigate","useNavigate","t","useI18n","handleViewChange","value","ServerAPIProvider","SDK","totalSizeStr","Card","cardStyles","Button","Client","RightOutlined","Segmented","val","DataSummary"],"mappings":";;;;;;;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AM,EAAE5B,MAAM;;sCAE9B,IAACF,oBAAkBA;4BAAC,MAAME;4BAAM,KAAKD;;;;;QAI7C;;AAGN"}
1
+ {"version":3,"file":"components/Overall/bundle.mjs","sources":["../../../src/components/Overall/bundle.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Descriptions,\n DescriptionsProps,\n Button,\n Tree,\n Tag,\n Segmented,\n} from 'antd';\nimport { FolderOpenTwoTone, RightOutlined } from '@ant-design/icons';\nimport { useNavigate } from 'react-router-dom';\n\nimport { getFileCom } from '../FileTree';\nimport { formatSize, useI18n } from '../../utils';\nimport { TextDrawer } from '../TextDrawer';\nimport { Card } from '../Card';\nimport { ServerAPIProvider } from '../Manifest';\nimport listStyles from './list.module.scss';\nimport cardStyles from './card.module.scss';\nimport { DataSummary } from './DataSummary';\n\nimport { Client, SDK } from '@rsdoctor/types';\nimport type { TreeDataNode } from 'antd';\n\nimport styles from './bundle.module.scss';\n\ntype viewType = 'files' | 'size';\n\nconst { DirectoryTree } = Tree;\n\nexport const getFiles = (\n data: Client.RsdoctorClientAssetsSummary['all']['total'],\n) => {\n let files: Array<{\n fileName: string;\n defaultDir: string;\n size: number;\n initial: boolean;\n }> = [];\n if (data.files.length) {\n files = data.files.map((fileMessage) => {\n const filePath = fileMessage.path;\n const pathArray = filePath.split('/');\n const fileName = pathArray.pop()!;\n const defaultDir = pathArray.join('/') || 'output';\n\n return {\n fileName,\n defaultDir,\n size: fileMessage.size,\n initial: fileMessage.initial,\n };\n });\n }\n\n const treeData: TreeDataNode[] = [];\n files.forEach((file) => {\n const target = treeData.find((data) => data.title === file.defaultDir);\n const parent: TreeDataNode = target || {\n title: file.defaultDir,\n key: file.defaultDir,\n icon: <FolderOpenTwoTone />,\n children: [],\n };\n const icon = getFileCom(file.fileName);\n if (!target) {\n treeData.push(parent);\n }\n parent.children!.push({\n title: (\n <div className={styles.treeContainer}>\n <div className={styles.treeTitle}>{file.fileName}</div>\n <div className={styles.line} />\n <Tag className={`${styles.tag} ${styles.sizeTag}`}>\n {formatSize(file.size)}\n </Tag>\n {file.initial ? (\n <Tag className={styles.tag} color=\"cyan\">\n initial\n </Tag>\n ) : null}\n </div>\n ),\n key: file.fileName,\n isLeaf: true,\n icon,\n });\n });\n\n return {\n treeData,\n };\n};\n\nexport const getFilesWithDrawer = (\n data: Client.RsdoctorClientAssetsSummary['all']['total'],\n): React.JSX.Element => {\n const { treeData } = getFiles(data);\n\n return (\n <>\n {data.files.length ? (\n <TextDrawer\n buttonProps={{\n size: 'small',\n }}\n buttonStyle={{\n fontSize: 'inherit',\n }}\n drawerProps={{\n title: 'Files',\n }}\n text={<span>{data.count}</span>}\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 data.count\n )}\n </>\n );\n};\n\nconst BundleDescriptions = ({\n res,\n view,\n}: {\n res: Client.RsdoctorClientAssetsSummary;\n view: viewType;\n}) => {\n const fileItems: DescriptionsProps['items'] = [\n {\n key: 'js-files-count',\n label: 'JS files',\n children: (\n <span className={`${styles.description} ${styles.column}`}>\n {getFilesWithDrawer(res.js.total)}\n </span>\n ),\n },\n {\n key: 'css-files-count',\n label: 'CSS files',\n children: (\n <span className={`${styles.description} ${styles.column}`}>\n {getFilesWithDrawer(res.css.total)}\n </span>\n ),\n },\n {\n key: 'font-files-count',\n label: 'Font files',\n children: (\n <span className={`${styles.description} ${styles.column}`}>\n {getFilesWithDrawer(res.fonts.total)}\n </span>\n ),\n },\n {\n key: 'html-files-count',\n label: 'HTML files',\n children: (\n <span className={styles.description}>\n {getFilesWithDrawer(res.html.total)}\n </span>\n ),\n },\n {\n key: 'image-files-count',\n label: 'Image files',\n children: (\n <span className={styles.description}>\n {getFilesWithDrawer(res.imgs.total)}\n </span>\n ),\n },\n {\n key: 'media-files-count',\n label: 'Media files',\n children: (\n <span className={styles.description}>\n {getFilesWithDrawer(res.media.total)}\n </span>\n ),\n },\n ];\n\n const [jsSize, jsSizeUnit] = formatSize(res.js.total.size).split(' ');\n const [cssSize, cssSizeUnit] = formatSize(res.css.total.size).split(' ');\n const [fontSize, fontSizeUnit] = formatSize(res.fonts.total.size).split(' ');\n const [htmlSize, htmlSizeUnit] = formatSize(res.html.total.size).split(' ');\n const [imgSize, imgSizeUnit] = formatSize(res.imgs.total.size).split(' ');\n const [mediaSize, mediaSizeUnit] = formatSize(res.media.total.size).split(\n ' ',\n );\n\n const sizeItems: DescriptionsProps['items'] = [\n {\n key: 'js-files-size',\n label: <span className={styles.label}>JS size</span>,\n children: (\n <div className={styles.column}>\n <span className={styles.description}>{jsSize}</span>\n <span className={styles.unit}>{jsSizeUnit}</span>\n </div>\n ),\n },\n {\n key: 'css-files-size',\n label: <span className={styles.label}>CSS size</span>,\n children: (\n <div className={styles.column}>\n <span className={styles.description}>{cssSize}</span>\n <span className={styles.unit}>{cssSizeUnit}</span>\n </div>\n ),\n },\n {\n key: 'font-files-size',\n label: <span className={styles.label}>Font size</span>,\n children: (\n <div className={styles.column}>\n <span className={styles.description}>{fontSize}</span>\n <span className={styles.unit}>{fontSizeUnit}</span>\n </div>\n ),\n },\n {\n key: 'html-files-size',\n label: <span className={styles.label}>HTML size</span>,\n children: (\n <>\n <span className={styles.description}>{htmlSize}</span>\n <span className={styles.unit}>{htmlSizeUnit}</span>\n </>\n ),\n },\n {\n key: 'image-files-size',\n label: <span className={styles.label}>Image size</span>,\n children: (\n <>\n <span className={styles.description}>{imgSize}</span>\n <span className={styles.unit}>{imgSizeUnit}</span>\n </>\n ),\n },\n {\n key: 'media-files-size',\n label: <span className={styles.label}>Media size</span>,\n children: (\n <>\n <span className={styles.description}>{mediaSize}</span>\n <span className={styles.unit}>{mediaSizeUnit}</span>\n </>\n ),\n },\n ];\n\n return (\n <Descriptions\n layout={'vertical'}\n className={listStyles.bundleOverall}\n size=\"small\"\n column={3}\n colon={false}\n items={view === 'files' ? fileItems : sizeItems}\n />\n );\n};\n\nexport const BundleOverall: React.FC<{\n errors: SDK.ErrorsData;\n cwd: string;\n}> = (): React.JSX.Element | null => {\n const [view, setView] = useState<viewType>('size');\n const navigate = useNavigate();\n const { t } = useI18n();\n\n const handleViewChange = (value: viewType) => {\n setView(value);\n };\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: false }}\n >\n {(res) => {\n const totalSizeStr = formatSize(res.all.total.size);\n return (\n <Card className={cardStyles.card} style={{ height: '316px' }}>\n <div>\n <div className={styles.title}>\n <span>{t('Bundle Overall')}</span>\n <Button\n type=\"link\"\n style={{ padding: '0px' }}\n onClick={() => {\n navigate(Client.RsdoctorClientRoutes.BundleSize);\n }}\n >\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <span style={{ marginRight: '8px', fontSize: '13px' }}>\n {t('ViewBundleSize')}\n </span>\n <RightOutlined style={{ fontSize: '10px' }} />\n </div>\n </Button>\n </div>\n <Segmented\n options={['Size', 'Files']}\n onChange={(val) =>\n handleViewChange(val.toLocaleLowerCase() as viewType)\n }\n size=\"small\"\n style={{ marginBottom: 8, fontSize: '14px' }}\n />\n <DataSummary\n theme={view === 'files' ? 'common' : 'size'}\n number={view === 'files' ? res.all.total.count : totalSizeStr}\n description={`Total ${view}`}\n />\n <BundleDescriptions view={view} res={res} />\n </div>\n </Card>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["DirectoryTree","Tree","getFiles","data","files","fileMessage","filePath","pathArray","fileName","defaultDir","treeData","file","target","parent","FolderOpenTwoTone","icon","getFileCom","styles","Tag","formatSize","getFilesWithDrawer","TextDrawer","BundleDescriptions","res","view","fileItems","jsSize","jsSizeUnit","cssSize","cssSizeUnit","fontSize","fontSizeUnit","htmlSize","htmlSizeUnit","imgSize","imgSizeUnit","mediaSize","mediaSizeUnit","sizeItems","Descriptions","listStyles","BundleOverall","setView","useState","navigate","useNavigate","t","useI18n","handleViewChange","value","ServerAPIProvider","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W;4BACrC,QAAQA,AAAS,YAATA,OAAmBD,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG6B;4BACjD,aAAa,CAAC,MAAM,EAAE5B,MAAM;;sCAE9B,IAACF,oBAAkBA;4BAAC,MAAME;4BAAM,KAAKD;;;;;QAI7C;;AAGN"}
@@ -9,6 +9,7 @@ const bundle_module = {
9
9
  treeTitle: "treeTitle-B083rc",
10
10
  icon: "icon-jhYzus",
11
11
  tag: "tag-fNEiQ8",
12
+ sizeTag: "sizeTag-ukmRN7",
12
13
  label: "label-vITl7c"
13
14
  };
14
15
  export default bundle_module;
@@ -1 +1 @@
1
- {"version":3,"file":"components/Overall/bundle.module.mjs","sources":["../../../src/components/Overall/bundle.module.scss"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./bundle_module.css\"\nexport default {\"title\":\"title-fNYU5O\",\"column\":\"column-VJtpT7\",\"description\":\"description-nwRikm\",\"unit\":\"unit-poAoxV\",\"treeContainer\":\"treeContainer-jcFlxc\",\"line\":\"line-Ia_8Yg\",\"treeTitle\":\"treeTitle-B083rc\",\"icon\":\"icon-jhYzus\",\"tag\":\"tag-fNEiQ8\",\"label\":\"label-vITl7c\"};"],"names":[],"mappings":";AAEA,sBAAe;IAAC,OAAQ;IAAe,QAAS;IAAgB,aAAc;IAAqB,MAAO;IAAc,eAAgB;IAAuB,MAAO;IAAc,WAAY;IAAmB,MAAO;IAAc,KAAM;IAAa,OAAQ;AAAc"}
1
+ {"version":3,"file":"components/Overall/bundle.module.mjs","sources":["../../../src/components/Overall/bundle.module.scss"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./bundle_module.css\"\nexport default {\"title\":\"title-fNYU5O\",\"column\":\"column-VJtpT7\",\"description\":\"description-nwRikm\",\"unit\":\"unit-poAoxV\",\"treeContainer\":\"treeContainer-jcFlxc\",\"line\":\"line-Ia_8Yg\",\"treeTitle\":\"treeTitle-B083rc\",\"icon\":\"icon-jhYzus\",\"tag\":\"tag-fNEiQ8\",\"sizeTag\":\"sizeTag-ukmRN7\",\"label\":\"label-vITl7c\"};"],"names":[],"mappings":";AAEA,sBAAe;IAAC,OAAQ;IAAe,QAAS;IAAgB,aAAc;IAAqB,MAAO;IAAc,eAAgB;IAAuB,MAAO;IAAc,WAAY;IAAmB,MAAO;IAAc,KAAM;IAAa,SAAU;IAAiB,OAAQ;AAAc"}
@@ -59,15 +59,26 @@
59
59
  height: 23px;
60
60
  }
61
61
 
62
+ .treeContainer-jcFlxc .sizeTag-ukmRN7 {
63
+ color: #5b8ff9;
64
+ background: #5b8ff91f;
65
+ border-color: #5b8ff966;
66
+ }
67
+
62
68
  .label-vITl7c {
63
69
  text-align: left;
64
70
  text-underline-position: from-font;
65
71
  -webkit-text-decoration-skip-ink: none;
66
72
  text-decoration-skip-ink: none;
73
+ color: var(--text-color-secondary);
67
74
  font-size: 12px;
68
75
  font-weight: 400;
69
76
  line-height: 20px;
70
77
  }
71
78
 
79
+ .description-nwRikm, .unit-poAoxV {
80
+ font-variant-numeric: tabular-nums;
81
+ }
82
+
72
83
 
73
84
  /*# sourceMappingURL=bundle_module.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/components/Overall/bundle.module.scss"],"names":[],"mappings":"AAAA;EACE,gBAAgB;EAChB,8BAA8B;EAC9B,mBAAmB;EACnB,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,iBAAiB;EACjB,aAAa;EACb,kBAAkB;EAClB,UAAU;AACZ;;AAX6K;EAc3K,mBAAmB;AACrB;;AAfwM;EAkBtM,iBAAiB;EACjB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAtBsR;EAA0B;IA0B5S,eAAe;EACjB;AACF;;AA5B6U;EA+B3U,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAlCmY;EAqCjY,aAAa;AACf;;AAtC+Z;EAyC7Z,uDAAuD;EACvD,OAAO;EACP,qBAAqB;EACrB,2BAA2B;AAC7B;;AA7CkiB;EAgDhiB,qBAAqB;EACrB,qBAAqB;EACrB,eAAe;AACjB;;AAnDqnB;EAsDnnB,eAAe;AACjB;;AAvDypB;EA0DvpB,YAAY;AACd;;AA3DyrB;EA8DvrB,gBAAgB;EAChB,kCAAkC;EAClC,sCAAsC;EACtC,8BAA8B;EAC9B,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB","sourcesContent":[".title{height:40px;display:flex;justify-content:space-between;align-items:center;font-size:16px;font-weight:500;line-height:20px;text-align:left;position:relative;top:-10px}.column{margin-bottom:14px}.description{font-size:20px;font-weight:500;line-height:32px;margin-right:5px}@media(max-width: 1500px){.description{font-size:16px}}.unit{font-size:12px;font-weight:400;line-height:32px}.treeContainer{display:flex}.treeContainer .line{border-bottom:1px dashed var(--color-divider, #e5e6eb);flex:1;transform:translateY(-45%);margin:0 15px 0 10px}.treeContainer .treeTitle{word-wrap:break-word;word-break:break-all;flex-wrap:wrap}.treeContainer .icon{font-size:16px}.treeContainer .tag{height:23px}.label{font-size:12px;font-weight:400;line-height:20px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/Overall/bundle.module.scss"],"names":[],"mappings":"AAAA;EACE,gBAAgB;EAChB,8BAA8B;EAC9B,mBAAmB;EACnB,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,iBAAiB;EACjB,aAAa;EACb,kBAAkB;EAClB,UAAU;AACZ;;AAX6K;EAc3K,mBAAmB;AACrB;;AAfwM;EAkBtM,iBAAiB;EACjB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAtBsR;EAA0B;IA0B5S,eAAe;EACjB;AACF;;AA5B6U;EA+B3U,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAlCmY;EAqCjY,aAAa;AACf;;AAtC+Z;EAyC7Z,uDAAuD;EACvD,OAAO;EACP,qBAAqB;EACrB,2BAA2B;AAC7B;;AA7CkiB;EAgDhiB,qBAAqB;EACrB,qBAAqB;EACrB,eAAe;AACjB;;AAnDqnB;EAsDnnB,eAAe;AACjB;;AAvDypB;EA0DvpB,YAAY;AACd;;AA3DyrB;EA8DvrB,cAAc;EACd,qBAAqB;EACrB,uBAAuB;AACzB;;AAjEgyB;EAoE9xB,gBAAgB;EAChB,kCAAkC;EAClC,sCAAsC;EACtC,8BAA8B;EAC9B,kCAAkC;EAClC,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AA5Ey8B;EA+Ev8B,kCAAkC;AACpC","sourcesContent":[".title{height:40px;display:flex;justify-content:space-between;align-items:center;font-size:16px;font-weight:500;line-height:20px;text-align:left;position:relative;top:-10px}.column{margin-bottom:14px}.description{font-size:20px;font-weight:500;line-height:32px;margin-right:5px}@media(max-width: 1500px){.description{font-size:16px}}.unit{font-size:12px;font-weight:400;line-height:32px}.treeContainer{display:flex}.treeContainer .line{border-bottom:1px dashed var(--color-divider, #e5e6eb);flex:1;transform:translateY(-45%);margin:0 15px 0 10px}.treeContainer .treeTitle{word-wrap:break-word;word-break:break-all;flex-wrap:wrap}.treeContainer .icon{font-size:16px}.treeContainer .tag{height:23px}.treeContainer .sizeTag{color:#5b8ff9;background:rgba(91,143,249,.12);border-color:rgba(91,143,249,.4)}.label{font-size:12px;font-weight:400;line-height:20px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none;color:var(--text-color-secondary)}.description,.unit{font-variant-numeric:tabular-nums}"],"sourceRoot":""}
@@ -2,6 +2,15 @@
2
2
  font-size: 13px;
3
3
  }
4
4
 
5
+ .projectOverall-T7onhG .ant-descriptions-item-label {
6
+ color: var(--text-color-secondary);
7
+ }
8
+
9
+ .projectOverall-T7onhG .ant-descriptions-item-content {
10
+ color: var(--text-color);
11
+ font-variant-numeric: tabular-nums;
12
+ }
13
+
5
14
  .projectOverall-T7onhG .ant-descriptions-item {
6
15
  padding-bottom: 10px !important;
7
16
  }
@@ -10,6 +19,15 @@
10
19
  font-size: 13px;
11
20
  }
12
21
 
22
+ .bundleOverall-Ay7WmZ .ant-descriptions-item-label {
23
+ color: var(--text-color-secondary);
24
+ }
25
+
26
+ .bundleOverall-Ay7WmZ .ant-descriptions-item-content {
27
+ color: var(--text-color);
28
+ font-variant-numeric: tabular-nums;
29
+ }
30
+
13
31
  .bundleOverall-Ay7WmZ .ant-descriptions-item {
14
32
  padding-bottom: 0 !important;
15
33
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/components/Overall/list.module.scss"],"names":[],"mappings":"AAAA;EACE,eAAe;AACjB;;AAF6H;EAK3H,+BAA+B;AACjC;;AAN4M;EAS1M,eAAe;AACjB;;AAVuU;EAarU,4BAA4B;AAC9B","sourcesContent":[".projectOverall :global(.ant-descriptions-item-label),.projectOverall :global(.ant-descriptions-item-content){font-size:13px}.projectOverall :global(.ant-descriptions-item){padding-bottom:10px !important}.bundleOverall :global(.ant-descriptions-item-label),.bundleOverall :global(.ant-descriptions-item-content){font-size:13px}.bundleOverall :global(.ant-descriptions-item){padding-bottom:0px !important}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/Overall/list.module.scss"],"names":[],"mappings":"AAAA;EACE,eAAe;AACjB;;AAF6H;EAK3H,kCAAkC;AACpC;;AANqN;EASnN,wBAAwB;EACxB,kCAAkC;AACpC;;AAXuU;EAcrU,+BAA+B;AACjC;;AAfsZ;EAkBpZ,eAAe;AACjB;;AAnBihB;EAsB/gB,kCAAkC;AACpC;;AAvBwmB;EA0BtmB,wBAAwB;EACxB,kCAAkC;AACpC;;AA5BytB;EA+BvtB,4BAA4B;AAC9B","sourcesContent":[".projectOverall :global(.ant-descriptions-item-label),.projectOverall :global(.ant-descriptions-item-content){font-size:13px}.projectOverall :global(.ant-descriptions-item-label){color:var(--text-color-secondary)}.projectOverall :global(.ant-descriptions-item-content){color:var(--text-color);font-variant-numeric:tabular-nums}.projectOverall :global(.ant-descriptions-item){padding-bottom:10px !important}.bundleOverall :global(.ant-descriptions-item-label),.bundleOverall :global(.ant-descriptions-item-content){font-size:13px}.bundleOverall :global(.ant-descriptions-item-label){color:var(--text-color-secondary)}.bundleOverall :global(.ant-descriptions-item-content){color:var(--text-color);font-variant-numeric:tabular-nums}.bundleOverall :global(.ant-descriptions-item){padding-bottom:0px !important}"],"sourceRoot":""}
@@ -1,12 +1,13 @@
1
1
  .container-KSV5DZ {
2
2
  background: var(--color-bg-box-elevated);
3
+ border: 1px solid var(--color-border-secondary);
3
4
  white-space: nowrap;
4
- border-radius: 8px;
5
+ border-radius: 10px;
5
6
  justify-content: space-between;
6
7
  align-items: center;
7
8
  width: 100%;
8
- margin-right: 10px;
9
- padding: 8px 20px;
9
+ min-height: 88px;
10
+ padding: 14px 18px;
10
11
  display: flex;
11
12
  }
12
13
 
@@ -15,16 +16,23 @@
15
16
  }
16
17
 
17
18
  .container-KSV5DZ .content-BsjkSU .title-jUwqD5 {
19
+ color: var(--text-color-secondary);
18
20
  font-size: 12px;
19
21
  font-weight: 400;
20
22
  line-height: 20px;
21
23
  }
22
24
 
23
25
  .container-KSV5DZ .content-BsjkSU .description-ArkOg4 {
26
+ color: var(--text-color);
27
+ font-variant-numeric: tabular-nums;
24
28
  font-size: 24px;
25
- font-weight: 500;
29
+ font-weight: 600;
26
30
  line-height: 32px;
27
31
  }
28
32
 
33
+ .container-KSV5DZ .ant-avatar {
34
+ box-shadow: 0 0 0 4px #ffffff0a;
35
+ }
36
+
29
37
 
30
38
  /*# sourceMappingURL=overview_module.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/components/Overall/overview.module.scss"],"names":[],"mappings":"AAAA;EACE,wCAAwC;EACxC,mBAAmB;EACnB,kBAAkB;EAClB,8BAA8B;EAC9B,mBAAmB;EACnB,WAAW;EACX,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;AACf;;AAV6M;EAa3M,OAAO;AACT;;AAdwO;EAiBtO,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AApBmT;EAuBjT,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB","sourcesContent":[".container{width:100%;display:flex;background:var(--color-bg-box-elevated);align-items:center;justify-content:space-between;border-radius:8px;padding:8px 20px 8px 20px;margin-right:10px;white-space:nowrap}.container .content{flex:1}.container .content .title{font-size:12px;font-weight:400;line-height:20px}.container .content .description{font-size:24px;font-weight:500;line-height:32px}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/Overall/overview.module.scss"],"names":[],"mappings":"AAAA;EACE,wCAAwC;EACxC,+CAA+C;EAC/C,mBAAmB;EACnB,mBAAmB;EACnB,8BAA8B;EAC9B,mBAAmB;EACnB,WAAW;EACX,gBAAgB;EAChB,kBAAkB;EAClB,aAAa;AACf;;AAXmP;EAcjP,OAAO;AACT;;AAf8Q;EAkB5Q,kCAAkC;EAClC,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAtB2X;EAyBzX,wBAAwB;EACxB,kCAAkC;EAClC,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AA9BsgB;EAiCpgB,+BAA+B;AACjC","sourcesContent":[".container{width:100%;display:flex;background:var(--color-bg-box-elevated);align-items:center;justify-content:space-between;min-height:88px;border:1px solid var(--color-border-secondary);border-radius:10px;padding:14px 18px;white-space:nowrap}.container .content{flex:1}.container .content .title{font-size:12px;font-weight:400;line-height:20px;color:var(--text-color-secondary)}.container .content .description{font-size:24px;font-weight:600;line-height:32px;color:var(--text-color);font-variant-numeric:tabular-nums}.container :global(.ant-avatar){box-shadow:0 0 0 4px hsla(0,0%,100%,.04)}"],"sourceRoot":""}
@@ -133,7 +133,7 @@ const ProjectOverall = ({ configs = [], cwd, envinfo, alerts = [], name })=>{
133
133
  }),
134
134
  icon: /*#__PURE__*/ jsx(Avatar, {
135
135
  style: {
136
- background: 'rgba(226, 129, 73)'
136
+ background: '#5B8FF9'
137
137
  },
138
138
  shape: "circle",
139
139
  icon: /*#__PURE__*/ jsx(ExperimentFilled, {
@@ -1 +1 @@
1
- {"version":3,"file":"components/Overall/project.mjs","sources":["../../../src/components/Overall/project.tsx"],"sourcesContent":["import { Descriptions, DescriptionsProps, Avatar } from 'antd';\nimport {\n CloseCircleFilled,\n WarningFilled,\n FileFilled,\n ExperimentFilled,\n} from '@ant-design/icons';\n\nimport { ServerAPIProvider } from '../Manifest';\nimport { useI18n, formatSize } from '../../utils';\nimport { WebpackConfigurationViewer } from '../Configuration';\nimport { Card } from '../Card';\nimport { Overview } from './overview';\nimport styles from './project.module.scss';\n\nimport listStyles from './list.module.scss';\nimport cardStyles from './card.module.scss';\nimport projectStyles from './project.module.scss';\n\nimport { SDK } from '@rsdoctor/types';\n\nexport const ProjectOverall: React.FC<{\n configs: SDK.ConfigData;\n cwd: string;\n envinfo: SDK.EnvInfo;\n alerts: SDK.ErrorsData;\n name?: string;\n}> = ({ configs = [], cwd, envinfo, alerts = [], name }) => {\n const { t } = useI18n();\n\n const warns = alerts.filter((e) => e.level === 'warn').length;\n\n const errors = alerts.length - warns;\n\n const items: DescriptionsProps['items'] = [\n ...(name\n ? [\n {\n key: 'name',\n label: 'Builder',\n children: name,\n },\n ]\n : []),\n ...Object.keys(envinfo || {}).map((key) => {\n const regexp = /Version$/;\n const isVersion = regexp.test(key);\n return {\n key,\n label: isVersion ? key.replace(regexp, '') : key,\n children: envinfo ? envinfo[key] : undefined,\n };\n }),\n ...configs\n .filter((item) => !!item.version)\n .map((config) => {\n const { name: configName, version } = config;\n return {\n key: configName,\n label: configName,\n children: version,\n };\n }),\n {\n key: 'cwd',\n label: 'cwd',\n children: cwd,\n },\n ];\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: false }}\n >\n {(res) => {\n const totalSizeStr = formatSize(res.all.total.size);\n const totalFiles = res.all.total.count;\n const [size, unit] = totalSizeStr.split(' ');\n const overViewData = [\n {\n title: 'Errors',\n description: <span style={{ color: '#FF4D4F' }}>{errors}</span>,\n icon: (\n <Avatar\n style={{ background: '#FF4D4F' }}\n shape=\"circle\"\n icon={<CloseCircleFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n {\n title: 'Warnings',\n description: <span style={{ color: '#FAAD14' }}>{warns}</span>,\n icon: (\n <Avatar\n style={{ background: '#FAAD14' }}\n shape=\"circle\"\n icon={<WarningFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n {\n title: 'Total Files',\n description: <span>{totalFiles}</span>,\n icon: (\n <Avatar\n style={{ background: '#3874F6' }}\n shape=\"circle\"\n icon={<FileFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n {\n title: 'Total Size',\n description: (\n <>\n <span style={{ fontSize: '20px' }}>{size}</span>\n <span style={{ fontSize: '13px', marginLeft: '5px' }}>\n {unit}\n </span>\n </>\n ),\n icon: (\n <Avatar\n style={{ background: 'rgba(226, 129, 73)' }}\n shape=\"circle\"\n icon={<ExperimentFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n ];\n\n return (\n <Card className={cardStyles.card}>\n <div>\n <div className={styles.title}>\n <span className={styles.left}>{t('Project Overall')}</span>\n <WebpackConfigurationViewer />\n </div>\n <div className={projectStyles.overview}>\n {overViewData.map((data, idx) => (\n <Overview\n key={idx}\n title={data.title}\n description={<span>{data.description}</span>}\n icon={data.icon}\n />\n ))}\n </div>\n <Descriptions\n className={listStyles.projectOverall}\n items={items}\n />\n </div>\n </Card>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["ProjectOverall","configs","cwd","envinfo","alerts","name","t","useI18n","warns","e","errors","items","Object","key","regexp","isVersion","undefined","item","config","configName","version","ServerAPIProvider","SDK","res","totalSizeStr","formatSize","totalFiles","size","unit","overViewData","Avatar","CloseCircleFilled","WarningFilled","FileFilled","ExperimentFilled","Card","cardStyles","styles","WebpackConfigurationViewer","projectStyles","data","idx","Overview","Descriptions","listStyles"],"mappings":";;;;;;;;;;;;AAqBO,MAAMA,iBAMR,CAAC,EAAEC,UAAU,EAAE,EAAEC,GAAG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ACnCV,aAAa,GAAG,CAAC,CAACW,MAAMC,MAAAA,WAAAA,GACvB,IAACC,UAAQA;oCAEP,OAAOF,KAAK,KAAK;oCACjB,2BAAa,IAAC;kDAAMA,KAAK,WAAW;;oCACpC,MAAMA,KAAK,IAAI;mCAHVC;;sCAOX,IAACE,cAAYA;4BACX,WAAWC,YAAAA,cAAyB;4BACpC,OAAOjC;;;;;QAKjB;;AAGN"}
1
+ {"version":3,"file":"components/Overall/project.mjs","sources":["../../../src/components/Overall/project.tsx"],"sourcesContent":["import { Descriptions, DescriptionsProps, Avatar } from 'antd';\nimport {\n CloseCircleFilled,\n WarningFilled,\n FileFilled,\n ExperimentFilled,\n} from '@ant-design/icons';\n\nimport { ServerAPIProvider } from '../Manifest';\nimport { useI18n, formatSize } from '../../utils';\nimport { WebpackConfigurationViewer } from '../Configuration';\nimport { Card } from '../Card';\nimport { Overview } from './overview';\nimport styles from './project.module.scss';\n\nimport listStyles from './list.module.scss';\nimport cardStyles from './card.module.scss';\nimport projectStyles from './project.module.scss';\n\nimport { SDK } from '@rsdoctor/types';\n\nexport const ProjectOverall: React.FC<{\n configs: SDK.ConfigData;\n cwd: string;\n envinfo: SDK.EnvInfo;\n alerts: SDK.ErrorsData;\n name?: string;\n}> = ({ configs = [], cwd, envinfo, alerts = [], name }) => {\n const { t } = useI18n();\n\n const warns = alerts.filter((e) => e.level === 'warn').length;\n\n const errors = alerts.length - warns;\n\n const items: DescriptionsProps['items'] = [\n ...(name\n ? [\n {\n key: 'name',\n label: 'Builder',\n children: name,\n },\n ]\n : []),\n ...Object.keys(envinfo || {}).map((key) => {\n const regexp = /Version$/;\n const isVersion = regexp.test(key);\n return {\n key,\n label: isVersion ? key.replace(regexp, '') : key,\n children: envinfo ? envinfo[key] : undefined,\n };\n }),\n ...configs\n .filter((item) => !!item.version)\n .map((config) => {\n const { name: configName, version } = config;\n return {\n key: configName,\n label: configName,\n children: version,\n };\n }),\n {\n key: 'cwd',\n label: 'cwd',\n children: cwd,\n },\n ];\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetsSummary}\n body={{ withFileContent: false }}\n >\n {(res) => {\n const totalSizeStr = formatSize(res.all.total.size);\n const totalFiles = res.all.total.count;\n const [size, unit] = totalSizeStr.split(' ');\n const overViewData = [\n {\n title: 'Errors',\n description: <span style={{ color: '#FF4D4F' }}>{errors}</span>,\n icon: (\n <Avatar\n style={{ background: '#FF4D4F' }}\n shape=\"circle\"\n icon={<CloseCircleFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n {\n title: 'Warnings',\n description: <span style={{ color: '#FAAD14' }}>{warns}</span>,\n icon: (\n <Avatar\n style={{ background: '#FAAD14' }}\n shape=\"circle\"\n icon={<WarningFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n {\n title: 'Total Files',\n description: <span>{totalFiles}</span>,\n icon: (\n <Avatar\n style={{ background: '#3874F6' }}\n shape=\"circle\"\n icon={<FileFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n {\n title: 'Total Size',\n description: (\n <>\n <span style={{ fontSize: '20px' }}>{size}</span>\n <span style={{ fontSize: '13px', marginLeft: '5px' }}>\n {unit}\n </span>\n </>\n ),\n icon: (\n <Avatar\n style={{ background: '#5B8FF9' }}\n shape=\"circle\"\n icon={<ExperimentFilled style={{ fontSize: '18px' }} />}\n />\n ),\n },\n ];\n\n return (\n <Card className={cardStyles.card}>\n <div>\n <div className={styles.title}>\n <span className={styles.left}>{t('Project Overall')}</span>\n <WebpackConfigurationViewer />\n </div>\n <div className={projectStyles.overview}>\n {overViewData.map((data, idx) => (\n <Overview\n key={idx}\n title={data.title}\n description={<span>{data.description}</span>}\n icon={data.icon}\n />\n ))}\n </div>\n <Descriptions\n className={listStyles.projectOverall}\n items={items}\n />\n </div>\n </Card>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["ProjectOverall","configs","cwd","envinfo","alerts","name","t","useI18n","warns","e","errors","items","Object","key","regexp","isVersion","undefined","item","config","configName","version","ServerAPIProvider","SDK","res","totalSizeStr","formatSize","totalFiles","size","unit","overViewData","Avatar","CloseCircleFilled","WarningFilled","FileFilled","ExperimentFilled","Card","cardStyles","styles","WebpackConfigurationViewer","projectStyles","data","idx","Overview","Descriptions","listStyles"],"mappings":";;;;;;;;;;;;AAqBO,MAAMA,iBAMR,CAAC,EAAEC,UAAU,EAAE,EAAEC,GAAG,EAAEC,OAAO,EAAEC,SAAS,EAAE,EAAEC,IAAI,EAAE;IACrD,MAAM,EAAEC,CAAC,EAAE,GAAGC;IAEd,MAAMC,QAAQJ,OAAO,MAAM,CAAC,CAACK,IAAMA,AAAY,WAAZA,EAAE,KAAK,EAAa,MAAM;IAE7D,MAAMC,SAASN,OAAO,MAAM,GAAGI;IAE/B,MAAMG,QAAoC;WACpCN,OACA;YACE;gBACE,KAAK;gBACL,OAAO;gBACP,UAAUA;YACZ;SACD,GACD,EAAE;WACHO,OAAO,IAAI,CAACT,WAAW,CAAC,GAAG,GAAG,CAAC,CAACU;YACjC,MAAMC,SAAS;YACf,MAAMC,YAAYD,OAAO,IAAI,CAACD;YAC9B,OAAO;gBACLA;gBACA,OAAOE,YAAYF,IAAI,OAAO,CAACC,QAAQ,MAAMD;gBAC7C,UAAUV,UAAUA,OAAO,CAACU,IAAI,GAAGG;YACrC;QACF;WACGf,QACA,MAAM,CAAC,CAACgB,OAAS,CAAC,CAACA,KAAK,OAAO,EAC/B,GAAG,CAAC,CAACC;YACJ,MAAM,EAAE,MAAMC,UAAU,EAAEC,OAAO,EAAE,GAAGF;YACtC,OAAO;gBACL,KAAKC;gBACL,OAAOA;gBACP,UAAUC;YACZ;QACF;QACF;YACE,KAAK;YACL,OAAO;YACP,UAAUlB;QACZ;KACD;IAED,OAAO,WAAP,GACE,IAACmB,mBAAiBA;QAChB,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,gBAAgB;QACvC,MAAM;YAAE,iBAAiB;QAAM;kBAE9B,CAACC;YACA,MAAMC,eAAeC,WAAWF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P,GACE,IAACC,MAAIA;gBAAC,WAAWC,YAAAA,IAAe;0BAC9B,mBAAC;;sCACC,KAAC;4BAAI,WAAWC,eAAAA,KAAY;;8CAC1B,IAAC;oCAAK,WAAWA,eAAAA,IAAW;8CAAG/B,EAAE;;8CACjC,IAACgC,4BAA0BA,CAAAA;;;sCAE7B,IAAC;4BAAI,WAAWC,eAAAA,QAAsB;sCACnCV,aAAa,GAAG,CAAC,CAACW,MAAMC,MAAAA,WAAAA,GACvB,IAACC,UAAQA;oCAEP,OAAOF,KAAK,KAAK;oCACjB,2BAAa,IAAC;kDAAMA,KAAK,WAAW;;oCACpC,MAAMA,KAAK,IAAI;mCAHVC;;sCAOX,IAACE,cAAYA;4BACX,WAAWC,YAAAA,cAAyB;4BACpC,OAAOjC;;;;;QAKjB;;AAGN"}
@@ -1,4 +1,5 @@
1
1
  .overview-ZAp1A3 {
2
+ gap: 12px;
2
3
  margin-bottom: 19px;
3
4
  display: flex;
4
5
  }
@@ -20,5 +21,12 @@
20
21
  line-height: 24px;
21
22
  }
22
23
 
24
+ @media (max-width: 980px) {
25
+ .overview-ZAp1A3 {
26
+ grid-template-columns: repeat(2, minmax(0, 1fr));
27
+ display: grid;
28
+ }
29
+ }
30
+
23
31
 
24
32
  /*# sourceMappingURL=project_module.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/components/Overall/project.module.scss"],"names":[],"mappings":"AAAA;EACE,mBAAmB;EACnB,aAAa;AACf;;AAH0C;EAMxC,8BAA8B;EAC9B,mBAAmB;EACnB,oBAAoB;EACpB,aAAa;AACf;;AAVmI;EAajI,gBAAgB;EAChB,kCAAkC;EAClC,sCAAsC;EACtC,8BAA8B;EAC9B,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB","sourcesContent":[".overview{display:flex;margin-bottom:19px}.title{display:flex;justify-content:space-between;align-items:center;padding-bottom:20px}.title .left{font-size:16px;font-weight:500;line-height:24px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/Overall/project.module.scss"],"names":[],"mappings":"AAAA;EACE,SAAS;EACT,mBAAmB;EACnB,aAAa;AACf;;AAJmD;EAOjD,8BAA8B;EAC9B,mBAAmB;EACnB,oBAAoB;EACpB,aAAa;AACf;;AAX4I;EAc1I,gBAAgB;EAChB,kCAAkC;EAClC,sCAAsC;EACtC,8BAA8B;EAC9B,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AArByR;EAAyB;IAyB9S,gDAAgD;IAChD,aAAa;EACf;AACF","sourcesContent":[".overview{display:flex;gap:12px;margin-bottom:19px}.title{display:flex;justify-content:space-between;align-items:center;padding-bottom:20px}.title .left{font-size:16px;font-weight:500;line-height:24px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}@media(max-width: 980px){.overview{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr))}}"],"sourceRoot":""}
@@ -1,5 +1,7 @@
1
1
  .container-wODg_6 {
2
2
  background-color: var(--color-bg-box);
3
+ border: 1px solid var(--color-border-secondary);
4
+ border-radius: var(--border-radius-lg);
3
5
  align-items: center;
4
6
  margin-bottom: 20px;
5
7
  padding: 20px 0;
@@ -27,19 +29,23 @@
27
29
  }
28
30
 
29
31
  .container-wODg_6 .summary-zj0ygd .description-o0ffpO {
32
+ font-variant-numeric: tabular-nums;
30
33
  margin-right: 5px;
31
34
  font-size: 20px;
32
- font-weight: 500;
35
+ font-weight: 600;
33
36
  line-height: 32px;
34
37
  }
35
38
 
36
39
  .container-wODg_6 .summary-zj0ygd .unit-n5Yty6 {
40
+ color: var(--text-color-secondary);
37
41
  font-size: 12px;
38
42
  font-weight: 400;
39
43
  line-height: 32px;
40
44
  }
41
45
 
42
46
  .container-wODg_6 .summary-zj0ygd .totalNumber-UweUl8 {
47
+ color: var(--text-color-secondary);
48
+ font-variant-numeric: tabular-nums;
43
49
  margin: 4px 0;
44
50
  font-size: 13px;
45
51
  font-weight: 400;
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/pages/BundleSize/components/card.module.scss"],"names":[],"mappings":"AAAA;EACE,qCAAqC;EACrC,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AANkH;EAShH,6BAA6B;EAC7B,WAAW;EACX,aAAa;AACf;;AAZmM;EAejM,OAAO;EACP,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AAnBoS;EAsBlS,sBAAsB;EACtB,uBAAuB;EACvB,cAAc;EACd,aAAa;AACf;;AA1BgY;EA6B9X,iBAAiB;EACjB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAjCke;EAoChe,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAvC4iB;EA0C1iB,aAAa;EACb,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AA9C0oB;EAiDxoB,8BAA8B;EAC9B,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;AArDsuB;EAwDpuB,wBAAwB;EACxB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB","sourcesContent":[".container{display:flex;align-items:center;background-color:var(--color-bg-box);padding:20px 0;margin-bottom:20px}.container .chartsContainer{width:100%;display:flex;justify-content:space-evenly}.container .chartsContainer .chart{display:flex;align-items:center;justify-content:center;flex:1}.container .summary{display:flex;flex-direction:column;justify-content:center;margin:0 20px}.container .summary .description{font-size:20px;font-weight:500;line-height:32px;margin-right:5px}.container .summary .unit{font-size:12px;font-weight:400;line-height:32px}.container .summary .totalNumber{font-size:13px;font-weight:400;line-height:20px;margin:4px 0}.cardTitle{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.cardTitle .title{font-size:14px;font-weight:500;line-height:20px;color:var(--text-color)}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/BundleSize/components/card.module.scss"],"names":[],"mappings":"AAAA;EACE,qCAAqC;EACrC,+CAA+C;EAC/C,sCAAsC;EACtC,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AARuM;EAWrM,6BAA6B;EAC7B,WAAW;EACX,aAAa;AACf;;AAdwR;EAiBtR,OAAO;EACP,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AArByX;EAwBvX,sBAAsB;EACtB,uBAAuB;EACvB,cAAc;EACd,aAAa;AACf;;AA5Bqd;EA+Bnd,kCAAkC;EAClC,iBAAiB;EACjB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AApCylB;EAuCvlB,kCAAkC;EAClC,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AA3CqsB;EA8CnsB,kCAAkC;EAClC,kCAAkC;EAClC,aAAa;EACb,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AApDu2B;EAuDr2B,8BAA8B;EAC9B,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;AA3Dm8B;EA8Dj8B,wBAAwB;EACxB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB","sourcesContent":[".container{display:flex;align-items:center;background-color:var(--color-bg-box);padding:20px 0;margin-bottom:20px;border:1px solid var(--color-border-secondary);border-radius:var(--border-radius-lg)}.container .chartsContainer{width:100%;display:flex;justify-content:space-evenly}.container .chartsContainer .chart{display:flex;align-items:center;justify-content:center;flex:1}.container .summary{display:flex;flex-direction:column;justify-content:center;margin:0 20px}.container .summary .description{font-size:20px;font-weight:600;line-height:32px;margin-right:5px;font-variant-numeric:tabular-nums}.container .summary .unit{font-size:12px;font-weight:400;line-height:32px;color:var(--text-color-secondary)}.container .summary .totalNumber{font-size:13px;font-weight:400;line-height:20px;margin:4px 0;color:var(--text-color-secondary);font-variant-numeric:tabular-nums}.cardTitle{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.cardTitle .title{font-size:14px;font-weight:500;line-height:20px;color:var(--text-color)}"],"sourceRoot":""}
@@ -117,7 +117,7 @@ const TreeGraph = /*#__PURE__*/ memo(({ cwd, summary, entryPoints })=>{
117
117
  }),
118
118
  /*#__PURE__*/ jsx(Typography.Text, {
119
119
  style: {
120
- color: '#4FD233'
120
+ color: 'var(--color-data-bundled)'
121
121
  },
122
122
  children: formatSize(size)
123
123
  }),
@@ -126,7 +126,7 @@ const TreeGraph = /*#__PURE__*/ memo(({ cwd, summary, entryPoints })=>{
126
126
  }),
127
127
  initial ? /*#__PURE__*/ jsx(Typography.Text, {
128
128
  style: {
129
- color: '#009A9E'
129
+ color: 'var(--color-data-initial)'
130
130
  },
131
131
  children: "initial"
132
132
  }) : null,
@@ -1 +1 @@
1
- {"version":3,"file":"pages/BundleSize/components/tree-graph.mjs","sources":["../../../../src/pages/BundleSize/components/tree-graph.tsx"],"sourcesContent":["import { CodeOutlined, InfoCircleOutlined } from '@ant-design/icons';\nimport { type Client, SDK } from '@rsdoctor/types';\nimport {\n Card,\n Checkbox,\n Col,\n Divider,\n Empty,\n InputNumber,\n Row,\n Select,\n Space,\n Tooltip,\n Typography,\n} from 'antd';\nimport { debounce, sumBy } from 'es-toolkit/compat';\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport { useCodeDrawer } from 'src/components/base/CodeViewer/useCodeDrawer';\nimport { Badge as Bdg } from '../../../components/Badge';\nimport { FileTree } from '../../../components/FileTree';\nimport { KeywordInput } from '../../../components/Form/keyword';\nimport { Keyword } from '../../../components/Keyword';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { Size } from '../../../constants';\nimport { createFileStructures, formatSize, useI18n } from '../../../utils';\nimport { AssetDetail } from './asset';\nimport { createAssetPathMap, resolveAssetFileTitleTarget } from './asset-path';\nimport styles from './index.module.scss';\nimport './index.sass';\nimport { SearchModal } from './search-modal';\nimport { isJavaScriptAsset } from '../../../utils/assets';\n\nconst { Option } = Select;\n\nexport const TreeGraph = memo(\n ({\n cwd,\n summary,\n entryPoints,\n }: {\n cwd: string;\n summary: Client.RsdoctorClientAssetsSummary;\n entryPoints: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetEntryPoints>;\n }) => {\n const [selectedEntryPoints, setEntryPoints] = useState<\n SDK.EntryPointData[]\n >([]);\n const [inputModule, setModuleValue] = useState(0);\n const [inputAssetName, setAssetName] = useState('');\n const [inputAssetSize, setAssetSize] = useState(0);\n const [defaultExpandAll, setDefaultExpandAll] = useState(false);\n const [inputModuleUnit, setModuleUnit] = useState('');\n const [inputChunkUnit, setChunkUnit] = useState('');\n const [showOnlyJavaScriptAssets, setShowOnlyJavaScriptAssets] =\n useState(false);\n const [assetPath, setAssetPath] = useState<string | null>(null);\n const { showCode, codeDrawerComponent } = useCodeDrawer(\n 'Do not have the codes of assets. If you use the lite or brief mode, there will have codes.',\n );\n\n const { t } = useI18n();\n\n const assets = summary.all.total.files;\n\n const handleChange = useCallback(\n (type: string) => (value: string) => {\n if (type === 'module') {\n setModuleUnit(value);\n } else if (type === 'chunk') {\n setChunkUnit(value);\n }\n },\n [],\n );\n\n const selectAfter = (type: string) => (\n <Select defaultValue=\"kb\" onChange={handleChange(type)}>\n <Option value=\"kb\">KB</Option>\n <Option value=\"mb\">MB</Option>\n </Select>\n );\n const onChangeModule = useCallback(\n debounce((newValue: number) => {\n const count =\n inputModuleUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setModuleValue(count);\n }, 300),\n [],\n );\n\n const onChangeAsset = useCallback(\n debounce((newValue: number) => {\n const count =\n inputChunkUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setAssetSize(count);\n }, 300),\n [],\n );\n\n const filteredAssets = useMemo(() => {\n let res = assets.slice();\n\n if (inputAssetName) {\n res = res.filter((e) => e.path.indexOf(inputAssetName) > -1);\n }\n\n if (showOnlyJavaScriptAssets) {\n res = res.filter((e) => isJavaScriptAsset(e.path));\n }\n\n if (inputAssetSize > 0) {\n res = res.filter((e) => e.size >= inputAssetSize);\n }\n\n if (selectedEntryPoints.length) {\n res = res.filter((e) => {\n if (selectedEntryPoints.some((ep) => ep.assets.includes(e.path))) {\n return true;\n }\n return false;\n });\n }\n\n return res.sort((a, b) => {\n const _a = a.path.indexOf('/') > -1 ? 1 : 0;\n const _b = b.path.indexOf('/') > -1 ? 1 : 0;\n // return _a - _b;\n return _b - _a;\n });\n }, [\n assets,\n selectedEntryPoints,\n inputAssetName,\n inputAssetSize,\n showOnlyJavaScriptAssets,\n ]);\n\n useEffect(() => {\n if (assetPath && filteredAssets.some((f) => f.path === assetPath)) {\n return;\n }\n\n const nextAsset =\n filteredAssets.find((f) => isJavaScriptAsset(f.path)) ??\n filteredAssets[0];\n\n setAssetPath(nextAsset?.path ?? null);\n }, [assetPath, filteredAssets]);\n\n const assetsMap = useMemo(() => {\n return createAssetPathMap(filteredAssets);\n }, [filteredAssets]);\n\n const assetsStructures = useMemo(() => {\n const res = createFileStructures({\n files: filteredAssets.map((e) => e.path).filter(Boolean),\n fileTitle(file, basename) {\n const target = resolveAssetFileTitleTarget(assetsMap, file, basename);\n\n if (typeof target === 'string') {\n return target;\n }\n\n const { size, initial, path, content } = target;\n\n return (\n <div\n className={styles.assetBox}\n onClick={() => {\n setAssetPath(path);\n }}\n >\n <Keyword\n text={basename}\n keyword={''}\n className={styles.fileText}\n />\n <Space size=\"small\" className={styles.assetsTag}>\n <Divider type=\"vertical\" />\n <Typography.Text style={{ color: '#4FD233' }}>\n {formatSize(size)}\n </Typography.Text>\n <Divider type=\"vertical\" />\n {initial ? (\n <Typography.Text style={{ color: '#009A9E' }}>\n initial\n </Typography.Text>\n ) : null}\n <CodeOutlined\n style={{ fontSize: 14, padding: 0 }}\n onClick={() => showCode({ code: content!, filePath: path })}\n />\n </Space>\n </div>\n );\n },\n });\n return res;\n }, [assetsMap, filteredAssets, showCode]);\n\n const onSearch = (value: string) => {\n setAssetName(value);\n setDefaultExpandAll(false);\n };\n return (\n <>\n <div className={styles.treeGraph}>\n <Row align=\"middle\" gutter={[Size.BasePadding, Size.BasePadding]}>\n {entryPoints && entryPoints.length ? (\n <Col>\n <Select\n mode=\"multiple\"\n value={selectedEntryPoints.map((e) => e.name)}\n style={{\n minWidth: 230,\n width: 'auto',\n maxWidth: 300,\n }}\n placeholder={'filter assets by entry point'}\n onChange={(name: string[]) => {\n setEntryPoints(\n name\n .map((e) => entryPoints.find((ep) => ep.name === e)!)\n .filter(Boolean),\n );\n }}\n allowClear\n onClear={() => {\n setEntryPoints([]);\n }}\n >\n {entryPoints.map((e) => {\n return (\n <Select.Option key={e.name} value={e.name}>\n <Space>\n <Bdg\n label={e.name}\n value={formatSize(e.size)}\n tooltip={e.name}\n />\n </Space>\n </Select.Option>\n );\n })}\n </Select>\n </Col>\n ) : null}\n <Col>\n <KeywordInput\n placeholder=\"search asset by keyword\"\n onChange={onSearch}\n />\n </Col>\n <Col>\n <Checkbox\n checked={showOnlyJavaScriptAssets}\n onChange={(e) => {\n setShowOnlyJavaScriptAssets(e.target.checked);\n setDefaultExpandAll(false);\n }}\n >\n JS only\n </Checkbox>\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text style={{ fontSize: 14, color: 'inherit' }}>\n Asset Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the output assets which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'var(--text-color-secondary)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => onChangeAsset(Number(value))}\n addonAfter={selectAfter('chunk')}\n />\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text style={{ fontSize: 14, color: 'inherit' }}>\n Module Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the modules which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'var(--text-color-secondary)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => {\n onChangeModule(Number(value));\n }}\n addonAfter={selectAfter('module')}\n />\n </Col>\n </Row>\n <Row>\n <SearchModal />\n </Row>\n {filteredAssets.length ? (\n <div className={styles.assetDetailRoot}>\n <div className={styles.assetDetailCol}>\n <Card\n className={styles.assetDetailFileTreeRoot}\n classNames={{\n body: styles.assetDetailFileTreeBody,\n }}\n title={\n <Space>\n <Typography.Text>\n {t('Output Assets List')}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={`total assets count is ${assets.length}, the filtered assets count is ${filteredAssets.length}`}\n >\n <Typography.Text\n type=\"secondary\"\n style={{\n fontSize: 12,\n fontWeight: 400,\n }}\n >\n {filteredAssets.length} / {assets.length}\n </Typography.Text>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n {formatSize(sumBy(filteredAssets, (e) => e.size))}\n </Typography.Text>\n </Space>\n }\n size=\"small\"\n >\n <div className={styles.assetDetailFileTreeViewport}>\n <div className={styles.assetDetailFileTreeScrollArea}>\n <FileTree\n className={styles.assets}\n treeData={assetsStructures}\n autoExpandParent\n defaultExpandAll={\n defaultExpandAll || filteredAssets.length <= 20\n }\n key={`tree_${inputAssetName}_${defaultExpandAll}`}\n />\n </div>\n </div>\n </Card>\n </div>\n <div className={styles.assetDetailCol}>\n {assetPath ? (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetDetails}\n body={{ assetPath }}\n >\n {(details) => (\n <AssetDetail\n asset={details.asset}\n chunks={details.chunks}\n modules={details.modules}\n moduleSizeLimit={inputModule}\n root={cwd}\n />\n )}\n </ServerAPIProvider>\n ) : (\n <Card>\n <Empty\n description={\n <Typography.Text strong>\n Click the file path on the left to show the modules of\n the asset\n </Typography.Text>\n }\n />\n </Card>\n )}\n </div>\n </div>\n ) : (\n <Empty />\n )}\n </div>\n {codeDrawerComponent}\n </>\n );\n },\n);\n"],"names":["Option","Select","TreeGraph","memo","cwd","summary","entryPoints","selectedEntryPoints","setEntryPoints","useState","inputModule","setModuleValue","inputAssetName","setAssetName","inputAssetSize","setAssetSize","defaultExpandAll","setDefaultExpandAll","inputModuleUnit","setModuleUnit","inputChunkUnit","setChunkUnit","showOnlyJavaScriptAssets","setShowOnlyJavaScriptAssets","assetPath","setAssetPath","showCode","codeDrawerComponent","useCodeDrawer","t","useI18n","assets","handleChange","useCallback","type","value","selectAfter","onChangeModule","debounce","newValue","count","onChangeAsset","filteredAssets","useMemo","res","e","isJavaScriptAsset","ep","a","b","_a","_b","useEffect","f","nextAsset","assetsMap","createAssetPathMap","assetsStructures","createFileStructures","Boolean","file","basename","target","resolveAssetFileTitleTarget","size","initial","path","content","styles","Keyword","Space","Divider","Typography","formatSize","CodeOutlined","onSearch","Row","Size","Col","name","Bdg","KeywordInput","Checkbox","InputNumber","Tooltip","InfoCircleOutlined","Number","SearchModal","Card","sumBy","FileTree","ServerAPIProvider","SDK","details","AssetDetail","Empty"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,EAAEA,QAAAA,MAAM,EAAE,GAAGC;AAEZ,MAAMC,YAAY,WAAHA,GAAGC,KACvB,CAAC,EACCC,GAAG,EACHC,OAAO,EACPC,WAAW,EAKZ;IACC,MAAM,CAACC,qBAAqBC,eAAe,GAAGC,SAE5C,EAAE;IACJ,MAAM,CAACC,aAAaC,eAAe,GAAGF,SAAS;IAC/C,MAAM,CAACG,gBAAgBC,aAAa,GAAGJ,SAAS;IAChD,MAAM,CAACK,gBAAgBC,aAAa,GAAGN,SAAS;IAChD,MAAM,CAACO,kBAAkBC,oBAAoB,GAAGR,SAAS;IACzD,MAAM,CAACS,iBAAiBC,cAAc,GAAGV,SAAS;IAClD,MAAM,CAACW,gBAAgBC,aAAa,GAAGZ,SAAS;IAChD,MAAM,CAACa,0BAA0BC,4BAA4B,GAC3Dd,SAAS;IACX,MAAM,CAACe,WAAWC,aAAa,GAAGhB,SAAwB;IAC1D,MAAM,EAAEiB,QAAQ,EAAEC,mBAAmB,EAAE,GAAGC,cACxC;IAGF,MAAM,EAAE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,aAAWA;4CACV,OAAOD,QAAQ,KAAK;4CACpB,QAAQA,QAAQ,MAAM;4CACtB,SAASA,QAAQ,OAAO;4CACxB,iBAAiBnF;4CACjB,MAAMN;;mDAKZ,IAACoF,MAAIA;8CACH,kBAACO,OAAKA;wCACJ,2BACE,IAACvB,WAAW,IAAI;4CAAC,QAAM;sDAAC;;;;;;uCAWpC,IAACuB,OAAKA,CAAAA;;;YAGTpE;;;AAGP"}
1
+ {"version":3,"file":"pages/BundleSize/components/tree-graph.mjs","sources":["../../../../src/pages/BundleSize/components/tree-graph.tsx"],"sourcesContent":["import { CodeOutlined, InfoCircleOutlined } from '@ant-design/icons';\nimport { type Client, SDK } from '@rsdoctor/types';\nimport {\n Card,\n Checkbox,\n Col,\n Divider,\n Empty,\n InputNumber,\n Row,\n Select,\n Space,\n Tooltip,\n Typography,\n} from 'antd';\nimport { debounce, sumBy } from 'es-toolkit/compat';\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport { useCodeDrawer } from 'src/components/base/CodeViewer/useCodeDrawer';\nimport { Badge as Bdg } from '../../../components/Badge';\nimport { FileTree } from '../../../components/FileTree';\nimport { KeywordInput } from '../../../components/Form/keyword';\nimport { Keyword } from '../../../components/Keyword';\nimport { ServerAPIProvider } from '../../../components/Manifest';\nimport { Size } from '../../../constants';\nimport { createFileStructures, formatSize, useI18n } from '../../../utils';\nimport { AssetDetail } from './asset';\nimport { createAssetPathMap, resolveAssetFileTitleTarget } from './asset-path';\nimport styles from './index.module.scss';\nimport './index.sass';\nimport { SearchModal } from './search-modal';\nimport { isJavaScriptAsset } from '../../../utils/assets';\n\nconst { Option } = Select;\n\nexport const TreeGraph = memo(\n ({\n cwd,\n summary,\n entryPoints,\n }: {\n cwd: string;\n summary: Client.RsdoctorClientAssetsSummary;\n entryPoints: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetEntryPoints>;\n }) => {\n const [selectedEntryPoints, setEntryPoints] = useState<\n SDK.EntryPointData[]\n >([]);\n const [inputModule, setModuleValue] = useState(0);\n const [inputAssetName, setAssetName] = useState('');\n const [inputAssetSize, setAssetSize] = useState(0);\n const [defaultExpandAll, setDefaultExpandAll] = useState(false);\n const [inputModuleUnit, setModuleUnit] = useState('');\n const [inputChunkUnit, setChunkUnit] = useState('');\n const [showOnlyJavaScriptAssets, setShowOnlyJavaScriptAssets] =\n useState(false);\n const [assetPath, setAssetPath] = useState<string | null>(null);\n const { showCode, codeDrawerComponent } = useCodeDrawer(\n 'Do not have the codes of assets. If you use the lite or brief mode, there will have codes.',\n );\n\n const { t } = useI18n();\n\n const assets = summary.all.total.files;\n\n const handleChange = useCallback(\n (type: string) => (value: string) => {\n if (type === 'module') {\n setModuleUnit(value);\n } else if (type === 'chunk') {\n setChunkUnit(value);\n }\n },\n [],\n );\n\n const selectAfter = (type: string) => (\n <Select defaultValue=\"kb\" onChange={handleChange(type)}>\n <Option value=\"kb\">KB</Option>\n <Option value=\"mb\">MB</Option>\n </Select>\n );\n const onChangeModule = useCallback(\n debounce((newValue: number) => {\n const count =\n inputModuleUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setModuleValue(count);\n }, 300),\n [],\n );\n\n const onChangeAsset = useCallback(\n debounce((newValue: number) => {\n const count =\n inputChunkUnit === 'mb' ? newValue * 1024 * 1024 : newValue * 1024;\n setAssetSize(count);\n }, 300),\n [],\n );\n\n const filteredAssets = useMemo(() => {\n let res = assets.slice();\n\n if (inputAssetName) {\n res = res.filter((e) => e.path.indexOf(inputAssetName) > -1);\n }\n\n if (showOnlyJavaScriptAssets) {\n res = res.filter((e) => isJavaScriptAsset(e.path));\n }\n\n if (inputAssetSize > 0) {\n res = res.filter((e) => e.size >= inputAssetSize);\n }\n\n if (selectedEntryPoints.length) {\n res = res.filter((e) => {\n if (selectedEntryPoints.some((ep) => ep.assets.includes(e.path))) {\n return true;\n }\n return false;\n });\n }\n\n return res.sort((a, b) => {\n const _a = a.path.indexOf('/') > -1 ? 1 : 0;\n const _b = b.path.indexOf('/') > -1 ? 1 : 0;\n // return _a - _b;\n return _b - _a;\n });\n }, [\n assets,\n selectedEntryPoints,\n inputAssetName,\n inputAssetSize,\n showOnlyJavaScriptAssets,\n ]);\n\n useEffect(() => {\n if (assetPath && filteredAssets.some((f) => f.path === assetPath)) {\n return;\n }\n\n const nextAsset =\n filteredAssets.find((f) => isJavaScriptAsset(f.path)) ??\n filteredAssets[0];\n\n setAssetPath(nextAsset?.path ?? null);\n }, [assetPath, filteredAssets]);\n\n const assetsMap = useMemo(() => {\n return createAssetPathMap(filteredAssets);\n }, [filteredAssets]);\n\n const assetsStructures = useMemo(() => {\n const res = createFileStructures({\n files: filteredAssets.map((e) => e.path).filter(Boolean),\n fileTitle(file, basename) {\n const target = resolveAssetFileTitleTarget(assetsMap, file, basename);\n\n if (typeof target === 'string') {\n return target;\n }\n\n const { size, initial, path, content } = target;\n\n return (\n <div\n className={styles.assetBox}\n onClick={() => {\n setAssetPath(path);\n }}\n >\n <Keyword\n text={basename}\n keyword={''}\n className={styles.fileText}\n />\n <Space size=\"small\" className={styles.assetsTag}>\n <Divider type=\"vertical\" />\n <Typography.Text style={{ color: 'var(--color-data-bundled)' }}>\n {formatSize(size)}\n </Typography.Text>\n <Divider type=\"vertical\" />\n {initial ? (\n <Typography.Text\n style={{ color: 'var(--color-data-initial)' }}\n >\n initial\n </Typography.Text>\n ) : null}\n <CodeOutlined\n style={{ fontSize: 14, padding: 0 }}\n onClick={() => showCode({ code: content!, filePath: path })}\n />\n </Space>\n </div>\n );\n },\n });\n return res;\n }, [assetsMap, filteredAssets, showCode]);\n\n const onSearch = (value: string) => {\n setAssetName(value);\n setDefaultExpandAll(false);\n };\n return (\n <>\n <div className={styles.treeGraph}>\n <Row align=\"middle\" gutter={[Size.BasePadding, Size.BasePadding]}>\n {entryPoints && entryPoints.length ? (\n <Col>\n <Select\n mode=\"multiple\"\n value={selectedEntryPoints.map((e) => e.name)}\n style={{\n minWidth: 230,\n width: 'auto',\n maxWidth: 300,\n }}\n placeholder={'filter assets by entry point'}\n onChange={(name: string[]) => {\n setEntryPoints(\n name\n .map((e) => entryPoints.find((ep) => ep.name === e)!)\n .filter(Boolean),\n );\n }}\n allowClear\n onClear={() => {\n setEntryPoints([]);\n }}\n >\n {entryPoints.map((e) => {\n return (\n <Select.Option key={e.name} value={e.name}>\n <Space>\n <Bdg\n label={e.name}\n value={formatSize(e.size)}\n tooltip={e.name}\n />\n </Space>\n </Select.Option>\n );\n })}\n </Select>\n </Col>\n ) : null}\n <Col>\n <KeywordInput\n placeholder=\"search asset by keyword\"\n onChange={onSearch}\n />\n </Col>\n <Col>\n <Checkbox\n checked={showOnlyJavaScriptAssets}\n onChange={(e) => {\n setShowOnlyJavaScriptAssets(e.target.checked);\n setDefaultExpandAll(false);\n }}\n >\n JS only\n </Checkbox>\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text style={{ fontSize: 14, color: 'inherit' }}>\n Asset Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the output assets which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'var(--text-color-secondary)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => onChangeAsset(Number(value))}\n addonAfter={selectAfter('chunk')}\n />\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text style={{ fontSize: 14, color: 'inherit' }}>\n Module Size\n </Typography.Text>\n <Tooltip\n title={t(\n 'filter the modules which size is greater than the input value',\n )}\n style={{ marginLeft: 3 }}\n >\n <InfoCircleOutlined\n style={{ color: 'var(--text-color-secondary)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => {\n onChangeModule(Number(value));\n }}\n addonAfter={selectAfter('module')}\n />\n </Col>\n </Row>\n <Row>\n <SearchModal />\n </Row>\n {filteredAssets.length ? (\n <div className={styles.assetDetailRoot}>\n <div className={styles.assetDetailCol}>\n <Card\n className={styles.assetDetailFileTreeRoot}\n classNames={{\n body: styles.assetDetailFileTreeBody,\n }}\n title={\n <Space>\n <Typography.Text>\n {t('Output Assets List')}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Tooltip\n title={`total assets count is ${assets.length}, the filtered assets count is ${filteredAssets.length}`}\n >\n <Typography.Text\n type=\"secondary\"\n style={{\n fontSize: 12,\n fontWeight: 400,\n }}\n >\n {filteredAssets.length} / {assets.length}\n </Typography.Text>\n </Tooltip>\n <Divider type=\"vertical\" />\n <Typography.Text\n type=\"secondary\"\n style={{ fontSize: 12, fontWeight: 400 }}\n >\n {formatSize(sumBy(filteredAssets, (e) => e.size))}\n </Typography.Text>\n </Space>\n }\n size=\"small\"\n >\n <div className={styles.assetDetailFileTreeViewport}>\n <div className={styles.assetDetailFileTreeScrollArea}>\n <FileTree\n className={styles.assets}\n treeData={assetsStructures}\n autoExpandParent\n defaultExpandAll={\n defaultExpandAll || filteredAssets.length <= 20\n }\n key={`tree_${inputAssetName}_${defaultExpandAll}`}\n />\n </div>\n </div>\n </Card>\n </div>\n <div className={styles.assetDetailCol}>\n {assetPath ? (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAssetDetails}\n body={{ assetPath }}\n >\n {(details) => (\n <AssetDetail\n asset={details.asset}\n chunks={details.chunks}\n modules={details.modules}\n moduleSizeLimit={inputModule}\n root={cwd}\n />\n )}\n </ServerAPIProvider>\n ) : (\n <Card>\n <Empty\n description={\n <Typography.Text strong>\n Click the file path on the left to show the modules of\n the asset\n </Typography.Text>\n }\n />\n </Card>\n )}\n </div>\n </div>\n ) : (\n <Empty />\n )}\n </div>\n {codeDrawerComponent}\n </>\n );\n },\n);\n"],"names":["Option","Select","TreeGraph","memo","cwd","summary","entryPoints","selectedEntryPoints","setEntryPoints","useState","inputModule","setModuleValue","inputAssetName","setAssetName","inputAssetSize","setAssetSize","defaultExpandAll","setDefaultExpandAll","inputModuleUnit","setModuleUnit","inputChunkUnit","setChunkUnit","showOnlyJavaScriptAssets","setShowOnlyJavaScriptAssets","assetPath","setAssetPath","showCode","codeDrawerComponent","useCodeDrawer","t","useI18n","assets","handleChange","useCallback","type","value","selectAfter","onChangeModule","debounce","newValue","count","onChangeAsset","filteredAssets","useMemo","res","e","isJavaScriptAsset","ep","a","b","_a","_b","useEffect","f","nextAsset","assetsMap","createAssetPathMap","assetsStructures","createFileStructures","Boolean","file","basename","target","resolveAssetFileTitleTarget","size","initial","path","content","styles","Keyword","Space","Divider","Typography","formatSize","CodeOutlined","onSearch","Row","Size","Col","name","Bdg","KeywordInput","Checkbox","InputNumber","Tooltip","InfoCircleOutlined","Number","SearchModal","Card","sumBy","FileTree","ServerAPIProvider","SDK","details","AssetDetail","Empty"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,EAAEA,QAAAA,MAAM,EAAE,GAAGC;AAEZ,MAAMC,YAAY,WAAHA,GAAGC,KACvB,CAAC,EACCC,GAAG,EACHC,OAAO,EACPC,WAAW,EAKZ;IACC,MAAM,CAACC,qBAAqBC,eAAe,GAAGC,SAE5C,EAAE;IACJ,MAAM,CAACC,aAAaC,eAAe,GAAGF,SAAS;IAC/C,MAAM,CAACG,gBAAgBC,aAAa,GAAGJ,SAAS;IAChD,MAAM,CAACK,gBAAgBC,aAAa,GAAGN,SAAS;IAChD,MAAM,CAACO,kBAAkBC,oBAAoB,GAAGR,SAAS;IACzD,MAAM,CAACS,iBAAiBC,cAAc,GAAGV,SAAS;IAClD,MAAM,CAACW,gBAAgBC,aAAa,GAAGZ,SAAS;IAChD,MAAM,CAACa,0BAA0BC,4BAA4B,GAC3Dd,SAAS;IACX,MAAM,CAACe,WAAWC,aAAa,GAAGhB,SAAwB;IAC1D,MAAM,EAAEiB,QAAQ,EAAEC,mBAAmB,EAAE,GAAGC,cACxC;IAGF,MAAM,EAAEC,CAAC,EAAE,GAAGC;IAEd,MAAMC,SAAS1B,QAAQ,GAAG,CAAC,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M;4CACtB,SAASA,QAAQ,OAAO;4CACxB,iBAAiBnF;4CACjB,MAAMN;;mDAKZ,IAACoF,MAAIA;8CACH,kBAACO,OAAKA;wCACJ,2BACE,IAACvB,WAAW,IAAI;4CAAC,QAAM;sDAAC;;;;;;uCAWpC,IAACuB,OAAKA,CAAAA;;;YAGTpE;;;AAGP"}
@@ -15,16 +15,10 @@ const Component = ()=>{
15
15
  return /*#__PURE__*/ jsx("div", {
16
16
  className: index_module.overall,
17
17
  children: /*#__PURE__*/ jsxs(Flex, {
18
- style: {
19
- width: '100%'
20
- },
18
+ className: index_module.columns,
21
19
  children: [
22
- /*#__PURE__*/ jsx("div", {
23
- style: {
24
- flex: 3,
25
- marginRight: '16px',
26
- maxWidth: '75%'
27
- },
20
+ /*#__PURE__*/ jsx("main", {
21
+ className: index_module.mainColumn,
28
22
  children: /*#__PURE__*/ jsxs(ResponsiveLayout, {
29
23
  children: [
30
24
  /*#__PURE__*/ jsx(ProjectOverall, {
@@ -38,10 +32,8 @@ const Component = ()=>{
38
32
  ]
39
33
  })
40
34
  }),
41
- /*#__PURE__*/ jsx("div", {
42
- style: {
43
- flex: 1
44
- },
35
+ /*#__PURE__*/ jsx("aside", {
36
+ className: index_module.sideColumn,
45
37
  children: /*#__PURE__*/ jsxs(ResponsiveLayout, {
46
38
  children: [
47
39
  /*#__PURE__*/ jsx(BundleOverall, {
@@ -1 +1 @@
1
- {"version":3,"file":"pages/Overall/index.mjs","sources":["../../../src/pages/Overall/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Flex } from 'antd';\n\nimport { HelpCenter } from '../../components/Overall/help-center';\nimport { BundleAlerts } from '../../components/Alerts';\nimport {\n BundleOverall,\n CompileOverall,\n ProjectOverall,\n} from '../../components/Overall';\nimport { ResponsiveLayout } from './responsiveLayout';\nimport { useProjectInfo } from '../../components/Layout/project-info-context';\n\nimport style from './index.module.scss';\n\nconst Component: React.FC = () => {\n const { project } = useProjectInfo();\n\n if (!project) {\n return null;\n }\n\n const { summary, configs, root: cwd, envinfo, errors, name } = project;\n\n return (\n <div className={style.overall}>\n <Flex style={{ width: '100%' }}>\n <div style={{ flex: 3, marginRight: '16px', maxWidth: '75%' }}>\n <ResponsiveLayout>\n <ProjectOverall\n configs={configs}\n cwd={cwd}\n envinfo={envinfo}\n alerts={errors}\n name={name}\n />\n <BundleAlerts />\n </ResponsiveLayout>\n </div>\n\n <div style={{ flex: 1 }}>\n <ResponsiveLayout>\n <BundleOverall errors={errors} cwd={cwd} />\n <CompileOverall summary={summary} />\n <HelpCenter />\n </ResponsiveLayout>\n </div>\n </Flex>\n </div>\n );\n};\n\nexport const Page = Component;\n\nexport * from './constants';\n"],"names":["Component","project","useProjectInfo","summary","configs","cwd","envinfo","errors","name","style","Flex","ResponsiveLayout","ProjectOverall","BundleAlerts","BundleOverall","CompileOverall","HelpCenter","Page"],"mappings":";;;;;;;;;;AAeA,MAAMA,YAAsB;IAC1B,MAAM,EAAEC,OAAO,EAAE,GAAGC;IAEpB,IAAI,CAACD,SACH,OAAO;IAGT,MAAM,EAAEE,OAAO,EAAEC,OAAO,EAAE,MAAMC,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGP;IAE/D,OAAO,WAAP,GACE,IAAC;QAAI,WAAWQ,aAAAA,OAAa;kBAC3B,mBAACC,MAAIA;YAAC,OAAO;gBAAE,OAAO;YAAO;;8BAC3B,IAAC;oBAAI,OAAO;wBAAE,MAAM;wBAAG,aAAa;wBAAQ,UAAU;oBAAM;8BAC1D,mBAACC,kBAAgBA;;0CACf,IAACC,gBAAcA;gCACb,SAASR;gCACT,KAAKC;gCACL,SAASC;gCACT,QAAQC;gCACR,MAAMC;;0CAER,IAACK,cAAYA,CAAAA;;;;8BAIjB,IAAC;oBAAI,OAAO;wBAAE,MAAM;oBAAE;8BACpB,mBAACF,kBAAgBA;;0CACf,IAACG,eAAaA;gCAAC,QAAQP;gCAAQ,KAAKF;;0CACpC,IAACU,gBAAcA;gCAAC,SAASZ;;0CACzB,IAACa,YAAUA,CAAAA;;;;;;;AAMvB;AAEO,MAAMC,OAAOjB"}
1
+ {"version":3,"file":"pages/Overall/index.mjs","sources":["../../../src/pages/Overall/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Flex } from 'antd';\n\nimport { HelpCenter } from '../../components/Overall/help-center';\nimport { BundleAlerts } from '../../components/Alerts';\nimport {\n BundleOverall,\n CompileOverall,\n ProjectOverall,\n} from '../../components/Overall';\nimport { ResponsiveLayout } from './responsiveLayout';\nimport { useProjectInfo } from '../../components/Layout/project-info-context';\n\nimport style from './index.module.scss';\n\nconst Component: React.FC = () => {\n const { project } = useProjectInfo();\n\n if (!project) {\n return null;\n }\n\n const { summary, configs, root: cwd, envinfo, errors, name } = project;\n\n return (\n <div className={style.overall}>\n <Flex className={style.columns}>\n <main className={style.mainColumn}>\n <ResponsiveLayout>\n <ProjectOverall\n configs={configs}\n cwd={cwd}\n envinfo={envinfo}\n alerts={errors}\n name={name}\n />\n <BundleAlerts />\n </ResponsiveLayout>\n </main>\n\n <aside className={style.sideColumn}>\n <ResponsiveLayout>\n <BundleOverall errors={errors} cwd={cwd} />\n <CompileOverall summary={summary} />\n <HelpCenter />\n </ResponsiveLayout>\n </aside>\n </Flex>\n </div>\n );\n};\n\nexport const Page = Component;\n\nexport * from './constants';\n"],"names":["Component","project","useProjectInfo","summary","configs","cwd","envinfo","errors","name","style","Flex","ResponsiveLayout","ProjectOverall","BundleAlerts","BundleOverall","CompileOverall","HelpCenter","Page"],"mappings":";;;;;;;;;;AAeA,MAAMA,YAAsB;IAC1B,MAAM,EAAEC,OAAO,EAAE,GAAGC;IAEpB,IAAI,CAACD,SACH,OAAO;IAGT,MAAM,EAAEE,OAAO,EAAEC,OAAO,EAAE,MAAMC,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGP;IAE/D,OAAO,WAAP,GACE,IAAC;QAAI,WAAWQ,aAAAA,OAAa;kBAC3B,mBAACC,MAAIA;YAAC,WAAWD,aAAAA,OAAa;;8BAC5B,IAAC;oBAAK,WAAWA,aAAAA,UAAgB;8BAC/B,mBAACE,kBAAgBA;;0CACf,IAACC,gBAAcA;gCACb,SAASR;gCACT,KAAKC;gCACL,SAASC;gCACT,QAAQC;gCACR,MAAMC;;0CAER,IAACK,cAAYA,CAAAA;;;;8BAIjB,IAAC;oBAAM,WAAWJ,aAAAA,UAAgB;8BAChC,mBAACE,kBAAgBA;;0CACf,IAACG,eAAaA;gCAAC,QAAQP;gCAAQ,KAAKF;;0CACpC,IAACU,gBAAcA;gCAAC,SAASZ;;0CACzB,IAACa,YAAUA,CAAAA;;;;;;;AAMvB;AAEO,MAAMC,OAAOjB"}
@@ -1,6 +1,9 @@
1
1
  import "./index_module.css";
2
2
  const index_module = {
3
3
  overall: "overall-MGHzQh",
4
+ columns: "columns-QZp7uT",
5
+ mainColumn: "mainColumn-qPTakG",
6
+ sideColumn: "sideColumn-QYJE_Q",
4
7
  layout: "layout-izKUgB",
5
8
  row: "row-RDk0Pl"
6
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pages/Overall/index.module.mjs","sources":["../../../src/pages/Overall/index.module.scss"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./index_module.css\"\nexport default {\"overall\":\"overall-MGHzQh\",\"layout\":\"layout-izKUgB\",\"row\":\"row-RDk0Pl\"};"],"names":[],"mappings":";AAEA,qBAAe;IAAC,SAAU;IAAiB,QAAS;IAAgB,KAAM;AAAY"}
1
+ {"version":3,"file":"pages/Overall/index.module.mjs","sources":["../../../src/pages/Overall/index.module.scss"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./index_module.css\"\nexport default {\"overall\":\"overall-MGHzQh\",\"columns\":\"columns-QZp7uT\",\"mainColumn\":\"mainColumn-qPTakG\",\"sideColumn\":\"sideColumn-QYJE_Q\",\"layout\":\"layout-izKUgB\",\"row\":\"row-RDk0Pl\"};"],"names":[],"mappings":";AAEA,qBAAe;IAAC,SAAU;IAAiB,SAAU;IAAiB,YAAa;IAAoB,YAAa;IAAoB,QAAS;IAAgB,KAAM;AAAY"}
@@ -15,13 +15,46 @@
15
15
  }
16
16
 
17
17
  .overall-MGHzQh {
18
- justify-content: space-between;
19
- display: flex;
18
+ width: 100%;
19
+ }
20
+
21
+ .columns-QZp7uT {
22
+ align-items: flex-start;
23
+ gap: 16px;
24
+ width: 100%;
25
+ }
26
+
27
+ .mainColumn-qPTakG, .sideColumn-QYJE_Q {
28
+ min-width: 0;
29
+ }
30
+
31
+ .mainColumn-qPTakG {
32
+ flex: 3 1 0;
33
+ }
34
+
35
+ .sideColumn-QYJE_Q {
36
+ flex: 320px;
37
+ min-width: 300px;
38
+ }
39
+
40
+ .sideColumn-QYJE_Q .ant-card {
41
+ background: var(--color-bg-box-subtle);
20
42
  }
21
43
 
22
44
  .layout-izKUgB .row-RDk0Pl {
23
45
  margin-bottom: 16px;
24
46
  }
25
47
 
48
+ @media (max-width: 1200px) {
49
+ .columns-QZp7uT {
50
+ flex-wrap: wrap;
51
+ }
52
+
53
+ .mainColumn-qPTakG, .sideColumn-QYJE_Q {
54
+ flex-basis: 100%;
55
+ width: 100%;
56
+ }
57
+ }
58
+
26
59
 
27
60
  /*# sourceMappingURL=index_module.css.map */