@scalar/api-reference 1.25.121 → 1.25.123

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 (148) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/blocks/constants.d.ts.map +1 -1
  3. package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
  4. package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
  5. package/dist/browser/standalone.js +21464 -20964
  6. package/dist/browser/webpack-stats.json +1 -1
  7. package/dist/components/Anchor/Anchor.vue.d.ts +0 -1
  8. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  9. package/dist/components/Anchor/Anchor.vue.js +2 -2
  10. package/dist/components/Anchor/Anchor.vue2.js +27 -23
  11. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  12. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  13. package/dist/components/ApiReferenceLayout.vue2.js +135 -128
  14. package/dist/components/Card/Card.vue.d.ts.map +1 -1
  15. package/dist/components/Card/Card.vue.js +7 -7
  16. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +1 -1
  17. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Content.vue.js +2 -2
  19. package/dist/components/Content/Content.vue2.js +33 -33
  20. package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Introduction/Description.vue.js +2 -2
  22. package/dist/components/Content/Introduction/Description.vue2.js +7 -7
  23. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  25. package/dist/components/Content/Introduction/Introduction.vue2.js +44 -39
  26. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Lazy/Loading.vue.js +65 -59
  28. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Models/Models.vue.js +2 -2
  30. package/dist/components/Content/Models/Models.vue2.js +66 -52
  31. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Models/ModelsAccordion.vue.js +1 -1
  33. package/dist/components/Content/Models/ModelsAccordion.vue2.js +37 -31
  34. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  35. package/dist/components/Content/Tag/Endpoints.vue.d.ts +1 -0
  36. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  38. package/dist/components/Content/Tag/Endpoints.vue2.js +79 -52
  39. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/Tag.vue.js +2 -2
  41. package/dist/components/Content/Tag/Tag.vue2.js +29 -26
  42. package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
  44. package/dist/components/Content/Tag/TagAccordion.vue2.js +22 -19
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  47. package/dist/components/GettingStarted.vue.js +2 -2
  48. package/dist/components/GettingStarted.vue2.js +25 -25
  49. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  50. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  51. package/dist/components/Layouts/ClassicLayout.vue.js +6 -6
  52. package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
  53. package/dist/components/Section/SectionContainer.vue.js +1 -1
  54. package/dist/components/Section/SectionHeader.vue.d.ts +1 -6
  55. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  56. package/dist/components/Section/SectionHeader.vue.js +1 -1
  57. package/dist/components/Section/SectionHeader.vue2.js +12 -16
  58. package/dist/components/Section/SectionHeaderTag.vue.d.ts +21 -0
  59. package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -0
  60. package/dist/components/Section/SectionHeaderTag.vue.js +7 -0
  61. package/dist/components/Section/SectionHeaderTag.vue2.js +18 -0
  62. package/dist/components/Section/index.d.ts +1 -0
  63. package/dist/components/Section/index.d.ts.map +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  65. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  66. package/dist/components/Sidebar/Sidebar.vue2.js +14 -14
  67. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  68. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  69. package/dist/esm.d.ts.map +1 -1
  70. package/dist/esm.js +1 -3
  71. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  72. package/dist/features/ApiClientModal/useApiClient.d.ts +414 -510
  73. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  74. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  75. package/dist/features/BaseUrl/BaseUrl.vue.js +20 -21
  76. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  77. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  78. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  79. package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
  80. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +47 -47
  81. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/Operation.vue.js +5 -5
  83. package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/Webhooks.vue.js +3 -3
  85. package/dist/features/Operation/Webhooks.vue2.js +74 -60
  86. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/ContentTypeSelect.vue.js +2 -2
  88. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  89. package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
  90. package/dist/features/Operation/components/ParameterHeaders.vue2.js +8 -8
  91. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  92. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  93. package/dist/features/Operation/components/ParameterListItem.vue2.js +16 -16
  94. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  96. package/dist/features/Operation/components/RequestBody.vue2.js +26 -47
  97. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  98. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  99. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  100. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +11 -11
  101. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  103. package/dist/features/Operation/layouts/ModernLayout.vue2.js +80 -69
  104. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  105. package/dist/features/Search/SearchButton.vue.js +1 -1
  106. package/dist/features/Search/SearchButton.vue2.js +30 -18
  107. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  108. package/dist/features/Search/SearchModal.vue.js +1 -1
  109. package/dist/features/Search/SearchModal.vue2.js +104 -95
  110. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  111. package/dist/features/Search/useSearchIndex.js +11 -17
  112. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
  113. package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
  114. package/dist/features/TestRequestButton/TestRequestButton.vue2.js +6 -6
  115. package/dist/helpers/createEmptySpecification.d.ts.map +1 -1
  116. package/dist/helpers/get-request.d.ts.map +1 -1
  117. package/dist/helpers/getModels.d.ts.map +1 -1
  118. package/dist/helpers/isMacOs.d.ts.map +1 -1
  119. package/dist/helpers/operation.d.ts.map +1 -1
  120. package/dist/helpers/parse.js +62 -62
  121. package/dist/helpers/specDownloads.d.ts.map +1 -1
  122. package/dist/helpers/specHelpers.d.ts.map +1 -1
  123. package/dist/helpers/waitFor.d.ts.map +1 -1
  124. package/dist/hooks/useConfig.d.ts.map +1 -1
  125. package/dist/hooks/useDeprecationWarnings.d.ts.map +1 -1
  126. package/dist/hooks/useDeprecationWarnings.js +1 -5
  127. package/dist/hooks/useNavState.d.ts +1 -2
  128. package/dist/hooks/useNavState.d.ts.map +1 -1
  129. package/dist/hooks/useNavState.js +3 -10
  130. package/dist/hooks/useReactiveSpec.d.ts +8 -8
  131. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  132. package/dist/hooks/useReactiveSpec.js +12 -13
  133. package/dist/hooks/useSidebar.d.ts.map +1 -1
  134. package/dist/hooks/useSidebar.js +38 -48
  135. package/dist/index.js +1 -1
  136. package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -1
  137. package/dist/legacy/helpers/normalizeRequestMethod.js +2 -6
  138. package/dist/legacy/types.d.ts.map +1 -1
  139. package/dist/standalone/lib/html-api.d.ts +11 -0
  140. package/dist/standalone/lib/html-api.d.ts.map +1 -0
  141. package/dist/standalone/lib/html-rendering.d.ts +51 -0
  142. package/dist/standalone/lib/html-rendering.d.ts.map +1 -0
  143. package/dist/standalone/lib/html-rendering.js +54 -0
  144. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  145. package/dist/style.css +1 -1
  146. package/dist/types.d.ts +0 -3
  147. package/dist/types.d.ts.map +1 -1
  148. package/package.json +15 -14
@@ -1,20 +1,21 @@
1
- import { defineComponent as c, openBlock as i, createBlock as l, unref as o, withCtx as t, createVNode as r, normalizeClass as p, createTextVNode as s, toDisplayString as m, createCommentVNode as O, createElementVNode as a } from "vue";
2
- import h from "../../../components/OperationPath.vue.js";
3
- import { getOperationStability as d, getOperationStabilityColor as v, isOperationDeprecated as S } from "../../../helpers/operation.js";
4
- import { ScalarMarkdown as C, ScalarErrorBoundary as f } from "@scalar/components";
5
- import _ from "../components/OperationParameters.vue.js";
6
- import y from "../components/OperationResponses.vue.js";
7
- import g from "../../../components/Section/Section.vue.js";
8
- import b from "../../../components/Section/SectionContent.vue.js";
9
- import k from "../../../components/Badge/Badge.vue.js";
10
- import B from "../../../components/Section/SectionHeader.vue.js";
11
- import E from "../../../components/Anchor/Anchor.vue.js";
12
- import N from "../../../components/Section/SectionColumns.vue.js";
13
- import u from "../../../components/Section/SectionColumn.vue.js";
14
- import V from "../../ExampleRequest/ExampleRequest.vue.js";
15
- import w from "../../TestRequestButton/TestRequestButton.vue.js";
16
- import R from "../../ExampleResponses/ExampleResponses.vue.js";
17
- const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__PURE__ */ c({
1
+ import { defineComponent as O, useId as h, openBlock as l, createBlock as p, unref as e, withCtx as a, createVNode as r, normalizeClass as s, createTextVNode as m, toDisplayString as d, createCommentVNode as S, createElementVNode as t } from "vue";
2
+ import { ScalarMarkdown as b, ScalarErrorBoundary as f } from "@scalar/components";
3
+ import v from "../../../components/OperationPath.vue.js";
4
+ import { getOperationStability as u, getOperationStabilityColor as y, isOperationDeprecated as _ } from "../../../helpers/operation.js";
5
+ import C from "../components/OperationParameters.vue.js";
6
+ import g from "../components/OperationResponses.vue.js";
7
+ import k from "../../../components/Section/Section.vue.js";
8
+ import B from "../../../components/Section/SectionContent.vue.js";
9
+ import E from "../../../components/Badge/Badge.vue.js";
10
+ import N from "../../../components/Section/SectionHeader.vue.js";
11
+ import V from "../../../components/Anchor/Anchor.vue.js";
12
+ import w from "../../../components/Section/SectionHeaderTag.vue.js";
13
+ import I from "../../../components/Section/SectionColumns.vue.js";
14
+ import c from "../../../components/Section/SectionColumn.vue.js";
15
+ import R from "../../ExampleRequest/ExampleRequest.vue.js";
16
+ import T from "../../TestRequestButton/TestRequestButton.vue.js";
17
+ import q from "../../ExampleResponses/ExampleResponses.vue.js";
18
+ const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__PURE__ */ O({
18
19
  __name: "ModernLayout",
19
20
  props: {
20
21
  id: {},
@@ -24,34 +25,44 @@ const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__P
24
25
  transformedOperation: {}
25
26
  },
26
27
  setup(M) {
27
- return (e, T) => (i(), l(o(g), {
28
- id: e.id,
29
- label: e.transformedOperation.name
28
+ const n = h();
29
+ return (o, $) => (l(), p(e(k), {
30
+ id: o.id,
31
+ "aria-labelledby": e(n),
32
+ label: o.transformedOperation.name
30
33
  }, {
31
- default: t(() => [
32
- r(o(b), null, {
33
- default: t(() => [
34
- o(d)(e.transformedOperation) ? (i(), l(o(k), {
34
+ default: a(() => [
35
+ r(e(B), null, {
36
+ default: a(() => [
37
+ e(u)(o.transformedOperation) ? (l(), p(e(E), {
35
38
  key: 0,
36
- class: p(o(v)(e.transformedOperation))
39
+ class: s(e(y)(o.transformedOperation))
37
40
  }, {
38
- default: t(() => [
39
- s(m(o(d)(e.transformedOperation)), 1)
41
+ default: a(() => [
42
+ m(d(e(u)(o.transformedOperation)), 1)
40
43
  ]),
41
44
  _: 1
42
- }, 8, ["class"])) : O("", !0),
43
- a("div", {
44
- class: p(
45
- o(S)(e.transformedOperation) ? "deprecated" : ""
45
+ }, 8, ["class"])) : S("", !0),
46
+ t("div", {
47
+ class: s(
48
+ e(_)(o.transformedOperation) ? "deprecated" : ""
46
49
  )
47
50
  }, [
48
- r(o(B), { level: 3 }, {
49
- default: t(() => [
50
- r(o(E), {
51
- id: e.id ?? ""
51
+ r(e(N), null, {
52
+ default: a(() => [
53
+ r(e(V), {
54
+ id: o.id ?? ""
52
55
  }, {
53
- default: t(() => [
54
- s(m(e.transformedOperation.name), 1)
56
+ default: a(() => [
57
+ r(e(w), {
58
+ id: e(n),
59
+ level: 3
60
+ }, {
61
+ default: a(() => [
62
+ m(d(o.transformedOperation.name), 1)
63
+ ]),
64
+ _: 1
65
+ }, 8, ["id"])
55
66
  ]),
56
67
  _: 1
57
68
  }, 8, ["id"])
@@ -59,55 +70,55 @@ const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__P
59
70
  _: 1
60
71
  })
61
72
  ], 2),
62
- r(o(N), null, {
63
- default: t(() => [
64
- r(o(u), null, {
65
- default: t(() => [
66
- a("div", q, [
67
- r(o(C), {
68
- value: e.operation.description,
73
+ r(e(I), null, {
74
+ default: a(() => [
75
+ r(e(c), null, {
76
+ default: a(() => [
77
+ t("div", D, [
78
+ r(e(b), {
79
+ value: o.operation.description,
69
80
  withImages: ""
70
81
  }, null, 8, ["value"]),
71
- r(_, { operation: e.operation }, null, 8, ["operation"]),
72
- r(y, { operation: e.transformedOperation }, null, 8, ["operation"])
82
+ r(C, { operation: o.operation }, null, 8, ["operation"]),
83
+ r(g, { operation: o.transformedOperation }, null, 8, ["operation"])
73
84
  ])
74
85
  ]),
75
86
  _: 1
76
87
  }),
77
- r(o(u), null, {
78
- default: t(() => [
79
- a("div", D, [
80
- r(o(f), null, {
81
- default: t(() => [
82
- r(o(V), {
83
- collection: e.collection,
88
+ r(e(c), null, {
89
+ default: a(() => [
90
+ t("div", H, [
91
+ r(e(f), null, {
92
+ default: a(() => [
93
+ r(e(R), {
94
+ collection: o.collection,
84
95
  fallback: "",
85
- operation: e.operation,
86
- server: e.server,
87
- transformedOperation: e.transformedOperation
96
+ operation: o.operation,
97
+ server: o.server,
98
+ transformedOperation: o.transformedOperation
88
99
  }, {
89
- header: t(() => {
90
- var n;
100
+ header: a(() => {
101
+ var i;
91
102
  return [
92
- r(h, {
103
+ r(v, {
93
104
  class: "example-path",
94
- deprecated: (n = e.transformedOperation.information) == null ? void 0 : n.deprecated,
95
- path: e.transformedOperation.path
105
+ deprecated: (i = o.transformedOperation.information) == null ? void 0 : i.deprecated,
106
+ path: o.transformedOperation.path
96
107
  }, null, 8, ["deprecated", "path"])
97
108
  ];
98
109
  }),
99
- footer: t(() => [
100
- r(o(w), { operation: e.operation }, null, 8, ["operation"])
110
+ footer: a(() => [
111
+ r(e(T), { operation: o.operation }, null, 8, ["operation"])
101
112
  ]),
102
113
  _: 1
103
114
  }, 8, ["collection", "operation", "server", "transformedOperation"])
104
115
  ]),
105
116
  _: 1
106
117
  }),
107
- r(o(f), null, {
108
- default: t(() => [
109
- r(o(R), {
110
- responses: e.operation.responses,
118
+ r(e(f), null, {
119
+ default: a(() => [
120
+ r(e(q), {
121
+ responses: o.operation.responses,
111
122
  style: { "margin-top": "12px" }
112
123
  }, null, 8, ["responses"])
113
124
  ]),
@@ -125,9 +136,9 @@ const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__P
125
136
  })
126
137
  ]),
127
138
  _: 1
128
- }, 8, ["id", "label"]));
139
+ }, 8, ["id", "aria-labelledby", "label"]));
129
140
  }
130
141
  });
131
142
  export {
132
- Y as default
143
+ oe as default
133
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchButton.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAShD,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;kBADe,MAAM;;AA0HzB,wBAOG"}
1
+ {"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchButton.vue"],"names":[],"mappings":"AAkIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAShD,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;kBADe,MAAM;;AAgIzB,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SearchButton.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9f0bd6b4"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-16490ca3"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,42 +1,54 @@
1
- import { defineComponent as u, onMounted as h, onBeforeUnmount as y, openBlock as f, createElementBlock as S, Fragment as k, createElementVNode as o, normalizeClass as b, unref as a, createVNode as r, toDisplayString as l } from "vue";
2
- import { useModal as w, ScalarIcon as K } from "@scalar/components";
3
- import v from "./SearchModal.vue.js";
1
+ import { defineComponent as S, onMounted as f, onBeforeUnmount as k, openBlock as r, createElementBlock as n, Fragment as l, createElementVNode as o, normalizeClass as b, unref as a, createVNode as d, createTextVNode as p, toDisplayString as w } from "vue";
2
+ import { useModal as K, ScalarIcon as v } from "@scalar/components";
3
+ import C from "./SearchModal.vue.js";
4
4
  import { isMacOs as c } from "../../helpers/isMacOs.js";
5
5
  import { useApiClient as B } from "../ApiClientModal/useApiClient.js";
6
- const C = { class: "sidebar-search-input" }, E = { class: "sidebar-search-shortcut" }, H = { class: "sidebar-search-key" }, N = /* @__PURE__ */ u({
6
+ const E = { class: "sidebar-search-input" }, H = { class: "sidebar-search-shortcut" }, M = { class: "sidebar-search-key" }, D = /* @__PURE__ */ S({
7
7
  __name: "SearchButton",
8
8
  props: {
9
9
  spec: {},
10
10
  searchHotKey: { default: "k" }
11
11
  },
12
- setup(i) {
13
- const d = i, t = w(), { client: p } = B(), n = (s) => {
12
+ setup(m) {
13
+ const u = m, t = K(), { client: h } = B(), i = (s) => {
14
14
  var e;
15
- (c() ? s.metaKey : s.ctrlKey) && s.key === d.searchHotKey && !((e = p.value) != null && e.modalState.open) && (s.preventDefault(), s.stopPropagation(), t.open ? t.hide() : t.show());
15
+ (c() ? s.metaKey : s.ctrlKey) && s.key === u.searchHotKey && !((e = h.value) != null && e.modalState.open) && (s.preventDefault(), s.stopPropagation(), t.open ? t.hide() : t.show());
16
16
  };
17
- return h(() => window.addEventListener("keydown", n)), y(() => window.removeEventListener("keydown", n)), (s, e) => (f(), S(k, null, [
17
+ return f(() => window.addEventListener("keydown", i)), k(() => window.removeEventListener("keydown", i)), (s, e) => (r(), n(l, null, [
18
18
  o("button", {
19
19
  class: b(["sidebar-search", s.$attrs.class]),
20
+ role: "search",
20
21
  type: "button",
21
22
  onClick: e[0] || (e[0] = //@ts-ignore
22
- (...m) => a(t).show && a(t).show(...m))
23
+ (...y) => a(t).show && a(t).show(...y))
23
24
  }, [
24
- r(a(K), {
25
+ d(a(v), {
25
26
  class: "scalar-search-icon",
26
27
  icon: "Search",
27
28
  size: "sm",
28
29
  thickness: "2.5"
29
30
  }),
30
- o("div", C, [
31
- e[2] || (e[2] = o("span", { class: "sr-only" }, "Open ", -1)),
32
- e[3] || (e[3] = o("span", { class: "sidebar-search-placeholder" }, "Search", -1)),
33
- o("span", E, [
34
- e[1] || (e[1] = o("span", { class: "sr-only" }, "(Keyboard Shortcut)", -1)),
35
- o("kbd", H, l(a(c)() ? "⌘" : "⌃") + l(s.searchHotKey), 1)
31
+ o("div", E, [
32
+ e[4] || (e[4] = o("span", { class: "sr-only" }, "Open Search", -1)),
33
+ e[5] || (e[5] = o("span", {
34
+ "aria-hidden": "true",
35
+ class: "sidebar-search-placeholder"
36
+ }, " Search ", -1)),
37
+ o("span", H, [
38
+ e[3] || (e[3] = o("span", { class: "sr-only" }, "Keyboard Shortcut:", -1)),
39
+ o("kbd", M, [
40
+ a(c)() ? (r(), n(l, { key: 0 }, [
41
+ p("⌘")
42
+ ], 64)) : (r(), n(l, { key: 1 }, [
43
+ e[1] || (e[1] = o("span", { class: "sr-only" }, "CTRL", -1)),
44
+ e[2] || (e[2] = o("span", { "aria-hidden": "true" }, "⌃", -1))
45
+ ], 64)),
46
+ p(" " + w(s.searchHotKey), 1)
47
+ ])
36
48
  ])
37
49
  ])
38
50
  ], 2),
39
- r(v, {
51
+ d(C, {
40
52
  modalState: a(t),
41
53
  parsedSpec: s.spec
42
54
  }, null, 8, ["modalState", "parsedSpec"])
@@ -44,5 +56,5 @@ const C = { class: "sidebar-search-input" }, E = { class: "sidebar-search-shortc
44
56
  }
45
57
  });
46
58
  export {
47
- N as default
59
+ D as default
48
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchModal.vue"],"names":[],"mappings":"AAyQA,OAAO,EAEL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAahD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AAgYF,wBAOG"}
1
+ {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchModal.vue"],"names":[],"mappings":"AAmSA,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAahD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AAiZF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SearchModal.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-829b4762"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-730097d1"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,171 +1,175 @@
1
- import { defineComponent as O, toRef as W, ref as Y, watch as x, computed as A, openBlock as h, createBlock as B, unref as s, withKeys as R, withModifiers as b, withCtx as i, createElementVNode as r, createVNode as I, isRef as j, createTextVNode as c, toDisplayString as m, createElementBlock as $, Fragment as N, renderList as G, createSlots as J, normalizeClass as Q, createCommentVNode as X } from "vue";
2
- import { ScalarModal as Z, ScalarSearchInput as _, ScalarSearchResultList as ee, ScalarSearchResultItem as te } from "@scalar/components";
3
- import { nanoid as oe } from "nanoid";
1
+ import { defineComponent as Y, toRef as A, ref as W, watch as y, computed as _, openBlock as f, createBlock as B, unref as n, withCtx as i, createElementVNode as a, createVNode as g, isRef as j, withKeys as v, withModifiers as b, createTextVNode as d, toDisplayString as u, createElementBlock as N, Fragment as x, renderList as G, createSlots as J, normalizeClass as Q, createCommentVNode as X } from "vue";
2
+ import { ScalarModal as Z, ScalarSearchInput as ee, ScalarSearchResultList as te, ScalarSearchResultItem as oe } from "@scalar/components";
3
+ import { nanoid as se } from "nanoid";
4
4
  import { lazyBus as ae } from "../../components/Content/Lazy/lazyBus.js";
5
- import se from "../../components/Sidebar/SidebarHttpBadge.vue.js";
5
+ import ne from "../../components/Sidebar/SidebarHttpBadge.vue.js";
6
6
  import { useSearchIndex as re } from "./useSearchIndex.js";
7
- import { useSidebar as ne } from "../../hooks/useSidebar.js";
7
+ import { useSidebar as le } from "../../hooks/useSidebar.js";
8
8
  import { scrollToId as E } from "../../helpers/scrollToId.js";
9
- const ie = { class: "sr-only" }, le = { class: "sr-only" }, ve = /* @__PURE__ */ O({
9
+ const ie = { class: "sr-only" }, ce = { class: "sr-only" }, ve = /* @__PURE__ */ Y({
10
10
  __name: "SearchModal",
11
11
  props: {
12
12
  parsedSpec: {},
13
13
  modalState: {}
14
14
  },
15
- setup(y) {
16
- const p = y, F = W(p, "parsedSpec"), S = oe(), k = `${S}-search-result`, v = `${S}-search-instructions`, g = (o) => `${S}${o}`, {
17
- resetSearch: q,
18
- fuseSearch: D,
19
- selectedSearchResult: n,
20
- searchResultsWithPlaceholderResults: l,
21
- searchText: u
15
+ setup(L) {
16
+ const m = L, F = A(m, "parsedSpec"), S = se(), R = `${S}-search-result`, w = `${S}-search-instructions`, I = (o) => `${S}${o}`, {
17
+ resetSearch: P,
18
+ fuseSearch: q,
19
+ selectedSearchResult: l,
20
+ searchResultsWithPlaceholderResults: c,
21
+ searchText: p
22
22
  } = re({
23
23
  specification: F
24
- }), L = {
24
+ }), D = {
25
25
  heading: "DocsPage",
26
26
  model: "Brackets",
27
27
  req: "Terminal",
28
28
  tag: "CodeFolder",
29
29
  webhook: "Terminal"
30
- }, M = {
30
+ }, $ = {
31
31
  heading: "Document Heading",
32
- model: "",
33
- // The title of the entry is already :"Model"
34
32
  req: "Request",
35
33
  tag: "Tag",
36
- webhook: "Webhook"
37
- }, P = Y(null);
38
- x(
39
- () => p.modalState.open,
34
+ model: "",
35
+ // The title of the entry is already "Model"
36
+ webhook: ""
37
+ // The title of the entry is already "Webhook"
38
+ }, M = W(null);
39
+ y(
40
+ () => m.modalState.open,
40
41
  (o) => {
41
- o && q();
42
+ o && P();
42
43
  }
43
44
  );
44
- const { setCollapsedSidebarItem: H } = ne(), U = /#(tag\/[^/]*)/;
45
- function w(o) {
45
+ const { setCollapsedSidebarItem: H } = le(), U = /#(tag\/[^/]*)/;
46
+ function k(o) {
46
47
  let t = "models";
47
48
  const e = o.item.href.match(U);
48
49
  e != null && e.length && e.length > 1 && (t = e[1]), H(t, !0);
49
- const a = o.item.href.replace("#", "");
50
- if (document.getElementById(a))
51
- E(a), p.modalState.hide();
50
+ const s = o.item.href.replace("#", "");
51
+ if (document.getElementById(s))
52
+ E(s), m.modalState.hide();
52
53
  else {
53
- const d = ae.on((f) => {
54
- f.id === a && (E(a), d(), p.modalState.hide());
54
+ const r = ae.on((h) => {
55
+ h.id === s && (E(s), r(), m.modalState.hide());
55
56
  });
56
57
  }
57
58
  }
58
- x(n, (o) => {
59
- var a;
60
- const t = l.value[o], e = g(t == null ? void 0 : t.item.href);
61
- (a = document.getElementById(e)) == null || a.scrollIntoView({
59
+ y(l, (o) => {
60
+ var s;
61
+ const t = c.value[o], e = I(t == null ? void 0 : t.item.href);
62
+ (s = document.getElementById(e)) == null || s.scrollIntoView({
62
63
  behavior: "smooth",
63
64
  block: "nearest"
64
65
  });
65
66
  });
66
- const z = A(() => {
67
- const o = n.value, t = l.value[o];
68
- return g(t == null ? void 0 : t.item.href);
69
- }), V = (o) => {
70
- const t = o === "up" ? -1 : 1, e = l.value.length, a = (n.value + t + e) % e;
71
- n.value = a;
67
+ const K = _(() => {
68
+ const o = c.value;
69
+ if (!o.length) return "No results found";
70
+ const t = o[l.value].item, e = p.value.length ? `${o.length} result${o.length === 1 ? "" : "s"} found, ` : "", s = t.type === "tag" ? "" : t.type === "req" ? `, HTTP Method ${t.httpVerb}, Path ${t.path}` : `, ${t.description}`, r = `${$[t.type]} ${t.title} ${s}`;
71
+ return `${e}Selected: ${r}`;
72
+ }), T = (o) => {
73
+ const t = o === "up" ? -1 : 1, e = c.value.length, s = (l.value + t + e) % e;
74
+ l.value = s;
72
75
  };
73
- function K(o) {
76
+ function z(o) {
74
77
  const t = new URL(window.location.href);
75
78
  return t.hash = o, t.toString();
76
79
  }
77
- return (o, t) => (h(), B(s(Z), {
80
+ function O() {
81
+ const o = c.value;
82
+ k(o[l.value]);
83
+ }
84
+ return (o, t) => (f(), B(n(Z), {
78
85
  state: o.modalState,
79
- variant: "search",
80
- onKeydown: [
81
- t[1] || (t[1] = R(b((e) => V("down"), ["stop", "prevent"]), ["down"])),
82
- t[2] || (t[2] = R(b((e) => w(
83
- s(l)[s(n)]
84
- ), ["stop", "prevent"]), ["enter"])),
85
- t[3] || (t[3] = R(b((e) => V("up"), ["stop", "prevent"]), ["up"]))
86
- ]
86
+ variant: "search"
87
87
  }, {
88
88
  default: i(() => [
89
- r("div", {
89
+ a("div", {
90
90
  ref_key: "searchModalRef",
91
- ref: P,
91
+ ref: M,
92
92
  "aria-label": "Reference Search",
93
93
  class: "ref-search-container",
94
94
  role: "search"
95
95
  }, [
96
- I(s(_), {
97
- modelValue: s(u),
98
- "onUpdate:modelValue": t[0] || (t[0] = (e) => j(u) ? u.value = e : null),
99
- "aria-activedescendant": z.value,
100
- "aria-controls": k,
101
- "aria-describedby": v,
102
- onInput: s(D)
103
- }, null, 8, ["modelValue", "aria-activedescendant", "onInput"])
96
+ g(n(ee), {
97
+ modelValue: n(p),
98
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => j(p) ? p.value = e : null),
99
+ "aria-controls": R,
100
+ "aria-describedby": w,
101
+ label: K.value,
102
+ onInput: n(q),
103
+ onKeydown: [
104
+ t[1] || (t[1] = v(b((e) => T("down"), ["stop", "prevent"]), ["down"])),
105
+ v(b(O, ["stop", "prevent"]), ["enter"]),
106
+ t[2] || (t[2] = v(b((e) => T("up"), ["stop", "prevent"]), ["up"]))
107
+ ]
108
+ }, null, 8, ["modelValue", "label", "onInput", "onKeydown"])
104
109
  ], 512),
105
- I(s(ee), {
106
- id: k,
107
- "aria-describedby": v,
110
+ g(n(te), {
111
+ id: R,
108
112
  "aria-label": "Reference Search Results",
109
113
  class: "ref-search-results custom-scroll",
110
- noResults: !s(l).length
114
+ noResults: !n(c).length
111
115
  }, {
112
116
  query: i(() => [
113
- c(m(s(u)), 1)
117
+ d(u(n(p)), 1)
114
118
  ]),
115
119
  default: i(() => [
116
- (h(!0), $(N, null, G(s(l), (e, a) => (h(), B(s(te), {
117
- id: g(e.item.href),
120
+ (f(!0), N(x, null, G(n(c), (e, s) => (f(), B(n(oe), {
121
+ id: I(e.item.href),
118
122
  key: e.refIndex,
119
- active: s(n) === a,
120
- href: K(e.item.href),
121
- icon: L[e.item.type],
122
- onClick: (d) => w(e),
123
- onFocus: (d) => n.value = a
123
+ active: n(l) === s,
124
+ href: z(e.item.href),
125
+ icon: D[e.item.type],
126
+ onClick: (r) => k(e),
127
+ onFocus: (r) => l.value = s
124
128
  }, J({
125
129
  default: i(() => {
126
- var d, f, C, T;
130
+ var r, h, V, C;
127
131
  return [
128
- r("span", {
132
+ a("span", {
129
133
  class: Q({
130
- deprecated: (f = (d = e.item.operation) == null ? void 0 : d.information) == null ? void 0 : f.deprecated
134
+ deprecated: (h = (r = e.item.operation) == null ? void 0 : r.information) == null ? void 0 : h.deprecated
131
135
  })
132
136
  }, [
133
- r("span", ie, [
134
- c(m(M[e.item.type]) + ":  ", 1),
135
- (T = (C = e.item.operation) == null ? void 0 : C.information) != null && T.deprecated ? (h(), $(N, { key: 0 }, [
136
- c(" (Deprecated)  ")
137
+ a("span", ie, [
138
+ d(u($[e.item.type]) + ":  ", 1),
139
+ (C = (V = e.item.operation) == null ? void 0 : V.information) != null && C.deprecated ? (f(), N(x, { key: 0 }, [
140
+ d(" (Deprecated)  ")
137
141
  ], 64)) : X("", !0)
138
142
  ]),
139
- c(" " + m(e.item.title) + " ", 1),
140
- t[4] || (t[4] = r("span", { class: "sr-only" }, ",", -1))
143
+ d(" " + u(e.item.title) + " ", 1),
144
+ t[3] || (t[3] = a("span", { class: "sr-only" }, ",", -1))
141
145
  ], 2)
142
146
  ];
143
147
  }),
144
148
  _: 2
145
149
  }, [
146
- (e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
150
+ e.item.type !== "webhook" && (e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
147
151
  name: "description",
148
152
  fn: i(() => [
149
- t[5] || (t[5] = r("span", { class: "sr-only" }, "Path: ", -1)),
150
- c(" " + m(e.item.path), 1)
153
+ t[4] || (t[4] = a("span", { class: "sr-only" }, "Path: ", -1)),
154
+ d(" " + u(e.item.path), 1)
151
155
  ]),
152
156
  key: "0"
153
157
  } : e.item.description ? {
154
158
  name: "description",
155
159
  fn: i(() => [
156
- t[6] || (t[6] = r("span", { class: "sr-only" }, "Description: ", -1)),
157
- c(" " + m(e.item.description), 1)
160
+ t[5] || (t[5] = a("span", { class: "sr-only" }, "Description: ", -1)),
161
+ d(" " + u(e.item.description), 1)
158
162
  ]),
159
163
  key: "1"
160
164
  } : void 0,
161
165
  e.item.type === "req" ? {
162
166
  name: "addon",
163
167
  fn: i(() => [
164
- I(se, {
168
+ g(ne, {
165
169
  "aria-hidden": "true",
166
170
  method: e.item.httpVerb ?? "get"
167
171
  }, null, 8, ["method"]),
168
- r("span", le, " HTTP Method: " + m(e.item.httpVerb ?? "get") + ", ", 1)
172
+ a("span", ce, " HTTP Method: " + u(e.item.httpVerb ?? "get") + ", ", 1)
169
173
  ]),
170
174
  key: "2"
171
175
  } : void 0
@@ -173,14 +177,19 @@ const ie = { class: "sr-only" }, le = { class: "sr-only" }, ve = /* @__PURE__ */
173
177
  ]),
174
178
  _: 1
175
179
  }, 8, ["noResults"]),
176
- t[7] || (t[7] = r("div", { class: "ref-search-meta" }, [
177
- r("span", null, "↑↓ Navigate"),
178
- r("span", null, "⏎ Select")
179
- ], -1)),
180
- r("div", {
181
- id: v,
182
- class: "sr-only"
183
- }, " Press up arrow / down arrow to navigate, enter to select, type to filter results ")
180
+ a("div", {
181
+ id: w,
182
+ class: "ref-search-meta"
183
+ }, t[6] || (t[6] = [
184
+ a("span", {
185
+ "aria-hidden": "true",
186
+ class: "contents"
187
+ }, [
188
+ a("span", null, "↑↓ Navigate"),
189
+ a("span", null, "⏎ Select")
190
+ ], -1),
191
+ a("span", { class: "sr-only" }, " Press up arrow / down arrow to navigate, enter to select, type to filter results ", -1)
192
+ ]))
184
193
  ]),
185
194
  _: 1
186
195
  }, 8, ["state"]));
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,OAAO,EACL,KAAK,QAAQ,EAId,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA4ByB,IAAI;sBAbL,IAAI;;;;EA4K5B"}
1
+ {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,aAAa,CAAA;AAElF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA2ByB,IAAI;sBAbL,IAAI;;;;EAmK5B"}