@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.
Files changed (528) hide show
  1. package/README.md +142 -20
  2. package/dist/cjs/AppObject/AppObject.js +53 -0
  3. package/dist/cjs/AppObject/AppObject.js.map +1 -1
  4. package/dist/cjs/AppObject/AppObjectComponent.js +78 -0
  5. package/dist/cjs/AppObject/AppObjectComponent.js.map +1 -1
  6. package/dist/cjs/AppObject/AppObjectController.js +22 -0
  7. package/dist/cjs/AppObject/AppObjectController.js.map +1 -1
  8. package/dist/cjs/AppObject/AppObjectEntity.js +52 -0
  9. package/dist/cjs/AppObject/AppObjectEntity.js.map +1 -1
  10. package/dist/cjs/AppObject/AppObjectEntityRepo.js +75 -1
  11. package/dist/cjs/AppObject/AppObjectEntityRepo.js.map +1 -1
  12. package/dist/cjs/AppObject/AppObjectPM.js +46 -0
  13. package/dist/cjs/AppObject/AppObjectPM.js.map +1 -1
  14. package/dist/cjs/AppObject/AppObjectRepo.js +20 -0
  15. package/dist/cjs/AppObject/AppObjectRepo.js.map +1 -1
  16. package/dist/cjs/AppObject/AppObjectUC.js +23 -0
  17. package/dist/cjs/AppObject/AppObjectUC.js.map +1 -1
  18. package/dist/cjs/AppObject/AppObjectView.js +22 -0
  19. package/dist/cjs/AppObject/AppObjectView.js.map +1 -1
  20. package/dist/cjs/AppObject/getSingletonComponent.js +19 -0
  21. package/dist/cjs/AppObject/getSingletonComponent.js.map +1 -1
  22. package/dist/cjs/Entities/MemoizedAngle.js +21 -0
  23. package/dist/cjs/Entities/MemoizedAngle.js.map +1 -1
  24. package/dist/cjs/Entities/MemoizedBoolean.js +21 -0
  25. package/dist/cjs/Entities/MemoizedBoolean.js.map +1 -1
  26. package/dist/cjs/Entities/MemoizedColor.js +21 -0
  27. package/dist/cjs/Entities/MemoizedColor.js.map +1 -1
  28. package/dist/cjs/Entities/MemoizedNumber.js +21 -0
  29. package/dist/cjs/Entities/MemoizedNumber.js.map +1 -1
  30. package/dist/cjs/Entities/MemoizedQuaternion.js +21 -0
  31. package/dist/cjs/Entities/MemoizedQuaternion.js.map +1 -1
  32. package/dist/cjs/Entities/MemoizedString.js +21 -0
  33. package/dist/cjs/Entities/MemoizedString.js.map +1 -1
  34. package/dist/cjs/Entities/MemoizedVector2.js +21 -0
  35. package/dist/cjs/Entities/MemoizedVector2.js.map +1 -1
  36. package/dist/cjs/Entities/MemoizedVector3.js +21 -0
  37. package/dist/cjs/Entities/MemoizedVector3.js.map +1 -1
  38. package/dist/cjs/Entities/ObservableEntity.js +17 -0
  39. package/dist/cjs/Entities/ObservableEntity.js.map +1 -1
  40. package/dist/cjs/Entities/ObserverList.js +21 -0
  41. package/dist/cjs/Entities/ObserverList.js.map +1 -1
  42. package/dist/cjs/Entities/RangedNumber.js +29 -0
  43. package/dist/cjs/Entities/RangedNumber.js.map +1 -1
  44. package/dist/cjs/ExampleFeature/Adapters/examplePmAdapter.js +64 -0
  45. package/dist/cjs/ExampleFeature/Adapters/examplePmAdapter.js.map +1 -0
  46. package/dist/cjs/ExampleFeature/Adapters/exampleSingletonPmAdapter.js +60 -0
  47. package/dist/cjs/ExampleFeature/Adapters/exampleSingletonPmAdapter.js.map +1 -0
  48. package/dist/cjs/ExampleFeature/Adapters/index.js +19 -0
  49. package/dist/cjs/ExampleFeature/Adapters/index.js.map +1 -0
  50. package/dist/cjs/ExampleFeature/Controllers/index.js +19 -0
  51. package/dist/cjs/ExampleFeature/Controllers/index.js.map +1 -0
  52. package/dist/cjs/ExampleFeature/Controllers/setExampleText.js +48 -0
  53. package/dist/cjs/ExampleFeature/Controllers/setExampleText.js.map +1 -0
  54. package/dist/cjs/ExampleFeature/Controllers/toggleExampleBoolean.js +47 -0
  55. package/dist/cjs/ExampleFeature/Controllers/toggleExampleBoolean.js.map +1 -0
  56. package/dist/cjs/ExampleFeature/Entities/ExampleEntity.js +90 -0
  57. package/dist/cjs/ExampleFeature/Entities/ExampleEntity.js.map +1 -0
  58. package/dist/cjs/ExampleFeature/Entities/ExampleRepo.js +113 -0
  59. package/dist/cjs/ExampleFeature/Entities/ExampleRepo.js.map +1 -0
  60. package/dist/cjs/ExampleFeature/Entities/ExampleSingletonEntity.js +69 -0
  61. package/dist/cjs/ExampleFeature/Entities/ExampleSingletonEntity.js.map +1 -0
  62. package/dist/cjs/ExampleFeature/Entities/index.js +20 -0
  63. package/dist/cjs/ExampleFeature/Entities/index.js.map +1 -0
  64. package/dist/cjs/ExampleFeature/Factory/index.js +18 -0
  65. package/dist/cjs/ExampleFeature/Factory/index.js.map +1 -0
  66. package/dist/cjs/ExampleFeature/Factory/setupExampleFeature.js +29 -0
  67. package/dist/cjs/ExampleFeature/Factory/setupExampleFeature.js.map +1 -0
  68. package/dist/cjs/ExampleFeature/Mocks/MockEditExampleStringUC.js +47 -0
  69. package/dist/cjs/ExampleFeature/Mocks/MockEditExampleStringUC.js.map +1 -0
  70. package/dist/cjs/ExampleFeature/Mocks/MockExamplePM.js +48 -0
  71. package/dist/cjs/ExampleFeature/Mocks/MockExamplePM.js.map +1 -0
  72. package/dist/cjs/ExampleFeature/Mocks/MockExampleSingletonPM.js +59 -0
  73. package/dist/cjs/ExampleFeature/Mocks/MockExampleSingletonPM.js.map +1 -0
  74. package/dist/cjs/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js +57 -0
  75. package/dist/cjs/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js.map +1 -0
  76. package/dist/cjs/ExampleFeature/Mocks/index.js +21 -0
  77. package/dist/cjs/ExampleFeature/Mocks/index.js.map +1 -0
  78. package/dist/cjs/ExampleFeature/PMs/ExamplePM.js +97 -0
  79. package/dist/cjs/ExampleFeature/PMs/ExamplePM.js.map +1 -0
  80. package/dist/cjs/ExampleFeature/PMs/ExampleSingletonPM.js +102 -0
  81. package/dist/cjs/ExampleFeature/PMs/ExampleSingletonPM.js.map +1 -0
  82. package/dist/cjs/ExampleFeature/PMs/index.js +19 -0
  83. package/dist/cjs/ExampleFeature/PMs/index.js.map +1 -0
  84. package/dist/cjs/ExampleFeature/UCs/EditExampleStringUC.js +87 -0
  85. package/dist/cjs/ExampleFeature/UCs/EditExampleStringUC.js.map +1 -0
  86. package/dist/cjs/ExampleFeature/UCs/ToggleExampleBooleanUC.js +79 -0
  87. package/dist/cjs/ExampleFeature/UCs/ToggleExampleBooleanUC.js.map +1 -0
  88. package/dist/cjs/ExampleFeature/UCs/index.js +19 -0
  89. package/dist/cjs/ExampleFeature/UCs/index.js.map +1 -0
  90. package/dist/cjs/ExampleFeature/index.js +24 -0
  91. package/dist/cjs/ExampleFeature/index.js.map +1 -0
  92. package/dist/cjs/Types/PmAdapter.js.map +1 -1
  93. package/dist/cjs/Types/SingletonPmAdapter.js.map +1 -1
  94. package/dist/cjs/ValueObjects/Angle.js +1 -1
  95. package/dist/cjs/ValueObjects/Angle.js.map +1 -1
  96. package/dist/cjs/ValueObjects/LineSegment2D.js +6 -6
  97. package/dist/cjs/ValueObjects/LineSegment2D.js.map +1 -1
  98. package/dist/cjs/ValueObjects/Matrix.js +6 -6
  99. package/dist/cjs/ValueObjects/Matrix.js.map +1 -1
  100. package/dist/cjs/ValueObjects/Quaternion.js +17 -17
  101. package/dist/cjs/ValueObjects/Quaternion.js.map +1 -1
  102. package/dist/cjs/ValueObjects/Vector2.js +15 -8
  103. package/dist/cjs/ValueObjects/Vector2.js.map +1 -1
  104. package/dist/cjs/index.js +1 -0
  105. package/dist/cjs/index.js.map +1 -1
  106. package/dist/esm/AppObject/AppObject.js +53 -0
  107. package/dist/esm/AppObject/AppObject.js.map +1 -1
  108. package/dist/esm/AppObject/AppObjectComponent.js +78 -0
  109. package/dist/esm/AppObject/AppObjectComponent.js.map +1 -1
  110. package/dist/esm/AppObject/AppObjectController.js +22 -0
  111. package/dist/esm/AppObject/AppObjectController.js.map +1 -1
  112. package/dist/esm/AppObject/AppObjectEntity.js +52 -0
  113. package/dist/esm/AppObject/AppObjectEntity.js.map +1 -1
  114. package/dist/esm/AppObject/AppObjectEntityRepo.js +75 -1
  115. package/dist/esm/AppObject/AppObjectEntityRepo.js.map +1 -1
  116. package/dist/esm/AppObject/AppObjectPM.js +46 -0
  117. package/dist/esm/AppObject/AppObjectPM.js.map +1 -1
  118. package/dist/esm/AppObject/AppObjectRepo.js +20 -0
  119. package/dist/esm/AppObject/AppObjectRepo.js.map +1 -1
  120. package/dist/esm/AppObject/AppObjectUC.js +24 -1
  121. package/dist/esm/AppObject/AppObjectUC.js.map +1 -1
  122. package/dist/esm/AppObject/AppObjectView.js +23 -1
  123. package/dist/esm/AppObject/AppObjectView.js.map +1 -1
  124. package/dist/esm/AppObject/getSingletonComponent.js +19 -0
  125. package/dist/esm/AppObject/getSingletonComponent.js.map +1 -1
  126. package/dist/esm/Entities/MemoizedAngle.js +21 -0
  127. package/dist/esm/Entities/MemoizedAngle.js.map +1 -1
  128. package/dist/esm/Entities/MemoizedBoolean.js +21 -0
  129. package/dist/esm/Entities/MemoizedBoolean.js.map +1 -1
  130. package/dist/esm/Entities/MemoizedColor.js +21 -0
  131. package/dist/esm/Entities/MemoizedColor.js.map +1 -1
  132. package/dist/esm/Entities/MemoizedNumber.js +21 -0
  133. package/dist/esm/Entities/MemoizedNumber.js.map +1 -1
  134. package/dist/esm/Entities/MemoizedQuaternion.js +21 -0
  135. package/dist/esm/Entities/MemoizedQuaternion.js.map +1 -1
  136. package/dist/esm/Entities/MemoizedString.js +21 -0
  137. package/dist/esm/Entities/MemoizedString.js.map +1 -1
  138. package/dist/esm/Entities/MemoizedVector2.js +21 -0
  139. package/dist/esm/Entities/MemoizedVector2.js.map +1 -1
  140. package/dist/esm/Entities/MemoizedVector3.js +21 -0
  141. package/dist/esm/Entities/MemoizedVector3.js.map +1 -1
  142. package/dist/esm/Entities/ObservableEntity.js +17 -0
  143. package/dist/esm/Entities/ObservableEntity.js.map +1 -1
  144. package/dist/esm/Entities/ObserverList.js +21 -0
  145. package/dist/esm/Entities/ObserverList.js.map +1 -1
  146. package/dist/esm/Entities/RangedNumber.js +29 -0
  147. package/dist/esm/Entities/RangedNumber.js.map +1 -1
  148. package/dist/esm/ExampleFeature/Adapters/examplePmAdapter.js +61 -0
  149. package/dist/esm/ExampleFeature/Adapters/examplePmAdapter.js.map +1 -0
  150. package/dist/esm/ExampleFeature/Adapters/exampleSingletonPmAdapter.js +57 -0
  151. package/dist/esm/ExampleFeature/Adapters/exampleSingletonPmAdapter.js.map +1 -0
  152. package/dist/esm/ExampleFeature/Adapters/index.js +3 -0
  153. package/dist/esm/ExampleFeature/Adapters/index.js.map +1 -0
  154. package/dist/esm/ExampleFeature/Controllers/index.js +3 -0
  155. package/dist/esm/ExampleFeature/Controllers/index.js.map +1 -0
  156. package/dist/esm/ExampleFeature/Controllers/setExampleText.js +45 -0
  157. package/dist/esm/ExampleFeature/Controllers/setExampleText.js.map +1 -0
  158. package/dist/esm/ExampleFeature/Controllers/toggleExampleBoolean.js +44 -0
  159. package/dist/esm/ExampleFeature/Controllers/toggleExampleBoolean.js.map +1 -0
  160. package/dist/esm/ExampleFeature/Entities/ExampleEntity.js +85 -0
  161. package/dist/esm/ExampleFeature/Entities/ExampleEntity.js.map +1 -0
  162. package/dist/esm/ExampleFeature/Entities/ExampleRepo.js +108 -0
  163. package/dist/esm/ExampleFeature/Entities/ExampleRepo.js.map +1 -0
  164. package/dist/esm/ExampleFeature/Entities/ExampleSingletonEntity.js +64 -0
  165. package/dist/esm/ExampleFeature/Entities/ExampleSingletonEntity.js.map +1 -0
  166. package/dist/esm/ExampleFeature/Entities/index.js +4 -0
  167. package/dist/esm/ExampleFeature/Entities/index.js.map +1 -0
  168. package/dist/esm/ExampleFeature/Factory/index.js +2 -0
  169. package/dist/esm/ExampleFeature/Factory/index.js.map +1 -0
  170. package/dist/esm/ExampleFeature/Factory/setupExampleFeature.js +26 -0
  171. package/dist/esm/ExampleFeature/Factory/setupExampleFeature.js.map +1 -0
  172. package/dist/esm/ExampleFeature/Mocks/MockEditExampleStringUC.js +43 -0
  173. package/dist/esm/ExampleFeature/Mocks/MockEditExampleStringUC.js.map +1 -0
  174. package/dist/esm/ExampleFeature/Mocks/MockExamplePM.js +44 -0
  175. package/dist/esm/ExampleFeature/Mocks/MockExamplePM.js.map +1 -0
  176. package/dist/esm/ExampleFeature/Mocks/MockExampleSingletonPM.js +54 -0
  177. package/dist/esm/ExampleFeature/Mocks/MockExampleSingletonPM.js.map +1 -0
  178. package/dist/esm/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js +52 -0
  179. package/dist/esm/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js.map +1 -0
  180. package/dist/esm/ExampleFeature/Mocks/index.js +5 -0
  181. package/dist/esm/ExampleFeature/Mocks/index.js.map +1 -0
  182. package/dist/esm/ExampleFeature/PMs/ExamplePM.js +92 -0
  183. package/dist/esm/ExampleFeature/PMs/ExamplePM.js.map +1 -0
  184. package/dist/esm/ExampleFeature/PMs/ExampleSingletonPM.js +97 -0
  185. package/dist/esm/ExampleFeature/PMs/ExampleSingletonPM.js.map +1 -0
  186. package/dist/esm/ExampleFeature/PMs/index.js +3 -0
  187. package/dist/esm/ExampleFeature/PMs/index.js.map +1 -0
  188. package/dist/esm/ExampleFeature/UCs/EditExampleStringUC.js +82 -0
  189. package/dist/esm/ExampleFeature/UCs/EditExampleStringUC.js.map +1 -0
  190. package/dist/esm/ExampleFeature/UCs/ToggleExampleBooleanUC.js +74 -0
  191. package/dist/esm/ExampleFeature/UCs/ToggleExampleBooleanUC.js.map +1 -0
  192. package/dist/esm/ExampleFeature/UCs/index.js +3 -0
  193. package/dist/esm/ExampleFeature/UCs/index.js.map +1 -0
  194. package/dist/esm/ExampleFeature/index.js +8 -0
  195. package/dist/esm/ExampleFeature/index.js.map +1 -0
  196. package/dist/esm/Types/PmAdapter.js.map +1 -1
  197. package/dist/esm/Types/SingletonPmAdapter.js.map +1 -1
  198. package/dist/esm/ValueObjects/Angle.js +1 -1
  199. package/dist/esm/ValueObjects/Angle.js.map +1 -1
  200. package/dist/esm/ValueObjects/LineSegment2D.js +6 -6
  201. package/dist/esm/ValueObjects/LineSegment2D.js.map +1 -1
  202. package/dist/esm/ValueObjects/Matrix.js +6 -6
  203. package/dist/esm/ValueObjects/Matrix.js.map +1 -1
  204. package/dist/esm/ValueObjects/Quaternion.js +17 -17
  205. package/dist/esm/ValueObjects/Quaternion.js.map +1 -1
  206. package/dist/esm/ValueObjects/Vector2.js +15 -8
  207. package/dist/esm/ValueObjects/Vector2.js.map +1 -1
  208. package/dist/esm/index.js +1 -0
  209. package/dist/esm/index.js.map +1 -1
  210. package/dist/types/AppObject/AppObject.d.ts +42 -0
  211. package/dist/types/AppObject/AppObject.d.ts.map +1 -1
  212. package/dist/types/AppObject/AppObjectComponent.d.ts +80 -0
  213. package/dist/types/AppObject/AppObjectComponent.d.ts.map +1 -1
  214. package/dist/types/AppObject/AppObjectController.d.ts +22 -0
  215. package/dist/types/AppObject/AppObjectController.d.ts.map +1 -1
  216. package/dist/types/AppObject/AppObjectEntity.d.ts +55 -0
  217. package/dist/types/AppObject/AppObjectEntity.d.ts.map +1 -1
  218. package/dist/types/AppObject/AppObjectEntityRepo.d.ts +75 -0
  219. package/dist/types/AppObject/AppObjectEntityRepo.d.ts.map +1 -1
  220. package/dist/types/AppObject/AppObjectPM.d.ts +53 -0
  221. package/dist/types/AppObject/AppObjectPM.d.ts.map +1 -1
  222. package/dist/types/AppObject/AppObjectRepo.d.ts +124 -0
  223. package/dist/types/AppObject/AppObjectRepo.d.ts.map +1 -1
  224. package/dist/types/AppObject/AppObjectUC.d.ts +23 -0
  225. package/dist/types/AppObject/AppObjectUC.d.ts.map +1 -1
  226. package/dist/types/AppObject/AppObjectView.d.ts +22 -0
  227. package/dist/types/AppObject/AppObjectView.d.ts.map +1 -1
  228. package/dist/types/AppObject/getSingletonComponent.d.ts +19 -0
  229. package/dist/types/AppObject/getSingletonComponent.d.ts.map +1 -1
  230. package/dist/types/Entities/MemoizedAngle.d.ts +21 -0
  231. package/dist/types/Entities/MemoizedAngle.d.ts.map +1 -1
  232. package/dist/types/Entities/MemoizedBoolean.d.ts +21 -0
  233. package/dist/types/Entities/MemoizedBoolean.d.ts.map +1 -1
  234. package/dist/types/Entities/MemoizedColor.d.ts +21 -0
  235. package/dist/types/Entities/MemoizedColor.d.ts.map +1 -1
  236. package/dist/types/Entities/MemoizedNumber.d.ts +21 -0
  237. package/dist/types/Entities/MemoizedNumber.d.ts.map +1 -1
  238. package/dist/types/Entities/MemoizedQuaternion.d.ts +21 -0
  239. package/dist/types/Entities/MemoizedQuaternion.d.ts.map +1 -1
  240. package/dist/types/Entities/MemoizedString.d.ts +21 -0
  241. package/dist/types/Entities/MemoizedString.d.ts.map +1 -1
  242. package/dist/types/Entities/MemoizedVector2.d.ts +21 -0
  243. package/dist/types/Entities/MemoizedVector2.d.ts.map +1 -1
  244. package/dist/types/Entities/MemoizedVector3.d.ts +21 -0
  245. package/dist/types/Entities/MemoizedVector3.d.ts.map +1 -1
  246. package/dist/types/Entities/ObservableEntity.d.ts +20 -0
  247. package/dist/types/Entities/ObservableEntity.d.ts.map +1 -1
  248. package/dist/types/Entities/ObserverList.d.ts +21 -0
  249. package/dist/types/Entities/ObserverList.d.ts.map +1 -1
  250. package/dist/types/Entities/RangedNumber.d.ts +37 -0
  251. package/dist/types/Entities/RangedNumber.d.ts.map +1 -1
  252. package/dist/types/ExampleFeature/Adapters/examplePmAdapter.d.ts +29 -0
  253. package/dist/types/ExampleFeature/Adapters/examplePmAdapter.d.ts.map +1 -0
  254. package/dist/types/ExampleFeature/Adapters/exampleSingletonPmAdapter.d.ts +31 -0
  255. package/dist/types/ExampleFeature/Adapters/exampleSingletonPmAdapter.d.ts.map +1 -0
  256. package/dist/types/ExampleFeature/Adapters/index.d.ts +3 -0
  257. package/dist/types/ExampleFeature/Adapters/index.d.ts.map +1 -0
  258. package/dist/types/ExampleFeature/Controllers/index.d.ts +3 -0
  259. package/dist/types/ExampleFeature/Controllers/index.d.ts.map +1 -0
  260. package/dist/types/ExampleFeature/Controllers/setExampleText.d.ts +35 -0
  261. package/dist/types/ExampleFeature/Controllers/setExampleText.d.ts.map +1 -0
  262. package/dist/types/ExampleFeature/Controllers/toggleExampleBoolean.d.ts +34 -0
  263. package/dist/types/ExampleFeature/Controllers/toggleExampleBoolean.d.ts.map +1 -0
  264. package/dist/types/ExampleFeature/Entities/ExampleEntity.d.ts +55 -0
  265. package/dist/types/ExampleFeature/Entities/ExampleEntity.d.ts.map +1 -0
  266. package/dist/types/ExampleFeature/Entities/ExampleRepo.d.ts +62 -0
  267. package/dist/types/ExampleFeature/Entities/ExampleRepo.d.ts.map +1 -0
  268. package/dist/types/ExampleFeature/Entities/ExampleSingletonEntity.d.ts +43 -0
  269. package/dist/types/ExampleFeature/Entities/ExampleSingletonEntity.d.ts.map +1 -0
  270. package/dist/types/ExampleFeature/Entities/index.d.ts +4 -0
  271. package/dist/types/ExampleFeature/Entities/index.d.ts.map +1 -0
  272. package/dist/types/ExampleFeature/Factory/index.d.ts +2 -0
  273. package/dist/types/ExampleFeature/Factory/index.d.ts.map +1 -0
  274. package/dist/types/ExampleFeature/Factory/setupExampleFeature.d.ts +17 -0
  275. package/dist/types/ExampleFeature/Factory/setupExampleFeature.d.ts.map +1 -0
  276. package/dist/types/ExampleFeature/Mocks/MockEditExampleStringUC.d.ts +42 -0
  277. package/dist/types/ExampleFeature/Mocks/MockEditExampleStringUC.d.ts.map +1 -0
  278. package/dist/types/ExampleFeature/Mocks/MockExamplePM.d.ts +41 -0
  279. package/dist/types/ExampleFeature/Mocks/MockExamplePM.d.ts.map +1 -0
  280. package/dist/types/ExampleFeature/Mocks/MockExampleSingletonPM.d.ts +49 -0
  281. package/dist/types/ExampleFeature/Mocks/MockExampleSingletonPM.d.ts.map +1 -0
  282. package/dist/types/ExampleFeature/Mocks/MockToggleExampleBooleanUC.d.ts +47 -0
  283. package/dist/types/ExampleFeature/Mocks/MockToggleExampleBooleanUC.d.ts.map +1 -0
  284. package/dist/types/ExampleFeature/Mocks/index.d.ts +5 -0
  285. package/dist/types/ExampleFeature/Mocks/index.d.ts.map +1 -0
  286. package/dist/types/ExampleFeature/PMs/ExamplePM.d.ts +42 -0
  287. package/dist/types/ExampleFeature/PMs/ExamplePM.d.ts.map +1 -0
  288. package/dist/types/ExampleFeature/PMs/ExampleSingletonPM.d.ts +52 -0
  289. package/dist/types/ExampleFeature/PMs/ExampleSingletonPM.d.ts.map +1 -0
  290. package/dist/types/ExampleFeature/PMs/index.d.ts +3 -0
  291. package/dist/types/ExampleFeature/PMs/index.d.ts.map +1 -0
  292. package/dist/types/ExampleFeature/UCs/EditExampleStringUC.d.ts +52 -0
  293. package/dist/types/ExampleFeature/UCs/EditExampleStringUC.d.ts.map +1 -0
  294. package/dist/types/ExampleFeature/UCs/ToggleExampleBooleanUC.d.ts +44 -0
  295. package/dist/types/ExampleFeature/UCs/ToggleExampleBooleanUC.d.ts.map +1 -0
  296. package/dist/types/ExampleFeature/UCs/index.d.ts +3 -0
  297. package/dist/types/ExampleFeature/UCs/index.d.ts.map +1 -0
  298. package/dist/types/ExampleFeature/index.d.ts +8 -0
  299. package/dist/types/ExampleFeature/index.d.ts.map +1 -0
  300. package/dist/types/Types/PmAdapter.d.ts +60 -0
  301. package/dist/types/Types/PmAdapter.d.ts.map +1 -1
  302. package/dist/types/Types/SingletonPmAdapter.d.ts +55 -0
  303. package/dist/types/Types/SingletonPmAdapter.d.ts.map +1 -1
  304. package/dist/types/ValueObjects/Angle.d.ts +1 -1
  305. package/dist/types/ValueObjects/Matrix.d.ts +5 -5
  306. package/dist/types/ValueObjects/Matrix.d.ts.map +1 -1
  307. package/dist/types/ValueObjects/Quaternion.d.ts +17 -17
  308. package/dist/types/ValueObjects/Vector2.d.ts +8 -3
  309. package/dist/types/ValueObjects/Vector2.d.ts.map +1 -1
  310. package/dist/types/index.d.ts +1 -0
  311. package/dist/types/index.d.ts.map +1 -1
  312. package/package.json +6 -4
  313. package/dist/cjs/AppObject/AppObject.test.js +0 -113
  314. package/dist/cjs/AppObject/AppObject.test.js.map +0 -1
  315. package/dist/cjs/AppObject/AppObjectComponent.test.js +0 -132
  316. package/dist/cjs/AppObject/AppObjectComponent.test.js.map +0 -1
  317. package/dist/cjs/AppObject/AppObjectEntity.test.js +0 -108
  318. package/dist/cjs/AppObject/AppObjectEntity.test.js.map +0 -1
  319. package/dist/cjs/AppObject/AppObjectEntityRepo.test.js +0 -149
  320. package/dist/cjs/AppObject/AppObjectEntityRepo.test.js.map +0 -1
  321. package/dist/cjs/AppObject/AppObjectPM.test.js +0 -103
  322. package/dist/cjs/AppObject/AppObjectPM.test.js.map +0 -1
  323. package/dist/cjs/AppObject/AppObjectRepo.test.js +0 -213
  324. package/dist/cjs/AppObject/AppObjectRepo.test.js.map +0 -1
  325. package/dist/cjs/AppObject/getSingletonComponent.test.js +0 -13
  326. package/dist/cjs/AppObject/getSingletonComponent.test.js.map +0 -1
  327. package/dist/cjs/Entities/MemoizedAngle.test.js +0 -30
  328. package/dist/cjs/Entities/MemoizedAngle.test.js.map +0 -1
  329. package/dist/cjs/Entities/MemoizedBoolean.test.js +0 -34
  330. package/dist/cjs/Entities/MemoizedBoolean.test.js.map +0 -1
  331. package/dist/cjs/Entities/MemoizedColor.test.js +0 -32
  332. package/dist/cjs/Entities/MemoizedColor.test.js.map +0 -1
  333. package/dist/cjs/Entities/MemoizedNumber.test.js +0 -29
  334. package/dist/cjs/Entities/MemoizedNumber.test.js.map +0 -1
  335. package/dist/cjs/Entities/MemoizedQuaternion.test.js +0 -32
  336. package/dist/cjs/Entities/MemoizedQuaternion.test.js.map +0 -1
  337. package/dist/cjs/Entities/MemoizedString.test.js +0 -29
  338. package/dist/cjs/Entities/MemoizedString.test.js.map +0 -1
  339. package/dist/cjs/Entities/MemoizedVector2.test.js +0 -32
  340. package/dist/cjs/Entities/MemoizedVector2.test.js.map +0 -1
  341. package/dist/cjs/Entities/MemoizedVector3.test.js +0 -32
  342. package/dist/cjs/Entities/MemoizedVector3.test.js.map +0 -1
  343. package/dist/cjs/Entities/ObservableEntity.test.js +0 -25
  344. package/dist/cjs/Entities/ObservableEntity.test.js.map +0 -1
  345. package/dist/cjs/Entities/ObserverList.test.js +0 -44
  346. package/dist/cjs/Entities/ObserverList.test.js.map +0 -1
  347. package/dist/cjs/Entities/RangedNumber.test.js +0 -96
  348. package/dist/cjs/Entities/RangedNumber.test.js.map +0 -1
  349. package/dist/cjs/Utilities/LengthConverters.test.js +0 -24
  350. package/dist/cjs/Utilities/LengthConverters.test.js.map +0 -1
  351. package/dist/cjs/Utilities/LerpNumber.test.js +0 -90
  352. package/dist/cjs/Utilities/LerpNumber.test.js.map +0 -1
  353. package/dist/cjs/Utilities/addAlphaToHex.test.js +0 -34
  354. package/dist/cjs/Utilities/addAlphaToHex.test.js.map +0 -1
  355. package/dist/cjs/Utilities/alphaToHex.test.js +0 -75
  356. package/dist/cjs/Utilities/alphaToHex.test.js.map +0 -1
  357. package/dist/cjs/Utilities/degreesToRadians.test.js +0 -9
  358. package/dist/cjs/Utilities/degreesToRadians.test.js.map +0 -1
  359. package/dist/cjs/Utilities/easeFunctions.test.js +0 -209
  360. package/dist/cjs/Utilities/easeFunctions.test.js.map +0 -1
  361. package/dist/cjs/Utilities/interpolateNumber.test.js +0 -26
  362. package/dist/cjs/Utilities/interpolateNumber.test.js.map +0 -1
  363. package/dist/cjs/ValueObjects/Angle.test.js +0 -28
  364. package/dist/cjs/ValueObjects/Angle.test.js.map +0 -1
  365. package/dist/cjs/ValueObjects/Color.test.js +0 -147
  366. package/dist/cjs/ValueObjects/Color.test.js.map +0 -1
  367. package/dist/cjs/ValueObjects/LineSegment2D.test.js +0 -102
  368. package/dist/cjs/ValueObjects/LineSegment2D.test.js.map +0 -1
  369. package/dist/cjs/ValueObjects/Matrix.test.js +0 -385
  370. package/dist/cjs/ValueObjects/Matrix.test.js.map +0 -1
  371. package/dist/cjs/ValueObjects/ParametricLine.test.js +0 -126
  372. package/dist/cjs/ValueObjects/ParametricLine.test.js.map +0 -1
  373. package/dist/cjs/ValueObjects/ParametricPlane.test.js +0 -101
  374. package/dist/cjs/ValueObjects/ParametricPlane.test.js.map +0 -1
  375. package/dist/cjs/ValueObjects/Quaternion.test.js +0 -240
  376. package/dist/cjs/ValueObjects/Quaternion.test.js.map +0 -1
  377. package/dist/cjs/ValueObjects/Rectangle.test.js +0 -32
  378. package/dist/cjs/ValueObjects/Rectangle.test.js.map +0 -1
  379. package/dist/cjs/ValueObjects/Vector2.test.js +0 -136
  380. package/dist/cjs/ValueObjects/Vector2.test.js.map +0 -1
  381. package/dist/cjs/ValueObjects/Vector3.test.js +0 -188
  382. package/dist/cjs/ValueObjects/Vector3.test.js.map +0 -1
  383. package/dist/cjs/ValueObjects/Version.test.js +0 -310
  384. package/dist/cjs/ValueObjects/Version.test.js.map +0 -1
  385. package/dist/esm/AppObject/AppObject.test.js +0 -110
  386. package/dist/esm/AppObject/AppObject.test.js.map +0 -1
  387. package/dist/esm/AppObject/AppObjectComponent.test.js +0 -130
  388. package/dist/esm/AppObject/AppObjectComponent.test.js.map +0 -1
  389. package/dist/esm/AppObject/AppObjectEntity.test.js +0 -106
  390. package/dist/esm/AppObject/AppObjectEntity.test.js.map +0 -1
  391. package/dist/esm/AppObject/AppObjectEntityRepo.test.js +0 -147
  392. package/dist/esm/AppObject/AppObjectEntityRepo.test.js.map +0 -1
  393. package/dist/esm/AppObject/AppObjectPM.test.js +0 -101
  394. package/dist/esm/AppObject/AppObjectPM.test.js.map +0 -1
  395. package/dist/esm/AppObject/AppObjectRepo.test.js +0 -211
  396. package/dist/esm/AppObject/AppObjectRepo.test.js.map +0 -1
  397. package/dist/esm/AppObject/getSingletonComponent.test.js +0 -11
  398. package/dist/esm/AppObject/getSingletonComponent.test.js.map +0 -1
  399. package/dist/esm/Entities/MemoizedAngle.test.js +0 -28
  400. package/dist/esm/Entities/MemoizedAngle.test.js.map +0 -1
  401. package/dist/esm/Entities/MemoizedBoolean.test.js +0 -32
  402. package/dist/esm/Entities/MemoizedBoolean.test.js.map +0 -1
  403. package/dist/esm/Entities/MemoizedColor.test.js +0 -30
  404. package/dist/esm/Entities/MemoizedColor.test.js.map +0 -1
  405. package/dist/esm/Entities/MemoizedNumber.test.js +0 -27
  406. package/dist/esm/Entities/MemoizedNumber.test.js.map +0 -1
  407. package/dist/esm/Entities/MemoizedQuaternion.test.js +0 -30
  408. package/dist/esm/Entities/MemoizedQuaternion.test.js.map +0 -1
  409. package/dist/esm/Entities/MemoizedString.test.js +0 -27
  410. package/dist/esm/Entities/MemoizedString.test.js.map +0 -1
  411. package/dist/esm/Entities/MemoizedVector2.test.js +0 -30
  412. package/dist/esm/Entities/MemoizedVector2.test.js.map +0 -1
  413. package/dist/esm/Entities/MemoizedVector3.test.js +0 -30
  414. package/dist/esm/Entities/MemoizedVector3.test.js.map +0 -1
  415. package/dist/esm/Entities/ObservableEntity.test.js +0 -23
  416. package/dist/esm/Entities/ObservableEntity.test.js.map +0 -1
  417. package/dist/esm/Entities/ObserverList.test.js +0 -42
  418. package/dist/esm/Entities/ObserverList.test.js.map +0 -1
  419. package/dist/esm/Entities/RangedNumber.test.js +0 -94
  420. package/dist/esm/Entities/RangedNumber.test.js.map +0 -1
  421. package/dist/esm/Utilities/LengthConverters.test.js +0 -22
  422. package/dist/esm/Utilities/LengthConverters.test.js.map +0 -1
  423. package/dist/esm/Utilities/LerpNumber.test.js +0 -88
  424. package/dist/esm/Utilities/LerpNumber.test.js.map +0 -1
  425. package/dist/esm/Utilities/addAlphaToHex.test.js +0 -32
  426. package/dist/esm/Utilities/addAlphaToHex.test.js.map +0 -1
  427. package/dist/esm/Utilities/alphaToHex.test.js +0 -73
  428. package/dist/esm/Utilities/alphaToHex.test.js.map +0 -1
  429. package/dist/esm/Utilities/degreesToRadians.test.js +0 -7
  430. package/dist/esm/Utilities/degreesToRadians.test.js.map +0 -1
  431. package/dist/esm/Utilities/easeFunctions.test.js +0 -207
  432. package/dist/esm/Utilities/easeFunctions.test.js.map +0 -1
  433. package/dist/esm/Utilities/interpolateNumber.test.js +0 -24
  434. package/dist/esm/Utilities/interpolateNumber.test.js.map +0 -1
  435. package/dist/esm/ValueObjects/Angle.test.js +0 -26
  436. package/dist/esm/ValueObjects/Angle.test.js.map +0 -1
  437. package/dist/esm/ValueObjects/Color.test.js +0 -145
  438. package/dist/esm/ValueObjects/Color.test.js.map +0 -1
  439. package/dist/esm/ValueObjects/LineSegment2D.test.js +0 -100
  440. package/dist/esm/ValueObjects/LineSegment2D.test.js.map +0 -1
  441. package/dist/esm/ValueObjects/Matrix.test.js +0 -383
  442. package/dist/esm/ValueObjects/Matrix.test.js.map +0 -1
  443. package/dist/esm/ValueObjects/ParametricLine.test.js +0 -124
  444. package/dist/esm/ValueObjects/ParametricLine.test.js.map +0 -1
  445. package/dist/esm/ValueObjects/ParametricPlane.test.js +0 -99
  446. package/dist/esm/ValueObjects/ParametricPlane.test.js.map +0 -1
  447. package/dist/esm/ValueObjects/Quaternion.test.js +0 -238
  448. package/dist/esm/ValueObjects/Quaternion.test.js.map +0 -1
  449. package/dist/esm/ValueObjects/Rectangle.test.js +0 -30
  450. package/dist/esm/ValueObjects/Rectangle.test.js.map +0 -1
  451. package/dist/esm/ValueObjects/Vector2.test.js +0 -134
  452. package/dist/esm/ValueObjects/Vector2.test.js.map +0 -1
  453. package/dist/esm/ValueObjects/Vector3.test.js +0 -186
  454. package/dist/esm/ValueObjects/Vector3.test.js.map +0 -1
  455. package/dist/esm/ValueObjects/Version.test.js +0 -308
  456. package/dist/esm/ValueObjects/Version.test.js.map +0 -1
  457. package/dist/types/AppObject/AppObject.test.d.ts +0 -7
  458. package/dist/types/AppObject/AppObject.test.d.ts.map +0 -1
  459. package/dist/types/AppObject/AppObjectComponent.test.d.ts +0 -2
  460. package/dist/types/AppObject/AppObjectComponent.test.d.ts.map +0 -1
  461. package/dist/types/AppObject/AppObjectEntity.test.d.ts +0 -2
  462. package/dist/types/AppObject/AppObjectEntity.test.d.ts.map +0 -1
  463. package/dist/types/AppObject/AppObjectEntityRepo.test.d.ts +0 -2
  464. package/dist/types/AppObject/AppObjectEntityRepo.test.d.ts.map +0 -1
  465. package/dist/types/AppObject/AppObjectPM.test.d.ts +0 -2
  466. package/dist/types/AppObject/AppObjectPM.test.d.ts.map +0 -1
  467. package/dist/types/AppObject/AppObjectRepo.test.d.ts +0 -2
  468. package/dist/types/AppObject/AppObjectRepo.test.d.ts.map +0 -1
  469. package/dist/types/AppObject/getSingletonComponent.test.d.ts +0 -2
  470. package/dist/types/AppObject/getSingletonComponent.test.d.ts.map +0 -1
  471. package/dist/types/Entities/MemoizedAngle.test.d.ts +0 -2
  472. package/dist/types/Entities/MemoizedAngle.test.d.ts.map +0 -1
  473. package/dist/types/Entities/MemoizedBoolean.test.d.ts +0 -2
  474. package/dist/types/Entities/MemoizedBoolean.test.d.ts.map +0 -1
  475. package/dist/types/Entities/MemoizedColor.test.d.ts +0 -2
  476. package/dist/types/Entities/MemoizedColor.test.d.ts.map +0 -1
  477. package/dist/types/Entities/MemoizedNumber.test.d.ts +0 -2
  478. package/dist/types/Entities/MemoizedNumber.test.d.ts.map +0 -1
  479. package/dist/types/Entities/MemoizedQuaternion.test.d.ts +0 -2
  480. package/dist/types/Entities/MemoizedQuaternion.test.d.ts.map +0 -1
  481. package/dist/types/Entities/MemoizedString.test.d.ts +0 -2
  482. package/dist/types/Entities/MemoizedString.test.d.ts.map +0 -1
  483. package/dist/types/Entities/MemoizedVector2.test.d.ts +0 -2
  484. package/dist/types/Entities/MemoizedVector2.test.d.ts.map +0 -1
  485. package/dist/types/Entities/MemoizedVector3.test.d.ts +0 -2
  486. package/dist/types/Entities/MemoizedVector3.test.d.ts.map +0 -1
  487. package/dist/types/Entities/ObservableEntity.test.d.ts +0 -2
  488. package/dist/types/Entities/ObservableEntity.test.d.ts.map +0 -1
  489. package/dist/types/Entities/ObserverList.test.d.ts +0 -2
  490. package/dist/types/Entities/ObserverList.test.d.ts.map +0 -1
  491. package/dist/types/Entities/RangedNumber.test.d.ts +0 -2
  492. package/dist/types/Entities/RangedNumber.test.d.ts.map +0 -1
  493. package/dist/types/Utilities/LengthConverters.test.d.ts +0 -2
  494. package/dist/types/Utilities/LengthConverters.test.d.ts.map +0 -1
  495. package/dist/types/Utilities/LerpNumber.test.d.ts +0 -2
  496. package/dist/types/Utilities/LerpNumber.test.d.ts.map +0 -1
  497. package/dist/types/Utilities/addAlphaToHex.test.d.ts +0 -2
  498. package/dist/types/Utilities/addAlphaToHex.test.d.ts.map +0 -1
  499. package/dist/types/Utilities/alphaToHex.test.d.ts +0 -2
  500. package/dist/types/Utilities/alphaToHex.test.d.ts.map +0 -1
  501. package/dist/types/Utilities/degreesToRadians.test.d.ts +0 -2
  502. package/dist/types/Utilities/degreesToRadians.test.d.ts.map +0 -1
  503. package/dist/types/Utilities/easeFunctions.test.d.ts +0 -2
  504. package/dist/types/Utilities/easeFunctions.test.d.ts.map +0 -1
  505. package/dist/types/Utilities/interpolateNumber.test.d.ts +0 -2
  506. package/dist/types/Utilities/interpolateNumber.test.d.ts.map +0 -1
  507. package/dist/types/ValueObjects/Angle.test.d.ts +0 -2
  508. package/dist/types/ValueObjects/Angle.test.d.ts.map +0 -1
  509. package/dist/types/ValueObjects/Color.test.d.ts +0 -2
  510. package/dist/types/ValueObjects/Color.test.d.ts.map +0 -1
  511. package/dist/types/ValueObjects/LineSegment2D.test.d.ts +0 -2
  512. package/dist/types/ValueObjects/LineSegment2D.test.d.ts.map +0 -1
  513. package/dist/types/ValueObjects/Matrix.test.d.ts +0 -2
  514. package/dist/types/ValueObjects/Matrix.test.d.ts.map +0 -1
  515. package/dist/types/ValueObjects/ParametricLine.test.d.ts +0 -2
  516. package/dist/types/ValueObjects/ParametricLine.test.d.ts.map +0 -1
  517. package/dist/types/ValueObjects/ParametricPlane.test.d.ts +0 -2
  518. package/dist/types/ValueObjects/ParametricPlane.test.d.ts.map +0 -1
  519. package/dist/types/ValueObjects/Quaternion.test.d.ts +0 -2
  520. package/dist/types/ValueObjects/Quaternion.test.d.ts.map +0 -1
  521. package/dist/types/ValueObjects/Rectangle.test.d.ts +0 -2
  522. package/dist/types/ValueObjects/Rectangle.test.d.ts.map +0 -1
  523. package/dist/types/ValueObjects/Vector2.test.d.ts +0 -2
  524. package/dist/types/ValueObjects/Vector2.test.d.ts.map +0 -1
  525. package/dist/types/ValueObjects/Vector3.test.d.ts +0 -2
  526. package/dist/types/ValueObjects/Vector3.test.d.ts.map +0 -1
  527. package/dist/types/ValueObjects/Version.test.d.ts +0 -2
  528. package/dist/types/ValueObjects/Version.test.d.ts.map +0 -1
@@ -0,0 +1,55 @@
1
+ /**
2
+ * ExampleEntity.ts
3
+ *
4
+ * This file demonstrates how to implement a standard (non-singleton) entity in the application.
5
+ * Entities store and manage data, track state changes, and notify observers when changes occur.
6
+ *
7
+ * Key concepts:
8
+ * - Entity classes extend AppObjectEntity
9
+ * - They provide access to data properties
10
+ * - They use Memoized types (MemoizedString, MemoizedBoolean, etc.) to track changes
11
+ * - They notify observers when properties change
12
+ *
13
+ * Usage pattern:
14
+ * 1. Get or create an entity instance using getById, get, or addIfMissing
15
+ * 2. Access or modify properties via getters/setters
16
+ * 3. Register change observers to react to property updates
17
+ */
18
+ import { AppObject, AppObjectEntity, AppObjectRepo } from "../../AppObject";
19
+ /**
20
+ * ExampleEntity represents a basic entity with a string property.
21
+ * Abstract class provides the interface and static helper methods.
22
+ */
23
+ export declare abstract class ExampleEntity extends AppObjectEntity {
24
+ /** Unique type identifier for this component */
25
+ static readonly type = "ExampleEntityType";
26
+ /** String property accessor methods that must be implemented */
27
+ abstract get aStringProperty(): string;
28
+ abstract set aStringProperty(val: string);
29
+ /**
30
+ * Retrieves an ExampleEntity component from an AppObject
31
+ * @param appObj The AppObject to get the component from
32
+ * @returns The ExampleEntity component or undefined if not found
33
+ */
34
+ static get(appObj: AppObject): ExampleEntity | undefined;
35
+ /**
36
+ * Retrieves an ExampleEntity by its parent AppObject's ID
37
+ * @param id The ID of the parent AppObject
38
+ * @param appObjects The AppObjectRepo to search in
39
+ * @returns The ExampleEntity component or undefined if not found
40
+ */
41
+ static getById(id: string, appObjects: AppObjectRepo): ExampleEntity | undefined;
42
+ /**
43
+ * Ensures an ExampleEntity exists on the AppObject, creating one if needed
44
+ * @param appObj The AppObject to check/add the component to
45
+ * @returns The existing or newly created ExampleEntity
46
+ */
47
+ static addIfMissing(appObj: AppObject): ExampleEntity;
48
+ }
49
+ /**
50
+ * Factory function to create a new ExampleEntity
51
+ * @param appObject The AppObject to attach the entity to
52
+ * @returns A new ExampleEntity instance
53
+ */
54
+ export declare function makeExampleEntity(appObject: AppObject): ExampleEntity;
55
+ //# sourceMappingURL=ExampleEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleEntity.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/ExampleEntity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,iBAAiB,CAAC;AAGzB;;;GAGG;AACH,8BAAsB,aAAc,SAAQ,eAAe;IACzD,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,uBAAuB;IAE3C,gEAAgE;IAChE,QAAQ,KAAK,eAAe,IAAI,MAAM,CAAC;IACvC,QAAQ,KAAK,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE;IAE1C;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS;IAIxD;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,aAAa,GAAG,SAAS;IAI5B;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa;CAQtD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,GACnB,aAAa,CAEf"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * ExampleRepo.ts
3
+ *
4
+ * This file demonstrates how to implement a repository to manage collections of entities.
5
+ * Repositories are responsible for creating, retrieving, and deleting entities.
6
+ *
7
+ * Key concepts:
8
+ * - Repositories extend AppObjectEntityRepo<T> where T is the entity type
9
+ * - They provide methods to create and delete entities
10
+ * - They manage collections of entities and provide access to them
11
+ * - They can use custom entity factories to create specialized entities
12
+ *
13
+ * Usage pattern:
14
+ * 1. Get or create a repository using getById, get, or addIfMissing
15
+ * 2. Use the repository to create new entities
16
+ * 3. Access entities through the repository's getters
17
+ * 4. Delete entities through the repository when they're no longer needed
18
+ */
19
+ import { AppObject, AppObjectEntityRepo, AppObjectRepo } from "../../AppObject";
20
+ import { ExampleEntity } from "./ExampleEntity";
21
+ /** Type definition for a factory function that creates ExampleEntity instances */
22
+ export type ExampleEntityFactory = (id: string) => ExampleEntity;
23
+ /**
24
+ * ExampleRepo manages a collection of ExampleEntity instances.
25
+ * Abstract class provides the interface and static helper methods.
26
+ */
27
+ export declare abstract class ExampleRepo extends AppObjectEntityRepo<ExampleEntity> {
28
+ /** Unique type identifier for this component */
29
+ static readonly type = "ExampleRepoType";
30
+ /** Factory function used to create new entities */
31
+ abstract exampleEntityFactory: ExampleEntityFactory;
32
+ /** Creates a new entity with an optional ID */
33
+ abstract createExampleEntity(id?: string): ExampleEntity;
34
+ /** Deletes an entity by its AppObject ID */
35
+ abstract deleteExampleEntity(id: string): void;
36
+ /**
37
+ * Retrieves an ExampleRepo component from an AppObject
38
+ * @param appObj The AppObject to get the component from
39
+ * @returns The ExampleRepo component or undefined if not found
40
+ */
41
+ static get(appObj: AppObject): ExampleRepo | undefined;
42
+ /**
43
+ * Retrieves an ExampleRepo by its parent AppObject's ID
44
+ * @param id The ID of the parent AppObject
45
+ * @param appObjects The AppObjectRepo to search in
46
+ * @returns The ExampleRepo component or undefined if not found
47
+ */
48
+ static getById(id: string, appObjects: AppObjectRepo): ExampleRepo | undefined;
49
+ /**
50
+ * Ensures an ExampleRepo exists on the AppObject, creating one if needed
51
+ * @param appObject The AppObject to check/add the component to
52
+ * @returns The existing or newly created ExampleRepo
53
+ */
54
+ static addIfMissing(appObject: AppObject): ExampleRepo;
55
+ }
56
+ /**
57
+ * Factory function to create a new ExampleRepo
58
+ * @param appObject The AppObject to attach the repo to
59
+ * @returns A new ExampleRepo instance
60
+ */
61
+ export declare function makeExampleRepo(appObject: AppObject): ExampleRepo;
62
+ //# sourceMappingURL=ExampleRepo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleRepo.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/ExampleRepo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAqB,MAAM,iBAAiB,CAAC;AAEnE,kFAAkF;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,aAAa,CAAC;AAEjE;;;GAGG;AACH,8BAAsB,WAAY,SAAQ,mBAAmB,CAAC,aAAa,CAAC;IAC1E,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,qBAAqB;IAEzC,mDAAmD;IACnD,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAEpD,+CAA+C;IAC/C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,aAAa;IAExD,4CAA4C;IAC5C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAE9C;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS;IAItD;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,WAAW,GAAG,SAAS;IAI1B;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW;CAQvD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAEjE"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * ExampleSingletonEntity.ts
3
+ *
4
+ * This file demonstrates how to implement a singleton entity in the application.
5
+ * Singleton entities are special entities that exist only once in the application
6
+ * and can be accessed globally from anywhere.
7
+ *
8
+ * Key concepts:
9
+ * - Singleton entities extend AppObjectEntity like regular entities
10
+ * - They register themselves as singletons with appObjects.registerSingleton()
11
+ * - They're accessed through a static get() method using getSingletonComponent()
12
+ * - There's only one instance of a singleton entity in the entire application
13
+ *
14
+ * Usage pattern:
15
+ * 1. Access the singleton entity using the static get() method
16
+ * 2. Access or modify properties via getters/setters
17
+ * 3. Register change observers to react to property updates
18
+ */
19
+ import { AppObject, AppObjectEntity, AppObjectRepo } from "../../AppObject";
20
+ /**
21
+ * SingletonEntityExample represents a global entity with a boolean property.
22
+ * As a singleton, only one instance exists in the application.
23
+ */
24
+ export declare abstract class SingletonEntityExample extends AppObjectEntity {
25
+ /** Unique type identifier for this component */
26
+ static readonly type = "SingletonEntityExampleType";
27
+ /** Boolean property accessor methods that must be implemented */
28
+ abstract get aBoolProperty(): boolean;
29
+ abstract set aBoolProperty(val: boolean);
30
+ /**
31
+ * Global accessor for the singleton entity
32
+ * @param appObjects The AppObjectRepo to search in
33
+ * @returns The singleton entity or undefined if not created yet
34
+ */
35
+ static get: (appObjects: AppObjectRepo) => SingletonEntityExample | undefined;
36
+ }
37
+ /**
38
+ * Factory function to create a new SingletonEntityExample
39
+ * @param appObject The AppObject to attach the entity to
40
+ * @returns A new SingletonEntityExample instance
41
+ */
42
+ export declare function makeSingletonEntityExample(appObject: AppObject): SingletonEntityExample;
43
+ //# sourceMappingURL=ExampleSingletonEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleSingletonEntity.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/ExampleSingletonEntity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,iBAAiB,CAAC;AAIzB;;;GAGG;AACH,8BAAsB,sBAAuB,SAAQ,eAAe;IAClE,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,gCAAgC;IAEpD,iEAAiE;IACjE,QAAQ,KAAK,aAAa,IAAI,OAAO,CAAC;IACtC,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE;IAEzC;;;;OAIG;IACH,MAAM,CAAC,GAAG,GACR,YAAY,aAAa,KACxB,sBAAsB,GAAG,SAAS,CAC4B;CAClE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,GACnB,sBAAsB,CAExB"}
@@ -0,0 +1,4 @@
1
+ export * from "./ExampleEntity";
2
+ export * from "./ExampleRepo";
3
+ export * from "./ExampleSingletonEntity";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./setupExampleFeature";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * setupExampleFeature.ts
3
+ *
4
+ * This file provides a setup function to initialize the ExampleFeature components.
5
+ * It creates a dedicated AppObject for ExampleFeature and adds all required
6
+ * singleton components to it.
7
+ */
8
+ import { AppObjectRepo } from "../../AppObject";
9
+ import { SingletonEntityExample } from "../Entities/ExampleSingletonEntity";
10
+ /**
11
+ * Sets up the ExampleFeature by creating an AppObject and attaching required components.
12
+ *
13
+ * @param appObjects - Repository of AppObjects to use for creating the feature
14
+ * @returns The singleton entity instance
15
+ */
16
+ export declare function setupExampleFeature(appObjects: AppObjectRepo): SingletonEntityExample;
17
+ //# sourceMappingURL=setupExampleFeature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupExampleFeature.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Factory/setupExampleFeature.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAA8B,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAIxG;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,GAAG,sBAAsB,CAUrF"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * MockEditExampleStringUC.ts
3
+ *
4
+ * This file demonstrates how to implement a mock UC for testing.
5
+ * Mock UCs extend the real UC classes but override their methods with test implementations.
6
+ * This allows tests to verify that the UC methods are called correctly without
7
+ * actually modifying entities or performing real operations.
8
+ *
9
+ * Key concepts:
10
+ * - Mock UCs extend the real UC classes
11
+ * - They override methods with test implementations (often empty or spy functions)
12
+ * - They're used in unit tests to isolate components from their dependencies
13
+ * - They help verify that methods are called with the correct parameters
14
+ *
15
+ * Usage pattern (in tests):
16
+ * ```typescript
17
+ * // In a test file
18
+ * const mockUC = new MockEditExampleStringUC(appObject);
19
+ * const spy = jest.spyOn(mockUC, 'editExampleString');
20
+ *
21
+ * // Call the function that should use the UC
22
+ * someFunction(appObject);
23
+ *
24
+ * // Verify the UC method was called correctly
25
+ * expect(spy).toHaveBeenCalledWith('expected value');
26
+ * ```
27
+ */
28
+ import { AppObject } from "../../AppObject";
29
+ import { EditExampleStringUC } from "../UCs/EditExampleStringUC";
30
+ /**
31
+ * Mock implementation of EditExampleStringUC for testing
32
+ * Provides a no-op implementation of editExampleString that can be spied on in tests
33
+ */
34
+ export declare class MockEditExampleStringUC extends EditExampleStringUC {
35
+ /**
36
+ * Mock implementation that does nothing
37
+ * In tests, this can be replaced with a Jest spy to track calls
38
+ */
39
+ editExampleString: (text: string) => void;
40
+ constructor(appObject: AppObject);
41
+ }
42
+ //# sourceMappingURL=MockEditExampleStringUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockEditExampleStringUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockEditExampleStringUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D;;;OAGG;IACH,iBAAiB,GAAI,MAAM,MAAM,KAAG,IAAI,CAAO;gBAEnC,SAAS,EAAE,SAAS;CAGjC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * MockExamplePM.ts
3
+ *
4
+ * This file demonstrates how to implement a mock PM for testing.
5
+ * Mock PMs extend the real PM classes but override their methods with test implementations.
6
+ * This allows tests to verify PM behavior without depending on real entities.
7
+ *
8
+ * Key concepts:
9
+ * - Mock PMs extend the real PM classes
10
+ * - They override methods with test implementations
11
+ * - They're used in unit tests to isolate components from their dependencies
12
+ * - They help test adapters and other components that use PMs
13
+ *
14
+ * Usage pattern (in tests):
15
+ * ```typescript
16
+ * // In a test file
17
+ * const mockPM = new MockExamplePM(appObject);
18
+ * const addViewSpy = jest.spyOn(mockPM, 'addView');
19
+ *
20
+ * // Test the component that uses the PM
21
+ * adapter.subscribe(id, appObjects, setVM);
22
+ *
23
+ * // Verify the PM method was called correctly
24
+ * expect(addViewSpy).toHaveBeenCalledWith(setVM);
25
+ * ```
26
+ */
27
+ import { AppObject } from "../../AppObject";
28
+ import { ExamplePM } from "../PMs/ExamplePM";
29
+ /**
30
+ * Mock implementation of ExamplePM for testing
31
+ * Provides simplified implementations of required methods
32
+ */
33
+ export declare class MockExamplePM extends ExamplePM {
34
+ /**
35
+ * Simplified implementation that always returns true
36
+ * This avoids the need to implement real comparison logic in tests
37
+ */
38
+ vmsAreEqual: () => boolean;
39
+ constructor(appObject: AppObject);
40
+ }
41
+ //# sourceMappingURL=MockExamplePM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockExamplePM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockExamplePM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;OAGG;IACH,WAAW,gBAET;gBAEU,SAAS,EAAE,SAAS;CAGjC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * MockExampleSingletonPM.ts
3
+ *
4
+ * This file demonstrates how to implement a mock singleton PM for testing.
5
+ * Mock singleton PMs extend the real singleton PM classes and provide helper
6
+ * functions to create and access them in tests.
7
+ *
8
+ * Key concepts:
9
+ * - Mock singleton PMs extend the real singleton PM classes
10
+ * - They override methods with test implementations
11
+ * - They include helper functions to create and access them in tests
12
+ * - They're used to test adapters and controllers that depend on singleton PMs
13
+ *
14
+ * Usage pattern (in tests):
15
+ * ```typescript
16
+ * // In a test file
17
+ * const mockPM = makeMockExampleSingletonPM(appObjects);
18
+ * const addViewSpy = jest.spyOn(mockPM, 'addView');
19
+ *
20
+ * // Test the component that uses the singleton PM
21
+ * adapter.subscribe(appObjects, setVM);
22
+ *
23
+ * // Verify the PM method was called correctly
24
+ * expect(addViewSpy).toHaveBeenCalledWith(setVM);
25
+ * ```
26
+ */
27
+ import { AppObject, AppObjectRepo } from "../../AppObject";
28
+ import { ExampleSingletonPM } from "../PMs/ExampleSingletonPM";
29
+ /**
30
+ * Mock implementation of ExampleSingletonPM for testing
31
+ * Provides simplified implementations of required methods
32
+ */
33
+ export declare class MockExampleSingletonPM extends ExampleSingletonPM {
34
+ /**
35
+ * Simplified implementation that always returns true
36
+ * This avoids the need to implement real comparison logic in tests
37
+ */
38
+ vmsAreEqual: () => boolean;
39
+ constructor(appObject: AppObject);
40
+ }
41
+ /**
42
+ * Helper function to create and register a MockExampleSingletonPM
43
+ * Returns the created mock for use in tests
44
+ *
45
+ * @param appObjects The AppObjectRepo to register the mock with
46
+ * @returns A new MockExampleSingletonPM instance
47
+ */
48
+ export declare function makeMockExampleSingletonPM(appObjects: AppObjectRepo): MockExampleSingletonPM;
49
+ //# sourceMappingURL=MockExampleSingletonPM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockExampleSingletonPM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockExampleSingletonPM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D;;;OAGG;IACH,WAAW,gBAET;gBAEU,SAAS,EAAE,SAAS;CAGjC;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,aAAa,0BAInE"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * MockToggleExampleBooleanUC.ts
3
+ *
4
+ * This file demonstrates how to implement a mock singleton UC for testing.
5
+ * Mock singleton UCs extend the real UC classes and provide helper functions
6
+ * to create and register them as singletons for tests.
7
+ *
8
+ * Key concepts:
9
+ * - Mock singleton UCs extend the real UC classes
10
+ * - They override methods with test implementations
11
+ * - They register themselves as singletons just like the real UCs
12
+ * - They include helper functions to create them in tests
13
+ *
14
+ * Usage pattern (in tests):
15
+ * ```typescript
16
+ * // In a test file
17
+ * const mockUC = makeMockToggleExampleBooleanUC(appObject);
18
+ * const spy = jest.spyOn(mockUC, 'toggleExampleBoolean');
19
+ *
20
+ * // Call the function that should use the UC
21
+ * toggleExampleBoolean(appObjects);
22
+ *
23
+ * // Verify the UC method was called correctly
24
+ * expect(spy).toHaveBeenCalled();
25
+ * ```
26
+ */
27
+ import { AppObject } from "../../AppObject";
28
+ import { ToggleExampleBooleanUC } from "../UCs/ToggleExampleBooleanUC";
29
+ /**
30
+ * Mock implementation of ToggleExampleBooleanUC for testing
31
+ * Provides a no-op implementation of toggleExampleBoolean that can be spied on in tests
32
+ */
33
+ export declare class MockToggleExampleBooleanUC extends ToggleExampleBooleanUC {
34
+ /**
35
+ * Mock implementation that does nothing
36
+ * In tests, this can be replaced with a Jest spy to track calls
37
+ */
38
+ toggleExampleBoolean: () => void;
39
+ constructor(appObject: AppObject);
40
+ }
41
+ /**
42
+ * Helper factory function to create a mock ToggleExampleBooleanUC
43
+ * @param appObject The AppObject to attach the UC to
44
+ * @returns A new MockToggleExampleBooleanUC instance
45
+ */
46
+ export declare function makeMockToggleExampleBooleanUC(appObject: AppObject): MockToggleExampleBooleanUC;
47
+ //# sourceMappingURL=MockToggleExampleBooleanUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockToggleExampleBooleanUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockToggleExampleBooleanUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,sBAAsB;IACpE;;;OAGG;IACH,oBAAoB,QAAO,IAAI,CAAO;gBAE1B,SAAS,EAAE,SAAS;CAKjC;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,SAAS,GACnB,0BAA0B,CAE5B"}
@@ -0,0 +1,5 @@
1
+ export * from "./MockEditExampleStringUC";
2
+ export * from "./MockExamplePM";
3
+ export * from "./MockExampleSingletonPM";
4
+ export * from "./MockToggleExampleBooleanUC";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * ExamplePM.ts
3
+ *
4
+ * This file demonstrates how to implement a Presentation Manager (PM) component.
5
+ * PMs are responsible for transforming entity data into view models (VMs) for the UI.
6
+ * They observe entities for changes and update their views when data changes.
7
+ *
8
+ * Key concepts:
9
+ * - PMs extend AppObjectPM<VM> where VM is the view model type
10
+ * - They observe entities and transform entity data into view models
11
+ * - They notify UI components (views) when view models change
12
+ * - Each PM instance is associated with a specific AppObject
13
+ *
14
+ * Usage pattern:
15
+ * 1. Get a PM instance using getById
16
+ * 2. Register UI components as views using addView(callback)
17
+ * 3. PM will call the view callbacks with updated view models when entities change
18
+ * 4. Remove UI components with removeView(callback) when they're unmounted
19
+ */
20
+ import { AppObject, AppObjectPM, AppObjectRepo } from "../../AppObject";
21
+ /**
22
+ * ExamplePM transforms ExampleEntity data into a simple string view model.
23
+ * Abstract class provides the interface and static helper methods.
24
+ */
25
+ export declare abstract class ExamplePM extends AppObjectPM<string> {
26
+ /** Unique type identifier for this component */
27
+ static readonly type = "ExamplePMType";
28
+ /**
29
+ * Retrieves an ExamplePM by its parent AppObject's ID
30
+ * @param id The ID of the parent AppObject
31
+ * @param appObjects The AppObjectRepo to search in
32
+ * @returns The ExamplePM component or undefined if not found
33
+ */
34
+ static getById(id: string, appObjects: AppObjectRepo): ExamplePM | undefined;
35
+ }
36
+ /**
37
+ * Factory function to create a new ExamplePM
38
+ * @param appObject The AppObject to attach the PM to
39
+ * @returns A new ExamplePM instance
40
+ */
41
+ export declare function makeExamplePM(appObject: AppObject): ExamplePM;
42
+ //# sourceMappingURL=ExamplePM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExamplePM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/PMs/ExamplePM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGxE;;;GAGG;AACH,8BAAsB,SAAU,SAAQ,WAAW,CAAC,MAAM,CAAC;IACzD,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,mBAAmB;IAEvC;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa;CAGrD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAE7D"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * ExampleSingletonPM.ts
3
+ *
4
+ * This file demonstrates how to implement a Singleton Presentation Manager (PM).
5
+ * Singleton PMs are special PMs that exist only once in the application and can be
6
+ * accessed globally. They transform data from singleton entities into view models.
7
+ *
8
+ * Key concepts:
9
+ * - Singleton PMs extend AppObjectPM<VM> like regular PMs
10
+ * - They register themselves as singletons with appObjects.registerSingleton()
11
+ * - They're accessed through a static get() method using getSingletonComponent()
12
+ * - They typically observe singleton entities and provide data to multiple UI components
13
+ *
14
+ * Usage pattern:
15
+ * 1. Access the singleton PM using the static get() method
16
+ * 2. Register UI components as views using addView(callback)
17
+ * 3. PM will call the view callbacks with updated view models when entities change
18
+ * 4. Remove UI components with removeView(callback) when they're unmounted
19
+ */
20
+ import { AppObject, AppObjectPM, AppObjectRepo } from "../../AppObject";
21
+ /**
22
+ * Interface defining the structure of the view model provided by ExampleSingletonPM
23
+ */
24
+ export interface ExampleVM {
25
+ aBoolProperty: boolean;
26
+ }
27
+ /**
28
+ * ExampleSingletonPM transforms SingletonEntityExample data into an ExampleVM.
29
+ * As a singleton, only one instance exists in the application.
30
+ */
31
+ export declare abstract class ExampleSingletonPM extends AppObjectPM<ExampleVM> {
32
+ /** Unique type identifier for this component */
33
+ static readonly type = "ExampleSingletonPMType";
34
+ /**
35
+ * Global accessor for the singleton PM
36
+ * @param appObjects The AppObjectRepo to search in
37
+ * @returns The singleton PM or undefined if not created yet
38
+ */
39
+ static get: (appObjects: AppObjectRepo) => ExampleSingletonPM | undefined;
40
+ }
41
+ /**
42
+ * Default view model used when no data is available
43
+ * UI components can use this initially or when the PM is not found
44
+ */
45
+ export declare const defaultSlideNavigationVM: ExampleVM;
46
+ /**
47
+ * Factory function to create a new ExampleSingletonPM
48
+ * @param appObject The AppObject to attach the PM to
49
+ * @returns A new ExampleSingletonPM instance
50
+ */
51
+ export declare function makeExampleSingletonPM(appObject: AppObject): ExampleSingletonPM;
52
+ //# sourceMappingURL=ExampleSingletonPM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleSingletonPM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/PMs/ExampleSingletonPM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,SAAS,EACT,WAAW,EACX,aAAa,EACd,MAAM,iBAAiB,CAAC;AAIzB;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,8BAAsB,kBAAmB,SAAQ,WAAW,CAAC,SAAS,CAAC;IACrE,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,4BAA4B;IAEhD;;;;OAIG;IACH,MAAM,CAAC,GAAG,GAAI,YAAY,aAAa,KAAG,kBAAkB,GAAG,SAAS,CACX;CAC9D;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAEtC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,GACnB,kBAAkB,CAEpB"}
@@ -0,0 +1,3 @@
1
+ export * from "./ExamplePM";
2
+ export * from "./ExampleSingletonPM";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/PMs/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * EditExampleStringUC.ts
3
+ *
4
+ * This file demonstrates how to implement a Use Case (UC) component.
5
+ * UCs handle business logic and operations that modify entities.
6
+ * They encapsulate specific actions that can be performed in the application.
7
+ *
8
+ * Key concepts:
9
+ * - UCs extend AppObjectUC and provide methods for specific operations
10
+ * - They implement business logic for modifying entities
11
+ * - They validate inputs and handle errors
12
+ * - Each UC instance is associated with a specific AppObject
13
+ *
14
+ * Usage pattern:
15
+ * 1. Get a UC instance using getById or get
16
+ * 2. Call the UC's methods to perform operations
17
+ * 3. The UC will update entities, which will trigger PM updates and UI refreshes
18
+ */
19
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../AppObject";
20
+ /**
21
+ * EditExampleStringUC provides functionality to update the string property of an ExampleEntity.
22
+ * Abstract class provides the interface and static helper methods.
23
+ */
24
+ export declare abstract class EditExampleStringUC extends AppObjectUC {
25
+ /** Unique type identifier for this component */
26
+ static readonly type = "EditExampleStringUCType";
27
+ /**
28
+ * Updates the string property of the associated ExampleEntity
29
+ * @param text The new string value to set
30
+ */
31
+ abstract editExampleString(text: string): void;
32
+ /**
33
+ * Retrieves an EditExampleStringUC component from an AppObject
34
+ * @param appObj The AppObject to get the component from
35
+ * @returns The EditExampleStringUC component or undefined if not found
36
+ */
37
+ static get(appObj: AppObject): EditExampleStringUC | undefined;
38
+ /**
39
+ * Retrieves an EditExampleStringUC by its parent AppObject's ID
40
+ * @param id The ID of the parent AppObject
41
+ * @param appObjects The AppObjectRepo to search in
42
+ * @returns The EditExampleStringUC component or undefined if not found
43
+ */
44
+ static getById(id: string, appObjects: AppObjectRepo): EditExampleStringUC | undefined;
45
+ }
46
+ /**
47
+ * Factory function to create a new EditExampleStringUC
48
+ * @param appObject The AppObject to attach the UC to
49
+ * @returns A new EditExampleStringUC instance
50
+ */
51
+ export declare function makeEditSlideTextUC(appObject: AppObject): EditExampleStringUC;
52
+ //# sourceMappingURL=EditExampleStringUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditExampleStringUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/UCs/EditExampleStringUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGxE;;;GAGG;AACH,8BAAsB,mBAAoB,SAAQ,WAAW;IAC3D,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,6BAA6B;IAEjD;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAE9C;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,mBAAmB,GAAG,SAAS;IAI9D;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,mBAAmB,GAAG,SAAS;CAGnC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,mBAAmB,CAE7E"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * ToggleExampleBooleanUC.ts
3
+ *
4
+ * This file demonstrates how to implement a Singleton Use Case (UC) component.
5
+ * Singleton UCs are special UCs that exist only once in the application and can be
6
+ * accessed globally. They handle business logic and operations that modify singleton entities.
7
+ *
8
+ * Key concepts:
9
+ * - Singleton UCs extend AppObjectUC like regular UCs
10
+ * - They register themselves as singletons with appObjects.registerSingleton()
11
+ * - They're accessed through a static get() method using getSingletonComponent()
12
+ * - They typically operate on singleton entities
13
+ *
14
+ * Usage pattern:
15
+ * 1. Access the singleton UC using the static get() method
16
+ * 2. Call the UC's methods to perform operations
17
+ * 3. The UC will update entities, which will trigger PM updates and UI refreshes
18
+ */
19
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../AppObject";
20
+ /**
21
+ * ToggleExampleBooleanUC provides functionality to toggle the boolean property
22
+ * of the SingletonEntityExample. As a singleton, only one instance exists in the application.
23
+ */
24
+ export declare abstract class ToggleExampleBooleanUC extends AppObjectUC {
25
+ /** Unique type identifier for this component */
26
+ static readonly type = "ToggleExampleBooleanUCType";
27
+ /**
28
+ * Toggles the boolean property of the SingletonEntityExample
29
+ */
30
+ abstract toggleExampleBoolean(): void;
31
+ /**
32
+ * Global accessor for the singleton UC
33
+ * @param appObjects The AppObjectRepo to search in
34
+ * @returns The singleton UC or undefined if not created yet
35
+ */
36
+ static get: (appObjects: AppObjectRepo) => ToggleExampleBooleanUC | undefined;
37
+ }
38
+ /**
39
+ * Factory function to create a new ToggleExampleBooleanUC
40
+ * @param appObject The AppObject to attach the UC to
41
+ * @returns A new ToggleExampleBooleanUC instance
42
+ */
43
+ export declare function makeToggleExampleBooleanUC(appObject: AppObject): ToggleExampleBooleanUC;
44
+ //# sourceMappingURL=ToggleExampleBooleanUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleExampleBooleanUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/UCs/ToggleExampleBooleanUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAIzB;;;GAGG;AACH,8BAAsB,sBAAuB,SAAQ,WAAW;IAC9D,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,gCAAgC;IAEpD;;OAEG;IACH,QAAQ,CAAC,oBAAoB,IAAI,IAAI;IAErC;;;;OAIG;IACH,MAAM,CAAC,GAAG,GACR,YAAY,aAAa,KACxB,sBAAsB,GAAG,SAAS,CAC4B;CAClE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,GACnB,sBAAsB,CAExB"}