@powerlines/plugin-alloy 0.15.6 → 0.15.8
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 +8 -0
- package/dist/_virtual/rolldown_runtime.mjs +29 -0
- package/dist/core/components/output.cjs +6 -6
- package/dist/core/components/output.d.cts +3 -3
- package/dist/core/components/output.d.mts +3 -3
- package/dist/core/components/output.mjs +1 -1
- package/dist/core/components/single-line-comment.cjs +2 -2
- package/dist/core/components/single-line-comment.d.cts +2 -2
- package/dist/core/components/single-line-comment.d.mts +2 -2
- package/dist/core/components/single-line-comment.mjs +1 -1
- package/dist/core/components/source-file.cjs +7 -7
- package/dist/core/components/source-file.d.cts +3 -3
- package/dist/core/components/source-file.d.mts +3 -3
- package/dist/core/components/source-file.mjs +1 -1
- package/dist/core/contexts/context.cjs +3 -3
- package/dist/core/contexts/context.d.cts +1 -1
- package/dist/core/contexts/context.d.mts +1 -1
- package/dist/core/contexts/context.mjs +1 -1
- package/dist/core/contexts/reflection.cjs +9 -9
- package/dist/core/contexts/reflection.d.cts +1 -1
- package/dist/core/contexts/reflection.d.mts +1 -1
- package/dist/core/contexts/reflection.mjs +1 -1
- package/dist/core/index.d.cts +2 -0
- package/dist/helpers/capnp.cjs +2 -2
- package/dist/helpers/capnp.mjs +2 -2
- package/dist/helpers/create-builtin.d.cts +1 -1
- package/dist/helpers/create-builtin.d.mts +1 -1
- package/dist/helpers/index.cjs +2 -2
- package/dist/helpers/index.mjs +2 -2
- package/dist/helpers/refkey.cjs +2 -2
- package/dist/helpers/refkey.d.cts +1 -1
- package/dist/helpers/refkey.d.mts +1 -1
- package/dist/helpers/refkey.mjs +1 -1
- package/dist/index.cjs +15 -114
- package/dist/index.d.cts +3 -24
- package/dist/index.d.mts +3 -29
- package/dist/index.mjs +15 -38
- package/dist/markdown/components/markdown-file.cjs +12 -12
- package/dist/markdown/components/markdown-file.d.cts +5 -5
- package/dist/markdown/components/markdown-file.d.mts +5 -5
- package/dist/markdown/components/markdown-file.mjs +1 -1
- package/dist/markdown/components/markdown-table.cjs +17 -17
- package/dist/markdown/components/markdown-table.d.cts +4 -4
- package/dist/markdown/components/markdown-table.d.mts +4 -4
- package/dist/markdown/components/markdown-table.mjs +1 -1
- package/dist/markdown/contexts/markdown-table.cjs +5 -5
- package/dist/markdown/contexts/markdown-table.d.cts +1 -1
- package/dist/markdown/contexts/markdown-table.d.mts +1 -1
- package/dist/markdown/contexts/markdown-table.mjs +1 -1
- package/dist/markdown/index.d.cts +2 -0
- package/dist/types/components.d.cts +4 -5
- package/dist/types/components.d.mts +1 -2
- package/dist/types/plugin.d.cts +2 -3
- package/dist/types/plugin.d.mts +1 -2
- package/dist/typescript/components/builtin-file.cjs +2 -2
- package/dist/typescript/components/builtin-file.d.cts +2 -2
- package/dist/typescript/components/builtin-file.mjs +1 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
- package/dist/typescript/components/dynamic-import-statement.mjs +1 -1
- package/dist/typescript/components/entry-file.cjs +3 -3
- package/dist/typescript/components/entry-file.d.cts +2 -2
- package/dist/typescript/components/entry-file.d.mts +2 -2
- package/dist/typescript/components/entry-file.mjs +1 -1
- package/dist/typescript/components/record-expression.cjs +2 -2
- package/dist/typescript/components/record-expression.d.cts +1 -1
- package/dist/typescript/components/record-expression.d.mts +1 -1
- package/dist/typescript/components/record-expression.mjs +1 -1
- package/dist/typescript/components/tsdoc-reflection.cjs +26 -26
- package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
- package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
- package/dist/typescript/components/tsdoc-reflection.mjs +1 -1
- package/dist/typescript/components/tsdoc.cjs +45 -45
- package/dist/typescript/components/tsdoc.d.cts +1 -1
- package/dist/typescript/components/tsdoc.d.mts +1 -1
- package/dist/typescript/components/tsdoc.mjs +1 -1
- package/dist/typescript/components/typescript-file.cjs +20 -20
- package/dist/typescript/components/typescript-file.d.cts +1 -1
- package/dist/typescript/components/typescript-file.d.mts +1 -1
- package/dist/typescript/components/typescript-file.mjs +1 -1
- package/dist/typescript/components/typescript-interface.cjs +5 -5
- package/dist/typescript/components/typescript-interface.mjs +1 -1
- package/dist/typescript/components/typescript-object.cjs +12 -12
- package/dist/typescript/components/typescript-object.d.cts +3 -3
- package/dist/typescript/components/typescript-object.d.mts +3 -3
- package/dist/typescript/components/typescript-object.mjs +1 -1
- package/dist/typescript/index.d.cts +1 -0
- package/dist/vendor.cjs +14 -12588
- package/dist/vendor.js +99 -103
- package/dist/vendor.mjs +11 -0
- package/package.json +7 -23
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_markdown_contexts_markdown_table = require('../contexts/markdown-table.cjs');
|
|
3
3
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
|
-
let
|
|
4
|
+
let __powerlines_plugin_alloy_vendor = require("@powerlines/plugin-alloy/vendor");
|
|
5
5
|
let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
6
6
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
7
7
|
|
|
@@ -10,8 +10,8 @@ let __stryke_string_format_title_case = require("@stryke/string-format/title-cas
|
|
|
10
10
|
* Component that provides a context for rendering markdown tables.
|
|
11
11
|
*/
|
|
12
12
|
function MarkdownTable(props) {
|
|
13
|
-
const [{ children, data }] = (0,
|
|
14
|
-
const columns = (0,
|
|
13
|
+
const [{ children, data }] = (0, __powerlines_plugin_alloy_vendor.splitProps)(props, ["children", "data"]);
|
|
14
|
+
const columns = (0, __powerlines_plugin_alloy_vendor.computed)(() => Object.keys(data).map((name, index) => ({
|
|
15
15
|
index,
|
|
16
16
|
name,
|
|
17
17
|
align: "left",
|
|
@@ -25,7 +25,7 @@ function MarkdownTable(props) {
|
|
|
25
25
|
};
|
|
26
26
|
},
|
|
27
27
|
get children() {
|
|
28
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
28
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
29
29
|
get when() {
|
|
30
30
|
return Boolean(children);
|
|
31
31
|
},
|
|
@@ -38,35 +38,35 @@ function MarkdownTable(props) {
|
|
|
38
38
|
* Component that provides a context for rendering markdown tables.
|
|
39
39
|
*/
|
|
40
40
|
function MarkdownTableColumn(props) {
|
|
41
|
-
const [{ children, width, align, name }] = (0,
|
|
41
|
+
const [{ children, width, align, name }] = (0, __powerlines_plugin_alloy_vendor.splitProps)(props, [
|
|
42
42
|
"children",
|
|
43
43
|
"width",
|
|
44
44
|
"align",
|
|
45
45
|
"name"
|
|
46
46
|
]);
|
|
47
47
|
const tableContext = require_markdown_contexts_markdown_table.useMarkdownTable();
|
|
48
|
-
const columnRef = (0,
|
|
49
|
-
const indexRef = (0,
|
|
50
|
-
const alignRef = (0,
|
|
51
|
-
const widthRef = (0,
|
|
52
|
-
const textLength = (0,
|
|
48
|
+
const columnRef = (0, __powerlines_plugin_alloy_vendor.computed)(() => tableContext?.columns.find((c) => c.name === name));
|
|
49
|
+
const indexRef = (0, __powerlines_plugin_alloy_vendor.computed)(() => columnRef.value?.index ?? 0);
|
|
50
|
+
const alignRef = (0, __powerlines_plugin_alloy_vendor.computed)(() => columnRef.value?.align ?? align ?? "left");
|
|
51
|
+
const widthRef = (0, __powerlines_plugin_alloy_vendor.computed)(() => columnRef.value?.width ?? width ?? 20);
|
|
52
|
+
const textLength = (0, __powerlines_plugin_alloy_vendor.computed)(() => {
|
|
53
53
|
return (children ? children.toString() : "").length;
|
|
54
54
|
});
|
|
55
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
55
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Prose, { get children() {
|
|
56
56
|
return [
|
|
57
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
57
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
58
58
|
get when() {
|
|
59
59
|
return indexRef.value === 0;
|
|
60
60
|
},
|
|
61
61
|
children: "|"
|
|
62
62
|
}),
|
|
63
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
63
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
64
64
|
get when() {
|
|
65
65
|
return Boolean(children);
|
|
66
66
|
},
|
|
67
67
|
get children() {
|
|
68
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
69
|
-
return
|
|
68
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Prose, { get children() {
|
|
69
|
+
return __powerlines_plugin_alloy_vendor.code`${alignRef.value === "left" ? " ".repeat(widthRef.value - textLength.value - 1) : " "}${children}${alignRef.value === "right" ? " ".repeat(widthRef.value - textLength.value - 1) : " "}`;
|
|
70
70
|
} });
|
|
71
71
|
}
|
|
72
72
|
}),
|
|
@@ -78,11 +78,11 @@ function MarkdownTableColumn(props) {
|
|
|
78
78
|
* Component that provides a context for rendering markdown tables.
|
|
79
79
|
*/
|
|
80
80
|
function MarkdownTableColumnHeader(props) {
|
|
81
|
-
const [{ children, name }, rest] = (0,
|
|
81
|
+
const [{ children, name }, rest] = (0, __powerlines_plugin_alloy_vendor.splitProps)(props, ["children", "name"]);
|
|
82
82
|
return [(0, __alloy_js_core_jsx_runtime.createComponent)(MarkdownTableColumn, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
83
83
|
name,
|
|
84
84
|
get children() {
|
|
85
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
85
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
86
86
|
get fallback() {
|
|
87
87
|
return (0, __stryke_string_format_title_case.titleCase)(name, { useDescriptions: false });
|
|
88
88
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.cjs";
|
|
2
2
|
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
4
4
|
|
|
5
5
|
//#region src/markdown/components/markdown-table.d.ts
|
|
6
6
|
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
@@ -9,18 +9,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
|
|
|
9
9
|
/**
|
|
10
10
|
* Component that provides a context for rendering markdown tables.
|
|
11
11
|
*/
|
|
12
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>):
|
|
12
|
+
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core0.Children;
|
|
13
13
|
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
14
14
|
width?: number;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* Component that provides a context for rendering markdown tables.
|
|
18
18
|
*/
|
|
19
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps):
|
|
19
|
+
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
|
|
20
20
|
/**
|
|
21
21
|
* Component that provides a context for rendering markdown tables.
|
|
22
22
|
*/
|
|
23
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps):
|
|
23
|
+
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
|
|
24
24
|
declare type __ΩMarkdownTableProps = any[];
|
|
25
25
|
declare type __ΩMarkdownTableColumnProps = any[];
|
|
26
26
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
2
|
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alloy_js_core1 from "@alloy-js/core";
|
|
4
4
|
|
|
5
5
|
//#region src/markdown/components/markdown-table.d.ts
|
|
6
6
|
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
@@ -9,18 +9,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
|
|
|
9
9
|
/**
|
|
10
10
|
* Component that provides a context for rendering markdown tables.
|
|
11
11
|
*/
|
|
12
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>):
|
|
12
|
+
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core1.Children;
|
|
13
13
|
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
14
14
|
width?: number;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* Component that provides a context for rendering markdown tables.
|
|
18
18
|
*/
|
|
19
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps):
|
|
19
|
+
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core1.Children;
|
|
20
20
|
/**
|
|
21
21
|
* Component that provides a context for rendering markdown tables.
|
|
22
22
|
*/
|
|
23
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps):
|
|
23
|
+
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core1.Children;
|
|
24
24
|
declare type __ΩMarkdownTableProps = any[];
|
|
25
25
|
declare type __ΩMarkdownTableColumnProps = any[];
|
|
26
26
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarkdownTableContext, useMarkdownTable } from "../contexts/markdown-table.mjs";
|
|
2
2
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { Prose, Show, code, computed, splitProps } from "@alloy
|
|
3
|
+
import { Prose, Show, code, computed, splitProps } from "@powerlines/plugin-alloy/vendor";
|
|
4
4
|
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
5
5
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
6
6
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let
|
|
2
|
+
let __powerlines_plugin_alloy_vendor = require("@powerlines/plugin-alloy/vendor");
|
|
3
3
|
|
|
4
4
|
//#region src/markdown/contexts/markdown-table.ts
|
|
5
5
|
/**
|
|
6
6
|
* The Powerlines context used in template rendering.
|
|
7
7
|
*/
|
|
8
|
-
const MarkdownTableColumnContext = (0,
|
|
8
|
+
const MarkdownTableColumnContext = (0, __powerlines_plugin_alloy_vendor.createNamedContext)("markdown-table-column", {});
|
|
9
9
|
/**
|
|
10
10
|
* Hook to access the Powerlines Context.
|
|
11
11
|
*
|
|
12
12
|
* @returns The Context.
|
|
13
13
|
*/
|
|
14
14
|
function useMarkdownTableColumn() {
|
|
15
|
-
return (0,
|
|
15
|
+
return (0, __powerlines_plugin_alloy_vendor.useContext)(MarkdownTableColumnContext);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The Powerlines context used in template rendering.
|
|
19
19
|
*/
|
|
20
|
-
const MarkdownTableContext = (0,
|
|
20
|
+
const MarkdownTableContext = (0, __powerlines_plugin_alloy_vendor.createContext)({
|
|
21
21
|
columns: [],
|
|
22
22
|
data: []
|
|
23
23
|
});
|
|
@@ -27,7 +27,7 @@ const MarkdownTableContext = (0, __alloy_js_core.createContext)({
|
|
|
27
27
|
* @returns The Context.
|
|
28
28
|
*/
|
|
29
29
|
function useMarkdownTable() {
|
|
30
|
-
return (0,
|
|
30
|
+
return (0, __powerlines_plugin_alloy_vendor.useContext)(MarkdownTableContext);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy
|
|
1
|
+
import { ComponentContext } from "@powerlines/plugin-alloy/vendor";
|
|
2
2
|
|
|
3
3
|
//#region src/markdown/contexts/markdown-table.d.ts
|
|
4
4
|
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy
|
|
1
|
+
import { ComponentContext } from "@powerlines/plugin-alloy/vendor";
|
|
2
2
|
|
|
3
3
|
//#region src/markdown/contexts/markdown-table.d.ts
|
|
4
4
|
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps } from "./components/markdown-file.cjs";
|
|
2
2
|
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.cjs";
|
|
3
3
|
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./components/markdown-table.cjs";
|
|
4
|
+
import "./components/index.cjs";
|
|
5
|
+
import "./contexts/index.cjs";
|
|
4
6
|
export { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableColumnProps, __ΩMarkdownTableContextInterface, __ΩMarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StoragePreset } from "../powerlines/src/types/fs.cjs";
|
|
2
2
|
import { ResolvedEntryTypeDefinition } from "../powerlines/src/types/resolved.cjs";
|
|
3
|
-
import { Context } from "@alloy
|
|
4
|
-
import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
import { Children, Context } from "@powerlines/plugin-alloy/vendor";
|
|
5
4
|
import { SourceFileContext } from "@alloy-js/typescript";
|
|
6
5
|
|
|
7
6
|
//#region src/types/components.d.ts
|
|
@@ -78,7 +77,7 @@ interface RenderContext extends Context {
|
|
|
78
77
|
* A type that represents the props of a component that can have children.
|
|
79
78
|
*/
|
|
80
79
|
interface ComponentProps {
|
|
81
|
-
children?: Children
|
|
80
|
+
children?: Children;
|
|
82
81
|
}
|
|
83
82
|
/**
|
|
84
83
|
* A type that requires the `children` prop in a component.
|
|
@@ -91,8 +90,8 @@ interface BuiltinSourceFileContext extends SourceFileContext {
|
|
|
91
90
|
id: string;
|
|
92
91
|
}
|
|
93
92
|
interface ReflectionOverrideInterface<T> {
|
|
94
|
-
name?: string | Children
|
|
95
|
-
type?: string | Children
|
|
93
|
+
name?: string | Children;
|
|
94
|
+
type?: string | Children;
|
|
96
95
|
extends?: string | false;
|
|
97
96
|
defaultValue?: Partial<T>;
|
|
98
97
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StoragePreset } from "../powerlines/src/types/fs.mjs";
|
|
2
2
|
import { ResolvedEntryTypeDefinition } from "../powerlines/src/types/resolved.mjs";
|
|
3
|
-
import { Children } from "@alloy
|
|
4
|
-
import { Context } from "@alloy-js/core";
|
|
3
|
+
import { Children, Context } from "@powerlines/plugin-alloy/vendor";
|
|
5
4
|
import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
|
|
6
5
|
|
|
7
6
|
//#region src/types/components.d.ts
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
|
|
2
2
|
import { UserConfig } from "../powerlines/src/types/config.cjs";
|
|
3
3
|
import { PluginContext } from "../powerlines/src/types/context.cjs";
|
|
4
|
-
import { PrintTreeOptions } from "@alloy
|
|
5
|
-
import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
|
|
4
|
+
import { Children, PrintTreeOptions } from "@powerlines/plugin-alloy/vendor";
|
|
6
5
|
|
|
7
6
|
//#region src/types/plugin.d.ts
|
|
8
7
|
type AlloyPluginOptions = Partial<PrintTreeOptions> & {
|
|
@@ -32,7 +31,7 @@ type AlloyPluginResolvedConfig = ResolvedConfig & {
|
|
|
32
31
|
alloy: AlloyPluginOptions;
|
|
33
32
|
};
|
|
34
33
|
type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
35
|
-
render: <TContext extends AlloyPluginContext>(this: TContext, children: Children
|
|
34
|
+
render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
|
|
36
35
|
};
|
|
37
36
|
declare type __ΩAlloyPluginOptions = any[];
|
|
38
37
|
declare type __ΩAlloyPluginUserConfig = any[];
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
|
|
2
2
|
import { UserConfig } from "../powerlines/src/types/config.mjs";
|
|
3
3
|
import { PluginContext } from "../powerlines/src/types/context.mjs";
|
|
4
|
-
import { Children } from "@alloy
|
|
5
|
-
import { PrintTreeOptions } from "@alloy-js/core";
|
|
4
|
+
import { Children, PrintTreeOptions } from "@powerlines/plugin-alloy/vendor";
|
|
6
5
|
|
|
7
6
|
//#region src/types/plugin.d.ts
|
|
8
7
|
type AlloyPluginOptions = Partial<PrintTreeOptions> & {
|
|
@@ -2,7 +2,7 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
3
3
|
const require_typescript_components_typescript_file = require('./typescript-file.cjs');
|
|
4
4
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
-
let
|
|
5
|
+
let __powerlines_plugin_alloy_vendor = require("@powerlines/plugin-alloy/vendor");
|
|
6
6
|
|
|
7
7
|
//#region src/typescript/components/builtin-file.tsx
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ let __alloy_js_core = require("@alloy-js/core");
|
|
|
12
12
|
* @returns The rendered source file component.
|
|
13
13
|
*/
|
|
14
14
|
function BuiltinFile(props) {
|
|
15
|
-
const [{ children, imports, id, description, tsx }, rest] = (0,
|
|
15
|
+
const [{ children, imports, id, description, tsx }, rest] = (0, __powerlines_plugin_alloy_vendor.splitProps)(props, [
|
|
16
16
|
"children",
|
|
17
17
|
"imports",
|
|
18
18
|
"id",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TSDocModuleProps } from "./tsdoc.cjs";
|
|
2
2
|
import { TypescriptFileProps } from "./typescript-file.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alloy_js_core11 from "@alloy-js/core";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/builtin-file.d.ts
|
|
6
6
|
type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
|
|
@@ -28,7 +28,7 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
|
|
|
28
28
|
* @param props - The properties for the source file.
|
|
29
29
|
* @returns The rendered source file component.
|
|
30
30
|
*/
|
|
31
|
-
declare function BuiltinFile(props: BuiltinFileProps):
|
|
31
|
+
declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core11.Children;
|
|
32
32
|
declare type __ΩBuiltinFileProps = any[];
|
|
33
33
|
//#endregion
|
|
34
34
|
export { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TSDocModule } from "./tsdoc.mjs";
|
|
2
2
|
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./typescript-file.mjs";
|
|
3
3
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
|
-
import { splitProps } from "@alloy
|
|
4
|
+
import { splitProps } from "@powerlines/plugin-alloy/vendor";
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/builtin-file.tsx
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
-
let
|
|
3
|
+
let __powerlines_plugin_alloy_vendor = require("@powerlines/plugin-alloy/vendor");
|
|
4
4
|
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/dynamic-import-statement.tsx
|
|
@@ -18,7 +18,7 @@ let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
|
18
18
|
*/
|
|
19
19
|
function DynamicImportStatement(props) {
|
|
20
20
|
const { importPath, exportName = "default", const: isConst = true, ...rest } = props;
|
|
21
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, (0, __alloy_js_core_jsx_runtime.mergeProps)({ "const": isConst }, rest, { initializer:
|
|
21
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, (0, __alloy_js_core_jsx_runtime.mergeProps)({ "const": isConst }, rest, { initializer: __powerlines_plugin_alloy_vendor.code`await import("${importPath}").then(m => m.${exportName});` }));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alloy_js_core10 from "@alloy-js/core";
|
|
2
2
|
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
3
3
|
|
|
4
4
|
//#region src/typescript/components/dynamic-import-statement.d.ts
|
|
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
|
|
|
26
26
|
* @param props - The properties for the dynamic import statement.
|
|
27
27
|
* @returns A `VarDeclaration` component representing the dynamic import statement.
|
|
28
28
|
*/
|
|
29
|
-
declare function DynamicImportStatement(props: DynamicImportStatementProps):
|
|
29
|
+
declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core10.Children;
|
|
30
30
|
declare type __ΩDynamicImportStatementProps = any[];
|
|
31
31
|
//#endregion
|
|
32
32
|
export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alloy_js_core15 from "@alloy-js/core";
|
|
2
2
|
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
3
3
|
|
|
4
4
|
//#region src/typescript/components/dynamic-import-statement.d.ts
|
|
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
|
|
|
26
26
|
* @param props - The properties for the dynamic import statement.
|
|
27
27
|
* @returns A `VarDeclaration` component representing the dynamic import statement.
|
|
28
28
|
*/
|
|
29
|
-
declare function DynamicImportStatement(props: DynamicImportStatementProps):
|
|
29
|
+
declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core15.Children;
|
|
30
30
|
declare type __ΩDynamicImportStatementProps = any[];
|
|
31
31
|
//#endregion
|
|
32
32
|
export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { code } from "@alloy
|
|
2
|
+
import { code } from "@powerlines/plugin-alloy/vendor";
|
|
3
3
|
import { VarDeclaration } from "@alloy-js/typescript";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/dynamic-import-statement.tsx
|
|
@@ -2,7 +2,7 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
3
3
|
const require_typescript_components_typescript_file = require('./typescript-file.cjs');
|
|
4
4
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
-
let
|
|
5
|
+
let __powerlines_plugin_alloy_vendor = require("@powerlines/plugin-alloy/vendor");
|
|
6
6
|
let defu = require("defu");
|
|
7
7
|
defu = require_rolldown_runtime.__toESM(defu);
|
|
8
8
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
@@ -15,7 +15,7 @@ let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
|
15
15
|
* @returns The rendered source file component.
|
|
16
16
|
*/
|
|
17
17
|
function EntryFile(props) {
|
|
18
|
-
const [{ children, meta, tsx, path, typeDefinition }, rest] = (0,
|
|
18
|
+
const [{ children, meta, tsx, path, typeDefinition }, rest] = (0, __powerlines_plugin_alloy_vendor.splitProps)(props, [
|
|
19
19
|
"children",
|
|
20
20
|
"meta",
|
|
21
21
|
"tsx",
|
|
@@ -23,7 +23,7 @@ function EntryFile(props) {
|
|
|
23
23
|
"typeDefinition"
|
|
24
24
|
]);
|
|
25
25
|
const context = require_core_contexts_context.usePowerlines();
|
|
26
|
-
const fullPath = (0,
|
|
26
|
+
const fullPath = (0, __powerlines_plugin_alloy_vendor.computed)(() => (0, __stryke_path_join_paths.joinPaths)(context?.entryPath || "./", `${path}${tsx ? ".tsx" : ".ts"}`));
|
|
27
27
|
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_typescript_file.TypescriptFile, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
28
28
|
get path() {
|
|
29
29
|
return fullPath.value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResolvedEntryTypeDefinition } from "../../powerlines/src/types/resolved.cjs";
|
|
2
2
|
import { TypescriptFileProps } from "./typescript-file.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alloy_js_core9 from "@alloy-js/core";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/entry-file.d.ts
|
|
6
6
|
type EntryFileProps = TypescriptFileProps & {
|
|
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
|
|
|
21
21
|
* @param props - The properties for the source file.
|
|
22
22
|
* @returns The rendered source file component.
|
|
23
23
|
*/
|
|
24
|
-
declare function EntryFile(props: EntryFileProps):
|
|
24
|
+
declare function EntryFile(props: EntryFileProps): _alloy_js_core9.Children;
|
|
25
25
|
declare type __ΩEntryFileProps = any[];
|
|
26
26
|
//#endregion
|
|
27
27
|
export { EntryFile, EntryFileProps, __ΩEntryFileProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResolvedEntryTypeDefinition } from "../../powerlines/src/types/resolved.mjs";
|
|
2
2
|
import { TypescriptFileProps } from "./typescript-file.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alloy_js_core11 from "@alloy-js/core";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/entry-file.d.ts
|
|
6
6
|
type EntryFileProps = TypescriptFileProps & {
|
|
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
|
|
|
21
21
|
* @param props - The properties for the source file.
|
|
22
22
|
* @returns The rendered source file component.
|
|
23
23
|
*/
|
|
24
|
-
declare function EntryFile(props: EntryFileProps):
|
|
24
|
+
declare function EntryFile(props: EntryFileProps): _alloy_js_core11.Children;
|
|
25
25
|
declare type __ΩEntryFileProps = any[];
|
|
26
26
|
//#endregion
|
|
27
27
|
export { EntryFile, EntryFileProps, __ΩEntryFileProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePowerlines } from "../../core/contexts/context.mjs";
|
|
2
2
|
import { TypescriptFile } from "./typescript-file.mjs";
|
|
3
3
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
|
-
import { computed, splitProps } from "@alloy
|
|
4
|
+
import { computed, splitProps } from "@powerlines/plugin-alloy/vendor";
|
|
5
5
|
import defu from "defu";
|
|
6
6
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let
|
|
2
|
+
let __powerlines_plugin_alloy_vendor = require("@powerlines/plugin-alloy/vendor");
|
|
3
3
|
|
|
4
4
|
//#region src/typescript/components/record-expression.tsx
|
|
5
5
|
function RecordExpression({ elementType }) {
|
|
6
|
-
return
|
|
6
|
+
return __powerlines_plugin_alloy_vendor.code`
|
|
7
7
|
Record<string, ${elementType}>
|
|
8
8
|
`;
|
|
9
9
|
}
|