@vived/core 1.4.2 → 1.4.4
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/README.md +142 -20
- package/dist/cjs/AppObject/AppObject.js +53 -0
- package/dist/cjs/AppObject/AppObject.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectComponent.js +78 -0
- package/dist/cjs/AppObject/AppObjectComponent.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectController.js +22 -0
- package/dist/cjs/AppObject/AppObjectController.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectEntity.js +52 -0
- package/dist/cjs/AppObject/AppObjectEntity.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectEntityRepo.js +75 -1
- package/dist/cjs/AppObject/AppObjectEntityRepo.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectPM.js +46 -0
- package/dist/cjs/AppObject/AppObjectPM.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectRepo.js +20 -0
- package/dist/cjs/AppObject/AppObjectRepo.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectUC.js +23 -0
- package/dist/cjs/AppObject/AppObjectUC.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectView.js +22 -0
- package/dist/cjs/AppObject/AppObjectView.js.map +1 -1
- package/dist/cjs/AppObject/getSingletonComponent.js +19 -0
- package/dist/cjs/AppObject/getSingletonComponent.js.map +1 -1
- package/dist/cjs/Entities/MemoizedAngle.js +21 -0
- package/dist/cjs/Entities/MemoizedAngle.js.map +1 -1
- package/dist/cjs/Entities/MemoizedBoolean.js +21 -0
- package/dist/cjs/Entities/MemoizedBoolean.js.map +1 -1
- package/dist/cjs/Entities/MemoizedColor.js +21 -0
- package/dist/cjs/Entities/MemoizedColor.js.map +1 -1
- package/dist/cjs/Entities/MemoizedNumber.js +21 -0
- package/dist/cjs/Entities/MemoizedNumber.js.map +1 -1
- package/dist/cjs/Entities/MemoizedQuaternion.js +21 -0
- package/dist/cjs/Entities/MemoizedQuaternion.js.map +1 -1
- package/dist/cjs/Entities/MemoizedString.js +21 -0
- package/dist/cjs/Entities/MemoizedString.js.map +1 -1
- package/dist/cjs/Entities/MemoizedVector2.js +21 -0
- package/dist/cjs/Entities/MemoizedVector2.js.map +1 -1
- package/dist/cjs/Entities/MemoizedVector3.js +21 -0
- package/dist/cjs/Entities/MemoizedVector3.js.map +1 -1
- package/dist/cjs/Entities/ObservableEntity.js +17 -0
- package/dist/cjs/Entities/ObservableEntity.js.map +1 -1
- package/dist/cjs/Entities/ObserverList.js +21 -0
- package/dist/cjs/Entities/ObserverList.js.map +1 -1
- package/dist/cjs/Entities/RangedNumber.js +29 -0
- package/dist/cjs/Entities/RangedNumber.js.map +1 -1
- package/dist/cjs/ExampleFeature/Adapters/examplePmAdapter.js +64 -0
- package/dist/cjs/ExampleFeature/Adapters/examplePmAdapter.js.map +1 -0
- package/dist/cjs/ExampleFeature/Adapters/exampleSingletonPmAdapter.js +60 -0
- package/dist/cjs/ExampleFeature/Adapters/exampleSingletonPmAdapter.js.map +1 -0
- package/dist/cjs/ExampleFeature/Adapters/index.js +19 -0
- package/dist/cjs/ExampleFeature/Adapters/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Controllers/index.js +19 -0
- package/dist/cjs/ExampleFeature/Controllers/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Controllers/setExampleText.js +48 -0
- package/dist/cjs/ExampleFeature/Controllers/setExampleText.js.map +1 -0
- package/dist/cjs/ExampleFeature/Controllers/toggleExampleBoolean.js +47 -0
- package/dist/cjs/ExampleFeature/Controllers/toggleExampleBoolean.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleEntity.js +90 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleEntity.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleRepo.js +113 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleRepo.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleSingletonEntity.js +69 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleSingletonEntity.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/index.js +20 -0
- package/dist/cjs/ExampleFeature/Entities/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Factory/index.js +18 -0
- package/dist/cjs/ExampleFeature/Factory/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Factory/setupExampleFeature.js +29 -0
- package/dist/cjs/ExampleFeature/Factory/setupExampleFeature.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockEditExampleStringUC.js +47 -0
- package/dist/cjs/ExampleFeature/Mocks/MockEditExampleStringUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExamplePM.js +48 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExamplePM.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExampleSingletonPM.js +59 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExampleSingletonPM.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js +57 -0
- package/dist/cjs/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/index.js +21 -0
- package/dist/cjs/ExampleFeature/Mocks/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/PMs/ExamplePM.js +97 -0
- package/dist/cjs/ExampleFeature/PMs/ExamplePM.js.map +1 -0
- package/dist/cjs/ExampleFeature/PMs/ExampleSingletonPM.js +102 -0
- package/dist/cjs/ExampleFeature/PMs/ExampleSingletonPM.js.map +1 -0
- package/dist/cjs/ExampleFeature/PMs/index.js +19 -0
- package/dist/cjs/ExampleFeature/PMs/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/UCs/EditExampleStringUC.js +87 -0
- package/dist/cjs/ExampleFeature/UCs/EditExampleStringUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/UCs/ToggleExampleBooleanUC.js +79 -0
- package/dist/cjs/ExampleFeature/UCs/ToggleExampleBooleanUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/UCs/index.js +19 -0
- package/dist/cjs/ExampleFeature/UCs/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/index.js +24 -0
- package/dist/cjs/ExampleFeature/index.js.map +1 -0
- package/dist/cjs/Types/PmAdapter.js.map +1 -1
- package/dist/cjs/Types/SingletonPmAdapter.js.map +1 -1
- package/dist/cjs/ValueObjects/Angle.js +1 -1
- package/dist/cjs/ValueObjects/Angle.js.map +1 -1
- package/dist/cjs/ValueObjects/LineSegment2D.js +6 -6
- package/dist/cjs/ValueObjects/LineSegment2D.js.map +1 -1
- package/dist/cjs/ValueObjects/Matrix.js +6 -6
- package/dist/cjs/ValueObjects/Matrix.js.map +1 -1
- package/dist/cjs/ValueObjects/Quaternion.js +17 -17
- package/dist/cjs/ValueObjects/Quaternion.js.map +1 -1
- package/dist/cjs/ValueObjects/Vector2.js +15 -8
- package/dist/cjs/ValueObjects/Vector2.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/AppObject/AppObject.js +53 -0
- package/dist/esm/AppObject/AppObject.js.map +1 -1
- package/dist/esm/AppObject/AppObjectComponent.js +78 -0
- package/dist/esm/AppObject/AppObjectComponent.js.map +1 -1
- package/dist/esm/AppObject/AppObjectController.js +22 -0
- package/dist/esm/AppObject/AppObjectController.js.map +1 -1
- package/dist/esm/AppObject/AppObjectEntity.js +52 -0
- package/dist/esm/AppObject/AppObjectEntity.js.map +1 -1
- package/dist/esm/AppObject/AppObjectEntityRepo.js +75 -1
- package/dist/esm/AppObject/AppObjectEntityRepo.js.map +1 -1
- package/dist/esm/AppObject/AppObjectPM.js +46 -0
- package/dist/esm/AppObject/AppObjectPM.js.map +1 -1
- package/dist/esm/AppObject/AppObjectRepo.js +20 -0
- package/dist/esm/AppObject/AppObjectRepo.js.map +1 -1
- package/dist/esm/AppObject/AppObjectUC.js +24 -1
- package/dist/esm/AppObject/AppObjectUC.js.map +1 -1
- package/dist/esm/AppObject/AppObjectView.js +23 -1
- package/dist/esm/AppObject/AppObjectView.js.map +1 -1
- package/dist/esm/AppObject/getSingletonComponent.js +19 -0
- package/dist/esm/AppObject/getSingletonComponent.js.map +1 -1
- package/dist/esm/Entities/MemoizedAngle.js +21 -0
- package/dist/esm/Entities/MemoizedAngle.js.map +1 -1
- package/dist/esm/Entities/MemoizedBoolean.js +21 -0
- package/dist/esm/Entities/MemoizedBoolean.js.map +1 -1
- package/dist/esm/Entities/MemoizedColor.js +21 -0
- package/dist/esm/Entities/MemoizedColor.js.map +1 -1
- package/dist/esm/Entities/MemoizedNumber.js +21 -0
- package/dist/esm/Entities/MemoizedNumber.js.map +1 -1
- package/dist/esm/Entities/MemoizedQuaternion.js +21 -0
- package/dist/esm/Entities/MemoizedQuaternion.js.map +1 -1
- package/dist/esm/Entities/MemoizedString.js +21 -0
- package/dist/esm/Entities/MemoizedString.js.map +1 -1
- package/dist/esm/Entities/MemoizedVector2.js +21 -0
- package/dist/esm/Entities/MemoizedVector2.js.map +1 -1
- package/dist/esm/Entities/MemoizedVector3.js +21 -0
- package/dist/esm/Entities/MemoizedVector3.js.map +1 -1
- package/dist/esm/Entities/ObservableEntity.js +17 -0
- package/dist/esm/Entities/ObservableEntity.js.map +1 -1
- package/dist/esm/Entities/ObserverList.js +21 -0
- package/dist/esm/Entities/ObserverList.js.map +1 -1
- package/dist/esm/Entities/RangedNumber.js +29 -0
- package/dist/esm/Entities/RangedNumber.js.map +1 -1
- package/dist/esm/ExampleFeature/Adapters/examplePmAdapter.js +61 -0
- package/dist/esm/ExampleFeature/Adapters/examplePmAdapter.js.map +1 -0
- package/dist/esm/ExampleFeature/Adapters/exampleSingletonPmAdapter.js +57 -0
- package/dist/esm/ExampleFeature/Adapters/exampleSingletonPmAdapter.js.map +1 -0
- package/dist/esm/ExampleFeature/Adapters/index.js +3 -0
- package/dist/esm/ExampleFeature/Adapters/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Controllers/index.js +3 -0
- package/dist/esm/ExampleFeature/Controllers/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Controllers/setExampleText.js +45 -0
- package/dist/esm/ExampleFeature/Controllers/setExampleText.js.map +1 -0
- package/dist/esm/ExampleFeature/Controllers/toggleExampleBoolean.js +44 -0
- package/dist/esm/ExampleFeature/Controllers/toggleExampleBoolean.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/ExampleEntity.js +85 -0
- package/dist/esm/ExampleFeature/Entities/ExampleEntity.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/ExampleRepo.js +108 -0
- package/dist/esm/ExampleFeature/Entities/ExampleRepo.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/ExampleSingletonEntity.js +64 -0
- package/dist/esm/ExampleFeature/Entities/ExampleSingletonEntity.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/index.js +4 -0
- package/dist/esm/ExampleFeature/Entities/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Factory/index.js +2 -0
- package/dist/esm/ExampleFeature/Factory/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Factory/setupExampleFeature.js +26 -0
- package/dist/esm/ExampleFeature/Factory/setupExampleFeature.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockEditExampleStringUC.js +43 -0
- package/dist/esm/ExampleFeature/Mocks/MockEditExampleStringUC.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockExamplePM.js +44 -0
- package/dist/esm/ExampleFeature/Mocks/MockExamplePM.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockExampleSingletonPM.js +54 -0
- package/dist/esm/ExampleFeature/Mocks/MockExampleSingletonPM.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js +52 -0
- package/dist/esm/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/index.js +5 -0
- package/dist/esm/ExampleFeature/Mocks/index.js.map +1 -0
- package/dist/esm/ExampleFeature/PMs/ExamplePM.js +92 -0
- package/dist/esm/ExampleFeature/PMs/ExamplePM.js.map +1 -0
- package/dist/esm/ExampleFeature/PMs/ExampleSingletonPM.js +97 -0
- package/dist/esm/ExampleFeature/PMs/ExampleSingletonPM.js.map +1 -0
- package/dist/esm/ExampleFeature/PMs/index.js +3 -0
- package/dist/esm/ExampleFeature/PMs/index.js.map +1 -0
- package/dist/esm/ExampleFeature/UCs/EditExampleStringUC.js +82 -0
- package/dist/esm/ExampleFeature/UCs/EditExampleStringUC.js.map +1 -0
- package/dist/esm/ExampleFeature/UCs/ToggleExampleBooleanUC.js +74 -0
- package/dist/esm/ExampleFeature/UCs/ToggleExampleBooleanUC.js.map +1 -0
- package/dist/esm/ExampleFeature/UCs/index.js +3 -0
- package/dist/esm/ExampleFeature/UCs/index.js.map +1 -0
- package/dist/esm/ExampleFeature/index.js +8 -0
- package/dist/esm/ExampleFeature/index.js.map +1 -0
- package/dist/esm/Types/PmAdapter.js.map +1 -1
- package/dist/esm/Types/SingletonPmAdapter.js.map +1 -1
- package/dist/esm/ValueObjects/Angle.js +1 -1
- package/dist/esm/ValueObjects/Angle.js.map +1 -1
- package/dist/esm/ValueObjects/LineSegment2D.js +6 -6
- package/dist/esm/ValueObjects/LineSegment2D.js.map +1 -1
- package/dist/esm/ValueObjects/Matrix.js +6 -6
- package/dist/esm/ValueObjects/Matrix.js.map +1 -1
- package/dist/esm/ValueObjects/Quaternion.js +17 -17
- package/dist/esm/ValueObjects/Quaternion.js.map +1 -1
- package/dist/esm/ValueObjects/Vector2.js +15 -8
- package/dist/esm/ValueObjects/Vector2.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/types/AppObject/AppObject.d.ts +42 -0
- package/dist/types/AppObject/AppObject.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectComponent.d.ts +80 -0
- package/dist/types/AppObject/AppObjectComponent.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectController.d.ts +22 -0
- package/dist/types/AppObject/AppObjectController.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectEntity.d.ts +55 -0
- package/dist/types/AppObject/AppObjectEntity.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectEntityRepo.d.ts +75 -0
- package/dist/types/AppObject/AppObjectEntityRepo.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectPM.d.ts +53 -0
- package/dist/types/AppObject/AppObjectPM.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectRepo.d.ts +124 -0
- package/dist/types/AppObject/AppObjectRepo.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectUC.d.ts +23 -0
- package/dist/types/AppObject/AppObjectUC.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectView.d.ts +22 -0
- package/dist/types/AppObject/AppObjectView.d.ts.map +1 -1
- package/dist/types/AppObject/getSingletonComponent.d.ts +19 -0
- package/dist/types/AppObject/getSingletonComponent.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedAngle.d.ts +21 -0
- package/dist/types/Entities/MemoizedAngle.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedBoolean.d.ts +21 -0
- package/dist/types/Entities/MemoizedBoolean.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedColor.d.ts +21 -0
- package/dist/types/Entities/MemoizedColor.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedNumber.d.ts +21 -0
- package/dist/types/Entities/MemoizedNumber.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedQuaternion.d.ts +21 -0
- package/dist/types/Entities/MemoizedQuaternion.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedString.d.ts +21 -0
- package/dist/types/Entities/MemoizedString.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedVector2.d.ts +21 -0
- package/dist/types/Entities/MemoizedVector2.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedVector3.d.ts +21 -0
- package/dist/types/Entities/MemoizedVector3.d.ts.map +1 -1
- package/dist/types/Entities/ObservableEntity.d.ts +20 -0
- package/dist/types/Entities/ObservableEntity.d.ts.map +1 -1
- package/dist/types/Entities/ObserverList.d.ts +21 -0
- package/dist/types/Entities/ObserverList.d.ts.map +1 -1
- package/dist/types/Entities/RangedNumber.d.ts +37 -0
- package/dist/types/Entities/RangedNumber.d.ts.map +1 -1
- package/dist/types/ExampleFeature/Adapters/examplePmAdapter.d.ts +29 -0
- package/dist/types/ExampleFeature/Adapters/examplePmAdapter.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Adapters/exampleSingletonPmAdapter.d.ts +31 -0
- package/dist/types/ExampleFeature/Adapters/exampleSingletonPmAdapter.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Adapters/index.d.ts +3 -0
- package/dist/types/ExampleFeature/Adapters/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Controllers/index.d.ts +3 -0
- package/dist/types/ExampleFeature/Controllers/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Controllers/setExampleText.d.ts +35 -0
- package/dist/types/ExampleFeature/Controllers/setExampleText.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Controllers/toggleExampleBoolean.d.ts +34 -0
- package/dist/types/ExampleFeature/Controllers/toggleExampleBoolean.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/ExampleEntity.d.ts +55 -0
- package/dist/types/ExampleFeature/Entities/ExampleEntity.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/ExampleRepo.d.ts +62 -0
- package/dist/types/ExampleFeature/Entities/ExampleRepo.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/ExampleSingletonEntity.d.ts +43 -0
- package/dist/types/ExampleFeature/Entities/ExampleSingletonEntity.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/index.d.ts +4 -0
- package/dist/types/ExampleFeature/Entities/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Factory/index.d.ts +2 -0
- package/dist/types/ExampleFeature/Factory/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Factory/setupExampleFeature.d.ts +17 -0
- package/dist/types/ExampleFeature/Factory/setupExampleFeature.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockEditExampleStringUC.d.ts +42 -0
- package/dist/types/ExampleFeature/Mocks/MockEditExampleStringUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockExamplePM.d.ts +41 -0
- package/dist/types/ExampleFeature/Mocks/MockExamplePM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockExampleSingletonPM.d.ts +49 -0
- package/dist/types/ExampleFeature/Mocks/MockExampleSingletonPM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockToggleExampleBooleanUC.d.ts +47 -0
- package/dist/types/ExampleFeature/Mocks/MockToggleExampleBooleanUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/index.d.ts +5 -0
- package/dist/types/ExampleFeature/Mocks/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/PMs/ExamplePM.d.ts +42 -0
- package/dist/types/ExampleFeature/PMs/ExamplePM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/PMs/ExampleSingletonPM.d.ts +52 -0
- package/dist/types/ExampleFeature/PMs/ExampleSingletonPM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/PMs/index.d.ts +3 -0
- package/dist/types/ExampleFeature/PMs/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/UCs/EditExampleStringUC.d.ts +52 -0
- package/dist/types/ExampleFeature/UCs/EditExampleStringUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/UCs/ToggleExampleBooleanUC.d.ts +44 -0
- package/dist/types/ExampleFeature/UCs/ToggleExampleBooleanUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/UCs/index.d.ts +3 -0
- package/dist/types/ExampleFeature/UCs/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/index.d.ts +8 -0
- package/dist/types/ExampleFeature/index.d.ts.map +1 -0
- package/dist/types/Types/PmAdapter.d.ts +60 -0
- package/dist/types/Types/PmAdapter.d.ts.map +1 -1
- package/dist/types/Types/SingletonPmAdapter.d.ts +55 -0
- package/dist/types/Types/SingletonPmAdapter.d.ts.map +1 -1
- package/dist/types/ValueObjects/Angle.d.ts +1 -1
- package/dist/types/ValueObjects/Matrix.d.ts +5 -5
- package/dist/types/ValueObjects/Matrix.d.ts.map +1 -1
- package/dist/types/ValueObjects/Quaternion.d.ts +17 -17
- package/dist/types/ValueObjects/Vector2.d.ts +8 -3
- package/dist/types/ValueObjects/Vector2.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/cjs/AppObject/AppObject.test.js +0 -113
- package/dist/cjs/AppObject/AppObject.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectComponent.test.js +0 -132
- package/dist/cjs/AppObject/AppObjectComponent.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectEntity.test.js +0 -108
- package/dist/cjs/AppObject/AppObjectEntity.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectEntityRepo.test.js +0 -149
- package/dist/cjs/AppObject/AppObjectEntityRepo.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectPM.test.js +0 -103
- package/dist/cjs/AppObject/AppObjectPM.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectRepo.test.js +0 -213
- package/dist/cjs/AppObject/AppObjectRepo.test.js.map +0 -1
- package/dist/cjs/AppObject/getSingletonComponent.test.js +0 -13
- package/dist/cjs/AppObject/getSingletonComponent.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedAngle.test.js +0 -30
- package/dist/cjs/Entities/MemoizedAngle.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedBoolean.test.js +0 -34
- package/dist/cjs/Entities/MemoizedBoolean.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedColor.test.js +0 -32
- package/dist/cjs/Entities/MemoizedColor.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedNumber.test.js +0 -29
- package/dist/cjs/Entities/MemoizedNumber.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedQuaternion.test.js +0 -32
- package/dist/cjs/Entities/MemoizedQuaternion.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedString.test.js +0 -29
- package/dist/cjs/Entities/MemoizedString.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedVector2.test.js +0 -32
- package/dist/cjs/Entities/MemoizedVector2.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedVector3.test.js +0 -32
- package/dist/cjs/Entities/MemoizedVector3.test.js.map +0 -1
- package/dist/cjs/Entities/ObservableEntity.test.js +0 -25
- package/dist/cjs/Entities/ObservableEntity.test.js.map +0 -1
- package/dist/cjs/Entities/ObserverList.test.js +0 -44
- package/dist/cjs/Entities/ObserverList.test.js.map +0 -1
- package/dist/cjs/Entities/RangedNumber.test.js +0 -96
- package/dist/cjs/Entities/RangedNumber.test.js.map +0 -1
- package/dist/cjs/Utilities/LengthConverters.test.js +0 -24
- package/dist/cjs/Utilities/LengthConverters.test.js.map +0 -1
- package/dist/cjs/Utilities/LerpNumber.test.js +0 -90
- package/dist/cjs/Utilities/LerpNumber.test.js.map +0 -1
- package/dist/cjs/Utilities/addAlphaToHex.test.js +0 -34
- package/dist/cjs/Utilities/addAlphaToHex.test.js.map +0 -1
- package/dist/cjs/Utilities/alphaToHex.test.js +0 -75
- package/dist/cjs/Utilities/alphaToHex.test.js.map +0 -1
- package/dist/cjs/Utilities/degreesToRadians.test.js +0 -9
- package/dist/cjs/Utilities/degreesToRadians.test.js.map +0 -1
- package/dist/cjs/Utilities/easeFunctions.test.js +0 -209
- package/dist/cjs/Utilities/easeFunctions.test.js.map +0 -1
- package/dist/cjs/Utilities/interpolateNumber.test.js +0 -26
- package/dist/cjs/Utilities/interpolateNumber.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Angle.test.js +0 -28
- package/dist/cjs/ValueObjects/Angle.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Color.test.js +0 -147
- package/dist/cjs/ValueObjects/Color.test.js.map +0 -1
- package/dist/cjs/ValueObjects/LineSegment2D.test.js +0 -102
- package/dist/cjs/ValueObjects/LineSegment2D.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Matrix.test.js +0 -385
- package/dist/cjs/ValueObjects/Matrix.test.js.map +0 -1
- package/dist/cjs/ValueObjects/ParametricLine.test.js +0 -126
- package/dist/cjs/ValueObjects/ParametricLine.test.js.map +0 -1
- package/dist/cjs/ValueObjects/ParametricPlane.test.js +0 -101
- package/dist/cjs/ValueObjects/ParametricPlane.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Quaternion.test.js +0 -240
- package/dist/cjs/ValueObjects/Quaternion.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Rectangle.test.js +0 -32
- package/dist/cjs/ValueObjects/Rectangle.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Vector2.test.js +0 -136
- package/dist/cjs/ValueObjects/Vector2.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Vector3.test.js +0 -188
- package/dist/cjs/ValueObjects/Vector3.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Version.test.js +0 -310
- package/dist/cjs/ValueObjects/Version.test.js.map +0 -1
- package/dist/esm/AppObject/AppObject.test.js +0 -110
- package/dist/esm/AppObject/AppObject.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectComponent.test.js +0 -130
- package/dist/esm/AppObject/AppObjectComponent.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectEntity.test.js +0 -106
- package/dist/esm/AppObject/AppObjectEntity.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectEntityRepo.test.js +0 -147
- package/dist/esm/AppObject/AppObjectEntityRepo.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectPM.test.js +0 -101
- package/dist/esm/AppObject/AppObjectPM.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectRepo.test.js +0 -211
- package/dist/esm/AppObject/AppObjectRepo.test.js.map +0 -1
- package/dist/esm/AppObject/getSingletonComponent.test.js +0 -11
- package/dist/esm/AppObject/getSingletonComponent.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedAngle.test.js +0 -28
- package/dist/esm/Entities/MemoizedAngle.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedBoolean.test.js +0 -32
- package/dist/esm/Entities/MemoizedBoolean.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedColor.test.js +0 -30
- package/dist/esm/Entities/MemoizedColor.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedNumber.test.js +0 -27
- package/dist/esm/Entities/MemoizedNumber.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedQuaternion.test.js +0 -30
- package/dist/esm/Entities/MemoizedQuaternion.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedString.test.js +0 -27
- package/dist/esm/Entities/MemoizedString.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedVector2.test.js +0 -30
- package/dist/esm/Entities/MemoizedVector2.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedVector3.test.js +0 -30
- package/dist/esm/Entities/MemoizedVector3.test.js.map +0 -1
- package/dist/esm/Entities/ObservableEntity.test.js +0 -23
- package/dist/esm/Entities/ObservableEntity.test.js.map +0 -1
- package/dist/esm/Entities/ObserverList.test.js +0 -42
- package/dist/esm/Entities/ObserverList.test.js.map +0 -1
- package/dist/esm/Entities/RangedNumber.test.js +0 -94
- package/dist/esm/Entities/RangedNumber.test.js.map +0 -1
- package/dist/esm/Utilities/LengthConverters.test.js +0 -22
- package/dist/esm/Utilities/LengthConverters.test.js.map +0 -1
- package/dist/esm/Utilities/LerpNumber.test.js +0 -88
- package/dist/esm/Utilities/LerpNumber.test.js.map +0 -1
- package/dist/esm/Utilities/addAlphaToHex.test.js +0 -32
- package/dist/esm/Utilities/addAlphaToHex.test.js.map +0 -1
- package/dist/esm/Utilities/alphaToHex.test.js +0 -73
- package/dist/esm/Utilities/alphaToHex.test.js.map +0 -1
- package/dist/esm/Utilities/degreesToRadians.test.js +0 -7
- package/dist/esm/Utilities/degreesToRadians.test.js.map +0 -1
- package/dist/esm/Utilities/easeFunctions.test.js +0 -207
- package/dist/esm/Utilities/easeFunctions.test.js.map +0 -1
- package/dist/esm/Utilities/interpolateNumber.test.js +0 -24
- package/dist/esm/Utilities/interpolateNumber.test.js.map +0 -1
- package/dist/esm/ValueObjects/Angle.test.js +0 -26
- package/dist/esm/ValueObjects/Angle.test.js.map +0 -1
- package/dist/esm/ValueObjects/Color.test.js +0 -145
- package/dist/esm/ValueObjects/Color.test.js.map +0 -1
- package/dist/esm/ValueObjects/LineSegment2D.test.js +0 -100
- package/dist/esm/ValueObjects/LineSegment2D.test.js.map +0 -1
- package/dist/esm/ValueObjects/Matrix.test.js +0 -383
- package/dist/esm/ValueObjects/Matrix.test.js.map +0 -1
- package/dist/esm/ValueObjects/ParametricLine.test.js +0 -124
- package/dist/esm/ValueObjects/ParametricLine.test.js.map +0 -1
- package/dist/esm/ValueObjects/ParametricPlane.test.js +0 -99
- package/dist/esm/ValueObjects/ParametricPlane.test.js.map +0 -1
- package/dist/esm/ValueObjects/Quaternion.test.js +0 -238
- package/dist/esm/ValueObjects/Quaternion.test.js.map +0 -1
- package/dist/esm/ValueObjects/Rectangle.test.js +0 -30
- package/dist/esm/ValueObjects/Rectangle.test.js.map +0 -1
- package/dist/esm/ValueObjects/Vector2.test.js +0 -134
- package/dist/esm/ValueObjects/Vector2.test.js.map +0 -1
- package/dist/esm/ValueObjects/Vector3.test.js +0 -186
- package/dist/esm/ValueObjects/Vector3.test.js.map +0 -1
- package/dist/esm/ValueObjects/Version.test.js +0 -308
- package/dist/esm/ValueObjects/Version.test.js.map +0 -1
- package/dist/types/AppObject/AppObject.test.d.ts +0 -7
- package/dist/types/AppObject/AppObject.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectComponent.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectComponent.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectEntity.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectEntity.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectEntityRepo.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectEntityRepo.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectPM.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectPM.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectRepo.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectRepo.test.d.ts.map +0 -1
- package/dist/types/AppObject/getSingletonComponent.test.d.ts +0 -2
- package/dist/types/AppObject/getSingletonComponent.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedAngle.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedAngle.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedBoolean.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedBoolean.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedColor.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedColor.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedNumber.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedNumber.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedQuaternion.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedQuaternion.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedString.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedString.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedVector2.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedVector2.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedVector3.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedVector3.test.d.ts.map +0 -1
- package/dist/types/Entities/ObservableEntity.test.d.ts +0 -2
- package/dist/types/Entities/ObservableEntity.test.d.ts.map +0 -1
- package/dist/types/Entities/ObserverList.test.d.ts +0 -2
- package/dist/types/Entities/ObserverList.test.d.ts.map +0 -1
- package/dist/types/Entities/RangedNumber.test.d.ts +0 -2
- package/dist/types/Entities/RangedNumber.test.d.ts.map +0 -1
- package/dist/types/Utilities/LengthConverters.test.d.ts +0 -2
- package/dist/types/Utilities/LengthConverters.test.d.ts.map +0 -1
- package/dist/types/Utilities/LerpNumber.test.d.ts +0 -2
- package/dist/types/Utilities/LerpNumber.test.d.ts.map +0 -1
- package/dist/types/Utilities/addAlphaToHex.test.d.ts +0 -2
- package/dist/types/Utilities/addAlphaToHex.test.d.ts.map +0 -1
- package/dist/types/Utilities/alphaToHex.test.d.ts +0 -2
- package/dist/types/Utilities/alphaToHex.test.d.ts.map +0 -1
- package/dist/types/Utilities/degreesToRadians.test.d.ts +0 -2
- package/dist/types/Utilities/degreesToRadians.test.d.ts.map +0 -1
- package/dist/types/Utilities/easeFunctions.test.d.ts +0 -2
- package/dist/types/Utilities/easeFunctions.test.d.ts.map +0 -1
- package/dist/types/Utilities/interpolateNumber.test.d.ts +0 -2
- package/dist/types/Utilities/interpolateNumber.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Angle.test.d.ts +0 -2
- package/dist/types/ValueObjects/Angle.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Color.test.d.ts +0 -2
- package/dist/types/ValueObjects/Color.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/LineSegment2D.test.d.ts +0 -2
- package/dist/types/ValueObjects/LineSegment2D.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Matrix.test.d.ts +0 -2
- package/dist/types/ValueObjects/Matrix.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/ParametricLine.test.d.ts +0 -2
- package/dist/types/ValueObjects/ParametricLine.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/ParametricPlane.test.d.ts +0 -2
- package/dist/types/ValueObjects/ParametricPlane.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Quaternion.test.d.ts +0 -2
- package/dist/types/ValueObjects/Quaternion.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Rectangle.test.d.ts +0 -2
- package/dist/types/ValueObjects/Rectangle.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Vector2.test.d.ts +0 -2
- package/dist/types/ValueObjects/Vector2.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Vector3.test.d.ts +0 -2
- package/dist/types/ValueObjects/Vector3.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Version.test.d.ts +0 -2
- package/dist/types/ValueObjects/Version.test.d.ts.map +0 -1
|
@@ -1,26 +1,106 @@
|
|
|
1
1
|
import { AppObject } from "./AppObject";
|
|
2
2
|
import { AppObjectRepo } from "./AppObjectRepo";
|
|
3
|
+
/**
|
|
4
|
+
* Enumeration of the different types of components in the architecture.
|
|
5
|
+
* Each type serves a specific purpose in the application structure.
|
|
6
|
+
*/
|
|
3
7
|
export declare enum AppObjectComponentType {
|
|
8
|
+
/** Stores and manages application state */
|
|
4
9
|
ENTITY = "Entity",
|
|
10
|
+
/** Transforms application state into view models */
|
|
5
11
|
PM = "Presentation Manager",
|
|
12
|
+
/** Implements business logic and coordinates between layers */
|
|
6
13
|
UC = "Use Case",
|
|
14
|
+
/** Handles user inputs and external events */
|
|
7
15
|
CONTROLLER = "Controller",
|
|
16
|
+
/** Renders UI elements and interacts with the DOM/rendering system */
|
|
8
17
|
VIEW = "View",
|
|
18
|
+
/** Default type for components that don't fit the standard categories */
|
|
9
19
|
UNKNOWN = "Unknown"
|
|
10
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Base class for all components in the AppObject architecture.
|
|
23
|
+
*
|
|
24
|
+
* Components attach to AppObjects and provide specific functionality based on their type.
|
|
25
|
+
* The architecture follows a clean separation of concerns, with each component type
|
|
26
|
+
* having a well-defined responsibility in the application.
|
|
27
|
+
*
|
|
28
|
+
* Components can communicate with each other through various mechanisms:
|
|
29
|
+
* - Direct access via parent AppObject
|
|
30
|
+
* - Repository-level singleton access
|
|
31
|
+
* - Observer patterns for reactive updates
|
|
32
|
+
*/
|
|
11
33
|
export declare class AppObjectComponent {
|
|
34
|
+
/** The type category of this component */
|
|
12
35
|
readonly componentType: AppObjectComponentType;
|
|
36
|
+
/** Unique type identifier for this specific component */
|
|
13
37
|
readonly type: string;
|
|
38
|
+
/** The parent AppObject this component is attached to */
|
|
14
39
|
readonly appObject: AppObject;
|
|
40
|
+
/**
|
|
41
|
+
* Convenience accessor for the repository containing all AppObjects
|
|
42
|
+
* @returns The application's AppObjectRepo
|
|
43
|
+
*/
|
|
15
44
|
get appObjects(): AppObjectRepo;
|
|
45
|
+
/** Cache for components to avoid repeated lookups */
|
|
16
46
|
private cachedComponents;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves a singleton component of the specified type from the repository
|
|
49
|
+
* Results are cached for better performance in repeated calls
|
|
50
|
+
*
|
|
51
|
+
* @param type The component type identifier to look up
|
|
52
|
+
* @returns The singleton component cast to type T, or undefined if not found
|
|
53
|
+
*/
|
|
17
54
|
getCachedSingleton<T extends AppObjectComponent>(type: string): T | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves a component from the same AppObject as this component
|
|
57
|
+
* Results are cached for better performance in repeated calls
|
|
58
|
+
*
|
|
59
|
+
* @param type The component type identifier to look up
|
|
60
|
+
* @returns The component cast to type T, or undefined if not found
|
|
61
|
+
*/
|
|
18
62
|
getCachedLocalComponent<T extends AppObjectComponent>(type: string): T | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves a singleton component from the repository with customizable logging
|
|
65
|
+
* Unlike getCachedSingleton, results are not cached
|
|
66
|
+
*
|
|
67
|
+
* @param type The component type identifier to look up
|
|
68
|
+
* @param logType The severity level for logging if component isn't found
|
|
69
|
+
* @returns The singleton component cast to type T, or undefined if not found
|
|
70
|
+
*/
|
|
19
71
|
getSingleton<T extends AppObjectComponent>(type: string, logType?: "LOG" | "WARN" | "ERROR"): T | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Cleans up resources used by this component
|
|
74
|
+
* Removes itself from the parent AppObject if it's still attached
|
|
75
|
+
*/
|
|
20
76
|
dispose(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Logs an informational message to the application's logging system
|
|
79
|
+
* Messages are prefixed with the AppObject ID and component type for easier debugging
|
|
80
|
+
*
|
|
81
|
+
* @param message The message to log
|
|
82
|
+
*/
|
|
21
83
|
log(message: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Logs a warning message to the application's logging system
|
|
86
|
+
* Messages are prefixed with the AppObject ID and component type for easier debugging
|
|
87
|
+
*
|
|
88
|
+
* @param message The warning message to log
|
|
89
|
+
*/
|
|
22
90
|
warn(message: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Logs an error message to the application's logging system
|
|
93
|
+
* Messages are prefixed with the AppObject ID and component type for easier debugging
|
|
94
|
+
*
|
|
95
|
+
* @param message The error message to log
|
|
96
|
+
*/
|
|
23
97
|
error(message: string): void;
|
|
98
|
+
/**
|
|
99
|
+
* Creates a new component and attaches it to the specified AppObject
|
|
100
|
+
*
|
|
101
|
+
* @param appObject The parent AppObject this component will be attached to
|
|
102
|
+
* @param type The unique type identifier for this component
|
|
103
|
+
*/
|
|
24
104
|
constructor(appObject: AppObject, type: string);
|
|
25
105
|
}
|
|
26
106
|
//# sourceMappingURL=AppObjectComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectComponent.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,oBAAY,sBAAsB;IAChC,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"AppObjectComponent.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;GAGG;AACH,oBAAY,sBAAsB;IAChC,2CAA2C;IAC3C,MAAM,WAAW;IAEjB,oDAAoD;IACpD,EAAE,yBAAyB;IAE3B,+DAA+D;IAC/D,EAAE,aAAa;IAEf,8CAA8C;IAC9C,UAAU,eAAe;IAEzB,sEAAsE;IACtE,IAAI,SAAS;IAEb,yEAAyE;IACzE,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,kBAAkB;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAkC;IAEhF,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B;;;OAGG;IACH,IAAI,UAAU,IAAI,aAAa,CAE9B;IAED,qDAAqD;IACrD,OAAO,CAAC,gBAAgB,CAAyC;IAEjE;;;;;;OAMG;IACH,kBAAkB,CAAC,CAAC,SAAS,kBAAkB,EAC7C,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,SAAS;IAahB;;;;;;OAMG;IACH,uBAAuB,CAAC,CAAC,SAAS,kBAAkB,EAClD,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,SAAS;IAchB;;;;;;;OAOG;IACH,YAAY,CAAC,CAAC,SAAS,kBAAkB,EACvC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,KAAK,GAAG,MAAM,GAAG,OAAgB,GACzC,CAAC,GAAG,SAAS;IAqBhB;;;OAGG;IACH,OAAO;IAMP;;;;;OAKG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM;IAInB;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM;IAIrB;;;;;OAKG;gBACS,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM;CAK/C"}
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import { AppObjectComponent, AppObjectComponentType } from "./AppObjectComponent";
|
|
2
|
+
/**
|
|
3
|
+
* AppObjectController serves as a base controller class within the application framework.
|
|
4
|
+
*
|
|
5
|
+
* Controllers are components that handle logic-related operations for an AppObject,
|
|
6
|
+
* such as user input processing, state management, or business logic implementation.
|
|
7
|
+
* Extend this class to create specialized controllers for specific application features.
|
|
8
|
+
*
|
|
9
|
+
* @extends AppObjectComponent
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* class PlayerController extends AppObjectController {
|
|
13
|
+
* handleUserInput(input: UserInput) {
|
|
14
|
+
* // Process user input to control player object
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
2
19
|
export declare class AppObjectController extends AppObjectComponent {
|
|
20
|
+
/**
|
|
21
|
+
* The component type identifier used to categorize this component as a controller
|
|
22
|
+
* This property helps the component system identify and manage controller components.
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
3
25
|
readonly componentType = AppObjectComponentType.CONTROLLER;
|
|
4
26
|
}
|
|
5
27
|
//# sourceMappingURL=AppObjectController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectController.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectController.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,mBAAoB,SAAQ,kBAAkB;IACzD,QAAQ,CAAC,aAAa,qCAAqC;CAC5D"}
|
|
1
|
+
{"version":3,"file":"AppObjectController.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectController.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,mBAAoB,SAAQ,kBAAkB;IACzD;;;;OAIG;IACH,QAAQ,CAAC,aAAa,qCAAqC;CAC5D"}
|
|
@@ -1,16 +1,71 @@
|
|
|
1
1
|
import { AppObject } from "./AppObject";
|
|
2
2
|
import { AppObjectComponent, AppObjectComponentType } from "./AppObjectComponent";
|
|
3
|
+
/**
|
|
4
|
+
* Observer function type for entity state changes or disposal
|
|
5
|
+
* No parameters are passed to the observer functions
|
|
6
|
+
*/
|
|
3
7
|
export type AppObjectEntityObserver = () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Entity component that manages application state
|
|
10
|
+
*
|
|
11
|
+
* AppObjectEntity is responsible for storing and managing state data within the application.
|
|
12
|
+
* It uses the observer pattern to notify interested parties of changes to its state.
|
|
13
|
+
*
|
|
14
|
+
* In a typical application flow:
|
|
15
|
+
* 1. Controllers modify entity state in response to user actions
|
|
16
|
+
* 2. Entities notify observers (typically PMs) of state changes
|
|
17
|
+
* 3. PMs transform entity state into view models
|
|
18
|
+
* 4. Views render based on the view models
|
|
19
|
+
*/
|
|
4
20
|
export declare class AppObjectEntity extends AppObjectComponent {
|
|
21
|
+
/** Identifies this as an Entity component */
|
|
5
22
|
readonly componentType = AppObjectComponentType.ENTITY;
|
|
23
|
+
/** List of observers to notify when this entity is disposed */
|
|
6
24
|
private onDisposeObserverList;
|
|
25
|
+
/**
|
|
26
|
+
* Adds an observer to be notified when this entity is disposed
|
|
27
|
+
* @param observer Function to call on disposal
|
|
28
|
+
*/
|
|
7
29
|
addOnDisposeObserver: (observer: AppObjectEntityObserver) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Removes a previously added dispose observer
|
|
32
|
+
* @param observer The observer function to remove
|
|
33
|
+
*/
|
|
8
34
|
removeOnDisposeObserver: (observer: AppObjectEntityObserver) => void;
|
|
35
|
+
/** List of observers to notify when this entity's state changes */
|
|
9
36
|
private onChangeObserverList;
|
|
37
|
+
/**
|
|
38
|
+
* Adds an observer to be notified when this entity's state changes
|
|
39
|
+
* @param observer Function to call on state change
|
|
40
|
+
*/
|
|
10
41
|
addChangeObserver: (observer: AppObjectEntityObserver) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Removes a previously added change observer
|
|
44
|
+
* @param observer The observer function to remove
|
|
45
|
+
*/
|
|
11
46
|
removeChangeObserver: (observer: AppObjectEntityObserver) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Notifies all change observers that this entity's state has changed
|
|
49
|
+
* This should be called by derived classes when their state changes
|
|
50
|
+
*/
|
|
12
51
|
notifyOnChange: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Cleans up resources and notifies dispose observers
|
|
54
|
+
*
|
|
55
|
+
* This method:
|
|
56
|
+
* 1. Removes the change observer from the parent AppObject
|
|
57
|
+
* 2. Notifies all dispose observers
|
|
58
|
+
* 3. Clears all observer lists
|
|
59
|
+
* 4. Calls the parent class dispose method
|
|
60
|
+
*/
|
|
13
61
|
dispose(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a new entity component and attaches it to the specified AppObject
|
|
64
|
+
* Automatically adds the AppObject's notify method as a change observer
|
|
65
|
+
*
|
|
66
|
+
* @param appObject The parent AppObject this component will be attached to
|
|
67
|
+
* @param type The unique type identifier for this component
|
|
68
|
+
*/
|
|
14
69
|
constructor(appObject: AppObject, type: string);
|
|
15
70
|
}
|
|
16
71
|
//# sourceMappingURL=AppObjectEntity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectEntity.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectEntity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAElF,MAAM,MAAM,uBAAuB,GAAG,MAAM,IAAI,CAAC;AAEjD,qBAAa,eAAgB,SAAQ,kBAAkB;IACrD,QAAQ,CAAC,aAAa,iCAAiC;IAEvD,OAAO,CAAC,qBAAqB,CAA4B;
|
|
1
|
+
{"version":3,"file":"AppObjectEntity.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectEntity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAElF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,IAAI,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,SAAQ,kBAAkB;IACrD,6CAA6C;IAC7C,QAAQ,CAAC,aAAa,iCAAiC;IAEvD,+DAA+D;IAC/D,OAAO,CAAC,qBAAqB,CAA4B;IAEzD;;;OAGG;IACH,oBAAoB,GAAI,UAAU,uBAAuB,UAEvD;IAEF;;;OAGG;IACH,uBAAuB,GAAI,UAAU,uBAAuB,KAAG,IAAI,CAEjE;IAEF,mEAAmE;IACnE,OAAO,CAAC,oBAAoB,CAA4B;IAExD;;;OAGG;IACH,iBAAiB,GAAI,UAAU,uBAAuB,KAAG,IAAI,CAE3D;IAEF;;;OAGG;IACH,oBAAoB,GAAI,UAAU,uBAAuB,KAAG,IAAI,CAE9D;IAEF;;;OAGG;IACH,cAAc,aAEZ;IAEF;;;;;;;;OAQG;IACH,OAAO;IAUP;;;;;;OAMG;gBACS,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM;CAM/C"}
|
|
@@ -1,16 +1,91 @@
|
|
|
1
1
|
import { AppObjectEntity } from "./AppObjectEntity";
|
|
2
|
+
/**
|
|
3
|
+
* A repository for managing collections of AppObjectEntity instances.
|
|
4
|
+
*
|
|
5
|
+
* This generic class provides a centralized way to store, retrieve, and manage
|
|
6
|
+
* entities that are associated with specific AppObjects. It implements the observer
|
|
7
|
+
* pattern to notify listeners when entities are added or removed.
|
|
8
|
+
*
|
|
9
|
+
* @template T - The type of entities managed by this repository, must extend AppObjectEntity
|
|
10
|
+
* @extends AppObjectEntity
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // Create a repository for player entities
|
|
15
|
+
* const playerRepo = new AppObjectEntityRepo<PlayerEntity>();
|
|
16
|
+
*
|
|
17
|
+
* // Add a new player
|
|
18
|
+
* const player = new PlayerEntity(appObject);
|
|
19
|
+
* playerRepo.add(player);
|
|
20
|
+
*
|
|
21
|
+
* // Get a player by its AppObject ID
|
|
22
|
+
* const retrievedPlayer = playerRepo.getForAppObject("player1");
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
2
25
|
export declare class AppObjectEntityRepo<T extends AppObjectEntity> extends AppObjectEntity {
|
|
3
26
|
private entityLookup;
|
|
4
27
|
private onEntityAddedObservers;
|
|
28
|
+
/**
|
|
29
|
+
* Registers an observer to be notified when an entity is added to the repository.
|
|
30
|
+
*
|
|
31
|
+
* @param {(addedEntity: T) => void} observer - The callback function to invoke when an entity is added
|
|
32
|
+
*/
|
|
5
33
|
addEntityAddedObserver: (observer: (addedEntity: T) => void) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Removes an observer previously registered for entity addition notifications.
|
|
36
|
+
*
|
|
37
|
+
* @param {(addedEntity: T) => void} observer - The callback function to remove
|
|
38
|
+
*/
|
|
6
39
|
removeEntityAddedObserver: (observer: (addedEntity: T) => void) => void;
|
|
7
40
|
private onEntityRemovedObservers;
|
|
41
|
+
/**
|
|
42
|
+
* Registers an observer to be notified when an entity is removed from the repository.
|
|
43
|
+
*
|
|
44
|
+
* @param {(removedEntity: T) => void} observer - The callback function to invoke when an entity is removed
|
|
45
|
+
*/
|
|
8
46
|
addEntityRemovedObserver: (observer: (removedEntity: T) => void) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Removes an observer previously registered for entity removal notifications.
|
|
49
|
+
*
|
|
50
|
+
* @param {(removedEntity: T) => void} observer - The callback function to remove
|
|
51
|
+
*/
|
|
9
52
|
removeEntityRemovedObserver: (observer: (removedEntity: T) => void) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Checks if an entity exists for the given AppObject ID.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} appObjectID - The ID of the AppObject
|
|
57
|
+
* @returns {boolean} True if an entity exists for the given AppObject ID, false otherwise
|
|
58
|
+
*/
|
|
10
59
|
hasForAppObject: (appObjectID: string) => boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Adds an entity to the repository.
|
|
62
|
+
*
|
|
63
|
+
* If an entity with the same AppObject ID already exists, it is replaced.
|
|
64
|
+
* Notifies all registered observers after the entity is added.
|
|
65
|
+
*
|
|
66
|
+
* @param {T} entity - The entity to add
|
|
67
|
+
*/
|
|
11
68
|
add(entity: T): void;
|
|
69
|
+
/**
|
|
70
|
+
* Removes the entity associated with the specified AppObject ID.
|
|
71
|
+
*
|
|
72
|
+
* Notifies all registered observers after the entity is removed.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} id - The ID of the AppObject whose entity should be removed
|
|
75
|
+
*/
|
|
12
76
|
removeForAppObject: (id: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Gets the entity associated with the specified AppObject ID.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} appObjectID - The ID of the AppObject
|
|
81
|
+
* @returns {T | undefined} The entity if found, undefined otherwise
|
|
82
|
+
*/
|
|
13
83
|
getForAppObject: (appObjectID: string) => T | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Gets all entities in the repository.
|
|
86
|
+
*
|
|
87
|
+
* @returns {T[]} An array of all entities
|
|
88
|
+
*/
|
|
14
89
|
getAll: () => T[];
|
|
15
90
|
}
|
|
16
91
|
//# sourceMappingURL=AppObjectEntityRepo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectEntityRepo.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectEntityRepo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,mBAAmB,CAC9B,CAAC,SAAS,eAAe,CACzB,SAAQ,eAAe;
|
|
1
|
+
{"version":3,"file":"AppObjectEntityRepo.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectEntityRepo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,mBAAmB,CAC9B,CAAC,SAAS,eAAe,CACzB,SAAQ,eAAe;IACvB,OAAO,CAAC,YAAY,CAAwB;IAE5C,OAAO,CAAC,sBAAsB,CAAyB;IACvD;;;;OAIG;IACH,sBAAsB,GAAI,UAAU,CAAC,WAAW,EAAE,CAAC,KAAK,IAAI,UAE1D;IAEF;;;;OAIG;IACH,yBAAyB,GAAI,UAAU,CAAC,WAAW,EAAE,CAAC,KAAK,IAAI,KAAG,IAAI,CAEpE;IAEF,OAAO,CAAC,wBAAwB,CAAyB;IACzD;;;;OAIG;IACH,wBAAwB,GAAI,UAAU,CAAC,aAAa,EAAE,CAAC,KAAK,IAAI,UAE9D;IAEF;;;;OAIG;IACH,2BAA2B,GACzB,UAAU,CAAC,aAAa,EAAE,CAAC,KAAK,IAAI,KACnC,IAAI,CAEL;IAEF;;;;;OAKG;IACH,eAAe,GAAI,aAAa,MAAM,KAAG,OAAO,CAE9C;IAEF;;;;;;;OAOG;IACH,GAAG,CAAC,MAAM,EAAE,CAAC;IAYb;;;;;;OAMG;IACH,kBAAkB,GAAI,IAAI,MAAM,UAQ9B;IAEF;;;;;OAKG;IACH,eAAe,GAAI,aAAa,MAAM,KAAG,CAAC,GAAG,SAAS,CAEpD;IAEF;;;;OAIG;IACH,MAAM,QAAO,CAAC,EAAE,CAEd;CACH"}
|
|
@@ -1,13 +1,66 @@
|
|
|
1
1
|
import { AppObjectComponent, AppObjectComponentType } from "./AppObjectComponent";
|
|
2
|
+
/**
|
|
3
|
+
* Presentation Manager (PM) component that transforms application state into view models
|
|
4
|
+
*
|
|
5
|
+
* AppObjectPM acts as a mediator between application state (entities) and views.
|
|
6
|
+
* It transforms raw application data into a format that's optimized for presentation,
|
|
7
|
+
* implementing the presentation model or MVVM pattern.
|
|
8
|
+
*
|
|
9
|
+
* A PM typically:
|
|
10
|
+
* 1. Observes entity changes
|
|
11
|
+
* 2. Transforms entity data into view models
|
|
12
|
+
* 3. Notifies attached views when view models change
|
|
13
|
+
* 4. Handles view model caching and optimization
|
|
14
|
+
*
|
|
15
|
+
* @typeparam T The view model type this PM produces
|
|
16
|
+
*/
|
|
2
17
|
export declare abstract class AppObjectPM<T> extends AppObjectComponent {
|
|
18
|
+
/** Identifies this as a Presentation Manager component */
|
|
3
19
|
readonly componentType = AppObjectComponentType.PM;
|
|
20
|
+
/**
|
|
21
|
+
* Compares two view models to determine if they're equivalent
|
|
22
|
+
* Used to prevent unnecessary view updates when the view model hasn't changed
|
|
23
|
+
*
|
|
24
|
+
* @param a First view model to compare
|
|
25
|
+
* @param b Second view model to compare
|
|
26
|
+
* @returns True if the view models are considered equal, false otherwise
|
|
27
|
+
*/
|
|
4
28
|
abstract vmsAreEqual(a: T, b: T): boolean;
|
|
29
|
+
/** The most recently generated view model */
|
|
5
30
|
private _lastVM?;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the most recently generated view model
|
|
33
|
+
* @returns The last view model or undefined if none has been generated
|
|
34
|
+
*/
|
|
6
35
|
get lastVM(): T | undefined;
|
|
36
|
+
/** List of view update functions to notify when the view model changes */
|
|
7
37
|
private observerList;
|
|
38
|
+
/**
|
|
39
|
+
* Registers a view update function to be called when the view model changes
|
|
40
|
+
* If a view model already exists, the provided function is called immediately with that model
|
|
41
|
+
*
|
|
42
|
+
* @param updateView Function to call with updated view models
|
|
43
|
+
*/
|
|
8
44
|
addView(updateView: (vm: T) => void): void;
|
|
45
|
+
/**
|
|
46
|
+
* Unregisters a previously added view update function
|
|
47
|
+
*
|
|
48
|
+
* @param updateView The view update function to remove
|
|
49
|
+
*/
|
|
9
50
|
removeView(updateView: (vm: T) => void): void;
|
|
51
|
+
/**
|
|
52
|
+
* Updates the view model and notifies all registered views if the model has changed
|
|
53
|
+
* This method should be called by derived classes when the view model needs to be updated
|
|
54
|
+
*
|
|
55
|
+
* The method performs equality checking to prevent unnecessary updates when
|
|
56
|
+
* the new view model is equivalent to the previous one
|
|
57
|
+
*
|
|
58
|
+
* @param vm The new view model
|
|
59
|
+
*/
|
|
10
60
|
doUpdateView(vm: T): void;
|
|
61
|
+
/**
|
|
62
|
+
* Cleans up resources and detaches this PM from its parent AppObject
|
|
63
|
+
*/
|
|
11
64
|
dispose(): void;
|
|
12
65
|
}
|
|
13
66
|
//# sourceMappingURL=AppObjectPM.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectPM.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectPM.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAElF,8BAAsB,WAAW,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC7D,QAAQ,CAAC,aAAa,6BAA6B;
|
|
1
|
+
{"version":3,"file":"AppObjectPM.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectPM.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAElF;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,WAAW,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC7D,0DAA0D;IAC1D,QAAQ,CAAC,aAAa,6BAA6B;IAEnD;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO;IAEzC,6CAA6C;IAC7C,OAAO,CAAC,OAAO,CAAC,CAAI;IAEpB;;;OAGG;IACH,IAAI,MAAM,IAAI,CAAC,GAAG,SAAS,CAE1B;IAED,0EAA0E;IAC1E,OAAO,CAAC,YAAY,CAAyB;IAE7C;;;;;OAKG;IACH,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAS1C;;;;OAIG;IACH,UAAU,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAI7C;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,EAAE,CAAC;IAUlB;;OAEG;IACH,OAAO;CAOR"}
|
|
@@ -1,26 +1,150 @@
|
|
|
1
1
|
import { ObservableEntity } from "../Entities";
|
|
2
2
|
import { AppObject } from "./AppObject";
|
|
3
3
|
import { AppObjectComponent } from "./AppObjectComponent";
|
|
4
|
+
/**
|
|
5
|
+
* Abstract repository class for managing AppObjects and their components.
|
|
6
|
+
*
|
|
7
|
+
* This class provides the interface for storing, retrieving, and managing application
|
|
8
|
+
* objects, their components, and singletons. It also includes logging functionality
|
|
9
|
+
* and observer pattern implementation for tracking changes to the repository.
|
|
10
|
+
*
|
|
11
|
+
* @extends ObservableEntity
|
|
12
|
+
*/
|
|
4
13
|
export declare abstract class AppObjectRepo extends ObservableEntity {
|
|
14
|
+
/**
|
|
15
|
+
* Checks if an AppObject with the specified ID exists in the repository.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} appObjectID - The ID of the AppObject to check
|
|
18
|
+
* @returns {boolean} True if the AppObject exists, false otherwise
|
|
19
|
+
*/
|
|
5
20
|
abstract has(appObjectID: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Adds an AppObject to the repository.
|
|
23
|
+
*
|
|
24
|
+
* @param {AppObject} appObject - The AppObject to add
|
|
25
|
+
*/
|
|
6
26
|
abstract add(appObject: AppObject): void;
|
|
27
|
+
/**
|
|
28
|
+
* Removes an AppObject with the specified ID from the repository.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} appObjectID - The ID of the AppObject to remove
|
|
31
|
+
*/
|
|
7
32
|
abstract remove(appObjectID: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Gets an AppObject by its ID.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} appObjectID - The ID of the AppObject to retrieve
|
|
37
|
+
* @returns {AppObject | undefined} The AppObject if found, undefined otherwise
|
|
38
|
+
*/
|
|
8
39
|
abstract get(appObjectID: string): AppObject | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Gets an AppObject by its ID, or creates a new one if it doesn't exist.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} appObjectID - The ID of the AppObject to retrieve or create
|
|
44
|
+
* @returns {AppObject} The existing or newly created AppObject
|
|
45
|
+
*/
|
|
9
46
|
abstract getOrCreate(appObjectID: string): AppObject;
|
|
47
|
+
/**
|
|
48
|
+
* Gets all AppObjects in the repository.
|
|
49
|
+
*
|
|
50
|
+
* @returns {AppObject[]} An array of all AppObjects
|
|
51
|
+
*/
|
|
10
52
|
abstract getAll(): AppObject[];
|
|
53
|
+
/**
|
|
54
|
+
* Logs an informational message.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} sender - The identifier of the message sender
|
|
57
|
+
* @param {string} message - The message to log
|
|
58
|
+
*/
|
|
11
59
|
abstract submitLog(sender: string, message: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Logs a warning message.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} sender - The identifier of the message sender
|
|
64
|
+
* @param {string} message - The warning message to log
|
|
65
|
+
*/
|
|
12
66
|
abstract submitWarning(sender: string, message: string): void;
|
|
67
|
+
/**
|
|
68
|
+
* Logs an error message.
|
|
69
|
+
*
|
|
70
|
+
* @param {string} sender - The identifier of the message sender
|
|
71
|
+
* @param {string} message - The error message to log
|
|
72
|
+
*/
|
|
13
73
|
abstract submitError(sender: string, message: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* Logs a fatal error message.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} sender - The identifier of the message sender
|
|
78
|
+
* @param {string} message - The fatal error message to log
|
|
79
|
+
*/
|
|
14
80
|
abstract submitFatal(sender: string, message: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Registers a component as a singleton in the repository.
|
|
83
|
+
*
|
|
84
|
+
* @param {AppObjectComponent} component - The component to register as a singleton
|
|
85
|
+
*/
|
|
15
86
|
abstract registerSingleton(component: AppObjectComponent): void;
|
|
87
|
+
/**
|
|
88
|
+
* Gets a singleton component of the specified type.
|
|
89
|
+
*
|
|
90
|
+
* @template T - Type of the component to retrieve, must extend AppObjectComponent
|
|
91
|
+
* @param {string} type - The type of the singleton to retrieve
|
|
92
|
+
* @returns {T | undefined} The singleton component if found, undefined otherwise
|
|
93
|
+
*/
|
|
16
94
|
abstract getSingleton<T extends AppObjectComponent>(type: string): T | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Gets a component of the specified type from an AppObject.
|
|
97
|
+
*
|
|
98
|
+
* @template T - Type of the component to retrieve, must extend AppObjectComponent
|
|
99
|
+
* @param {string} appObjectID - The ID of the AppObject containing the component
|
|
100
|
+
* @param {string} type - The type of the component to retrieve
|
|
101
|
+
* @returns {T | undefined} The component if found, undefined otherwise
|
|
102
|
+
*/
|
|
17
103
|
abstract getAppObjectComponent<T extends AppObjectComponent>(appObjectID: string, type: string): T | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Gets all AppObjects that have a component of the specified type.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} componentType - The component type to filter by
|
|
108
|
+
* @returns {AppObject[]} An array of AppObjects having the specified component type
|
|
109
|
+
*/
|
|
18
110
|
abstract getAllAppObjectsWithComponent(componentType: string): AppObject[];
|
|
111
|
+
/**
|
|
112
|
+
* Gets all components of the specified type across all AppObjects.
|
|
113
|
+
*
|
|
114
|
+
* @template T - Type of the components to retrieve, must extend AppObjectComponent
|
|
115
|
+
* @param {string} type - The type of components to retrieve
|
|
116
|
+
* @returns {T[]} An array of all components of the specified type
|
|
117
|
+
*/
|
|
19
118
|
abstract getAllComponents<T extends AppObjectComponent>(type: string): T[];
|
|
119
|
+
/**
|
|
120
|
+
* Adds an observer to be notified when an AppObject is added to the repository.
|
|
121
|
+
*
|
|
122
|
+
* @param {(addedEntity: AppObject) => void} observer - The observer function
|
|
123
|
+
*/
|
|
20
124
|
abstract addAppObjectAddedObserver: (observer: (addedEntity: AppObject) => void) => void;
|
|
125
|
+
/**
|
|
126
|
+
* Removes an observer previously registered for AppObject addition notifications.
|
|
127
|
+
*
|
|
128
|
+
* @param {(addedEntity: AppObject) => void} observer - The observer function to remove
|
|
129
|
+
*/
|
|
21
130
|
abstract removeAppObjectAddedObserver: (observer: (addedEntity: AppObject) => void) => void;
|
|
131
|
+
/**
|
|
132
|
+
* Adds an observer to be notified when an AppObject is removed from the repository.
|
|
133
|
+
*
|
|
134
|
+
* @param {(addedEntity: AppObject) => void} observer - The observer function
|
|
135
|
+
*/
|
|
22
136
|
abstract addAppObjectRemovedObserver: (observer: (addedEntity: AppObject) => void) => void;
|
|
137
|
+
/**
|
|
138
|
+
* Removes an observer previously registered for AppObject removal notifications.
|
|
139
|
+
*
|
|
140
|
+
* @param {(addedEntity: AppObject) => void} observer - The observer function to remove
|
|
141
|
+
*/
|
|
23
142
|
abstract removedAppObjectRemovedObserver: (observer: (addedEntity: AppObject) => void) => void;
|
|
24
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Creates and returns a new AppObjectRepo instance.
|
|
146
|
+
*
|
|
147
|
+
* @returns {AppObjectRepo} A new AppObjectRepo instance
|
|
148
|
+
*/
|
|
25
149
|
export declare function makeAppObjectRepo(): AppObjectRepo;
|
|
26
150
|
//# sourceMappingURL=AppObjectRepo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectRepo.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAiB,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,8BAAsB,aAAc,SAAQ,gBAAgB;IAC1D,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"AppObjectRepo.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectRepo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAiB,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;;;;GAQG;AACH,8BAAsB,aAAc,SAAQ,gBAAgB;IAC1D;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAExC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAE1C;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAExD;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS;IAEpD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,IAAI,SAAS,EAAE;IAE9B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAEzD;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAE7D;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAE3D;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAE3D;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI;IAE/D;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,CAAC,SAAS,kBAAkB,EAChD,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,SAAS;IAEhB;;;;;;;OAOG;IACH,QAAQ,CAAC,qBAAqB,CAAC,CAAC,SAAS,kBAAkB,EACzD,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,SAAS;IAEhB;;;;;OAKG;IACH,QAAQ,CAAC,6BAA6B,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE;IAE1E;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE;IAE1E;;;;OAIG;IACH,QAAQ,CAAC,yBAAyB,EAAE,CAClC,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,KAAK,IAAI,KACvC,IAAI,CAAC;IAEV;;;;OAIG;IACH,QAAQ,CAAC,4BAA4B,EAAE,CACrC,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,KAAK,IAAI,KACvC,IAAI,CAAC;IAEV;;;;OAIG;IACH,QAAQ,CAAC,2BAA2B,EAAE,CACpC,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,KAAK,IAAI,KACvC,IAAI,CAAC;IAEV;;;;OAIG;IACH,QAAQ,CAAC,+BAA+B,EAAE,CACxC,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,KAAK,IAAI,KACvC,IAAI,CAAC;CACX;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,CAEjD"}
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import { AppObjectComponent, AppObjectComponentType } from "./AppObjectComponent";
|
|
2
|
+
/**
|
|
3
|
+
* AppObjectUC (Use Case) serves as a base use case class within the application framework.
|
|
4
|
+
*
|
|
5
|
+
* Use Cases are components that represent specific application operations or workflows.
|
|
6
|
+
* They encapsulate business rules and coordinate interactions between different parts
|
|
7
|
+
* of the application. Extend this class to implement specific use case scenarios.
|
|
8
|
+
*
|
|
9
|
+
* @extends AppObjectComponent
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* class PurchaseItemUC extends AppObjectUC {
|
|
13
|
+
* execute(itemId: string, quantity: number): boolean {
|
|
14
|
+
* // Implement the purchase item use case
|
|
15
|
+
* return true; // if successful
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
export declare class AppObjectUC extends AppObjectComponent {
|
|
21
|
+
/**
|
|
22
|
+
* The component type identifier used to categorize this component as a use case
|
|
23
|
+
* This property helps the component system identify and manage use case components.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
3
26
|
readonly componentType = AppObjectComponentType.UC;
|
|
4
27
|
}
|
|
5
28
|
//# sourceMappingURL=AppObjectUC.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectUC.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectUC.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AppObjectUC.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectUC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,kBAAkB;IACjD;;;;OAIG;IACH,QAAQ,CAAC,aAAa,6BAA6B;CACpD"}
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import { AppObjectComponent, AppObjectComponentType } from "./AppObjectComponent";
|
|
2
|
+
/**
|
|
3
|
+
* AppObjectView serves as a base view class within the application framework.
|
|
4
|
+
*
|
|
5
|
+
* Views are components that handle the visual representation of an AppObject,
|
|
6
|
+
* such as rendering, animations, or user interface elements. Extend this class
|
|
7
|
+
* to create custom visual representations for specific application objects.
|
|
8
|
+
*
|
|
9
|
+
* @extends AppObjectComponent
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* class PlayerView extends AppObjectView {
|
|
13
|
+
* render(renderContext: RenderContext) {
|
|
14
|
+
* // Render the player character on screen
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
2
19
|
export declare class AppObjectView extends AppObjectComponent {
|
|
20
|
+
/**
|
|
21
|
+
* The component type identifier used to categorize this component as a view
|
|
22
|
+
* This property helps the component system identify and manage view components.
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
3
25
|
readonly componentType = AppObjectComponentType.VIEW;
|
|
4
26
|
}
|
|
5
27
|
//# sourceMappingURL=AppObjectView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppObjectView.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectView.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AppObjectView.d.ts","sourceRoot":"","sources":["../../../src/AppObject/AppObjectView.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAc,SAAQ,kBAAkB;IACnD;;;;OAIG;IACH,QAAQ,CAAC,aAAa,+BAA+B;CACtD"}
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { AppObjectComponent } from "./AppObjectComponent";
|
|
2
2
|
import { AppObjectRepo } from "./AppObjectRepo";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a singleton component of the specified type from the application objects repository.
|
|
5
|
+
*
|
|
6
|
+
* This utility function provides a convenient way to access singleton components that should
|
|
7
|
+
* have only one instance across the entire application.
|
|
8
|
+
*
|
|
9
|
+
* @template T - Type of the component to retrieve, must extend AppObjectComponent
|
|
10
|
+
* @param {string} type - The type identifier of the component to retrieve
|
|
11
|
+
* @param {AppObjectRepo} appObjects - The repository containing all application objects
|
|
12
|
+
* @returns {T | undefined} The singleton component instance if found, otherwise undefined
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const cameraController = getSingletonComponent<CameraController>(CameraController.type, appObjectRepo);
|
|
17
|
+
* if (cameraController) {
|
|
18
|
+
* cameraController.focusOn(targetObject);
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
3
22
|
export declare function getSingletonComponent<T extends AppObjectComponent>(type: string, appObjects: AppObjectRepo): T | undefined;
|
|
4
23
|
//# sourceMappingURL=getSingletonComponent.d.ts.map
|