@scalar/api-reference 1.31.8 → 1.31.9

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 (183) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/browser/standalone.js +18613 -18470
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +10 -30
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +240 -222
  9. package/dist/components/Content/Content.vue.d.ts +2 -0
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +2 -2
  12. package/dist/components/Content/Content.vue2.js +84 -74
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +84 -86
  19. package/dist/components/Content/Models/Models.vue.js +1 -1
  20. package/dist/components/Content/Models/Models.vue2.js +4 -4
  21. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  23. package/dist/components/Content/Schema/Schema.vue2.js +53 -53
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
  29. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
  32. package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
  33. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
  35. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  37. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
  38. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
  39. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  41. package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
  42. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/Tag.vue.js +45 -47
  44. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tag/TagList.vue.js +40 -41
  47. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  49. package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
  50. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
  51. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  52. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
  53. package/dist/components/MobileHeader.vue.d.ts +1 -8
  54. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  55. package/dist/components/MobileHeader.vue.js +1 -1
  56. package/dist/components/MobileHeader.vue2.js +19 -19
  57. package/dist/components/Section/Section.vue.js +2 -2
  58. package/dist/components/Section/Section.vue2.js +1 -1
  59. package/dist/components/ShowMoreButton.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue2.js +1 -1
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
  65. package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
  66. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  68. package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
  69. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
  70. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
  71. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
  72. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
  78. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  79. package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
  80. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  81. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
  82. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  83. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  84. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
  85. package/dist/features/Operation/Operation.vue.d.ts +0 -1
  86. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/Operation.vue.js +31 -34
  88. package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
  89. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
  91. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
  92. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
  94. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  96. package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
  97. package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
  98. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  99. package/dist/features/Operation/hooks/useResponses.js +12 -13
  100. package/dist/features/Operation/index.d.ts +0 -1
  101. package/dist/features/Operation/index.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +85 -72
  106. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  109. package/dist/features/Operation/layouts/ModernLayout.vue2.js +114 -98
  110. package/dist/features/Search/SearchModal.vue.js +2 -2
  111. package/dist/features/Search/SearchModal.vue2.js +1 -1
  112. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  113. package/dist/features/Search/useSearchIndex.js +61 -64
  114. package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
  115. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  116. package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
  117. package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
  118. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
  119. package/dist/features/sidebar/hooks/useSidebar.js +18 -0
  120. package/dist/features/sidebar/index.d.ts +2 -1
  121. package/dist/features/sidebar/index.d.ts.map +1 -1
  122. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
  123. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
  124. package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
  125. package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
  126. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
  127. package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
  128. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
  129. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  130. package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
  131. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
  132. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  133. package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
  134. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
  135. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  136. package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
  137. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
  138. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  139. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
  140. package/dist/features/traverse-schema/index.d.ts +3 -3
  141. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  142. package/dist/features/traverse-schema/types.d.ts +8 -5
  143. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  144. package/dist/helpers/parse.d.ts +2 -1
  145. package/dist/helpers/parse.d.ts.map +1 -1
  146. package/dist/helpers/parse.js +72 -88
  147. package/dist/hooks/useMultipleDocuments.d.ts +6 -6
  148. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  149. package/dist/hooks/useNavState.d.ts +1 -1
  150. package/dist/hooks/useNavState.d.ts.map +1 -1
  151. package/dist/hooks/useNavState.js +14 -9
  152. package/dist/hooks/useOperation.d.ts +7 -7
  153. package/dist/hooks/useOperation.d.ts.map +1 -1
  154. package/dist/hooks/useOperation.js +13 -12
  155. package/dist/index.d.ts +0 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +23 -25
  158. package/dist/legacy/fixtures/index.d.ts +1 -1
  159. package/dist/libs/openapi.d.ts +3 -4
  160. package/dist/libs/openapi.d.ts.map +1 -1
  161. package/dist/libs/openapi.js +8 -9
  162. package/dist/style.css +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
  164. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  165. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
  166. package/package.json +16 -16
  167. package/dist/components/Content/Webhooks/index.d.ts +0 -2
  168. package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
  169. package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
  170. package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
  171. package/dist/features/Operation/Webhooks.vue.js +0 -7
  172. package/dist/features/Operation/Webhooks.vue2.js +0 -121
  173. package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
  174. package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
  175. package/dist/features/Operation/components/Webhook.vue.js +0 -7
  176. package/dist/features/Operation/components/Webhook.vue2.js +0 -29
  177. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
  178. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
  179. package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
  180. package/dist/hooks/useSidebar.d.ts +0 -53
  181. package/dist/hooks/useSidebar.d.ts.map +0 -1
  182. package/dist/hooks/useSidebar.js +0 -248
  183. package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
@@ -1,28 +1,14 @@
1
- /**
2
- * API Reference Workspace will be a temporary wrapping layer for handling all workspace state.
3
- *
4
- * Once the migration to the new workspace store is complete the top level component composition
5
- * can be simplified to handle two use cases:
6
- *
7
- * - Externally provided store (store is initialized outside of the component and passed in)
8
- * - Standalone mode (store is initialized inside the component and configuration is merged)
9
- *
10
- * The configuration should be merged with the workspace store and all components should consume
11
- * only portions of the workspace store.
12
- *
13
- * No state updates should be handled in children of this components. When updates are required
14
- * a custom event should be emitted to the workspace store and handled here.
15
- */
16
- import type { ApiReferenceConfiguration } from '@scalar/types';
1
+ import type { AnyApiReferenceConfiguration } from '@scalar/types';
2
+ import { type WorkspaceStore } from '@scalar/workspace-store/client';
17
3
  type __VLS_Props = {
18
- configuration: Partial<ApiReferenceConfiguration>;
4
+ configuration?: AnyApiReferenceConfiguration;
5
+ getWorkspaceStore: () => WorkspaceStore;
19
6
  };
20
7
  declare function __VLS_template(): {
21
8
  attrs: Partial<{}>;
22
9
  slots: {
23
10
  footer?(_: {}): any;
24
11
  footer?(_: {}): any;
25
- "document-selector"?(_: {}): any;
26
12
  "sidebar-start"?(_: {}): any;
27
13
  };
28
14
  refs: {};
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAyHA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAY9D,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CAClD,CAAC;AAiEF,iBAAS,cAAc;WAuGT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;qCACU,GAAG;iCACP,GAAG;;;;EAaxC;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,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":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAkOA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAuBpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,iBAAiB,EAAE,MAAM,cAAc,CAAA;CACxC,CAAC;AAqIF,iBAAS,cAAc;WA0GT,OAAO,IAA6B;;wBAVrB,GAAG;wBACH,GAAG;iCACM,GAAG;;;;EAaxC;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,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,58 +1,81 @@
1
- import { defineComponent as g, shallowRef as p, watch as s, computed as C, createElementBlock as M, openBlock as c, Fragment as v, createBlock as D, createCommentVNode as y, createVNode as S, resolveDynamicComponent as $, withCtx as t, createTextVNode as w, toDisplayString as B, unref as u, renderSlot as n } from "vue";
2
- import { useColorMode as N } from "@scalar/use-hooks/useColorMode";
3
- import { createWorkspaceStoreSync as R } from "@scalar/workspace-store/client";
4
- import { useSeoMeta as V } from "@unhead/vue";
5
- import { useFavicon as b } from "@vueuse/core";
6
- import A from "../components/ApiReferenceLayout.vue.js";
7
- import { onCustomEvent as E } from "./events/listeners.js";
8
- const q = /* @__PURE__ */ g({
1
+ import { defineComponent as V, ref as i, toRef as y, provide as b, shallowRef as E, onServerPrefetch as R, onMounted as $, watch as c, computed as w, createElementBlock as A, openBlock as f, Fragment as B, createBlock as N, createCommentVNode as T, createVNode as p, unref as t, resolveDynamicComponent as F, withCtx as a, createTextVNode as I, toDisplayString as P, renderSlot as d, isRef as W } from "vue";
2
+ import { useColorMode as L } from "@scalar/use-hooks/useColorMode";
3
+ import { useSeoMeta as U } from "@unhead/vue";
4
+ import { useFavicon as _ } from "@vueuse/core";
5
+ import O from "../components/ApiReferenceLayout.vue.js";
6
+ import { useMultipleDocuments as Y } from "../hooks/useMultipleDocuments.js";
7
+ import { NAV_STATE_SYMBOL as j } from "../hooks/useNavState.js";
8
+ import { onCustomEvent as q } from "./events/listeners.js";
9
+ import z from "../components/DocumentSelector/DocumentSelector.vue.js";
10
+ const te = /* @__PURE__ */ V({
9
11
  __name: "ApiReferenceWorkspace",
10
12
  props: {
11
- configuration: {}
13
+ configuration: {},
14
+ getWorkspaceStore: { type: Function }
12
15
  },
13
- setup(e) {
14
- const m = p(null), r = R();
15
- E(m, "scalar-update-dark-mode", (o) => {
16
- r.update("x-scalar-dark-mode", o.data.value);
16
+ setup(k) {
17
+ const u = k, {
18
+ availableDocuments: v,
19
+ selectedConfiguration: o,
20
+ selectedDocumentIndex: s,
21
+ isIntersectionEnabled: g,
22
+ hash: C,
23
+ hashPrefix: M
24
+ } = Y({
25
+ configuration: y(u, "configuration"),
26
+ isIntersectionEnabled: i(!1),
27
+ hash: i(""),
28
+ hashPrefix: i("")
17
29
  });
18
- const { toggleColorMode: l, isDarkMode: i } = N({
19
- initialColorMode: e.configuration.darkMode ? "dark" : void 0,
20
- overrideColorMode: e.configuration.forceDarkModeState
30
+ b(j, { isIntersectionEnabled: g, hash: C, hashPrefix: M });
31
+ const D = E(null), n = u.getWorkspaceStore();
32
+ R(() => {
33
+ }), $(() => {
34
+ }), q(D, "scalar-update-dark-mode", (e) => {
35
+ n.update("x-scalar-dark-mode", e.data.value);
21
36
  });
22
- s(
23
- () => e.configuration.darkMode,
24
- (o) => r.update("x-scalar-dark-mode", !!o)
25
- ), s(
26
- () => i,
27
- () => r.update("x-scalar-dark-mode", i.value)
28
- ), e.configuration.metaData && V(e.configuration.metaData);
29
- const f = C(() => e.configuration.favicon);
30
- return b(f), (o, a) => {
31
- var d;
32
- return c(), M(v, null, [
33
- (d = o.configuration) != null && d.customCss ? (c(), D($("style"), { key: 0 }, {
34
- default: t(() => [
35
- w(B(o.configuration.customCss), 1)
37
+ const { toggleColorMode: S, isDarkMode: h } = L({
38
+ initialColorMode: o.value.darkMode ? "dark" : void 0,
39
+ overrideColorMode: o.value.forceDarkModeState
40
+ });
41
+ c(
42
+ () => o.value.darkMode,
43
+ (e) => n.update("x-scalar-dark-mode", !!e)
44
+ ), c(
45
+ () => h.value,
46
+ (e) => n.update("x-scalar-dark-mode", e)
47
+ ), o.value.metaData && U(o.value.metaData);
48
+ const x = w(() => o.value.favicon);
49
+ return _(x), (e, r) => {
50
+ var m;
51
+ return f(), A(B, null, [
52
+ (m = t(o)) != null && m.customCss ? (f(), N(F("style"), { key: 0 }, {
53
+ default: a(() => [
54
+ I(P(t(o).customCss), 1)
36
55
  ]),
37
56
  _: 1
38
- })) : y("", !0),
39
- S(A, {
40
- configuration: o.configuration,
41
- isDark: !!u(r).workspace["x-scalar-dark-mode"],
42
- onToggleDarkMode: a[0] || (a[0] = () => u(l)()),
43
- onUpdateContent: a[1] || (a[1] = (k) => o.$emit("updateContent", k))
57
+ })) : T("", !0),
58
+ p(O, {
59
+ configuration: t(o),
60
+ isDark: !!t(n).workspace["x-scalar-dark-mode"],
61
+ onToggleDarkMode: r[1] || (r[1] = () => t(S)()),
62
+ onUpdateContent: r[2] || (r[2] = (l) => e.$emit("updateContent", l))
44
63
  }, {
45
- footer: t(() => [
46
- n(o.$slots, "footer")
64
+ footer: a(() => [
65
+ d(e.$slots, "footer")
47
66
  ]),
48
- "content-end": t(() => [
49
- n(o.$slots, "footer")
67
+ "content-end": a(() => [
68
+ d(e.$slots, "footer")
50
69
  ]),
51
- "document-selector": t(() => [
52
- n(o.$slots, "document-selector")
70
+ "document-selector": a(() => [
71
+ p(t(z), {
72
+ modelValue: t(s),
73
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => W(s) ? s.value = l : null),
74
+ options: t(v)
75
+ }, null, 8, ["modelValue", "options"])
53
76
  ]),
54
- "sidebar-start": t(() => [
55
- n(o.$slots, "sidebar-start")
77
+ "sidebar-start": a(() => [
78
+ d(e.$slots, "sidebar-start")
56
79
  ]),
57
80
  _: 3
58
81
  }, 8, ["configuration", "isDark"])
@@ -61,5 +84,5 @@ const q = /* @__PURE__ */ g({
61
84
  }
62
85
  });
63
86
  export {
64
- q as default
87
+ te as default
65
88
  };
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.31.8",
23
+ "version": "1.31.9",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -54,20 +54,20 @@
54
54
  "nanoid": "^5.1.5",
55
55
  "vue": "^3.5.12",
56
56
  "zod": "3.24.1",
57
- "@scalar/api-client": "2.5.5",
58
- "@scalar/code-highlight": "0.1.2",
59
- "@scalar/helpers": "0.0.3",
60
- "@scalar/components": "0.14.7",
61
- "@scalar/icons": "0.4.2",
62
- "@scalar/oas-utils": "0.4.4",
63
- "@scalar/openapi-parser": "0.16.0",
64
- "@scalar/snippetz": "0.3.0",
65
- "@scalar/openapi-types": "0.3.2",
66
- "@scalar/themes": "0.13.2",
67
- "@scalar/types": "0.2.2",
57
+ "@scalar/api-client": "2.5.6",
58
+ "@scalar/code-highlight": "0.1.3",
59
+ "@scalar/components": "0.14.8",
60
+ "@scalar/oas-utils": "0.4.5",
61
+ "@scalar/helpers": "0.0.4",
62
+ "@scalar/openapi-parser": "0.17.0",
63
+ "@scalar/openapi-types": "0.3.3",
64
+ "@scalar/icons": "0.4.3",
65
+ "@scalar/snippetz": "0.3.1",
66
+ "@scalar/themes": "0.13.3",
68
67
  "@scalar/use-hooks": "0.2.2",
68
+ "@scalar/types": "0.2.3",
69
69
  "@scalar/use-toasts": "0.8.0",
70
- "@scalar/workspace-store": "0.3.2"
70
+ "@scalar/workspace-store": "0.4.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@tailwindcss/vite": "^4.1.7",
@@ -84,9 +84,9 @@
84
84
  "vite-plugin-banner": "^0.7.1",
85
85
  "vite-plugin-css-injected-by-js": "^3.4.0",
86
86
  "vitest": "^1.6.0",
87
- "@scalar/build-tooling": "0.2.2",
88
- "@scalar/galaxy": "0.5.0",
89
- "@scalar/react-renderer": "0.2.0"
87
+ "@scalar/react-renderer": "0.2.0",
88
+ "@scalar/galaxy": "0.5.1",
89
+ "@scalar/build-tooling": "0.2.3"
90
90
  },
91
91
  "scripts": {
92
92
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
@@ -1,2 +0,0 @@
1
- export { default as Webhooks } from '../../../features/Operation/Webhooks.vue.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0CAA0C,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { Webhooks } from '@scalar/types/legacy';
2
- type __VLS_Props = {
3
- webhooks: Webhooks;
4
- };
5
- 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>;
6
- export default _default;
7
- //# sourceMappingURL=Webhooks.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Webhooks.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Webhooks.vue"],"names":[],"mappings":"AAsIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAmBpD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAC;;AA6MF,wBAMG"}
@@ -1,7 +0,0 @@
1
- import o from "./Webhooks.vue2.js";
2
- /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6fd418ef"]]);
5
- export {
6
- m as default
7
- };
@@ -1,121 +0,0 @@
1
- import { defineComponent as O, computed as m, useId as H, createBlock as n, createCommentVNode as d, openBlock as r, unref as e, withCtx as s, createVNode as i, createElementVNode as z, createTextVNode as S, normalizeClass as A, createElementBlock as b, Fragment as h, renderList as _, toDisplayString as E } from "vue";
2
- import { ScalarMarkdown as M } from "@scalar/components";
3
- import T from "../../components/ShowMoreButton.vue.js";
4
- import { useNavState as j } from "../../hooks/useNavState.js";
5
- import { useSidebar as F } from "../../hooks/useSidebar.js";
6
- import K from "./components/Webhook.vue.js";
7
- import D from "../../components/Section/SectionContainer.vue.js";
8
- import X from "../../components/Section/Section.vue.js";
9
- import Y from "../../components/Section/SectionHeader.vue.js";
10
- import g from "../../components/Section/SectionHeaderTag.vue.js";
11
- import I from "../../components/Content/Lazy/Lazy.vue2.js";
12
- import $ from "../../components/Section/CompactSection.vue.js";
13
- const N = 10, te = /* @__PURE__ */ O({
14
- __name: "Webhooks",
15
- props: {
16
- webhooks: {}
17
- },
18
- setup(W) {
19
- const C = W, u = m(() => Object.keys(C.webhooks ?? {})), w = H(), { getWebhookId: k } = j(), { collapsedSidebarItems: B } = F(), c = m(
20
- () => u.value.length <= N || B[k()]
21
- ), L = m(() => {
22
- const t = u.value;
23
- return c.value ? t : t.slice(0, N);
24
- });
25
- return (t, f) => u.value.length ? (r(), n(e(D), {
26
- key: 0,
27
- id: "webhooks"
28
- }, {
29
- default: s(() => [
30
- i(e(X), { "aria-labelledby": e(w) }, {
31
- default: s(() => [
32
- i(e(Y), null, {
33
- default: s(() => [
34
- i(e(g), {
35
- id: e(w),
36
- level: 2
37
- }, {
38
- default: s(() => f[0] || (f[0] = [
39
- S(" Webhooks ")
40
- ])),
41
- _: 1
42
- }, 8, ["id"])
43
- ]),
44
- _: 1
45
- }),
46
- i(e(I), {
47
- id: "webhooks",
48
- isLazy: !1
49
- }),
50
- z("div", {
51
- class: A(["webhooks-list", { "webhooks-list-truncated": !c.value }])
52
- }, [
53
- (r(!0), b(h, null, _(L.value, (o) => {
54
- var p;
55
- return r(), b(h, { key: o }, [
56
- (r(!0), b(h, null, _(Object.keys(
57
- (p = t.webhooks) == null ? void 0 : p[o]
58
- ), (l) => (r(), n(e(I), {
59
- id: e(k)({ name: o, method: l }),
60
- key: l,
61
- isLazy: ""
62
- }, {
63
- default: s(() => {
64
- var y;
65
- return [
66
- (y = t.webhooks) != null && y[o] ? (r(), n(e($), {
67
- key: 0,
68
- id: e(k)({ name: o, method: l }),
69
- class: "webhooks-list-item",
70
- label: o
71
- }, {
72
- heading: s(() => [
73
- i(e(g), { level: 3 }, {
74
- default: s(() => {
75
- var a;
76
- return [
77
- S(E((a = t.webhooks[o][l]) == null ? void 0 : a.name), 1)
78
- ];
79
- }),
80
- _: 2
81
- }, 1024)
82
- ]),
83
- default: s(() => {
84
- var a, v;
85
- return [
86
- (a = t.webhooks[o][l]) != null && a.description ? (r(), n(e(M), {
87
- key: 0,
88
- class: "webhook-section-description",
89
- value: (v = t.webhooks[o][l]) == null ? void 0 : v.description,
90
- withImages: ""
91
- }, null, 8, ["value"])) : d("", !0),
92
- i(K, {
93
- webhook: t.webhooks[o][l]
94
- }, null, 8, ["webhook"])
95
- ];
96
- }),
97
- _: 2
98
- }, 1032, ["id", "label"])) : d("", !0)
99
- ];
100
- }),
101
- _: 2
102
- }, 1032, ["id"]))), 128))
103
- ], 64);
104
- }), 128))
105
- ], 2),
106
- c.value ? d("", !0) : (r(), n(T, {
107
- key: 0,
108
- id: "webhooks",
109
- class: "show-more-webhooks"
110
- }))
111
- ]),
112
- _: 1
113
- }, 8, ["aria-labelledby"])
114
- ]),
115
- _: 1
116
- })) : d("", !0);
117
- }
118
- });
119
- export {
120
- te as default
121
- };
@@ -1,7 +0,0 @@
1
- import type { TransformedOperation } from '@scalar/types/legacy';
2
- type __VLS_Props = {
3
- webhook: TransformedOperation;
4
- };
5
- 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>;
6
- export default _default;
7
- //# sourceMappingURL=Webhook.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Webhook.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Webhook.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,oBAAoB,CAAA;CAC9B,CAAC;;AA6EF,wBAMG"}
@@ -1,7 +0,0 @@
1
- import o from "./Webhook.vue2.js";
2
- /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cbaa1001"]]);
5
- export {
6
- p as default
7
- };
@@ -1,29 +0,0 @@
1
- import { defineComponent as n, createElementBlock as a, createCommentVNode as m, openBlock as s, Fragment as p, createVNode as r, withCtx as i, createTextVNode as d } from "vue";
2
- import u from "./OperationResponses.vue.js";
3
- import k from "./RequestBody.vue.js";
4
- const c = /* @__PURE__ */ n({
5
- __name: "Webhook",
6
- props: {
7
- webhook: {}
8
- },
9
- setup(l) {
10
- return (e, o) => {
11
- var t;
12
- return e.webhook ? (s(), a(p, { key: 0 }, [
13
- r(k, {
14
- class: "webhook-request-body",
15
- requestBody: (t = e.webhook.information) == null ? void 0 : t.requestBody
16
- }, {
17
- title: i(() => o[0] || (o[0] = [
18
- d("Payload")
19
- ])),
20
- _: 1
21
- }, 8, ["requestBody"]),
22
- r(u, { operation: e.webhook }, null, 8, ["operation"])
23
- ], 64)) : m("", !0);
24
- };
25
- }
26
- });
27
- export {
28
- c as default
29
- };
@@ -1,8 +0,0 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { TransformedOperation } from '@scalar/types/legacy';
3
- /** Temp helper for converting transformed operation to operationId payload */
4
- export declare const operationIdParams: (transformedOperation: TransformedOperation) => {
5
- path: string;
6
- method: OpenAPIV3_1.HttpMethods;
7
- } & OpenAPIV3_1.OperationObject;
8
- //# sourceMappingURL=operation-id-params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation-id-params.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/operation-id-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,yBACN,oBAAoB,KACzC;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;CAChC,GAAG,WAAW,CAAC,eAId,CAAA"}
@@ -1,8 +0,0 @@
1
- const o = (t) => ({
2
- ...t.information,
3
- path: t.path,
4
- method: t.httpVerb.toLowerCase()
5
- });
6
- export {
7
- o as operationIdParams
8
- };
@@ -1,53 +0,0 @@
1
- import type { Spec, Tag, TransformedOperation } from '@scalar/types/legacy';
2
- export type SidebarEntry = {
3
- id: string;
4
- title: string;
5
- displayTitle?: string;
6
- children?: SidebarEntry[];
7
- select?: () => void;
8
- httpVerb?: string;
9
- show: boolean;
10
- deprecated?: boolean;
11
- isGroup?: boolean;
12
- };
13
- export declare const DEFAULT_INTRODUCTION_SLUG = "introduction";
14
- /** Helper to overwrite the current OpenAPI document */
15
- declare function setParsedSpec(spec: Spec): Spec;
16
- type CollapsedSidebarItems = Record<string, boolean>;
17
- declare function toggleCollapsedSidebarItem(key: string): void;
18
- declare function setCollapsedSidebarItem(key: string, value: boolean): void;
19
- export type ParsedSpecOption = {
20
- parsedSpec: Spec;
21
- };
22
- export type SorterOption = {
23
- tagsSorter?: 'alpha' | ((a: Tag, b: Tag) => number);
24
- operationsSorter?: 'alpha' | 'method' | ((a: TransformedOperation, b: TransformedOperation) => number);
25
- };
26
- /**
27
- * Scroll to operation
28
- *
29
- * Similar to scrollToId BUT in the case of a section not being open,
30
- * it uses the lazyBus to ensure the section is open before scrolling to it
31
- *
32
- */
33
- export declare const scrollToOperation: (operationId: string, focus?: boolean) => void;
34
- /**
35
- * Provides the sidebar state and methods to control it.
36
- */
37
- export declare function useSidebar(options?: ParsedSpecOption & SorterOption): {
38
- breadcrumb: import("vue").ComputedRef<string>;
39
- items: import("vue").ComputedRef<{
40
- entries: SidebarEntry[];
41
- titles: Record<string, string>;
42
- }>;
43
- isSidebarOpen: import("vue").Ref<boolean, boolean>;
44
- collapsedSidebarItems: CollapsedSidebarItems;
45
- toggleCollapsedSidebarItem: typeof toggleCollapsedSidebarItem;
46
- setCollapsedSidebarItem: typeof setCollapsedSidebarItem;
47
- hideModels: import("vue").Ref<boolean, boolean>;
48
- setParsedSpec: typeof setParsedSpec;
49
- defaultOpenAllTags: import("vue").Ref<boolean, boolean>;
50
- scrollToOperation: (operationId: string, focus?: boolean) => void;
51
- };
52
- export {};
53
- //# sourceMappingURL=useSidebar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAI3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AAcvD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAkOD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACvG,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,UAAU,OAAO,SAiBrE,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCAtBrB,MAAM,UAAU,OAAO;EA8FrE"}