@sproutsocial/seeds-react-theme-provider 1.1.16 → 1.1.21
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +39 -0
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/index.tsx +22 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -8,14 +8,14 @@ $ tsup --dts
|
|
|
8
8
|
[34mCLI[39m Cleaning output folder
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m1.83 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m1.67 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 11ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m861.00 B[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m1.64 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 12ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 1746ms
|
|
19
19
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m436.00 B[39m
|
|
20
20
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m436.00 B[39m
|
|
21
|
-
Done in 2.
|
|
21
|
+
Done in 2.53s.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @sproutsocial/seeds-react-theme-provider
|
|
2
2
|
|
|
3
|
+
## 1.1.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a13a571]
|
|
8
|
+
- @sproutsocial/seeds-react-theme@4.1.1
|
|
9
|
+
|
|
10
|
+
## 1.1.20
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [5114a32]
|
|
15
|
+
- @sproutsocial/seeds-react-theme@4.1.0
|
|
16
|
+
|
|
17
|
+
## 1.1.19
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [132ef9d]
|
|
22
|
+
- @sproutsocial/seeds-react-theme@4.0.0
|
|
23
|
+
|
|
24
|
+
## 1.1.18
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 47c62b3: Fix SCSS build failure caused by radial-gradient + color-mix() values in theme maps. The ai_generated container background token used a radial-gradient() with color-mix() calls, which SCSS cannot parse inside a map. The value is now a CSS custom property reference, with the actual gradient defined in \_themed.scss.
|
|
29
|
+
|
|
30
|
+
Inject the --color-container-bg-ai-generated CSS custom property via createGlobalStyle in ThemeProvider so styled-components consumers render the AI gradient without requiring the compiled SCSS theme CSS to be loaded.
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [47c62b3]
|
|
33
|
+
- @sproutsocial/seeds-react-theme@3.7.1
|
|
34
|
+
|
|
35
|
+
## 1.1.17
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [06da9c2]
|
|
40
|
+
- @sproutsocial/seeds-react-theme@3.7.0
|
|
41
|
+
|
|
3
42
|
## 1.1.16
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,19 @@ var React = require("react");
|
|
|
27
27
|
var import_styled_components = require("styled-components");
|
|
28
28
|
var import_seeds_react_theme = require("@sproutsocial/seeds-react-theme");
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
-
var
|
|
30
|
+
var GlobalTokenStyles = import_styled_components.createGlobalStyle`
|
|
31
|
+
:root {
|
|
32
|
+
--color-container-bg-ai-generated: radial-gradient(
|
|
33
|
+
circle at bottom left,
|
|
34
|
+
color-mix(in srgb, #205bc3, transparent 80%) 0%,
|
|
35
|
+
color-mix(in srgb, #6f5ed3, transparent 80%) 61%,
|
|
36
|
+
color-mix(in srgb, #f282f5, transparent 80%) 100%
|
|
37
|
+
), #f3f4f4;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
var ThemeProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled_components.ThemeProvider, { ...props, theme: props.theme || import_seeds_react_theme.theme, children: [
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalTokenStyles, {}),
|
|
42
|
+
props.children
|
|
43
|
+
] });
|
|
31
44
|
var index_default = ThemeProvider;
|
|
32
45
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ThemeProvider as BaseThemeProvider,\n createGlobalStyle,\n} from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport type {\n TypeSproutTheme,\n TypeTheme,\n} from \"@sproutsocial/seeds-react-theme\";\n\n// We can append additional themes types here\ntype TypeAllThemes = TypeTheme | TypeSproutTheme;\n\ntype TypeProps = {\n readonly theme?: TypeAllThemes;\n readonly children?: React.ReactNode;\n};\n\n// CSS custom properties for token values that cannot be represented in SCSS maps\n// (e.g. radial-gradient + color-mix). These are injected here so styled-components\n// consumers get the values without needing to load the compiled SCSS theme CSS.\nconst GlobalTokenStyles = createGlobalStyle`\n :root {\n --color-container-bg-ai-generated: radial-gradient(\n circle at bottom left,\n color-mix(in srgb, #205bc3, transparent 80%) 0%,\n color-mix(in srgb, #6f5ed3, transparent 80%) 61%,\n color-mix(in srgb, #f282f5, transparent 80%) 100%\n ), #f3f4f4;\n }\n`;\n\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme}>\n <GlobalTokenStyles />\n {props.children}\n </BaseThemeProvider>\n);\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,+BAGO;AACP,+BAAsB;AA6BpB;AAZF,IAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1B,IAAM,gBAAgB,CAAC,UACrB,6CAAC,yBAAAA,eAAA,EAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,gCAClD;AAAA,8CAAC,qBAAkB;AAAA,EAClB,MAAM;AAAA,GACT;AAGF,IAAO,gBAAQ;","names":["BaseThemeProvider"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
// src/index.tsx
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ThemeProvider as BaseThemeProvider,
|
|
5
|
+
createGlobalStyle
|
|
6
|
+
} from "styled-components";
|
|
4
7
|
import { theme } from "@sproutsocial/seeds-react-theme";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var GlobalTokenStyles = createGlobalStyle`
|
|
10
|
+
:root {
|
|
11
|
+
--color-container-bg-ai-generated: radial-gradient(
|
|
12
|
+
circle at bottom left,
|
|
13
|
+
color-mix(in srgb, #205bc3, transparent 80%) 0%,
|
|
14
|
+
color-mix(in srgb, #6f5ed3, transparent 80%) 61%,
|
|
15
|
+
color-mix(in srgb, #f282f5, transparent 80%) 100%
|
|
16
|
+
), #f3f4f4;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
var ThemeProvider = (props) => /* @__PURE__ */ jsxs(BaseThemeProvider, { ...props, theme: props.theme || theme, children: [
|
|
20
|
+
/* @__PURE__ */ jsx(GlobalTokenStyles, {}),
|
|
21
|
+
props.children
|
|
22
|
+
] });
|
|
7
23
|
var index_default = ThemeProvider;
|
|
8
24
|
export {
|
|
9
25
|
index_default as default
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ThemeProvider as BaseThemeProvider,\n createGlobalStyle,\n} from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport type {\n TypeSproutTheme,\n TypeTheme,\n} from \"@sproutsocial/seeds-react-theme\";\n\n// We can append additional themes types here\ntype TypeAllThemes = TypeTheme | TypeSproutTheme;\n\ntype TypeProps = {\n readonly theme?: TypeAllThemes;\n readonly children?: React.ReactNode;\n};\n\n// CSS custom properties for token values that cannot be represented in SCSS maps\n// (e.g. radial-gradient + color-mix). These are injected here so styled-components\n// consumers get the values without needing to load the compiled SCSS theme CSS.\nconst GlobalTokenStyles = createGlobalStyle`\n :root {\n --color-container-bg-ai-generated: radial-gradient(\n circle at bottom left,\n color-mix(in srgb, #205bc3, transparent 80%) 0%,\n color-mix(in srgb, #6f5ed3, transparent 80%) 61%,\n color-mix(in srgb, #f282f5, transparent 80%) 100%\n ), #f3f4f4;\n }\n`;\n\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme}>\n <GlobalTokenStyles />\n {props.children}\n </BaseThemeProvider>\n);\n\nexport default ThemeProvider;\n"],"mappings":";AAAA,OAAuB;AACvB;AAAA,EACE,iBAAiB;AAAA,EACjB;AAAA,OACK;AACP,SAAS,aAAa;AA6BpB,SACE,KADF;AAZF,IAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1B,IAAM,gBAAgB,CAAC,UACrB,qBAAC,qBAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,OAClD;AAAA,sBAAC,qBAAkB;AAAA,EAClB,MAAM;AAAA,GACT;AAGF,IAAO,gBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/seeds-react-theme-provider",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
4
4
|
"description": "Seeds React Theme Provider",
|
|
5
5
|
"author": "Sprout Social, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"typecheck": "tsc --noEmit"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sproutsocial/seeds-react-theme": "^
|
|
18
|
+
"@sproutsocial/seeds-react-theme": "^4.1.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/styled-components": "^5.1.26",
|
package/src/index.tsx
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ThemeProvider as BaseThemeProvider,
|
|
4
|
+
createGlobalStyle,
|
|
5
|
+
} from "styled-components";
|
|
3
6
|
import { theme } from "@sproutsocial/seeds-react-theme";
|
|
4
7
|
import type {
|
|
5
8
|
TypeSproutTheme,
|
|
@@ -14,8 +17,25 @@ type TypeProps = {
|
|
|
14
17
|
readonly children?: React.ReactNode;
|
|
15
18
|
};
|
|
16
19
|
|
|
20
|
+
// CSS custom properties for token values that cannot be represented in SCSS maps
|
|
21
|
+
// (e.g. radial-gradient + color-mix). These are injected here so styled-components
|
|
22
|
+
// consumers get the values without needing to load the compiled SCSS theme CSS.
|
|
23
|
+
const GlobalTokenStyles = createGlobalStyle`
|
|
24
|
+
:root {
|
|
25
|
+
--color-container-bg-ai-generated: radial-gradient(
|
|
26
|
+
circle at bottom left,
|
|
27
|
+
color-mix(in srgb, #205bc3, transparent 80%) 0%,
|
|
28
|
+
color-mix(in srgb, #6f5ed3, transparent 80%) 61%,
|
|
29
|
+
color-mix(in srgb, #f282f5, transparent 80%) 100%
|
|
30
|
+
), #f3f4f4;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
17
34
|
const ThemeProvider = (props: TypeProps) => (
|
|
18
|
-
<BaseThemeProvider {...props} theme={props.theme || theme}
|
|
35
|
+
<BaseThemeProvider {...props} theme={props.theme || theme}>
|
|
36
|
+
<GlobalTokenStyles />
|
|
37
|
+
{props.children}
|
|
38
|
+
</BaseThemeProvider>
|
|
19
39
|
);
|
|
20
40
|
|
|
21
41
|
export default ThemeProvider;
|