@powerlines/plugin-alloy 0.25.49 → 0.25.52
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 +29 -0
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/core/components/index.cjs +10 -0
- package/dist/core/components/index.d.cts +5 -0
- package/dist/core/components/index.d.mts +5 -0
- package/dist/core/components/index.mjs +6 -0
- package/dist/core/components/output.cjs +41 -0
- package/dist/core/components/output.d.cts +24 -0
- package/dist/core/components/output.d.cts.map +1 -0
- package/dist/core/components/output.d.mts +24 -0
- package/dist/core/components/output.d.mts.map +1 -0
- package/dist/core/components/output.mjs +40 -0
- package/dist/core/components/output.mjs.map +1 -0
- package/dist/core/components/single-line-comment.cjs +23 -0
- package/dist/core/components/single-line-comment.d.cts +23 -0
- package/dist/core/components/single-line-comment.d.cts.map +1 -0
- package/dist/core/components/single-line-comment.d.mts +23 -0
- package/dist/core/components/single-line-comment.d.mts.map +1 -0
- package/dist/core/components/single-line-comment.mjs +22 -0
- package/dist/core/components/single-line-comment.mjs.map +1 -0
- package/dist/core/components/source-file.cjs +64 -0
- package/dist/core/components/source-file.d.cts +33 -0
- package/dist/core/components/source-file.d.cts.map +1 -0
- package/dist/core/components/source-file.d.mts +33 -0
- package/dist/core/components/source-file.d.mts.map +1 -0
- package/dist/core/components/source-file.mjs +62 -0
- package/dist/core/components/source-file.mjs.map +1 -0
- package/dist/core/components/spacing.cjs +20 -0
- package/dist/core/components/spacing.d.cts +24 -0
- package/dist/core/components/spacing.d.cts.map +1 -0
- package/dist/core/components/spacing.d.mts +24 -0
- package/dist/core/components/spacing.d.mts.map +1 -0
- package/dist/core/components/spacing.mjs +19 -0
- package/dist/core/components/spacing.mjs.map +1 -0
- package/dist/core/contexts/context.cjs +41 -0
- package/dist/core/contexts/context.d.cts +29 -0
- package/dist/core/contexts/context.d.cts.map +1 -0
- package/dist/core/contexts/context.d.mts +29 -0
- package/dist/core/contexts/context.d.mts.map +1 -0
- package/dist/core/contexts/context.mjs +37 -0
- package/dist/core/contexts/context.mjs.map +1 -0
- package/dist/core/contexts/index.cjs +21 -0
- package/dist/core/contexts/index.d.cts +4 -0
- package/dist/core/contexts/index.d.mts +4 -0
- package/dist/core/contexts/index.mjs +5 -0
- package/dist/core/contexts/meta.cjs +41 -0
- package/dist/core/contexts/meta.d.cts +48 -0
- package/dist/core/contexts/meta.d.cts.map +1 -0
- package/dist/core/contexts/meta.d.mts +48 -0
- package/dist/core/contexts/meta.d.mts.map +1 -0
- package/dist/core/contexts/meta.mjs +37 -0
- package/dist/core/contexts/meta.mjs.map +1 -0
- package/dist/core/contexts/reflection.cjs +69 -0
- package/dist/core/contexts/reflection.d.cts +53 -0
- package/dist/core/contexts/reflection.d.cts.map +1 -0
- package/dist/core/contexts/reflection.d.mts +53 -0
- package/dist/core/contexts/reflection.d.mts.map +1 -0
- package/dist/core/contexts/reflection.mjs +61 -0
- package/dist/core/contexts/reflection.mjs.map +1 -0
- package/dist/core/helpers/code.cjs +34 -0
- package/dist/core/helpers/code.d.cts +29 -0
- package/dist/core/helpers/code.d.cts.map +1 -0
- package/dist/core/helpers/code.d.mts +29 -0
- package/dist/core/helpers/code.d.mts.map +1 -0
- package/dist/core/helpers/code.mjs +33 -0
- package/dist/core/helpers/code.mjs.map +1 -0
- package/dist/core/helpers/index.cjs +4 -0
- package/dist/core/helpers/index.d.cts +2 -0
- package/dist/core/helpers/index.d.mts +2 -0
- package/dist/core/helpers/index.mjs +3 -0
- package/dist/core/index.cjs +34 -0
- package/dist/core/index.d.cts +9 -0
- package/dist/core/index.d.mts +9 -0
- package/dist/core/index.mjs +13 -0
- package/dist/helpers/capnp.cjs +277 -0
- package/dist/helpers/capnp.d.cts +87 -0
- package/dist/helpers/capnp.d.cts.map +1 -0
- package/dist/helpers/capnp.d.mts +87 -0
- package/dist/helpers/capnp.d.mts.map +1 -0
- package/dist/helpers/capnp.mjs +260 -0
- package/dist/helpers/capnp.mjs.map +1 -0
- package/dist/helpers/create-builtin.cjs +20 -0
- package/dist/helpers/create-builtin.d.cts +16 -0
- package/dist/helpers/create-builtin.d.cts.map +1 -0
- package/dist/helpers/create-builtin.d.mts +16 -0
- package/dist/helpers/create-builtin.d.mts.map +1 -0
- package/dist/helpers/create-builtin.mjs +19 -0
- package/dist/helpers/create-builtin.mjs.map +1 -0
- package/dist/helpers/index.cjs +25 -0
- package/dist/helpers/index.d.cts +5 -0
- package/dist/helpers/index.d.mts +5 -0
- package/dist/helpers/index.mjs +6 -0
- package/dist/helpers/refkey.cjs +17 -0
- package/dist/helpers/refkey.d.cts +13 -0
- package/dist/helpers/refkey.d.cts.map +1 -0
- package/dist/helpers/refkey.d.mts +13 -0
- package/dist/helpers/refkey.d.mts.map +1 -0
- package/dist/helpers/refkey.mjs +16 -0
- package/dist/helpers/refkey.mjs.map +1 -0
- package/dist/helpers/typescript.cjs +47 -0
- package/dist/helpers/typescript.d.cts +26 -0
- package/dist/helpers/typescript.d.cts.map +1 -0
- package/dist/helpers/typescript.d.mts +26 -0
- package/dist/helpers/typescript.d.mts.map +1 -0
- package/dist/helpers/typescript.mjs +46 -0
- package/dist/helpers/typescript.mjs.map +1 -0
- package/dist/index.cjs +48 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +45 -0
- package/dist/index.mjs.map +1 -0
- package/dist/markdown/components/front-matter.cjs +29 -0
- package/dist/markdown/components/front-matter.d.cts +16 -0
- package/dist/markdown/components/front-matter.d.cts.map +1 -0
- package/dist/markdown/components/front-matter.d.mts +16 -0
- package/dist/markdown/components/front-matter.d.mts.map +1 -0
- package/dist/markdown/components/front-matter.mjs +28 -0
- package/dist/markdown/components/front-matter.mjs.map +1 -0
- package/dist/markdown/components/index.cjs +11 -0
- package/dist/markdown/components/index.d.cts +4 -0
- package/dist/markdown/components/index.d.mts +4 -0
- package/dist/markdown/components/index.mjs +5 -0
- package/dist/markdown/components/markdown-file.cjs +135 -0
- package/dist/markdown/components/markdown-file.d.cts +29 -0
- package/dist/markdown/components/markdown-file.d.cts.map +1 -0
- package/dist/markdown/components/markdown-file.d.mts +29 -0
- package/dist/markdown/components/markdown-file.d.mts.map +1 -0
- package/dist/markdown/components/markdown-file.mjs +133 -0
- package/dist/markdown/components/markdown-file.mjs.map +1 -0
- package/dist/markdown/components/markdown-table.cjs +102 -0
- package/dist/markdown/components/markdown-table.d.cts +28 -0
- package/dist/markdown/components/markdown-table.d.cts.map +1 -0
- package/dist/markdown/components/markdown-table.d.mts +28 -0
- package/dist/markdown/components/markdown-table.d.mts.map +1 -0
- package/dist/markdown/components/markdown-table.mjs +99 -0
- package/dist/markdown/components/markdown-table.mjs.map +1 -0
- package/dist/markdown/contexts/index.cjs +7 -0
- package/dist/markdown/contexts/index.d.cts +2 -0
- package/dist/markdown/contexts/index.d.mts +2 -0
- package/dist/markdown/contexts/index.mjs +3 -0
- package/dist/markdown/contexts/markdown-table.cjs +38 -0
- package/dist/markdown/contexts/markdown-table.d.cts +38 -0
- package/dist/markdown/contexts/markdown-table.d.cts.map +1 -0
- package/dist/markdown/contexts/markdown-table.d.mts +38 -0
- package/dist/markdown/contexts/markdown-table.d.mts.map +1 -0
- package/dist/markdown/contexts/markdown-table.mjs +34 -0
- package/dist/markdown/contexts/markdown-table.mjs.map +1 -0
- package/dist/markdown/index.cjs +18 -0
- package/dist/markdown/index.d.cts +5 -0
- package/dist/markdown/index.d.mts +5 -0
- package/dist/markdown/index.mjs +8 -0
- package/dist/render.cjs +91 -0
- package/dist/render.d.cts +38 -0
- package/dist/render.d.cts.map +1 -0
- package/dist/render.d.mts +38 -0
- package/dist/render.d.mts.map +1 -0
- package/dist/render.mjs +89 -0
- package/dist/render.mjs.map +1 -0
- package/dist/types/components.cjs +0 -0
- package/dist/types/components.d.cts +142 -0
- package/dist/types/components.d.cts.map +1 -0
- package/dist/types/components.d.mts +142 -0
- package/dist/types/components.d.mts.map +1 -0
- package/dist/types/components.mjs +1 -0
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +39 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +39 -0
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/typescript/components/builtin-file.cjs +63 -0
- package/dist/typescript/components/builtin-file.d.cts +35 -0
- package/dist/typescript/components/builtin-file.d.cts.map +1 -0
- package/dist/typescript/components/builtin-file.d.mts +35 -0
- package/dist/typescript/components/builtin-file.d.mts.map +1 -0
- package/dist/typescript/components/builtin-file.mjs +62 -0
- package/dist/typescript/components/builtin-file.mjs.map +1 -0
- package/dist/typescript/components/class-declaration.cjs +291 -0
- package/dist/typescript/components/class-declaration.d.cts +145 -0
- package/dist/typescript/components/class-declaration.d.cts.map +1 -0
- package/dist/typescript/components/class-declaration.d.mts +145 -0
- package/dist/typescript/components/class-declaration.d.mts.map +1 -0
- package/dist/typescript/components/class-declaration.mjs +285 -0
- package/dist/typescript/components/class-declaration.mjs.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.cjs +26 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts +33 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts +33 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.mjs +25 -0
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -0
- package/dist/typescript/components/entry-file.cjs +43 -0
- package/dist/typescript/components/entry-file.d.cts +28 -0
- package/dist/typescript/components/entry-file.d.cts.map +1 -0
- package/dist/typescript/components/entry-file.d.mts +28 -0
- package/dist/typescript/components/entry-file.d.mts.map +1 -0
- package/dist/typescript/components/entry-file.mjs +41 -0
- package/dist/typescript/components/entry-file.mjs.map +1 -0
- package/dist/typescript/components/index.cjs +65 -0
- package/dist/typescript/components/index.d.cts +15 -0
- package/dist/typescript/components/index.d.mts +15 -0
- package/dist/typescript/components/index.mjs +16 -0
- package/dist/typescript/components/infrastructure-file.cjs +40 -0
- package/dist/typescript/components/infrastructure-file.d.cts +21 -0
- package/dist/typescript/components/infrastructure-file.d.cts.map +1 -0
- package/dist/typescript/components/infrastructure-file.d.mts +21 -0
- package/dist/typescript/components/infrastructure-file.d.mts.map +1 -0
- package/dist/typescript/components/infrastructure-file.mjs +38 -0
- package/dist/typescript/components/infrastructure-file.mjs.map +1 -0
- package/dist/typescript/components/interface-declaration.cjs +229 -0
- package/dist/typescript/components/interface-declaration.d.cts +86 -0
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -0
- package/dist/typescript/components/interface-declaration.d.mts +86 -0
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -0
- package/dist/typescript/components/interface-declaration.mjs +225 -0
- package/dist/typescript/components/interface-declaration.mjs.map +1 -0
- package/dist/typescript/components/object-declaration.cjs +128 -0
- package/dist/typescript/components/object-declaration.d.cts +30 -0
- package/dist/typescript/components/object-declaration.d.cts.map +1 -0
- package/dist/typescript/components/object-declaration.d.mts +30 -0
- package/dist/typescript/components/object-declaration.d.mts.map +1 -0
- package/dist/typescript/components/object-declaration.mjs +126 -0
- package/dist/typescript/components/object-declaration.mjs.map +1 -0
- package/dist/typescript/components/property-name.cjs +32 -0
- package/dist/typescript/components/property-name.d.cts +24 -0
- package/dist/typescript/components/property-name.d.cts.map +1 -0
- package/dist/typescript/components/property-name.d.mts +24 -0
- package/dist/typescript/components/property-name.d.mts.map +1 -0
- package/dist/typescript/components/property-name.mjs +31 -0
- package/dist/typescript/components/property-name.mjs.map +1 -0
- package/dist/typescript/components/record-expression.cjs +13 -0
- package/dist/typescript/components/record-expression.d.cts +13 -0
- package/dist/typescript/components/record-expression.d.cts.map +1 -0
- package/dist/typescript/components/record-expression.d.mts +13 -0
- package/dist/typescript/components/record-expression.d.mts.map +1 -0
- package/dist/typescript/components/record-expression.mjs +12 -0
- package/dist/typescript/components/record-expression.mjs.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.cjs +310 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts +44 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts +44 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.mjs +304 -0
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -0
- package/dist/typescript/components/tsdoc.cjs +477 -0
- package/dist/typescript/components/tsdoc.d.cts +164 -0
- package/dist/typescript/components/tsdoc.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc.d.mts +164 -0
- package/dist/typescript/components/tsdoc.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc.mjs +457 -0
- package/dist/typescript/components/tsdoc.mjs.map +1 -0
- package/dist/typescript/components/type-declaration.cjs +39 -0
- package/dist/typescript/components/type-declaration.d.cts +18 -0
- package/dist/typescript/components/type-declaration.d.cts.map +1 -0
- package/dist/typescript/components/type-declaration.d.mts +18 -0
- package/dist/typescript/components/type-declaration.d.mts.map +1 -0
- package/dist/typescript/components/type-declaration.mjs +38 -0
- package/dist/typescript/components/type-declaration.mjs.map +1 -0
- package/dist/typescript/components/type-parameters.cjs +82 -0
- package/dist/typescript/components/type-parameters.d.cts +24 -0
- package/dist/typescript/components/type-parameters.d.cts.map +1 -0
- package/dist/typescript/components/type-parameters.d.mts +24 -0
- package/dist/typescript/components/type-parameters.d.mts.map +1 -0
- package/dist/typescript/components/type-parameters.mjs +81 -0
- package/dist/typescript/components/type-parameters.mjs.map +1 -0
- package/dist/typescript/components/typescript-file.cjs +221 -0
- package/dist/typescript/components/typescript-file.d.cts +50 -0
- package/dist/typescript/components/typescript-file.d.cts.map +1 -0
- package/dist/typescript/components/typescript-file.d.mts +50 -0
- package/dist/typescript/components/typescript-file.d.mts.map +1 -0
- package/dist/typescript/components/typescript-file.mjs +218 -0
- package/dist/typescript/components/typescript-file.mjs.map +1 -0
- package/dist/typescript/contexts/index.cjs +4 -0
- package/dist/typescript/contexts/index.d.cts +2 -0
- package/dist/typescript/contexts/index.d.mts +2 -0
- package/dist/typescript/contexts/index.mjs +3 -0
- package/dist/typescript/contexts/lexical-scope.cjs +26 -0
- package/dist/typescript/contexts/lexical-scope.d.cts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.d.mts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.mjs +25 -0
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -0
- package/dist/typescript/contexts/member-scope.cjs +24 -0
- package/dist/typescript/contexts/member-scope.d.cts +20 -0
- package/dist/typescript/contexts/member-scope.d.cts.map +1 -0
- package/dist/typescript/contexts/member-scope.d.mts +20 -0
- package/dist/typescript/contexts/member-scope.d.mts.map +1 -0
- package/dist/typescript/contexts/member-scope.mjs +23 -0
- package/dist/typescript/contexts/member-scope.mjs.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.cjs +26 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts +14 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts +14 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.mjs +25 -0
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -0
- package/dist/typescript/helpers/index.cjs +6 -0
- package/dist/typescript/helpers/index.d.cts +3 -0
- package/dist/typescript/helpers/index.d.mts +3 -0
- package/dist/typescript/helpers/index.mjs +4 -0
- package/dist/typescript/helpers/utilities.cjs +15 -0
- package/dist/typescript/helpers/utilities.d.cts +11 -0
- package/dist/typescript/helpers/utilities.d.cts.map +1 -0
- package/dist/typescript/helpers/utilities.d.mts +11 -0
- package/dist/typescript/helpers/utilities.d.mts.map +1 -0
- package/dist/typescript/helpers/utilities.mjs +14 -0
- package/dist/typescript/helpers/utilities.mjs.map +1 -0
- package/dist/typescript/index.cjs +74 -0
- package/dist/typescript/index.d.cts +18 -0
- package/dist/typescript/index.d.mts +18 -0
- package/dist/typescript/index.mjs +22 -0
- package/dist/yaml/components/index.cjs +5 -0
- package/dist/yaml/components/index.d.cts +2 -0
- package/dist/yaml/components/index.d.mts +2 -0
- package/dist/yaml/components/index.mjs +3 -0
- package/dist/yaml/components/yaml-file.cjs +149 -0
- package/dist/yaml/components/yaml-file.d.cts +34 -0
- package/dist/yaml/components/yaml-file.d.cts.map +1 -0
- package/dist/yaml/components/yaml-file.d.mts +34 -0
- package/dist/yaml/components/yaml-file.d.mts.map +1 -0
- package/dist/yaml/components/yaml-file.mjs +147 -0
- package/dist/yaml/components/yaml-file.mjs.map +1 -0
- package/dist/yaml/index.cjs +6 -0
- package/dist/yaml/index.d.cts +2 -0
- package/dist/yaml/index.d.mts +2 -0
- package/dist/yaml/index.mjs +4 -0
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-declaration.mjs","names":[],"sources":["../../../src/typescript/components/object-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 {\n computed,\n Declaration as CoreDeclaration,\n createSymbolSlot,\n For,\n Name,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n createValueSymbol,\n ObjectExpression,\n ObjectProperty,\n TSSymbolFlags,\n TypeRefContext,\n useTSNamePolicy,\n VarDeclarationProps\n} from \"@alloy-js/typescript\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport type {\n ReflectionClass,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport {\n ReflectionClassContext,\n ReflectionPropertyContext\n} from \"../../core/contexts/reflection\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n TSDocReflectionClass,\n TSDocReflectionProperty\n} from \"./tsdoc-reflection\";\n\nexport interface ComputedRef<T = any> {\n readonly value: T;\n}\n\nexport interface ObjectDeclarationProps<\n T extends Record<string, any> = Record<string, any>\n> extends VarDeclarationProps {\n reflection?: ComputedRef<ReflectionClass<T>>;\n defaultValue?: ComputedRef<Partial<T> | undefined>;\n}\n\nexport interface ObjectDeclarationPropertyProps extends ComponentProps {\n property: ReflectionProperty;\n}\n\n/**\n * Generates a TypeScript object for the given reflection class.\n */\nexport function ObjectDeclaration<\n T extends Record<string, any> = Record<string, any>\n>(props: ObjectDeclarationProps<T>) {\n if (!props.reflection?.value) {\n return null;\n }\n\n const objectName = computed(() =>\n camelCase(\n (isString(props.name) ? props.name : props.name.toString()) ||\n props.reflection!.value.getName()\n )\n );\n const objectType = computed(\n () => props.type || pascalCase(props.reflection!.value.getName())\n );\n const properties = computed(() =>\n props\n .reflection!.value.getProperties()\n .filter(\n item =>\n !item.isIgnored() &&\n !isUndefined(\n props.defaultValue?.value?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined(\n (props.defaultValue as Record<string, any>)?.value?.[alias]\n )\n ) {\n return (props.defaultValue as Record<string, any>)?.value?.[\n alias\n ];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )\n )\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) ||\n (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n )\n );\n\n const TypeSymbolSlot = createSymbolSlot();\n const ValueTypeSymbolSlot = createSymbolSlot();\n const sym = createValueSymbol(props.name, {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: props.nullish ? TSSymbolFlags.Nullish : TSSymbolFlags.None,\n type: props.type ? TypeSymbolSlot.firstSymbol : undefined,\n namePolicy: useTSNamePolicy().for(\"variable\")\n });\n\n if (!props.type) {\n ValueTypeSymbolSlot.moveMembersTo(sym);\n }\n\n const keyword = props.var ? \"var\" : props.let ? \"let\" : \"const\";\n const type = props.type ? (\n <TypeRefContext>\n : <TypeSymbolSlot>{props.type}</TypeSymbolSlot>\n </TypeRefContext>\n ) : undefined;\n\n return (\n <Show when={!!props.reflection.value}>\n <ReflectionClassContext.Provider\n value={{\n reflection: props.reflection.value as ReflectionClass<any>,\n override: {\n name: objectName.value,\n type: objectType.value,\n defaultValue: props.defaultValue?.value\n }\n }}>\n <Show when={!!objectName.value && !!objectType.value}>\n <TSDocReflectionClass reflection={props.reflection.value} />\n <CoreDeclaration symbol={sym}>\n {props.export ? \"export \" : \"\"}\n {props.default ? \"default \" : \"\"}\n {keyword} <Name />\n {type} ={\" \"}\n <ValueTypeSymbolSlot>\n {props.initializer ?? props.children ?? (\n <ObjectExpression>\n <For\n each={properties.value ?? []}\n comma={true}\n doubleHardline={true}>\n {prop => <ObjectDeclarationProperty property={prop} />}\n </For>\n </ObjectExpression>\n )}\n </ValueTypeSymbolSlot>\n </CoreDeclaration>\n </Show>\n <hbr />\n </ReflectionClassContext.Provider>\n </Show>\n );\n}\n\n/**\n * Generates a TypeScript object property for the given reflection class.\n */\nexport function ObjectDeclarationProperty(\n props: ObjectDeclarationPropertyProps\n) {\n const [{ property }] = splitProps(props, [\"property\"]);\n\n return (\n <ReflectionPropertyContext.Provider value={property}>\n <TSDocReflectionProperty reflection={property} />\n <ObjectProperty\n name={property.getNameAsString()}\n value={stringifyDefaultValue(property)}\n />\n <hbr />\n </ReflectionPropertyContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA4CA,SAAS,kBAAqD,OAAA;AAC9D,KAAM,CAAC,MAAA,YAAA,MACL,QAAA;CAEA,MAAM,aAAW,eAAS,WAAW,SAAA,MAAA,KAAA,GAAA,MAAA,OAAA,MAAA,KAAA,UAAA,KAAA,MAAA,WAAA,MAAA,SAAA,CAAA,CAAA;CACvC,MAAQ,aAAC,eAA2B,MAAE,QAAM,WAAW,MAAA,WAAA,MAAA,SAAA,CAAA,CAAA;CACvD,MAAO,aAAA,eAAA,MAAA,WAAA,MAAA,eAAA,CAAA,QAAA,SAAA,CAAA,KAAA,WAAA,IAAA,CAAA,YAAA,MAAA,cAAA,QAAA,KAAA,iBAAA,KAAA,KAAA,UAAA,CAAA,QAAA,KAAA,UAAA;AACL,MAAA,YAAA,IAAoB,IAAA,CAAA,YAAA,MAAA,cAAA,QAAA,OAAA,CACpB,QAAA,MAAA,cAAA,QAAA;;IAGF,OAAO,IAAU,KAAA,iBAAqB,CAAA,CAAA,CAAA,MAAA,GAAA,MAAA,EAAA,YAAA,IAAA,EAAA,YAAA,IAAA,CAAA,EAAA,YAAA,IAAA,CAAA,EAAA,YAAA,GAAA,EAAA,iBAAA,CAAA,cAAA,EAAA,iBAAA,CAAA,GAAA,EAAA,YAAA,GAAA,IAAA,GAAA,CAAA;CACpC,MAAA,iBAAiB,kBAAA;CACnB,MAAA,sBAAA,kBAAA;;EAEA,SAAO,MAAU;EACb,SAAQ,MAAO;EACjB,QAAQ,MAAA;EACR,UAAY,MAAC;EACb,SAAA,MAAe,UAAY,cAAa,UAAU,cAAA;EACpD,MAAA,MAAA,OAAA,eAAA,cAAA;;EAEA,CAAA;AACE,KAAA,CAAA,MAAU,KACZ,qBAAA,cAAA,IAAA;CAEE,MAAA,UAAA,MAAA,MAAA,QAAA,MAAA,MAAA,QAAA;CACA,MAAC,OAAY,MAAA,OAAW,gBAAoB,gBAAY,EACxD,IAAA,WAAA;AACI,SAAC,CAAA,MAAS,gBAAiB,gBAAA,EAC7B,IAAQ,WAAO;AACV,UAAA,MAAA;KAEL,CAAA,CAAA;;AAGF,QAAM,gBAAa,MAAY;EAC7B,IAAA,OAAS;AACP,UAAC,CAAA,CAAQ,MAAM,WAAS;;EAE1B,IAAA,WAAA;AACD,UAAA,gBAAA,uBAAA,UAAA;IACK,IAAA,QAAY;AACV,YAAM;MACb,YAAA,MAAA,WAAA;MACK,UAAa;OACjB,MAAA,WAAA;OACG,MAAY,WAAM;OACZ,cAAA,MAAA,cAAA;OACA;MACF;;IAEH,IAAI,WAAM;AACR,YAAI,CAAI,gBAAkB,MAAM;MAC9B,IAAI,OAAG;AACL,cAAI,CAAA,CAAA,WAAgB,SAAE,CAAA,CAAA,WAAA;;MAExB,IAAI,WAAW;AACb,cAAI,CAAA,gBAAA,sBAAA,EACF,IAAE,aAAA;AACA,eAAO,MAAM,WAAC;UAEjB,CAAC,EAAE,gBAAC,aAAA;QACH,QAAA;;AAEA,gBAAO;UAAG,WAAA,MAAA,SAAA,YAAA,GAAA;UAAA,WAAA,MAAA,UAAA,aAAA,GAAA;UAAA;UAAA;UAAA,gBAAA,MAAA,EAAA,CAAA;UAAA;UAAA;UAAA;UAAA,gBAAA,qBAAA,EACT,IAAA,WAAY;AACV,kBAAA,MAAgB,eAAA,MAAA,YAAA,gBAAA,kBAAA,EACzB,IAAA,WAAA;AACJ,mBAAA,gBAAA,KAAA;aACc,IAAA,OAAA;AACS,qBAAA,WAAe,SAAA,EAAA;;aAE9B,OAAkB;aACP,gBAAA;aACX,WAAA,SAAA,gBAAA,2BAAA,EACC,UAAA,MACT,CAAA;aACH,CAAA;cAEoB,CAAC;aAEV,CAAA;UAAA;;QAED,CAAA,CAAA;;MAET,CAAQ,EAAE,gBAAc,OAAA,EAAA,CAAA,CAAA;;IAExB,CAAI;;EAEL,CAAC;;;;;AAMJ,SAAgB,0BAAsB,OAA2B;CAC/D,MAAM,CAAA,EACJ,cACG,WAAE,OAAgB,CAAA,WAAY,CAAC;AACpC,QAAI,gBAAc,0BAAA,UAAA;EAChB,OAAE;;AAEJ,UAAO;IAAA,gBAAA,yBAAA,EACJ,YAAa,UACX,CAAA;IAAA,gBAAA,gBAAuB;KACtB,IAAA,OAAO;AACL,aAAA,SAAY,iBAAiB;;KAE/B,IAAI,QAAM;AACR,aAAO,sBAAiB,SAAA;;KAE3B,CAAC;IAAE,gBAAA,OAAA,EAAA,CAAA;IAAA;;EAEP,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_typescript_helpers_utilities = require('../helpers/utilities.cjs');
|
|
4
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
6
|
+
|
|
7
|
+
//#region src/typescript/components/property-name.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A TypeScript property name for an interface, class, or object member.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.
|
|
13
|
+
*/
|
|
14
|
+
function PropertyName(props) {
|
|
15
|
+
if (props.name) return (0, _alloy_js_core_jsx_runtime.memo)(() => {
|
|
16
|
+
if (props.private) return `#${props.name}`;
|
|
17
|
+
return quoteIfNeeded(props.name);
|
|
18
|
+
});
|
|
19
|
+
else {
|
|
20
|
+
const declSymbol = (0, _alloy_js_core.useContext)(_alloy_js_core.MemberDeclarationContext);
|
|
21
|
+
if (!declSymbol) return "(no member declaration context)";
|
|
22
|
+
if (declSymbol.isPrivateMemberSymbol) return ["#", (0, _alloy_js_core_jsx_runtime.memo)(() => declSymbol.name)];
|
|
23
|
+
else return [(0, _alloy_js_core_jsx_runtime.memo)(() => quoteIfNeeded(declSymbol.name))];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function quoteIfNeeded(name) {
|
|
27
|
+
if (require_typescript_helpers_utilities.isValidJSIdentifier(name)) return name;
|
|
28
|
+
else return `"${name.replace(/"/g, "\\\"")}"`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.PropertyName = PropertyName;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region src/typescript/components/property-name.d.ts
|
|
4
|
+
interface PropertyNameProps {
|
|
5
|
+
/**
|
|
6
|
+
* The name of the property.
|
|
7
|
+
*/
|
|
8
|
+
name?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the property is a private property. If `true`, the property will be prefixed with `#`.
|
|
11
|
+
*/
|
|
12
|
+
private?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A TypeScript property name for an interface, class, or object member.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.
|
|
19
|
+
*/
|
|
20
|
+
declare function PropertyName(props: PropertyNameProps): _alloy_js_core0.Children;
|
|
21
|
+
declare type __ΩPropertyNameProps = any[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { PropertyName, PropertyNameProps, __ΩPropertyNameProps };
|
|
24
|
+
//# sourceMappingURL=property-name.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-name.d.cts","names":[],"sources":["../../../src/typescript/components/property-name.tsx"],"mappings":";;;UAuBiB,iBAAA;;;AAAjB;EAIE,IAAA;;;;EAKA,OAAA;AAAA;;;;;;;iBASc,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region src/typescript/components/property-name.d.ts
|
|
4
|
+
interface PropertyNameProps {
|
|
5
|
+
/**
|
|
6
|
+
* The name of the property.
|
|
7
|
+
*/
|
|
8
|
+
name?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the property is a private property. If `true`, the property will be prefixed with `#`.
|
|
11
|
+
*/
|
|
12
|
+
private?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A TypeScript property name for an interface, class, or object member.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.
|
|
19
|
+
*/
|
|
20
|
+
declare function PropertyName(props: PropertyNameProps): _alloy_js_core0.Children;
|
|
21
|
+
declare type __ΩPropertyNameProps = any[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { PropertyName, PropertyNameProps, __ΩPropertyNameProps };
|
|
24
|
+
//# sourceMappingURL=property-name.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-name.d.mts","names":[],"sources":["../../../src/typescript/components/property-name.tsx"],"mappings":";;;UAuBiB,iBAAA;;;AAAjB;EAIE,IAAA;;;;EAKA,OAAA;AAAA;;;;;;;iBASc,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isValidJSIdentifier } from "../helpers/utilities.mjs";
|
|
2
|
+
import { memo } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
import { MemberDeclarationContext, useContext } from "@alloy-js/core";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/property-name.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A TypeScript property name for an interface, class, or object member.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.
|
|
11
|
+
*/
|
|
12
|
+
function PropertyName(props) {
|
|
13
|
+
if (props.name) return memo(() => {
|
|
14
|
+
if (props.private) return `#${props.name}`;
|
|
15
|
+
return quoteIfNeeded(props.name);
|
|
16
|
+
});
|
|
17
|
+
else {
|
|
18
|
+
const declSymbol = useContext(MemberDeclarationContext);
|
|
19
|
+
if (!declSymbol) return "(no member declaration context)";
|
|
20
|
+
if (declSymbol.isPrivateMemberSymbol) return ["#", memo(() => declSymbol.name)];
|
|
21
|
+
else return [memo(() => quoteIfNeeded(declSymbol.name))];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function quoteIfNeeded(name) {
|
|
25
|
+
if (isValidJSIdentifier(name)) return name;
|
|
26
|
+
else return `"${name.replace(/"/g, "\\\"")}"`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { PropertyName };
|
|
31
|
+
//# sourceMappingURL=property-name.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-name.mjs","names":[],"sources":["../../../src/typescript/components/property-name.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 { MemberDeclarationContext, useContext } from \"@alloy-js/core\";\nimport { memo } from \"@alloy-js/core/jsx-runtime\";\nimport { TSOutputSymbol } from \"@alloy-js/typescript\";\nimport { isValidJSIdentifier } from \"../helpers/utilities\";\n\nexport interface PropertyNameProps {\n /**\n * The name of the property.\n */\n name?: string;\n\n /**\n * Whether the property is a private property. If `true`, the property will be prefixed with `#`.\n */\n private?: boolean;\n}\n\n/**\n * A TypeScript property name for an interface, class, or object member.\n *\n * @remarks\n * If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.\n */\nexport function PropertyName(props: PropertyNameProps) {\n if (props.name) {\n return memo(() => {\n if (props.private) {\n return `#${props.name}`;\n }\n return quoteIfNeeded(props.name!);\n });\n } else {\n const declSymbol = useContext(MemberDeclarationContext) as TSOutputSymbol;\n if (!declSymbol) {\n return \"(no member declaration context)\";\n }\n\n if (declSymbol.isPrivateMemberSymbol) {\n return <>#{declSymbol.name}</>;\n } else {\n return <>{quoteIfNeeded(declSymbol.name)}</>;\n }\n }\n}\n\nfunction quoteIfNeeded(name: string) {\n if (isValidJSIdentifier(name)) {\n return name;\n } else {\n return `\"${name.replace(/\"/g, '\\\\\"')}\"`;\n }\n}\n"],"mappings":";;;;;;;;;;;AAyCA,SAAgB,aAAa,OAA0B;AACrD,KAAI,MAAM,KACR,QAAO,WAAW;AAChB,MAAI,MAAM,QACR,QAAO,IAAI,MAAM;AAEnB,SAAO,cAAc,MAAM,KAAM;GACjC;MACG;EACL,MAAM,aAAa,WAAW,yBAAyB;AACvD,MAAI,CAAC,WACH,QAAO;uCAGP,QAAE,CAAA,KAAW,WAAA,WAAuB,KAAA,CAAA;MAEpC,QAAK,CAAA,WAAA,cAAA,WAAA,KAAA,CAAA,CAAA;;;AAIX,SAAA,cAAA,MAAA;+BAEA,QAAS;KAEL,QAAO,IAAI,KAAA,QAAA,MAAA,OAAA,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/record-expression.tsx
|
|
6
|
+
function RecordExpression({ elementType }) {
|
|
7
|
+
return _alloy_js_core.code`
|
|
8
|
+
Record<string, ${elementType}>
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.RecordExpression = RecordExpression;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region src/typescript/components/record-expression.d.ts
|
|
4
|
+
interface RecordExpressionProps {
|
|
5
|
+
elementType: Children;
|
|
6
|
+
}
|
|
7
|
+
declare function RecordExpression({
|
|
8
|
+
elementType
|
|
9
|
+
}: RecordExpressionProps): Children;
|
|
10
|
+
declare type __ΩRecordExpressionProps = any[];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps };
|
|
13
|
+
//# sourceMappingURL=record-expression.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-expression.d.cts","names":[],"sources":["../../../src/typescript/components/record-expression.tsx"],"mappings":";;;UAoBiB,qBAAA;EACf,WAAA,EAAa,QAAA;AAAA;AAAA,iBAGC,gBAAA,CAAA;EAAmB;AAAA,GAAe,qBAAA,GAAqB,QAAA;AAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region src/typescript/components/record-expression.d.ts
|
|
4
|
+
interface RecordExpressionProps {
|
|
5
|
+
elementType: Children;
|
|
6
|
+
}
|
|
7
|
+
declare function RecordExpression({
|
|
8
|
+
elementType
|
|
9
|
+
}: RecordExpressionProps): Children;
|
|
10
|
+
declare type __ΩRecordExpressionProps = any[];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps };
|
|
13
|
+
//# sourceMappingURL=record-expression.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-expression.d.mts","names":[],"sources":["../../../src/typescript/components/record-expression.tsx"],"mappings":";;;UAoBiB,qBAAA;EACf,WAAA,EAAa,QAAA;AAAA;AAAA,iBAGC,gBAAA,CAAA;EAAmB;AAAA,GAAe,qBAAA,GAAqB,QAAA;AAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { code } from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region src/typescript/components/record-expression.tsx
|
|
4
|
+
function RecordExpression({ elementType }) {
|
|
5
|
+
return code`
|
|
6
|
+
Record<string, ${elementType}>
|
|
7
|
+
`;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { RecordExpression };
|
|
12
|
+
//# sourceMappingURL=record-expression.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-expression.mjs","names":[],"sources":["../../../src/typescript/components/record-expression.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, code } from \"@alloy-js/core\";\n\nexport interface RecordExpressionProps {\n elementType: Children;\n}\n\nexport function RecordExpression({ elementType }: RecordExpressionProps) {\n return code`\n Record<string, ${elementType}>\n `;\n}\n"],"mappings":";;;AAsBA,SAAA,iBAAA,iBAEgB;AACd,QAAO,IAAI;mBACM,YAAY"}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_core_contexts_reflection = require('../../core/contexts/reflection.cjs');
|
|
4
|
+
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
5
|
+
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
6
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
8
|
+
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
9
|
+
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
10
|
+
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
11
|
+
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
12
|
+
let _stryke_type_checks = require("@stryke/type-checks");
|
|
13
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
14
|
+
|
|
15
|
+
//#region src/typescript/components/tsdoc-reflection.tsx
|
|
16
|
+
/**
|
|
17
|
+
* 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.
|
|
18
|
+
*/
|
|
19
|
+
function TSDocReflectionClass(props) {
|
|
20
|
+
const [{ children, heading, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
21
|
+
"heading",
|
|
22
|
+
"children",
|
|
23
|
+
"reflection"
|
|
24
|
+
]);
|
|
25
|
+
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
26
|
+
const title = (0, _alloy_js_core.computed)(() => reflection.getTitle() || (0, _stryke_string_format_title_case.titleCase)(reflection.getName()));
|
|
27
|
+
const computedHeading = (0, _alloy_js_core.computed)(() => heading || reflection.getDescription() || title.value);
|
|
28
|
+
const alias = (0, _alloy_js_core.computed)(() => reflection.getAlias());
|
|
29
|
+
const domain = (0, _alloy_js_core.computed)(() => reflection.getDomain());
|
|
30
|
+
const permission = (0, _alloy_js_core.computed)(() => reflection.getPermission());
|
|
31
|
+
const readonly = (0, _alloy_js_core.computed)(() => reflection.isReadonly());
|
|
32
|
+
const internal = (0, _alloy_js_core.computed)(() => reflection.isInternal());
|
|
33
|
+
const ignore = (0, _alloy_js_core.computed)(() => reflection.isIgnored());
|
|
34
|
+
const hidden = (0, _alloy_js_core.computed)(() => reflection.isHidden());
|
|
35
|
+
if (!computedHeading.value || (0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value) && computedHeading.value.trim() === "") return null;
|
|
36
|
+
const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(title.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(alias.value) && alias.value.length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(permission.value) && permission.value.length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(domain.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(readonly.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(internal.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(ignore.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(hidden.value));
|
|
37
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
38
|
+
get heading() {
|
|
39
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value))() ? computedHeading.value.trim() : computedHeading.value;
|
|
40
|
+
},
|
|
41
|
+
get children() {
|
|
42
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
43
|
+
get when() {
|
|
44
|
+
return hasAttributes.value;
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
48
|
+
get title() {
|
|
49
|
+
return title.value;
|
|
50
|
+
},
|
|
51
|
+
get alias() {
|
|
52
|
+
return alias.value;
|
|
53
|
+
},
|
|
54
|
+
get domain() {
|
|
55
|
+
return domain.value;
|
|
56
|
+
},
|
|
57
|
+
get permission() {
|
|
58
|
+
return permission.value;
|
|
59
|
+
},
|
|
60
|
+
get readonly() {
|
|
61
|
+
return readonly.value;
|
|
62
|
+
},
|
|
63
|
+
get internal() {
|
|
64
|
+
return internal.value;
|
|
65
|
+
},
|
|
66
|
+
get ignore() {
|
|
67
|
+
return ignore.value;
|
|
68
|
+
},
|
|
69
|
+
get hidden() {
|
|
70
|
+
return hidden.value;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
75
|
+
get when() {
|
|
76
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
|
|
77
|
+
},
|
|
78
|
+
get children() {
|
|
79
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
80
|
+
get when() {
|
|
81
|
+
return hasAttributes.value;
|
|
82
|
+
},
|
|
83
|
+
get children() {
|
|
84
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
85
|
+
}
|
|
86
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
87
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
88
|
+
} })];
|
|
89
|
+
}
|
|
90
|
+
})];
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
|
|
96
|
+
*/
|
|
97
|
+
function TSDocContextClass(props) {
|
|
98
|
+
const reflectionClass = require_core_contexts_reflection.useReflectionClass();
|
|
99
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
100
|
+
get when() {
|
|
101
|
+
return (0, _stryke_type_checks.isSetObject)(reflectionClass.reflection);
|
|
102
|
+
},
|
|
103
|
+
get children() {
|
|
104
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionClass, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { get reflection() {
|
|
105
|
+
return reflectionClass.reflection;
|
|
106
|
+
} }));
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* 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.
|
|
112
|
+
*/
|
|
113
|
+
function TSDocReflectionProperty(props) {
|
|
114
|
+
const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
|
|
115
|
+
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
116
|
+
const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getTitle()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getAlias()) && reflection.getAlias().length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getPermission()) && reflection.getPermission().length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getDomain()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isReadonly()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isInternal()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isIgnored()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isHidden()) || reflection.hasDefault() && !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getDefaultValue()));
|
|
117
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
118
|
+
return reflection.getDescription();
|
|
119
|
+
} }, rest, { get children() {
|
|
120
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
121
|
+
get when() {
|
|
122
|
+
return hasAttributes.value;
|
|
123
|
+
},
|
|
124
|
+
get children() {
|
|
125
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
126
|
+
type: reflection,
|
|
127
|
+
get title() {
|
|
128
|
+
return reflection.getTitle();
|
|
129
|
+
},
|
|
130
|
+
get alias() {
|
|
131
|
+
return reflection.getAlias();
|
|
132
|
+
},
|
|
133
|
+
get domain() {
|
|
134
|
+
return reflection.getDomain();
|
|
135
|
+
},
|
|
136
|
+
get permission() {
|
|
137
|
+
return reflection.getPermission();
|
|
138
|
+
},
|
|
139
|
+
get readonly() {
|
|
140
|
+
return reflection.isReadonly();
|
|
141
|
+
},
|
|
142
|
+
get internal() {
|
|
143
|
+
return reflection.isInternal();
|
|
144
|
+
},
|
|
145
|
+
get ignore() {
|
|
146
|
+
return reflection.isIgnored();
|
|
147
|
+
},
|
|
148
|
+
get hidden() {
|
|
149
|
+
return reflection.isHidden();
|
|
150
|
+
},
|
|
151
|
+
get defaultValue() {
|
|
152
|
+
return reflection.getDefaultValue();
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
157
|
+
get when() {
|
|
158
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
|
|
159
|
+
},
|
|
160
|
+
get children() {
|
|
161
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
162
|
+
get when() {
|
|
163
|
+
return hasAttributes.value;
|
|
164
|
+
},
|
|
165
|
+
get children() {
|
|
166
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
167
|
+
}
|
|
168
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
169
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
170
|
+
} })];
|
|
171
|
+
}
|
|
172
|
+
})];
|
|
173
|
+
} }));
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
|
|
177
|
+
*/
|
|
178
|
+
function TSDocContextProperty(props) {
|
|
179
|
+
const reflection = require_core_contexts_reflection.useReflectionProperty();
|
|
180
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
181
|
+
get when() {
|
|
182
|
+
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
183
|
+
},
|
|
184
|
+
get children() {
|
|
185
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionProperty, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* 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.
|
|
191
|
+
*/
|
|
192
|
+
function TSDocReflectionMethod(props) {
|
|
193
|
+
const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
|
|
194
|
+
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
195
|
+
const heading = (0, _alloy_js_core.computed)(() => reflection.getDescription() || ((0, _stryke_type_checks_is_string.isString)(reflection.getName()) ? _alloy_js_core.code`${String(reflection.getName())} method definition` : void 0));
|
|
196
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
197
|
+
return heading.value;
|
|
198
|
+
} }, rest, { get children() {
|
|
199
|
+
return [
|
|
200
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
201
|
+
get title() {
|
|
202
|
+
return reflection.getTitle();
|
|
203
|
+
},
|
|
204
|
+
get alias() {
|
|
205
|
+
return reflection.getAlias();
|
|
206
|
+
},
|
|
207
|
+
get domain() {
|
|
208
|
+
return reflection.getDomain();
|
|
209
|
+
},
|
|
210
|
+
get permission() {
|
|
211
|
+
return reflection.getPermission();
|
|
212
|
+
},
|
|
213
|
+
get readonly() {
|
|
214
|
+
return reflection.isReadonly();
|
|
215
|
+
},
|
|
216
|
+
get internal() {
|
|
217
|
+
return reflection.isInternal();
|
|
218
|
+
},
|
|
219
|
+
get ignore() {
|
|
220
|
+
return reflection.isIgnored();
|
|
221
|
+
},
|
|
222
|
+
get hidden() {
|
|
223
|
+
return reflection.isHidden();
|
|
224
|
+
}
|
|
225
|
+
}),
|
|
226
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
227
|
+
get when() {
|
|
228
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!Boolean(children))() && (0, _alloy_js_core.childrenArray)(() => children).length > 0;
|
|
229
|
+
},
|
|
230
|
+
get children() {
|
|
231
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
232
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
233
|
+
} });
|
|
234
|
+
}
|
|
235
|
+
}),
|
|
236
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
237
|
+
get when() {
|
|
238
|
+
return reflection.getParameters().length > 0;
|
|
239
|
+
},
|
|
240
|
+
get children() {
|
|
241
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
242
|
+
get each() {
|
|
243
|
+
return reflection.getParameters();
|
|
244
|
+
},
|
|
245
|
+
hardline: true,
|
|
246
|
+
get ender() {
|
|
247
|
+
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
248
|
+
},
|
|
249
|
+
children: (param) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocParam, {
|
|
250
|
+
get name() {
|
|
251
|
+
return param.getName();
|
|
252
|
+
},
|
|
253
|
+
get optional() {
|
|
254
|
+
return param.isOptional();
|
|
255
|
+
},
|
|
256
|
+
get defaultValue() {
|
|
257
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!param.hasDefault())() ? param.getDefaultValue() : void 0;
|
|
258
|
+
},
|
|
259
|
+
get children() {
|
|
260
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
261
|
+
get when() {
|
|
262
|
+
return Boolean(param.parameter.description);
|
|
263
|
+
},
|
|
264
|
+
get fallback() {
|
|
265
|
+
return _alloy_js_core.code`A parameter to provide a ${param.getName()} value to the function.`;
|
|
266
|
+
},
|
|
267
|
+
get children() {
|
|
268
|
+
return param.parameter.description;
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
})
|
|
273
|
+
})];
|
|
274
|
+
}
|
|
275
|
+
}),
|
|
276
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
277
|
+
get when() {
|
|
278
|
+
return reflection.getReturnType().kind !== _powerlines_deepkit_vendor_type.ReflectionKind.void;
|
|
279
|
+
},
|
|
280
|
+
get children() {
|
|
281
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocReturns, { get children() {
|
|
282
|
+
return _alloy_js_core.code`The return value of the function, which is of type ${(0, _powerlines_deepkit_vendor_type.stringifyType)(reflection.getReturnType())}.`;
|
|
283
|
+
} })];
|
|
284
|
+
}
|
|
285
|
+
})
|
|
286
|
+
];
|
|
287
|
+
} }));
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* 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.
|
|
291
|
+
*/
|
|
292
|
+
function TSDocContextMethod(props) {
|
|
293
|
+
const reflection = require_core_contexts_reflection.useReflectionMethod();
|
|
294
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
295
|
+
get when() {
|
|
296
|
+
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
297
|
+
},
|
|
298
|
+
get children() {
|
|
299
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionMethod, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
//#endregion
|
|
305
|
+
exports.TSDocContextClass = TSDocContextClass;
|
|
306
|
+
exports.TSDocContextMethod = TSDocContextMethod;
|
|
307
|
+
exports.TSDocContextProperty = TSDocContextProperty;
|
|
308
|
+
exports.TSDocReflectionClass = TSDocReflectionClass;
|
|
309
|
+
exports.TSDocReflectionMethod = TSDocReflectionMethod;
|
|
310
|
+
exports.TSDocReflectionProperty = TSDocReflectionProperty;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TSDocProps } from "./tsdoc.cjs";
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
import { ReflectionClass, ReflectionMethod, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
6
|
+
interface TSDocReflectionClassProps<T extends Record<string, any> = Record<string, any>> extends TSDocProps {
|
|
7
|
+
reflection: ReflectionClass<T>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
12
|
+
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>): _alloy_js_core0.Children;
|
|
13
|
+
/**
|
|
14
|
+
* Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
|
|
15
|
+
*/
|
|
16
|
+
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core0.Children;
|
|
17
|
+
interface TSDocReflectionPropertyProps extends TSDocProps {
|
|
18
|
+
reflection: ReflectionProperty;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*/
|
|
23
|
+
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps): _alloy_js_core0.Children;
|
|
24
|
+
/**
|
|
25
|
+
* Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
|
|
26
|
+
*/
|
|
27
|
+
declare function TSDocContextProperty(props: TSDocProps): _alloy_js_core0.Children;
|
|
28
|
+
interface TSDocReflectionMethodProps extends TSDocProps {
|
|
29
|
+
reflection: ReflectionMethod;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 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.
|
|
33
|
+
*/
|
|
34
|
+
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps): _alloy_js_core0.Children;
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*/
|
|
38
|
+
declare function TSDocContextMethod(props: TSDocProps): _alloy_js_core0.Children;
|
|
39
|
+
declare type __ΩTSDocReflectionClassProps = any[];
|
|
40
|
+
declare type __ΩTSDocReflectionPropertyProps = any[];
|
|
41
|
+
declare type __ΩTSDocReflectionMethodProps = any[];
|
|
42
|
+
//#endregion
|
|
43
|
+
export { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps };
|
|
44
|
+
//# sourceMappingURL=tsdoc-reflection.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsdoc-reflection.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"mappings":";;;;;UAqDiB,yBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,UAAA;EACR,UAAA,EAAY,eAAA,CAAgB,CAAA;AAAA;AAH9B;;;AAAA,iBASgB,oBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,yBAAA,CAA0B,CAAA,IAAD,eAAA,CAAG,QAAA;;;;iBAkFrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAaF,4BAAA,SAAqC,UAAA;EACpD,UAAA,EAAY,kBAAA;AAAA;;;;iBAME,uBAAA,CAAwB,KAAA,EAAO,4BAAA,GAA4B,eAAA,CAAA,QAAA;;;;iBA0D3D,oBAAA,CAAqB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAUrC,0BAAA,SAAmC,UAAA;EAClD,UAAA,EAAY,gBAAA;AAAA;;;;iBAME,qBAAA,CAAsB,KAAA,EAAO,0BAAA,GAA0B,eAAA,CAAA,QAAA;;;;iBAoEvD,kBAAA,CAAmB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TSDocProps } from "./tsdoc.mjs";
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
import { ReflectionClass, ReflectionMethod, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
6
|
+
interface TSDocReflectionClassProps<T extends Record<string, any> = Record<string, any>> extends TSDocProps {
|
|
7
|
+
reflection: ReflectionClass<T>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
12
|
+
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>): _alloy_js_core0.Children;
|
|
13
|
+
/**
|
|
14
|
+
* Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
|
|
15
|
+
*/
|
|
16
|
+
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core0.Children;
|
|
17
|
+
interface TSDocReflectionPropertyProps extends TSDocProps {
|
|
18
|
+
reflection: ReflectionProperty;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*/
|
|
23
|
+
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps): _alloy_js_core0.Children;
|
|
24
|
+
/**
|
|
25
|
+
* Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
|
|
26
|
+
*/
|
|
27
|
+
declare function TSDocContextProperty(props: TSDocProps): _alloy_js_core0.Children;
|
|
28
|
+
interface TSDocReflectionMethodProps extends TSDocProps {
|
|
29
|
+
reflection: ReflectionMethod;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 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.
|
|
33
|
+
*/
|
|
34
|
+
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps): _alloy_js_core0.Children;
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*/
|
|
38
|
+
declare function TSDocContextMethod(props: TSDocProps): _alloy_js_core0.Children;
|
|
39
|
+
declare type __ΩTSDocReflectionClassProps = any[];
|
|
40
|
+
declare type __ΩTSDocReflectionPropertyProps = any[];
|
|
41
|
+
declare type __ΩTSDocReflectionMethodProps = any[];
|
|
42
|
+
//#endregion
|
|
43
|
+
export { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps };
|
|
44
|
+
//# sourceMappingURL=tsdoc-reflection.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsdoc-reflection.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"mappings":";;;;;UAqDiB,yBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,UAAA;EACR,UAAA,EAAY,eAAA,CAAgB,CAAA;AAAA;AAH9B;;;AAAA,iBASgB,oBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,yBAAA,CAA0B,CAAA,IAAD,eAAA,CAAG,QAAA;;;;iBAkFrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAaF,4BAAA,SAAqC,UAAA;EACpD,UAAA,EAAY,kBAAA;AAAA;;;;iBAME,uBAAA,CAAwB,KAAA,EAAO,4BAAA,GAA4B,eAAA,CAAA,QAAA;;;;iBA0D3D,oBAAA,CAAqB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAUrC,0BAAA,SAAmC,UAAA;EAClD,UAAA,EAAY,gBAAA;AAAA;;;;iBAME,qBAAA,CAAsB,KAAA,EAAO,0BAAA,GAA0B,eAAA,CAAA,QAAA;;;;iBAoEvD,kBAAA,CAAmB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA"}
|