@al8b/runtime 0.1.12 → 0.1.14

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 (56) hide show
  1. package/dist/assets/index.d.mts +0 -1
  2. package/dist/assets/index.d.ts +0 -1
  3. package/dist/assets/loader.d.mts +0 -1
  4. package/dist/assets/loader.d.ts +0 -1
  5. package/dist/browser/index.js +780 -2681
  6. package/dist/browser/index.js.map +1 -1
  7. package/dist/browser/index.min.js +27 -39
  8. package/dist/core/api-factory.d.mts +1 -5
  9. package/dist/core/api-factory.d.ts +1 -5
  10. package/dist/core/api-factory.js +17 -38
  11. package/dist/core/api-factory.js.map +1 -1
  12. package/dist/core/api-factory.mjs +18 -38
  13. package/dist/core/api-factory.mjs.map +1 -1
  14. package/dist/core/controller.d.mts +0 -5
  15. package/dist/core/controller.d.ts +0 -5
  16. package/dist/core/controller.js +23 -98
  17. package/dist/core/controller.js.map +1 -1
  18. package/dist/core/controller.mjs +24 -99
  19. package/dist/core/controller.mjs.map +1 -1
  20. package/dist/core/debug-logger.d.mts +0 -1
  21. package/dist/core/debug-logger.d.ts +0 -1
  22. package/dist/core/error-handler.d.mts +1 -2
  23. package/dist/core/error-handler.d.ts +1 -2
  24. package/dist/core/error-handler.js +2 -17
  25. package/dist/core/error-handler.js.map +1 -1
  26. package/dist/core/error-handler.mjs +2 -17
  27. package/dist/core/error-handler.mjs.map +1 -1
  28. package/dist/core/index.d.mts +0 -2
  29. package/dist/core/index.d.ts +0 -2
  30. package/dist/core/index.js +23 -98
  31. package/dist/core/index.js.map +1 -1
  32. package/dist/core/index.mjs +24 -99
  33. package/dist/core/index.mjs.map +1 -1
  34. package/dist/hot-reload/index.d.mts +0 -1
  35. package/dist/hot-reload/index.d.ts +0 -1
  36. package/dist/hot-reload/index.js.map +1 -1
  37. package/dist/hot-reload/index.mjs.map +1 -1
  38. package/dist/hot-reload/updater.d.mts +0 -1
  39. package/dist/hot-reload/updater.d.ts +0 -1
  40. package/dist/hot-reload/updater.js.map +1 -1
  41. package/dist/hot-reload/updater.mjs.map +1 -1
  42. package/dist/index.d.mts +0 -2
  43. package/dist/index.d.ts +0 -2
  44. package/dist/index.js +23 -98
  45. package/dist/index.js.map +1 -1
  46. package/dist/index.mjs +24 -99
  47. package/dist/index.mjs.map +1 -1
  48. package/dist/types/bridge.d.mts +0 -4
  49. package/dist/types/bridge.d.ts +0 -4
  50. package/dist/types/bridge.js.map +1 -1
  51. package/dist/types/index.d.mts +0 -1
  52. package/dist/types/index.d.ts +0 -1
  53. package/dist/types/runtime.d.mts +13 -2
  54. package/dist/types/runtime.d.ts +13 -2
  55. package/dist/types/runtime.js.map +1 -1
  56. package/package.json +46 -50
@@ -2,5 +2,4 @@ export { AssetCollections, ResourceFile, Resources } from './assets.mjs';
2
2
  export { InputDebugSetting, RuntimeDebugOptions, RuntimeListener, RuntimeOptions } from './runtime.mjs';
3
3
  export { HostEvent, HostEventSource, RuntimeBridge, RuntimeResetOptions, RuntimeSessionSnapshot, RuntimeSnapshot, RuntimeSnapshotMeta } from './bridge.mjs';
4
4
  export { ErrorInfo, GlobalAPI, MetaFunctions, SystemAPI, VMContext, VMWarnings, WarningInfo } from '@al8b/vm';
5
- import '@al8b/framework-shared';
6
5
  import '@al8b/time';
@@ -2,5 +2,4 @@ export { AssetCollections, ResourceFile, Resources } from './assets.js';
2
2
  export { InputDebugSetting, RuntimeDebugOptions, RuntimeListener, RuntimeOptions } from './runtime.js';
3
3
  export { HostEvent, HostEventSource, RuntimeBridge, RuntimeResetOptions, RuntimeSessionSnapshot, RuntimeSnapshot, RuntimeSnapshotMeta } from './bridge.js';
4
4
  export { ErrorInfo, GlobalAPI, MetaFunctions, SystemAPI, VMContext, VMWarnings, WarningInfo } from '@al8b/vm';
5
- import '@al8b/framework-shared';
6
5
  import '@al8b/time';
@@ -1,5 +1,4 @@
1
1
  import { Resources } from './assets.mjs';
2
- import { CompiledModuleArtifact, SerializedRoutineData } from '@al8b/framework-shared';
3
2
  import { ErrorInfo } from '@al8b/vm';
4
3
  export { ErrorInfo } from '@al8b/vm';
5
4
  import { RuntimeBridge, RuntimeSessionSnapshot } from './bridge.mjs';
@@ -9,6 +8,18 @@ import '@al8b/time';
9
8
  * Runtime type definitions
10
9
  */
11
10
 
11
+ /**
12
+ * Compiled routine artifact from the LootiScript compiler
13
+ */
14
+ interface CompiledModuleArtifact {
15
+ format: "l8b-compiled-routine";
16
+ routine: SerializedRoutineData;
17
+ }
18
+ /**
19
+ * Serialized routine data
20
+ */
21
+ type SerializedRoutineData = unknown;
22
+
12
23
  /**
13
24
  * Runtime configuration options
14
25
  */
@@ -68,4 +79,4 @@ interface RuntimeListener {
68
79
  codePaused?: () => void;
69
80
  }
70
81
 
71
- export { type InputDebugSetting, Resources, type RuntimeDebugOptions, type RuntimeListener, type RuntimeOptions };
82
+ export { type CompiledModuleArtifact, type InputDebugSetting, Resources, type RuntimeDebugOptions, type RuntimeListener, type RuntimeOptions, type SerializedRoutineData };
@@ -1,5 +1,4 @@
1
1
  import { Resources } from './assets.js';
2
- import { CompiledModuleArtifact, SerializedRoutineData } from '@al8b/framework-shared';
3
2
  import { ErrorInfo } from '@al8b/vm';
4
3
  export { ErrorInfo } from '@al8b/vm';
5
4
  import { RuntimeBridge, RuntimeSessionSnapshot } from './bridge.js';
@@ -9,6 +8,18 @@ import '@al8b/time';
9
8
  * Runtime type definitions
10
9
  */
11
10
 
11
+ /**
12
+ * Compiled routine artifact from the LootiScript compiler
13
+ */
14
+ interface CompiledModuleArtifact {
15
+ format: "l8b-compiled-routine";
16
+ routine: SerializedRoutineData;
17
+ }
18
+ /**
19
+ * Serialized routine data
20
+ */
21
+ type SerializedRoutineData = unknown;
22
+
12
23
  /**
13
24
  * Runtime configuration options
14
25
  */
@@ -68,4 +79,4 @@ interface RuntimeListener {
68
79
  codePaused?: () => void;
69
80
  }
70
81
 
71
- export { type InputDebugSetting, Resources, type RuntimeDebugOptions, type RuntimeListener, type RuntimeOptions };
82
+ export { type CompiledModuleArtifact, type InputDebugSetting, Resources, type RuntimeDebugOptions, type RuntimeListener, type RuntimeOptions, type SerializedRoutineData };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/runtime.ts"],"sourcesContent":["/**\n * Runtime type definitions\n */\n\nimport type { CompiledModuleArtifact, SerializedRoutineData } from \"@al8b/framework-shared\";\nimport type { ErrorInfo } from \"@al8b/vm\";\nimport type { Resources } from \"./assets\";\nimport type { RuntimeBridge, RuntimeSessionSnapshot } from \"./bridge\";\n\nexport type { ErrorInfo, Resources };\n\n/**\n * Runtime configuration options\n */\nexport type InputDebugSetting =\n\t| boolean\n\t| {\n\t\t\tkeyboard?: boolean;\n\t\t\tmouse?: boolean;\n\t\t\ttouch?: boolean;\n\t\t\tgamepad?: boolean;\n\t };\n\nexport interface RuntimeDebugOptions {\n\t/** Input debug logging configuration */\n\tinput?: InputDebugSetting;\n\t/** Log screen/canvas state changes */\n\tscreen?: boolean;\n\t/** Detailed lifecycle logs for runtime startup and control */\n\tlifecycle?: boolean;\n}\n\nexport interface RuntimeOptions {\n\t/** Base URL for loading assets */\n\turl?: string;\n\t/** Source code files (for development) */\n\tsources?: Record<string, string>;\n\t/** Pre-compiled routines (for production) */\n\tcompiledRoutines?: Record<string, CompiledModuleArtifact | SerializedRoutineData>;\n\t/** Resources metadata */\n\tresources?: Resources;\n\t/** Environment variables (key-value pairs) */\n\tenv?: Record<string, string>;\n\t/** Listener for events (logging, errors) */\n\tlistener?: RuntimeListener;\n\t/** Host bridge for platform and backend integrations */\n\tbridge?: RuntimeBridge;\n\t/** Initial session context supplied by the host */\n\tinitialSession?: RuntimeSessionSnapshot | null;\n\t/** Canvas element to use */\n\tcanvas?: HTMLCanvasElement;\n\t/** Screen width */\n\twidth?: number;\n\t/** Screen height */\n\theight?: number;\n\t/** Namespace for localStorage */\n\tnamespace?: string;\n\t/** Preserve localStorage on reset */\n\tpreserveStorage?: boolean;\n\t/** Debug toggles */\n\tdebug?: RuntimeDebugOptions;\n}\n\n/**\n * Runtime listener for events\n */\nexport interface RuntimeListener {\n\t/** Log message */\n\tlog?: (message: string) => void;\n\t/** Report error */\n\treportError?: (error: ErrorInfo) => void;\n\t/** Code paused (system.pause called) */\n\tcodePaused?: () => void;\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;","names":[]}
1
+ {"version":3,"sources":["../../src/types/runtime.ts"],"sourcesContent":["/**\n * Runtime type definitions\n */\n\nimport type { ErrorInfo } from \"@al8b/vm\";\nimport type { Resources } from \"./assets\";\nimport type { RuntimeBridge, RuntimeSessionSnapshot } from \"./bridge\";\n\n/**\n * Compiled routine artifact from the LootiScript compiler\n */\nexport interface CompiledModuleArtifact {\n\tformat: \"l8b-compiled-routine\";\n\troutine: SerializedRoutineData;\n}\n\n/**\n * Serialized routine data\n */\nexport type SerializedRoutineData = unknown;\n\nexport type { ErrorInfo, Resources };\n\n/**\n * Runtime configuration options\n */\nexport type InputDebugSetting =\n\t| boolean\n\t| {\n\t\t\tkeyboard?: boolean;\n\t\t\tmouse?: boolean;\n\t\t\ttouch?: boolean;\n\t\t\tgamepad?: boolean;\n\t };\n\nexport interface RuntimeDebugOptions {\n\t/** Input debug logging configuration */\n\tinput?: InputDebugSetting;\n\t/** Log screen/canvas state changes */\n\tscreen?: boolean;\n\t/** Detailed lifecycle logs for runtime startup and control */\n\tlifecycle?: boolean;\n}\n\nexport interface RuntimeOptions {\n\t/** Base URL for loading assets */\n\turl?: string;\n\t/** Source code files (for development) */\n\tsources?: Record<string, string>;\n\t/** Pre-compiled routines (for production) */\n\tcompiledRoutines?: Record<string, CompiledModuleArtifact | SerializedRoutineData>;\n\t/** Resources metadata */\n\tresources?: Resources;\n\t/** Environment variables (key-value pairs) */\n\tenv?: Record<string, string>;\n\t/** Listener for events (logging, errors) */\n\tlistener?: RuntimeListener;\n\t/** Host bridge for platform and backend integrations */\n\tbridge?: RuntimeBridge;\n\t/** Initial session context supplied by the host */\n\tinitialSession?: RuntimeSessionSnapshot | null;\n\t/** Canvas element to use */\n\tcanvas?: HTMLCanvasElement;\n\t/** Screen width */\n\twidth?: number;\n\t/** Screen height */\n\theight?: number;\n\t/** Namespace for localStorage */\n\tnamespace?: string;\n\t/** Preserve localStorage on reset */\n\tpreserveStorage?: boolean;\n\t/** Debug toggles */\n\tdebug?: RuntimeDebugOptions;\n}\n\n/**\n * Runtime listener for events\n */\nexport interface RuntimeListener {\n\t/** Log message */\n\tlog?: (message: string) => void;\n\t/** Report error */\n\treportError?: (error: ErrorInfo) => void;\n\t/** Code paused (system.pause called) */\n\tcodePaused?: () => void;\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;","names":[]}
package/package.json CHANGED
@@ -1,52 +1,48 @@
1
1
  {
2
- "name": "@al8b/runtime",
3
- "version": "0.1.12",
4
- "sideEffects": false,
5
- "files": [
6
- "dist/**/*",
7
- "README.md",
8
- "package.json"
9
- ],
10
- "scripts": {
11
- "build": "tsup",
12
- "clean": "bun --bun ../../../scripts/clean-package.mjs dist",
13
- "test": "vitest run --passWithNoTests"
14
- },
15
- "main": "./dist/index.js",
16
- "module": "./dist/index.mjs",
17
- "types": "./dist/index.d.ts",
18
- "exports": {
19
- ".": {
20
- "types": "./dist/index.d.ts",
21
- "import": "./dist/index.mjs",
22
- "require": "./dist/index.js"
23
- },
24
- "./package.json": "./package.json"
25
- },
26
- "dependencies": {
27
- "@al8b/vm": "workspace:*",
28
- "@al8b/io": "workspace:*",
29
- "@al8b/lootiscript": "workspace:*",
30
- "@al8b/framework-shared": "workspace:*",
31
- "@al8b/screen": "workspace:*",
32
- "@al8b/audio": "workspace:*",
33
- "@al8b/input": "workspace:*",
34
- "@al8b/time": "workspace:*",
35
- "@al8b/sprites": "workspace:*",
36
- "@al8b/image": "workspace:*",
37
- "@al8b/map": "workspace:*",
38
- "@al8b/player": "workspace:*",
39
- "@al8b/scene": "workspace:*",
40
- "@al8b/diagnostics": "workspace:*",
41
- "@al8b/palette": "workspace:*"
42
- },
43
- "keywords": [
44
- "runtime",
45
- "game-engine",
46
- "game-loop",
47
- "vm"
48
- ],
49
- "publishConfig": {
50
- "access": "public"
51
- }
2
+ "name": "@al8b/runtime",
3
+ "version": "0.1.14",
4
+ "sideEffects": false,
5
+ "files": [
6
+ "dist/**/*",
7
+ "README.md",
8
+ "package.json"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsup",
12
+ "clean": "bun --bun ../../../scripts/clean-package.mjs dist",
13
+ "test": "vitest run --passWithNoTests"
14
+ },
15
+ "main": "./dist/index.js",
16
+ "module": "./dist/index.mjs",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.mjs",
22
+ "require": "./dist/index.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "dependencies": {
27
+ "@al8b/vm": "^0.1.14",
28
+ "@al8b/io": "^0.1.14",
29
+ "@al8b/screen": "^0.1.14",
30
+ "@al8b/audio": "^0.1.14",
31
+ "@al8b/input": "^0.1.14",
32
+ "@al8b/time": "^0.1.14",
33
+ "@al8b/sprites": "^0.1.14",
34
+ "@al8b/image": "^0.1.14",
35
+ "@al8b/map": "^0.1.14",
36
+ "@al8b/player": "^0.1.14",
37
+ "@al8b/palette": "^0.1.14"
38
+ },
39
+ "keywords": [
40
+ "runtime",
41
+ "game-engine",
42
+ "game-loop",
43
+ "vm"
44
+ ],
45
+ "publishConfig": {
46
+ "access": "public"
47
+ }
52
48
  }