@powerlines/plugin-alloy 0.26.147 → 0.26.149

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.
@@ -38,7 +38,7 @@ interface InterfaceMemberPropsBase {
38
38
  doc?: Children;
39
39
  refkey?: Refkey | Refkey[];
40
40
  readOnly?: boolean;
41
- type?: Children | JsonSchemaPrimitiveType;
41
+ type?: Children | JsonSchemaPrimitiveType | string;
42
42
  nullish?: boolean;
43
43
  }
44
44
  interface InterfacePropertyMemberProps extends InterfaceMemberPropsBase {
@@ -38,7 +38,7 @@ interface InterfaceMemberPropsBase {
38
38
  doc?: Children;
39
39
  refkey?: Refkey | Refkey[];
40
40
  readOnly?: boolean;
41
- type?: Children | JsonSchemaPrimitiveType;
41
+ type?: Children | JsonSchemaPrimitiveType | string;
42
42
  nullish?: boolean;
43
43
  }
44
44
  interface InterfacePropertyMemberProps extends InterfaceMemberPropsBase {
@@ -1 +1 @@
1
- {"version":3,"file":"interface-declaration.mjs","names":[],"sources":["../../../src/typescript/components/interface-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 Block,\n Children,\n childrenArray,\n computed,\n createSymbol,\n createSymbolSlot,\n effect,\n emitSymbol,\n findUnkeyedChildren,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps,\n takeSymbols\n} from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TSOutputSymbol,\n TSSymbolFlags,\n TypeParameterDescriptor,\n useTSLexicalScope,\n useTSMemberScope,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport {\n getPrimarySchemaType,\n getPropertiesList,\n isSchemaNullable,\n JsonSchema,\n JsonSchemaLike,\n JsonSchemaPrimitiveType,\n JsonSchemaProperty,\n stringifyType\n} from \"@powerlines/schema\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport {\n SchemaContext,\n SchemaPropertyContext\n} from \"../../core/contexts/schema\";\nimport { ComponentProps } from \"../../types/components\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TSDocObjectSchema, TSDocSchemaProperty } from \"./tsdoc-schema\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface InterfaceDeclarationProps<\n T extends Record<string, any> = Record<string, any>\n>\n extends PartialKeys<CommonDeclarationProps, \"name\">, ComponentProps {\n /**\n * A base type that this interface extends. This can be used to represent inheritance\n */\n extends?: Children;\n\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n\n /**\n * The JSON Schema that describes the properties of this interface.\n *\n * @remarks\n * This is used to generate the members of the interface based on the properties of the schema.\n */\n schema?: JsonSchema<T>;\n\n /**\n * Documentation for the interface. This can be a string or any Alloy component that renders documentation content (such as `TSDoc`).\n */\n doc?: Children;\n}\n\nexport interface InterfaceDeclarationPropertyProps<\n T extends Record<string, any> = Record<string, any>\n>\n extends Omit<InterfaceMemberProps<T>, \"name\">, ComponentProps {\n schema: JsonSchemaProperty<T>;\n}\n\nexport interface InterfaceExpressionProps {\n children?: Children;\n}\n\nexport const InterfaceExpression = ensureTypeRefContext(\n function InterfaceExpression(props: InterfaceExpressionProps) {\n const scope = useTSLexicalScope();\n const symbol = createSymbol(TSOutputSymbol, \"\", undefined, {\n transient: true,\n binder: scope?.binder\n });\n\n emitSymbol(symbol);\n\n return (\n <group>\n <MemberScope ownerSymbol={symbol}>\n <Block>{props.children}</Block>\n </MemberScope>\n </group>\n );\n }\n);\n\nexport interface InterfaceMemberPropsBase {\n children?: Children;\n doc?: Children;\n refkey?: Refkey | Refkey[];\n readOnly?: boolean;\n type?: Children | JsonSchemaPrimitiveType;\n nullish?: boolean;\n}\n\nexport interface InterfacePropertyMemberProps extends InterfaceMemberPropsBase {\n name: string | Namekey;\n}\n\nexport interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {\n indexer: Children;\n}\n\nexport interface InterfaceSchemaMemberProps<\n T extends Record<string, any> = Record<string, any>\n> extends InterfaceMemberPropsBase {\n schema: JsonSchemaProperty<T>;\n}\n\nexport type InterfaceMemberProps<\n T extends Record<string, any> = Record<string, any>\n> =\n | InterfacePropertyMemberProps\n | InterfaceIndexerMemberProps\n | InterfaceSchemaMemberProps<T>;\n\n/**\n * Create a TypeScript interface member.\n *\n * An interface member can either provide a `name` prop to create a named\n * property, or an `indexer` prop to define an indexer for the interface.\n *\n * The type of the member can be provided either as the `type` prop or as the\n * children of the component.\n */\nexport function InterfaceMember<\n T extends Record<string, any> = Record<string, any>\n>(props: InterfaceMemberProps<T>) {\n const type = (props as InterfaceSchemaMemberProps<T>).schema\n ? stringifyType<T>((props as InterfaceSchemaMemberProps<T>).schema)\n : (props.type ?? props.children);\n\n const readonly =\n ((props as InterfaceSchemaMemberProps<T>).schema &&\n (props as InterfaceSchemaMemberProps<T>).schema?.readOnly) ||\n (!(props as InterfaceSchemaMemberProps<T>).schema && props.readOnly)\n ? \"readonly \"\n : \"\";\n\n if (\"indexer\" in props) {\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}[{props.indexer}]: {type}\n </>\n );\n }\n\n const optional =\n !!(\n (props as InterfaceSchemaMemberProps<T>).schema &&\n \"nullable\" in (props as InterfaceSchemaMemberProps<T>).schema &&\n (props as InterfaceSchemaMemberProps<T>).schema.nullable\n ) || !!props.nullish;\n\n const scope = useTSMemberScope();\n const sym = createSymbol(\n TSOutputSymbol,\n (((props as InterfaceSchemaMemberProps<T>).schema\n ? (props as InterfaceSchemaMemberProps<T>).schema?.name\n : undefined) || isSetString((props as InterfacePropertyMemberProps).name)\n ? (props as InterfacePropertyMemberProps).name\n : (props as InterfacePropertyMemberProps).name.toString()) ||\n uuid().replace(/-/g, \"\"),\n scope.ownerSymbol.staticMembers,\n {\n refkeys: props.refkey,\n tsFlags:\n TSSymbolFlags.TypeSymbol |\n (optional ? TSSymbolFlags.Nullish : TSSymbolFlags.None),\n namePolicy: useTSNamePolicy().for(\"interface-member\"),\n binder: scope.binder\n }\n );\n\n const taken = takeSymbols();\n effect(() => {\n if (taken.size > 1) return;\n const symbol = Array.from(taken)[0];\n if (symbol?.isTransient) {\n symbol.moveMembersTo(sym);\n }\n });\n\n return (\n <MemberDeclaration symbol={sym}>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}\n <PropertyName />\n {optional ? \"?\" : \"\"}: {type}\n </MemberDeclaration>\n );\n}\n\nconst BaseInterfaceDeclaration = ensureTypeRefContext(\n function InterfaceDeclaration(props: InterfaceDeclarationProps) {\n const ExprSlot = createSymbolSlot();\n\n const children = childrenArray(() => props.children);\n\n const extendsPart = props.extends ? <> extends {props.extends}</> : \"\";\n const filteredChildren = findUnkeyedChildren(children);\n const currentScope = useTSLexicalScope();\n\n const binder = currentScope?.binder;\n const sym = createSymbol(\n TSOutputSymbol,\n (isSetString(props.name) ? props.name : props.name?.toString()) ||\n uuid().replace(/-/g, \"\"),\n currentScope.types,\n {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: TSSymbolFlags.TypeSymbol,\n namePolicy: useTSNamePolicy().for(\"interface\"),\n binder\n }\n );\n\n effect(() => {\n if (ExprSlot.ref.value) {\n const takenSymbols = ExprSlot.ref.value;\n for (const symbol of takenSymbols) {\n // ignore non-transient symbols (likely not the result of an expression).\n if (symbol.isTransient) {\n symbol.moveMembersTo(sym);\n }\n }\n }\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration {...props} nameKind=\"interface\" kind=\"type\" symbol={sym}>\n interface <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}{\" \"}\n <ExprSlot>\n <InterfaceExpression>{filteredChildren}</InterfaceExpression>\n </ExprSlot>\n </Declaration>\n </>\n );\n }\n);\n\n/**\n * Generates a TypeScript interface for the given schema.\n */\nexport function InterfaceDeclaration<\n T extends Record<string, any> = Record<string, any>\n>(props: InterfaceDeclarationProps<T>) {\n const [{ name, schema, doc }, rest] = splitProps(props, [\n \"name\",\n \"schema\",\n \"doc\"\n ]);\n\n const interfaceName = computed(() =>\n pascalCase(isSetString(name) ? name : schema?.name || schema?.title || \"\")\n );\n const properties = computed(() =>\n schema\n ? getPropertiesList<T>(schema as Parameters<typeof getPropertiesList>[0])\n .filter(property => !property?.ignore)\n .sort((a, b) =>\n (a?.readOnly && b?.readOnly) || (!a?.readOnly && !b?.readOnly)\n ? !a.name && !b.name\n ? 0\n : !a.name\n ? -1\n : !b.name\n ? 1\n : a.name.localeCompare(b.name)\n : a?.readOnly\n ? 1\n : -1\n )\n : []\n );\n\n return (\n <Show\n when={schema && properties.value.length > 0}\n fallback={\n <BaseInterfaceDeclaration\n {...props}\n schema={{\n type: \"object\",\n name: interfaceName.value,\n properties: {}\n }}\n name={interfaceName.value}\n />\n }>\n <SchemaContext.Provider value={schema as JsonSchemaLike}>\n <TSDocObjectSchema heading={doc} schema={schema!} />\n <BaseInterfaceDeclaration\n export={true}\n name={interfaceName.value}\n {...rest}>\n <For each={properties} doubleHardline={true} semicolon={true}>\n {property => <InterfaceDeclarationProperty schema={property} />}\n </For>\n </BaseInterfaceDeclaration>\n </SchemaContext.Provider>\n </Show>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function InterfaceDeclarationProperty<\n T extends Record<string, any> = Record<string, any>\n>(props: InterfaceDeclarationPropertyProps<T>) {\n const [{ schema }, rest] = splitProps(props, [\"schema\"]);\n\n const name = computed(\n () =>\n schema?.name ||\n camelCase(schema?.title || schema?.databaseSchemaName || schema?.$id)\n );\n\n return (\n <Show when={isSetString(name.value)}>\n <SchemaPropertyContext.Provider value={schema as JsonSchemaLike}>\n <TSDocSchemaProperty schema={schema} />\n <InterfaceMember\n name={name.value}\n readOnly={schema?.readOnly}\n nullish={schema?.nullable || isSchemaNullable<T>(schema)}\n type={getPrimarySchemaType<T>(schema)}\n {...rest}\n />\n </SchemaPropertyContext.Provider>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,MAAY,sBAAA,qBAAA,SAAA,oBAAA,OAAA;CAEV,MAAM,SAAS,aAAM,gBAAA,IAAA,QAAA;EACvB,WAAO;EACL,QAHA,kBAGA,GAAA;CACA,CAAA;CACA,WAAA,MAAA;CACA,OAAA,gBAAc,SAAA,EACd,IAAA,WAAa;EACb,OAAA,gBAAuB,eAAA;GACvB,aAAiB;GACjB,IAAA,WAAgB;IAChB,OAAA,gBAAA,OAAA,EACO,IAAM,WAAG;KACX,OAAA,MAAA;IACL,EACA,CAAA;GACA;EACA,CAAA;CACA,EACA,CAAA;AACF,CAAC;;;;;;;;;;AAUD,SAAE,gBAAA,OAAA;CACA,MAAM,OAAM,MAAK,SAAS,cAAO,MAAA,MAAA,IAAA,MAAA,QAAA,MAAA;CACnC,MAAQ,WAAC,MAAgB,UAAU,MAAG,QAAM,YAAW,CAAA,MAAA,UAAA,MAAA,WAAA,cAAA;CACvD,IAAM,aAAG,OACT,OAAS;EAAA,gBAAqB,MAAE;GAC1B,IAAG,OAAQ;IACT,OAAC,QAAA,MAAmB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;MACC,IAAA,UAAkB;OACX,OAAC,QAAc,YAAG,iBAAA,MAAA;MAC1B;MACA,IAAA,OAAA;OACE,OAAS,qBAAY,MAAA;MACrB;KACA,GAAA,IAAQ,CAAA,CAAA;IACR;GACF,CAAC;EACH;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"interface-declaration.mjs","names":[],"sources":["../../../src/typescript/components/interface-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 Block,\n Children,\n childrenArray,\n computed,\n createSymbol,\n createSymbolSlot,\n effect,\n emitSymbol,\n findUnkeyedChildren,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps,\n takeSymbols\n} from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TSOutputSymbol,\n TSSymbolFlags,\n TypeParameterDescriptor,\n useTSLexicalScope,\n useTSMemberScope,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport {\n getPrimarySchemaType,\n getPropertiesList,\n isSchemaNullable,\n JsonSchema,\n JsonSchemaLike,\n JsonSchemaPrimitiveType,\n JsonSchemaProperty,\n stringifyType\n} from \"@powerlines/schema\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport {\n SchemaContext,\n SchemaPropertyContext\n} from \"../../core/contexts/schema\";\nimport { ComponentProps } from \"../../types/components\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TSDocObjectSchema, TSDocSchemaProperty } from \"./tsdoc-schema\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface InterfaceDeclarationProps<\n T extends Record<string, any> = Record<string, any>\n>\n extends PartialKeys<CommonDeclarationProps, \"name\">, ComponentProps {\n /**\n * A base type that this interface extends. This can be used to represent inheritance\n */\n extends?: Children;\n\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n\n /**\n * The JSON Schema that describes the properties of this interface.\n *\n * @remarks\n * This is used to generate the members of the interface based on the properties of the schema.\n */\n schema?: JsonSchema<T>;\n\n /**\n * Documentation for the interface. This can be a string or any Alloy component that renders documentation content (such as `TSDoc`).\n */\n doc?: Children;\n}\n\nexport interface InterfaceDeclarationPropertyProps<\n T extends Record<string, any> = Record<string, any>\n>\n extends Omit<InterfaceMemberProps<T>, \"name\">, ComponentProps {\n schema: JsonSchemaProperty<T>;\n}\n\nexport interface InterfaceExpressionProps {\n children?: Children;\n}\n\nexport const InterfaceExpression = ensureTypeRefContext(\n function InterfaceExpression(props: InterfaceExpressionProps) {\n const scope = useTSLexicalScope();\n const symbol = createSymbol(TSOutputSymbol, \"\", undefined, {\n transient: true,\n binder: scope?.binder\n });\n\n emitSymbol(symbol);\n\n return (\n <group>\n <MemberScope ownerSymbol={symbol}>\n <Block>{props.children}</Block>\n </MemberScope>\n </group>\n );\n }\n);\n\nexport interface InterfaceMemberPropsBase {\n children?: Children;\n doc?: Children;\n refkey?: Refkey | Refkey[];\n readOnly?: boolean;\n type?: Children | JsonSchemaPrimitiveType | string;\n nullish?: boolean;\n}\n\nexport interface InterfacePropertyMemberProps extends InterfaceMemberPropsBase {\n name: string | Namekey;\n}\n\nexport interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {\n indexer: Children;\n}\n\nexport interface InterfaceSchemaMemberProps<\n T extends Record<string, any> = Record<string, any>\n> extends InterfaceMemberPropsBase {\n schema: JsonSchemaProperty<T>;\n}\n\nexport type InterfaceMemberProps<\n T extends Record<string, any> = Record<string, any>\n> =\n | InterfacePropertyMemberProps\n | InterfaceIndexerMemberProps\n | InterfaceSchemaMemberProps<T>;\n\n/**\n * Create a TypeScript interface member.\n *\n * An interface member can either provide a `name` prop to create a named\n * property, or an `indexer` prop to define an indexer for the interface.\n *\n * The type of the member can be provided either as the `type` prop or as the\n * children of the component.\n */\nexport function InterfaceMember<\n T extends Record<string, any> = Record<string, any>\n>(props: InterfaceMemberProps<T>) {\n const type = (props as InterfaceSchemaMemberProps<T>).schema\n ? stringifyType<T[keyof T]>((props as InterfaceSchemaMemberProps<T>).schema)\n : (props.type ?? props.children);\n\n const readonly =\n ((props as InterfaceSchemaMemberProps<T>).schema &&\n (props as InterfaceSchemaMemberProps<T>).schema?.readOnly) ||\n (!(props as InterfaceSchemaMemberProps<T>).schema && props.readOnly)\n ? \"readonly \"\n : \"\";\n\n if (\"indexer\" in props) {\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}[{props.indexer}]: {type}\n </>\n );\n }\n\n const optional =\n !!(\n (props as InterfaceSchemaMemberProps<T>).schema &&\n \"nullable\" in (props as InterfaceSchemaMemberProps<T>).schema &&\n (props as InterfaceSchemaMemberProps<T>).schema.nullable\n ) || !!props.nullish;\n\n const scope = useTSMemberScope();\n const sym = createSymbol(\n TSOutputSymbol,\n (((props as InterfaceSchemaMemberProps<T>).schema\n ? (props as InterfaceSchemaMemberProps<T>).schema?.name\n : undefined) || isSetString((props as InterfacePropertyMemberProps).name)\n ? (props as InterfacePropertyMemberProps).name\n : (props as InterfacePropertyMemberProps).name.toString()) ||\n uuid().replace(/-/g, \"\"),\n scope.ownerSymbol.staticMembers,\n {\n refkeys: props.refkey,\n tsFlags:\n TSSymbolFlags.TypeSymbol |\n (optional ? TSSymbolFlags.Nullish : TSSymbolFlags.None),\n namePolicy: useTSNamePolicy().for(\"interface-member\"),\n binder: scope.binder\n }\n );\n\n const taken = takeSymbols();\n effect(() => {\n if (taken.size > 1) return;\n const symbol = Array.from(taken)[0];\n if (symbol?.isTransient) {\n symbol.moveMembersTo(sym);\n }\n });\n\n return (\n <MemberDeclaration symbol={sym}>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}\n <PropertyName />\n {optional ? \"?\" : \"\"}: {type}\n </MemberDeclaration>\n );\n}\n\nconst BaseInterfaceDeclaration = ensureTypeRefContext(\n function InterfaceDeclaration(props: InterfaceDeclarationProps) {\n const ExprSlot = createSymbolSlot();\n\n const children = childrenArray(() => props.children);\n\n const extendsPart = props.extends ? <> extends {props.extends}</> : \"\";\n const filteredChildren = findUnkeyedChildren(children);\n const currentScope = useTSLexicalScope();\n\n const binder = currentScope?.binder;\n const sym = createSymbol(\n TSOutputSymbol,\n (isSetString(props.name) ? props.name : props.name?.toString()) ||\n uuid().replace(/-/g, \"\"),\n currentScope.types,\n {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: TSSymbolFlags.TypeSymbol,\n namePolicy: useTSNamePolicy().for(\"interface\"),\n binder\n }\n );\n\n effect(() => {\n if (ExprSlot.ref.value) {\n const takenSymbols = ExprSlot.ref.value;\n for (const symbol of takenSymbols) {\n // ignore non-transient symbols (likely not the result of an expression).\n if (symbol.isTransient) {\n symbol.moveMembersTo(sym);\n }\n }\n }\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration {...props} nameKind=\"interface\" kind=\"type\" symbol={sym}>\n interface <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}{\" \"}\n <ExprSlot>\n <InterfaceExpression>{filteredChildren}</InterfaceExpression>\n </ExprSlot>\n </Declaration>\n </>\n );\n }\n);\n\n/**\n * Generates a TypeScript interface for the given schema.\n */\nexport function InterfaceDeclaration<\n T extends Record<string, any> = Record<string, any>\n>(props: InterfaceDeclarationProps<T>) {\n const [{ name, schema, doc }, rest] = splitProps(props, [\n \"name\",\n \"schema\",\n \"doc\"\n ]);\n\n const interfaceName = computed(() =>\n pascalCase(isSetString(name) ? name : schema?.name || schema?.title || \"\")\n );\n const properties = computed(() =>\n schema\n ? getPropertiesList<T>(schema as Parameters<typeof getPropertiesList>[0])\n .filter(property => !property?.ignore)\n .sort((a, b) =>\n (a?.readOnly && b?.readOnly) || (!a?.readOnly && !b?.readOnly)\n ? !a.name && !b.name\n ? 0\n : !a.name\n ? -1\n : !b.name\n ? 1\n : a.name.localeCompare(b.name)\n : a?.readOnly\n ? 1\n : -1\n )\n : []\n );\n\n return (\n <Show\n when={schema && properties.value.length > 0}\n fallback={\n <BaseInterfaceDeclaration\n {...props}\n schema={{\n type: \"object\",\n name: interfaceName.value,\n properties: {}\n }}\n name={interfaceName.value}\n />\n }>\n <SchemaContext.Provider value={schema as JsonSchemaLike}>\n <TSDocObjectSchema heading={doc} schema={schema!} />\n <BaseInterfaceDeclaration\n export={true}\n name={interfaceName.value}\n {...rest}>\n <For each={properties} doubleHardline={true} semicolon={true}>\n {property => <InterfaceDeclarationProperty schema={property} />}\n </For>\n </BaseInterfaceDeclaration>\n </SchemaContext.Provider>\n </Show>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function InterfaceDeclarationProperty<\n T extends Record<string, any> = Record<string, any>\n>(props: InterfaceDeclarationPropertyProps<T>) {\n const [{ schema }, rest] = splitProps(props, [\"schema\"]);\n\n const name = computed(\n () =>\n schema?.name ||\n camelCase(schema?.title || schema?.databaseSchemaName || schema?.$id)\n );\n\n return (\n <Show when={isSetString(name.value)}>\n <SchemaPropertyContext.Provider value={schema as JsonSchemaLike}>\n <TSDocSchemaProperty schema={schema} />\n <InterfaceMember\n name={name.value}\n readOnly={schema?.readOnly}\n nullish={schema?.nullable || isSchemaNullable<T[keyof T]>(schema)}\n type={getPrimarySchemaType<T[keyof T]>(schema)}\n {...rest}\n />\n </SchemaPropertyContext.Provider>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,MAAY,sBAAA,qBAAA,SAAA,oBAAA,OAAA;CAEV,MAAM,SAAS,aAAM,gBAAA,IAAA,QAAA;EACvB,WAAO;EACL,QAHA,kBAGA,GAAA;CACA,CAAA;CACA,WAAA,MAAA;CACA,OAAA,gBAAc,SAAA,EACd,IAAA,WAAa;EACb,OAAA,gBAAuB,eAAA;GACvB,aAAiB;GACjB,IAAA,WAAgB;IAChB,OAAA,gBAAA,OAAA,EACO,IAAM,WAAG;KACX,OAAA,MAAA;IACL,EACA,CAAA;GACA;EACA,CAAA;CACA,EACA,CAAA;AACF,CAAC;;;;;;;;;;AAUD,SAAE,gBAAA,OAAA;CACA,MAAM,OAAM,MAAK,SAAS,cAAO,MAAA,MAAA,IAAA,MAAA,QAAA,MAAA;CACnC,MAAQ,WAAC,MAAgB,UAAU,MAAG,QAAM,YAAW,CAAA,MAAA,UAAA,MAAA,WAAA,cAAA;CACvD,IAAM,aAAG,OACT,OAAS;EAAA,gBAAqB,MAAE;GAC1B,IAAG,OAAQ;IACT,OAAC,QAAA,MAAmB,GAAA;GACtB;;IAEC,OAAA,gBAAU,OAAA,EACb,IAAQ,UAAO;KACnB,OAAA,MAAA;IACU,EACN,CAAA;GACE;EACF,CAAA;EAAA;EAAA;EAAA,WAAA,MAAA,OAAA;EAAA;EAAA;CAAA;;CAGF,MAAE,QAAA,iBAAA;CACF,MAAM,MAAC,aAAa,kBAAkB,MAAS,SAAA,MAAA,QAAA,OAAA,WAAA,YAAA,MAAA,IAAA,IAAA,MAAA,OAAA,MAAA,KAAA,SAAA,MAAA,KAAA,EAAA,QAAA,MAAA,EAAA,GAAA,MAAA,YAAA,eAAA;EAC7C,SAAA,MAAA;EACF,SAAA,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;KACX,OAAS,CAAA,gBAAA,mBAA+B;MACtC,SAAS;MACE;KACX,CAAA,GAAK,gBAAI,0BAA8B,WAAA;MACvC,UAAS;MACN,IAAC,OAAU;OACb,OAAW,cAAc;MAC/B;KACE,GAAO,MAAE,EACT,IAAO,WAAA;MACL,OAAa,gBAAY,KAAA;OACxB,MAAW;OACJ,gBAAE;OACJ,WAAM;OAChB,WAAA,aAAA,gBAAA,8BAAA,EACD,QAAA;MAEW,CAAC;KACH,EACJ,CAAA,CAAA,CAAK;IACT;GACE,CAAC;EACH;CACF,CAAC;AACH;;;;AAKA,SAAe,6BAAqB,OAAA;CAClC,MAAM,CAAA,EACJ,UACC,QAAE,WAAc,OAAA,CAAA,QAAA,CAAA;CACnB,MAAK,OAAQ,eAAe,QAAI,QAAA,UAAA,QAAA,SAAA,QAAA,sBAAA,QAAA,GAAA,CAAA;CAChC,OAAI,gBAAiB,MAAA;EACpB,IAAA,OAAA;GACH,OAAA,YAAA,KAAA,KAAA;;EAEA,IAAM,WAAA;GACJ,OAAS,gBAAoB,sBAAQ,UAAA;IACnC,OAAM;;KAEA,OAAA,CAAQ,gBAAkB,qBAAoB,SAE9C,CAAA,GAAA,gBAAoB,iBAAa,WAAe;MAChD,IAAA,OAAA;OACA,OAAA,KAAe;;MAEf,IAAM,WAAG;OACL,OAAE,QAAY;MACtB;MACC,IAAA,UAAkB;OACX,OAAC,QAAc,YAAG,iBAAA,MAAA;MAC1B;MACA,IAAA,OAAA;OACE,OAAS,qBAAY,MAAA;MACrB;KACA,GAAA,IAAQ,CAAA,CAAA;IACR;GACF,CAAC;EACH;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc-schema.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n childrenArray,\n computed,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n getPrimarySchemaType,\n JsonSchema,\n JsonSchemaProperty\n} from \"@powerlines/schema\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { TSDoc, TSDocAttributesTags, TSDocProps } from \"./tsdoc\";\n\nexport interface TSDocObjectSchemaProps<\n T extends Record<string, any> = Record<string, any>\n> extends TSDocProps {\n schema: JsonSchema<T>;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocObjectSchema<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocObjectSchemaProps<T>) {\n const [{ children, heading, schema }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"schema\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const title = computed(() => schema?.title || titleCase(schema?.name));\n const computedHeading = computed(\n () => heading || schema?.description || title.value\n );\n\n const alias = computed(() => schema?.alias);\n const tags = computed(() => schema?.tags);\n const readOnly = computed(() => schema?.readOnly);\n const internal = computed(() => schema?.internal);\n const runtime = computed(() => schema?.runtime);\n const ignore = computed(() => schema?.ignore);\n const hidden = computed(() => schema?.hidden);\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(tags.value) && tags.value.length > 0) ||\n !isUndefined(readOnly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(runtime.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType<T>(schema)}\n title={title.value}\n alias={alias.value}\n tags={tags.value}\n readOnly={Boolean(readOnly.value)}\n internal={Boolean(internal.value)}\n runtime={Boolean(runtime.value)}\n ignore={Boolean(ignore.value)}\n hidden={Boolean(hidden.value)}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\nexport interface TSDocSchemaPropertyProps<\n T extends Record<string, any> = Record<string, any>\n> extends TSDocProps {\n schema: JsonSchemaProperty<T>;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocSchemaProperty<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocSchemaPropertyProps<T>) {\n const [{ children, schema }, rest] = splitProps(props, [\n \"children\",\n \"schema\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(schema?.title) ||\n (!isUndefined(schema?.alias) && schema?.alias.length > 0) ||\n (!isUndefined(schema?.tags) && schema?.tags.length > 0) ||\n !isUndefined(schema?.readOnly) ||\n !isUndefined(schema?.internal) ||\n !isUndefined(schema?.runtime) ||\n !isUndefined(schema?.ignore) ||\n !isUndefined(schema?.hidden) ||\n !isUndefined(schema?.default)\n );\n\n return (\n <TSDoc heading={schema?.description} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType<T>(schema)}\n title={schema?.title}\n alias={schema?.alias}\n tags={schema?.tags}\n readOnly={schema?.readOnly}\n internal={schema?.internal}\n runtime={schema?.runtime}\n ignore={schema?.ignore}\n hidden={schema?.hidden}\n default={schema?.default}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n// export interface TSDocReflectionMethodProps extends TSDocProps {\n// reflection: ReflectionMethod;\n// }\n\n// /**\n// * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n// */\n// export function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n// const [{ children, reflection }, rest] = splitProps(props, [\n// \"children\",\n// \"reflection\"\n// ]);\n\n// if (!isSetObject(reflection)) {\n// return null;\n// }\n\n// const heading = computed(\n// () =>\n// reflection.getDescription() ||\n// (isString(reflection.getName())\n// ? code`${String(reflection.getName())} method definition`\n// : undefined)\n// );\n\n// return (\n// <TSDoc heading={heading.value} {...rest}>\n// <TSDocAttributesTags\n// title={reflection.getTitle()}\n// alias={reflection.getAlias()}\n// resourceId={reflection.getDomain()}\n// permission={reflection.getPermission()}\n// isReadonly={reflection.isReadonly()}\n// isInternal={reflection.isInternal()}\n// isRuntime={reflection.isRuntime()}\n// isIgnored={reflection.isIgnored()}\n// isHidden={reflection.isHidden()}\n// />\n// <Show\n// when={Boolean(children) && childrenArray(() => children).length > 0}>\n// <List>{childrenArray(() => children)}</List>\n// </Show>\n// <Show when={reflection.getParameters().length > 0}>\n// <Spacing />\n// <For each={reflection.getParameters()} hardline ender={<hbr />}>\n// {param => (\n// <TSDocParam\n// name={param.getName()}\n// optional={param.isOptional()}\n// defaultValue={\n// param.hasDefault() ? param.getDefaultValue() : undefined\n// }>\n// <Show\n// when={Boolean(param.parameter.description)}\n// fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n// {param.parameter.description}\n// </Show>\n// </TSDocParam>\n// )}\n// </For>\n// </Show>\n// <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n// <Spacing />\n// <TSDocReturns>\n// {code`The return value of the function, which is of type ${stringifyType(\n// reflection.getReturnType()\n// )}.`}\n// </TSDocReturns>\n// </Show>\n// </TSDoc>\n// );\n// }\n\n// /**\n// * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n// */\n// export function TSDocContextMethod(props: TSDocProps) {\n// const reflection = useReflectionMethod();\n\n// return (\n// <Show when={isSetObject(reflection)}>\n// <TSDocReflectionMethod {...props} reflection={reflection} />\n// </Show>\n// );\n// }\n"],"mappings":";;;;;;;;;;;;;;AA8BA,SAAS,kBAAyB,OAAO;CACzC,MAAQ,CAAC,EACT,UACA,SACA,UACA,QAAS,WAAO,OAAA;EAAA;EAAqB;EAAkB;CAAQ,CAAC;2BAEhE,OAAO;CAEL,MAAA,QAAQ,eAAW,QAAA,SAAA,UAAA,QAAA,IAAA,CAAA;CACnB,MAAM,kBAAe,eAAA,WAAA,QAAA,eAAA,MAAA,KAAA;CACvB,MAAA,QAAA,eAAA,QAAA,KAAA;;CAEE,MAAA,WAAA,e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,QAAA,CAAA,EAAA,KAAA,oBAAA,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;GACxB;GACA,IAAC,WAAA;IACD,OAAI,CAAA,gBAAA,MAAA;KACL,IAAA,OAAA;MACM,OAAA,cAAA;KACF;KACD,IAAA,WAAiB;MAClB,OAAA,gBAAA,SAAA,CAAA,CAAA;KACA;IACC,CAAC,GAAA,gBAAS,MAAA,EACV,IAAI,WAAA;KACA,OAAC,oBAAoB,QAAY;IACnC,EACN,CAAK,CAAA;GACR;EACH,CAAA,CAAA;GAEE,CAAC,CAAA;AACH"}
1
+ {"version":3,"file":"tsdoc-schema.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n childrenArray,\n computed,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n getPrimarySchemaType,\n JsonSchema,\n JsonSchemaProperty\n} from \"@powerlines/schema\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { TSDoc, TSDocAttributesTags, TSDocProps } from \"./tsdoc\";\n\nexport interface TSDocObjectSchemaProps<\n T extends Record<string, any> = Record<string, any>\n> extends TSDocProps {\n schema: JsonSchema<T>;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocObjectSchema<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocObjectSchemaProps<T>) {\n const [{ children, heading, schema }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"schema\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const title = computed(() => schema?.title || titleCase(schema?.name));\n const computedHeading = computed(\n () => heading || schema?.description || title.value\n );\n\n const alias = computed(() => schema?.alias);\n const tags = computed(() => schema?.tags);\n const readOnly = computed(() => schema?.readOnly);\n const internal = computed(() => schema?.internal);\n const runtime = computed(() => schema?.runtime);\n const ignore = computed(() => schema?.ignore);\n const hidden = computed(() => schema?.hidden);\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(tags.value) && tags.value.length > 0) ||\n !isUndefined(readOnly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(runtime.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType<T>(schema)}\n title={title.value}\n alias={alias.value}\n tags={tags.value}\n readOnly={Boolean(readOnly.value)}\n internal={Boolean(internal.value)}\n runtime={Boolean(runtime.value)}\n ignore={Boolean(ignore.value)}\n hidden={Boolean(hidden.value)}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\nexport interface TSDocSchemaPropertyProps<\n T extends Record<string, any> = Record<string, any>\n> extends TSDocProps {\n schema: JsonSchemaProperty<T>;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocSchemaProperty<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocSchemaPropertyProps<T>) {\n const [{ children, schema }, rest] = splitProps(props, [\n \"children\",\n \"schema\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(schema?.title) ||\n (!isUndefined(schema?.alias) && schema?.alias.length > 0) ||\n (!isUndefined(schema?.tags) && schema?.tags.length > 0) ||\n !isUndefined(schema?.readOnly) ||\n !isUndefined(schema?.internal) ||\n !isUndefined(schema?.runtime) ||\n !isUndefined(schema?.ignore) ||\n !isUndefined(schema?.hidden) ||\n !isUndefined(schema?.default)\n );\n\n return (\n <TSDoc heading={schema?.description} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType<T[keyof T]>(schema)}\n title={schema?.title}\n alias={schema?.alias}\n tags={schema?.tags}\n readOnly={schema?.readOnly}\n internal={schema?.internal}\n runtime={schema?.runtime}\n ignore={schema?.ignore}\n hidden={schema?.hidden}\n default={schema?.default}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n// export interface TSDocReflectionMethodProps extends TSDocProps {\n// reflection: ReflectionMethod;\n// }\n\n// /**\n// * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n// */\n// export function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n// const [{ children, reflection }, rest] = splitProps(props, [\n// \"children\",\n// \"reflection\"\n// ]);\n\n// if (!isSetObject(reflection)) {\n// return null;\n// }\n\n// const heading = computed(\n// () =>\n// reflection.getDescription() ||\n// (isString(reflection.getName())\n// ? code`${String(reflection.getName())} method definition`\n// : undefined)\n// );\n\n// return (\n// <TSDoc heading={heading.value} {...rest}>\n// <TSDocAttributesTags\n// title={reflection.getTitle()}\n// alias={reflection.getAlias()}\n// resourceId={reflection.getDomain()}\n// permission={reflection.getPermission()}\n// isReadonly={reflection.isReadonly()}\n// isInternal={reflection.isInternal()}\n// isRuntime={reflection.isRuntime()}\n// isIgnored={reflection.isIgnored()}\n// isHidden={reflection.isHidden()}\n// />\n// <Show\n// when={Boolean(children) && childrenArray(() => children).length > 0}>\n// <List>{childrenArray(() => children)}</List>\n// </Show>\n// <Show when={reflection.getParameters().length > 0}>\n// <Spacing />\n// <For each={reflection.getParameters()} hardline ender={<hbr />}>\n// {param => (\n// <TSDocParam\n// name={param.getName()}\n// optional={param.isOptional()}\n// defaultValue={\n// param.hasDefault() ? param.getDefaultValue() : undefined\n// }>\n// <Show\n// when={Boolean(param.parameter.description)}\n// fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n// {param.parameter.description}\n// </Show>\n// </TSDocParam>\n// )}\n// </For>\n// </Show>\n// <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n// <Spacing />\n// <TSDocReturns>\n// {code`The return value of the function, which is of type ${stringifyType(\n// reflection.getReturnType()\n// )}.`}\n// </TSDocReturns>\n// </Show>\n// </TSDoc>\n// );\n// }\n\n// /**\n// * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n// */\n// export function TSDocContextMethod(props: TSDocProps) {\n// const reflection = useReflectionMethod();\n\n// return (\n// <Show when={isSetObject(reflection)}>\n// <TSDocReflectionMethod {...props} reflection={reflection} />\n// </Show>\n// );\n// }\n"],"mappings":";;;;;;;;;;;;;;AA8BA,SAAS,kBAAyB,OAAO;CACzC,MAAQ,CAAC,EACT,UACA,SACA,UACA,QAAS,WAAO,OAAA;EAAA;EAAqB;EAAkB;CAAQ,CAAC;2BAEhE,OAAO;CAEL,MAAA,QAAQ,eAAW,QAAA,SAAA,UAAA,QAAA,IAAA,CAAA;CACnB,MAAM,kBAAe,eAAA,WAAA,QAAA,eAAA,MAAA,KAAA;CACvB,MAAA,QAAA,eAAA,QAAA,KAAA;;CAEE,MAAA,WAAA,eAAA,QAAA,QAAA;CACA,MAAC,WAAY,eAAmB,QAAO,QAAQ;CAC/C,MAAA,UAAA,eAAA,QAAA,OAAA;CACF,MAAO,SAAS,eAAA,QAAiB,MAAA;CAC/B,MAAE,SAAQ,eAAoB,QAAQ,MAAC;CACvC,IAAA,CAAK,gBAAE,SAAuB,YAAI,gBAAA,KAAA,KAAA,gBAAA,MAAA,KAAA,MAAA,IAClC,OAAS;CAET,MAAG,gBAAS,eAAA,YAAA,MAAA,KAAA,KAAA,CAAA,YAAA,MAAA,KAAA,KAAA,MAAA,MAAA,SAAA,KAAA,CAAA,YAAA,KAAA,KAAA,KAAA,KAAA,MAAA,SAAA,KAAA,CAAA,YAAA,SAAA,KAAA,KAAA,CAAA,YAAA,SAAA,KAAA,KAAA,CAAA,YAAA,QAAA,KAAA,KAAA,CAAA,YAAA,OAAA,KAAA,KAAA,CAAA,YAAA,OAAA,KAAA,CAAA;CACZ,OAAG,gBAAM,OAAA,WAAA,MAAA;EACP,IAAA,UAAA;;EAEA;EACA,IAAA,WAAW;GACb,O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,MAAA;GACC,IAAS,OAAG;IACb,OAAA,cAAA;GACK;GACH,IAAQ,WAAO;IACV,OAAA,gBAA0B,qBAAG;KAC3B,IAAA,OAAU;MACP,OAAA,qBAAA,MAAA;KACH;KACP,IAAA,QAAA;;KAEG;KACI,IAAI,QAAA;MACb,OAAA,QAAA;;KAEM,IAAA,OAAe;MACf,OAAA,QAAA;KACF;KACE,IAAA,WAAmB;MACnB,OAAY,QAAQ;KACrB;KACA,IAAA,WAAoB;MACpB,OAAY,QAAQ;KACpB;KACA,IAAA,UAAmB;MACnB,OAAY,QAAQ;KACxB;;MAEM,OAAA,QAAA;KACE;KACC,IAAI,SAAE;MACT,OAAA,QAAA;KACC;KACA,KAAO,aAAa;MACpB,OAAO,QAAQ;KACf;IACA,CAAA;GACF;EACF,CAAC,GAAG,gBAAiB,MAAO;GAC1B,IAAE,OAAQ;IACR,OAAO,WAAS,CAAA,CAAM,CAAA,YAAA,QAAA,CAAA,EAAA,KAAA,oBAAA,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;GACxB;GACA,IAAC,WAAA;IACD,OAAI,CAAA,gBAAA,MAAA;KACL,IAAA,OAAA;MACM,OAAA,cAAA;KACF;KACD,IAAA,WAAiB;MAClB,OAAA,gBAAA,SAAA,CAAA,CAAA;KACA;IACC,CAAC,GAAA,gBAAS,MAAA,EACV,IAAI,WAAA;KACA,OAAC,oBAAoB,QAAY;IACnC,EACN,CAAK,CAAA;GACR;EACH,CAAA,CAAA;GAEE,CAAC,CAAA;AACH"}
@@ -272,7 +272,6 @@ function TSDocAttributesTags(props) {
272
272
  "default"
273
273
  ]);
274
274
  const title = (0, _alloy_js_core.computed)(() => props.title?.trim() || "");
275
- const domain = (0, _alloy_js_core.computed)(() => props.resourceId?.trim() || "");
276
275
  return [
277
276
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
278
277
  get when() {
@@ -297,16 +296,6 @@ function TSDocAttributesTags(props) {
297
296
  });
298
297
  }
299
298
  }),
300
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
301
- get when() {
302
- return (0, _stryke_type_checks_is_set_string.isSetString)(domain.value);
303
- },
304
- get children() {
305
- return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocDomain, { get children() {
306
- return domain.value;
307
- } });
308
- }
309
- }),
310
299
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
311
300
  get when() {
312
301
  return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(!(0, _stryke_type_checks_is_undefined.isUndefined)(tags) && tags.length > 0))() && tags.some((g) => (0, _stryke_type_checks_is_set_string.isSetString)(g?.trim()));
@@ -46,7 +46,7 @@ declare function TSDocPermission(props: ComponentProps): Children;
46
46
  */
47
47
  declare function TSDocGroup(props: ComponentProps): Children;
48
48
  interface TSDocDefaultValueProps extends ComponentProps {
49
- type?: JsonSchemaPrimitiveType;
49
+ type?: JsonSchemaPrimitiveType | string;
50
50
  defaultValue: any;
51
51
  }
52
52
  /**
@@ -94,12 +94,11 @@ declare function TSDocHidden(): Children;
94
94
  */
95
95
  declare function TSDocRuntime(): Children;
96
96
  interface TSDocAttributesTagsProps {
97
- type?: JsonSchemaPrimitiveType;
97
+ type?: JsonSchemaPrimitiveType | string;
98
98
  default?: any;
99
99
  title?: string;
100
100
  alias?: string[];
101
101
  tags?: string[];
102
- resourceId?: string;
103
102
  readOnly?: boolean;
104
103
  internal?: boolean;
105
104
  ignore?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAqCiB,UAAA,SAAmB,cAAc;EAChD,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA6BtB,aAAA,SAAsB,cAAc;EACnD,GAAG;AAAA;AApCe;AAMpB;;AANoB,iBA0CJ,QAAA,CAAS,KAAA,EAAO,aAAA,G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AAc,QAAA;AAAA,UAIhC,gBAAA,SAAyB,cAAc;EA/OT;;;;;AAAA;AAI/C;;;;AAMK;AAML;;EA6OE,MAAA;EA7OmD;;;;;AAAA;AA4BrD;;;;AAA6B;EA8N3B,IAAA,EAAM,QAAA;AAAA;;;AAvNqB;iBA6Nb,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
@@ -46,7 +46,7 @@ declare function TSDocPermission(props: ComponentProps): Children;
46
46
  */
47
47
  declare function TSDocGroup(props: ComponentProps): Children;
48
48
  interface TSDocDefaultValueProps extends ComponentProps {
49
- type?: JsonSchemaPrimitiveType;
49
+ type?: JsonSchemaPrimitiveType | string;
50
50
  defaultValue: any;
51
51
  }
52
52
  /**
@@ -94,12 +94,11 @@ declare function TSDocHidden(): Children;
94
94
  */
95
95
  declare function TSDocRuntime(): Children;
96
96
  interface TSDocAttributesTagsProps {
97
- type?: JsonSchemaPrimitiveType;
97
+ type?: JsonSchemaPrimitiveType | string;
98
98
  default?: any;
99
99
  title?: string;
100
100
  alias?: string[];
101
101
  tags?: string[];
102
- resourceId?: string;
103
102
  readOnly?: boolean;
104
103
  internal?: boolean;
105
104
  ignore?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAqCiB,UAAA,SAAmB,cAAc;EAChD,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA6BtB,aAAA,SAAsB,cAAc;EACnD,GAAG;AAAA;AApCe;AAMpB;;AANoB,iBA0CJ,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAAA,EAAY,mBAAmB;AAAA;;;AArDM;iBA2DvB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;iBA2BnC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,Q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qB;iBA6Nb,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
@@ -271,7 +271,6 @@ function TSDocAttributesTags(props) {
271
271
  "default"
272
272
  ]);
273
273
  const title = computed(() => props.title?.trim() || "");
274
- const domain = computed(() => props.resourceId?.trim() || "");
275
274
  return [
276
275
  createComponent(Show, {
277
276
  get when() {
@@ -296,16 +295,6 @@ function TSDocAttributesTags(props) {
296
295
  });
297
296
  }
298
297
  }),
299
- createComponent(Show, {
300
- get when() {
301
- return isSetString(domain.value);
302
- },
303
- get children() {
304
- return createComponent(TSDocDomain, { get children() {
305
- return domain.value;
306
- } });
307
- }
308
- }),
309
298
  createComponent(Show, {
310
299
  get when() {
311
300
  return memo(() => !!(!isUndefined(tags) && tags.length > 0))() && tags.some((g) => isSetString(g?.trim()));
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport type { JsonSchemaPrimitiveType } from \"@powerlines/schema\";\nimport { stringifyValue } from \"@powerlines/schema\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@group` tag.\n */\nexport function TSDocGroup(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"group\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type?: JsonSchemaPrimitiveType;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyValue(defaultValue, type)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={false} softline={true}>\n {childrenArray(() => props.children)}\n </List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\n/**\n * Create a TSDoc `@runtime` tag.\n */\nexport function TSDocRuntime() {\n return <TSDocTag tag=\"runtime\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: JsonSchemaPrimitiveType;\n default?: any;\n title?: string;\n alias?: string[];\n tags?: string[];\n resourceId?: string;\n readOnly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n runtime?: boolean;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n tags,\n readOnly,\n internal,\n ignore,\n hidden,\n runtime,\n default: defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"tags\",\n \"readOnly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"runtime\",\n \"default\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.resourceId?.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(tags) &&\n tags.length > 0 &&\n tags.some(g => isSetString(g?.trim()))\n }>\n <For each={tags?.filter(g => isSetString(g?.trim())) ?? []}>\n {tag => <TSDocGroup>{tag}</TSDocGroup>}\n </For>\n </Show>\n <Show when={readOnly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={runtime === true}>\n <TSDocRuntime />\n </Show>\n <Show\n when={\n runtime !== true && !isUndefined(type) && !isUndefined(defaultValue)\n }>\n <TSDocDefaultValue type={type} defaultValue={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n default?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n default={props.default}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n default?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.default)}>={props.default}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework?.name || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,SAAc,MAAA,OAAA;CACd,MAAQ,CAAC,EACT,UACA,aACO,WAAW,OAAO,CAAC,YAAU,SAAW,CAAA;CAC/C,OAAS;EAAA;EAAA,gBAA0B,SAAM;GACzC,QAAY;;IAEN,OAAC;KAAA,gBAAqB,OAAQ,CAAA,CAA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MAAA;GAClB,IAAA,OAAU;IACZ,OAAA,MAAA;;GAEA,UAAS;EACP,CAAA;CAAA;AACF;AACA,SAAO,sBAAiB,OAAc;CACpC,OAAK,gBAAU,MAAA;EACb,IAAG,OAAK;GACN,OAAM,QAAM,MAAM,QAAW;EAC/B;EACD,IAAA,WAAA;GACH,OAAA,CAAA,OAAA,gBAAA,SAAA;;IAEA,IAAU,WAAA;KACA,OAAG,gBAAQ,OAAA,EACrB,IAAA,WAAA;;KAES,EACA,CAAA;IACJ;GACC,CAAC,CAAC;EACJ;CACF,CAAC;AACH;;;;AAKA,SAAE,aAAA,OAAA;CACA,OAAO,gBAAkB,UAAK,WAAA,OAAA,EAC9B,KAAA,UACF,CAAA,CAAA;AACA;;;;AAKA,SAAE,YAAA,OAAA;CACF,OAAO,gBAAoB,UAAQ,WAAe,OAAC,EACjD,KAAO,SACT,CAAA,CAAA;;;;;AAKA,SAAG,YAAA,OAAA;CACD,MAAI,CAAA,EACF,UACD,MACC,YACG,WAAC,OAAA;EAAA;EAAA;EAAA;CAAA,CAAA;CACN,MAAK,UAAA,kBAAA;CACL,OAAK;EAAA;EAAO,gBAAc,SAAA;GACxB,QAAG;GACH,IAAG,WAAA;IACH,OAAA;KAAA,gBAAA,OAAA,CAAA,CAAA;KAAA,gBAAA,MAAA;MACI,IAAG,OAAM;;MAEb;MACI,IAAC,WAAY;OAClB,OAAA,CAAA,gBAAA,MAAA;QACG,UAAA;QACI,UAAY;QACnB,IAAA,WAAA;SACG,OAAA,oBAAA,QAAA;QACE;OACH,CAAM,GAAG,gBAAiB,SAAU,CAAC,CAAA,CAAE;MACrC;KACH,CAAA;KAAA;KAAA,WAAA,UAAA,SAAA,QAAA,WAAA,QAAA,YAAA;KAAA;KAAA;IAAA;GACF;EACF,CAAA;EAAA,gBAAA,OAAA,CAAA,CAAA;EAAA;CAAA"}
1
+ {"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport type { JsonSchemaPrimitiveType } from \"@powerlines/schema\";\nimport { stringifyValue } from \"@powerlines/schema\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@group` tag.\n */\nexport function TSDocGroup(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"group\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type?: JsonSchemaPrimitiveType | string;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyValue(defaultValue, type)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={false} softline={true}>\n {childrenArray(() => props.children)}\n </List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\n/**\n * Create a TSDoc `@runtime` tag.\n */\nexport function TSDocRuntime() {\n return <TSDocTag tag=\"runtime\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: JsonSchemaPrimitiveType | string;\n default?: any;\n title?: string;\n alias?: string[];\n tags?: string[];\n readOnly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n runtime?: boolean;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n tags,\n readOnly,\n internal,\n ignore,\n hidden,\n runtime,\n default: defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"tags\",\n \"readOnly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"runtime\",\n \"default\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show\n when={\n !isUndefined(tags) &&\n tags.length > 0 &&\n tags.some(g => isSetString(g?.trim()))\n }>\n <For each={tags?.filter(g => isSetString(g?.trim())) ?? []}>\n {tag => <TSDocGroup>{tag}</TSDocGroup>}\n </For>\n </Show>\n <Show when={readOnly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={runtime === true}>\n <TSDocRuntime />\n </Show>\n <Show\n when={\n runtime !== true && !isUndefined(type) && !isUndefined(defaultValue)\n }>\n <TSDocDefaultValue type={type} defaultValue={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n default?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n default={props.default}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n default?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.default)}>={props.default}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework?.name || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,SAAc,MAAA,OAAA;CACd,MAAQ,CAAC,EACT,UACA,aACO,WAAW,OAAO,CAAC,YAAU,SAAW,CAAA;CAC/C,OAAS;EAAA;EAAA,gBAA0B,SAAM;GACzC,QAAY;;IAEN,OAAC;KAAA,gBAAqB,OAAQ,CAAA,CAAA;KAAA,gBAAe,MAAA;MACjD,IAAU,OAAA;OACZ,OAAA,CAAA,YAAA,OAAA;;MAEE,UAAA;KACC,CAAA;KAAA,gBAAuB,MAAA;MACxB,IAAA,OAAA;OACK,OAAS,WAAa,CAAA,CAAA,CAAA,YAAY,QAAA,CAAA,EAAA,KAAA,oBAAA,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;MACjC;;OAEC,OAAA,CAAA,gBAAA,MAAA;QACJ,IAAA,OAAA;SACG,OAAA,CAAA,YAAA,OAAA;QACI;QACA,IAAE,WAAA;SACA,OAAO,gBAAY,SAAW,CAAA,CAAA;QACnC;OACC,CAAA,GAAI,gBAAC,MAAA;QACH,UAAC;QACD,UAAA;QACD,IAAA,WAAA;SACA,OAAU,oBAAc,QAAS;QAChC;OACF,CAAC,CAAC;MACJ;KACF,CAAC;IAAC;GACJ;EACF,CAAC;EAAG,gBAAQ,OAAA,CAAA,CAAA;EAAA;EAAA,gBAAA,OAAA,CAAA,CAAA;CAAA;AACd;;;;AAIA,SAAM,SAAA,OAAA;CACJ,MAAC,CAAA,EACH,mBAEO,WAAU,OAAA,CAAA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b;OACK,CAAA,GAAK,gBAAO,SAAA,CAAA,CAAA,CAAA;MAClB;KACG,CAAA;KAAA;KAAA,WAAA,UAAA,SAAA,QAAA,WAAA,QAAA,YAAA;KAAA;KAAA;IAAA;GACF;EACF,CAAC;EAAA,gBAAA,OAAA,CAAA,CAAA;EAAA;CAAA;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-alloy",
3
- "version": "0.26.147",
3
+ "version": "0.26.149",
4
4
  "description": "A package containing various Alloy framework components and helper utilities.",
5
5
  "keywords": ["alloy-js", "powerlines", "powerlines-plugin"],
6
6
  "homepage": "https://stormsoftware.com",
@@ -292,9 +292,9 @@
292
292
  "@alloy-js/json": "^0.23.0",
293
293
  "@alloy-js/markdown": "^0.23.0",
294
294
  "@alloy-js/typescript": "^0.23.0",
295
- "@powerlines/deepkit": "0.9.37",
296
- "@powerlines/plugin-babel": "0.13.57",
297
- "@storm-software/config-tools": "^1.190.27",
295
+ "@powerlines/deepkit": "0.9.38",
296
+ "@powerlines/plugin-babel": "0.13.58",
297
+ "@storm-software/config-tools": "^1.190.29",
298
298
  "@stryke/capnp": "^0.12.102",
299
299
  "@stryke/convert": "^0.7.7",
300
300
  "@stryke/fs": "^0.33.76",
@@ -306,13 +306,13 @@
306
306
  "@stryke/types": "^0.12.4",
307
307
  "@stryke/unique-id": "^0.3.87",
308
308
  "defu": "^6.1.7",
309
- "powerlines": "0.47.61",
309
+ "powerlines": "0.47.62",
310
310
  "prettier": "^3.8.3",
311
311
  "unctx": "^2.5.0"
312
312
  },
313
313
  "devDependencies": {
314
314
  "@babel/preset-typescript": "8.0.0-rc.5",
315
- "@powerlines/plugin-plugin": "0.12.473",
315
+ "@powerlines/plugin-plugin": "0.12.474",
316
316
  "@types/node": "^25.9.1"
317
317
  },
318
318
  "peerDependencies": {
@@ -324,5 +324,5 @@
324
324
  "@babel/preset-typescript": { "optional": false }
325
325
  },
326
326
  "publishConfig": { "access": "public" },
327
- "gitHead": "6ca3515304ea3e458094bd7650a9bfbe0681a124"
327
+ "gitHead": "0daef1eefc1aaf0d184b1517aad107c5f3e491bc"
328
328
  }