@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.
@@ -8,14 +8,14 @@ $ tsup --dts
8
8
  CLI Cleaning output folder
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 425.00 B
12
- ESM dist/index.mjs.map 854.00 B
13
- ESM ⚡️ Build success in 15ms
14
- CJS dist/index.js 1.39 KB
15
- CJS dist/index.js.map 914.00 B
16
- CJS ⚡️ Build success in 15ms
11
+ CJS dist/index.js 1.83 KB
12
+ CJS dist/index.js.map 1.67 KB
13
+ CJS ⚡️ Build success in 11ms
14
+ ESM dist/index.mjs 861.00 B
15
+ ESM dist/index.mjs.map 1.64 KB
16
+ ESM ⚡️ Build success in 12ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 1449ms
18
+ DTS ⚡️ Build success in 1746ms
19
19
  DTS dist/index.d.ts 436.00 B
20
20
  DTS dist/index.d.mts 436.00 B
21
- Done in 2.19s.
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 ThemeProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_components.ThemeProvider, { ...props, theme: props.theme || import_seeds_react_theme.theme });
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 { ThemeProvider as BaseThemeProvider } 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\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme} />\n);\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,+BAAmD;AACnD,+BAAsB;AAepB;AADF,IAAM,gBAAgB,CAAC,UACrB,4CAAC,yBAAAA,eAAA,EAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,gCAAO;AAG7D,IAAO,gBAAQ;","names":["BaseThemeProvider"]}
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 { ThemeProvider as BaseThemeProvider } from "styled-components";
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 ThemeProvider = (props) => /* @__PURE__ */ jsx(BaseThemeProvider, { ...props, theme: props.theme || theme });
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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ThemeProvider as BaseThemeProvider } 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\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme} />\n);\n\nexport default ThemeProvider;\n"],"mappings":";AAAA,OAAuB;AACvB,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,aAAa;AAepB;AADF,IAAM,gBAAgB,CAAC,UACrB,oBAAC,qBAAmB,GAAG,OAAO,OAAO,MAAM,SAAS,OAAO;AAG7D,IAAO,gBAAQ;","names":[]}
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.16",
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": "^3.6.2"
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 { ThemeProvider as BaseThemeProvider } from "styled-components";
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;