@blac/core 2.0.15 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/StateContainerRegistry-B1GYx9Xo.js +975 -0
- package/dist/StateContainerRegistry-B1GYx9Xo.js.map +1 -0
- package/dist/{StateContainerRegistry-DmmzYa7S.js → StateContainerRegistry-B_ViBLvJ.js} +78 -77
- package/dist/StateContainerRegistry-B_ViBLvJ.js.map +1 -0
- package/dist/StateContainerRegistry-DJQqLrli.cjs +1046 -0
- package/dist/StateContainerRegistry-DJQqLrli.cjs.map +1 -0
- package/dist/{StateContainerRegistry-B4yVMYbx.cjs → StateContainerRegistry-FWKzPfS-.cjs} +77 -88
- package/dist/StateContainerRegistry-FWKzPfS-.cjs.map +1 -0
- package/dist/acquire-CbMz7gWs.cjs +46 -0
- package/dist/acquire-CbMz7gWs.cjs.map +1 -0
- package/dist/acquire-DHEOEVcj.cjs +46 -0
- package/dist/acquire-DHEOEVcj.cjs.map +1 -0
- package/dist/acquire-Don7499S.js +35 -0
- package/dist/acquire-Don7499S.js.map +1 -0
- package/dist/acquire-G8aB3GAx.js +35 -0
- package/dist/acquire-G8aB3GAx.js.map +1 -0
- package/dist/{branded-BSeA_mZO.cjs → branded-BybA0_xw.cjs} +1 -1
- package/dist/{branded-BSeA_mZO.cjs.map → branded-BybA0_xw.cjs.map} +1 -1
- package/dist/{branded-DwtzSsg0.js → branded-DkbUzncc.js} +1 -1
- package/dist/{branded-DwtzSsg0.js.map → branded-DkbUzncc.js.map} +1 -1
- package/dist/{config-DoHx0Xsl.js → config-8pyOC5gv.js} +2 -2
- package/dist/{config-0ZD9i3wy.js.map → config-8pyOC5gv.js.map} +1 -1
- package/dist/{config-B_4xXpvK.cjs → config-DVMnlHLv.cjs} +2 -2
- package/dist/{config-B3NIwDQv.cjs.map → config-DVMnlHLv.cjs.map} +1 -1
- package/dist/{config-C8xqVHTf.js → config-Dk1FxfXj.js} +5 -5
- package/dist/{config-BKGHop0V.js.map → config-Dk1FxfXj.js.map} +1 -1
- package/dist/config-sCPKPYxZ.cjs +32 -0
- package/dist/{config-BPj08-8h.cjs.map → config-sCPKPYxZ.cjs.map} +1 -1
- package/dist/constants.d.cts +0 -5
- package/dist/constants.d.ts +0 -5
- package/dist/core/StateContainer.d.ts +51 -10
- package/dist/core/StateContainerRegistry.d.ts +27 -10
- package/dist/debug.cjs +3 -3
- package/dist/debug.js +3 -3
- package/dist/{Cubit-CWP8Ddzx.cjs → ensure-CLQEx0Nn.cjs} +24 -6
- package/dist/ensure-CLQEx0Nn.cjs.map +1 -0
- package/dist/{Cubit-VJuu2tt9.js → ensure-CPMiGvov.js} +19 -7
- package/dist/ensure-CPMiGvov.js.map +1 -0
- package/dist/ensure-DEXSmA-N.js +526 -0
- package/dist/ensure-DEXSmA-N.js.map +1 -0
- package/dist/ensure-Dx86f80B.cjs +567 -0
- package/dist/ensure-Dx86f80B.cjs.map +1 -0
- package/dist/ensure-DzqGej43.js +526 -0
- package/dist/ensure-DzqGej43.js.map +1 -0
- package/dist/ensure-fsQMjaQL.cjs +567 -0
- package/dist/ensure-fsQMjaQL.cjs.map +1 -0
- package/dist/index.cjs +34 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +27 -33
- package/dist/index.js.map +1 -1
- package/dist/management-444tdCBG.js +38 -0
- package/dist/management-444tdCBG.js.map +1 -0
- package/dist/management-7jLjVHJd.js +38 -0
- package/dist/management-7jLjVHJd.js.map +1 -0
- package/dist/{management-DTzcC6aD.cjs → management-DAV9sN-k.cjs} +14 -8
- package/dist/management-DAV9sN-k.cjs.map +1 -0
- package/dist/management-GcnNJjnm.cjs +85 -0
- package/dist/management-GcnNJjnm.cjs.map +1 -0
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.js +1 -1
- package/dist/registry/acquire.d.ts +19 -6
- package/dist/registry/borrow.d.ts +14 -3
- package/dist/registry/ensure.d.ts +7 -1
- package/dist/registry/index.d.ts +1 -0
- package/dist/registry/queries.d.ts +10 -4
- package/dist/registry/release.d.ts +14 -2
- package/dist/testing.cjs +17 -17
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +14 -14
- package/dist/testing.js.map +1 -1
- package/dist/types/utilities.d.ts +1 -12
- package/dist/types.cjs +1 -1
- package/dist/types.js +1 -1
- package/dist/utils/static-props.d.ts +0 -9
- package/dist/watch/watch.d.ts +8 -5
- package/dist/{watch-BpwaUL8r.cjs → watch-B91opmva.cjs} +11 -9
- package/dist/watch-B91opmva.cjs.map +1 -0
- package/dist/{watch-DWCqXllW.js → watch-BmC-Tyqg.js} +11 -9
- package/dist/watch-BmC-Tyqg.js.map +1 -0
- package/dist/watch-CKWt788i.cjs +70 -0
- package/dist/watch-CKWt788i.cjs.map +1 -0
- package/dist/watch-DPVUwPUY.js +59 -0
- package/dist/watch-DPVUwPUY.js.map +1 -0
- package/dist/watch-entry.cjs +1 -1
- package/dist/watch-entry.js +1 -1
- package/package.json +22 -11
- package/dist/Cubit-9jal5zdZ.cjs +0 -390
- package/dist/Cubit-9jal5zdZ.cjs.map +0 -1
- package/dist/Cubit-BAUPiUF7.cjs +0 -380
- package/dist/Cubit-BAUPiUF7.cjs.map +0 -1
- package/dist/Cubit-BBKF3PIg.js +0 -287
- package/dist/Cubit-BBKF3PIg.js.map +0 -1
- package/dist/Cubit-BC70gaiA.js +0 -453
- package/dist/Cubit-BC70gaiA.js.map +0 -1
- package/dist/Cubit-BOgUZva7.js +0 -360
- package/dist/Cubit-BOgUZva7.js.map +0 -1
- package/dist/Cubit-BOxMvpfc.js +0 -291
- package/dist/Cubit-BOxMvpfc.js.map +0 -1
- package/dist/Cubit-BTznt8zg.js +0 -370
- package/dist/Cubit-BTznt8zg.js.map +0 -1
- package/dist/Cubit-BogJXkLm.js +0 -278
- package/dist/Cubit-BogJXkLm.js.map +0 -1
- package/dist/Cubit-C-8R_8db.cjs +0 -475
- package/dist/Cubit-C-8R_8db.cjs.map +0 -1
- package/dist/Cubit-C3Mw3EoO.cjs +0 -401
- package/dist/Cubit-C3Mw3EoO.cjs.map +0 -1
- package/dist/Cubit-CO8Fr72L.cjs +0 -447
- package/dist/Cubit-CO8Fr72L.cjs.map +0 -1
- package/dist/Cubit-COfHT1Bm.cjs +0 -321
- package/dist/Cubit-COfHT1Bm.cjs.map +0 -1
- package/dist/Cubit-CROWjjs9.js +0 -481
- package/dist/Cubit-CROWjjs9.js.map +0 -1
- package/dist/Cubit-CWP8Ddzx.cjs.map +0 -1
- package/dist/Cubit-CXxh9iol.js +0 -302
- package/dist/Cubit-CXxh9iol.js.map +0 -1
- package/dist/Cubit-CYOWfzQt.cjs +0 -317
- package/dist/Cubit-CYOWfzQt.cjs.map +0 -1
- package/dist/Cubit-CZaf_fp4.cjs +0 -388
- package/dist/Cubit-CZaf_fp4.cjs.map +0 -1
- package/dist/Cubit-C_dUEUdd.cjs +0 -380
- package/dist/Cubit-C_dUEUdd.cjs.map +0 -1
- package/dist/Cubit-C_rxRCTN.cjs +0 -523
- package/dist/Cubit-C_rxRCTN.cjs.map +0 -1
- package/dist/Cubit-CcKgMEBO.js +0 -299
- package/dist/Cubit-CcKgMEBO.js.map +0 -1
- package/dist/Cubit-CfT6Y1jl.js +0 -346
- package/dist/Cubit-CfT6Y1jl.js.map +0 -1
- package/dist/Cubit-CynJruuO.js +0 -369
- package/dist/Cubit-CynJruuO.js.map +0 -1
- package/dist/Cubit-D2vQ6nMb.js +0 -360
- package/dist/Cubit-D2vQ6nMb.js.map +0 -1
- package/dist/Cubit-D7jOZCoZ.js +0 -360
- package/dist/Cubit-D7jOZCoZ.js.map +0 -1
- package/dist/Cubit-D9j3IGPc.cjs +0 -523
- package/dist/Cubit-D9j3IGPc.cjs.map +0 -1
- package/dist/Cubit-DKEY9WYq.cjs +0 -296
- package/dist/Cubit-DKEY9WYq.cjs.map +0 -1
- package/dist/Cubit-DMV_0TCp.js +0 -481
- package/dist/Cubit-DMV_0TCp.js.map +0 -1
- package/dist/Cubit-DP5DXPUK.js +0 -360
- package/dist/Cubit-DP5DXPUK.js.map +0 -1
- package/dist/Cubit-DRFkzD2h.js +0 -426
- package/dist/Cubit-DRFkzD2h.js.map +0 -1
- package/dist/Cubit-DbnhTUaZ.cjs +0 -380
- package/dist/Cubit-DbnhTUaZ.cjs.map +0 -1
- package/dist/Cubit-DrqG3SP3.cjs +0 -370
- package/dist/Cubit-DrqG3SP3.cjs.map +0 -1
- package/dist/Cubit-DsDkCo42.cjs +0 -313
- package/dist/Cubit-DsDkCo42.cjs.map +0 -1
- package/dist/Cubit-DwRw1E9D.cjs +0 -309
- package/dist/Cubit-DwRw1E9D.cjs.map +0 -1
- package/dist/Cubit-Dw_kFBgc.js +0 -372
- package/dist/Cubit-Dw_kFBgc.js.map +0 -1
- package/dist/Cubit-KiXZCubP.cjs +0 -392
- package/dist/Cubit-KiXZCubP.cjs.map +0 -1
- package/dist/Cubit-Ksj7G4uR.js +0 -360
- package/dist/Cubit-Ksj7G4uR.js.map +0 -1
- package/dist/Cubit-MkjbpcPf.cjs +0 -380
- package/dist/Cubit-MkjbpcPf.cjs.map +0 -1
- package/dist/Cubit-NRhvdDQ6.js +0 -297
- package/dist/Cubit-NRhvdDQ6.js.map +0 -1
- package/dist/Cubit-PMTXxI_u.js +0 -368
- package/dist/Cubit-PMTXxI_u.js.map +0 -1
- package/dist/Cubit-VJuu2tt9.js.map +0 -1
- package/dist/Cubit-jz922NKf.cjs +0 -320
- package/dist/Cubit-jz922NKf.cjs.map +0 -1
- package/dist/Cubit-kU5_4jgC.cjs +0 -380
- package/dist/Cubit-kU5_4jgC.cjs.map +0 -1
- package/dist/StateContainerRegistry-B4yVMYbx.cjs.map +0 -1
- package/dist/StateContainerRegistry-BAcxouCu.js +0 -723
- package/dist/StateContainerRegistry-BAcxouCu.js.map +0 -1
- package/dist/StateContainerRegistry-BK57H92E.js +0 -747
- package/dist/StateContainerRegistry-BK57H92E.js.map +0 -1
- package/dist/StateContainerRegistry-BRBATSrx.cjs +0 -1030
- package/dist/StateContainerRegistry-BRBATSrx.cjs.map +0 -1
- package/dist/StateContainerRegistry-BgBIKcQF.js +0 -956
- package/dist/StateContainerRegistry-BgBIKcQF.js.map +0 -1
- package/dist/StateContainerRegistry-BglEhqdA.js +0 -709
- package/dist/StateContainerRegistry-BglEhqdA.js.map +0 -1
- package/dist/StateContainerRegistry-BhcnG0DF.js +0 -665
- package/dist/StateContainerRegistry-BhcnG0DF.js.map +0 -1
- package/dist/StateContainerRegistry-BpO5t-0i.js +0 -682
- package/dist/StateContainerRegistry-BpO5t-0i.js.map +0 -1
- package/dist/StateContainerRegistry-BqS-wpb_.js +0 -957
- package/dist/StateContainerRegistry-BqS-wpb_.js.map +0 -1
- package/dist/StateContainerRegistry-BrEGYPZT.cjs +0 -1029
- package/dist/StateContainerRegistry-BrEGYPZT.cjs.map +0 -1
- package/dist/StateContainerRegistry-BsMIpllP.cjs +0 -659
- package/dist/StateContainerRegistry-BsMIpllP.cjs.map +0 -1
- package/dist/StateContainerRegistry-Bxfne4A7.cjs +0 -908
- package/dist/StateContainerRegistry-Bxfne4A7.cjs.map +0 -1
- package/dist/StateContainerRegistry-C0E7vsgy.js +0 -758
- package/dist/StateContainerRegistry-C0E7vsgy.js.map +0 -1
- package/dist/StateContainerRegistry-C0I77Ndz.cjs +0 -920
- package/dist/StateContainerRegistry-C0I77Ndz.cjs.map +0 -1
- package/dist/StateContainerRegistry-CDH9mnQS.cjs +0 -715
- package/dist/StateContainerRegistry-CDH9mnQS.cjs.map +0 -1
- package/dist/StateContainerRegistry-CTOXUf75.cjs +0 -742
- package/dist/StateContainerRegistry-CTOXUf75.cjs.map +0 -1
- package/dist/StateContainerRegistry-CX2CBOmv.cjs +0 -795
- package/dist/StateContainerRegistry-CX2CBOmv.cjs.map +0 -1
- package/dist/StateContainerRegistry-CXnnf2-l.js +0 -867
- package/dist/StateContainerRegistry-CXnnf2-l.js.map +0 -1
- package/dist/StateContainerRegistry-CehuIpK_.cjs +0 -811
- package/dist/StateContainerRegistry-CehuIpK_.cjs.map +0 -1
- package/dist/StateContainerRegistry-Ci0ajc5g.js +0 -720
- package/dist/StateContainerRegistry-Ci0ajc5g.js.map +0 -1
- package/dist/StateContainerRegistry-Ck2-XmT_.js +0 -627
- package/dist/StateContainerRegistry-Ck2-XmT_.js.map +0 -1
- package/dist/StateContainerRegistry-D1lVJFGL.cjs +0 -753
- package/dist/StateContainerRegistry-D1lVJFGL.cjs.map +0 -1
- package/dist/StateContainerRegistry-DC4N73O6.js +0 -672
- package/dist/StateContainerRegistry-DC4N73O6.js.map +0 -1
- package/dist/StateContainerRegistry-DOkDGng-.js +0 -626
- package/dist/StateContainerRegistry-DOkDGng-.js.map +0 -1
- package/dist/StateContainerRegistry-DOuGI-l5.js +0 -685
- package/dist/StateContainerRegistry-DOuGI-l5.js.map +0 -1
- package/dist/StateContainerRegistry-DT66lr3I.cjs +0 -698
- package/dist/StateContainerRegistry-DT66lr3I.cjs.map +0 -1
- package/dist/StateContainerRegistry-DmmzYa7S.js.map +0 -1
- package/dist/StateContainerRegistry-Upsrlg9G.cjs +0 -756
- package/dist/StateContainerRegistry-Upsrlg9G.cjs.map +0 -1
- package/dist/StateContainerRegistry-WznfcA-Q.js +0 -855
- package/dist/StateContainerRegistry-WznfcA-Q.js.map +0 -1
- package/dist/StateContainerRegistry-Yph6UCA_.js +0 -678
- package/dist/StateContainerRegistry-Yph6UCA_.js.map +0 -1
- package/dist/StateContainerRegistry-mseeTqSA.cjs +0 -718
- package/dist/StateContainerRegistry-mseeTqSA.cjs.map +0 -1
- package/dist/StateContainerRegistry-pRNxHNFD.cjs +0 -705
- package/dist/StateContainerRegistry-pRNxHNFD.cjs.map +0 -1
- package/dist/StateContainerRegistry-vXMWtG7J.cjs +0 -660
- package/dist/StateContainerRegistry-vXMWtG7J.cjs.map +0 -1
- package/dist/StateContainerRegistry-v_prqMcI.cjs +0 -711
- package/dist/StateContainerRegistry-v_prqMcI.cjs.map +0 -1
- package/dist/branded-DCqi3De1.cjs +0 -18
- package/dist/branded-DCqi3De1.cjs.map +0 -1
- package/dist/branded-Max3xOTA.js +0 -13
- package/dist/branded-Max3xOTA.js.map +0 -1
- package/dist/config-0ZD9i3wy.js +0 -16
- package/dist/config-B3NIwDQv.cjs +0 -32
- package/dist/config-BKGHop0V.js +0 -16
- package/dist/config-BKoaAlmb.js +0 -16
- package/dist/config-BKoaAlmb.js.map +0 -1
- package/dist/config-BPj08-8h.cjs +0 -32
- package/dist/config-BR0Xy-Tn.cjs +0 -32
- package/dist/config-BR0Xy-Tn.cjs.map +0 -1
- package/dist/config-B_4xXpvK.cjs.map +0 -1
- package/dist/config-BflrQM4_.cjs +0 -32
- package/dist/config-BflrQM4_.cjs.map +0 -1
- package/dist/config-BzObBsk2.cjs +0 -32
- package/dist/config-BzObBsk2.cjs.map +0 -1
- package/dist/config-C0yumL1H.cjs +0 -32
- package/dist/config-C0yumL1H.cjs.map +0 -1
- package/dist/config-C8xqVHTf.js.map +0 -1
- package/dist/config-CCUhIYIF.js +0 -16
- package/dist/config-CCUhIYIF.js.map +0 -1
- package/dist/config-CGo__MAt.js +0 -16
- package/dist/config-CGo__MAt.js.map +0 -1
- package/dist/config-CQH9fTY-.cjs +0 -32
- package/dist/config-CQH9fTY-.cjs.map +0 -1
- package/dist/config-CR_Bz7RD.js +0 -16
- package/dist/config-CR_Bz7RD.js.map +0 -1
- package/dist/config-CTOa-yPN.cjs +0 -32
- package/dist/config-CTOa-yPN.cjs.map +0 -1
- package/dist/config-Cd7Q-B4g.js +0 -16
- package/dist/config-Cd7Q-B4g.js.map +0 -1
- package/dist/config-CmDEX-1o.js +0 -16
- package/dist/config-CmDEX-1o.js.map +0 -1
- package/dist/config-CoNMTnMA.cjs +0 -32
- package/dist/config-CoNMTnMA.cjs.map +0 -1
- package/dist/config-Cwj8-C1J.js +0 -16
- package/dist/config-Cwj8-C1J.js.map +0 -1
- package/dist/config-D3jisfdj.cjs +0 -32
- package/dist/config-D3jisfdj.cjs.map +0 -1
- package/dist/config-D4GifZQ4.js +0 -16
- package/dist/config-D4GifZQ4.js.map +0 -1
- package/dist/config-DDrSQGpQ.cjs +0 -32
- package/dist/config-DDrSQGpQ.cjs.map +0 -1
- package/dist/config-DEcslxan.cjs +0 -32
- package/dist/config-DEcslxan.cjs.map +0 -1
- package/dist/config-DLzmy2rZ.cjs +0 -32
- package/dist/config-DLzmy2rZ.cjs.map +0 -1
- package/dist/config-DMNZ2YLV.cjs +0 -32
- package/dist/config-DMNZ2YLV.cjs.map +0 -1
- package/dist/config-De9oQ6Ki.js +0 -16
- package/dist/config-De9oQ6Ki.js.map +0 -1
- package/dist/config-DoHx0Xsl.js.map +0 -1
- package/dist/config-DokTzpr8.cjs +0 -32
- package/dist/config-DokTzpr8.cjs.map +0 -1
- package/dist/config-DslYBm4Z.js +0 -16
- package/dist/config-DslYBm4Z.js.map +0 -1
- package/dist/config-H6FAqbW4.cjs +0 -32
- package/dist/config-H6FAqbW4.cjs.map +0 -1
- package/dist/config-XQua95Xz.js +0 -16
- package/dist/config-XQua95Xz.js.map +0 -1
- package/dist/config-Yp645dGK.js +0 -16
- package/dist/config-Yp645dGK.js.map +0 -1
- package/dist/config-ispAzOZV.js +0 -16
- package/dist/config-ispAzOZV.js.map +0 -1
- package/dist/ensure-9VEq5H0L.js +0 -9
- package/dist/ensure-9VEq5H0L.js.map +0 -1
- package/dist/ensure-BB6xHQAF.cjs +0 -14
- package/dist/ensure-BB6xHQAF.cjs.map +0 -1
- package/dist/ensure-BNDfTzqg.cjs +0 -14
- package/dist/ensure-BNDfTzqg.cjs.map +0 -1
- package/dist/ensure-BVCnjU7r.js +0 -365
- package/dist/ensure-BVCnjU7r.js.map +0 -1
- package/dist/ensure-BbzGXjep.cjs +0 -14
- package/dist/ensure-BbzGXjep.cjs.map +0 -1
- package/dist/ensure-BlIaQai6.js +0 -9
- package/dist/ensure-BlIaQai6.js.map +0 -1
- package/dist/ensure-Bm3oHxga.js +0 -9
- package/dist/ensure-Bm3oHxga.js.map +0 -1
- package/dist/ensure-C3eIRs6e.cjs +0 -14
- package/dist/ensure-C3eIRs6e.cjs.map +0 -1
- package/dist/ensure-C5I1xp2C.js +0 -9
- package/dist/ensure-C5I1xp2C.js.map +0 -1
- package/dist/ensure-CJZL7bcA.cjs +0 -391
- package/dist/ensure-CJZL7bcA.cjs.map +0 -1
- package/dist/ensure-CN6unBOe.cjs +0 -14
- package/dist/ensure-CN6unBOe.cjs.map +0 -1
- package/dist/ensure-CSHYjIeH.cjs +0 -14
- package/dist/ensure-CSHYjIeH.cjs.map +0 -1
- package/dist/ensure-CU-B1ywv.js +0 -9
- package/dist/ensure-CU-B1ywv.js.map +0 -1
- package/dist/ensure-CWKzeno7.js +0 -9
- package/dist/ensure-CWKzeno7.js.map +0 -1
- package/dist/ensure-CkENsuQ9.js +0 -9
- package/dist/ensure-CkENsuQ9.js.map +0 -1
- package/dist/ensure-Cm-4_LSh.cjs +0 -14
- package/dist/ensure-Cm-4_LSh.cjs.map +0 -1
- package/dist/ensure-Cqex5r1P.cjs +0 -14
- package/dist/ensure-Cqex5r1P.cjs.map +0 -1
- package/dist/ensure-Cv5AbNGZ.js +0 -9
- package/dist/ensure-Cv5AbNGZ.js.map +0 -1
- package/dist/ensure-D63lEMUK.cjs +0 -14
- package/dist/ensure-D63lEMUK.cjs.map +0 -1
- package/dist/ensure-DGEtPU9A.cjs +0 -14
- package/dist/ensure-DGEtPU9A.cjs.map +0 -1
- package/dist/ensure-DM3qb336.cjs +0 -14
- package/dist/ensure-DM3qb336.cjs.map +0 -1
- package/dist/ensure-DME-_T0j.cjs +0 -14
- package/dist/ensure-DME-_T0j.cjs.map +0 -1
- package/dist/ensure-DWd0GCYB.js +0 -9
- package/dist/ensure-DWd0GCYB.js.map +0 -1
- package/dist/ensure-DamKOP6q.cjs +0 -14
- package/dist/ensure-DamKOP6q.cjs.map +0 -1
- package/dist/ensure-Dcfptl-A.js +0 -9
- package/dist/ensure-Dcfptl-A.js.map +0 -1
- package/dist/ensure-Def-EBWG.js +0 -9
- package/dist/ensure-Def-EBWG.js.map +0 -1
- package/dist/ensure-DnHL5QiQ.cjs +0 -14
- package/dist/ensure-DnHL5QiQ.cjs.map +0 -1
- package/dist/ensure-Dr7I78Ku.cjs +0 -14
- package/dist/ensure-Dr7I78Ku.cjs.map +0 -1
- package/dist/ensure-SLVdGd5b.js +0 -9
- package/dist/ensure-SLVdGd5b.js.map +0 -1
- package/dist/ensure-Sb92MCXu.js +0 -9
- package/dist/ensure-Sb92MCXu.js.map +0 -1
- package/dist/ensure-gFlvevGm.cjs +0 -14
- package/dist/ensure-gFlvevGm.cjs.map +0 -1
- package/dist/ensure-l2-H7S5W.js +0 -9
- package/dist/ensure-l2-H7S5W.js.map +0 -1
- package/dist/ensure-mkL-3qh8.js +0 -9
- package/dist/ensure-mkL-3qh8.js.map +0 -1
- package/dist/ensure-n80crSlX.js +0 -9
- package/dist/ensure-n80crSlX.js.map +0 -1
- package/dist/ensure-nCxg7MCN.js +0 -9
- package/dist/ensure-nCxg7MCN.js.map +0 -1
- package/dist/ensure-vS71MV4q.cjs +0 -14
- package/dist/ensure-vS71MV4q.cjs.map +0 -1
- package/dist/management-6oQbmf0z.js +0 -41
- package/dist/management-6oQbmf0z.js.map +0 -1
- package/dist/management-B46QwA9Y.js +0 -41
- package/dist/management-B46QwA9Y.js.map +0 -1
- package/dist/management-B9yrRpeg.js +0 -41
- package/dist/management-B9yrRpeg.js.map +0 -1
- package/dist/management-BCKTEZ8Q.js +0 -41
- package/dist/management-BCKTEZ8Q.js.map +0 -1
- package/dist/management-BbMzdXbT.js +0 -41
- package/dist/management-BbMzdXbT.js.map +0 -1
- package/dist/management-Bg652agq.js +0 -41
- package/dist/management-Bg652agq.js.map +0 -1
- package/dist/management-BnedF5ZD.cjs +0 -79
- package/dist/management-BnedF5ZD.cjs.map +0 -1
- package/dist/management-BoUa99eB.cjs +0 -79
- package/dist/management-BoUa99eB.cjs.map +0 -1
- package/dist/management-C-wBdpho.js +0 -37
- package/dist/management-C-wBdpho.js.map +0 -1
- package/dist/management-C4SHcrJm.cjs +0 -79
- package/dist/management-C4SHcrJm.cjs.map +0 -1
- package/dist/management-CK-GL3wY.js +0 -41
- package/dist/management-CK-GL3wY.js.map +0 -1
- package/dist/management-CPhgY8OE.js +0 -41
- package/dist/management-CPhgY8OE.js.map +0 -1
- package/dist/management-CU_V3LIP.js +0 -41
- package/dist/management-CU_V3LIP.js.map +0 -1
- package/dist/management-CUwXDSi9.cjs +0 -79
- package/dist/management-CUwXDSi9.cjs.map +0 -1
- package/dist/management-CaqiyNzB.js +0 -41
- package/dist/management-CaqiyNzB.js.map +0 -1
- package/dist/management-Cin-JvYe.js +0 -41
- package/dist/management-Cin-JvYe.js.map +0 -1
- package/dist/management-ClaXym0F.cjs +0 -79
- package/dist/management-ClaXym0F.cjs.map +0 -1
- package/dist/management-DL0Uzsoz.js +0 -41
- package/dist/management-DL0Uzsoz.js.map +0 -1
- package/dist/management-DLdAQfqk.cjs +0 -79
- package/dist/management-DLdAQfqk.cjs.map +0 -1
- package/dist/management-DMZ8qpwr.cjs +0 -79
- package/dist/management-DMZ8qpwr.cjs.map +0 -1
- package/dist/management-DTzcC6aD.cjs.map +0 -1
- package/dist/management-DYLNyj9p.cjs +0 -79
- package/dist/management-DYLNyj9p.cjs.map +0 -1
- package/dist/management-Dag9u4t6.cjs +0 -79
- package/dist/management-Dag9u4t6.cjs.map +0 -1
- package/dist/management-DbMRdDBo.cjs +0 -79
- package/dist/management-DbMRdDBo.cjs.map +0 -1
- package/dist/management-DfnDAKmP.js +0 -41
- package/dist/management-DfnDAKmP.js.map +0 -1
- package/dist/management-DjBU1gtb.cjs +0 -79
- package/dist/management-DjBU1gtb.cjs.map +0 -1
- package/dist/management-DwCozsY8.js +0 -41
- package/dist/management-DwCozsY8.js.map +0 -1
- package/dist/management-H4m3ciJO.js +0 -32
- package/dist/management-H4m3ciJO.js.map +0 -1
- package/dist/management-Xo3A6Za3.cjs +0 -79
- package/dist/management-Xo3A6Za3.cjs.map +0 -1
- package/dist/management-ZU2YzOkr.js +0 -37
- package/dist/management-ZU2YzOkr.js.map +0 -1
- package/dist/management-baPDwA9n.cjs +0 -79
- package/dist/management-baPDwA9n.cjs.map +0 -1
- package/dist/management-jQGCvZNN.cjs +0 -70
- package/dist/management-jQGCvZNN.cjs.map +0 -1
- package/dist/management-ry_KteFK.cjs +0 -79
- package/dist/management-ry_KteFK.cjs.map +0 -1
- package/dist/management-xoZ7w3bI.cjs +0 -70
- package/dist/management-xoZ7w3bI.cjs.map +0 -1
- package/dist/resolve-dependencies-B2QggQAi.js +0 -729
- package/dist/resolve-dependencies-B2QggQAi.js.map +0 -1
- package/dist/resolve-dependencies-B6JDXvpr.js +0 -739
- package/dist/resolve-dependencies-B6JDXvpr.js.map +0 -1
- package/dist/resolve-dependencies-BA3u06uC.js +0 -731
- package/dist/resolve-dependencies-BA3u06uC.js.map +0 -1
- package/dist/resolve-dependencies-BAKAoD0U.js +0 -878
- package/dist/resolve-dependencies-BAKAoD0U.js.map +0 -1
- package/dist/resolve-dependencies-BFZQq60Y.cjs +0 -832
- package/dist/resolve-dependencies-BFZQq60Y.cjs.map +0 -1
- package/dist/resolve-dependencies-BGafS3Ww.js +0 -731
- package/dist/resolve-dependencies-BGafS3Ww.js.map +0 -1
- package/dist/resolve-dependencies-BHd34gS3.cjs +0 -832
- package/dist/resolve-dependencies-BHd34gS3.cjs.map +0 -1
- package/dist/resolve-dependencies-BNeayhbQ.cjs +0 -840
- package/dist/resolve-dependencies-BNeayhbQ.cjs.map +0 -1
- package/dist/resolve-dependencies-BT6TU2HF.cjs +0 -832
- package/dist/resolve-dependencies-BT6TU2HF.cjs.map +0 -1
- package/dist/resolve-dependencies-BWEMpuDy.js +0 -729
- package/dist/resolve-dependencies-BWEMpuDy.js.map +0 -1
- package/dist/resolve-dependencies-BiWkW2eS.js +0 -731
- package/dist/resolve-dependencies-BiWkW2eS.js.map +0 -1
- package/dist/resolve-dependencies-BjxCztYD.js +0 -739
- package/dist/resolve-dependencies-BjxCztYD.js.map +0 -1
- package/dist/resolve-dependencies-BlyBV0hB.cjs +0 -969
- package/dist/resolve-dependencies-BlyBV0hB.cjs.map +0 -1
- package/dist/resolve-dependencies-By26rT_i.js +0 -739
- package/dist/resolve-dependencies-By26rT_i.js.map +0 -1
- package/dist/resolve-dependencies-C9Kf7AzY.cjs +0 -832
- package/dist/resolve-dependencies-C9Kf7AzY.cjs.map +0 -1
- package/dist/resolve-dependencies-CTzV1txG.js +0 -731
- package/dist/resolve-dependencies-CTzV1txG.js.map +0 -1
- package/dist/resolve-dependencies-CWjuGHiF.cjs +0 -969
- package/dist/resolve-dependencies-CWjuGHiF.cjs.map +0 -1
- package/dist/resolve-dependencies-ClSsP0DJ.cjs +0 -830
- package/dist/resolve-dependencies-ClSsP0DJ.cjs.map +0 -1
- package/dist/resolve-dependencies-D0vTzZgs.js +0 -731
- package/dist/resolve-dependencies-D0vTzZgs.js.map +0 -1
- package/dist/resolve-dependencies-D2WnZMF-.cjs +0 -832
- package/dist/resolve-dependencies-D2WnZMF-.cjs.map +0 -1
- package/dist/resolve-dependencies-DCBLTeza.cjs +0 -969
- package/dist/resolve-dependencies-DCBLTeza.cjs.map +0 -1
- package/dist/resolve-dependencies-DMlqYJR2.js +0 -731
- package/dist/resolve-dependencies-DMlqYJR2.js.map +0 -1
- package/dist/resolve-dependencies-DP6U1EYB.cjs +0 -840
- package/dist/resolve-dependencies-DP6U1EYB.cjs.map +0 -1
- package/dist/resolve-dependencies-DSQNXvnV.cjs +0 -832
- package/dist/resolve-dependencies-DSQNXvnV.cjs.map +0 -1
- package/dist/resolve-dependencies-DV3HO_uH.js +0 -878
- package/dist/resolve-dependencies-DV3HO_uH.js.map +0 -1
- package/dist/resolve-dependencies-DXwMhP0Y.js +0 -878
- package/dist/resolve-dependencies-DXwMhP0Y.js.map +0 -1
- package/dist/resolve-dependencies-DbRWlt9u.js +0 -878
- package/dist/resolve-dependencies-DbRWlt9u.js.map +0 -1
- package/dist/resolve-dependencies-DcUUva2P.cjs +0 -832
- package/dist/resolve-dependencies-DcUUva2P.cjs.map +0 -1
- package/dist/resolve-dependencies-Dd8T6TLt.cjs +0 -832
- package/dist/resolve-dependencies-Dd8T6TLt.cjs.map +0 -1
- package/dist/resolve-dependencies-Dfdp_DZd.cjs +0 -840
- package/dist/resolve-dependencies-Dfdp_DZd.cjs.map +0 -1
- package/dist/resolve-dependencies-GJ8PNyNB.cjs +0 -969
- package/dist/resolve-dependencies-GJ8PNyNB.cjs.map +0 -1
- package/dist/resolve-dependencies-KSpTt4jy.cjs +0 -830
- package/dist/resolve-dependencies-KSpTt4jy.cjs.map +0 -1
- package/dist/resolve-dependencies-Nvjp4CwS.js +0 -731
- package/dist/resolve-dependencies-Nvjp4CwS.js.map +0 -1
- package/dist/resolve-dependencies-f-QUqYiL.js +0 -731
- package/dist/resolve-dependencies-f-QUqYiL.js.map +0 -1
- package/dist/tracked-B77j2g9M.js +0 -197
- package/dist/tracked-B77j2g9M.js.map +0 -1
- package/dist/tracked-BDVi2LKM.cjs +0 -227
- package/dist/tracked-BDVi2LKM.cjs.map +0 -1
- package/dist/tracked-BFdJCzL0.cjs +0 -242
- package/dist/tracked-BFdJCzL0.cjs.map +0 -1
- package/dist/tracked-BH-gX4T1.cjs +0 -227
- package/dist/tracked-BH-gX4T1.cjs.map +0 -1
- package/dist/tracked-BTHok3Dl.cjs +0 -227
- package/dist/tracked-BTHok3Dl.cjs.map +0 -1
- package/dist/tracked-BTbFkFeM.js +0 -212
- package/dist/tracked-BTbFkFeM.js.map +0 -1
- package/dist/tracked-BU_OBWqM.cjs +0 -242
- package/dist/tracked-BU_OBWqM.cjs.map +0 -1
- package/dist/tracked-BfctH2es.cjs +0 -242
- package/dist/tracked-BfctH2es.cjs.map +0 -1
- package/dist/tracked-BhQtzUhZ.js +0 -212
- package/dist/tracked-BhQtzUhZ.js.map +0 -1
- package/dist/tracked-BnqrYXiO.js +0 -212
- package/dist/tracked-BnqrYXiO.js.map +0 -1
- package/dist/tracked-BtgFOGup.js +0 -212
- package/dist/tracked-BtgFOGup.js.map +0 -1
- package/dist/tracked-C3nIS4J7.cjs +0 -242
- package/dist/tracked-C3nIS4J7.cjs.map +0 -1
- package/dist/tracked-C52awNV9.js +0 -197
- package/dist/tracked-C52awNV9.js.map +0 -1
- package/dist/tracked-CGzduF2m.js +0 -212
- package/dist/tracked-CGzduF2m.js.map +0 -1
- package/dist/tracked-CK_-ixtX.cjs +0 -227
- package/dist/tracked-CK_-ixtX.cjs.map +0 -1
- package/dist/tracked-CLlvURln.js +0 -212
- package/dist/tracked-CLlvURln.js.map +0 -1
- package/dist/tracked-CgHWmuGC.cjs +0 -242
- package/dist/tracked-CgHWmuGC.cjs.map +0 -1
- package/dist/tracked-CoAlC8fs.js +0 -197
- package/dist/tracked-CoAlC8fs.js.map +0 -1
- package/dist/tracked-D3Xjm1H1.cjs +0 -242
- package/dist/tracked-D3Xjm1H1.cjs.map +0 -1
- package/dist/tracked-DB6yMV5F.js +0 -212
- package/dist/tracked-DB6yMV5F.js.map +0 -1
- package/dist/tracked-DBn-bs_G.js +0 -197
- package/dist/tracked-DBn-bs_G.js.map +0 -1
- package/dist/tracked-DCfBaYjL.cjs +0 -227
- package/dist/tracked-DCfBaYjL.cjs.map +0 -1
- package/dist/tracked-DKduNLgI.js +0 -197
- package/dist/tracked-DKduNLgI.js.map +0 -1
- package/dist/tracked-DMBTDF0P.js +0 -197
- package/dist/tracked-DMBTDF0P.js.map +0 -1
- package/dist/tracked-DN3h3Rp1.js +0 -197
- package/dist/tracked-DN3h3Rp1.js.map +0 -1
- package/dist/tracked-DOGh1Q5Z.cjs +0 -242
- package/dist/tracked-DOGh1Q5Z.cjs.map +0 -1
- package/dist/tracked-DUkp4zve.cjs +0 -227
- package/dist/tracked-DUkp4zve.cjs.map +0 -1
- package/dist/tracked-D_ou7mYG.js +0 -212
- package/dist/tracked-D_ou7mYG.js.map +0 -1
- package/dist/tracked-Dcu6EATB.js +0 -197
- package/dist/tracked-Dcu6EATB.js.map +0 -1
- package/dist/tracked-GvAJQVAI.cjs +0 -271
- package/dist/tracked-GvAJQVAI.cjs.map +0 -1
- package/dist/tracked-O2lv-kJV.cjs +0 -242
- package/dist/tracked-O2lv-kJV.cjs.map +0 -1
- package/dist/tracked-WF6aXuAo.js +0 -223
- package/dist/tracked-WF6aXuAo.js.map +0 -1
- package/dist/tracked-d_sQWU3c.cjs +0 -227
- package/dist/tracked-d_sQWU3c.cjs.map +0 -1
- package/dist/tracked-n9TMK-30.cjs +0 -227
- package/dist/tracked-n9TMK-30.cjs.map +0 -1
- package/dist/tracked-njU-_pVa.cjs +0 -242
- package/dist/tracked-njU-_pVa.cjs.map +0 -1
- package/dist/tracked-zAgmKIlC.js +0 -212
- package/dist/tracked-zAgmKIlC.js.map +0 -1
- package/dist/tracking/dependency-manager.d.ts +0 -41
- package/dist/tracking/index.d.ts +0 -28
- package/dist/tracking/iteration-perf.bench.d.ts +0 -1
- package/dist/tracking/path-utils.d.ts +0 -69
- package/dist/tracking/resolve-dependencies.d.ts +0 -9
- package/dist/tracking/tracked.d.ts +0 -73
- package/dist/tracking/tracking-proxy.d.ts +0 -230
- package/dist/tracking.cjs +0 -21
- package/dist/tracking.d.cts +0 -9
- package/dist/tracking.d.ts +0 -9
- package/dist/tracking.js +0 -32
- package/dist/watch-BpwaUL8r.cjs.map +0 -1
- package/dist/watch-DWCqXllW.js.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const require_config = require("./config-DVMnlHLv.cjs");
|
|
2
|
+
//#region src/registry/acquire.ts
|
|
3
|
+
/**
|
|
4
|
+
* Acquire an instance with ref tracking (ownership semantics). Instance
|
|
5
|
+
* identity is derived purely from `args` (via the class's `static key(args)`,
|
|
6
|
+
* a structural hash of `args`, or the default sentinel when there are none).
|
|
7
|
+
*
|
|
8
|
+
* @param BlocClass - The StateContainer class constructor
|
|
9
|
+
* @param opts.args - Construction/identity args; derives the instance key
|
|
10
|
+
* @param opts.refId - Named reference ID for debugging; auto-generated if omitted
|
|
11
|
+
*/
|
|
12
|
+
function acquire(BlocClass, opts) {
|
|
13
|
+
const registry = require_config.getRegistry();
|
|
14
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
15
|
+
return registry.acquire(BlocClass, key, {
|
|
16
|
+
canCreate: true,
|
|
17
|
+
countRef: true,
|
|
18
|
+
refId: opts?.refId,
|
|
19
|
+
args: opts?.args
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the storage key an instance would be acquired under, given its
|
|
24
|
+
* construction `args`. This is the canonical key-computation path. Callers that
|
|
25
|
+
* both acquire and release against the `@internal` registry tier (e.g.
|
|
26
|
+
* `@blac/react` `useBloc`) must use this once and pass the same resolved key to
|
|
27
|
+
* both, so the ref is dropped under the key it was taken.
|
|
28
|
+
*/
|
|
29
|
+
function resolveInstanceKey(BlocClass, args) {
|
|
30
|
+
return require_config.getRegistry().resolveKey(BlocClass, void 0, args);
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
Object.defineProperty(exports, "acquire", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function() {
|
|
36
|
+
return acquire;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "resolveInstanceKey", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function() {
|
|
42
|
+
return resolveInstanceKey;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=acquire-DHEOEVcj.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquire-DHEOEVcj.cjs","names":["getRegistry"],"sources":["../src/registry/acquire.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n} from '../types/utilities';\n\n/**\n * Acquire an instance with ref tracking (ownership semantics). Instance\n * identity is derived purely from `args` (via the class's `static key(args)`,\n * a structural hash of `args`, or the default sentinel when there are none).\n *\n * @param BlocClass - The StateContainer class constructor\n * @param opts.args - Construction/identity args; derives the instance key\n * @param opts.refId - Named reference ID for debugging; auto-generated if omitted\n */\nexport function acquire<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T>; refId?: string },\n): InstanceType<T> {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.acquire(BlocClass, key, {\n canCreate: true,\n countRef: true,\n refId: opts?.refId,\n args: opts?.args,\n });\n}\n\n/**\n * Resolve the storage key an instance would be acquired under, given its\n * construction `args`. This is the canonical key-computation path. Callers that\n * both acquire and release against the `@internal` registry tier (e.g.\n * `@blac/react` `useBloc`) must use this once and pass the same resolved key to\n * both, so the ref is dropped under the key it was taken.\n */\nexport function resolveInstanceKey<T extends StateContainerConstructor>(\n BlocClass: T,\n args?: ExtractArgs<T>,\n): string {\n return getRegistry().resolveKey(BlocClass, undefined, args);\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAgB,QACd,WACA,MACiB;CACjB,MAAM,WAAWA,eAAAA,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,QAAQ,WAAW,KAAK;EACtC,WAAW;EACX,UAAU;EACV,OAAO,MAAM;EACb,MAAM,MAAM;CACd,CAAC;AACH;;;;;;;;AASA,SAAgB,mBACd,WACA,MACQ;CACR,OAAOA,eAAAA,YAAY,EAAE,WAAW,WAAW,KAAA,GAAW,IAAI;AAC5D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as getRegistry } from "./config-8pyOC5gv.js";
|
|
2
|
+
//#region src/registry/acquire.ts
|
|
3
|
+
/**
|
|
4
|
+
* Acquire an instance with ref tracking (ownership semantics). Instance
|
|
5
|
+
* identity is derived purely from `args` (via the class's `static key(args)`,
|
|
6
|
+
* a structural hash of `args`, or the default sentinel when there are none).
|
|
7
|
+
*
|
|
8
|
+
* @param BlocClass - The StateContainer class constructor
|
|
9
|
+
* @param opts.args - Construction/identity args; derives the instance key
|
|
10
|
+
* @param opts.refId - Named reference ID for debugging; auto-generated if omitted
|
|
11
|
+
*/
|
|
12
|
+
function acquire(BlocClass, opts) {
|
|
13
|
+
const registry = getRegistry();
|
|
14
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
15
|
+
return registry.acquire(BlocClass, key, {
|
|
16
|
+
canCreate: true,
|
|
17
|
+
countRef: true,
|
|
18
|
+
refId: opts?.refId,
|
|
19
|
+
args: opts?.args
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the storage key an instance would be acquired under, given its
|
|
24
|
+
* construction `args`. This is the canonical key-computation path. Callers that
|
|
25
|
+
* both acquire and release against the `@internal` registry tier (e.g.
|
|
26
|
+
* `@blac/react` `useBloc`) must use this once and pass the same resolved key to
|
|
27
|
+
* both, so the ref is dropped under the key it was taken.
|
|
28
|
+
*/
|
|
29
|
+
function resolveInstanceKey(BlocClass, args) {
|
|
30
|
+
return getRegistry().resolveKey(BlocClass, void 0, args);
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { resolveInstanceKey as n, acquire as t };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=acquire-Don7499S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquire-Don7499S.js","names":[],"sources":["../src/registry/acquire.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n} from '../types/utilities';\n\n/**\n * Acquire an instance with ref tracking (ownership semantics). Instance\n * identity is derived purely from `args` (via the class's `static key(args)`,\n * a structural hash of `args`, or the default sentinel when there are none).\n *\n * @param BlocClass - The StateContainer class constructor\n * @param opts.args - Construction/identity args; derives the instance key\n * @param opts.refId - Named reference ID for debugging; auto-generated if omitted\n */\nexport function acquire<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T>; refId?: string },\n): InstanceType<T> {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.acquire(BlocClass, key, {\n canCreate: true,\n countRef: true,\n refId: opts?.refId,\n args: opts?.args,\n });\n}\n\n/**\n * Resolve the storage key an instance would be acquired under, given its\n * construction `args`. This is the canonical key-computation path. Callers that\n * both acquire and release against the `@internal` registry tier (e.g.\n * `@blac/react` `useBloc`) must use this once and pass the same resolved key to\n * both, so the ref is dropped under the key it was taken.\n */\nexport function resolveInstanceKey<T extends StateContainerConstructor>(\n BlocClass: T,\n args?: ExtractArgs<T>,\n): string {\n return getRegistry().resolveKey(BlocClass, undefined, args);\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAgB,QACd,WACA,MACiB;CACjB,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,QAAQ,WAAW,KAAK;EACtC,WAAW;EACX,UAAU;EACV,OAAO,MAAM;EACb,MAAM,MAAM;CACd,CAAC;AACH;;;;;;;;AASA,SAAgB,mBACd,WACA,MACQ;CACR,OAAO,YAAY,EAAE,WAAW,WAAW,KAAA,GAAW,IAAI;AAC5D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as getRegistry } from "./config-Dk1FxfXj.js";
|
|
2
|
+
//#region src/registry/acquire.ts
|
|
3
|
+
/**
|
|
4
|
+
* Acquire an instance with ref tracking (ownership semantics). Instance
|
|
5
|
+
* identity is derived purely from `args` (via the class's `static key(args)`,
|
|
6
|
+
* a structural hash of `args`, or the default sentinel when there are none).
|
|
7
|
+
*
|
|
8
|
+
* @param BlocClass - The StateContainer class constructor
|
|
9
|
+
* @param opts.args - Construction/identity args; derives the instance key
|
|
10
|
+
* @param opts.refId - Named reference ID for debugging; auto-generated if omitted
|
|
11
|
+
*/
|
|
12
|
+
function acquire(BlocClass, opts) {
|
|
13
|
+
const registry = getRegistry();
|
|
14
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
15
|
+
return registry.acquire(BlocClass, key, {
|
|
16
|
+
canCreate: true,
|
|
17
|
+
countRef: true,
|
|
18
|
+
refId: opts?.refId,
|
|
19
|
+
args: opts?.args
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the storage key an instance would be acquired under, given its
|
|
24
|
+
* construction `args`. This is the canonical key-computation path. Callers that
|
|
25
|
+
* both acquire and release against the `@internal` registry tier (e.g.
|
|
26
|
+
* `@blac/react` `useBloc`) must use this once and pass the same resolved key to
|
|
27
|
+
* both, so the ref is dropped under the key it was taken.
|
|
28
|
+
*/
|
|
29
|
+
function resolveInstanceKey(BlocClass, args) {
|
|
30
|
+
return getRegistry().resolveKey(BlocClass, void 0, args);
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { resolveInstanceKey as n, acquire as t };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=acquire-G8aB3GAx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquire-G8aB3GAx.js","names":[],"sources":["../src/registry/acquire.ts"],"sourcesContent":["import { getRegistry } from './config';\nimport type {\n ExtractArgs,\n StateContainerConstructor,\n} from '../types/utilities';\n\n/**\n * Acquire an instance with ref tracking (ownership semantics). Instance\n * identity is derived purely from `args` (via the class's `static key(args)`,\n * a structural hash of `args`, or the default sentinel when there are none).\n *\n * @param BlocClass - The StateContainer class constructor\n * @param opts.args - Construction/identity args; derives the instance key\n * @param opts.refId - Named reference ID for debugging; auto-generated if omitted\n */\nexport function acquire<T extends StateContainerConstructor>(\n BlocClass: T,\n opts?: { args?: ExtractArgs<T>; refId?: string },\n): InstanceType<T> {\n const registry = getRegistry();\n const key = registry.resolveKey(BlocClass, undefined, opts?.args);\n return registry.acquire(BlocClass, key, {\n canCreate: true,\n countRef: true,\n refId: opts?.refId,\n args: opts?.args,\n });\n}\n\n/**\n * Resolve the storage key an instance would be acquired under, given its\n * construction `args`. This is the canonical key-computation path. Callers that\n * both acquire and release against the `@internal` registry tier (e.g.\n * `@blac/react` `useBloc`) must use this once and pass the same resolved key to\n * both, so the ref is dropped under the key it was taken.\n */\nexport function resolveInstanceKey<T extends StateContainerConstructor>(\n BlocClass: T,\n args?: ExtractArgs<T>,\n): string {\n return getRegistry().resolveKey(BlocClass, undefined, args);\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAgB,QACd,WACA,MACiB;CACjB,MAAM,WAAW,YAAY;CAC7B,MAAM,MAAM,SAAS,WAAW,WAAW,KAAA,GAAW,MAAM,IAAI;CAChE,OAAO,SAAS,QAAQ,WAAW,KAAK;EACtC,WAAW;EACX,UAAU;EACV,OAAO,MAAM;EACb,MAAM,MAAM;CACd,CAAC;AACH;;;;;;;;AASA,SAAgB,mBACd,WACA,MACQ;CACR,OAAO,YAAY,EAAE,WAAW,WAAW,KAAA,GAAW,IAAI;AAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branded-
|
|
1
|
+
{"version":3,"file":"branded-BybA0_xw.cjs","names":[],"sources":["../src/types/branded.ts"],"sourcesContent":["declare const brand: unique symbol;\n\n/**\n * Utility type for creating branded/nominal types.\n * Prevents accidental type confusion between similar primitive types.\n * @template T - The base type\n * @template B - The brand identifier\n */\nexport type Brand<T, B> = T & { [brand]: B };\n\n/**\n * Branded string type for type-safe IDs.\n * @template B - The brand identifier\n */\nexport type BrandedId<B> = Brand<string, B>;\n\n/**\n * Branded string type for state container instance IDs\n */\nexport type InstanceId = Brand<string, 'InstanceId'>;\n\n/**\n * Create a branded InstanceId from a string\n * @param id - The string ID to brand\n * @returns Branded InstanceId\n */\nexport function instanceId(id: string): InstanceId {\n return id as InstanceId;\n}\n"],"mappings":";;;;;;AA0BA,SAAgB,WAAW,IAAwB;CACjD,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branded-
|
|
1
|
+
{"version":3,"file":"branded-DkbUzncc.js","names":[],"sources":["../src/types/branded.ts"],"sourcesContent":["declare const brand: unique symbol;\n\n/**\n * Utility type for creating branded/nominal types.\n * Prevents accidental type confusion between similar primitive types.\n * @template T - The base type\n * @template B - The brand identifier\n */\nexport type Brand<T, B> = T & { [brand]: B };\n\n/**\n * Branded string type for type-safe IDs.\n * @template B - The brand identifier\n */\nexport type BrandedId<B> = Brand<string, B>;\n\n/**\n * Branded string type for state container instance IDs\n */\nexport type InstanceId = Brand<string, 'InstanceId'>;\n\n/**\n * Create a branded InstanceId from a string\n * @param id - The string ID to brand\n * @returns Branded InstanceId\n */\nexport function instanceId(id: string): InstanceId {\n return id as InstanceId;\n}\n"],"mappings":";;;;;;AA0BA,SAAgB,WAAW,IAAwB;CACjD,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as globalRegistry } from "./StateContainerRegistry-
|
|
1
|
+
import { r as globalRegistry } from "./StateContainerRegistry-B_ViBLvJ.js";
|
|
2
2
|
//#region src/registry/config.ts
|
|
3
3
|
let _registry = globalRegistry;
|
|
4
4
|
function getRegistry() {
|
|
@@ -13,4 +13,4 @@ function getStats() {
|
|
|
13
13
|
//#endregion
|
|
14
14
|
export { getStats as n, setRegistry as r, getRegistry as t };
|
|
15
15
|
|
|
16
|
-
//# sourceMappingURL=config-
|
|
16
|
+
//# sourceMappingURL=config-8pyOC5gv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-8pyOC5gv.js","names":[],"sources":["../src/registry/config.ts"],"sourcesContent":["import {\n globalRegistry,\n StateContainerRegistry,\n} from '../core/StateContainerRegistry';\n\nlet _registry = globalRegistry;\n\nexport function getRegistry(): StateContainerRegistry {\n return _registry;\n}\n\nexport function setRegistry(registry: StateContainerRegistry): void {\n _registry = registry;\n}\n\nexport function getStats(): {\n registeredTypes: number;\n totalInstances: number;\n typeBreakdown: Record<string, number>;\n} {\n return _registry.getStats();\n}\n"],"mappings":";;AAKA,IAAI,YAAY;AAEhB,SAAgB,cAAsC;CACpD,OAAO;AACT;AAEA,SAAgB,YAAY,UAAwC;CAClE,YAAY;AACd;AAEA,SAAgB,WAId;CACA,OAAO,UAAU,SAAS;AAC5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/registry/config.ts
|
|
2
|
-
let _registry = require("./StateContainerRegistry-
|
|
2
|
+
let _registry = require("./StateContainerRegistry-FWKzPfS-.cjs").globalRegistry;
|
|
3
3
|
function getRegistry() {
|
|
4
4
|
return _registry;
|
|
5
5
|
}
|
|
@@ -29,4 +29,4 @@ Object.defineProperty(exports, "setRegistry", {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=config-
|
|
32
|
+
//# sourceMappingURL=config-DVMnlHLv.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-DVMnlHLv.cjs","names":["globalRegistry"],"sources":["../src/registry/config.ts"],"sourcesContent":["import {\n globalRegistry,\n StateContainerRegistry,\n} from '../core/StateContainerRegistry';\n\nlet _registry = globalRegistry;\n\nexport function getRegistry(): StateContainerRegistry {\n return _registry;\n}\n\nexport function setRegistry(registry: StateContainerRegistry): void {\n _registry = registry;\n}\n\nexport function getStats(): {\n registeredTypes: number;\n totalInstances: number;\n typeBreakdown: Record<string, number>;\n} {\n return _registry.getStats();\n}\n"],"mappings":";AAKA,IAAI,2DAAYA,EAAAA;AAEhB,SAAgB,cAAsC;CACpD,OAAO;AACT;AAEA,SAAgB,YAAY,UAAwC;CAClE,YAAY;AACd;AAEA,SAAgB,WAId;CACA,OAAO,UAAU,SAAS;AAC5B"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { r as globalRegistry } from
|
|
1
|
+
import { r as globalRegistry } from "./StateContainerRegistry-B1GYx9Xo.js";
|
|
2
2
|
//#region src/registry/config.ts
|
|
3
3
|
let _registry = globalRegistry;
|
|
4
4
|
function getRegistry() {
|
|
5
|
-
|
|
5
|
+
return _registry;
|
|
6
6
|
}
|
|
7
7
|
function setRegistry(registry) {
|
|
8
|
-
|
|
8
|
+
_registry = registry;
|
|
9
9
|
}
|
|
10
10
|
function getStats() {
|
|
11
|
-
|
|
11
|
+
return _registry.getStats();
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { getStats as n, setRegistry as r, getRegistry as t };
|
|
15
15
|
|
|
16
|
-
//# sourceMappingURL=config-
|
|
16
|
+
//# sourceMappingURL=config-Dk1FxfXj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-Dk1FxfXj.js","names":[],"sources":["../src/registry/config.ts"],"sourcesContent":["import {\n globalRegistry,\n StateContainerRegistry,\n} from '../core/StateContainerRegistry';\n\nlet _registry = globalRegistry;\n\nexport function getRegistry(): StateContainerRegistry {\n return _registry;\n}\n\nexport function setRegistry(registry: StateContainerRegistry): void {\n _registry = registry;\n}\n\nexport function getStats(): {\n registeredTypes: number;\n totalInstances: number;\n typeBreakdown: Record<string, number>;\n} {\n return _registry.getStats();\n}\n"],"mappings":";;AAKA,IAAI,YAAY;AAEhB,SAAgB,cAAsC;CACpD,OAAO;AACT;AAEA,SAAgB,YAAY,UAAwC;CAClE,YAAY;AACd;AAEA,SAAgB,WAId;CACA,OAAO,UAAU,SAAS;AAC5B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/registry/config.ts
|
|
2
|
+
let _registry = require("./StateContainerRegistry-DJQqLrli.cjs").globalRegistry;
|
|
3
|
+
function getRegistry() {
|
|
4
|
+
return _registry;
|
|
5
|
+
}
|
|
6
|
+
function setRegistry(registry) {
|
|
7
|
+
_registry = registry;
|
|
8
|
+
}
|
|
9
|
+
function getStats() {
|
|
10
|
+
return _registry.getStats();
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
Object.defineProperty(exports, "getRegistry", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function() {
|
|
16
|
+
return getRegistry;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "getStats", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function() {
|
|
22
|
+
return getStats;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "setRegistry", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function() {
|
|
28
|
+
return setRegistry;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=config-sCPKPYxZ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-sCPKPYxZ.cjs","names":["globalRegistry"],"sources":["../src/registry/config.ts"],"sourcesContent":["import {\n globalRegistry,\n StateContainerRegistry,\n} from '../core/StateContainerRegistry';\n\nlet _registry = globalRegistry;\n\nexport function getRegistry(): StateContainerRegistry {\n return _registry;\n}\n\nexport function setRegistry(registry: StateContainerRegistry): void {\n _registry = registry;\n}\n\nexport function getStats(): {\n registeredTypes: number;\n totalInstances: number;\n typeBreakdown: Record<string, number>;\n} {\n return _registry.getStats();\n}\n"],"mappings":";AAKA,IAAI,2DAAYA,EAAAA;AAEhB,SAAgB,cAAsC;CACpD,OAAO;AACT;AAEA,SAAgB,YAAY,UAAwC;CAClE,YAAY;AACd;AAEA,SAAgB,WAId;CACA,OAAO,UAAU,SAAS;AAC5B"}
|
package/dist/constants.d.cts
CHANGED
|
@@ -29,11 +29,6 @@ export declare const BLAC_STATIC_PROPS: {
|
|
|
29
29
|
* Exclude a bloc from DevTools reporting (prevents infinite loops)
|
|
30
30
|
*/
|
|
31
31
|
readonly EXCLUDE_FROM_DEVTOOLS: "__excludeFromDevTools";
|
|
32
|
-
/**
|
|
33
|
-
* Mark a bloc so each `useBloc` call site gets its own per-mount instance.
|
|
34
|
-
* The React adapter auto-keys via `useId()` when this is set.
|
|
35
|
-
*/
|
|
36
|
-
readonly ISOLATED: "isolated";
|
|
37
32
|
/**
|
|
38
33
|
* Per-class equality function used to short-circuit `emit`/`patch` when the
|
|
39
34
|
* new state is structurally equal to the previous state. Falls back to the
|
package/dist/constants.d.ts
CHANGED
|
@@ -29,11 +29,6 @@ export declare const BLAC_STATIC_PROPS: {
|
|
|
29
29
|
* Exclude a bloc from DevTools reporting (prevents infinite loops)
|
|
30
30
|
*/
|
|
31
31
|
readonly EXCLUDE_FROM_DEVTOOLS: "__excludeFromDevTools";
|
|
32
|
-
/**
|
|
33
|
-
* Mark a bloc so each `useBloc` call site gets its own per-mount instance.
|
|
34
|
-
* The React adapter auto-keys via `useId()` when this is set.
|
|
35
|
-
*/
|
|
36
|
-
readonly ISOLATED: "isolated";
|
|
37
32
|
/**
|
|
38
33
|
* Per-class equality function used to short-circuit `emit`/`patch` when the
|
|
39
34
|
* new state is structurally equal to the previous state. Falls back to the
|
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
import { StructuralContainer, type DeepPartial, type StructuralContainerOptions } from '@dirtytalk/structural';
|
|
2
|
-
import type { StateContainerConstructor } from '../types/utilities';
|
|
2
|
+
import type { ExtractArgs, ExtractState, StateContainerConstructor } from '../types/utilities';
|
|
3
3
|
import { APPLY_DEPS, EMIT, REMOVE_DEPS_OWNER } from './symbols';
|
|
4
|
+
/**
|
|
5
|
+
* Brand symbol carried (non-enumerable) on every handle returned by
|
|
6
|
+
* `depend()`. Framework adapters (`@blac/react`) use this to detect handles
|
|
7
|
+
* inside a tracked-proxy and swap in a session-bound wrapper.
|
|
8
|
+
*
|
|
9
|
+
* @internal — exported for `@blac/react`; not part of the public API.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEP_BRAND: unique symbol;
|
|
12
|
+
/**
|
|
13
|
+
* Per-access options for a {@link DepHandle}. `args` resolves the specific dep
|
|
14
|
+
* instance for this call; omit it to fall back to the default args passed to
|
|
15
|
+
* `depend()`. Args resolve at call time so they can derive from current state.
|
|
16
|
+
*/
|
|
17
|
+
export interface DepAccessOptions<T extends StateContainerConstructor> {
|
|
18
|
+
args?: ExtractArgs<T>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Branded handle returned by `StateContainer.depend()`. Two intention-revealing
|
|
22
|
+
* accessors, no callable surface:
|
|
23
|
+
*
|
|
24
|
+
* - `handle.track(options?)` — base impl: returns `[instance.state, instance]`
|
|
25
|
+
* live with no subscription. The React layer replaces `.track()` per-consumer
|
|
26
|
+
* so that cross-bloc state changes trigger re-renders of the reading component.
|
|
27
|
+
* - `handle.untracked(options?)` — returns the live dep instance with no
|
|
28
|
+
* tracking. Use for imperative calls (`.untracked().doThing()`) and one-off
|
|
29
|
+
* state reads that should not subscribe the reader.
|
|
30
|
+
* - `handle[DEP_BRAND]` — carries `{ Type, defaultArgs }` for framework use.
|
|
31
|
+
*/
|
|
32
|
+
export interface DepHandle<T extends StateContainerConstructor> {
|
|
33
|
+
track(options?: DepAccessOptions<T>): [ExtractState<T>, InstanceType<T>];
|
|
34
|
+
untracked(options?: DepAccessOptions<T>): InstanceType<T>;
|
|
35
|
+
readonly [DEP_BRAND]: {
|
|
36
|
+
Type: T;
|
|
37
|
+
defaultArgs?: ExtractArgs<T>;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
4
40
|
export interface StateContainerConfig {
|
|
5
41
|
name?: string;
|
|
6
42
|
debug?: boolean;
|
|
@@ -101,17 +137,22 @@ export declare abstract class StateContainer<S extends object = any, Args = void
|
|
|
101
137
|
get dependencies(): ReadonlyMap<StateContainerConstructor, string>;
|
|
102
138
|
get args(): Args | undefined;
|
|
103
139
|
/**
|
|
104
|
-
* Declare a cross-bloc dependency. Returns a
|
|
105
|
-
*
|
|
106
|
-
*
|
|
140
|
+
* Declare a cross-bloc dependency. Returns a branded handle with two
|
|
141
|
+
* accessors — the dep instance is resolved against the registry on each call,
|
|
142
|
+
* which keeps the surface immune to dep-instance churn:
|
|
143
|
+
*
|
|
144
|
+
* - `handle.track(options?)` — reactive read. Returns `[state, instance]`.
|
|
145
|
+
* Inside a getter reached through the React proxy this subscribes the
|
|
146
|
+
* reading component to the dep's changes (base impl: live, no subscription).
|
|
147
|
+
* - `handle.untracked(options?)` — returns the live instance with no tracking,
|
|
148
|
+
* for imperative method calls and one-off reads.
|
|
107
149
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* limits the blast radius but a true mutual cycle is still a user bug.
|
|
150
|
+
* `defaultArgs` resolves the dep instance when an accessor is called without
|
|
151
|
+
* its own `args`; per-call `options.args` overrides it and can derive from
|
|
152
|
+
* current state. This does NOT auto-resubscribe outside the React proxy;
|
|
153
|
+
* non-React consumers needing updates should subscribe explicitly.
|
|
113
154
|
*/
|
|
114
|
-
protected depend<T extends StateContainerConstructor>(Type: T,
|
|
155
|
+
protected depend<T extends StateContainerConstructor>(Type: T, defaultArgs?: ExtractArgs<T>): DepHandle<T>;
|
|
115
156
|
constructor(initialState: S, options?: StructuralContainerOptions);
|
|
116
157
|
/**
|
|
117
158
|
* Called once after construction with the args passed at acquire time, before the first
|
|
@@ -103,15 +103,18 @@ export declare class StateContainerRegistry {
|
|
|
103
103
|
* Acquire an instance with ref tracking (ownership semantics).
|
|
104
104
|
* Creates a new instance if one doesn't exist, or returns existing and adds a ref.
|
|
105
105
|
* You must call `release()` with the same refId when done.
|
|
106
|
+
*
|
|
107
|
+
* @internal Internal key tier. Public callers use the args-based `acquire`
|
|
108
|
+
* wrapper; `useBloc`/`compat`/`watch` address a pre-resolved key here.
|
|
106
109
|
* @param Type - The StateContainer class constructor
|
|
107
|
-
* @param instanceKey -
|
|
110
|
+
* @param instanceKey - Pre-resolved instance key (defaults to 'default')
|
|
108
111
|
* @param options - Acquisition options
|
|
109
112
|
* @param options.canCreate - Whether to create new instance if not found (default: true)
|
|
110
113
|
* @param options.countRef - Whether to add a reference (default: true)
|
|
111
114
|
* @param options.refId - Named reference ID for debugging; auto-generated if omitted
|
|
112
115
|
* @returns The state container instance
|
|
113
116
|
*/
|
|
114
|
-
acquire<T extends StateContainerConstructor = StateContainerConstructor>(Type: T, instanceKey?: string
|
|
117
|
+
acquire<T extends StateContainerConstructor = StateContainerConstructor>(Type: T, instanceKey?: string, options?: {
|
|
115
118
|
canCreate?: boolean;
|
|
116
119
|
countRef?: boolean;
|
|
117
120
|
refId?: string;
|
|
@@ -120,8 +123,10 @@ export declare class StateContainerRegistry {
|
|
|
120
123
|
/**
|
|
121
124
|
* Borrow an existing instance without adding a ref (borrowing semantics).
|
|
122
125
|
* Tracks cross-bloc dependency for reactive updates.
|
|
126
|
+
*
|
|
127
|
+
* @internal Internal key tier; public callers use the args-based `borrow`.
|
|
123
128
|
* @param Type - The StateContainer class constructor
|
|
124
|
-
* @param instanceKey -
|
|
129
|
+
* @param instanceKey - Pre-resolved instance key (defaults to 'default')
|
|
125
130
|
* @returns The state container instance
|
|
126
131
|
* @throws Error if instance doesn't exist
|
|
127
132
|
*/
|
|
@@ -129,8 +134,10 @@ export declare class StateContainerRegistry {
|
|
|
129
134
|
/**
|
|
130
135
|
* Safely borrow an existing instance (borrowing semantics with error handling).
|
|
131
136
|
* Returns discriminated union for type-safe conditional access.
|
|
137
|
+
*
|
|
138
|
+
* @internal Internal key tier; public callers use the args-based `borrowSafe`.
|
|
132
139
|
* @param Type - The StateContainer class constructor
|
|
133
|
-
* @param instanceKey -
|
|
140
|
+
* @param instanceKey - Pre-resolved instance key (defaults to 'default')
|
|
134
141
|
* @returns Discriminated union with either the instance or an error
|
|
135
142
|
*/
|
|
136
143
|
borrowSafe<T extends StateContainerConstructor = StateContainerConstructor>(Type: T, instanceKey?: string): {
|
|
@@ -147,19 +154,23 @@ export declare class StateContainerRegistry {
|
|
|
147
154
|
*
|
|
148
155
|
* Use this in bloc-to-bloc communication when you need to ensure an instance exists
|
|
149
156
|
* but don't want to claim ownership (no ref added).
|
|
157
|
+
*
|
|
158
|
+
* @internal Internal key tier; public callers use the args-based `ensure`.
|
|
150
159
|
* @param Type - The StateContainer class constructor
|
|
151
|
-
* @param instanceKey -
|
|
160
|
+
* @param instanceKey - Pre-resolved instance key, or undefined to derive from `args`
|
|
152
161
|
* (`static key(args)` / structural hash), matching `acquire`.
|
|
153
162
|
* @param args - Construction args; used for keying when no explicit key is given
|
|
154
163
|
* @returns The state container instance
|
|
155
164
|
*/
|
|
156
|
-
ensure<T extends StateContainerConstructor = StateContainerConstructor>(Type: T, instanceKey?: string
|
|
165
|
+
ensure<T extends StateContainerConstructor = StateContainerConstructor>(Type: T, instanceKey?: string, args?: unknown): InstanceType<T>;
|
|
157
166
|
/**
|
|
158
167
|
* Release a reference to an instance.
|
|
159
168
|
* Removes the ref and disposes when refs is empty (unless keepAlive).
|
|
160
169
|
* Releasing an already-removed refId is a no-op (idempotent).
|
|
170
|
+
*
|
|
171
|
+
* @internal Internal key tier; public callers use the args-based `release`.
|
|
161
172
|
* @param Type - The StateContainer class constructor
|
|
162
|
-
* @param instanceKey -
|
|
173
|
+
* @param instanceKey - Pre-resolved instance key (defaults to 'default')
|
|
163
174
|
* @param forceDispose - Force immediate disposal regardless of refs
|
|
164
175
|
* @param refId - The specific ref to remove; removes one arbitrary ref if omitted
|
|
165
176
|
*/
|
|
@@ -184,22 +195,28 @@ export declare class StateContainerRegistry {
|
|
|
184
195
|
clear<T extends StateContainerConstructor>(Type: T): void;
|
|
185
196
|
/**
|
|
186
197
|
* Get reference count for an instance (number of active refs).
|
|
198
|
+
*
|
|
199
|
+
* @internal Internal key tier; public callers use the args-based `getRefCount`.
|
|
187
200
|
* @param Type - The StateContainer class constructor
|
|
188
|
-
* @param instanceKey -
|
|
201
|
+
* @param instanceKey - Pre-resolved instance key (defaults to 'default')
|
|
189
202
|
* @returns Current ref count (0 if instance doesn't exist)
|
|
190
203
|
*/
|
|
191
204
|
getRefCount<T extends StateContainerConstructor>(Type: T, instanceKey?: string): number;
|
|
192
205
|
/**
|
|
193
206
|
* Get all active reference IDs for an instance.
|
|
207
|
+
*
|
|
208
|
+
* @internal Internal key tier; public callers use the args-based `getRefIds`.
|
|
194
209
|
* @param Type - The StateContainer class constructor
|
|
195
|
-
* @param instanceKey -
|
|
210
|
+
* @param instanceKey - Pre-resolved instance key (defaults to 'default')
|
|
196
211
|
* @returns Array of ref ID strings (empty if instance doesn't exist)
|
|
197
212
|
*/
|
|
198
213
|
getRefIds<T extends StateContainerConstructor>(Type: T, instanceKey?: string): string[];
|
|
199
214
|
/**
|
|
200
215
|
* Check if an instance exists.
|
|
216
|
+
*
|
|
217
|
+
* @internal Internal key tier; public callers use the args-based `hasInstance`.
|
|
201
218
|
* @param Type - The StateContainer class constructor
|
|
202
|
-
* @param instanceKey -
|
|
219
|
+
* @param instanceKey - Pre-resolved instance key (defaults to 'default')
|
|
203
220
|
* @returns true if instance exists
|
|
204
221
|
*/
|
|
205
222
|
hasInstance<T extends StateContainerConstructor>(Type: T, instanceKey?: string): boolean;
|
package/dist/debug.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_StateContainerRegistry = require("./StateContainerRegistry-
|
|
3
|
-
const require_config = require("./config-
|
|
4
|
-
const require_management = require("./management-
|
|
2
|
+
const require_StateContainerRegistry = require("./StateContainerRegistry-DJQqLrli.cjs");
|
|
3
|
+
const require_config = require("./config-sCPKPYxZ.cjs");
|
|
4
|
+
const require_management = require("./management-DAV9sN-k.cjs");
|
|
5
5
|
exports.forEach = require_management.forEach;
|
|
6
6
|
exports.getAll = require_management.getAll;
|
|
7
7
|
exports.getRefCount = require_management.getRefCount;
|
package/dist/debug.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as globalRegistry } from "./StateContainerRegistry-
|
|
2
|
-
import { n as getStats, r as setRegistry, t as getRegistry } from "./config-
|
|
3
|
-
import { a as getAll, c as hasInstance, i as forEach, o as getRefCount, r as register, s as getRefIds } from "./management-
|
|
1
|
+
import { r as globalRegistry } from "./StateContainerRegistry-B1GYx9Xo.js";
|
|
2
|
+
import { n as getStats, r as setRegistry, t as getRegistry } from "./config-Dk1FxfXj.js";
|
|
3
|
+
import { a as getAll, c as hasInstance, i as forEach, o as getRefCount, r as register, s as getRefIds } from "./management-444tdCBG.js";
|
|
4
4
|
export { forEach, getAll, getRefCount, getRefIds, getRegistry, getStats, globalRegistry, hasInstance, register, setRegistry };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_StateContainerRegistry = require("./StateContainerRegistry-
|
|
2
|
-
const require_config = require("./config-
|
|
1
|
+
const require_StateContainerRegistry = require("./StateContainerRegistry-FWKzPfS-.cjs");
|
|
2
|
+
const require_config = require("./config-DVMnlHLv.cjs");
|
|
3
3
|
let _dirtytalk_structural = require("@dirtytalk/structural");
|
|
4
4
|
//#region src/utils/idGenerator.ts
|
|
5
5
|
/**
|
|
@@ -155,10 +155,11 @@ var StateContainer = class extends _dirtytalk_structural.StructuralContainer {
|
|
|
155
155
|
* here would cycle on mutual deps; the channel's same-tick coalescing
|
|
156
156
|
* limits the blast radius but a true mutual cycle is still a user bug.
|
|
157
157
|
*/
|
|
158
|
-
depend(Type,
|
|
158
|
+
depend(Type, args) {
|
|
159
159
|
if (!this._dependencies) this._dependencies = /* @__PURE__ */ new Map();
|
|
160
|
-
this.
|
|
161
|
-
|
|
160
|
+
const key = this._registry.resolveKey(Type, void 0, args);
|
|
161
|
+
this._dependencies.set(Type, key);
|
|
162
|
+
return () => this._registry.ensure(Type, key, args);
|
|
162
163
|
}
|
|
163
164
|
constructor(initialState, options) {
|
|
164
165
|
super(initialState, options);
|
|
@@ -476,6 +477,17 @@ var StateContainer = class extends _dirtytalk_structural.StructuralContainer {
|
|
|
476
477
|
*/
|
|
477
478
|
var Cubit = class extends StateContainer {};
|
|
478
479
|
//#endregion
|
|
480
|
+
//#region src/registry/ensure.ts
|
|
481
|
+
/**
|
|
482
|
+
* Ensure an instance exists without taking ownership (no ref added). Instance
|
|
483
|
+
* identity is derived purely from `args`, matching `acquire`.
|
|
484
|
+
*/
|
|
485
|
+
function ensure(BlocClass, opts) {
|
|
486
|
+
const registry = require_config.getRegistry();
|
|
487
|
+
const key = registry.resolveKey(BlocClass, void 0, opts?.args);
|
|
488
|
+
return registry.ensure(BlocClass, key, opts?.args);
|
|
489
|
+
}
|
|
490
|
+
//#endregion
|
|
479
491
|
Object.defineProperty(exports, "APPLY_DEPS", {
|
|
480
492
|
enumerable: true,
|
|
481
493
|
get: function() {
|
|
@@ -506,5 +518,11 @@ Object.defineProperty(exports, "StateContainer", {
|
|
|
506
518
|
return StateContainer;
|
|
507
519
|
}
|
|
508
520
|
});
|
|
521
|
+
Object.defineProperty(exports, "ensure", {
|
|
522
|
+
enumerable: true,
|
|
523
|
+
get: function() {
|
|
524
|
+
return ensure;
|
|
525
|
+
}
|
|
526
|
+
});
|
|
509
527
|
|
|
510
|
-
//# sourceMappingURL=
|
|
528
|
+
//# sourceMappingURL=ensure-CLQEx0Nn.cjs.map
|