@gooddata/sdk-ui-theme-provider 11.57.0-alpha.1 → 11.57.0-alpha.3

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/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // (C) 2020-2026 GoodData Corporation
2
- /* oxlint-disable no-barrel-files/no-barrel-files */
2
+ // oxlint-disable no-barrel-files/no-barrel-files
3
3
  /**
4
4
  * This package provides tools to make your application support themes.
5
5
  *
package/esm/internal.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // (C) 2024-2026 GoodData Corporation
2
- /* oxlint-disable no-barrel-files/no-barrel-files */
2
+ // oxlint-disable no-barrel-files/no-barrel-files
3
3
  export { blueLightTheme } from "./defaultThemes/blueLight.js";
4
4
  export { greenDarkTheme } from "./defaultThemes/greenDark.js";
5
5
  export { indigoTheme } from "./defaultThemes/indigo.js";
@@ -1 +1 @@
1
- {"version":3,"file":"allThemeCssVariables.d.ts","sourceRoot":"","sources":["../../src/variablesSpec/allThemeCssVariables.ts"],"names":[],"mappings":"AAoCA,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAE5B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAChC,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAoB7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAM7D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,wBAAwB,EAe/D,CAAC;AAIF,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,EAMlD,CAAC"}
1
+ {"version":3,"file":"allThemeCssVariables.d.ts","sourceRoot":"","sources":["../../src/variablesSpec/allThemeCssVariables.ts"],"names":[],"mappings":"AAqCA,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAE5B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAChC,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAoB7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAM7D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,wBAAwB,EAgB/D,CAAC;AAIF,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,EAMlD,CAAC"}
@@ -12,6 +12,7 @@ import { internalModelerThemeVariables } from "./internal/modeler.js";
12
12
  import { internalSpacingThemeVariables } from "./internal/spacing.js";
13
13
  import { internalTableThemeVariables } from "./internal/table.js";
14
14
  import { internalTabsThemeVariables } from "./internal/tabs.js";
15
+ import { internalTooltipThemeVariables } from "./internal/tooltip.js";
15
16
  import { internalTransitionThemeVariables } from "./internal/transition.js";
16
17
  // Derived
17
18
  import { derivedPaletteBaseThemeVariables } from "./theme-derived/palette-base-derived.js";
@@ -71,6 +72,7 @@ export const themeInternalCssVariables = [
71
72
  ...internalIconThemeVariables,
72
73
  ...internalTabsThemeVariables,
73
74
  ...internalTableThemeVariables,
75
+ ...internalTooltipThemeVariables,
74
76
  // Modeler
75
77
  ...internalModelerThemeVariables,
76
78
  ];
@@ -0,0 +1,3 @@
1
+ import { type ThemeInternalCssVariable } from "../types.js";
2
+ export declare const internalTooltipThemeVariables: ThemeInternalCssVariable[];
3
+ //# sourceMappingURL=tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/variablesSpec/internal/tooltip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,6BAA6B,EAAE,wBAAwB,EAMnE,CAAC"}
@@ -0,0 +1,7 @@
1
+ export const internalTooltipThemeVariables = [
2
+ {
3
+ type: "internal",
4
+ variableName: "--gd-tooltip-maxWidth",
5
+ defaultValue: "300px",
6
+ },
7
+ ];
@@ -10,14 +10,14 @@ export function logError(message) {
10
10
  * @internal
11
11
  */
12
12
  export function logSuccess(message) {
13
- // eslint-disable-next-line no-console
13
+ // oxlint-disable-next-line eslint-js/no-console
14
14
  console.log(chalk.green(message));
15
15
  }
16
16
  /**
17
17
  * @internal
18
18
  */
19
19
  export function logInfo(message) {
20
- // eslint-disable-next-line no-console
20
+ // oxlint-disable-next-line eslint-js/no-console
21
21
  console.log(chalk.gray(message));
22
22
  }
23
23
  /**
@@ -185,14 +185,26 @@ function normalizeColorsInValue(value) {
185
185
  return `rgba(${red},${green},${blue},${alphaRounded})`;
186
186
  });
187
187
  // Normalize rgb()/rgba() values to consistent rgba() format.
188
- // Sass 1.79+ no longer rounds color channels, so derived colors are emitted with
189
- // fractional channels (e.g. rgb(231.5, 247.3, 252.1)) - round them to integers so
190
- // they compare equal to the hex/rgba values in the specification.
191
- result = result.replace(/rgba?\(([\d.]+),([\d.]+),([\d.]+)(?:,([\d.]+))?\)/g, (_match, r, g, b, a) => {
192
- const red = Math.round(parseFloat(r));
193
- const green = Math.round(parseFloat(g));
194
- const blue = Math.round(parseFloat(b));
195
- const alpha = a === undefined ? 1 : parseFloat(a);
188
+ // Sass 1.79+ no longer rounds color channels, and since 1.104 such fractional-channel colors
189
+ // are serialized in the CSS Color 4 percentage form (e.g. rgb(90.78%,96.98%,98.86%)) - parse
190
+ // both numeric and percentage channels and round them to integers so they compare equal to
191
+ // the hex/rgba values in the specification.
192
+ // The percentage form prints ~10 decimals, so a channel that is exactly N.5 in 0-255 space
193
+ // (e.g. 216.5 -> "84.9019607843%") converts back to fractionally BELOW the half (216.4999...)
194
+ // and would round down where Sass's own serializer rounded up. Snap to 6 decimals first so the
195
+ // conversion rounds the same way the specification values were derived.
196
+ const channelTo255 = (channel) => {
197
+ if (!channel.endsWith("%")) {
198
+ return Math.round(parseFloat(channel));
199
+ }
200
+ const raw = (parseFloat(channel) * 255) / 100;
201
+ return Math.round(Math.round(raw * 1e6) / 1e6);
202
+ };
203
+ result = result.replace(/rgba?\(([\d.]+%?),([\d.]+%?),([\d.]+%?)(?:,([\d.]+%?))?\)/g, (_match, r, g, b, a) => {
204
+ const red = channelTo255(r);
205
+ const green = channelTo255(g);
206
+ const blue = channelTo255(b);
207
+ const alpha = a === undefined ? 1 : a.endsWith("%") ? parseFloat(a) / 100 : parseFloat(a);
196
208
  // Round alpha to 2 decimal places for consistent comparison
197
209
  const alphaRounded = Math.round(alpha * 100) / 100;
198
210
  return `rgba(${red},${green},${blue},${alphaRounded})`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-theme-provider",
3
- "version": "11.57.0-alpha.1",
3
+ "version": "11.57.0-alpha.3",
4
4
  "description": "GoodData SDK - Theme provider",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -32,10 +32,10 @@
32
32
  "postcss-value-parser": "4.2.0",
33
33
  "ts-invariant": "0.10.3",
34
34
  "tslib": "2.8.1",
35
- "@gooddata/sdk-backend-spi": "11.57.0-alpha.1",
36
- "@gooddata/sdk-model": "11.57.0-alpha.1",
37
- "@gooddata/sdk-ui": "11.57.0-alpha.1",
38
- "@gooddata/util": "11.57.0-alpha.1"
35
+ "@gooddata/sdk-backend-spi": "11.57.0-alpha.3",
36
+ "@gooddata/util": "11.57.0-alpha.3",
37
+ "@gooddata/sdk-model": "11.57.0-alpha.3",
38
+ "@gooddata/sdk-ui": "11.57.0-alpha.3"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@microsoft/api-documenter": "7.30.10",
@@ -62,17 +62,18 @@
62
62
  "happy-dom": "20.12.0",
63
63
  "npm-run-all": "4.1.5",
64
64
  "oxfmt": "0.66.0",
65
- "oxlint": "1.57.0",
66
- "oxlint-tsgolint": "0.18.1",
65
+ "oxlint": "1.67.0",
66
+ "oxlint-plugin-eslint": "1.82.0",
67
+ "oxlint-tsgolint": "0.22.1",
67
68
  "raf": "3.4.1",
68
69
  "react": "19.1.1",
69
70
  "react-dom": "19.1.1",
70
71
  "typescript": "7.0.2",
71
72
  "vitest": "4.1.8",
72
- "@gooddata/eslint-config": "11.57.0-alpha.1",
73
- "@gooddata/oxlint-config": "11.57.0-alpha.1",
74
- "@gooddata/reference-workspace": "11.57.0-alpha.1",
75
- "@gooddata/sdk-backend-mockingbird": "11.57.0-alpha.1"
73
+ "@gooddata/eslint-config": "11.57.0-alpha.3",
74
+ "@gooddata/oxlint-config": "11.57.0-alpha.3",
75
+ "@gooddata/reference-workspace": "11.57.0-alpha.3",
76
+ "@gooddata/sdk-backend-mockingbird": "11.57.0-alpha.3"
76
77
  },
77
78
  "peerDependencies": {
78
79
  "react": "^18.0.0 || ^19.0.0",