@powerlines/plugin-alloy 0.26.226 → 0.26.228
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/core/components/infrastructure-file.cjs +1 -1
- package/dist/core/components/source-file.cjs +1 -1
- package/dist/helpers/capnp.cjs +141 -87
- package/dist/helpers/capnp.d.cts +20 -15
- package/dist/helpers/capnp.d.cts.map +1 -1
- package/dist/helpers/capnp.d.mts +20 -15
- package/dist/helpers/capnp.mjs +142 -87
- package/dist/helpers/index.cjs +0 -3
- package/dist/helpers/index.d.cts +2 -3
- package/dist/helpers/index.d.mts +2 -3
- package/dist/helpers/index.mjs +2 -3
- package/dist/index.cjs +1 -1
- package/dist/markdown/components/alert.cjs +74 -0
- package/dist/markdown/components/alert.d.cts +53 -0
- package/dist/markdown/components/alert.d.cts.map +1 -0
- package/dist/markdown/components/alert.d.mts +53 -0
- package/dist/markdown/components/alert.d.mts.map +1 -0
- package/dist/markdown/components/alert.mjs +69 -0
- package/dist/markdown/components/alert.mjs.map +1 -0
- package/dist/markdown/components/index.cjs +8 -1
- package/dist/markdown/components/index.d.cts +2 -1
- package/dist/markdown/components/index.d.mts +2 -1
- package/dist/markdown/components/index.mjs +2 -1
- package/dist/markdown/index.cjs +7 -0
- package/dist/markdown/index.d.cts +2 -1
- package/dist/markdown/index.d.mts +2 -1
- package/dist/markdown/index.mjs +2 -1
- package/dist/typescript/components/builtin-file.cjs +5 -3
- package/dist/typescript/components/builtin-file.d.cts +6 -0
- package/dist/typescript/components/builtin-file.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +6 -0
- package/dist/typescript/components/builtin-file.mjs +5 -3
- package/dist/typescript/components/entry-file.cjs +1 -1
- package/dist/typescript/components/interface-declaration.cjs +1 -1
- package/dist/typescript/components/interface-declaration.d.mts +1 -1
- package/dist/typescript/components/interface-declaration.mjs +1 -1
- package/dist/typescript/components/object-declaration.cjs +2 -2
- package/dist/typescript/components/object-declaration.d.mts +1 -1
- package/dist/typescript/components/object-declaration.mjs +2 -2
- package/dist/typescript/components/tsdoc-schema.cjs +2 -2
- package/dist/typescript/components/tsdoc-schema.mjs +2 -2
- package/dist/typescript/components/tsdoc.cjs +1 -1
- package/dist/typescript/components/tsdoc.d.mts +1 -1
- package/dist/typescript/components/tsdoc.mjs +1 -1
- package/package.json +23 -22
- package/dist/helpers/typescript.cjs +0 -47
- package/dist/helpers/typescript.d.cts +0 -24
- package/dist/helpers/typescript.d.cts.map +0 -1
- package/dist/helpers/typescript.d.mts +0 -24
- package/dist/helpers/typescript.d.mts.map +0 -1
- package/dist/helpers/typescript.mjs +0 -47
- package/dist/helpers/typescript.mjs.map +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Spacing } from "../../core/components/spacing.mjs";
|
|
2
|
+
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
import { code } from "@alloy-js/core";
|
|
4
|
+
|
|
5
|
+
//#region src/markdown/components/alert.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Renders an alert component for a markdown file.
|
|
8
|
+
*
|
|
9
|
+
* @see https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/
|
|
10
|
+
* @see https://github.com/KeJunMao/vscode-markdown-alert
|
|
11
|
+
*/
|
|
12
|
+
function Alert(props) {
|
|
13
|
+
return [
|
|
14
|
+
memo(() => code`> [!${props.variant.toUpperCase()}]`),
|
|
15
|
+
createIntrinsic("hbr", {}),
|
|
16
|
+
code`> `,
|
|
17
|
+
memo(() => props.children),
|
|
18
|
+
createComponent(Spacing, {})
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Renders a Note alert component for a markdown file.
|
|
23
|
+
*
|
|
24
|
+
* @see https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/
|
|
25
|
+
* @see https://github.com/KeJunMao/vscode-markdown-alert
|
|
26
|
+
*/
|
|
27
|
+
function NoteAlert(props) {
|
|
28
|
+
return createComponent(Alert, mergeProps({ variant: "note" }, props));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Renders a Tip alert component for a markdown file.
|
|
32
|
+
*
|
|
33
|
+
* @see https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/
|
|
34
|
+
* @see https://github.com/KeJunMao/vscode-markdown-alert
|
|
35
|
+
*/
|
|
36
|
+
function TipAlert(props) {
|
|
37
|
+
return createComponent(Alert, mergeProps({ variant: "tip" }, props));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Renders an Important alert component for a markdown file.
|
|
41
|
+
*
|
|
42
|
+
* @see https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/
|
|
43
|
+
* @see https://github.com/KeJunMao/vscode-markdown-alert
|
|
44
|
+
*/
|
|
45
|
+
function ImportantAlert(props) {
|
|
46
|
+
return createComponent(Alert, mergeProps({ variant: "important" }, props));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Renders a Warning alert component for a markdown file.
|
|
50
|
+
*
|
|
51
|
+
* @see https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/
|
|
52
|
+
* @see https://github.com/KeJunMao/vscode-markdown-alert
|
|
53
|
+
*/
|
|
54
|
+
function WarningAlert(props) {
|
|
55
|
+
return createComponent(Alert, mergeProps({ variant: "warning" }, props));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Renders a Caution alert component for a markdown file.
|
|
59
|
+
*
|
|
60
|
+
* @see https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/
|
|
61
|
+
* @see https://github.com/KeJunMao/vscode-markdown-alert
|
|
62
|
+
*/
|
|
63
|
+
function CautionAlert(props) {
|
|
64
|
+
return createComponent(Alert, mergeProps({ variant: "caution" }, props));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { Alert, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert };
|
|
69
|
+
//# sourceMappingURL=alert.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_markdown_components_alert = require('./alert.cjs');
|
|
2
3
|
const require_markdown_components_front_matter = require('./front-matter.cjs');
|
|
3
4
|
const require_markdown_components_heading = require('./heading.cjs');
|
|
4
5
|
const require_markdown_components_markdown_file = require('./markdown-file.cjs');
|
|
5
6
|
const require_markdown_components_markdown_table = require('./markdown-table.cjs');
|
|
6
7
|
|
|
8
|
+
exports.Alert = require_markdown_components_alert.Alert;
|
|
9
|
+
exports.CautionAlert = require_markdown_components_alert.CautionAlert;
|
|
7
10
|
exports.FrontMatter = require_markdown_components_front_matter.FrontMatter;
|
|
8
11
|
exports.Heading = require_markdown_components_heading.Heading;
|
|
12
|
+
exports.ImportantAlert = require_markdown_components_alert.ImportantAlert;
|
|
9
13
|
exports.MarkdownFile = require_markdown_components_markdown_file.MarkdownFile;
|
|
10
14
|
exports.MarkdownFileHeader = require_markdown_components_markdown_file.MarkdownFileHeader;
|
|
11
15
|
exports.MarkdownTable = require_markdown_components_markdown_table.MarkdownTable;
|
|
12
16
|
exports.MarkdownTableColumn = require_markdown_components_markdown_table.MarkdownTableColumn;
|
|
13
|
-
exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
|
|
17
|
+
exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
|
|
18
|
+
exports.NoteAlert = require_markdown_components_alert.NoteAlert;
|
|
19
|
+
exports.TipAlert = require_markdown_components_alert.TipAlert;
|
|
20
|
+
exports.WarningAlert = require_markdown_components_alert.WarningAlert;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Alert, AlertProps, AlertVariantProps, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./alert.cjs";
|
|
1
2
|
import { FrontMatter, FrontMatterProps } from "./front-matter.cjs";
|
|
2
3
|
import { Heading, HeadingProps } from "./heading.cjs";
|
|
3
4
|
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./markdown-file.cjs";
|
|
4
5
|
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./markdown-table.cjs";
|
|
5
|
-
export { FrontMatter, FrontMatterProps, Heading, HeadingProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps };
|
|
6
|
+
export { Alert, AlertProps, AlertVariantProps, CautionAlert, FrontMatter, FrontMatterProps, Heading, HeadingProps, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, NoteAlert, TipAlert, WarningAlert };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Alert, AlertProps, AlertVariantProps, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./alert.mjs";
|
|
1
2
|
import { FrontMatter, FrontMatterProps } from "./front-matter.mjs";
|
|
2
3
|
import { Heading, HeadingProps } from "./heading.mjs";
|
|
3
4
|
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./markdown-file.mjs";
|
|
4
5
|
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./markdown-table.mjs";
|
|
5
|
-
export { FrontMatter, FrontMatterProps, Heading, HeadingProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps };
|
|
6
|
+
export { Alert, AlertProps, AlertVariantProps, CautionAlert, FrontMatter, FrontMatterProps, Heading, HeadingProps, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, NoteAlert, TipAlert, WarningAlert };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Alert, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./alert.mjs";
|
|
1
2
|
import { FrontMatter } from "./front-matter.mjs";
|
|
2
3
|
import { Heading } from "./heading.mjs";
|
|
3
4
|
import { MarkdownFile, MarkdownFileHeader } from "./markdown-file.mjs";
|
|
4
5
|
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader } from "./markdown-table.mjs";
|
|
5
6
|
|
|
6
|
-
export { FrontMatter, Heading, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader };
|
|
7
|
+
export { Alert, CautionAlert, FrontMatter, Heading, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, NoteAlert, TipAlert, WarningAlert };
|
package/dist/markdown/index.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_markdown_components_alert = require('./components/alert.cjs');
|
|
2
3
|
const require_markdown_components_front_matter = require('./components/front-matter.cjs');
|
|
3
4
|
const require_markdown_components_heading = require('./components/heading.cjs');
|
|
4
5
|
const require_markdown_components_markdown_file = require('./components/markdown-file.cjs');
|
|
@@ -7,8 +8,11 @@ const require_markdown_components_markdown_table = require('./components/markdow
|
|
|
7
8
|
require('./components/index.cjs');
|
|
8
9
|
require('./contexts/index.cjs');
|
|
9
10
|
|
|
11
|
+
exports.Alert = require_markdown_components_alert.Alert;
|
|
12
|
+
exports.CautionAlert = require_markdown_components_alert.CautionAlert;
|
|
10
13
|
exports.FrontMatter = require_markdown_components_front_matter.FrontMatter;
|
|
11
14
|
exports.Heading = require_markdown_components_heading.Heading;
|
|
15
|
+
exports.ImportantAlert = require_markdown_components_alert.ImportantAlert;
|
|
12
16
|
exports.MarkdownFile = require_markdown_components_markdown_file.MarkdownFile;
|
|
13
17
|
exports.MarkdownFileHeader = require_markdown_components_markdown_file.MarkdownFileHeader;
|
|
14
18
|
exports.MarkdownTable = require_markdown_components_markdown_table.MarkdownTable;
|
|
@@ -16,5 +20,8 @@ exports.MarkdownTableColumn = require_markdown_components_markdown_table.Markdow
|
|
|
16
20
|
exports.MarkdownTableColumnContext = require_markdown_contexts_markdown_table.MarkdownTableColumnContext;
|
|
17
21
|
exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
|
|
18
22
|
exports.MarkdownTableContext = require_markdown_contexts_markdown_table.MarkdownTableContext;
|
|
23
|
+
exports.NoteAlert = require_markdown_components_alert.NoteAlert;
|
|
24
|
+
exports.TipAlert = require_markdown_components_alert.TipAlert;
|
|
25
|
+
exports.WarningAlert = require_markdown_components_alert.WarningAlert;
|
|
19
26
|
exports.useMarkdownTable = require_markdown_contexts_markdown_table.useMarkdownTable;
|
|
20
27
|
exports.useMarkdownTableColumn = require_markdown_contexts_markdown_table.useMarkdownTableColumn;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Alert, AlertProps, AlertVariantProps, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./components/alert.cjs";
|
|
1
2
|
import { FrontMatter, FrontMatterProps } from "./components/front-matter.cjs";
|
|
2
3
|
import { Heading, HeadingProps } from "./components/heading.cjs";
|
|
3
4
|
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./components/markdown-file.cjs";
|
|
4
5
|
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.cjs";
|
|
5
6
|
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./components/markdown-table.cjs";
|
|
6
|
-
export { FrontMatter, FrontMatterProps, Heading, HeadingProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
|
|
7
|
+
export { Alert, AlertProps, AlertVariantProps, CautionAlert, FrontMatter, FrontMatterProps, Heading, HeadingProps, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, NoteAlert, TipAlert, WarningAlert, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Alert, AlertProps, AlertVariantProps, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./components/alert.mjs";
|
|
1
2
|
import { FrontMatter, FrontMatterProps } from "./components/front-matter.mjs";
|
|
2
3
|
import { Heading, HeadingProps } from "./components/heading.mjs";
|
|
3
4
|
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./components/markdown-file.mjs";
|
|
4
5
|
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
|
|
5
6
|
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./components/markdown-table.mjs";
|
|
6
|
-
export { FrontMatter, FrontMatterProps, Heading, HeadingProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
|
|
7
|
+
export { Alert, AlertProps, AlertVariantProps, CautionAlert, FrontMatter, FrontMatterProps, Heading, HeadingProps, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, NoteAlert, TipAlert, WarningAlert, useMarkdownTable, useMarkdownTableColumn };
|
package/dist/markdown/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Alert, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./components/alert.mjs";
|
|
1
2
|
import { FrontMatter } from "./components/front-matter.mjs";
|
|
2
3
|
import { Heading } from "./components/heading.mjs";
|
|
3
4
|
import { MarkdownFile, MarkdownFileHeader } from "./components/markdown-file.mjs";
|
|
@@ -6,4 +7,4 @@ import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader } from ".
|
|
|
6
7
|
import "./components/index.mjs";
|
|
7
8
|
import "./contexts/index.mjs";
|
|
8
9
|
|
|
9
|
-
export { FrontMatter, Heading, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnHeader, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn };
|
|
10
|
+
export { Alert, CautionAlert, FrontMatter, Heading, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnHeader, MarkdownTableContext, NoteAlert, TipAlert, WarningAlert, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -16,13 +16,14 @@ let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
|
16
16
|
* @returns The rendered source file component.
|
|
17
17
|
*/
|
|
18
18
|
function BuiltinFile(props) {
|
|
19
|
-
const [{ children, imports, builtinImports, id, description, tsx }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
19
|
+
const [{ children, imports, builtinImports, id, description, tsx, internal }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
20
20
|
"children",
|
|
21
21
|
"imports",
|
|
22
22
|
"builtinImports",
|
|
23
23
|
"id",
|
|
24
24
|
"description",
|
|
25
|
-
"tsx"
|
|
25
|
+
"tsx",
|
|
26
|
+
"internal"
|
|
26
27
|
]);
|
|
27
28
|
const context = require_core_contexts_context.usePowerlinesSafe();
|
|
28
29
|
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));
|
|
@@ -47,7 +48,8 @@ function BuiltinFile(props) {
|
|
|
47
48
|
return {
|
|
48
49
|
kind: "builtin",
|
|
49
50
|
extension: tsx ? "tsx" : "ts",
|
|
50
|
-
id: (0, _stryke_path_replace.replaceExtension)(id)
|
|
51
|
+
id: (0, _stryke_path_replace.replaceExtension)(id),
|
|
52
|
+
internal
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
55
|
}, rest, {
|
|
@@ -20,6 +20,12 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
|
|
|
20
20
|
* @defaultValue false
|
|
21
21
|
*/
|
|
22
22
|
tsx?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the file is internal and should not be included in the public API documentation.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue false
|
|
27
|
+
*/
|
|
28
|
+
internal?: boolean;
|
|
23
29
|
};
|
|
24
30
|
/**
|
|
25
31
|
* A base component representing a Powerlines generated Typescript source file.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-file.d.cts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":";;;;KAgCY,gBAAA,GAAmB,IAAA,CAAK,mBAAA,YAClC,IAAA,CAAK,gBAAA;;AADP;;;;;EAQI,EAAA;EAPF;;;EAYE,WAAA;EAbgC;;;;;EAoBhC,GAAA;
|
|
1
|
+
{"version":3,"file":"builtin-file.d.cts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":";;;;KAgCY,gBAAA,GAAmB,IAAA,CAAK,mBAAA,YAClC,IAAA,CAAK,gBAAA;;AADP;;;;;EAQI,EAAA;EAPF;;;EAYE,WAAA;EAbgC;;;;;EAoBhC,GAAA;EAOA;;AAAQ;AASZ;;EATI,QAAA;AAAA;;;;;AAS+C;;iBAAnC,WAAA,CAAY,KAAA,EAAO,gBAAgB,4BAAA,QAAA"}
|
|
@@ -20,6 +20,12 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
|
|
|
20
20
|
* @defaultValue false
|
|
21
21
|
*/
|
|
22
22
|
tsx?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the file is internal and should not be included in the public API documentation.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue false
|
|
27
|
+
*/
|
|
28
|
+
internal?: boolean;
|
|
23
29
|
};
|
|
24
30
|
/**
|
|
25
31
|
* A base component representing a Powerlines generated Typescript source file.
|
|
@@ -15,13 +15,14 @@ import { isSet } from "@stryke/type-checks/is-set";
|
|
|
15
15
|
* @returns The rendered source file component.
|
|
16
16
|
*/
|
|
17
17
|
function BuiltinFile(props) {
|
|
18
|
-
const [{ children, imports, builtinImports, id, description, tsx }, rest] = splitProps(props, [
|
|
18
|
+
const [{ children, imports, builtinImports, id, description, tsx, internal }, rest] = splitProps(props, [
|
|
19
19
|
"children",
|
|
20
20
|
"imports",
|
|
21
21
|
"builtinImports",
|
|
22
22
|
"id",
|
|
23
23
|
"description",
|
|
24
|
-
"tsx"
|
|
24
|
+
"tsx",
|
|
25
|
+
"internal"
|
|
25
26
|
]);
|
|
26
27
|
const context = usePowerlinesSafe();
|
|
27
28
|
const path = computed(() => replacePath(`${!isSet(tsx) ? id : replaceExtension(id)}${hasFileExtension(id) && !isSet(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context?.builtinsPath));
|
|
@@ -46,7 +47,8 @@ function BuiltinFile(props) {
|
|
|
46
47
|
return {
|
|
47
48
|
kind: "builtin",
|
|
48
49
|
extension: tsx ? "tsx" : "ts",
|
|
49
|
-
id: replaceExtension(id)
|
|
50
|
+
id: replaceExtension(id),
|
|
51
|
+
internal
|
|
50
52
|
};
|
|
51
53
|
}
|
|
52
54
|
}, rest, {
|
|
@@ -8,7 +8,7 @@ let _alloy_js_core = require("@alloy-js/core");
|
|
|
8
8
|
let _stryke_path_replace = require("@stryke/path/replace");
|
|
9
9
|
let _stryke_path_append = require("@stryke/path/append");
|
|
10
10
|
let defu = require("defu");
|
|
11
|
-
defu = require_runtime.__toESM(defu);
|
|
11
|
+
defu = require_runtime.__toESM(defu, 1);
|
|
12
12
|
let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
13
13
|
|
|
14
14
|
//#region src/typescript/components/entry-file.tsx
|
|
@@ -7,9 +7,9 @@ const require_typescript_components_type_parameters = require('./type-parameters
|
|
|
7
7
|
const require_typescript_components_tsdoc_schema = require('./tsdoc-schema.cjs');
|
|
8
8
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
9
9
|
let _alloy_js_core = require("@alloy-js/core");
|
|
10
|
+
let _powerlines_schema = require("@powerlines/schema");
|
|
10
11
|
let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
|
|
11
12
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
12
|
-
let _powerlines_schema = require("@powerlines/schema");
|
|
13
13
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
14
14
|
let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
|
|
15
15
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
2
|
import { Children, Namekey, Refkey } from "@alloy-js/core";
|
|
3
|
-
import { CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
|
|
4
3
|
import { JsonSchema, JsonSchemaPrimitiveType } from "@powerlines/schema";
|
|
4
|
+
import { CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
|
|
5
5
|
import { PartialKeys } from "@stryke/types/base";
|
|
6
6
|
|
|
7
7
|
//#region src/typescript/components/interface-declaration.d.ts
|
|
@@ -6,9 +6,9 @@ import { TypeParameters } from "./type-parameters.mjs";
|
|
|
6
6
|
import { TSDocObjectSchema, TSDocSchemaProperty } from "./tsdoc-schema.mjs";
|
|
7
7
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
8
8
|
import { Block, For, MemberDeclaration, Name, Show, childrenArray, computed, createSymbol, createSymbolSlot, effect, emitSymbol, findUnkeyedChildren, splitProps, takeSymbols } from "@alloy-js/core";
|
|
9
|
+
import { getPrimarySchemaType, getPropertiesList, isSchemaNullable, stringifyType } from "@powerlines/schema";
|
|
9
10
|
import { pascalCase } from "@stryke/string-format/pascal-case";
|
|
10
11
|
import { Declaration as Declaration$1, TSOutputSymbol, TSSymbolFlags, ensureTypeRefContext, useTSLexicalScope, useTSMemberScope, useTSNamePolicy } from "@alloy-js/typescript";
|
|
11
|
-
import { getPrimarySchemaType, getPropertiesList, isSchemaNullable, stringifyType } from "@powerlines/schema";
|
|
12
12
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
13
13
|
import { uuid } from "@stryke/unique-id/uuid";
|
|
14
14
|
|
|
@@ -3,10 +3,10 @@ const require_core_contexts_schema = require('../../core/contexts/schema.cjs');
|
|
|
3
3
|
const require_typescript_components_tsdoc_schema = require('./tsdoc-schema.cjs');
|
|
4
4
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
5
|
let _alloy_js_core = require("@alloy-js/core");
|
|
6
|
+
let _powerlines_schema = require("@powerlines/schema");
|
|
6
7
|
let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
7
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
8
8
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
9
|
-
let
|
|
9
|
+
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
10
10
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
11
11
|
|
|
12
12
|
//#region src/typescript/components/object-declaration.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
|
-
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
3
2
|
import { JsonSchema, JsonSchemaObject } from "@powerlines/schema";
|
|
3
|
+
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/object-declaration.d.ts
|
|
6
6
|
interface ObjectDeclarationProps extends VarDeclarationProps {
|
|
@@ -2,10 +2,10 @@ import { SchemaContext, SchemaPropertyContext } from "../../core/contexts/schema
|
|
|
2
2
|
import { TSDocObjectSchema, TSDocSchemaProperty } from "./tsdoc-schema.mjs";
|
|
3
3
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
4
|
import { Declaration, For, Name, Show, computed, createSymbolSlot, splitProps } from "@alloy-js/core";
|
|
5
|
+
import { getPropertiesList, stringifyValue } from "@powerlines/schema";
|
|
5
6
|
import { camelCase } from "@stryke/string-format/camel-case";
|
|
6
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
7
7
|
import { ObjectExpression, ObjectProperty, TSSymbolFlags, TypeRefContext, createValueSymbol, useTSNamePolicy } from "@alloy-js/typescript";
|
|
8
|
-
import {
|
|
8
|
+
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
9
9
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
10
10
|
|
|
11
11
|
//#region src/typescript/components/object-declaration.tsx
|
|
@@ -4,9 +4,9 @@ const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
|
4
4
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
5
|
let _alloy_js_core = require("@alloy-js/core");
|
|
6
6
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
7
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
8
|
-
let _stryke_type_checks = require("@stryke/type-checks");
|
|
9
7
|
let _powerlines_schema = require("@powerlines/schema");
|
|
8
|
+
let _stryke_type_checks = require("@stryke/type-checks");
|
|
9
|
+
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
10
10
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
11
11
|
|
|
12
12
|
//#region src/typescript/components/tsdoc-schema.tsx
|
|
@@ -3,9 +3,9 @@ import { TSDoc, TSDocAttributesTags } from "./tsdoc.mjs";
|
|
|
3
3
|
import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
4
|
import { List, Show, childrenArray, computed, splitProps } from "@alloy-js/core";
|
|
5
5
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
6
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
7
|
-
import { isSetObject } from "@stryke/type-checks";
|
|
8
6
|
import { getPrimarySchemaType } from "@powerlines/schema";
|
|
7
|
+
import { isSetObject } from "@stryke/type-checks";
|
|
8
|
+
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
9
9
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
10
10
|
|
|
11
11
|
//#region src/typescript/components/tsdoc-schema.tsx
|
|
@@ -3,8 +3,8 @@ const require_core_contexts_context = require('../../core/contexts/context.cjs')
|
|
|
3
3
|
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
4
4
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
5
|
let _alloy_js_core = require("@alloy-js/core");
|
|
6
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
7
6
|
let _powerlines_schema = require("@powerlines/schema");
|
|
7
|
+
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
8
8
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
9
9
|
|
|
10
10
|
//#region src/typescript/components/tsdoc.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
2
|
import { Children } from "@alloy-js/core";
|
|
3
|
-
import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
|
|
4
3
|
import { JsonSchemaPrimitiveType } from "@powerlines/schema";
|
|
4
|
+
import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/tsdoc.d.ts
|
|
7
7
|
interface TSDocProps extends ComponentProps {
|
|
@@ -2,8 +2,8 @@ import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
|
|
|
2
2
|
import { Spacing } from "../../core/components/spacing.mjs";
|
|
3
3
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
4
|
import { For, List, Prose, Show, childrenArray, computed, splitProps } from "@alloy-js/core";
|
|
5
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
6
5
|
import { stringifyValue } from "@powerlines/schema";
|
|
6
|
+
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
7
7
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
8
8
|
|
|
9
9
|
//#region src/typescript/components/tsdoc.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-alloy",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.228",
|
|
4
4
|
"description": "A package containing various Alloy framework components and helper utilities.",
|
|
5
5
|
"keywords": ["alloy-js", "powerlines", "powerlines-plugin"],
|
|
6
6
|
"homepage": "https://stormsoftware.com",
|
|
@@ -375,20 +375,6 @@
|
|
|
375
375
|
"default": "./dist/helpers/refkey.mjs"
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
|
-
"./helpers/typescript": {
|
|
379
|
-
"require": {
|
|
380
|
-
"types": "./dist/helpers/typescript.d.cts",
|
|
381
|
-
"default": "./dist/helpers/typescript.cjs"
|
|
382
|
-
},
|
|
383
|
-
"import": {
|
|
384
|
-
"types": "./dist/helpers/typescript.d.mts",
|
|
385
|
-
"default": "./dist/helpers/typescript.mjs"
|
|
386
|
-
},
|
|
387
|
-
"default": {
|
|
388
|
-
"types": "./dist/helpers/typescript.d.mts",
|
|
389
|
-
"default": "./dist/helpers/typescript.mjs"
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
378
|
"./markdown": {
|
|
393
379
|
"require": {
|
|
394
380
|
"types": "./dist/markdown/index.d.cts",
|
|
@@ -417,6 +403,20 @@
|
|
|
417
403
|
"default": "./dist/markdown/components/index.mjs"
|
|
418
404
|
}
|
|
419
405
|
},
|
|
406
|
+
"./markdown/components/alert": {
|
|
407
|
+
"require": {
|
|
408
|
+
"types": "./dist/markdown/components/alert.d.cts",
|
|
409
|
+
"default": "./dist/markdown/components/alert.cjs"
|
|
410
|
+
},
|
|
411
|
+
"import": {
|
|
412
|
+
"types": "./dist/markdown/components/alert.d.mts",
|
|
413
|
+
"default": "./dist/markdown/components/alert.mjs"
|
|
414
|
+
},
|
|
415
|
+
"default": {
|
|
416
|
+
"types": "./dist/markdown/components/alert.d.mts",
|
|
417
|
+
"default": "./dist/markdown/components/alert.mjs"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
420
|
"./markdown/components/front-matter": {
|
|
421
421
|
"require": {
|
|
422
422
|
"types": "./dist/markdown/components/front-matter.d.cts",
|
|
@@ -906,9 +906,10 @@
|
|
|
906
906
|
"@alloy-js/json": "^0.23.0",
|
|
907
907
|
"@alloy-js/markdown": "^0.23.0",
|
|
908
908
|
"@alloy-js/typescript": "^0.23.0",
|
|
909
|
-
"@powerlines/deepkit": "0.9.
|
|
910
|
-
"@powerlines/
|
|
911
|
-
"@
|
|
909
|
+
"@powerlines/deepkit": "^0.9.89",
|
|
910
|
+
"@powerlines/schema": "^0.11.117",
|
|
911
|
+
"@powerlines/plugin-babel": "^0.13.131",
|
|
912
|
+
"@storm-software/config-tools": "^1.190.54",
|
|
912
913
|
"@stryke/capnp": "^0.12.111",
|
|
913
914
|
"@stryke/convert": "^0.7.15",
|
|
914
915
|
"@stryke/fs": "^0.33.85",
|
|
@@ -920,16 +921,16 @@
|
|
|
920
921
|
"@stryke/types": "^0.12.12",
|
|
921
922
|
"@stryke/unique-id": "^0.3.96",
|
|
922
923
|
"defu": "^6.1.7",
|
|
923
|
-
"powerlines": "0.47.
|
|
924
|
+
"powerlines": "^0.47.135",
|
|
924
925
|
"prettier": "^3.8.4",
|
|
925
926
|
"unctx": "^2.5.0"
|
|
926
927
|
},
|
|
927
928
|
"devDependencies": {
|
|
928
|
-
"@powerlines/plugin-plugin": "0.12.
|
|
929
|
-
"@types/node": "^25.9.
|
|
929
|
+
"@powerlines/plugin-plugin": "^0.12.547",
|
|
930
|
+
"@types/node": "^25.9.3"
|
|
930
931
|
},
|
|
931
932
|
"peerDependencies": { "@alloy-js/babel-preset": ">=0.3.0" },
|
|
932
933
|
"peerDependenciesMeta": { "@alloy-js/babel-preset": { "optional": false } },
|
|
933
934
|
"publishConfig": { "access": "public" },
|
|
934
|
-
"gitHead": "
|
|
935
|
+
"gitHead": "8952d4334a9c907f2d492ae9419ad0bbf50b0533"
|
|
935
936
|
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
3
|
-
let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
4
|
-
let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
5
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
6
|
-
|
|
7
|
-
//#region src/helpers/typescript.ts
|
|
8
|
-
/**
|
|
9
|
-
* Generates a TypeScript object for the given reflection class.
|
|
10
|
-
*
|
|
11
|
-
* @param reflection - The reflection class to generate the object for.
|
|
12
|
-
* @param options - Options for generating the object.
|
|
13
|
-
* @returns A string containing the TypeScript object definition.
|
|
14
|
-
*/
|
|
15
|
-
function generateObjectDeclaration(reflection, options = {}) {
|
|
16
|
-
if (!reflection) return "";
|
|
17
|
-
return `
|
|
18
|
-
/**
|
|
19
|
-
* ${reflection.getDescription() || `${(0, _stryke_string_format_title_case.titleCase)(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
|
|
20
|
-
*/
|
|
21
|
-
export const ${(0, _stryke_string_format_camel_case.camelCase)(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
|
|
22
|
-
${reflection.getProperties().filter((item) => !item.isIgnored() && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
23
|
-
if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
24
|
-
return ret;
|
|
25
|
-
}, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
|
|
26
|
-
* ${item.getDescription() || item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}
|
|
27
|
-
*
|
|
28
|
-
* @title ${item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}${item.getAlias().length ? `
|
|
29
|
-
${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
|
|
30
|
-
* @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
|
|
31
|
-
${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
|
|
32
|
-
* @internal` : ""}${item.isRuntime() ? `
|
|
33
|
-
* @runtime` : ""}${item.isReadonly() ? `
|
|
34
|
-
* @readonly` : ""}${item.isIgnored() ? `
|
|
35
|
-
* @ignored` : ""}${item.isHidden() ? `
|
|
36
|
-
* @hidden` : ""}
|
|
37
|
-
*/
|
|
38
|
-
${item.getNameAsString()}: ${(0, _powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
39
|
-
if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
40
|
-
return ret;
|
|
41
|
-
}, void 0) ?? item.getDefaultValue())}`).join(", \n")}
|
|
42
|
-
};
|
|
43
|
-
`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
//#endregion
|
|
47
|
-
exports.generateObjectDeclaration = generateObjectDeclaration;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/typescript.d.ts
|
|
4
|
-
interface GenerateInterfaceDeclarationOptions<T> {
|
|
5
|
-
overrideName?: string;
|
|
6
|
-
overrideExtends?: string | false;
|
|
7
|
-
defaultValues?: Partial<T>;
|
|
8
|
-
}
|
|
9
|
-
interface GenerateObjectDeclarationOptions<T> {
|
|
10
|
-
overrideName?: string;
|
|
11
|
-
overrideExtends?: string | false;
|
|
12
|
-
defaultValues?: Partial<T>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generates a TypeScript object for the given reflection class.
|
|
16
|
-
*
|
|
17
|
-
* @param reflection - The reflection class to generate the object for.
|
|
18
|
-
* @param options - Options for generating the object.
|
|
19
|
-
* @returns A string containing the TypeScript object definition.
|
|
20
|
-
*/
|
|
21
|
-
declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, generateObjectDeclaration };
|
|
24
|
-
//# sourceMappingURL=typescript.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.cts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAO,CAAC,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAO,CAAC,CAAA;AAAA;;;;AAxJC;AAqJ3B;;;iBAagB,yBAAA,WAAoC,MAAA,eAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/typescript.d.ts
|
|
4
|
-
interface GenerateInterfaceDeclarationOptions<T> {
|
|
5
|
-
overrideName?: string;
|
|
6
|
-
overrideExtends?: string | false;
|
|
7
|
-
defaultValues?: Partial<T>;
|
|
8
|
-
}
|
|
9
|
-
interface GenerateObjectDeclarationOptions<T> {
|
|
10
|
-
overrideName?: string;
|
|
11
|
-
overrideExtends?: string | false;
|
|
12
|
-
defaultValues?: Partial<T>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generates a TypeScript object for the given reflection class.
|
|
16
|
-
*
|
|
17
|
-
* @param reflection - The reflection class to generate the object for.
|
|
18
|
-
* @param options - Options for generating the object.
|
|
19
|
-
* @returns A string containing the TypeScript object definition.
|
|
20
|
-
*/
|
|
21
|
-
declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, generateObjectDeclaration };
|
|
24
|
-
//# sourceMappingURL=typescript.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.mts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":""}
|