@powerlines/plugin-alloy 0.26.9 → 0.26.11
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/typescript/components/index.cjs +1 -0
- package/dist/typescript/components/index.d.cts +2 -2
- package/dist/typescript/components/index.d.mts +2 -2
- package/dist/typescript/components/index.mjs +2 -2
- package/dist/typescript/components/object-declaration.cjs +1 -1
- package/dist/typescript/components/object-declaration.d.cts.map +1 -1
- package/dist/typescript/components/object-declaration.d.mts.map +1 -1
- package/dist/typescript/components/object-declaration.mjs +1 -1
- package/dist/typescript/components/object-declaration.mjs.map +1 -1
- package/dist/typescript/components/tsdoc.cjs +26 -6
- package/dist/typescript/components/tsdoc.d.cts +6 -1
- package/dist/typescript/components/tsdoc.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc.d.mts +6 -1
- package/dist/typescript/components/tsdoc.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc.mjs +26 -7
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/index.cjs +1 -0
- package/dist/typescript/index.d.cts +2 -2
- package/dist/typescript/index.d.mts +2 -2
- package/dist/typescript/index.mjs +2 -2
- package/package.json +10 -10
|
@@ -53,6 +53,7 @@ exports.TSDocReflectionMethod = require_typescript_components_tsdoc_reflection.T
|
|
|
53
53
|
exports.TSDocReflectionProperty = require_typescript_components_tsdoc_reflection.TSDocReflectionProperty;
|
|
54
54
|
exports.TSDocRemarks = require_typescript_components_tsdoc.TSDocRemarks;
|
|
55
55
|
exports.TSDocReturns = require_typescript_components_tsdoc.TSDocReturns;
|
|
56
|
+
exports.TSDocRuntime = require_typescript_components_tsdoc.TSDocRuntime;
|
|
56
57
|
exports.TSDocTag = require_typescript_components_tsdoc.TSDocTag;
|
|
57
58
|
exports.TSDocThrows = require_typescript_components_tsdoc.TSDocThrows;
|
|
58
59
|
exports.TSDocTitle = require_typescript_components_tsdoc.TSDocTitle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./tsdoc.cjs";
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./tsdoc.cjs";
|
|
2
2
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps } from "./typescript-file.cjs";
|
|
3
3
|
import { BuiltinFile, BuiltinFileProps } from "./builtin-file.cjs";
|
|
4
4
|
import { TypeParameters, TypeParametersProps } from "./type-parameters.cjs";
|
|
@@ -11,4 +11,4 @@ import { PropertyName, PropertyNameProps } from "./property-name.cjs";
|
|
|
11
11
|
import { RecordExpression, RecordExpressionProps } from "./record-expression.cjs";
|
|
12
12
|
import { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps } from "./tsdoc-reflection.cjs";
|
|
13
13
|
import { TypeDeclaration, TypeDeclarationProps } from "./type-declaration.cjs";
|
|
14
|
-
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
|
|
14
|
+
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./tsdoc.mjs";
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./tsdoc.mjs";
|
|
2
2
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps } from "./typescript-file.mjs";
|
|
3
3
|
import { BuiltinFile, BuiltinFileProps } from "./builtin-file.mjs";
|
|
4
4
|
import { TypeParameters, TypeParametersProps } from "./type-parameters.mjs";
|
|
@@ -11,4 +11,4 @@ import { PropertyName, PropertyNameProps } from "./property-name.mjs";
|
|
|
11
11
|
import { RecordExpression, RecordExpressionProps } from "./record-expression.mjs";
|
|
12
12
|
import { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps } from "./tsdoc-reflection.mjs";
|
|
13
13
|
import { TypeDeclaration, TypeDeclarationProps } from "./type-declaration.mjs";
|
|
14
|
-
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
|
|
14
|
+
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle } from "./tsdoc.mjs";
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocThrows, TSDocTitle } from "./tsdoc.mjs";
|
|
2
2
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./typescript-file.mjs";
|
|
3
3
|
import { BuiltinFile } from "./builtin-file.mjs";
|
|
4
4
|
import { PropertyName } from "./property-name.mjs";
|
|
@@ -12,4 +12,4 @@ import { ObjectDeclaration, ObjectDeclarationProperty } from "./object-declarati
|
|
|
12
12
|
import { RecordExpression } from "./record-expression.mjs";
|
|
13
13
|
import { TypeDeclaration } from "./type-declaration.mjs";
|
|
14
14
|
|
|
15
|
-
export { BuiltinFile, ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet, DynamicImportStatement, EntryFile, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceExpression, InterfaceMember, ObjectDeclaration, ObjectDeclarationProperty, PropertyName, RecordExpression, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle, TypeDeclaration, TypeParameters, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports };
|
|
15
|
+
export { BuiltinFile, ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet, DynamicImportStatement, EntryFile, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceExpression, InterfaceMember, ObjectDeclaration, ObjectDeclarationProperty, PropertyName, RecordExpression, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocThrows, TSDocTitle, TypeDeclaration, TypeParameters, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports };
|
|
@@ -19,7 +19,7 @@ function ObjectDeclaration(props) {
|
|
|
19
19
|
if (!props.reflection?.value) return null;
|
|
20
20
|
const objectName = (0, _alloy_js_core.computed)(() => (0, _stryke_string_format_camel_case.camelCase)(((0, _stryke_type_checks_is_string.isString)(props.name) ? props.name : props.name.toString()) || props.reflection.value.getName()));
|
|
21
21
|
const objectType = (0, _alloy_js_core.computed)(() => props.type || (0, _stryke_string_format_pascal_case.pascalCase)(props.reflection.value.getName()));
|
|
22
|
-
const properties = (0, _alloy_js_core.computed)(() => props.reflection.value.getProperties().filter((item) => !item.isIgnored() && !(0, _stryke_type_checks_is_undefined.isUndefined)(props.defaultValue?.value?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
22
|
+
const properties = (0, _alloy_js_core.computed)(() => props.reflection.value.getProperties().filter((item) => !item.isIgnored() && !item.isRuntime() && !(0, _stryke_type_checks_is_undefined.isUndefined)(props.defaultValue?.value?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
23
23
|
if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(props.defaultValue?.value?.[alias])) return props.defaultValue?.value?.[alias];
|
|
24
24
|
return ret;
|
|
25
25
|
}, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/object-declaration.tsx"],"mappings":";;;;;;UAuDiB,WAAA;EAAA,SACN,KAAA,EAAO,CAAA;AAAA;AAAA,UAGD,sBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,mBAAA;EACR,UAAA,GAAa,WAAA,CAAY,eAAA,CAAgB,CAAA;EACzC,YAAA,GAAe,WAAA,CAAY,OAAA,CAAQ,CAAA;AAAA;;;;iBAMrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,sBAAA,CAAuB,CAAA,IAAD,iBAAA,CAAG,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"object-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/object-declaration.tsx"],"mappings":";;;;;;UAuDiB,WAAA;EAAA,SACN,KAAA,EAAO,CAAA;AAAA;AAAA,UAGD,sBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,mBAAA;EACR,UAAA,GAAa,WAAA,CAAY,eAAA,CAAgB,CAAA;EACzC,YAAA,GAAe,WAAA,CAAY,OAAA,CAAQ,CAAA;AAAA;;;;iBAMrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,sBAAA,CAAuB,CAAA,IAAD,iBAAA,CAAG,QAAA;AAAA,UAsHjB,8BAAA,SAAuC,cAAA;EACtD,QAAA,EAAU,kBAAA;EACV,YAAA;AAAA;;;;iBAMc,yBAAA,CACd,KAAA,EAAO,8BAAA,GAA8B,iBAAA,CAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/object-declaration.tsx"],"mappings":";;;;;;UAuDiB,WAAA;EAAA,SACN,KAAA,EAAO,CAAA;AAAA;AAAA,UAGD,sBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,mBAAA;EACR,UAAA,GAAa,WAAA,CAAY,eAAA,CAAgB,CAAA;EACzC,YAAA,GAAe,WAAA,CAAY,OAAA,CAAQ,CAAA;AAAA;;;;iBAMrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,sBAAA,CAAuB,CAAA,IAAD,iBAAA,CAAG,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"object-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/object-declaration.tsx"],"mappings":";;;;;;UAuDiB,WAAA;EAAA,SACN,KAAA,EAAO,CAAA;AAAA;AAAA,UAGD,sBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,mBAAA;EACR,UAAA,GAAa,WAAA,CAAY,eAAA,CAAgB,CAAA;EACzC,YAAA,GAAe,WAAA,CAAY,OAAA,CAAQ,CAAA;AAAA;;;;iBAMrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,sBAAA,CAAuB,CAAA,IAAD,iBAAA,CAAG,QAAA;AAAA,UAsHjB,8BAAA,SAAuC,cAAA;EACtD,QAAA,EAAU,kBAAA;EACV,YAAA;AAAA;;;;iBAMc,yBAAA,CACd,KAAA,EAAO,8BAAA,GAA8B,iBAAA,CAAA,QAAA"}
|
|
@@ -17,7 +17,7 @@ function ObjectDeclaration(props) {
|
|
|
17
17
|
if (!props.reflection?.value) return null;
|
|
18
18
|
const objectName = computed(() => camelCase((isString(props.name) ? props.name : props.name.toString()) || props.reflection.value.getName()));
|
|
19
19
|
const objectType = computed(() => props.type || pascalCase(props.reflection.value.getName()));
|
|
20
|
-
const properties = computed(() => props.reflection.value.getProperties().filter((item) => !item.isIgnored() && !isUndefined(props.defaultValue?.value?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
20
|
+
const properties = computed(() => props.reflection.value.getProperties().filter((item) => !item.isIgnored() && !item.isRuntime() && !isUndefined(props.defaultValue?.value?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
21
21
|
if (isUndefined(ret) && !isUndefined(props.defaultValue?.value?.[alias])) return props.defaultValue?.value?.[alias];
|
|
22
22
|
return ret;
|
|
23
23
|
}, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1));
|
|
@@ -1 +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\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 => (\n <ObjectDeclarationProperty\n property={prop}\n defaultValue={\n props.defaultValue?.value?.[prop.getNameAsString()]\n }\n />\n )}\n </For>\n </ObjectExpression>\n )}\n </ValueTypeSymbolSlot>\n </CoreDeclaration>\n </Show>\n <hbr />\n </ReflectionClassContext.Provider>\n </Show>\n );\n}\n\nexport interface ObjectDeclarationPropertyProps extends ComponentProps {\n property: ReflectionProperty;\n defaultValue?: any;\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, defaultValue }] = splitProps(props, [\n \"property\",\n \"defaultValue\"\n ]);\n\n return (\n <ReflectionPropertyContext.Provider value={{ property, defaultValue }}>\n <TSDocReflectionProperty\n reflection={property}\n defaultValue={defaultValue}\n />\n <ObjectProperty\n name={property.getNameAsString()}\n value={stringifyDefaultValue(property, defaultValue)}\n />\n <hbr />\n </ReflectionPropertyContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyCA,SAAS,kBAAmD,OAAA;AAC5D,KAAM,CAAC,MAAE,YAAa,MACtB,QAAS;CAET,MAAO,aAAA,eAAA,WAAA,SAAA,MAAA,KAAA,GAAA,MAAA,OAAA,MAAA,KAAA,UAAA,KAAA,MAAA,WAAA,MAAA,SAAA,CAAA,CAAA;CACL,MAAA,aAAA,eAAsB,MAAA,QAAA,WAAA,MAAA,WAAA,MAAA,SAAA,CAAA,CAAA;CACtB,MAAA,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;AACA,MAAM,YAAW,IAAA,IAAS,CAAA,YAAW,MAAA,cAAA,QAAA,OAAA,CACjC,QAAG,MAAA,cAA8C,QAAA;AAErD,SAAA;IACA,OAAA,IAAA,KAAA,iBAAA,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;CACA,MAAM,iBAAQ,kBAAW;;CAE3B,MAAO,MAAA,kBAAyB,MAAM,MAAA;EACpC,SAAS,MAAQ;EACnB,SAAA,MAAA;;EAEA,UAAO,MAAU;EACb,SAAQ,MAAO,UAAQ,cAAc,UAAW,cAAA;EAClD,MAAQ,MAAA,OAAA,eAAoB,cAAA;EAC5B,YAAa,iBAAY,CAAA,IAAA,WAAmB;EAC5C,CAAA;AACF,KAAA,CAAA,MAAA;CAGE,MAAC,UAAY,MAAA,MAAW,QAAW,MAAI,MAAM,QAAW;CACxD,MAAA,OAAA,MAAA,OAAA,gBAAA,gBAAA,EACF,IAAO,WAAS;AACZ,SAAQ,CAAA,MAAO,gBAAe,gBAAkB,EAC5C,IAAC,WAAA;AACF,UAAM,MAAU;KAErB,CAAA,CAAA;IAEA,CAAA,GAAK;AACL,QAAE,gBAAS,MAAA;EACT,IAAG,OAAQ;AACT,UAAO,CAAC,CAAA,MAAA,WAAkB;;EAE7B,IAAA,WAAA;AACD,UAAM,gBAAqB,uBAAA,UAAA;IACrB,IAAE,QAAU;AACjB,YAAA;MACK,YAAa,MAAS,WAAI;MAC9B,UAAA;OACG,MAAY,WAAM;OACZ,MAAA,WAAA;OACC,cAAA,MAAA,cAAA;OACH;MACA;;IAEH,IAAI,
|
|
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\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 !item.isRuntime() &&\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 => (\n <ObjectDeclarationProperty\n property={prop}\n defaultValue={\n props.defaultValue?.value?.[prop.getNameAsString()]\n }\n />\n )}\n </For>\n </ObjectExpression>\n )}\n </ValueTypeSymbolSlot>\n </CoreDeclaration>\n </Show>\n <hbr />\n </ReflectionClassContext.Provider>\n </Show>\n );\n}\n\nexport interface ObjectDeclarationPropertyProps extends ComponentProps {\n property: ReflectionProperty;\n defaultValue?: any;\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, defaultValue }] = splitProps(props, [\n \"property\",\n \"defaultValue\"\n ]);\n\n return (\n <ReflectionPropertyContext.Provider value={{ property, defaultValue }}>\n <TSDocReflectionProperty\n reflection={property}\n defaultValue={defaultValue}\n />\n <ObjectProperty\n name={property.getNameAsString()}\n value={stringifyDefaultValue(property, defaultValue)}\n />\n <hbr />\n </ReflectionPropertyContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyCA,SAAS,kBAAmD,OAAA;AAC5D,KAAM,CAAC,MAAE,YAAa,MACtB,QAAS;CAET,MAAO,aAAA,eAAA,WAAA,SAAA,MAAA,KAAA,GAAA,MAAA,OAAA,MAAA,KAAA,UAAA,KAAA,MAAA,WAAA,MAAA,SAAA,CAAA,CAAA;CACL,MAAA,aAAA,eAAsB,MAAA,QAAA,WAAA,MAAA,WAAA,MAAA,SAAA,CAAA,CAAA;CACtB,MAAA,aAAA,eAAA,MAAA,WAAA,MAAA,eAAA,CAAA,QAAA,SAAA,CAAA,KAAA,WAAA,IAAA,CAAA,KAAA,WAAA,IAAA,CAAA,YAAA,MAAA,cAAA,QAAA,KAAA,iBAAA,KAAA,KAAA,UAAA,CAAA,QAAA,KAAA,UAAA;AACA,MAAM,YAAW,IAAA,IAAS,CAAA,YAAW,MAAA,cAAA,QAAA,OAAA,CACjC,QAAG,MAAA,cAA8C,QAAA;AAErD,SAAA;IACA,OAAA,IAAA,KAAA,iBAAA,CAAA,CAA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AEA,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;cACC,UAAA;cACT,IAAA,eAAA;AACH,sBAAA,MAAA,cAAA,QAAA,KAAA,iBAAA;;cAEsB,CAAA;aACE,CAAC;cAET,CAAA;aAED,CAAA;UAAA;;QAEL,CAAA,CAAA;;MAET,CAAA,EAAU,gBAAkB,OAAO,EAAA,CAAA,CAAA;;;;EAIpC,CAAC;;;;;AAUJ,SAAS,0BAAA,OAAA;CACP,MAAG,CAAI,EACL,UACA,kBACG,WAAG,OAAY,CAAA,YAAgB,eAAU,CAAA;AAC9C,QAAO,gBAAW,0BAAA,UAAA;EAChB,OAAO;GACL;GACA;GACD;EACD,IAAI,WAAE;AACJ,UAAO;IAAC,gBAAkB,yBAAuB;KAC/C,YAAG;KACA;KACJ,CAAC;IAAE,gBAAkB,gBAAc;KAClC,IAAI,OAAO;AACT,aAAG,SAAU,iBAAM;;KAErB,IAAI,QAAC;AACH,aAAK,sBAAqB,UAAM,aAAY;;KAE/C,CAAC;IAAE,gBAAS,OAAA,EAAA,CAAA;IAAA;;EAEhB,CAAC"}
|
|
@@ -39,9 +39,13 @@ function TSDoc(props) {
|
|
|
39
39
|
get children() {
|
|
40
40
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
41
41
|
}
|
|
42
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, {
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, {
|
|
43
|
+
hardline: false,
|
|
44
|
+
softline: true,
|
|
45
|
+
get children() {
|
|
46
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
47
|
+
}
|
|
48
|
+
})];
|
|
45
49
|
}
|
|
46
50
|
})
|
|
47
51
|
];
|
|
@@ -167,7 +171,8 @@ function TSDocRemarks(props) {
|
|
|
167
171
|
"@remarks ",
|
|
168
172
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
169
173
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, {
|
|
170
|
-
hardline:
|
|
174
|
+
hardline: false,
|
|
175
|
+
softline: true,
|
|
171
176
|
get children() {
|
|
172
177
|
return (0, _alloy_js_core.childrenArray)(() => props.children);
|
|
173
178
|
}
|
|
@@ -237,10 +242,16 @@ function TSDocHidden() {
|
|
|
237
242
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, { tag: "hidden" });
|
|
238
243
|
}
|
|
239
244
|
/**
|
|
245
|
+
* Create a TSDoc `@runtime` tag.
|
|
246
|
+
*/
|
|
247
|
+
function TSDocRuntime() {
|
|
248
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, { tag: "runtime" });
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
240
251
|
* Generates a TypeScript interface property for the given reflection class.
|
|
241
252
|
*/
|
|
242
253
|
function TSDocAttributesTags(props) {
|
|
243
|
-
const [{ type, alias, permission, readonly, internal, ignore, hidden, defaultValue }] = (0, _alloy_js_core.splitProps)(props, [
|
|
254
|
+
const [{ type, alias, permission, readonly, internal, ignore, hidden, runtime, defaultValue }] = (0, _alloy_js_core.splitProps)(props, [
|
|
244
255
|
"type",
|
|
245
256
|
"alias",
|
|
246
257
|
"permission",
|
|
@@ -248,6 +259,7 @@ function TSDocAttributesTags(props) {
|
|
|
248
259
|
"internal",
|
|
249
260
|
"ignore",
|
|
250
261
|
"hidden",
|
|
262
|
+
"runtime",
|
|
251
263
|
"defaultValue"
|
|
252
264
|
]);
|
|
253
265
|
const title = (0, _alloy_js_core.computed)(() => props.title?.trim() || "");
|
|
@@ -323,6 +335,12 @@ function TSDocAttributesTags(props) {
|
|
|
323
335
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocHidden, {});
|
|
324
336
|
}
|
|
325
337
|
}),
|
|
338
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
339
|
+
when: runtime === true,
|
|
340
|
+
get children() {
|
|
341
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocRuntime, {});
|
|
342
|
+
}
|
|
343
|
+
}),
|
|
326
344
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
327
345
|
get when() {
|
|
328
346
|
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(type))() && !(0, _stryke_type_checks_is_undefined.isUndefined)(defaultValue);
|
|
@@ -435,7 +453,8 @@ function TSDocModule(props) {
|
|
|
435
453
|
},
|
|
436
454
|
get children() {
|
|
437
455
|
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, {
|
|
438
|
-
hardline:
|
|
456
|
+
hardline: false,
|
|
457
|
+
softline: true,
|
|
439
458
|
get children() {
|
|
440
459
|
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
441
460
|
}
|
|
@@ -472,6 +491,7 @@ exports.TSDocPermission = TSDocPermission;
|
|
|
472
491
|
exports.TSDocReadonly = TSDocReadonly;
|
|
473
492
|
exports.TSDocRemarks = TSDocRemarks;
|
|
474
493
|
exports.TSDocReturns = TSDocReturns;
|
|
494
|
+
exports.TSDocRuntime = TSDocRuntime;
|
|
475
495
|
exports.TSDocTag = TSDocTag;
|
|
476
496
|
exports.TSDocThrows = TSDocThrows;
|
|
477
497
|
exports.TSDocTitle = TSDocTitle;
|
|
@@ -85,6 +85,10 @@ declare function TSDocIgnore(): Children;
|
|
|
85
85
|
* Create a TSDoc `@hidden` tag.
|
|
86
86
|
*/
|
|
87
87
|
declare function TSDocHidden(): Children;
|
|
88
|
+
/**
|
|
89
|
+
* Create a TSDoc `@runtime` tag.
|
|
90
|
+
*/
|
|
91
|
+
declare function TSDocRuntime(): Children;
|
|
88
92
|
interface TSDocAttributesTagsProps {
|
|
89
93
|
type?: ReflectionKind | ReflectionProperty | ReflectionParameter;
|
|
90
94
|
title?: string;
|
|
@@ -95,6 +99,7 @@ interface TSDocAttributesTagsProps {
|
|
|
95
99
|
internal?: boolean;
|
|
96
100
|
ignore?: boolean;
|
|
97
101
|
hidden?: boolean;
|
|
102
|
+
runtime?: boolean;
|
|
98
103
|
defaultValue?: any;
|
|
99
104
|
}
|
|
100
105
|
/**
|
|
@@ -152,5 +157,5 @@ interface TSDocModuleProps extends ComponentProps {
|
|
|
152
157
|
*/
|
|
153
158
|
declare function TSDocModule(props: TSDocModuleProps): Children;
|
|
154
159
|
//#endregion
|
|
155
|
-
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle };
|
|
160
|
+
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle };
|
|
156
161
|
//# sourceMappingURL=tsdoc.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAyCiB,UAAA,SAAmB,cAAA;EAClC,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAyCiB,UAAA,SAAmB,cAAA;EAClC,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA6BtB,aAAA,SAAsB,cAAA;EACrC,GAAA;AAAA;;AA9BF;;iBAoCgB,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAAA,EAAY,mBAAA;AAAA;;;;iBAME,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;;AA5DhD;;iBAyEgB,eAAA,CAAgB,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAUpC,sBAAA,SAA+B,cAAA;EAC9C,IAAA,EAAM,cAAA,GAAiB,kBAAA,GAAqB,mBAAA;EAC5C,YAAA;AAAA;;;;iBAMc,iBAAA,CAAkB,KAAA,EAAO,sBAAA,GAAsB,QAAA;;;;iBAkB/C,YAAA,CAAa,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAelC,S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Doc `@runtime` tag.
|
|
90
|
+
*/
|
|
91
|
+
declare function TSDocRuntime(): Children;
|
|
88
92
|
interface TSDocAttributesTagsProps {
|
|
89
93
|
type?: ReflectionKind | ReflectionProperty | ReflectionParameter;
|
|
90
94
|
title?: string;
|
|
@@ -95,6 +99,7 @@ interface TSDocAttributesTagsProps {
|
|
|
95
99
|
internal?: boolean;
|
|
96
100
|
ignore?: boolean;
|
|
97
101
|
hidden?: boolean;
|
|
102
|
+
runtime?: boolean;
|
|
98
103
|
defaultValue?: any;
|
|
99
104
|
}
|
|
100
105
|
/**
|
|
@@ -152,5 +157,5 @@ interface TSDocModuleProps extends ComponentProps {
|
|
|
152
157
|
*/
|
|
153
158
|
declare function TSDocModule(props: TSDocModuleProps): Children;
|
|
154
159
|
//#endregion
|
|
155
|
-
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle };
|
|
160
|
+
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle };
|
|
156
161
|
//# sourceMappingURL=tsdoc.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.d.mts","names":[],"sources":["../../../src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AAA,CAAA,GAAa,QAAA;;;;iBAOb,aAAA,CAAA,GAAa,QAAA;;;AAtG7B;iBA6GgB,WAAA,CAAA,GAAW,QAAA;;;;iBAOX,WAAA,CAAA,GAAW,QAAA;;;;iBAOX,YAAA,CAAA,GAAY,QAAA;AAAA,UAIX,wBAAA;EACf,IAAA,GAAO,cAAA,GAAiB,kBAAA,GAAqB,mBAAA;EAC7C,KAAA;EACA,KAAA;EACA,UAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA;EACA,MAAA;EACA,MAAA;EACA,OAAA;EACA,YAAA;AAAA;;;;iBAMc,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,QAAA;AAAA,UAmFlD,eAAA;EACf,IAAA,EAAM,QAAA;EACN,QAAA,GAAW,QAAA;EACX,QAAA;EACA,YAAA,GAAe,QAAA;AAAA;;;AAnMjB;iBAyMgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;;iBAiDjC,YAAA,CAAa,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAOlC,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAIhC,gBAAA,SAAyB,cAAA;;;;;;;;AAlP1C;;;;;AAYA;EAoPE,MAAA;;;;;;;;AAxNF;;;;EAqOE,IAAA,EAAM,QAAA;AAAA;;;;iBAMQ,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
|
|
@@ -37,9 +37,13 @@ function TSDoc(props) {
|
|
|
37
37
|
get children() {
|
|
38
38
|
return createComponent(Spacing, {});
|
|
39
39
|
}
|
|
40
|
-
}), createComponent(List, {
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
}), createComponent(List, {
|
|
41
|
+
hardline: false,
|
|
42
|
+
softline: true,
|
|
43
|
+
get children() {
|
|
44
|
+
return childrenArray(() => children);
|
|
45
|
+
}
|
|
46
|
+
})];
|
|
43
47
|
}
|
|
44
48
|
})
|
|
45
49
|
];
|
|
@@ -165,7 +169,8 @@ function TSDocRemarks(props) {
|
|
|
165
169
|
"@remarks ",
|
|
166
170
|
createIntrinsic("hbr", {}),
|
|
167
171
|
createComponent(List, {
|
|
168
|
-
hardline:
|
|
172
|
+
hardline: false,
|
|
173
|
+
softline: true,
|
|
169
174
|
get children() {
|
|
170
175
|
return childrenArray(() => props.children);
|
|
171
176
|
}
|
|
@@ -235,10 +240,16 @@ function TSDocHidden() {
|
|
|
235
240
|
return createComponent(TSDocTag, { tag: "hidden" });
|
|
236
241
|
}
|
|
237
242
|
/**
|
|
243
|
+
* Create a TSDoc `@runtime` tag.
|
|
244
|
+
*/
|
|
245
|
+
function TSDocRuntime() {
|
|
246
|
+
return createComponent(TSDocTag, { tag: "runtime" });
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
238
249
|
* Generates a TypeScript interface property for the given reflection class.
|
|
239
250
|
*/
|
|
240
251
|
function TSDocAttributesTags(props) {
|
|
241
|
-
const [{ type, alias, permission, readonly, internal, ignore, hidden, defaultValue }] = splitProps(props, [
|
|
252
|
+
const [{ type, alias, permission, readonly, internal, ignore, hidden, runtime, defaultValue }] = splitProps(props, [
|
|
242
253
|
"type",
|
|
243
254
|
"alias",
|
|
244
255
|
"permission",
|
|
@@ -246,6 +257,7 @@ function TSDocAttributesTags(props) {
|
|
|
246
257
|
"internal",
|
|
247
258
|
"ignore",
|
|
248
259
|
"hidden",
|
|
260
|
+
"runtime",
|
|
249
261
|
"defaultValue"
|
|
250
262
|
]);
|
|
251
263
|
const title = computed(() => props.title?.trim() || "");
|
|
@@ -321,6 +333,12 @@ function TSDocAttributesTags(props) {
|
|
|
321
333
|
return createComponent(TSDocHidden, {});
|
|
322
334
|
}
|
|
323
335
|
}),
|
|
336
|
+
createComponent(Show, {
|
|
337
|
+
when: runtime === true,
|
|
338
|
+
get children() {
|
|
339
|
+
return createComponent(TSDocRuntime, {});
|
|
340
|
+
}
|
|
341
|
+
}),
|
|
324
342
|
createComponent(Show, {
|
|
325
343
|
get when() {
|
|
326
344
|
return memo(() => !!!isUndefined(type))() && !isUndefined(defaultValue);
|
|
@@ -433,7 +451,8 @@ function TSDocModule(props) {
|
|
|
433
451
|
},
|
|
434
452
|
get children() {
|
|
435
453
|
return [createComponent(List, {
|
|
436
|
-
hardline:
|
|
454
|
+
hardline: false,
|
|
455
|
+
softline: true,
|
|
437
456
|
get children() {
|
|
438
457
|
return childrenArray(() => children);
|
|
439
458
|
}
|
|
@@ -453,5 +472,5 @@ function TSDocModule(props) {
|
|
|
453
472
|
}
|
|
454
473
|
|
|
455
474
|
//#endregion
|
|
456
|
-
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle };
|
|
475
|
+
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocThrows, TSDocTitle };
|
|
457
476
|
//# 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 { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport {\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\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 { 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>{childrenArray(() => children)}</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\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type: ReflectionKind | ReflectionProperty | ReflectionParameter;\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>{stringifyDefaultValue(type, defaultValue)}</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={true}>{childrenArray(() => props.children)}</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\nexport interface TSDocAttributesTagsProps {\n type?: ReflectionKind | ReflectionProperty | ReflectionParameter;\n title?: string;\n alias?: string[];\n permission?: string[];\n domain?: string;\n readonly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n defaultValue?: any;\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 permission,\n readonly,\n internal,\n ignore,\n hidden,\n defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"permission\",\n \"readonly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"defaultValue\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.domain?.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 when={isSetString(domain.value)}>\n <TSDocDomain>{domain.value}</TSDocDomain>\n </Show>\n <Show\n when={\n !isUndefined(permission) &&\n permission.length > 0 &&\n permission.some(p => isSetString(p?.trim()))\n }>\n <For each={permission?.filter(p => isSetString(p?.trim())) ?? []}>\n {permission => <TSDocPermission>{permission}</TSDocPermission>}\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={!isUndefined(type) && !isUndefined(defaultValue)}>\n <TSDocDefaultValue\n type={\n type as ReflectionKind | ReflectionProperty | ReflectionParameter\n }\n defaultValue={defaultValue}\n />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n defaultValue?: 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 defaultValue={props.defaultValue}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.defaultValue)}>={props.defaultValue}</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={true}>{childrenArray(() => children)}</List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAmCA,SAAS,MAAa,OAAmB;CACzC,MAAQ,CAAC,EACT,UACA,aACO,WAAE,OAAgB,CAAC,YAAY,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AAA,EAAA,IAAA,CAAA,YAAA,aAAA;;GAEpC,IAAG,WAAA;AACD,WAAA,gBAAA,mBAAA;KACH;KACH;;;GAGE,CAAA;EAAA;;;;;AAYF,SAAM,WAAA,OAAA;AACJ,QAAC;EAAA;EAAA,gBAAA,gBAAA;GACH,IAAA,OAAA;;;GAGE,IAAA,WAAW;AACb,WAAA,MAAA;;GAEA,IAAQ,eAAC;AACP,WAAO,MAAA;;GAEN,CAAC;EAAE,gBAAM,uBAAA,EACR,IAAG,WAAY;AACb,UAAG,MAAO;KAEb,CAAC;EAAC;;AAOL,SAAO,eAAS,OAAoC;AAClD,QAAO;EAAC,gBAAkB,MAAM;GAClC,IAAA,OAAA;;;GAGG,UAAS;GACV,CAAA;EAAA,WAAA,MAAA,KAAA;EAAA,gBAAA,MAAA;GACF,IAAO,OAAQ;AACb,WAAQ,QAAW,MAAE,aAAY;;;AAG7B,WAAC,CAAA,KAAU,WAAA,MAAiB,aAAQ,CAAA;;GAEvC,CAAC;EAAC,gBAAmB,MAAA;GACrB,IAAA,OAAA;AACG,WAAA,MAAA;;GAEH,UAAA;GACA,CAAC;EAAC;;AAKL,SAAO,sBAAA,OAAA;AACL,QAAE,gBAAA,MAAA;EACF,IAAM,OAAG;;;EAGP,IAAI,WAAS;AACd,UAAA,CAAA,OAAA,gBAAA,SAAA;IACG,OAAA;IACD,IAAK,WAAa;AACpB,YAAA,gBAAA,OAAA,EACG,IAAA,WAAA;AACE,aAAA,MAAA;QAED,CAAA;;IAEA,CAAC,CAAA;;;;;;;AAQR,SAAc,aAAA,OAAA;AACZ,QAAO,gBAAC,UAAA,WAAA,OAAA,EACN,KAAC,WACF,CAAC,CAAA;;;;;AAMJ,SAAQ,YAAA,OAAA;AACN,QAAK,gBAAkB,UAAA,WAAA,OAAA,EACrB,KAAK,UACN,CAAC,CAAC"}
|
|
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 { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport {\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\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 { 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\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type: ReflectionKind | ReflectionProperty | ReflectionParameter;\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>{stringifyDefaultValue(type, defaultValue)}</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?: ReflectionKind | ReflectionProperty | ReflectionParameter;\n title?: string;\n alias?: string[];\n permission?: string[];\n domain?: string;\n readonly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n runtime?: boolean;\n defaultValue?: any;\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 permission,\n readonly,\n internal,\n ignore,\n hidden,\n runtime,\n defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"permission\",\n \"readonly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"runtime\",\n \"defaultValue\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.domain?.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 when={isSetString(domain.value)}>\n <TSDocDomain>{domain.value}</TSDocDomain>\n </Show>\n <Show\n when={\n !isUndefined(permission) &&\n permission.length > 0 &&\n permission.some(p => isSetString(p?.trim()))\n }>\n <For each={permission?.filter(p => isSetString(p?.trim())) ?? []}>\n {permission => <TSDocPermission>{permission}</TSDocPermission>}\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 when={!isUndefined(type) && !isUndefined(defaultValue)}>\n <TSDocDefaultValue\n type={\n type as ReflectionKind | ReflectionProperty | ReflectionParameter\n }\n defaultValue={defaultValue}\n />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n defaultValue?: 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 defaultValue={props.defaultValue}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.defaultValue)}>={props.defaultValue}</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 || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAmCA,SAAS,MAAa,OAAmB;CACzC,MAAQ,CAAC,EACT,UACA,aACO,WAAE,OAAgB,CAAC,YAAY,UAAM,CAAA;;;;GAE5C,QAAO;GACL,IAAA,WAAU;AACZ,WAAA;KAAA,gBAAA,OAAA,EAAA,CAAA;KAAA,gBAAA,MAAA;;AAEE,cAAA,CAAA,YAAA,QAAA;;MAEA,UAAA;MACK,CAAA;KAAA,gBAAqB,MAAC;MACrB,IAAG,OAAQ;;;MAGd,IAAA,WAAA;AACG,cAAA,CAAA,gBAAA,MAAA;QACI,IAAC,OAAU;AACT,gBAAA,CAAA,YAAA,QAAA;;QAEL,IAAA,WAAA;AACK,gBAAC,gBAAA,SAAA,EAAA,CAAA;;QAEJ,CAAC,EAAA,gBAAoB,MAAA;QACrB,UAAA;QACA,UAAW;QACV,IAAC,WAAS;AACV,gBAAI,oBAAA,SAAA;;QAEL,CAAC,CAAC;;MAEN,CAAC;KAAC;;GAEN,CAAC;EAAE,gBAAM,OAAA,EAAA,CAAA;EAAA;EAAA,gBAAA,OAAA,EAAA,CAAA;EAAA;;;;;AASZ,SAAA,SAAA,OAAA;UAEE,UACC,SACD,WAAA,OAAA,CAAA,YAAA,MAAA,CAAA;AACF,QAAO;EAAA,IAAA,IAAS;EAAA,gBAAgB,MAAc;GAC5C,IAAM,OAAG;;;GA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IAAA,WAAA;AACC,WAAI,CAAA,KAAU,WAAa,MAAM,aAAC,CAAA;;GAEpC,CAAC;EAAE,gBAAA,MAAA;GACF,IAAC,OAAU;AACZ,WAAA,MAAA;;GAEC,UAAI;GACL,CAAC;EAAC;;AAKL,SAAS,sBAAQ,OAAA;;EAEb,IAAA,OAAA;AACC,UAAQ,QAAQ,MAAA,SAAA;;EAEjB,IAAE,WAAA;AACD,UAAK,CAAI,OAAI,gBAAqB,SAAQ;IAC5C,OAAA;IACG,IAAA,WAAA;AACE,YAAA,gBAAA,OAAA,EACI,IAAE,WAAW;AAClB,aAAA,MAAA;QAEC,CAAA;;;;EAIL,CAAA;;;;;AAMH,SAAW,aAAA,OAAA;AACT,QAAE,gBAAA,UAAA,WAAA,OAAA,kBAEF,CAAA,CAAA;;;;;AAMF,SAAc,YAAA,OAAA;AACZ,QAAO,gBAAkB,UAAU,WAAC,OAAA,EAClC,KAAK,UACN,CAAC,CAAC"}
|
|
@@ -60,6 +60,7 @@ exports.TSDocReflectionMethod = require_typescript_components_tsdoc_reflection.T
|
|
|
60
60
|
exports.TSDocReflectionProperty = require_typescript_components_tsdoc_reflection.TSDocReflectionProperty;
|
|
61
61
|
exports.TSDocRemarks = require_typescript_components_tsdoc.TSDocRemarks;
|
|
62
62
|
exports.TSDocReturns = require_typescript_components_tsdoc.TSDocReturns;
|
|
63
|
+
exports.TSDocRuntime = require_typescript_components_tsdoc.TSDocRuntime;
|
|
63
64
|
exports.TSDocTag = require_typescript_components_tsdoc.TSDocTag;
|
|
64
65
|
exports.TSDocThrows = require_typescript_components_tsdoc.TSDocThrows;
|
|
65
66
|
exports.TSDocTitle = require_typescript_components_tsdoc.TSDocTitle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./components/tsdoc.cjs";
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./components/tsdoc.cjs";
|
|
2
2
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps } from "./components/typescript-file.cjs";
|
|
3
3
|
import { BuiltinFile, BuiltinFileProps } from "./components/builtin-file.cjs";
|
|
4
4
|
import { TypeParameters, TypeParametersProps } from "./components/type-parameters.cjs";
|
|
@@ -14,4 +14,4 @@ import { TypeDeclaration, TypeDeclarationProps } from "./components/type-declara
|
|
|
14
14
|
import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.cjs";
|
|
15
15
|
import { getCallSignatureProps } from "./helpers/get-call-signature-props.cjs";
|
|
16
16
|
import { isValidJSIdentifier } from "./helpers/utilities.cjs";
|
|
17
|
-
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
|
|
17
|
+
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./components/tsdoc.mjs";
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle } from "./components/tsdoc.mjs";
|
|
2
2
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps } from "./components/typescript-file.mjs";
|
|
3
3
|
import { BuiltinFile, BuiltinFileProps } from "./components/builtin-file.mjs";
|
|
4
4
|
import { TypeParameters, TypeParametersProps } from "./components/type-parameters.mjs";
|
|
@@ -14,4 +14,4 @@ import { TypeDeclaration, TypeDeclarationProps } from "./components/type-declara
|
|
|
14
14
|
import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.mjs";
|
|
15
15
|
import { getCallSignatureProps } from "./helpers/get-call-signature-props.mjs";
|
|
16
16
|
import { isValidJSIdentifier } from "./helpers/utilities.mjs";
|
|
17
|
-
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
|
|
17
|
+
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle } from "./components/tsdoc.mjs";
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocThrows, TSDocTitle } from "./components/tsdoc.mjs";
|
|
2
2
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./components/typescript-file.mjs";
|
|
3
3
|
import { BuiltinFile } from "./components/builtin-file.mjs";
|
|
4
4
|
import { LexicalScope } from "./contexts/lexical-scope.mjs";
|
|
@@ -18,4 +18,4 @@ import { RecordExpression } from "./components/record-expression.mjs";
|
|
|
18
18
|
import { TypeDeclaration } from "./components/type-declaration.mjs";
|
|
19
19
|
import "./components/index.mjs";
|
|
20
20
|
|
|
21
|
-
export { BuiltinFile, ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet, DynamicImportStatement, EntryFile, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceExpression, InterfaceMember, LexicalScope, ObjectDeclaration, ObjectDeclarationProperty, PropertyName, RecordExpression, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle, TypeDeclaration, TypeParameters, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, getCallSignatureProps, isValidJSIdentifier };
|
|
21
|
+
export { BuiltinFile, ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet, DynamicImportStatement, EntryFile, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceExpression, InterfaceMember, LexicalScope, ObjectDeclaration, ObjectDeclarationProperty, PropertyName, RecordExpression, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocTag, TSDocThrows, TSDocTitle, TypeDeclaration, TypeParameters, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, getCallSignatureProps, isValidJSIdentifier };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-alloy",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing various Alloy framework components and helper utilities.",
|
|
6
6
|
"repository": {
|
|
@@ -893,9 +893,9 @@
|
|
|
893
893
|
"@alloy-js/json": "0.23.0-dev.2",
|
|
894
894
|
"@alloy-js/markdown": "0.23.0-dev.1",
|
|
895
895
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
896
|
-
"@powerlines/deepkit": "^0.7.
|
|
897
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
898
|
-
"@storm-software/config-tools": "^1.189.
|
|
896
|
+
"@powerlines/deepkit": "^0.7.5",
|
|
897
|
+
"@powerlines/plugin-babel": "^0.12.390",
|
|
898
|
+
"@storm-software/config-tools": "^1.189.75",
|
|
899
899
|
"@stryke/capnp": "^0.12.92",
|
|
900
900
|
"@stryke/convert": "^0.6.58",
|
|
901
901
|
"@stryke/fs": "^0.33.66",
|
|
@@ -906,15 +906,15 @@
|
|
|
906
906
|
"@stryke/type-checks": "^0.6.1",
|
|
907
907
|
"@stryke/types": "^0.11.3",
|
|
908
908
|
"@stryke/unique-id": "^0.3.77",
|
|
909
|
-
"defu": "^6.1.
|
|
910
|
-
"powerlines": "^0.42.
|
|
911
|
-
"prettier": "^3.8.
|
|
909
|
+
"defu": "^6.1.7",
|
|
910
|
+
"powerlines": "^0.42.35",
|
|
911
|
+
"prettier": "^3.8.2",
|
|
912
912
|
"unctx": "^2.5.0"
|
|
913
913
|
},
|
|
914
914
|
"devDependencies": {
|
|
915
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
916
|
-
"@types/node": "^25.
|
|
915
|
+
"@powerlines/plugin-plugin": "^0.12.345",
|
|
916
|
+
"@types/node": "^25.6.0"
|
|
917
917
|
},
|
|
918
918
|
"publishConfig": { "access": "public" },
|
|
919
|
-
"gitHead": "
|
|
919
|
+
"gitHead": "0930e21b75080a208112efde05ca6a1ff2595b15"
|
|
920
920
|
}
|