app-devtools 0.1.0 → 0.3.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 (83) hide show
  1. package/dist/main.d.ts +62 -0
  2. package/dist/main.js +2396 -0
  3. package/dist/main.umd.cjs +753 -0
  4. package/package.json +21 -16
  5. package/.eslintignore +0 -3
  6. package/.eslintrc.cjs +0 -112
  7. package/.gitattributes +0 -22
  8. package/.prettierrc +0 -10
  9. package/.quokka.ts +0 -115
  10. package/.vscode/settings.json +0 -7
  11. package/.vscode/snippets.code-snippets +0 -75
  12. package/.vscode/tasks.json +0 -17
  13. package/index.html +0 -46
  14. package/pnpm-lock.yaml +0 -5313
  15. package/scripts/check-if-is-sync.sh +0 -6
  16. package/scripts/filterFetchRequests.ts +0 -60
  17. package/src/Root.tsx +0 -11
  18. package/src/assets/icons/caret-down.svg +0 -11
  19. package/src/assets/icons/network.svg +0 -6
  20. package/src/assets/icons/search.svg +0 -3
  21. package/src/assets/icons/send.svg +0 -3
  22. package/src/assets/icons/settings.svg +0 -3
  23. package/src/components/ButtonElement.tsx +0 -18
  24. package/src/components/Icon.tsx +0 -44
  25. package/src/components/Section.tsx +0 -57
  26. package/src/components/Select.tsx +0 -101
  27. package/src/components/ValueVisualizer.tsx +0 -397
  28. package/src/config/icons.tsx +0 -23
  29. package/src/initializeApp.tsx +0 -28
  30. package/src/initializeDevTools.ts +0 -33
  31. package/src/main.ts +0 -42
  32. package/src/mocks/mockedRequests.json +0 -28391
  33. package/src/pages/api-explorer/ApiExplorerMenu.tsx +0 -136
  34. package/src/pages/api-explorer/ApiExplorerMenuItem.tsx +0 -208
  35. package/src/pages/api-explorer/Diff.tsx +0 -223
  36. package/src/pages/api-explorer/RequestDetails.tsx +0 -264
  37. package/src/pages/api-explorer/Timeline.tsx +0 -174
  38. package/src/pages/api-explorer/api-explorer.tsx +0 -21
  39. package/src/pages/api-explorer/getRequestPayload.tsx +0 -15
  40. package/src/pages/app/App.tsx +0 -79
  41. package/src/stores/callsStore.ts +0 -267
  42. package/src/stores/uiStore.ts +0 -15
  43. package/src/style/globalStyle.ts +0 -54
  44. package/src/style/helpers/allowTextSelection.ts +0 -7
  45. package/src/style/helpers/anchorColor.ts +0 -9
  46. package/src/style/helpers/centerContent.ts +0 -5
  47. package/src/style/helpers/circle.ts +0 -7
  48. package/src/style/helpers/ellipsis.ts +0 -8
  49. package/src/style/helpers/fillContainer.ts +0 -7
  50. package/src/style/helpers/gradientBorder.ts +0 -28
  51. package/src/style/helpers/gradientText.ts +0 -8
  52. package/src/style/helpers/inline.ts +0 -34
  53. package/src/style/helpers/mountAnim.ts +0 -26
  54. package/src/style/helpers/multilineEllipsis.ts +0 -8
  55. package/src/style/helpers/outline.ts +0 -5
  56. package/src/style/helpers/responsiveSize.ts +0 -27
  57. package/src/style/helpers/stack.ts +0 -36
  58. package/src/style/helpers/transition.ts +0 -63
  59. package/src/style/mediaQueries.ts +0 -6
  60. package/src/style/reset.ts +0 -75
  61. package/src/style/scrollBar.ts +0 -37
  62. package/src/style/theme.ts +0 -35
  63. package/src/types/global.d.ts +0 -8
  64. package/src/utils/initializeScreenLogger.ts +0 -12
  65. package/tsconfig.json +0 -36
  66. package/tsconfig.prod.json +0 -10
  67. package/tsup.config.ts +0 -7
  68. package/utils/arrayUtils.ts +0 -29
  69. package/utils/assertions.ts +0 -7
  70. package/utils/autoIncrementId.ts +0 -5
  71. package/utils/createThemev2.ts +0 -64
  72. package/utils/cx.ts +0 -27
  73. package/utils/getDiff.ts +0 -15
  74. package/utils/hexToRgb.ts +0 -14
  75. package/utils/objectUtils.ts +0 -3
  76. package/utils/parseUnit.ts +0 -10
  77. package/utils/solid.ts +0 -76
  78. package/utils/truncateText.ts +0 -7
  79. package/utils/tryExpression.ts +0 -14
  80. package/utils/typed.ts +0 -23
  81. package/utils/typings.ts +0 -40
  82. package/utils/urlPattern.ts +0 -25
  83. package/vite.config.ts +0 -46
package/dist/main.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ type RequestSubTypes = 'delete' | 'update' | 'create' | 'custom';
2
+ type RequestTypes = 'fetch' | 'mutation';
3
+ type ApiRequest = {
4
+ id: string;
5
+ alias?: string;
6
+ payload: unknown;
7
+ response: unknown;
8
+ metadata: unknown;
9
+ status: number;
10
+ isError: boolean;
11
+ path: string;
12
+ searchParams: Record<string, string> | null;
13
+ type: RequestTypes;
14
+ subType: RequestSubTypes | undefined;
15
+ method: string | undefined;
16
+ startTime: number;
17
+ duration: number;
18
+ pathParams: Record<string, string | null> | null;
19
+ code: number | undefined;
20
+ tags: string[];
21
+ };
22
+ type Config = {
23
+ callsProcessor: {
24
+ match: ((request: {
25
+ url: URL;
26
+ type: RequestTypes;
27
+ subType: RequestSubTypes | undefined;
28
+ }) => boolean) | string;
29
+ callName?: ((request: {
30
+ url: URL;
31
+ type: RequestTypes;
32
+ subType?: RequestSubTypes;
33
+ }) => string) | string;
34
+ callID?: (request: {
35
+ url: URL;
36
+ type: RequestTypes;
37
+ subType?: RequestSubTypes;
38
+ }) => string;
39
+ payloadAlias?: (payload: any, request: ApiRequest) => string;
40
+ }[];
41
+ };
42
+ declare function addCall(request: {
43
+ payload: unknown;
44
+ response: unknown;
45
+ metadata: unknown;
46
+ status: number;
47
+ isError: boolean;
48
+ path: string;
49
+ type: RequestTypes;
50
+ subType?: RequestSubTypes;
51
+ method?: string;
52
+ startTime?: number;
53
+ duration?: number;
54
+ tags?: string[];
55
+ }): () => void;
56
+
57
+ declare function initializeDevTools({ callsProcessor, shortcut, }: {
58
+ callsProcessor: Config['callsProcessor'];
59
+ shortcut?: string;
60
+ }): void;
61
+
62
+ export { addCall, initializeDevTools };