@scalar/api-reference 1.34.1 → 1.34.4

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 (113) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/README.md +1 -1
  3. package/dist/browser/standalone.js +13121 -12730
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/Badge/Badge.vue.d.ts +4 -1
  6. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  7. package/dist/components/Badge/Badge.vue.js +5 -11
  8. package/dist/components/Badge/Badge.vue2.js +22 -2
  9. package/dist/components/Badge/Badge.vue3.js +4 -0
  10. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +1 -1
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
  13. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Models/Models.vue.js +30 -31
  15. package/dist/components/Content/Models/ModernLayout.vue.d.ts +2 -0
  16. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  18. package/dist/components/Content/Models/ModernLayout.vue2.js +39 -37
  19. package/dist/components/Content/Operations/TraversedEntry.vue.js +12 -12
  20. package/dist/components/Content/Tags/TagSection.vue.js +6 -6
  21. package/dist/components/GettingStarted.vue.js +3 -3
  22. package/dist/components/GettingStarted.vue2.js +21 -21
  23. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  24. package/dist/components/MobileHeader.vue.js +3 -3
  25. package/dist/components/Section/CompactSection.vue.d.ts +2 -0
  26. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  27. package/dist/components/Section/CompactSection.vue.js +1 -1
  28. package/dist/components/Section/CompactSection.vue2.js +30 -29
  29. package/dist/features/Operation/Operation.vue.d.ts +2 -1
  30. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/Operation.vue.js +53 -52
  32. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -2
  33. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  35. package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
  36. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +16 -16
  38. package/dist/features/Operation/helpers/combine-params.d.ts +5 -0
  39. package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -0
  40. package/dist/features/Operation/helpers/combine-params.js +13 -0
  41. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -4
  42. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  43. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  44. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +59 -50
  45. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +2 -2
  46. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -4
  47. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  48. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  49. package/dist/features/Operation/layouts/ModernLayout.vue2.js +94 -78
  50. package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -1
  51. package/dist/features/Search/helpers/create-fuse-instance.js +0 -3
  52. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  53. package/dist/features/api-client-modal/ApiClientModal.vue.js +51 -48
  54. package/dist/features/api-client-modal/useApiClient.d.ts +100 -100
  55. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  56. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  57. package/dist/features/document-source/hooks/useDocumentFetcher.js +16 -18
  58. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  59. package/dist/features/document-source/hooks/useDocumentSource.js +30 -33
  60. package/dist/features/example-responses/ExampleResponse.vue.d.ts +1 -1
  61. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  62. package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
  63. package/dist/features/example-responses/ExampleResponse.vue2.js +15 -13
  64. package/dist/features/example-responses/ExampleResponses.vue.d.ts +2 -3
  65. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  66. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  67. package/dist/features/example-responses/ExampleResponses.vue2.js +73 -69
  68. package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts +26 -0
  69. package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +1 -0
  70. package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +29 -0
  71. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
  72. package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
  73. package/dist/features/sidebar/components/SidebarElement.vue2.js +6 -6
  74. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  75. package/dist/features/sidebar/helpers/create-sidebar.js +13 -14
  76. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +1 -2
  77. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  78. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  79. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  80. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  81. package/dist/features/traverse-schema/types.d.ts +11 -12
  82. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  83. package/dist/features/x-badges/XBadges.vue.d.ts +8 -0
  84. package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -0
  85. package/dist/features/x-badges/XBadges.vue.js +26 -0
  86. package/dist/features/x-badges/XBadges.vue2.js +4 -0
  87. package/dist/features/x-badges/index.d.ts +2 -0
  88. package/dist/features/x-badges/index.d.ts.map +1 -0
  89. package/dist/helpers/test-utils.d.ts +1 -1
  90. package/dist/helpers/test-utils.d.ts.map +1 -1
  91. package/dist/hooks/useNavState.d.ts +1 -2
  92. package/dist/hooks/useNavState.d.ts.map +1 -1
  93. package/dist/index.js +1 -1
  94. package/dist/libs/openapi.d.ts +4 -14
  95. package/dist/libs/openapi.d.ts.map +1 -1
  96. package/dist/libs/openapi.js +55 -36
  97. package/dist/style.css +1 -1
  98. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  99. package/dist/v2/ApiReferenceWorkspace.vue.js +64 -64
  100. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +1 -2
  101. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  102. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +2 -2
  103. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +97 -100
  104. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +1 -2
  105. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -1
  106. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +17 -20
  107. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  108. package/dist/v2/helpers/map-configuration.d.ts +66 -0
  109. package/dist/v2/helpers/map-configuration.d.ts.map +1 -0
  110. package/dist/v2/helpers/map-configuration.js +53 -0
  111. package/dist/vitest.setup.d.ts +2 -0
  112. package/dist/vitest.setup.d.ts.map +1 -0
  113. package/package.json +24 -20
@@ -1,60 +1,61 @@
1
- import { defineComponent as m, ref as p, watch as f, nextTick as v, createElementBlock as b, openBlock as i, createElementVNode as h, createBlock as g, createCommentVNode as C, normalizeClass as r, createVNode as s, unref as t, withCtx as n, renderSlot as c } from "vue";
2
- import { scrollToId as k } from "@scalar/helpers/dom/scroll-to-id";
3
- import { ScalarIconCaretRight as S } from "@scalar/icons";
4
- import { useNavState as _ } from "../../hooks/useNavState.js";
1
+ import { defineComponent as u, ref as m, watch as p, nextTick as f, createElementBlock as v, openBlock as i, createElementVNode as b, createBlock as h, createCommentVNode as g, normalizeClass as n, createVNode as r, unref as o, withCtx as s, renderSlot as d } from "vue";
2
+ import { scrollToId as C } from "@scalar/helpers/dom/scroll-to-id";
3
+ import { ScalarIconCaretRight as k } from "@scalar/icons";
4
+ import { useNavState as S } from "../../hooks/useNavState.js";
5
5
  import w from "../Anchor/Anchor.vue.js";
6
- import N from "./Section.vue.js";
7
- const $ = { class: "collapsible-section" }, y = ["id", "aria-controls", "aria-expanded"], j = /* @__PURE__ */ m({
6
+ import y from "./Section.vue.js";
7
+ const B = { class: "collapsible-section" }, N = ["id", "aria-controls", "aria-expanded"], R = /* @__PURE__ */ u({
8
8
  __name: "CompactSection",
9
9
  props: {
10
10
  id: {},
11
- label: {}
11
+ label: {},
12
+ defaultOpen: { type: Boolean, default: !1 }
12
13
  },
13
- setup(d) {
14
- const a = d, { hash: u } = _(), o = p(!1);
15
- return f(
16
- u,
14
+ setup(a) {
15
+ const { hash: c } = S(), t = m(a.defaultOpen);
16
+ return p(
17
+ c,
17
18
  async (e) => {
18
- e === a.id && !o.value && (o.value = !0, await v(), k(a.id));
19
+ a.id === e && !t.value && (t.value = !0, await f(), C(a.id));
19
20
  },
20
21
  { immediate: !0 }
21
- ), (e, l) => (i(), b("div", $, [
22
- h("button", {
22
+ ), (e, l) => (i(), v("div", B, [
23
+ b("button", {
23
24
  id: e.id,
24
25
  "aria-controls": e.id,
25
- "aria-expanded": o.value,
26
- class: r(["collapsible-section-trigger", { "collapsible-section-trigger-open": o.value }]),
26
+ "aria-expanded": t.value,
27
+ class: n(["collapsible-section-trigger", { "collapsible-section-trigger-open": t.value }]),
27
28
  type: "button",
28
- onClick: l[0] || (l[0] = (B) => o.value = !o.value)
29
+ onClick: l[0] || (l[0] = ($) => t.value = !t.value)
29
30
  }, [
30
- s(t(S), {
31
- weight: "bold",
32
- class: r(["size-3 transition-transform duration-100", { "rotate-90": o.value }])
31
+ r(o(k), {
32
+ class: n(["size-3 transition-transform duration-100", { "rotate-90": t.value }]),
33
+ weight: "bold"
33
34
  }, null, 8, ["class"]),
34
- s(t(w), {
35
+ r(o(w), {
35
36
  id: e.id,
36
37
  class: "collapsible-section-header"
37
38
  }, {
38
- default: n(() => [
39
- c(e.$slots, "heading", {}, void 0, !0)
39
+ default: s(() => [
40
+ d(e.$slots, "heading", {}, void 0, !0)
40
41
  ]),
41
42
  _: 3
42
43
  }, 8, ["id"])
43
- ], 10, y),
44
- o.value ? (i(), g(t(N), {
44
+ ], 10, N),
45
+ t.value ? (i(), h(o(y), {
45
46
  key: 0,
46
47
  id: e.id,
47
48
  class: "collapsible-section-content",
48
49
  label: e.label
49
50
  }, {
50
- default: n(() => [
51
- c(e.$slots, "default", {}, void 0, !0)
51
+ default: s(() => [
52
+ d(e.$slots, "default", {}, void 0, !0)
52
53
  ]),
53
54
  _: 3
54
- }, 8, ["id", "label"])) : C("", !0)
55
+ }, 8, ["id", "label"])) : g("", !0)
55
56
  ]));
56
57
  }
57
58
  });
58
59
  export {
59
- j as default
60
+ R as default
60
61
  };
@@ -1,6 +1,7 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
2
  import type { Collection, Server } from '@scalar/oas-utils/entities/spec';
3
3
  import type { OpenAPIV3_1 } from '@scalar/openapi-types';
4
+ import type { ApiReferenceConfiguration } from '@scalar/types';
4
5
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
5
6
  import type { ClientOptionGroup } from '../../v2/blocks/scalar-request-example-block/types';
6
7
  type __VLS_Props = {
@@ -8,8 +9,8 @@ type __VLS_Props = {
8
9
  method: HttpMethod;
9
10
  clientOptions: ClientOptionGroup[];
10
11
  isWebhook: boolean;
11
- layout?: 'modern' | 'classic';
12
12
  id: string;
13
+ config: ApiReferenceConfiguration;
13
14
  server: Server | undefined;
14
15
  store: WorkspaceStore;
15
16
  /** @deprecated Use `document` instead, we just need the selected security scheme uids for now */
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAiJA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAUpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAOvF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,cAAc,CAAA;IACrB,iGAAiG;IACjG,UAAU,EAAE,UAAU,CAAA;IACtB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;CAChC,CAAC;;AAiLF,wBAMG"}
1
+ {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAOpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAOvF,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,yBAAyB,CAAA;IACjC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,cAAc,CAAA;IACrB,iGAAiG;IACjG,UAAU,EAAE,UAAU,CAAA;IACtB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;CAChC,CAAC;;AAqKJ,wBAMG"}
@@ -1,94 +1,95 @@
1
- import { defineComponent as S, computed as m, createElementBlock as b, createCommentVNode as W, openBlock as l, Fragment as U, createBlock as k, unref as f } from "vue";
2
- import { useWorkspace as V } from "@scalar/api-client/store";
3
- import { filterSecurityRequirements as B } from "@scalar/api-client/views/Request/RequestSection";
4
- import { isReference as C, isResolvedRef as R } from "@scalar/workspace-store/schemas/v3.1/type-guard";
5
- import { convertSecurityScheme as w } from "../../helpers/convert-security-scheme.js";
6
- import { useOperationDiscriminator as D } from "../../hooks/useOperationDiscriminator.js";
7
- import g from "./layouts/ClassicLayout.vue.js";
8
- import L from "./layouts/ModernLayout.vue.js";
9
- const j = /* @__PURE__ */ S({
1
+ import { defineComponent as O, computed as c, createElementBlock as b, createCommentVNode as S, openBlock as l, Fragment as g, createBlock as v, unref as y } from "vue";
2
+ import { useWorkspace as W } from "@scalar/api-client/store";
3
+ import { filterSecurityRequirements as U } from "@scalar/api-client/views/Request/RequestSection";
4
+ import { getResolvedRef as V } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import { combineParams as B } from "./helpers/combine-params.js";
6
+ import { convertSecurityScheme as C } from "../../helpers/convert-security-scheme.js";
7
+ import { useOperationDiscriminator as w } from "../../hooks/useOperationDiscriminator.js";
8
+ import D from "./layouts/ClassicLayout.vue.js";
9
+ import R from "./layouts/ModernLayout.vue.js";
10
+ const j = /* @__PURE__ */ O({
10
11
  __name: "Operation",
11
12
  props: {
12
13
  path: {},
13
14
  method: {},
14
15
  clientOptions: {},
15
16
  isWebhook: { type: Boolean },
16
- layout: { default: "modern" },
17
17
  id: {},
18
+ config: {},
18
19
  server: {},
19
20
  store: {},
20
21
  collection: {},
21
22
  document: {}
22
23
  },
23
24
  setup(o) {
24
- var v, y;
25
- const u = m(() => {
26
- var t, a;
25
+ var p, f;
26
+ const u = c(() => {
27
+ var t, n;
27
28
  const e = o.isWebhook ? "webhooks" : "paths";
28
- return (a = (t = o.store.workspace.activeDocument) == null ? void 0 : t[e]) == null ? void 0 : a[o.path];
29
- }), s = m(() => {
30
- var t;
31
- const e = (t = u.value) == null ? void 0 : t[o.method];
32
- return C(e) ? null : e;
33
- }), c = m(
29
+ return (n = (t = o.store.workspace.activeDocument) == null ? void 0 : t[e]) == null ? void 0 : n[o.path];
30
+ }), a = c(() => {
31
+ var n, i;
32
+ const e = V((n = u.value) == null ? void 0 : n[o.method]);
33
+ if (!e)
34
+ return null;
35
+ const t = B(
36
+ (i = u.value) == null ? void 0 : i.parameters,
37
+ e.parameters
38
+ );
39
+ return { ...e, parameters: t };
40
+ }), m = c(
34
41
  () => {
35
- var e, t, a, r, n, i;
36
- return o.isWebhook ? (a = (t = (e = o.document) == null ? void 0 : e.webhooks) == null ? void 0 : t[o.path]) == null ? void 0 : a[o.method] : (i = (n = (r = o.document) == null ? void 0 : r.paths) == null ? void 0 : n[o.path]) == null ? void 0 : i[o.method];
42
+ var e, t, n, i, r, s;
43
+ return o.isWebhook ? (n = (t = (e = o.document) == null ? void 0 : e.webhooks) == null ? void 0 : t[o.path]) == null ? void 0 : n[o.method] : (s = (r = (i = o.document) == null ? void 0 : i.paths) == null ? void 0 : r[o.path]) == null ? void 0 : s[o.method];
37
44
  }
38
- ), { handleDiscriminatorChange: h } = D(
39
- c.value,
40
- (y = (v = o.document) == null ? void 0 : v.components) == null ? void 0 : y.schemas
41
- ), { securitySchemes: O } = V(), d = m(
45
+ ), { handleDiscriminatorChange: h } = w(
46
+ m.value,
47
+ (f = (p = o.document) == null ? void 0 : p.components) == null ? void 0 : f.schemas
48
+ ), { securitySchemes: k } = W(), d = c(
42
49
  () => {
43
50
  var e, t;
44
- return B(
45
- ((e = s.value) == null ? void 0 : e.security) || ((t = o.document) == null ? void 0 : t.security),
51
+ return U(
52
+ ((e = a.value) == null ? void 0 : e.security) || ((t = o.document) == null ? void 0 : t.security),
46
53
  o.collection.selectedSecuritySchemeUids,
47
- O
48
- ).map(w);
54
+ k
55
+ ).map(C);
49
56
  }
50
- ), p = m(() => {
51
- var a, r;
52
- const e = ((a = u.value) == null ? void 0 : a.parameters) ?? [], t = ((r = s.value) == null ? void 0 : r.parameters) ?? [];
53
- return [...e, ...t].filter(
54
- R
55
- );
56
- });
57
+ );
57
58
  return (e, t) => {
58
- var a, r, n, i;
59
- return s.value && c.value ? (l(), b(U, { key: 0 }, [
60
- e.layout === "classic" ? (l(), k(g, {
59
+ var n, i, r, s;
60
+ return a.value && m.value ? (l(), b(g, { key: 0 }, [
61
+ e.config.layout === "classic" ? (l(), v(D, {
61
62
  key: 0,
62
63
  id: e.id,
63
64
  isWebhook: e.isWebhook,
64
65
  method: e.method,
65
- operation: s.value,
66
- oldOperation: c.value,
66
+ operation: a.value,
67
+ oldOperation: m.value,
68
+ config: e.config,
67
69
  clientOptions: e.clientOptions,
68
70
  securitySchemes: d.value,
69
- parameters: p.value,
70
71
  store: e.store,
71
72
  path: e.path,
72
- schemas: (r = (a = e.document) == null ? void 0 : a.components) == null ? void 0 : r.schemas,
73
+ schemas: (i = (n = e.document) == null ? void 0 : n.components) == null ? void 0 : i.schemas,
73
74
  server: e.server,
74
- "onUpdate:modelValue": f(h)
75
- }, null, 8, ["id", "isWebhook", "method", "operation", "oldOperation", "clientOptions", "securitySchemes", "parameters", "store", "path", "schemas", "server", "onUpdate:modelValue"])) : (l(), k(L, {
75
+ "onUpdate:modelValue": y(h)
76
+ }, null, 8, ["id", "isWebhook", "method", "operation", "oldOperation", "config", "clientOptions", "securitySchemes", "store", "path", "schemas", "server", "onUpdate:modelValue"])) : (l(), v(R, {
76
77
  key: 1,
77
78
  id: e.id,
78
79
  isWebhook: e.isWebhook,
79
80
  method: e.method,
81
+ config: e.config,
80
82
  clientOptions: e.clientOptions,
81
- oldOperation: c.value,
83
+ oldOperation: m.value,
82
84
  securitySchemes: d.value,
83
- parameters: p.value,
84
85
  path: e.path,
85
86
  store: e.store,
86
- operation: s.value,
87
- schemas: (i = (n = e.document) == null ? void 0 : n.components) == null ? void 0 : i.schemas,
87
+ operation: a.value,
88
+ schemas: (s = (r = e.document) == null ? void 0 : r.components) == null ? void 0 : s.schemas,
88
89
  server: e.server,
89
- "onUpdate:modelValue": f(h)
90
- }, null, 8, ["id", "isWebhook", "method", "clientOptions", "oldOperation", "securitySchemes", "parameters", "path", "store", "operation", "schemas", "server", "onUpdate:modelValue"]))
91
- ], 64)) : W("", !0);
90
+ "onUpdate:modelValue": y(h)
91
+ }, null, 8, ["id", "isWebhook", "method", "config", "clientOptions", "oldOperation", "securitySchemes", "path", "store", "operation", "schemas", "server", "onUpdate:modelValue"]))
92
+ ], 64)) : S("", !0);
92
93
  };
93
94
  }
94
95
  });
@@ -1,9 +1,8 @@
1
1
  import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
2
  import { type OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
3
- import { type Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
4
3
  import type { Schemas } from '../../../../features/Operation/types/schemas';
5
4
  type __VLS_Props = {
6
- callback: Dereference<OperationObject>;
5
+ callback: OperationObject;
7
6
  method: HttpMethodType;
8
7
  path: string;
9
8
  operationMethod: HttpMethodType;
@@ -1 +1 @@
1
- {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAKlF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACtC,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,cAAc,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAyJF,wBAOG"}
1
+ {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAKlG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,cAAc,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAyJF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Callback.vue2.js";
2
2
  import "./Callback.vue3.js";
3
- import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-782d5e21"]]);
3
+ import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-a7c29633"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- const e = "";
1
+ const _ = "";
2
2
  export {
3
- e as default
3
+ _ as default
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAA;AAGjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAMjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,cAAc,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;AAwFF,wBAOG"}
1
+ {"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAA;AAEjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAMjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,cAAc,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;AAsFF,wBAOG"}
@@ -1,8 +1,8 @@
1
- import { defineComponent as h, createElementBlock as t, openBlock as e, createElementVNode as f, Fragment as r, renderList as o, createCommentVNode as m, unref as u, createBlock as b } from "vue";
2
- import { isHttpMethod as y } from "@scalar/helpers/http/is-http-method";
3
- import { isReference as C } from "@scalar/workspace-store/schemas/v3.1/type-guard";
4
- import g from "./Callback.vue.js";
5
- const B = { class: "callbacks-list gap-3" }, N = /* @__PURE__ */ h({
1
+ import { defineComponent as k, createElementBlock as t, openBlock as e, createElementVNode as h, Fragment as l, renderList as o, unref as c, createBlock as f, createCommentVNode as b } from "vue";
2
+ import { isHttpMethod as C } from "@scalar/helpers/http/is-http-method";
3
+ import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import y from "./Callback.vue.js";
5
+ const v = { class: "callbacks-list gap-3" }, N = /* @__PURE__ */ k({
6
6
  __name: "Callbacks",
7
7
  props: {
8
8
  path: {},
@@ -10,22 +10,22 @@ const B = { class: "callbacks-list gap-3" }, N = /* @__PURE__ */ h({
10
10
  callbacks: {},
11
11
  schemas: {}
12
12
  },
13
- setup(i) {
14
- return (a, s) => (e(), t("div", B, [
15
- s[0] || (s[0] = f("div", { class: "callbacks-title text-c-1 my-3 text-lg font-medium" }, " Callbacks ", -1)),
16
- (e(!0), t(r, null, o(a.callbacks, (c, n) => (e(), t(r, { key: n }, [
17
- u(C)(c) ? m("", !0) : (e(!0), t(r, { key: 0 }, o(c, (p, k) => (e(), t(r, null, [
18
- (e(!0), t(r, null, o(p, (d, l) => (e(), t(r, { key: l }, [
19
- u(y)(l) ? (e(), b(g, {
13
+ setup(m) {
14
+ return (a, s) => (e(), t("div", v, [
15
+ s[0] || (s[0] = h("div", { class: "callbacks-title text-c-1 my-3 text-lg font-medium" }, " Callbacks ", -1)),
16
+ (e(!0), t(l, null, o(a.callbacks, (u, n) => (e(), t(l, { key: n }, [
17
+ (e(!0), t(l, null, o(c(g)(u), (p, i) => (e(), t(l, null, [
18
+ (e(!0), t(l, null, o(p, (d, r) => (e(), t(l, { key: r }, [
19
+ c(C)(r) ? (e(), f(y, {
20
20
  key: 0,
21
21
  callback: d,
22
- method: l,
23
- operationMethod: i.method,
22
+ method: r,
23
+ operationMethod: m.method,
24
24
  name: n,
25
25
  path: a.path,
26
26
  schemas: a.schemas,
27
- url: k
28
- }, null, 8, ["callback", "method", "operationMethod", "name", "path", "schemas", "url"])) : m("", !0)
27
+ url: i
28
+ }, null, 8, ["callback", "method", "operationMethod", "name", "path", "schemas", "url"])) : b("", !0)
29
29
  ], 64))), 128))
30
30
  ], 64))), 256))
31
31
  ], 64))), 128))
@@ -0,0 +1,5 @@
1
+ import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/parameter';
2
+ import type { OperationObject, PathItemObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
3
+ /** Combine pathItem and operation parameters into a single, dereferenced parameter array */
4
+ export declare const combineParams: (pathParams?: PathItemObject["parameters"], operationParams?: OperationObject["parameters"]) => ParameterObject[];
5
+ //# sourceMappingURL=combine-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combine-params.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/combine-params.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAA;AAElH,4FAA4F;AAC5F,eAAO,MAAM,aAAa,gBACZ,cAAc,CAAC,YAAY,CAAC,oBACvB,eAAe,CAAC,YAAY,CAAC,KAC7C,eAAe,EAajB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { isDefined as s } from "@scalar/helpers/array/is-defined";
2
+ import { getResolvedRef as t } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ const c = (o = [], a = []) => {
4
+ const m = [...o, ...a].map((e) => t(e)).filter(s), r = /* @__PURE__ */ new Map();
5
+ for (const e of m) {
6
+ const n = `${e.in}:${e.name}`;
7
+ r.set(n, e);
8
+ }
9
+ return Array.from(r.values());
10
+ };
11
+ export {
12
+ c as combineParams
13
+ };
@@ -1,11 +1,10 @@
1
1
  import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
2
  import type { OpenAPIV3_1 } from '@scalar/openapi-types';
3
+ import type { ApiReferenceConfiguration } from '@scalar/types';
3
4
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
- import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/parameter';
5
5
  import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
6
6
  import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
7
7
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
8
- import type { Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
9
8
  import type { Schemas } from '../../../features/Operation/types/schemas';
10
9
  import type { ClientOptionGroup } from '../../../v2/blocks/scalar-request-example-block/types';
11
10
  type __VLS_Props = {
@@ -13,9 +12,9 @@ type __VLS_Props = {
13
12
  path: string;
14
13
  clientOptions: ClientOptionGroup[];
15
14
  method: HttpMethodType;
16
- operation: Dereference<OperationObject>;
15
+ config: ApiReferenceConfiguration;
16
+ operation: OperationObject;
17
17
  oldOperation: OpenAPIV3_1.OperationObject;
18
- parameters: ParameterObject[];
19
18
  isWebhook: boolean;
20
19
  server: ServerObject | undefined;
21
20
  securitySchemes: SecuritySchemeObject[];
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAqcA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAWrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAclF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAIvF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC,YAAY,EAAE,WAAW,CAAC,eAAe,CAAA;IACzC,UAAU,EAAE,eAAe,EAAE,CAAA;IAE7B,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;;;;AA+ZF,wBAQG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAgdA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAWrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AActF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAIvF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,yBAAyB,CAAA;IACjC,SAAS,EAAE,eAAe,CAAA;IAC1B,YAAY,EAAE,WAAW,CAAC,eAAe,CAAA;IAEzC,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;;;;AA4aF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClassicLayout.vue2.js";
2
2
  import "./ClassicLayout.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d52c6d10"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-03026e66"]]);
5
5
  export {
6
- c as default
6
+ m as default
7
7
  };