@powerlines/plugin-alloy 0.18.117 → 0.18.118

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 (127) hide show
  1. package/dist/core/components/index.cjs +6 -6
  2. package/dist/core/components/index.mjs +1 -1
  3. package/dist/core/components/output.cjs +5 -16
  4. package/dist/core/components/output.d.cts +5 -5
  5. package/dist/core/components/output.d.mts +5 -5
  6. package/dist/core/components/output.mjs +9 -20
  7. package/dist/core/components/single-line-comment.d.cts +2 -2
  8. package/dist/core/components/single-line-comment.d.mts +2 -2
  9. package/dist/core/components/source-file.d.cts +5 -5
  10. package/dist/core/components/source-file.d.mts +5 -5
  11. package/dist/core/contexts/context.cjs +2 -10
  12. package/dist/core/contexts/context.d.cts +1 -4
  13. package/dist/core/contexts/context.d.mts +1 -4
  14. package/dist/core/contexts/context.mjs +3 -9
  15. package/dist/core/contexts/index.cjs +0 -1
  16. package/dist/core/contexts/index.d.cts +2 -2
  17. package/dist/core/contexts/index.d.mts +2 -2
  18. package/dist/core/contexts/index.mjs +2 -2
  19. package/dist/core/index.cjs +6 -7
  20. package/dist/core/index.d.cts +2 -2
  21. package/dist/core/index.d.mts +2 -2
  22. package/dist/core/index.mjs +3 -3
  23. package/dist/index.cjs +7 -7
  24. package/dist/index.mjs +5 -5
  25. package/dist/internal/unctx.cjs +12 -0
  26. package/dist/internal/unctx.mjs +11 -0
  27. package/dist/types/components.d.cts +5 -126
  28. package/dist/types/components.d.mts +5 -126
  29. package/dist/types/plugin.d.cts +2 -9
  30. package/dist/types/plugin.d.mts +2 -9
  31. package/package.json +6 -6
  32. package/dist/helpers/capnp.cjs +0 -276
  33. package/dist/helpers/capnp.d.cts +0 -87
  34. package/dist/helpers/capnp.d.mts +0 -87
  35. package/dist/helpers/capnp.mjs +0 -259
  36. package/dist/helpers/create-builtin.cjs +0 -19
  37. package/dist/helpers/create-builtin.d.cts +0 -15
  38. package/dist/helpers/create-builtin.d.mts +0 -15
  39. package/dist/helpers/create-builtin.mjs +0 -18
  40. package/dist/helpers/index.cjs +0 -24
  41. package/dist/helpers/index.d.cts +0 -5
  42. package/dist/helpers/index.d.mts +0 -5
  43. package/dist/helpers/index.mjs +0 -6
  44. package/dist/helpers/refkey.cjs +0 -16
  45. package/dist/helpers/refkey.d.cts +0 -13
  46. package/dist/helpers/refkey.d.mts +0 -13
  47. package/dist/helpers/refkey.mjs +0 -15
  48. package/dist/helpers/typescript.cjs +0 -46
  49. package/dist/helpers/typescript.d.cts +0 -25
  50. package/dist/helpers/typescript.d.mts +0 -25
  51. package/dist/helpers/typescript.mjs +0 -45
  52. package/dist/markdown/components/index.cjs +0 -8
  53. package/dist/markdown/components/index.d.cts +0 -3
  54. package/dist/markdown/components/index.d.mts +0 -3
  55. package/dist/markdown/components/index.mjs +0 -4
  56. package/dist/markdown/components/markdown-file.cjs +0 -116
  57. package/dist/markdown/components/markdown-file.d.cts +0 -23
  58. package/dist/markdown/components/markdown-file.d.mts +0 -23
  59. package/dist/markdown/components/markdown-file.mjs +0 -114
  60. package/dist/markdown/components/markdown-table.cjs +0 -101
  61. package/dist/markdown/components/markdown-table.d.cts +0 -27
  62. package/dist/markdown/components/markdown-table.d.mts +0 -27
  63. package/dist/markdown/components/markdown-table.mjs +0 -98
  64. package/dist/markdown/contexts/index.cjs +0 -6
  65. package/dist/markdown/contexts/index.d.cts +0 -2
  66. package/dist/markdown/contexts/index.d.mts +0 -2
  67. package/dist/markdown/contexts/index.mjs +0 -3
  68. package/dist/markdown/contexts/markdown-table.cjs +0 -37
  69. package/dist/markdown/contexts/markdown-table.d.cts +0 -37
  70. package/dist/markdown/contexts/markdown-table.d.mts +0 -37
  71. package/dist/markdown/contexts/markdown-table.mjs +0 -33
  72. package/dist/markdown/index.cjs +0 -15
  73. package/dist/markdown/index.d.cts +0 -6
  74. package/dist/markdown/index.d.mts +0 -6
  75. package/dist/markdown/index.mjs +0 -7
  76. package/dist/types/components.cjs +0 -0
  77. package/dist/types/components.mjs +0 -1
  78. package/dist/types/index.cjs +0 -0
  79. package/dist/types/index.d.cts +0 -3
  80. package/dist/types/index.d.mts +0 -3
  81. package/dist/types/index.mjs +0 -1
  82. package/dist/types/plugin.cjs +0 -0
  83. package/dist/types/plugin.mjs +0 -1
  84. package/dist/typescript/components/builtin-file.cjs +0 -62
  85. package/dist/typescript/components/builtin-file.d.cts +0 -34
  86. package/dist/typescript/components/builtin-file.d.mts +0 -34
  87. package/dist/typescript/components/builtin-file.mjs +0 -61
  88. package/dist/typescript/components/dynamic-import-statement.cjs +0 -25
  89. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -32
  90. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -32
  91. package/dist/typescript/components/dynamic-import-statement.mjs +0 -24
  92. package/dist/typescript/components/entry-file.cjs +0 -42
  93. package/dist/typescript/components/entry-file.d.cts +0 -27
  94. package/dist/typescript/components/entry-file.d.mts +0 -27
  95. package/dist/typescript/components/entry-file.mjs +0 -40
  96. package/dist/typescript/components/index.cjs +0 -44
  97. package/dist/typescript/components/index.d.cts +0 -10
  98. package/dist/typescript/components/index.d.mts +0 -10
  99. package/dist/typescript/components/index.mjs +0 -11
  100. package/dist/typescript/components/record-expression.cjs +0 -12
  101. package/dist/typescript/components/record-expression.d.cts +0 -12
  102. package/dist/typescript/components/record-expression.d.mts +0 -12
  103. package/dist/typescript/components/record-expression.mjs +0 -11
  104. package/dist/typescript/components/tsdoc-reflection.cjs +0 -178
  105. package/dist/typescript/components/tsdoc-reflection.d.cts +0 -18
  106. package/dist/typescript/components/tsdoc-reflection.d.mts +0 -18
  107. package/dist/typescript/components/tsdoc-reflection.mjs +0 -175
  108. package/dist/typescript/components/tsdoc.cjs +0 -485
  109. package/dist/typescript/components/tsdoc.d.cts +0 -163
  110. package/dist/typescript/components/tsdoc.d.mts +0 -163
  111. package/dist/typescript/components/tsdoc.mjs +0 -465
  112. package/dist/typescript/components/typescript-file.cjs +0 -216
  113. package/dist/typescript/components/typescript-file.d.cts +0 -49
  114. package/dist/typescript/components/typescript-file.d.mts +0 -49
  115. package/dist/typescript/components/typescript-file.mjs +0 -213
  116. package/dist/typescript/components/typescript-interface.cjs +0 -73
  117. package/dist/typescript/components/typescript-interface.d.cts +0 -25
  118. package/dist/typescript/components/typescript-interface.d.mts +0 -25
  119. package/dist/typescript/components/typescript-interface.mjs +0 -71
  120. package/dist/typescript/components/typescript-object.cjs +0 -125
  121. package/dist/typescript/components/typescript-object.d.cts +0 -29
  122. package/dist/typescript/components/typescript-object.d.mts +0 -29
  123. package/dist/typescript/components/typescript-object.mjs +0 -123
  124. package/dist/typescript/index.cjs +0 -45
  125. package/dist/typescript/index.d.cts +0 -11
  126. package/dist/typescript/index.d.mts +0 -11
  127. package/dist/typescript/index.mjs +0 -12
@@ -1,7 +1,7 @@
1
- const require_core_components_single_line_comment = require('./single-line-comment.cjs');
2
- const require_core_components_source_file = require('./source-file.cjs');
3
- const require_core_components_output = require('./output.cjs');
1
+ const require_output = require('./output.cjs');
2
+ const require_single_line_comment = require('./single-line-comment.cjs');
3
+ const require_source_file = require('./source-file.cjs');
4
4
 
5
- exports.Output = require_core_components_output.Output;
6
- exports.SingleLineComment = require_core_components_single_line_comment.SingleLineComment;
7
- exports.SourceFile = require_core_components_source_file.SourceFile;
5
+ exports.Output = require_output.Output;
6
+ exports.SingleLineComment = require_single_line_comment.SingleLineComment;
7
+ exports.SourceFile = require_source_file.SourceFile;
@@ -1,5 +1,5 @@
1
+ import { Output } from "./output.mjs";
1
2
  import { SingleLineComment } from "./single-line-comment.mjs";
2
3
  import { SourceFile } from "./source-file.mjs";
3
- import { Output } from "./output.mjs";
4
4
 
5
5
  export { Output, SingleLineComment, SourceFile };
@@ -1,5 +1,4 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_core_contexts_context = require('../contexts/context.cjs');
3
2
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let __alloy_js_core = require("@alloy-js/core");
5
4
  let __stryke_path_replace = require("@stryke/path/replace");
@@ -9,32 +8,22 @@ let __stryke_path_replace = require("@stryke/path/replace");
9
8
  * Output component for rendering the Powerlines plugin's output files via templates.
10
9
  */
11
10
  function Output(props) {
12
- const [{ children, context, meta, basePath }, rest] = (0, __alloy_js_core.splitProps)(props, [
11
+ const [{ children, context, basePath }, rest] = (0, __alloy_js_core.splitProps)(props, [
13
12
  "children",
14
13
  "context",
15
- "meta",
16
14
  "basePath"
17
15
  ]);
18
16
  const basePathRef = (0, __alloy_js_core.computed)(() => basePath ? (0, __stryke_path_replace.replacePath)(basePath, context.workspaceConfig.workspaceRoot) : context.workspaceConfig.workspaceRoot);
19
- const Provider = require_core_contexts_context.unctx.use().Provider;
20
17
  return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Output, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
21
18
  get basePath() {
22
19
  return basePathRef.value;
23
20
  },
24
21
  get children() {
25
- return (0, __alloy_js_core_jsx_runtime.createComponent)(Provider, {
26
- value: {
27
- value: context,
28
- meta: meta ?? {}
22
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
23
+ get when() {
24
+ return Boolean(context);
29
25
  },
30
- get children() {
31
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
32
- get when() {
33
- return Boolean(context);
34
- },
35
- children
36
- });
37
- }
26
+ children
38
27
  });
39
28
  }
40
29
  }));
@@ -1,10 +1,10 @@
1
1
  import { MetaItem } from "../contexts/context.cjs";
2
- import * as _alloy_js_core16 from "@alloy-js/core";
3
- import { OutputProps as OutputProps$1 } from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
3
+ import { OutputProps } from "@alloy-js/core";
4
4
  import { PluginContext } from "powerlines/types/context";
5
5
 
6
6
  //#region src/core/components/output.d.ts
7
- interface OutputProps<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>> extends OutputProps$1 {
7
+ interface OutputProps$1<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>> extends OutputProps {
8
8
  /**
9
9
  * The current Powerlines process context.
10
10
  */
@@ -17,7 +17,7 @@ interface OutputProps<TContext extends PluginContext = PluginContext, TMeta exte
17
17
  /**
18
18
  * Output component for rendering the Powerlines plugin's output files via templates.
19
19
  */
20
- declare function Output<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(props: OutputProps<TContext, TMeta>): _alloy_js_core16.Children;
20
+ declare function Output<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(props: OutputProps$1<TContext, TMeta>): _alloy_js_core0.Children;
21
21
  declare type __ΩOutputProps = any[];
22
22
  //#endregion
23
- export { Output, OutputProps, __ΩOutputProps };
23
+ export { Output, OutputProps$1 as OutputProps, __ΩOutputProps };
@@ -1,10 +1,10 @@
1
1
  import { MetaItem } from "../contexts/context.mjs";
2
- import * as _alloy_js_core15 from "@alloy-js/core";
3
- import { OutputProps as OutputProps$1 } from "@alloy-js/core";
2
+ import * as _alloy_js_core1 from "@alloy-js/core";
3
+ import { OutputProps } from "@alloy-js/core";
4
4
  import { PluginContext } from "powerlines/types/context";
5
5
 
6
6
  //#region src/core/components/output.d.ts
7
- interface OutputProps<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>> extends OutputProps$1 {
7
+ interface OutputProps$1<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>> extends OutputProps {
8
8
  /**
9
9
  * The current Powerlines process context.
10
10
  */
@@ -17,7 +17,7 @@ interface OutputProps<TContext extends PluginContext = PluginContext, TMeta exte
17
17
  /**
18
18
  * Output component for rendering the Powerlines plugin's output files via templates.
19
19
  */
20
- declare function Output<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(props: OutputProps<TContext, TMeta>): _alloy_js_core15.Children;
20
+ declare function Output$1<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(props: OutputProps$1<TContext, TMeta>): _alloy_js_core1.Children;
21
21
  declare type __ΩOutputProps = any[];
22
22
  //#endregion
23
- export { Output, OutputProps, __ΩOutputProps };
23
+ export { Output$1 as Output, OutputProps$1 as OutputProps, __ΩOutputProps };
@@ -1,43 +1,32 @@
1
- import { unctx } from "../contexts/context.mjs";
2
1
  import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
3
- import { Output as Output$1, Show, computed, splitProps } from "@alloy-js/core";
2
+ import { Output, Show, computed, splitProps } from "@alloy-js/core";
4
3
  import { replacePath } from "@stryke/path/replace";
5
4
 
6
5
  //#region src/core/components/output.tsx
7
6
  /**
8
7
  * Output component for rendering the Powerlines plugin's output files via templates.
9
8
  */
10
- function Output(props) {
11
- const [{ children, context, meta, basePath }, rest] = splitProps(props, [
9
+ function Output$1(props) {
10
+ const [{ children, context, basePath }, rest] = splitProps(props, [
12
11
  "children",
13
12
  "context",
14
- "meta",
15
13
  "basePath"
16
14
  ]);
17
15
  const basePathRef = computed(() => basePath ? replacePath(basePath, context.workspaceConfig.workspaceRoot) : context.workspaceConfig.workspaceRoot);
18
- const Provider = unctx.use().Provider;
19
- return createComponent(Output$1, mergeProps(rest, {
16
+ return createComponent(Output, mergeProps(rest, {
20
17
  get basePath() {
21
18
  return basePathRef.value;
22
19
  },
23
20
  get children() {
24
- return createComponent(Provider, {
25
- value: {
26
- value: context,
27
- meta: meta ?? {}
21
+ return createComponent(Show, {
22
+ get when() {
23
+ return Boolean(context);
28
24
  },
29
- get children() {
30
- return createComponent(Show, {
31
- get when() {
32
- return Boolean(context);
33
- },
34
- children
35
- });
36
- }
25
+ children
37
26
  });
38
27
  }
39
28
  }));
40
29
  }
41
30
 
42
31
  //#endregion
43
- export { Output };
32
+ export { Output$1 as Output };
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core15 from "@alloy-js/core";
2
+ import * as _alloy_js_core1 from "@alloy-js/core";
3
3
 
4
4
  //#region src/core/components/single-line-comment.d.ts
5
5
  type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown";
@@ -15,7 +15,7 @@ interface SingleLineCommentProps extends ComponentProps {
15
15
  * A single line comment block. The children are rendered as a prose element, which means that they
16
16
  * are broken into multiple lines
17
17
  */
18
- declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core15.Children;
18
+ declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core1.Children;
19
19
  declare type __ΩSingleLineCommentVariant = any[];
20
20
  declare type __ΩSingleLineCommentProps = any[];
21
21
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.mjs";
2
- import * as _alloy_js_core14 from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
3
3
 
4
4
  //#region src/core/components/single-line-comment.d.ts
5
5
  type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown";
@@ -15,7 +15,7 @@ interface SingleLineCommentProps extends ComponentProps {
15
15
  * A single line comment block. The children are rendered as a prose element, which means that they
16
16
  * are broken into multiple lines
17
17
  */
18
- declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core14.Children;
18
+ declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core0.Children;
19
19
  declare type __ΩSingleLineCommentVariant = any[];
20
20
  declare type __ΩSingleLineCommentProps = any[];
21
21
  //#endregion
@@ -1,10 +1,10 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core7 from "@alloy-js/core";
3
- import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
3
+ import { SourceFileProps } from "@alloy-js/core";
4
4
  import { StoragePreset } from "powerlines/types/fs";
5
5
 
6
6
  //#region src/core/components/source-file.d.ts
7
- type SourceFileProps = SourceFileProps$1 & ComponentProps & {
7
+ type SourceFileProps$1 = SourceFileProps & ComponentProps & {
8
8
  /**
9
9
  * The storage preset for the output files.
10
10
  *
@@ -26,7 +26,7 @@ type SourceFileProps = SourceFileProps$1 & ComponentProps & {
26
26
  * @param props - The properties for the source file.
27
27
  * @returns The rendered source file component.
28
28
  */
29
- declare function SourceFile(props: SourceFileProps): _alloy_js_core7.Children;
29
+ declare function SourceFile(props: SourceFileProps$1): _alloy_js_core0.Children;
30
30
  declare type __ΩSourceFileProps = any[];
31
31
  //#endregion
32
- export { SourceFile, SourceFileProps, __ΩSourceFileProps };
32
+ export { SourceFile, SourceFileProps$1 as SourceFileProps, __ΩSourceFileProps };
@@ -1,10 +1,10 @@
1
1
  import { ComponentProps } from "../../types/components.mjs";
2
- import * as _alloy_js_core16 from "@alloy-js/core";
3
- import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
3
+ import { SourceFileProps } from "@alloy-js/core";
4
4
  import { StoragePreset } from "powerlines/types/fs";
5
5
 
6
6
  //#region src/core/components/source-file.d.ts
7
- type SourceFileProps = SourceFileProps$1 & ComponentProps & {
7
+ type SourceFileProps$1 = SourceFileProps & ComponentProps & {
8
8
  /**
9
9
  * The storage preset for the output files.
10
10
  *
@@ -26,7 +26,7 @@ type SourceFileProps = SourceFileProps$1 & ComponentProps & {
26
26
  * @param props - The properties for the source file.
27
27
  * @returns The rendered source file component.
28
28
  */
29
- declare function SourceFile(props: SourceFileProps): _alloy_js_core16.Children;
29
+ declare function SourceFile(props: SourceFileProps$1): _alloy_js_core0.Children;
30
30
  declare type __ΩSourceFileProps = any[];
31
31
  //#endregion
32
- export { SourceFile, SourceFileProps, __ΩSourceFileProps };
32
+ export { SourceFile, SourceFileProps$1 as SourceFileProps, __ΩSourceFileProps };
@@ -1,20 +1,13 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __alloy_js_core = require("@alloy-js/core");
3
- let node_async_hooks = require("node:async_hooks");
4
- let unctx = require("unctx");
1
+ const require_unctx = require('../../internal/unctx.cjs');
5
2
 
6
3
  //#region src/core/contexts/context.ts
7
- const unctx$1 = (0, unctx.createContext)({
8
- asyncContext: true,
9
- AsyncLocalStorage: node_async_hooks.AsyncLocalStorage
10
- });
11
4
  /**
12
5
  * Hook to access the Powerlines Context.
13
6
  *
14
7
  * @returns The Context.
15
8
  */
16
9
  function usePowerlinesContext() {
17
- return (0, __alloy_js_core.useContext)(unctx$1.use());
10
+ return require_unctx.unctx.use();
18
11
  }
19
12
  /**
20
13
  * Hook to safely access the {@link PluginContext | Powerlines context}.
@@ -54,7 +47,6 @@ function useMeta() {
54
47
  }
55
48
 
56
49
  //#endregion
57
- exports.unctx = unctx$1;
58
50
  exports.useMeta = useMeta;
59
51
  exports.useMetaSafe = useMetaSafe;
60
52
  exports.usePowerlines = usePowerlines;
@@ -1,6 +1,4 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
1
  import { PluginContext } from "powerlines/types/context";
3
- import * as unctx0 from "unctx";
4
2
  import { StoragePreset } from "powerlines/types/fs";
5
3
 
6
4
  //#region src/core/contexts/context.d.ts
@@ -32,7 +30,6 @@ interface PowerlinesContextInterface<TContext extends PluginContext = PluginCont
32
30
  */
33
31
  meta: TMeta;
34
32
  }
35
- declare const unctx: unctx0.UseContext<ComponentContext<PowerlinesContextInterface<any, any>>>;
36
33
  /**
37
34
  * Hook to access the Powerlines Context.
38
35
  *
@@ -66,4 +63,4 @@ declare function useMeta<TMeta extends Record<string, MetaItem> = Record<string,
66
63
  declare type __ΩMetaItem = any[];
67
64
  declare type __ΩPowerlinesContextInterface = any[];
68
65
  //#endregion
69
- export { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
66
+ export { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
@@ -1,5 +1,3 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
- import * as unctx0 from "unctx";
3
1
  import { PluginContext } from "powerlines/types/context";
4
2
  import { StoragePreset } from "powerlines/types/fs";
5
3
 
@@ -32,7 +30,6 @@ interface PowerlinesContextInterface<TContext extends PluginContext = PluginCont
32
30
  */
33
31
  meta: TMeta;
34
32
  }
35
- declare const unctx: unctx0.UseContext<ComponentContext<PowerlinesContextInterface<any, any>>>;
36
33
  /**
37
34
  * Hook to access the Powerlines Context.
38
35
  *
@@ -66,4 +63,4 @@ declare function useMeta<TMeta extends Record<string, MetaItem> = Record<string,
66
63
  declare type __ΩMetaItem = any[];
67
64
  declare type __ΩPowerlinesContextInterface = any[];
68
65
  //#endregion
69
- export { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
66
+ export { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
@@ -1,19 +1,13 @@
1
- import { useContext } from "@alloy-js/core";
2
- import { AsyncLocalStorage } from "node:async_hooks";
3
- import { createContext as createContext$1 } from "unctx";
1
+ import { unctx } from "../../internal/unctx.mjs";
4
2
 
5
3
  //#region src/core/contexts/context.ts
6
- const unctx = createContext$1({
7
- asyncContext: true,
8
- AsyncLocalStorage
9
- });
10
4
  /**
11
5
  * Hook to access the Powerlines Context.
12
6
  *
13
7
  * @returns The Context.
14
8
  */
15
9
  function usePowerlinesContext() {
16
- return useContext(unctx.use());
10
+ return unctx.use();
17
11
  }
18
12
  /**
19
13
  * Hook to safely access the {@link PluginContext | Powerlines context}.
@@ -53,4 +47,4 @@ function useMeta() {
53
47
  }
54
48
 
55
49
  //#endregion
56
- export { unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
50
+ export { useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
@@ -5,7 +5,6 @@ exports.ReflectionClassContext = require_core_contexts_reflection.ReflectionClas
5
5
  exports.ReflectionMethodContext = require_core_contexts_reflection.ReflectionMethodContext;
6
6
  exports.ReflectionParameterContext = require_core_contexts_reflection.ReflectionParameterContext;
7
7
  exports.ReflectionPropertyContext = require_core_contexts_reflection.ReflectionPropertyContext;
8
- exports.unctx = require_core_contexts_context.unctx;
9
8
  exports.useMeta = require_core_contexts_context.useMeta;
10
9
  exports.useMetaSafe = require_core_contexts_context.useMetaSafe;
11
10
  exports.usePowerlines = require_core_contexts_context.usePowerlines;
@@ -1,3 +1,3 @@
1
- import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.cjs";
1
+ import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.cjs";
2
2
  import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.cjs";
3
- export { MetaItem, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
3
+ export { MetaItem, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,3 +1,3 @@
1
- import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
1
+ import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
2
  import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
3
- export { MetaItem, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
3
+ export { MetaItem, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,4 +1,4 @@
1
- import { unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
1
+ import { useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
2
  import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
3
3
 
4
- export { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
4
+ export { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,19 +1,18 @@
1
+ const require_output = require('./components/output.cjs');
2
+ const require_single_line_comment = require('./components/single-line-comment.cjs');
1
3
  const require_core_contexts_context = require('./contexts/context.cjs');
2
- const require_core_components_single_line_comment = require('./components/single-line-comment.cjs');
3
4
  const require_core_contexts_reflection = require('./contexts/reflection.cjs');
4
5
  require('./contexts/index.cjs');
5
- const require_core_components_source_file = require('./components/source-file.cjs');
6
- const require_core_components_output = require('./components/output.cjs');
6
+ const require_source_file = require('./components/source-file.cjs');
7
7
  require('./components/index.cjs');
8
8
 
9
- exports.Output = require_core_components_output.Output;
9
+ exports.Output = require_output.Output;
10
10
  exports.ReflectionClassContext = require_core_contexts_reflection.ReflectionClassContext;
11
11
  exports.ReflectionMethodContext = require_core_contexts_reflection.ReflectionMethodContext;
12
12
  exports.ReflectionParameterContext = require_core_contexts_reflection.ReflectionParameterContext;
13
13
  exports.ReflectionPropertyContext = require_core_contexts_reflection.ReflectionPropertyContext;
14
- exports.SingleLineComment = require_core_components_single_line_comment.SingleLineComment;
15
- exports.SourceFile = require_core_components_source_file.SourceFile;
16
- exports.unctx = require_core_contexts_context.unctx;
14
+ exports.SingleLineComment = require_single_line_comment.SingleLineComment;
15
+ exports.SourceFile = require_source_file.SourceFile;
17
16
  exports.useMeta = require_core_contexts_context.useMeta;
18
17
  exports.useMetaSafe = require_core_contexts_context.useMetaSafe;
19
18
  exports.usePowerlines = require_core_contexts_context.usePowerlines;
@@ -1,8 +1,8 @@
1
- import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.cjs";
1
+ import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.cjs";
2
2
  import { Output, OutputProps, __ΩOutputProps } from "./components/output.cjs";
3
3
  import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./components/single-line-comment.cjs";
4
4
  import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./components/source-file.cjs";
5
5
  import "./components/index.cjs";
6
6
  import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./contexts/reflection.cjs";
7
7
  import "./contexts/index.cjs";
8
- export { MetaItem, Output, OutputProps, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, __ΩMetaItem, __ΩOutputProps, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
8
+ export { MetaItem, Output, OutputProps, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, __ΩMetaItem, __ΩOutputProps, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,8 +1,8 @@
1
- import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.mjs";
1
+ import { MetaItem, PowerlinesContextInterface, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.mjs";
2
2
  import { Output, OutputProps, __ΩOutputProps } from "./components/output.mjs";
3
3
  import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./components/single-line-comment.mjs";
4
4
  import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./components/source-file.mjs";
5
5
  import "./components/index.mjs";
6
6
  import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./contexts/reflection.mjs";
7
7
  import "./contexts/index.mjs";
8
- export { MetaItem, Output, OutputProps, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, __ΩMetaItem, __ΩOutputProps, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
8
+ export { MetaItem, Output, OutputProps, PowerlinesContextInterface, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, __ΩMetaItem, __ΩOutputProps, __ΩPowerlinesContextInterface, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,9 +1,9 @@
1
- import { unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.mjs";
1
+ import { Output } from "./components/output.mjs";
2
2
  import { SingleLineComment } from "./components/single-line-comment.mjs";
3
+ import { useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.mjs";
3
4
  import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./contexts/reflection.mjs";
4
5
  import "./contexts/index.mjs";
5
6
  import { SourceFile } from "./components/source-file.mjs";
6
- import { Output } from "./components/output.mjs";
7
7
  import "./components/index.mjs";
8
8
 
9
- export { Output, ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SourceFile, unctx, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
9
+ export { Output, ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SourceFile, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
package/dist/index.cjs CHANGED
@@ -1,15 +1,15 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_core_contexts_context = require('./core/contexts/context.cjs');
4
- const require_core_components_output = require('./core/components/output.cjs');
3
+ const require_output = require('./core/components/output.cjs');
4
+ const require_unctx = require('./internal/unctx.cjs');
5
5
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
- let __alloy_js_core = require("@alloy-js/core");
7
- let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
8
6
  let __alloy_js_babel_preset = require("@alloy-js/babel-preset");
9
7
  __alloy_js_babel_preset = require_rolldown_runtime.__toESM(__alloy_js_babel_preset);
8
+ let __alloy_js_core = require("@alloy-js/core");
10
9
  let __powerlines_plugin_babel = require("@powerlines/plugin-babel");
11
10
  __powerlines_plugin_babel = require_rolldown_runtime.__toESM(__powerlines_plugin_babel);
12
11
  let __stryke_json_storm_json = require("@stryke/json/storm-json");
12
+ let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
13
13
 
14
14
  //#region src/index.tsx
15
15
  /**
@@ -59,12 +59,12 @@ const plugin = (options = {}) => {
59
59
  this.debug("Attaching the `render` method to the context object.");
60
60
  this.render = async (children) => {
61
61
  const meta = {};
62
- await require_core_contexts_context.unctx.callAsync((0, __alloy_js_core.createNamedContext)("Powerlines", {
62
+ await require_unctx.unctx.callAsync({
63
63
  value: this,
64
64
  meta
65
- }), async () => {
65
+ }, async () => {
66
66
  const _self$ = this;
67
- await (0, __alloy_js_core.traverseOutput)(await (0, __alloy_js_core.renderAsync)((0, __alloy_js_core_jsx_runtime.createComponent)(require_core_components_output.Output, {
67
+ await (0, __alloy_js_core.traverseOutput)(await (0, __alloy_js_core.renderAsync)((0, __alloy_js_core_jsx_runtime.createComponent)(require_output.Output, {
68
68
  context: _self$,
69
69
  meta,
70
70
  get basePath() {
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { unctx } from "./core/contexts/context.mjs";
2
1
  import { Output as Output$1 } from "./core/components/output.mjs";
2
+ import { unctx } from "./internal/unctx.mjs";
3
3
  import { createComponent } from "@alloy-js/core/jsx-runtime";
4
- import { createNamedContext, renderAsync, traverseOutput } from "@alloy-js/core";
5
- import { findFileExtension, findFileExtensionSafe } from "@stryke/path/file-path-fns";
6
4
  import alloyPreset from "@alloy-js/babel-preset";
5
+ import { renderAsync, traverseOutput } from "@alloy-js/core";
7
6
  import babel from "@powerlines/plugin-babel";
8
7
  import { StormJSON } from "@stryke/json/storm-json";
8
+ import { findFileExtension, findFileExtensionSafe } from "@stryke/path/file-path-fns";
9
9
 
10
10
  //#region src/index.tsx
11
11
  /**
@@ -55,10 +55,10 @@ const plugin = (options = {}) => {
55
55
  this.debug("Attaching the `render` method to the context object.");
56
56
  this.render = async (children) => {
57
57
  const meta = {};
58
- await unctx.callAsync(createNamedContext("Powerlines", {
58
+ await unctx.callAsync({
59
59
  value: this,
60
60
  meta
61
- }), async () => {
61
+ }, async () => {
62
62
  const _self$ = this;
63
63
  await traverseOutput(await renderAsync(createComponent(Output$1, {
64
64
  context: _self$,
@@ -0,0 +1,12 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let node_async_hooks = require("node:async_hooks");
3
+ let unctx = require("unctx");
4
+
5
+ //#region src/internal/unctx.ts
6
+ const unctx$1 = (0, unctx.createContext)({
7
+ asyncContext: true,
8
+ AsyncLocalStorage: node_async_hooks.AsyncLocalStorage
9
+ });
10
+
11
+ //#endregion
12
+ exports.unctx = unctx$1;
@@ -0,0 +1,11 @@
1
+ import { AsyncLocalStorage } from "node:async_hooks";
2
+ import { createContext } from "unctx";
3
+
4
+ //#region src/internal/unctx.ts
5
+ const unctx = createContext({
6
+ asyncContext: true,
7
+ AsyncLocalStorage
8
+ });
9
+
10
+ //#endregion
11
+ export { unctx };