taggedjs 2.8.29 → 2.8.31

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 (374) hide show
  1. package/README.md +19 -0
  2. package/bundle.js +1 -1
  3. package/bundle.js.map +1 -1
  4. package/js/alterProp.function.d.ts +5 -3
  5. package/js/alterProp.function.js +22 -9
  6. package/js/alterProp.function.js.map +1 -1
  7. package/js/castTextValue.function.d.ts +4 -0
  8. package/js/castTextValue.function.js +11 -0
  9. package/js/castTextValue.function.js.map +1 -0
  10. package/js/index.d.ts +9 -8
  11. package/js/index.js +9 -8
  12. package/js/index.js.map +1 -1
  13. package/js/interpolations/attributes/bindSubjectCallback.function.js +1 -1
  14. package/js/interpolations/attributes/bindSubjectCallback.function.js.map +1 -1
  15. package/js/interpolations/attributes/getUpTags.function.js +1 -1
  16. package/js/interpolations/attributes/getUpTags.function.js.map +1 -1
  17. package/js/interpolations/attributes/howToSetInputValue.function.js +2 -4
  18. package/js/interpolations/attributes/howToSetInputValue.function.js.map +1 -1
  19. package/js/interpolations/attributes/processAttribute.function.js +18 -8
  20. package/js/interpolations/attributes/processAttribute.function.js.map +1 -1
  21. package/js/interpolations/attributes/processNameValueAttribute.function.d.ts +5 -5
  22. package/js/interpolations/attributes/processNameValueAttribute.function.js +1 -1
  23. package/js/interpolations/attributes/processNameValueAttribute.function.js.map +1 -1
  24. package/js/interpolations/attributes/renderTagArray.function.js +2 -2
  25. package/js/interpolations/attributes/renderTagArray.function.js.map +1 -1
  26. package/js/interpolations/attributes/specialAttribute.d.ts +3 -3
  27. package/js/interpolations/attributes/specialAttribute.js +2 -2
  28. package/js/interpolations/attributes/specialAttribute.js.map +1 -1
  29. package/js/interpolations/attributes/updateAttribute.function.d.ts +3 -3
  30. package/js/interpolations/attributes/updateAttribute.function.js +2 -2
  31. package/js/interpolations/attributes/updateAttribute.function.js.map +1 -1
  32. package/js/interpolations/index.d.ts +0 -1
  33. package/js/interpolations/index.js +0 -1
  34. package/js/interpolations/index.js.map +1 -1
  35. package/js/interpolations/interpolateTemplate.d.ts +0 -4
  36. package/js/interpolations/optimizers/ObjectNode.types.d.ts +1 -1
  37. package/js/interpolations/optimizers/attachDomElements.function.js +12 -10
  38. package/js/interpolations/optimizers/attachDomElements.function.js.map +1 -1
  39. package/js/interpolations/optimizers/attachDynamicDom.function.d.ts +3 -3
  40. package/js/interpolations/optimizers/attachDynamicDom.function.js +8 -8
  41. package/js/interpolations/optimizers/attachDynamicDom.function.js.map +1 -1
  42. package/js/interpolations/optimizers/domProcessContextItem.function.d.ts +3 -3
  43. package/js/interpolations/optimizers/domProcessContextItem.function.js +3 -3
  44. package/js/interpolations/optimizers/domProcessContextItem.function.js.map +1 -1
  45. package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.js +11 -5
  46. package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.js.map +1 -1
  47. package/js/interpolations/optimizers/parseHTML.function.js +9 -6
  48. package/js/interpolations/optimizers/parseHTML.function.js.map +1 -1
  49. package/js/interpolations/optimizers/replacePlaceholders.function.js +9 -5
  50. package/js/interpolations/optimizers/replacePlaceholders.function.js.map +1 -1
  51. package/js/isInstance.d.ts +1 -0
  52. package/js/isInstance.js +1 -0
  53. package/js/isInstance.js.map +1 -1
  54. package/js/render/afterRender.function.d.ts +6 -0
  55. package/js/render/afterRender.function.js +21 -0
  56. package/js/render/afterRender.function.js.map +1 -0
  57. package/js/render/attributes/processAttribute.function.d.ts +21 -0
  58. package/js/render/attributes/processAttribute.function.js +174 -0
  59. package/js/render/attributes/processAttribute.function.js.map +1 -0
  60. package/js/render/attributes/processUpdateAttrContext.function.d.ts +3 -0
  61. package/js/render/attributes/processUpdateAttrContext.function.js +17 -0
  62. package/js/render/attributes/processUpdateAttrContext.function.js.map +1 -0
  63. package/js/render/buildBeforeElement.function.d.ts +9 -0
  64. package/js/render/buildBeforeElement.function.js +45 -0
  65. package/js/render/buildBeforeElement.function.js.map +1 -0
  66. package/js/render/destroySupport.function.d.ts +3 -0
  67. package/js/render/destroySupport.function.js +17 -0
  68. package/js/render/destroySupport.function.js.map +1 -0
  69. package/js/render/dom/attachDomElements.function.d.ts +12 -0
  70. package/js/render/dom/attachDomElements.function.js +87 -0
  71. package/js/render/dom/attachDomElements.function.js.map +1 -0
  72. package/js/render/executeWrap.function.d.ts +5 -0
  73. package/js/render/executeWrap.function.js +26 -0
  74. package/js/render/executeWrap.function.js.map +1 -0
  75. package/js/render/index.d.ts +5 -0
  76. package/js/render/index.js +6 -0
  77. package/js/render/index.js.map +1 -0
  78. package/js/render/paint.function.d.ts +22 -0
  79. package/js/render/paint.function.js +79 -0
  80. package/js/render/paint.function.js.map +1 -0
  81. package/js/render/registerNewTagElement.function.d.ts +4 -0
  82. package/js/render/registerNewTagElement.function.js +35 -0
  83. package/js/render/registerNewTagElement.function.js.map +1 -0
  84. package/js/render/renderExistingTag.function.d.ts +6 -0
  85. package/js/render/renderExistingTag.function.js +20 -0
  86. package/js/render/renderExistingTag.function.js.map +1 -0
  87. package/js/render/renderSupport.function.d.ts +9 -0
  88. package/js/render/renderSupport.function.js +81 -0
  89. package/js/render/renderSupport.function.js.map +1 -0
  90. package/js/render/renderTagElement.function.d.ts +22 -0
  91. package/js/render/renderTagElement.function.js +80 -0
  92. package/js/render/renderTagElement.function.js.map +1 -0
  93. package/js/render/renderTagOnly.function.d.ts +4 -0
  94. package/js/render/renderTagOnly.function.js +37 -0
  95. package/js/render/renderTagOnly.function.js.map +1 -0
  96. package/js/render/renderWithSupport.function.d.ts +9 -0
  97. package/js/render/renderWithSupport.function.js +51 -0
  98. package/js/render/renderWithSupport.function.js.map +1 -0
  99. package/js/render/softDestroySupport.function.d.ts +3 -0
  100. package/js/render/softDestroySupport.function.js +27 -0
  101. package/js/render/softDestroySupport.function.js.map +1 -0
  102. package/js/render/update/processRenderOnceInit.function.d.ts +8 -0
  103. package/js/render/update/processRenderOnceInit.function.js +15 -0
  104. package/js/render/update/processRenderOnceInit.function.js.map +1 -0
  105. package/js/render/update/processTag.function.d.ts +18 -0
  106. package/js/render/update/processTag.function.js +41 -0
  107. package/js/render/update/processTag.function.js.map +1 -0
  108. package/js/render/update/updateExistingTagComponent.function.d.ts +8 -0
  109. package/js/render/update/updateExistingTagComponent.function.js +118 -0
  110. package/js/render/update/updateExistingTagComponent.function.js.map +1 -0
  111. package/js/render/update/updateSupportBy.function.d.ts +3 -0
  112. package/js/render/update/updateSupportBy.function.js +19 -0
  113. package/js/render/update/updateSupportBy.function.js.map +1 -0
  114. package/js/state/callbackStateUpdate.function.js +4 -5
  115. package/js/state/callbackStateUpdate.function.js.map +1 -1
  116. package/js/state/handleProviderChanges.function.d.ts +1 -2
  117. package/js/state/index.d.ts +2 -1
  118. package/js/state/index.js +2 -1
  119. package/js/state/index.js.map +1 -1
  120. package/js/state/providers.d.ts +2 -1
  121. package/js/state/providers.js +43 -39
  122. package/js/state/providers.js.map +1 -1
  123. package/js/state/providersChangeCheck.function.js +4 -1
  124. package/js/state/providersChangeCheck.function.js.map +1 -1
  125. package/js/state/states.utils.js +5 -4
  126. package/js/state/states.utils.js.map +1 -1
  127. package/js/state/subscribe.function.d.ts +3 -1
  128. package/js/state/subscribe.function.js +1 -0
  129. package/js/state/subscribe.function.js.map +1 -1
  130. package/js/state/subscribeWith.function.d.ts +3 -0
  131. package/js/state/subscribeWith.function.js +22 -0
  132. package/js/state/subscribeWith.function.js.map +1 -0
  133. package/js/state/syncStates.function.js +22 -18
  134. package/js/state/syncStates.function.js.map +1 -1
  135. package/js/subject/signal.function.d.ts +1 -1
  136. package/js/tag/AdvancedContextItem.type.d.ts +5 -0
  137. package/js/tag/AdvancedContextItem.type.js +2 -0
  138. package/js/tag/AdvancedContextItem.type.js.map +1 -0
  139. package/js/tag/BaseSupport.type.d.ts +2 -1
  140. package/js/tag/Context.types.d.ts +3 -24
  141. package/js/tag/ContextItem.type.d.ts +26 -0
  142. package/js/tag/ContextItem.type.js +2 -0
  143. package/js/tag/ContextItem.type.js.map +1 -0
  144. package/js/tag/ProcessInit.type.d.ts +6 -0
  145. package/js/tag/ProcessInit.type.js +2 -0
  146. package/js/tag/ProcessInit.type.js.map +1 -0
  147. package/js/tag/StringTag.type.d.ts +3 -2
  148. package/js/tag/SupportContextItem.type.d.ts +7 -0
  149. package/js/tag/SupportContextItem.type.js +2 -0
  150. package/js/tag/SupportContextItem.type.js.map +1 -0
  151. package/js/tag/Tag.type.d.ts +9 -5
  152. package/js/tag/TagCounts.type.d.ts +4 -0
  153. package/js/tag/TagCounts.type.js +2 -0
  154. package/js/tag/TagCounts.type.js.map +1 -0
  155. package/js/tag/TemplateValue.type.d.ts +7 -0
  156. package/js/tag/TemplateValue.type.js +2 -0
  157. package/js/tag/TemplateValue.type.js.map +1 -0
  158. package/js/tag/buildBeforeElement.function.js +3 -3
  159. package/js/tag/buildBeforeElement.function.js.map +1 -1
  160. package/js/tag/checkDestroyPrevious.function.d.ts +2 -3
  161. package/js/tag/checkDestroyPrevious.function.js +5 -21
  162. package/js/tag/checkDestroyPrevious.function.js.map +1 -1
  163. package/js/tag/checkSimpleValueChange.function.d.ts +3 -0
  164. package/js/tag/checkSimpleValueChange.function.js +27 -0
  165. package/js/tag/checkSimpleValueChange.function.js.map +1 -0
  166. package/js/tag/checkTagValueChange.function.d.ts +4 -4
  167. package/js/tag/checkTagValueChange.function.js +12 -17
  168. package/js/tag/checkTagValueChange.function.js.map +1 -1
  169. package/js/tag/clonePropsBy.function.js +8 -2
  170. package/js/tag/clonePropsBy.function.js.map +1 -1
  171. package/js/tag/createHtmlSupport.function.d.ts +2 -7
  172. package/js/tag/createHtmlSupport.function.js +1 -1
  173. package/js/tag/createHtmlSupport.function.js.map +1 -1
  174. package/js/tag/createSupport.function.d.ts +1 -1
  175. package/js/tag/createSupport.function.js.map +1 -1
  176. package/js/tag/destroyContext.function.d.ts +3 -2
  177. package/js/tag/destroyContext.function.js +15 -4
  178. package/js/tag/destroyContext.function.js.map +1 -1
  179. package/js/tag/destroySupport.function.js +1 -1
  180. package/js/tag/destroySupport.function.js.map +1 -1
  181. package/js/tag/findValuePath.function.d.ts +3 -0
  182. package/js/tag/findValuePath.function.js +24 -0
  183. package/js/tag/findValuePath.function.js.map +1 -0
  184. package/js/tag/gaurenteeInserBefore.function.d.ts +4 -0
  185. package/js/tag/gaurenteeInserBefore.function.js +18 -0
  186. package/js/tag/gaurenteeInserBefore.function.js.map +1 -0
  187. package/js/tag/getDomTag.function.d.ts +3 -1
  188. package/js/tag/getDomTag.function.js +72 -17
  189. package/js/tag/getDomTag.function.js.map +1 -1
  190. package/js/tag/getStringsId.function.js +4 -1
  191. package/js/tag/getStringsId.function.js.map +1 -1
  192. package/js/tag/getTagWrap.function.js +4 -4
  193. package/js/tag/getTagWrap.function.js.map +1 -1
  194. package/js/tag/getTemplaterResult.function.d.ts +9 -5
  195. package/js/tag/getTemplaterResult.function.js +3 -0
  196. package/js/tag/getTemplaterResult.function.js.map +1 -1
  197. package/js/tag/guaranteeInsertBefore.function.d.ts +4 -0
  198. package/js/tag/guaranteeInsertBefore.function.js +18 -0
  199. package/js/tag/guaranteeInsertBefore.function.js.map +1 -0
  200. package/js/tag/hasPropChanges.function.d.ts +1 -1
  201. package/js/tag/hasPropChanges.function.js +3 -3
  202. package/js/tag/hasPropChanges.function.js.map +1 -1
  203. package/js/tag/hasSupportChanged.function.d.ts +1 -0
  204. package/js/tag/hasSupportChanged.function.js +1 -0
  205. package/js/tag/hasSupportChanged.function.js.map +1 -1
  206. package/js/tag/html.js +1 -1
  207. package/js/tag/html.js.map +1 -1
  208. package/js/tag/index.d.ts +12 -8
  209. package/js/tag/index.js +6 -8
  210. package/js/tag/index.js.map +1 -1
  211. package/js/tag/isLikeTags.function.js +1 -1
  212. package/js/tag/isLikeTags.function.js.map +1 -1
  213. package/js/tag/loadNewBaseSupport.function.d.ts +4 -0
  214. package/js/tag/loadNewBaseSupport.function.js +11 -0
  215. package/js/tag/loadNewBaseSupport.function.js.map +1 -0
  216. package/js/tag/output.function.d.ts +2 -0
  217. package/js/tag/output.function.js +29 -0
  218. package/js/tag/output.function.js.map +1 -0
  219. package/js/tag/paint.function.d.ts +8 -4
  220. package/js/tag/paint.function.js +17 -16
  221. package/js/tag/paint.function.js.map +1 -1
  222. package/js/tag/processUpdateContext.function.d.ts +1 -4
  223. package/js/tag/processUpdateContext.function.js +3 -1
  224. package/js/tag/processUpdateContext.function.js.map +1 -1
  225. package/js/tag/props/alterProp.function.d.ts +28 -0
  226. package/js/tag/props/alterProp.function.js +148 -0
  227. package/js/tag/props/alterProp.function.js.map +1 -0
  228. package/js/tag/props/clonePropsBy.function.d.ts +6 -0
  229. package/js/tag/props/clonePropsBy.function.js +33 -0
  230. package/js/tag/props/clonePropsBy.function.js.map +1 -0
  231. package/js/tag/props/output.function.d.ts +1 -0
  232. package/js/tag/props/output.function.js +15 -0
  233. package/js/tag/props/output.function.js.map +1 -0
  234. package/js/tag/render/afterRender.function.d.ts +6 -0
  235. package/js/tag/render/afterRender.function.js +21 -0
  236. package/js/tag/render/afterRender.function.js.map +1 -0
  237. package/js/tag/render/renderTagOnly.function.js +1 -1
  238. package/js/tag/render/renderTagOnly.function.js.map +1 -1
  239. package/js/tag/render/softDestroySupport.function.js +2 -2
  240. package/js/tag/render/softDestroySupport.function.js.map +1 -1
  241. package/js/tag/smartRemoveKids.function.js +32 -22
  242. package/js/tag/smartRemoveKids.function.js.map +1 -1
  243. package/js/tag/tag.function.js +2 -2
  244. package/js/tag/tag.function.js.map +1 -1
  245. package/js/tag/tagElement.d.ts +4 -3
  246. package/js/tag/tagElement.js +16 -118
  247. package/js/tag/tagElement.js.map +1 -1
  248. package/js/tag/update/SubContext.type.d.ts +16 -0
  249. package/js/tag/update/SubContext.type.js +2 -0
  250. package/js/tag/update/SubContext.type.js.map +1 -0
  251. package/js/tag/update/checkSubContext.function.d.ts +3 -0
  252. package/js/tag/update/checkSubContext.function.js +18 -0
  253. package/js/tag/update/checkSubContext.function.js.map +1 -0
  254. package/js/tag/update/compareArrayItems.function.d.ts +6 -5
  255. package/js/tag/update/compareArrayItems.function.js +6 -3
  256. package/js/tag/update/compareArrayItems.function.js.map +1 -1
  257. package/js/tag/update/createAndProcessContextItem.function.d.ts +5 -5
  258. package/js/tag/update/createAndProcessContextItem.function.js +10 -12
  259. package/js/tag/update/createAndProcessContextItem.function.js.map +1 -1
  260. package/js/tag/update/deleteSubContext.function.d.ts +3 -0
  261. package/js/tag/update/deleteSubContext.function.js +25 -0
  262. package/js/tag/update/deleteSubContext.function.js.map +1 -0
  263. package/js/tag/update/forceUpdateExistingValue.function.d.ts +4 -4
  264. package/js/tag/update/forceUpdateExistingValue.function.js +2 -1
  265. package/js/tag/update/forceUpdateExistingValue.function.js.map +1 -1
  266. package/js/tag/update/getNewGlobal.function.d.ts +1 -1
  267. package/js/tag/update/handleStillTag.function.d.ts +2 -2
  268. package/js/tag/update/handleStillTag.function.js +1 -1
  269. package/js/tag/update/handleStillTag.function.js.map +1 -1
  270. package/js/tag/update/index.d.ts +5 -0
  271. package/js/tag/update/index.js +5 -0
  272. package/js/tag/update/index.js.map +1 -0
  273. package/js/tag/update/onFirstSubContext.function.d.ts +7 -0
  274. package/js/tag/update/onFirstSubContext.function.js +8 -0
  275. package/js/tag/update/onFirstSubContext.function.js.map +1 -0
  276. package/js/tag/update/oneRenderToSupport.function.d.ts +1 -1
  277. package/js/tag/update/oneRenderToSupport.function.js +2 -2
  278. package/js/tag/update/oneRenderToSupport.function.js.map +1 -1
  279. package/js/tag/update/processDomTagInit.function.d.ts +7 -6
  280. package/js/tag/update/processDomTagInit.function.js +3 -5
  281. package/js/tag/update/processDomTagInit.function.js.map +1 -1
  282. package/js/tag/update/processFirstSubject.utils.d.ts +1 -6
  283. package/js/tag/update/processFirstSubjectComponent.function.d.ts +4 -4
  284. package/js/tag/update/processFirstSubjectComponent.function.js +1 -1
  285. package/js/tag/update/processFirstSubjectComponent.function.js.map +1 -1
  286. package/js/tag/update/processFirstSubjectValue.function.d.ts +6 -6
  287. package/js/tag/update/processFirstSubjectValue.function.js +4 -21
  288. package/js/tag/update/processFirstSubjectValue.function.js.map +1 -1
  289. package/js/tag/update/processNewSubjectTag.function.d.ts +3 -3
  290. package/js/tag/update/processNewSubjectTag.function.js +13 -15
  291. package/js/tag/update/processNewSubjectTag.function.js.map +1 -1
  292. package/js/tag/update/processRegularValue.function.d.ts +2 -2
  293. package/js/tag/update/processRegularValue.function.js +20 -8
  294. package/js/tag/update/processRegularValue.function.js.map +1 -1
  295. package/js/tag/update/processSubscribe.function.d.ts +8 -6
  296. package/js/tag/update/processSubscribe.function.js +9 -0
  297. package/js/tag/update/processSubscribe.function.js.map +1 -1
  298. package/js/tag/update/processTagArray.d.ts +5 -5
  299. package/js/tag/update/processTagArray.js +4 -5
  300. package/js/tag/update/processTagArray.js.map +1 -1
  301. package/js/tag/update/processTagComponentInit.function.d.ts +5 -4
  302. package/js/tag/update/processTagComponentInit.function.js +0 -2
  303. package/js/tag/update/processTagComponentInit.function.js.map +1 -1
  304. package/js/tag/update/processTagInit.function.d.ts +4 -3
  305. package/js/tag/update/processTagInit.function.js +1 -3
  306. package/js/tag/update/processTagInit.function.js.map +1 -1
  307. package/js/tag/update/processTagResult.function.d.ts +4 -4
  308. package/js/tag/update/processTagResult.function.js +6 -8
  309. package/js/tag/update/processTagResult.function.js.map +1 -1
  310. package/js/tag/update/setupSubscribe.function.d.ts +10 -22
  311. package/js/tag/update/setupSubscribe.function.js +31 -61
  312. package/js/tag/update/setupSubscribe.function.js.map +1 -1
  313. package/js/tag/update/syncPriorPropFunction.function.d.ts +1 -1
  314. package/js/tag/update/syncPriorPropFunction.function.js +1 -1
  315. package/js/tag/update/syncPriorPropFunction.function.js.map +1 -1
  316. package/js/tag/update/tagValueUpdateHandler.function.d.ts +9 -0
  317. package/js/tag/update/tagValueUpdateHandler.function.js +25 -0
  318. package/js/tag/update/tagValueUpdateHandler.function.js.map +1 -0
  319. package/js/tag/update/tryUpdateToTag.function.d.ts +2 -2
  320. package/js/tag/update/tryUpdateToTag.function.js +2 -2
  321. package/js/tag/update/tryUpdateToTag.function.js.map +1 -1
  322. package/js/tag/update/updateExistingArray.function.d.ts +1 -1
  323. package/js/tag/update/updateExistingObject.function.d.ts +1 -1
  324. package/js/tag/update/updateExistingValue.function.js +1 -1
  325. package/js/tag/update/updateExistingValue.function.js.map +1 -1
  326. package/js/tag/update/updateToDiffValue.function.d.ts +3 -3
  327. package/js/tag/update/updateToDiffValue.function.js +2 -0
  328. package/js/tag/update/updateToDiffValue.function.js.map +1 -1
  329. package/js/tag/update/valueToTagJsVar.function.d.ts +5 -0
  330. package/js/tag/update/valueToTagJsVar.function.js +55 -0
  331. package/js/tag/update/valueToTagJsVar.function.js.map +1 -0
  332. package/js/tagJsTypes/getInnerHTML.function.d.ts +13 -0
  333. package/js/tagJsTypes/getInnerHTML.function.js +35 -0
  334. package/js/tagJsTypes/getInnerHTML.function.js.map +1 -0
  335. package/js/tagJsTypes/index.d.ts +3 -0
  336. package/js/tagJsTypes/index.js +4 -0
  337. package/js/tagJsTypes/index.js.map +1 -0
  338. package/js/tagJsTypes/subscribe.function.d.ts +20 -0
  339. package/js/tagJsTypes/subscribe.function.js +15 -0
  340. package/js/tagJsTypes/subscribe.function.js.map +1 -0
  341. package/js/tagJsTypes/tag.function.d.ts +46 -0
  342. package/js/tagJsTypes/tag.function.js +110 -0
  343. package/js/tagJsTypes/tag.function.js.map +1 -0
  344. package/js/tagJsTypes/tagJsType.type.d.ts +7 -0
  345. package/js/tagJsTypes/tagJsType.type.js +2 -0
  346. package/js/tagJsTypes/tagJsType.type.js.map +1 -0
  347. package/js/tagJsVars/getArrayTagJsVar.function.d.ts +2 -0
  348. package/js/tagJsVars/getArrayTagJsVar.function.js +18 -0
  349. package/js/tagJsVars/getArrayTagJsVar.function.js.map +1 -0
  350. package/js/tagJsVars/getInnerHTML.function.d.ts +2 -0
  351. package/js/tagJsVars/getInnerHTML.function.js +35 -0
  352. package/js/tagJsVars/getInnerHTML.function.js.map +1 -0
  353. package/js/tagJsVars/getSimpleTagVar.function.d.ts +14 -0
  354. package/js/tagJsVars/getSimpleTagVar.function.js +49 -0
  355. package/js/tagJsVars/getSimpleTagVar.function.js.map +1 -0
  356. package/js/tagJsVars/index.d.ts +4 -0
  357. package/js/tagJsVars/index.js +5 -0
  358. package/js/tagJsVars/index.js.map +1 -0
  359. package/js/tagJsVars/subscribe.function.d.ts +21 -0
  360. package/js/tagJsVars/subscribe.function.js +21 -0
  361. package/js/tagJsVars/subscribe.function.js.map +1 -0
  362. package/js/tagJsVars/tag.function.d.ts +47 -0
  363. package/js/tagJsVars/tag.function.js +95 -0
  364. package/js/tagJsVars/tag.function.js.map +1 -0
  365. package/js/tagJsVars/tagJsVar.type.d.ts +12 -0
  366. package/js/tagJsVars/tagJsVar.type.js +2 -0
  367. package/js/tagJsVars/tagJsVar.type.js.map +1 -0
  368. package/js/tagJsVars/valueToTagJsVar.function.d.ts +4 -0
  369. package/js/tagJsVars/valueToTagJsVar.function.js +17 -0
  370. package/js/tagJsVars/valueToTagJsVar.function.js.map +1 -0
  371. package/js/updateBeforeTemplate.function.d.ts +3 -2
  372. package/js/updateBeforeTemplate.function.js +5 -7
  373. package/js/updateBeforeTemplate.function.js.map +1 -1
  374. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTagElement.function.js","sourceRoot":"","sources":["../../ts/render/renderTagElement.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,EAA6B,YAAY,EAA6B,MAAM,aAAa,CAAA;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE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,EAAE,CAAC;QAClD,OAAO,gBAAgB,CACrB,SAAS,EACT,aAAa,EACb,UAAU,EACV,OAAO,EACP,UAAU,CACX,CAAA;IACH,CAAC;IAED,+CAA+C;IAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,OAAkB,CAAA;IAC5C,MAAM,UAAU,GAAG,OAAO,CACxB,UAAU,EACV,OAAO,CACR,CAAA;IAED,cAAc,CAAC,UAAU,CAAC,CAAA;IAE1B,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,SAAS,gBAAgB,CACvB,SAA0B,EAC1B,aAAsB,EACtB,UAAsB,EACtB,OAA2B,EAC3B,UAAmB;IAEnB,MAAM,MAAM,GAAG,CAAC,SAAS,CAAC,OAAO,IAAI,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAmC,CAAA;IAE7F,IAAG,CAAC,aAAa,EAAE,CAAC;QAClB,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;QACrE,cAAc,CAAC,UAAU,CAAC,CAAA;QAC1B,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,WAAW,CACT,SAAS,EACT,MAAM,EACN,UAAU,CACX,CAAA;IAED,cAAc,CAAC,UAAU,CAAC,CAAA;IAE1B,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { SupportContextItem } from '../tag/SupportContextItem.type.js';
2
+ import { AnySupport } from '../tag/AnySupport.type.js';
3
+ export declare function renderTagOnly(newSupport: AnySupport, prevSupport: AnySupport | undefined, // causes restate
4
+ subject: SupportContextItem, ownerSupport?: AnySupport): AnySupport;
@@ -0,0 +1,37 @@
1
+ import { executeWrap } from './executeWrap.function.js';
2
+ import { ValueTypes } from '../tag/ValueTypes.enum.js';
3
+ import { runAfterRender } from './afterRender.function.js';
4
+ import { initState, reState } from '../state/state.utils.js';
5
+ import { setUseMemory } from '../state/setUseMemory.object.js';
6
+ import { createSupport } from '../tag/createSupport.function.js';
7
+ export function renderTagOnly(newSupport, prevSupport, // causes restate
8
+ subject, ownerSupport) {
9
+ runBeforeRender(newSupport, prevSupport);
10
+ const templater = newSupport.templater;
11
+ let reSupport;
12
+ // NEW TAG CREATED HERE
13
+ if (templater.tagJsType === ValueTypes.stateRender) {
14
+ const result = templater; // .wrapper as any// || {original: templater} as any
15
+ reSupport = createSupport(templater, ownerSupport, newSupport.appSupport, // ownerSupport.appSupport as AnySupport,
16
+ subject);
17
+ executeWrap(templater, result, reSupport);
18
+ }
19
+ else {
20
+ // functions wrapped in tag()
21
+ const wrapper = templater.wrapper;
22
+ // calls the function returned from getTagWrap()
23
+ reSupport = wrapper(newSupport, subject, prevSupport);
24
+ }
25
+ runAfterRender(reSupport, ownerSupport);
26
+ return reSupport;
27
+ }
28
+ function runBeforeRender(newSupport, prevSupport) {
29
+ const prevState = prevSupport?.state;
30
+ const config = setUseMemory.stateConfig;
31
+ if (prevState) {
32
+ reState(newSupport, prevSupport, setUseMemory.stateConfig, prevState);
33
+ return;
34
+ }
35
+ initState(newSupport, config);
36
+ }
37
+ //# sourceMappingURL=renderTagOnly.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTagOnly.function.js","sourceRoot":"","sources":["../../ts/render/renderTagOnly.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAGhE,MAAM,UAAU,aAAa,CAC3B,UAAsB,EACtB,WAAmC,EAAE,iBAAiB;AACtD,OAA0B,EAC1B,YAAyB;IAEzB,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,CAAA;IAExC,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAA;IACtC,IAAI,SAAqB,CAAA;IAEzB,uBAAuB;IACvB,IAAG,SAAS,CAAC,SAAS,KAAK,UAAU,CAAC,WAAW,EAAE,CAAC;QAClD,MAAM,MAAM,GAAG,SAAmC,CAAA,CAAC,oDAAoD;QAEvG,SAAS,GAAG,aAAa,CACvB,SAAS,EACT,YAA0B,EAC1B,UAAU,CAAC,UAAU,EAAE,yCAAyC;QAChE,OAAO,CACR,CAAA;QAED,WAAW,CACT,SAAS,EACT,MAAM,EACN,SAAS,CACV,CAAA;IACH,CAAC;SAAM,CAAC;QACN,6BAA6B;QAC7B,MAAM,OAAO,GAAG,SAAS,CAAC,OAAkB,CAAA;QAE5C,gDAAgD;QAChD,SAAS,GAAG,OAAO,CACjB,UAAU,EACV,OAAO,EACP,WAAW,CACZ,CAAA;IACH,CAAC;IAED,cAAc,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;IAEvC,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAS,eAAe,CACtB,UAAsB,EACtB,WAAwB;IAExB,MAAM,SAAS,GAAG,WAAW,EAAE,KAAK,CAAA;IACpC,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAA;IAEvC,IAAG,SAAS,EAAE,CAAC;QACb,OAAO,CACL,UAAU,EACV,WAAW,EACX,YAAY,CAAC,WAAW,EACxB,SAAS,CACV,CAAA;QAED,OAAM;IACR,CAAC;IAED,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAC/B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { AnySupport } from '../tag/AnySupport.type.js';
2
+ import { SupportContextItem } from '../tag/SupportContextItem.type.js';
3
+ /** TODO: This seems to support both new and updates and should be separated? */
4
+ export declare function renderWithSupport(newSupport: AnySupport, lastSupport: AnySupport | undefined, // previous (global.newest)
5
+ subject: SupportContextItem, // events & memory
6
+ ownerSupport?: AnySupport): {
7
+ support: AnySupport;
8
+ wasLikeTags: boolean;
9
+ };
@@ -0,0 +1,51 @@
1
+ import { moveProviders } from './update/updateExistingTagComponent.function.js';
2
+ import { softDestroySupport } from './softDestroySupport.function.js';
3
+ import { renderTagOnly } from './renderTagOnly.function.js';
4
+ import { isLikeTags } from '../tag/isLikeTags.function.js';
5
+ import { ValueTypes } from '../tag/ValueTypes.enum.js';
6
+ /** TODO: This seems to support both new and updates and should be separated? */
7
+ export function renderWithSupport(newSupport, lastSupport, // previous (global.newest)
8
+ subject, // events & memory
9
+ ownerSupport) {
10
+ const lastTemplater = lastSupport?.templater;
11
+ const lastTag = lastTemplater?.tag;
12
+ const reSupport = renderTagOnly(newSupport, lastSupport, subject, ownerSupport);
13
+ const isLikeTag = !lastSupport || isLikeTags(lastSupport, reSupport);
14
+ if (!isLikeTag) {
15
+ moveProviders(lastSupport, reSupport);
16
+ softDestroySupport(lastSupport);
17
+ const global = reSupport.subject.global;
18
+ global.oldest = reSupport;
19
+ global.newest = reSupport;
20
+ }
21
+ else if (lastSupport) {
22
+ const tag = lastSupport.templater.tag;
23
+ if (tag && subject.renderCount > 0) {
24
+ checkTagSoftDestroy(tag, lastSupport, lastTag);
25
+ }
26
+ }
27
+ const lastOwnerSupport = lastSupport?.ownerSupport;
28
+ reSupport.ownerSupport = (ownerSupport || lastOwnerSupport);
29
+ return { support: reSupport, wasLikeTags: isLikeTag };
30
+ }
31
+ function checkTagSoftDestroy(tag, lastSupport, lastTag) {
32
+ if (tag.tagJsType === ValueTypes.dom) {
33
+ const lastDom = lastTag?.dom;
34
+ const newDom = tag.dom;
35
+ if (lastDom !== newDom) {
36
+ softDestroySupport(lastSupport);
37
+ }
38
+ return;
39
+ }
40
+ if (lastTag) {
41
+ const lastStrings = lastTag.strings;
42
+ if (lastStrings) {
43
+ const oldLength = lastStrings?.length;
44
+ const newLength = tag.strings.length;
45
+ if (oldLength !== newLength) {
46
+ softDestroySupport(lastSupport);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ //# sourceMappingURL=renderWithSupport.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderWithSupport.function.js","sourceRoot":"","sources":["../../ts/render/renderWithSupport.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAA;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,OAAO,EAAE,aAAa,EAAE,MAAK,6BAA6B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAK,+BAA+B,CAAA;AAGzD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAGtD,gFAAgF;AAChF,MAAM,UAAU,iBAAiB,CAC/B,UAAsB,EACtB,WAAkC,EAAE,2BAA2B;AAC/D,OAA2B,EAAE,kBAAkB;AAC/C,YAAyB;IAEzB,MAAM,aAAa,GAAG,WAAW,EAAE,SAAS,CAAA;IAC5C,MAAM,OAAO,GAAG,aAAa,EAAE,GAAG,CAAA;IAElC,MAAM,SAAS,GAAG,aAAa,CAC7B,UAAU,EACV,WAAW,EACX,OAAO,EACP,YAAY,CACb,CAAA;IAED,MAAM,SAAS,GAAG,CAAC,WAAW,IAAI,UAAU,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;IACpE,IAAG,CAAC,SAAS,EAAE,CAAC;QACd,aAAa,CAAC,WAAyB,EAAE,SAAS,CAAC,CAAA;QACnD,kBAAkB,CAAC,WAAW,CAAC,CAAA;QAC/B,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,MAA0B,CAAA;QAC3D,MAAM,CAAC,MAAM,GAAG,SAAS,CAAA;QACzB,MAAM,CAAC,MAAM,GAAG,SAAS,CAAA;IAC3B,CAAC;SAAM,IAAG,WAAW,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,WAAW,CAAC,SAAS,CAAC,GAAG,CAAA;QACrC,IAAG,GAAG,IAAI,OAAO,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YAClC,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;IAED,MAAM,gBAAgB,GAAI,WAA0B,EAAE,YAAY,CAAA;IAClE,SAAS,CAAC,YAAY,GAAG,CAAC,YAAY,IAAI,gBAAgB,CAAe,CAAA;IAEzE,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAC,CAAA;AACrD,CAAC;AAED,SAAS,mBAAmB,CAC1B,GAAQ,EACR,WAAuB,EACvB,OAAa;IAEb,IAAG,GAAG,CAAC,SAAS,KAAG,UAAU,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,OAAO,GAAI,OAAkB,EAAE,GAAG,CAAA;QACxC,MAAM,MAAM,GAAI,GAAc,CAAC,GAAG,CAAA;QAClC,IAAG,OAAO,KAAK,MAAM,EAAE,CAAC;YACtB,kBAAkB,CAAC,WAAW,CAAC,CAAA;QACjC,CAAC;QAED,OAAM;IACR,CAAC;IAED,IAAG,OAAO,EAAE,CAAC;QACX,MAAM,WAAW,GAAI,OAAqB,CAAC,OAAO,CAAA;QAClD,IAAG,WAAW,EAAE,CAAC;YACf,MAAM,SAAS,GAAG,WAAW,EAAE,MAAM,CAAA;YACrC,MAAM,SAAS,GAAI,GAAiB,CAAC,OAAO,CAAC,MAAM,CAAA;YACnD,IAAG,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC3B,kBAAkB,CAAC,WAAW,CAAC,CAAA;YACjC,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { AnySupport } from '../tag/AnySupport.type.js';
2
+ /** used when a tag swaps content returned */
3
+ export declare function softDestroySupport(lastSupport: AnySupport): void;
@@ -0,0 +1,27 @@
1
+ import { getChildTagsToSoftDestroy, unsubscribeFrom } from '../tag/destroyContext.function.js';
2
+ import { getNewGlobal } from '../tag/update/getNewGlobal.function.js';
3
+ import { smartRemoveKids } from '../tag/smartRemoveKids.function.js';
4
+ /** used when a tag swaps content returned */
5
+ export function softDestroySupport(lastSupport) {
6
+ const subject = lastSupport.subject;
7
+ const global = subject.global;
8
+ const { subs, tags } = getChildTagsToSoftDestroy(global.context);
9
+ softDestroyOne(global);
10
+ for (const child of tags) {
11
+ const cGlobal = child.subject.global;
12
+ if (cGlobal.deleted === true) {
13
+ return;
14
+ }
15
+ softDestroyOne(cGlobal);
16
+ }
17
+ const mySubs = global.subscriptions;
18
+ if (mySubs) {
19
+ subs.forEach(unsubscribeFrom);
20
+ }
21
+ getNewGlobal(subject);
22
+ }
23
+ function softDestroyOne(global) {
24
+ global.deleted = true; // the children are truly destroyed but the main support will be swapped
25
+ smartRemoveKids(global, []);
26
+ }
27
+ //# sourceMappingURL=softDestroySupport.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softDestroySupport.function.js","sourceRoot":"","sources":["../../ts/render/softDestroySupport.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AAG9F,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAGpE,6CAA6C;AAC7C,MAAM,UAAU,kBAAkB,CAChC,WAAuB;IAEvB,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAA;IACnC,MAAM,MAAM,GAAG,OAAO,CAAC,MAA0B,CAAA;IACjD,MAAM,EAAC,IAAI,EAAE,IAAI,EAAC,GAAG,yBAAyB,CAAC,MAAM,CAAC,OAAwB,CAAC,CAAA;IAE/E,cAAc,CAAC,MAAM,CAAC,CAAA;IACtB,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;QACpC,IAAG,OAAO,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;YAC5B,OAAM;QACR,CAAC;QACD,cAAc,CAAE,OAAO,CAAE,CAAA;IAC3B,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAA;IACnC,IAAG,MAAM,EAAE,CAAC;QACV,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;IAC/B,CAAC;IAED,YAAY,CAAC,OAAO,CAAC,CAAA;AACvB,CAAC;AAED,SAAS,cAAc,CACrB,MAAwB;IAExB,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA,CAAC,wEAAwE;IAC9F,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAC7B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { TagCounts } from '../../tag/TagCounts.type.js';
2
+ import { ContextItem } from '../../tag/ContextItem.type.js';
3
+ import { AnySupport } from '../../tag/AnySupport.type.js';
4
+ import { TemplateValue } from '../../tag/TemplateValue.type.js';
5
+ export declare function processRenderOnceInit(value: TemplateValue, contextItem: ContextItem, // could be tag via result.tag
6
+ ownerSupport: AnySupport, // owningSupport
7
+ counts: TagCounts, // {added:0, removed:0}
8
+ appendTo?: Element, insertBefore?: Text): AnySupport;
@@ -0,0 +1,15 @@
1
+ import { oneRenderToSupport } from '../../tag/update/oneRenderToSupport.function.js';
2
+ import { renderTagOnly } from '../renderTagOnly.function.js';
3
+ import { getNewGlobal } from '../../tag/update/getNewGlobal.function.js';
4
+ import { processNewSubjectTag } from '../../tag/update/processNewSubjectTag.function.js';
5
+ export function processRenderOnceInit(value, contextItem, // could be tag via result.tag
6
+ ownerSupport, // owningSupport
7
+ counts, // {added:0, removed:0}
8
+ appendTo, insertBefore) {
9
+ getNewGlobal(contextItem);
10
+ const support = oneRenderToSupport(value, contextItem, ownerSupport);
11
+ renderTagOnly(support, undefined, contextItem, ownerSupport);
12
+ const result = processNewSubjectTag(support.templater, contextItem, ownerSupport, counts, appendTo, insertBefore);
13
+ return result;
14
+ }
15
+ //# sourceMappingURL=processRenderOnceInit.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processRenderOnceInit.function.js","sourceRoot":"","sources":["../../../ts/render/update/processRenderOnceInit.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AAGpF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAA;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAA;AAIxF,MAAM,UAAU,qBAAqB,CACnC,KAAoB,EACpB,WAAwB,EAAE,8BAA8B;AACxD,YAAwB,EAAE,gBAAgB;AAC1C,MAAiB,EAAE,uBAAuB;AAC1C,QAAkB,EAClB,YAAmB;IAEnB,YAAY,CAAC,WAAW,CAAC,CAAA;IAEzB,MAAM,OAAO,GAAG,kBAAkB,CAChC,KAAgB,EAChB,WAA0B,EAC1B,YAAY,CACb,CAAA;IAED,aAAa,CACX,OAAO,EACP,SAAS,EACT,WAAiC,EACjC,YAAY,CACb,CAAA;IAED,MAAM,MAAM,GAAG,oBAAoB,CACjC,OAAO,CAAC,SAAS,EACjB,WAA0B,EAC1B,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,YAAY,CACb,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { TemplaterResult } from '../../tag/getTemplaterResult.function.js';
2
+ import type { StringTag } from '../../tag/StringTag.type.js';
3
+ import type { DomTag } from '../../tag/DomTag.type.js';
4
+ import { ContextItem } from '../../tag/ContextItem.type.js';
5
+ import type { TagCounts } from '../../tag/TagCounts.type.js';
6
+ import { AnySupport } from '../../tag/AnySupport.type.js';
7
+ import { SupportContextItem } from '../../tag/SupportContextItem.type.js';
8
+ /** When first time render, adds to owner childTags
9
+ * Used for BOTH inserts & updates to values that were something else
10
+ * Intended use only for updates
11
+ */
12
+ export declare function processTag(ownerSupport: AnySupport, // owner
13
+ subject: SupportContextItem, // could be tag via result.tag
14
+ counts: TagCounts): AnySupport;
15
+ export declare function tagFakeTemplater(tag: StringTag | DomTag): TemplaterResult;
16
+ export declare function getFakeTemplater(): TemplaterResult;
17
+ /** Create support for a tag component */
18
+ export declare function newSupportByTemplater(templater: TemplaterResult, ownerSupport: AnySupport, subject: ContextItem): AnySupport;
@@ -0,0 +1,41 @@
1
+ import { createHtmlSupport } from '../../tag/createHtmlSupport.function.js';
2
+ import { checkTagValueChange } from '../../tag/checkTagValueChange.function.js';
3
+ import { buildBeforeElement } from '../buildBeforeElement.function.js';
4
+ import { ValueTypes } from '../../tag/ValueTypes.enum.js';
5
+ import { processTagInit } from '../../tag/update/processTagInit.function.js';
6
+ /** When first time render, adds to owner childTags
7
+ * Used for BOTH inserts & updates to values that were something else
8
+ * Intended use only for updates
9
+ */
10
+ export function processTag(ownerSupport, // owner
11
+ subject, // could be tag via result.tag
12
+ counts) {
13
+ const global = subject.global;
14
+ const support = global.newest;
15
+ support.ownerSupport = ownerSupport;
16
+ const ph = subject.placeholder;
17
+ buildBeforeElement(support, counts, undefined, ph);
18
+ return support;
19
+ }
20
+ export function tagFakeTemplater(tag) {
21
+ const templater = getFakeTemplater();
22
+ templater.tag = tag;
23
+ tag.templater = templater;
24
+ return templater;
25
+ }
26
+ export function getFakeTemplater() {
27
+ const fake = {
28
+ tagJsType: ValueTypes.templater,
29
+ processInit: processTagInit,
30
+ checkValueChange: checkTagValueChange,
31
+ };
32
+ return fake;
33
+ }
34
+ /** Create support for a tag component */
35
+ export function newSupportByTemplater(templater, ownerSupport, subject) {
36
+ const support = createHtmlSupport(templater, ownerSupport, ownerSupport.appSupport, subject);
37
+ const global = subject.global;
38
+ global.context = [];
39
+ return support;
40
+ }
41
+ //# sourceMappingURL=processTag.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processTag.function.js","sourceRoot":"","sources":["../../../ts/render/update/processTag.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EA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,MAAM,GAAG,OAAO,CAAC,MAA0B,CAAA;IACjD,MAAM,CAAC,OAAO,GAAG,EAAE,CAAA;IAEnB,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Props } from '../../Props.js';
2
+ import { AnySupport } from '../../tag/AnySupport.type.js';
3
+ import { SupportContextItem } from '../../tag/SupportContextItem.type.js';
4
+ export declare function updateExistingTagComponent(ownerSupport: AnySupport, support: AnySupport, // lastest
5
+ subject: SupportContextItem): void;
6
+ export declare function syncFunctionProps(newSupport: AnySupport, lastSupport: AnySupport, ownerSupport: AnySupport, newPropsArray: unknown[], // templater.props
7
+ maxDepth: number, depth?: number): Props;
8
+ export declare function moveProviders(lastSupport: AnySupport, newSupport: AnySupport): void;
@@ -0,0 +1,118 @@
1
+ import { deepCompareDepth, hasSupportChanged, shallowCompareDepth } from '../../tag/hasSupportChanged.function.js';
2
+ import { processReplacementComponent } from '../../tag/update/processFirstSubjectComponent.function.js';
3
+ import { castProps } from '../../tag/props/alterProp.function.js';
4
+ import { renderSupport } from '../renderSupport.function.js';
5
+ import { ValueTypes } from '../../tag/ValueTypes.enum.js';
6
+ import { destroySupport } from '../destroySupport.function.js';
7
+ import { getNewGlobal } from '../../tag/update/getNewGlobal.function.js';
8
+ import { isLikeTags } from '../../tag/isLikeTags.function.js';
9
+ import { PropWatches } from '../../tagJsVars/tag.function.js';
10
+ import { syncPriorPropFunction } from '../../tag/update/syncPriorPropFunction.function.js';
11
+ export function updateExistingTagComponent(ownerSupport, support, // lastest
12
+ subject) {
13
+ const global = subject.global;
14
+ const lastSupport = global.newest;
15
+ const oldWrapper = lastSupport.templater.wrapper;
16
+ const newWrapper = support.templater.wrapper;
17
+ let isSameTag = false;
18
+ const tagJsType = support.templater.tagJsType;
19
+ const skipComparing = ValueTypes.stateRender === tagJsType || ValueTypes.renderOnce === tagJsType;
20
+ if (skipComparing) {
21
+ isSameTag = support.templater.tagJsType === ValueTypes.renderOnce || isLikeTags(lastSupport, support);
22
+ }
23
+ else if (oldWrapper && newWrapper) {
24
+ const oldFunction = oldWrapper.original;
25
+ const newFunction = newWrapper.original;
26
+ // string compare both functions
27
+ isSameTag = oldFunction === newFunction;
28
+ }
29
+ const templater = support.templater;
30
+ if (!isSameTag) {
31
+ swapTags(subject, templater, ownerSupport);
32
+ return;
33
+ }
34
+ const hasChanged = skipComparing || hasSupportChanged(lastSupport, templater);
35
+ // everyhing has matched, no display needs updating.
36
+ if (!hasChanged) {
37
+ const maxDepth = templater.propWatch === PropWatches.DEEP ? deepCompareDepth : shallowCompareDepth;
38
+ syncSupports(templater, support, lastSupport, ownerSupport, maxDepth);
39
+ return;
40
+ }
41
+ if (global.locked) {
42
+ global.blocked.push(support);
43
+ return;
44
+ }
45
+ renderSupport(support);
46
+ ++subject.renderCount;
47
+ return;
48
+ }
49
+ export function syncFunctionProps(newSupport, lastSupport, ownerSupport, newPropsArray, // templater.props
50
+ maxDepth, depth = -1) {
51
+ const subject = lastSupport.subject;
52
+ const global = subject.global;
53
+ const newest = global.newest;
54
+ if (!newest) {
55
+ const castedProps = castProps(newPropsArray, newSupport, depth);
56
+ newPropsArray.push(...castedProps);
57
+ const propsConfig = newSupport.propsConfig;
58
+ propsConfig.castProps = castedProps;
59
+ return newPropsArray;
60
+ }
61
+ lastSupport = newest || lastSupport;
62
+ const priorPropConfig = lastSupport.propsConfig;
63
+ const priorPropsArray = priorPropConfig.castProps;
64
+ const newArray = [];
65
+ for (let index = 0; index < newPropsArray.length; ++index) {
66
+ const prop = newPropsArray[index];
67
+ const priorProp = priorPropsArray[index];
68
+ const newValue = syncPriorPropFunction(priorProp, prop, newSupport, ownerSupport, maxDepth, depth + 1);
69
+ newArray.push(newValue);
70
+ }
71
+ const newPropsConfig = newSupport.propsConfig;
72
+ newPropsConfig.castProps = newArray;
73
+ return newArray;
74
+ }
75
+ export function moveProviders(lastSupport, newSupport) {
76
+ const global = lastSupport.subject.global;
77
+ let pIndex = -1;
78
+ const providers = global.providers = global.providers || [];
79
+ const pLen = providers.length - 1;
80
+ while (pIndex++ < pLen) {
81
+ const provider = providers[pIndex];
82
+ let index = -1;
83
+ const pcLen = provider.children.length - 1;
84
+ while (index++ < pcLen) {
85
+ const child = provider.children[index];
86
+ const wasSameGlobals = global === child.subject.global;
87
+ if (wasSameGlobals) {
88
+ provider.children.splice(index, 1);
89
+ provider.children.push(newSupport);
90
+ return;
91
+ }
92
+ }
93
+ }
94
+ }
95
+ /** Exchanges entire propsConfigs */
96
+ function syncSupports(templater, support, lastSupport, ownerSupport, maxDepth) {
97
+ // update function refs to use latest references
98
+ const newProps = templater.props;
99
+ const castedProps = syncFunctionProps(support, lastSupport, ownerSupport, newProps, maxDepth);
100
+ const propsConfig = support.propsConfig;
101
+ // When new support actually makes call to real function, use these pre casted props
102
+ propsConfig.castProps = castedProps;
103
+ const lastPropsConfig = lastSupport.propsConfig;
104
+ // update support to think it has different cloned props
105
+ lastPropsConfig.latest = propsConfig.latest;
106
+ return lastSupport; // its the same tag component
107
+ }
108
+ /** Was tag, will be tag */
109
+ function swapTags(subject, templater, // new tag
110
+ ownerSupport) {
111
+ const global = subject.global;
112
+ const oldestSupport = global.oldest;
113
+ destroySupport(oldestSupport, global);
114
+ getNewGlobal(subject);
115
+ const newSupport = processReplacementComponent(templater, subject, ownerSupport, { added: 0, removed: 0 });
116
+ return newSupport;
117
+ }
118
+ //# sourceMappingURL=updateExistingTagComponent.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateExistingTagComponent.function.js","sourceRoot":"","sources":["../../../ts/render/update/updateExistingTagComponent.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAK,yCAAyC,CAAA;AAEjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAA;AAEvG,OAAO,EAAE,SAAS,EAAc,MAAK,uCAAuC,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAK,8B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AAA;IAErC,YAAY,CAAC,OAAO,CAAC,CAAA;IAErB,MAAM,UAAU,GAAG,2BAA2B,CAC5C,SAAS,EACT,OAAO,EACP,YAAY,EACZ,EAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAC,CACvB,CAAA;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { AnySupport } from '../../tag/AnySupport.type.js';
2
+ export declare function updateSupportBy(olderSupport: AnySupport, newerSupport: AnySupport): void;
3
+ export declare function updateSupportValuesBy(olderSupport: AnySupport, newerSupport: AnySupport): void;
@@ -0,0 +1,19 @@
1
+ import { paint, painting } from '../paint.function.js';
2
+ import { processUpdateContext } from '../../tag/processUpdateContext.function.js';
3
+ export function updateSupportBy(olderSupport, newerSupport) {
4
+ const global = olderSupport.subject.global;
5
+ const context = global.context;
6
+ updateSupportValuesBy(olderSupport, newerSupport);
7
+ ++painting.locks;
8
+ processUpdateContext(olderSupport, context);
9
+ --painting.locks;
10
+ paint();
11
+ }
12
+ export function updateSupportValuesBy(olderSupport, newerSupport) {
13
+ const newTemplate = newerSupport.templater;
14
+ const tempTag = newerSupport.templater.tag;
15
+ const values = newTemplate.values || tempTag.values;
16
+ const tag = olderSupport.templater.tag;
17
+ tag.values = values;
18
+ }
19
+ //# sourceMappingURL=updateSupportBy.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateSupportBy.function.js","sourceRoot":"","sources":["../../../ts/render/update/updateSupportBy.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAA;AAOjF,MAAM,UAAU,eAAe,CAC7B,YAAwB,EACxB,YAAwB;IAExB,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,MAA0B,CAAA;IAC9D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAA;IAE9B,qBAAqB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;IAEjD,EAAE,QAAQ,CAAC,KAAK,CAAA;IAChB,oBAAoB,CAAC,YAAY,EAAE,OAAmC,CAAC,CAAA;IACvE,EAAE,QAAQ,CAAC,KAAK,CAAA;IAEhB,KAAK,EAAE,CAAA;AACT,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,YAAwB,EACxB,YAAwB;IAExB,MAAM,WAAW,GAAG,YAAY,CAAC,SAA2B,CAAA;IAC5D,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,CAAC,GAAU,CAAA;IACjD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAA;IACnD,MAAM,GAAG,GAAG,YAAY,CAAC,SAAS,CAAC,GAAa,CAAA;IAChD,GAAG,CAAC,MAAM,GAAG,MAAM,CAAA;AACrB,CAAC"}
@@ -1,20 +1,19 @@
1
- import { renderSupport } from '../tag/render/renderSupport.function.js';
2
- import { syncStatesArray } from './syncStates.function.js';
1
+ import { renderSupport } from '../render/renderSupport.function.js';
3
2
  import { isPromise } from '../isInstance.js';
4
3
  export default function callbackStateUpdate(support, oldStates, callback, ...args) {
5
4
  const global = support.subject.global;
6
5
  const newestSupport = global.newest;
7
6
  // NEWEST UPDATE OLDEST: ensure that the oldest has the latest values first
8
- syncStatesArray(newestSupport.states, oldStates);
7
+ //syncStatesArray(newestSupport.states, oldStates)
9
8
  // run the callback
10
9
  const maybePromise = callback(...args);
11
10
  // OLDEST UPDATE NEWEST: send the oldest state changes into the newest
12
- syncStatesArray(oldStates, newestSupport.states);
11
+ //syncStatesArray(oldStates, newestSupport.states)
13
12
  renderSupport(newestSupport);
14
13
  if (isPromise(maybePromise)) {
15
14
  maybePromise.finally(() => {
16
15
  // send the oldest state changes into the newest
17
- syncStatesArray(oldStates, newestSupport.states);
16
+ // syncStatesArray(oldStates, newestSupport.states)
18
17
  renderSupport(newestSupport);
19
18
  });
20
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"callbackStateUpdate.function.js","sourceRoot":"","sources":["../../ts/state/callbackStateUpdate.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAG1D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,OAAmB,EACnB,SAAyB,EACzB,QAAkD,EAClD,GAAG,IAAW;IAEd,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAA0B,CAAA;IACzD,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAA;IAEnC,2EAA2E;IAC3E,eAAe,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAEhD,mBAAmB;IACnB,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,IAAiC,CAAC,CAAA;IAEnE,sEAAsE;IACtE,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAEhD,aAAa,CAAC,aAAa,CAAC,CAAA;IAE5B,IAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1B,YAA6B,CAAC,OAAO,CAAC,GAAG,EAAE;YAC1C,gDAAgD;YAChD,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;YAChD,aAAa,CAAC,aAAa,CAAC,CAAA;QAC9B,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,wBAAwB;IACxB,OAAO,YAAY,CAAA;AACrB,CAAC"}
1
+ {"version":3,"file":"callbackStateUpdate.function.js","sourceRoot":"","sources":["../../ts/state/callbackStateUpdate.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAGnE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,OAAmB,EACnB,SAAyB,EACzB,QAAkD,EAClD,GAAG,IAAW;IAEd,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAA0B,CAAA;IACzD,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAA;IAEnC,2EAA2E;IAC3E,kDAAkD;IAElD,mBAAmB;IACnB,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,IAAiC,CAAC,CAAA;IAEnE,sEAAsE;IACtE,kDAAkD;IAElD,aAAa,CAAC,aAAa,CAAC,CAAA;IAE5B,IAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1B,YAA6B,CAAC,OAAO,CAAC,GAAG,EAAE;YAC1C,gDAAgD;YAChD,mDAAmD;YACnD,aAAa,CAAC,aAAa,CAAC,CAAA;QAC9B,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,wBAAwB;IACxB,OAAO,YAAY,CAAA;AACrB,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import { AnySupport } from '../tag/AnySupport.type.js';
2
2
  import { Provider } from './providers.js';
3
3
  export declare function handleProviderChanges(appSupport: AnySupport, provider: Provider): TagWithProvider[];
4
- type TagWithProvider = {
4
+ export type TagWithProvider = {
5
5
  support: AnySupport;
6
6
  renderCount: number;
7
7
  provider: Provider;
8
8
  };
9
- export {};
@@ -11,4 +11,5 @@ export * from './onInit.js';
11
11
  export * from './onDestroy.js';
12
12
  export * from './state.function.js';
13
13
  export * from './states.function.js';
14
- export { subscribe } from './subscribe.function.js';
14
+ export { subscribe } from '../tagJsVars/subscribe.function.js';
15
+ export { subscribeWith } from './subscribeWith.function.js';
package/js/state/index.js CHANGED
@@ -11,5 +11,6 @@ export * from './onInit.js';
11
11
  export * from './onDestroy.js';
12
12
  export * from './state.function.js';
13
13
  export * from './states.function.js';
14
- export { subscribe } from './subscribe.function.js';
14
+ export { subscribe } from '../tagJsVars/subscribe.function.js';
15
+ export { subscribeWith } from './subscribeWith.function.js';
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAE9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAE9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA"}
@@ -17,6 +17,7 @@ export declare const providers: {
17
17
  * @param {(new (...args: any[]) => T) | () => T} constructor
18
18
  * @returns {T}
19
19
  */
20
- inject: <T>(constructor: ProviderConstructor<T>) => T;
20
+ inject: typeof providerInject;
21
21
  };
22
+ declare function providerInject<T>(constructor: ProviderConstructor<T>): T;
22
23
  export {};
@@ -1,9 +1,12 @@
1
1
  import { getSupportInCycle } from '../tag/getSupportInCycle.function.js';
2
2
  import { setUseMemory } from './setUseMemory.object.js';
3
3
  import { state } from './state.function.js';
4
+ function getBlankDiffMemory() {
5
+ return { stateDiff: 0, provider: undefined };
6
+ }
4
7
  export const providers = {
5
8
  create: (constructMethod) => {
6
- const stateDiffMemory = state(() => ({ stateDiff: 0, provider: undefined }));
9
+ const stateDiffMemory = state(getBlankDiffMemory);
7
10
  // mimic how many states were called the first time
8
11
  if (stateDiffMemory.stateDiff) {
9
12
  let x = stateDiffMemory.stateDiff;
@@ -44,44 +47,45 @@ export const providers = {
44
47
  * @param {(new (...args: any[]) => T) | () => T} constructor
45
48
  * @returns {T}
46
49
  */
47
- inject: (constructor) => {
48
- // find once, return same every time after
49
- return state(() => {
50
- // const memory = setUse.memory
51
- const cm = constructor;
52
- const compareTo = cm.compareTo = cm.compareTo || constructor.toString();
53
- const support = getSupportInCycle(); // memory.stateConfig.support as AnySupport
54
- const providers = [];
55
- let owner = {
56
- ownerSupport: support.ownerSupport
57
- };
58
- while (owner.ownerSupport) {
59
- const ownGlobal = owner.ownerSupport.subject.global;
60
- const ownerProviders = ownGlobal.providers;
61
- if (!ownerProviders) {
62
- owner = owner.ownerSupport; // cause reloop checking next parent
63
- continue;
64
- }
65
- const provider = ownerProviders.find(provider => {
66
- providers.push(provider);
67
- const constructorMatch = provider.constructMethod.compareTo === compareTo;
68
- if (constructorMatch) {
69
- return true;
70
- }
71
- });
72
- if (provider) {
73
- const global = support.subject.global;
74
- const providers = global.providers = global.providers || [];
75
- providers.push(provider);
76
- provider.children.push(support);
77
- return provider.instance;
78
- }
50
+ inject: providerInject
51
+ };
52
+ function providerInject(constructor) {
53
+ // find once, return same every time after
54
+ return state(function providerInjectState() {
55
+ // const memory = setUse.memory
56
+ const cm = constructor;
57
+ const compareTo = cm.compareTo = cm.compareTo || constructor.toString();
58
+ const support = getSupportInCycle(); // memory.stateConfig.support as AnySupport
59
+ const providers = [];
60
+ let owner = {
61
+ ownerSupport: support.ownerSupport
62
+ };
63
+ while (owner.ownerSupport) {
64
+ const ownGlobal = owner.ownerSupport.subject.global;
65
+ const ownerProviders = ownGlobal.providers;
66
+ if (!ownerProviders) {
79
67
  owner = owner.ownerSupport; // cause reloop checking next parent
68
+ continue;
80
69
  }
81
- const msg = `Could not inject provider: ${constructor.name} ${constructor}`;
82
- console.warn(`${msg}. Available providers`, providers);
83
- throw new Error(msg);
84
- });
85
- }
86
- };
70
+ const provider = ownerProviders.find(provider => {
71
+ providers.push(provider);
72
+ const constructorMatch = provider.constructMethod.compareTo === compareTo;
73
+ if (constructorMatch) {
74
+ return true;
75
+ }
76
+ });
77
+ if (provider) {
78
+ const global = support.subject.global;
79
+ const providers = global.providers = global.providers || [];
80
+ providers.push(provider);
81
+ provider.children.push(support);
82
+ return provider.instance;
83
+ }
84
+ owner = owner.ownerSupport; // cause reloop checking next parent
85
+ }
86
+ const msg = `Could not inject provider: ${constructor.name} ${constructor}`;
87
+ console.warn(`${msg}. Available providers`, providers);
88
+ throw new Error(msg);
89
+ });
90
+ }
87
91
  //# sourceMappingURL=providers.js.map