@powerlines/plugin-alloy 0.25.49 → 0.25.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/core/components/index.cjs +10 -0
- package/dist/core/components/index.d.cts +5 -0
- package/dist/core/components/index.d.mts +5 -0
- package/dist/core/components/index.mjs +6 -0
- package/dist/core/components/output.cjs +41 -0
- package/dist/core/components/output.d.cts +24 -0
- package/dist/core/components/output.d.cts.map +1 -0
- package/dist/core/components/output.d.mts +24 -0
- package/dist/core/components/output.d.mts.map +1 -0
- package/dist/core/components/output.mjs +40 -0
- package/dist/core/components/output.mjs.map +1 -0
- package/dist/core/components/single-line-comment.cjs +23 -0
- package/dist/core/components/single-line-comment.d.cts +23 -0
- package/dist/core/components/single-line-comment.d.cts.map +1 -0
- package/dist/core/components/single-line-comment.d.mts +23 -0
- package/dist/core/components/single-line-comment.d.mts.map +1 -0
- package/dist/core/components/single-line-comment.mjs +22 -0
- package/dist/core/components/single-line-comment.mjs.map +1 -0
- package/dist/core/components/source-file.cjs +64 -0
- package/dist/core/components/source-file.d.cts +33 -0
- package/dist/core/components/source-file.d.cts.map +1 -0
- package/dist/core/components/source-file.d.mts +33 -0
- package/dist/core/components/source-file.d.mts.map +1 -0
- package/dist/core/components/source-file.mjs +62 -0
- package/dist/core/components/source-file.mjs.map +1 -0
- package/dist/core/components/spacing.cjs +20 -0
- package/dist/core/components/spacing.d.cts +24 -0
- package/dist/core/components/spacing.d.cts.map +1 -0
- package/dist/core/components/spacing.d.mts +24 -0
- package/dist/core/components/spacing.d.mts.map +1 -0
- package/dist/core/components/spacing.mjs +19 -0
- package/dist/core/components/spacing.mjs.map +1 -0
- package/dist/core/contexts/context.cjs +41 -0
- package/dist/core/contexts/context.d.cts +29 -0
- package/dist/core/contexts/context.d.cts.map +1 -0
- package/dist/core/contexts/context.d.mts +29 -0
- package/dist/core/contexts/context.d.mts.map +1 -0
- package/dist/core/contexts/context.mjs +37 -0
- package/dist/core/contexts/context.mjs.map +1 -0
- package/dist/core/contexts/index.cjs +21 -0
- package/dist/core/contexts/index.d.cts +4 -0
- package/dist/core/contexts/index.d.mts +4 -0
- package/dist/core/contexts/index.mjs +5 -0
- package/dist/core/contexts/meta.cjs +41 -0
- package/dist/core/contexts/meta.d.cts +48 -0
- package/dist/core/contexts/meta.d.cts.map +1 -0
- package/dist/core/contexts/meta.d.mts +48 -0
- package/dist/core/contexts/meta.d.mts.map +1 -0
- package/dist/core/contexts/meta.mjs +37 -0
- package/dist/core/contexts/meta.mjs.map +1 -0
- package/dist/core/contexts/reflection.cjs +69 -0
- package/dist/core/contexts/reflection.d.cts +53 -0
- package/dist/core/contexts/reflection.d.cts.map +1 -0
- package/dist/core/contexts/reflection.d.mts +53 -0
- package/dist/core/contexts/reflection.d.mts.map +1 -0
- package/dist/core/contexts/reflection.mjs +61 -0
- package/dist/core/contexts/reflection.mjs.map +1 -0
- package/dist/core/helpers/code.cjs +34 -0
- package/dist/core/helpers/code.d.cts +29 -0
- package/dist/core/helpers/code.d.cts.map +1 -0
- package/dist/core/helpers/code.d.mts +29 -0
- package/dist/core/helpers/code.d.mts.map +1 -0
- package/dist/core/helpers/code.mjs +33 -0
- package/dist/core/helpers/code.mjs.map +1 -0
- package/dist/core/helpers/index.cjs +4 -0
- package/dist/core/helpers/index.d.cts +2 -0
- package/dist/core/helpers/index.d.mts +2 -0
- package/dist/core/helpers/index.mjs +3 -0
- package/dist/core/index.cjs +34 -0
- package/dist/core/index.d.cts +9 -0
- package/dist/core/index.d.mts +9 -0
- package/dist/core/index.mjs +13 -0
- package/dist/helpers/capnp.cjs +277 -0
- package/dist/helpers/capnp.d.cts +87 -0
- package/dist/helpers/capnp.d.cts.map +1 -0
- package/dist/helpers/capnp.d.mts +87 -0
- package/dist/helpers/capnp.d.mts.map +1 -0
- package/dist/helpers/capnp.mjs +260 -0
- package/dist/helpers/capnp.mjs.map +1 -0
- package/dist/helpers/create-builtin.cjs +20 -0
- package/dist/helpers/create-builtin.d.cts +16 -0
- package/dist/helpers/create-builtin.d.cts.map +1 -0
- package/dist/helpers/create-builtin.d.mts +16 -0
- package/dist/helpers/create-builtin.d.mts.map +1 -0
- package/dist/helpers/create-builtin.mjs +19 -0
- package/dist/helpers/create-builtin.mjs.map +1 -0
- package/dist/helpers/index.cjs +25 -0
- package/dist/helpers/index.d.cts +5 -0
- package/dist/helpers/index.d.mts +5 -0
- package/dist/helpers/index.mjs +6 -0
- package/dist/helpers/refkey.cjs +17 -0
- package/dist/helpers/refkey.d.cts +13 -0
- package/dist/helpers/refkey.d.cts.map +1 -0
- package/dist/helpers/refkey.d.mts +13 -0
- package/dist/helpers/refkey.d.mts.map +1 -0
- package/dist/helpers/refkey.mjs +16 -0
- package/dist/helpers/refkey.mjs.map +1 -0
- package/dist/helpers/typescript.cjs +47 -0
- package/dist/helpers/typescript.d.cts +26 -0
- package/dist/helpers/typescript.d.cts.map +1 -0
- package/dist/helpers/typescript.d.mts +26 -0
- package/dist/helpers/typescript.d.mts.map +1 -0
- package/dist/helpers/typescript.mjs +46 -0
- package/dist/helpers/typescript.mjs.map +1 -0
- package/dist/index.cjs +48 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +45 -0
- package/dist/index.mjs.map +1 -0
- package/dist/markdown/components/front-matter.cjs +29 -0
- package/dist/markdown/components/front-matter.d.cts +16 -0
- package/dist/markdown/components/front-matter.d.cts.map +1 -0
- package/dist/markdown/components/front-matter.d.mts +16 -0
- package/dist/markdown/components/front-matter.d.mts.map +1 -0
- package/dist/markdown/components/front-matter.mjs +28 -0
- package/dist/markdown/components/front-matter.mjs.map +1 -0
- package/dist/markdown/components/index.cjs +11 -0
- package/dist/markdown/components/index.d.cts +4 -0
- package/dist/markdown/components/index.d.mts +4 -0
- package/dist/markdown/components/index.mjs +5 -0
- package/dist/markdown/components/markdown-file.cjs +135 -0
- package/dist/markdown/components/markdown-file.d.cts +29 -0
- package/dist/markdown/components/markdown-file.d.cts.map +1 -0
- package/dist/markdown/components/markdown-file.d.mts +29 -0
- package/dist/markdown/components/markdown-file.d.mts.map +1 -0
- package/dist/markdown/components/markdown-file.mjs +133 -0
- package/dist/markdown/components/markdown-file.mjs.map +1 -0
- package/dist/markdown/components/markdown-table.cjs +102 -0
- package/dist/markdown/components/markdown-table.d.cts +28 -0
- package/dist/markdown/components/markdown-table.d.cts.map +1 -0
- package/dist/markdown/components/markdown-table.d.mts +28 -0
- package/dist/markdown/components/markdown-table.d.mts.map +1 -0
- package/dist/markdown/components/markdown-table.mjs +99 -0
- package/dist/markdown/components/markdown-table.mjs.map +1 -0
- package/dist/markdown/contexts/index.cjs +7 -0
- package/dist/markdown/contexts/index.d.cts +2 -0
- package/dist/markdown/contexts/index.d.mts +2 -0
- package/dist/markdown/contexts/index.mjs +3 -0
- package/dist/markdown/contexts/markdown-table.cjs +38 -0
- package/dist/markdown/contexts/markdown-table.d.cts +38 -0
- package/dist/markdown/contexts/markdown-table.d.cts.map +1 -0
- package/dist/markdown/contexts/markdown-table.d.mts +38 -0
- package/dist/markdown/contexts/markdown-table.d.mts.map +1 -0
- package/dist/markdown/contexts/markdown-table.mjs +34 -0
- package/dist/markdown/contexts/markdown-table.mjs.map +1 -0
- package/dist/markdown/index.cjs +18 -0
- package/dist/markdown/index.d.cts +5 -0
- package/dist/markdown/index.d.mts +5 -0
- package/dist/markdown/index.mjs +8 -0
- package/dist/render.cjs +91 -0
- package/dist/render.d.cts +38 -0
- package/dist/render.d.cts.map +1 -0
- package/dist/render.d.mts +38 -0
- package/dist/render.d.mts.map +1 -0
- package/dist/render.mjs +89 -0
- package/dist/render.mjs.map +1 -0
- package/dist/types/components.cjs +0 -0
- package/dist/types/components.d.cts +142 -0
- package/dist/types/components.d.cts.map +1 -0
- package/dist/types/components.d.mts +142 -0
- package/dist/types/components.d.mts.map +1 -0
- package/dist/types/components.mjs +1 -0
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +39 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +39 -0
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/typescript/components/builtin-file.cjs +63 -0
- package/dist/typescript/components/builtin-file.d.cts +35 -0
- package/dist/typescript/components/builtin-file.d.cts.map +1 -0
- package/dist/typescript/components/builtin-file.d.mts +35 -0
- package/dist/typescript/components/builtin-file.d.mts.map +1 -0
- package/dist/typescript/components/builtin-file.mjs +62 -0
- package/dist/typescript/components/builtin-file.mjs.map +1 -0
- package/dist/typescript/components/class-declaration.cjs +291 -0
- package/dist/typescript/components/class-declaration.d.cts +145 -0
- package/dist/typescript/components/class-declaration.d.cts.map +1 -0
- package/dist/typescript/components/class-declaration.d.mts +145 -0
- package/dist/typescript/components/class-declaration.d.mts.map +1 -0
- package/dist/typescript/components/class-declaration.mjs +285 -0
- package/dist/typescript/components/class-declaration.mjs.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.cjs +26 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts +33 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts +33 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.mjs +25 -0
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -0
- package/dist/typescript/components/entry-file.cjs +43 -0
- package/dist/typescript/components/entry-file.d.cts +28 -0
- package/dist/typescript/components/entry-file.d.cts.map +1 -0
- package/dist/typescript/components/entry-file.d.mts +28 -0
- package/dist/typescript/components/entry-file.d.mts.map +1 -0
- package/dist/typescript/components/entry-file.mjs +41 -0
- package/dist/typescript/components/entry-file.mjs.map +1 -0
- package/dist/typescript/components/index.cjs +65 -0
- package/dist/typescript/components/index.d.cts +15 -0
- package/dist/typescript/components/index.d.mts +15 -0
- package/dist/typescript/components/index.mjs +16 -0
- package/dist/typescript/components/infrastructure-file.cjs +40 -0
- package/dist/typescript/components/infrastructure-file.d.cts +21 -0
- package/dist/typescript/components/infrastructure-file.d.cts.map +1 -0
- package/dist/typescript/components/infrastructure-file.d.mts +21 -0
- package/dist/typescript/components/infrastructure-file.d.mts.map +1 -0
- package/dist/typescript/components/infrastructure-file.mjs +38 -0
- package/dist/typescript/components/infrastructure-file.mjs.map +1 -0
- package/dist/typescript/components/interface-declaration.cjs +229 -0
- package/dist/typescript/components/interface-declaration.d.cts +86 -0
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -0
- package/dist/typescript/components/interface-declaration.d.mts +86 -0
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -0
- package/dist/typescript/components/interface-declaration.mjs +225 -0
- package/dist/typescript/components/interface-declaration.mjs.map +1 -0
- package/dist/typescript/components/object-declaration.cjs +128 -0
- package/dist/typescript/components/object-declaration.d.cts +30 -0
- package/dist/typescript/components/object-declaration.d.cts.map +1 -0
- package/dist/typescript/components/object-declaration.d.mts +30 -0
- package/dist/typescript/components/object-declaration.d.mts.map +1 -0
- package/dist/typescript/components/object-declaration.mjs +126 -0
- package/dist/typescript/components/object-declaration.mjs.map +1 -0
- package/dist/typescript/components/property-name.cjs +32 -0
- package/dist/typescript/components/property-name.d.cts +24 -0
- package/dist/typescript/components/property-name.d.cts.map +1 -0
- package/dist/typescript/components/property-name.d.mts +24 -0
- package/dist/typescript/components/property-name.d.mts.map +1 -0
- package/dist/typescript/components/property-name.mjs +31 -0
- package/dist/typescript/components/property-name.mjs.map +1 -0
- package/dist/typescript/components/record-expression.cjs +13 -0
- package/dist/typescript/components/record-expression.d.cts +13 -0
- package/dist/typescript/components/record-expression.d.cts.map +1 -0
- package/dist/typescript/components/record-expression.d.mts +13 -0
- package/dist/typescript/components/record-expression.d.mts.map +1 -0
- package/dist/typescript/components/record-expression.mjs +12 -0
- package/dist/typescript/components/record-expression.mjs.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.cjs +310 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts +44 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts +44 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.mjs +304 -0
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -0
- package/dist/typescript/components/tsdoc.cjs +477 -0
- package/dist/typescript/components/tsdoc.d.cts +164 -0
- package/dist/typescript/components/tsdoc.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc.d.mts +164 -0
- package/dist/typescript/components/tsdoc.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc.mjs +457 -0
- package/dist/typescript/components/tsdoc.mjs.map +1 -0
- package/dist/typescript/components/type-declaration.cjs +39 -0
- package/dist/typescript/components/type-declaration.d.cts +18 -0
- package/dist/typescript/components/type-declaration.d.cts.map +1 -0
- package/dist/typescript/components/type-declaration.d.mts +18 -0
- package/dist/typescript/components/type-declaration.d.mts.map +1 -0
- package/dist/typescript/components/type-declaration.mjs +38 -0
- package/dist/typescript/components/type-declaration.mjs.map +1 -0
- package/dist/typescript/components/type-parameters.cjs +82 -0
- package/dist/typescript/components/type-parameters.d.cts +24 -0
- package/dist/typescript/components/type-parameters.d.cts.map +1 -0
- package/dist/typescript/components/type-parameters.d.mts +24 -0
- package/dist/typescript/components/type-parameters.d.mts.map +1 -0
- package/dist/typescript/components/type-parameters.mjs +81 -0
- package/dist/typescript/components/type-parameters.mjs.map +1 -0
- package/dist/typescript/components/typescript-file.cjs +221 -0
- package/dist/typescript/components/typescript-file.d.cts +50 -0
- package/dist/typescript/components/typescript-file.d.cts.map +1 -0
- package/dist/typescript/components/typescript-file.d.mts +50 -0
- package/dist/typescript/components/typescript-file.d.mts.map +1 -0
- package/dist/typescript/components/typescript-file.mjs +218 -0
- package/dist/typescript/components/typescript-file.mjs.map +1 -0
- package/dist/typescript/contexts/index.cjs +4 -0
- package/dist/typescript/contexts/index.d.cts +2 -0
- package/dist/typescript/contexts/index.d.mts +2 -0
- package/dist/typescript/contexts/index.mjs +3 -0
- package/dist/typescript/contexts/lexical-scope.cjs +26 -0
- package/dist/typescript/contexts/lexical-scope.d.cts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.d.mts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.mjs +25 -0
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -0
- package/dist/typescript/contexts/member-scope.cjs +24 -0
- package/dist/typescript/contexts/member-scope.d.cts +20 -0
- package/dist/typescript/contexts/member-scope.d.cts.map +1 -0
- package/dist/typescript/contexts/member-scope.d.mts +20 -0
- package/dist/typescript/contexts/member-scope.d.mts.map +1 -0
- package/dist/typescript/contexts/member-scope.mjs +23 -0
- package/dist/typescript/contexts/member-scope.mjs.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.cjs +26 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts +14 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts +14 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.mjs +25 -0
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -0
- package/dist/typescript/helpers/index.cjs +6 -0
- package/dist/typescript/helpers/index.d.cts +3 -0
- package/dist/typescript/helpers/index.d.mts +3 -0
- package/dist/typescript/helpers/index.mjs +4 -0
- package/dist/typescript/helpers/utilities.cjs +15 -0
- package/dist/typescript/helpers/utilities.d.cts +11 -0
- package/dist/typescript/helpers/utilities.d.cts.map +1 -0
- package/dist/typescript/helpers/utilities.d.mts +11 -0
- package/dist/typescript/helpers/utilities.d.mts.map +1 -0
- package/dist/typescript/helpers/utilities.mjs +14 -0
- package/dist/typescript/helpers/utilities.mjs.map +1 -0
- package/dist/typescript/index.cjs +74 -0
- package/dist/typescript/index.d.cts +18 -0
- package/dist/typescript/index.d.mts +18 -0
- package/dist/typescript/index.mjs +22 -0
- package/dist/yaml/components/index.cjs +5 -0
- package/dist/yaml/components/index.d.cts +2 -0
- package/dist/yaml/components/index.d.mts +2 -0
- package/dist/yaml/components/index.mjs +3 -0
- package/dist/yaml/components/yaml-file.cjs +149 -0
- package/dist/yaml/components/yaml-file.d.cts +34 -0
- package/dist/yaml/components/yaml-file.d.cts.map +1 -0
- package/dist/yaml/components/yaml-file.d.mts +34 -0
- package/dist/yaml/components/yaml-file.d.mts.map +1 -0
- package/dist/yaml/components/yaml-file.mjs +147 -0
- package/dist/yaml/components/yaml-file.mjs.map +1 -0
- package/dist/yaml/index.cjs +6 -0
- package/dist/yaml/index.d.cts +2 -0
- package/dist/yaml/index.d.mts +2 -0
- package/dist/yaml/index.mjs +4 -0
- package/package.json +7 -7
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
4
|
+
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
5
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
7
|
+
let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
8
|
+
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
9
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
10
|
+
|
|
11
|
+
//#region src/typescript/components/tsdoc.tsx
|
|
12
|
+
/**
|
|
13
|
+
* Generates a TypeScript interface for the given reflection class.
|
|
14
|
+
*/
|
|
15
|
+
function TSDoc(props) {
|
|
16
|
+
const [{ children, heading }] = (0, _alloy_js_core.splitProps)(props, ["children", "heading"]);
|
|
17
|
+
return [
|
|
18
|
+
"/**",
|
|
19
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
|
|
20
|
+
string: " * ",
|
|
21
|
+
get children() {
|
|
22
|
+
return [
|
|
23
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
24
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
25
|
+
get when() {
|
|
26
|
+
return !(0, _stryke_type_checks_is_undefined.isUndefined)(heading);
|
|
27
|
+
},
|
|
28
|
+
children: heading
|
|
29
|
+
}),
|
|
30
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
31
|
+
get when() {
|
|
32
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
|
|
33
|
+
},
|
|
34
|
+
get children() {
|
|
35
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
36
|
+
get when() {
|
|
37
|
+
return !(0, _stryke_type_checks_is_undefined.isUndefined)(heading);
|
|
38
|
+
},
|
|
39
|
+
get children() {
|
|
40
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
41
|
+
}
|
|
42
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
43
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
44
|
+
} })];
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
51
|
+
`*/`,
|
|
52
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Create a TSDoc `@<props.tag>` tag.
|
|
57
|
+
*/
|
|
58
|
+
function TSDocTag(props) {
|
|
59
|
+
const [{ children, tag }] = (0, _alloy_js_core.splitProps)(props, ["children", "tag"]);
|
|
60
|
+
return [
|
|
61
|
+
`@${tag} `,
|
|
62
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
63
|
+
get when() {
|
|
64
|
+
return Boolean(children);
|
|
65
|
+
},
|
|
66
|
+
get children() {
|
|
67
|
+
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
|
|
68
|
+
width: 2,
|
|
69
|
+
get children() {
|
|
70
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { children });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("sbr", {})
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A component that creates a TSDoc block with `@param` tags for each parameter.
|
|
80
|
+
*/
|
|
81
|
+
function TSDocParams(props) {
|
|
82
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
83
|
+
each: normalizeParametersForDoc(props.parameters),
|
|
84
|
+
children: (param) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocParam, {
|
|
85
|
+
get name() {
|
|
86
|
+
return param.name;
|
|
87
|
+
},
|
|
88
|
+
get optional() {
|
|
89
|
+
return param.optional;
|
|
90
|
+
},
|
|
91
|
+
get children() {
|
|
92
|
+
return param.doc;
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function normalizeParametersForDoc(parameters) {
|
|
98
|
+
if (parameters.some((p) => typeof p === "string")) return [];
|
|
99
|
+
return parameters;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create a TSDoc `@title` tag.
|
|
103
|
+
*/
|
|
104
|
+
function TSDocTitle(props) {
|
|
105
|
+
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
106
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
107
|
+
tag: "title",
|
|
108
|
+
children
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Create a TSDoc `@domain` tag.
|
|
113
|
+
*/
|
|
114
|
+
function TSDocDomain(props) {
|
|
115
|
+
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
116
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
117
|
+
tag: "domain",
|
|
118
|
+
children
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Create a TSDoc `@alias` tag.
|
|
123
|
+
*/
|
|
124
|
+
function TSDocAlias(props) {
|
|
125
|
+
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
126
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
127
|
+
tag: "alias",
|
|
128
|
+
children
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Create a TSDoc `@permission` tag.
|
|
133
|
+
*/
|
|
134
|
+
function TSDocPermission(props) {
|
|
135
|
+
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
136
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
137
|
+
tag: "permission",
|
|
138
|
+
children
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Create a TSDoc `@defaultValue` tag.
|
|
143
|
+
*/
|
|
144
|
+
function TSDocDefaultValue(props) {
|
|
145
|
+
const [{ type, defaultValue }] = (0, _alloy_js_core.splitProps)(props, ["type", "defaultValue"]);
|
|
146
|
+
return ["@defaultValue ", (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
147
|
+
get when() {
|
|
148
|
+
return !(0, _stryke_type_checks_is_undefined.isUndefined)(defaultValue);
|
|
149
|
+
},
|
|
150
|
+
get children() {
|
|
151
|
+
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
|
|
152
|
+
width: 2,
|
|
153
|
+
get children() {
|
|
154
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
|
|
155
|
+
return (0, _powerlines_deepkit_utilities.stringifyDefaultValue)(type, defaultValue);
|
|
156
|
+
} });
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
})];
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Create a TSDoc `@remarks` tag.
|
|
164
|
+
*/
|
|
165
|
+
function TSDocRemarks(props) {
|
|
166
|
+
return [
|
|
167
|
+
"@remarks ",
|
|
168
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
169
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, {
|
|
170
|
+
hardline: true,
|
|
171
|
+
get children() {
|
|
172
|
+
return (0, _alloy_js_core.childrenArray)(() => props.children);
|
|
173
|
+
}
|
|
174
|
+
})
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Create a TSDoc `@see` tag.
|
|
179
|
+
*/
|
|
180
|
+
function TSDocLink(props) {
|
|
181
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { tag: "see" }));
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Create a TSDoc `@example` tag.
|
|
185
|
+
*/
|
|
186
|
+
function TSDocExample(props) {
|
|
187
|
+
const [{ tsx, fenced = true, language, children }] = (0, _alloy_js_core.splitProps)(props, [
|
|
188
|
+
"tsx",
|
|
189
|
+
"fenced",
|
|
190
|
+
"language",
|
|
191
|
+
"children"
|
|
192
|
+
]);
|
|
193
|
+
return [
|
|
194
|
+
"@example ",
|
|
195
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
196
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
197
|
+
when: fenced,
|
|
198
|
+
get children() {
|
|
199
|
+
return [
|
|
200
|
+
"```",
|
|
201
|
+
language || (tsx ? "tsx" : "ts"),
|
|
202
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
203
|
+
];
|
|
204
|
+
}
|
|
205
|
+
}),
|
|
206
|
+
children,
|
|
207
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
208
|
+
when: fenced,
|
|
209
|
+
get children() {
|
|
210
|
+
return [(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}), "```"];
|
|
211
|
+
}
|
|
212
|
+
})
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Create a TSDoc `@readonly` tag.
|
|
217
|
+
*/
|
|
218
|
+
function TSDocReadonly() {
|
|
219
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, { tag: "readonly" });
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Create a TSDoc `@internal` tag.
|
|
223
|
+
*/
|
|
224
|
+
function TSDocInternal() {
|
|
225
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, { tag: "internal" });
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Create a TSDoc `@ignore` tag.
|
|
229
|
+
*/
|
|
230
|
+
function TSDocIgnore() {
|
|
231
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, { tag: "ignore" });
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Create a TSDoc `@hidden` tag.
|
|
235
|
+
*/
|
|
236
|
+
function TSDocHidden() {
|
|
237
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, { tag: "hidden" });
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
241
|
+
*/
|
|
242
|
+
function TSDocAttributesTags(props) {
|
|
243
|
+
const [{ type, alias, permission, readonly, internal, ignore, hidden, defaultValue }] = (0, _alloy_js_core.splitProps)(props, [
|
|
244
|
+
"type",
|
|
245
|
+
"alias",
|
|
246
|
+
"permission",
|
|
247
|
+
"readonly",
|
|
248
|
+
"internal",
|
|
249
|
+
"ignore",
|
|
250
|
+
"hidden",
|
|
251
|
+
"defaultValue"
|
|
252
|
+
]);
|
|
253
|
+
const title = (0, _alloy_js_core.computed)(() => props.title?.trim() || "");
|
|
254
|
+
const domain = (0, _alloy_js_core.computed)(() => props.domain?.trim() || "");
|
|
255
|
+
return [
|
|
256
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
257
|
+
get when() {
|
|
258
|
+
return (0, _stryke_type_checks_is_set_string.isSetString)(title.value);
|
|
259
|
+
},
|
|
260
|
+
get children() {
|
|
261
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTitle, { get children() {
|
|
262
|
+
return title.value;
|
|
263
|
+
} });
|
|
264
|
+
}
|
|
265
|
+
}),
|
|
266
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
267
|
+
get when() {
|
|
268
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(!(0, _stryke_type_checks_is_undefined.isUndefined)(alias) && alias.length > 0))() && alias.some((a) => (0, _stryke_type_checks_is_set_string.isSetString)(a?.trim()));
|
|
269
|
+
},
|
|
270
|
+
get children() {
|
|
271
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
272
|
+
get each() {
|
|
273
|
+
return alias?.filter((a) => (0, _stryke_type_checks_is_set_string.isSetString)(a?.trim())) ?? [];
|
|
274
|
+
},
|
|
275
|
+
children: (alias) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocAlias, { children: alias })
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}),
|
|
279
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
280
|
+
get when() {
|
|
281
|
+
return (0, _stryke_type_checks_is_set_string.isSetString)(domain.value);
|
|
282
|
+
},
|
|
283
|
+
get children() {
|
|
284
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocDomain, { get children() {
|
|
285
|
+
return domain.value;
|
|
286
|
+
} });
|
|
287
|
+
}
|
|
288
|
+
}),
|
|
289
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
290
|
+
get when() {
|
|
291
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(!(0, _stryke_type_checks_is_undefined.isUndefined)(permission) && permission.length > 0))() && permission.some((p) => (0, _stryke_type_checks_is_set_string.isSetString)(p?.trim()));
|
|
292
|
+
},
|
|
293
|
+
get children() {
|
|
294
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
295
|
+
get each() {
|
|
296
|
+
return permission?.filter((p) => (0, _stryke_type_checks_is_set_string.isSetString)(p?.trim())) ?? [];
|
|
297
|
+
},
|
|
298
|
+
children: (permission) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocPermission, { children: permission })
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}),
|
|
302
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
303
|
+
when: readonly === true,
|
|
304
|
+
get children() {
|
|
305
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReadonly, {});
|
|
306
|
+
}
|
|
307
|
+
}),
|
|
308
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
309
|
+
when: internal === true,
|
|
310
|
+
get children() {
|
|
311
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocInternal, {});
|
|
312
|
+
}
|
|
313
|
+
}),
|
|
314
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
315
|
+
when: ignore === true,
|
|
316
|
+
get children() {
|
|
317
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocIgnore, {});
|
|
318
|
+
}
|
|
319
|
+
}),
|
|
320
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
321
|
+
when: hidden === true,
|
|
322
|
+
get children() {
|
|
323
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocHidden, {});
|
|
324
|
+
}
|
|
325
|
+
}),
|
|
326
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
327
|
+
get when() {
|
|
328
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(type))() && !(0, _stryke_type_checks_is_undefined.isUndefined)(defaultValue);
|
|
329
|
+
},
|
|
330
|
+
get children() {
|
|
331
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocDefaultValue, {
|
|
332
|
+
type,
|
|
333
|
+
defaultValue
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
})
|
|
337
|
+
];
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Create a TSDoc parameter set off with `@param`.
|
|
341
|
+
*/
|
|
342
|
+
function TSDocParam(props) {
|
|
343
|
+
return [
|
|
344
|
+
"@param ",
|
|
345
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(TSDocParamName, {
|
|
346
|
+
get name() {
|
|
347
|
+
return props.name;
|
|
348
|
+
},
|
|
349
|
+
get optional() {
|
|
350
|
+
return props.optional;
|
|
351
|
+
},
|
|
352
|
+
get defaultValue() {
|
|
353
|
+
return props.defaultValue;
|
|
354
|
+
}
|
|
355
|
+
}),
|
|
356
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(TSDocParamDescription, { get children() {
|
|
357
|
+
return props.children;
|
|
358
|
+
} })
|
|
359
|
+
];
|
|
360
|
+
}
|
|
361
|
+
function TSDocParamName(props) {
|
|
362
|
+
return [
|
|
363
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
364
|
+
get when() {
|
|
365
|
+
return props.optional;
|
|
366
|
+
},
|
|
367
|
+
children: "["
|
|
368
|
+
}),
|
|
369
|
+
(0, _alloy_js_core_jsx_runtime.memo)(() => props.name),
|
|
370
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
371
|
+
get when() {
|
|
372
|
+
return Boolean(props.defaultValue);
|
|
373
|
+
},
|
|
374
|
+
get children() {
|
|
375
|
+
return ["=", (0, _alloy_js_core_jsx_runtime.memo)(() => props.defaultValue)];
|
|
376
|
+
}
|
|
377
|
+
}),
|
|
378
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
379
|
+
get when() {
|
|
380
|
+
return props.optional;
|
|
381
|
+
},
|
|
382
|
+
children: "]"
|
|
383
|
+
})
|
|
384
|
+
];
|
|
385
|
+
}
|
|
386
|
+
function TSDocParamDescription(props) {
|
|
387
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
388
|
+
get when() {
|
|
389
|
+
return Boolean(props.children);
|
|
390
|
+
},
|
|
391
|
+
get children() {
|
|
392
|
+
return [" - ", (0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
|
|
393
|
+
width: 2,
|
|
394
|
+
get children() {
|
|
395
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
|
|
396
|
+
return props.children;
|
|
397
|
+
} });
|
|
398
|
+
}
|
|
399
|
+
})];
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Create a TSDoc `@returns` tag.
|
|
405
|
+
*/
|
|
406
|
+
function TSDocReturns(props) {
|
|
407
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { tag: "returns" }));
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Create a TSDoc `@throws` tag.
|
|
411
|
+
*/
|
|
412
|
+
function TSDocThrows(props) {
|
|
413
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocTag, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { tag: "throws" }));
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Generates a TSDoc `@module` tag for the given module name.
|
|
417
|
+
*/
|
|
418
|
+
function TSDocModule(props) {
|
|
419
|
+
const [{ children, name, prefix }] = (0, _alloy_js_core.splitProps)(props, [
|
|
420
|
+
"children",
|
|
421
|
+
"name",
|
|
422
|
+
"prefix"
|
|
423
|
+
]);
|
|
424
|
+
const context = require_core_contexts_context.usePowerlinesSafe();
|
|
425
|
+
return [
|
|
426
|
+
"/**",
|
|
427
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
|
|
428
|
+
string: " * ",
|
|
429
|
+
get children() {
|
|
430
|
+
return [
|
|
431
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
432
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
433
|
+
get when() {
|
|
434
|
+
return Boolean(children);
|
|
435
|
+
},
|
|
436
|
+
get children() {
|
|
437
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, {
|
|
438
|
+
hardline: true,
|
|
439
|
+
get children() {
|
|
440
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
441
|
+
}
|
|
442
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {})];
|
|
443
|
+
}
|
|
444
|
+
}),
|
|
445
|
+
"@module ",
|
|
446
|
+
(0, _alloy_js_core_jsx_runtime.memo)(() => prefix || context?.config?.framework || "powerlines"),
|
|
447
|
+
":",
|
|
448
|
+
name
|
|
449
|
+
];
|
|
450
|
+
}
|
|
451
|
+
}),
|
|
452
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
453
|
+
` */`
|
|
454
|
+
];
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
//#endregion
|
|
458
|
+
exports.TSDoc = TSDoc;
|
|
459
|
+
exports.TSDocAlias = TSDocAlias;
|
|
460
|
+
exports.TSDocAttributesTags = TSDocAttributesTags;
|
|
461
|
+
exports.TSDocDefaultValue = TSDocDefaultValue;
|
|
462
|
+
exports.TSDocDomain = TSDocDomain;
|
|
463
|
+
exports.TSDocExample = TSDocExample;
|
|
464
|
+
exports.TSDocHidden = TSDocHidden;
|
|
465
|
+
exports.TSDocIgnore = TSDocIgnore;
|
|
466
|
+
exports.TSDocInternal = TSDocInternal;
|
|
467
|
+
exports.TSDocLink = TSDocLink;
|
|
468
|
+
exports.TSDocModule = TSDocModule;
|
|
469
|
+
exports.TSDocParam = TSDocParam;
|
|
470
|
+
exports.TSDocParams = TSDocParams;
|
|
471
|
+
exports.TSDocPermission = TSDocPermission;
|
|
472
|
+
exports.TSDocReadonly = TSDocReadonly;
|
|
473
|
+
exports.TSDocRemarks = TSDocRemarks;
|
|
474
|
+
exports.TSDocReturns = TSDocReturns;
|
|
475
|
+
exports.TSDocTag = TSDocTag;
|
|
476
|
+
exports.TSDocThrows = TSDocThrows;
|
|
477
|
+
exports.TSDocTitle = TSDocTitle;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { ComponentProps } from "../../types/components.cjs";
|
|
2
|
+
import { Children } from "@alloy-js/core";
|
|
3
|
+
import { ReflectionKind, ReflectionParameter, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
|
+
import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
|
|
5
|
+
|
|
6
|
+
//#region src/typescript/components/tsdoc.d.ts
|
|
7
|
+
interface TSDocProps extends ComponentProps {
|
|
8
|
+
heading?: Children;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Generates a TypeScript interface for the given reflection class.
|
|
12
|
+
*/
|
|
13
|
+
declare function TSDoc(props: TSDocProps): Children;
|
|
14
|
+
interface TSDocTagProps extends ComponentProps {
|
|
15
|
+
tag: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a TSDoc `@<props.tag>` tag.
|
|
19
|
+
*/
|
|
20
|
+
declare function TSDocTag(props: TSDocTagProps): Children;
|
|
21
|
+
interface TSDocParamsProps {
|
|
22
|
+
parameters: ParameterDescriptor[] | string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A component that creates a TSDoc block with `@param` tags for each parameter.
|
|
26
|
+
*/
|
|
27
|
+
declare function TSDocParams(props: TSDocParamsProps): Children;
|
|
28
|
+
/**
|
|
29
|
+
* Create a TSDoc `@title` tag.
|
|
30
|
+
*/
|
|
31
|
+
declare function TSDocTitle(props: ComponentProps): Children;
|
|
32
|
+
/**
|
|
33
|
+
* Create a TSDoc `@domain` tag.
|
|
34
|
+
*/
|
|
35
|
+
declare function TSDocDomain(props: ComponentProps): Children;
|
|
36
|
+
/**
|
|
37
|
+
* Create a TSDoc `@alias` tag.
|
|
38
|
+
*/
|
|
39
|
+
declare function TSDocAlias(props: ComponentProps): Children;
|
|
40
|
+
/**
|
|
41
|
+
* Create a TSDoc `@permission` tag.
|
|
42
|
+
*/
|
|
43
|
+
declare function TSDocPermission(props: ComponentProps): Children;
|
|
44
|
+
interface TSDocDefaultValueProps extends ComponentProps {
|
|
45
|
+
type: ReflectionKind | ReflectionProperty | ReflectionParameter;
|
|
46
|
+
defaultValue: any;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Create a TSDoc `@defaultValue` tag.
|
|
50
|
+
*/
|
|
51
|
+
declare function TSDocDefaultValue(props: TSDocDefaultValueProps): Children;
|
|
52
|
+
/**
|
|
53
|
+
* Create a TSDoc `@remarks` tag.
|
|
54
|
+
*/
|
|
55
|
+
declare function TSDocRemarks(props: ComponentProps): Children;
|
|
56
|
+
/**
|
|
57
|
+
* Create a TSDoc `@see` tag.
|
|
58
|
+
*/
|
|
59
|
+
declare function TSDocLink(props: ComponentProps): Children;
|
|
60
|
+
interface TSDocExampleProps extends JSDocExampleProps {
|
|
61
|
+
/**
|
|
62
|
+
* Whether the file is a TSX file.
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue false
|
|
65
|
+
*/
|
|
66
|
+
tsx?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Create a TSDoc `@example` tag.
|
|
70
|
+
*/
|
|
71
|
+
declare function TSDocExample(props: TSDocExampleProps): Children;
|
|
72
|
+
/**
|
|
73
|
+
* Create a TSDoc `@readonly` tag.
|
|
74
|
+
*/
|
|
75
|
+
declare function TSDocReadonly(): Children;
|
|
76
|
+
/**
|
|
77
|
+
* Create a TSDoc `@internal` tag.
|
|
78
|
+
*/
|
|
79
|
+
declare function TSDocInternal(): Children;
|
|
80
|
+
/**
|
|
81
|
+
* Create a TSDoc `@ignore` tag.
|
|
82
|
+
*/
|
|
83
|
+
declare function TSDocIgnore(): Children;
|
|
84
|
+
/**
|
|
85
|
+
* Create a TSDoc `@hidden` tag.
|
|
86
|
+
*/
|
|
87
|
+
declare function TSDocHidden(): Children;
|
|
88
|
+
interface TSDocAttributesTagsProps {
|
|
89
|
+
type?: ReflectionKind | ReflectionProperty | ReflectionParameter;
|
|
90
|
+
title?: string;
|
|
91
|
+
alias?: string[];
|
|
92
|
+
permission?: string[];
|
|
93
|
+
domain?: string;
|
|
94
|
+
readonly?: boolean;
|
|
95
|
+
internal?: boolean;
|
|
96
|
+
ignore?: boolean;
|
|
97
|
+
hidden?: boolean;
|
|
98
|
+
defaultValue?: any;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
102
|
+
*/
|
|
103
|
+
declare function TSDocAttributesTags(props: TSDocAttributesTagsProps): Children;
|
|
104
|
+
interface TSDocParamProps {
|
|
105
|
+
name: Children;
|
|
106
|
+
children?: Children;
|
|
107
|
+
optional?: boolean;
|
|
108
|
+
defaultValue?: Children;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Create a TSDoc parameter set off with `@param`.
|
|
112
|
+
*/
|
|
113
|
+
declare function TSDocParam(props: TSDocParamProps): Children;
|
|
114
|
+
/**
|
|
115
|
+
* Create a TSDoc `@returns` tag.
|
|
116
|
+
*/
|
|
117
|
+
declare function TSDocReturns(props: ComponentProps): Children;
|
|
118
|
+
/**
|
|
119
|
+
* Create a TSDoc `@throws` tag.
|
|
120
|
+
*/
|
|
121
|
+
declare function TSDocThrows(props: ComponentProps): Children;
|
|
122
|
+
interface TSDocModuleProps extends ComponentProps {
|
|
123
|
+
/**
|
|
124
|
+
* The prefix for the builtin module name
|
|
125
|
+
*
|
|
126
|
+
* @remarks
|
|
127
|
+
* This value is populated from the Powerlines configuration output builtin prefix by default.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* /**
|
|
132
|
+
* @module powerlines:my-module
|
|
133
|
+
* \/
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
prefix?: string;
|
|
137
|
+
/**
|
|
138
|
+
* The name of the module
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```ts
|
|
145
|
+
* import { MyModule } from "powerlines:my-module";
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
name: Children;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Generates a TSDoc `@module` tag for the given module name.
|
|
152
|
+
*/
|
|
153
|
+
declare function TSDocModule(props: TSDocModuleProps): Children;
|
|
154
|
+
declare type __ΩTSDocProps = any[];
|
|
155
|
+
declare type __ΩTSDocTagProps = any[];
|
|
156
|
+
declare type __ΩTSDocParamsProps = any[];
|
|
157
|
+
declare type __ΩTSDocDefaultValueProps = any[];
|
|
158
|
+
declare type __ΩTSDocExampleProps = any[];
|
|
159
|
+
declare type __ΩTSDocAttributesTagsProps = any[];
|
|
160
|
+
declare type __ΩTSDocParamProps = any[];
|
|
161
|
+
declare type __ΩTSDocModuleProps = any[];
|
|
162
|
+
//#endregion
|
|
163
|
+
export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps };
|
|
164
|
+
//# sourceMappingURL=tsdoc.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAyCiB,UAAA,SAAmB,cAAA;EAClC,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA2BtB,aAAA,SAAsB,cAAA;EACrC,GAAA;AAAA;;AA5BF;;iBAkCgB,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAAA,EAAY,mBAAA;AAAA;;;;iBAME,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;iBA2BnC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AAlDhD;;;AAAA,iBA+DgB,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAajC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;;AA5DhD;;iBAyEgB,eAAA,CAAgB,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAUpC,sBAAA,SAA+B,cAAA;EAC9C,IAAA,EAAM,cAAA,GAAiB,kBAAA,GAAqB,mBAAA;EAC5C,YAAA;AAAA;;;;iBAMc,iBAAA,CAAkB,KAAA,EAAO,sBAAA,GAAsB,QAAA;;;;iBAkB/C,YAAA,CAAa,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAalC,SAAA,CAAU,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAI9B,iBAAA,SAA0B,iBAAA;EA5FK;;;AAahD;;EAqFE,GAAA;AAAA;;;;iBAMc,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,QAAA;;AA9ErD;;iBA0GgB,aAAA,CAAA,GAAa,QAAA;;;;iBAOb,aAAA,CAAA,GAAa,QAAA;;;AApG7B;iBA2GgB,WAAA,CAAA,GAAW,QAAA;;;;iBAOX,WAAA,CAAA,GAAW,QAAA;AAAA,UAIV,wBAAA;EACf,IAAA,GAAO,cAAA,GAAiB,kBAAA,GAAqB,mBAAA;EAC7C,KAAA;EACA,KAAA;EACA,UAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA;EACA,MAAA;EACA,MAAA;EACA,YAAA;AAAA;;;;iBAMc,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,QAAA;AAAA,UA8ElD,eAAA;EACf,IAAA,EAAM,QAAA;EACN,QAAA,GAAW,QAAA;EACX,QAAA;EACA,YAAA,GAAe,QAAA;AAAA;;;;iBAMD,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;;iBAiDjC,YAAA,CAAa,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAOlC,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAIhC,gBAAA,SAAyB,cAAA;EAtPQ;;;AAalD;;;;;;;;;AAIA;EAmPE,MAAA;;;;AAvOF;;;;;;;;EAoPE,IAAA,EAAM,QAAA;AAAA;;;;iBAMQ,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;AAAA"}
|