@liner-fe/design-token-rn 1.1.12 → 1.2.1

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,9 +1,14 @@
1
1
  import { vars } from '../generated/vars';
2
- export type Theme = 'dark' | 'light' | 'sys';
3
- export declare const useSetTheme: () => {
4
- setTheme: (theme: Theme) => void;
5
- };
6
2
  export type ColorType = typeof vars.color.light;
3
+ export type EffectiveAppearance = 'dark' | 'light';
4
+ export type AppAppearance = EffectiveAppearance | 'sys';
5
+ export type SystemAppearance = EffectiveAppearance | 'notDetermined';
6
+ export declare const useAppearance: () => {
7
+ appAppearance: AppAppearance;
8
+ systemAppearance: SystemAppearance;
9
+ setAppAppearance: import("recoil").SetterOrUpdater<AppAppearance>;
10
+ setSystemAppearance: import("recoil").SetterOrUpdater<SystemAppearance>;
11
+ };
7
12
  export declare const useColor: <T>(StyleSheetFunction: (color: ColorType) => T) => {
8
13
  styles: T;
9
14
  color: ColorType;
@@ -3,5 +3,5 @@ export declare const useDarkTheme: () => {
3
3
  /**
4
4
  * darkMode를 구분하고 싶다면 theme말고 isDarkTheme를 사용해주세요.
5
5
  */
6
- theme: import("..").Theme;
6
+ theme: import("..").AppAppearance;
7
7
  };
package/lib/index.cjs CHANGED
@@ -22,9 +22,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
22
  var index_exports = {};
23
23
  __export(index_exports, {
24
24
  MMKV_KEY: () => MMKV_KEY,
25
+ useAppearance: () => useAppearance,
25
26
  useColor: () => useColor,
26
27
  useDarkTheme: () => useDarkTheme,
27
- useSetTheme: () => useSetTheme,
28
28
  vars: () => vars
29
29
  });
30
30
  module.exports = __toCommonJS(index_exports);
@@ -34,47 +34,56 @@ var vars = { "color": { "light": { "neutral-container-lowest": "#ffffff", "neutr
34
34
 
35
35
  // src/color/index.ts
36
36
  var import_recoil2 = require("recoil");
37
- var import_react_native = require("react-native");
38
37
 
39
38
  // src/store/theme.ts
40
39
  var import_recoil = require("recoil");
41
- var themeAtoms = (0, import_recoil.atom)({
40
+ var appAppearanceAtom = (0, import_recoil.atom)({
42
41
  key: "themeAtoms",
43
42
  default: "sys"
44
43
  });
44
+ var systemAppearanceAtom = (0, import_recoil.atom)({
45
+ key: "systemThemeAtoms",
46
+ default: "notDetermined"
47
+ });
45
48
 
46
49
  // src/color/index.ts
47
- var useSetTheme = /* @__PURE__ */ __name(() => {
48
- const setThemeRecoilState = (0, import_recoil2.useSetRecoilState)(themeAtoms);
49
- const setTheme = /* @__PURE__ */ __name((theme) => {
50
- setThemeRecoilState(theme);
51
- }, "setTheme");
52
- return { setTheme };
53
- }, "useSetTheme");
50
+ var useAppearance = /* @__PURE__ */ __name(() => {
51
+ const [systemAppearance, setSystemAppearance] = (0, import_recoil2.useRecoilState)(systemAppearanceAtom);
52
+ const [appAppearance, setAppAppearance] = (0, import_recoil2.useRecoilState)(appAppearanceAtom);
53
+ return {
54
+ appAppearance,
55
+ systemAppearance,
56
+ setAppAppearance,
57
+ setSystemAppearance
58
+ };
59
+ }, "useAppearance");
54
60
  var useColor = /* @__PURE__ */ __name((StyleSheetFunction) => {
55
- const theme = (0, import_recoil2.useRecoilValue)(themeAtoms);
56
- const colorToken = (() => {
57
- if (theme === "sys") {
58
- const colorScheme = import_react_native.Appearance.getColorScheme();
59
- if (colorScheme) {
60
- return vars.color[colorScheme];
61
+ const appAppearance = (0, import_recoil2.useRecoilValue)(appAppearanceAtom);
62
+ const systemAppearance = (0, import_recoil2.useRecoilValue)(systemAppearanceAtom);
63
+ const effectiveAppearance = (() => {
64
+ if (appAppearance === "sys") {
65
+ if (systemAppearance === "notDetermined") {
66
+ return "light";
61
67
  }
62
- return vars.color.light;
63
- } else {
64
- return vars.color[theme];
68
+ return systemAppearance;
65
69
  }
70
+ return appAppearance;
66
71
  })();
67
- return { styles: StyleSheetFunction(colorToken), color: colorToken };
72
+ const colorToken = vars.color[effectiveAppearance];
73
+ return {
74
+ styles: StyleSheetFunction(colorToken),
75
+ color: colorToken
76
+ };
68
77
  }, "useColor");
69
78
  var MMKV_KEY = "MMKV_KEY_THEME";
70
79
 
71
80
  // src/hooks/useDarkTheme.ts
72
81
  var import_recoil3 = require("recoil");
73
- var import_react_native2 = require("react-native");
82
+ var import_react_native = require("react-native");
74
83
  var useDarkTheme = /* @__PURE__ */ __name(() => {
75
- const theme = (0, import_recoil3.useRecoilValue)(themeAtoms);
84
+ const theme = (0, import_recoil3.useRecoilValue)(appAppearanceAtom);
76
85
  return {
77
- isDarkTheme: theme === "dark" || theme === "sys" && import_react_native2.Appearance.getColorScheme() === "dark",
86
+ isDarkTheme: theme === "dark" || theme === "sys" && import_react_native.Appearance.getColorScheme() === "dark",
78
87
  /**
79
88
  * darkMode를 구분하고 싶다면 theme말고 isDarkTheme를 사용해주세요.
80
89
  */
package/lib/index.cjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/generated/vars.ts", "../src/color/index.ts", "../src/store/theme.ts", "../src/hooks/useDarkTheme.ts"],
4
- "sourcesContent": ["export * from './generated/vars';\nexport * from './color';\nexport * from './hooks/useDarkTheme';\n", "export const vars = {\"color\":{\"light\":{\"neutral-container-lowest\":\"#ffffff\",\"neutral-container-lowest-hover\":\"#F9F9FA\",\"neutral-container-low\":\"#F9F9FA\",\"neutral-container-low-hover\":\"#F6F6F7\",\"neutral-container-mid\":\"#F6F6F7\",\"neutral-container-mid-hover\":\"#F1F1F2\",\"neutral-container-high\":\"#EDEEF0\",\"neutral-container-high-hover\":\"#E3E3E6\",\"neutral-container-highest\":\"#E9E9EB\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#ffffff\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.06)\",\"neutral-fill-low\":\"rgba(109,109,112,0.04)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"neutral-fill-high\":\"rgba(109,109,112,0.2)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.28)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#1E1E1F\",\"neutral-label-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-label-tertiary\":\"rgba(109,109,112,0.48)\",\"neutral-label-quaternary\":\"rgba(109,109,112,0.24)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"neutral-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"neutral-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"neutral-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"neutral-border-opaque-strong\":\"#1E1E1F\",\"neutral-border-opaque-normal\":\"#D7D7D9\",\"neutral-border-opaque-subtle\":\"#E9E9EB\",\"inverse-container-lowest\":\"#1E1E1F\",\"inverse-container-lowest-hover\":\"#272729\",\"inverse-container-low\":\"#272729\",\"inverse-container-low-hover\":\"#313133\",\"inverse-container-mid\":\"#313133\",\"inverse-container-mid-hover\":\"#39393B\",\"inverse-container-high\":\"#313133\",\"inverse-container-high-hover\":\"#4A4A4D\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#4A4A4D\",\"inverse-fill-mid\":\"#ffffff\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"inverse-label-primary\":\"#ffffff\",\"inverse-label-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-label-tertiary\":\"rgba(233,233,235,0.32)\",\"inverse-label-quaternary\":\"rgba(233,233,235,0.2)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"inverse-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"inverse-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"inverse-border-opaque-strong\":\"#ffffff\",\"inverse-border-opaque-normal\":\"#58595C\",\"inverse-border-opaque-subtle\":\"#313133\",\"brand-container-mid\":\"#14371B\",\"brand-container-mid-hover\":\"#082C11\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#14371B\",\"brand-fill-mid-hover\":\"#082C11\",\"brand-fill-low\":\"#F6FFF1\",\"brand-fill-low-hover\":\"#EBFFE7\",\"brand-label-primary\":\"#0C893B\",\"brand-label-secondary\":\"#14371B\",\"brand-label-variation-secondary\":\"#14371B\",\"brand-border-opaque-normal\":\"#14371B\",\"brand-border-opaque-strong\":\"#0C893B\",\"brandinverse-label-primary\":\"#C3FFD0\",\"brandinverse-label-secondary\":\"#ffffff\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FE8F16\",\"accent-label-yellow\":\"#FFCC00\",\"accent-label-mint\":\"#02B0B0\",\"accent-label-cyan\":\"#40B3FF\",\"accent-label-purple\":\"#B450E6\",\"accent-label-pink\":\"#FF3377\",\"accent-container-primary\":\"#FFB77C\",\"function-container-positive\":\"#30BF48\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#DB2323\",\"function-container-caution\":\"#FE8F16\",\"function-container-highlight\":\"#EAFFB6\",\"function-container-selection\":\"rgba(4,17,102,0.08)\",\"function-container-drag\":\"rgba(4,17,102,0.12)\",\"function-label-positive\":\"#30BF48\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FE8F16\",\"function-label-link\":\"#1A79B8\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"},\"dark\":{\"neutral-container-lowest\":\"#1E1E1F\",\"neutral-container-lowest-hover\":\"#272729\",\"neutral-container-low\":\"#272729\",\"neutral-container-low-hover\":\"#313133\",\"neutral-container-mid\":\"#313133\",\"neutral-container-mid-hover\":\"#39393B\",\"neutral-container-high\":\"#313133\",\"neutral-container-high-hover\":\"#4A4A4D\",\"neutral-container-highest\":\"#4A4A4D\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#272729\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.12)\",\"neutral-fill-low\":\"rgba(109,109,112,0.08)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.2)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.16)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.44)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#ffffff\",\"neutral-label-secondary\":\"rgba(233,233,235,0.64)\",\"neutral-label-tertiary\":\"rgba(233,233,235,0.32)\",\"neutral-label-quaternary\":\"rgba(233,233,235,0.2)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"neutral-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"neutral-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"neutral-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"neutral-border-opaque-strong\":\"#ffffff\",\"neutral-border-opaque-normal\":\"#58595C\",\"neutral-border-opaque-subtle\":\"#313133\",\"inverse-container-lowest\":\"#ffffff\",\"inverse-container-lowest-hover\":\"#F9F9FA\",\"inverse-container-low\":\"#F9F9FA\",\"inverse-container-low-hover\":\"#F6F6F7\",\"inverse-container-mid\":\"#F6F6F7\",\"inverse-container-mid-hover\":\"#F1F1F2\",\"inverse-container-high\":\"#EDEEF0\",\"inverse-container-high-hover\":\"#E3E3E6\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#E9E9EB\",\"inverse-fill-mid\":\"rgba(233,233,235,0.24)\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"inverse-label-primary\":\"#1E1E1F\",\"inverse-label-secondary\":\"rgba(109,109,112,0.8)\",\"inverse-label-tertiary\":\"rgba(109,109,112,0.48)\",\"inverse-label-quaternary\":\"rgba(109,109,112,0.24)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"inverse-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"inverse-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"inverse-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"inverse-border-opaque-strong\":\"#1E1E1F\",\"inverse-border-opaque-normal\":\"#D7D7D9\",\"inverse-border-opaque-subtle\":\"#E9E9EB\",\"brand-container-mid\":\"#236638\",\"brand-container-mid-hover\":\"#00733E\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#236638\",\"brand-fill-mid-hover\":\"#00733E\",\"brand-fill-low\":\"#1A5E31\",\"brand-fill-low-hover\":\"#236638\",\"brand-label-primary\":\"#C3FFD0\",\"brand-label-secondary\":\"#ffffff\",\"brand-label-variation-secondary\":\"rgba(255,255,255,0.8)\",\"brand-border-opaque-normal\":\"#ffffff\",\"brand-border-opaque-strong\":\"#C3FFD0\",\"brandinverse-label-primary\":\"#0C893B\",\"brandinverse-label-secondary\":\"#14371B\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FF9B3E\",\"accent-label-yellow\":\"#FFD739\",\"accent-label-mint\":\"#00CCCC\",\"accent-label-cyan\":\"#6AC4FF\",\"accent-label-purple\":\"#C978F2\",\"accent-label-pink\":\"#FF6095\",\"accent-container-primary\":\"#B46200\",\"function-container-positive\":\"#5DDF73\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#FF6060\",\"function-container-caution\":\"#FF9B3E\",\"function-container-highlight\":\"#394D00\",\"function-container-selection\":\"rgba(255,255,255,0.12)\",\"function-container-drag\":\"rgba(255,255,255,0.16)\",\"function-label-positive\":\"#5DDF73\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FF9B3E\",\"function-label-link\":\"#6AC4FF\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"}},\"radius\":{\"xxs\":\"2px\",\"xs\":\"4px\",\"s\":\"6px\",\"m\":\"8px\",\"l\":\"10px\",\"xl\":\"12px\",\"xxl\":\"200px\"},\"opacity\":{\"0\":\"0%\",\"1\":\"1%\",\"4\":\"4%\",\"8\":\"8%\",\"12\":\"12%\",\"16\":\"16%\",\"20\":\"20%\",\"24\":\"24%\",\"28\":\"28%\",\"32\":\"32%\",\"36\":\"36%\",\"40\":\"40%\",\"44\":\"44%\",\"48\":\"48%\",\"50\":\"50%\",\"56\":\"56%\",\"64\":\"64%\",\"72\":\"72%\",\"80\":\"80%\"},\"padding\":{\"component-50\":\"2px\",\"component-100\":\"4px\",\"component-150\":\"6px\",\"component-200\":\"8px\",\"component-300\":\"12px\",\"component-400\":\"16px\",\"component-500\":\"20px\",\"component-600\":\"24px\",\"component-700\":\"32px\",\"component-800\":\"40px\",\"component-900\":\"48px\",\"section-50\":\"20px\",\"section-100\":\"24px\",\"section-200\":\"32px\",\"section-300\":\"40px\",\"section-400\":\"48px\",\"section-500\":\"56px\",\"section-600\":\"64px\",\"section-700\":\"80px\",\"section-800\":\"100px\",\"section-900\":\"120px\"},\"size\":{\"0\":\"0px\",\"1\":\"1px\",\"2\":\"2px\",\"3\":\"3px\",\"4\":\"4px\",\"6\":\"6px\",\"8\":\"8px\",\"10\":\"10px\",\"12\":\"12px\",\"14\":\"14px\",\"16\":\"16px\",\"18\":\"18px\",\"20\":\"20px\",\"24\":\"24px\",\"32\":\"32px\",\"40\":\"40px\",\"48\":\"48px\",\"56\":\"56px\",\"64\":\"64px\",\"80\":\"80px\",\"100\":\"100px\",\"120\":\"120px\",\"140\":\"140px\",\"160\":\"160px\",\"180\":\"180px\",\"200\":\"200px\",\"minus6\":\"-6px\",\"minus4\":\"-4px\",\"minus2\":\"-2px\"},\"gap\":{\"positive-50\":\"2px\",\"positive-100\":\"4px\",\"positive-150\":\"6px\",\"positive-200\":\"8px\",\"positive-300\":\"12px\",\"positive-400\":\"16px\",\"positive-500\":\"20px\",\"positive-600\":\"24px\",\"positive-700\":\"32px\",\"positive-800\":\"40px\",\"positive-900\":\"48px\"},\"shadow\":{\"normal\":[\"0px 2px 12px 0px rgba(0, 0, 0, 0.08), 0px 1px 8px 0px rgba(0, 0, 0, 0.06), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)\",\"0px 2px 12px 0px rgba(0, 0, 0, 0.24), 0px 1px 8px 0px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.2)\"],\"strong\":[\"0px 6px 16px 0px rgba(0, 0, 0, 0.12), 0px 4px 12px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 6px 16px 0px rgba(0, 0, 0, 0.36), 0px 4px 12px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"],\"heavy\":[\"0px 16px 20px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 16px 20px 0px rgba(0, 0, 0, 0.36), 0px 8px 16px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"]},\"iconSize\":{\"xs\":\"16px\",\"s\":\"20px\",\"m\":\"24px\",\"l\":\"32px\",\"xl\":\"40px\"}}", "import { useRecoilValue, useSetRecoilState } from 'recoil';\nimport { vars } from '../generated/vars';\nimport { Appearance } from 'react-native';\nimport { themeAtoms } from '../store/theme';\n\nexport type Theme = 'dark' | 'light' | 'sys';\n\nexport const useSetTheme = () => {\n const setThemeRecoilState = useSetRecoilState(themeAtoms);\n\n const setTheme = (theme: Theme) => {\n setThemeRecoilState(theme);\n };\n\n return { setTheme };\n};\n\nexport type ColorType = typeof vars.color.light;\n\nexport const useColor = <T>(\n StyleSheetFunction: (color: ColorType) => T,\n): { styles: T; color: ColorType } => {\n const theme = useRecoilValue(themeAtoms);\n\n const colorToken = (() => {\n if (theme === 'sys') {\n const colorScheme = Appearance.getColorScheme();\n\n if (colorScheme) {\n return vars.color[colorScheme];\n }\n\n // colorScheme\uC774 \uC5C6\uB294 \uACBD\uC6B0 light \uD14C\uB9C8\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4.\n return vars.color.light;\n } else {\n return vars.color[theme];\n }\n })();\n\n return { styles: StyleSheetFunction(colorToken), color: colorToken };\n};\n\nexport const MMKV_KEY = 'MMKV_KEY_THEME';\n", "import { atom } from 'recoil';\nimport { Theme } from '../color';\n\nexport const themeAtoms = atom<Theme>({\n key: 'themeAtoms',\n default: 'sys',\n});\n", "import { useRecoilValue } from 'recoil';\nimport { themeAtoms } from '../store/theme';\nimport { Appearance } from 'react-native';\n\nexport const useDarkTheme = () => {\n const theme = useRecoilValue(themeAtoms);\n\n return {\n isDarkTheme: theme === 'dark' || (theme === 'sys' && Appearance.getColorScheme() === 'dark'),\n /**\n * darkMode\uB97C \uAD6C\uBD84\uD558\uACE0 \uC2F6\uB2E4\uBA74 theme\uB9D0\uACE0 isDarkTheme\uB97C \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694.\n */\n theme,\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO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GAAG;AAEH,SAAO,EAAE,QAAQ,mBAAmB,UAAU,GAAG,OAAO,WAAW;AACrE,GArBwB;AAuBjB,IAAM,WAAW;;;AE1CxB,IAAAC,iBAA+B;AAE/B,IAAAC,uBAA2B;AAEpB,IAAM,eAAe,6BAAM;AAChC,QAAM,YAAQ,+BAAe,UAAU;AAEvC,SAAO;AAAA,IACL,aAAa,UAAU,UAAW,UAAU,SAAS,gCAAW,eAAe,MAAM;AAAA;AAAA;AAAA;AAAA,IAIrF;AAAA,EACF;AACF,GAV4B;",
6
- "names": ["import_recoil", "import_recoil", "import_react_native"]
4
+ "sourcesContent": ["export * from './generated/vars';\nexport * from './color';\nexport * from './hooks/useDarkTheme';\n", "export const vars = {\"color\":{\"light\":{\"neutral-container-lowest\":\"#ffffff\",\"neutral-container-lowest-hover\":\"#F9F9FA\",\"neutral-container-low\":\"#F9F9FA\",\"neutral-container-low-hover\":\"#F6F6F7\",\"neutral-container-mid\":\"#F6F6F7\",\"neutral-container-mid-hover\":\"#F1F1F2\",\"neutral-container-high\":\"#EDEEF0\",\"neutral-container-high-hover\":\"#E3E3E6\",\"neutral-container-highest\":\"#E9E9EB\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#ffffff\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.06)\",\"neutral-fill-low\":\"rgba(109,109,112,0.04)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"neutral-fill-high\":\"rgba(109,109,112,0.2)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.28)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#1E1E1F\",\"neutral-label-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-label-tertiary\":\"rgba(109,109,112,0.48)\",\"neutral-label-quaternary\":\"rgba(109,109,112,0.24)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"neutral-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"neutral-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"neutral-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"neutral-border-opaque-strong\":\"#1E1E1F\",\"neutral-border-opaque-normal\":\"#D7D7D9\",\"neutral-border-opaque-subtle\":\"#E9E9EB\",\"inverse-container-lowest\":\"#1E1E1F\",\"inverse-container-lowest-hover\":\"#272729\",\"inverse-container-low\":\"#272729\",\"inverse-container-low-hover\":\"#313133\",\"inverse-container-mid\":\"#313133\",\"inverse-container-mid-hover\":\"#39393B\",\"inverse-container-high\":\"#313133\",\"inverse-container-high-hover\":\"#4A4A4D\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#4A4A4D\",\"inverse-fill-mid\":\"#ffffff\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"inverse-label-primary\":\"#ffffff\",\"inverse-label-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-label-tertiary\":\"rgba(233,233,235,0.32)\",\"inverse-label-quaternary\":\"rgba(233,233,235,0.2)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"inverse-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"inverse-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"inverse-border-opaque-strong\":\"#ffffff\",\"inverse-border-opaque-normal\":\"#58595C\",\"inverse-border-opaque-subtle\":\"#313133\",\"brand-container-mid\":\"#14371B\",\"brand-container-mid-hover\":\"#082C11\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#14371B\",\"brand-fill-mid-hover\":\"#082C11\",\"brand-fill-low\":\"#F6FFF1\",\"brand-fill-low-hover\":\"#EBFFE7\",\"brand-label-primary\":\"#0C893B\",\"brand-label-secondary\":\"#14371B\",\"brand-label-variation-secondary\":\"#14371B\",\"brand-border-opaque-normal\":\"#14371B\",\"brand-border-opaque-strong\":\"#0C893B\",\"brandinverse-label-primary\":\"#C3FFD0\",\"brandinverse-label-secondary\":\"#ffffff\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FE8F16\",\"accent-label-yellow\":\"#FFCC00\",\"accent-label-mint\":\"#02B0B0\",\"accent-label-cyan\":\"#40B3FF\",\"accent-label-purple\":\"#B450E6\",\"accent-label-pink\":\"#FF3377\",\"accent-container-primary\":\"#FFB77C\",\"function-container-positive\":\"#30BF48\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#DB2323\",\"function-container-caution\":\"#FE8F16\",\"function-container-highlight\":\"#EAFFB6\",\"function-container-selection\":\"rgba(4,17,102,0.08)\",\"function-container-drag\":\"rgba(4,17,102,0.12)\",\"function-label-positive\":\"#30BF48\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FE8F16\",\"function-label-link\":\"#1A79B8\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"},\"dark\":{\"neutral-container-lowest\":\"#1E1E1F\",\"neutral-container-lowest-hover\":\"#272729\",\"neutral-container-low\":\"#272729\",\"neutral-container-low-hover\":\"#313133\",\"neutral-container-mid\":\"#313133\",\"neutral-container-mid-hover\":\"#39393B\",\"neutral-container-high\":\"#313133\",\"neutral-container-high-hover\":\"#4A4A4D\",\"neutral-container-highest\":\"#4A4A4D\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#272729\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.12)\",\"neutral-fill-low\":\"rgba(109,109,112,0.08)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.2)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.16)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.44)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#ffffff\",\"neutral-label-secondary\":\"rgba(233,233,235,0.64)\",\"neutral-label-tertiary\":\"rgba(233,233,235,0.32)\",\"neutral-label-quaternary\":\"rgba(233,233,235,0.2)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"neutral-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"neutral-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"neutral-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"neutral-border-opaque-strong\":\"#ffffff\",\"neutral-border-opaque-normal\":\"#58595C\",\"neutral-border-opaque-subtle\":\"#313133\",\"inverse-container-lowest\":\"#ffffff\",\"inverse-container-lowest-hover\":\"#F9F9FA\",\"inverse-container-low\":\"#F9F9FA\",\"inverse-container-low-hover\":\"#F6F6F7\",\"inverse-container-mid\":\"#F6F6F7\",\"inverse-container-mid-hover\":\"#F1F1F2\",\"inverse-container-high\":\"#EDEEF0\",\"inverse-container-high-hover\":\"#E3E3E6\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#E9E9EB\",\"inverse-fill-mid\":\"rgba(233,233,235,0.24)\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"inverse-label-primary\":\"#1E1E1F\",\"inverse-label-secondary\":\"rgba(109,109,112,0.8)\",\"inverse-label-tertiary\":\"rgba(109,109,112,0.48)\",\"inverse-label-quaternary\":\"rgba(109,109,112,0.24)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"inverse-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"inverse-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"inverse-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"inverse-border-opaque-strong\":\"#1E1E1F\",\"inverse-border-opaque-normal\":\"#D7D7D9\",\"inverse-border-opaque-subtle\":\"#E9E9EB\",\"brand-container-mid\":\"#236638\",\"brand-container-mid-hover\":\"#00733E\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#236638\",\"brand-fill-mid-hover\":\"#00733E\",\"brand-fill-low\":\"#1A5E31\",\"brand-fill-low-hover\":\"#236638\",\"brand-label-primary\":\"#C3FFD0\",\"brand-label-secondary\":\"#ffffff\",\"brand-label-variation-secondary\":\"rgba(255,255,255,0.8)\",\"brand-border-opaque-normal\":\"#ffffff\",\"brand-border-opaque-strong\":\"#C3FFD0\",\"brandinverse-label-primary\":\"#0C893B\",\"brandinverse-label-secondary\":\"#14371B\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FF9B3E\",\"accent-label-yellow\":\"#FFD739\",\"accent-label-mint\":\"#00CCCC\",\"accent-label-cyan\":\"#6AC4FF\",\"accent-label-purple\":\"#C978F2\",\"accent-label-pink\":\"#FF6095\",\"accent-container-primary\":\"#B46200\",\"function-container-positive\":\"#5DDF73\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#FF6060\",\"function-container-caution\":\"#FF9B3E\",\"function-container-highlight\":\"#394D00\",\"function-container-selection\":\"rgba(255,255,255,0.12)\",\"function-container-drag\":\"rgba(255,255,255,0.16)\",\"function-label-positive\":\"#5DDF73\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FF9B3E\",\"function-label-link\":\"#6AC4FF\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"}},\"radius\":{\"xxs\":\"2px\",\"xs\":\"4px\",\"s\":\"6px\",\"m\":\"8px\",\"l\":\"10px\",\"xl\":\"12px\",\"xxl\":\"200px\"},\"opacity\":{\"0\":\"0%\",\"1\":\"1%\",\"4\":\"4%\",\"8\":\"8%\",\"12\":\"12%\",\"16\":\"16%\",\"20\":\"20%\",\"24\":\"24%\",\"28\":\"28%\",\"32\":\"32%\",\"36\":\"36%\",\"40\":\"40%\",\"44\":\"44%\",\"48\":\"48%\",\"50\":\"50%\",\"56\":\"56%\",\"64\":\"64%\",\"72\":\"72%\",\"80\":\"80%\"},\"padding\":{\"component-50\":\"2px\",\"component-100\":\"4px\",\"component-150\":\"6px\",\"component-200\":\"8px\",\"component-300\":\"12px\",\"component-400\":\"16px\",\"component-500\":\"20px\",\"component-600\":\"24px\",\"component-700\":\"32px\",\"component-800\":\"40px\",\"component-900\":\"48px\",\"section-50\":\"20px\",\"section-100\":\"24px\",\"section-200\":\"32px\",\"section-300\":\"40px\",\"section-400\":\"48px\",\"section-500\":\"56px\",\"section-600\":\"64px\",\"section-700\":\"80px\",\"section-800\":\"100px\",\"section-900\":\"120px\"},\"size\":{\"0\":\"0px\",\"1\":\"1px\",\"2\":\"2px\",\"3\":\"3px\",\"4\":\"4px\",\"6\":\"6px\",\"8\":\"8px\",\"10\":\"10px\",\"12\":\"12px\",\"14\":\"14px\",\"16\":\"16px\",\"18\":\"18px\",\"20\":\"20px\",\"24\":\"24px\",\"32\":\"32px\",\"40\":\"40px\",\"48\":\"48px\",\"56\":\"56px\",\"64\":\"64px\",\"80\":\"80px\",\"100\":\"100px\",\"120\":\"120px\",\"140\":\"140px\",\"160\":\"160px\",\"180\":\"180px\",\"200\":\"200px\",\"minus6\":\"-6px\",\"minus4\":\"-4px\",\"minus2\":\"-2px\"},\"gap\":{\"positive-50\":\"2px\",\"positive-100\":\"4px\",\"positive-150\":\"6px\",\"positive-200\":\"8px\",\"positive-300\":\"12px\",\"positive-400\":\"16px\",\"positive-500\":\"20px\",\"positive-600\":\"24px\",\"positive-700\":\"32px\",\"positive-800\":\"40px\",\"positive-900\":\"48px\"},\"shadow\":{\"normal\":[\"0px 2px 12px 0px rgba(0, 0, 0, 0.08), 0px 1px 8px 0px rgba(0, 0, 0, 0.06), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)\",\"0px 2px 12px 0px rgba(0, 0, 0, 0.24), 0px 1px 8px 0px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.2)\"],\"strong\":[\"0px 6px 16px 0px rgba(0, 0, 0, 0.12), 0px 4px 12px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 6px 16px 0px rgba(0, 0, 0, 0.36), 0px 4px 12px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"],\"heavy\":[\"0px 16px 20px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 16px 20px 0px rgba(0, 0, 0, 0.36), 0px 8px 16px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"]},\"iconSize\":{\"xs\":\"16px\",\"s\":\"20px\",\"m\":\"24px\",\"l\":\"32px\",\"xl\":\"40px\"}}", "import { useRecoilState, useRecoilValue } from 'recoil';\nimport { vars } from '../generated/vars';\nimport { appAppearanceAtom, systemAppearanceAtom } from '../store/theme';\n\nexport type ColorType = typeof vars.color.light;\nexport type EffectiveAppearance = 'dark' | 'light';\nexport type AppAppearance = EffectiveAppearance | 'sys';\nexport type SystemAppearance = EffectiveAppearance | 'notDetermined';\n\nexport const useAppearance = () => {\n const [systemAppearance, setSystemAppearance] = useRecoilState(systemAppearanceAtom);\n const [appAppearance, setAppAppearance] = useRecoilState(appAppearanceAtom);\n\n return {\n appAppearance,\n systemAppearance,\n setAppAppearance,\n setSystemAppearance,\n };\n};\n\nexport const useColor = <T>(\n StyleSheetFunction: (color: ColorType) => T,\n): { styles: T; color: ColorType } => {\n const appAppearance = useRecoilValue(appAppearanceAtom);\n const systemAppearance = useRecoilValue(systemAppearanceAtom);\n\n const effectiveAppearance: EffectiveAppearance = (() => {\n if (appAppearance === 'sys') {\n if (systemAppearance === 'notDetermined') {\n return 'light';\n }\n\n return systemAppearance;\n }\n\n return appAppearance;\n })();\n\n const colorToken = vars.color[effectiveAppearance];\n\n return {\n styles: StyleSheetFunction(colorToken),\n color: colorToken,\n };\n};\n\nexport const MMKV_KEY = 'MMKV_KEY_THEME';\n", "import { atom } from 'recoil';\nimport { AppAppearance, SystemAppearance } from '../color';\n\nexport const appAppearanceAtom = atom<AppAppearance>({\n key: 'themeAtoms',\n default: 'sys',\n});\n\nexport const systemAppearanceAtom = atom<SystemAppearance>({\n key: 'systemThemeAtoms',\n default: 'notDetermined',\n});\n", "import { useRecoilValue } from 'recoil';\nimport { appAppearanceAtom } from '../store/theme';\nimport { Appearance } from 'react-native';\n\nexport const useDarkTheme = () => {\n const theme = useRecoilValue(appAppearanceAtom);\n\n return {\n isDarkTheme: theme === 'dark' || (theme === 'sys' && Appearance.getColorScheme() === 'dark'),\n /**\n * darkMode\uB97C \uAD6C\uBD84\uD558\uACE0 \uC2F6\uB2E4\uBA74 theme\uB9D0\uACE0 isDarkTheme\uB97C \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694.\n */\n theme,\n };\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,OAAO,EAAC,SAAQ,EAAC,SAAQ,EAAC,4BAA2B,WAAU,kCAAiC,WAAU,yBAAwB,WAAU,+BAA8B,WAAU,yBAAwB,WAAU,+B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;AAAA,IACL,QAAQ,mBAAmB,UAAU;AAAA,IACrC,OAAO;AAAA,EACT;AACF,GAxBwB;AA0BjB,IAAM,WAAW;;;AE/CxB,IAAAC,iBAA+B;AAE/B,0BAA2B;AAEpB,IAAM,eAAe,6BAAM;AAChC,QAAM,YAAQ,+BAAe,iBAAiB;AAE9C,SAAO;AAAA,IACL,aAAa,UAAU,UAAW,UAAU,SAAS,+BAAW,eAAe,MAAM;AAAA;AAAA;AAAA;AAAA,IAIrF;AAAA,EACF;AACF,GAV4B;",
6
+ "names": ["import_recoil", "import_recoil"]
7
7
  }
package/lib/index.mjs CHANGED
@@ -5,48 +5,57 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
5
5
  var vars = { "color": { "light": { "neutral-container-lowest": "#ffffff", "neutral-container-lowest-hover": "#F9F9FA", "neutral-container-low": "#F9F9FA", "neutral-container-low-hover": "#F6F6F7", "neutral-container-mid": "#F6F6F7", "neutral-container-mid-hover": "#F1F1F2", "neutral-container-high": "#EDEEF0", "neutral-container-high-hover": "#E3E3E6", "neutral-container-highest": "#E9E9EB", "neutral-container-static-lowest": "#ffffff", "neutral-container-static-lowest-hover": "#F9F9FA", "neutral-container-variation-lowest": "#ffffff", "neutral-fill-lowest": "rgba(109,109,112,0)", "neutral-fill-lowest-hover": "rgba(109,109,112,0.06)", "neutral-fill-low": "rgba(109,109,112,0.04)", "neutral-fill-low-hover": "rgba(109,109,112,0.08)", "neutral-fill-mid": "rgba(109,109,112,0.08)", "neutral-fill-mid-hover": "rgba(109,109,112,0.16)", "neutral-fill-high": "rgba(109,109,112,0.2)", "neutral-fill-high-hover": "rgba(109,109,112,0.28)", "neutral-fill-highest": "rgba(109,109,112,0.72)", "neutral-label-primary": "#1E1E1F", "neutral-label-secondary": "rgba(109,109,112,0.8)", "neutral-label-tertiary": "rgba(109,109,112,0.48)", "neutral-label-quaternary": "rgba(109,109,112,0.24)", "neutral-label-static-primary": "#1E1E1F", "neutral-label-static-secondary": "rgba(109,109,112,0.8)", "neutral-border-overlay-strong": "rgba(109,109,112,0.64)", "neutral-border-overlay-normal": "rgba(109,109,112,0.24)", "neutral-border-overlay-subtle": "rgba(109,109,112,0.16)", "neutral-border-overlay-hint": "rgba(109,109,112,0.12)", "neutral-border-opaque-strong": "#1E1E1F", "neutral-border-opaque-normal": "#D7D7D9", "neutral-border-opaque-subtle": "#E9E9EB", "inverse-container-lowest": "#1E1E1F", "inverse-container-lowest-hover": "#272729", "inverse-container-low": "#272729", "inverse-container-low-hover": "#313133", "inverse-container-mid": "#313133", "inverse-container-mid-hover": "#39393B", "inverse-container-high": "#313133", "inverse-container-high-hover": "#4A4A4D", "inverse-container-static-high": "#313133", "inverse-container-static-high-hover": "#58595C", "inverse-container-highest": "#4A4A4D", "inverse-fill-mid": "#ffffff", "inverse-fill-mid-hover": "rgba(109,109,112,0.32)", "inverse-label-primary": "#ffffff", "inverse-label-secondary": "rgba(233,233,235,0.64)", "inverse-label-tertiary": "rgba(233,233,235,0.32)", "inverse-label-quaternary": "rgba(233,233,235,0.2)", "inverse-label-static-primary": "#ffffff", "inverse-label-static-secondary": "rgba(233,233,235,0.64)", "inverse-border-overlay-strong": "rgba(233,233,235,0.64)", "inverse-border-overlay-normal": "rgba(233,233,235,0.28)", "inverse-border-overlay-subtle": "rgba(233,233,235,0.2)", "inverse-border-overlay-hint": "rgba(233,233,235,0.12)", "inverse-border-opaque-strong": "#ffffff", "inverse-border-opaque-normal": "#58595C", "inverse-border-opaque-subtle": "#313133", "brand-container-mid": "#14371B", "brand-container-mid-hover": "#082C11", "brand-container-high": "#0C893B", "brand-fill-mid": "#14371B", "brand-fill-mid-hover": "#082C11", "brand-fill-low": "#F6FFF1", "brand-fill-low-hover": "#EBFFE7", "brand-label-primary": "#0C893B", "brand-label-secondary": "#14371B", "brand-label-variation-secondary": "#14371B", "brand-border-opaque-normal": "#14371B", "brand-border-opaque-strong": "#0C893B", "brandinverse-label-primary": "#C3FFD0", "brandinverse-label-secondary": "#ffffff", "brandinverse-label-static-primary": "#C3FFD0", "accent-label-primary": "#FE8F16", "accent-label-yellow": "#FFCC00", "accent-label-mint": "#02B0B0", "accent-label-cyan": "#40B3FF", "accent-label-purple": "#B450E6", "accent-label-pink": "#FF3377", "accent-container-primary": "#FFB77C", "function-container-positive": "#30BF48", "function-container-negative": "#FF3333", "function-container-negative-hover": "#DB2323", "function-container-caution": "#FE8F16", "function-container-highlight": "#EAFFB6", "function-container-selection": "rgba(4,17,102,0.08)", "function-container-drag": "rgba(4,17,102,0.12)", "function-label-positive": "#30BF48", "function-label-negative": "#FF3333", "function-label-caution": "#FE8F16", "function-label-link": "#1A79B8", "cover-dim-page": "rgba(0,0,0,0.48)" }, "dark": { "neutral-container-lowest": "#1E1E1F", "neutral-container-lowest-hover": "#272729", "neutral-container-low": "#272729", "neutral-container-low-hover": "#313133", "neutral-container-mid": "#313133", "neutral-container-mid-hover": "#39393B", "neutral-container-high": "#313133", "neutral-container-high-hover": "#4A4A4D", "neutral-container-highest": "#4A4A4D", "neutral-container-static-lowest": "#ffffff", "neutral-container-static-lowest-hover": "#F9F9FA", "neutral-container-variation-lowest": "#272729", "neutral-fill-lowest": "rgba(109,109,112,0)", "neutral-fill-lowest-hover": "rgba(109,109,112,0.12)", "neutral-fill-low": "rgba(109,109,112,0.08)", "neutral-fill-low-hover": "rgba(109,109,112,0.2)", "neutral-fill-mid": "rgba(109,109,112,0.16)", "neutral-fill-mid-hover": "rgba(109,109,112,0.32)", "neutral-fill-high": "rgba(109,109,112,0.32)", "neutral-fill-high-hover": "rgba(109,109,112,0.44)", "neutral-fill-highest": "rgba(109,109,112,0.72)", "neutral-label-primary": "#ffffff", "neutral-label-secondary": "rgba(233,233,235,0.64)", "neutral-label-tertiary": "rgba(233,233,235,0.32)", "neutral-label-quaternary": "rgba(233,233,235,0.2)", "neutral-label-static-primary": "#1E1E1F", "neutral-label-static-secondary": "rgba(109,109,112,0.8)", "neutral-border-overlay-strong": "rgba(233,233,235,0.64)", "neutral-border-overlay-normal": "rgba(233,233,235,0.28)", "neutral-border-overlay-subtle": "rgba(233,233,235,0.2)", "neutral-border-overlay-hint": "rgba(233,233,235,0.12)", "neutral-border-opaque-strong": "#ffffff", "neutral-border-opaque-normal": "#58595C", "neutral-border-opaque-subtle": "#313133", "inverse-container-lowest": "#ffffff", "inverse-container-lowest-hover": "#F9F9FA", "inverse-container-low": "#F9F9FA", "inverse-container-low-hover": "#F6F6F7", "inverse-container-mid": "#F6F6F7", "inverse-container-mid-hover": "#F1F1F2", "inverse-container-high": "#EDEEF0", "inverse-container-high-hover": "#E3E3E6", "inverse-container-static-high": "#313133", "inverse-container-static-high-hover": "#58595C", "inverse-container-highest": "#E9E9EB", "inverse-fill-mid": "rgba(233,233,235,0.24)", "inverse-fill-mid-hover": "rgba(109,109,112,0.16)", "inverse-label-primary": "#1E1E1F", "inverse-label-secondary": "rgba(109,109,112,0.8)", "inverse-label-tertiary": "rgba(109,109,112,0.48)", "inverse-label-quaternary": "rgba(109,109,112,0.24)", "inverse-label-static-primary": "#ffffff", "inverse-label-static-secondary": "rgba(233,233,235,0.64)", "inverse-border-overlay-strong": "rgba(109,109,112,0.64)", "inverse-border-overlay-normal": "rgba(109,109,112,0.24)", "inverse-border-overlay-subtle": "rgba(109,109,112,0.16)", "inverse-border-overlay-hint": "rgba(109,109,112,0.12)", "inverse-border-opaque-strong": "#1E1E1F", "inverse-border-opaque-normal": "#D7D7D9", "inverse-border-opaque-subtle": "#E9E9EB", "brand-container-mid": "#236638", "brand-container-mid-hover": "#00733E", "brand-container-high": "#0C893B", "brand-fill-mid": "#236638", "brand-fill-mid-hover": "#00733E", "brand-fill-low": "#1A5E31", "brand-fill-low-hover": "#236638", "brand-label-primary": "#C3FFD0", "brand-label-secondary": "#ffffff", "brand-label-variation-secondary": "rgba(255,255,255,0.8)", "brand-border-opaque-normal": "#ffffff", "brand-border-opaque-strong": "#C3FFD0", "brandinverse-label-primary": "#0C893B", "brandinverse-label-secondary": "#14371B", "brandinverse-label-static-primary": "#C3FFD0", "accent-label-primary": "#FF9B3E", "accent-label-yellow": "#FFD739", "accent-label-mint": "#00CCCC", "accent-label-cyan": "#6AC4FF", "accent-label-purple": "#C978F2", "accent-label-pink": "#FF6095", "accent-container-primary": "#B46200", "function-container-positive": "#5DDF73", "function-container-negative": "#FF3333", "function-container-negative-hover": "#FF6060", "function-container-caution": "#FF9B3E", "function-container-highlight": "#394D00", "function-container-selection": "rgba(255,255,255,0.12)", "function-container-drag": "rgba(255,255,255,0.16)", "function-label-positive": "#5DDF73", "function-label-negative": "#FF3333", "function-label-caution": "#FF9B3E", "function-label-link": "#6AC4FF", "cover-dim-page": "rgba(0,0,0,0.48)" } }, "radius": { "xxs": "2px", "xs": "4px", "s": "6px", "m": "8px", "l": "10px", "xl": "12px", "xxl": "200px" }, "opacity": { "0": "0%", "1": "1%", "4": "4%", "8": "8%", "12": "12%", "16": "16%", "20": "20%", "24": "24%", "28": "28%", "32": "32%", "36": "36%", "40": "40%", "44": "44%", "48": "48%", "50": "50%", "56": "56%", "64": "64%", "72": "72%", "80": "80%" }, "padding": { "component-50": "2px", "component-100": "4px", "component-150": "6px", "component-200": "8px", "component-300": "12px", "component-400": "16px", "component-500": "20px", "component-600": "24px", "component-700": "32px", "component-800": "40px", "component-900": "48px", "section-50": "20px", "section-100": "24px", "section-200": "32px", "section-300": "40px", "section-400": "48px", "section-500": "56px", "section-600": "64px", "section-700": "80px", "section-800": "100px", "section-900": "120px" }, "size": { "0": "0px", "1": "1px", "2": "2px", "3": "3px", "4": "4px", "6": "6px", "8": "8px", "10": "10px", "12": "12px", "14": "14px", "16": "16px", "18": "18px", "20": "20px", "24": "24px", "32": "32px", "40": "40px", "48": "48px", "56": "56px", "64": "64px", "80": "80px", "100": "100px", "120": "120px", "140": "140px", "160": "160px", "180": "180px", "200": "200px", "minus6": "-6px", "minus4": "-4px", "minus2": "-2px" }, "gap": { "positive-50": "2px", "positive-100": "4px", "positive-150": "6px", "positive-200": "8px", "positive-300": "12px", "positive-400": "16px", "positive-500": "20px", "positive-600": "24px", "positive-700": "32px", "positive-800": "40px", "positive-900": "48px" }, "shadow": { "normal": ["0px 2px 12px 0px rgba(0, 0, 0, 0.08), 0px 1px 8px 0px rgba(0, 0, 0, 0.06), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)", "0px 2px 12px 0px rgba(0, 0, 0, 0.24), 0px 1px 8px 0px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.2)"], "strong": ["0px 6px 16px 0px rgba(0, 0, 0, 0.12), 0px 4px 12px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)", "0px 6px 16px 0px rgba(0, 0, 0, 0.36), 0px 4px 12px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)"], "heavy": ["0px 16px 20px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)", "0px 16px 20px 0px rgba(0, 0, 0, 0.36), 0px 8px 16px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)"] }, "iconSize": { "xs": "16px", "s": "20px", "m": "24px", "l": "32px", "xl": "40px" } };
6
6
 
7
7
  // src/color/index.ts
8
- import { useRecoilValue, useSetRecoilState } from "recoil";
9
- import { Appearance } from "react-native";
8
+ import { useRecoilState, useRecoilValue } from "recoil";
10
9
 
11
10
  // src/store/theme.ts
12
11
  import { atom } from "recoil";
13
- var themeAtoms = atom({
12
+ var appAppearanceAtom = atom({
14
13
  key: "themeAtoms",
15
14
  default: "sys"
16
15
  });
16
+ var systemAppearanceAtom = atom({
17
+ key: "systemThemeAtoms",
18
+ default: "notDetermined"
19
+ });
17
20
 
18
21
  // src/color/index.ts
19
- var useSetTheme = /* @__PURE__ */ __name(() => {
20
- const setThemeRecoilState = useSetRecoilState(themeAtoms);
21
- const setTheme = /* @__PURE__ */ __name((theme) => {
22
- setThemeRecoilState(theme);
23
- }, "setTheme");
24
- return { setTheme };
25
- }, "useSetTheme");
22
+ var useAppearance = /* @__PURE__ */ __name(() => {
23
+ const [systemAppearance, setSystemAppearance] = useRecoilState(systemAppearanceAtom);
24
+ const [appAppearance, setAppAppearance] = useRecoilState(appAppearanceAtom);
25
+ return {
26
+ appAppearance,
27
+ systemAppearance,
28
+ setAppAppearance,
29
+ setSystemAppearance
30
+ };
31
+ }, "useAppearance");
26
32
  var useColor = /* @__PURE__ */ __name((StyleSheetFunction) => {
27
- const theme = useRecoilValue(themeAtoms);
28
- const colorToken = (() => {
29
- if (theme === "sys") {
30
- const colorScheme = Appearance.getColorScheme();
31
- if (colorScheme) {
32
- return vars.color[colorScheme];
33
+ const appAppearance = useRecoilValue(appAppearanceAtom);
34
+ const systemAppearance = useRecoilValue(systemAppearanceAtom);
35
+ const effectiveAppearance = (() => {
36
+ if (appAppearance === "sys") {
37
+ if (systemAppearance === "notDetermined") {
38
+ return "light";
33
39
  }
34
- return vars.color.light;
35
- } else {
36
- return vars.color[theme];
40
+ return systemAppearance;
37
41
  }
42
+ return appAppearance;
38
43
  })();
39
- return { styles: StyleSheetFunction(colorToken), color: colorToken };
44
+ const colorToken = vars.color[effectiveAppearance];
45
+ return {
46
+ styles: StyleSheetFunction(colorToken),
47
+ color: colorToken
48
+ };
40
49
  }, "useColor");
41
50
  var MMKV_KEY = "MMKV_KEY_THEME";
42
51
 
43
52
  // src/hooks/useDarkTheme.ts
44
53
  import { useRecoilValue as useRecoilValue2 } from "recoil";
45
- import { Appearance as Appearance2 } from "react-native";
54
+ import { Appearance } from "react-native";
46
55
  var useDarkTheme = /* @__PURE__ */ __name(() => {
47
- const theme = useRecoilValue2(themeAtoms);
56
+ const theme = useRecoilValue2(appAppearanceAtom);
48
57
  return {
49
- isDarkTheme: theme === "dark" || theme === "sys" && Appearance2.getColorScheme() === "dark",
58
+ isDarkTheme: theme === "dark" || theme === "sys" && Appearance.getColorScheme() === "dark",
50
59
  /**
51
60
  * darkMode를 구분하고 싶다면 theme말고 isDarkTheme를 사용해주세요.
52
61
  */
@@ -55,9 +64,9 @@ var useDarkTheme = /* @__PURE__ */ __name(() => {
55
64
  }, "useDarkTheme");
56
65
  export {
57
66
  MMKV_KEY,
67
+ useAppearance,
58
68
  useColor,
59
69
  useDarkTheme,
60
- useSetTheme,
61
70
  vars
62
71
  };
63
72
  //# sourceMappingURL=index.mjs.map
package/lib/index.mjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/generated/vars.ts", "../src/color/index.ts", "../src/store/theme.ts", "../src/hooks/useDarkTheme.ts"],
4
- "sourcesContent": ["export const vars = {\"color\":{\"light\":{\"neutral-container-lowest\":\"#ffffff\",\"neutral-container-lowest-hover\":\"#F9F9FA\",\"neutral-container-low\":\"#F9F9FA\",\"neutral-container-low-hover\":\"#F6F6F7\",\"neutral-container-mid\":\"#F6F6F7\",\"neutral-container-mid-hover\":\"#F1F1F2\",\"neutral-container-high\":\"#EDEEF0\",\"neutral-container-high-hover\":\"#E3E3E6\",\"neutral-container-highest\":\"#E9E9EB\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#ffffff\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.06)\",\"neutral-fill-low\":\"rgba(109,109,112,0.04)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"neutral-fill-high\":\"rgba(109,109,112,0.2)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.28)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#1E1E1F\",\"neutral-label-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-label-tertiary\":\"rgba(109,109,112,0.48)\",\"neutral-label-quaternary\":\"rgba(109,109,112,0.24)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"neutral-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"neutral-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"neutral-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"neutral-border-opaque-strong\":\"#1E1E1F\",\"neutral-border-opaque-normal\":\"#D7D7D9\",\"neutral-border-opaque-subtle\":\"#E9E9EB\",\"inverse-container-lowest\":\"#1E1E1F\",\"inverse-container-lowest-hover\":\"#272729\",\"inverse-container-low\":\"#272729\",\"inverse-container-low-hover\":\"#313133\",\"inverse-container-mid\":\"#313133\",\"inverse-container-mid-hover\":\"#39393B\",\"inverse-container-high\":\"#313133\",\"inverse-container-high-hover\":\"#4A4A4D\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#4A4A4D\",\"inverse-fill-mid\":\"#ffffff\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"inverse-label-primary\":\"#ffffff\",\"inverse-label-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-label-tertiary\":\"rgba(233,233,235,0.32)\",\"inverse-label-quaternary\":\"rgba(233,233,235,0.2)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"inverse-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"inverse-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"inverse-border-opaque-strong\":\"#ffffff\",\"inverse-border-opaque-normal\":\"#58595C\",\"inverse-border-opaque-subtle\":\"#313133\",\"brand-container-mid\":\"#14371B\",\"brand-container-mid-hover\":\"#082C11\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#14371B\",\"brand-fill-mid-hover\":\"#082C11\",\"brand-fill-low\":\"#F6FFF1\",\"brand-fill-low-hover\":\"#EBFFE7\",\"brand-label-primary\":\"#0C893B\",\"brand-label-secondary\":\"#14371B\",\"brand-label-variation-secondary\":\"#14371B\",\"brand-border-opaque-normal\":\"#14371B\",\"brand-border-opaque-strong\":\"#0C893B\",\"brandinverse-label-primary\":\"#C3FFD0\",\"brandinverse-label-secondary\":\"#ffffff\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FE8F16\",\"accent-label-yellow\":\"#FFCC00\",\"accent-label-mint\":\"#02B0B0\",\"accent-label-cyan\":\"#40B3FF\",\"accent-label-purple\":\"#B450E6\",\"accent-label-pink\":\"#FF3377\",\"accent-container-primary\":\"#FFB77C\",\"function-container-positive\":\"#30BF48\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#DB2323\",\"function-container-caution\":\"#FE8F16\",\"function-container-highlight\":\"#EAFFB6\",\"function-container-selection\":\"rgba(4,17,102,0.08)\",\"function-container-drag\":\"rgba(4,17,102,0.12)\",\"function-label-positive\":\"#30BF48\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FE8F16\",\"function-label-link\":\"#1A79B8\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"},\"dark\":{\"neutral-container-lowest\":\"#1E1E1F\",\"neutral-container-lowest-hover\":\"#272729\",\"neutral-container-low\":\"#272729\",\"neutral-container-low-hover\":\"#313133\",\"neutral-container-mid\":\"#313133\",\"neutral-container-mid-hover\":\"#39393B\",\"neutral-container-high\":\"#313133\",\"neutral-container-high-hover\":\"#4A4A4D\",\"neutral-container-highest\":\"#4A4A4D\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#272729\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.12)\",\"neutral-fill-low\":\"rgba(109,109,112,0.08)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.2)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.16)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.44)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#ffffff\",\"neutral-label-secondary\":\"rgba(233,233,235,0.64)\",\"neutral-label-tertiary\":\"rgba(233,233,235,0.32)\",\"neutral-label-quaternary\":\"rgba(233,233,235,0.2)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"neutral-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"neutral-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"neutral-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"neutral-border-opaque-strong\":\"#ffffff\",\"neutral-border-opaque-normal\":\"#58595C\",\"neutral-border-opaque-subtle\":\"#313133\",\"inverse-container-lowest\":\"#ffffff\",\"inverse-container-lowest-hover\":\"#F9F9FA\",\"inverse-container-low\":\"#F9F9FA\",\"inverse-container-low-hover\":\"#F6F6F7\",\"inverse-container-mid\":\"#F6F6F7\",\"inverse-container-mid-hover\":\"#F1F1F2\",\"inverse-container-high\":\"#EDEEF0\",\"inverse-container-high-hover\":\"#E3E3E6\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#E9E9EB\",\"inverse-fill-mid\":\"rgba(233,233,235,0.24)\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"inverse-label-primary\":\"#1E1E1F\",\"inverse-label-secondary\":\"rgba(109,109,112,0.8)\",\"inverse-label-tertiary\":\"rgba(109,109,112,0.48)\",\"inverse-label-quaternary\":\"rgba(109,109,112,0.24)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"inverse-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"inverse-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"inverse-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"inverse-border-opaque-strong\":\"#1E1E1F\",\"inverse-border-opaque-normal\":\"#D7D7D9\",\"inverse-border-opaque-subtle\":\"#E9E9EB\",\"brand-container-mid\":\"#236638\",\"brand-container-mid-hover\":\"#00733E\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#236638\",\"brand-fill-mid-hover\":\"#00733E\",\"brand-fill-low\":\"#1A5E31\",\"brand-fill-low-hover\":\"#236638\",\"brand-label-primary\":\"#C3FFD0\",\"brand-label-secondary\":\"#ffffff\",\"brand-label-variation-secondary\":\"rgba(255,255,255,0.8)\",\"brand-border-opaque-normal\":\"#ffffff\",\"brand-border-opaque-strong\":\"#C3FFD0\",\"brandinverse-label-primary\":\"#0C893B\",\"brandinverse-label-secondary\":\"#14371B\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FF9B3E\",\"accent-label-yellow\":\"#FFD739\",\"accent-label-mint\":\"#00CCCC\",\"accent-label-cyan\":\"#6AC4FF\",\"accent-label-purple\":\"#C978F2\",\"accent-label-pink\":\"#FF6095\",\"accent-container-primary\":\"#B46200\",\"function-container-positive\":\"#5DDF73\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#FF6060\",\"function-container-caution\":\"#FF9B3E\",\"function-container-highlight\":\"#394D00\",\"function-container-selection\":\"rgba(255,255,255,0.12)\",\"function-container-drag\":\"rgba(255,255,255,0.16)\",\"function-label-positive\":\"#5DDF73\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FF9B3E\",\"function-label-link\":\"#6AC4FF\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"}},\"radius\":{\"xxs\":\"2px\",\"xs\":\"4px\",\"s\":\"6px\",\"m\":\"8px\",\"l\":\"10px\",\"xl\":\"12px\",\"xxl\":\"200px\"},\"opacity\":{\"0\":\"0%\",\"1\":\"1%\",\"4\":\"4%\",\"8\":\"8%\",\"12\":\"12%\",\"16\":\"16%\",\"20\":\"20%\",\"24\":\"24%\",\"28\":\"28%\",\"32\":\"32%\",\"36\":\"36%\",\"40\":\"40%\",\"44\":\"44%\",\"48\":\"48%\",\"50\":\"50%\",\"56\":\"56%\",\"64\":\"64%\",\"72\":\"72%\",\"80\":\"80%\"},\"padding\":{\"component-50\":\"2px\",\"component-100\":\"4px\",\"component-150\":\"6px\",\"component-200\":\"8px\",\"component-300\":\"12px\",\"component-400\":\"16px\",\"component-500\":\"20px\",\"component-600\":\"24px\",\"component-700\":\"32px\",\"component-800\":\"40px\",\"component-900\":\"48px\",\"section-50\":\"20px\",\"section-100\":\"24px\",\"section-200\":\"32px\",\"section-300\":\"40px\",\"section-400\":\"48px\",\"section-500\":\"56px\",\"section-600\":\"64px\",\"section-700\":\"80px\",\"section-800\":\"100px\",\"section-900\":\"120px\"},\"size\":{\"0\":\"0px\",\"1\":\"1px\",\"2\":\"2px\",\"3\":\"3px\",\"4\":\"4px\",\"6\":\"6px\",\"8\":\"8px\",\"10\":\"10px\",\"12\":\"12px\",\"14\":\"14px\",\"16\":\"16px\",\"18\":\"18px\",\"20\":\"20px\",\"24\":\"24px\",\"32\":\"32px\",\"40\":\"40px\",\"48\":\"48px\",\"56\":\"56px\",\"64\":\"64px\",\"80\":\"80px\",\"100\":\"100px\",\"120\":\"120px\",\"140\":\"140px\",\"160\":\"160px\",\"180\":\"180px\",\"200\":\"200px\",\"minus6\":\"-6px\",\"minus4\":\"-4px\",\"minus2\":\"-2px\"},\"gap\":{\"positive-50\":\"2px\",\"positive-100\":\"4px\",\"positive-150\":\"6px\",\"positive-200\":\"8px\",\"positive-300\":\"12px\",\"positive-400\":\"16px\",\"positive-500\":\"20px\",\"positive-600\":\"24px\",\"positive-700\":\"32px\",\"positive-800\":\"40px\",\"positive-900\":\"48px\"},\"shadow\":{\"normal\":[\"0px 2px 12px 0px rgba(0, 0, 0, 0.08), 0px 1px 8px 0px rgba(0, 0, 0, 0.06), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)\",\"0px 2px 12px 0px rgba(0, 0, 0, 0.24), 0px 1px 8px 0px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.2)\"],\"strong\":[\"0px 6px 16px 0px rgba(0, 0, 0, 0.12), 0px 4px 12px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 6px 16px 0px rgba(0, 0, 0, 0.36), 0px 4px 12px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"],\"heavy\":[\"0px 16px 20px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 16px 20px 0px rgba(0, 0, 0, 0.36), 0px 8px 16px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"]},\"iconSize\":{\"xs\":\"16px\",\"s\":\"20px\",\"m\":\"24px\",\"l\":\"32px\",\"xl\":\"40px\"}}", "import { useRecoilValue, useSetRecoilState } from 'recoil';\nimport { vars } from '../generated/vars';\nimport { Appearance } from 'react-native';\nimport { themeAtoms } from '../store/theme';\n\nexport type Theme = 'dark' | 'light' | 'sys';\n\nexport const useSetTheme = () => {\n const setThemeRecoilState = useSetRecoilState(themeAtoms);\n\n const setTheme = (theme: Theme) => {\n setThemeRecoilState(theme);\n };\n\n return { setTheme };\n};\n\nexport type ColorType = typeof vars.color.light;\n\nexport const useColor = <T>(\n StyleSheetFunction: (color: ColorType) => T,\n): { styles: T; color: ColorType } => {\n const theme = useRecoilValue(themeAtoms);\n\n const colorToken = (() => {\n if (theme === 'sys') {\n const colorScheme = Appearance.getColorScheme();\n\n if (colorScheme) {\n return vars.color[colorScheme];\n }\n\n // colorScheme\uC774 \uC5C6\uB294 \uACBD\uC6B0 light \uD14C\uB9C8\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4.\n return vars.color.light;\n } else {\n return vars.color[theme];\n }\n })();\n\n return { styles: StyleSheetFunction(colorToken), color: colorToken };\n};\n\nexport const MMKV_KEY = 'MMKV_KEY_THEME';\n", "import { atom } from 'recoil';\nimport { Theme } from '../color';\n\nexport const themeAtoms = atom<Theme>({\n key: 'themeAtoms',\n default: 'sys',\n});\n", "import { useRecoilValue } from 'recoil';\nimport { themeAtoms } from '../store/theme';\nimport { Appearance } from 'react-native';\n\nexport const useDarkTheme = () => {\n const theme = useRecoilValue(themeAtoms);\n\n return {\n isDarkTheme: theme === 'dark' || (theme === 'sys' && Appearance.getColorScheme() === 'dark'),\n /**\n * darkMode\uB97C \uAD6C\uBD84\uD558\uACE0 \uC2F6\uB2E4\uBA74 theme\uB9D0\uACE0 isDarkTheme\uB97C \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694.\n */\n theme,\n };\n};\n"],
5
- "mappings": ";;;;AAAO,IAAM,OAAO,EAAC,SAAQ,EAAC,SAAQ,EAAC,4BAA2B,WAAU,kCAAiC,WAAU,yBAAwB,WAAU,+BAA8B,WAAU,yBAAwB,WAAU,+BAA8B,WAAU,0BAAyB,WAAU,gCAA+B,WAAU,6BAA4B,WAAU,mCAAkC,WAAU,yCAAwC,WAAU,sCAAqC,WAAU,uBAAsB,uBAAsB,6BAA4B,0BAAyB,oBAAmB,0BAAyB,0BAAyB,0BAAyB,oBAAmB,0BAAyB,0BAAyB,0BAAyB,qBAAoB,yBAAwB,2BAA0B,0BAAyB,wBAAuB,0BAAyB,yBAAwB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", "Appearance", "useRecoilValue", "Appearance"]
4
+ "sourcesContent": ["export const vars = {\"color\":{\"light\":{\"neutral-container-lowest\":\"#ffffff\",\"neutral-container-lowest-hover\":\"#F9F9FA\",\"neutral-container-low\":\"#F9F9FA\",\"neutral-container-low-hover\":\"#F6F6F7\",\"neutral-container-mid\":\"#F6F6F7\",\"neutral-container-mid-hover\":\"#F1F1F2\",\"neutral-container-high\":\"#EDEEF0\",\"neutral-container-high-hover\":\"#E3E3E6\",\"neutral-container-highest\":\"#E9E9EB\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#ffffff\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.06)\",\"neutral-fill-low\":\"rgba(109,109,112,0.04)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.08)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"neutral-fill-high\":\"rgba(109,109,112,0.2)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.28)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#1E1E1F\",\"neutral-label-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-label-tertiary\":\"rgba(109,109,112,0.48)\",\"neutral-label-quaternary\":\"rgba(109,109,112,0.24)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"neutral-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"neutral-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"neutral-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"neutral-border-opaque-strong\":\"#1E1E1F\",\"neutral-border-opaque-normal\":\"#D7D7D9\",\"neutral-border-opaque-subtle\":\"#E9E9EB\",\"inverse-container-lowest\":\"#1E1E1F\",\"inverse-container-lowest-hover\":\"#272729\",\"inverse-container-low\":\"#272729\",\"inverse-container-low-hover\":\"#313133\",\"inverse-container-mid\":\"#313133\",\"inverse-container-mid-hover\":\"#39393B\",\"inverse-container-high\":\"#313133\",\"inverse-container-high-hover\":\"#4A4A4D\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#4A4A4D\",\"inverse-fill-mid\":\"#ffffff\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"inverse-label-primary\":\"#ffffff\",\"inverse-label-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-label-tertiary\":\"rgba(233,233,235,0.32)\",\"inverse-label-quaternary\":\"rgba(233,233,235,0.2)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"inverse-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"inverse-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"inverse-border-opaque-strong\":\"#ffffff\",\"inverse-border-opaque-normal\":\"#58595C\",\"inverse-border-opaque-subtle\":\"#313133\",\"brand-container-mid\":\"#14371B\",\"brand-container-mid-hover\":\"#082C11\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#14371B\",\"brand-fill-mid-hover\":\"#082C11\",\"brand-fill-low\":\"#F6FFF1\",\"brand-fill-low-hover\":\"#EBFFE7\",\"brand-label-primary\":\"#0C893B\",\"brand-label-secondary\":\"#14371B\",\"brand-label-variation-secondary\":\"#14371B\",\"brand-border-opaque-normal\":\"#14371B\",\"brand-border-opaque-strong\":\"#0C893B\",\"brandinverse-label-primary\":\"#C3FFD0\",\"brandinverse-label-secondary\":\"#ffffff\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FE8F16\",\"accent-label-yellow\":\"#FFCC00\",\"accent-label-mint\":\"#02B0B0\",\"accent-label-cyan\":\"#40B3FF\",\"accent-label-purple\":\"#B450E6\",\"accent-label-pink\":\"#FF3377\",\"accent-container-primary\":\"#FFB77C\",\"function-container-positive\":\"#30BF48\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#DB2323\",\"function-container-caution\":\"#FE8F16\",\"function-container-highlight\":\"#EAFFB6\",\"function-container-selection\":\"rgba(4,17,102,0.08)\",\"function-container-drag\":\"rgba(4,17,102,0.12)\",\"function-label-positive\":\"#30BF48\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FE8F16\",\"function-label-link\":\"#1A79B8\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"},\"dark\":{\"neutral-container-lowest\":\"#1E1E1F\",\"neutral-container-lowest-hover\":\"#272729\",\"neutral-container-low\":\"#272729\",\"neutral-container-low-hover\":\"#313133\",\"neutral-container-mid\":\"#313133\",\"neutral-container-mid-hover\":\"#39393B\",\"neutral-container-high\":\"#313133\",\"neutral-container-high-hover\":\"#4A4A4D\",\"neutral-container-highest\":\"#4A4A4D\",\"neutral-container-static-lowest\":\"#ffffff\",\"neutral-container-static-lowest-hover\":\"#F9F9FA\",\"neutral-container-variation-lowest\":\"#272729\",\"neutral-fill-lowest\":\"rgba(109,109,112,0)\",\"neutral-fill-lowest-hover\":\"rgba(109,109,112,0.12)\",\"neutral-fill-low\":\"rgba(109,109,112,0.08)\",\"neutral-fill-low-hover\":\"rgba(109,109,112,0.2)\",\"neutral-fill-mid\":\"rgba(109,109,112,0.16)\",\"neutral-fill-mid-hover\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high\":\"rgba(109,109,112,0.32)\",\"neutral-fill-high-hover\":\"rgba(109,109,112,0.44)\",\"neutral-fill-highest\":\"rgba(109,109,112,0.72)\",\"neutral-label-primary\":\"#ffffff\",\"neutral-label-secondary\":\"rgba(233,233,235,0.64)\",\"neutral-label-tertiary\":\"rgba(233,233,235,0.32)\",\"neutral-label-quaternary\":\"rgba(233,233,235,0.2)\",\"neutral-label-static-primary\":\"#1E1E1F\",\"neutral-label-static-secondary\":\"rgba(109,109,112,0.8)\",\"neutral-border-overlay-strong\":\"rgba(233,233,235,0.64)\",\"neutral-border-overlay-normal\":\"rgba(233,233,235,0.28)\",\"neutral-border-overlay-subtle\":\"rgba(233,233,235,0.2)\",\"neutral-border-overlay-hint\":\"rgba(233,233,235,0.12)\",\"neutral-border-opaque-strong\":\"#ffffff\",\"neutral-border-opaque-normal\":\"#58595C\",\"neutral-border-opaque-subtle\":\"#313133\",\"inverse-container-lowest\":\"#ffffff\",\"inverse-container-lowest-hover\":\"#F9F9FA\",\"inverse-container-low\":\"#F9F9FA\",\"inverse-container-low-hover\":\"#F6F6F7\",\"inverse-container-mid\":\"#F6F6F7\",\"inverse-container-mid-hover\":\"#F1F1F2\",\"inverse-container-high\":\"#EDEEF0\",\"inverse-container-high-hover\":\"#E3E3E6\",\"inverse-container-static-high\":\"#313133\",\"inverse-container-static-high-hover\":\"#58595C\",\"inverse-container-highest\":\"#E9E9EB\",\"inverse-fill-mid\":\"rgba(233,233,235,0.24)\",\"inverse-fill-mid-hover\":\"rgba(109,109,112,0.16)\",\"inverse-label-primary\":\"#1E1E1F\",\"inverse-label-secondary\":\"rgba(109,109,112,0.8)\",\"inverse-label-tertiary\":\"rgba(109,109,112,0.48)\",\"inverse-label-quaternary\":\"rgba(109,109,112,0.24)\",\"inverse-label-static-primary\":\"#ffffff\",\"inverse-label-static-secondary\":\"rgba(233,233,235,0.64)\",\"inverse-border-overlay-strong\":\"rgba(109,109,112,0.64)\",\"inverse-border-overlay-normal\":\"rgba(109,109,112,0.24)\",\"inverse-border-overlay-subtle\":\"rgba(109,109,112,0.16)\",\"inverse-border-overlay-hint\":\"rgba(109,109,112,0.12)\",\"inverse-border-opaque-strong\":\"#1E1E1F\",\"inverse-border-opaque-normal\":\"#D7D7D9\",\"inverse-border-opaque-subtle\":\"#E9E9EB\",\"brand-container-mid\":\"#236638\",\"brand-container-mid-hover\":\"#00733E\",\"brand-container-high\":\"#0C893B\",\"brand-fill-mid\":\"#236638\",\"brand-fill-mid-hover\":\"#00733E\",\"brand-fill-low\":\"#1A5E31\",\"brand-fill-low-hover\":\"#236638\",\"brand-label-primary\":\"#C3FFD0\",\"brand-label-secondary\":\"#ffffff\",\"brand-label-variation-secondary\":\"rgba(255,255,255,0.8)\",\"brand-border-opaque-normal\":\"#ffffff\",\"brand-border-opaque-strong\":\"#C3FFD0\",\"brandinverse-label-primary\":\"#0C893B\",\"brandinverse-label-secondary\":\"#14371B\",\"brandinverse-label-static-primary\":\"#C3FFD0\",\"accent-label-primary\":\"#FF9B3E\",\"accent-label-yellow\":\"#FFD739\",\"accent-label-mint\":\"#00CCCC\",\"accent-label-cyan\":\"#6AC4FF\",\"accent-label-purple\":\"#C978F2\",\"accent-label-pink\":\"#FF6095\",\"accent-container-primary\":\"#B46200\",\"function-container-positive\":\"#5DDF73\",\"function-container-negative\":\"#FF3333\",\"function-container-negative-hover\":\"#FF6060\",\"function-container-caution\":\"#FF9B3E\",\"function-container-highlight\":\"#394D00\",\"function-container-selection\":\"rgba(255,255,255,0.12)\",\"function-container-drag\":\"rgba(255,255,255,0.16)\",\"function-label-positive\":\"#5DDF73\",\"function-label-negative\":\"#FF3333\",\"function-label-caution\":\"#FF9B3E\",\"function-label-link\":\"#6AC4FF\",\"cover-dim-page\":\"rgba(0,0,0,0.48)\"}},\"radius\":{\"xxs\":\"2px\",\"xs\":\"4px\",\"s\":\"6px\",\"m\":\"8px\",\"l\":\"10px\",\"xl\":\"12px\",\"xxl\":\"200px\"},\"opacity\":{\"0\":\"0%\",\"1\":\"1%\",\"4\":\"4%\",\"8\":\"8%\",\"12\":\"12%\",\"16\":\"16%\",\"20\":\"20%\",\"24\":\"24%\",\"28\":\"28%\",\"32\":\"32%\",\"36\":\"36%\",\"40\":\"40%\",\"44\":\"44%\",\"48\":\"48%\",\"50\":\"50%\",\"56\":\"56%\",\"64\":\"64%\",\"72\":\"72%\",\"80\":\"80%\"},\"padding\":{\"component-50\":\"2px\",\"component-100\":\"4px\",\"component-150\":\"6px\",\"component-200\":\"8px\",\"component-300\":\"12px\",\"component-400\":\"16px\",\"component-500\":\"20px\",\"component-600\":\"24px\",\"component-700\":\"32px\",\"component-800\":\"40px\",\"component-900\":\"48px\",\"section-50\":\"20px\",\"section-100\":\"24px\",\"section-200\":\"32px\",\"section-300\":\"40px\",\"section-400\":\"48px\",\"section-500\":\"56px\",\"section-600\":\"64px\",\"section-700\":\"80px\",\"section-800\":\"100px\",\"section-900\":\"120px\"},\"size\":{\"0\":\"0px\",\"1\":\"1px\",\"2\":\"2px\",\"3\":\"3px\",\"4\":\"4px\",\"6\":\"6px\",\"8\":\"8px\",\"10\":\"10px\",\"12\":\"12px\",\"14\":\"14px\",\"16\":\"16px\",\"18\":\"18px\",\"20\":\"20px\",\"24\":\"24px\",\"32\":\"32px\",\"40\":\"40px\",\"48\":\"48px\",\"56\":\"56px\",\"64\":\"64px\",\"80\":\"80px\",\"100\":\"100px\",\"120\":\"120px\",\"140\":\"140px\",\"160\":\"160px\",\"180\":\"180px\",\"200\":\"200px\",\"minus6\":\"-6px\",\"minus4\":\"-4px\",\"minus2\":\"-2px\"},\"gap\":{\"positive-50\":\"2px\",\"positive-100\":\"4px\",\"positive-150\":\"6px\",\"positive-200\":\"8px\",\"positive-300\":\"12px\",\"positive-400\":\"16px\",\"positive-500\":\"20px\",\"positive-600\":\"24px\",\"positive-700\":\"32px\",\"positive-800\":\"40px\",\"positive-900\":\"48px\"},\"shadow\":{\"normal\":[\"0px 2px 12px 0px rgba(0, 0, 0, 0.08), 0px 1px 8px 0px rgba(0, 0, 0, 0.06), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)\",\"0px 2px 12px 0px rgba(0, 0, 0, 0.24), 0px 1px 8px 0px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.2)\"],\"strong\":[\"0px 6px 16px 0px rgba(0, 0, 0, 0.12), 0px 4px 12px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 6px 16px 0px rgba(0, 0, 0, 0.36), 0px 4px 12px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"],\"heavy\":[\"0px 16px 20px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 0px 8px 0px rgba(0, 0, 0, 0.08)\",\"0px 16px 20px 0px rgba(0, 0, 0, 0.36), 0px 8px 16px 0px rgba(0, 0, 0, 0.24), 0px 0px 8px 0px rgba(0, 0, 0, 0.24)\"]},\"iconSize\":{\"xs\":\"16px\",\"s\":\"20px\",\"m\":\"24px\",\"l\":\"32px\",\"xl\":\"40px\"}}", "import { useRecoilState, useRecoilValue } from 'recoil';\nimport { vars } from '../generated/vars';\nimport { appAppearanceAtom, systemAppearanceAtom } from '../store/theme';\n\nexport type ColorType = typeof vars.color.light;\nexport type EffectiveAppearance = 'dark' | 'light';\nexport type AppAppearance = EffectiveAppearance | 'sys';\nexport type SystemAppearance = EffectiveAppearance | 'notDetermined';\n\nexport const useAppearance = () => {\n const [systemAppearance, setSystemAppearance] = useRecoilState(systemAppearanceAtom);\n const [appAppearance, setAppAppearance] = useRecoilState(appAppearanceAtom);\n\n return {\n appAppearance,\n systemAppearance,\n setAppAppearance,\n setSystemAppearance,\n };\n};\n\nexport const useColor = <T>(\n StyleSheetFunction: (color: ColorType) => T,\n): { styles: T; color: ColorType } => {\n const appAppearance = useRecoilValue(appAppearanceAtom);\n const systemAppearance = useRecoilValue(systemAppearanceAtom);\n\n const effectiveAppearance: EffectiveAppearance = (() => {\n if (appAppearance === 'sys') {\n if (systemAppearance === 'notDetermined') {\n return 'light';\n }\n\n return systemAppearance;\n }\n\n return appAppearance;\n })();\n\n const colorToken = vars.color[effectiveAppearance];\n\n return {\n styles: StyleSheetFunction(colorToken),\n color: colorToken,\n };\n};\n\nexport const MMKV_KEY = 'MMKV_KEY_THEME';\n", "import { atom } from 'recoil';\nimport { AppAppearance, SystemAppearance } from '../color';\n\nexport const appAppearanceAtom = atom<AppAppearance>({\n key: 'themeAtoms',\n default: 'sys',\n});\n\nexport const systemAppearanceAtom = atom<SystemAppearance>({\n key: 'systemThemeAtoms',\n default: 'notDetermined',\n});\n", "import { useRecoilValue } from 'recoil';\nimport { appAppearanceAtom } from '../store/theme';\nimport { Appearance } from 'react-native';\n\nexport const useDarkTheme = () => {\n const theme = useRecoilValue(appAppearanceAtom);\n\n return {\n isDarkTheme: theme === 'dark' || (theme === 'sys' && Appearance.getColorScheme() === 'dark'),\n /**\n * darkMode\uB97C \uAD6C\uBD84\uD558\uACE0 \uC2F6\uB2E4\uBA74 theme\uB9D0\uACE0 isDarkTheme\uB97C \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694.\n */\n theme,\n };\n};\n"],
5
+ "mappings": ";;;;AAAO,IAAM,OAAO,EAAC,SAAQ,EAAC,SAAQ,EAAC,4BAA2B,WAAU,kCAAiC,WAAU,yBAAwB,WAAU,+BAA8B,WAAU,yBAAwB,WAAU,+BAA8B,WAAU,0BAAyB,WAAU,gCAA+B,WAAU,6BAA4B,WAAU,mCAAkC,WAAU,yCAAwC,WAAU,sCAAqC,WAAU,uBAAsB,uBAAsB,6BAA4B,0BAAyB,oBAAmB,0BAAyB,0BAAyB,0BAAyB,oBAAmB,0BAAyB,0BAAyB,0BAAyB,qBAAoB,yBAAwB,2BAA0B,0BAAyB,wBAAuB,0BAAyB,yBAAwB,WAAU,2BAA0B,yBAAwB,0BAAyB,0BAAyB,4BAA2B,0BAAyB,gCAA+B,WAAU,kCAAiC,yBAAwB,iCAAgC,0BAAyB,iCAAgC,0BAAyB,iCAAgC,0BAAyB,+BAA8B,0BAAyB,gCAA+B,WAAU,gCAA+B,WAAU,gCAA+B,WAAU,4BAA2B,WAAU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O,KAAI,QAAO,MAAK,OAAM,EAAC;;;ACAh5T,SAAS,gBAAgB,sBAAsB;;;ACA/C,SAAS,YAAY;AAGd,IAAM,oBAAoB,KAAoB;AAAA,EACnD,KAAK;AAAA,EACL,SAAS;AACX,CAAC;AAEM,IAAM,uBAAuB,KAAuB;AAAA,EACzD,KAAK;AAAA,EACL,SAAS;AACX,CAAC;;;ADFM,IAAM,gBAAgB,6BAAM;AACjC,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,eAAe,oBAAoB;AACnF,QAAM,CAAC,eAAe,gBAAgB,IAAI,eAAe,iBAAiB;AAE1E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GAV6B;AAYtB,IAAM,WAAW,wBACtB,uBACoC;AACpC,QAAM,gBAAgB,eAAe,iBAAiB;AACtD,QAAM,mBAAmB,eAAe,oBAAoB;AAE5D,QAAM,uBAA4C,MAAM;AACtD,QAAI,kBAAkB,OAAO;AAC3B,UAAI,qBAAqB,iBAAiB;AACxC,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,GAAG;AAEH,QAAM,aAAa,KAAK,MAAM,mBAAmB;AAEjD,SAAO;AAAA,IACL,QAAQ,mBAAmB,UAAU;AAAA,IACrC,OAAO;AAAA,EACT;AACF,GAxBwB;AA0BjB,IAAM,WAAW;;;AE/CxB,SAAS,kBAAAA,uBAAsB;AAE/B,SAAS,kBAAkB;AAEpB,IAAM,eAAe,6BAAM;AAChC,QAAM,QAAQC,gBAAe,iBAAiB;AAE9C,SAAO;AAAA,IACL,aAAa,UAAU,UAAW,UAAU,SAAS,WAAW,eAAe,MAAM;AAAA;AAAA;AAAA;AAAA,IAIrF;AAAA,EACF;AACF,GAV4B;",
6
+ "names": ["useRecoilValue", "useRecoilValue"]
7
7
  }
@@ -1,2 +1,3 @@
1
- import { Theme } from '../color';
2
- export declare const themeAtoms: import("recoil").RecoilState<Theme>;
1
+ import { AppAppearance, SystemAppearance } from '../color';
2
+ export declare const appAppearanceAtom: import("recoil").RecoilState<AppAppearance>;
3
+ export declare const systemAppearanceAtom: import("recoil").RecoilState<SystemAppearance>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/design-token-rn",
3
- "version": "1.1.12",
3
+ "version": "1.2.1",
4
4
  "devDependencies": {
5
5
  "@eslint/js": "^9.22.0",
6
6
  "@liner-fe/design-token-primitive": "workspace:^",
@@ -1,43 +1,48 @@
1
- import { useRecoilValue, useSetRecoilState } from 'recoil';
1
+ import { useRecoilState, useRecoilValue } from 'recoil';
2
2
  import { vars } from '../generated/vars';
3
- import { Appearance } from 'react-native';
4
- import { themeAtoms } from '../store/theme';
3
+ import { appAppearanceAtom, systemAppearanceAtom } from '../store/theme';
5
4
 
6
- export type Theme = 'dark' | 'light' | 'sys';
7
-
8
- export const useSetTheme = () => {
9
- const setThemeRecoilState = useSetRecoilState(themeAtoms);
10
-
11
- const setTheme = (theme: Theme) => {
12
- setThemeRecoilState(theme);
5
+ export type ColorType = typeof vars.color.light;
6
+ export type EffectiveAppearance = 'dark' | 'light';
7
+ export type AppAppearance = EffectiveAppearance | 'sys';
8
+ export type SystemAppearance = EffectiveAppearance | 'notDetermined';
9
+
10
+ export const useAppearance = () => {
11
+ const [systemAppearance, setSystemAppearance] = useRecoilState(systemAppearanceAtom);
12
+ const [appAppearance, setAppAppearance] = useRecoilState(appAppearanceAtom);
13
+
14
+ return {
15
+ appAppearance,
16
+ systemAppearance,
17
+ setAppAppearance,
18
+ setSystemAppearance,
13
19
  };
14
-
15
- return { setTheme };
16
20
  };
17
21
 
18
- export type ColorType = typeof vars.color.light;
19
-
20
22
  export const useColor = <T>(
21
23
  StyleSheetFunction: (color: ColorType) => T,
22
24
  ): { styles: T; color: ColorType } => {
23
- const theme = useRecoilValue(themeAtoms);
24
-
25
- const colorToken = (() => {
26
- if (theme === 'sys') {
27
- const colorScheme = Appearance.getColorScheme();
25
+ const appAppearance = useRecoilValue(appAppearanceAtom);
26
+ const systemAppearance = useRecoilValue(systemAppearanceAtom);
28
27
 
29
- if (colorScheme) {
30
- return vars.color[colorScheme];
28
+ const effectiveAppearance: EffectiveAppearance = (() => {
29
+ if (appAppearance === 'sys') {
30
+ if (systemAppearance === 'notDetermined') {
31
+ return 'light';
31
32
  }
32
33
 
33
- // colorScheme이 없는 경우 light 테마를 반환합니다.
34
- return vars.color.light;
35
- } else {
36
- return vars.color[theme];
34
+ return systemAppearance;
37
35
  }
36
+
37
+ return appAppearance;
38
38
  })();
39
39
 
40
- return { styles: StyleSheetFunction(colorToken), color: colorToken };
40
+ const colorToken = vars.color[effectiveAppearance];
41
+
42
+ return {
43
+ styles: StyleSheetFunction(colorToken),
44
+ color: colorToken,
45
+ };
41
46
  };
42
47
 
43
48
  export const MMKV_KEY = 'MMKV_KEY_THEME';
@@ -1,9 +1,9 @@
1
1
  import { useRecoilValue } from 'recoil';
2
- import { themeAtoms } from '../store/theme';
2
+ import { appAppearanceAtom } from '../store/theme';
3
3
  import { Appearance } from 'react-native';
4
4
 
5
5
  export const useDarkTheme = () => {
6
- const theme = useRecoilValue(themeAtoms);
6
+ const theme = useRecoilValue(appAppearanceAtom);
7
7
 
8
8
  return {
9
9
  isDarkTheme: theme === 'dark' || (theme === 'sys' && Appearance.getColorScheme() === 'dark'),
@@ -1,7 +1,12 @@
1
1
  import { atom } from 'recoil';
2
- import { Theme } from '../color';
2
+ import { AppAppearance, SystemAppearance } from '../color';
3
3
 
4
- export const themeAtoms = atom<Theme>({
4
+ export const appAppearanceAtom = atom<AppAppearance>({
5
5
  key: 'themeAtoms',
6
6
  default: 'sys',
7
7
  });
8
+
9
+ export const systemAppearanceAtom = atom<SystemAppearance>({
10
+ key: 'systemThemeAtoms',
11
+ default: 'notDetermined',
12
+ });