@xyd-js/atlas 0.1.0-xyd.15 → 0.1.0-xyd.18

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 (79) hide show
  1. package/.storybook/index.css +1 -2
  2. package/.storybook/preview.ts +1 -2
  3. package/CHANGELOG.md +31 -0
  4. package/dist/Update-BlhP2VFR-COLbZvRj.js +4 -0
  5. package/dist/Update-BlhP2VFR-COLbZvRj.js.map +1 -0
  6. package/dist/Update-CMM38Snc-COLbZvRj.js +4 -0
  7. package/dist/Update-CMM38Snc-COLbZvRj.js.map +1 -0
  8. package/dist/Update-D5e_yqty-COLbZvRj.js +4 -0
  9. package/dist/Update-D5e_yqty-COLbZvRj.js.map +1 -0
  10. package/dist/index.css +47 -58
  11. package/dist/index.d.ts +30 -11
  12. package/dist/index.js +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/styles.css +89 -0
  15. package/dist/tokens.css +5 -2
  16. package/dist/xydPlugin.d.ts +5 -0
  17. package/dist/xydPlugin.js +2 -0
  18. package/dist/xydPlugin.js.map +1 -0
  19. package/index.ts +2 -1
  20. package/package.json +13 -9
  21. package/packages/xyd-plugin/SidebarItem.tsx +27 -0
  22. package/packages/xyd-plugin/index.ts +19 -0
  23. package/rollup.config.js +27 -25
  24. package/src/components/ApiRef/ApiRefItem/ApiRefItem.styles.tsx +60 -17
  25. package/src/components/ApiRef/ApiRefItem/ApiRefItem.tsx +508 -49
  26. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.styles.tsx +73 -16
  27. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.tsx +574 -56
  28. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.styles.tsx +2 -1
  29. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.tsx +37 -19
  30. package/src/components/Atlas/Atlas.styles.tsx +1 -1
  31. package/src/components/Atlas/Atlas.tsx +35 -19
  32. package/src/components/Atlas/AtlasContext.tsx +47 -0
  33. package/src/components/Atlas/AtlasDecorator.styles.ts +22 -0
  34. package/src/components/Atlas/AtlasDecorator.tsx +15 -0
  35. package/src/components/Atlas/AtlasLazy/AtlasLazy.tsx +2 -2
  36. package/src/components/Atlas/AtlasPrimary.tsx +21 -0
  37. package/src/components/Atlas/AtlasSecondary.tsx +148 -0
  38. package/src/components/Atlas/index.ts +6 -2
  39. package/src/components/Atlas/types.ts +11 -0
  40. package/src/components/Code/CodeSampleButtons/CodeSampleButtons.styles.tsx +4 -5
  41. package/src/components/Code/CodeSampleButtons/CodeSampleButtons.tsx +6 -8
  42. package/src/components/Code/index.ts +0 -4
  43. package/src/components/Icon/index.tsx +384 -0
  44. package/src/styles/styles.css +89 -0
  45. package/src/styles/tokens.css +5 -2
  46. package/src/utils/mdx.ts +0 -29
  47. package/tsconfig.json +6 -2
  48. package/types.d.ts +22 -0
  49. package/dist/CodeSample-B9VUhTKF-DJ2leksk.js +0 -2
  50. package/dist/CodeSample-B9VUhTKF-DJ2leksk.js.map +0 -1
  51. package/dist/CodeSample-BSXeFy0x-DJ2leksk.js +0 -2
  52. package/dist/CodeSample-BSXeFy0x-DJ2leksk.js.map +0 -1
  53. package/dist/CodeSample-BwP208sQ-DJ2leksk.js +0 -2
  54. package/dist/CodeSample-BwP208sQ-DJ2leksk.js.map +0 -1
  55. package/dist/CodeSample-CK-CQYrV-DJ2leksk.js +0 -2
  56. package/dist/CodeSample-CK-CQYrV-DJ2leksk.js.map +0 -1
  57. package/dist/CodeSample-CUemtj_W-DJ2leksk.js +0 -2
  58. package/dist/CodeSample-CUemtj_W-DJ2leksk.js.map +0 -1
  59. package/dist/CodeSample-D0iKih-A-DJ2leksk.js +0 -2
  60. package/dist/CodeSample-D0iKih-A-DJ2leksk.js.map +0 -1
  61. package/dist/CodeSample-D33vTa6M-DJ2leksk.js +0 -2
  62. package/dist/CodeSample-D33vTa6M-DJ2leksk.js.map +0 -1
  63. package/dist/CodeSample-DUSx2KBt-DJ2leksk.js +0 -2
  64. package/dist/CodeSample-DUSx2KBt-DJ2leksk.js.map +0 -1
  65. package/dist/CodeSample-P4yxkHPW-DJ2leksk.js +0 -2
  66. package/dist/CodeSample-P4yxkHPW-DJ2leksk.js.map +0 -1
  67. package/dist/atlas-index.d.ts +0 -15
  68. package/dist/atlas-index.js +0 -2
  69. package/dist/atlas-index.js.map +0 -1
  70. package/packages/atlas-index/AtlasIndex.tsx +0 -79
  71. package/packages/atlas-index/index.ts +0 -3
  72. package/src/components/Code/CodeCopy/CodeCopy.styles.tsx +0 -17
  73. package/src/components/Code/CodeCopy/CodeCopy.tsx +0 -30
  74. package/src/components/Code/CodeCopy/index.ts +0 -7
  75. package/src/components/Code/CodeSample/CodeSample.styles.tsx +0 -131
  76. package/src/components/Code/CodeSample/CodeSample.tsx +0 -143
  77. package/src/components/Code/CodeSample/index.ts +0 -8
  78. package/src/components/Code/CodeSample/withLocalStored.tsx +0 -52
  79. package/src/components/Code/default-theme.ts +0 -266
@@ -0,0 +1,384 @@
1
+ export function IconSessionReplay() {
2
+ return <svg
3
+ width={24}
4
+ height={24}
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
11
+ stroke="black"
12
+ strokeWidth={2}
13
+ strokeLinecap="round"
14
+ strokeLinejoin="round"
15
+ />
16
+ <path
17
+ d="M10 8L16 12L10 16V8Z"
18
+ stroke="black"
19
+ strokeWidth={2}
20
+ strokeLinecap="round"
21
+ strokeLinejoin="round"
22
+ />
23
+ </svg>
24
+ }
25
+
26
+ export function IconMetrics() {
27
+ return <svg
28
+ width={24}
29
+ height={24}
30
+ viewBox="0 0 24 24"
31
+ fill="none"
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ >
34
+ <path
35
+ d="M21 7L13.2273 14.9167L9.13636 10.75L3 17"
36
+ stroke="black"
37
+ strokeWidth={2}
38
+ strokeLinecap="round"
39
+ strokeLinejoin="round"
40
+ />
41
+ <path
42
+ d="M16 7H21V12"
43
+ stroke="black"
44
+ strokeWidth={2}
45
+ strokeLinecap="round"
46
+ strokeLinejoin="round"
47
+ />
48
+ </svg>
49
+ }
50
+
51
+ export function IconFunnels() {
52
+ return <svg
53
+ width={24}
54
+ height={24}
55
+ viewBox="0 0 24 24"
56
+ fill="none"
57
+ xmlns="http://www.w3.org/2000/svg"
58
+ >
59
+ <path
60
+ d="M12 20L12 10"
61
+ stroke="black"
62
+ strokeWidth={2}
63
+ strokeLinecap="round"
64
+ strokeLinejoin="round"
65
+ />
66
+ <path
67
+ d="M6 20L6 4"
68
+ stroke="black"
69
+ strokeWidth={2}
70
+ strokeLinecap="round"
71
+ strokeLinejoin="round"
72
+ />
73
+ <path
74
+ d="M18 20L18 16"
75
+ stroke="black"
76
+ strokeWidth={2}
77
+ strokeLinecap="round"
78
+ strokeLinejoin="round"
79
+ />
80
+ </svg>
81
+ }
82
+
83
+ export function IconCode() {
84
+ return <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width={24} height={24}>
85
+ <path
86
+ fillRule="evenodd"
87
+ d="M14.447 7.106a1 1 0 0 1 .447 1.341l-4 8a1 1 0 1 1-1.788-.894l4-8a1 1 0 0 1 1.341-.447ZM6.6 7.2a1 1 0 0 1 .2 1.4L4.25 12l2.55 3.4a1 1 0 0 1-1.6 1.2l-3-4a1 1 0 0 1 0-1.2l3-4a1 1 0 0 1 1.4-.2Zm10.8 0a1 1 0 0 1 1.4.2l3 4a1 1 0 0 1 0 1.2l-3 4a1 1 0 0 1-1.6-1.2l2.55-3.4-2.55-3.4a1 1 0 0 1 .2-1.4Z"
88
+ clipRule="evenodd"
89
+ />
90
+ </svg>
91
+ }
92
+
93
+ export function IconCustomEvent() {
94
+ return <svg
95
+ width={24}
96
+ height={24}
97
+ viewBox="0 0 16 16"
98
+ fill="none"
99
+ xmlns="http://www.w3.org/2000/svg"
100
+ >
101
+ <path
102
+ d="M3.66179 8.03142L6.54954 1.79004C6.63136 1.6132 6.80847 1.5 7.00333 1.5H10.7236C11.0872 1.5 11.3292 1.87581 11.1788 2.20685L9.18871 6.58625C9.03827 6.9173 9.28029 7.2931 9.64391 7.2931L11.589 7.2931C12.0146 7.2931 12.2456 7.79098 11.9708 8.11596L6.77738 14.2573C6.4593 14.6334 5.84636 14.3715 5.89839 13.8816L6.3857 9.2942C6.41708 8.99882 6.18554 8.74138 5.8885 8.74138H4.11558C3.75048 8.74138 3.50848 8.36278 3.66179 8.03142Z"
103
+ stroke="black"
104
+ strokeWidth={1.2}
105
+ strokeLinejoin="round"
106
+ />
107
+ </svg>
108
+ }
109
+
110
+ export function IconAlert() {
111
+ return <svg
112
+ width={24}
113
+ height={24}
114
+ viewBox="0 0 24 24"
115
+ fill="none"
116
+ xmlns="http://www.w3.org/2000/svg"
117
+ >
118
+ <path
119
+ d="M18 8C18 6.4087 17.3679 4.88258 16.2426 3.75736C15.1174 2.63214 13.5913 2 12 2C10.4087 2 8.88258 2.63214 7.75736 3.75736C6.63214 4.88258 6 6.4087 6 8C6 15 3 17 3 17H21C21 17 18 15 18 8Z"
120
+ stroke="black"
121
+ strokeWidth={2}
122
+ strokeLinecap="round"
123
+ strokeLinejoin="round"
124
+ />
125
+ <path
126
+ d="M13.73 21C13.5542 21.3031 13.3019 21.5547 12.9982 21.7295C12.6946 21.9044 12.3504 21.9965 12 21.9965C11.6496 21.9965 11.3054 21.9044 11.0018 21.7295C10.6982 21.5547 10.4458 21.3031 10.27 21"
127
+ stroke="black"
128
+ strokeWidth={2}
129
+ strokeLinecap="round"
130
+ strokeLinejoin="round"
131
+ />
132
+ </svg>
133
+ }
134
+
135
+ export function IconBrowser() {
136
+ return <svg
137
+ xmlns="http://www.w3.org/2000/svg"
138
+ width={24}
139
+ height={24}
140
+ viewBox="0 0 24 24"
141
+ fill="none"
142
+ >
143
+ <path
144
+ d="M22 9H2M2 7.8L2 16.2C2 17.8802 2 18.7202 2.32698 19.362C2.6146 19.9265 3.07354 20.3854 3.63803 20.673C4.27976 21 5.11984 21 6.8 21H17.2C18.8802 21 19.7202 21 20.362 20.673C20.9265 20.3854 21.3854 19.9265 21.673 19.362C22 18.7202 22 17.8802 22 16.2V7.8C22 6.11984 22 5.27977 21.673 4.63803C21.3854 4.07354 20.9265 3.6146 20.362 3.32698C19.7202 3 18.8802 3 17.2 3L6.8 3C5.11984 3 4.27976 3 3.63803 3.32698C3.07354 3.6146 2.6146 4.07354 2.32698 4.63803C2 5.27976 2 6.11984 2 7.8Z"
145
+ stroke="#000000"
146
+ strokeWidth={2}
147
+ strokeLinecap="round"
148
+ strokeLinejoin="round"
149
+ />
150
+ </svg>
151
+ }
152
+
153
+ export function IconREST() {
154
+ return <svg
155
+ xmlns="http://www.w3.org/2000/svg"
156
+ width={24}
157
+ height={24}
158
+ viewBox="0 0 16 16"
159
+ fill="none"
160
+ >
161
+ <path
162
+ fill="#000000"
163
+ fillRule="evenodd"
164
+ d="M.5 2.75a2.25 2.25 0 114.28.97l1.345 1.344.284-.284a2.25 2.25 0 013.182 0l.284.284 1.344-1.344a2.25 2.25 0 111.06 1.06l-1.343 1.345.284.284a2.25 2.25 0 010 3.182l-.284.284 1.344 1.344a2.25 2.25 0 11-1.06 1.06l-1.345-1.343-.284.284a2.25 2.25 0 01-3.182 0l-.284-.284-1.344 1.344a2.25 2.25 0 11-1.06-1.06l1.343-1.345-.284-.284a2.25 2.25 0 010-3.182l.284-.284L3.72 4.781A2.25 2.25 0 01.5 2.75zM2.75 2a.75.75 0 100 1.5.75.75 0 000-1.5zm0 10.5a.75.75 0 100 1.5.75.75 0 000-1.5zm9.75.75a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM13.25 2a.75.75 0 100 1.5.75.75 0 000-1.5zM7.47 5.841a.75.75 0 011.06 0L10.16 7.47a.75.75 0 010 1.06L8.53 10.16a.75.75 0 01-1.06 0L5.84 8.53a.75.75 0 010-1.06L7.47 5.84z"
165
+ clipRule="evenodd"
166
+ />
167
+ </svg>
168
+ }
169
+
170
+ export function IconGraphQL() {
171
+ return <svg
172
+ xmlns="http://www.w3.org/2000/svg"
173
+ fill="#000"
174
+ width={24}
175
+ height={24}
176
+ viewBox="0 0 32 32"
177
+ >
178
+ <path
179
+ d="M18.734 3.667l6.578 3.802c1.089-1.146 2.901-1.193 4.047-0.104 0.193 0.188 0.365 0.401 0.5 0.635 0.786 1.37 0.313 3.12-1.063 3.906-0.229 0.13-0.479 0.234-0.745 0.297v7.599c1.531 0.365 2.474 1.896 2.109 3.427-0.063 0.271-0.172 0.531-0.307 0.771-0.792 1.365-2.536 1.833-3.906 1.042-0.26-0.146-0.5-0.344-0.698-0.568l-6.542 3.776c0.495 1.495-0.318 3.109-1.813 3.604-0.292 0.099-0.594 0.146-0.896 0.146-1.573 0-2.854-1.271-2.854-2.849 0-0.271 0.042-0.547 0.12-0.813l-6.583-3.797c-1.089 1.141-2.896 1.188-4.036 0.094-1.135-1.089-1.177-2.891-0.094-4.031 0.38-0.396 0.865-0.677 1.396-0.807v-7.599c-1.531-0.365-2.479-1.906-2.109-3.443 0.063-0.266 0.167-0.521 0.302-0.755 0.786-1.365 2.536-1.833 3.901-1.042 0.234 0.135 0.453 0.302 0.641 0.5l6.583-3.797c-0.448-1.51 0.417-3.099 1.922-3.542 0.26-0.083 0.536-0.12 0.813-0.12 1.573 0 2.854 1.271 2.854 2.844 0 0.281-0.042 0.557-0.12 0.823zM18.047 4.839c-0.026 0.026-0.047 0.052-0.078 0.078l8.615 14.917c0.036-0.010 0.078-0.021 0.109-0.031v-7.609c-1.526-0.375-2.453-1.922-2.073-3.448 0.005-0.031 0.016-0.068 0.021-0.099zM14.026 4.917l-0.078-0.078-6.594 3.802c0.438 1.51-0.438 3.089-1.948 3.526-0.036 0.010-0.068 0.016-0.104 0.026v7.609l0.115 0.031 8.615-14.917zM16.797 5.594c-0.521 0.146-1.073 0.146-1.589 0l-8.615 14.917c0.391 0.375 0.667 0.859 0.802 1.391h17.214c0.13-0.531 0.406-1.016 0.802-1.396zM18.109 27.229l6.552-3.786c-0.021-0.063-0.036-0.125-0.052-0.188h-17.219l-0.031 0.109 6.589 3.802c0.516-0.536 1.245-0.87 2.052-0.87 0.839 0 1.589 0.359 2.109 0.932z" />
180
+ </svg>
181
+ }
182
+
183
+ export function IconWebhooks() {
184
+ return <svg
185
+ xmlns="http://www.w3.org/2000/svg"
186
+ xmlnsXlink="http://www.w3.org/1999/xlink"
187
+ width={24}
188
+ height={24}
189
+ viewBox="-10 -5 1034 1034"
190
+ >
191
+ <path
192
+ fill="#000000"
193
+ d="M482 226h-1l-10 2q-33 4 -64.5 18.5t-55.5 38.5q-41 37 -57 91q-9 30 -8 63t12 63q17 45 52 78l13 12l-83 135q-26 -1 -45 7q-30 13 -45 40q-7 15 -9 31t2 32q8 30 33 48q15 10 33 14.5t36 2t34.5 -12.5t27.5 -25q12 -17 14.5 -39t-5.5 -41q-1 -5 -7 -14l-3 -6l118 -192 q6 -9 8 -14l-10 -3q-9 -2 -13 -4q-23 -10 -41.5 -27.5t-28.5 -39.5q-17 -36 -9 -75q4 -23 17 -43t31 -34q37 -27 82 -27q27 -1 52.5 9.5t44.5 30.5q17 16 26.5 38.5t10.5 45.5q0 17 -6 42l70 19l8 1q14 -43 7 -86q-4 -33 -19.5 -63.5t-39.5 -53.5q-42 -42 -103 -56 q-6 -2 -18 -4l-14 -2h-37zM500 350q-17 0 -34 7t-30.5 20.5t-19.5 31.5q-8 20 -4 44q3 18 14 34t28 25q24 15 56 13q3 4 5 8l112 191q3 6 6 9q27 -26 58.5 -35.5t65 -3.5t58.5 26q32 25 43.5 61.5t0.5 73.5q-8 28 -28.5 50t-48.5 33q-31 13 -66.5 8.5t-63.5 -24.5 q-4 -3 -13 -10l-5 -6q-4 3 -11 10l-47 46q23 23 52 38.5t61 21.5l22 4h39l28 -5q64 -13 110 -60q22 -22 36.5 -50.5t19.5 -59.5q5 -36 -2 -71.5t-25 -64.5t-44 -51t-57 -35q-34 -14 -70.5 -16t-71.5 7l-17 5l-81 -137q13 -19 16 -37q5 -32 -13 -60q-16 -25 -44 -35 q-17 -6 -35 -6zM218 614q-58 13 -100 53q-47 44 -61 105l-4 24v37l2 11q2 13 4 20q7 31 24.5 59t42.5 49q50 41 115 49q38 4 76 -4.5t70 -28.5q53 -34 78 -91q7 -17 14 -45q6 -1 18 0l125 2q14 0 20 1q11 20 25 31t31.5 16t35.5 4q28 -3 50 -20q27 -21 32 -54 q2 -17 -1.5 -33t-13.5 -30q-16 -22 -41 -32q-17 -7 -35.5 -6.5t-35.5 7.5q-28 12 -43 37l-3 6q-14 0 -42 -1l-113 -1q-15 -1 -43 -1l-50 -1l3 17q8 43 -13 81q-14 27 -40 45t-57 22q-35 6 -70 -7.5t-57 -42.5q-28 -35 -27 -79q1 -37 23 -69q13 -19 32 -32t41 -19l9 -3z"
194
+ />
195
+ </svg>
196
+ }
197
+
198
+ export function IconJSBrowser() {
199
+ return <svg
200
+ xmlns="http://www.w3.org/2000/svg"
201
+ viewBox="0 0 448 512"
202
+ width={24}
203
+ height={24}
204
+ >
205
+ <path
206
+ d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM243.8 381.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z" />
207
+ </svg>
208
+ }
209
+
210
+ export function IconJSNode() {
211
+ return <svg
212
+ width={24}
213
+ height={24}
214
+ xmlns="http://www.w3.org/2000/svg"
215
+ data-name="Layer 1"
216
+ viewBox="0 0 109 122.88"
217
+ >
218
+ <defs>
219
+ <style>{".cls-1{fill-rule:evenodd;}"}</style>
220
+ </defs>
221
+ <title>{"node-js-black"}</title>
222
+ <path
223
+ className="cls-1"
224
+ d="M68.43,87.08c-19.7,0-23.83-9-23.83-16.63a1.3,1.3,0,0,1,1.3-1.3h5.82A1.3,1.3,0,0,1,53,70.25c.88,5.93,3.49,8.92,15.41,8.92C77.9,79.17,81.93,77,81.93,72c0-2.9-1.15-5-15.89-6.49-12.33-1.22-20-3.93-20-13.8,0-9.08,7.66-14.49,20.5-14.49,14.42,0,21.56,5,22.46,15.76a1.31,1.31,0,0,1-.35,1,1.35,1.35,0,0,1-1,.42H81.9a1.29,1.29,0,0,1-1.26-1c-1.41-6.23-4.81-8.23-14.07-8.23C56.21,45.15,55,48.76,55,51.46c0,3.28,1.42,4.24,15.4,6.09S90.82,62,90.82,71.71,82.64,87.14,68.37,87.14l.06-.06Zm-13.91,35.8a9.45,9.45,0,0,1-4.72-1.26l-15-8.9c-2.25-1.26-1.15-1.7-.41-2a30.38,30.38,0,0,0,6.8-3.1,1.15,1.15,0,0,1,1.12.08l11.55,6.85a1.51,1.51,0,0,0,1.4,0l45-26a1.42,1.42,0,0,0,.69-1.22V35.43a1.44,1.44,0,0,0-.7-1.24l-45-26a1.38,1.38,0,0,0-1.39,0l-45,26a1.42,1.42,0,0,0-.71,1.23v52a1.39,1.39,0,0,0,.7,1.21l12.33,7.12C27.85,99.06,32,95.11,32,91.15V39.86a1.29,1.29,0,0,1,1.31-1.3H39a1.29,1.29,0,0,1,1.3,1.3V91.17c0,8.93-4.87,14-13.33,14-2.6,0-4.66,0-10.38-2.82L4.72,95.59A9.51,9.51,0,0,1,0,87.38v-52a9.47,9.47,0,0,1,4.72-8.21l45.07-26a9.89,9.89,0,0,1,9.47,0l45,26A9.49,9.49,0,0,1,109,35.43v52a9.54,9.54,0,0,1-4.72,8.21l-45,26a9.5,9.5,0,0,1-4.74,1.26v0Zm0,0Z"
225
+ />
226
+ </svg>
227
+ }
228
+
229
+ export function IconStorybook() {
230
+ return <svg
231
+ xmlns="http://www.w3.org/2000/svg"
232
+ fill="#000000"
233
+ width={24}
234
+ height={24}
235
+ viewBox="0 0 32 32"
236
+ >
237
+ <path
238
+ d="M21.786 0.318l-0.161 3.615c-0.005 0.203 0.229 0.328 0.391 0.203l1.411-1.068 1.198 0.932c0.156 0.104 0.365 0 0.375-0.188l-0.135-3.677 1.776-0.135c0.922-0.063 1.708 0.672 1.708 1.599v28.802c0 0.917-0.766 1.646-1.682 1.599l-21.469-0.958c-0.833-0.036-1.505-0.708-1.531-1.547l-1-26.401c-0.052-0.885 0.62-1.646 1.505-1.693l17.599-1.109zM17.693 12.401c0 0.625 4.214 0.318 4.786-0.109 0-4.266-2.292-6.521-6.479-6.521-4.198 0-6.531 2.297-6.531 5.724 0 5.932 8 6.036 8 9.276 0 0.938-0.427 1.469-1.401 1.469-1.281 0-1.802-0.651-1.734-2.88 0-0.479-4.865-0.641-5.026 0-0.359 5.375 2.974 6.932 6.797 6.932 3.724 0 6.63-1.984 6.63-5.573 0-6.359-8.135-6.188-8.135-9.333 0-1.292 0.964-1.464 1.505-1.464 0.604 0 1.667 0.094 1.589 2.49z" />
239
+ </svg>
240
+ }
241
+
242
+ export function IconReactRouter() {
243
+ return <svg
244
+ xmlns="http://www.w3.org/2000/svg"
245
+ width={24}
246
+ height={24}
247
+ viewBox="0 0 602 360"
248
+ fill="none"
249
+ >
250
+ <path
251
+ d="M480.96 180C480.96 196.572 474.239 211.572 463.357 222.42C452.475 233.28 437.445 240 420.84 240C404.235 240 389.205 246.708 378.335 257.568C367.453 268.428 360.72 283.428 360.72 300C360.72 316.572 353.999 331.572 343.117 342.42C332.235 353.28 317.205 360 300.6 360C283.995 360 268.965 353.28 258.095 342.42C247.213 331.572 240.48 316.572 240.48 300C240.48 283.428 247.213 268.428 258.095 257.568C268.965 246.708 283.995 240 300.6 240C317.205 240 332.235 233.28 343.117 222.42C353.999 211.572 360.72 196.572 360.72 180C360.72 146.856 333.81 120 300.6 120C283.995 120 268.965 113.28 258.095 102.42C247.213 91.572 240.48 76.572 240.48 60C240.48 43.428 247.213 28.428 258.095 17.568C268.965 6.708 283.995 0 300.6 0C333.81 0 360.72 26.856 360.72 60C360.72 76.572 367.453 91.572 378.335 102.42C389.205 113.28 404.235 120 420.84 120C454.05 120 480.96 146.856 480.96 180Z"
252
+ fill="#121212"
253
+ />
254
+ <path
255
+ d="M240.48 180C240.48 146.862 213.563 120 180.36 120C147.157 120 120.24 146.862 120.24 180C120.24 213.137 147.157 240 180.36 240C213.563 240 240.48 213.137 240.48 180Z"
256
+ fill="#121212"
257
+ />
258
+ <path
259
+ d="M120.24 300C120.24 266.863 93.3234 240 60.12 240C26.9166 240 0 266.863 0 300C0 333.138 26.9166 360 60.12 360C93.3234 360 120.24 333.138 120.24 300Z"
260
+ fill="#121212"
261
+ />
262
+ <path
263
+ d="M601.2 300C601.2 266.863 574.283 240 541.08 240C507.877 240 480.96 266.863 480.96 300C480.96 333.138 507.877 360 541.08 360C574.283 360 601.2 333.138 601.2 300Z"
264
+ fill="#121212"
265
+ />
266
+ </svg>
267
+ }
268
+
269
+ export function IconNextJS() {
270
+ return <svg
271
+ xmlns="http://www.w3.org/2000/svg"
272
+ width={24}
273
+ height={24}
274
+ viewBox="0 0 15 15"
275
+ fill="none"
276
+ >
277
+ <path
278
+ d="M4.5 4.5L4.90534 4.20725C4.77836 4.03144 4.55252 3.95753 4.34617 4.02425C4.13981 4.09098 4 4.28313 4 4.5H4.5ZM7.5 14C3.91015 14 1 11.0899 1 7.5H0C0 11.6421 3.35786 15 7.5 15V14ZM14 7.5C14 11.0899 11.0899 14 7.5 14V15C11.6421 15 15 11.6421 15 7.5H14ZM7.5 1C11.0899 1 14 3.91015 14 7.5H15C15 3.35786 11.6421 0 7.5 0V1ZM7.5 0C3.35786 0 0 3.35786 0 7.5H1C1 3.91015 3.91015 1 7.5 1V0ZM5 12V4.5H4V12H5ZM4.09466 4.79275L10.5947 13.7927L11.4053 13.2073L4.90534 4.20725L4.09466 4.79275ZM10 4V10H11V4H10Z"
279
+ fill="#000000"
280
+ />
281
+ </svg>
282
+ }
283
+
284
+ export function IconAppTemplate() {
285
+ return <svg
286
+ xmlns="http://www.w3.org/2000/svg"
287
+ viewBox="0 0 80 80"
288
+ fill="none"
289
+ >
290
+ <g clipPath="url(#clip0_202_147)">
291
+ <path d="M0 55.3333H80" stroke="black" strokeWidth={0.506667} />
292
+ <path d="M0 40H80" stroke="black" strokeWidth={0.506667} />
293
+ <path d="M0 24.6667H80" stroke="black" strokeWidth={0.506667} />
294
+ <path d="M55.3334 80V0" stroke="black" strokeWidth={0.506667} />
295
+ <path d="M40 80V0" stroke="black" strokeWidth={0.506667} />
296
+ <path d="M24.6666 80V0" stroke="black" strokeWidth={0.506667} />
297
+ <path d="M80 80L0 0" stroke="black" strokeWidth={0.506667} />
298
+ <path d="M0 80L80 0" stroke="black" strokeWidth={0.506667} />
299
+ <rect
300
+ x={5.33337}
301
+ y={5.33333}
302
+ width={69.3333}
303
+ height={69.3333}
304
+ stroke="black"
305
+ strokeWidth={0.506667}
306
+ />
307
+ <circle
308
+ cx={40}
309
+ cy={40}
310
+ r={15.3333}
311
+ stroke="black"
312
+ strokeWidth={0.506667}
313
+ />
314
+ <circle cx={40} cy={40} r={22} stroke="black" strokeWidth={0.506667} />
315
+ <circle
316
+ cx={40}
317
+ cy={40}
318
+ r={34.6667}
319
+ stroke="black"
320
+ strokeWidth={0.506667}
321
+ />
322
+ </g>
323
+ <rect
324
+ x={0.253333}
325
+ y={0.253333}
326
+ width={79.4933}
327
+ height={79.4933}
328
+ rx={17.08}
329
+ stroke="black"
330
+ strokeWidth={0.506667}
331
+ />
332
+ <defs>
333
+ <clipPath id="clip0_202_147">
334
+ <rect width={80} height={80} rx={17.3333} fill="white" />
335
+ </clipPath>
336
+ </defs>
337
+ </svg>
338
+ }
339
+
340
+ export function IconQuote() {
341
+ return <svg
342
+ xmlns="http://www.w3.org/2000/svg"
343
+ viewBox="0 0 24 24"
344
+ width="1em"
345
+ height="1em"
346
+ stroke="currentColor"
347
+ fill="currentColor"
348
+ >
349
+ <path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3z" />
350
+ </svg>
351
+ }
352
+
353
+ export function IconCopy() {
354
+ return <svg
355
+ xmlns="http://www.w3.org/2000/svg"
356
+ width="1em"
357
+ height="1em"
358
+ viewBox="0 0 24 24"
359
+ fill="none"
360
+ stroke="currentColor"
361
+ strokeWidth={2}
362
+ strokeLinecap="round"
363
+ strokeLinejoin="round"
364
+ >
365
+ <rect width={14} height={14} x={8} y={8} rx={2} ry={2} />
366
+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
367
+ </svg>
368
+ }
369
+ export function IconCheck() {
370
+ return <svg
371
+ xmlns="http://www.w3.org/2000/svg"
372
+ width="1em"
373
+ height="1em"
374
+ viewBox="0 0 24 24"
375
+ fill="none"
376
+ stroke="currentColor"
377
+ strokeWidth={2}
378
+ strokeLinecap="round"
379
+ strokeLinejoin="round"
380
+ >
381
+ <path d="M18 6 7 17l-5-5" />
382
+ <path d="m22 10-7.5 7.5L13 16" />
383
+ </svg>
384
+ }
@@ -0,0 +1,89 @@
1
+ @layer overrides {
2
+ :root {
3
+ --oas-method-get-color: #15803d;
4
+ --oas-method-get-bg: rgba(74, 222, 128, .2);
5
+ --oas-method-get-color--active: var(--white);
6
+ --oas-method-get-bg--active: #2ab673;
7
+
8
+ --oas-method-post-color: #1D4ED8;
9
+ --oas-method-post-bg: rgba(96, 165, 250, .2);
10
+ --oas-method-post-color--active: var(--white);
11
+ --oas-method-post-bg--active: #3064e3;
12
+
13
+ --oas-method-put-color: #C28C30;
14
+ --oas-method-put-bg: rgba(250, 204, 21, .2);
15
+ --oas-method-put-color--active: var(--white);
16
+ --oas-method-put-bg--active: #C28C30;
17
+
18
+ --oas-method-delete-color: #B91C1C;
19
+ --oas-method-delete-bg: rgba(248, 114, 114, 0.2);
20
+ --oas-method-delete-color--active: var(--white);
21
+ --oas-method-delete-bg--active: #cb3a32;
22
+
23
+ --oas-method-patch-color: #c2410c;
24
+ --oas-method-patch-bg: rgba(251, 146, 60, .2);
25
+ --oas-method-patch-color--active: var(--white);
26
+ --oas-method-patch-bg--active: #DA622B;
27
+ }
28
+
29
+ /* HTTP Method Colors */
30
+ [atlas-oas-method="GET"] {
31
+ --method-color: var(--oas-method-get-color);
32
+ --method-bg: var(--oas-method-get-bg);
33
+
34
+ &[data-active="true"] {
35
+ --method-bg: var(--oas-method-get-bg--active);
36
+ --method-color: var(--oas-method-get-color--active);
37
+ }
38
+ }
39
+
40
+ [atlas-oas-method="POST"] {
41
+ --method-color: var(--oas-method-post-color);
42
+ --method-bg: var(--oas-method-post-bg);
43
+
44
+ &[data-active="true"] {
45
+ --method-bg: var(--oas-method-post-bg--active);
46
+ --method-color: var(--oas-method-post-color--active);
47
+ }
48
+ }
49
+
50
+ [atlas-oas-method="PUT"] {
51
+ --method-color: var(--oas-method-put-color);
52
+ --method-bg: var(--oas-method-put-bg);
53
+
54
+ &[data-active="true"] {
55
+ --method-bg: var(--oas-method-put-bg--active);
56
+ --method-color: var(--oas-method-put-color--active);
57
+ }
58
+ }
59
+
60
+ [atlas-oas-method="DELETE"] {
61
+ --method-color: var(--oas-method-delete-color);
62
+ --method-bg: var(--oas-method-delete-bg);
63
+
64
+ &[data-active="true"] {
65
+ --method-bg: var(--oas-method-delete-bg--active);
66
+ --method-color: var(--oas-method-delete-color--active);
67
+ }
68
+ }
69
+
70
+ [atlas-oas-method="PATCH"] {
71
+ --method-color: var(--oas-method-patch-color);
72
+ --method-bg: var(--oas-method-patch-bg);
73
+
74
+ &[data-active="true"] {
75
+ --method-bg: var(--oas-method-patch-bg--active);
76
+ --method-color: var(--oas-method-patch-color--active);
77
+ }
78
+ }
79
+
80
+ [atlas-oas-method] {
81
+ color: var(--method-color);
82
+ }
83
+
84
+ [atlas-oas-method] xyd-badge {
85
+ background-color: var(--method-bg);
86
+ color: var(--method-color);
87
+ font-weight: var(--xyd-font-weight-bold);
88
+ }
89
+ }
@@ -1,5 +1,7 @@
1
1
  :root {
2
2
  /* Ref tokens - Base values */
3
+ --XydAtlas-Ref-Palette-White: #FFFFFF;
4
+
3
5
  --XydAtlas-Ref-Palette-Primary-60: #7051d4;
4
6
  --XydAtlas-Ref-Palette-Primary-70: #6045b9;
5
7
  --XydAtlas-Ref-Palette-Primary-80: #4f399e;
@@ -40,6 +42,7 @@
40
42
  /* ApiRef Item */
41
43
  --XydAtlas-Component-ApiRef-Item__color-border: var(--XydAtlas-Sys-Color-Border);
42
44
  --XydAtlas-Component-ApiRef-Item__color-navbar: var(--XydAtlas-Sys-Color-Text-Secondary);
45
+ --XydAtlas-Component-ApiRef-Item__background-navbar: var(--XydAtlas-Ref-Palette-Neutral-10);
43
46
 
44
47
  /* Code Sample */
45
48
  --XydAtlas-Component-Code-Sample__color-border: var(--XydAtlas-Sys-Color-Border);
@@ -51,7 +54,7 @@
51
54
 
52
55
  /* Code Sample Buttons */
53
56
  --XydAtlas-Component-Code-SampleButtons__color-containerBackground: var(--XydAtlas-Sys-Color-Surface);
54
- --XydAtlas-Component-Code-SampleButtons__color-background--active: var(--XydAtlas-Sys-Color-Surface--active);
55
- --XydAtlas-Component-Code-SampleButtons__color: var(--XydAtlas-Sys-Color-Text-Secondary);
57
+ --XydAtlas-Component-Code-SampleButtons__color-background--active: var(--XydAtlas-Ref-Palette-White);
58
+ --XydAtlas-Component-Code-SampleButtons__color: var(--XydAtlas-Ref-Palette-Neutral-40);
56
59
  --XydAtlas-Component-Code-SampleButtons__color--active: var(--XydAtlas-Sys-Color-Text-Primary);
57
60
  }
package/src/utils/mdx.ts CHANGED
@@ -1,31 +1,2 @@
1
1
  import React from "react";
2
2
 
3
- export type MDXReferenceWrapper<T> = {
4
- children: React.ReactNode;
5
- title: string;
6
- };
7
-
8
- export type MDXReference<T> = T extends object
9
- ? MDXReferenceWrapper<T> & {
10
- [K in keyof T]: MDXReference<T[K]>;
11
- }
12
- : MDXReferenceWrapper<T>;
13
-
14
- // TODO: unify xyd reference props with react
15
- export function mdxValue<T>(val: MDXReferenceWrapper<T> | null): string {
16
- if (!val) {
17
- return ""
18
- }
19
-
20
- if (val.title) {
21
- return val.title
22
- }
23
-
24
- // if we have case like below
25
- /*
26
- #### !!<key> <name>
27
-
28
- !<key> string
29
- */
30
- return val as unknown as string
31
- }
package/tsconfig.json CHANGED
@@ -12,9 +12,12 @@
12
12
  "src/utils/*"
13
13
  ]
14
14
  },
15
+ "typeRoots": [
16
+ "./types.d.ts"
17
+ ],
15
18
  "module": "esnext",
16
19
  "esModuleInterop": true,
17
- "moduleResolution": "node",
20
+ "moduleResolution": "bundler",
18
21
  "target": "ES6",
19
22
  "lib": [
20
23
  "dom",
@@ -40,8 +43,9 @@
40
43
  "packages/**/*.json",
41
44
  ".storybook/**/*.ts",
42
45
  ".storybook/**/*.tsx",
46
+ "types.d.ts"
43
47
  ],
44
48
  "exclude": [
45
49
  "node_modules"
46
50
  ]
47
- }
51
+ }
package/types.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import * as React from 'react'
2
+
3
+ declare global {
4
+ namespace React {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ 'atlas-decorator': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
8
+
9
+ 'atlas-apiref-item': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
10
+ 'atlas-apiref-item-showcase': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
11
+ 'atlas-apiref-samples': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
12
+ 'atlas-apiref-definitions': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
13
+ 'atlas-apiref-properties': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
14
+ 'atlas-apiref-variant': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
15
+ 'atlas-apiref-propname': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
16
+ 'atlas-apiref-proptype': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
17
+ 'atlas-apiref-propmeta': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
18
+ 'atlas-apiref-meta-info': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
19
+ }
20
+ }
21
+ }
22
+ }
@@ -1,2 +0,0 @@
1
- import e from"react";import"@code-hike/lighter";import"@radix-ui/react-tabs";import"lucide-react";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e){if(Array.isArray(e))return e}function n(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,u,"next",e)}function u(e){n(a,o,i,c,u,"throw",e)}c(void 0)}))}}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:x(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",h="executing",d="completed",v={};function b(){}function g(){}function w(){}var S={};l(S,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(A([])));j&&j!==r&&n.call(j,a)&&(S=j);var _=w.prototype=b.prototype=Object.create(S);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var u=f(e[o],e,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?d:m,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function L(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function A(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,l(e,u,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},E(k.prototype),l(k.prototype,c,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function p(e,t){return r(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,t)||v(e,t)||u()}function m(e){return r(e)||c(e)||v(e)||u()}function h(e){return function(e){if(Array.isArray(e))return t(e)}(e)||c(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function v(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}function b(e){return e?e.title?e.title:e:""}function g(e){return g="function"==typeof Symbol&&"symbol"==d(Symbol.iterator)?function(e){return d(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":d(e)},g(e)}"function"==typeof SuppressedError&&SuppressedError;var w,S,O,j={exports:{}},_={},E={};O||(O=1,"production"===process.env.NODE_ENV?j.exports=function(){if(w)return _;w=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(t,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var i in n={},r)"key"!==i&&(n[i]=r[i]);else n=r;return r=n.ref,{$$typeof:e,type:t,key:o,ref:void 0!==r?r:null,props:n}}return _.Fragment=t,_.jsx=r,_.jsxs=r,_}():j.exports=(S||(S=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===k?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case p:return"Fragment";case h:return"Profiler";case m:return"StrictMode";case w:return"Suspense";case S:return"SuspenseList";case _:return"Activity"}if("object"===g(e))switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case y:return"Portal";case v:return(e.displayName||"Context")+".Provider";case d:return(e._context.displayName||"Context")+".Consumer";case b:var r=e.render;return(e=e.displayName)||(e=""!==(e=r.displayName||r.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(r=e.displayName||null)?r:t(e.type)||"Memo";case j:r=e._payload,e=e._init;try{return t(e(r))}catch(e){}}return null}function r(e){return""+e}function n(e){try{r(e);var t=!1}catch(e){t=!0}if(t){var n=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),r(e)}}function o(e){if(e===p)return"<>";if("object"===g(e)&&null!==e&&e.$$typeof===j)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch(e){return"<...>"}}function i(){return Error("react-stack-top-frame")}function a(){var e=t(this.type);return T[e]||(T[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function c(e,r,o,i,c,s,y,p){var m,h=r.children;if(void 0!==h)if(i)if(P(h)){for(i=0;i<h.length;i++)u(h[i]);Object.freeze&&Object.freeze(h)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(h);if(L.call(r,"key")){h=t(e);var d=Object.keys(r).filter((function(e){return"key"!==e}));i=0<d.length?"{key: someKey, "+d.join(": ..., ")+": ...}":"{key: someKey}",I[h+i]||(d=0<d.length?"{"+d.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,h,d,h),I[h+i]=!0)}if(h=null,void 0!==o&&(n(o),h=""+o),function(e){if(L.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(r)&&(n(r.key),h=""+r.key),"key"in r)for(var v in o={},r)"key"!==v&&(o[v]=r[v]);else o=r;return h&&function(e,t){function r(){l||(l=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,t,r,n,o,i,c,u){return r=i.ref,e={$$typeof:f,type:e,key:t,props:i,_owner:o},null!==(void 0!==r?r:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:a}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:c}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:u}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,h,s,0,null===(m=x.A)?null:m.getOwner(),o,y,p)}function u(e){"object"===g(e)&&null!==e&&e.$$typeof===f&&e._store&&(e._store.validated=1)}var l,s=e,f=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),v=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),x=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,P=Array.isArray,N=console.createTask?console.createTask:function(){return null},T={},A=(s={"react-stack-bottom-frame":function(e){return e()}})["react-stack-bottom-frame"].bind(s,i)(),C=N(o(i)),I={};E.Fragment=p,E.jsx=function(e,t,r,n,i){var a=1e4>x.recentlyCreatedOwnerStacks++;return c(e,t,r,!1,0,i,a?Error("react-stack-top-frame"):A,a?N(o(e)):C)},E.jsxs=function(e,t,r,n,i){var a=1e4>x.recentlyCreatedOwnerStacks++;return c(e,t,r,!0,0,i,a?Error("react-stack-top-frame"):A,a?N(o(e)):C)}}()),E)),j.exports;var k="XydComponents-Component-ui-Loader__LoaderDot";function x(t){var r=t.size,n=void 0===r?"medium":r,o=t.className;return e.createElement("div",{className:"\n ".concat("XydComponents-Component-ui-Loader__LoaderHost","\n ").concat("small"===n&&"XydComponents-Component-ui-Loader__LoaderSmall","\n ").concat("large"===n&&"XydComponents-Component-ui-Loader__LoaderLarge","\n ").concat(o,"\n ")},e.createElement("div",{className:"XydComponents-Component-ui-Loader__LoaderDots"},e.createElement("div",{className:k}),e.createElement("div",{className:k}),e.createElement("div",{className:k})))}function L(){return e.createElement("div",{className:"XydComponents-Component-coder-Code__CodeHost"},e.createElement(x,null))}export{L as P,p as _,o as a,y as b,h as c,s as d,i as e,f,d as g,m as h,b as m};
2
- //# sourceMappingURL=CodeSample-B9VUhTKF-DJ2leksk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodeSample-B9VUhTKF-DJ2leksk.js","sources":["../src/utils/mdx.ts","../../xyd-components/dist/tslib.es6-cb69JjeS.js"],"sourcesContent":["import React from \"react\";\n\nexport type MDXReferenceWrapper<T> = {\n children: React.ReactNode;\n title: string;\n};\n\nexport type MDXReference<T> = T extends object\n ? MDXReferenceWrapper<T> & {\n [K in keyof T]: MDXReference<T[K]>;\n}\n : MDXReferenceWrapper<T>;\n\n// TODO: unify xyd reference props with react\nexport function mdxValue<T>(val: MDXReferenceWrapper<T> | null): string {\n if (!val) {\n return \"\"\n }\n\n if (val.title) {\n return val.title\n }\n\n // if we have case like below\n /*\n #### !!<key> <name>\n\n !<key> string\n */\n return val as unknown as string\n}\n","function t(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function n(t,n,e,r){return new(e||(e=Promise))((function(o,c){function p(t){try{f(r.next(t))}catch(t){c(t)}}function a(t){try{f(r.throw(t))}catch(t){c(t)}}function f(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(p,a)}f((r=r.apply(t,n||[])).next())}))}\"function\"==typeof SuppressedError&&SuppressedError;export{t as _,n as a};\n//# sourceMappingURL=tslib.es6-cb69JjeS.js.map\n"],"names":["mdxValue","val","title","SuppressedError"],"mappings":"g1UAcM,SAAUA,EAAYC,GACxB,OAAKA,EAIDA,EAAIC,MACGD,EAAIC,MASRD,EAbI,EAcf,2NC0SkD,mBAApBE,iBAAiCA"}