@codexo/exojs-ldtk 0.15.3 → 0.16.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.
Files changed (67) hide show
  1. package/README.md +38 -20
  2. package/dist/esm/LdtkData.d.ts +59 -14
  3. package/dist/esm/LdtkData.d.ts.map +1 -0
  4. package/dist/esm/LdtkData.js +8 -16
  5. package/dist/esm/LdtkData.js.map +1 -1
  6. package/dist/esm/LdtkMap.d.ts +25 -6
  7. package/dist/esm/LdtkMap.d.ts.map +1 -0
  8. package/dist/esm/LdtkMap.js +88 -63
  9. package/dist/esm/LdtkMap.js.map +1 -1
  10. package/dist/esm/LdtkProject.d.ts +107 -0
  11. package/dist/esm/LdtkProject.d.ts.map +1 -0
  12. package/dist/esm/LdtkProject.js +136 -0
  13. package/dist/esm/LdtkProject.js.map +1 -0
  14. package/dist/esm/index.d.ts +1 -0
  15. package/dist/esm/index.d.ts.map +1 -0
  16. package/dist/esm/index.js +11 -7
  17. package/dist/esm/ldtkExtension.d.ts +9 -5
  18. package/dist/esm/ldtkExtension.d.ts.map +1 -0
  19. package/dist/esm/ldtkExtension.js +25 -22
  20. package/dist/esm/ldtkExtension.js.map +1 -1
  21. package/dist/esm/ldtkLevelEntries.d.ts +4 -3
  22. package/dist/esm/ldtkLevelEntries.d.ts.map +1 -0
  23. package/dist/esm/ldtkLevelEntries.js +30 -26
  24. package/dist/esm/ldtkLevelEntries.js.map +1 -1
  25. package/dist/esm/ldtkParallax.d.ts +22 -0
  26. package/dist/esm/ldtkParallax.d.ts.map +1 -0
  27. package/dist/esm/ldtkParallax.js +22 -0
  28. package/dist/esm/ldtkParallax.js.map +1 -0
  29. package/dist/esm/ldtkToMapWorld.d.ts +20 -0
  30. package/dist/esm/ldtkToMapWorld.d.ts.map +1 -0
  31. package/dist/esm/ldtkToMapWorld.js +76 -0
  32. package/dist/esm/ldtkToMapWorld.js.map +1 -0
  33. package/dist/esm/ldtkToTileMap.d.ts +48 -10
  34. package/dist/esm/ldtkToTileMap.d.ts.map +1 -0
  35. package/dist/esm/ldtkToTileMap.js +410 -387
  36. package/dist/esm/ldtkToTileMap.js.map +1 -1
  37. package/dist/esm/ldtkTypes.d.ts +47 -0
  38. package/dist/esm/ldtkTypes.d.ts.map +1 -0
  39. package/dist/esm/ldtkTypes.js +57 -0
  40. package/dist/esm/ldtkTypes.js.map +1 -0
  41. package/dist/esm/loadLdtkMap.d.ts +30 -5
  42. package/dist/esm/loadLdtkMap.d.ts.map +1 -0
  43. package/dist/esm/loadLdtkMap.js +139 -133
  44. package/dist/esm/loadLdtkMap.js.map +1 -1
  45. package/dist/esm/loadLdtkProject.d.ts +17 -0
  46. package/dist/esm/loadLdtkProject.d.ts.map +1 -0
  47. package/dist/esm/loadLdtkProject.js +31 -0
  48. package/dist/esm/loadLdtkProject.js.map +1 -0
  49. package/dist/esm/public.d.ts +24 -9
  50. package/dist/esm/public.d.ts.map +1 -0
  51. package/dist/esm/public.js +11 -0
  52. package/dist/esm/url.d.ts +16 -0
  53. package/dist/esm/url.d.ts.map +1 -0
  54. package/dist/esm/url.js +31 -0
  55. package/dist/esm/url.js.map +1 -0
  56. package/dist/esm/validate.d.ts +27 -0
  57. package/dist/esm/validate.d.ts.map +1 -0
  58. package/dist/esm/validate.js +327 -0
  59. package/dist/esm/validate.js.map +1 -0
  60. package/package.json +10 -18
  61. package/dist/esm/index.js.map +0 -1
  62. package/dist/esm/ldtkBinding.d.ts +0 -22
  63. package/dist/esm/ldtkBinding.js +0 -31
  64. package/dist/esm/ldtkBinding.js.map +0 -1
  65. package/dist/esm/register.d.ts +0 -1
  66. package/dist/esm/register.js +0 -17
  67. package/dist/esm/register.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexo/exojs-ldtk",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "description": "LDtk level format asset extension for ExoJS.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,9 +8,7 @@
8
8
  "directory": "packages/exojs-ldtk"
9
9
  },
10
10
  "type": "module",
11
- "sideEffects": [
12
- "./dist/esm/register.js"
13
- ],
11
+ "sideEffects": false,
14
12
  "main": "./dist/esm/index.js",
15
13
  "module": "./dist/esm/index.js",
16
14
  "types": "./dist/esm/index.d.ts",
@@ -20,11 +18,6 @@
20
18
  "import": "./dist/esm/index.js",
21
19
  "default": "./dist/esm/index.js"
22
20
  },
23
- "./register": {
24
- "types": "./dist/esm/register.d.ts",
25
- "import": "./dist/esm/register.js",
26
- "default": "./dist/esm/register.js"
27
- },
28
21
  "./package.json": "./package.json"
29
22
  },
30
23
  "files": [
@@ -33,23 +26,22 @@
33
26
  "LICENSE"
34
27
  ],
35
28
  "peerDependencies": {
36
- "@codexo/exojs": "0.15.x"
37
- },
38
- "dependencies": {
39
- "@codexo/exojs-tilemap": "0.15.3"
29
+ "@codexo/exojs": "0.16.x",
30
+ "@codexo/exojs-tilemap": "0.16.x"
40
31
  },
41
32
  "devDependencies": {
42
- "@codexo/exojs-config": "0.0.0",
43
- "@codexo/exojs": "0.15.3"
33
+ "@codexo/exojs": "0.16.0",
34
+ "@codexo/exojs-tilemap": "0.16.0",
35
+ "@codexo/exojs-config": "0.0.0"
44
36
  },
45
37
  "license": "MIT",
46
38
  "publishConfig": {
47
39
  "access": "public"
48
40
  },
49
41
  "scripts": {
50
- "build": "tsx ../../node_modules/rollup/dist/bin/rollup -c --environment EXOJS_ENV:production",
51
- "build:dev": "tsx ../../node_modules/rollup/dist/bin/rollup -c --environment EXOJS_ENV:development",
52
- "typecheck": "tsc --noEmit",
42
+ "build": "tsx ../../scripts/build-extension.ts",
43
+ "build:dev": "tsx ../../scripts/build-extension.ts --dev",
44
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
53
45
  "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
54
46
  "test": "vitest run --root ../.. --project=exojs-ldtk"
55
47
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,22 +0,0 @@
1
- import { LdtkMap } from './LdtkMap';
2
- /**
3
- * Declarative asset binding for {@link LdtkMap}.
4
- *
5
- * Claims the `ldtk` file extension so that:
6
- * - `loader.load(LdtkMap, 'world.ldtk')` — returns the parsed
7
- * {@link LdtkMap} with all levels pre-converted to runtime
8
- * {@link import('@codexo/exojs-tilemap').TileMap}s.
9
- * - `loader.load('world.ldtk')` — auto-routed to `LdtkMap` via
10
- * the `ExtensionTypeMap` augmentation in `public.ts`.
11
- *
12
- * Each loaded level's TileMap is accessible via {@link LdtkMap.levels} or
13
- * {@link LdtkMap.getLevelByName}.
14
- */
15
- export declare const ldtkMapBinding: {
16
- type: typeof LdtkMap;
17
- typeNames: string[];
18
- extensions: string[];
19
- create(): {
20
- load(req: import("@codexo/exojs").AssetLoadRequest<undefined>, ctx: import("@codexo/exojs").AssetLoaderContext): Promise<LdtkMap>;
21
- };
22
- };
@@ -1,31 +0,0 @@
1
- import { LdtkMap } from './LdtkMap.js';
2
- import { loadLdtkMap } from './loadLdtkMap.js';
3
-
4
- /**
5
- * Declarative asset binding for {@link LdtkMap}.
6
- *
7
- * Claims the `ldtk` file extension so that:
8
- * - `loader.load(LdtkMap, 'world.ldtk')` — returns the parsed
9
- * {@link LdtkMap} with all levels pre-converted to runtime
10
- * {@link import('@codexo/exojs-tilemap').TileMap}s.
11
- * - `loader.load('world.ldtk')` — auto-routed to `LdtkMap` via
12
- * the `ExtensionTypeMap` augmentation in `public.ts`.
13
- *
14
- * Each loaded level's TileMap is accessible via {@link LdtkMap.levels} or
15
- * {@link LdtkMap.getLevelByName}.
16
- */
17
- const ldtkMapBinding = {
18
- type: LdtkMap,
19
- typeNames: ['ldtkMap'],
20
- extensions: ['ldtk'],
21
- create() {
22
- return {
23
- async load(req, ctx) {
24
- return loadLdtkMap(req.source, ctx);
25
- },
26
- };
27
- },
28
- };
29
-
30
- export { ldtkMapBinding };
31
- //# sourceMappingURL=ldtkBinding.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ldtkBinding.js","sources":["../../../src/ldtkBinding.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;AAYG;AACI,MAAM,cAAc,GAAG;AAC5B,IAAA,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,CAAC,SAAS,CAAC;IACtB,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,MAAM,GAAA;QACJ,OAAO;AACL,YAAA,MAAM,IAAI,CAAC,GAAG,EAAE,GAAG,EAAA;gBACjB,OAAO,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;YACrC,CAAC;SAC8B;IACnC,CAAC;;;;;"}
@@ -1 +0,0 @@
1
- export * from './public';
@@ -1,17 +0,0 @@
1
- import { ExtensionRegistry } from '@codexo/exojs/extensions';
2
- import { ldtkExtension } from './ldtkExtension.js';
3
- export { ldtkMapBinding } from './ldtkBinding.js';
4
- export { LdtkMap } from './LdtkMap.js';
5
- export { getLdtkIntGridValueAt, ldtkIntGridCsvProperty, ldtkIntGridValuesProperty, ldtkToTileMap } from './ldtkToTileMap.js';
6
- export { ldtkFlipNone, ldtkFlipX, ldtkFlipXy, ldtkFlipY } from './LdtkData.js';
7
- export { ObjectKind, ObjectLayer, TILE_TRANSFORM_IDENTITY, TileLayer, TileMap, TileMapView, TilePropertyKind, TileSet, tilemapExtension } from '@codexo/exojs-tilemap';
8
-
9
- // @codexo/exojs-ldtk/register — explicit registration entry.
10
- // Importing this entry registers the default ldtkExtension descriptor
11
- // in the global ExtensionRegistry. Subsequently constructed Applications
12
- // that use global defaults will receive the LDtk extension.
13
- // This is the only side-effectful entry in this package.
14
- ExtensionRegistry.register(ldtkExtension);
15
-
16
- export { ldtkExtension };
17
- //# sourceMappingURL=register.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.js","sources":["../../../src/register.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAMA,iBAAiB,CAAC,QAAQ,CAAC,aAAa,CAAC;;;;"}