@rpgjs/client 5.0.0-alpha.9 → 5.0.0-beta.10
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 +37 -0
- package/LICENSE +19 -0
- package/dist/Game/AnimationManager.d.ts +8 -0
- package/dist/Game/AnimationManager.js +35 -0
- package/dist/Game/AnimationManager.js.map +1 -0
- package/dist/Game/AnimationManager.spec.d.ts +1 -0
- package/dist/Game/Event.d.ts +1 -1
- package/dist/Game/Event.js +12 -0
- package/dist/Game/Event.js.map +1 -0
- package/dist/Game/Map.d.ts +31 -2
- package/dist/Game/Map.js +138 -0
- package/dist/Game/Map.js.map +1 -0
- package/dist/Game/Object.d.ts +189 -0
- package/dist/Game/Object.js +255 -0
- package/dist/Game/Object.js.map +1 -0
- package/dist/Game/Player.d.ts +1 -1
- package/dist/Game/Player.js +12 -0
- package/dist/Game/Player.js.map +1 -0
- package/dist/Gui/Gui.d.ts +192 -7
- package/dist/Gui/Gui.js +475 -0
- package/dist/Gui/Gui.js.map +1 -0
- package/dist/Gui/Gui.spec.d.ts +1 -0
- package/dist/Gui/NotificationManager.d.ts +23 -0
- package/dist/Gui/NotificationManager.js +49 -0
- package/dist/Gui/NotificationManager.js.map +1 -0
- package/dist/Resource.d.ts +97 -0
- package/dist/Resource.js +133 -0
- package/dist/Resource.js.map +1 -0
- package/dist/RpgClient.d.ts +295 -13
- package/dist/RpgClientEngine.d.ts +671 -15
- package/dist/RpgClientEngine.js +1442 -0
- package/dist/RpgClientEngine.js.map +1 -0
- package/dist/Sound.d.ts +199 -0
- package/dist/Sound.js +167 -0
- package/dist/Sound.js.map +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.130.0/helpers/decorateMetadata.js +6 -0
- package/dist/components/animations/animation.ce.js +23 -0
- package/dist/components/animations/animation.ce.js.map +1 -0
- package/dist/components/animations/hit.ce.js +64 -0
- package/dist/components/animations/hit.ce.js.map +1 -0
- package/dist/components/animations/index.d.ts +4 -0
- package/dist/components/animations/index.js +11 -0
- package/dist/components/animations/index.js.map +1 -0
- package/dist/components/character.ce.js +572 -0
- package/dist/components/character.ce.js.map +1 -0
- package/dist/components/dynamics/bar.ce.js +96 -0
- package/dist/components/dynamics/bar.ce.js.map +1 -0
- package/dist/components/dynamics/image.ce.js +23 -0
- package/dist/components/dynamics/image.ce.js.map +1 -0
- package/dist/components/dynamics/parse-value.d.ts +4 -0
- package/dist/components/dynamics/parse-value.js +63 -0
- package/dist/components/dynamics/parse-value.js.map +1 -0
- package/dist/components/dynamics/parse-value.spec.d.ts +1 -0
- package/dist/components/dynamics/shape-utils.d.ts +16 -0
- package/dist/components/dynamics/shape-utils.js +73 -0
- package/dist/components/dynamics/shape-utils.js.map +1 -0
- package/dist/components/dynamics/shape-utils.spec.d.ts +1 -0
- package/dist/components/dynamics/shape.ce.js +83 -0
- package/dist/components/dynamics/shape.ce.js.map +1 -0
- package/dist/components/dynamics/text.ce.js +50 -0
- package/dist/components/dynamics/text.ce.js.map +1 -0
- package/dist/components/gui/box.ce.js +26 -0
- package/dist/components/gui/box.ce.js.map +1 -0
- package/dist/components/gui/dialogbox/index.ce.js +198 -0
- package/dist/components/gui/dialogbox/index.ce.js.map +1 -0
- package/dist/components/gui/gameover.ce.js +169 -0
- package/dist/components/gui/gameover.ce.js.map +1 -0
- package/dist/components/gui/hud/hud.ce.js +83 -0
- package/dist/components/gui/hud/hud.ce.js.map +1 -0
- package/dist/components/gui/index.d.ts +15 -3
- package/dist/components/gui/index.js +14 -0
- package/dist/components/gui/menu/equip-menu.ce.js +427 -0
- package/dist/components/gui/menu/equip-menu.ce.js.map +1 -0
- package/dist/components/gui/menu/exit-menu.ce.js +55 -0
- package/dist/components/gui/menu/exit-menu.ce.js.map +1 -0
- package/dist/components/gui/menu/items-menu.ce.js +326 -0
- package/dist/components/gui/menu/items-menu.ce.js.map +1 -0
- package/dist/components/gui/menu/main-menu.ce.js +399 -0
- package/dist/components/gui/menu/main-menu.ce.js.map +1 -0
- package/dist/components/gui/menu/options-menu.ce.js +49 -0
- package/dist/components/gui/menu/options-menu.ce.js.map +1 -0
- package/dist/components/gui/menu/skills-menu.ce.js +102 -0
- package/dist/components/gui/menu/skills-menu.ce.js.map +1 -0
- package/dist/components/gui/mobile/index.d.ts +8 -0
- package/dist/components/gui/mobile/index.js +21 -0
- package/dist/components/gui/mobile/index.js.map +1 -0
- package/dist/components/gui/mobile/mobile.ce.js +79 -0
- package/dist/components/gui/mobile/mobile.ce.js.map +1 -0
- package/dist/components/gui/notification/notification.ce.js +62 -0
- package/dist/components/gui/notification/notification.ce.js.map +1 -0
- package/dist/components/gui/save-load.ce.js +211 -0
- package/dist/components/gui/save-load.ce.js.map +1 -0
- package/dist/components/gui/shop/shop.ce.js +614 -0
- package/dist/components/gui/shop/shop.ce.js.map +1 -0
- package/dist/components/gui/title-screen.ce.js +164 -0
- package/dist/components/gui/title-screen.ce.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +4 -0
- package/dist/components/player-components-utils.d.ts +67 -0
- package/dist/components/player-components-utils.js +162 -0
- package/dist/components/player-components-utils.js.map +1 -0
- package/dist/components/player-components-utils.spec.d.ts +1 -0
- package/dist/components/player-components.ce.js +188 -0
- package/dist/components/player-components.ce.js.map +1 -0
- package/dist/components/prebuilt/hp-bar.ce.js +113 -0
- package/dist/components/prebuilt/hp-bar.ce.js.map +1 -0
- package/dist/components/prebuilt/index.d.ts +19 -0
- package/dist/components/prebuilt/index.js +2 -0
- package/dist/components/prebuilt/light-halo.ce.js +70 -0
- package/dist/components/prebuilt/light-halo.ce.js.map +1 -0
- package/dist/components/scenes/canvas.ce.js +196 -0
- package/dist/components/scenes/canvas.ce.js.map +1 -0
- package/dist/components/scenes/draw-map.ce.js +79 -0
- package/dist/components/scenes/draw-map.ce.js.map +1 -0
- package/dist/components/scenes/event-layer.ce.js +29 -0
- package/dist/components/scenes/event-layer.ce.js.map +1 -0
- package/dist/core/inject.js +18 -0
- package/dist/core/inject.js.map +1 -0
- package/dist/core/setup.js +16 -0
- package/dist/core/setup.js.map +1 -0
- package/dist/decorators/spritesheet.d.ts +1 -0
- package/dist/decorators/spritesheet.js +11 -0
- package/dist/decorators/spritesheet.js.map +1 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +45 -14
- package/dist/module.d.ts +43 -4
- package/dist/module.js +179 -0
- package/dist/module.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_di@3.0.1/node_modules/@signe/di/dist/index.js +167 -0
- package/dist/node_modules/.pnpm/@signe_di@3.0.1/node_modules/@signe/di/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_reactive@3.0.1/node_modules/@signe/reactive/dist/index.js +239 -0
- package/dist/node_modules/.pnpm/@signe_reactive@3.0.1/node_modules/@signe/reactive/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/chunk-EUXUH3YW.js +13 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/chunk-EUXUH3YW.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/index.js +696 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_sync@3.0.1/node_modules/@signe/sync/dist/client/index.js +44 -0
- package/dist/node_modules/.pnpm/@signe_sync@3.0.1/node_modules/@signe/sync/dist/client/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_sync@3.0.1/node_modules/@signe/sync/dist/index.js +241 -0
- package/dist/node_modules/.pnpm/@signe_sync@3.0.1/node_modules/@signe/sync/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-HAC622V3.js +115 -0
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-HAC622V3.js.map +1 -0
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-S74YV6PU.js +401 -0
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-S74YV6PU.js.map +1 -0
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.js +3756 -0
- package/dist/node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.js.map +1 -0
- package/dist/presets/animation.d.ts +31 -0
- package/dist/presets/animation.js +39 -0
- package/dist/presets/animation.js.map +1 -0
- package/dist/presets/faceset.d.ts +30 -0
- package/dist/presets/faceset.js +51 -0
- package/dist/presets/faceset.js.map +1 -0
- package/dist/presets/icon.d.ts +20 -0
- package/dist/presets/icon.js +15 -0
- package/dist/presets/icon.js.map +1 -0
- package/dist/presets/index.d.ts +123 -0
- package/dist/presets/index.js +17 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/lpc.d.ts +89 -0
- package/dist/presets/lpc.js +98 -0
- package/dist/presets/lpc.js.map +1 -0
- package/dist/presets/rmspritesheet.js +42 -0
- package/dist/presets/rmspritesheet.js.map +1 -0
- package/dist/services/AbstractSocket.d.ts +9 -5
- package/dist/services/AbstractSocket.js +11 -0
- package/dist/services/AbstractSocket.js.map +1 -0
- package/dist/services/keyboardControls.d.ts +15 -0
- package/dist/services/keyboardControls.js +23 -0
- package/dist/services/keyboardControls.js.map +1 -0
- package/dist/services/loadMap.d.ts +6 -0
- package/dist/services/loadMap.js +123 -0
- package/dist/services/loadMap.js.map +1 -0
- package/dist/services/mmorpg.d.ts +21 -9
- package/dist/services/mmorpg.js +136 -0
- package/dist/services/mmorpg.js.map +1 -0
- package/dist/services/save.d.ts +19 -0
- package/dist/services/save.js +77 -0
- package/dist/services/save.js.map +1 -0
- package/dist/services/save.spec.d.ts +1 -0
- package/dist/services/standalone.d.ts +67 -7
- package/dist/services/standalone.js +168 -0
- package/dist/services/standalone.js.map +1 -0
- package/dist/utils/getEntityProp.d.ts +39 -0
- package/dist/utils/getEntityProp.js +53 -0
- package/dist/utils/getEntityProp.js.map +1 -0
- package/dist/utils/getEntityProp.spec.d.ts +1 -0
- package/dist/utils/readPropValue.d.ts +2 -0
- package/dist/utils/readPropValue.js +13 -0
- package/dist/utils/readPropValue.js.map +1 -0
- package/package.json +14 -11
- package/src/Game/AnimationManager.spec.ts +30 -0
- package/src/Game/AnimationManager.ts +33 -0
- package/src/Game/Event.ts +1 -1
- package/src/Game/Map.ts +184 -3
- package/src/Game/Object.ts +409 -14
- package/src/Game/Player.ts +1 -1
- package/src/Gui/Gui.spec.ts +273 -0
- package/src/Gui/Gui.ts +566 -23
- package/src/Gui/NotificationManager.ts +69 -0
- package/src/Resource.ts +149 -0
- package/src/RpgClient.ts +309 -14
- package/src/RpgClientEngine.ts +1790 -63
- package/src/Sound.ts +253 -0
- package/src/components/{effects → animations}/animation.ce +3 -6
- package/src/components/{effects → animations}/index.ts +1 -1
- package/src/components/character.ce +801 -59
- package/src/components/dynamics/bar.ce +87 -0
- package/src/components/dynamics/image.ce +20 -0
- package/src/components/dynamics/parse-value.spec.ts +83 -0
- package/src/components/dynamics/parse-value.ts +154 -0
- package/src/components/dynamics/shape-utils.spec.ts +46 -0
- package/src/components/dynamics/shape-utils.ts +61 -0
- package/src/components/dynamics/shape.ce +89 -0
- package/src/components/dynamics/text.ce +68 -0
- package/src/components/gui/box.ce +17 -0
- package/src/components/gui/dialogbox/index.ce +213 -187
- package/src/components/gui/gameover.ce +158 -0
- package/src/components/gui/hud/hud.ce +61 -0
- package/src/components/gui/index.ts +30 -4
- package/src/components/gui/menu/equip-menu.ce +410 -0
- package/src/components/gui/menu/exit-menu.ce +41 -0
- package/src/components/gui/menu/items-menu.ce +317 -0
- package/src/components/gui/menu/main-menu.ce +294 -0
- package/src/components/gui/menu/options-menu.ce +35 -0
- package/src/components/gui/menu/skills-menu.ce +83 -0
- package/src/components/gui/mobile/index.ts +24 -0
- package/src/components/gui/mobile/mobile.ce +80 -0
- package/src/components/gui/notification/notification.ce +51 -0
- package/src/components/gui/save-load.ce +208 -0
- package/src/components/gui/shop/shop.ce +493 -0
- package/src/components/gui/title-screen.ce +163 -0
- package/src/components/index.ts +3 -0
- package/src/components/player-components-utils.spec.ts +109 -0
- package/src/components/player-components-utils.ts +205 -0
- package/src/components/player-components.ce +221 -0
- package/src/components/prebuilt/hp-bar.ce +255 -0
- package/src/components/prebuilt/index.ts +24 -0
- package/src/components/prebuilt/light-halo.ce +148 -0
- package/src/components/scenes/canvas.ce +185 -21
- package/src/components/scenes/draw-map.ce +55 -21
- package/src/components/scenes/event-layer.ce +8 -2
- package/src/components/scenes/transition.ce +60 -0
- package/src/core/setup.ts +2 -2
- package/src/decorators/spritesheet.ts +8 -0
- package/src/index.ts +17 -2
- package/src/module.ts +132 -10
- package/src/presets/animation.ts +46 -0
- package/src/presets/faceset.ts +60 -0
- package/src/presets/icon.ts +17 -0
- package/src/presets/index.ts +9 -1
- package/src/presets/lpc.ts +108 -0
- package/src/services/AbstractSocket.ts +10 -2
- package/src/services/keyboardControls.ts +20 -0
- package/src/services/loadMap.ts +3 -1
- package/src/services/mmorpg.ts +106 -12
- package/src/services/save.spec.ts +127 -0
- package/src/services/save.ts +103 -0
- package/src/services/standalone.ts +110 -18
- package/src/utils/getEntityProp.spec.ts +96 -0
- package/src/utils/getEntityProp.ts +88 -0
- package/src/utils/readPropValue.ts +16 -0
- package/vite.config.ts +4 -2
- package/dist/Game/EffectManager.d.ts +0 -5
- package/dist/components/effects/index.d.ts +0 -4
- package/dist/index.js.map +0 -1
- package/dist/index10.js +0 -8
- package/dist/index10.js.map +0 -1
- package/dist/index11.js +0 -10
- package/dist/index11.js.map +0 -1
- package/dist/index12.js +0 -8
- package/dist/index12.js.map +0 -1
- package/dist/index13.js +0 -17
- package/dist/index13.js.map +0 -1
- package/dist/index14.js +0 -107
- package/dist/index14.js.map +0 -1
- package/dist/index15.js +0 -50
- package/dist/index15.js.map +0 -1
- package/dist/index16.js +0 -191
- package/dist/index16.js.map +0 -1
- package/dist/index17.js +0 -9
- package/dist/index17.js.map +0 -1
- package/dist/index18.js +0 -387
- package/dist/index18.js.map +0 -1
- package/dist/index19.js +0 -31
- package/dist/index19.js.map +0 -1
- package/dist/index2.js +0 -181
- package/dist/index2.js.map +0 -1
- package/dist/index20.js +0 -24
- package/dist/index20.js.map +0 -1
- package/dist/index21.js +0 -2421
- package/dist/index21.js.map +0 -1
- package/dist/index22.js +0 -114
- package/dist/index22.js.map +0 -1
- package/dist/index23.js +0 -109
- package/dist/index23.js.map +0 -1
- package/dist/index24.js +0 -71
- package/dist/index24.js.map +0 -1
- package/dist/index25.js +0 -21
- package/dist/index25.js.map +0 -1
- package/dist/index26.js +0 -41
- package/dist/index26.js.map +0 -1
- package/dist/index27.js +0 -5
- package/dist/index27.js.map +0 -1
- package/dist/index28.js +0 -322
- package/dist/index28.js.map +0 -1
- package/dist/index29.js +0 -27
- package/dist/index29.js.map +0 -1
- package/dist/index3.js +0 -87
- package/dist/index3.js.map +0 -1
- package/dist/index30.js +0 -11
- package/dist/index30.js.map +0 -1
- package/dist/index31.js +0 -11
- package/dist/index31.js.map +0 -1
- package/dist/index32.js +0 -174
- package/dist/index32.js.map +0 -1
- package/dist/index33.js +0 -501
- package/dist/index33.js.map +0 -1
- package/dist/index34.js +0 -12
- package/dist/index34.js.map +0 -1
- package/dist/index35.js +0 -4403
- package/dist/index35.js.map +0 -1
- package/dist/index36.js +0 -316
- package/dist/index36.js.map +0 -1
- package/dist/index37.js +0 -61
- package/dist/index37.js.map +0 -1
- package/dist/index38.js +0 -20
- package/dist/index38.js.map +0 -1
- package/dist/index39.js +0 -20
- package/dist/index39.js.map +0 -1
- package/dist/index4.js +0 -67
- package/dist/index4.js.map +0 -1
- package/dist/index5.js +0 -16
- package/dist/index5.js.map +0 -1
- package/dist/index6.js +0 -17
- package/dist/index6.js.map +0 -1
- package/dist/index7.js +0 -39
- package/dist/index7.js.map +0 -1
- package/dist/index8.js +0 -108
- package/dist/index8.js.map +0 -1
- package/dist/index9.js +0 -76
- package/dist/index9.js.map +0 -1
- package/src/Game/EffectManager.ts +0 -20
- package/src/components/gui/dialogbox/itemMenu.ce +0 -23
- package/src/components/gui/dialogbox/selection.ce +0 -67
- /package/src/components/{effects → animations}/hit.ce +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,27 @@ export * from './RpgClientEngine';
|
|
|
2
2
|
export type * from './RpgClient';
|
|
3
3
|
export * from './services/standalone';
|
|
4
4
|
export * from './services/mmorpg';
|
|
5
|
+
export * from './services/save';
|
|
5
6
|
export * from './core/setup';
|
|
6
7
|
export * from './core/inject';
|
|
7
8
|
export * from './services/loadMap';
|
|
8
9
|
export * from './module';
|
|
9
10
|
export * from './Gui/Gui';
|
|
10
11
|
export * from './components/gui';
|
|
11
|
-
export * from './components/
|
|
12
|
+
export * from './components/animations';
|
|
13
|
+
export * from './components/prebuilt';
|
|
12
14
|
export * from './presets';
|
|
13
15
|
export * from './components';
|
|
16
|
+
export * from './components/gui';
|
|
17
|
+
export * from './Sound';
|
|
18
|
+
export * from './Resource';
|
|
19
|
+
export * from './decorators/spritesheet';
|
|
20
|
+
export * from './utils/getEntityProp';
|
|
21
|
+
export { Context } from '@signe/di';
|
|
22
|
+
export { KeyboardControls, Input } from 'canvasengine';
|
|
23
|
+
export { Control } from './services/keyboardControls';
|
|
24
|
+
export { RpgClientObject } from './Game/Object';
|
|
25
|
+
export { RpgClientPlayer } from './Game/Player';
|
|
26
|
+
export { RpgClientEvent } from './Game/Event';
|
|
27
|
+
export { withMobile } from './components/gui/mobile';
|
|
28
|
+
export * from './services/AbstractSocket';
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { Context } from "./node_modules/.pnpm/@signe_di@3.0.1/node_modules/@signe/di/dist/index.js";
|
|
2
|
+
import { clearInject, context, inject, setInject } from "./core/inject.js";
|
|
3
|
+
import { AbstractWebsocket, WebSocketToken } from "./services/AbstractSocket.js";
|
|
4
|
+
import __ce_component$2 from "./components/gui/dialogbox/index.ce.js";
|
|
5
|
+
import __ce_component from "./components/gui/box.ce.js";
|
|
6
|
+
import __ce_component$15 from "./components/gui/shop/shop.ce.js";
|
|
7
|
+
import { getEntityProp } from "./utils/getEntityProp.js";
|
|
8
|
+
import __ce_component$8 from "./components/gui/hud/hud.ce.js";
|
|
9
|
+
import { SaveClientService, SaveClientToken, provideSaveClient } from "./services/save.js";
|
|
10
|
+
import __ce_component$14 from "./components/gui/save-load.ce.js";
|
|
11
|
+
import __ce_component$9 from "./components/gui/menu/items-menu.ce.js";
|
|
12
|
+
import __ce_component$16 from "./components/gui/menu/skills-menu.ce.js";
|
|
13
|
+
import __ce_component$3 from "./components/gui/menu/equip-menu.ce.js";
|
|
14
|
+
import __ce_component$13 from "./components/gui/menu/options-menu.ce.js";
|
|
15
|
+
import __ce_component$5 from "./components/gui/menu/exit-menu.ce.js";
|
|
16
|
+
import __ce_component$11 from "./components/gui/menu/main-menu.ce.js";
|
|
17
|
+
import __ce_component$12 from "./components/gui/notification/notification.ce.js";
|
|
18
|
+
import __ce_component$17 from "./components/gui/title-screen.ce.js";
|
|
19
|
+
import __ce_component$6 from "./components/gui/gameover.ce.js";
|
|
20
|
+
import "./components/gui/index.js";
|
|
21
|
+
import { RpgGui } from "./Gui/Gui.js";
|
|
22
|
+
import { LoadMapService, LoadMapToken, provideLoadMap } from "./services/loadMap.js";
|
|
23
|
+
import { RpgSound, Sound, getSoundMetadata } from "./Sound.js";
|
|
24
|
+
import { RpgResource } from "./Resource.js";
|
|
25
|
+
import { RpgClientObject } from "./Game/Object.js";
|
|
26
|
+
import { RpgClientPlayer } from "./Game/Player.js";
|
|
27
|
+
import { RpgClientEvent } from "./Game/Event.js";
|
|
28
|
+
import { GlobalConfigToken, provideClientGlobalConfig, provideClientModules, provideGlobalConfig } from "./module.js";
|
|
29
|
+
import { PrebuiltComponentAnimations } from "./components/animations/index.js";
|
|
30
|
+
import { RpgClientEngine } from "./RpgClientEngine.js";
|
|
31
|
+
import { Control } from "./services/keyboardControls.js";
|
|
32
|
+
import { provideRpg } from "./services/standalone.js";
|
|
33
|
+
import { provideMmorpg } from "./services/mmorpg.js";
|
|
34
|
+
import { startGame } from "./core/setup.js";
|
|
35
|
+
import __ce_component$7 from "./components/prebuilt/hp-bar.ce.js";
|
|
36
|
+
import __ce_component$10 from "./components/prebuilt/light-halo.ce.js";
|
|
37
|
+
import "./components/prebuilt/index.js";
|
|
38
|
+
import { Presets } from "./presets/index.js";
|
|
39
|
+
import __ce_component$1 from "./components/character.ce.js";
|
|
40
|
+
import __ce_component$4 from "./components/scenes/event-layer.ce.js";
|
|
41
|
+
import "./components/index.js";
|
|
42
|
+
import { Spritesheet } from "./decorators/spritesheet.js";
|
|
43
|
+
import { withMobile } from "./components/gui/mobile/index.js";
|
|
44
|
+
import { Input, KeyboardControls } from "canvasengine";
|
|
45
|
+
export { AbstractWebsocket, __ce_component as BoxComponent, __ce_component$1 as CharacterComponent, Context, Control, __ce_component$2 as DialogboxComponent, __ce_component$3 as EquipMenuComponent, __ce_component$4 as EventLayerComponent, __ce_component$5 as ExitMenuComponent, __ce_component$6 as GameoverComponent, GlobalConfigToken, __ce_component$7 as HpBar, __ce_component$8 as HudComponent, Input, __ce_component$9 as ItemsMenuComponent, KeyboardControls, __ce_component$10 as LightHalo, LoadMapService, LoadMapToken, __ce_component$11 as MainMenuComponent, __ce_component$12 as NotificationComponent, __ce_component$13 as OptionsMenuComponent, PrebuiltComponentAnimations, Presets, RpgClientEngine, RpgClientEvent, RpgClientObject, RpgClientPlayer, RpgGui, RpgResource, RpgSound, SaveClientService, SaveClientToken, __ce_component$14 as SaveLoadComponent, __ce_component$15 as ShopComponent, __ce_component$16 as SkillsMenuComponent, Sound, Spritesheet, __ce_component$17 as TitleScreenComponent, WebSocketToken, clearInject, context, getEntityProp, getSoundMetadata, inject, provideClientGlobalConfig, provideClientModules, provideGlobalConfig, provideLoadMap, provideMmorpg, provideRpg, provideSaveClient, setInject, startGame, withMobile };
|
package/dist/module.d.ts
CHANGED
|
@@ -1,8 +1,47 @@
|
|
|
1
|
+
import { FactoryProvider } from '@signe/di';
|
|
1
2
|
import { RpgClient } from './RpgClient';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Type for client modules that can be either:
|
|
5
|
+
* - An object implementing RpgClient interface
|
|
6
|
+
* - A class decorated with @RpgModule decorator
|
|
7
|
+
*/
|
|
8
|
+
export type RpgClientModule = RpgClient | (new () => any);
|
|
9
|
+
/**
|
|
10
|
+
* Provides client modules configuration to Dependency Injection
|
|
11
|
+
*
|
|
12
|
+
* This function accepts an array of client modules that can be either:
|
|
13
|
+
* - Objects implementing the RpgClient interface
|
|
14
|
+
* - Classes decorated with the @RpgModule decorator (which will be instantiated)
|
|
15
|
+
*
|
|
16
|
+
* @param modules - Array of client modules (objects or classes)
|
|
17
|
+
* @returns FactoryProvider configuration for DI
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Using an object
|
|
21
|
+
* provideClientModules([
|
|
22
|
+
* {
|
|
23
|
+
* engine: {
|
|
24
|
+
* onConnected(engine) {
|
|
25
|
+
* console.log('Client connected')
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
* ])
|
|
30
|
+
*
|
|
31
|
+
* // Using a decorated class
|
|
32
|
+
* @RpgModule<RpgClient>({
|
|
33
|
+
* engine: {
|
|
34
|
+
* onStart(engine) {
|
|
35
|
+
* console.log('Client started')
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* })
|
|
39
|
+
* class MyClientModule {}
|
|
40
|
+
*
|
|
41
|
+
* provideClientModules([MyClientModule])
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare function provideClientModules(modules: RpgClientModule[]): FactoryProvider;
|
|
6
45
|
export declare const GlobalConfigToken = "GlobalConfigToken";
|
|
7
46
|
export declare function provideGlobalConfig(config: any): {
|
|
8
47
|
provide: string;
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { inject } from "./node_modules/.pnpm/@signe_di@3.0.1/node_modules/@signe/di/dist/index.js";
|
|
2
|
+
import { RpgGui } from "./Gui/Gui.js";
|
|
3
|
+
import { getSoundMetadata } from "./Sound.js";
|
|
4
|
+
import { findModules, provideModules } from "@rpgjs/common";
|
|
5
|
+
//#region src/module.ts
|
|
6
|
+
/**
|
|
7
|
+
* Provides client modules configuration to Dependency Injection
|
|
8
|
+
*
|
|
9
|
+
* This function accepts an array of client modules that can be either:
|
|
10
|
+
* - Objects implementing the RpgClient interface
|
|
11
|
+
* - Classes decorated with the @RpgModule decorator (which will be instantiated)
|
|
12
|
+
*
|
|
13
|
+
* @param modules - Array of client modules (objects or classes)
|
|
14
|
+
* @returns FactoryProvider configuration for DI
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Using an object
|
|
18
|
+
* provideClientModules([
|
|
19
|
+
* {
|
|
20
|
+
* engine: {
|
|
21
|
+
* onConnected(engine) {
|
|
22
|
+
* console.log('Client connected')
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ])
|
|
27
|
+
*
|
|
28
|
+
* // Using a decorated class
|
|
29
|
+
* @RpgModule<RpgClient>({
|
|
30
|
+
* engine: {
|
|
31
|
+
* onStart(engine) {
|
|
32
|
+
* console.log('Client started')
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
* })
|
|
36
|
+
* class MyClientModule {}
|
|
37
|
+
*
|
|
38
|
+
* provideClientModules([MyClientModule])
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
function provideClientModules(modules) {
|
|
42
|
+
return provideModules(modules, "client", (modules, context) => {
|
|
43
|
+
modules = [...findModules(context, "Client"), ...modules];
|
|
44
|
+
modules = modules.map((module) => {
|
|
45
|
+
if (typeof module === "function") {
|
|
46
|
+
const instance = new module();
|
|
47
|
+
const moduleObj = {};
|
|
48
|
+
for (const key in instance) moduleObj[key] = instance[key];
|
|
49
|
+
module = moduleObj;
|
|
50
|
+
}
|
|
51
|
+
if ("client" in module) module = module.client;
|
|
52
|
+
if (module.spritesheets) {
|
|
53
|
+
const spritesheets = [...module.spritesheets];
|
|
54
|
+
module.spritesheets = { load: (engine) => {
|
|
55
|
+
spritesheets.forEach((spritesheet) => {
|
|
56
|
+
engine.addSpriteSheet(spritesheet);
|
|
57
|
+
});
|
|
58
|
+
} };
|
|
59
|
+
}
|
|
60
|
+
if (module.spritesheetResolver) {
|
|
61
|
+
const resolver = module.spritesheetResolver;
|
|
62
|
+
module.spritesheetResolver = { load: (engine) => {
|
|
63
|
+
engine.setSpritesheetResolver(resolver);
|
|
64
|
+
} };
|
|
65
|
+
}
|
|
66
|
+
if (module.sounds) {
|
|
67
|
+
const sounds = [...module.sounds];
|
|
68
|
+
module.sounds = { load: (engine) => {
|
|
69
|
+
sounds.forEach((sound) => {
|
|
70
|
+
if (typeof sound === "function" || sound && sound.constructor && sound.constructor !== Object) {
|
|
71
|
+
const metadata = getSoundMetadata(sound);
|
|
72
|
+
if (metadata) {
|
|
73
|
+
if (metadata.id && metadata.sound) engine.addSound({
|
|
74
|
+
id: metadata.id,
|
|
75
|
+
src: metadata.sound,
|
|
76
|
+
loop: metadata.loop,
|
|
77
|
+
volume: metadata.volume
|
|
78
|
+
});
|
|
79
|
+
if (metadata.sounds) Object.entries(metadata.sounds).forEach(([soundId, soundSrc]) => {
|
|
80
|
+
engine.addSound({
|
|
81
|
+
id: soundId,
|
|
82
|
+
src: soundSrc,
|
|
83
|
+
loop: metadata.loop,
|
|
84
|
+
volume: metadata.volume
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
} else engine.addSound(sound);
|
|
88
|
+
} else engine.addSound(sound);
|
|
89
|
+
});
|
|
90
|
+
} };
|
|
91
|
+
}
|
|
92
|
+
if (module.soundResolver) {
|
|
93
|
+
const resolver = module.soundResolver;
|
|
94
|
+
module.soundResolver = { load: (engine) => {
|
|
95
|
+
engine.setSoundResolver(resolver);
|
|
96
|
+
} };
|
|
97
|
+
}
|
|
98
|
+
if (module.gui) {
|
|
99
|
+
const gui = [...module.gui];
|
|
100
|
+
module.gui = { load: (engine) => {
|
|
101
|
+
const guiService = inject(engine.context, RpgGui);
|
|
102
|
+
gui.forEach((gui) => {
|
|
103
|
+
guiService.add(gui);
|
|
104
|
+
});
|
|
105
|
+
} };
|
|
106
|
+
}
|
|
107
|
+
if (module.componentAnimations) {
|
|
108
|
+
const componentAnimations = [...module.componentAnimations];
|
|
109
|
+
module.componentAnimations = { load: (engine) => {
|
|
110
|
+
componentAnimations.forEach((componentAnimation) => {
|
|
111
|
+
engine.addComponentAnimation(componentAnimation);
|
|
112
|
+
});
|
|
113
|
+
} };
|
|
114
|
+
}
|
|
115
|
+
if (module.transitions) {
|
|
116
|
+
const transitions = [...module.transitions];
|
|
117
|
+
module.transitions = { load: (engine) => {
|
|
118
|
+
const guiService = inject(engine.context, RpgGui);
|
|
119
|
+
transitions.forEach((transition) => {
|
|
120
|
+
guiService.add({
|
|
121
|
+
name: transition.id,
|
|
122
|
+
component: transition.component,
|
|
123
|
+
data: transition.props || {}
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
} };
|
|
127
|
+
}
|
|
128
|
+
if (module.particles) {
|
|
129
|
+
const particles = [...module.particles];
|
|
130
|
+
module.particles = { load: (engine) => {
|
|
131
|
+
particles.forEach((particle) => {
|
|
132
|
+
engine.addParticle(particle);
|
|
133
|
+
});
|
|
134
|
+
} };
|
|
135
|
+
}
|
|
136
|
+
if (module.sprite) {
|
|
137
|
+
const sprite = { ...module.sprite };
|
|
138
|
+
module.sprite = {
|
|
139
|
+
...sprite,
|
|
140
|
+
load: (engine) => {
|
|
141
|
+
if (sprite.componentsBehind) sprite.componentsBehind.forEach((component) => {
|
|
142
|
+
engine.addSpriteComponentBehind(component);
|
|
143
|
+
});
|
|
144
|
+
if (sprite.componentsInFront) sprite.componentsInFront.forEach((component) => {
|
|
145
|
+
engine.addSpriteComponentInFront(component);
|
|
146
|
+
});
|
|
147
|
+
if (sprite.components) Object.entries(sprite.components).forEach(([id, component]) => {
|
|
148
|
+
engine.registerSpriteComponent(id, component);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return module;
|
|
154
|
+
});
|
|
155
|
+
return modules;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
var GlobalConfigToken = "GlobalConfigToken";
|
|
159
|
+
function provideGlobalConfig(config) {
|
|
160
|
+
return {
|
|
161
|
+
provide: GlobalConfigToken,
|
|
162
|
+
useValue: config ?? {}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function provideClientGlobalConfig(config = {}) {
|
|
166
|
+
if (!config.keyboardControls) config.keyboardControls = {
|
|
167
|
+
up: "up",
|
|
168
|
+
down: "down",
|
|
169
|
+
left: "left",
|
|
170
|
+
right: "right",
|
|
171
|
+
action: "space",
|
|
172
|
+
escape: "escape"
|
|
173
|
+
};
|
|
174
|
+
return provideGlobalConfig(config);
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
177
|
+
export { GlobalConfigToken, provideClientGlobalConfig, provideClientModules, provideGlobalConfig };
|
|
178
|
+
|
|
179
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","names":[],"sources":["../src/module.ts"],"sourcesContent":["import { findModules, provideModules } from \"@rpgjs/common\";\nimport { FactoryProvider } from \"@signe/di\";\nimport { RpgClientEngine } from \"./RpgClientEngine\";\nimport { RpgClient } from \"./RpgClient\";\nimport { inject } from \"@signe/di\";\nimport { RpgGui } from \"./Gui/Gui\";\nimport { getSoundMetadata } from \"./Sound\";\n\n/**\n * Type for client modules that can be either:\n * - An object implementing RpgClient interface\n * - A class decorated with @RpgModule decorator\n */\nexport type RpgClientModule = RpgClient | (new () => any);\n\n/**\n * Provides client modules configuration to Dependency Injection\n * \n * This function accepts an array of client modules that can be either:\n * - Objects implementing the RpgClient interface\n * - Classes decorated with the @RpgModule decorator (which will be instantiated)\n * \n * @param modules - Array of client modules (objects or classes)\n * @returns FactoryProvider configuration for DI\n * @example\n * ```ts\n * // Using an object\n * provideClientModules([\n * {\n * engine: {\n * onConnected(engine) {\n * console.log('Client connected')\n * }\n * }\n * }\n * ])\n * \n * // Using a decorated class\n * @RpgModule<RpgClient>({\n * engine: {\n * onStart(engine) {\n * console.log('Client started')\n * }\n * }\n * })\n * class MyClientModule {}\n * \n * provideClientModules([MyClientModule])\n * ```\n */\nexport function provideClientModules(modules: RpgClientModule[]): FactoryProvider {\n return provideModules(modules, \"client\", (modules, context) => {\n const mainModuleClient = findModules(context, 'Client')\n modules = [...mainModuleClient, ...modules]\n modules = modules.map((module) => {\n // If module is a class (constructor function), instantiate it\n // The RpgModule decorator adds properties to the prototype, which will be accessible via the instance\n if (typeof module === 'function') {\n const instance = new module() as any;\n // Copy all enumerable properties (including from prototype) to a plain object\n const moduleObj: any = {};\n for (const key in instance) {\n moduleObj[key] = instance[key];\n }\n module = moduleObj;\n }\n if ('client' in module) {\n module = module.client as any;\n }\n if (module.spritesheets) {\n const spritesheets = [...module.spritesheets];\n module.spritesheets = {\n load: (engine: RpgClientEngine) => {\n spritesheets.forEach((spritesheet) => {\n engine.addSpriteSheet(spritesheet);\n });\n },\n };\n }\n if (module.spritesheetResolver) {\n const resolver = module.spritesheetResolver;\n module.spritesheetResolver = {\n load: (engine: RpgClientEngine) => {\n engine.setSpritesheetResolver(resolver);\n },\n };\n }\n if (module.sounds) {\n const sounds = [...module.sounds];\n module.sounds = {\n load: (engine: RpgClientEngine) => {\n sounds.forEach((sound) => {\n // Check if it's a class decorated with @Sound\n if (typeof sound === 'function' || (sound && sound.constructor && sound.constructor !== Object)) {\n const metadata = getSoundMetadata(sound);\n if (metadata) {\n // Handle single sound\n if (metadata.id && metadata.sound) {\n engine.addSound({\n id: metadata.id,\n src: metadata.sound,\n loop: metadata.loop,\n volume: metadata.volume,\n });\n }\n // Handle multiple sounds\n if (metadata.sounds) {\n Object.entries(metadata.sounds).forEach(([soundId, soundSrc]) => {\n engine.addSound({\n id: soundId,\n src: soundSrc,\n loop: metadata.loop,\n volume: metadata.volume,\n });\n });\n }\n } else {\n // Not a decorated class, treat as regular sound object\n engine.addSound(sound);\n }\n } else {\n // Regular sound object\n engine.addSound(sound);\n }\n });\n },\n };\n }\n if (module.soundResolver) {\n const resolver = module.soundResolver;\n module.soundResolver = {\n load: (engine: RpgClientEngine) => {\n engine.setSoundResolver(resolver);\n },\n };\n }\n if (module.gui) {\n const gui = [...module.gui];\n module.gui = {\n load: (engine: RpgClientEngine) => {\n const guiService = inject(engine.context, RpgGui) as RpgGui;\n gui.forEach((gui) => {\n guiService.add(gui);\n });\n },\n };\n }\n if (module.componentAnimations) {\n const componentAnimations = [...module.componentAnimations];\n module.componentAnimations = {\n load: (engine: RpgClientEngine) => {\n componentAnimations.forEach((componentAnimation) => {\n engine.addComponentAnimation(componentAnimation);\n });\n },\n };\n }\n if (module.transitions) {\n const transitions = [...module.transitions];\n module.transitions = {\n load: (engine: RpgClientEngine) => {\n const guiService = inject(engine.context, RpgGui) as RpgGui;\n transitions.forEach((transition) => {\n guiService.add({\n name: transition.id,\n component: transition.component,\n data: transition.props || {}\n });\n });\n },\n };\n }\n if (module.particles) {\n const particles = [...module.particles];\n module.particles = {\n load: (engine: RpgClientEngine) => {\n particles.forEach((particle) => {\n engine.addParticle(particle);\n });\n },\n };\n }\n if (module.sprite) {\n const sprite = {...module.sprite};\n module.sprite = {\n ...sprite,\n load: (engine: RpgClientEngine) => {\n if (sprite.componentsBehind) {\n sprite.componentsBehind.forEach((component) => {\n engine.addSpriteComponentBehind(component);\n });\n }\n if (sprite.componentsInFront) {\n sprite.componentsInFront.forEach((component) => {\n engine.addSpriteComponentInFront(component);\n });\n }\n if (sprite.components) {\n Object.entries(sprite.components).forEach(([id, component]) => {\n engine.registerSpriteComponent(id, component);\n });\n }\n },\n };\n }\n return module;\n });\n return modules\n });\n}\n\nexport const GlobalConfigToken = \"GlobalConfigToken\";\n\nexport function provideGlobalConfig(config: any) {\n return {\n provide: GlobalConfigToken,\n useValue: config ?? {},\n };\n}\n\nexport function provideClientGlobalConfig(config: any = {}) {\n if (!config.keyboardControls) {\n config.keyboardControls = {\n up: 'up',\n down: 'down',\n left: 'left',\n right: 'right',\n action: 'space',\n escape: 'escape'\n }\n }\n return provideGlobalConfig(config)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAgB,qBAAqB,SAA6C;CAChF,OAAO,eAAe,SAAS,WAAW,SAAS,YAAY;EAE7D,UAAU,CAAC,GADc,YAAY,SAAS,QAChC,GAAkB,GAAG,OAAO;EAC1C,UAAU,QAAQ,KAAK,WAAW;GAGhC,IAAI,OAAO,WAAW,YAAY;IAChC,MAAM,WAAW,IAAI,OAAO;IAE5B,MAAM,YAAiB,CAAC;IACxB,KAAK,MAAM,OAAO,UAChB,UAAU,OAAO,SAAS;IAE5B,SAAS;GACX;GACA,IAAI,YAAY,QACd,SAAS,OAAO;GAElB,IAAI,OAAO,cAAc;IACvB,MAAM,eAAe,CAAC,GAAG,OAAO,YAAY;IAC5C,OAAO,eAAe,EACpB,OAAO,WAA4B;KACjC,aAAa,SAAS,gBAAgB;MACpC,OAAO,eAAe,WAAW;KACnC,CAAC;IACH,EACF;GAC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,OAAO,mBAAmB;EACxB,IAAI;EACJ,MAAM;EACN,MAAM;EACN,OAAO;EACP,QAAQ;EACR,QAAQ;CACV;CAEF,OAAO,oBAAoB,MAAM;AACnC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@signe+di@3.0.1/node_modules/@signe/di/dist/index.js
|
|
2
|
+
var DEFAULT_INSTANCE_KEY = "__default__";
|
|
3
|
+
function toTokenName(token) {
|
|
4
|
+
return typeof token === "function" ? token.name : token;
|
|
5
|
+
}
|
|
6
|
+
function toInstanceKey(name) {
|
|
7
|
+
return name ?? DEFAULT_INSTANCE_KEY;
|
|
8
|
+
}
|
|
9
|
+
function getRecord(context, token) {
|
|
10
|
+
return context.get("inject:" + toTokenName(token));
|
|
11
|
+
}
|
|
12
|
+
function ensureRecord(context, token) {
|
|
13
|
+
const key = "inject:" + toTokenName(token);
|
|
14
|
+
let record = context.get(key);
|
|
15
|
+
if (!record) record = {
|
|
16
|
+
multi: false,
|
|
17
|
+
values: /* @__PURE__ */ new Map(),
|
|
18
|
+
injected: /* @__PURE__ */ new Set()
|
|
19
|
+
};
|
|
20
|
+
context.set(key, record);
|
|
21
|
+
return record;
|
|
22
|
+
}
|
|
23
|
+
function provide(context, token, value, options = {}) {
|
|
24
|
+
const record = ensureRecord(context, token);
|
|
25
|
+
const instanceKey = toInstanceKey(options.name);
|
|
26
|
+
if (options.multi) record.multi = true;
|
|
27
|
+
if (!record.multi && instanceKey !== DEFAULT_INSTANCE_KEY) record.multi = true;
|
|
28
|
+
record.values.set(instanceKey, value);
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
function handleMissingInjection(token, options) {
|
|
32
|
+
const name = toTokenName(token);
|
|
33
|
+
if (options.name) throw new Error(`Injection provider ${name} with name ${options.name} not found`);
|
|
34
|
+
throw new Error(`Injection provider ${name} not found`);
|
|
35
|
+
}
|
|
36
|
+
function markInjected(record, key) {
|
|
37
|
+
record.injected.add(key);
|
|
38
|
+
}
|
|
39
|
+
function markAllInjected(record) {
|
|
40
|
+
for (const key of record.values.keys()) record.injected.add(key);
|
|
41
|
+
}
|
|
42
|
+
function inject(context, token, options = {}) {
|
|
43
|
+
const record = getRecord(context, token);
|
|
44
|
+
if (!record) {
|
|
45
|
+
if (options.optional) return options.multi ? [] : void 0;
|
|
46
|
+
return handleMissingInjection(token, options);
|
|
47
|
+
}
|
|
48
|
+
if (options.name) {
|
|
49
|
+
const instanceKey = toInstanceKey(options.name);
|
|
50
|
+
if (!record.values.has(instanceKey)) {
|
|
51
|
+
if (options.optional) return;
|
|
52
|
+
return handleMissingInjection(token, options);
|
|
53
|
+
}
|
|
54
|
+
const value2 = record.values.get(instanceKey);
|
|
55
|
+
markInjected(record, instanceKey);
|
|
56
|
+
return value2;
|
|
57
|
+
}
|
|
58
|
+
if (options.multi || record.multi) {
|
|
59
|
+
if (record.values.size === 0) {
|
|
60
|
+
if (options.optional) return [];
|
|
61
|
+
return handleMissingInjection(token, options);
|
|
62
|
+
}
|
|
63
|
+
markAllInjected(record);
|
|
64
|
+
return Array.from(record.values.values());
|
|
65
|
+
}
|
|
66
|
+
const value = record.values.get(DEFAULT_INSTANCE_KEY);
|
|
67
|
+
if (value === void 0) {
|
|
68
|
+
if (options.optional) return;
|
|
69
|
+
return handleMissingInjection(token, options);
|
|
70
|
+
}
|
|
71
|
+
markInjected(record, DEFAULT_INSTANCE_KEY);
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
function extractProvideOptions(source) {
|
|
75
|
+
if (!source) return;
|
|
76
|
+
const { multi, name } = source;
|
|
77
|
+
if (multi === void 0 && name === void 0) return;
|
|
78
|
+
return {
|
|
79
|
+
multi,
|
|
80
|
+
name
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function getDeps(provider) {
|
|
84
|
+
if (typeof provider === "function") return provider.deps ?? [];
|
|
85
|
+
return provider.deps ?? [];
|
|
86
|
+
}
|
|
87
|
+
function sortProviders(providers) {
|
|
88
|
+
const tokenName = (t) => typeof t === "function" ? t.name : t;
|
|
89
|
+
const map = /* @__PURE__ */ new Map();
|
|
90
|
+
for (const p of providers) {
|
|
91
|
+
const token = tokenName(typeof p === "function" ? p : p.provide);
|
|
92
|
+
const list = map.get(token);
|
|
93
|
+
if (list) list.push(p);
|
|
94
|
+
else map.set(token, [p]);
|
|
95
|
+
}
|
|
96
|
+
const result = [];
|
|
97
|
+
const visited = /* @__PURE__ */ new Set();
|
|
98
|
+
const stack = /* @__PURE__ */ new Set();
|
|
99
|
+
const visit = (token) => {
|
|
100
|
+
const name = tokenName(token);
|
|
101
|
+
if (visited.has(name)) return;
|
|
102
|
+
if (stack.has(name)) throw new Error(`Circular dependency detected for provider ${name}`);
|
|
103
|
+
stack.add(name);
|
|
104
|
+
const providersForToken = map.get(name);
|
|
105
|
+
if (providersForToken) {
|
|
106
|
+
for (const provider of providersForToken) {
|
|
107
|
+
for (const dep of getDeps(provider)) visit(dep);
|
|
108
|
+
result.push(provider);
|
|
109
|
+
}
|
|
110
|
+
visited.add(name);
|
|
111
|
+
}
|
|
112
|
+
stack.delete(name);
|
|
113
|
+
};
|
|
114
|
+
for (const p of providers) visit(typeof p === "function" ? p : p.provide);
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
async function injector(context, providers) {
|
|
118
|
+
providers = providers.flat();
|
|
119
|
+
providers = sortProviders(providers);
|
|
120
|
+
for (const provider of providers) {
|
|
121
|
+
let token;
|
|
122
|
+
let instance;
|
|
123
|
+
let options;
|
|
124
|
+
if (typeof provider === "function") {
|
|
125
|
+
token = provider;
|
|
126
|
+
instance = new provider(context);
|
|
127
|
+
options = extractProvideOptions(provider.diOptions ?? provider.di);
|
|
128
|
+
} else {
|
|
129
|
+
token = provider.provide;
|
|
130
|
+
options = extractProvideOptions(provider);
|
|
131
|
+
const provideUserClass = provider.useClass;
|
|
132
|
+
if (typeof provideUserClass === "function") instance = new provideUserClass(context);
|
|
133
|
+
else if ("useValue" in provider) instance = provider.useValue;
|
|
134
|
+
else if ("useFactory" in provider) {
|
|
135
|
+
instance = provider.useFactory?.(context);
|
|
136
|
+
if (instance instanceof Promise) instance = await instance;
|
|
137
|
+
} else if ("useExisting" in provider) instance = inject(context, provider.useExisting);
|
|
138
|
+
}
|
|
139
|
+
provide(context, token, instance, options);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
var Context = class {
|
|
143
|
+
constructor() {
|
|
144
|
+
/** Internal storage for injected values */
|
|
145
|
+
this.values = {};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Sets a value in the context
|
|
149
|
+
* @param key - Unique identifier for the value
|
|
150
|
+
* @param value - Value to store
|
|
151
|
+
*/
|
|
152
|
+
set(key, value) {
|
|
153
|
+
this.values[key] = value;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Retrieves a value from the context
|
|
157
|
+
* @param key - Unique identifier for the value
|
|
158
|
+
* @returns The stored value or undefined if not found
|
|
159
|
+
*/
|
|
160
|
+
get(key) {
|
|
161
|
+
return this.values[key];
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
//#endregion
|
|
165
|
+
export { Context, inject, injector };
|
|
166
|
+
|
|
167
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@signe+di@3.0.1/node_modules/@signe/di/dist/index.js"],"sourcesContent":["// src/inject.ts\nvar DEFAULT_INSTANCE_KEY = \"__default__\";\nfunction toTokenName(token) {\n return typeof token === \"function\" ? token.name : token;\n}\nfunction toInstanceKey(name) {\n return name ?? DEFAULT_INSTANCE_KEY;\n}\nfunction getRecord(context, token) {\n return context.get(\"inject:\" + toTokenName(token));\n}\nfunction ensureRecord(context, token) {\n const key = \"inject:\" + toTokenName(token);\n let record = context.get(key);\n if (!record) {\n record = {\n multi: false,\n values: /* @__PURE__ */ new Map(),\n injected: /* @__PURE__ */ new Set()\n };\n }\n context.set(key, record);\n return record;\n}\nfunction provide(context, token, value, options = {}) {\n const record = ensureRecord(context, token);\n const instanceKey = toInstanceKey(options.name);\n if (options.multi) {\n record.multi = true;\n }\n if (!record.multi && instanceKey !== DEFAULT_INSTANCE_KEY) {\n record.multi = true;\n }\n record.values.set(instanceKey, value);\n return value;\n}\nfunction isInjected(context, token, options = {}) {\n const record = getRecord(context, token);\n if (!record) {\n return false;\n }\n if (options.name) {\n return record.injected.has(toInstanceKey(options.name));\n }\n if (record.multi) {\n return record.injected.size > 0;\n }\n return record.injected.has(DEFAULT_INSTANCE_KEY);\n}\nfunction isProvided(context, token, options = {}) {\n const record = getRecord(context, token);\n if (!record) {\n return false;\n }\n if (options.name) {\n return record.values.has(toInstanceKey(options.name));\n }\n if (record.multi) {\n return record.values.size > 0;\n }\n return record.values.has(DEFAULT_INSTANCE_KEY);\n}\nfunction hasInstance(context, token, options = {}) {\n return isProvided(context, token, options);\n}\nfunction handleMissingInjection(token, options) {\n const name = toTokenName(token);\n if (options.name) {\n throw new Error(`Injection provider ${name} with name ${options.name} not found`);\n }\n throw new Error(`Injection provider ${name} not found`);\n}\nfunction markInjected(record, key) {\n record.injected.add(key);\n}\nfunction markAllInjected(record) {\n for (const key of record.values.keys()) {\n record.injected.add(key);\n }\n}\nfunction inject(context, token, options = {}) {\n const record = getRecord(context, token);\n if (!record) {\n if (options.optional) {\n return options.multi ? [] : void 0;\n }\n return handleMissingInjection(token, options);\n }\n if (options.name) {\n const instanceKey = toInstanceKey(options.name);\n if (!record.values.has(instanceKey)) {\n if (options.optional) {\n return void 0;\n }\n return handleMissingInjection(token, options);\n }\n const value2 = record.values.get(instanceKey);\n markInjected(record, instanceKey);\n return value2;\n }\n if (options.multi || record.multi) {\n if (record.values.size === 0) {\n if (options.optional) {\n return [];\n }\n return handleMissingInjection(token, options);\n }\n markAllInjected(record);\n return Array.from(record.values.values());\n }\n const value = record.values.get(DEFAULT_INSTANCE_KEY);\n if (value === void 0) {\n if (options.optional) {\n return void 0;\n }\n return handleMissingInjection(token, options);\n }\n markInjected(record, DEFAULT_INSTANCE_KEY);\n return value;\n}\nfunction override(providers, newProvider, options) {\n let { upsert = false, key } = options ?? {};\n if (!key) {\n key = typeof newProvider === \"function\" ? newProvider.name : newProvider.provide;\n }\n const flatProviders = providers.flat();\n const exists = flatProviders.some((provider) => {\n if (typeof provider === \"function\") {\n return provider.name === key;\n } else if (typeof provider === \"object\") {\n return provider.provide === key;\n }\n return false;\n });\n const mappedProviders = flatProviders.map((provider) => {\n if (typeof provider === \"function\" && provider.name === key) {\n return newProvider;\n } else if (typeof provider === \"object\" && provider.provide === key) {\n return newProvider;\n }\n return provider;\n });\n if (upsert && !exists) {\n mappedProviders.push(newProvider);\n }\n return mappedProviders;\n}\nfunction findProviders(providers, name) {\n const results = [];\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n results.push(...findProviders(provider, name));\n } else if (findProvider(provider, name)) {\n results.push(provider);\n }\n }\n return results;\n}\nfunction findProvider(providers, name) {\n if (!Array.isArray(providers)) {\n if (typeof providers === \"object\" && \"provide\" in providers) {\n const provider = providers;\n const providerName = typeof provider.provide === \"function\" ? provider.provide.name : provider.provide;\n if (name instanceof RegExp) {\n if (name.test(providerName)) return providers;\n } else {\n if (providerName === name) return providers;\n }\n }\n return null;\n }\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n const found = findProvider(provider, name);\n if (found) return found;\n continue;\n }\n if (typeof provider === \"object\" && \"provide\" in provider) {\n const providerName = typeof provider.provide === \"function\" ? provider.provide.name : provider.provide;\n if (name instanceof RegExp) {\n if (name.test(providerName)) return provider;\n } else {\n if (providerName === name) return provider;\n }\n }\n }\n return null;\n}\n\n// src/merge-config.ts\nfunction processProvider(mergedConfig, baseConfig, provider) {\n if (Array.isArray(provider)) {\n for (const nestedProvider of provider) {\n processProvider(mergedConfig, baseConfig, nestedProvider);\n }\n return;\n }\n const existingProvider = findProvider(baseConfig.providers, provider.provide);\n if (existingProvider) {\n mergedConfig.providers = override(mergedConfig.providers, provider);\n } else {\n mergedConfig.providers.push(provider);\n }\n}\nfunction mergeConfig(baseConfig, config) {\n const mergedConfig = {\n ...baseConfig,\n ...config,\n providers: [...baseConfig.providers]\n // Start with a copy of base providers\n };\n for (const provider of config.providers) {\n processProvider(mergedConfig, baseConfig, provider);\n }\n return mergedConfig;\n}\n\n// src/provider.ts\nfunction extractProvideOptions(source) {\n if (!source) {\n return void 0;\n }\n const { multi, name } = source;\n if (multi === void 0 && name === void 0) {\n return void 0;\n }\n return { multi, name };\n}\nfunction getDeps(provider) {\n if (typeof provider === \"function\") {\n return provider.deps ?? [];\n }\n return provider.deps ?? [];\n}\nfunction sortProviders(providers) {\n const tokenName = (t) => typeof t === \"function\" ? t.name : t;\n const map = /* @__PURE__ */ new Map();\n for (const p of providers) {\n const token = tokenName(typeof p === \"function\" ? p : p.provide);\n const list = map.get(token);\n if (list) {\n list.push(p);\n } else {\n map.set(token, [p]);\n }\n }\n const result = [];\n const visited = /* @__PURE__ */ new Set();\n const stack = /* @__PURE__ */ new Set();\n const visit = (token) => {\n const name = tokenName(token);\n if (visited.has(name)) return;\n if (stack.has(name)) {\n throw new Error(`Circular dependency detected for provider ${name}`);\n }\n stack.add(name);\n const providersForToken = map.get(name);\n if (providersForToken) {\n for (const provider of providersForToken) {\n for (const dep of getDeps(provider)) {\n visit(dep);\n }\n result.push(provider);\n }\n visited.add(name);\n }\n stack.delete(name);\n };\n for (const p of providers) {\n const token = typeof p === \"function\" ? p : p.provide;\n visit(token);\n }\n return result;\n}\nasync function injector(context, providers) {\n providers = providers.flat();\n providers = sortProviders(providers);\n for (const provider of providers) {\n let token;\n let instance;\n let options;\n if (typeof provider === \"function\") {\n token = provider;\n instance = new provider(context);\n const diOptions = extractProvideOptions(provider.diOptions ?? provider.di);\n options = diOptions;\n } else {\n token = provider.provide;\n options = extractProvideOptions(provider);\n const provideUserClass = provider.useClass;\n const isClass = typeof provideUserClass === \"function\";\n if (isClass) {\n instance = new provideUserClass(context);\n } else if (\"useValue\" in provider) {\n instance = provider.useValue;\n } else if (\"useFactory\" in provider) {\n instance = provider.useFactory?.(context);\n if (instance instanceof Promise) {\n instance = await instance;\n }\n } else if (\"useExisting\" in provider) {\n instance = inject(context, provider.useExisting);\n }\n }\n provide(context, token, instance, options);\n }\n}\n\n// src/context.ts\nvar Context = class {\n constructor() {\n /** Internal storage for injected values */\n this.values = {};\n }\n /**\n * Sets a value in the context\n * @param key - Unique identifier for the value\n * @param value - Value to store\n */\n set(key, value) {\n this.values[key] = value;\n }\n /**\n * Retrieves a value from the context\n * @param key - Unique identifier for the value\n * @returns The stored value or undefined if not found\n */\n get(key) {\n return this.values[key];\n }\n};\nexport {\n Context,\n findProvider,\n findProviders,\n hasInstance,\n inject,\n injector,\n isInjected,\n isProvided,\n mergeConfig,\n override,\n provide\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";AACA,IAAI,uBAAuB;AAC3B,SAAS,YAAY,OAAO;CAC1B,OAAO,OAAO,UAAU,aAAa,MAAM,OAAO;AACpD;AACA,SAAS,cAAc,MAAM;CAC3B,OAAO,QAAQ;AACjB;AACA,SAAS,UAAU,SAAS,OAAO;CACjC,OAAO,QAAQ,IAAI,YAAY,YAAY,KAAK,CAAC;AACnD;AACA,SAAS,aAAa,SAAS,OAAO;CACpC,MAAM,MAAM,YAAY,YAAY,KAAK;CACzC,IAAI,SAAS,QAAQ,IAAI,GAAG;CAC5B,IAAI,CAAC,QACH,SAAS;EACP,OAAO;EACP,wBAAwB,IAAI,IAAI;EAChC,0BAA0B,IAAI,IAAI;CACpC;CAEF,QAAQ,IAAI,KAAK,MAAM;CACvB,OAAO;AACT;AACA,SAAS,QAAQ,SAAS,OAAO,OAAO,UAAU,CAAC,GAAG;CACpD,MAAM,SAAS,aAAa,SAAS,KAAK;CAC1C,MAAM,cAAc,cAAc,QAAQ,IAAI;CAC9C,IAAI,QAAQ,OACV,OAAO,QAAQ;C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