@kurot/cli 3.6.0 → 3.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurot/cli",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "Kurot CLI - build tool for Kurot Editor KUI XML workflows",
5
5
  "author": "Kelvin <kyia.x52@gmail.com>",
6
6
  "license": "MIT",
@@ -30,7 +30,8 @@
30
30
  "dependencies": {
31
31
  "@kurot/ui-document": "^0.13.0",
32
32
  "commander": "^13.0.0",
33
- "esbuild": "^0.25.0"
33
+ "esbuild": "^0.25.0",
34
+ "parse5": "^7.3.0"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@types/node": "^22.0.0",
@@ -0,0 +1,25 @@
1
+ # Game project agent entry
2
+
3
+ Read [README.md](README.md) for commands, expected startup and project paths.
4
+ For a complete game flow, follow its game-authoring/Star Catcher route when available.
5
+ Use package.json, the lock and `pnpm list --depth 0` for the actual SDK baseline.
6
+
7
+ - Start gameplay changes in `src/Main.ts` or the modules it imports. This is a
8
+ Core-only consumer project; engine internals are outside its normal scope.
9
+ - Read installed Core's README first. For the API being changed, consult its
10
+ public `dist/index.d.ts`/re-exported types and the relevant installed guide.
11
+ When available, `docs/api/topics.md` routes to individual symbol/member pages.
12
+ The README links resources, audio and CLI usage; load other docs on demand.
13
+ When an older install lacks a guide, use its README/types before versioned
14
+ source. Engine-repository source paths may be absent from node_modules.
15
+ - Use TypeScript, ESM and the project's strict settings. Use named exports,
16
+ explicit exported-function return types and `undefined` for missing values.
17
+ Use the installed public API and preserve the project's dependency baseline.
18
+ - Keep one Player. Display/input coordinates are logical units. Retain listener
19
+ and tick callback identities so application cleanup can unregister them.
20
+ `app.stop()` stops this Player's rendering; manage gameplay activity separately.
21
+ - Edit source/config/resource inputs; output directories and `.kurot/` are
22
+ generated. Read the authored HTML path from kurot.config.ts.
23
+ - Before finishing, run `pnpm build` and check the browser console and intended
24
+ behavior. Run `pnpm release` when changing release behavior. Report executed
25
+ checks and any unverified behavior; build success alone is not gameplay proof.
@@ -0,0 +1,60 @@
1
+ # Kurot empty project
2
+
3
+ A minimal Core-only application. The initial canvas is blank; the browser
4
+ console prints `Kurot game started`. Add your gameplay in `src/Main.ts`.
5
+
6
+ ## Run and build
7
+
8
+ Use Node.js 20+ and pnpm from this project directory:
9
+
10
+ ```sh
11
+ pnpm install
12
+ pnpm dev
13
+ ```
14
+
15
+ Open the URL printed by the server (default `http://localhost:3000`). Refresh
16
+ the browser manually after a successful rebuild.
17
+
18
+ ```sh
19
+ pnpm build
20
+ pnpm release
21
+ ```
22
+
23
+ Development output is `bin-debug/`; release output is
24
+ `bin-release/web/<timestamp>/`. Serve the generated directory over HTTP for
25
+ browser checks. `pnpm clean` removes both output trees.
26
+
27
+ The CLI transpiles with esbuild; a successful build does not establish complete
28
+ TypeScript type correctness or gameplay behavior. After changes, check the
29
+ browser console, resource requests and intended interactions.
30
+
31
+ ## Project map
32
+
33
+ - `src/Main.ts`: creates the single Player and root Sprite; add game objects
34
+ and input/update logic here or in application modules it imports.
35
+ - `kurot.config.ts`: build entry, stage settings and output paths. Keep explicit
36
+ createPlayer options in Main consistent with the intended stage settings.
37
+ - `template/web/index.html`: authored HTML and canvas.
38
+ - `bin-debug/`, `bin-release/` and `.kurot/`: generated files; edit their inputs.
39
+
40
+ ## Read only what the task needs
41
+
42
+ For gameplay, read Core's `docs/game-authoring.md` when the installed package
43
+ includes it. In an engine checkout, that guide links `examples/star-catcher`,
44
+ a complete game with `pnpm check`. The guide ships since Core 2.5.5; Star Catcher
45
+ is repository content. Older installations can use their README/types instead.
46
+
47
+ After installation, start with [Core usage](node_modules/@kurot/core/README.md).
48
+ Use [resources](node_modules/@kurot/core/docs/resource.md),
49
+ [audio](node_modules/@kurot/core/docs/audio-playback.md) or
50
+ [CLI commands](node_modules/@kurot/cli/README.md) when relevant. These links are
51
+ project-relative and become available after installation.
52
+
53
+ Read `package.json`, `pnpm-lock.yaml` and `pnpm list --depth 0` for the declared,
54
+ locked and installed versions. Public signatures are in each installed package's
55
+ `dist/index.d.ts` and re-exported declarations. For an older package lacking a
56
+ linked guide, use that installed version's README/types, then its exact version
57
+ source if needed. Repository `src/` paths are not guaranteed inside npm packages.
58
+
59
+ The project starts with Core only. Add further SDKs explicitly when gameplay
60
+ requires them; keep dependency adoption separate from ordinary feature work.
@@ -0,0 +1,30 @@
1
+ # Game project agent entry
2
+
3
+ Read [README.md](README.md) for commands, project paths and installed-doc links.
4
+ For a complete game flow, follow its game-authoring/Star Catcher route when available.
5
+ Check package.json, the lock and `pnpm list --depth 0` for the actual SDK baseline.
6
+
7
+ - Start gameplay in `src/Main.ts` or its application modules. Consult startup
8
+ services only when changing fonts, resources, translations or lifecycle.
9
+ Preserve the startup order documented in README.
10
+ - For UI, follow README's installed UI authoring/ScoreHUD route (UI >= 3.6.2). Pair discovered component
11
+ TS and Skin XML at matching relative paths; keep helpers outside the scanned
12
+ components directory. Edit appearance in XML and game decisions in controllers.
13
+ - Read the relevant installed Core/Game/UI/CLI README and public declarations
14
+ before adding APIs. When installed, `docs/api/topics.md` routes to individual
15
+ symbol/member pages; read only those needed. Published Game 2.0.0 has no
16
+ docs/; use its README/types, then versioned source if needed. Source paths in
17
+ engine context maps may be absent from installed packages.
18
+ - Use TypeScript, ESM and strict settings, named exports, explicit exported
19
+ function return types and `undefined` for missing values. Use public APIs
20
+ from the installed versions; keep dependency adoption explicit.
21
+ - Keep one Player and use logical display/input coordinates. Manage cleanup
22
+ for gameplay ticks, listeners, timers, tweens and sound channels on restart
23
+ and exit. `app.stop()` stops rendering; it does not pause all gameplay work.
24
+ - Edit source, KUI XML, manifests and project configuration. Build outputs,
25
+ generated theme JSON and `.kurot/` declarations come from those inputs.
26
+ - Finish with `pnpm build`, `pnpm exec tsc --noEmit --skipLibCheck false`
27
+ (CLI >= 3.6.1) and browser checks for startup, resources and changed
28
+ interactions. Check restart/cleanup when affected and `pnpm release` for
29
+ release changes. Report checks actually run and remaining verification limits;
30
+ esbuild success alone is not type checking or proof of playability.
@@ -0,0 +1,90 @@
1
+ # Kurot game project
2
+
3
+ This starter demonstrates resource loading, styled KUI controls, translations
4
+ and Tween animation. Extend `src/Main.ts` with your game's rules and interaction.
5
+
6
+ ## Run and build
7
+
8
+ Use Node.js 20+ and pnpm from this project directory:
9
+
10
+ ```sh
11
+ pnpm install
12
+ pnpm dev
13
+ ```
14
+
15
+ Open the URL printed by the server (default `http://localhost:3000`). Expect the
16
+ loading screen followed by the translated starter interface and animated text.
17
+ Refresh the browser manually after a successful rebuild.
18
+
19
+ ```sh
20
+ pnpm build
21
+ pnpm exec tsc --noEmit --skipLibCheck false
22
+ pnpm release
23
+ ```
24
+
25
+ Development output is `bin-debug/`; release output is
26
+ `bin-release/web/<timestamp>/`. Serve the generated directory over HTTP for
27
+ browser checks. `pnpm clean` removes both output trees.
28
+
29
+ The full declaration check requires CLI >= 3.6.1 for generated host skinParts;
30
+ rebuild after adopting it. Use the project's installed TypeScript compiler.
31
+ The CLI transpiles with esbuild; a successful build does not establish complete
32
+ TypeScript type correctness or gameplay behavior. Check console errors, resource
33
+ requests and the intended interactions in the browser.
34
+
35
+ ## Project map
36
+
37
+ - `src/Main.ts`: application startup and gameplay/UI composition. Preserve the
38
+ existing font → Player → resources/theme → translations → scene ordering.
39
+ - `src/StyleManager.ts`, `LocaleManager.ts`, `AssetAdapter.ts`, `Preloader.ts`
40
+ and `LifecycleHandler.ts`: startup services; consult them when changing their
41
+ responsibility rather than reading all of them for every gameplay task.
42
+ - `resource/default.res.json`: resource manifest; `resource/config/`: fonts,
43
+ colors and language settings; `resource/lang/`: translation text.
44
+ - `resource/ui/skins/`: editable default KUI skins. For reusable controls, pair
45
+ `src/components/<Name>.ts` with
46
+ `resource/ui/components/<Name>Skin.kui.xml`; export the matching class name.
47
+ - `kurot.config.ts`: build/stage/component settings; `template/web/index.html`:
48
+ authored HTML. Keep explicit createPlayer options consistent with stage intent.
49
+ - `bin-debug/`, `bin-release/`, `.kurot/` and generated theme JSON: build outputs.
50
+ Edit authored inputs; the CLI generates the Skin module and part declarations.
51
+
52
+ ## Read only what the task needs
53
+
54
+ For UI creation, read [standard UI authoring](node_modules/@kurot/ui/docs/ui-authoring.md)
55
+ and the [complete ScoreHUD pair](node_modules/@kurot/ui/docs/recipes/score-hud.md).
56
+ They specify the project tree above, typed component/Skin pairing and caller-owned
57
+ cleanup, and ship since UI 3.6.2. If an older installation lacks them, use that
58
+ version's README/types or the engine checkout's `packages/ui/docs/` guides when
59
+ available; verify APIs against the installed version.
60
+ Keep any game-specific variations in this project's README/AGENTS rather than
61
+ re-reading engine source for ordinary UI tasks.
62
+
63
+ For gameplay, use Core's `docs/game-authoring.md` when available. In an engine
64
+ checkout, it links `examples/star-catcher`, a complete game with `pnpm check`.
65
+ The game guide ships since Core 2.5.5; Star Catcher is repository content.
66
+ Older installed packages retain the README/type-declaration fallback.
67
+
68
+ After installation, choose the relevant guide:
69
+
70
+ | Task | Installed documentation |
71
+ | --- | --- |
72
+ | Startup, display and input APIs | [Core README](node_modules/@kurot/core/README.md) |
73
+ | Resource loading | [Resource guide](node_modules/@kurot/core/docs/resource.md) |
74
+ | Tween/MovieClip | [Game README](node_modules/@kurot/game/README.md) |
75
+ | UI workflow, directories and cleanup | [UI authoring](node_modules/@kurot/ui/docs/ui-authoring.md) (UI >= 3.6.2) |
76
+ | Complete TS/Skin pair | [ScoreHUD](node_modules/@kurot/ui/docs/recipes/score-hud.md) (UI >= 3.6.2) |
77
+ | HUD, controls and skin lifecycle | [UI README](node_modules/@kurot/ui/README.md) |
78
+ | KUI/build commands | [CLI README](node_modules/@kurot/cli/README.md) |
79
+ | Fonts, colors and language startup | [Template guide](node_modules/@kurot/cli/docs/game-template.md) |
80
+
81
+ These links are project-relative and become available after installation.
82
+ Read package.json, pnpm-lock.yaml and `pnpm list --depth 0` for declared, locked
83
+ and installed versions. Use public `dist/index.d.ts` and re-exported declarations
84
+ to confirm APIs; older installations can lack newer guides. Published Game 2.0.0
85
+ has README/types but omits docs/. Use those before consulting versioned source.
86
+
87
+ The 2× default atlas needs Core >= 2.5.0 within 2.x; also satisfy the installed
88
+ UI's Core peer. ui-document supports this starter's stylesheet parsing.
89
+ CLI-compiled skins run through UI; add ui-runtime only for its materialization
90
+ features. Existing project dependencies remain project-owned.
@@ -75,7 +75,7 @@ class Main extends UILayer {
75
75
 
76
76
  private async _loadTheme(): Promise<void> {
77
77
  // Load the theme and its default UI skin mappings.
78
- const theme = new Theme('resource/default.thm.json');
78
+ const theme = new Theme(new URL('resource/default.thm.json', document.baseURI).href);
79
79
  await new Promise<void>(resolve => theme.addEventListener(Event.COMPLETE, () => resolve()));
80
80
  }
81
81