@owp/core 2.5.5 → 2.5.6
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.
- package/configs/theme.d.ts +3 -0
- package/configs/theme.js +1 -0
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/configs/defaultConfig.js +1 -1
- package/dist/configs/theme.js +28 -0
- package/dist/configs/theme.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewColorField.js +279 -208
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
- package/dist/features/themePreview/configs/presets.js +6 -38
- package/dist/features/themePreview/configs/presets.js.map +1 -1
- package/dist/features/themePreview/configs/previewStorage.js +28 -27
- package/dist/features/themePreview/configs/previewStorage.js.map +1 -1
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +166 -154
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
- package/dist/features/themePreview/hooks/useThemePreview.js +202 -157
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewExport.js +276 -67
- package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -1
- package/dist/features/themePreview.js +52 -52
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/configs/theme/index.d.ts +6 -0
- package/dist/types/features/themePreview/configs/index.d.ts +1 -1
- package/dist/types/features/themePreview/configs/presets.d.ts +0 -1
- package/dist/types/features/themePreview/configs/previewStorage.d.ts +1 -0
- package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +2 -1
- package/dist/types/features/themePreview/utils/index.d.ts +1 -1
- package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +38 -1083
- package/dist/types/utils/zipUtil.d.ts +1 -0
- package/dist/utils/zipUtil.js +38 -36
- package/dist/utils/zipUtil.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,41 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var n = (
|
|
3
|
-
import { jsx as t, jsxs as
|
|
4
|
-
import { defaultSnackbarTheme as
|
|
5
|
-
import { themesConfig as
|
|
6
|
-
import { defaultSettingsConfig as
|
|
7
|
-
import { useConfirm as
|
|
8
|
-
import { readZipEntryJson as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { Button as h, Typography as W, TextField as
|
|
14
|
-
import { useDialogs as
|
|
15
|
-
import { enqueueSnackbar as
|
|
16
|
-
import { useState as
|
|
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
|
|
18
|
+
import { ThemePreviewControls as ke } from "../components/ThemePreviewControls.js";
|
|
19
19
|
import { ThemePreviewCanvas as _e } from "../components/ThemePreviewCanvas.js";
|
|
20
|
-
import { resetThemePreviewSessionState as
|
|
21
|
-
import { createThemePreviewExportData as
|
|
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
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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(
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
return r ?
|
|
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(
|
|
38
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
84
|
-
open:
|
|
85
|
-
payload:
|
|
86
|
-
onClose:
|
|
97
|
+
}, Be = "#111827", Ue = /* @__PURE__ */ n(({
|
|
98
|
+
open: r,
|
|
99
|
+
payload: i,
|
|
100
|
+
onClose: w
|
|
87
101
|
}) => {
|
|
88
|
-
const [
|
|
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:
|
|
107
|
+
open: r,
|
|
94
108
|
maxWidth: "xs",
|
|
95
|
-
onClose: /* @__PURE__ */ n(() =>
|
|
96
|
-
onConfirm: /* @__PURE__ */ n(() =>
|
|
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__ */
|
|
117
|
+
children: /* @__PURE__ */ u("div", { className: "flex flex-col gap-12", children: [
|
|
104
118
|
/* @__PURE__ */ t(
|
|
105
|
-
|
|
119
|
+
Ae,
|
|
106
120
|
{
|
|
107
121
|
label: "저장 이름",
|
|
108
|
-
value:
|
|
122
|
+
value: l,
|
|
109
123
|
placeholder: "저장 이름 입력",
|
|
110
|
-
onChange: /* @__PURE__ */ n((
|
|
111
|
-
|
|
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"),
|
|
120
|
-
open:
|
|
121
|
-
payload:
|
|
122
|
-
onClose:
|
|
133
|
+
}, "ThemePreviewSaveDialog"), fn = /* @__PURE__ */ n(({
|
|
134
|
+
open: r,
|
|
135
|
+
payload: i,
|
|
136
|
+
onClose: w
|
|
123
137
|
}) => {
|
|
124
|
-
const [
|
|
125
|
-
}),
|
|
126
|
-
activeSection:
|
|
127
|
-
canApplyToMain:
|
|
128
|
-
draftSettings:
|
|
129
|
-
hasTemporaryChanges:
|
|
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:
|
|
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:
|
|
157
|
+
handleTemporarySave: C
|
|
144
158
|
} = Le({
|
|
145
|
-
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:
|
|
152
|
-
resetTheme:
|
|
153
|
-
}), R =
|
|
154
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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(
|
|
165
|
-
initialFileName:
|
|
176
|
+
const e = await z.open(Ue, {
|
|
177
|
+
initialFileName: l
|
|
166
178
|
});
|
|
167
|
-
e !== void 0 && (
|
|
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
|
-
|
|
184
|
+
C("manual"), m("임시 저장을 완료했습니다.", {
|
|
173
185
|
variant: "success"
|
|
174
186
|
});
|
|
175
187
|
}, "handleManualTemporarySave"), ce = /* @__PURE__ */ n(() => {
|
|
176
188
|
if (!te()) {
|
|
177
|
-
|
|
189
|
+
m("불러올 임시 저장 데이터가 없습니다.", {
|
|
178
190
|
variant: "warning"
|
|
179
191
|
});
|
|
180
192
|
return;
|
|
181
193
|
}
|
|
182
|
-
|
|
194
|
+
m("임시 저장 데이터를 불러왔습니다.", {
|
|
183
195
|
variant: "success"
|
|
184
196
|
});
|
|
185
197
|
}, "handleManualTemporaryLoad"), de = /* @__PURE__ */ n(async () => {
|
|
186
|
-
|
|
198
|
+
A && (await B({
|
|
187
199
|
title: "변경된 값을 저장하겠습니까?"
|
|
188
|
-
}) ? (
|
|
200
|
+
}) ? (C("manual"), m("임시 저장되었습니다. 다시 실행하면 저장된 데이터를 불러옵니다.", {
|
|
189
201
|
variant: "info"
|
|
190
|
-
})) :
|
|
202
|
+
})) : Ie()), w(void 0);
|
|
191
203
|
}, "handleDialogClose"), me = /* @__PURE__ */ n(async (e) => {
|
|
192
|
-
var s,
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
204
|
+
var s, P;
|
|
205
|
+
const a = (s = e.target.files) == null ? void 0 : s[0];
|
|
206
|
+
if (a)
|
|
195
207
|
try {
|
|
196
|
-
const
|
|
197
|
-
|
|
208
|
+
const T = await Pe(
|
|
209
|
+
a,
|
|
198
210
|
(he) => he.endsWith("settings.json")
|
|
199
211
|
);
|
|
200
|
-
if (!
|
|
201
|
-
|
|
212
|
+
if (!T) {
|
|
213
|
+
m("settings.json 파일이 없습니다.", {
|
|
202
214
|
variant: "warning"
|
|
203
215
|
});
|
|
204
216
|
return;
|
|
205
217
|
}
|
|
206
|
-
const O = (
|
|
218
|
+
const O = (P = T.defaultSettingsConfig) == null ? void 0 : P.theme, ue = T.defaultSnackbarTheme ?? ge, pe = je(T);
|
|
207
219
|
if (!O) {
|
|
208
|
-
|
|
220
|
+
m("theme 설정을 읽지 못했습니다.", {
|
|
209
221
|
variant: "warning"
|
|
210
222
|
});
|
|
211
223
|
return;
|
|
212
224
|
}
|
|
213
|
-
Q(O, ue),
|
|
225
|
+
Q(O, ue, pe), m("설정 파일을 로드하고 메인 화면에 적용했습니다.", {
|
|
214
226
|
variant: "success"
|
|
215
227
|
});
|
|
216
228
|
} catch {
|
|
217
|
-
|
|
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 !==
|
|
225
|
-
|
|
226
|
-
|
|
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
|
|
231
|
-
|
|
232
|
-
}, [
|
|
233
|
-
|
|
234
|
-
}, [
|
|
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
|
|
239
|
-
|
|
250
|
+
const a = /* @__PURE__ */ n(() => {
|
|
251
|
+
E.current = !0, o();
|
|
240
252
|
}, "handlePointerDown"), s = /* @__PURE__ */ n(() => {
|
|
241
|
-
|
|
253
|
+
E.current = !1, o();
|
|
242
254
|
}, "handlePointerUp");
|
|
243
|
-
return e.addEventListener("pointerdown",
|
|
244
|
-
e.removeEventListener("pointerdown",
|
|
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
|
-
}, []),
|
|
258
|
+
}, []), v(() => {
|
|
247
259
|
const e = /* @__PURE__ */ n(() => {
|
|
248
|
-
|
|
249
|
-
}, "clearAutoSaveTimeout"),
|
|
250
|
-
e(),
|
|
251
|
-
const
|
|
252
|
-
if (document.hidden ||
|
|
253
|
-
|
|
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
|
-
|
|
268
|
+
S.current("auto"), a(V);
|
|
257
269
|
}, s);
|
|
258
270
|
}, "scheduleAutoSave");
|
|
259
|
-
return
|
|
271
|
+
return a(V), () => {
|
|
260
272
|
e();
|
|
261
273
|
};
|
|
262
|
-
}, []),
|
|
274
|
+
}, []), v(() => {
|
|
263
275
|
const e = /* @__PURE__ */ n(() => {
|
|
264
|
-
|
|
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
|
-
}, []),
|
|
270
|
-
|
|
281
|
+
}, []), v(() => () => {
|
|
282
|
+
c.current && cancelAnimationFrame(c.current);
|
|
271
283
|
}, []), /* @__PURE__ */ t(
|
|
272
284
|
j,
|
|
273
285
|
{
|
|
274
|
-
title: /* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */ t(W, { variant: "h6", fontWeight: 700, sx: { color:
|
|
276
|
-
/* @__PURE__ */
|
|
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
|
-
...
|
|
284
|
-
...
|
|
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: !
|
|
307
|
+
disabled: !U,
|
|
296
308
|
sx: {
|
|
297
|
-
...
|
|
298
|
-
...
|
|
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:
|
|
318
|
+
open: r,
|
|
307
319
|
maxWidth: "xl",
|
|
308
320
|
canConfirm: !1,
|
|
309
321
|
onClose: de,
|
|
310
|
-
actions: /* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
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(
|
|
328
|
+
startIcon: /* @__PURE__ */ t(Se, {}),
|
|
317
329
|
sx: {
|
|
318
|
-
...
|
|
319
|
-
...
|
|
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(
|
|
341
|
+
startIcon: /* @__PURE__ */ t(Ee, {}),
|
|
330
342
|
disabled: !H,
|
|
331
343
|
sx: {
|
|
332
|
-
...
|
|
333
|
-
...
|
|
344
|
+
...g,
|
|
345
|
+
...L
|
|
334
346
|
},
|
|
335
347
|
onClick: ce,
|
|
336
348
|
children: "임시 저장 불러오기"
|
|
337
349
|
}
|
|
338
350
|
)
|
|
339
351
|
] }),
|
|
340
|
-
/* @__PURE__ */
|
|
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(
|
|
357
|
+
startIcon: /* @__PURE__ */ t(be, {}),
|
|
346
358
|
sx: {
|
|
347
|
-
...
|
|
348
|
-
...
|
|
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(
|
|
370
|
+
startIcon: /* @__PURE__ */ t(ye, {}),
|
|
359
371
|
sx: {
|
|
360
|
-
...
|
|
361
|
-
...
|
|
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__ */
|
|
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:
|
|
404
|
+
accept: Re,
|
|
393
405
|
className: "hidden",
|
|
394
406
|
onChange: me
|
|
395
407
|
}
|
|
396
408
|
),
|
|
397
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
411
|
+
ke,
|
|
400
412
|
{
|
|
401
|
-
activeSection:
|
|
413
|
+
activeSection: d,
|
|
402
414
|
presetOptions: K,
|
|
403
415
|
selectedMode: re,
|
|
404
416
|
selectedPresetKey: ie,
|
|
405
|
-
settings:
|
|
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:
|
|
417
|
-
isLoading:
|
|
418
|
-
settings:
|
|
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
|
-
|
|
439
|
+
fn as ThemePreviewDialog
|
|
428
440
|
};
|
|
429
441
|
//# sourceMappingURL=ThemePreviewDialog.js.map
|