diff --git a/apps/executeJS/src-tauri/src/bootstrap.js b/apps/executeJS/src-tauri/src/bootstrap.js
index a8d34cf..4299994 100644
--- a/apps/executeJS/src-tauri/src/bootstrap.js
+++ b/apps/executeJS/src-tauri/src/bootstrap.js
@@ -5,44 +5,52 @@ const { ops } = core;
// console 객체 정의
globalThis.console = {
log: (...args) => {
- const message = args.map(arg => {
- if (typeof arg === 'object') {
- return JSON.stringify(arg, null, 2);
- }
- return String(arg);
- }).join(' ');
+ const message = args
+ .map((arg) => {
+ if (typeof arg === 'object') {
+ return JSON.stringify(arg, null, 2);
+ }
+ return String(arg);
+ })
+ .join(' ');
ops.op_console_log(message);
},
-
+
error: (...args) => {
- const message = args.map(arg => {
- if (typeof arg === 'object') {
- return JSON.stringify(arg, null, 2);
- }
- return String(arg);
- }).join(' ');
+ const message = args
+ .map((arg) => {
+ if (typeof arg === 'object') {
+ return JSON.stringify(arg, null, 2);
+ }
+ return String(arg);
+ })
+ .join(' ');
ops.op_custom_print(message, true);
},
-
+
warn: (...args) => {
- const message = args.map(arg => {
- if (typeof arg === 'object') {
- return JSON.stringify(arg, null, 2);
- }
- return String(arg);
- }).join(' ');
+ const message = args
+ .map((arg) => {
+ if (typeof arg === 'object') {
+ return JSON.stringify(arg, null, 2);
+ }
+ return String(arg);
+ })
+ .join(' ');
ops.op_custom_print(`[WARN] ${message}`, false);
},
-
+
info: (...args) => {
- const message = args.map(arg => {
- if (typeof arg === 'object') {
- return JSON.stringify(arg, null, 2);
- }
- return String(arg);
- }).join(' ');
+ const message = args
+ .map((arg) => {
+ if (typeof arg === 'object') {
+ return JSON.stringify(arg, null, 2);
+ }
+ return String(arg);
+ })
+ .join(' ');
ops.op_custom_print(`[INFO] ${message}`, false);
- }
+ },
};
// alert 함수 정의
@@ -59,7 +67,7 @@ globalThis.print = (message, isErr = false) => {
globalThis.require = (moduleName) => {
// 간단한 npm 모듈 시뮬레이션
const modules = {
- 'lodash': {
+ lodash: {
map: (array, iteratee) => {
if (!Array.isArray(array)) {
throw new Error('First argument must be an array');
@@ -93,33 +101,38 @@ globalThis.require = (moduleName) => {
chunks.push(array.slice(i, i + size));
}
return chunks;
- }
+ },
},
- 'moment': {
+ moment: {
now: () => new Date(),
format: (date, format) => {
if (!(date instanceof Date)) {
date = new Date(date);
}
return date.toISOString();
- }
+ },
},
- 'uuid': {
+ uuid: {
v4: () => {
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
- const r = Math.random() * 16 | 0;
- const v = c == 'x' ? r : (r & 0x3 | 0x8);
- return v.toString(16);
- });
- }
- }
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
+ /[xy]/g,
+ function (c) {
+ const r = (Math.random() * 16) | 0;
+ const v = c == 'x' ? r : (r & 0x3) | 0x8;
+ return v.toString(16);
+ }
+ );
+ },
+ },
};
if (modules[moduleName]) {
return modules[moduleName];
}
- throw new Error(`Cannot find module '${moduleName}'. Available modules: ${Object.keys(modules).join(', ')}`);
+ throw new Error(
+ `Cannot find module '${moduleName}'. Available modules: ${Object.keys(modules).join(', ')}`
+ );
};
// 기본적인 전역 객체들 정의
diff --git a/apps/executeJS/src-tauri/tauri.conf.json b/apps/executeJS/src-tauri/tauri.conf.json
index 5914665..9ec2e05 100644
--- a/apps/executeJS/src-tauri/tauri.conf.json
+++ b/apps/executeJS/src-tauri/tauri.conf.json
@@ -27,12 +27,7 @@
},
"bundle": {
"active": true,
- "targets": [
- "msi",
- "nsis",
- "dmg",
- "app"
- ],
+ "targets": ["msi", "nsis", "dmg", "app"],
"icon": [],
"macOS": {
"entitlements": null,
diff --git a/apps/executeJS/src/index.css b/apps/executeJS/src/index.css
index 4ce0249..1995143 100644
--- a/apps/executeJS/src/index.css
+++ b/apps/executeJS/src/index.css
@@ -15,6 +15,38 @@
* {
box-sizing: border-box;
}
+
+ body {
+ margin: 0;
+ padding: 0;
+ background-color: #0f172a; /* slate-950 */
+ color: #f8fafc; /* slate-50 */
+ }
+
+ /* 스크롤바 스타일링 */
+ ::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+ }
+
+ ::-webkit-scrollbar-track {
+ background: #1e293b; /* slate-800 */
+ }
+
+ ::-webkit-scrollbar-thumb {
+ background: #475569; /* slate-600 */
+ border-radius: 4px;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background: #64748b; /* slate-500 */
+ }
+
+ /* 선택 영역 스타일링 */
+ ::selection {
+ background-color: #3b82f6; /* blue-500 */
+ color: white;
+ }
}
@layer components {
@@ -23,13 +55,13 @@
}
.panel-resize-handle {
- width: 0.25rem;
- background-color: hsl(0 0% 88.7%);
+ width: 4px;
+ background-color: #334155; /* slate-700 */
transition: background-color 150ms;
cursor: col-resize;
}
.panel-resize-handle:hover {
- background-color: hsl(0 0% 78%);
+ background-color: #475569; /* slate-600 */
}
}
diff --git a/apps/executeJS/src/pages/editor/editor-page.test.tsx b/apps/executeJS/src/pages/editor/editor-page.test.tsx
index 761ba10..d5692e9 100644
--- a/apps/executeJS/src/pages/editor/editor-page.test.tsx
+++ b/apps/executeJS/src/pages/editor/editor-page.test.tsx
@@ -16,8 +16,6 @@ vi.mock('@legendapp/state/react', () => ({
describe('EditorPage', () => {
it('renders without crashing', () => {
render(
- {result.code}
-
-
- {result.success ? result.result : result.error}
-
-
+
+ {result.success ? result.result : result.error}
+
+
+