@rsdoctor/components 1.5.10 → 1.5.12

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 (72) hide show
  1. package/dist/components/Alert/ecma-version-check_module.css.map +1 -1
  2. package/dist/components/Alert/index.css.map +1 -1
  3. package/dist/components/Alert/package-relation_module.css.map +1 -1
  4. package/dist/components/Alert/types.d.ts +2 -2
  5. package/dist/components/Alerts/bundle-alert.d.ts +1 -1
  6. package/dist/components/Alerts/bundle-alert.mjs.map +1 -1
  7. package/dist/components/Alerts/bundle-alert_module.css.map +1 -1
  8. package/dist/components/Alerts/collapse_module.css.map +1 -1
  9. package/dist/components/Alerts/list_module.css.map +1 -1
  10. package/dist/components/Alerts/overlay.mjs.map +1 -1
  11. package/dist/components/Alerts/overlay_module.css.map +1 -1
  12. package/dist/components/Card/size_module.css.map +1 -1
  13. package/dist/components/Charts/done.mjs.map +1 -1
  14. package/dist/components/Charts/loader.css.map +1 -1
  15. package/dist/components/Charts/tooltips.css.map +1 -1
  16. package/dist/components/Charts/treemap_module.css.map +1 -1
  17. package/dist/components/Configuration/builder.d.ts +1 -5
  18. package/dist/components/Configuration/builder.mjs.map +1 -1
  19. package/dist/components/Configuration/builder_module.css.map +1 -1
  20. package/dist/components/FileTree/index.css.map +1 -1
  21. package/dist/components/Keyword/style_module.css.map +1 -1
  22. package/dist/components/Layout/header.css.map +1 -1
  23. package/dist/components/Layout/index.d.ts +2 -2
  24. package/dist/components/Layout/index.mjs.map +1 -1
  25. package/dist/components/Loader/Analysis/files.mjs.map +1 -1
  26. package/dist/components/Loader/Analysis/index.d.ts +1 -7
  27. package/dist/components/Loader/Analysis/index.mjs.map +1 -1
  28. package/dist/components/Loader/Analysis/style_module.css.map +1 -1
  29. package/dist/components/Loader/executions.d.ts +1 -1
  30. package/dist/components/Loader/executions.mjs.map +1 -1
  31. package/dist/components/Manifest/api.d.ts +2 -2
  32. package/dist/components/Manifest/api.mjs.map +1 -1
  33. package/dist/components/Opener/code.d.ts +1 -1
  34. package/dist/components/Opener/code.mjs.map +1 -1
  35. package/dist/components/Opener/ide.d.ts +1 -1
  36. package/dist/components/Opener/ide.mjs.map +1 -1
  37. package/dist/components/Overall/DataSummary_module.css.map +1 -1
  38. package/dist/components/Overall/bundle.d.ts +1 -1
  39. package/dist/components/Overall/bundle.mjs.map +1 -1
  40. package/dist/components/Overall/bundle_module.css.map +1 -1
  41. package/dist/components/Overall/card_module.css.map +1 -1
  42. package/dist/components/Overall/compile_module.css.map +1 -1
  43. package/dist/components/Overall/help-center_module.css.map +1 -1
  44. package/dist/components/Overall/list_module.css.map +1 -1
  45. package/dist/components/Overall/overview_module.css.map +1 -1
  46. package/dist/components/Overall/project_module.css.map +1 -1
  47. package/dist/components/Select/index.css.map +1 -1
  48. package/dist/components/TextDrawer/index.d.ts +1 -1
  49. package/dist/components/TextDrawer/index.mjs.map +1 -1
  50. package/dist/components/base/CodeViewer/index.mjs +2 -2
  51. package/dist/components/base/CodeViewer/index.mjs.map +1 -1
  52. package/dist/components/base/CodeViewer/index_module.css.map +1 -1
  53. package/dist/components/base/DiffViewer/index.mjs +1 -1
  54. package/dist/components/base/DiffViewer/index.mjs.map +1 -1
  55. package/dist/components/base/DiffViewer/index_module.css.map +1 -1
  56. package/dist/pages/BundleSize/components/card_module.css.map +1 -1
  57. package/dist/pages/BundleSize/components/index.css.map +1 -1
  58. package/dist/pages/BundleSize/components/index_module.css.map +1 -1
  59. package/dist/pages/ModuleAnalyze/chunks.mjs.map +1 -1
  60. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css.map +1 -1
  61. package/dist/pages/ModuleAnalyze/index.css.map +1 -1
  62. package/dist/pages/Overall/index_module.css.map +1 -1
  63. package/dist/pages/Resources/BundleDiff/DiffContainer/types.d.ts +1 -1
  64. package/dist/pages/Resources/BundleDiff/DiffServerAPIProvider/index.d.ts +1 -1
  65. package/dist/pages/Resources/BundleDiff/DiffServerAPIProvider/index.mjs.map +1 -1
  66. package/dist/pages/TreeShaking/editor.mjs +2 -2
  67. package/dist/pages/TreeShaking/editor.mjs.map +1 -1
  68. package/dist/pages/TreeShaking/index.css.map +1 -1
  69. package/dist/pages/WebpackPlugins/index.css.map +1 -1
  70. package/dist/utils/file.d.ts +3 -3
  71. package/dist/utils/file.mjs.map +1 -1
  72. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/components/base/CodeViewer/index.module.scss","webpack://./src/components/base/CodeViewer/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,iDAAiD;EACjD,kBAAkB;EAClB,sBAAsB;EACtB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,yDAAyD;AAC3D;;ADRmN;ECWjN,gBAAgB;EAChB,gBAAgB;EAChB,cAAc;AAChB;;ADdoR;ECiBlR,yDAAyD;EACzD,+BAA+B;EAC/B,YAAY;EACZ,cAAc;EACd,mBAAmB;EACnB,iBAAiB;EACjB,aAAa;AACf;;ADxB4c;EC2B1c,+BAA+B;AACjC;;AD5BsgB;EC+BpgB,OAAO;AACT;;ADhCmiB;ECmCjiB,eAAe;EACf,mBAAmB;EACnB,6DAA6D;EAC7D,0BAA0B;AAC5B","sourcesContent":[".code-viewer{height:70vh;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;background-color:var(--vscode-editor-background);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1)}.code-viewer.embed{box-shadow:none;border-radius:0;overflow:auto}.code-viewer .header{background-color:var(--vscode-textBlockQuote-background);color:var(--vscode-foreground);padding:8px 16px;display:flex;align-items:center;flex-shrink:0;flex-grow:0}.code-viewer .header .text{color:var(--vscode-foreground)}.code-viewer .content{flex:1}.code-viewer :global .file-inline-decoration{cursor:pointer;text-decoration:underline;background:#4d7097;background:var(--vscode-editor-selectionHighlightBackground)}",".code-viewer {\n background-color: var(--vscode-editor-background);\n border-radius: 8px;\n flex-direction: column;\n height: 70vh;\n display: flex;\n overflow: hidden;\n box-shadow: 0 1px 3px #0000001a, 0 1px 2px -1px #0000001a;\n}\n\n.code-viewer.embed {\n box-shadow: none;\n border-radius: 0;\n overflow: auto;\n}\n\n.code-viewer .header {\n background-color: var(--vscode-textBlockQuote-background);\n color: var(--vscode-foreground);\n flex-grow: 0;\n flex-shrink: 0;\n align-items: center;\n padding: 8px 16px;\n display: flex;\n}\n\n.code-viewer .header .text {\n color: var(--vscode-foreground);\n}\n\n.code-viewer .content {\n flex: 1;\n}\n\n.code-viewer :global .file-inline-decoration {\n cursor: pointer;\n background: #4d7097;\n background: var(--vscode-editor-selectionHighlightBackground);\n text-decoration: underline;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/base/CodeViewer/index.module.scss"],"names":[],"mappings":"AAAA;EACE,iDAAiD;EACjD,kBAAkB;EAClB,sBAAsB;EACtB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,yDAAyD;AAC3D;;AARmN;EAWjN,gBAAgB;EAChB,gBAAgB;EAChB,cAAc;AAChB;;AAdoR;EAiBlR,yDAAyD;EACzD,+BAA+B;EAC/B,YAAY;EACZ,cAAc;EACd,mBAAmB;EACnB,iBAAiB;EACjB,aAAa;AACf;;AAxB4c;EA2B1c,+BAA+B;AACjC;;AA5BsgB;EA+BpgB,OAAO;AACT;;AAhCmiB;EAmCjiB,eAAe;EACf,mBAAmB;EACnB,6DAA6D;EAC7D,0BAA0B;AAC5B","sourcesContent":[".code-viewer{height:70vh;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;background-color:var(--vscode-editor-background);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1)}.code-viewer.embed{box-shadow:none;border-radius:0;overflow:auto}.code-viewer .header{background-color:var(--vscode-textBlockQuote-background);color:var(--vscode-foreground);padding:8px 16px;display:flex;align-items:center;flex-shrink:0;flex-grow:0}.code-viewer .header .text{color:var(--vscode-foreground)}.code-viewer .content{flex:1}.code-viewer :global .file-inline-decoration{cursor:pointer;text-decoration:underline;background:#4d7097;background:var(--vscode-editor-selectionHighlightBackground)}"],"sourceRoot":""}
@@ -8,7 +8,7 @@ import index_module from "./index.module.mjs";
8
8
  import { defineMonacoDiffOptions } from "./utils.mjs";
9
9
  function DiffViewer({ className, style, original = '', modified = '', originalFilePath = '', modifiedFilePath = '', originalLang, modifiedLang, isEmbed = false, isLightTheme = true, headerVisible = true }) {
10
10
  const [isSideBySide, setIsSideBySide] = useState(true);
11
- const editor = useRef();
11
+ const editor = useRef(void 0);
12
12
  const originalLanguage = useMemo(()=>originalLang || getFilePathFormat(originalFilePath) || 'plaintext', [
13
13
  originalLang,
14
14
  originalFilePath
@@ -1 +1 @@
1
- {"version":3,"file":"components/base/DiffViewer/index.mjs","sources":["../../../../src/components/base/DiffViewer/index.tsx"],"sourcesContent":["import { DiffEditor, MonacoDiffEditor } from '@monaco-editor/react';\nimport { Checkbox } from 'antd';\nimport clsx from 'clsx';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { getFileName, getFilePathFormat } from '../CodeViewer/utils';\nimport styles from './index.module.scss';\nimport { DiffViewerProps } from './interface';\nimport { defineMonacoDiffOptions } from './utils';\n\nexport function DiffViewer({\n className,\n style,\n original = '',\n modified = '',\n originalFilePath = '',\n modifiedFilePath = '',\n originalLang,\n modifiedLang,\n isEmbed = false,\n isLightTheme = true,\n headerVisible = true,\n}: DiffViewerProps) {\n const [isSideBySide, setIsSideBySide] = useState(true);\n const editor = useRef<MonacoDiffEditor>();\n const originalLanguage = useMemo(\n () => originalLang || getFilePathFormat(originalFilePath) || 'plaintext',\n [originalLang, originalFilePath],\n );\n const modifiedLanguage = useMemo(\n () => modifiedLang || getFilePathFormat(modifiedFilePath) || 'plaintext',\n [modifiedLang, modifiedFilePath],\n );\n const options = useMemo(\n () => defineMonacoDiffOptions({ renderSideBySide: isSideBySide }),\n [isSideBySide],\n );\n const onEditorMount = useCallback((editorInstance: MonacoDiffEditor) => {\n editor.current = editorInstance;\n }, []);\n const theme = isLightTheme ? 'vs-light' : 'vs-dark';\n\n useEffect(\n () => () => {\n editor.current?.setModel(null);\n },\n [],\n );\n\n return (\n <div\n className={clsx(\n 'monaco-component',\n 'diff-viewer',\n styles['diff-viewer'],\n isEmbed && styles['embed'],\n className,\n )}\n style={style}\n >\n {headerVisible && (\n <div className={styles['header']}>\n <div>{getFileName(originalFilePath)}</div>\n <div style={{ flex: 1 }} />\n <div>\n <Checkbox\n className={styles['text']}\n title=\"side-by-side\"\n checked={isSideBySide}\n onChange={(evt) => {\n setIsSideBySide(evt.target.checked);\n }}\n >\n side-by-side\n </Checkbox>\n </div>\n </div>\n )}\n <div className={clsx(styles['content'], 'editor-wrap')}>\n <DiffEditor\n theme={theme}\n originalLanguage={originalLanguage}\n modifiedLanguage={modifiedLanguage}\n original={original}\n modified={modified}\n width=\"100%\"\n options={options}\n onMount={onEditorMount}\n />\n </div>\n </div>\n );\n}\n\nexport type { DiffViewerProps } from './interface';\nexport { useDiffDrawer } from './useDiffDrawer';\nexport { defineMonacoDiffOptions } from './utils';\n"],"names":["DiffViewer","className","style","original","modified","originalFilePath","modifiedFilePath","originalLang","modifiedLang","isEmbed","isLightTheme","headerVisible","isSideBySide","setIsSideBySide","useState","editor","useRef","originalLanguage","useMemo","getFilePathFormat","modifiedLanguage","options","defineMonacoDiffOptions","onEditorMount","useCallback","editorInstance","theme","useEffect","clsx","styles","getFileName","Checkbox","evt","DiffEditor"],"mappings":";;;;;;;;AASO,SAASA,WAAW,EACzBC,SAAS,EACTC,KAAK,EACLC,WAAW,EAAE,EACbC,WAAW,EAAE,EACbC,mBAAmB,EAAE,EACrBC,mBAAmB,EAAE,EACrBC,YAAY,EACZC,YAAY,EACZC,UAAU,KAAK,EACfC,eAAe,IAAI,EACnBC,gBAAgB,IAAI,EACJ;IAChB,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,SAAS;IACjD,MAAMC,SAASC;IACf,MAAMC,mBAAmBC,QACvB,IAAMX,gBAAgBY,kBAAkBd,qBAAqB,aAC7D;QAACE;QAAcF;KAAiB;IAElC,MAAMe,mBAAmBF,QACvB,IAAMV,gBAAgBW,kBAAkBb,qBAAqB,aAC7D;QAACE;QAAcF;KAAiB;IAElC,MAAMe,UAAUH,QACd,IAAMI,wBAAwB;YAAE,kBAAkBV;QAAa,IAC/D;QAACA;KAAa;IAEhB,MAAMW,gBAAgBC,YAAY,CAACC;QACjCV,OAAO,OAAO,GAAGU;IACnB,GAAG,EAAE;IACL,MAAMC,QAAQhB,eAAe,aAAa;IAE1CiB,UACE,IAAM;YACJZ,OAAO,OAAO,EAAE,SAAS;QAC3B,GACA,EAAE;IAGJ,OAAO,WAAP,GACE,KAAC;QACC,WAAWa,KACT,oBACA,eACAC,YAAAA,CAAAA,cAAqB,EACrBpB,WAAWoB,aAAAA,KAAe,EAC1B5B;QAEF,OAAOC;;YAENS,iBAAiB,WAAjBA,GACC,KAAC;gBAAI,WAAWkB,aAAAA,MAAgB;;kCAC9B,IAAC;kCAAKC,YAAYzB;;kCAClB,IAAC;wBAAI,OAAO;4BAAE,MAAM;wBAAE;;kCACtB,IAAC;kCACC,kBAAC0B,UAAQA;4BACP,WAAWF,aAAAA,IAAc;4BACzB,OAAM;4BACN,SAASjB;4BACT,UAAU,CAACoB;gCACTnB,gBAAgBmB,IAAI,MAAM,CAAC,OAAO;4BACpC;sCACD;;;;;0BAMP,IAAC;gBAAI,WAAWJ,KAAKC,aAAAA,OAAiB,EAAE;0BACtC,kBAACI,YAAUA;oBACT,OAAOP;oBACP,kBAAkBT;oBAClB,kBAAkBG;oBAClB,UAAUjB;oBACV,UAAUC;oBACV,OAAM;oBACN,SAASiB;oBACT,SAASE;;;;;AAKnB"}
1
+ {"version":3,"file":"components/base/DiffViewer/index.mjs","sources":["../../../../src/components/base/DiffViewer/index.tsx"],"sourcesContent":["import { DiffEditor, MonacoDiffEditor } from '@monaco-editor/react';\nimport { Checkbox } from 'antd';\nimport clsx from 'clsx';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { getFileName, getFilePathFormat } from '../CodeViewer/utils';\nimport styles from './index.module.scss';\nimport { DiffViewerProps } from './interface';\nimport { defineMonacoDiffOptions } from './utils';\n\nexport function DiffViewer({\n className,\n style,\n original = '',\n modified = '',\n originalFilePath = '',\n modifiedFilePath = '',\n originalLang,\n modifiedLang,\n isEmbed = false,\n isLightTheme = true,\n headerVisible = true,\n}: DiffViewerProps) {\n const [isSideBySide, setIsSideBySide] = useState(true);\n const editor = useRef<MonacoDiffEditor>(undefined);\n const originalLanguage = useMemo(\n () => originalLang || getFilePathFormat(originalFilePath) || 'plaintext',\n [originalLang, originalFilePath],\n );\n const modifiedLanguage = useMemo(\n () => modifiedLang || getFilePathFormat(modifiedFilePath) || 'plaintext',\n [modifiedLang, modifiedFilePath],\n );\n const options = useMemo(\n () => defineMonacoDiffOptions({ renderSideBySide: isSideBySide }),\n [isSideBySide],\n );\n const onEditorMount = useCallback((editorInstance: MonacoDiffEditor) => {\n editor.current = editorInstance;\n }, []);\n const theme = isLightTheme ? 'vs-light' : 'vs-dark';\n\n useEffect(\n () => () => {\n editor.current?.setModel(null);\n },\n [],\n );\n\n return (\n <div\n className={clsx(\n 'monaco-component',\n 'diff-viewer',\n styles['diff-viewer'],\n isEmbed && styles['embed'],\n className,\n )}\n style={style}\n >\n {headerVisible && (\n <div className={styles['header']}>\n <div>{getFileName(originalFilePath)}</div>\n <div style={{ flex: 1 }} />\n <div>\n <Checkbox\n className={styles['text']}\n title=\"side-by-side\"\n checked={isSideBySide}\n onChange={(evt) => {\n setIsSideBySide(evt.target.checked);\n }}\n >\n side-by-side\n </Checkbox>\n </div>\n </div>\n )}\n <div className={clsx(styles['content'], 'editor-wrap')}>\n <DiffEditor\n theme={theme}\n originalLanguage={originalLanguage}\n modifiedLanguage={modifiedLanguage}\n original={original}\n modified={modified}\n width=\"100%\"\n options={options}\n onMount={onEditorMount}\n />\n </div>\n </div>\n );\n}\n\nexport type { DiffViewerProps } from './interface';\nexport { useDiffDrawer } from './useDiffDrawer';\nexport { defineMonacoDiffOptions } from './utils';\n"],"names":["DiffViewer","className","style","original","modified","originalFilePath","modifiedFilePath","originalLang","modifiedLang","isEmbed","isLightTheme","headerVisible","isSideBySide","setIsSideBySide","useState","editor","useRef","undefined","originalLanguage","useMemo","getFilePathFormat","modifiedLanguage","options","defineMonacoDiffOptions","onEditorMount","useCallback","editorInstance","theme","useEffect","clsx","styles","getFileName","Checkbox","evt","DiffEditor"],"mappings":";;;;;;;;AASO,SAASA,WAAW,EACzBC,SAAS,EACTC,KAAK,EACLC,WAAW,EAAE,EACbC,WAAW,EAAE,EACbC,mBAAmB,EAAE,EACrBC,mBAAmB,EAAE,EACrBC,YAAY,EACZC,YAAY,EACZC,UAAU,KAAK,EACfC,eAAe,IAAI,EACnBC,gBAAgB,IAAI,EACJ;IAChB,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,SAAS;IACjD,MAAMC,SAASC,OAAyBC;IACxC,MAAMC,mBAAmBC,QACvB,IAAMZ,gBAAgBa,kBAAkBf,qBAAqB,aAC7D;QAACE;QAAcF;KAAiB;IAElC,MAAMgB,mBAAmBF,QACvB,IAAMX,gBAAgBY,kBAAkBd,qBAAqB,aAC7D;QAACE;QAAcF;KAAiB;IAElC,MAAMgB,UAAUH,QACd,IAAMI,wBAAwB;YAAE,kBAAkBX;QAAa,IAC/D;QAACA;KAAa;IAEhB,MAAMY,gBAAgBC,YAAY,CAACC;QACjCX,OAAO,OAAO,GAAGW;IACnB,GAAG,EAAE;IACL,MAAMC,QAAQjB,eAAe,aAAa;IAE1CkB,UACE,IAAM;YACJb,OAAO,OAAO,EAAE,SAAS;QAC3B,GACA,EAAE;IAGJ,OAAO,WAAP,GACE,KAAC;QACC,WAAWc,KACT,oBACA,eACAC,YAAAA,CAAAA,cAAqB,EACrBrB,WAAWqB,aAAAA,KAAe,EAC1B7B;QAEF,OAAOC;;YAENS,iBAAiB,WAAjBA,GACC,KAAC;gBAAI,WAAWmB,aAAAA,MAAgB;;kCAC9B,IAAC;kCAAKC,YAAY1B;;kCAClB,IAAC;wBAAI,OAAO;4BAAE,MAAM;wBAAE;;kCACtB,IAAC;kCACC,kBAAC2B,UAAQA;4BACP,WAAWF,aAAAA,IAAc;4BACzB,OAAM;4BACN,SAASlB;4BACT,UAAU,CAACqB;gCACTpB,gBAAgBoB,IAAI,MAAM,CAAC,OAAO;4BACpC;sCACD;;;;;0BAMP,IAAC;gBAAI,WAAWJ,KAAKC,aAAAA,OAAiB,EAAE;0BACtC,kBAACI,YAAUA;oBACT,OAAOP;oBACP,kBAAkBT;oBAClB,kBAAkBG;oBAClB,UAAUlB;oBACV,UAAUC;oBACV,OAAM;oBACN,SAASkB;oBACT,SAASE;;;;;AAKnB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/components/base/DiffViewer/index.module.scss","webpack://./src/components/base/DiffViewer/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,iDAAiD;EACjD,kBAAkB;EAClB,sBAAsB;EACtB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,yDAAyD;AAC3D;;ADRmN;ECWjN,gBAAgB;EAChB,gBAAgB;EAChB,cAAc;AAChB;;ADdoR;ECiBlR,yDAAyD;EACzD,+BAA+B;EAC/B,YAAY;EACZ,cAAc;EACd,mBAAmB;EACnB,iBAAiB;EACjB,aAAa;AACf;;ADxB4c;EC2B1c,+BAA+B;AACjC;;AD5BsgB;EC+BpgB,OAAO;AACT","sourcesContent":[".diff-viewer{height:70vh;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;background-color:var(--vscode-editor-background);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1)}.diff-viewer.embed{box-shadow:none;border-radius:0;overflow:auto}.diff-viewer .header{background-color:var(--vscode-textBlockQuote-background);color:var(--vscode-foreground);padding:8px 16px;display:flex;align-items:center;flex-shrink:0;flex-grow:0}.diff-viewer .header .text{color:var(--vscode-foreground)}.diff-viewer .content{flex:1}",".diff-viewer {\n background-color: var(--vscode-editor-background);\n border-radius: 8px;\n flex-direction: column;\n height: 70vh;\n display: flex;\n overflow: hidden;\n box-shadow: 0 1px 3px #0000001a, 0 1px 2px -1px #0000001a;\n}\n\n.diff-viewer.embed {\n box-shadow: none;\n border-radius: 0;\n overflow: auto;\n}\n\n.diff-viewer .header {\n background-color: var(--vscode-textBlockQuote-background);\n color: var(--vscode-foreground);\n flex-grow: 0;\n flex-shrink: 0;\n align-items: center;\n padding: 8px 16px;\n display: flex;\n}\n\n.diff-viewer .header .text {\n color: var(--vscode-foreground);\n}\n\n.diff-viewer .content {\n flex: 1;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/base/DiffViewer/index.module.scss"],"names":[],"mappings":"AAAA;EACE,iDAAiD;EACjD,kBAAkB;EAClB,sBAAsB;EACtB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,yDAAyD;AAC3D;;AARmN;EAWjN,gBAAgB;EAChB,gBAAgB;EAChB,cAAc;AAChB;;AAdoR;EAiBlR,yDAAyD;EACzD,+BAA+B;EAC/B,YAAY;EACZ,cAAc;EACd,mBAAmB;EACnB,iBAAiB;EACjB,aAAa;AACf;;AAxB4c;EA2B1c,+BAA+B;AACjC;;AA5BsgB;EA+BpgB,OAAO;AACT","sourcesContent":[".diff-viewer{height:70vh;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;background-color:var(--vscode-editor-background);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1)}.diff-viewer.embed{box-shadow:none;border-radius:0;overflow:auto}.diff-viewer .header{background-color:var(--vscode-textBlockQuote-background);color:var(--vscode-foreground);padding:8px 16px;display:flex;align-items:center;flex-shrink:0;flex-grow:0}.diff-viewer .header .text{color:var(--vscode-foreground)}.diff-viewer .content{flex:1}"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/BundleSize/components/card.module.scss","webpack://./src/pages/BundleSize/components/card.module.scss"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;ADNmG;ECSjG,6BAA6B;EAC7B,WAAW;EACX,aAAa;AACf;;ADZoL;ECelL,OAAO;EACP,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;ADnBqR;ECsBnR,sBAAsB;EACtB,uBAAuB;EACvB,cAAc;EACd,aAAa;AACf;;AD1BiX;EC6B/W,iBAAiB;EACjB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;ADjCmd;ECoCjd,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;ADvC6hB;EC0C3hB,aAAa;EACb,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AD9C2nB;ECiDznB,8BAA8B;EAC9B,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;ADrDutB;ECwDrtB,WAAW;EACX,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB","sourcesContent":[".container{display:flex;align-items:center;background-color:#fff;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:#000}",".container {\n background-color: #fff;\n align-items: center;\n margin-bottom: 20px;\n padding: 20px 0;\n display: flex;\n}\n\n.container .chartsContainer {\n justify-content: space-evenly;\n width: 100%;\n display: flex;\n}\n\n.container .chartsContainer .chart {\n flex: 1;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.container .summary {\n flex-direction: column;\n justify-content: center;\n margin: 0 20px;\n display: flex;\n}\n\n.container .summary .description {\n margin-right: 5px;\n font-size: 20px;\n font-weight: 500;\n line-height: 32px;\n}\n\n.container .summary .unit {\n font-size: 12px;\n font-weight: 400;\n line-height: 32px;\n}\n\n.container .summary .totalNumber {\n margin: 4px 0;\n font-size: 13px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.cardTitle {\n justify-content: space-between;\n align-items: center;\n margin-bottom: 25px;\n display: flex;\n}\n\n.cardTitle .title {\n color: #000;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/BundleSize/components/card.module.scss"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AANmG;EASjG,6BAA6B;EAC7B,WAAW;EACX,aAAa;AACf;;AAZoL;EAelL,OAAO;EACP,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AAnBqR;EAsBnR,sBAAsB;EACtB,uBAAuB;EACvB,cAAc;EACd,aAAa;AACf;;AA1BiX;EA6B/W,iBAAiB;EACjB,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAjCmd;EAoCjd,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AAvC6hB;EA0C3hB,aAAa;EACb,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB;;AA9C2nB;EAiDznB,8BAA8B;EAC9B,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;AArDutB;EAwDrtB,WAAW;EACX,eAAe;EACf,gBAAgB;EAChB,iBAAiB;AACnB","sourcesContent":[".container{display:flex;align-items:center;background-color:#fff;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:#000}"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/BundleSize/components/index.scss","webpack://./src/pages/BundleSize/components/index.scss"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,WAAW;AACb;;ADH4E;ECM1E,YAAY;EACZ,aAAa;EACb,iBAAiB;AACnB;;ADT0I;ECYxI,WAAW;EACX,yBAAyB;EACzB,UAAU;AACZ;;ADf2N;ECkBzN,gBAAgB;AAClB;;ADnBsQ;ECsBpQ,WAAW;AACb","sourcesContent":[".monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.bundle-size-editor{margin-left:40px;flex-grow:1;height:700px}.bundle-size-editor .ant-card-body{width:auto;height:calc(100% - 48px);padding:0}.bundle-size-module-bunton{margin-left:4em}.ant-tabs-nav{width:100%}",".monaco-hover .markdown-hover.hover-row hr {\n background-color: gray;\n margin: 2px;\n}\n\n.bundle-size-editor {\n flex-grow: 1;\n height: 700px;\n margin-left: 40px;\n}\n\n.bundle-size-editor .ant-card-body {\n width: auto;\n height: calc(100% - 48px);\n padding: 0;\n}\n\n.bundle-size-module-bunton {\n margin-left: 4em;\n}\n\n.ant-tabs-nav {\n width: 100%;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/BundleSize/components/index.scss"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,WAAW;AACb;;AAH4E;EAM1E,YAAY;EACZ,aAAa;EACb,iBAAiB;AACnB;;AAT0I;EAYxI,WAAW;EACX,yBAAyB;EACzB,UAAU;AACZ;;AAf2N;EAkBzN,gBAAgB;AAClB;;AAnBsQ;EAsBpQ,WAAW;AACb","sourcesContent":[".monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.bundle-size-editor{margin-left:40px;flex-grow:1;height:700px}.bundle-size-editor .ant-card-body{width:auto;height:calc(100% - 48px);padding:0}.bundle-size-module-bunton{margin-left:4em}.ant-tabs-nav{width:100%}"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/BundleSize/components/index.module.scss","webpack://./src/pages/BundleSize/components/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,WAAW;AACb;;ADFgD;ECK9C,4BAA4B;AAC9B;;ADN8G;ECS5G,kBAAkB;EAClB,WAAW;AACb;;ADX0Q;ECcxQ,eAAe;AACjB;;ADfoa;ECkBla,cAAc;EACd,iBAAiB;AACnB;;ADpB6jB;ECuB3jB,mBAAmB;EACnB,aAAa;AACf;;ADzB+mB;EC4B7mB,iBAAiB;AACnB;;AD7B4pB;ECgC1pB,aAAa;AACf;;ADjCsrB;ECoCprB,YAAY;EACZ,oBAAoB;AACtB;;ADtC0vB;ECyCxvB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AD5CmyB;EC+CjyB,UAAU;EACV,kBAAkB;AACpB;;ADjD+0B;ECoD70B,uBAAuB;EACvB,kBAAkB;EAClB,WAAW;AACb;;ADvDk5B;EC0Dh5B,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,WAAW;AACb;;AD9Dq9B;ECiEn9B,YAAY;AACd;;ADlE4+B;ECqE1+B,gBAAgB;AAClB;;ADtEqiC;ECyEniC,eAAe;AACjB;;AD1EokC;EC6ElkC,eAAe;AACjB;;AD9EioC;ECiF/nC,cAAc;AAChB;;ADlF0qC;ECqFxqC,WAAW;AACb;;ADtF2tC;ECyFztC,iBAAiB;AACnB;;AD1F8wC;EC6F5wC,aAAa;AACf;;AD9F+0C;ECiG70C,aAAa;AACf;;ADlGi5C;ECqG/4C,YAAY;EACZ,gBAAgB;AAClB;;ADvGq9C;EC0Gn9C,WAAW;AACb;;AD3G4+C;EC8G1+C,kBAAkB;AACpB;;AD/G+gD;ECkH7gD,WAAW;EACX,UAAU;EACV,sBAAsB;EACtB,qDAAqD;EACrD,mBAAmB;EACnB,kBAAkB;EAClB,WAAW;AACb;;ADzHmrD;EC4HjrD,UAAU;AACZ;;AD7HutD;ECgIrtD,iBAAiB;EACjB,cAAc;AAChB;;ADlIqyD;ECqInyD,eAAe;EACf,sBAAsB;AACxB","sourcesContent":[".assets :global .rc-tree-indent-unit{width:22px}.assets :global .rc-tree-treenode{line-height:30px !important}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher{position:relative;bottom:4px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper{font-size:14px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon{padding:10px 0 0 0;margin-left:0}.assets .assetBox{display:flex;align-items:center}.assets .assetBox .fileText{margin-right:4px}.bundle-tree{display:flex}.bundle-tree :global span.ant-tag{margin:none;margin-inline-end:0px}.box{display:flex;height:30px;width:100%}.box .keyword{flex:0 0 auto;padding-right:5}.divider{border-color:rgba(0,0,0,.12);position:relative;bottom:20%}.dividerDiv{flex-grow:1;margin:0 10px;bottom:10%;position:relative}.assetsTag{height:30px}.assetsTag :global .ant-divider-vertical{margin-inline:0}.bundle :global{font-size:14px}.bundle :global .rc-tree-node-content-wrapper{font-size:14px}.bundle :global .file-icon{margin-left:0}.bundle :global .ant-tree-indent-unit{width:10px}.bundle :global .ant-tree-iconEle{margin-right:2px}.bundle :global .ant-tree-node-content-wrapper-open{display:flex}.bundle :global .ant-tree-node-content-wrapper-close{display:flex}.modal :global .ant-input-affix-wrapper{padding:4px 5px;width:490px}.search-btn{color:#fff}.search-btn>span{position:relative}.search-btn::before{content:\"\";background:linear-gradient(135deg, #6253e1, #04befe);position:absolute;inset:-1px;opacity:1;transition:all .3s;border-radius:inherit}.search-btn:hover::before{opacity:0}.search-modal-list :global .ant-spin-container{overflow:auto;max-height:30rem}.search-modal-list :global .search-list-item.clickable:hover{background-color:#eee;cursor:pointer}",".assets :global .rc-tree-indent-unit {\n width: 22px;\n}\n\n.assets :global .rc-tree-treenode {\n line-height: 30px !important;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher {\n position: relative;\n bottom: 4px;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper {\n font-size: 14px;\n}\n\n.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon {\n margin-left: 0;\n padding: 10px 0 0;\n}\n\n.assets .assetBox {\n align-items: center;\n display: flex;\n}\n\n.assets .assetBox .fileText {\n margin-right: 4px;\n}\n\n.bundle-tree {\n display: flex;\n}\n\n.bundle-tree :global span.ant-tag {\n margin: none;\n margin-inline-end: 0;\n}\n\n.box {\n width: 100%;\n height: 30px;\n display: flex;\n}\n\n.box .keyword {\n flex: none;\n padding-right: 5px;\n}\n\n.divider {\n border-color: #0000001f;\n position: relative;\n bottom: 20%;\n}\n\n.dividerDiv {\n flex-grow: 1;\n margin: 0 10px;\n position: relative;\n bottom: 10%;\n}\n\n.assetsTag {\n height: 30px;\n}\n\n.assetsTag :global .ant-divider-vertical {\n margin-inline: 0;\n}\n\n.bundle :global {\n font-size: 14px;\n}\n\n.bundle :global .rc-tree-node-content-wrapper {\n font-size: 14px;\n}\n\n.bundle :global .file-icon {\n margin-left: 0;\n}\n\n.bundle :global .ant-tree-indent-unit {\n width: 10px;\n}\n\n.bundle :global .ant-tree-iconEle {\n margin-right: 2px;\n}\n\n.bundle :global .ant-tree-node-content-wrapper-open {\n display: flex;\n}\n\n.bundle :global .ant-tree-node-content-wrapper-close {\n display: flex;\n}\n\n.modal :global .ant-input-affix-wrapper {\n width: 490px;\n padding: 4px 5px;\n}\n\n.search-btn {\n color: #fff;\n}\n\n.search-btn > span {\n position: relative;\n}\n\n.search-btn:before {\n content: \"\";\n opacity: 1;\n border-radius: inherit;\n background: linear-gradient(135deg, #6253e1, #04befe);\n transition: all .3s;\n position: absolute;\n inset: -1px;\n}\n\n.search-btn:hover:before {\n opacity: 0;\n}\n\n.search-modal-list :global .ant-spin-container {\n max-height: 30rem;\n overflow: auto;\n}\n\n.search-modal-list :global .search-list-item.clickable:hover {\n cursor: pointer;\n background-color: #eee;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/BundleSize/components/index.module.scss"],"names":[],"mappings":"AAAA;EACE,WAAW;AACb;;AAFgD;EAK9C,4BAA4B;AAC9B;;AAN8G;EAS5G,kBAAkB;EAClB,WAAW;AACb;;AAX0Q;EAcxQ,eAAe;AACjB;;AAfoa;EAkBla,cAAc;EACd,iBAAiB;AACnB;;AApB6jB;EAuB3jB,mBAAmB;EACnB,aAAa;AACf;;AAzB+mB;EA4B7mB,iBAAiB;AACnB;;AA7B4pB;EAgC1pB,aAAa;AACf;;AAjCsrB;EAoCprB,YAAY;EACZ,oBAAoB;AACtB;;AAtC0vB;EAyCxvB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AA5CmyB;EA+CjyB,UAAU;EACV,kBAAkB;AACpB;;AAjD+0B;EAoD70B,uBAAuB;EACvB,kBAAkB;EAClB,WAAW;AACb;;AAvDk5B;EA0Dh5B,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,WAAW;AACb;;AA9Dq9B;EAiEn9B,YAAY;AACd;;AAlE4+B;EAqE1+B,gBAAgB;AAClB;;AAtEqiC;EAyEniC,eAAe;AACjB;;AA1EokC;EA6ElkC,eAAe;AACjB;;AA9EioC;EAiF/nC,cAAc;AAChB;;AAlF0qC;EAqFxqC,WAAW;AACb;;AAtF2tC;EAyFztC,iBAAiB;AACnB;;AA1F8wC;EA6F5wC,aAAa;AACf;;AA9F+0C;EAiG70C,aAAa;AACf;;AAlGi5C;EAqG/4C,YAAY;EACZ,gBAAgB;AAClB;;AAvGq9C;EA0Gn9C,WAAW;AACb;;AA3G4+C;EA8G1+C,kBAAkB;AACpB;;AA/G+gD;EAkH7gD,WAAW;EACX,UAAU;EACV,sBAAsB;EACtB,qDAAqD;EACrD,mBAAmB;EACnB,kBAAkB;EAClB,WAAW;AACb;;AAzHmrD;EA4HjrD,UAAU;AACZ;;AA7HutD;EAgIrtD,iBAAiB;EACjB,cAAc;AAChB;;AAlIqyD;EAqInyD,eAAe;EACf,sBAAsB;AACxB","sourcesContent":[".assets :global .rc-tree-indent-unit{width:22px}.assets :global .rc-tree-treenode{line-height:30px !important}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-switcher{position:relative;bottom:4px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .rc-tree-node-content-wrapper{font-size:14px}.assets :global .rc-tree-treenode:not(.rc-tree-treenode-switcher-open):not(.rc-tree-treenode-switcher-close) .file-icon{padding:10px 0 0 0;margin-left:0}.assets .assetBox{display:flex;align-items:center}.assets .assetBox .fileText{margin-right:4px}.bundle-tree{display:flex}.bundle-tree :global span.ant-tag{margin:none;margin-inline-end:0px}.box{display:flex;height:30px;width:100%}.box .keyword{flex:0 0 auto;padding-right:5}.divider{border-color:rgba(0,0,0,.12);position:relative;bottom:20%}.dividerDiv{flex-grow:1;margin:0 10px;bottom:10%;position:relative}.assetsTag{height:30px}.assetsTag :global .ant-divider-vertical{margin-inline:0}.bundle :global{font-size:14px}.bundle :global .rc-tree-node-content-wrapper{font-size:14px}.bundle :global .file-icon{margin-left:0}.bundle :global .ant-tree-indent-unit{width:10px}.bundle :global .ant-tree-iconEle{margin-right:2px}.bundle :global .ant-tree-node-content-wrapper-open{display:flex}.bundle :global .ant-tree-node-content-wrapper-close{display:flex}.modal :global .ant-input-affix-wrapper{padding:4px 5px;width:490px}.search-btn{color:#fff}.search-btn>span{position:relative}.search-btn::before{content:\"\";background:linear-gradient(135deg, #6253e1, #04befe);position:absolute;inset:-1px;opacity:1;transition:all .3s;border-radius:inherit}.search-btn:hover::before{opacity:0}.search-modal-list :global .ant-spin-container{overflow:auto;max-height:30rem}.search-modal-list :global .search-list-item.clickable:hover{background-color:#eee;cursor:pointer}"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"pages/ModuleAnalyze/chunks.mjs","sources":["../../../src/pages/ModuleAnalyze/chunks.tsx"],"sourcesContent":["import { SDK } from '@rsdoctor/types';\nimport { Empty, Table, Tag } from 'antd';\nimport { orderBy } from 'es-toolkit/compat';\nimport React, { useMemo } from 'react';\nimport { formatSize } from 'src/utils';\nimport './index.sass';\nimport { Lodash } from '@rsdoctor/utils/common';\n\ntype ChunksDataType = {\n key: string | number;\n name: JSX.Element;\n size: JSX.Element;\n entry: JSX.Element;\n assets: JSX.Element[];\n};\n\nconst columns = [\n {\n title: 'Chunk Name',\n dataIndex: 'name',\n key: 'name',\n },\n {\n title: 'size | 大小',\n dataIndex: 'size',\n key: 'size',\n },\n {\n title: 'assets | 资源',\n dataIndex: 'assets',\n key: 'assets',\n },\n {\n title: 'Entry or Not | 是否是入口',\n dataIndex: 'entry',\n key: 'entry',\n },\n];\n\nexport const ChunksTable: React.FC<{\n chunks: SDK.ChunkData[];\n}> = ({ chunks }) => {\n const chunksData = useMemo(() => {\n const _chunksData: (ChunksDataType | undefined)[] = chunks.map((chunk) => {\n if (!chunk) return undefined;\n return {\n key: chunk.id,\n name: <Tag>{chunk.name}</Tag>,\n size: <Tag>{formatSize(chunk.parsedSize)}</Tag>,\n entry: <Tag>{chunk.entry ? '是 | Yes' : '否 | No'}</Tag>,\n assets: chunk.assets.map((asset) => (\n <p key={asset}>\n <Tag key={asset}>{asset}</Tag>\n </p>\n )),\n };\n });\n return orderBy(Lodash.compact(_chunksData), ['size'], ['desc']);\n }, [chunks]);\n\n return (\n <>\n {chunksData?.length ? (\n <Table\n bordered\n pagination={false}\n dataSource={chunksData}\n columns={columns}\n />\n ) : (\n <Empty />\n )}\n </>\n );\n};\n"],"names":["columns","ChunksTable","chunks","chunksData","useMemo","_chunksData","chunk","Tag","formatSize","asset","orderBy","Lodash","Table","Empty"],"mappings":";;;;;;;AAgBA,MAAMA,UAAU;IACd;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;IACA;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;IACA;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;IACA;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;CACD;AAEM,MAAMC,cAER,CAAC,EAAEC,MAAM,EAAE;IACd,MAAMC,aAAaC,QAAQ;QACzB,MAAMC,cAA8CH,OAAO,GAAG,CAAC,CAACI;YAC9D,IAAI,CAACA,OAAO;YACZ,OAAO;gBACL,KAAKA,MAAM,EAAE;gBACb,MAAM,WAAN,GAAM,IAACC,KAAGA;8BAAED,MAAM,IAAI;;gBACtB,MAAM,WAAN,GAAM,IAACC,KAAGA;8BAAEC,WAAWF,MAAM,UAAU;;gBACvC,OAAO,WAAP,GAAO,IAACC,KAAGA;8BAAED,MAAM,KAAK,GAAG,YAAY;;gBACvC,QAAQA,MAAM,MAAM,CAAC,GAAG,CAAC,CAACG,QAAAA,WAAAA,GACxB,IAAC;kCACC,kBAACF,KAAGA;sCAAcE;2BAARA;uBADJA;YAIZ;QACF;QACA,OAAOC,QAAQC,OAAO,OAAO,CAACN,cAAc;YAAC;SAAO,EAAE;YAAC;SAAO;IAChE,GAAG;QAACH;KAAO;IAEX,OAAO,WAAP,GACE;kBACGC,YAAY,SAAS,WAAT,GACX,IAACS,OAAKA;YACJ,UAAQ;YACR,YAAY;YACZ,YAAYT;YACZ,SAASH;2BAGX,IAACa,OAAKA,CAAAA;;AAId"}
1
+ {"version":3,"file":"pages/ModuleAnalyze/chunks.mjs","sources":["../../../src/pages/ModuleAnalyze/chunks.tsx"],"sourcesContent":["import { SDK } from '@rsdoctor/types';\nimport { Empty, Table, Tag } from 'antd';\nimport { orderBy } from 'es-toolkit/compat';\nimport React, { useMemo } from 'react';\nimport { formatSize } from 'src/utils';\nimport './index.sass';\nimport { Lodash } from '@rsdoctor/utils/common';\n\ntype ChunksDataType = {\n key: string | number;\n name: React.JSX.Element;\n size: React.JSX.Element;\n entry: React.JSX.Element;\n assets: React.JSX.Element[];\n};\n\nconst columns = [\n {\n title: 'Chunk Name',\n dataIndex: 'name',\n key: 'name',\n },\n {\n title: 'size | 大小',\n dataIndex: 'size',\n key: 'size',\n },\n {\n title: 'assets | 资源',\n dataIndex: 'assets',\n key: 'assets',\n },\n {\n title: 'Entry or Not | 是否是入口',\n dataIndex: 'entry',\n key: 'entry',\n },\n];\n\nexport const ChunksTable: React.FC<{\n chunks: SDK.ChunkData[];\n}> = ({ chunks }) => {\n const chunksData = useMemo(() => {\n const _chunksData: (ChunksDataType | undefined)[] = chunks.map((chunk) => {\n if (!chunk) return undefined;\n return {\n key: chunk.id,\n name: <Tag>{chunk.name}</Tag>,\n size: <Tag>{formatSize(chunk.parsedSize)}</Tag>,\n entry: <Tag>{chunk.entry ? '是 | Yes' : '否 | No'}</Tag>,\n assets: chunk.assets.map((asset) => (\n <p key={asset}>\n <Tag key={asset}>{asset}</Tag>\n </p>\n )),\n };\n });\n return orderBy(Lodash.compact(_chunksData), ['size'], ['desc']);\n }, [chunks]);\n\n return (\n <>\n {chunksData?.length ? (\n <Table\n bordered\n pagination={false}\n dataSource={chunksData}\n columns={columns}\n />\n ) : (\n <Empty />\n )}\n </>\n );\n};\n"],"names":["columns","ChunksTable","chunks","chunksData","useMemo","_chunksData","chunk","Tag","formatSize","asset","orderBy","Lodash","Table","Empty"],"mappings":";;;;;;;AAgBA,MAAMA,UAAU;IACd;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;IACA;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;IACA;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;IACA;QACE,OAAO;QACP,WAAW;QACX,KAAK;IACP;CACD;AAEM,MAAMC,cAER,CAAC,EAAEC,MAAM,EAAE;IACd,MAAMC,aAAaC,QAAQ;QACzB,MAAMC,cAA8CH,OAAO,GAAG,CAAC,CAACI;YAC9D,IAAI,CAACA,OAAO;YACZ,OAAO;gBACL,KAAKA,MAAM,EAAE;gBACb,MAAM,WAAN,GAAM,IAACC,KAAGA;8BAAED,MAAM,IAAI;;gBACtB,MAAM,WAAN,GAAM,IAACC,KAAGA;8BAAEC,WAAWF,MAAM,UAAU;;gBACvC,OAAO,WAAP,GAAO,IAACC,KAAGA;8BAAED,MAAM,KAAK,GAAG,YAAY;;gBACvC,QAAQA,MAAM,MAAM,CAAC,GAAG,CAAC,CAACG,QAAAA,WAAAA,GACxB,IAAC;kCACC,kBAACF,KAAGA;sCAAcE;2BAARA;uBADJA;YAIZ;QACF;QACA,OAAOC,QAAQC,OAAO,OAAO,CAACN,cAAc;YAAC;SAAO,EAAE;YAAC;SAAO;IAChE,GAAG;QAACH;KAAO;IAEX,OAAO,WAAP,GACE;kBACGC,YAAY,SAAS,WAAT,GACX,IAACS,OAAKA;YACJ,UAAQ;YACR,YAAY;YACZ,YAAYT;YACZ,SAASH;2BAGX,IAACa,OAAKA,CAAAA;;AAId"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/ModuleAnalyze/components/fileTreeCom.scss","webpack://./src/pages/ModuleAnalyze/components/fileTreeCom.scss"],"names":[],"mappings":"AAAA;ECCE,SAAS;AACX;;ADFwB;ECKtB,mBAAmB;EACnB,UAAU;EACV,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,gBAAgB;AAClB;;ADXgJ;ECc9I,sBAAsB;EACtB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,SAAS;EACT,cAAc;EACd,qBAAqB;EACrB,qBAAqB;EACrB,kBAAkB;AACpB;;ADvBkX;EC0BhX,wBAAwB;AAC1B;;AD3B2c;EC8Bzc,aAAa;AACf;;AD/Bkf;ECkChf,cAAc;AAChB;;ADnC+hB;ECsC7hB,cAAc;EACd,mBAAmB;AACrB;;ADxC0qB;EC2CxqB,qBAAqB;EACrB,kBAAkB;AACpB;;AD7C2vB;ECgDzvB,eAAe;EACf,qBAAqB;AACvB;;ADlDozB;ECqDlzB,eAAe;EACf,yBAAyB;EACzB,yBAAyB;EACzB,UAAU;AACZ;;ADzD+5B;EC4D75B,cAAc;AAChB;;AD7Dm+B;ECgEj+B,gBAAgB;AAClB;;ADjE0hC;ECoExhC,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;ADvEomC;EC0ElmC,WAAW;EACX,qBAAqB;AACvB;;AD5E+pC;EC+E7pC,yBAAyB;EACzB,oBAAoB;AACtB;;ADjF8uC;ECoF5uC,wBAAwB;AAC1B;;ADrFuyC;ECwFryC,2BAA2B;AAC7B;;ADzFg4C;EC4F93C,sBAAsB;EACtB,aAAa;AACf;;AD9Fu/C;ECiGr/C,eAAe;EACf,iBAAiB;EACjB,aAAa;AACf;;ADpGkpD;ECuGhpD,eAAe;AACjB;;ADxGw5D;EC2Gt5D,sBAAsB;AACxB;;AD5G+gE;EC+G7gE,oBAAoB;AACtB;;ADhH+nE;ECmH7nE,eAAe;EACf,cAAc;AAChB;;ADrH6vE;ECwH3vE,sBAAsB;EACtB,SAAS;EACT,qBAAqB;AACvB;;AD3Hi0E;EC8H/zE,WAAW;EACX,qBAAqB;AACvB","sourcesContent":[".file-tree-com{margin:0}.file-tree-com .file-tree-com-treenode{margin:0;padding:0;line-height:24px;white-space:nowrap;list-style:none;outline:0}.file-tree-com .file-tree-com-treenode .file-tree-com-node-content-wrapper{position:relative;display:inline-block;height:24px;margin:0;padding:0 4px;box-sizing:border-box;text-decoration:none;vertical-align:top;cursor:pointer}.file-tree-com .file-tree-com-treenode .file-tree-com-arrow-icon{transform:rotate(90deg)}.file-tree-com-child-tree{display:none}.file-tree-com-child-tree-open{display:block}.file-tree-com-treenode-disabled>span:not(.file-tree-com-switcher),.file-tree-com>a,.file-tree-com>a span{color:#767676;cursor:not-allowed}.file-tree-com-treenode-selected{background:rgba(5,145,255,.3);border-radius:4px}.file-tree-com-title{display:inline-block;cursor:pointer}.file-tree-com-titles-box:hover{background-color:#f0f3f5;border:1px solid #e5e6eb;cursor:pointer;width:80%}.file-tree-com-titles-box:hover .ant-typography:hover{color:#0079ff}.file-tree-com-node-title .file-icon{padding:4px 0 0 0}.file-tree-com-indent{display:inline-block;height:0;vertical-align:bottom}.file-tree-com-indent-unit{display:inline-block;width:14px}.file-tree-switcher-arrow{transform:rotate(0deg);transition:transform .3s ease}.file-tree-switcher-arrow-expand{transform:rotate(90deg)}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child){border-left:1px solid #eee}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles{display:flex;flex-direction:column}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title{display:flex;cursor:pointer;line-height:30px}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img{cursor:pointer}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img-tag{cursor:pointer}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-selected{background-color:#ff0}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-tag{margin-inline-end:0}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-code-tag{cursor:pointer;padding:0 2px}.rc-tree-indent{display:inline-block;height:0;vertical-align:bottom}.rc-tree-indent-unit{display:inline-block;width:14px}",".file-tree-com {\n margin: 0;\n}\n\n.file-tree-com .file-tree-com-treenode {\n white-space: nowrap;\n outline: 0;\n margin: 0;\n padding: 0;\n line-height: 24px;\n list-style: none;\n}\n\n.file-tree-com .file-tree-com-treenode .file-tree-com-node-content-wrapper {\n box-sizing: border-box;\n vertical-align: top;\n cursor: pointer;\n height: 24px;\n margin: 0;\n padding: 0 4px;\n text-decoration: none;\n display: inline-block;\n position: relative;\n}\n\n.file-tree-com .file-tree-com-treenode .file-tree-com-arrow-icon {\n transform: rotate(90deg);\n}\n\n.file-tree-com-child-tree {\n display: none;\n}\n\n.file-tree-com-child-tree-open {\n display: block;\n}\n\n.file-tree-com-treenode-disabled > span:not(.file-tree-com-switcher), .file-tree-com > a, .file-tree-com > a span {\n color: #767676;\n cursor: not-allowed;\n}\n\n.file-tree-com-treenode-selected {\n background: #0591ff4d;\n border-radius: 4px;\n}\n\n.file-tree-com-title {\n cursor: pointer;\n display: inline-block;\n}\n\n.file-tree-com-titles-box:hover {\n cursor: pointer;\n background-color: #f0f3f5;\n border: 1px solid #e5e6eb;\n width: 80%;\n}\n\n.file-tree-com-titles-box:hover .ant-typography:hover {\n color: #0079ff;\n}\n\n.file-tree-com-node-title .file-icon {\n padding: 4px 0 0;\n}\n\n.file-tree-com-indent {\n vertical-align: bottom;\n height: 0;\n display: inline-block;\n}\n\n.file-tree-com-indent-unit {\n width: 14px;\n display: inline-block;\n}\n\n.file-tree-switcher-arrow {\n transition: transform .3s;\n transform: rotate(0);\n}\n\n.file-tree-switcher-arrow-expand {\n transform: rotate(90deg);\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) {\n border-left: 1px solid #eee;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles {\n flex-direction: column;\n display: flex;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title {\n cursor: pointer;\n line-height: 30px;\n display: flex;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img, .rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-titles .file-tree-com-node-title img-tag {\n cursor: pointer;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-selected {\n background-color: #ff0;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-tag {\n margin-inline-end: 0;\n}\n\n.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) .file-tree-com-node-title-code-tag {\n cursor: pointer;\n padding: 0 2px;\n}\n\n.rc-tree-indent {\n vertical-align: bottom;\n height: 0;\n display: inline-block;\n}\n\n.rc-tree-indent-unit {\n width: 14px;\n display: inline-block;\n}\n"],"sourceRoot":""}
1
+ {"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 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/ModuleAnalyze/index.scss","webpack://./src/pages/ModuleAnalyze/index.scss"],"names":[],"mappings":"AAAA;ECCE,aAAa;EACb,gBAAgB;AAClB;;ADHuD;ECMrD,eAAe;AACjB;;ADPsH;ECUpH,sBAAsB;EACtB,aAAa;AACf;;ADZ6K;ECe3K,iBAAiB;AACnB;;ADhBwN;ECmBtN,gBAAgB;EAChB,gBAAgB;EAChB,2BAA2B;EAC3B,kBAAkB;EAClB,gBAAgB;EAChB,mBAAmB;AACrB;;ADzB2W;EC4BzW,gBAAgB;EAChB,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,qBAAqB;AACvB;;ADjC6e;ECoC3e,sBAAsB;EACtB,QAAQ;EACR,aAAa;AACf;;ADvC0jB;EC0CxjB,kCAAkC;EAClC,8BAA8B;EAC9B,mBAAmB;EACnB,cAAc;EACd,aAAa;AACf;;AD/CmtB;ECkDjtB,mBAAmB;AACrB;;ADnDmxB;ECsDjxB,gBAAgB;EAChB,4BAA4B;EAC5B,eAAe;EACf,gBAAgB;AAClB;;AD1Dw4B;EC6Dt4B,gBAAgB;EAChB,eAAe;AACjB","sourcesContent":[".module-analyze-file-tree{width:\"100%\";min-height:50em}.module-analyze-file-tree .module-analyze-empty{margin-top:20%}.module-analyze-box{display:flex;flex-direction:column}.file-tree-com-titles-box{line-height:30px}.module-analyze-bailout-card{margin-top:16px;border-radius:8px;border:1px solid rgba(5,5,5,.06);box-shadow:none;background:#fff;margin-bottom:24px}.module-analyze-bailout-card-title{display:inline-block;font-size:14px;margin-bottom:12px;color:rgba(28,31,35,.8);font-weight:600}.module-analyze-bailout-card-list{display:flex;flex-direction:column;gap:8px}.module-analyze-bailout-card-item{display:flex;align-items:center;justify-content:space-between;padding:6px 0;border-bottom:1px solid rgba(22,26,35,.08)}.module-analyze-bailout-card-item:last-child{border-bottom:none}.module-analyze-bailout-card-text{max-width:calc(100% - 70px);font-weight:400;font-size:12px;color:rgba(28,31,35,.8)}.module-analyze-bailout-card-meta{font-size:12px;color:rgba(28,31,35,.45)}",".module-analyze-file-tree {\n width: \"100%\";\n min-height: 50em;\n}\n\n.module-analyze-file-tree .module-analyze-empty {\n margin-top: 20%;\n}\n\n.module-analyze-box {\n flex-direction: column;\n display: flex;\n}\n\n.file-tree-com-titles-box {\n line-height: 30px;\n}\n\n.module-analyze-bailout-card {\n box-shadow: none;\n background: #fff;\n border: 1px solid #0505050f;\n border-radius: 8px;\n margin-top: 16px;\n margin-bottom: 24px;\n}\n\n.module-analyze-bailout-card-title {\n color: #1c1f23cc;\n margin-bottom: 12px;\n font-size: 14px;\n font-weight: 600;\n display: inline-block;\n}\n\n.module-analyze-bailout-card-list {\n flex-direction: column;\n gap: 8px;\n display: flex;\n}\n\n.module-analyze-bailout-card-item {\n border-bottom: 1px solid #161a2314;\n justify-content: space-between;\n align-items: center;\n padding: 6px 0;\n display: flex;\n}\n\n.module-analyze-bailout-card-item:last-child {\n border-bottom: none;\n}\n\n.module-analyze-bailout-card-text {\n color: #1c1f23cc;\n max-width: calc(100% - 70px);\n font-size: 12px;\n font-weight: 400;\n}\n\n.module-analyze-bailout-card-meta {\n color: #1c1f2373;\n font-size: 12px;\n}\n"],"sourceRoot":""}
1
+ {"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 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/Overall/index.module.scss","webpack://./src/pages/Overall/index.module.scss"],"names":[],"mappings":"AAAA;ECCE,6NAA6N;AAC/N;;ADFoO;ECKlO,6BAA6B;AAC/B;;ADNmS;ECSjS,OAAO;AACT;;ADVwU;ECatU,aAAa;AACf;;ADdyY;ECiBvY,8BAA8B;EAC9B,aAAa;AACf;;ADnB6b;ECsB3b,mBAAmB;AACrB","sourcesContent":[":root{--font-family-code: Roboto, Roboto Mono, -apple-system, BlinkMacSystemFont, 'Segoe UI', Menlo, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'}:root :global .ant-layout-content{padding:16px 32px !important}:root :global .ant-tree-title{flex:1}:root :global .ant-tree-node-content-wrapper-normal{display:flex}.overall{display:flex;justify-content:space-between}.layout .row{margin-bottom:16px}",":root {\n --font-family-code: Roboto, Roboto Mono, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Menlo, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n}\n\n:root :global .ant-layout-content {\n padding: 16px 32px !important;\n}\n\n:root :global .ant-tree-title {\n flex: 1;\n}\n\n:root :global .ant-tree-node-content-wrapper-normal {\n display: flex;\n}\n\n.overall {\n justify-content: space-between;\n display: flex;\n}\n\n.layout .row {\n margin-bottom: 16px;\n}\n"],"sourceRoot":""}
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":""}
@@ -4,7 +4,7 @@ import { InferServerAPIBody } from '../../../../components/Manifest/api.js';
4
4
  export type BundleDiffServerAPIProviderComponentCommonProps<T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends> = {
5
5
  manifests?: Manifest.RsdoctorManifest[];
6
6
  api: T;
7
- children: (baseline: SDK.ServerAPI.InferResponseType<T>, current: SDK.ServerAPI.InferResponseType<T>) => JSX.Element;
7
+ children: (baseline: SDK.ServerAPI.InferResponseType<T>, current: SDK.ServerAPI.InferResponseType<T>) => React.JSX.Element;
8
8
  } & InferServerAPIBody<T>;
9
9
  export interface BundleDiffContainerProps {
10
10
  manifests: Manifest.RsdoctorManifest[];
@@ -1,3 +1,3 @@
1
1
  import { SDK } from '@rsdoctor/types';
2
2
  import { BundleDiffServerAPIProviderComponentCommonProps } from '../DiffContainer/types.js';
3
- export declare const DiffServerAPIProvider: <T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends>(props: BundleDiffServerAPIProviderComponentCommonProps<T>) => JSX.Element;
3
+ export declare const DiffServerAPIProvider: <T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends>(props: BundleDiffServerAPIProviderComponentCommonProps<T>) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"pages/Resources/BundleDiff/DiffServerAPIProvider/index.mjs","sources":["../../../../../src/pages/Resources/BundleDiff/DiffServerAPIProvider/index.tsx"],"sourcesContent":["import { Client, SDK, Constants } from '@rsdoctor/types';\nimport { ServerAPIProvider } from 'src/components/Manifest';\nimport { fetchManifest, useUrlQuery } from 'src/utils';\nimport { Algorithm } from '@rsdoctor/utils/common';\nimport { BundleDiffServerAPIProviderComponentCommonProps } from '../DiffContainer/types';\n\nexport const DiffServerAPIProvider = <\n T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends,\n>(\n props: BundleDiffServerAPIProviderComponentCommonProps<T>,\n): JSX.Element => {\n const { api, body, children, manifests } = props;\n const query = useUrlQuery();\n\n const windowData = (window as any)[Constants.WINDOW_RSDOCTOR_TAG];\n if (windowData?.baseline && windowData?.current) {\n const baseline = JSON.parse(Algorithm.decompressText(windowData.baseline));\n const current = JSON.parse(Algorithm.decompressText(windowData.current));\n return <>{children(baseline, current)}</>;\n }\n\n if (manifests?.length) {\n return <>{children(manifests[0].data as any, manifests[1].data as any)}</>;\n }\n\n const [baselineFile, currentFile] =\n query[Client.RsdoctorClientUrlQuery.BundleDiffFiles]?.split(',') || [];\n\n return (\n <ServerAPIProvider\n api={api}\n body={body}\n manifestLoader={\n baselineFile ? () => fetchManifest(baselineFile) : undefined\n }\n >\n {(baseline) => {\n return (\n <ServerAPIProvider\n api={api}\n body={body}\n manifestLoader={\n currentFile ? () => fetchManifest(currentFile) : undefined\n }\n >\n {(current) => {\n return children(baseline, current);\n }}\n </ServerAPIProvider>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["DiffServerAPIProvider","props","api","body","children","manifests","query","useUrlQuery","windowData","window","Constants","baseline","JSON","Algorithm","current","baselineFile","currentFile","Client","ServerAPIProvider","fetchManifest","undefined"],"mappings":";;;;;AAMO,MAAMA,wBAAwB,CAGnCC;IAEA,MAAM,EAAEC,GAAG,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGJ;IAC3C,MAAMK,QAAQC;IAEd,MAAMC,aAAcC,MAAc,CAACC,UAAU,mBAAmB,CAAC;IACjE,IAAIF,YAAY,YAAYA,YAAY,SAAS;QAC/C,MAAMG,WAAWC,KAAK,KAAK,CAACC,UAAU,cAAc,CAACL,WAAW,QAAQ;QACxE,MAAMM,UAAUF,KAAK,KAAK,CAACC,UAAU,cAAc,CAACL,WAAW,OAAO;QACtE,OAAO,WAAP,GAAO;sBAAGJ,SAASO,UAAUG;;IAC/B;IAEA,IAAIT,WAAW,QACb,OAAO,WAAP,GAAO;kBAAGD,SAASC,SAAS,CAAC,EAAE,CAAC,IAAI,EAASA,SAAS,CAAC,EAAE,CAAC,IAAI;;IAGhE,MAAM,CAACU,cAAcC,YAAY,GAC/BV,KAAK,CAACW,OAAO,sBAAsB,CAAC,eAAe,CAAC,EAAE,MAAM,QAAQ,EAAE;IAExE,OAAO,WAAP,GACE,IAACC,mBAAiBA;QAChB,KAAKhB;QACL,MAAMC;QACN,gBACEY,eAAe,IAAMI,cAAcJ,gBAAgBK;kBAGpD,CAACT,WACO,WAAP,GACE,IAACO,mBAAiBA;gBAChB,KAAKhB;gBACL,MAAMC;gBACN,gBACEa,cAAc,IAAMG,cAAcH,eAAeI;0BAGlD,CAACN,UACOV,SAASO,UAAUG;;;AAOxC"}
1
+ {"version":3,"file":"pages/Resources/BundleDiff/DiffServerAPIProvider/index.mjs","sources":["../../../../../src/pages/Resources/BundleDiff/DiffServerAPIProvider/index.tsx"],"sourcesContent":["import { Client, SDK, Constants } from '@rsdoctor/types';\nimport { ServerAPIProvider } from 'src/components/Manifest';\nimport { fetchManifest, useUrlQuery } from 'src/utils';\nimport { Algorithm } from '@rsdoctor/utils/common';\nimport { BundleDiffServerAPIProviderComponentCommonProps } from '../DiffContainer/types';\n\nexport const DiffServerAPIProvider = <\n T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends,\n>(\n props: BundleDiffServerAPIProviderComponentCommonProps<T>,\n): React.JSX.Element => {\n const { api, body, children, manifests } = props;\n const query = useUrlQuery();\n\n const windowData = (window as any)[Constants.WINDOW_RSDOCTOR_TAG];\n if (windowData?.baseline && windowData?.current) {\n const baseline = JSON.parse(Algorithm.decompressText(windowData.baseline));\n const current = JSON.parse(Algorithm.decompressText(windowData.current));\n return <>{children(baseline, current)}</>;\n }\n\n if (manifests?.length) {\n return <>{children(manifests[0].data as any, manifests[1].data as any)}</>;\n }\n\n const [baselineFile, currentFile] =\n query[Client.RsdoctorClientUrlQuery.BundleDiffFiles]?.split(',') || [];\n\n return (\n <ServerAPIProvider\n api={api}\n body={body}\n manifestLoader={\n baselineFile ? () => fetchManifest(baselineFile) : undefined\n }\n >\n {(baseline) => {\n return (\n <ServerAPIProvider\n api={api}\n body={body}\n manifestLoader={\n currentFile ? () => fetchManifest(currentFile) : undefined\n }\n >\n {(current) => {\n return children(baseline, current);\n }}\n </ServerAPIProvider>\n );\n }}\n </ServerAPIProvider>\n );\n};\n"],"names":["DiffServerAPIProvider","props","api","body","children","manifests","query","useUrlQuery","windowData","window","Constants","baseline","JSON","Algorithm","current","baselineFile","currentFile","Client","ServerAPIProvider","fetchManifest","undefined"],"mappings":";;;;;AAMO,MAAMA,wBAAwB,CAGnCC;IAEA,MAAM,EAAEC,GAAG,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGJ;IAC3C,MAAMK,QAAQC;IAEd,MAAMC,aAAcC,MAAc,CAACC,UAAU,mBAAmB,CAAC;IACjE,IAAIF,YAAY,YAAYA,YAAY,SAAS;QAC/C,MAAMG,WAAWC,KAAK,KAAK,CAACC,UAAU,cAAc,CAACL,WAAW,QAAQ;QACxE,MAAMM,UAAUF,KAAK,KAAK,CAACC,UAAU,cAAc,CAACL,WAAW,OAAO;QACtE,OAAO,WAAP,GAAO;sBAAGJ,SAASO,UAAUG;;IAC/B;IAEA,IAAIT,WAAW,QACb,OAAO,WAAP,GAAO;kBAAGD,SAASC,SAAS,CAAC,EAAE,CAAC,IAAI,EAASA,SAAS,CAAC,EAAE,CAAC,IAAI;;IAGhE,MAAM,CAACU,cAAcC,YAAY,GAC/BV,KAAK,CAACW,OAAO,sBAAsB,CAAC,eAAe,CAAC,EAAE,MAAM,QAAQ,EAAE;IAExE,OAAO,WAAP,GACE,IAACC,mBAAiBA;QAChB,KAAKhB;QACL,MAAMC;QACN,gBACEY,eAAe,IAAMI,cAAcJ,gBAAgBK;kBAGpD,CAACT,WACO,WAAP,GACE,IAACO,mBAAiBA;gBAChB,KAAKhB;gBACL,MAAMC;gBACN,gBACEa,cAAc,IAAMG,cAAcH,eAAeI;0BAGlD,CAACN,UACOV,SAASO,UAAUG;;;AAOxC"}
@@ -11,10 +11,10 @@ import { getHoverMessageInModule } from "./utils.mjs";
11
11
  const defaultEditOption = defineMonacoOptions();
12
12
  function CodeEditor(props) {
13
13
  const { module, moduleGraph, ranges, toLine, setEditorData, source } = props;
14
- const editorRef = useRef();
14
+ const editorRef = useRef(void 0);
15
15
  const oldRanges = useRef([]);
16
16
  const oldHovers = useRef([]);
17
- const oldToLine = useRef();
17
+ const oldToLine = useRef(void 0);
18
18
  const changeModule = useRef(false);
19
19
  const [content, setContent] = useState('');
20
20
  useEffect(()=>{
@@ -1 +1 @@
1
- {"version":3,"file":"pages/TreeShaking/editor.mjs","sources":["../../../src/pages/TreeShaking/editor.tsx"],"sourcesContent":["import { InfoCircleOutlined, LoadingOutlined } from '@ant-design/icons';\nimport Editor, { OnMount } from '@monaco-editor/react';\nimport { SDK } from '@rsdoctor/types';\nimport { Card, Space, Tooltip, Typography } from 'antd';\nimport type { editor, Range as RangeClass } from 'monaco-editor';\nimport path from 'path-browserify';\nimport { useEffect, useRef, useState } from 'react';\nimport {\n defineMonacoOptions,\n getFilePathFormat,\n getSelectionRange,\n} from 'src/components/base/CodeViewer/utils';\nimport { parseOpenTag } from './open-tag';\nimport { Range } from './range';\nimport { SetEditorStatus } from './types';\nimport { getHoverMessageInModule } from './utils';\n\nexport interface CodeEditorProps {\n module: SDK.ModuleInstance;\n moduleGraph: SDK.ModuleGraphInstance;\n ranges: SDK.SourceRange[];\n setEditorData: SetEditorStatus;\n source: SDK.ModuleSource;\n toLine?: number;\n}\n\nconst defaultEditOption = defineMonacoOptions();\n\nexport function CodeEditor(props: CodeEditorProps) {\n const { module, moduleGraph, ranges, toLine, setEditorData, source } = props;\n const editorRef = useRef<editor.IStandaloneCodeEditor>();\n const oldRanges = useRef<string[]>([]);\n const oldHovers = useRef<string[]>([]);\n const oldToLine = useRef<number>();\n const changeModule = useRef(false);\n const [content, setContent] = useState('');\n // const [isDynamic, setIsDynamic] = useState(false);\n // const [exports, setExports] = useState<SDK.ExportData[]>([]);\n\n useEffect(() => {\n const { isPreferSource } = module;\n changeModule.current = true;\n setContent(\n source.source || isPreferSource ? source.source : source.transformed,\n );\n setTimeout(() => {\n oldHovers.current =\n editorRef.current\n ?.getModel()\n ?.deltaDecorations(\n oldHovers.current,\n getHoverMessageInModule(module, moduleGraph),\n ) ?? [];\n }, 200);\n }, [module, source]);\n\n useEffect(() => {\n function setRangeAndLine() {\n const model = editorRef.current?.getModel();\n\n if (!model) {\n return;\n }\n\n oldRanges.current = model.deltaDecorations(\n oldRanges.current,\n ranges.map((arr) => {\n return {\n range: getSelectionRange(\n arr,\n Range as unknown as typeof RangeClass,\n ),\n options: {\n stickiness: 1,\n inlineClassName: 'tree-shaking-statement-side-effect',\n isWholeLine: false,\n showIfCollapsed: true,\n },\n } as unknown as editor.IModelDecoration;\n }),\n );\n\n if (\n editorRef.current &&\n typeof toLine === 'number' &&\n oldToLine.current !== toLine\n ) {\n oldToLine.current = toLine;\n editorRef.current.revealLine(toLine, 0);\n }\n }\n\n // 模块变更时,高亮和滚动需要等待 300ms,确保在文本变更之后\n if (changeModule) {\n setTimeout(setRangeAndLine, 300);\n } else {\n setRangeAndLine();\n }\n\n changeModule.current = false;\n }, [ranges, toLine]);\n\n useEffect(() => {\n const openEditor = (event: MouseEvent) => {\n const query = parseOpenTag(event.target as HTMLElement);\n\n if (query) {\n const module = moduleGraph.getModuleById(query.module);\n\n if (module) {\n setEditorData(module, [query.range], query.range.start.line);\n }\n }\n };\n\n document.body.addEventListener('click', openEditor);\n\n return () => {\n document.body.removeEventListener('click', openEditor);\n };\n }, []);\n\n if (!module) {\n return <div>请选择要查看的模块</div>;\n }\n\n const handleEditorDidMount: OnMount = (editor) => {\n editorRef.current = editor;\n };\n\n return (\n <Card\n title={\n <Tooltip title={module.path}>\n <Space>\n <Typography.Text>{path.basename(module.path)}</Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n }\n className=\"tree-shaking-editor\"\n >\n {/* TODO: change to CodeViewer */}\n <Editor\n theme=\"vs-dark\"\n language={getFilePathFormat(module.path)}\n value={content}\n loading={<LoadingOutlined style={{ fontSize: 30 }} />}\n options={defaultEditOption}\n onMount={handleEditorDidMount}\n />\n </Card>\n );\n}\n"],"names":["defaultEditOption","defineMonacoOptions","CodeEditor","props","module","moduleGraph","ranges","toLine","setEditorData","source","editorRef","useRef","oldRanges","oldHovers","oldToLine","changeModule","content","setContent","useState","useEffect","isPreferSource","setTimeout","getHoverMessageInModule","setRangeAndLine","model","arr","getSelectionRange","Range","openEditor","event","query","parseOpenTag","document","handleEditorDidMount","editor","Card","Tooltip","Space","Typography","path","InfoCircleOutlined","Editor","getFilePathFormat","LoadingOutlined"],"mappings":";;;;;;;;;;AA0BA,MAAMA,oBAAoBC;AAEnB,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAEC,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAE,GAAGN;IACvE,MAAMO,YAAYC;IAClB,MAAMC,YAAYD,OAAiB,EAAE;IACrC,MAAME,YAAYF,OAAiB,EAAE;IACrC,MAAMG,YAAYH;IAClB,MAAMI,eAAeJ,OAAO;IAC5B,MAAM,CAACK,SAASC,WAAW,GAAGC,SAAS;IAIvCC,UAAU;QACR,MAAM,EAAEC,cAAc,EAAE,GAAGhB;QAC3BW,aAAa,OAAO,GAAG;QACvBE,WACER,OAAO,MAAM,IAAIW,iBAAiBX,OAAO,MAAM,GAAGA,OAAO,WAAW;QAEtEY,WAAW;YACTR,UAAU,OAAO,GACfH,UAAU,OAAO,EACb,YACA,iBACAG,UAAU,OAAO,EACjBS,wBAAwBlB,QAAQC,iBAC7B,EAAE;QACb,GAAG;IACL,GAAG;QAACD;QAAQK;KAAO;IAEnBU,UAAU;QACR,SAASI;YACP,MAAMC,QAAQd,UAAU,OAAO,EAAE;YAEjC,IAAI,CAACc,OACH;YAGFZ,UAAU,OAAO,GAAGY,MAAM,gBAAgB,CACxCZ,UAAU,OAAO,EACjBN,OAAO,GAAG,CAAC,CAACmB,MACH;oBACL,OAAOC,kBACLD,KACAE;oBAEF,SAAS;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,aAAa;wBACb,iBAAiB;oBACnB;gBACF;YAIJ,IACEjB,UAAU,OAAO,IACjB,AAAkB,YAAlB,OAAOH,UACPO,UAAU,OAAO,KAAKP,QACtB;gBACAO,UAAU,OAAO,GAAGP;gBACpBG,UAAU,OAAO,CAAC,UAAU,CAACH,QAAQ;YACvC;QACF;QAGA,IAAIQ,cACFM,WAAWE,iBAAiB;aAE5BA;QAGFR,aAAa,OAAO,GAAG;IACzB,GAAG;QAACT;QAAQC;KAAO;IAEnBY,UAAU;QACR,MAAMS,aAAa,CAACC;YAClB,MAAMC,QAAQC,aAAaF,MAAM,MAAM;YAEvC,IAAIC,OAAO;gBACT,MAAM1B,SAASC,YAAY,aAAa,CAACyB,MAAM,MAAM;gBAErD,IAAI1B,QACFI,cAAcJ,QAAQ;oBAAC0B,MAAM,KAAK;iBAAC,EAAEA,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI;YAE/D;QACF;QAEAE,SAAS,IAAI,CAAC,gBAAgB,CAAC,SAASJ;QAExC,OAAO;YACLI,SAAS,IAAI,CAAC,mBAAmB,CAAC,SAASJ;QAC7C;IACF,GAAG,EAAE;IAEL,IAAI,CAACxB,QACH,OAAO,WAAP,GAAO,IAAC;kBAAI;;IAGd,MAAM6B,uBAAgC,CAACC;QACrCxB,UAAU,OAAO,GAAGwB;IACtB;IAEA,OAAO,WAAP,GACE,IAACC,MAAIA;QACH,qBACE,IAACC,SAAOA;YAAC,OAAOhC,OAAO,IAAI;sBACzB,mBAACiC,OAAKA;;kCACJ,IAACC,WAAW,IAAI;kCAAEC,gBAAAA,QAAa,CAACnC,OAAO,IAAI;;kCAC3C,IAACoC,oBAAkBA,CAAAA;;;;QAIzB,WAAU;kBAGV,kBAACC,OAAMA;YACL,OAAM;YACN,UAAUC,kBAAkBtC,OAAO,IAAI;YACvC,OAAOY;YACP,uBAAS,IAAC2B,iBAAeA;gBAAC,OAAO;oBAAE,UAAU;gBAAG;;YAChD,SAAS3C;YACT,SAASiC;;;AAIjB"}
1
+ {"version":3,"file":"pages/TreeShaking/editor.mjs","sources":["../../../src/pages/TreeShaking/editor.tsx"],"sourcesContent":["import { InfoCircleOutlined, LoadingOutlined } from '@ant-design/icons';\nimport Editor, { OnMount } from '@monaco-editor/react';\nimport { SDK } from '@rsdoctor/types';\nimport { Card, Space, Tooltip, Typography } from 'antd';\nimport type { editor, Range as RangeClass } from 'monaco-editor';\nimport path from 'path-browserify';\nimport { useEffect, useRef, useState } from 'react';\nimport {\n defineMonacoOptions,\n getFilePathFormat,\n getSelectionRange,\n} from 'src/components/base/CodeViewer/utils';\nimport { parseOpenTag } from './open-tag';\nimport { Range } from './range';\nimport { SetEditorStatus } from './types';\nimport { getHoverMessageInModule } from './utils';\n\nexport interface CodeEditorProps {\n module: SDK.ModuleInstance;\n moduleGraph: SDK.ModuleGraphInstance;\n ranges: SDK.SourceRange[];\n setEditorData: SetEditorStatus;\n source: SDK.ModuleSource;\n toLine?: number;\n}\n\nconst defaultEditOption = defineMonacoOptions();\n\nexport function CodeEditor(props: CodeEditorProps) {\n const { module, moduleGraph, ranges, toLine, setEditorData, source } = props;\n const editorRef = useRef<editor.IStandaloneCodeEditor>(undefined);\n const oldRanges = useRef<string[]>([]);\n const oldHovers = useRef<string[]>([]);\n const oldToLine = useRef<number>(undefined);\n const changeModule = useRef(false);\n const [content, setContent] = useState('');\n // const [isDynamic, setIsDynamic] = useState(false);\n // const [exports, setExports] = useState<SDK.ExportData[]>([]);\n\n useEffect(() => {\n const { isPreferSource } = module;\n changeModule.current = true;\n setContent(\n source.source || isPreferSource ? source.source : source.transformed,\n );\n setTimeout(() => {\n oldHovers.current =\n editorRef.current\n ?.getModel()\n ?.deltaDecorations(\n oldHovers.current,\n getHoverMessageInModule(module, moduleGraph),\n ) ?? [];\n }, 200);\n }, [module, source]);\n\n useEffect(() => {\n function setRangeAndLine() {\n const model = editorRef.current?.getModel();\n\n if (!model) {\n return;\n }\n\n oldRanges.current = model.deltaDecorations(\n oldRanges.current,\n ranges.map((arr) => {\n return {\n range: getSelectionRange(\n arr,\n Range as unknown as typeof RangeClass,\n ),\n options: {\n stickiness: 1,\n inlineClassName: 'tree-shaking-statement-side-effect',\n isWholeLine: false,\n showIfCollapsed: true,\n },\n } as unknown as editor.IModelDecoration;\n }),\n );\n\n if (\n editorRef.current &&\n typeof toLine === 'number' &&\n oldToLine.current !== toLine\n ) {\n oldToLine.current = toLine;\n editorRef.current.revealLine(toLine, 0);\n }\n }\n\n // 模块变更时,高亮和滚动需要等待 300ms,确保在文本变更之后\n if (changeModule) {\n setTimeout(setRangeAndLine, 300);\n } else {\n setRangeAndLine();\n }\n\n changeModule.current = false;\n }, [ranges, toLine]);\n\n useEffect(() => {\n const openEditor = (event: MouseEvent) => {\n const query = parseOpenTag(event.target as HTMLElement);\n\n if (query) {\n const module = moduleGraph.getModuleById(query.module);\n\n if (module) {\n setEditorData(module, [query.range], query.range.start.line);\n }\n }\n };\n\n document.body.addEventListener('click', openEditor);\n\n return () => {\n document.body.removeEventListener('click', openEditor);\n };\n }, []);\n\n if (!module) {\n return <div>请选择要查看的模块</div>;\n }\n\n const handleEditorDidMount: OnMount = (editor) => {\n editorRef.current = editor;\n };\n\n return (\n <Card\n title={\n <Tooltip title={module.path}>\n <Space>\n <Typography.Text>{path.basename(module.path)}</Typography.Text>\n <InfoCircleOutlined />\n </Space>\n </Tooltip>\n }\n className=\"tree-shaking-editor\"\n >\n {/* TODO: change to CodeViewer */}\n <Editor\n theme=\"vs-dark\"\n language={getFilePathFormat(module.path)}\n value={content}\n loading={<LoadingOutlined style={{ fontSize: 30 }} />}\n options={defaultEditOption}\n onMount={handleEditorDidMount}\n />\n </Card>\n );\n}\n"],"names":["defaultEditOption","defineMonacoOptions","CodeEditor","props","module","moduleGraph","ranges","toLine","setEditorData","source","editorRef","useRef","undefined","oldRanges","oldHovers","oldToLine","changeModule","content","setContent","useState","useEffect","isPreferSource","setTimeout","getHoverMessageInModule","setRangeAndLine","model","arr","getSelectionRange","Range","openEditor","event","query","parseOpenTag","document","handleEditorDidMount","editor","Card","Tooltip","Space","Typography","path","InfoCircleOutlined","Editor","getFilePathFormat","Loading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GAAG;QAACV;QAAQC;KAAO;IAEnBa,UAAU;QACR,MAAMS,aAAa,CAACC;YAClB,MAAMC,QAAQC,aAAaF,MAAM,MAAM;YAEvC,IAAIC,OAAO;gBACT,MAAM3B,SAASC,YAAY,aAAa,CAAC0B,MAAM,MAAM;gBAErD,IAAI3B,QACFI,cAAcJ,QAAQ;oBAAC2B,MAAM,KAAK;iBAAC,EAAEA,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI;YAE/D;QACF;QAEAE,SAAS,IAAI,CAAC,gBAAgB,CAAC,SAASJ;QAExC,OAAO;YACLI,SAAS,IAAI,CAAC,mBAAmB,CAAC,SAASJ;QAC7C;IACF,GAAG,EAAE;IAEL,IAAI,CAACzB,QACH,OAAO,WAAP,GAAO,IAAC;kBAAI;;IAGd,MAAM8B,uBAAgC,CAACC;QACrCzB,UAAU,OAAO,GAAGyB;IACtB;IAEA,OAAO,WAAP,GACE,IAACC,MAAIA;QACH,qBACE,IAACC,SAAOA;YAAC,OAAOjC,OAAO,IAAI;sBACzB,mBAACkC,OAAKA;;kCACJ,IAACC,WAAW,IAAI;kCAAEC,gBAAAA,QAAa,CAACpC,OAAO,IAAI;;kCAC3C,IAACqC,oBAAkBA,CAAAA;;;;QAIzB,WAAU;kBAGV,kBAACC,OAAMA;YACL,OAAM;YACN,UAAUC,kBAAkBvC,OAAO,IAAI;YACvC,OAAOa;YACP,uBAAS,IAAC2B,iBAAeA;gBAAC,OAAO;oBAAE,UAAU;gBAAG;;YAChD,SAAS5C;YACT,SAASkC;;;AAIjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/TreeShaking/index.scss","webpack://./src/pages/TreeShaking/index.scss"],"names":[],"mappings":"AAAA;ECCE,WAAW;EACX,YAAY;AACd;;ADH0C;ECMxC,sBAAsB;EACtB,aAAa;AACf;;ADR0G;ECWxG,mBAAmB;EACnB,0BAA0B;AAC5B;;ADb8M;ECgB5M,mBAAmB;EACnB,0BAA0B;AAC5B;;ADlB6T;ECqB3T,aAAa;AACf;;ADtBqX;ECyBnX,YAAY;EACZ,cAAc;AAChB;;AD3Bsb;EC8Bpb,YAAY;EACZ,aAAa;AACf;;ADhCuf;ECmCrf,UAAU;AACZ;;ADpCwjB;ECuCtjB,WAAW;EACX,yBAAyB;AAC3B;;ADzC8rB;EC4C5rB,UAAU;AACZ;;AD7CqwB;ECgDnwB,YAAY;AACd;;ADjD21B;ECoDz1B,mBAAmB;AACrB;;ADrDi9B;ECwD/8B,+BAA+B;AACjC;;ADzD4oC;EC4D1oC,4BAA4B;AAC9B;;AD7D60C;ECgE30C,0BAA0B;AAC5B;;ADjE2gD;ECoEzgD,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;AACf;;ADvEunD;EC0ErnD,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;AAClB;;AD7EuwD;ECgFrwD,sBAAsB;EACtB,WAAW;AACb;;ADlFm1D;ECqFj1D,kBAAkB;EAClB,iBAAiB;AACnB;;ADvFq8D;EC0Fn8D,aAAa;AACf","sourcesContent":[".tree-shaking-page{width:100%;height:100%}.tree-shaking-page .ant-card{display:flex;flex-direction:column}.tree-shaking-page .tree-shaking-statement-side-effect{text-decoration:underline;background:#711f1c}.tree-shaking-page .tree-shaking-statement-declaration-identifier{text-decoration:underline;background:#2c87ec}.tree-shaking-page .tree-shaking-files-box{height:700px}.tree-shaking-page .tree-shaking-files{overflow:auto;height:100%}.tree-shaking-page .tree-shaking-editor{flex-grow:1;height:700px}.tree-shaking-page .tree-shaking-editor .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-files-box,.tree-shaking-page .tree-shaking-editor .ant-card-body{width:auto;height:calc(100% - 48px)}.tree-shaking-page .tree-shaking-export-table .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider{margin:24px}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td{border-bottom:none}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th{border-top:1px solid rgba(5,5,5,.06)}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:first-child{border-start-start-radius:0}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:last-child{border-start-end-radius:0}.tree-shaking-page .tree-shaking-side-effect-list{display:flex;flex-direction:column;align-items:flex-start}.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol{margin:4px 0 10px 0;padding-left:4px}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol pre{margin:2px 0}",".tree-shaking-page {\n width: 100%;\n height: 100%;\n}\n\n.tree-shaking-page .ant-card {\n flex-direction: column;\n display: flex;\n}\n\n.tree-shaking-page .tree-shaking-statement-side-effect {\n background: #711f1c;\n text-decoration: underline;\n}\n\n.tree-shaking-page .tree-shaking-statement-declaration-identifier {\n background: #2c87ec;\n text-decoration: underline;\n}\n\n.tree-shaking-page .tree-shaking-files-box {\n height: 700px;\n}\n\n.tree-shaking-page .tree-shaking-files {\n height: 100%;\n overflow: auto;\n}\n\n.tree-shaking-page .tree-shaking-editor {\n flex-grow: 1;\n height: 700px;\n}\n\n.tree-shaking-page .tree-shaking-editor .ant-card-body {\n padding: 0;\n}\n\n.tree-shaking-page .tree-shaking-files-box, .tree-shaking-page .tree-shaking-editor .ant-card-body {\n width: auto;\n height: calc(100% - 48px);\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-card-body {\n padding: 0;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider {\n margin: 24px;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td {\n border-bottom: none;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th {\n border-top: 1px solid #0505050f;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:first-child {\n border-start-start-radius: 0;\n}\n\n.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:last-child {\n border-start-end-radius: 0;\n}\n\n.tree-shaking-page .tree-shaking-side-effect-list {\n flex-direction: column;\n align-items: flex-start;\n display: flex;\n}\n\n.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.monaco-hover .markdown-hover.hover-row hr {\n background-color: gray;\n margin: 2px;\n}\n\n.monaco-hover .markdown-hover.hover-row div[data-code=\"tree-shaking-hover\"] ol {\n margin: 4px 0 10px;\n padding-left: 4px;\n}\n\n.monaco-hover .markdown-hover.hover-row div[data-code=\"tree-shaking-hover\"] ol pre {\n margin: 2px 0;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/TreeShaking/index.scss"],"names":[],"mappings":"AAAA;EACE,WAAW;EACX,YAAY;AACd;;AAH0C;EAMxC,sBAAsB;EACtB,aAAa;AACf;;AAR0G;EAWxG,mBAAmB;EACnB,0BAA0B;AAC5B;;AAb8M;EAgB5M,mBAAmB;EACnB,0BAA0B;AAC5B;;AAlB6T;EAqB3T,aAAa;AACf;;AAtBqX;EAyBnX,YAAY;EACZ,cAAc;AAChB;;AA3Bsb;EA8Bpb,YAAY;EACZ,aAAa;AACf;;AAhCuf;EAmCrf,UAAU;AACZ;;AApCwjB;EAuCtjB,WAAW;EACX,yBAAyB;AAC3B;;AAzC8rB;EA4C5rB,UAAU;AACZ;;AA7CqwB;EAgDnwB,YAAY;AACd;;AAjD21B;EAoDz1B,mBAAmB;AACrB;;AArDi9B;EAwD/8B,+BAA+B;AACjC;;AAzD4oC;EA4D1oC,4BAA4B;AAC9B;;AA7D60C;EAgE30C,0BAA0B;AAC5B;;AAjE2gD;EAoEzgD,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;AACf;;AAvEunD;EA0ErnD,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;AAClB;;AA7EuwD;EAgFrwD,sBAAsB;EACtB,WAAW;AACb;;AAlFm1D;EAqFj1D,kBAAkB;EAClB,iBAAiB;AACnB;;AAvFq8D;EA0Fn8D,aAAa;AACf","sourcesContent":[".tree-shaking-page{width:100%;height:100%}.tree-shaking-page .ant-card{display:flex;flex-direction:column}.tree-shaking-page .tree-shaking-statement-side-effect{text-decoration:underline;background:#711f1c}.tree-shaking-page .tree-shaking-statement-declaration-identifier{text-decoration:underline;background:#2c87ec}.tree-shaking-page .tree-shaking-files-box{height:700px}.tree-shaking-page .tree-shaking-files{overflow:auto;height:100%}.tree-shaking-page .tree-shaking-editor{flex-grow:1;height:700px}.tree-shaking-page .tree-shaking-editor .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-files-box,.tree-shaking-page .tree-shaking-editor .ant-card-body{width:auto;height:calc(100% - 48px)}.tree-shaking-page .tree-shaking-export-table .ant-card-body{padding:0}.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider{margin:24px}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td{border-bottom:none}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th{border-top:1px solid rgba(5,5,5,.06)}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:first-child{border-start-start-radius:0}.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody>tr:last-child>td .ant-table-container table>thead>tr:first-child th th:last-child{border-start-end-radius:0}.tree-shaking-page .tree-shaking-side-effect-list{display:flex;flex-direction:column;align-items:flex-start}.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-hover .markdown-hover.hover-row hr{margin:2px;background-color:gray}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol{margin:4px 0 10px 0;padding-left:4px}.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol pre{margin:2px 0}"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./../../node_modules/.pnpm/@rsbuild+core@2.0.3_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[3].use[2]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/resolve-url-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[3]!/home/runner/work/rsdoctor/rsdoctor/node_modules/.pnpm/@rsbuild+plugin-sass@1.5.2_@rsbuild+core@2.0.3_core-js@3.47.0_/node_modules/@rsbuild/plugin-sass/compiled/sass-loader/index.js??ruleSet[1].rules[10].oneOf[3].use[4]!/home/runner/work/rsdoctor/rsdoctor/packages/components/src/pages/WebpackPlugins/index.scss","webpack://./src/pages/WebpackPlugins/index.scss"],"names":[],"mappings":"AAAA;ECCE,YAAY;AACd","sourcesContent":[".plugin-select .ant-select-selector{width:300px}",".plugin-select .ant-select-selector {\n width: 300px;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/pages/WebpackPlugins/index.scss"],"names":[],"mappings":"AAAA;EACE,YAAY;AACd","sourcesContent":[".plugin-select .ant-select-selector{width:300px}"],"sourceRoot":""}
@@ -11,13 +11,13 @@ export type DataNode = FieldDataNode<{
11
11
  };
12
12
  export declare const rootDirname: (file: string, sep?: string) => string | null;
13
13
  export declare function mapFileKey(arr: DataNode[], depth?: number, filter?: (node: DataNode) => boolean): DataNode['key'][];
14
- export declare function flattenDirectory(n: DataNode, parent: DataNode, sep: string | undefined, inlinedResourcePathKey: keyof DataNode, dirTitle?: (_dir: DataNode, defaultTitle: string) => JSX.Element | string): void;
14
+ export declare function flattenDirectory(n: DataNode, parent: DataNode, sep: string | undefined, inlinedResourcePathKey: keyof DataNode, dirTitle?: (_dir: DataNode, defaultTitle: string) => React.JSX.Element | string): void;
15
15
  export declare function createFileStructures({ files, inlinedResourcePathKey, fileTitle, dirTitle, page, }: {
16
16
  files: string[];
17
17
  cwd?: string;
18
18
  inlinedResourcePathKey?: keyof DataNode;
19
- dirTitle?(dir: DataNode, defaultTitle: string): JSX.Element | string;
20
- fileTitle?(file: string, basename: string): JSX.Element | string;
19
+ dirTitle?(dir: DataNode, defaultTitle: string): React.JSX.Element | string;
20
+ fileTitle?(file: string, basename: string): React.JSX.Element | string;
21
21
  page?: 'bundle' | 'other';
22
22
  }): DataNode[];
23
23
  export declare function beautifyPath(path: string, cwd: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"utils/file.mjs","sources":["../../src/utils/file.tsx"],"sourcesContent":["import { get } from 'es-toolkit/compat';\nimport { Common, SDK } from '@rsdoctor/types';\nimport { message, Space, TreeNodeProps, UploadFile } from 'antd';\nimport { FieldDataNode } from 'rc-tree';\nimport {\n FolderOpenTwoTone,\n FolderTwoTone,\n FileOutlined,\n RightOutlined,\n} from '@ant-design/icons';\nimport { getFileCom } from 'src/components/FileTree';\n\nexport type DataNode = FieldDataNode<{\n key: string | number;\n title?: React.ReactNode | ((data: DataNode) => React.ReactNode);\n}> & { __BASENAME__?: any; __RESOURCEPATH__?: any; children?: DataNode[] };\n\nexport const rootDirname = (file: string, sep = '/'): string | null => {\n const idx = file?.indexOf(sep);\n if (idx === -1) {\n return null;\n }\n if (idx === 0) {\n return sep + (rootDirname(file?.slice(1), sep) || '');\n }\n return file?.slice(0, idx);\n};\n\nexport function mapFileKey(\n arr: DataNode[],\n depth = 2,\n filter: (node: DataNode) => boolean = () => true,\n): DataNode['key'][] {\n let d = 0;\n const res: DataNode['key'][] = [];\n let parent: DataNode[] = arr;\n while (d < depth) {\n parent.filter(filter).forEach((e) => {\n if (!e.isLeaf) {\n res.push(e.key);\n }\n });\n parent = parent.reduce<DataNode[]>(\n (t, e) => t.concat(e.children || []),\n [],\n );\n if (!parent.length) break;\n d++;\n }\n return res;\n}\n\nconst basenameKey = '__BASENAME__';\n\nexport function flattenDirectory(\n n: DataNode,\n parent: DataNode,\n sep = '/',\n inlinedResourcePathKey: keyof DataNode,\n dirTitle = (_dir: DataNode, defaultTitle: string): JSX.Element | string =>\n defaultTitle,\n) {\n if (n.isLeaf) return;\n if (parent.children && parent.children.length === 1) {\n const defaultTitle = [parent[basenameKey], n[basenameKey]].join(sep);\n parent[inlinedResourcePathKey] = n[inlinedResourcePathKey];\n parent[basenameKey] = defaultTitle;\n parent.key = [parent.key, n.key].join('-');\n parent.children = n.children;\n parent.title = dirTitle(parent, defaultTitle);\n\n if (n.children) {\n n.children.forEach((c) => {\n flattenDirectory(c, parent, sep, inlinedResourcePathKey, dirTitle);\n });\n }\n } else {\n // parent has more than 1 child.\n n.title = dirTitle(n, n[basenameKey]);\n\n if (n.children) {\n n.children.forEach((c) => {\n flattenDirectory(c, n, sep, inlinedResourcePathKey, dirTitle);\n });\n }\n }\n}\n\nexport function createFileStructures({\n files,\n inlinedResourcePathKey = '__RESOURCEPATH__',\n fileTitle = (_file: string, basename: string) => basename,\n dirTitle = (_dir: DataNode, defaultTitle: string) => defaultTitle,\n page = 'other',\n}: {\n files: string[];\n cwd?: string;\n inlinedResourcePathKey?: keyof DataNode;\n dirTitle?(dir: DataNode, defaultTitle: string): JSX.Element | string;\n fileTitle?(file: string, basename: string): JSX.Element | string;\n page?: 'bundle' | 'other';\n}): DataNode[] {\n // Normalize all paths to use forward slash as internal separator for consistency\n // This ensures Windows paths (using backslash) are properly converted to forward slashes\n const normalizedFiles = files.map((file) => {\n // Always convert backslashes to forward slashes for internal processing\n return file.replace(/\\\\/g, '/');\n });\n\n // Use forward slash as the internal separator for consistency\n const internalSep = '/';\n const sepRegexp = new RegExp(internalSep);\n\n const res = normalizedFiles.reduce<DataNode>(\n (t, file) => {\n let dir = rootDirname(file, internalSep);\n let basename = dir ? file?.slice(dir.length + 1) : file;\n let parent: DataNode = t;\n\n while (dir) {\n // find the match directory.\n let exist = parent.children!.find((e) => e.title === dir) as DataNode;\n if (!exist) {\n const p = [parent[inlinedResourcePathKey], dir]\n .filter(Boolean)\n .join(internalSep);\n exist = {\n title: dir,\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps, false)\n : null,\n // key: [parent.key, parent.children!.length].join('-'),\n key: p,\n children: [],\n [inlinedResourcePathKey]: p,\n [basenameKey]: dir,\n };\n parent.children!.push(exist);\n }\n\n parent = exist;\n dir = rootDirname(basename, internalSep);\n basename = dir\n ? basename.slice(dir.length).replace(sepRegexp, '')\n : basename;\n }\n\n // uniq\n if (parent.children!.some((e) => get(e, inlinedResourcePathKey) === file))\n return t;\n\n parent.children!.push({\n title() {\n return fileTitle(file, basename);\n },\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps)\n : null,\n key: file,\n isLeaf: true,\n [inlinedResourcePathKey]: file,\n [basenameKey]: basename,\n });\n\n return t;\n },\n { key: '0', children: [] },\n ).children!;\n\n res.forEach((e) => {\n if (e.children) {\n e.children.forEach((item) =>\n flattenDirectory(\n item,\n e,\n internalSep,\n inlinedResourcePathKey,\n dirTitle,\n ),\n );\n }\n });\n\n return res;\n}\n\nexport function beautifyPath(path: string, cwd: string) {\n if (path.startsWith(cwd)) {\n return path.replace(cwd, '.');\n }\n\n return path;\n}\n\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: UploadFile,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: Blob,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: unknown,\n): Promise<T> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const { result } = reader;\n try {\n const json = JSON.parse(result!.toString());\n resolve(json);\n } catch (err) {\n message.error('json parse error');\n reject(err);\n }\n };\n reader.onerror = () => {\n const msg = 'upload json file error, please try again.';\n message.error(msg);\n reject(new Error(msg));\n };\n reader.readAsText(((file as UploadFile).originFileObj || file) as Blob);\n });\n}\n\n/**\n * beautify module path, will replace cwd & last 'node_modules'\n */\nexport function beautifyModulePath(modulePath: string, cwd: string) {\n const res = beautifyPath(modulePath, cwd);\n\n const str = '/node_modules/';\n\n const idx = res.lastIndexOf(str);\n\n if (idx > -1) {\n return {\n alias: res.slice(idx + str.length),\n inNodeModules: true,\n };\n }\n\n return {\n alias: res,\n inNodeModules: false,\n };\n}\n\nexport function getFileIcon(props: TreeNodeProps, addRowIcon = true) {\n const { data } = props;\n const expanded = props.expanded;\n if (data?.children) {\n return (\n <Space>\n {addRowIcon ? (\n <RightOutlined\n className={`file-tree-switcher-arrow ${expanded ? 'file-tree-switcher-arrow-expand' : ''}`}\n />\n ) : (\n <></>\n )}\n {expanded ? <FolderOpenTwoTone /> : <FolderTwoTone />}\n </Space>\n );\n }\n if (props.eventKey && typeof props.eventKey === 'string') {\n return getFileCom(props.eventKey);\n }\n return <FileOutlined />;\n}\n\ntype TreeNode = {\n name: string;\n value?: number;\n children?: TreeNode[];\n path?: string;\n sourceSize?: number;\n bundledSize?: number;\n gzipSize?: number;\n id?: string | number;\n // Internal helper, not exported\n _map?: Map<string, TreeNode>;\n};\n\nexport function buildTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const root: TreeNode = { name: rootName, children: [], _map: new Map() };\n\n for (const mod of modules) {\n const parts = mod.path.split(/[\\\\/]/).filter(Boolean);\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n if (i === parts.length - 1) {\n // File node\n if (!current.children) current.children = [];\n current.children.push({\n name: part,\n path: mod.path,\n sourceSize: mod.size?.sourceSize ?? 0,\n bundledSize: mod.size?.parsedSize ?? 0,\n gzipSize: mod.size?.gzipSize ?? 0,\n id: mod.id,\n });\n } else {\n // Directory node\n if (!current._map) current._map = new Map();\n let child = current._map.get(part);\n if (!child) {\n child = { name: part, children: [], _map: new Map() };\n current.children!.push(child);\n current._map.set(part, child);\n }\n current = child;\n }\n }\n }\n\n // Clean up _map property\n function clean(node: TreeNode) {\n delete node._map;\n if (node.children) node.children.forEach(clean);\n }\n clean(root);\n\n return root;\n}\n\nfunction flattenSingleChildDirs(node: TreeNode): TreeNode {\n // Return directly if leaf node\n if (!node.children || node.children.length === 0) return node;\n\n let current = node;\n // As long as children has only one child and it's not a leaf, merge\n while (\n current.children &&\n current.children.length === 1 &&\n !current.children[0].sourceSize // Not a leaf\n ) {\n current = {\n name: current.name + '/' + current.children[0].name,\n children: current.children[0].children,\n };\n }\n\n // Recursively process all child nodes\n if (current.children) {\n current.children = current.children.map(flattenSingleChildDirs);\n }\n return current;\n}\n\nfunction sumDirValue(node: TreeNode): {\n sourceSize: number;\n bundledSize: number;\n gzipSize: number;\n} {\n if (!node.children || node.children.length === 0) {\n // Leaf node, just return value\n return {\n sourceSize: node.sourceSize ?? 0,\n bundledSize: node.bundledSize ?? 0,\n gzipSize: node.gzipSize ?? 0,\n };\n }\n // Recursively sum all child nodes\n let sourceSum = 0;\n let bundledSum = 0;\n let gzipSum = 0;\n for (const child of node.children) {\n const { sourceSize, bundledSize, gzipSize } = sumDirValue(child);\n sourceSum += sourceSize;\n bundledSum += bundledSize;\n gzipSum += gzipSize;\n }\n node.sourceSize = sourceSum;\n node.bundledSize = bundledSum;\n node.gzipSize = gzipSum;\n return { sourceSize: sourceSum, bundledSize: bundledSum, gzipSize: gzipSum };\n}\n\nexport function flattenTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const rawTree = buildTreemapData(modules, rootName);\n const flattenedTree = flattenSingleChildDirs(rawTree);\n sumDirValue(flattenedTree); // Recursive sum\n return flattenedTree;\n}\n"],"names":["rootDirname","file","sep","idx","mapFileKey","arr","depth","filter","d","res","parent","e","t","basenameKey","flattenDirectory","n","inlinedResourcePathKey","dirTitle","_dir","defaultTitle","c","createFileStructures","files","fileTitle","_file","basename","page","normalizedFiles","internalSep","sepRegexp","RegExp","dir","exist","p","Boolean","props","getFileIcon","get","item","beautifyPath","path","cwd","readJSONByFileReader","Promise","resolve","reject","reader","FileReader","result","json","JSON","err","message","msg","Error","beautifyModulePath","modulePath","str","addRowIcon","data","expanded","Space","RightOutlined","FolderOpenTwoTone","FolderTwoTone","getFileCom","FileOutlined","buildTreemapData","modules","rootName","root","Map","mod","parts","current","i","part","child","clean","node","flattenSingleChildDirs","sumDirValue","sourceSum","bundledSum","gzipSum","sourceSize","bundledSize","gzipSize","flattenTreemapData","rawTree","flattenedTree"],"mappings":";;;;;AAiBO,MAAMA,cAAc,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,CAAC,EAAE,CAAC,UAAU,CAE/BA,UAAU;QACR,MAAMA,QAAQ,IAAI,GAAG,MAAMA,QAAQ,QAAQ,CAAC,EAAE,CAAC,IAAI;QACnD,UAAUA,QAAQ,QAAQ,CAAC,EAAE,CAAC,QAAQ;IACxC;IAIF,IAAIA,QAAQ,QAAQ,EAClBA,QAAQ,QAAQ,GAAGA,QAAQ,QAAQ,CAAC,GAAG,CAACM;IAE1C,OAAON;AACT;AAEA,SAASO,YAAYF,IAAc;IAKjC,IAAI,CAACA,KAAK,QAAQ,IAAIA,AAAyB,MAAzBA,KAAK,QAAQ,CAAC,MAAM,EAExC,OAAO;QACL,YAAYA,KAAK,UAAU,IAAI;QAC/B,aAAaA,KAAK,WAAW,IAAI;QACjC,UAAUA,KAAK,QAAQ,IAAI;IAC7B;IAGF,IAAIG,YAAY;IAChB,IAAIC,aAAa;IACjB,IAAIC,UAAU;IACd,KAAK,MAAMP,SAASE,KAAK,QAAQ,CAAE;QACjC,MAAM,EAAEM,UAAU,EAAEC,WAAW,EAAEC,QAAQ,EAAE,GAAGN,YAAYJ;QAC1DK,aAAaG;QACbF,cAAcG;QACdF,WAAWG;IACb;IACAR,KAAK,UAAU,GAAGG;IAClBH,KAAK,WAAW,GAAGI;IACnBJ,KAAK,QAAQ,GAAGK;IAChB,OAAO;QAAE,YAAYF;QAAW,aAAaC;QAAY,UAAUC;IAAQ;AAC7E;AAEO,SAASI,mBACdpB,OAAyB,EACzBC,WAAW,MAAM;IAEjB,MAAMoB,UAAUtB,iBAAiBC,SAASC;IAC1C,MAAMqB,gBAAgBV,uBAAuBS;IAC7CR,YAAYS;IACZ,OAAOA;AACT"}
1
+ {"version":3,"file":"utils/file.mjs","sources":["../../src/utils/file.tsx"],"sourcesContent":["import { get } from 'es-toolkit/compat';\nimport { Common, SDK } from '@rsdoctor/types';\nimport { message, Space, TreeNodeProps, UploadFile } from 'antd';\nimport { FieldDataNode } from 'rc-tree';\nimport {\n FolderOpenTwoTone,\n FolderTwoTone,\n FileOutlined,\n RightOutlined,\n} from '@ant-design/icons';\nimport { getFileCom } from 'src/components/FileTree';\n\nexport type DataNode = FieldDataNode<{\n key: string | number;\n title?: React.ReactNode | ((data: DataNode) => React.ReactNode);\n}> & { __BASENAME__?: any; __RESOURCEPATH__?: any; children?: DataNode[] };\n\nexport const rootDirname = (file: string, sep = '/'): string | null => {\n const idx = file?.indexOf(sep);\n if (idx === -1) {\n return null;\n }\n if (idx === 0) {\n return sep + (rootDirname(file?.slice(1), sep) || '');\n }\n return file?.slice(0, idx);\n};\n\nexport function mapFileKey(\n arr: DataNode[],\n depth = 2,\n filter: (node: DataNode) => boolean = () => true,\n): DataNode['key'][] {\n let d = 0;\n const res: DataNode['key'][] = [];\n let parent: DataNode[] = arr;\n while (d < depth) {\n parent.filter(filter).forEach((e) => {\n if (!e.isLeaf) {\n res.push(e.key);\n }\n });\n parent = parent.reduce<DataNode[]>(\n (t, e) => t.concat(e.children || []),\n [],\n );\n if (!parent.length) break;\n d++;\n }\n return res;\n}\n\nconst basenameKey = '__BASENAME__';\n\nexport function flattenDirectory(\n n: DataNode,\n parent: DataNode,\n sep = '/',\n inlinedResourcePathKey: keyof DataNode,\n dirTitle = (\n _dir: DataNode,\n defaultTitle: string,\n ): React.JSX.Element | string => defaultTitle,\n) {\n if (n.isLeaf) return;\n if (parent.children && parent.children.length === 1) {\n const defaultTitle = [parent[basenameKey], n[basenameKey]].join(sep);\n parent[inlinedResourcePathKey] = n[inlinedResourcePathKey];\n parent[basenameKey] = defaultTitle;\n parent.key = [parent.key, n.key].join('-');\n parent.children = n.children;\n parent.title = dirTitle(parent, defaultTitle);\n\n if (n.children) {\n n.children.forEach((c) => {\n flattenDirectory(c, parent, sep, inlinedResourcePathKey, dirTitle);\n });\n }\n } else {\n // parent has more than 1 child.\n n.title = dirTitle(n, n[basenameKey]);\n\n if (n.children) {\n n.children.forEach((c) => {\n flattenDirectory(c, n, sep, inlinedResourcePathKey, dirTitle);\n });\n }\n }\n}\n\nexport function createFileStructures({\n files,\n inlinedResourcePathKey = '__RESOURCEPATH__',\n fileTitle = (_file: string, basename: string) => basename,\n dirTitle = (_dir: DataNode, defaultTitle: string) => defaultTitle,\n page = 'other',\n}: {\n files: string[];\n cwd?: string;\n inlinedResourcePathKey?: keyof DataNode;\n dirTitle?(dir: DataNode, defaultTitle: string): React.JSX.Element | string;\n fileTitle?(file: string, basename: string): React.JSX.Element | string;\n page?: 'bundle' | 'other';\n}): DataNode[] {\n // Normalize all paths to use forward slash as internal separator for consistency\n // This ensures Windows paths (using backslash) are properly converted to forward slashes\n const normalizedFiles = files.map((file) => {\n // Always convert backslashes to forward slashes for internal processing\n return file.replace(/\\\\/g, '/');\n });\n\n // Use forward slash as the internal separator for consistency\n const internalSep = '/';\n const sepRegexp = new RegExp(internalSep);\n\n const res = normalizedFiles.reduce<DataNode>(\n (t, file) => {\n let dir = rootDirname(file, internalSep);\n let basename = dir ? file?.slice(dir.length + 1) : file;\n let parent: DataNode = t;\n\n while (dir) {\n // find the match directory.\n let exist = parent.children!.find((e) => e.title === dir) as DataNode;\n if (!exist) {\n const p = [parent[inlinedResourcePathKey], dir]\n .filter(Boolean)\n .join(internalSep);\n exist = {\n title: dir,\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps, false)\n : null,\n // key: [parent.key, parent.children!.length].join('-'),\n key: p,\n children: [],\n [inlinedResourcePathKey]: p,\n [basenameKey]: dir,\n };\n parent.children!.push(exist);\n }\n\n parent = exist;\n dir = rootDirname(basename, internalSep);\n basename = dir\n ? basename.slice(dir.length).replace(sepRegexp, '')\n : basename;\n }\n\n // uniq\n if (parent.children!.some((e) => get(e, inlinedResourcePathKey) === file))\n return t;\n\n parent.children!.push({\n title() {\n return fileTitle(file, basename);\n },\n icon:\n page === 'bundle'\n ? (props) => getFileIcon(props as TreeNodeProps)\n : null,\n key: file,\n isLeaf: true,\n [inlinedResourcePathKey]: file,\n [basenameKey]: basename,\n });\n\n return t;\n },\n { key: '0', children: [] },\n ).children!;\n\n res.forEach((e) => {\n if (e.children) {\n e.children.forEach((item) =>\n flattenDirectory(\n item,\n e,\n internalSep,\n inlinedResourcePathKey,\n dirTitle,\n ),\n );\n }\n });\n\n return res;\n}\n\nexport function beautifyPath(path: string, cwd: string) {\n if (path.startsWith(cwd)) {\n return path.replace(cwd, '.');\n }\n\n return path;\n}\n\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: UploadFile,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: Blob,\n): Promise<T>;\nexport function readJSONByFileReader<T extends Common.PlainObject>(\n file: unknown,\n): Promise<T> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const { result } = reader;\n try {\n const json = JSON.parse(result!.toString());\n resolve(json);\n } catch (err) {\n message.error('json parse error');\n reject(err);\n }\n };\n reader.onerror = () => {\n const msg = 'upload json file error, please try again.';\n message.error(msg);\n reject(new Error(msg));\n };\n reader.readAsText(((file as UploadFile).originFileObj || file) as Blob);\n });\n}\n\n/**\n * beautify module path, will replace cwd & last 'node_modules'\n */\nexport function beautifyModulePath(modulePath: string, cwd: string) {\n const res = beautifyPath(modulePath, cwd);\n\n const str = '/node_modules/';\n\n const idx = res.lastIndexOf(str);\n\n if (idx > -1) {\n return {\n alias: res.slice(idx + str.length),\n inNodeModules: true,\n };\n }\n\n return {\n alias: res,\n inNodeModules: false,\n };\n}\n\nexport function getFileIcon(props: TreeNodeProps, addRowIcon = true) {\n const { data } = props;\n const expanded = props.expanded;\n if (data?.children) {\n return (\n <Space>\n {addRowIcon ? (\n <RightOutlined\n className={`file-tree-switcher-arrow ${expanded ? 'file-tree-switcher-arrow-expand' : ''}`}\n />\n ) : (\n <></>\n )}\n {expanded ? <FolderOpenTwoTone /> : <FolderTwoTone />}\n </Space>\n );\n }\n if (props.eventKey && typeof props.eventKey === 'string') {\n return getFileCom(props.eventKey);\n }\n return <FileOutlined />;\n}\n\ntype TreeNode = {\n name: string;\n value?: number;\n children?: TreeNode[];\n path?: string;\n sourceSize?: number;\n bundledSize?: number;\n gzipSize?: number;\n id?: string | number;\n // Internal helper, not exported\n _map?: Map<string, TreeNode>;\n};\n\nexport function buildTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const root: TreeNode = { name: rootName, children: [], _map: new Map() };\n\n for (const mod of modules) {\n const parts = mod.path.split(/[\\\\/]/).filter(Boolean);\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n if (i === parts.length - 1) {\n // File node\n if (!current.children) current.children = [];\n current.children.push({\n name: part,\n path: mod.path,\n sourceSize: mod.size?.sourceSize ?? 0,\n bundledSize: mod.size?.parsedSize ?? 0,\n gzipSize: mod.size?.gzipSize ?? 0,\n id: mod.id,\n });\n } else {\n // Directory node\n if (!current._map) current._map = new Map();\n let child = current._map.get(part);\n if (!child) {\n child = { name: part, children: [], _map: new Map() };\n current.children!.push(child);\n current._map.set(part, child);\n }\n current = child;\n }\n }\n }\n\n // Clean up _map property\n function clean(node: TreeNode) {\n delete node._map;\n if (node.children) node.children.forEach(clean);\n }\n clean(root);\n\n return root;\n}\n\nfunction flattenSingleChildDirs(node: TreeNode): TreeNode {\n // Return directly if leaf node\n if (!node.children || node.children.length === 0) return node;\n\n let current = node;\n // As long as children has only one child and it's not a leaf, merge\n while (\n current.children &&\n current.children.length === 1 &&\n !current.children[0].sourceSize // Not a leaf\n ) {\n current = {\n name: current.name + '/' + current.children[0].name,\n children: current.children[0].children,\n };\n }\n\n // Recursively process all child nodes\n if (current.children) {\n current.children = current.children.map(flattenSingleChildDirs);\n }\n return current;\n}\n\nfunction sumDirValue(node: TreeNode): {\n sourceSize: number;\n bundledSize: number;\n gzipSize: number;\n} {\n if (!node.children || node.children.length === 0) {\n // Leaf node, just return value\n return {\n sourceSize: node.sourceSize ?? 0,\n bundledSize: node.bundledSize ?? 0,\n gzipSize: node.gzipSize ?? 0,\n };\n }\n // Recursively sum all child nodes\n let sourceSum = 0;\n let bundledSum = 0;\n let gzipSum = 0;\n for (const child of node.children) {\n const { sourceSize, bundledSize, gzipSize } = sumDirValue(child);\n sourceSum += sourceSize;\n bundledSum += bundledSize;\n gzipSum += gzipSize;\n }\n node.sourceSize = sourceSum;\n node.bundledSize = bundledSum;\n node.gzipSize = gzipSum;\n return { sourceSize: sourceSum, bundledSize: bundledSum, gzipSize: gzipSum };\n}\n\nexport function flattenTreemapData(\n modules: SDK.ModuleData[],\n rootName = 'dist',\n): TreeNode {\n const rawTree = buildTreemapData(modules, rootName);\n const flattenedTree = flattenSingleChildDirs(rawTree);\n sumDirValue(flattenedTree); // Recursive sum\n return flattenedTree;\n}\n"],"names":["rootDirname","file","sep","idx","mapFileKey","arr","depth","filter","d","res","parent","e","t","basenameKey","flattenDirectory","n","inlinedResourcePathKey","dirTitle","_dir","defaultTitle","c","createFileStructures","files","fileTitle","_file","basename","page","normalizedFiles","internalSep","sepRegexp","RegExp","dir","exist","p","Boolean","props","getFileIcon","get","item","beautifyPath","path","cwd","readJSONByFileReader","Promise","resolve","reject","reader","FileReader","result","json","JSON","err","message","msg","Error","beautifyModulePath","modulePath","str","addRowIcon","data","expanded","Space","RightOutlined","FolderOpenTwoTone","FolderTwoTone","getFileCom","FileOutlined","buildTreemapData","modules","rootName","root","Map","mod","parts","current","i","part","child","clean","node","flattenSingleChildDirs","sumDirValue","sourceSum","bundledSum","gzipSum","sourceSize","bundledSize","gzipSize","flattenTreemapData","rawTree","flattenedTree"],"mappings":";;;;;AAiBO,MAAMA,cAAc,CAACC,MAAcC,MAAM,GAAG;IACjD,MAAMC,MAAMF,MAAM,QAAQC;IAC1B,IAAIC,AAAQ,OAARA,KACF,OAAO;IAET,IAAIA,AAAQ,MAARA,KACF,OAAOD,MAAOF,CAAAA,YAAYC,MAAM,MAAM,IAAIC,QAAQ,EAAC;IAErD,OAAOD,MAAM,MAAM,GAAGE;AACxB;AAEO,SAASC,WACdC,GAAe,EACfC,QAAQ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IAE1C,OAAON;AACT;AAEA,SAASO,YAAYF,IAAc;IAKjC,IAAI,CAACA,KAAK,QAAQ,IAAIA,AAAyB,MAAzBA,KAAK,QAAQ,CAAC,MAAM,EAExC,OAAO;QACL,YAAYA,KAAK,UAAU,IAAI;QAC/B,aAAaA,KAAK,WAAW,IAAI;QACjC,UAAUA,KAAK,QAAQ,IAAI;IAC7B;IAGF,IAAIG,YAAY;IAChB,IAAIC,aAAa;IACjB,IAAIC,UAAU;IACd,KAAK,MAAMP,SAASE,KAAK,QAAQ,CAAE;QACjC,MAAM,EAAEM,UAAU,EAAEC,WAAW,EAAEC,QAAQ,EAAE,GAAGN,YAAYJ;QAC1DK,aAAaG;QACbF,cAAcG;QACdF,WAAWG;IACb;IACAR,KAAK,UAAU,GAAGG;IAClBH,KAAK,WAAW,GAAGI;IACnBJ,KAAK,QAAQ,GAAGK;IAChB,OAAO;QAAE,YAAYF;QAAW,aAAaC;QAAY,UAAUC;IAAQ;AAC7E;AAEO,SAASI,mBACdpB,OAAyB,EACzBC,WAAW,MAAM;IAEjB,MAAMoB,UAAUtB,iBAAiBC,SAASC;IAC1C,MAAMqB,gBAAgBV,uBAAuBS;IAC7CR,YAAYS;IACZ,OAAOA;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/components",
3
- "version": "1.5.10",
3
+ "version": "1.5.12",
4
4
  "license": "MIT",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {
@@ -40,19 +40,19 @@
40
40
  "devDependencies": {
41
41
  "@rsbuild/plugin-check-syntax": "1.6.1",
42
42
  "@rsbuild/plugin-react": "2.0.0",
43
- "@rsbuild/plugin-sass": "^1.5.1",
43
+ "@rsbuild/plugin-sass": "^1.5.2",
44
44
  "@rsbuild/plugin-svgr": "2.0.2",
45
- "@types/node": "^22.8.1",
45
+ "@types/node": "^24.12.3",
46
46
  "@types/path-browserify": "1.0.3",
47
- "@types/react": "^18.3.28",
47
+ "@types/react": "^19.2.14",
48
48
  "@types/react-highlight-words": "^0.20.1",
49
49
  "@types/url-parse": "1.4.11",
50
- "react": "18.3.1",
50
+ "react": "19.2.6",
51
51
  "react-router-dom": "6.30.3",
52
- "typescript": "^5.9.2"
52
+ "typescript": "^6.0.3"
53
53
  },
54
54
  "dependencies": {
55
- "@ant-design/icons": "5.6.1",
55
+ "@ant-design/icons": "6.2.3",
56
56
  "@monaco-editor/react": "4.7.0",
57
57
  "ansi-to-react": "6.2.6",
58
58
  "antd": "5.19.1",
@@ -73,13 +73,13 @@
73
73
  "react-markdown": "^9.1.0",
74
74
  "socket.io-client": "4.8.1",
75
75
  "url-parse": "1.5.10",
76
- "@rsdoctor/graph": "1.5.10",
77
- "@rsdoctor/types": "1.5.10",
78
- "@rsdoctor/utils": "1.5.10"
76
+ "@rsdoctor/graph": "1.5.12",
77
+ "@rsdoctor/types": "1.5.12",
78
+ "@rsdoctor/utils": "1.5.12"
79
79
  },
80
80
  "peerDependencies": {
81
- "react": ">=18.3.1",
82
- "react-dom": ">=18.3.1"
81
+ "react": ">=19",
82
+ "react-dom": ">=19"
83
83
  },
84
84
  "publishConfig": {
85
85
  "access": "public",