@kurot/cli 1.3.0 → 2.0.0
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/CHANGELOG.md +27 -0
- package/README.md +115 -331
- package/dist/core/components/discover-components.d.ts.map +1 -1
- package/dist/core/components/discover-components.js +12 -11
- package/dist/core/components/discover-components.js.map +1 -1
- package/dist/core/config.d.ts +8 -16
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +12 -4
- package/dist/core/config.js.map +1 -1
- package/dist/core/dev-server.d.ts +1 -1
- package/dist/core/dev-server.js +13 -13
- package/dist/core/dev-server.js.map +1 -1
- package/dist/core/diagnostics/codes.d.ts +3 -6
- package/dist/core/diagnostics/codes.d.ts.map +1 -1
- package/dist/core/diagnostics/codes.js +4 -10
- package/dist/core/diagnostics/codes.js.map +1 -1
- package/dist/core/diagnostics/output.d.ts +1 -1
- package/dist/core/diagnostics/output.d.ts.map +1 -1
- package/dist/core/{exml → kui}/ast.d.ts +17 -107
- package/dist/core/kui/ast.d.ts.map +1 -0
- package/dist/core/kui/ast.js +8 -0
- package/dist/core/{exml → kui}/ast.js.map +1 -1
- package/dist/core/kui/codegen.d.ts.map +1 -0
- package/dist/core/{exml → kui}/codegen.js +17 -176
- package/dist/core/kui/codegen.js.map +1 -0
- package/dist/core/kui/index.d.ts +29 -0
- package/dist/core/kui/index.d.ts.map +1 -0
- package/dist/core/kui/index.js +23 -0
- package/dist/core/kui/index.js.map +1 -0
- package/dist/core/{exml/exml-diagnostics.d.ts → kui/kui-diagnostics.d.ts} +2 -2
- package/dist/core/kui/kui-diagnostics.d.ts.map +1 -0
- package/dist/core/{exml/exml-diagnostics.js → kui/kui-diagnostics.js} +4 -4
- package/dist/core/kui/kui-diagnostics.js.map +1 -0
- package/dist/core/kui/kui-parser.d.ts +7 -0
- package/dist/core/kui/kui-parser.d.ts.map +1 -0
- package/dist/core/kui/kui-parser.js +157 -0
- package/dist/core/kui/kui-parser.js.map +1 -0
- package/dist/core/{exml → kui}/registry.d.ts +3 -26
- package/dist/core/kui/registry.d.ts.map +1 -0
- package/dist/core/{exml → kui}/registry.js +12 -43
- package/dist/core/kui/registry.js.map +1 -0
- package/dist/core/{exml → kui}/skin-module-builder.d.ts +6 -6
- package/dist/core/kui/skin-module-builder.d.ts.map +1 -0
- package/dist/core/{exml → kui}/skin-module-builder.js +7 -6
- package/dist/core/kui/skin-module-builder.js.map +1 -0
- package/dist/core/kui/skin-parts-declaration.d.ts.map +1 -0
- package/dist/core/{exml → kui}/skin-parts-declaration.js +2 -2
- package/dist/core/kui/skin-parts-declaration.js.map +1 -0
- package/dist/core/kui/source-location.d.ts.map +1 -0
- package/dist/core/kui/source-location.js.map +1 -0
- package/dist/core/namespace-external-plugin.d.ts +1 -1
- package/dist/core/namespace-external-plugin.js +1 -1
- package/dist/core/plugins/compile-custom-namespaces.d.ts +3 -3
- package/dist/core/plugins/compile-custom-namespaces.js +3 -3
- package/dist/core/plugins/compile-kui.d.ts +6 -0
- package/dist/core/plugins/compile-kui.d.ts.map +1 -0
- package/dist/core/plugins/compile-kui.js +143 -0
- package/dist/core/plugins/compile-kui.js.map +1 -0
- package/dist/core/plugins/copy-assets.d.ts +3 -3
- package/dist/core/plugins/copy-assets.d.ts.map +1 -1
- package/dist/core/plugins/copy-assets.js +7 -6
- package/dist/core/plugins/copy-assets.js.map +1 -1
- package/dist/core/plugins/index.d.ts +1 -1
- package/dist/core/plugins/index.d.ts.map +1 -1
- package/dist/core/plugins/index.js +3 -3
- package/dist/core/plugins/index.js.map +1 -1
- package/dist/core/project.d.ts +14 -10
- package/dist/core/project.d.ts.map +1 -1
- package/dist/core/project.js +11 -7
- package/dist/core/project.js.map +1 -1
- package/dist/core/template.js +1 -1
- package/dist/core/template.js.map +1 -1
- package/dist/define.d.ts +1 -1
- package/dist/define.d.ts.map +1 -1
- package/package.json +5 -3
- package/templates/game/kurot.config.ts +3 -3
- package/templates/game/resource/ui/skins/ButtonSkin.kui.xml +24 -0
- package/templates/game/resource/ui/skins/CheckBoxSkin.kui.xml +45 -0
- package/templates/game/resource/ui/skins/ComboBoxSkin.kui.xml +32 -0
- package/templates/game/resource/ui/skins/GroupSkin.kui.xml +11 -0
- package/templates/game/resource/ui/skins/HScrollBarSkin.kui.xml +11 -0
- package/templates/game/resource/ui/skins/HSliderSkin.kui.xml +13 -0
- package/templates/game/resource/ui/skins/ImageSkin.kui.xml +11 -0
- package/templates/game/resource/ui/skins/ItemRendererSkin.kui.xml +22 -0
- package/templates/game/resource/ui/skins/LabelSkin.kui.xml +11 -0
- package/templates/game/resource/ui/skins/ListSkin.kui.xml +15 -0
- package/templates/game/resource/ui/skins/PanelSkin.kui.xml +18 -0
- package/templates/game/resource/ui/skins/ProgressBarSkin.kui.xml +14 -0
- package/templates/game/resource/ui/skins/RadioButtonSkin.kui.xml +45 -0
- package/templates/game/resource/ui/skins/ScrollerSkin.kui.xml +13 -0
- package/templates/game/resource/ui/skins/TabBarSkin.kui.xml +12 -0
- package/templates/game/resource/ui/skins/TextInputSkin.kui.xml +28 -0
- package/templates/game/resource/ui/skins/ToggleButtonSkin.kui.xml +34 -0
- package/templates/game/resource/ui/skins/ToggleSwitchSkin.kui.xml +29 -0
- package/templates/game/resource/ui/skins/VScrollBarSkin.kui.xml +11 -0
- package/templates/game/resource/ui/skins/VSliderSkin.kui.xml +13 -0
- package/templates/game/resource/ui/skins/ViewStackSkin.kui.xml +11 -0
- package/dist/core/exml/ast.d.ts.map +0 -1
- package/dist/core/exml/ast.js +0 -8
- package/dist/core/exml/codegen.d.ts.map +0 -1
- package/dist/core/exml/codegen.js.map +0 -1
- package/dist/core/exml/exml-diagnostics.d.ts.map +0 -1
- package/dist/core/exml/exml-diagnostics.js.map +0 -1
- package/dist/core/exml/exml-parser.d.ts +0 -27
- package/dist/core/exml/exml-parser.d.ts.map +0 -1
- package/dist/core/exml/exml-parser.js +0 -380
- package/dist/core/exml/exml-parser.js.map +0 -1
- package/dist/core/exml/index.d.ts +0 -54
- package/dist/core/exml/index.d.ts.map +0 -1
- package/dist/core/exml/index.js +0 -51
- package/dist/core/exml/index.js.map +0 -1
- package/dist/core/exml/registry.d.ts.map +0 -1
- package/dist/core/exml/registry.js.map +0 -1
- package/dist/core/exml/skin-module-builder.d.ts.map +0 -1
- package/dist/core/exml/skin-module-builder.js.map +0 -1
- package/dist/core/exml/skin-parts-declaration.d.ts.map +0 -1
- package/dist/core/exml/skin-parts-declaration.js.map +0 -1
- package/dist/core/exml/source-location.d.ts.map +0 -1
- package/dist/core/exml/source-location.js.map +0 -1
- package/dist/core/exml/xml-parser.d.ts +0 -86
- package/dist/core/exml/xml-parser.d.ts.map +0 -1
- package/dist/core/exml/xml-parser.js +0 -196
- package/dist/core/exml/xml-parser.js.map +0 -1
- package/dist/core/plugins/compile-exml.d.ts +0 -14
- package/dist/core/plugins/compile-exml.d.ts.map +0 -1
- package/dist/core/plugins/compile-exml.js +0 -256
- package/dist/core/plugins/compile-exml.js.map +0 -1
- package/templates/game/resource/default.thm.json +0 -19
- package/templates/game/resource/skins/eui/ButtonSkin.exml +0 -16
- package/templates/game/resource/skins/eui/CheckBoxSkin.exml +0 -18
- package/templates/game/resource/skins/eui/ComboBoxSkin.exml +0 -31
- package/templates/game/resource/skins/eui/GroupSkin.exml +0 -4
- package/templates/game/resource/skins/eui/HScrollBarSkin.exml +0 -6
- package/templates/game/resource/skins/eui/HSliderSkin.exml +0 -7
- package/templates/game/resource/skins/eui/ImageSkin.exml +0 -4
- package/templates/game/resource/skins/eui/ItemRendererSkin.exml +0 -15
- package/templates/game/resource/skins/eui/LabelSkin.exml +0 -7
- package/templates/game/resource/skins/eui/ListSkin.exml +0 -11
- package/templates/game/resource/skins/eui/PanelSkin.exml +0 -15
- package/templates/game/resource/skins/eui/ProgressBarSkin.exml +0 -11
- package/templates/game/resource/skins/eui/RadioButtonSkin.exml +0 -18
- package/templates/game/resource/skins/eui/ScrollerSkin.exml +0 -8
- package/templates/game/resource/skins/eui/TabBarSkin.exml +0 -6
- package/templates/game/resource/skins/eui/TextInputSkin.exml +0 -22
- package/templates/game/resource/skins/eui/ToggleButtonSkin.exml +0 -21
- package/templates/game/resource/skins/eui/ToggleSwitchSkin.exml +0 -15
- package/templates/game/resource/skins/eui/VScrollBarSkin.exml +0 -6
- package/templates/game/resource/skins/eui/VSliderSkin.exml +0 -7
- package/templates/game/resource/skins/eui/ViewStackSkin.exml +0 -4
- /package/dist/core/{exml → kui}/codegen.d.ts +0 -0
- /package/dist/core/{exml → kui}/skin-parts-declaration.d.ts +0 -0
- /package/dist/core/{exml → kui}/source-location.d.ts +0 -0
- /package/dist/core/{exml → kui}/source-location.js +0 -0
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs/promises';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { writeFile } from '../../utils/fs.js';
|
|
4
|
-
import { logger } from '../../utils/logger.js';
|
|
5
|
-
import { DIAGNOSTIC_CODES } from '../diagnostics/index.js';
|
|
6
|
-
import { buildSkinsModule } from '../exml/skin-module-builder.js';
|
|
7
|
-
import { generateSkinPartsDeclaration, SKIN_PARTS_DECLARATION_PATH } from '../exml/skin-parts-declaration.js';
|
|
8
|
-
import { BuildError } from '../errors.js';
|
|
9
|
-
/**
|
|
10
|
-
* Compiles `.exml` skin files into a single ESM module and rewrites the theme.
|
|
11
|
-
*
|
|
12
|
-
* Each skin becomes a real JS factory (`import { Skin, ... } from '@kurot/ui'`)
|
|
13
|
-
* bundled into `js/default.thm.js` (dev) or `js/default.thm.min_<hash>.js`
|
|
14
|
-
* (release). The module registers each factory on `globalThis` under its class
|
|
15
|
-
* name. The output `default.thm.json` keeps only the `skins` mapping plus a
|
|
16
|
-
* `skinsJs` pointer to that module, which the runtime `Theme` imports.
|
|
17
|
-
*
|
|
18
|
-
* The input theme follows Egret conventions; no `.exml` is shipped.
|
|
19
|
-
*/
|
|
20
|
-
export function compileExml() {
|
|
21
|
-
return {
|
|
22
|
-
name: 'compile EXML',
|
|
23
|
-
async apply(ctx) {
|
|
24
|
-
const { project } = ctx;
|
|
25
|
-
if (!project.config.exml || !project.themeFile)
|
|
26
|
-
return;
|
|
27
|
-
ctx.diagnostics.removeByCodes([
|
|
28
|
-
DIAGNOSTIC_CODES.EXML_UNKNOWN_TAG,
|
|
29
|
-
DIAGNOSTIC_CODES.EXML_COMPILE_FAILED,
|
|
30
|
-
DIAGNOSTIC_CODES.EXML_DECLARED_FILE_NOT_FOUND,
|
|
31
|
-
DIAGNOSTIC_CODES.THEME_FILE_NOT_FOUND,
|
|
32
|
-
DIAGNOSTIC_CODES.THEME_INVALID_JSON,
|
|
33
|
-
DIAGNOSTIC_CODES.THEME_SKIN_NOT_FOUND,
|
|
34
|
-
]);
|
|
35
|
-
const theme = await loadTheme(ctx);
|
|
36
|
-
if (!theme) {
|
|
37
|
-
throwIfInputInvalid(ctx);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const { files, missingDeclaredPaths } = await resolveExmlFiles(ctx, theme);
|
|
41
|
-
const skins = files.map(file => ({ file, className: extractClassName(file) }));
|
|
42
|
-
reportMissingThemeSkins(ctx, theme, skins, missingDeclaredPaths);
|
|
43
|
-
throwIfInputInvalid(ctx);
|
|
44
|
-
if (files.length === 0) {
|
|
45
|
-
await fs.rm(path.join(project.root, SKIN_PARTS_DECLARATION_PATH), { force: true });
|
|
46
|
-
delete ctx.outputs.skinPartsDeclaration;
|
|
47
|
-
logger.step('no .exml files found, skipping');
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const built = await buildSkinsModule(ctx, skins);
|
|
51
|
-
ctx.outputs.skinsScript = `js/${built.filename}`;
|
|
52
|
-
ctx.outputs.skinPartsDeclaration = SKIN_PARTS_DECLARATION_PATH;
|
|
53
|
-
await writeFile(path.join(project.root, SKIN_PARTS_DECLARATION_PATH), await generateSkinPartsDeclaration(project, built.skins));
|
|
54
|
-
const relThemePath = project.config.exml.themeFile;
|
|
55
|
-
const outTheme = { ...theme };
|
|
56
|
-
delete outTheme.exmls;
|
|
57
|
-
delete outTheme.autoGenerateExmlsList;
|
|
58
|
-
outTheme.skins = {
|
|
59
|
-
...componentSkinMappings(project),
|
|
60
|
-
...remapSkins(project, theme.skins ?? {}, skins),
|
|
61
|
-
};
|
|
62
|
-
outTheme.skinsJs = toPosix(path.relative(path.dirname(relThemePath), `js/${built.filename}`));
|
|
63
|
-
await writeFile(path.join(project.outputDir, relThemePath), JSON.stringify(outTheme, null, '\t'));
|
|
64
|
-
logger.step(`compiled ${skins.length} skin(s) → ${ctx.outputs.skinsScript}`);
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Determines which `.exml` files to compile (honours `autoGenerateExmlsList`).
|
|
70
|
-
*/
|
|
71
|
-
async function resolveExmlFiles(ctx, theme) {
|
|
72
|
-
const { project } = ctx;
|
|
73
|
-
const declared = (theme.exmls ?? []).map(e => (typeof e === 'string' ? e : e?.path)).filter(Boolean);
|
|
74
|
-
if (theme.autoGenerateExmlsList === false && declared.length > 0) {
|
|
75
|
-
const files = [];
|
|
76
|
-
const missingDeclaredPaths = new Set();
|
|
77
|
-
for (const rel of declared) {
|
|
78
|
-
try {
|
|
79
|
-
files.push(await readExmlAt(project.resourceDir, resolveExmlPath(project, rel)));
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
missingDeclaredPaths.add(toResourceRelativePath(project, rel));
|
|
83
|
-
reportDiagnostic(ctx, {
|
|
84
|
-
code: DIAGNOSTIC_CODES.EXML_DECLARED_FILE_NOT_FOUND,
|
|
85
|
-
severity: 'warning',
|
|
86
|
-
message: `Theme-declared EXML file was not found: ${rel}`,
|
|
87
|
-
location: { file: project.config.exml.themeFile },
|
|
88
|
-
suggestions: ['Correct the path or remove it from the theme exmls list.'],
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
const included = new Set(files.map(file => path.resolve(file.path)));
|
|
93
|
-
for (const component of project.components) {
|
|
94
|
-
if (included.has(path.resolve(component.skin)))
|
|
95
|
-
continue;
|
|
96
|
-
files.push(await readExmlAt(project.resourceDir, component.skin));
|
|
97
|
-
}
|
|
98
|
-
files.sort((a, b) => a.relPath.localeCompare(b.relPath));
|
|
99
|
-
return { files, missingDeclaredPaths };
|
|
100
|
-
}
|
|
101
|
-
return { files: await collectExmlFiles(project.resourceDir), missingDeclaredPaths: new Set() };
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Recursively collects every `.exml` file under `resource/`, sorted by path.
|
|
105
|
-
*/
|
|
106
|
-
async function collectExmlFiles(resourceDir) {
|
|
107
|
-
const results = [];
|
|
108
|
-
async function walk(dir) {
|
|
109
|
-
let entries;
|
|
110
|
-
try {
|
|
111
|
-
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
112
|
-
}
|
|
113
|
-
catch {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
for (const entry of entries) {
|
|
117
|
-
const full = path.join(dir, entry.name);
|
|
118
|
-
if (entry.isDirectory()) {
|
|
119
|
-
await walk(full);
|
|
120
|
-
}
|
|
121
|
-
else if (entry.name.endsWith('.exml')) {
|
|
122
|
-
results.push(await readExmlAt(resourceDir, full));
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
await walk(resourceDir);
|
|
127
|
-
return results.sort((a, b) => a.relPath.localeCompare(b.relPath));
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Resolves a theme-declared EXML path (project-root- or resource-relative).
|
|
131
|
-
*/
|
|
132
|
-
function resolveExmlPath(project, declared) {
|
|
133
|
-
const normalized = declared.replace(/^\.\//, '');
|
|
134
|
-
return normalized.startsWith('resource/')
|
|
135
|
-
? path.resolve(project.root, normalized)
|
|
136
|
-
: path.resolve(project.resourceDir, normalized);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Reads a `.exml` file at an absolute path, computing its `resource/`-relative path.
|
|
140
|
-
*/
|
|
141
|
-
async function readExmlAt(resourceDir, absolute) {
|
|
142
|
-
return {
|
|
143
|
-
path: absolute,
|
|
144
|
-
relPath: toPosix(path.relative(resourceDir, absolute)),
|
|
145
|
-
contents: await fs.readFile(absolute, 'utf-8'),
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Reads and parses the configured theme file.
|
|
150
|
-
*/
|
|
151
|
-
async function loadTheme(ctx) {
|
|
152
|
-
const { project } = ctx;
|
|
153
|
-
let source;
|
|
154
|
-
try {
|
|
155
|
-
source = await fs.readFile(project.themeFile, 'utf-8');
|
|
156
|
-
}
|
|
157
|
-
catch {
|
|
158
|
-
reportDiagnostic(ctx, {
|
|
159
|
-
code: DIAGNOSTIC_CODES.THEME_FILE_NOT_FOUND,
|
|
160
|
-
severity: 'warning',
|
|
161
|
-
message: `Theme file could not be read: ${project.config.exml.themeFile}`,
|
|
162
|
-
location: { file: project.config.exml.themeFile },
|
|
163
|
-
suggestions: ['Create the theme file or correct exml.themeFile in kurot.config.ts.'],
|
|
164
|
-
});
|
|
165
|
-
return undefined;
|
|
166
|
-
}
|
|
167
|
-
try {
|
|
168
|
-
return JSON.parse(source);
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
172
|
-
reportDiagnostic(ctx, {
|
|
173
|
-
code: DIAGNOSTIC_CODES.THEME_INVALID_JSON,
|
|
174
|
-
severity: 'error',
|
|
175
|
-
message: `Theme file is not valid JSON: ${message}`,
|
|
176
|
-
location: { file: project.config.exml.themeFile },
|
|
177
|
-
suggestions: ['Correct the JSON syntax in the theme file.'],
|
|
178
|
-
});
|
|
179
|
-
return undefined;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function reportMissingThemeSkins(ctx, theme, compiled, missingDeclaredPaths) {
|
|
183
|
-
const { project } = ctx;
|
|
184
|
-
const compiledPaths = new Set(compiled.map(skin => skin.file.relPath));
|
|
185
|
-
for (const value of Object.values(theme.skins ?? {})) {
|
|
186
|
-
if (!isSkinPath(value))
|
|
187
|
-
continue;
|
|
188
|
-
const relPath = toResourceRelativePath(project, value);
|
|
189
|
-
if (compiledPaths.has(relPath) || missingDeclaredPaths.has(relPath))
|
|
190
|
-
continue;
|
|
191
|
-
reportDiagnostic(ctx, {
|
|
192
|
-
code: DIAGNOSTIC_CODES.THEME_SKIN_NOT_FOUND,
|
|
193
|
-
severity: 'warning',
|
|
194
|
-
message: `Theme skin was not compiled: ${value}`,
|
|
195
|
-
location: { file: project.config.exml.themeFile },
|
|
196
|
-
suggestions: ['Correct the skin path or add the EXML file to the compilation list.'],
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function toResourceRelativePath(project, value) {
|
|
201
|
-
return toPosix(path.relative(project.resourceDir, resolveExmlPath(project, value)));
|
|
202
|
-
}
|
|
203
|
-
function reportDiagnostic(ctx, diagnostic) {
|
|
204
|
-
ctx.diagnostics.report(diagnostic);
|
|
205
|
-
const location = diagnostic.location ? `${diagnostic.location.file}: ` : '';
|
|
206
|
-
if (diagnostic.severity === 'error') {
|
|
207
|
-
logger.error(`${location}${diagnostic.message}`);
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
logger.warn(`${location}${diagnostic.message}`);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
function throwIfInputInvalid(ctx) {
|
|
214
|
-
if (!ctx.diagnostics.hasErrors())
|
|
215
|
-
return;
|
|
216
|
-
throw new BuildError('EXML input validation failed.');
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Rewrites the `skins` map to class names: Egret path values
|
|
220
|
-
* (`resource/skins/X.exml`) are matched to their compiled skin; values that are
|
|
221
|
-
* already class names pass through.
|
|
222
|
-
*/
|
|
223
|
-
function remapSkins(project, skins, compiled) {
|
|
224
|
-
const byRelPath = new Map(compiled.map(s => [s.file.relPath, s.className]));
|
|
225
|
-
const result = {};
|
|
226
|
-
for (const [host, value] of Object.entries(skins)) {
|
|
227
|
-
if (isSkinPath(value)) {
|
|
228
|
-
const relPath = toPosix(path.relative(project.resourceDir, resolveExmlPath(project, value)));
|
|
229
|
-
result[host] = byRelPath.get(relPath) ?? value;
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
result[host] = value;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
return result;
|
|
236
|
-
}
|
|
237
|
-
function componentSkinMappings(project) {
|
|
238
|
-
return Object.fromEntries(project.components.map(component => [component.name, component.skinClass]));
|
|
239
|
-
}
|
|
240
|
-
function isSkinPath(value) {
|
|
241
|
-
return /\.exml$/i.test(value) || value.includes('/');
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Reads the `class="..."` attribute, falling back to the file name.
|
|
245
|
-
*/
|
|
246
|
-
function extractClassName(file) {
|
|
247
|
-
const match = file.contents.match(/class="([^"]+)"/);
|
|
248
|
-
return match ? match[1] : path.basename(file.path, '.exml');
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Converts a file system path to forward-slash form (a no-op on POSIX).
|
|
252
|
-
*/
|
|
253
|
-
function toPosix(p) {
|
|
254
|
-
return p.split(path.sep).join('/');
|
|
255
|
-
}
|
|
256
|
-
//# sourceMappingURL=compile-exml.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile-exml.js","sourceRoot":"","sources":["../../../src/core/plugins/compile-exml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAA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AC,IAAI,KAAK,CAAC;QAChD,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACtB,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,qBAAqB,CAAC,OAAgB;IAC9C,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACvG,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAChC,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,IAAc;IACvC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,SAAS,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skins": {
|
|
3
|
-
"Button": "skins.ButtonSkin",
|
|
4
|
-
"CheckBox": "skins.CheckBoxSkin",
|
|
5
|
-
"RadioButton": "skins.RadioButtonSkin",
|
|
6
|
-
"ToggleSwitch": "skins.ToggleSwitchSkin",
|
|
7
|
-
"Panel": "skins.PanelSkin",
|
|
8
|
-
"ProgressBar": "skins.ProgressBarSkin",
|
|
9
|
-
"HSlider": "skins.HSliderSkin",
|
|
10
|
-
"VSlider": "skins.VSliderSkin",
|
|
11
|
-
"HScrollBar": "skins.HScrollBarSkin",
|
|
12
|
-
"VScrollBar": "skins.VScrollBarSkin",
|
|
13
|
-
"TextInput": "skins.TextInputSkin",
|
|
14
|
-
"ComboBox": "skins.ComboBoxSkin",
|
|
15
|
-
"Scroller": "skins.ScrollerSkin",
|
|
16
|
-
"ItemRenderer": "skins.ItemRendererSkin"
|
|
17
|
-
},
|
|
18
|
-
"exmls": []
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ButtonSkin"
|
|
3
|
-
states="up,down,disabled"
|
|
4
|
-
minWidth="100" minHeight="50"
|
|
5
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
6
|
-
<eui:Image width="100%" height="100%"
|
|
7
|
-
scale9Grid="1,3,8,8"
|
|
8
|
-
alpha.disabled="0.5"
|
|
9
|
-
source="button_up_png"
|
|
10
|
-
source.down="button_down_png"/>
|
|
11
|
-
<eui:Label id="labelDisplay" left="8" right="8" top="8" bottom="8"
|
|
12
|
-
textAlign="center" verticalAlign="middle"
|
|
13
|
-
textColor="0xffffff"
|
|
14
|
-
size="20"/>
|
|
15
|
-
<eui:Image id="iconDisplay" horizontalCenter="0" verticalCenter="0"/>
|
|
16
|
-
</eui:Skin>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.CheckBoxSkin"
|
|
3
|
-
states="up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected"
|
|
4
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
5
|
-
<eui:Group width="100%" height="100%">
|
|
6
|
-
<eui:layout>
|
|
7
|
-
<eui:HorizontalLayout verticalAlign="middle"/>
|
|
8
|
-
</eui:layout>
|
|
9
|
-
<eui:Image fillMode="scale"
|
|
10
|
-
alpha="1" alpha.disabled="0.5" alpha.down="0.7"
|
|
11
|
-
source="checkbox_unselect_png"
|
|
12
|
-
source.upAndSelected="checkbox_select_up_png"
|
|
13
|
-
source.downAndSelected="checkbox_select_down_png"
|
|
14
|
-
source.disabledAndSelected="checkbox_select_disabled_png"/>
|
|
15
|
-
<eui:Label id="labelDisplay" size="20" textColor="0x707070"
|
|
16
|
-
textAlign="center" verticalAlign="middle" fontFamily="Tahoma"/>
|
|
17
|
-
</eui:Group>
|
|
18
|
-
</eui:Skin>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ComboBoxSkin" minWidth="100" minHeight="36"
|
|
3
|
-
states="normal,open,disabled"
|
|
4
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
5
|
-
<!-- Trigger background -->
|
|
6
|
-
<eui:Rect width="100%" height="36"
|
|
7
|
-
fillColor="0x1a1a2e"
|
|
8
|
-
fillColor.open="0x16213e"
|
|
9
|
-
fillColor.disabled="0x16213e"
|
|
10
|
-
strokeColor="0x0f3460"
|
|
11
|
-
strokeColor.open="0x6c5ce7"
|
|
12
|
-
strokeColor.disabled="0x4a5459"
|
|
13
|
-
strokeWeight="1"/>
|
|
14
|
-
<!-- Selected item label -->
|
|
15
|
-
<eui:Label id="labelDisplay" left="10" right="36" top="0" height="36"
|
|
16
|
-
verticalAlign="middle"
|
|
17
|
-
textColor="0xdfe6e9"
|
|
18
|
-
textColor.disabled="0x636e72"
|
|
19
|
-
size="14"/>
|
|
20
|
-
<!-- Dropdown arrow indicator -->
|
|
21
|
-
<eui:Label right="4" top="0" width="24" height="36"
|
|
22
|
-
textAlign="center" verticalAlign="middle"
|
|
23
|
-
textColor="0x636e72"
|
|
24
|
-
textColor.open="0x6c5ce7"
|
|
25
|
-
text="▼"
|
|
26
|
-
size="10"/>
|
|
27
|
-
<!-- Dropdown panel -->
|
|
28
|
-
<eui:Scroller id="dropDown" left="0" right="0" top="36" height="180" visible="false">
|
|
29
|
-
<eui:List id="list" width="100%" height="180"/>
|
|
30
|
-
</eui:Scroller>
|
|
31
|
-
</eui:Skin>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.HScrollBarSkin" minWidth="20" minHeight="8"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Image id="thumb" source="roundthumb_png" scale9Grid="3,3,2,2"
|
|
5
|
-
width="30" height="8" verticalCenter="0"/>
|
|
6
|
-
</eui:Skin>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.HSliderSkin" minWidth="20" minHeight="8"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Image id="track" source="track_sb_png" scale9Grid="1,1,4,4"
|
|
5
|
-
width="100%" height="6" verticalCenter="0"/>
|
|
6
|
-
<eui:Image id="thumb" source="thumb_png" verticalCenter="0"/>
|
|
7
|
-
</eui:Skin>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ItemRendererSkin"
|
|
3
|
-
states="up,down,disabled"
|
|
4
|
-
minWidth="100" minHeight="50"
|
|
5
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
6
|
-
<eui:Image width="100%" height="100%"
|
|
7
|
-
source="button_up_png"
|
|
8
|
-
source.down="button_down_png"
|
|
9
|
-
scale9Grid="1,3,8,8"
|
|
10
|
-
alpha.disabled="0.5"/>
|
|
11
|
-
<eui:Label id="labelDisplay"
|
|
12
|
-
left="8" right="8" top="8" bottom="8"
|
|
13
|
-
size="20" fontFamily="Tahoma" textColor="0xffffff"
|
|
14
|
-
textAlign="center" verticalAlign="middle"/>
|
|
15
|
-
</eui:Skin>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ListSkin" minWidth="20" minHeight="20"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Rect width="100%" height="100%"
|
|
5
|
-
fillColor="0x1a1a2e"
|
|
6
|
-
strokeColor="0x0f3460"
|
|
7
|
-
strokeWeight="1"/>
|
|
8
|
-
<eui:Scroller id="scroller" width="100%" height="100%">
|
|
9
|
-
<eui:DataGroup id="dataGroup" width="100%" height="100%"/>
|
|
10
|
-
</eui:Scroller>
|
|
11
|
-
</eui:Skin>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.PanelSkin" minWidth="450" minHeight="230"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Image left="0" right="0" top="0" bottom="0"
|
|
5
|
-
source="border_png" scale9Grid="2,2,12,12"/>
|
|
6
|
-
<eui:Group id="moveArea" left="0" right="0" top="0" height="45">
|
|
7
|
-
<eui:Image left="0" right="0" top="0" bottom="0"
|
|
8
|
-
source="header_png" scale9Grid="2,2,12,12"/>
|
|
9
|
-
<eui:Label id="titleDisplay"
|
|
10
|
-
left="15" right="5" verticalCenter="0"
|
|
11
|
-
size="20" fontFamily="Tahoma" textColor="0xffffff"
|
|
12
|
-
wordWrap="false"/>
|
|
13
|
-
</eui:Group>
|
|
14
|
-
<eui:Button id="closeButton" label="close" bottom="5" horizontalCenter="0"/>
|
|
15
|
-
</eui:Skin>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ProgressBarSkin" minWidth="30" minHeight="18"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Image source="track_pb_png" scale9Grid="1,1,4,4"
|
|
5
|
-
width="100%" height="100%" verticalCenter="0"/>
|
|
6
|
-
<eui:Image id="thumb" source="thumb_pb_png" scale9Grid="1,1,4,4"
|
|
7
|
-
width="100%" height="100%"/>
|
|
8
|
-
<eui:Label id="labelDisplay" textAlign="center" verticalAlign="middle"
|
|
9
|
-
size="15" fontFamily="Tahoma" textColor="0x707070"
|
|
10
|
-
horizontalCenter="0" verticalCenter="0"/>
|
|
11
|
-
</eui:Skin>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.RadioButtonSkin"
|
|
3
|
-
states="up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected"
|
|
4
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
5
|
-
<eui:Group width="100%" height="100%">
|
|
6
|
-
<eui:layout>
|
|
7
|
-
<eui:HorizontalLayout verticalAlign="middle"/>
|
|
8
|
-
</eui:layout>
|
|
9
|
-
<eui:Image fillMode="scale"
|
|
10
|
-
alpha="1" alpha.disabled="0.5" alpha.down="0.7"
|
|
11
|
-
source="radiobutton_unselect_png"
|
|
12
|
-
source.upAndSelected="radiobutton_select_up_png"
|
|
13
|
-
source.downAndSelected="radiobutton_select_down_png"
|
|
14
|
-
source.disabledAndSelected="radiobutton_select_disabled_png"/>
|
|
15
|
-
<eui:Label id="labelDisplay" size="20" textColor="0x707070"
|
|
16
|
-
textAlign="center" verticalAlign="middle" fontFamily="Tahoma"/>
|
|
17
|
-
</eui:Group>
|
|
18
|
-
</eui:Skin>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ScrollerSkin" minWidth="20" minHeight="20"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:HScrollBar id="horizontalScrollBar" left="0" right="12" bottom="0" height="12"
|
|
5
|
-
autoVisibility="false" visible="false"/>
|
|
6
|
-
<eui:VScrollBar id="verticalScrollBar" top="0" right="0" bottom="12" width="12"
|
|
7
|
-
autoVisibility="false" visible="false"/>
|
|
8
|
-
</eui:Skin>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.TabBarSkin" minWidth="100" minHeight="40"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Rect width="100%" height="100%" fillColor="0x16213e"/>
|
|
5
|
-
<eui:DataGroup id="dataGroup" width="100%" height="100%"/>
|
|
6
|
-
</eui:Skin>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.TextInputSkin" minWidth="300" minHeight="40"
|
|
3
|
-
states="normal,disabled,normalWithPrompt,disabledWithPrompt"
|
|
4
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
5
|
-
<eui:Rect width="100%" height="100%"
|
|
6
|
-
fillColor="0xffffff"
|
|
7
|
-
alpha.disabled="0.5"/>
|
|
8
|
-
<eui:EditableText id="textDisplay"
|
|
9
|
-
left="10" right="10" verticalCenter="0" height="24"
|
|
10
|
-
verticalAlign="middle"
|
|
11
|
-
textColor="0x000000"
|
|
12
|
-
textColor.disabled="0xff0000"
|
|
13
|
-
size="20"/>
|
|
14
|
-
<eui:Label id="promptDisplay"
|
|
15
|
-
left="10" right="10" verticalCenter="0" height="24"
|
|
16
|
-
touchEnabled="false"
|
|
17
|
-
includeIn="normalWithPrompt,disabledWithPrompt"
|
|
18
|
-
multiline="false" wordWrap="false"
|
|
19
|
-
verticalAlign="middle"
|
|
20
|
-
textColor="0xa9a9a9"
|
|
21
|
-
size="20"/>
|
|
22
|
-
</eui:Skin>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ToggleButtonSkin"
|
|
3
|
-
states="up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected"
|
|
4
|
-
minWidth="100" minHeight="50"
|
|
5
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
6
|
-
<eui:Rect id="bg" width="100%" height="100%"
|
|
7
|
-
fillColor="0x636e72"
|
|
8
|
-
fillColor.down="0x4a5459"
|
|
9
|
-
fillColor.disabled="0x2d3436"
|
|
10
|
-
fillColor.upAndSelected="0x6c5ce7"
|
|
11
|
-
fillColor.downAndSelected="0x5a4bd1"
|
|
12
|
-
fillColor.disabledAndSelected="0x2d3436"
|
|
13
|
-
strokeColor="0x4a5459"
|
|
14
|
-
strokeWeight="1"/>
|
|
15
|
-
<eui:Label id="labelDisplay" left="8" right="8" top="8" bottom="8"
|
|
16
|
-
textAlign="center" verticalAlign="middle"
|
|
17
|
-
textColor="0xdfe6e9"
|
|
18
|
-
textColor.disabled="0x636e72"
|
|
19
|
-
textColor.upAndSelected="0xffffff"
|
|
20
|
-
size="16"/>
|
|
21
|
-
</eui:Skin>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.ToggleSwitchSkin"
|
|
3
|
-
states="up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected"
|
|
4
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
5
|
-
<eui:Image source="on_png"
|
|
6
|
-
source.up="off_png"
|
|
7
|
-
source.down="off_png"
|
|
8
|
-
source.disabled="off_png"/>
|
|
9
|
-
<eui:Image source="handle_png"
|
|
10
|
-
horizontalCenter="-18"
|
|
11
|
-
horizontalCenter.upAndSelected="18"
|
|
12
|
-
horizontalCenter.downAndSelected="18"
|
|
13
|
-
horizontalCenter.disabledAndSelected="18"
|
|
14
|
-
verticalCenter="0"/>
|
|
15
|
-
</eui:Skin>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.VScrollBarSkin" minWidth="8" minHeight="20"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Image id="thumb" source="roundthumb_png" scale9Grid="3,3,2,2"
|
|
5
|
-
width="8" height="30" horizontalCenter="0"/>
|
|
6
|
-
</eui:Skin>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<eui:Skin class="skins.VSliderSkin" minWidth="25" minHeight="30"
|
|
3
|
-
xmlns:eui="http://ns.egret.com/eui">
|
|
4
|
-
<eui:Image id="track" source="track_png" scale9Grid="1,1,4,4"
|
|
5
|
-
width="7" height="100%" horizontalCenter="0"/>
|
|
6
|
-
<eui:Image id="thumb" source="thumb_png" horizontalCenter="0"/>
|
|
7
|
-
</eui:Skin>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|