@powerlines/plugin-date 0.12.151 → 0.12.152

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 (150) hide show
  1. package/dist/components/date-fns.cjs +3 -2
  2. package/dist/components/date-fns.mjs +1 -1
  3. package/dist/components/dayjs.cjs +3 -2
  4. package/dist/components/dayjs.mjs +1 -1
  5. package/dist/components/luxon.cjs +3 -2
  6. package/dist/components/luxon.mjs +1 -1
  7. package/dist/components/moment.cjs +3 -2
  8. package/dist/components/moment.mjs +1 -1
  9. package/dist/index.cjs +5 -5
  10. package/dist/index.d.mts +1 -1
  11. package/dist/index.mjs +3 -3
  12. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +43 -0
  13. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +42 -0
  14. package/dist/packages/plugin-alloy/src/types/components.d.mts +2 -0
  15. package/dist/{plugin-env → packages/plugin-env}/src/types/plugin.d.mts +1 -1
  16. package/dist/{powerlines → packages/powerlines}/src/types/build.d.mts +6 -6
  17. package/dist/{powerlines → packages/powerlines}/src/types/config.d.mts +1 -2
  18. package/dist/{powerlines → packages/powerlines}/src/types/tsconfig.d.mts +1 -1
  19. package/dist/types/plugin.d.mts +1 -1
  20. package/package.json +5 -5
  21. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  22. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  23. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  24. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  25. package/dist/deepkit/src/capnp.cjs +0 -913
  26. package/dist/deepkit/src/capnp.mjs +0 -911
  27. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  28. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  29. package/dist/deepkit/src/reflect-type.cjs +0 -22
  30. package/dist/deepkit/src/reflect-type.mjs +0 -20
  31. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  32. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  33. package/dist/deepkit/src/transformer.cjs +0 -52
  34. package/dist/deepkit/src/transformer.mjs +0 -49
  35. package/dist/deepkit/src/transpile.cjs +0 -29
  36. package/dist/deepkit/src/transpile.mjs +0 -27
  37. package/dist/deepkit/src/utilities.cjs +0 -66
  38. package/dist/deepkit/src/utilities.mjs +0 -65
  39. package/dist/plugin-alloy/src/core/components/output.cjs +0 -38
  40. package/dist/plugin-alloy/src/core/components/output.mjs +0 -37
  41. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -20
  42. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -19
  43. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -60
  44. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -58
  45. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
  46. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
  47. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  48. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  49. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  50. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  51. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  52. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  53. package/dist/plugin-alloy/src/index.cjs +0 -103
  54. package/dist/plugin-alloy/src/index.mjs +0 -101
  55. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -7
  56. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -9
  57. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -5
  58. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -7
  59. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -17
  60. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  61. package/dist/plugin-alloy/src/types/components.d.mts +0 -3
  62. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -47
  63. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -46
  64. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -75
  65. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -73
  66. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -359
  67. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -350
  68. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -153
  69. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -150
  70. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -53
  71. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -52
  72. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -94
  73. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -93
  74. package/dist/plugin-automd/src/index.cjs +0 -101
  75. package/dist/plugin-automd/src/index.mjs +0 -98
  76. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  77. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  78. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  79. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  80. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  81. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  82. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  83. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  84. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  85. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  86. package/dist/plugin-babel/src/helpers/options.cjs +0 -50
  87. package/dist/plugin-babel/src/helpers/options.mjs +0 -47
  88. package/dist/plugin-babel/src/index.cjs +0 -91
  89. package/dist/plugin-babel/src/index.mjs +0 -89
  90. package/dist/plugin-env/src/babel/index.cjs +0 -1
  91. package/dist/plugin-env/src/babel/index.mjs +0 -3
  92. package/dist/plugin-env/src/babel/plugin.cjs +0 -121
  93. package/dist/plugin-env/src/babel/plugin.mjs +0 -119
  94. package/dist/plugin-env/src/components/docs.cjs +0 -9
  95. package/dist/plugin-env/src/components/docs.mjs +0 -11
  96. package/dist/plugin-env/src/components/env.cjs +0 -487
  97. package/dist/plugin-env/src/components/env.mjs +0 -484
  98. package/dist/plugin-env/src/components/index.cjs +0 -2
  99. package/dist/plugin-env/src/components/index.mjs +0 -4
  100. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  101. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  102. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  103. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  104. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  105. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  106. package/dist/plugin-env/src/helpers/load.cjs +0 -83
  107. package/dist/plugin-env/src/helpers/load.mjs +0 -80
  108. package/dist/plugin-env/src/helpers/persistence.cjs +0 -201
  109. package/dist/plugin-env/src/helpers/persistence.mjs +0 -190
  110. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  111. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  112. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  113. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  114. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  115. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  116. package/dist/plugin-env/src/index.cjs +0 -172
  117. package/dist/plugin-env/src/index.mjs +0 -170
  118. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
  119. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
  120. package/dist/powerlines/src/lib/entry.cjs +0 -12
  121. package/dist/powerlines/src/lib/entry.mjs +0 -14
  122. package/dist/powerlines/src/lib/logger.cjs +0 -41
  123. package/dist/powerlines/src/lib/logger.mjs +0 -39
  124. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
  125. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
  126. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
  127. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
  128. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
  129. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
  130. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  131. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  132. /package/dist/{deepkit → packages/deepkit}/schemas/reflection.d.mts +0 -0
  133. /package/dist/{deepkit → packages/deepkit}/src/types.d.mts +0 -0
  134. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/index.d.mts +0 -0
  135. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/plugin.d.mts +0 -0
  136. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/plugin.d.mts +0 -0
  137. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/toc.d.mts +0 -0
  138. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/index.d.mts +0 -0
  139. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/plugin.d.mts +0 -0
  140. /package/dist/{plugin-env → packages/plugin-env}/src/types/runtime.d.mts +0 -0
  141. /package/dist/{powerlines → packages/powerlines}/src/internal/helpers/hooks.d.mts +0 -0
  142. /package/dist/{powerlines → packages/powerlines}/src/types/api.d.mts +0 -0
  143. /package/dist/{powerlines → packages/powerlines}/src/types/babel.d.mts +0 -0
  144. /package/dist/{powerlines → packages/powerlines}/src/types/commands.d.mts +0 -0
  145. /package/dist/{powerlines → packages/powerlines}/src/types/context.d.mts +0 -0
  146. /package/dist/{powerlines → packages/powerlines}/src/types/fs.d.mts +0 -0
  147. /package/dist/{powerlines → packages/powerlines}/src/types/hooks.d.mts +0 -0
  148. /package/dist/{powerlines → packages/powerlines}/src/types/plugin.d.mts +0 -0
  149. /package/dist/{powerlines → packages/powerlines}/src/types/resolved.d.mts +0 -0
  150. /package/dist/{powerlines → packages/powerlines}/src/types/unplugin.d.mts +0 -0
@@ -1,46 +0,0 @@
1
- import { usePowerlines } from "../../core/contexts/context.mjs";
2
- import { TSDocModule } from "./tsdoc.mjs";
3
- import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./typescript-file.mjs";
4
- import { computed, splitProps } from "@alloy-js/core";
5
- import { replaceExtension, replacePath } from "@stryke/path/replace";
6
- import { jsx } from "react/jsx-runtime";
7
- import { hasFileExtension } from "@stryke/path/file-path-fns";
8
- import { isSet } from "@stryke/type-checks/is-set";
9
-
10
- //#region ../plugin-alloy/src/typescript/components/builtin-file.tsx
11
- /**
12
- * A base component representing a Powerlines generated Typescript source file.
13
- *
14
- * @param props - The properties for the source file.
15
- * @returns The rendered source file component.
16
- */
17
- function BuiltinFile(props) {
18
- const [{ children, imports, id, description, tsx }, rest] = splitProps(props, [
19
- "children",
20
- "imports",
21
- "id",
22
- "description",
23
- "tsx"
24
- ]);
25
- const context = usePowerlines();
26
- const path = computed(() => replacePath(`${!isSet(tsx) ? id : replaceExtension(id)}${hasFileExtension(id) && !isSet(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context.builtinsPath));
27
- return /* @__PURE__ */ jsx(TypescriptFile, {
28
- header: /* @__PURE__ */ jsx(TypescriptFileHeader, {
29
- header: /* @__PURE__ */ jsx(TSDocModule, {
30
- name: id,
31
- children: description
32
- }),
33
- children: /* @__PURE__ */ jsx(TypescriptFileHeaderImports, { imports })
34
- }),
35
- meta: {
36
- kind: "builtin",
37
- id: replaceExtension(id)
38
- },
39
- ...rest,
40
- path: path.value,
41
- children
42
- });
43
- }
44
-
45
- //#endregion
46
- export { BuiltinFile };
@@ -1,75 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_tsdoc = require('./tsdoc.cjs');
3
- const require_reflection = require('../../core/contexts/reflection.cjs');
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
7
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
8
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
9
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
10
-
11
- //#region ../plugin-alloy/src/typescript/components/tsdoc-reflection.tsx
12
- /**
13
- * Generates a TypeScript interface property for the given reflection class.
14
- */
15
- function TSDocReflectionClass(props) {
16
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
17
- const reflectionClass = require_reflection.useReflectionClass();
18
- const title = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getTitle() || (0, __stryke_string_format_title_case.titleCase)(reflectionClass.reflection.getName()));
19
- const alias = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getAlias());
20
- const domain = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getDomain());
21
- const permission = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getPermission());
22
- const readonly = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isReadonly());
23
- const internal = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isInternal());
24
- const ignore = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isIgnored());
25
- const hidden = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isHidden());
26
- if (!reflectionClass.reflection.getName()) return null;
27
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_tsdoc.TSDoc, {
28
- ...rest,
29
- heading: reflectionClass.reflection.getDescription(),
30
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
31
- when: (0, __stryke_type_checks_is_set_string.isSetString)(title.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(alias.value) && alias.value.length > 0 || !(0, __stryke_type_checks_is_undefined.isUndefined)(permission.value) && permission.value.length > 0 || (0, __stryke_type_checks_is_set_string.isSetString)(domain.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(readonly.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(internal.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(ignore.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(hidden.value),
32
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc.TSDocAttributesTags, {
33
- title: title.value,
34
- alias: alias.value,
35
- domain: domain.value,
36
- permission: permission.value,
37
- readonly: readonly.value,
38
- internal: internal.value,
39
- ignore: ignore.value,
40
- hidden: hidden.value
41
- })
42
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
43
- when: Boolean(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
44
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
45
- })]
46
- });
47
- }
48
- /**
49
- * Generates a TypeScript interface property for the given reflection class.
50
- */
51
- function TSDocReflectionProperty(props) {
52
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
53
- const context = require_reflection.useReflectionProperty();
54
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_tsdoc.TSDoc, {
55
- heading: context.getDescription(),
56
- ...rest,
57
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc.TSDocAttributesTags, {
58
- title: context.getTitle(),
59
- alias: context.getAlias(),
60
- domain: context.getDomain(),
61
- permission: context.getPermission(),
62
- readonly: context.isReadonly(),
63
- internal: context.isInternal(),
64
- ignore: context.isIgnored(),
65
- hidden: context.isHidden()
66
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
67
- when: Boolean(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
68
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
69
- })]
70
- });
71
- }
72
-
73
- //#endregion
74
- exports.TSDocReflectionClass = TSDocReflectionClass;
75
- exports.TSDocReflectionProperty = TSDocReflectionProperty;
@@ -1,73 +0,0 @@
1
- import { TSDoc, TSDocAttributesTags } from "./tsdoc.mjs";
2
- import { useReflectionClass, useReflectionProperty } from "../../core/contexts/reflection.mjs";
3
- import { List, Show, childrenArray, code, computed, splitProps } from "@alloy-js/core";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { isSetString } from "@stryke/type-checks/is-set-string";
6
- import { titleCase } from "@stryke/string-format/title-case";
7
- import { isString } from "@stryke/type-checks/is-string";
8
- import { isUndefined } from "@stryke/type-checks/is-undefined";
9
-
10
- //#region ../plugin-alloy/src/typescript/components/tsdoc-reflection.tsx
11
- /**
12
- * Generates a TypeScript interface property for the given reflection class.
13
- */
14
- function TSDocReflectionClass(props) {
15
- const [{ children }, rest] = splitProps(props, ["children"]);
16
- const reflectionClass = useReflectionClass();
17
- const title = computed(() => reflectionClass.reflection.getTitle() || titleCase(reflectionClass.reflection.getName()));
18
- const alias = computed(() => reflectionClass.reflection.getAlias());
19
- const domain = computed(() => reflectionClass.reflection.getDomain());
20
- const permission = computed(() => reflectionClass.reflection.getPermission());
21
- const readonly = computed(() => reflectionClass.reflection.isReadonly());
22
- const internal = computed(() => reflectionClass.reflection.isInternal());
23
- const ignore = computed(() => reflectionClass.reflection.isIgnored());
24
- const hidden = computed(() => reflectionClass.reflection.isHidden());
25
- if (!reflectionClass.reflection.getName()) return null;
26
- return /* @__PURE__ */ jsxs(TSDoc, {
27
- ...rest,
28
- heading: reflectionClass.reflection.getDescription(),
29
- children: [/* @__PURE__ */ jsx(Show, {
30
- when: isSetString(title.value) || !isUndefined(alias.value) && alias.value.length > 0 || !isUndefined(permission.value) && permission.value.length > 0 || isSetString(domain.value) || !isUndefined(readonly.value) || !isUndefined(internal.value) || !isUndefined(ignore.value) || !isUndefined(hidden.value),
31
- children: /* @__PURE__ */ jsx(TSDocAttributesTags, {
32
- title: title.value,
33
- alias: alias.value,
34
- domain: domain.value,
35
- permission: permission.value,
36
- readonly: readonly.value,
37
- internal: internal.value,
38
- ignore: ignore.value,
39
- hidden: hidden.value
40
- })
41
- }), /* @__PURE__ */ jsx(Show, {
42
- when: Boolean(children) && childrenArray(() => children).length > 0,
43
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
44
- })]
45
- });
46
- }
47
- /**
48
- * Generates a TypeScript interface property for the given reflection class.
49
- */
50
- function TSDocReflectionProperty(props) {
51
- const [{ children }, rest] = splitProps(props, ["children"]);
52
- const context = useReflectionProperty();
53
- return /* @__PURE__ */ jsxs(TSDoc, {
54
- heading: context.getDescription(),
55
- ...rest,
56
- children: [/* @__PURE__ */ jsx(TSDocAttributesTags, {
57
- title: context.getTitle(),
58
- alias: context.getAlias(),
59
- domain: context.getDomain(),
60
- permission: context.getPermission(),
61
- readonly: context.isReadonly(),
62
- internal: context.isInternal(),
63
- ignore: context.isIgnored(),
64
- hidden: context.isHidden()
65
- }), /* @__PURE__ */ jsx(Show, {
66
- when: Boolean(children) && childrenArray(() => children).length > 0,
67
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
68
- })]
69
- });
70
- }
71
-
72
- //#endregion
73
- export { TSDocReflectionClass, TSDocReflectionProperty };
@@ -1,359 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../../core/contexts/context.cjs');
3
- const require_utilities = require('../../../../deepkit/src/utilities.cjs');
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
7
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
8
-
9
- //#region ../plugin-alloy/src/typescript/components/tsdoc.tsx
10
- /**
11
- * Generates a TypeScript interface for the given reflection class.
12
- */
13
- function TSDoc(props) {
14
- const [{ children, heading }] = (0, __alloy_js_core.splitProps)(props, ["children", "heading"]);
15
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
16
- "/**",
17
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("align", {
18
- string: " * ",
19
- children: [
20
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
21
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
22
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(heading),
23
- children: [
24
- heading,
25
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
26
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
27
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
28
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
29
- })
30
- ]
31
- }),
32
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
33
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
34
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
35
- })
36
- ]
37
- }),
38
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
39
- ` */`,
40
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
41
- ] });
42
- }
43
- /**
44
- * Create a TSDoc `@<props.tag>` tag.
45
- */
46
- function TSDocTag(props) {
47
- const [{ children, tag }] = (0, __alloy_js_core.splitProps)(props, ["children", "tag"]);
48
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
49
- `@${tag} `,
50
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
51
- when: Boolean(children),
52
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("align", {
53
- width: 2,
54
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Prose, { children })
55
- })
56
- }),
57
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
58
- ] });
59
- }
60
- /**
61
- * Create a TSDoc `@title` tag.
62
- */
63
- function TSDocTitle(props) {
64
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
65
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
66
- ...rest,
67
- tag: "title",
68
- children
69
- });
70
- }
71
- /**
72
- * Create a TSDoc `@domain` tag.
73
- */
74
- function TSDocDomain(props) {
75
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
76
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
77
- ...rest,
78
- tag: "domain",
79
- children
80
- });
81
- }
82
- /**
83
- * Create a TSDoc `@alias` tag.
84
- */
85
- function TSDocAlias(props) {
86
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
87
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
88
- ...rest,
89
- tag: "alias",
90
- children
91
- });
92
- }
93
- /**
94
- * Create a TSDoc `@permission` tag.
95
- */
96
- function TSDocPermission(props) {
97
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
98
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
99
- ...rest,
100
- tag: "permission",
101
- children
102
- });
103
- }
104
- /**
105
- * Create a TSDoc `@defaultValue` tag.
106
- */
107
- function TSDocDefaultValue(props) {
108
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
109
- "@defaultValue ",
110
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
111
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(props.value),
112
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("align", {
113
- width: 2,
114
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Prose, { children: require_utilities.stringifyDefaultValue(props.value) })
115
- })
116
- }),
117
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
118
- ] });
119
- }
120
- /**
121
- * Create a TSDoc `@remarks` tag.
122
- */
123
- function TSDocRemarks(props) {
124
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
125
- "@remarks ",
126
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
127
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, {
128
- hardline: true,
129
- children: (0, __alloy_js_core.childrenArray)(() => props.children)
130
- })
131
- ] });
132
- }
133
- /**
134
- * Create a TSDoc `@see` tag.
135
- */
136
- function TSDocLink(props) {
137
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
138
- ...props,
139
- tag: "see"
140
- });
141
- }
142
- /**
143
- * Create a TSDoc `@example` tag.
144
- */
145
- function TSDocExample(props) {
146
- const [{ tsx, fenced = true, language, children }] = (0, __alloy_js_core.splitProps)(props, [
147
- "tsx",
148
- "fenced",
149
- "language",
150
- "children"
151
- ]);
152
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
153
- "@example ",
154
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
155
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
156
- when: fenced,
157
- children: [
158
- "```",
159
- language || (tsx ? "tsx" : "ts"),
160
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
161
- ]
162
- }),
163
- children,
164
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
165
- when: fenced,
166
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}), "```"]
167
- })
168
- ] });
169
- }
170
- /**
171
- * Create a TSDoc `@readonly` tag.
172
- */
173
- function TSDocReadonly() {
174
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "readonly" });
175
- }
176
- /**
177
- * Create a TSDoc `@internal` tag.
178
- */
179
- function TSDocInternal() {
180
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "internal" });
181
- }
182
- /**
183
- * Create a TSDoc `@ignore` tag.
184
- */
185
- function TSDocIgnore() {
186
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "ignore" });
187
- }
188
- /**
189
- * Create a TSDoc `@hidden` tag.
190
- */
191
- function TSDocHidden() {
192
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "hidden" });
193
- }
194
- /**
195
- * Generates a TypeScript interface property for the given reflection class.
196
- */
197
- function TSDocAttributesTags(props) {
198
- const [{ title, alias, permission, domain, readonly, internal, ignore, hidden, defaultValue }] = (0, __alloy_js_core.splitProps)(props, [
199
- "title",
200
- "alias",
201
- "permission",
202
- "domain",
203
- "readonly",
204
- "internal",
205
- "ignore",
206
- "hidden",
207
- "defaultValue"
208
- ]);
209
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
210
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
211
- when: (0, __stryke_type_checks_is_set_string.isSetString)(title),
212
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTitle, { children: title })
213
- }),
214
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
215
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(alias) && alias.length > 0,
216
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
217
- each: alias ?? [],
218
- children: (alias$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocAlias, { children: alias$1 })
219
- })
220
- }),
221
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
222
- when: (0, __stryke_type_checks_is_set_string.isSetString)(domain),
223
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocDomain, { children: domain })
224
- }),
225
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
226
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(permission) && permission.length > 0,
227
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
228
- each: permission ?? [],
229
- children: (permission$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocPermission, { children: permission$1 })
230
- })
231
- }),
232
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
233
- when: readonly === true,
234
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocReadonly, {})
235
- }),
236
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
237
- when: internal === true,
238
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocInternal, {})
239
- }),
240
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
241
- when: ignore === true,
242
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocIgnore, {})
243
- }),
244
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
245
- when: hidden === true,
246
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocHidden, {})
247
- }),
248
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
249
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(defaultValue),
250
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocDefaultValue, { value: defaultValue })
251
- })
252
- ] });
253
- }
254
- /**
255
- * Create a TSDoc parameter set off with `@param`.
256
- */
257
- function TSDocParam(props) {
258
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
259
- "@param ",
260
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocParamName, {
261
- name: props.name,
262
- optional: props.optional,
263
- defaultValue: props.defaultValue
264
- }),
265
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocParamDescription, { children: props.children })
266
- ] });
267
- }
268
- function TSDocParamName(props) {
269
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
270
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
271
- when: props.optional,
272
- children: "["
273
- }),
274
- props.name,
275
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
276
- when: Boolean(props.defaultValue),
277
- children: ["=", props.defaultValue]
278
- }),
279
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
280
- when: props.optional,
281
- children: "]"
282
- })
283
- ] });
284
- }
285
- function TSDocParamDescription(props) {
286
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
287
- when: Boolean(props.children),
288
- children: [" - ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("align", {
289
- width: 2,
290
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Prose, { children: props.children })
291
- })]
292
- });
293
- }
294
- /**
295
- * Create a TSDoc `@returns` tag.
296
- */
297
- function TSDocReturns(props) {
298
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
299
- ...props,
300
- tag: "returns"
301
- });
302
- }
303
- /**
304
- * Create a TSDoc `@throws` tag.
305
- */
306
- function TSDocThrows(props) {
307
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
308
- ...props,
309
- tag: "throws"
310
- });
311
- }
312
- /**
313
- * Generates a TSDoc `@module` tag for the given module name.
314
- */
315
- function TSDocModule(props) {
316
- const [{ children, name, prefix }] = (0, __alloy_js_core.splitProps)(props, [
317
- "children",
318
- "name",
319
- "prefix"
320
- ]);
321
- const context = require_context.usePowerlines();
322
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
323
- "/**",
324
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("align", {
325
- string: " * ",
326
- children: [
327
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
328
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
329
- when: Boolean(children),
330
- children: [
331
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, {
332
- hardline: true,
333
- children: (0, __alloy_js_core.childrenArray)(() => children)
334
- }),
335
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
336
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
337
- ]
338
- }),
339
- "@module ",
340
- prefix || context?.config.output.builtinPrefix,
341
- ":",
342
- name
343
- ]
344
- }),
345
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
346
- ` */`
347
- ] });
348
- }
349
-
350
- //#endregion
351
- exports.TSDoc = TSDoc;
352
- exports.TSDocAttributesTags = TSDocAttributesTags;
353
- exports.TSDocExample = TSDocExample;
354
- exports.TSDocLink = TSDocLink;
355
- exports.TSDocModule = TSDocModule;
356
- exports.TSDocParam = TSDocParam;
357
- exports.TSDocRemarks = TSDocRemarks;
358
- exports.TSDocReturns = TSDocReturns;
359
- exports.TSDocThrows = TSDocThrows;