@powerlines/plugin-crypto 0.10.106 → 0.10.108

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 (184) hide show
  1. package/dist/index-BgAdqTbb.d.mts +1 -0
  2. package/dist/index-CEgs-Dz2.d.cts +1 -0
  3. package/dist/index.cjs +12056 -8
  4. package/dist/index.d.cts +12 -4
  5. package/dist/index.d.mts +12 -5
  6. package/dist/index.mjs +12018 -3
  7. package/dist/plugin-C3MaN5jp.mjs +1 -0
  8. package/dist/plugin-DHXHjv16.cjs +0 -0
  9. package/dist/plugin-Dhgjf-aI.d.mts +4441 -0
  10. package/dist/plugin-Dw1wCT6b.d.cts +4438 -0
  11. package/dist/types/index.cjs +2 -0
  12. package/dist/types/index.d.cts +2 -1
  13. package/dist/types/index.d.mts +2 -1
  14. package/dist/types/index.mjs +3 -0
  15. package/dist/types/plugin.cjs +1 -0
  16. package/dist/types/plugin.d.cts +1 -41
  17. package/dist/types/plugin.d.mts +1 -41
  18. package/dist/types/plugin.mjs +2 -0
  19. package/dist/types-CTUnla4x.mjs +1 -0
  20. package/dist/types-DHkg7xmX.cjs +0 -0
  21. package/package.json +5 -5
  22. package/dist/_virtual/rolldown_runtime.cjs +0 -37
  23. package/dist/_virtual/rolldown_runtime.mjs +0 -29
  24. package/dist/components/crypto.cjs +0 -147
  25. package/dist/components/crypto.d.cts +0 -13
  26. package/dist/components/crypto.d.mts +0 -13
  27. package/dist/components/crypto.mjs +0 -147
  28. package/dist/components/index.cjs +0 -1
  29. package/dist/components/index.d.mts +0 -1
  30. package/dist/components/index.mjs +0 -3
  31. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  32. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  33. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  34. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  35. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  36. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  37. package/dist/deepkit/src/capnp.cjs +0 -913
  38. package/dist/deepkit/src/capnp.mjs +0 -911
  39. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  40. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  41. package/dist/deepkit/src/reflect-type.cjs +0 -22
  42. package/dist/deepkit/src/reflect-type.mjs +0 -20
  43. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  44. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  45. package/dist/deepkit/src/transformer.cjs +0 -52
  46. package/dist/deepkit/src/transformer.mjs +0 -49
  47. package/dist/deepkit/src/transpile.cjs +0 -29
  48. package/dist/deepkit/src/transpile.mjs +0 -27
  49. package/dist/deepkit/src/types.d.cts +0 -10
  50. package/dist/deepkit/src/types.d.mts +0 -10
  51. package/dist/deepkit/src/utilities.cjs +0 -66
  52. package/dist/deepkit/src/utilities.mjs +0 -65
  53. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -38
  54. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -19
  55. package/dist/deepkit/src/vendor/type.cjs +0 -20
  56. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  57. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  58. package/dist/deepkit/src/vendor/type.mjs +0 -11
  59. package/dist/plugin-alloy/src/core/components/output.cjs +0 -38
  60. package/dist/plugin-alloy/src/core/components/output.mjs +0 -37
  61. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -20
  62. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -19
  63. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -60
  64. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -58
  65. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
  66. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
  67. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  68. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  69. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  70. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  71. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  72. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  73. package/dist/plugin-alloy/src/index.cjs +0 -90
  74. package/dist/plugin-alloy/src/index.mjs +0 -88
  75. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -7
  76. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -9
  77. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -5
  78. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -7
  79. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -17
  80. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  81. package/dist/plugin-alloy/src/types/components.d.mts +0 -4
  82. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  83. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -37
  84. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -37
  85. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -47
  86. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -46
  87. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -75
  88. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -73
  89. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -359
  90. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -350
  91. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -143
  92. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -140
  93. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -53
  94. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -52
  95. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -94
  96. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -93
  97. package/dist/plugin-automd/src/index.cjs +0 -101
  98. package/dist/plugin-automd/src/index.mjs +0 -98
  99. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  100. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  101. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  102. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  103. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  104. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  105. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  106. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  107. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  108. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  109. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  110. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  111. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  112. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  113. package/dist/plugin-babel/src/helpers/options.cjs +0 -50
  114. package/dist/plugin-babel/src/helpers/options.mjs +0 -47
  115. package/dist/plugin-babel/src/index.cjs +0 -91
  116. package/dist/plugin-babel/src/index.mjs +0 -89
  117. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  118. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  119. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  120. package/dist/plugin-env/src/babel/index.cjs +0 -1
  121. package/dist/plugin-env/src/babel/index.mjs +0 -3
  122. package/dist/plugin-env/src/babel/plugin.cjs +0 -121
  123. package/dist/plugin-env/src/babel/plugin.mjs +0 -119
  124. package/dist/plugin-env/src/components/docs.cjs +0 -9
  125. package/dist/plugin-env/src/components/docs.mjs +0 -11
  126. package/dist/plugin-env/src/components/env.cjs +0 -487
  127. package/dist/plugin-env/src/components/env.mjs +0 -484
  128. package/dist/plugin-env/src/components/index.cjs +0 -2
  129. package/dist/plugin-env/src/components/index.mjs +0 -4
  130. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  131. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  132. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  133. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  134. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  135. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  136. package/dist/plugin-env/src/helpers/load.cjs +0 -83
  137. package/dist/plugin-env/src/helpers/load.mjs +0 -80
  138. package/dist/plugin-env/src/helpers/persistence.cjs +0 -200
  139. package/dist/plugin-env/src/helpers/persistence.mjs +0 -189
  140. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  141. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  142. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  143. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  144. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  145. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  146. package/dist/plugin-env/src/index.cjs +0 -172
  147. package/dist/plugin-env/src/index.mjs +0 -170
  148. package/dist/plugin-env/src/types/plugin.d.cts +0 -151
  149. package/dist/plugin-env/src/types/plugin.d.mts +0 -153
  150. package/dist/plugin-env/src/types/runtime.d.cts +0 -792
  151. package/dist/plugin-env/src/types/runtime.d.mts +0 -792
  152. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
  153. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
  154. package/dist/powerlines/src/lib/entry.cjs +0 -12
  155. package/dist/powerlines/src/lib/entry.mjs +0 -14
  156. package/dist/powerlines/src/lib/logger.cjs +0 -41
  157. package/dist/powerlines/src/lib/logger.mjs +0 -39
  158. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
  159. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
  160. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
  161. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
  162. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
  163. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
  164. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  165. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  166. package/dist/powerlines/src/types/babel.d.cts +0 -22
  167. package/dist/powerlines/src/types/babel.d.mts +0 -22
  168. package/dist/powerlines/src/types/build.d.cts +0 -145
  169. package/dist/powerlines/src/types/build.d.mts +0 -147
  170. package/dist/powerlines/src/types/commands.d.cts +0 -8
  171. package/dist/powerlines/src/types/commands.d.mts +0 -9
  172. package/dist/powerlines/src/types/config.d.cts +0 -380
  173. package/dist/powerlines/src/types/config.d.mts +0 -381
  174. package/dist/powerlines/src/types/context.d.cts +0 -414
  175. package/dist/powerlines/src/types/context.d.mts +0 -416
  176. package/dist/powerlines/src/types/fs.d.cts +0 -486
  177. package/dist/powerlines/src/types/fs.d.mts +0 -486
  178. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  179. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  180. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  181. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  182. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  183. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  184. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
@@ -1,143 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../../core/contexts/context.cjs');
3
- const require_single_line_comment = require('../../core/components/single-line-comment.cjs');
4
- const require_source_file = require('../../core/components/source-file.cjs');
5
- let __alloy_js_core = require("@alloy-js/core");
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
- let __stryke_path_append = require("@stryke/path/append");
8
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
10
- let __alloy_js_typescript = require("@alloy-js/typescript");
11
- let __stryke_type_checks_is_boolean = require("@stryke/type-checks/is-boolean");
12
-
13
- //#region ../plugin-alloy/src/typescript/components/typescript-file.tsx
14
- /**
15
- * A base component representing a Powerlines generated Typescript source file.
16
- *
17
- * @param props - The properties for the source file.
18
- * @returns The rendered source file component.
19
- */
20
- function TypescriptFile(props) {
21
- const [{ children, path, imports, tsx, header, hashbang }, rest] = (0, __alloy_js_core.splitProps)(props, [
22
- "children",
23
- "path",
24
- "imports",
25
- "tsx",
26
- "header",
27
- "hashbang"
28
- ]);
29
- const directoryContext = (0, __alloy_js_core.useContext)(__alloy_js_core.SourceDirectoryContext);
30
- const sdData = (0, __alloy_js_typescript.getSourceDirectoryData)(directoryContext);
31
- const modulePath = (0, __stryke_path_append.appendPath)(path, directoryContext.path);
32
- const scope = new __alloy_js_typescript.TSModuleScope(modulePath, (0, __alloy_js_core.useScope)());
33
- sdData.modules.add(scope);
34
- const pkg = (0, __alloy_js_core.useContext)(__alloy_js_typescript.PackageContext);
35
- if (pkg) pkg.scope.addModule(scope);
36
- if (props.export) {
37
- if (pkg) if ((0, __stryke_type_checks_is_boolean.isBoolean)(props.export)) pkg.scope.addExport(modulePath, scope);
38
- else pkg.scope.addExport(props.export, scope);
39
- }
40
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_typescript.SourceFileContext.Provider, {
41
- value: { scope },
42
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Scope, {
43
- value: scope,
44
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_source_file.SourceFile, {
45
- ...rest,
46
- path: modulePath,
47
- header: header ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TypescriptFileHeader, {
48
- hashbang,
49
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TypescriptFileHeaderImports, {
50
- imports,
51
- scope
52
- })
53
- }),
54
- filetype: tsx ? "tsx" : "typescript",
55
- children
56
- })
57
- })
58
- });
59
- }
60
- /**
61
- * Renders the header for a Powerlines Typescript source file.
62
- *
63
- * @param props - The properties for the source file header.
64
- * @returns The rendered source file header.
65
- */
66
- function TypescriptFileHeader(props) {
67
- const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
68
- const context = require_context.usePowerlines();
69
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
70
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
71
- when: Boolean(hashbang),
72
- children: [hashbang === true ? __alloy_js_core.code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})]
73
- }),
74
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
75
- when: Boolean(header),
76
- children: [header, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})]
77
- }),
78
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
79
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
80
- when: Boolean(disableEslint),
81
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, {
82
- variant: "slash-star",
83
- children: "eslint-disable"
84
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})]
85
- }),
86
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
87
- when: Boolean(disablePrettier),
88
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, {
89
- variant: "slash-star",
90
- children: "prettier-ignore"
91
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})]
92
- }),
93
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
94
- when: Boolean(disableBiome),
95
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, { children: "biome-ignore lint: disable" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})]
96
- }),
97
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
98
- when: Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome),
99
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
100
- }),
101
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
102
- when: Boolean(children),
103
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})] })
104
- }),
105
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, { children: __alloy_js_core.code`Generated by ${(0, __stryke_string_format_title_case.titleCase)(context?.config.framework) || "Powerlines"}` }),
106
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
107
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, { children: __alloy_js_core.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command` }),
108
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
109
- ] });
110
- }
111
- /**
112
- * Renders the header for a Powerlines Typescript source file.
113
- *
114
- * @param props - The properties for the source file header.
115
- * @returns The rendered source file header.
116
- */
117
- function TypescriptFileHeaderImports(props) {
118
- const { imports } = props;
119
- const context = require_context.usePowerlines();
120
- const sourceFile = (0, __alloy_js_typescript.useSourceFile)();
121
- const scope = props.scope ?? sourceFile.scope;
122
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
123
- when: scope.importedModules.size > 0 || !!imports && Object.keys(imports).length > 0,
124
- children: [
125
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
126
- when: !!imports && Object.keys(imports).length > 0,
127
- children: Object.entries(imports ?? {}).filter(([key]) => key !== "$builtins").concat(imports && imports.$builtins ? Object.entries(imports.$builtins).map(([key, entry]) => [key.includes(":") ? key : `${context.config.output.builtinPrefix}:${key}`, entry]) : []).map(([module$1, imported]) => {
128
- return __alloy_js_core.code`import ${imported === null ? "" : imported.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (imported.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && imported.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (imported.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${imported.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} from "${module$1}";`;
129
- })
130
- }),
131
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
132
- when: scope.importedModules.size > 0,
133
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_typescript.ImportStatements, { records: scope.importedModules })
134
- }),
135
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
136
- ]
137
- });
138
- }
139
-
140
- //#endregion
141
- exports.TypescriptFile = TypescriptFile;
142
- exports.TypescriptFileHeader = TypescriptFileHeader;
143
- exports.TypescriptFileHeaderImports = TypescriptFileHeaderImports;
@@ -1,140 +0,0 @@
1
- import { usePowerlines } from "../../core/contexts/context.mjs";
2
- import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
3
- import { SourceFile } from "../../core/components/source-file.mjs";
4
- import { Scope, Show, SourceDirectoryContext, code, splitProps, useContext, useScope } from "@alloy-js/core";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { appendPath } from "@stryke/path/append";
7
- import { titleCase } from "@stryke/string-format/title-case";
8
- import { isString } from "@stryke/type-checks/is-string";
9
- import { ImportStatements, PackageContext, SourceFileContext as SourceFileContext$1, TSModuleScope, getSourceDirectoryData, useSourceFile } from "@alloy-js/typescript";
10
- import { isBoolean } from "@stryke/type-checks/is-boolean";
11
-
12
- //#region ../plugin-alloy/src/typescript/components/typescript-file.tsx
13
- /**
14
- * A base component representing a Powerlines generated Typescript source file.
15
- *
16
- * @param props - The properties for the source file.
17
- * @returns The rendered source file component.
18
- */
19
- function TypescriptFile(props) {
20
- const [{ children, path, imports, tsx, header, hashbang }, rest] = splitProps(props, [
21
- "children",
22
- "path",
23
- "imports",
24
- "tsx",
25
- "header",
26
- "hashbang"
27
- ]);
28
- const directoryContext = useContext(SourceDirectoryContext);
29
- const sdData = getSourceDirectoryData(directoryContext);
30
- const modulePath = appendPath(path, directoryContext.path);
31
- const scope = new TSModuleScope(modulePath, useScope());
32
- sdData.modules.add(scope);
33
- const pkg = useContext(PackageContext);
34
- if (pkg) pkg.scope.addModule(scope);
35
- if (props.export) {
36
- if (pkg) if (isBoolean(props.export)) pkg.scope.addExport(modulePath, scope);
37
- else pkg.scope.addExport(props.export, scope);
38
- }
39
- return /* @__PURE__ */ jsx(SourceFileContext$1.Provider, {
40
- value: { scope },
41
- children: /* @__PURE__ */ jsx(Scope, {
42
- value: scope,
43
- children: /* @__PURE__ */ jsx(SourceFile, {
44
- ...rest,
45
- path: modulePath,
46
- header: header ?? /* @__PURE__ */ jsx(TypescriptFileHeader, {
47
- hashbang,
48
- children: /* @__PURE__ */ jsx(TypescriptFileHeaderImports, {
49
- imports,
50
- scope
51
- })
52
- }),
53
- filetype: tsx ? "tsx" : "typescript",
54
- children
55
- })
56
- })
57
- });
58
- }
59
- /**
60
- * Renders the header for a Powerlines Typescript source file.
61
- *
62
- * @param props - The properties for the source file header.
63
- * @returns The rendered source file header.
64
- */
65
- function TypescriptFileHeader(props) {
66
- const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
67
- const context = usePowerlines();
68
- return /* @__PURE__ */ jsxs(Fragment, { children: [
69
- /* @__PURE__ */ jsxs(Show, {
70
- when: Boolean(hashbang),
71
- children: [hashbang === true ? code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang, /* @__PURE__ */ jsx("hbr", {})]
72
- }),
73
- /* @__PURE__ */ jsxs(Show, {
74
- when: Boolean(header),
75
- children: [header, /* @__PURE__ */ jsx("hbr", {})]
76
- }),
77
- /* @__PURE__ */ jsx("hbr", {}),
78
- /* @__PURE__ */ jsxs(Show, {
79
- when: Boolean(disableEslint),
80
- children: [/* @__PURE__ */ jsx(SingleLineComment, {
81
- variant: "slash-star",
82
- children: "eslint-disable"
83
- }), /* @__PURE__ */ jsx("hbr", {})]
84
- }),
85
- /* @__PURE__ */ jsxs(Show, {
86
- when: Boolean(disablePrettier),
87
- children: [/* @__PURE__ */ jsx(SingleLineComment, {
88
- variant: "slash-star",
89
- children: "prettier-ignore"
90
- }), /* @__PURE__ */ jsx("hbr", {})]
91
- }),
92
- /* @__PURE__ */ jsxs(Show, {
93
- when: Boolean(disableBiome),
94
- children: [/* @__PURE__ */ jsx(SingleLineComment, { children: "biome-ignore lint: disable" }), /* @__PURE__ */ jsx("hbr", {})]
95
- }),
96
- /* @__PURE__ */ jsx(Show, {
97
- when: Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome),
98
- children: /* @__PURE__ */ jsx("hbr", {})
99
- }),
100
- /* @__PURE__ */ jsx(Show, {
101
- when: Boolean(children),
102
- children: /* @__PURE__ */ jsxs(Fragment, { children: [children, /* @__PURE__ */ jsx("hbr", {})] })
103
- }),
104
- /* @__PURE__ */ jsx(SingleLineComment, { children: code`Generated by ${titleCase(context?.config.framework) || "Powerlines"}` }),
105
- /* @__PURE__ */ jsx("hbr", {}),
106
- /* @__PURE__ */ jsx(SingleLineComment, { children: code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command` }),
107
- /* @__PURE__ */ jsx("hbr", {})
108
- ] });
109
- }
110
- /**
111
- * Renders the header for a Powerlines Typescript source file.
112
- *
113
- * @param props - The properties for the source file header.
114
- * @returns The rendered source file header.
115
- */
116
- function TypescriptFileHeaderImports(props) {
117
- const { imports } = props;
118
- const context = usePowerlines();
119
- const sourceFile = useSourceFile();
120
- const scope = props.scope ?? sourceFile.scope;
121
- return /* @__PURE__ */ jsxs(Show, {
122
- when: scope.importedModules.size > 0 || !!imports && Object.keys(imports).length > 0,
123
- children: [
124
- /* @__PURE__ */ jsx(Show, {
125
- when: !!imports && Object.keys(imports).length > 0,
126
- children: Object.entries(imports ?? {}).filter(([key]) => key !== "$builtins").concat(imports && imports.$builtins ? Object.entries(imports.$builtins).map(([key, entry]) => [key.includes(":") ? key : `${context.config.output.builtinPrefix}:${key}`, entry]) : []).map(([module, imported]) => {
127
- return code`import ${imported === null ? "" : imported.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (imported.filter((i) => !isString(i) && i.default).length > 0 && imported.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (imported.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${imported.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} from "${module}";`;
128
- })
129
- }),
130
- /* @__PURE__ */ jsx(Show, {
131
- when: scope.importedModules.size > 0,
132
- children: /* @__PURE__ */ jsx(ImportStatements, { records: scope.importedModules })
133
- }),
134
- /* @__PURE__ */ jsx("hbr", {})
135
- ]
136
- });
137
- }
138
-
139
- //#endregion
140
- export { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports };
@@ -1,53 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_type = require('../../../../deepkit/src/vendor/type.cjs');
3
- const require_reflection = require('../../core/contexts/reflection.cjs');
4
- const require_tsdoc_reflection = require('./tsdoc-reflection.cjs');
5
- let __alloy_js_core = require("@alloy-js/core");
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
8
- let __alloy_js_typescript = require("@alloy-js/typescript");
9
- let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
10
-
11
- //#region ../plugin-alloy/src/typescript/components/typescript-interface.tsx
12
- /**
13
- * Generates a TypeScript interface for the given reflection class.
14
- */
15
- function TypeScriptInterface(props) {
16
- const [{ name, reflection }, rest] = (0, __alloy_js_core.splitProps)(props, ["name", "reflection"]);
17
- const interfaceName = (0, __alloy_js_core.computed)(() => (0, __stryke_string_format_pascal_case.pascalCase)(((0, __stryke_type_checks_is_string.isString)(name) ? name : name.toString()) || reflection.getName()));
18
- const properties = reflection.getProperties().filter((item) => !item.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1);
19
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_reflection.ReflectionClassContext.Provider, {
20
- value: { reflection },
21
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc_reflection.TSDocReflectionClass, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_typescript.InterfaceDeclaration, {
22
- export: true,
23
- name: interfaceName.value,
24
- ...rest,
25
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
26
- each: properties,
27
- doubleHardline: true,
28
- semicolon: true,
29
- children: (prop) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TypescriptInterfaceProperty, { property: prop })
30
- })
31
- })]
32
- });
33
- }
34
- /**
35
- * Generates a TypeScript interface property for the given reflection class.
36
- */
37
- function TypescriptInterfaceProperty(props) {
38
- const [{ property }, rest] = (0, __alloy_js_core.splitProps)(props, ["property"]);
39
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_reflection.ReflectionPropertyContext.Provider, {
40
- value: property,
41
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc_reflection.TSDocReflectionProperty, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_typescript.InterfaceMember, {
42
- name: property.getNameAsString(),
43
- readonly: property.isReadonly(),
44
- optional: property.isOptional(),
45
- nullish: property.isNullable(),
46
- type: (0, require_type.type_exports.stringifyType)(property.getType()),
47
- ...rest
48
- })]
49
- });
50
- }
51
-
52
- //#endregion
53
- exports.TypeScriptInterface = TypeScriptInterface;
@@ -1,52 +0,0 @@
1
- import { type_exports } from "../../../../deepkit/src/vendor/type.mjs";
2
- import { ReflectionClassContext, ReflectionPropertyContext } from "../../core/contexts/reflection.mjs";
3
- import { TSDocReflectionClass, TSDocReflectionProperty } from "./tsdoc-reflection.mjs";
4
- import { For, computed, splitProps } from "@alloy-js/core";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import { isString } from "@stryke/type-checks/is-string";
7
- import { InterfaceDeclaration, InterfaceMember } from "@alloy-js/typescript";
8
- import { pascalCase } from "@stryke/string-format/pascal-case";
9
-
10
- //#region ../plugin-alloy/src/typescript/components/typescript-interface.tsx
11
- /**
12
- * Generates a TypeScript interface for the given reflection class.
13
- */
14
- function TypeScriptInterface(props) {
15
- const [{ name, reflection }, rest] = splitProps(props, ["name", "reflection"]);
16
- const interfaceName = computed(() => pascalCase((isString(name) ? name : name.toString()) || reflection.getName()));
17
- const properties = reflection.getProperties().filter((item) => !item.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1);
18
- return /* @__PURE__ */ jsxs(ReflectionClassContext.Provider, {
19
- value: { reflection },
20
- children: [/* @__PURE__ */ jsx(TSDocReflectionClass, {}), /* @__PURE__ */ jsx(InterfaceDeclaration, {
21
- export: true,
22
- name: interfaceName.value,
23
- ...rest,
24
- children: /* @__PURE__ */ jsx(For, {
25
- each: properties,
26
- doubleHardline: true,
27
- semicolon: true,
28
- children: (prop) => /* @__PURE__ */ jsx(TypescriptInterfaceProperty, { property: prop })
29
- })
30
- })]
31
- });
32
- }
33
- /**
34
- * Generates a TypeScript interface property for the given reflection class.
35
- */
36
- function TypescriptInterfaceProperty(props) {
37
- const [{ property }, rest] = splitProps(props, ["property"]);
38
- return /* @__PURE__ */ jsxs(ReflectionPropertyContext.Provider, {
39
- value: property,
40
- children: [/* @__PURE__ */ jsx(TSDocReflectionProperty, {}), /* @__PURE__ */ jsx(InterfaceMember, {
41
- name: property.getNameAsString(),
42
- readonly: property.isReadonly(),
43
- optional: property.isOptional(),
44
- nullish: property.isNullable(),
45
- type: (0, type_exports.stringifyType)(property.getType()),
46
- ...rest
47
- })]
48
- });
49
- }
50
-
51
- //#endregion
52
- export { TypeScriptInterface };
@@ -1,94 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_utilities = require('../../../../deepkit/src/utilities.cjs');
3
- const require_reflection = require('../../core/contexts/reflection.cjs');
4
- const require_tsdoc_reflection = require('./tsdoc-reflection.cjs');
5
- let __alloy_js_core = require("@alloy-js/core");
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
8
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
9
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
10
- let __alloy_js_typescript = require("@alloy-js/typescript");
11
- let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
12
-
13
- //#region ../plugin-alloy/src/typescript/components/typescript-object.tsx
14
- /**
15
- * Generates a TypeScript object for the given reflection class.
16
- */
17
- function TypescriptObject(props) {
18
- if (!props.reflection?.value) return null;
19
- const objectName = (0, __alloy_js_core.computed)(() => (0, __stryke_string_format_camel_case.camelCase)(((0, __stryke_type_checks_is_string.isString)(props.name) ? props.name : props.name.toString()) || props.reflection.value.getName()));
20
- const objectType = (0, __alloy_js_core.computed)(() => props.type || (0, __stryke_string_format_pascal_case.pascalCase)(props.reflection.value.getName()));
21
- const properties = (0, __alloy_js_core.computed)(() => props.reflection.value.getProperties().filter((item) => !item.isIgnored() && !(0, __stryke_type_checks_is_undefined.isUndefined)(props.defaultValue?.value?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
22
- if ((0, __stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, __stryke_type_checks_is_undefined.isUndefined)(props.defaultValue?.value?.[alias])) return props.defaultValue?.value?.[alias];
23
- return ret;
24
- }, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1));
25
- const TypeSymbolSlot = (0, __alloy_js_core.createSymbolSlot)();
26
- const ValueTypeSymbolSlot = (0, __alloy_js_core.createSymbolSlot)();
27
- const sym = (0, __alloy_js_typescript.createValueSymbol)(props.name, {
28
- refkeys: props.refkey,
29
- default: props.default,
30
- export: props.export,
31
- metadata: props.metadata,
32
- tsFlags: props.nullish ? __alloy_js_typescript.TSSymbolFlags.Nullish : __alloy_js_typescript.TSSymbolFlags.None,
33
- type: props.type ? TypeSymbolSlot.firstSymbol : void 0,
34
- namePolicy: (0, __alloy_js_typescript.useTSNamePolicy)().for("variable")
35
- });
36
- if (!props.type) ValueTypeSymbolSlot.moveMembersTo(sym);
37
- const keyword = props.var ? "var" : props.let ? "let" : "const";
38
- const type = props.type ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_typescript.TypeRefContext, { children: [": ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TypeSymbolSlot, { children: props.type })] }) : void 0;
39
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
40
- when: !!props.reflection.value,
41
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_reflection.ReflectionClassContext.Provider, {
42
- value: {
43
- reflection: props.reflection.value,
44
- override: {
45
- name: objectName.value,
46
- type: objectType.value,
47
- defaultValue: props.defaultValue?.value
48
- }
49
- },
50
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
51
- when: !!objectName.value && !!objectType.value,
52
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc_reflection.TSDocReflectionClass, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Declaration, {
53
- symbol: sym,
54
- children: [
55
- props.export ? "export " : "",
56
- props.default ? "default " : "",
57
- keyword,
58
- " ",
59
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Name, {}),
60
- type,
61
- " =",
62
- " ",
63
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueTypeSymbolSlot, { children: props.initializer ?? props.children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_typescript.ObjectExpression, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
64
- each: properties.value ?? [],
65
- comma: true,
66
- doubleHardline: true,
67
- children: (prop) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TypescriptObjectProperty, { property: prop })
68
- }) }) })
69
- ]
70
- })]
71
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})]
72
- })
73
- });
74
- }
75
- /**
76
- * Generates a TypeScript object property for the given reflection class.
77
- */
78
- function TypescriptObjectProperty(props) {
79
- const [{ property }] = (0, __alloy_js_core.splitProps)(props, ["property"]);
80
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_reflection.ReflectionPropertyContext.Provider, {
81
- value: property,
82
- children: [
83
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc_reflection.TSDocReflectionProperty, {}),
84
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_typescript.ObjectProperty, {
85
- name: property.getNameAsString(),
86
- value: require_utilities.stringifyDefaultValue(property)
87
- }),
88
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
89
- ]
90
- });
91
- }
92
-
93
- //#endregion
94
- exports.TypescriptObject = TypescriptObject;
@@ -1,93 +0,0 @@
1
- import { stringifyDefaultValue } from "../../../../deepkit/src/utilities.mjs";
2
- import { ReflectionClassContext, ReflectionPropertyContext } from "../../core/contexts/reflection.mjs";
3
- import { TSDocReflectionClass, TSDocReflectionProperty } from "./tsdoc-reflection.mjs";
4
- import { Declaration, For, Name, Show, computed, createSymbolSlot, splitProps } from "@alloy-js/core";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import { isString } from "@stryke/type-checks/is-string";
7
- import { isUndefined } from "@stryke/type-checks/is-undefined";
8
- import { camelCase } from "@stryke/string-format/camel-case";
9
- import { ObjectExpression, ObjectProperty, TSSymbolFlags, TypeRefContext, createValueSymbol, useTSNamePolicy } from "@alloy-js/typescript";
10
- import { pascalCase } from "@stryke/string-format/pascal-case";
11
-
12
- //#region ../plugin-alloy/src/typescript/components/typescript-object.tsx
13
- /**
14
- * Generates a TypeScript object for the given reflection class.
15
- */
16
- function TypescriptObject(props) {
17
- if (!props.reflection?.value) return null;
18
- const objectName = computed(() => camelCase((isString(props.name) ? props.name : props.name.toString()) || props.reflection.value.getName()));
19
- const objectType = computed(() => props.type || pascalCase(props.reflection.value.getName()));
20
- const properties = computed(() => props.reflection.value.getProperties().filter((item) => !item.isIgnored() && !isUndefined(props.defaultValue?.value?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
21
- if (isUndefined(ret) && !isUndefined(props.defaultValue?.value?.[alias])) return props.defaultValue?.value?.[alias];
22
- return ret;
23
- }, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1));
24
- const TypeSymbolSlot = createSymbolSlot();
25
- const ValueTypeSymbolSlot = createSymbolSlot();
26
- const sym = createValueSymbol(props.name, {
27
- refkeys: props.refkey,
28
- default: props.default,
29
- export: props.export,
30
- metadata: props.metadata,
31
- tsFlags: props.nullish ? TSSymbolFlags.Nullish : TSSymbolFlags.None,
32
- type: props.type ? TypeSymbolSlot.firstSymbol : void 0,
33
- namePolicy: useTSNamePolicy().for("variable")
34
- });
35
- if (!props.type) ValueTypeSymbolSlot.moveMembersTo(sym);
36
- const keyword = props.var ? "var" : props.let ? "let" : "const";
37
- const type = props.type ? /* @__PURE__ */ jsxs(TypeRefContext, { children: [": ", /* @__PURE__ */ jsx(TypeSymbolSlot, { children: props.type })] }) : void 0;
38
- return /* @__PURE__ */ jsx(Show, {
39
- when: !!props.reflection.value,
40
- children: /* @__PURE__ */ jsxs(ReflectionClassContext.Provider, {
41
- value: {
42
- reflection: props.reflection.value,
43
- override: {
44
- name: objectName.value,
45
- type: objectType.value,
46
- defaultValue: props.defaultValue?.value
47
- }
48
- },
49
- children: [/* @__PURE__ */ jsxs(Show, {
50
- when: !!objectName.value && !!objectType.value,
51
- children: [/* @__PURE__ */ jsx(TSDocReflectionClass, {}), /* @__PURE__ */ jsxs(Declaration, {
52
- symbol: sym,
53
- children: [
54
- props.export ? "export " : "",
55
- props.default ? "default " : "",
56
- keyword,
57
- " ",
58
- /* @__PURE__ */ jsx(Name, {}),
59
- type,
60
- " =",
61
- " ",
62
- /* @__PURE__ */ jsx(ValueTypeSymbolSlot, { children: props.initializer ?? props.children ?? /* @__PURE__ */ jsx(ObjectExpression, { children: /* @__PURE__ */ jsx(For, {
63
- each: properties.value ?? [],
64
- comma: true,
65
- doubleHardline: true,
66
- children: (prop) => /* @__PURE__ */ jsx(TypescriptObjectProperty, { property: prop })
67
- }) }) })
68
- ]
69
- })]
70
- }), /* @__PURE__ */ jsx("hbr", {})]
71
- })
72
- });
73
- }
74
- /**
75
- * Generates a TypeScript object property for the given reflection class.
76
- */
77
- function TypescriptObjectProperty(props) {
78
- const [{ property }] = splitProps(props, ["property"]);
79
- return /* @__PURE__ */ jsxs(ReflectionPropertyContext.Provider, {
80
- value: property,
81
- children: [
82
- /* @__PURE__ */ jsx(TSDocReflectionProperty, {}),
83
- /* @__PURE__ */ jsx(ObjectProperty, {
84
- name: property.getNameAsString(),
85
- value: stringifyDefaultValue(property)
86
- }),
87
- /* @__PURE__ */ jsx("hbr", {})
88
- ]
89
- });
90
- }
91
-
92
- //#endregion
93
- export { TypescriptObject };