@powerlines/plugin-env 0.15.2 → 0.15.4
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/components/docs.cjs +3 -70
- package/dist/components/docs.d.cts +1 -8
- package/dist/components/docs.d.mts +1 -8
- package/dist/components/docs.mjs +2 -68
- package/dist/components/env.cjs +4 -574
- package/dist/components/env.d.cts +2 -19
- package/dist/components/env.d.mts +3 -19
- package/dist/components/env.mjs +2 -570
- package/dist/components/index.cjs +7 -5
- package/dist/components/index.d.cts +4 -2
- package/dist/components/index.d.mts +5 -2
- package/dist/components/index.mjs +4 -2
- package/dist/{plugin-alloy/src/types/components.d.cts → components-8W0Zgj0y.d.mts} +2 -1
- package/dist/components-C9bYrQVK.cjs +0 -0
- package/dist/components-CNIQFfeK.mjs +1 -0
- package/dist/create-reflection-resource-BNYxBgW2.mjs +9846 -0
- package/dist/create-reflection-resource-BWYhmX7O.cjs +10085 -0
- package/dist/docs-5r844zC1.d.mts +9 -0
- package/dist/docs-B66b9li3.mjs +219 -0
- package/dist/docs-_MmTNBQX.d.cts +9 -0
- package/dist/docs-hBlKCRWK.cjs +224 -0
- package/dist/env-BPodCdD1.d.cts +116 -0
- package/dist/env-IQvgnabX.mjs +1578 -0
- package/dist/env-cO4BUDn1.cjs +1596 -0
- package/dist/env-zhzvpUI5.d.mts +98 -0
- package/dist/index-BXxhKmeA.d.mts +1 -0
- package/dist/index-Cc7fCJU9.d.mts +1 -0
- package/dist/index-CqdNToYT.d.cts +1 -0
- package/dist/index-DWPDThxu.d.cts +1 -0
- package/dist/index.cjs +702 -77
- package/dist/index.d.cts +185 -12
- package/dist/index.d.mts +190 -17
- package/dist/index.mjs +648 -28
- package/dist/{deepkit/schemas/reflection.d.mts → plugin-BaInAuAh.d.mts} +326 -59
- package/dist/{deepkit/schemas/reflection.d.cts → plugin-BwuEBScL.d.cts} +268 -1
- package/dist/plugin-D3B5E_Hg.mjs +1 -0
- package/dist/plugin-D5qyQPqC.cjs +0 -0
- package/dist/resolved-BZG2cwRG.d.cts +1789 -0
- package/dist/resolved-V5COsfDu.d.mts +1791 -0
- package/dist/runtime-Bisl_1Ja.cjs +0 -0
- package/dist/runtime-Q8Ni8SeN.d.cts +794 -0
- package/dist/runtime-azNoeKr-.mjs +1 -0
- package/dist/runtime-qZ0Z2kEd.d.mts +794 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +4 -2
- package/dist/types/index.d.mts +5 -2
- package/dist/types/index.mjs +4 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +3 -156
- package/dist/types/plugin.d.mts +4 -158
- package/dist/types/plugin.mjs +2 -0
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts +2 -793
- package/dist/types/runtime.d.mts +2 -793
- package/dist/types/runtime.mjs +2 -0
- package/dist/types-DwElXV6q.mjs +1 -0
- package/dist/types-MYBaygjr.cjs +0 -0
- package/package.json +7 -7
- package/dist/_virtual/rolldown_runtime.cjs +0 -37
- package/dist/_virtual/rolldown_runtime.mjs +0 -29
- package/dist/babel/index.cjs +0 -1
- package/dist/babel/index.d.mts +0 -1
- package/dist/babel/index.mjs +0 -3
- package/dist/babel/plugin.cjs +0 -121
- package/dist/babel/plugin.d.cts +0 -7
- package/dist/babel/plugin.d.mts +0 -9
- package/dist/babel/plugin.mjs +0 -119
- package/dist/deepkit/schemas/reflection.cjs +0 -3940
- package/dist/deepkit/schemas/reflection.mjs +0 -3938
- package/dist/deepkit/schemas/reflection2.cjs +0 -4112
- package/dist/deepkit/schemas/reflection2.mjs +0 -4110
- package/dist/deepkit/src/capnp.cjs +0 -913
- package/dist/deepkit/src/capnp.mjs +0 -911
- package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
- package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
- package/dist/deepkit/src/reflect-type.cjs +0 -22
- package/dist/deepkit/src/reflect-type.mjs +0 -20
- package/dist/deepkit/src/resolve-reflections.cjs +0 -16
- package/dist/deepkit/src/resolve-reflections.mjs +0 -15
- package/dist/deepkit/src/transformer.cjs +0 -52
- package/dist/deepkit/src/transformer.mjs +0 -49
- package/dist/deepkit/src/transpile.cjs +0 -29
- package/dist/deepkit/src/transpile.mjs +0 -27
- package/dist/deepkit/src/types.d.cts +0 -10
- package/dist/deepkit/src/types.d.mts +0 -10
- package/dist/deepkit/src/utilities.cjs +0 -66
- package/dist/deepkit/src/utilities.mjs +0 -65
- package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -38
- package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -19
- package/dist/deepkit/src/vendor/type.cjs +0 -20
- package/dist/deepkit/src/vendor/type.d.cts +0 -7
- package/dist/deepkit/src/vendor/type.d.mts +0 -7
- package/dist/deepkit/src/vendor/type.mjs +0 -11
- package/dist/helpers/automd-generator.cjs +0 -22
- package/dist/helpers/automd-generator.mjs +0 -21
- package/dist/helpers/create-reflection-resource.cjs +0 -55
- package/dist/helpers/create-reflection-resource.d.cts +0 -15
- package/dist/helpers/create-reflection-resource.d.mts +0 -15
- package/dist/helpers/create-reflection-resource.mjs +0 -54
- package/dist/helpers/index.cjs +0 -6
- package/dist/helpers/index.d.mts +0 -6
- package/dist/helpers/index.mjs +0 -8
- package/dist/helpers/load.cjs +0 -83
- package/dist/helpers/load.d.cts +0 -35
- package/dist/helpers/load.d.mts +0 -36
- package/dist/helpers/load.mjs +0 -80
- package/dist/helpers/persistence.cjs +0 -214
- package/dist/helpers/persistence.d.cts +0 -84
- package/dist/helpers/persistence.d.mts +0 -84
- package/dist/helpers/persistence.mjs +0 -202
- package/dist/helpers/reflect.cjs +0 -111
- package/dist/helpers/reflect.d.cts +0 -46
- package/dist/helpers/reflect.d.mts +0 -46
- package/dist/helpers/reflect.mjs +0 -103
- package/dist/helpers/source-file-env.cjs +0 -28
- package/dist/helpers/source-file-env.d.cts +0 -8
- package/dist/helpers/source-file-env.d.mts +0 -8
- package/dist/helpers/source-file-env.mjs +0 -26
- package/dist/helpers/template-helpers.cjs +0 -42
- package/dist/helpers/template-helpers.d.cts +0 -15
- package/dist/helpers/template-helpers.d.mts +0 -15
- package/dist/helpers/template-helpers.mjs +0 -41
- package/dist/plugin-alloy/src/core/components/output.cjs +0 -45
- package/dist/plugin-alloy/src/core/components/output.mjs +0 -44
- package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
- package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
- package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
- package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
- package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
- package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
- package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
- package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
- package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
- package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
- package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
- package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
- package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
- package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
- package/dist/plugin-alloy/src/index.cjs +0 -93
- package/dist/plugin-alloy/src/index.mjs +0 -91
- package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
- package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
- package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
- package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -18
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
- package/dist/plugin-alloy/src/types/components.d.mts +0 -25
- package/dist/plugin-alloy/src/types/index.d.mts +0 -2
- package/dist/plugin-alloy/src/types/plugin.d.cts +0 -37
- package/dist/plugin-alloy/src/types/plugin.d.mts +0 -37
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -57
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -25
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -56
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -126
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -124
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -442
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -27
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -28
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -433
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -194
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -14
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -15
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -191
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -68
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -11
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -12
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -67
- package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
- package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
- package/dist/plugin-automd/src/index.cjs +0 -101
- package/dist/plugin-automd/src/index.mjs +0 -98
- package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
- package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
- package/dist/plugin-automd/src/types/toc.d.cts +0 -33
- package/dist/plugin-automd/src/types/toc.d.mts +0 -33
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
- package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
- package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
- package/dist/plugin-babel/src/helpers/index.cjs +0 -5
- package/dist/plugin-babel/src/helpers/index.mjs +0 -7
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
- package/dist/plugin-babel/src/helpers/options.cjs +0 -50
- package/dist/plugin-babel/src/helpers/options.mjs +0 -47
- package/dist/plugin-babel/src/index.cjs +0 -91
- package/dist/plugin-babel/src/index.mjs +0 -89
- package/dist/plugin-babel/src/types/index.d.mts +0 -1
- package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
- package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
- package/dist/powerlines/schemas/fs.d.mts +0 -1
- package/dist/powerlines/src/api.d.mts +0 -7
- package/dist/powerlines/src/index.d.mts +0 -12
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -5
- package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
- package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
- package/dist/powerlines/src/lib/entry.cjs +0 -12
- package/dist/powerlines/src/lib/entry.mjs +0 -14
- package/dist/powerlines/src/lib/logger.cjs +0 -41
- package/dist/powerlines/src/lib/logger.mjs +0 -39
- package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
- package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
- package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
- package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
- package/dist/powerlines/src/types/api.d.mts +0 -5
- package/dist/powerlines/src/types/babel.d.cts +0 -23
- package/dist/powerlines/src/types/babel.d.mts +0 -23
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -147
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -380
- package/dist/powerlines/src/types/config.d.mts +0 -381
- package/dist/powerlines/src/types/context.d.cts +0 -414
- package/dist/powerlines/src/types/context.d.mts +0 -416
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/index.d.mts +0 -12
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -82
- package/dist/powerlines/src/types/resolved.d.mts +0 -83
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
- package/dist/powerlines/src/types/unplugin.d.mts +0 -7
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region ../plugin-alloy/src/core/contexts/context.ts
|
|
4
|
-
/**
|
|
5
|
-
* The Powerlines context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
const PowerlinesContext = createNamedContext("powerlines");
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the Powerlines Context.
|
|
10
|
-
*
|
|
11
|
-
* @returns The Context.
|
|
12
|
-
*/
|
|
13
|
-
function usePowerlinesContext() {
|
|
14
|
-
return useContext(PowerlinesContext);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Hook to safely access the {@link PluginContext | Powerlines context}.
|
|
18
|
-
*
|
|
19
|
-
* @returns The Powerlines context or undefined if not set.
|
|
20
|
-
*/
|
|
21
|
-
function usePowerlinesSafe() {
|
|
22
|
-
return usePowerlinesContext()?.ref?.value;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Hook to access the {@link PluginContext | Powerlines context}.
|
|
26
|
-
*
|
|
27
|
-
* @returns The Powerlines context.
|
|
28
|
-
*/
|
|
29
|
-
function usePowerlines() {
|
|
30
|
-
const powerlines = usePowerlinesSafe();
|
|
31
|
-
if (!powerlines) throw new Error("Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
32
|
-
return powerlines;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Hook to safely access the render context's metadata.
|
|
36
|
-
*
|
|
37
|
-
* @returns The Powerlines context or undefined if not set.
|
|
38
|
-
*/
|
|
39
|
-
function useMetaSafe() {
|
|
40
|
-
return usePowerlinesContext()?.meta?.value;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Hook to access the render context's metadata.
|
|
44
|
-
*
|
|
45
|
-
* @returns The Powerlines context.
|
|
46
|
-
*/
|
|
47
|
-
function useMeta() {
|
|
48
|
-
const meta = useMetaSafe();
|
|
49
|
-
if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
50
|
-
return meta;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
export { PowerlinesContext, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { PowerlinesContext, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
|
|
2
|
-
import { ReflectionClassContext, ReflectionPropertyContext, useReflectionClass, useReflectionProperty } from "./reflection.mjs";
|
|
3
|
-
|
|
4
|
-
export { };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
3
|
-
|
|
4
|
-
//#region ../plugin-alloy/src/core/contexts/reflection.ts
|
|
5
|
-
/**
|
|
6
|
-
* The reflection class context used in template rendering.
|
|
7
|
-
*/
|
|
8
|
-
const ReflectionClassContext = (0, __alloy_js_core.createContext)();
|
|
9
|
-
/**
|
|
10
|
-
* Hook to access the Reflection context.
|
|
11
|
-
*
|
|
12
|
-
* @returns A reactive version of the current reflection.
|
|
13
|
-
*/
|
|
14
|
-
function useReflectionClass() {
|
|
15
|
-
const context = (0, __alloy_js_core.useContext)(ReflectionClassContext);
|
|
16
|
-
if (!context) throw new Error("Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
17
|
-
return context;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The reflection property context used in template rendering.
|
|
21
|
-
*/
|
|
22
|
-
const ReflectionPropertyContext = (0, __alloy_js_core.createNamedContext)("reflection-property");
|
|
23
|
-
/**
|
|
24
|
-
* Hook to access the Reflection Property context.
|
|
25
|
-
*
|
|
26
|
-
* @returns A reactive version of the current reflection.
|
|
27
|
-
*/
|
|
28
|
-
function useReflectionProperty() {
|
|
29
|
-
const context = (0, __alloy_js_core.useContext)(ReflectionPropertyContext);
|
|
30
|
-
if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
31
|
-
return context;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The reflection method context used in template rendering.
|
|
35
|
-
*/
|
|
36
|
-
const ReflectionMethodContext = (0, __alloy_js_core.createNamedContext)("reflection-method");
|
|
37
|
-
/**
|
|
38
|
-
* The reflection parameter context used in template rendering.
|
|
39
|
-
*/
|
|
40
|
-
const ReflectionParameterContext = (0, __alloy_js_core.createNamedContext)("reflection-parameter");
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
exports.ReflectionClassContext = ReflectionClassContext;
|
|
44
|
-
exports.ReflectionPropertyContext = ReflectionPropertyContext;
|
|
45
|
-
exports.useReflectionClass = useReflectionClass;
|
|
46
|
-
exports.useReflectionProperty = useReflectionProperty;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { createContext, createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region ../plugin-alloy/src/core/contexts/reflection.ts
|
|
4
|
-
/**
|
|
5
|
-
* The reflection class context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
const ReflectionClassContext = createContext();
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the Reflection context.
|
|
10
|
-
*
|
|
11
|
-
* @returns A reactive version of the current reflection.
|
|
12
|
-
*/
|
|
13
|
-
function useReflectionClass() {
|
|
14
|
-
const context = useContext(ReflectionClassContext);
|
|
15
|
-
if (!context) throw new Error("Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
16
|
-
return context;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The reflection property context used in template rendering.
|
|
20
|
-
*/
|
|
21
|
-
const ReflectionPropertyContext = createNamedContext("reflection-property");
|
|
22
|
-
/**
|
|
23
|
-
* Hook to access the Reflection Property context.
|
|
24
|
-
*
|
|
25
|
-
* @returns A reactive version of the current reflection.
|
|
26
|
-
*/
|
|
27
|
-
function useReflectionProperty() {
|
|
28
|
-
const context = useContext(ReflectionPropertyContext);
|
|
29
|
-
if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
30
|
-
return context;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* The reflection method context used in template rendering.
|
|
34
|
-
*/
|
|
35
|
-
const ReflectionMethodContext = createNamedContext("reflection-method");
|
|
36
|
-
/**
|
|
37
|
-
* The reflection parameter context used in template rendering.
|
|
38
|
-
*/
|
|
39
|
-
const ReflectionParameterContext = createNamedContext("reflection-parameter");
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
export { ReflectionClassContext, ReflectionPropertyContext, useReflectionClass, useReflectionProperty };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
3
|
-
|
|
4
|
-
//#region ../plugin-alloy/src/helpers/refkey.ts
|
|
5
|
-
/**
|
|
6
|
-
* Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
|
|
10
|
-
*/
|
|
11
|
-
function refkey(...args) {
|
|
12
|
-
return (0, __alloy_js_core.refkey)("powerlines", ...args);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.refkey = refkey;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { refkey } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region ../plugin-alloy/src/helpers/refkey.ts
|
|
4
|
-
/**
|
|
5
|
-
* Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
|
|
9
|
-
*/
|
|
10
|
-
function refkey$1(...args) {
|
|
11
|
-
return refkey("powerlines", ...args);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { refkey$1 as refkey };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_output = require('./core/components/output.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 __alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
|
|
6
|
-
__alloy_js_rollup_plugin = require_rolldown_runtime.__toESM(__alloy_js_rollup_plugin);
|
|
7
|
-
let __stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
8
|
-
|
|
9
|
-
//#region ../plugin-alloy/src/index.tsx
|
|
10
|
-
/**
|
|
11
|
-
* Alloy-js plugin for Powerlines.
|
|
12
|
-
*
|
|
13
|
-
* @param options - The Alloy-js plugin user configuration options.
|
|
14
|
-
* @returns A Powerlines plugin that integrates Alloy-js transformations.
|
|
15
|
-
*/
|
|
16
|
-
const plugin = (options = {}) => {
|
|
17
|
-
return [{
|
|
18
|
-
name: "alloy:config",
|
|
19
|
-
config() {
|
|
20
|
-
return {
|
|
21
|
-
alloy: {
|
|
22
|
-
typescript: true,
|
|
23
|
-
...options
|
|
24
|
-
},
|
|
25
|
-
build: {
|
|
26
|
-
inputOptions: { transform: { jsx: {
|
|
27
|
-
runtime: "classic",
|
|
28
|
-
pragma: "Alloy.createElement",
|
|
29
|
-
importSource: "@alloy-js/core"
|
|
30
|
-
} } },
|
|
31
|
-
plugins: [(0, __alloy_js_rollup_plugin.default)()]
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
async configResolved() {
|
|
36
|
-
if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
|
|
37
|
-
this.tsconfig.tsconfigJson.compilerOptions ??= {};
|
|
38
|
-
if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
|
|
39
|
-
if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
|
|
40
|
-
await this.fs.write(this.tsconfig.tsconfigFilePath, __stryke_json_storm_json.StormJSON.stringify(this.tsconfig.tsconfigJson));
|
|
41
|
-
}
|
|
42
|
-
this.dependencies["@alloy-js/core"] = "^0.22.0";
|
|
43
|
-
if (this.config.alloy?.typescript !== false) this.dependencies["@alloy-js/typescript"] = "^0.22.0";
|
|
44
|
-
if (this.config.alloy?.json === true) this.dependencies["@alloy-js/json"] = "^0.22.0";
|
|
45
|
-
if (this.config.alloy?.markdown === true) this.dependencies["@alloy-js/markdown"] = "^0.22.0";
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
|
-
name: "alloy:update-context",
|
|
49
|
-
configResolved: {
|
|
50
|
-
order: "pre",
|
|
51
|
-
async handler() {
|
|
52
|
-
this.render = async (children) => {
|
|
53
|
-
const _self$ = this;
|
|
54
|
-
const meta = {};
|
|
55
|
-
await (0, __alloy_js_core.traverseOutput)(await (0, __alloy_js_core.renderAsync)((0, __alloy_js_core_jsx_runtime.createComponent)(require_output.Output, {
|
|
56
|
-
context: _self$,
|
|
57
|
-
meta,
|
|
58
|
-
get basePath() {
|
|
59
|
-
return _self$.workspaceConfig.workspaceRoot;
|
|
60
|
-
},
|
|
61
|
-
children
|
|
62
|
-
})), {
|
|
63
|
-
visitDirectory: (directory) => {
|
|
64
|
-
if (this.fs.existsSync(directory.path)) return;
|
|
65
|
-
this.fs.mkdirSync(directory.path);
|
|
66
|
-
},
|
|
67
|
-
visitFile: (file) => {
|
|
68
|
-
if ("contents" in file) {
|
|
69
|
-
const metadata = meta[file.path] ?? {};
|
|
70
|
-
if (metadata.kind === "builtin") {
|
|
71
|
-
if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
|
|
72
|
-
this.emitBuiltinSync(file.contents, metadata.id, file.path, {
|
|
73
|
-
skipFormat: metadata.skipFormat,
|
|
74
|
-
storage: metadata.storage
|
|
75
|
-
});
|
|
76
|
-
} else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
|
|
77
|
-
skipFormat: metadata.skipFormat,
|
|
78
|
-
storage: metadata.storage,
|
|
79
|
-
...metadata.typeDefinition ?? {}
|
|
80
|
-
});
|
|
81
|
-
else this.emitSync(file.contents, file.path, metadata);
|
|
82
|
-
} else this.fs.copySync(file.sourcePath, file.path);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}];
|
|
89
|
-
};
|
|
90
|
-
var src_default = plugin;
|
|
91
|
-
|
|
92
|
-
//#endregion
|
|
93
|
-
exports.default = src_default;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Output as Output$1 } from "./core/components/output.mjs";
|
|
2
|
-
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { renderAsync, traverseOutput } from "@alloy-js/core";
|
|
4
|
-
import alloy from "@alloy-js/rollup-plugin";
|
|
5
|
-
import { StormJSON } from "@stryke/json/storm-json";
|
|
6
|
-
|
|
7
|
-
//#region ../plugin-alloy/src/index.tsx
|
|
8
|
-
/**
|
|
9
|
-
* Alloy-js plugin for Powerlines.
|
|
10
|
-
*
|
|
11
|
-
* @param options - The Alloy-js plugin user configuration options.
|
|
12
|
-
* @returns A Powerlines plugin that integrates Alloy-js transformations.
|
|
13
|
-
*/
|
|
14
|
-
const plugin = (options = {}) => {
|
|
15
|
-
return [{
|
|
16
|
-
name: "alloy:config",
|
|
17
|
-
config() {
|
|
18
|
-
return {
|
|
19
|
-
alloy: {
|
|
20
|
-
typescript: true,
|
|
21
|
-
...options
|
|
22
|
-
},
|
|
23
|
-
build: {
|
|
24
|
-
inputOptions: { transform: { jsx: {
|
|
25
|
-
runtime: "classic",
|
|
26
|
-
pragma: "Alloy.createElement",
|
|
27
|
-
importSource: "@alloy-js/core"
|
|
28
|
-
} } },
|
|
29
|
-
plugins: [alloy()]
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
async configResolved() {
|
|
34
|
-
if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
|
|
35
|
-
this.tsconfig.tsconfigJson.compilerOptions ??= {};
|
|
36
|
-
if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
|
|
37
|
-
if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
|
|
38
|
-
await this.fs.write(this.tsconfig.tsconfigFilePath, StormJSON.stringify(this.tsconfig.tsconfigJson));
|
|
39
|
-
}
|
|
40
|
-
this.dependencies["@alloy-js/core"] = "^0.22.0";
|
|
41
|
-
if (this.config.alloy?.typescript !== false) this.dependencies["@alloy-js/typescript"] = "^0.22.0";
|
|
42
|
-
if (this.config.alloy?.json === true) this.dependencies["@alloy-js/json"] = "^0.22.0";
|
|
43
|
-
if (this.config.alloy?.markdown === true) this.dependencies["@alloy-js/markdown"] = "^0.22.0";
|
|
44
|
-
}
|
|
45
|
-
}, {
|
|
46
|
-
name: "alloy:update-context",
|
|
47
|
-
configResolved: {
|
|
48
|
-
order: "pre",
|
|
49
|
-
async handler() {
|
|
50
|
-
this.render = async (children) => {
|
|
51
|
-
const _self$ = this;
|
|
52
|
-
const meta = {};
|
|
53
|
-
await traverseOutput(await renderAsync(createComponent(Output$1, {
|
|
54
|
-
context: _self$,
|
|
55
|
-
meta,
|
|
56
|
-
get basePath() {
|
|
57
|
-
return _self$.workspaceConfig.workspaceRoot;
|
|
58
|
-
},
|
|
59
|
-
children
|
|
60
|
-
})), {
|
|
61
|
-
visitDirectory: (directory) => {
|
|
62
|
-
if (this.fs.existsSync(directory.path)) return;
|
|
63
|
-
this.fs.mkdirSync(directory.path);
|
|
64
|
-
},
|
|
65
|
-
visitFile: (file) => {
|
|
66
|
-
if ("contents" in file) {
|
|
67
|
-
const metadata = meta[file.path] ?? {};
|
|
68
|
-
if (metadata.kind === "builtin") {
|
|
69
|
-
if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
|
|
70
|
-
this.emitBuiltinSync(file.contents, metadata.id, file.path, {
|
|
71
|
-
skipFormat: metadata.skipFormat,
|
|
72
|
-
storage: metadata.storage
|
|
73
|
-
});
|
|
74
|
-
} else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
|
|
75
|
-
skipFormat: metadata.skipFormat,
|
|
76
|
-
storage: metadata.storage,
|
|
77
|
-
...metadata.typeDefinition ?? {}
|
|
78
|
-
});
|
|
79
|
-
else this.emitSync(file.contents, file.path, metadata);
|
|
80
|
-
} else this.fs.copySync(file.sourcePath, file.path);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}];
|
|
87
|
-
};
|
|
88
|
-
var src_default = plugin;
|
|
89
|
-
|
|
90
|
-
//#endregion
|
|
91
|
-
export { src_default as default };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_context = require('../../core/contexts/context.cjs');
|
|
3
|
-
const require_single_line_comment = require('../../core/components/single-line-comment.cjs');
|
|
4
|
-
const require_source_file = require('../../core/components/source-file.cjs');
|
|
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_string_format_title_case = require("@stryke/string-format/title-case");
|
|
8
|
-
let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
9
|
-
|
|
10
|
-
//#region ../plugin-alloy/src/markdown/components/markdown-file.tsx
|
|
11
|
-
/**
|
|
12
|
-
* A base component representing a Powerlines generated markdown source file.
|
|
13
|
-
*
|
|
14
|
-
* @param props - The properties for the source file.
|
|
15
|
-
* @returns The rendered source file component.
|
|
16
|
-
*/
|
|
17
|
-
function MarkdownFile(props) {
|
|
18
|
-
const [{ children, storage }, rest] = (0, __alloy_js_core.splitProps)(props, ["children", "storage"]);
|
|
19
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_source_file.SourceFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({ get header() {
|
|
20
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(MarkdownFileHeader, {});
|
|
21
|
-
} }, rest, {
|
|
22
|
-
filetype: "md",
|
|
23
|
-
reference: __alloy_js_markdown.Link,
|
|
24
|
-
storage,
|
|
25
|
-
get children() {
|
|
26
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
27
|
-
get when() {
|
|
28
|
-
return Boolean(children);
|
|
29
|
-
},
|
|
30
|
-
children
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Renders the header for a Powerlines Typescript source file.
|
|
37
|
-
*
|
|
38
|
-
* @param props - The properties for the source file header.
|
|
39
|
-
* @returns The rendered source file header.
|
|
40
|
-
*/
|
|
41
|
-
function MarkdownFileHeader(props) {
|
|
42
|
-
const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = (0, __alloy_js_core.splitProps)(props, [
|
|
43
|
-
"children",
|
|
44
|
-
"disableEslint",
|
|
45
|
-
"disableBiome",
|
|
46
|
-
"disablePrettier"
|
|
47
|
-
]);
|
|
48
|
-
const context = require_context.usePowerlines();
|
|
49
|
-
return [
|
|
50
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
51
|
-
get when() {
|
|
52
|
-
return Boolean(disableEslint);
|
|
53
|
-
},
|
|
54
|
-
get children() {
|
|
55
|
-
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
56
|
-
variant: "markdown",
|
|
57
|
-
children: "eslint-disable"
|
|
58
|
-
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
59
|
-
}
|
|
60
|
-
}),
|
|
61
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
62
|
-
get when() {
|
|
63
|
-
return Boolean(disablePrettier);
|
|
64
|
-
},
|
|
65
|
-
get children() {
|
|
66
|
-
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
67
|
-
variant: "markdown",
|
|
68
|
-
children: "prettier-ignore"
|
|
69
|
-
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
70
|
-
}
|
|
71
|
-
}),
|
|
72
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
73
|
-
get when() {
|
|
74
|
-
return Boolean(disableBiome);
|
|
75
|
-
},
|
|
76
|
-
get children() {
|
|
77
|
-
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
78
|
-
variant: "markdown",
|
|
79
|
-
children: "biome-ignore lint: disable"
|
|
80
|
-
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
81
|
-
}
|
|
82
|
-
}),
|
|
83
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
84
|
-
get when() {
|
|
85
|
-
return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
|
|
86
|
-
},
|
|
87
|
-
get children() {
|
|
88
|
-
return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
89
|
-
}
|
|
90
|
-
}),
|
|
91
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
92
|
-
get when() {
|
|
93
|
-
return Boolean(children);
|
|
94
|
-
},
|
|
95
|
-
get children() {
|
|
96
|
-
return [children, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
97
|
-
}
|
|
98
|
-
}),
|
|
99
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
100
|
-
variant: "markdown",
|
|
101
|
-
get children() {
|
|
102
|
-
return __alloy_js_core.code`Generated by ${(0, __stryke_string_format_title_case.titleCase)(context?.config.framework) || "Powerlines"}`;
|
|
103
|
-
}
|
|
104
|
-
}),
|
|
105
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
106
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
107
|
-
variant: "markdown",
|
|
108
|
-
children: __alloy_js_core.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`
|
|
109
|
-
}),
|
|
110
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
111
|
-
];
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
//#endregion
|
|
115
|
-
exports.MarkdownFile = MarkdownFile;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { usePowerlines } from "../../core/contexts/context.mjs";
|
|
2
|
-
import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
|
|
3
|
-
import { SourceFile } from "../../core/components/source-file.mjs";
|
|
4
|
-
import { createComponent, createIntrinsic, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
|
-
import { Show, code, splitProps } from "@alloy-js/core";
|
|
6
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
7
|
-
import { Link } from "@alloy-js/markdown";
|
|
8
|
-
|
|
9
|
-
//#region ../plugin-alloy/src/markdown/components/markdown-file.tsx
|
|
10
|
-
/**
|
|
11
|
-
* A base component representing a Powerlines generated markdown source file.
|
|
12
|
-
*
|
|
13
|
-
* @param props - The properties for the source file.
|
|
14
|
-
* @returns The rendered source file component.
|
|
15
|
-
*/
|
|
16
|
-
function MarkdownFile(props) {
|
|
17
|
-
const [{ children, storage }, rest] = splitProps(props, ["children", "storage"]);
|
|
18
|
-
return createComponent(SourceFile, mergeProps({ get header() {
|
|
19
|
-
return createComponent(MarkdownFileHeader, {});
|
|
20
|
-
} }, rest, {
|
|
21
|
-
filetype: "md",
|
|
22
|
-
reference: Link,
|
|
23
|
-
storage,
|
|
24
|
-
get children() {
|
|
25
|
-
return createComponent(Show, {
|
|
26
|
-
get when() {
|
|
27
|
-
return Boolean(children);
|
|
28
|
-
},
|
|
29
|
-
children
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Renders the header for a Powerlines Typescript source file.
|
|
36
|
-
*
|
|
37
|
-
* @param props - The properties for the source file header.
|
|
38
|
-
* @returns The rendered source file header.
|
|
39
|
-
*/
|
|
40
|
-
function MarkdownFileHeader(props) {
|
|
41
|
-
const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = splitProps(props, [
|
|
42
|
-
"children",
|
|
43
|
-
"disableEslint",
|
|
44
|
-
"disableBiome",
|
|
45
|
-
"disablePrettier"
|
|
46
|
-
]);
|
|
47
|
-
const context = usePowerlines();
|
|
48
|
-
return [
|
|
49
|
-
createComponent(Show, {
|
|
50
|
-
get when() {
|
|
51
|
-
return Boolean(disableEslint);
|
|
52
|
-
},
|
|
53
|
-
get children() {
|
|
54
|
-
return [createComponent(SingleLineComment, {
|
|
55
|
-
variant: "markdown",
|
|
56
|
-
children: "eslint-disable"
|
|
57
|
-
}), createIntrinsic("hbr", {})];
|
|
58
|
-
}
|
|
59
|
-
}),
|
|
60
|
-
createComponent(Show, {
|
|
61
|
-
get when() {
|
|
62
|
-
return Boolean(disablePrettier);
|
|
63
|
-
},
|
|
64
|
-
get children() {
|
|
65
|
-
return [createComponent(SingleLineComment, {
|
|
66
|
-
variant: "markdown",
|
|
67
|
-
children: "prettier-ignore"
|
|
68
|
-
}), createIntrinsic("hbr", {})];
|
|
69
|
-
}
|
|
70
|
-
}),
|
|
71
|
-
createComponent(Show, {
|
|
72
|
-
get when() {
|
|
73
|
-
return Boolean(disableBiome);
|
|
74
|
-
},
|
|
75
|
-
get children() {
|
|
76
|
-
return [createComponent(SingleLineComment, {
|
|
77
|
-
variant: "markdown",
|
|
78
|
-
children: "biome-ignore lint: disable"
|
|
79
|
-
}), createIntrinsic("hbr", {})];
|
|
80
|
-
}
|
|
81
|
-
}),
|
|
82
|
-
createComponent(Show, {
|
|
83
|
-
get when() {
|
|
84
|
-
return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
|
|
85
|
-
},
|
|
86
|
-
get children() {
|
|
87
|
-
return createIntrinsic("hbr", {});
|
|
88
|
-
}
|
|
89
|
-
}),
|
|
90
|
-
createComponent(Show, {
|
|
91
|
-
get when() {
|
|
92
|
-
return Boolean(children);
|
|
93
|
-
},
|
|
94
|
-
get children() {
|
|
95
|
-
return [children, createIntrinsic("hbr", {})];
|
|
96
|
-
}
|
|
97
|
-
}),
|
|
98
|
-
createComponent(SingleLineComment, {
|
|
99
|
-
variant: "markdown",
|
|
100
|
-
get children() {
|
|
101
|
-
return code`Generated by ${titleCase(context?.config.framework) || "Powerlines"}`;
|
|
102
|
-
}
|
|
103
|
-
}),
|
|
104
|
-
createIntrinsic("hbr", {}),
|
|
105
|
-
createComponent(SingleLineComment, {
|
|
106
|
-
variant: "markdown",
|
|
107
|
-
children: code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`
|
|
108
|
-
}),
|
|
109
|
-
createIntrinsic("hbr", {})
|
|
110
|
-
];
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
//#endregion
|
|
114
|
-
export { MarkdownFile };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_markdown_table = require('../contexts/markdown-table.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_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
|
-
let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
7
|
-
|
|
8
|
-
//#region ../plugin-alloy/src/markdown/components/markdown-table.tsx
|
|
9
|
-
/**
|
|
10
|
-
* Component that provides a context for rendering markdown tables.
|
|
11
|
-
*/
|
|
12
|
-
function MarkdownTable(props) {
|
|
13
|
-
const [{ children, data }] = (0, __alloy_js_core.splitProps)(props, ["children", "data"]);
|
|
14
|
-
const columns = (0, __alloy_js_core.computed)(() => Object.keys(data).map((name, index) => ({
|
|
15
|
-
index,
|
|
16
|
-
name,
|
|
17
|
-
align: "left",
|
|
18
|
-
width: 20
|
|
19
|
-
})));
|
|
20
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_markdown_table.MarkdownTableContext.Provider, {
|
|
21
|
-
get value() {
|
|
22
|
-
return {
|
|
23
|
-
columns: columns.value,
|
|
24
|
-
data
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
get children() {
|
|
28
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
29
|
-
get when() {
|
|
30
|
-
return Boolean(children);
|
|
31
|
-
},
|
|
32
|
-
children
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
exports.MarkdownTable = MarkdownTable;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { MarkdownTableContext } from "../contexts/markdown-table.mjs";
|
|
2
|
-
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { Prose, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
4
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
5
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
6
|
-
|
|
7
|
-
//#region ../plugin-alloy/src/markdown/components/markdown-table.tsx
|
|
8
|
-
/**
|
|
9
|
-
* Component that provides a context for rendering markdown tables.
|
|
10
|
-
*/
|
|
11
|
-
function MarkdownTable(props) {
|
|
12
|
-
const [{ children, data }] = splitProps(props, ["children", "data"]);
|
|
13
|
-
const columns = computed(() => Object.keys(data).map((name, index) => ({
|
|
14
|
-
index,
|
|
15
|
-
name,
|
|
16
|
-
align: "left",
|
|
17
|
-
width: 20
|
|
18
|
-
})));
|
|
19
|
-
return createComponent(MarkdownTableContext.Provider, {
|
|
20
|
-
get value() {
|
|
21
|
-
return {
|
|
22
|
-
columns: columns.value,
|
|
23
|
-
data
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
get children() {
|
|
27
|
-
return createComponent(Show, {
|
|
28
|
-
get when() {
|
|
29
|
-
return Boolean(children);
|
|
30
|
-
},
|
|
31
|
-
children
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
export { MarkdownTable };
|