@alloy-js/python 0.5.0-dev.0 → 0.5.0-dev.1
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/dev/src/builtins/python.js +46 -0
- package/dist/dev/src/builtins/python.js.map +1 -1
- package/dist/dev/src/components/ClassDeclaration.js +19 -10
- package/dist/dev/src/components/ClassDeclaration.js.map +1 -1
- package/dist/dev/src/components/ClassMethodDeclaration.js +20 -5
- package/dist/dev/src/components/ClassMethodDeclaration.js.map +1 -1
- package/dist/dev/src/components/DataclassDeclaration.js +14 -12
- package/dist/dev/src/components/DataclassDeclaration.js.map +1 -1
- package/dist/dev/src/components/DecoratorList.js +55 -0
- package/dist/dev/src/components/DecoratorList.js.map +1 -0
- package/dist/dev/src/components/EnumDeclaration.js +21 -12
- package/dist/dev/src/components/EnumDeclaration.js.map +1 -1
- package/dist/dev/src/components/FunctionBase.js +21 -10
- package/dist/dev/src/components/FunctionBase.js.map +1 -1
- package/dist/dev/src/components/FutureStatement.js +1 -1
- package/dist/dev/src/components/MethodBase.js +16 -4
- package/dist/dev/src/components/MethodBase.js.map +1 -1
- package/dist/dev/src/components/PropertyDeclaration.js +68 -17
- package/dist/dev/src/components/PropertyDeclaration.js.map +1 -1
- package/dist/dev/src/components/PydanticClassDeclaration.js +136 -0
- package/dist/dev/src/components/PydanticClassDeclaration.js.map +1 -0
- package/dist/dev/src/components/StaticMethodDeclaration.js +19 -5
- package/dist/dev/src/components/StaticMethodDeclaration.js.map +1 -1
- package/dist/dev/src/components/index.js +1 -0
- package/dist/dev/src/components/index.js.map +1 -1
- package/dist/dev/test/classdeclarations.test.js +85 -52
- package/dist/dev/test/classdeclarations.test.js.map +1 -1
- package/dist/dev/test/dataclassdeclarations.test.js +122 -89
- package/dist/dev/test/dataclassdeclarations.test.js.map +1 -1
- package/dist/dev/test/decoratorlist.test.js +84 -0
- package/dist/dev/test/decoratorlist.test.js.map +1 -0
- package/dist/dev/test/enums.test.js +41 -10
- package/dist/dev/test/enums.test.js.map +1 -1
- package/dist/dev/test/functiondeclaration.test.js +81 -61
- package/dist/dev/test/functiondeclaration.test.js.map +1 -1
- package/dist/dev/test/methoddeclaration.test.js +117 -26
- package/dist/dev/test/methoddeclaration.test.js.map +1 -1
- package/dist/dev/test/propertydeclaration.test.js +109 -7
- package/dist/dev/test/propertydeclaration.test.js.map +1 -1
- package/dist/dev/test/pydanticclassdeclarations.test.js +1137 -0
- package/dist/dev/test/pydanticclassdeclarations.test.js.map +1 -0
- package/dist/src/builtins/python.d.ts +30 -0
- package/dist/src/builtins/python.d.ts.map +1 -1
- package/dist/src/builtins/python.js +46 -0
- package/dist/src/builtins/python.js.map +1 -1
- package/dist/src/components/ClassDeclaration.d.ts +21 -0
- package/dist/src/components/ClassDeclaration.d.ts.map +1 -1
- package/dist/src/components/ClassDeclaration.js +6 -1
- package/dist/src/components/ClassDeclaration.js.map +1 -1
- package/dist/src/components/ClassMethodDeclaration.d.ts +5 -1
- package/dist/src/components/ClassMethodDeclaration.d.ts.map +1 -1
- package/dist/src/components/ClassMethodDeclaration.js +14 -3
- package/dist/src/components/ClassMethodDeclaration.js.map +1 -1
- package/dist/src/components/DataclassDeclaration.d.ts.map +1 -1
- package/dist/src/components/DataclassDeclaration.js +10 -4
- package/dist/src/components/DataclassDeclaration.js.map +1 -1
- package/dist/src/components/DecoratorList.d.ts +43 -0
- package/dist/src/components/DecoratorList.d.ts.map +1 -0
- package/dist/src/components/DecoratorList.js +47 -0
- package/dist/src/components/DecoratorList.js.map +1 -0
- package/dist/src/components/EnumDeclaration.d.ts +9 -0
- package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
- package/dist/src/components/EnumDeclaration.js +6 -1
- package/dist/src/components/EnumDeclaration.js.map +1 -1
- package/dist/src/components/FunctionBase.d.ts +31 -1
- package/dist/src/components/FunctionBase.d.ts.map +1 -1
- package/dist/src/components/FunctionBase.js +9 -2
- package/dist/src/components/FunctionBase.js.map +1 -1
- package/dist/src/components/FutureStatement.d.ts +1 -1
- package/dist/src/components/FutureStatement.js +1 -1
- package/dist/src/components/MethodBase.d.ts.map +1 -1
- package/dist/src/components/MethodBase.js +10 -2
- package/dist/src/components/MethodBase.js.map +1 -1
- package/dist/src/components/PropertyDeclaration.d.ts +29 -0
- package/dist/src/components/PropertyDeclaration.d.ts.map +1 -1
- package/dist/src/components/PropertyDeclaration.js +48 -1
- package/dist/src/components/PropertyDeclaration.js.map +1 -1
- package/dist/src/components/PydanticClassDeclaration.d.ts +120 -0
- package/dist/src/components/PydanticClassDeclaration.d.ts.map +1 -0
- package/dist/src/components/PydanticClassDeclaration.js +116 -0
- package/dist/src/components/PydanticClassDeclaration.js.map +1 -0
- package/dist/src/components/StaticMethodDeclaration.d.ts +3 -0
- package/dist/src/components/StaticMethodDeclaration.d.ts.map +1 -1
- package/dist/src/components/StaticMethodDeclaration.js +13 -3
- package/dist/src/components/StaticMethodDeclaration.js.map +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +1 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/test/classdeclarations.test.js +25 -0
- package/dist/test/classdeclarations.test.js.map +1 -1
- package/dist/test/dataclassdeclarations.test.js +25 -0
- package/dist/test/dataclassdeclarations.test.js.map +1 -1
- package/dist/test/decoratorlist.test.d.ts +2 -0
- package/dist/test/decoratorlist.test.d.ts.map +1 -0
- package/dist/test/decoratorlist.test.js +60 -0
- package/dist/test/decoratorlist.test.js.map +1 -0
- package/dist/test/enums.test.js +27 -0
- package/dist/test/enums.test.js.map +1 -1
- package/dist/test/functiondeclaration.test.js +16 -0
- package/dist/test/functiondeclaration.test.js.map +1 -1
- package/dist/test/methoddeclaration.test.js +67 -0
- package/dist/test/methoddeclaration.test.js.map +1 -1
- package/dist/test/propertydeclaration.test.js +71 -1
- package/dist/test/propertydeclaration.test.js.map +1 -1
- package/dist/test/pydanticclassdeclarations.test.d.ts +2 -0
- package/dist/test/pydanticclassdeclarations.test.d.ts.map +1 -0
- package/dist/test/pydanticclassdeclarations.test.js +829 -0
- package/dist/test/pydanticclassdeclarations.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/api/components/ClassDeclaration.md +10 -7
- package/docs/api/components/ClassEnumDeclaration.md +9 -6
- package/docs/api/components/ClassMethodDeclaration.md +7 -5
- package/docs/api/components/DataclassDeclaration.md +9 -5
- package/docs/api/components/DunderMethodDeclaration.md +7 -5
- package/docs/api/components/FunctionDeclaration.md +9 -5
- package/docs/api/components/FutureStatement.md +1 -1
- package/docs/api/components/MethodDeclaration.md +11 -6
- package/docs/api/components/PropertyDeclaration.md +11 -8
- package/docs/api/components/PydanticClassDeclaration.md +146 -0
- package/docs/api/components/StaticMethodDeclaration.md +7 -5
- package/docs/api/components/index.md +1 -0
- package/docs/api/index.md +3 -3
- package/docs/api/types/CommonFunctionProps.md +4 -3
- package/docs/api/types/PydanticModelConfigDictProps.md +32 -0
- package/docs/api/types/index.md +1 -0
- package/docs/api/variables/index.md +3 -0
- package/docs/api/variables/pydanticModule.md +27 -0
- package/docs/api/variables/pydanticSettingsModule.md +7 -0
- package/docs/api/variables/typingModule.md +9 -0
- package/package.json +4 -4
- package/src/builtins/python.ts +539 -1
- package/src/components/ClassDeclaration.tsx +23 -0
- package/src/components/ClassMethodDeclaration.tsx +9 -1
- package/src/components/DataclassDeclaration.tsx +18 -11
- package/src/components/DecoratorList.tsx +50 -0
- package/src/components/EnumDeclaration.tsx +11 -0
- package/src/components/FunctionBase.tsx +34 -3
- package/src/components/FutureStatement.tsx +1 -1
- package/src/components/MethodBase.tsx +6 -2
- package/src/components/PropertyDeclaration.tsx +48 -1
- package/src/components/PydanticClassDeclaration.tsx +222 -0
- package/src/components/StaticMethodDeclaration.tsx +7 -1
- package/src/components/index.ts +1 -0
- package/temp/api.json +1142 -84
- package/test/classdeclarations.test.tsx +27 -0
- package/test/dataclassdeclarations.test.tsx +25 -0
- package/test/decoratorlist.test.tsx +95 -0
- package/test/enums.test.tsx +29 -0
- package/test/functiondeclaration.test.tsx +17 -0
- package/test/methoddeclaration.test.tsx +70 -0
- package/test/propertydeclaration.test.tsx +66 -1
- package/test/pydanticclassdeclarations.test.tsx +836 -0
|
@@ -3,6 +3,7 @@ import { createContentSlot, Name, Show } from "@alloy-js/core";
|
|
|
3
3
|
import { getCallSignatureProps } from "../utils.js";
|
|
4
4
|
import { CallSignature } from "./CallSignature.js";
|
|
5
5
|
import { Declaration } from "./Declaration.js";
|
|
6
|
+
import { DecoratorList } from "./DecoratorList.js";
|
|
6
7
|
import { LexicalScope } from "./LexicalScope.js";
|
|
7
8
|
import { PythonBlock } from "./PythonBlock.js";
|
|
8
9
|
|
|
@@ -42,6 +43,11 @@ import { PythonBlock } from "./PythonBlock.js";
|
|
|
42
43
|
* ```
|
|
43
44
|
*/
|
|
44
45
|
export function BaseFunctionDeclaration(props) {
|
|
46
|
+
const {
|
|
47
|
+
decorators,
|
|
48
|
+
sym,
|
|
49
|
+
...declarationProps
|
|
50
|
+
} = props;
|
|
45
51
|
const asyncKwd = props.async ? "async " : "";
|
|
46
52
|
let parameters;
|
|
47
53
|
switch (props.functionType) {
|
|
@@ -58,15 +64,20 @@ export function BaseFunctionDeclaration(props) {
|
|
|
58
64
|
default:
|
|
59
65
|
parameters = props.parameters;
|
|
60
66
|
}
|
|
61
|
-
const sym = props.sym;
|
|
62
67
|
const ContentSlot = createContentSlot();
|
|
63
|
-
return [_$createComponent(
|
|
68
|
+
return [_$createComponent(DecoratorList, {
|
|
69
|
+
decorators: decorators
|
|
70
|
+
}, {
|
|
71
|
+
fileName: import.meta.url,
|
|
72
|
+
lineNumber: 103,
|
|
73
|
+
columnNumber: 7
|
|
74
|
+
}), _$createComponent(Declaration, _$mergeProps(declarationProps, {
|
|
64
75
|
nameKind: "function",
|
|
65
76
|
symbol: sym,
|
|
66
77
|
get children() {
|
|
67
78
|
return [asyncKwd, "def ", _$createComponent(Name, {}, {
|
|
68
79
|
fileName: import.meta.url,
|
|
69
|
-
lineNumber:
|
|
80
|
+
lineNumber: 105,
|
|
70
81
|
columnNumber: 23
|
|
71
82
|
}), _$createComponent(LexicalScope, {
|
|
72
83
|
get name() {
|
|
@@ -77,7 +88,7 @@ export function BaseFunctionDeclaration(props) {
|
|
|
77
88
|
parameters: parameters
|
|
78
89
|
}), {
|
|
79
90
|
fileName: import.meta.url,
|
|
80
|
-
lineNumber:
|
|
91
|
+
lineNumber: 107,
|
|
81
92
|
columnNumber: 11
|
|
82
93
|
}), _$createComponent(PythonBlock, {
|
|
83
94
|
opener: ":",
|
|
@@ -91,13 +102,13 @@ export function BaseFunctionDeclaration(props) {
|
|
|
91
102
|
}
|
|
92
103
|
}, {
|
|
93
104
|
fileName: import.meta.url,
|
|
94
|
-
lineNumber:
|
|
105
|
+
lineNumber: 112,
|
|
95
106
|
columnNumber: 13
|
|
96
107
|
}), _$createComponent(ContentSlot.WhenEmpty, {
|
|
97
108
|
children: "pass"
|
|
98
109
|
}, {
|
|
99
110
|
fileName: import.meta.url,
|
|
100
|
-
lineNumber:
|
|
111
|
+
lineNumber: 113,
|
|
101
112
|
columnNumber: 13
|
|
102
113
|
}), _$createComponent(ContentSlot, {
|
|
103
114
|
get children() {
|
|
@@ -105,25 +116,25 @@ export function BaseFunctionDeclaration(props) {
|
|
|
105
116
|
}
|
|
106
117
|
}, {
|
|
107
118
|
fileName: import.meta.url,
|
|
108
|
-
lineNumber:
|
|
119
|
+
lineNumber: 114,
|
|
109
120
|
columnNumber: 13
|
|
110
121
|
})];
|
|
111
122
|
}
|
|
112
123
|
}, {
|
|
113
124
|
fileName: import.meta.url,
|
|
114
|
-
lineNumber:
|
|
125
|
+
lineNumber: 111,
|
|
115
126
|
columnNumber: 11
|
|
116
127
|
})];
|
|
117
128
|
}
|
|
118
129
|
}, {
|
|
119
130
|
fileName: import.meta.url,
|
|
120
|
-
lineNumber:
|
|
131
|
+
lineNumber: 106,
|
|
121
132
|
columnNumber: 9
|
|
122
133
|
})];
|
|
123
134
|
}
|
|
124
135
|
}), {
|
|
125
136
|
fileName: import.meta.url,
|
|
126
|
-
lineNumber:
|
|
137
|
+
lineNumber: 104,
|
|
127
138
|
columnNumber: 7
|
|
128
139
|
})];
|
|
129
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createContentSlot","Name","Show","getCallSignatureProps","CallSignature","Declaration","LexicalScope","PythonBlock","BaseFunctionDeclaration","props","asyncKwd","async","parameters","functionType","name","
|
|
1
|
+
{"version":3,"names":["createContentSlot","Name","Show","getCallSignatureProps","CallSignature","Declaration","DecoratorList","LexicalScope","PythonBlock","BaseFunctionDeclaration","props","decorators","sym","declarationProps","asyncKwd","async","parameters","functionType","name","ContentSlot","_$createComponent","fileName","import","meta","url","lineNumber","columnNumber","_$mergeProps","nameKind","symbol","children","opener","when","Boolean","doc","WhenEmpty"],"sources":["../../../../src/components/FunctionBase.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,iBAAiB,EAAEC,IAAI,EAAEC,IAAI,QAAuB,gBAAgB;AAE7E,SAASC,qBAAqB,QAAQ,aAAa;AACnD,SAASC,aAAa;AACtB,SAA+BC,WAAW,QAAQ,kBAAkB;AACpE,SAASC,aAAa;AACtB,SAASC,YAAY;AACrB,SAASC,WAAW;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,KAAmC,EAAE;EAC3E,MAAM;IAAEC,UAAU;IAAEC,GAAG;IAAE,GAAGC;EAAiB,CAAC,GAAGH,KAAK;EACtD,MAAMI,QAAQ,GAAGJ,KAAK,CAACK,KAAK,GAAG,QAAQ,GAAG,EAAE;EAC5C,IAAIC,UAAU;EACd,QAAQN,KAAK,CAACO,YA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AEC,OAAO,CAACvB,KAAK,CAACwB,GAAG,CAAC;gBAAA;gBAAA,IAAAJ,SAAA;kBAAA,OAAGpB,KAAK,CAACwB,GAAG;gBAAA;cAAA;gBAAAb,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;gBAAAC,UAAA;gBAAAC,YAAA;cAAA,IAAAN,iBAAA,CACzCD,WAAW,CAACgB,SAAS;gBAAAL,QAAA;cAAA;gBAAAT,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;gBAAAC,UAAA;gBAAAC,YAAA;cAAA,IAAAN,iBAAA,CACrBD,WAAW;gBAAA,IAAAW,SAAA;kBAAA,OAAEpB,KAAK,CAACoB,QAAQ;gBAAA;cAAA;gBAAAT,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;gBAAAC,UAAA;gBAAAC,YAAA;cAAA;YAAA;UAAA;YAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;YAAAC,UAAA;YAAAC,YAAA;UAAA;QAAA;MAAA;QAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAMxC","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
13
|
-
* <SourceFile path="models.py" futureImports={<FutureStatement feature="annotations" />}>
|
|
13
|
+
* <SourceFile path="models.py" futureImports={[<FutureStatement feature="annotations" />]}>
|
|
14
14
|
* <ClassDeclaration name="User">
|
|
15
15
|
* <PropertyDeclaration name="manager" type="User" />
|
|
16
16
|
* </ClassDeclaration>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { memo as _$memo, createIntrinsic as _$createIntrinsic, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { abcModule } from "../builtins/python.js";
|
|
3
|
+
import { DecoratorList } from "./DecoratorList.js";
|
|
3
4
|
import { BaseFunctionDeclaration } from "./FunctionBase.js";
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -26,14 +27,25 @@ import { BaseFunctionDeclaration } from "./FunctionBase.js";
|
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
29
|
export function MethodDeclarationBase(props) {
|
|
29
|
-
const
|
|
30
|
+
const {
|
|
31
|
+
decorators,
|
|
32
|
+
abstract,
|
|
33
|
+
...rest
|
|
34
|
+
} = props;
|
|
35
|
+
const abstractMethod = abstract ? ["@", _$memo(() => abcModule["."].abstractmethod, false, "abcModule[.].abstractmethod"), _$createIntrinsic("hbr", {}, {
|
|
30
36
|
fileName: import.meta.url,
|
|
31
|
-
lineNumber:
|
|
37
|
+
lineNumber: 46,
|
|
32
38
|
columnNumber: 9
|
|
33
39
|
})] : undefined;
|
|
34
|
-
return [
|
|
40
|
+
return [_$createComponent(DecoratorList, {
|
|
41
|
+
decorators: decorators
|
|
42
|
+
}, {
|
|
35
43
|
fileName: import.meta.url,
|
|
36
|
-
lineNumber:
|
|
44
|
+
lineNumber: 52,
|
|
45
|
+
columnNumber: 7
|
|
46
|
+
}), abstractMethod, _$createComponent(BaseFunctionDeclaration, rest, {
|
|
47
|
+
fileName: import.meta.url,
|
|
48
|
+
lineNumber: 54,
|
|
37
49
|
columnNumber: 7
|
|
38
50
|
})];
|
|
39
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["abcModule","BaseFunctionDeclaration","MethodDeclarationBase","props","
|
|
1
|
+
{"version":3,"names":["abcModule","DecoratorList","BaseFunctionDeclaration","MethodDeclarationBase","props","decorators","abstract","rest","abstractMethod","_$memo","abstractmethod","_$createIntrinsic","fileName","import","meta","url","lineNumber","columnNumber","undefined","_$createComponent"],"sources":["../../../../src/components/MethodBase.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,SAAS,QAAQ,uBAAuB;AACjD,SAASC,aAAa;AACtB,SACEC,uBAAuB,QAGlB,mBAAmB;;AAE1B;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CACnCC,KAC4D,EAC5D;EACA,MAAM;IAAEC,UAAU;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAE/C,MAAMI,cAAc,GAClBF,QAAQ,SAAAG,MAAA,OAEFT,SAAS,CAAC,GAAG,CAAC,CAACU,cAAc,yCAAAC,iBAAA;IAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,MAGjCC,SAAS;EAEb,QAAAC,iBAAA,CAEKlB,aAAa;IAACI,UAAU,EAAEA;EAAU;IAAAO,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,IACpCT,cAAc,EAAAW,iBAAA,CACdjB,uBAAuB,EAAKK,IAAI;IAAAK,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAGvC","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@ import { createComponent as _$createComponent, memo as _$memo, mergeProps as _$m
|
|
|
2
2
|
import { DeclarationContext, List, Show, childrenArray, code, createContext, findKeyedChild, findUnkeyedChildren, taggedComponent, useContext } from "@alloy-js/core";
|
|
3
3
|
import { createMethodSymbol } from "../symbols/factories.js";
|
|
4
4
|
import { Atom } from "./Atom.js";
|
|
5
|
+
import { DecoratorList } from "./DecoratorList.js";
|
|
5
6
|
import { MethodDeclarationBase } from "./MethodBase.js";
|
|
6
7
|
const setterTag = Symbol();
|
|
7
8
|
const deleterTag = Symbol();
|
|
@@ -56,6 +57,29 @@ const PropertyContext = createContext();
|
|
|
56
57
|
* The property must be declared within a class. The getter method is
|
|
57
58
|
* automatically generated using the `@property` decorator. Use the nested
|
|
58
59
|
* `Setter` and `Deleter` components to add mutators.
|
|
60
|
+
*
|
|
61
|
+
* Use **`decorators`** for decorators that must appear **above** the intrinsic
|
|
62
|
+
* `@property` (for example Pydantic `@computed_field`, `@typing.final`,
|
|
63
|
+
* `@typing.override`). The first array entry is rendered topmost, matching
|
|
64
|
+
* Python source order.
|
|
65
|
+
*
|
|
66
|
+
* @example Pydantic computed field
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <py.PropertyDeclaration
|
|
69
|
+
* name="area"
|
|
70
|
+
* type="float"
|
|
71
|
+
* decorators={[code`@${pydanticModule["."].computed_field}`]}
|
|
72
|
+
* >
|
|
73
|
+
* return self.width ** 2
|
|
74
|
+
* </py.PropertyDeclaration>
|
|
75
|
+
* ```
|
|
76
|
+
* Generates:
|
|
77
|
+
* ```python
|
|
78
|
+
* @computed_field
|
|
79
|
+
* @property
|
|
80
|
+
* def area(self) -> float:
|
|
81
|
+
* return self.width ** 2
|
|
82
|
+
* ```
|
|
59
83
|
*/
|
|
60
84
|
|
|
61
85
|
export function PropertyDeclaration(props) {
|
|
@@ -94,10 +118,13 @@ export function PropertyDeclaration(props) {
|
|
|
94
118
|
get doc() {
|
|
95
119
|
return props.doc;
|
|
96
120
|
},
|
|
121
|
+
get decorators() {
|
|
122
|
+
return props.decorators;
|
|
123
|
+
},
|
|
97
124
|
children: unkeyedChildren
|
|
98
125
|
}, {
|
|
99
126
|
fileName: import.meta.url,
|
|
100
|
-
lineNumber:
|
|
127
|
+
lineNumber: 150,
|
|
101
128
|
columnNumber: 13
|
|
102
129
|
}), _$createComponent(Show, {
|
|
103
130
|
get when() {
|
|
@@ -114,13 +141,13 @@ export function PropertyDeclaration(props) {
|
|
|
114
141
|
children: setterChildren
|
|
115
142
|
}), {
|
|
116
143
|
fileName: import.meta.url,
|
|
117
|
-
lineNumber:
|
|
144
|
+
lineNumber: 158,
|
|
118
145
|
columnNumber: 15
|
|
119
146
|
});
|
|
120
147
|
}
|
|
121
148
|
}, {
|
|
122
149
|
fileName: import.meta.url,
|
|
123
|
-
lineNumber:
|
|
150
|
+
lineNumber: 157,
|
|
124
151
|
columnNumber: 13
|
|
125
152
|
}), _$createComponent(Show, {
|
|
126
153
|
get when() {
|
|
@@ -134,42 +161,52 @@ export function PropertyDeclaration(props) {
|
|
|
134
161
|
children: deleterChildren
|
|
135
162
|
}), {
|
|
136
163
|
fileName: import.meta.url,
|
|
137
|
-
lineNumber:
|
|
164
|
+
lineNumber: 167,
|
|
138
165
|
columnNumber: 15
|
|
139
166
|
});
|
|
140
167
|
}
|
|
141
168
|
}, {
|
|
142
169
|
fileName: import.meta.url,
|
|
143
|
-
lineNumber:
|
|
170
|
+
lineNumber: 166,
|
|
144
171
|
columnNumber: 13
|
|
145
172
|
})];
|
|
146
173
|
}
|
|
147
174
|
}, {
|
|
148
175
|
fileName: import.meta.url,
|
|
149
|
-
lineNumber:
|
|
176
|
+
lineNumber: 149,
|
|
150
177
|
columnNumber: 11
|
|
151
178
|
});
|
|
152
179
|
}
|
|
153
180
|
}, {
|
|
154
181
|
fileName: import.meta.url,
|
|
155
|
-
lineNumber:
|
|
182
|
+
lineNumber: 148,
|
|
156
183
|
columnNumber: 9
|
|
157
184
|
});
|
|
158
185
|
}
|
|
159
186
|
}, {
|
|
160
187
|
fileName: import.meta.url,
|
|
161
|
-
lineNumber:
|
|
188
|
+
lineNumber: 147,
|
|
162
189
|
columnNumber: 7
|
|
163
190
|
})];
|
|
164
191
|
}
|
|
165
192
|
function PropertyMethodDeclaration(props) {
|
|
166
193
|
const propertySymbol = useContext(DeclarationContext);
|
|
167
194
|
const propertyType = useContext(PropertyContext);
|
|
168
|
-
|
|
195
|
+
const {
|
|
196
|
+
decorators,
|
|
197
|
+
...rest
|
|
198
|
+
} = props;
|
|
199
|
+
return [_$createComponent(DecoratorList, {
|
|
200
|
+
decorators: decorators
|
|
201
|
+
}, {
|
|
202
|
+
fileName: import.meta.url,
|
|
203
|
+
lineNumber: 193,
|
|
204
|
+
columnNumber: 7
|
|
205
|
+
}), code`@property`, _$createIntrinsic("hbr", {}, {
|
|
169
206
|
fileName: import.meta.url,
|
|
170
|
-
lineNumber:
|
|
207
|
+
lineNumber: 195,
|
|
171
208
|
columnNumber: 7
|
|
172
|
-
}), _$createComponent(MethodDeclarationBase, _$mergeProps(
|
|
209
|
+
}), _$createComponent(MethodDeclarationBase, _$mergeProps(rest, {
|
|
173
210
|
get name() {
|
|
174
211
|
return propertySymbol.name;
|
|
175
212
|
},
|
|
@@ -181,7 +218,7 @@ function PropertyMethodDeclaration(props) {
|
|
|
181
218
|
}
|
|
182
219
|
}), {
|
|
183
220
|
fileName: import.meta.url,
|
|
184
|
-
lineNumber:
|
|
221
|
+
lineNumber: 196,
|
|
185
222
|
columnNumber: 7
|
|
186
223
|
})];
|
|
187
224
|
}
|
|
@@ -195,7 +232,7 @@ function PropertyMethodBase(props) {
|
|
|
195
232
|
} = props;
|
|
196
233
|
return [_$memo(() => code`@${propertySymbol.name}.${decoratorType}`), _$createIntrinsic("hbr", {}, {
|
|
197
234
|
fileName: import.meta.url,
|
|
198
|
-
lineNumber:
|
|
235
|
+
lineNumber: 222,
|
|
199
236
|
columnNumber: 7
|
|
200
237
|
}), _$createComponent(MethodDeclarationBase, _$mergeProps(restProps, {
|
|
201
238
|
get name() {
|
|
@@ -208,7 +245,7 @@ function PropertyMethodBase(props) {
|
|
|
208
245
|
jsValue: null
|
|
209
246
|
}, {
|
|
210
247
|
fileName: import.meta.url,
|
|
211
|
-
lineNumber:
|
|
248
|
+
lineNumber: 228,
|
|
212
249
|
columnNumber: 21
|
|
213
250
|
});
|
|
214
251
|
},
|
|
@@ -216,7 +253,7 @@ function PropertyMethodBase(props) {
|
|
|
216
253
|
children: children
|
|
217
254
|
}), {
|
|
218
255
|
fileName: import.meta.url,
|
|
219
|
-
lineNumber:
|
|
256
|
+
lineNumber: 223,
|
|
220
257
|
columnNumber: 7
|
|
221
258
|
})];
|
|
222
259
|
}
|
|
@@ -239,6 +276,13 @@ function PropertyMethodBase(props) {
|
|
|
239
276
|
* def value(self, value: int) -> None:
|
|
240
277
|
* self._value = value
|
|
241
278
|
* ```
|
|
279
|
+
*
|
|
280
|
+
* @remarks
|
|
281
|
+
* The intrinsic `@<name>.setter` decorator is always rendered topmost (it must
|
|
282
|
+
* remain the outermost decorator). Any `decorators` passed to this component
|
|
283
|
+
* are rendered **between** `@<name>.setter` and `def`, which is the correct
|
|
284
|
+
* position for wrappers that should decorate the underlying function before
|
|
285
|
+
* `setter` re-binds it to the property (e.g. `@deprecated`, `@abstractmethod`).
|
|
242
286
|
*/
|
|
243
287
|
PropertyDeclaration.Setter = taggedComponent(setterTag, function PropertySetter(props) {
|
|
244
288
|
return _$createComponent(PropertyMethodBase, _$mergeProps({
|
|
@@ -251,7 +295,7 @@ PropertyDeclaration.Setter = taggedComponent(setterTag, function PropertySetter(
|
|
|
251
295
|
}
|
|
252
296
|
}, props), {
|
|
253
297
|
fileName: import.meta.url,
|
|
254
|
-
lineNumber:
|
|
298
|
+
lineNumber: 269,
|
|
255
299
|
columnNumber: 7
|
|
256
300
|
});
|
|
257
301
|
});
|
|
@@ -274,13 +318,20 @@ PropertyDeclaration.Setter = taggedComponent(setterTag, function PropertySetter(
|
|
|
274
318
|
* def value(self) -> None:
|
|
275
319
|
* del self._value
|
|
276
320
|
* ```
|
|
321
|
+
*
|
|
322
|
+
* @remarks
|
|
323
|
+
* The intrinsic `@<name>.deleter` decorator is always rendered topmost (it
|
|
324
|
+
* must remain the outermost decorator). Any `decorators` passed to this
|
|
325
|
+
* component are rendered **between** `@<name>.deleter` and `def`, which is
|
|
326
|
+
* the correct position for wrappers that should decorate the underlying
|
|
327
|
+
* function before `deleter` re-binds it to the property.
|
|
277
328
|
*/
|
|
278
329
|
PropertyDeclaration.Deleter = taggedComponent(deleterTag, function PropertyDeleter(props) {
|
|
279
330
|
return _$createComponent(PropertyMethodBase, _$mergeProps({
|
|
280
331
|
decoratorType: "deleter"
|
|
281
332
|
}, props), {
|
|
282
333
|
fileName: import.meta.url,
|
|
283
|
-
lineNumber:
|
|
334
|
+
lineNumber: 309,
|
|
284
335
|
columnNumber: 12
|
|
285
336
|
});
|
|
286
337
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeclarationContext","List","Show","childrenArray","code","createContext","findKeyedChild","findUnkeyedChildren","taggedComponent","useContext","createMethodSymbol","Atom","MethodDeclarationBase","setterTag","Symbol","deleterTag","PropertyContext","PropertyDeclaration","props","nonEmptyOrNotImplemented","children","length","setterComponent","Setter","tag","undefined","deleterComponent","Deleter","setterChildren","deleterChildren","unkeyedChildren","sym","name","refkeys","refkey","_$createComponent","Provider","value","type","hardline","enderPunctuation","PropertyMethodDeclaration","abstract","doc","fileName","import","meta","url","lineNumber","columnNumber","when","Boolean","_$mergeProps","propertySymbol","propertyType","_$createIntrinsic","functionType","returnType","PropertyMethodBase","decoratorType","parameters","restProps","_$memo","jsValue","PropertySetter","PropertyDeleter"],"sources":["../../../../src/components/PropertyDeclaration.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAEEA,kBAAkB,EAClBC,IAAI,EAEJC,IAAI,EACJC,aAAa,EACbC,IAAI,EACJC,aAAa,EACbC,cAAc,EACdC,mBAAmB,EACnBC,eAAe,EACfC,UAAU,QACL,gBAAgB;AAGvB,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,IAAI;
|
|
1
|
+
{"version":3,"names":["DeclarationContext","List","Show","childrenArray","code","createContext","findKeyedChild","findUnkeyedChildren","taggedComponent","useContext","createMethodSymbol","Atom","DecoratorList","MethodDeclarationBase","setterTag","Symbol","deleterTag","PropertyContext","PropertyDeclaration","props","nonEmptyOrNotImplemented","children","length","setterComponent","Setter","tag","undefined","deleterComponent","Deleter","setterChildren","deleterChildren","unkeyedChildren","sym","name","refkeys","refkey","_$createComponent","Provider","value","type","hardline","enderPunctuation","PropertyMethodDeclaration","abstract","doc","decorators","fileName","import","meta","url","lineNumber","columnNumber","when","Boolean","_$mergeProps","propertySymbol","propertyType","rest","_$createIntrinsic","functionType","returnType","PropertyMethodBase","decoratorType","parameters","restProps","_$memo","jsValue","PropertySetter","PropertyDeleter"],"sources":["../../../../src/components/PropertyDeclaration.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAEEA,kBAAkB,EAClBC,IAAI,EAEJC,IAAI,EACJC,aAAa,EACbC,IAAI,EACJC,aAAa,EACbC,cAAc,EACdC,mBAAmB,EACnBC,eAAe,EACfC,UAAU,QACL,gBAAgB;AAGvB,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,IAAI;AACb,SAASC,aAAa;AAEtB,SAASC,qBAAqB,QAAQ,iBAAiB;AAEvD,MAAMC,SAAS,GAAGC,MAAM,CAAC,CAAC;AAC1B,MAAMC,UAAU,GAAGD,MAAM,CAAC,CAAC;;AAE3B;AACA,MAAME,eAAe,GAAGZ,aAAa,CAAuB,CAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,OAAO,SAASa,mBAAmBA,CAACC,KAA+B,EAAE;EACnE,MAAMC,wBAAwB,GAC5BC,QAA8B,IACjB;IACb,IAAIA,QAAQ,IAAIlB,aAAa,CAAC,MAAMkB,QAAQ,CAAC,CAACC,MAAM,GAAG,CAA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ACA,OAAAiB,iBAAA,CACGyB,kBAAkB,EAAAP,YAAA;IACjBQ,aAAa;IAAA,IACbC,UAAUA,CAAA;MAAA,OAAE,CAAC;QAAE9B,IAAI,EAAE,OAAO;QAAEM,IAAI,EAAEpB,KAAK,CAACoB;MAAK,CAAC,CAAC;IAAA;EAAA,GAC7CpB,KAAK;IAAA2B,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAGf,CACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAjC,mBAAmB,CAACU,OAAO,GAAGpB,eAAe,CAC3CQ,UAAU,EACV,SAASoD,eAAeA,CACtBjD,KAAyD,EACzD;EACA,OAAAiB,iBAAA,CAAQyB,kBAAkB,EAAAP,YAAA;IAACQ,aAAa;EAAA,GAAe3C,KAAK;IAAA2B,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAC9D,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { For, List, childrenArray, splitProps } from "@alloy-js/core";
|
|
3
|
+
import { snakeCase } from "change-case";
|
|
4
|
+
import { pydanticModule } from "../builtins/python.js";
|
|
5
|
+
import { Atom } from "./Atom.js";
|
|
6
|
+
import { ClassDeclaration } from "./ClassDeclaration.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Keyword-style options for Pydantic v2 `ConfigDict`, using camelCase prop names
|
|
10
|
+
* that map to snake_case Python arguments (for example `validateAssignment` →
|
|
11
|
+
* `validate_assignment`).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const PydanticModelConfigKeys = ["aliasGenerator", "arbitraryTypesAllowed", "coerceNumbersToStr", "frozen", "extra", "fromAttributes", "hideInputInErrors", "jsonSchemaExtra", "locByAlias", "populateByName", "revalidateInstances", "serJsonBytes", "serJsonInfNan", "strMinLength", "strMaxLength", "strStripWhitespace", "strToLower", "strToUpper", "strict", "useEnumValues", "valJsonBytes", "validateAssignment", "validateDefault", "validateReturn"];
|
|
15
|
+
/**
|
|
16
|
+
* Renders a Python class that subclasses Pydantic's `BaseModel`:
|
|
17
|
+
* `class Name(BaseModel): ...`.
|
|
18
|
+
*
|
|
19
|
+
* When `bases` is omitted, the class extends `pydanticModule["."].BaseModel`.
|
|
20
|
+
* Pass `bases` to inherit from another generated class (or to combine bases explicitly).
|
|
21
|
+
*
|
|
22
|
+
* Optional `modelConfig={{...}}` and top-level config props (for example
|
|
23
|
+
* `frozen`, `strict`, `extra`) emit `model_config = ConfigDict(...)` for common
|
|
24
|
+
* Pydantic v2 model settings (see {@link PydanticModelConfigDictProps}).
|
|
25
|
+
* When both are used, top-level props override `modelConfig` keys.
|
|
26
|
+
*
|
|
27
|
+
* Fields are ordinary class body declarations; use `pydanticModule["."].Field` in
|
|
28
|
+
* initializers when you need `Field(...)`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* import { pydanticModule } from "@alloy-js/python";
|
|
33
|
+
* import * as py from "@alloy-js/python";
|
|
34
|
+
*
|
|
35
|
+
* <py.PydanticClassDeclaration name="User" frozen>
|
|
36
|
+
* <py.VariableDeclaration instanceVariable omitNone name="id" type="int" />
|
|
37
|
+
* <py.VariableDeclaration
|
|
38
|
+
* instanceVariable
|
|
39
|
+
* name="name"
|
|
40
|
+
* type="str"
|
|
41
|
+
* initializer={"Field(default=\"anonymous\")"}
|
|
42
|
+
* />
|
|
43
|
+
* </py.PydanticClassDeclaration>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* ```py
|
|
47
|
+
* from pydantic import BaseModel
|
|
48
|
+
* from pydantic import ConfigDict
|
|
49
|
+
* from pydantic import Field
|
|
50
|
+
*
|
|
51
|
+
* class User(BaseModel):
|
|
52
|
+
* model_config = ConfigDict(frozen=True)
|
|
53
|
+
* id: int
|
|
54
|
+
* name: str = Field(default="anonymous")
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export function PydanticClassDeclaration(props) {
|
|
58
|
+
const [modelConfigProps, bodyProps, rest] = splitProps(props, PydanticModelConfigKeys, ["modelConfig", "modelConfigExpression", "children"]);
|
|
59
|
+
const bases = rest.bases ?? [pydanticModule["."].BaseModel];
|
|
60
|
+
const {
|
|
61
|
+
modelConfig,
|
|
62
|
+
modelConfigExpression,
|
|
63
|
+
children
|
|
64
|
+
} = bodyProps;
|
|
65
|
+
const configEntries = [];
|
|
66
|
+
if (modelConfigExpression === undefined) {
|
|
67
|
+
for (const key of PydanticModelConfigKeys) {
|
|
68
|
+
const value = modelConfigProps[key] ?? modelConfig?.[key];
|
|
69
|
+
if (value === undefined) continue;
|
|
70
|
+
configEntries.push([snakeCase(key), value]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const hasStructuredModelConfig = modelConfigExpression === undefined && configEntries.length > 0;
|
|
74
|
+
const hasExpressionModelConfig = modelConfigExpression !== undefined;
|
|
75
|
+
const bodyItems = [];
|
|
76
|
+
if (hasExpressionModelConfig) {
|
|
77
|
+
bodyItems.push(["model_config = ", modelConfigExpression]);
|
|
78
|
+
} else if (hasStructuredModelConfig) {
|
|
79
|
+
bodyItems.push(["model_config = ", _$memo(() => pydanticModule["."].ConfigDict, false, "pydanticModule[.].ConfigDict"), "(", _$createComponent(For, {
|
|
80
|
+
each: configEntries,
|
|
81
|
+
comma: true,
|
|
82
|
+
space: true,
|
|
83
|
+
children: ([k, v]) => [k, "=", _$createComponent(Atom, {
|
|
84
|
+
jsValue: v
|
|
85
|
+
}, {
|
|
86
|
+
fileName: import.meta.url,
|
|
87
|
+
lineNumber: 199,
|
|
88
|
+
columnNumber: 19
|
|
89
|
+
})]
|
|
90
|
+
}, {
|
|
91
|
+
fileName: import.meta.url,
|
|
92
|
+
lineNumber: 196,
|
|
93
|
+
columnNumber: 9
|
|
94
|
+
}), ")"]);
|
|
95
|
+
}
|
|
96
|
+
bodyItems.push(...childrenArray(() => children));
|
|
97
|
+
return _$createComponent(ClassDeclaration, {
|
|
98
|
+
get name() {
|
|
99
|
+
return rest.name;
|
|
100
|
+
},
|
|
101
|
+
bases: bases,
|
|
102
|
+
get doc() {
|
|
103
|
+
return rest.doc;
|
|
104
|
+
},
|
|
105
|
+
get refkey() {
|
|
106
|
+
return rest.refkey;
|
|
107
|
+
},
|
|
108
|
+
get decorators() {
|
|
109
|
+
return rest.decorators;
|
|
110
|
+
},
|
|
111
|
+
get children() {
|
|
112
|
+
return _$createComponent(List, {
|
|
113
|
+
hardline: true,
|
|
114
|
+
get children() {
|
|
115
|
+
return _$createComponent(For, {
|
|
116
|
+
each: bodyItems,
|
|
117
|
+
children: item => item
|
|
118
|
+
}, {
|
|
119
|
+
fileName: import.meta.url,
|
|
120
|
+
lineNumber: 218,
|
|
121
|
+
columnNumber: 9
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
fileName: import.meta.url,
|
|
126
|
+
lineNumber: 217,
|
|
127
|
+
columnNumber: 7
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}, {
|
|
131
|
+
fileName: import.meta.url,
|
|
132
|
+
lineNumber: 210,
|
|
133
|
+
columnNumber: 5
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=PydanticClassDeclaration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["For","List","childrenArray","splitProps","snakeCase","pydanticModule","Atom","ClassDeclaration","PydanticModelConfigKeys","PydanticClassDeclaration","props","modelConfigProps","bodyProps","rest","bases","BaseModel","modelConfig","modelConfigExpression","children","configEntries","undefined","key","value","push","hasStructuredModelConfig","length","hasExpressionModelConfig","bodyItems","_$memo","ConfigDict","_$createComponent","each","comma","space","k","v","jsValue","fileName","import","meta","url","lineNumber","columnNumber","name","doc","refkey","decorators","hardline","item"],"sources":["../../../../src/components/PydanticClassDeclaration.tsx"],"sourcesContent":[null],"mappings":";AAAA,SACEA,GAAG,EACHC,IAAI,EACJC,aAAa,EACbC,UAAU,QAEL,gBAAgB;AACvB,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,IAAI;AAEb,SAASC,gBAAgB,QAAQ,uBAAuB;;AAExD;AACA;AACA;AACA;AACA;;AAoDA,MAAMC,uBAAuB,GAAG,CAC9B,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,CACkD;AAwBpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,KAAoC,EAAE;EAC7E,MAAM,CAACC,gBAAgB,EAAEC,SAAS,EAAEC,IAAI,CAAC,GAAGV,UAAU,CACpDO,KAAK,EACLF,uBAAuB,EACvB,CAAC,aAAa,EAAE,uBAAuB,EAAE,UAAU,CACrD,CAAC;EACD,MAAMM,KAAK,GAAGD,IAAI,CAACC,KAAK,IAAI,CAACT,cAAc,CAAC,GAAG,CAAC,CAACU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;IAAA,IAEF,GAAG,CAER,CAAC;EACH;EACAf,SAAS,CAACJ,IAAI,CAAC,GAAGrB,aAAa,CAAC,MAAMgB,QAAQ,CAAC,CAAC;EAEhD,OAAAY,iBAAA,CACGvB,gBAAgB;IAAA,IACfoC,IAAIA,CAAA;MAAA,OAAE9B,IAAI,CAAC8B,IAAI;IAAA;IACf7B,KAAK,EAAEA,KAAK;IAAA,IACZ8B,GAAGA,CAAA;MAAA,OAAE/B,IAAI,CAAC+B,GAAG;IAAA;IAAA,IACbC,MAAMA,CAAA;MAAA,OAAEhC,IAAI,CAACgC,MAAM;IAAA;IAAA,IACnBC,UAAUA,CAAA;MAAA,OAAEjC,IAAI,CAACiC,UAAU;IAAA;IAAA,IAAA5B,SAAA;MAAA,OAAAY,iBAAA,CAE1B7B,IAAI;QAAC8C,QAAQ;QAAA,IAAA7B,SAAA;UAAA,OAAAY,iBAAA,CACX9B,GAAG;YAAC+B,IAAI,EAAEJ,SAAS;YAAAT,QAAA,EAAI8B,IAAI,IAAKA;UAAI;YAAAX,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;YAAAC,UAAA;YAAAC,YAAA;UAAA;QAAA;MAAA;QAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAI7C","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic, mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { createMethodSymbol } from "../symbols/factories.js";
|
|
3
|
+
import { DecoratorList } from "./DecoratorList.js";
|
|
3
4
|
import { MethodDeclarationBase } from "./MethodBase.js";
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -17,23 +18,36 @@ import { MethodDeclarationBase } from "./MethodBase.js";
|
|
|
17
18
|
* def identity(value: int) -> None:
|
|
18
19
|
* return value
|
|
19
20
|
* ```
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Use **`decorators`** for decorators that must appear above `@staticmethod`.
|
|
20
24
|
*/
|
|
21
25
|
|
|
22
26
|
export function StaticMethodDeclaration(props) {
|
|
23
27
|
const sym = createMethodSymbol(props.name, {
|
|
24
28
|
refkeys: props.refkey
|
|
25
29
|
});
|
|
26
|
-
|
|
30
|
+
const {
|
|
31
|
+
decorators,
|
|
32
|
+
...rest
|
|
33
|
+
} = props;
|
|
34
|
+
return [_$createComponent(DecoratorList, {
|
|
35
|
+
decorators: decorators
|
|
36
|
+
}, {
|
|
37
|
+
fileName: import.meta.url,
|
|
38
|
+
lineNumber: 34,
|
|
39
|
+
columnNumber: 7
|
|
40
|
+
}), "@staticmethod", _$createIntrinsic("hbr", {}, {
|
|
27
41
|
fileName: import.meta.url,
|
|
28
|
-
lineNumber:
|
|
42
|
+
lineNumber: 36,
|
|
29
43
|
columnNumber: 7
|
|
30
44
|
}), _$createComponent(MethodDeclarationBase, _$mergeProps({
|
|
31
45
|
functionType: "static"
|
|
32
|
-
},
|
|
46
|
+
}, rest, {
|
|
33
47
|
sym: sym
|
|
34
48
|
}), {
|
|
35
49
|
fileName: import.meta.url,
|
|
36
|
-
lineNumber:
|
|
50
|
+
lineNumber: 37,
|
|
37
51
|
columnNumber: 7
|
|
38
52
|
})];
|
|
39
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createMethodSymbol","MethodDeclarationBase","StaticMethodDeclaration","props","sym","name","refkeys","refkey","_$
|
|
1
|
+
{"version":3,"names":["createMethodSymbol","DecoratorList","MethodDeclarationBase","StaticMethodDeclaration","props","sym","name","refkeys","refkey","decorators","rest","_$createComponent","fileName","import","meta","url","lineNumber","columnNumber","_$createIntrinsic","_$mergeProps","functionType"],"sources":["../../../../src/components/StaticMethodDeclaration.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,aAAa;AAEtB,SAASC,qBAAqB,QAAQ,iBAAiB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,SAASC,uBAAuBA,CAACC,KAAmC,EAAE;EAC3E,MAAMC,GAAG,GAAGL,kBAAkB,CAACI,KAAK,CAACE,IAAI,EAAE;IAAEC,OAAO,EAAEH,KAAK,CAACI;EAAO,CAAC,CAAC;EACrE,MAAM;IAAEC,UAAU;IAAE,GAAGC;EAAK,CAAC,GAAGN,KAAK;EACrC,QAAAO,iBAAA,CAEKV,aAAa;IAACQ,UAAU,EAAEA;EAAU;IAAAG,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,IACpC,eAAe,EAAAC,iBAAA;IAAAN,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,IAAAN,iBAAA,CAEfT,qBAAqB,EAAAiB,YAAA;IAACC,YAAY;EAAA,GAAcV,IAAI;IAAEL,GAAG,EAAEA;EAAG;IAAAO,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAGrE","ignoreList":[]}
|
|
@@ -17,6 +17,7 @@ export * from "./MemberExpression.js";
|
|
|
17
17
|
export * from "./MemberScope.js";
|
|
18
18
|
export * from "./MethodDeclaration.js";
|
|
19
19
|
export * from "./PropertyDeclaration.js";
|
|
20
|
+
export * from "./PydanticClassDeclaration.js";
|
|
20
21
|
export * from "./PyDoc.js";
|
|
21
22
|
export * from "./PythonBlock.js";
|
|
22
23
|
export * from "./Reference.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/components/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B;AAC3C,cAAc,2BAA2B;AACzC,cAAc,kBAAkB;AAChC,cAAc,8BAA8B;AAC5C,cAAc,sBAAsB;AACpC,cAAc,iBAAiB;AAE/B,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,uBAAuB;AACrC;AAEA,cAAc,wBAAwB;AACtC,cAAc,0BAA0B;AACxC,cAAc,YAAY;AAC1B,cAAc,kBAAkB;AAChC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,oBAAoB;AAClC,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,0BAA0B;AACxC,cAAc,0BAA0B;AAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/components/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B;AAC3C,cAAc,2BAA2B;AACzC,cAAc,kBAAkB;AAChC,cAAc,8BAA8B;AAC5C,cAAc,sBAAsB;AACpC,cAAc,iBAAiB;AAE/B,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,uBAAuB;AACrC;AAEA,cAAc,wBAAwB;AACtC,cAAc,0BAA0B;AACxC,cAAc,+BAA+B;AAC7C,cAAc,YAAY;AAC1B,cAAc,kBAAkB;AAChC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,oBAAoB;AAClC,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,0BAA0B;AACxC,cAAc,0BAA0B;AAAC","ignoreList":[]}
|