@rsdoctor/components 1.5.18 → 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 (148) hide show
  1. package/dist/components/Alert/ecma-version-check_module.css +1 -1
  2. package/dist/components/Alert/ecma-version-check_module.css.map +1 -1
  3. package/dist/components/Alerts/bundle-alert.mjs +12 -8
  4. package/dist/components/Alerts/bundle-alert.mjs.map +1 -1
  5. package/dist/components/Alerts/bundle.mjs +3 -4
  6. package/dist/components/Alerts/bundle.mjs.map +1 -1
  7. package/dist/components/Alerts/collapse-cjs-require.mjs +6 -14
  8. package/dist/components/Alerts/collapse-cjs-require.mjs.map +1 -1
  9. package/dist/components/Alerts/collapse-cross-chunks.mjs +3 -8
  10. package/dist/components/Alerts/collapse-cross-chunks.mjs.map +1 -1
  11. package/dist/components/Alerts/collapse-esm-cjs.mjs +6 -10
  12. package/dist/components/Alerts/collapse-esm-cjs.mjs.map +1 -1
  13. package/dist/components/Alerts/collapse-module-mixed-chunks.mjs +5 -12
  14. package/dist/components/Alerts/collapse-module-mixed-chunks.mjs.map +1 -1
  15. package/dist/components/Alerts/collapse-side-effects-only-imports.mjs +5 -12
  16. package/dist/components/Alerts/collapse-side-effects-only-imports.mjs.map +1 -1
  17. package/dist/components/Alerts/collapse.mjs +3 -10
  18. package/dist/components/Alerts/collapse.mjs.map +1 -1
  19. package/dist/components/Alerts/collapse_module.css +1 -1
  20. package/dist/components/Alerts/collapse_module.css.map +1 -1
  21. package/dist/components/Alerts/index.module.mjs +7 -0
  22. package/dist/components/Alerts/index.module.mjs.map +1 -0
  23. package/dist/components/Alerts/index_module.css +9 -0
  24. package/dist/components/Alerts/index_module.css.map +1 -0
  25. package/dist/components/Alerts/list.mjs +0 -3
  26. package/dist/components/Alerts/list.mjs.map +1 -1
  27. package/dist/components/Card/size.d.ts +1 -0
  28. package/dist/components/Card/size.mjs +29 -7
  29. package/dist/components/Card/size.mjs.map +1 -1
  30. package/dist/components/Card/size.module.mjs +1 -0
  31. package/dist/components/Card/size.module.mjs.map +1 -1
  32. package/dist/components/Card/size_module.css +5 -2
  33. package/dist/components/Card/size_module.css.map +1 -1
  34. package/dist/components/Charts/TimelineCharts/index.mjs +118 -94
  35. package/dist/components/Charts/TimelineCharts/index.mjs.map +1 -1
  36. package/dist/components/Charts/TreeMap.d.ts +2 -1
  37. package/dist/components/Charts/TreeMap.mjs +111 -126
  38. package/dist/components/Charts/TreeMap.mjs.map +1 -1
  39. package/dist/components/Charts/constants.d.ts +1 -0
  40. package/dist/components/Charts/constants.mjs +11 -1
  41. package/dist/components/Charts/constants.mjs.map +1 -1
  42. package/dist/components/Charts/index.mjs +3 -1
  43. package/dist/components/Charts/index.mjs.map +1 -1
  44. package/dist/components/Charts/loader.css +1 -1
  45. package/dist/components/Charts/loader.css.map +1 -1
  46. package/dist/components/Charts/treeMapSize.d.ts +10 -0
  47. package/dist/components/Charts/treeMapSize.mjs +17 -0
  48. package/dist/components/Charts/treeMapSize.mjs.map +1 -0
  49. package/dist/components/Charts/treeMapSize.test.d.ts +1 -0
  50. package/dist/components/Charts/treeMapSize.test.mjs +44 -0
  51. package/dist/components/Charts/treeMapSize.test.mjs.map +1 -0
  52. package/dist/components/Charts/treemap_module.css +6 -5
  53. package/dist/components/Charts/treemap_module.css.map +1 -1
  54. package/dist/components/FileTree/index.css +0 -1
  55. package/dist/components/FileTree/index.css.map +1 -1
  56. package/dist/components/FileTree/index.mjs +3 -4
  57. package/dist/components/FileTree/index.mjs.map +1 -1
  58. package/dist/components/Keyword/style_module.css +0 -1
  59. package/dist/components/Keyword/style_module.css.map +1 -1
  60. package/dist/components/Layout/header.mjs +38 -16
  61. package/dist/components/Layout/header.mjs.map +1 -1
  62. package/dist/components/Layout/header.module.mjs +5 -2
  63. package/dist/components/Layout/header.module.mjs.map +1 -1
  64. package/dist/components/Layout/header_module.css +69 -21
  65. package/dist/components/Layout/header_module.css.map +1 -1
  66. package/dist/components/Layout/index.mjs +34 -8
  67. package/dist/components/Layout/index.mjs.map +1 -1
  68. package/dist/components/Layout/menus.mjs +9 -6
  69. package/dist/components/Layout/menus.mjs.map +1 -1
  70. package/dist/components/Layout/rsdoctor-title-logo-dark.mjs +2 -0
  71. package/dist/components/Loader/Analysis/files.mjs +16 -17
  72. package/dist/components/Loader/Analysis/files.mjs.map +1 -1
  73. package/dist/components/Loader/Analysis/style_module.css +13 -14
  74. package/dist/components/Loader/Analysis/style_module.css.map +1 -1
  75. package/dist/components/Loader/executions.mjs +5 -13
  76. package/dist/components/Loader/executions.mjs.map +1 -1
  77. package/dist/components/Overall/DataSummary.d.ts +1 -1
  78. package/dist/components/Overall/DataSummary.mjs +21 -20
  79. package/dist/components/Overall/DataSummary.mjs.map +1 -1
  80. package/dist/components/Overall/DataSummary.module.mjs +1 -12
  81. package/dist/components/Overall/DataSummary.module.mjs.map +1 -1
  82. package/dist/components/Overall/DataSummary_module.css +13 -73
  83. package/dist/components/Overall/DataSummary_module.css.map +1 -1
  84. package/dist/components/Overall/bundle.mjs +2 -3
  85. package/dist/components/Overall/bundle.mjs.map +1 -1
  86. package/dist/components/Overall/bundle.module.mjs +1 -0
  87. package/dist/components/Overall/bundle.module.mjs.map +1 -1
  88. package/dist/components/Overall/bundle_module.css +12 -4
  89. package/dist/components/Overall/bundle_module.css.map +1 -1
  90. package/dist/components/Overall/list_module.css +18 -2
  91. package/dist/components/Overall/list_module.css.map +1 -1
  92. package/dist/components/Overall/overview_module.css +13 -6
  93. package/dist/components/Overall/overview_module.css.map +1 -1
  94. package/dist/components/Overall/project.mjs +1 -1
  95. package/dist/components/Overall/project.mjs.map +1 -1
  96. package/dist/components/Overall/project_module.css +8 -0
  97. package/dist/components/Overall/project_module.css.map +1 -1
  98. package/dist/components/base/CodeViewer/index.d.ts +1 -1
  99. package/dist/components/base/CodeViewer/index.mjs +5 -3
  100. package/dist/components/base/CodeViewer/index.mjs.map +1 -1
  101. package/dist/components/base/CodeViewer/interface.d.ts +1 -2
  102. package/dist/components/base/DiffViewer/index.d.ts +1 -1
  103. package/dist/components/base/DiffViewer/index.mjs +4 -1
  104. package/dist/components/base/DiffViewer/index.mjs.map +1 -1
  105. package/dist/components/base/DiffViewer/interface.d.ts +1 -2
  106. package/dist/pages/BundleSize/components/asset_module.css +7 -5
  107. package/dist/pages/BundleSize/components/asset_module.css.map +1 -1
  108. package/dist/pages/BundleSize/components/card_module.css +9 -3
  109. package/dist/pages/BundleSize/components/card_module.css.map +1 -1
  110. package/dist/pages/BundleSize/components/cards.mjs +5 -6
  111. package/dist/pages/BundleSize/components/cards.mjs.map +1 -1
  112. package/dist/pages/BundleSize/components/index.mjs +11 -8
  113. package/dist/pages/BundleSize/components/index.mjs.map +1 -1
  114. package/dist/pages/BundleSize/components/index.module.mjs +1 -6
  115. package/dist/pages/BundleSize/components/index.module.mjs.map +1 -1
  116. package/dist/pages/BundleSize/components/index_module.css +0 -37
  117. package/dist/pages/BundleSize/components/index_module.css.map +1 -1
  118. package/dist/pages/BundleSize/components/search-modal.mjs +5 -5
  119. package/dist/pages/BundleSize/components/search-modal.mjs.map +1 -1
  120. package/dist/pages/BundleSize/components/search-modal.module.mjs +10 -0
  121. package/dist/pages/BundleSize/components/search-modal.module.mjs.map +1 -0
  122. package/dist/pages/BundleSize/components/search-modal_module.css +39 -0
  123. package/dist/pages/BundleSize/components/search-modal_module.css.map +1 -0
  124. package/dist/pages/BundleSize/components/tree-graph.mjs +4 -4
  125. package/dist/pages/BundleSize/components/tree-graph.mjs.map +1 -1
  126. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css +6 -2
  127. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css.map +1 -1
  128. package/dist/pages/ModuleAnalyze/index.css +4 -6
  129. package/dist/pages/ModuleAnalyze/index.css.map +1 -1
  130. package/dist/pages/ModuleAnalyze/index.mjs +3 -4
  131. package/dist/pages/ModuleAnalyze/index.mjs.map +1 -1
  132. package/dist/pages/Overall/index.mjs +5 -13
  133. package/dist/pages/Overall/index.mjs.map +1 -1
  134. package/dist/pages/Overall/index.module.mjs +3 -0
  135. package/dist/pages/Overall/index.module.mjs.map +1 -1
  136. package/dist/pages/Overall/index_module.css +35 -2
  137. package/dist/pages/Overall/index_module.css.map +1 -1
  138. package/dist/pages/Overall/responsiveLayout.mjs +3 -3
  139. package/dist/pages/Overall/responsiveLayout.mjs.map +1 -1
  140. package/dist/pages/WebpackLoaders/Analysis/index.mjs +3 -3
  141. package/dist/pages/WebpackLoaders/Analysis/index.mjs.map +1 -1
  142. package/dist/pages/WebpackLoaders/Overall/index.mjs +1 -1
  143. package/dist/pages/WebpackLoaders/Overall/index.mjs.map +1 -1
  144. package/dist/static/image/rsdoctor-title-logo-dark.png +0 -0
  145. package/dist/utils/hooks.d.ts +1 -0
  146. package/dist/utils/hooks.mjs +6 -1
  147. package/dist/utils/hooks.mjs.map +1 -1
  148. package/package.json +4 -4
@@ -0,0 +1,39 @@
1
+ .modal-jTgoC2 .ant-input-affix-wrapper {
2
+ width: 490px;
3
+ padding: 4px 5px;
4
+ }
5
+
6
+ .list-osNsTS .ant-spin-container {
7
+ max-height: 30rem;
8
+ overflow: auto;
9
+ }
10
+
11
+ .listItemInteractive-AC3tqb:hover {
12
+ background-color: var(--color-bg-box-elevated);
13
+ cursor: pointer;
14
+ }
15
+
16
+ .searchBtn-ZhRlk8 {
17
+ color: #fff;
18
+ }
19
+
20
+ .searchBtn-ZhRlk8 > span {
21
+ position: relative;
22
+ }
23
+
24
+ .searchBtn-ZhRlk8:before {
25
+ content: "";
26
+ opacity: 1;
27
+ border-radius: inherit;
28
+ background: linear-gradient(135deg, #6253e1, #04befe);
29
+ transition: all .3s;
30
+ position: absolute;
31
+ inset: -1px;
32
+ }
33
+
34
+ .searchBtn-ZhRlk8:hover:before {
35
+ opacity: 0;
36
+ }
37
+
38
+
39
+ /*# sourceMappingURL=search-modal_module.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://./src/pages/BundleSize/components/search-modal.module.scss"],"names":[],"mappings":"AAAA;EACE,YAAY;EACZ,gBAAgB;AAClB;;AAHoE;EAMlE,iBAAiB;EACjB,cAAc;AAChB;;AARqI;EAWnI,8CAA8C;EAC9C,eAAe;AACjB;;AAb6N;EAgB3N,WAAW;AACb;;AAjBmP;EAoBjP,kBAAkB;AACpB;;AArBqR;EAwBnR,WAAW;EACX,UAAU;EACV,sBAAsB;EACtB,qDAAqD;EACrD,mBAAmB;EACnB,kBAAkB;EAClB,WAAW;AACb;;AA/Bwb;EAkCtb,UAAU;AACZ","sourcesContent":[".modal :global .ant-input-affix-wrapper{padding:4px 5px;width:490px}.list :global .ant-spin-container{overflow:auto;max-height:30rem}.listItemInteractive:hover{background-color:var(--color-bg-box-elevated);cursor:pointer}.searchBtn{color:#fff}.searchBtn>span{position:relative}.searchBtn::before{content:\"\";background:linear-gradient(135deg, #6253e1, #04befe);position:absolute;inset:-1px;opacity:1;transition:all .3s;border-radius:inherit}.searchBtn:hover::before{opacity:0}"],"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,
@@ -236,7 +236,7 @@ const TreeGraph = /*#__PURE__*/ memo(({ cwd, summary, entryPoints })=>{
236
236
  },
237
237
  children: /*#__PURE__*/ jsx(InfoCircleOutlined, {
238
238
  style: {
239
- color: 'rgba(0,0,0,.45)'
239
+ color: 'var(--text-color-secondary)'
240
240
  }
241
241
  })
242
242
  })
@@ -269,7 +269,7 @@ const TreeGraph = /*#__PURE__*/ memo(({ cwd, summary, entryPoints })=>{
269
269
  },
270
270
  children: /*#__PURE__*/ jsx(InfoCircleOutlined, {
271
271
  style: {
272
- color: 'rgba(0,0,0,.45)'
272
+ color: 'var(--text-color-secondary)'
273
273
  }
274
274
  })
275
275
  })
@@ -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: 'rgba(0,0,0,.45)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => onChangeAsset(Number(value))}\n addonAfter={selectAfter('chunk')}\n />\n </Col>\n <Col span={6}>\n <InputNumber\n min={0}\n style={{ width: '95%' }}\n addonBefore={\n <Space>\n <Typography.Text 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: 'rgba(0,0,0,.45)' }}\n />\n </Tooltip>\n </Space>\n }\n onChange={(value) => {\n onChangeModule(Number(value));\n }}\n addonAfter={selectAfter('module')}\n />\n </Col>\n </Row>\n <Row>\n <SearchModal />\n </Row>\n {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,KAAK,CAAC,KAAK;IAEtC,MAAM2B,eAAeC,YACnB,CAACC,OAAiB,CAAC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KZ,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,KAAK,CAAC,KAAK;IAEtC,MAAM2B,eAAeC,YACnB,CAACC,OAAiB,CAACC;YACjB,IAAID,AAAS,aAATA,MACFf,cAAcgB;iBACT,IAAID,AAAS,YAAT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WAAW,IAAI;4CAAC,QAAM;sDAAC;;;;;;uCAWpC,IAACuB,OAAKA,CAAAA;;;YAGTpE;;;AAGP"}
@@ -50,10 +50,14 @@
50
50
  display: inline-block;
51
51
  }
52
52
 
53
+ .file-tree-com-titles-box {
54
+ border: 1px solid #0000;
55
+ }
56
+
53
57
  .file-tree-com-titles-box:hover {
58
+ background-color: var(--color-bg-box-elevated, #f0f3f5);
59
+ border-color: var(--color-border, #e5e6eb);
54
60
  cursor: pointer;
55
- background-color: #f0f3f5;
56
- border: 1px solid #e5e6eb;
57
61
  width: 80%;
58
62
  }
59
63
 
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/pages/ModuleAnalyze/components/fileTreeCom.scss"],"names":[],"mappings":"AAAA;EACE,SAAS;AACX;;AAFwB;EAKtB,mBAAmB;EACnB,UAAU;EACV,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,gBAAgB;AAClB;;AAXgJ;EAc9I,sBAAsB;EACtB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,SAAS;EACT,cAAc;EACd,qBAAqB;EACrB,qBAAqB;EACrB,kBAAkB;AACpB;;AAvBkX;EA0BhX,wBAAwB;AAC1B;;AA3B2c;EA8Bzc,aAAa;AACf;;AA/Bkf;EAkChf,cAAc;AAChB;;AAnC+hB;EAsC7hB,cAAc;EACd,mBAAmB;AACrB;;AAxC0qB;EA2CxqB,qBAAqB;EACrB,kBAAkB;AACpB;;AA7C2vB;EAgDzvB,eAAe;EACf,qBAAqB;AACvB;;AAlDozB;EAqDlzB,eAAe;EACf,yBAAyB;EACzB,yBAAyB;EACzB,UAAU;AACZ;;AAzD+5B;EA4D75B,cAAc;AAChB;;AA7Dm+B;EAgEj+B,gBAAgB;AAClB;;AAjE0hC;EAoExhC,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;AAvEomC;EA0ElmC,WAAW;EACX,qBAAqB;AACvB;;AA5E+pC;EA+E7pC,yBAAyB;EACzB,oBAAoB;AACtB;;AAjF8uC;EAoF5uC,wBAAwB;AAC1B;;AArFuyC;EAwFryC,2BAA2B;AAC7B;;AAzFg4C;EA4F93C,sBAAsB;EACtB,aAAa;AACf;;AA9Fu/C;EAiGr/C,eAAe;EACf,iBAAiB;EACjB,aAAa;AACf;;AApGkpD;EAuGhpD,eAAe;AACjB;;AAxGw5D;EA2Gt5D,sBAAsB;AACxB;;AA5G+gE;EA+G7gE,oBAAoB;AACtB;;AAhH+nE;EAmH7nE,eAAe;EACf,cAAc;AAChB;;AArH6vE;EAwH3vE,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;AA3Hi0E;EA8H/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}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/ModuleAnalyze/components/fileTreeCom.scss"],"names":[],"mappings":"AAAA;EACE,SAAS;AACX;;AAFwB;EAKtB,mBAAmB;EACnB,UAAU;EACV,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,gBAAgB;AAClB;;AAXgJ;EAc9I,sBAAsB;EACtB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,SAAS;EACT,cAAc;EACd,qBAAqB;EACrB,qBAAqB;EACrB,kBAAkB;AACpB;;AAvBkX;EA0BhX,wBAAwB;AAC1B;;AA3B2c;EA8Bzc,aAAa;AACf;;AA/Bkf;EAkChf,cAAc;AAChB;;AAnC+hB;EAsC7hB,cAAc;EACd,mBAAmB;AACrB;;AAxC0qB;EA2CxqB,qBAAqB;EACrB,kBAAkB;AACpB;;AA7C2vB;EAgDzvB,eAAe;EACf,qBAAqB;AACvB;;AAlDozB;EAqDlzB,uBAAuB;AACzB;;AAtD64B;EAyD34B,uDAAuD;EACvD,0CAA0C;EAC1C,eAAe;EACf,UAAU;AACZ;;AA7DuiC;EAgEriC,cAAc;AAChB;;AAjE2mC;EAoEzmC,gBAAgB;AAClB;;AArEkqC;EAwEhqC,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;AA3E4uC;EA8E1uC,WAAW;EACX,qBAAqB;AACvB;;AAhFuyC;EAmFryC,yBAAyB;EACzB,oBAAoB;AACtB;;AArFs3C;EAwFp3C,wBAAwB;AAC1B;;AAzF+6C;EA4F76C,2BAA2B;AAC7B;;AA7FwgD;EAgGtgD,sBAAsB;EACtB,aAAa;AACf;;AAlG+nD;EAqG7nD,eAAe;EACf,iBAAiB;EACjB,aAAa;AACf;;AAxG0xD;EA2GxxD,eAAe;AACjB;;AA5GgiE;EA+G9hE,sBAAsB;AACxB;;AAhHupE;EAmHrpE,oBAAoB;AACtB;;AApHuwE;EAuHrwE,eAAe;EACf,cAAc;AAChB;;AAzHq4E;EA4Hn4E,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;AA/Hy8E;EAkIv8E,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{border-width:1px;border-style:solid;border-color:rgba(0,0,0,0)}.file-tree-com-titles-box:hover{background-color:var(--color-bg-box-elevated, #f0f3f5);border-color:var(--color-border, #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}"],"sourceRoot":""}
@@ -17,16 +17,15 @@
17
17
  }
18
18
 
19
19
  .module-analyze-bailout-card {
20
+ border: 1px solid var(--color-border-secondary);
20
21
  box-shadow: none;
21
- background: #fff;
22
- border: 1px solid #0505050f;
22
+ background: var(--color-bg-box-elevated);
23
23
  border-radius: 8px;
24
24
  margin-top: 16px;
25
25
  margin-bottom: 24px;
26
26
  }
27
27
 
28
28
  .module-analyze-bailout-card-title {
29
- color: #1c1f23cc;
30
29
  margin-bottom: 12px;
31
30
  font-size: 14px;
32
31
  font-weight: 600;
@@ -40,7 +39,7 @@
40
39
  }
41
40
 
42
41
  .module-analyze-bailout-card-item {
43
- border-bottom: 1px solid #161a2314;
42
+ border-bottom: 1px solid var(--color-border);
44
43
  justify-content: space-between;
45
44
  align-items: center;
46
45
  padding: 6px 0;
@@ -52,14 +51,13 @@
52
51
  }
53
52
 
54
53
  .module-analyze-bailout-card-text {
55
- color: #1c1f23cc;
56
54
  max-width: calc(100% - 70px);
57
55
  font-size: 12px;
58
56
  font-weight: 400;
59
57
  }
60
58
 
61
59
  .module-analyze-bailout-card-meta {
62
- color: #1c1f2373;
60
+ color: var(--text-color-secondary);
63
61
  font-size: 12px;
64
62
  }
65
63
 
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/pages/ModuleAnalyze/index.scss"],"names":[],"mappings":"AAAA;EACE,aAAa;EACb,gBAAgB;AAClB;;AAHuD;EAMrD,eAAe;AACjB;;AAPsH;EAUpH,sBAAsB;EACtB,aAAa;AACf;;AAZ6K;EAe3K,iBAAiB;AACnB;;AAhBwN;EAmBtN,gBAAgB;EAChB,gBAAgB;EAChB,2BAA2B;EAC3B,kBAAkB;EAClB,gBAAgB;EAChB,mBAAmB;AACrB;;AAzB2W;EA4BzW,gBAAgB;EAChB,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,qBAAqB;AACvB;;AAjC6e;EAoC3e,sBAAsB;EACtB,QAAQ;EACR,aAAa;AACf;;AAvC0jB;EA0CxjB,kCAAkC;EAClC,8BAA8B;EAC9B,mBAAmB;EACnB,cAAc;EACd,aAAa;AACf;;AA/CmtB;EAkDjtB,mBAAmB;AACrB;;AAnDmxB;EAsDjxB,gBAAgB;EAChB,4BAA4B;EAC5B,eAAe;EACf,gBAAgB;AAClB;;AA1Dw4B;EA6Dt4B,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)}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/ModuleAnalyze/index.scss"],"names":[],"mappings":"AAAA;EACE,aAAa;EACb,gBAAgB;AAClB;;AAHuD;EAMrD,eAAe;AACjB;;AAPsH;EAUpH,sBAAsB;EACtB,aAAa;AACf;;AAZ6K;EAe3K,iBAAiB;AACnB;;AAhBwN;EAmBtN,+CAA+C;EAC/C,gBAAgB;EAChB,wCAAwC;EACxC,kBAAkB;EAClB,gBAAgB;EAChB,mBAAmB;AACrB;;AAzBiZ;EA4B/Y,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,qBAAqB;AACvB;;AAhC2f;EAmCzf,sBAAsB;EACtB,QAAQ;EACR,aAAa;AACf;;AAtCwkB;EAyCtkB,4CAA4C;EAC5C,8BAA8B;EAC9B,mBAAmB;EACnB,cAAc;EACd,aAAa;AACf;;AA9CkuB;EAiDhuB,mBAAmB;AACrB;;AAlDkyB;EAqDhyB,4BAA4B;EAC5B,eAAe;EACf,gBAAgB;AAClB;;AAxD+3B;EA2D73B,kCAAkC;EAClC,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 var(--color-border-secondary);box-shadow:none;background:var(--color-bg-box-elevated);margin-bottom:24px}.module-analyze-bailout-card-title{display:inline-block;font-size:14px;margin-bottom:12px;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 var(--color-border)}.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}.module-analyze-bailout-card-meta{font-size:12px;color:var(--text-color-secondary)}"],"sourceRoot":""}
@@ -40,9 +40,9 @@ const ModuleAnalyzeComponent = ({ modules, cwd, moduleId, show, setShow })=>{
40
40
  children: getShortPath(module.path)
41
41
  }),
42
42
  /*#__PURE__*/ jsx(Typography.Text, {
43
+ type: "secondary",
43
44
  style: {
44
- fontSize: 12,
45
- color: 'rgba(0, 0, 0, 0.45)'
45
+ fontSize: 12
46
46
  },
47
47
  children: `Current Module: ${module.path}`
48
48
  })
@@ -95,8 +95,7 @@ const ModuleAnalyzeComponent = ({ modules, cwd, moduleId, show, setShow })=>{
95
95
  }),
96
96
  /*#__PURE__*/ jsx(Typography.Text, {
97
97
  style: {
98
- fontSize: 14,
99
- color: 'rgba(28, 31, 35, 0.8)'
98
+ fontSize: 14
100
99
  },
101
100
  children: "Current Module Imported Reasons Tree"
102
101
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"pages/ModuleAnalyze/index.mjs","sources":["../../../src/pages/ModuleAnalyze/index.tsx"],"sourcesContent":["import { SDK } from '@rsdoctor/types';\nimport { Badge, Card, Drawer, Popover, Space, Tabs, Typography } from 'antd';\nimport React, { useState } from 'react';\nimport { ServerAPIProvider } from 'src/components/Manifest';\nimport { getShortPath } from 'src/utils';\nimport { ModuleGraphListContext } from '../BundleSize/config';\nimport { ModuleFilesTree, BailoutReasonCard } from './fileTree';\nimport './index.scss';\nimport { drawerWidth } from '../../constants';\nimport {\n LeftSquareOutlined,\n QuestionCircleOutlined,\n RightSquareTwoTone,\n} from '@ant-design/icons';\n\nexport enum TabList {\n Reasons,\n Dependencies,\n}\n\nconst tabslist = [\n {\n key: TabList[TabList.Reasons],\n label: TabList[TabList.Reasons],\n },\n {\n key: TabList[TabList.Dependencies],\n label: TabList[TabList.Dependencies],\n },\n] as unknown as { key: string; label: string }[];\n\nexport const ModuleAnalyzeComponent: React.FC<{\n modules: SDK.ModuleData[];\n cwd: string;\n moduleId: string | number;\n show: boolean;\n setShow: (arg: boolean) => void;\n}> = ({ modules, cwd, moduleId, show, setShow }) => {\n const [selectedChunk, _setSelectedChunk] = useState('' as string);\n const [activeTabKey, setActiveTabKey] = useState(TabList[TabList.Reasons]);\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetModuleDetails}\n body={{ moduleId: +moduleId }}\n >\n {({ module, dependencies, sideEffectCodes }) => {\n return (\n <Drawer\n title={\n <div className=\"module-analyze-box\">\n <Typography.Text>{getShortPath(module.path)}</Typography.Text>\n <Typography.Text\n style={{ fontSize: 12, color: 'rgba(0, 0, 0, 0.45)' }}\n >\n {`Current Module: ${module.path}`}\n </Typography.Text>\n </div>\n }\n open={show}\n maskClosable\n width={drawerWidth * 0.8}\n onClose={() => setShow(false)}\n >\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAllChunkGraph}\n body={{}}\n >\n {(_chunks) => {\n return (\n <ModuleGraphListContext.Consumer>\n {({ moduleJumpList, setModuleJumpList }) => {\n return (\n <Tabs\n defaultActiveKey=\"bailout\"\n items={[\n {\n key: 'moduleTree',\n label: 'Module Tree',\n children: (\n <Card\n style={{ minHeight: 400 }}\n tabList={tabslist}\n activeTabKey={activeTabKey}\n tabProps={{\n size: 'small',\n style: {\n fontSize: 12,\n },\n }}\n onTabChange={(k) => setActiveTabKey(k)}\n styles={{\n title: { paddingTop: 0 },\n }}\n title={\n <Space style={{ padding: '10px 0px' }}>\n <LeftSquareOutlined\n onClick={() => {\n const _list = [\n ...moduleJumpList.slice(0, -1),\n ];\n setModuleJumpList(_list);\n }}\n />\n <Typography.Text\n style={{\n fontSize: 14,\n color: 'rgba(28, 31, 35, 0.8)',\n }}\n >\n Current Module Imported Reasons Tree\n </Typography.Text>\n <Popover\n content={\n <div>\n <div>\n <Badge\n status=\"success\"\n text=\" \"\n />\n <RightSquareTwoTone />\n <Typography.Text>\n {\n ': Jump button, click to jump to the Module dependency analysis page of this module.'\n }\n </Typography.Text>\n </div>\n </div>\n }\n title=\"Usage\"\n >\n <QuestionCircleOutlined />\n </Popover>\n </Space>\n }\n >\n <ModuleFilesTree\n curModule={module}\n modules={modules}\n dependencies={dependencies}\n cwd={cwd}\n selectedChunk={selectedChunk}\n activeTabKey={activeTabKey}\n />\n </Card>\n ),\n },\n {\n key: 'bailout',\n label: 'Bailout',\n children: (\n <div style={{ marginTop: 16 }}>\n <BailoutReasonCard\n reasons={module.bailoutReason}\n sideEffectCodes={sideEffectCodes}\n modulePath={module.path}\n />\n </div>\n ),\n },\n ]}\n />\n );\n }}\n </ModuleGraphListContext.Consumer>\n );\n }}\n </ServerAPIProvider>\n </Drawer>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["TabList","tabslist","ModuleAnalyzeComponent","modules","cwd","moduleId","show","setShow","selectedChunk","_setSelectedChunk","useState","activeTabKey","setActiveTabKey","ServerAPIProvider","SDK","module","dependencies","sideEffectCodes","Drawer","Typography","getShortPath","drawerWidth","_chunks","ModuleGraphListContext","moduleJumpList","setModuleJumpList","Tabs","Card","k","Space","LeftSquareOutlined","_list","Popover","Badge","RightSquareTwoTone","QuestionCircleOutlined","ModuleFilesTree","BailoutReasonCard"],"mappings":";;;;;;;;;;;AAeO,IAAKA,wBAAOA,WAAAA,GAAAA,SAAPA,OAAO;;;WA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IA;gDACH,OAAO;oDAAE,WAAW;gDAAI;gDACxB,SAAS1B;gDACT,cAAcU;gDACd,UAAU;oDACR,MAAM;oDACN,OAAO;wDACL,UAAU;oDACZ;gDACF;gDACA,aAAa,CAACiB,IAAMhB,gBAAgBgB;gDACpC,QAAQ;oDACN,OAAO;wDAAE,YAAY;oDAAE;gDACzB;gDACA,qBACE,KAACC,OAAKA;oDAAC,OAAO;wDAAE,SAAS;oDAAW;;sEAClC,IAACC,oBAAkBA;4DACjB,SAAS;gEACP,MAAMC,QAAQ;uEACTP,eAAe,KAAK,CAAC,GAAG;iEAC5B;gEACDC,kBAAkBM;4DACpB;;sEAEF,IAACZ,WAAW,IAAI;4DACd,OAAO;gEACL,UAAU;gEACV,OAAO;4DACT;sEACD;;sEAGD,IAACa,SAAOA;4DACN,uBACE,IAAC;0EACC,mBAAC;;sFACC,IAACC,OAAKA;4EACJ,QAAO;4EACP,MAAK;;sFAEP,IAACC,oBAAkBA,CAAAA;sFACnB,IAACf,WAAW,IAAI;sFAEZ;;;;;4DAMV,OAAM;sEAEN,kBAACgB,wBAAsBA,CAAAA;;;;0DAK7B,kBAACC,iBAAeA;oDACd,WAAWrB;oDACX,SAASZ;oDACT,cAAca;oDACd,KAAKZ;oDACL,eAAeI;oDACf,cAAcG;;;wCAItB;wCACA;4CACE,KAAK;4CACL,OAAO;4CACP,UAAU,WAAV,GACE,IAAC;gDAAI,OAAO;oDAAE,WAAW;gDAAG;0DAC1B,kBAAC0B,mBAAiBA;oDAChB,SAAStB,OAAO,aAAa;oDAC7B,iBAAiBE;oDACjB,YAAYF,OAAO,IAAI;;;wCAI/B;qCACD;;;;;;AAa3B"}
1
+ {"version":3,"file":"pages/ModuleAnalyze/index.mjs","sources":["../../../src/pages/ModuleAnalyze/index.tsx"],"sourcesContent":["import { SDK } from '@rsdoctor/types';\nimport { Badge, Card, Drawer, Popover, Space, Tabs, Typography } from 'antd';\nimport React, { useState } from 'react';\nimport { ServerAPIProvider } from 'src/components/Manifest';\nimport { getShortPath } from 'src/utils';\nimport { ModuleGraphListContext } from '../BundleSize/config';\nimport { ModuleFilesTree, BailoutReasonCard } from './fileTree';\nimport './index.scss';\nimport { drawerWidth } from '../../constants';\nimport {\n LeftSquareOutlined,\n QuestionCircleOutlined,\n RightSquareTwoTone,\n} from '@ant-design/icons';\n\nexport enum TabList {\n Reasons,\n Dependencies,\n}\n\nconst tabslist = [\n {\n key: TabList[TabList.Reasons],\n label: TabList[TabList.Reasons],\n },\n {\n key: TabList[TabList.Dependencies],\n label: TabList[TabList.Dependencies],\n },\n] as unknown as { key: string; label: string }[];\n\nexport const ModuleAnalyzeComponent: React.FC<{\n modules: SDK.ModuleData[];\n cwd: string;\n moduleId: string | number;\n show: boolean;\n setShow: (arg: boolean) => void;\n}> = ({ modules, cwd, moduleId, show, setShow }) => {\n const [selectedChunk, _setSelectedChunk] = useState('' as string);\n const [activeTabKey, setActiveTabKey] = useState(TabList[TabList.Reasons]);\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetModuleDetails}\n body={{ moduleId: +moduleId }}\n >\n {({ module, dependencies, sideEffectCodes }) => {\n return (\n <Drawer\n title={\n <div className=\"module-analyze-box\">\n <Typography.Text>{getShortPath(module.path)}</Typography.Text>\n <Typography.Text type=\"secondary\" style={{ fontSize: 12 }}>\n {`Current Module: ${module.path}`}\n </Typography.Text>\n </div>\n }\n open={show}\n maskClosable\n width={drawerWidth * 0.8}\n onClose={() => setShow(false)}\n >\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetAllChunkGraph}\n body={{}}\n >\n {(_chunks) => {\n return (\n <ModuleGraphListContext.Consumer>\n {({ moduleJumpList, setModuleJumpList }) => {\n return (\n <Tabs\n defaultActiveKey=\"bailout\"\n items={[\n {\n key: 'moduleTree',\n label: 'Module Tree',\n children: (\n <Card\n style={{ minHeight: 400 }}\n tabList={tabslist}\n activeTabKey={activeTabKey}\n tabProps={{\n size: 'small',\n style: {\n fontSize: 12,\n },\n }}\n onTabChange={(k) => setActiveTabKey(k)}\n styles={{\n title: { paddingTop: 0 },\n }}\n title={\n <Space style={{ padding: '10px 0px' }}>\n <LeftSquareOutlined\n onClick={() => {\n const _list = [\n ...moduleJumpList.slice(0, -1),\n ];\n setModuleJumpList(_list);\n }}\n />\n <Typography.Text style={{ fontSize: 14 }}>\n Current Module Imported Reasons Tree\n </Typography.Text>\n <Popover\n content={\n <div>\n <div>\n <Badge\n status=\"success\"\n text=\" \"\n />\n <RightSquareTwoTone />\n <Typography.Text>\n {\n ': Jump button, click to jump to the Module dependency analysis page of this module.'\n }\n </Typography.Text>\n </div>\n </div>\n }\n title=\"Usage\"\n >\n <QuestionCircleOutlined />\n </Popover>\n </Space>\n }\n >\n <ModuleFilesTree\n curModule={module}\n modules={modules}\n dependencies={dependencies}\n cwd={cwd}\n selectedChunk={selectedChunk}\n activeTabKey={activeTabKey}\n />\n </Card>\n ),\n },\n {\n key: 'bailout',\n label: 'Bailout',\n children: (\n <div style={{ marginTop: 16 }}>\n <BailoutReasonCard\n reasons={module.bailoutReason}\n sideEffectCodes={sideEffectCodes}\n modulePath={module.path}\n />\n </div>\n ),\n },\n ]}\n />\n );\n }}\n </ModuleGraphListContext.Consumer>\n );\n }}\n </ServerAPIProvider>\n </Drawer>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["TabList","tabslist","ModuleAnalyzeComponent","modules","cwd","moduleId","show","setShow","selectedChunk","_setSelectedChunk","useState","activeTabKey","setActiveTabKey","ServerAPIProvider","SDK","module","dependencies","sideEffectCodes","Drawer","Typography","getShortPath","drawerWidth","_chunks","ModuleGraphListContext","moduleJumpList","setModuleJumpList","Tabs","Card","k","Space","LeftSquareOutlined","_list","Popover","Badge","RightSquareTwoTone","QuestionCircleOutlined","ModuleFilesTree","BailoutReasonCard"],"mappings":";;;;;;;;;;;AAeO,IAAKA,wBAAOA,WAAAA,GAAAA,SAAPA,OAAO;;;WAAPA;;AAKZ,MAAMC,WAAW;IACf;QACE,KAAK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,SAAS1B;gDACT,cAAcU;gDACd,UAAU;oDACR,MAAM;oDACN,OAAO;wDACL,UAAU;oDACZ;gDACF;gDACA,aAAa,CAACiB,IAAMhB,gBAAgBgB;gDACpC,QAAQ;oDACN,OAAO;wDAAE,YAAY;oDAAE;gDACzB;gDACA,qBACE,KAACC,OAAKA;oDAAC,OAAO;wDAAE,SAAS;oDAAW;;sEAClC,IAACC,oBAAkBA;4DACjB,SAAS;gEACP,MAAMC,QAAQ;uEACTP,eAAe,KAAK,CAAC,GAAG;iEAC5B;gEACDC,kBAAkBM;4DACpB;;sEAEF,IAACZ,WAAW,IAAI;4DAAC,OAAO;gEAAE,UAAU;4DAAG;sEAAG;;sEAG1C,IAACa,SAAOA;4DACN,uBACE,IAAC;0EACC,mBAAC;;sFACC,IAACC,OAAKA;4EACJ,QAAO;4EACP,MAAK;;sFAEP,IAACC,oBAAkBA,CAAAA;sFACnB,IAACf,WAAW,IAAI;sFAEZ;;;;;4DAMV,OAAM;sEAEN,kBAACgB,wBAAsBA,CAAAA;;;;0DAK7B,kBAACC,iBAAeA;oDACd,WAAWrB;oDACX,SAASZ;oDACT,cAAca;oDACd,KAAKZ;oDACL,eAAeI;oDACf,cAAcG;;;wCAItB;wCACA;4CACE,KAAK;4CACL,OAAO;4CACP,UAAU,WAAV,GACE,IAAC;gDAAI,OAAO;oDAAE,WAAW;gDAAG;0DAC1B,kBAAC0B,mBAAiBA;oDAChB,SAAStB,OAAO,aAAa;oDAC7B,iBAAiBE;oDACjB,YAAYF,OAAO,IAAI;;;wCAI/B;qCACD;;;;;;AAa3B"}
@@ -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 */
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/pages/Overall/index.module.scss"],"names":[],"mappings":"AAAA;EACE,6NAA6N;AAC/N;;AAFoO;EAKlO,6BAA6B;AAC/B;;AANmS;EASjS,OAAO;AACT;;AAVwU;EAatU,aAAa;AACf;;AAdyY;EAiBvY,8BAA8B;EAC9B,aAAa;AACf;;AAnB6b;EAsB3b,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}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/Overall/index.module.scss"],"names":[],"mappings":"AAAA;EACE,6NAA6N;AAC/N;;AAFoO;EAKlO,6BAA6B;AAC/B;;AANmS;EASjS,OAAO;AACT;;AAVwU;EAatU,aAAa;AACf;;AAdyY;EAiBvY,WAAW;AACb;;AAlB6Z;EAqB3Z,uBAAuB;EACvB,SAAS;EACT,WAAW;AACb;;AAxBid;EA2B/c,YAAY;AACd;;AA5Bqf;EA+Bnf,WAAW;AACb;;AAhC4gB;EAmC1gB,WAAW;EACX,gBAAgB;AAClB;;AArCujB;EAwCrjB,sCAAsC;AACxC;;AAzC4nB;EA4C1nB,mBAAmB;AACrB;;AA7C4pB;EAA0B;IAiDlrB,eAAe;EACjB;;EAlD4sB;IAqD1sB,gBAAgB;IAChB,WAAW;EACb;AACF","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{width:100%}.columns{width:100%;align-items:flex-start;gap:16px}.mainColumn,.sideColumn{min-width:0}.mainColumn{flex:3 1 0}.sideColumn{flex:1 1 320px;min-width:300px}.sideColumn :global(.ant-card){background:var(--color-bg-box-subtle)}.layout .row{margin-bottom:16px}@media(max-width: 1200px){.columns{flex-wrap:wrap}.mainColumn,.sideColumn{flex-basis:100%;width:100%}}"],"sourceRoot":""}
@@ -5,10 +5,10 @@ import index_module from "./index.module.mjs";
5
5
  const ResponsiveLayout = ({ children })=>/*#__PURE__*/ jsx(Flex, {
6
6
  vertical: true,
7
7
  className: index_module.layout,
8
- children: children.map((e)=>/*#__PURE__*/ jsx("div", {
8
+ children: children.map((element, index)=>/*#__PURE__*/ jsx("div", {
9
9
  className: index_module.row,
10
- children: e
11
- }))
10
+ children: element
11
+ }, index))
12
12
  });
13
13
  export { ResponsiveLayout };
14
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"pages/Overall/responsiveLayout.mjs","sources":["../../../src/pages/Overall/responsiveLayout.tsx"],"sourcesContent":["import { Flex } from 'antd';\nimport React from 'react';\n\nimport style from './index.module.scss';\n\ninterface Props {\n children: React.ReactNode[];\n}\n\nexport const ResponsiveLayout = ({ children }: Props) => {\n return (\n <Flex vertical className={style.layout}>\n {children.map((e) => (\n <div className={style.row}>{e}</div>\n ))}\n </Flex>\n );\n};\n"],"names":["ResponsiveLayout","children","Flex","style","e"],"mappings":";;;;AASO,MAAMA,mBAAmB,CAAC,EAAEC,QAAQ,EAAS,GAC3C,WAAP,GACE,IAACC,MAAIA;QAAC,UAAQ;QAAC,WAAWC,aAAAA,MAAY;kBACnCF,SAAS,GAAG,CAAC,CAACG,IAAAA,WAAAA,GACb,IAAC;gBAAI,WAAWD,aAAAA,GAAS;0BAAGC"}
1
+ {"version":3,"file":"pages/Overall/responsiveLayout.mjs","sources":["../../../src/pages/Overall/responsiveLayout.tsx"],"sourcesContent":["import { Flex } from 'antd';\nimport React from 'react';\n\nimport style from './index.module.scss';\n\ninterface Props {\n children: React.ReactNode[];\n}\n\nexport const ResponsiveLayout = ({ children }: Props) => {\n return (\n <Flex vertical className={style.layout}>\n {children.map((element, index) => (\n <div className={style.row} key={index}>\n {element}\n </div>\n ))}\n </Flex>\n );\n};\n"],"names":["ResponsiveLayout","children","Flex","style","element","index"],"mappings":";;;;AASO,MAAMA,mBAAmB,CAAC,EAAEC,QAAQ,EAAS,GAC3C,WAAP,GACE,IAACC,MAAIA;QAAC,UAAQ;QAAC,WAAWC,aAAAA,MAAY;kBACnCF,SAAS,GAAG,CAAC,CAACG,SAASC,QAAAA,WAAAA,GACtB,IAAC;gBAAI,WAAWF,aAAAA,GAAS;0BACtBC;eAD6BC"}
@@ -3,13 +3,13 @@ import "react";
3
3
  import { LoaderAnalysis } from "../../../components/Loader/Analysis/index.mjs";
4
4
  import { WebpackConfigurationViewer } from "../../../components/Configuration/index.mjs";
5
5
  import { Card } from "../../../components/Card/index.mjs";
6
- import { Popover, Space, Tag, Typography, theme } from "antd";
6
+ import { Popover, Space, Tag, Typography } from "antd";
7
7
  import { ExclamationCircleOutlined } from "@ant-design/icons";
8
8
  import { t } from "i18next";
9
+ import { useThemeToken } from "../../../utils/index.mjs";
9
10
  export * from "./constants.mjs";
10
- const { useToken: useToken } = theme;
11
11
  const Page = ()=>{
12
- const { token } = useToken();
12
+ const token = useThemeToken();
13
13
  return /*#__PURE__*/ jsx(Card, {
14
14
  title: /*#__PURE__*/ jsxs(Space, {
15
15
  align: "baseline",
@@ -1 +1 @@
1
- {"version":3,"file":"pages/WebpackLoaders/Analysis/index.mjs","sources":["../../../../src/pages/WebpackLoaders/Analysis/index.tsx"],"sourcesContent":["import React from 'react';\nimport { LoaderAnalysis } from '../../../components/Loader/Analysis';\nimport { WebpackConfigurationViewer } from '../../../components/Configuration';\nimport { Card } from '../../../components/Card';\nimport { Popover, Space, Tag, theme, Typography } from 'antd';\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\nimport { t } from 'i18next';\nconst { useToken } = theme;\n\nexport const Page: React.FC = () => {\n const { token } = useToken();\n\n return (\n <Card\n title={\n <Space align=\"baseline\">\n <Typography.Title level={5} style={{ margin: 0 }}>\n Loader Analysis\n </Typography.Title>\n <Popover\n content={\n <div>\n {t('AsyncLoaderInfo')}\n <a\n href=\"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {t('Details')}\n </a>\n </div>\n }\n title=\"Info\"\n >\n <Tag icon={<ExclamationCircleOutlined />} color=\"warning\">\n Info\n </Tag>\n </Popover>\n </Space>\n }\n extra={<WebpackConfigurationViewer defaultKeys={['module', 'resolve']} />}\n bodyStyle={{ paddingTop: token.padding, height: 800 }}\n >\n <LoaderAnalysis />\n </Card>\n );\n};\n\nexport * from './constants';\n"],"names":["useToken","theme","Page","token","Card","Space","Typography","Popover","t","Tag","ExclamationCircleOutlined","WebpackConfigurationViewer","LoaderAnalysis"],"mappings":";;;;;;;;;AAOA,MAAM,EAAEA,UAAAA,QAAQ,EAAE,GAAGC;AAEd,MAAMC,OAAiB;IAC5B,MAAM,EAAEC,KAAK,EAAE,GAAGH;IAElB,OAAO,WAAP,GACE,IAACI,MAAIA;QACH,qBACE,KAACC,OAAKA;YAAC,OAAM;;8BACX,IAACC,WAAW,KAAK;oBAAC,OAAO;oBAAG,OAAO;wBAAE,QAAQ;oBAAE;8BAAG;;8BAGlD,IAACC,SAAOA;oBACN,uBACE,KAAC;;4BACEC,EAAE;0CACH,IAAC;gCACC,MAAK;gCACL,QAAO;gCACP,KAAI;0CAEHA,EAAE;;;;oBAIT,OAAM;8BAEN,kBAACC,KAAGA;wBAAC,oBAAM,IAACC,2BAAyBA,CAAAA;wBAAK,OAAM;kCAAU;;;;;QAMhE,qBAAO,IAACC,4BAA0BA;YAAC,aAAa;gBAAC;gBAAU;aAAU;;QACrE,WAAW;YAAE,YAAYR,MAAM,OAAO;YAAE,QAAQ;QAAI;kBAEpD,kBAACS,gBAAcA,CAAAA;;AAGrB"}
1
+ {"version":3,"file":"pages/WebpackLoaders/Analysis/index.mjs","sources":["../../../../src/pages/WebpackLoaders/Analysis/index.tsx"],"sourcesContent":["import React from 'react';\nimport { LoaderAnalysis } from '../../../components/Loader/Analysis';\nimport { WebpackConfigurationViewer } from '../../../components/Configuration';\nimport { Card } from '../../../components/Card';\nimport { Popover, Space, Tag, Typography } from 'antd';\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\nimport { t } from 'i18next';\nimport { useThemeToken } from 'src/utils';\n\nexport const Page: React.FC = () => {\n const token = useThemeToken();\n\n return (\n <Card\n title={\n <Space align=\"baseline\">\n <Typography.Title level={5} style={{ margin: 0 }}>\n Loader Analysis\n </Typography.Title>\n <Popover\n content={\n <div>\n {t('AsyncLoaderInfo')}\n <a\n href=\"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {t('Details')}\n </a>\n </div>\n }\n title=\"Info\"\n >\n <Tag icon={<ExclamationCircleOutlined />} color=\"warning\">\n Info\n </Tag>\n </Popover>\n </Space>\n }\n extra={<WebpackConfigurationViewer defaultKeys={['module', 'resolve']} />}\n bodyStyle={{ paddingTop: token.padding, height: 800 }}\n >\n <LoaderAnalysis />\n </Card>\n );\n};\n\nexport * from './constants';\n"],"names":["Page","token","useThemeToken","Card","Space","Typography","Popover","t","Tag","ExclamationCircleOutlined","WebpackConfigurationViewer","LoaderAnalysis"],"mappings":";;;;;;;;;;AASO,MAAMA,OAAiB;IAC5B,MAAMC,QAAQC;IAEd,OAAO,WAAP,GACE,IAACC,MAAIA;QACH,qBACE,KAACC,OAAKA;YAAC,OAAM;;8BACX,IAACC,WAAW,KAAK;oBAAC,OAAO;oBAAG,OAAO;wBAAE,QAAQ;oBAAE;8BAAG;;8BAGlD,IAACC,SAAOA;oBACN,uBACE,KAAC;;4BACEC,EAAE;0CACH,IAAC;gCACC,MAAK;gCACL,QAAO;gCACP,KAAI;0CAEHA,EAAE;;;;oBAIT,OAAM;8BAEN,kBAACC,KAAGA;wBAAC,oBAAM,IAACC,2BAAyBA,CAAAA;wBAAK,OAAM;kCAAU;;;;;QAMhE,qBAAO,IAACC,4BAA0BA;YAAC,aAAa;gBAAC;gBAAU;aAAU;;QACrE,WAAW;YAAE,YAAYT,MAAM,OAAO;YAAE,QAAQ;QAAI;kBAEpD,kBAACU,gBAAcA,CAAAA;;AAGrB"}
@@ -3,7 +3,7 @@ import "react";
3
3
  import { WebpackConfigurationViewer } from "../../../components/Configuration/index.mjs";
4
4
  import { Card } from "../../../components/Card/index.mjs";
5
5
  import { LoaderChart } from "../../../components/Charts/index.mjs";
6
- import { Popover, Space, Tag, Typography } from "antd/lib";
6
+ import { Popover, Space, Tag, Typography } from "antd";
7
7
  import { ExclamationCircleOutlined } from "@ant-design/icons";
8
8
  import { useTranslation } from "react-i18next";
9
9
  export * from "./constants.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"pages/WebpackLoaders/Overall/index.mjs","sources":["../../../../src/pages/WebpackLoaders/Overall/index.tsx"],"sourcesContent":["import React from 'react';\nimport { WebpackConfigurationViewer } from '../../../components/Configuration';\nimport { Card } from '../../../components/Card';\nimport { LoaderChart } from 'src/components/Charts';\nimport { Popover, Space, Tag, Typography } from 'antd/lib';\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\nimport { useTranslation } from 'react-i18next';\n\nexport const Page: React.FC = () => {\n const { t } = useTranslation();\n return (\n <Card\n title={\n <Space align=\"baseline\">\n <Typography.Title level={5} style={{ margin: 0 }}>\n Loader Timeline\n </Typography.Title>\n <Popover\n content={\n <div>\n {t('AsyncLoaderInfo')}\n <a\n href=\"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {t('Details')}\n </a>\n </div>\n }\n title=\"Info\"\n >\n <Tag icon={<ExclamationCircleOutlined />} color=\"warning\">\n Info\n </Tag>\n </Popover>\n </Space>\n }\n extra={<WebpackConfigurationViewer defaultKeys={['module']} />}\n >\n <LoaderChart />\n </Card>\n );\n};\n\nexport * from './constants';\n"],"names":["Page","t","useTranslation","Card","Space","Typography","Popover","Tag","ExclamationCircleOutlined","WebpackConfigurationViewer","LoaderChart"],"mappings":";;;;;;;;;AAQO,MAAMA,OAAiB;IAC5B,MAAM,EAAEC,CAAC,EAAE,GAAGC;IACd,OAAO,WAAP,GACE,IAACC,MAAIA;QACH,qBACE,KAACC,OAAKA;YAAC,OAAM;;8BACX,IAACC,WAAW,KAAK;oBAAC,OAAO;oBAAG,OAAO;wBAAE,QAAQ;oBAAE;8BAAG;;8BAGlD,IAACC,SAAOA;oBACN,uBACE,KAAC;;4BACEL,EAAE;0CACH,IAAC;gCACC,MAAK;gCACL,QAAO;gCACP,KAAI;0CAEHA,EAAE;;;;oBAIT,OAAM;8BAEN,kBAACM,KAAGA;wBAAC,oBAAM,IAACC,2BAAyBA,CAAAA;wBAAK,OAAM;kCAAU;;;;;QAMhE,qBAAO,IAACC,4BAA0BA;YAAC,aAAa;gBAAC;aAAS;;kBAE1D,kBAACC,aAAWA,CAAAA;;AAGlB"}
1
+ {"version":3,"file":"pages/WebpackLoaders/Overall/index.mjs","sources":["../../../../src/pages/WebpackLoaders/Overall/index.tsx"],"sourcesContent":["import React from 'react';\nimport { WebpackConfigurationViewer } from '../../../components/Configuration';\nimport { Card } from '../../../components/Card';\nimport { LoaderChart } from 'src/components/Charts';\nimport { Popover, Space, Tag, Typography } from 'antd';\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\nimport { useTranslation } from 'react-i18next';\n\nexport const Page: React.FC = () => {\n const { t } = useTranslation();\n return (\n <Card\n title={\n <Space align=\"baseline\">\n <Typography.Title level={5} style={{ margin: 0 }}>\n Loader Timeline\n </Typography.Title>\n <Popover\n content={\n <div>\n {t('AsyncLoaderInfo')}\n <a\n href=\"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {t('Details')}\n </a>\n </div>\n }\n title=\"Info\"\n >\n <Tag icon={<ExclamationCircleOutlined />} color=\"warning\">\n Info\n </Tag>\n </Popover>\n </Space>\n }\n extra={<WebpackConfigurationViewer defaultKeys={['module']} />}\n >\n <LoaderChart />\n </Card>\n );\n};\n\nexport * from './constants';\n"],"names":["Page","t","useTranslation","Card","Space","Typography","Popover","Tag","ExclamationCircleOutlined","WebpackConfigurationViewer","LoaderChart"],"mappings":";;;;;;;;;AAQO,MAAMA,OAAiB;IAC5B,MAAM,EAAEC,CAAC,EAAE,GAAGC;IACd,OAAO,WAAP,GACE,IAACC,MAAIA;QACH,qBACE,KAACC,OAAKA;YAAC,OAAM;;8BACX,IAACC,WAAW,KAAK;oBAAC,OAAO;oBAAG,OAAO;wBAAE,QAAQ;oBAAE;8BAAG;;8BAGlD,IAACC,SAAOA;oBACN,uBACE,KAAC;;4BACEL,EAAE;0CACH,IAAC;gCACC,MAAK;gCACL,QAAO;gCACP,KAAI;0CAEHA,EAAE;;;;oBAIT,OAAM;8BAEN,kBAACM,KAAGA;wBAAC,oBAAM,IAACC,2BAAyBA,CAAAA;wBAAK,OAAM;kCAAU;;;;;QAMhE,qBAAO,IAACC,4BAA0BA;YAAC,aAAa;gBAAC;aAAS;;kBAE1D,kBAACC,aAAWA,CAAAA;;AAGlB"}
@@ -34,3 +34,4 @@ export declare function useElementSize<T extends HTMLElement = HTMLDivElement>()
34
34
  readonly height: number;
35
35
  }];
36
36
  export declare function usePersistedState<T>(baseKey: string, initialValue: T | (() => T)): [T, Dispatch<SetStateAction<T>>];
37
+ export declare const useThemeToken: () => import("antd").GlobalToken;
@@ -5,6 +5,7 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } fr
5
5
  import { useTranslation } from "react-i18next";
6
6
  import { useLocation, useNavigate } from "react-router-dom";
7
7
  import url_parse from "url-parse";
8
+ import { theme } from "antd";
8
9
  import "./i18n/index.mjs";
9
10
  import { setLocaleToStorage } from "./storage.mjs";
10
11
  const route = Client.RsdoctorClientRoutes.RuleIndex;
@@ -231,6 +232,10 @@ function usePersistedState(baseKey, initialValue) {
231
232
  setPersistedState
232
233
  ];
233
234
  }
234
- export { useBundleAlertsByErrors, useBundleAlertsByManifest, useChunkGraphByManifest, useCloudManifestUrlByManifest, useCompileAlertsByErrors, useConfigOutputFileNameByManifest, useDetectIfCloudIdeEnv, useDuplicatePackagesByErrors, useDuplicatePackagesByManifest, useElementSize, useErrorsByManifest, useHashByManifest, useI18n, useLoading, useModuleGraph, useModuleGraphByManifest, usePackageGraphByManifest, usePersistedState, useProjectRootByManifest, useRuleIndexNavigate, useUniqModules, useUniqModulesByManifest, useUrlQuery, useWebpackConfigurationByConfigs, useWindowWidth };
235
+ const useThemeToken = ()=>{
236
+ const { token } = theme.useToken();
237
+ return token;
238
+ };
239
+ export { useBundleAlertsByErrors, useBundleAlertsByManifest, useChunkGraphByManifest, useCloudManifestUrlByManifest, useCompileAlertsByErrors, useConfigOutputFileNameByManifest, useDetectIfCloudIdeEnv, useDuplicatePackagesByErrors, useDuplicatePackagesByManifest, useElementSize, useErrorsByManifest, useHashByManifest, useI18n, useLoading, useModuleGraph, useModuleGraphByManifest, usePackageGraphByManifest, usePersistedState, useProjectRootByManifest, useRuleIndexNavigate, useThemeToken, useUniqModules, useUniqModulesByManifest, useUrlQuery, useWebpackConfigurationByConfigs, useWindowWidth };
235
240
 
236
241
  //# sourceMappingURL=hooks.mjs.map