@alloy-js/python 0.5.0-dev.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/dev/src/components/CallSignature.js +2 -2
- package/dist/dev/src/components/CallSignature.js.map +1 -1
- package/dist/dev/src/components/ConstructorDeclaration.js +1 -1
- package/dist/dev/src/components/ConstructorDeclaration.js.map +1 -1
- package/dist/dev/src/components/DataclassDeclaration.js +5 -5
- package/dist/dev/src/components/DataclassDeclaration.js.map +1 -1
- package/dist/dev/src/components/FunctionBase.js +9 -9
- package/dist/dev/src/components/FunctionBase.js.map +1 -1
- package/dist/dev/src/components/PropertyDeclaration.js +8 -8
- package/dist/dev/src/components/PropertyDeclaration.js.map +1 -1
- package/dist/dev/src/components/PyDoc.js +64 -64
- package/dist/dev/src/components/PyDoc.js.map +1 -1
- package/dist/dev/src/components/PydanticClassDeclaration.js +5 -5
- package/dist/dev/src/components/PydanticClassDeclaration.js.map +1 -1
- package/dist/dev/src/symbols/python-output-symbol.js.map +1 -1
- package/dist/src/components/CallSignature.d.ts.map +1 -1
- package/dist/src/components/CallSignature.js.map +1 -1
- package/dist/src/components/ConstructorDeclaration.d.ts.map +1 -1
- package/dist/src/components/ConstructorDeclaration.js.map +1 -1
- package/dist/src/components/DataclassDeclaration.d.ts.map +1 -1
- package/dist/src/components/DataclassDeclaration.js.map +1 -1
- package/dist/src/components/FunctionBase.d.ts.map +1 -1
- package/dist/src/components/FunctionBase.js.map +1 -1
- package/dist/src/components/PropertyDeclaration.d.ts.map +1 -1
- package/dist/src/components/PropertyDeclaration.js.map +1 -1
- package/dist/src/components/PyDoc.d.ts.map +1 -1
- package/dist/src/components/PyDoc.js.map +1 -1
- package/dist/src/components/PydanticClassDeclaration.d.ts.map +1 -1
- package/dist/src/components/PydanticClassDeclaration.js.map +1 -1
- package/dist/src/symbols/python-output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/python-output-symbol.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/api/components/FunctionalEnumDeclaration.md +3 -6
- package/docs/api/components/MemberExpression.md +1 -5
- package/docs/api/components/index.md +0 -2
- package/docs/api/functions/isTypeRefContext.md +1 -1
- package/docs/api/index.md +2 -2
- package/docs/api/types/ReferenceProps.md +7 -0
- package/docs/api/types/TypeRefContextProps.md +7 -0
- package/docs/api/types/index.md +2 -0
- package/package.json +11 -10
- package/src/components/CallSignature.tsx +4 -2
- package/src/components/ConstructorDeclaration.tsx +4 -2
- package/src/components/DataclassDeclaration.tsx +1 -2
- package/src/components/FunctionBase.tsx +1 -2
- package/src/components/PropertyDeclaration.tsx +8 -4
- package/src/components/PyDoc.tsx +12 -6
- package/src/components/PydanticClassDeclaration.tsx +1 -2
- package/src/symbols/python-output-symbol.ts +1 -2
- package/temp/api.json +91 -59
- package/tsdoc-metadata.json +1 -1
- package/vitest.config.ts +1 -0
- package/docs/api/components/Reference.md +0 -31
- package/docs/api/components/TypeRefContext.md +0 -41
package/tsdoc-metadata.json
CHANGED
package/vitest.config.ts
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Reference
|
|
2
|
-
|
|
3
|
-
A Python reference to a symbol, such as a variable, function, or class.
|
|
4
|
-
|
|
5
|
-
* jsx
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import { Reference } from "@alloy-js/python";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<Reference refkey={Refkey} />
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
* stc
|
|
15
|
-
|
|
16
|
-
```ts
|
|
17
|
-
import { Reference } from "@alloy-js/python/stc";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Reference({ refkey: Refkey }).children(children)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
| | | |
|
|
26
|
-
| ------ | ------------------------------------- | - |
|
|
27
|
-
| refkey | [Refkey](../../../core/types/refkey/) | |
|
|
28
|
-
|
|
29
|
-
## Remarks
|
|
30
|
-
|
|
31
|
-
This component is used to render references to symbols in Python code. It takes a `refkey` prop which is the key of the symbol to reference.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# TypeRefContext
|
|
2
|
-
|
|
3
|
-
Set the current context of reference to be type reference.
|
|
4
|
-
|
|
5
|
-
* jsx
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import { TypeRefContext } from "@alloy-js/python";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<TypeRefContext >
|
|
12
|
-
{children}
|
|
13
|
-
</TypeRefContext>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
* stc
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import { TypeRefContext } from "@alloy-js/python/stc";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
TypeRefContext({ }).children(children)
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| | | |
|
|
28
|
-
| -------- | ----------------------------------------- | -------- |
|
|
29
|
-
| children | [Children](../../../core/types/children/) | Children |
|
|
30
|
-
|
|
31
|
-
## Remarks
|
|
32
|
-
|
|
33
|
-
References used inside the children of this component will be treated as type-only references. When a symbol is only referenced in type contexts, it will be imported inside a `if TYPE_CHECKING:` block.
|
|
34
|
-
|
|
35
|
-
## Example
|
|
36
|
-
|
|
37
|
-
```tsx
|
|
38
|
-
<TypeRefContext>
|
|
39
|
-
{someTypeRefkey}
|
|
40
|
-
</TypeRefContext>
|
|
41
|
-
```
|