@powerlines/plugin-crypto 0.10.101 → 0.10.102

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 (40) hide show
  1. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +20 -0
  2. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +19 -0
  3. package/dist/plugin-alloy/src/core/components/source-file.cjs +60 -0
  4. package/dist/plugin-alloy/src/core/components/source-file.mjs +58 -0
  5. package/dist/plugin-alloy/src/core/contexts/context.cjs +50 -1
  6. package/dist/plugin-alloy/src/core/contexts/context.mjs +46 -2
  7. package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
  8. package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
  9. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +46 -0
  10. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +42 -0
  11. package/dist/plugin-alloy/src/helpers/refkey.cjs +16 -0
  12. package/dist/plugin-alloy/src/helpers/refkey.mjs +15 -0
  13. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +7 -0
  14. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +9 -0
  15. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +5 -0
  16. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +7 -0
  17. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +17 -0
  18. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +17 -0
  19. package/dist/plugin-alloy/src/types/components.d.mts +1 -1
  20. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +47 -0
  21. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +46 -0
  22. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +75 -0
  23. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +73 -0
  24. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +359 -0
  25. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +350 -0
  26. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +142 -0
  27. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +139 -0
  28. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +53 -0
  29. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +52 -0
  30. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +94 -0
  31. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +93 -0
  32. package/dist/plugin-env/src/components/docs.cjs +3 -3
  33. package/dist/plugin-env/src/components/docs.mjs +3 -3
  34. package/dist/plugin-env/src/components/env.cjs +35 -39
  35. package/dist/plugin-env/src/components/env.mjs +10 -14
  36. package/dist/powerlines/src/lib/build/esbuild.mjs +1 -1
  37. package/dist/powerlines/src/lib/entry.mjs +1 -1
  38. package/dist/powerlines/src/types/build.d.mts +0 -2
  39. package/dist/powerlines/src/types/resolved.d.mts +0 -1
  40. package/package.json +5 -5
@@ -0,0 +1,20 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ let __alloy_js_core = require("@alloy-js/core");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+
5
+ //#region ../plugin-alloy/src/core/components/single-line-comment.tsx
6
+ /**
7
+ * A single line comment block. The children are rendered as a prose element, which means that they
8
+ * are broken into multiple lines
9
+ */
10
+ function SingleLineComment(props) {
11
+ const { variant = "double-slash", children } = props;
12
+ const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : "// ";
13
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [commentStart, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("align", {
14
+ string: commentStart,
15
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""]
16
+ })] });
17
+ }
18
+
19
+ //#endregion
20
+ exports.SingleLineComment = SingleLineComment;
@@ -0,0 +1,19 @@
1
+ import { Prose } from "@alloy-js/core";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+
4
+ //#region ../plugin-alloy/src/core/components/single-line-comment.tsx
5
+ /**
6
+ * A single line comment block. The children are rendered as a prose element, which means that they
7
+ * are broken into multiple lines
8
+ */
9
+ function SingleLineComment(props) {
10
+ const { variant = "double-slash", children } = props;
11
+ const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : "// ";
12
+ return /* @__PURE__ */ jsxs(Fragment, { children: [commentStart, /* @__PURE__ */ jsxs("align", {
13
+ string: commentStart,
14
+ children: [/* @__PURE__ */ jsx(Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""]
15
+ })] });
16
+ }
17
+
18
+ //#endregion
19
+ export { SingleLineComment };
@@ -0,0 +1,60 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_context = require('../contexts/context.cjs');
3
+ require('../contexts/index.cjs');
4
+ let __alloy_js_core = require("@alloy-js/core");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ let __stryke_path_append = require("@stryke/path/append");
7
+ let defu = require("defu");
8
+ defu = require_rolldown_runtime.__toESM(defu);
9
+
10
+ //#region ../plugin-alloy/src/core/components/source-file.tsx
11
+ /**
12
+ * A base component representing a Powerlines generated source file.
13
+ *
14
+ * @param props - The properties for the source file.
15
+ * @returns The rendered source file component.
16
+ */
17
+ function SourceFile(props) {
18
+ const [{ children, meta, path, header, storage, filetype, reference }] = (0, __alloy_js_core.splitProps)(props, [
19
+ "children",
20
+ "meta",
21
+ "path",
22
+ "header",
23
+ "storage",
24
+ "filetype",
25
+ "reference"
26
+ ]);
27
+ const metadata = require_context.useMeta();
28
+ const parentDirectory = (0, __alloy_js_core.useContext)(__alloy_js_core.SourceDirectoryContext);
29
+ const sourceFile = {
30
+ path: (0, __stryke_path_append.appendPath)(path, parentDirectory.path),
31
+ filetype,
32
+ reference
33
+ };
34
+ parentDirectory?.addContent(sourceFile);
35
+ const printOptions = (0, __alloy_js_core.useFormatOptions)({
36
+ printWidth: props.printWidth,
37
+ tabWidth: props.tabWidth,
38
+ useTabs: props.useTabs,
39
+ insertFinalNewLine: props.insertFinalNewLine
40
+ });
41
+ const nodeContext = (0, __alloy_js_core.getContext)();
42
+ nodeContext.meta = (0, defu.default)({
43
+ sourceFile,
44
+ printOptions
45
+ }, meta ?? {});
46
+ metadata[sourceFile.path] = {
47
+ storage,
48
+ ...meta ?? {}
49
+ };
50
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.SourceFileContext.Provider, {
51
+ value: sourceFile,
52
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
53
+ when: header !== void 0,
54
+ children: [header, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})]
55
+ }), children]
56
+ });
57
+ }
58
+
59
+ //#endregion
60
+ exports.SourceFile = SourceFile;
@@ -0,0 +1,58 @@
1
+ import { useMeta } from "../contexts/context.mjs";
2
+ import "../contexts/index.mjs";
3
+ import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { appendPath } from "@stryke/path/append";
6
+ import defu from "defu";
7
+
8
+ //#region ../plugin-alloy/src/core/components/source-file.tsx
9
+ /**
10
+ * A base component representing a Powerlines generated source file.
11
+ *
12
+ * @param props - The properties for the source file.
13
+ * @returns The rendered source file component.
14
+ */
15
+ function SourceFile(props) {
16
+ const [{ children, meta, path, header, storage, filetype, reference }] = splitProps(props, [
17
+ "children",
18
+ "meta",
19
+ "path",
20
+ "header",
21
+ "storage",
22
+ "filetype",
23
+ "reference"
24
+ ]);
25
+ const metadata = useMeta();
26
+ const parentDirectory = useContext(SourceDirectoryContext);
27
+ const sourceFile = {
28
+ path: appendPath(path, parentDirectory.path),
29
+ filetype,
30
+ reference
31
+ };
32
+ parentDirectory?.addContent(sourceFile);
33
+ const printOptions = useFormatOptions({
34
+ printWidth: props.printWidth,
35
+ tabWidth: props.tabWidth,
36
+ useTabs: props.useTabs,
37
+ insertFinalNewLine: props.insertFinalNewLine
38
+ });
39
+ const nodeContext = getContext();
40
+ nodeContext.meta = defu({
41
+ sourceFile,
42
+ printOptions
43
+ }, meta ?? {});
44
+ metadata[sourceFile.path] = {
45
+ storage,
46
+ ...meta ?? {}
47
+ };
48
+ return /* @__PURE__ */ jsxs(SourceFileContext.Provider, {
49
+ value: sourceFile,
50
+ children: [/* @__PURE__ */ jsxs(Show, {
51
+ when: header !== void 0,
52
+ children: [header, /* @__PURE__ */ jsx("hbr", {})]
53
+ }), children]
54
+ });
55
+ }
56
+
57
+ //#endregion
58
+ export { SourceFile };
@@ -6,6 +6,55 @@ let __alloy_js_core = require("@alloy-js/core");
6
6
  * The Powerlines context used in template rendering.
7
7
  */
8
8
  const PowerlinesContext = (0, __alloy_js_core.createNamedContext)("powerlines");
9
+ /**
10
+ * Hook to access the Powerlines Context.
11
+ *
12
+ * @returns The Context.
13
+ */
14
+ function usePowerlinesContext() {
15
+ return (0, __alloy_js_core.useContext)(PowerlinesContext);
16
+ }
17
+ /**
18
+ * Hook to safely access the {@link PluginContext | Powerlines context}.
19
+ *
20
+ * @returns The Powerlines context or undefined if not set.
21
+ */
22
+ function usePowerlinesSafe() {
23
+ return usePowerlinesContext()?.ref?.value;
24
+ }
25
+ /**
26
+ * Hook to access the {@link PluginContext | Powerlines context}.
27
+ *
28
+ * @returns The Powerlines context.
29
+ */
30
+ function usePowerlines() {
31
+ const powerlines = usePowerlinesSafe();
32
+ if (!powerlines) throw new Error("Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
33
+ return powerlines;
34
+ }
35
+ /**
36
+ * Hook to safely access the render context's metadata.
37
+ *
38
+ * @returns The Powerlines context or undefined if not set.
39
+ */
40
+ function useMetaSafe() {
41
+ return usePowerlinesContext()?.meta?.value;
42
+ }
43
+ /**
44
+ * Hook to access the render context's metadata.
45
+ *
46
+ * @returns The Powerlines context.
47
+ */
48
+ function useMeta() {
49
+ const meta = useMetaSafe();
50
+ if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
51
+ return meta;
52
+ }
9
53
 
10
54
  //#endregion
11
- exports.PowerlinesContext = PowerlinesContext;
55
+ exports.PowerlinesContext = PowerlinesContext;
56
+ exports.useMeta = useMeta;
57
+ exports.useMetaSafe = useMetaSafe;
58
+ exports.usePowerlines = usePowerlines;
59
+ exports.usePowerlinesContext = usePowerlinesContext;
60
+ exports.usePowerlinesSafe = usePowerlinesSafe;
@@ -1,10 +1,54 @@
1
- import { createNamedContext } from "@alloy-js/core";
1
+ import { createNamedContext, useContext } from "@alloy-js/core";
2
2
 
3
3
  //#region ../plugin-alloy/src/core/contexts/context.ts
4
4
  /**
5
5
  * The Powerlines context used in template rendering.
6
6
  */
7
7
  const PowerlinesContext = createNamedContext("powerlines");
8
+ /**
9
+ * Hook to access the Powerlines Context.
10
+ *
11
+ * @returns The Context.
12
+ */
13
+ function usePowerlinesContext() {
14
+ return useContext(PowerlinesContext);
15
+ }
16
+ /**
17
+ * Hook to safely access the {@link PluginContext | Powerlines context}.
18
+ *
19
+ * @returns The Powerlines context or undefined if not set.
20
+ */
21
+ function usePowerlinesSafe() {
22
+ return usePowerlinesContext()?.ref?.value;
23
+ }
24
+ /**
25
+ * Hook to access the {@link PluginContext | Powerlines context}.
26
+ *
27
+ * @returns The Powerlines context.
28
+ */
29
+ function usePowerlines() {
30
+ const powerlines = usePowerlinesSafe();
31
+ if (!powerlines) throw new Error("Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
32
+ return powerlines;
33
+ }
34
+ /**
35
+ * Hook to safely access the render context's metadata.
36
+ *
37
+ * @returns The Powerlines context or undefined if not set.
38
+ */
39
+ function useMetaSafe() {
40
+ return usePowerlinesContext()?.meta?.value;
41
+ }
42
+ /**
43
+ * Hook to access the render context's metadata.
44
+ *
45
+ * @returns The Powerlines context.
46
+ */
47
+ function useMeta() {
48
+ const meta = useMetaSafe();
49
+ if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
50
+ return meta;
51
+ }
8
52
 
9
53
  //#endregion
10
- export { PowerlinesContext };
54
+ export { PowerlinesContext, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
@@ -0,0 +1,2 @@
1
+ const require_context = require('./context.cjs');
2
+ const require_reflection = require('./reflection.cjs');
@@ -0,0 +1,4 @@
1
+ import { PowerlinesContext, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
+ import { ReflectionClassContext, ReflectionPropertyContext, useReflectionClass, useReflectionProperty } from "./reflection.mjs";
3
+
4
+ export { };
@@ -0,0 +1,46 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ let __alloy_js_core = require("@alloy-js/core");
3
+
4
+ //#region ../plugin-alloy/src/core/contexts/reflection.ts
5
+ /**
6
+ * The reflection class context used in template rendering.
7
+ */
8
+ const ReflectionClassContext = (0, __alloy_js_core.createContext)();
9
+ /**
10
+ * Hook to access the Reflection context.
11
+ *
12
+ * @returns A reactive version of the current reflection.
13
+ */
14
+ function useReflectionClass() {
15
+ const context = (0, __alloy_js_core.useContext)(ReflectionClassContext);
16
+ if (!context) throw new Error("Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
17
+ return context;
18
+ }
19
+ /**
20
+ * The reflection property context used in template rendering.
21
+ */
22
+ const ReflectionPropertyContext = (0, __alloy_js_core.createNamedContext)("reflection-property");
23
+ /**
24
+ * Hook to access the Reflection Property context.
25
+ *
26
+ * @returns A reactive version of the current reflection.
27
+ */
28
+ function useReflectionProperty() {
29
+ const context = (0, __alloy_js_core.useContext)(ReflectionPropertyContext);
30
+ if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
31
+ return context;
32
+ }
33
+ /**
34
+ * The reflection method context used in template rendering.
35
+ */
36
+ const ReflectionMethodContext = (0, __alloy_js_core.createNamedContext)("reflection-method");
37
+ /**
38
+ * The reflection parameter context used in template rendering.
39
+ */
40
+ const ReflectionParameterContext = (0, __alloy_js_core.createNamedContext)("reflection-parameter");
41
+
42
+ //#endregion
43
+ exports.ReflectionClassContext = ReflectionClassContext;
44
+ exports.ReflectionPropertyContext = ReflectionPropertyContext;
45
+ exports.useReflectionClass = useReflectionClass;
46
+ exports.useReflectionProperty = useReflectionProperty;
@@ -0,0 +1,42 @@
1
+ import { createContext, createNamedContext, useContext } from "@alloy-js/core";
2
+
3
+ //#region ../plugin-alloy/src/core/contexts/reflection.ts
4
+ /**
5
+ * The reflection class context used in template rendering.
6
+ */
7
+ const ReflectionClassContext = createContext();
8
+ /**
9
+ * Hook to access the Reflection context.
10
+ *
11
+ * @returns A reactive version of the current reflection.
12
+ */
13
+ function useReflectionClass() {
14
+ const context = useContext(ReflectionClassContext);
15
+ if (!context) throw new Error("Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
16
+ return context;
17
+ }
18
+ /**
19
+ * The reflection property context used in template rendering.
20
+ */
21
+ const ReflectionPropertyContext = createNamedContext("reflection-property");
22
+ /**
23
+ * Hook to access the Reflection Property context.
24
+ *
25
+ * @returns A reactive version of the current reflection.
26
+ */
27
+ function useReflectionProperty() {
28
+ const context = useContext(ReflectionPropertyContext);
29
+ if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
30
+ return context;
31
+ }
32
+ /**
33
+ * The reflection method context used in template rendering.
34
+ */
35
+ const ReflectionMethodContext = createNamedContext("reflection-method");
36
+ /**
37
+ * The reflection parameter context used in template rendering.
38
+ */
39
+ const ReflectionParameterContext = createNamedContext("reflection-parameter");
40
+
41
+ //#endregion
42
+ export { ReflectionClassContext, ReflectionPropertyContext, useReflectionClass, useReflectionProperty };
@@ -0,0 +1,16 @@
1
+ const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ let __alloy_js_core = require("@alloy-js/core");
3
+
4
+ //#region ../plugin-alloy/src/helpers/refkey.ts
5
+ /**
6
+ * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
7
+ *
8
+ * @remarks
9
+ * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
10
+ */
11
+ function refkey(...args) {
12
+ return (0, __alloy_js_core.refkey)("powerlines", ...args);
13
+ }
14
+
15
+ //#endregion
16
+ exports.refkey = refkey;
@@ -0,0 +1,15 @@
1
+ import { refkey } from "@alloy-js/core";
2
+
3
+ //#region ../plugin-alloy/src/helpers/refkey.ts
4
+ /**
5
+ * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
6
+ *
7
+ * @remarks
8
+ * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
9
+ */
10
+ function refkey$1(...args) {
11
+ return refkey("powerlines", ...args);
12
+ }
13
+
14
+ //#endregion
15
+ export { refkey$1 as refkey };
@@ -0,0 +1,7 @@
1
+ require('../../core/contexts/context.cjs');
2
+ require('../../core/components/single-line-comment.cjs');
3
+ require('../../core/components/source-file.cjs');
4
+ let __alloy_js_core = require("@alloy-js/core");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
7
+ require("@alloy-js/markdown");
@@ -0,0 +1,9 @@
1
+ import "../../core/contexts/context.mjs";
2
+ import "../../core/components/single-line-comment.mjs";
3
+ import "../../core/components/source-file.mjs";
4
+ import { Show, code, splitProps } from "@alloy-js/core";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { titleCase } from "@stryke/string-format/title-case";
7
+ import "@alloy-js/markdown";
8
+
9
+ export { };
@@ -0,0 +1,5 @@
1
+ require('../contexts/markdown-table.cjs');
2
+ let __alloy_js_core = require("@alloy-js/core");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+ let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
5
+ let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
@@ -0,0 +1,7 @@
1
+ import "../contexts/markdown-table.mjs";
2
+ import { Prose, Show, code, computed, splitProps } from "@alloy-js/core";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { titleCase } from "@stryke/string-format/title-case";
5
+ import { isUndefined } from "@stryke/type-checks/is-undefined";
6
+
7
+ export { };
@@ -0,0 +1,17 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ let __alloy_js_core = require("@alloy-js/core");
3
+
4
+ //#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
5
+ /**
6
+ * The Powerlines context used in template rendering.
7
+ */
8
+ const MarkdownTableColumnContext = (0, __alloy_js_core.createNamedContext)("markdown-table-column", {});
9
+ /**
10
+ * The Powerlines context used in template rendering.
11
+ */
12
+ const MarkdownTableContext = (0, __alloy_js_core.createContext)({
13
+ columns: [],
14
+ data: []
15
+ });
16
+
17
+ //#endregion
@@ -0,0 +1,17 @@
1
+ import { createContext, createNamedContext, useContext } from "@alloy-js/core";
2
+
3
+ //#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
4
+ /**
5
+ * The Powerlines context used in template rendering.
6
+ */
7
+ const MarkdownTableColumnContext = createNamedContext("markdown-table-column", {});
8
+ /**
9
+ * The Powerlines context used in template rendering.
10
+ */
11
+ const MarkdownTableContext = createContext({
12
+ columns: [],
13
+ data: []
14
+ });
15
+
16
+ //#endregion
17
+ export { };
@@ -1,4 +1,4 @@
1
1
  import "../../../powerlines/src/types/fs.mjs";
2
2
  import "../../../powerlines/src/types/resolved.mjs";
3
3
  import { Children } from "@alloy-js/core";
4
- import "@alloy-js/typescript";
4
+ import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
@@ -0,0 +1,47 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_context = require('../../core/contexts/context.cjs');
3
+ const require_tsdoc = require('./tsdoc.cjs');
4
+ const require_typescript_file = require('./typescript-file.cjs');
5
+ let __alloy_js_core = require("@alloy-js/core");
6
+ let __stryke_path_replace = require("@stryke/path/replace");
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
9
+ let __stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
10
+
11
+ //#region ../plugin-alloy/src/typescript/components/builtin-file.tsx
12
+ /**
13
+ * A base component representing a Powerlines generated Typescript source file.
14
+ *
15
+ * @param props - The properties for the source file.
16
+ * @returns The rendered source file component.
17
+ */
18
+ function BuiltinFile(props) {
19
+ const [{ children, imports, id, description, tsx }, rest] = (0, __alloy_js_core.splitProps)(props, [
20
+ "children",
21
+ "imports",
22
+ "id",
23
+ "description",
24
+ "tsx"
25
+ ]);
26
+ const context = require_context.usePowerlines();
27
+ const path = (0, __alloy_js_core.computed)(() => (0, __stryke_path_replace.replacePath)(`${!(0, __stryke_type_checks_is_set.isSet)(tsx) ? id : (0, __stryke_path_replace.replaceExtension)(id)}${(0, __stryke_path_file_path_fns.hasFileExtension)(id) && !(0, __stryke_type_checks_is_set.isSet)(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context.builtinsPath));
28
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_typescript_file.TypescriptFile, {
29
+ header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_typescript_file.TypescriptFileHeader, {
30
+ header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc.TSDocModule, {
31
+ name: id,
32
+ children: description
33
+ }),
34
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_typescript_file.TypescriptFileHeaderImports, { imports })
35
+ }),
36
+ meta: {
37
+ kind: "builtin",
38
+ id: (0, __stryke_path_replace.replaceExtension)(id)
39
+ },
40
+ ...rest,
41
+ path: path.value,
42
+ children
43
+ });
44
+ }
45
+
46
+ //#endregion
47
+ exports.BuiltinFile = BuiltinFile;
@@ -0,0 +1,46 @@
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 };
@@ -0,0 +1,75 @@
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;