@xyd-js/sources 0.0.1-xyd.0 → 0.1.1-build.161

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 (110) hide show
  1. package/CHANGELOG.md +1342 -0
  2. package/ISSUES.md +10 -0
  3. package/LICENSE +21 -0
  4. package/TODO.md +5 -2
  5. package/__fixtures__/-1.typescript/package.json +5 -0
  6. package/__fixtures__/-1.typescript/src/index.ts +0 -0
  7. package/__fixtures__/-1.typescript/src/settings.ts +592 -0
  8. package/__fixtures__/-1.typescript/tsconfig.json +8 -0
  9. package/__fixtures__/-2.react.basic/1.flat-interface.output.json +114 -0
  10. package/__fixtures__/-2.react.basic/2.file-connect-interface.output.json +60 -0
  11. package/__fixtures__/-2.react.basic/2a.file-connect-interface-advanced.output.json +92 -0
  12. package/__fixtures__/-2.react.basic/3.props-as-variants.output.json +166 -0
  13. package/__fixtures__/-2.react.basic/4.outside-interface.output.json +60 -0
  14. package/__fixtures__/-2.react.basic/5.inline-props.output.json +60 -0
  15. package/__fixtures__/-2.react.basic/5.outside-inline-props.output.json +60 -0
  16. package/__fixtures__/-2.react.basic/5a.inline-props+outside.output.json +60 -0
  17. package/__fixtures__/-2.react.basic/5b.inline-props+interfaces.output.json +92 -0
  18. package/__fixtures__/-2.react.basic/package.json +4 -0
  19. package/__fixtures__/-2.react.basic/src/1.flat-interface.tsx +41 -0
  20. package/__fixtures__/-2.react.basic/src/2.file-connect-interface.tsx +28 -0
  21. package/__fixtures__/-2.react.basic/src/2a.file-connect-interace+advanced.tsx +54 -0
  22. package/__fixtures__/-2.react.basic/src/3.props-as-variants.tsx +67 -0
  23. package/__fixtures__/-2.react.basic/src/4.outside-interface.tsx +13 -0
  24. package/__fixtures__/-2.react.basic/src/4.outside-interface2.ts +15 -0
  25. package/__fixtures__/-2.react.basic/src/5.inline-props.tsx +19 -0
  26. package/__fixtures__/-2.react.basic/src/5a.inline-props+outside.tsx +19 -0
  27. package/__fixtures__/-2.react.basic/src/5b.inline-props+interfaces.tsx +62 -0
  28. package/__fixtures__/-2.react.basic/src/index.ts +0 -0
  29. package/__fixtures__/-2.react.basic/tsconfig.json +8 -0
  30. package/__tests__/sourcesToUniform.test.ts +167 -0
  31. package/__tests__/testResolvePropertySymbol.ts +838 -0
  32. package/__tests__/types.ts +12 -0
  33. package/__tests__/utils.ts +108 -0
  34. package/dist/index.cjs +0 -645
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +1 -82
  37. package/dist/index.d.ts +1 -82
  38. package/dist/index.js +0 -611
  39. package/dist/index.js.map +1 -1
  40. package/dist/react.cjs +237 -0
  41. package/dist/react.cjs.map +1 -0
  42. package/dist/react.d.cts +6 -0
  43. package/dist/react.d.ts +6 -0
  44. package/dist/react.js +212 -0
  45. package/dist/react.js.map +1 -0
  46. package/dist/ts.cjs +1794 -0
  47. package/dist/ts.cjs.map +1 -0
  48. package/dist/ts.d.cts +14 -0
  49. package/dist/ts.d.ts +14 -0
  50. package/dist/ts.js +1760 -0
  51. package/dist/ts.js.map +1 -0
  52. package/package.json +23 -4
  53. package/packages/react/index.ts +1 -0
  54. package/packages/react/uniformToReactUniform.ts +275 -0
  55. package/{src → packages/ts}/SignatureText.ts +26 -7
  56. package/packages/ts/TypeDocTransformer.ts +1519 -0
  57. package/packages/ts/__fixtures__/packages2/package-a/package.json +4 -0
  58. package/packages/ts/__fixtures__/packages2/package-a/src/index.ts +496 -0
  59. package/packages/ts/__fixtures__/packages2/package-a/tsconfig.json +6 -0
  60. package/packages/ts/__fixtures__/packages3/package-a/package.json +4 -0
  61. package/packages/ts/__fixtures__/packages3/package-a/src/index.ts +488 -0
  62. package/packages/ts/__fixtures__/packages3/package-a/tsconfig.json +6 -0
  63. package/packages/ts/__fixtures__/packages3/project.json +171 -0
  64. package/packages/ts/__fixtures__/react/react-a/package.json +5 -0
  65. package/packages/ts/__fixtures__/react/react-a/src/TestAbc.tsx +90 -0
  66. package/packages/ts/__fixtures__/react/react-a/src/TestBasic.tsx +27 -0
  67. package/packages/ts/__fixtures__/react/react-a/src/TestNamedParameters.tsx +27 -0
  68. package/packages/ts/__fixtures__/react/react-a/src/TestNamedParameters2.tsx +26 -0
  69. package/packages/ts/__fixtures__/react/react-a/src/TestUnion.tsx +32 -0
  70. package/packages/ts/__fixtures__/react/react-a/src/index.ts +1 -0
  71. package/packages/ts/__fixtures__/react/react-a/tsconfig.json +8 -0
  72. package/packages/ts/__fixtures__/references-output-project.json +344 -0
  73. package/packages/ts/__fixtures__/references-output-react.json +68 -0
  74. package/packages/ts/__fixtures__/references-output.json +129 -0
  75. package/packages/ts/__tests__/sourcesToUniform.test.ts +106 -0
  76. package/packages/ts/context.ts +0 -0
  77. package/packages/ts/converterts/ts-class.ts +0 -0
  78. package/packages/ts/converterts/ts-enum.ts +0 -0
  79. package/packages/ts/converterts/ts-function.ts +0 -0
  80. package/packages/ts/converterts/ts-interface.ts +0 -0
  81. package/packages/ts/converterts/ts-type.ts +0 -0
  82. package/packages/ts/index.ts +129 -0
  83. package/packages/ts/ts-core.ts +0 -0
  84. package/packages/ts/uniformToMiniUniform.ts +486 -0
  85. package/src/index.ts +0 -45
  86. package/tsconfig.json +9 -1
  87. package/tsup.config.ts +4 -4
  88. package/vitest.config.ts +34 -0
  89. package/dist/example.cjs +0 -642
  90. package/dist/example.cjs.map +0 -1
  91. package/dist/example.d.cts +0 -2
  92. package/dist/example.d.ts +0 -2
  93. package/dist/example.js +0 -618
  94. package/dist/example.js.map +0 -1
  95. package/docs/README.md +0 -20
  96. package/docs/classes/ExampleClass.md +0 -35
  97. package/docs/functions/gqlSchemaToReferences.md +0 -27
  98. package/docs/functions/helloWorld.md +0 -17
  99. package/docs/functions/helloWorldV2.md +0 -33
  100. package/docs/functions/helloWorldV3.md +0 -35
  101. package/docs.json +0 -551
  102. package/references_todo.json +0 -220
  103. package/src/TypeDocTransformer.ts +0 -572
  104. /package/{example → packages/ts/__fixtures__/packages}/package-a/package.json +0 -0
  105. /package/{example → packages/ts/__fixtures__/packages}/package-a/src/index.ts +0 -0
  106. /package/{example → packages/ts/__fixtures__/packages}/package-a/tsconfig.json +0 -0
  107. /package/{example → packages/ts/__fixtures__/packages}/package-b/package.json +0 -0
  108. /package/{example → packages/ts/__fixtures__/packages}/package-b/src/billing.ts +0 -0
  109. /package/{example → packages/ts/__fixtures__/packages}/package-b/src/index.ts +0 -0
  110. /package/{example → packages/ts/__fixtures__/packages}/package-b/tsconfig.json +0 -0
@@ -1,220 +0,0 @@
1
- [
2
- {
3
- "title": "Class ExampleClass",
4
- "canonical": "class-ExampleClass",
5
- "description": "---\ntitle: ExampleClass \ngroup: [Source Code, Classes]\n---\nReturns a personalized hello world message.\n",
6
- "context": {
7
- "fileName": "index.ts",
8
- "fileFullPath": "src/index.ts",
9
- "line": 32,
10
- "col": 13,
11
- "signatureText": {
12
- "code": "export class ExampleClass {\n}",
13
- "lang": "ts"
14
- },
15
- "sourcecode": {
16
- "code": "export class ExampleClass {\n /**\n * Returns a hello world message.\n */\n helloWorld(): string {\n return 'Hello world!';\n }\n}",
17
- "lang": "ts"
18
- },
19
- "package": "@xyd-sources-examples/package-a"
20
- },
21
- "examples": {
22
- "groups": []
23
- },
24
- "definitions": [
25
- {
26
- "title": "Constructor",
27
- "properties": []
28
- },
29
- {
30
- "title": "Methods",
31
- "properties": [
32
- {
33
- "name": "helloWorld",
34
- "type": "string",
35
- "description": "Returns a hello world message.\n"
36
- }
37
- ]
38
- }
39
- ]
40
- },
41
- {
42
- "title": "Function gqlSchemaToReferences",
43
- "canonical": "fn-gqlSchemaToReferences",
44
- "description": "---\ntitle: gqlSchemaToReferences\nabc: 123\ngroup: [Sourc, Functions]\n---\nConverts a GraphQL schema file to references.\n",
45
- "context": {
46
- "fileName": "index.ts",
47
- "fileFullPath": "src/index.ts",
48
- "line": 48,
49
- "col": 16,
50
- "signatureText": {
51
- "code": "export function gqlSchemaToReferences(schemaLocation: string): Promise<[\n]>;",
52
- "lang": "ts"
53
- },
54
- "sourcecode": {
55
- "code": "export function gqlSchemaToReferences(\n schemaLocation: string\n): Promise<[]> {\n if (schemaLocation.endsWith(\".graphql\")) {\n return Promise.resolve([])\n }\n\n return Promise.resolve([])\n}",
56
- "lang": "ts"
57
- },
58
- "package": "@xyd-sources-examples/package-a"
59
- },
60
- "examples": {
61
- "groups": []
62
- },
63
- "definitions": [
64
- {
65
- "title": "Returns",
66
- "properties": [
67
- {
68
- "name": "",
69
- "type": "<Promise>",
70
- "description": "references\n"
71
- }
72
- ]
73
- },
74
- {
75
- "title": "Parameters",
76
- "properties": [
77
- {
78
- "name": "schemaLocation",
79
- "type": "string",
80
- "description": "The location of the schema file.\n"
81
- }
82
- ]
83
- }
84
- ]
85
- },
86
- {
87
- "title": "Function helloWorld",
88
- "canonical": "fn-helloWorld",
89
- "description": "---\ntitle: helloWorld\nabc: 123\ngroup: [Sourc, Functions]\n---\nReturns a hello world message.\n",
90
- "context": {
91
- "fileName": "index.ts",
92
- "fileFullPath": "src/index.ts",
93
- "line": 4,
94
- "col": 16,
95
- "signatureText": {
96
- "code": "export function helloWorld(): string;",
97
- "lang": "ts"
98
- },
99
- "sourcecode": {
100
- "code": "export function helloWorld(): string {\n return 'Hello world!';\n}",
101
- "lang": "ts"
102
- },
103
- "package": "@xyd-sources-examples/package-a"
104
- },
105
- "examples": {
106
- "groups": []
107
- },
108
- "definitions": [
109
- {
110
- "title": "Returns",
111
- "properties": [
112
- {
113
- "name": "",
114
- "type": "string",
115
- "description": ""
116
- }
117
- ]
118
- },
119
- {
120
- "title": "Parameters",
121
- "properties": []
122
- }
123
- ]
124
- },
125
- {
126
- "title": "Function helloWorldV2",
127
- "canonical": "fn-helloWorldV2",
128
- "description": "---\ntitle: helloWorldV2\nabc: 123\ngroup: [Sourc, Functions]\n---\nReturns a personalized hello world message.\n",
129
- "context": {
130
- "fileName": "index.ts",
131
- "fileFullPath": "src/index.ts",
132
- "line": 15,
133
- "col": 16,
134
- "signatureText": {
135
- "code": "export function helloWorldV2(name: string, enthusiastic: boolean = false): string;",
136
- "lang": "ts"
137
- },
138
- "sourcecode": {
139
- "code": "export function helloWorldV2(name: string, enthusiastic: boolean = false): string {\n return enthusiastic ? `Hello, ${name}!` : `Hello, ${name}`;\n}",
140
- "lang": "ts"
141
- },
142
- "package": "@xyd-sources-examples/package-a"
143
- },
144
- "examples": {
145
- "groups": []
146
- },
147
- "definitions": [
148
- {
149
- "title": "Returns",
150
- "properties": [
151
- {
152
- "name": "",
153
- "type": "string",
154
- "description": "A greeting message string.\n"
155
- }
156
- ]
157
- },
158
- {
159
- "title": "Parameters",
160
- "properties": [
161
- {
162
- "name": "name",
163
- "type": "string",
164
- "description": "Name of the person to greet.\n"
165
- },
166
- {
167
- "name": "enthusiastic",
168
- "type": "boolean",
169
- "description": "If true, adds an exclamation point to the greeting.\n"
170
- }
171
- ]
172
- }
173
- ]
174
- },
175
- {
176
- "title": "Function helloWorldV3",
177
- "canonical": "fn-helloWorldV3",
178
- "description": "---\ntitle: helloWorldV3\nabc: 123\ngroup: [Sourc, Functions]\n---\nReturns a personalized hello world message.\n",
179
- "context": {
180
- "fileName": "index.ts",
181
- "fileFullPath": "src/index.ts",
182
- "line": 25,
183
- "col": 16,
184
- "signatureText": {
185
- "code": "export function helloWorldV3<T>(name: T): string;",
186
- "lang": "ts"
187
- },
188
- "sourcecode": {
189
- "code": "export function helloWorldV3<T>(name: T): string {\n return `Hello, ${name}!`\n}",
190
- "lang": "ts"
191
- },
192
- "package": "@xyd-sources-examples/package-a"
193
- },
194
- "examples": {
195
- "groups": []
196
- },
197
- "definitions": [
198
- {
199
- "title": "Returns",
200
- "properties": [
201
- {
202
- "name": "",
203
- "type": "string",
204
- "description": "A greeting message string.\n"
205
- }
206
- ]
207
- },
208
- {
209
- "title": "Parameters",
210
- "properties": [
211
- {
212
- "name": "name",
213
- "type": "<T>",
214
- "description": "Name of the person to greet.\n"
215
- }
216
- ]
217
- }
218
- ]
219
- }
220
- ]