@powerlines/plugin-alloy 0.26.216 → 0.26.218

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.
Files changed (101) hide show
  1. package/dist/core/components/infrastructure-file.d.mts.map +1 -1
  2. package/dist/core/components/infrastructure-file.mjs.map +1 -1
  3. package/dist/core/components/output.d.mts.map +1 -1
  4. package/dist/core/components/output.mjs.map +1 -1
  5. package/dist/core/components/single-line-comment.d.mts.map +1 -1
  6. package/dist/core/components/single-line-comment.mjs.map +1 -1
  7. package/dist/core/components/source-file.d.mts.map +1 -1
  8. package/dist/core/components/source-file.mjs.map +1 -1
  9. package/dist/core/components/spacing.d.mts.map +1 -1
  10. package/dist/core/components/spacing.mjs.map +1 -1
  11. package/dist/core/contexts/context.d.mts.map +1 -1
  12. package/dist/core/contexts/context.mjs.map +1 -1
  13. package/dist/core/contexts/meta.d.mts.map +1 -1
  14. package/dist/core/contexts/meta.mjs.map +1 -1
  15. package/dist/core/contexts/schema.d.mts.map +1 -1
  16. package/dist/core/contexts/schema.mjs.map +1 -1
  17. package/dist/core/helpers/code.d.mts.map +1 -1
  18. package/dist/core/helpers/code.mjs.map +1 -1
  19. package/dist/hcl/components/block-declaration.d.mts.map +1 -1
  20. package/dist/hcl/components/block-declaration.mjs.map +1 -1
  21. package/dist/hcl/components/hcl-file.d.mts.map +1 -1
  22. package/dist/hcl/components/hcl-file.mjs.map +1 -1
  23. package/dist/hcl/components/packer-file.d.mts.map +1 -1
  24. package/dist/hcl/components/packer-file.mjs.map +1 -1
  25. package/dist/hcl/components/terraform-file.d.mts.map +1 -1
  26. package/dist/hcl/components/terraform-file.mjs.map +1 -1
  27. package/dist/helpers/capnp.d.mts.map +1 -1
  28. package/dist/helpers/capnp.mjs.map +1 -1
  29. package/dist/helpers/create-builtin.d.mts.map +1 -1
  30. package/dist/helpers/create-builtin.mjs.map +1 -1
  31. package/dist/helpers/refkey.d.mts.map +1 -1
  32. package/dist/helpers/refkey.mjs.map +1 -1
  33. package/dist/helpers/typescript.d.mts.map +1 -1
  34. package/dist/helpers/typescript.mjs.map +1 -1
  35. package/dist/index.d.mts.map +1 -1
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/markdown/components/front-matter.cjs +3 -1
  38. package/dist/markdown/components/front-matter.d.cts.map +1 -1
  39. package/dist/markdown/components/front-matter.d.mts.map +1 -1
  40. package/dist/markdown/components/front-matter.mjs +3 -1
  41. package/dist/markdown/components/front-matter.mjs.map +1 -1
  42. package/dist/markdown/components/heading.d.mts.map +1 -1
  43. package/dist/markdown/components/heading.mjs.map +1 -1
  44. package/dist/markdown/components/markdown-file.cjs +14 -2
  45. package/dist/markdown/components/markdown-file.d.mts.map +1 -1
  46. package/dist/markdown/components/markdown-file.mjs +14 -2
  47. package/dist/markdown/components/markdown-file.mjs.map +1 -1
  48. package/dist/markdown/components/markdown-table.d.mts.map +1 -1
  49. package/dist/markdown/components/markdown-table.mjs.map +1 -1
  50. package/dist/markdown/contexts/markdown-table.d.mts.map +1 -1
  51. package/dist/markdown/contexts/markdown-table.mjs.map +1 -1
  52. package/dist/render.d.mts.map +1 -1
  53. package/dist/render.mjs.map +1 -1
  54. package/dist/types/components.d.cts +12 -0
  55. package/dist/types/components.d.cts.map +1 -1
  56. package/dist/types/components.d.mts +12 -0
  57. package/dist/types/components.d.mts.map +1 -1
  58. package/dist/types/components.mjs.map +1 -1
  59. package/dist/types/plugin.d.mts.map +1 -1
  60. package/dist/typescript/components/builtin-file.d.mts.map +1 -1
  61. package/dist/typescript/components/builtin-file.mjs.map +1 -1
  62. package/dist/typescript/components/class-declaration.d.mts.map +1 -1
  63. package/dist/typescript/components/class-declaration.mjs.map +1 -1
  64. package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -1
  65. package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
  66. package/dist/typescript/components/entry-file.d.mts.map +1 -1
  67. package/dist/typescript/components/entry-file.mjs.map +1 -1
  68. package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
  69. package/dist/typescript/components/interface-declaration.mjs.map +1 -1
  70. package/dist/typescript/components/object-declaration.d.mts.map +1 -1
  71. package/dist/typescript/components/object-declaration.mjs.map +1 -1
  72. package/dist/typescript/components/property-name.d.mts.map +1 -1
  73. package/dist/typescript/components/property-name.mjs.map +1 -1
  74. package/dist/typescript/components/record-expression.d.mts.map +1 -1
  75. package/dist/typescript/components/record-expression.mjs.map +1 -1
  76. package/dist/typescript/components/tsdoc-schema.d.mts.map +1 -1
  77. package/dist/typescript/components/tsdoc-schema.mjs.map +1 -1
  78. package/dist/typescript/components/tsdoc.cjs +2 -12
  79. package/dist/typescript/components/tsdoc.d.mts.map +1 -1
  80. package/dist/typescript/components/tsdoc.mjs +2 -12
  81. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  82. package/dist/typescript/components/type-declaration.d.mts.map +1 -1
  83. package/dist/typescript/components/type-declaration.mjs.map +1 -1
  84. package/dist/typescript/components/type-parameters.d.mts.map +1 -1
  85. package/dist/typescript/components/type-parameters.mjs.map +1 -1
  86. package/dist/typescript/components/typescript-file.cjs +13 -2
  87. package/dist/typescript/components/typescript-file.d.cts.map +1 -1
  88. package/dist/typescript/components/typescript-file.d.mts.map +1 -1
  89. package/dist/typescript/components/typescript-file.mjs +13 -2
  90. package/dist/typescript/components/typescript-file.mjs.map +1 -1
  91. package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -1
  92. package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
  93. package/dist/typescript/contexts/member-scope.d.mts.map +1 -1
  94. package/dist/typescript/contexts/member-scope.mjs.map +1 -1
  95. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -1
  96. package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -1
  97. package/dist/typescript/helpers/utilities.d.mts.map +1 -1
  98. package/dist/typescript/helpers/utilities.mjs.map +1 -1
  99. package/dist/yaml/components/yaml-file.d.mts.map +1 -1
  100. package/dist/yaml/components/yaml-file.mjs.map +1 -1
  101. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-table.mjs","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Prose, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n MarkdownTableColumnContextInterface,\n MarkdownTableContext,\n useMarkdownTable\n} from \"../contexts/markdown-table\";\n\nexport interface MarkdownTableProps<\n T extends Record<string, any> = Record<string, any>\n> extends ComponentProps {\n data: T[];\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTable<\n T extends Record<string, any> = Record<string, any>\n>(props: MarkdownTableProps<T>) {\n const [{ children, data }] = splitProps(props, [\"children\", \"data\"]);\n\n const columns = computed(() =>\n Object.keys(data).map((name: string, index: number) => ({\n index,\n name,\n align: \"left\" as const,\n width: 20\n }))\n );\n\n return (\n <MarkdownTableContext.Provider value={{ columns: columns.value, data }}>\n <Show when={Boolean(children)}>{children}</Show>\n </MarkdownTableContext.Provider>\n );\n}\n\nexport type MarkdownTableColumnProps = ComponentProps &\n Partial<Pick<MarkdownTableColumnContextInterface, \"align\">> &\n Required<Pick<MarkdownTableColumnContextInterface, \"name\">> & {\n width?: number;\n };\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumn(props: MarkdownTableColumnProps) {\n const [{ children, width, align, name }] = splitProps(props, [\n \"children\",\n \"width\",\n \"align\",\n \"name\"\n ]);\n\n const tableContext = useMarkdownTable();\n const columnRef = computed(() =>\n tableContext?.columns.find(c => c.name === name)\n );\n\n const indexRef = computed(() => columnRef.value?.index ?? 0);\n const alignRef = computed(() => columnRef.value?.align ?? align ?? \"left\");\n const widthRef = computed(() => columnRef.value?.width ?? width ?? 20);\n\n const textLength = computed(() => {\n const content = children ? children.toString() : \"\";\n\n return content.length;\n });\n\n return (\n <Prose>\n <Show when={indexRef.value === 0}>{\"|\"}</Show>\n <Show when={Boolean(children)}>\n <Prose>{code`${\n alignRef.value === \"left\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }${children}${\n alignRef.value === \"right\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }`}</Prose>\n </Show>\n {\"|\"}\n </Prose>\n );\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumnHeader(props: MarkdownTableColumnProps) {\n const [{ children, name }, rest] = splitProps(props, [\"children\", \"name\"]);\n\n return (\n <>\n <MarkdownTableColumn {...rest} name={name}>\n <Show\n fallback={titleCase(name, {\n useDescriptions: false\n })}\n when={!isUndefined(children)}>\n {children}\n </Show>\n </MarkdownTableColumn>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;CA4BA,MAAO,CAAA,EACH,UACF,UACK,WAAI,OAAA,CAAA,YAAA,MAAA,CAAA;CACX,MAAA,UAAA,eAAA,OAAA,KAAA,IAAA,EAAA,KAAA,MAAA,WAAA;;EAEE;EACC,OAAA;EACD,OAAA;CACF,EAAA,CAAA;CACE,OAAE,gBAAuB,qBAAqB,UAAI;EAClD,IAAM,QAAC;GACP,OAAS;;IAEH;GACJ;EACA;EACA,IAAE,WAAI;GACJ,OAAO,gBAAe,MAAA;IACtB,IAAM,OAAC;KACP,OAAA,QAAA,QAAA;IACH;;GAED,CAAA;EACE;CACF,CAAC;AACH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mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;;UAqBiB,mCAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,KAAA;EACA,IAAA,QAAY,CAAA;EACZ,KAAA;EACA,KAAA;AAAA;;;;cAMW,0BAAA,EAA4B,gBAAgB,CAAC,mCAAA;;;;;;iBAW1C,sBAAA,IAAsB,mCAAA,CAAA,MAAA;AAAA,UAMrB,6BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,OAAA,EAAS,mCAAA,CAAoC,CAAA;EAC7C,IAAA,EAAM,CAAA;AAAA;AArBR;;;AAAA,cA2Ba,oBAAA,EAAsB,gBAAgB,CAAC,6BAAA;AA3ByC;AAW7F;;;;AAX6F,iBAsC7E,gBAAA,IAAgB,6BAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-table.mjs","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\n\nexport interface MarkdownTableColumnContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n index: number;\n name: keyof T;\n align: \"left\" | \"right\" | \"center\";\n width: number;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface> =\n createNamedContext<MarkdownTableColumnContextInterface>(\n \"MarkdownTableColumn\",\n {} as MarkdownTableColumnContextInterface\n );\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTableColumn() {\n return useContext<MarkdownTableColumnContextInterface>(\n MarkdownTableColumnContext\n );\n}\n\nexport interface MarkdownTableContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n columns: MarkdownTableColumnContextInterface<T>[];\n data: T[];\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface> =\n createContext<MarkdownTableContextInterface>({\n columns: [],\n data: []\n });\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTable() {\n return useContext<MarkdownTableContextInterface>(MarkdownTableContext);\n}\n"],"mappings":";;;;;;AAsBA,MAAY,6BAA6B,mBAAW,uBAAA,CAAA,CAAA;;;;;;;CAQlD,OAAA,WAAA,0BAAA;AACF;;;;AAIA,MAAK,uBAAoB,cAAA;CACvB,SAAQ,CAAA;CACR,MAAC,CAAA;;;;;;;AAQH,SAAS,mBAAW;CAClB,OAAE,WAAA,oBAAA;AACJ"}
1
+ {"version":3,"file":"markdown-table.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.mts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;AAgDA;;;;;;;;;;;;iBAAsB,MAAA,kBAAwB,aAAA,EAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,GAAQ,OAAA;;;;;AAAA;AA2GpB;;;;;;;;;;iBAAgB,YAAA,kBAA8B,aAAA,EAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,EACV,OAAA,GAAU,gBAAA"}
1
+ {"version":3,"file":"render.d.mts","names":[],"sources":["../src/render.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"render.mjs","names":[],"sources":["../src/render.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n printTree,\n PrintTreeOptions,\n renderAsync,\n renderTree,\n traverseOutput\n} from \"@alloy-js/core\";\nimport { noop } from \"@stryke/helpers/noop\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { list } from \"@stryke/string-format/list\";\nimport { PluginContext } from \"powerlines\";\nimport { MetaItem, Output } from \"./core\";\nimport { OutputFile } from \"./types\";\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.\n *\n * @example\n * ```tsx\n * import { render } from \"@powerlines/plugin-alloy/render\";\n *\n * await render(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @returns A promise that resolves when rendering is complete.\n */\nexport async function render<TContext extends PluginContext>(\n context: TContext,\n children: Children\n) {\n const meta = {} as Record<string, MetaItem>;\n const output = await renderAsync(\n <Output context={context} meta={meta}>\n {children}\n </Output>\n );\n\n const files = [] as OutputFile[];\n await traverseOutput(output, {\n visitDirectory: noop,\n visitFile: file => files.push(file)\n });\n\n if (!files.length) {\n context.debug(\"No output files were rendered by the Alloy-js components.\");\n } else {\n context.debug(\n `Rendering ${files.length} output files from Alloy-js components: ${list(\n files.map(\n file =>\n `${replacePath(file.path, context.config.cwd)}${\n meta[file.path]?.kind === \"builtin\" ||\n meta[file.path]?.kind === \"infrastructure\"\n ? ` (${\n meta[file.path]?.kind === \"builtin\"\n ? \"Builtin\"\n : \"Infrastructure\"\n })`\n : \"\"\n }`\n )\n )}.`\n );\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (context.fs.existsSync(directory.path)) {\n return;\n }\n\n context.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n context.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else if (metadata.kind === \"infrastructure\") {\n if (!metadata.id) {\n throw new Error(\n `Infrastructure file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitInfrastructureSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else {\n context.emitSync(file.contents, file.path, metadata);\n }\n } else {\n context.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n }\n}\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.\n *\n * @example\n * ```tsx\n * import { renderString } from \"@powerlines/plugin-alloy/render\";\n *\n * const output = await renderString(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @param options - Optional print tree options.\n * @returns The rendered output as a string.\n */\nexport function renderString<TContext extends PluginContext>(\n context: TContext,\n children: Children,\n options?: PrintTreeOptions\n) {\n const tree = renderTree(<Output context={context}>{children}</Output>);\n\n return printTree(tree, options);\n}\n"],"mapp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A,SAAA,IAAA;OACvB,YAAW,SAAW;OACxB,SAAM,SAAA;OACR,WAAA,kBAAA,KAAA,IAAA;;KAEA,OACD,QAAA,SAAA,KAAA,UAAA,KAAA,MAAA,QAAA;IAEC,OACE,QAAM,GAAA,SAAW,KAAK,YAAe,KAAC,IAAA;GAE1C;EACF,CAAC;CACH;AACF;;;;;;;;;;;;;;;;AAiBA,SAAgB,aAAa,SAAC,UAAA,SAAA;CAK5B,OAAO,UAJK,WAAU,gBAAK,UAAA;EAChB;EACC;CACZ,CAAC,CACY,GAAA,OAAA;AACf"}
1
+ {"version":3,"file":"render.mjs","names":[],"sources":[],"mappings":""}
@@ -105,15 +105,27 @@ interface SourceFileHeaderProps extends ComponentProps {
105
105
  /**
106
106
  * If true, disables the ESLint directive at the top of the file.
107
107
  *
108
+ * @see https://eslint.org/docs
109
+ *
108
110
  * @defaultValue true
109
111
  */
110
112
  disableEslint?: boolean;
111
113
  /**
112
114
  * If true, disables the Biome directive at the top of the file.
113
115
  *
116
+ * @see https://biomejs.dev/guides/getting-started/
117
+ *
114
118
  * @defaultValue true
115
119
  */
116
120
  disableBiome?: boolean;
121
+ /**
122
+ * If true, disables the Oxlint directive at the top of the file.
123
+ *
124
+ * @see https://oxc.rs/docs/guide/usage/linter
125
+ *
126
+ * @defaultValue true
127
+ */
128
+ disableOxlint?: boolean;
117
129
  /**
118
130
  * If true, disables the Prettier directive at the top of the file.
119
131
  *
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.cts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,aAAa;AAAA;AAAA,UAGP,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EAHA;;;;;;EAWA,MAAA,GAAS,aAAa;AAAA;AAAA,KAGZ,UAAA,IACP,eAAA;EAAoB,IAAA;AAAA,MACpB,eAAA;EACC,IAAA;EACA,cAAA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BAAA;AAAA,UAGP,qBAAA,SAA8B,cAAc;EA1CvD;;AAAM;AAMZ;;;;EA4CE,aAAA;EArCU;;;;;;;EA8CV,YAAA;EA7CQ;;;;;;;EAsDR,aAAA;EAtD4B;AAE9B;;;;EA2DE,eAAA;AAAA"}
@@ -105,15 +105,27 @@ interface SourceFileHeaderProps extends ComponentProps {
105
105
  /**
106
106
  * If true, disables the ESLint directive at the top of the file.
107
107
  *
108
+ * @see https://eslint.org/docs
109
+ *
108
110
  * @defaultValue true
109
111
  */
110
112
  disableEslint?: boolean;
111
113
  /**
112
114
  * If true, disables the Biome directive at the top of the file.
113
115
  *
116
+ * @see https://biomejs.dev/guides/getting-started/
117
+ *
114
118
  * @defaultValue true
115
119
  */
116
120
  disableBiome?: boolean;
121
+ /**
122
+ * If true, disables the Oxlint directive at the top of the file.
123
+ *
124
+ * @see https://oxc.rs/docs/guide/usage/linter
125
+ *
126
+ * @defaultValue true
127
+ */
128
+ disableOxlint?: boolean;
117
129
  /**
118
130
  * If true, disables the Prettier directive at the top of the file.
119
131
  *
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.mts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,aAAa;AAAA;AAAA,UAGP,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EAHA;;;;;;EAWA,MAAA,GAAS,aAAa;AAAA;AAAA,KAGZ,UAAA,IACP,eAAA;EAAoB,IAAA;AAAA,MACpB,eAAA;EACC,IAAA;EACA,cAAA,GAAiB,0BAAA;AAAA,MAElB,eAAA;EAAoB,IAAA;EAAiB,EAAA;AAAA,KACtC,cAAA;AAAA,UAEa,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA,GAAW,eAAA,GAAkB,UAAU;AAAA;AAAA,UAGxB,kBAAA;EACf,cAAA,EAAgB,0BAA0B;AAAA;AAAA,UAG3B,oBAAA;EACf,EAAE;AAAA;AAAA,UAGa,mBAAA;EACf,IAAA,GAAO,aAAa;AAAA;AAAA,UAGL,qBAAA;EACf,IAAA;EACA,UAAU;AAAA;AAAA,UAGK,aAAA,SAAsB,OAAA;EACrC,IAAA;IACE,QAAA,GAAW,qBAAA;IAtBgB;;AAAU;IA2BrC,OAAA,GAAU,oBAAA;IAxBqB;;;IA6B/B,KAAA,GAAQ,kBAAA;IAzBK;;;IA8Bb,MAAA,GAAS,mBAAA;EAAA,IACP,MAAA;AAAA;;;;UAMW,cAAA;EACf,QAAA,GAAW,QAAQ;AAAA;;;AA5BT;KAkCA,0BAAA,GAA6B,IAAA,CAAK,cAAA,gBAC5C,QAAA,CAAS,IAAA,CAAK,cAAA;AAAA,UAEC,wBAAA,SAAiC,mBAAiB;;;;EAIjE,EAAE;AAAA;AAAA,UAGa,2BAAA;EACf,IAAA,YAAgB,QAAA;EAChB,IAAA,YAAgB,QAAA;EAChB,OAAA;EACA,YAAA,GAAe,OAAA,CAAQ,CAAA;AAAA;AAAA,UAGR,wBAAA;EACf,IAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;AAAA;AAAA,KAGU,qBAAA,GAAwB,MAAA,yBAElB,KAAA,CAAM,wBAAA;AAAA,UAGP,qBAAA,SAA8B,cAAc;EA1CvD;;AAAM;AAMZ;;EA0CE,aAAA;EAzCA;AAAmB;AAMrB;;;EA0CE,YAAA;EA1CuC;;;;;EAiDvC,eAAA;AAAA"}
1
+ {"version":3,"file":"components.d.mts","names":[],"sources":["../../src/types/components.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"components.mjs","names":[],"sources":["../../src/types/components.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Children, Context } from \"@alloy-js/core\";\nimport type { SourceFileContext } from \"@alloy-js/typescript\";\nimport { ResolvedEntryFileReference, StoragePreset } from \"powerlines\";\n\nexport interface CopyOutputFile {\n kind: \"file\";\n path: string;\n sourcePath: string;\n\n /**\n * The format of the output files\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided \\`output.mode\\` value.\n */\n preset?: StoragePreset;\n}\n\nexport interface WriteOutputFile {\n kind: \"file\" | \"entry\" | \"builtin\";\n path: string;\n contents: string;\n filetype: string;\n\n /**\n * The format of the output files\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided \\`output.mode\\` value.\n */\n preset?: StoragePreset;\n}\n\nexport type OutputFile =\n | (WriteOutputFile & { kind: \"file\" })\n | (WriteOutputFile & {\n kind: \"entry\";\n typeDefinition?: ResolvedEntryFileReference;\n })\n | (WriteOutputFile & { kind: \"builtin\"; id: string })\n | CopyOutputFile;\n\nexport interface OutputDirectory {\n kind: \"directory\";\n path: string;\n contents: (OutputDirectory | OutputFile)[];\n}\n\nexport interface RenderEntryContext {\n typeDefinition: ResolvedEntryFileReference;\n}\n\nexport interface RenderBuiltinContext {\n id: string;\n}\n\nexport interface RenderOutputContext {\n mode?: StoragePreset;\n}\n\nexport interface CopyFileOutputContext {\n path?: string;\n sourcePath?: string;\n}\n\nexport interface RenderContext extends Context {\n meta?: {\n copyFile?: CopyFileOutputContext;\n\n /**\n * The current context for the built-in module.\n */\n builtin?: RenderBuiltinContext;\n\n /**\n * The current context for the application entrypoint file being rendered.\n */\n entry?: RenderEntryContext;\n\n /**\n * The current context for output rendering.\n */\n output?: RenderOutputContext;\n } & Record<string, any>;\n}\n\n/**\n * A type that represents the props of a component that can have children.\n */\nexport interface ComponentProps {\n children?: Children;\n}\n\n/**\n * A type that requires the `children` prop in a component.\n */\nexport type ComponentPropsWithChildren = Omit<ComponentProps, \"children\"> &\n Required<Pick<ComponentProps, \"children\">>;\n\nexport interface BuiltinSourceFileContext extends SourceFileContext {\n /**\n * The runtime module identifier.\n */\n id: string;\n}\n\nexport interface ReflectionOverrideInterface<T> {\n name?: string | Children;\n type?: string | Children;\n extends?: string | false;\n defaultValue?: Partial<T>;\n}\n\nexport interface TypescriptFileImportItem {\n name: string;\n default?: boolean;\n alias?: string;\n type?: boolean;\n}\n\nexport type TypescriptFileImports = Record<\n string,\n null | string | Array<TypescriptFileImportItem | string>\n>;\n\nexport interface SourceFileHeaderProps extends ComponentProps {\n /**\n * If true, disables the ESLint directive at the top of the file.\n *\n * @defaultValue true\n */\n disableEslint?: boolean;\n\n /**\n * If true, disables the Biome directive at the top of the file.\n *\n * @defaultValue true\n */\n disableBiome?: boolean;\n\n /**\n * If true, disables the Prettier directive at the top of the file.\n *\n * @defaultValue false\n */\n disablePrettier?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"components.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAyBY,kBAAA,GAAqB,OAAO,CAAC,gBAAA;AAAA,KAE7B,qBAAA,GAAwB,qBAAA;EAClC,KAAA,GAAQ,kBAAkB;AAAA;AAAA,KAGhB,yBAAA,GAA4B,yBAAA;EACtC,KAAA,EAAO,kBAAkB;AAAA;AAAA,KAGf,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-file.d.mts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":";;;;KAgCY,gBAAA,GAAmB,IAAA,CAAK,mBAAA,YAClC,IAAA,CAAK,gBAAA;;AADP;;;;;EAQI,EAAA;EAPF;;;EAYE,WAAA;EAbgC;;;;;EAoBhC,GAAA;AAAA;AAAG;AASP;;;;;AATO,iBASS,WAAA,CAAY,KAAA,EAAO,gBAAgB,4BAAA,QAAA"}
1
+ {"version":3,"file":"builtin-file.d.mts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-file.mjs","names":[],"sources":["../../../src/typescript/components/builtin-file.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 { computed, splitProps } from \"@alloy-js/core\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { TSDocModuleProps } from \"./tsdoc\";\nimport { TSDocModule } from \"./tsdoc\";\nimport {\n TypescriptFile,\n TypescriptFileHeader,\n TypescriptFileHeaderImports,\n TypescriptFileProps\n} from \"./typescript-file\";\n\nexport type BuiltinFileProps = Omit<TypescriptFileProps, \"path\"> &\n Omit<TSDocModuleProps, \"name\"> & {\n /**\n * The runtime module identifier.\n *\n * @remarks\n * This value will be included after the \\`storm:\\` prefix in the import statement.\n */\n id: string;\n\n /**\n * The description for the builtin module.\n */\n description?: string;\n\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function BuiltinFile(props: BuiltinFileProps) {\n const [{ children, imports, builtinImports, id, description, tsx }, rest] =\n splitProps(props, [\n \"children\",\n \"imports\",\n \"builtinImports\",\n \"id\",\n \"description\",\n \"tsx\"\n ]);\n\n const context = usePowerlinesSafe();\n const path = computed(() =>\n replacePath(\n `${!isSet(tsx) ? id : replaceExtension(id)}${\n hasFileExtension(id) && !isSet(tsx) ? \"\" : tsx ? \".tsx\" : \".ts\"\n }`,\n context?.builtinsPath\n )\n );\n\n return (\n <TypescriptFile\n header={\n <TypescriptFileHeader\n header={<TSDocModule name={id}>{description}</TSDocModule>}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n />\n </TypescriptFileHeader>\n }\n meta={{\n kind: \"builtin\",\n extension: tsx ? \"tsx\" : \"ts\",\n id: replaceExtension(id)\n }}\n {...rest}\n path={path.value}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,SAAY,YAAgB,OAAO;CACjC,MAAK,CAAA,EACH,UACA,SACA,gBACA,IACA,aACA,OACA,QAAI,WAAM,OAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;CAAA,CAAA;;CAEZ,MAAI,OAAA,eAAA,YAAA,GAAA,CAAA,MAAA,GAAA,IAAA,KAAA,iBAAA,EAAA,IAAA,iBAAA,EAAA,KAAA,CAAA,MAAA,GAAA,IAAA,KAAA,MAAA,SAAA,SAAA,SAAA,YAAA,CAAA;CACJ,OAAK,gBAAoB,gBAAY,WAAM;EACzC,IAAE,SAAA;GACF,OAAA,gBAAoB,sBAAA;;KAElB,OAAA,gBAAA,aAAA;MACC,MAAW;MACb,UAAA;KACG,CAAA;IACF;IACE,IAAE,WAAO;KACd,OAAA,gBAAA,6BAAA;;MAED;KACQ,CAAA;IACT;GACG,CAAA;EACA;EACF,IAAA,OAAA;GACI,OAAC;IACC,MAAG;IACP,WAAW,MAAO,QAAA;IACf,IAAA,iBAAS,EAAA;GACV;EACF;CACF,GAAG,MAAK;EACN,IAAG,OAAA;GACD,OAAI,KAAA;EACN;;CAEF,CAAA,CAAA;AACF"}
1
+ {"version":3,"file":"builtin-file.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"class-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":";;;;;;;;UAoDiB,qBAAA,SAA8B,sBAAA;EAAR;;;EAIrC,QAAA;EAeiB;;;EAVjB,OAAA,GAAU,QAAA;EATmC;;;EAc7C,UAAA,GAAa,QAAA;EAAb;;;EAKA,cAAA,GAAiB,uBAAA;AAAA;AAAuB;AAiC1C;;;;;;;;AAA6D;;;;;;AA4C7D;;;;;;;;;;;;;;;AA7E0C,iBAiC1B,gBAAA,CAAiB,KAAA,EAAO,qBAAA,GAAqB,QAAA;AAAA,kBAA7C,gBAAA;EAAA,2BAAgB,cAAA;AAAA;;;;UA4Cf,gBAAA;EACf,IAAA,WAAe,OAAA;EACf,MAAA,GAAS,MAAA;EACT,MAAA;EACA,OAAA;EACA,SAAA;EACA,SAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA,GAAW,QAAA;EACX,GAAA,GAAM,QAAA;EACN,OAAA;EACA,QAAA;AAAA;AA0CF;;;;;;AAAA,iBAjCgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;UAiClC,eAAA,SAAwB,gBAAA;EACvC,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA;EACA,QAAA,GAAW,QAAA;EACX,eAAA;AAAA;AAAe;AASjB;;;;;AATiB,iBASD,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;AAAA;UAyBhC,kBAAA,SAA2B,gBAAA;EAC1C,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;AATrC;AASrB;;iBA4BgB,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;UAkBzC,gBAAA,SAAyB,gBAAA,EAAkB,kBAAA;EAC1D,KAAA;EACA,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
1
+ {"version":3,"file":"class-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"class-declaration.mjs","names":[],"sources":["../../../src/typescript/components/class-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 code,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n CallSignature,\n CallSignatureProps,\n CommonDeclarationProps,\n createMemberSymbol,\n createTypeAndValueSymbol,\n Declaration,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport { LexicalScope } from \"../contexts\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { getCallSignatureProps } from \"../helpers\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc, TSDocParams } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\n/**\n * Props for the ClassDeclaration component, which represents a TypeScript class declaration\n */\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n /**\n * An indication of whether this class is abstract\n */\n abstract?: boolean;\n\n /**\n * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration\n */\n extends?: Children;\n\n /**\n * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration\n */\n implements?: Children[];\n\n /**\n * The generic type parameters of the class.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @example\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {implement => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n {props.abstract && code`abstract `} class <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nClassDeclaration.TypeParameters = TypeParameters;\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n */\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n abstract?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n override?: boolean;\n}\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n *\n * @param props - The properties of the class member, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.abstract && \"abstract \"}\n {props.override && \"override \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassFieldProps extends ClassMemberProps {\n name: string;\n type?: Children;\n optional?: boolean;\n children?: Children;\n isPrivateMember?: boolean;\n}\n\n/**\n * Generates a TypeScript class field declaration for the given reflection class.\n *\n * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.\n * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <PropertyName\n private={props.isPrivateMember}\n name={props.isPrivateMember ? props.name : undefined}\n />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassPropertyProps extends ClassMemberProps {\n name: string;\n type?: Children;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class property setter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertySet(props: ClassPropertyProps) {\n return (\n <>\n <ClassMember {...props}>\n {\"set \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n parameters={[\n {\n name: \"value\",\n type: <TypeRefContext>{props.type}</TypeRefContext>\n }\n ]}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n\n/**\n * Generates a TypeScript class property getter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertyGet(props: ClassPropertyProps) {\n return (\n <ClassMember {...props}>\n {\"get \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n returnType={<TypeRefContext>{props.type}</TypeRefContext>}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n );\n}\n\n/**\n * Props for a class method, which is a specific type of class member that represents a function defined within the class.\n */\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class method declaration for the given reflection class.\n *\n * @param props - The properties of the class method, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc}>\n {Array.isArray(rest.parameters) && (\n <TSDocParams parameters={rest.parameters} />\n )}\n </TSDoc>\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DE,MAAE,cAAA,MAAA,WAAA,CAAA,aAAA,WAAA,MAAA,OAAA,CAAA;CACF,MAAG,iBAAoB,MAAK,cAAW,MAAU,WAAW,SAAI,KAAS;EAAE;EAAK;EAAY;EAAO,gBAAa,KAAA;GAC9G,IAAA,OAAA;IACF,OAAW,MAAE;;GAEX,OAAA;GACA,OAAK;GACL,WAAA,cAAA;EACF,CAAA;CAAA;CACF,MAAA,MAAA,yBAAA,MAAA,MAAA;;EAEE,QAAA,MAAA;EACC,SAAS,MAAA;EACX,UAAA,MAAA;EACG,oBAAA;EACA,YAAE,gBAAA,EAAA,IAAA,OAAA;CACJ,CAAC;CACD,OAAO,CAAA,gBAAiB,MAAA;EACvB,IAAK,OAAC;GACN,OAAM,QAAA,MAAiB,GAAA;EACzB;EACG,IAAA,WAAA;GACE,OAAA,gBAAyB,OAAO,EAC9B,IAAA,UAAK;IACN,OAAA,MAAW;GACZ,EACA,CAAA;EACF;CACF,CAAC,GAAG,gBAAiB,eAAA;EACnB,QAAG;EACH,KAAC,YAAgB;GACpB,OAAA,MAAA;EACG;EACA,KAAK,aAAU;GACd,OAAA,MAAc;EAClB;EACG,IAAA,WAAe;GACf,OAAA,gBAAuB,eAAa;IACpC,aAAa;IACZ,IAAA,WAAA;KACH,OAAA;MAAA,WAAA,MAAA,YAAA,IAAA,WAAA;MAAA;MAAA,gBAAA,MAA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,YAAA,OAAA;CACC,MAAE,YAAc,sBAAsB,KAAM;CAC5C,MAAE,CAAA,GAAQ,QAAM,WAAQ,OAAY,CAAC,KAAI,CAAA;CACzC,OAAA,CAAA,gBAAA,MAAA;EACF,IAAO,OAAQ;GACb,OAAO,QAAA,MAAA,GAAA;EACL;EACA,IAAI,WAAK;GACP,OAAC,gBAAwB,OAAO;IAC/B,IAAA,UAAY;KACV,OAAA,MAAA;IACD;IACA,IAAI,WAAE;KACL,OAAO,WAAc,CAAC,CAAC,MAAM,QAAA,KAAA,UAAA,CAAA,EAAA,KAAA,gBAAA,aAAA,EAC9B,IAAA,aAAY;MACd,OAAW,KAAA;KACd,EACH,CAAA;;GAEE,CAAA;EACC;CACD,CAAA,GAAA,gBAAA,aAAA,WAAA,MAAA,EACF,IAAO,WAAU;EACf,OAAQ;GAAA,WAAO,MAAA,SAAA,QAAA;GAAA,gBAAA,cAAA,CAAA,CAAA;GAAA,gBAAA,cAAA,EACf,IAAU,WAAS;IACrB,OAAA;KAAA,gBAAA,eAAA,SAAA;KAAA;KAAA,gBAAA,OAAA;MAEE,OAAA,MAAA;KACU,EACX,CAAA;IAAA;GACG,EACA,CAAA;EAAA;CACF,EACF,CAAA,CAAA,CAAA;AACA"}
1
+ {"version":3,"file":"class-declaration.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-import-statement.d.mts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":";;;UAqBiB,2BAAA,SAAoC,IAAI,CACvD,mBAAA;;AADF;;EAOE,UAAA;EAPuD;;;;;EAcvD,UAAA;AAAA;AAeF;;;;;;;;AAAyE;;;;AAAzE,iBAAgB,sBAAA,CAAuB,KAAA,EAAO,2BAA2B,4BAAA,QAAA"}
1
+ {"version":3,"file":"dynamic-import-statement.d.mts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-import-statement.mjs","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport { VarDeclaration, VarDeclarationProps } from \"@alloy-js/typescript\";\n\nexport interface DynamicImportStatementProps extends Omit<\n VarDeclarationProps,\n \"initializer\"\n> {\n /**\n * The path of the module to import.\n */\n importPath: string;\n\n /**\n * The name of the export to import from the module.\n *\n * @defaultValue \"default\"\n */\n exportName?: string;\n}\n\n/**\n * Generates a dynamic import statement for a given module path and export name.\n *\n * @example\n * ```tsx\n * <DynamicImportStatement importPath=\"./my-module\" exportName=\"myExport\" const={true} name=\"myVar\" />\n * // const myVar = await import(\"./my-module\").then(m => m.myExport);\n * ```\n *\n * @param props - The properties for the dynamic import statement.\n * @returns A `VarDeclaration` component representing the dynamic import statement.\n */\nexport function DynamicImportStatement(props: DynamicImportStatementProps) {\n const {\n importPath,\n exportName = \"default\",\n const: isConst = true,\n ...rest\n } = props;\n\n return (\n <VarDeclaration\n const={isConst}\n {...rest}\n initializer={code`await import(\"${importPath}\").then(m => m.${exportName});`}></VarDeclaration>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,SAAM,uBAAqB,OAAA;CACzB,MAAE,EACF,YACF,aAAA,kCAEE,GAAA,SACC;CACF,OAAA,gBAAA,gBAAA,WAAA,EACG,SAAA,QACF,GAAG,MAAC,EACF,aAAA,IAAA,iBAAkC,WAAM,iBAAoB,WAAU,IACxE,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"dynamic-import-statement.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file.d.mts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":";;;;KA4BY,cAAA,GAAiB,mBAAA;;AAA7B;;;;EAME,GAAA;EAAA;;;EAKA,cAAA,GAAiB,0BAA0B;AAAA;AAS7C;;;;;;AAAA,iBAAgB,SAAA,CAAU,KAAA,EAAO,cAAc,4BAAA,QAAA"}
1
+ {"version":3,"file":"entry-file.d.mts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file.mjs","names":[],"sources":["../../../src/typescript/components/entry-file.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 { computed, splitProps } from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport defu from \"defu\";\nimport { ResolvedEntryFileReference } from \"powerlines\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { TypescriptFile, TypescriptFileProps } from \"./typescript-file\";\n\nexport type EntryFileProps = TypescriptFileProps & {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n\n /**\n * Render metadata information about the entrypoint\n */\n typeDefinition?: ResolvedEntryFileReference;\n};\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function EntryFile(props: EntryFileProps) {\n const [{ children, meta, tsx, path, typeDefinition }, rest] = splitProps(\n props,\n [\"children\", \"meta\", \"tsx\", \"path\", \"typeDefinition\"]\n );\n\n const context = usePowerlinesSafe();\n const fullPath = computed(() =>\n context\n ? appendPath(\n `${\n !isSet(tsx) ? path : replaceExtension(path)\n }${tsx ? \".tsx\" : hasFileExtension(path) ? \"\" : \".ts\"}`,\n replacePath(context.entryPath, context.config.cwd)\n )\n : path\n );\n\n return (\n <TypescriptFile\n {...rest}\n path={fullPath.value}\n meta={defu(\n {\n kind: \"entry\"\n },\n meta ?? {},\n {\n typeDefinition\n }\n )}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,SAAe,UAAA,OAAA;UAEX,UACA,MACA,KACF,MACD;;;;;;;CAEC,MAAA,UAAA,kBAAA;CACA,MAAG,WAAc,eAAe,UAAC,WAAoB,GAAC,CAAA,MAAA,GAAW,IAAA,OAAW,iBAAA,IAAA,IAAA,MAAA,SAAA,iBAAA,IAAA,IAAA,KAAA,SAAA,YAAA,QAAA,WAAA,QAAA,OAAA,GAAA,CAAA,IAAA,IAAA;CAC7E,OAAA,gBAAA,gBAAA,WAAA,MAAA;EACG,IAAA,OAAW;GACX,OAAQ,SAAI;EACd;EACF,IAAO,OAAQ;GACb,OAAS,KAAA,EACP,MAAK,QACH,GAAA,QAAW,CAAC,GAAA,EACf;EAED;EACM;CACN,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"entry-file.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"interface-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"mappings":";;;;;;;UAuEiB,yBAAA,SACP,WAAA,CAAY,sBAAA,WAAiC,cAAA;;AADvD;;EAKE,OAAA,GAAU,QAAA;EAJU;;;EASpB,cAAA,GAAiB,uBAAA;EAaX;;;;;;EALN,MAAA,GAAS,UAAA;EAjB4C;;;EAsBrD,GAAA,GAAM,QAAA;AAAA;AAAA,KAGI,iCAAA,GAAoC,oBAAA,GAC9C,cAAA;EACE,MAAA,EAAQ,UAAA;EACR,IAAA;EACA,QAAA;EACA,YAAA;AAAA;AAAA,UAGa,wBAAA;EACf,QAAA,GAAW,QAAQ;AAAA;AAAA,cAGR,mBAAA,2BAAmB,SAAA,CAAA,wBAAA;AAAA,UAoBf,wBAAA;EACf,QAAA,GAAW,QAAA;EACX,IAAA,WAAe,OAAA;EACf,GAAA,GAAM,QAAA;EACN,MAAA,GAAS,MAAA,GAAS,MAAA;EAClB,QAAA;EACA,IAAA,GAAO,QAAA,GAAW,uBAAA;EAClB,OAAA;EACA,QAAA;AAAA;AAAA,UAGe,2BAAA,SAAoC,wBAAwB;EAC3E,OAAA,EAAS,QAAA;AAAA;AAAA,UAGM,wBAAA,SAAiC,wBAAwB;EACxE,IAAI;AAAA;AAAA,UAGW,0BAAA,SAAmC,wBAAwB;EAC1E,MAAA,EAAQ,UAAA;AAAA;AAAA,KAGE,oBAAA,GACR,2BAAA,GACA,wBAAA,GACA,0BAAA;;;AA9C4B;AAoBhC;;;;;;iBAqCgB,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,QAAA;;;;iBAkI3C,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;;;;iBAoErD,4BAAA,CACd,KAAA,EAAO,iCAAA,GAAiC,QAAA"}
1
+ {"version":3,"file":"interface-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"mappings":""}
@@ -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 JsonSchemaPrimitiveType,\n stringifyType\n} from \"@powerlines/schema\";\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 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;\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 type InterfaceDeclarationPropertyProps = InterfaceMemberProps &\n ComponentProps & {\n schema: JsonSchema;\n name: string;\n required: boolean;\n defaultValue?: unknown;\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 name: string | Namekey;\n doc?: Children;\n refkey?: Refkey | Refkey[];\n readOnly?: boolean;\n type?: Children | JsonSchemaPrimitiveType | string;\n nullish?: boolean;\n required?: boolean;\n}\n\nexport interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {\n indexer: Children;\n}\n\nexport interface InterfaceTypeMemberProps extends InterfaceMemberPropsBase {\n type: string;\n}\n\nexport interface InterfaceSchemaMemberProps extends InterfaceMemberPropsBase {\n schema: JsonSchema;\n}\n\nexport type InterfaceMemberProps =\n | InterfaceIndexerMemberProps\n | InterfaceTypeMemberProps\n | InterfaceSchemaMemberProps;\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(props: InterfaceMemberProps) {\n const type = (props as InterfaceSchemaMemberProps).schema\n ? stringifyType((props as InterfaceSchemaMemberProps).schema)\n : (props.type ?? props.children);\n\n const readonly =\n ((props as InterfaceSchemaMemberProps).schema &&\n (props as InterfaceSchemaMemberProps).schema?.readOnly) ||\n (!(props as InterfaceSchemaMemberProps).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 scope = useTSMemberScope();\n const sym = createSymbol(\n TSOutputSymbol,\n (((props as InterfaceSchemaMemberProps).schema\n ? (props as InterfaceSchemaMemberProps).schema?.name\n : undefined) || isSetString(props.name)\n ? props.name\n : props.name.toString()) || uuid().replace(/-/g, \"\"),\n scope.ownerSymbol.staticMembers,\n {\n refkeys: props.refkey,\n tsFlags:\n TSSymbolFlags.TypeSymbol |\n (!!(\n (props as InterfaceSchemaMemberProps).schema &&\n isSchemaNullable((props as InterfaceSchemaMemberProps).schema)\n ) || !!props.nullish\n ? TSSymbolFlags.Nullish\n : 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 {!props.required ? \"?\" : \"\"}: {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(props: InterfaceDeclarationProps) {\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(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}>\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 => (\n <InterfaceDeclarationProperty\n name={property.name}\n schema={property}\n required={!!property?.required}\n />\n )}\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 props: InterfaceDeclarationPropertyProps\n) {\n const [{ schema, name, required, defaultValue }, rest] = splitProps(props, [\n \"schema\",\n \"name\",\n \"required\",\n \"defaultValue\"\n ]);\n\n return (\n <Show when={isSetString(name)}>\n <SchemaPropertyContext.Provider value={schema}>\n <TSDocSchemaProperty schema={schema} defaultValue={defaultValue} />\n <InterfaceMember\n name={name}\n schema={schema}\n required={required}\n readOnly={schema?.readOnly}\n nullish={isSchemaNullable(schema)}\n type={getPrimarySchemaType(schema)}\n {...rest}\n />\n </SchemaPropertyContext.Provider>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAM,sBAAA,qBAAA,SAAA,oBAAA,OAAA;CAEJ,MAAA,SAAA,aAAA,gBAAA,IAAA,QAAA;EACA,WAAa;EACf,QAHY,kBAGL,GAAA;CACL,CAAA;CACA,WAAW,MAAA;CACX,OAAA,gBAAoB,SAAA,EACpB,IAAA,WAAc;EACd,OAAA,gBAAa,eAAA;GACb,aAAA;GACA,IAAA,WAAiB;IACjB,OAAA,gBAAgB,OAAA,EAChB,IAAA,WAAA;KACY,OAAI,MAAA;IACX,EACL,CAAA;GACA;EACA,CAAA;CACA,EACA,CAAA;AACF,CAAC;;;;;;;;;;AAUD,SAAS,gBAAuB,OAAM;CACtC,MAAQ,OAAC,MAAY,SAAS,cAAW,MAAO,MAAM,IAAA,MAAA,QAAA,MAAA;CACtD,MAAQ,WAAC,MAAe,UAAQ,MAAS,QAAK,YAAA,CAAA,MAAA,UAAA,MAAA,WAAA,cAAA;CAC9C,IAAM,aAAW,OACjB,OAAS;EAAA,g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;MACP,IAAA,WAAa;OACT,OAAA,QAAe;MACjB;MACA,IAAC,UAAW;OACV,OAAO,iBAAa,MAAA;MACtB;MACF,IAAA,OAAA;OACF,OAAA,qBAAA,MAAA;MACF;KACA,GAAA,IAAA,CAAA,CAAA;;GAEF,CAAA;EACA;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"interface-declaration.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"object-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/object-declaration.tsx"],"mappings":";;;;;UAqDiB,sBAAA,SAA+B,mBAAmB;EACjE,MAAA,GAAS,gBAAA;AAAA;;;;iBAMK,iBAAA,CAAkB,KAAA,EAAO,sBAAsB,4BAAA,QAAA;AAAA,UA0G9C,8BAAA,SAAuC,cAAc;EACpE,IAAA;EACA,QAAA;EACA,KAAA;EACA,MAAA,EAAQ,UAAA;AAAA;;;;iBAMM,yBAAA,CACd,KAAA,EAAO,8BAA8B,4BAAA,QAAA"}
1
+ {"version":3,"file":"object-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/object-declaration.tsx"],"mappings":""}
@@ -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 {\n getPropertiesList,\n JsonSchema,\n JsonSchemaObject,\n JsonSchemaType,\n stringifyValue\n} from \"@powerlines/schema\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport {\n SchemaContext,\n SchemaPropertyContext\n} from \"../../core/contexts/schema\";\nimport { ComponentProps } from \"../../types/components\";\nimport { TSDocObjectSchema, TSDocSchemaProperty } from \"./tsdoc-schema\";\n\nexport interface ObjectDeclarationProps extends VarDeclarationProps {\n schema?: JsonSchemaObject;\n}\n\n/**\n * Generates a TypeScript object for the given reflection class.\n */\nexport function ObjectDeclaration(props: ObjectDeclarationProps) {\n const { schema } = props;\n if (!schema) {\n return null;\n }\n\n const name = computed(() =>\n camelCase(isSetString(props.name) ? props.name : schema?.name)\n );\n\n const defaultValues = computed(() =>\n Object.fromEntries(\n getPropertiesList(schema).map(property => [\n property.name,\n property.default\n ]) || {}\n )\n );\n const properties = computed(() =>\n getPropertiesList(schema)\n .filter(\n property =>\n !property?.ignore &&\n !property?.runtime &&\n !isUndefined(\n defaultValues.value[property.name] ??\n property?.alias?.reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined(defaultValues.value[alias])\n ) {\n return defaultValues.value[alias];\n }\n\n return ret;\n }, undefined as any) ??\n property?.default\n )\n )\n .sort((a, b) =>\n (a?.readOnly && b?.readOnly) || (!a?.readOnly && !b?.readOnly)\n ? a.name.localeCompare(b.name)\n : a?.readOnly\n ? 1\n : -1\n )\n );\n\n const TypeSymbolSlot = createSymbolSlot();\n const ValueTypeSymbolSlot = createSymbolSlot();\n const sym = createValueSymbol(name.value || \"schema\", {\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={!!schema}>\n <SchemaContext.Provider value={schema}>\n <Show when={!!name.value && !!type}>\n <TSDocObjectSchema schema={schema} />\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 {property => (\n <ObjectDeclarationProperty\n name={property.name}\n schema={property}\n />\n )}\n </For>\n </ObjectExpression>\n )}\n </ValueTypeSymbolSlot>\n </CoreDeclaration>\n </Show>\n <hbr />\n </SchemaContext.Provider>\n </Show>\n );\n}\n\nexport interface ObjectDeclarationPropertyProps extends ComponentProps {\n name: string;\n required?: boolean;\n value?: unknown;\n schema: JsonSchema;\n}\n\n/**\n * Generates a TypeScript object property for the given reflection class.\n */\nexport function ObjectDeclarationProperty(\n props: ObjectDeclarationPropertyProps\n) {\n const [{ schema, name, value }, rest] = splitProps(props, [\n \"schema\",\n \"name\",\n \"value\"\n ]);\n\n return (\n <Show when={isSetString(name)}>\n <SchemaPropertyContext.Provider value={schema}>\n <TSDocSchemaProperty schema={schema} defaultValue={value} />\n <ObjectProperty\n name={name}\n value={stringifyValue(\n value,\n (schema as { type?: JsonSchemaType }).type\n )}\n {...rest}\n />\n <hbr />\n </SchemaPropertyContext.Provider>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA+BA,SAAe,kBAAA,OAAA;CACb,MAAA,EACA,WAC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OACN,IAAC,QAAM;QACN,OAAQ,eAAQ,OAAA,OAAA,IAAA;OACjB;MACF,GAAG,IAAA,CAAA;MAAA,gBAAmB,OAAA,CAAA,CAAA;KAAA;IACxB;GACF,CAAC;EACH;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"object-declaration.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"property-name.d.mts","names":[],"sources":["../../../src/typescript/components/property-name.tsx"],"mappings":";UAsBiB,iBAAA;EAAA;;;EAIf,IAAA;EAKO;AAST;;EATE,OAAO;AAAA;;;;;AAS4C;;iBAArC,YAAA,CAAa,KAAA,EAAO,iBAAiB,4BAAA,QAAA"}
1
+ {"version":3,"file":"property-name.d.mts","names":[],"sources":["../../../src/typescript/components/property-name.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"property-name.mjs","names":[],"sources":["../../../src/typescript/components/property-name.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { MemberDeclarationContext, memo, useContext } from \"@alloy-js/core\";\nimport { TSOutputSymbol } from \"@alloy-js/typescript\";\nimport { isValidJSIdentifier } from \"../helpers/utilities\";\n\nexport interface PropertyNameProps {\n /**\n * The name of the property.\n */\n name?: string;\n\n /**\n * Whether the property is a private property. If `true`, the property will be prefixed with `#`.\n */\n private?: boolean;\n}\n\n/**\n * A TypeScript property name for an interface, class, or object member.\n *\n * @remarks\n * If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.\n */\nexport function PropertyName(props: PropertyNameProps) {\n if (props.name) {\n return memo(() => {\n if (props.private) {\n return `#${props.name}`;\n }\n return quoteIfNeeded(props.name!);\n });\n } else {\n const declSymbol = useContext(MemberDeclarationContext) as TSOutputSymbol;\n if (!declSymbol) {\n return \"(no member declaration context)\";\n }\n\n if (declSymbol.isPrivateMemberSymbol) {\n return <>#{declSymbol.name}</>;\n } else {\n return <>{quoteIfNeeded(declSymbol.name)}</>;\n }\n }\n}\n\nfunction quoteIfNeeded(name: string) {\n if (isValidJSIdentifier(name)) {\n return name;\n } else {\n return `\"${name.replace(/\"/g, '\\\\\"')}\"`;\n }\n}\n"],"mappings":";;;;;;;;;;;AA4BA,SAAI,aAAA,OAAA;CACF,IAAG,MAAO,MACR,OAAA,aAAA;EACF,IAAQ,MAAE,SACZ,OAAA,IAAA,MAAA;EAEE,OAAA,cAAA,MAAA,IAAA;CACE,CAAC;MACJ;EACG,MAAA,aAAA,WAAA,wBAAA;EACD,IAAG,CAAG,YACP,OAAA;EAEE,IAAE,WAAY,uBACd,OAAO,CAAA,KAAQ,WAAG,WAAA,IAAA,CAAA;OAEhB,OAAE,CAAM,WAAW,cAAM,WAAA,IAAA,CAAA,CAAA;CAE7B;AACF;AACA,SAAS,cAAA,MAAA;CACP,IAAE,oBAAmB,IAAA,GACnB,OAAK;MAEL,OAAA,IAAA,KAAA,QAAA,MAAA,MAAA,EAAA;AAEJ"}
1
+ {"version":3,"file":"property-name.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"record-expression.d.mts","names":[],"sources":["../../../src/typescript/components/record-expression.tsx"],"mappings":";;;UAoBiB,qBAAA;EACf,WAAA,EAAa,QAAQ;AAAA;AAAA,iBAGP,gBAAA;EAAmB;AAAA,GAAe,qBAAA,GAAqB,QAAA"}
1
+ {"version":3,"file":"record-expression.d.mts","names":[],"sources":["../../../src/typescript/components/record-expression.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"record-expression.mjs","names":[],"sources":["../../../src/typescript/components/record-expression.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children, code } from \"@alloy-js/core\";\n\nexport interface RecordExpressionProps {\n elementType: Children;\n}\n\nexport function RecordExpression({ elementType }: RecordExpressionProps) {\n return code`\n Record<string, ${elementType}>\n `;\n}\n"],"mappings":";;;4BAoBA,eACE;CACF,OAAA,IAAA;;;AAGA"}
1
+ {"version":3,"file":"record-expression.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc-schema.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.tsx"],"mappings":";;;;UAiCiB,sBAAA,SAA+B,UAAU;EACxD,MAAA,EAAQ,UAAA;AAAA;;;;iBAMM,iBAAA,CAAkB,KAAA,EAAO,sBAAsB,4BAAA,QAAA;AAAA,UA8E9C,wBAAA,SAAiC,UAAU;EAC1D,MAAA,EAAQ,UAAA;EACR,YAAA;AAAA;AAhFF;;;AAAA,iBAsFgB,mBAAA,CAAoB,KAAA,EAAO,wBAAwB,4BAAA,QAAA"}
1
+ {"version":3,"file":"tsdoc-schema.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc-schema.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-schema.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n childrenArray,\n computed,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { getPrimarySchemaType, JsonSchema } from \"@powerlines/schema\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { TSDoc, TSDocAttributesTags, TSDocProps } from \"./tsdoc\";\n\nexport interface TSDocObjectSchemaProps extends TSDocProps {\n schema: JsonSchema;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocObjectSchema(props: TSDocObjectSchemaProps) {\n const [{ children, heading, schema }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"schema\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const title = computed(() => schema?.title || titleCase(schema?.name));\n const computedHeading = computed(\n () => heading || schema?.description || title.value\n );\n\n const alias = computed(() => schema?.alias);\n const tags = computed(() => schema?.tags);\n const readOnly = computed(() => schema?.readOnly);\n const internal = computed(() => schema?.internal);\n const runtime = computed(() => schema?.runtime);\n const ignore = computed(() => schema?.ignore);\n const hidden = computed(() => schema?.hidden);\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(tags.value) && tags.value.length > 0) ||\n !isUndefined(readOnly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(runtime.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType(schema)}\n title={title.value}\n alias={alias.value}\n tags={tags.value}\n readOnly={Boolean(readOnly.value)}\n internal={Boolean(internal.value)}\n runtime={Boolean(runtime.value)}\n ignore={Boolean(ignore.value)}\n hidden={Boolean(hidden.value)}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\nexport interface TSDocSchemaPropertyProps extends TSDocProps {\n schema: JsonSchema;\n defaultValue?: unknown;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocSchemaProperty(props: TSDocSchemaPropertyProps) {\n const [{ children, schema, defaultValue }, rest] = splitProps(props, [\n \"children\",\n \"schema\",\n \"defaultValue\"\n ]);\n\n if (!isSetObject(schema)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(schema?.title) ||\n (!isUndefined(schema?.alias) && schema?.alias.length > 0) ||\n (!isUndefined(schema?.tags) && schema?.tags.length > 0) ||\n !isUndefined(schema?.readOnly) ||\n !isUndefined(schema?.internal) ||\n !isUndefined(schema?.runtime) ||\n !isUndefined(schema?.ignore) ||\n !isUndefined(schema?.hidden) ||\n !isUndefined(defaultValue)\n );\n\n return (\n <TSDoc heading={schema?.description} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={getPrimarySchemaType(schema)}\n title={schema?.title}\n alias={schema?.alias}\n tags={schema?.tags}\n readOnly={schema?.readOnly}\n internal={schema?.internal}\n runtime={schema?.runtime}\n ignore={schema?.ignore}\n hidden={schema?.hidden}\n default={defaultValue}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n// export interface TSDocReflectionMethodProps extends TSDocProps {\n// reflection: ReflectionMethod;\n// }\n\n// /**\n// * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n// */\n// export function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n// const [{ children, reflection }, rest] = splitProps(props, [\n// \"children\",\n// \"reflection\"\n// ]);\n\n// if (!isSetObject(reflection)) {\n// return null;\n// }\n\n// const heading = computed(\n// () =>\n// reflection.getDescription() ||\n// (isString(reflection.getName())\n// ? code`${String(reflection.getName())} method definition`\n// : undefined)\n// );\n\n// return (\n// <TSDoc heading={heading.value} {...rest}>\n// <TSDocAttributesTags\n// title={reflection.getTitle()}\n// alias={reflection.getAlias()}\n// resourceId={reflection.getDomain()}\n// permission={reflection.getPermission()}\n// isReadonly={reflection.isReadonly()}\n// isInternal={reflection.isInternal()}\n// isRuntime={reflection.isRuntime()}\n// isIgnored={reflection.isIgnored()}\n// isHidden={reflection.isHidden()}\n// />\n// <Show\n// when={Boolean(children) && childrenArray(() => children).length > 0}>\n// <List>{childrenArray(() => children)}</List>\n// </Show>\n// <Show when={reflection.getParameters().length > 0}>\n// <Spacing />\n// <For each={reflection.getParameters()} hardline ender={<hbr />}>\n// {param => (\n// <TSDocParam\n// name={param.getName()}\n// optional={param.isOptional()}\n// defaultValue={\n// param.hasDefault() ? param.getDefaultValue() : undefined\n// }>\n// <Show\n// when={Boolean(param.parameter.description)}\n// fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n// {param.parameter.description}\n// </Show>\n// </TSDocParam>\n// )}\n// </For>\n// </Show>\n// <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n// <Spacing />\n// <TSDocReturns>\n// {code`The return value of the function, which is of type ${stringifyType(\n// reflection.getReturnType()\n// )}.`}\n// </TSDocReturns>\n// </Show>\n// </TSDoc>\n// );\n// }\n\n// /**\n// * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n// */\n// export function TSDocContextMethod(props: TSDocProps) {\n// const reflection = useReflectionMethod();\n\n// return (\n// <Show when={isSetObject(reflection)}>\n// <TSDocReflectionMethod {...props} reflection={reflection} />\n// </Show>\n// );\n// }\n"],"mappings":";;;;;;;;;;;;;;AA8BA,SAAgB,kBAAe,OAAK;CACpC,MAAQ,CAAC,YAET,SACE,UACF,QAAA,WAAA,OAAA;EAAA;EAAA;EAAA;CAAA,CAAA;2BAEE,OAAA;CAEA,MAAA,QAAA,eAAA,QAAA,SAAA,UAAA,QAAA,IAAA,CAAA;CACF,MAAO,kBAAS,eAAyB,WAAA,QAAA,eAAwB,MAAA,KAAA;CAC/D,MAAM,QAAG,eAAmB,QAAS,KAAK;CAC1C,MAAG,OAAQ,eAAA,QAAA,IAAA;CACX,MAAG,WAAS,eAAA,QAAA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ACf,OAAM,QAAA;KACT;KACC,IAAM,WAAA;MACN,OAAO,QAAQ;KACf;KACA,IAAM,UAAQ;MACd,OAAU,QAAQ;KAClB;KACA,IAAA,SAAe;MACf,OAAQ,QAAQ;KAChB;KACA,IAAA,SAAS;MACV,OAAA,QAAA;KACG;KACL,WAAA;IACC,CAAA;GACA;EACF,CAAC,GAAG,gBAAkB,MAAE;GACtB,IAAC,OAAA;IACA,OAAK,WAAM,CAAA,CAAA,CAAa,YAAO,QAAA,CAAA,EAAA,KAAA,oBAAA,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;GAChC;GACA,IAAE,WAAI;IACL,OAAM,CAAA,gBAAoB,MAAA;KACvB,IAAA,OAAA;MACD,OAAA,cAAA;KACR;KACH,IAAA,WAAA;;KAEU;IACL,CAAA,GAAA,gBAAY,MAAgB,EAC9B,IAAA,WAAA;;IAEE,EACC,CAAA,CAAA;GACD;EACF,CAAA,CAAA;CACC,EACF,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"tsdoc-schema.mjs","names":[],"sources":[],"mappings":""}
@@ -288,12 +288,7 @@ function TSDocAttributesTags(props) {
288
288
  return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(!(0, _stryke_type_checks_is_undefined.isUndefined)(alias) && alias.length > 0))() && alias.some((a) => (0, _stryke_type_checks_is_set_string.isSetString)(a?.trim()));
289
289
  },
290
290
  get children() {
291
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
292
- get each() {
293
- return alias?.filter((a) => (0, _stryke_type_checks_is_set_string.isSetString)(a?.trim())) ?? [];
294
- },
295
- children: (alias) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocAlias, { children: alias })
296
- });
291
+ return (alias?.filter((a) => (0, _stryke_type_checks_is_set_string.isSetString)(a?.trim())) ?? []).map((alias) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocAlias, { children: alias }));
297
292
  }
298
293
  }),
299
294
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
@@ -301,12 +296,7 @@ function TSDocAttributesTags(props) {
301
296
  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()));
302
297
  },
303
298
  get children() {
304
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
305
- get each() {
306
- return tags?.filter((g) => (0, _stryke_type_checks_is_set_string.isSetString)(g?.trim())) ?? [];
307
- },
308
- children: (tag) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocGroup, { children: tag })
309
- });
299
+ return (tags?.filter((g) => (0, _stryke_type_checks_is_set_string.isSetString)(g?.trim())) ?? []).map((tag) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocGroup, { children: tag }));
310
300
  }
311
301
  }),
312
302
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
@@ -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,QAAA;AAlDhD;;;AAAA,iBA+DgB,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAajC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QA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A,GAAc,QAAA;AAAA,UAIhC,gBAAA,SAAyB,cAAc;EA/OT;;;;;AAAA;AAI/C;;;;AAMK;AAML;;EA6OE,MAAA;EA7OmD;;;;;AAAA;AA4BrD;;;;AAA6B;EA8N3B,IAAA,EAAM,QAAA;AAAA;;;AAvNqB;iBA6Nb,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
1
+ {"version":3,"file":"tsdoc.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":""}
@@ -287,12 +287,7 @@ function TSDocAttributesTags(props) {
287
287
  return memo(() => !!(!isUndefined(alias) && alias.length > 0))() && alias.some((a) => isSetString(a?.trim()));
288
288
  },
289
289
  get children() {
290
- return createComponent(For, {
291
- get each() {
292
- return alias?.filter((a) => isSetString(a?.trim())) ?? [];
293
- },
294
- children: (alias) => createComponent(TSDocAlias, { children: alias })
295
- });
290
+ return (alias?.filter((a) => isSetString(a?.trim())) ?? []).map((alias) => createComponent(TSDocAlias, { children: alias }));
296
291
  }
297
292
  }),
298
293
  createComponent(Show, {
@@ -300,12 +295,7 @@ function TSDocAttributesTags(props) {
300
295
  return memo(() => !!(!isUndefined(tags) && tags.length > 0))() && tags.some((g) => isSetString(g?.trim()));
301
296
  },
302
297
  get children() {
303
- return createComponent(For, {
304
- get each() {
305
- return tags?.filter((g) => isSetString(g?.trim())) ?? [];
306
- },
307
- children: (tag) => createComponent(TSDocGroup, { children: tag })
308
- });
298
+ return (tags?.filter((g) => isSetString(g?.trim())) ?? []).map((tag) => createComponent(TSDocGroup, { children: tag }));
309
299
  }
310
300
  }),
311
301
  createComponent(Show, {
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport type { JsonSchemaPrimitiveType } from \"@powerlines/schema\";\nimport { stringifyValue } from \"@powerlines/schema\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@group` tag.\n */\nexport function TSDocGroup(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"group\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type?: JsonSchemaPrimitiveType | string;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyValue(defaultValue, type)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={false} softline={true}>\n {childrenArray(() => props.children)}\n </List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\n/**\n * Create a TSDoc `@runtime` tag.\n */\nexport function TSDocRuntime() {\n return <TSDocTag tag=\"runtime\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: JsonSchemaPrimitiveType | string;\n default?: any;\n title?: string;\n alias?: string[];\n tags?: string[];\n readOnly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n runtime?: boolean;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n tags,\n readOnly,\n internal,\n ignore,\n hidden,\n runtime,\n default: defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"tags\",\n \"readOnly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"runtime\",\n \"default\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show\n when={\n !isUndefined(tags) &&\n tags.length > 0 &&\n tags.some(g => isSetString(g?.trim()))\n }>\n <For each={tags?.filter(g => isSetString(g?.trim())) ?? []}>\n {tag => <TSDocGroup>{tag}</TSDocGroup>}\n </For>\n </Show>\n <Show when={readOnly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={runtime === true}>\n <TSDocRuntime />\n </Show>\n <Show\n when={\n runtime !== true && !isUndefined(type) && !isUndefined(defaultValue)\n }>\n <TSDocDefaultValue type={type} defaultValue={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n default?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n default={props.default}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n default?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.default)}>={props.default}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework?.name || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,SAAc,MAAA,OAAA;CACd,MAAQ,CAAC,EACT,UACA,aACO,WAAW,OAAO,CAAC,YAAU,SAAW,CAAA;CAC/C,OAAS;EAAA;EAAA,gBAA0B,SAAM;GACzC,QAAY;;IAEN,OAAC;KAAA,gBAAqB,OAAQ,CAAA,CAAA;KAAA,gBAAe,MAAA;MACjD,IAAU,OAAA;OACZ,OAAA,CAAA,YAAA,OAAA;;MAEE,UAAA;KACC,CAAA;KAAA,gBAAuB,MAAA;MACxB,IAAA,OAAA;OACK,OAAS,WAAa,CAAA,CAAA,CAAA,YAAY,QAAA,CAAA,EAAA,KAAA,oBAAA,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;MACjC;;OAEC,OAAA,CAAA,gBAAA,MAAA;QACJ,IAAA,OAAA;SACG,OAAA,CAAA,YAAA,OAAA;QACI;QACA,IAAE,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,YAAqB,KAAC,CAAA;CACrC,OAAK;EAAA,IAAM,IAAA;EAAA,gBAAA,MAAA;GACb,IAAA,OAAA;;GAEE;GACC,IAAA,WAAgB;IACjB,OAAA,gB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;KAAA;IAAA;GACF;EACF,CAAC;EAAA,gBAAA,OAAA,CAAA,CAAA;EAAA;CAAA;AACH"}
1
+ {"version":3,"file":"tsdoc.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"type-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/type-declaration.tsx"],"mappings":";;;UA4BiB,oBAAA,SAA6B,sBAAsB;;AAApE;;EAIE,cAAA,GAAiB,uBAAA;AAAA;;;;cAMN,eAAA,2BAAe,SAAA,CAAA,oBAAA"}
1
+ {"version":3,"file":"type-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/type-declaration.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"type-declaration.mjs","names":[],"sources":["../../../src/typescript/components/type-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Name, Show } from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TypeParameterDescriptor\n} from \"@alloy-js/typescript\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface TypeDeclarationProps extends CommonDeclarationProps {\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.\n */\nexport const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(\n props: TypeDeclarationProps\n) {\n const { children, doc, typeParameters, ...rest } = props;\n\n return (\n <>\n <Show when={Boolean(doc)}>\n <TSDoc heading={doc} />\n </Show>\n <Declaration {...rest} kind=\"type\" nameKind=\"type\">\n type <Name />\n {typeParameters && (\n <TypeParameters parameters={typeParameters} />\n )} = {children};\n </Declaration>\n </>\n );\n});\n"],"mappings":";;;;;;;;;;AA0BA,MAAS,kBAAsB,qBAAmB,SAAA,gBAAA,OAAA;SAElD,UACI,KACA,gBACA,GAAA,SACF;CACF,OAAA,CAAA,gBAAA,MAAA;;GAEE,OAAA,QAAA,GAAA;EACC;EACD,IAAA,WAAA;GACI,OAAO,gBAAkB,OAAA,EACvB,SAAC,IACP,CAAA;EACA;;EAEA,MAAO;EACL,UAAC;EACD,IAAG,WAAW;GACZ,OAAG;IAAK;IAAS,gBAAO,MAAA,CAAA,CAAA;IAAA,WAAA,kBAAA,gBAAA,gBAAA,EACtB,YAAI,eACN,CAAC,CAAA;IAAA;IAAW;IAAU;GAAC;EACzB;CACF,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"type-declaration.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"type-parameters.d.mts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"mappings":";;;;;UAsBiB,mBAAA;EAAA;EAEf,UAAA,GAAa,uBAAA;;EAEb,QAAA,GAAW,QAAQ;AAAA;;;;;AAAA;AAqCrB;;;iBAAgB,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA"}
1
+ {"version":3,"file":"type-parameters.d.mts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"type-parameters.mjs","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":";;;;;;AAwBA,SAAE,cAAa,OAAA;CACb,OAAO,gBAAW,MAAA;EAClB,MAAQ,OAAG,UAAQ;EACrB,IAAA,WAAA;;EAEA;EACE,IAAM,WAAC;GACJ,OAAK,CAAI,gBAAkB,SAAS,EAClC,IAAK,WAAA;IACF,OAAM;KAAE,WAAC,MAAA,IAAA;KAAyB,gBAAI,MAAA;MACvC,IAAK,OAAS;OACT,OAAA,CAAA,CAAA,MAAA;MACJ;MACC,IAAA,WAAM;OACH,OAAE;QAAA;QAAA;QAAA,gBAAA,UAAA,EACH,IAAA,WAAc;SACX,OAAS,CAAA,KAAA,gBAAwB,gBAAQ,EAC3C,IAAA,WAAc;UACV,OAAA,MAAA;SACJ,EACI,CAAC,CAAC;QACJ,EACL,CAAA;OAAA;MACC;KACF,CAAC;KAAC,gBAAc,MAAA;MAChB,IAAI,OAAA;OACA,OAAI,CAAA,CAAA,MAAA;MACR;MACP,IAAA,WAAA;OACH,OAAA,CAAA,OAAA,gBAAA,gBAAA;QAEE,OAAA,MAAA;OACW,EACZ,CAAA,CAAA;MACG;KACE,CAAA;IAAA;GACE,EACH,CAAA,GAAA,GAAA;EACH;CACF,CAAA;AACA;;;;;;;;;AAUA,SAAU,eAAA,OAAA;CACR,IAAI,MAAM,UACR,OAAK,MAAO;CAEd,IAAI,CAAC,MAAM,YACT;CAEF,OAAO;EAAC;EAAA,gBAAM,SAAA,EACZ,IAAI,WAAK;GACP,OAAI,gBAAA,QAAA;IACJ,UAAA;IACH,IAAA,WAAA;KACH,OAAA,CAAA,gBAAA,KAAA"}
1
+ {"version":3,"file":"type-parameters.mjs","names":[],"sources":[],"mappings":""}