@next-core/brick-kit 2.103.2 → 2.103.6

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,41 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.103.6](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.5...@next-core/brick-kit@2.103.6) (2022-01-26)
7
+
8
+ **Note:** Version bump only for package @next-core/brick-kit
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.103.5](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.4...@next-core/brick-kit@2.103.5) (2022-01-26)
15
+
16
+ **Note:** Version bump only for package @next-core/brick-kit
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.103.4](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.3...@next-core/brick-kit@2.103.4) (2022-01-21)
23
+
24
+ **Note:** Version bump only for package @next-core/brick-kit
25
+
26
+
27
+
28
+
29
+
30
+ ## [2.103.3](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.2...@next-core/brick-kit@2.103.3) (2022-01-20)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * fix history push in standalone apps ([65219cf](https://github.com/easyops-cn/next-core/commit/65219cf133d2166ca9b3c612ff1a81be71bb069b))
36
+
37
+
38
+
39
+
40
+
6
41
  ## [2.103.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.1...@next-core/brick-kit@2.103.2) (2022-01-13)
7
42
 
8
43
  **Note:** Version bump only for package @next-core/brick-kit
@@ -3127,12 +3127,12 @@
3127
3127
  var pathIsString = typeof path === "string";
3128
3128
 
3129
3129
  if (pathIsString) {
3130
- pathname = path;
3130
+ pathname = history$1.parsePath(path).pathname;
3131
3131
  } else {
3132
3132
  pathname = path.pathname;
3133
3133
  }
3134
3134
 
3135
- if (_internalApiHasMatchedApp(pathname)) {
3135
+ if (pathname === "" || _internalApiHasMatchedApp(pathname)) {
3136
3136
  return (method === "push" ? originalPush : originalReplace)(path, state);
3137
3137
  } // Going to outside apps.
3138
3138
 
@@ -7070,7 +7070,7 @@
7070
7070
  presetPalettes.grey;
7071
7071
 
7072
7072
  function getStyleByBaseColors(theme, baseColors, backgroundColor) {
7073
- return (theme === "dark" ? getDarkStyle : getLightStyle)(getCssVariableDefinitionsByPalettes(generatePalettes(baseColors, theme, backgroundColor)));
7073
+ return (theme === "dark" ? getDarkStyle : getLightStyle)("".concat(getCssVariableDefinitionsByPalettes(generatePalettes(baseColors, theme, backgroundColor)), "\n").concat(getMigratedCssVariableDefinitions(theme, baseColors, backgroundColor)));
7074
7074
  }
7075
7075
  function getStyleByBrandColor(theme, brandColor) {
7076
7076
  return (theme === "dark" ? getDarkStyle : getLightStyle)(getCssVariableDefinitionsByBrand(brandColor));
@@ -7134,6 +7134,33 @@
7134
7134
  }
7135
7135
  }
7136
7136
 
7137
+ function getMigratedCssVariableDefinitions(theme, baseColors, backgroundColor) {
7138
+ var migrateMap = {
7139
+ green: "green",
7140
+ red: "red",
7141
+ blue: "blue",
7142
+ orange: "orange",
7143
+ cyan: "cyan",
7144
+ purple: "purple",
7145
+ geekblue: "indigo"
7146
+ };
7147
+ return Object.entries(migrateMap).flatMap(_ref4 => {
7148
+ var [legacyColorName, newColorName] = _ref4;
7149
+ return [" --theme-".concat(legacyColorName, "-color-rgb-channel: ").concat(getRgbChannel(getActualBaseColor(baseColors[newColorName], theme, backgroundColor)), ";"), ...(theme === "dark" ? [] : [" --theme-".concat(legacyColorName, "-color: var(--palette-").concat(newColorName, "-6);"), " --theme-".concat(legacyColorName, "-border-color: var(--palette-").concat(newColorName, "-3);")]), " --theme-".concat(legacyColorName, "-background: var(--palette-").concat(newColorName, "-").concat(theme === "dark" ? 2 : 1, ");"), ""];
7150
+ }).join("\n");
7151
+ }
7152
+
7153
+ function getRgbChannel(color) {
7154
+ return color.match(/[0-9a-fA-F]{2}/g).map(hex => parseInt(hex, 16)).join(", ");
7155
+ }
7156
+
7157
+ function getActualBaseColor(baseColor, theme, backgroundColor) {
7158
+ return theme === "dark" ? generate(baseColor, {
7159
+ theme,
7160
+ backgroundColor
7161
+ })[5] : baseColor;
7162
+ }
7163
+
7137
7164
  function applyColorTheme(options) {
7138
7165
  var style = [];
7139
7166
  var themes = ["light", "dark"];