@powerlines/plugin-alloy 0.19.32 → 0.19.34
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/{chunk-CbDLau6x.cjs → _virtual/rolldown_runtime.cjs} +1 -6
- package/dist/core/components/index.cjs +6 -11
- package/dist/core/components/index.d.cts +3 -9
- package/dist/core/components/index.d.mts +3 -9
- package/dist/core/components/index.mjs +3 -8
- package/dist/core/components/output.cjs +39 -6
- package/dist/core/components/output.d.cts +25 -7
- package/dist/core/components/output.d.cts.map +1 -0
- package/dist/core/components/output.d.mts +25 -7
- package/dist/core/components/output.d.mts.map +1 -0
- package/dist/core/components/output.mjs +39 -6
- package/dist/core/components/output.mjs.map +1 -0
- package/dist/core/components/single-line-comment.cjs +21 -2
- package/dist/core/components/single-line-comment.d.cts +23 -3
- package/dist/core/components/single-line-comment.d.cts.map +1 -0
- package/dist/core/components/single-line-comment.d.mts +23 -3
- package/dist/core/components/single-line-comment.d.mts.map +1 -0
- package/dist/core/components/single-line-comment.mjs +21 -2
- package/dist/core/components/single-line-comment.mjs.map +1 -0
- package/dist/core/components/source-file.cjs +62 -3
- package/dist/core/components/source-file.d.cts +33 -3
- package/dist/core/components/source-file.d.cts.map +1 -0
- package/dist/core/components/source-file.d.mts +33 -3
- package/dist/core/components/source-file.d.mts.map +1 -0
- package/dist/core/components/source-file.mjs +61 -3
- package/dist/core/components/source-file.mjs.map +1 -0
- package/dist/core/contexts/context.cjs +39 -5
- package/dist/core/contexts/context.d.cts +30 -2
- package/dist/core/contexts/context.d.cts.map +1 -0
- package/dist/core/contexts/context.d.mts +30 -2
- package/dist/core/contexts/context.d.mts.map +1 -0
- package/dist/core/contexts/context.mjs +36 -2
- package/dist/core/contexts/context.mjs.map +1 -0
- package/dist/core/contexts/index.cjs +19 -20
- package/dist/core/contexts/index.d.cts +3 -5
- package/dist/core/contexts/index.d.mts +3 -5
- package/dist/core/contexts/index.mjs +3 -4
- package/dist/core/contexts/meta.cjs +39 -5
- package/dist/core/contexts/meta.d.cts +48 -2
- package/dist/core/contexts/meta.d.cts.map +1 -0
- package/dist/core/contexts/meta.d.mts +48 -2
- package/dist/core/contexts/meta.d.mts.map +1 -0
- package/dist/core/contexts/meta.mjs +36 -2
- package/dist/core/contexts/meta.mjs.map +1 -0
- package/dist/core/contexts/reflection.cjs +67 -9
- package/dist/core/contexts/reflection.d.cts +53 -3
- package/dist/core/contexts/reflection.d.cts.map +1 -0
- package/dist/core/contexts/reflection.d.mts +53 -3
- package/dist/core/contexts/reflection.d.mts.map +1 -0
- package/dist/core/contexts/reflection.mjs +60 -2
- package/dist/core/contexts/reflection.mjs.map +1 -0
- package/dist/core/index.cjs +27 -27
- package/dist/core/index.d.cts +8 -9
- package/dist/core/index.d.mts +8 -9
- package/dist/core/index.mjs +8 -8
- package/dist/helpers/capnp.cjs +276 -18
- package/dist/helpers/capnp.d.cts +88 -2
- package/dist/helpers/capnp.d.cts.map +1 -0
- package/dist/helpers/capnp.d.mts +88 -2
- package/dist/helpers/capnp.d.mts.map +1 -0
- package/dist/helpers/capnp.mjs +259 -2
- package/dist/helpers/capnp.mjs.map +1 -0
- package/dist/helpers/create-builtin.cjs +18 -2
- package/dist/helpers/create-builtin.d.cts +16 -2
- package/dist/helpers/create-builtin.d.cts.map +1 -0
- package/dist/helpers/create-builtin.d.mts +16 -2
- package/dist/helpers/create-builtin.d.mts.map +1 -0
- package/dist/helpers/create-builtin.mjs +18 -2
- package/dist/helpers/create-builtin.mjs.map +1 -0
- package/dist/helpers/index.cjs +23 -23
- 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 +15 -2
- package/dist/helpers/refkey.d.cts +14 -2
- package/dist/helpers/refkey.d.cts.map +1 -0
- package/dist/helpers/refkey.d.mts +14 -2
- package/dist/helpers/refkey.d.mts.map +1 -0
- package/dist/helpers/refkey.mjs +15 -2
- package/dist/helpers/refkey.mjs.map +1 -0
- package/dist/helpers/typescript.cjs +45 -2
- package/dist/helpers/typescript.d.cts +26 -2
- package/dist/helpers/typescript.d.cts.map +1 -0
- package/dist/helpers/typescript.d.mts +26 -2
- package/dist/helpers/typescript.d.mts.map +1 -0
- package/dist/helpers/typescript.mjs +45 -2
- package/dist/helpers/typescript.mjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/markdown/components/front-matter.cjs +27 -2
- package/dist/markdown/components/front-matter.d.cts +16 -2
- package/dist/markdown/components/front-matter.d.cts.map +1 -0
- package/dist/markdown/components/front-matter.d.mts +16 -2
- package/dist/markdown/components/front-matter.d.mts.map +1 -0
- package/dist/markdown/components/front-matter.mjs +27 -2
- package/dist/markdown/components/front-matter.mjs.map +1 -0
- package/dist/markdown/components/index.cjs +9 -15
- package/dist/markdown/components/index.d.cts +3 -7
- package/dist/markdown/components/index.d.mts +3 -7
- package/dist/markdown/components/index.mjs +3 -9
- package/dist/markdown/components/markdown-file.cjs +130 -8
- package/dist/markdown/components/markdown-file.d.cts +29 -5
- package/dist/markdown/components/markdown-file.d.cts.map +1 -0
- package/dist/markdown/components/markdown-file.d.mts +29 -5
- package/dist/markdown/components/markdown-file.d.mts.map +1 -0
- package/dist/markdown/components/markdown-file.mjs +129 -7
- package/dist/markdown/components/markdown-file.mjs.map +1 -0
- package/dist/markdown/components/markdown-table.cjs +100 -5
- package/dist/markdown/components/markdown-table.d.cts +28 -4
- package/dist/markdown/components/markdown-table.d.cts.map +1 -0
- package/dist/markdown/components/markdown-table.d.mts +28 -4
- package/dist/markdown/components/markdown-table.d.mts.map +1 -0
- package/dist/markdown/components/markdown-table.mjs +98 -3
- package/dist/markdown/components/markdown-table.mjs.map +1 -0
- package/dist/markdown/contexts/index.cjs +5 -6
- package/dist/markdown/contexts/index.d.cts +1 -2
- package/dist/markdown/contexts/index.d.mts +1 -2
- package/dist/markdown/contexts/index.mjs +1 -2
- package/dist/markdown/contexts/markdown-table.cjs +36 -5
- package/dist/markdown/contexts/markdown-table.d.cts +38 -2
- package/dist/markdown/contexts/markdown-table.d.cts.map +1 -0
- package/dist/markdown/contexts/markdown-table.d.mts +38 -2
- package/dist/markdown/contexts/markdown-table.d.mts.map +1 -0
- package/dist/markdown/contexts/markdown-table.mjs +33 -2
- package/dist/markdown/contexts/markdown-table.mjs.map +1 -0
- package/dist/markdown/index.cjs +16 -20
- package/dist/markdown/index.d.cts +6 -8
- package/dist/markdown/index.d.mts +6 -8
- package/dist/markdown/index.mjs +6 -10
- package/dist/render.cjs +60 -0
- package/dist/render.d.cts +23 -0
- package/dist/render.d.cts.map +1 -0
- package/dist/render.d.mts +23 -0
- package/dist/render.d.mts.map +1 -0
- package/dist/render.mjs +60 -0
- package/dist/render.mjs.map +1 -0
- package/dist/types/components.cjs +0 -1
- package/dist/types/components.d.cts +143 -2
- package/dist/types/components.d.cts.map +1 -0
- package/dist/types/components.d.mts +143 -2
- package/dist/types/components.d.mts.map +1 -0
- package/dist/types/components.mjs +0 -2
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +0 -3
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +39 -2
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +39 -2
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +0 -2
- package/dist/typescript/components/builtin-file.cjs +61 -8
- package/dist/typescript/components/builtin-file.d.cts +35 -6
- package/dist/typescript/components/builtin-file.d.cts.map +1 -0
- package/dist/typescript/components/builtin-file.d.mts +35 -6
- package/dist/typescript/components/builtin-file.d.mts.map +1 -0
- package/dist/typescript/components/builtin-file.mjs +61 -8
- package/dist/typescript/components/builtin-file.mjs.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.cjs +24 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts +33 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts +33 -2
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.mjs +24 -2
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -0
- package/dist/typescript/components/entry-file.cjs +41 -7
- package/dist/typescript/components/entry-file.d.cts +28 -5
- package/dist/typescript/components/entry-file.d.cts.map +1 -0
- package/dist/typescript/components/entry-file.d.mts +28 -5
- package/dist/typescript/components/entry-file.d.mts.map +1 -0
- package/dist/typescript/components/entry-file.mjs +40 -7
- package/dist/typescript/components/entry-file.mjs.map +1 -0
- package/dist/typescript/components/index.cjs +43 -49
- package/dist/typescript/components/index.d.cts +9 -12
- package/dist/typescript/components/index.d.mts +9 -12
- package/dist/typescript/components/index.mjs +9 -15
- package/dist/typescript/components/record-expression.cjs +11 -2
- package/dist/typescript/components/record-expression.d.cts +13 -2
- package/dist/typescript/components/record-expression.d.cts.map +1 -0
- package/dist/typescript/components/record-expression.d.mts +13 -2
- package/dist/typescript/components/record-expression.d.mts.map +1 -0
- package/dist/typescript/components/record-expression.mjs +11 -2
- package/dist/typescript/components/record-expression.mjs.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.cjs +177 -7
- package/dist/typescript/components/tsdoc-reflection.d.cts +19 -4
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts +19 -4
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.mjs +175 -5
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -0
- package/dist/typescript/components/tsdoc.cjs +484 -22
- package/dist/typescript/components/tsdoc.d.cts +164 -3
- package/dist/typescript/components/tsdoc.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc.d.mts +164 -3
- package/dist/typescript/components/tsdoc.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc.mjs +465 -3
- package/dist/typescript/components/tsdoc.mjs.map +1 -0
- package/dist/typescript/components/typescript-file.cjs +215 -8
- package/dist/typescript/components/typescript-file.d.cts +50 -4
- package/dist/typescript/components/typescript-file.d.cts.map +1 -0
- package/dist/typescript/components/typescript-file.d.mts +50 -4
- package/dist/typescript/components/typescript-file.d.mts.map +1 -0
- package/dist/typescript/components/typescript-file.mjs +213 -6
- package/dist/typescript/components/typescript-file.mjs.map +1 -0
- package/dist/typescript/components/typescript-interface.cjs +72 -7
- package/dist/typescript/components/typescript-interface.d.cts +26 -3
- package/dist/typescript/components/typescript-interface.d.cts.map +1 -0
- package/dist/typescript/components/typescript-interface.d.mts +26 -3
- package/dist/typescript/components/typescript-interface.d.mts.map +1 -0
- package/dist/typescript/components/typescript-interface.mjs +71 -6
- package/dist/typescript/components/typescript-interface.mjs.map +1 -0
- package/dist/typescript/components/typescript-object.cjs +124 -7
- package/dist/typescript/components/typescript-object.d.cts +30 -3
- package/dist/typescript/components/typescript-object.d.cts.map +1 -0
- package/dist/typescript/components/typescript-object.d.mts +30 -3
- package/dist/typescript/components/typescript-object.d.mts.map +1 -0
- package/dist/typescript/components/typescript-object.mjs +123 -6
- package/dist/typescript/components/typescript-object.mjs.map +1 -0
- package/dist/typescript/index.cjs +44 -49
- package/dist/typescript/index.d.cts +10 -12
- package/dist/typescript/index.d.mts +10 -12
- package/dist/typescript/index.mjs +10 -15
- package/package.json +20 -6
- package/dist/builtin-file-BNp7C-BU.mjs +0 -62
- package/dist/builtin-file-BNp7C-BU.mjs.map +0 -1
- package/dist/builtin-file-C-TpxdCP.d.mts +0 -35
- package/dist/builtin-file-C-TpxdCP.d.mts.map +0 -1
- package/dist/builtin-file-CDLuGDg7.d.cts +0 -35
- package/dist/builtin-file-CDLuGDg7.d.cts.map +0 -1
- package/dist/builtin-file-CQAeHqiO.cjs +0 -67
- package/dist/builtin-file-DWcpFOVB.d.mts +0 -35
- package/dist/builtin-file-DWcpFOVB.d.mts.map +0 -1
- package/dist/builtin-file-I0ejC9w0.d.cts +0 -35
- package/dist/builtin-file-I0ejC9w0.d.cts.map +0 -1
- package/dist/capnp-CLxcoMcG.d.mts +0 -88
- package/dist/capnp-CLxcoMcG.d.mts.map +0 -1
- package/dist/capnp-CPbob9Cm.mjs +0 -260
- package/dist/capnp-CPbob9Cm.mjs.map +0 -1
- package/dist/capnp-ClfqI-5t.cjs +0 -356
- package/dist/capnp-DbPtfpg2.d.cts +0 -88
- package/dist/capnp-DbPtfpg2.d.cts.map +0 -1
- package/dist/components-B0evB5xd.cjs +0 -0
- package/dist/components-BNK9p5AE.cjs +0 -0
- package/dist/components-ByryZacA.mjs +0 -1
- package/dist/components-C3qpgLKV.mjs +0 -1
- package/dist/components-Cr-i-ofB.mjs +0 -1
- package/dist/components-CvqTz7Q9.d.cts +0 -143
- package/dist/components-CvqTz7Q9.d.cts.map +0 -1
- package/dist/components-DPKSrvP-.cjs +0 -0
- package/dist/components-ISRFDWTF.cjs +0 -0
- package/dist/components-NXgsRgB4.mjs +0 -1
- package/dist/components-_4e2YMfT.d.mts +0 -143
- package/dist/components-_4e2YMfT.d.mts.map +0 -1
- package/dist/context-C7gW4eqa.d.cts +0 -30
- package/dist/context-C7gW4eqa.d.cts.map +0 -1
- package/dist/context-CdPajCh6.mjs +0 -37
- package/dist/context-CdPajCh6.mjs.map +0 -1
- package/dist/context-D5pAjVbn.d.mts +0 -30
- package/dist/context-D5pAjVbn.d.mts.map +0 -1
- package/dist/context-DNdlL_gp.cjs +0 -60
- package/dist/contexts-BqTplHQH.mjs +0 -1
- package/dist/contexts-D-vYhGdM.mjs +0 -1
- package/dist/contexts-DWGMeWga.cjs +0 -0
- package/dist/contexts-J643Nrrt.cjs +0 -0
- package/dist/create-builtin-Be3J_vqf.mjs +0 -19
- package/dist/create-builtin-Be3J_vqf.mjs.map +0 -1
- package/dist/create-builtin-BiKyN2s2.cjs +0 -24
- package/dist/create-builtin-Bpswa0ZT.d.cts +0 -16
- package/dist/create-builtin-Bpswa0ZT.d.cts.map +0 -1
- package/dist/create-builtin-CbEjJreB.d.mts +0 -16
- package/dist/create-builtin-CbEjJreB.d.mts.map +0 -1
- package/dist/dynamic-import-statement-B4Ov9C7y.mjs +0 -25
- package/dist/dynamic-import-statement-B4Ov9C7y.mjs.map +0 -1
- package/dist/dynamic-import-statement-CNsIFAva.d.cts +0 -33
- package/dist/dynamic-import-statement-CNsIFAva.d.cts.map +0 -1
- package/dist/dynamic-import-statement-CVIYwXyi.d.mts +0 -33
- package/dist/dynamic-import-statement-CVIYwXyi.d.mts.map +0 -1
- package/dist/dynamic-import-statement-DDEpZVlQ.d.cts +0 -33
- package/dist/dynamic-import-statement-DDEpZVlQ.d.cts.map +0 -1
- package/dist/dynamic-import-statement-DSNDMC9Y.d.mts +0 -33
- package/dist/dynamic-import-statement-DSNDMC9Y.d.mts.map +0 -1
- package/dist/dynamic-import-statement-Dy_MY_Ua.cjs +0 -30
- package/dist/entry-file-CYPWFUfe.cjs +0 -47
- package/dist/entry-file-CrZ-k87r.mjs +0 -41
- package/dist/entry-file-CrZ-k87r.mjs.map +0 -1
- package/dist/entry-file-DOcjyCDG.d.mts +0 -28
- package/dist/entry-file-DOcjyCDG.d.mts.map +0 -1
- package/dist/entry-file-DVf4SGx4.d.cts +0 -28
- package/dist/entry-file-DVf4SGx4.d.cts.map +0 -1
- package/dist/entry-file-DXv3HtYV.d.mts +0 -28
- package/dist/entry-file-DXv3HtYV.d.mts.map +0 -1
- package/dist/entry-file-y0caTLfc.d.cts +0 -28
- package/dist/entry-file-y0caTLfc.d.cts.map +0 -1
- package/dist/front-matter-BeTG0uJA.mjs +0 -28
- package/dist/front-matter-BeTG0uJA.mjs.map +0 -1
- package/dist/front-matter-CXfCT8a8.d.mts +0 -16
- package/dist/front-matter-CXfCT8a8.d.mts.map +0 -1
- package/dist/front-matter-DTorR58b.d.cts +0 -16
- package/dist/front-matter-DTorR58b.d.cts.map +0 -1
- package/dist/front-matter-DZ1tB-Uj.cjs +0 -33
- package/dist/front-matter-DySGMCRE.d.cts +0 -16
- package/dist/front-matter-DySGMCRE.d.cts.map +0 -1
- package/dist/index-BJ8-FA6N.d.cts +0 -1
- package/dist/index-BXpMZvwA.d.cts +0 -1
- package/dist/index-BhY1qu3m.d.cts +0 -1
- package/dist/index-BjgW3E7y.d.mts +0 -1
- package/dist/index-C3usUse7.d.mts +0 -1
- package/dist/index-D13oYj4_.d.mts +0 -1
- package/dist/index-DBGd4WeR.d.mts +0 -1
- package/dist/index-DdxxIAKU.d.cts +0 -1
- package/dist/index-DpEKQcoR.d.cts +0 -1
- package/dist/index-gpCH5158.d.mts +0 -1
- package/dist/markdown-file-BkmvexMF.d.cts +0 -29
- package/dist/markdown-file-BkmvexMF.d.cts.map +0 -1
- package/dist/markdown-file-C7o9bn--.d.mts +0 -29
- package/dist/markdown-file-C7o9bn--.d.mts.map +0 -1
- package/dist/markdown-file-CFt8hI37.cjs +0 -141
- package/dist/markdown-file-CX8auFpl.mjs +0 -130
- package/dist/markdown-file-CX8auFpl.mjs.map +0 -1
- package/dist/markdown-file-CbVNKFje.d.cts +0 -29
- package/dist/markdown-file-CbVNKFje.d.cts.map +0 -1
- package/dist/markdown-file-DMrhFhUU.d.mts +0 -29
- package/dist/markdown-file-DMrhFhUU.d.mts.map +0 -1
- package/dist/markdown-table-B7EUUNbl.d.mts +0 -28
- package/dist/markdown-table-B7EUUNbl.d.mts.map +0 -1
- package/dist/markdown-table-BWPm6GbJ.cjs +0 -57
- package/dist/markdown-table-CGXp5JbS.d.mts +0 -28
- package/dist/markdown-table-CGXp5JbS.d.mts.map +0 -1
- package/dist/markdown-table-CKMEMcyb.d.cts +0 -28
- package/dist/markdown-table-CKMEMcyb.d.cts.map +0 -1
- package/dist/markdown-table-CZMEY6IR.d.cts +0 -38
- package/dist/markdown-table-CZMEY6IR.d.cts.map +0 -1
- package/dist/markdown-table-CnEur72Z.mjs +0 -99
- package/dist/markdown-table-CnEur72Z.mjs.map +0 -1
- package/dist/markdown-table-Cv3P72sN.d.cts +0 -28
- package/dist/markdown-table-Cv3P72sN.d.cts.map +0 -1
- package/dist/markdown-table-PT2TFFY3.mjs +0 -34
- package/dist/markdown-table-PT2TFFY3.mjs.map +0 -1
- package/dist/markdown-table-eTnxxb46.cjs +0 -116
- package/dist/markdown-table-t6Z-cmxX.d.mts +0 -38
- package/dist/markdown-table-t6Z-cmxX.d.mts.map +0 -1
- package/dist/meta-BEeFPjoM.mjs +0 -37
- package/dist/meta-BEeFPjoM.mjs.map +0 -1
- package/dist/meta-BVJcyXVs.cjs +0 -60
- package/dist/meta-D0y5uZo4.d.cts +0 -48
- package/dist/meta-D0y5uZo4.d.cts.map +0 -1
- package/dist/meta-DJqWxY95.d.mts +0 -48
- package/dist/meta-DJqWxY95.d.mts.map +0 -1
- package/dist/output-B5O_qz0i.cjs +0 -44
- package/dist/output-C5BkcdCd.d.cts +0 -24
- package/dist/output-C5BkcdCd.d.cts.map +0 -1
- package/dist/output-C7mlHz0P.d.mts +0 -24
- package/dist/output-C7mlHz0P.d.mts.map +0 -1
- package/dist/output-DcuryjuV.mjs +0 -39
- package/dist/output-DcuryjuV.mjs.map +0 -1
- package/dist/output-XvUhyMSi.d.cts +0 -24
- package/dist/output-XvUhyMSi.d.cts.map +0 -1
- package/dist/plugin-B8wUxSXi.cjs +0 -0
- package/dist/plugin-BzF8Q2v1.mjs +0 -1
- package/dist/plugin-CyBCpZyU.d.mts +0 -39
- package/dist/plugin-CyBCpZyU.d.mts.map +0 -1
- package/dist/plugin-DIlnN1SV.d.cts +0 -39
- package/dist/plugin-DIlnN1SV.d.cts.map +0 -1
- package/dist/record-expression-6ElbFyR0.cjs +0 -17
- package/dist/record-expression-ChoLAsVS.d.mts +0 -13
- package/dist/record-expression-ChoLAsVS.d.mts.map +0 -1
- package/dist/record-expression-D5W72rZN.mjs +0 -12
- package/dist/record-expression-D5W72rZN.mjs.map +0 -1
- package/dist/record-expression-Dwg_PZpg.d.cts +0 -13
- package/dist/record-expression-Dwg_PZpg.d.cts.map +0 -1
- package/dist/refkey-C08kDOQ0.cjs +0 -21
- package/dist/refkey-CP7MJMac.d.cts +0 -14
- package/dist/refkey-CP7MJMac.d.cts.map +0 -1
- package/dist/refkey-CQVHeuAq.mjs +0 -16
- package/dist/refkey-CQVHeuAq.mjs.map +0 -1
- package/dist/refkey-D6OjgKgS.d.mts +0 -14
- package/dist/refkey-D6OjgKgS.d.mts.map +0 -1
- package/dist/reflection-BktS88RM.cjs +0 -108
- package/dist/reflection-CfOmSgDn.d.mts +0 -53
- package/dist/reflection-CfOmSgDn.d.mts.map +0 -1
- package/dist/reflection-Q87E_-w_.d.cts +0 -53
- package/dist/reflection-Q87E_-w_.d.cts.map +0 -1
- package/dist/reflection-TXYxCAwV.mjs +0 -61
- package/dist/reflection-TXYxCAwV.mjs.map +0 -1
- package/dist/single-line-comment-BKFqKn-D.d.mts +0 -23
- package/dist/single-line-comment-BKFqKn-D.d.mts.map +0 -1
- package/dist/single-line-comment-Ct_putR7.d.mts +0 -23
- package/dist/single-line-comment-Ct_putR7.d.mts.map +0 -1
- package/dist/single-line-comment-D2y_A8e1.d.cts +0 -23
- package/dist/single-line-comment-D2y_A8e1.d.cts.map +0 -1
- package/dist/single-line-comment-DW0LUIQ2.mjs +0 -22
- package/dist/single-line-comment-DW0LUIQ2.mjs.map +0 -1
- package/dist/single-line-comment-DWQy5rrk.d.cts +0 -23
- package/dist/single-line-comment-DWQy5rrk.d.cts.map +0 -1
- package/dist/single-line-comment-tAWBgL9v.cjs +0 -27
- package/dist/source-file-B51pGSXX.d.mts +0 -33
- package/dist/source-file-B51pGSXX.d.mts.map +0 -1
- package/dist/source-file-BhqYj8m-.d.mts +0 -33
- package/dist/source-file-BhqYj8m-.d.mts.map +0 -1
- package/dist/source-file-Bl7eV0Li.mjs +0 -62
- package/dist/source-file-Bl7eV0Li.mjs.map +0 -1
- package/dist/source-file-DiisOeS2.d.cts +0 -33
- package/dist/source-file-DiisOeS2.d.cts.map +0 -1
- package/dist/source-file-DnqaQY90.cjs +0 -68
- package/dist/source-file-gMJwiJAw.d.cts +0 -33
- package/dist/source-file-gMJwiJAw.d.cts.map +0 -1
- package/dist/tsdoc-BufL8muf.cjs +0 -585
- package/dist/tsdoc-DB1Qzwsn.mjs +0 -466
- package/dist/tsdoc-DB1Qzwsn.mjs.map +0 -1
- package/dist/tsdoc-DiBR7m1J.d.cts +0 -164
- package/dist/tsdoc-DiBR7m1J.d.cts.map +0 -1
- package/dist/tsdoc-KHfXy9HE.d.mts +0 -164
- package/dist/tsdoc-KHfXy9HE.d.mts.map +0 -1
- package/dist/tsdoc-reflection-B5-J4ia-.cjs +0 -193
- package/dist/tsdoc-reflection-BGPyymTb.mjs +0 -176
- package/dist/tsdoc-reflection-BGPyymTb.mjs.map +0 -1
- package/dist/tsdoc-reflection-CYz5udTh.d.mts +0 -19
- package/dist/tsdoc-reflection-CYz5udTh.d.mts.map +0 -1
- package/dist/tsdoc-reflection-DTYkFxKy.d.cts +0 -19
- package/dist/tsdoc-reflection-DTYkFxKy.d.cts.map +0 -1
- package/dist/tsdoc-reflection-cRd43W18.d.cts +0 -19
- package/dist/tsdoc-reflection-cRd43W18.d.cts.map +0 -1
- package/dist/typescript-BXhP0qIJ.mjs +0 -46
- package/dist/typescript-BXhP0qIJ.mjs.map +0 -1
- package/dist/typescript-BbjCTT04.cjs +0 -51
- package/dist/typescript-CXP7Oa6_.d.cts +0 -26
- package/dist/typescript-CXP7Oa6_.d.cts.map +0 -1
- package/dist/typescript-DvynKONm.d.mts +0 -26
- package/dist/typescript-DvynKONm.d.mts.map +0 -1
- package/dist/typescript-file-4oY1sIRB.cjs +0 -231
- package/dist/typescript-file-C9TPcvPm.d.mts +0 -50
- package/dist/typescript-file-C9TPcvPm.d.mts.map +0 -1
- package/dist/typescript-file-CJxOp_Xl.d.cts +0 -50
- package/dist/typescript-file-CJxOp_Xl.d.cts.map +0 -1
- package/dist/typescript-file-CY0SmW6n.d.mts +0 -50
- package/dist/typescript-file-CY0SmW6n.d.mts.map +0 -1
- package/dist/typescript-file-DWYfy1-C.d.cts +0 -50
- package/dist/typescript-file-DWYfy1-C.d.cts.map +0 -1
- package/dist/typescript-file-iXGdOTZv.mjs +0 -214
- package/dist/typescript-file-iXGdOTZv.mjs.map +0 -1
- package/dist/typescript-interface-4Kxgaglq.d.mts +0 -26
- package/dist/typescript-interface-4Kxgaglq.d.mts.map +0 -1
- package/dist/typescript-interface-B0AoZx3f.cjs +0 -83
- package/dist/typescript-interface-B1mhCCoV.d.cts +0 -26
- package/dist/typescript-interface-B1mhCCoV.d.cts.map +0 -1
- package/dist/typescript-interface-C0mgTtdj.d.cts +0 -26
- package/dist/typescript-interface-C0mgTtdj.d.cts.map +0 -1
- package/dist/typescript-interface-DoEGxV_8.mjs +0 -72
- package/dist/typescript-interface-DoEGxV_8.mjs.map +0 -1
- package/dist/typescript-object-C4d4fThY.cjs +0 -135
- package/dist/typescript-object-C5oh925V.mjs +0 -124
- package/dist/typescript-object-C5oh925V.mjs.map +0 -1
- package/dist/typescript-object-DAepqTrw.d.cts +0 -30
- package/dist/typescript-object-DAepqTrw.d.cts.map +0 -1
- package/dist/typescript-object-DUivJKpz.d.cts +0 -30
- package/dist/typescript-object-DUivJKpz.d.cts.map +0 -1
- package/dist/typescript-object-TlHt1hQc.d.mts +0 -30
- package/dist/typescript-object-TlHt1hQc.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-table.mjs","names":["code","computed","Prose","Show","splitProps","titleCase","isUndefined","MarkdownTableContext","useMarkdownTable","MarkdownTable","props","children","data","columns","Object","keys","map","name","index","align","width","_$createComponent","Provider","value","when","Boolean","MarkdownTableColumn","tableContext","columnRef","find","c","indexRef","alignRef","widthRef","textLength","content","toString","length","repeat","MarkdownTableColumnHeader","rest","_$mergeProps","fallback","useDescriptions"],"sources":["../../../src/markdown/components/markdown-table.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 { code, computed, Prose, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n MarkdownTableColumnContextInterface,\n MarkdownTableContext,\n useMarkdownTable\n} from \"../contexts/markdown-table\";\n\nexport interface MarkdownTableProps<\n T extends Record<string, any> = Record<string, any>\n> extends ComponentProps {\n data: T[];\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTable<\n T extends Record<string, any> = Record<string, any>\n>(props: MarkdownTableProps<T>) {\n const [{ children, data }] = splitProps(props, [\"children\", \"data\"]);\n\n const columns = computed(() =>\n Object.keys(data).map((name: string, index: number) => ({\n index,\n name,\n align: \"left\" as const,\n width: 20\n }))\n );\n\n return (\n <MarkdownTableContext.Provider value={{ columns: columns.value, data }}>\n <Show when={Boolean(children)}>{children}</Show>\n </MarkdownTableContext.Provider>\n );\n}\n\nexport type MarkdownTableColumnProps = ComponentProps &\n Partial<Pick<MarkdownTableColumnContextInterface, \"align\">> &\n Required<Pick<MarkdownTableColumnContextInterface, \"name\">> & {\n width?: number;\n };\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumn(props: MarkdownTableColumnProps) {\n const [{ children, width, align, name }] = splitProps(props, [\n \"children\",\n \"width\",\n \"align\",\n \"name\"\n ]);\n\n const tableContext = useMarkdownTable();\n const columnRef = computed(() =>\n tableContext?.columns.find(c => c.name === name)\n );\n\n const indexRef = computed(() => columnRef.value?.index ?? 0);\n const alignRef = computed(() => columnRef.value?.align ?? align ?? \"left\");\n const widthRef = computed(() => columnRef.value?.width ?? width ?? 20);\n\n const textLength = computed(() => {\n const content = children ? children.toString() : \"\";\n\n return content.length;\n });\n\n return (\n <Prose>\n <Show when={indexRef.value === 0}>{\"|\"}</Show>\n <Show when={Boolean(children)}>\n <Prose>{code`${\n alignRef.value === \"left\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }${children}${\n alignRef.value === \"right\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }`}</Prose>\n </Show>\n {\"|\"}\n </Prose>\n );\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumnHeader(props: MarkdownTableColumnProps) {\n const [{ children, name }, rest] = splitProps(props, [\"children\", \"name\"]);\n\n return (\n <>\n <MarkdownTableColumn {...rest} name={name}>\n <Show\n fallback={titleCase(name, {\n useDescriptions: false\n })}\n when={!isUndefined(children)}>\n {children}\n </Show>\n </MarkdownTableColumn>\n </>\n );\n}\n"],"mappings":""}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
require('../../contexts-J643Nrrt.cjs');
|
|
1
|
+
const require_markdown_contexts_markdown_table = require('./markdown-table.cjs');
|
|
3
2
|
|
|
4
|
-
exports.MarkdownTableColumnContext =
|
|
5
|
-
exports.MarkdownTableContext =
|
|
6
|
-
exports.useMarkdownTable =
|
|
7
|
-
exports.useMarkdownTableColumn =
|
|
3
|
+
exports.MarkdownTableColumnContext = require_markdown_contexts_markdown_table.MarkdownTableColumnContext;
|
|
4
|
+
exports.MarkdownTableContext = require_markdown_contexts_markdown_table.MarkdownTableContext;
|
|
5
|
+
exports.useMarkdownTable = require_markdown_contexts_markdown_table.useMarkdownTable;
|
|
6
|
+
exports.useMarkdownTableColumn = require_markdown_contexts_markdown_table.useMarkdownTableColumn;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../index-BXpMZvwA.cjs";
|
|
1
|
+
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.cjs";
|
|
3
2
|
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../index-BjgW3E7y.mjs";
|
|
1
|
+
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.mjs";
|
|
3
2
|
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../contexts-D-vYhGdM.mjs";
|
|
1
|
+
import { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.mjs";
|
|
3
2
|
|
|
4
3
|
export { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
//#region src/markdown/contexts/markdown-table.ts
|
|
5
|
+
/**
|
|
6
|
+
* The Powerlines context used in template rendering.
|
|
7
|
+
*/
|
|
8
|
+
const MarkdownTableColumnContext = (0, __alloy_js_core.createNamedContext)("MarkdownTableColumn", {});
|
|
9
|
+
/**
|
|
10
|
+
* Hook to access the Powerlines Context.
|
|
11
|
+
*
|
|
12
|
+
* @returns The Context.
|
|
13
|
+
*/
|
|
14
|
+
function useMarkdownTableColumn() {
|
|
15
|
+
return (0, __alloy_js_core.useContext)(MarkdownTableColumnContext);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The Powerlines context used in template rendering.
|
|
19
|
+
*/
|
|
20
|
+
const MarkdownTableContext = (0, __alloy_js_core.createContext)({
|
|
21
|
+
columns: [],
|
|
22
|
+
data: []
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Hook to access the Powerlines Context.
|
|
26
|
+
*
|
|
27
|
+
* @returns The Context.
|
|
28
|
+
*/
|
|
29
|
+
function useMarkdownTable() {
|
|
30
|
+
return (0, __alloy_js_core.useContext)(MarkdownTableContext);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.MarkdownTableColumnContext = MarkdownTableColumnContext;
|
|
35
|
+
exports.MarkdownTableContext = MarkdownTableContext;
|
|
36
|
+
exports.useMarkdownTable = useMarkdownTable;
|
|
37
|
+
exports.useMarkdownTableColumn = useMarkdownTableColumn;
|
|
@@ -1,2 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region src/markdown/contexts/markdown-table.d.ts
|
|
4
|
+
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
5
|
+
index: number;
|
|
6
|
+
name: keyof T;
|
|
7
|
+
align: "left" | "right" | "center";
|
|
8
|
+
width: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The Powerlines context used in template rendering.
|
|
12
|
+
*/
|
|
13
|
+
declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
|
|
14
|
+
/**
|
|
15
|
+
* Hook to access the Powerlines Context.
|
|
16
|
+
*
|
|
17
|
+
* @returns The Context.
|
|
18
|
+
*/
|
|
19
|
+
declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
|
|
20
|
+
interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
21
|
+
columns: MarkdownTableColumnContextInterface<T>[];
|
|
22
|
+
data: T[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The Powerlines context used in template rendering.
|
|
26
|
+
*/
|
|
27
|
+
declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
|
|
28
|
+
/**
|
|
29
|
+
* Hook to access the Powerlines Context.
|
|
30
|
+
*
|
|
31
|
+
* @returns The Context.
|
|
32
|
+
*/
|
|
33
|
+
declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
|
|
34
|
+
declare type __ΩMarkdownTableColumnContextInterface = any[];
|
|
35
|
+
declare type __ΩMarkdownTableContextInterface = any[];
|
|
36
|
+
//#endregion
|
|
37
|
+
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
38
|
+
//# sourceMappingURL=markdown-table.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,8CACL,sBAAsB;;EADjB,IAAA,EAAA,MAIH,CAJG;EACL,KAAA,EAAA,MAAA,GAAA,OAAA,GAAA,QAAA;EAAsB,KAAA,EAAA,MAAA;;;AAWlC;AAWA;AAMiB,cAjBJ,0BAiBiC,EAjBL,gBAiBK,CAjBY,mCAiBZ,CAAA;;;;;;AAIrC,iBAVO,sBAAA,CAAA,CAUP,EAV6B,mCAU7B,CAV6B,MAU7B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,GAAA,SAAA;AAMI,UAVI,6BAUmC,CAAA,UATxC,MASwC,CAAA,MAAA,EAAjB,GAAA,CAAA,GATD,MASC,CAAA,MAAgB,EAAA,GAAA,CAAA,CAAA,CAAA;EAWnC,OAAA,EAlBL,mCAkBqB,CAlBe,CAkBf,CAAA,EAAA;QAjBxB;;;;;cAMK,sBAAsB,iBAAiB;;;;;;iBAWpC,gBAAA,CAAA,GAAgB,8BAAA"}
|
|
@@ -1,2 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region src/markdown/contexts/markdown-table.d.ts
|
|
4
|
+
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
5
|
+
index: number;
|
|
6
|
+
name: keyof T;
|
|
7
|
+
align: "left" | "right" | "center";
|
|
8
|
+
width: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The Powerlines context used in template rendering.
|
|
12
|
+
*/
|
|
13
|
+
declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
|
|
14
|
+
/**
|
|
15
|
+
* Hook to access the Powerlines Context.
|
|
16
|
+
*
|
|
17
|
+
* @returns The Context.
|
|
18
|
+
*/
|
|
19
|
+
declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
|
|
20
|
+
interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
21
|
+
columns: MarkdownTableColumnContextInterface<T>[];
|
|
22
|
+
data: T[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The Powerlines context used in template rendering.
|
|
26
|
+
*/
|
|
27
|
+
declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
|
|
28
|
+
/**
|
|
29
|
+
* Hook to access the Powerlines Context.
|
|
30
|
+
*
|
|
31
|
+
* @returns The Context.
|
|
32
|
+
*/
|
|
33
|
+
declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
|
|
34
|
+
declare type __ΩMarkdownTableColumnContextInterface = any[];
|
|
35
|
+
declare type __ΩMarkdownTableContextInterface = any[];
|
|
36
|
+
//#endregion
|
|
37
|
+
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
38
|
+
//# sourceMappingURL=markdown-table.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,8CACL,sBAAsB;;EADjB,IAAA,EAAA,MAIH,CAJG;EACL,KAAA,EAAA,MAAA,GAAA,OAAA,GAAA,QAAA;EAAsB,KAAA,EAAA,MAAA;;;AAWlC;AAWA;AAMiB,cAjBJ,0BAiBiC,EAjBL,gBAiBK,CAjBY,mCAiBZ,CAAA;;;;;;AAIrC,iBAVO,sBAAA,CAAA,CAUP,EAV6B,mCAU7B,CAV6B,MAU7B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,GAAA,SAAA;AAMI,UAVI,6BAUmC,CAAA,UATxC,MASwC,CAAA,MAAjB,EAAA,GAAA,CAAA,GATD,MASC,CAAA,MAAgB,EAAA,GAAA,CAAA,CAAA,CAAA;EAWnC,OAAA,EAlBL,mCAkBqB,CAlBe,CAkBf,CAAA,EAAA;QAjBxB;;;;;cAMK,sBAAsB,iBAAiB;;;;;;iBAWpC,gBAAA,CAAA,GAAgB,8BAAA"}
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createContext, createNamedContext, useContext } from "@alloy-js/core";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
//#region src/markdown/contexts/markdown-table.ts
|
|
4
|
+
/**
|
|
5
|
+
* The Powerlines context used in template rendering.
|
|
6
|
+
*/
|
|
7
|
+
const MarkdownTableColumnContext = createNamedContext("MarkdownTableColumn", {});
|
|
8
|
+
/**
|
|
9
|
+
* Hook to access the Powerlines Context.
|
|
10
|
+
*
|
|
11
|
+
* @returns The Context.
|
|
12
|
+
*/
|
|
13
|
+
function useMarkdownTableColumn() {
|
|
14
|
+
return useContext(MarkdownTableColumnContext);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The Powerlines context used in template rendering.
|
|
18
|
+
*/
|
|
19
|
+
const MarkdownTableContext = createContext({
|
|
20
|
+
columns: [],
|
|
21
|
+
data: []
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Hook to access the Powerlines Context.
|
|
25
|
+
*
|
|
26
|
+
* @returns The Context.
|
|
27
|
+
*/
|
|
28
|
+
function useMarkdownTable() {
|
|
29
|
+
return useContext(MarkdownTableContext);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn };
|
|
34
|
+
//# sourceMappingURL=markdown-table.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-table.mjs","names":["createContext","createNamedContext","useContext","MarkdownTableColumnContext","useMarkdownTableColumn","MarkdownTableContext","columns","data","useMarkdownTable"],"sources":["../../../src/markdown/contexts/markdown-table.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 type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\n\nexport interface MarkdownTableColumnContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n index: number;\n name: keyof T;\n align: \"left\" | \"right\" | \"center\";\n width: number;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface> =\n createNamedContext<MarkdownTableColumnContextInterface>(\n \"MarkdownTableColumn\",\n {} as MarkdownTableColumnContextInterface\n );\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTableColumn() {\n return useContext<MarkdownTableColumnContextInterface>(\n MarkdownTableColumnContext\n );\n}\n\nexport interface MarkdownTableContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n columns: MarkdownTableColumnContextInterface<T>[];\n data: T[];\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface> =\n createContext<MarkdownTableContextInterface>({\n columns: [],\n data: []\n } as MarkdownTableContextInterface);\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTable() {\n return useContext<MarkdownTableContextInterface>(MarkdownTableContext);\n}\n"],"mappings":""}
|
package/dist/markdown/index.cjs
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
require('
|
|
2
|
-
require('
|
|
3
|
-
require('
|
|
4
|
-
require('
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const require_markdown_table = require('../markdown-table-BWPm6GbJ.cjs');
|
|
8
|
-
const require_markdown_table$1 = require('../markdown-table-eTnxxb46.cjs');
|
|
9
|
-
require('../components-DPKSrvP-.cjs');
|
|
10
|
-
require('../contexts-J643Nrrt.cjs');
|
|
1
|
+
const require_markdown_components_front_matter = require('./components/front-matter.cjs');
|
|
2
|
+
const require_markdown_components_markdown_file = require('./components/markdown-file.cjs');
|
|
3
|
+
const require_markdown_contexts_markdown_table = require('./contexts/markdown-table.cjs');
|
|
4
|
+
const require_markdown_components_markdown_table = require('./components/markdown-table.cjs');
|
|
5
|
+
require('./components/index.cjs');
|
|
6
|
+
require('./contexts/index.cjs');
|
|
11
7
|
|
|
12
|
-
exports.FrontMatter =
|
|
13
|
-
exports.MarkdownFile =
|
|
14
|
-
exports.MarkdownFileHeader =
|
|
15
|
-
exports.MarkdownTable =
|
|
16
|
-
exports.MarkdownTableColumn =
|
|
17
|
-
exports.MarkdownTableColumnContext =
|
|
18
|
-
exports.MarkdownTableColumnHeader =
|
|
19
|
-
exports.MarkdownTableContext =
|
|
20
|
-
exports.useMarkdownTable =
|
|
21
|
-
exports.useMarkdownTableColumn =
|
|
8
|
+
exports.FrontMatter = require_markdown_components_front_matter.FrontMatter;
|
|
9
|
+
exports.MarkdownFile = require_markdown_components_markdown_file.MarkdownFile;
|
|
10
|
+
exports.MarkdownFileHeader = require_markdown_components_markdown_file.MarkdownFileHeader;
|
|
11
|
+
exports.MarkdownTable = require_markdown_components_markdown_table.MarkdownTable;
|
|
12
|
+
exports.MarkdownTableColumn = require_markdown_components_markdown_table.MarkdownTableColumn;
|
|
13
|
+
exports.MarkdownTableColumnContext = require_markdown_contexts_markdown_table.MarkdownTableColumnContext;
|
|
14
|
+
exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
|
|
15
|
+
exports.MarkdownTableContext = require_markdown_contexts_markdown_table.MarkdownTableContext;
|
|
16
|
+
exports.useMarkdownTable = require_markdown_contexts_markdown_table.useMarkdownTable;
|
|
17
|
+
exports.useMarkdownTableColumn = require_markdown_contexts_markdown_table.useMarkdownTableColumn;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import "../index-DpEKQcoR.cjs";
|
|
8
|
-
import "../index-BXpMZvwA.cjs";
|
|
1
|
+
import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./components/front-matter.cjs";
|
|
2
|
+
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./components/markdown-file.cjs";
|
|
3
|
+
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.cjs";
|
|
4
|
+
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./components/markdown-table.cjs";
|
|
5
|
+
import "./components/index.cjs";
|
|
6
|
+
import "./contexts/index.cjs";
|
|
9
7
|
export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableColumnProps, __ΩMarkdownTableContextInterface, __ΩMarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import "../index-D13oYj4_.mjs";
|
|
8
|
-
import "../index-BjgW3E7y.mjs";
|
|
1
|
+
import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./components/front-matter.mjs";
|
|
2
|
+
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./components/markdown-file.mjs";
|
|
3
|
+
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
|
|
4
|
+
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./components/markdown-table.mjs";
|
|
5
|
+
import "./components/index.mjs";
|
|
6
|
+
import "./contexts/index.mjs";
|
|
9
7
|
export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableColumnProps, __ΩMarkdownTableContextInterface, __ΩMarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
|
package/dist/markdown/index.mjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { i as useMarkdownTableColumn, n as MarkdownTableContext, r as useMarkdownTable, t as MarkdownTableColumnContext } from "../markdown-table-PT2TFFY3.mjs";
|
|
8
|
-
import { n as MarkdownTableColumn, r as MarkdownTableColumnHeader, t as MarkdownTable } from "../markdown-table-CnEur72Z.mjs";
|
|
9
|
-
import "../components-C3qpgLKV.mjs";
|
|
10
|
-
import "../contexts-D-vYhGdM.mjs";
|
|
1
|
+
import { FrontMatter } from "./components/front-matter.mjs";
|
|
2
|
+
import { MarkdownFile, MarkdownFileHeader } from "./components/markdown-file.mjs";
|
|
3
|
+
import { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
|
|
4
|
+
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader } from "./components/markdown-table.mjs";
|
|
5
|
+
import "./components/index.mjs";
|
|
6
|
+
import "./contexts/index.mjs";
|
|
11
7
|
|
|
12
8
|
export { FrontMatter, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnHeader, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn };
|
package/dist/render.cjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
let __powerlines_plugin_alloy_core_components_output = require("@powerlines/plugin-alloy/core/components/output");
|
|
5
|
+
let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
6
|
+
|
|
7
|
+
//#region src/render.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { render } from "@powerlines/plugin-alloy/render";
|
|
14
|
+
*
|
|
15
|
+
* await render(context, <> ... </>);
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param context - The Powerlines plugin context.
|
|
19
|
+
* @param children - The children components to render.
|
|
20
|
+
* @returns A promise that resolves when rendering is complete.
|
|
21
|
+
*/
|
|
22
|
+
async function render(context, children) {
|
|
23
|
+
const meta = {};
|
|
24
|
+
const output = await (0, __alloy_js_core.renderAsync)((0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_output.Output, {
|
|
25
|
+
context,
|
|
26
|
+
meta,
|
|
27
|
+
children
|
|
28
|
+
}));
|
|
29
|
+
if (!Object.keys(output).length) context.debug("No output files were rendered by Alloy-js component templates.");
|
|
30
|
+
else {
|
|
31
|
+
context.debug(`Processing ${Object.keys(output).length} rendered output files from Alloy-js component templates.`);
|
|
32
|
+
await (0, __alloy_js_core.traverseOutput)(output, {
|
|
33
|
+
visitDirectory: (directory) => {
|
|
34
|
+
if (context.fs.existsSync(directory.path)) return;
|
|
35
|
+
context.fs.mkdirSync(directory.path);
|
|
36
|
+
},
|
|
37
|
+
visitFile: (file) => {
|
|
38
|
+
if ("contents" in file) {
|
|
39
|
+
const metadata = meta[file.path] ?? {};
|
|
40
|
+
if (metadata.kind === "builtin") {
|
|
41
|
+
if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
|
|
42
|
+
context.emitBuiltinSync(file.contents, metadata.id, {
|
|
43
|
+
skipFormat: metadata.skipFormat,
|
|
44
|
+
storage: metadata.storage,
|
|
45
|
+
extension: (0, __stryke_path_file_path_fns.findFileExtension)(file.path)
|
|
46
|
+
});
|
|
47
|
+
} else if (metadata.kind === "entry") context.emitEntrySync(file.contents, file.path, {
|
|
48
|
+
skipFormat: metadata.skipFormat,
|
|
49
|
+
storage: metadata.storage,
|
|
50
|
+
...metadata.typeDefinition ?? {}
|
|
51
|
+
});
|
|
52
|
+
else context.emitSync(file.contents, file.path, metadata);
|
|
53
|
+
} else context.fs.copySync(file.sourcePath, file.path);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
exports.render = render;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
import { PluginContext } from "powerlines/types/context";
|
|
3
|
+
|
|
4
|
+
//#region src/render.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { render } from "@powerlines/plugin-alloy/render";
|
|
12
|
+
*
|
|
13
|
+
* await render(context, <> ... </>);
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param context - The Powerlines plugin context.
|
|
17
|
+
* @param children - The children components to render.
|
|
18
|
+
* @returns A promise that resolves when rendering is complete.
|
|
19
|
+
*/
|
|
20
|
+
declare function render<TContext extends PluginContext>(context: TContext, children: Children): Promise<void>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { render };
|
|
23
|
+
//# sourceMappingURL=render.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAsCA;;;;;;;;;;;;iBAAsB,wBAAwB,wBACnC,oBACC,WAAQ"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
import { PluginContext } from "powerlines/types/context";
|
|
3
|
+
|
|
4
|
+
//#region src/render.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { render } from "@powerlines/plugin-alloy/render";
|
|
12
|
+
*
|
|
13
|
+
* await render(context, <> ... </>);
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param context - The Powerlines plugin context.
|
|
17
|
+
* @param children - The children components to render.
|
|
18
|
+
* @returns A promise that resolves when rendering is complete.
|
|
19
|
+
*/
|
|
20
|
+
declare function render<TContext extends PluginContext>(context: TContext, children: Children): Promise<void>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { render };
|
|
23
|
+
//# sourceMappingURL=render.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.mts","names":[],"sources":["../src/render.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAsCA;;;;;;;;;;;;iBAAsB,wBAAwB,wBACnC,oBACC,WAAQ"}
|
package/dist/render.mjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { renderAsync, traverseOutput } from "@alloy-js/core";
|
|
3
|
+
import { Output as Output$1 } from "@powerlines/plugin-alloy/core/components/output";
|
|
4
|
+
import { findFileExtension } from "@stryke/path/file-path-fns";
|
|
5
|
+
|
|
6
|
+
//#region src/render.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { render } from "@powerlines/plugin-alloy/render";
|
|
13
|
+
*
|
|
14
|
+
* await render(context, <> ... </>);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @param context - The Powerlines plugin context.
|
|
18
|
+
* @param children - The children components to render.
|
|
19
|
+
* @returns A promise that resolves when rendering is complete.
|
|
20
|
+
*/
|
|
21
|
+
async function render(context, children) {
|
|
22
|
+
const meta = {};
|
|
23
|
+
const output = await renderAsync(createComponent(Output$1, {
|
|
24
|
+
context,
|
|
25
|
+
meta,
|
|
26
|
+
children
|
|
27
|
+
}));
|
|
28
|
+
if (!Object.keys(output).length) context.debug("No output files were rendered by Alloy-js component templates.");
|
|
29
|
+
else {
|
|
30
|
+
context.debug(`Processing ${Object.keys(output).length} rendered output files from Alloy-js component templates.`);
|
|
31
|
+
await traverseOutput(output, {
|
|
32
|
+
visitDirectory: (directory) => {
|
|
33
|
+
if (context.fs.existsSync(directory.path)) return;
|
|
34
|
+
context.fs.mkdirSync(directory.path);
|
|
35
|
+
},
|
|
36
|
+
visitFile: (file) => {
|
|
37
|
+
if ("contents" in file) {
|
|
38
|
+
const metadata = meta[file.path] ?? {};
|
|
39
|
+
if (metadata.kind === "builtin") {
|
|
40
|
+
if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
|
|
41
|
+
context.emitBuiltinSync(file.contents, metadata.id, {
|
|
42
|
+
skipFormat: metadata.skipFormat,
|
|
43
|
+
storage: metadata.storage,
|
|
44
|
+
extension: findFileExtension(file.path)
|
|
45
|
+
});
|
|
46
|
+
} else if (metadata.kind === "entry") context.emitEntrySync(file.contents, file.path, {
|
|
47
|
+
skipFormat: metadata.skipFormat,
|
|
48
|
+
storage: metadata.storage,
|
|
49
|
+
...metadata.typeDefinition ?? {}
|
|
50
|
+
});
|
|
51
|
+
else context.emitSync(file.contents, file.path, metadata);
|
|
52
|
+
} else context.fs.copySync(file.sourcePath, file.path);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
export { render };
|
|
60
|
+
//# sourceMappingURL=render.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.mjs","names":["renderAsync","traverseOutput","Output","findFileExtension","render","context","children","meta","output","_$createComponent","Object","keys","length","debug","visitDirectory","directory","fs","existsSync","path","mkdirSync","visitFile","file","metadata","kind","id","Error","emitBuiltinSync","contents","skipFormat","storage","extension","emitEntrySync","typeDefinition","emitSync","copySync","sourcePath"],"sources":["../src/render.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 { Children, renderAsync, traverseOutput } from \"@alloy-js/core\";\nimport { Output } from \"@powerlines/plugin-alloy/core/components/output\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { PluginContext } from \"powerlines/types/context\";\nimport { MetaItem } from \"./core\";\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.\n *\n * @example\n * ```tsx\n * import { render } from \"@powerlines/plugin-alloy/render\";\n *\n * await render(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @returns A promise that resolves when rendering is complete.\n */\nexport async function render<TContext extends PluginContext>(\n context: TContext,\n children: Children\n) {\n const meta = {} as Record<string, MetaItem>;\n const output = await renderAsync(\n <Output<TContext> context={context} meta={meta}>\n {children}\n </Output>\n );\n\n if (!Object.keys(output).length) {\n context.debug(\n \"No output files were rendered by Alloy-js component templates.\"\n );\n } else {\n context.debug(\n `Processing ${\n Object.keys(output).length\n } rendered output files from Alloy-js component templates.`\n );\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (context.fs.existsSync(directory.path)) {\n return;\n }\n\n context.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n context.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else {\n context.emitSync(file.contents, file.path, metadata);\n }\n } else {\n context.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n }\n}\n"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../components-BNK9p5AE.cjs');
|