@scalar/api-client 2.42.0 → 2.43.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 (41) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/libs/normalize-headers.d.ts.map +1 -1
  3. package/dist/libs/normalize-headers.js +1 -0
  4. package/dist/libs/normalize-headers.js.map +1 -1
  5. package/dist/style.css +76 -35
  6. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/helpers/send-request.js +23 -2
  8. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  9. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
  10. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
  11. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +32 -9
  12. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
  13. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  15. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  16. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +8 -1
  17. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  18. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  19. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  20. package/dist/v2/components/sidebar/Sidebar.vue.script.js +9 -4
  21. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  22. package/dist/v2/constants.js +1 -1
  23. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  24. package/dist/v2/features/app/app-events.js +8 -0
  25. package/dist/v2/features/app/app-events.js.map +1 -1
  26. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  27. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  28. package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
  29. package/dist/v2/features/app/components/AppSidebar.vue.script.js +19 -10
  30. package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
  31. package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts +3 -0
  32. package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
  33. package/dist/v2/features/app/components/SidebarItemMenu.vue.js.map +1 -1
  34. package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js +30 -30
  35. package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js.map +1 -1
  36. package/dist/v2/features/app/helpers/create-temp-operation.d.ts +14 -0
  37. package/dist/v2/features/app/helpers/create-temp-operation.d.ts.map +1 -0
  38. package/dist/v2/features/app/helpers/create-temp-operation.js +52 -0
  39. package/dist/v2/features/app/helpers/create-temp-operation.js.map +1 -0
  40. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js +1 -1
  41. package/package.json +12 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.43.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#8761](https://github.com/scalar/scalar/pull/8761): feat: improve UX for creating a new operation
8
+ - [#8773](https://github.com/scalar/scalar/pull/8773): feat: suport for set-cookie header
9
+
10
+ ### Patch Changes
11
+
12
+ - [#8778](https://github.com/scalar/scalar/pull/8778): fix: hide examples on modal and always show the http badge on modal
13
+
3
14
  ## 2.42.0
4
15
 
5
16
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-headers.d.ts","sourceRoot":"","sources":["../../src/libs/normalize-headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,OAAO,EAAE,4BAA0B,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAiErG,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,WAM7B,CAAA"}
1
+ {"version":3,"file":"normalize-headers.d.ts","sourceRoot":"","sources":["../../src/libs/normalize-headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,OAAO,EAAE,4BAA0B,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAoErG,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,WAM7B,CAAA"}
@@ -18,6 +18,7 @@ var normalizeHeaders = (_headers, removeProxyHeaders = false) => {
18
18
  "Access-Control-Allow-Origin",
19
19
  "Access-Control-Expose-Headers"
20
20
  ].map((header) => header.toLowerCase()).forEach((header) => delete headers[header]);
21
+ delete headers["x-scalar-set-cookie"];
21
22
  /** Exact key of the modified headers header */
22
23
  const modifiedHeaderKey = Object.keys(headers).find((key) => key.toLowerCase() === "x-scalar-modified-headers");
23
24
  /** List of modified headers */
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-headers.js","names":[],"sources":["../../src/libs/normalize-headers.ts"],"sourcesContent":["/**\n * Normalize headers:\n *\n * - Electron modifies the headers to allow CORS, this function hides the modifications\n * - Restores original headers\n * - Normalizes the header keys\n * - Sorts headers alphabetically\n * - converts to an object\n *\n */\nexport const normalizeHeaders = (_headers: Headers, removeProxyHeaders = false): Record<string, string> => {\n // Convert headers to an object\n const headers = Object.fromEntries(_headers)\n\n // Remove headers, that are added by the proxy\n if (removeProxyHeaders) {\n const headersToRemove = [\n 'Access-Control-Allow-Credentials',\n 'Access-Control-Allow-Headers',\n 'Access-Control-Allow-Methods',\n 'Access-Control-Allow-Origin',\n 'Access-Control-Expose-Headers',\n ]\n\n headersToRemove.map((header) => header.toLowerCase()).forEach((header) => delete headers[header])\n }\n\n /** Exact key of the modified headers header */\n const modifiedHeaderKey = Object.keys(headers).find((key) => key.toLowerCase() === 'x-scalar-modified-headers')\n\n /** List of modified headers */\n const modifiedHeaders = modifiedHeaderKey\n ? (headers[modifiedHeaderKey]\n ?.toString()\n .split(', ')\n ?.map((value: string) => value.toLowerCase()) ?? [])\n : []\n\n // Remove headers listed in `X-Scalar-Modified-Headers`\n Object.keys(headers).forEach((key) => {\n if (modifiedHeaders.includes(key.toLowerCase())) {\n delete headers[key]\n }\n })\n\n // Remove `X-Scalar-Modified-Headers` header\n if (modifiedHeaderKey) {\n delete headers[modifiedHeaderKey]\n }\n\n // Restore original headers (remove the `X-Scalar-Original-` prefix)\n Object.keys(headers).forEach((key) => {\n // Case-insensitive regular expression\n const ORIGINAL_KEY_REGEX = /^x-scalar-original-/i\n\n if (ORIGINAL_KEY_REGEX.test(key)) {\n const originalKey = key.replace(ORIGINAL_KEY_REGEX, '')\n if (headers[key]) {\n headers[originalKey] = headers[key]\n delete headers[key]\n }\n }\n })\n\n // Normalizes the header keys\n Object.keys(headers).forEach((key) => {\n const formattedKey = formatHeaderKey(key)\n if (key !== formattedKey && headers[key]) {\n headers[formattedKey] = headers[key]\n delete headers[key]\n }\n })\n\n // Sort headers alphebetically by key\n return Object.fromEntries(Object.entries(headers).sort(([a], [b]) => a.localeCompare(b)))\n}\n\n/** Make the first letter and all letters after a dash uppercase */\nexport const formatHeaderKey = (key: string) =>\n key\n .split('-')\n .map((word) => {\n return word.charAt(0).toUpperCase() + word.toLowerCase().slice(1)\n })\n .join('-')\n"],"mappings":";;;;;;;;;;;AAUA,IAAa,oBAAoB,UAAmB,qBAAqB,UAAkC;CAEzG,MAAM,UAAU,OAAO,YAAY,SAAS;AAG5C,KAAI,mBACsB;EACtB;EACA;EACA;EACA;EACA;EACD,CAEe,KAAK,WAAW,OAAO,aAAa,CAAC,CAAC,SAAS,WAAW,OAAO,QAAQ,QAAQ;;CAInG,MAAM,oBAAoB,OAAO,KAAK,QAAQ,CAAC,MAAM,QAAQ,IAAI,aAAa,KAAK,4BAA4B;;CAG/G,MAAM,kBAAkB,oBACnB,QAAQ,oBACL,UAAU,CACX,MAAM,KAAK,EACV,KAAK,UAAkB,MAAM,aAAa,CAAC,IAAI,EAAE,GACrD,EAAE;AAGN,QAAO,KAAK,QAAQ,CAAC,SAAS,QAAQ;AACpC,MAAI,gBAAgB,SAAS,IAAI,aAAa,CAAC,CAC7C,QAAO,QAAQ;GAEjB;AAGF,KAAI,kBACF,QAAO,QAAQ;AAIjB,QAAO,KAAK,QAAQ,CAAC,SAAS,QAAQ;EAEpC,MAAM,qBAAqB;AAE3B,MAAI,mBAAmB,KAAK,IAAI,EAAE;GAChC,MAAM,cAAc,IAAI,QAAQ,oBAAoB,GAAG;AACvD,OAAI,QAAQ,MAAM;AAChB,YAAQ,eAAe,QAAQ;AAC/B,WAAO,QAAQ;;;GAGnB;AAGF,QAAO,KAAK,QAAQ,CAAC,SAAS,QAAQ;EACpC,MAAM,eAAe,gBAAgB,IAAI;AACzC,MAAI,QAAQ,gBAAgB,QAAQ,MAAM;AACxC,WAAQ,gBAAgB,QAAQ;AAChC,UAAO,QAAQ;;GAEjB;AAGF,QAAO,OAAO,YAAY,OAAO,QAAQ,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;;;AAI3F,IAAa,mBAAmB,QAC9B,IACG,MAAM,IAAI,CACV,KAAK,SAAS;AACb,QAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,aAAa,CAAC,MAAM,EAAE;EACjE,CACD,KAAK,IAAI"}
1
+ {"version":3,"file":"normalize-headers.js","names":[],"sources":["../../src/libs/normalize-headers.ts"],"sourcesContent":["/**\n * Normalize headers:\n *\n * - Electron modifies the headers to allow CORS, this function hides the modifications\n * - Restores original headers\n * - Normalizes the header keys\n * - Sorts headers alphabetically\n * - converts to an object\n *\n */\nexport const normalizeHeaders = (_headers: Headers, removeProxyHeaders = false): Record<string, string> => {\n // Convert headers to an object\n const headers = Object.fromEntries(_headers)\n\n // Remove headers, that are added by the proxy\n if (removeProxyHeaders) {\n const headersToRemove = [\n 'Access-Control-Allow-Credentials',\n 'Access-Control-Allow-Headers',\n 'Access-Control-Allow-Methods',\n 'Access-Control-Allow-Origin',\n 'Access-Control-Expose-Headers',\n ]\n\n headersToRemove.map((header) => header.toLowerCase()).forEach((header) => delete headers[header])\n }\n\n // Remove the custom set-cookie header, we will handle this separately\n delete headers['x-scalar-set-cookie']\n\n /** Exact key of the modified headers header */\n const modifiedHeaderKey = Object.keys(headers).find((key) => key.toLowerCase() === 'x-scalar-modified-headers')\n\n /** List of modified headers */\n const modifiedHeaders = modifiedHeaderKey\n ? (headers[modifiedHeaderKey]\n ?.toString()\n .split(', ')\n ?.map((value: string) => value.toLowerCase()) ?? [])\n : []\n\n // Remove headers listed in `X-Scalar-Modified-Headers`\n Object.keys(headers).forEach((key) => {\n if (modifiedHeaders.includes(key.toLowerCase())) {\n delete headers[key]\n }\n })\n\n // Remove `X-Scalar-Modified-Headers` header\n if (modifiedHeaderKey) {\n delete headers[modifiedHeaderKey]\n }\n\n // Restore original headers (remove the `X-Scalar-Original-` prefix)\n Object.keys(headers).forEach((key) => {\n // Case-insensitive regular expression\n const ORIGINAL_KEY_REGEX = /^x-scalar-original-/i\n\n if (ORIGINAL_KEY_REGEX.test(key)) {\n const originalKey = key.replace(ORIGINAL_KEY_REGEX, '')\n if (headers[key]) {\n headers[originalKey] = headers[key]\n delete headers[key]\n }\n }\n })\n\n // Normalizes the header keys\n Object.keys(headers).forEach((key) => {\n const formattedKey = formatHeaderKey(key)\n if (key !== formattedKey && headers[key]) {\n headers[formattedKey] = headers[key]\n delete headers[key]\n }\n })\n\n // Sort headers alphebetically by key\n return Object.fromEntries(Object.entries(headers).sort(([a], [b]) => a.localeCompare(b)))\n}\n\n/** Make the first letter and all letters after a dash uppercase */\nexport const formatHeaderKey = (key: string) =>\n key\n .split('-')\n .map((word) => {\n return word.charAt(0).toUpperCase() + word.toLowerCase().slice(1)\n })\n .join('-')\n"],"mappings":";;;;;;;;;;;AAU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MAAM,EAAE;EACjE,CACD,KAAK,IAAI"}
package/dist/style.css CHANGED
@@ -1027,6 +1027,7 @@ input[data-v-c1a50a6e]::placeholder {
1027
1027
  --scalar-text-decoration-hover: underline;
1028
1028
  --scalar-link-font-weight: inherit;
1029
1029
  --scalar-sidebar-indent: 20px;
1030
+ --scalar-sidebar-padding: 12px;
1030
1031
  }
1031
1032
 
1032
1033
  .dark-mode {
@@ -1474,6 +1475,16 @@ input[data-v-c1a50a6e]::placeholder {
1474
1475
  }
1475
1476
  }
1476
1477
 
1478
+ @keyframes border-bottom {
1479
+ from {
1480
+ border-bottom-width: 0;
1481
+ }
1482
+
1483
+ to {
1484
+ border-bottom-width: var(--scalar-border-width);
1485
+ }
1486
+ }
1487
+
1477
1488
  @property --tw-font-weight {
1478
1489
  syntax: "*";
1479
1490
  inherits: false
@@ -3269,6 +3280,12 @@ input[data-v-c1a50a6e]::placeholder {
3269
3280
  display: flex;
3270
3281
  }
3271
3282
 
3283
+ .animate-sidebar-border-bottom {
3284
+ animation: forwards border-bottom;
3285
+ animation-timeline: scroll();
3286
+ animation-range-end: 1px;
3287
+ }
3288
+
3272
3289
  .group\/sidebar-section:first-of-type > .group\/spacer-before, .group\/sidebar-section:last-of-type > .group\/spacer-after {
3273
3290
  height: 0;
3274
3291
  }
@@ -3524,6 +3541,10 @@ input[data-v-c1a50a6e]::placeholder {
3524
3541
  top: var(--nested-items-offset) !important;
3525
3542
  }
3526
3543
 
3544
+ .scalar-app .top-\(--scalar-sidebar-sticky-offset\,0\) {
3545
+ top: var(--scalar-sidebar-sticky-offset, 0);
3546
+ }
3547
+
3527
3548
  .scalar-app .top-0\.5 {
3528
3549
  top: 2px;
3529
3550
  }
@@ -3636,6 +3657,10 @@ input[data-v-c1a50a6e]::placeholder {
3636
3657
  }
3637
3658
  }
3638
3659
 
3660
+ .scalar-app .-m-\(--scalar-sidebar-padding\) {
3661
+ margin: calc(var(--scalar-sidebar-padding) * -1);
3662
+ }
3663
+
3639
3664
  .scalar-app .-m-1 {
3640
3665
  margin: -4px;
3641
3666
  }
@@ -3803,6 +3828,10 @@ input[data-v-c1a50a6e]::placeholder {
3803
3828
  min-height: 48px;
3804
3829
  }
3805
3830
 
3831
+ .scalar-app .w-\(--scalar-sidebar-width\) {
3832
+ width: var(--scalar-sidebar-width);
3833
+ }
3834
+
3806
3835
  .scalar-app .w-12 {
3807
3836
  width: 48px;
3808
3837
  }
@@ -4043,6 +4072,10 @@ input[data-v-c1a50a6e]::placeholder {
4043
4072
  border-color: var(--scalar-sidebar-search-border-color, var(--scalar-border-color));
4044
4073
  }
4045
4074
 
4075
+ .scalar-app .border-b-sidebar-border {
4076
+ border-bottom-color: var(--scalar-sidebar-border-color, var(--scalar-border-color));
4077
+ }
4078
+
4046
4079
  .scalar-app .bg-\(--bg-light\) {
4047
4080
  background-color: var(--bg-light);
4048
4081
  }
@@ -4176,6 +4209,10 @@ input[data-v-c1a50a6e]::placeholder {
4176
4209
  mask-repeat: repeat;
4177
4210
  }
4178
4211
 
4212
+ .scalar-app .p-\(--scalar-sidebar-padding\) {
4213
+ padding: var(--scalar-sidebar-padding);
4214
+ }
4215
+
4179
4216
  .scalar-app .p-0\.25 {
4180
4217
  padding: 1px;
4181
4218
  }
@@ -4437,12 +4474,12 @@ input[data-v-c1a50a6e]::placeholder {
4437
4474
  font-family: inherit;
4438
4475
  }
4439
4476
 
4440
- .scalar-app .first\:rounded-t-\[inherit\]:first-child, :is(.scalar-app .\*\:first\:rounded-t-\[inherit\] > *):first-child {
4477
+ .scalar-app .first\:rounded-t-\[inherit\]:first-child {
4441
4478
  border-top-left-radius: inherit;
4442
4479
  border-top-right-radius: inherit;
4443
4480
  }
4444
4481
 
4445
- .scalar-app .last\:rounded-b-\[inherit\]:last-child, :is(.scalar-app .\*\:last\:rounded-b-\[inherit\] > *):last-child {
4482
+ .scalar-app .last\:rounded-b-\[inherit\]:last-child {
4446
4483
  border-bottom-right-radius: inherit;
4447
4484
  border-bottom-left-radius: inherit;
4448
4485
  }
@@ -4638,6 +4675,10 @@ input[data-v-c1a50a6e]::placeholder {
4638
4675
  initial-value: "";
4639
4676
  }
4640
4677
 
4678
+ :where(.scalar-app) [class*="rotate-"], :where(.scalar-app) [class*="translate-"], :where(.scalar-app) [class*="scale-"] {
4679
+ transform: none;
4680
+ }
4681
+
4641
4682
  .scalar-app .pointer-events-auto {
4642
4683
  pointer-events: auto;
4643
4684
  }
@@ -8774,51 +8815,51 @@ input[data-v-c1a50a6e]::placeholder {
8774
8815
  margin-top: 0;
8775
8816
  }
8776
8817
 
8777
- [data-v-e06ea441] .cm-editor {
8818
+ [data-v-0ec7147f] .cm-editor {
8778
8819
  height: 100%;
8779
8820
  outline: none;
8780
8821
  width: 100%;
8781
8822
  }
8782
- [data-v-e06ea441] .cm-line {
8823
+ [data-v-0ec7147f] .cm-line {
8783
8824
  padding: 0;
8784
8825
  }
8785
- [data-v-e06ea441] .cm-content {
8826
+ [data-v-0ec7147f] .cm-content {
8786
8827
  padding: 0;
8787
8828
  display: flex;
8788
8829
  align-items: center;
8789
8830
  font-size: var(--scalar-small);
8790
8831
  }
8791
- .scroll-timeline-x[data-v-e06ea441] {
8832
+ .scroll-timeline-x[data-v-0ec7147f] {
8792
8833
  scroll-timeline: --scroll-timeline x;
8793
8834
  /* Firefox supports */
8794
8835
  scroll-timeline: --scroll-timeline horizontal;
8795
8836
  -ms-overflow-style: none; /* IE and Edge */
8796
8837
  }
8797
- .scroll-timeline-x-hidden[data-v-e06ea441] {
8838
+ .scroll-timeline-x-hidden[data-v-0ec7147f] {
8798
8839
  overflow-x: auto;
8799
8840
  }
8800
- .scroll-timeline-x-hidden[data-v-e06ea441] .cm-scroller {
8841
+ .scroll-timeline-x-hidden[data-v-0ec7147f] .cm-scroller {
8801
8842
  scrollbar-width: none;
8802
8843
  -ms-overflow-style: none;
8803
8844
  padding-right: 20px;
8804
8845
  overflow: auto;
8805
8846
  }
8806
- .scroll-timeline-x-hidden[data-v-e06ea441]::-webkit-scrollbar {
8847
+ .scroll-timeline-x-hidden[data-v-0ec7147f]::-webkit-scrollbar {
8807
8848
  width: 0;
8808
8849
  height: 0;
8809
8850
  display: none;
8810
8851
  }
8811
- .scroll-timeline-x-hidden[data-v-e06ea441] .cm-scroller::-webkit-scrollbar {
8852
+ .scroll-timeline-x-hidden[data-v-0ec7147f] .cm-scroller::-webkit-scrollbar {
8812
8853
  width: 0;
8813
8854
  height: 0;
8814
8855
  display: none;
8815
8856
  }
8816
- .scroll-timeline-x-address[data-v-e06ea441] {
8857
+ .scroll-timeline-x-address[data-v-0ec7147f] {
8817
8858
  line-height: 27px;
8818
8859
  scrollbar-width: none; /* Firefox */
8819
8860
  }
8820
8861
  /* make clickable are to left of send button */
8821
- .scroll-timeline-x-address[data-v-e06ea441]:after {
8862
+ .scroll-timeline-x-address[data-v-0ec7147f]:after {
8822
8863
  content: '';
8823
8864
  position: absolute;
8824
8865
  height: 100%;
@@ -8826,24 +8867,24 @@ input[data-v-c1a50a6e]::placeholder {
8826
8867
  right: 0;
8827
8868
  cursor: text;
8828
8869
  }
8829
- .scroll-timeline-x-address[data-v-e06ea441]:empty:before {
8870
+ .scroll-timeline-x-address[data-v-0ec7147f]:empty:before {
8830
8871
  content: 'Enter URL or cURL request';
8831
8872
  color: var(--scalar-color-3);
8832
8873
  pointer-events: none;
8833
8874
  }
8834
- .fade-left[data-v-e06ea441],
8835
- .fade-right[data-v-e06ea441] {
8875
+ .fade-left[data-v-0ec7147f],
8876
+ .fade-right[data-v-0ec7147f] {
8836
8877
  content: '';
8837
8878
  position: sticky;
8838
8879
  height: 100%;
8839
- animation-name: fadein-e06ea441;
8880
+ animation-name: fadein-0ec7147f;
8840
8881
  animation-duration: 1ms;
8841
8882
  animation-direction: reverse;
8842
8883
  animation-timeline: --scroll-timeline;
8843
8884
  pointer-events: none;
8844
8885
  z-index: 1;
8845
8886
  }
8846
- .fade-left[data-v-e06ea441] {
8887
+ .fade-left[data-v-0ec7147f] {
8847
8888
  background: linear-gradient(
8848
8889
  -90deg,
8849
8890
  color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,
@@ -8854,7 +8895,7 @@ input[data-v-c1a50a6e]::placeholder {
8854
8895
  min-width: 6px;
8855
8896
  animation-direction: normal;
8856
8897
  }
8857
- .fade-right[data-v-e06ea441] {
8898
+ .fade-right[data-v-0ec7147f] {
8858
8899
  background: linear-gradient(
8859
8900
  90deg,
8860
8901
  color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,
@@ -8864,7 +8905,7 @@ input[data-v-c1a50a6e]::placeholder {
8864
8905
  right: -1px;
8865
8906
  min-width: 24px;
8866
8907
  }
8867
- @keyframes fadein-e06ea441 {
8908
+ @keyframes fadein-0ec7147f {
8868
8909
  0% {
8869
8910
  opacity: 0;
8870
8911
  }
@@ -8872,7 +8913,7 @@ input[data-v-c1a50a6e]::placeholder {
8872
8913
  opacity: 1;
8873
8914
  }
8874
8915
  }
8875
- .address-bar-bg-states[data-v-e06ea441] {
8916
+ .address-bar-bg-states[data-v-0ec7147f] {
8876
8917
  --scalar-address-bar-bg: color-mix(
8877
8918
  in srgb,
8878
8919
  var(--scalar-background-1),
@@ -8880,14 +8921,14 @@ input[data-v-c1a50a6e]::placeholder {
8880
8921
  );
8881
8922
  background: var(--scalar-address-bar-bg);
8882
8923
  }
8883
- .address-bar-bg-states[data-v-e06ea441]:has(.cm-focused) {
8924
+ .address-bar-bg-states[data-v-0ec7147f]:has(.cm-focused) {
8884
8925
  --scalar-address-bar-bg: var(--scalar-background-1);
8885
8926
  border-color: var(--scalar-border-color);
8886
8927
  outline-width: 1px;
8887
8928
  outline-style: solid;
8888
8929
  }
8889
- .address-bar-bg-states:has(.cm-focused) .fade-left[data-v-e06ea441],
8890
- .address-bar-bg-states:has(.cm-focused) .fade-right[data-v-e06ea441] {
8930
+ .address-bar-bg-states:has(.cm-focused) .fade-left[data-v-0ec7147f],
8931
+ .address-bar-bg-states:has(.cm-focused) .fade-right[data-v-0ec7147f] {
8891
8932
  --scalar-address-bar-bg: var(--scalar-background-1);
8892
8933
  }
8893
8934
 
@@ -9317,27 +9358,27 @@ to {
9317
9358
  background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.1));
9318
9359
  }
9319
9360
 
9320
- .empty-sidebar-item-content[data-v-6f80f8d3] {
9361
+ .empty-sidebar-item-content[data-v-96a54993] {
9321
9362
  display: none;
9322
9363
  }
9323
- .empty-sidebar-item .empty-sidebar-item-content[data-v-6f80f8d3] {
9364
+ .empty-sidebar-item .empty-sidebar-item-content[data-v-96a54993] {
9324
9365
  display: block;
9325
9366
  }
9326
- .rabbitjump[data-v-6f80f8d3] {
9367
+ .rabbitjump[data-v-96a54993] {
9327
9368
  opacity: 0;
9328
9369
  }
9329
- .empty-sidebar-item:hover .rabbitjump[data-v-6f80f8d3] {
9370
+ .empty-sidebar-item:hover .rabbitjump[data-v-96a54993] {
9330
9371
  opacity: 1;
9331
- animation: rabbitAnimation-6f80f8d3 0.5s steps(1) infinite;
9372
+ animation: rabbitAnimation-96a54993 0.5s steps(1) infinite;
9332
9373
  }
9333
- .empty-sidebar-item:hover .rabbitsit[data-v-6f80f8d3] {
9374
+ .empty-sidebar-item:hover .rabbitsit[data-v-96a54993] {
9334
9375
  opacity: 0;
9335
- animation: rabbitAnimation2-6f80f8d3 0.5s steps(1) infinite;
9376
+ animation: rabbitAnimation2-96a54993 0.5s steps(1) infinite;
9336
9377
  }
9337
- .empty-sidebar-item:hover .rabbit-ascii[data-v-6f80f8d3] {
9338
- animation: rabbitRun-6f80f8d3 8s infinite linear;
9378
+ .empty-sidebar-item:hover .rabbit-ascii[data-v-96a54993] {
9379
+ animation: rabbitRun-96a54993 8s infinite linear;
9339
9380
  }
9340
- @keyframes rabbitRun-6f80f8d3 {
9381
+ @keyframes rabbitRun-96a54993 {
9341
9382
  0% {
9342
9383
  transform: translate3d(0, 0, 0);
9343
9384
  }
@@ -9357,7 +9398,7 @@ to {
9357
9398
  transform: translate3d(0, 0, 0);
9358
9399
  }
9359
9400
  }
9360
- @keyframes rabbitAnimation-6f80f8d3 {
9401
+ @keyframes rabbitAnimation-96a54993 {
9361
9402
  0%,
9362
9403
  100% {
9363
9404
  opacity: 1;
@@ -9366,7 +9407,7 @@ to {
9366
9407
  opacity: 0;
9367
9408
  }
9368
9409
  }
9369
- @keyframes rabbitAnimation2-6f80f8d3 {
9410
+ @keyframes rabbitAnimation2-96a54993 {
9370
9411
  0%,
9371
9412
  100% {
9372
9413
  opacity: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"send-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/send-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAM1E,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,0BAA0B;IAC1B,MAAM,EAAE,UAAU,CAAA;IAClB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,CACE;IACE,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,qDAAqD;IACrD,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAA;CAChD,CACJ,CAAA;AAKH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAU,4BAG/B;IACD,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;CACjB,KAAG,OAAO,CACT,aAAa,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,QAAQ,CAAA;CAC3B,CAAC,CAoDH,CAAA"}
1
+ {"version":3,"file":"send-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/send-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAKnE,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAQ1E,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,0BAA0B;IAC1B,MAAM,EAAE,UAAU,CAAA;IAClB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,CACE;IACE,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,qDAAqD;IACrD,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAA;CAChD,CACJ,CAAA;AAKH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAU,4BAG/B;IACD,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;CACjB,KAAG,OAAO,CACT,aAAa,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,QAAQ,CAAA;CAC3B,CAAC,CAoDH,CAAA"}
@@ -3,7 +3,10 @@ import { normalizeHeaders } from "../../../../libs/normalize-headers.js";
3
3
  import { getCookieHeaderKeys } from "./get-cookie-header-keys.js";
4
4
  import { decodeBuffer } from "./decode-buffer.js";
5
5
  import { httpStatusCodes } from "@scalar/helpers/http/http-status-codes";
6
+ import cookie from "cookie";
7
+ import { parseSetCookie } from "set-cookie-parser";
6
8
  //#region src/v2/blocks/operation-block/helpers/send-request.ts
9
+ var CUSTOM_COOKIE_HEADER = "x-scalar-set-cookie";
7
10
  /** HTTP status codes that should not include a response body */
8
11
  var NO_BODY_STATUS_CODES = [
9
12
  204,
@@ -69,6 +72,24 @@ var sendRequest = async ({ isUsingProxy, request }) => {
69
72
  }
70
73
  };
71
74
  /**
75
+ * Extracts and serializes custom cookies from the response using the custom cookie header.
76
+ *
77
+ * This function parses the custom cookie header (if present), serializes each cookie using the
78
+ * 'cookie' library, and then deletes the custom cookie header from the response.
79
+ * Returns an array of serialized cookie strings, or null if no cookies were found.
80
+ *
81
+ * The @ts-expect-error is present due to a type mismatch between the 'cookie' parsing and serialization libraries.
82
+ */
83
+ var getCustomCookie = (response) => {
84
+ const result = parseSetCookie(response.headers.get(CUSTOM_COOKIE_HEADER) ?? "").map((c) => cookie.serialize(c.name, c.value, {
85
+ ...c,
86
+ sameSite: c.sameSite,
87
+ encode: (str) => str
88
+ }));
89
+ if (result.length) return result;
90
+ return null;
91
+ };
92
+ /**
72
93
  * Build a streaming response for server-sent events.
73
94
  * Streaming responses use a reader instead of buffering the entire body.
74
95
  */
@@ -78,7 +99,7 @@ var buildStreamingResponse = ({ response, request, timestamp, duration, response
78
99
  statusText,
79
100
  headers: response.headers
80
101
  });
81
- const cookieHeaderKeys = getCookieHeaderKeys(normalizedResponse.headers);
102
+ const cookieHeaderKeys = getCustomCookie(normalizedResponse) ?? getCookieHeaderKeys(normalizedResponse.headers);
82
103
  return [null, {
83
104
  timestamp,
84
105
  request,
@@ -110,7 +131,7 @@ var buildStandardResponse = async ({ response, request, timestamp, duration, res
110
131
  statusText,
111
132
  headers: response.headers
112
133
  });
113
- const cookieHeaderKeys = getCookieHeaderKeys(normalizedResponse.headers);
134
+ const cookieHeaderKeys = getCustomCookie(normalizedResponse) ?? getCookieHeaderKeys(normalizedResponse.headers);
114
135
  return [null, {
115
136
  timestamp,
116
137
  request,
@@ -1 +1 @@
1
- {"version":3,"file":"send-request.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/send-request.ts"],"sourcesContent":["import type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { httpStatusCodes } from '@scalar/helpers/http/http-status-codes'\n\nimport { ERRORS, type ErrorResponse, normalizeError } from '@/libs/errors'\nimport { normalizeHeaders } from '@/libs/normalize-headers'\n\nimport { decodeBuffer } from './decode-buffer'\nimport { getCookieHeaderKeys } from './get-cookie-header-keys'\n\n/** A single set of populated values for a sent request */\nexport type ResponseInstance = Omit<Response, 'headers'> & {\n /** Store headers as an object to match what we had with axios */\n headers: Record<string, string>\n /** Keys of headers which set cookies */\n cookieHeaderKeys: string[]\n /** Time in ms the request took */\n duration: number\n /** The response status */\n status: number\n /** The response status text */\n statusText: string\n /** The response method */\n method: HttpMethod\n /** The request path */\n path: string\n} & (\n | {\n /** The response data */\n data: string | Blob\n /** The response size in bytes */\n size: number\n }\n | {\n /** A stream reader for a streamable response body */\n reader: ReadableStreamDefaultReader<Uint8Array>\n }\n )\n\n/** HTTP status codes that should not include a response body */\nconst NO_BODY_STATUS_CODES = [204, 205, 304]\n\n/**\n * Execute the built fetch request and return a structured response.\n *\n * This function handles the complete request lifecycle including plugin hooks,\n * response processing, streaming detection, and error handling. It supports both\n * standard responses and server-sent event streams.\n *\n * @param request - The request built by the buildRequest helper\n * @param operation - The OpenAPI operation being executed\n * @param plugins - Array of client plugins to execute hooks\n * @param isUsingProxy - Whether the request is being proxied for header handling\n * @returns A tuple with either an error or the response data\n */\nexport const sendRequest = async ({\n isUsingProxy,\n request,\n}: {\n isUsingProxy: boolean\n request: Request\n}): Promise<\n ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n }>\n> => {\n try {\n // Execute the request and measure duration\n const startTime = performance.now()\n const response = await fetch(request.clone())\n const endTime = performance.now()\n const timestamp = Date.now()\n const duration = endTime - startTime\n\n // Extract response metadata early for reuse\n const contentType = response.headers.get('content-type')\n const responseHeaders = normalizeHeaders(response.headers, isUsingProxy)\n const responseUrl = new URL(response.url)\n const fullPath = responseUrl.pathname + responseUrl.search\n const statusText = response.statusText || httpStatusCodes[response.status]?.name || ''\n const method = request.method as HttpMethod\n const shouldSkipBody = NO_BODY_STATUS_CODES.includes(response.status)\n\n /**\n * Handle server-sent event streams separately.\n * These responses need a reader instead of buffered data.\n * We check this early to avoid unnecessary body reading.\n */\n if (contentType?.startsWith('text/event-stream') && response.body) {\n return buildStreamingResponse({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n })\n }\n\n return buildStandardResponse({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n contentType,\n shouldSkipBody,\n })\n } catch (error) {\n return [normalizeError(error, ERRORS.REQUEST_FAILED), null]\n }\n}\n\n/**\n * Build a streaming response for server-sent events.\n * Streaming responses use a reader instead of buffering the entire body.\n */\nconst buildStreamingResponse = ({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n}: {\n response: Response\n request: Request\n timestamp: number\n duration: number\n responseHeaders: Record<string, string>\n statusText: string\n method: HttpMethod\n fullPath: string\n}): ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n}> => {\n const normalizedResponse = new Response(null, {\n status: response.status,\n statusText,\n headers: response.headers,\n })\n\n const cookieHeaderKeys = getCookieHeaderKeys(normalizedResponse.headers)\n\n return [\n null,\n {\n timestamp,\n request: request,\n response: {\n ...normalizedResponse,\n headers: responseHeaders,\n cookieHeaderKeys,\n reader: response.body!.getReader(),\n duration,\n method,\n path: fullPath,\n },\n originalResponse: normalizedResponse.clone(),\n },\n ]\n}\n\n/**\n * Build a standard response with buffered body data.\n * This handles all non-streaming responses including JSON, text, and binary data.\n */\nconst buildStandardResponse = async ({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n contentType,\n shouldSkipBody,\n}: {\n response: Response\n request: Request\n timestamp: number\n duration: number\n responseHeaders: Record<string, string>\n statusText: string\n method: HttpMethod\n fullPath: string\n contentType: string | null\n shouldSkipBody: boolean\n}): Promise<\n ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n }>\n> => {\n /**\n * Clone the response to preserve the original for body reading.\n * Read the body once and reuse the buffer for both decoding and creating a new Response.\n */\n const clonedResponse = response.clone()\n const arrayBuffer = await clonedResponse.arrayBuffer()\n const responseType = contentType ?? 'text/plain;charset=UTF-8'\n const responseData = decodeBuffer(arrayBuffer, responseType)\n\n /**\n * Create a new Response using the arrayBuffer we already read.\n * ArrayBuffers can be reused to create new Response objects without additional memory.\n */\n const normalizedResponse = new Response(shouldSkipBody ? null : arrayBuffer, {\n status: response.status,\n statusText,\n headers: response.headers,\n })\n\n const cookieHeaderKeys = getCookieHeaderKeys(normalizedResponse.headers)\n\n return [\n null,\n {\n timestamp,\n request: request,\n response: {\n ...normalizedResponse,\n headers: responseHeaders,\n cookieHeaderKeys,\n data: responseData,\n size: arrayBuffer.byteLength,\n duration,\n method,\n status: response.status,\n path: fullPath,\n },\n originalResponse: response.clone(),\n },\n ]\n}\n"],"mappings":";;;;;;;AAuCA,IAAM,uBAAuB;CAAC;CAAK;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EACnC,UACA,SACA,WACA,UACA,iBACA,YACA,QACA,UACA,aACA,qBAmBG;CAMH,MAAM,cAAc,MADG,SAAS,OAAO,CACE,aAAa;CAEtD,MAAM,eAAe,aAAa,aADb,eAAe,2BACwB;;;;;CAM5D,MAAM,qBAAqB,IAAI,SAAS,iBAAiB,OAAO,aAAa;EAC3E,QAAQ,SAAS;EACjB;EACA,SAAS,SAAS;EACnB,CAAC;CAEF,MAAM,mBAAmB,oBAAoB,mBAAmB,QAAQ;AAExE,QAAO,CACL,MACA;EACE;EACS;EACT,UAAU;GACR,GAAG;GACH,SAAS;GACT;GACA,MAAM;GACN,MAAM,YAAY;GAClB;GACA;GACA,QAAQ,SAAS;GACjB,MAAM;GACP;EACD,kBAAkB,SAAS,OAAO;EACnC,CACF"}
1
+ {"version":3,"file":"send-request.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/send-request.ts"],"sourcesContent":["import type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { httpStatusCodes } from '@scalar/helpers/http/http-status-codes'\nimport cookie from 'cookie'\nimport { parseSetCookie } from 'set-cookie-parser'\n\nimport { ERRORS, type ErrorResponse, normalizeError } from '@/libs/errors'\nimport { normalizeHeaders } from '@/libs/normalize-headers'\nimport { getCookieHeaderKeys } from '@/v2/blocks/operation-block/helpers/get-cookie-header-keys'\n\nimport { decodeBuffer } from './decode-buffer'\n\nconst CUSTOM_COOKIE_HEADER = 'x-scalar-set-cookie'\n\n/** A single set of populated values for a sent request */\nexport type ResponseInstance = Omit<Response, 'headers'> & {\n /** Store headers as an object to match what we had with axios */\n headers: Record<string, string>\n /** Keys of headers which set cookies */\n cookieHeaderKeys: string[]\n /** Time in ms the request took */\n duration: number\n /** The response status */\n status: number\n /** The response status text */\n statusText: string\n /** The response method */\n method: HttpMethod\n /** The request path */\n path: string\n} & (\n | {\n /** The response data */\n data: string | Blob\n /** The response size in bytes */\n size: number\n }\n | {\n /** A stream reader for a streamable response body */\n reader: ReadableStreamDefaultReader<Uint8Array>\n }\n )\n\n/** HTTP status codes that should not include a response body */\nconst NO_BODY_STATUS_CODES = [204, 205, 304]\n\n/**\n * Execute the built fetch request and return a structured response.\n *\n * This function handles the complete request lifecycle including plugin hooks,\n * response processing, streaming detection, and error handling. It supports both\n * standard responses and server-sent event streams.\n *\n * @param request - The request built by the buildRequest helper\n * @param operation - The OpenAPI operation being executed\n * @param plugins - Array of client plugins to execute hooks\n * @param isUsingProxy - Whether the request is being proxied for header handling\n * @returns A tuple with either an error or the response data\n */\nexport const sendRequest = async ({\n isUsingProxy,\n request,\n}: {\n isUsingProxy: boolean\n request: Request\n}): Promise<\n ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n }>\n> => {\n try {\n // Execute the request and measure duration\n const startTime = performance.now()\n const response = await fetch(request.clone())\n const endTime = performance.now()\n const timestamp = Date.now()\n const duration = endTime - startTime\n\n // Extract response metadata early for reuse\n const contentType = response.headers.get('content-type')\n const responseHeaders = normalizeHeaders(response.headers, isUsingProxy)\n const responseUrl = new URL(response.url)\n const fullPath = responseUrl.pathname + responseUrl.search\n const statusText = response.statusText || httpStatusCodes[response.status]?.name || ''\n const method = request.method as HttpMethod\n const shouldSkipBody = NO_BODY_STATUS_CODES.includes(response.status)\n\n /**\n * Handle server-sent event streams separately.\n * These responses need a reader instead of buffered data.\n * We check this early to avoid unnecessary body reading.\n */\n if (contentType?.startsWith('text/event-stream') && response.body) {\n return buildStreamingResponse({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n })\n }\n\n return buildStandardResponse({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n contentType,\n shouldSkipBody,\n })\n } catch (error) {\n return [normalizeError(error, ERRORS.REQUEST_FAILED), null]\n }\n}\n\n/**\n * Extracts and serializes custom cookies from the response using the custom cookie header.\n *\n * This function parses the custom cookie header (if present), serializes each cookie using the\n * 'cookie' library, and then deletes the custom cookie header from the response.\n * Returns an array of serialized cookie strings, or null if no cookies were found.\n *\n * The @ts-expect-error is present due to a type mismatch between the 'cookie' parsing and serialization libraries.\n */\nconst getCustomCookie = (response: Response): string[] | null => {\n const result = parseSetCookie(response.headers.get(CUSTOM_COOKIE_HEADER) ?? '').map((c) =>\n cookie.serialize(c.name, c.value, {\n ...c,\n sameSite: c.sameSite as boolean | 'lax' | 'strict' | 'none' | undefined,\n encode: (str: string) => str,\n }),\n )\n\n if (result.length) {\n return result\n }\n\n return null\n}\n\n/**\n * Build a streaming response for server-sent events.\n * Streaming responses use a reader instead of buffering the entire body.\n */\nconst buildStreamingResponse = ({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n}: {\n response: Response\n request: Request\n timestamp: number\n duration: number\n responseHeaders: Record<string, string>\n statusText: string\n method: HttpMethod\n fullPath: string\n}): ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n}> => {\n const normalizedResponse = new Response(null, {\n status: response.status,\n statusText,\n headers: response.headers,\n })\n\n const customCookie = getCustomCookie(normalizedResponse)\n const cookieHeaderKeys = customCookie ?? getCookieHeaderKeys(normalizedResponse.headers)\n\n return [\n null,\n {\n timestamp,\n request: request,\n response: {\n ...normalizedResponse,\n headers: responseHeaders,\n cookieHeaderKeys,\n reader: response.body!.getReader(),\n duration,\n method,\n path: fullPath,\n },\n originalResponse: normalizedResponse.clone(),\n },\n ]\n}\n\n/**\n * Build a standard response with buffered body data.\n * This handles all non-streaming responses including JSON, text, and binary data.\n */\nconst buildStandardResponse = async ({\n response,\n request,\n timestamp,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n contentType,\n shouldSkipBody,\n}: {\n response: Response\n request: Request\n timestamp: number\n duration: number\n responseHeaders: Record<string, string>\n statusText: string\n method: HttpMethod\n fullPath: string\n contentType: string | null\n shouldSkipBody: boolean\n}): Promise<\n ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n }>\n> => {\n /**\n * Clone the response to preserve the original for body reading.\n * Read the body once and reuse the buffer for both decoding and creating a new Response.\n */\n const clonedResponse = response.clone()\n const arrayBuffer = await clonedResponse.arrayBuffer()\n const responseType = contentType ?? 'text/plain;charset=UTF-8'\n const responseData = decodeBuffer(arrayBuffer, responseType)\n\n /**\n * Create a new Response using the arrayBuffer we already read.\n * ArrayBuffers can be reused to create new Response objects without additional memory.\n */\n const normalizedResponse = new Response(shouldSkipBody ? null : arrayBuffer, {\n status: response.status,\n statusText,\n headers: response.headers,\n })\n\n const customCookie = getCustomCookie(normalizedResponse)\n const cookieHeaderKeys = customCookie ?? getCookieHeaderKeys(normalizedResponse.headers)\n\n return [\n null,\n {\n timestamp,\n request: request,\n response: {\n ...normalizedResponse,\n headers: responseHeaders,\n cookieHeaderKeys,\n data: responseData,\n size: arrayBuffer.byteLength,\n duration,\n method,\n status: response.status,\n path: fullPath,\n },\n originalResponse: response.clone(),\n },\n ]\n}\n"],"mappings":";;;;;;;;AAWA,IAAM,uBAAuB;;AAgC7B,IAAM,uBAAuB;CAAC;CAAK;CAAK;CAAI;;;;;;;;;;;;;;AAe5C,IAAa,cAAc,OAAO,EAChC,cACA,cAWG;AACH,KAAI;EAEF,MAAM,YAAY,YAAY,KAAK;EACnC,MAAM,WAAW,MAAM,MAAM,QAAQ,OAAO,CAAC;EAC7C,MAAM,UAAU,YAAY,KAAK;EACjC,MAAM,YAAY,KAAK,KAAK;EAC5B,MAAM,WAAW,UAAU;EAG3B,MAAM,cAAc,SAAS,QAAQ,IAAI,eAAe;EACxD,MAAM,kBAAkB,iBAAiB,SAAS,SAAS,aAAa;EACxE,MAAM,cAAc,IAAI,IAAI,SAAS,IAAI;EACzC,MAAM,WAAW,YAAY,WAAW,YAAY;EACpD,MAAM,aAAa,SAAS,cAAc,gBAAgB,SAAS,SAAS,QAAQ;EACpF,MAAM,SAAS,QAAQ;EACvB,MAAM,iBAAiB,qBAAqB,SAAS,SAAS,OAAO;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AGF,MAAM,mBADe,gBAAgB,mBAAmB,IACf,oBAAoB,mBAAmB,QAAQ;AAExF,QAAO,CACL,MACA;EACE;EACS;EACT,UAAU;GACR,GAAG;GACH,SAAS;GACT;GACA,MAAM;GACN,MAAM,YAAY;GAClB;GACA;GACA,QAAQ,SAAS;GACjB,MAAM;GACP;EACD,kBAAkB,SAAS,OAAO;EACnC,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseCookies.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"names":[],"mappings":"AA4CA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC3C,CAAC;AA+GF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ResponseCookies.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"names":[],"mappings":"AA2DA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC3C,CAAC;AA+KF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseCookies.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport DataTable from '@/components/DataTable/DataTable.vue'\nimport DataTableRow from '@/components/DataTable/DataTableRow.vue'\nimport DataTableText from '@/components/DataTable/DataTableText.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\ndefineProps<{\n cookies: { name: string; value: string }[]\n}>()\n</script>\n<template>\n <CollapsibleSection\n :defaultOpen=\"false\"\n :itemCount=\"cookies.length\">\n <template #title>Cookies</template>\n <template v-if=\"true\">\n <DataTable\n v-if=\"cookies.length\"\n class=\"flex-1\"\n :columns=\"['', '']\">\n <DataTableRow\n v-for=\"item in cookies\"\n :key=\"item.name\">\n <DataTableText :text=\"item.name\" />\n <DataTableText :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n No cookies\n </div>\n </template>\n </CollapsibleSection>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ResponseCookies.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { DataTableHeader } from '@/components/DataTable'\nimport DataTable from '@/components/DataTable/DataTable.vue'\nimport DataTableRow from '@/components/DataTable/DataTableRow.vue'\nimport DataTableText from '@/components/DataTable/DataTableText.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\ndefineProps<{\n cookies: { name: string; value: string }[]\n}>()\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"cookies.length\">\n <template #title>Cookies</template>\n <div\n v-if=\"cookies.length\"\n class=\"max-h-[calc(100%-32px)] overflow-y-auto\">\n <DataTable\n :columns=\"['minmax(auto, min-content)', 'minmax(50%, 1fr)']\"\n scroll>\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>Cookie Name</DataTableHeader>\n <DataTableHeader>Cookie Value</DataTableHeader>\n </DataTableRow>\n <DataTableRow\n v-for=\"(item, index) in cookies\"\n :key=\"item.name\"\n class=\"group/row text-c-1\">\n <DataTableText\n class=\"bg-b-1 sticky left-0 z-1 max-w-full\"\n :class=\"{ 'border-t-0': index === 0 }\"\n :text=\"item.name\" />\n <DataTableText\n class=\"z-0\"\n :class=\"{ 'border-t-0': index === 0 }\"\n :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n </div>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n No cookies\n </div>\n </CollapsibleSection>\n</template>\n"],"mappings":""}
@@ -1,10 +1,15 @@
1
1
  import DataTable_default from "../../../../components/DataTable/DataTable.vue.js";
2
+ import DataTableHeader_default from "../../../../components/DataTable/DataTableHeader.vue.js";
2
3
  import DataTableRow_default from "../../../../components/DataTable/DataTableRow.vue.js";
3
4
  import DataTableText_default from "../../../../components/DataTable/DataTableText.vue.js";
4
5
  import CollapsibleSection_default from "../../../components/layout/CollapsibleSection.vue.js";
5
- import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, openBlock, renderList, unref, withCtx } from "vue";
6
+ import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, unref, withCtx } from "vue";
6
7
  //#region src/v2/blocks/response-block/components/ResponseCookies.vue?vue&type=script&setup=true&lang.ts
7
8
  var _hoisted_1 = {
9
+ key: 0,
10
+ class: "max-h-[calc(100%-32px)] overflow-y-auto"
11
+ };
12
+ var _hoisted_2 = {
8
13
  key: 1,
9
14
  class: "text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm"
10
15
  };
@@ -14,23 +19,41 @@ var ResponseCookies_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
14
19
  setup(__props) {
15
20
  return (_ctx, _cache) => {
16
21
  return openBlock(), createBlock(unref(CollapsibleSection_default), {
22
+ class: "overflow-auto",
17
23
  defaultOpen: false,
18
24
  itemCount: __props.cookies.length
19
25
  }, {
20
26
  title: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Cookies", -1)])]),
21
- default: withCtx(() => [(openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.cookies.length ? (openBlock(), createBlock(DataTable_default, {
22
- key: 0,
23
- class: "flex-1",
24
- columns: ["", ""]
27
+ default: withCtx(() => [__props.cookies.length ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(DataTable_default, {
28
+ columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
29
+ scroll: ""
25
30
  }, {
26
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.cookies, (item) => {
27
- return openBlock(), createBlock(DataTableRow_default, { key: item.name }, {
28
- default: withCtx(() => [createVNode(DataTableText_default, { text: item.name }, null, 8, ["text"]), createVNode(DataTableText_default, { text: item.value }, null, 8, ["text"])]),
31
+ default: withCtx(() => [createVNode(DataTableRow_default, { class: "sr-only !block" }, {
32
+ default: withCtx(() => [createVNode(unref(DataTableHeader_default), null, {
33
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Cookie Name", -1)])]),
34
+ _: 1
35
+ }), createVNode(unref(DataTableHeader_default), null, {
36
+ default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode("Cookie Value", -1)])]),
37
+ _: 1
38
+ })]),
39
+ _: 1
40
+ }), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.cookies, (item, index) => {
41
+ return openBlock(), createBlock(DataTableRow_default, {
42
+ key: item.name,
43
+ class: "group/row text-c-1"
44
+ }, {
45
+ default: withCtx(() => [createVNode(DataTableText_default, {
46
+ class: normalizeClass(["bg-b-1 sticky left-0 z-1 max-w-full", { "border-t-0": index === 0 }]),
47
+ text: item.name
48
+ }, null, 8, ["class", "text"]), createVNode(DataTableText_default, {
49
+ class: normalizeClass(["z-0", { "border-t-0": index === 0 }]),
50
+ text: item.value
51
+ }, null, 8, ["class", "text"])]),
29
52
  _: 2
30
53
  }, 1024);
31
54
  }), 128))]),
32
55
  _: 1
33
- })) : (openBlock(), createElementBlock("div", _hoisted_1, " No cookies "))], 64))]),
56
+ })])) : (openBlock(), createElementBlock("div", _hoisted_2, " No cookies "))]),
34
57
  _: 1
35
58
  }, 8, ["itemCount"]);
36
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseCookies.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport DataTable from '@/components/DataTable/DataTable.vue'\nimport DataTableRow from '@/components/DataTable/DataTableRow.vue'\nimport DataTableText from '@/components/DataTable/DataTableText.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\ndefineProps<{\n cookies: { name: string; value: string }[]\n}>()\n</script>\n<template>\n <CollapsibleSection\n :defaultOpen=\"false\"\n :itemCount=\"cookies.length\">\n <template #title>Cookies</template>\n <template v-if=\"true\">\n <DataTable\n v-if=\"cookies.length\"\n class=\"flex-1\"\n :columns=\"['', '']\">\n <DataTableRow\n v-for=\"item in cookies\"\n :key=\"item.name\">\n <DataTableText :text=\"item.name\" />\n <DataTableText :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n No cookies\n </div>\n </template>\n </CollapsibleSection>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;uBAWE,YAuBqB,MAAA,2BAAA,EAAA;IAtBlB,aAAa;IACb,WAAW,QAAA,QAAQ;;IACT,OAAK,cAAQ,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAP,WAAO,GAAA,CAAA,EAAA,CAAA;2BAmBb,EAAA,WAAA,EAlBX,mBAkBW,UAAA,EAAA,KAAA,GAAA,EAAA,CAhBD,QAAA,QAAQ,UAAA,WAAA,EADhB,YAUY,mBAAA;;KARV,OAAM;KACL,SAAS,CAAA,IAAA,GAAQ;;4BAEO,EAAA,UAAA,KAAA,EADzB,mBAKe,UAAA,MAAA,WAJE,QAAA,UAAR,SAAI;0BADb,YAKe,sBAAA,EAHZ,KAAK,KAAK,MAAA,EAAA;8BACwB,CAAnC,YAAmC,uBAAA,EAAnB,MAAM,KAAK,MAAA,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA,EAC3B,YAAoC,uBAAA,EAApB,MAAM,KAAK,OAAA,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA,CAAA,CAAA;;;;;wBAI/B,mBAIM,OAJN,YAE8F,eAE9F,EAAA,EAAA,GAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"ResponseCookies.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { DataTableHeader } from '@/components/DataTable'\nimport DataTable from '@/components/DataTable/DataTable.vue'\nimport DataTableRow from '@/components/DataTable/DataTableRow.vue'\nimport DataTableText from '@/components/DataTable/DataTableText.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\ndefineProps<{\n cookies: { name: string; value: string }[]\n}>()\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"cookies.length\">\n <template #title>Cookies</template>\n <div\n v-if=\"cookies.length\"\n class=\"max-h-[calc(100%-32px)] overflow-y-auto\">\n <DataTable\n :columns=\"['minmax(auto, min-content)', 'minmax(50%, 1fr)']\"\n scroll>\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>Cookie Name</DataTableHeader>\n <DataTableHeader>Cookie Value</DataTableHeader>\n </DataTableRow>\n <DataTableRow\n v-for=\"(item, index) in cookies\"\n :key=\"item.name\"\n class=\"group/row text-c-1\">\n <DataTableText\n class=\"bg-b-1 sticky left-0 z-1 max-w-full\"\n :class=\"{ 'border-t-0': index === 0 }\"\n :text=\"item.name\" />\n <DataTableText\n class=\"z-0\"\n :class=\"{ 'border-t-0': index === 0 }\"\n :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n </div>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n No cookies\n </div>\n </CollapsibleSection>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;uBAYE,YAoCqB,MAAA,2BAAA,EAAA;I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AAiB,EAClB,MAAM,gCAAgC,CAAA;AAKvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAWhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGzE;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AACD,QAAA,MAAM,YAAY;;;;;;eAmB6B,MAAM;;;;;eAAN,MAAM;;kFAmvBjD,CAAC"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AAgmBA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAKrF,OAAO,KAAK,EAEV,UAAU,EACV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAKvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAYhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGzE;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AACD,QAAA,MAAM,YAAY;;;;;;eAmB6B,MAAM;;;;;eAAN,MAAM;;kFAmwBjD,CAAC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
2
2
  import AddressBar_vue_vue_type_script_setup_true_lang_default from "./AddressBar.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue
5
- var AddressBar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e06ea441"]]);
5
+ var AddressBar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-0ec7147f"]]);
6
6
  //#endregion
7
7
  export { AddressBar_default as default };
8
8