@primer/styled-react 1.1.0 → 1.1.1-rc.7156e7efc

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 (38) hide show
  1. package/dist/components/BaseStyles.d.ts +23 -14
  2. package/dist/components/BaseStyles.d.ts.map +1 -1
  3. package/dist/components/BaseStyles.js +27 -48
  4. package/dist/components/FeatureFlaggedTheming.d.ts +11 -11
  5. package/dist/components/FeatureFlaggedTheming.d.ts.map +1 -1
  6. package/dist/components/FeatureFlaggedTheming.js +20 -43
  7. package/dist/components/ThemeContext.d.ts +19 -0
  8. package/dist/components/ThemeContext.d.ts.map +1 -0
  9. package/dist/components/ThemeContext.js +9 -0
  10. package/dist/components/ThemeProvider.d.ts +21 -31
  11. package/dist/components/ThemeProvider.d.ts.map +1 -1
  12. package/dist/components/ThemeProvider.js +104 -147
  13. package/dist/components/useFeatureFlaggedTheme.d.ts +8 -0
  14. package/dist/components/useFeatureFlaggedTheme.d.ts.map +1 -0
  15. package/dist/components/useFeatureFlaggedTheme.js +19 -0
  16. package/dist/components/useTheme.d.ts +20 -0
  17. package/dist/components/useTheme.d.ts.map +1 -0
  18. package/dist/components/useTheme.js +12 -0
  19. package/dist/index.d.ts +6 -67
  20. package/dist/index.js +6 -6
  21. package/dist/legacy-theme/ts/color-schemes.js +4252 -0
  22. package/dist/polymorphic.d.ts +23 -26
  23. package/dist/polymorphic.d.ts.map +1 -1
  24. package/dist/styled-props.d.ts +7 -3
  25. package/dist/styled-props.d.ts.map +1 -1
  26. package/dist/sx.d.ts +20 -20
  27. package/dist/sx.d.ts.map +1 -1
  28. package/dist/sx.js +6 -8
  29. package/dist/theme-get.d.ts +4 -1
  30. package/dist/theme-get.d.ts.map +1 -1
  31. package/dist/theme-get.js +7 -9
  32. package/dist/theme-types.d.ts +94 -0
  33. package/dist/theme-types.d.ts.map +1 -0
  34. package/dist/theme.d.ts +1090 -0
  35. package/dist/theme.d.ts.map +1 -0
  36. package/dist/theme.js +14 -0
  37. package/package.json +14 -8
  38. package/dist/index.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","names":[],"sources":["../src/theme.ts"],"mappings":";;AAQA;AAGC;AAAA;;cAHY,KAAA"}
package/dist/theme.js ADDED
@@ -0,0 +1,14 @@
1
+ import { colorSchemes } from "./legacy-theme/ts/color-schemes.js";
2
+ import { theme } from "@primer/react";
3
+ //#region src/theme.ts
4
+ /**
5
+ * The default theme used by `@primer/styled-react`. This extends the base theme
6
+ * from `@primer/react` with the legacy `colorSchemes` object required by the
7
+ * styled-components based `ThemeProvider`, `sx`, and `themeGet` APIs.
8
+ */
9
+ const theme$1 = {
10
+ ...theme,
11
+ colorSchemes
12
+ };
13
+ //#endregion
14
+ export { theme$1 as theme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/styled-react",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-rc.7156e7efc",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "files": [
13
13
  "README.md",
14
- "dist"
14
+ "dist",
15
+ "!dist/legacy-theme/ts/colors"
15
16
  ],
16
17
  "repository": {
17
18
  "type": "git",
@@ -19,6 +20,7 @@
19
20
  },
20
21
  "scripts": {
21
22
  "build": "script/build",
23
+ "build:precompile-color-schemes": "tsx script/precompile-color-schemes.ts",
22
24
  "build:storybook": "storybook build",
23
25
  "clean": "rimraf dist",
24
26
  "lint:npm": "publint --types",
@@ -38,16 +40,18 @@
38
40
  "styled-system": "^5.1.5"
39
41
  },
40
42
  "devDependencies": {
43
+ "@babel/core": "^7.29.7",
41
44
  "@babel/preset-react": "^7.28.5",
42
45
  "@babel/preset-typescript": "^7.28.5",
43
46
  "@primer/primitives": "10.x || 11.x",
44
- "@primer/react": "^38.26.0",
45
- "@rollup/plugin-babel": "^6.1.0",
46
- "@storybook/react-vite": "^10.3.3",
47
+ "@primer/react": "^38.36.0",
48
+ "@rolldown/plugin-babel": "^0.2.3",
49
+ "@storybook/react-vite": "10.5.5",
50
+ "@types/babel__core": "^7.20.5",
47
51
  "@types/react": "18.3.11",
48
52
  "@types/react-dom": "18.3.1",
49
53
  "@types/styled-components": "^5.1.26",
50
- "@vitejs/plugin-react": "^4.3.3",
54
+ "@vitejs/plugin-react": "^6.0.2",
51
55
  "babel-plugin-react-compiler": "^1.0.0",
52
56
  "babel-plugin-styled-components": "2.1.4",
53
57
  "postcss-preset-primer": "^0.0.0",
@@ -56,9 +60,11 @@
56
60
  "react-compiler-runtime": "^1.0.0",
57
61
  "react-dom": "18.3.1",
58
62
  "rimraf": "^6.0.1",
59
- "rollup": "4.59.0",
60
- "rollup-plugin-typescript2": "^0.36.0",
63
+ "rolldown": "^1.2.0",
64
+ "rolldown-plugin-dts": "^0.26.0",
65
+ "rolldown-plugin-preserve-directives": "^0.0.0",
61
66
  "styled-components": "5.3.11",
67
+ "tsx": "4.20.3",
62
68
  "typescript": "^6.0.3"
63
69
  },
64
70
  "peerDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO;AACL;;;GAGG;AACH,aAAa;AAEb;;;GAGG;AACH,QAAQ;AAER;;;GAGG;AACH,iBAAiB;AAEjB;;;GAGG;AACH,KAAK,kBAAkB,GACxB,MAAM,oCAAoC,CAAA;AAE3C,OAAO;AACL;;;GAGG;AACH,UAAU;AAEV;;;GAGG;AACH,KAAK,eAAe,GACrB,MAAM,oCAAoC,CAAA;AAE3C,OAAO;AACL;;;GAGG;AACH,KAAK,GACN,MAAM,eAAe,CAAA;AAEtB,OAAO;AACL;;;GAGG;AACH,GAAG,IAAI,QAAQ,GAChB,MAAM,aAAa,CAAA;AAEpB,OAAO;AACL;;;GAGG;AACH,KAAK;AAEL;;;GAGG;AACH,EAAE;AAEF;;;GAGG;AACH,KAAK,MAAM,GACZ,MAAM,MAAM,CAAA;AAEb,OAAO;AACL;;;GAGG;AACH,KAAK,uBAAuB,GAC7B,MAAM,MAAM,CAAA"}