@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
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.9"
8
+ "packageVersion": "7.58.8"
9
9
  }
10
10
  ]
11
11
  }
package/vitest.config.ts CHANGED
@@ -15,6 +15,7 @@ export default defineConfig({
15
15
  sourcemap: "both",
16
16
  },
17
17
  test: {
18
+ exclude: ["**/dist/**", "**/node_modules/**"],
18
19
  setupFiles: ["./test/vitest.setup.ts"],
19
20
  },
20
21
  plugins: [alloyPlugin()],
@@ -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
- ```