@upstart.gg/sdk 0.0.133 → 0.0.134

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.
@@ -1,6 +1,5 @@
1
1
  import chroma from "chroma-js";
2
2
  import type { Theme } from "../theme";
3
- export { default as chroma } from "chroma-js";
4
3
  export type ColorType = keyof Theme["colors"];
5
4
  export type ElementColorType = "page-background" | "background" | "text" | "border" | "shadow";
6
5
  export declare const baseColors: Record<ColorType, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"color-system.d.ts","sourceRoot":"","sources":["../../../src/shared/themes/color-system.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAC;AAI9C,MAAM,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/F,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAQhD,CAAC;AAEF,eAAO,MAAM,YAAY,4DAA6D,CAAC;AASvF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,WAEjF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAYvD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,sBAM7E;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,EACtC,iBAAiB,SAAM,GACtB,MAAM,CA8BR;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,sBAKlF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,0BAgD9C"}
1
+ {"version":3,"file":"color-system.d.ts","sourceRoot":"","sources":["../../../src/shared/themes/color-system.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC,MAAM,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/F,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAQhD,CAAC;AAEF,eAAO,MAAM,YAAY,4DAA6D,CAAC;AASvF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,WAEjF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAYvD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,sBAM7E;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,EACtC,iBAAiB,SAAM,GACtB,MAAM,CA8BR;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,sBAKlF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,0BAgD9C"}
@@ -1,4 +1,4 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import a from"chroma-js";import{default as O}from"chroma-js";import{kebabCase as C}from"lodash-es";import{css as k}from"@upstart.gg/style-system/twind";var x={primary:"Primary color",secondary:"Secondary color",accent:"Accent color",neutral:"Neutral color",base100:"Base color",base200:"Base (level 2)",base300:"Base (level 3)"},$=[900,800,700,600,500,400,300,200,100,50],f={100:"subtle",300:"light",700:"dark"};function S(t,o){return[]}function g(t){return typeof t!="string"?!1:t.startsWith("oklch")||t.startsWith("oklab")||t.startsWith("rgb")||t.startsWith("hsl")||t.startsWith("#")||t.startsWith("var(--")}function B(t,o){if(!(typeof t>"u"))return g(t)||typeof t=="number"?k({[o]:t}):t}function p(t,o=3.5){let i=a(t),n="#ffffff",e="#000000",r=a.contrast(i,n),c=a.contrast(i,e);return r>=o&&c>=o||r>=o?n:c>=o?e:r>=c?n:e}function E(t,o){if(!(typeof t>"u"))return g(t)||typeof t=="number"?`${o}-[${t}]`:t}function w(t){let o={};return Object.keys(x).forEach(n=>{let e=t.colors[n],r=C(n);o[`color-${r}`]=e,o[`color-${r}-500`]=e;let c=p(e);o[`color-${r}-content`]=c,o[`color-${r}-500-content`]=c;let l=a(e),d=l.darken(2.5),h=l.brighten(3.5),y=a.scale([h,l,d]).domain([50,500,900]).mode("oklch");r.startsWith("base")||$.forEach(s=>{if(s===500)return;let u=`color-${r}-${s}`,m=y(s);o[u]=m.css("oklch");let b=p(m);o[`color-${r}-${s}-content`]=b,f[s]&&(o[`color-${r}-${f[s]}`]=o[u],o[`color-${r}-${f[s]}-content`]=b)})}),o}export{x as baseColors,O as chroma,w as generateColorsVars,S as getColorsSuggestions,p as getContrastingTextColor,g as isStandardColor,E as propToClass,B as propToStyle,$ as shadeNumbers};
3
+ import i from"chroma-js";import{kebabCase as C}from"lodash-es";import{css as k}from"@upstart.gg/style-system/twind";var $={primary:"Primary color",secondary:"Secondary color",accent:"Accent color",neutral:"Neutral color",base100:"Base color",base200:"Base (level 2)",base300:"Base (level 3)"},x=[900,800,700,600,500,400,300,200,100,50],f={100:"subtle",300:"light",700:"dark"};function S(t,o){return[]}function p(t){return typeof t!="string"?!1:t.startsWith("oklch")||t.startsWith("oklab")||t.startsWith("rgb")||t.startsWith("hsl")||t.startsWith("#")||t.startsWith("var(--")}function B(t,o){if(!(typeof t>"u"))return p(t)||typeof t=="number"?k({[o]:t}):t}function g(t,o=3.5){let a=i(t),n="#ffffff",e="#000000",r=i.contrast(a,n),c=i.contrast(a,e);return r>=o&&c>=o||r>=o?n:c>=o?e:r>=c?n:e}function E(t,o){if(!(typeof t>"u"))return p(t)||typeof t=="number"?`${o}-[${t}]`:t}function w(t){let o={};return Object.keys($).forEach(n=>{let e=t.colors[n],r=C(n);o[`color-${r}`]=e,o[`color-${r}-500`]=e;let c=g(e);o[`color-${r}-content`]=c,o[`color-${r}-500-content`]=c;let l=i(e),d=l.darken(2.5),h=l.brighten(3.5),y=i.scale([h,l,d]).domain([50,500,900]).mode("oklch");r.startsWith("base")||x.forEach(s=>{if(s===500)return;let u=`color-${r}-${s}`,m=y(s);o[u]=m.css("oklch");let b=g(m);o[`color-${r}-${s}-content`]=b,f[s]&&(o[`color-${r}-${f[s]}`]=o[u],o[`color-${r}-${f[s]}-content`]=b)})}),o}export{$ as baseColors,w as generateColorsVars,S as getColorsSuggestions,g as getContrastingTextColor,p as isStandardColor,E as propToClass,B as propToStyle,x as shadeNumbers};
4
4
  //# sourceMappingURL=color-system.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/themes/color-system.ts"],"sourcesContent":["import chroma from \"chroma-js\";\nimport type { Theme } from \"../theme\";\nexport { default as chroma } from \"chroma-js\";\nimport { kebabCase } from \"lodash-es\";\nimport { css } from \"@upstart.gg/style-system/twind\";\n\nexport type ColorType = keyof Theme[\"colors\"];\nexport type ElementColorType = \"page-background\" | \"background\" | \"text\" | \"border\" | \"shadow\";\n\nexport const baseColors: Record<ColorType, string> = {\n primary: \"Primary color\",\n secondary: \"Secondary color\",\n accent: \"Accent color\",\n neutral: \"Neutral color\",\n base100: \"Base color\",\n base200: \"Base (level 2)\",\n base300: \"Base (level 3)\",\n};\n\nexport const shadeNumbers = [900, 800, 700, 600, 500, 400, 300, 200, 100, 50] as const;\ntype ShadeNumber = (typeof shadeNumbers)[number];\n\nconst semanticAliases: Partial<Record<ShadeNumber, string>> = {\n 100: \"subtle\",\n 300: \"light\",\n 700: \"dark\",\n};\n\nexport type ElementColor = string;\n\nexport function getColorsSuggestions(baseHueOrColor: number | string, theme: Theme) {\n return [];\n}\n\nexport function isStandardColor(color: unknown): boolean {\n if (typeof color !== \"string\") {\n return false;\n }\n return (\n color.startsWith(\"oklch\") ||\n color.startsWith(\"oklab\") ||\n color.startsWith(\"rgb\") ||\n color.startsWith(\"hsl\") ||\n color.startsWith(\"#\") ||\n color.startsWith(\"var(--\")\n );\n}\n\nexport function propToStyle(prop: string | number | undefined, cssAttr: string) {\n if (typeof prop === \"undefined\") {\n return undefined;\n }\n // @ts-ignore\n return isStandardColor(prop) || typeof prop === \"number\" ? css({ [cssAttr as string]: prop }) : prop;\n}\n\nexport function getContrastingTextColor(\n backgroundColor: string | chroma.Color,\n contrastThreshold = 3.5,\n): string {\n // Convert the background color to a chroma color object\n const bgColor = chroma(backgroundColor);\n\n // Get potential text colors\n const white = \"#ffffff\";\n const black = \"#000000\";\n\n // Calculate contrast ratios\n const contrastWithWhite = chroma.contrast(bgColor, white);\n const contrastWithBlack = chroma.contrast(bgColor, black);\n\n // If both options meet the contrast threshold, return the one with better contrast\n if (contrastWithWhite >= contrastThreshold && contrastWithBlack >= contrastThreshold) {\n return white;\n // return contrastWithWhite >= contrastWithBlack ? white : black;\n }\n\n // If only one meets the threshold, use that one\n if (contrastWithWhite >= contrastThreshold) {\n return white;\n }\n\n if (contrastWithBlack >= contrastThreshold) {\n return black;\n }\n\n // If neither meets the threshold, return the one with better contrast\n // (though it may not meet accessibility standards)\n return contrastWithWhite >= contrastWithBlack ? white : black;\n}\nexport function propToClass(value: string | number | undefined, classPrefix: string) {\n if (typeof value === \"undefined\") {\n return undefined;\n }\n return isStandardColor(value) || typeof value === \"number\" ? `${classPrefix}-[${value}]` : value;\n}\n\nexport function generateColorsVars(theme: Theme) {\n const shades: Record<string, string> = {};\n const colorNames = Object.keys(baseColors) as ColorType[];\n\n colorNames.forEach((_colorName) => {\n const color = theme.colors[_colorName];\n const colorName = kebabCase(_colorName);\n // Add the original color as the default (without number suffix)\n shades[`color-${colorName}`] = color;\n // Alias it to 500\n shades[`color-${colorName}-500`] = color;\n\n // Generate base color content\n const contentColor = getContrastingTextColor(color);\n shades[`color-${colorName}-content`] = contentColor;\n shades[`color-${colorName}-500-content`] = contentColor;\n\n const baseColor = chroma(color);\n const darkest = baseColor.darken(2.5);\n const lightest = baseColor.brighten(3.5);\n\n const colorScale = chroma.scale([lightest, baseColor, darkest]).domain([50, 500, 900]).mode(\"oklch\");\n\n // Generate shades for other colors than base colors\n if (!colorName.startsWith(\"base\")) {\n shadeNumbers.forEach((shade) => {\n if (shade === 500) {\n return;\n }\n const varName = `color-${colorName}-${shade}`;\n\n // Gen color for the specific shade\n const shadedColor = colorScale(shade);\n shades[varName] = shadedColor.css(\"oklch\");\n\n // Gen content color for this same shade\n const contentColor = getContrastingTextColor(shadedColor);\n shades[`color-${colorName}-${shade}-content`] = contentColor;\n\n if (semanticAliases[shade]) {\n shades[`color-${colorName}-${semanticAliases[shade]}`] = shades[varName];\n shades[`color-${colorName}-${semanticAliases[shade]}-content`] = contentColor;\n }\n });\n }\n });\n\n return shades;\n}\n"],"mappings":";;AAAA,OAAOA,MAAY,YAEnB,OAAoB,WAAXC,MAAyB,YAClC,OAAS,aAAAC,MAAiB,YAC1B,OAAS,OAAAC,MAAW,iCAKb,IAAMC,EAAwC,CACnD,QAAS,gBACT,UAAW,kBACX,OAAQ,eACR,QAAS,gBACT,QAAS,aACT,QAAS,iBACT,QAAS,gBACX,EAEaC,EAAe,CAAC,IAAK,IAAK,I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AE,EAAIlB,EAE/BgB,EAAO,SAASE,CAAS,MAAM,EAAIlB,EAGnC,IAAMmB,EAAef,EAAwBJ,CAAK,EAClDgB,EAAO,SAASE,CAAS,UAAU,EAAIC,EACvCH,EAAO,SAASE,CAAS,cAAc,EAAIC,EAE3C,IAAMC,EAAY/B,EAAOW,CAAK,EACxBqB,EAAUD,EAAU,OAAO,GAAG,EAC9BE,EAAWF,EAAU,SAAS,GAAG,EAEjCG,EAAalC,EAAO,MAAM,CAACiC,EAAUF,EAAWC,CAAO,CAAC,EAAE,OAAO,CAAC,GAAI,IAAK,GAAG,CAAC,EAAE,KAAK,OAAO,EAG9FH,EAAU,WAAW,MAAM,GAC9BxB,EAAa,QAAS8B,GAAU,CAC9B,GAAIA,IAAU,IACZ,OAEF,IAAMC,EAAU,SAASP,CAAS,IAAIM,CAAK,GAGrCE,EAAcH,EAAWC,CAAK,EACpCR,EAAOS,CAAO,EAAIC,EAAY,IAAI,OAAO,EAGzC,IAAMP,EAAef,EAAwBsB,CAAW,EACxDV,EAAO,SAASE,CAAS,IAAIM,CAAK,UAAU,EAAIL,EAE5CxB,EAAgB6B,CAAK,IACvBR,EAAO,SAASE,CAAS,IAAIvB,EAAgB6B,CAAK,CAAC,EAAE,EAAIR,EAAOS,CAAO,EACvET,EAAO,SAASE,CAAS,IAAIvB,EAAgB6B,CAAK,CAAC,UAAU,EAAIL,EAErE,CAAC,CAEL,CAAC,EAEMH,CACT","names":["chroma","default","kebabCase","css","baseColors","shadeNumbers","semanticAliases","getColorsSuggestions","baseHueOrColor","theme","isStandardColor","color","propToStyle","prop","cssAttr","getContrastingTextColor","backgroundColor","contrastThreshold","bgColor","white","black","contrastWithWhite","contrastWithBlack","propToClass","value","classPrefix","generateColorsVars","shades","_colorName","colorName","contentColor","baseColor","darkest","lightest","colorScale","shade","varName","shadedColor"]}
1
+ {"version":3,"sources":["../../../src/shared/themes/color-system.ts"],"sourcesContent":["import chroma from \"chroma-js\";\nimport type { Theme } from \"../theme\";\nimport { kebabCase } from \"lodash-es\";\nimport { css } from \"@upstart.gg/style-system/twind\";\n\nexport type ColorType = keyof Theme[\"colors\"];\nexport type ElementColorType = \"page-background\" | \"background\" | \"text\" | \"border\" | \"shadow\";\n\nexport const baseColors: Record<ColorType, string> = {\n primary: \"Primary color\",\n secondary: \"Secondary color\",\n accent: \"Accent color\",\n neutral: \"Neutral color\",\n base100: \"Base color\",\n base200: \"Base (level 2)\",\n base300: \"Base (level 3)\",\n};\n\nexport const shadeNumbers = [900, 800, 700, 600, 500, 400, 300, 200, 100, 50] as const;\ntype ShadeNumber = (typeof shadeNumbers)[number];\n\nconst semanticAliases: Partial<Record<ShadeNumber, string>> = {\n 100: \"subtle\",\n 300: \"light\",\n 700: \"dark\",\n};\n\nexport type ElementColor = string;\n\nexport function getColorsSuggestions(baseHueOrColor: number | string, theme: Theme) {\n return [];\n}\n\nexport function isStandardColor(color: unknown): boolean {\n if (typeof color !== \"string\") {\n return false;\n }\n return (\n color.startsWith(\"oklch\") ||\n color.startsWith(\"oklab\") ||\n color.startsWith(\"rgb\") ||\n color.startsWith(\"hsl\") ||\n color.startsWith(\"#\") ||\n color.startsWith(\"var(--\")\n );\n}\n\nexport function propToStyle(prop: string | number | undefined, cssAttr: string) {\n if (typeof prop === \"undefined\") {\n return undefined;\n }\n // @ts-ignore\n return isStandardColor(prop) || typeof prop === \"number\" ? css({ [cssAttr as string]: prop }) : prop;\n}\n\nexport function getContrastingTextColor(\n backgroundColor: string | chroma.Color,\n contrastThreshold = 3.5,\n): string {\n // Convert the background color to a chroma color object\n const bgColor = chroma(backgroundColor);\n\n // Get potential text colors\n const white = \"#ffffff\";\n const black = \"#000000\";\n\n // Calculate contrast ratios\n const contrastWithWhite = chroma.contrast(bgColor, white);\n const contrastWithBlack = chroma.contrast(bgColor, black);\n\n // If both options meet the contrast threshold, return the one with better contrast\n if (contrastWithWhite >= contrastThreshold && contrastWithBlack >= contrastThreshold) {\n return white;\n // return contrastWithWhite >= contrastWithBlack ? white : black;\n }\n\n // If only one meets the threshold, use that one\n if (contrastWithWhite >= contrastThreshold) {\n return white;\n }\n\n if (contrastWithBlack >= contrastThreshold) {\n return black;\n }\n\n // If neither meets the threshold, return the one with better contrast\n // (though it may not meet accessibility standards)\n return contrastWithWhite >= contrastWithBlack ? white : black;\n}\nexport function propToClass(value: string | number | undefined, classPrefix: string) {\n if (typeof value === \"undefined\") {\n return undefined;\n }\n return isStandardColor(value) || typeof value === \"number\" ? `${classPrefix}-[${value}]` : value;\n}\n\nexport function generateColorsVars(theme: Theme) {\n const shades: Record<string, string> = {};\n const colorNames = Object.keys(baseColors) as ColorType[];\n\n colorNames.forEach((_colorName) => {\n const color = theme.colors[_colorName];\n const colorName = kebabCase(_colorName);\n // Add the original color as the default (without number suffix)\n shades[`color-${colorName}`] = color;\n // Alias it to 500\n shades[`color-${colorName}-500`] = color;\n\n // Generate base color content\n const contentColor = getContrastingTextColor(color);\n shades[`color-${colorName}-content`] = contentColor;\n shades[`color-${colorName}-500-content`] = contentColor;\n\n const baseColor = chroma(color);\n const darkest = baseColor.darken(2.5);\n const lightest = baseColor.brighten(3.5);\n\n const colorScale = chroma.scale([lightest, baseColor, darkest]).domain([50, 500, 900]).mode(\"oklch\");\n\n // Generate shades for other colors than base colors\n if (!colorName.startsWith(\"base\")) {\n shadeNumbers.forEach((shade) => {\n if (shade === 500) {\n return;\n }\n const varName = `color-${colorName}-${shade}`;\n\n // Gen color for the specific shade\n const shadedColor = colorScale(shade);\n shades[varName] = shadedColor.css(\"oklch\");\n\n // Gen content color for this same shade\n const contentColor = getContrastingTextColor(shadedColor);\n shades[`color-${colorName}-${shade}-content`] = contentColor;\n\n if (semanticAliases[shade]) {\n shades[`color-${colorName}-${semanticAliases[shade]}`] = shades[varName];\n shades[`color-${colorName}-${semanticAliases[shade]}-content`] = contentColor;\n }\n });\n }\n });\n\n return shades;\n}\n"],"mappings":";;AAAA,OAAOA,MAAY,YAEnB,OAAS,aAAAC,MAAiB,YAC1B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AAC,EAGxC,OAFmB,OAAO,KAAKvB,CAAU,EAE9B,QAASwB,GAAe,CACjC,IAAMjB,EAAQF,EAAM,OAAOmB,CAAU,EAC/BC,EAAY3B,EAAU0B,CAAU,EAEtCD,EAAO,SAASE,CAAS,EAAE,EAAIlB,EAE/BgB,EAAO,SAASE,CAAS,MAAM,EAAIlB,EAGnC,IAAMmB,EAAef,EAAwBJ,CAAK,EAClDgB,EAAO,SAASE,CAAS,UAAU,EAAIC,EACvCH,EAAO,SAASE,CAAS,cAAc,EAAIC,EAE3C,IAAMC,EAAY9B,EAAOU,CAAK,EACxBqB,EAAUD,EAAU,OAAO,GAAG,EAC9BE,EAAWF,EAAU,SAAS,GAAG,EAEjCG,EAAajC,EAAO,MAAM,CAACgC,EAAUF,EAAWC,CAAO,CAAC,EAAE,OAAO,CAAC,GAAI,IAAK,GAAG,CAAC,EAAE,KAAK,OAAO,EAG9FH,EAAU,WAAW,MAAM,GAC9BxB,EAAa,QAAS8B,GAAU,CAC9B,GAAIA,IAAU,IACZ,OAEF,IAAMC,EAAU,SAASP,CAAS,IAAIM,CAAK,GAGrCE,EAAcH,EAAWC,CAAK,EACpCR,EAAOS,CAAO,EAAIC,EAAY,IAAI,OAAO,EAGzC,IAAMP,EAAef,EAAwBsB,CAAW,EACxDV,EAAO,SAASE,CAAS,IAAIM,CAAK,UAAU,EAAIL,EAE5CxB,EAAgB6B,CAAK,IACvBR,EAAO,SAASE,CAAS,IAAIvB,EAAgB6B,CAAK,CAAC,EAAE,EAAIR,EAAOS,CAAO,EACvET,EAAO,SAASE,CAAS,IAAIvB,EAAgB6B,CAAK,CAAC,UAAU,EAAIL,EAErE,CAAC,CAEL,CAAC,EAEMH,CACT","names":["chroma","kebabCase","css","baseColors","shadeNumbers","semanticAliases","getColorsSuggestions","baseHueOrColor","theme","isStandardColor","color","propToStyle","prop","cssAttr","getContrastingTextColor","backgroundColor","contrastThreshold","bgColor","white","black","contrastWithWhite","contrastWithBlack","propToClass","value","classPrefix","generateColorsVars","shades","_colorName","colorName","contentColor","baseColor","darkest","lightest","colorScale","shade","varName","shadedColor"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstart.gg/sdk",
3
- "version": "0.0.133",
3
+ "version": "0.0.134",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -38,15 +38,15 @@
38
38
  "nanoid": "5.1.5",
39
39
  "react-hotkeys-hook": "4.5.1",
40
40
  "react-selecto": "1.26.3",
41
- "usehooks-ts": "3.1.0",
41
+ "usehooks-ts": "3.1.1",
42
42
  "zundo": "2.3.0",
43
43
  "zustand": "4.5.5",
44
- "@upstart.gg/style-system": "0.0.133"
44
+ "@upstart.gg/style-system": "0.0.134"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@headlessui/react": "^2.2.1",
48
- "react": "18.3.0-canary-3d9b20132-20240124",
49
- "react-dom": "18.3.0-canary-3d9b20132-20240124",
48
+ "react": "19.1.1",
49
+ "react-dom": "19.1.1",
50
50
  "ai": "^5.0.0",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
@@ -61,8 +61,8 @@
61
61
  "@types/express": "^4.17.21",
62
62
  "@types/lodash-es": "4.17.12",
63
63
  "@types/node": "^22.15.30",
64
- "@types/react": "18.3.3",
65
- "@types/react-dom": "^18.3.0",
64
+ "@types/react": "19.1.13",
65
+ "@types/react-dom": "^19.1.9",
66
66
  "@types/sortablejs": "1.15.8",
67
67
  "concurrently": "8.2.2",
68
68
  "express": "^4.21.2",
@@ -1,6 +1,5 @@
1
1
  import chroma from "chroma-js";
2
2
  import type { Theme } from "../theme";
3
- export { default as chroma } from "chroma-js";
4
3
  import { kebabCase } from "lodash-es";
5
4
  import { css } from "@upstart.gg/style-system/twind";
6
5