@xyd-js/sources 0.1.1-xyd.2 → 0.1.1-xyd.44

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 (109) hide show
  1. package/CHANGELOG.md +350 -0
  2. package/ISSUES.md +10 -0
  3. package/TODO.md +5 -2
  4. package/__fixtures__/-1.typescript/package.json +5 -0
  5. package/__fixtures__/-1.typescript/src/index.ts +0 -0
  6. package/__fixtures__/-1.typescript/src/settings.ts +592 -0
  7. package/__fixtures__/-1.typescript/tsconfig.json +8 -0
  8. package/__fixtures__/-2.react.basic/1.flat-interface.output.json +90 -0
  9. package/__fixtures__/-2.react.basic/2.file-connect-interface.output.json +60 -0
  10. package/__fixtures__/-2.react.basic/2a.file-connect-interface-advanced.output.json +92 -0
  11. package/__fixtures__/-2.react.basic/3.props-as-variants.output.json +166 -0
  12. package/__fixtures__/-2.react.basic/4.outside-interface.output.json +60 -0
  13. package/__fixtures__/-2.react.basic/5.inline-props.output.json +60 -0
  14. package/__fixtures__/-2.react.basic/5.outside-inline-props.output.json +60 -0
  15. package/__fixtures__/-2.react.basic/5a.inline-props+outside.output.json +60 -0
  16. package/__fixtures__/-2.react.basic/5b.inline-props+interfaces.output.json +92 -0
  17. package/__fixtures__/-2.react.basic/package.json +4 -0
  18. package/__fixtures__/-2.react.basic/src/1.flat-interface.tsx +41 -0
  19. package/__fixtures__/-2.react.basic/src/2.file-connect-interface.tsx +28 -0
  20. package/__fixtures__/-2.react.basic/src/2a.file-connect-interace+advanced.tsx +54 -0
  21. package/__fixtures__/-2.react.basic/src/3.props-as-variants.tsx +67 -0
  22. package/__fixtures__/-2.react.basic/src/4.outside-interface.tsx +13 -0
  23. package/__fixtures__/-2.react.basic/src/4.outside-interface2.ts +15 -0
  24. package/__fixtures__/-2.react.basic/src/5.inline-props.tsx +19 -0
  25. package/__fixtures__/-2.react.basic/src/5a.inline-props+outside.tsx +19 -0
  26. package/__fixtures__/-2.react.basic/src/5b.inline-props+interfaces.tsx +62 -0
  27. package/__fixtures__/-2.react.basic/src/index.ts +0 -0
  28. package/__fixtures__/-2.react.basic/tsconfig.json +8 -0
  29. package/__tests__/sourcesToUniform.test.ts +155 -0
  30. package/__tests__/testResolvePropertySymbol.ts +838 -0
  31. package/__tests__/types.ts +12 -0
  32. package/__tests__/utils.ts +108 -0
  33. package/dist/index.cjs +0 -645
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +1 -82
  36. package/dist/index.d.ts +1 -82
  37. package/dist/index.js +0 -611
  38. package/dist/index.js.map +1 -1
  39. package/dist/react.cjs +236 -0
  40. package/dist/react.cjs.map +1 -0
  41. package/dist/react.d.cts +6 -0
  42. package/dist/react.d.ts +6 -0
  43. package/dist/react.js +211 -0
  44. package/dist/react.js.map +1 -0
  45. package/dist/ts.cjs +1794 -0
  46. package/dist/ts.cjs.map +1 -0
  47. package/dist/ts.d.cts +14 -0
  48. package/dist/ts.d.ts +14 -0
  49. package/dist/ts.js +1760 -0
  50. package/dist/ts.js.map +1 -0
  51. package/package.json +22 -4
  52. package/packages/react/index.ts +1 -0
  53. package/packages/react/uniformToReactUniform.ts +274 -0
  54. package/{src → packages/ts}/SignatureText.ts +26 -7
  55. package/packages/ts/TypeDocTransformer.ts +1519 -0
  56. package/packages/ts/__fixtures__/packages2/package-a/package.json +4 -0
  57. package/packages/ts/__fixtures__/packages2/package-a/src/index.ts +496 -0
  58. package/packages/ts/__fixtures__/packages2/package-a/tsconfig.json +6 -0
  59. package/packages/ts/__fixtures__/packages3/package-a/package.json +4 -0
  60. package/packages/ts/__fixtures__/packages3/package-a/src/index.ts +488 -0
  61. package/packages/ts/__fixtures__/packages3/package-a/tsconfig.json +6 -0
  62. package/packages/ts/__fixtures__/packages3/project.json +171 -0
  63. package/packages/ts/__fixtures__/react/react-a/package.json +5 -0
  64. package/packages/ts/__fixtures__/react/react-a/src/TestAbc.tsx +90 -0
  65. package/packages/ts/__fixtures__/react/react-a/src/TestBasic.tsx +27 -0
  66. package/packages/ts/__fixtures__/react/react-a/src/TestNamedParameters.tsx +27 -0
  67. package/packages/ts/__fixtures__/react/react-a/src/TestNamedParameters2.tsx +26 -0
  68. package/packages/ts/__fixtures__/react/react-a/src/TestUnion.tsx +32 -0
  69. package/packages/ts/__fixtures__/react/react-a/src/index.ts +1 -0
  70. package/packages/ts/__fixtures__/react/react-a/tsconfig.json +8 -0
  71. package/packages/ts/__fixtures__/references-output-project.json +344 -0
  72. package/packages/ts/__fixtures__/references-output-react.json +68 -0
  73. package/packages/ts/__fixtures__/references-output.json +129 -0
  74. package/packages/ts/__tests__/sourcesToUniform.test.ts +95 -0
  75. package/packages/ts/context.ts +0 -0
  76. package/packages/ts/converterts/ts-class.ts +0 -0
  77. package/packages/ts/converterts/ts-enum.ts +0 -0
  78. package/packages/ts/converterts/ts-function.ts +0 -0
  79. package/packages/ts/converterts/ts-interface.ts +0 -0
  80. package/packages/ts/converterts/ts-type.ts +0 -0
  81. package/packages/ts/index.ts +129 -0
  82. package/packages/ts/ts-core.ts +0 -0
  83. package/packages/ts/uniformToMiniUniform.ts +486 -0
  84. package/src/index.ts +0 -45
  85. package/tsconfig.json +9 -1
  86. package/tsup.config.ts +4 -4
  87. package/vitest.config.ts +34 -0
  88. package/dist/example.cjs +0 -642
  89. package/dist/example.cjs.map +0 -1
  90. package/dist/example.d.cts +0 -2
  91. package/dist/example.d.ts +0 -2
  92. package/dist/example.js +0 -618
  93. package/dist/example.js.map +0 -1
  94. package/docs/README.md +0 -20
  95. package/docs/classes/ExampleClass.md +0 -35
  96. package/docs/functions/gqlSchemaToReferences.md +0 -27
  97. package/docs/functions/helloWorld.md +0 -17
  98. package/docs/functions/helloWorldV2.md +0 -33
  99. package/docs/functions/helloWorldV3.md +0 -35
  100. package/docs.json +0 -551
  101. package/references_todo.json +0 -220
  102. package/src/TypeDocTransformer.ts +0 -572
  103. /package/{example → packages/ts/__fixtures__/packages}/package-a/package.json +0 -0
  104. /package/{example → packages/ts/__fixtures__/packages}/package-a/src/index.ts +0 -0
  105. /package/{example → packages/ts/__fixtures__/packages}/package-a/tsconfig.json +0 -0
  106. /package/{example → packages/ts/__fixtures__/packages}/package-b/package.json +0 -0
  107. /package/{example → packages/ts/__fixtures__/packages}/package-b/src/billing.ts +0 -0
  108. /package/{example → packages/ts/__fixtures__/packages}/package-b/src/index.ts +0 -0
  109. /package/{example → packages/ts/__fixtures__/packages}/package-b/tsconfig.json +0 -0
package/docs.json DELETED
@@ -1,551 +0,0 @@
1
- {
2
- "schemaVersion": "2.0",
3
- "id": 19,
4
- "name": "@xyd-sources-examples/package-a",
5
- "variant": "project",
6
- "kind": 1,
7
- "flags": {},
8
- "children": [
9
- {
10
- "id": 20,
11
- "name": "ExampleClass",
12
- "variant": "declaration",
13
- "kind": 128,
14
- "flags": {},
15
- "comment": {
16
- "summary": [
17
- {
18
- "kind": "text",
19
- "text": "Returns a personalized hello world message."
20
- }
21
- ]
22
- },
23
- "children": [
24
- {
25
- "id": 21,
26
- "name": "constructor",
27
- "variant": "declaration",
28
- "kind": 512,
29
- "flags": {},
30
- "signatures": [
31
- {
32
- "id": 22,
33
- "name": "ExampleClass",
34
- "variant": "signature",
35
- "kind": 16384,
36
- "flags": {},
37
- "type": {
38
- "type": "reference",
39
- "target": 20,
40
- "name": "ExampleClass",
41
- "package": "@xyd-sources-examples/package-a"
42
- }
43
- }
44
- ]
45
- },
46
- {
47
- "id": 23,
48
- "name": "helloWorld",
49
- "variant": "declaration",
50
- "kind": 2048,
51
- "flags": {},
52
- "sources": [
53
- {
54
- "fileName": "index.ts",
55
- "line": 36,
56
- "character": 4,
57
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L36"
58
- }
59
- ],
60
- "signatures": [
61
- {
62
- "id": 24,
63
- "name": "helloWorld",
64
- "variant": "signature",
65
- "kind": 4096,
66
- "flags": {},
67
- "comment": {
68
- "summary": [
69
- {
70
- "kind": "text",
71
- "text": "Returns a hello world message."
72
- }
73
- ]
74
- },
75
- "sources": [
76
- {
77
- "fileName": "index.ts",
78
- "line": 36,
79
- "character": 4,
80
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L36"
81
- }
82
- ],
83
- "type": {
84
- "type": "intrinsic",
85
- "name": "string"
86
- }
87
- }
88
- ]
89
- }
90
- ],
91
- "groups": [
92
- {
93
- "title": "Constructors",
94
- "children": [
95
- 21
96
- ]
97
- },
98
- {
99
- "title": "Methods",
100
- "children": [
101
- 23
102
- ]
103
- }
104
- ],
105
- "sources": [
106
- {
107
- "fileName": "index.ts",
108
- "line": 32,
109
- "character": 13,
110
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L32"
111
- }
112
- ]
113
- },
114
- {
115
- "id": 25,
116
- "name": "gqlSchemaToReferences",
117
- "variant": "declaration",
118
- "kind": 64,
119
- "flags": {},
120
- "sources": [
121
- {
122
- "fileName": "index.ts",
123
- "line": 48,
124
- "character": 16,
125
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L48"
126
- }
127
- ],
128
- "signatures": [
129
- {
130
- "id": 26,
131
- "name": "gqlSchemaToReferences",
132
- "variant": "signature",
133
- "kind": 4096,
134
- "flags": {},
135
- "comment": {
136
- "summary": [
137
- {
138
- "kind": "text",
139
- "text": "Converts a GraphQL schema file to references."
140
- }
141
- ],
142
- "blockTags": [
143
- {
144
- "tag": "@returns",
145
- "content": [
146
- {
147
- "kind": "text",
148
- "text": "references"
149
- }
150
- ]
151
- }
152
- ]
153
- },
154
- "sources": [
155
- {
156
- "fileName": "index.ts",
157
- "line": 48,
158
- "character": 16,
159
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L48"
160
- }
161
- ],
162
- "parameters": [
163
- {
164
- "id": 27,
165
- "name": "schemaLocation",
166
- "variant": "param",
167
- "kind": 32768,
168
- "flags": {},
169
- "comment": {
170
- "summary": [
171
- {
172
- "kind": "text",
173
- "text": "The location of the schema file."
174
- }
175
- ]
176
- },
177
- "type": {
178
- "type": "intrinsic",
179
- "name": "string"
180
- }
181
- }
182
- ],
183
- "type": {
184
- "type": "reference",
185
- "target": {
186
- "packageName": "typescript",
187
- "packagePath": "lib/lib.es5.d.ts",
188
- "qualifiedName": "Promise"
189
- },
190
- "typeArguments": [
191
- {
192
- "type": "tuple"
193
- }
194
- ],
195
- "name": "Promise",
196
- "package": "typescript"
197
- }
198
- }
199
- ]
200
- },
201
- {
202
- "id": 28,
203
- "name": "helloWorld",
204
- "variant": "declaration",
205
- "kind": 64,
206
- "flags": {},
207
- "sources": [
208
- {
209
- "fileName": "index.ts",
210
- "line": 4,
211
- "character": 16,
212
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L4"
213
- }
214
- ],
215
- "signatures": [
216
- {
217
- "id": 29,
218
- "name": "helloWorld",
219
- "variant": "signature",
220
- "kind": 4096,
221
- "flags": {},
222
- "comment": {
223
- "summary": [
224
- {
225
- "kind": "text",
226
- "text": "Returns a hello world message."
227
- }
228
- ]
229
- },
230
- "sources": [
231
- {
232
- "fileName": "index.ts",
233
- "line": 4,
234
- "character": 16,
235
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L4"
236
- }
237
- ],
238
- "type": {
239
- "type": "intrinsic",
240
- "name": "string"
241
- }
242
- }
243
- ]
244
- },
245
- {
246
- "id": 30,
247
- "name": "helloWorldV2",
248
- "variant": "declaration",
249
- "kind": 64,
250
- "flags": {},
251
- "sources": [
252
- {
253
- "fileName": "index.ts",
254
- "line": 15,
255
- "character": 16,
256
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L15"
257
- }
258
- ],
259
- "signatures": [
260
- {
261
- "id": 31,
262
- "name": "helloWorldV2",
263
- "variant": "signature",
264
- "kind": 4096,
265
- "flags": {},
266
- "comment": {
267
- "summary": [
268
- {
269
- "kind": "text",
270
- "text": "Returns a personalized hello world message."
271
- }
272
- ],
273
- "blockTags": [
274
- {
275
- "tag": "@returns",
276
- "content": [
277
- {
278
- "kind": "text",
279
- "text": "A greeting message string."
280
- }
281
- ]
282
- }
283
- ]
284
- },
285
- "sources": [
286
- {
287
- "fileName": "index.ts",
288
- "line": 15,
289
- "character": 16,
290
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L15"
291
- }
292
- ],
293
- "parameters": [
294
- {
295
- "id": 32,
296
- "name": "name",
297
- "variant": "param",
298
- "kind": 32768,
299
- "flags": {},
300
- "comment": {
301
- "summary": [
302
- {
303
- "kind": "text",
304
- "text": "Name of the person to greet."
305
- }
306
- ]
307
- },
308
- "type": {
309
- "type": "intrinsic",
310
- "name": "string"
311
- }
312
- },
313
- {
314
- "id": 33,
315
- "name": "enthusiastic",
316
- "variant": "param",
317
- "kind": 32768,
318
- "flags": {},
319
- "comment": {
320
- "summary": [
321
- {
322
- "kind": "text",
323
- "text": "If true, adds an exclamation point to the greeting."
324
- }
325
- ]
326
- },
327
- "type": {
328
- "type": "intrinsic",
329
- "name": "boolean"
330
- },
331
- "defaultValue": "false"
332
- }
333
- ],
334
- "type": {
335
- "type": "intrinsic",
336
- "name": "string"
337
- }
338
- }
339
- ]
340
- },
341
- {
342
- "id": 34,
343
- "name": "helloWorldV3",
344
- "variant": "declaration",
345
- "kind": 64,
346
- "flags": {},
347
- "sources": [
348
- {
349
- "fileName": "index.ts",
350
- "line": 25,
351
- "character": 16,
352
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L25"
353
- }
354
- ],
355
- "signatures": [
356
- {
357
- "id": 35,
358
- "name": "helloWorldV3",
359
- "variant": "signature",
360
- "kind": 4096,
361
- "flags": {},
362
- "comment": {
363
- "summary": [
364
- {
365
- "kind": "text",
366
- "text": "Returns a personalized hello world message."
367
- }
368
- ],
369
- "blockTags": [
370
- {
371
- "tag": "@returns",
372
- "content": [
373
- {
374
- "kind": "text",
375
- "text": "A greeting message string."
376
- }
377
- ]
378
- }
379
- ]
380
- },
381
- "sources": [
382
- {
383
- "fileName": "index.ts",
384
- "line": 25,
385
- "character": 16,
386
- "url": "https://github.com/livesession/xyd/blob/a2256e77dd1fbfde54d6308224d3f41847b1b817/packages/xyd-sources/example/package-a/src/index.ts#L25"
387
- }
388
- ],
389
- "typeParameters": [
390
- {
391
- "id": 36,
392
- "name": "T",
393
- "variant": "typeParam",
394
- "kind": 131072,
395
- "flags": {},
396
- "comment": {
397
- "summary": [
398
- {
399
- "kind": "text",
400
- "text": "The type of the name."
401
- }
402
- ]
403
- }
404
- }
405
- ],
406
- "parameters": [
407
- {
408
- "id": 37,
409
- "name": "name",
410
- "variant": "param",
411
- "kind": 32768,
412
- "flags": {},
413
- "comment": {
414
- "summary": [
415
- {
416
- "kind": "text",
417
- "text": "Name of the person to greet."
418
- }
419
- ]
420
- },
421
- "type": {
422
- "type": "reference",
423
- "target": 36,
424
- "name": "T",
425
- "package": "@xyd-sources-examples/package-a",
426
- "refersToTypeParameter": true
427
- }
428
- }
429
- ],
430
- "type": {
431
- "type": "intrinsic",
432
- "name": "string"
433
- }
434
- }
435
- ]
436
- }
437
- ],
438
- "groups": [
439
- {
440
- "title": "Classes",
441
- "children": [
442
- 20
443
- ]
444
- },
445
- {
446
- "title": "Functions",
447
- "children": [
448
- 25,
449
- 28,
450
- 30,
451
- 34
452
- ]
453
- }
454
- ],
455
- "packageName": "@xyd-js/sources",
456
- "symbolIdMap": {
457
- "19": {
458
- "packageName": "@xyd-sources-examples/package-a",
459
- "packagePath": "src/index.ts",
460
- "qualifiedName": ""
461
- },
462
- "20": {
463
- "packageName": "@xyd-sources-examples/package-a",
464
- "packagePath": "src/index.ts",
465
- "qualifiedName": "ExampleClass"
466
- },
467
- "23": {
468
- "packageName": "@xyd-sources-examples/package-a",
469
- "packagePath": "src/index.ts",
470
- "qualifiedName": "ExampleClass.helloWorld"
471
- },
472
- "24": {
473
- "packageName": "@xyd-sources-examples/package-a",
474
- "packagePath": "src/index.ts",
475
- "qualifiedName": "ExampleClass.helloWorld"
476
- },
477
- "25": {
478
- "packageName": "@xyd-sources-examples/package-a",
479
- "packagePath": "src/index.ts",
480
- "qualifiedName": "gqlSchemaToReferences"
481
- },
482
- "26": {
483
- "packageName": "@xyd-sources-examples/package-a",
484
- "packagePath": "src/index.ts",
485
- "qualifiedName": "gqlSchemaToReferences"
486
- },
487
- "27": {
488
- "packageName": "@xyd-sources-examples/package-a",
489
- "packagePath": "src/index.ts",
490
- "qualifiedName": "schemaLocation"
491
- },
492
- "28": {
493
- "packageName": "@xyd-sources-examples/package-a",
494
- "packagePath": "src/index.ts",
495
- "qualifiedName": "helloWorld"
496
- },
497
- "29": {
498
- "packageName": "@xyd-sources-examples/package-a",
499
- "packagePath": "src/index.ts",
500
- "qualifiedName": "helloWorld"
501
- },
502
- "30": {
503
- "packageName": "@xyd-sources-examples/package-a",
504
- "packagePath": "src/index.ts",
505
- "qualifiedName": "helloWorldV2"
506
- },
507
- "31": {
508
- "packageName": "@xyd-sources-examples/package-a",
509
- "packagePath": "src/index.ts",
510
- "qualifiedName": "helloWorldV2"
511
- },
512
- "32": {
513
- "packageName": "@xyd-sources-examples/package-a",
514
- "packagePath": "src/index.ts",
515
- "qualifiedName": "name"
516
- },
517
- "33": {
518
- "packageName": "@xyd-sources-examples/package-a",
519
- "packagePath": "src/index.ts",
520
- "qualifiedName": "enthusiastic"
521
- },
522
- "34": {
523
- "packageName": "@xyd-sources-examples/package-a",
524
- "packagePath": "src/index.ts",
525
- "qualifiedName": "helloWorldV3"
526
- },
527
- "35": {
528
- "packageName": "@xyd-sources-examples/package-a",
529
- "packagePath": "src/index.ts",
530
- "qualifiedName": "helloWorldV3"
531
- },
532
- "36": {
533
- "packageName": "@xyd-sources-examples/package-a",
534
- "packagePath": "src/index.ts",
535
- "qualifiedName": "T"
536
- },
537
- "37": {
538
- "packageName": "@xyd-sources-examples/package-a",
539
- "packagePath": "src/index.ts",
540
- "qualifiedName": "name"
541
- }
542
- },
543
- "files": {
544
- "entries": {
545
- "1": "package-a/src/index.ts"
546
- },
547
- "reflections": {
548
- "1": 19
549
- }
550
- }
551
- }