@scalar/api-client-react 2.0.27 → 2.0.29

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @scalar/api-client-react
2
2
 
3
+ ## 2.0.29
4
+
5
+ ## 2.0.28
6
+
7
+ ### Patch Changes
8
+
9
+ - [#8519](https://github.com/scalar/scalar/pull/8519): refactor: extract the code example block into `@scalar/blocks/code-example`. `api-client`, `api-client-react`, and `api-reference` now import `CodeExample`, `findClient`, `generateClientOptions`, and the related helpers from the new package. `workspace-store` exports `isParamDisabled` with an optional `defaultDisabled` argument.
10
+
11
+ **Breaking (`@scalar/api-client`):** the `@scalar/api-client/blocks/operation-code-sample` and `@scalar/api-client/v2/blocks/operation-code-sample` export paths have been removed. Import from `@scalar/blocks/code-example` instead, and use the renamed `CodeExample` / `CodeExampleProps` (previously `OperationCodeSample` / `OperationCodeSampleProps`).
12
+
3
13
  ## 2.0.27
4
14
 
5
15
  ## 2.0.26
package/dist/style.css CHANGED
@@ -434,6 +434,9 @@
434
434
  border-radius: var(--scalar-radius);
435
435
  border-width: 1px;
436
436
  }
437
+ :where(.scalar-app) input, :where(.scalar-app) select, :where(.scalar-app) textarea {
438
+ text-align: start;
439
+ }
437
440
  :where(.scalar-app) input::placeholder, :where(.scalar-app) text-area::placeholder {
438
441
  color: var(--scalar-color-3);
439
442
  font-family: var(--scalar-font);
@@ -1606,7 +1609,7 @@
1606
1609
  color: var(--scalar-background-1);
1607
1610
  border-radius: 2px;
1608
1611
  }
1609
- .sidebar-heading-type[data-v-1857170e] {
1612
+ .sidebar-heading-type[data-v-bdef8365] {
1610
1613
  text-transform: uppercase;
1611
1614
  color: var(--method-color, var(--scalar-color-1));
1612
1615
  font-size: 10px;
@@ -2004,9 +2007,6 @@
2004
2007
  .scalar-app .mt-auto {
2005
2008
  margin-top: auto;
2006
2009
  }
2007
- .scalar-app .mt-px {
2008
- margin-top: 1px;
2009
- }
2010
2010
  .scalar-app .-mr-0\.5 {
2011
2011
  margin-right: -2px;
2012
2012
  }
@@ -2280,9 +2280,6 @@
2280
2280
  .scalar-app .max-h-40 {
2281
2281
  max-height: 160px;
2282
2282
  }
2283
- .scalar-app .max-h-80 {
2284
- max-height: 320px;
2285
- }
2286
2283
  .scalar-app .max-h-\[60svh\] {
2287
2284
  max-height: 60svh;
2288
2285
  }
@@ -2482,9 +2479,6 @@
2482
2479
  .scalar-app .min-w-8 {
2483
2480
  min-width: 32px;
2484
2481
  }
2485
- .scalar-app .min-w-32 {
2486
- min-width: 128px;
2487
- }
2488
2482
  .scalar-app .min-w-\[4\.5rem\] {
2489
2483
  min-width: 4.5rem;
2490
2484
  }
@@ -3161,9 +3155,6 @@
3161
3155
  .scalar-app .py-0\.25 {
3162
3156
  padding-block: 1px;
3163
3157
  }
3164
- .scalar-app .py-0\.75 {
3165
- padding-block: 3px;
3166
- }
3167
3158
  .scalar-app .py-1 {
3168
3159
  padding-block: 4px;
3169
3160
  }
@@ -3299,6 +3290,9 @@
3299
3290
  .scalar-app .text-right {
3300
3291
  text-align: right;
3301
3292
  }
3293
+ .scalar-app .text-start {
3294
+ text-align: start;
3295
+ }
3302
3296
  .scalar-app .font-code {
3303
3297
  font-family: var(--scalar-font-code);
3304
3298
  }
@@ -4539,9 +4533,6 @@
4539
4533
  .scalar-app .ui-open\:rotate-90[data-headlessui-state~="open"], :where([data-headlessui-state~="open"]) :is(.scalar-app .ui-open\:rotate-90) {
4540
4534
  rotate: 90deg;
4541
4535
  }
4542
- .scalar-app .ui-open\:rotate-180[data-headlessui-state~="open"], :where([data-headlessui-state~="open"]) :is(.scalar-app .ui-open\:rotate-180) {
4543
- rotate: 180deg;
4544
- }
4545
4536
  .scalar-app .last\:ui-open\:border-b-0:last-child[data-headlessui-state~="open"], :where([data-headlessui-state~="open"]) .scalar-app .last\:ui-open\:border-b-0:last-child {
4546
4537
  border-bottom-style: var(--tw-border-style);
4547
4538
  border-bottom-width: 0;
@@ -5429,20 +5420,20 @@ input[data-v-a6f4752a]::placeholder {
5429
5420
  -webkit-text-security: disc;
5430
5421
  -moz-text-security: disc;
5431
5422
  }
5432
- .request-section-content[data-v-612d194c] {
5423
+ .request-section-content[data-v-f52d9c1f] {
5433
5424
  --scalar-border-width: 0.5px;
5434
5425
  }
5435
- .request-section-content-filter[data-v-612d194c] {
5426
+ .request-section-content-filter[data-v-f52d9c1f] {
5436
5427
  box-shadow: 0 -10px 0 10px var(--scalar-background-1);
5437
5428
  }
5438
- .request-item:focus-within .request-meta-buttons[data-v-612d194c] {
5429
+ .request-item:focus-within .request-meta-buttons[data-v-f52d9c1f] {
5439
5430
  opacity: 1;
5440
5431
  }
5441
- .group-hover-input[data-v-612d194c] {
5432
+ .group-hover-input[data-v-f52d9c1f] {
5442
5433
  border-width: var(--scalar-border-width);
5443
5434
  border-color: transparent;
5444
5435
  }
5445
- .group:hover .group-hover-input[data-v-612d194c] {
5436
+ .group:hover .group-hover-input[data-v-f52d9c1f] {
5446
5437
  background: color-mix(
5447
5438
  in srgb,
5448
5439
  var(--scalar-background-1),
@@ -5450,7 +5441,7 @@ input[data-v-a6f4752a]::placeholder {
5450
5441
  );
5451
5442
  border-color: var(--scalar-border-color);
5452
5443
  }
5453
- .group-hover-input[data-v-612d194c]:focus {
5444
+ .group-hover-input[data-v-f52d9c1f]:focus {
5454
5445
  background: transparent !important;
5455
5446
  border-color: var(--scalar-border-color) !important;
5456
5447
  }
@@ -5548,47 +5539,6 @@ to {
5548
5539
  transform: translateY(0);
5549
5540
  }
5550
5541
  }
5551
- .request-card[data-v-70ede25b] {
5552
- color: var(--scalar-color-1);
5553
- font-size: var(--scalar-font-size-3);
5554
- }
5555
- .request-method[data-v-70ede25b] {
5556
- font-family: var(--scalar-font-code);
5557
- text-transform: uppercase;
5558
- margin-right: 6px;
5559
- }
5560
- .request-card-footer[data-v-70ede25b] {
5561
- display: flex;
5562
- justify-content: flex-end;
5563
- padding: 6px;
5564
- flex-shrink: 0;
5565
- position: relative;
5566
- }
5567
- .request-card-footer-addon[data-v-70ede25b] {
5568
- display: flex;
5569
- align-items: center;
5570
-
5571
- flex: 1;
5572
- min-width: 0;
5573
- }
5574
- .request-editor-section[data-v-70ede25b] {
5575
- display: flex;
5576
- flex: 1;
5577
- }
5578
- .request-card-simple[data-v-70ede25b] {
5579
- display: flex;
5580
- align-items: center;
5581
- justify-content: space-between;
5582
-
5583
- padding: 8px 8px 8px 12px;
5584
-
5585
- font-size: var(--scalar-small);
5586
- }
5587
- .code-snippet[data-v-70ede25b] {
5588
- display: flex;
5589
- flex-direction: column;
5590
- width: 100%;
5591
- }
5592
5542
  /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
5593
5543
  [data-radix-popper-content-wrapper]:has(.scalar-api-client-context-menu) {
5594
5544
  z-index: 1000 !important;
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "testing",
20
20
  "react"
21
21
  ],
22
- "version": "2.0.27",
22
+ "version": "2.0.29",
23
23
  "engines": {
24
24
  "node": ">=22"
25
25
  },
@@ -39,9 +39,10 @@
39
39
  "CHANGELOG.md"
40
40
  ],
41
41
  "dependencies": {
42
- "@scalar/helpers": "0.8.2",
43
- "@scalar/api-client": "3.11.0",
44
- "@scalar/workspace-store": "0.54.5"
42
+ "@scalar/workspace-store": "0.55.1",
43
+ "@scalar/helpers": "0.9.0",
44
+ "@scalar/blocks": "0.1.1",
45
+ "@scalar/api-client": "3.13.0"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@testing-library/dom": "^10.4.1",