@alloy-js/python 0.5.0-dev.2 → 0.6.0-dev.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/dev/src/components/CallSignature.js +2 -2
  3. package/dist/dev/src/components/CallSignature.js.map +1 -1
  4. package/dist/dev/src/components/ConstructorDeclaration.js +1 -1
  5. package/dist/dev/src/components/ConstructorDeclaration.js.map +1 -1
  6. package/dist/dev/src/components/DataclassDeclaration.js +5 -5
  7. package/dist/dev/src/components/DataclassDeclaration.js.map +1 -1
  8. package/dist/dev/src/components/FunctionBase.js +9 -9
  9. package/dist/dev/src/components/FunctionBase.js.map +1 -1
  10. package/dist/dev/src/components/PropertyDeclaration.js +8 -8
  11. package/dist/dev/src/components/PropertyDeclaration.js.map +1 -1
  12. package/dist/dev/src/components/PyDoc.js +64 -64
  13. package/dist/dev/src/components/PyDoc.js.map +1 -1
  14. package/dist/dev/src/components/PydanticClassDeclaration.js +5 -5
  15. package/dist/dev/src/components/PydanticClassDeclaration.js.map +1 -1
  16. package/dist/dev/src/symbols/python-output-symbol.js.map +1 -1
  17. package/dist/src/components/CallSignature.d.ts.map +1 -1
  18. package/dist/src/components/CallSignature.js.map +1 -1
  19. package/dist/src/components/ConstructorDeclaration.d.ts.map +1 -1
  20. package/dist/src/components/ConstructorDeclaration.js.map +1 -1
  21. package/dist/src/components/DataclassDeclaration.d.ts.map +1 -1
  22. package/dist/src/components/DataclassDeclaration.js.map +1 -1
  23. package/dist/src/components/FunctionBase.d.ts.map +1 -1
  24. package/dist/src/components/FunctionBase.js.map +1 -1
  25. package/dist/src/components/PropertyDeclaration.d.ts.map +1 -1
  26. package/dist/src/components/PropertyDeclaration.js.map +1 -1
  27. package/dist/src/components/PyDoc.d.ts.map +1 -1
  28. package/dist/src/components/PyDoc.js.map +1 -1
  29. package/dist/src/components/PydanticClassDeclaration.d.ts.map +1 -1
  30. package/dist/src/components/PydanticClassDeclaration.js.map +1 -1
  31. package/dist/src/symbols/python-output-symbol.d.ts.map +1 -1
  32. package/dist/src/symbols/python-output-symbol.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/docs/api/components/FunctionalEnumDeclaration.md +3 -6
  35. package/docs/api/components/MemberExpression.md +1 -5
  36. package/docs/api/components/index.md +0 -2
  37. package/docs/api/functions/isTypeRefContext.md +1 -1
  38. package/docs/api/index.md +2 -2
  39. package/docs/api/types/ReferenceProps.md +7 -0
  40. package/docs/api/types/TypeRefContextProps.md +7 -0
  41. package/docs/api/types/index.md +2 -0
  42. package/package.json +10 -9
  43. package/src/components/CallSignature.tsx +4 -2
  44. package/src/components/ConstructorDeclaration.tsx +4 -2
  45. package/src/components/DataclassDeclaration.tsx +1 -2
  46. package/src/components/FunctionBase.tsx +1 -2
  47. package/src/components/PropertyDeclaration.tsx +8 -4
  48. package/src/components/PyDoc.tsx +12 -6
  49. package/src/components/PydanticClassDeclaration.tsx +1 -2
  50. package/src/symbols/python-output-symbol.ts +1 -2
  51. package/temp/api.json +91 -59
  52. package/tsdoc-metadata.json +1 -1
  53. package/vitest.config.ts +1 -0
  54. package/docs/api/components/Reference.md +0 -31
  55. package/docs/api/components/TypeRefContext.md +0 -41
@@ -0,0 +1,7 @@
1
+ # TypeRefContextProps
2
+
3
+ ## Members
4
+
5
+ | | | |
6
+ | -------- | ----------------------------------------- | -------- |
7
+ | children | [Children](../../../core/types/children/) | Children |
@@ -28,5 +28,7 @@
28
28
  - [PythonOutputScope](PythonOutputScope.md) — type PythonOutputScope = PythonLexicalScope | PythonModuleScope | PythonMemberScope;
29
29
  - [PythonOutputSymbol](PythonOutputSymbol.md) — Represents an ‘exported’ symbol from a .py file.
30
30
  - [PythonOutputSymbolOptions](PythonOutputSymbolOptions.md) — Extends [OutputSymbolOptions](../../../core/types/outputsymboloptions/)
31
+ - [ReferenceProps](ReferenceProps.md)
31
32
  - [RefOptions](RefOptions.md)
32
33
  - [SubscriptionProps](SubscriptionProps.md)
34
+ - [TypeRefContextProps](TypeRefContextProps.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alloy-js/python",
3
- "version": "0.5.0-dev.2",
3
+ "version": "0.6.0-dev.0",
4
4
  "description": "Python bindings for Alloy",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,18 +20,19 @@
20
20
  "author": "",
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@alloy-js/core": "~0.23.1 || >= 0.24.0-dev.7",
23
+ "@alloy-js/core": "~0.24.1 || >= 0.25.0-dev.1",
24
24
  "change-case": "^5.4.4",
25
25
  "pathe": "^2.0.3"
26
26
  },
27
27
  "devDependencies": {
28
- "@alloy-js/cli": "~0.23.0 || >= 0.24.0-dev.1",
29
- "@alloy-js/rollup-plugin": "~0.1.1 || >= 0.1.2-dev.2",
30
- "@microsoft/api-extractor": "~7.52.8",
31
- "@rollup/plugin-typescript": "^12.1.2",
32
- "concurrently": "^9.2.0",
33
- "typescript": "^5.8.3",
34
- "vitest": "3.2.4"
28
+ "@alloy-js/cli": "~0.24.0 || >= 0.25.0-dev.0",
29
+ "@alloy-js/rollup-plugin": "~0.1.2 || >= 0.1.3-dev.2",
30
+ "@microsoft/api-extractor": "~7.58.8",
31
+ "@rollup/plugin-typescript": "^12.3.0",
32
+ "@types/node": "^25.9.2",
33
+ "concurrently": "^10.0.3",
34
+ "typescript": "^6.0.3",
35
+ "vitest": "4.1.8"
35
36
  },
36
37
  "type": "module",
37
38
  "scripts": {
@@ -92,8 +92,10 @@ function parameter(param: DeclaredParameterDescriptor) {
92
92
  );
93
93
  }
94
94
 
95
- interface DeclaredParameterDescriptor
96
- extends Omit<ParameterDescriptor, "name"> {
95
+ interface DeclaredParameterDescriptor extends Omit<
96
+ ParameterDescriptor,
97
+ "name"
98
+ > {
97
99
  symbol: PythonOutputSymbol;
98
100
  TypeSlot?: SymbolSlot;
99
101
  }
@@ -18,8 +18,10 @@ import { MethodDeclarationBase } from "./MethodBase.js";
18
18
  * pass
19
19
  * ```
20
20
  */
21
- export interface ConstructorDeclarationProps
22
- extends Omit<CommonFunctionProps, "name"> {
21
+ export interface ConstructorDeclarationProps extends Omit<
22
+ CommonFunctionProps,
23
+ "name"
24
+ > {
23
25
  abstract?: boolean;
24
26
  }
25
27
 
@@ -109,8 +109,7 @@ export type DataclassDecoratorKwargs = Partial<
109
109
  >;
110
110
 
111
111
  export interface DataclassDeclarationProps
112
- extends ClassDeclarationProps,
113
- DataclassDecoratorKwargs {}
112
+ extends ClassDeclarationProps, DataclassDecoratorKwargs {}
114
113
 
115
114
  /**
116
115
  * Renders a Python dataclass.
@@ -16,8 +16,7 @@ import { PythonBlock } from "./PythonBlock.jsx";
16
16
  * metadata with call signature shape.
17
17
  */
18
18
  export interface CommonFunctionProps
19
- extends BaseDeclarationProps,
20
- CallSignatureProps {
19
+ extends BaseDeclarationProps, CallSignatureProps {
21
20
  /** Indicates that the function is async. */
22
21
  async?: boolean;
23
22
  /**
@@ -178,8 +178,10 @@ export function PropertyDeclaration(props: PropertyDeclarationProps) {
178
178
  );
179
179
  }
180
180
 
181
- export interface PropertyMethodDeclarationProps
182
- extends Omit<CommonFunctionProps, "name"> {
181
+ export interface PropertyMethodDeclarationProps extends Omit<
182
+ CommonFunctionProps,
183
+ "name"
184
+ > {
183
185
  abstract?: boolean;
184
186
  }
185
187
 
@@ -206,8 +208,10 @@ function PropertyMethodDeclaration(props: PropertyMethodDeclarationProps) {
206
208
  );
207
209
  }
208
210
 
209
- interface PropertyMethodBaseProps
210
- extends Omit<PropertyMethodDeclarationProps, "name"> {
211
+ interface PropertyMethodBaseProps extends Omit<
212
+ PropertyMethodDeclarationProps,
213
+ "name"
214
+ > {
211
215
  decoratorType: "setter" | "deleter";
212
216
  parameters?: (ParameterDescriptor | string)[];
213
217
  }
@@ -537,8 +537,10 @@ function GoogleStylePropertyDoc(props: GoogleStylePropertyDocProps) {
537
537
  return <PyDoc>{children}</PyDoc>;
538
538
  }
539
539
 
540
- interface GoogleStyleGeneratorDocProps
541
- extends Omit<GeneratorDocProps, "style"> {}
540
+ interface GoogleStyleGeneratorDocProps extends Omit<
541
+ GeneratorDocProps,
542
+ "style"
543
+ > {}
542
544
 
543
545
  /**
544
546
  * A component that creates a GoogleStyleGeneratorDoc block for generators.
@@ -577,8 +579,10 @@ function GoogleStyleGeneratorDoc(props: GoogleStyleGeneratorDocProps) {
577
579
  return <PyDoc>{children}</PyDoc>;
578
580
  }
579
581
 
580
- interface GoogleStyleExceptionDocProps
581
- extends Omit<ExceptionDocProps, "style"> {}
582
+ interface GoogleStyleExceptionDocProps extends Omit<
583
+ ExceptionDocProps,
584
+ "style"
585
+ > {}
582
586
 
583
587
  /**
584
588
  * A component that creates a GoogleStyleExceptionDoc block for exceptions.
@@ -612,8 +616,10 @@ function GoogleStyleExceptionDoc(props: GoogleStyleExceptionDocProps) {
612
616
  return <PyDoc>{children}</PyDoc>;
613
617
  }
614
618
 
615
- interface GoogleStyleAttributeDocProps
616
- extends Omit<AttributeDocProps, "style"> {}
619
+ interface GoogleStyleAttributeDocProps extends Omit<
620
+ AttributeDocProps,
621
+ "style"
622
+ > {}
617
623
 
618
624
  /**
619
625
  * A component that creates a GoogleStyleAttributeDoc block for attributes.
@@ -95,8 +95,7 @@ const PydanticModelConfigKeys = [
95
95
  ] as const satisfies readonly (keyof PydanticModelConfigDictProps)[];
96
96
 
97
97
  export interface PydanticClassDeclarationProps
98
- extends ClassDeclarationProps,
99
- PydanticModelConfigDictProps {
98
+ extends ClassDeclarationProps, PydanticModelConfigDictProps {
100
99
  /**
101
100
  * Canonical structured config object for `ConfigDict(...)`. Values here are
102
101
  * merged with top-level config props.
@@ -16,8 +16,7 @@ export interface PythonOutputSymbolOptions extends OutputSymbolOptions {
16
16
  typeOnly?: boolean;
17
17
  }
18
18
 
19
- export interface CreatePythonSymbolFunctionOptions
20
- extends PythonOutputSymbolOptions {
19
+ export interface CreatePythonSymbolFunctionOptions extends PythonOutputSymbolOptions {
21
20
  name: string;
22
21
  }
23
22