@scalar/api-reference 1.25.127 → 1.25.128

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 (87) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/browser/standalone.js +16046 -15965
  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 +40 -64
  6. package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  9. package/dist/components/ApiReferenceLayout.vue2.js +158 -159
  10. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +69 -17
  13. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +5 -1
  14. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  15. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  16. package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +73 -94
  17. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +16 -0
  18. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +1 -0
  19. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.js +36 -0
  20. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  22. package/dist/components/Content/Schema/Schema.vue2.js +4 -1
  23. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  24. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  25. package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
  26. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  28. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +143 -124
  29. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  30. package/dist/components/GettingStarted.vue.js +1 -1
  31. package/dist/components/GettingStarted.vue2.js +13 -13
  32. package/dist/components/Layouts/ClassicLayout.vue.d.ts +3 -3
  33. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  34. package/dist/components/Layouts/Layouts.vue.d.ts +3 -3
  35. package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
  36. package/dist/components/Layouts/ModernLayout.vue.d.ts +3 -3
  37. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  38. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  39. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  40. package/dist/components/Section/CompactSection.vue.js +2 -2
  41. package/dist/components/Section/CompactSection.vue2.js +30 -29
  42. package/dist/esm.d.ts +5 -3
  43. package/dist/esm.d.ts.map +1 -1
  44. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
  45. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  46. package/dist/features/ApiClientModal/useApiClient.d.ts +362 -342
  47. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  48. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  49. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  50. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +82 -74
  51. package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +1 -1
  52. package/dist/features/ExampleResponses/ExampleResponse.vue.js +2 -2
  53. package/dist/features/ExampleResponses/ExampleResponse.vue2.js +11 -11
  54. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  55. package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
  56. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +90 -78
  57. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +1 -1
  58. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  59. package/dist/features/Operation/components/ContentTypeSelect.vue.js +1 -1
  60. package/dist/features/Operation/components/ContentTypeSelect.vue2.js +29 -25
  61. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  62. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  63. package/dist/features/Operation/components/ParameterListItem.vue2.js +40 -47
  64. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  65. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  66. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  67. package/dist/helpers/get-request.d.ts +1 -1
  68. package/dist/helpers/get-request.d.ts.map +1 -1
  69. package/dist/hooks/index.d.ts +0 -1
  70. package/dist/hooks/index.d.ts.map +1 -1
  71. package/dist/hooks/useConfig.d.ts +3 -3
  72. package/dist/hooks/useConfig.d.ts.map +1 -1
  73. package/dist/hooks/useConfig.js +5 -4
  74. package/dist/index.js +17 -19
  75. package/dist/standalone/lib/html-api.d.ts +3 -3
  76. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  77. package/dist/standalone/lib/html-rendering.d.ts +23 -24
  78. package/dist/standalone/lib/html-rendering.d.ts.map +1 -1
  79. package/dist/standalone/lib/html-rendering.js +39 -29
  80. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  81. package/dist/style.css +1 -1
  82. package/dist/types.d.ts +19 -2
  83. package/dist/types.d.ts.map +1 -1
  84. package/package.json +11 -10
  85. package/dist/hooks/useDeprecationWarnings.d.ts +0 -6
  86. package/dist/hooks/useDeprecationWarnings.d.ts.map +0 -1
  87. package/dist/hooks/useDeprecationWarnings.js +0 -20
@@ -1,60 +1,61 @@
1
- import { defineComponent as d, ref as m, watch as p, nextTick as u, openBlock as a, createElementBlock as f, createElementVNode as v, normalizeClass as h, createVNode as i, unref as b, withCtx as n, renderSlot as r, createBlock as C, createCommentVNode as k } from "vue";
2
- import { ScalarIcon as g } from "@scalar/components";
3
- import S from "../Anchor/Anchor.vue.js";
4
- import _ from "./Section.vue.js";
5
- import { useNavState as w } from "../../hooks/useNavState.js";
6
- import { scrollToId as N } from "../../helpers/scrollToId.js";
7
- const B = ["aria-expanded"], V = ["id"], A = /* @__PURE__ */ d({
1
+ import { defineComponent as u, ref as m, useId as f, watch as v, nextTick as h, openBlock as n, createElementBlock as b, createElementVNode as C, unref as t, normalizeClass as k, createVNode as r, withCtx as s, renderSlot as c, createBlock as g, createCommentVNode as S } from "vue";
2
+ import { ScalarIcon as _ } from "@scalar/components";
3
+ import w from "../Anchor/Anchor.vue.js";
4
+ import N from "./Section.vue.js";
5
+ import { useNavState as y } from "../../hooks/useNavState.js";
6
+ import { scrollToId as B } from "../../helpers/scrollToId.js";
7
+ const I = { class: "collapsible-section" }, V = ["id", "aria-controls", "aria-expanded"], R = /* @__PURE__ */ u({
8
8
  __name: "CompactSection",
9
9
  props: {
10
10
  id: {},
11
11
  label: {}
12
12
  },
13
- setup(s) {
14
- const t = s, { hash: c } = w(), e = m(!1);
15
- return p(
16
- c,
13
+ setup(d) {
14
+ const a = d, { hash: p } = y(), e = m(!1), l = f();
15
+ return v(
16
+ p,
17
17
  async (o) => {
18
- o === t.id && !e.value && (e.value = !0, await u(), N(t.id));
18
+ o === a.id && !e.value && (e.value = !0, await h(), B(a.id));
19
19
  },
20
20
  { immediate: !0 }
21
- ), (o, l) => (a(), f("div", {
22
- "aria-expanded": e.value,
23
- class: "collapsible-section"
24
- }, [
25
- v("div", {
21
+ ), (o, i) => (n(), b("div", I, [
22
+ C("button", {
26
23
  id: o.id,
27
- class: h(["collapsible-section-trigger", { "collapsible-section-trigger-open": e.value }]),
28
- onClick: l[0] || (l[0] = ($) => e.value = !e.value)
24
+ "aria-controls": t(l),
25
+ "aria-expanded": e.value,
26
+ class: k(["collapsible-section-trigger", { "collapsible-section-trigger-open": e.value }]),
27
+ type: "button",
28
+ onClick: i[0] || (i[0] = ($) => e.value = !e.value)
29
29
  }, [
30
- i(b(g), {
30
+ r(t(_), {
31
31
  icon: e.value ? "ChevronDown" : "ChevronRight",
32
32
  size: "md",
33
33
  thickness: "1.5"
34
34
  }, null, 8, ["icon"]),
35
- i(S, {
35
+ r(w, {
36
36
  id: o.id,
37
37
  class: "collapsible-section-header"
38
38
  }, {
39
- default: n(() => [
40
- r(o.$slots, "heading", {}, void 0, !0)
39
+ default: s(() => [
40
+ c(o.$slots, "heading", {}, void 0, !0)
41
41
  ]),
42
42
  _: 3
43
43
  }, 8, ["id"])
44
44
  ], 10, V),
45
- e.value ? (a(), C(_, {
45
+ e.value ? (n(), g(N, {
46
46
  key: 0,
47
+ id: t(l),
47
48
  class: "collapsible-section-content",
48
49
  label: o.label
49
50
  }, {
50
- default: n(() => [
51
- r(o.$slots, "default", {}, void 0, !0)
51
+ default: s(() => [
52
+ c(o.$slots, "default", {}, void 0, !0)
52
53
  ]),
53
54
  _: 3
54
- }, 8, ["label"])) : k("", !0)
55
- ], 8, B));
55
+ }, 8, ["id", "label"])) : S("", !0)
56
+ ]));
56
57
  }
57
58
  });
58
59
  export {
59
- A as default
60
+ R as default
60
61
  };
package/dist/esm.d.ts CHANGED
@@ -1,17 +1,19 @@
1
- import type { ReferenceConfiguration, SpecConfiguration } from '@scalar/types/legacy';
1
+ import type { SpecConfiguration } from '@scalar/types/legacy';
2
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
3
+ import type { ReferenceConfiguration } from '@scalar/types/legacy';
2
4
  /** Initialize Scalar References */
3
5
  export declare function createScalarReferences(
4
6
  /** Element to mount the references to */
5
7
  el: HTMLElement | null,
6
8
  /** Configuration object for Scalar References */
7
- initialConfig: ReferenceConfiguration,
9
+ initialConfig: ApiReferenceConfiguration | ReferenceConfiguration,
8
10
  /**
9
11
  * Will attempt to mount the references immediately
10
12
  * For SSR this may need to be blocked and done client side
11
13
  */
12
14
  mountOnInitialize?: boolean): {
13
15
  /** Update the configuration for a mounted reference */
14
- updateConfig(newConfig: ReferenceConfiguration, mergeConfigs?: boolean): void;
16
+ updateConfig(newConfig: ApiReferenceConfiguration | ReferenceConfiguration, mergeConfigs?: boolean): void;
15
17
  updateSpec(spec: SpecConfiguration): void;
16
18
  /** Mount the references to a given element */
17
19
  mount: (mountingEl?: HTMLElement | null) => void;
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,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAMrF,mCAAmC;AACnC,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,sBAAsB;AACrC;;;GAGG;AACH,iBAAiB,UAAO;IAoBtB,uDAAuD;4BAC/B,sBAAsB;qBAO7B,iBAAiB;IAGlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
1
+ {"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAI7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAIlE,mCAAmC;AACnC,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,yBAAyB,GAAG,sBAAsB;AACjE;;;GAGG;AACH,iBAAiB,UAAO;IAoBtB,uDAAuD;4BAC/B,yBAAyB,GAAG,sBAAsB;qBAOzD,iBAAiB;IAGlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
@@ -1,6 +1,6 @@
1
- import type { ClientConfiguration } from '@scalar/api-client/libs';
1
+ import type { ApiClientConfiguration } from '@scalar/types/api-reference';
2
2
  type __VLS_Props = {
3
- configuration: ClientConfiguration;
3
+ configuration: Partial<ApiClientConfiguration>;
4
4
  };
5
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, {}, HTMLDivElement>;
6
6
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAUlE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,mBAAmB,CAAA;CACnC,CAAC;;AA2FF,wBAOG"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AASzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AA2FF,wBAOG"}