@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,39 @@
|
|
|
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;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
3
|
+
|
|
4
|
+
//#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
|
|
5
|
+
const __ΩRecord = [
|
|
6
|
+
"K",
|
|
7
|
+
"T",
|
|
8
|
+
"Record",
|
|
9
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
10
|
+
];
|
|
11
|
+
const __ΩMarkdownTableColumnContextInterface = [
|
|
12
|
+
() => __ΩRecord,
|
|
13
|
+
"T",
|
|
14
|
+
"index",
|
|
15
|
+
"name",
|
|
16
|
+
"left",
|
|
17
|
+
"right",
|
|
18
|
+
"center",
|
|
19
|
+
"align",
|
|
20
|
+
"width",
|
|
21
|
+
"MarkdownTableColumnContextInterface",
|
|
22
|
+
"&\"o!#c\"P'4#e\"!g4$P.%.&.'J4('4)Mw*y"
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
* The Powerlines context used in template rendering.
|
|
26
|
+
*/
|
|
27
|
+
const MarkdownTableColumnContext = (__alloy_js_core.createNamedContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], (0, __alloy_js_core.createNamedContext)("markdown-table-column", {}));
|
|
28
|
+
/**
|
|
29
|
+
* Hook to access the Powerlines Context.
|
|
30
|
+
*
|
|
31
|
+
* @returns The Context.
|
|
32
|
+
*/
|
|
33
|
+
function useMarkdownTableColumn() {
|
|
34
|
+
return __alloy_js_core.useContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], (0, __alloy_js_core.useContext)(MarkdownTableColumnContext);
|
|
35
|
+
}
|
|
36
|
+
useMarkdownTableColumn.__type = [
|
|
37
|
+
"useMarkdownTableColumn",
|
|
38
|
+
"Hook to access the Powerlines Context.",
|
|
39
|
+
"P\"/!?\""
|
|
40
|
+
];
|
|
41
|
+
const __ΩMarkdownTableContextInterface = [
|
|
42
|
+
() => __ΩRecord,
|
|
43
|
+
"T",
|
|
44
|
+
() => __ΩMarkdownTableColumnContextInterface,
|
|
45
|
+
"columns",
|
|
46
|
+
"data",
|
|
47
|
+
"MarkdownTableContextInterface",
|
|
48
|
+
"&\"o!#c\"Pe\"!o#\"F4$e\"!F4%Mw&y"
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* The Powerlines context used in template rendering.
|
|
52
|
+
*/
|
|
53
|
+
const MarkdownTableContext = (__alloy_js_core.createContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], (0, __alloy_js_core.createContext)({
|
|
54
|
+
columns: [],
|
|
55
|
+
data: []
|
|
56
|
+
}));
|
|
57
|
+
/**
|
|
58
|
+
* Hook to access the Powerlines Context.
|
|
59
|
+
*
|
|
60
|
+
* @returns The Context.
|
|
61
|
+
*/
|
|
62
|
+
function useMarkdownTable() {
|
|
63
|
+
return __alloy_js_core.useContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], (0, __alloy_js_core.useContext)(MarkdownTableContext);
|
|
64
|
+
}
|
|
65
|
+
useMarkdownTable.__type = [
|
|
66
|
+
"useMarkdownTable",
|
|
67
|
+
"Hook to access the Powerlines Context.",
|
|
68
|
+
"P\"/!?\""
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
exports.MarkdownTableContext = MarkdownTableContext;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createContext, createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
|
|
4
|
+
const __ΩRecord = [
|
|
5
|
+
"K",
|
|
6
|
+
"T",
|
|
7
|
+
"Record",
|
|
8
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
9
|
+
];
|
|
10
|
+
const __ΩMarkdownTableColumnContextInterface = [
|
|
11
|
+
() => __ΩRecord,
|
|
12
|
+
"T",
|
|
13
|
+
"index",
|
|
14
|
+
"name",
|
|
15
|
+
"left",
|
|
16
|
+
"right",
|
|
17
|
+
"center",
|
|
18
|
+
"align",
|
|
19
|
+
"width",
|
|
20
|
+
"MarkdownTableColumnContextInterface",
|
|
21
|
+
"&\"o!#c\"P'4#e\"!g4$P.%.&.'J4('4)Mw*y"
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* The Powerlines context used in template rendering.
|
|
25
|
+
*/
|
|
26
|
+
const MarkdownTableColumnContext = (createNamedContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], createNamedContext("markdown-table-column", {}));
|
|
27
|
+
/**
|
|
28
|
+
* Hook to access the Powerlines Context.
|
|
29
|
+
*
|
|
30
|
+
* @returns The Context.
|
|
31
|
+
*/
|
|
32
|
+
function useMarkdownTableColumn() {
|
|
33
|
+
return useContext.Ω = [[() => __ΩMarkdownTableColumnContextInterface, "n!"]], useContext(MarkdownTableColumnContext);
|
|
34
|
+
}
|
|
35
|
+
useMarkdownTableColumn.__type = [
|
|
36
|
+
"useMarkdownTableColumn",
|
|
37
|
+
"Hook to access the Powerlines Context.",
|
|
38
|
+
"P\"/!?\""
|
|
39
|
+
];
|
|
40
|
+
const __ΩMarkdownTableContextInterface = [
|
|
41
|
+
() => __ΩRecord,
|
|
42
|
+
"T",
|
|
43
|
+
() => __ΩMarkdownTableColumnContextInterface,
|
|
44
|
+
"columns",
|
|
45
|
+
"data",
|
|
46
|
+
"MarkdownTableContextInterface",
|
|
47
|
+
"&\"o!#c\"Pe\"!o#\"F4$e\"!F4%Mw&y"
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* The Powerlines context used in template rendering.
|
|
51
|
+
*/
|
|
52
|
+
const MarkdownTableContext = (createContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], createContext({
|
|
53
|
+
columns: [],
|
|
54
|
+
data: []
|
|
55
|
+
}));
|
|
56
|
+
/**
|
|
57
|
+
* Hook to access the Powerlines Context.
|
|
58
|
+
*
|
|
59
|
+
* @returns The Context.
|
|
60
|
+
*/
|
|
61
|
+
function useMarkdownTable() {
|
|
62
|
+
return useContext.Ω = [[() => __ΩMarkdownTableContextInterface, "n!"]], useContext(MarkdownTableContext);
|
|
63
|
+
}
|
|
64
|
+
useMarkdownTable.__type = [
|
|
65
|
+
"useMarkdownTable",
|
|
66
|
+
"Hook to access the Powerlines Context.",
|
|
67
|
+
"P\"/!?\""
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { MarkdownTableContext };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../plugin-alloy/src/types/components.ts
|
|
3
|
+
const __ΩPartial = [
|
|
4
|
+
"T",
|
|
5
|
+
"Partial",
|
|
6
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
7
|
+
];
|
|
8
|
+
const __ΩReflectionOverrideInterface = [
|
|
9
|
+
"T",
|
|
10
|
+
"Children",
|
|
11
|
+
"name",
|
|
12
|
+
"type",
|
|
13
|
+
false,
|
|
14
|
+
"extends",
|
|
15
|
+
() => __ΩPartial,
|
|
16
|
+
"defaultValue",
|
|
17
|
+
"ReflectionOverrideInterface",
|
|
18
|
+
"b!PP&\"w\"J4#8P&\"w\"J4$8P&.%J4&8e\"!o'\"4(8Mw)y"
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.__ΩReflectionOverrideInterface = __ΩReflectionOverrideInterface;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
|
|
3
|
+
//#region ../plugin-alloy/src/types/components.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A type that represents the props of a component that can have children.
|
|
7
|
+
*/
|
|
8
|
+
interface ComponentProps {
|
|
9
|
+
children?: Children;
|
|
10
|
+
}
|
|
11
|
+
interface TypescriptFileImportItem {
|
|
12
|
+
name: string;
|
|
13
|
+
default?: boolean;
|
|
14
|
+
alias?: string;
|
|
15
|
+
type?: boolean;
|
|
16
|
+
}
|
|
17
|
+
type TypescriptFileImportList = Record<string, null | Array<TypescriptFileImportItem | string>>;
|
|
18
|
+
type TypescriptFileImports = TypescriptFileImportList & {
|
|
19
|
+
$builtins?: TypescriptFileImportList;
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ComponentProps, TypescriptFileImports };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../../powerlines/src/types/resolved.mjs";
|
|
1
2
|
import { Children } from "@alloy-js/core";
|
|
2
3
|
import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
|
|
3
4
|
|
|
@@ -20,4 +21,4 @@ type TypescriptFileImports = TypescriptFileImportList & {
|
|
|
20
21
|
$builtins?: TypescriptFileImportList;
|
|
21
22
|
};
|
|
22
23
|
//#endregion
|
|
23
|
-
export {
|
|
24
|
+
export { ComponentProps, TypescriptFileImportItem, TypescriptFileImportList, TypescriptFileImports };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region ../plugin-alloy/src/types/components.ts
|
|
2
|
+
const __ΩPartial = [
|
|
3
|
+
"T",
|
|
4
|
+
"Partial",
|
|
5
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
6
|
+
];
|
|
7
|
+
const __ΩReflectionOverrideInterface = [
|
|
8
|
+
"T",
|
|
9
|
+
"Children",
|
|
10
|
+
"name",
|
|
11
|
+
"type",
|
|
12
|
+
false,
|
|
13
|
+
"extends",
|
|
14
|
+
() => __ΩPartial,
|
|
15
|
+
"defaultValue",
|
|
16
|
+
"ReflectionOverrideInterface",
|
|
17
|
+
"b!PP&\"w\"J4#8P&\"w\"J4$8P&.%J4&8e\"!o'\"4(8Mw)y"
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { __ΩReflectionOverrideInterface };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const require_config = require('../../../powerlines/src/types/config.cjs');
|
|
2
|
+
const require_resolved = require('../../../powerlines/src/types/resolved.cjs');
|
|
3
|
+
const require_context = require('../../../powerlines/src/types/context.cjs');
|
|
4
|
+
|
|
5
|
+
//#region ../plugin-alloy/src/types/plugin.ts
|
|
6
|
+
const __ΩPartial = [
|
|
7
|
+
"T",
|
|
8
|
+
"Partial",
|
|
9
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
10
|
+
];
|
|
11
|
+
const __ΩAlloyPluginOptions = [
|
|
12
|
+
() => __ΩPartial,
|
|
13
|
+
"PrintTreeOptions",
|
|
14
|
+
"typescript",
|
|
15
|
+
true,
|
|
16
|
+
"If true, the Alloy framework is used to generate Typescript output files.",
|
|
17
|
+
"json",
|
|
18
|
+
"If true, the Alloy framework is used to generate JSON output files.",
|
|
19
|
+
"markdown",
|
|
20
|
+
"If true, the Alloy framework is used to generate Markdown output files.",
|
|
21
|
+
"AlloyPluginOptions",
|
|
22
|
+
"P\"w\"o!\"P)4#8>$?%)4&8>$?')4(8>$?)MKw*y"
|
|
23
|
+
];
|
|
24
|
+
const __ΩAlloyPluginUserConfig = [
|
|
25
|
+
() => require_config.__ΩUserConfig,
|
|
26
|
+
() => __ΩAlloyPluginOptions,
|
|
27
|
+
"alloy",
|
|
28
|
+
"AlloyPluginUserConfig",
|
|
29
|
+
"Pn!Pn\"4#8MKw$y"
|
|
30
|
+
];
|
|
31
|
+
const __ΩAlloyPluginResolvedConfig = [
|
|
32
|
+
() => require_resolved.__ΩResolvedConfig,
|
|
33
|
+
() => __ΩAlloyPluginOptions,
|
|
34
|
+
"alloy",
|
|
35
|
+
"AlloyPluginResolvedConfig",
|
|
36
|
+
"Pn!Pn\"4#MKw$y"
|
|
37
|
+
];
|
|
38
|
+
const __ΩAlloyPluginContext = [
|
|
39
|
+
() => __ΩAlloyPluginResolvedConfig,
|
|
40
|
+
"TResolvedConfig",
|
|
41
|
+
() => require_context.__ΩPluginContext,
|
|
42
|
+
"this",
|
|
43
|
+
"Children",
|
|
44
|
+
"children",
|
|
45
|
+
"",
|
|
46
|
+
"render",
|
|
47
|
+
"AlloyPluginContext",
|
|
48
|
+
"n!c\"Pe\"!o#\"PP\"2$\"w%2&$`/'4(MKw)y"
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
exports.__ΩAlloyPluginContext = __ΩAlloyPluginContext;
|
|
53
|
+
exports.__ΩAlloyPluginOptions = __ΩAlloyPluginOptions;
|
|
54
|
+
exports.__ΩAlloyPluginResolvedConfig = __ΩAlloyPluginResolvedConfig;
|
|
55
|
+
exports.__ΩAlloyPluginUserConfig = __ΩAlloyPluginUserConfig;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PluginContext } from "../../../powerlines/src/types/context.cjs";
|
|
2
|
+
import { UserConfig } from "../../../powerlines/src/types/config.cjs";
|
|
3
|
+
import { ResolvedConfig } from "../../../powerlines/src/types/resolved.cjs";
|
|
4
|
+
import { Children, PrintTreeOptions } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
//#region ../plugin-alloy/src/types/plugin.d.ts
|
|
7
|
+
type AlloyPluginOptions = Partial<PrintTreeOptions> & {
|
|
8
|
+
/**
|
|
9
|
+
* If true, the Alloy framework is used to generate Typescript output files.
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue true
|
|
12
|
+
*/
|
|
13
|
+
typescript?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* If true, the Alloy framework is used to generate JSON output files.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue false
|
|
18
|
+
*/
|
|
19
|
+
json?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the Alloy framework is used to generate Markdown output files.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
*/
|
|
25
|
+
markdown?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type AlloyPluginUserConfig = UserConfig & {
|
|
28
|
+
alloy?: AlloyPluginOptions;
|
|
29
|
+
};
|
|
30
|
+
type AlloyPluginResolvedConfig = ResolvedConfig & {
|
|
31
|
+
alloy: AlloyPluginOptions;
|
|
32
|
+
};
|
|
33
|
+
type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
34
|
+
render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PluginContext } from "../../../powerlines/src/types/context.mjs";
|
|
2
|
+
import { UserConfig } from "../../../powerlines/src/types/config.mjs";
|
|
3
|
+
import { ResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
|
|
4
|
+
import { Children, PrintTreeOptions } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
//#region ../plugin-alloy/src/types/plugin.d.ts
|
|
7
|
+
type AlloyPluginOptions = Partial<PrintTreeOptions> & {
|
|
8
|
+
/**
|
|
9
|
+
* If true, the Alloy framework is used to generate Typescript output files.
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue true
|
|
12
|
+
*/
|
|
13
|
+
typescript?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* If true, the Alloy framework is used to generate JSON output files.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue false
|
|
18
|
+
*/
|
|
19
|
+
json?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the Alloy framework is used to generate Markdown output files.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
*/
|
|
25
|
+
markdown?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type AlloyPluginUserConfig = UserConfig & {
|
|
28
|
+
alloy?: AlloyPluginOptions;
|
|
29
|
+
};
|
|
30
|
+
type AlloyPluginResolvedConfig = ResolvedConfig & {
|
|
31
|
+
alloy: AlloyPluginOptions;
|
|
32
|
+
};
|
|
33
|
+
type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
34
|
+
render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { __ΩUserConfig } from "../../../powerlines/src/types/config.mjs";
|
|
2
|
+
import { __ΩResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
|
|
3
|
+
import { __ΩPluginContext } from "../../../powerlines/src/types/context.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../plugin-alloy/src/types/plugin.ts
|
|
6
|
+
const __ΩPartial = [
|
|
7
|
+
"T",
|
|
8
|
+
"Partial",
|
|
9
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
10
|
+
];
|
|
11
|
+
const __ΩAlloyPluginOptions = [
|
|
12
|
+
() => __ΩPartial,
|
|
13
|
+
"PrintTreeOptions",
|
|
14
|
+
"typescript",
|
|
15
|
+
true,
|
|
16
|
+
"If true, the Alloy framework is used to generate Typescript output files.",
|
|
17
|
+
"json",
|
|
18
|
+
"If true, the Alloy framework is used to generate JSON output files.",
|
|
19
|
+
"markdown",
|
|
20
|
+
"If true, the Alloy framework is used to generate Markdown output files.",
|
|
21
|
+
"AlloyPluginOptions",
|
|
22
|
+
"P\"w\"o!\"P)4#8>$?%)4&8>$?')4(8>$?)MKw*y"
|
|
23
|
+
];
|
|
24
|
+
const __ΩAlloyPluginUserConfig = [
|
|
25
|
+
() => __ΩUserConfig,
|
|
26
|
+
() => __ΩAlloyPluginOptions,
|
|
27
|
+
"alloy",
|
|
28
|
+
"AlloyPluginUserConfig",
|
|
29
|
+
"Pn!Pn\"4#8MKw$y"
|
|
30
|
+
];
|
|
31
|
+
const __ΩAlloyPluginResolvedConfig = [
|
|
32
|
+
() => __ΩResolvedConfig,
|
|
33
|
+
() => __ΩAlloyPluginOptions,
|
|
34
|
+
"alloy",
|
|
35
|
+
"AlloyPluginResolvedConfig",
|
|
36
|
+
"Pn!Pn\"4#MKw$y"
|
|
37
|
+
];
|
|
38
|
+
const __ΩAlloyPluginContext = [
|
|
39
|
+
() => __ΩAlloyPluginResolvedConfig,
|
|
40
|
+
"TResolvedConfig",
|
|
41
|
+
() => __ΩPluginContext,
|
|
42
|
+
"this",
|
|
43
|
+
"Children",
|
|
44
|
+
"children",
|
|
45
|
+
"",
|
|
46
|
+
"render",
|
|
47
|
+
"AlloyPluginContext",
|
|
48
|
+
"n!c\"Pe\"!o#\"PP\"2$\"w%2&$`/'4(MKw)y"
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_context = require('../../core/contexts/context.cjs');
|
|
3
|
+
const require_tsdoc = require('./tsdoc.cjs');
|
|
4
|
+
const require_typescript_file = require('./typescript-file.cjs');
|
|
5
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
7
|
+
let __stryke_path_replace = require("@stryke/path/replace");
|
|
8
|
+
let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
9
|
+
let __stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
10
|
+
|
|
11
|
+
//#region ../plugin-alloy/src/typescript/components/builtin-file.tsx
|
|
12
|
+
/**
|
|
13
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
14
|
+
*
|
|
15
|
+
* @param props - The properties for the source file.
|
|
16
|
+
* @returns The rendered source file component.
|
|
17
|
+
*/
|
|
18
|
+
function BuiltinFile(props) {
|
|
19
|
+
const [{ children, imports, id, description, tsx }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
20
|
+
"children",
|
|
21
|
+
"imports",
|
|
22
|
+
"id",
|
|
23
|
+
"description",
|
|
24
|
+
"tsx"
|
|
25
|
+
]);
|
|
26
|
+
const context = require_context.usePowerlines();
|
|
27
|
+
const path = (0, __alloy_js_core.computed)(() => (0, __stryke_path_replace.replacePath)(`${!(0, __stryke_type_checks_is_set.isSet)(tsx) ? id : (0, __stryke_path_replace.replaceExtension)(id)}${(0, __stryke_path_file_path_fns.hasFileExtension)(id) && !(0, __stryke_type_checks_is_set.isSet)(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context.builtinsPath));
|
|
28
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_file.TypescriptFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({
|
|
29
|
+
get header() {
|
|
30
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_file.TypescriptFileHeader, {
|
|
31
|
+
get header() {
|
|
32
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_tsdoc.TSDocModule, {
|
|
33
|
+
name: id,
|
|
34
|
+
children: description
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
get children() {
|
|
38
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_file.TypescriptFileHeaderImports, { imports });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
get meta() {
|
|
43
|
+
return {
|
|
44
|
+
kind: "builtin",
|
|
45
|
+
id: (0, __stryke_path_replace.replaceExtension)(id)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}, rest, {
|
|
49
|
+
get path() {
|
|
50
|
+
return path.value;
|
|
51
|
+
},
|
|
52
|
+
children
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
exports.BuiltinFile = BuiltinFile;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TSDocModuleProps } from "./tsdoc.cjs";
|
|
2
|
+
import { TypescriptFileProps } from "./typescript-file.cjs";
|
|
3
|
+
|
|
4
|
+
//#region ../plugin-alloy/src/typescript/components/builtin-file.d.ts
|
|
5
|
+
type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
|
|
6
|
+
/**
|
|
7
|
+
* The runtime module identifier.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This value will be included after the \`storm:\` prefix in the import statement.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
/**
|
|
14
|
+
* The description for the builtin module.
|
|
15
|
+
*/
|
|
16
|
+
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the file is a TSX file.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue false
|
|
21
|
+
*/
|
|
22
|
+
tsx?: boolean;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { BuiltinFileProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TSDocModuleProps } from "./tsdoc.mjs";
|
|
2
|
+
import { TypescriptFileProps } from "./typescript-file.mjs";
|
|
3
|
+
import "@alloy-js/core";
|
|
4
|
+
|
|
5
|
+
//#region ../plugin-alloy/src/typescript/components/builtin-file.d.ts
|
|
6
|
+
type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
|
|
7
|
+
/**
|
|
8
|
+
* The runtime module identifier.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* This value will be included after the \`storm:\` prefix in the import statement.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* The description for the builtin module.
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the file is a TSX file.
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue false
|
|
22
|
+
*/
|
|
23
|
+
tsx?: boolean;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { BuiltinFileProps };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { usePowerlines } from "../../core/contexts/context.mjs";
|
|
2
|
+
import { TSDocModule } from "./tsdoc.mjs";
|
|
3
|
+
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./typescript-file.mjs";
|
|
4
|
+
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
|
+
import { computed, splitProps } from "@alloy-js/core";
|
|
6
|
+
import { replaceExtension, replacePath } from "@stryke/path/replace";
|
|
7
|
+
import { hasFileExtension } from "@stryke/path/file-path-fns";
|
|
8
|
+
import { isSet } from "@stryke/type-checks/is-set";
|
|
9
|
+
|
|
10
|
+
//#region ../plugin-alloy/src/typescript/components/builtin-file.tsx
|
|
11
|
+
/**
|
|
12
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
13
|
+
*
|
|
14
|
+
* @param props - The properties for the source file.
|
|
15
|
+
* @returns The rendered source file component.
|
|
16
|
+
*/
|
|
17
|
+
function BuiltinFile(props) {
|
|
18
|
+
const [{ children, imports, id, description, tsx }, rest] = splitProps(props, [
|
|
19
|
+
"children",
|
|
20
|
+
"imports",
|
|
21
|
+
"id",
|
|
22
|
+
"description",
|
|
23
|
+
"tsx"
|
|
24
|
+
]);
|
|
25
|
+
const context = usePowerlines();
|
|
26
|
+
const path = computed(() => replacePath(`${!isSet(tsx) ? id : replaceExtension(id)}${hasFileExtension(id) && !isSet(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context.builtinsPath));
|
|
27
|
+
return createComponent(TypescriptFile, mergeProps({
|
|
28
|
+
get header() {
|
|
29
|
+
return createComponent(TypescriptFileHeader, {
|
|
30
|
+
get header() {
|
|
31
|
+
return createComponent(TSDocModule, {
|
|
32
|
+
name: id,
|
|
33
|
+
children: description
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
get children() {
|
|
37
|
+
return createComponent(TypescriptFileHeaderImports, { imports });
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
get meta() {
|
|
42
|
+
return {
|
|
43
|
+
kind: "builtin",
|
|
44
|
+
id: replaceExtension(id)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}, rest, {
|
|
48
|
+
get path() {
|
|
49
|
+
return path.value;
|
|
50
|
+
},
|
|
51
|
+
children
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { BuiltinFile };
|