@kurot/cli 3.2.0 → 3.3.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 +54 -0
- package/README.md +56 -12
- package/dist/core/kui/index.d.ts +6 -2
- package/dist/core/kui/index.d.ts.map +1 -1
- package/dist/core/kui/index.js +3 -3
- package/dist/core/kui/index.js.map +1 -1
- package/dist/core/kui/kui-parser.d.ts +2 -2
- package/dist/core/kui/kui-parser.d.ts.map +1 -1
- package/dist/core/kui/kui-parser.js +3 -3
- package/dist/core/kui/kui-parser.js.map +1 -1
- package/dist/core/kui/skin-module-builder.js +5 -5
- package/dist/core/kui/skin-module-builder.js.map +1 -1
- package/dist/core/template.d.ts.map +1 -1
- package/dist/core/template.js +1 -0
- package/dist/core/template.js.map +1 -1
- package/docs/ai-context.md +32 -15
- package/docs/architecture.md +8 -6
- package/docs/game-template.md +60 -0
- package/docs/label-text-layout.md +6 -1
- package/package.json +2 -2
- package/templates/game/package.json +2 -1
- package/templates/game/resource/assets/fonts/ChakraPetch-Bold.ttf +0 -0
- package/templates/game/resource/assets/fonts/ChakraPetch-Regular.ttf +0 -0
- package/templates/game/resource/assets/fonts/OFL.txt +93 -0
- package/templates/game/resource/config/locale.json +4 -0
- package/templates/game/resource/config/style.json +16 -0
- package/templates/game/resource/default.res.json +11 -1
- package/templates/game/resource/lang/lang_en_US.properties +5 -0
- package/templates/game/resource/ui/skins/ButtonSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/CheckBoxSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/ComboBoxSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/ItemRendererSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/PanelSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/ProgressBarSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/RadioButtonSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/TextInputSkin.kui.xml +1 -1
- package/templates/game/resource/ui/skins/ToggleButtonSkin.kui.xml +1 -1
- package/templates/game/src/LocaleManager.ts +109 -0
- package/templates/game/src/Main.ts +58 -34
- package/templates/game/src/StyleManager.ts +57 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,60 @@ and CLI command/configuration APIs follow [Semantic Versioning](https://semver.o
|
|
|
7
7
|
The early KUI XML contract follows the pre-1.0 `ui-document` kernel; authored
|
|
8
8
|
format changes are documented explicitly in each release.
|
|
9
9
|
|
|
10
|
+
## 3.3.0 — 2026-10-07
|
|
11
|
+
|
|
12
|
+
### Label Presets
|
|
13
|
+
|
|
14
|
+
- Expand shared Label presets from the optional fixed style.json before SkinIR
|
|
15
|
+
generation. Emit only native Label properties; retain authored XML untouched.
|
|
16
|
+
- Rebuild all consuming skins when presets change. Invalid presets retain the
|
|
17
|
+
previous successful bundle and recover after configuration correction.
|
|
18
|
+
- Add the optional `styleSheet` compilation option for programmatic KUI compilation.
|
|
19
|
+
- Preserve the precedence of state fields over local fields, preset fields and
|
|
20
|
+
native defaults. Missing references and unsupported state preset selection fail
|
|
21
|
+
explicitly rather than falling back silently.
|
|
22
|
+
|
|
23
|
+
### Dependencies and Compatibility
|
|
24
|
+
|
|
25
|
+
- Require published `@kurot/ui-document@^0.11.0` and remove the local pnpm override;
|
|
26
|
+
installation and compilation use the registry kernel.
|
|
27
|
+
- Command/configuration APIs, style schemaVersion 1 and document format version 2
|
|
28
|
+
remain unchanged. Existing skins receive no automatic migration. Core/UI do
|
|
29
|
+
not need a new release for preset compilation; font loading belongs to the project.
|
|
30
|
+
|
|
31
|
+
### Tests
|
|
32
|
+
|
|
33
|
+
- Cover native property emission, local/state precedence, invalid references and
|
|
34
|
+
shared preset changes across skins, including watcher failure and recovery.
|
|
35
|
+
|
|
36
|
+
## 3.2.1 — 2026-10-06
|
|
37
|
+
|
|
38
|
+
### Game Template
|
|
39
|
+
|
|
40
|
+
- Include fixed style.json and locale.json configuration, English properties,
|
|
41
|
+
Chakra Petch regular/bold fonts and their SIL Open Font License.
|
|
42
|
+
- Load and publish project fonts before creating any UI, then register preload
|
|
43
|
+
translations using the URL language or configured default with English/key fallback.
|
|
44
|
+
- Use shared ui-document font/color validation and named disabled text colors;
|
|
45
|
+
default skins inherit the project font instead of hardcoded Tahoma.
|
|
46
|
+
- Keep the empty template minimal. Existing projects are not rewritten by scaffolding.
|
|
47
|
+
- Create resource/ui/app alongside the reusable component directories so the
|
|
48
|
+
application Skin workspace is ready for the Editor.
|
|
49
|
+
|
|
50
|
+
### Dependencies and Compatibility
|
|
51
|
+
|
|
52
|
+
- New game projects include ui-document for the shared stylesheet parser. The
|
|
53
|
+
compiler retains its existing ui-document ^0.10.0 dependency.
|
|
54
|
+
- Command/configuration APIs, KUI XML semantics and document format version 2
|
|
55
|
+
remain unchanged. Existing projects receive no automatic migration.
|
|
56
|
+
|
|
57
|
+
### Tests
|
|
58
|
+
|
|
59
|
+
- Validate bundled fonts/licenses, stylesheet colors, translation registration,
|
|
60
|
+
locale fallback, failed initialization and the unchanged empty template.
|
|
61
|
+
- Compile all bundled default skins with the project palette and verify newly
|
|
62
|
+
generated projects through strict builds, type checking and browser rendering.
|
|
63
|
+
|
|
10
64
|
## 3.2.0 — 2026-10-06
|
|
11
65
|
|
|
12
66
|
### Added
|
package/README.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Build tooling for the Kurot UI Editor workflow. It uses esbuild, emits ES2022
|
|
4
4
|
ESM, and compiles canonical KUI XML skins into runtime theme modules.
|
|
5
5
|
|
|
6
|
-
> **Current
|
|
6
|
+
> **Current version: 3.3.0 (prepared for publication).** Requires published `@kurot/ui-document@^0.11.0`
|
|
7
|
+
> and Node.js 20 or later. The CLI runs only at build time.
|
|
7
8
|
|
|
8
9
|
> **Release scope:** The 3.x line is dedicated to Kurot Editor integration.
|
|
9
10
|
> Existing game projects that use EXML should remain on
|
|
@@ -12,6 +13,12 @@ ESM, and compiles canonical KUI XML skins into runtime theme modules.
|
|
|
12
13
|
|
|
13
14
|
See [CHANGELOG.md](CHANGELOG.md) for release history.
|
|
14
15
|
|
|
16
|
+
Version 3.2.1 adds project styles, bundled fonts and English translations to the
|
|
17
|
+
game template. Existing projects are not rewritten. See [game template setup](docs/game-template.md).
|
|
18
|
+
|
|
19
|
+
Version 3.3.0 compiles shared Label presets from `style.json.labels` into native
|
|
20
|
+
properties, with local and Skin state fields taking priority. See [Label presets](#label-presets-in-330).
|
|
21
|
+
|
|
15
22
|
## Label text fitting in 3.1.0
|
|
16
23
|
|
|
17
24
|
The shared ui-document catalog supports Label `textFit` and `minFontSize`
|
|
@@ -37,7 +44,7 @@ See the [compilation contract](docs/label-text-layout.md) and
|
|
|
37
44
|
The CLI does not require a global install.
|
|
38
45
|
|
|
39
46
|
```bash
|
|
40
|
-
npx @kurot/cli create my-game
|
|
47
|
+
npx @kurot/cli@3.3.0 create my-game
|
|
41
48
|
cd my-game
|
|
42
49
|
pnpm install
|
|
43
50
|
pnpm dev
|
|
@@ -45,7 +52,7 @@ pnpm dev
|
|
|
45
52
|
|
|
46
53
|
Scaffolded projects expose `build`, `dev`, and `clean` scripts. For an
|
|
47
54
|
Editor-managed KUI XML project, install the package with
|
|
48
|
-
`pnpm add -D @kurot/cli@^3.
|
|
55
|
+
`pnpm add -D @kurot/cli@^3.3.0`. Existing EXML projects should keep their current
|
|
49
56
|
1.3.x dependency.
|
|
50
57
|
|
|
51
58
|
## Commands
|
|
@@ -56,9 +63,11 @@ Editor-managed KUI XML project, install the package with
|
|
|
56
63
|
kurot create <name> [--template game|empty]
|
|
57
64
|
```
|
|
58
65
|
|
|
59
|
-
The `game` template includes `@kurot/core`, `@kurot/game`, `@kurot/ui`,
|
|
60
|
-
skins,
|
|
61
|
-
|
|
66
|
+
The `game` template includes `@kurot/core`, `@kurot/game`, `@kurot/ui`,
|
|
67
|
+
`@kurot/ui-document`, KUI skins, project styles/fonts, English translations,
|
|
68
|
+
resource loading, and an editable HTML template. Fonts load before creating UI;
|
|
69
|
+
translations register after preload. The `empty` template contains a minimal
|
|
70
|
+
`Sprite` application without UI/style/language dependencies.
|
|
62
71
|
|
|
63
72
|
### `kurot build`
|
|
64
73
|
|
|
@@ -153,7 +162,7 @@ use `property.state` on the affected node, so internal graphics remain unnamed.
|
|
|
153
162
|
Image sources use their resource key directly, for example
|
|
154
163
|
`source="button_up_png"`.
|
|
155
164
|
|
|
156
|
-
Version 3.
|
|
165
|
+
Version 3.3.0 uses `@kurot/ui-document@^0.11.0` and retains its literal-string XML rules.
|
|
157
166
|
For example, `<Label text="100.80" text.down="false" size="48" />` compiles
|
|
158
167
|
the exact strings `100.80` and `false`, while the font size stays numeric.
|
|
159
168
|
String properties no longer add or remove backslash type escapes. Remove old
|
|
@@ -206,24 +215,40 @@ my-game/
|
|
|
206
215
|
├── kurot.config.ts
|
|
207
216
|
├── resource/
|
|
208
217
|
│ ├── default.res.json
|
|
209
|
-
│ ├──
|
|
218
|
+
│ ├── config/
|
|
219
|
+
│ │ ├── style.json
|
|
220
|
+
│ │ └── locale.json
|
|
221
|
+
│ ├── lang/lang_en_US.properties
|
|
222
|
+
│ ├── assets/fonts/
|
|
223
|
+
│ │ ├── ChakraPetch-Regular.ttf
|
|
224
|
+
│ │ ├── ChakraPetch-Bold.ttf
|
|
225
|
+
│ │ └── OFL.txt
|
|
210
226
|
│ └── ui/
|
|
227
|
+
│ ├── app/
|
|
211
228
|
│ ├── components/
|
|
212
229
|
│ └── skins/*.kui.xml
|
|
213
230
|
├── src/
|
|
214
231
|
│ ├── components/
|
|
215
|
-
│ ├──
|
|
232
|
+
│ ├── Preloader.ts
|
|
233
|
+
│ ├── StyleManager.ts
|
|
234
|
+
│ ├── LocaleManager.ts
|
|
216
235
|
│ └── Main.ts
|
|
217
236
|
└── template/web/index.html
|
|
218
237
|
```
|
|
219
238
|
|
|
239
|
+
StyleManager uses the same ui-document stylesheet parser as the compiler/Editor.
|
|
240
|
+
`style.json` is read directly, independently of the manifest; locale.json and
|
|
241
|
+
enabled properties files are registered in `preload`. Replace fonts by changing
|
|
242
|
+
the resource-relative files/paths, and add languages through the Editor.
|
|
243
|
+
See [game template setup](docs/game-template.md) for lifecycle and fallback rules.
|
|
244
|
+
|
|
220
245
|
## Resource defaults in 3.0.0
|
|
221
246
|
|
|
222
247
|
KUI builds validate `resource/default.res.json` and inherit image or sheet-frame
|
|
223
248
|
`scale9grid` values into compiled `Image.scale9Grid` when XML does not set one.
|
|
224
249
|
Local grids and `scale9Grid="false"` take priority. Development mode rebuilds
|
|
225
250
|
skins after manifest edits; a malformed manifest leaves the last good Skin
|
|
226
|
-
bundle in place. The current CLI requires `@kurot/ui-document@^0.
|
|
251
|
+
bundle in place. The current CLI requires `@kurot/ui-document@^0.11.0`.
|
|
227
252
|
|
|
228
253
|
Sheet `subkeys` must be an object-valued frame map. Refresh old sheets in the
|
|
229
254
|
Editor before upgrading a KUI project; string-valued subkeys now fail the build.
|
|
@@ -232,7 +257,7 @@ See the [resource nine-slice contract](../ui-document/docs/resource-nine-slice.m
|
|
|
232
257
|
## Project style colors in 3.2.0
|
|
233
258
|
|
|
234
259
|
The optional fixed `resource/config/style.json` is independent of
|
|
235
|
-
`default.res.json`. Each KUI build reads it
|
|
260
|
+
`default.res.json`. Each KUI build reads it through the shared document kernel, validates
|
|
236
261
|
font definitions and the optional named `colors` palette, and resolves color
|
|
237
262
|
references before generating Skin factories:
|
|
238
263
|
|
|
@@ -253,9 +278,28 @@ An absent stylesheet is allowed when no Skin references its colors. An existing
|
|
|
253
278
|
stylesheet must contain valid font definitions even if the build only consumes
|
|
254
279
|
colors; see the shared [project style contract](../ui-document/docs/project-styles.md).
|
|
255
280
|
The CLI does not load fonts, apply runtime CSS or introduce live game theme
|
|
256
|
-
switching.
|
|
281
|
+
switching. CLI-built skins run directly through `@kurot/ui`; `@kurot/ui-runtime`
|
|
282
|
+
is not required for this compilation path. Node.js >= 20 and semantic format
|
|
283
|
+
version 2 remain unchanged.
|
|
257
284
|
|
|
258
285
|
The previous `@token:color:<key>` XML prefix is rejected by ui-document 0.10.
|
|
259
286
|
Update those references explicitly before adopting CLI 3.2; ordinary text stays
|
|
260
287
|
literal. Existing EXML projects remain on CLI 1.3.x. No Core/UI rendering change
|
|
261
288
|
is required for color expansion.
|
|
289
|
+
|
|
290
|
+
## Label presets in 3.3.0
|
|
291
|
+
|
|
292
|
+
CLI 3.3.0 expands `textStyle="@style:labels:<key>"` through the shared
|
|
293
|
+
`style.json.labels` contract before generating native Label properties. Local and
|
|
294
|
+
state fields win; authoring references remain in XML. Development watches the
|
|
295
|
+
stylesheet and retains the last good bundle on errors. Programmatic `compileKUI`
|
|
296
|
+
accepts `styleSheet: parseUIStyleSheet(config)`. No Core/UI renderer change is needed.
|
|
297
|
+
|
|
298
|
+
Select a preset only in Default; named states override individual fields rather
|
|
299
|
+
than selecting a different preset. Missing presets, unsupported selection or
|
|
300
|
+
invalid configuration fail explicitly. Expansion runs after resource defaults
|
|
301
|
+
and before color resolution. It does not load fonts or measure text.
|
|
302
|
+
|
|
303
|
+
Version 3.3.0 uses published ui-document 0.11.0 without local overrides. CLI
|
|
304
|
+
3.2.1 does not include this feature. Existing projects are not migrated.
|
|
305
|
+
See [the shared contract](../ui-document/docs/project-styles.md).
|
package/dist/core/kui/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* KUI Skin parser and ESM factory generator.
|
|
3
|
+
*/
|
|
4
|
+
import type { UIResourceConfigEntry, UIStyleSheet } from '@kurot/ui-document';
|
|
2
5
|
import type { SkinIR } from './ast.js';
|
|
3
6
|
import type { CodeGenOptions } from './codegen.js';
|
|
4
7
|
import type { NamespaceModule } from './registry.js';
|
|
@@ -17,6 +20,7 @@ export interface CompileKUIOptions extends CodeGenOptions {
|
|
|
17
20
|
readonly customNamespaces?: readonly NamespaceModule[];
|
|
18
21
|
readonly resources?: readonly UIResourceConfigEntry[];
|
|
19
22
|
readonly colors?: Readonly<Record<string, number>>;
|
|
23
|
+
readonly styleSheet?: UIStyleSheet;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Compiles one KUI Skin source string to an ESM factory module.
|
|
@@ -25,5 +29,5 @@ export declare function compileKUI(source: string, className?: string, options?:
|
|
|
25
29
|
/**
|
|
26
30
|
* Parses one KUI Skin source string into the compiler IR.
|
|
27
31
|
*/
|
|
28
|
-
export declare function parseToIR(source: string, className?: string, customNamespaces?: readonly NamespaceModule[], resources?: readonly UIResourceConfigEntry[], colors?: Readonly<Record<string, number
|
|
32
|
+
export declare function parseToIR(source: string, className?: string, customNamespaces?: readonly NamespaceModule[], resources?: readonly UIResourceConfigEntry[], colors?: Readonly<Record<string, number>>, styleSheet?: UIStyleSheet): SkinIR;
|
|
29
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/kui/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/kui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,YAAY,EACX,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,aAAa,GACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAChF,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACxD;;OAEG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACvD,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAUlG;AAED;;GAEG;AACH,wBAAgB,SAAS,CACxB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,gBAAgB,GAAE,SAAS,eAAe,EAAO,EACjD,SAAS,GAAE,SAAS,qBAAqB,EAAO,EAChD,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACzC,UAAU,CAAC,EAAE,YAAY,GACvB,MAAM,CAER"}
|
package/dist/core/kui/index.js
CHANGED
|
@@ -11,13 +11,13 @@ export { generateCode } from './codegen.js';
|
|
|
11
11
|
* Compiles one KUI Skin source string to an ESM factory module.
|
|
12
12
|
*/
|
|
13
13
|
export function compileKUI(source, className, options) {
|
|
14
|
-
const ir = parseKUISkin(source, className, options?.customNamespaces ?? [], options?.resources ?? [], options?.colors ?? {});
|
|
14
|
+
const ir = parseKUISkin(source, className, options?.customNamespaces ?? [], options?.resources ?? [], options?.colors ?? options?.styleSheet?.colors ?? {}, options?.styleSheet);
|
|
15
15
|
return generateCode(ir, options);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Parses one KUI Skin source string into the compiler IR.
|
|
19
19
|
*/
|
|
20
|
-
export function parseToIR(source, className, customNamespaces = [], resources = [], colors
|
|
21
|
-
return parseKUISkin(source, className, customNamespaces, resources, colors);
|
|
20
|
+
export function parseToIR(source, className, customNamespaces = [], resources = [], colors, styleSheet) {
|
|
21
|
+
return parseKUISkin(source, className, customNamespaces, resources, colors, styleSheet);
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/kui/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/kui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAK/C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAiB1E,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGhF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAa5C;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,SAAkB,EAAE,OAA2B;IACzF,MAAM,EAAE,GAAG,YAAY,CACtB,MAAM,EACN,SAAS,EACT,OAAO,EAAE,gBAAgB,IAAI,EAAE,EAC/B,OAAO,EAAE,SAAS,IAAI,EAAE,EACxB,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,EAAE,EACpD,OAAO,EAAE,UAAU,CACnB,CAAC;IACF,OAAO,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CACxB,MAAc,EACd,SAAkB,EAClB,mBAA+C,EAAE,EACjD,YAA8C,EAAE,EAChD,MAAyC,EACzC,UAAyB;IAEzB,OAAO,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { UIResourceConfigEntry } from '@kurot/ui-document';
|
|
1
|
+
import type { UIResourceConfigEntry, UIStyleSheet } from '@kurot/ui-document';
|
|
2
2
|
import type { SkinIR } from './ast.js';
|
|
3
3
|
import type { NamespaceModule } from './registry.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parses a KUI Skin document into the existing skin code-generation IR.
|
|
6
6
|
*/
|
|
7
|
-
export declare function parseKUISkin(source: string, className?: string, customNamespaces?: readonly NamespaceModule[], resources?: readonly UIResourceConfigEntry[], colors?: Readonly<Record<string, number
|
|
7
|
+
export declare function parseKUISkin(source: string, className?: string, customNamespaces?: readonly NamespaceModule[], resources?: readonly UIResourceConfigEntry[], colors?: Readonly<Record<string, number>>, styleSheet?: UIStyleSheet): SkinIR;
|
|
8
8
|
//# sourceMappingURL=kui-parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kui-parser.d.ts","sourceRoot":"","sources":["../../../src/core/kui/kui-parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kui-parser.d.ts","sourceRoot":"","sources":["../../../src/core/kui/kui-parser.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAuC,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnH,OAAO,KAAK,EAIX,MAAM,EAIN,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;GAEG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,gBAAgB,GAAE,SAAS,eAAe,EAAO,EACjD,SAAS,GAAE,SAAS,qBAAqB,EAAO,EAChD,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACzC,UAAU,CAAC,EAAE,YAAY,GACvB,MAAM,CAMR"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isUIAssetReference, isUIDesignTokenReference, isUIResourceReference, isSyntheticNodeId, parseUIDocument, resolveUIResourceDefaults, resolveUIStyleColors, } from '@kurot/ui-document';
|
|
1
|
+
import { isUIAssetReference, isUIDesignTokenReference, isUIResourceReference, isSyntheticNodeId, parseUIDocument, resolveUIResourceDefaults, resolveUIStyleColors, resolveUILabelStyles, } from '@kurot/ui-document';
|
|
2
2
|
import { localName, lookupComponent } from './registry.js';
|
|
3
3
|
/**
|
|
4
4
|
* Parses a KUI Skin document into the existing skin code-generation IR.
|
|
5
5
|
*/
|
|
6
|
-
export function parseKUISkin(source, className, customNamespaces = [], resources = [], colors
|
|
7
|
-
const document = resolveUIStyleColors(resolveUIResourceDefaults(parseUIDocument(source), resources), colors);
|
|
6
|
+
export function parseKUISkin(source, className, customNamespaces = [], resources = [], colors, styleSheet) {
|
|
7
|
+
const document = resolveUIStyleColors(resolveUILabelStyles(resolveUIResourceDefaults(parseUIDocument(source), resources), styleSheet), colors ?? styleSheet?.colors ?? {});
|
|
8
8
|
return new KUIParseContext(source, document, className ?? document.id, customNamespaces).parse();
|
|
9
9
|
}
|
|
10
10
|
class KUIParseContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kui-parser.js","sourceRoot":"","sources":["../../../src/core/kui/kui-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,oBAAoB,CAAC;AAW5B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG3D;;GAEG;AACH,MAAM,UAAU,YAAY,CAC3B,MAAc,EACd,SAAkB,EAClB,mBAA+C,EAAE,EACjD,YAA8C,EAAE,EAChD,
|
|
1
|
+
{"version":3,"file":"kui-parser.js","sourceRoot":"","sources":["../../../src/core/kui/kui-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,GACpB,MAAM,oBAAoB,CAAC;AAW5B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG3D;;GAEG;AACH,MAAM,UAAU,YAAY,CAC3B,MAAc,EACd,SAAkB,EAClB,mBAA+C,EAAE,EACjD,YAA8C,EAAE,EAChD,MAAyC,EACzC,UAAyB;IAEzB,MAAM,QAAQ,GAAG,oBAAoB,CACpC,oBAAoB,CAAC,yBAAyB,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,EAC/F,MAAM,IAAI,UAAU,EAAE,MAAM,IAAI,EAAE,CAClC,CAAC;IACF,OAAO,IAAI,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,IAAI,QAAQ,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;AAClG,CAAC;AAED,MAAM,eAAe;IAOF;IACA;IACA;IACA;IATD,QAAQ,G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ED,SAAS,YAAY,CAAC,EAAU,EAAE,SAAiB,EAAE,KAAa;IACjE,MAAM,SAAS,GAAG,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;IACrD,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IACpD,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC;AAC7E,CAAC;AAED,SAAS,WAAW,CAAC,MAAc,EAAE,GAAW;IAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IACrD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;AAC/C,CAAC;AAED,SAAS,eAAe,CAAC,KAAkC;IAC1D,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAED,SAAS,aAAa,CAAC,KAAsB;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,UAAU,CAAC,IAA0B;IAC7C,OAAO,IAAI,KAAK,SAAS,CAAC;AAC3B,CAAC"}
|
|
@@ -27,17 +27,17 @@ export async function buildSkinsModule(ctx, skins) {
|
|
|
27
27
|
throw new BuildError(`Resource configuration failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
let
|
|
30
|
+
let styleSheet;
|
|
31
31
|
try {
|
|
32
32
|
const source = await fs.readFile(path.join(ctx.project.resourceDir, 'config/style.json'), 'utf8');
|
|
33
|
-
|
|
33
|
+
styleSheet = parseUIStyleSheet(JSON.parse(source));
|
|
34
34
|
}
|
|
35
35
|
catch (error) {
|
|
36
36
|
if (error.code !== 'ENOENT') {
|
|
37
37
|
throw new BuildError(`resource/config/style.json: ${error instanceof Error ? error.message : String(error)}`);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
const modules = await Promise.all(skins.map(skin => generateSkinModule(ctx, skin, resources,
|
|
40
|
+
const modules = await Promise.all(skins.map(skin => generateSkinModule(ctx, skin, resources, styleSheet)));
|
|
41
41
|
if (modules.some(module => module === undefined) || ctx.diagnostics.hasErrors()) {
|
|
42
42
|
throw new BuildError('KUI compilation failed.');
|
|
43
43
|
}
|
|
@@ -58,14 +58,14 @@ export async function buildSkinsModule(ctx, skins) {
|
|
|
58
58
|
await fs.rm(temporaryRoot, { recursive: true, force: true });
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
async function generateSkinModule(ctx, skin, resources,
|
|
61
|
+
async function generateSkinModule(ctx, skin, resources, styleSheet) {
|
|
62
62
|
try {
|
|
63
63
|
const namespaces = ctx.project.customNamespaces.map(ns => ({
|
|
64
64
|
prefix: ns.prefix,
|
|
65
65
|
specifier: ns.specifier,
|
|
66
66
|
...(ns.components ? { componentNames: new Set(ns.components.map(component => component.name)) } : {}),
|
|
67
67
|
}));
|
|
68
|
-
const ir = parseToIR(skin.file.contents, skin.className, namespaces, resources, colors);
|
|
68
|
+
const ir = parseToIR(skin.file.contents, skin.className, namespaces, resources, styleSheet?.colors ?? {}, styleSheet);
|
|
69
69
|
const diagnostics = createUnresolvedTagDiagnostics(skin.file.relPath, skin.file.contents, ir.unresolvedTags, namespaces);
|
|
70
70
|
for (const diagnostic of diagnostics) {
|
|
71
71
|
ctx.diagnostics.report(diagnostic);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skin-module-builder.js","sourceRoot":"","sources":["../../../src/core/kui/skin-module-builder.ts"],"names":[],"mappings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,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACrD,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;QAChE,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;IACpE,CAAC;YAAS,CAAC;QACV,MAAM,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;AACF,CAAC;AAED,SAAS,WAAW,CAAC,SAAiB;IACrC,MAAM,IAAI,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,MAAM,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;IACpF,OAAO,SAAS,IAAI,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/core/template.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,eAAO,MAAM,SAAS,4BAA6B,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/core/template.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,eAAO,MAAM,SAAS,4BAA6B,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BzF"}
|
package/dist/core/template.js
CHANGED
|
@@ -33,6 +33,7 @@ export async function scaffoldProject(name, template) {
|
|
|
33
33
|
await Promise.all([
|
|
34
34
|
ensureDir(path.join(destDir, 'src/components')),
|
|
35
35
|
ensureDir(path.join(destDir, 'resource/ui/components')),
|
|
36
|
+
ensureDir(path.join(destDir, 'resource/ui/app')),
|
|
36
37
|
]);
|
|
37
38
|
}
|
|
38
39
|
const pkgPath = path.join(destDir, 'package.json');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/core/template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AASvE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AACjE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AAOpD;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAY,EAAE,QAAsB;IACzE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,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C,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAyB,CAAC;YACxD,IAAI,IAAI,CAAC,OAAO;gBAAE,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAC7C,CAAC;IACF,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAwB,CAAC;IACnF,OAAO,GAAG,CAAC,OAAO,CAAC;AACpB,CAAC"}
|
package/docs/ai-context.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @kurot/cli — AI context map
|
|
2
2
|
|
|
3
3
|
Read this before exploring `src/`. [`architecture.md`](./architecture.md)
|
|
4
|
-
explains the plugin pipeline. The package is `@kurot/cli@3.
|
|
4
|
+
explains the plugin pipeline. The package is `@kurot/cli@3.3.0`, runs on
|
|
5
5
|
Node.js 20+, and is installed as a project dev dependency.
|
|
6
6
|
|
|
7
7
|
## Directory map
|
|
@@ -24,6 +24,12 @@ src/
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Project templates are under `templates/game` and `templates/empty`.
|
|
27
|
+
The 3.2.1 game template includes fixed style/locale configuration,
|
|
28
|
+
English properties and licensed regular/bold font files. StyleManager finishes
|
|
29
|
+
font loading before Main creates Player/Preloader; LocaleManager registers
|
|
30
|
+
preload texts before creating the scene. See [game-template.md](game-template.md).
|
|
31
|
+
Version 3.3.0 is prepared for publication with Label preset compilation and
|
|
32
|
+
published ui-document 0.11.0. It has no local document-kernel override.
|
|
27
33
|
|
|
28
34
|
## KUI compilation
|
|
29
35
|
|
|
@@ -39,7 +45,7 @@ and layout apply to the runtime Skin, and its direct visual children become
|
|
|
39
45
|
`property.state` attributes. Storage IDs and runtime mapping metadata are not
|
|
40
46
|
authored XML fields.
|
|
41
47
|
|
|
42
|
-
CLI 3.
|
|
48
|
+
CLI 3.3.0 requires `@kurot/ui-document@^0.11.0`. Schema-defined strings, including
|
|
43
49
|
numeric/boolean-looking text and state text, are literal attributes without
|
|
44
50
|
backslash type escaping. Old synthetic prefixes become literal characters;
|
|
45
51
|
do not migrate them silently. Numeric/boolean properties and schema-free
|
|
@@ -116,19 +122,20 @@ in `namespace-external-plugin.ts`.
|
|
|
116
122
|
|
|
117
123
|
## Configuration lookup
|
|
118
124
|
|
|
119
|
-
| Task | File
|
|
120
|
-
| -------------------------------- |
|
|
121
|
-
| Add or validate a config field | `src/core/config.ts`
|
|
122
|
-
| Resolve an absolute project path | `src/core/project.ts`
|
|
123
|
-
| Change KUI scanning/theme output | `src/core/plugins/compile-kui.ts`
|
|
124
|
-
| Change KUI node code generation | `src/core/kui/kui-parser.ts`, `codegen.ts`
|
|
125
|
-
| Add a built-in component tag | `src/core/kui/registry.ts`
|
|
126
|
-
| Change generated part types | `src/core/kui/skin-parts-declaration.ts`
|
|
127
|
-
| Change component pairing | `src/core/components/discover-components.ts`
|
|
128
|
-
| Change watch behavior | `src/core/dev-server.ts`
|
|
129
|
-
| Change output HTML/import maps | `src/core/plugins/generate-html.ts`
|
|
130
|
-
| Change scaffolding | `src/core/template.ts`, `templates/`
|
|
131
|
-
|
|
|
125
|
+
| Task | File |
|
|
126
|
+
| -------------------------------- | ------------------------------------------------------------------- |
|
|
127
|
+
| Add or validate a config field | `src/core/config.ts` |
|
|
128
|
+
| Resolve an absolute project path | `src/core/project.ts` |
|
|
129
|
+
| Change KUI scanning/theme output | `src/core/plugins/compile-kui.ts` |
|
|
130
|
+
| Change KUI node code generation | `src/core/kui/kui-parser.ts`, `codegen.ts` |
|
|
131
|
+
| Add a built-in component tag | `src/core/kui/registry.ts` |
|
|
132
|
+
| Change generated part types | `src/core/kui/skin-parts-declaration.ts` |
|
|
133
|
+
| Change component pairing | `src/core/components/discover-components.ts` |
|
|
134
|
+
| Change watch behavior | `src/core/dev-server.ts` |
|
|
135
|
+
| Change output HTML/import maps | `src/core/plugins/generate-html.ts` |
|
|
136
|
+
| Change scaffolding | `src/core/template.ts`, `templates/` |
|
|
137
|
+
| Change project style/locale boot | `templates/game/src/StyleManager.ts`, `LocaleManager.ts`, `Main.ts` |
|
|
138
|
+
| Add a diagnostic code | `src/core/diagnostics/codes.ts` |
|
|
132
139
|
|
|
133
140
|
## Verification
|
|
134
141
|
|
|
@@ -169,3 +176,13 @@ Base and state colors use @style:colors:<key>; reject the previous color prefix
|
|
|
169
176
|
without migrating files. Fonts are validated but not loaded; the application owns
|
|
170
177
|
font loading and rendering. Build/preview copies resolve references while authored
|
|
171
178
|
XML retains them. No live runtime palette switching is introduced.
|
|
179
|
+
|
|
180
|
+
## Label presets in 3.3.0
|
|
181
|
+
|
|
182
|
+
skin-module-builder.ts reads the entire stylesheet once per build and passes it
|
|
183
|
+
through parseToIR/parseKUISkin. Resolve resource defaults, then Label presets, then colors before
|
|
184
|
+
native emission; retain XML references and local/state precedence. compileKUI
|
|
185
|
+
accepts an optional styleSheet. style.json changes already trigger whole-Skin
|
|
186
|
+
rebuilds. Invalid presets retain the last successful bundle. The dependency and
|
|
187
|
+
lockfile use published ui-document 0.11.0 without a local override. textStyle is
|
|
188
|
+
Default-only; individual named-state fields can still override preset properties.
|
package/docs/architecture.md
CHANGED
|
@@ -39,17 +39,19 @@ factory variables, property assignments, semantic layout children, and state
|
|
|
39
39
|
property overrides. Document contracts, reusable instances, data bindings, and
|
|
40
40
|
actions remain `UIDocument` concepts.
|
|
41
41
|
|
|
42
|
-
CLI 3.
|
|
42
|
+
CLI 3.3.0 consumes ui-document 0.11.x, retaining Label text-fitting metadata. The
|
|
43
43
|
compiler emits `textFit`, `minFontSize`, base font sizes and state overrides;
|
|
44
44
|
native UI owns measurement and derives drawing sizes after layout validation.
|
|
45
45
|
See [Label compilation](label-text-layout.md). The application supplies UI
|
|
46
46
|
3.1.x and Core 2.1.x or later within their respective majors.
|
|
47
47
|
|
|
48
48
|
Each build also reads optional `resource/config/style.json` through the shared
|
|
49
|
-
parser. Resource nine-slice defaults and named color references
|
|
50
|
-
disposable document before SkinIR conversion;
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
parser. Resource nine-slice defaults, Label presets and named color references
|
|
50
|
+
resolve in that order into a disposable document before SkinIR conversion;
|
|
51
|
+
authored Skin XML is never rewritten. Default-only `@style:labels:<key>` expands
|
|
52
|
+
to native properties, with state fields taking priority over local and preset
|
|
53
|
+
fields. Invalid configurations and unknown preset/color references fail before
|
|
54
|
+
a new Skin bundle is installed.
|
|
53
55
|
|
|
54
56
|
The authored `Skin` root supplies its generated `class` and optional state
|
|
55
57
|
names. State values live on their target nodes as `property.state`. The compiler
|
|
@@ -77,7 +79,7 @@ namespace, paired skin, generated type declaration, and editor catalog, so that
|
|
|
77
79
|
path refreshes all four outputs as one operation. The server preserves the last
|
|
78
80
|
successful output after an invalid edit.
|
|
79
81
|
The resource watcher includes the fixed style.json path, rebuilding skins when
|
|
80
|
-
its palette
|
|
82
|
+
its palette or Label presets change; font loading remains an application responsibility.
|
|
81
83
|
|
|
82
84
|
## Diagnostics
|
|
83
85
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Project styles and languages in the game template
|
|
2
|
+
|
|
3
|
+
CLI 3.2.1 is published with this template update. It adds
|
|
4
|
+
project-owned initialization without changing Core/UI APIs or migrating existing
|
|
5
|
+
projects. The empty template stays minimal.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
- resource/config/style.json declares the primary font role and disabled-text color.
|
|
10
|
+
- resource/assets/fonts contains unmodified Chakra Petch regular (400) and bold (700)
|
|
11
|
+
files, with OFL.txt. Source: [Google Fonts](https://github.com/google/fonts/tree/main/ofl/chakrapetch).
|
|
12
|
+
- resource/config/locale.json enables English and selects en_US by default.
|
|
13
|
+
- resource/lang/lang_en_US.properties contains the scene title, button and descriptions.
|
|
14
|
+
- default.res.json registers locale_json and lang_en_US_properties in preload.
|
|
15
|
+
style.json and fonts are read directly and need no manifest entries.
|
|
16
|
+
|
|
17
|
+
## Startup order
|
|
18
|
+
|
|
19
|
+
1. StyleManager reads and validates the stylesheet through published ui-document.
|
|
20
|
+
2. It loads every configured FontFace; only after all succeed does it register
|
|
21
|
+
faces and publish the default CSS font family and numeric color palette.
|
|
22
|
+
3. Main sets TextField.default_fontFamily, then creates Player and the Preloader.
|
|
23
|
+
4. Main loads the manifest, theme and preload resources.
|
|
24
|
+
5. LocaleManager registers the enabled text files, selects the language and creates
|
|
25
|
+
the translated scene. Startup errors are reported through console.error.
|
|
26
|
+
|
|
27
|
+
This ordering includes loading-screen Labels in the project font. The loading
|
|
28
|
+
screen's startup messages stay in English because translations are not loaded yet.
|
|
29
|
+
Templates do not implement live font/theme/language replacement.
|
|
30
|
+
|
|
31
|
+
## Change fonts and colors
|
|
32
|
+
|
|
33
|
+
Font keys such as primary produce stable aliases such as kurot-primary. Replace
|
|
34
|
+
files and update style.json resource-relative paths, retaining weight 400 and
|
|
35
|
+
unique weights. Default skins inherit the configured font; explicit Label fontFamily
|
|
36
|
+
values still override it. Existing stylesheet files must contain valid font definitions.
|
|
37
|
+
Keep the font's applicable license with any replacement distribution.
|
|
38
|
+
|
|
39
|
+
Label state colors use textColor.disabled="@style:colors:disabled-text". The CLI
|
|
40
|
+
compiles these references into numbers. Dynamic application code reads the same
|
|
41
|
+
palette through StyleManager.getColor('disabled-text'); enabled state behavior and
|
|
42
|
+
restoration of a normal color remain application responsibilities.
|
|
43
|
+
|
|
44
|
+
## Add languages
|
|
45
|
+
|
|
46
|
+
Use the Editor's language window to add a code, create its properties file and
|
|
47
|
+
update locale.json/default.res.json together. Only English is initially enabled.
|
|
48
|
+
Manual additions must use lang_<code>_properties text resources in preload.
|
|
49
|
+
|
|
50
|
+
LocaleManager accepts the project default or URL ?lang=fr / ?lang=fr_FR / ?lang=fr-FR.
|
|
51
|
+
A full code match wins, then a matching base language, then the configured default.
|
|
52
|
+
The default may be empty. Absent configuration or an empty language list clears registrations;
|
|
53
|
+
enabled languages with unavailable text resources or an invalid default fail before
|
|
54
|
+
publishing the new set. The last successful set is retained on initialization failure.
|
|
55
|
+
|
|
56
|
+
getString(key, ...args) reads the current translation, then English, then the key.
|
|
57
|
+
An explicitly empty translation remains empty. The simple properties format uses
|
|
58
|
+
one key=value per line, #/! comments, common escapes including newline/Unicode,
|
|
59
|
+
and {0}, {1} placeholders. Continuation lines and Java properties' colon-only
|
|
60
|
+
separators are not supported. UI translation is explicit; it is not an engine binding.
|