@stainless-api/docs-ui 0.1.0-beta.55 → 0.1.0-beta.56

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/dist/{breadcrumbs-DbMfWbzf.d.ts → breadcrumbs-C4-bfzhR.d.ts} +2 -2
  2. package/dist/{breadcrumbs-DgN-xdoA.js → breadcrumbs-D4R5cbSw.js} +1 -1
  3. package/dist/breadcrumbs-R-MrRUAb.d.ts +25 -0
  4. package/dist/{component-CjLDkCLe.js → component-5L-iyIZ6.js} +1 -1
  5. package/dist/{component-generics-jEHMmsET.d.ts → component-generics-BXUlfDmo.d.ts} +2 -2
  6. package/dist/component-generics-DK3L_HfT.d.ts +30 -0
  7. package/dist/components/MaskedInput.d.ts +3 -3
  8. package/dist/components/breadcrumbs.d.ts +1 -1
  9. package/dist/components/breadcrumbs.js +2 -2
  10. package/dist/components/icons.d.ts +11 -11
  11. package/dist/components/index.d.ts +9 -9
  12. package/dist/components/index.js +4 -4
  13. package/dist/components/method.d.ts +1 -1
  14. package/dist/components/overview.d.ts +1 -1
  15. package/dist/components/overview.js +2 -2
  16. package/dist/components/primitives.d.ts +1 -1
  17. package/dist/components/primitives.js +1 -1
  18. package/dist/components/properties.d.ts +1 -1
  19. package/dist/components/sdk.d.ts +1 -1
  20. package/dist/components/sidebar.d.ts +1 -1
  21. package/dist/components/snippets.d.ts +2 -2
  22. package/dist/{components-oq97SH1A.js → components-DuWqBogG.js} +3 -3
  23. package/dist/contexts/component-generics.d.ts +1 -1
  24. package/dist/contexts/component-types.d.ts +10 -10
  25. package/dist/contexts/component.d.ts +13 -13
  26. package/dist/contexts/component.js +5 -5
  27. package/dist/contexts/docs.d.ts +1 -1
  28. package/dist/contexts/index.d.ts +14 -14
  29. package/dist/contexts/markdown.d.ts +1 -1
  30. package/dist/contexts/navigation.d.ts +1 -1
  31. package/dist/contexts/use-components.d.ts +9 -9
  32. package/dist/docs-Bbe2P0iM.d.ts +47 -0
  33. package/dist/{docs-B8ujUobE.d.ts → docs-DXW3HLam.d.ts} +2 -2
  34. package/dist/{index-DJSj_TkD.d.ts → index-B0GI632t.d.ts} +30 -30
  35. package/dist/{index-DhAIZ735.d.ts → index-C8y-QK_S.d.ts} +8 -8
  36. package/dist/index-CMjS_7Z-.d.ts +274 -0
  37. package/dist/index-CXNWVE3S.d.ts +15 -0
  38. package/dist/index.d.ts +14 -14
  39. package/dist/index.js +4 -4
  40. package/dist/languages/csharp.d.ts +10 -10
  41. package/dist/languages/go.d.ts +10 -10
  42. package/dist/languages/http.d.ts +10 -10
  43. package/dist/languages/http.js +4 -4
  44. package/dist/languages/index.d.ts +10 -10
  45. package/dist/languages/index.js +4 -4
  46. package/dist/languages/java.d.ts +10 -10
  47. package/dist/languages/python.d.ts +10 -10
  48. package/dist/languages/ruby.d.ts +10 -10
  49. package/dist/languages/typescript.d.ts +10 -10
  50. package/dist/markdown/index.d.ts +1 -1
  51. package/dist/markdown/index.js +5 -5
  52. package/dist/markdown/printer.js +5 -5
  53. package/dist/markdown/utils.d.ts +1 -1
  54. package/dist/{markdown-BeBRJqrt.d.ts → markdown-DlZBWMNG.d.ts} +2 -2
  55. package/dist/markdown-xEaREw5e.d.ts +22 -0
  56. package/dist/{method-cLcsCc31.d.ts → method-BRfK1KuU.d.ts} +7 -7
  57. package/dist/method-BUQRaC59.d.ts +71 -0
  58. package/dist/navigation-BO8IjmvM.d.ts +29 -0
  59. package/dist/{navigation-ULXC5uFs.d.ts → navigation-C36vzOT-.d.ts} +1 -1
  60. package/dist/{overview-5f2psBcl.d.ts → overview-BI_asPrF.d.ts} +6 -6
  61. package/dist/{overview-BQk6WvtS.js → overview-D_7o7P6l.js} +1 -1
  62. package/dist/overview-g0IyxCAY.d.ts +39 -0
  63. package/dist/{primitives-BBa2vKex.d.ts → primitives-Bm0Cm3Xo.d.ts} +28 -21
  64. package/dist/primitives-COZrZCWZ.d.ts +104 -0
  65. package/dist/{primitives-1WQd5NT-.js → primitives-Dk_RvOzh.js} +23 -31
  66. package/dist/{properties-Clv76Ne3.d.ts → properties-BGhVCqER.d.ts} +5 -5
  67. package/dist/properties-BqjMaZ-l.d.ts +54 -0
  68. package/dist/routing-o8okAfJK.d.ts +54 -0
  69. package/dist/sdk-DA3oRxHu.d.ts +118 -0
  70. package/dist/{sdk-DT9NI4cv.d.ts → sdk-tq-VoVQP.d.ts} +13 -13
  71. package/dist/{sidebar-M9RnjNtV.d.ts → sidebar-DZQPDV-z.d.ts} +5 -5
  72. package/dist/sidebar-sPFdjATU.d.ts +36 -0
  73. package/dist/{snippets-swUWTk4z.d.ts → snippets-CVckJDzp.d.ts} +8 -8
  74. package/dist/snippets-Dg6GX-e4.d.ts +51 -0
  75. package/dist/styles/primitives.css +5 -4
  76. package/dist/styles/resets.css +1 -1
  77. package/dist/styles/search.css +32 -21
  78. package/dist/styles.css +39 -27
  79. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- import { C as TransformRequestSnippetFn } from "./sdk-DT9NI4cv.js";
1
+ import { C as TransformRequestSnippetFn } from "./sdk-DA3oRxHu.js";
2
2
  import * as React$1 from "react";
3
- import * as react_jsx_runtime51 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime84 from "react/jsx-runtime";
4
4
  import * as SDKJSON from "@stainless/sdk-json";
5
5
 
6
6
  //#region src/components/snippets.d.ts
@@ -12,7 +12,7 @@ type SnippetCodeProps = {
12
12
  declare function SnippetCode({
13
13
  content,
14
14
  language
15
- }: SnippetCodeProps): react_jsx_runtime51.JSX.Element;
15
+ }: SnippetCodeProps): react_jsx_runtime84.JSX.Element;
16
16
  type SnippetProps = {
17
17
  method: SDKJSON.Method;
18
18
  requestTitle?: React$1.ReactNode;
@@ -24,28 +24,28 @@ type SnippetContainerProps = {
24
24
  };
25
25
  declare function SnippetContainer({
26
26
  children
27
- }: SnippetContainerProps): react_jsx_runtime51.JSX.Element;
27
+ }: SnippetContainerProps): react_jsx_runtime84.JSX.Element;
28
28
  type SnippetRequestContainerProps = {
29
29
  children?: React$1.ReactNode;
30
30
  signature?: string;
31
31
  };
32
32
  declare function SnippetRequestContainer({
33
33
  children
34
- }: SnippetRequestContainerProps): react_jsx_runtime51.JSX.Element;
34
+ }: SnippetRequestContainerProps): react_jsx_runtime84.JSX.Element;
35
35
  declare function Snippet({
36
36
  requestTitle,
37
37
  method,
38
38
  transformRequestSnippet
39
- }: SnippetProps): react_jsx_runtime51.JSX.Element | null;
39
+ }: SnippetProps): react_jsx_runtime84.JSX.Element | null;
40
40
  declare function SnippetButtons({
41
41
  content
42
42
  }: {
43
43
  content: string;
44
- }): react_jsx_runtime51.JSX.Element;
44
+ }): react_jsx_runtime84.JSX.Element;
45
45
  declare function SnippetResponse({
46
46
  responses
47
47
  }: {
48
48
  responses: SDKJSON.Method['exampleResponses'];
49
- }): react_jsx_runtime51.JSX.Element | null;
49
+ }): react_jsx_runtime84.JSX.Element | null;
50
50
  //#endregion
51
51
  export { SnippetContainer as a, SnippetRequestContainer as c, SnippetCodeProps as i, SnippetRequestContainerProps as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetProps as s, Snippet as t, SnippetResponse as u };
@@ -0,0 +1,51 @@
1
+ import { C as TransformRequestSnippetFn } from "./sdk-tq-VoVQP.js";
2
+ import * as React$1 from "react";
3
+ import * as react_jsx_runtime58 from "react/jsx-runtime";
4
+ import * as SDKJSON from "@stainless/sdk-json";
5
+
6
+ //#region src/components/snippets.d.ts
7
+ type SnippetCodeProps = {
8
+ content: string;
9
+ signature?: string;
10
+ language?: string;
11
+ };
12
+ declare function SnippetCode({
13
+ content,
14
+ language
15
+ }: SnippetCodeProps): react_jsx_runtime58.JSX.Element;
16
+ type SnippetProps = {
17
+ method: SDKJSON.Method;
18
+ requestTitle?: React$1.ReactNode;
19
+ transformRequestSnippet?: TransformRequestSnippetFn;
20
+ };
21
+ type SnippetContainerProps = {
22
+ children: React$1.ReactNode;
23
+ signature?: string;
24
+ };
25
+ declare function SnippetContainer({
26
+ children
27
+ }: SnippetContainerProps): react_jsx_runtime58.JSX.Element;
28
+ type SnippetRequestContainerProps = {
29
+ children?: React$1.ReactNode;
30
+ signature?: string;
31
+ };
32
+ declare function SnippetRequestContainer({
33
+ children
34
+ }: SnippetRequestContainerProps): react_jsx_runtime58.JSX.Element;
35
+ declare function Snippet({
36
+ requestTitle,
37
+ method,
38
+ transformRequestSnippet
39
+ }: SnippetProps): react_jsx_runtime58.JSX.Element | null;
40
+ declare function SnippetButtons({
41
+ content
42
+ }: {
43
+ content: string;
44
+ }): react_jsx_runtime58.JSX.Element;
45
+ declare function SnippetResponse({
46
+ responses
47
+ }: {
48
+ responses: SDKJSON.Method['exampleResponses'];
49
+ }): react_jsx_runtime58.JSX.Element | null;
50
+ //#endregion
51
+ export { SnippetContainer as a, SnippetRequestContainer as c, SnippetCodeProps as i, SnippetRequestContainerProps as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetProps as s, Snippet as t, SnippetResponse as u };
@@ -228,7 +228,6 @@
228
228
  p {
229
229
  display: block;
230
230
  margin: 0 0 1em;
231
- line-height: 150%;
232
231
 
233
232
  &:last-child {
234
233
  margin: 0;
@@ -284,9 +283,11 @@
284
283
  }
285
284
  }
286
285
 
287
- &:focus-within .stldocs-masked-input-display,
288
- &:not(:focus-within) input {
289
- opacity: 0;
286
+ .masked-input-wrapper {
287
+ &:focus-within .stldocs-masked-input-display,
288
+ &:not(:focus-within) input {
289
+ opacity: 0;
290
+ }
290
291
  }
291
292
 
292
293
  .stldocs-masked-input-obscured {
@@ -1,6 +1,6 @@
1
1
  /* Resets */
2
2
  .stldocs-root {
3
- line-height: 100%;
3
+ line-height: 1.5;
4
4
  letter-spacing: -0.01em;
5
5
 
6
6
  a {
@@ -3,20 +3,37 @@
3
3
  flex-direction: column;
4
4
 
5
5
  .stldocs-search-filter {
6
- margin-top: 0.8rem;
6
+ margin-top: 0.5rem;
7
7
  display: flex;
8
- gap: 1rem;
8
+ gap: 0.5rem;
9
9
 
10
10
  .stl-ui-button {
11
- flex-grow: 1;
11
+ flex: 1 1 auto;
12
+ padding: 0;
13
+ display: flex;
14
+ gap: 0.5em;
12
15
 
13
16
  .stldocs-search-filter-count {
14
17
  font-size: 0.75rem;
15
- margin: auto 0;
16
18
  background-color: var(--stldocs-color-selected);
17
- border-radius: 0.5rem;
18
- padding: 0 0.5rem;
19
+ border-radius: 100vmax;
20
+ padding: 0 0.35rem;
19
21
  line-height: 1.5;
22
+ font-variant-numeric: tabular-nums;
23
+ }
24
+
25
+ svg {
26
+ flex: 0 0 auto;
27
+ }
28
+ }
29
+
30
+ @media not (min-width: 50rem) {
31
+ svg {
32
+ display: block;
33
+ }
34
+ .stldocs-search-filter-label,
35
+ .stldocs-search-filter-count {
36
+ display: none;
20
37
  }
21
38
  }
22
39
  }
@@ -31,8 +48,8 @@
31
48
 
32
49
  mark {
33
50
  color: var(--stl-color-foreground);
34
- background-color: var(--stl-color-border);
35
- border-bottom: 1px dotted var(--stl-color-foreground);
51
+ background-color: var(--stl-color-text-selection-background);
52
+ box-shadow: inset 0 -1px rgb(from var(--stl-color-text-selection-background) r g b / 1);
36
53
  }
37
54
 
38
55
  &[data-stldocs-search-result='resource'] {
@@ -181,7 +198,7 @@
181
198
  width: 100%;
182
199
  overflow: hidden;
183
200
  display: none;
184
- padding: 1rem;
201
+ padding: 1rem 1rem 0;
185
202
  inset: 0;
186
203
  background-color: var(--stl-color-background);
187
204
  color: var(--stl-color-foreground);
@@ -201,8 +218,9 @@
201
218
  width: 100%;
202
219
 
203
220
  .stldocs-listview {
204
- margin: 0.8rem 0;
221
+ margin: 0.8rem 0 0;
205
222
  height: 100%;
223
+ padding-bottom: 1rem;
206
224
  }
207
225
  }
208
226
 
@@ -229,11 +247,13 @@
229
247
  .stldocs-root {
230
248
  .stldocs-search-modal {
231
249
  height: 100%;
232
- max-width: 1024px;
250
+ width: 1024px;
251
+ max-width: calc(100% - 4rem);
233
252
  max-height: 80vh;
234
253
  margin: 3rem auto;
235
254
  border: 1px solid var(--stl-color-border);
236
- border-radius: var(--stl-ui-layout-border-radius-sml);
255
+ /* nest with input that has --stl-ui-layout-border-radius-sml */
256
+ border-radius: calc(var(--stl-ui-layout-border-radius-sml) + 0.9rem);
237
257
 
238
258
  .stldocs-search-modal-close-button {
239
259
  display: none;
@@ -251,12 +271,3 @@
251
271
  }
252
272
  }
253
273
 
254
- @media (max-width: 50rem) {
255
- .stldocs-root .stldocs-search-modal {
256
- .stldocs-search-filter-label,
257
- .stldocs-search-filter-count {
258
- display: none;
259
- }
260
- }
261
- }
262
-
package/dist/styles.css CHANGED
@@ -32,7 +32,7 @@
32
32
 
33
33
  --stl-color-text-selection-foreground: /* unset by default; text colors are unchanged */;
34
34
  --stl-color-text-selection-background: light-dark(
35
- rgb(from var(--stl-color-text-selection) r g b / calc(alpha * 0.2)),
35
+ rgb(from var(--stl-color-text-selection) r g b / calc(alpha * 0.15)),
36
36
  rgb(from var(--stl-color-text-selection) r g b / calc(alpha * 0.35))
37
37
  );
38
38
  }
@@ -1176,7 +1176,7 @@ a.stl-ui-button {
1176
1176
 
1177
1177
  /* Resets */
1178
1178
  .stldocs-root {
1179
- line-height: 100%;
1179
+ line-height: 1.5;
1180
1180
  letter-spacing: -0.01em;
1181
1181
 
1182
1182
  a {
@@ -1469,7 +1469,6 @@ a.stl-ui-button {
1469
1469
  p {
1470
1470
  display: block;
1471
1471
  margin: 0 0 1em;
1472
- line-height: 150%;
1473
1472
 
1474
1473
  &:last-child {
1475
1474
  margin: 0;
@@ -1525,9 +1524,11 @@ a.stl-ui-button {
1525
1524
  }
1526
1525
  }
1527
1526
 
1528
- &:focus-within .stldocs-masked-input-display,
1529
- &:not(:focus-within) input {
1530
- opacity: 0;
1527
+ .masked-input-wrapper {
1528
+ &:focus-within .stldocs-masked-input-display,
1529
+ &:not(:focus-within) input {
1530
+ opacity: 0;
1531
+ }
1531
1532
  }
1532
1533
 
1533
1534
  .stldocs-masked-input-obscured {
@@ -2729,20 +2730,37 @@ a.stl-ui-button {
2729
2730
  flex-direction: column;
2730
2731
 
2731
2732
  .stldocs-search-filter {
2732
- margin-top: 0.8rem;
2733
+ margin-top: 0.5rem;
2733
2734
  display: flex;
2734
- gap: 1rem;
2735
+ gap: 0.5rem;
2735
2736
 
2736
2737
  .stl-ui-button {
2737
- flex-grow: 1;
2738
+ flex: 1 1 auto;
2739
+ padding: 0;
2740
+ display: flex;
2741
+ gap: 0.5em;
2738
2742
 
2739
2743
  .stldocs-search-filter-count {
2740
2744
  font-size: 0.75rem;
2741
- margin: auto 0;
2742
2745
  background-color: var(--stldocs-color-selected);
2743
- border-radius: 0.5rem;
2744
- padding: 0 0.5rem;
2746
+ border-radius: 100vmax;
2747
+ padding: 0 0.35rem;
2745
2748
  line-height: 1.5;
2749
+ font-variant-numeric: tabular-nums;
2750
+ }
2751
+
2752
+ svg {
2753
+ flex: 0 0 auto;
2754
+ }
2755
+ }
2756
+
2757
+ @media not (min-width: 50rem) {
2758
+ svg {
2759
+ display: block;
2760
+ }
2761
+ .stldocs-search-filter-label,
2762
+ .stldocs-search-filter-count {
2763
+ display: none;
2746
2764
  }
2747
2765
  }
2748
2766
  }
@@ -2757,8 +2775,8 @@ a.stl-ui-button {
2757
2775
 
2758
2776
  mark {
2759
2777
  color: var(--stl-color-foreground);
2760
- background-color: var(--stl-color-border);
2761
- border-bottom: 1px dotted var(--stl-color-foreground);
2778
+ background-color: var(--stl-color-text-selection-background);
2779
+ box-shadow: inset 0 -1px rgb(from var(--stl-color-text-selection-background) r g b / 1);
2762
2780
  }
2763
2781
 
2764
2782
  &[data-stldocs-search-result='resource'] {
@@ -2907,7 +2925,7 @@ a.stl-ui-button {
2907
2925
  width: 100%;
2908
2926
  overflow: hidden;
2909
2927
  display: none;
2910
- padding: 1rem;
2928
+ padding: 1rem 1rem 0;
2911
2929
  inset: 0;
2912
2930
  background-color: var(--stl-color-background);
2913
2931
  color: var(--stl-color-foreground);
@@ -2927,8 +2945,9 @@ a.stl-ui-button {
2927
2945
  width: 100%;
2928
2946
 
2929
2947
  .stldocs-listview {
2930
- margin: 0.8rem 0;
2948
+ margin: 0.8rem 0 0;
2931
2949
  height: 100%;
2950
+ padding-bottom: 1rem;
2932
2951
  }
2933
2952
  }
2934
2953
 
@@ -2955,11 +2974,13 @@ a.stl-ui-button {
2955
2974
  .stldocs-root {
2956
2975
  .stldocs-search-modal {
2957
2976
  height: 100%;
2958
- max-width: 1024px;
2977
+ width: 1024px;
2978
+ max-width: calc(100% - 4rem);
2959
2979
  max-height: 80vh;
2960
2980
  margin: 3rem auto;
2961
2981
  border: 1px solid var(--stl-color-border);
2962
- border-radius: var(--stl-ui-layout-border-radius-sml);
2982
+ /* nest with input that has --stl-ui-layout-border-radius-sml */
2983
+ border-radius: calc(var(--stl-ui-layout-border-radius-sml) + 0.9rem);
2963
2984
 
2964
2985
  .stldocs-search-modal-close-button {
2965
2986
  display: none;
@@ -2977,15 +2998,6 @@ a.stl-ui-button {
2977
2998
  }
2978
2999
  }
2979
3000
 
2980
- @media (max-width: 50rem) {
2981
- .stldocs-root .stldocs-search-modal {
2982
- .stldocs-search-filter-label,
2983
- .stldocs-search-filter-count {
2984
- display: none;
2985
- }
2986
- }
2987
- }
2988
-
2989
3001
  /* For standalone usage of docs-ui */
2990
3002
 
2991
3003
  /*
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stainless-api/docs-ui",
3
3
  "private": false,
4
- "version": "0.1.0-beta.55",
4
+ "version": "0.1.0-beta.56",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -18,7 +18,7 @@
18
18
  "clsx": "^2.1.1",
19
19
  "htmlparser2": "^10.0.0",
20
20
  "lucide-react": "^0.562.0",
21
- "@stainless-api/ui-primitives": "0.1.0-beta.41"
21
+ "@stainless-api/ui-primitives": "0.1.0-beta.42"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "24.10.4",