@powerlines/plugin-alloy 0.21.1 → 0.21.3

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.
Files changed (62) hide show
  1. package/dist/core/components/output.d.cts +2 -2
  2. package/dist/core/components/output.d.cts.map +1 -1
  3. package/dist/core/components/single-line-comment.d.mts +2 -2
  4. package/dist/core/components/source-file.d.cts +2 -2
  5. package/dist/core/components/source-file.d.mts +2 -2
  6. package/dist/core/contexts/reflection.d.cts.map +1 -1
  7. package/dist/markdown/components/front-matter.d.cts +2 -2
  8. package/dist/markdown/components/front-matter.d.cts.map +1 -1
  9. package/dist/markdown/components/front-matter.d.mts +2 -2
  10. package/dist/markdown/components/markdown-file.d.cts +3 -3
  11. package/dist/markdown/components/markdown-file.d.cts.map +1 -1
  12. package/dist/markdown/components/markdown-table.d.cts +4 -4
  13. package/dist/markdown/components/markdown-table.d.cts.map +1 -1
  14. package/dist/markdown/contexts/markdown-table.d.cts.map +1 -1
  15. package/dist/typescript/components/builtin-file.d.cts +2 -2
  16. package/dist/typescript/components/builtin-file.d.mts +2 -2
  17. package/dist/typescript/components/class-declaration.cjs +16 -15
  18. package/dist/typescript/components/class-declaration.d.cts +2 -3
  19. package/dist/typescript/components/class-declaration.d.cts.map +1 -1
  20. package/dist/typescript/components/class-declaration.d.mts +2 -3
  21. package/dist/typescript/components/class-declaration.d.mts.map +1 -1
  22. package/dist/typescript/components/class-declaration.mjs +17 -16
  23. package/dist/typescript/components/class-declaration.mjs.map +1 -1
  24. package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
  25. package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -1
  26. package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
  27. package/dist/typescript/components/entry-file.d.cts +2 -2
  28. package/dist/typescript/components/entry-file.d.cts.map +1 -1
  29. package/dist/typescript/components/entry-file.d.mts +2 -2
  30. package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
  31. package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
  32. package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
  33. package/dist/typescript/components/tsdoc.d.cts.map +1 -1
  34. package/dist/typescript/components/type-parameters.cjs +42 -67
  35. package/dist/typescript/components/type-parameters.d.cts +1 -2
  36. package/dist/typescript/components/type-parameters.d.cts.map +1 -1
  37. package/dist/typescript/components/type-parameters.d.mts +1 -2
  38. package/dist/typescript/components/type-parameters.d.mts.map +1 -1
  39. package/dist/typescript/components/type-parameters.mjs +44 -69
  40. package/dist/typescript/components/type-parameters.mjs.map +1 -1
  41. package/dist/typescript/components/typescript-interface.d.cts +3 -3
  42. package/dist/typescript/components/typescript-interface.d.cts.map +1 -1
  43. package/dist/typescript/components/typescript-interface.d.mts +3 -3
  44. package/dist/typescript/components/typescript-interface.d.mts.map +1 -1
  45. package/dist/typescript/components/typescript-object.d.cts +3 -3
  46. package/dist/typescript/components/typescript-object.d.mts +3 -3
  47. package/dist/typescript/components/typescript-property-name.d.cts +2 -2
  48. package/dist/typescript/components/typescript-property-name.d.mts +2 -2
  49. package/dist/typescript/components/typescript-property-name.d.mts.map +1 -1
  50. package/dist/typescript/contexts/lexical-scope.d.cts +2 -2
  51. package/dist/typescript/contexts/lexical-scope.d.mts +2 -2
  52. package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -1
  53. package/dist/typescript/contexts/member-scope.cjs +23 -0
  54. package/dist/typescript/contexts/member-scope.d.cts +20 -0
  55. package/dist/typescript/contexts/member-scope.d.cts.map +1 -0
  56. package/dist/typescript/contexts/member-scope.d.mts +20 -0
  57. package/dist/typescript/contexts/member-scope.d.mts.map +1 -0
  58. package/dist/typescript/contexts/member-scope.mjs +23 -0
  59. package/dist/typescript/contexts/member-scope.mjs.map +1 -0
  60. package/dist/typescript/index.cjs +4 -4
  61. package/dist/typescript/index.mjs +4 -4
  62. package/package.json +24 -10
@@ -5,39 +5,46 @@ let __alloy_js_typescript = require("@alloy-js/typescript");
5
5
 
6
6
  //#region src/typescript/components/type-parameters.tsx
7
7
  /** Props for type parameters */
8
- const typeParametersTag = Symbol("type-parameters");
9
8
  function typeParameter(param) {
10
- return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("group", { get children() {
11
- return [
12
- (0, __alloy_js_core_jsx_runtime.memo)(() => param.symbol.name),
13
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
14
- get when() {
15
- return !!param.extends;
16
- },
17
- get children() {
18
- return [
19
- " ",
20
- "extends",
21
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("indent", { get children() {
22
- return [" ", (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeRefContext, { get children() {
23
- return param.extends;
9
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
10
+ when: typeof param === "object",
11
+ get fallback() {
12
+ return [param];
13
+ },
14
+ get children() {
15
+ return [(0, __alloy_js_core_jsx_runtime.createIntrinsic)("group", { get children() {
16
+ return [
17
+ (0, __alloy_js_core_jsx_runtime.memo)(() => param.name),
18
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
19
+ get when() {
20
+ return !!param.extends;
21
+ },
22
+ get children() {
23
+ return [
24
+ " ",
25
+ "extends",
26
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("indent", { get children() {
27
+ return [" ", (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeRefContext, { get children() {
28
+ return param.extends;
29
+ } })];
30
+ } })
31
+ ];
32
+ }
33
+ }),
34
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
35
+ get when() {
36
+ return !!param.default;
37
+ },
38
+ get children() {
39
+ return [" = ", (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeRefContext, { get children() {
40
+ return param.default;
24
41
  } })];
25
- } })
26
- ];
27
- }
28
- }),
29
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
30
- get when() {
31
- return !!param.default;
32
- },
33
- get children() {
34
- return [" = ", (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeRefContext, { get children() {
35
- return param.default;
36
- } })];
37
- }
38
- })
39
- ];
40
- } });
42
+ }
43
+ })
44
+ ];
45
+ } }), " "];
46
+ }
47
+ });
41
48
  }
42
49
  /**
43
50
  * Represent type parameters
@@ -47,13 +54,9 @@ function typeParameter(param) {
47
54
  * <A, B extends string>
48
55
  * ```
49
56
  */
50
- const TypeParameters = (0, __alloy_js_core.taggedComponent)(typeParametersTag, function TypeParameters$1(props) {
57
+ function TypeParameters(props) {
51
58
  if (props.children) return props.children;
52
59
  if (!props.parameters) return;
53
- const typeParameters = normalizeAndDeclareParameters(props.parameters);
54
- (0, __alloy_js_core.onCleanup)(() => {
55
- for (const param of typeParameters) param.symbol.delete();
56
- });
57
60
  return [
58
61
  "<",
59
62
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("group", { get children() {
@@ -61,7 +64,9 @@ const TypeParameters = (0, __alloy_js_core.taggedComponent)(typeParametersTag, f
61
64
  softline: true,
62
65
  get children() {
63
66
  return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
64
- each: typeParameters,
67
+ get each() {
68
+ return props.parameters;
69
+ },
65
70
  comma: true,
66
71
  line: true,
67
72
  children: (param) => typeParameter(param)
@@ -71,36 +76,6 @@ const TypeParameters = (0, __alloy_js_core.taggedComponent)(typeParametersTag, f
71
76
  } }),
72
77
  ">"
73
78
  ];
74
- });
75
- function normalizeAndDeclareParameters(parameters, flags = __alloy_js_typescript.TSSymbolFlags.ParameterSymbol) {
76
- const namePolicy = (0, __alloy_js_typescript.useTSNamePolicy)();
77
- if (parameters.length === 0) return [];
78
- if (typeof parameters[0] === "string") return parameters.map((paramName) => {
79
- const name = namePolicy.getName(paramName, "parameter");
80
- const TypeSlot = (0, __alloy_js_core.createSymbolSlot)();
81
- const symbol = (0, __alloy_js_typescript.createValueSymbol)(name, { type: TypeSlot.firstSymbol });
82
- return {
83
- refkeys: symbol.refkeys,
84
- symbol,
85
- TypeSlot
86
- };
87
- });
88
- else return parameters.map((param) => {
89
- const nullishFlag = param.nullish ?? param.optional ? __alloy_js_typescript.TSSymbolFlags.Nullish : __alloy_js_typescript.TSSymbolFlags.None;
90
- const TypeSlot = (0, __alloy_js_core.createSymbolSlot)();
91
- const symbol = (0, __alloy_js_typescript.createValueSymbol)(param.name, {
92
- refkeys: param.refkey,
93
- tsFlags: flags | nullishFlag,
94
- metadata: param.metadata,
95
- type: TypeSlot.firstSymbol,
96
- namePolicy: namePolicy.for("parameter")
97
- });
98
- return {
99
- ...param,
100
- symbol,
101
- TypeSlot
102
- };
103
- });
104
79
  }
105
80
 
106
81
  //#endregion
@@ -1,4 +1,3 @@
1
- import * as _alloy_js_core4 from "@alloy-js/core";
2
1
  import { Children } from "@alloy-js/core";
3
2
  import { TypeParameterDescriptor } from "@alloy-js/typescript";
4
3
 
@@ -18,7 +17,7 @@ interface TypeParametersProps {
18
17
  * <A, B extends string>
19
18
  * ```
20
19
  */
21
- declare const TypeParameters: _alloy_js_core4.Component<TypeParametersProps> & Required<Pick<_alloy_js_core4.Component<TypeParametersProps>, "tag">>;
20
+ declare function TypeParameters(props: TypeParametersProps): Children;
22
21
  declare type __ΩTypeParametersProps = any[];
23
22
  //#endregion
24
23
  export { TypeParameters, TypeParametersProps, __ΩTypeParametersProps };
@@ -1 +1 @@
1
- {"version":3,"file":"type-parameters.d.cts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":[],"mappings":";;;;;;UAwCiB,mBAAA;;EAAA,UAAA,CAAA,EAEF,uBAAA,EAAA,GAAA,MAAA,EAAA;EA0DF;EAAc,QAAA,CAAA,EAxDd,QAwDc;;;;;;;;;;cAAd,gBAAc,eAAA,CAAA,UAAA,uBAAA,SAAA,KAAA,eAAA,CAAA,UAAA"}
1
+ {"version":3,"file":"type-parameters.d.cts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":[],"mappings":";;;;;UAsBiB,mBAAA;EAAA;EAyCD,UAAA,CAAA,EAvCD,uBAuCuB,EAAA,GAAA,MAAA,EAAA;;aArCzB;;;;;;;;;;iBAqCG,cAAA,QAAsB,sBAAmB"}
@@ -1,4 +1,3 @@
1
- import * as _alloy_js_core14 from "@alloy-js/core";
2
1
  import { Children } from "@alloy-js/core";
3
2
  import { TypeParameterDescriptor } from "@alloy-js/typescript";
4
3
 
@@ -18,7 +17,7 @@ interface TypeParametersProps {
18
17
  * <A, B extends string>
19
18
  * ```
20
19
  */
21
- declare const TypeParameters: _alloy_js_core14.Component<TypeParametersProps> & Required<Pick<_alloy_js_core14.Component<TypeParametersProps>, "tag">>;
20
+ declare function TypeParameters(props: TypeParametersProps): Children;
22
21
  declare type __ΩTypeParametersProps = any[];
23
22
  //#endregion
24
23
  export { TypeParameters, TypeParametersProps, __ΩTypeParametersProps };
@@ -1 +1 @@
1
- {"version":3,"file":"type-parameters.d.mts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":[],"mappings":";;;;;;UAwCiB,mBAAA;;EAAA,UAAA,CAAA,EAEF,uBAAA,EAAA,GAAA,MAAA,EAAA;EA0DF;EAAc,QAAA,CAAA,EAxDd,QAwDc;;;;;;;;;;cAAd,gBAAc,gBAAA,CAAA,UAAA,uBAAA,SAAA,KAAA,gBAAA,CAAA,UAAA"}
1
+ {"version":3,"file":"type-parameters.d.mts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":[],"mappings":";;;;;UAsBiB,mBAAA;EAAA;EAyCD,UAAA,CAAA,EAvCD,uBAuCuB,EAAA,GAAA,MAAA,EAAA;;aArCzB;;;;;;;;;;iBAqCG,cAAA,QAAsB,sBAAmB"}
@@ -1,42 +1,49 @@
1
1
  import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
2
- import { For, Indent, Show, createSymbolSlot, onCleanup, taggedComponent } from "@alloy-js/core";
3
- import { TSSymbolFlags, TypeRefContext, createValueSymbol, useTSNamePolicy } from "@alloy-js/typescript";
2
+ import { For, Indent, Show } from "@alloy-js/core";
3
+ import { TypeRefContext } from "@alloy-js/typescript";
4
4
 
5
5
  //#region src/typescript/components/type-parameters.tsx
6
6
  /** Props for type parameters */
7
- const typeParametersTag = Symbol("type-parameters");
8
7
  function typeParameter(param) {
9
- return createIntrinsic("group", { get children() {
10
- return [
11
- memo(() => param.symbol.name),
12
- createComponent(Show, {
13
- get when() {
14
- return !!param.extends;
15
- },
16
- get children() {
17
- return [
18
- " ",
19
- "extends",
20
- createIntrinsic("indent", { get children() {
21
- return [" ", createComponent(TypeRefContext, { get children() {
22
- return param.extends;
8
+ return createComponent(Show, {
9
+ when: typeof param === "object",
10
+ get fallback() {
11
+ return [param];
12
+ },
13
+ get children() {
14
+ return [createIntrinsic("group", { get children() {
15
+ return [
16
+ memo(() => param.name),
17
+ createComponent(Show, {
18
+ get when() {
19
+ return !!param.extends;
20
+ },
21
+ get children() {
22
+ return [
23
+ " ",
24
+ "extends",
25
+ createIntrinsic("indent", { get children() {
26
+ return [" ", createComponent(TypeRefContext, { get children() {
27
+ return param.extends;
28
+ } })];
29
+ } })
30
+ ];
31
+ }
32
+ }),
33
+ createComponent(Show, {
34
+ get when() {
35
+ return !!param.default;
36
+ },
37
+ get children() {
38
+ return [" = ", createComponent(TypeRefContext, { get children() {
39
+ return param.default;
23
40
  } })];
24
- } })
25
- ];
26
- }
27
- }),
28
- createComponent(Show, {
29
- get when() {
30
- return !!param.default;
31
- },
32
- get children() {
33
- return [" = ", createComponent(TypeRefContext, { get children() {
34
- return param.default;
35
- } })];
36
- }
37
- })
38
- ];
39
- } });
41
+ }
42
+ })
43
+ ];
44
+ } }), " "];
45
+ }
46
+ });
40
47
  }
41
48
  /**
42
49
  * Represent type parameters
@@ -46,13 +53,9 @@ function typeParameter(param) {
46
53
  * <A, B extends string>
47
54
  * ```
48
55
  */
49
- const TypeParameters = taggedComponent(typeParametersTag, function TypeParameters$1(props) {
56
+ function TypeParameters(props) {
50
57
  if (props.children) return props.children;
51
58
  if (!props.parameters) return;
52
- const typeParameters = normalizeAndDeclareParameters(props.parameters);
53
- onCleanup(() => {
54
- for (const param of typeParameters) param.symbol.delete();
55
- });
56
59
  return [
57
60
  "<",
58
61
  createIntrinsic("group", { get children() {
@@ -60,7 +63,9 @@ const TypeParameters = taggedComponent(typeParametersTag, function TypeParameter
60
63
  softline: true,
61
64
  get children() {
62
65
  return [createComponent(For, {
63
- each: typeParameters,
66
+ get each() {
67
+ return props.parameters;
68
+ },
64
69
  comma: true,
65
70
  line: true,
66
71
  children: (param) => typeParameter(param)
@@ -70,36 +75,6 @@ const TypeParameters = taggedComponent(typeParametersTag, function TypeParameter
70
75
  } }),
71
76
  ">"
72
77
  ];
73
- });
74
- function normalizeAndDeclareParameters(parameters, flags = TSSymbolFlags.ParameterSymbol) {
75
- const namePolicy = useTSNamePolicy();
76
- if (parameters.length === 0) return [];
77
- if (typeof parameters[0] === "string") return parameters.map((paramName) => {
78
- const name = namePolicy.getName(paramName, "parameter");
79
- const TypeSlot = createSymbolSlot();
80
- const symbol = createValueSymbol(name, { type: TypeSlot.firstSymbol });
81
- return {
82
- refkeys: symbol.refkeys,
83
- symbol,
84
- TypeSlot
85
- };
86
- });
87
- else return parameters.map((param) => {
88
- const nullishFlag = param.nullish ?? param.optional ? TSSymbolFlags.Nullish : TSSymbolFlags.None;
89
- const TypeSlot = createSymbolSlot();
90
- const symbol = createValueSymbol(param.name, {
91
- refkeys: param.refkey,
92
- tsFlags: flags | nullishFlag,
93
- metadata: param.metadata,
94
- type: TypeSlot.firstSymbol,
95
- namePolicy: namePolicy.for("parameter")
96
- });
97
- return {
98
- ...param,
99
- symbol,
100
- TypeSlot
101
- };
102
- });
103
78
  }
104
79
 
105
80
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"type-parameters.mjs","names":["createSymbolSlot","For","Indent","onCleanup","Show","taggedComponent","createValueSymbol","TSSymbolFlags","TypeRefContext","useTSNamePolicy","typeParametersTag","Symbol","typeParameter","param","_$createIntrinsic","children","_$memo","symbol","name","_$createComponent","when","extends","default","TypeParameters","props","parameters","undefined","typeParameters","normalizeAndDeclareParameters","delete","softline","each","comma","line","flags","ParameterSymbol","namePolicy","length","map","paramName","getName","TypeSlot","type","firstSymbol","refkeys","nullishFlag","nullish","optional","Nullish","None","refkey","tsFlags","metadata","for"],"sources":["../../../src/typescript/components/type-parameters.tsx"],"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 {\n Children,\n createSymbolSlot,\n For,\n Indent,\n onCleanup,\n Show,\n SymbolSlot,\n taggedComponent\n} from \"@alloy-js/core\";\nimport {\n createValueSymbol,\n FunctionTypeParameterDescriptor,\n ParameterDescriptor,\n TSOutputSymbol,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\ninterface DeclaredTypeParameterDescriptor extends Omit<\n TypeParameterDescriptor,\n \"name\"\n> {\n symbol: TSOutputSymbol;\n}\n\ninterface DeclaredParameterDescriptor extends Omit<\n ParameterDescriptor,\n \"name\"\n> {\n symbol: TSOutputSymbol;\n TypeSlot: SymbolSlot;\n}\n\ninterface DeclaredFunctionTypeParameterDescriptor extends Omit<\n FunctionTypeParameterDescriptor,\n \"name\"\n> {\n symbol: TSOutputSymbol;\n TypeSlot: SymbolSlot;\n}\n\nconst typeParametersTag = Symbol(\"type-parameters\");\n\nfunction typeParameter(param: DeclaredTypeParameterDescriptor) {\n return (\n <group>\n {param.symbol.name}\n <Show when={!!param.extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>{param.extends}</TypeRefContext>\n </indent>\n </Show>\n <Show when={!!param.default}>\n {\" = \"}\n <TypeRefContext>{param.default}</TypeRefContext>\n </Show>\n </group>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport const TypeParameters = taggedComponent(\n typeParametersTag,\n function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n const typeParameters = normalizeAndDeclareParameters(props.parameters);\n\n onCleanup(() => {\n for (const param of typeParameters) {\n param.symbol.delete();\n }\n });\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={typeParameters} comma line>\n {param => typeParameter(param as DeclaredTypeParameterDescriptor)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n }\n);\n\nfunction normalizeAndDeclareParameters(\n parameters: FunctionTypeParameterDescriptor[] | string[],\n flags?: TSSymbolFlags\n): DeclaredTypeParameterDescriptor[];\nfunction normalizeAndDeclareParameters(\n parameters: TypeParameterDescriptor[] | string[],\n flags?: TSSymbolFlags\n): DeclaredFunctionTypeParameterDescriptor[];\nfunction normalizeAndDeclareParameters(\n parameters: ParameterDescriptor[] | string[],\n flags?: TSSymbolFlags\n): DeclaredParameterDescriptor[];\nfunction normalizeAndDeclareParameters(\n parameters: string[],\n flags?: TSSymbolFlags\n): DeclaredParameterDescriptor[] | DeclaredTypeParameterDescriptor[];\nfunction normalizeAndDeclareParameters(\n parameters:\n | ParameterDescriptor[]\n | FunctionTypeParameterDescriptor[]\n | TypeParameterDescriptor[]\n | string[],\n flags: TSSymbolFlags = TSSymbolFlags.ParameterSymbol\n): DeclaredParameterDescriptor[] | DeclaredTypeParameterDescriptor[] {\n const namePolicy = useTSNamePolicy();\n if (parameters.length === 0) {\n return [];\n }\n if (typeof parameters[0] === \"string\") {\n return (parameters as string[]).map(paramName => {\n const name = namePolicy.getName(paramName, \"parameter\");\n const TypeSlot = createSymbolSlot();\n const symbol = createValueSymbol(name, { type: TypeSlot.firstSymbol });\n\n return { refkeys: symbol.refkeys, symbol, TypeSlot };\n });\n } else {\n return (parameters as ParameterDescriptor[]).map(param => {\n const nullishFlag =\n (param.nullish ?? param.optional)\n ? TSSymbolFlags.Nullish\n : TSSymbolFlags.None;\n const TypeSlot = createSymbolSlot();\n const symbol = createValueSymbol(param.name, {\n refkeys: param.refkey,\n tsFlags: flags | nullishFlag,\n metadata: param.metadata,\n type: TypeSlot.firstSymbol,\n namePolicy: namePolicy.for(\"parameter\")\n });\n\n return {\n ...param,\n symbol,\n TypeSlot\n };\n });\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"type-parameters.mjs","names":["For","Indent","Show","TypeRefContext","typeParameter","param","_$createComponent","when","fallback","children","_$createIntrinsic","_$memo","name","extends","default","TypeParameters","props","parameters","undefined","softline","each","comma","line"],"sources":["../../../src/typescript/components/type-parameters.tsx"],"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 { Children, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":";;;;;;SA+B6D,cAAA,OAAA;8BAAA;EAAA,MAAA,OAAA,UAAA;EAAA,IAAA,WAAA;AAAA,UAAA,CAAA,MAAA;;EAAA,IAAA,WAAA;AAAA,UAAA,CAAA,gBAAA,SAAA,EAAA,IAAA,WAAA;AAAA,WAAA;KAAA,WAAA,MAEbM,KAAAA;KAAAA,sBACnC;MAAA,IAAA,OAAA;AAAA,cAAA,CAAA,CAAA,MAAA;;MAAA,IAAA,WAAA;AAAA,cAAA;;QAAA;QAAA,gBAAA,UAAA,EAAA,IAAA,WAAA;AAAA,gBAAA,MAAA,gCAAA,EAAA,IAAA,WAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKAH;EAAAA,gBAAAA,SAAAA,EAAAA,IAAAA,WAAAA;AAAAA,UAAAA;;;;;;;;;;;;;;EAC4C;EAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core21 from "@alloy-js/core";
2
+ import * as _alloy_js_core4 from "@alloy-js/core";
3
3
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
4
  import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
5
5
 
@@ -14,11 +14,11 @@ interface TypescriptInterfacePropertyProps extends Omit<InterfaceMemberProps, "n
14
14
  /**
15
15
  * Generates a TypeScript interface for the given reflection class.
16
16
  */
17
- declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core21.Children;
17
+ declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core4.Children;
18
18
  /**
19
19
  * Generates a TypeScript interface property for the given reflection class.
20
20
  */
21
- declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core21.Children;
21
+ declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core4.Children;
22
22
  declare type __ΩTypeScriptInterfaceProps = any[];
23
23
  declare type __ΩTypescriptInterfacePropertyProps = any[];
24
24
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"typescript-interface.d.cts","names":[],"sources":["../../../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,gBAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,gBAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"typescript-interface.d.cts","names":[],"sources":["../../../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,eAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,eAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.mjs";
2
- import * as _alloy_js_core7 from "@alloy-js/core";
2
+ import * as _alloy_js_core13 from "@alloy-js/core";
3
3
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
4
  import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
5
5
 
@@ -14,11 +14,11 @@ interface TypescriptInterfacePropertyProps extends Omit<InterfaceMemberProps, "n
14
14
  /**
15
15
  * Generates a TypeScript interface for the given reflection class.
16
16
  */
17
- declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core7.Children;
17
+ declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core13.Children;
18
18
  /**
19
19
  * Generates a TypeScript interface property for the given reflection class.
20
20
  */
21
- declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core7.Children;
21
+ declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core13.Children;
22
22
  declare type __ΩTypeScriptInterfaceProps = any[];
23
23
  declare type __ΩTypescriptInterfacePropertyProps = any[];
24
24
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"typescript-interface.d.mts","names":[],"sources":["../../../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,eAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,eAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"typescript-interface.d.mts","names":[],"sources":["../../../src/typescript/components/typescript-interface.tsx"],"sourcesContent":[],"mappings":";;;;;;UA0CiB,mCACL,sBAAsB,6BAExB,2BAA2B;cACvB,gBAAgB;iBACb,QAAQ;AALzB;AACY,UAOK,gCAAA,SACP,IARE,CAQG,oBARH,EAAA,MAAA,CAAA,EAQkC,cARlC,CAAA;EAAsB,QAAA,EAStB,kBATsB;;;;;AAExB,iBAaM,mBAbN,CAAA,UAcE,MAdF,CAAA,MAAA,EAAA,GAAA,CAAA,GAcwB,MAdxB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAeD,wBAfC,CAewB,CAfxB,CAAA,CAAA,EAeuB,gBAAA,CAAG,QAf1B;;;AAKV;AACe,iBAmDC,2BAAA,CAnDD,KAAA,EAoDN,gCApDM,CAAA,EAoD0B,gBAAA,CAAA,QApD1B;AACH,2CAAA,GAAA,EAAA;AADF,mDAAA,GAAA,EAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core18 from "@alloy-js/core";
2
+ import * as _alloy_js_core14 from "@alloy-js/core";
3
3
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
4
  import { VarDeclarationProps } from "@alloy-js/typescript";
5
5
 
@@ -17,11 +17,11 @@ interface TypescriptObjectPropertyProps extends ComponentProps {
17
17
  /**
18
18
  * Generates a TypeScript object for the given reflection class.
19
19
  */
20
- declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>): _alloy_js_core18.Children;
20
+ declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>): _alloy_js_core14.Children;
21
21
  /**
22
22
  * Generates a TypeScript object property for the given reflection class.
23
23
  */
24
- declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps): _alloy_js_core18.Children;
24
+ declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps): _alloy_js_core14.Children;
25
25
  declare type __ΩComputedRef = any[];
26
26
  declare type __ΩTypescriptObjectProps = any[];
27
27
  declare type __ΩTypescriptObjectPropertyProps = any[];
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.mjs";
2
- import * as _alloy_js_core19 from "@alloy-js/core";
2
+ import * as _alloy_js_core11 from "@alloy-js/core";
3
3
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
4
  import { VarDeclarationProps } from "@alloy-js/typescript";
5
5
 
@@ -17,11 +17,11 @@ interface TypescriptObjectPropertyProps extends ComponentProps {
17
17
  /**
18
18
  * Generates a TypeScript object for the given reflection class.
19
19
  */
20
- declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>): _alloy_js_core19.Children;
20
+ declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>): _alloy_js_core11.Children;
21
21
  /**
22
22
  * Generates a TypeScript object property for the given reflection class.
23
23
  */
24
- declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps): _alloy_js_core19.Children;
24
+ declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps): _alloy_js_core11.Children;
25
25
  declare type __ΩComputedRef = any[];
26
26
  declare type __ΩTypescriptObjectProps = any[];
27
27
  declare type __ΩTypescriptObjectPropertyProps = any[];
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core20 from "@alloy-js/core";
1
+ import * as _alloy_js_core13 from "@alloy-js/core";
2
2
 
3
3
  //#region src/typescript/components/typescript-property-name.d.ts
4
4
  interface TypescriptPropertyNameProps {
@@ -17,7 +17,7 @@ interface TypescriptPropertyNameProps {
17
17
  * @remarks
18
18
  * If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.
19
19
  */
20
- declare function TypescriptPropertyName(props: TypescriptPropertyNameProps): _alloy_js_core20.Children;
20
+ declare function TypescriptPropertyName(props: TypescriptPropertyNameProps): _alloy_js_core13.Children;
21
21
  declare type __ΩTypescriptPropertyNameProps = any[];
22
22
  //#endregion
23
23
  export { TypescriptPropertyName, TypescriptPropertyNameProps, __ΩTypescriptPropertyNameProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core16 from "@alloy-js/core";
1
+ import * as _alloy_js_core9 from "@alloy-js/core";
2
2
 
3
3
  //#region src/typescript/components/typescript-property-name.d.ts
4
4
  interface TypescriptPropertyNameProps {
@@ -17,7 +17,7 @@ interface TypescriptPropertyNameProps {
17
17
  * @remarks
18
18
  * If the name is not a valid JavaScript identifier, it will be quoted. If a `name` prop is provided, it will be used as the property name. Otherwise, the name will be taken from the {@link (MemberDeclarationContext:variable)}.
19
19
  */
20
- declare function TypescriptPropertyName(props: TypescriptPropertyNameProps): _alloy_js_core16.Children;
20
+ declare function TypescriptPropertyName(props: TypescriptPropertyNameProps): _alloy_js_core9.Children;
21
21
  declare type __ΩTypescriptPropertyNameProps = any[];
22
22
  //#endregion
23
23
  export { TypescriptPropertyName, TypescriptPropertyNameProps, __ΩTypescriptPropertyNameProps };
@@ -1 +1 @@
1
- {"version":3,"file":"typescript-property-name.d.mts","names":[],"sources":["../../../src/typescript/components/typescript-property-name.tsx"],"sourcesContent":[],"mappings":";;;UAuBiB,2BAAA;;;AAAjB;EAkBgB,IAAA,CAAA,EAAA,MAAA;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,gBAAA,CAAA"}
1
+ {"version":3,"file":"typescript-property-name.d.mts","names":[],"sources":["../../../src/typescript/components/typescript-property-name.tsx"],"sourcesContent":[],"mappings":";;;UAuBiB,2BAAA;;;AAAjB;EAkBgB,IAAA,CAAA,EAAA,MAAA;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,eAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core17 from "@alloy-js/core";
1
+ import * as _alloy_js_core16 from "@alloy-js/core";
2
2
  import { ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
3
3
 
4
4
  //#region src/typescript/contexts/lexical-scope.d.ts
@@ -8,7 +8,7 @@ type LexicalScopeProps = LexicalScopePropsWithScopeValue | LexicalScopePropsWith
8
8
  /**
9
9
  * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
10
10
  */
11
- declare function LexicalScope(props: LexicalScopeProps): _alloy_js_core17.Children;
11
+ declare function LexicalScope(props: LexicalScopeProps): _alloy_js_core16.Children;
12
12
  declare type __ΩLexicalScopePropsWithScopeValue = any[];
13
13
  declare type __ΩLexicalScopePropsWithScopeInfo = any[];
14
14
  declare type __ΩLexicalScopeProps = any[];
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core13 from "@alloy-js/core";
1
+ import * as _alloy_js_core8 from "@alloy-js/core";
2
2
  import { ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
3
3
 
4
4
  //#region src/typescript/contexts/lexical-scope.d.ts
@@ -8,7 +8,7 @@ type LexicalScopeProps = LexicalScopePropsWithScopeValue | LexicalScopePropsWith
8
8
  /**
9
9
  * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
10
10
  */
11
- declare function LexicalScope(props: LexicalScopeProps): _alloy_js_core13.Children;
11
+ declare function LexicalScope(props: LexicalScopeProps): _alloy_js_core8.Children;
12
12
  declare type __ΩLexicalScopePropsWithScopeValue = any[];
13
13
  declare type __ΩLexicalScopePropsWithScopeInfo = any[];
14
14
  declare type __ΩLexicalScopeProps = any[];
@@ -1 +1 @@
1
- {"version":3,"file":"lexical-scope.d.mts","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,+BAAA,SAAwC;UACxC,8BAAA,SAAuC,oBADxD;AACiB,KAEL,iBAAA,GACR,+BAHoD,GAIpD,8BAJsE;AAE1E;AAOA;;iBAAgB,YAAA,QAAoB,oBAAiB,gBAAA,CAAA"}
1
+ {"version":3,"file":"lexical-scope.d.mts","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,+BAAA,SAAwC;UACxC,8BAAA,SAAuC,oBADxD;AACiB,KAEL,iBAAA,GACR,+BAHoD,GAIpD,8BAJsE;AAE1E;AAOA;;iBAAgB,YAAA,QAAoB,oBAAiB,eAAA,CAAA"}
@@ -0,0 +1,23 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
+ let __alloy_js_core = require("@alloy-js/core");
4
+ let __alloy_js_typescript = require("@alloy-js/typescript");
5
+
6
+ //#region src/typescript/contexts/member-scope.tsx
7
+ /**
8
+ * A member scope for TypeScript. Member declarations will create symbols
9
+ * in this scope, which will be added to the owner symbol's members.
10
+ */
11
+ function MemberScope(props) {
12
+ const parentScope = (0, __alloy_js_typescript.useTSLexicalScopeIfPresent)();
13
+ const binder = props.ownerSymbol.binder ?? parentScope?.binder;
14
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.MemberScope, {
15
+ value: (0, __alloy_js_core.createScope)(__alloy_js_typescript.TSMemberScope, "member-scope", parentScope, props.ownerSymbol, { binder }),
16
+ get children() {
17
+ return props.children;
18
+ }
19
+ });
20
+ }
21
+
22
+ //#endregion
23
+ exports.MemberScope = MemberScope;
@@ -0,0 +1,20 @@
1
+ import { Children } from "@alloy-js/core";
2
+ import { TSOutputSymbol } from "@alloy-js/typescript";
3
+
4
+ //#region src/typescript/contexts/member-scope.d.ts
5
+ interface MemberScopeProps {
6
+ children: Children;
7
+ /**
8
+ * The symbol that this member scope will create member symbols on.
9
+ */
10
+ ownerSymbol: TSOutputSymbol;
11
+ }
12
+ /**
13
+ * A member scope for TypeScript. Member declarations will create symbols
14
+ * in this scope, which will be added to the owner symbol's members.
15
+ */
16
+ declare function MemberScope(props: MemberScopeProps): Children;
17
+ declare type __ΩMemberScopeProps = any[];
18
+ //#endregion
19
+ export { MemberScope, MemberScopeProps, __ΩMemberScopeProps };
20
+ //# sourceMappingURL=member-scope.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-scope.d.cts","names":[],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"sourcesContent":[],"mappings":";;;;UA6BiB,gBAAA;YACL;EADK;AAajB;;eAPe;;;;;;iBAOC,WAAA,QAAmB,mBAAgB"}
@@ -0,0 +1,20 @@
1
+ import { Children } from "@alloy-js/core";
2
+ import { TSOutputSymbol } from "@alloy-js/typescript";
3
+
4
+ //#region src/typescript/contexts/member-scope.d.ts
5
+ interface MemberScopeProps {
6
+ children: Children;
7
+ /**
8
+ * The symbol that this member scope will create member symbols on.
9
+ */
10
+ ownerSymbol: TSOutputSymbol;
11
+ }
12
+ /**
13
+ * A member scope for TypeScript. Member declarations will create symbols
14
+ * in this scope, which will be added to the owner symbol's members.
15
+ */
16
+ declare function MemberScope(props: MemberScopeProps): Children;
17
+ declare type __ΩMemberScopeProps = any[];
18
+ //#endregion
19
+ export { MemberScope, MemberScopeProps, __ΩMemberScopeProps };
20
+ //# sourceMappingURL=member-scope.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-scope.d.mts","names":[],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"sourcesContent":[],"mappings":";;;;UA6BiB,gBAAA;YACL;EADK;AAajB;;eAPe;;;;;;iBAOC,WAAA,QAAmB,mBAAgB"}
@@ -0,0 +1,23 @@
1
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { MemberScope as MemberScope$1, createScope } from "@alloy-js/core";
3
+ import { TSMemberScope, useTSLexicalScopeIfPresent } from "@alloy-js/typescript";
4
+
5
+ //#region src/typescript/contexts/member-scope.tsx
6
+ /**
7
+ * A member scope for TypeScript. Member declarations will create symbols
8
+ * in this scope, which will be added to the owner symbol's members.
9
+ */
10
+ function MemberScope(props) {
11
+ const parentScope = useTSLexicalScopeIfPresent();
12
+ const binder = props.ownerSymbol.binder ?? parentScope?.binder;
13
+ return createComponent(MemberScope$1, {
14
+ value: createScope(TSMemberScope, "member-scope", parentScope, props.ownerSymbol, { binder }),
15
+ get children() {
16
+ return props.children;
17
+ }
18
+ });
19
+ }
20
+
21
+ //#endregion
22
+ export { MemberScope };
23
+ //# sourceMappingURL=member-scope.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-scope.mjs","names":["MemberScope","CoreMemberScope","createScope","TSMemberScope","useTSLexicalScopeIfPresent","props","parentScope","binder","ownerSymbol","memberScope","_$createComponent","value","children"],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"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 {\n Children,\n MemberScope as CoreMemberScope,\n createScope\n} from \"@alloy-js/core\";\nimport {\n TSMemberScope,\n TSOutputSymbol,\n useTSLexicalScopeIfPresent\n} from \"@alloy-js/typescript\";\n\nexport interface MemberScopeProps {\n children: Children;\n\n /**\n * The symbol that this member scope will create member symbols on.\n */\n ownerSymbol: TSOutputSymbol;\n}\n\n/**\n * A member scope for TypeScript. Member declarations will create symbols\n * in this scope, which will be added to the owner symbol's members.\n */\nexport function MemberScope(props: MemberScopeProps) {\n const parentScope = useTSLexicalScopeIfPresent();\n const binder = props.ownerSymbol.binder ?? parentScope?.binder;\n const memberScope = createScope(\n TSMemberScope,\n \"member-scope\",\n parentScope,\n props.ownerSymbol,\n {\n binder\n }\n );\n\n return (\n <CoreMemberScope value={memberScope}>{props.children}</CoreMemberScope>\n );\n}\n"],"mappings":""}