@datamoc/mw_games 0.8.2 → 0.9.0-alpha
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 +15 -0
- package/README.md +7 -4
- package/dist/mw_games.global.js +114 -98
- package/dist/mwl/compiler.d.ts +7 -7
- package/dist/mwl/compiler.js +7 -7
- package/dist/mwl/content.d.ts +1 -1
- package/dist/mwl/content.js +1 -1
- package/dist/mwl/grammar.d.ts +18 -8
- package/dist/mwl/grammar.d.ts.map +1 -1
- package/dist/mwl/grammar.js +227 -92
- package/dist/mwl/grammar.js.map +1 -1
- package/dist/mwl/readers.d.ts +2 -2
- package/dist/mwl/readers.js +2 -2
- package/dist/mwl/report.d.ts +2 -2
- package/dist/mwl/report.js +2 -2
- package/dist/mwl/runtime.d.ts +1 -1
- package/dist/mwl/runtime.js +1 -1
- package/dist/mwl/schema.d.ts +1 -1
- package/dist/mwl/schema.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ the public API may still change between minor versions.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.0-alpha] - 2026-09-13
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- MWL authoring syntax is now JSON5 instead of the WML-inspired tag/`key=value`
|
|
15
|
+
form: every `.mwl` file is a top-level array of `{ tag, ...attributes, children }`
|
|
16
|
+
nodes, values are real JSON5 numbers, booleans and strings (stringified back to
|
|
17
|
+
the `Record<string, string>` the schema, compiler and runtime already see), and
|
|
18
|
+
translatable strings are marked `_("...")` via a preprocessor rewrite. The
|
|
19
|
+
`#define`/`#include`/`#ifdef` textual pass is unchanged. The `"""..."""` block
|
|
20
|
+
form (item 317) is superseded by JSON5 `\n` escapes and backslash line
|
|
21
|
+
continuations. Clean cutover: all fixtures, examples, tests and doc examples
|
|
22
|
+
are migrated, the old tag parser is deleted, and `json5` (pure JS, no native
|
|
23
|
+
build) is a runtime dependency.
|
|
24
|
+
|
|
10
25
|
## [0.8.2] - 2026-09-13
|
|
11
26
|
|
|
12
27
|
### Added
|
package/README.md
CHANGED
|
@@ -402,9 +402,12 @@ The optional 3D group is now implemented without changing the existing 2D entry
|
|
|
402
402
|
|
|
403
403
|
## MWL
|
|
404
404
|
|
|
405
|
-
MWL is the framework's declarative, WML-inspired authoring layer.
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
MWL is the framework's declarative, WML-inspired authoring layer. Content files
|
|
406
|
+
are JSON5: a top-level array of `{ tag, ...attributes, children }` nodes, with
|
|
407
|
+
real numbers and booleans for scalar values and `_("...")` marking translatable
|
|
408
|
+
strings. It describes game data and commands while `mwg` remains responsible for
|
|
409
|
+
execution, rendering, input, audio, and saves. MWL is a new language, not a WML
|
|
410
|
+
compatibility layer.
|
|
408
411
|
The Wesnoth port can nevertheless use its native `.cfg` files as build inputs:
|
|
409
412
|
the port-owned WML front end parses them, the adapter converts the supported
|
|
410
413
|
nodes to MWL, and the normal MWL compiler emits the runtime module.
|
|
@@ -461,7 +464,7 @@ reported as warnings. The output directory is safe to regenerate: its extracted
|
|
|
461
464
|
CSS `url(data:...)` values and HTML `srcset` candidates are handled too, including
|
|
462
465
|
their density descriptors.
|
|
463
466
|
|
|
464
|
-
Translation messages are the values marked `_
|
|
467
|
+
Translation messages are the values marked `_("...")` in the source; the
|
|
465
468
|
extracted catalog matches `@datamoc/mw_games/i18n`. Hooks are referenced as
|
|
466
469
|
`type:name`, declared in a manifest, and bundled with esbuild, which a game
|
|
467
470
|
project installs itself (`npm install --save-dev esbuild`). The framework does
|