@powerlines/plugin-alloy 0.14.0
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/LICENSE +201 -0
- package/README.md +304 -0
- package/dist/builtin-file-BU93ve2k.d.cts +34 -0
- package/dist/builtin-file-CG53y-09.d.mts +34 -0
- package/dist/builtin-file-CkwxD4el.mjs +37 -0
- package/dist/builtin-file-DLVCgiye.cjs +43 -0
- package/dist/capnp-8yVLwAox.cjs +364 -0
- package/dist/capnp-CKLYTfgy.d.mts +87 -0
- package/dist/capnp-CNythuSw.mjs +267 -0
- package/dist/capnp-wJ2_HpAN.d.cts +87 -0
- package/dist/chunk-CbDLau6x.cjs +34 -0
- package/dist/components-B0A7LpQD.d.cts +142 -0
- package/dist/components-B2kXCrty.d.mts +142 -0
- package/dist/components-BOkkDhM9.cjs +0 -0
- package/dist/components-BXrpeD8J.cjs +0 -0
- package/dist/components-C3qpgLKV.mjs +1 -0
- package/dist/components-CBtEhH9k.mjs +1 -0
- package/dist/components-Cj5gaIV0.cjs +0 -0
- package/dist/components-HMVhsFQl.mjs +1 -0
- package/dist/components-I0ydtjfW.cjs +0 -0
- package/dist/components-ajocJcib.mjs +1 -0
- package/dist/context-BIduC1bB.cjs +44 -0
- package/dist/context-BO25KgR_.d.cts +1668 -0
- package/dist/context-CBG6Pv09.d.cts +26 -0
- package/dist/context-Cx38_mgI.mjs +26 -0
- package/dist/context-DzaJOnXh.d.mts +26 -0
- package/dist/context-GtZoIVx8.d.mts +1670 -0
- package/dist/contexts-BSRk0whx.cjs +0 -0
- package/dist/contexts-X44bRyOp.mjs +1 -0
- package/dist/contexts-XuEdvZdE.mjs +1 -0
- package/dist/contexts-uXFW3CIa.cjs +0 -0
- package/dist/core/components/index.cjs +9 -0
- package/dist/core/components/index.d.cts +7 -0
- package/dist/core/components/index.d.mts +7 -0
- package/dist/core/components/index.mjs +7 -0
- package/dist/core/components/output.cjs +4 -0
- package/dist/core/components/output.d.cts +3 -0
- package/dist/core/components/output.d.mts +3 -0
- package/dist/core/components/output.mjs +4 -0
- package/dist/core/components/single-line-comment.cjs +3 -0
- package/dist/core/components/single-line-comment.d.cts +4 -0
- package/dist/core/components/single-line-comment.d.mts +4 -0
- package/dist/core/components/single-line-comment.mjs +3 -0
- package/dist/core/components/source-file.cjs +3 -0
- package/dist/core/components/source-file.d.cts +4 -0
- package/dist/core/components/source-file.d.mts +4 -0
- package/dist/core/components/source-file.mjs +3 -0
- package/dist/core/contexts/context.cjs +5 -0
- package/dist/core/contexts/context.d.cts +3 -0
- package/dist/core/contexts/context.d.mts +3 -0
- package/dist/core/contexts/context.mjs +3 -0
- package/dist/core/contexts/index.cjs +15 -0
- package/dist/core/contexts/index.d.cts +6 -0
- package/dist/core/contexts/index.d.mts +6 -0
- package/dist/core/contexts/index.mjs +5 -0
- package/dist/core/contexts/reflection.cjs +10 -0
- package/dist/core/contexts/reflection.d.cts +4 -0
- package/dist/core/contexts/reflection.d.mts +4 -0
- package/dist/core/contexts/reflection.mjs +3 -0
- package/dist/core/index.cjs +23 -0
- package/dist/core/index.d.cts +11 -0
- package/dist/core/index.d.mts +11 -0
- package/dist/core/index.mjs +10 -0
- package/dist/core-B57eQAue.mjs +1 -0
- package/dist/core-DzEmU6tL.cjs +0 -0
- package/dist/create-builtin-Bpswa0ZT.d.cts +15 -0
- package/dist/create-builtin-CP9mN5P-.mjs +18 -0
- package/dist/create-builtin-_3GNADDt.cjs +24 -0
- package/dist/create-builtin-wEbNOWNw.d.mts +15 -0
- package/dist/dynamic-import-statement-BhY2a13r.d.cts +32 -0
- package/dist/dynamic-import-statement-DoTHSt57.mjs +28 -0
- package/dist/dynamic-import-statement-DyVWBclX.d.mts +32 -0
- package/dist/dynamic-import-statement-JVLyMPXr.cjs +34 -0
- package/dist/entry-file-B159R5XY.d.cts +27 -0
- package/dist/entry-file-BA75rAwb.cjs +41 -0
- package/dist/entry-file-Bw1mgMP3.mjs +34 -0
- package/dist/entry-file-DfFhEkLi.d.mts +27 -0
- package/dist/helpers/capnp.cjs +19 -0
- package/dist/helpers/capnp.d.cts +3 -0
- package/dist/helpers/capnp.d.mts +3 -0
- package/dist/helpers/capnp.mjs +4 -0
- package/dist/helpers/create-builtin.cjs +3 -0
- package/dist/helpers/create-builtin.d.cts +2 -0
- package/dist/helpers/create-builtin.d.mts +2 -0
- package/dist/helpers/create-builtin.mjs +3 -0
- package/dist/helpers/index.cjs +26 -0
- package/dist/helpers/index.d.cts +7 -0
- package/dist/helpers/index.d.mts +7 -0
- package/dist/helpers/index.mjs +8 -0
- package/dist/helpers/refkey.cjs +3 -0
- package/dist/helpers/refkey.d.cts +2 -0
- package/dist/helpers/refkey.d.mts +2 -0
- package/dist/helpers/refkey.mjs +3 -0
- package/dist/helpers/typescript.cjs +4 -0
- package/dist/helpers/typescript.d.cts +2 -0
- package/dist/helpers/typescript.d.mts +2 -0
- package/dist/helpers/typescript.mjs +4 -0
- package/dist/helpers-BrA1Dy07.mjs +1 -0
- package/dist/helpers-Cten3PJk.cjs +0 -0
- package/dist/index-BINnViIh.d.mts +1 -0
- package/dist/index-BJ8-FA6N.d.cts +1 -0
- package/dist/index-BRJ_6A42.d.mts +1 -0
- package/dist/index-BXpMZvwA.d.cts +1 -0
- package/dist/index-Bi0Yc4v2.d.cts +1 -0
- package/dist/index-BrGZHEgX.d.mts +1 -0
- package/dist/index-BwFl_eS0.d.mts +1 -0
- package/dist/index-C1ihAKnV.d.cts +1 -0
- package/dist/index-CLTQPxoD.d.mts +1 -0
- package/dist/index-CoUVmp_Q.d.mts +1 -0
- package/dist/index-D1aKd2tO.d.cts +1 -0
- package/dist/index-D4d_pZLu.d.cts +1 -0
- package/dist/index-DBGd4WeR.d.mts +1 -0
- package/dist/index-DdxxIAKU.d.cts +1 -0
- package/dist/index-Deol7ZWO.d.mts +1 -0
- package/dist/index-DpEKQcoR.d.cts +1 -0
- package/dist/index-DrZ2Dh-H.d.cts +1 -0
- package/dist/index-MEuojd-r.d.cts +1 -0
- package/dist/index-bHnO4ZKt.d.mts +1 -0
- package/dist/index-lIMqGGJz.d.mts +1 -0
- package/dist/index.cjs +446 -0
- package/dist/index.d.cts +45 -0
- package/dist/index.d.mts +45 -0
- package/dist/index.mjs +361 -0
- package/dist/markdown/components/index.cjs +13 -0
- package/dist/markdown/components/index.d.cts +8 -0
- package/dist/markdown/components/index.d.mts +8 -0
- package/dist/markdown/components/index.mjs +9 -0
- package/dist/markdown/components/markdown-file.cjs +7 -0
- package/dist/markdown/components/markdown-file.d.cts +5 -0
- package/dist/markdown/components/markdown-file.d.mts +5 -0
- package/dist/markdown/components/markdown-file.mjs +6 -0
- package/dist/markdown/components/markdown-table.cjs +6 -0
- package/dist/markdown/components/markdown-table.d.cts +5 -0
- package/dist/markdown/components/markdown-table.d.mts +5 -0
- package/dist/markdown/components/markdown-table.mjs +4 -0
- package/dist/markdown/contexts/index.cjs +7 -0
- package/dist/markdown/contexts/index.d.cts +3 -0
- package/dist/markdown/contexts/index.d.mts +3 -0
- package/dist/markdown/contexts/index.mjs +4 -0
- package/dist/markdown/contexts/markdown-table.cjs +6 -0
- package/dist/markdown/contexts/markdown-table.d.cts +2 -0
- package/dist/markdown/contexts/markdown-table.d.mts +2 -0
- package/dist/markdown/contexts/markdown-table.mjs +3 -0
- package/dist/markdown/index.cjs +19 -0
- package/dist/markdown/index.d.cts +10 -0
- package/dist/markdown/index.d.mts +10 -0
- package/dist/markdown/index.mjs +11 -0
- package/dist/markdown-BTQE0AI9.cjs +0 -0
- package/dist/markdown-DMddlO1y.mjs +1 -0
- package/dist/markdown-file-BFbbzD59.mjs +90 -0
- package/dist/markdown-file-Bsuu9aIk.d.cts +23 -0
- package/dist/markdown-file-CB6u4Cp1.d.mts +23 -0
- package/dist/markdown-file-CzGNj_Ex.cjs +102 -0
- package/dist/markdown-table-2qP_4eLk.mjs +33 -0
- package/dist/markdown-table-BOWM26Kb.cjs +57 -0
- package/dist/markdown-table-BUxH6aRh.mjs +77 -0
- package/dist/markdown-table-CMaQVkwJ.d.mts +27 -0
- package/dist/markdown-table-CZMEY6IR.d.cts +37 -0
- package/dist/markdown-table-DFaNSBRn.cjs +95 -0
- package/dist/markdown-table-SvbpUdq-.d.cts +27 -0
- package/dist/markdown-table-kFQoqKQt.d.mts +37 -0
- package/dist/output-ChpN7bQM.d.cts +18 -0
- package/dist/output-CnofBsl0.cjs +38 -0
- package/dist/output-D9RlZeCO.d.mts +18 -0
- package/dist/output-DEdXZ94G.mjs +32 -0
- package/dist/plugin-C0DspKAF.d.mts +34 -0
- package/dist/plugin-DU0K2-Om.mjs +1 -0
- package/dist/plugin-DYBdUgTF.d.cts +34 -0
- package/dist/plugin-Fx-uJ4It.cjs +0 -0
- package/dist/record-expression-BOCZ9iqR.d.mts +12 -0
- package/dist/record-expression-DM_zSqE_.d.cts +12 -0
- package/dist/record-expression-DNVzCKgo.cjs +17 -0
- package/dist/record-expression-DxS_DiPc.mjs +11 -0
- package/dist/refkey-B0XSqdGY.d.mts +13 -0
- package/dist/refkey-B6A9kh_u.cjs +21 -0
- package/dist/refkey-CP7MJMac.d.cts +13 -0
- package/dist/refkey-CV0mIj0Y.mjs +15 -0
- package/dist/reflection-BSbFFYZO.cjs +108 -0
- package/dist/reflection-Bka9prwJ.d.mts +52 -0
- package/dist/reflection-CBMQ1FQo.mjs +60 -0
- package/dist/reflection-CkVyW69y.d.cts +52 -0
- package/dist/single-line-comment-BMPq6OR0.cjs +25 -0
- package/dist/single-line-comment-BjL_Z4Qn.d.cts +22 -0
- package/dist/single-line-comment-C5CtHQhi.mjs +19 -0
- package/dist/single-line-comment-DZAmp_BZ.d.mts +22 -0
- package/dist/source-file-4J1OvLed.d.cts +31 -0
- package/dist/source-file-BBbuhOKz.d.mts +31 -0
- package/dist/source-file-CCYwl5pI.mjs +52 -0
- package/dist/source-file-DTd1KgD5.cjs +59 -0
- package/dist/tsdoc-BFPYF-Fh.cjs +487 -0
- package/dist/tsdoc-BmyOQBxT.mjs +367 -0
- package/dist/tsdoc-C39LB5Mn.d.cts +152 -0
- package/dist/tsdoc-OE37Ht2l.d.mts +152 -0
- package/dist/tsdoc-reflection-3ZoV_Mjz.d.cts +18 -0
- package/dist/tsdoc-reflection-3hSdGY1e.mjs +97 -0
- package/dist/tsdoc-reflection-BQN8iUG1.cjs +115 -0
- package/dist/tsdoc-reflection-BtEk3cDW.d.mts +18 -0
- package/dist/types/components.cjs +1 -0
- package/dist/types/components.d.cts +3 -0
- package/dist/types/components.d.mts +3 -0
- package/dist/types/components.mjs +3 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +5 -0
- package/dist/types/index.d.mts +5 -0
- package/dist/types/index.mjs +5 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +3 -0
- package/dist/types/plugin.d.mts +3 -0
- package/dist/types/plugin.mjs +3 -0
- package/dist/types-BBEDEYnP.cjs +0 -0
- package/dist/types-BWlfXHs2.mjs +1 -0
- package/dist/typescript/components/builtin-file.cjs +9 -0
- package/dist/typescript/components/builtin-file.d.cts +7 -0
- package/dist/typescript/components/builtin-file.d.mts +7 -0
- package/dist/typescript/components/builtin-file.mjs +9 -0
- package/dist/typescript/components/dynamic-import-statement.cjs +3 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts +2 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts +2 -0
- package/dist/typescript/components/dynamic-import-statement.mjs +3 -0
- package/dist/typescript/components/entry-file.cjs +7 -0
- package/dist/typescript/components/entry-file.d.cts +6 -0
- package/dist/typescript/components/entry-file.d.mts +6 -0
- package/dist/typescript/components/entry-file.mjs +7 -0
- package/dist/typescript/components/index.cjs +50 -0
- package/dist/typescript/components/index.d.cts +14 -0
- package/dist/typescript/components/index.d.mts +14 -0
- package/dist/typescript/components/index.mjs +17 -0
- package/dist/typescript/components/record-expression.cjs +3 -0
- package/dist/typescript/components/record-expression.d.cts +2 -0
- package/dist/typescript/components/record-expression.d.mts +2 -0
- package/dist/typescript/components/record-expression.mjs +3 -0
- package/dist/typescript/components/tsdoc-reflection.cjs +9 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts +5 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts +5 -0
- package/dist/typescript/components/tsdoc-reflection.mjs +7 -0
- package/dist/typescript/components/tsdoc.cjs +24 -0
- package/dist/typescript/components/tsdoc.d.cts +4 -0
- package/dist/typescript/components/tsdoc.d.mts +4 -0
- package/dist/typescript/components/tsdoc.mjs +5 -0
- package/dist/typescript/components/typescript-file.cjs +8 -0
- package/dist/typescript/components/typescript-file.d.cts +5 -0
- package/dist/typescript/components/typescript-file.d.mts +5 -0
- package/dist/typescript/components/typescript-file.mjs +6 -0
- package/dist/typescript/components/typescript-interface.cjs +9 -0
- package/dist/typescript/components/typescript-interface.d.cts +4 -0
- package/dist/typescript/components/typescript-interface.d.mts +4 -0
- package/dist/typescript/components/typescript-interface.mjs +8 -0
- package/dist/typescript/components/typescript-object.cjs +9 -0
- package/dist/typescript/components/typescript-object.d.cts +4 -0
- package/dist/typescript/components/typescript-object.d.mts +4 -0
- package/dist/typescript/components/typescript-object.mjs +8 -0
- package/dist/typescript/index.cjs +51 -0
- package/dist/typescript/index.d.cts +15 -0
- package/dist/typescript/index.d.mts +15 -0
- package/dist/typescript/index.mjs +18 -0
- package/dist/typescript-45caIUPa.mjs +1 -0
- package/dist/typescript-BrZsJqvc.mjs +45 -0
- package/dist/typescript-CXP7Oa6_.d.cts +25 -0
- package/dist/typescript-DG1-qdBQ.d.mts +25 -0
- package/dist/typescript-DV5akLQO.cjs +0 -0
- package/dist/typescript-DcqKlMoH.cjs +51 -0
- package/dist/typescript-file-6Y81yLyB.cjs +157 -0
- package/dist/typescript-file-BR9I7R1v.d.cts +47 -0
- package/dist/typescript-file-BWq9GIUt.d.mts +47 -0
- package/dist/typescript-file-y6oF016h.mjs +139 -0
- package/dist/typescript-interface-AydoCmGY.mjs +52 -0
- package/dist/typescript-interface-CKjljRFu.d.mts +25 -0
- package/dist/typescript-interface-Codd49Sl.cjs +64 -0
- package/dist/typescript-interface-fGS4VBnW.d.cts +25 -0
- package/dist/typescript-object-C-BmpHfk.mjs +93 -0
- package/dist/typescript-object-CxC5Qo5P.d.cts +26 -0
- package/dist/typescript-object-DOrJkpcM.cjs +105 -0
- package/dist/typescript-object-I6Huh12F.d.mts +26 -0
- package/dist/utilities-CnaPrauh.mjs +109 -0
- package/dist/utilities-llRqOC4l.cjs +133 -0
- package/package.json +411 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { r as stringifyDefaultValue } from "./utilities-CnaPrauh.mjs";
|
|
2
|
+
import { n as usePowerlines } from "./context-Cx38_mgI.mjs";
|
|
3
|
+
import { For, List, Prose, Show, childrenArray, splitProps } from "@alloy-js/core";
|
|
4
|
+
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
5
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/typescript/components/tsdoc.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Generates a TypeScript interface for the given reflection class.
|
|
11
|
+
*/
|
|
12
|
+
function TSDoc(props) {
|
|
13
|
+
const [{ children, heading }] = splitProps(props, ["children", "heading"]);
|
|
14
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15
|
+
"/**",
|
|
16
|
+
/* @__PURE__ */ jsxs("align", {
|
|
17
|
+
string: " * ",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
20
|
+
/* @__PURE__ */ jsxs(Show, {
|
|
21
|
+
when: !isUndefined(heading),
|
|
22
|
+
children: [
|
|
23
|
+
heading,
|
|
24
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
25
|
+
/* @__PURE__ */ jsx(Show, {
|
|
26
|
+
when: !isUndefined(children) && childrenArray(() => children).length > 0,
|
|
27
|
+
children: /* @__PURE__ */ jsx("hbr", {})
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ jsx(Show, {
|
|
32
|
+
when: !isUndefined(children) && childrenArray(() => children).length > 0,
|
|
33
|
+
children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
38
|
+
` */`,
|
|
39
|
+
/* @__PURE__ */ jsx("hbr", {})
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create a TSDoc `@<props.tag>` tag.
|
|
44
|
+
*/
|
|
45
|
+
function TSDocTag(props) {
|
|
46
|
+
const [{ children, tag }] = splitProps(props, ["children", "tag"]);
|
|
47
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48
|
+
`@${tag} `,
|
|
49
|
+
/* @__PURE__ */ jsx(Show, {
|
|
50
|
+
when: Boolean(children),
|
|
51
|
+
children: /* @__PURE__ */ jsx("align", {
|
|
52
|
+
width: 2,
|
|
53
|
+
children: /* @__PURE__ */ jsx(Prose, { children })
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsx("hbr", {})
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A component that creates a TSDoc block with `@param` tags for each parameter.
|
|
61
|
+
*/
|
|
62
|
+
function TSDocParams(props) {
|
|
63
|
+
return /* @__PURE__ */ jsx(For, {
|
|
64
|
+
each: normalizeParametersForDoc(props.parameters),
|
|
65
|
+
children: (param) => /* @__PURE__ */ jsx(TSDocParam, {
|
|
66
|
+
name: param.name,
|
|
67
|
+
optional: param.optional,
|
|
68
|
+
children: param.doc
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function normalizeParametersForDoc(parameters) {
|
|
73
|
+
if (parameters.some((p) => typeof p === "string")) return [];
|
|
74
|
+
return parameters;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Create a TSDoc `@title` tag.
|
|
78
|
+
*/
|
|
79
|
+
function TSDocTitle(props) {
|
|
80
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
81
|
+
return /* @__PURE__ */ jsx(TSDocTag, {
|
|
82
|
+
...rest,
|
|
83
|
+
tag: "title",
|
|
84
|
+
children
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Create a TSDoc `@domain` tag.
|
|
89
|
+
*/
|
|
90
|
+
function TSDocDomain(props) {
|
|
91
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
92
|
+
return /* @__PURE__ */ jsx(TSDocTag, {
|
|
93
|
+
...rest,
|
|
94
|
+
tag: "domain",
|
|
95
|
+
children
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Create a TSDoc `@alias` tag.
|
|
100
|
+
*/
|
|
101
|
+
function TSDocAlias(props) {
|
|
102
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
103
|
+
return /* @__PURE__ */ jsx(TSDocTag, {
|
|
104
|
+
...rest,
|
|
105
|
+
tag: "alias",
|
|
106
|
+
children
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Create a TSDoc `@permission` tag.
|
|
111
|
+
*/
|
|
112
|
+
function TSDocPermission(props) {
|
|
113
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
114
|
+
return /* @__PURE__ */ jsx(TSDocTag, {
|
|
115
|
+
...rest,
|
|
116
|
+
tag: "permission",
|
|
117
|
+
children
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Create a TSDoc `@defaultValue` tag.
|
|
122
|
+
*/
|
|
123
|
+
function TSDocDefaultValue(props) {
|
|
124
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
125
|
+
"@defaultValue ",
|
|
126
|
+
/* @__PURE__ */ jsx(Show, {
|
|
127
|
+
when: !isUndefined(props.value),
|
|
128
|
+
children: /* @__PURE__ */ jsx("align", {
|
|
129
|
+
width: 2,
|
|
130
|
+
children: /* @__PURE__ */ jsx(Prose, { children: stringifyDefaultValue(props.value) })
|
|
131
|
+
})
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ jsx("hbr", {})
|
|
134
|
+
] });
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Create a TSDoc `@remarks` tag.
|
|
138
|
+
*/
|
|
139
|
+
function TSDocRemarks(props) {
|
|
140
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
141
|
+
"@remarks ",
|
|
142
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
143
|
+
/* @__PURE__ */ jsx(List, {
|
|
144
|
+
hardline: true,
|
|
145
|
+
children: childrenArray(() => props.children)
|
|
146
|
+
})
|
|
147
|
+
] });
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Create a TSDoc `@see` tag.
|
|
151
|
+
*/
|
|
152
|
+
function TSDocLink(props) {
|
|
153
|
+
return /* @__PURE__ */ jsx(TSDocTag, {
|
|
154
|
+
...props,
|
|
155
|
+
tag: "see"
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Create a TSDoc `@example` tag.
|
|
160
|
+
*/
|
|
161
|
+
function TSDocExample(props) {
|
|
162
|
+
const [{ tsx, fenced = true, language, children }] = splitProps(props, [
|
|
163
|
+
"tsx",
|
|
164
|
+
"fenced",
|
|
165
|
+
"language",
|
|
166
|
+
"children"
|
|
167
|
+
]);
|
|
168
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
169
|
+
"@example ",
|
|
170
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
171
|
+
/* @__PURE__ */ jsxs(Show, {
|
|
172
|
+
when: fenced,
|
|
173
|
+
children: [
|
|
174
|
+
"```",
|
|
175
|
+
language || (tsx ? "tsx" : "ts"),
|
|
176
|
+
/* @__PURE__ */ jsx("hbr", {})
|
|
177
|
+
]
|
|
178
|
+
}),
|
|
179
|
+
children,
|
|
180
|
+
/* @__PURE__ */ jsxs(Show, {
|
|
181
|
+
when: fenced,
|
|
182
|
+
children: [/* @__PURE__ */ jsx("hbr", {}), "```"]
|
|
183
|
+
})
|
|
184
|
+
] });
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Create a TSDoc `@readonly` tag.
|
|
188
|
+
*/
|
|
189
|
+
function TSDocReadonly() {
|
|
190
|
+
return /* @__PURE__ */ jsx(TSDocTag, { tag: "readonly" });
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Create a TSDoc `@internal` tag.
|
|
194
|
+
*/
|
|
195
|
+
function TSDocInternal() {
|
|
196
|
+
return /* @__PURE__ */ jsx(TSDocTag, { tag: "internal" });
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Create a TSDoc `@ignore` tag.
|
|
200
|
+
*/
|
|
201
|
+
function TSDocIgnore() {
|
|
202
|
+
return /* @__PURE__ */ jsx(TSDocTag, { tag: "ignore" });
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Create a TSDoc `@hidden` tag.
|
|
206
|
+
*/
|
|
207
|
+
function TSDocHidden() {
|
|
208
|
+
return /* @__PURE__ */ jsx(TSDocTag, { tag: "hidden" });
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
212
|
+
*/
|
|
213
|
+
function TSDocAttributesTags(props) {
|
|
214
|
+
const [{ title, alias, permission, domain, readonly, internal, ignore, hidden, defaultValue }] = splitProps(props, [
|
|
215
|
+
"title",
|
|
216
|
+
"alias",
|
|
217
|
+
"permission",
|
|
218
|
+
"domain",
|
|
219
|
+
"readonly",
|
|
220
|
+
"internal",
|
|
221
|
+
"ignore",
|
|
222
|
+
"hidden",
|
|
223
|
+
"defaultValue"
|
|
224
|
+
]);
|
|
225
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ jsx(Show, {
|
|
227
|
+
when: isSetString(title),
|
|
228
|
+
children: /* @__PURE__ */ jsx(TSDocTitle, { children: title })
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ jsx(Show, {
|
|
231
|
+
when: !isUndefined(alias) && alias.length > 0,
|
|
232
|
+
children: /* @__PURE__ */ jsx(For, {
|
|
233
|
+
each: alias ?? [],
|
|
234
|
+
children: (alias$1) => /* @__PURE__ */ jsx(TSDocAlias, { children: alias$1 })
|
|
235
|
+
})
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ jsx(Show, {
|
|
238
|
+
when: isSetString(domain),
|
|
239
|
+
children: /* @__PURE__ */ jsx(TSDocDomain, { children: domain })
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ jsx(Show, {
|
|
242
|
+
when: !isUndefined(permission) && permission.length > 0,
|
|
243
|
+
children: /* @__PURE__ */ jsx(For, {
|
|
244
|
+
each: permission ?? [],
|
|
245
|
+
children: (permission$1) => /* @__PURE__ */ jsx(TSDocPermission, { children: permission$1 })
|
|
246
|
+
})
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ jsx(Show, {
|
|
249
|
+
when: readonly === true,
|
|
250
|
+
children: /* @__PURE__ */ jsx(TSDocReadonly, {})
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ jsx(Show, {
|
|
253
|
+
when: internal === true,
|
|
254
|
+
children: /* @__PURE__ */ jsx(TSDocInternal, {})
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ jsx(Show, {
|
|
257
|
+
when: ignore === true,
|
|
258
|
+
children: /* @__PURE__ */ jsx(TSDocIgnore, {})
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ jsx(Show, {
|
|
261
|
+
when: hidden === true,
|
|
262
|
+
children: /* @__PURE__ */ jsx(TSDocHidden, {})
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ jsx(Show, {
|
|
265
|
+
when: !isUndefined(defaultValue),
|
|
266
|
+
children: /* @__PURE__ */ jsx(TSDocDefaultValue, { value: defaultValue })
|
|
267
|
+
})
|
|
268
|
+
] });
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Create a TSDoc parameter set off with `@param`.
|
|
272
|
+
*/
|
|
273
|
+
function TSDocParam(props) {
|
|
274
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
275
|
+
"@param ",
|
|
276
|
+
/* @__PURE__ */ jsx(TSDocParamName, {
|
|
277
|
+
name: props.name,
|
|
278
|
+
optional: props.optional,
|
|
279
|
+
defaultValue: props.defaultValue
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ jsx(TSDocParamDescription, { children: props.children })
|
|
282
|
+
] });
|
|
283
|
+
}
|
|
284
|
+
function TSDocParamName(props) {
|
|
285
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
286
|
+
/* @__PURE__ */ jsx(Show, {
|
|
287
|
+
when: props.optional,
|
|
288
|
+
children: "["
|
|
289
|
+
}),
|
|
290
|
+
props.name,
|
|
291
|
+
/* @__PURE__ */ jsxs(Show, {
|
|
292
|
+
when: Boolean(props.defaultValue),
|
|
293
|
+
children: ["=", props.defaultValue]
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ jsx(Show, {
|
|
296
|
+
when: props.optional,
|
|
297
|
+
children: "]"
|
|
298
|
+
})
|
|
299
|
+
] });
|
|
300
|
+
}
|
|
301
|
+
function TSDocParamDescription(props) {
|
|
302
|
+
return /* @__PURE__ */ jsxs(Show, {
|
|
303
|
+
when: Boolean(props.children),
|
|
304
|
+
children: [" - ", /* @__PURE__ */ jsx("align", {
|
|
305
|
+
width: 2,
|
|
306
|
+
children: /* @__PURE__ */ jsx(Prose, { children: props.children })
|
|
307
|
+
})]
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Create a TSDoc `@returns` tag.
|
|
312
|
+
*/
|
|
313
|
+
function TSDocReturns(props) {
|
|
314
|
+
return /* @__PURE__ */ jsx(TSDocTag, {
|
|
315
|
+
...props,
|
|
316
|
+
tag: "returns"
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Create a TSDoc `@throws` tag.
|
|
321
|
+
*/
|
|
322
|
+
function TSDocThrows(props) {
|
|
323
|
+
return /* @__PURE__ */ jsx(TSDocTag, {
|
|
324
|
+
...props,
|
|
325
|
+
tag: "throws"
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Generates a TSDoc `@module` tag for the given module name.
|
|
330
|
+
*/
|
|
331
|
+
function TSDocModule(props) {
|
|
332
|
+
const [{ children, name, prefix }] = splitProps(props, [
|
|
333
|
+
"children",
|
|
334
|
+
"name",
|
|
335
|
+
"prefix"
|
|
336
|
+
]);
|
|
337
|
+
const context = usePowerlines();
|
|
338
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
339
|
+
"/**",
|
|
340
|
+
/* @__PURE__ */ jsxs("align", {
|
|
341
|
+
string: " * ",
|
|
342
|
+
children: [
|
|
343
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
344
|
+
/* @__PURE__ */ jsxs(Show, {
|
|
345
|
+
when: Boolean(children),
|
|
346
|
+
children: [
|
|
347
|
+
/* @__PURE__ */ jsx(List, {
|
|
348
|
+
hardline: true,
|
|
349
|
+
children: childrenArray(() => children)
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
352
|
+
/* @__PURE__ */ jsx("hbr", {})
|
|
353
|
+
]
|
|
354
|
+
}),
|
|
355
|
+
"@module ",
|
|
356
|
+
prefix || context?.config.output.builtinPrefix,
|
|
357
|
+
":",
|
|
358
|
+
name
|
|
359
|
+
]
|
|
360
|
+
}),
|
|
361
|
+
/* @__PURE__ */ jsx("hbr", {}),
|
|
362
|
+
` */`
|
|
363
|
+
] });
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
//#endregion
|
|
367
|
+
export { TSDocReturns as _, TSDocDomain as a, TSDocTitle as b, TSDocIgnore as c, TSDocModule as d, TSDocParam as f, TSDocRemarks as g, TSDocReadonly as h, TSDocDefaultValue as i, TSDocInternal as l, TSDocPermission as m, TSDocAlias as n, TSDocExample as o, TSDocParams as p, TSDocAttributesTags as r, TSDocHidden as s, TSDoc as t, TSDocLink as u, TSDocTag as v, TSDocThrows as y };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { n as ComponentProps } from "./components-B0A7LpQD.cjs";
|
|
2
|
+
import { Children } from "@alloy-js/core";
|
|
3
|
+
import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc.d.ts
|
|
6
|
+
interface TSDocProps extends ComponentProps {
|
|
7
|
+
heading?: Children;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Generates a TypeScript interface for the given reflection class.
|
|
11
|
+
*/
|
|
12
|
+
declare function TSDoc(props: TSDocProps): Children;
|
|
13
|
+
interface TSDocTagProps extends ComponentProps {
|
|
14
|
+
tag: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a TSDoc `@<props.tag>` tag.
|
|
18
|
+
*/
|
|
19
|
+
declare function TSDocTag(props: TSDocTagProps): Children;
|
|
20
|
+
interface TSDocParamsProps {
|
|
21
|
+
parameters: ParameterDescriptor[] | string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A component that creates a TSDoc block with `@param` tags for each parameter.
|
|
25
|
+
*/
|
|
26
|
+
declare function TSDocParams(props: TSDocParamsProps): Children;
|
|
27
|
+
/**
|
|
28
|
+
* Create a TSDoc `@title` tag.
|
|
29
|
+
*/
|
|
30
|
+
declare function TSDocTitle(props: ComponentProps): Children;
|
|
31
|
+
/**
|
|
32
|
+
* Create a TSDoc `@domain` tag.
|
|
33
|
+
*/
|
|
34
|
+
declare function TSDocDomain(props: ComponentProps): Children;
|
|
35
|
+
/**
|
|
36
|
+
* Create a TSDoc `@alias` tag.
|
|
37
|
+
*/
|
|
38
|
+
declare function TSDocAlias(props: ComponentProps): Children;
|
|
39
|
+
/**
|
|
40
|
+
* Create a TSDoc `@permission` tag.
|
|
41
|
+
*/
|
|
42
|
+
declare function TSDocPermission(props: ComponentProps): Children;
|
|
43
|
+
interface TSDocDefaultValueProps extends ComponentProps {
|
|
44
|
+
value: any;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create a TSDoc `@defaultValue` tag.
|
|
48
|
+
*/
|
|
49
|
+
declare function TSDocDefaultValue(props: TSDocDefaultValueProps): Children;
|
|
50
|
+
/**
|
|
51
|
+
* Create a TSDoc `@remarks` tag.
|
|
52
|
+
*/
|
|
53
|
+
declare function TSDocRemarks(props: ComponentProps): Children;
|
|
54
|
+
/**
|
|
55
|
+
* Create a TSDoc `@see` tag.
|
|
56
|
+
*/
|
|
57
|
+
declare function TSDocLink(props: ComponentProps): Children;
|
|
58
|
+
interface TSDocExampleProps extends JSDocExampleProps {
|
|
59
|
+
/**
|
|
60
|
+
* Whether the file is a TSX file.
|
|
61
|
+
*
|
|
62
|
+
* @defaultValue false
|
|
63
|
+
*/
|
|
64
|
+
tsx?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create a TSDoc `@example` tag.
|
|
68
|
+
*/
|
|
69
|
+
declare function TSDocExample(props: TSDocExampleProps): Children;
|
|
70
|
+
/**
|
|
71
|
+
* Create a TSDoc `@readonly` tag.
|
|
72
|
+
*/
|
|
73
|
+
declare function TSDocReadonly(): Children;
|
|
74
|
+
/**
|
|
75
|
+
* Create a TSDoc `@internal` tag.
|
|
76
|
+
*/
|
|
77
|
+
declare function TSDocInternal(): Children;
|
|
78
|
+
/**
|
|
79
|
+
* Create a TSDoc `@ignore` tag.
|
|
80
|
+
*/
|
|
81
|
+
declare function TSDocIgnore(): Children;
|
|
82
|
+
/**
|
|
83
|
+
* Create a TSDoc `@hidden` tag.
|
|
84
|
+
*/
|
|
85
|
+
declare function TSDocHidden(): Children;
|
|
86
|
+
interface TSDocAttributesTagsProps {
|
|
87
|
+
title?: string;
|
|
88
|
+
alias?: string[];
|
|
89
|
+
permission?: string[];
|
|
90
|
+
domain?: string;
|
|
91
|
+
readonly?: boolean;
|
|
92
|
+
internal?: boolean;
|
|
93
|
+
ignore?: boolean;
|
|
94
|
+
hidden?: boolean;
|
|
95
|
+
defaultValue?: any;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
99
|
+
*/
|
|
100
|
+
declare function TSDocAttributesTags(props: TSDocAttributesTagsProps): Children;
|
|
101
|
+
interface TSDocParamProps {
|
|
102
|
+
name: Children;
|
|
103
|
+
children?: Children;
|
|
104
|
+
optional?: boolean;
|
|
105
|
+
defaultValue?: Children;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Create a TSDoc parameter set off with `@param`.
|
|
109
|
+
*/
|
|
110
|
+
declare function TSDocParam(props: TSDocParamProps): Children;
|
|
111
|
+
/**
|
|
112
|
+
* Create a TSDoc `@returns` tag.
|
|
113
|
+
*/
|
|
114
|
+
declare function TSDocReturns(props: ComponentProps): Children;
|
|
115
|
+
/**
|
|
116
|
+
* Create a TSDoc `@throws` tag.
|
|
117
|
+
*/
|
|
118
|
+
declare function TSDocThrows(props: ComponentProps): Children;
|
|
119
|
+
interface TSDocModuleProps extends ComponentProps {
|
|
120
|
+
/**
|
|
121
|
+
* the prefix for the builtin module name
|
|
122
|
+
*
|
|
123
|
+
* @defaultValue "storm"
|
|
124
|
+
*/
|
|
125
|
+
prefix?: string;
|
|
126
|
+
/**
|
|
127
|
+
* The name of the module
|
|
128
|
+
*
|
|
129
|
+
* @remarks
|
|
130
|
+
* This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* import { MyModule } from "storm:my-module";
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
name: Children;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Generates a TSDoc `@module` tag for the given module name.
|
|
141
|
+
*/
|
|
142
|
+
declare function TSDocModule(props: TSDocModuleProps): Children;
|
|
143
|
+
declare type __ΩTSDocProps = any[];
|
|
144
|
+
declare type __ΩTSDocTagProps = any[];
|
|
145
|
+
declare type __ΩTSDocParamsProps = any[];
|
|
146
|
+
declare type __ΩTSDocDefaultValueProps = any[];
|
|
147
|
+
declare type __ΩTSDocExampleProps = any[];
|
|
148
|
+
declare type __ΩTSDocAttributesTagsProps = any[];
|
|
149
|
+
declare type __ΩTSDocParamProps = any[];
|
|
150
|
+
declare type __ΩTSDocModuleProps = any[];
|
|
151
|
+
//#endregion
|
|
152
|
+
export { __ΩTSDocDefaultValueProps as A, TSDocRemarks as C, TSDocThrows as D, TSDocTagProps as E, __ΩTSDocProps as F, __ΩTSDocTagProps as I, __ΩTSDocModuleProps as M, __ΩTSDocParamProps as N, TSDocTitle as O, __ΩTSDocParamsProps as P, TSDocReadonly as S, TSDocTag as T, TSDocParamProps as _, TSDocDefaultValue as a, TSDocPermission as b, TSDocExample as c, TSDocIgnore as d, TSDocInternal as f, TSDocParam as g, TSDocModuleProps as h, TSDocAttributesTagsProps as i, __ΩTSDocExampleProps as j, __ΩTSDocAttributesTagsProps as k, TSDocExampleProps as l, TSDocModule as m, TSDocAlias as n, TSDocDefaultValueProps as o, TSDocLink as p, TSDocAttributesTags as r, TSDocDomain as s, TSDoc as t, TSDocHidden as u, TSDocParams as v, TSDocReturns as w, TSDocProps as x, TSDocParamsProps as y };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { n as ComponentProps } from "./components-B2kXCrty.mjs";
|
|
2
|
+
import { Children } from "@alloy-js/core";
|
|
3
|
+
import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/tsdoc.d.ts
|
|
6
|
+
interface TSDocProps extends ComponentProps {
|
|
7
|
+
heading?: Children;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Generates a TypeScript interface for the given reflection class.
|
|
11
|
+
*/
|
|
12
|
+
declare function TSDoc(props: TSDocProps): Children;
|
|
13
|
+
interface TSDocTagProps extends ComponentProps {
|
|
14
|
+
tag: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a TSDoc `@<props.tag>` tag.
|
|
18
|
+
*/
|
|
19
|
+
declare function TSDocTag(props: TSDocTagProps): Children;
|
|
20
|
+
interface TSDocParamsProps {
|
|
21
|
+
parameters: ParameterDescriptor[] | string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A component that creates a TSDoc block with `@param` tags for each parameter.
|
|
25
|
+
*/
|
|
26
|
+
declare function TSDocParams(props: TSDocParamsProps): Children;
|
|
27
|
+
/**
|
|
28
|
+
* Create a TSDoc `@title` tag.
|
|
29
|
+
*/
|
|
30
|
+
declare function TSDocTitle(props: ComponentProps): Children;
|
|
31
|
+
/**
|
|
32
|
+
* Create a TSDoc `@domain` tag.
|
|
33
|
+
*/
|
|
34
|
+
declare function TSDocDomain(props: ComponentProps): Children;
|
|
35
|
+
/**
|
|
36
|
+
* Create a TSDoc `@alias` tag.
|
|
37
|
+
*/
|
|
38
|
+
declare function TSDocAlias(props: ComponentProps): Children;
|
|
39
|
+
/**
|
|
40
|
+
* Create a TSDoc `@permission` tag.
|
|
41
|
+
*/
|
|
42
|
+
declare function TSDocPermission(props: ComponentProps): Children;
|
|
43
|
+
interface TSDocDefaultValueProps extends ComponentProps {
|
|
44
|
+
value: any;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create a TSDoc `@defaultValue` tag.
|
|
48
|
+
*/
|
|
49
|
+
declare function TSDocDefaultValue(props: TSDocDefaultValueProps): Children;
|
|
50
|
+
/**
|
|
51
|
+
* Create a TSDoc `@remarks` tag.
|
|
52
|
+
*/
|
|
53
|
+
declare function TSDocRemarks(props: ComponentProps): Children;
|
|
54
|
+
/**
|
|
55
|
+
* Create a TSDoc `@see` tag.
|
|
56
|
+
*/
|
|
57
|
+
declare function TSDocLink(props: ComponentProps): Children;
|
|
58
|
+
interface TSDocExampleProps extends JSDocExampleProps {
|
|
59
|
+
/**
|
|
60
|
+
* Whether the file is a TSX file.
|
|
61
|
+
*
|
|
62
|
+
* @defaultValue false
|
|
63
|
+
*/
|
|
64
|
+
tsx?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create a TSDoc `@example` tag.
|
|
68
|
+
*/
|
|
69
|
+
declare function TSDocExample(props: TSDocExampleProps): Children;
|
|
70
|
+
/**
|
|
71
|
+
* Create a TSDoc `@readonly` tag.
|
|
72
|
+
*/
|
|
73
|
+
declare function TSDocReadonly(): Children;
|
|
74
|
+
/**
|
|
75
|
+
* Create a TSDoc `@internal` tag.
|
|
76
|
+
*/
|
|
77
|
+
declare function TSDocInternal(): Children;
|
|
78
|
+
/**
|
|
79
|
+
* Create a TSDoc `@ignore` tag.
|
|
80
|
+
*/
|
|
81
|
+
declare function TSDocIgnore(): Children;
|
|
82
|
+
/**
|
|
83
|
+
* Create a TSDoc `@hidden` tag.
|
|
84
|
+
*/
|
|
85
|
+
declare function TSDocHidden(): Children;
|
|
86
|
+
interface TSDocAttributesTagsProps {
|
|
87
|
+
title?: string;
|
|
88
|
+
alias?: string[];
|
|
89
|
+
permission?: string[];
|
|
90
|
+
domain?: string;
|
|
91
|
+
readonly?: boolean;
|
|
92
|
+
internal?: boolean;
|
|
93
|
+
ignore?: boolean;
|
|
94
|
+
hidden?: boolean;
|
|
95
|
+
defaultValue?: any;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
99
|
+
*/
|
|
100
|
+
declare function TSDocAttributesTags(props: TSDocAttributesTagsProps): Children;
|
|
101
|
+
interface TSDocParamProps {
|
|
102
|
+
name: Children;
|
|
103
|
+
children?: Children;
|
|
104
|
+
optional?: boolean;
|
|
105
|
+
defaultValue?: Children;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Create a TSDoc parameter set off with `@param`.
|
|
109
|
+
*/
|
|
110
|
+
declare function TSDocParam(props: TSDocParamProps): Children;
|
|
111
|
+
/**
|
|
112
|
+
* Create a TSDoc `@returns` tag.
|
|
113
|
+
*/
|
|
114
|
+
declare function TSDocReturns(props: ComponentProps): Children;
|
|
115
|
+
/**
|
|
116
|
+
* Create a TSDoc `@throws` tag.
|
|
117
|
+
*/
|
|
118
|
+
declare function TSDocThrows(props: ComponentProps): Children;
|
|
119
|
+
interface TSDocModuleProps extends ComponentProps {
|
|
120
|
+
/**
|
|
121
|
+
* the prefix for the builtin module name
|
|
122
|
+
*
|
|
123
|
+
* @defaultValue "storm"
|
|
124
|
+
*/
|
|
125
|
+
prefix?: string;
|
|
126
|
+
/**
|
|
127
|
+
* The name of the module
|
|
128
|
+
*
|
|
129
|
+
* @remarks
|
|
130
|
+
* This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* import { MyModule } from "storm:my-module";
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
name: Children;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Generates a TSDoc `@module` tag for the given module name.
|
|
141
|
+
*/
|
|
142
|
+
declare function TSDocModule(props: TSDocModuleProps): Children;
|
|
143
|
+
declare type __ΩTSDocProps = any[];
|
|
144
|
+
declare type __ΩTSDocTagProps = any[];
|
|
145
|
+
declare type __ΩTSDocParamsProps = any[];
|
|
146
|
+
declare type __ΩTSDocDefaultValueProps = any[];
|
|
147
|
+
declare type __ΩTSDocExampleProps = any[];
|
|
148
|
+
declare type __ΩTSDocAttributesTagsProps = any[];
|
|
149
|
+
declare type __ΩTSDocParamProps = any[];
|
|
150
|
+
declare type __ΩTSDocModuleProps = any[];
|
|
151
|
+
//#endregion
|
|
152
|
+
export { __ΩTSDocDefaultValueProps as A, TSDocRemarks as C, TSDocThrows as D, TSDocTagProps as E, __ΩTSDocProps as F, __ΩTSDocTagProps as I, __ΩTSDocModuleProps as M, __ΩTSDocParamProps as N, TSDocTitle as O, __ΩTSDocParamsProps as P, TSDocReadonly as S, TSDocTag as T, TSDocParamProps as _, TSDocDefaultValue as a, TSDocPermission as b, TSDocExample as c, TSDocIgnore as d, TSDocInternal as f, TSDocParam as g, TSDocModuleProps as h, TSDocAttributesTagsProps as i, __ΩTSDocExampleProps as j, __ΩTSDocAttributesTagsProps as k, TSDocExampleProps as l, TSDocModule as m, TSDocAlias as n, TSDocDefaultValueProps as o, TSDocLink as p, TSDocAttributesTags as r, TSDocDomain as s, TSDoc as t, TSDocHidden as u, TSDocParams as v, TSDocReturns as w, TSDocProps as x, TSDocParamsProps as y };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { x as TSDocProps } from "./tsdoc-C39LB5Mn.cjs";
|
|
2
|
+
import * as _alloy_js_core3 from "@alloy-js/core";
|
|
3
|
+
|
|
4
|
+
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
7
|
+
*/
|
|
8
|
+
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core3.Children;
|
|
9
|
+
/**
|
|
10
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
11
|
+
*/
|
|
12
|
+
declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core3.Children;
|
|
13
|
+
/**
|
|
14
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
15
|
+
*/
|
|
16
|
+
declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core3.Children;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { TSDocReflectionMethod as n, TSDocReflectionProperty as r, TSDocReflectionClass as t };
|