@owp/core 2.5.5 → 2.5.7

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 (65) hide show
  1. package/configs/theme.d.ts +3 -0
  2. package/configs/theme.js +1 -0
  3. package/dist/_virtual/index10.js +2 -2
  4. package/dist/_virtual/index11.js +2 -2
  5. package/dist/_virtual/index12.js +2 -2
  6. package/dist/_virtual/index13.js +2 -2
  7. package/dist/_virtual/index15.js +2 -2
  8. package/dist/_virtual/index16.js +4 -4
  9. package/dist/_virtual/index17.js +4 -4
  10. package/dist/_virtual/index18.js +4 -4
  11. package/dist/_virtual/index19.js +4 -4
  12. package/dist/_virtual/index5.js +2 -2
  13. package/dist/configs/defaultConfig.js +1 -1
  14. package/dist/configs/theme.js +28 -0
  15. package/dist/configs/theme.js.map +1 -0
  16. package/dist/features/themePreview/components/ThemePreviewColorField.js +279 -208
  17. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  18. package/dist/features/themePreview/configs/presets.js +6 -38
  19. package/dist/features/themePreview/configs/presets.js.map +1 -1
  20. package/dist/features/themePreview/configs/previewStorage.js +28 -27
  21. package/dist/features/themePreview/configs/previewStorage.js.map +1 -1
  22. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +166 -154
  23. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  24. package/dist/features/themePreview/hooks/useThemePreview.js +202 -157
  25. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  26. package/dist/features/themePreview/utils/themePreviewExport.js +276 -67
  27. package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -1
  28. package/dist/features/themePreview.js +52 -52
  29. package/dist/hooks/useCommonCodeList.js +31 -8
  30. package/dist/hooks/useCommonCodeList.js.map +1 -1
  31. package/dist/hooks.js +81 -80
  32. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  37. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  38. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  39. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  40. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  41. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  42. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  43. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  44. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  45. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  46. package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
  47. package/dist/owp-app.css +1 -1
  48. package/dist/types/configs/theme/index.d.ts +6 -0
  49. package/dist/types/features/themePreview/configs/index.d.ts +1 -1
  50. package/dist/types/features/themePreview/configs/presets.d.ts +0 -1
  51. package/dist/types/features/themePreview/configs/previewStorage.d.ts +1 -0
  52. package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +2 -1
  53. package/dist/types/features/themePreview/utils/index.d.ts +1 -1
  54. package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +38 -1083
  55. package/dist/types/hooks/useCommonCodeList.d.ts +18 -1
  56. package/dist/types/utils/index.d.ts +1 -0
  57. package/dist/types/utils/treeGridYnUtils.d.ts +15 -0
  58. package/dist/types/utils/zipUtil.d.ts +1 -0
  59. package/dist/utils/treeGridYnUtils.js +9 -0
  60. package/dist/utils/treeGridYnUtils.js.map +1 -0
  61. package/dist/utils/zipUtil.js +38 -36
  62. package/dist/utils/zipUtil.js.map +1 -1
  63. package/dist/utils.js +59 -55
  64. package/dist/utils.js.map +1 -1
  65. package/package.json +2 -1
@@ -1,41 +1,55 @@
1
- var pe = Object.defineProperty;
2
- var n = (a, r) => pe(a, "name", { value: r, configurable: !0 });
3
- import { jsx as t, jsxs as f } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
- import { defaultSnackbarTheme as ve } from "../configs/snackbar.js";
5
- import { themesConfig as ge } from "../configs/presets.js";
6
- import { defaultSettingsConfig as we } from "../configs/settings.js";
7
- import { useConfirm as xe } from "../../../hooks/useConfirm.js";
8
- import { readZipEntryJson as Ce, saveAsZipFile as Se } from "../../../utils/zipUtil.js";
9
- import Te from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DownloadOutlined.js";
10
- import Pe from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestoreOutlined.js";
11
- import Ee from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SaveOutlined.js";
12
- import be from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UploadFileOutlined.js";
13
- import { Button as h, Typography as W, TextField as ye } from "@mui/material";
14
- import { useDialogs as Ae } from "@toolpad/core/useDialogs";
15
- import { enqueueSnackbar as d } from "notistack";
16
- import { useState as _, useRef as m, useEffect as p } from "react";
1
+ var ve = Object.defineProperty;
2
+ var n = (r, i) => ve(r, "name", { value: i, configurable: !0 });
3
+ import { jsx as t, jsxs as u } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
+ import { defaultSnackbarTheme as ge } from "../configs/snackbar.js";
5
+ import { themesConfig as we } from "../configs/presets.js";
6
+ import { defaultSettingsConfig as xe } from "../configs/settings.js";
7
+ import { useConfirm as Ce } from "../../../hooks/useConfirm.js";
8
+ import { readZipEntryJson as Pe, saveAsZipFile as Te } from "../../../utils/zipUtil.js";
9
+ import be from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DownloadOutlined.js";
10
+ import Ee from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestoreOutlined.js";
11
+ import Se from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SaveOutlined.js";
12
+ import ye from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UploadFileOutlined.js";
13
+ import { Button as h, Typography as W, TextField as Ae } from "@mui/material";
14
+ import { useDialogs as Fe } from "@toolpad/core/useDialogs";
15
+ import { enqueueSnackbar as m } from "notistack";
16
+ import { useState as k, useRef as f, useEffect as v } from "react";
17
17
  import { useThemePreview as Le } from "../hooks/useThemePreview.js";
18
- import { ThemePreviewControls as Fe } from "../components/ThemePreviewControls.js";
18
+ import { ThemePreviewControls as ke } from "../components/ThemePreviewControls.js";
19
19
  import { ThemePreviewCanvas as _e } from "../components/ThemePreviewCanvas.js";
20
- import { resetThemePreviewSessionState as ke } from "../utils/themePreviewSettings.js";
21
- import { createThemePreviewExportData as Ie } from "../utils/themePreviewExport.js";
20
+ import { resetThemePreviewSessionState as Ie } from "../utils/themePreviewSettings.js";
21
+ import { createThemePreviewExportData as Me, createThemePreviewAppConfigFiles as Ne } from "../utils/themePreviewExport.js";
22
22
  import { OwpDialog as j } from "../../../components/OwpDialog/OwpDialog.js";
23
- const Me = ge, De = ".owp,.zip,application/zip", V = 300 * 1e3, Ne = 2 * 1e3, Re = 15 * 1e3;
24
- function Oe(a) {
25
- return Object.entries(a).map(([r, u]) => ({
26
- fileName: r,
27
- blob: new Blob([JSON.stringify(u, null, 2)], {
28
- type: "application/json"
29
- })
30
- }));
23
+ const De = we, Re = ".owp,.zip,application/zip", V = 300 * 1e3, Oe = 2 * 1e3, Ve = 15 * 1e3;
24
+ function We(r) {
25
+ const i = Me(r);
26
+ return [
27
+ ...Ne(r).map(({ fileName: l, content: p }) => ({
28
+ fileName: l,
29
+ blob: new Blob([p], {
30
+ type: "text/plain;charset=utf-8"
31
+ })
32
+ })),
33
+ ...Object.entries(i).map(([l, p]) => ({
34
+ fileName: `preview/${l}.json`,
35
+ blob: new Blob([JSON.stringify(p, null, 2)], {
36
+ type: "application/json"
37
+ })
38
+ }))
39
+ ];
31
40
  }
32
- n(Oe, "createThemePreviewArchiveFiles");
33
- function Ve(a) {
34
- const r = a.trim().replace(/[^0-9A-Za-z가-힣 _-]+/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^[-_]+|[-_]+$/g, "");
35
- return r ? `theme-preview-config-${r}` : "theme-preview-config";
41
+ n(We, "createThemePreviewArchiveFiles");
42
+ function je(r) {
43
+ var i;
44
+ return (r == null ? void 0 : r.defaultSnackbarProviderProps) ?? ((i = r == null ? void 0 : r.defaultSettingsConfig) == null ? void 0 : i.snackbarProviderProps);
36
45
  }
37
- n(Ve, "getThemePreviewConfigFileTitle");
38
- const v = {
46
+ n(je, "getThemePreviewArchiveProviderProps");
47
+ function ze(r) {
48
+ const i = r.trim().replace(/[^0-9A-Za-z가-힣 _-]+/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^[-_]+|[-_]+$/g, "");
49
+ return i ? `theme-preview-config-${i}` : "theme-preview-config";
50
+ }
51
+ n(ze, "getThemePreviewConfigFileTitle");
52
+ const g = {
39
53
  "&.MuiButton-root": {
40
54
  fontSize: "1.3rem",
41
55
  letterSpacing: "0.04rem"
@@ -54,7 +68,7 @@ const v = {
54
68
  minHeight: 42,
55
69
  px: 2.25,
56
70
  whiteSpace: "nowrap"
57
- }, L = {
71
+ }, F = {
58
72
  "&.Mui-disabled": {
59
73
  backgroundColor: "#e5e7eb",
60
74
  borderColor: "#e5e7eb",
@@ -67,7 +81,7 @@ const v = {
67
81
  backgroundColor: "#1ea3e6",
68
82
  border: "1px solid #1ea3e6",
69
83
  color: "#ffffff"
70
- }, F = {
84
+ }, L = {
71
85
  "&.Mui-disabled": {
72
86
  backgroundColor: "#ffffff",
73
87
  borderColor: "#d1d5db",
@@ -80,35 +94,35 @@ const v = {
80
94
  backgroundColor: "#ffffff",
81
95
  border: "1px solid #111827",
82
96
  color: "#111827"
83
- }, We = "#111827", je = /* @__PURE__ */ n(({
84
- open: a,
85
- payload: r,
86
- onClose: u
97
+ }, Be = "#111827", Ue = /* @__PURE__ */ n(({
98
+ open: r,
99
+ payload: i,
100
+ onClose: w
87
101
  }) => {
88
- const [g, S] = _((r == null ? void 0 : r.initialFileName) ?? "");
102
+ const [l, p] = k((i == null ? void 0 : i.initialFileName) ?? "");
89
103
  return /* @__PURE__ */ t(
90
104
  j,
91
105
  {
92
106
  title: "설정파일 저장",
93
- open: a,
107
+ open: r,
94
108
  maxWidth: "xs",
95
- onClose: /* @__PURE__ */ n(() => u(void 0), "onClose"),
96
- onConfirm: /* @__PURE__ */ n(() => u(g), "onConfirm"),
109
+ onClose: /* @__PURE__ */ n(() => w(void 0), "onClose"),
110
+ onConfirm: /* @__PURE__ */ n(() => w(l), "onConfirm"),
97
111
  contentProps: {
98
112
  sx: {
99
113
  minWidth: 360,
100
114
  p: 3
101
115
  }
102
116
  },
103
- children: /* @__PURE__ */ f("div", { className: "flex flex-col gap-12", children: [
117
+ children: /* @__PURE__ */ u("div", { className: "flex flex-col gap-12", children: [
104
118
  /* @__PURE__ */ t(
105
- ye,
119
+ Ae,
106
120
  {
107
121
  label: "저장 이름",
108
- value: g,
122
+ value: l,
109
123
  placeholder: "저장 이름 입력",
110
- onChange: /* @__PURE__ */ n((T) => {
111
- S(T.target.value);
124
+ onChange: /* @__PURE__ */ n((b) => {
125
+ p(b.target.value);
112
126
  }, "onChange")
113
127
  }
114
128
  ),
@@ -116,23 +130,23 @@ const v = {
116
130
  ] })
117
131
  }
118
132
  );
119
- }, "ThemePreviewSaveDialog"), cn = /* @__PURE__ */ n(({
120
- open: a,
121
- payload: r,
122
- onClose: u
133
+ }, "ThemePreviewSaveDialog"), fn = /* @__PURE__ */ n(({
134
+ open: r,
135
+ payload: i,
136
+ onClose: w
123
137
  }) => {
124
- const [g, S] = _(""), [T, k] = _(!1), I = m(null), M = m(null), w = m(null), P = m(!1), D = m(Date.now()), N = m(!1), E = m(() => {
125
- }), l = m(null), z = Ae(), { confirmSave: U } = xe(), {
126
- activeSection: c,
127
- canApplyToMain: B,
128
- draftSettings: b,
129
- hasTemporaryChanges: y,
138
+ const [l, p] = k(""), [b, _] = k(!1), I = f(null), M = f(null), x = f(null), E = f(!1), N = f(Date.now()), D = f(!1), S = f(() => {
139
+ }), c = f(null), z = Fe(), { confirmSave: B } = Ce(), {
140
+ activeSection: d,
141
+ canApplyToMain: U,
142
+ draftSettings: y,
143
+ hasTemporaryChanges: A,
130
144
  hasTemporarySnapshot: H,
131
145
  presetOptions: K,
132
146
  selectedModes: Z,
133
147
  selectedPresetKeys: q,
134
- setActiveSection: J,
135
- handlePaletteValueChange: $,
148
+ setActiveSection: $,
149
+ handlePaletteValueChange: J,
136
150
  handlePaletteValuesChange: Y,
137
151
  handleApplyToMain: G,
138
152
  handleLoadSettings: Q,
@@ -140,151 +154,149 @@ const v = {
140
154
  handlePresetModeChange: ee,
141
155
  handleReset: ne,
142
156
  handleTemporaryLoad: te,
143
- handleTemporarySave: x
157
+ handleTemporarySave: C
144
158
  } = Le({
145
- initialSection: r == null ? void 0 : r.initialSection,
159
+ initialSection: i == null ? void 0 : i.initialSection,
146
160
  initialPresetKeys: {
147
161
  main: "light1",
148
162
  navbar: "light2",
149
163
  toolbar: "surfaceDark"
150
164
  },
151
- presetThemes: Me,
152
- resetTheme: we.theme
153
- }), R = c === "main" || c === "navbar" || c === "toolbar", re = R ? Z[c] : "light", ie = R ? q[c] : "", o = /* @__PURE__ */ n(() => {
154
- D.current = Date.now();
165
+ presetThemes: De,
166
+ resetTheme: xe.theme
167
+ }), R = d === "main" || d === "navbar" || d === "toolbar", re = R ? Z[d] : "light", ie = R ? q[d] : "", o = /* @__PURE__ */ n(() => {
168
+ N.current = Date.now();
155
169
  }, "handleThemePreviewInteraction"), oe = /* @__PURE__ */ n(async (e) => {
156
- const i = Ie(b);
157
- await Se(Oe(i), {
158
- type: "application/json",
159
- fileExtension: "json",
160
- fileTitle: Ve(e),
161
- archiveExtension: "owp"
170
+ await Te(We(y), {
171
+ fileTitle: ze(e),
172
+ archiveExtension: "owp",
173
+ preserveFileNames: !0
162
174
  });
163
175
  }, "handleSaveConfigFiles"), ae = /* @__PURE__ */ n(async () => {
164
- const e = await z.open(je, {
165
- initialFileName: g
176
+ const e = await z.open(Ue, {
177
+ initialFileName: l
166
178
  });
167
- e !== void 0 && (S(e), await oe(e));
179
+ e !== void 0 && (p(e), await oe(e));
168
180
  }, "handleOpenSaveDialog"), se = /* @__PURE__ */ n(() => {
169
181
  var e;
170
182
  (e = M.current) == null || e.click();
171
183
  }, "handleOpenZipFile"), le = /* @__PURE__ */ n(() => {
172
- x("manual"), d("임시 저장을 완료했습니다.", {
184
+ C("manual"), m("임시 저장을 완료했습니다.", {
173
185
  variant: "success"
174
186
  });
175
187
  }, "handleManualTemporarySave"), ce = /* @__PURE__ */ n(() => {
176
188
  if (!te()) {
177
- d("불러올 임시 저장 데이터가 없습니다.", {
189
+ m("불러올 임시 저장 데이터가 없습니다.", {
178
190
  variant: "warning"
179
191
  });
180
192
  return;
181
193
  }
182
- d("임시 저장 데이터를 불러왔습니다.", {
194
+ m("임시 저장 데이터를 불러왔습니다.", {
183
195
  variant: "success"
184
196
  });
185
197
  }, "handleManualTemporaryLoad"), de = /* @__PURE__ */ n(async () => {
186
- y && (await U({
198
+ A && (await B({
187
199
  title: "변경된 값을 저장하겠습니까?"
188
- }) ? (x("manual"), d("임시 저장되었습니다. 다시 실행하면 저장된 데이터를 불러옵니다.", {
200
+ }) ? (C("manual"), m("임시 저장되었습니다. 다시 실행하면 저장된 데이터를 불러옵니다.", {
189
201
  variant: "info"
190
- })) : ke()), u(void 0);
202
+ })) : Ie()), w(void 0);
191
203
  }, "handleDialogClose"), me = /* @__PURE__ */ n(async (e) => {
192
- var s, C;
193
- const i = (s = e.target.files) == null ? void 0 : s[0];
194
- if (i)
204
+ var s, P;
205
+ const a = (s = e.target.files) == null ? void 0 : s[0];
206
+ if (a)
195
207
  try {
196
- const A = await Ce(
197
- i,
208
+ const T = await Pe(
209
+ a,
198
210
  (he) => he.endsWith("settings.json")
199
211
  );
200
- if (!A) {
201
- d("settings.json 파일이 없습니다.", {
212
+ if (!T) {
213
+ m("settings.json 파일이 없습니다.", {
202
214
  variant: "warning"
203
215
  });
204
216
  return;
205
217
  }
206
- const O = (C = A.defaultSettingsConfig) == null ? void 0 : C.theme, ue = A.defaultSnackbarTheme ?? ve;
218
+ const O = (P = T.defaultSettingsConfig) == null ? void 0 : P.theme, ue = T.defaultSnackbarTheme ?? ge, pe = je(T);
207
219
  if (!O) {
208
- d("theme 설정을 읽지 못했습니다.", {
220
+ m("theme 설정을 읽지 못했습니다.", {
209
221
  variant: "warning"
210
222
  });
211
223
  return;
212
224
  }
213
- Q(O, ue), d("설정 파일을 로드하고 메인 화면에 적용했습니다.", {
225
+ Q(O, ue, pe), m("설정 파일을 로드하고 메인 화면에 적용했습니다.", {
214
226
  variant: "success"
215
227
  });
216
228
  } catch {
217
- d("설정 파일을 불러오는 중 오류가 발생했습니다.", {
229
+ m("설정 파일을 불러오는 중 오류가 발생했습니다.", {
218
230
  variant: "error"
219
231
  });
220
232
  } finally {
221
233
  e.target.value = "";
222
234
  }
223
235
  }, "handleZipFileChange"), fe = /* @__PURE__ */ n((e) => {
224
- e !== c && (l.current && (cancelAnimationFrame(l.current), l.current = null), k(!0), l.current = requestAnimationFrame(() => {
225
- J(e), l.current = requestAnimationFrame(() => {
226
- k(!1), l.current = null;
236
+ e !== d && (c.current && (cancelAnimationFrame(c.current), c.current = null), _(!0), c.current = requestAnimationFrame(() => {
237
+ $(e), c.current = requestAnimationFrame(() => {
238
+ _(!1), c.current = null;
227
239
  });
228
240
  }));
229
241
  }, "handleSectionChange");
230
- return p(() => {
231
- E.current = x;
232
- }, [x]), p(() => {
233
- N.current = y;
234
- }, [y]), p(() => {
242
+ return v(() => {
243
+ S.current = C;
244
+ }, [C]), v(() => {
245
+ D.current = A;
246
+ }, [A]), v(() => {
235
247
  const e = I.current;
236
248
  if (!e)
237
249
  return;
238
- const i = /* @__PURE__ */ n(() => {
239
- P.current = !0, o();
250
+ const a = /* @__PURE__ */ n(() => {
251
+ E.current = !0, o();
240
252
  }, "handlePointerDown"), s = /* @__PURE__ */ n(() => {
241
- P.current = !1, o();
253
+ E.current = !1, o();
242
254
  }, "handlePointerUp");
243
- return e.addEventListener("pointerdown", i), e.addEventListener("pointerup", s), e.addEventListener("pointercancel", s), e.addEventListener("keydown", o), e.addEventListener("input", o), e.addEventListener("change", o), e.addEventListener("focusin", o), () => {
244
- e.removeEventListener("pointerdown", i), e.removeEventListener("pointerup", s), e.removeEventListener("pointercancel", s), e.removeEventListener("keydown", o), e.removeEventListener("input", o), e.removeEventListener("change", o), e.removeEventListener("focusin", o);
255
+ return e.addEventListener("pointerdown", a), e.addEventListener("pointerup", s), e.addEventListener("pointercancel", s), e.addEventListener("keydown", o), e.addEventListener("input", o), e.addEventListener("change", o), e.addEventListener("focusin", o), () => {
256
+ e.removeEventListener("pointerdown", a), e.removeEventListener("pointerup", s), e.removeEventListener("pointercancel", s), e.removeEventListener("keydown", o), e.removeEventListener("input", o), e.removeEventListener("change", o), e.removeEventListener("focusin", o);
245
257
  };
246
- }, []), p(() => {
258
+ }, []), v(() => {
247
259
  const e = /* @__PURE__ */ n(() => {
248
- w.current && (window.clearTimeout(w.current), w.current = null);
249
- }, "clearAutoSaveTimeout"), i = /* @__PURE__ */ n((s) => {
250
- e(), w.current = window.setTimeout(() => {
251
- const C = P.current || Date.now() - D.current < Ne;
252
- if (document.hidden || C) {
253
- i(Re);
260
+ x.current && (window.clearTimeout(x.current), x.current = null);
261
+ }, "clearAutoSaveTimeout"), a = /* @__PURE__ */ n((s) => {
262
+ e(), x.current = window.setTimeout(() => {
263
+ const P = E.current || Date.now() - N.current < Oe;
264
+ if (document.hidden || P) {
265
+ a(Ve);
254
266
  return;
255
267
  }
256
- E.current("auto"), i(V);
268
+ S.current("auto"), a(V);
257
269
  }, s);
258
270
  }, "scheduleAutoSave");
259
- return i(V), () => {
271
+ return a(V), () => {
260
272
  e();
261
273
  };
262
- }, []), p(() => {
274
+ }, []), v(() => {
263
275
  const e = /* @__PURE__ */ n(() => {
264
- N.current && E.current("manual");
276
+ D.current && S.current("manual");
265
277
  }, "handlePageExit");
266
278
  return window.addEventListener("pagehide", e), window.addEventListener("beforeunload", e), () => {
267
279
  window.removeEventListener("pagehide", e), window.removeEventListener("beforeunload", e);
268
280
  };
269
- }, []), p(() => () => {
270
- l.current && cancelAnimationFrame(l.current);
281
+ }, []), v(() => () => {
282
+ c.current && cancelAnimationFrame(c.current);
271
283
  }, []), /* @__PURE__ */ t(
272
284
  j,
273
285
  {
274
- title: /* @__PURE__ */ f("div", { className: "flex w-full flex-wrap items-center justify-between gap-12", children: [
275
- /* @__PURE__ */ t(W, { variant: "h6", fontWeight: 700, sx: { color: We }, children: "OWP Theme Preview" }),
276
- /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-8", children: [
286
+ title: /* @__PURE__ */ u("div", { className: "flex w-full flex-wrap items-center justify-between gap-12", children: [
287
+ /* @__PURE__ */ t(W, { variant: "h6", fontWeight: 700, sx: { color: Be }, children: "OWP Theme Preview" }),
288
+ /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-8", children: [
277
289
  /* @__PURE__ */ t(
278
290
  h,
279
291
  {
280
292
  size: "small",
281
293
  variant: "outlined",
282
294
  sx: {
283
- ...v,
284
- ...F
295
+ ...g,
296
+ ...L
285
297
  },
286
298
  onClick: ne,
287
- children: "초기 상태로 초기화"
299
+ children: "기본 설정으로 되돌리기"
288
300
  }
289
301
  ),
290
302
  /* @__PURE__ */ t(
@@ -292,10 +304,10 @@ const v = {
292
304
  {
293
305
  size: "small",
294
306
  variant: "contained",
295
- disabled: !B,
307
+ disabled: !U,
296
308
  sx: {
297
- ...v,
298
- ...L
309
+ ...g,
310
+ ...F
299
311
  },
300
312
  onClick: G,
301
313
  children: "메인에 적용해보기"
@@ -303,20 +315,20 @@ const v = {
303
315
  )
304
316
  ] })
305
317
  ] }),
306
- open: a,
318
+ open: r,
307
319
  maxWidth: "xl",
308
320
  canConfirm: !1,
309
321
  onClose: de,
310
- actions: /* @__PURE__ */ f("div", { className: "grid min-w-0 flex-1 grid-cols-[1fr_auto_1fr] items-center gap-y-8", children: [
311
- /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center justify-start gap-8", children: [
322
+ actions: /* @__PURE__ */ u("div", { className: "grid min-w-0 flex-1 grid-cols-[1fr_auto_1fr] items-center gap-y-8", children: [
323
+ /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center justify-start gap-8", children: [
312
324
  /* @__PURE__ */ t(
313
325
  h,
314
326
  {
315
327
  variant: "contained",
316
- startIcon: /* @__PURE__ */ t(Ee, {}),
328
+ startIcon: /* @__PURE__ */ t(Se, {}),
317
329
  sx: {
318
- ...v,
319
- ...L
330
+ ...g,
331
+ ...F
320
332
  },
321
333
  onClick: le,
322
334
  children: "임시 저장하기"
@@ -326,26 +338,26 @@ const v = {
326
338
  h,
327
339
  {
328
340
  variant: "outlined",
329
- startIcon: /* @__PURE__ */ t(Pe, {}),
341
+ startIcon: /* @__PURE__ */ t(Ee, {}),
330
342
  disabled: !H,
331
343
  sx: {
332
- ...v,
333
- ...F
344
+ ...g,
345
+ ...L
334
346
  },
335
347
  onClick: ce,
336
348
  children: "임시 저장 불러오기"
337
349
  }
338
350
  )
339
351
  ] }),
340
- /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center justify-center gap-8", children: [
352
+ /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center justify-center gap-8", children: [
341
353
  /* @__PURE__ */ t(
342
354
  h,
343
355
  {
344
356
  variant: "contained",
345
- startIcon: /* @__PURE__ */ t(Te, {}),
357
+ startIcon: /* @__PURE__ */ t(be, {}),
346
358
  sx: {
347
- ...v,
348
- ...L
359
+ ...g,
360
+ ...F
349
361
  },
350
362
  onClick: ae,
351
363
  children: "설정파일 저장하기"
@@ -355,10 +367,10 @@ const v = {
355
367
  h,
356
368
  {
357
369
  variant: "outlined",
358
- startIcon: /* @__PURE__ */ t(be, {}),
370
+ startIcon: /* @__PURE__ */ t(ye, {}),
359
371
  sx: {
360
- ...v,
361
- ...F
372
+ ...g,
373
+ ...L
362
374
  },
363
375
  onClick: se,
364
376
  children: "설정파일 불러오기"
@@ -383,28 +395,28 @@ const v = {
383
395
  p: 3
384
396
  }
385
397
  },
386
- children: /* @__PURE__ */ f("div", { ref: I, className: "flex h-full min-h-0 flex-col gap-12", children: [
398
+ children: /* @__PURE__ */ u("div", { ref: I, className: "flex h-full min-h-0 flex-col gap-12", children: [
387
399
  /* @__PURE__ */ t(
388
400
  "input",
389
401
  {
390
402
  ref: M,
391
403
  type: "file",
392
- accept: De,
404
+ accept: Re,
393
405
  className: "hidden",
394
406
  onChange: me
395
407
  }
396
408
  ),
397
- /* @__PURE__ */ f("div", { className: "grid min-h-0 flex-1 gap-20 xl:grid-cols-[420px_minmax(0,1fr)]", children: [
409
+ /* @__PURE__ */ u("div", { className: "grid min-h-0 flex-1 gap-20 xl:grid-cols-[420px_minmax(0,1fr)]", children: [
398
410
  /* @__PURE__ */ t(
399
- Fe,
411
+ ke,
400
412
  {
401
- activeSection: c,
413
+ activeSection: d,
402
414
  presetOptions: K,
403
415
  selectedMode: re,
404
416
  selectedPresetKey: ie,
405
- settings: b,
417
+ settings: y,
406
418
  onSectionChange: fe,
407
- onPaletteValueChange: $,
419
+ onPaletteValueChange: J,
408
420
  onPaletteValuesChange: Y,
409
421
  onPresetKeyChange: X,
410
422
  onPresetModeChange: ee
@@ -413,9 +425,9 @@ const v = {
413
425
  /* @__PURE__ */ t(
414
426
  _e,
415
427
  {
416
- activeSection: c,
417
- isLoading: T,
418
- settings: b
428
+ activeSection: d,
429
+ isLoading: b,
430
+ settings: y
419
431
  }
420
432
  )
421
433
  ] })
@@ -424,6 +436,6 @@ const v = {
424
436
  );
425
437
  }, "ThemePreviewDialog");
426
438
  export {
427
- cn as ThemePreviewDialog
439
+ fn as ThemePreviewDialog
428
440
  };
429
441
  //# sourceMappingURL=ThemePreviewDialog.js.map