@rsdoctor/components 1.5.17 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/components/Alert/ecma-version-check_module.css +1 -1
  2. package/dist/components/Alert/ecma-version-check_module.css.map +1 -1
  3. package/dist/components/Alerts/bundle-alert.d.ts +1 -1
  4. package/dist/components/Alerts/bundle-alert.mjs +82 -73
  5. package/dist/components/Alerts/bundle-alert.mjs.map +1 -1
  6. package/dist/components/Alerts/bundle.mjs +1 -2
  7. package/dist/components/Alerts/bundle.mjs.map +1 -1
  8. package/dist/components/Alerts/collapse-cjs-require.mjs +6 -14
  9. package/dist/components/Alerts/collapse-cjs-require.mjs.map +1 -1
  10. package/dist/components/Alerts/collapse-cross-chunks.mjs +3 -8
  11. package/dist/components/Alerts/collapse-cross-chunks.mjs.map +1 -1
  12. package/dist/components/Alerts/collapse-esm-cjs.mjs +6 -10
  13. package/dist/components/Alerts/collapse-esm-cjs.mjs.map +1 -1
  14. package/dist/components/Alerts/collapse-module-mixed-chunks.mjs +5 -12
  15. package/dist/components/Alerts/collapse-module-mixed-chunks.mjs.map +1 -1
  16. package/dist/components/Alerts/collapse-side-effects-only-imports.mjs +5 -12
  17. package/dist/components/Alerts/collapse-side-effects-only-imports.mjs.map +1 -1
  18. package/dist/components/Alerts/collapse.mjs +3 -10
  19. package/dist/components/Alerts/collapse.mjs.map +1 -1
  20. package/dist/components/Alerts/collapse_module.css +1 -1
  21. package/dist/components/Alerts/collapse_module.css.map +1 -1
  22. package/dist/components/Alerts/index.module.mjs +7 -0
  23. package/dist/components/Alerts/index.module.mjs.map +1 -0
  24. package/dist/components/Alerts/index_module.css +9 -0
  25. package/dist/components/Alerts/index_module.css.map +1 -0
  26. package/dist/components/Alerts/list.d.ts +1 -0
  27. package/dist/components/Alerts/list.mjs +13 -8
  28. package/dist/components/Alerts/list.mjs.map +1 -1
  29. package/dist/components/Alerts/list.module.mjs +2 -1
  30. package/dist/components/Alerts/list.module.mjs.map +1 -1
  31. package/dist/components/Alerts/list_module.css +8 -0
  32. package/dist/components/Alerts/list_module.css.map +1 -1
  33. package/dist/components/Card/size_module.css +0 -2
  34. package/dist/components/Card/size_module.css.map +1 -1
  35. package/dist/components/Charts/TimelineCharts/index.mjs +63 -39
  36. package/dist/components/Charts/TimelineCharts/index.mjs.map +1 -1
  37. package/dist/components/Charts/TreeMap.mjs +124 -107
  38. package/dist/components/Charts/TreeMap.mjs.map +1 -1
  39. package/dist/components/Charts/index.mjs +3 -1
  40. package/dist/components/Charts/index.mjs.map +1 -1
  41. package/dist/components/Charts/treemap_module.css +6 -5
  42. package/dist/components/Charts/treemap_module.css.map +1 -1
  43. package/dist/components/FileTree/index.css +0 -1
  44. package/dist/components/FileTree/index.css.map +1 -1
  45. package/dist/components/FileTree/index.mjs +3 -4
  46. package/dist/components/FileTree/index.mjs.map +1 -1
  47. package/dist/components/Keyword/style_module.css +0 -1
  48. package/dist/components/Keyword/style_module.css.map +1 -1
  49. package/dist/components/Layout/header.mjs +22 -6
  50. package/dist/components/Layout/header.mjs.map +1 -1
  51. package/dist/components/Layout/header.module.mjs +0 -1
  52. package/dist/components/Layout/header.module.mjs.map +1 -1
  53. package/dist/components/Layout/header_module.css +0 -6
  54. package/dist/components/Layout/header_module.css.map +1 -1
  55. package/dist/components/Layout/index.mjs +27 -8
  56. package/dist/components/Layout/index.mjs.map +1 -1
  57. package/dist/components/Layout/menus.mjs +3 -1
  58. package/dist/components/Layout/menus.mjs.map +1 -1
  59. package/dist/components/Layout/rsdoctor-title-logo-dark.mjs +2 -0
  60. package/dist/components/Loader/Analysis/files.mjs +16 -17
  61. package/dist/components/Loader/Analysis/files.mjs.map +1 -1
  62. package/dist/components/Loader/Analysis/style_module.css +13 -14
  63. package/dist/components/Loader/Analysis/style_module.css.map +1 -1
  64. package/dist/components/Loader/executions.mjs +5 -13
  65. package/dist/components/Loader/executions.mjs.map +1 -1
  66. package/dist/components/Opener/ide.mjs +36 -2
  67. package/dist/components/Opener/ide.mjs.map +1 -1
  68. package/dist/components/Overall/DataSummary.mjs +21 -20
  69. package/dist/components/Overall/DataSummary.mjs.map +1 -1
  70. package/dist/components/Overall/DataSummary.module.mjs +1 -12
  71. package/dist/components/Overall/DataSummary.module.mjs.map +1 -1
  72. package/dist/components/Overall/DataSummary_module.css +7 -72
  73. package/dist/components/Overall/DataSummary_module.css.map +1 -1
  74. package/dist/components/Overall/bundle_module.css +1 -4
  75. package/dist/components/Overall/bundle_module.css.map +1 -1
  76. package/dist/components/Overall/list_module.css +0 -2
  77. package/dist/components/Overall/list_module.css.map +1 -1
  78. package/dist/components/Overall/overview_module.css +1 -2
  79. package/dist/components/Overall/overview_module.css.map +1 -1
  80. package/dist/components/base/CodeViewer/index.d.ts +1 -1
  81. package/dist/components/base/CodeViewer/index.mjs +5 -3
  82. package/dist/components/base/CodeViewer/index.mjs.map +1 -1
  83. package/dist/components/base/CodeViewer/interface.d.ts +1 -2
  84. package/dist/components/base/DiffViewer/index.d.ts +1 -1
  85. package/dist/components/base/DiffViewer/index.mjs +4 -1
  86. package/dist/components/base/DiffViewer/index.mjs.map +1 -1
  87. package/dist/components/base/DiffViewer/interface.d.ts +1 -2
  88. package/dist/pages/BundleSize/components/asset-path.d.ts +7 -0
  89. package/dist/pages/BundleSize/components/asset-path.mjs +9 -0
  90. package/dist/pages/BundleSize/components/asset-path.mjs.map +1 -0
  91. package/dist/pages/BundleSize/components/asset-path.test.d.ts +1 -0
  92. package/dist/pages/BundleSize/components/asset-path.test.mjs +27 -0
  93. package/dist/pages/BundleSize/components/asset-path.test.mjs.map +1 -0
  94. package/dist/pages/BundleSize/components/asset_module.css +7 -5
  95. package/dist/pages/BundleSize/components/asset_module.css.map +1 -1
  96. package/dist/pages/BundleSize/components/card_module.css +2 -2
  97. package/dist/pages/BundleSize/components/card_module.css.map +1 -1
  98. package/dist/pages/BundleSize/components/cards.mjs +5 -6
  99. package/dist/pages/BundleSize/components/cards.mjs.map +1 -1
  100. package/dist/pages/BundleSize/components/index.mjs +15 -11
  101. package/dist/pages/BundleSize/components/index.mjs.map +1 -1
  102. package/dist/pages/BundleSize/components/index.module.mjs +1 -6
  103. package/dist/pages/BundleSize/components/index.module.mjs.map +1 -1
  104. package/dist/pages/BundleSize/components/index_module.css +0 -37
  105. package/dist/pages/BundleSize/components/index_module.css.map +1 -1
  106. package/dist/pages/BundleSize/components/search-modal.mjs +5 -5
  107. package/dist/pages/BundleSize/components/search-modal.mjs.map +1 -1
  108. package/dist/pages/BundleSize/components/search-modal.module.mjs +10 -0
  109. package/dist/pages/BundleSize/components/search-modal.module.mjs.map +1 -0
  110. package/dist/pages/BundleSize/components/search-modal_module.css +39 -0
  111. package/dist/pages/BundleSize/components/search-modal_module.css.map +1 -0
  112. package/dist/pages/BundleSize/components/tree-graph.mjs +32 -15
  113. package/dist/pages/BundleSize/components/tree-graph.mjs.map +1 -1
  114. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css +6 -2
  115. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css.map +1 -1
  116. package/dist/pages/ModuleAnalyze/index.css +4 -6
  117. package/dist/pages/ModuleAnalyze/index.css.map +1 -1
  118. package/dist/pages/ModuleAnalyze/index.mjs +3 -4
  119. package/dist/pages/ModuleAnalyze/index.mjs.map +1 -1
  120. package/dist/pages/WebpackLoaders/Analysis/index.mjs +3 -3
  121. package/dist/pages/WebpackLoaders/Analysis/index.mjs.map +1 -1
  122. package/dist/pages/WebpackLoaders/Overall/index.mjs +1 -1
  123. package/dist/pages/WebpackLoaders/Overall/index.mjs.map +1 -1
  124. package/dist/static/image/rsdoctor-title-logo-dark.png +0 -0
  125. package/dist/utils/assets.d.ts +1 -0
  126. package/dist/utils/assets.mjs +17 -0
  127. package/dist/utils/assets.mjs.map +1 -0
  128. package/dist/utils/assets.test.d.ts +1 -0
  129. package/dist/utils/assets.test.mjs +22 -0
  130. package/dist/utils/assets.test.mjs.map +1 -0
  131. package/dist/utils/hooks.d.ts +1 -0
  132. package/dist/utils/hooks.mjs +6 -1
  133. package/dist/utils/hooks.mjs.map +1 -1
  134. package/package.json +8 -8
@@ -1,12 +1,10 @@
1
1
  .root-nAtwJx {
2
- --bg-color: white;
3
2
  --height: var(--layout-nav-height, 54px);
4
3
  width: 100%;
5
4
  height: var(--height);
6
5
  padding: 0;
7
6
  padding-inline: var(--spacing-base);
8
7
  z-index: 999;
9
- background-color: var(--bg-color);
10
8
  transition: none;
11
9
  position: fixed;
12
10
  }
@@ -15,10 +13,6 @@
15
13
  top: 1px !important;
16
14
  }
17
15
 
18
- .rootDark-X_YzXd {
19
- --bg-color: #141414;
20
- }
21
-
22
16
  .innerRoot-b2vAK8 {
23
17
  height: var(--height);
24
18
  flex-wrap: nowrap;
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/components/Layout/header.module.scss"],"names":[],"mappings":"AAAA;EACE,iBAAiB;EACjB,wCAAwC;EACxC,WAAW;EACX,qBAAqB;EACrB,UAAU;EACV,mCAAmC;EACnC,YAAY;EACZ,iCAAiC;EACjC,gBAAgB;EAChB,eAAe;AACjB;;AAX0N;EAcxN,mBAAmB;AACrB;;AAf8Q;EAkB5Q,mBAAmB;AACrB;;AAnB4S;EAsB1S,qBAAqB;EACrB,iBAAiB;EACjB,8BAA8B;EAC9B,mBAAmB;EACnB,aAAa;AACf;;AA3B2Z;EA8BzZ,qBAAqB;EACrB,sCAAsC;AACxC;;AAhC+d;EAmC7d,8BAA8B;EAC9B,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AAvCujB;EA0CrjB,OAAO;AACT;;AA3CwkB;EA8CtkB,yBAAyB;EACzB,mBAAmB;EACnB,uCAAuC;EACvC,qBAAqB;EACrB,iBAAiB;EACjB,aAAa;AACf;;AApD6tB;EAuD3tB,eAAe;EACf,WAAW;EACX,YAAY;AACd;;AA1DixB;EA6D/wB,WAAW;AACb;;AA9DizB;EAiE/yB,uBAAuB;EACvB,sBAAsB;EACtB,kBAAkB;EAClB,sBAAsB;EACtB,eAAe;EACf,yBAAyB;EACzB,iBAAiB;EACjB,WAAW;EACX,eAAe;EACf,mBAAmB;EACnB,qBAAqB;AACvB;;AA5EigC;EA+E//B,yBAAyB;AAC3B;;AAhFkjC;EAmFhjC,0BAA0B;AAC5B","sourcesContent":[".root{--bg-color: white;--height: var(--layout-nav-height, 54px);width:100%;height:var(--height);position:fixed;padding:0;padding-inline:var(--spacing-base);z-index:999;background-color:var(--bg-color);transition:none}.root :global .ant-switch-handle{top:1px !important}.rootDark{--bg-color: #141414}.innerRoot{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;height:var(--height)}.leftCol{height:var(--height);line-height:calc(var(--height) + 2px)}.leftColInner{display:flex;justify-content:space-between;align-items:center;height:100%}.rightCol{flex:1}.rightColInner{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;column-gap:calc(var(--spacing-base)/3);height:var(--height)}.rsdoctorLogo{width:auto;height:30px;cursor:pointer}.rsdoctorLogo:active{opacity:.8}.translationsIcon{--color-active: #40a9ff;--color-hover: #1668dc;display:inline-block;font-size:20px;text-align:center;vertical-align:middle;cursor:pointer;width:30px;transition:all .3s ease;user-select:none}.translationsIcon:hover{color:var(--color-hover)}.translationsIcon:active{color:var(--color-active)}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/Layout/header.module.scss"],"names":[],"mappings":"AAAA;EACE,wCAAwC;EACxC,WAAW;EACX,qBAAqB;EACrB,UAAU;EACV,mCAAmC;EACnC,YAAY;EACZ,gBAAgB;EAChB,eAAe;AACjB;;AATuK;EAYrK,mBAAmB;AACrB;;AAb2N;EAgBzN,qBAAqB;EACrB,iBAAiB;EACjB,8BAA8B;EAC9B,mBAAmB;EACnB,aAAa;AACf;;AArB0U;EAwBxU,qBAAqB;EACrB,sCAAsC;AACxC;;AA1B8Y;EA6B5Y,8BAA8B;EAC9B,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AAjCse;EAoCpe,OAAO;AACT;;AArCuf;EAwCrf,yBAAyB;EACzB,mBAAmB;EACnB,uCAAuC;EACvC,qBAAqB;EACrB,iBAAiB;EACjB,aAAa;AACf;;AA9C4oB;EAiD1oB,eAAe;EACf,WAAW;EACX,YAAY;AACd;;AApDgsB;EAuD9rB,WAAW;AACb;;AAxDguB;EA2D9tB,uBAAuB;EACvB,sBAAsB;EACtB,kBAAkB;EAClB,sBAAsB;EACtB,eAAe;EACf,yBAAyB;EACzB,iBAAiB;EACjB,WAAW;EACX,eAAe;EACf,mBAAmB;EACnB,qBAAqB;AACvB;;AAtEg7B;EAyE96B,yBAAyB;AAC3B;;AA1Ei+B;EA6E/9B,0BAA0B;AAC5B","sourcesContent":[".root{--height: var(--layout-nav-height, 54px);width:100%;height:var(--height);position:fixed;padding:0;padding-inline:var(--spacing-base);z-index:999;transition:none}.root :global .ant-switch-handle{top:1px !important}.innerRoot{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;height:var(--height)}.leftCol{height:var(--height);line-height:calc(var(--height) + 2px)}.leftColInner{display:flex;justify-content:space-between;align-items:center;height:100%}.rightCol{flex:1}.rightColInner{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;column-gap:calc(var(--spacing-base)/3);height:var(--height)}.rsdoctorLogo{width:auto;height:30px;cursor:pointer}.rsdoctorLogo:active{opacity:.8}.translationsIcon{--color-active: #40a9ff;--color-hover: #1668dc;display:inline-block;font-size:20px;text-align:center;vertical-align:middle;cursor:pointer;width:30px;transition:all .3s ease;user-select:none}.translationsIcon:hover{color:var(--color-hover)}.translationsIcon:active{color:var(--color-active)}"],"sourceRoot":""}
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useContext, useEffect, useState } from "react";
2
+ import { useContext, useEffect, useLayoutEffect, useState } from "react";
3
3
  import { FloatButton, Layout } from "antd";
4
4
  import { Language, MAIN_BG, Size } from "../../constants.mjs";
5
5
  import { Header } from "./header.mjs";
6
- import { getEnableRoutesFromUrlQuery, getFirstVisitFromStorage, getLanguage, setFirstVisitToStorage, useI18n, useLocale, useUrlQuery } from "../../utils/index.mjs";
6
+ import { getEnableRoutesFromUrlQuery, getFirstVisitFromStorage, getLanguage, setFirstVisitToStorage, useI18n, useLocale, useTheme, useThemeToken, useUrlQuery } from "../../utils/index.mjs";
7
7
  import { Progress } from "./progress.mjs";
8
8
  import { ConfigContext } from "../../config.mjs";
9
9
  import { SDK } from "@rsdoctor/types";
@@ -20,6 +20,8 @@ const TitleUpdater = ({ name })=>{
20
20
  return null;
21
21
  };
22
22
  const Layout_Layout = (props)=>{
23
+ const { isLight } = useTheme();
24
+ const themeToken = useThemeToken();
23
25
  const locale = useLocale();
24
26
  const { i18n } = useI18n();
25
27
  const { children } = props;
@@ -46,11 +48,29 @@ const Layout_Layout = (props)=>{
46
48
  ]);
47
49
  const ctx = useContext(ConfigContext);
48
50
  const showHeader = !ctx.embedded;
49
- const globalCssVars = {
50
- '--spacing-base': Size.BasePadding + 'px',
51
- '--layout-nav-height': showHeader ? Size.NavBarHeight + 'px' : '0px',
52
- '--color-bg-main': MAIN_BG
53
- };
51
+ useLayoutEffect(()=>{
52
+ const $root = document.documentElement;
53
+ const globalCssVars = {
54
+ '--spacing-base': Size.BasePadding + 'px',
55
+ '--layout-nav-height': showHeader ? Size.NavBarHeight + 'px' : '0px',
56
+ '--color-bg-main': MAIN_BG,
57
+ '--color-bg-box': themeToken.colorBgContainer,
58
+ '--color-bg-box-elevated': themeToken.colorBgLayout,
59
+ '--color-border': themeToken.colorBorder,
60
+ '--color-border-secondary': themeToken.colorBorderSecondary,
61
+ '--color-divider': themeToken.colorBorder,
62
+ '--color-scrollbar': isLight ? 'rgba(0, 0, 0, 0.5)' : 'rgba(255,255,255, 0.5)',
63
+ '--text-color': themeToken.colorText,
64
+ '--text-color-secondary': themeToken.colorTextSecondary,
65
+ '--border-radius': themeToken.borderRadius + 'px',
66
+ '--border-radius-lg': themeToken.borderRadiusLG + 'px'
67
+ };
68
+ for (const [name, value] of Object.entries(globalCssVars))$root.style.setProperty(name, value);
69
+ }, [
70
+ showHeader,
71
+ themeToken,
72
+ isLight
73
+ ]);
54
74
  return /*#__PURE__*/ jsx(ServerAPIProvider, {
55
75
  api: SDK.ServerAPI.API.GetProjectInfo,
56
76
  showSkeleton: false,
@@ -59,7 +79,6 @@ const Layout_Layout = (props)=>{
59
79
  project
60
80
  },
61
81
  children: /*#__PURE__*/ jsxs(Layout, {
62
- style: globalCssVars,
63
82
  children: [
64
83
  /*#__PURE__*/ jsx(TitleUpdater, {
65
84
  name: project?.name
@@ -1 +1 @@
1
- {"version":3,"file":"components/Layout/index.mjs","sources":["../../../src/components/Layout/index.tsx"],"sourcesContent":["import { PropsWithChildren, useContext, useEffect, useState } from 'react';\nimport { FloatButton, Layout as L } from 'antd';\nimport { Language, MAIN_BG, Size } from '../../constants';\nimport { Header } from './header';\nimport {\n useLocale,\n useI18n,\n getFirstVisitFromStorage,\n setFirstVisitToStorage,\n getLanguage,\n useUrlQuery,\n getEnableRoutesFromUrlQuery,\n} from '../../utils';\nimport { Progress } from './progress';\nimport { ConfigContext } from '../../config';\nimport { SDK } from '@rsdoctor/types';\nimport { ServerAPIProvider } from '../Manifest';\nimport { ProjectInfoContext } from './project-info-context';\nimport styles from './index.module.scss';\n\nexport interface LayoutProps {\n children: React.JSX.Element;\n}\n\nconst TitleUpdater: React.FC<{\n name?: string;\n}> = ({ name }) => {\n useEffect(() => {\n if (name) {\n document.title = `Rsdoctor - ${name}`;\n } else {\n document.title = 'Rsdoctor';\n }\n }, [name]);\n\n return null;\n};\n\nexport const Layout = (\n props: PropsWithChildren<LayoutProps>,\n): React.JSX.Element => {\n const locale = useLocale();\n const { i18n } = useI18n();\n const { children } = props;\n const query = useUrlQuery();\n const [enableRoutes, setEnableRoutes] = useState<string[] | undefined>(\n () => getEnableRoutesFromUrlQuery() || undefined,\n );\n\n useEffect(() => {\n let currentLocale = locale;\n // Check if the user is visiting the site for the first time\n const visited = getFirstVisitFromStorage();\n if (!visited) {\n setFirstVisitToStorage('1');\n const targetLang = window.navigator.language.split('-')[0];\n const userLang = getLanguage(targetLang);\n\n if (Object.values(Language).includes(userLang)) {\n currentLocale = userLang;\n }\n }\n\n if (i18n.language !== currentLocale) {\n i18n.changeLanguage(currentLocale);\n }\n }, [locale]);\n\n // Listen for enableRoutes changes in URL query parameters\n useEffect(() => {\n const newEnableRoutes = getEnableRoutesFromUrlQuery();\n setEnableRoutes(newEnableRoutes || undefined);\n }, [query]);\n\n const ctx = useContext(ConfigContext);\n const showHeader = !ctx.embedded;\n\n const globalCssVars = {\n '--spacing-base': Size.BasePadding + 'px',\n '--layout-nav-height': showHeader ? Size.NavBarHeight + 'px' : '0px',\n '--color-bg-main': MAIN_BG,\n } as React.CSSProperties;\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetProjectInfo}\n showSkeleton={false}\n >\n {(project) => (\n <ProjectInfoContext.Provider value={{ project }}>\n <L style={globalCssVars}>\n <TitleUpdater name={project?.name} />\n {showHeader && <Header enableRoutes={enableRoutes} />}\n <Progress />\n <L.Content className={styles.content}>\n {children}\n <FloatButton.BackTop />\n </L.Content>\n </L>\n </ProjectInfoContext.Provider>\n )}\n </ServerAPIProvider>\n );\n};\n"],"names":["TitleUpdater","name","useEffect","document","Layout","props","locale","useLocale","i18n","useI18n","children","query","useUrlQuery","enableRoutes","setEnableRoutes","useState","getEnableRoutesFromUrlQuery","undefined","currentLocale","visited","getFirstVisitFromStorage","setFirstVisitToStorage","targetLang","window","userLang","getLanguage","Object","Language","newEnableRoutes","ctx","useContext","ConfigContext","showHeader","globalCssVars","Size","MAIN_BG","ServerAPIProvider","SDK","project","ProjectInfoContext","L","Header","Progress","styles","FloatButton"],"mappings":";;;;;;;;;;;;AAwBA,MAAMA,eAED,CAAC,EAAEC,IAAI,EAAE;IACZC,UAAU;QACR,IAAID,MACFE,SAAS,KAAK,GAAG,CAAC,WAAW,EAAEF,MAAM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BAAC,cAAc5B;;sCACrC,IAAC6B,UAAQA,CAAAA;sCACT,KAACF,OAAAA,OAAS;4BAAC,WAAWG,aAAAA,OAAc;;gCACjCjC;8CACD,IAACkC,YAAY,OAAO;;;;;;;AAOlC"}
1
+ {"version":3,"file":"components/Layout/index.mjs","sources":["../../../src/components/Layout/index.tsx"],"sourcesContent":["import {\n PropsWithChildren,\n useContext,\n useEffect,\n useLayoutEffect,\n useState,\n} from 'react';\nimport { FloatButton, Layout as L } from 'antd';\nimport { Language, MAIN_BG, Size } from '../../constants';\nimport { Header } from './header';\nimport {\n useLocale,\n useI18n,\n getFirstVisitFromStorage,\n setFirstVisitToStorage,\n getLanguage,\n useUrlQuery,\n getEnableRoutesFromUrlQuery,\n useThemeToken,\n useTheme,\n} from '../../utils';\nimport { Progress } from './progress';\nimport { ConfigContext } from '../../config';\nimport { SDK } from '@rsdoctor/types';\nimport { ServerAPIProvider } from '../Manifest';\nimport { ProjectInfoContext } from './project-info-context';\nimport styles from './index.module.scss';\n\nexport interface LayoutProps {\n children: React.JSX.Element;\n}\n\nconst TitleUpdater: React.FC<{\n name?: string;\n}> = ({ name }) => {\n useEffect(() => {\n if (name) {\n document.title = `Rsdoctor - ${name}`;\n } else {\n document.title = 'Rsdoctor';\n }\n }, [name]);\n\n return null;\n};\n\nexport const Layout = (\n props: PropsWithChildren<LayoutProps>,\n): React.JSX.Element => {\n const { isLight } = useTheme();\n const themeToken = useThemeToken();\n const locale = useLocale();\n const { i18n } = useI18n();\n const { children } = props;\n const query = useUrlQuery();\n const [enableRoutes, setEnableRoutes] = useState<string[] | undefined>(\n () => getEnableRoutesFromUrlQuery() || undefined,\n );\n\n useEffect(() => {\n let currentLocale = locale;\n // Check if the user is visiting the site for the first time\n const visited = getFirstVisitFromStorage();\n if (!visited) {\n setFirstVisitToStorage('1');\n const targetLang = window.navigator.language.split('-')[0];\n const userLang = getLanguage(targetLang);\n\n if (Object.values(Language).includes(userLang)) {\n currentLocale = userLang;\n }\n }\n\n if (i18n.language !== currentLocale) {\n i18n.changeLanguage(currentLocale);\n }\n }, [locale]);\n\n // Listen for enableRoutes changes in URL query parameters\n useEffect(() => {\n const newEnableRoutes = getEnableRoutesFromUrlQuery();\n setEnableRoutes(newEnableRoutes || undefined);\n }, [query]);\n\n const ctx = useContext(ConfigContext);\n const showHeader = !ctx.embedded;\n\n useLayoutEffect(() => {\n const $root = document.documentElement;\n const globalCssVars = {\n '--spacing-base': Size.BasePadding + 'px',\n '--layout-nav-height': showHeader ? Size.NavBarHeight + 'px' : '0px',\n '--color-bg-main': MAIN_BG,\n '--color-bg-box': themeToken.colorBgContainer,\n '--color-bg-box-elevated': themeToken.colorBgLayout,\n '--color-border': themeToken.colorBorder,\n '--color-border-secondary': themeToken.colorBorderSecondary,\n '--color-divider': themeToken.colorBorder,\n '--color-scrollbar': isLight\n ? 'rgba(0, 0, 0, 0.5)'\n : 'rgba(255,255,255, 0.5)',\n '--text-color': themeToken.colorText,\n '--text-color-secondary': themeToken.colorTextSecondary,\n '--border-radius': themeToken.borderRadius + 'px',\n '--border-radius-lg': themeToken.borderRadiusLG + 'px',\n };\n for (const [name, value] of Object.entries(globalCssVars)) {\n $root.style.setProperty(name, value);\n }\n }, [showHeader, themeToken, isLight]);\n\n return (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetProjectInfo}\n showSkeleton={false}\n >\n {(project) => (\n <ProjectInfoContext.Provider value={{ project }}>\n <L>\n <TitleUpdater name={project?.name} />\n {showHeader && <Header enableRoutes={enableRoutes} />}\n <Progress />\n <L.Content className={styles.content}>\n {children}\n <FloatButton.BackTop />\n </L.Content>\n </L>\n </ProjectInfoContext.Provider>\n )}\n </ServerAPIProvider>\n );\n};\n"],"names":["TitleUpdater","name","useEffect","document","Layout","props","isLight","useTheme","themeToken","useThemeToken","locale","useLocale","i18n","useI18n","children","query","useUrlQuery","enableRoutes","setEnableRoutes","useState","getEnableRoutesFromUrlQuery","undefined","currentLocale","visited","getFirstVisitFromStorage","setFirstVisitToStorage","targetLang","window","userLang","getLanguage","Object","Language","newEnableRoutes","ctx","useContext","ConfigContext","showHeader","useLayoutEffect","$root","globalCssVars","Size","MAIN_BG","value","ServerAPIProvider","SDK","project","ProjectInfoContext","L","Header","Progress","styles","FloatButton"],"mappings":";;;;;;;;;;;;AAgCA,MAAMA,eAED,CAAC,EAAEC,IAAI,EAAE;IACZC,UAAU;QACR,IAAID,MACFE,SAAS,KAAK,GAAG,CAAC,WAAW,EAAEF,MAAM;aAErCE,SAAS,KAAK,GAAG;IAErB,GAAG;QAACF;KAAK;IAET,OAAO;AACT;AAEO,MAAMG,gBAAS,CACpBC;IAEA,MAAM,EAAEC,OAAO,EAAE,GAAGC;IACpB,MAAMC,aAAaC;IACnB,MAAMC,SAASC;IACf,MAAM,EAAEC,IAAI,EAAE,GAAGC;IACjB,MAAM,EAAEC,QAAQ,EAAE,GAAGT;IACrB,MAAMU,QAAQC;IACd,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,SACtC,IAAMC,iCAAiCC;IAGzCnB,UAAU;QACR,IAAIoB,gBAAgBZ;QAEpB,MAAMa,UAAUC;QAChB,IAAI,CAACD,SAAS;YACZE,uBAAuB;YACvB,MAAMC,aAAaC,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAC1D,MAAMC,WAAWC,YAAYH;YAE7B,IAAII,OAAO,MAAM,CAACC,UAAU,QAAQ,CAACH,WACnCN,gBAAgBM;QAEpB;QAEA,IAAIhB,KAAK,QAAQ,KAAKU,eACpBV,KAAK,cAAc,CAACU;IAExB,GAAG;QAACZ;KAAO;IAGXR,UAAU;QACR,MAAM8B,kBAAkBZ;QACxBF,gBAAgBc,mBAAmBX;IACrC,GAAG;QAACN;KAAM;IAEV,MAAMkB,MAAMC,WAAWC;IACvB,MAAMC,aAAa,CAACH,IAAI,QAAQ;IAEhCI,gBAAgB;QACd,MAAMC,QAAQnC,SAAS,eAAe;QACtC,MAAMoC,gBAAgB;YACpB,kBAAkBC,KAAK,WAAW,GAAG;YACrC,uBAAuBJ,aAAaI,KAAK,YAAY,GAAG,OAAO;YAC/D,mBAAmBC;YACnB,kBAAkBjC,WAAW,gBAAgB;YAC7C,2BAA2BA,WAAW,aAAa;YACnD,kBAAkBA,WAAW,WAAW;YACxC,4BAA4BA,WAAW,oBAAoB;YAC3D,mBAAmBA,WAAW,WAAW;YACzC,qBAAqBF,UACjB,uBACA;YACJ,gBAAgBE,WAAW,SAAS;YACpC,0BAA0BA,WAAW,kBAAkB;YACvD,mBAAmBA,WAAW,YAAY,GAAG;YAC7C,sBAAsBA,WAAW,cAAc,GAAG;QACpD;QACA,KAAK,MAAM,CAACP,MAAMyC,MAAM,IAAIZ,OAAO,OAAO,CAACS,eACzCD,MAAM,KAAK,CAAC,WAAW,CAACrC,MAAMyC;IAElC,GAAG;QAACN;QAAY5B;QAAYF;KAAQ;IAEpC,OAAO,WAAP,GACE,IAACqC,mBAAiBA;QAChB,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,cAAc;QACrC,cAAc;kBAEb,CAACC,UAAAA,WAAAA,GACA,IAACC,mBAAmB,QAAQ;gBAAC,OAAO;oBAAED;gBAAQ;0BAC5C,mBAACE,QAACA;;sCACA,IAAC/C,cAAYA;4BAAC,MAAM6C,SAAS;;wBAC5BT,cAAc,WAAdA,GAAc,IAACY,QAAMA;4BAAC,cAAc/B;;sCACrC,IAACgC,UAAQA,CAAAA;sCACT,KAACF,OAAAA,OAAS;4BAAC,WAAWG,aAAAA,OAAc;;gCACjCpC;8CACD,IAACqC,YAAY,OAAO;;;;;;;AAOlC"}
@@ -5,7 +5,7 @@ import { Menu } from "antd";
5
5
  import { useEffect, useState } from "react";
6
6
  import { useLocation, useNavigate } from "react-router-dom";
7
7
  import { Size } from "../../constants.mjs";
8
- import { getEnableRoutesFromUrlQuery, hasBundle, hasCompile, useI18n } from "../../utils/index.mjs";
8
+ import { getEnableRoutesFromUrlQuery, hasBundle, hasCompile, useI18n, useTheme } from "../../utils/index.mjs";
9
9
  import { withServerAPI } from "../Manifest/index.mjs";
10
10
  import overall_active from "../../common/svg/navbar/overall-active.mjs";
11
11
  import overall_inactive from "../../common/svg/navbar/overall-inactive.mjs";
@@ -103,8 +103,10 @@ const MenusBase = (props)=>{
103
103
  navigate(BundleSize.route);
104
104
  }
105
105
  });
106
+ const { theme } = useTheme();
106
107
  const MenuComponent = /*#__PURE__*/ jsx(Menu, {
107
108
  items: items,
109
+ theme: theme,
108
110
  mode: "horizontal",
109
111
  onClick: (e)=>{
110
112
  if (!e.keyPath.includes(BuilderSwitchName)) navigate(e.key);
@@ -1 +1 @@
1
- {"version":3,"file":"components/Layout/menus.mjs","sources":["../../../src/components/Layout/menus.tsx"],"sourcesContent":["import {\n BoxPlotFilled,\n MenuOutlined,\n FundFilled,\n ApiFilled,\n NodeIndexOutlined,\n} from '@ant-design/icons';\nimport { Manifest, SDK } from '@rsdoctor/types';\nimport { Menu, MenuProps } from 'antd';\nimport React, { useEffect, useState } from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\nimport { Size } from '../../constants';\nimport * as OverallConstants from '../../pages/Overall/constants';\nimport {\n useI18n,\n hasBundle,\n hasCompile,\n getEnableRoutesFromUrlQuery,\n} from '../../utils';\nimport { withServerAPI } from '../Manifest';\nimport OverallActive from 'src/common/svg/navbar/overall-active.svg';\nimport OverallInActive from 'src/common/svg/navbar/overall-inactive.svg';\nimport CompileAnalysisActive from 'src/common/svg/navbar/compile-analysis-active.svg';\nimport CompileAnalysisInActive from 'src/common/svg/navbar/compile-analysis-inactive.svg';\nimport BundleSizeActive from 'src/common/svg/navbar/bundle-size-active.svg';\nimport BundleSizeInActive from 'src/common/svg/navbar/bundle-size-inactive.svg';\nimport {\n BundleSize,\n LoaderFiles,\n PluginsAnalyze,\n ModuleResolve,\n LoaderTimeline,\n} from 'src/pages';\nimport { CompileName } from './constants';\n\nconst BuilderSwitchName = 'builder-switcher';\n\nconst defaultInActive = {\n overall: <OverallInActive />,\n webpack: <CompileAnalysisInActive />,\n bundle: <BundleSizeInActive />,\n};\nconst MenusBase: React.FC<{\n style?: React.CSSProperties;\n routes: Manifest.RsdoctorManifestClientRoutes[];\n}> = (props) => {\n const { t } = useI18n();\n const { pathname } = useLocation();\n const navigate = useNavigate();\n const [navIcon, setNavIcon] = useState(defaultInActive);\n const { routes: apiRoutes } = props;\n\n // Get enableRoutes from URL query as fallback\n const urlEnableRoutes = getEnableRoutesFromUrlQuery();\n const enableRoutes =\n apiRoutes && apiRoutes.length > 0\n ? apiRoutes\n : (urlEnableRoutes as Manifest.RsdoctorManifestClientRoutes[]) || [];\n\n useEffect(() => {\n if (pathname.includes('webpack')) {\n setNavIcon({\n ...defaultInActive,\n webpack: <CompileAnalysisActive />,\n });\n } else if (pathname.includes('overall') || pathname === '/') {\n setNavIcon({\n ...defaultInActive,\n overall: <OverallActive />,\n });\n } else if (pathname.includes('bundle')) {\n setNavIcon({\n ...defaultInActive,\n bundle: <BundleSizeActive />,\n });\n }\n }, [pathname]);\n\n const iconStyle: React.CSSProperties = {\n color: 'rgba(96, 102, 114)',\n };\n const items: MenuProps['items'] = [];\n\n if (enableRoutes.includes(Manifest.RsdoctorManifestClientRoutes.Overall)) {\n items.push({\n label: t(OverallConstants.name),\n key: OverallConstants.route,\n icon: navIcon.overall,\n children: [],\n onTitleClick(e) {\n navigate(e.key);\n },\n });\n }\n\n if (hasCompile(enableRoutes)) {\n items.push({\n label: t(CompileName),\n key: CompileName,\n icon: navIcon.webpack,\n children: [\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.WebpackLoaders,\n ) && {\n label: t(LoaderTimeline.name),\n key: LoaderTimeline.route,\n icon: <BoxPlotFilled style={iconStyle} />,\n },\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.WebpackLoaders,\n ) && {\n label: t(LoaderFiles.name),\n key: LoaderFiles.route,\n icon: <FundFilled style={iconStyle} />,\n },\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.ModuleResolve,\n ) && {\n label: t(ModuleResolve.name),\n key: ModuleResolve.route,\n icon: <NodeIndexOutlined style={iconStyle} />,\n },\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.WebpackPlugins,\n ) && {\n label: t(PluginsAnalyze.name),\n key: PluginsAnalyze.route,\n icon: <ApiFilled style={iconStyle} />,\n },\n ].filter((e) => Boolean(e)) as MenuProps['items'],\n });\n }\n\n if (hasBundle(enableRoutes)) {\n items.push({\n label: t(BundleSize.name),\n key: BundleSize.name,\n icon: navIcon.bundle,\n children: [],\n onTitleClick() {\n navigate(BundleSize.route);\n },\n });\n }\n\n const MenuComponent = (\n <Menu\n items={items}\n mode=\"horizontal\"\n key={enableRoutes.join('')}\n onClick={(e) => {\n if (!e.keyPath.includes(BuilderSwitchName)) {\n navigate(e.key);\n }\n }}\n disabledOverflow\n overflowedIndicator={<MenuOutlined />}\n style={{\n height: Size.NavBarHeight,\n lineHeight: `${Size.NavBarHeight}px`,\n minWidth: 0,\n justifyContent: 'flex-end',\n ...props.style,\n }}\n selectedKeys={[pathname === '/' ? OverallConstants.route : pathname]}\n />\n );\n\n return <div style={{ marginLeft: '30px' }}>{MenuComponent}</div>;\n};\n\nexport const Menus = withServerAPI({\n api: SDK.ServerAPI.API.GetClientRoutes,\n responsePropName: 'routes',\n Component: MenusBase,\n fallbackComponent: () => null,\n showSkeleton: false,\n});\n"],"names":["BuilderSwitchName","defaultInActive","OverallInActive","CompileAnalysisInActive","BundleSizeInActive","MenusBase","props","t","useI18n","pathname","useLocation","navigate","useNavigate","navIcon","setNavIcon","useState","apiRoutes","urlEnableRoutes","getEnableRoutesFromUrlQuery","enableRoutes","useEffect","CompileAnalysisActive","OverallActive","BundleSizeActive","iconStyle","items","Manifest","OverallConstants","e","hasCompile","CompileName","LoaderTimeline","BoxPlotFilled","LoaderFiles","FundFilled","ModuleResolve","NodeIndexOutlined","PluginsAnalyze","ApiFilled","Boolean","hasBundle","BundleSize","MenuCompon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;QAEL,SAAS,CAACG;YACR,IAAI,CAACA,EAAE,OAAO,CAAC,QAAQ,CAAC5B,oBACtBW,SAASiB,EAAE,GAAG;QAElB;QACA,kBAAgB;QAChB,mCAAqB,IAACgB,cAAYA,CAAAA;QAClC,OAAO;YACL,QAAQC,KAAK,YAAY;YACzB,YAAY,GAAGA,KAAK,YAAY,CAAC,EAAE,CAAC;YACpC,UAAU;YACV,gBAAgB;YAChB,GAAGvC,MAAM,KAAK;QAChB;QACA,cAAc;YAAc,QAAbG,WAAmBkB,wDAAAA,KAAsB,GAAGlB;SAAS;OAf/DU,aAAa,IAAI,CAAC;IAmB3B,OAAO,WAAP,GAAO,IAAC;QAAI,OAAO;YAAE,YAAY;QAAO;kBAAIuB;;AAC9C;AAEO,MAAMI,QAAQC,cAAc;IACjC,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,eAAe;IACtC,kBAAkB;IAClB,WAAW3C;IACX,mBAAmB,IAAM;IACzB,cAAc;AAChB"}
1
+ {"version":3,"file":"components/Layout/menus.mjs","sources":["../../../src/components/Layout/menus.tsx"],"sourcesContent":["import {\n BoxPlotFilled,\n MenuOutlined,\n FundFilled,\n ApiFilled,\n NodeIndexOutlined,\n} from '@ant-design/icons';\nimport { Manifest, SDK } from '@rsdoctor/types';\nimport { Menu, MenuProps } from 'antd';\nimport React, { useEffect, useState } from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\nimport { Size } from '../../constants';\nimport * as OverallConstants from '../../pages/Overall/constants';\nimport {\n useI18n,\n hasBundle,\n hasCompile,\n getEnableRoutesFromUrlQuery,\n useTheme,\n} from '../../utils';\nimport { withServerAPI } from '../Manifest';\nimport OverallActive from 'src/common/svg/navbar/overall-active.svg';\nimport OverallInActive from 'src/common/svg/navbar/overall-inactive.svg';\nimport CompileAnalysisActive from 'src/common/svg/navbar/compile-analysis-active.svg';\nimport CompileAnalysisInActive from 'src/common/svg/navbar/compile-analysis-inactive.svg';\nimport BundleSizeActive from 'src/common/svg/navbar/bundle-size-active.svg';\nimport BundleSizeInActive from 'src/common/svg/navbar/bundle-size-inactive.svg';\nimport {\n BundleSize,\n LoaderFiles,\n PluginsAnalyze,\n ModuleResolve,\n LoaderTimeline,\n} from 'src/pages';\nimport { CompileName } from './constants';\n\nconst BuilderSwitchName = 'builder-switcher';\n\nconst defaultInActive = {\n overall: <OverallInActive />,\n webpack: <CompileAnalysisInActive />,\n bundle: <BundleSizeInActive />,\n};\nconst MenusBase: React.FC<{\n style?: React.CSSProperties;\n routes: Manifest.RsdoctorManifestClientRoutes[];\n}> = (props) => {\n const { t } = useI18n();\n const { pathname } = useLocation();\n const navigate = useNavigate();\n const [navIcon, setNavIcon] = useState(defaultInActive);\n const { routes: apiRoutes } = props;\n\n // Get enableRoutes from URL query as fallback\n const urlEnableRoutes = getEnableRoutesFromUrlQuery();\n const enableRoutes =\n apiRoutes && apiRoutes.length > 0\n ? apiRoutes\n : (urlEnableRoutes as Manifest.RsdoctorManifestClientRoutes[]) || [];\n\n useEffect(() => {\n if (pathname.includes('webpack')) {\n setNavIcon({\n ...defaultInActive,\n webpack: <CompileAnalysisActive />,\n });\n } else if (pathname.includes('overall') || pathname === '/') {\n setNavIcon({\n ...defaultInActive,\n overall: <OverallActive />,\n });\n } else if (pathname.includes('bundle')) {\n setNavIcon({\n ...defaultInActive,\n bundle: <BundleSizeActive />,\n });\n }\n }, [pathname]);\n\n const iconStyle: React.CSSProperties = {\n color: 'rgba(96, 102, 114)',\n };\n const items: MenuProps['items'] = [];\n\n if (enableRoutes.includes(Manifest.RsdoctorManifestClientRoutes.Overall)) {\n items.push({\n label: t(OverallConstants.name),\n key: OverallConstants.route,\n icon: navIcon.overall,\n children: [],\n onTitleClick(e) {\n navigate(e.key);\n },\n });\n }\n\n if (hasCompile(enableRoutes)) {\n items.push({\n label: t(CompileName),\n key: CompileName,\n icon: navIcon.webpack,\n children: [\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.WebpackLoaders,\n ) && {\n label: t(LoaderTimeline.name),\n key: LoaderTimeline.route,\n icon: <BoxPlotFilled style={iconStyle} />,\n },\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.WebpackLoaders,\n ) && {\n label: t(LoaderFiles.name),\n key: LoaderFiles.route,\n icon: <FundFilled style={iconStyle} />,\n },\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.ModuleResolve,\n ) && {\n label: t(ModuleResolve.name),\n key: ModuleResolve.route,\n icon: <NodeIndexOutlined style={iconStyle} />,\n },\n enableRoutes.includes(\n Manifest.RsdoctorManifestClientRoutes.WebpackPlugins,\n ) && {\n label: t(PluginsAnalyze.name),\n key: PluginsAnalyze.route,\n icon: <ApiFilled style={iconStyle} />,\n },\n ].filter((e) => Boolean(e)) as MenuProps['items'],\n });\n }\n\n if (hasBundle(enableRoutes)) {\n items.push({\n label: t(BundleSize.name),\n key: BundleSize.name,\n icon: navIcon.bundle,\n children: [],\n onTitleClick() {\n navigate(BundleSize.route);\n },\n });\n }\n\n const { theme } = useTheme();\n const MenuComponent = (\n <Menu\n items={items}\n theme={theme}\n mode=\"horizontal\"\n key={enableRoutes.join('')}\n onClick={(e) => {\n if (!e.keyPath.includes(BuilderSwitchName)) {\n navigate(e.key);\n }\n }}\n disabledOverflow\n overflowedIndicator={<MenuOutlined />}\n style={{\n height: Size.NavBarHeight,\n lineHeight: `${Size.NavBarHeight}px`,\n minWidth: 0,\n justifyContent: 'flex-end',\n ...props.style,\n }}\n selectedKeys={[pathname === '/' ? OverallConstants.route : pathname]}\n />\n );\n\n return <div style={{ marginLeft: '30px' }}>{MenuComponent}</div>;\n};\n\nexport const Menus = withServerAPI({\n api: SDK.ServerAPI.API.GetClientRoutes,\n responsePropName: 'routes',\n Component: MenusBase,\n fallbackComponent: () => null,\n showSkeleton: false,\n});\n"],"names":["BuilderSwitchName","defaultInActive","OverallInActive","CompileAnalysisInActive","BundleSizeInActive","MenusBase","props","t","useI18n","pathname","useLocation","navigate","useNavigate","navIcon","setNavIcon","useState","apiRoutes","urlEnableRoutes","getEnableRoutesFromUrlQuery","enableRoutes","useEffect","CompileAnalysisActive","OverallActive","BundleSizeActive","iconStyle","items","Manifest","OverallConstants","e","hasCompile","CompileName","LoaderTimeline","BoxPlotFilled","LoaderFiles","FundFilled","ModuleResolve","NodeIndexOutlined","PluginsAnalyze","ApiFilled","Boolean","hasBundle","BundleSize","theme","useTheme","MenuComponent","Menu","MenuOutlined","Size","Menus","withServerAPI","SDK"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,MAAMA,oBAAoB;AAE1B,MAAMC,kBAAkB;IACtB,SAAS,WAAT,GAAS,IAACC,kBAAeA,CAAAA;IACzB,SAAS,WAAT,GAAS,IAACC,2BAAuBA,CAAAA;IACjC,QAAQ,WAAR,GAAQ,IAACC,sBAAkBA,CAAAA;AAC7B;AACA,MAAMC,YAGD,CAACC;IACJ,MAAM,EAAEC,CAAC,EAAE,GAAGC;IACd,MAAM,EAAEC,QAAQ,EAAE,GAAGC;IACrB,MAAMC,WAAWC;IACjB,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASd;IACvC,MAAM,EAAE,QAAQe,SAAS,EAAE,GAAGV;IAG9B,MAAMW,kBAAkBC;IACxB,MAAMC,eACJH,aAAaA,UAAU,MAAM,GAAG,IAC5BA,YACCC,mBAA+D,EAAE;IAExEG,UAAU;QACR,IAAIX,SAAS,QAAQ,CAAC,YACpBK,WAAW;YACT,GAAGb,eAAe;YAClB,SAAS,WAAT,GAAS,IAACoB,yBAAqBA,CAAAA;QACjC;aACK,IAAIZ,SAAS,QAAQ,CAAC,cAAcA,AAAa,QAAbA,UACzCK,WAAW;YACT,GAAGb,eAAe;YAClB,SAAS,WAAT,GAAS,IAACqB,gBAAaA,CAAAA;QACzB;aACK,IAAIb,SAAS,QAAQ,CAAC,WAC3BK,WAAW;YACT,GAAGb,eAAe;YAClB,QAAQ,WAAR,GAAQ,IAACsB,oBAAgBA,CAAAA;QAC3B;IAEJ,GAAG;QAACd;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,UAAUrB,eACZM,MAAM,IAAI,CAAC;QACT,OAAOlB,EAAEkC,WAAW,IAAI;QACxB,KAAKA,WAAW,IAAI;QACpB,MAAM5B,QAAQ,MAAM;QACpB,UAAU,EAAE;QACZ;YACEF,SAAS8B,WAAW,KAAK;QAC3B;IACF;IAGF,MAAM,EAAEC,KAAK,EAAE,GAAGC;IAClB,MAAMC,gBAAgB,WAAhBA,GACJ,IAACC,MAAIA;QACH,OAAOpB;QACP,OAAOiB;QACP,MAAK;QAEL,SAAS,CAACd;YACR,IAAI,CAACA,EAAE,OAAO,CAAC,QAAQ,CAAC5B,oBACtBW,SAASiB,EAAE,GAAG;QAElB;QACA,kBAAgB;QAChB,mCAAqB,IAACkB,cAAYA,CAAAA;QAClC,OAAO;YACL,QAAQC,KAAK,YAAY;YACzB,YAAY,GAAGA,KAAK,YAAY,CAAC,EAAE,CAAC;YACpC,UAAU;YACV,gBAAgB;YAChB,GAAGzC,MAAM,KAAK;QAChB;QACA,cAAc;YAAc,QAAbG,WAAmBkB,wDAAAA,KAAsB,GAAGlB;SAAS;OAf/DU,aAAa,IAAI,CAAC;IAmB3B,OAAO,WAAP,GAAO,IAAC;QAAI,OAAO;YAAE,YAAY;QAAO;kBAAIyB;;AAC9C;AAEO,MAAMI,QAAQC,cAAc;IACjC,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,eAAe;IACtC,kBAAkB;IAClB,WAAW7C;IACX,mBAAmB,IAAM;IACzB,cAAc;AAChB"}
@@ -0,0 +1,2 @@
1
+ import rsdoctor_title_logo_dark_namespaceObject from "../../static/image/rsdoctor-title-logo-dark.png";
2
+ export default rsdoctor_title_logo_dark_namespaceObject;
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { CloseCircleOutlined } from "@ant-design/icons";
3
3
  import { SDK } from "@rsdoctor/types";
4
4
  import { Card, Col, Divider, Drawer, List, Popover, Row, Space, Table, Tag, Tooltip, Typography } from "antd";
@@ -76,17 +76,17 @@ const LoaderFiles = (props)=>{
76
76
  const key = `${file}_${e.loader}_${i}`;
77
77
  if (i <= ADDITION_LOADER_NUMBER) return /*#__PURE__*/ jsx(Tooltip, {
78
78
  title: e.path,
79
- children: /*#__PURE__*/ jsxs(Typography.Text, {
80
- className: style_module.textBox,
81
- style: {
82
- color: isError ? '#f50' : 'inherit'
83
- },
79
+ children: /*#__PURE__*/ jsxs(Tag, {
84
80
  onClick: (ev)=>{
85
81
  ev.stopPropagation();
86
82
  setResourcePath(file);
87
83
  setLoaderIndex(i);
88
84
  setDrawerVisible(true);
89
85
  },
86
+ className: style_module.textBox,
87
+ style: {
88
+ color: isError ? '#f50' : 'inherit'
89
+ },
90
90
  children: [
91
91
  /*#__PURE__*/ jsx(Typography.Text, {
92
92
  className: style_module.text,
@@ -104,7 +104,7 @@ const LoaderFiles = (props)=>{
104
104
  })
105
105
  }, key);
106
106
  }),
107
- additionalLoaders?.length ? /*#__PURE__*/ jsx(Popover, {
107
+ additionalLoaders?.length > 0 && /*#__PURE__*/ jsx(Popover, {
108
108
  content: /*#__PURE__*/ jsx(List, {
109
109
  dataSource: additionalLoaders,
110
110
  renderItem: (e, i)=>{
@@ -117,17 +117,17 @@ const LoaderFiles = (props)=>{
117
117
  style: {
118
118
  paddingBottom: 5
119
119
  },
120
- children: /*#__PURE__*/ jsxs(Typography.Text, {
121
- className: style_module.textBox,
122
- style: {
123
- color: isError ? '#f50' : 'inherit'
124
- },
120
+ children: /*#__PURE__*/ jsxs(Tag, {
125
121
  onClick: (ev)=>{
126
122
  ev.stopPropagation();
127
123
  setResourcePath(file);
128
124
  setLoaderIndex(i);
129
125
  setDrawerVisible(true);
130
126
  },
127
+ className: style_module.textBox,
128
+ style: {
129
+ color: isError ? '#f50' : 'inherit'
130
+ },
131
131
  children: [
132
132
  /*#__PURE__*/ jsx(Typography.Text, {
133
133
  className: style_module.text,
@@ -148,13 +148,13 @@ const LoaderFiles = (props)=>{
148
148
  });
149
149
  }
150
150
  }),
151
- children: /*#__PURE__*/ jsx("div", {
151
+ children: /*#__PURE__*/ jsx(Tag, {
152
152
  className: style_module.textBox,
153
153
  children: /*#__PURE__*/ jsx(Typography.Text, {
154
154
  children: "\xb7\xb7\xb7"
155
155
  })
156
156
  })
157
- }) : /*#__PURE__*/ jsx(Fragment, {})
157
+ })
158
158
  ]
159
159
  })
160
160
  ]
@@ -192,11 +192,10 @@ const LoaderFiles = (props)=>{
192
192
  children: "Files"
193
193
  }),
194
194
  /*#__PURE__*/ jsxs(Typography.Text, {
195
+ type: "secondary",
195
196
  style: {
196
197
  fontSize: 12,
197
- fontWeight: 400,
198
- color: '#1C1F2399',
199
- opacity: 0.6
198
+ fontWeight: 400
200
199
  },
201
200
  children: [
202
201
  "Total Files: ",
@@ -1 +1 @@
1
- {"version":3,"file":"components/Loader/Analysis/files.mjs","sources":["../../../../src/components/Loader/Analysis/files.tsx"],"sourcesContent":["import { CloseCircleOutlined } from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Card,\n Col,\n Divider,\n Drawer,\n List,\n Popover,\n Row,\n Space,\n Table,\n Tag,\n Tooltip,\n Typography,\n} from 'antd';\nimport { get } from 'es-toolkit/compat';\nimport React, { useMemo, useState } from 'react';\nimport { drawerWidth, Size } from '../../../constants';\nimport {\n createFileStructures,\n DataNode,\n filterLoader,\n formatCosts,\n mapFileKey,\n} from '../../../utils';\nimport { FileTree } from '../../FileTree';\nimport { Keyword } from '../../Keyword';\nimport { ServerAPIProvider } from '../../Manifest';\nimport { LoaderExecutions } from '../executions';\nimport styles from './style.module.scss';\n\nconst ADDITION_LOADER_NUMBER = 3;\n\nexport const LoaderFiles: React.FC<{\n filetree: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileTree>;\n cwd: string;\n loaders: string[];\n filename: string;\n layer?: string;\n}> = (props) => {\n const { cwd, filetree } = props;\n const [drawerVisible, setDrawerVisible] = useState(false);\n const [resourcePath, setResourcePath] = useState('');\n const [loaderIndex, setLoaderIndex] = useState(0);\n const [selectedNode, setSelectedNode] = useState<DataNode | null>(null);\n\n const maxHeight = 800;\n\n const filteredFiles = useMemo(\n () =>\n filetree.filter((e) =>\n e.loaders.some((l) =>\n filterLoader(\n e.path,\n l.loader,\n props.filename,\n props.loaders,\n e.layer,\n props?.layer,\n ),\n ),\n ),\n [props.filename, props.loaders, props.layer],\n );\n\n const inlinedResourcePathKey = '__RESOURCEPATH__';\n\n const files = useMemo(() => {\n return createFileStructures({\n files: filteredFiles.map((e) => e.path),\n cwd,\n fileTitle(file, basename) {\n const { loaders, layer } = filetree.find((e) => e.path === file)!;\n\n const additionalLoaders: (Pick<\n SDK.LoaderTransformData,\n 'path' | 'loader' | 'errors'\n > & { costs: number })[] = [];\n\n loaders.forEach(\n (l, i) => i > ADDITION_LOADER_NUMBER && additionalLoaders.push(l),\n );\n\n return (\n <div\n style={{\n wordBreak: 'break-all',\n display: 'flex',\n cursor: 'pointer',\n }}\n onClick={() => {\n setLoaderIndex(0);\n setResourcePath(file);\n setDrawerVisible(true);\n }}\n >\n <div className={styles.box}>\n <div className={styles.keywords}>\n <Keyword text={basename.replace(/\\[.*?\\]/g, '')} keyword={''} />\n </div>\n </div>\n <div className={styles.dividerDiv} style={{ flex: 1 }}>\n <Divider className={styles.divider} dashed />\n </div>\n\n {layer && (\n <Tag color=\"cyan\" bordered={false}>\n {layer}\n </Tag>\n )}\n <Space>\n {loaders.slice(0, ADDITION_LOADER_NUMBER).map((e, i) => {\n const isError = e.errors && e.errors.length;\n const key = `${file}_${e.loader}_${i}`;\n if (i <= ADDITION_LOADER_NUMBER) {\n return (\n <Tooltip title={e.path} key={key}>\n <Typography.Text\n className={styles.textBox}\n style={{ color: isError ? '#f50' : 'inherit' }}\n onClick={(ev) => {\n ev.stopPropagation();\n setResourcePath(file);\n setLoaderIndex(i);\n setDrawerVisible(true);\n }}\n >\n <Typography.Text className={styles.text} ellipsis>\n {e.loader.match(/([^/]+-loader)/g)?.[0] || e.loader}\n </Typography.Text>\n <Divider type=\"vertical\" />\n {isError ? (\n <CloseCircleOutlined />\n ) : (\n <Typography.Text className={styles.text}>\n {formatCosts(e.costs)}\n </Typography.Text>\n )}\n </Typography.Text>\n </Tooltip>\n );\n }\n })}\n {additionalLoaders?.length ? (\n <Popover\n content={\n <List\n dataSource={additionalLoaders}\n renderItem={(e, i) => {\n const isError = e.errors && e.errors.length;\n const key = `${file}_${e.loader}_${i + ADDITION_LOADER_NUMBER}`;\n\n return (\n <List.Item>\n <Tooltip title={e.path} key={key}>\n <div style={{ paddingBottom: 5 }}>\n <Typography.Text\n className={styles.textBox}\n style={{\n color: isError ? '#f50' : 'inherit',\n }}\n onClick={(ev) => {\n ev.stopPropagation();\n setResourcePath(file);\n setLoaderIndex(i);\n setDrawerVisible(true);\n }}\n >\n <Typography.Text\n className={styles.text}\n ellipsis\n >\n {e.loader.match(/([^/]+-loader)/g)?.[0] ||\n e.loader}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Typography.Text className={styles.text}>\n {formatCosts(e.costs)}\n </Typography.Text>\n </Typography.Text>\n </div>\n </Tooltip>\n </List.Item>\n );\n }}\n />\n }\n >\n <div className={styles.textBox}>\n <Typography.Text>···</Typography.Text>\n </div>\n </Popover>\n ) : (\n <></>\n )}\n </Space>\n </div>\n );\n },\n dirTitle(_dir, defaultTitle) {\n return (\n <div style={{ display: 'flex', cursor: 'pointer' }}>\n <Keyword text={defaultTitle} keyword={''} />\n </div>\n );\n },\n });\n }, [filteredFiles]);\n\n return (\n <Row style={{ width: '100%', marginLeft: 0 }} gutter={Size.BasePadding}>\n <Col span={24}>\n <Card\n title={\n <Space>\n <Typography.Text strong>Files</Typography.Text>\n <Typography.Text\n style={{\n fontSize: 12,\n fontWeight: 400,\n color: '#1C1F2399',\n opacity: 0.6,\n }}\n >\n Total Files: {filteredFiles.length}\n </Typography.Text>\n </Space>\n }\n bodyStyle={{\n overflow: 'auto',\n maxHeight,\n minHeight: '40rem',\n padding: 14,\n }}\n >\n <FileTree\n defaultExpandedKeys={mapFileKey(\n files,\n filteredFiles.length >= 100 ? 3 : 4,\n (node) => {\n const resourcePath: string = get(node, inlinedResourcePathKey)!;\n const isNodeModules =\n resourcePath.indexOf('/node_modules/') > -1;\n\n return !isNodeModules;\n },\n )}\n treeData={files}\n key={`${props.loaders.join('|')}_${props.filename}`}\n onSelect={(_e, info) => {\n if (!info.node.isLeaf) {\n setSelectedNode(info.node);\n }\n }}\n selectedKeys={selectedNode ? [selectedNode.key] : undefined}\n expandAction=\"click\"\n />\n <Drawer\n open={drawerVisible}\n onClose={() => setDrawerVisible(false)}\n maskClosable\n width={drawerWidth}\n zIndex={999}\n bodyStyle={{ padding: 0 }}\n >\n {drawerVisible ? (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetLoaderFileDetails}\n body={{ path: resourcePath }}\n >\n {(data) => (\n <LoaderExecutions data={data} cwd={cwd} index={loaderIndex} />\n )}\n </ServerAPIProvider>\n ) : null}\n </Drawer>\n </Card>\n </Col>\n\n <Drawer\n open={!!selectedNode}\n onClose={() => setSelectedNode(null)}\n maskClosable\n width={drawerWidth}\n zIndex={999}\n bodyStyle={{ padding: 0 }}\n >\n {selectedNode && (\n <Row>\n <Col span={24}>\n <Card\n title={\n <Tooltip\n title={React.cloneElement(\n selectedNode.title as React.ReactElement<{\n style?: React.CSSProperties;\n }>,\n { style: { color: '#fff' } },\n )}\n >\n <Typography.Text>\n {`Statistics of`}\n {selectedNode.title as React.ReactNode}\n </Typography.Text>\n </Tooltip>\n }\n >\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetLoaderFolderStatistics}\n body={{ folder: selectedNode[inlinedResourcePathKey] }}\n >\n {(tableData) => (\n <Table\n style={{\n width: '100%',\n maxHeight,\n height: '40rem',\n overflowY: 'scroll',\n wordBreak: 'break-all',\n }}\n pagination={false}\n bordered\n rowKey={(e) => e.loader}\n columns={[\n {\n title: 'Loader Name',\n dataIndex: 'loader',\n },\n {\n title: 'Files',\n dataIndex: 'files',\n },\n {\n title: 'Total Duration',\n dataIndex: 'costs',\n render: (v) => (\n <Typography.Text strong>\n {formatCosts(v)}\n </Typography.Text>\n ),\n sorter: (a, b) => a.costs - b.costs,\n defaultSortOrder: 'descend',\n sortDirections: ['descend', 'ascend'],\n },\n ]}\n dataSource={tableData!}\n />\n )}\n </ServerAPIProvider>\n </Card>\n </Col>\n </Row>\n )}\n </Drawer>\n </Row>\n );\n};\n"],"names":["ADDITION_LOADER_NUMBER","LoaderFiles","props","cwd","filetree","drawerVisible","setDrawerVisible","useState","resourcePath","setResourcePath","loaderIndex","setLoaderIndex","selectedNode","setSelectedNode","maxHeight","filteredFiles","useMemo","e","l","filterLoader","inlinedResourcePathKey","files","createFileStructures","file","basename","loaders","layer","additionalLoaders","i","styles","Keyword","Divider","Tag","Space","isError","key","Tooltip","Typography","ev","CloseCircleOutlined","formatCosts","Popover","List","_dir","defaultTitle","Row","Size","Col","Card","FileTree","mapFileKey","node","get","isNodeModules","_e","info","undefined","Drawer","drawerWidth","ServerAPIProvider","SDK","data","LoaderExecutions","React","tableData","Table","v","a","b"],"mappings":";;;;;;;;;;;;;AAgCA,MAAMA,yBAAyB;AAExB,MAAMC,cAMR,CAACC;IACJ,MAAM,EAAEC,GAAG,EAAEC,QAAQ,EAAE,GAAGF;IAC1B,MAAM,CAACG,eAAeC,iBAAiB,GAAGC,SAAS;IACnD,MAAM,CAACC,cAAcC,gBAAgB,GAAGF,SAAS;IACjD,MAAM,CAACG,aAAaC,eAAe,GAAGJ,SAAS;IAC/C,MAAM,CAACK,cAAcC,gBAAgB,GAAGN,SAA0B;IAElE,MAAMO,YAAY;IAElB,MAAMC,gBAAgBC,QACpB,IACEZ,SAAS,MAAM,CAAC,CAACa,IACfA,EAAE,OAAO,CAAC,IAAI,CAAC,CAACC,IACdC,aACEF,EAAE,IAAI,EACNC,EAAE,MAAM,EACRhB,MAAM,QAAQ,EACdA,MAAM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AC,GAAG,CAAC,yBAAyB;gCAChD,MAAM;oCAAE,QAAQhD,YAAY,CAACQ,uBAAuB;gCAAC;0CAEpD,CAAC4C,YAAAA,WAAAA,GACA,IAACC,OAAKA;wCACJ,OAAO;4CACL,OAAO;4CACPnD;4CACA,QAAQ;4CACR,WAAW;4CACX,WAAW;wCACb;wCACA,YAAY;wCACZ,UAAQ;wCACR,QAAQ,CAACG,IAAMA,EAAE,MAAM;wCACvB,SAAS;4CACP;gDACE,OAAO;gDACP,WAAW;4CACb;4CACA;gDACE,OAAO;gDACP,WAAW;4CACb;4CACA;gDACE,OAAO;gDACP,WAAW;gDACX,QAAQ,CAACiD,IAAAA,WAAAA,GACP,IAAC7B,WAAW,IAAI;wDAAC,QAAM;kEACpBG,YAAY0B;;gDAGjB,QAAQ,CAACC,GAAGC,IAAMD,EAAE,KAAK,GAAGC,EAAE,KAAK;gDACnC,kBAAkB;gDAClB,gBAAgB;oDAAC;oDAAW;iDAAS;4CACvC;yCACD;wCACD,YAAYJ;;;;;;;;;AAWlC"}
1
+ {"version":3,"file":"components/Loader/Analysis/files.mjs","sources":["../../../../src/components/Loader/Analysis/files.tsx"],"sourcesContent":["import { CloseCircleOutlined } from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Card,\n Col,\n Divider,\n Drawer,\n List,\n Popover,\n Row,\n Space,\n Table,\n Tag,\n Tooltip,\n Typography,\n} from 'antd';\nimport { get } from 'es-toolkit/compat';\nimport React, { useMemo, useState } from 'react';\nimport { drawerWidth, Size } from '../../../constants';\nimport {\n createFileStructures,\n DataNode,\n filterLoader,\n formatCosts,\n mapFileKey,\n} from '../../../utils';\nimport { FileTree } from '../../FileTree';\nimport { Keyword } from '../../Keyword';\nimport { ServerAPIProvider } from '../../Manifest';\nimport { LoaderExecutions } from '../executions';\nimport styles from './style.module.scss';\n\nconst ADDITION_LOADER_NUMBER = 3;\n\nexport const LoaderFiles: React.FC<{\n filetree: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileTree>;\n cwd: string;\n loaders: string[];\n filename: string;\n layer?: string;\n}> = (props) => {\n const { cwd, filetree } = props;\n const [drawerVisible, setDrawerVisible] = useState(false);\n const [resourcePath, setResourcePath] = useState('');\n const [loaderIndex, setLoaderIndex] = useState(0);\n const [selectedNode, setSelectedNode] = useState<DataNode | null>(null);\n\n const maxHeight = 800;\n\n const filteredFiles = useMemo(\n () =>\n filetree.filter((e) =>\n e.loaders.some((l) =>\n filterLoader(\n e.path,\n l.loader,\n props.filename,\n props.loaders,\n e.layer,\n props?.layer,\n ),\n ),\n ),\n [props.filename, props.loaders, props.layer],\n );\n\n const inlinedResourcePathKey = '__RESOURCEPATH__';\n\n const files = useMemo(() => {\n return createFileStructures({\n files: filteredFiles.map((e) => e.path),\n cwd,\n fileTitle(file, basename) {\n const { loaders, layer } = filetree.find((e) => e.path === file)!;\n\n const additionalLoaders: (Pick<\n SDK.LoaderTransformData,\n 'path' | 'loader' | 'errors'\n > & { costs: number })[] = [];\n\n loaders.forEach(\n (l, i) => i > ADDITION_LOADER_NUMBER && additionalLoaders.push(l),\n );\n\n return (\n <div\n style={{\n wordBreak: 'break-all',\n display: 'flex',\n cursor: 'pointer',\n }}\n onClick={() => {\n setLoaderIndex(0);\n setResourcePath(file);\n setDrawerVisible(true);\n }}\n >\n <div className={styles.box}>\n <div className={styles.keywords}>\n <Keyword text={basename.replace(/\\[.*?\\]/g, '')} keyword={''} />\n </div>\n </div>\n <div className={styles.dividerDiv} style={{ flex: 1 }}>\n <Divider className={styles.divider} dashed />\n </div>\n\n {layer && (\n <Tag color=\"cyan\" bordered={false}>\n {layer}\n </Tag>\n )}\n <Space>\n {loaders.slice(0, ADDITION_LOADER_NUMBER).map((e, i) => {\n const isError = e.errors && e.errors.length;\n const key = `${file}_${e.loader}_${i}`;\n if (i <= ADDITION_LOADER_NUMBER) {\n return (\n <Tooltip title={e.path} key={key}>\n <Tag\n onClick={(ev) => {\n ev.stopPropagation();\n setResourcePath(file);\n setLoaderIndex(i);\n setDrawerVisible(true);\n }}\n className={styles.textBox}\n style={{ color: isError ? '#f50' : 'inherit' }}\n >\n <Typography.Text className={styles.text} ellipsis>\n {e.loader.match(/([^/]+-loader)/g)?.[0] || e.loader}\n </Typography.Text>\n <Divider type=\"vertical\" />\n {isError ? (\n <CloseCircleOutlined />\n ) : (\n <Typography.Text className={styles.text}>\n {formatCosts(e.costs)}\n </Typography.Text>\n )}\n </Tag>\n </Tooltip>\n );\n }\n })}\n {additionalLoaders?.length > 0 && (\n <Popover\n content={\n <List\n dataSource={additionalLoaders}\n renderItem={(e, i) => {\n const isError = e.errors && e.errors.length;\n const key = `${file}_${e.loader}_${i + ADDITION_LOADER_NUMBER}`;\n\n return (\n <List.Item>\n <Tooltip title={e.path} key={key}>\n <div style={{ paddingBottom: 5 }}>\n <Tag\n onClick={(ev) => {\n ev.stopPropagation();\n setResourcePath(file);\n setLoaderIndex(i);\n setDrawerVisible(true);\n }}\n className={styles.textBox}\n style={{\n color: isError ? '#f50' : 'inherit',\n }}\n >\n <Typography.Text\n className={styles.text}\n ellipsis\n >\n {e.loader.match(/([^/]+-loader)/g)?.[0] ||\n e.loader}\n </Typography.Text>\n <Divider type=\"vertical\" />\n <Typography.Text className={styles.text}>\n {formatCosts(e.costs)}\n </Typography.Text>\n </Tag>\n </div>\n </Tooltip>\n </List.Item>\n );\n }}\n />\n }\n >\n <Tag className={styles.textBox}>\n <Typography.Text>···</Typography.Text>\n </Tag>\n </Popover>\n )}\n </Space>\n </div>\n );\n },\n dirTitle(_dir, defaultTitle) {\n return (\n <div style={{ display: 'flex', cursor: 'pointer' }}>\n <Keyword text={defaultTitle} keyword={''} />\n </div>\n );\n },\n });\n }, [filteredFiles]);\n\n return (\n <Row style={{ width: '100%', marginLeft: 0 }} gutter={Size.BasePadding}>\n <Col span={24}>\n <Card\n title={\n <Space>\n <Typography.Text strong>Files</Typography.Text>\n <Typography.Text\n type=\"secondary\"\n style={{\n fontSize: 12,\n fontWeight: 400,\n }}\n >\n Total Files: {filteredFiles.length}\n </Typography.Text>\n </Space>\n }\n bodyStyle={{\n overflow: 'auto',\n maxHeight,\n minHeight: '40rem',\n padding: 14,\n }}\n >\n <FileTree\n defaultExpandedKeys={mapFileKey(\n files,\n filteredFiles.length >= 100 ? 3 : 4,\n (node) => {\n const resourcePath: string = get(node, inlinedResourcePathKey)!;\n const isNodeModules =\n resourcePath.indexOf('/node_modules/') > -1;\n\n return !isNodeModules;\n },\n )}\n treeData={files}\n key={`${props.loaders.join('|')}_${props.filename}`}\n onSelect={(_e, info) => {\n if (!info.node.isLeaf) {\n setSelectedNode(info.node);\n }\n }}\n selectedKeys={selectedNode ? [selectedNode.key] : undefined}\n expandAction=\"click\"\n />\n <Drawer\n open={drawerVisible}\n onClose={() => setDrawerVisible(false)}\n maskClosable\n width={drawerWidth}\n zIndex={999}\n bodyStyle={{ padding: 0 }}\n >\n {drawerVisible ? (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetLoaderFileDetails}\n body={{ path: resourcePath }}\n >\n {(data) => (\n <LoaderExecutions data={data} cwd={cwd} index={loaderIndex} />\n )}\n </ServerAPIProvider>\n ) : null}\n </Drawer>\n </Card>\n </Col>\n\n <Drawer\n open={!!selectedNode}\n onClose={() => setSelectedNode(null)}\n maskClosable\n width={drawerWidth}\n zIndex={999}\n bodyStyle={{ padding: 0 }}\n >\n {selectedNode && (\n <Row>\n <Col span={24}>\n <Card\n title={\n <Tooltip\n title={React.cloneElement(\n selectedNode.title as React.ReactElement<{\n style?: React.CSSProperties;\n }>,\n { style: { color: '#fff' } },\n )}\n >\n <Typography.Text>\n {`Statistics of`}\n {selectedNode.title as React.ReactNode}\n </Typography.Text>\n </Tooltip>\n }\n >\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetLoaderFolderStatistics}\n body={{ folder: selectedNode[inlinedResourcePathKey] }}\n >\n {(tableData) => (\n <Table\n style={{\n width: '100%',\n maxHeight,\n height: '40rem',\n overflowY: 'scroll',\n wordBreak: 'break-all',\n }}\n pagination={false}\n bordered\n rowKey={(e) => e.loader}\n columns={[\n {\n title: 'Loader Name',\n dataIndex: 'loader',\n },\n {\n title: 'Files',\n dataIndex: 'files',\n },\n {\n title: 'Total Duration',\n dataIndex: 'costs',\n render: (v) => (\n <Typography.Text strong>\n {formatCosts(v)}\n </Typography.Text>\n ),\n sorter: (a, b) => a.costs - b.costs,\n defaultSortOrder: 'descend',\n sortDirections: ['descend', 'ascend'],\n },\n ]}\n dataSource={tableData!}\n />\n )}\n </ServerAPIProvider>\n </Card>\n </Col>\n </Row>\n )}\n </Drawer>\n </Row>\n );\n};\n"],"names":["ADDITION_LOADER_NUMBER","LoaderFiles","props","cwd","filetree","drawerVisible","setDrawerVisible","useState","resourcePath","setResourcePath","loaderIndex","setLoaderIndex","selectedNode","setSelectedNode","maxHeight","filteredFiles","useMemo","e","l","filterLoader","inlinedResourcePathKey","files","createFileStructures","file","basename","loaders","layer","additionalLoaders","i","styles","Keyword","Divider","Tag","Space","isError","key","Tooltip","ev","Typography","CloseCircleOutlined","formatCosts","Popover","List","_dir","defaultTitle","Row","Size","Col","Card","FileTree","mapFileKey","node","get","isNodeModules","_e","info","undefined","Drawer","drawerWidth","ServerAPIProvider","SDK","data","LoaderExecutions","React","tableData","Table","v","a","b"],"mappings":";;;;;;;;;;;;;AAgCA,MAAMA,yBAAyB;AAExB,MAAMC,cAMR,CAACC;IACJ,MAAM,EAAEC,GAAG,EAAEC,QAAQ,EAAE,GAAGF;IAC1B,MAAM,CAACG,eAAeC,iBAAiB,GAAGC,SAAS;IACnD,MAAM,CAACC,cAAcC,gBAAgB,GAAGF,SAAS;IACjD,MAAM,CAACG,aAAaC,eAAe,GAAGJ,SAAS;IAC/C,MAAM,CAACK,cAAcC,gBAAgB,GAAGN,SAA0B;IAElE,MAAMO,YAAY;IAElB,MAAMC,gBAAgBC,QACpB,IACEZ,SAAS,MAAM,CAAC,CAACa,IACfA,EAAE,OAAO,CAAC,IA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a,KAAK;;;;sCAKzB,kBAAC+C,mBAAiBA;gCAChB,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,yBAAyB;gCAChD,MAAM;oCAAE,QAAQhD,YAAY,CAACQ,uBAAuB;gCAAC;0CAEpD,CAAC4C,YAAAA,WAAAA,GACA,IAACC,OAAKA;wCACJ,OAAO;4CACL,OAAO;4CACPnD;4CACA,QAAQ;4CACR,WAAW;4CACX,WAAW;wCACb;wCACA,YAAY;wCACZ,UAAQ;wCACR,QAAQ,CAACG,IAAMA,EAAE,MAAM;wCACvB,SAAS;4CACP;gDACE,OAAO;gDACP,WAAW;4CACb;4CACA;gDACE,OAAO;gDACP,WAAW;4CACb;4CACA;gDACE,OAAO;gDACP,WAAW;gDACX,QAAQ,CAACiD,IAAAA,WAAAA,GACP,IAAC5B,WAAW,IAAI;wDAAC,QAAM;kEACpBE,YAAY0B;;gDAGjB,QAAQ,CAACC,GAAGC,IAAMD,EAAE,KAAK,GAAGC,EAAE,KAAK;gDACnC,kBAAkB;gDAClB,gBAAgB;oDAAC;oDAAW;iDAAS;4CACvC;yCACD;wCACD,YAAYJ;;;;;;;;;AAWlC"}
@@ -39,7 +39,7 @@
39
39
  }
40
40
 
41
41
  .divider-hnPRxv {
42
- border-color: #0000001f;
42
+ border-color: var(--color-divider);
43
43
  margin: auto;
44
44
  position: relative;
45
45
  top: 50%;
@@ -55,15 +55,10 @@
55
55
  }
56
56
 
57
57
  .textBox-sVZZ_A {
58
- color: #000000d9;
59
- background-color: #fafafa;
60
- border: 1px solid #d9d9d9;
61
- border-radius: 2px;
62
58
  justify-content: center;
63
59
  align-items: center;
64
60
  max-width: 320px;
65
61
  height: 22px;
66
- padding: 1px 8px;
67
62
  display: flex;
68
63
  }
69
64
 
@@ -86,27 +81,31 @@
86
81
  display: flex;
87
82
  }
88
83
 
89
- .executions-uZxmQC .timeline-wMFXyU .box-lFdvrG:active {
90
- background-color: #f2f8ff;
91
- border: 1px solid #0079ff;
92
- }
93
-
94
84
  .executions-uZxmQC .timeline-wMFXyU .box-lFdvrG .ant-typography {
95
- color: #000000a6;
96
85
  font-size: 14px;
97
86
  }
98
87
 
99
88
  .executions-uZxmQC .timeline-wMFXyU .box-lFdvrG .loader-PHR4ca {
100
- color: inherit;
101
89
  align-content: center;
102
90
  height: 72px;
103
91
  font-size: 14px;
104
92
  }
105
93
 
106
94
  .executions-uZxmQC .timeline-wMFXyU .selected-wUMOH3 {
107
- background-color: #f2f8ff;
95
+ --bg: #f2f8ff;
96
+ background-color: var(--bg);
108
97
  border: 1px solid #0079ff;
109
98
  }
110
99
 
100
+ .executions-uZxmQC .timeline-wMFXyU .selected-wUMOH3 * {
101
+ color: #000;
102
+ }
103
+
104
+ @supports (color: contrast-color(red)) {
105
+ .executions-uZxmQC .timeline-wMFXyU .selected-wUMOH3 * {
106
+ color: contrast-color(var(--bg));
107
+ }
108
+ }
109
+
111
110
 
112
111
  /*# sourceMappingURL=style_module.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/components/Loader/Analysis/style.module.scss"],"names":[],"mappings":"AAAA;EACE,gBAAgB;AAClB;;AAFiD;EAK/C,mBAAmB;EACnB,gBAAgB;EAChB,aAAa;AACf;;AARoJ;EAWlJ,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AAd8P;EAiB5P,eAAe;EACf,YAAY;EACZ,cAAc;AAChB;;AApB4W;EAuB1W,gBAAgB;EAChB,iBAAiB;EACjB,cAAc;AAChB;;AA1B2e;EA6Bze,OAAO;EACP,YAAY;AACd;;AA/B+kB;EAkC7kB,OAAO;EACP,iBAAiB;EACjB,kBAAkB;EAClB,kBAAkB;AACpB;;AAtCupB;EAyCrpB,uBAAuB;EACvB,YAAY;EACZ,kBAAkB;EAClB,QAAQ;AACV;;AA7CmuB;EAgDjuB,cAAc;AAChB;;AAjDsvB;EAoDpvB,UAAU;EACV,kBAAkB;AACpB;;AAtDkyB;EAyDhyB,gBAAgB;EAChB,yBAAyB;EACzB,yBAAyB;EACzB,kBAAkB;EAClB,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;EAChB,YAAY;EACZ,gBAAgB;EAChB,aAAa;AACf;;AAnEg/B;EAsE9+B,eAAe;EACf,gBAAgB;AAClB;;AAxE8hC;EA2E5hC,aAAa;AACf;;AA5E0kC;EA+ExkC,yBAAyB;EACzB,kBAAkB;EAClB,sBAAsB;EACtB,UAAU;EACV,YAAY;EACZ,aAAa;EACb,aAAa;AACf;;AAtFstC;EAyFptC,yBAAyB;EACzB,yBAAyB;AAC3B;;AA3F0yC;EA8FxyC,gBAAgB;EAChB,eAAe;AACjB;;AAhGk4C;EAmGh4C,cAAc;EACd,qBAAqB;EACrB,YAAY;EACZ,eAAe;AACjB;;AAvGm+C;EA0Gj+C,yBAAyB;EACzB,yBAAyB;AAC3B","sourcesContent":[".loaderAnalysis :global .rc-tree{min-width:900px}.loaderAnalysis :global .rc-tree .rc-tree-treenode{display:flex;align-items:center;min-height:30px}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-indent{display:flex;flex-shrink:0;flex-grow:0}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-switcher{flex-shrink:0;flex-grow:0;cursor:pointer}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-switcher .file-icon{display:block;margin-left:8px;line-height:14px}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{flex:1;min-width:0}.dividerDiv{flex:1;margin-left:10px;margin-right:10px;position:relative}.divider{border-color:rgba(0,0,0,.12);top:50%;margin:auto;position:relative}.box{flex-shrink:0}.box .keyword{flex:0 0 auto;padding-right:5}.textBox{max-width:320px;color:rgba(0,0,0,.85);height:22px;border:1px #d9d9d9 solid;justify-content:center;display:flex;padding:1px 8px 1px 8px;align-items:center;border-radius:2px;background-color:#fafafa}.textBox .text{font-size:12px;font-weight:400}.space :global .ant-space-item{display:flex}.executions .timeline .box{border:1px solid #eaedf1;border-radius:8px;width:80%;height:74px;display:flex;flex-direction:column;padding:16px}.executions .timeline .box:active{background-color:#f2f8ff;border:1px solid #0079ff}.executions .timeline .box :global .ant-typography{color:rgba(0,0,0,.65);font-size:14px}.executions .timeline .box .loader{color:inherit;font-size:14px;height:72px;align-content:center}.executions .timeline .selected{background-color:#f2f8ff;border:1px solid #0079ff}"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/components/Loader/Analysis/style.module.scss"],"names":[],"mappings":"AAAA;EACE,gBAAgB;AAClB;;AAFiD;EAK/C,mBAAmB;EACnB,gBAAgB;EAChB,aAAa;AACf;;AARoJ;EAWlJ,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AAd8P;EAiB5P,eAAe;EACf,YAAY;EACZ,cAAc;AAChB;;AApB4W;EAuB1W,gBAAgB;EAChB,iBAAiB;EACjB,cAAc;AAChB;;AA1B2e;EA6Bze,OAAO;EACP,YAAY;AACd;;AA/B+kB;EAkC7kB,OAAO;EACP,iBAAiB;EACjB,kBAAkB;EAClB,kBAAkB;AACpB;;AAtCupB;EAyCrpB,kCAAkC;EAClC,YAAY;EACZ,kBAAkB;EAClB,QAAQ;AACV;;AA7CwuB;EAgDtuB,cAAc;AAChB;;AAjD2vB;EAoDzvB,UAAU;EACV,kBAAkB;AACpB;;AAtDuyB;EAyDryB,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;EAChB,YAAY;EACZ,aAAa;AACf;;AA9Dm4B;EAiEj4B,eAAe;EACf,gBAAgB;AAClB;;AAnEi7B;EAsE/6B,aAAa;AACf;;AAvE69B;EA0E39B,yBAAyB;EACzB,kBAAkB;EAClB,sBAAsB;EACtB,UAAU;EACV,YAAY;EACZ,aAAa;EACb,aAAa;AACf;;AAjFymC;EAoFvmC,eAAe;AACjB;;AArF2qC;EAwFzqC,qBAAqB;EACrB,YAAY;EACZ,eAAe;AACjB;;AA3F8vC;EA8F5vC,aAAa;EACb,2BAA2B;EAC3B,yBAAyB;AAC3B;;AAjGg2C;EAoG91C,WAAW;AACb;;AArG64C;EAAsC;IAyG/6C,gCAAgC;EAClC;AACF","sourcesContent":[".loaderAnalysis :global .rc-tree{min-width:900px}.loaderAnalysis :global .rc-tree .rc-tree-treenode{display:flex;align-items:center;min-height:30px}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-indent{display:flex;flex-shrink:0;flex-grow:0}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-switcher{flex-shrink:0;flex-grow:0;cursor:pointer}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-switcher .file-icon{display:block;margin-left:8px;line-height:14px}.loaderAnalysis :global .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{flex:1;min-width:0}.dividerDiv{flex:1;margin-left:10px;margin-right:10px;position:relative}.divider{border-color:var(--color-divider);top:50%;margin:auto;position:relative}.box{flex-shrink:0}.box .keyword{flex:0 0 auto;padding-right:5}.textBox{max-width:320px;height:22px;justify-content:center;display:flex;align-items:center}.textBox .text{font-size:12px;font-weight:400}.space :global .ant-space-item{display:flex}.executions .timeline .box{border:1px solid #eaedf1;border-radius:8px;width:80%;height:74px;display:flex;flex-direction:column;padding:16px}.executions .timeline .box :global .ant-typography{font-size:14px}.executions .timeline .box .loader{font-size:14px;height:72px;align-content:center}.executions .timeline .selected{--bg: #f2f8ff;background-color:var(--bg);border:1px solid #0079ff}.executions .timeline .selected *{color:#000}@supports(color: contrast-color(red)){.executions .timeline .selected *{color:contrast-color(var(--bg))}}"],"sourceRoot":""}
@@ -15,6 +15,7 @@ import { CodeOpener } from "../Opener/index.mjs";
15
15
  import { Title } from "../Title/index.mjs";
16
16
  import { ServerAPIProvider } from "../Manifest/index.mjs";
17
17
  import style_module from "./Analysis/style.module.mjs";
18
+ import clsx from "clsx";
18
19
  const LoaderPropsItem = ({ loader, resource, cwd })=>/*#__PURE__*/ jsx(Card, {
19
20
  title: 'Loader Details',
20
21
  style: {
@@ -280,8 +281,7 @@ const LoaderDetailsContent = ({ loader, resource, isLight, codeData })=>{
280
281
  const LoaderExecutions = ({ data, cwd, index })=>{
281
282
  const { loaders, resource } = data;
282
283
  const [currentIndex, setCurrentIndex] = useState(index || 0);
283
- const { theme } = useTheme();
284
- const isLight = 'light' === theme;
284
+ const { isLight } = useTheme();
285
285
  const loader = loaders[currentIndex];
286
286
  const leftSpan = 5;
287
287
  const [activeKey, setActiveKey] = useState('loaderDetails');
@@ -297,7 +297,7 @@ const LoaderExecutions = ({ data, cwd, index })=>{
297
297
  /*#__PURE__*/ jsx(Col, {
298
298
  span: leftSpan,
299
299
  style: {
300
- borderRight: isLight ? "1px solid #f0f0f0" : void 0,
300
+ borderRight: "1px solid var(--color-border-secondary)",
301
301
  padding: Size.BasePadding
302
302
  },
303
303
  children: /*#__PURE__*/ jsxs(Space, {
@@ -344,7 +344,7 @@ const LoaderExecutions = ({ data, cwd, index })=>{
344
344
  title: loader,
345
345
  trigger: "hover",
346
346
  children: /*#__PURE__*/ jsxs("div", {
347
- className: `${style_module.box} ${currentIndex === i ? style_module.selected : ''}`,
347
+ className: clsx(style_module.box, currentIndex === i && style_module.selected),
348
348
  onClick: ()=>{
349
349
  setCurrentIndex(i);
350
350
  },
@@ -355,24 +355,16 @@ const LoaderExecutions = ({ data, cwd, index })=>{
355
355
  /*#__PURE__*/ jsxs("div", {
356
356
  children: [
357
357
  /*#__PURE__*/ jsx(Typography.Text, {
358
- style: {
359
- color: '#000'
360
- },
361
358
  children: costs.match(/[0-9]*\.?[0-9]+/g)?.[0]
362
359
  }),
363
360
  " ",
364
361
  /*#__PURE__*/ jsx(Typography.Text, {
365
- style: {
366
- color: 'rgba(0,0,0,0.45)'
367
- },
362
+ type: "secondary",
368
363
  children: costs.match(/[a-zA-Z]+/g)
369
364
  })
370
365
  ]
371
366
  }),
372
367
  /*#__PURE__*/ jsx(Typography.Text, {
373
- style: {
374
- color: 'rgba(0,0,0,0.65)'
375
- },
376
368
  className: style_module.loader,
377
369
  children: loader
378
370
  })