@scalar/api-reference 1.25.10 → 1.25.12

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 (105) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/browser/standalone.js +17048 -16623
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
  5. package/dist/components/ApiClientModal.vue.js +37 -32
  6. package/dist/components/Content/Authentication/Authentication.stories.d.ts.map +1 -1
  7. package/dist/components/Content/Operation/Operation.vue.js +2 -2
  8. package/dist/components/Content/Operation/Operation.vue2.js +14 -14
  9. package/dist/components/Content/Operation/OperationAccordion.vue.js +1 -1
  10. package/dist/components/Content/Operation/OperationAccordion.vue2.js +24 -24
  11. package/dist/components/Content/Operation/ParameterHeaders.vue.d.ts +21 -0
  12. package/dist/components/Content/Operation/ParameterHeaders.vue.d.ts.map +1 -0
  13. package/dist/components/Content/Operation/ParameterHeaders.vue.js +7 -0
  14. package/dist/components/Content/Operation/ParameterHeaders.vue2.js +62 -0
  15. package/dist/components/Content/Operation/ParameterItem.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Operation/ParameterItem.vue.js +2 -2
  17. package/dist/components/Content/Operation/ParameterItem.vue2.js +34 -30
  18. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  20. package/dist/components/Content/Tag/Endpoints.vue2.js +10 -8
  21. package/dist/components/Content/Tag/Tag.vue.js +3 -3
  22. package/dist/components/Content/Tag/Tag.vue2.js +1 -1
  23. package/dist/components/api-client-bus.d.ts +3 -3
  24. package/dist/components/api-client-bus.d.ts.map +1 -1
  25. package/dist/{components/Content/Operation/PathResponses/ExampleResponse.vue.d.ts → embeds/ExampleResponses/ExampleResponses.vue.d.ts} +4 -9
  26. package/dist/embeds/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -0
  27. package/dist/embeds/ExampleResponses/index.d.ts +2 -0
  28. package/dist/embeds/ExampleResponses/index.d.ts.map +1 -0
  29. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +8 -1
  30. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
  31. package/dist/embeds/index.d.ts +1 -0
  32. package/dist/embeds/index.d.ts.map +1 -1
  33. package/dist/features/BaseUrl/ServerForm.vue.d.ts.map +1 -1
  34. package/dist/features/BaseUrl/ServerForm.vue.js +2 -2
  35. package/dist/features/BaseUrl/ServerForm.vue2.js +5 -5
  36. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  37. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  38. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +122 -139
  39. package/dist/{components/Content/Operation/PathResponses/Headers.vue.d.ts → features/ExampleResponses/ExampleResponse.vue.d.ts} +4 -4
  40. package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +1 -0
  41. package/dist/features/ExampleResponses/ExampleResponse.vue.js +7 -0
  42. package/dist/features/ExampleResponses/ExampleResponse.vue2.js +37 -0
  43. package/dist/{components/Content/Operation/PathResponses/PathResponses.vue.d.ts → features/ExampleResponses/ExampleResponses.vue.d.ts} +1 -1
  44. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -0
  45. package/dist/features/ExampleResponses/ExampleResponses.vue.js +7 -0
  46. package/dist/{components/Content/Operation/PathResponses/PathResponses.vue2.js → features/ExampleResponses/ExampleResponses.vue2.js} +18 -18
  47. package/dist/features/ExampleResponses/index.d.ts +2 -0
  48. package/dist/features/ExampleResponses/index.d.ts.map +1 -0
  49. package/dist/helpers/createRequest.d.ts +6 -0
  50. package/dist/helpers/createRequest.d.ts.map +1 -0
  51. package/dist/helpers/createRequest.js +16 -0
  52. package/dist/helpers/getExampleCode.d.ts +9 -0
  53. package/dist/helpers/getExampleCode.d.ts.map +1 -0
  54. package/dist/helpers/getExampleCode.js +30 -0
  55. package/dist/helpers/index.d.ts +2 -0
  56. package/dist/helpers/index.d.ts.map +1 -1
  57. package/dist/helpers/mergeAllObjects.d.ts +3 -0
  58. package/dist/helpers/mergeAllObjects.d.ts.map +1 -1
  59. package/dist/hooks/useReactiveSpec.d.ts +7 -1
  60. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  61. package/dist/hooks/useResponses.d.ts +4 -0
  62. package/dist/hooks/useResponses.d.ts.map +1 -1
  63. package/dist/hooks/useResponses.js +11 -10
  64. package/dist/index.js +72 -68
  65. package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
  66. package/dist/legacy/components/SecurityScheme.vue.js +1 -1
  67. package/dist/legacy/components/SecurityScheme.vue2.js +158 -129
  68. package/dist/legacy/fixtures/httpRequestMethods.d.ts +1 -1
  69. package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +1 -1
  70. package/dist/legacy/helpers/index.d.ts +1 -0
  71. package/dist/legacy/helpers/index.d.ts.map +1 -1
  72. package/dist/legacy/helpers/normalizeHeaderName.d.ts +5 -0
  73. package/dist/legacy/helpers/normalizeHeaderName.d.ts.map +1 -0
  74. package/dist/legacy/helpers/normalizeHeaderName.js +6 -0
  75. package/dist/legacy/helpers/normalizeHeaders.d.ts.map +1 -1
  76. package/dist/legacy/helpers/normalizeHeaders.js +15 -17
  77. package/dist/legacy/helpers/normalizeRequestMethod.d.ts +1 -1
  78. package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -1
  79. package/dist/legacy/helpers/normalizeRequestMethod.js +1 -1
  80. package/dist/legacy/stores/useOpenApiStore.d.ts +7 -1
  81. package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -1
  82. package/dist/style.css +1 -1
  83. package/dist/types.d.ts +0 -8
  84. package/dist/types.d.ts.map +1 -1
  85. package/package.json +14 -14
  86. package/dist/components/Content/Operation/PathResponses/ExampleResponse.vue.d.ts.map +0 -1
  87. package/dist/components/Content/Operation/PathResponses/ExampleResponse.vue.js +0 -7
  88. package/dist/components/Content/Operation/PathResponses/ExampleResponse.vue2.js +0 -101
  89. package/dist/components/Content/Operation/PathResponses/Headers.vue.d.ts.map +0 -1
  90. package/dist/components/Content/Operation/PathResponses/PathResponses.vue.d.ts.map +0 -1
  91. package/dist/components/Content/Operation/PathResponses/PathResponses.vue.js +0 -7
  92. package/dist/components/Content/Operation/PathResponses/index.d.ts +0 -2
  93. package/dist/components/Content/Operation/PathResponses/index.d.ts.map +0 -1
  94. package/dist/components/SimpleTable/SimpleCell.vue.d.ts +0 -50
  95. package/dist/components/SimpleTable/SimpleCell.vue.d.ts.map +0 -1
  96. package/dist/components/SimpleTable/SimpleHeader.vue.d.ts +0 -12
  97. package/dist/components/SimpleTable/SimpleHeader.vue.d.ts.map +0 -1
  98. package/dist/components/SimpleTable/SimpleRow.vue.d.ts +0 -12
  99. package/dist/components/SimpleTable/SimpleRow.vue.d.ts.map +0 -1
  100. package/dist/components/SimpleTable/SimpleTable.stories.d.ts +0 -7
  101. package/dist/components/SimpleTable/SimpleTable.stories.d.ts.map +0 -1
  102. package/dist/components/SimpleTable/SimpleTable.vue.d.ts +0 -12
  103. package/dist/components/SimpleTable/SimpleTable.vue.d.ts.map +0 -1
  104. package/dist/components/SimpleTable/index.d.ts +0 -5
  105. package/dist/components/SimpleTable/index.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"api-client-bus.d.ts","sourceRoot":"","sources":["../../src/components/api-client-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAElD,KAAK,eAAe,GAAG,iBAAiB,CAAC;IACvC,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,CAAC,CAAA;AAIF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,gEAA+B,CAAA;AACxD,eAAO,MAAM,aAAa;;;;OAAyC,CAAA"}
1
+ {"version":3,"file":"api-client-bus.d.ts","sourceRoot":"","sources":["../../src/components/api-client-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAElD,KAAK,eAAe,GAAG,iBAAiB,CAAC;IACvC,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,CAAC,CAAA;AAIF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,gEAA+B,CAAA;AACxD,eAAO,MAAM,aAAa;;;;OAAyC,CAAA"}
@@ -1,13 +1,8 @@
1
+ import type { TransformedOperation } from '@scalar/types/legacy';
1
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
- response: undefined | {
3
- example?: any;
4
- schema?: any;
5
- };
3
+ operation?: TransformedOperation;
6
4
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
- response: undefined | {
8
- example?: any;
9
- schema?: any;
10
- };
5
+ operation?: TransformedOperation;
11
6
  }>>>, {}, {}>;
12
7
  export default _default;
13
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -19,4 +14,4 @@ type __VLS_TypePropsToOption<T> = {
19
14
  required: true;
20
15
  };
21
16
  };
22
- //# sourceMappingURL=ExampleResponse.vue.d.ts.map
17
+ //# sourceMappingURL=ExampleResponses.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/ExampleResponses/ExampleResponses.vue"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;;gBAOlD,oBAAoB;;gBAApB,oBAAoB;;AAwDlC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as ExampleResponses } from './ExampleResponses.vue';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/embeds/ExampleResponses/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,3 +1,4 @@
1
+ import type { OpenAPI } from '@scalar/openapi-types';
1
2
  import type { OpenApiDocumentConfiguration } from './types';
2
3
  declare const dereferenced: import("vue").Ref<{
3
4
  [x: `x-${string}`]: any;
@@ -285,8 +286,11 @@ declare const parsedSpec: {
285
286
  example?: any;
286
287
  examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
287
288
  content?: import("@scalar/types/legacy").RequestBodyMimeTypes;
289
+ headers?: {
290
+ [key: string]: OpenAPI.HeaderObject;
291
+ };
288
292
  }[] | undefined;
289
- responses?: Record<string, import("@scalar/types/legacy").ScalarResponse>;
293
+ responses?: Record<string, OpenAPI.ResponseObject>;
290
294
  security?: import("@scalar/openapi-types").OpenAPIV3.SecurityRequirementObject[];
291
295
  requestBody?: {
292
296
  description?: string;
@@ -334,6 +338,9 @@ declare const parsedSpec: {
334
338
  example?: any;
335
339
  examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
336
340
  content?: import("@scalar/types/legacy").RequestBodyMimeTypes;
341
+ headers?: {
342
+ [key: string]: OpenAPI.HeaderObject;
343
+ };
337
344
  }[] | undefined;
338
345
  }[];
339
346
  'x-displayName'?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiDocument.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/OpenApiDocument/OpenApiDocument.vue"],"names":[],"mappings":"AAqIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAS3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAwC,CAAA;AAC1D,QAAA,MAAM,OAAO,uCAA8B,CAAA;AAC3C,QAAA,MAAM,MAAM;;;IAAyB,CAAA;AAIrC,QAAA,MAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './ExampleRequest';
2
+ export * from './ExampleResponses';
2
3
  export * from './OpenApiDocument';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/embeds/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/embeds/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerForm.vue"],"names":[],"mappings":"AAiHA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAMlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;;eAKpC,MAAM,GAAG,MAAM;cAChB,MAAM,EAAE;gBACN,oBAAoB;;;;;;;eAFrB,MAAM,GAAG,MAAM;cAChB,MAAM,EAAE;gBACN,oBAAoB;;;;;;;cAFrB,MAAM,GAAG,MAAM;;AA4K9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CA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CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ServerForm.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-da7210d5"]]);
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-465cec21"]]);
5
5
  export {
6
- e as default
6
+ c as default
7
7
  };
@@ -3,7 +3,7 @@ import { ScalarMarkdown as V } from "@scalar/components";
3
3
  import B from "./ServerUrl.vue.js";
4
4
  import R from "./ServerUrlSelect.vue.js";
5
5
  import g from "./ServerVariablesForm.vue.js";
6
- const y = (r) => (N("data-v-da7210d5"), r = r(), U(), r), E = { key: 0 }, F = /* @__PURE__ */ y(() => /* @__PURE__ */ t("span", { class: "server-form-title" }, "Base URL", -1)), L = { class: "server-form" }, M = { class: "server-form-container" }, $ = { class: "server-item" }, j = {
6
+ const y = (r) => (N("data-v-465cec21"), r = r(), U(), r), E = { key: 0 }, F = /* @__PURE__ */ y(() => /* @__PURE__ */ t("span", { class: "server-form-title" }, "Base URL", -1)), L = { class: "server-form" }, M = { class: "server-form-container" }, $ = { class: "server-item" }, j = {
7
7
  key: 0,
8
8
  muted: ""
9
9
  }, q = { class: "description" }, H = /* @__PURE__ */ S({
@@ -23,8 +23,8 @@ const y = (r) => (N("data-v-da7210d5"), r = r(), U(), r), E = { key: 0 }, F = /*
23
23
  return (e = i.servers) == null ? void 0 : e[l.value];
24
24
  });
25
25
  return (e, s) => {
26
- var d, v, n;
27
- return (d = e.servers) != null && d.length ? (c(), u("div", E, [
26
+ var v, n, d;
27
+ return (v = e.servers) != null && v.length ? (c(), u("div", E, [
28
28
  F,
29
29
  t("div", L, [
30
30
  t("div", M, [
@@ -45,12 +45,12 @@ const y = (r) => (N("data-v-da7210d5"), r = r(), U(), r), E = { key: 0 }, F = /*
45
45
  ]),
46
46
  o(g, {
47
47
  values: e.variables,
48
- variables: (v = a.value) == null ? void 0 : v.variables,
48
+ variables: (n = a.value) == null ? void 0 : n.variables,
49
49
  "onUpdate:variable": s[0] || (s[0] = (b, h) => e.$emit("update:variable", b, h))
50
50
  }, null, 8, ["values", "variables"])
51
51
  ])
52
52
  ]),
53
- (n = a.value) != null && n.description ? (c(), u("div", j, [
53
+ (d = a.value) != null && d.description ? (c(), u("div", j, [
54
54
  t("div", q, [
55
55
  o(C(V), {
56
56
  value: a.value.description
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AA6YA,OAAO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C;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ExampleRequest.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f47524fb"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-77ab5d94"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,51 +1,49 @@
1
- import { defineComponent as P, ref as R, computed as f, watch as I, inject as L, onServerPrefetch as M, useSSRContext as Y, unref as a, openBlock as y, createBlock as V, withCtx as p, createVNode as u, createElementBlock as h, Fragment as H, createTextVNode as O, toDisplayString as K, createElementVNode as N, renderSlot as j, createCommentVNode as x } from "vue";
2
- import { ScalarCodeBlock as z } from "@scalar/components";
3
- import { createHash as D, ssrState as Q } from "@scalar/oas-utils/helpers";
4
- import { getRequestFromOperation as W } from "@scalar/oas-utils/spec-getters";
5
- import { snippetz as B } from "@scalar/snippetz";
6
- import { asyncComputed as X } from "@vueuse/core";
7
- import { HTTPSnippet as Z } from "httpsnippet-lite";
8
- import G from "./ExamplePicker.vue.js";
9
- import ee from "./TextSelect.vue.js";
1
+ import { defineComponent as U, ref as q, computed as d, watch as L, inject as I, onServerPrefetch as M, useSSRContext as P, unref as r, openBlock as p, createBlock as _, withCtx as c, createVNode as u, createElementBlock as y, Fragment as V, createTextVNode as O, toDisplayString as v, createElementVNode as H, renderSlot as N, createCommentVNode as g } from "vue";
2
+ import { ScalarCodeBlock as Y } from "@scalar/components";
3
+ import { createHash as D, ssrState as z } from "@scalar/oas-utils/helpers";
4
+ import { getRequestFromOperation as G } from "@scalar/oas-utils/spec-getters";
5
+ import { asyncComputed as Q } from "@vueuse/core";
6
+ import W from "./ExamplePicker.vue.js";
7
+ import X from "./TextSelect.vue.js";
10
8
  /* empty css */
11
- import { GLOBAL_SECURITY_SYMBOL as te } from "../../helpers/provideSymbols.js";
12
- import oe from "../../components/Card/Card.vue.js";
13
- import re from "../../components/Card/CardHeader.vue.js";
14
- import ae from "../../components/HttpMethod/HttpMethod.vue.js";
15
- import ne from "../../components/Card/CardContent.vue.js";
16
- import { getSecretCredentialsFromAuthentication as se, getRequestFromAuthentication as le } from "../../legacy/helpers/getRequestFromAuthentication.js";
17
- import ie from "../../components/Card/CardFooter.vue.js";
18
- import { useHttpClientStore as ce } from "../../stores/useHttpClientStore.js";
19
- import { useServerStore as pe } from "../../legacy/stores/useServerStore.js";
20
- import { getApiClientRequest as ue } from "../../helpers/getApiClientRequest.js";
21
- import { useAuthenticationStore as me } from "../../legacy/stores/useAuthenticationStore.js";
22
- import { getHarRequest as de } from "../../helpers/getHarRequest.js";
23
- import { getUrlFromServerState as fe } from "../../legacy/helpers/getUrlFromServerState.js";
24
- const ye = { class: "request-header" }, ve = { class: "code-snippet" }, ge = {
9
+ import { GLOBAL_SECURITY_SYMBOL as Z } from "../../helpers/provideSymbols.js";
10
+ import ee from "../../components/Card/Card.vue.js";
11
+ import te from "../../components/Card/CardHeader.vue.js";
12
+ import oe from "../../components/HttpMethod/HttpMethod.vue.js";
13
+ import re from "../../components/Card/CardContent.vue.js";
14
+ import { getSecretCredentialsFromAuthentication as ae, getRequestFromAuthentication as ne } from "../../legacy/helpers/getRequestFromAuthentication.js";
15
+ import se from "../../components/Card/CardFooter.vue.js";
16
+ import { getExampleCode as le } from "../../helpers/getExampleCode.js";
17
+ import { useHttpClientStore as ie } from "../../stores/useHttpClientStore.js";
18
+ import { useServerStore as ce } from "../../legacy/stores/useServerStore.js";
19
+ import { useAuthenticationStore as ue } from "../../legacy/stores/useAuthenticationStore.js";
20
+ import { getHarRequest as me } from "../../helpers/getHarRequest.js";
21
+ import { getUrlFromServerState as pe } from "../../legacy/helpers/getUrlFromServerState.js";
22
+ const de = { class: "request-header" }, fe = { class: "code-snippet" }, ye = {
25
23
  key: 0,
26
24
  class: "request-card-footer-addon"
27
- }, Pe = /* @__PURE__ */ P({
25
+ }, we = /* @__PURE__ */ U({
28
26
  __name: "ExampleRequest",
29
27
  props: {
30
28
  operation: {}
31
29
  },
32
- setup(T) {
33
- const n = T, C = `components-Content-Operation-Example-Request${D(
30
+ setup(R) {
31
+ const n = R, h = `components-Content-Operation-Example-Request${D(
34
32
  n.operation.path + n.operation.httpVerb + n.operation.operationId
35
- )}`, S = R(), {
36
- httpClient: r,
37
- setHttpClient: $,
38
- availableTargets: E,
39
- httpTargetTitle: w,
40
- httpClientTitle: F
41
- } = ce(), { server: k } = pe(), { authentication: v } = me(), i = f(() => {
42
- var e;
43
- const t = ["x-custom-examples", "x-codeSamples", "x-code-samples"];
44
- for (const o of t)
45
- if ((e = n.operation.information) != null && e[o])
33
+ )}`, K = q(), {
34
+ httpClient: s,
35
+ setHttpClient: B,
36
+ availableTargets: x,
37
+ httpTargetTitle: $,
38
+ httpClientTitle: j
39
+ } = ie(), { server: F } = ce(), { authentication: C } = ue(), i = d(() => {
40
+ var t;
41
+ const e = ["x-custom-examples", "x-codeSamples", "x-code-samples"];
42
+ for (const o of e)
43
+ if ((t = n.operation.information) != null && t[o])
46
44
  return n.operation.information[o] ?? [];
47
45
  return [];
48
- }), s = R(
46
+ }), a = q(
49
47
  // Default to first custom example
50
48
  i.value.length ? {
51
49
  targetKey: "customExamples",
@@ -53,189 +51,174 @@ const ye = { class: "request-header" }, ve = { class: "code-snippet" }, ge = {
53
51
  } : (
54
52
  // Otherwise use the globally selected HTTP client
55
53
  {
56
- targetKey: r.targetKey,
57
- clientKey: r.clientKey
54
+ targetKey: s.targetKey,
55
+ clientKey: s.clientKey
58
56
  }
59
57
  )
60
58
  );
61
- I(r, () => {
62
- s.value = {
63
- targetKey: r.targetKey,
64
- clientKey: r.clientKey
59
+ L(s, () => {
60
+ a.value = {
61
+ targetKey: s.targetKey,
62
+ clientKey: s.clientKey
65
63
  };
66
64
  });
67
- const q = f(
65
+ const S = d(
68
66
  () => {
69
- var t, e, o, l;
67
+ var e, t, o, l;
70
68
  return Object.keys(
71
- ((l = (o = (e = (t = n.operation.information) == null ? void 0 : t.requestBody) == null ? void 0 : e.content) == null ? void 0 : o["application/json"]) == null ? void 0 : l.examples) ?? {}
69
+ ((l = (o = (t = (e = n.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : t.content) == null ? void 0 : o["application/json"]) == null ? void 0 : l.examples) ?? {}
72
70
  ).length > 1;
73
71
  }
74
- ), c = L(te);
75
- async function _() {
72
+ ), f = I(Z);
73
+ async function E() {
76
74
  var l, m;
77
- if (s.value.targetKey === "customExamples")
78
- return ((l = i.value[s.value.clientKey]) == null ? void 0 : l.source) ?? "";
79
- const t = de(
75
+ if (a.value.targetKey === "customExamples")
76
+ return ((l = i.value[a.value.clientKey]) == null ? void 0 : l.source) ?? "";
77
+ const e = me(
80
78
  {
81
- url: fe(k)
79
+ url: pe(F)
82
80
  },
83
- W(
81
+ G(
84
82
  n.operation,
85
83
  {
86
84
  replaceVariables: !0
87
85
  },
88
- S.value
86
+ K.value
89
87
  ),
90
- le(
91
- v,
92
- ((m = n.operation.information) == null ? void 0 : m.security) ?? (c == null ? void 0 : c())
88
+ ne(
89
+ C,
90
+ ((m = n.operation.information) == null ? void 0 : m.security) ?? (f == null ? void 0 : f())
93
91
  )
94
- ), e = r.clientKey === "undici" || r.clientKey === "fetch" || r.clientKey === "ofetch" ? r.clientKey : null, o = r.targetKey.replace("javascript", "js");
95
- if (e && B().hasPlugin(o, e))
96
- return B().print(o, e, t) ?? "";
97
- try {
98
- const g = await new Z(t).convert(
99
- r.targetKey,
100
- r.clientKey
101
- );
102
- return decodeURIComponent(g);
103
- } catch (d) {
104
- return console.error("[ExampleRequest]", d), "";
105
- }
92
+ ), t = s.clientKey, o = s.targetKey;
93
+ return await le(e, o, t) ?? "";
106
94
  }
107
- const b = X(async () => {
95
+ const k = Q(async () => {
108
96
  try {
109
- return await _();
110
- } catch (t) {
111
- return console.error("[generateSnippet]", t), "";
97
+ return await E();
98
+ } catch (e) {
99
+ return console.error("[generateSnippet]", e), "";
112
100
  }
113
- }, Q[C] ?? "");
101
+ }, z[h] ?? "");
114
102
  M(async () => {
115
- const t = Y();
116
- t.payload.data[C] = await _();
117
- }), f(() => ue({
118
- serverState: k,
119
- authenticationState: v,
120
- operation: n.operation,
121
- globalSecurity: c == null ? void 0 : c()
122
- }));
123
- const A = f(() => {
124
- var e, o;
125
- const t = (
103
+ const e = P();
104
+ e.payload.data[h] = await E();
105
+ });
106
+ const T = d(() => {
107
+ var t, o;
108
+ const e = (
126
109
  // Specified language
127
- ((e = s.value) == null ? void 0 : e.targetKey) === "customExamples" ? ((o = i.value[s.value.clientKey]) == null ? void 0 : o.lang) ?? "plaintext" : (
110
+ ((t = a.value) == null ? void 0 : t.targetKey) === "customExamples" ? ((o = i.value[a.value.clientKey]) == null ? void 0 : o.lang) ?? "plaintext" : (
128
111
  // Or language for the globally selected HTTP client
129
- r.targetKey
112
+ s.targetKey
130
113
  )
131
114
  );
132
- return t === "shell" && b.value.includes("curl") ? "curl" : t === "Objective-C" ? "objc" : t;
133
- }), U = f(() => {
134
- const t = E.value.map((e) => ({
135
- value: e.key,
136
- label: e.title,
137
- options: e.clients.map((o) => ({
115
+ return e === "shell" && k.value.includes("curl") ? "curl" : e === "Objective-C" ? "objc" : e;
116
+ }), w = d(() => {
117
+ const e = x.value.map((t) => ({
118
+ value: t.key,
119
+ label: t.title,
120
+ options: t.clients.map((o) => ({
138
121
  value: JSON.stringify({
139
- targetKey: e.key,
122
+ targetKey: t.key,
140
123
  clientKey: o.key
141
124
  }),
142
125
  label: o.title
143
126
  }))
144
127
  }));
145
- return i.value.length && t.unshift({
128
+ return i.value.length && e.unshift({
146
129
  value: "customExamples",
147
130
  label: "Examples",
148
- options: i.value.map((e, o) => ({
131
+ options: i.value.map((t, o) => ({
149
132
  value: JSON.stringify({
150
133
  targetKey: "customExamples",
151
134
  clientKey: o
152
135
  }),
153
- label: e.label ?? e.lang ?? `Example #${o + 1}`
136
+ label: t.label ?? t.lang ?? `Example #${o + 1}`
154
137
  }))
155
- }), t;
138
+ }), e;
156
139
  });
157
- function J(t) {
158
- const e = JSON.parse(t);
159
- e.targetKey === "customExamples" ? s.value = e : $(e);
140
+ function A(e) {
141
+ const t = JSON.parse(e);
142
+ t.targetKey === "customExamples" ? a.value = t : B(t);
160
143
  }
161
- return (t, e) => a(E).length || i.value.length ? (y(), V(a(oe), {
144
+ return (e, t) => r(x).length || i.value.length ? (p(), _(r(ee), {
162
145
  key: 0,
163
146
  class: "dark-mode"
164
147
  }, {
165
- default: p(() => [
166
- u(a(re), { muted: "" }, {
167
- actions: p(() => [
168
- u(ee, {
148
+ default: c(() => [
149
+ u(r(te), { muted: "" }, {
150
+ actions: c(() => [
151
+ u(X, {
169
152
  class: "request-client-picker",
170
- modelValue: JSON.stringify(s.value),
171
- options: U.value,
172
- "onUpdate:modelValue": J
153
+ modelValue: JSON.stringify(a.value),
154
+ options: w.value,
155
+ "onUpdate:modelValue": A
173
156
  }, {
174
- default: p(() => [
175
- s.value.targetKey === "customExamples" ? (y(), h(H, { key: 0 }, [
176
- O(K(i.value[s.value.clientKey].label ?? "Example"), 1)
177
- ], 64)) : (y(), h(H, { key: 1 }, [
178
- O(K(a(w)) + " " + K(a(F)), 1)
157
+ default: c(() => [
158
+ a.value.targetKey === "customExamples" ? (p(), y(V, { key: 0 }, [
159
+ O(v(i.value[a.value.clientKey].label ?? "Example"), 1)
160
+ ], 64)) : (p(), y(V, { key: 1 }, [
161
+ O(v(r($)) + " " + v(r(j)), 1)
179
162
  ], 64))
180
163
  ]),
181
164
  _: 1
182
165
  }, 8, ["modelValue", "options"])
183
166
  ]),
184
- default: p(() => [
185
- N("div", ye, [
186
- u(a(ae), {
167
+ default: c(() => [
168
+ H("div", de, [
169
+ u(r(oe), {
187
170
  as: "span",
188
171
  class: "request-method",
189
- method: t.operation.httpVerb
172
+ method: e.operation.httpVerb
190
173
  }, null, 8, ["method"]),
191
- j(t.$slots, "header", {}, void 0, !0)
174
+ N(e.$slots, "header", {}, void 0, !0)
192
175
  ])
193
176
  ]),
194
177
  _: 3
195
178
  }),
196
- u(a(ne), {
179
+ u(r(re), {
197
180
  borderless: "",
198
181
  class: "request-editor-section custom-scroll",
199
182
  frameless: ""
200
183
  }, {
201
- default: p(() => [
202
- N("div", ve, [
203
- u(a(z), {
184
+ default: c(() => [
185
+ H("div", fe, [
186
+ u(r(Y), {
204
187
  class: "bg-b-2",
205
- content: a(b),
206
- hideCredentials: a(se)(a(v)),
207
- lang: A.value,
188
+ content: r(k),
189
+ hideCredentials: r(ae)(r(C)),
190
+ lang: T.value,
208
191
  lineNumbers: ""
209
192
  }, null, 8, ["content", "hideCredentials", "lang"])
210
193
  ])
211
194
  ]),
212
195
  _: 1
213
196
  }),
214
- q.value || t.$slots.footer ? (y(), V(a(ie), {
197
+ S.value || e.$slots.footer ? (p(), _(r(se), {
215
198
  key: 0,
216
199
  class: "request-card-footer",
217
200
  contrast: ""
218
201
  }, {
219
- default: p(() => {
220
- var o, l, m, d;
202
+ default: c(() => {
203
+ var o, l, m, b;
221
204
  return [
222
- q.value ? (y(), h("div", ge, [
223
- u(G, {
205
+ S.value ? (p(), y("div", ye, [
206
+ u(W, {
224
207
  class: "request-example-selector",
225
- examples: ((d = (m = (l = (o = t.operation.information) == null ? void 0 : o.requestBody) == null ? void 0 : l.content) == null ? void 0 : m["application/json"]) == null ? void 0 : d.examples) ?? [],
226
- "onUpdate:modelValue": e[0] || (e[0] = (g) => S.value = g)
208
+ examples: ((b = (m = (l = (o = e.operation.information) == null ? void 0 : o.requestBody) == null ? void 0 : l.content) == null ? void 0 : m["application/json"]) == null ? void 0 : b.examples) ?? [],
209
+ "onUpdate:modelValue": t[0] || (t[0] = (J) => K.value = J)
227
210
  }, null, 8, ["examples"])
228
- ])) : x("", !0),
229
- j(t.$slots, "footer", {}, void 0, !0)
211
+ ])) : g("", !0),
212
+ N(e.$slots, "footer", {}, void 0, !0)
230
213
  ];
231
214
  }),
232
215
  _: 3
233
- })) : x("", !0)
216
+ })) : g("", !0)
234
217
  ]),
235
218
  _: 3
236
- })) : x("", !0);
219
+ })) : g("", !0);
237
220
  }
238
221
  });
239
222
  export {
240
- Pe as default
223
+ we as default
241
224
  };
@@ -1,8 +1,8 @@
1
- import type { ExampleResponseHeaders } from '../../../../types';
1
+ import type { OpenAPI } from '@scalar/openapi-types';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
- headers: ExampleResponseHeaders;
3
+ response: OpenAPI.ResponseObject;
4
4
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
5
- headers: ExampleResponseHeaders;
5
+ response: OpenAPI.ResponseObject;
6
6
  }>>>, {}, {}>;
7
7
  export default _default;
8
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -14,4 +14,4 @@ type __VLS_TypePropsToOption<T> = {
14
14
  required: true;
15
15
  };
16
16
  };
17
- //# sourceMappingURL=Headers.vue.d.ts.map
17
+ //# sourceMappingURL=ExampleResponse.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleResponses/ExampleResponse.vue"],"names":[],"mappings":"AAsGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;;cAKxC,OAAO,CAAC,cAAc;;cAAtB,OAAO,CAAC,cAAc;;AA2GlC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import o from "./ExampleResponse.vue2.js";
2
+ /* empty css */
3
+ import p from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ p(o, [["__scopeId", "data-v-908bf679"]]);
5
+ export {
6
+ r as default
7
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as c, openBlock as n, createBlock as a, unref as e, createElementBlock as i } from "vue";
2
+ import { ScalarCodeBlock as m } from "@scalar/components";
3
+ import { prettyPrintJson as l } from "@scalar/oas-utils/helpers";
4
+ import { getExampleFromSchema as d } from "@scalar/oas-utils/spec-getters";
5
+ const f = {
6
+ key: 2,
7
+ class: "empty-state"
8
+ }, B = /* @__PURE__ */ c({
9
+ __name: "ExampleResponse",
10
+ props: {
11
+ response: {}
12
+ },
13
+ setup(k) {
14
+ return (o, u) => {
15
+ var s, t, r, p;
16
+ return (s = o.response) != null && s.example ? (n(), a(e(m), {
17
+ key: 0,
18
+ class: "bg-b-2",
19
+ content: e(l)((t = o.response) == null ? void 0 : t.example),
20
+ lang: "json"
21
+ }, null, 8, ["content"])) : (r = o.response) != null && r.schema ? (n(), a(e(m), {
22
+ key: 1,
23
+ class: "bg-b-2",
24
+ content: e(l)(
25
+ e(d)((p = o.response) == null ? void 0 : p.schema, {
26
+ emptyString: "…",
27
+ mode: "read"
28
+ })
29
+ ),
30
+ lang: "json"
31
+ }, null, 8, ["content"])) : (n(), i("div", f, " No Body "));
32
+ };
33
+ }
34
+ });
35
+ export {
36
+ B as default
37
+ };
@@ -14,4 +14,4 @@ type __VLS_TypePropsToOption<T> = {
14
14
  required: true;
15
15
  };
16
16
  };
17
- //# sourceMappingURL=PathResponses.vue.d.ts.map
17
+ //# sourceMappingURL=ExampleResponses.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleResponses/ExampleResponses.vue"],"names":[],"mappings":"AAqTA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;;eAoB7B,oBAAoB;;eAApB,oBAAoB;;AAoXvD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import o from "./ExampleResponses.vue2.js";
2
+ /* empty css */
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-0696399e"]]);
5
+ export {
6
+ m as default
7
+ };