@idosgames/module-sdk 0.1.0 → 0.1.1

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/dist/index.d.cts CHANGED
@@ -32,6 +32,12 @@ interface Module {
32
32
  interface ModuleContext {
33
33
  /** The one shared, already-authenticated SDK client. Modules never create their own. */
34
34
  client: IDosGamesClient;
35
+ /**
36
+ * The Title the host resolved at startup. Always use this — never re-read the title from the
37
+ * URL inside a module: the host may have resolved it from the baked project config instead,
38
+ * and a module that disagrees with its host talks to a different title's data.
39
+ */
40
+ titleId: string;
35
41
  /** Cross-module bus — e.g. an idle module emits "gold:granted", a board module reacts. */
36
42
  events: SharedEventBus;
37
43
  /** Requests host-managed DOM surfaces (canvas hosts, HUD slots) when a module needs one directly. */
package/dist/index.d.ts CHANGED
@@ -32,6 +32,12 @@ interface Module {
32
32
  interface ModuleContext {
33
33
  /** The one shared, already-authenticated SDK client. Modules never create their own. */
34
34
  client: IDosGamesClient;
35
+ /**
36
+ * The Title the host resolved at startup. Always use this — never re-read the title from the
37
+ * URL inside a module: the host may have resolved it from the baked project config instead,
38
+ * and a module that disagrees with its host talks to a different title's data.
39
+ */
40
+ titleId: string;
35
41
  /** Cross-module bus — e.g. an idle module emits "gold:granted", a board module reacts. */
36
42
  events: SharedEventBus;
37
43
  /** Requests host-managed DOM surfaces (canvas hosts, HUD slots) when a module needs one directly. */
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "@idosgames/module-sdk",
3
- "version": "0.1.0",
4
- "description": "The composable-module contract for the iDosGames host shell: Module / ModuleContext types plus tiny authoring helpers. Framework-neutral at runtime — a module can be a game (Three/Phaser), a plain app, or an AI app.",
5
- "type": "module",
6
- "license": "MIT",
7
- "author": "iDos Games",
8
- "homepage": "https://github.com/iDos-Games/iDosGamesSDK_TS#readme",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/iDos-Games/iDosGamesSDK_TS.git",
12
- "directory": "packages/module-sdk"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/iDos-Games/iDosGamesSDK_TS/issues"
16
- },
17
- "keywords": [
18
- "idosgames",
19
- "sdk",
20
- "module",
21
- "plugin",
22
- "gamedev"
23
- ],
24
- "publishConfig": {
25
- "access": "public"
26
- },
27
- "sideEffects": false,
28
- "main": "./dist/index.cjs",
29
- "module": "./dist/index.js",
30
- "types": "./dist/index.d.ts",
31
- "exports": {
32
- ".": {
33
- "types": "./dist/index.d.ts",
34
- "import": "./dist/index.js",
35
- "require": "./dist/index.cjs"
36
- }
37
- },
38
- "files": [
39
- "dist",
40
- "README.md",
41
- "LICENSE"
42
- ],
43
- "scripts": {
44
- "build": "tsup",
45
- "typecheck": "tsc --noEmit -p tsconfig.json"
46
- },
47
- "//": "@idosgames/core is a real range, not '*': a published contract must name the version of core whose IDosGamesClient/SdkEvents shapes it references. Bump in step with core (see RELEASING.md). react is an OPTIONAL peer — the contract references React's ComponentType type only (a UI panel is a React component), which is erased at build, so a runtime-only module needs no React.",
48
- "dependencies": {
49
- "@idosgames/core": "^0.1.1"
50
- },
51
- "peerDependencies": {
52
- "react": "^18.3.1 || ^19.0.0"
53
- },
54
- "peerDependenciesMeta": {
55
- "react": {
56
- "optional": true
57
- }
58
- },
59
- "devDependencies": {
60
- "@types/react": "^19.2.17",
61
- "react": "^19.2.7"
62
- }
63
- }
1
+ {
2
+ "name": "@idosgames/module-sdk",
3
+ "version": "0.1.1",
4
+ "description": "The composable-module contract for the iDosGames host shell: Module / ModuleContext types plus tiny authoring helpers. Framework-neutral at runtime — a module can be a game (Three/Phaser), a plain app, or an AI app.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "iDos Games",
8
+ "homepage": "https://github.com/iDos-Games/iDosGamesSDK_TS#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/iDos-Games/iDosGamesSDK_TS.git",
12
+ "directory": "packages/module-sdk"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/iDos-Games/iDosGamesSDK_TS/issues"
16
+ },
17
+ "keywords": [
18
+ "idosgames",
19
+ "sdk",
20
+ "module",
21
+ "plugin",
22
+ "gamedev"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "sideEffects": false,
28
+ "main": "./dist/index.cjs",
29
+ "module": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.ts",
34
+ "import": "./dist/index.js",
35
+ "require": "./dist/index.cjs"
36
+ }
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md",
41
+ "LICENSE"
42
+ ],
43
+ "scripts": {
44
+ "build": "tsup",
45
+ "typecheck": "tsc --noEmit -p tsconfig.json"
46
+ },
47
+ "//": "@idosgames/core is a real range, not '*': a published contract must name the version of core whose IDosGamesClient/SdkEvents shapes it references. Bump in step with core (see RELEASING.md). react is an OPTIONAL peer — the contract references React's ComponentType type only (a UI panel is a React component), which is erased at build, so a runtime-only module needs no React.",
48
+ "dependencies": {
49
+ "@idosgames/core": "^0.1.1"
50
+ },
51
+ "peerDependencies": {
52
+ "react": "^18.3.1 || ^19.0.0"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "react": {
56
+ "optional": true
57
+ }
58
+ },
59
+ "devDependencies": {
60
+ "@types/react": "^19.2.17",
61
+ "react": "^19.2.7"
62
+ }
63
+ }