@powerlines/plugin-alloy 0.19.19 → 0.19.21
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/{builtin-file-B8yP216k.d.mts → builtin-file-CnpVr7_0.d.cts} +3 -3
- package/dist/{builtin-file-Pnvf0Mjt.d.cts.map → builtin-file-CnpVr7_0.d.cts.map} +1 -1
- package/dist/{builtin-file-Pnvf0Mjt.d.cts → builtin-file-DNN4yb1Q.d.mts} +3 -3
- package/dist/{builtin-file-B8yP216k.d.mts.map → builtin-file-DNN4yb1Q.d.mts.map} +1 -1
- package/dist/{builtin-file-Bm7WMBBk.d.mts → builtin-file-PDckmfzE.d.cts} +3 -3
- package/dist/{builtin-file-TfCniW_K.d.cts.map → builtin-file-PDckmfzE.d.cts.map} +1 -1
- package/dist/{builtin-file-gr-ZQMIl.cjs → builtin-file-V_vMh8s8.cjs} +3 -3
- package/dist/{builtin-file-sJXTCC_u.mjs → builtin-file-uzudbU6M.mjs} +4 -4
- package/dist/{builtin-file-sJXTCC_u.mjs.map → builtin-file-uzudbU6M.mjs.map} +1 -1
- package/dist/{builtin-file-TfCniW_K.d.cts → builtin-file-xc-QSTiJ.d.mts} +5 -5
- package/dist/{builtin-file-Bm7WMBBk.d.mts.map → builtin-file-xc-QSTiJ.d.mts.map} +1 -1
- package/dist/{capnp-Bs3Ikfuw.d.mts → capnp-CLxcoMcG.d.mts} +1 -1
- package/dist/{capnp-Bs3Ikfuw.d.mts.map → capnp-CLxcoMcG.d.mts.map} +1 -1
- package/dist/{capnp-idxO5voI.mjs → capnp-CPbob9Cm.mjs} +1 -1
- package/dist/{capnp-idxO5voI.mjs.map → capnp-CPbob9Cm.mjs.map} +1 -1
- package/dist/{capnp-YnGBPkLK.d.cts → capnp-DbPtfpg2.d.cts} +1 -1
- package/dist/{capnp-YnGBPkLK.d.cts.map → capnp-DbPtfpg2.d.cts.map} +1 -1
- package/dist/{components-IRVnipN0.d.cts → components-DqfyRVFO.d.cts} +2 -2
- package/dist/{components-BVhJ5G56.d.mts.map → components-DqfyRVFO.d.cts.map} +1 -1
- package/dist/{components-BVhJ5G56.d.mts → components-REdw2IIi.d.mts} +1 -1
- package/dist/{components-IRVnipN0.d.cts.map → components-REdw2IIi.d.mts.map} +1 -1
- package/dist/{context-DAfWJCa9.mjs → context-CdPajCh6.mjs} +3 -21
- package/dist/context-CdPajCh6.mjs.map +1 -0
- package/dist/context-Cfj0Wk3u.d.cts +30 -0
- package/dist/context-Cfj0Wk3u.d.cts.map +1 -0
- package/dist/{context-CowAmU8m.cjs → context-DNdlL_gp.cjs} +1 -31
- package/dist/context-zWXy6keQ.d.mts +30 -0
- package/dist/context-zWXy6keQ.d.mts.map +1 -0
- package/dist/core/components/index.cjs +6 -7
- package/dist/core/components/index.d.cts +5 -6
- package/dist/core/components/index.d.mts +5 -6
- package/dist/core/components/index.mjs +6 -7
- package/dist/core/components/output.cjs +2 -2
- package/dist/core/components/output.d.cts +1 -2
- package/dist/core/components/output.d.mts +1 -2
- package/dist/core/components/output.mjs +2 -2
- package/dist/core/components/single-line-comment.cjs +1 -1
- package/dist/core/components/single-line-comment.d.cts +2 -2
- package/dist/core/components/single-line-comment.d.mts +2 -2
- package/dist/core/components/single-line-comment.mjs +1 -1
- package/dist/core/components/source-file.cjs +2 -4
- package/dist/core/components/source-file.d.cts +2 -2
- package/dist/core/components/source-file.d.mts +2 -2
- package/dist/core/components/source-file.mjs +2 -4
- package/dist/core/contexts/context.cjs +1 -3
- package/dist/core/contexts/context.d.cts +2 -2
- package/dist/core/contexts/context.d.mts +2 -2
- package/dist/core/contexts/context.mjs +2 -2
- package/dist/core/contexts/index.cjs +8 -5
- package/dist/core/contexts/index.d.cts +6 -5
- package/dist/core/contexts/index.d.mts +6 -5
- package/dist/core/contexts/index.mjs +5 -4
- package/dist/core/contexts/meta.cjs +6 -0
- package/dist/core/contexts/meta.d.cts +2 -0
- package/dist/core/contexts/meta.d.mts +2 -0
- package/dist/core/contexts/meta.mjs +3 -0
- package/dist/core/contexts/reflection.cjs +1 -1
- package/dist/core/contexts/reflection.d.cts +2 -2
- package/dist/core/contexts/reflection.d.mts +2 -2
- package/dist/core/contexts/reflection.mjs +1 -1
- package/dist/core/index.cjs +12 -9
- package/dist/core/index.d.cts +10 -9
- package/dist/core/index.d.mts +10 -9
- package/dist/core/index.mjs +9 -8
- package/dist/{create-builtin-m17qlyC1.mjs → create-builtin-Be3J_vqf.mjs} +1 -1
- package/dist/{create-builtin-m17qlyC1.mjs.map → create-builtin-Be3J_vqf.mjs.map} +1 -1
- package/dist/{create-builtin-B6fXqb8U.d.mts → create-builtin-Bpswa0ZT.d.cts} +1 -1
- package/dist/{create-builtin-B6fXqb8U.d.mts.map → create-builtin-Bpswa0ZT.d.cts.map} +1 -1
- package/dist/{create-builtin-DFiWd6Zc.d.cts → create-builtin-CbEjJreB.d.mts} +1 -1
- package/dist/{create-builtin-DFiWd6Zc.d.cts.map → create-builtin-CbEjJreB.d.mts.map} +1 -1
- package/dist/{dynamic-import-statement-Cxe-I3B0.mjs → dynamic-import-statement-B4Ov9C7y.mjs} +1 -1
- package/dist/{dynamic-import-statement-Cxe-I3B0.mjs.map → dynamic-import-statement-B4Ov9C7y.mjs.map} +1 -1
- package/dist/{dynamic-import-statement-DNJlI3ND.d.cts → dynamic-import-statement-DSNDMC9Y.d.mts} +1 -1
- package/dist/{dynamic-import-statement-C5uIfUk9.d.cts.map → dynamic-import-statement-DSNDMC9Y.d.mts.map} +1 -1
- package/dist/{dynamic-import-statement-O1WueHgS.d.mts → dynamic-import-statement-kxVxtCBQ.d.cts} +1 -1
- package/dist/{dynamic-import-statement-DNJlI3ND.d.cts.map → dynamic-import-statement-kxVxtCBQ.d.cts.map} +1 -1
- package/dist/{entry-file-BRFvWEkh.d.cts → entry-file-1NnKc2YT.d.cts} +4 -4
- package/dist/{entry-file-BRFvWEkh.d.cts.map → entry-file-1NnKc2YT.d.cts.map} +1 -1
- package/dist/{entry-file-PWCdJV12.cjs → entry-file-Big6nfUK.cjs} +2 -2
- package/dist/{entry-file-BZe47LcB.mjs → entry-file-BwAnSku3.mjs} +3 -3
- package/dist/{entry-file-BZe47LcB.mjs.map → entry-file-BwAnSku3.mjs.map} +1 -1
- package/dist/{entry-file-DYSbQFCX.d.cts → entry-file-CmJcd0C4.d.mts} +2 -2
- package/dist/{entry-file-BiYORvQI.d.mts.map → entry-file-CmJcd0C4.d.mts.map} +1 -1
- package/dist/{entry-file-DyS8FA-U.d.mts → entry-file-Cu4-ISnT.d.mts} +4 -4
- package/dist/{entry-file-DYSbQFCX.d.cts.map → entry-file-Cu4-ISnT.d.mts.map} +1 -1
- package/dist/{entry-file-BiYORvQI.d.mts → entry-file-D5chvp2V.d.cts} +4 -4
- package/dist/{entry-file-DyS8FA-U.d.mts.map → entry-file-D5chvp2V.d.cts.map} +1 -1
- package/dist/{front-matter-TJ3qlKJo.mjs → front-matter-BeTG0uJA.mjs} +1 -1
- package/dist/{front-matter-TJ3qlKJo.mjs.map → front-matter-BeTG0uJA.mjs.map} +1 -1
- package/dist/{front-matter-BR4T3xIc.d.mts → front-matter-CXfCT8a8.d.mts} +1 -1
- package/dist/{front-matter-BGxm_xQp.d.mts.map → front-matter-CXfCT8a8.d.mts.map} +1 -1
- package/dist/{front-matter-BGxm_xQp.d.mts → front-matter-DTorR58b.d.cts} +3 -3
- package/dist/{front-matter-BR4T3xIc.d.mts.map → front-matter-DTorR58b.d.cts.map} +1 -1
- package/dist/{front-matter-u9H7VPAF.d.cts → front-matter-DpKD40Zz.d.cts} +1 -1
- package/dist/{front-matter-u9H7VPAF.d.cts.map → front-matter-DpKD40Zz.d.cts.map} +1 -1
- package/dist/helpers/capnp.cjs +1 -1
- package/dist/helpers/capnp.d.cts +1 -1
- package/dist/helpers/capnp.d.mts +1 -1
- package/dist/helpers/capnp.mjs +1 -1
- package/dist/helpers/create-builtin.cjs +1 -1
- package/dist/helpers/create-builtin.d.cts +1 -1
- package/dist/helpers/create-builtin.d.mts +1 -1
- package/dist/helpers/create-builtin.mjs +1 -1
- package/dist/helpers/index.cjs +4 -4
- package/dist/helpers/index.d.cts +4 -4
- package/dist/helpers/index.d.mts +4 -4
- package/dist/helpers/index.mjs +4 -4
- package/dist/helpers/refkey.cjs +1 -1
- package/dist/helpers/refkey.d.cts +1 -1
- package/dist/helpers/refkey.d.mts +1 -1
- package/dist/helpers/refkey.mjs +1 -1
- package/dist/helpers/typescript.cjs +1 -1
- package/dist/helpers/typescript.d.cts +1 -1
- package/dist/helpers/typescript.d.mts +1 -1
- package/dist/helpers/typescript.mjs +1 -1
- package/dist/index.cjs +40 -47
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +40 -47
- package/dist/index.mjs.map +1 -1
- package/dist/markdown/components/front-matter.cjs +1 -1
- package/dist/markdown/components/front-matter.d.cts +1 -1
- package/dist/markdown/components/front-matter.d.mts +1 -1
- package/dist/markdown/components/front-matter.mjs +1 -1
- package/dist/markdown/components/index.cjs +9 -10
- package/dist/markdown/components/index.d.cts +7 -7
- package/dist/markdown/components/index.d.mts +7 -7
- package/dist/markdown/components/index.mjs +9 -10
- package/dist/markdown/components/markdown-file.cjs +6 -7
- package/dist/markdown/components/markdown-file.d.cts +4 -4
- package/dist/markdown/components/markdown-file.d.mts +4 -4
- package/dist/markdown/components/markdown-file.mjs +6 -7
- package/dist/markdown/components/markdown-table.cjs +2 -2
- package/dist/markdown/components/markdown-table.d.cts +3 -3
- package/dist/markdown/components/markdown-table.d.mts +3 -3
- package/dist/markdown/components/markdown-table.mjs +2 -2
- package/dist/markdown/contexts/index.cjs +2 -2
- package/dist/markdown/contexts/index.d.cts +2 -2
- package/dist/markdown/contexts/index.d.mts +2 -2
- package/dist/markdown/contexts/index.mjs +2 -2
- package/dist/markdown/contexts/markdown-table.cjs +1 -1
- package/dist/markdown/contexts/markdown-table.d.cts +1 -1
- package/dist/markdown/contexts/markdown-table.d.mts +1 -1
- package/dist/markdown/contexts/markdown-table.mjs +1 -1
- package/dist/markdown/index.cjs +10 -11
- package/dist/markdown/index.d.cts +8 -8
- package/dist/markdown/index.d.mts +8 -8
- package/dist/markdown/index.mjs +10 -11
- package/dist/{markdown-file-B3gexrDd.cjs → markdown-file-B6gbsDmK.cjs} +4 -4
- package/dist/{markdown-file-B5GGuGIb.d.cts → markdown-file-BlCHLUUm.d.mts} +4 -4
- package/dist/{markdown-file-B5GGuGIb.d.cts.map → markdown-file-BlCHLUUm.d.mts.map} +1 -1
- package/dist/{markdown-file-BwL6ZG4f.d.mts → markdown-file-CwMc-alS.d.cts} +4 -4
- package/dist/{markdown-file-BwL6ZG4f.d.mts.map → markdown-file-CwMc-alS.d.cts.map} +1 -1
- package/dist/{markdown-file-K4zYXgeA.d.mts → markdown-file-DIzN9Gvv.d.cts} +7 -7
- package/dist/{markdown-file-K4zYXgeA.d.mts.map → markdown-file-DIzN9Gvv.d.cts.map} +1 -1
- package/dist/{markdown-file-CfI5rBqC.d.cts → markdown-file-T8cRtyd8.d.mts} +7 -7
- package/dist/markdown-file-T8cRtyd8.d.mts.map +1 -0
- package/dist/{markdown-file-CRZN4frR.mjs → markdown-file-k5ep-0VI.mjs} +5 -5
- package/dist/{markdown-file-CRZN4frR.mjs.map → markdown-file-k5ep-0VI.mjs.map} +1 -1
- package/dist/{markdown-table-ChP2BUmY.d.mts → markdown-table-Bc1owEry.d.cts} +7 -7
- package/dist/{markdown-table-AoJIzA89.d.cts.map → markdown-table-Bc1owEry.d.cts.map} +1 -1
- package/dist/{markdown-table-Br2Ihl2z.d.cts → markdown-table-CZMEY6IR.d.cts} +1 -1
- package/dist/{markdown-table-BpB5iT2V.d.mts.map → markdown-table-CZMEY6IR.d.cts.map} +1 -1
- package/dist/{markdown-table-D5jCVYaK.mjs → markdown-table-CnEur72Z.mjs} +2 -2
- package/dist/{markdown-table-D5jCVYaK.mjs.map → markdown-table-CnEur72Z.mjs.map} +1 -1
- package/dist/{markdown-table-AoJIzA89.d.cts → markdown-table-Cv6HmRUB.d.cts} +3 -3
- package/dist/{markdown-table-ChP2BUmY.d.mts.map → markdown-table-Cv6HmRUB.d.cts.map} +1 -1
- package/dist/{markdown-table-xO7WrAmK.d.mts → markdown-table-DFbl_3T_.d.mts} +3 -3
- package/dist/{markdown-table-O1wIj_h2.d.cts.map → markdown-table-DFbl_3T_.d.mts.map} +1 -1
- package/dist/{markdown-table-Dsvn4SmP.mjs → markdown-table-PT2TFFY3.mjs} +1 -1
- package/dist/{markdown-table-Dsvn4SmP.mjs.map → markdown-table-PT2TFFY3.mjs.map} +1 -1
- package/dist/{markdown-table-DTeEqR3P.cjs → markdown-table-eTnxxb46.cjs} +1 -1
- package/dist/{markdown-table-BpB5iT2V.d.mts → markdown-table-t6Z-cmxX.d.mts} +1 -1
- package/dist/{markdown-table-Br2Ihl2z.d.cts.map → markdown-table-t6Z-cmxX.d.mts.map} +1 -1
- package/dist/meta-BjTflizw.cjs +60 -0
- package/dist/meta-D0pfCtdR.mjs +37 -0
- package/dist/meta-D0pfCtdR.mjs.map +1 -0
- package/dist/meta-DDwBNdE3.d.cts +48 -0
- package/dist/meta-DDwBNdE3.d.cts.map +1 -0
- package/dist/meta-RtOYCV7t.d.mts +48 -0
- package/dist/meta-RtOYCV7t.d.mts.map +1 -0
- package/dist/{output-D_l1fJEz.cjs → output-B52VAyyC.cjs} +12 -20
- package/dist/{output-DWAO1J8V.d.cts → output-BDtHu7ey.d.cts} +4 -9
- package/dist/output-BDtHu7ey.d.cts.map +1 -0
- package/dist/output-CIKSJjPS.d.cts +19 -0
- package/dist/output-CIKSJjPS.d.cts.map +1 -0
- package/dist/output-CPbwcL2j.mjs +35 -0
- package/dist/output-CPbwcL2j.mjs.map +1 -0
- package/dist/{output-7KuLjL1Z.d.mts → output-Law_SUlM.d.mts} +3 -8
- package/dist/output-Law_SUlM.d.mts.map +1 -0
- package/dist/{output-cm5u8ERz.d.mts → output-gLuHZTGo.d.mts} +3 -8
- package/dist/output-gLuHZTGo.d.mts.map +1 -0
- package/dist/{plugin-C6SupJ8C.d.cts → plugin-BxSt55Oo.d.cts} +2 -2
- package/dist/{plugin-BMHB2KnC.d.mts.map → plugin-BxSt55Oo.d.cts.map} +1 -1
- package/dist/{plugin-BMHB2KnC.d.mts → plugin-D3ENcdlL.d.mts} +2 -2
- package/dist/{plugin-C6SupJ8C.d.cts.map → plugin-D3ENcdlL.d.mts.map} +1 -1
- package/dist/{record-expression-DGPYqLRm.d.mts → record-expression-ChoLAsVS.d.mts} +1 -1
- package/dist/{record-expression-DGPYqLRm.d.mts.map → record-expression-ChoLAsVS.d.mts.map} +1 -1
- package/dist/{record-expression-DnhWJ5_U.mjs → record-expression-D5W72rZN.mjs} +1 -1
- package/dist/{record-expression-DnhWJ5_U.mjs.map → record-expression-D5W72rZN.mjs.map} +1 -1
- package/dist/{record-expression-adlQJuNw.d.cts → record-expression-Dwg_PZpg.d.cts} +1 -1
- package/dist/{record-expression-adlQJuNw.d.cts.map → record-expression-Dwg_PZpg.d.cts.map} +1 -1
- package/dist/{refkey-Bf_2_U5t.d.cts → refkey-CP7MJMac.d.cts} +1 -1
- package/dist/refkey-CP7MJMac.d.cts.map +1 -0
- package/dist/{refkey-t79_78kW.mjs → refkey-CQVHeuAq.mjs} +1 -1
- package/dist/{refkey-t79_78kW.mjs.map → refkey-CQVHeuAq.mjs.map} +1 -1
- package/dist/{refkey-Cebk8ksG.d.mts → refkey-D6OjgKgS.d.mts} +1 -1
- package/dist/refkey-D6OjgKgS.d.mts.map +1 -0
- package/dist/{reflection-CDRGf-os.mjs → reflection-Btb1NqwS.mjs} +1 -1
- package/dist/{reflection-CDRGf-os.mjs.map → reflection-Btb1NqwS.mjs.map} +1 -1
- package/dist/{reflection-caOQdoZ6.d.mts → reflection-BumisltV.d.mts} +2 -2
- package/dist/{reflection-caOQdoZ6.d.mts.map → reflection-BumisltV.d.mts.map} +1 -1
- package/dist/{reflection-xU09ifzp.d.cts → reflection-I2Uewhuo.d.cts} +2 -2
- package/dist/{reflection-xU09ifzp.d.cts.map → reflection-I2Uewhuo.d.cts.map} +1 -1
- package/dist/{single-line-comment-cunvfPOw.d.mts → single-line-comment-DWXxACyy.d.cts} +2 -2
- package/dist/{single-line-comment-B258_x1B.d.cts.map → single-line-comment-DWXxACyy.d.cts.map} +1 -1
- package/dist/{single-line-comment-mOQtfhWt.mjs → single-line-comment-MRVbskt3.mjs} +1 -1
- package/dist/{single-line-comment-mOQtfhWt.mjs.map → single-line-comment-MRVbskt3.mjs.map} +1 -1
- package/dist/{single-line-comment-B258_x1B.d.cts → single-line-comment-ceejgNfU.d.mts} +2 -2
- package/dist/{single-line-comment-cunvfPOw.d.mts.map → single-line-comment-ceejgNfU.d.mts.map} +1 -1
- package/dist/{source-file-LHxAz2P7.cjs → source-file-BCcq9Me3.cjs} +2 -2
- package/dist/{source-file-BCwSF5Yh.d.mts → source-file-BNYeD1w4.d.cts} +2 -2
- package/dist/{source-file-BCwSF5Yh.d.mts.map → source-file-BNYeD1w4.d.cts.map} +1 -1
- package/dist/{source-file-CE5xdm7N.d.cts → source-file-Cw1cdlHb.d.mts} +2 -2
- package/dist/{source-file-CE5xdm7N.d.cts.map → source-file-Cw1cdlHb.d.mts.map} +1 -1
- package/dist/{source-file-DwSKCa6M.mjs → source-file-MLTzYO0w.mjs} +2 -2
- package/dist/source-file-MLTzYO0w.mjs.map +1 -0
- package/dist/source-file-OtWS66Kr.d.cts +33 -0
- package/dist/source-file-OtWS66Kr.d.cts.map +1 -0
- package/dist/{source-file-DCop3D-p.d.mts → source-file-YrHdUb8H.d.mts} +4 -4
- package/dist/{source-file-DCop3D-p.d.mts.map → source-file-YrHdUb8H.d.mts.map} +1 -1
- package/dist/{tsdoc-B2PbOibk.d.mts → tsdoc-BpOXtq0v.d.cts} +3 -3
- package/dist/{tsdoc-B2PbOibk.d.mts.map → tsdoc-BpOXtq0v.d.cts.map} +1 -1
- package/dist/{tsdoc-DVOH9B7-.cjs → tsdoc-BufL8muf.cjs} +1 -1
- package/dist/{tsdoc-CfvwK4Ml.d.cts → tsdoc-CwqGhmLe.d.mts} +3 -3
- package/dist/{tsdoc-CfvwK4Ml.d.cts.map → tsdoc-CwqGhmLe.d.mts.map} +1 -1
- package/dist/{tsdoc-Ios5W2gJ.mjs → tsdoc-DB1Qzwsn.mjs} +2 -2
- package/dist/{tsdoc-Ios5W2gJ.mjs.map → tsdoc-DB1Qzwsn.mjs.map} +1 -1
- package/dist/{tsdoc-reflection-p4yqKTXi.mjs → tsdoc-reflection-BcTrWAwt.mjs} +3 -3
- package/dist/{tsdoc-reflection-p4yqKTXi.mjs.map → tsdoc-reflection-BcTrWAwt.mjs.map} +1 -1
- package/dist/{tsdoc-reflection-B4bfElmj.d.cts → tsdoc-reflection-Cak-O_qk.d.mts} +2 -2
- package/dist/{tsdoc-reflection-B4bfElmj.d.cts.map → tsdoc-reflection-Cak-O_qk.d.mts.map} +1 -1
- package/dist/{tsdoc-reflection-CQ4ITnvE.cjs → tsdoc-reflection-Cov5Qh1c.cjs} +2 -2
- package/dist/{tsdoc-reflection-ByWPfzv2.d.mts → tsdoc-reflection-D_3kwA_m.d.cts} +6 -6
- package/dist/{tsdoc-reflection-ByWPfzv2.d.mts.map → tsdoc-reflection-D_3kwA_m.d.cts.map} +1 -1
- package/dist/{tsdoc-reflection-Dggzpjh7.d.cts → tsdoc-reflection-hz0WQ70o.d.cts} +6 -6
- package/dist/{tsdoc-reflection-Dggzpjh7.d.cts.map → tsdoc-reflection-hz0WQ70o.d.cts.map} +1 -1
- package/dist/types/components.cjs +1 -1
- package/dist/types/components.d.cts +1 -1
- package/dist/types/components.d.mts +1 -1
- package/dist/types/components.mjs +1 -1
- package/dist/types/index.cjs +2 -2
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +2 -2
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.mts +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/dist/typescript/components/builtin-file.cjs +7 -8
- package/dist/typescript/components/builtin-file.d.cts +5 -5
- package/dist/typescript/components/builtin-file.d.mts +5 -5
- package/dist/typescript/components/builtin-file.mjs +7 -8
- package/dist/typescript/components/dynamic-import-statement.cjs +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.cts +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +1 -1
- package/dist/typescript/components/dynamic-import-statement.mjs +1 -1
- package/dist/typescript/components/entry-file.cjs +6 -7
- package/dist/typescript/components/entry-file.d.cts +4 -4
- package/dist/typescript/components/entry-file.d.mts +4 -4
- package/dist/typescript/components/entry-file.mjs +6 -7
- package/dist/typescript/components/index.cjs +15 -15
- package/dist/typescript/components/index.d.cts +12 -12
- package/dist/typescript/components/index.d.mts +12 -12
- package/dist/typescript/components/index.mjs +15 -15
- package/dist/typescript/components/record-expression.cjs +1 -1
- package/dist/typescript/components/record-expression.d.cts +1 -1
- package/dist/typescript/components/record-expression.d.mts +1 -1
- package/dist/typescript/components/record-expression.mjs +1 -1
- package/dist/typescript/components/tsdoc-reflection.cjs +4 -4
- package/dist/typescript/components/tsdoc-reflection.d.cts +3 -3
- package/dist/typescript/components/tsdoc-reflection.d.mts +3 -3
- package/dist/typescript/components/tsdoc-reflection.mjs +4 -4
- package/dist/typescript/components/tsdoc.cjs +2 -2
- package/dist/typescript/components/tsdoc.d.cts +2 -2
- package/dist/typescript/components/tsdoc.d.mts +2 -2
- package/dist/typescript/components/tsdoc.mjs +2 -2
- package/dist/typescript/components/typescript-file.cjs +5 -6
- package/dist/typescript/components/typescript-file.d.cts +3 -3
- package/dist/typescript/components/typescript-file.d.mts +3 -3
- package/dist/typescript/components/typescript-file.mjs +5 -6
- package/dist/typescript/components/typescript-interface.cjs +5 -5
- package/dist/typescript/components/typescript-interface.d.cts +2 -2
- package/dist/typescript/components/typescript-interface.d.mts +2 -2
- package/dist/typescript/components/typescript-interface.mjs +5 -5
- package/dist/typescript/components/typescript-object.cjs +5 -5
- package/dist/typescript/components/typescript-object.d.cts +2 -2
- package/dist/typescript/components/typescript-object.d.mts +2 -2
- package/dist/typescript/components/typescript-object.mjs +5 -5
- package/dist/typescript/index.cjs +15 -15
- package/dist/typescript/index.d.cts +12 -12
- package/dist/typescript/index.d.mts +12 -12
- package/dist/typescript/index.mjs +15 -15
- package/dist/{typescript-CllZf0xN.mjs → typescript-BXhP0qIJ.mjs} +1 -1
- package/dist/{typescript-CllZf0xN.mjs.map → typescript-BXhP0qIJ.mjs.map} +1 -1
- package/dist/{typescript-B97ccQh-.d.mts → typescript-CXP7Oa6_.d.cts} +1 -1
- package/dist/{typescript-B97ccQh-.d.mts.map → typescript-CXP7Oa6_.d.cts.map} +1 -1
- package/dist/{typescript-o4AsClkT.d.cts → typescript-DvynKONm.d.mts} +1 -1
- package/dist/{typescript-o4AsClkT.d.cts.map → typescript-DvynKONm.d.mts.map} +1 -1
- package/dist/{typescript-file-0czkIl79.d.mts → typescript-file--NT6aFEW.d.cts} +3 -3
- package/dist/{typescript-file-0czkIl79.d.mts.map → typescript-file--NT6aFEW.d.cts.map} +1 -1
- package/dist/{typescript-file-C-RWh7Rs.d.cts → typescript-file-BqamPJcI.d.cts} +3 -3
- package/dist/{typescript-file-C-RWh7Rs.d.cts.map → typescript-file-BqamPJcI.d.cts.map} +1 -1
- package/dist/{typescript-file-DiviCaz7.d.mts → typescript-file-D-HdSyYk.d.mts} +3 -3
- package/dist/{typescript-file-DiviCaz7.d.mts.map → typescript-file-D-HdSyYk.d.mts.map} +1 -1
- package/dist/{typescript-file-odbZ3nmj.cjs → typescript-file-D8ACLdIR.cjs} +3 -3
- package/dist/{typescript-file-Bzq0aO_g.mjs → typescript-file-DJy5gCL9.mjs} +4 -4
- package/dist/{typescript-file-Bzq0aO_g.mjs.map → typescript-file-DJy5gCL9.mjs.map} +1 -1
- package/dist/typescript-file-dsHm_Y5Y.d.mts +50 -0
- package/dist/typescript-file-dsHm_Y5Y.d.mts.map +1 -0
- package/dist/{typescript-interface-BJ2W6gOm.d.cts → typescript-interface-BowohfN5.d.cts} +5 -5
- package/dist/{typescript-interface-BJ2W6gOm.d.cts.map → typescript-interface-BowohfN5.d.cts.map} +1 -1
- package/dist/{typescript-interface-B2rJA0gm.mjs → typescript-interface-CGQ0pwib.mjs} +3 -3
- package/dist/{typescript-interface-B2rJA0gm.mjs.map → typescript-interface-CGQ0pwib.mjs.map} +1 -1
- package/dist/{typescript-interface-D-d9A720.d.cts → typescript-interface-CTyDcMdt.d.mts} +3 -3
- package/dist/{typescript-interface-D-d9A720.d.cts.map → typescript-interface-CTyDcMdt.d.mts.map} +1 -1
- package/dist/{typescript-interface-Dw6ipytu.d.mts → typescript-interface-DX0WJLCa.d.mts} +5 -5
- package/dist/{typescript-interface-Dw6ipytu.d.mts.map → typescript-interface-DX0WJLCa.d.mts.map} +1 -1
- package/dist/{typescript-interface-u4YOLTZc.d.mts → typescript-interface-Dgb7nslV.d.cts} +3 -3
- package/dist/{typescript-interface-u4YOLTZc.d.mts.map → typescript-interface-Dgb7nslV.d.cts.map} +1 -1
- package/dist/{typescript-interface-B9-Hgjyf.cjs → typescript-interface-Q4trMyzm.cjs} +2 -2
- package/dist/{typescript-object-CjpLosiL.mjs → typescript-object-B0R92yL7.mjs} +3 -3
- package/dist/{typescript-object-CjpLosiL.mjs.map → typescript-object-B0R92yL7.mjs.map} +1 -1
- package/dist/{typescript-object-BTbZzEqH.d.mts → typescript-object-BBu0DpsG.d.cts} +3 -3
- package/dist/{typescript-object-BTbZzEqH.d.mts.map → typescript-object-BBu0DpsG.d.cts.map} +1 -1
- package/dist/{typescript-object-BeOdGrgq.d.cts → typescript-object-D3gccyfV.d.cts} +5 -5
- package/dist/{typescript-object-v1WiBD8W.d.cts.map → typescript-object-D3gccyfV.d.cts.map} +1 -1
- package/dist/{typescript-object-BVzjq01J.cjs → typescript-object-DHFnCfRa.cjs} +2 -2
- package/dist/{typescript-object-CSlztYKM.d.mts → typescript-object-DK3sl8cB.d.mts} +2 -2
- package/dist/{typescript-object-BeOdGrgq.d.cts.map → typescript-object-DK3sl8cB.d.mts.map} +1 -1
- package/dist/{typescript-object-v1WiBD8W.d.cts → typescript-object-L2Zn4zbB.d.mts} +3 -3
- package/dist/{typescript-object-CSlztYKM.d.mts.map → typescript-object-L2Zn4zbB.d.mts.map} +1 -1
- package/package.json +20 -6
- package/dist/context-CdtkDo_j.d.cts +0 -72
- package/dist/context-CdtkDo_j.d.cts.map +0 -1
- package/dist/context-DAfWJCa9.mjs.map +0 -1
- package/dist/context-uUfYcg-_.d.mts +0 -72
- package/dist/context-uUfYcg-_.d.mts.map +0 -1
- package/dist/dynamic-import-statement-C5uIfUk9.d.cts +0 -33
- package/dist/dynamic-import-statement-O1WueHgS.d.mts.map +0 -1
- package/dist/dynamic-import-statement-SPYQPFtB.d.mts +0 -33
- package/dist/dynamic-import-statement-SPYQPFtB.d.mts.map +0 -1
- package/dist/front-matter-Cp971E26.d.cts +0 -16
- package/dist/front-matter-Cp971E26.d.cts.map +0 -1
- package/dist/markdown-file-CfI5rBqC.d.cts.map +0 -1
- package/dist/markdown-table-O1wIj_h2.d.cts +0 -28
- package/dist/markdown-table-xO7WrAmK.d.mts.map +0 -1
- package/dist/output-7KuLjL1Z.d.mts.map +0 -1
- package/dist/output-C_XWpqr8.mjs +0 -43
- package/dist/output-C_XWpqr8.mjs.map +0 -1
- package/dist/output-DWAO1J8V.d.cts.map +0 -1
- package/dist/output-cm5u8ERz.d.mts.map +0 -1
- package/dist/refkey-Bf_2_U5t.d.cts.map +0 -1
- package/dist/refkey-Cebk8ksG.d.mts.map +0 -1
- package/dist/single-line-comment-i_GFqXcl.d.mts +0 -23
- package/dist/single-line-comment-i_GFqXcl.d.mts.map +0 -1
- package/dist/source-file-DwSKCa6M.mjs.map +0 -1
- /package/dist/{capnp-DuTkJ3G2.cjs → capnp-ClfqI-5t.cjs} +0 -0
- /package/dist/{components-Cvpo9IEL.cjs → components-BNK9p5AE.cjs} +0 -0
- /package/dist/{components-Cx5QvLGH.cjs → components-BYyc8-6U.cjs} +0 -0
- /package/dist/{components-0Z89eZqr.mjs → components-ByryZacA.mjs} +0 -0
- /package/dist/{components-5QUrDl5Y.mjs → components-C3qpgLKV.mjs} +0 -0
- /package/dist/{components-DJIkeVYh.cjs → components-DPKSrvP-.cjs} +0 -0
- /package/dist/{components-Gg416Czx.cjs → components-ISRFDWTF.cjs} +0 -0
- /package/dist/{components-Ch_xVY03.mjs → components-NXgsRgB4.mjs} +0 -0
- /package/dist/{components-DTKCKgWS.mjs → components-pztyf7qk.mjs} +0 -0
- /package/dist/{contexts-CQodwyrp.mjs → contexts-D-vYhGdM.mjs} +0 -0
- /package/dist/{contexts-B4a3JUTV.cjs → contexts-Do5bLA7f.cjs} +0 -0
- /package/dist/{contexts-DzdhIC7G.cjs → contexts-J643Nrrt.cjs} +0 -0
- /package/dist/{contexts-d0vn6-x6.mjs → contexts-oubuaPo0.mjs} +0 -0
- /package/dist/{create-builtin-Cod_Sqfx.cjs → create-builtin-BiKyN2s2.cjs} +0 -0
- /package/dist/{dynamic-import-statement-BVoYkTzN.cjs → dynamic-import-statement-Dy_MY_Ua.cjs} +0 -0
- /package/dist/{front-matter-BlhvOTm6.cjs → front-matter-DZ1tB-Uj.cjs} +0 -0
- /package/dist/{index-0-W_aPej.d.mts → index-BJ8-FA6N.d.cts} +0 -0
- /package/dist/{index-B-Y-ZG2x.d.mts → index-BXpMZvwA.d.cts} +0 -0
- /package/dist/{index-BH1nuHdZ.d.cts → index-BhY1qu3m.d.cts} +0 -0
- /package/dist/{index-BUYyA1Xh.d.cts → index-BjgW3E7y.d.mts} +0 -0
- /package/dist/{index-C6yvNuzO.d.cts → index-C3usUse7.d.mts} +0 -0
- /package/dist/{index-CTHojwxd.d.mts → index-D13oYj4_.d.mts} +0 -0
- /package/dist/{index-CjDodOH2.d.mts → index-DBGd4WeR.d.mts} +0 -0
- /package/dist/{index-CrhZaFgN.d.cts → index-DdxxIAKU.d.cts} +0 -0
- /package/dist/{index-DcDTDbdz.d.cts → index-DpEKQcoR.d.cts} +0 -0
- /package/dist/{index-Jh0C5PIG.d.mts → index-gpCH5158.d.mts} +0 -0
- /package/dist/{markdown-table-DWfdg1my.cjs → markdown-table-BWPm6GbJ.cjs} +0 -0
- /package/dist/{plugin--l4YoZkf.cjs → plugin-B8wUxSXi.cjs} +0 -0
- /package/dist/{plugin-BHyL2r7r.mjs → plugin-BzF8Q2v1.mjs} +0 -0
- /package/dist/{record-expression-CC24cKiY.cjs → record-expression-6ElbFyR0.cjs} +0 -0
- /package/dist/{refkey-BLL_fer8.cjs → refkey-C08kDOQ0.cjs} +0 -0
- /package/dist/{reflection-DX-QT0Nx.cjs → reflection-BSrdR0Qz.cjs} +0 -0
- /package/dist/{single-line-comment-COZ9RWsm.cjs → single-line-comment-DvU69OGj.cjs} +0 -0
- /package/dist/{typescript-BzIvz7Cp.cjs → typescript-BbjCTT04.cjs} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { h as TypescriptFileImports, n as ComponentProps, p as SourceFileHeaderProps } from "./components-REdw2IIi.mjs";
|
|
2
|
+
import { n as SourceFileProps$1 } from "./source-file-YrHdUb8H.mjs";
|
|
3
|
+
import { Children } from "@alloy-js/core";
|
|
4
|
+
import { TSModuleScope } from "@alloy-js/typescript";
|
|
5
|
+
|
|
6
|
+
//#region src/typescript/components/typescript-file.d.ts
|
|
7
|
+
type TypescriptFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
|
|
8
|
+
hashbang?: Children | true;
|
|
9
|
+
header?: Children;
|
|
10
|
+
imports?: TypescriptFileImports;
|
|
11
|
+
builtinImports?: TypescriptFileImports;
|
|
12
|
+
export?: boolean | string;
|
|
13
|
+
tsx?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
17
|
+
*
|
|
18
|
+
* @param props - The properties for the source file.
|
|
19
|
+
* @returns The rendered source file component.
|
|
20
|
+
*/
|
|
21
|
+
declare function TypescriptFile(props: TypescriptFileProps): Children;
|
|
22
|
+
interface TypescriptFileHeaderProps extends SourceFileHeaderProps {
|
|
23
|
+
header?: Children;
|
|
24
|
+
hashbang?: Children | true;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
28
|
+
*
|
|
29
|
+
* @param props - The properties for the source file header.
|
|
30
|
+
* @returns The rendered source file header.
|
|
31
|
+
*/
|
|
32
|
+
declare function TypescriptFileHeader(props: TypescriptFileHeaderProps): Children;
|
|
33
|
+
interface TypescriptFileHeaderImportsProps extends SourceFileHeaderProps {
|
|
34
|
+
imports?: TypescriptFileImports;
|
|
35
|
+
builtinImports?: TypescriptFileImports;
|
|
36
|
+
scope?: TSModuleScope;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
40
|
+
*
|
|
41
|
+
* @param props - The properties for the source file header.
|
|
42
|
+
* @returns The rendered source file header.
|
|
43
|
+
*/
|
|
44
|
+
declare function TypescriptFileHeaderImports(props: TypescriptFileHeaderImportsProps): Children;
|
|
45
|
+
declare type __ΩTypescriptFileProps = any[];
|
|
46
|
+
declare type __ΩTypescriptFileHeaderProps = any[];
|
|
47
|
+
declare type __ΩTypescriptFileHeaderImportsProps = any[];
|
|
48
|
+
//#endregion
|
|
49
|
+
export { TypescriptFileHeaderProps as a, __ΩTypescriptFileHeaderProps as c, TypescriptFileHeaderImportsProps as i, __ΩTypescriptFileProps as l, TypescriptFileHeader as n, TypescriptFileProps as o, TypescriptFileHeaderImports as r, __ΩTypescriptFileHeaderImportsProps as s, TypescriptFile as t };
|
|
50
|
+
//# sourceMappingURL=typescript-file-dsHm_Y5Y.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-file-dsHm_Y5Y.d.mts","names":[],"sources":["../src/typescript/components/typescript-file.tsx"],"sourcesContent":[],"mappings":";;;;;;KAmDY,mBAAA,GAAsB,KAAK,iCACrC;aACa;EAFH,MAAA,CAAA,EAGC,QAHD;EAA2B,OAAA,CAAA,EAIzB,qBAJyB;EAAL,cAAA,CAAA,EAKb,qBALa;EAChC,MAAA,CAAA,EAAA,OAAA,GAAA,MAAA;EACa,GAAA,CAAA,EAAA,OAAA;CACF;;;;AAab;AAgEA;;AAEa,iBAlEG,cAAA,CAkEH,KAAA,EAlEyB,mBAkEzB,CAAA,EAlE4C,QAkE5C;AAFsC,UAAlC,yBAAA,SAAkC,qBAAA,CAAA;EAAqB,MAAA,CAAA,EAC7D,QAD6D;EAWxD,QAAA,CAAA,EATH,QASG,GAAA,IAAoB;AAuEpC;;;;;;AAYA;iBAnFgB,oBAAA,QAA4B,4BAAyB;UAuEpD,gCAAA,SAAyC;YAC9C;mBACO;UACT;;;;;;;;iBASM,2BAAA,QACP,mCAAgC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
2
|
-
import * as
|
|
1
|
+
import { n as ComponentProps } from "./components-DqfyRVFO.cjs";
|
|
2
|
+
import * as _alloy_js_core9 from "@alloy-js/core";
|
|
3
3
|
import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
|
|
4
4
|
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
5
5
|
|
|
@@ -14,13 +14,13 @@ interface TypescriptInterfacePropertyProps extends Omit<InterfaceMemberProps, "n
|
|
|
14
14
|
/**
|
|
15
15
|
* Generates a TypeScript interface for the given reflection class.
|
|
16
16
|
*/
|
|
17
|
-
declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>):
|
|
17
|
+
declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core9.Children;
|
|
18
18
|
/**
|
|
19
19
|
* Generates a TypeScript interface property for the given reflection class.
|
|
20
20
|
*/
|
|
21
|
-
declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps):
|
|
21
|
+
declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core9.Children;
|
|
22
22
|
declare type __ΩTypeScriptInterfaceProps = any[];
|
|
23
23
|
declare type __ΩTypescriptInterfacePropertyProps = any[];
|
|
24
24
|
//#endregion
|
|
25
25
|
export { __ΩTypeScriptInterfaceProps as a, TypescriptInterfacePropertyProps as i, TypeScriptInterfaceProps as n, __ΩTypescriptInterfacePropertyProps as o, TypescriptInterfaceProperty as r, TypeScriptInterface as t };
|
|
26
|
-
//# sourceMappingURL=typescript-interface-
|
|
26
|
+
//# sourceMappingURL=typescript-interface-BowohfN5.d.cts.map
|
package/dist/{typescript-interface-BJ2W6gOm.d.cts.map → typescript-interface-BowohfN5.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-interface-
|
|
1
|
+
{"version":3,"file":"typescript-interface-BowohfN5.d.cts","names":[],"sources":["../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,eAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,eAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ReflectionPropertyContext, t as ReflectionClassContext } from "./reflection-
|
|
2
|
-
import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-
|
|
1
|
+
import { i as ReflectionPropertyContext, t as ReflectionClassContext } from "./reflection-Btb1NqwS.mjs";
|
|
2
|
+
import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-BcTrWAwt.mjs";
|
|
3
3
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
4
|
import { For, computed, splitProps } from "@alloy-js/core";
|
|
5
5
|
import { stringifyType } from "@powerlines/deepkit/vendor/type";
|
|
@@ -69,4 +69,4 @@ function TypescriptInterfaceProperty(props) {
|
|
|
69
69
|
|
|
70
70
|
//#endregion
|
|
71
71
|
export { TypescriptInterfaceProperty as n, TypeScriptInterface as t };
|
|
72
|
-
//# sourceMappingURL=typescript-interface-
|
|
72
|
+
//# sourceMappingURL=typescript-interface-CGQ0pwib.mjs.map
|
package/dist/{typescript-interface-B2rJA0gm.mjs.map → typescript-interface-CGQ0pwib.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-interface-
|
|
1
|
+
{"version":3,"file":"typescript-interface-CGQ0pwib.mjs","names":["computed","For","splitProps","InterfaceDeclaration","InterfaceMember","stringifyType","pascalCase","isString","ReflectionClassContext","ReflectionPropertyContext","TSDocReflectionClass","TSDocReflectionProperty","TypeScriptInterface","props","name","reflection","doc","rest","interfaceName","toString","getName","properties","getProperties","filter","item","isIgnored","sort","a","b","isReadonly","getNameAsString","localeCompare","_$createComponent","Provider","value","children","heading","_$mergeProps","each","doubleHardline","semicolon","prop","TypescriptInterfaceProperty","property","readonly","optional","isOptional","nullish","isNullable","type","getType"],"sources":["../src/typescript/components/typescript-interface.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, For, splitProps } from \"@alloy-js/core\";\nimport {\n InterfaceDeclaration,\n InterfaceDeclarationProps,\n InterfaceMember,\n InterfaceMemberProps\n} from \"@alloy-js/typescript\";\nimport {\n ReflectionClass,\n ReflectionProperty,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport {\n ReflectionClassContext,\n ReflectionPropertyContext\n} from \"../../core/contexts/reflection\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n TSDocReflectionClass,\n TSDocReflectionProperty\n} from \"./tsdoc-reflection\";\n\nexport interface TypeScriptInterfaceProps<\n T extends Record<string, any> = Record<string, any>\n>\n extends InterfaceDeclarationProps, ComponentProps {\n reflection: ReflectionClass<T>;\n defaultValue?: Partial<T>;\n}\n\nexport interface TypescriptInterfacePropertyProps\n extends Omit<InterfaceMemberProps, \"name\">, ComponentProps {\n property: ReflectionProperty;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TypeScriptInterface<\n T extends Record<string, any> = Record<string, any>\n>(props: TypeScriptInterfaceProps<T>) {\n const [{ name, reflection, doc }, rest] = splitProps(props, [\n \"name\",\n \"reflection\",\n \"doc\"\n ]);\n\n const interfaceName = computed(() =>\n pascalCase(\n (isString(name) ? name : name.toString()) || reflection.getName()\n )\n );\n\n const properties = reflection\n .getProperties()\n .filter(item => !item.isIgnored())\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n );\n\n return (\n <ReflectionClassContext.Provider\n value={{\n reflection\n }}>\n <TSDocReflectionClass heading={doc} />\n <InterfaceDeclaration export={true} name={interfaceName.value} {...rest}>\n <For each={properties} doubleHardline={true} semicolon={true}>\n {prop => <TypescriptInterfaceProperty property={prop} />}\n </For>\n </InterfaceDeclaration>\n </ReflectionClassContext.Provider>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TypescriptInterfaceProperty(\n props: TypescriptInterfacePropertyProps\n) {\n const [{ property }, rest] = splitProps(props, [\"property\"]);\n\n return (\n <ReflectionPropertyContext.Provider value={property}>\n <TSDocReflectionProperty />\n <InterfaceMember\n name={property.getNameAsString()}\n readonly={property.isReadonly()}\n optional={property.isOptional()}\n nullish={property.isNullable()}\n type={stringifyType(property.getType())}\n {...rest}\n />\n </ReflectionPropertyContext.Provider>\n );\n}\n"],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
1
|
+
import { n as ComponentProps } from "./components-REdw2IIi.mjs";
|
|
2
2
|
import * as _alloy_js_core10 from "@alloy-js/core";
|
|
3
|
-
import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
|
|
4
3
|
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
|
+
import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/typescript-interface.d.ts
|
|
7
7
|
interface TypeScriptInterfaceProps<T extends Record<string, any> = Record<string, any>> extends InterfaceDeclarationProps, ComponentProps {
|
|
@@ -23,4 +23,4 @@ declare type __ΩTypeScriptInterfaceProps = any[];
|
|
|
23
23
|
declare type __ΩTypescriptInterfacePropertyProps = any[];
|
|
24
24
|
//#endregion
|
|
25
25
|
export { __ΩTypeScriptInterfaceProps as a, TypescriptInterfacePropertyProps as i, TypeScriptInterfaceProps as n, __ΩTypescriptInterfacePropertyProps as o, TypescriptInterfaceProperty as r, TypeScriptInterface as t };
|
|
26
|
-
//# sourceMappingURL=typescript-interface-
|
|
26
|
+
//# sourceMappingURL=typescript-interface-CTyDcMdt.d.mts.map
|
package/dist/{typescript-interface-D-d9A720.d.cts.map → typescript-interface-CTyDcMdt.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-interface-
|
|
1
|
+
{"version":3,"file":"typescript-interface-CTyDcMdt.d.mts","names":[],"sources":["../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,gBAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,gBAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
2
|
-
import * as
|
|
1
|
+
import { n as ComponentProps } from "./components-REdw2IIi.mjs";
|
|
2
|
+
import * as _alloy_js_core8 from "@alloy-js/core";
|
|
3
3
|
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
4
|
import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
|
|
5
5
|
|
|
@@ -14,13 +14,13 @@ interface TypescriptInterfacePropertyProps extends Omit<InterfaceMemberProps, "n
|
|
|
14
14
|
/**
|
|
15
15
|
* Generates a TypeScript interface for the given reflection class.
|
|
16
16
|
*/
|
|
17
|
-
declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>):
|
|
17
|
+
declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core8.Children;
|
|
18
18
|
/**
|
|
19
19
|
* Generates a TypeScript interface property for the given reflection class.
|
|
20
20
|
*/
|
|
21
|
-
declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps):
|
|
21
|
+
declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core8.Children;
|
|
22
22
|
declare type __ΩTypeScriptInterfaceProps = any[];
|
|
23
23
|
declare type __ΩTypescriptInterfacePropertyProps = any[];
|
|
24
24
|
//#endregion
|
|
25
25
|
export { __ΩTypeScriptInterfaceProps as a, TypescriptInterfacePropertyProps as i, TypeScriptInterfaceProps as n, __ΩTypescriptInterfacePropertyProps as o, TypescriptInterfaceProperty as r, TypeScriptInterface as t };
|
|
26
|
-
//# sourceMappingURL=typescript-interface-
|
|
26
|
+
//# sourceMappingURL=typescript-interface-DX0WJLCa.d.mts.map
|
package/dist/{typescript-interface-Dw6ipytu.d.mts.map → typescript-interface-DX0WJLCa.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-interface-
|
|
1
|
+
{"version":3,"file":"typescript-interface-DX0WJLCa.d.mts","names":[],"sources":["../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,eAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,eAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
1
|
+
import { n as ComponentProps } from "./components-DqfyRVFO.cjs";
|
|
2
2
|
import * as _alloy_js_core10 from "@alloy-js/core";
|
|
3
|
-
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
3
|
import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
|
|
4
|
+
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/typescript-interface.d.ts
|
|
7
7
|
interface TypeScriptInterfaceProps<T extends Record<string, any> = Record<string, any>> extends InterfaceDeclarationProps, ComponentProps {
|
|
@@ -23,4 +23,4 @@ declare type __ΩTypeScriptInterfaceProps = any[];
|
|
|
23
23
|
declare type __ΩTypescriptInterfacePropertyProps = any[];
|
|
24
24
|
//#endregion
|
|
25
25
|
export { __ΩTypeScriptInterfaceProps as a, TypescriptInterfacePropertyProps as i, TypeScriptInterfaceProps as n, __ΩTypescriptInterfacePropertyProps as o, TypescriptInterfaceProperty as r, TypeScriptInterface as t };
|
|
26
|
-
//# sourceMappingURL=typescript-interface-
|
|
26
|
+
//# sourceMappingURL=typescript-interface-Dgb7nslV.d.cts.map
|
package/dist/{typescript-interface-u4YOLTZc.d.mts.map → typescript-interface-Dgb7nslV.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-interface-
|
|
1
|
+
{"version":3,"file":"typescript-interface-Dgb7nslV.d.cts","names":[],"sources":["../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,gBAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,gBAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
-
const require_reflection = require('./reflection-
|
|
3
|
-
const require_tsdoc_reflection = require('./tsdoc-reflection-
|
|
2
|
+
const require_reflection = require('./reflection-BSrdR0Qz.cjs');
|
|
3
|
+
const require_tsdoc_reflection = require('./tsdoc-reflection-Cov5Qh1c.cjs');
|
|
4
4
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
5
|
let __alloy_js_core = require("@alloy-js/core");
|
|
6
6
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ReflectionPropertyContext, t as ReflectionClassContext } from "./reflection-
|
|
2
|
-
import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-
|
|
1
|
+
import { i as ReflectionPropertyContext, t as ReflectionClassContext } from "./reflection-Btb1NqwS.mjs";
|
|
2
|
+
import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-BcTrWAwt.mjs";
|
|
3
3
|
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
4
4
|
import { Declaration, For, Name, Show, computed, createSymbolSlot, splitProps } from "@alloy-js/core";
|
|
5
5
|
import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
|
|
@@ -121,4 +121,4 @@ function TypescriptObjectProperty(props) {
|
|
|
121
121
|
|
|
122
122
|
//#endregion
|
|
123
123
|
export { TypescriptObjectProperty as n, TypescriptObject as t };
|
|
124
|
-
//# sourceMappingURL=typescript-object-
|
|
124
|
+
//# sourceMappingURL=typescript-object-B0R92yL7.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-object-
|
|
1
|
+
{"version":3,"file":"typescript-object-B0R92yL7.mjs","names":["computed","Declaration","CoreDeclaration","createSymbolSlot","For","Name","Show","splitProps","createValueSymbol","ObjectExpression","ObjectProperty","TSSymbolFlags","TypeRefContext","useTSNamePolicy","stringifyDefaultValue","camelCase","pascalCase","isString","isUndefined","ReflectionClassContext","ReflectionPropertyContext","TSDocReflectionClass","TSDocReflectionProperty","TypescriptObject","props","reflection","value","objectName","name","toString","getName","objectType","type","properties","getProperties","filter","item","isIgnored","defaultValue","getNameAsString","getAlias","reduce","ret","alias","undefined","getDefaultValue","sort","a","b","isReadonly","localeCompare","TypeSymbolSlot","ValueTypeSymbolSlot","sym","refkeys","refkey","default","export","metadata","tsFlags","nullish","Nullish","None","firstSymbol","namePolicy","for","moveMembersTo","keyword","var","let","_$createComponent","children","when","Provider","override","symbol","_$memo","initializer","each","comma","doubleHardline","prop","TypescriptObjectProperty","property","_$createIntrinsic"],"sources":["../src/typescript/components/typescript-object.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n computed,\n Declaration as CoreDeclaration,\n createSymbolSlot,\n For,\n Name,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n createValueSymbol,\n ObjectExpression,\n ObjectProperty,\n TSSymbolFlags,\n TypeRefContext,\n useTSNamePolicy,\n VarDeclarationProps\n} from \"@alloy-js/typescript\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport type {\n ReflectionClass,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport {\n ReflectionClassContext,\n ReflectionPropertyContext\n} from \"../../core/contexts/reflection\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n TSDocReflectionClass,\n TSDocReflectionProperty\n} from \"./tsdoc-reflection\";\n\nexport interface ComputedRef<T = any> {\n readonly value: T;\n}\n\nexport interface TypescriptObjectProps<\n T extends Record<string, any> = Record<string, any>\n> extends VarDeclarationProps {\n reflection?: ComputedRef<ReflectionClass<T>>;\n defaultValue?: ComputedRef<Partial<T> | undefined>;\n}\n\nexport interface TypescriptObjectPropertyProps extends ComponentProps {\n property: ReflectionProperty;\n}\n\n/**\n * Generates a TypeScript object for the given reflection class.\n */\nexport function TypescriptObject<\n T extends Record<string, any> = Record<string, any>\n>(props: TypescriptObjectProps<T>) {\n if (!props.reflection?.value) {\n return null;\n }\n\n const objectName = computed(() =>\n camelCase(\n (isString(props.name) ? props.name : props.name.toString()) ||\n props.reflection!.value.getName()\n )\n );\n const objectType = computed(\n () => props.type || pascalCase(props.reflection!.value.getName())\n );\n const properties = computed(() =>\n props\n .reflection!.value.getProperties()\n .filter(\n item =>\n !item.isIgnored() &&\n !isUndefined(\n props.defaultValue?.value?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined(\n (props.defaultValue as Record<string, any>)?.value?.[alias]\n )\n ) {\n return (props.defaultValue as Record<string, any>)?.value?.[\n alias\n ];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )\n )\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) ||\n (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n )\n );\n\n const TypeSymbolSlot = createSymbolSlot();\n const ValueTypeSymbolSlot = createSymbolSlot();\n const sym = createValueSymbol(props.name, {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: props.nullish ? TSSymbolFlags.Nullish : TSSymbolFlags.None,\n type: props.type ? TypeSymbolSlot.firstSymbol : undefined,\n namePolicy: useTSNamePolicy().for(\"variable\")\n });\n\n if (!props.type) {\n ValueTypeSymbolSlot.moveMembersTo(sym);\n }\n\n const keyword = props.var ? \"var\" : props.let ? \"let\" : \"const\";\n const type = props.type ? (\n <TypeRefContext>\n : <TypeSymbolSlot>{props.type}</TypeSymbolSlot>\n </TypeRefContext>\n ) : undefined;\n\n return (\n <Show when={!!props.reflection.value}>\n <ReflectionClassContext.Provider\n value={{\n reflection: props.reflection.value as ReflectionClass<any>,\n override: {\n name: objectName.value,\n type: objectType.value,\n defaultValue: props.defaultValue?.value\n }\n }}>\n <Show when={!!objectName.value && !!objectType.value}>\n <TSDocReflectionClass />\n <CoreDeclaration symbol={sym}>\n {props.export ? \"export \" : \"\"}\n {props.default ? \"default \" : \"\"}\n {keyword} <Name />\n {type} ={\" \"}\n <ValueTypeSymbolSlot>\n {props.initializer ?? props.children ?? (\n <ObjectExpression>\n <For\n each={properties.value ?? []}\n comma={true}\n doubleHardline={true}>\n {prop => <TypescriptObjectProperty property={prop} />}\n </For>\n </ObjectExpression>\n )}\n </ValueTypeSymbolSlot>\n </CoreDeclaration>\n </Show>\n <hbr />\n </ReflectionClassContext.Provider>\n </Show>\n );\n}\n\n/**\n * Generates a TypeScript object property for the given reflection class.\n */\nexport function TypescriptObjectProperty(props: TypescriptObjectPropertyProps) {\n const [{ property }] = splitProps(props, [\"property\"]);\n\n return (\n <ReflectionPropertyContext.Provider value={property}>\n <TSDocReflectionProperty />\n <ObjectProperty\n name={property.getNameAsString()}\n value={stringifyDefaultValue(property)}\n />\n <hbr />\n </ReflectionPropertyContext.Provider>\n );\n}\n"],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
1
|
+
import { n as ComponentProps } from "./components-DqfyRVFO.cjs";
|
|
2
2
|
import * as _alloy_js_core8 from "@alloy-js/core";
|
|
3
|
-
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
3
|
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
4
|
+
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/typescript-object.d.ts
|
|
7
7
|
interface ComputedRef<T = any> {
|
|
@@ -27,4 +27,4 @@ declare type __ΩTypescriptObjectProps = any[];
|
|
|
27
27
|
declare type __ΩTypescriptObjectPropertyProps = any[];
|
|
28
28
|
//#endregion
|
|
29
29
|
export { TypescriptObjectProps as a, __ΩTypescriptObjectProps as c, TypescriptObjectPropertyProps as i, TypescriptObject as n, __ΩComputedRef as o, TypescriptObjectProperty as r, __ΩTypescriptObjectPropertyProps as s, ComputedRef as t };
|
|
30
|
-
//# sourceMappingURL=typescript-object-
|
|
30
|
+
//# sourceMappingURL=typescript-object-BBu0DpsG.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-object-
|
|
1
|
+
{"version":3,"file":"typescript-object-BBu0DpsG.d.cts","names":[],"sources":["../src/typescript/components/typescript-object.tsx"],"sourcesContent":[],"mappings":";;;;;;UAuDiB;kBACC;;AADD,UAIA,qBAHE,CAAA,UAIP,MAJO,CAAA,MAAA,EAAA,GAAA,CAAA,GAIe,MAJf,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,SAKT,mBALS,CAAA;EAGF,UAAA,CAAA,EAGF,WAHuB,CAGX,eAHW,CAGK,CAHL,CAAA,CAAA;EAC1B,YAAA,CAAA,EAGK,WAHL,CAGiB,OAHjB,CAGyB,CAHzB,CAAA,GAAA,SAAA,CAAA;;AAE+B,UAI1B,6BAAA,SAAsC,cAJZ,CAAA;EAAhB,QAAA,EAKf,kBALe;;;;;AADjB,iBAYM,gBAZN,CAAA,UAaE,MAbF,CAAA,MAAA,EAAA,GAAA,CAAA,GAawB,MAbxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAcD,qBAdC,CAcqB,CAdrB,CAAA,CAAA,EAcoB,eAAA,CAAG,QAdvB;;AAKV;AAOA;AACY,iBAkHI,wBAAA,CAlHJ,KAAA,EAkHoC,6BAlHpC,CAAA,EAkHiE,eAAA,CAAA,QAlHjE;AAAsB,8BAAA,GAAA,EAAA;AACH,wCAAA,GAAA,EAAA;AAAtB,gDAAA,GAAA,EAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
2
|
-
import * as
|
|
1
|
+
import { n as ComponentProps } from "./components-DqfyRVFO.cjs";
|
|
2
|
+
import * as _alloy_js_core7 from "@alloy-js/core";
|
|
3
3
|
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
4
4
|
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
5
5
|
|
|
@@ -17,14 +17,14 @@ interface TypescriptObjectPropertyProps extends ComponentProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* Generates a TypeScript object for the given reflection class.
|
|
19
19
|
*/
|
|
20
|
-
declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>):
|
|
20
|
+
declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>): _alloy_js_core7.Children;
|
|
21
21
|
/**
|
|
22
22
|
* Generates a TypeScript object property for the given reflection class.
|
|
23
23
|
*/
|
|
24
|
-
declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps):
|
|
24
|
+
declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps): _alloy_js_core7.Children;
|
|
25
25
|
declare type __ΩComputedRef = any[];
|
|
26
26
|
declare type __ΩTypescriptObjectProps = any[];
|
|
27
27
|
declare type __ΩTypescriptObjectPropertyProps = any[];
|
|
28
28
|
//#endregion
|
|
29
29
|
export { TypescriptObjectProps as a, __ΩTypescriptObjectProps as c, TypescriptObjectPropertyProps as i, TypescriptObject as n, __ΩComputedRef as o, TypescriptObjectProperty as r, __ΩTypescriptObjectPropertyProps as s, ComputedRef as t };
|
|
30
|
-
//# sourceMappingURL=typescript-object-
|
|
30
|
+
//# sourceMappingURL=typescript-object-D3gccyfV.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-object-
|
|
1
|
+
{"version":3,"file":"typescript-object-D3gccyfV.d.cts","names":[],"sources":["../src/typescript/components/typescript-object.tsx"],"sourcesContent":[],"mappings":";;;;;;UAuDiB;kBACC;;AADD,UAIA,qBAHE,CAAA,UAIP,MAJO,CAAA,MAAA,EAAA,GAAA,CAAA,GAIe,MAJf,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,SAKT,mBALS,CAAA;EAGF,UAAA,CAAA,EAGF,WAHuB,CAGX,eAHW,CAGK,CAHL,CAAA,CAAA;EAC1B,YAAA,CAAA,EAGK,WAHL,CAGiB,OAHjB,CAGyB,CAHzB,CAAA,GAAA,SAAA,CAAA;;AAE+B,UAI1B,6BAAA,SAAsC,cAJZ,CAAA;EAAhB,QAAA,EAKf,kBALe;;;;;AADjB,iBAYM,gBAZN,CAAA,UAaE,MAbF,CAAA,MAAA,EAAA,GAAA,CAAA,GAawB,MAbxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAcD,qBAdC,CAcqB,CAdrB,CAAA,CAAA,EAcoB,eAAA,CAAG,QAdvB;;AAKV;AAOA;AACY,iBAkHI,wBAAA,CAlHJ,KAAA,EAkHoC,6BAlHpC,CAAA,EAkHiE,eAAA,CAAA,QAlHjE;AAAsB,8BAAA,GAAA,EAAA;AACH,wCAAA,GAAA,EAAA;AAAtB,gDAAA,GAAA,EAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
-
const require_reflection = require('./reflection-
|
|
3
|
-
const require_tsdoc_reflection = require('./tsdoc-reflection-
|
|
2
|
+
const require_reflection = require('./reflection-BSrdR0Qz.cjs');
|
|
3
|
+
const require_tsdoc_reflection = require('./tsdoc-reflection-Cov5Qh1c.cjs');
|
|
4
4
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
5
|
let __alloy_js_core = require("@alloy-js/core");
|
|
6
6
|
let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
1
|
+
import { n as ComponentProps } from "./components-REdw2IIi.mjs";
|
|
2
2
|
import * as _alloy_js_core10 from "@alloy-js/core";
|
|
3
3
|
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
4
|
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
@@ -27,4 +27,4 @@ declare type __ΩTypescriptObjectProps = any[];
|
|
|
27
27
|
declare type __ΩTypescriptObjectPropertyProps = any[];
|
|
28
28
|
//#endregion
|
|
29
29
|
export { TypescriptObjectProps as a, __ΩTypescriptObjectProps as c, TypescriptObjectPropertyProps as i, TypescriptObject as n, __ΩComputedRef as o, TypescriptObjectProperty as r, __ΩTypescriptObjectPropertyProps as s, ComputedRef as t };
|
|
30
|
-
//# sourceMappingURL=typescript-object-
|
|
30
|
+
//# sourceMappingURL=typescript-object-DK3sl8cB.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-object-
|
|
1
|
+
{"version":3,"file":"typescript-object-DK3sl8cB.d.mts","names":[],"sources":["../src/typescript/components/typescript-object.tsx"],"sourcesContent":[],"mappings":";;;;;;UAuDiB;kBACC;;AADD,UAIA,qBAHE,CAAA,UAIP,MAJO,CAAA,MAAA,EAAA,GAAA,CAAA,GAIe,MAJf,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,SAKT,mBALS,CAAA;EAGF,UAAA,CAAA,EAGF,WAHuB,CAGX,eAHW,CAGK,CAHL,CAAA,CAAA;EAC1B,YAAA,CAAA,EAGK,WAHL,CAGiB,OAHjB,CAGyB,CAHzB,CAAA,GAAA,SAAA,CAAA;;AAE+B,UAI1B,6BAAA,SAAsC,cAJZ,CAAA;EAAhB,QAAA,EAKf,kBALe;;;;;AADjB,iBAYM,gBAZN,CAAA,UAaE,MAbF,CAAA,MAAA,EAAA,GAAA,CAAA,GAawB,MAbxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAcD,qBAdC,CAcqB,CAdrB,CAAA,CAAA,EAcoB,gBAAA,CAAG,QAdvB;;AAKV;AAOA;AACY,iBAkHI,wBAAA,CAlHJ,KAAA,EAkHoC,6BAlHpC,CAAA,EAkHiE,gBAAA,CAAA,QAlHjE;AAAsB,8BAAA,GAAA,EAAA;AACH,wCAAA,GAAA,EAAA;AAAtB,gDAAA,GAAA,EAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as ComponentProps } from "./components-
|
|
1
|
+
import { n as ComponentProps } from "./components-REdw2IIi.mjs";
|
|
2
2
|
import * as _alloy_js_core8 from "@alloy-js/core";
|
|
3
|
-
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
4
3
|
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
|
+
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/typescript-object.d.ts
|
|
7
7
|
interface ComputedRef<T = any> {
|
|
@@ -27,4 +27,4 @@ declare type __ΩTypescriptObjectProps = any[];
|
|
|
27
27
|
declare type __ΩTypescriptObjectPropertyProps = any[];
|
|
28
28
|
//#endregion
|
|
29
29
|
export { TypescriptObjectProps as a, __ΩTypescriptObjectProps as c, TypescriptObjectPropertyProps as i, TypescriptObject as n, __ΩComputedRef as o, TypescriptObjectProperty as r, __ΩTypescriptObjectPropertyProps as s, ComputedRef as t };
|
|
30
|
-
//# sourceMappingURL=typescript-object-
|
|
30
|
+
//# sourceMappingURL=typescript-object-L2Zn4zbB.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-object-
|
|
1
|
+
{"version":3,"file":"typescript-object-L2Zn4zbB.d.mts","names":[],"sources":["../src/typescript/components/typescript-object.tsx"],"sourcesContent":[],"mappings":";;;;;;UAuDiB;kBACC;;AADD,UAIA,qBAHE,CAAA,UAIP,MAJO,CAAA,MAAA,EAAA,GAAA,CAAA,GAIe,MAJf,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,SAKT,mBALS,CAAA;EAGF,UAAA,CAAA,EAGF,WAHuB,CAGX,eAHW,CAGK,CAHL,CAAA,CAAA;EAC1B,YAAA,CAAA,EAGK,WAHL,CAGiB,OAHjB,CAGyB,CAHzB,CAAA,GAAA,SAAA,CAAA;;AAE+B,UAI1B,6BAAA,SAAsC,cAJZ,CAAA;EAAhB,QAAA,EAKf,kBALe;;;;;AADjB,iBAYM,gBAZN,CAAA,UAaE,MAbF,CAAA,MAAA,EAAA,GAAA,CAAA,GAawB,MAbxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAcD,qBAdC,CAcqB,CAdrB,CAAA,CAAA,EAcoB,eAAA,CAAG,QAdvB;;AAKV;AAOA;AACY,iBAkHI,wBAAA,CAlHJ,KAAA,EAkHoC,6BAlHpC,CAAA,EAkHiE,eAAA,CAAA,QAlHjE;AAAsB,8BAAA,GAAA,EAAA;AACH,wCAAA,GAAA,EAAA;AAAtB,gDAAA,GAAA,EAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-alloy",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing various Alloy framework components and helper utilities.",
|
|
6
6
|
"repository": {
|
|
@@ -153,6 +153,20 @@
|
|
|
153
153
|
"default": "./dist/core/contexts/context.mjs"
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
|
+
"./core/contexts/meta": {
|
|
157
|
+
"require": {
|
|
158
|
+
"types": "./dist/core/contexts/meta.d.cts",
|
|
159
|
+
"default": "./dist/core/contexts/meta.cjs"
|
|
160
|
+
},
|
|
161
|
+
"import": {
|
|
162
|
+
"types": "./dist/core/contexts/meta.d.mts",
|
|
163
|
+
"default": "./dist/core/contexts/meta.mjs"
|
|
164
|
+
},
|
|
165
|
+
"default": {
|
|
166
|
+
"types": "./dist/core/contexts/meta.d.mts",
|
|
167
|
+
"default": "./dist/core/contexts/meta.mjs"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
156
170
|
"./core/contexts/reflection": {
|
|
157
171
|
"require": {
|
|
158
172
|
"types": "./dist/core/contexts/reflection.d.cts",
|
|
@@ -544,8 +558,8 @@
|
|
|
544
558
|
"@alloy-js/markdown": "^0.22.0",
|
|
545
559
|
"@alloy-js/rollup-plugin": "^0.1.0",
|
|
546
560
|
"@alloy-js/typescript": "^0.22.0",
|
|
547
|
-
"@powerlines/deepkit": "^0.6.
|
|
548
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
561
|
+
"@powerlines/deepkit": "^0.6.25",
|
|
562
|
+
"@powerlines/plugin-babel": "^0.12.254",
|
|
549
563
|
"@storm-software/config-tools": "^1.189.0",
|
|
550
564
|
"@stryke/capnp": "^0.12.64",
|
|
551
565
|
"@stryke/convert": "^0.6.37",
|
|
@@ -558,14 +572,14 @@
|
|
|
558
572
|
"@stryke/types": "^0.10.36",
|
|
559
573
|
"@stryke/unique-id": "^0.3.50",
|
|
560
574
|
"defu": "^6.1.4",
|
|
561
|
-
"powerlines": "^0.38.
|
|
575
|
+
"powerlines": "^0.38.12",
|
|
562
576
|
"prettier": "^3.8.1",
|
|
563
577
|
"unctx": "^2.5.0"
|
|
564
578
|
},
|
|
565
579
|
"devDependencies": {
|
|
566
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
580
|
+
"@powerlines/plugin-plugin": "^0.12.196",
|
|
567
581
|
"@types/node": "^24.10.9"
|
|
568
582
|
},
|
|
569
583
|
"publishConfig": { "access": "public" },
|
|
570
|
-
"gitHead": "
|
|
584
|
+
"gitHead": "88803dd52e1cf64679d36eb93edaf56a2f80a8ef"
|
|
571
585
|
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
import { PluginContext } from "powerlines/types/context";
|
|
3
|
-
import { StoragePreset } from "powerlines/types/fs";
|
|
4
|
-
|
|
5
|
-
//#region src/core/contexts/context.d.ts
|
|
6
|
-
interface MetaItem {
|
|
7
|
-
/**
|
|
8
|
-
* The kind of metadata item.
|
|
9
|
-
*/
|
|
10
|
-
kind?: "builtin" | "entry" | string;
|
|
11
|
-
/**
|
|
12
|
-
* Whether to skip formatting for this output.
|
|
13
|
-
*/
|
|
14
|
-
skipFormat?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* The storage preset or adapter name for the output files.
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
20
|
-
*/
|
|
21
|
-
storage?: StoragePreset | string;
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}
|
|
24
|
-
interface PowerlinesContextInterface<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>> {
|
|
25
|
-
/**
|
|
26
|
-
* The current Powerlines context.
|
|
27
|
-
*/
|
|
28
|
-
value: TContext;
|
|
29
|
-
/**
|
|
30
|
-
* The current render metadata.
|
|
31
|
-
*/
|
|
32
|
-
meta: TMeta;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The Powerlines context used in template rendering.
|
|
36
|
-
*/
|
|
37
|
-
declare const PowerlinesContext: ComponentContext<PowerlinesContextInterface<any, any>>;
|
|
38
|
-
/**
|
|
39
|
-
* Hook to access the Powerlines Context.
|
|
40
|
-
*
|
|
41
|
-
* @returns The Context.
|
|
42
|
-
*/
|
|
43
|
-
declare function usePowerlinesContext<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(): PowerlinesContextInterface<TContext, TMeta> | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Hook to safely access the {@link PluginContext | Powerlines context}.
|
|
46
|
-
*
|
|
47
|
-
* @returns The Powerlines context or undefined if not set.
|
|
48
|
-
*/
|
|
49
|
-
declare function usePowerlinesSafe<TContext extends PluginContext = PluginContext>(): TContext | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* Hook to access the {@link PluginContext | Powerlines context}.
|
|
52
|
-
*
|
|
53
|
-
* @returns The Powerlines context.
|
|
54
|
-
*/
|
|
55
|
-
declare function usePowerlines<TContext extends PluginContext = PluginContext>(): TContext;
|
|
56
|
-
/**
|
|
57
|
-
* Hook to safely access the render context's metadata.
|
|
58
|
-
*
|
|
59
|
-
* @returns The Powerlines context or undefined if not set.
|
|
60
|
-
*/
|
|
61
|
-
declare function useMetaSafe<TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(): TMeta | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Hook to access the render context's metadata.
|
|
64
|
-
*
|
|
65
|
-
* @returns The Powerlines context.
|
|
66
|
-
*/
|
|
67
|
-
declare function useMeta<TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(): TMeta;
|
|
68
|
-
declare type __ΩMetaItem = any[];
|
|
69
|
-
declare type __ΩPowerlinesContextInterface = any[];
|
|
70
|
-
//#endregion
|
|
71
|
-
export { __ΩPowerlinesContextInterface as a, usePowerlines as c, __ΩMetaItem as i, usePowerlinesContext as l, PowerlinesContext as n, useMeta as o, PowerlinesContextInterface as r, useMetaSafe as s, MetaItem as t, usePowerlinesSafe as u };
|
|
72
|
-
//# sourceMappingURL=context-CdtkDo_j.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-CdtkDo_j.d.cts","names":[],"sources":["../src/core/contexts/context.ts"],"sourcesContent":[],"mappings":";;;;;UA0BiB,QAAA;;AAAjB;AAsBA;EACmB,IAAA,CAAA,EAAA,SAAA,GAAA,OAAA,GAAA,MAAA;EAAgB;;;EACuB,UAAA,CAAA,EAAA,OAAA;EAAf;;;;AAgB3C;AASA;EACmB,OAAA,CAAA,EAjCP,aAiCO,GAAA,MAAA;EAAgB,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,GAAA;;AACnB,UA7BC,0BA6BD,CAAA,iBA5BG,aA4BH,GA5BmB,aA4BnB,EAAA,cA3BA,MA2BA,CAAA,MAAA,EA3Be,QA2Bf,CAAA,GA3B2B,MA2B3B,CAAA,MAAA,EA3B0C,QA2B1C,CAAA,CAAA,CAAA;EAA0C;;;EAChB,KAAA,EAvBjC,QAuBiC;EAArC;;AASL;EACmB,IAAA,EA5BX,KA4BW;;;;AAYnB;AACmB,cAnCN,iBAmCM,EAnCa,gBAmCb,CAlCjB,0BAkCiB,CAAA,GAAA,EAAA,GAAA,CAAA,CAAA;;;;AAiBnB;;AACgB,iBA5CA,oBA4CA,CAAA,iBA3CG,aA2CH,GA3CmB,aA2CnB,EAAA,cA1CA,MA0CA,CAAA,MAAA,EA1Ce,QA0Cf,CAAA,GA1C2B,MA0C3B,CAAA,MAAA,EA1C0C,QA0C1C,CAAA,CAAA,CAAA,CAAA,EAzCX,0BAyCW,CAzCgB,QAyChB,EAzC0B,KAyC1B,CAAA,GAAA,SAAA;;;;;AAYhB;AAC+B,iBA7Cf,iBA6Ce,CAAA,iBA5CZ,aA4CY,GA5CI,aA4CJ,CAAA,CAAA,CAAA,EA3C1B,QA2C0B,GAAA,SAAA;;;;;;iBAhCf,+BACG,gBAAgB,kBAC9B;;;;;;iBAgBW,0BACA,eAAe,YAAY,eAAe,cACrD;;;;;;iBAWW,sBACA,eAAe,YAAY,eAAe,cACrD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-DAfWJCa9.mjs","names":["createNamedContext","useContext","PowerlinesContext","usePowerlinesContext","usePowerlinesSafe","powerlines","value","undefined","usePowerlines","Error","useMetaSafe","meta","useMeta"],"sources":["../src/core/contexts/context.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { PluginContext } from \"powerlines/types/context\";\nimport type { StoragePreset } from \"powerlines/types/fs\";\n\nexport interface MetaItem {\n /**\n * The kind of metadata item.\n */\n kind?: \"builtin\" | \"entry\" | string;\n\n /**\n * Whether to skip formatting for this output.\n */\n skipFormat?: boolean;\n\n /**\n * The storage preset or adapter name for the output files.\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided `output.mode` value.\n */\n storage?: StoragePreset | string;\n\n [key: string]: any;\n}\n\nexport interface PowerlinesContextInterface<\n TContext extends PluginContext = PluginContext,\n TMeta extends Record<string, MetaItem> = Record<string, MetaItem>\n> {\n /**\n * The current Powerlines context.\n */\n value: TContext;\n\n /**\n * The current render metadata.\n */\n meta: TMeta;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const PowerlinesContext: ComponentContext<\n PowerlinesContextInterface<any, any>\n> = createNamedContext<PowerlinesContextInterface<any, any>>(\"Powerlines\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function usePowerlinesContext<\n TContext extends PluginContext = PluginContext,\n TMeta extends Record<string, MetaItem> = Record<string, MetaItem>\n>(): PowerlinesContextInterface<TContext, TMeta> | undefined {\n return useContext(PowerlinesContext);\n}\n\n/**\n * Hook to safely access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function usePowerlinesSafe<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n const powerlines = usePowerlinesContext<TContext>();\n\n return powerlines?.value ?? undefined;\n}\n\n/**\n * Hook to access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context.\n */\nexport function usePowerlines<\n TContext extends PluginContext = PluginContext\n>(): TContext {\n const powerlines = usePowerlinesSafe<TContext>();\n if (!powerlines) {\n throw new Error(\n \"Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return powerlines;\n}\n\n/**\n * Hook to safely access the render context's metadata.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function useMetaSafe<\n TMeta extends Record<string, MetaItem> = Record<string, MetaItem>\n>(): TMeta | undefined {\n const powerlines = usePowerlinesContext<PluginContext, TMeta>();\n\n return powerlines?.meta ?? undefined;\n}\n\n/**\n * Hook to access the render context's metadata.\n *\n * @returns The Powerlines context.\n */\nexport function useMeta<\n TMeta extends Record<string, MetaItem> = Record<string, MetaItem>\n>(): TMeta {\n const meta = useMetaSafe<TMeta>();\n if (!meta) {\n throw new Error(\n \"Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return meta;\n}\n"],"mappings":""}
|