@scalar/api-reference 1.30.0 → 1.31.0

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 (141) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/browser/standalone.js +6352 -6334
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +164 -181
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +1 -1
  12. package/dist/components/Content/Content.vue2.js +5 -5
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
  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 +57 -63
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +46 -46
  19. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  20. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Models/Models.vue.js +2 -2
  22. package/dist/components/Content/Models/Models.vue2.js +7 -6
  23. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
  24. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  26. package/dist/components/Content/Schema/Schema.preview.d.ts +98 -56
  27. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.d.ts +6 -3
  29. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  31. package/dist/components/Content/Schema/Schema.vue2.js +127 -118
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
  35. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  36. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  37. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  38. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  39. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -2
  40. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  41. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  42. package/dist/components/Content/Schema/SchemaProperty.vue2.js +40 -38
  43. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
  44. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  45. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  46. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +152 -152
  47. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
  48. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  49. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
  50. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  51. package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
  52. package/dist/components/Layouts/ClassicLayout.vue.js +10 -8
  53. package/dist/components/Layouts/Layouts.vue.js +11 -9
  54. package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
  55. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  56. package/dist/components/Section/SectionHeader.vue.js +2 -2
  57. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  58. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  59. package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
  60. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  61. package/dist/components/SingleApiReference.vue.js +27 -33
  62. package/dist/esm.d.ts.map +1 -1
  63. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
  64. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  65. package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
  66. package/dist/features/ApiClientModal/useApiClient.d.ts +196 -196
  67. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  68. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
  69. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
  70. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
  71. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
  72. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
  73. package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
  74. package/dist/features/DocumentSource/index.d.ts +2 -0
  75. package/dist/features/DocumentSource/index.d.ts.map +1 -0
  76. package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
  77. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  78. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  79. package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
  80. package/dist/features/DownloadLink/index.d.ts +1 -0
  81. package/dist/features/DownloadLink/index.d.ts.map +1 -1
  82. package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
  83. package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
  84. package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
  85. package/dist/features/Operation/Operation.vue.d.ts +2 -2
  86. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
  88. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  89. package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
  90. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  91. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
  92. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
  94. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
  95. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  96. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  97. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -2
  98. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  99. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  100. package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
  101. package/dist/features/Operation/components/RequestBody.vue.d.ts +2 -2
  102. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  103. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +2 -2
  105. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  106. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  107. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +55 -55
  108. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  109. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  110. package/dist/features/Operation/layouts/ModernLayout.vue2.js +35 -32
  111. package/dist/features/Operation/types/schemas.d.ts +2 -2
  112. package/dist/features/Operation/types/schemas.d.ts.map +1 -1
  113. package/dist/features/Search/SearchButton.vue.js +2 -2
  114. package/dist/helpers/local-storage.d.ts +8 -0
  115. package/dist/helpers/local-storage.d.ts.map +1 -0
  116. package/dist/helpers/local-storage.js +6 -0
  117. package/dist/helpers/measure.d.ts +21 -0
  118. package/dist/helpers/measure.d.ts.map +1 -0
  119. package/dist/helpers/measure.js +7 -0
  120. package/dist/helpers/parse.d.ts +3 -5
  121. package/dist/helpers/parse.d.ts.map +1 -1
  122. package/dist/helpers/parse.js +64 -86
  123. package/dist/helpers/scroll-to-id.d.ts.map +1 -1
  124. package/dist/helpers/scroll-to-id.js +18 -4
  125. package/dist/index.d.ts +0 -1
  126. package/dist/index.d.ts.map +1 -1
  127. package/dist/index.js +33 -35
  128. package/dist/libs/openapi.d.ts +3 -3
  129. package/dist/libs/openapi.d.ts.map +1 -1
  130. package/dist/libs/openapi.js +35 -42
  131. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  132. package/dist/standalone/lib/html-api.js +15 -15
  133. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  134. package/dist/stores/useHttpClientStore.js +19 -18
  135. package/dist/style.css +1 -1
  136. package/dist/types.d.ts +27 -3
  137. package/dist/types.d.ts.map +1 -1
  138. package/package.json +13 -14
  139. package/dist/hooks/useReactiveSpec.d.ts +0 -448
  140. package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
  141. package/dist/hooks/useReactiveSpec.js +0 -59
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, useSlots as w, watch as f, computed as $, createBlock as u, openBlock as t, normalizeClass as D, createSlots as M, withCtx as a, createVNode as m, unref as i, createCommentVNode as d, createElementBlock as p, renderSlot as c, normalizeProps as g, guardReactiveProps as S, isRef as V, renderList as K } from "vue";
1
+ import { defineComponent as B, useSlots as D, watch as m, computed as w, createBlock as u, openBlock as t, normalizeClass as $, createSlots as M, withCtx as n, createVNode as f, unref as i, createCommentVNode as d, createElementBlock as p, renderSlot as c, normalizeProps as g, guardReactiveProps as S, isRef as V, renderList as K } from "vue";
2
2
  import { OpenApiClientButton as H } from "@scalar/api-client/components";
3
3
  import { ScalarSidebarFooter as L, ScalarColorModeToggleButton as N } from "@scalar/components";
4
4
  import { getObjectKeys as O } from "@scalar/oas-utils/helpers";
@@ -15,25 +15,27 @@ const E = { key: 0 }, F = {
15
15
  __name: "ModernLayout",
16
16
  props: {
17
17
  configuration: {},
18
+ dereferencedDocument: {},
19
+ originalDocument: {},
20
+ isDark: { type: Boolean },
18
21
  parsedSpec: {},
19
- rawSpec: {},
20
- isDark: { type: Boolean }
22
+ rawSpec: {}
21
23
  },
22
24
  emits: ["toggleDarkMode", "updateContent"],
23
25
  setup(k) {
24
- const s = k, h = w(), { mediaQueries: b } = R(), { isSidebarOpen: n } = T(), v = !1;
25
- f(b.lg, (e, o) => {
26
- o && !e && (n.value = !1);
26
+ const s = k, h = D(), { mediaQueries: b } = R(), { isSidebarOpen: a } = T(), v = !1;
27
+ m(b.lg, (e, o) => {
28
+ o && !e && (a.value = !1);
27
29
  });
28
30
  const { hash: y } = A();
29
- f(y, (e, o) => {
30
- e && e !== o && (n.value = !1);
31
+ m(y, (e, o) => {
32
+ e && e !== o && (a.value = !1);
31
33
  });
32
- const C = $(
34
+ const C = w(
33
35
  () => O(h).filter((e) => e !== "sidebar-start")
34
36
  );
35
37
  return (e, o) => (t(), u(U, {
36
- class: D({
38
+ class: $({
37
39
  "scalar-api-references-standalone-mobile": e.configuration.showSidebar ?? !0
38
40
  }),
39
41
  configuration: e.configuration,
@@ -41,21 +43,21 @@ const E = { key: 0 }, F = {
41
43
  rawSpec: e.rawSpec,
42
44
  onUpdateContent: o[2] || (o[2] = (r) => e.$emit("updateContent", r))
43
45
  }, M({
44
- header: a(() => [
46
+ header: n(() => [
45
47
  e.configuration.showSidebar ?? !0 ? (t(), u(z, {
46
48
  key: 0,
47
- open: i(n),
48
- "onUpdate:open": o[0] || (o[0] = (r) => V(n) ? n.value = r : null)
49
+ open: i(a),
50
+ "onUpdate:open": o[0] || (o[0] = (r) => V(a) ? a.value = r : null)
49
51
  }, null, 8, ["open"])) : d("", !0)
50
52
  ]),
51
- "sidebar-start": a((r) => {
53
+ "sidebar-start": n((r) => {
52
54
  var l;
53
55
  return [
54
56
  e.$slots["document-selector"] ? (t(), p("div", E, [
55
57
  c(e.$slots, "document-selector", {}, void 0, !0)
56
58
  ])) : d("", !0),
57
59
  s.configuration.hideSearch ? d("", !0) : (t(), p("div", F, [
58
- m(i(j), {
60
+ f(i(j), {
59
61
  searchHotKey: (l = s.configuration) == null ? void 0 : l.searchHotKey,
60
62
  spec: r.spec
61
63
  }, null, 8, ["searchHotKey", "spec"])
@@ -63,16 +65,16 @@ const E = { key: 0 }, F = {
63
65
  c(e.$slots, "sidebar-start", g(S(r)), void 0, !0)
64
66
  ];
65
67
  }),
66
- "sidebar-end": a(() => [
67
- m(i(L), { class: "darklight-reference" }, {
68
- toggle: a(() => [
68
+ "sidebar-end": n(() => [
69
+ f(i(L), { class: "darklight-reference" }, {
70
+ toggle: n(() => [
69
71
  s.configuration.hideDarkModeToggle ? (t(), p("span", P)) : (t(), u(i(N), {
70
72
  key: 0,
71
73
  modelValue: e.isDark,
72
74
  "onUpdate:modelValue": o[1] || (o[1] = (r) => e.$emit("toggleDarkMode"))
73
75
  }, null, 8, ["modelValue"]))
74
76
  ]),
75
- default: a(() => [
77
+ default: n(() => [
76
78
  s.configuration.hideClientButton ? d("", !0) : (t(), u(i(H), {
77
79
  key: 0,
78
80
  buttonSource: "sidebar",
@@ -88,7 +90,7 @@ const E = { key: 0 }, F = {
88
90
  }, [
89
91
  K(C.value, (r) => ({
90
92
  name: r,
91
- fn: a((l) => [
93
+ fn: n((l) => [
92
94
  c(e.$slots, r, g(S(l || {})), void 0, !0)
93
95
  ])
94
96
  }))
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionHeader.vue"],"names":[],"mappings":"AA0DA,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAQF,iBAAS,cAAc;WAyDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,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":"SectionHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionHeader.vue"],"names":[],"mappings":"AA4DA,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAQF,iBAAS,cAAc;WAyDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,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 "./SectionHeader.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-b460b827"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f8e38d9f"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AAyQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAOhD,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIlE,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,IAAI,CAAA;CACjB,GAAG,YAAY,CAAC;AAoGnB,iBAAS,cAAc;WA4NT,OAAO,IAA6B;;iCAVb,GAAG;+BACJ,GAAG;;;;;;EActC;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,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":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AA0RA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAOhD,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIlE,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,IAAI,CAAA;CACjB,GAAG,YAAY,CAAC;AAqHnB,iBAAS,cAAc;WA4NT,OAAO,IAA6B;;iCAVb,GAAG;+BACJ,GAAG;;;;;;EActC;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,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 "./Sidebar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e603f439"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-15908ea4"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,73 +1,73 @@
1
- import { defineComponent as F, ref as E, watch as I, onMounted as N, onUnmounted as L, createElementBlock as d, openBlock as r, renderSlot as w, createElementVNode as V, createVNode as G, withCtx as v, Fragment as o, renderList as y, unref as n, toDisplayString as M, createBlock as f, createCommentVNode as h } from "vue";
2
- import m from "./SidebarElement.vue.js";
3
- import g from "./SidebarGroup.vue.js";
1
+ import { defineComponent as F, ref as w, watch as N, onMounted as L, onUnmounted as G, createElementBlock as n, openBlock as s, renderSlot as V, createElementVNode as A, createVNode as M, withCtx as v, Fragment as d, renderList as m, unref as u, toDisplayString as D, createBlock as f, createCommentVNode as h } from "vue";
2
+ import S from "./SidebarElement.vue.js";
3
+ import T from "./SidebarGroup.vue.js";
4
4
  import { sleep as C } from "../../helpers/sleep.js";
5
- import { useNavState as D } from "../../hooks/useNavState.js";
6
- import { useSidebar as H } from "../../hooks/useSidebar.js";
7
- const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-title" }, q = -160, W = /* @__PURE__ */ F({
5
+ import { useNavState as H } from "../../hooks/useNavState.js";
6
+ import { useSidebar as R } from "../../hooks/useSidebar.js";
7
+ const U = { class: "sidebar" }, j = ["aria-label"], q = { class: "sidebar-group-title" }, x = -160, X = /* @__PURE__ */ F({
8
8
  __name: "Sidebar",
9
9
  props: {
10
10
  parsedSpec: {},
11
11
  tagsSorter: { type: [String, Function] },
12
12
  operationsSorter: { type: [String, Function] }
13
13
  },
14
- setup(A) {
15
- const S = A, { hash: c, isIntersectionEnabled: $ } = D(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: _ } = H(
14
+ setup($) {
15
+ const g = $, { hash: p, isIntersectionEnabled: I } = H(), { items: O, toggleCollapsedSidebarItem: _, collapsedSidebarItems: k } = R(
16
16
  {
17
- parsedSpec: S.parsedSpec,
18
- tagsSorter: S.tagsSorter,
19
- operationsSorter: S.operationsSorter
17
+ parsedSpec: g.parsedSpec,
18
+ tagsSorter: g.tagsSorter,
19
+ operationsSorter: g.operationsSorter
20
20
  }
21
- ), b = E(null), p = E(!0);
22
- I(c, (s) => {
23
- !$.value || p.value || typeof window > "u" || k(s);
21
+ ), b = w(null), o = w(!0);
22
+ N(p, (r) => {
23
+ !I.value || o.value || typeof window > "u" || E(r);
24
24
  });
25
- const k = (s) => {
25
+ const E = (r) => {
26
26
  var e, t, l, a;
27
- const i = document.getElementById(`sidebar-${s}`);
27
+ const i = document.getElementById(`sidebar-${r}`);
28
28
  if (!i || !b.value)
29
29
  return;
30
- let u = q;
31
- i.getAttribute("data-sidebar-type") === "heading" ? u += i.offsetTop + ((e = i.getElementsByClassName("sidebar-heading")) == null ? void 0 : e[0]).offsetHeight : u += i.offsetTop + (((t = i.parentElement) == null ? void 0 : t.offsetTop) ?? 0) + (((a = (l = i.parentElement) == null ? void 0 : l.parentElement) == null ? void 0 : a.offsetTop) ?? 0), b.value.scrollTo({ top: u, behavior: "smooth" });
32
- }, B = (s) => {
30
+ let c = x;
31
+ i.getAttribute("data-sidebar-type") === "heading" ? c += i.offsetTop + ((e = i.getElementsByClassName("sidebar-heading")) == null ? void 0 : e[0]).offsetHeight : c += i.offsetTop + (((t = i.parentElement) == null ? void 0 : t.offsetTop) ?? 0) + (((a = (l = i.parentElement) == null ? void 0 : l.parentElement) == null ? void 0 : a.offsetTop) ?? 0), b.value.scrollTo({ top: c, behavior: "smooth" });
32
+ }, B = (r) => {
33
33
  if (!b.value)
34
34
  return;
35
- const i = new MutationObserver((u, e) => {
36
- document.getElementById(`sidebar-${s}`) && (k(s), p.value = !1, e.disconnect());
35
+ const i = new MutationObserver((c, e) => {
36
+ document.getElementById(`sidebar-${r}`) && (E(r), o.value = !1, e.disconnect());
37
37
  });
38
38
  return i.observe(b.value, {
39
39
  childList: !0,
40
40
  subtree: !0
41
41
  }), i;
42
- };
43
- return N(() => {
44
- const s = B(c.value);
45
- c.value || setTimeout(() => p.value = !1, 300), L(() => {
46
- s == null || s.disconnect();
42
+ }, y = (r) => p.value === r ? !0 : p.value.includes("/description/") ? p.value.split("/description/")[0] === r : !1;
43
+ return L(() => {
44
+ const r = B(p.value);
45
+ p.value || setTimeout(() => o.value = !1, 300), G(() => {
46
+ r == null || r.disconnect();
47
47
  });
48
- }), (s, i) => {
49
- var u;
50
- return r(), d("div", R, [
51
- w(s.$slots, "sidebar-start", {}, void 0, !0),
52
- V("nav", {
48
+ }), (r, i) => {
49
+ var c;
50
+ return s(), n("div", U, [
51
+ V(r.$slots, "sidebar-start", {}, void 0, !0),
52
+ A("nav", {
53
53
  ref_key: "scrollerEl",
54
54
  ref: b,
55
- "aria-label": `Table of contents for ${(u = s.parsedSpec.info) == null ? void 0 : u.title}`,
55
+ "aria-label": `Table of contents for ${(c = r.parsedSpec.info) == null ? void 0 : c.title}`,
56
56
  class: "sidebar-pages custom-scroll custom-scroll-self-contain-overflow"
57
57
  }, [
58
- G(g, { level: 0 }, {
58
+ M(T, { level: 0 }, {
59
59
  default: v(() => [
60
- (r(!0), d(o, null, y(n(O).entries, (e) => (r(), d(o, {
60
+ (s(!0), n(d, null, m(u(O).entries, (e) => (s(), n(d, {
61
61
  key: e.id
62
62
  }, [
63
- e.isGroup ? (r(), d(o, { key: 0 }, [
64
- V("li", j, M(e.displayTitle ?? e.title), 1),
65
- (r(!0), d(o, null, y(e.children, (t) => (r(), f(m, {
63
+ e.isGroup ? (s(), n(d, { key: 0 }, [
64
+ A("li", q, D(e.displayTitle ?? e.title), 1),
65
+ (s(!0), n(d, null, m(e.children, (t) => (s(), f(S, {
66
66
  key: t.id,
67
67
  id: `sidebar-${t.id}`,
68
68
  "data-sidebar-type": "heading",
69
69
  hasChildren: t.children && t.children.length > 0,
70
- isActive: n(c) === t.id,
70
+ isActive: y(t.id),
71
71
  item: {
72
72
  id: t.id,
73
73
  title: t.displayTitle ?? t.title,
@@ -75,26 +75,26 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
75
75
  httpVerb: t.httpVerb,
76
76
  deprecated: t.deprecated ?? !1
77
77
  },
78
- open: n(_)[t.id] ?? !1,
78
+ open: u(k)[t.id] ?? !1,
79
79
  onToggleOpen: async () => {
80
- p.value = !0, n(T)(t.id), await n(C)(100), p.value = !1;
80
+ o.value = !0, u(_)(t.id), await u(C)(100), o.value = !1;
81
81
  }
82
82
  }, {
83
83
  default: v(() => {
84
84
  var l;
85
85
  return [
86
- t.children && ((l = t.children) == null ? void 0 : l.length) > 0 ? (r(), f(g, {
86
+ t.children && ((l = t.children) == null ? void 0 : l.length) > 0 ? (s(), f(T, {
87
87
  key: 0,
88
88
  level: 1
89
89
  }, {
90
90
  default: v(() => [
91
- (r(!0), d(o, null, y(t.children, (a) => (r(), d(o, {
91
+ (s(!0), n(d, null, m(t.children, (a) => (s(), n(d, {
92
92
  key: a.id
93
93
  }, [
94
- e.show ? (r(), f(m, {
94
+ e.show ? (s(), f(S, {
95
95
  key: 0,
96
96
  id: `sidebar-${a.id}`,
97
- isActive: n(c) === a.id,
97
+ isActive: y(a.id),
98
98
  item: {
99
99
  id: a.id,
100
100
  title: a.displayTitle ?? a.title,
@@ -111,13 +111,13 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
111
111
  }),
112
112
  _: 2
113
113
  }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
114
- ], 64)) : (r(), d(o, { key: 1 }, [
115
- e.show ? (r(), f(m, {
114
+ ], 64)) : (s(), n(d, { key: 1 }, [
115
+ e.show ? (s(), f(S, {
116
116
  key: 0,
117
117
  id: `sidebar-${e.id}`,
118
118
  "data-sidebar-type": "heading",
119
119
  hasChildren: e.children && e.children.length > 0,
120
- isActive: n(c) === e.id,
120
+ isActive: y(e.id),
121
121
  item: {
122
122
  id: e.id,
123
123
  title: e.displayTitle ?? e.title,
@@ -125,26 +125,26 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
125
125
  httpVerb: e.httpVerb,
126
126
  deprecated: e.deprecated ?? !1
127
127
  },
128
- open: n(_)[e.id] ?? !1,
128
+ open: u(k)[e.id] ?? !1,
129
129
  onToggleOpen: async () => {
130
- p.value = !0, n(T)(e.id), await n(C)(100), p.value = !1;
130
+ o.value = !0, u(_)(e.id), await u(C)(100), o.value = !1;
131
131
  }
132
132
  }, {
133
133
  default: v(() => {
134
134
  var t;
135
135
  return [
136
- e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (r(), f(g, {
136
+ e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (s(), f(T, {
137
137
  key: 0,
138
138
  level: 1
139
139
  }, {
140
140
  default: v(() => [
141
- (r(!0), d(o, null, y(e.children, (l) => (r(), d(o, {
141
+ (s(!0), n(d, null, m(e.children, (l) => (s(), n(d, {
142
142
  key: l.id
143
143
  }, [
144
- e.show ? (r(), f(m, {
144
+ e.show ? (s(), f(S, {
145
145
  key: 0,
146
146
  id: `sidebar-${l.id}`,
147
- isActive: n(c) === l.id,
147
+ isActive: y(l.id),
148
148
  item: {
149
149
  id: l.id,
150
150
  title: l.displayTitle ?? l.title,
@@ -166,12 +166,12 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
166
166
  ]),
167
167
  _: 1
168
168
  })
169
- ], 8, U),
170
- w(s.$slots, "sidebar-end", {}, void 0, !0)
169
+ ], 8, j),
170
+ V(r.$slots, "sidebar-end", {}, void 0, !0)
171
171
  ]);
172
172
  };
173
173
  }
174
174
  });
175
175
  export {
176
- W as default
176
+ X as default
177
177
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAY5E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CAClD,CAAC;AAyCF,iBAAS,cAAc;WAuGT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;qCACU,GAAG;iCACP,GAAG;;;;EAaxC;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAOnB,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":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAU5E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CAClD,CAAC;AAoCF,iBAAS,cAAc;WAuGT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;qCACU,GAAG;iCACP,GAAG;;;;EAaxC;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAOnB,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,63 +1,57 @@
1
- import { defineComponent as p, watch as C, toRef as s, computed as k, createElementBlock as S, openBlock as f, Fragment as M, createBlock as D, createCommentVNode as v, createVNode as y, resolveDynamicComponent as $, withCtx as t, createTextVNode as w, toDisplayString as B, unref as r, renderSlot as a } from "vue";
2
- import { useColorMode as N } from "@scalar/use-hooks/useColorMode";
3
- import { useSeoMeta as R } from "@unhead/vue";
4
- import { useFavicon as U } from "@vueuse/core";
5
- import { useReactiveSpec as V } from "../hooks/useReactiveSpec.js";
6
- import b from "./Layouts/Layouts.vue.js";
7
- const z = /* @__PURE__ */ p({
1
+ import { defineComponent as c, watch as l, computed as g, createElementBlock as C, openBlock as f, Fragment as k, createBlock as M, createCommentVNode as D, createVNode as p, resolveDynamicComponent as v, withCtx as t, createTextVNode as $, toDisplayString as S, unref as i, renderSlot as r } from "vue";
2
+ import { useColorMode as y } from "@scalar/use-hooks/useColorMode";
3
+ import { useSeoMeta as B } from "@unhead/vue";
4
+ import { useFavicon as N } from "@vueuse/core";
5
+ import V from "./Layouts/Layouts.vue.js";
6
+ const E = /* @__PURE__ */ c({
8
7
  __name: "SingleApiReference",
9
8
  props: {
10
9
  configuration: {}
11
10
  },
12
11
  emits: ["updateContent"],
13
12
  setup(e) {
14
- const { toggleColorMode: u, isDarkMode: i } = N({
13
+ const { toggleColorMode: u, isDarkMode: a } = y({
15
14
  initialColorMode: e.configuration.darkMode ? "dark" : void 0,
16
15
  overrideColorMode: e.configuration.forceDarkModeState
17
16
  });
18
- C(
17
+ l(
19
18
  () => e.configuration.darkMode,
20
- (o) => i.value = !!o
21
- ), e.configuration.metaData && R(e.configuration.metaData);
22
- const { parsedSpec: d, rawSpec: m } = V({
23
- proxyUrl: s(() => e.configuration.proxyUrl || ""),
24
- specConfig: s(() => e.configuration || {})
25
- }), l = k(() => e.configuration.favicon);
26
- return U(l), (o, n) => {
27
- var c;
28
- return f(), S(M, null, [
29
- (c = o.configuration) != null && c.customCss ? (f(), D($("style"), { key: 0 }, {
19
+ (o) => a.value = !!o
20
+ ), e.configuration.metaData && B(e.configuration.metaData);
21
+ const d = g(() => e.configuration.favicon);
22
+ return N(d), (o, n) => {
23
+ var s;
24
+ return f(), C(k, null, [
25
+ (s = o.configuration) != null && s.customCss ? (f(), M(v("style"), { key: 0 }, {
30
26
  default: t(() => [
31
- w(B(o.configuration.customCss), 1)
27
+ $(S(o.configuration.customCss), 1)
32
28
  ]),
33
29
  _: 1
34
- })) : v("", !0),
35
- y(r(b), {
30
+ })) : D("", !0),
31
+ p(i(V), {
36
32
  configuration: o.configuration,
37
- isDark: r(i),
38
- parsedSpec: r(d),
39
- rawSpec: r(m),
40
- onToggleDarkMode: n[0] || (n[0] = () => r(u)()),
41
- onUpdateContent: n[1] || (n[1] = (g) => o.$emit("updateContent", g))
33
+ isDark: i(a),
34
+ onToggleDarkMode: n[0] || (n[0] = () => i(u)()),
35
+ onUpdateContent: n[1] || (n[1] = (m) => o.$emit("updateContent", m))
42
36
  }, {
43
37
  footer: t(() => [
44
- a(o.$slots, "footer")
38
+ r(o.$slots, "footer")
45
39
  ]),
46
40
  "content-end": t(() => [
47
- a(o.$slots, "footer")
41
+ r(o.$slots, "footer")
48
42
  ]),
49
43
  "document-selector": t(() => [
50
- a(o.$slots, "document-selector")
44
+ r(o.$slots, "document-selector")
51
45
  ]),
52
46
  "sidebar-start": t(() => [
53
- a(o.$slots, "sidebar-start")
47
+ r(o.$slots, "sidebar-start")
54
48
  ]),
55
49
  _: 3
56
- }, 8, ["configuration", "isDark", "parsedSpec", "rawSpec"])
50
+ }, 8, ["configuration", "isDark"])
57
51
  ], 64);
58
52
  };
59
53
  }
60
54
  });
61
55
  export {
62
- z as default
56
+ E as default
63
57
  };
package/dist/esm.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAM/F;;;;GAIG;AACH,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,EAAE;AACxF;;;GAGG;AACH,iBAAiB,UAAO;IAwBtB,uDAAuD;4BAC/B,OAAO,CAAC,yBAAyB,CAAC;qBAOzC,iBAAiB;IAOlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
1
+ {"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAM/F;;;;GAIG;AACH,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,EAAE;AACxF;;;GAGG;AACH,iBAAiB,UAAO;IA2BtB,uDAAuD;4BAC/B,OAAO,CAAC,yBAAyB,CAAC;qBAOzC,iBAAiB;IAOlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
@@ -1,8 +1,8 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
2
  import type { ApiClientConfiguration } from '@scalar/types/api-reference';
2
- import type { Spec } from '@scalar/types/legacy';
3
3
  type __VLS_Props = {
4
4
  configuration: Partial<Omit<ApiClientConfiguration, 'plugins'>>;
5
- parsedSpec: Spec;
5
+ dereferencedDocument: OpenAPIV3_1.Document;
6
6
  };
7
7
  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, {}, HTMLDivElement>;
8
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAmIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAYhD,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAA;IAC/D,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;;AA+JF,wBAOG"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAkIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAYzE,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAA;IAC/D,oBAAoB,EAAE,WAAW,CAAC,QAAQ,CAAA;CAC3C,CAAC;;AA8JF,wBAOG"}
@@ -1,73 +1,72 @@
1
- import { defineComponent as h, ref as S, onMounted as E, watch as b, onBeforeUnmount as x, createElementBlock as M, openBlock as g } from "vue";
2
- import { useActiveEntities as k, useWorkspace as A } from "@scalar/api-client/store";
3
- import { mutateSecuritySchemeDiff as C } from "@scalar/api-client/views/Request/libs";
4
- import { getServersFromOpenApiDocument as U } from "@scalar/oas-utils/transforms";
5
- import { watchDebounced as B } from "@vueuse/core";
6
- import D from "microdiff";
1
+ import { defineComponent as d, ref as h, onMounted as S, watch as E, onBeforeUnmount as b, createElementBlock as x, openBlock as D } from "vue";
2
+ import { useActiveEntities as M, useWorkspace as g } from "@scalar/api-client/store";
3
+ import { mutateSecuritySchemeDiff as k } from "@scalar/api-client/views/Request/libs";
4
+ import { getServersFromOpenApiDocument as A } from "@scalar/oas-utils/transforms";
5
+ import { watchDebounced as U } from "@vueuse/core";
6
+ import B from "microdiff";
7
7
  import { useNavState as _ } from "../../hooks/useNavState.js";
8
8
  import { useApiClient as y } from "./useApiClient.js";
9
- import { useExampleStore as I } from "../../legacy/stores/useExampleStore.js";
10
- const G = /* @__PURE__ */ h({
9
+ import { useExampleStore as C } from "../../legacy/stores/useExampleStore.js";
10
+ const q = /* @__PURE__ */ d({
11
11
  __name: "ApiClientModal",
12
12
  props: {
13
13
  configuration: {},
14
- parsedSpec: {}
14
+ dereferencedDocument: {}
15
15
  },
16
- setup(i) {
17
- const c = S(null), { client: o, init: v } = y(), { selectedExampleKey: d, operationId: l } = I(), s = k(), r = A(), { isIntersectionEnabled: m } = _();
18
- return E(() => {
19
- c.value && v({
16
+ setup(a) {
17
+ const c = h(null), { client: i, init: p } = y(), { selectedExampleKey: v, operationId: l } = C(), u = M(), r = g(), { isIntersectionEnabled: m } = _();
18
+ return S(() => {
19
+ c.value && p({
20
20
  el: c.value,
21
- configuration: i.configuration,
21
+ configuration: a.configuration,
22
22
  store: r
23
23
  });
24
- }), B(
25
- () => i.configuration,
26
- (e, a) => {
27
- var f;
28
- if (!a || !s.activeCollection.value)
24
+ }), U(
25
+ () => a.configuration,
26
+ (t, o) => {
27
+ if (!o || !u.activeCollection.value)
29
28
  return;
30
- const n = s.activeCollection.value, p = D(a, e);
31
- if (p.some(
32
- (t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
33
- ))
34
- (f = o.value) == null || f.updateConfig(e);
35
- else if (p.forEach((t) => {
36
- t.path[0] === "authentication" && C(t, s, r);
37
- }), e.servers || a.servers) {
38
- n.servers.forEach((u) => {
39
- r.serverMutators.delete(u, n.uid);
40
- });
41
- const t = U(
42
- e.servers ?? i.parsedSpec.servers,
43
- {
44
- baseServerURL: e.baseServerURL
45
- }
46
- );
47
- t.forEach((u) => {
48
- r.serverMutators.add(u, n.uid);
49
- }), t.length && r.collectionMutators.edit(
50
- n.uid,
51
- "selectedServerUid",
52
- t[t.length - 1].uid
53
- );
29
+ const n = u.activeCollection.value, f = B(o, t);
30
+ if (!f.some(
31
+ (e) => e.path[0] === "url" || e.path[0] === "content" || e.path[1] === "url" || e.path[1] === "content"
32
+ )) {
33
+ if (f.forEach((e) => {
34
+ e.path[0] === "authentication" && k(e, u, r);
35
+ }), t.servers || o.servers) {
36
+ n.servers.forEach((s) => {
37
+ r.serverMutators.delete(s, n.uid);
38
+ });
39
+ const e = A(
40
+ t.servers ?? a.dereferencedDocument.servers,
41
+ {
42
+ baseServerURL: t.baseServerURL
43
+ }
44
+ );
45
+ e.forEach((s) => {
46
+ r.serverMutators.add(s, n.uid);
47
+ }), e.length && r.collectionMutators.edit(
48
+ n.uid,
49
+ "selectedServerUid",
50
+ e[e.length - 1].uid
51
+ );
52
+ }
54
53
  }
55
54
  m.value = !1, setTimeout(() => {
56
55
  m.value = !0;
57
56
  }, 1e3);
58
57
  },
59
58
  { deep: !0, debounce: 300 }
60
- ), b(d, (e) => {
61
- o.value && e && l.value && o.value.updateExample(e, l.value);
62
- }), x(() => {
63
- var e;
64
- return (e = o.value) == null ? void 0 : e.app.unmount();
65
- }), (e, a) => (g(), M("div", {
59
+ ), E(v, (t) => {
60
+ i.value && t && l.value && i.value.updateExample(t, l.value);
61
+ }), b(() => {
62
+ var t;
63
+ return (t = i.value) == null ? void 0 : t.app.unmount();
64
+ }), (t, o) => (D(), x("div", {
66
65
  ref_key: "el",
67
66
  ref: c
68
67
  }, null, 512));
69
68
  }
70
69
  });
71
70
  export {
72
- G as default
71
+ q as default
73
72
  };