@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,35 +1,37 @@
1
- import { defineComponent as C, useId as M, computed as d, ref as h, toValue as E, createBlock as p, createCommentVNode as u, openBlock as o, unref as t, withCtx as r, createVNode as x, createElementBlock as k, Fragment as N, renderList as F, createTextVNode as g, toDisplayString as I, withDirectives as K, createElementVNode as _, vModelCheckbox as A } from "vue";
2
- import { ScalarCard as D, ScalarIcon as L, ScalarCardSection as U, ScalarCodeBlock as $, ScalarCardFooter as q, ScalarMarkdown as G } from "@scalar/components";
1
+ import { defineComponent as C, useId as M, computed as d, ref as h, toValue as E, createBlock as u, createCommentVNode as m, openBlock as o, unref as l, withCtx as c, createVNode as x, createElementBlock as k, Fragment as N, renderList as D, createTextVNode as R, toDisplayString as F, withDirectives as I, createElementVNode as _, vModelCheckbox as K } from "vue";
2
+ import { ScalarCard as A, ScalarIcon as L, ScalarCardSection as U, ScalarCodeBlock as $, ScalarCardFooter as q, ScalarMarkdown as G } from "@scalar/components";
3
3
  import { normalizeMimeTypeObject as H, getObjectKeys as J } from "@scalar/oas-utils/helpers";
4
4
  import { useClipboard as P } from "@scalar/use-hooks/useClipboard";
5
- import Q from "../../components/ScreenReader.vue.js";
6
- import W from "./ExampleResponse.vue.js";
7
- import X from "./ExampleResponseTab.vue.js";
8
- import Y from "./ExampleResponseTabList.vue.js";
9
- import Z from "../../v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js";
10
- const z = {
5
+ import { getResolvedRef as Q } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
+ import W from "../../components/ScreenReader.vue.js";
7
+ import X from "./ExampleResponse.vue.js";
8
+ import Y from "./ExampleResponseTab.vue.js";
9
+ import Z from "./ExampleResponseTabList.vue.js";
10
+ import { getResolvedRefDeep as z } from "./helpers/get-resolved-ref-deep.js";
11
+ import ee from "../../v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js";
12
+ const se = {
11
13
  key: 1,
12
14
  class: "scalar-card-checkbox"
13
- }, ee = ["aria-controls"], se = {
15
+ }, ae = ["aria-controls"], le = {
14
16
  key: 0,
15
17
  class: "response-description"
16
- }, ie = /* @__PURE__ */ C({
18
+ }, ve = /* @__PURE__ */ C({
17
19
  __name: "ExampleResponses",
18
20
  props: {
19
21
  responses: {}
20
22
  },
21
- setup(R) {
23
+ setup(g) {
22
24
  var j;
23
25
  const v = M(), { copyToClipboard: w } = P(), y = d(
24
- () => Object.keys(R.responses ?? {}).sort()
26
+ () => Object.keys(g.responses ?? {}).sort()
25
27
  ), V = h(0), f = d(() => {
26
28
  var s;
27
29
  const e = E(y)[E(V)];
28
- return (s = R.responses) == null ? void 0 : s[e];
29
- }), l = d(() => {
30
- var c;
30
+ return Q((s = g.responses) == null ? void 0 : s[e]);
31
+ }), t = d(() => {
32
+ var p;
31
33
  const e = H(
32
- (c = f.value) == null ? void 0 : c.content
34
+ (p = f.value) == null ? void 0 : p.content
33
35
  ), s = J(e ?? {});
34
36
  return (
35
37
  // OpenAPI 3.x
@@ -39,136 +41,138 @@ const z = {
39
41
  }), b = d(
40
42
  () => {
41
43
  var e, s;
42
- return !!((e = l.value) != null && e.examples) && Object.keys(((s = l.value) == null ? void 0 : s.examples) ?? {}).length > 1;
44
+ return !!((e = t.value) != null && e.examples) && Object.keys(((s = t.value) == null ? void 0 : s.examples) ?? {}).length > 1;
43
45
  }
44
46
  ), i = h(
45
- Object.keys(((j = l.value) == null ? void 0 : j.examples) ?? {})[0] ?? ""
47
+ Object.keys(((j = t.value) == null ? void 0 : j.examples) ?? {})[0] ?? ""
46
48
  ), O = () => {
47
49
  var a;
48
- const e = E(l);
50
+ const e = E(t);
49
51
  if (!e)
50
52
  return;
51
53
  if (Array.isArray(e.examples))
52
54
  return e.examples[0];
53
55
  const s = Object.keys(e.examples ?? {})[0];
54
56
  return (a = e.examples) == null ? void 0 : a[s];
55
- }, T = d(() => {
56
- var e, s;
57
- return b.value && i.value ? (s = (e = l.value) == null ? void 0 : e.examples) == null ? void 0 : s[i.value] : O();
58
- }), B = (e) => {
57
+ }, T = d(
58
+ () => {
59
+ var e, s;
60
+ return b.value && i.value ? (s = (e = t.value) == null ? void 0 : e.examples) == null ? void 0 : s[i.value] : O();
61
+ }
62
+ ), B = (e) => {
59
63
  V.value = e, i.value = "";
60
64
  }, S = h(!1);
61
- return (e, s) => y.value.length ? (o(), p(t(D), {
65
+ return (e, s) => y.value.length ? (o(), u(l(A), {
62
66
  key: 0,
63
67
  "aria-label": "Example Responses",
64
68
  role: "region",
65
69
  class: "response-card"
66
70
  }, {
67
- default: r(() => {
68
- var c;
71
+ default: c(() => {
72
+ var p;
69
73
  return [
70
- x(Y, { onChange: B }, {
71
- actions: r(() => {
72
- var a, m;
74
+ x(Z, { onChange: B }, {
75
+ actions: c(() => {
76
+ var a, r;
73
77
  return [
74
- (a = l.value) != null && a.example ? (o(), k("button", {
78
+ (a = t.value) != null && a.example ? (o(), k("button", {
75
79
  key: 0,
76
80
  class: "code-copy",
77
81
  type: "button",
78
82
  onClick: s[0] || (s[0] = () => {
79
83
  var n;
80
- return t(w)((n = l.value) == null ? void 0 : n.example);
84
+ return l(w)((n = t.value) == null ? void 0 : n.example);
81
85
  })
82
86
  }, [
83
- x(t(L), {
87
+ x(l(L), {
84
88
  icon: "Clipboard",
85
89
  width: "12px"
86
90
  })
87
- ])) : u("", !0),
88
- (m = l.value) != null && m.schema ? (o(), k("label", z, [
89
- s[4] || (s[4] = g(" Show Schema ")),
90
- K(_("input", {
91
+ ])) : m("", !0),
92
+ (r = t.value) != null && r.schema ? (o(), k("label", se, [
93
+ s[4] || (s[4] = R(" Show Schema ")),
94
+ I(_("input", {
91
95
  "onUpdate:modelValue": s[1] || (s[1] = (n) => S.value = n),
92
- "aria-controls": t(v),
96
+ "aria-controls": l(v),
93
97
  class: "scalar-card-checkbox-input",
94
98
  type: "checkbox"
95
- }, null, 8, ee), [
96
- [A, S.value]
99
+ }, null, 8, ae), [
100
+ [K, S.value]
97
101
  ]),
98
102
  s[5] || (s[5] = _("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
99
- ])) : u("", !0)
103
+ ])) : m("", !0)
100
104
  ];
101
105
  }),
102
- default: r(() => [
103
- (o(!0), k(N, null, F(y.value, (a) => (o(), p(X, {
106
+ default: c(() => [
107
+ (o(!0), k(N, null, D(y.value, (a) => (o(), u(Y, {
104
108
  key: a,
105
- "aria-controls": t(v)
109
+ "aria-controls": l(v)
106
110
  }, {
107
- default: r(() => [
108
- x(Q, null, {
109
- default: r(() => s[3] || (s[3] = [
110
- g("Status:")
111
+ default: c(() => [
112
+ x(W, null, {
113
+ default: c(() => s[3] || (s[3] = [
114
+ R("Status:")
111
115
  ])),
112
116
  _: 1,
113
117
  __: [3]
114
118
  }),
115
- g(" " + I(a), 1)
119
+ R(" " + F(a), 1)
116
120
  ]),
117
121
  _: 2
118
122
  }, 1032, ["aria-controls"]))), 128))
119
123
  ]),
120
124
  _: 1
121
125
  }),
122
- x(t(U), { class: "grid flex-1" }, {
123
- default: r(() => {
124
- var a;
126
+ x(l(U), { class: "grid flex-1" }, {
127
+ default: c(() => {
128
+ var a, r;
125
129
  return [
126
- S.value && ((a = l.value) != null && a.schema) ? (o(), p(t($), {
130
+ S.value && ((a = t.value) != null && a.schema) ? (o(), u(l($), {
127
131
  key: 0,
128
- id: t(v),
132
+ id: l(v),
129
133
  class: "-outline-offset-2",
130
- content: l.value.schema,
134
+ content: l(z)((r = t.value) == null ? void 0 : r.schema),
131
135
  lang: "json"
132
- }, null, 8, ["id", "content"])) : (o(), p(W, {
136
+ }, null, 8, ["id", "content"])) : (o(), u(X, {
133
137
  key: 1,
134
- id: t(v),
135
- response: l.value,
138
+ id: l(v),
139
+ response: t.value,
136
140
  example: T.value
137
141
  }, null, 8, ["id", "response", "example"]))
138
142
  ];
139
143
  }),
140
144
  _: 1
141
145
  }),
142
- (c = f.value) != null && c.description || b.value ? (o(), p(t(q), {
146
+ (p = f.value) != null && p.description || b.value ? (o(), u(l(q), {
143
147
  key: 0,
144
148
  class: "response-card-footer"
145
149
  }, {
146
- default: r(() => {
147
- var a, m;
150
+ default: c(() => {
151
+ var a, r;
148
152
  return [
149
- (a = f.value) != null && a.description ? (o(), k("div", se, [
150
- x(t(G), {
153
+ (a = f.value) != null && a.description ? (o(), k("div", le, [
154
+ x(l(G), {
151
155
  class: "markdown",
152
156
  value: f.value.description
153
157
  }, null, 8, ["value"])
154
- ])) : u("", !0),
155
- b.value ? (o(), p(t(Z), {
158
+ ])) : m("", !0),
159
+ b.value ? (o(), u(l(ee), {
156
160
  key: 1,
157
161
  class: "response-example-selector",
158
- examples: (m = l.value) == null ? void 0 : m.examples,
162
+ examples: (r = t.value) == null ? void 0 : r.examples,
159
163
  modelValue: i.value,
160
164
  "onUpdate:modelValue": s[2] || (s[2] = (n) => i.value = n)
161
- }, null, 8, ["examples", "modelValue"])) : u("", !0)
165
+ }, null, 8, ["examples", "modelValue"])) : m("", !0)
162
166
  ];
163
167
  }),
164
168
  _: 1
165
- })) : u("", !0)
169
+ })) : m("", !0)
166
170
  ];
167
171
  }),
168
172
  _: 1
169
- })) : u("", !0);
173
+ })) : m("", !0);
170
174
  }
171
175
  });
172
176
  export {
173
- ie as default
177
+ ve as default
174
178
  };
@@ -0,0 +1,26 @@
1
+ import type { Dereference } from '@scalar/workspace-store/helpers/get-resolved-ref';
2
+ export type RefNode<Node> = Partial<Node> & {
3
+ $ref: string;
4
+ '$ref-value': Node | RefNode<Node>;
5
+ };
6
+ export type NodeInput<Node> = Node | RefNode<Node>;
7
+ /**
8
+ * Recursively resolves $ref objects
9
+ * This type helper ensures proper typing for deeply nested ref resolution.
10
+ * Properties that could contain $ref objects may resolve to '[circular]' if we have a circular reference.
11
+ */
12
+ export type DeepDereference<T> = Dereference<T> extends T ? T extends readonly (infer U)[] ? DeepDereference<U>[] : T extends object ? {
13
+ [K in keyof T]: T[K] extends RefNode<any> ? DeepDereference<T[K]> | '[circular]' : DeepDereference<T[K]>;
14
+ } : T : Dereference<T> extends object ? {
15
+ [K in keyof Dereference<T>]: Dereference<T>[K] extends RefNode<any> ? DeepDereference<Dereference<T>[K]> | '[circular]' : DeepDereference<Dereference<T>[K]>;
16
+ } : Dereference<T>;
17
+ /**
18
+ * Recursively resolves all $ref objects in a data structure to their actual values.
19
+ * Traverses through objects, arrays, and nested structures to find and resolve
20
+ * any $ref references at any depth level.
21
+ *
22
+ * Handles circular references gracefully by detecting them and returning '[circular]'
23
+ * to prevent infinite loops.
24
+ */
25
+ export declare const getResolvedRefDeep: <Node>(node: NodeInput<Node>) => DeepDereference<NodeInput<Node>>;
26
+ //# sourceMappingURL=get-resolved-ref-deep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-resolved-ref-deep.d.ts","sourceRoot":"","sources":["../../../../src/features/example-responses/helpers/get-resolved-ref-deep.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAEnF,MAAM,MAAM,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAA;AAChG,MAAM,MAAM,SAAS,CAAC,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAElD;;;;GAIG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,GACrD,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAC5B,eAAe,CAAC,CAAC,CAAC,EAAE,GACpB,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC5G,CAAC,GACL,WAAW,CAAC,CAAC,CAAC,SAAS,MAAM,GAC3B;KACG,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAC/D,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,GACjD,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACvC,GACD,WAAW,CAAC,CAAC,CAAC,CAAA;AAEpB;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,QAAQ,SAAS,CAAC,IAAI,CAAC,KAAG,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAoD/F,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { getRaw as i } from "@scalar/json-magic/magic-proxy";
2
+ const n = (a) => {
3
+ const o = /* @__PURE__ */ new WeakSet(), f = (e) => {
4
+ if (e == null || typeof e != "object")
5
+ return e;
6
+ const t = i(e);
7
+ if (o.has(t))
8
+ return "[circular]";
9
+ if (o.add(t), typeof e == "object" && e !== null && "$ref" in e) {
10
+ const l = e["$ref-value"], s = f(l);
11
+ return o.delete(t), s;
12
+ }
13
+ if (Array.isArray(e)) {
14
+ const l = e.map((s) => f(s));
15
+ return o.delete(t), l;
16
+ }
17
+ if (typeof e == "object" && e !== null) {
18
+ const l = {};
19
+ for (const [s, d] of Object.entries(e))
20
+ l[s] = f(d);
21
+ return o.delete(t), l;
22
+ }
23
+ return o.delete(t), e;
24
+ };
25
+ return f(a);
26
+ };
27
+ export {
28
+ n as getResolvedRefDeep
29
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarElement.vue"],"names":[],"mappings":"AAgXA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAQhE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAuEF,iBAAS,cAAc;WAwLT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;4FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarElement.vue"],"names":[],"mappings":"AAiXA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAQhE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAwEF,iBAAS,cAAc;WAwLT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;4FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SidebarElement.vue2.js";
2
2
  import "./SidebarElement.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-181295c9"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c3e6d407"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as $, createElementBlock as d, openBlock as n, createElementVNode as a, renderSlot as g, createCommentVNode as r, normalizeClass as A, unref as s, createTextVNode as m, withModifiers as O, createVNode as b, withCtx as v, toDisplayString as h, createBlock as T, normalizeStyle as E } from "vue";
1
+ import { defineComponent as A, createElementBlock as d, openBlock as n, createElementVNode as a, renderSlot as g, createCommentVNode as r, normalizeClass as O, unref as s, createTextVNode as m, withModifiers as T, createVNode as b, withCtx as v, toDisplayString as h, createBlock as $, normalizeStyle as E } from "vue";
2
2
  import { ScalarSidebarGroupToggle as N } from "@scalar/components";
3
3
  import { scrollToId as V } from "@scalar/helpers/dom/scroll-to-id";
4
4
  import { getHttpMethodInfo as H } from "@scalar/helpers/http/http-info";
@@ -17,7 +17,7 @@ const P = ["id"], z = {
17
17
  }, q = {
18
18
  key: 1,
19
19
  class: "action-menu"
20
- }, oe = /* @__PURE__ */ $({
20
+ }, oe = /* @__PURE__ */ A({
21
21
  __name: "SidebarElement",
22
22
  props: {
23
23
  id: {},
@@ -35,7 +35,7 @@ const P = ["id"], z = {
35
35
  return U(i.value.pathRouting.basePath, o.item.id);
36
36
  if (typeof window < "u") {
37
37
  const e = new URL(window.location.href);
38
- return e.hash = u(o.item.id), `${e.pathname}${e.search}${e.hash}`;
38
+ return e.hash = u(o.item.id), `${e.search}${e.hash}`;
39
39
  }
40
40
  return `#${u(o.item.id)}`;
41
41
  }, B = async (e) => {
@@ -47,7 +47,7 @@ const P = ["id"], z = {
47
47
  class: "sidebar-group-item"
48
48
  }, [
49
49
  a("div", {
50
- class: A(["sidebar-heading", {
50
+ class: O(["sidebar-heading", {
51
51
  "sidebar-group-item__folder": e.hasChildren,
52
52
  active_page: e.isActive,
53
53
  deprecated: "operation" in e.item && s(R)(
@@ -61,7 +61,7 @@ const P = ["id"], z = {
61
61
  "aria-expanded": e.open,
62
62
  class: "toggle-nested-icon",
63
63
  type: "button",
64
- onClick: O(c, ["stop"])
64
+ onClick: T(c, ["stop"])
65
65
  }, [
66
66
  b(s(N), { open: e.open }, {
67
67
  label: v(() => [
@@ -88,7 +88,7 @@ const P = ["id"], z = {
88
88
  method: e.item.method
89
89
  }, {
90
90
  default: v(() => [
91
- "webhook" in e.item ? (n(), T(s(I), {
91
+ "webhook" in e.item ? (n(), $(s(I), {
92
92
  key: 0,
93
93
  weight: "bold",
94
94
  style: E({
@@ -1 +1 @@
1
- {"version":3,"file":"create-sidebar.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/helpers/create-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAAE,KAAK,GAAG,EAA2B,MAAM,KAAK,CAAA;AAEvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAKrE,2CAA2C;AAC3C,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEpD,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAA;AAEhD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,yBAA0B,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,cAAc;;;;;;;qCAa5D,MAAM,UAAU,OAAO;mCARzB,MAAM,SAAS,OAAO;sCADnB,MAAM;CAgDhD,CAAA"}
1
+ {"version":3,"file":"create-sidebar.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/helpers/create-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAAE,KAAK,GAAG,EAA2B,MAAM,KAAK,CAAA;AAEvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAIrE,2CAA2C;AAC3C,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEpD,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAA;AAEhD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,yBAA0B,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,cAAc;;;;;;;qCAa5D,MAAM,UAAU,OAAO;mCARzB,MAAM,SAAS,OAAO;sCADnB,MAAM;CAgDhD,CAAA"}
@@ -1,33 +1,32 @@
1
1
  import { reactive as b, ref as p, computed as S } from "vue";
2
2
  import { scrollToId as l } from "@scalar/helpers/dom/scroll-to-id";
3
- import { measure as g } from "@scalar/helpers/testing/measure";
4
- import { traverseDocument as v } from "../../traverse-schema/helpers/traverse-document.js";
5
- import { lazyBus as O } from "../../../components/Lazy/lazyBus.js";
6
- const z = (a, o) => {
7
- const r = b({}), i = p(!1), m = (e) => r[e] = !r[e], c = (e, t) => r[e] = t, n = (e, t) => {
3
+ import { traverseDocument as g } from "../../traverse-schema/helpers/traverse-document.js";
4
+ import { lazyBus as v } from "../../../components/Lazy/lazyBus.js";
5
+ const h = (i, o) => {
6
+ const r = b({}), a = p(!1), n = (e) => r[e] = !r[e], c = (e, t) => r[e] = t, m = (e, t) => {
8
7
  const s = o.getSectionId(e);
9
8
  if (s && s !== e)
10
9
  if (r[s])
11
10
  l(e, t);
12
11
  else {
13
- const d = O.on((f) => {
14
- f.loaded === e && (l(e, t), d());
12
+ const f = v.on((u) => {
13
+ u.loaded === e && (l(e, t), f());
15
14
  });
16
15
  c(s, !0);
17
16
  }
18
- }, u = S(() => {
19
- const e = g("traverse-document", () => v(a.value, o));
17
+ }, d = S(() => {
18
+ const e = g(i.value, o);
20
19
  return o.config.value.defaultOpenAllTags && e.entries.forEach((t) => c(t.id, !0)), e;
21
20
  });
22
21
  return {
23
22
  collapsedSidebarItems: r,
24
- isSidebarOpen: i,
25
- items: u,
26
- scrollToOperation: n,
23
+ isSidebarOpen: a,
24
+ items: d,
25
+ scrollToOperation: m,
27
26
  setCollapsedSidebarItem: c,
28
- toggleCollapsedSidebarItem: m
27
+ toggleCollapsedSidebarItem: n
29
28
  };
30
29
  };
31
30
  export {
32
- z as createSidebar
31
+ h as createSidebar
33
32
  };
@@ -2,14 +2,13 @@ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
2
  import type { TraversedEntry } from '../../../features/traverse-schema/types';
3
3
  import type { UseNavState } from '../../../hooks/useNavState.js';
4
4
  import type { TagObject } from '@scalar/workspace-store/schemas/v3.1/strict/tag';
5
- import type { Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
6
5
  /**
7
6
  * Traverse the paths of the spec and build a map of tags and operations
8
7
  *
9
8
  * Default tag is to match what we have now we can improve later
10
9
  */
11
10
  export declare const traversePaths: (content: OpenAPIV3_1.Document, tagsMap: Map<string, {
12
- tag: Dereference<TagObject>;
11
+ tag: TagObject;
13
12
  entries: TraversedEntry[];
14
13
  }>, titlesMap: Map<string, string>, getOperationId: UseNavState["getOperationId"]) => void;
15
14
  //# sourceMappingURL=traverse-paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-paths.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,kCAAkC,CAAA;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAyBlF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YACf,WAAW,CAAC,QAAQ,WAEpB,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,aAErE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,kBACd,WAAW,CAAC,gBAAgB,CAAC,SA+B9C,CAAA"}
1
+ {"version":3,"file":"traverse-paths.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,kCAAkC,CAAA;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAA;AAyBhF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YACf,WAAW,CAAC,QAAQ,WAEpB,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,aAExD,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,kBACd,WAAW,CAAC,gBAAgB,CAAC,SA+B9C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-schemas.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AA6BxD,+DAA+D;AAC/D,eAAO,MAAM,eAAe,YACjB,WAAW,CAAC,QAAQ,WACpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,cAClB,WAAW,CAAC,YAAY,CAAC,KACpC,eAAe,EAyBjB,CAAA"}
1
+ {"version":3,"file":"traverse-schemas.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AA4BxD,+DAA+D;AAC/D,eAAO,MAAM,eAAe,YACjB,WAAW,CAAC,QAAQ,WACpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,cAClB,WAAW,CAAC,YAAY,CAAC,KACpC,eAAe,EAyBjB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-tags.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAgB,MAAM,kCAAkC,CAAA;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAKtD,KAAK,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,yBAAyB,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAA;AAkGjH,iFAAiF;AACjF,eAAO,MAAM,YAAY,YACd,WAAW,CAAC,QAAQ,WACpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,8CACc,OAAO,KAClD,cAAc,EAyBhB,CAAA"}
1
+ {"version":3,"file":"traverse-tags.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAgB,MAAM,kCAAkC,CAAA;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAItD,KAAK,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,yBAAyB,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAA;AAkGjH,iFAAiF;AACjF,eAAO,MAAM,YAAY,YACd,WAAW,CAAC,QAAQ,WACpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,8CACc,OAAO,KAClD,cAAc,EAyBhB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-webhooks.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AA4BtD,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,YAClB,WAAW,CAAC,QAAQ,WAEpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,gBAChB,WAAW,CAAC,cAAc,CAAC,KACxC,gBAAgB,EA+BlB,CAAA"}
1
+ {"version":3,"file":"traverse-webhooks.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AA2BtD,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,YAClB,WAAW,CAAC,QAAQ,WAEpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,gBAChB,WAAW,CAAC,cAAc,CAAC,KACxC,gBAAgB,EA4BlB,CAAA"}
@@ -4,52 +4,51 @@ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
4
4
  import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
5
5
  import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema';
6
6
  import type { TagObject } from '@scalar/workspace-store/schemas/v3.1/strict/tag';
7
- import type { Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
8
7
  import type { Ref } from 'vue';
9
8
  /** Map of tagNames and their entries */
10
9
  export type TagsMap = Map<string, {
11
- tag: Dereference<TagObject>;
10
+ tag: TagObject;
12
11
  entries: TraversedEntry[];
13
12
  }>;
14
- /** Description entry returned form traversing the document */
13
+ /** Description entry returned from traversing the document */
15
14
  export type TraversedDescription = {
16
15
  id: string;
17
16
  title: string;
18
17
  children?: TraversedDescription[];
19
18
  };
20
- /** Operation entry returned form traversing the document */
19
+ /** Operation entry returned from traversing the document */
21
20
  export type TraversedOperation = {
22
21
  id: string;
23
22
  title: string;
24
23
  method: OpenAPIV3_1.HttpMethods;
25
24
  path: string;
26
- operation: Dereference<OperationObject>;
25
+ operation: OperationObject;
27
26
  };
28
- /** Model entry returned form traversing the document */
27
+ /** Model entry returned from traversing the document */
29
28
  export type TraversedSchema = {
30
29
  id: string;
31
30
  title: string;
32
31
  name: string;
33
- schema: Dereference<SchemaObject>;
32
+ schema: SchemaObject;
34
33
  };
35
- /** Tag entry returned form traversing the document, includes tagGroups */
34
+ /** Tag entry returned from traversing the document, includes tagGroups */
36
35
  export type TraversedTag = {
37
36
  id: string;
38
37
  title: string;
39
38
  children: TraversedEntry[];
40
- tag: Dereference<TagObject>;
39
+ tag: TagObject;
41
40
  isGroup: boolean;
42
41
  isWebhooks?: boolean;
43
42
  };
44
- /** Webhook entry returned form traversing the document, basically the same as an operaation but with name instead of path */
43
+ /** Webhook entry returned from traversing the document, basically the same as an operaation but with name instead of path */
45
44
  export type TraversedWebhook = {
46
45
  id: string;
47
46
  title: string;
48
47
  method: OpenAPIV3_1.HttpMethods;
49
48
  name: string;
50
- webhook: Dereference<OperationObject>;
49
+ webhook: OperationObject;
51
50
  };
52
- /** Entries returned form traversing the document */
51
+ /** Entries returned from traversing the document */
53
52
  export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedSchema | TraversedTag | TraversedWebhook;
54
53
  /** Options for traversing the spec */
55
54
  export type TraverseSpecOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/traverse-schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAClF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAAA;AAE7F,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAA;CAClC,CAAA;AAED,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;CACxC,CAAA;AAED,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,CAAA;CAClC,CAAA;AAED,0EAA0E;AAC1E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,GAAG,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,6HAA6H;AAC7H,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;CACtC,CAAA;AAED,oDAAoD;AACpD,MAAM,MAAM,cAAc,GACtB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,gBAAgB,CAAA;AAEpB,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAA;CACvC,GAAG,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/traverse-schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAA;AAChF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAAA;AAEhF,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAA;CAClC,CAAA;AAED,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAA;AAED,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA;AAED,0EAA0E;AAC1E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,6HAA6H;AAC7H,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,eAAe,CAAA;CACzB,CAAA;AAED,oDAAoD;AACpD,MAAM,MAAM,cAAc,GACtB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,gBAAgB,CAAA;AAEpB,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAA;CACvC,GAAG,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { XBadge } from '@scalar/workspace-store/schemas/extensions/operation/x-badge';
2
+ type __VLS_Props = {
3
+ position: 'before' | 'after';
4
+ badges: XBadge[] | unknown;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
8
+ //# sourceMappingURL=XBadges.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XBadges.vue.d.ts","sourceRoot":"","sources":["../../../src/features/x-badges/XBadges.vue"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8DAA8D,CAAA;AAO1F,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAA;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;CAC3B,CAAC;;AAgFF,wBAMG"}
@@ -0,0 +1,26 @@
1
+ import { defineComponent as a, computed as i, createElementBlock as c, createCommentVNode as s, openBlock as n, Fragment as l, renderList as m, createBlock as u, unref as d, withCtx as f, createTextVNode as p, toDisplayString as g } from "vue";
2
+ import B from "../../components/Badge/Badge.vue.js";
3
+ const h = /* @__PURE__ */ a({
4
+ __name: "XBadges",
5
+ props: {
6
+ position: {},
7
+ badges: {}
8
+ },
9
+ setup(e) {
10
+ const o = i(() => Array.isArray(e.badges) ? e.badges.filter(
11
+ (t) => t.position === e.position || e.position === "after" && !t.position
12
+ ) : []);
13
+ return (t, k) => o.value.length ? (n(!0), c(l, { key: 0 }, m(o.value, (r) => (n(), u(d(B), {
14
+ key: r.name,
15
+ color: r.color
16
+ }, {
17
+ default: f(() => [
18
+ p(g(r.name), 1)
19
+ ]),
20
+ _: 2
21
+ }, 1032, ["color"]))), 128)) : s("", !0);
22
+ }
23
+ });
24
+ export {
25
+ h as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./XBadges.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as XBadges } from './XBadges.vue.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/x-badges/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { type TraversedEntry } from '../features/traverse-schema';
2
2
  import type { OpenAPIV3_1 } from '@scalar/openapi-types';
3
3
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
- import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/schemas/workspace';
4
+ import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
5
5
  /**
6
6
  * A collection of tools which are used strictly for testing
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/helpers/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AAI1F;;GAEG;AAEH,eAAO,MAAM,iBAAiB,oBAAoB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAgB,cAAc,EAAE;;;;;;;;;;CAOvG,CAAA;AAEF,eAAO,MAAM,6BAA6B,aAAc,WAAW,CAAC,QAAQ;;;;;;;;;;CAe3E,CAAA;AAED,eAAO,MAAM,uBAAuB;;CAElC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;CAiB7B,CAAA;AAEF,eAAO,MAAM,eAAe,mBAAoB,iBAAiB,KAAG,cAqBlE,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;CAOjC,CAAA"}
1
+ {"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/helpers/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAIlF;;GAEG;AAEH,eAAO,MAAM,iBAAiB,oBAAoB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAgB,cAAc,EAAE;;;;;;;;;;CAOvG,CAAA;AAEF,eAAO,MAAM,6BAA6B,aAAc,WAAW,CAAC,QAAQ;;;;;;;;;;CAe3E,CAAA;AAED,eAAO,MAAM,uBAAuB;;CAElC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;CAiB7B,CAAA;AAEF,eAAO,MAAM,eAAe,mBAAoB,iBAAiB,KAAG,cAqBlE,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;CAOjC,CAAA"}