Task 12 of plan 2026-06-20-config-editor-foundation. Adds:
- src/main/index.ts: onLoad + message handlers (return value = request resolve,
per Cocos 3.x verified IPC mechanism; fallback note left in plan)
- src/panels/default/{index,app}.ts: Editor.Panel.define host + Vue 3 minimal
app (table switcher, key list, record JSON dump)
- static/template/default/index.html + static/style/default/index.css
Deviation from plan (necessary, flagged): esbuild.config.mjs now marks
node:fs/node:path as external for the panel entry (platform:'browser').
The plan's panel reads static template/style at runtime via Node fs, which
requires these builtins; Cocos panel runs in an Electron renderer that
provides them. Without this, esbuild errors with 'Could not resolve node:fs'.
Build verified: dist/main.js (9.5mb, typescript compiler API bundled) and
dist/panels/default.js (628kb, vue.esm-bundler bundled) both generate.
8 lines
309 B
CSS
8 lines
309 B
CSS
#app { color: var(--color-font-normal); font-size: 12px; }
|
|
.row { margin: 6px 0; }
|
|
button { margin-right: 8px; }
|
|
ul { list-style: none; padding: 0; max-height: 360px; overflow:auto; }
|
|
li { padding: 3px 6px; cursor: pointer; }
|
|
li:hover { background: var(--color-hover-bg); }
|
|
.err { color: var(--color-warn); }
|