@chayns-components/core 5.0.0-beta.728 → 5.0.0-beta.730

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 (34) hide show
  1. package/lib/cjs/api/theme/get.js +6 -8
  2. package/lib/cjs/api/theme/get.js.map +1 -1
  3. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js +4 -3
  4. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  5. package/lib/esm/api/theme/get.js +6 -8
  6. package/lib/esm/api/theme/get.js.map +1 -1
  7. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js +4 -3
  8. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  9. package/lib/types/api/theme/get.d.ts +2 -2
  10. package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +1 -1
  11. package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +10 -10
  12. package/lib/types/components/amount-control/AmountControl.styles.d.ts +1 -1
  13. package/lib/types/components/button/Button.styles.d.ts +3 -3
  14. package/lib/types/components/color-scheme-provider/ColorSchemeProvider.d.ts +4 -0
  15. package/lib/types/components/combobox/ComboBox.styles.d.ts +1 -1
  16. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +1 -1
  17. package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +1 -1
  18. package/lib/types/components/file-input/FileInput.styles.d.ts +1 -1
  19. package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +1 -1
  20. package/lib/types/components/input/Input.styles.d.ts +3 -3
  21. package/lib/types/components/list/list-item/ListItem.styles.d.ts +1 -1
  22. package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +1 -1
  23. package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +4 -4
  24. package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +1 -1
  25. package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +1 -1
  26. package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +1 -1
  27. package/lib/types/components/radio-button/RadioButton.styles.d.ts +1 -1
  28. package/lib/types/components/search-box/SearchBox.styles.d.ts +1 -1
  29. package/lib/types/components/search-box/search-box-body/SearchBoxBody.styles.d.ts +1 -1
  30. package/lib/types/components/search-input/SearchInput.styles.d.ts +2 -2
  31. package/lib/types/components/slider/Slider.styles.d.ts +2 -2
  32. package/lib/types/components/slider-button/SliderButton.styles.d.ts +1 -1
  33. package/lib/types/components/truncation/Truncation.styles.d.ts +1 -1
  34. package/package.json +2 -2
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getParagraphFormat = exports.getDesignSettings = void 0;
7
7
  var _chaynsApi = require("chayns-api");
8
- const getDesignSettings = async () => {
9
- const {
10
- id
11
- } = (0, _chaynsApi.getSite)();
8
+ const getDesignSettings = async siteId => {
9
+ let id = siteId;
10
+ if (!id) id = (0, _chaynsApi.getSite)().id;
12
11
  const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {
13
12
  method: 'GET'
14
13
  });
@@ -18,10 +17,9 @@ const getDesignSettings = async () => {
18
17
  return undefined;
19
18
  };
20
19
  exports.getDesignSettings = getDesignSettings;
21
- const getParagraphFormat = async () => {
22
- const {
23
- id
24
- } = (0, _chaynsApi.getSite)();
20
+ const getParagraphFormat = async siteId => {
21
+ let id = siteId;
22
+ if (!id) id = (0, _chaynsApi.getSite)().id;
25
23
  const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {
26
24
  method: 'GET'
27
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"get.js","names":["_chaynsApi","require","getDesignSettings","id","getSite","response","fetch","method","status","json","undefined","exports","getParagraphFormat"],"sources":["../../../../src/api/theme/get.ts"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\n\nexport const getDesignSettings = async (): Promise<DesignSettings | undefined> => {\n const { id } = getSite();\n\n const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as DesignSettings;\n }\n\n return undefined;\n};\n\nexport const getParagraphFormat = async (): Promise<ParagraphFormat[] | undefined> => {\n const { id } = getSite();\n\n const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as ParagraphFormat[];\n }\n\n return undefined;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAGO,MAAMC,iBAAiB,GAAG,MAAAA,CAAA,KAAiD;EAC9E,MAAM;IAAEC;EAAG,CAAC,GAAG,IAAAC,kBAAO,EAAC,CAAC;EAExB,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BH,EAAE,WAAW,EAAE;IACtEI,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAACC,OAAA,CAAAT,iBAAA,GAAAA,iBAAA;AAEK,MAAMU,kBAAkB,GAAG,MAAAA,CAAA,KAAoD;EAClF,MAAM;IAAET;EAAG,CAAC,GAAG,IAAAC,kBAAO,EAAC,CAAC;EAExB,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BH,EAAE,kBAAkB,EAAE;IAC7EI,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAACC,OAAA,CAAAC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"file":"get.js","names":["_chaynsApi","require","getDesignSettings","siteId","id","getSite","response","fetch","method","status","json","undefined","exports","getParagraphFormat"],"sources":["../../../../src/api/theme/get.ts"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\n\nexport const getDesignSettings = async (siteId?: string): Promise<DesignSettings | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as DesignSettings;\n }\n\n return undefined;\n};\n\nexport const getParagraphFormat = async (\n siteId?: string,\n): Promise<ParagraphFormat[] | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as ParagraphFormat[];\n }\n\n return undefined;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAGO,MAAMC,iBAAiB,GAAG,MAAOC,MAAe,IAA0C;EAC7F,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAG,IAAAC,kBAAO,EAAC,CAAC,CAACD,EAAE;EAE1B,MAAME,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BH,EAAE,WAAW,EAAE;IACtEI,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAACC,OAAA,CAAAV,iBAAA,GAAAA,iBAAA;AAEK,MAAMW,kBAAkB,GAAG,MAC9BV,MAAe,IAC0B;EACzC,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAG,IAAAC,kBAAO,EAAC,CAAC,CAACD,EAAE;EAE1B,MAAME,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BH,EAAE,kBAAkB,EAAE;IAC7EI,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAACC,OAAA,CAAAC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -32,6 +32,7 @@ const ColorSchemeProvider = ({
32
32
  colorMode,
33
33
  cssVariables = {},
34
34
  secondaryColor,
35
+ siteId,
35
36
  style = {},
36
37
  designSettings
37
38
  }) => {
@@ -50,13 +51,13 @@ const ColorSchemeProvider = ({
50
51
  setInternalDesignSettings(designSettings);
51
52
  return;
52
53
  }
53
- void (0, _get.getDesignSettings)().then(result => {
54
+ void (0, _get.getDesignSettings)(siteId).then(result => {
54
55
  setInternalDesignSettings(result);
55
56
  });
56
- void (0, _get.getParagraphFormat)().then(result => {
57
+ void (0, _get.getParagraphFormat)(siteId).then(result => {
57
58
  setInternalParagraphFormat(result);
58
59
  });
59
- }, [designSettings]);
60
+ }, [designSettings, siteId]);
60
61
  (0, _react.useEffect)(() => {
61
62
  const availableColors = (0, _colors.getAvailableColorList)();
62
63
  const newColors = {};
@@ -1 +1 @@
1
- {"version":3,"file":"ColorSchemeProvider.js","names":["_colors","require","_chaynsApi","_react","_interopRequireWildcard","_reactHelmet","_styledComponents","_get","_font","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ColorMode","GlobalStyle","createGlobalStyle","ColorSchemeProvider","children","color","colorMode","cssVariables","secondaryColor","style","designSettings","colors","setColors","useState","theme","setTheme","internalDesignSettings","setInternalDesignSettings","internalParagraphFormat","setInternalParagraphFormat","internalColor","internalColorMode","useSite","useEffect","getDesignSettings","then","result","getParagraphFormat","availableColors","getAvailableColorList","newColors","newTheme","forEach","colorName","hexColor","getColorFromPalette","rgbColor","hexToRgb255","g","b","Light","Dark","keys","key","convertIconStyle","iconStyle","colorResult","themeResult","getHeadlineColorSelector","fontSize","getFontSize","createElement","ThemeProvider","Helmet","rel","href","displayName","_default","exports"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.tsx"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { useSite } from 'chayns-api';\nimport React, { FC, ReactNode, useEffect, useState } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { createGlobalStyle, ThemeProvider } from 'styled-components';\nimport { getDesignSettings, getParagraphFormat } from '../../api/theme/get';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\nimport { convertIconStyle, getFontSize, getHeadlineColorSelector } from '../../utils/font';\n\nenum ColorMode {\n Classic,\n Dark,\n Light,\n}\n\ntype ColorSchemeProviderProps = {\n /**\n * The content of the application or the components for which the styles should be set\n */\n children: ReactNode;\n /**\n * The hex color to be used for the children\n */\n color?: string;\n /**\n * The color mode to be used for the children\n */\n colorMode?: ColorMode;\n /**\n * Css variables to be added in addition to the chayns variables\n */\n cssVariables?: { [key: string]: string | number };\n /**\n * The design settings of a page.\n */\n designSettings?: DesignSettings;\n /**\n * The secondary hex color to be used for the children\n */\n secondaryColor?: string;\n /**\n * Additional styles set on the root element\n */\n style?: { [key: string]: string | number };\n};\n\nexport interface Theme {\n [key: string]: string;\n}\n\nexport type WithTheme<T> = T & {\n theme: Theme;\n};\n\n// ToDo remove type after the framer-motion bug is Fixed\nexport type FramerMotionBugFix = WithTheme<unknown>;\n\nconst GlobalStyle = createGlobalStyle`\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nconst ColorSchemeProvider: FC<ColorSchemeProviderProps> = ({\n children,\n color,\n colorMode,\n cssVariables = {},\n secondaryColor,\n style = {},\n designSettings,\n}) => {\n const [colors, setColors] = useState<Theme>({});\n const [theme, setTheme] = useState<Theme>({});\n const [internalDesignSettings, setInternalDesignSettings] = useState<DesignSettings>();\n const [internalParagraphFormat, setInternalParagraphFormat] = useState<ParagraphFormat[]>();\n\n // Empty object is used to prevent error if ColorSchemeProvider is rendered on server\n const { color: internalColor, colorMode: internalColorMode } = useSite() ?? {};\n\n useEffect(() => {\n if (designSettings) {\n setInternalDesignSettings(designSettings);\n\n return;\n }\n\n void getDesignSettings().then((result) => {\n setInternalDesignSettings(result);\n });\n\n void getParagraphFormat().then((result) => {\n setInternalParagraphFormat(result);\n });\n }, [designSettings]);\n\n useEffect(() => {\n const availableColors = getAvailableColorList();\n\n const newColors: Theme = {};\n const newTheme: Theme = {};\n\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color: color ?? internalColor,\n colorMode: colorMode ?? internalColorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n newColors[`--chayns-color--${colorName}`] = hexColor;\n newTheme[colorName] = hexColor;\n\n if (rgbColor) {\n newColors[`--chayns-color-rgb--${colorName}`] =\n `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n newTheme[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n\n switch (colorMode ?? internalColorMode) {\n case ColorMode.Light:\n newTheme.colorMode = 'light';\n break;\n case ColorMode.Dark:\n newTheme.colorMode = 'dark';\n break;\n default:\n newTheme.colorMode = 'classic';\n break;\n }\n\n if (internalDesignSettings) {\n Object.keys(internalDesignSettings).forEach((key) => {\n if (key === 'iconStyle') {\n newTheme[key] = convertIconStyle(internalDesignSettings.iconStyle);\n\n return;\n }\n\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = internalDesignSettings[key];\n });\n }\n\n if (internalParagraphFormat) {\n const { colorResult, themeResult } = getHeadlineColorSelector(internalParagraphFormat);\n\n // Update chayns-colors\n Object.keys(colorResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newColors[key] = colorResult[key];\n });\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = themeResult[key];\n });\n }\n\n newTheme.fontSize = getFontSize();\n\n setTheme(newTheme);\n setColors(newColors);\n }, [\n color,\n colorMode,\n internalColor,\n internalColorMode,\n internalDesignSettings,\n internalParagraphFormat,\n secondaryColor,\n ]);\n\n return (\n <ThemeProvider theme={theme}>\n <Helmet>\n <link\n rel=\"stylesheet\"\n href=\"https://api.chayns-static.space/font/NotoColorEmoji/v1/font.css\"\n />\n </Helmet>\n <div\n style={{ ...colors, ...cssVariables, ...style, color: 'var(--chayns-color--text)' }}\n >\n {children}\n </div>\n <GlobalStyle />\n </ThemeProvider>\n );\n};\n\nColorSchemeProvider.displayName = 'ColorSchemeProvider';\n\nexport default ColorSchemeProvider;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAEA,IAAAO,KAAA,GAAAP,OAAA;AAA2F,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG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QACA,CAAC,eACN9B,MAAA,CAAAY,OAAA,CAAAiE,aAAA,CAAClD,WAAW,MAAE,CACH,CAAC;AAExB,CAAC;AAEDE,mBAAmB,CAACqD,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAxE,OAAA,GAEzCiB,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"ColorSchemeProvider.js","names":["_colors","require","_chaynsApi","_react","_interopRequireWildcard","_reactHelmet","_styledComponents","_get","_font","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ColorMode","GlobalStyle","createGlobalStyle","ColorSchemeProvider","children","color","colorMode","cssVariables","secondaryColor","siteId","style","designSettings","colors","setColors","useState","theme","setTheme","internalDesignSettings","setInternalDesignSettings","internalParagraphFormat","setInternalParagraphFormat","internalColor","internalColorMode","useSite","useEffect","getDesignSettings","then","result","getParagraphFormat","availableColors","getAvailableColorList","newColors","newTheme","forEach","colorName","hexColor","getColorFromPalette","rgbColor","hexToRgb255","g","b","Light","Dark","keys","key","convertIconStyle","iconStyle","colorResult","themeResult","getHeadlineColorSelector","fontSize","getFontSize","createElement","ThemeProvider","Helmet","rel","href","displayName","_default","exports"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.tsx"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { useSite } from 'chayns-api';\nimport React, { FC, ReactNode, useEffect, useState } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { createGlobalStyle, ThemeProvider } from 'styled-components';\nimport { getDesignSettings, getParagraphFormat } from '../../api/theme/get';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\nimport { convertIconStyle, getFontSize, getHeadlineColorSelector } from '../../utils/font';\n\nenum ColorMode {\n Classic,\n Dark,\n Light,\n}\n\ntype ColorSchemeProviderProps = {\n /**\n * The content of the application or the components for which the styles should be set\n */\n children: ReactNode;\n /**\n * The hex color to be used for the children\n */\n color?: string;\n /**\n * The color mode to be used for the children\n */\n colorMode?: ColorMode;\n /**\n * Css variables to be added in addition to the chayns variables\n */\n cssVariables?: { [key: string]: string | number };\n /**\n * The design settings of a page.\n */\n designSettings?: DesignSettings;\n /**\n * The secondary hex color to be used for the children\n */\n secondaryColor?: string;\n /**\n * The site id of the page for which the design settings should be fetched\n */\n siteId?: string;\n /**\n * Additional styles set on the root element\n */\n style?: { [key: string]: string | number };\n};\n\nexport interface Theme {\n [key: string]: string;\n}\n\nexport type WithTheme<T> = T & {\n theme: Theme;\n};\n\n// ToDo remove type after the framer-motion bug is Fixed\nexport type FramerMotionBugFix = WithTheme<unknown>;\n\nconst GlobalStyle = createGlobalStyle`\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nconst ColorSchemeProvider: FC<ColorSchemeProviderProps> = ({\n children,\n color,\n colorMode,\n cssVariables = {},\n secondaryColor,\n siteId,\n style = {},\n designSettings,\n}) => {\n const [colors, setColors] = useState<Theme>({});\n const [theme, setTheme] = useState<Theme>({});\n const [internalDesignSettings, setInternalDesignSettings] = useState<DesignSettings>();\n const [internalParagraphFormat, setInternalParagraphFormat] = useState<ParagraphFormat[]>();\n\n // Empty object is used to prevent error if ColorSchemeProvider is rendered on server\n const { color: internalColor, colorMode: internalColorMode } = useSite() ?? {};\n\n useEffect(() => {\n if (designSettings) {\n setInternalDesignSettings(designSettings);\n\n return;\n }\n\n void getDesignSettings(siteId).then((result) => {\n setInternalDesignSettings(result);\n });\n\n void getParagraphFormat(siteId).then((result) => {\n setInternalParagraphFormat(result);\n });\n }, [designSettings, siteId]);\n\n useEffect(() => {\n const availableColors = getAvailableColorList();\n\n const newColors: Theme = {};\n const newTheme: Theme = {};\n\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color: color ?? internalColor,\n colorMode: colorMode ?? internalColorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n newColors[`--chayns-color--${colorName}`] = hexColor;\n newTheme[colorName] = hexColor;\n\n if (rgbColor) {\n newColors[`--chayns-color-rgb--${colorName}`] =\n `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n newTheme[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n\n switch (colorMode ?? internalColorMode) {\n case ColorMode.Light:\n newTheme.colorMode = 'light';\n break;\n case ColorMode.Dark:\n newTheme.colorMode = 'dark';\n break;\n default:\n newTheme.colorMode = 'classic';\n break;\n }\n\n if (internalDesignSettings) {\n Object.keys(internalDesignSettings).forEach((key) => {\n if (key === 'iconStyle') {\n newTheme[key] = convertIconStyle(internalDesignSettings.iconStyle);\n\n return;\n }\n\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = internalDesignSettings[key];\n });\n }\n\n if (internalParagraphFormat) {\n const { colorResult, themeResult } = getHeadlineColorSelector(internalParagraphFormat);\n\n // Update chayns-colors\n Object.keys(colorResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newColors[key] = colorResult[key];\n });\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = themeResult[key];\n });\n }\n\n newTheme.fontSize = getFontSize();\n\n setTheme(newTheme);\n setColors(newColors);\n }, [\n color,\n colorMode,\n internalColor,\n internalColorMode,\n internalDesignSettings,\n internalParagraphFormat,\n secondaryColor,\n ]);\n\n return (\n <ThemeProvider theme={theme}>\n <Helmet>\n <link\n rel=\"stylesheet\"\n href=\"https://api.chayns-static.space/font/NotoColorEmoji/v1/font.css\"\n />\n </Helmet>\n <div\n style={{ ...colors, ...cssVariables, ...style, color: 'var(--chayns-color--text)' }}\n >\n {children}\n </div>\n <GlobalStyle />\n </ThemeProvider>\n );\n};\n\nColorSchemeProvider.displayName = 'ColorSchemeProvider';\n\nexport default ColorSchemeProvider;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAEA,IAAAO,KAAA,GAAAP,OAAA;AAA2F,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAA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IACN;IAEAZ,QAAQ,CAACkB,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;IAEjCnC,QAAQ,CAACgB,QAAQ,CAAC;IAClBnB,SAAS,CAACkB,SAAS,CAAC;EACxB,CAAC,EAAE,CACC1B,KAAK,EACLC,SAAS,EACTe,aAAa,EACbC,iBAAiB,EACjBL,sBAAsB,EACtBE,uBAAuB,EACvBX,cAAc,CACjB,CAAC;EAEF,oBACIlC,MAAA,CAAAY,OAAA,CAAAkE,aAAA,CAAC3E,iBAAA,CAAA4E,aAAa;IAACtC,KAAK,EAAEA;EAAM,gBACxBzC,MAAA,CAAAY,OAAA,CAAAkE,aAAA,CAAC5E,YAAA,CAAA8E,MAAM,qBACHhF,MAAA,CAAAY,OAAA,CAAAkE,aAAA;IACIG,GAAG,EAAC,YAAY;IAChBC,IAAI,EAAC;EAAiE,CACzE,CACG,CAAC,eACTlF,MAAA,CAAAY,OAAA,CAAAkE,aAAA;IACI1C,KAAK,EAAE;MAAE,GAAGE,MAAM;MAAE,GAAGL,YAAY;MAAE,GAAGG,KAAK;MAAEL,KAAK,EAAE;IAA4B;EAAE,GAEnFD,QACA,CAAC,eACN9B,MAAA,CAAAY,OAAA,CAAAkE,aAAA,CAACnD,WAAW,MAAE,CACH,CAAC;AAExB,CAAC;AAEDE,mBAAmB,CAACsD,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzE,OAAA,GAEzCiB,mBAAmB","ignoreList":[]}
@@ -1,8 +1,7 @@
1
1
  import { getSite } from 'chayns-api';
2
- export const getDesignSettings = async () => {
3
- const {
4
- id
5
- } = getSite();
2
+ export const getDesignSettings = async siteId => {
3
+ let id = siteId;
4
+ if (!id) id = getSite().id;
6
5
  const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {
7
6
  method: 'GET'
8
7
  });
@@ -11,10 +10,9 @@ export const getDesignSettings = async () => {
11
10
  }
12
11
  return undefined;
13
12
  };
14
- export const getParagraphFormat = async () => {
15
- const {
16
- id
17
- } = getSite();
13
+ export const getParagraphFormat = async siteId => {
14
+ let id = siteId;
15
+ if (!id) id = getSite().id;
18
16
  const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {
19
17
  method: 'GET'
20
18
  });
@@ -1 +1 @@
1
- {"version":3,"file":"get.js","names":["getSite","getDesignSettings","id","response","fetch","method","status","json","undefined","getParagraphFormat"],"sources":["../../../../src/api/theme/get.ts"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\n\nexport const getDesignSettings = async (): Promise<DesignSettings | undefined> => {\n const { id } = getSite();\n\n const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as DesignSettings;\n }\n\n return undefined;\n};\n\nexport const getParagraphFormat = async (): Promise<ParagraphFormat[] | undefined> => {\n const { id } = getSite();\n\n const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as ParagraphFormat[];\n }\n\n return undefined;\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AAGpC,OAAO,MAAMC,iBAAiB,GAAG,MAAAA,CAAA,KAAiD;EAC9E,MAAM;IAAEC;EAAG,CAAC,GAAGF,OAAO,CAAC,CAAC;EAExB,MAAMG,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BF,EAAE,WAAW,EAAE;IACtEG,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAG,MAAAA,CAAA,KAAoD;EAClF,MAAM;IAAEP;EAAG,CAAC,GAAGF,OAAO,CAAC,CAAC;EAExB,MAAMG,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BF,EAAE,kBAAkB,EAAE;IAC7EG,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"get.js","names":["getSite","getDesignSettings","siteId","id","response","fetch","method","status","json","undefined","getParagraphFormat"],"sources":["../../../../src/api/theme/get.ts"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\n\nexport const getDesignSettings = async (siteId?: string): Promise<DesignSettings | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as DesignSettings;\n }\n\n return undefined;\n};\n\nexport const getParagraphFormat = async (\n siteId?: string,\n): Promise<ParagraphFormat[] | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as ParagraphFormat[];\n }\n\n return undefined;\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AAGpC,OAAO,MAAMC,iBAAiB,GAAG,MAAOC,MAAe,IAA0C;EAC7F,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAGH,OAAO,CAAC,CAAC,CAACG,EAAE;EAE1B,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BF,EAAE,WAAW,EAAE;IACtEG,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAG,MAC9BR,MAAe,IAC0B;EACzC,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAGH,OAAO,CAAC,CAAC,CAACG,EAAE;EAE1B,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BF,EAAE,kBAAkB,EAAE;IAC7EG,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC","ignoreList":[]}
@@ -25,6 +25,7 @@ const ColorSchemeProvider = _ref => {
25
25
  colorMode,
26
26
  cssVariables = {},
27
27
  secondaryColor,
28
+ siteId,
28
29
  style = {},
29
30
  designSettings
30
31
  } = _ref;
@@ -43,13 +44,13 @@ const ColorSchemeProvider = _ref => {
43
44
  setInternalDesignSettings(designSettings);
44
45
  return;
45
46
  }
46
- void getDesignSettings().then(result => {
47
+ void getDesignSettings(siteId).then(result => {
47
48
  setInternalDesignSettings(result);
48
49
  });
49
- void getParagraphFormat().then(result => {
50
+ void getParagraphFormat(siteId).then(result => {
50
51
  setInternalParagraphFormat(result);
51
52
  });
52
- }, [designSettings]);
53
+ }, [designSettings, siteId]);
53
54
  useEffect(() => {
54
55
  const availableColors = getAvailableColorList();
55
56
  const newColors = {};
@@ -1 +1 @@
1
- {"version":3,"file":"ColorSchemeProvider.js","names":["getAvailableColorList","getColorFromPalette","hexToRgb255","useSite","React","useEffect","useState","Helmet","createGlobalStyle","ThemeProvider","getDesignSettings","getParagraphFormat","convertIconStyle","getFontSize","getHeadlineColorSelector","ColorMode","GlobalStyle","ColorSchemeProvider","_ref","children","color","colorMode","cssVariables","secondaryColor","style","designSettings","colors","setColors","theme","setTheme","internalDesignSettings","setInternalDesignSettings","internalParagraphFormat","setInternalParagraphFormat","internalColor","internalColorMode","then","result","availableColors","newColors","newTheme","forEach","colorName","hexColor","rgbColor","r","g","b","Light","Dark","Object","keys","key","iconStyle","colorResult","themeResult","fontSize","createElement","rel","href","displayName"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.tsx"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { useSite } from 'chayns-api';\nimport React, { FC, ReactNode, useEffect, useState } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { createGlobalStyle, ThemeProvider } from 'styled-components';\nimport { getDesignSettings, getParagraphFormat } from '../../api/theme/get';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\nimport { convertIconStyle, getFontSize, getHeadlineColorSelector } from '../../utils/font';\n\nenum ColorMode {\n Classic,\n Dark,\n Light,\n}\n\ntype ColorSchemeProviderProps = {\n /**\n * The content of the application or the components for which the styles should be set\n */\n children: ReactNode;\n /**\n * The hex color to be used for the children\n */\n color?: string;\n /**\n * The color mode to be used for the children\n */\n colorMode?: ColorMode;\n /**\n * Css variables to be added in addition to the chayns variables\n */\n cssVariables?: { [key: string]: string | number };\n /**\n * The design settings of a page.\n */\n designSettings?: DesignSettings;\n /**\n * The secondary hex color to be used for the children\n */\n secondaryColor?: string;\n /**\n * Additional styles set on the root element\n */\n style?: { [key: string]: string | number };\n};\n\nexport interface Theme {\n [key: string]: string;\n}\n\nexport type WithTheme<T> = T & {\n theme: Theme;\n};\n\n// ToDo remove type after the framer-motion bug is Fixed\nexport type FramerMotionBugFix = WithTheme<unknown>;\n\nconst GlobalStyle = createGlobalStyle`\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nconst ColorSchemeProvider: FC<ColorSchemeProviderProps> = ({\n children,\n color,\n colorMode,\n cssVariables = {},\n secondaryColor,\n style = {},\n designSettings,\n}) => {\n const [colors, setColors] = useState<Theme>({});\n const [theme, setTheme] = useState<Theme>({});\n const [internalDesignSettings, setInternalDesignSettings] = useState<DesignSettings>();\n const [internalParagraphFormat, setInternalParagraphFormat] = useState<ParagraphFormat[]>();\n\n // Empty object is used to prevent error if ColorSchemeProvider is rendered on server\n const { color: internalColor, colorMode: internalColorMode } = useSite() ?? {};\n\n useEffect(() => {\n if (designSettings) {\n setInternalDesignSettings(designSettings);\n\n return;\n }\n\n void getDesignSettings().then((result) => {\n setInternalDesignSettings(result);\n });\n\n void getParagraphFormat().then((result) => {\n setInternalParagraphFormat(result);\n });\n }, [designSettings]);\n\n useEffect(() => {\n const availableColors = getAvailableColorList();\n\n const newColors: Theme = {};\n const newTheme: Theme = {};\n\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color: color ?? internalColor,\n colorMode: colorMode ?? internalColorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n newColors[`--chayns-color--${colorName}`] = hexColor;\n newTheme[colorName] = hexColor;\n\n if (rgbColor) {\n newColors[`--chayns-color-rgb--${colorName}`] =\n `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n newTheme[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n\n switch (colorMode ?? internalColorMode) {\n case ColorMode.Light:\n newTheme.colorMode = 'light';\n break;\n case ColorMode.Dark:\n newTheme.colorMode = 'dark';\n break;\n default:\n newTheme.colorMode = 'classic';\n break;\n }\n\n if (internalDesignSettings) {\n Object.keys(internalDesignSettings).forEach((key) => {\n if (key === 'iconStyle') {\n newTheme[key] = convertIconStyle(internalDesignSettings.iconStyle);\n\n return;\n }\n\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = internalDesignSettings[key];\n });\n }\n\n if (internalParagraphFormat) {\n const { colorResult, themeResult } = getHeadlineColorSelector(internalParagraphFormat);\n\n // Update chayns-colors\n Object.keys(colorResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newColors[key] = colorResult[key];\n });\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = themeResult[key];\n });\n }\n\n newTheme.fontSize = getFontSize();\n\n setTheme(newTheme);\n setColors(newColors);\n }, [\n color,\n colorMode,\n internalColor,\n internalColorMode,\n internalDesignSettings,\n internalParagraphFormat,\n secondaryColor,\n ]);\n\n return (\n <ThemeProvider theme={theme}>\n <Helmet>\n <link\n rel=\"stylesheet\"\n href=\"https://api.chayns-static.space/font/NotoColorEmoji/v1/font.css\"\n />\n </Helmet>\n <div\n style={{ ...colors, ...cssVariables, ...style, color: 'var(--chayns-color--text)' }}\n >\n {children}\n </div>\n <GlobalStyle />\n </ThemeProvider>\n );\n};\n\nColorSchemeProvider.displayName = 'ColorSchemeProvider';\n\nexport default ColorSchemeProvider;\n"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,gBAAgB;AACxF,SAASC,OAAO,QAAQ,YAAY;AACpC,OAAOC,KAAK,IAAmBC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,mBAAmB;AACpE,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,qBAAqB;AAE3E,SAASC,gBAAgB,EAAEC,WAAW,EAAEC,wBAAwB,QAAQ,kBAAkB;AAAC,IAEtFC,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;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AAE,GAAGE,MAAM;MAAE,GAAGJ,YAAY;MAAE,GAAGE,KAAK;MAAEJ,KAAK,EAAE;IAA4B;EAAE,GAEnFD,QACA,CAAC,eACNf,KAAA,CAAAqD,aAAA,CAACzC,WAAW,MAAE,CACH,CAAC;AAExB,CAAC;AAEDC,mBAAmB,CAAC2C,WAAW,GAAG,qBAAqB;AAEvD,eAAe3C,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"ColorSchemeProvider.js","names":["getAvailableColorList","getColorFromPalette","hexToRgb255","useSite","React","useEffect","useState","Helmet","createGlobalStyle","ThemeProvider","getDesignSettings","getParagraphFormat","convertIconStyle","getFontSize","getHeadlineColorSelector","ColorMode","GlobalStyle","ColorSchemeProvider","_ref","children","color","colorMode","cssVariables","secondaryColor","siteId","style","designSettings","colors","setColors","theme","setTheme","internalDesignSettings","setInternalDesignSettings","internalParagraphFormat","setInternalParagraphFormat","internalColor","internalColorMode","then","result","availableColors","newColors","newTheme","forEach","colorName","hexColor","rgbColor","r","g","b","Light","Dark","Object","keys","key","iconStyle","colorResult","themeResult","fontSize","createElement","rel","href","displayName"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.tsx"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { useSite } from 'chayns-api';\nimport React, { FC, ReactNode, useEffect, useState } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { createGlobalStyle, ThemeProvider } from 'styled-components';\nimport { getDesignSettings, getParagraphFormat } from '../../api/theme/get';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\nimport { convertIconStyle, getFontSize, getHeadlineColorSelector } from '../../utils/font';\n\nenum ColorMode {\n Classic,\n Dark,\n Light,\n}\n\ntype ColorSchemeProviderProps = {\n /**\n * The content of the application or the components for which the styles should be set\n */\n children: ReactNode;\n /**\n * The hex color to be used for the children\n */\n color?: string;\n /**\n * The color mode to be used for the children\n */\n colorMode?: ColorMode;\n /**\n * Css variables to be added in addition to the chayns variables\n */\n cssVariables?: { [key: string]: string | number };\n /**\n * The design settings of a page.\n */\n designSettings?: DesignSettings;\n /**\n * The secondary hex color to be used for the children\n */\n secondaryColor?: string;\n /**\n * The site id of the page for which the design settings should be fetched\n */\n siteId?: string;\n /**\n * Additional styles set on the root element\n */\n style?: { [key: string]: string | number };\n};\n\nexport interface Theme {\n [key: string]: string;\n}\n\nexport type WithTheme<T> = T & {\n theme: Theme;\n};\n\n// ToDo remove type after the framer-motion bug is Fixed\nexport type FramerMotionBugFix = WithTheme<unknown>;\n\nconst GlobalStyle = createGlobalStyle`\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nconst ColorSchemeProvider: FC<ColorSchemeProviderProps> = ({\n children,\n color,\n colorMode,\n cssVariables = {},\n secondaryColor,\n siteId,\n style = {},\n designSettings,\n}) => {\n const [colors, setColors] = useState<Theme>({});\n const [theme, setTheme] = useState<Theme>({});\n const [internalDesignSettings, setInternalDesignSettings] = useState<DesignSettings>();\n const [internalParagraphFormat, setInternalParagraphFormat] = useState<ParagraphFormat[]>();\n\n // Empty object is used to prevent error if ColorSchemeProvider is rendered on server\n const { color: internalColor, colorMode: internalColorMode } = useSite() ?? {};\n\n useEffect(() => {\n if (designSettings) {\n setInternalDesignSettings(designSettings);\n\n return;\n }\n\n void getDesignSettings(siteId).then((result) => {\n setInternalDesignSettings(result);\n });\n\n void getParagraphFormat(siteId).then((result) => {\n setInternalParagraphFormat(result);\n });\n }, [designSettings, siteId]);\n\n useEffect(() => {\n const availableColors = getAvailableColorList();\n\n const newColors: Theme = {};\n const newTheme: Theme = {};\n\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color: color ?? internalColor,\n colorMode: colorMode ?? internalColorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n newColors[`--chayns-color--${colorName}`] = hexColor;\n newTheme[colorName] = hexColor;\n\n if (rgbColor) {\n newColors[`--chayns-color-rgb--${colorName}`] =\n `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n newTheme[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n\n switch (colorMode ?? internalColorMode) {\n case ColorMode.Light:\n newTheme.colorMode = 'light';\n break;\n case ColorMode.Dark:\n newTheme.colorMode = 'dark';\n break;\n default:\n newTheme.colorMode = 'classic';\n break;\n }\n\n if (internalDesignSettings) {\n Object.keys(internalDesignSettings).forEach((key) => {\n if (key === 'iconStyle') {\n newTheme[key] = convertIconStyle(internalDesignSettings.iconStyle);\n\n return;\n }\n\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = internalDesignSettings[key];\n });\n }\n\n if (internalParagraphFormat) {\n const { colorResult, themeResult } = getHeadlineColorSelector(internalParagraphFormat);\n\n // Update chayns-colors\n Object.keys(colorResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newColors[key] = colorResult[key];\n });\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = themeResult[key];\n });\n }\n\n newTheme.fontSize = getFontSize();\n\n setTheme(newTheme);\n setColors(newColors);\n }, [\n color,\n colorMode,\n internalColor,\n internalColorMode,\n internalDesignSettings,\n internalParagraphFormat,\n secondaryColor,\n ]);\n\n return (\n <ThemeProvider theme={theme}>\n <Helmet>\n <link\n rel=\"stylesheet\"\n href=\"https://api.chayns-static.space/font/NotoColorEmoji/v1/font.css\"\n />\n </Helmet>\n <div\n style={{ ...colors, ...cssVariables, ...style, color: 'var(--chayns-color--text)' }}\n >\n {children}\n </div>\n <GlobalStyle />\n </ThemeProvider>\n );\n};\n\nColorSchemeProvider.displayName = 'ColorSchemeProvider';\n\nexport default ColorSchemeProvider;\n"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,gBAAgB;AACxF,SAASC,OAAO,QAAQ,YAAY;AACpC,OAAOC,KAAK,IAAmBC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,mBAAmB;AACpE,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,qBAAqB;AAE3E,SAASC,gBAAgB,EAAEC,WAAW,EAAEC,wBAAwB,QAAQ,kBAAkB;AAAC,IAEtFC,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA,EAATA,SAAS,SAiDd;AAGA,MAAMC,WAAW,GAAGR,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMS,mBAAiD,GAAGC,IAAA,IASpD;EAAA,IATqD;IACvDC,QAAQ;IACRC,KAAK;IACLC,SAAS;IACTC,YAAY,GAAG,CAAC,CAAC;IACjBC,cAAc;IACdC,MAAM;IACNC,KAAK,GAAG,CAAC,CAAC;IACVC;EACJ,CAAC,GAAAR,IAAA;EACG,MAAM,CAACS,MAAM,EAAEC,SAAS,CAAC,GAAGtB,QAAQ,CAAQ,CAAC,CAAC,CAAC;EAC/C,MAAM,CAACuB,KAAK,EAAEC,QAAQ,CAAC,GAAGxB,QAAQ,CAAQ,CAAC,CAAC,CAAC;EAC7C,MAAM,CAACyB,sBAAsB,EAAEC,yBAAyB,CAAC,GAAG1B,QAAQ,CAAiB,CAAC;EACtF,MAAM,CAAC2B,uBAAuB,EAAEC,0BAA0B,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A;QACA;QACAZ,QAAQ,CAACY,GAAG,CAAC,GAAGG,WAAW,CAACH,GAAG,CAAC;MACpC,CAAC,CAAC;IACN;IAEAZ,QAAQ,CAACgB,QAAQ,GAAG5C,WAAW,CAAC,CAAC;IAEjCiB,QAAQ,CAACW,QAAQ,CAAC;IAClBb,SAAS,CAACY,SAAS,CAAC;EACxB,CAAC,EAAE,CACCpB,KAAK,EACLC,SAAS,EACTc,aAAa,EACbC,iBAAiB,EACjBL,sBAAsB,EACtBE,uBAAuB,EACvBV,cAAc,CACjB,CAAC;EAEF,oBACInB,KAAA,CAAAsD,aAAA,CAACjD,aAAa;IAACoB,KAAK,EAAEA;EAAM,gBACxBzB,KAAA,CAAAsD,aAAA,CAACnD,MAAM,qBACHH,KAAA,CAAAsD,aAAA;IACIC,GAAG,EAAC,YAAY;IAChBC,IAAI,EAAC;EAAiE,CACzE,CACG,CAAC,eACTxD,KAAA,CAAAsD,aAAA;IACIjC,KAAK,EAAE;MAAE,GAAGE,MAAM;MAAE,GAAGL,YAAY;MAAE,GAAGG,KAAK;MAAEL,KAAK,EAAE;IAA4B;EAAE,GAEnFD,QACA,CAAC,eACNf,KAAA,CAAAsD,aAAA,CAAC1C,WAAW,MAAE,CACH,CAAC;AAExB,CAAC;AAEDC,mBAAmB,CAAC4C,WAAW,GAAG,qBAAqB;AAEvD,eAAe5C,mBAAmB","ignoreList":[]}
@@ -1,3 +1,3 @@
1
1
  import type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';
2
- export declare const getDesignSettings: () => Promise<DesignSettings | undefined>;
3
- export declare const getParagraphFormat: () => Promise<ParagraphFormat[] | undefined>;
2
+ export declare const getDesignSettings: (siteId?: string) => Promise<DesignSettings | undefined>;
3
+ export declare const getParagraphFormat: (siteId?: string) => Promise<ParagraphFormat[] | undefined>;
@@ -7,7 +7,6 @@ type StyledMotionAccordionBodyProps = WithTheme<{
7
7
  export declare const StyledMotionAccordionBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
8
8
  slot?: string | undefined;
9
9
  title?: string | undefined;
10
- id?: string | undefined;
11
10
  color?: string | undefined;
12
11
  rel?: string | undefined;
13
12
  defaultChecked?: boolean | undefined;
@@ -22,6 +21,7 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
22
21
  dir?: string | undefined;
23
22
  draggable?: (boolean | "false" | "true") | undefined;
24
23
  hidden?: boolean | undefined;
24
+ id?: string | undefined;
25
25
  lang?: string | undefined;
26
26
  nonce?: string | undefined;
27
27
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -3,7 +3,6 @@ import type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider'
3
3
  export declare const StyledMotionAccordionHead: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
4
4
  slot?: string | undefined;
5
5
  title?: string | undefined;
6
- id?: string | undefined;
7
6
  color?: string | undefined;
8
7
  rel?: string | undefined;
9
8
  defaultChecked?: boolean | undefined;
@@ -18,6 +17,7 @@ export declare const StyledMotionAccordionHead: import("styled-components/dist/t
18
17
  dir?: string | undefined;
19
18
  draggable?: (boolean | "false" | "true") | undefined;
20
19
  hidden?: boolean | undefined;
20
+ id?: string | undefined;
21
21
  lang?: string | undefined;
22
22
  nonce?: string | undefined;
23
23
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -268,7 +268,6 @@ export declare const StyledMotionAccordionHead: import("styled-components/dist/t
268
268
  export declare const StyledMotionIconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
269
269
  slot?: string | undefined;
270
270
  title?: string | undefined;
271
- id?: string | undefined;
272
271
  color?: string | undefined;
273
272
  rel?: string | undefined;
274
273
  defaultChecked?: boolean | undefined;
@@ -283,6 +282,7 @@ export declare const StyledMotionIconWrapper: import("styled-components/dist/typ
283
282
  dir?: string | undefined;
284
283
  draggable?: (boolean | "false" | "true") | undefined;
285
284
  hidden?: boolean | undefined;
285
+ id?: string | undefined;
286
286
  lang?: string | undefined;
287
287
  nonce?: string | undefined;
288
288
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -537,7 +537,6 @@ export declare const StyledAccordionIcon: import("styled-components/dist/types")
537
537
  export declare const StyledMotionContentWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
538
538
  slot?: string | undefined;
539
539
  title?: string | undefined;
540
- id?: string | undefined;
541
540
  color?: string | undefined;
542
541
  rel?: string | undefined;
543
542
  defaultChecked?: boolean | undefined;
@@ -552,6 +551,7 @@ export declare const StyledMotionContentWrapper: import("styled-components/dist/
552
551
  dir?: string | undefined;
553
552
  draggable?: (boolean | "false" | "true") | undefined;
554
553
  hidden?: boolean | undefined;
554
+ id?: string | undefined;
555
555
  lang?: string | undefined;
556
556
  nonce?: string | undefined;
557
557
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -802,7 +802,6 @@ export declare const StyledMotionContentWrapper: import("styled-components/dist/
802
802
  export declare const StyledMotionTitleWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
803
803
  slot?: string | undefined;
804
804
  title?: string | undefined;
805
- id?: string | undefined;
806
805
  color?: string | undefined;
807
806
  rel?: string | undefined;
808
807
  defaultChecked?: boolean | undefined;
@@ -817,6 +816,7 @@ export declare const StyledMotionTitleWrapper: import("styled-components/dist/ty
817
816
  dir?: string | undefined;
818
817
  draggable?: (boolean | "false" | "true") | undefined;
819
818
  hidden?: boolean | undefined;
819
+ id?: string | undefined;
820
820
  lang?: string | undefined;
821
821
  nonce?: string | undefined;
822
822
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1072,7 +1072,6 @@ interface StyledMotionTitleProps {
1072
1072
  export declare const StyledMotionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
1073
1073
  slot?: string | undefined;
1074
1074
  title?: string | undefined;
1075
- id?: string | undefined;
1076
1075
  color?: string | undefined;
1077
1076
  rel?: string | undefined;
1078
1077
  defaultChecked?: boolean | undefined;
@@ -1087,6 +1086,7 @@ export declare const StyledMotionTitle: import("styled-components/dist/types").I
1087
1086
  dir?: string | undefined;
1088
1087
  draggable?: (boolean | "false" | "true") | undefined;
1089
1088
  hidden?: boolean | undefined;
1089
+ id?: string | undefined;
1090
1090
  lang?: string | undefined;
1091
1091
  nonce?: string | undefined;
1092
1092
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1335,7 +1335,6 @@ export declare const StyledMotionTitle: import("styled-components/dist/types").I
1335
1335
  export declare const StyledMotionTitleElementWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
1336
1336
  slot?: string | undefined;
1337
1337
  title?: string | undefined;
1338
- id?: string | undefined;
1339
1338
  color?: string | undefined;
1340
1339
  rel?: string | undefined;
1341
1340
  defaultChecked?: boolean | undefined;
@@ -1350,6 +1349,7 @@ export declare const StyledMotionTitleElementWrapper: import("styled-components/
1350
1349
  dir?: string | undefined;
1351
1350
  draggable?: (boolean | "false" | "true") | undefined;
1352
1351
  hidden?: boolean | undefined;
1352
+ id?: string | undefined;
1353
1353
  lang?: string | undefined;
1354
1354
  nonce?: string | undefined;
1355
1355
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1601,7 +1601,6 @@ export declare const StyledRightWrapper: import("styled-components/dist/types").
1601
1601
  export declare const StyledMotionSearchWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
1602
1602
  slot?: string | undefined;
1603
1603
  title?: string | undefined;
1604
- id?: string | undefined;
1605
1604
  color?: string | undefined;
1606
1605
  rel?: string | undefined;
1607
1606
  defaultChecked?: boolean | undefined;
@@ -1616,6 +1615,7 @@ export declare const StyledMotionSearchWrapper: import("styled-components/dist/t
1616
1615
  dir?: string | undefined;
1617
1616
  draggable?: (boolean | "false" | "true") | undefined;
1618
1617
  hidden?: boolean | undefined;
1618
+ id?: string | undefined;
1619
1619
  lang?: string | undefined;
1620
1620
  nonce?: string | undefined;
1621
1621
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1866,7 +1866,6 @@ export declare const StyledMotionSearchWrapper: import("styled-components/dist/t
1866
1866
  export declare const StyledMotionRightElementWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
1867
1867
  slot?: string | undefined;
1868
1868
  title?: string | undefined;
1869
- id?: string | undefined;
1870
1869
  color?: string | undefined;
1871
1870
  rel?: string | undefined;
1872
1871
  defaultChecked?: boolean | undefined;
@@ -1881,6 +1880,7 @@ export declare const StyledMotionRightElementWrapper: import("styled-components/
1881
1880
  dir?: string | undefined;
1882
1881
  draggable?: (boolean | "false" | "true") | undefined;
1883
1882
  hidden?: boolean | undefined;
1883
+ id?: string | undefined;
1884
1884
  lang?: string | undefined;
1885
1885
  nonce?: string | undefined;
1886
1886
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -2138,7 +2138,6 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
2138
2138
  pattern?: string | undefined;
2139
2139
  value?: string | number | readonly string[] | undefined;
2140
2140
  size?: number | undefined;
2141
- id?: string | undefined;
2142
2141
  color?: string | undefined;
2143
2142
  type?: import("react").HTMLInputTypeAttribute | undefined;
2144
2143
  rel?: string | undefined;
@@ -2154,6 +2153,7 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
2154
2153
  dir?: string | undefined;
2155
2154
  draggable?: (boolean | "false" | "true") | undefined;
2156
2155
  hidden?: boolean | undefined;
2156
+ id?: string | undefined;
2157
2157
  lang?: string | undefined;
2158
2158
  nonce?: string | undefined;
2159
2159
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -2428,7 +2428,6 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
2428
2428
  export declare const StyledMotionRightInputIconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
2429
2429
  slot?: string | undefined;
2430
2430
  title?: string | undefined;
2431
- id?: string | undefined;
2432
2431
  color?: string | undefined;
2433
2432
  rel?: string | undefined;
2434
2433
  defaultChecked?: boolean | undefined;
@@ -2443,6 +2442,7 @@ export declare const StyledMotionRightInputIconWrapper: import("styled-component
2443
2442
  dir?: string | undefined;
2444
2443
  draggable?: (boolean | "false" | "true") | undefined;
2445
2444
  hidden?: boolean | undefined;
2445
+ id?: string | undefined;
2446
2446
  lang?: string | undefined;
2447
2447
  nonce?: string | undefined;
2448
2448
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -24,7 +24,6 @@ export declare const StyledMotionAmountControlButton: import("styled-components/
24
24
  slot?: string | undefined;
25
25
  title?: string | undefined;
26
26
  value?: string | number | readonly string[] | undefined;
27
- id?: string | undefined;
28
27
  color?: string | undefined;
29
28
  type?: "button" | "reset" | "submit" | undefined;
30
29
  rel?: string | undefined;
@@ -40,6 +39,7 @@ export declare const StyledMotionAmountControlButton: import("styled-components/
40
39
  dir?: string | undefined;
41
40
  draggable?: (boolean | "false" | "true") | undefined;
42
41
  hidden?: boolean | undefined;
42
+ id?: string | undefined;
43
43
  lang?: string | undefined;
44
44
  nonce?: string | undefined;
45
45
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -12,7 +12,6 @@ export declare const StyledMotionButton: import("styled-components/dist/types").
12
12
  slot?: string | undefined;
13
13
  title?: string | undefined;
14
14
  value?: string | number | readonly string[] | undefined;
15
- id?: string | undefined;
16
15
  color?: string | undefined;
17
16
  type?: "button" | "reset" | "submit" | undefined;
18
17
  rel?: string | undefined;
@@ -28,6 +27,7 @@ export declare const StyledMotionButton: import("styled-components/dist/types").
28
27
  dir?: string | undefined;
29
28
  draggable?: (boolean | "false" | "true") | undefined;
30
29
  hidden?: boolean | undefined;
30
+ id?: string | undefined;
31
31
  lang?: string | undefined;
32
32
  nonce?: string | undefined;
33
33
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -284,7 +284,6 @@ export declare const StyledIconWrapper: import("styled-components/dist/types").I
284
284
  export declare const StyledMotionChildrenWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
285
285
  slot?: string | undefined;
286
286
  title?: string | undefined;
287
- id?: string | undefined;
288
287
  color?: string | undefined;
289
288
  rel?: string | undefined;
290
289
  defaultChecked?: boolean | undefined;
@@ -299,6 +298,7 @@ export declare const StyledMotionChildrenWrapper: import("styled-components/dist
299
298
  dir?: string | undefined;
300
299
  draggable?: (boolean | "false" | "true") | undefined;
301
300
  hidden?: boolean | undefined;
301
+ id?: string | undefined;
302
302
  lang?: string | undefined;
303
303
  nonce?: string | undefined;
304
304
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -549,7 +549,6 @@ export declare const StyledMotionChildrenWrapper: import("styled-components/dist
549
549
  export declare const StyledMotionWaitCursorWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
550
550
  slot?: string | undefined;
551
551
  title?: string | undefined;
552
- id?: string | undefined;
553
552
  color?: string | undefined;
554
553
  rel?: string | undefined;
555
554
  defaultChecked?: boolean | undefined;
@@ -564,6 +563,7 @@ export declare const StyledMotionWaitCursorWrapper: import("styled-components/di
564
563
  dir?: string | undefined;
565
564
  draggable?: (boolean | "false" | "true") | undefined;
566
565
  hidden?: boolean | undefined;
566
+ id?: string | undefined;
567
567
  lang?: string | undefined;
568
568
  nonce?: string | undefined;
569
569
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -32,6 +32,10 @@ type ColorSchemeProviderProps = {
32
32
  * The secondary hex color to be used for the children
33
33
  */
34
34
  secondaryColor?: string;
35
+ /**
36
+ * The site id of the page for which the design settings should be fetched
37
+ */
38
+ siteId?: string;
35
39
  /**
36
40
  * Additional styles set on the root element
37
41
  */
@@ -31,7 +31,6 @@ type StyledComboBoxBodyProps = WithTheme<{
31
31
  export declare const StyledMotionComboBoxBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
32
32
  slot?: string | undefined;
33
33
  title?: string | undefined;
34
- id?: string | undefined;
35
34
  color?: string | undefined;
36
35
  rel?: string | undefined;
37
36
  defaultChecked?: boolean | undefined;
@@ -46,6 +45,7 @@ export declare const StyledMotionComboBoxBody: import("styled-components/dist/ty
46
45
  dir?: string | undefined;
47
46
  draggable?: (boolean | "false" | "true") | undefined;
48
47
  hidden?: boolean | undefined;
48
+ id?: string | undefined;
49
49
  lang?: string | undefined;
50
50
  nonce?: string | undefined;
51
51
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -6,7 +6,6 @@ type StyledMotionContextMenuContentProps = WithTheme<{
6
6
  export declare const StyledMotionContextMenuContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
7
7
  slot?: string | undefined;
8
8
  title?: string | undefined;
9
- id?: string | undefined;
10
9
  color?: string | undefined;
11
10
  rel?: string | undefined;
12
11
  defaultChecked?: boolean | undefined;
@@ -21,6 +20,7 @@ export declare const StyledMotionContextMenuContent: import("styled-components/d
21
20
  dir?: string | undefined;
22
21
  draggable?: (boolean | "false" | "true") | undefined;
23
22
  hidden?: boolean | undefined;
23
+ id?: string | undefined;
24
24
  lang?: string | undefined;
25
25
  nonce?: string | undefined;
26
26
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1,7 +1,6 @@
1
1
  export declare const StyledMotionExpandableContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<{
2
2
  slot?: string | undefined;
3
3
  title?: string | undefined;
4
- id?: string | undefined;
5
4
  color?: string | undefined;
6
5
  rel?: string | undefined;
7
6
  defaultChecked?: boolean | undefined;
@@ -16,6 +15,7 @@ export declare const StyledMotionExpandableContent: import("styled-components/di
16
15
  dir?: string | undefined;
17
16
  draggable?: (boolean | "false" | "true") | undefined;
18
17
  hidden?: boolean | undefined;
18
+ id?: string | undefined;
19
19
  lang?: string | undefined;
20
20
  nonce?: string | undefined;
21
21
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -18,7 +18,6 @@ export declare const StyledFileInputText: import("styled-components/dist/types")
18
18
  export declare const StyledMotionFileInputList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
19
19
  slot?: string | undefined;
20
20
  title?: string | undefined;
21
- id?: string | undefined;
22
21
  color?: string | undefined;
23
22
  rel?: string | undefined;
24
23
  defaultChecked?: boolean | undefined;
@@ -33,6 +32,7 @@ export declare const StyledMotionFileInputList: import("styled-components/dist/t
33
32
  dir?: string | undefined;
34
33
  draggable?: (boolean | "false" | "true") | undefined;
35
34
  hidden?: boolean | undefined;
35
+ id?: string | undefined;
36
36
  lang?: string | undefined;
37
37
  nonce?: string | undefined;
38
38
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -27,7 +27,6 @@ type StyledFilterButtonItemBackgroundProps = WithTheme<{
27
27
  export declare const StyledMotionFilterButtonItemBackground: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
28
28
  slot?: string | undefined;
29
29
  title?: string | undefined;
30
- id?: string | undefined;
31
30
  color?: string | undefined;
32
31
  rel?: string | undefined;
33
32
  defaultChecked?: boolean | undefined;
@@ -42,6 +41,7 @@ export declare const StyledMotionFilterButtonItemBackground: import("styled-comp
42
41
  dir?: string | undefined;
43
42
  draggable?: (boolean | "false" | "true") | undefined;
44
43
  hidden?: boolean | undefined;
44
+ id?: string | undefined;
45
45
  lang?: string | undefined;
46
46
  nonce?: string | undefined;
47
47
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -26,7 +26,6 @@ export declare const StyledMotionInputLabelWrapper: import("styled-components/di
26
26
  form?: string | undefined;
27
27
  slot?: string | undefined;
28
28
  title?: string | undefined;
29
- id?: string | undefined;
30
29
  color?: string | undefined;
31
30
  rel?: string | undefined;
32
31
  defaultChecked?: boolean | undefined;
@@ -41,6 +40,7 @@ export declare const StyledMotionInputLabelWrapper: import("styled-components/di
41
40
  dir?: string | undefined;
42
41
  draggable?: (boolean | "false" | "true") | undefined;
43
42
  hidden?: boolean | undefined;
43
+ id?: string | undefined;
44
44
  lang?: string | undefined;
45
45
  nonce?: string | undefined;
46
46
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -290,7 +290,6 @@ export declare const StyledMotionInputLabelWrapper: import("styled-components/di
290
290
  export declare const StyledMotionInputElement: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<{
291
291
  slot?: string | undefined;
292
292
  title?: string | undefined;
293
- id?: string | undefined;
294
293
  color?: string | undefined;
295
294
  rel?: string | undefined;
296
295
  defaultChecked?: boolean | undefined;
@@ -305,6 +304,7 @@ export declare const StyledMotionInputElement: import("styled-components/dist/ty
305
304
  dir?: string | undefined;
306
305
  draggable?: (boolean | "false" | "true") | undefined;
307
306
  hidden?: boolean | undefined;
307
+ id?: string | undefined;
308
308
  lang?: string | undefined;
309
309
  nonce?: string | undefined;
310
310
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -561,7 +561,6 @@ type StyledMotionInputClearIconProps = WithTheme<{
561
561
  export declare const StyledMotionInputClearIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
562
562
  slot?: string | undefined;
563
563
  title?: string | undefined;
564
- id?: string | undefined;
565
564
  color?: string | undefined;
566
565
  rel?: string | undefined;
567
566
  defaultChecked?: boolean | undefined;
@@ -576,6 +575,7 @@ export declare const StyledMotionInputClearIcon: import("styled-components/dist/
576
575
  dir?: string | undefined;
577
576
  draggable?: (boolean | "false" | "true") | undefined;
578
577
  hidden?: boolean | undefined;
578
+ id?: string | undefined;
579
579
  lang?: string | undefined;
580
580
  nonce?: string | undefined;
581
581
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -7,7 +7,6 @@ type StyledListItemProps = WithTheme<{
7
7
  export declare const StyledMotionListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
8
8
  slot?: string | undefined;
9
9
  title?: string | undefined;
10
- id?: string | undefined;
11
10
  color?: string | undefined;
12
11
  rel?: string | undefined;
13
12
  defaultChecked?: boolean | undefined;
@@ -22,6 +21,7 @@ export declare const StyledMotionListItem: import("styled-components/dist/types"
22
21
  dir?: string | undefined;
23
22
  draggable?: (boolean | "false" | "true") | undefined;
24
23
  hidden?: boolean | undefined;
24
+ id?: string | undefined;
25
25
  lang?: string | undefined;
26
26
  nonce?: string | undefined;
27
27
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1,7 +1,6 @@
1
1
  export declare const StyledMotionListItemBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
2
2
  slot?: string | undefined;
3
3
  title?: string | undefined;
4
- id?: string | undefined;
5
4
  color?: string | undefined;
6
5
  rel?: string | undefined;
7
6
  defaultChecked?: boolean | undefined;
@@ -16,6 +15,7 @@ export declare const StyledMotionListItemBody: import("styled-components/dist/ty
16
15
  dir?: string | undefined;
17
16
  draggable?: (boolean | "false" | "true") | undefined;
18
17
  hidden?: boolean | undefined;
18
+ id?: string | undefined;
19
19
  lang?: string | undefined;
20
20
  nonce?: string | undefined;
21
21
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -6,7 +6,6 @@ type StyledListItemHeadProps = WithTheme<{
6
6
  export declare const StyledListItemHead: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
7
7
  slot?: string | undefined;
8
8
  title?: string | undefined;
9
- id?: string | undefined;
10
9
  color?: string | undefined;
11
10
  rel?: string | undefined;
12
11
  defaultChecked?: boolean | undefined;
@@ -21,6 +20,7 @@ export declare const StyledListItemHead: import("styled-components/dist/types").
21
20
  dir?: string | undefined;
22
21
  draggable?: (boolean | "false" | "true") | undefined;
23
22
  hidden?: boolean | undefined;
23
+ id?: string | undefined;
24
24
  lang?: string | undefined;
25
25
  nonce?: string | undefined;
26
26
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -270,7 +270,6 @@ export declare const StyledListItemHeadLeftWrapper: import("styled-components/di
270
270
  export declare const StyledMotionListItemHeadIndicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
271
271
  slot?: string | undefined;
272
272
  title?: string | undefined;
273
- id?: string | undefined;
274
273
  color?: string | undefined;
275
274
  rel?: string | undefined;
276
275
  defaultChecked?: boolean | undefined;
@@ -285,6 +284,7 @@ export declare const StyledMotionListItemHeadIndicator: import("styled-component
285
284
  dir?: string | undefined;
286
285
  draggable?: (boolean | "false" | "true") | undefined;
287
286
  hidden?: boolean | undefined;
287
+ id?: string | undefined;
288
288
  lang?: string | undefined;
289
289
  nonce?: string | undefined;
290
290
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -547,7 +547,6 @@ type StyledListItemHeadTitleTextProps = WithTheme<{
547
547
  export declare const StyledListItemHeadTitleText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
548
548
  slot?: string | undefined;
549
549
  title?: string | undefined;
550
- id?: string | undefined;
551
550
  color?: string | undefined;
552
551
  rel?: string | undefined;
553
552
  defaultChecked?: boolean | undefined;
@@ -562,6 +561,7 @@ export declare const StyledListItemHeadTitleText: import("styled-components/dist
562
561
  dir?: string | undefined;
563
562
  draggable?: (boolean | "false" | "true") | undefined;
564
563
  hidden?: boolean | undefined;
564
+ id?: string | undefined;
565
565
  lang?: string | undefined;
566
566
  nonce?: string | undefined;
567
567
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -826,7 +826,6 @@ export declare const StyledListItemHeadRightElement: import("styled-components/d
826
826
  export declare const StyledMotionListItemHeadHoverItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
827
827
  slot?: string | undefined;
828
828
  title?: string | undefined;
829
- id?: string | undefined;
830
829
  color?: string | undefined;
831
830
  rel?: string | undefined;
832
831
  defaultChecked?: boolean | undefined;
@@ -841,6 +840,7 @@ export declare const StyledMotionListItemHeadHoverItem: import("styled-component
841
840
  dir?: string | undefined;
842
841
  draggable?: (boolean | "false" | "true") | undefined;
843
842
  hidden?: boolean | undefined;
843
+ id?: string | undefined;
844
844
  lang?: string | undefined;
845
845
  nonce?: string | undefined;
846
846
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -7,7 +7,6 @@ type StyledMentionFinderPopupProps = WithTheme<{
7
7
  export declare const StyledMotionMentionFinderPopup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
8
8
  slot?: string | undefined;
9
9
  title?: string | undefined;
10
- id?: string | undefined;
11
10
  color?: string | undefined;
12
11
  rel?: string | undefined;
13
12
  defaultChecked?: boolean | undefined;
@@ -22,6 +21,7 @@ export declare const StyledMotionMentionFinderPopup: import("styled-components/d
22
21
  dir?: string | undefined;
23
22
  draggable?: (boolean | "false" | "true") | undefined;
24
23
  hidden?: boolean | undefined;
24
+ id?: string | undefined;
25
25
  lang?: string | undefined;
26
26
  nonce?: string | undefined;
27
27
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -9,7 +9,6 @@ type StyledMotionPopupContentWrapperProps = WithTheme<{
9
9
  export declare const StyledMotionPopupContentWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
10
10
  slot?: string | undefined;
11
11
  title?: string | undefined;
12
- id?: string | undefined;
13
12
  color?: string | undefined;
14
13
  rel?: string | undefined;
15
14
  defaultChecked?: boolean | undefined;
@@ -24,6 +23,7 @@ export declare const StyledMotionPopupContentWrapper: import("styled-components/
24
23
  dir?: string | undefined;
25
24
  draggable?: (boolean | "false" | "true") | undefined;
26
25
  hidden?: boolean | undefined;
26
+ id?: string | undefined;
27
27
  lang?: string | undefined;
28
28
  nonce?: string | undefined;
29
29
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -6,7 +6,6 @@ export declare const StyledProgressBarProgressWrapper: import("styled-components
6
6
  export declare const StyledMotionProgressBarProgress: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
7
7
  slot?: string | undefined;
8
8
  title?: string | undefined;
9
- id?: string | undefined;
10
9
  color?: string | undefined;
11
10
  rel?: string | undefined;
12
11
  defaultChecked?: boolean | undefined;
@@ -21,6 +20,7 @@ export declare const StyledMotionProgressBarProgress: import("styled-components/
21
20
  dir?: string | undefined;
22
21
  draggable?: (boolean | "false" | "true") | undefined;
23
22
  hidden?: boolean | undefined;
23
+ id?: string | undefined;
24
24
  lang?: string | undefined;
25
25
  nonce?: string | undefined;
26
26
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -28,7 +28,6 @@ export declare const StyledRadioButtonLabel: import("styled-components/dist/type
28
28
  export declare const StyledMotionRadioButtonChildren: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
29
29
  slot?: string | undefined;
30
30
  title?: string | undefined;
31
- id?: string | undefined;
32
31
  color?: string | undefined;
33
32
  rel?: string | undefined;
34
33
  defaultChecked?: boolean | undefined;
@@ -43,6 +42,7 @@ export declare const StyledMotionRadioButtonChildren: import("styled-components/
43
42
  dir?: string | undefined;
44
43
  draggable?: (boolean | "false" | "true") | undefined;
45
44
  hidden?: boolean | undefined;
45
+ id?: string | undefined;
46
46
  lang?: string | undefined;
47
47
  nonce?: string | undefined;
48
48
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -9,7 +9,6 @@ type StyledMotionSearchBoxBodyProps = WithTheme<{
9
9
  export declare const StyledMotionSearchBoxBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
10
10
  slot?: string | undefined;
11
11
  title?: string | undefined;
12
- id?: string | undefined;
13
12
  color?: string | undefined;
14
13
  rel?: string | undefined;
15
14
  defaultChecked?: boolean | undefined;
@@ -24,6 +23,7 @@ export declare const StyledMotionSearchBoxBody: import("styled-components/dist/t
24
23
  dir?: string | undefined;
25
24
  draggable?: (boolean | "false" | "true") | undefined;
26
25
  hidden?: boolean | undefined;
26
+ id?: string | undefined;
27
27
  lang?: string | undefined;
28
28
  nonce?: string | undefined;
29
29
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -6,7 +6,6 @@ type StyledMotionSearchBoxBodyProps = WithTheme<{
6
6
  export declare const StyledMotionSearchBoxBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
7
7
  slot?: string | undefined;
8
8
  title?: string | undefined;
9
- id?: string | undefined;
10
9
  color?: string | undefined;
11
10
  rel?: string | undefined;
12
11
  defaultChecked?: boolean | undefined;
@@ -21,6 +20,7 @@ export declare const StyledMotionSearchBoxBody: import("styled-components/dist/t
21
20
  dir?: string | undefined;
22
21
  draggable?: (boolean | "false" | "true") | undefined;
23
22
  hidden?: boolean | undefined;
23
+ id?: string | undefined;
24
24
  lang?: string | undefined;
25
25
  nonce?: string | undefined;
26
26
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -6,7 +6,6 @@ export declare const StyledSearchInput: import("styled-components/dist/types").I
6
6
  export declare const StyledMotionSearchInputContentWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
7
7
  slot?: string | undefined;
8
8
  title?: string | undefined;
9
- id?: string | undefined;
10
9
  color?: string | undefined;
11
10
  rel?: string | undefined;
12
11
  defaultChecked?: boolean | undefined;
@@ -21,6 +20,7 @@ export declare const StyledMotionSearchInputContentWrapper: import("styled-compo
21
20
  dir?: string | undefined;
22
21
  draggable?: (boolean | "false" | "true") | undefined;
23
22
  hidden?: boolean | undefined;
23
+ id?: string | undefined;
24
24
  lang?: string | undefined;
25
25
  nonce?: string | undefined;
26
26
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -272,7 +272,6 @@ export declare const StyledMotionSearchInputIconWrapper: import("styled-componen
272
272
  export declare const StyledMotionSearchInputIconWrapperContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
273
273
  slot?: string | undefined;
274
274
  title?: string | undefined;
275
- id?: string | undefined;
276
275
  color?: string | undefined;
277
276
  rel?: string | undefined;
278
277
  defaultChecked?: boolean | undefined;
@@ -287,6 +286,7 @@ export declare const StyledMotionSearchInputIconWrapperContent: import("styled-c
287
286
  dir?: string | undefined;
288
287
  draggable?: (boolean | "false" | "true") | undefined;
289
288
  hidden?: boolean | undefined;
289
+ id?: string | undefined;
290
290
  lang?: string | undefined;
291
291
  nonce?: string | undefined;
292
292
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -14,7 +14,6 @@ export declare const StyledSliderInput: import("styled-components/dist/types").I
14
14
  pattern?: string | undefined;
15
15
  value?: string | number | readonly string[] | undefined;
16
16
  size?: number | undefined;
17
- id?: string | undefined;
18
17
  color?: string | undefined;
19
18
  type?: import("react").HTMLInputTypeAttribute | undefined;
20
19
  rel?: string | undefined;
@@ -30,6 +29,7 @@ export declare const StyledSliderInput: import("styled-components/dist/types").I
30
29
  dir?: string | undefined;
31
30
  draggable?: (boolean | "false" | "true") | undefined;
32
31
  hidden?: boolean | undefined;
32
+ id?: string | undefined;
33
33
  lang?: string | undefined;
34
34
  nonce?: string | undefined;
35
35
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -307,7 +307,6 @@ export declare const StyledSliderInput: import("styled-components/dist/types").I
307
307
  pattern?: string | undefined;
308
308
  value?: string | number | readonly string[] | undefined;
309
309
  size?: number | undefined;
310
- id?: string | undefined;
311
310
  color?: string | undefined;
312
311
  type?: import("react").HTMLInputTypeAttribute | undefined;
313
312
  rel?: string | undefined;
@@ -323,6 +322,7 @@ export declare const StyledSliderInput: import("styled-components/dist/types").I
323
322
  dir?: string | undefined;
324
323
  draggable?: (boolean | "false" | "true") | undefined;
325
324
  hidden?: boolean | undefined;
325
+ id?: string | undefined;
326
326
  lang?: string | undefined;
327
327
  nonce?: string | undefined;
328
328
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -20,7 +20,6 @@ type StyledMotionSliderButtonThumbProps = WithTheme<{
20
20
  export declare const StyledMotionSliderButtonThumb: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
21
21
  slot?: string | undefined;
22
22
  title?: string | undefined;
23
- id?: string | undefined;
24
23
  color?: string | undefined;
25
24
  rel?: string | undefined;
26
25
  defaultChecked?: boolean | undefined;
@@ -35,6 +34,7 @@ export declare const StyledMotionSliderButtonThumb: import("styled-components/di
35
34
  dir?: string | undefined;
36
35
  draggable?: (boolean | "false" | "true") | undefined;
37
36
  hidden?: boolean | undefined;
37
+ id?: string | undefined;
38
38
  lang?: string | undefined;
39
39
  nonce?: string | undefined;
40
40
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -4,7 +4,6 @@ export declare const StyledTruncation: import("styled-components/dist/types").IS
4
4
  export declare const StyledMotionTruncationContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
5
5
  slot?: string | undefined;
6
6
  title?: string | undefined;
7
- id?: string | undefined;
8
7
  color?: string | undefined;
9
8
  rel?: string | undefined;
10
9
  defaultChecked?: boolean | undefined;
@@ -19,6 +18,7 @@ export declare const StyledMotionTruncationContent: import("styled-components/di
19
18
  dir?: string | undefined;
20
19
  draggable?: (boolean | "false" | "true") | undefined;
21
20
  hidden?: boolean | undefined;
21
+ id?: string | undefined;
22
22
  lang?: string | undefined;
23
23
  nonce?: string | undefined;
24
24
  spellCheck?: (boolean | "false" | "true") | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.0-beta.728",
3
+ "version": "5.0.0-beta.730",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "58c0c739fb7b5d9bae33dd2a5d0eb8d78493ce95"
88
+ "gitHead": "dcf28d137c4010b813a82af90b35d24d6be710fb"
89
89
  }