@powerlines/plugin-env 0.15.4 → 0.15.6
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.
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/babel/index.cjs +1 -0
- package/dist/babel/index.d.cts +1 -0
- package/dist/babel/index.d.mts +1 -0
- package/dist/babel/index.mjs +3 -0
- package/dist/babel/plugin.cjs +200 -0
- package/dist/babel/plugin.d.cts +8 -0
- package/dist/babel/plugin.d.mts +9 -0
- package/dist/babel/plugin.mjs +198 -0
- package/dist/components/docs.cjs +70 -3
- package/dist/components/docs.d.cts +8 -1
- package/dist/components/docs.d.mts +8 -1
- package/dist/components/docs.mjs +68 -2
- package/dist/components/env.cjs +574 -4
- package/dist/components/env.d.cts +19 -2
- package/dist/components/env.d.mts +19 -3
- package/dist/components/env.mjs +570 -2
- package/dist/components/index.cjs +5 -7
- package/dist/components/index.d.cts +2 -4
- package/dist/components/index.d.mts +2 -5
- package/dist/components/index.mjs +2 -4
- package/dist/deepkit/schemas/reflection.cjs +5368 -0
- package/dist/{plugin-BwuEBScL.d.cts → deepkit/schemas/reflection.d.cts} +1 -268
- package/dist/{plugin-BaInAuAh.d.mts → deepkit/schemas/reflection.d.mts} +59 -326
- package/dist/deepkit/schemas/reflection.mjs +5365 -0
- package/dist/deepkit/schemas/reflection2.cjs +4112 -0
- package/dist/deepkit/schemas/reflection2.mjs +4110 -0
- package/dist/deepkit/src/capnp.cjs +1692 -0
- package/dist/deepkit/src/capnp.mjs +1690 -0
- package/dist/deepkit/src/esbuild-plugin.cjs +99 -0
- package/dist/deepkit/src/esbuild-plugin.mjs +98 -0
- package/dist/deepkit/src/reflect-type.cjs +40 -0
- package/dist/deepkit/src/reflect-type.mjs +38 -0
- package/dist/deepkit/src/resolve-reflections.cjs +23 -0
- package/dist/deepkit/src/resolve-reflections.mjs +22 -0
- package/dist/deepkit/src/transformer.cjs +92 -0
- package/dist/deepkit/src/transformer.mjs +89 -0
- package/dist/deepkit/src/transpile.cjs +39 -0
- package/dist/deepkit/src/transpile.mjs +37 -0
- package/dist/deepkit/src/types.cjs +22 -0
- package/dist/deepkit/src/types.d.cts +10 -0
- package/dist/deepkit/src/types.d.mts +10 -0
- package/dist/deepkit/src/types.mjs +21 -0
- package/dist/deepkit/src/utilities.cjs +182 -0
- package/dist/deepkit/src/utilities.mjs +181 -0
- package/dist/helpers/automd-generator.cjs +32 -0
- package/dist/helpers/automd-generator.mjs +31 -0
- package/dist/helpers/create-reflection-resource.cjs +98 -0
- package/dist/helpers/create-reflection-resource.d.cts +15 -0
- package/dist/helpers/create-reflection-resource.d.mts +15 -0
- package/dist/helpers/create-reflection-resource.mjs +97 -0
- package/dist/helpers/index.cjs +6 -0
- package/dist/helpers/index.d.cts +6 -0
- package/dist/helpers/index.d.mts +6 -0
- package/dist/helpers/index.mjs +8 -0
- package/dist/helpers/load.cjs +134 -0
- package/dist/helpers/load.d.cts +35 -0
- package/dist/helpers/load.d.mts +36 -0
- package/dist/helpers/load.mjs +131 -0
- package/dist/helpers/persistence.cjs +320 -0
- package/dist/helpers/persistence.d.cts +84 -0
- package/dist/helpers/persistence.d.mts +84 -0
- package/dist/helpers/persistence.mjs +308 -0
- package/dist/helpers/reflect.cjs +263 -0
- package/dist/helpers/reflect.d.cts +46 -0
- package/dist/helpers/reflect.d.mts +46 -0
- package/dist/helpers/reflect.mjs +254 -0
- package/dist/helpers/source-file-env.cjs +58 -0
- package/dist/helpers/source-file-env.d.cts +8 -0
- package/dist/helpers/source-file-env.d.mts +8 -0
- package/dist/helpers/source-file-env.mjs +56 -0
- package/dist/helpers/template-helpers.cjs +70 -0
- package/dist/helpers/template-helpers.d.cts +15 -0
- package/dist/helpers/template-helpers.d.mts +15 -0
- package/dist/helpers/template-helpers.mjs +69 -0
- package/dist/index.cjs +82 -696
- package/dist/index.d.cts +16 -185
- package/dist/index.d.mts +17 -190
- package/dist/index.mjs +31 -648
- package/dist/plugin-alloy/src/core/components/output.cjs +45 -0
- package/dist/plugin-alloy/src/core/components/output.mjs +44 -0
- package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +22 -0
- package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +21 -0
- package/dist/plugin-alloy/src/core/components/source-file.cjs +64 -0
- package/dist/plugin-alloy/src/core/components/source-file.d.cts +23 -0
- package/dist/plugin-alloy/src/core/components/source-file.d.mts +23 -0
- package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
- package/dist/plugin-alloy/src/core/contexts/context.cjs +136 -0
- package/dist/plugin-alloy/src/core/contexts/context.mjs +128 -0
- package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
- package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
- package/dist/plugin-alloy/src/core/contexts/reflection.cjs +110 -0
- package/dist/plugin-alloy/src/core/contexts/reflection.mjs +101 -0
- package/dist/plugin-alloy/src/helpers/refkey.cjs +23 -0
- package/dist/plugin-alloy/src/helpers/refkey.mjs +22 -0
- package/dist/plugin-alloy/src/index.cjs +93 -0
- package/dist/plugin-alloy/src/index.mjs +91 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +115 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +114 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +39 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +38 -0
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +72 -0
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +71 -0
- package/dist/plugin-alloy/src/types/components.cjs +22 -0
- package/dist/plugin-alloy/src/types/components.d.cts +22 -0
- package/dist/{components-8W0Zgj0y.d.mts → plugin-alloy/src/types/components.d.mts} +2 -1
- package/dist/plugin-alloy/src/types/components.mjs +21 -0
- package/dist/plugin-alloy/src/types/index.d.mts +2 -0
- package/dist/plugin-alloy/src/types/plugin.cjs +55 -0
- package/dist/plugin-alloy/src/types/plugin.d.cts +37 -0
- package/dist/plugin-alloy/src/types/plugin.d.mts +37 -0
- package/dist/plugin-alloy/src/types/plugin.mjs +52 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +57 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +25 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +26 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +56 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +126 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +124 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +442 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +27 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +28 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +433 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +194 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +14 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +15 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +191 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +68 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +11 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +12 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +67 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +124 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +123 -0
- package/dist/plugin-automd/src/index.cjs +127 -0
- package/dist/plugin-automd/src/index.mjs +124 -0
- package/dist/plugin-automd/src/types/plugin.cjs +47 -0
- package/dist/plugin-automd/src/types/plugin.d.cts +38 -0
- package/dist/plugin-automd/src/types/plugin.d.mts +40 -0
- package/dist/plugin-automd/src/types/plugin.mjs +47 -0
- package/dist/plugin-automd/src/types/toc.cjs +26 -0
- package/dist/plugin-automd/src/types/toc.d.cts +33 -0
- package/dist/plugin-automd/src/types/toc.d.mts +33 -0
- package/dist/plugin-automd/src/types/toc.mjs +25 -0
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +74 -0
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +70 -0
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +71 -0
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +69 -0
- package/dist/plugin-babel/src/helpers/filters.cjs +158 -0
- package/dist/plugin-babel/src/helpers/filters.mjs +154 -0
- package/dist/plugin-babel/src/helpers/index.cjs +5 -0
- package/dist/plugin-babel/src/helpers/index.mjs +7 -0
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +200 -0
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +192 -0
- package/dist/plugin-babel/src/helpers/options.cjs +74 -0
- package/dist/plugin-babel/src/helpers/options.mjs +71 -0
- package/dist/plugin-babel/src/index.cjs +134 -0
- package/dist/plugin-babel/src/index.mjs +132 -0
- package/dist/plugin-babel/src/types/index.d.mts +1 -0
- package/dist/plugin-babel/src/types/plugin.cjs +42 -0
- package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
- package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
- package/dist/plugin-babel/src/types/plugin.mjs +39 -0
- package/dist/powerlines/schemas/fs.d.mts +1 -0
- package/dist/powerlines/src/api.d.mts +7 -0
- package/dist/powerlines/src/index.d.mts +12 -0
- package/dist/powerlines/src/internal/helpers/hooks.cjs +119 -0
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +5 -0
- package/dist/powerlines/src/internal/helpers/hooks.mjs +118 -0
- package/dist/powerlines/src/lib/build/esbuild.cjs +161 -0
- package/dist/powerlines/src/lib/build/esbuild.mjs +159 -0
- package/dist/powerlines/src/lib/entry.cjs +203 -0
- package/dist/powerlines/src/lib/entry.mjs +201 -0
- package/dist/powerlines/src/lib/logger.cjs +108 -0
- package/dist/powerlines/src/lib/logger.mjs +106 -0
- package/dist/powerlines/src/lib/utilities/bundle.cjs +67 -0
- package/dist/powerlines/src/lib/utilities/bundle.mjs +66 -0
- package/dist/powerlines/src/lib/utilities/resolve.cjs +49 -0
- package/dist/powerlines/src/lib/utilities/resolve.mjs +48 -0
- package/dist/powerlines/src/plugin-utils/paths.cjs +46 -0
- package/dist/powerlines/src/plugin-utils/paths.mjs +45 -0
- package/dist/powerlines/src/types/api.cjs +1 -0
- package/dist/powerlines/src/types/api.d.mts +5 -0
- package/dist/powerlines/src/types/api.mjs +3 -0
- package/dist/powerlines/src/types/babel.cjs +156 -0
- package/dist/powerlines/src/types/babel.d.cts +23 -0
- package/dist/powerlines/src/types/babel.d.mts +23 -0
- package/dist/powerlines/src/types/babel.mjs +147 -0
- package/dist/powerlines/src/types/build.cjs +105 -0
- package/dist/powerlines/src/types/build.d.cts +145 -0
- package/dist/powerlines/src/types/build.d.mts +147 -0
- package/dist/powerlines/src/types/build.mjs +101 -0
- package/dist/powerlines/src/types/commands.cjs +16 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/commands.mjs +15 -0
- package/dist/powerlines/src/types/config.cjs +306 -0
- package/dist/powerlines/src/types/config.d.cts +387 -0
- package/dist/powerlines/src/types/config.d.mts +388 -0
- package/dist/powerlines/src/types/config.mjs +293 -0
- package/dist/powerlines/src/types/context.cjs +324 -0
- package/dist/powerlines/src/types/context.d.cts +414 -0
- package/dist/powerlines/src/types/context.d.mts +416 -0
- package/dist/powerlines/src/types/context.mjs +311 -0
- package/dist/powerlines/src/types/fs.cjs +78 -0
- package/dist/powerlines/src/types/fs.d.cts +486 -0
- package/dist/powerlines/src/types/fs.d.mts +486 -0
- package/dist/powerlines/src/types/fs.mjs +75 -0
- package/dist/powerlines/src/types/hooks.cjs +52 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/hooks.mjs +48 -0
- package/dist/powerlines/src/types/index.cjs +11 -0
- package/dist/powerlines/src/types/index.d.mts +12 -0
- package/dist/powerlines/src/types/index.mjs +13 -0
- package/dist/powerlines/src/types/plugin.cjs +249 -0
- package/dist/powerlines/src/types/plugin.d.cts +231 -0
- package/dist/powerlines/src/types/plugin.d.mts +231 -0
- package/dist/powerlines/src/types/plugin.mjs +240 -0
- package/dist/powerlines/src/types/resolved.cjs +153 -0
- package/dist/powerlines/src/types/resolved.d.cts +82 -0
- package/dist/powerlines/src/types/resolved.d.mts +83 -0
- package/dist/powerlines/src/types/resolved.mjs +148 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/powerlines/src/types/unplugin.cjs +1 -0
- package/dist/powerlines/src/types/unplugin.d.mts +7 -0
- package/dist/powerlines/src/types/unplugin.mjs +3 -0
- package/dist/types/index.cjs +10 -3
- package/dist/types/index.d.cts +2 -4
- package/dist/types/index.d.mts +2 -5
- package/dist/types/index.mjs +3 -4
- package/dist/types/plugin.cjs +133 -1
- package/dist/types/plugin.d.cts +156 -3
- package/dist/types/plugin.d.mts +158 -4
- package/dist/types/plugin.mjs +128 -2
- package/dist/types/runtime.cjs +242 -1
- package/dist/types/runtime.d.cts +793 -2
- package/dist/types/runtime.d.mts +793 -2
- package/dist/types/runtime.mjs +240 -2
- package/package.json +13 -9
- package/dist/components-C9bYrQVK.cjs +0 -0
- package/dist/components-CNIQFfeK.mjs +0 -1
- package/dist/create-reflection-resource-BNYxBgW2.mjs +0 -9846
- package/dist/create-reflection-resource-BWYhmX7O.cjs +0 -10085
- package/dist/docs-5r844zC1.d.mts +0 -9
- package/dist/docs-B66b9li3.mjs +0 -219
- package/dist/docs-_MmTNBQX.d.cts +0 -9
- package/dist/docs-hBlKCRWK.cjs +0 -224
- package/dist/env-BPodCdD1.d.cts +0 -116
- package/dist/env-IQvgnabX.mjs +0 -1578
- package/dist/env-cO4BUDn1.cjs +0 -1596
- package/dist/env-zhzvpUI5.d.mts +0 -98
- package/dist/index-BXxhKmeA.d.mts +0 -1
- package/dist/index-Cc7fCJU9.d.mts +0 -1
- package/dist/index-CqdNToYT.d.cts +0 -1
- package/dist/index-DWPDThxu.d.cts +0 -1
- package/dist/plugin-D3B5E_Hg.mjs +0 -1
- package/dist/plugin-D5qyQPqC.cjs +0 -0
- package/dist/resolved-BZG2cwRG.d.cts +0 -1789
- package/dist/resolved-V5COsfDu.d.mts +0 -1791
- package/dist/runtime-Bisl_1Ja.cjs +0 -0
- package/dist/runtime-Q8Ni8SeN.d.cts +0 -794
- package/dist/runtime-azNoeKr-.mjs +0 -1
- package/dist/runtime-qZ0Z2kEd.d.mts +0 -794
- package/dist/types-DwElXV6q.mjs +0 -1
- package/dist/types-MYBaygjr.cjs +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_context = require('../contexts/context.cjs');
|
|
3
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
5
|
+
let __stryke_path_replace = require("@stryke/path/replace");
|
|
6
|
+
|
|
7
|
+
//#region ../plugin-alloy/src/core/components/output.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Output component for rendering the Powerlines plugin's output files via templates.
|
|
10
|
+
*/
|
|
11
|
+
function Output(props) {
|
|
12
|
+
const [{ children, context, meta, basePath }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
13
|
+
"children",
|
|
14
|
+
"context",
|
|
15
|
+
"meta",
|
|
16
|
+
"basePath"
|
|
17
|
+
]);
|
|
18
|
+
const contextRef = (0, __alloy_js_core.ref)(context);
|
|
19
|
+
const metaRef = (0, __alloy_js_core.ref)(meta ?? {});
|
|
20
|
+
const basePathRef = (0, __alloy_js_core.computed)(() => basePath ? (0, __stryke_path_replace.replacePath)(basePath, contextRef.value.workspaceConfig.workspaceRoot) : contextRef.value.workspaceConfig.workspaceRoot);
|
|
21
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Output, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
22
|
+
get basePath() {
|
|
23
|
+
return basePathRef.value;
|
|
24
|
+
},
|
|
25
|
+
get children() {
|
|
26
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_context.PowerlinesContext.Provider, {
|
|
27
|
+
value: {
|
|
28
|
+
ref: contextRef,
|
|
29
|
+
meta: metaRef
|
|
30
|
+
},
|
|
31
|
+
get children() {
|
|
32
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
33
|
+
get when() {
|
|
34
|
+
return Boolean(contextRef.value);
|
|
35
|
+
},
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.Output = Output;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PowerlinesContext } from "../contexts/context.mjs";
|
|
2
|
+
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
import { Output, Show, computed, ref, splitProps } from "@alloy-js/core";
|
|
4
|
+
import { replacePath } from "@stryke/path/replace";
|
|
5
|
+
|
|
6
|
+
//#region ../plugin-alloy/src/core/components/output.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Output component for rendering the Powerlines plugin's output files via templates.
|
|
9
|
+
*/
|
|
10
|
+
function Output$1(props) {
|
|
11
|
+
const [{ children, context, meta, basePath }, rest] = splitProps(props, [
|
|
12
|
+
"children",
|
|
13
|
+
"context",
|
|
14
|
+
"meta",
|
|
15
|
+
"basePath"
|
|
16
|
+
]);
|
|
17
|
+
const contextRef = ref(context);
|
|
18
|
+
const metaRef = ref(meta ?? {});
|
|
19
|
+
const basePathRef = computed(() => basePath ? replacePath(basePath, contextRef.value.workspaceConfig.workspaceRoot) : contextRef.value.workspaceConfig.workspaceRoot);
|
|
20
|
+
return createComponent(Output, mergeProps(rest, {
|
|
21
|
+
get basePath() {
|
|
22
|
+
return basePathRef.value;
|
|
23
|
+
},
|
|
24
|
+
get children() {
|
|
25
|
+
return createComponent(PowerlinesContext.Provider, {
|
|
26
|
+
value: {
|
|
27
|
+
ref: contextRef,
|
|
28
|
+
meta: metaRef
|
|
29
|
+
},
|
|
30
|
+
get children() {
|
|
31
|
+
return createComponent(Show, {
|
|
32
|
+
get when() {
|
|
33
|
+
return Boolean(contextRef.value);
|
|
34
|
+
},
|
|
35
|
+
children
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Output$1 as Output };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
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 [commentStart, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("align", {
|
|
14
|
+
string: commentStart,
|
|
15
|
+
get children() {
|
|
16
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
|
|
17
|
+
}
|
|
18
|
+
})];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.SingleLineComment = SingleLineComment;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { Prose } from "@alloy-js/core";
|
|
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 [commentStart, createIntrinsic("align", {
|
|
13
|
+
string: commentStart,
|
|
14
|
+
get children() {
|
|
15
|
+
return [createComponent(Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
|
|
16
|
+
}
|
|
17
|
+
})];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { SingleLineComment };
|
|
@@ -0,0 +1,64 @@
|
|
|
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_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
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 (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.SourceFileContext.Provider, {
|
|
51
|
+
value: sourceFile,
|
|
52
|
+
get children() {
|
|
53
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
54
|
+
when: header !== void 0,
|
|
55
|
+
get children() {
|
|
56
|
+
return [header, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
57
|
+
}
|
|
58
|
+
}), children];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
exports.SourceFile = SourceFile;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StoragePreset } from "../../../../powerlines/src/types/fs.cjs";
|
|
2
|
+
import { ComponentProps } from "../../types/components.cjs";
|
|
3
|
+
import { SourceFileProps } from "@alloy-js/core";
|
|
4
|
+
|
|
5
|
+
//#region ../plugin-alloy/src/core/components/source-file.d.ts
|
|
6
|
+
type SourceFileProps$1 = SourceFileProps & ComponentProps & {
|
|
7
|
+
/**
|
|
8
|
+
* The storage preset for the output files.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
12
|
+
*/
|
|
13
|
+
storage?: StoragePreset;
|
|
14
|
+
/**
|
|
15
|
+
* The metadata associated with the source file.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* The values stored in the metadata will be available in the rendering context.
|
|
19
|
+
*/
|
|
20
|
+
meta?: Record<string, any>;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { SourceFileProps$1 as SourceFileProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StoragePreset } from "../../../../powerlines/src/types/fs.mjs";
|
|
2
|
+
import { ComponentProps } from "../../types/components.mjs";
|
|
3
|
+
import { SourceFileProps } from "@alloy-js/core";
|
|
4
|
+
|
|
5
|
+
//#region ../plugin-alloy/src/core/components/source-file.d.ts
|
|
6
|
+
type SourceFileProps$1 = SourceFileProps & ComponentProps & {
|
|
7
|
+
/**
|
|
8
|
+
* The storage preset for the output files.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
12
|
+
*/
|
|
13
|
+
storage?: StoragePreset;
|
|
14
|
+
/**
|
|
15
|
+
* The metadata associated with the source file.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* The values stored in the metadata will be available in the rendering context.
|
|
19
|
+
*/
|
|
20
|
+
meta?: Record<string, any>;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { SourceFileProps$1 as SourceFileProps };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useMeta } from "../contexts/context.mjs";
|
|
2
|
+
import "../contexts/index.mjs";
|
|
3
|
+
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
4
|
+
import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
|
|
5
|
+
import { appendPath } from "@stryke/path/append";
|
|
6
|
+
import defu$1 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$1({
|
|
41
|
+
sourceFile,
|
|
42
|
+
printOptions
|
|
43
|
+
}, meta ?? {});
|
|
44
|
+
metadata[sourceFile.path] = {
|
|
45
|
+
storage,
|
|
46
|
+
...meta ?? {}
|
|
47
|
+
};
|
|
48
|
+
return createComponent(SourceFileContext.Provider, {
|
|
49
|
+
value: sourceFile,
|
|
50
|
+
get children() {
|
|
51
|
+
return [createComponent(Show, {
|
|
52
|
+
when: header !== void 0,
|
|
53
|
+
get children() {
|
|
54
|
+
return [header, createIntrinsic("hbr", {})];
|
|
55
|
+
}
|
|
56
|
+
}), children];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { SourceFile };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_fs = require('../../../../powerlines/src/types/fs.cjs');
|
|
3
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
|
|
5
|
+
//#region ../plugin-alloy/src/core/contexts/context.ts
|
|
6
|
+
const __ΩRecord = [
|
|
7
|
+
"K",
|
|
8
|
+
"T",
|
|
9
|
+
"Record",
|
|
10
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
11
|
+
];
|
|
12
|
+
const __ΩMetaItem = [
|
|
13
|
+
"builtin",
|
|
14
|
+
"entry",
|
|
15
|
+
"kind",
|
|
16
|
+
"The kind of metadata item.",
|
|
17
|
+
"skipFormat",
|
|
18
|
+
"Whether to skip formatting for this output.",
|
|
19
|
+
() => require_fs.__ΩStoragePreset,
|
|
20
|
+
"storage",
|
|
21
|
+
"The storage preset or adapter name for the output files.",
|
|
22
|
+
"MetaItem",
|
|
23
|
+
"PP.!.\"&J4#8?$)4%8?&Pn'&J4(8?)&\"LMw*y"
|
|
24
|
+
];
|
|
25
|
+
const __ΩPowerlinesContextInterface = [
|
|
26
|
+
"PluginContext",
|
|
27
|
+
"TContext",
|
|
28
|
+
() => __ΩRecord,
|
|
29
|
+
() => __ΩMetaItem,
|
|
30
|
+
"TMeta",
|
|
31
|
+
"Ref",
|
|
32
|
+
"ref",
|
|
33
|
+
"The current Powerlines context.",
|
|
34
|
+
"meta",
|
|
35
|
+
"The current render metadata.",
|
|
36
|
+
"PowerlinesContextInterface",
|
|
37
|
+
"\"w!c\"&n$o##c%P\"w&4'?(\"w&4)?*Mw+y"
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* The Powerlines context used in template rendering.
|
|
41
|
+
*/
|
|
42
|
+
const PowerlinesContext = (__alloy_js_core.createNamedContext.Ω = [[() => __ΩPowerlinesContextInterface, "\"\"o!#"]], (0, __alloy_js_core.createNamedContext)("powerlines"));
|
|
43
|
+
/**
|
|
44
|
+
* Hook to access the Powerlines Context.
|
|
45
|
+
*
|
|
46
|
+
* @returns The Context.
|
|
47
|
+
*/
|
|
48
|
+
function usePowerlinesContext() {
|
|
49
|
+
return __alloy_js_core.useContext.Ω = [[
|
|
50
|
+
() => __ΩPowerlinesContextInterface,
|
|
51
|
+
"PluginContext",
|
|
52
|
+
() => __ΩRecord,
|
|
53
|
+
() => __ΩMetaItem,
|
|
54
|
+
"\"w\"&n$o##o!#"
|
|
55
|
+
]], (0, __alloy_js_core.useContext)(PowerlinesContext);
|
|
56
|
+
}
|
|
57
|
+
usePowerlinesContext.__type = [
|
|
58
|
+
() => __ΩPowerlinesContextInterface,
|
|
59
|
+
"usePowerlinesContext",
|
|
60
|
+
"Hook to access the Powerlines Context.",
|
|
61
|
+
"PP\"\"o!#-J/\"?#"
|
|
62
|
+
];
|
|
63
|
+
/**
|
|
64
|
+
* Hook to safely access the {@link PluginContext | Powerlines context}.
|
|
65
|
+
*
|
|
66
|
+
* @returns The Powerlines context or undefined if not set.
|
|
67
|
+
*/
|
|
68
|
+
function usePowerlinesSafe() {
|
|
69
|
+
return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"]], usePowerlinesContext())?.ref?.value;
|
|
70
|
+
}
|
|
71
|
+
usePowerlinesSafe.__type = [
|
|
72
|
+
"usePowerlinesSafe",
|
|
73
|
+
"Hook to safely access the {@link PluginContext | Powerlines context}.",
|
|
74
|
+
"PP\"-J/!?\""
|
|
75
|
+
];
|
|
76
|
+
/**
|
|
77
|
+
* Hook to access the {@link PluginContext | Powerlines context}.
|
|
78
|
+
*
|
|
79
|
+
* @returns The Powerlines context.
|
|
80
|
+
*/
|
|
81
|
+
function usePowerlines() {
|
|
82
|
+
const powerlines = (usePowerlinesSafe.Ω = [["PluginContext", "\"w!"]], usePowerlinesSafe());
|
|
83
|
+
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`.");
|
|
84
|
+
return powerlines;
|
|
85
|
+
}
|
|
86
|
+
usePowerlines.__type = [
|
|
87
|
+
"usePowerlines",
|
|
88
|
+
"Hook to access the {@link PluginContext | Powerlines context}.",
|
|
89
|
+
"P\"/!?\""
|
|
90
|
+
];
|
|
91
|
+
/**
|
|
92
|
+
* Hook to safely access the render context's metadata.
|
|
93
|
+
*
|
|
94
|
+
* @returns The Powerlines context or undefined if not set.
|
|
95
|
+
*/
|
|
96
|
+
function useMetaSafe() {
|
|
97
|
+
return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"], [
|
|
98
|
+
() => __ΩRecord,
|
|
99
|
+
() => __ΩMetaItem,
|
|
100
|
+
"&n\"o!#"
|
|
101
|
+
]], usePowerlinesContext())?.meta?.value;
|
|
102
|
+
}
|
|
103
|
+
useMetaSafe.__type = [
|
|
104
|
+
"useMetaSafe",
|
|
105
|
+
"Hook to safely access the render context's metadata.",
|
|
106
|
+
"PP\"-J/!?\""
|
|
107
|
+
];
|
|
108
|
+
/**
|
|
109
|
+
* Hook to access the render context's metadata.
|
|
110
|
+
*
|
|
111
|
+
* @returns The Powerlines context.
|
|
112
|
+
*/
|
|
113
|
+
function useMeta() {
|
|
114
|
+
const meta = (useMetaSafe.Ω = [[
|
|
115
|
+
() => __ΩRecord,
|
|
116
|
+
() => __ΩMetaItem,
|
|
117
|
+
"&n\"o!#"
|
|
118
|
+
]], useMetaSafe());
|
|
119
|
+
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`.");
|
|
120
|
+
return meta;
|
|
121
|
+
}
|
|
122
|
+
useMeta.__type = [
|
|
123
|
+
"useMeta",
|
|
124
|
+
"Hook to access the render context's metadata.",
|
|
125
|
+
"P\"/!?\""
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
//#endregion
|
|
129
|
+
exports.PowerlinesContext = PowerlinesContext;
|
|
130
|
+
exports.__ΩMetaItem = __ΩMetaItem;
|
|
131
|
+
exports.__ΩPowerlinesContextInterface = __ΩPowerlinesContextInterface;
|
|
132
|
+
exports.useMeta = useMeta;
|
|
133
|
+
exports.useMetaSafe = useMetaSafe;
|
|
134
|
+
exports.usePowerlines = usePowerlines;
|
|
135
|
+
exports.usePowerlinesContext = usePowerlinesContext;
|
|
136
|
+
exports.usePowerlinesSafe = usePowerlinesSafe;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { __ΩStoragePreset } from "../../../../powerlines/src/types/fs.mjs";
|
|
2
|
+
import { createNamedContext, useContext } from "@alloy-js/core";
|
|
3
|
+
|
|
4
|
+
//#region ../plugin-alloy/src/core/contexts/context.ts
|
|
5
|
+
const __ΩRecord = [
|
|
6
|
+
"K",
|
|
7
|
+
"T",
|
|
8
|
+
"Record",
|
|
9
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
10
|
+
];
|
|
11
|
+
const __ΩMetaItem = [
|
|
12
|
+
"builtin",
|
|
13
|
+
"entry",
|
|
14
|
+
"kind",
|
|
15
|
+
"The kind of metadata item.",
|
|
16
|
+
"skipFormat",
|
|
17
|
+
"Whether to skip formatting for this output.",
|
|
18
|
+
() => __ΩStoragePreset,
|
|
19
|
+
"storage",
|
|
20
|
+
"The storage preset or adapter name for the output files.",
|
|
21
|
+
"MetaItem",
|
|
22
|
+
"PP.!.\"&J4#8?$)4%8?&Pn'&J4(8?)&\"LMw*y"
|
|
23
|
+
];
|
|
24
|
+
const __ΩPowerlinesContextInterface = [
|
|
25
|
+
"PluginContext",
|
|
26
|
+
"TContext",
|
|
27
|
+
() => __ΩRecord,
|
|
28
|
+
() => __ΩMetaItem,
|
|
29
|
+
"TMeta",
|
|
30
|
+
"Ref",
|
|
31
|
+
"ref",
|
|
32
|
+
"The current Powerlines context.",
|
|
33
|
+
"meta",
|
|
34
|
+
"The current render metadata.",
|
|
35
|
+
"PowerlinesContextInterface",
|
|
36
|
+
"\"w!c\"&n$o##c%P\"w&4'?(\"w&4)?*Mw+y"
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* The Powerlines context used in template rendering.
|
|
40
|
+
*/
|
|
41
|
+
const PowerlinesContext = (createNamedContext.Ω = [[() => __ΩPowerlinesContextInterface, "\"\"o!#"]], createNamedContext("powerlines"));
|
|
42
|
+
/**
|
|
43
|
+
* Hook to access the Powerlines Context.
|
|
44
|
+
*
|
|
45
|
+
* @returns The Context.
|
|
46
|
+
*/
|
|
47
|
+
function usePowerlinesContext() {
|
|
48
|
+
return useContext.Ω = [[
|
|
49
|
+
() => __ΩPowerlinesContextInterface,
|
|
50
|
+
"PluginContext",
|
|
51
|
+
() => __ΩRecord,
|
|
52
|
+
() => __ΩMetaItem,
|
|
53
|
+
"\"w\"&n$o##o!#"
|
|
54
|
+
]], useContext(PowerlinesContext);
|
|
55
|
+
}
|
|
56
|
+
usePowerlinesContext.__type = [
|
|
57
|
+
() => __ΩPowerlinesContextInterface,
|
|
58
|
+
"usePowerlinesContext",
|
|
59
|
+
"Hook to access the Powerlines Context.",
|
|
60
|
+
"PP\"\"o!#-J/\"?#"
|
|
61
|
+
];
|
|
62
|
+
/**
|
|
63
|
+
* Hook to safely access the {@link PluginContext | Powerlines context}.
|
|
64
|
+
*
|
|
65
|
+
* @returns The Powerlines context or undefined if not set.
|
|
66
|
+
*/
|
|
67
|
+
function usePowerlinesSafe() {
|
|
68
|
+
return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"]], usePowerlinesContext())?.ref?.value;
|
|
69
|
+
}
|
|
70
|
+
usePowerlinesSafe.__type = [
|
|
71
|
+
"usePowerlinesSafe",
|
|
72
|
+
"Hook to safely access the {@link PluginContext | Powerlines context}.",
|
|
73
|
+
"PP\"-J/!?\""
|
|
74
|
+
];
|
|
75
|
+
/**
|
|
76
|
+
* Hook to access the {@link PluginContext | Powerlines context}.
|
|
77
|
+
*
|
|
78
|
+
* @returns The Powerlines context.
|
|
79
|
+
*/
|
|
80
|
+
function usePowerlines() {
|
|
81
|
+
const powerlines = (usePowerlinesSafe.Ω = [["PluginContext", "\"w!"]], usePowerlinesSafe());
|
|
82
|
+
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`.");
|
|
83
|
+
return powerlines;
|
|
84
|
+
}
|
|
85
|
+
usePowerlines.__type = [
|
|
86
|
+
"usePowerlines",
|
|
87
|
+
"Hook to access the {@link PluginContext | Powerlines context}.",
|
|
88
|
+
"P\"/!?\""
|
|
89
|
+
];
|
|
90
|
+
/**
|
|
91
|
+
* Hook to safely access the render context's metadata.
|
|
92
|
+
*
|
|
93
|
+
* @returns The Powerlines context or undefined if not set.
|
|
94
|
+
*/
|
|
95
|
+
function useMetaSafe() {
|
|
96
|
+
return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"], [
|
|
97
|
+
() => __ΩRecord,
|
|
98
|
+
() => __ΩMetaItem,
|
|
99
|
+
"&n\"o!#"
|
|
100
|
+
]], usePowerlinesContext())?.meta?.value;
|
|
101
|
+
}
|
|
102
|
+
useMetaSafe.__type = [
|
|
103
|
+
"useMetaSafe",
|
|
104
|
+
"Hook to safely access the render context's metadata.",
|
|
105
|
+
"PP\"-J/!?\""
|
|
106
|
+
];
|
|
107
|
+
/**
|
|
108
|
+
* Hook to access the render context's metadata.
|
|
109
|
+
*
|
|
110
|
+
* @returns The Powerlines context.
|
|
111
|
+
*/
|
|
112
|
+
function useMeta() {
|
|
113
|
+
const meta = (useMetaSafe.Ω = [[
|
|
114
|
+
() => __ΩRecord,
|
|
115
|
+
() => __ΩMetaItem,
|
|
116
|
+
"&n\"o!#"
|
|
117
|
+
]], useMetaSafe());
|
|
118
|
+
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`.");
|
|
119
|
+
return meta;
|
|
120
|
+
}
|
|
121
|
+
useMeta.__type = [
|
|
122
|
+
"useMeta",
|
|
123
|
+
"Hook to access the render context's metadata.",
|
|
124
|
+
"P\"/!?\""
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
export { PowerlinesContext, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PowerlinesContext, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
|
|
2
|
+
import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
|
|
3
|
+
|
|
4
|
+
export { };
|