@powerlines/plugin-alloy 0.19.3 → 0.19.5

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 (47) hide show
  1. package/dist/core/components/output.cjs +5 -15
  2. package/dist/core/components/output.d.cts +2 -2
  3. package/dist/core/components/output.d.mts +2 -2
  4. package/dist/core/components/output.mjs +5 -15
  5. package/dist/core/components/single-line-comment.d.cts +2 -2
  6. package/dist/core/components/source-file.d.cts +2 -2
  7. package/dist/core/components/source-file.d.mts +2 -2
  8. package/dist/core/contexts/context.cjs +6 -12
  9. package/dist/core/contexts/context.d.cts +6 -11
  10. package/dist/core/contexts/context.d.mts +6 -11
  11. package/dist/core/contexts/context.mjs +7 -11
  12. package/dist/core/contexts/index.cjs +0 -1
  13. package/dist/core/contexts/index.d.cts +2 -2
  14. package/dist/core/contexts/index.d.mts +2 -2
  15. package/dist/core/contexts/index.mjs +2 -2
  16. package/dist/core/index.cjs +1 -2
  17. package/dist/core/index.d.cts +2 -2
  18. package/dist/core/index.d.mts +2 -2
  19. package/dist/core/index.mjs +2 -2
  20. package/dist/index.cjs +35 -30
  21. package/dist/index.mjs +35 -30
  22. package/dist/internal/unctx.cjs +7 -0
  23. package/dist/internal/unctx.mjs +7 -0
  24. package/dist/markdown/components/front-matter.d.cts +2 -2
  25. package/dist/markdown/components/front-matter.d.mts +2 -2
  26. package/dist/markdown/components/markdown-file.cjs +1 -1
  27. package/dist/markdown/components/markdown-file.d.cts +3 -3
  28. package/dist/markdown/components/markdown-file.d.mts +3 -3
  29. package/dist/markdown/components/markdown-file.mjs +1 -1
  30. package/dist/markdown/components/markdown-table.d.cts +4 -4
  31. package/dist/markdown/components/markdown-table.d.mts +4 -4
  32. package/dist/node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.cjs +83 -0
  33. package/dist/node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs +82 -0
  34. package/dist/typescript/components/builtin-file.d.cts +2 -2
  35. package/dist/typescript/components/builtin-file.d.mts +2 -2
  36. package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
  37. package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
  38. package/dist/typescript/components/entry-file.d.cts +2 -2
  39. package/dist/typescript/components/entry-file.d.mts +2 -2
  40. package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
  41. package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
  42. package/dist/typescript/components/typescript-file.cjs +1 -1
  43. package/dist/typescript/components/typescript-file.mjs +1 -1
  44. package/dist/typescript/components/typescript-interface.d.cts +3 -3
  45. package/dist/typescript/components/typescript-object.d.cts +3 -3
  46. package/dist/typescript/components/typescript-object.d.mts +3 -3
  47. package/package.json +64 -294
package/dist/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Output as Output$1 } from "./core/components/output.mjs";
2
+ import { unctx } from "./internal/unctx.mjs";
2
3
  import { createComponent } from "@alloy-js/core/jsx-runtime";
3
4
  import alloyPreset from "@alloy-js/babel-preset";
4
5
  import { renderAsync, traverseOutput } from "@alloy-js/core";
@@ -32,8 +33,7 @@ const plugin = (options = {}) => {
32
33
  ]] } },
33
34
  build: {
34
35
  inputOptions: { transform: { jsx: "preserve" } },
35
- external: [/^@?powerlines\//, /^@alloy-js\//],
36
- noExternal: ["@powerlines/plugin-alloy"]
36
+ external: [/^@?powerlines\//, /^@alloy-js\//]
37
37
  }
38
38
  };
39
39
  },
@@ -54,38 +54,43 @@ const plugin = (options = {}) => {
54
54
  async handler() {
55
55
  this.debug("Attaching the `render` method to the context object.");
56
56
  this.render = async (children) => {
57
- const _self$ = this;
58
57
  const meta = {};
59
- await traverseOutput(await renderAsync(createComponent(Output$1, {
60
- context: _self$,
61
- meta,
62
- get basePath() {
63
- return _self$.workspaceConfig.workspaceRoot;
64
- },
65
- children
66
- })), {
67
- visitDirectory: (directory) => {
68
- if (this.fs.existsSync(directory.path)) return;
69
- this.fs.mkdirSync(directory.path);
70
- },
71
- visitFile: (file) => {
72
- if ("contents" in file) {
73
- const metadata = meta[file.path] ?? {};
74
- if (metadata.kind === "builtin") {
75
- if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
76
- this.emitBuiltinSync(file.contents, metadata.id, {
58
+ await unctx.callAsync({
59
+ value: this,
60
+ meta
61
+ }, async () => {
62
+ const _self$ = this;
63
+ await traverseOutput(await renderAsync(createComponent(Output$1, {
64
+ context: _self$,
65
+ meta,
66
+ get basePath() {
67
+ return _self$.workspaceConfig.workspaceRoot;
68
+ },
69
+ children
70
+ })), {
71
+ visitDirectory: (directory) => {
72
+ if (this.fs.existsSync(directory.path)) return;
73
+ this.fs.mkdirSync(directory.path);
74
+ },
75
+ visitFile: (file) => {
76
+ if ("contents" in file) {
77
+ const metadata = meta[file.path] ?? {};
78
+ if (metadata.kind === "builtin") {
79
+ if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
80
+ this.emitBuiltinSync(file.contents, metadata.id, {
81
+ skipFormat: metadata.skipFormat,
82
+ storage: metadata.storage,
83
+ extension: findFileExtension(file.path)
84
+ });
85
+ } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
77
86
  skipFormat: metadata.skipFormat,
78
87
  storage: metadata.storage,
79
- extension: findFileExtension(file.path)
88
+ ...metadata.typeDefinition ?? {}
80
89
  });
81
- } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
82
- skipFormat: metadata.skipFormat,
83
- storage: metadata.storage,
84
- ...metadata.typeDefinition ?? {}
85
- });
86
- else this.emitSync(file.contents, file.path, metadata);
87
- } else this.fs.copySync(file.sourcePath, file.path);
88
- }
90
+ else this.emitSync(file.contents, file.path, metadata);
91
+ } else this.fs.copySync(file.sourcePath, file.path);
92
+ }
93
+ });
89
94
  });
90
95
  };
91
96
  }
@@ -0,0 +1,7 @@
1
+ const require_index = require('../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.cjs');
2
+
3
+ //#region src/internal/unctx.ts
4
+ const unctx = require_index.createContext();
5
+
6
+ //#endregion
7
+ exports.unctx = unctx;
@@ -0,0 +1,7 @@
1
+ import { createContext } from "../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs";
2
+
3
+ //#region src/internal/unctx.ts
4
+ const unctx = createContext();
5
+
6
+ //#endregion
7
+ export { unctx };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core4 from "@alloy-js/core";
1
+ import * as _alloy_js_core5 from "@alloy-js/core";
2
2
 
3
3
  //#region src/markdown/components/front-matter.d.ts
4
4
  interface FrontMatterProps {
@@ -9,7 +9,7 @@ interface FrontMatterProps {
9
9
  *
10
10
  * @see https://jekyllrb.com/docs/front-matter/
11
11
  */
12
- declare function FrontMatter(props: FrontMatterProps): _alloy_js_core4.Children;
12
+ declare function FrontMatter(props: FrontMatterProps): _alloy_js_core5.Children;
13
13
  declare type __ΩFrontMatterProps = any[];
14
14
  //#endregion
15
15
  export { FrontMatter, FrontMatterProps, __ΩFrontMatterProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core7 from "@alloy-js/core";
1
+ import * as _alloy_js_core2 from "@alloy-js/core";
2
2
 
3
3
  //#region src/markdown/components/front-matter.d.ts
4
4
  interface FrontMatterProps {
@@ -9,7 +9,7 @@ interface FrontMatterProps {
9
9
  *
10
10
  * @see https://jekyllrb.com/docs/front-matter/
11
11
  */
12
- declare function FrontMatter(props: FrontMatterProps): _alloy_js_core7.Children;
12
+ declare function FrontMatter(props: FrontMatterProps): _alloy_js_core2.Children;
13
13
  declare type __ΩFrontMatterProps = any[];
14
14
  //#endregion
15
15
  export { FrontMatter, FrontMatterProps, __ΩFrontMatterProps };
@@ -1,6 +1,6 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_core_contexts_context = require('../../core/contexts/context.cjs');
3
2
  const require_single_line_comment = require('../../core/components/single-line-comment.cjs');
3
+ const require_core_contexts_context = require('../../core/contexts/context.cjs');
4
4
  const require_source_file = require('../../core/components/source-file.cjs');
5
5
  const require_front_matter = require('./front-matter.cjs');
6
6
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps, SourceFileHeaderProps } from "../../types/components.cjs";
2
2
  import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.cjs";
3
3
  import { FrontMatterProps } from "./front-matter.cjs";
4
- import * as _alloy_js_core2 from "@alloy-js/core";
4
+ import * as _alloy_js_core6 from "@alloy-js/core";
5
5
 
6
6
  //#region src/markdown/components/markdown-file.d.ts
7
7
  type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & MarkdownFileHeaderProps;
@@ -11,7 +11,7 @@ type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps &
11
11
  * @param props - The properties for the source file.
12
12
  * @returns The rendered source file component.
13
13
  */
14
- declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core2.Children;
14
+ declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core6.Children;
15
15
  type MarkdownFileHeaderProps = SourceFileHeaderProps & {
16
16
  frontMatter?: FrontMatterProps["data"];
17
17
  };
@@ -21,7 +21,7 @@ type MarkdownFileHeaderProps = SourceFileHeaderProps & {
21
21
  * @param props - The properties for the source file header.
22
22
  * @returns The rendered source file header.
23
23
  */
24
- declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): _alloy_js_core2.Children;
24
+ declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): _alloy_js_core6.Children;
25
25
  declare type __ΩMarkdownFileProps = any[];
26
26
  declare type __ΩMarkdownFileHeaderProps = any[];
27
27
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps, SourceFileHeaderProps } from "../../types/components.mjs";
2
2
  import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.mjs";
3
3
  import { FrontMatterProps } from "./front-matter.mjs";
4
- import * as _alloy_js_core9 from "@alloy-js/core";
4
+ import * as _alloy_js_core6 from "@alloy-js/core";
5
5
 
6
6
  //#region src/markdown/components/markdown-file.d.ts
7
7
  type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & MarkdownFileHeaderProps;
@@ -11,7 +11,7 @@ type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps &
11
11
  * @param props - The properties for the source file.
12
12
  * @returns The rendered source file component.
13
13
  */
14
- declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core9.Children;
14
+ declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core6.Children;
15
15
  type MarkdownFileHeaderProps = SourceFileHeaderProps & {
16
16
  frontMatter?: FrontMatterProps["data"];
17
17
  };
@@ -21,7 +21,7 @@ type MarkdownFileHeaderProps = SourceFileHeaderProps & {
21
21
  * @param props - The properties for the source file header.
22
22
  * @returns The rendered source file header.
23
23
  */
24
- declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): _alloy_js_core9.Children;
24
+ declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): _alloy_js_core6.Children;
25
25
  declare type __ΩMarkdownFileProps = any[];
26
26
  declare type __ΩMarkdownFileHeaderProps = any[];
27
27
  //#endregion
@@ -1,5 +1,5 @@
1
- import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
2
1
  import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
2
+ import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
3
3
  import { SourceFile } from "../../core/components/source-file.mjs";
4
4
  import { FrontMatter } from "./front-matter.mjs";
5
5
  import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
2
  import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.cjs";
3
- import * as _alloy_js_core0 from "@alloy-js/core";
3
+ import * as _alloy_js_core1 from "@alloy-js/core";
4
4
 
5
5
  //#region src/markdown/components/markdown-table.d.ts
6
6
  interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
@@ -9,18 +9,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
9
9
  /**
10
10
  * Component that provides a context for rendering markdown tables.
11
11
  */
12
- declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core0.Children;
12
+ declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core1.Children;
13
13
  type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
14
14
  width?: number;
15
15
  };
16
16
  /**
17
17
  * Component that provides a context for rendering markdown tables.
18
18
  */
19
- declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
19
+ declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core1.Children;
20
20
  /**
21
21
  * Component that provides a context for rendering markdown tables.
22
22
  */
23
- declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
23
+ declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core1.Children;
24
24
  declare type __ΩMarkdownTableProps = any[];
25
25
  declare type __ΩMarkdownTableColumnProps = any[];
26
26
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from "../../types/components.mjs";
2
2
  import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.mjs";
3
- import * as _alloy_js_core11 from "@alloy-js/core";
3
+ import * as _alloy_js_core3 from "@alloy-js/core";
4
4
 
5
5
  //#region src/markdown/components/markdown-table.d.ts
6
6
  interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
@@ -9,18 +9,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
9
9
  /**
10
10
  * Component that provides a context for rendering markdown tables.
11
11
  */
12
- declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core11.Children;
12
+ declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core3.Children;
13
13
  type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
14
14
  width?: number;
15
15
  };
16
16
  /**
17
17
  * Component that provides a context for rendering markdown tables.
18
18
  */
19
- declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core11.Children;
19
+ declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core3.Children;
20
20
  /**
21
21
  * Component that provides a context for rendering markdown tables.
22
22
  */
23
- declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core11.Children;
23
+ declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core3.Children;
24
24
  declare type __ΩMarkdownTableProps = any[];
25
25
  declare type __ΩMarkdownTableColumnProps = any[];
26
26
  //#endregion
@@ -0,0 +1,83 @@
1
+
2
+ //#region ../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs
3
+ function createContext(opts = {}) {
4
+ let currentInstance;
5
+ let isSingleton = false;
6
+ const checkConflict = (instance) => {
7
+ if (currentInstance && currentInstance !== instance) throw new Error("Context conflict");
8
+ };
9
+ let als;
10
+ if (opts.asyncContext) {
11
+ const _AsyncLocalStorage = opts.AsyncLocalStorage || globalThis.AsyncLocalStorage;
12
+ if (_AsyncLocalStorage) als = new _AsyncLocalStorage();
13
+ else console.warn("[unctx] `AsyncLocalStorage` is not provided.");
14
+ }
15
+ const _getCurrentInstance = () => {
16
+ if (als) {
17
+ const instance = als.getStore();
18
+ if (instance !== void 0) return instance;
19
+ }
20
+ return currentInstance;
21
+ };
22
+ return {
23
+ use: () => {
24
+ const _instance = _getCurrentInstance();
25
+ if (_instance === void 0) throw new Error("Context is not available");
26
+ return _instance;
27
+ },
28
+ tryUse: () => {
29
+ return _getCurrentInstance();
30
+ },
31
+ set: (instance, replace) => {
32
+ if (!replace) checkConflict(instance);
33
+ currentInstance = instance;
34
+ isSingleton = true;
35
+ },
36
+ unset: () => {
37
+ currentInstance = void 0;
38
+ isSingleton = false;
39
+ },
40
+ call: (instance, callback) => {
41
+ checkConflict(instance);
42
+ currentInstance = instance;
43
+ try {
44
+ return als ? als.run(instance, callback) : callback();
45
+ } finally {
46
+ if (!isSingleton) currentInstance = void 0;
47
+ }
48
+ },
49
+ async callAsync(instance, callback) {
50
+ currentInstance = instance;
51
+ const onRestore = () => {
52
+ currentInstance = instance;
53
+ };
54
+ const onLeave = () => currentInstance === instance ? onRestore : void 0;
55
+ asyncHandlers.add(onLeave);
56
+ try {
57
+ const r = als ? als.run(instance, callback) : callback();
58
+ if (!isSingleton) currentInstance = void 0;
59
+ return await r;
60
+ } finally {
61
+ asyncHandlers.delete(onLeave);
62
+ }
63
+ }
64
+ };
65
+ }
66
+ function createNamespace(defaultOpts = {}) {
67
+ const contexts = {};
68
+ return { get(key, opts = {}) {
69
+ if (!contexts[key]) contexts[key] = createContext({
70
+ ...defaultOpts,
71
+ ...opts
72
+ });
73
+ return contexts[key];
74
+ } };
75
+ }
76
+ const _globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : {};
77
+ const globalKey = "__unctx__";
78
+ const defaultNamespace = _globalThis[globalKey] || (_globalThis[globalKey] = createNamespace());
79
+ const asyncHandlersKey = "__unctx_async_handlers__";
80
+ const asyncHandlers = _globalThis[asyncHandlersKey] || (_globalThis[asyncHandlersKey] = /* @__PURE__ */ new Set());
81
+
82
+ //#endregion
83
+ exports.createContext = createContext;
@@ -0,0 +1,82 @@
1
+ //#region ../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs
2
+ function createContext(opts = {}) {
3
+ let currentInstance;
4
+ let isSingleton = false;
5
+ const checkConflict = (instance) => {
6
+ if (currentInstance && currentInstance !== instance) throw new Error("Context conflict");
7
+ };
8
+ let als;
9
+ if (opts.asyncContext) {
10
+ const _AsyncLocalStorage = opts.AsyncLocalStorage || globalThis.AsyncLocalStorage;
11
+ if (_AsyncLocalStorage) als = new _AsyncLocalStorage();
12
+ else console.warn("[unctx] `AsyncLocalStorage` is not provided.");
13
+ }
14
+ const _getCurrentInstance = () => {
15
+ if (als) {
16
+ const instance = als.getStore();
17
+ if (instance !== void 0) return instance;
18
+ }
19
+ return currentInstance;
20
+ };
21
+ return {
22
+ use: () => {
23
+ const _instance = _getCurrentInstance();
24
+ if (_instance === void 0) throw new Error("Context is not available");
25
+ return _instance;
26
+ },
27
+ tryUse: () => {
28
+ return _getCurrentInstance();
29
+ },
30
+ set: (instance, replace) => {
31
+ if (!replace) checkConflict(instance);
32
+ currentInstance = instance;
33
+ isSingleton = true;
34
+ },
35
+ unset: () => {
36
+ currentInstance = void 0;
37
+ isSingleton = false;
38
+ },
39
+ call: (instance, callback) => {
40
+ checkConflict(instance);
41
+ currentInstance = instance;
42
+ try {
43
+ return als ? als.run(instance, callback) : callback();
44
+ } finally {
45
+ if (!isSingleton) currentInstance = void 0;
46
+ }
47
+ },
48
+ async callAsync(instance, callback) {
49
+ currentInstance = instance;
50
+ const onRestore = () => {
51
+ currentInstance = instance;
52
+ };
53
+ const onLeave = () => currentInstance === instance ? onRestore : void 0;
54
+ asyncHandlers.add(onLeave);
55
+ try {
56
+ const r = als ? als.run(instance, callback) : callback();
57
+ if (!isSingleton) currentInstance = void 0;
58
+ return await r;
59
+ } finally {
60
+ asyncHandlers.delete(onLeave);
61
+ }
62
+ }
63
+ };
64
+ }
65
+ function createNamespace(defaultOpts = {}) {
66
+ const contexts = {};
67
+ return { get(key, opts = {}) {
68
+ if (!contexts[key]) contexts[key] = createContext({
69
+ ...defaultOpts,
70
+ ...opts
71
+ });
72
+ return contexts[key];
73
+ } };
74
+ }
75
+ const _globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : {};
76
+ const globalKey = "__unctx__";
77
+ const defaultNamespace = _globalThis[globalKey] || (_globalThis[globalKey] = createNamespace());
78
+ const asyncHandlersKey = "__unctx_async_handlers__";
79
+ const asyncHandlers = _globalThis[asyncHandlersKey] || (_globalThis[asyncHandlersKey] = /* @__PURE__ */ new Set());
80
+
81
+ //#endregion
82
+ export { createContext };
@@ -1,6 +1,6 @@
1
1
  import { TSDocModuleProps } from "./tsdoc.cjs";
2
2
  import { TypescriptFileProps } from "./typescript-file.cjs";
3
- import * as _alloy_js_core5 from "@alloy-js/core";
3
+ import * as _alloy_js_core10 from "@alloy-js/core";
4
4
 
5
5
  //#region src/typescript/components/builtin-file.d.ts
6
6
  type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
@@ -28,7 +28,7 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
28
28
  * @param props - The properties for the source file.
29
29
  * @returns The rendered source file component.
30
30
  */
31
- declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core5.Children;
31
+ declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core10.Children;
32
32
  declare type __ΩBuiltinFileProps = any[];
33
33
  //#endregion
34
34
  export { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps };
@@ -1,6 +1,6 @@
1
1
  import { TSDocModuleProps } from "./tsdoc.mjs";
2
2
  import { TypescriptFileProps } from "./typescript-file.mjs";
3
- import * as _alloy_js_core8 from "@alloy-js/core";
3
+ import * as _alloy_js_core10 from "@alloy-js/core";
4
4
 
5
5
  //#region src/typescript/components/builtin-file.d.ts
6
6
  type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
@@ -28,7 +28,7 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
28
28
  * @param props - The properties for the source file.
29
29
  * @returns The rendered source file component.
30
30
  */
31
- declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core8.Children;
31
+ declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core10.Children;
32
32
  declare type __ΩBuiltinFileProps = any[];
33
33
  //#endregion
34
34
  export { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core14 from "@alloy-js/core";
1
+ import * as _alloy_js_core11 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core14.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core11.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core2 from "@alloy-js/core";
1
+ import * as _alloy_js_core11 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core2.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core11.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
@@ -1,5 +1,5 @@
1
1
  import { TypescriptFileProps } from "./typescript-file.cjs";
2
- import * as _alloy_js_core9 from "@alloy-js/core";
2
+ import * as _alloy_js_core12 from "@alloy-js/core";
3
3
  import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core9.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core12.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFile, EntryFileProps, __ΩEntryFileProps };
@@ -1,5 +1,5 @@
1
1
  import { TypescriptFileProps } from "./typescript-file.mjs";
2
- import * as _alloy_js_core6 from "@alloy-js/core";
2
+ import * as _alloy_js_core12 from "@alloy-js/core";
3
3
  import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core6.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core12.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFile, EntryFileProps, __ΩEntryFileProps };
@@ -1,18 +1,18 @@
1
1
  import { TSDocProps } from "./tsdoc.cjs";
2
- import * as _alloy_js_core6 from "@alloy-js/core";
2
+ import * as _alloy_js_core13 from "@alloy-js/core";
3
3
 
4
4
  //#region src/typescript/components/tsdoc-reflection.d.ts
5
5
  /**
6
6
  * Generates a TypeScript interface property for the given reflection class.
7
7
  */
8
- declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core6.Children;
8
+ declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core13.Children;
9
9
  /**
10
10
  * Generates a TypeScript interface property for the given reflection class.
11
11
  */
12
- declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core6.Children;
12
+ declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core13.Children;
13
13
  /**
14
14
  * Generates a TypeScript interface property for the given reflection class.
15
15
  */
16
- declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core6.Children;
16
+ declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core13.Children;
17
17
  //#endregion
18
18
  export { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
@@ -1,18 +1,18 @@
1
1
  import { TSDocProps } from "./tsdoc.mjs";
2
- import * as _alloy_js_core3 from "@alloy-js/core";
2
+ import * as _alloy_js_core13 from "@alloy-js/core";
3
3
 
4
4
  //#region src/typescript/components/tsdoc-reflection.d.ts
5
5
  /**
6
6
  * Generates a TypeScript interface property for the given reflection class.
7
7
  */
8
- declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core3.Children;
8
+ declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core13.Children;
9
9
  /**
10
10
  * Generates a TypeScript interface property for the given reflection class.
11
11
  */
12
- declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core3.Children;
12
+ declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core13.Children;
13
13
  /**
14
14
  * Generates a TypeScript interface property for the given reflection class.
15
15
  */
16
- declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core3.Children;
16
+ declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core13.Children;
17
17
  //#endregion
18
18
  export { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
@@ -1,6 +1,6 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_core_contexts_context = require('../../core/contexts/context.cjs');
3
2
  const require_single_line_comment = require('../../core/components/single-line-comment.cjs');
3
+ const require_core_contexts_context = require('../../core/contexts/context.cjs');
4
4
  const require_source_file = require('../../core/components/source-file.cjs');
5
5
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
6
  let __alloy_js_core = require("@alloy-js/core");
@@ -1,5 +1,5 @@
1
- import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
2
1
  import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
2
+ import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
3
3
  import { SourceFile } from "../../core/components/source-file.mjs";
4
4
  import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
5
5
  import { For, Scope, Show, SourceDirectoryContext, code, splitProps, useContext, useScope } from "@alloy-js/core";
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core10 from "@alloy-js/core";
2
+ import * as _alloy_js_core16 from "@alloy-js/core";
3
3
  import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
4
4
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
5
5
 
@@ -14,11 +14,11 @@ interface TypescriptInterfacePropertyProps extends Omit<InterfaceMemberProps, "n
14
14
  /**
15
15
  * Generates a TypeScript interface for the given reflection class.
16
16
  */
17
- declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core10.Children;
17
+ declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core16.Children;
18
18
  /**
19
19
  * Generates a TypeScript interface property for the given reflection class.
20
20
  */
21
- declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core10.Children;
21
+ declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core16.Children;
22
22
  declare type __ΩTypeScriptInterfaceProps = any[];
23
23
  declare type __ΩTypescriptInterfacePropertyProps = any[];
24
24
  //#endregion