@scalar/api-client-react 2.0.26 → 2.0.28

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.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+
9
+ **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`).
10
+
11
+ ## 2.0.27
12
+
3
13
  ## 2.0.26
4
14
 
5
15
  ## 2.0.25
package/dist/style.css CHANGED
@@ -434,7 +434,14 @@
434
434
  border-radius: var(--scalar-radius);
435
435
  border-width: 1px;
436
436
  }
437
- :where(.scalar-app) input::placeholder {
437
+ :where(.scalar-app) input, :where(.scalar-app) select, :where(.scalar-app) textarea {
438
+ text-align: start;
439
+ }
440
+ :where(.scalar-app) input::placeholder, :where(.scalar-app) text-area::placeholder {
441
+ color: var(--scalar-color-3);
442
+ font-family: var(--scalar-font);
443
+ }
444
+ :where(.scalar-app) ::-webkit-input-placeholder {
438
445
  color: var(--scalar-color-3);
439
446
  font-family: var(--scalar-font);
440
447
  }
@@ -1602,7 +1609,7 @@
1602
1609
  color: var(--scalar-background-1);
1603
1610
  border-radius: 2px;
1604
1611
  }
1605
- .sidebar-heading-type[data-v-1857170e] {
1612
+ .sidebar-heading-type[data-v-bdef8365] {
1606
1613
  text-transform: uppercase;
1607
1614
  color: var(--method-color, var(--scalar-color-1));
1608
1615
  font-size: 10px;
@@ -2000,9 +2007,6 @@
2000
2007
  .scalar-app .mt-auto {
2001
2008
  margin-top: auto;
2002
2009
  }
2003
- .scalar-app .mt-px {
2004
- margin-top: 1px;
2005
- }
2006
2010
  .scalar-app .-mr-0\.5 {
2007
2011
  margin-right: -2px;
2008
2012
  }
@@ -2276,9 +2280,6 @@
2276
2280
  .scalar-app .max-h-40 {
2277
2281
  max-height: 160px;
2278
2282
  }
2279
- .scalar-app .max-h-80 {
2280
- max-height: 320px;
2281
- }
2282
2283
  .scalar-app .max-h-\[60svh\] {
2283
2284
  max-height: 60svh;
2284
2285
  }
@@ -2478,9 +2479,6 @@
2478
2479
  .scalar-app .min-w-8 {
2479
2480
  min-width: 32px;
2480
2481
  }
2481
- .scalar-app .min-w-32 {
2482
- min-width: 128px;
2483
- }
2484
2482
  .scalar-app .min-w-\[4\.5rem\] {
2485
2483
  min-width: 4.5rem;
2486
2484
  }
@@ -3157,9 +3155,6 @@
3157
3155
  .scalar-app .py-0\.25 {
3158
3156
  padding-block: 1px;
3159
3157
  }
3160
- .scalar-app .py-0\.75 {
3161
- padding-block: 3px;
3162
- }
3163
3158
  .scalar-app .py-1 {
3164
3159
  padding-block: 4px;
3165
3160
  }
@@ -3295,6 +3290,9 @@
3295
3290
  .scalar-app .text-right {
3296
3291
  text-align: right;
3297
3292
  }
3293
+ .scalar-app .text-start {
3294
+ text-align: start;
3295
+ }
3298
3296
  .scalar-app .font-code {
3299
3297
  font-family: var(--scalar-font-code);
3300
3298
  }
@@ -4535,9 +4533,6 @@
4535
4533
  .scalar-app .ui-open\:rotate-90[data-headlessui-state~="open"], :where([data-headlessui-state~="open"]) :is(.scalar-app .ui-open\:rotate-90) {
4536
4534
  rotate: 90deg;
4537
4535
  }
4538
- .scalar-app .ui-open\:rotate-180[data-headlessui-state~="open"], :where([data-headlessui-state~="open"]) :is(.scalar-app .ui-open\:rotate-180) {
4539
- rotate: 180deg;
4540
- }
4541
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 {
4542
4537
  border-bottom-style: var(--tw-border-style);
4543
4538
  border-bottom-width: 0;
@@ -5357,19 +5352,19 @@ to {
5357
5352
  .light-mode .scalar-pill--context-fn {
5358
5353
  background: color-mix(in srgb, var(--scalar-background-3), transparent 40%);
5359
5354
  }
5360
- [data-v-e83eb7d0] .code-input-lite__editor {
5355
+ [data-v-6b2d7899] .code-input-lite__editor {
5361
5356
  background-color: transparent;
5362
5357
  font-family: var(--scalar-font);
5363
5358
  font-size: var(--scalar-small);
5364
5359
  padding: 5px 8px;
5365
5360
  }
5366
- [data-v-e83eb7d0] .scalar-pill:not(:last-of-type) {
5361
+ [data-v-6b2d7899] .scalar-pill:not(:last-of-type) {
5367
5362
  margin-right: 0.15em;
5368
5363
  }
5369
- [data-v-e83eb7d0] .scalar-pill:not(:first-of-type) {
5364
+ [data-v-6b2d7899] .scalar-pill:not(:first-of-type) {
5370
5365
  margin-left: 0.5px;
5371
5366
  }
5372
- .filemask[data-v-e83eb7d0] {
5367
+ .filemask[data-v-6b2d7899] {
5373
5368
  mask-image: linear-gradient(
5374
5369
  to right,
5375
5370
  transparent 0,
@@ -5425,20 +5420,20 @@ input[data-v-a6f4752a]::placeholder {
5425
5420
  -webkit-text-security: disc;
5426
5421
  -moz-text-security: disc;
5427
5422
  }
5428
- .request-section-content[data-v-9ee5445b] {
5423
+ .request-section-content[data-v-f52d9c1f] {
5429
5424
  --scalar-border-width: 0.5px;
5430
5425
  }
5431
- .request-section-content-filter[data-v-9ee5445b] {
5426
+ .request-section-content-filter[data-v-f52d9c1f] {
5432
5427
  box-shadow: 0 -10px 0 10px var(--scalar-background-1);
5433
5428
  }
5434
- .request-item:focus-within .request-meta-buttons[data-v-9ee5445b] {
5429
+ .request-item:focus-within .request-meta-buttons[data-v-f52d9c1f] {
5435
5430
  opacity: 1;
5436
5431
  }
5437
- .group-hover-input[data-v-9ee5445b] {
5432
+ .group-hover-input[data-v-f52d9c1f] {
5438
5433
  border-width: var(--scalar-border-width);
5439
5434
  border-color: transparent;
5440
5435
  }
5441
- .group:hover .group-hover-input[data-v-9ee5445b] {
5436
+ .group:hover .group-hover-input[data-v-f52d9c1f] {
5442
5437
  background: color-mix(
5443
5438
  in srgb,
5444
5439
  var(--scalar-background-1),
@@ -5446,7 +5441,7 @@ input[data-v-a6f4752a]::placeholder {
5446
5441
  );
5447
5442
  border-color: var(--scalar-border-color);
5448
5443
  }
5449
- .group-hover-input[data-v-9ee5445b]:focus {
5444
+ .group-hover-input[data-v-f52d9c1f]:focus {
5450
5445
  background: transparent !important;
5451
5446
  border-color: var(--scalar-border-color) !important;
5452
5447
  }
@@ -5544,47 +5539,6 @@ to {
5544
5539
  transform: translateY(0);
5545
5540
  }
5546
5541
  }
5547
- .request-card[data-v-70ede25b] {
5548
- color: var(--scalar-color-1);
5549
- font-size: var(--scalar-font-size-3);
5550
- }
5551
- .request-method[data-v-70ede25b] {
5552
- font-family: var(--scalar-font-code);
5553
- text-transform: uppercase;
5554
- margin-right: 6px;
5555
- }
5556
- .request-card-footer[data-v-70ede25b] {
5557
- display: flex;
5558
- justify-content: flex-end;
5559
- padding: 6px;
5560
- flex-shrink: 0;
5561
- position: relative;
5562
- }
5563
- .request-card-footer-addon[data-v-70ede25b] {
5564
- display: flex;
5565
- align-items: center;
5566
-
5567
- flex: 1;
5568
- min-width: 0;
5569
- }
5570
- .request-editor-section[data-v-70ede25b] {
5571
- display: flex;
5572
- flex: 1;
5573
- }
5574
- .request-card-simple[data-v-70ede25b] {
5575
- display: flex;
5576
- align-items: center;
5577
- justify-content: space-between;
5578
-
5579
- padding: 8px 8px 8px 12px;
5580
-
5581
- font-size: var(--scalar-small);
5582
- }
5583
- .code-snippet[data-v-70ede25b] {
5584
- display: flex;
5585
- flex-direction: column;
5586
- width: 100%;
5587
- }
5588
5542
  /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
5589
5543
  [data-radix-popper-content-wrapper]:has(.scalar-api-client-context-menu) {
5590
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.26",
22
+ "version": "2.0.28",
23
23
  "engines": {
24
24
  "node": ">=22"
25
25
  },
@@ -39,9 +39,10 @@
39
39
  "CHANGELOG.md"
40
40
  ],
41
41
  "dependencies": {
42
- "@scalar/api-client": "3.10.4",
43
- "@scalar/workspace-store": "0.54.4",
44
- "@scalar/helpers": "0.8.2"
42
+ "@scalar/api-client": "3.12.0",
43
+ "@scalar/blocks": "0.1.0",
44
+ "@scalar/helpers": "0.9.0",
45
+ "@scalar/workspace-store": "0.55.0"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@testing-library/dom": "^10.4.1",