@powerlines/plugin-alloy 0.26.179 → 0.26.181
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/_virtual/_rolldown/runtime.cjs +14 -0
- package/dist/_virtual/_rolldown/runtime.mjs +18 -0
- package/dist/core/components/infrastructure-file.cjs +8 -1
- package/dist/core/components/infrastructure-file.mjs +3 -1
- package/dist/core/components/infrastructure-file.mjs.map +1 -1
- package/dist/core/components/infrastructure-file.test.cjs +16 -0
- package/dist/core/components/infrastructure-file.test.d.cts +1 -0
- package/dist/core/components/infrastructure-file.test.d.mts +1 -0
- package/dist/core/components/infrastructure-file.test.mjs +18 -0
- package/dist/core/components/infrastructure-file.test.mjs.map +1 -0
- package/dist/core/components/output.cjs +9 -1
- package/dist/core/components/output.d.cts.map +1 -1
- package/dist/core/components/output.d.mts.map +1 -1
- package/dist/core/components/output.mjs +3 -1
- package/dist/core/components/output.mjs.map +1 -1
- package/dist/core/components/output.test.cjs +16 -0
- package/dist/core/components/output.test.d.cts +1 -0
- package/dist/core/components/output.test.d.mts +1 -0
- package/dist/core/components/output.test.mjs +18 -0
- package/dist/core/components/output.test.mjs.map +1 -0
- package/dist/core/components/single-line-comment.cjs +9 -1
- package/dist/core/components/single-line-comment.mjs +3 -1
- package/dist/core/components/single-line-comment.mjs.map +1 -1
- package/dist/core/components/single-line-comment.test.cjs +16 -0
- package/dist/core/components/single-line-comment.test.d.cts +1 -0
- package/dist/core/components/single-line-comment.test.d.mts +1 -0
- package/dist/core/components/single-line-comment.test.mjs +18 -0
- package/dist/core/components/single-line-comment.test.mjs.map +1 -0
- package/dist/core/components/source-file.cjs +8 -1
- package/dist/core/components/source-file.mjs +3 -1
- package/dist/core/components/source-file.mjs.map +1 -1
- package/dist/core/components/source-file.test.cjs +16 -0
- package/dist/core/components/source-file.test.d.cts +1 -0
- package/dist/core/components/source-file.test.d.mts +1 -0
- package/dist/core/components/source-file.test.mjs +18 -0
- package/dist/core/components/source-file.test.mjs.map +1 -0
- package/dist/core/components/spacing.cjs +9 -1
- package/dist/core/components/spacing.d.cts.map +1 -1
- package/dist/core/components/spacing.d.mts.map +1 -1
- package/dist/core/components/spacing.mjs +3 -1
- package/dist/core/components/spacing.mjs.map +1 -1
- package/dist/core/components/spacing.test.cjs +16 -0
- package/dist/core/components/spacing.test.d.cts +1 -0
- package/dist/core/components/spacing.test.d.mts +1 -0
- package/dist/core/components/spacing.test.mjs +18 -0
- package/dist/core/components/spacing.test.mjs.map +1 -0
- package/dist/core/contexts/context.cjs +13 -0
- package/dist/core/contexts/context.d.cts.map +1 -1
- package/dist/core/contexts/context.d.mts.map +1 -1
- package/dist/core/contexts/context.mjs +8 -1
- package/dist/core/contexts/context.mjs.map +1 -1
- package/dist/core/contexts/context.test.cjs +16 -0
- package/dist/core/contexts/context.test.d.cts +1 -0
- package/dist/core/contexts/context.test.d.mts +1 -0
- package/dist/core/contexts/context.test.mjs +18 -0
- package/dist/core/contexts/context.test.mjs.map +1 -0
- package/dist/core/contexts/meta.cjs +13 -0
- package/dist/core/contexts/meta.d.cts.map +1 -1
- package/dist/core/contexts/meta.d.mts.map +1 -1
- package/dist/core/contexts/meta.mjs +8 -1
- package/dist/core/contexts/meta.mjs.map +1 -1
- package/dist/core/contexts/meta.test.cjs +16 -0
- package/dist/core/contexts/meta.test.d.cts +1 -0
- package/dist/core/contexts/meta.test.d.mts +1 -0
- package/dist/core/contexts/meta.test.mjs +18 -0
- package/dist/core/contexts/meta.test.mjs.map +1 -0
- package/dist/core/contexts/schema.cjs +13 -0
- package/dist/core/contexts/schema.d.cts.map +1 -1
- package/dist/core/contexts/schema.d.mts.map +1 -1
- package/dist/core/contexts/schema.mjs +8 -1
- package/dist/core/contexts/schema.mjs.map +1 -1
- package/dist/core/contexts/schema.test.cjs +16 -0
- package/dist/core/contexts/schema.test.d.cts +1 -0
- package/dist/core/contexts/schema.test.d.mts +1 -0
- package/dist/core/contexts/schema.test.mjs +18 -0
- package/dist/core/contexts/schema.test.mjs.map +1 -0
- package/dist/core/helpers/code.cjs +9 -1
- package/dist/core/helpers/code.mjs +3 -1
- package/dist/core/helpers/code.mjs.map +1 -1
- package/dist/core/helpers/code.test.cjs +16 -0
- package/dist/core/helpers/code.test.d.cts +1 -0
- package/dist/core/helpers/code.test.d.mts +1 -0
- package/dist/core/helpers/code.test.mjs +18 -0
- package/dist/core/helpers/code.test.mjs.map +1 -0
- package/dist/hcl/components/block-declaration.cjs +9 -1
- package/dist/hcl/components/block-declaration.mjs +3 -1
- package/dist/hcl/components/block-declaration.mjs.map +1 -1
- package/dist/hcl/components/block-declaration.test.cjs +16 -0
- package/dist/hcl/components/block-declaration.test.d.cts +1 -0
- package/dist/hcl/components/block-declaration.test.d.mts +1 -0
- package/dist/hcl/components/block-declaration.test.mjs +18 -0
- package/dist/hcl/components/block-declaration.test.mjs.map +1 -0
- package/dist/hcl/components/hcl-file.cjs +12 -1
- package/dist/hcl/components/hcl-file.mjs +6 -1
- package/dist/hcl/components/hcl-file.mjs.map +1 -1
- package/dist/hcl/components/hcl-file.test.cjs +16 -0
- package/dist/hcl/components/hcl-file.test.d.cts +1 -0
- package/dist/hcl/components/hcl-file.test.d.mts +1 -0
- package/dist/hcl/components/hcl-file.test.mjs +18 -0
- package/dist/hcl/components/hcl-file.test.mjs.map +1 -0
- package/dist/hcl/components/packer-file.cjs +9 -1
- package/dist/hcl/components/packer-file.mjs +3 -1
- package/dist/hcl/components/packer-file.mjs.map +1 -1
- package/dist/hcl/components/packer-file.test.cjs +16 -0
- package/dist/hcl/components/packer-file.test.d.cts +1 -0
- package/dist/hcl/components/packer-file.test.d.mts +1 -0
- package/dist/hcl/components/packer-file.test.mjs +18 -0
- package/dist/hcl/components/packer-file.test.mjs.map +1 -0
- package/dist/hcl/components/terraform-file.cjs +9 -1
- package/dist/hcl/components/terraform-file.mjs +3 -1
- package/dist/hcl/components/terraform-file.mjs.map +1 -1
- package/dist/hcl/components/terraform-file.test.cjs +16 -0
- package/dist/hcl/components/terraform-file.test.d.cts +1 -0
- package/dist/hcl/components/terraform-file.test.d.mts +1 -0
- package/dist/hcl/components/terraform-file.test.mjs +18 -0
- package/dist/hcl/components/terraform-file.test.mjs.map +1 -0
- package/dist/helpers/capnp.cjs +24 -0
- package/dist/helpers/capnp.d.cts.map +1 -1
- package/dist/helpers/capnp.d.mts.map +1 -1
- package/dist/helpers/capnp.mjs +20 -1
- package/dist/helpers/capnp.mjs.map +1 -1
- package/dist/helpers/capnp.test.cjs +16 -0
- package/dist/helpers/capnp.test.d.cts +1 -0
- package/dist/helpers/capnp.test.d.mts +1 -0
- package/dist/helpers/capnp.test.mjs +18 -0
- package/dist/helpers/capnp.test.mjs.map +1 -0
- package/dist/helpers/create-builtin.cjs +9 -1
- package/dist/helpers/create-builtin.d.cts.map +1 -1
- package/dist/helpers/create-builtin.d.mts.map +1 -1
- package/dist/helpers/create-builtin.mjs +3 -1
- package/dist/helpers/create-builtin.mjs.map +1 -1
- package/dist/helpers/create-builtin.test.cjs +16 -0
- package/dist/helpers/create-builtin.test.d.cts +1 -0
- package/dist/helpers/create-builtin.test.d.mts +1 -0
- package/dist/helpers/create-builtin.test.mjs +18 -0
- package/dist/helpers/create-builtin.test.mjs.map +1 -0
- package/dist/helpers/refkey.cjs +1 -0
- package/dist/helpers/refkey.d.cts.map +1 -1
- package/dist/helpers/refkey.d.mts.map +1 -1
- package/dist/helpers/refkey.mjs +1 -0
- package/dist/helpers/refkey.mjs.map +1 -1
- package/dist/helpers/refkey.test.cjs +30 -0
- package/dist/helpers/refkey.test.d.cts +1 -0
- package/dist/helpers/refkey.test.d.mts +1 -0
- package/dist/helpers/refkey.test.mjs +32 -0
- package/dist/helpers/refkey.test.mjs.map +1 -0
- package/dist/helpers/typescript.cjs +9 -1
- package/dist/helpers/typescript.d.cts.map +1 -1
- package/dist/helpers/typescript.d.mts.map +1 -1
- package/dist/helpers/typescript.mjs +3 -1
- package/dist/helpers/typescript.mjs.map +1 -1
- package/dist/helpers/typescript.test.cjs +16 -0
- package/dist/helpers/typescript.test.d.cts +1 -0
- package/dist/helpers/typescript.test.d.mts +1 -0
- package/dist/helpers/typescript.test.mjs +18 -0
- package/dist/helpers/typescript.test.mjs.map +1 -0
- package/dist/markdown/components/front-matter.cjs +9 -1
- package/dist/markdown/components/front-matter.mjs +3 -1
- package/dist/markdown/components/front-matter.mjs.map +1 -1
- package/dist/markdown/components/front-matter.test.cjs +16 -0
- package/dist/markdown/components/front-matter.test.d.cts +1 -0
- package/dist/markdown/components/front-matter.test.d.mts +1 -0
- package/dist/markdown/components/front-matter.test.mjs +18 -0
- package/dist/markdown/components/front-matter.test.mjs.map +1 -0
- package/dist/markdown/components/heading.cjs +9 -1
- package/dist/markdown/components/heading.mjs +3 -1
- package/dist/markdown/components/heading.mjs.map +1 -1
- package/dist/markdown/components/heading.test.cjs +16 -0
- package/dist/markdown/components/heading.test.d.cts +1 -0
- package/dist/markdown/components/heading.test.d.mts +1 -0
- package/dist/markdown/components/heading.test.mjs +18 -0
- package/dist/markdown/components/heading.test.mjs.map +1 -0
- package/dist/markdown/components/markdown-file.cjs +12 -1
- package/dist/markdown/components/markdown-file.mjs +6 -1
- package/dist/markdown/components/markdown-file.mjs.map +1 -1
- package/dist/markdown/components/markdown-file.test.cjs +16 -0
- package/dist/markdown/components/markdown-file.test.d.cts +1 -0
- package/dist/markdown/components/markdown-file.test.d.mts +1 -0
- package/dist/markdown/components/markdown-file.test.mjs +18 -0
- package/dist/markdown/components/markdown-file.test.mjs.map +1 -0
- package/dist/markdown/components/markdown-table.cjs +13 -1
- package/dist/markdown/components/markdown-table.d.cts.map +1 -1
- package/dist/markdown/components/markdown-table.d.mts.map +1 -1
- package/dist/markdown/components/markdown-table.mjs +7 -1
- package/dist/markdown/components/markdown-table.mjs.map +1 -1
- package/dist/markdown/components/markdown-table.test.cjs +16 -0
- package/dist/markdown/components/markdown-table.test.d.cts +1 -0
- package/dist/markdown/components/markdown-table.test.d.mts +1 -0
- package/dist/markdown/components/markdown-table.test.mjs +18 -0
- package/dist/markdown/components/markdown-table.test.mjs.map +1 -0
- package/dist/markdown/contexts/markdown-table.cjs +13 -0
- package/dist/markdown/contexts/markdown-table.d.cts.map +1 -1
- package/dist/markdown/contexts/markdown-table.d.mts.map +1 -1
- package/dist/markdown/contexts/markdown-table.mjs +8 -1
- package/dist/markdown/contexts/markdown-table.mjs.map +1 -1
- package/dist/markdown/contexts/markdown-table.test.cjs +16 -0
- package/dist/markdown/contexts/markdown-table.test.d.cts +1 -0
- package/dist/markdown/contexts/markdown-table.test.d.mts +1 -0
- package/dist/markdown/contexts/markdown-table.test.mjs +18 -0
- package/dist/markdown/contexts/markdown-table.test.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.cjs +1487 -0
- package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.mjs +1473 -0
- package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.cjs +889 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.mjs +888 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs +1614 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs +1594 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/index.mjs +3 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/utils.mjs +3 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.cjs +923 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.mjs +922 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.cjs +391 -0
- package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.mjs +386 -0
- package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.cjs +82 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs +82 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.cjs +1358 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.mjs +1357 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.cjs +561 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.mjs +559 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.cjs +37 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.mjs +38 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.cjs +197 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.mjs +181 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.cjs +29 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.mjs +27 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.cjs +77 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.mjs +77 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.cjs +374 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.mjs +374 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.cjs +38 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.mjs +37 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.cjs +2978 -0
- package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs +2973 -0
- package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +939 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +940 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.cjs +87 -0
- package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.mjs +87 -0
- package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.cjs +6 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs +6 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.cjs +54 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs +52 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs +2696 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs +2697 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.cjs +47 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs +45 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs.map +1 -0
- package/dist/render.d.cts.map +1 -1
- package/dist/render.d.mts.map +1 -1
- package/dist/render.mjs.map +1 -1
- package/dist/typescript/components/builtin-file.cjs +9 -1
- package/dist/typescript/components/builtin-file.mjs +3 -1
- package/dist/typescript/components/builtin-file.mjs.map +1 -1
- package/dist/typescript/components/builtin-file.test.cjs +16 -0
- package/dist/typescript/components/builtin-file.test.d.cts +1 -0
- package/dist/typescript/components/builtin-file.test.d.mts +1 -0
- package/dist/typescript/components/builtin-file.test.mjs +18 -0
- package/dist/typescript/components/builtin-file.test.mjs.map +1 -0
- package/dist/typescript/components/class-declaration.cjs +16 -1
- package/dist/typescript/components/class-declaration.mjs +10 -1
- package/dist/typescript/components/class-declaration.mjs.map +1 -1
- package/dist/typescript/components/class-declaration.test.cjs +16 -0
- package/dist/typescript/components/class-declaration.test.d.cts +1 -0
- package/dist/typescript/components/class-declaration.test.d.mts +1 -0
- package/dist/typescript/components/class-declaration.test.mjs +18 -0
- package/dist/typescript/components/class-declaration.test.mjs.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.cjs +9 -1
- package/dist/typescript/components/dynamic-import-statement.mjs +3 -1
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.test.cjs +16 -0
- package/dist/typescript/components/dynamic-import-statement.test.d.cts +1 -0
- package/dist/typescript/components/dynamic-import-statement.test.d.mts +1 -0
- package/dist/typescript/components/dynamic-import-statement.test.mjs +18 -0
- package/dist/typescript/components/dynamic-import-statement.test.mjs.map +1 -0
- package/dist/typescript/components/entry-file.cjs +8 -1
- package/dist/typescript/components/entry-file.mjs +3 -1
- package/dist/typescript/components/entry-file.mjs.map +1 -1
- package/dist/typescript/components/entry-file.test.cjs +16 -0
- package/dist/typescript/components/entry-file.test.d.cts +1 -0
- package/dist/typescript/components/entry-file.test.d.mts +1 -0
- package/dist/typescript/components/entry-file.test.mjs +18 -0
- package/dist/typescript/components/entry-file.test.mjs.map +1 -0
- package/dist/typescript/components/interface-declaration.cjs +14 -1
- package/dist/typescript/components/interface-declaration.mjs +8 -1
- package/dist/typescript/components/interface-declaration.mjs.map +1 -1
- package/dist/typescript/components/interface-declaration.test.cjs +16 -0
- package/dist/typescript/components/interface-declaration.test.d.cts +1 -0
- package/dist/typescript/components/interface-declaration.test.d.mts +1 -0
- package/dist/typescript/components/interface-declaration.test.mjs +18 -0
- package/dist/typescript/components/interface-declaration.test.mjs.map +1 -0
- package/dist/typescript/components/object-declaration.cjs +12 -1
- package/dist/typescript/components/object-declaration.mjs +6 -1
- package/dist/typescript/components/object-declaration.mjs.map +1 -1
- package/dist/typescript/components/object-declaration.test.cjs +16 -0
- package/dist/typescript/components/object-declaration.test.d.cts +1 -0
- package/dist/typescript/components/object-declaration.test.d.mts +1 -0
- package/dist/typescript/components/object-declaration.test.mjs +18 -0
- package/dist/typescript/components/object-declaration.test.mjs.map +1 -0
- package/dist/typescript/components/property-name.cjs +9 -1
- package/dist/typescript/components/property-name.mjs +3 -1
- package/dist/typescript/components/property-name.mjs.map +1 -1
- package/dist/typescript/components/property-name.test.cjs +16 -0
- package/dist/typescript/components/property-name.test.d.cts +1 -0
- package/dist/typescript/components/property-name.test.d.mts +1 -0
- package/dist/typescript/components/property-name.test.mjs +18 -0
- package/dist/typescript/components/property-name.test.mjs.map +1 -0
- package/dist/typescript/components/record-expression.cjs +9 -1
- package/dist/typescript/components/record-expression.d.cts.map +1 -1
- package/dist/typescript/components/record-expression.d.mts.map +1 -1
- package/dist/typescript/components/record-expression.mjs +3 -1
- package/dist/typescript/components/record-expression.mjs.map +1 -1
- package/dist/typescript/components/record-expression.test.cjs +16 -0
- package/dist/typescript/components/record-expression.test.d.cts +1 -0
- package/dist/typescript/components/record-expression.test.d.mts +1 -0
- package/dist/typescript/components/record-expression.test.mjs +18 -0
- package/dist/typescript/components/record-expression.test.mjs.map +1 -0
- package/dist/typescript/components/tsdoc-schema.cjs +12 -1
- package/dist/typescript/components/tsdoc-schema.mjs +6 -1
- package/dist/typescript/components/tsdoc-schema.mjs.map +1 -1
- package/dist/typescript/components/tsdoc-schema.test.cjs +16 -0
- package/dist/typescript/components/tsdoc-schema.test.d.cts +1 -0
- package/dist/typescript/components/tsdoc-schema.test.d.mts +1 -0
- package/dist/typescript/components/tsdoc-schema.test.mjs +18 -0
- package/dist/typescript/components/tsdoc-schema.test.mjs.map +1 -0
- package/dist/typescript/components/tsdoc.cjs +32 -1
- package/dist/typescript/components/tsdoc.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc.mjs +26 -1
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/components/tsdoc.test.cjs +16 -0
- package/dist/typescript/components/tsdoc.test.d.cts +1 -0
- package/dist/typescript/components/tsdoc.test.d.mts +1 -0
- package/dist/typescript/components/tsdoc.test.mjs +18 -0
- package/dist/typescript/components/tsdoc.test.mjs.map +1 -0
- package/dist/typescript/components/type-declaration.cjs +9 -1
- package/dist/typescript/components/type-declaration.mjs +3 -1
- package/dist/typescript/components/type-declaration.mjs.map +1 -1
- package/dist/typescript/components/type-declaration.test.cjs +16 -0
- package/dist/typescript/components/type-declaration.test.d.cts +1 -0
- package/dist/typescript/components/type-declaration.test.d.mts +1 -0
- package/dist/typescript/components/type-declaration.test.mjs +18 -0
- package/dist/typescript/components/type-declaration.test.mjs.map +1 -0
- package/dist/typescript/components/type-parameters.cjs +9 -1
- package/dist/typescript/components/type-parameters.mjs +3 -1
- package/dist/typescript/components/type-parameters.mjs.map +1 -1
- package/dist/typescript/components/type-parameters.test.cjs +16 -0
- package/dist/typescript/components/type-parameters.test.d.cts +1 -0
- package/dist/typescript/components/type-parameters.test.d.mts +1 -0
- package/dist/typescript/components/type-parameters.test.mjs +18 -0
- package/dist/typescript/components/type-parameters.test.mjs.map +1 -0
- package/dist/typescript/components/typescript-file.cjs +13 -1
- package/dist/typescript/components/typescript-file.mjs +7 -1
- package/dist/typescript/components/typescript-file.mjs.map +1 -1
- package/dist/typescript/components/typescript-file.test.cjs +16 -0
- package/dist/typescript/components/typescript-file.test.d.cts +1 -0
- package/dist/typescript/components/typescript-file.test.d.mts +1 -0
- package/dist/typescript/components/typescript-file.test.mjs +18 -0
- package/dist/typescript/components/typescript-file.test.mjs.map +1 -0
- package/dist/typescript/contexts/lexical-scope.cjs +9 -1
- package/dist/typescript/contexts/lexical-scope.mjs +3 -1
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
- package/dist/typescript/contexts/lexical-scope.test.cjs +16 -0
- package/dist/typescript/contexts/lexical-scope.test.d.cts +1 -0
- package/dist/typescript/contexts/lexical-scope.test.d.mts +1 -0
- package/dist/typescript/contexts/lexical-scope.test.mjs +18 -0
- package/dist/typescript/contexts/lexical-scope.test.mjs.map +1 -0
- package/dist/typescript/contexts/member-scope.cjs +9 -1
- package/dist/typescript/contexts/member-scope.mjs +3 -1
- package/dist/typescript/contexts/member-scope.mjs.map +1 -1
- package/dist/typescript/contexts/member-scope.test.cjs +16 -0
- package/dist/typescript/contexts/member-scope.test.d.cts +1 -0
- package/dist/typescript/contexts/member-scope.test.d.mts +1 -0
- package/dist/typescript/contexts/member-scope.test.mjs +18 -0
- package/dist/typescript/contexts/member-scope.test.mjs.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.cjs +9 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs +3 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -1
- package/dist/typescript/helpers/get-call-signature-props.test.cjs +16 -0
- package/dist/typescript/helpers/get-call-signature-props.test.d.cts +1 -0
- package/dist/typescript/helpers/get-call-signature-props.test.d.mts +1 -0
- package/dist/typescript/helpers/get-call-signature-props.test.mjs +18 -0
- package/dist/typescript/helpers/get-call-signature-props.test.mjs.map +1 -0
- package/dist/typescript/helpers/utilities.cjs +9 -1
- package/dist/typescript/helpers/utilities.mjs +4 -1
- package/dist/typescript/helpers/utilities.mjs.map +1 -1
- package/dist/typescript/helpers/utilities.test.cjs +16 -0
- package/dist/typescript/helpers/utilities.test.d.cts +1 -0
- package/dist/typescript/helpers/utilities.test.d.mts +1 -0
- package/dist/typescript/helpers/utilities.test.mjs +18 -0
- package/dist/typescript/helpers/utilities.test.mjs.map +1 -0
- package/dist/yaml/components/yaml-file.cjs +12 -1
- package/dist/yaml/components/yaml-file.mjs +6 -1
- package/dist/yaml/components/yaml-file.mjs.map +1 -1
- package/dist/yaml/components/yaml-file.test.cjs +16 -0
- package/dist/yaml/components/yaml-file.test.d.cts +1 -0
- package/dist/yaml/components/yaml-file.test.d.mts +1 -0
- package/dist/yaml/components/yaml-file.test.mjs +18 -0
- package/dist/yaml/components/yaml-file.test.mjs.map +1 -0
- package/package.json +590 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc-schema.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.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 childrenArray,\n computed,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { getPrimarySchemaType, JsonSchema } from \"@powerlines/schema\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { TSDoc, TSDocAttributesTags, TSDocProps } from \"./tsdoc\";\n\nexport interface TSDocObjectSchemaProps extends TSDocProps {\n schema: JsonSchema;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocObjectSchema(props: TSDocObjectSchemaProps) {\n const [{ children, heading, schema }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"schema\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const title = computed(() => schema?.title || titleCase(schema?.name));\n const computedHeading = computed(\n () => heading || schema?.description || title.value\n );\n\n const alias = computed(() => schema?.alias);\n const tags = computed(() => schema?.tags);\n const readOnly = computed(() => schema?.readOnly);\n const internal = computed(() => schema?.internal);\n const runtime = computed(() => schema?.runtime);\n const ignore = computed(() => schema?.ignore);\n const hidden = computed(() => schema?.hidden);\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(tags.value) && tags.value.length > 0) ||\n !isUndefined(readOnly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(runtime.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType(schema)}\n title={title.value}\n alias={alias.value}\n tags={tags.value}\n readOnly={Boolean(readOnly.value)}\n internal={Boolean(internal.value)}\n runtime={Boolean(runtime.value)}\n ignore={Boolean(ignore.value)}\n hidden={Boolean(hidden.value)}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\nexport interface TSDocSchemaPropertyProps extends TSDocProps {\n schema: JsonSchema;\n defaultValue?: unknown;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocSchemaProperty(props: TSDocSchemaPropertyProps) {\n const [{ children, schema, defaultValue }, rest] = splitProps(props, [\n \"children\",\n \"schema\",\n \"defaultValue\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(schema?.title) ||\n (!isUndefined(schema?.alias) && schema?.alias.length > 0) ||\n (!isUndefined(schema?.tags) && schema?.tags.length > 0) ||\n !isUndefined(schema?.readOnly) ||\n !isUndefined(schema?.internal) ||\n !isUndefined(schema?.runtime) ||\n !isUndefined(schema?.ignore) ||\n !isUndefined(schema?.hidden) ||\n !isUndefined(defaultValue)\n );\n\n return (\n <TSDoc heading={schema?.description} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType(schema)}\n title={schema?.title}\n alias={schema?.alias}\n tags={schema?.tags}\n readOnly={schema?.readOnly}\n internal={schema?.internal}\n runtime={schema?.runtime}\n ignore={schema?.ignore}\n hidden={schema?.hidden}\n default={defaultValue}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n// export interface TSDocReflectionMethodProps extends TSDocProps {\n// reflection: ReflectionMethod;\n// }\n\n// /**\n// * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n// */\n// export function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n// const [{ children, reflection }, rest] = splitProps(props, [\n// \"children\",\n// \"reflection\"\n// ]);\n\n// if (!isSetObject(reflection)) {\n// return null;\n// }\n\n// const heading = computed(\n// () =>\n// reflection.getDescription() ||\n// (isString(reflection.getName())\n// ? code`${String(reflection.getName())} method definition`\n// : undefined)\n// );\n\n// return (\n// <TSDoc heading={heading.value} {...rest}>\n// <TSDocAttributesTags\n// title={reflection.getTitle()}\n// alias={reflection.getAlias()}\n// resourceId={reflection.getDomain()}\n// permission={reflection.getPermission()}\n// isReadonly={reflection.isReadonly()}\n// isInternal={reflection.isInternal()}\n// isRuntime={reflection.isRuntime()}\n// isIgnored={reflection.isIgnored()}\n// isHidden={reflection.isHidden()}\n// />\n// <Show\n// when={Boolean(children) && childrenArray(() => children).length > 0}>\n// <List>{childrenArray(() => children)}</List>\n// </Show>\n// <Show when={reflection.getParameters().length > 0}>\n// <Spacing />\n// <For each={reflection.getParameters()} hardline ender={<hbr />}>\n// {param => (\n// <TSDocParam\n// name={param.getName()}\n// optional={param.isOptional()}\n// defaultValue={\n// param.hasDefault() ? param.getDefaultValue() : undefined\n// }>\n// <Show\n// when={Boolean(param.parameter.description)}\n// fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n// {param.parameter.description}\n// </Show>\n// </TSDocParam>\n// )}\n// </For>\n// </Show>\n// <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n// <Spacing />\n// <TSDocReturns>\n// {code`The return value of the function, which is of type ${stringifyType(\n// reflection.getReturnType()\n// )}.`}\n// </TSDocReturns>\n// </Show>\n// </TSDoc>\n// );\n// }\n\n// /**\n// * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n// */\n// export function TSDocContextMethod(props: TSDocProps) {\n// const reflection = useReflectionMethod();\n\n// return (\n// <Show when={isSetObject(reflection)}>\n// <TSDocReflectionMethod {...props} reflection={reflection} />\n// </Show>\n// );\n// }\n"],"mappings":";;;;;;;;;;;;;;AA8BA,SAAgB,kBAAe,OAAK;CACpC,MAAQ,CAAC,YAET,SACE,UACF,QAAA,WAAA,OAAA;EAAA;EAAA;EAAA;CAAA,CAAA;2BAEE,OAAA;CAEA,MAAA,QAAA,eAAA,QAAA,SAAA,UAAA,QAAA,IAAA,CAAA;CACF,MAAO,kBAAS,eAAyB,WAAA,QAAA,eAAwB,MAAA,KAAA;CAC/D,MAAM,QAAG,eAAmB,QAAS,KAAK;CAC1C,MAAG,OAAQ,eAAA,QAAA,IAAA;CACX,MAAG,WAAS,eAAA,QAAA,QAAA;CACZ,MAAG,WAAM,eAAA,QAAA,QAAA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OAAO,QAAQ;KACf;KACA,IAAM,UAAQ;MACd,OAAU,QAAQ;KAClB;KACA,IAAA,SAAe;MACf,OAAQ,QAAQ;KAChB;KACA,IAAA,SAAS;MACV,OAAA,QAAA;KACG;KACL,WAAA;IACC,CAAA;GACA;EACF,CAAC,GAAG,gBAAkB,MAAE;GACtB,IAAC,OAAA;IACA,OAAK,WAAM,CAAA,CAAA,CAAa,YAAO,QAAA,CAAA,EAAA,KAAA,oBAAA,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;GAChC;GACA,IAAE,WAAI;IACL,OAAM,CAAA,gBAAoB,MAAA;KACvB,IAAA,OAAA;MACD,OAAA,cAAA;KACR;KACH,IAAA,WAAA;;KAEU;IACL,CAAA,GAAA,gBAAY,MAAgB,EAC9B,IAAA,WAAA;;IAEE,EACC,CAAA,CAAA;GACD;EACF,CAAA,CAAA;CACC,EACF,CAAC,CAAC;AACJ"}
|
|
1
|
+
{"version":3,"file":"tsdoc-schema.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.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 childrenArray,\n computed,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { getPrimarySchemaType, JsonSchema } from \"@powerlines/schema\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { TSDoc, TSDocAttributesTags, TSDocProps } from \"./tsdoc\";\n\nexport interface TSDocObjectSchemaProps extends TSDocProps {\n schema: JsonSchema;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocObjectSchema(props: TSDocObjectSchemaProps) {\n const [{ children, heading, schema }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"schema\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const title = computed(() => schema?.title || titleCase(schema?.name));\n const computedHeading = computed(\n () => heading || schema?.description || title.value\n );\n\n const alias = computed(() => schema?.alias);\n const tags = computed(() => schema?.tags);\n const readOnly = computed(() => schema?.readOnly);\n const internal = computed(() => schema?.internal);\n const runtime = computed(() => schema?.runtime);\n const ignore = computed(() => schema?.ignore);\n const hidden = computed(() => schema?.hidden);\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(tags.value) && tags.value.length > 0) ||\n !isUndefined(readOnly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(runtime.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType(schema)}\n title={title.value}\n alias={alias.value}\n tags={tags.value}\n readOnly={Boolean(readOnly.value)}\n internal={Boolean(internal.value)}\n runtime={Boolean(runtime.value)}\n ignore={Boolean(ignore.value)}\n hidden={Boolean(hidden.value)}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\nexport interface TSDocSchemaPropertyProps extends TSDocProps {\n schema: JsonSchema;\n defaultValue?: unknown;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocSchemaProperty(props: TSDocSchemaPropertyProps) {\n const [{ children, schema, defaultValue }, rest] = splitProps(props, [\n \"children\",\n \"schema\",\n \"defaultValue\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(schema?.title) ||\n (!isUndefined(schema?.alias) && schema?.alias.length > 0) ||\n (!isUndefined(schema?.tags) && schema?.tags.length > 0) ||\n !isUndefined(schema?.readOnly) ||\n !isUndefined(schema?.internal) ||\n !isUndefined(schema?.runtime) ||\n !isUndefined(schema?.ignore) ||\n !isUndefined(schema?.hidden) ||\n !isUndefined(defaultValue)\n );\n\n return (\n <TSDoc heading={schema?.description} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType(schema)}\n title={schema?.title}\n alias={schema?.alias}\n tags={schema?.tags}\n readOnly={schema?.readOnly}\n internal={schema?.internal}\n runtime={schema?.runtime}\n ignore={schema?.ignore}\n hidden={schema?.hidden}\n default={defaultValue}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n// export interface TSDocReflectionMethodProps extends TSDocProps {\n// reflection: ReflectionMethod;\n// }\n\n// /**\n// * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n// */\n// export function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n// const [{ children, reflection }, rest] = splitProps(props, [\n// \"children\",\n// \"reflection\"\n// ]);\n\n// if (!isSetObject(reflection)) {\n// return null;\n// }\n\n// const heading = computed(\n// () =>\n// reflection.getDescription() ||\n// (isString(reflection.getName())\n// ? code`${String(reflection.getName())} method definition`\n// : undefined)\n// );\n\n// return (\n// <TSDoc heading={heading.value} {...rest}>\n// <TSDocAttributesTags\n// title={reflection.getTitle()}\n// alias={reflection.getAlias()}\n// resourceId={reflection.getDomain()}\n// permission={reflection.getPermission()}\n// isReadonly={reflection.isReadonly()}\n// isInternal={reflection.isInternal()}\n// isRuntime={reflection.isRuntime()}\n// isIgnored={reflection.isIgnored()}\n// isHidden={reflection.isHidden()}\n// />\n// <Show\n// when={Boolean(children) && childrenArray(() => children).length > 0}>\n// <List>{childrenArray(() => children)}</List>\n// </Show>\n// <Show when={reflection.getParameters().length > 0}>\n// <Spacing />\n// <For each={reflection.getParameters()} hardline ender={<hbr />}>\n// {param => (\n// <TSDocParam\n// name={param.getName()}\n// optional={param.isOptional()}\n// defaultValue={\n// param.hasDefault() ? param.getDefaultValue() : undefined\n// }>\n// <Show\n// when={Boolean(param.parameter.description)}\n// fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n// {param.parameter.description}\n// </Show>\n// </TSDocParam>\n// )}\n// </For>\n// </Show>\n// <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n// <Spacing />\n// <TSDocReturns>\n// {code`The return value of the function, which is of type ${stringifyType(\n// reflection.getReturnType()\n// )}.`}\n// </TSDocReturns>\n// </Show>\n// </TSDoc>\n// );\n// }\n\n// /**\n// * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n// */\n// export function TSDocContextMethod(props: TSDocProps) {\n// const reflection = useReflectionMethod();\n\n// return (\n// <Show when={isSetObject(reflection)}>\n// <TSDocReflectionMethod {...props} reflection={reflection} />\n// </Show>\n// );\n// }\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,kBAAe,OAAK;CACpC,MAAQ,CAAC,YAET,SACE,UACF,QAAA,WAAA,OAAA;EAAA;EAAA;EAAA;CAAA,CAAA;2BAEE,OAAA;CAEA,MAAA,QAAA,eAAA,QAAA,SAAA,UAAA,QAAA,IAAA,CAAA;CACF,MAAO,kBAAS,eAAyB,WAAA,QAAA,eAAwB,MAAA,KAAA;CAC/D,MAAM,QAAG,eAAmB,QAAS,KAAK;CAC1C,MAAG,OAAQ,eAAA,QAAA,IAAA;CACX,MAAG,WAAS,eAAA,QAAA,QAAA;CACZ,MAAG,WAAM,eAAA,QAAA,QAAA;CACT,MAAE,UAAA,eAAA,QAAA,OAAA;;CAEF,MAAK,SAAA,eAAqB,QAAA,MAAA;CAC1B,IAAE,CAAA,gBAAW,SAAA,YAAA,gBAAA,KAAA,KAAA,gBAAA,MAAA,KAAA,MAAA,IACb,OAAA;CAEA,MAAM,gBAAgB,eAAe,YAAS,MAAS,KAAC,KAAQ,CAAA,YAAM,MAAA,KAAA,KAAA,MAAA,MAAA,SAAA,KAAA,CAAA,YAAA,KAAA,KAAA,KAAA,KAAA,MAAA,SAAA,KAAA,CAAA,YAAA,SAAA,KAAA,KAAA,CAAA,YAAA,SAAA,KAAA,KAAA,CAAA,YAAA,QAAA,KAAA,KAAA,CAAA,YAAA,OAAA,KAAA,KAAA,CAAA,YAAA,OAAA,KAAA,CAAA;CACtE,OAAM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AA;;IAEE,EACC,CAAA,CAAA;GACD;EACF,CAAA,CAAA;CACC,EACF,CAAC,CAAC;AACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_chunk_artifact = require('../../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs');
|
|
2
|
+
const require_test_DNmyFkvJ = require('../../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs');
|
|
3
|
+
const require_typescript_components_tsdoc_schema = require('./tsdoc-schema.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc-schema.test.ts
|
|
6
|
+
require_chunk_artifact.describe("plugins/plugin-alloy/src/typescript/components/tsdoc-schema.tsx", () => {
|
|
7
|
+
require_chunk_artifact.it("loads module exports", () => {
|
|
8
|
+
require_test_DNmyFkvJ.globalExpect(require_typescript_components_tsdoc_schema.tsdoc_schema_exports).toBeDefined();
|
|
9
|
+
require_test_DNmyFkvJ.globalExpect(typeof require_typescript_components_tsdoc_schema.tsdoc_schema_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
require_chunk_artifact.it("has at least one runtime export", () => {
|
|
12
|
+
require_test_DNmyFkvJ.globalExpect(Object.keys(require_typescript_components_tsdoc_schema.tsdoc_schema_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, it } from "../../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs";
|
|
2
|
+
import { globalExpect } from "../../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs";
|
|
3
|
+
import { tsdoc_schema_exports } from "./tsdoc-schema.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc-schema.test.ts
|
|
6
|
+
describe("plugins/plugin-alloy/src/typescript/components/tsdoc-schema.tsx", () => {
|
|
7
|
+
it("loads module exports", () => {
|
|
8
|
+
globalExpect(tsdoc_schema_exports).toBeDefined();
|
|
9
|
+
globalExpect(typeof tsdoc_schema_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
it("has at least one runtime export", () => {
|
|
12
|
+
globalExpect(Object.keys(tsdoc_schema_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { };
|
|
18
|
+
//# sourceMappingURL=tsdoc-schema.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsdoc-schema.test.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./tsdoc-schema\";\n\ndescribe(\"plugins/plugin-alloy/src/typescript/components/tsdoc-schema.tsx\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;CAGA,GAAA,8BAAmC;EAC/B,aAAO,oBAAQ,EAAO,YAAS;EAC/B,aAAO,OAAA,oBAAe,EAAA,KAAY,QAAC;CACrC,CAAC;CACD,GAAE,yCAAA;;CAEF,CAAA;AACF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
3
4
|
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
4
5
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
@@ -8,6 +9,30 @@ let _powerlines_schema = require("@powerlines/schema");
|
|
|
8
9
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
9
10
|
|
|
10
11
|
//#region src/typescript/components/tsdoc.tsx
|
|
12
|
+
var tsdoc_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
13
|
+
TSDoc: () => TSDoc,
|
|
14
|
+
TSDocAlias: () => TSDocAlias,
|
|
15
|
+
TSDocAttributesTags: () => TSDocAttributesTags,
|
|
16
|
+
TSDocDefaultValue: () => TSDocDefaultValue,
|
|
17
|
+
TSDocDomain: () => TSDocDomain,
|
|
18
|
+
TSDocExample: () => TSDocExample,
|
|
19
|
+
TSDocGroup: () => TSDocGroup,
|
|
20
|
+
TSDocHidden: () => TSDocHidden,
|
|
21
|
+
TSDocIgnore: () => TSDocIgnore,
|
|
22
|
+
TSDocInternal: () => TSDocInternal,
|
|
23
|
+
TSDocLink: () => TSDocLink,
|
|
24
|
+
TSDocModule: () => TSDocModule,
|
|
25
|
+
TSDocParam: () => TSDocParam,
|
|
26
|
+
TSDocParams: () => TSDocParams,
|
|
27
|
+
TSDocPermission: () => TSDocPermission,
|
|
28
|
+
TSDocReadonly: () => TSDocReadonly,
|
|
29
|
+
TSDocRemarks: () => TSDocRemarks,
|
|
30
|
+
TSDocReturns: () => TSDocReturns,
|
|
31
|
+
TSDocRuntime: () => TSDocRuntime,
|
|
32
|
+
TSDocTag: () => TSDocTag,
|
|
33
|
+
TSDocThrows: () => TSDocThrows,
|
|
34
|
+
TSDocTitle: () => TSDocTitle
|
|
35
|
+
});
|
|
11
36
|
/**
|
|
12
37
|
* Generates a TypeScript interface for the given reflection class.
|
|
13
38
|
*/
|
|
@@ -493,4 +518,10 @@ exports.TSDocReturns = TSDocReturns;
|
|
|
493
518
|
exports.TSDocRuntime = TSDocRuntime;
|
|
494
519
|
exports.TSDocTag = TSDocTag;
|
|
495
520
|
exports.TSDocThrows = TSDocThrows;
|
|
496
|
-
exports.TSDocTitle = TSDocTitle;
|
|
521
|
+
exports.TSDocTitle = TSDocTitle;
|
|
522
|
+
Object.defineProperty(exports, 'tsdoc_exports', {
|
|
523
|
+
enumerable: true,
|
|
524
|
+
get: function () {
|
|
525
|
+
return tsdoc_exports;
|
|
526
|
+
}
|
|
527
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAqCiB,UAAA,SAAmB,cAAc;EAChD,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA6BtB,aAAA,SAAsB,cAAc;EACnD,GAAG;AAAA;AApCe;AAMpB;;AANoB,iBA0CJ,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAAA,EAAY,mBAAmB;AAAA;;;AArDM;iBA2DvB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;iBA2BnC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AAlDhD;;;AAAA,iBA+DgB,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAajC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AA5EH;AAgB7C;;AAhB6C,iBAyF7B,eAAA,CAAgB,KAAA,EAAO,cAAA,GAAc,QAAA;;AAxEpB;AAMjC;iBA+EgB,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAU/B,sBAAA,S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WAAA,IAAW,QAAA;;;AA1H0B;iBAiIrC,WAAA,IAAW,QAAA;;;;iBAOX,YAAA,IAAY,QAAA;AAAA,UAIX,wBAAA;EACf,IAAA,GAAO,uBAAuB;EAC9B,OAAA;EACA,KAAA;EACA,KAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EACA,MAAA;EACA,MAAA;EACA,OAAA;AAAA;;AA7HY;AAMd;iBA6HgB,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,QAAA;AAAA,UA6ElD,eAAA;EACf,IAAA,EAAM,QAAA;EACN,QAAA,GAAW,QAAA;EACX,QAAA;EACA,OAAA,GAAU,QAAA;AAAA;AA9MmD;AAkB/D;;AAlB+D,iBAoN/C,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;;iBAiDjC,YAAA,CAAa,KAAA,EAAO,cAAA,GAAc,QAAA;;AAnPA;AAelD;iBA2OgB,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAIhC,gBAAA,SAAyB,cAAc;EA/OT;;;;;AAAA;AAI/C;;;;AAMK;AAML;;EA6OE,MAAA;EA7OmD;;;;;AAAA;AA4BrD;;;;AAA6B;EA8N3B,IAAA,EAAM,QAAA;AAAA;;;AAvNqB;iBA6Nb,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
1
2
|
import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
|
|
2
3
|
import { Spacing } from "../../core/components/spacing.mjs";
|
|
3
4
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
@@ -7,6 +8,30 @@ import { stringifyValue } from "@powerlines/schema";
|
|
|
7
8
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
8
9
|
|
|
9
10
|
//#region src/typescript/components/tsdoc.tsx
|
|
11
|
+
var tsdoc_exports = /* @__PURE__ */ __exportAll({
|
|
12
|
+
TSDoc: () => TSDoc,
|
|
13
|
+
TSDocAlias: () => TSDocAlias,
|
|
14
|
+
TSDocAttributesTags: () => TSDocAttributesTags,
|
|
15
|
+
TSDocDefaultValue: () => TSDocDefaultValue,
|
|
16
|
+
TSDocDomain: () => TSDocDomain,
|
|
17
|
+
TSDocExample: () => TSDocExample,
|
|
18
|
+
TSDocGroup: () => TSDocGroup,
|
|
19
|
+
TSDocHidden: () => TSDocHidden,
|
|
20
|
+
TSDocIgnore: () => TSDocIgnore,
|
|
21
|
+
TSDocInternal: () => TSDocInternal,
|
|
22
|
+
TSDocLink: () => TSDocLink,
|
|
23
|
+
TSDocModule: () => TSDocModule,
|
|
24
|
+
TSDocParam: () => TSDocParam,
|
|
25
|
+
TSDocParams: () => TSDocParams,
|
|
26
|
+
TSDocPermission: () => TSDocPermission,
|
|
27
|
+
TSDocReadonly: () => TSDocReadonly,
|
|
28
|
+
TSDocRemarks: () => TSDocRemarks,
|
|
29
|
+
TSDocReturns: () => TSDocReturns,
|
|
30
|
+
TSDocRuntime: () => TSDocRuntime,
|
|
31
|
+
TSDocTag: () => TSDocTag,
|
|
32
|
+
TSDocThrows: () => TSDocThrows,
|
|
33
|
+
TSDocTitle: () => TSDocTitle
|
|
34
|
+
});
|
|
10
35
|
/**
|
|
11
36
|
* Generates a TypeScript interface for the given reflection class.
|
|
12
37
|
*/
|
|
@@ -471,5 +496,5 @@ function TSDocModule(props) {
|
|
|
471
496
|
}
|
|
472
497
|
|
|
473
498
|
//#endregion
|
|
474
|
-
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocThrows, TSDocTitle };
|
|
499
|
+
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocThrows, TSDocTitle, tsdoc_exports };
|
|
475
500
|
//# sourceMappingURL=tsdoc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.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 Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport type { JsonSchemaPrimitiveType } from \"@powerlines/schema\";\nimport { stringifyValue } from \"@powerlines/schema\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@group` tag.\n */\nexport function TSDocGroup(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"group\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type?: JsonSchemaPrimitiveType | string;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyValue(defaultValue, type)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={false} softline={true}>\n {childrenArray(() => props.children)}\n </List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\n/**\n * Create a TSDoc `@runtime` tag.\n */\nexport function TSDocRuntime() {\n return <TSDocTag tag=\"runtime\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: JsonSchemaPrimitiveType | string;\n default?: any;\n title?: string;\n alias?: string[];\n tags?: string[];\n readOnly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n runtime?: boolean;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n tags,\n readOnly,\n internal,\n ignore,\n hidden,\n runtime,\n default: defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"tags\",\n \"readOnly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"runtime\",\n \"default\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show\n when={\n !isUndefined(tags) &&\n tags.length > 0 &&\n tags.some(g => isSetString(g?.trim()))\n }>\n <For each={tags?.filter(g => isSetString(g?.trim())) ?? []}>\n {tag => <TSDocGroup>{tag}</TSDocGroup>}\n </For>\n </Show>\n <Show when={readOnly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={runtime === true}>\n <TSDocRuntime />\n </Show>\n <Show\n when={\n runtime !== true && !isUndefined(type) && !isUndefined(defaultValue)\n }>\n <TSDocDefaultValue type={type} defaultValue={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n default?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n default={props.default}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n default?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.default)}>={props.default}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework?.name || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,SAAc,MAAA,OAAA;CACd,MAAQ,CAAC,EACT,UACA,aACO,WAAW,OAAO,CAAC,YAAU,SAAW,CAAA;CAC/C,OAAS;EAAA;EAAA,gBAA0B,SAAM;GACzC,QAAY;;IAEN,OAAC;KAAA,gBAAqB,OAAQ,CAAA,CAAA;KAAA,gBAAe,MAAA;MACjD,IAAU,OAAA;OACZ,OAAA,CAAA,YAAA,OAAA;;MAEE,UAAA;KACC,CAAA;KAAA,gBAAuB,MAAA;MACxB,IAAA,OAAA;OACK,OAAS,WAAa,CAAA,CAAA,CAAA,YAAY,QAAA,CAAA,EAAA,KAAA,oBAAA,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;MACjC;;OAEC,OAAA,CAAA,gBAAA,MAAA;QACJ,IAAA,OAAA;SACG,OAAA,CAAA,YAAA,OAAA;QACI;QACA,IAAE,W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M,CAAC,EACT,gBAEA,YACI,WAAA,OAAA;EAAA;EAAA;EAAA;CAAA,CAAA;CACF,MAAM,UAAQ,kBAAgB;CAC9B,OAAC;EAAA;EAAA,gBAAA,SAAA;GACC,QAAE;GACF,IAAC,WAAc;IAChB,OAAA;KAAA,gBAAA,OAAA,CAAA,CAAA;KAAA,gBAAA,MAAA;MACG,IAAA,OAAA;OACE,OAAA,QAAA,QAAA;MACD;MACA,IAAA,WAAO;OACP,OAAA,CAAA,gBAAA,MAAA;QACA,UAAA;QACH,UAAA;QACO,IAAA,WAAM;;QAEb;OACK,CAAA,GAAK,gBAAO,SAAA,CAAA,CAAA,CAAA;MAClB;KACG,CAAA;KAAA;KAAA,WAAA,UAAA,SAAA,QAAA,WAAA,QAAA,YAAA;KAAA;KAAA;IAAA;GACF;EACF,CAAC;EAAA,gBAAA,OAAA,CAAA,CAAA;EAAA;CAAA;AACH"}
|
|
1
|
+
{"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.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 Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport type { JsonSchemaPrimitiveType } from \"@powerlines/schema\";\nimport { stringifyValue } from \"@powerlines/schema\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@group` tag.\n */\nexport function TSDocGroup(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"group\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type?: JsonSchemaPrimitiveType | string;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyValue(defaultValue, type)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={false} softline={true}>\n {childrenArray(() => props.children)}\n </List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\n/**\n * Create a TSDoc `@runtime` tag.\n */\nexport function TSDocRuntime() {\n return <TSDocTag tag=\"runtime\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: JsonSchemaPrimitiveType | string;\n default?: any;\n title?: string;\n alias?: string[];\n tags?: string[];\n readOnly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n runtime?: boolean;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n tags,\n readOnly,\n internal,\n ignore,\n hidden,\n runtime,\n default: defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"tags\",\n \"readOnly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"runtime\",\n \"default\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show\n when={\n !isUndefined(tags) &&\n tags.length > 0 &&\n tags.some(g => isSetString(g?.trim()))\n }>\n <For each={tags?.filter(g => isSetString(g?.trim())) ?? []}>\n {tag => <TSDocGroup>{tag}</TSDocGroup>}\n </For>\n </Show>\n <Show when={readOnly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={runtime === true}>\n <TSDocRuntime />\n </Show>\n <Show\n when={\n runtime !== true && !isUndefined(type) && !isUndefined(defaultValue)\n }>\n <TSDocDefaultValue type={type} defaultValue={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n default?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n default={props.default}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n default?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.default)}>={props.default}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework?.name || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAc,MAAA,OAAA;CACd,MAAQ,CAAC,EACT,UACA,aACO,WAAW,OAAO,CAAC,YAAU,SAAW,CAAA;CAC/C,OAAS;EAAA;EAAA,gBAA0B,SAAM;GACzC,QAAY;;IAEN,OAAC;KAAA,gBAAqB,OAAQ,CAAA,CAAA;KAAA,gBAAe,MA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,EAC9B,IAAI,WAAQ;MAClB,OAAA,MAAA;KACH,EACH,CAAA;;GAEA,CAAA,CAAA;EACE;CACF,CAAA;;;;;AAMA,SAAa,aAAS,OAAA;CACpB,OAAO,gBAAa,UAAW,WAAK,OAAA,EAClC,KAAI,UACN,CAAC,CAAC;AACJ;;;;AAKA,SAAE,YAAA,OAAA;CACF,OAAO,gBAAS,UAAoB,WAAc,OAAE,EAClD,KAAO,SACT,CAAA,CAAA;;;;;AAKA,SAAgB,YAAY,OAAO;CACjC,MAAM,CAAC,EACT,gBAEA,YACI,WAAA,OAAA;EAAA;EAAA;EAAA;CAAA,CAAA;CACF,MAAM,UAAQ,kBAAgB;CAC9B,OAAC;EAAA;EAAA,gBAAA,SAAA;GACC,QAAE;GACF,IAAC,WAAc;IAChB,OAAA;KAAA,gBAAA,OAAA,CAAA,CAAA;KAAA,gBAAA,MAAA;MACG,IAAA,OAAA;OACE,OAAA,QAAA,QAAA;MACD;MACA,IAAA,WAAO;OACP,OAAA,CAAA,gBAAA,MAAA;QACA,UAAA;QACH,UAAA;QACO,IAAA,WAAM;;QAEb;OACK,CAAA,GAAK,gBAAO,SAAA,CAAA,CAAA,CAAA;MAClB;KACG,CAAA;KAAA;KAAA,WAAA,UAAA,SAAA,QAAA,WAAA,QAAA,YAAA;KAAA;KAAA;IAAA;GACF;EACF,CAAC;EAAA,gBAAA,OAAA,CAAA,CAAA;EAAA;CAAA;AACH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_chunk_artifact = require('../../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs');
|
|
2
|
+
const require_test_DNmyFkvJ = require('../../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs');
|
|
3
|
+
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc.test.ts
|
|
6
|
+
require_chunk_artifact.describe("plugins/plugin-alloy/src/typescript/components/tsdoc.tsx", () => {
|
|
7
|
+
require_chunk_artifact.it("loads module exports", () => {
|
|
8
|
+
require_test_DNmyFkvJ.globalExpect(require_typescript_components_tsdoc.tsdoc_exports).toBeDefined();
|
|
9
|
+
require_test_DNmyFkvJ.globalExpect(typeof require_typescript_components_tsdoc.tsdoc_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
require_chunk_artifact.it("has at least one runtime export", () => {
|
|
12
|
+
require_test_DNmyFkvJ.globalExpect(Object.keys(require_typescript_components_tsdoc.tsdoc_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, it } from "../../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs";
|
|
2
|
+
import { globalExpect } from "../../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs";
|
|
3
|
+
import { tsdoc_exports } from "./tsdoc.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc.test.ts
|
|
6
|
+
describe("plugins/plugin-alloy/src/typescript/components/tsdoc.tsx", () => {
|
|
7
|
+
it("loads module exports", () => {
|
|
8
|
+
globalExpect(tsdoc_exports).toBeDefined();
|
|
9
|
+
globalExpect(typeof tsdoc_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
it("has at least one runtime export", () => {
|
|
12
|
+
globalExpect(Object.keys(tsdoc_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { };
|
|
18
|
+
//# sourceMappingURL=tsdoc.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsdoc.test.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./tsdoc\";\n\ndescribe(\"plugins/plugin-alloy/src/typescript/components/tsdoc.tsx\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;CAGA,GAAA,8BAAmC;EAC/B,aAAO,aAAQ,EAAO,YAAS;EAC/B,aAAO,OAAA,aAAe,EAAA,KAAY,QAAC;CACrC,CAAC;CACD,GAAE,yCAAA;;CAEF,CAAA;AACF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
3
4
|
const require_typescript_components_type_parameters = require('./type-parameters.cjs');
|
|
4
5
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
@@ -6,6 +7,7 @@ let _alloy_js_core = require("@alloy-js/core");
|
|
|
6
7
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
7
8
|
|
|
8
9
|
//#region src/typescript/components/type-declaration.tsx
|
|
10
|
+
var type_declaration_exports = /* @__PURE__ */ require_runtime.__exportAll({ TypeDeclaration: () => TypeDeclaration });
|
|
9
11
|
/**
|
|
10
12
|
* Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.
|
|
11
13
|
*/
|
|
@@ -35,4 +37,10 @@ const TypeDeclaration = (0, _alloy_js_typescript.ensureTypeRefContext)(function
|
|
|
35
37
|
});
|
|
36
38
|
|
|
37
39
|
//#endregion
|
|
38
|
-
exports.TypeDeclaration = TypeDeclaration;
|
|
40
|
+
exports.TypeDeclaration = TypeDeclaration;
|
|
41
|
+
Object.defineProperty(exports, 'type_declaration_exports', {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return type_declaration_exports;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
1
2
|
import { TSDoc } from "./tsdoc.mjs";
|
|
2
3
|
import { TypeParameters } from "./type-parameters.mjs";
|
|
3
4
|
import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
@@ -5,6 +6,7 @@ import { Name, Show } from "@alloy-js/core";
|
|
|
5
6
|
import { Declaration as Declaration$1, ensureTypeRefContext } from "@alloy-js/typescript";
|
|
6
7
|
|
|
7
8
|
//#region src/typescript/components/type-declaration.tsx
|
|
9
|
+
var type_declaration_exports = /* @__PURE__ */ __exportAll({ TypeDeclaration: () => TypeDeclaration });
|
|
8
10
|
/**
|
|
9
11
|
* Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.
|
|
10
12
|
*/
|
|
@@ -34,5 +36,5 @@ const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(props) {
|
|
|
34
36
|
});
|
|
35
37
|
|
|
36
38
|
//#endregion
|
|
37
|
-
export { TypeDeclaration };
|
|
39
|
+
export { TypeDeclaration, type_declaration_exports };
|
|
38
40
|
//# sourceMappingURL=type-declaration.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-declaration.mjs","names":[],"sources":["../../../src/typescript/components/type-declaration.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 { Name, Show } from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TypeParameterDescriptor\n} from \"@alloy-js/typescript\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface TypeDeclarationProps extends CommonDeclarationProps {\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.\n */\nexport const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(\n props: TypeDeclarationProps\n) {\n const { children, doc, typeParameters, ...rest } = props;\n\n return (\n <>\n <Show when={Boolean(doc)}>\n <TSDoc heading={doc} />\n </Show>\n <Declaration {...rest} kind=\"type\" nameKind=\"type\">\n type <Name />\n {typeParameters && (\n <TypeParameters parameters={typeParameters} />\n )} = {children};\n </Declaration>\n </>\n );\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"type-declaration.mjs","names":[],"sources":["../../../src/typescript/components/type-declaration.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 { Name, Show } from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TypeParameterDescriptor\n} from \"@alloy-js/typescript\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface TypeDeclarationProps extends CommonDeclarationProps {\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.\n */\nexport const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(\n props: TypeDeclarationProps\n) {\n const { children, doc, typeParameters, ...rest } = props;\n\n return (\n <>\n <Show when={Boolean(doc)}>\n <TSDoc heading={doc} />\n </Show>\n <Declaration {...rest} kind=\"type\" nameKind=\"type\">\n type <Name />\n {typeParameters && (\n <TypeParameters parameters={typeParameters} />\n )} = {children};\n </Declaration>\n </>\n );\n});\n"],"mappings":";;;;;;;;;;;;AA0BA,MAAS,kBAAsB,qBAAmB,SAAA,gBAAA,OAAA;SAElD,UACI,KACA,gBACA,GAAA,SACF;CACF,OAAA,CAAA,gBAAA,MAAA;;GAEE,OAAA,QAAA,GAAA;EACC;EACD,IAAA,WAAA;GACI,OAAO,gBAAkB,OAAA,EACvB,SAAC,IACP,CAAA;EACA;;EAEA,MAAO;EACL,UAAC;EACD,IAAG,WAAW;GACZ,OAAG;IAAK;IAAS,gBAAO,MAAA,CAAA,CAAA;IAAA,WAAA,kBAAA,gBAAA,gBAAA,EACtB,YAAI,eACN,CAAC,CAAA;IAAA;IAAW;IAAU;GAAC;EACzB;CACF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_chunk_artifact = require('../../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs');
|
|
2
|
+
const require_test_DNmyFkvJ = require('../../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs');
|
|
3
|
+
const require_typescript_components_type_declaration = require('./type-declaration.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/type-declaration.test.ts
|
|
6
|
+
require_chunk_artifact.describe("plugins/plugin-alloy/src/typescript/components/type-declaration.tsx", () => {
|
|
7
|
+
require_chunk_artifact.it("loads module exports", () => {
|
|
8
|
+
require_test_DNmyFkvJ.globalExpect(require_typescript_components_type_declaration.type_declaration_exports).toBeDefined();
|
|
9
|
+
require_test_DNmyFkvJ.globalExpect(typeof require_typescript_components_type_declaration.type_declaration_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
require_chunk_artifact.it("has at least one runtime export", () => {
|
|
12
|
+
require_test_DNmyFkvJ.globalExpect(Object.keys(require_typescript_components_type_declaration.type_declaration_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, it } from "../../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs";
|
|
2
|
+
import { globalExpect } from "../../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs";
|
|
3
|
+
import { type_declaration_exports } from "./type-declaration.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/type-declaration.test.ts
|
|
6
|
+
describe("plugins/plugin-alloy/src/typescript/components/type-declaration.tsx", () => {
|
|
7
|
+
it("loads module exports", () => {
|
|
8
|
+
globalExpect(type_declaration_exports).toBeDefined();
|
|
9
|
+
globalExpect(typeof type_declaration_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
it("has at least one runtime export", () => {
|
|
12
|
+
globalExpect(Object.keys(type_declaration_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { };
|
|
18
|
+
//# sourceMappingURL=type-declaration.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-declaration.test.mjs","names":[],"sources":["../../../src/typescript/components/type-declaration.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./type-declaration\";\n\ndescribe(\"plugins/plugin-alloy/src/typescript/components/type-declaration.tsx\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;CAGA,GAAA,8BAAmC;EAC/B,aAAO,wBAAQ,EAAO,YAAS;EAC/B,aAAO,OAAA,wBAAe,EAAA,KAAY,QAAC;CACrC,CAAC;CACD,GAAE,yCAAA;;CAEF,CAAA;AACF,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
4
|
let _alloy_js_core = require("@alloy-js/core");
|
|
4
5
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
5
6
|
|
|
6
7
|
//#region src/typescript/components/type-parameters.tsx
|
|
8
|
+
var type_parameters_exports = /* @__PURE__ */ require_runtime.__exportAll({ TypeParameters: () => TypeParameters });
|
|
7
9
|
/** Props for type parameters */
|
|
8
10
|
function typeParameter(param) {
|
|
9
11
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
@@ -79,4 +81,10 @@ function TypeParameters(props) {
|
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
//#endregion
|
|
82
|
-
exports.TypeParameters = TypeParameters;
|
|
84
|
+
exports.TypeParameters = TypeParameters;
|
|
85
|
+
Object.defineProperty(exports, 'type_parameters_exports', {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () {
|
|
88
|
+
return type_parameters_exports;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
1
2
|
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
2
3
|
import { For, Indent, Show } from "@alloy-js/core";
|
|
3
4
|
import { TypeRefContext } from "@alloy-js/typescript";
|
|
4
5
|
|
|
5
6
|
//#region src/typescript/components/type-parameters.tsx
|
|
7
|
+
var type_parameters_exports = /* @__PURE__ */ __exportAll({ TypeParameters: () => TypeParameters });
|
|
6
8
|
/** Props for type parameters */
|
|
7
9
|
function typeParameter(param) {
|
|
8
10
|
return createComponent(Show, {
|
|
@@ -78,5 +80,5 @@ function TypeParameters(props) {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
//#endregion
|
|
81
|
-
export { TypeParameters };
|
|
83
|
+
export { TypeParameters, type_parameters_exports };
|
|
82
84
|
//# sourceMappingURL=type-parameters.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-parameters.mjs","names":[],"sources":["../../../src/typescript/components/type-parameters.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, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"type-parameters.mjs","names":[],"sources":["../../../src/typescript/components/type-parameters.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, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":";;;;;;;;AAwBA,SAAE,cAAa,OAAA;CACb,OAAO,gBAAW,MAAA;EAClB,MAAQ,OAAG,UAAQ;EACrB,IAAA,WAAA;;EAEA;EACE,IAAM,WAAC;GACJ,OAAK,CAAI,gBAAkB,SAAS,EAClC,IAAK,WAAA;IACF,OAAM;KAAE,WAAC,MAAA,IAAA;KAAyB,gBAAI,MAAA;MACvC,IAAK,OAAS;OACT,OAAA,CAAA,CAAA,MAAA;MACJ;MACC,IAAA,WAAM;OACH,OAAE;QAAA;QAAA;QAAA,gBAAA,UAAA,EACH,IAAA,WAAc;SACX,OAAS,CAAA,KAAA,gBAAwB,gBAAQ,EAC3C,IAAA,WAAc;UACV,OAAA,MAAA;SACJ,EACI,CAAC,CAAC;QACJ,EACL,CAAA;OAAA;MACC;KACF,CAAC;KAAC,gBAAc,MAAA;MAChB,IAAI,OAAA;OACA,OAAI,CAAA,CAAA,MAAA;MACR;MACP,IAAA,WAAA;OACH,OAAA,CAAA,OAAA,gBAAA,gBAAA;QAEE,OAAA,MAAA;OACW,EACZ,CAAA,CAAA;MACG;KACE,CAAA;IAAA;GACE,EACH,CAAA,GAAA,GAAA;EACH;CACF,CAAA;AACA;;;;;;;;;AAUA,SAAU,eAAA,OAAA;CACR,IAAI,MAAM,UACR,OAAK,MAAO;CAEd,IAAI,CAAC,MAAM,YACT;CAEF,OAAO;EAAC;EAAA,gBAAM,SAAA,EACZ,IAAI,WAAK;GACP,OAAI,gBAAA,QAAA;IACJ,UAAA;IACH,IAAA,WAAA;KACH,OAAA,CAAA,gBAAA,KAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_chunk_artifact = require('../../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs');
|
|
2
|
+
const require_test_DNmyFkvJ = require('../../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs');
|
|
3
|
+
const require_typescript_components_type_parameters = require('./type-parameters.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/type-parameters.test.ts
|
|
6
|
+
require_chunk_artifact.describe("plugins/plugin-alloy/src/typescript/components/type-parameters.tsx", () => {
|
|
7
|
+
require_chunk_artifact.it("loads module exports", () => {
|
|
8
|
+
require_test_DNmyFkvJ.globalExpect(require_typescript_components_type_parameters.type_parameters_exports).toBeDefined();
|
|
9
|
+
require_test_DNmyFkvJ.globalExpect(typeof require_typescript_components_type_parameters.type_parameters_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
require_chunk_artifact.it("has at least one runtime export", () => {
|
|
12
|
+
require_test_DNmyFkvJ.globalExpect(Object.keys(require_typescript_components_type_parameters.type_parameters_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|