@scml/sc2-modloader 1.0.4 → 1.0.5

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 (2) hide show
  1. package/README.md +95 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,9 +1,100 @@
1
1
  # @scml/sc2-modloader
2
2
 
3
- ## Type definition source
3
+ TypeScript type definitions for SugarCube 2 Mod Loader.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add -D @scml/sc2-modloader
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Main entry (global types)
14
+
15
+ ```ts
16
+ /// <reference types="@scml/sc2-modloader" />
17
+ ```
18
+
19
+ Main entry augments these global properties: `jQuery`, `$`, `modSC2DataManager`, `modUtils`, `jsPreloader`, `modModLoadController`, `modAddonPluginManager`, `modSC2JsEvalContext`.
4
20
 
5
- Type definitions are from the repository:
21
+ ### Subpath imports
6
22
 
7
- - https://github.com/Lyoko-Jeremie/sugarcube-2-ModLoader
23
+ ```ts
24
+ import type { SomeType } from '@scml/sc2-modloader/AddonPlugin';
25
+ ```
26
+
27
+ ## Exports
28
+
29
+ | Subpath | Description |
30
+ |--------|------|
31
+ | `.` | Main entry, augments Window/global |
32
+ | `./AddonPlugin` | Type declarations |
33
+ | `./DecoratorUtils` | Type declarations |
34
+ | `./DependenceChecker` | Type declarations |
35
+ | `./export2window` | Type declarations |
36
+ | `./expose-loader` | Type declarations |
37
+ | `./extname` | Type declarations |
38
+ | `./getGlobal` | Type declarations |
39
+ | `./HtmlTagSrcHook` | Type declarations |
40
+ | `./IdbKeyValRef` | Type declarations |
41
+ | `./JqueryInjector` | Type declarations |
42
+ | `./JsPreloader` | Type declarations |
43
+ | `./JSZipLikeReadOnlyInterface` | Type declarations |
44
+ | `./LanguageManager` | Type declarations |
45
+ | `./MergeSC2DataInfoCache` | Type declarations |
46
+ | `./ModLoadController` | Type declarations |
47
+ | `./ModLoader` | Type declarations |
48
+ | `./ModOrderContainer` | Type declarations |
49
+ | `./ModZipReader` | Type declarations |
50
+ | `./PassageTracer` | Type declarations |
51
+ | `./polyfill` | Type declarations |
52
+ | `./ReplacePatcher` | Type declarations |
53
+ | `./SC2ApiRef` | Type declarations |
54
+ | `./SC2DataInfoCache` | Type declarations |
55
+ | `./SC2DataManager` | Type declarations |
56
+ | `./Sc2EventTracer` | Type declarations |
57
+ | `./SC2JsEvalContext` | Type declarations |
58
+ | `./SimulateMerge` | Type declarations |
59
+ | `./SugarCube2` | Type declarations |
60
+ | `./Utils` | Type declarations |
61
+ | `./WikifyTracer` | Type declarations |
62
+ | `./ModPack/ModMeta` | Type declarations |
63
+ | `./ModPack/ModPack` | Type declarations |
64
+ | `./ModPack/ModPackFileReaderInterface` | Type declarations |
65
+ | `./ModPack/ModPackJsZipAdaptor` | Type declarations |
66
+ | `./SemVer/InfiniteSemVer` | Type declarations |
67
+ | `./Utils/LazyIteratorAdaptor.d.ts` | Type declarations |
68
+ | `./WeakRefPool/WeakRefPool` | Type declarations |
69
+
70
+ ## Types
71
+
72
+ ### Main entry
73
+ - **`jQuery`** / **`$`** – jQuery on `window`.
74
+ - **`modSC2DataManager`** – Core data manager for mods and game data.
75
+ - **`modUtils`** – Mod loader utilities.
76
+ - **`jsPreloader`** – Script preloader.
77
+ - **`modModLoadController`** – Mod load lifecycle controller.
78
+ - **`modAddonPluginManager`** – Manages addon plugins.
79
+ - **`modSC2JsEvalContext`** – JS evaluation context for mods.
80
+
81
+ ### Core subpaths
82
+ - **`./ModLoader`** – **`ModLoader`**, **`ModBootJson`**, **`ModBootJsonAddonPlugin`**, **`DependenceInfo`**, **`ModImg`**, **`IModImgGetter`** – Core mod loading types.
83
+ - **`./SC2DataManager`** – **`SC2DataManager`** – Central data manager.
84
+ - **`./ModLoadController`** – Load controller and **`LogWrapper`**.
85
+ - **`./AddonPlugin`** – **`AddonPluginManager`**, **`AddonPluginHookPointEx`**, **`LifeTimeCircleHook`** – Addon plugin interfaces.
86
+ - **`./ReplacePatcher`** – Patch/replace utilities.
87
+ - **`./ModOrderContainer`** – **`ModOrderContainer`**, **`ModOrderItem`**, **`ModLoadFromSourceType`** – Load order types.
88
+ - **`./ModZipReader`** – **`ModZipReader`**, **`LocalLoader`**, **`RemoteLoader`**, **`IndexDBLoader`** – Mod zip and loader types.
89
+ - **`./SC2DataInfoCache`** – **`SC2DataInfo`**, **`CacheRecord`**, **`StyleTextFileItem`**, **`ScriptTextFileItem`**, **`PassageDataItem`** – Cached game data types.
90
+ - **`./SugarCube2`** – **`Passage`** – SugarCube passage type.
91
+ - **`./ModPack/*`** – **`ModPack`**, **`ModMeta`**, **`ModPackFileReaderInterface`** – Mod pack types.
92
+ - **`./SemVer/InfiniteSemVer`** – **`InfiniteSemVer`** – Version parsing.
93
+ - **`./Utils`** – **`ModUtils`** – Utility types.
94
+ - Other subpaths: **`DecoratorUtils`**, **`DependenceChecker`**, **`export2window`**, **`expose-loader`**, **`extname`**, **`getGlobal`**, **`HtmlTagSrcHook`**, **`IdbKeyValRef`**, **`JqueryInjector`**, **`JsPreloader`**, **`JSZipLikeReadOnlyInterface`**, **`LanguageManager`**, **`MergeSC2DataInfoCache`**, **`PassageTracer`**, **`polyfill`**, **`SC2ApiRef`**, **`SC2DataInfoCache`**, **`Sc2EventTracer`**, **`SC2JsEvalContext`**, **`SimulateMerge`**, **`WikifyTracer`**, **`WeakRefPool`**.
95
+
96
+ ## Type definition source
8
97
 
9
- Fetched from the `master` branch by default. Build: `pnpm run download && pnpm run build`.
98
+ - Upstream: https://github.com/Lyoko-Jeremie/sugarcube-2-ModLoader
99
+ - Default branch: master
100
+ - Build: `pnpm run download && pnpm run build`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scml/sc2-modloader",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "private": false,
5
5
  "description": "SugarCube 2 Mod Loader Workspace",
6
6
  "license": "MIT",