@powerlines/plugin-alloy 0.26.125 → 0.26.127
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/contexts/index.cjs +9 -10
- package/dist/core/contexts/index.d.cts +2 -2
- package/dist/core/contexts/index.d.mts +2 -2
- package/dist/core/contexts/index.mjs +2 -2
- package/dist/core/contexts/{reflection.cjs → schema.cjs} +18 -29
- package/dist/core/contexts/schema.d.cts +48 -0
- package/dist/core/contexts/schema.d.cts.map +1 -0
- package/dist/core/contexts/schema.d.mts +48 -0
- package/dist/core/contexts/schema.d.mts.map +1 -0
- package/dist/core/contexts/schema.mjs +61 -0
- package/dist/core/contexts/schema.mjs.map +1 -0
- package/dist/core/index.cjs +9 -10
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +2 -2
- package/dist/typescript/components/index.cjs +4 -7
- package/dist/typescript/components/index.d.cts +5 -5
- package/dist/typescript/components/index.d.mts +5 -5
- package/dist/typescript/components/index.mjs +3 -3
- package/dist/typescript/components/interface-declaration.cjs +52 -52
- package/dist/typescript/components/interface-declaration.d.cts +19 -21
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
- package/dist/typescript/components/interface-declaration.d.mts +19 -21
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
- package/dist/typescript/components/interface-declaration.mjs +52 -52
- package/dist/typescript/components/interface-declaration.mjs.map +1 -1
- package/dist/typescript/components/object-declaration.cjs +40 -56
- package/dist/typescript/components/object-declaration.d.cts +6 -11
- package/dist/typescript/components/object-declaration.d.cts.map +1 -1
- package/dist/typescript/components/object-declaration.d.mts +6 -11
- package/dist/typescript/components/object-declaration.d.mts.map +1 -1
- package/dist/typescript/components/object-declaration.mjs +41 -57
- package/dist/typescript/components/object-declaration.mjs.map +1 -1
- package/dist/typescript/components/tsdoc-schema.cjs +171 -0
- package/dist/typescript/components/tsdoc-schema.d.cts +21 -0
- package/dist/typescript/components/tsdoc-schema.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc-schema.d.mts +21 -0
- package/dist/typescript/components/tsdoc-schema.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc-schema.mjs +169 -0
- package/dist/typescript/components/tsdoc-schema.mjs.map +1 -0
- package/dist/typescript/components/tsdoc.cjs +30 -19
- package/dist/typescript/components/tsdoc.d.cts +16 -12
- package/dist/typescript/components/tsdoc.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc.d.mts +16 -12
- package/dist/typescript/components/tsdoc.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc.mjs +30 -20
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/index.cjs +4 -7
- package/dist/typescript/index.d.cts +5 -5
- package/dist/typescript/index.d.mts +5 -5
- package/dist/typescript/index.mjs +3 -3
- package/package.json +12 -12
- package/dist/core/contexts/reflection.d.cts +0 -62
- package/dist/core/contexts/reflection.d.cts.map +0 -1
- package/dist/core/contexts/reflection.d.mts +0 -62
- package/dist/core/contexts/reflection.d.mts.map +0 -1
- package/dist/core/contexts/reflection.mjs +0 -71
- package/dist/core/contexts/reflection.mjs.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.cjs +0 -331
- package/dist/typescript/components/tsdoc-reflection.d.cts +0 -41
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.d.mts +0 -41
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.mjs +0 -325
- package/dist/typescript/components/tsdoc-reflection.mjs.map +0 -1
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ReflectionOverrideInterface } from "../../types/components.mjs";
|
|
2
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
3
|
-
import { ReflectionClass, ReflectionMethod, ReflectionParameter, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
|
-
|
|
5
|
-
//#region src/core/contexts/reflection.d.ts
|
|
6
|
-
interface ReflectionClassContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
7
|
-
reflection: ReflectionClass<T>;
|
|
8
|
-
override?: ReflectionOverrideInterface<T>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The reflection class context used in template rendering.
|
|
12
|
-
*/
|
|
13
|
-
declare const ReflectionClassContext: ComponentContext<ReflectionClassContextInterface<any>>;
|
|
14
|
-
/**
|
|
15
|
-
* Hook to access the Reflection context.
|
|
16
|
-
*
|
|
17
|
-
* @returns A reactive version of the current reflection.
|
|
18
|
-
*/
|
|
19
|
-
declare function useReflectionClass<T extends Record<string, any> = Record<string, any>>(): ReflectionClassContextInterface<T>;
|
|
20
|
-
interface ReflectionPropertyContextInterface {
|
|
21
|
-
property: ReflectionProperty;
|
|
22
|
-
defaultValue?: any;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The reflection property context used in template rendering.
|
|
26
|
-
*/
|
|
27
|
-
declare const ReflectionPropertyContext: ComponentContext<ReflectionPropertyContextInterface>;
|
|
28
|
-
/**
|
|
29
|
-
* Hook to access the Reflection Property context.
|
|
30
|
-
*
|
|
31
|
-
* @returns A reactive version of the current reflection.
|
|
32
|
-
*/
|
|
33
|
-
declare function useReflectionPropertyContext(): ReflectionPropertyContextInterface;
|
|
34
|
-
/**
|
|
35
|
-
* Hook to access the Reflection Property context.
|
|
36
|
-
*
|
|
37
|
-
* @returns A reactive version of the current reflection.
|
|
38
|
-
*/
|
|
39
|
-
declare function useReflectionProperty(): ReflectionPropertyContextInterface;
|
|
40
|
-
/**
|
|
41
|
-
* The reflection method context used in template rendering.
|
|
42
|
-
*/
|
|
43
|
-
declare const ReflectionMethodContext: ComponentContext<ReflectionMethod>;
|
|
44
|
-
/**
|
|
45
|
-
* Hook to access the Reflection Method context.
|
|
46
|
-
*
|
|
47
|
-
* @returns A reactive version of the current reflection.
|
|
48
|
-
*/
|
|
49
|
-
declare function useReflectionMethod(): ReflectionMethod;
|
|
50
|
-
/**
|
|
51
|
-
* The reflection parameter context used in template rendering.
|
|
52
|
-
*/
|
|
53
|
-
declare const ReflectionParameterContext: ComponentContext<ReflectionParameter>;
|
|
54
|
-
/**
|
|
55
|
-
* Hook to access the Reflection Parameter context.
|
|
56
|
-
*
|
|
57
|
-
* @returns A reactive version of the current reflection.
|
|
58
|
-
*/
|
|
59
|
-
declare function useReflectionParameter(): ReflectionParameter;
|
|
60
|
-
//#endregion
|
|
61
|
-
export { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, ReflectionPropertyContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext };
|
|
62
|
-
//# sourceMappingURL=reflection.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reflection.d.mts","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"mappings":";;;;;UA4BiB,+BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,UAAA,EAAY,eAAA,CAAgB,CAAA;EAC5B,QAAA,GAAW,2BAAA,CAA4B,CAAA;AAAA;;;;cAM5B,sBAAA,EAAwB,gBAAgB,CACnD,+BAAA;;;;;;iBAQc,kBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAAA,GAAmB,+BAAA,CAAA,CAAA;AAAA,UAepC,kCAAA;EACf,QAAA,EAAU,kBAAkB;EAC5B,YAAA;AAAA;;;;cAMW,yBAAA,EAA2B,gBAAgB,CAAC,kCAAA;;AAvCf;AAM1C;;;iBAyCgB,4BAAA,CAAA,GAA4B,kCAAA;AAxCX;AAQjC;;;;AARiC,iBA2DjB,qBAAA,CAAA,GAAqB,kCAAA;;;;cAexB,uBAAA,EAAyB,gBAAgB,CAAC,gBAAA;;;;;;iBAQvC,mBAAA,CAAA,GAAmB,gBAAA;AAzEkB;AAerD;;AAfqD,cAwFxC,0BAAA,EAA4B,gBAAgB,CAAC,mBAAA;;;;;;iBAQ1C,sBAAA,CAAA,GAAsB,mBAAA"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { createContext, createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/core/contexts/reflection.ts
|
|
4
|
-
/**
|
|
5
|
-
* The reflection class context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
const ReflectionClassContext = createContext();
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the Reflection context.
|
|
10
|
-
*
|
|
11
|
-
* @returns A reactive version of the current reflection.
|
|
12
|
-
*/
|
|
13
|
-
function useReflectionClass() {
|
|
14
|
-
const context = useContext(ReflectionClassContext);
|
|
15
|
-
if (!context) throw new Error("Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
16
|
-
return context;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The reflection property context used in template rendering.
|
|
20
|
-
*/
|
|
21
|
-
const ReflectionPropertyContext = createNamedContext("ReflectionProperty");
|
|
22
|
-
/**
|
|
23
|
-
* Hook to access the Reflection Property context.
|
|
24
|
-
*
|
|
25
|
-
* @returns A reactive version of the current reflection.
|
|
26
|
-
*/
|
|
27
|
-
function useReflectionPropertyContext() {
|
|
28
|
-
const context = useContext(ReflectionPropertyContext);
|
|
29
|
-
if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
30
|
-
return context;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Hook to access the Reflection Property context.
|
|
34
|
-
*
|
|
35
|
-
* @returns A reactive version of the current reflection.
|
|
36
|
-
*/
|
|
37
|
-
function useReflectionProperty() {
|
|
38
|
-
const context = useReflectionPropertyContext();
|
|
39
|
-
if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
40
|
-
return context;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* The reflection method context used in template rendering.
|
|
44
|
-
*/
|
|
45
|
-
const ReflectionMethodContext = createNamedContext("ReflectionMethod");
|
|
46
|
-
/**
|
|
47
|
-
* Hook to access the Reflection Method context.
|
|
48
|
-
*
|
|
49
|
-
* @returns A reactive version of the current reflection.
|
|
50
|
-
*/
|
|
51
|
-
function useReflectionMethod() {
|
|
52
|
-
const context = useContext(ReflectionMethodContext);
|
|
53
|
-
if (!context) throw new Error("Powerlines - Reflection Method Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
54
|
-
return context;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* The reflection parameter context used in template rendering.
|
|
58
|
-
*/
|
|
59
|
-
const ReflectionParameterContext = createNamedContext("ReflectionParameter");
|
|
60
|
-
/**
|
|
61
|
-
* Hook to access the Reflection Parameter context.
|
|
62
|
-
*
|
|
63
|
-
* @returns A reactive version of the current reflection.
|
|
64
|
-
*/
|
|
65
|
-
function useReflectionParameter() {
|
|
66
|
-
return useContext(ReflectionParameterContext);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
//#endregion
|
|
70
|
-
export { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext };
|
|
71
|
-
//# sourceMappingURL=reflection.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reflection.mjs","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\nimport type {\n ReflectionClass,\n ReflectionMethod,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionOverrideInterface } from \"../../types/components\";\n\nexport interface ReflectionClassContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n reflection: ReflectionClass<T>;\n override?: ReflectionOverrideInterface<T>;\n}\n\n/**\n * The reflection class context used in template rendering.\n */\nexport const ReflectionClassContext: ComponentContext<\n ReflectionClassContextInterface<any>\n> = createContext<ReflectionClassContextInterface<any>>();\n\n/**\n * Hook to access the Reflection context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>() {\n const context = useContext<ReflectionClassContextInterface<T>>(\n ReflectionClassContext\n )!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return context;\n}\n\nexport interface ReflectionPropertyContextInterface {\n property: ReflectionProperty;\n defaultValue?: any;\n}\n\n/**\n * The reflection property context used in template rendering.\n */\nexport const ReflectionPropertyContext: ComponentContext<ReflectionPropertyContextInterface> =\n createNamedContext<ReflectionPropertyContextInterface>(\"ReflectionProperty\");\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionPropertyContext() {\n const context = useContext<ReflectionPropertyContextInterface>(\n ReflectionPropertyContext\n )!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return context;\n}\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionProperty() {\n const context = useReflectionPropertyContext();\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection method context used in template rendering.\n */\nexport const ReflectionMethodContext: ComponentContext<ReflectionMethod> =\n createNamedContext<ReflectionMethod>(\"ReflectionMethod\");\n\n/**\n * Hook to access the Reflection Method context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionMethod() {\n const context = useContext<ReflectionMethod>(ReflectionMethodContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Method Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const ReflectionParameterContext: ComponentContext<ReflectionParameter> =\n createNamedContext<ReflectionParameter>(\"ReflectionParameter\");\n\n/**\n * Hook to access the Reflection Parameter context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionParameter() {\n return useContext<ReflectionParameter>(ReflectionParameterContext)!;\n}\n"],"mappings":";;;;;;AAuBA,MAAE,yBAAmB,cAAA;;;;;;AAOrB,SAAE,qBAAA;CACA,MAAA,UAAY,WAAe,sBAAG;CAC9B,IAAA,CAAA,SACF,MAAA,IAAA,MAAA,qMAAA;CAEE,OAAA;AACF;;;;AAIA,MAAI,4BAAc,mBAAuC,oBAAA;;;;;;AAOzD,SAAgB,+BAAkB;CAChC,MAAE,UAAc,WAAS,yBAAyB;CAClD,IAAE,CAAA,SACF,MAAM,IAAA,MAAU,yMAA8C;CAE9D,OAAE;;;;;;;AAQJ,SAAgB,wBAAA;CAChB,MAAA,UAAA,6BAAA;eAEA,MAAO,IAAA,MAAU,yMAAmC;CAElD,OAAA;AACF;;;;AAKA,MAAa,0BAA0B,mBAAkB,kBAAA;;;;;;AAOzD,SAAE,sBAAA;CACF,MAAO,UAAS,WAAA,uBAA+B;CAC7C,IAAA,CAAK,SACH,MAAA,IAAA,MAAA,uMAAA;;AAGJ;;;;;;;;;;AAYA,SAAc,yBAAwB;CACpC,OAAA,WAAA,0BAAA;AACF"}
|
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_core_contexts_reflection = require('../../core/contexts/reflection.cjs');
|
|
4
|
-
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
5
|
-
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
6
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
8
|
-
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
9
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
10
|
-
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
11
|
-
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
12
|
-
let _stryke_type_checks = require("@stryke/type-checks");
|
|
13
|
-
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
14
|
-
|
|
15
|
-
//#region src/typescript/components/tsdoc-reflection.tsx
|
|
16
|
-
/**
|
|
17
|
-
* Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.
|
|
18
|
-
*/
|
|
19
|
-
function TSDocReflectionClass(props) {
|
|
20
|
-
const [{ children, heading, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
21
|
-
"heading",
|
|
22
|
-
"children",
|
|
23
|
-
"reflection"
|
|
24
|
-
]);
|
|
25
|
-
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
26
|
-
const title = (0, _alloy_js_core.computed)(() => reflection.getTitle() || (0, _stryke_string_format_title_case.titleCase)(reflection.getName()));
|
|
27
|
-
const computedHeading = (0, _alloy_js_core.computed)(() => heading || reflection.getDescription() || title.value);
|
|
28
|
-
const alias = (0, _alloy_js_core.computed)(() => reflection.getAlias());
|
|
29
|
-
const domain = (0, _alloy_js_core.computed)(() => reflection.getDomain());
|
|
30
|
-
const permission = (0, _alloy_js_core.computed)(() => reflection.getPermission());
|
|
31
|
-
const readonly = (0, _alloy_js_core.computed)(() => reflection.isReadonly());
|
|
32
|
-
const internal = (0, _alloy_js_core.computed)(() => reflection.isInternal());
|
|
33
|
-
const runtime = (0, _alloy_js_core.computed)(() => reflection.isRuntime());
|
|
34
|
-
const ignore = (0, _alloy_js_core.computed)(() => reflection.isIgnored());
|
|
35
|
-
const hidden = (0, _alloy_js_core.computed)(() => reflection.isHidden());
|
|
36
|
-
if (!computedHeading.value || (0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value) && computedHeading.value.trim() === "") return null;
|
|
37
|
-
const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(title.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(alias.value) && alias.value.length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(permission.value) && permission.value.length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(domain.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(readonly.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(internal.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(runtime.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(ignore.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(hidden.value));
|
|
38
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
39
|
-
get heading() {
|
|
40
|
-
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value))() ? computedHeading.value.trim() : computedHeading.value;
|
|
41
|
-
},
|
|
42
|
-
get children() {
|
|
43
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
44
|
-
get when() {
|
|
45
|
-
return hasAttributes.value;
|
|
46
|
-
},
|
|
47
|
-
get children() {
|
|
48
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
49
|
-
get title() {
|
|
50
|
-
return title.value;
|
|
51
|
-
},
|
|
52
|
-
get alias() {
|
|
53
|
-
return alias.value;
|
|
54
|
-
},
|
|
55
|
-
get domain() {
|
|
56
|
-
return domain.value;
|
|
57
|
-
},
|
|
58
|
-
get permission() {
|
|
59
|
-
return permission.value;
|
|
60
|
-
},
|
|
61
|
-
get readonly() {
|
|
62
|
-
return readonly.value;
|
|
63
|
-
},
|
|
64
|
-
get internal() {
|
|
65
|
-
return internal.value;
|
|
66
|
-
},
|
|
67
|
-
get runtime() {
|
|
68
|
-
return runtime.value;
|
|
69
|
-
},
|
|
70
|
-
get ignore() {
|
|
71
|
-
return ignore.value;
|
|
72
|
-
},
|
|
73
|
-
get hidden() {
|
|
74
|
-
return hidden.value;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
79
|
-
get when() {
|
|
80
|
-
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;
|
|
81
|
-
},
|
|
82
|
-
get children() {
|
|
83
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
84
|
-
get when() {
|
|
85
|
-
return hasAttributes.value;
|
|
86
|
-
},
|
|
87
|
-
get children() {
|
|
88
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
89
|
-
}
|
|
90
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
91
|
-
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
92
|
-
} })];
|
|
93
|
-
}
|
|
94
|
-
})];
|
|
95
|
-
}
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
|
|
100
|
-
*/
|
|
101
|
-
function TSDocContextClass(props) {
|
|
102
|
-
const reflectionClass = require_core_contexts_reflection.useReflectionClass();
|
|
103
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
104
|
-
get when() {
|
|
105
|
-
return (0, _stryke_type_checks.isSetObject)(reflectionClass.reflection);
|
|
106
|
-
},
|
|
107
|
-
get children() {
|
|
108
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionClass, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { get reflection() {
|
|
109
|
-
return reflectionClass.reflection;
|
|
110
|
-
} }));
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.
|
|
116
|
-
*/
|
|
117
|
-
function TSDocReflectionProperty(props) {
|
|
118
|
-
const [{ children, reflection, defaultValue }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
119
|
-
"children",
|
|
120
|
-
"reflection",
|
|
121
|
-
"defaultValue"
|
|
122
|
-
]);
|
|
123
|
-
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
124
|
-
const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getTitle()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getAlias()) && reflection.getAlias().length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getPermission()) && reflection.getPermission().length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getDomain()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isReadonly()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isInternal()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isRuntime()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isIgnored()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isHidden()) || reflection.hasDefault() && !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getDefaultValue()));
|
|
125
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
126
|
-
return reflection.getDescription();
|
|
127
|
-
} }, rest, { get children() {
|
|
128
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
129
|
-
get when() {
|
|
130
|
-
return hasAttributes.value;
|
|
131
|
-
},
|
|
132
|
-
get children() {
|
|
133
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
134
|
-
type: reflection,
|
|
135
|
-
get title() {
|
|
136
|
-
return reflection.getTitle();
|
|
137
|
-
},
|
|
138
|
-
get alias() {
|
|
139
|
-
return reflection.getAlias();
|
|
140
|
-
},
|
|
141
|
-
get domain() {
|
|
142
|
-
return reflection.getDomain();
|
|
143
|
-
},
|
|
144
|
-
get permission() {
|
|
145
|
-
return reflection.getPermission();
|
|
146
|
-
},
|
|
147
|
-
get readonly() {
|
|
148
|
-
return reflection.isReadonly();
|
|
149
|
-
},
|
|
150
|
-
get internal() {
|
|
151
|
-
return reflection.isInternal();
|
|
152
|
-
},
|
|
153
|
-
get runtime() {
|
|
154
|
-
return reflection.isRuntime();
|
|
155
|
-
},
|
|
156
|
-
get ignore() {
|
|
157
|
-
return reflection.isIgnored();
|
|
158
|
-
},
|
|
159
|
-
get hidden() {
|
|
160
|
-
return reflection.isHidden();
|
|
161
|
-
},
|
|
162
|
-
get defaultValue() {
|
|
163
|
-
return defaultValue ?? reflection.getDefaultValue();
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
168
|
-
get when() {
|
|
169
|
-
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;
|
|
170
|
-
},
|
|
171
|
-
get children() {
|
|
172
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
173
|
-
get when() {
|
|
174
|
-
return hasAttributes.value;
|
|
175
|
-
},
|
|
176
|
-
get children() {
|
|
177
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
178
|
-
}
|
|
179
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
180
|
-
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
181
|
-
} })];
|
|
182
|
-
}
|
|
183
|
-
})];
|
|
184
|
-
} }));
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
|
|
188
|
-
*/
|
|
189
|
-
function TSDocContextProperty(props) {
|
|
190
|
-
const reflection = require_core_contexts_reflection.useReflectionPropertyContext();
|
|
191
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
192
|
-
get when() {
|
|
193
|
-
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
194
|
-
},
|
|
195
|
-
get children() {
|
|
196
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionProperty, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, {
|
|
197
|
-
get reflection() {
|
|
198
|
-
return reflection.property;
|
|
199
|
-
},
|
|
200
|
-
get defaultValue() {
|
|
201
|
-
return reflection.defaultValue;
|
|
202
|
-
}
|
|
203
|
-
}));
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.
|
|
209
|
-
*/
|
|
210
|
-
function TSDocReflectionMethod(props) {
|
|
211
|
-
const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
|
|
212
|
-
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
213
|
-
const heading = (0, _alloy_js_core.computed)(() => reflection.getDescription() || ((0, _stryke_type_checks_is_string.isString)(reflection.getName()) ? _alloy_js_core.code`${String(reflection.getName())} method definition` : void 0));
|
|
214
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
215
|
-
return heading.value;
|
|
216
|
-
} }, rest, { get children() {
|
|
217
|
-
return [
|
|
218
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
219
|
-
get title() {
|
|
220
|
-
return reflection.getTitle();
|
|
221
|
-
},
|
|
222
|
-
get alias() {
|
|
223
|
-
return reflection.getAlias();
|
|
224
|
-
},
|
|
225
|
-
get domain() {
|
|
226
|
-
return reflection.getDomain();
|
|
227
|
-
},
|
|
228
|
-
get permission() {
|
|
229
|
-
return reflection.getPermission();
|
|
230
|
-
},
|
|
231
|
-
get readonly() {
|
|
232
|
-
return reflection.isReadonly();
|
|
233
|
-
},
|
|
234
|
-
get internal() {
|
|
235
|
-
return reflection.isInternal();
|
|
236
|
-
},
|
|
237
|
-
get runtime() {
|
|
238
|
-
return reflection.isRuntime();
|
|
239
|
-
},
|
|
240
|
-
get ignore() {
|
|
241
|
-
return reflection.isIgnored();
|
|
242
|
-
},
|
|
243
|
-
get hidden() {
|
|
244
|
-
return reflection.isHidden();
|
|
245
|
-
}
|
|
246
|
-
}),
|
|
247
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
248
|
-
get when() {
|
|
249
|
-
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!Boolean(children))() && (0, _alloy_js_core.childrenArray)(() => children).length > 0;
|
|
250
|
-
},
|
|
251
|
-
get children() {
|
|
252
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
253
|
-
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
254
|
-
} });
|
|
255
|
-
}
|
|
256
|
-
}),
|
|
257
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
258
|
-
get when() {
|
|
259
|
-
return reflection.getParameters().length > 0;
|
|
260
|
-
},
|
|
261
|
-
get children() {
|
|
262
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
263
|
-
get each() {
|
|
264
|
-
return reflection.getParameters();
|
|
265
|
-
},
|
|
266
|
-
hardline: true,
|
|
267
|
-
get ender() {
|
|
268
|
-
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
269
|
-
},
|
|
270
|
-
children: (param) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocParam, {
|
|
271
|
-
get name() {
|
|
272
|
-
return param.getName();
|
|
273
|
-
},
|
|
274
|
-
get optional() {
|
|
275
|
-
return param.isOptional();
|
|
276
|
-
},
|
|
277
|
-
get defaultValue() {
|
|
278
|
-
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!param.hasDefault())() ? param.getDefaultValue() : void 0;
|
|
279
|
-
},
|
|
280
|
-
get children() {
|
|
281
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
282
|
-
get when() {
|
|
283
|
-
return Boolean(param.parameter.description);
|
|
284
|
-
},
|
|
285
|
-
get fallback() {
|
|
286
|
-
return _alloy_js_core.code`A parameter to provide a ${param.getName()} value to the function.`;
|
|
287
|
-
},
|
|
288
|
-
get children() {
|
|
289
|
-
return param.parameter.description;
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
})
|
|
294
|
-
})];
|
|
295
|
-
}
|
|
296
|
-
}),
|
|
297
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
298
|
-
get when() {
|
|
299
|
-
return reflection.getReturnType().kind !== _powerlines_deepkit_vendor_type.ReflectionKind.void;
|
|
300
|
-
},
|
|
301
|
-
get children() {
|
|
302
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocReturns, { get children() {
|
|
303
|
-
return _alloy_js_core.code`The return value of the function, which is of type ${(0, _powerlines_deepkit_vendor_type.stringifyType)(reflection.getReturnType())}.`;
|
|
304
|
-
} })];
|
|
305
|
-
}
|
|
306
|
-
})
|
|
307
|
-
];
|
|
308
|
-
} }));
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.
|
|
312
|
-
*/
|
|
313
|
-
function TSDocContextMethod(props) {
|
|
314
|
-
const reflection = require_core_contexts_reflection.useReflectionMethod();
|
|
315
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
316
|
-
get when() {
|
|
317
|
-
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
318
|
-
},
|
|
319
|
-
get children() {
|
|
320
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionMethod, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
//#endregion
|
|
326
|
-
exports.TSDocContextClass = TSDocContextClass;
|
|
327
|
-
exports.TSDocContextMethod = TSDocContextMethod;
|
|
328
|
-
exports.TSDocContextProperty = TSDocContextProperty;
|
|
329
|
-
exports.TSDocReflectionClass = TSDocReflectionClass;
|
|
330
|
-
exports.TSDocReflectionMethod = TSDocReflectionMethod;
|
|
331
|
-
exports.TSDocReflectionProperty = TSDocReflectionProperty;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { TSDocProps } from "./tsdoc.cjs";
|
|
2
|
-
import { ReflectionClass, ReflectionMethod, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
3
|
-
|
|
4
|
-
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
5
|
-
interface TSDocReflectionClassProps<T extends Record<string, any> = Record<string, any>> extends TSDocProps {
|
|
6
|
-
reflection: ReflectionClass<T>;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.
|
|
10
|
-
*/
|
|
11
|
-
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>): import("@alloy-js/core").Children;
|
|
12
|
-
/**
|
|
13
|
-
* Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
|
|
14
|
-
*/
|
|
15
|
-
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): import("@alloy-js/core").Children;
|
|
16
|
-
interface TSDocReflectionPropertyProps extends TSDocProps {
|
|
17
|
-
reflection: ReflectionProperty;
|
|
18
|
-
defaultValue?: any;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.
|
|
22
|
-
*/
|
|
23
|
-
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps): import("@alloy-js/core").Children;
|
|
24
|
-
/**
|
|
25
|
-
* Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
|
|
26
|
-
*/
|
|
27
|
-
declare function TSDocContextProperty(props: TSDocProps): import("@alloy-js/core").Children;
|
|
28
|
-
interface TSDocReflectionMethodProps extends TSDocProps {
|
|
29
|
-
reflection: ReflectionMethod;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.
|
|
33
|
-
*/
|
|
34
|
-
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps): import("@alloy-js/core").Children;
|
|
35
|
-
/**
|
|
36
|
-
* Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.
|
|
37
|
-
*/
|
|
38
|
-
declare function TSDocContextMethod(props: TSDocProps): import("@alloy-js/core").Children;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps };
|
|
41
|
-
//# sourceMappingURL=tsdoc-reflection.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc-reflection.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"mappings":";;;;UAqDiB,yBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,UAAA;EACR,UAAA,EAAY,eAAA,CAAgB,CAAA;AAAA;;;;iBAMd,oBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,yBAAA,CAA0B,CAAA,6BAAE,QAAA;;;;iBAqFrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,UAAA,4BAAU,QAAA;AAAA,UAaF,4BAAA,SAAqC,UAAU;EAC9D,UAAA,EAAY,kBAAA;EACZ,YAAA;AAAA;;;;iBAMc,uBAAA,CAAwB,KAAA,EAAO,4BAA4B,4BAAA,QAAA;;AApH5C;AAM/B;iBA2KgB,oBAAA,CAAqB,KAAA,EAAO,UAAU,4BAAA,QAAA;AAAA,UAcrC,0BAAA,SAAmC,UAAU;EAC5D,UAAA,EAAY,gBAAA;AAAA;;;;iBAME,qBAAA,CAAsB,KAAA,EAAO,0BAA0B,4BAAA,QAAA;;;;iBAqEvD,kBAAA,CAAmB,KAAA,EAAO,UAAU,4BAAA,QAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { TSDocProps } from "./tsdoc.mjs";
|
|
2
|
-
import { ReflectionClass, ReflectionMethod, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
3
|
-
|
|
4
|
-
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
5
|
-
interface TSDocReflectionClassProps<T extends Record<string, any> = Record<string, any>> extends TSDocProps {
|
|
6
|
-
reflection: ReflectionClass<T>;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.
|
|
10
|
-
*/
|
|
11
|
-
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>): import("@alloy-js/core").Children;
|
|
12
|
-
/**
|
|
13
|
-
* Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
|
|
14
|
-
*/
|
|
15
|
-
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): import("@alloy-js/core").Children;
|
|
16
|
-
interface TSDocReflectionPropertyProps extends TSDocProps {
|
|
17
|
-
reflection: ReflectionProperty;
|
|
18
|
-
defaultValue?: any;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.
|
|
22
|
-
*/
|
|
23
|
-
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps): import("@alloy-js/core").Children;
|
|
24
|
-
/**
|
|
25
|
-
* Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
|
|
26
|
-
*/
|
|
27
|
-
declare function TSDocContextProperty(props: TSDocProps): import("@alloy-js/core").Children;
|
|
28
|
-
interface TSDocReflectionMethodProps extends TSDocProps {
|
|
29
|
-
reflection: ReflectionMethod;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.
|
|
33
|
-
*/
|
|
34
|
-
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps): import("@alloy-js/core").Children;
|
|
35
|
-
/**
|
|
36
|
-
* Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.
|
|
37
|
-
*/
|
|
38
|
-
declare function TSDocContextMethod(props: TSDocProps): import("@alloy-js/core").Children;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps };
|
|
41
|
-
//# sourceMappingURL=tsdoc-reflection.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc-reflection.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"mappings":";;;;UAqDiB,yBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,UAAA;EACR,UAAA,EAAY,eAAA,CAAgB,CAAA;AAAA;;;;iBAMd,oBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,yBAAA,CAA0B,CAAA,6BAAE,QAAA;;;;iBAqFrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,UAAA,4BAAU,QAAA;AAAA,UAaF,4BAAA,SAAqC,UAAU;EAC9D,UAAA,EAAY,kBAAA;EACZ,YAAA;AAAA;;;;iBAMc,uBAAA,CAAwB,KAAA,EAAO,4BAA4B,4BAAA,QAAA;;AApH5C;AAM/B;iBA2KgB,oBAAA,CAAqB,KAAA,EAAO,UAAU,4BAAA,QAAA;AAAA,UAcrC,0BAAA,SAAmC,UAAU;EAC5D,UAAA,EAAY,gBAAA;AAAA;;;;iBAME,qBAAA,CAAsB,KAAA,EAAO,0BAA0B,4BAAA,QAAA;;;;iBAqEvD,kBAAA,CAAmB,KAAA,EAAO,UAAU,4BAAA,QAAA"}
|