@asyra/core 0.2.5 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (518) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -0
  3. package/dist/apis/create-apis.d.ts +8 -0
  4. package/dist/apis/create-apis.d.ts.map +1 -0
  5. package/dist/apis/create-apis.js +272 -0
  6. package/dist/apis/create-apis.js.map +1 -0
  7. package/dist/apis/element-properties.d.ts +10 -0
  8. package/dist/apis/element-properties.d.ts.map +1 -0
  9. package/dist/apis/element-properties.js +33 -0
  10. package/dist/apis/element-properties.js.map +1 -0
  11. package/dist/apis/element-selection.d.ts +4 -2
  12. package/dist/apis/element-selection.d.ts.map +1 -1
  13. package/dist/apis/element-selection.js +155 -6
  14. package/dist/apis/element-selection.js.map +1 -1
  15. package/dist/apis/feature-system.d.ts +11 -0
  16. package/dist/apis/feature-system.d.ts.map +1 -0
  17. package/dist/apis/feature-system.js +9 -0
  18. package/dist/apis/feature-system.js.map +1 -0
  19. package/dist/apis/index.d.ts +1 -2
  20. package/dist/apis/index.d.ts.map +1 -1
  21. package/dist/apis/index.js +1 -24
  22. package/dist/apis/index.js.map +1 -1
  23. package/dist/apis/input-system.d.ts +1 -1
  24. package/dist/apis/input-system.d.ts.map +1 -1
  25. package/dist/apis/props.d.ts +18 -2
  26. package/dist/apis/props.d.ts.map +1 -1
  27. package/dist/apis/props.js +28 -9
  28. package/dist/apis/props.js.map +1 -1
  29. package/dist/apis/render.d.ts +39 -2
  30. package/dist/apis/render.d.ts.map +1 -1
  31. package/dist/apis/render.js +35 -2
  32. package/dist/apis/render.js.map +1 -1
  33. package/dist/apis/scene-bounds.d.ts +4 -0
  34. package/dist/apis/scene-bounds.d.ts.map +1 -0
  35. package/dist/apis/scene-bounds.js +112 -0
  36. package/dist/apis/scene-bounds.js.map +1 -0
  37. package/dist/apis/scene-tree.d.ts +24 -2
  38. package/dist/apis/scene-tree.d.ts.map +1 -1
  39. package/dist/apis/scene-tree.js +116 -25
  40. package/dist/apis/scene-tree.js.map +1 -1
  41. package/dist/apis/system-properties.d.ts +18 -0
  42. package/dist/apis/system-properties.d.ts.map +1 -0
  43. package/dist/apis/system-properties.js +21 -0
  44. package/dist/apis/system-properties.js.map +1 -0
  45. package/dist/apis/ui-context.d.ts +10 -0
  46. package/dist/apis/ui-context.d.ts.map +1 -0
  47. package/dist/apis/ui-context.js +22 -0
  48. package/dist/apis/ui-context.js.map +1 -0
  49. package/dist/canvas-pipeline-debugger/debugger.d.ts +29 -0
  50. package/dist/canvas-pipeline-debugger/debugger.d.ts.map +1 -0
  51. package/dist/canvas-pipeline-debugger/debugger.js +251 -0
  52. package/dist/canvas-pipeline-debugger/debugger.js.map +1 -0
  53. package/dist/canvas-pipeline-debugger/index.d.ts +2 -0
  54. package/dist/canvas-pipeline-debugger/index.d.ts.map +1 -0
  55. package/dist/canvas-pipeline-debugger/index.js +2 -0
  56. package/dist/canvas-pipeline-debugger/index.js.map +1 -0
  57. package/dist/contracts/index.d.ts +4 -0
  58. package/dist/contracts/index.d.ts.map +1 -0
  59. package/dist/contracts/index.js +2 -0
  60. package/dist/contracts/index.js.map +1 -0
  61. package/dist/core.d.ts +264 -40
  62. package/dist/core.d.ts.map +1 -1
  63. package/dist/core.js +1278 -40
  64. package/dist/core.js.map +1 -1
  65. package/dist/data-channel-observer.d.ts +35 -0
  66. package/dist/data-channel-observer.d.ts.map +1 -0
  67. package/dist/data-channel-observer.js +77 -0
  68. package/dist/data-channel-observer.js.map +1 -0
  69. package/dist/define-component.d.ts +102 -0
  70. package/dist/define-component.d.ts.map +1 -0
  71. package/dist/define-component.js +429 -0
  72. package/dist/define-component.js.map +1 -0
  73. package/dist/define-property-component.d.ts +29 -0
  74. package/dist/define-property-component.d.ts.map +1 -0
  75. package/dist/define-property-component.js +140 -0
  76. package/dist/define-property-component.js.map +1 -0
  77. package/dist/feature-integration.d.ts +16 -0
  78. package/dist/feature-integration.d.ts.map +1 -0
  79. package/dist/feature-integration.js +19 -0
  80. package/dist/feature-integration.js.map +1 -0
  81. package/dist/index.d.ts +45 -1
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +18 -1
  84. package/dist/index.js.map +1 -1
  85. package/dist/types/app-runtime.d.ts +21 -0
  86. package/dist/types/app-runtime.d.ts.map +1 -0
  87. package/dist/types/app-runtime.js +2 -0
  88. package/dist/types/app-runtime.js.map +1 -0
  89. package/dist/types/canonical-changes.d.ts +39 -0
  90. package/dist/types/canonical-changes.d.ts.map +1 -0
  91. package/dist/types/canonical-changes.js +2 -0
  92. package/dist/types/canonical-changes.js.map +1 -0
  93. package/dist/types/deps.d.ts +0 -2
  94. package/dist/types/deps.d.ts.map +1 -1
  95. package/dist/types/element-properties.d.ts +24 -0
  96. package/dist/types/element-properties.d.ts.map +1 -0
  97. package/dist/types/element-properties.js +2 -0
  98. package/dist/types/element-properties.js.map +1 -0
  99. package/dist/types/element-selection.d.ts +5 -1
  100. package/dist/types/element-selection.d.ts.map +1 -1
  101. package/dist/types/feature-system.d.ts +5 -0
  102. package/dist/types/feature-system.d.ts.map +1 -0
  103. package/dist/types/feature-system.js +2 -0
  104. package/dist/types/feature-system.js.map +1 -0
  105. package/dist/types/index.d.ts +19 -14
  106. package/dist/types/index.d.ts.map +1 -1
  107. package/dist/types/index.js +1 -1
  108. package/dist/types/index.js.map +1 -1
  109. package/dist/types/load-migration.d.ts +12 -0
  110. package/dist/types/load-migration.d.ts.map +1 -0
  111. package/dist/types/load-migration.js +16 -0
  112. package/dist/types/load-migration.js.map +1 -0
  113. package/dist/types/load-validation.d.ts +12 -0
  114. package/dist/types/load-validation.d.ts.map +1 -0
  115. package/dist/types/load-validation.js +2 -0
  116. package/dist/types/load-validation.js.map +1 -0
  117. package/dist/types/props.d.ts +8 -1
  118. package/dist/types/props.d.ts.map +1 -1
  119. package/dist/types/render.d.ts +20 -1
  120. package/dist/types/render.d.ts.map +1 -1
  121. package/dist/types/scene-tree.d.ts +21 -9
  122. package/dist/types/scene-tree.d.ts.map +1 -1
  123. package/dist/types/system-properties.d.ts +19 -0
  124. package/dist/types/system-properties.d.ts.map +1 -0
  125. package/dist/types/system-properties.js +2 -0
  126. package/dist/types/system-properties.js.map +1 -0
  127. package/dist/types/ui-context.d.ts +11 -0
  128. package/dist/types/ui-context.d.ts.map +1 -0
  129. package/dist/types/ui-context.js +2 -0
  130. package/dist/types/ui-context.js.map +1 -0
  131. package/dist/types/vector.d.ts +131 -0
  132. package/dist/types/vector.d.ts.map +1 -0
  133. package/dist/types/vector.js +83 -0
  134. package/dist/types/vector.js.map +1 -0
  135. package/package.json +44 -12
  136. package/.turbo/turbo-test$colon$ci.log +0 -132
  137. package/.turbo/turbo-test$colon$local.log +0 -21
  138. package/.turbo/turbo-test.log +0 -0
  139. package/CHANGELOG.md +0 -86
  140. package/coverage/base.css +0 -224
  141. package/coverage/block-navigation.js +0 -87
  142. package/coverage/clover.xml +0 -991
  143. package/coverage/coverage-final.json +0 -14952
  144. package/coverage/favicon.png +0 -0
  145. package/coverage/index.html +0 -236
  146. package/coverage/prettify.css +0 -1
  147. package/coverage/prettify.js +0 -2
  148. package/coverage/sort-arrow-sprite.png +0 -0
  149. package/coverage/sorter.js +0 -196
  150. package/coverage/src/apis/element-selection.ts.html +0 -133
  151. package/coverage/src/apis/index.html +0 -266
  152. package/coverage/src/apis/index.ts.html +0 -175
  153. package/coverage/src/apis/input-system.ts.html +0 -121
  154. package/coverage/src/apis/interaction-core.ts.html +0 -190
  155. package/coverage/src/apis/props.ts.html +0 -124
  156. package/coverage/src/apis/render.ts.html +0 -130
  157. package/coverage/src/apis/scene-tree.ts.html +0 -292
  158. package/coverage/src/apis/system-context.ts.html +0 -154
  159. package/coverage/src/apis/transaction.ts.html +0 -124
  160. package/coverage/src/apis/undo.ts.html +0 -124
  161. package/coverage/src/apis/viewport.ts.html +0 -193
  162. package/coverage/src/combinations.ts.html +0 -223
  163. package/coverage/src/core.ts.html +0 -559
  164. package/coverage/src/index.html +0 -146
  165. package/coverage/src/index.ts.html +0 -97
  166. package/coverage/src/requests/factory.ts.html +0 -127
  167. package/coverage/src/requests/index.html +0 -206
  168. package/coverage/src/requests/index.ts.html +0 -154
  169. package/coverage/src/requests/props.ts.html +0 -133
  170. package/coverage/src/requests/render.ts.html +0 -187
  171. package/coverage/src/requests/scene-tree.ts.html +0 -163
  172. package/coverage/src/requests/selection.ts.html +0 -127
  173. package/coverage/src/requests/system-context.ts.html +0 -130
  174. package/coverage/src/subscribes/index.html +0 -116
  175. package/coverage/src/subscribes/index.ts.html +0 -109
  176. package/coverage/src/subscribes/input-system/index.html +0 -176
  177. package/coverage/src/subscribes/input-system/index.ts.html +0 -226
  178. package/coverage/src/subscribes/input-system/primary-tool.ts.html +0 -160
  179. package/coverage/src/subscribes/input-system/render.ts.html +0 -484
  180. package/coverage/src/subscribes/input-system/undo.ts.html +0 -172
  181. package/coverage/src/subscribes/input-system/viewport.ts.html +0 -259
  182. package/coverage/src/subscribes/interaction-core/create-element.ts.html +0 -151
  183. package/coverage/src/subscribes/interaction-core/index.html +0 -236
  184. package/coverage/src/subscribes/interaction-core/index.ts.html +0 -289
  185. package/coverage/src/subscribes/interaction-core/primary-tool.ts.html +0 -109
  186. package/coverage/src/subscribes/interaction-core/reset-element-size.ts.html +0 -127
  187. package/coverage/src/subscribes/interaction-core/resize-element.ts.html +0 -181
  188. package/coverage/src/subscribes/interaction-core/select-elements.ts.html +0 -109
  189. package/coverage/src/subscribes/interaction-core/transaction.ts.html +0 -130
  190. package/coverage/src/subscribes/interaction-core/undoredo.ts.html +0 -133
  191. package/coverage/src/subscribes/interaction-core/viewport.ts.html +0 -193
  192. package/coverage/src/types/deps.ts.html +0 -118
  193. package/coverage/src/types/element-selection.ts.html +0 -100
  194. package/coverage/src/types/index.html +0 -266
  195. package/coverage/src/types/index.ts.html +0 -385
  196. package/coverage/src/types/input-system.ts.html +0 -100
  197. package/coverage/src/types/interaction-core.ts.html +0 -127
  198. package/coverage/src/types/props.ts.html +0 -109
  199. package/coverage/src/types/render.ts.html +0 -106
  200. package/coverage/src/types/requests/factory.ts.html +0 -127
  201. package/coverage/src/types/requests/index.html +0 -206
  202. package/coverage/src/types/requests/index.ts.html +0 -214
  203. package/coverage/src/types/requests/props.ts.html +0 -133
  204. package/coverage/src/types/requests/render.ts.html +0 -139
  205. package/coverage/src/types/requests/scene-tree.ts.html +0 -133
  206. package/coverage/src/types/requests/selection.ts.html +0 -127
  207. package/coverage/src/types/requests/system-context.ts.html +0 -142
  208. package/coverage/src/types/scene-tree.ts.html +0 -178
  209. package/coverage/src/types/system-context/index.html +0 -161
  210. package/coverage/src/types/system-context/index.ts.html +0 -112
  211. package/coverage/src/types/system-context/key-state.ts.html +0 -106
  212. package/coverage/src/types/system-context/mouse-state.ts.html +0 -106
  213. package/coverage/src/types/system-context/primary-tool.ts.html +0 -112
  214. package/coverage/src/types/transaction.ts.html +0 -103
  215. package/coverage/src/types/undo.ts.html +0 -103
  216. package/coverage/src/types/viewport.ts.html +0 -127
  217. package/dist/__tests__/core.test.d.ts +0 -2
  218. package/dist/__tests__/core.test.d.ts.map +0 -1
  219. package/dist/__tests__/core.test.js +0 -122
  220. package/dist/__tests__/core.test.js.map +0 -1
  221. package/dist/apis/interaction-core.d.ts +0 -3
  222. package/dist/apis/interaction-core.d.ts.map +0 -1
  223. package/dist/apis/interaction-core.js +0 -22
  224. package/dist/apis/interaction-core.js.map +0 -1
  225. package/dist/apis/system-context.d.ts +0 -3
  226. package/dist/apis/system-context.d.ts.map +0 -1
  227. package/dist/apis/system-context.js +0 -16
  228. package/dist/apis/system-context.js.map +0 -1
  229. package/dist/apis/transaction.d.ts +0 -3
  230. package/dist/apis/transaction.d.ts.map +0 -1
  231. package/dist/apis/transaction.js +0 -12
  232. package/dist/apis/transaction.js.map +0 -1
  233. package/dist/apis/undo.d.ts +0 -3
  234. package/dist/apis/undo.d.ts.map +0 -1
  235. package/dist/apis/undo.js +0 -12
  236. package/dist/apis/undo.js.map +0 -1
  237. package/dist/apis/viewport.d.ts +0 -4
  238. package/dist/apis/viewport.d.ts.map +0 -1
  239. package/dist/apis/viewport.js +0 -27
  240. package/dist/apis/viewport.js.map +0 -1
  241. package/dist/combinations.d.ts +0 -4
  242. package/dist/combinations.d.ts.map +0 -1
  243. package/dist/combinations.js +0 -42
  244. package/dist/combinations.js.map +0 -1
  245. package/dist/requests/factory copy.d.ts +0 -7
  246. package/dist/requests/factory copy.d.ts.map +0 -1
  247. package/dist/requests/factory copy.js +0 -10
  248. package/dist/requests/factory copy.js.map +0 -1
  249. package/dist/requests/factory.d.ts +0 -7
  250. package/dist/requests/factory.d.ts.map +0 -1
  251. package/dist/requests/factory.js +0 -10
  252. package/dist/requests/factory.js.map +0 -1
  253. package/dist/requests/index.d.ts +0 -3
  254. package/dist/requests/index.d.ts.map +0 -1
  255. package/dist/requests/index.js +0 -21
  256. package/dist/requests/index.js.map +0 -1
  257. package/dist/requests/primary-tool.d.ts +0 -7
  258. package/dist/requests/primary-tool.d.ts.map +0 -1
  259. package/dist/requests/primary-tool.js +0 -13
  260. package/dist/requests/primary-tool.js.map +0 -1
  261. package/dist/requests/props copy.d.ts +0 -7
  262. package/dist/requests/props copy.d.ts.map +0 -1
  263. package/dist/requests/props copy.js +0 -13
  264. package/dist/requests/props copy.js.map +0 -1
  265. package/dist/requests/props.d.ts +0 -7
  266. package/dist/requests/props.d.ts.map +0 -1
  267. package/dist/requests/props.js +0 -13
  268. package/dist/requests/props.js.map +0 -1
  269. package/dist/requests/render.d.ts +0 -3
  270. package/dist/requests/render.d.ts.map +0 -1
  271. package/dist/requests/render.js +0 -22
  272. package/dist/requests/render.js.map +0 -1
  273. package/dist/requests/scene-tree.d.ts +0 -7
  274. package/dist/requests/scene-tree.d.ts.map +0 -1
  275. package/dist/requests/scene-tree.js +0 -17
  276. package/dist/requests/scene-tree.js.map +0 -1
  277. package/dist/requests/selection.d.ts +0 -7
  278. package/dist/requests/selection.d.ts.map +0 -1
  279. package/dist/requests/selection.js +0 -10
  280. package/dist/requests/selection.js.map +0 -1
  281. package/dist/requests/system-context copy.d.ts +0 -7
  282. package/dist/requests/system-context copy.d.ts.map +0 -1
  283. package/dist/requests/system-context copy.js +0 -19
  284. package/dist/requests/system-context copy.js.map +0 -1
  285. package/dist/requests/system-context.d.ts +0 -7
  286. package/dist/requests/system-context.d.ts.map +0 -1
  287. package/dist/requests/system-context.js +0 -10
  288. package/dist/requests/system-context.js.map +0 -1
  289. package/dist/requests/types.d.ts +0 -7
  290. package/dist/requests/types.d.ts.map +0 -1
  291. package/dist/requests/types.js +0 -4
  292. package/dist/requests/types.js.map +0 -1
  293. package/dist/requests/viewport.d.ts +0 -19
  294. package/dist/requests/viewport.d.ts.map +0 -1
  295. package/dist/requests/viewport.js +0 -6
  296. package/dist/requests/viewport.js.map +0 -1
  297. package/dist/subscribes/index.d.ts +0 -3
  298. package/dist/subscribes/index.d.ts.map +0 -1
  299. package/dist/subscribes/index.js +0 -7
  300. package/dist/subscribes/index.js.map +0 -1
  301. package/dist/subscribes/input-system/index.d.ts +0 -3
  302. package/dist/subscribes/input-system/index.d.ts.map +0 -1
  303. package/dist/subscribes/input-system/index.js +0 -26
  304. package/dist/subscribes/input-system/index.js.map +0 -1
  305. package/dist/subscribes/input-system/primary-tool.d.ts +0 -10
  306. package/dist/subscribes/input-system/primary-tool.d.ts.map +0 -1
  307. package/dist/subscribes/input-system/primary-tool.js +0 -15
  308. package/dist/subscribes/input-system/primary-tool.js.map +0 -1
  309. package/dist/subscribes/input-system/render.d.ts +0 -16
  310. package/dist/subscribes/input-system/render.d.ts.map +0 -1
  311. package/dist/subscribes/input-system/render.js +0 -97
  312. package/dist/subscribes/input-system/render.js.map +0 -1
  313. package/dist/subscribes/input-system/undo.d.ts +0 -10
  314. package/dist/subscribes/input-system/undo.d.ts.map +0 -1
  315. package/dist/subscribes/input-system/undo.js +0 -18
  316. package/dist/subscribes/input-system/undo.js.map +0 -1
  317. package/dist/subscribes/input-system/viewport.d.ts +0 -11
  318. package/dist/subscribes/input-system/viewport.d.ts.map +0 -1
  319. package/dist/subscribes/input-system/viewport.js +0 -36
  320. package/dist/subscribes/input-system/viewport.js.map +0 -1
  321. package/dist/subscribes/interaction-core/create-and-resize.d.ts +0 -5
  322. package/dist/subscribes/interaction-core/create-and-resize.d.ts.map +0 -1
  323. package/dist/subscribes/interaction-core/create-and-resize.js +0 -86
  324. package/dist/subscribes/interaction-core/create-and-resize.js.map +0 -1
  325. package/dist/subscribes/interaction-core/create-element copy.d.ts +0 -3
  326. package/dist/subscribes/interaction-core/create-element copy.d.ts.map +0 -1
  327. package/dist/subscribes/interaction-core/create-element copy.js +0 -17
  328. package/dist/subscribes/interaction-core/create-element copy.js.map +0 -1
  329. package/dist/subscribes/interaction-core/create-element.d.ts +0 -3
  330. package/dist/subscribes/interaction-core/create-element.d.ts.map +0 -1
  331. package/dist/subscribes/interaction-core/create-element.js +0 -17
  332. package/dist/subscribes/interaction-core/create-element.js.map +0 -1
  333. package/dist/subscribes/interaction-core/index.d.ts +0 -3
  334. package/dist/subscribes/interaction-core/index.d.ts.map +0 -1
  335. package/dist/subscribes/interaction-core/index.js +0 -42
  336. package/dist/subscribes/interaction-core/index.js.map +0 -1
  337. package/dist/subscribes/interaction-core/input-to-decision.d.ts +0 -5
  338. package/dist/subscribes/interaction-core/input-to-decision.d.ts.map +0 -1
  339. package/dist/subscribes/interaction-core/input-to-decision.js +0 -48
  340. package/dist/subscribes/interaction-core/input-to-decision.js.map +0 -1
  341. package/dist/subscribes/interaction-core/primary-tool.d.ts +0 -3
  342. package/dist/subscribes/interaction-core/primary-tool.d.ts.map +0 -1
  343. package/dist/subscribes/interaction-core/primary-tool.js +0 -7
  344. package/dist/subscribes/interaction-core/primary-tool.js.map +0 -1
  345. package/dist/subscribes/interaction-core/reset-element-size.d.ts +0 -5
  346. package/dist/subscribes/interaction-core/reset-element-size.d.ts.map +0 -1
  347. package/dist/subscribes/interaction-core/reset-element-size.js +0 -9
  348. package/dist/subscribes/interaction-core/reset-element-size.js.map +0 -1
  349. package/dist/subscribes/interaction-core/resize-element.d.ts +0 -3
  350. package/dist/subscribes/interaction-core/resize-element.d.ts.map +0 -1
  351. package/dist/subscribes/interaction-core/resize-element.js +0 -24
  352. package/dist/subscribes/interaction-core/resize-element.js.map +0 -1
  353. package/dist/subscribes/interaction-core/select-elements.d.ts +0 -3
  354. package/dist/subscribes/interaction-core/select-elements.d.ts.map +0 -1
  355. package/dist/subscribes/interaction-core/select-elements.js +0 -7
  356. package/dist/subscribes/interaction-core/select-elements.js.map +0 -1
  357. package/dist/subscribes/interaction-core/transaction.d.ts +0 -3
  358. package/dist/subscribes/interaction-core/transaction.d.ts.map +0 -1
  359. package/dist/subscribes/interaction-core/transaction.js +0 -10
  360. package/dist/subscribes/interaction-core/transaction.js.map +0 -1
  361. package/dist/subscribes/interaction-core/undoredo.d.ts +0 -3
  362. package/dist/subscribes/interaction-core/undoredo.d.ts.map +0 -1
  363. package/dist/subscribes/interaction-core/undoredo.js +0 -15
  364. package/dist/subscribes/interaction-core/undoredo.js.map +0 -1
  365. package/dist/subscribes/interaction-core/viewport.d.ts +0 -3
  366. package/dist/subscribes/interaction-core/viewport.d.ts.map +0 -1
  367. package/dist/subscribes/interaction-core/viewport.js +0 -29
  368. package/dist/subscribes/interaction-core/viewport.js.map +0 -1
  369. package/dist/subscribes/render.d.ts +0 -6
  370. package/dist/subscribes/render.d.ts.map +0 -1
  371. package/dist/subscribes/render.js +0 -28
  372. package/dist/subscribes/render.js.map +0 -1
  373. package/dist/types/interaction-core.d.ts +0 -11
  374. package/dist/types/interaction-core.d.ts.map +0 -1
  375. package/dist/types/interaction-core.js +0 -2
  376. package/dist/types/interaction-core.js.map +0 -1
  377. package/dist/types/requests/factory copy.d.ts +0 -12
  378. package/dist/types/requests/factory copy.d.ts.map +0 -1
  379. package/dist/types/requests/factory copy.js +0 -2
  380. package/dist/types/requests/factory copy.js.map +0 -1
  381. package/dist/types/requests/factory.d.ts +0 -12
  382. package/dist/types/requests/factory.d.ts.map +0 -1
  383. package/dist/types/requests/factory.js +0 -2
  384. package/dist/types/requests/factory.js.map +0 -1
  385. package/dist/types/requests/index.d.ts +0 -17
  386. package/dist/types/requests/index.d.ts.map +0 -1
  387. package/dist/types/requests/index.js +0 -4
  388. package/dist/types/requests/index.js.map +0 -1
  389. package/dist/types/requests/primary-tool.d.ts +0 -13
  390. package/dist/types/requests/primary-tool.d.ts.map +0 -1
  391. package/dist/types/requests/primary-tool.js +0 -2
  392. package/dist/types/requests/primary-tool.js.map +0 -1
  393. package/dist/types/requests/props copy.d.ts +0 -14
  394. package/dist/types/requests/props copy.d.ts.map +0 -1
  395. package/dist/types/requests/props copy.js +0 -2
  396. package/dist/types/requests/props copy.js.map +0 -1
  397. package/dist/types/requests/props.d.ts +0 -14
  398. package/dist/types/requests/props.d.ts.map +0 -1
  399. package/dist/types/requests/props.js +0 -2
  400. package/dist/types/requests/props.js.map +0 -1
  401. package/dist/types/requests/render.d.ts +0 -15
  402. package/dist/types/requests/render.d.ts.map +0 -1
  403. package/dist/types/requests/render.js +0 -2
  404. package/dist/types/requests/render.js.map +0 -1
  405. package/dist/types/requests/scene-tree.d.ts +0 -14
  406. package/dist/types/requests/scene-tree.d.ts.map +0 -1
  407. package/dist/types/requests/scene-tree.js +0 -2
  408. package/dist/types/requests/scene-tree.js.map +0 -1
  409. package/dist/types/requests/selection.d.ts +0 -12
  410. package/dist/types/requests/selection.d.ts.map +0 -1
  411. package/dist/types/requests/selection.js +0 -2
  412. package/dist/types/requests/selection.js.map +0 -1
  413. package/dist/types/requests/system-context.d.ts +0 -17
  414. package/dist/types/requests/system-context.d.ts.map +0 -1
  415. package/dist/types/requests/system-context.js +0 -2
  416. package/dist/types/requests/system-context.js.map +0 -1
  417. package/dist/types/requests/system.d.ts +0 -13
  418. package/dist/types/requests/system.d.ts.map +0 -1
  419. package/dist/types/requests/system.js +0 -2
  420. package/dist/types/requests/system.js.map +0 -1
  421. package/dist/types/requests/viewport.d.ts +0 -20
  422. package/dist/types/requests/viewport.d.ts.map +0 -1
  423. package/dist/types/requests/viewport.js +0 -6
  424. package/dist/types/requests/viewport.js.map +0 -1
  425. package/dist/types/requests.d.ts +0 -8
  426. package/dist/types/requests.d.ts.map +0 -1
  427. package/dist/types/requests.js +0 -2
  428. package/dist/types/requests.js.map +0 -1
  429. package/dist/types/system-context/index.d.ts +0 -8
  430. package/dist/types/system-context/index.d.ts.map +0 -1
  431. package/dist/types/system-context/index.js +0 -4
  432. package/dist/types/system-context/index.js.map +0 -1
  433. package/dist/types/system-context/key-state.d.ts +0 -6
  434. package/dist/types/system-context/key-state.d.ts.map +0 -1
  435. package/dist/types/system-context/key-state.js +0 -2
  436. package/dist/types/system-context/key-state.js.map +0 -1
  437. package/dist/types/system-context/mouse-state.d.ts +0 -6
  438. package/dist/types/system-context/mouse-state.d.ts.map +0 -1
  439. package/dist/types/system-context/mouse-state.js +0 -2
  440. package/dist/types/system-context/mouse-state.js.map +0 -1
  441. package/dist/types/system-context/primary-tool.d.ts +0 -8
  442. package/dist/types/system-context/primary-tool.d.ts.map +0 -1
  443. package/dist/types/system-context/primary-tool.js +0 -2
  444. package/dist/types/system-context/primary-tool.js.map +0 -1
  445. package/dist/types/transaction.d.ts +0 -6
  446. package/dist/types/transaction.d.ts.map +0 -1
  447. package/dist/types/transaction.js +0 -2
  448. package/dist/types/transaction.js.map +0 -1
  449. package/dist/types/undo.d.ts +0 -6
  450. package/dist/types/undo.d.ts.map +0 -1
  451. package/dist/types/undo.js +0 -2
  452. package/dist/types/undo.js.map +0 -1
  453. package/dist/types/viewport.d.ts +0 -12
  454. package/dist/types/viewport.d.ts.map +0 -1
  455. package/dist/types/viewport.js +0 -2
  456. package/dist/types/viewport.js.map +0 -1
  457. package/src/__tests__/core.test.ts +0 -153
  458. package/src/apis/element-selection.ts +0 -16
  459. package/src/apis/index.ts +0 -30
  460. package/src/apis/input-system.ts +0 -12
  461. package/src/apis/interaction-core.ts +0 -35
  462. package/src/apis/props.ts +0 -13
  463. package/src/apis/render.ts +0 -15
  464. package/src/apis/scene-tree.ts +0 -69
  465. package/src/apis/system-context.ts +0 -23
  466. package/src/apis/transaction.ts +0 -13
  467. package/src/apis/undo.ts +0 -13
  468. package/src/apis/viewport.ts +0 -36
  469. package/src/combinations.ts +0 -46
  470. package/src/core.ts +0 -158
  471. package/src/index.ts +0 -4
  472. package/src/requests/factory.ts +0 -14
  473. package/src/requests/index.ts +0 -23
  474. package/src/requests/props.ts +0 -16
  475. package/src/requests/render.ts +0 -34
  476. package/src/requests/scene-tree.ts +0 -26
  477. package/src/requests/selection.ts +0 -14
  478. package/src/requests/system-context.ts +0 -15
  479. package/src/subscribes/index.ts +0 -8
  480. package/src/subscribes/input-system/index.ts +0 -47
  481. package/src/subscribes/input-system/primary-tool.ts +0 -25
  482. package/src/subscribes/input-system/render.ts +0 -133
  483. package/src/subscribes/input-system/undo.ts +0 -29
  484. package/src/subscribes/input-system/viewport.ts +0 -58
  485. package/src/subscribes/interaction-core/create-element.ts +0 -22
  486. package/src/subscribes/interaction-core/index.ts +0 -68
  487. package/src/subscribes/interaction-core/primary-tool.ts +0 -8
  488. package/src/subscribes/interaction-core/reset-element-size.ts +0 -12
  489. package/src/subscribes/interaction-core/resize-element.ts +0 -31
  490. package/src/subscribes/interaction-core/select-elements.ts +0 -8
  491. package/src/subscribes/interaction-core/transaction.ts +0 -15
  492. package/src/subscribes/interaction-core/undoredo.ts +0 -16
  493. package/src/subscribes/interaction-core/viewport.ts +0 -35
  494. package/src/types/deps.ts +0 -11
  495. package/src/types/element-selection.ts +0 -5
  496. package/src/types/index.ts +0 -100
  497. package/src/types/input-system.ts +0 -5
  498. package/src/types/interaction-core.ts +0 -14
  499. package/src/types/props.ts +0 -8
  500. package/src/types/render.ts +0 -7
  501. package/src/types/requests/factory.ts +0 -14
  502. package/src/types/requests/index.ts +0 -43
  503. package/src/types/requests/props.ts +0 -16
  504. package/src/types/requests/render.ts +0 -18
  505. package/src/types/requests/scene-tree.ts +0 -16
  506. package/src/types/requests/selection.ts +0 -14
  507. package/src/types/requests/system-context.ts +0 -19
  508. package/src/types/scene-tree.ts +0 -31
  509. package/src/types/system-context/index.ts +0 -9
  510. package/src/types/system-context/key-state.ts +0 -7
  511. package/src/types/system-context/mouse-state.ts +0 -7
  512. package/src/types/system-context/primary-tool.ts +0 -9
  513. package/src/types/transaction.ts +0 -6
  514. package/src/types/undo.ts +0 -6
  515. package/src/types/viewport.ts +0 -14
  516. package/test-setup.ts +0 -6
  517. package/tsconfig.json +0 -22
  518. package/vitest.config.ts +0 -8
@@ -0,0 +1,429 @@
1
+ import sceneTree, { componentRegistry, createDynamicComponent } from '@asyra/scene-tree';
2
+ import { elementPropertyRegistry, getPropertyComponent, propertySchemaRegistry, registerPropertySchema } from '@asyra/props-manager';
3
+ import { renderStrategyRegistry } from '@asyra/render';
4
+ import { failRegistrationRelation as relationFailure, nameCounter, idCounter } from '@asyra/utils';
5
+ const createUnregisterResult = () => ({
6
+ ok: false,
7
+ removed: [],
8
+ skipped: []
9
+ });
10
+ const ensureRegistrationPreconditions = (type, renderStrategy, properties) => {
11
+ // NOTE:
12
+ // Base registries already reject duplicates via MapRegistry.register().
13
+ // This preflight exists to fail before any side-effects (id/name/property writes),
14
+ // so defineComponent remains all-or-nothing and does not leave partial state.
15
+ if (componentRegistry.has(type)) {
16
+ throw new Error(`Component "${type}" is already registered`);
17
+ }
18
+ if (renderStrategy && renderStrategyRegistry.has(type)) {
19
+ throw new Error(`Render strategy for "${type}" is already registered`);
20
+ }
21
+ for (const property of properties) {
22
+ const schemaType = property.schema?.type;
23
+ if (!schemaType) {
24
+ continue;
25
+ }
26
+ if (propertySchemaRegistry.has(schemaType)) {
27
+ throw new Error(`Property schema "${schemaType}" is already registered`);
28
+ }
29
+ }
30
+ for (let index = 0; index < properties.length; index += 1) {
31
+ const schemaType = properties[index].schema?.type;
32
+ if (!schemaType) {
33
+ continue;
34
+ }
35
+ // Guard duplicate schema types inside one component definition early.
36
+ // Even though registry-level checks exist, this catches local config issues
37
+ // before any registration writes have started.
38
+ for (let nextIndex = index + 1; nextIndex < properties.length; nextIndex += 1) {
39
+ if (properties[nextIndex].schema?.type === schemaType) {
40
+ throw new Error(`[Core] Duplicate schema type "${schemaType}" in component "${type}" definition`);
41
+ }
42
+ }
43
+ }
44
+ };
45
+ const countActiveSceneInstances = (type, sceneTreeOwner = sceneTree) => {
46
+ // Runtime guard source:
47
+ // unregister is blocked by default when scene instances still use this type.
48
+ let count = 0;
49
+ sceneTreeOwner.getAllElements().forEach((element) => {
50
+ if (element.get('type') === type) {
51
+ count += 1;
52
+ }
53
+ });
54
+ return count;
55
+ };
56
+ const clonePropertyDefinition = (property) => ({
57
+ ...property,
58
+ alias: property.alias ? [...property.alias] : undefined,
59
+ schema: property.schema
60
+ ? {
61
+ ...property.schema,
62
+ fields: property.schema.fields.map((field) => ({ ...field }))
63
+ }
64
+ : undefined
65
+ });
66
+ const createComponentDefaults = (properties) => {
67
+ const defaults = {};
68
+ properties.forEach((property) => {
69
+ if (property.defaultValue !== undefined) {
70
+ defaults[property.name] = property.defaultValue;
71
+ }
72
+ });
73
+ return defaults;
74
+ };
75
+ const assertComponentRelationMutationAllowed = (componentType, operation, sceneTreeOwner = sceneTree) => {
76
+ if (!componentRegistry.has(componentType)) {
77
+ return relationFailure('REGISTRATION_NOT_FOUND', operation, `Component "${componentType}" is not registered`, { source: { kind: 'component', key: componentType } });
78
+ }
79
+ const activeInstances = countActiveSceneInstances(componentType, sceneTreeOwner);
80
+ if (activeInstances > 0) {
81
+ return relationFailure('REGISTRATION_IN_USE', operation, `Component "${componentType}" has ${activeInstances} active instance(s)`, {
82
+ registration: { kind: 'component', key: componentType },
83
+ source: { kind: 'component', key: componentType }
84
+ });
85
+ }
86
+ };
87
+ const commitComponentRegistration = (current, next) => {
88
+ const restoreProperties = (properties) => {
89
+ elementPropertyRegistry.unregisterComponent(current.type);
90
+ properties.forEach((property) => elementPropertyRegistry.register(property, current.type));
91
+ };
92
+ componentRegistry.unregister(current.type);
93
+ try {
94
+ componentRegistry.register(next);
95
+ restoreProperties(next.properties);
96
+ }
97
+ catch (error) {
98
+ componentRegistry.unregister(current.type);
99
+ componentRegistry.register(current);
100
+ restoreProperties(current.properties);
101
+ throw error;
102
+ }
103
+ };
104
+ const rebuildComponentProperties = (componentType, properties) => {
105
+ const registration = componentRegistry.get(componentType);
106
+ if (!registration) {
107
+ return relationFailure('REGISTRATION_NOT_FOUND', 'define-relation', `Component "${componentType}" is not registered`, { registration: { kind: 'component', key: componentType } });
108
+ }
109
+ const defaults = createComponentDefaults(properties);
110
+ const Constructor = createDynamicComponent(registration.type, registration.idPrefix, registration.namePrefix, properties, defaults, registration.isContainer);
111
+ const nextRegistration = {
112
+ ...registration,
113
+ constructor: Constructor,
114
+ properties,
115
+ defaults
116
+ };
117
+ commitComponentRegistration(registration, nextRegistration);
118
+ };
119
+ export const getComponentPropertyRelations = (componentType) => {
120
+ const registration = componentRegistry.get(componentType);
121
+ if (!registration) {
122
+ return relationFailure('REGISTRATION_NOT_FOUND', 'define-relation', `Component "${componentType}" is not registered`, { registration: { kind: 'component', key: componentType } });
123
+ }
124
+ return registration.properties.map((property) => ({
125
+ source: { kind: 'component', key: componentType },
126
+ name: property.name,
127
+ target: { kind: 'property', key: property.type },
128
+ onTargetUnregister: 'detach',
129
+ componentType,
130
+ propertyName: property.name,
131
+ property: clonePropertyDefinition(property)
132
+ }));
133
+ };
134
+ const removeComponentPropertyRelationWithOwner = (componentType, propertyName, sceneTreeOwner) => {
135
+ assertComponentRelationMutationAllowed(componentType, 'remove-relation', sceneTreeOwner);
136
+ const registration = componentRegistry.get(componentType);
137
+ if (!registration) {
138
+ return relationFailure('REGISTRATION_NOT_FOUND', 'remove-relation', `Component "${componentType}" is not registered`, { source: { kind: 'component', key: componentType } });
139
+ }
140
+ const property = registration.properties.find((candidate) => candidate.name === propertyName);
141
+ if (!property) {
142
+ return relationFailure('RELATION_NOT_FOUND', 'remove-relation', `Component property relation "${componentType}/${propertyName}" was not found`, {
143
+ source: { kind: 'component', key: componentType },
144
+ relationName: propertyName
145
+ });
146
+ }
147
+ const properties = registration.properties.filter((candidate) => candidate.name !== propertyName);
148
+ rebuildComponentProperties(componentType, properties);
149
+ const relation = {
150
+ source: { kind: 'component', key: componentType },
151
+ name: property.name,
152
+ target: { kind: 'property', key: property.type },
153
+ onTargetUnregister: 'detach'
154
+ };
155
+ return {
156
+ ok: true,
157
+ operation: 'remove-relation',
158
+ source: relation.source,
159
+ relation
160
+ };
161
+ };
162
+ export const removeComponentPropertyRelation = (componentType, propertyName) => removeComponentPropertyRelationWithOwner(componentType, propertyName, sceneTree);
163
+ export const removeComponentPropertyRelationForSceneTree = removeComponentPropertyRelationWithOwner;
164
+ const defineComponentPropertyRelationWithOwner = (componentType, property, sceneTreeOwner) => {
165
+ assertComponentRelationMutationAllowed(componentType, 'define-relation', sceneTreeOwner);
166
+ const registration = componentRegistry.get(componentType);
167
+ if (!registration) {
168
+ return relationFailure('REGISTRATION_NOT_FOUND', 'define-relation', `Component "${componentType}" is not registered`, { source: { kind: 'component', key: componentType } });
169
+ }
170
+ if (registration.properties.some((candidate) => candidate.name === property.name)) {
171
+ return relationFailure('DUPLICATE_RELATION', 'define-relation', `Component property relation "${componentType}/${property.name}" is already defined`, {
172
+ source: { kind: 'component', key: componentType },
173
+ relationName: property.name
174
+ });
175
+ }
176
+ if (!getPropertyComponent(property.type)) {
177
+ return relationFailure('RELATION_TARGET_NOT_FOUND', 'define-relation', `Property runtime "${property.type}" is not registered`, {
178
+ source: { kind: 'component', key: componentType },
179
+ relationName: property.name,
180
+ target: { kind: 'property', key: property.type }
181
+ });
182
+ }
183
+ if (property.schema?.type &&
184
+ propertySchemaRegistry.has(property.schema.type)) {
185
+ throw new Error(`Property schema "${property.schema.type}" is already registered`);
186
+ }
187
+ const properties = [
188
+ ...registration.properties,
189
+ clonePropertyDefinition(property)
190
+ ];
191
+ const defaults = createComponentDefaults(properties);
192
+ const Constructor = createDynamicComponent(registration.type, registration.idPrefix, registration.namePrefix, properties, defaults, registration.isContainer);
193
+ if (property.schema?.type) {
194
+ registerPropertySchema(property.schema);
195
+ }
196
+ commitComponentRegistration(registration, {
197
+ ...registration,
198
+ constructor: Constructor,
199
+ properties,
200
+ defaults
201
+ });
202
+ const relation = {
203
+ source: { kind: 'component', key: componentType },
204
+ name: property.name,
205
+ target: { kind: 'property', key: property.type },
206
+ onTargetUnregister: 'detach'
207
+ };
208
+ return {
209
+ ok: true,
210
+ operation: 'define-relation',
211
+ source: relation.source,
212
+ relation
213
+ };
214
+ };
215
+ export const defineComponentPropertyRelation = (componentType, property) => defineComponentPropertyRelationWithOwner(componentType, property, sceneTree);
216
+ export const defineComponentPropertyRelationForSceneTree = defineComponentPropertyRelationWithOwner;
217
+ const addUniqueRemoved = (result, removedSet, item) => {
218
+ // Keep removed report deterministic and duplicate-free.
219
+ if (removedSet.has(item)) {
220
+ return;
221
+ }
222
+ removedSet.add(item);
223
+ result.removed.push(item);
224
+ };
225
+ /**
226
+ * Define a custom component type that can be used in the scene tree
227
+ *
228
+ * @example
229
+ * ```ts
230
+ * defineComponent({
231
+ * type: 'star',
232
+ * idPrefix: 'star',
233
+ * namePrefix: 'Star',
234
+ * properties: [
235
+ * { name: 'count', type: PropertyTypes.CUSTOM, defaultValue: 5 },
236
+ * { name: 'x', type: PropertyTypes.NUMBER, defaultValue: 0 },
237
+ * { name: 'y', type: PropertyTypes.NUMBER, defaultValue: 0 },
238
+ * { name: 'width', type: PropertyTypes.NUMBER, defaultValue: 100 },
239
+ * { name: 'height', type: PropertyTypes.NUMBER, defaultValue: 100 }
240
+ * ],
241
+ * renderStrategy: (graphic, data) => {
242
+ * // Custom star rendering logic
243
+ * const count = data.count || 5
244
+ * // ... draw star with 'count' points
245
+ * }
246
+ * })
247
+ * ```
248
+ */
249
+ export function defineComponent(definition) {
250
+ const { type, idPrefix, namePrefix, properties, renderStrategy, isContainer } = definition;
251
+ // Phase A: preflight checks before any writes.
252
+ ensureRegistrationPreconditions(type, renderStrategy, properties);
253
+ // 0. Register type with nameCounter for auto-numbering
254
+ // This allows app-level components to register without modifying framework NameTypes
255
+ nameCounter.registerType(type, namePrefix, undefined, { override: true });
256
+ // 1. Register type with idCounter for auto-numbering
257
+ // This allows app-level components to register without modifying framework IDTypes
258
+ idCounter.registerType(type, idPrefix, undefined, { override: true });
259
+ // Phase B: register counters + properties, and derive default values.
260
+ const defaults = createComponentDefaults(properties);
261
+ for (const prop of properties) {
262
+ elementPropertyRegistry.register(prop, type);
263
+ }
264
+ // Phase C: register schema types declared by this component definition.
265
+ for (const prop of properties) {
266
+ const schema = prop.schema;
267
+ if (!schema?.type) {
268
+ continue;
269
+ }
270
+ registerPropertySchema(schema);
271
+ }
272
+ // Phase D: construct runtime class and register component metadata.
273
+ const ComponentClass = createDynamicComponent(type, idPrefix, namePrefix, properties, defaults, isContainer);
274
+ componentRegistry.register({
275
+ type,
276
+ idPrefix,
277
+ namePrefix,
278
+ constructor: ComponentClass,
279
+ properties,
280
+ defaults,
281
+ isContainer
282
+ });
283
+ // Phase E: optional render strategy registration.
284
+ if (renderStrategy) {
285
+ renderStrategyRegistry.register(type, renderStrategy);
286
+ }
287
+ }
288
+ /**
289
+ * Graph-owned component cleanup. Property capabilities and render strategies
290
+ * are independent registration nodes and are intentionally preserved.
291
+ */
292
+ export const unregisterComponentGraphRegistration = (type) => {
293
+ if (!componentRegistry.unregister(type))
294
+ return false;
295
+ elementPropertyRegistry.unregisterComponent(type);
296
+ idCounter.unregisterType(type);
297
+ nameCounter.unregisterType(type);
298
+ return true;
299
+ };
300
+ export function unregisterComponent(type, options = {}) {
301
+ const { cascade = true, force = false, detailed = false } = options;
302
+ const result = createUnregisterResult();
303
+ const removedSet = new Set();
304
+ let didMutate = false;
305
+ const registration = componentRegistry.get(type);
306
+ const activeInstances = countActiveSceneInstances(type);
307
+ // Phase 1: runtime safety guard.
308
+ if (activeInstances > 0 && !force) {
309
+ result.skipped.push({
310
+ item: `component:${type}`,
311
+ reason: `Blocked because ${activeInstances} active scene instance(s) still use this type. Pass { force: true } to override.`
312
+ });
313
+ return detailed ? result : false;
314
+ }
315
+ const hasComponentRegistration = componentRegistry.has(type);
316
+ const hasRenderRegistration = renderStrategyRegistry.has(type);
317
+ const hasPropertyRegistration = elementPropertyRegistry.getPropertiesForComponent(type).length > 0;
318
+ const hasCounterRegistration = idCounter.hasType(type) || nameCounter.hasType(type);
319
+ // Phase 2: no-op fast exit for unknown component type.
320
+ if (!hasComponentRegistration &&
321
+ !hasRenderRegistration &&
322
+ !hasPropertyRegistration &&
323
+ !hasCounterRegistration) {
324
+ result.skipped.push({
325
+ item: `component:${type}`,
326
+ reason: 'No component-related registrations found'
327
+ });
328
+ return detailed ? result : false;
329
+ }
330
+ if (componentRegistry.unregister(type)) {
331
+ didMutate = true;
332
+ addUniqueRemoved(result, removedSet, `component:${type}`);
333
+ }
334
+ else {
335
+ result.skipped.push({
336
+ item: `component:${type}`,
337
+ reason: 'Component registry entry not found'
338
+ });
339
+ }
340
+ if (!cascade) {
341
+ // Compatibility path: only remove the component registry entry.
342
+ result.ok = didMutate;
343
+ return detailed ? result : didMutate;
344
+ }
345
+ // Phase 3 (cascade): discover what this component owns from its own record.
346
+ const registeredProperties = registration?.properties ??
347
+ elementPropertyRegistry.getPropertiesForComponent(type);
348
+ const ownedPropertyNames = [];
349
+ for (const property of registeredProperties) {
350
+ const propertyName = property.name;
351
+ if (!propertyName) {
352
+ continue;
353
+ }
354
+ const owners = elementPropertyRegistry.getComponentTypesForProperty(propertyName);
355
+ if (owners.includes(type)) {
356
+ ownedPropertyNames.push(propertyName);
357
+ }
358
+ }
359
+ if (ownedPropertyNames.length > 0) {
360
+ // Remove component ownership from property definitions.
361
+ elementPropertyRegistry.unregisterComponent(type);
362
+ for (const propertyName of ownedPropertyNames) {
363
+ didMutate = true;
364
+ addUniqueRemoved(result, removedSet, `property-owner:${type}.${propertyName}`);
365
+ if (!elementPropertyRegistry.has(propertyName)) {
366
+ // Last owner removed => property definition removed from registry.
367
+ addUniqueRemoved(result, removedSet, `property-definition:${propertyName}`);
368
+ continue;
369
+ }
370
+ const ownersAfter = elementPropertyRegistry.getComponentTypesForProperty(propertyName);
371
+ // Shared definition: keep it and report remaining owners.
372
+ result.skipped.push({
373
+ item: `property-definition:${propertyName}`,
374
+ reason: `Kept because shared by: ${ownersAfter.join(', ')}`
375
+ });
376
+ }
377
+ }
378
+ for (const property of registration?.properties ?? []) {
379
+ const schemaType = property.schema?.type;
380
+ if (!schemaType) {
381
+ continue;
382
+ }
383
+ if (propertySchemaRegistry.has(schemaType)) {
384
+ // Schema ownership is defined by component property declaration.
385
+ propertySchemaRegistry.unregister(schemaType);
386
+ didMutate = true;
387
+ addUniqueRemoved(result, removedSet, `property-schema:${schemaType}`);
388
+ continue;
389
+ }
390
+ result.skipped.push({
391
+ item: `property-schema:${schemaType}`,
392
+ reason: 'Schema registry entry not found'
393
+ });
394
+ }
395
+ if (renderStrategyRegistry.unregister(type)) {
396
+ didMutate = true;
397
+ addUniqueRemoved(result, removedSet, `render:${type}`);
398
+ }
399
+ else if (hasRenderRegistration) {
400
+ result.skipped.push({
401
+ item: `render:${type}`,
402
+ reason: 'Render strategy entry not found'
403
+ });
404
+ }
405
+ if (idCounter.unregisterType(type)) {
406
+ didMutate = true;
407
+ addUniqueRemoved(result, removedSet, `id-counter:${type}`);
408
+ }
409
+ else {
410
+ result.skipped.push({
411
+ item: `id-counter:${type}`,
412
+ reason: 'ID counter entry not found'
413
+ });
414
+ }
415
+ if (nameCounter.unregisterType(type)) {
416
+ didMutate = true;
417
+ addUniqueRemoved(result, removedSet, `name-counter:${type}`);
418
+ }
419
+ else {
420
+ result.skipped.push({
421
+ item: `name-counter:${type}`,
422
+ reason: 'Name counter entry not found'
423
+ });
424
+ }
425
+ // Phase 4: finalize compatibility + detailed reporting.
426
+ result.ok = didMutate;
427
+ return detailed ? result : didMutate;
428
+ }
429
+ //# sourceMappingURL=define-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-component.js","sourceRoot":"","sources":["../src/define-component.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAChB,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EAEvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,sBAAsB,EAAuB,MAAM,eAAe,CAAA;AAC3E,OAAO,EACL,wBAAwB,IAAI,eAAe,EAC3C,WAAW,EACX,SAAS,EAIV,MAAM,cAAc,CAAA;AA8DrB,MAAM,sBAAsB,GAAG,GAA8B,EAAE,CAAC,CAAC;IAC/D,EAAE,EAAE,KAAK;IACT,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;CACZ,CAAC,CAAA;AAEF,MAAM,+BAA+B,GAAG,CACtC,IAAY,EACZ,cAA0C,EAC1C,UAAgC,EAChC,EAAE;IACF,QAAQ;IACR,wEAAwE;IACxE,mFAAmF;IACnF,8EAA8E;IAC9E,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,yBAAyB,CAAC,CAAA;IAC9D,CAAC;IAED,IAAI,cAAc,IAAI,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,wBAAwB,IAAI,yBAAyB,CAAC,CAAA;IACxE,CAAC;IAED,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE,CAAC;QAClC,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;QACxC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,SAAQ;QACV,CAAC;QAED,IAAI,sBAAsB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YAC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AACtC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { type PropertyChildRelationDefinition, type PropertyComponentConfigRegistration, type PropertyComponentConstructor, type PropertyRegistrationOptions, type PropsManager } from '@asyra/props-manager';
2
+ import { type RegistrationDefinitionMetadata, type RegistrationRelationMetadata, type RelationOperationSuccess } from '@asyra/utils';
3
+ export interface PropertyComponentConstructorDefinition {
4
+ type: string;
5
+ constructor: PropertyComponentConstructor;
6
+ canonicalChildren?: PropertyChildRelationDefinition;
7
+ options?: PropertyRegistrationOptions;
8
+ registration?: RegistrationDefinitionMetadata;
9
+ }
10
+ export interface PropertyComponentConfigDefinition extends PropertyComponentConfigRegistration {
11
+ options?: PropertyRegistrationOptions;
12
+ registration?: RegistrationDefinitionMetadata;
13
+ }
14
+ export type PropertyComponentDefinition = PropertyComponentConstructorDefinition | PropertyComponentConfigDefinition;
15
+ export interface PropertyChildRelationMetadata extends RegistrationRelationMetadata, PropertyChildRelationDefinition {
16
+ parentPropertyType: string;
17
+ }
18
+ export declare const getPropertyChildRelations: (parentPropertyType: string) => readonly PropertyChildRelationMetadata[];
19
+ export declare const removePropertyChildRelation: (parentPropertyType: string, key: string, manager?: PropsManager) => RelationOperationSuccess;
20
+ export declare const definePropertyChildRelation: (parentPropertyType: string, relationDefinition: PropertyChildRelationDefinition, manager?: PropsManager) => RelationOperationSuccess;
21
+ /**
22
+ * Define a property component constructor for a property type.
23
+ */
24
+ export declare function definePropertyComponent(definition: PropertyComponentDefinition): PropertyComponentConstructor;
25
+ /**
26
+ * Unregister a property component constructor by property type.
27
+ */
28
+ export declare function unregisterPropertyComponent(type: string): boolean;
29
+ //# sourceMappingURL=define-property-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-property-component.d.ts","sourceRoot":"","sources":["../src/define-property-component.ts"],"names":[],"mappings":"AAAA,OAAqB,EAOnB,KAAK,+BAA+B,EACpC,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,4BAA4B,CAAA;IACzC,iBAAiB,CAAC,EAAE,+BAA+B,CAAA;IACnD,OAAO,CAAC,EAAE,2BAA2B,CAAA;IACrC,YAAY,CAAC,EAAE,8BAA8B,CAAA;CAC9C;AAED,MAAM,WAAW,iCACf,SAAQ,mCAAmC;IAC3C,OAAO,CAAC,EAAE,2BAA2B,CAAA;IACrC,YAAY,CAAC,EAAE,8BAA8B,CAAA;CAC9C;AAED,MAAM,MAAM,2BAA2B,GACnC,sCAAsC,GACtC,iCAAiC,CAAA;AAErC,MAAM,WAAW,6BACf,SAAQ,4BAA4B,EAClC,+BAA+B;IACjC,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAgFD,eAAO,MAAM,yBAAyB,GACpC,oBAAoB,MAAM,KACzB,SAAS,6BAA6B,EAuBxC,CAAA;AAED,eAAO,MAAM,2BAA2B,GACtC,oBAAoB,MAAM,EAC1B,KAAK,MAAM,EACX,UAAS,YAA2B,KACnC,wBAuCF,CAAA;AAED,eAAO,MAAM,2BAA2B,GACtC,oBAAoB,MAAM,EAC1B,oBAAoB,+BAA+B,EACnD,UAAS,YAA2B,KACnC,wBAqDF,CAAA;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,2BAA2B,GACtC,4BAA4B,CAuB9B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOjE"}
@@ -0,0 +1,140 @@
1
+ import propsManager, { createPropertyComponentFromConfig as createPropertyComponentFromConfigOwner, clonePropertyComponentConfigRegistration, getPropertyComponent, getPropertyComponentConfigDefinition, propertyComponentRegistry, registerPropertyComponent } from '@asyra/props-manager';
2
+ import { failRegistrationRelation as relationFailure } from '@asyra/utils';
3
+ const createPropertyComponentFromConfig = createPropertyComponentFromConfigOwner;
4
+ const assertPropertyRelationMutationAllowed = (parentPropertyType, operation, manager) => {
5
+ if (!getPropertyComponent(parentPropertyType)) {
6
+ return relationFailure('REGISTRATION_NOT_FOUND', operation, `Property runtime "${parentPropertyType}" is not registered`, { source: { kind: 'property', key: parentPropertyType } });
7
+ }
8
+ const propertyIds = manager.getPropertyIdsByType(parentPropertyType);
9
+ if (propertyIds.length > 0) {
10
+ return relationFailure('REGISTRATION_IN_USE', operation, `Property runtime "${parentPropertyType}" is in use by: ${propertyIds.join(', ')}`, {
11
+ registration: { kind: 'property', key: parentPropertyType },
12
+ source: { kind: 'property', key: parentPropertyType }
13
+ });
14
+ }
15
+ const definition = getPropertyComponentConfigDefinition(parentPropertyType);
16
+ if (!definition) {
17
+ return relationFailure('RELATION_REMOVE_FAILED', operation, `Property runtime "${parentPropertyType}" does not use a declarative config definition`, { source: { kind: 'property', key: parentPropertyType } });
18
+ }
19
+ return clonePropertyComponentConfigRegistration(definition);
20
+ };
21
+ const commitPropertyComponentRegistration = (type, component, configDefinition) => {
22
+ const currentComponent = getPropertyComponent(type);
23
+ const currentDefinition = getPropertyComponentConfigDefinition(type);
24
+ if (!currentComponent) {
25
+ return relationFailure('REGISTRATION_NOT_FOUND', 'define-relation', `Property runtime "${type}" is not registered`, { registration: { kind: 'property', key: type } });
26
+ }
27
+ propertyComponentRegistry.unregister(type);
28
+ try {
29
+ propertyComponentRegistry.register(type, component, undefined, configDefinition);
30
+ }
31
+ catch (error) {
32
+ propertyComponentRegistry.register(type, currentComponent, undefined, currentDefinition);
33
+ throw error;
34
+ }
35
+ };
36
+ export const getPropertyChildRelations = (parentPropertyType) => {
37
+ if (!getPropertyComponent(parentPropertyType)) {
38
+ return relationFailure('REGISTRATION_NOT_FOUND', 'define-relation', `Property runtime "${parentPropertyType}" is not registered`, { registration: { kind: 'property', key: parentPropertyType } });
39
+ }
40
+ const children = getPropertyComponentConfigDefinition(parentPropertyType)?.children;
41
+ if (!children)
42
+ return [];
43
+ return [
44
+ {
45
+ source: { kind: 'property', key: parentPropertyType },
46
+ name: children.key,
47
+ target: { kind: 'property', key: children.childType },
48
+ onTargetUnregister: 'detach',
49
+ parentPropertyType,
50
+ ...children
51
+ }
52
+ ];
53
+ };
54
+ export const removePropertyChildRelation = (parentPropertyType, key, manager = propsManager) => {
55
+ const definition = assertPropertyRelationMutationAllowed(parentPropertyType, 'remove-relation', manager);
56
+ const children = definition.children;
57
+ if (!children || children.key !== key) {
58
+ return relationFailure('RELATION_NOT_FOUND', 'remove-relation', `Property child relation "${parentPropertyType}/${key}" was not found`, {
59
+ source: { kind: 'property', key: parentPropertyType },
60
+ relationName: key
61
+ });
62
+ }
63
+ const nextDefinition = { ...definition, children: undefined };
64
+ const Constructor = createPropertyComponentFromConfig(nextDefinition);
65
+ commitPropertyComponentRegistration(parentPropertyType, Constructor, nextDefinition);
66
+ const relation = {
67
+ source: { kind: 'property', key: parentPropertyType },
68
+ name: children.key,
69
+ target: { kind: 'property', key: children.childType },
70
+ onTargetUnregister: 'detach'
71
+ };
72
+ return {
73
+ ok: true,
74
+ operation: 'remove-relation',
75
+ source: relation.source,
76
+ relation
77
+ };
78
+ };
79
+ export const definePropertyChildRelation = (parentPropertyType, relationDefinition, manager = propsManager) => {
80
+ const definition = assertPropertyRelationMutationAllowed(parentPropertyType, 'define-relation', manager);
81
+ if (definition.children) {
82
+ return relationFailure('DUPLICATE_RELATION', 'define-relation', `Property runtime "${parentPropertyType}" already defines child relation "${definition.children.key}"`, {
83
+ source: { kind: 'property', key: parentPropertyType },
84
+ relationName: relationDefinition.key
85
+ });
86
+ }
87
+ if (!getPropertyComponent(relationDefinition.childType)) {
88
+ return relationFailure('RELATION_TARGET_NOT_FOUND', 'define-relation', `Child property runtime "${relationDefinition.childType}" is not registered`, {
89
+ source: { kind: 'property', key: parentPropertyType },
90
+ relationName: relationDefinition.key,
91
+ target: { kind: 'property', key: relationDefinition.childType }
92
+ });
93
+ }
94
+ const nextDefinition = {
95
+ ...definition,
96
+ children: { ...relationDefinition }
97
+ };
98
+ const Constructor = createPropertyComponentFromConfig(nextDefinition);
99
+ commitPropertyComponentRegistration(parentPropertyType, Constructor, nextDefinition);
100
+ const relation = {
101
+ source: { kind: 'property', key: parentPropertyType },
102
+ name: relationDefinition.key,
103
+ target: { kind: 'property', key: relationDefinition.childType },
104
+ onTargetUnregister: 'detach'
105
+ };
106
+ return {
107
+ ok: true,
108
+ operation: 'define-relation',
109
+ source: relation.source,
110
+ relation
111
+ };
112
+ };
113
+ /**
114
+ * Define a property component constructor for a property type.
115
+ */
116
+ export function definePropertyComponent(definition) {
117
+ const hasConstructor = Object.prototype.hasOwnProperty.call(definition, 'constructor') &&
118
+ typeof definition
119
+ .constructor === 'function';
120
+ const constructor = hasConstructor
121
+ ? definition.constructor
122
+ : createPropertyComponentFromConfig(definition);
123
+ registerPropertyComponent(definition.type, constructor, definition.options, hasConstructor
124
+ ? undefined
125
+ : definition, hasConstructor
126
+ ? definition.canonicalChildren
127
+ : undefined);
128
+ return constructor;
129
+ }
130
+ /**
131
+ * Unregister a property component constructor by property type.
132
+ */
133
+ export function unregisterPropertyComponent(type) {
134
+ if (!propertyComponentRegistry.has(type)) {
135
+ return false;
136
+ }
137
+ propertyComponentRegistry.unregister(type);
138
+ return true;
139
+ }
140
+ //# sourceMappingURL=define-property-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-property-component.js","sourceRoot":"","sources":["../src/define-property-component.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,EAAE,EACnB,iCAAiC,IAAI,sCAAsC,EAC3E,wCAAwC,EACxC,oBAAoB,EACpB,oCAAoC,EACpC,yBAAyB,EACzB,yBAAyB,EAM1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,wBAAwB,IAAI,eAAe,EAI5C,MAAM,cAAc,CAAA;AA0Br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from '@asyra/feature-system';
3
+ /**
4
+ * Integrate feature-system with core
5
+ * Connects session manager to input-system events
6
+ */
7
+ export declare function initFeatureSystem(coreDeps: CorePackages): void;
8
+ /**
9
+ * Get feature registry instance
10
+ */
11
+ export { getFeatureRegistry };
12
+ /**
13
+ * Get session manager instance
14
+ */
15
+ export { getSessionManager };
16
+ //# sourceMappingURL=feature-integration.d.ts.map